nuance-ui 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -0
- package/dist/module.d.mts +24 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +96 -0
- package/dist/runtime/components/action-icon/action-icon-group.d.vue.ts +17 -0
- package/dist/runtime/components/action-icon/action-icon-group.vue +13 -0
- package/dist/runtime/components/action-icon/action-icon-group.vue.d.ts +17 -0
- package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +23 -0
- package/dist/runtime/components/action-icon/action-icon-section.vue +45 -0
- package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +23 -0
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +29 -0
- package/dist/runtime/components/action-icon/action-icon.module.css +1 -0
- package/dist/runtime/components/action-icon/action-icon.vue +71 -0
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +29 -0
- package/dist/runtime/components/action-icon/index.d.ts +3 -0
- package/dist/runtime/components/action-icon/index.js +0 -0
- package/dist/runtime/components/app-shell/app-shell-aside.d.vue.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-aside.vue +43 -0
- package/dist/runtime/components/app-shell/app-shell-aside.vue.d.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-footer.d.vue.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-footer.vue +42 -0
- package/dist/runtime/components/app-shell/app-shell-footer.vue.d.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-header.d.vue.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-header.vue +43 -0
- package/dist/runtime/components/app-shell/app-shell-header.vue.d.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-main.d.vue.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-main.vue +30 -0
- package/dist/runtime/components/app-shell/app-shell-main.vue.d.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-navbar.d.vue.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-navbar.vue +47 -0
- package/dist/runtime/components/app-shell/app-shell-navbar.vue.d.ts +14 -0
- package/dist/runtime/components/app-shell/app-shell-section.d.vue.ts +18 -0
- package/dist/runtime/components/app-shell/app-shell-section.vue +22 -0
- package/dist/runtime/components/app-shell/app-shell-section.vue.d.ts +18 -0
- package/dist/runtime/components/app-shell/app-shell.d.vue.ts +27 -0
- package/dist/runtime/components/app-shell/app-shell.vue +70 -0
- package/dist/runtime/components/app-shell/app-shell.vue.d.ts +27 -0
- package/dist/runtime/components/app-shell/index.d.ts +7 -0
- package/dist/runtime/components/app-shell/index.js +0 -0
- package/dist/runtime/components/background-image.d.vue.ts +10 -0
- package/dist/runtime/components/background-image.vue +37 -0
- package/dist/runtime/components/background-image.vue.d.ts +10 -0
- package/dist/runtime/components/box.d.vue.ts +20 -0
- package/dist/runtime/components/box.vue +14 -0
- package/dist/runtime/components/box.vue.d.ts +20 -0
- package/dist/runtime/components/button/button-group.d.vue.ts +17 -0
- package/dist/runtime/components/button/button-group.vue +13 -0
- package/dist/runtime/components/button/button-group.vue.d.ts +17 -0
- package/dist/runtime/components/button/button.d.vue.ts +40 -0
- package/dist/runtime/components/button/button.module.css +1 -0
- package/dist/runtime/components/button/button.vue +108 -0
- package/dist/runtime/components/button/button.vue.d.ts +40 -0
- package/dist/runtime/components/button/index.d.ts +3 -0
- package/dist/runtime/components/button/index.js +0 -0
- package/dist/runtime/components/button/unstyled-button.d.vue.ts +16 -0
- package/dist/runtime/components/button/unstyled-button.vue +37 -0
- package/dist/runtime/components/button/unstyled-button.vue.d.ts +16 -0
- package/dist/runtime/components/card/card-section.d.vue.ts +19 -0
- package/dist/runtime/components/card/card-section.vue +14 -0
- package/dist/runtime/components/card/card-section.vue.d.ts +19 -0
- package/dist/runtime/components/card/card.d.vue.ts +18 -0
- package/dist/runtime/components/card/card.module.css +1 -0
- package/dist/runtime/components/card/card.vue +18 -0
- package/dist/runtime/components/card/card.vue.d.ts +18 -0
- package/dist/runtime/components/card/index.d.ts +2 -0
- package/dist/runtime/components/card/index.js +0 -0
- package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +30 -0
- package/dist/runtime/components/checkbox/checkbox-card.vue +76 -0
- package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +30 -0
- package/dist/runtime/components/checkbox/checkbox-group.d.vue.ts +34 -0
- package/dist/runtime/components/checkbox/checkbox-group.vue +32 -0
- package/dist/runtime/components/checkbox/checkbox-group.vue.d.ts +34 -0
- package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +37 -0
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +161 -0
- package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +37 -0
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +36 -0
- package/dist/runtime/components/checkbox/checkbox.vue +190 -0
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +36 -0
- package/dist/runtime/components/checkbox/index.d.ts +6 -0
- package/dist/runtime/components/checkbox/index.js +2 -0
- package/dist/runtime/components/checkbox/lib/card.context.d.ts +7 -0
- package/dist/runtime/components/checkbox/lib/card.context.js +8 -0
- package/dist/runtime/components/checkbox/lib/group.context.d.ts +16 -0
- package/dist/runtime/components/checkbox/lib/group.context.js +15 -0
- package/dist/runtime/components/chip/chip-group.d.vue.ts +24 -0
- package/dist/runtime/components/chip/chip-group.vue +20 -0
- package/dist/runtime/components/chip/chip-group.vue.d.ts +24 -0
- package/dist/runtime/components/chip/chip.d.vue.ts +35 -0
- package/dist/runtime/components/chip/chip.vue +270 -0
- package/dist/runtime/components/chip/chip.vue.d.ts +35 -0
- package/dist/runtime/components/chip/index.d.ts +3 -0
- package/dist/runtime/components/chip/index.js +1 -0
- package/dist/runtime/components/chip/lib.d.ts +14 -0
- package/dist/runtime/components/chip/lib.js +25 -0
- package/dist/runtime/components/combobox/combobox-dropdown.d.vue.ts +13 -0
- package/dist/runtime/components/combobox/combobox-dropdown.vue +33 -0
- package/dist/runtime/components/combobox/combobox-dropdown.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/combobox-empty.d.vue.ts +16 -0
- package/dist/runtime/components/combobox/combobox-empty.vue +11 -0
- package/dist/runtime/components/combobox/combobox-empty.vue.d.ts +16 -0
- package/dist/runtime/components/combobox/combobox-group.d.vue.ts +27 -0
- package/dist/runtime/components/combobox/combobox-group.vue +47 -0
- package/dist/runtime/components/combobox/combobox-group.vue.d.ts +27 -0
- package/dist/runtime/components/combobox/combobox-option-list.d.vue.ts +18 -0
- package/dist/runtime/components/combobox/combobox-option-list.vue +13 -0
- package/dist/runtime/components/combobox/combobox-option-list.vue.d.ts +18 -0
- package/dist/runtime/components/combobox/combobox-option.d.vue.ts +23 -0
- package/dist/runtime/components/combobox/combobox-option.vue +65 -0
- package/dist/runtime/components/combobox/combobox-option.vue.d.ts +23 -0
- package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +34 -0
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +74 -0
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +34 -0
- package/dist/runtime/components/combobox/combobox-root.d.vue.ts +49 -0
- package/dist/runtime/components/combobox/combobox-root.vue +46 -0
- package/dist/runtime/components/combobox/combobox-root.vue.d.ts +49 -0
- package/dist/runtime/components/combobox/combobox-target.d.vue.ts +29 -0
- package/dist/runtime/components/combobox/combobox-target.vue +32 -0
- package/dist/runtime/components/combobox/combobox-target.vue.d.ts +29 -0
- package/dist/runtime/components/combobox/combobox.module.css +1 -0
- package/dist/runtime/components/combobox/index.d.ts +11 -0
- package/dist/runtime/components/combobox/index.js +2 -0
- package/dist/runtime/components/combobox/lib/const.d.ts +7 -0
- package/dist/runtime/components/combobox/lib/const.js +6 -0
- package/dist/runtime/components/combobox/lib/context.d.ts +16 -0
- package/dist/runtime/components/combobox/lib/context.js +8 -0
- package/dist/runtime/components/combobox/lib/use-combobox/get-index.d.ts +3 -0
- package/dist/runtime/components/combobox/lib/use-combobox/get-index.js +33 -0
- package/dist/runtime/components/combobox/lib/use-combobox/handlers.d.ts +36 -0
- package/dist/runtime/components/combobox/lib/use-combobox/handlers.js +82 -0
- package/dist/runtime/components/combobox/lib/use-combobox/index.d.ts +1 -0
- package/dist/runtime/components/combobox/lib/use-combobox/index.js +1 -0
- package/dist/runtime/components/combobox/lib/use-combobox/use-combobox.d.ts +70 -0
- package/dist/runtime/components/combobox/lib/use-combobox/use-combobox.js +97 -0
- package/dist/runtime/components/combobox/lib/use-combobox-data/get-parsed-combobox-data.d.ts +2 -0
- package/dist/runtime/components/combobox/lib/use-combobox-data/get-parsed-combobox-data.js +23 -0
- package/dist/runtime/components/combobox/lib/use-combobox-data/index.d.ts +1 -0
- package/dist/runtime/components/combobox/lib/use-combobox-data/index.js +1 -0
- package/dist/runtime/components/combobox/lib/use-combobox-data/use-combobox-data.d.ts +7 -0
- package/dist/runtime/components/combobox/lib/use-combobox-data/use-combobox-data.js +23 -0
- package/dist/runtime/components/combobox/lib/use-combobox-target.d.ts +25 -0
- package/dist/runtime/components/combobox/lib/use-combobox-target.js +65 -0
- package/dist/runtime/components/combobox/lib/utils/default-option-filter.d.ts +7 -0
- package/dist/runtime/components/combobox/lib/utils/default-option-filter.js +27 -0
- package/dist/runtime/components/combobox/lib/utils/index.d.ts +5 -0
- package/dist/runtime/components/combobox/lib/utils/index.js +6 -0
- package/dist/runtime/components/combobox/lib/utils/is-empty-combobox-data.d.ts +2 -0
- package/dist/runtime/components/combobox/lib/utils/is-empty-combobox-data.js +11 -0
- package/dist/runtime/components/combobox/lib/utils/is-options-group.d.ts +2 -0
- package/dist/runtime/components/combobox/lib/utils/is-options-group.js +3 -0
- package/dist/runtime/components/combobox/types/index.d.ts +19 -0
- package/dist/runtime/components/combobox/types/index.js +1 -0
- package/dist/runtime/components/combobox/types/item.d.ts +22 -0
- package/dist/runtime/components/combobox/types/item.js +0 -0
- package/dist/runtime/components/container.d.vue.ts +19 -0
- package/dist/runtime/components/container.vue +33 -0
- package/dist/runtime/components/container.vue.d.ts +19 -0
- package/dist/runtime/components/dialog/dialog-close-button.d.vue.ts +14 -0
- package/dist/runtime/components/dialog/dialog-close-button.vue +28 -0
- package/dist/runtime/components/dialog/dialog-close-button.vue.d.ts +14 -0
- package/dist/runtime/components/dialog/dialog-header.d.vue.ts +16 -0
- package/dist/runtime/components/dialog/dialog-header.vue +11 -0
- package/dist/runtime/components/dialog/dialog-header.vue.d.ts +16 -0
- package/dist/runtime/components/dialog/dialog-root.d.vue.ts +54 -0
- package/dist/runtime/components/dialog/dialog-root.vue +93 -0
- package/dist/runtime/components/dialog/dialog-root.vue.d.ts +54 -0
- package/dist/runtime/components/dialog/dialog-title.d.vue.ts +16 -0
- package/dist/runtime/components/dialog/dialog-title.vue +11 -0
- package/dist/runtime/components/dialog/dialog-title.vue.d.ts +16 -0
- package/dist/runtime/components/dialog/dialog.module.css +1 -0
- package/dist/runtime/components/dialog/index.d.ts +5 -0
- package/dist/runtime/components/dialog/index.js +1 -0
- package/dist/runtime/components/dialog/lib.d.ts +2 -0
- package/dist/runtime/components/dialog/lib.js +8 -0
- package/dist/runtime/components/dialog/types/index.d.ts +9 -0
- package/dist/runtime/components/dialog/types/index.js +0 -0
- package/dist/runtime/components/drawer/drawer-close-button.d.vue.ts +14 -0
- package/dist/runtime/components/drawer/drawer-close-button.vue +20 -0
- package/dist/runtime/components/drawer/drawer-close-button.vue.d.ts +14 -0
- package/dist/runtime/components/drawer/drawer-header.d.vue.ts +16 -0
- package/dist/runtime/components/drawer/drawer-header.vue +10 -0
- package/dist/runtime/components/drawer/drawer-header.vue.d.ts +16 -0
- package/dist/runtime/components/drawer/drawer-root.d.vue.ts +31 -0
- package/dist/runtime/components/drawer/drawer-root.vue +45 -0
- package/dist/runtime/components/drawer/drawer-root.vue.d.ts +31 -0
- package/dist/runtime/components/drawer/drawer-title.d.vue.ts +16 -0
- package/dist/runtime/components/drawer/drawer-title.vue +10 -0
- package/dist/runtime/components/drawer/drawer-title.vue.d.ts +16 -0
- package/dist/runtime/components/drawer/drawer.module.css +1 -0
- package/dist/runtime/components/drawer/index.d.ts +3 -0
- package/dist/runtime/components/drawer/index.js +0 -0
- package/dist/runtime/components/index.d.ts +26 -0
- package/dist/runtime/components/index.js +26 -0
- package/dist/runtime/components/input/index.d.ts +10 -0
- package/dist/runtime/components/input/index.js +1 -0
- package/dist/runtime/components/input/input.d.vue.ts +38 -0
- package/dist/runtime/components/input/input.vue +38 -0
- package/dist/runtime/components/input/input.vue.d.ts +38 -0
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +18 -0
- package/dist/runtime/components/input/lib/input-wrapper.context.js +9 -0
- package/dist/runtime/components/input/number-input.d.vue.ts +36 -0
- package/dist/runtime/components/input/number-input.vue +172 -0
- package/dist/runtime/components/input/number-input.vue.d.ts +36 -0
- package/dist/runtime/components/input/password-input.d.vue.ts +4 -0
- package/dist/runtime/components/input/password-input.vue +28 -0
- package/dist/runtime/components/input/password-input.vue.d.ts +4 -0
- package/dist/runtime/components/input/text-input.d.vue.ts +32 -0
- package/dist/runtime/components/input/text-input.vue +38 -0
- package/dist/runtime/components/input/text-input.vue.d.ts +32 -0
- package/dist/runtime/components/input/types/index.d.ts +5 -0
- package/dist/runtime/components/input/types/index.js +0 -0
- package/dist/runtime/components/input/ui/input-base.d.vue.ts +28 -0
- package/dist/runtime/components/input/ui/input-base.vue +343 -0
- package/dist/runtime/components/input/ui/input-base.vue.d.ts +28 -0
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +30 -0
- package/dist/runtime/components/input/ui/input-inline.vue +138 -0
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +30 -0
- package/dist/runtime/components/input/ui/input-label.d.vue.ts +18 -0
- package/dist/runtime/components/input/ui/input-label.vue +26 -0
- package/dist/runtime/components/input/ui/input-label.vue.d.ts +18 -0
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +26 -0
- package/dist/runtime/components/input/ui/input-wrapper.vue +96 -0
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +26 -0
- package/dist/runtime/components/link/index.d.ts +3 -0
- package/dist/runtime/components/link/index.js +1 -0
- package/dist/runtime/components/link/lib.d.ts +16 -0
- package/dist/runtime/components/link/lib.js +25 -0
- package/dist/runtime/components/link/link-button.d.vue.ts +21 -0
- package/dist/runtime/components/link/link-button.vue +42 -0
- package/dist/runtime/components/link/link-button.vue.d.ts +21 -0
- package/dist/runtime/components/link/link.d.vue.ts +18 -0
- package/dist/runtime/components/link/link.vue +47 -0
- package/dist/runtime/components/link/link.vue.d.ts +18 -0
- package/dist/runtime/components/loader/_loaders/bars-loader.d.vue.ts +3 -0
- package/dist/runtime/components/loader/_loaders/bars-loader.vue +11 -0
- package/dist/runtime/components/loader/_loaders/bars-loader.vue.d.ts +3 -0
- package/dist/runtime/components/loader/_loaders/dots-loader.d.vue.ts +3 -0
- package/dist/runtime/components/loader/_loaders/dots-loader.vue +11 -0
- package/dist/runtime/components/loader/_loaders/dots-loader.vue.d.ts +3 -0
- package/dist/runtime/components/loader/_loaders/oval-loader.d.vue.ts +3 -0
- package/dist/runtime/components/loader/_loaders/oval-loader.vue +7 -0
- package/dist/runtime/components/loader/_loaders/oval-loader.vue.d.ts +3 -0
- package/dist/runtime/components/loader/index.d.ts +1 -0
- package/dist/runtime/components/loader/index.js +0 -0
- package/dist/runtime/components/loader/loader.d.vue.ts +10 -0
- package/dist/runtime/components/loader/loader.vue +37 -0
- package/dist/runtime/components/loader/loader.vue.d.ts +10 -0
- package/dist/runtime/components/modal/index.d.ts +3 -0
- package/dist/runtime/components/modal/index.js +0 -0
- package/dist/runtime/components/modal/modal-close-button.d.vue.ts +14 -0
- package/dist/runtime/components/modal/modal-close-button.vue +20 -0
- package/dist/runtime/components/modal/modal-close-button.vue.d.ts +14 -0
- package/dist/runtime/components/modal/modal-header.d.vue.ts +16 -0
- package/dist/runtime/components/modal/modal-header.vue +10 -0
- package/dist/runtime/components/modal/modal-header.vue.d.ts +16 -0
- package/dist/runtime/components/modal/modal-root.d.vue.ts +33 -0
- package/dist/runtime/components/modal/modal-root.vue +30 -0
- package/dist/runtime/components/modal/modal-root.vue.d.ts +33 -0
- package/dist/runtime/components/modal/modal-title.d.vue.ts +16 -0
- package/dist/runtime/components/modal/modal-title.vue +10 -0
- package/dist/runtime/components/modal/modal-title.vue.d.ts +16 -0
- package/dist/runtime/components/modal/modal.module.css +1 -0
- package/dist/runtime/components/nav-link/index.d.ts +1 -0
- package/dist/runtime/components/nav-link/index.js +0 -0
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +35 -0
- package/dist/runtime/components/nav-link/nav-link.vue +201 -0
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +35 -0
- package/dist/runtime/components/paper.d.vue.ts +20 -0
- package/dist/runtime/components/paper.vue +53 -0
- package/dist/runtime/components/paper.vue.d.ts +20 -0
- package/dist/runtime/components/popover/index.d.ts +1 -0
- package/dist/runtime/components/popover/index.js +0 -0
- package/dist/runtime/components/popover/lib/context.d.ts +14 -0
- package/dist/runtime/components/popover/lib/context.js +8 -0
- package/dist/runtime/components/popover/lib/get-arrow-position.d.ts +12 -0
- package/dist/runtime/components/popover/lib/get-arrow-position.js +88 -0
- package/dist/runtime/components/popover/lib/use-popover.d.ts +23 -0
- package/dist/runtime/components/popover/lib/use-popover.js +47 -0
- package/dist/runtime/components/popover/popover-dropdown.d.vue.ts +13 -0
- package/dist/runtime/components/popover/popover-dropdown.vue +90 -0
- package/dist/runtime/components/popover/popover-dropdown.vue.d.ts +13 -0
- package/dist/runtime/components/popover/popover-target.d.vue.ts +13 -0
- package/dist/runtime/components/popover/popover-target.vue +11 -0
- package/dist/runtime/components/popover/popover-target.vue.d.ts +13 -0
- package/dist/runtime/components/popover/popover.d.vue.ts +27 -0
- package/dist/runtime/components/popover/popover.vue +79 -0
- package/dist/runtime/components/popover/popover.vue.d.ts +27 -0
- package/dist/runtime/components/popover/types/index.d.ts +42 -0
- package/dist/runtime/components/popover/types/index.js +0 -0
- package/dist/runtime/components/renderless/renderless-slot.d.ts +6 -0
- package/dist/runtime/components/renderless/renderless-slot.js +32 -0
- package/dist/runtime/components/renderless/renderless.d.vue.ts +13 -0
- package/dist/runtime/components/renderless/renderless.vue +12 -0
- package/dist/runtime/components/renderless/renderless.vue.d.ts +13 -0
- package/dist/runtime/components/select/index.d.ts +1 -0
- package/dist/runtime/components/select/index.js +0 -0
- package/dist/runtime/components/select/select.d.vue.ts +45 -0
- package/dist/runtime/components/select/select.vue +131 -0
- package/dist/runtime/components/select/select.vue.d.ts +45 -0
- package/dist/runtime/components/tabs/index.d.ts +1 -0
- package/dist/runtime/components/tabs/index.js +1 -0
- package/dist/runtime/components/tabs/lib.d.ts +142 -0
- package/dist/runtime/components/tabs/lib.js +18 -0
- package/dist/runtime/components/tabs/tabs-list.d.vue.ts +19 -0
- package/dist/runtime/components/tabs/tabs-list.vue +31 -0
- package/dist/runtime/components/tabs/tabs-list.vue.d.ts +19 -0
- package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +17 -0
- package/dist/runtime/components/tabs/tabs-panel.vue +23 -0
- package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +17 -0
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +47 -0
- package/dist/runtime/components/tabs/tabs-root.vue +71 -0
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +47 -0
- package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +22 -0
- package/dist/runtime/components/tabs/tabs-tab.vue +41 -0
- package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +22 -0
- package/dist/runtime/components/tabs/tabs.module.css +1 -0
- package/dist/runtime/components/text.d.vue.ts +37 -0
- package/dist/runtime/components/text.vue +122 -0
- package/dist/runtime/components/text.vue.d.ts +37 -0
- package/dist/runtime/components/textarea.d.vue.ts +33 -0
- package/dist/runtime/components/textarea.vue +48 -0
- package/dist/runtime/components/textarea.vue.d.ts +33 -0
- package/dist/runtime/components/title.d.vue.ts +18 -0
- package/dist/runtime/components/title.vue +34 -0
- package/dist/runtime/components/title.vue.d.ts +18 -0
- package/dist/runtime/components/transition/index.d.ts +1 -0
- package/dist/runtime/components/transition/index.js +0 -0
- package/dist/runtime/components/transition/transition.d.vue.ts +25 -0
- package/dist/runtime/components/transition/transition.vue +31 -0
- package/dist/runtime/components/transition/transition.vue.d.ts +25 -0
- package/dist/runtime/components/visually-hidden/index.d.ts +2 -0
- package/dist/runtime/components/visually-hidden/index.js +0 -0
- package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +22 -0
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +13 -0
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +22 -0
- package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +17 -0
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +22 -0
- package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +17 -0
- package/dist/runtime/composals/index.d.ts +4 -0
- package/dist/runtime/composals/index.js +4 -0
- package/dist/runtime/composals/use-active-link.d.ts +5 -0
- package/dist/runtime/composals/use-active-link.js +20 -0
- package/dist/runtime/composals/use-mod.d.ts +2 -0
- package/dist/runtime/composals/use-mod.js +25 -0
- package/dist/runtime/composals/use-style-resolver.d.ts +3 -0
- package/dist/runtime/composals/use-style-resolver.js +5 -0
- package/dist/runtime/composals/use-theme.d.ts +9 -0
- package/dist/runtime/composals/use-theme.js +4 -0
- package/dist/runtime/const/index.d.ts +2 -0
- package/dist/runtime/const/index.js +6 -0
- package/dist/runtime/helpers/create-strict-injection.d.ts +94 -0
- package/dist/runtime/helpers/create-strict-injection.js +11 -0
- package/dist/runtime/helpers/index.d.ts +1 -0
- package/dist/runtime/helpers/index.js +1 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/styles/baseline.css +1 -0
- package/dist/runtime/styles/colors.css +1 -0
- package/dist/runtime/styles/const.css +1 -0
- package/dist/runtime/styles/dark-theme.css +1 -0
- package/dist/runtime/styles/global.css +1 -0
- package/dist/runtime/styles/light-theme.css +1 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +0 -0
- package/dist/runtime/types/theme.d.ts +25 -0
- package/dist/runtime/types/theme.js +0 -0
- package/dist/runtime/utils/boolean/is-falsy.d.ts +1 -0
- package/dist/runtime/utils/boolean/is-falsy.js +7 -0
- package/dist/runtime/utils/boolean/is-number-like.d.ts +1 -0
- package/dist/runtime/utils/boolean/is-number-like.js +13 -0
- package/dist/runtime/utils/color-functions/get-gradient.d.ts +3 -0
- package/dist/runtime/utils/color-functions/get-gradient.js +25 -0
- package/dist/runtime/utils/converters/rem.d.ts +2 -0
- package/dist/runtime/utils/converters/rem.js +43 -0
- package/dist/runtime/utils/get-color-var.d.ts +2 -0
- package/dist/runtime/utils/get-color-var.js +6 -0
- package/dist/runtime/utils/get-safe-id.d.ts +1 -0
- package/dist/runtime/utils/get-safe-id.js +8 -0
- package/dist/runtime/utils/get-size/get-size.d.ts +6 -0
- package/dist/runtime/utils/get-size/get-size.js +24 -0
- package/dist/runtime/utils/index.d.ts +7 -0
- package/dist/runtime/utils/index.js +7 -0
- package/dist/runtime/utils/parse-theme-color/parse-theme-color.d.ts +14 -0
- package/dist/runtime/utils/parse-theme-color/parse-theme-color.js +73 -0
- package/dist/runtime/utils/vars-resolver/create-variant-color-resolver.d.ts +14 -0
- package/dist/runtime/utils/vars-resolver/create-variant-color-resolver.js +106 -0
- package/dist/types.d.mts +3 -0
- package/package.json +96 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ActionIconProps } from '../action-icon/index.js';
|
|
2
|
+
declare var __VLS_9: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_9) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
export interface DialogHeaderProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
export interface DialogHeaderProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { UiKitRadius, UiKitShadow, UiKitSize, UiKitSpacing } from '@nui/types';
|
|
2
|
+
import type { CSSProperties } from 'vue';
|
|
3
|
+
import type { BoxProps } from '../box.vue.js';
|
|
4
|
+
import type { TransitionName } from '../transition/index.js';
|
|
5
|
+
import type { DialogModel } from './types/index.js';
|
|
6
|
+
export interface DialogRootProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
7
|
+
/** If set, the dialog is closed when user clicks on the overlay @default `true` */
|
|
8
|
+
closeOnClickOutside?: boolean;
|
|
9
|
+
/** If set, the component is rendered inside `Portal` @default `true` */
|
|
10
|
+
withinPortal?: boolean;
|
|
11
|
+
/** If set, the component is rendered with `Overlay` @default `true` */
|
|
12
|
+
withoutOverlay?: boolean;
|
|
13
|
+
/** Top/bottom modal offset @default `5dvh` */
|
|
14
|
+
yOffset?: CSSProperties['marginTop'];
|
|
15
|
+
/** Left/right modal offset @default `5vw` */
|
|
16
|
+
xOffset?: CSSProperties['marginLeft'];
|
|
17
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius` @default `theme.defaultRadius` */
|
|
18
|
+
radius?: UiKitRadius;
|
|
19
|
+
/** Controls width of the content area @default `'md'` */
|
|
20
|
+
size?: UiKitSize;
|
|
21
|
+
/** Key of `theme.shadows` or any valid CSS box-shadow value @default `'xl'` */
|
|
22
|
+
shadow?: UiKitShadow;
|
|
23
|
+
/** Key of `theme.spacing` or any valid CSS value to set content, header and footer padding @default `'md'` */
|
|
24
|
+
padding?: UiKitSpacing;
|
|
25
|
+
/** Passes a class to root element */
|
|
26
|
+
rootClass?: string;
|
|
27
|
+
transition?: TransitionName;
|
|
28
|
+
}
|
|
29
|
+
type __VLS_Props = DialogRootProps;
|
|
30
|
+
type __VLS_ModelProps = {
|
|
31
|
+
'open'?: DialogModel['open'];
|
|
32
|
+
};
|
|
33
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
34
|
+
declare var __VLS_25: {};
|
|
35
|
+
type __VLS_Slots = {} & {
|
|
36
|
+
default?: (props: typeof __VLS_25) => any;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
close: () => any;
|
|
40
|
+
open: () => any;
|
|
41
|
+
"update:open": (value: boolean) => any;
|
|
42
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
43
|
+
onClose?: (() => any) | undefined;
|
|
44
|
+
onOpen?: (() => any) | undefined;
|
|
45
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
46
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getRadius, getShadow, getSize, getSpacing, rem } from "@nui/utils";
|
|
3
|
+
import { onClickOutside, unrefElement } from "@vueuse/core";
|
|
4
|
+
import { computed, onMounted, shallowRef, watch } from "vue";
|
|
5
|
+
import Box from "../box.vue";
|
|
6
|
+
import NTransition from "../transition/transition.vue";
|
|
7
|
+
import css from "./dialog.module.css";
|
|
8
|
+
import { useProvideDialogState } from "./lib";
|
|
9
|
+
const {
|
|
10
|
+
withinPortal = true,
|
|
11
|
+
closeOnClickOutside = true,
|
|
12
|
+
mod,
|
|
13
|
+
xOffset,
|
|
14
|
+
yOffset,
|
|
15
|
+
radius,
|
|
16
|
+
padding,
|
|
17
|
+
size,
|
|
18
|
+
shadow,
|
|
19
|
+
rootClass,
|
|
20
|
+
transition = "fade-down",
|
|
21
|
+
withoutOverlay = false
|
|
22
|
+
} = defineProps({
|
|
23
|
+
closeOnClickOutside: { type: Boolean, required: false },
|
|
24
|
+
withinPortal: { type: Boolean, required: false },
|
|
25
|
+
withoutOverlay: { type: Boolean, required: false },
|
|
26
|
+
yOffset: { type: null, required: false },
|
|
27
|
+
xOffset: { type: null, required: false },
|
|
28
|
+
radius: { type: [String, Number], required: false },
|
|
29
|
+
size: { type: String, required: false },
|
|
30
|
+
shadow: { type: String, required: false },
|
|
31
|
+
padding: { type: [String, Number], required: false },
|
|
32
|
+
rootClass: { type: String, required: false },
|
|
33
|
+
transition: { type: String, required: false }
|
|
34
|
+
});
|
|
35
|
+
const emit = defineEmits(["open", "close"]);
|
|
36
|
+
const opened = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
37
|
+
useProvideDialogState(() => opened.value = false);
|
|
38
|
+
function overlayClick(event) {
|
|
39
|
+
if (event.target === event.currentTarget && closeOnClickOutside && !withoutOverlay)
|
|
40
|
+
opened.value = false;
|
|
41
|
+
}
|
|
42
|
+
function open(dialog) {
|
|
43
|
+
emit("open");
|
|
44
|
+
dialog?.showModal();
|
|
45
|
+
}
|
|
46
|
+
const dialogRef = shallowRef(null);
|
|
47
|
+
if (closeOnClickOutside) {
|
|
48
|
+
onClickOutside(dialogRef, () => opened.value = false);
|
|
49
|
+
}
|
|
50
|
+
watch(opened, (isOpen) => {
|
|
51
|
+
const dialog = unrefElement(dialogRef);
|
|
52
|
+
if (!dialog)
|
|
53
|
+
return;
|
|
54
|
+
if (isOpen)
|
|
55
|
+
open(dialog);
|
|
56
|
+
else
|
|
57
|
+
dialog?.close();
|
|
58
|
+
}, { flush: "post" });
|
|
59
|
+
onMounted(() => {
|
|
60
|
+
if (!opened.value)
|
|
61
|
+
return;
|
|
62
|
+
open(unrefElement(dialogRef));
|
|
63
|
+
});
|
|
64
|
+
const style = computed(() => ({
|
|
65
|
+
"--dialog-size": getSize(size, "dialog-size"),
|
|
66
|
+
"--dialog-radius": radius ? getRadius(radius) : void 0,
|
|
67
|
+
"--dialog-padding": getSpacing(padding),
|
|
68
|
+
"--dialog-y-offset": yOffset ? rem(yOffset) : void 0,
|
|
69
|
+
"--dialog-x-offset": xOffset ? rem(xOffset) : void 0,
|
|
70
|
+
"--dialog-shadow": getShadow(shadow)
|
|
71
|
+
}));
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<Teleport :disabled='!withinPortal' to='body'>
|
|
76
|
+
<Box
|
|
77
|
+
is='dialog'
|
|
78
|
+
ref='dialogRef'
|
|
79
|
+
:class='[css.root, rootClass]'
|
|
80
|
+
:mod='[{ "without-overlay": withoutOverlay }, mod]'
|
|
81
|
+
:style
|
|
82
|
+
@click='overlayClick'
|
|
83
|
+
@close='$emit("close")'
|
|
84
|
+
@cancel.prevent='() => closeOnClickOutside && (opened = false)'
|
|
85
|
+
>
|
|
86
|
+
<NTransition :name='transition'>
|
|
87
|
+
<Box is='section' v-if='opened' :class='css.content' v-bind='$attrs'>
|
|
88
|
+
<slot />
|
|
89
|
+
</Box>
|
|
90
|
+
</NTransition>
|
|
91
|
+
</Box>
|
|
92
|
+
</Teleport>
|
|
93
|
+
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { UiKitRadius, UiKitShadow, UiKitSize, UiKitSpacing } from '@nui/types';
|
|
2
|
+
import type { CSSProperties } from 'vue';
|
|
3
|
+
import type { BoxProps } from '../box.vue.js';
|
|
4
|
+
import type { TransitionName } from '../transition/index.js';
|
|
5
|
+
import type { DialogModel } from './types/index.js';
|
|
6
|
+
export interface DialogRootProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
7
|
+
/** If set, the dialog is closed when user clicks on the overlay @default `true` */
|
|
8
|
+
closeOnClickOutside?: boolean;
|
|
9
|
+
/** If set, the component is rendered inside `Portal` @default `true` */
|
|
10
|
+
withinPortal?: boolean;
|
|
11
|
+
/** If set, the component is rendered with `Overlay` @default `true` */
|
|
12
|
+
withoutOverlay?: boolean;
|
|
13
|
+
/** Top/bottom modal offset @default `5dvh` */
|
|
14
|
+
yOffset?: CSSProperties['marginTop'];
|
|
15
|
+
/** Left/right modal offset @default `5vw` */
|
|
16
|
+
xOffset?: CSSProperties['marginLeft'];
|
|
17
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius` @default `theme.defaultRadius` */
|
|
18
|
+
radius?: UiKitRadius;
|
|
19
|
+
/** Controls width of the content area @default `'md'` */
|
|
20
|
+
size?: UiKitSize;
|
|
21
|
+
/** Key of `theme.shadows` or any valid CSS box-shadow value @default `'xl'` */
|
|
22
|
+
shadow?: UiKitShadow;
|
|
23
|
+
/** Key of `theme.spacing` or any valid CSS value to set content, header and footer padding @default `'md'` */
|
|
24
|
+
padding?: UiKitSpacing;
|
|
25
|
+
/** Passes a class to root element */
|
|
26
|
+
rootClass?: string;
|
|
27
|
+
transition?: TransitionName;
|
|
28
|
+
}
|
|
29
|
+
type __VLS_Props = DialogRootProps;
|
|
30
|
+
type __VLS_ModelProps = {
|
|
31
|
+
'open'?: DialogModel['open'];
|
|
32
|
+
};
|
|
33
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
34
|
+
declare var __VLS_25: {};
|
|
35
|
+
type __VLS_Slots = {} & {
|
|
36
|
+
default?: (props: typeof __VLS_25) => any;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
close: () => any;
|
|
40
|
+
open: () => any;
|
|
41
|
+
"update:open": (value: boolean) => any;
|
|
42
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
43
|
+
onClose?: (() => any) | undefined;
|
|
44
|
+
onOpen?: (() => any) | undefined;
|
|
45
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
46
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TitleProps } from '../title.vue.js';
|
|
2
|
+
export interface DialogTitleProps extends /* @vue-ignore */ TitleProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Title from "../title.vue";
|
|
3
|
+
import css from "./dialog.module.css";
|
|
4
|
+
const { size = "md", lh = "1", ...props } = defineProps({});
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<Title :class='css.title' :lh :size v-bind='props'>
|
|
9
|
+
<slot />
|
|
10
|
+
</Title>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TitleProps } from '../title.vue.js';
|
|
2
|
+
export interface DialogTitleProps extends /* @vue-ignore */ TitleProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.root{--dialog-size-xs:rem(320px);--dialog-size-sm:rem(380px);--dialog-size-md:rem(440px);--dialog-size-lg:rem(620px);--dialog-size-xl:rem(780px);--dialog-size:var(--dialog-size-md);--dialog-y-offset:0;--dialog-x-offset:0;--dialog-shadow:var(--shadow-md);--dialog-radius:var(--radius-default);--overlay-bg:rgba(0,0,0,.4);--overlay-filter:blur(.1rem);background:none;border:none;box-shadow:var(--dialog-shadow);display:grid;left:var(--dialog-x-offset);max-height:100%;max-width:100%;opacity:0;overflow:hidden;padding:0;top:var(--dialog-y-offset);transition:opacity .3s ease,overlay allow-discrete .3s ease,display allow-discrete .3s ease;width:var(--dialog-size)}.root::backdrop{backdrop-filter:var(--overlay-filter);background:var(--overlay-bg,rgba(0,0,0,.6));opacity:0;transition:opacity .3s ease,overlay allow-discrete .3s ease,display allow-discrete .3s ease}.root[open]{opacity:1}@starting-style{.root[open]{opacity:0}}.root[open]::backdrop{opacity:1}@starting-style{.root[open]::backdrop{opacity:0}}.root:not([open]){opacity:0;pointer-events:none}.root:not([open])::backdrop{opacity:0}.root[data-without-overlay]::backdrop{display:none}.content{background-color:var(--color-body);border-radius:var(--dialog-radius);color:var(--color-text);height:100%;padding:var(--spacing-sm);width:100%}.header{align-items:center;display:flex;justify-content:space-between}.title{font-weight:400}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useDialogState } from "./lib.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createStrictInjection } from "@nui/helpers";
|
|
2
|
+
const injectionKey = Symbol("DrawerState");
|
|
3
|
+
const [useProvide, useState] = createStrictInjection((close) => close, {
|
|
4
|
+
injectionKey,
|
|
5
|
+
name: "DrawerState"
|
|
6
|
+
});
|
|
7
|
+
export const useProvideDialogState = useProvide;
|
|
8
|
+
export const useDialogState = useState;
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ActionIconProps } from '../action-icon/index.js';
|
|
2
|
+
declare var __VLS_6: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import DialogCloseButton from "../dialog/dialog-close-button.vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
size: { type: null, required: false },
|
|
5
|
+
variant: { type: String, required: false },
|
|
6
|
+
gradient: { type: Object, required: false },
|
|
7
|
+
loading: { type: Boolean, required: false },
|
|
8
|
+
color: { type: null, required: false },
|
|
9
|
+
radius: { type: [String, Number], required: false },
|
|
10
|
+
classes: { type: Object, required: false },
|
|
11
|
+
mod: { type: [Object, Array, null], required: false },
|
|
12
|
+
icon: { type: String, required: false }
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<DialogCloseButton v-bind='props'>
|
|
18
|
+
<slot />
|
|
19
|
+
</DialogCloseButton>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ActionIconProps } from '../action-icon/index.js';
|
|
2
|
+
declare var __VLS_6: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogHeaderProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerHeaderProps extends /* @vue-ignore */ DialogHeaderProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogHeaderProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerHeaderProps extends /* @vue-ignore */ DialogHeaderProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DialogModel, DialogRootProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerRootProps extends /* @vue-ignore */ Omit<DialogRootProps, 'modal' | 'closeOnClickOutside' | 'rootClass' | 'transition'> {
|
|
3
|
+
/** Side of the screen on which drawer will be opened @default `'left'` */
|
|
4
|
+
position?: 'bottom' | 'left' | 'right' | 'top';
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = DrawerRootProps;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
'open'?: DialogModel['open'];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare var __VLS_10: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_10) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
close: () => any;
|
|
17
|
+
open: () => any;
|
|
18
|
+
"update:open": (value: boolean) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onClose?: (() => any) | undefined;
|
|
21
|
+
onOpen?: (() => any) | undefined;
|
|
22
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import DialogRoot from "../dialog/dialog-root.vue";
|
|
4
|
+
import css from "./drawer.module.css";
|
|
5
|
+
const {
|
|
6
|
+
position = "left",
|
|
7
|
+
withoutOverlay = true,
|
|
8
|
+
mod,
|
|
9
|
+
withinPortal = true,
|
|
10
|
+
...rest
|
|
11
|
+
} = defineProps({
|
|
12
|
+
position: { type: String, required: false }
|
|
13
|
+
});
|
|
14
|
+
defineEmits(["open", "close"]);
|
|
15
|
+
const opened = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
16
|
+
const transition = computed(() => {
|
|
17
|
+
switch (position) {
|
|
18
|
+
case "right":
|
|
19
|
+
return "fade-left";
|
|
20
|
+
case "top":
|
|
21
|
+
return "fade-down";
|
|
22
|
+
case "bottom":
|
|
23
|
+
return "fade-up";
|
|
24
|
+
default:
|
|
25
|
+
return "fade-right";
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<DialogRoot
|
|
32
|
+
v-model:open='opened'
|
|
33
|
+
:mod='[{ position }, mod]'
|
|
34
|
+
:root-class='css.root'
|
|
35
|
+
:class='css.content'
|
|
36
|
+
:within-portal
|
|
37
|
+
:without-overlay
|
|
38
|
+
:transition
|
|
39
|
+
v-bind='rest'
|
|
40
|
+
@open='$emit("open")'
|
|
41
|
+
@close='$emit("close")'
|
|
42
|
+
>
|
|
43
|
+
<slot />
|
|
44
|
+
</DialogRoot>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DialogModel, DialogRootProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerRootProps extends /* @vue-ignore */ Omit<DialogRootProps, 'modal' | 'closeOnClickOutside' | 'rootClass' | 'transition'> {
|
|
3
|
+
/** Side of the screen on which drawer will be opened @default `'left'` */
|
|
4
|
+
position?: 'bottom' | 'left' | 'right' | 'top';
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = DrawerRootProps;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
'open'?: DialogModel['open'];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare var __VLS_10: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_10) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
close: () => any;
|
|
17
|
+
open: () => any;
|
|
18
|
+
"update:open": (value: boolean) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onClose?: (() => any) | undefined;
|
|
21
|
+
onOpen?: (() => any) | undefined;
|
|
22
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogTitleProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerTitleProps extends /* @vue-ignore */ DialogTitleProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DialogTitleProps } from '../dialog/index.js';
|
|
2
|
+
export interface DrawerTitleProps extends /* @vue-ignore */ DialogTitleProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<DrawerTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.root{height:100%;overflow-y:auto}.root[data-position=left] .content{border-radius:0 var(--dialog-radius) var(--dialog-radius) 0}.root[data-position=right]{left:unset;right:var(--dialog-x-offset)}.root[data-position=right] .content{border-radius:var(--dialog-radius) 0 0 var(--dialog-radius)}.root[data-position=top]{height:var(--dialog-size);top:var(--dialog-y-offset);width:100%}.root[data-position=top] .content{border-radius:0 0 var(--dialog-radius) var(--dialog-radius)}.root[data-position=bottom]{bottom:var(--dialog-y-offset);height:var(--dialog-size);top:unset;width:100%}.root[data-position=bottom] .content{border-radius:var(--dialog-radius) var(--dialog-radius) 0 0}
|
|
File without changes
|