diff --git a/README.md b/README.md index 78a161d..aba214b 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ Package is available on npm and can be installed from the command line. ```shell -$ npm i native-modal +$ npm i tiny-dialogue ``` ### via CDN You can also download or link to the latest compiled version using the CDN. ```shell -https://unpkg.com/native-modal/dist/native-modal.min.js +https://unpkg.com/tiny-dialogue/dist/tiny-dialogue.min.js ``` ## Usage @@ -18,9 +18,9 @@ https://unpkg.com/native-modal/dist/native-modal.min.js See simple usage with attribute based modals. ```typescript -import { initNativeModal } from 'native-modal' +import { initSimpleDialogues } from 'tiny-dialogue' -initNativeModal() // register attrs handling +initSimpleDialogues() // enable simple mode (attrs handling) ``` ```html @@ -30,7 +30,7 @@ initNativeModal() // register attrs handling ... -

NativeModal

+

Dialogue

Hello, click on OK to close modal.

@@ -132,7 +132,7 @@ First, we need to define the modal structure of the DOM Next, we need to create a Modal instance: ```typescript -import { Modal } from 'native-modal' +import { Modal } from 'tiny-dialogue' const modal = new Modal('#modal') @@ -143,9 +143,9 @@ modal.close() // easy to close! Okay, how do I apply the parameters? Let's look at an example: ```typescript -import { Modal } from 'native-modal' +import { Modal } from 'tiny-dialogue' -const modal = new Modal('#modal', { +const modal = new Dialogue('#modal', { animation: true, // enable open/close animation disableEsc: true, // prevent esc closing }) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index cce23e2..216be51 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -2,8 +2,8 @@ import { defineConfig } from 'vitepress' // https://vitepress.dev/reference/site-config export default defineConfig({ - base: '/native-modal/', - title: 'NativeModal', + base: '/tiny-dialogue/', + title: 'Dialogue', description: 'Tiny wrapper over ', themeConfig: { // https://vitepress.dev/reference/default-theme-config @@ -30,7 +30,7 @@ export default defineConfig({ ], socialLinks: [ - { icon: 'github', link: 'https://github.com/azabroflovski/native-modal' }, + { icon: 'github', link: 'https://github.com/azabroflovski/tiny-dialogue' }, ], }, }) diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index 31fb51f..4cdd96f 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -49,9 +49,9 @@ --vp-c-default-3: var(--vp-c-gray-3); --vp-c-default-soft: var(--vp-c-gray-soft); - --vp-c-brand-1: var(--vp-c-indigo-1); - --vp-c-brand-2: var(--vp-c-indigo-2); - --vp-c-brand-3: var(--vp-c-indigo-3); + --vp-c-brand-1: #cc7cd3; + --vp-c-brand-2: #cc7cd3; + --vp-c-brand-3: #e28fe9; --vp-c-brand-soft: var(--vp-c-indigo-soft); --vp-c-tip-1: var(--vp-c-brand-1); @@ -92,17 +92,9 @@ :root { --vp-home-hero-name-color: transparent; - --vp-home-hero-name-background: -webkit-linear-gradient( - 120deg, - #bd34fe 30%, - #41d1ff - ); - - --vp-home-hero-image-background-image: linear-gradient( - -45deg, - #bd34fe 50%, - #47caff 50% - ); + --vp-home-hero-name-background: linear-gradient(90deg, hsla(302, 82%, 76%, 1) 0%, hsla(258, 40%, 68%, 1) 100%); + + --vp-home-hero-image-background-image: linear-gradient(90deg, hsla(302, 82%, 76%, 1) 0%, hsla(258, 40%, 68%, 1) 100%); --vp-home-hero-image-filter: blur(44px); } diff --git a/docs/index.md b/docs/index.md index 497222c..e422b71 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,9 +3,9 @@ layout: home hero: - name: "NativeModal" + name: "Dialogue" text: "Tiny wrapper over the <dialog />" - tagline: No overhead scripts. Just modal. + tagline: Native, no overhead scripts, just dialog actions: - theme: brand text: Get started @@ -15,7 +15,7 @@ hero: link: /demos image: src: /logo.png - alt: NativeModal + alt: Dialogue features: - title: 0.1 kb diff --git a/docs/introduction.md b/docs/introduction.md index 9a15d48..1e9dd69 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,14 +1,14 @@ # Introduction -These are the core concepts you need to know about `native-modal` and its approach to modals management. +These are the core concepts you need to know about `tiny-dialogue` and its approach to modals management. -## What is NativeModal ? +## What is Dialogue ? -NativeModal is a streamlined and efficient library designed to provide +Dialogue is a streamlined and efficient library designed to provide a simple and direct wrapper around the native HTML [``]() element, providing an effortless way to implement modals without the need for bulky scripts or complex dependencies. -In summary, `native-modal` is an elegant, performance-oriented solution for implementing modals in web applications. +In summary, `tiny-dialogue` is an elegant, performance-oriented solution for implementing modals in web applications. Its combination of minimal overhead, native browser integration, speed, broad compatibility, framework flexibility, and strong typing makes it an excellent choice for developers. diff --git a/docs/public/logo.png b/docs/public/logo.png index bf65c00..0dad882 100644 Binary files a/docs/public/logo.png and b/docs/public/logo.png differ diff --git a/docs/quick-start.md b/docs/quick-start.md index 2e873d3..f043e55 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -1,9 +1,9 @@