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,270 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useStyleResolver } from "@nui/composals";
|
|
3
|
+
import { createVariantColorResolver, getFontSize, getRadius, getSize } from "@nui/utils";
|
|
4
|
+
import { computed, useId } from "vue";
|
|
5
|
+
import Box from "../box.vue";
|
|
6
|
+
import { useChipGroupState, useChipState } from "./lib";
|
|
7
|
+
const {
|
|
8
|
+
id: _id,
|
|
9
|
+
color,
|
|
10
|
+
size = "sm",
|
|
11
|
+
radius = "xl",
|
|
12
|
+
variant = "filled",
|
|
13
|
+
type: _type = "checkbox",
|
|
14
|
+
value,
|
|
15
|
+
icon = "gravity-ui:check",
|
|
16
|
+
hideIcon = true,
|
|
17
|
+
disabled: _disabled
|
|
18
|
+
} = defineProps({
|
|
19
|
+
radius: { type: [String, Number], required: false },
|
|
20
|
+
size: { type: String, required: false },
|
|
21
|
+
type: { type: String, required: false },
|
|
22
|
+
color: { type: null, required: false },
|
|
23
|
+
id: { type: String, required: false },
|
|
24
|
+
variant: { type: String, required: false },
|
|
25
|
+
value: { type: String, required: false },
|
|
26
|
+
icon: { type: String, required: false },
|
|
27
|
+
hideIcon: { type: Boolean, required: false },
|
|
28
|
+
disabled: { type: Boolean, required: false }
|
|
29
|
+
});
|
|
30
|
+
const id = _id || useId();
|
|
31
|
+
const modelValue = defineModel({ type: Boolean, ...{ default: false } });
|
|
32
|
+
const ctx = useChipGroupState();
|
|
33
|
+
const { checked, onUpdate } = useChipState(ctx, modelValue, value);
|
|
34
|
+
const disabled = ctx?.disabled || _disabled;
|
|
35
|
+
const type = ctx ? ctx.multiple ? "checkbox" : "radio" : _type;
|
|
36
|
+
const style = computed(() => useStyleResolver((theme) => {
|
|
37
|
+
const colors = createVariantColorResolver({
|
|
38
|
+
color,
|
|
39
|
+
theme,
|
|
40
|
+
variant
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
"--chip-fz": getFontSize(size),
|
|
44
|
+
"--chip-size": getSize(size, "chip-size"),
|
|
45
|
+
"--chip-radius": radius === void 0 ? void 0 : getRadius(radius),
|
|
46
|
+
"--chip-checked-padding": getSize(size, "chip-checked-padding"),
|
|
47
|
+
"--chip-padding": getSize(size, "chip-padding"),
|
|
48
|
+
"--chip-icon-size": getSize(size, "chip-icon-size"),
|
|
49
|
+
"--chip-bg": color || variant ? colors.background : void 0,
|
|
50
|
+
"--chip-hover": color || variant ? colors.hover : void 0,
|
|
51
|
+
"--chip-color": color || variant ? colors.text : void 0,
|
|
52
|
+
"--chip-bd": color || variant ? colors.border : void 0,
|
|
53
|
+
"--chip-spacing": getSize(size, "chip-spacing")
|
|
54
|
+
};
|
|
55
|
+
}));
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<template>
|
|
59
|
+
<Box :style :class='[$style.root, $attrs?.style]'>
|
|
60
|
+
<input
|
|
61
|
+
v-bind='{
|
|
62
|
+
...$attrs,
|
|
63
|
+
class: $style.input,
|
|
64
|
+
checked,
|
|
65
|
+
value,
|
|
66
|
+
type,
|
|
67
|
+
disabled,
|
|
68
|
+
id
|
|
69
|
+
}'
|
|
70
|
+
@click='onUpdate()'
|
|
71
|
+
>
|
|
72
|
+
<Box is='label' :for='id' :class='$style.label' :mod='{ variant }'>
|
|
73
|
+
<span v-if='hideIcon && checked' :class='$style.iconWrapper'>
|
|
74
|
+
<Icon :name='icon' :class='$style.icon' />
|
|
75
|
+
</span>
|
|
76
|
+
|
|
77
|
+
<span><slot /></span>
|
|
78
|
+
</Box>
|
|
79
|
+
</Box>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<style lang="postcss" module>
|
|
83
|
+
.root {
|
|
84
|
+
--chip-size-xs: rem(23px);
|
|
85
|
+
--chip-size-sm: rem(28px);
|
|
86
|
+
--chip-size-md: rem(32px);
|
|
87
|
+
--chip-size-lg: rem(36px);
|
|
88
|
+
--chip-size-xl: rem(40px);
|
|
89
|
+
|
|
90
|
+
--chip-icon-size-xs: rem(12px);
|
|
91
|
+
--chip-icon-size-sm: rem(14px);
|
|
92
|
+
--chip-icon-size-md: rem(16px);
|
|
93
|
+
--chip-icon-size-lg: rem(18px);
|
|
94
|
+
--chip-icon-size-xl: rem(20px);
|
|
95
|
+
|
|
96
|
+
--chip-padding-xs: rem(16px);
|
|
97
|
+
--chip-padding-sm: rem(20px);
|
|
98
|
+
--chip-padding-md: rem(24px);
|
|
99
|
+
--chip-padding-lg: rem(28px);
|
|
100
|
+
--chip-padding-xl: rem(32px);
|
|
101
|
+
|
|
102
|
+
--chip-checked-padding-xs: rem(7.5px);
|
|
103
|
+
--chip-checked-padding-sm: rem(10px);
|
|
104
|
+
--chip-checked-padding-md: rem(11.7px);
|
|
105
|
+
--chip-checked-padding-lg: rem(13.5px);
|
|
106
|
+
--chip-checked-padding-xl: rem(15.7px);
|
|
107
|
+
|
|
108
|
+
--chip-spacing-xs: rem(10px);
|
|
109
|
+
--chip-spacing-sm: rem(12px);
|
|
110
|
+
--chip-spacing-md: rem(16px);
|
|
111
|
+
--chip-spacing-lg: rem(20px);
|
|
112
|
+
--chip-spacing-xl: rem(22px);
|
|
113
|
+
|
|
114
|
+
--chip-size: var(--chip-size-sm);
|
|
115
|
+
--chip-icon-size: var(--chip-icon-size-sm);
|
|
116
|
+
--chip-padding: var(--chip-padding-sm);
|
|
117
|
+
--chip-spacing: var(--chip-spacing-sm);
|
|
118
|
+
--chip-checked-padding: var(--chip-checked-padding-sm);
|
|
119
|
+
--chip-bg: var(--color-primary-filled);
|
|
120
|
+
--chip-hover: var(--color-primary-filled-hover);
|
|
121
|
+
--chip-color: var(--color-white);
|
|
122
|
+
--chip-bd: 1px solid transparent;
|
|
123
|
+
|
|
124
|
+
--chip-fz: var(--font-size-sm);
|
|
125
|
+
--chip-radius: var(--radius-xl);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.label {
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
user-select: none;
|
|
131
|
+
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
|
|
135
|
+
height: var(--chip-size);
|
|
136
|
+
padding-inline: var(--chip-padding);
|
|
137
|
+
|
|
138
|
+
border: 1px solid transparent;
|
|
139
|
+
border-radius: var(--chip-radius);
|
|
140
|
+
|
|
141
|
+
font-size: var(--chip-fz);
|
|
142
|
+
line-height: calc(var(--chip-size) - rem(2px));
|
|
143
|
+
color: var(--color-text);
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
-webkit-tap-highlight-color: transparent;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.iconWrapper {
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
|
|
153
|
+
width: calc(var(--chip-icon-size) + (var(--chip-spacing) / 1.5));
|
|
154
|
+
max-width: calc(var(--chip-icon-size) + (var(--chip-spacing) / 1.5));
|
|
155
|
+
height: var(--chip-icon-size);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.icon {
|
|
159
|
+
display: block;
|
|
160
|
+
|
|
161
|
+
width: var(--chip-icon-size);
|
|
162
|
+
height: var(--chip-icon-size);
|
|
163
|
+
|
|
164
|
+
color: var(--chip-icon-color, inherit);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.input {
|
|
168
|
+
width: 0;
|
|
169
|
+
height: 0;
|
|
170
|
+
margin: 0;
|
|
171
|
+
padding: 0;
|
|
172
|
+
|
|
173
|
+
opacity: 0;
|
|
174
|
+
|
|
175
|
+
&:focus-visible + .label {
|
|
176
|
+
outline: 2px solid var(--color-primary-filled);
|
|
177
|
+
outline-offset: 2px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.input:disabled {
|
|
182
|
+
& + .label {
|
|
183
|
+
cursor: not-allowed;
|
|
184
|
+
|
|
185
|
+
color: var(--color-disabled-text);
|
|
186
|
+
|
|
187
|
+
background-color: var(--color-disabled);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.input:not(:disabled) {
|
|
192
|
+
& + .label[data-variant='outline'] {
|
|
193
|
+
@mixin where-light {
|
|
194
|
+
border: 1px solid var(--color-gray-3);
|
|
195
|
+
|
|
196
|
+
background-color: var(--color-white);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@mixin where-dark {
|
|
200
|
+
border: 1px solid var(--color-dark-4);
|
|
201
|
+
|
|
202
|
+
background-color: var(--color-dark-6);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@mixin hover {
|
|
206
|
+
@mixin where-light {
|
|
207
|
+
background-color: var(--color-gray-0);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@mixin where-dark {
|
|
211
|
+
background-color: var(--color-dark-5);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
& + .label[data-variant='filled'],
|
|
217
|
+
& + .label[data-variant='light'] {
|
|
218
|
+
border: 1px solid transparent;
|
|
219
|
+
|
|
220
|
+
color: var(--color-text);
|
|
221
|
+
|
|
222
|
+
@mixin where-light {
|
|
223
|
+
background-color: var(--color-gray-1);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@mixin where-dark {
|
|
227
|
+
background-color: var(--color-dark-5);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@mixin hover {
|
|
231
|
+
@mixin where-light {
|
|
232
|
+
background-color: var(--color-gray-2);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@mixin where-dark {
|
|
236
|
+
background-color: var(--color-dark-4);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.input:not(:disabled):checked {
|
|
243
|
+
& + .label {
|
|
244
|
+
padding: var(--chip-checked-padding);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
& + .label[data-variant='outline'] {
|
|
248
|
+
--chip-icon-color: var(--chip-color);
|
|
249
|
+
|
|
250
|
+
border: var(--chip-bd);
|
|
251
|
+
|
|
252
|
+
@mixin hover {
|
|
253
|
+
background-color: var(--chip-hover);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
& + .label[data-variant='filled'],
|
|
258
|
+
& + .label[data-variant='light'] {
|
|
259
|
+
--chip-icon-color: var(--chip-color);
|
|
260
|
+
|
|
261
|
+
color: var(--chip-color);
|
|
262
|
+
|
|
263
|
+
background-color: var(--chip-bg);
|
|
264
|
+
|
|
265
|
+
@mixin hover {
|
|
266
|
+
background-color: var(--chip-hover);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { UiKitColor, UiKitRadius, UiKitSize } from '@nui/types';
|
|
2
|
+
export interface ChipProps {
|
|
3
|
+
radius?: UiKitRadius;
|
|
4
|
+
size?: UiKitSize;
|
|
5
|
+
type?: 'radio' | 'checkbox';
|
|
6
|
+
color?: UiKitColor;
|
|
7
|
+
id?: string;
|
|
8
|
+
variant?: 'filled' | 'outline' | 'light';
|
|
9
|
+
value?: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
hideIcon?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = ChipProps;
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
modelValue?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare var __VLS_15: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
default?: (props: typeof __VLS_15) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
"update:modelValue": (value: boolean) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useChipGroupState } from "./lib.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ModelRef } from 'vue';
|
|
2
|
+
export type ChipGroupValue<T extends boolean = false> = (T extends true ? string[] : string) | null;
|
|
3
|
+
interface ChipGroupState {
|
|
4
|
+
multiple: boolean;
|
|
5
|
+
value: ModelRef<string | string[] | null>;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const useProvideChipGroupState: (props: ChipGroupState) => ChipGroupState;
|
|
9
|
+
export declare const useChipGroupState: () => ChipGroupState;
|
|
10
|
+
export declare function useChipState(ctx: ChipGroupState | undefined, state: ModelRef<boolean>, value?: string): {
|
|
11
|
+
checked: import("vue").ComputedRef<boolean>;
|
|
12
|
+
onUpdate: () => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createStrictInjection } from "@nui/helpers";
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const injectionKey = Symbol("chip-group");
|
|
4
|
+
const [useProvide, useState] = createStrictInjection((props) => props, {
|
|
5
|
+
injectionKey,
|
|
6
|
+
name: "ChipGroup"
|
|
7
|
+
});
|
|
8
|
+
export const useProvideChipGroupState = useProvide;
|
|
9
|
+
export const useChipGroupState = useState;
|
|
10
|
+
export function useChipState(ctx, state, value) {
|
|
11
|
+
const checked = computed(() => {
|
|
12
|
+
if (ctx?.value !== void 0 && value) {
|
|
13
|
+
return Array.isArray(ctx.value.value) ? ctx.value.value.includes(value) : ctx.value.value === value;
|
|
14
|
+
}
|
|
15
|
+
return state.value;
|
|
16
|
+
});
|
|
17
|
+
const onUpdate = () => {
|
|
18
|
+
if (ctx?.value !== void 0 && value) {
|
|
19
|
+
ctx.value.value = Array.isArray(ctx.value.value) ? ctx.value.value.includes(value) ? ctx.value.value.filter((i) => i !== value) : [...ctx.value.value, value] : ctx.value.value === value ? null : value;
|
|
20
|
+
} else {
|
|
21
|
+
state.value = !state.value;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return { checked, onUpdate };
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_10: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_10) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getSize } from "@nui/utils";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import Box from "../box.vue";
|
|
5
|
+
import PopoverDropdown from "../popover/popover-dropdown.vue";
|
|
6
|
+
import css from "./combobox.module.css";
|
|
7
|
+
import { useComboboxState } from "./lib/context";
|
|
8
|
+
const { store, dropdownPadding } = useComboboxState();
|
|
9
|
+
const style = computed(() => ({
|
|
10
|
+
"--combobox-padding": getSize(dropdownPadding, ""),
|
|
11
|
+
"--combobox-option-padding": getSize(dropdownPadding, "combobox-option-padding")
|
|
12
|
+
}));
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<PopoverDropdown :class='$style.dropdown'>
|
|
17
|
+
<Box
|
|
18
|
+
:id='store.listId'
|
|
19
|
+
role='presentation'
|
|
20
|
+
:class='css.dropdown'
|
|
21
|
+
:style
|
|
22
|
+
v-bind='$attrs'
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</Box>
|
|
26
|
+
</PopoverDropdown>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<style module lang="postcss">
|
|
30
|
+
.dropdown {
|
|
31
|
+
padding: 0;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_10: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_10) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
export interface ComboboxEmptyProps 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<ComboboxEmptyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ComboboxEmptyProps> & 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 ComboboxEmptyProps 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<ComboboxEmptyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ComboboxEmptyProps> & 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,27 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
import type { ComboboxItem, ComboboxItemExt, ComboboxItemGroup, ComboboxItemProps } from './types/index.js';
|
|
3
|
+
export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends /* @vue-ignore */ Omit<BoxProps, 'is'>, ComboboxItemProps {
|
|
4
|
+
/** Group label */
|
|
5
|
+
label?: string;
|
|
6
|
+
data: ComboboxItemGroup<Value, Ext>;
|
|
7
|
+
}
|
|
8
|
+
declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: __VLS_PrettifyLocal<(ComboboxGroupProps<Value, Ext> & {
|
|
10
|
+
value?: ComboboxItem<Value, Ext> | ComboboxItem<Value, Ext>[] | null;
|
|
11
|
+
}) & __VLS_EmitsToProps<__VLS_NormalizeEmits<(evt: "update:value", value: ComboboxItem<Value, Ext> | ComboboxItem<Value, Ext>[] | null | undefined) => void>>> & import("vue").PublicProps;
|
|
12
|
+
expose: (exposed: {}) => void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {
|
|
15
|
+
label?: (props: {}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
option?: (props: any) => any;
|
|
18
|
+
};
|
|
19
|
+
emit: (evt: "update:value", value: ComboboxItem<Value, Ext> | ComboboxItem<Value, Ext>[] | null | undefined) => void;
|
|
20
|
+
}>) => import("vue").VNode & {
|
|
21
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_PrettifyLocal<T> = {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
} & {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useId } from "vue";
|
|
3
|
+
import Box from "../box.vue";
|
|
4
|
+
import ComboboxOption from "./combobox-option.vue";
|
|
5
|
+
import css from "./combobox.module.css";
|
|
6
|
+
import { isValueChecked } from "./lib/utils";
|
|
7
|
+
const {
|
|
8
|
+
label,
|
|
9
|
+
mod,
|
|
10
|
+
data,
|
|
11
|
+
iconPosition,
|
|
12
|
+
checkIcon,
|
|
13
|
+
withCheckIcon
|
|
14
|
+
} = defineProps({
|
|
15
|
+
label: { type: String, required: false },
|
|
16
|
+
data: { type: Object, required: true },
|
|
17
|
+
withCheckIcon: { type: Boolean, required: false },
|
|
18
|
+
checkIcon: { type: String, required: false },
|
|
19
|
+
iconPosition: { type: String, required: false }
|
|
20
|
+
});
|
|
21
|
+
const uid = useId();
|
|
22
|
+
const value = defineModel("value", { type: [Object, Array, null] });
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<Box :class='css.group' role='group' :aria-labelledby='label ? uid : void 0' :mod>
|
|
27
|
+
<div v-if='label || $slots?.label' :id='uid' :class='css.groupLabel'>
|
|
28
|
+
<slot name='label'>
|
|
29
|
+
{{ label }}
|
|
30
|
+
</slot>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<ComboboxOption
|
|
34
|
+
v-for='item in data.items'
|
|
35
|
+
:key='item.value'
|
|
36
|
+
:data='item'
|
|
37
|
+
:icon-position
|
|
38
|
+
:with-check-icon
|
|
39
|
+
:check-icon
|
|
40
|
+
:checked='isValueChecked(value, item)'
|
|
41
|
+
>
|
|
42
|
+
<template v-if='$slots.option' #default='props'>
|
|
43
|
+
<slot name='option' v-bind='props' />
|
|
44
|
+
</template>
|
|
45
|
+
</ComboboxOption>
|
|
46
|
+
</Box>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
import type { ComboboxItem, ComboboxItemExt, ComboboxItemGroup, ComboboxItemProps } from './types/index.js';
|
|
3
|
+
export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends /* @vue-ignore */ Omit<BoxProps, 'is'>, ComboboxItemProps {
|
|
4
|
+
/** Group label */
|
|
5
|
+
label?: string;
|
|
6
|
+
data: ComboboxItemGroup<Value, Ext>;
|
|
7
|
+
}
|
|
8
|
+
declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: __VLS_PrettifyLocal<(ComboboxGroupProps<Value, Ext> & {
|
|
10
|
+
value?: ComboboxItem<Value, Ext> | ComboboxItem<Value, Ext>[] | null;
|
|
11
|
+
}) & __VLS_EmitsToProps<__VLS_NormalizeEmits<(evt: "update:value", value: ComboboxItem<Value, Ext> | ComboboxItem<Value, Ext>[] | null | undefined) => void>>> & import("vue").PublicProps;
|
|
12
|
+
expose: (exposed: {}) => void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {
|
|
15
|
+
label?: (props: {}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
option?: (props: any) => any;
|
|
18
|
+
};
|
|
19
|
+
emit: (evt: "update:value", value: ComboboxItem<Value, Ext> | ComboboxItem<Value, Ext>[] | null | undefined) => void;
|
|
20
|
+
}>) => import("vue").VNode & {
|
|
21
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_PrettifyLocal<T> = {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
} & {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
export interface ComboboxOptionListProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
3
|
+
/** Id of the element that labels the options list */
|
|
4
|
+
labelledBy?: string;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_6: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_6) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<ComboboxOptionListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ComboboxOptionListProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Box from "../box.vue";
|
|
3
|
+
import css from "./combobox.module.css";
|
|
4
|
+
const { labelledBy, mod } = defineProps({
|
|
5
|
+
labelledBy: { type: String, required: false }
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<Box :class='css.options' role='listbox' :aria-labelledby='labelledBy' :mod>
|
|
11
|
+
<slot />
|
|
12
|
+
</Box>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
export interface ComboboxOptionListProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
3
|
+
/** Id of the element that labels the options list */
|
|
4
|
+
labelledBy?: string;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_6: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_6) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<ComboboxOptionListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ComboboxOptionListProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BoxProps } from '../box.vue.js';
|
|
2
|
+
import type { ComboboxItem, ComboboxItemExt, ComboboxItemProps } from './types/index.js';
|
|
3
|
+
export interface ComboboxOptionProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends /* @vue-ignore */ Omit<BoxProps, 'is'>, ComboboxItemProps {
|
|
4
|
+
data: ComboboxItem<Value, Ext>;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: __VLS_PrettifyLocal<ComboboxOptionProps<Value, Ext>> & import("vue").PublicProps;
|
|
10
|
+
expose: (exposed: {}) => void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: {
|
|
13
|
+
default?: (props: Required<Pick<ComboboxOptionProps<Value, Ext>, "withCheckIcon" | "iconPosition" | "data" | "checked">>) => any;
|
|
14
|
+
};
|
|
15
|
+
emit: {};
|
|
16
|
+
}>) => import("vue").VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = {
|
|
22
|
+
[K in keyof T as K]: T[K];
|
|
23
|
+
} & {};
|