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,343 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Box from "@nui/components/box.vue";
|
|
3
|
+
import { getFontSize, getRadius, getSize } from "@nui/utils";
|
|
4
|
+
import { computed, useTemplateRef } from "vue";
|
|
5
|
+
import { useInputWrapperState } from "../lib/input-wrapper.context";
|
|
6
|
+
const {
|
|
7
|
+
is = "input",
|
|
8
|
+
modelValue = "",
|
|
9
|
+
readonly,
|
|
10
|
+
disabled,
|
|
11
|
+
..._props
|
|
12
|
+
} = defineProps({
|
|
13
|
+
is: { type: null, required: false },
|
|
14
|
+
modelValue: { type: String, required: false },
|
|
15
|
+
required: { type: Boolean, required: false },
|
|
16
|
+
radius: { type: String, required: false },
|
|
17
|
+
size: { type: String, required: false },
|
|
18
|
+
variant: { type: String, required: false },
|
|
19
|
+
multiline: { type: Boolean, required: false },
|
|
20
|
+
resize: { type: null, required: false },
|
|
21
|
+
leftSectionPE: { type: null, required: false },
|
|
22
|
+
rightSectionPE: { type: null, required: false },
|
|
23
|
+
id: { type: [String, null], required: true }
|
|
24
|
+
});
|
|
25
|
+
defineEmits(["update:modelValue"]);
|
|
26
|
+
const props = computed(() => _props);
|
|
27
|
+
const api = useInputWrapperState() ?? props;
|
|
28
|
+
const style = computed(() => ({
|
|
29
|
+
"--input-height": getSize(api.value.size, "input-height"),
|
|
30
|
+
"--input-fz": getFontSize(api.value.size),
|
|
31
|
+
"--input-radius": api.value.radius === void 0 ? void 0 : getRadius(api.value.radius),
|
|
32
|
+
"--input-padding-y": api.value.multiline ? getSize(api.value.size, "input-padding-y") : void 0,
|
|
33
|
+
"--input-left-section-pointer-events": api.value.leftSectionPE,
|
|
34
|
+
"--input-right-section-pointer-events": api.value.rightSectionPE,
|
|
35
|
+
"--input-resize": api.value.resize
|
|
36
|
+
}));
|
|
37
|
+
const ref = useTemplateRef("input");
|
|
38
|
+
defineExpose({ ref });
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<Box
|
|
43
|
+
:style
|
|
44
|
+
:class='[$style.root, $attrs?.class]'
|
|
45
|
+
:mod='[{
|
|
46
|
+
"with-left-section": !!$slots?.leftSection,
|
|
47
|
+
"with-right-section": !!$slots?.rightSection,
|
|
48
|
+
"variant": api.variant
|
|
49
|
+
}]'
|
|
50
|
+
>
|
|
51
|
+
<span
|
|
52
|
+
v-if='$slots.leftSection'
|
|
53
|
+
:class='$style.section'
|
|
54
|
+
data-position='left'
|
|
55
|
+
>
|
|
56
|
+
<slot name='leftSection' />
|
|
57
|
+
</span>
|
|
58
|
+
|
|
59
|
+
<component
|
|
60
|
+
:is
|
|
61
|
+
:id='api.id'
|
|
62
|
+
v-bind='{ ...$attrs, class: void 0 }'
|
|
63
|
+
ref='input'
|
|
64
|
+
:class='$style.input'
|
|
65
|
+
:value='modelValue'
|
|
66
|
+
:readonly
|
|
67
|
+
:disabled
|
|
68
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
<span
|
|
72
|
+
v-if='$slots.rightSection'
|
|
73
|
+
:class='$style.section'
|
|
74
|
+
data-position='right'
|
|
75
|
+
>
|
|
76
|
+
<slot name='rightSection' />
|
|
77
|
+
</span>
|
|
78
|
+
</Box>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<style lang="postcss" module>
|
|
82
|
+
.root {
|
|
83
|
+
--input-height-xs: rem(30px);
|
|
84
|
+
--input-height-sm: rem(36px);
|
|
85
|
+
--input-height-md: rem(42px);
|
|
86
|
+
--input-height-lg: rem(50px);
|
|
87
|
+
--input-height-xl: rem(60px);
|
|
88
|
+
|
|
89
|
+
--input-padding-y-xs: rem(5px);
|
|
90
|
+
--input-padding-y-sm: rem(6px);
|
|
91
|
+
--input-padding-y-md: rem(8px);
|
|
92
|
+
--input-padding-y-lg: rem(10px);
|
|
93
|
+
--input-padding-y-xl: rem(13px);
|
|
94
|
+
|
|
95
|
+
--input-height: var(--input-height-sm);
|
|
96
|
+
--input-radius: var(--radius-default);
|
|
97
|
+
|
|
98
|
+
--input-cursor: text;
|
|
99
|
+
--input-text-align: left;
|
|
100
|
+
--input-line-height: calc(var(--input-height) - rem(2px));
|
|
101
|
+
--input-padding: calc(var(--input-height) / 3);
|
|
102
|
+
--input-padding-inline-start: var(--input-padding);
|
|
103
|
+
--input-padding-inline-end: var(--input-padding);
|
|
104
|
+
--input-placeholder-color: var(--color-placeholder);
|
|
105
|
+
--input-color: var(--color-text);
|
|
106
|
+
|
|
107
|
+
--input-left-section-width: calc(var(--input-height) - rem(2px));
|
|
108
|
+
--input-right-section-width: calc(var(--input-height) - rem(2px));
|
|
109
|
+
--input-left-section-pointer-events: none;
|
|
110
|
+
--input-right-section-pointer-events: none;
|
|
111
|
+
--input-left-section-size: var(--input-left-section-width);
|
|
112
|
+
--input-right-section-size: var(--input-right-section-width);
|
|
113
|
+
|
|
114
|
+
--input-fz: var(--font-size-sm);
|
|
115
|
+
--input-size: var(--input-height);
|
|
116
|
+
--input-resize: none;
|
|
117
|
+
|
|
118
|
+
--section-y: 1px;
|
|
119
|
+
--left-section-start: 1px;
|
|
120
|
+
--left-section-border-radius: var(--input-radius) 0 0 var(--input-radius);
|
|
121
|
+
|
|
122
|
+
--right-section-end: 1px;
|
|
123
|
+
--right-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
124
|
+
|
|
125
|
+
position: relative;
|
|
126
|
+
|
|
127
|
+
&[data-variant='unstyled'] {
|
|
128
|
+
--input-padding: 0;
|
|
129
|
+
--input-padding-y: 0;
|
|
130
|
+
--input-padding-inline-start: 0;
|
|
131
|
+
--input-padding-inline-end: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&[data-pointer] {
|
|
135
|
+
--input-cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-multiline] {
|
|
139
|
+
--input-padding-y-xs: 4.5px;
|
|
140
|
+
--input-padding-y-sm: 5.5px;
|
|
141
|
+
--input-padding-y-md: 7px;
|
|
142
|
+
--input-padding-y-lg: 9.5px;
|
|
143
|
+
--input-padding-y-xl: 13px;
|
|
144
|
+
|
|
145
|
+
--input-size: auto;
|
|
146
|
+
--input-line-height: var(--line-height);
|
|
147
|
+
--input-padding-y: var(--input-padding-y-sm);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&[data-with-left-section] {
|
|
151
|
+
--input-padding-inline-start: var(--input-left-section-size);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&[data-with-right-section] {
|
|
155
|
+
--input-padding-inline-end: var(--input-right-section-size);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[data-color-scheme] &[data-error] {
|
|
159
|
+
--input-color: var(--color-error);
|
|
160
|
+
--input-placeholder-color: var(--color-error);
|
|
161
|
+
--input-section-color: var(--color-error);
|
|
162
|
+
|
|
163
|
+
&:not([data-variant='unstyled']) {
|
|
164
|
+
--input-bd: var(--color-error);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@mixin light {
|
|
169
|
+
--input-disabled-bg: var(--color-gray-1);
|
|
170
|
+
--input-disabled-color: var(--color-gray-6);
|
|
171
|
+
|
|
172
|
+
&[data-variant='default'] {
|
|
173
|
+
--input-bd: var(--color-gray-4);
|
|
174
|
+
--input-bg: var(--color-white);
|
|
175
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&[data-variant='filled'] {
|
|
179
|
+
--input-bd: transparent;
|
|
180
|
+
--input-bg: var(--color-gray-1);
|
|
181
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&[data-variant='unstyled'] {
|
|
185
|
+
--input-bd: transparent;
|
|
186
|
+
--input-bg: transparent;
|
|
187
|
+
--input-bd-focus: transparent;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@mixin dark {
|
|
192
|
+
--input-disabled-bg: var(--color-dark-6);
|
|
193
|
+
--input-disabled-color: var(--color-dark-2);
|
|
194
|
+
|
|
195
|
+
&[data-variant='default'] {
|
|
196
|
+
--input-bd: var(--color-dark-4);
|
|
197
|
+
--input-bg: var(--color-dark-6);
|
|
198
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&[data-variant='filled'] {
|
|
202
|
+
--input-bd: transparent;
|
|
203
|
+
--input-bg: var(--color-dark-5);
|
|
204
|
+
--input-bd-focus: var(--color-primary-filled);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&[data-variant='unstyled'] {
|
|
208
|
+
--input-bd: transparent;
|
|
209
|
+
--input-bg: transparent;
|
|
210
|
+
--input-bd-focus: transparent;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@mixin where-rtl {
|
|
215
|
+
--input-text-align: right;
|
|
216
|
+
--left-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
217
|
+
--right-section-border-radius: var(--input-radius) 0 0 var(--input-radius);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.input {
|
|
222
|
+
cursor: var(--input-cursor);
|
|
223
|
+
resize: var(--input-resize, none);
|
|
224
|
+
|
|
225
|
+
overflow: var(--input-overflow);
|
|
226
|
+
display: block;
|
|
227
|
+
|
|
228
|
+
width: 100%;
|
|
229
|
+
height: var(--input-size);
|
|
230
|
+
min-height: var(--input-height);
|
|
231
|
+
padding-top: var(--input-padding-y, 0rem);
|
|
232
|
+
padding-bottom: var(--input-padding-y, 0rem);
|
|
233
|
+
padding-inline-start: var(--input-padding-inline-start);
|
|
234
|
+
padding-inline-end: var(--input-padding-inline-end);
|
|
235
|
+
border: rem(1px) solid var(--input-bd);
|
|
236
|
+
border-radius: var(--input-radius);
|
|
237
|
+
|
|
238
|
+
font-family: var(--font-family), serif;
|
|
239
|
+
font-size: var(--input-fz);
|
|
240
|
+
line-height: var(--input-line-height);
|
|
241
|
+
color: var(--input-color);
|
|
242
|
+
|
|
243
|
+
text-align: var(--input-text-align);
|
|
244
|
+
|
|
245
|
+
appearance: none;
|
|
246
|
+
background-color: var(--input-bg);
|
|
247
|
+
|
|
248
|
+
transition: border-color 100ms ease;
|
|
249
|
+
-webkit-tap-highlight-color: transparent;
|
|
250
|
+
|
|
251
|
+
/* Used as data attribute in Textarea component, does not have associated prop on the Input component */
|
|
252
|
+
|
|
253
|
+
&[data-no-overflow] {
|
|
254
|
+
--input-overflow: hidden;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:focus,
|
|
258
|
+
&:focus-within {
|
|
259
|
+
--input-bd: var(--input-bd-focus);
|
|
260
|
+
|
|
261
|
+
outline: none;
|
|
262
|
+
|
|
263
|
+
[data-error] & {
|
|
264
|
+
--input-bd: var(--color-error);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&::placeholder {
|
|
269
|
+
color: var(--input-placeholder-color);
|
|
270
|
+
|
|
271
|
+
opacity: 1;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&::-webkit-inner-spin-button,
|
|
275
|
+
&::-webkit-outer-spin-button,
|
|
276
|
+
&::-webkit-search-decoration,
|
|
277
|
+
&::-webkit-search-cancel-button,
|
|
278
|
+
&::-webkit-search-results-button,
|
|
279
|
+
&::-webkit-search-results-decoration {
|
|
280
|
+
appearance: none;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&[type='number'] {
|
|
284
|
+
-moz-appearance: textfield;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&:disabled,
|
|
288
|
+
&[data-disabled] {
|
|
289
|
+
cursor: not-allowed;
|
|
290
|
+
|
|
291
|
+
color: var(--input-disabled-color);
|
|
292
|
+
|
|
293
|
+
opacity: 0.6;
|
|
294
|
+
background-color: var(--input-disabled-bg);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Required to be a separate selector to work in Firefox, can be merged with &:disabled once :has is supported */
|
|
298
|
+
|
|
299
|
+
&:has(input:disabled) {
|
|
300
|
+
cursor: not-allowed;
|
|
301
|
+
|
|
302
|
+
color: var(--input-disabled-color);
|
|
303
|
+
|
|
304
|
+
opacity: .6;
|
|
305
|
+
background-color: var(--input-disabled-bg);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.section {
|
|
310
|
+
pointer-events: var(--section-pointer-events);
|
|
311
|
+
|
|
312
|
+
position: absolute;
|
|
313
|
+
z-index: 1;
|
|
314
|
+
top: var(--section-y);
|
|
315
|
+
bottom: var(--section-y);
|
|
316
|
+
inset-inline-start: var(--section-start);
|
|
317
|
+
inset-inline-end: var(--section-end);
|
|
318
|
+
|
|
319
|
+
display: flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
justify-content: center;
|
|
322
|
+
|
|
323
|
+
width: var(--section-size);
|
|
324
|
+
|
|
325
|
+
border-radius: var(--section-border-radius);
|
|
326
|
+
|
|
327
|
+
color: var(--input-section-color, var(--color-dimmed));
|
|
328
|
+
|
|
329
|
+
&[data-position='right'] {
|
|
330
|
+
--section-pointer-events: var(--input-right-section-pointer-events);
|
|
331
|
+
--section-end: var(--right-section-end);
|
|
332
|
+
--section-size: var(--input-right-section-size);
|
|
333
|
+
--section-border-radius: var(--right-section-border-radius);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&[data-position='left'] {
|
|
337
|
+
--section-pointer-events: var(--input-left-section-pointer-events);
|
|
338
|
+
--section-start: var(--left-section-start);
|
|
339
|
+
--section-size: var(--input-left-section-size);
|
|
340
|
+
--section-border-radius: var(--left-section-border-radius);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { WrapperContext } from '../lib/input-wrapper.context.js';
|
|
3
|
+
import type { InputBaseProps } from '../types/index.js';
|
|
4
|
+
export interface BaseInputProps extends /* @vue-ignore */ InputBaseProps, Omit<WrapperContext, 'id'>, Required<Pick<WrapperContext, 'id'>> {
|
|
5
|
+
is?: 'input' | 'textarea' | Component;
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
}
|
|
8
|
+
declare var __VLS_6: {}, __VLS_18: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
leftSection?: (props: typeof __VLS_6) => any;
|
|
11
|
+
} & {
|
|
12
|
+
rightSection?: (props: typeof __VLS_18) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<BaseInputProps, {
|
|
15
|
+
ref: Readonly<import("vue").ShallowRef<any>>;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<BaseInputProps> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { UiKitSize } from '@nui/types';
|
|
2
|
+
import type { BoxProps } from '../../box.vue.js';
|
|
3
|
+
export interface InlineInputProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
4
|
+
id: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
size?: UiKitSize | string;
|
|
10
|
+
labelPosition?: 'left' | 'right';
|
|
11
|
+
}
|
|
12
|
+
declare var __VLS_6: {}, __VLS_12: {}, __VLS_18: {}, __VLS_24: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_6) => any;
|
|
15
|
+
} & {
|
|
16
|
+
label?: (props: typeof __VLS_12) => any;
|
|
17
|
+
} & {
|
|
18
|
+
error?: (props: typeof __VLS_18) => any;
|
|
19
|
+
} & {
|
|
20
|
+
description?: (props: typeof __VLS_24) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<InlineInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InlineInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getFontSize, getSize } from "@nui/utils";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import Box from "../../box.vue";
|
|
5
|
+
const {
|
|
6
|
+
size,
|
|
7
|
+
id,
|
|
8
|
+
labelPosition = "right",
|
|
9
|
+
disabled,
|
|
10
|
+
description,
|
|
11
|
+
error,
|
|
12
|
+
label,
|
|
13
|
+
mod: _mod
|
|
14
|
+
} = defineProps({
|
|
15
|
+
id: { type: String, required: true },
|
|
16
|
+
label: { type: String, required: false },
|
|
17
|
+
description: { type: String, required: false },
|
|
18
|
+
error: { type: String, required: false },
|
|
19
|
+
disabled: { type: Boolean, required: false, skipCheck: true },
|
|
20
|
+
size: { type: String, required: false },
|
|
21
|
+
labelPosition: { type: String, required: false }
|
|
22
|
+
});
|
|
23
|
+
const style = computed(() => ({
|
|
24
|
+
"--label-fz": getFontSize(size),
|
|
25
|
+
"--label-lh": getSize(size)
|
|
26
|
+
}));
|
|
27
|
+
const mod = computed(() => [
|
|
28
|
+
{ "label-position": labelPosition },
|
|
29
|
+
_mod
|
|
30
|
+
]);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<Box :style :class='$style.root' :mod>
|
|
35
|
+
<div :class='$style.body'>
|
|
36
|
+
<slot />
|
|
37
|
+
|
|
38
|
+
<div :class='$style.wrapper'>
|
|
39
|
+
<Box is='label' :class='$style.label' :for='id' :mod='{ disabled }'>
|
|
40
|
+
<slot name='label'>
|
|
41
|
+
{{ label }}
|
|
42
|
+
</slot>
|
|
43
|
+
</Box>
|
|
44
|
+
|
|
45
|
+
<Box is='p' v-if='error' :class='$style.error' :mod='{ disabled }'>
|
|
46
|
+
<slot name='error'>
|
|
47
|
+
{{ error }}
|
|
48
|
+
</slot>
|
|
49
|
+
</Box>
|
|
50
|
+
|
|
51
|
+
<Box is='p' v-else-if='description || $slots.description' :class='$style.description' :mod='{ disabled }'>
|
|
52
|
+
<slot name='description'>
|
|
53
|
+
{{ description }}
|
|
54
|
+
</slot>
|
|
55
|
+
</Box>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</Box>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<style lang="postcss" module>
|
|
62
|
+
.root {
|
|
63
|
+
--label-lh-xs: rem(16px);
|
|
64
|
+
--label-lh-sm: rem(20px);
|
|
65
|
+
--label-lh-md: rem(24px);
|
|
66
|
+
--label-lh-lg: rem(30px);
|
|
67
|
+
--label-lh-xl: rem(36px);
|
|
68
|
+
--label-lh: var(--label-lh-sm);
|
|
69
|
+
|
|
70
|
+
--label-fz: var(--font-size-sm);
|
|
71
|
+
|
|
72
|
+
&[data-label-position='left'] {
|
|
73
|
+
--label-order: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&[data-label-position='right'] {
|
|
77
|
+
--label-order: 1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.body {
|
|
82
|
+
display: flex;
|
|
83
|
+
gap: var(--spacing-sm);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.wrapper {
|
|
87
|
+
--label-cursor: default;
|
|
88
|
+
|
|
89
|
+
cursor: var(--label-cursor);
|
|
90
|
+
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
gap: .25rem;
|
|
94
|
+
order: var(--label-order);
|
|
95
|
+
|
|
96
|
+
font-size: var(--label-fz);
|
|
97
|
+
line-height: var(--label-lh);
|
|
98
|
+
|
|
99
|
+
-webkit-tap-highlight-color: transparent;
|
|
100
|
+
|
|
101
|
+
fieldset:disabled &,
|
|
102
|
+
&[data-disabled] {
|
|
103
|
+
--label-cursor: not-allowed;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.label {
|
|
108
|
+
cursor: var(--label-cursor);
|
|
109
|
+
|
|
110
|
+
color: inherit;
|
|
111
|
+
|
|
112
|
+
fieldset:disabled &,
|
|
113
|
+
&:where([data-disabled]) {
|
|
114
|
+
color: var(--color-gray-5);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.error,
|
|
119
|
+
.description {
|
|
120
|
+
display: block;
|
|
121
|
+
|
|
122
|
+
margin: 0;
|
|
123
|
+
padding: 0;
|
|
124
|
+
|
|
125
|
+
line-height: 1.2;
|
|
126
|
+
overflow-wrap: break-word;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.description {
|
|
130
|
+
font-size: var(--input-description-size, calc(var(--font-size-sm) - rem(2px)));
|
|
131
|
+
color: var(--color-dimmed);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.error {
|
|
135
|
+
font-size: var(--input-error-size);
|
|
136
|
+
color: var(--color-error);
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { UiKitSize } from '@nui/types';
|
|
2
|
+
import type { BoxProps } from '../../box.vue.js';
|
|
3
|
+
export interface InlineInputProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
|
|
4
|
+
id: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
size?: UiKitSize | string;
|
|
10
|
+
labelPosition?: 'left' | 'right';
|
|
11
|
+
}
|
|
12
|
+
declare var __VLS_6: {}, __VLS_12: {}, __VLS_18: {}, __VLS_24: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_6) => any;
|
|
15
|
+
} & {
|
|
16
|
+
label?: (props: typeof __VLS_12) => any;
|
|
17
|
+
} & {
|
|
18
|
+
error?: (props: typeof __VLS_18) => any;
|
|
19
|
+
} & {
|
|
20
|
+
description?: (props: typeof __VLS_24) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<InlineInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InlineInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UiKitSize } from '@nui/types';
|
|
2
|
+
export interface InputLabelProps {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
size?: UiKitSize | string;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<InputLabelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputLabelProps> & 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,26 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getFontSize } from "@nui/utils";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
const {
|
|
5
|
+
required = false,
|
|
6
|
+
size = "sm"
|
|
7
|
+
} = defineProps({
|
|
8
|
+
required: { type: Boolean, required: false },
|
|
9
|
+
size: { type: String, required: false }
|
|
10
|
+
});
|
|
11
|
+
const style = computed(() => ({
|
|
12
|
+
"--input-label-size": getFontSize(size),
|
|
13
|
+
"--input-asterisk-color": void 0
|
|
14
|
+
}));
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<label :style :class='$style.root'>
|
|
19
|
+
<slot />
|
|
20
|
+
<span v-if='required' :class='$style.required'> *</span>
|
|
21
|
+
</label>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style module>
|
|
25
|
+
.root{--input-label-size:var(--font-size-sm);--input-asterisk-color:var(--color-error);cursor:default;display:inline-block;font-size:var(--input-label-size);font-weight:500;overflow-wrap:anywhere;word-break:normal;-webkit-tap-highlight-color:transparent}.required{color:var(--input-asterisk-color)}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UiKitSize } from '@nui/types';
|
|
2
|
+
export interface InputLabelProps {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
size?: UiKitSize | string;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<InputLabelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputLabelProps> & 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,26 @@
|
|
|
1
|
+
import type { WrapperContext } from '../lib/input-wrapper.context.js';
|
|
2
|
+
import type { InputLabelProps } from './input-label.vue.js';
|
|
3
|
+
export interface InputWrapperProps extends /* @vue-ignore */ WrapperContext, InputLabelProps {
|
|
4
|
+
error?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
declare var __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
label?: (props: typeof __VLS_5) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_7) => any;
|
|
13
|
+
} & {
|
|
14
|
+
error?: (props: typeof __VLS_9) => any;
|
|
15
|
+
} & {
|
|
16
|
+
description?: (props: typeof __VLS_11) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<InputWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputWrapperProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|