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,161 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useStyleResolver } from "@nui/composals";
|
|
3
|
+
import { getRadius, getSize, getThemeColor, parseThemeColor } from "@nui/utils";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import Box from "../box.vue";
|
|
6
|
+
import { useCheckboxCardState } from "./lib/card.context";
|
|
7
|
+
const {
|
|
8
|
+
size = "sm",
|
|
9
|
+
radius,
|
|
10
|
+
variant = "filled",
|
|
11
|
+
color,
|
|
12
|
+
iconColor,
|
|
13
|
+
indeterminate
|
|
14
|
+
} = defineProps({
|
|
15
|
+
color: { type: null, required: false },
|
|
16
|
+
iconColor: { type: null, required: false },
|
|
17
|
+
variant: { type: String, required: false },
|
|
18
|
+
radius: { type: String, required: false },
|
|
19
|
+
size: { type: String, required: false },
|
|
20
|
+
indeterminate: { type: Boolean, required: false }
|
|
21
|
+
});
|
|
22
|
+
const ctx = useCheckboxCardState();
|
|
23
|
+
const modelValue = defineModel({ type: Boolean });
|
|
24
|
+
const checked = computed(() => {
|
|
25
|
+
if (ctx?.value)
|
|
26
|
+
return ctx?.value.value;
|
|
27
|
+
return modelValue.value;
|
|
28
|
+
});
|
|
29
|
+
const style = computed(() => useStyleResolver((theme) => {
|
|
30
|
+
const parsed = parseThemeColor({ color, theme });
|
|
31
|
+
const outlineColor = parsed.isThemeColor && parsed.shade === void 0 ? `var(--color-${parsed.color}-outline)` : parsed.color;
|
|
32
|
+
return {
|
|
33
|
+
"--checkbox-size": getSize(size, "checkbox-size"),
|
|
34
|
+
"--checkbox-radius": radius && getRadius(radius),
|
|
35
|
+
"--checkbox-color": variant === "outline" ? outlineColor : getThemeColor(color, theme),
|
|
36
|
+
"--checkbox-icon-color": iconColor ? getThemeColor(iconColor, theme) : void 0
|
|
37
|
+
};
|
|
38
|
+
}));
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<Box :style :class='$style.indicator' :mod='{ checked }'>
|
|
43
|
+
<slot :indeterminate='indeterminate' :class='$style.icon' :mod='{ checked }'>
|
|
44
|
+
<Icon v-if='!indeterminate' name='gravity-ui:check' :class='$style.icon' :mod='{ checked }' />
|
|
45
|
+
<Icon v-else :class='$style.icon' name='gravity-ui:minus' :mod='{ checked }' />
|
|
46
|
+
</slot>
|
|
47
|
+
</Box>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style module lang="postcss">
|
|
51
|
+
.indicator {
|
|
52
|
+
--checkbox-size-xs: rem(16px);
|
|
53
|
+
--checkbox-size-sm: rem(20px);
|
|
54
|
+
--checkbox-size-md: rem(24px);
|
|
55
|
+
--checkbox-size-lg: rem(30px);
|
|
56
|
+
--checkbox-size-xl: rem(36px);
|
|
57
|
+
|
|
58
|
+
--checkbox-size: var(--checkbox-size-sm);
|
|
59
|
+
--checkbox-color: var(--color-primary-filled);
|
|
60
|
+
--checkbox-icon-color: var(--color-white);
|
|
61
|
+
|
|
62
|
+
--checkbox-radius: var(--radius-default);
|
|
63
|
+
|
|
64
|
+
position: relative;
|
|
65
|
+
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
|
|
70
|
+
width: var(--checkbox-size);
|
|
71
|
+
min-width: var(--checkbox-size);
|
|
72
|
+
height: var(--checkbox-size);
|
|
73
|
+
min-height: var(--checkbox-size);
|
|
74
|
+
|
|
75
|
+
border: 1px solid transparent;
|
|
76
|
+
border-radius: var(--checkbox-radius);
|
|
77
|
+
|
|
78
|
+
transition: border-color 100ms ease,
|
|
79
|
+
background-color 100ms ease;
|
|
80
|
+
-webkit-tap-highlight-color: transparent;
|
|
81
|
+
|
|
82
|
+
&[data-indeterminate],
|
|
83
|
+
&[data-checked] {
|
|
84
|
+
border-color: var(--checkbox-color);
|
|
85
|
+
|
|
86
|
+
background-color: var(--checkbox-color);
|
|
87
|
+
|
|
88
|
+
& > .icon {
|
|
89
|
+
transform: none;
|
|
90
|
+
|
|
91
|
+
color: var(--checkbox-icon-color);
|
|
92
|
+
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&[data-disabled] {
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
|
|
100
|
+
border-color: var(--color-disabled-border);
|
|
101
|
+
|
|
102
|
+
background-color: var(--color-disabled);
|
|
103
|
+
|
|
104
|
+
&[data-checked] > .icon {
|
|
105
|
+
@mixin light {
|
|
106
|
+
color: var(--color-gray-5);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@mixin dark {
|
|
110
|
+
color: var(--color-dark-3);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@mixin where-light {
|
|
116
|
+
border-color: var(--color-gray-4);
|
|
117
|
+
|
|
118
|
+
background-color: var(--color-white);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@mixin where-dark {
|
|
122
|
+
border-color: var(--color-dark-4);
|
|
123
|
+
|
|
124
|
+
background-color: var(--color-dark-6);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.indicator[data-variant='outline'] {
|
|
129
|
+
&[data-indeterminate]:not([data-disabled]),
|
|
130
|
+
&[data-checked]:not([data-disabled]) {
|
|
131
|
+
border-color: var(--checkbox-color);
|
|
132
|
+
|
|
133
|
+
background-color: transparent;
|
|
134
|
+
|
|
135
|
+
& > .icon {
|
|
136
|
+
transform: none;
|
|
137
|
+
|
|
138
|
+
color: var(--checkbox-color);
|
|
139
|
+
|
|
140
|
+
opacity: 1;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.icon {
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
|
|
148
|
+
transform: translateY(.25rem) scale(0.5);
|
|
149
|
+
|
|
150
|
+
display: block;
|
|
151
|
+
|
|
152
|
+
width: 80%;
|
|
153
|
+
|
|
154
|
+
color: transparent;
|
|
155
|
+
|
|
156
|
+
opacity: 1;
|
|
157
|
+
|
|
158
|
+
transition: transform 100ms ease,
|
|
159
|
+
opacity 100ms ease;
|
|
160
|
+
}
|
|
161
|
+
</style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { UiKitColor, UiKitSize } from '@nui/types';
|
|
2
|
+
export interface CheckboxIndicatorProps {
|
|
3
|
+
color?: UiKitColor;
|
|
4
|
+
iconColor?: UiKitColor;
|
|
5
|
+
variant?: 'filled' | 'outline';
|
|
6
|
+
radius?: UiKitSize;
|
|
7
|
+
size?: UiKitSize;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = CheckboxIndicatorProps;
|
|
11
|
+
type __VLS_ModelProps = {
|
|
12
|
+
modelValue?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
+
declare var __VLS_6: {
|
|
16
|
+
mod: {
|
|
17
|
+
checked: any;
|
|
18
|
+
};
|
|
19
|
+
class: any;
|
|
20
|
+
indeterminate: boolean;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_6) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
29
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { UiKitColor, UiKitSize } from '@nui/types';
|
|
2
|
+
import type { InlineInputProps } from '../input/index.js';
|
|
3
|
+
export interface CheckboxProps extends /* @vue-ignore */ Omit<InlineInputProps, 'id'> {
|
|
4
|
+
color?: UiKitColor;
|
|
5
|
+
iconColor?: UiKitColor;
|
|
6
|
+
variant?: 'filled' | 'outline';
|
|
7
|
+
radius?: UiKitSize;
|
|
8
|
+
size?: UiKitSize;
|
|
9
|
+
indeterminate?: boolean;
|
|
10
|
+
value?: string;
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Props = CheckboxProps;
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare var __VLS_10: {
|
|
18
|
+
class: any;
|
|
19
|
+
indeterminate: boolean;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
icon?: (props: typeof __VLS_10) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useStyleResolver } from "@nui/composals";
|
|
3
|
+
import { getRadius, getSize, getThemeColor, parseThemeColor } from "@nui/utils";
|
|
4
|
+
import { computed, useId } from "vue";
|
|
5
|
+
import Box from "../box.vue";
|
|
6
|
+
import InputInline from "../input/ui/input-inline.vue";
|
|
7
|
+
import { useCheckboxGroupState } from "./lib/group.context";
|
|
8
|
+
const {
|
|
9
|
+
size: _size = "sm",
|
|
10
|
+
radius,
|
|
11
|
+
variant = "filled",
|
|
12
|
+
color,
|
|
13
|
+
iconColor,
|
|
14
|
+
indeterminate,
|
|
15
|
+
value,
|
|
16
|
+
...rest
|
|
17
|
+
} = defineProps({
|
|
18
|
+
color: { type: null, required: false },
|
|
19
|
+
iconColor: { type: null, required: false },
|
|
20
|
+
variant: { type: String, required: false },
|
|
21
|
+
radius: { type: String, required: false },
|
|
22
|
+
size: { type: String, required: false },
|
|
23
|
+
indeterminate: { type: Boolean, required: false },
|
|
24
|
+
value: { type: String, required: false }
|
|
25
|
+
});
|
|
26
|
+
const id = useId();
|
|
27
|
+
const modelValue = defineModel({ type: Boolean });
|
|
28
|
+
const ctx = useCheckboxGroupState();
|
|
29
|
+
const checked = computed(() => {
|
|
30
|
+
if (ctx?.value && value)
|
|
31
|
+
return ctx?.value.value.includes(value);
|
|
32
|
+
return modelValue.value;
|
|
33
|
+
});
|
|
34
|
+
const size = ctx?.size ?? _size;
|
|
35
|
+
const toggle = () => modelValue.value = !modelValue.value;
|
|
36
|
+
const style = computed(() => useStyleResolver((theme) => {
|
|
37
|
+
const parsed = parseThemeColor({ color, theme });
|
|
38
|
+
const outlineColor = parsed.isThemeColor && parsed.shade === void 0 ? `var(--color-${parsed.color}-outline)` : parsed.color;
|
|
39
|
+
return {
|
|
40
|
+
"--checkbox-size": getSize(size, "checkbox-size"),
|
|
41
|
+
"--checkbox-radius": radius === void 0 ? void 0 : getRadius(radius),
|
|
42
|
+
"--checkbox-color": variant === "outline" ? outlineColor : getThemeColor(color, theme),
|
|
43
|
+
"--checkbox-icon-color": iconColor ? getThemeColor(iconColor, theme) : void 0
|
|
44
|
+
};
|
|
45
|
+
}));
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<InputInline v-bind='rest' :id :class='$style.root' :style :size>
|
|
50
|
+
<Box :class='$style.inner' :mod='{ "label-position": rest?.labelPosition }'>
|
|
51
|
+
<input
|
|
52
|
+
:id
|
|
53
|
+
:checked
|
|
54
|
+
type='checkbox'
|
|
55
|
+
:class='$style.input'
|
|
56
|
+
:disabled='rest.disabled'
|
|
57
|
+
@click='value ? ctx?.onUpdate?.(value) ?? toggle() : toggle()'
|
|
58
|
+
>
|
|
59
|
+
|
|
60
|
+
<slot name='icon' :indeterminate='indeterminate' :class='$style.icon'>
|
|
61
|
+
<Icon v-if='!indeterminate' name='gravity-ui:check' :class='$style.icon' />
|
|
62
|
+
<Icon v-else name='gravity-ui:minus' :class='$style.icon' />
|
|
63
|
+
</slot>
|
|
64
|
+
</Box>
|
|
65
|
+
</InputInline>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<style module lang="postcss">
|
|
69
|
+
.root {
|
|
70
|
+
--checkbox-size-xs: rem(16px);
|
|
71
|
+
--checkbox-size-sm: rem(20px);
|
|
72
|
+
--checkbox-size-md: rem(24px);
|
|
73
|
+
--checkbox-size-lg: rem(30px);
|
|
74
|
+
--checkbox-size-xl: rem(36px);
|
|
75
|
+
|
|
76
|
+
--checkbox-size: var(--checkbox-size-sm);
|
|
77
|
+
--checkbox-color: var(--color-primary-filled);
|
|
78
|
+
--checkbox-icon-color: var(--color-white);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.inner {
|
|
82
|
+
position: relative;
|
|
83
|
+
|
|
84
|
+
order: 1;
|
|
85
|
+
|
|
86
|
+
width: var(--checkbox-size);
|
|
87
|
+
height: var(--checkbox-size);
|
|
88
|
+
|
|
89
|
+
&:where([data-label-position='right']) {
|
|
90
|
+
order: 2;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.input {
|
|
95
|
+
display: block;
|
|
96
|
+
|
|
97
|
+
width: var(--checkbox-size);
|
|
98
|
+
height: var(--checkbox-size);
|
|
99
|
+
margin: 0;
|
|
100
|
+
padding: 0;
|
|
101
|
+
border: 1px solid transparent;
|
|
102
|
+
border-radius: var(--checkbox-radius, var(--radius-default));
|
|
103
|
+
|
|
104
|
+
appearance: none;
|
|
105
|
+
|
|
106
|
+
transition: border-color 100ms ease,
|
|
107
|
+
background-color 100ms ease;
|
|
108
|
+
-webkit-tap-highlight-color: transparent;
|
|
109
|
+
|
|
110
|
+
&:where([data-error]) {
|
|
111
|
+
border-color: var(--color-error);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&[data-indeterminate],
|
|
115
|
+
&:checked {
|
|
116
|
+
border-color: var(--checkbox-color);
|
|
117
|
+
|
|
118
|
+
background-color: var(--checkbox-color);
|
|
119
|
+
|
|
120
|
+
& + .icon {
|
|
121
|
+
transform: none;
|
|
122
|
+
|
|
123
|
+
opacity: 1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:disabled {
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
|
|
130
|
+
border-color: var(--color-disabled-border);
|
|
131
|
+
|
|
132
|
+
background-color: var(--color-disabled);
|
|
133
|
+
|
|
134
|
+
& + .icon {
|
|
135
|
+
color: var(--color-disabled);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@mixin where-light {
|
|
140
|
+
border-color: var(--color-gray-4);
|
|
141
|
+
|
|
142
|
+
background-color: var(--color-white);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@mixin where-dark {
|
|
146
|
+
border-color: var(--color-dark-4);
|
|
147
|
+
|
|
148
|
+
background-color: var(--color-dark-6);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.input[data-variant='outline'] {
|
|
153
|
+
& + .icon {
|
|
154
|
+
color: var(--checkbox-color);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&[data-indeterminate]:not(:disabled),
|
|
158
|
+
&:checked:not(:disabled) {
|
|
159
|
+
border-color: var(--checkbox-color);
|
|
160
|
+
|
|
161
|
+
background-color: transparent;
|
|
162
|
+
|
|
163
|
+
& + .icon {
|
|
164
|
+
transform: none;
|
|
165
|
+
|
|
166
|
+
color: var(--checkbox-color);
|
|
167
|
+
|
|
168
|
+
opacity: 1;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.icon {
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
|
|
176
|
+
position: absolute;
|
|
177
|
+
inset: 0;
|
|
178
|
+
transform: translateY(.25rem) scale(0.5);
|
|
179
|
+
|
|
180
|
+
width: 80%;
|
|
181
|
+
margin: auto;
|
|
182
|
+
|
|
183
|
+
color: var(--checkbox-icon-color);
|
|
184
|
+
|
|
185
|
+
opacity: 0;
|
|
186
|
+
|
|
187
|
+
transition: transform 100ms ease,
|
|
188
|
+
opacity 100ms ease;
|
|
189
|
+
}
|
|
190
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { UiKitColor, UiKitSize } from '@nui/types';
|
|
2
|
+
import type { InlineInputProps } from '../input/index.js';
|
|
3
|
+
export interface CheckboxProps extends /* @vue-ignore */ Omit<InlineInputProps, 'id'> {
|
|
4
|
+
color?: UiKitColor;
|
|
5
|
+
iconColor?: UiKitColor;
|
|
6
|
+
variant?: 'filled' | 'outline';
|
|
7
|
+
radius?: UiKitSize;
|
|
8
|
+
size?: UiKitSize;
|
|
9
|
+
indeterminate?: boolean;
|
|
10
|
+
value?: string;
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Props = CheckboxProps;
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare var __VLS_10: {
|
|
18
|
+
class: any;
|
|
19
|
+
indeterminate: boolean;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
icon?: (props: typeof __VLS_10) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type * from './checkbox-card.vue';
|
|
2
|
+
export type * from './checkbox-group.vue';
|
|
3
|
+
export type * from './checkbox-indicator.vue';
|
|
4
|
+
export type * from './checkbox.vue';
|
|
5
|
+
export { useCheckboxCardState } from './lib/card.context.js';
|
|
6
|
+
export { useCheckboxGroupState } from './lib/group.context.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
export interface CheckboxCardState {
|
|
3
|
+
value: ComputedRef<boolean>;
|
|
4
|
+
onUpdate: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useProvideCheckboxCard: (props: CheckboxCardState) => CheckboxCardState;
|
|
7
|
+
export declare const useCheckboxCardState: () => CheckboxCardState;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createStrictInjection } from "@nui/helpers";
|
|
2
|
+
const injectionKey = Symbol("CheckboxCard");
|
|
3
|
+
const [useProvide, useState] = createStrictInjection((props) => props, {
|
|
4
|
+
injectionKey,
|
|
5
|
+
name: "CheckboxCard"
|
|
6
|
+
});
|
|
7
|
+
export const useProvideCheckboxCard = useProvide;
|
|
8
|
+
export const useCheckboxCardState = useState;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UiKitSize } from '@nui/types';
|
|
2
|
+
import type { ModelRef } from 'vue';
|
|
3
|
+
export interface CheckboxGroupState {
|
|
4
|
+
value: ModelRef<string[]>;
|
|
5
|
+
size?: UiKitSize;
|
|
6
|
+
}
|
|
7
|
+
export declare const useProvideCheckboxGroup: (args_0: CheckboxGroupState) => {
|
|
8
|
+
value: ModelRef<string[]>;
|
|
9
|
+
size: UiKitSize | undefined;
|
|
10
|
+
onUpdate: (newValue: string) => number | string[];
|
|
11
|
+
};
|
|
12
|
+
export declare const useCheckboxGroupState: () => {
|
|
13
|
+
value: ModelRef<string[]>;
|
|
14
|
+
size: UiKitSize | undefined;
|
|
15
|
+
onUpdate: (newValue: string) => number | string[];
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createStrictInjection } from "@nui/helpers";
|
|
2
|
+
const injectionKey = Symbol("CheckboxGroup");
|
|
3
|
+
const [useProvide, useState] = createStrictInjection(({ value, size }) => {
|
|
4
|
+
const onUpdate = (newValue) => {
|
|
5
|
+
if (value.value.includes(newValue))
|
|
6
|
+
return value.value = value.value.filter((i) => i !== newValue);
|
|
7
|
+
return value.value.push(newValue);
|
|
8
|
+
};
|
|
9
|
+
return { value, size, onUpdate };
|
|
10
|
+
}, {
|
|
11
|
+
injectionKey,
|
|
12
|
+
name: "CheckboxGroup"
|
|
13
|
+
});
|
|
14
|
+
export const useProvideCheckboxGroup = useProvide;
|
|
15
|
+
export const useCheckboxGroupState = useState;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ChipGroupValue } from './lib.js';
|
|
2
|
+
export interface ChipGroupProps<T extends boolean = false> {
|
|
3
|
+
name: string;
|
|
4
|
+
multiple?: T;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: <T extends boolean = false>(__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<{
|
|
8
|
+
props: __VLS_PrettifyLocal<(ChipGroupProps<T> & {
|
|
9
|
+
modelValue?: ChipGroupValue<T>;
|
|
10
|
+
}) & __VLS_EmitsToProps<__VLS_NormalizeEmits<(evt: "update:modelValue", value: ChipGroupValue<T>) => void>>> & import("vue").PublicProps;
|
|
11
|
+
expose: (exposed: {}) => void;
|
|
12
|
+
attrs: any;
|
|
13
|
+
slots: {
|
|
14
|
+
default?: (props: {}) => any;
|
|
15
|
+
};
|
|
16
|
+
emit: (evt: "update:modelValue", value: ChipGroupValue<T>) => void;
|
|
17
|
+
}>) => import("vue").VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = {
|
|
23
|
+
[K in keyof T as K]: T[K];
|
|
24
|
+
} & {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import VisuallyHiddenInput from "../visually-hidden/visually-hidden-input.vue";
|
|
3
|
+
import { useProvideChipGroupState } from "./lib";
|
|
4
|
+
const {
|
|
5
|
+
multiple = false,
|
|
6
|
+
disabled,
|
|
7
|
+
name
|
|
8
|
+
} = defineProps({
|
|
9
|
+
name: { type: String, required: true },
|
|
10
|
+
multiple: { type: null, required: false },
|
|
11
|
+
disabled: { type: Boolean, required: false }
|
|
12
|
+
});
|
|
13
|
+
const value = defineModel({ type: null, ...{ default: null } });
|
|
14
|
+
useProvideChipGroupState({ multiple, value, disabled });
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<slot />
|
|
19
|
+
<VisuallyHiddenInput v-model='value' :name />
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ChipGroupValue } from './lib.js';
|
|
2
|
+
export interface ChipGroupProps<T extends boolean = false> {
|
|
3
|
+
name: string;
|
|
4
|
+
multiple?: T;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: <T extends boolean = false>(__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<{
|
|
8
|
+
props: __VLS_PrettifyLocal<(ChipGroupProps<T> & {
|
|
9
|
+
modelValue?: ChipGroupValue<T>;
|
|
10
|
+
}) & __VLS_EmitsToProps<__VLS_NormalizeEmits<(evt: "update:modelValue", value: ChipGroupValue<T>) => void>>> & import("vue").PublicProps;
|
|
11
|
+
expose: (exposed: {}) => void;
|
|
12
|
+
attrs: any;
|
|
13
|
+
slots: {
|
|
14
|
+
default?: (props: {}) => any;
|
|
15
|
+
};
|
|
16
|
+
emit: (evt: "update:modelValue", value: ChipGroupValue<T>) => void;
|
|
17
|
+
}>) => import("vue").VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = {
|
|
23
|
+
[K in keyof T as K]: T[K];
|
|
24
|
+
} & {};
|
|
@@ -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
|
+
};
|