@vueland/ui 0.0.1 → 0.0.3
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/LICENSE +21 -0
- package/README.md +147 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/CApp/CApp.js +4 -5
- package/dist/components/CAutocomplete/CAutocomplete.js +200 -91
- package/dist/components/CBtn/CBtn.js +26 -27
- package/dist/components/CCheckbox/CCheckbox.js +40 -58
- package/dist/components/CCheckbox/CheckboxElement.js +96 -0
- package/dist/components/CCheckbox/index2.js +5 -0
- package/dist/components/CChip/CChip.js +13 -0
- package/dist/components/CDateInput/CDateInput.js +245 -0
- package/dist/components/CDateInput/index.js +5 -0
- package/dist/components/CDatePicker/CDatePicker.js +324 -0
- package/dist/components/CDatePicker/CDatePickerDates.js +300 -0
- package/dist/components/CDatePicker/CDatePickerHeader.js +62 -0
- package/dist/components/CDatePicker/CDatePickerMonths.js +114 -0
- package/dist/components/CDatePicker/CDatePickerYears.js +143 -0
- package/dist/components/CDatePicker/helpers.js +17 -0
- package/dist/components/CDatePicker/index.js +14 -0
- package/dist/components/CDatePicker/index2.js +5 -0
- package/dist/components/CDatePicker/index3.js +5 -0
- package/dist/components/CDatePicker/index4.js +5 -0
- package/dist/components/CDatePicker/index5.js +5 -0
- package/dist/components/CDatePicker/index6.js +5 -0
- package/dist/components/CDatePicker/locales/en.json.js +44 -0
- package/dist/components/CDatePicker/locales/index.js +9 -0
- package/dist/components/CDatePicker/locales/ru.json.js +44 -0
- package/dist/components/CDatePicker/utils.js +20 -0
- package/dist/components/CDialog/CDialog.js +2 -4
- package/dist/components/CField/CField.js +160 -28
- package/dist/components/CForm/CForm.js +38 -22
- package/dist/components/CGrid/CCol.js +1 -3
- package/dist/components/CGrid/CRow.js +5 -7
- package/dist/components/CIcon/CIcon.js +3 -3
- package/dist/components/CInput/CInput.js +119 -109
- package/dist/components/CList/CList.js +106 -34
- package/dist/components/CList/CListItem.js +44 -14
- package/dist/components/CMenu/CMenu.js +54 -55
- package/dist/components/COverlay/COverlay.js +6 -5
- package/dist/components/CRadio/CRadio.js +11 -5
- package/dist/components/CRadio/CRadioGroup.js +10 -0
- package/dist/components/CSelect/CSelect.js +180 -71
- package/dist/components/CSelectControl/CSelectControl.js +14 -2
- package/dist/components/CTextField/CTextField.js +79 -52
- package/dist/components/CTextField/index.js +2 -2
- package/dist/components/CTextField/index2.js +5 -0
- package/dist/components/CToolbar/CToolbar.js +1 -3
- package/dist/components/CTooltip/CTooltip.js +13 -11
- package/dist/components/CTooltip/index.js +2 -2
- package/dist/components/CTooltip/index2.js +5 -0
- package/dist/components/global-components.d.ts +44 -0
- package/dist/components/index.d.ts +841 -504
- package/dist/components/index.js +11 -7
- package/dist/composables/index.d.ts +384 -235
- package/dist/composables/index.js +22 -14
- package/dist/composables/use-activator.js +15 -25
- package/dist/composables/{use-app-scroll.js → use-application-scroll.js} +4 -8
- package/dist/composables/use-aria-activator.js +15 -0
- package/dist/composables/use-aria-dialog.js +16 -0
- package/dist/composables/use-aria-field.js +18 -0
- package/dist/composables/use-aria-listbox.js +14 -0
- package/dist/composables/use-aria-toggle.js +15 -0
- package/dist/composables/use-auto-position.js +206 -118
- package/dist/composables/use-autocomplete.js +21 -19
- package/dist/composables/use-breakpoints.js +8 -0
- package/dist/composables/use-button-presets.js +3 -7
- package/dist/composables/use-delay-actions.js +8 -2
- package/dist/composables/use-display.js +26 -18
- package/dist/composables/use-field-presets.js +82 -0
- package/dist/composables/use-icon.js +106 -34
- package/dist/composables/use-id.js +9 -0
- package/dist/composables/use-input-presets.js +88 -19
- package/dist/composables/use-keyboard.js +52 -0
- package/dist/composables/use-list.js +8 -0
- package/dist/composables/use-menu.js +8 -0
- package/dist/composables/use-normalized-items.js +22 -0
- package/dist/composables/use-overlay-stack.js +4 -1
- package/dist/composables/use-presets.js +2 -2
- package/dist/composables/use-select-control.js +8 -0
- package/dist/composables/use-selected-chips.js +40 -0
- package/dist/composables/use-validate.js +32 -24
- package/dist/constants/aria.js +32 -0
- package/dist/constants/attrs.js +21 -0
- package/dist/constants/icons.js +55 -8
- package/dist/constants/index.d.ts +187 -53
- package/dist/constants/index.js +3 -1
- package/dist/constants/provide-keys.js +2 -1
- package/dist/css/lib.css +1 -0
- package/dist/css/utils/_borders.css +1 -0
- package/dist/css/utils/_borders.js +3 -0
- package/dist/css/utils/_display.css +1 -1
- package/dist/css/utils/_flex.css +1 -1
- package/dist/css/utils/_grid.css +1 -0
- package/dist/css/utils/_grid.js +3 -0
- package/dist/css/utils/_helpers.css +1 -1
- package/dist/css/utils/_positions.css +1 -1
- package/dist/css/utils/_radius.css +1 -1
- package/dist/css/utils/_sizing.css +1 -1
- package/dist/css/utils/_spaces.css +1 -1
- package/dist/css/utils/_text.css +1 -1
- package/dist/css/utils/_transitions.css +1 -1
- package/dist/css/utils/_typography.css +1 -1
- package/dist/enums/IconName.js +13 -0
- package/dist/enums/index.d.ts +15 -2
- package/dist/helpers/preset.js +11 -0
- package/dist/helpers/theme.js +41 -0
- package/dist/library.js +31 -9
- package/dist/resolvers/font-awesome.js +30 -0
- package/dist/resolvers/index.d.ts +48 -0
- package/dist/resolvers/index.js +1 -0
- package/dist/scss/lib.scss +26 -0
- package/dist/scss/maps/colors-map.scss +342 -0
- package/dist/scss/maps/elevations-map.scss +88 -0
- package/dist/scss/maps/flexes-map.scss +24 -0
- package/dist/scss/maps/grids.scss +23 -0
- package/dist/scss/modules/_global-vars.scss +88 -0
- package/dist/scss/ress.scss +281 -0
- package/dist/scss/styles.scss +20 -0
- package/dist/scss/utils/_borders.scss +28 -0
- package/dist/scss/utils/_colors.scss +86 -0
- package/dist/scss/utils/_cursor.scss +140 -0
- package/dist/scss/utils/_display.scss +32 -0
- package/dist/scss/utils/_elevations.scss +15 -0
- package/dist/scss/utils/_flex.scss +137 -0
- package/dist/scss/utils/_grid.scss +173 -0
- package/dist/scss/utils/_helpers.scss +47 -0
- package/dist/scss/utils/_opacity.scss +13 -0
- package/dist/scss/utils/_overflow.scss +51 -0
- package/dist/scss/utils/_positions.scss +42 -0
- package/dist/scss/utils/_radius.scss +41 -0
- package/dist/scss/utils/_sizing.scss +40 -0
- package/dist/scss/utils/_spaces.scss +164 -0
- package/dist/scss/utils/_text.scss +76 -0
- package/dist/scss/utils/_transitions.scss +98 -0
- package/dist/scss/utils/_typography.scss +81 -0
- package/dist/styles.css +1 -1
- package/dist/temp-types/src/components/CApp/CApp.vue.d.ts +2 -4
- package/dist/temp-types/src/components/CApp/CApp.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CApp/types.d.ts +4 -0
- package/dist/temp-types/src/components/CApp/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CAutocomplete/CAutocomplete.vue.d.ts +7 -2
- package/dist/temp-types/src/components/CAutocomplete/CAutocomplete.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CAutocomplete/types.d.ts +16 -6
- package/dist/temp-types/src/components/CAutocomplete/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CBtn/CBtn.vue.d.ts +5 -1
- package/dist/temp-types/src/components/CBtn/CBtn.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CBtn/index.d.ts +1 -0
- package/dist/temp-types/src/components/CBtn/index.d.ts.map +1 -1
- package/dist/temp-types/src/components/CBtn/types.d.ts +1 -0
- package/dist/temp-types/src/components/CBtn/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CCheckbox/CCheckbox.vue.d.ts +2 -6
- package/dist/temp-types/src/components/CCheckbox/CCheckbox.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CCheckbox/CheckboxElement.vue.d.ts +32 -0
- package/dist/temp-types/src/components/CCheckbox/CheckboxElement.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CCheckbox/types.d.ts +7 -4
- package/dist/temp-types/src/components/CCheckbox/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CChip/CChip.vue.d.ts +13 -0
- package/dist/temp-types/src/components/CChip/CChip.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CChip/index.d.ts +2 -0
- package/dist/temp-types/src/components/CChip/index.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDateInput/CDateInput.vue.d.ts +61 -0
- package/dist/temp-types/src/components/CDateInput/CDateInput.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDateInput/index.d.ts +3 -0
- package/dist/temp-types/src/components/CDateInput/index.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePicker.vue.d.ts +82 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePicker.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerDates.vue.d.ts +60 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerDates.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerHeader.vue.d.ts +27 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerHeader.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerMonths.vue.d.ts +40 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerMonths.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerYears.vue.d.ts +34 -0
- package/dist/temp-types/src/components/CDatePicker/CDatePickerYears.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/helpers.d.ts +4 -0
- package/dist/temp-types/src/components/CDatePicker/helpers.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/index.d.ts +6 -0
- package/dist/temp-types/src/components/CDatePicker/index.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/locales/index.d.ts +7 -0
- package/dist/temp-types/src/components/CDatePicker/locales/index.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/types.d.ts +22 -0
- package/dist/temp-types/src/components/CDatePicker/types.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDatePicker/utils.d.ts +8 -0
- package/dist/temp-types/src/components/CDatePicker/utils.d.ts.map +1 -0
- package/dist/temp-types/src/components/CDialog/CDialog.vue.d.ts +1 -1
- package/dist/temp-types/src/components/CDialog/CDialog.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CDialog/CDialogsStack.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CDialog/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CField/CField.vue.d.ts +26 -10
- package/dist/temp-types/src/components/CField/CField.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CField/index.d.ts +1 -0
- package/dist/temp-types/src/components/CField/index.d.ts.map +1 -1
- package/dist/temp-types/src/components/CField/types.d.ts +22 -0
- package/dist/temp-types/src/components/CField/types.d.ts.map +1 -0
- package/dist/temp-types/src/components/CForm/CForm.vue.d.ts +10 -8
- package/dist/temp-types/src/components/CForm/CForm.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CForm/types.d.ts +13 -3
- package/dist/temp-types/src/components/CForm/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CGrid/CCol.d.ts.map +1 -1
- package/dist/temp-types/src/components/CGrid/CRow.d.ts +1 -1
- package/dist/temp-types/src/components/CGrid/CRow.d.ts.map +1 -1
- package/dist/temp-types/src/components/CGrid/index.d.ts +1 -1
- package/dist/temp-types/src/components/CIcon/CIcon.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CIcon/types.d.ts +1 -2
- package/dist/temp-types/src/components/CIcon/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CInput/CInput.vue.d.ts +23 -7
- package/dist/temp-types/src/components/CInput/CInput.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CInput/types.d.ts +42 -28
- package/dist/temp-types/src/components/CInput/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CLabel/CLabel.d.ts.map +1 -1
- package/dist/temp-types/src/components/CList/CList.vue.d.ts +7 -1
- package/dist/temp-types/src/components/CList/CList.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CList/CListItem.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CList/types.d.ts +18 -1
- package/dist/temp-types/src/components/CList/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CMenu/CMenu.vue.d.ts +6 -6
- package/dist/temp-types/src/components/CMenu/CMenu.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CMenu/types.d.ts +2 -2
- package/dist/temp-types/src/components/CMenu/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/COverlay/COverlay.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CRadio/CRadio.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CRadio/CRadioGroup.vue.d.ts +13 -0
- package/dist/temp-types/src/components/CRadio/CRadioGroup.vue.d.ts.map +1 -0
- package/dist/temp-types/src/components/CRadio/index.d.ts +1 -0
- package/dist/temp-types/src/components/CRadio/index.d.ts.map +1 -1
- package/dist/temp-types/src/components/CScrim/index.d.ts.map +1 -1
- package/dist/temp-types/src/components/CSelect/CSelect.vue.d.ts +7 -2
- package/dist/temp-types/src/components/CSelect/CSelect.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CSelect/types.d.ts +16 -6
- package/dist/temp-types/src/components/CSelect/types.d.ts.map +1 -1
- package/dist/temp-types/src/components/CSelectControl/CSelectControl.vue.d.ts +5 -1
- package/dist/temp-types/src/components/CSelectControl/CSelectControl.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CTextField/CTextField.vue.d.ts +19 -17
- package/dist/temp-types/src/components/CTextField/CTextField.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CTextField/index.d.ts +10 -1
- package/dist/temp-types/src/components/CTextField/index.d.ts.map +1 -1
- package/dist/temp-types/src/components/CTextField/types.d.ts +16 -0
- package/dist/temp-types/src/components/CTextField/types.d.ts.map +1 -0
- package/dist/temp-types/src/components/CToolbar/CToolbar.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CTooltip/CTooltip.vue.d.ts +3 -1
- package/dist/temp-types/src/components/CTooltip/CTooltip.vue.d.ts.map +1 -1
- package/dist/temp-types/src/components/CTooltip/index.d.ts +7 -1
- package/dist/temp-types/src/components/CTooltip/index.d.ts.map +1 -1
- package/dist/temp-types/src/components/index.d.ts +17 -15
- package/dist/temp-types/src/components/index.d.ts.map +1 -1
- package/dist/temp-types/src/composables/index.d.ts +22 -14
- package/dist/temp-types/src/composables/index.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-activator.d.ts +4 -2
- package/dist/temp-types/src/composables/use-activator.d.ts.map +1 -1
- package/dist/temp-types/src/composables/{use-app-scroll.d.ts → use-application-scroll.d.ts} +2 -2
- package/dist/temp-types/src/composables/use-application-scroll.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-application.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-aria-activator.d.ts +8 -0
- package/dist/temp-types/src/composables/use-aria-activator.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-aria-dialog.d.ts +9 -0
- package/dist/temp-types/src/composables/use-aria-dialog.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-aria-field.d.ts +13 -0
- package/dist/temp-types/src/composables/use-aria-field.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-aria-listbox.d.ts +8 -0
- package/dist/temp-types/src/composables/use-aria-listbox.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-aria-toggle.d.ts +11 -0
- package/dist/temp-types/src/composables/use-aria-toggle.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-auto-position.d.ts +12 -9
- package/dist/temp-types/src/composables/use-auto-position.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-autocomplete.d.ts +9 -4
- package/dist/temp-types/src/composables/use-autocomplete.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-breakpoints.d.ts +1 -0
- package/dist/temp-types/src/composables/use-breakpoints.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-button-presets.d.ts +2 -2
- package/dist/temp-types/src/composables/use-button-presets.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-core.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-delay-actions.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-dialogs-stack.d.ts +3 -3
- package/dist/temp-types/src/composables/use-dialogs-stack.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-display.d.ts +29 -55
- package/dist/temp-types/src/composables/use-display.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-effect.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-field-presets.d.ts +12 -0
- package/dist/temp-types/src/composables/use-field-presets.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-form.d.ts +1 -1
- package/dist/temp-types/src/composables/use-form.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-icon.d.ts +32 -4
- package/dist/temp-types/src/composables/use-icon.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-id.d.ts +6 -0
- package/dist/temp-types/src/composables/use-id.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-input-presets.d.ts +6 -7
- package/dist/temp-types/src/composables/use-input-presets.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-keyboard.d.ts +11 -0
- package/dist/temp-types/src/composables/use-keyboard.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-list.d.ts +3 -0
- package/dist/temp-types/src/composables/use-list.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-menu.d.ts +2 -0
- package/dist/temp-types/src/composables/use-menu.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-normalized-items.d.ts +18 -0
- package/dist/temp-types/src/composables/use-normalized-items.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-overlay-stack.d.ts +1 -0
- package/dist/temp-types/src/composables/use-overlay-stack.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-presets.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-select-control.d.ts +2 -0
- package/dist/temp-types/src/composables/use-select-control.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-selected-chips.d.ts +16 -0
- package/dist/temp-types/src/composables/use-selected-chips.d.ts.map +1 -0
- package/dist/temp-types/src/composables/use-toggle.d.ts +1 -1
- package/dist/temp-types/src/composables/use-toggle.d.ts.map +1 -1
- package/dist/temp-types/src/composables/use-validate.d.ts +10 -8
- package/dist/temp-types/src/composables/use-validate.d.ts.map +1 -1
- package/dist/temp-types/src/constants/aria.d.ts +35 -0
- package/dist/temp-types/src/constants/aria.d.ts.map +1 -0
- package/dist/temp-types/src/constants/attrs.d.ts +2 -0
- package/dist/temp-types/src/constants/attrs.d.ts.map +1 -0
- package/dist/temp-types/src/constants/icons.d.ts +91 -18
- package/dist/temp-types/src/constants/icons.d.ts.map +1 -1
- package/dist/temp-types/src/constants/index.d.ts +3 -1
- package/dist/temp-types/src/constants/index.d.ts.map +1 -1
- package/dist/temp-types/src/constants/provide-keys.d.ts +7 -6
- package/dist/temp-types/src/constants/provide-keys.d.ts.map +1 -1
- package/dist/temp-types/src/directives/v-click-outside.d.ts.map +1 -1
- package/dist/temp-types/src/enums/IconName.d.ts +15 -2
- package/dist/temp-types/src/enums/IconName.d.ts.map +1 -1
- package/dist/temp-types/src/helpers/index.d.ts +2 -0
- package/dist/temp-types/src/helpers/index.d.ts.map +1 -1
- package/dist/temp-types/src/helpers/preset.d.ts +8 -0
- package/dist/temp-types/src/helpers/preset.d.ts.map +1 -0
- package/dist/temp-types/src/helpers/theme.d.ts +4 -0
- package/dist/temp-types/src/helpers/theme.d.ts.map +1 -0
- package/dist/temp-types/src/index.d.ts.map +1 -1
- package/dist/temp-types/src/library.d.ts +10 -3
- package/dist/temp-types/src/library.d.ts.map +1 -1
- package/dist/temp-types/src/resolvers/font-awesome.d.ts +18 -0
- package/dist/temp-types/src/resolvers/font-awesome.d.ts.map +1 -0
- package/dist/temp-types/src/resolvers/index.d.ts +2 -0
- package/dist/temp-types/src/resolvers/index.d.ts.map +1 -0
- package/dist/temp-types/src/resolvers/material.d.ts +1 -0
- package/dist/temp-types/src/resolvers/material.d.ts.map +1 -0
- package/dist/temp-types/src/types/icons.d.ts +29 -0
- package/dist/temp-types/src/types/icons.d.ts.map +1 -0
- package/dist/temp-types/src/types/index.d.ts +4 -2
- package/dist/temp-types/src/types/index.d.ts.map +1 -1
- package/dist/temp-types/src/types/presets.d.ts +35 -47
- package/dist/temp-types/src/types/presets.d.ts.map +1 -1
- package/dist/temp-types/src/types/theme.d.ts +32 -0
- package/dist/temp-types/src/types/theme.d.ts.map +1 -0
- package/dist/temp-types/src/utils/aria.d.ts +36 -0
- package/dist/temp-types/src/utils/aria.d.ts.map +1 -0
- package/dist/temp-types/src/utils/compile-css-classes.d.ts.map +1 -1
- package/dist/temp-types/src/utils/create-simple-functional.d.ts.map +1 -1
- package/dist/temp-types/src/utils/index.d.ts +3 -2
- package/dist/temp-types/src/utils/index.d.ts.map +1 -1
- package/dist/temp-types/src/utils/throttle.d.ts.map +1 -1
- package/dist/temp-types/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +125 -0
- package/dist/types.d.ts +137 -72
- package/dist/utils/aria.js +95 -0
- package/dist/utils/compile-css-classes.js +3 -13
- package/dist/utils/create-simple-functional.js +1 -5
- package/dist/utils/index.d.ts +48 -10
- package/dist/utils/index.js +3 -2
- package/package.json +35 -9
- package/dist/components/CItems/CItems.js +0 -66
- package/dist/composables/use-field-attrs.js +0 -43
- package/dist/composables/use-input-state.js +0 -41
- package/dist/composables/use-input-value.js +0 -18
- package/dist/composables/use-menu-presets.js +0 -17
- package/dist/composables/use-position-classes.js +0 -12
- package/dist/css/themes/default-theme.css +0 -1
- package/dist/temp-types/src/components/CItems/CItems.d.ts +0 -16
- package/dist/temp-types/src/components/CItems/CItems.d.ts.map +0 -1
- package/dist/temp-types/src/components/CItems/index.d.ts +0 -2
- package/dist/temp-types/src/components/CItems/index.d.ts.map +0 -1
- package/dist/temp-types/src/composables/use-app-scroll.d.ts.map +0 -1
- package/dist/temp-types/src/composables/use-field-attrs.d.ts +0 -10
- package/dist/temp-types/src/composables/use-field-attrs.d.ts.map +0 -1
- package/dist/temp-types/src/composables/use-input-state.d.ts +0 -17
- package/dist/temp-types/src/composables/use-input-state.d.ts.map +0 -1
- package/dist/temp-types/src/composables/use-input-value.d.ts +0 -3
- package/dist/temp-types/src/composables/use-input-value.d.ts.map +0 -1
- package/dist/temp-types/src/composables/use-menu-presets.d.ts +0 -7
- package/dist/temp-types/src/composables/use-menu-presets.d.ts.map +0 -1
- package/dist/temp-types/src/composables/use-position-classes.d.ts +0 -10
- package/dist/temp-types/src/composables/use-position-classes.d.ts.map +0 -1
- package/dist/temp-types/src/utils/define-preset.d.ts +0 -2
- package/dist/temp-types/src/utils/define-preset.d.ts.map +0 -1
- /package/dist/css/{themes/default-theme.js → lib.js} +0 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,41 +1,60 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference path="./components/global-components.d.ts" />
|
|
2
|
+
import { Component, ComponentInstance, FunctionalComponent, Directive, Plugin } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare enum BreakpointLabels {
|
|
5
|
+
XS = "xs",
|
|
6
|
+
SM = "sm",
|
|
7
|
+
MD = "md",
|
|
8
|
+
LG = "lg",
|
|
9
|
+
XL = "xl",
|
|
10
|
+
XXL = "xxl"
|
|
11
|
+
}
|
|
2
12
|
|
|
3
13
|
declare enum IconAliases {
|
|
4
14
|
DROPDOWN = "dropdown",
|
|
5
15
|
CHECKBOX_ON = "checkboxOn",
|
|
6
16
|
CHECKBOX_OFF = "checkboxOff",
|
|
7
|
-
CALENDAR = "calendar"
|
|
17
|
+
CALENDAR = "calendar",
|
|
18
|
+
CHEVRON_LEFT = "chevronLeft",
|
|
19
|
+
CHEVRON_RIGHT = "chevronRight",
|
|
20
|
+
RADIO_ON = "radioOn",
|
|
21
|
+
RADIO_OFF = "radioOff",
|
|
22
|
+
CLOSE = "close"
|
|
8
23
|
}
|
|
9
24
|
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
presets?: Record<string, Record<string, any>>;
|
|
20
|
-
ssr?: boolean;
|
|
25
|
+
type IconMode = 'lib' | 'sprite' | 'component' | 'raw' | string;
|
|
26
|
+
interface UseIconOptions {
|
|
27
|
+
name?: string | number;
|
|
28
|
+
source?: IconMode;
|
|
29
|
+
component?: Component | null;
|
|
30
|
+
body?: string;
|
|
31
|
+
viewBox?: string;
|
|
32
|
+
spritePrefix?: string;
|
|
33
|
+
spritePath?: string;
|
|
21
34
|
}
|
|
35
|
+
type IconResolverResult = {
|
|
36
|
+
kind: 'svg';
|
|
37
|
+
body: string;
|
|
38
|
+
viewBox?: string;
|
|
39
|
+
} | {
|
|
40
|
+
kind: 'font';
|
|
41
|
+
className: string;
|
|
42
|
+
text?: string;
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'component';
|
|
45
|
+
component: Component;
|
|
46
|
+
} | {
|
|
47
|
+
kind: 'sprite';
|
|
48
|
+
href: string;
|
|
49
|
+
viewBox?: string;
|
|
50
|
+
} | null | undefined;
|
|
51
|
+
type IconResolver = (name: string | number, options: UseIconOptions) => IconResolverResult;
|
|
22
52
|
|
|
23
|
-
type
|
|
24
|
-
|
|
25
|
-
interface DimensionsProps {
|
|
26
|
-
width?: number | string;
|
|
27
|
-
height?: number | string;
|
|
28
|
-
minWidth?: number | string;
|
|
29
|
-
maxWidth?: number | string;
|
|
30
|
-
minHeight?: number | string;
|
|
31
|
-
maxHeight?: number | string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
type ButtonPreset = {
|
|
53
|
+
type CButtonPreset = {
|
|
35
54
|
root?: string[];
|
|
36
55
|
label?: string[];
|
|
37
56
|
};
|
|
38
|
-
type
|
|
57
|
+
type CMenuPreset = {
|
|
39
58
|
root?: string[];
|
|
40
59
|
opened?: {
|
|
41
60
|
root?: string[];
|
|
@@ -44,58 +63,104 @@ type MenuPreset = {
|
|
|
44
63
|
root?: string[];
|
|
45
64
|
};
|
|
46
65
|
};
|
|
47
|
-
type
|
|
66
|
+
type CFieldZone = {
|
|
48
67
|
root?: string[];
|
|
49
|
-
field?: string[];
|
|
50
68
|
input?: string[];
|
|
51
69
|
label?: string[];
|
|
70
|
+
};
|
|
71
|
+
type CFieldCompoundState = CFieldZone & {
|
|
72
|
+
focused?: CFieldZone;
|
|
73
|
+
filled?: CFieldZone;
|
|
74
|
+
};
|
|
75
|
+
type CFieldPreset = CFieldZone & {
|
|
76
|
+
focused?: CFieldZone;
|
|
77
|
+
filled?: CFieldZone;
|
|
78
|
+
error?: CFieldCompoundState;
|
|
79
|
+
disabled?: CFieldCompoundState;
|
|
80
|
+
readonly?: CFieldCompoundState;
|
|
81
|
+
prepended?: CFieldZone;
|
|
82
|
+
appended?: CFieldZone;
|
|
83
|
+
};
|
|
84
|
+
type CInputZone = {
|
|
85
|
+
root?: string[];
|
|
86
|
+
label?: string[];
|
|
87
|
+
input?: string[];
|
|
52
88
|
details?: string[];
|
|
53
|
-
prepend?: string[];
|
|
54
|
-
append?: string[];
|
|
55
|
-
focused?: {
|
|
56
|
-
root?: string[];
|
|
57
|
-
field?: string[];
|
|
58
|
-
label?: string[];
|
|
59
|
-
append?: string[];
|
|
60
|
-
};
|
|
61
|
-
error?: {
|
|
62
|
-
root?: string[];
|
|
63
|
-
field?: string[];
|
|
64
|
-
label?: string[];
|
|
65
|
-
input?: string[];
|
|
66
|
-
details?: string[];
|
|
67
|
-
};
|
|
68
|
-
disabled?: {
|
|
69
|
-
root?: string[];
|
|
70
|
-
field?: string[];
|
|
71
|
-
input?: string[];
|
|
72
|
-
label?: string[];
|
|
73
|
-
};
|
|
74
|
-
readonly?: {
|
|
75
|
-
root?: string[];
|
|
76
|
-
field?: string[];
|
|
77
|
-
input?: string[];
|
|
78
|
-
};
|
|
79
|
-
hasValue?: {
|
|
80
|
-
root?: string[];
|
|
81
|
-
label?: string[];
|
|
82
|
-
};
|
|
83
|
-
hasPrepend?: {
|
|
84
|
-
root?: string[];
|
|
85
|
-
field?: string[];
|
|
86
|
-
input?: string[];
|
|
87
|
-
label?: string[];
|
|
88
|
-
prepend?: string[];
|
|
89
|
-
};
|
|
90
|
-
hasAppend?: {
|
|
91
|
-
root?: string[];
|
|
92
|
-
field?: string[];
|
|
93
|
-
input?: string[];
|
|
94
|
-
append?: string[];
|
|
95
|
-
};
|
|
96
89
|
};
|
|
90
|
+
type CInputCompoundState = CInputZone & {
|
|
91
|
+
focused?: CInputZone;
|
|
92
|
+
filled?: CInputZone;
|
|
93
|
+
};
|
|
94
|
+
type CInputPreset = CInputZone & {
|
|
95
|
+
focused?: CInputZone;
|
|
96
|
+
filled?: CInputZone;
|
|
97
|
+
error?: CInputCompoundState;
|
|
98
|
+
disabled?: CInputCompoundState;
|
|
99
|
+
readonly?: CInputCompoundState;
|
|
100
|
+
prepended?: CInputZone;
|
|
101
|
+
appended?: CInputZone;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
interface DimensionsProps {
|
|
105
|
+
width?: number | string;
|
|
106
|
+
height?: number | string;
|
|
107
|
+
minWidth?: number | string;
|
|
108
|
+
maxWidth?: number | string;
|
|
109
|
+
minHeight?: number | string;
|
|
110
|
+
maxHeight?: number | string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type ThemeDefinition = {
|
|
114
|
+
primary?: string;
|
|
115
|
+
onPrimary?: string;
|
|
116
|
+
secondary?: string;
|
|
117
|
+
success?: string;
|
|
118
|
+
error?: string;
|
|
119
|
+
warning?: string;
|
|
120
|
+
info?: string;
|
|
121
|
+
accent?: string;
|
|
122
|
+
background?: string;
|
|
123
|
+
surface?: string;
|
|
124
|
+
surfaceVariant?: string;
|
|
125
|
+
onSurface?: string;
|
|
126
|
+
text?: string;
|
|
127
|
+
textSecondary?: string;
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
disabled?: string;
|
|
130
|
+
disabledBg?: string;
|
|
131
|
+
disabledOpacity?: string;
|
|
132
|
+
readonly?: string;
|
|
133
|
+
readonlyBg?: string;
|
|
134
|
+
focus?: string;
|
|
135
|
+
errorBg?: string;
|
|
136
|
+
hover?: string;
|
|
137
|
+
overlay?: string;
|
|
138
|
+
shadow?: string;
|
|
139
|
+
border?: string;
|
|
140
|
+
radius?: string;
|
|
141
|
+
[key: string]: string | undefined;
|
|
142
|
+
};
|
|
143
|
+
type ThemesOptions = Record<string, ThemeDefinition>;
|
|
144
|
+
|
|
145
|
+
type Maybe<T> = T | undefined;
|
|
146
|
+
|
|
147
|
+
type IconsOptions = {
|
|
148
|
+
dir?: string;
|
|
149
|
+
aliases?: Partial<Record<IconAliases, any>>;
|
|
150
|
+
sets?: Record<string, any>;
|
|
151
|
+
};
|
|
152
|
+
interface LibOptions {
|
|
153
|
+
components: Record<string, ComponentInstance<any> | FunctionalComponent>;
|
|
154
|
+
directives?: Record<string, Directive>;
|
|
155
|
+
themes?: ThemesOptions;
|
|
156
|
+
breakpoints?: Record<BreakpointLabels, number>;
|
|
157
|
+
icons?: IconsOptions;
|
|
158
|
+
presets?: Record<string, Record<string, any>>;
|
|
159
|
+
theme?: string;
|
|
160
|
+
ssr?: boolean;
|
|
161
|
+
}
|
|
97
162
|
|
|
98
163
|
declare function createVuelandUI(options: LibOptions): Plugin;
|
|
99
164
|
|
|
100
165
|
export { createVuelandUI };
|
|
101
|
-
export type {
|
|
166
|
+
export type { CButtonPreset, CFieldPreset, CFieldZone, CInputPreset, CMenuPreset, DimensionsProps, IconMode, IconResolver, IconResolverResult, Maybe, ThemeDefinition, ThemesOptions, UseIconOptions };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ARIA } from '../constants/aria.js';
|
|
2
|
+
|
|
3
|
+
function attr(key, value) {
|
|
4
|
+
if (value === void 0) return {};
|
|
5
|
+
return { [key]: `${value}` };
|
|
6
|
+
}
|
|
7
|
+
function ariaExpanded(value) {
|
|
8
|
+
return attr(ARIA.EXPANDED, value);
|
|
9
|
+
}
|
|
10
|
+
function ariaHaspopup(value = true) {
|
|
11
|
+
return attr(ARIA.HASPOPUP, value);
|
|
12
|
+
}
|
|
13
|
+
function ariaControls(id) {
|
|
14
|
+
return attr(ARIA.CONTROLS, id);
|
|
15
|
+
}
|
|
16
|
+
function ariaLabel(value) {
|
|
17
|
+
return attr(ARIA.LABEL, value);
|
|
18
|
+
}
|
|
19
|
+
function ariaLabelledBy(id) {
|
|
20
|
+
return attr(ARIA.LABELLEDBY, id);
|
|
21
|
+
}
|
|
22
|
+
function ariaDescribedBy(id) {
|
|
23
|
+
return attr(ARIA.DESCRIBEDBY, id);
|
|
24
|
+
}
|
|
25
|
+
function ariaErrorMessage(id) {
|
|
26
|
+
return attr(ARIA.ERRORMESSAGE, id);
|
|
27
|
+
}
|
|
28
|
+
function ariaHidden(value) {
|
|
29
|
+
return attr(ARIA.HIDDEN, value);
|
|
30
|
+
}
|
|
31
|
+
function ariaDisabled(value) {
|
|
32
|
+
if (!value) return {};
|
|
33
|
+
return attr(ARIA.DISABLED, true);
|
|
34
|
+
}
|
|
35
|
+
function ariaInvalid(value) {
|
|
36
|
+
if (!value) return {};
|
|
37
|
+
return attr(ARIA.INVALID, true);
|
|
38
|
+
}
|
|
39
|
+
function ariaReadonly(value) {
|
|
40
|
+
if (!value) return {};
|
|
41
|
+
return attr(ARIA.READONLY, true);
|
|
42
|
+
}
|
|
43
|
+
function ariaRequired(value) {
|
|
44
|
+
if (!value) return {};
|
|
45
|
+
return attr(ARIA.REQUIRED, true);
|
|
46
|
+
}
|
|
47
|
+
function ariaSelected(value) {
|
|
48
|
+
return attr(ARIA.SELECTED, value);
|
|
49
|
+
}
|
|
50
|
+
function ariaMultiselectable(value) {
|
|
51
|
+
if (!value) return {};
|
|
52
|
+
return attr(ARIA.MULTISELECTABLE, true);
|
|
53
|
+
}
|
|
54
|
+
function ariaLive(value) {
|
|
55
|
+
return attr(ARIA.LIVE, value);
|
|
56
|
+
}
|
|
57
|
+
function ariaCurrent(value) {
|
|
58
|
+
if (!value) return {};
|
|
59
|
+
return attr(ARIA.CURRENT, value);
|
|
60
|
+
}
|
|
61
|
+
function ariaPressed(value) {
|
|
62
|
+
return attr(ARIA.PRESSED, value);
|
|
63
|
+
}
|
|
64
|
+
function ariaChecked(value) {
|
|
65
|
+
return attr(ARIA.CHECKED, value);
|
|
66
|
+
}
|
|
67
|
+
function ariaValue(opts) {
|
|
68
|
+
return {
|
|
69
|
+
...attr(ARIA.VALUENOW, opts.now !== void 0 ? String(opts.now) : void 0),
|
|
70
|
+
...attr(ARIA.VALUEMIN, opts.min !== void 0 ? String(opts.min) : void 0),
|
|
71
|
+
...attr(ARIA.VALUEMAX, opts.max !== void 0 ? String(opts.max) : void 0),
|
|
72
|
+
...attr(ARIA.VALUETEXT, opts.text)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function ariaModal(value = true) {
|
|
76
|
+
return attr(ARIA.MODAL, value);
|
|
77
|
+
}
|
|
78
|
+
function ariaActiveDescendant(id) {
|
|
79
|
+
return attr(ARIA.ACTIVEDESCENDANT, id);
|
|
80
|
+
}
|
|
81
|
+
function ariaAutocomplete(value) {
|
|
82
|
+
return attr(ARIA.AUTOCOMPLETE, value);
|
|
83
|
+
}
|
|
84
|
+
function ariaOrientation(value) {
|
|
85
|
+
return attr(ARIA.ORIENTATION, value);
|
|
86
|
+
}
|
|
87
|
+
function ariaExpandable(expanded, opts = {}) {
|
|
88
|
+
return {
|
|
89
|
+
...ariaExpanded(expanded),
|
|
90
|
+
...opts.haspopup !== void 0 ? ariaHaspopup(opts.haspopup) : {},
|
|
91
|
+
...ariaControls(opts.controls)
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { ariaActiveDescendant, ariaAutocomplete, ariaChecked, ariaControls, ariaCurrent, ariaDescribedBy, ariaDisabled, ariaErrorMessage, ariaExpandable, ariaExpanded, ariaHaspopup, ariaHidden, ariaInvalid, ariaLabel, ariaLabelledBy, ariaLive, ariaModal, ariaMultiselectable, ariaOrientation, ariaPressed, ariaReadonly, ariaRequired, ariaSelected, ariaValue };
|
|
@@ -161,20 +161,13 @@ const plainColorUtilsProcessor = {
|
|
|
161
161
|
const className = escapeClassName(meta.cleanName);
|
|
162
162
|
const value = resolveCssValue(entry.value, meta.kind, ctx.options.colorKinds);
|
|
163
163
|
chunks.push(
|
|
164
|
-
formatRule(
|
|
165
|
-
`.${className}`,
|
|
166
|
-
[createDecl(meta.property, value)],
|
|
167
|
-
ctx.options.minify
|
|
168
|
-
)
|
|
164
|
+
formatRule(`.${className}`, [createDecl(meta.property, value)], ctx.options.minify)
|
|
169
165
|
);
|
|
170
166
|
if (ctx.options.generateStates.hover && (meta.kind === "bg" || meta.kind === "clr")) {
|
|
171
167
|
chunks.push(
|
|
172
168
|
formatRule(
|
|
173
169
|
`.hover\\:${className}:hover`,
|
|
174
|
-
[
|
|
175
|
-
createDecl(meta.property, value),
|
|
176
|
-
createTransitionDecl(meta.property)
|
|
177
|
-
],
|
|
170
|
+
[createDecl(meta.property, value), createTransitionDecl(meta.property)],
|
|
178
171
|
ctx.options.minify
|
|
179
172
|
)
|
|
180
173
|
);
|
|
@@ -183,10 +176,7 @@ const plainColorUtilsProcessor = {
|
|
|
183
176
|
chunks.push(
|
|
184
177
|
formatRule(
|
|
185
178
|
`.active\\:${className}:active`,
|
|
186
|
-
[
|
|
187
|
-
createDecl(meta.property, value),
|
|
188
|
-
createTransitionDecl(meta.property)
|
|
189
|
-
],
|
|
179
|
+
[createDecl(meta.property, value), createTransitionDecl(meta.property)],
|
|
190
180
|
ctx.options.minify
|
|
191
181
|
)
|
|
192
182
|
);
|
|
@@ -5,11 +5,7 @@ const createSimpleInstance = (c, el = "div", name = "") => {
|
|
|
5
5
|
return defineComponent({
|
|
6
6
|
name: _name,
|
|
7
7
|
setup(_, { slots }) {
|
|
8
|
-
const propsData = {
|
|
9
|
-
class: {
|
|
10
|
-
[c.trim()]: true
|
|
11
|
-
}
|
|
12
|
-
};
|
|
8
|
+
const propsData = { class: { [c.trim()]: true } };
|
|
13
9
|
return () => h(el, propsData, slots.default && slots.default());
|
|
14
10
|
}
|
|
15
11
|
});
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,16 +1,43 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { FunctionalComponent } from 'vue';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const createSimpleInstance: (c: string, el?: string, name?: string) => vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
11
|
-
declare function createFunctionalComponent(cls: string, tag?: string): FunctionalComponent;
|
|
4
|
+
type AriaHaspopup = 'true' | 'false' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
5
|
+
type AriaLive = 'off' | 'polite' | 'assertive';
|
|
6
|
+
type AriaCurrent = 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
|
12
7
|
|
|
13
|
-
|
|
8
|
+
type AriaAttrs = Partial<Record<string, string>>;
|
|
9
|
+
declare function ariaExpanded(value: boolean): AriaAttrs;
|
|
10
|
+
declare function ariaHaspopup(value?: AriaHaspopup | boolean): AriaAttrs;
|
|
11
|
+
declare function ariaControls(id: string | undefined): AriaAttrs;
|
|
12
|
+
declare function ariaLabel(value: string | undefined): AriaAttrs;
|
|
13
|
+
declare function ariaLabelledBy(id: string | undefined): AriaAttrs;
|
|
14
|
+
declare function ariaDescribedBy(id: string | undefined): AriaAttrs;
|
|
15
|
+
declare function ariaErrorMessage(id: string | undefined): AriaAttrs;
|
|
16
|
+
declare function ariaHidden(value: boolean): AriaAttrs;
|
|
17
|
+
declare function ariaDisabled(value: boolean | undefined): AriaAttrs;
|
|
18
|
+
declare function ariaInvalid(value: boolean | undefined): AriaAttrs;
|
|
19
|
+
declare function ariaReadonly(value: boolean | undefined): AriaAttrs;
|
|
20
|
+
declare function ariaRequired(value: boolean | undefined): AriaAttrs;
|
|
21
|
+
declare function ariaSelected(value: boolean | undefined): AriaAttrs;
|
|
22
|
+
declare function ariaMultiselectable(value: boolean | undefined): AriaAttrs;
|
|
23
|
+
declare function ariaLive(value: AriaLive): AriaAttrs;
|
|
24
|
+
declare function ariaCurrent(value: AriaCurrent | boolean | undefined): AriaAttrs;
|
|
25
|
+
declare function ariaPressed(value: boolean | undefined): AriaAttrs;
|
|
26
|
+
declare function ariaChecked(value: boolean | 'mixed' | undefined): AriaAttrs;
|
|
27
|
+
declare function ariaValue(opts: {
|
|
28
|
+
now?: number;
|
|
29
|
+
min?: number;
|
|
30
|
+
max?: number;
|
|
31
|
+
text?: string;
|
|
32
|
+
}): AriaAttrs;
|
|
33
|
+
declare function ariaModal(value?: boolean): AriaAttrs;
|
|
34
|
+
declare function ariaActiveDescendant(id: string | undefined): AriaAttrs;
|
|
35
|
+
declare function ariaAutocomplete(value: 'none' | 'inline' | 'list' | 'both'): AriaAttrs;
|
|
36
|
+
declare function ariaOrientation(value: 'horizontal' | 'vertical'): AriaAttrs;
|
|
37
|
+
declare function ariaExpandable(expanded: boolean, opts?: {
|
|
38
|
+
haspopup?: AriaHaspopup | boolean;
|
|
39
|
+
controls?: string;
|
|
40
|
+
}): AriaAttrs;
|
|
14
41
|
|
|
15
42
|
type ThemeTokensInput = Record<string, string> | string[];
|
|
16
43
|
type PropertyMap = Record<string, string>;
|
|
@@ -27,4 +54,15 @@ interface CompileThemeCssOptions {
|
|
|
27
54
|
}
|
|
28
55
|
declare function compileCssClasses(input: ThemeTokensInput, options?: CompileThemeCssOptions): string;
|
|
29
56
|
|
|
30
|
-
|
|
57
|
+
declare function convertToUnit(str: string | number, unit?: string): string;
|
|
58
|
+
|
|
59
|
+
declare const createSimpleInstance: (c: string, el?: string, name?: string) => vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
62
|
+
declare function createFunctionalComponent(cls: string, tag?: string): FunctionalComponent;
|
|
63
|
+
|
|
64
|
+
declare const IN_BROWSER: boolean;
|
|
65
|
+
|
|
66
|
+
declare function throttle<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
|
|
67
|
+
|
|
68
|
+
export { IN_BROWSER, ariaActiveDescendant, ariaAutocomplete, ariaChecked, ariaControls, ariaCurrent, ariaDescribedBy, ariaDisabled, ariaErrorMessage, ariaExpandable, ariaExpanded, ariaHaspopup, ariaHidden, ariaInvalid, ariaLabel, ariaLabelledBy, ariaLive, ariaModal, ariaMultiselectable, ariaOrientation, ariaPressed, ariaReadonly, ariaRequired, ariaSelected, ariaValue, compileCssClasses, convertToUnit, createFunctionalComponent, createSimpleInstance, throttle };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ariaActiveDescendant, ariaAutocomplete, ariaChecked, ariaControls, ariaCurrent, ariaDescribedBy, ariaDisabled, ariaErrorMessage, ariaExpandable, ariaExpanded, ariaHaspopup, ariaHidden, ariaInvalid, ariaLabel, ariaLabelledBy, ariaLive, ariaModal, ariaMultiselectable, ariaOrientation, ariaPressed, ariaReadonly, ariaRequired, ariaSelected, ariaValue } from './aria.js';
|
|
2
|
+
export { compileCssClasses } from './compile-css-classes.js';
|
|
2
3
|
export { convertToUnit } from './convert-to-unit.js';
|
|
3
4
|
export { createFunctionalComponent, createSimpleInstance } from './create-simple-functional.js';
|
|
4
5
|
export { IN_BROWSER } from './globals.js';
|
|
5
|
-
export {
|
|
6
|
+
export { throttle } from './throttle.js';
|
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueland/ui",
|
|
3
3
|
"description": "Vue 3 component library for the Vueland platform",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"private": false,
|
|
6
|
+
"license": "MIT",
|
|
6
7
|
"type": "module",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Anar Allakhverdiev",
|
|
10
|
+
"url": "https://github.com/wiseadme"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/vueland/vueland.git",
|
|
15
|
+
"directory": "/"
|
|
16
|
+
},
|
|
7
17
|
"sideEffects": [
|
|
8
18
|
"**/*.scss",
|
|
9
19
|
"**/*.css"
|
|
@@ -20,8 +30,6 @@
|
|
|
20
30
|
"import": "./dist/index.js",
|
|
21
31
|
"require": "./dist/index.js"
|
|
22
32
|
},
|
|
23
|
-
"./styles.css": "./dist/styles.css",
|
|
24
|
-
"./css/utils/*": "./dist/css/utils/*",
|
|
25
33
|
"./components": {
|
|
26
34
|
"types": "./dist/components/index.d.ts",
|
|
27
35
|
"import": "./dist/components/index.js",
|
|
@@ -37,6 +45,11 @@
|
|
|
37
45
|
"import": "./dist/directives/index.js",
|
|
38
46
|
"require": "./dist/directives/index.js"
|
|
39
47
|
},
|
|
48
|
+
"./resolvers": {
|
|
49
|
+
"types": "./dist/resolvers/index.d.ts",
|
|
50
|
+
"import": "./dist/resolvers/index.js",
|
|
51
|
+
"require": "./dist/resolvers/index.js"
|
|
52
|
+
},
|
|
40
53
|
"./constants": {
|
|
41
54
|
"types": "./dist/constants/index.d.ts",
|
|
42
55
|
"import": "./dist/constants/index.js",
|
|
@@ -52,11 +65,23 @@
|
|
|
52
65
|
"import": "./dist/utils/index.js",
|
|
53
66
|
"require": "./dist/utils/index.js"
|
|
54
67
|
},
|
|
55
|
-
"./
|
|
68
|
+
"./types": {
|
|
69
|
+
"types": "./dist/types/index.d.ts",
|
|
70
|
+
"import": "./dist/types/index.d.ts"
|
|
71
|
+
},
|
|
72
|
+
"./css/lib.css": "./dist/css/lib.css",
|
|
73
|
+
"./styles.css": "./dist/styles.css",
|
|
74
|
+
"./css/utils/*": "./dist/css/utils/*",
|
|
75
|
+
"./styles/scss/styles.scss": "./dist/scss/styles.scss",
|
|
76
|
+
"./styles/scss/lib.scss": "./dist/scss/lib.scss"
|
|
56
77
|
},
|
|
57
78
|
"peerDependencies": {
|
|
58
79
|
"vue": "^3.5.27"
|
|
59
80
|
},
|
|
81
|
+
"engines": {
|
|
82
|
+
"node": ">=20.19.0",
|
|
83
|
+
"pnpm": ">=10"
|
|
84
|
+
},
|
|
60
85
|
"devDependencies": {
|
|
61
86
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
62
87
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -64,6 +89,7 @@
|
|
|
64
89
|
"@rollup/plugin-replace": "^6.0.2",
|
|
65
90
|
"@rollup/plugin-terser": "^0.4.4",
|
|
66
91
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
92
|
+
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
67
93
|
"@vitest/coverage-v8": "^4.0.18",
|
|
68
94
|
"@vue/compiler-sfc": "^3.5.27",
|
|
69
95
|
"@vue/test-utils": "^2.4.6",
|
|
@@ -84,17 +110,17 @@
|
|
|
84
110
|
},
|
|
85
111
|
"scripts": {
|
|
86
112
|
"clean": "rimraf dist",
|
|
87
|
-
"build": "pnpm run clean && pnpm run build:js && pnpm run build:types",
|
|
88
|
-
"build:deploy": "pnpm run build:types && rollup -c ./build/rollup.config.mjs && pnpm run copy:all && pnpm run types:clean",
|
|
89
|
-
"copy:all": "node ./build/copy-dts.mjs && node ./build/insert-ref.mjs",
|
|
113
|
+
"build": "pnpm run clean && pnpm run build:js && pnpm run build:types && pnpm run build:scss",
|
|
90
114
|
"build:js": "rollup -c ./build/rollup.config.mjs",
|
|
91
|
-
"build
|
|
115
|
+
"build:scss": "node ./build/copy-scss.mjs",
|
|
116
|
+
"build-lib": "pnpm run build:types && rollup -c ./build/rollup.config.mjs && pnpm run gen:globals && node ./build/insert-ref.mjs && pnpm run build:scss",
|
|
92
117
|
"build:types": "vue-tsc -p tsconfig.build.json --declaration --emitDeclarationOnly",
|
|
93
118
|
"test:lib": "vitest run -c vitest.config.ts",
|
|
94
119
|
"test:deploy": "vitest run -c vitest.config.ts",
|
|
95
120
|
"test:watch": "vitest -c vitest.config.ts",
|
|
96
121
|
"typecheck": "vue-tsc -p tsconfig.build.json --noEmit",
|
|
97
122
|
"types:clean": "rimraf dist/temp-types",
|
|
98
|
-
"lint:lib": "eslint ."
|
|
123
|
+
"lint:lib": "eslint .",
|
|
124
|
+
"gen:globals": "node ./build/generate-global-components.mjs"
|
|
99
125
|
}
|
|
100
126
|
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h } from 'vue';
|
|
2
|
-
import { CListItemTitle } from '../CList/index.js';
|
|
3
|
-
import _sfc_main from '../CList/CList.js';
|
|
4
|
-
import _sfc_main$1 from '../CList/CListItem.js';
|
|
5
|
-
|
|
6
|
-
const CItems = defineComponent({
|
|
7
|
-
name: "CItems",
|
|
8
|
-
inheritAttrs: false,
|
|
9
|
-
props: {
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: [Array, Object, String, Number],
|
|
12
|
-
default: () => []
|
|
13
|
-
},
|
|
14
|
-
options: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default: () => ({})
|
|
17
|
-
},
|
|
18
|
-
items: {
|
|
19
|
-
type: Array,
|
|
20
|
-
default: () => []
|
|
21
|
-
},
|
|
22
|
-
multiple: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
mandatory: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
emits: ["update:modelValue"],
|
|
32
|
-
slots: {},
|
|
33
|
-
setup(props, { emit, slots }) {
|
|
34
|
-
var _a;
|
|
35
|
-
const { extKey, noItemsMessage } = (_a = props.options) != null ? _a : {};
|
|
36
|
-
const genItemTitle = (value) => h(CListItemTitle, {}, {
|
|
37
|
-
default: () => value
|
|
38
|
-
});
|
|
39
|
-
const genItem = (item) => h(_sfc_main$1, {
|
|
40
|
-
value: item
|
|
41
|
-
}, {
|
|
42
|
-
default: () => [
|
|
43
|
-
genItemTitle(extKey ? item[extKey] : item)
|
|
44
|
-
]
|
|
45
|
-
});
|
|
46
|
-
const genEmptyMessage = () => h(_sfc_main$1, null, {
|
|
47
|
-
default: () => {
|
|
48
|
-
var _a2, _b;
|
|
49
|
-
return genItemTitle((_b = (_a2 = slots["no-items-message"]) == null ? void 0 : _a2.call(slots)) != null ? _b : noItemsMessage);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
return () => h(_sfc_main, {
|
|
53
|
-
modelValue: props.modelValue,
|
|
54
|
-
items: props.items,
|
|
55
|
-
multiple: props.multiple,
|
|
56
|
-
mandatory: props.mandatory,
|
|
57
|
-
["onUpdate:modelValue"]: (val) => {
|
|
58
|
-
emit("update:modelValue", val);
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
default: () => props.items.length ? props.items.map(genItem) : genEmptyMessage()
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
export { CItems };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
|
|
3
|
-
const FIELD_ATTRS = /* @__PURE__ */ new Set([
|
|
4
|
-
"type",
|
|
5
|
-
"name",
|
|
6
|
-
"id",
|
|
7
|
-
"placeholder",
|
|
8
|
-
"autocomplete",
|
|
9
|
-
"autofocus",
|
|
10
|
-
"inputmode",
|
|
11
|
-
"pattern",
|
|
12
|
-
"min",
|
|
13
|
-
"max",
|
|
14
|
-
"step",
|
|
15
|
-
"minlength",
|
|
16
|
-
"maxlength",
|
|
17
|
-
"readonly",
|
|
18
|
-
"disabled",
|
|
19
|
-
"required",
|
|
20
|
-
"tabindex",
|
|
21
|
-
"enterkeyhint"
|
|
22
|
-
]);
|
|
23
|
-
function useFieldAttrs({ props, attrs, errors, uid }) {
|
|
24
|
-
return computed(() => {
|
|
25
|
-
const map = Object.entries(attrs).reduce((acc, [k, v]) => {
|
|
26
|
-
if (!props[k] && FIELD_ATTRS.has(k) || k.startsWith("aria-") || k.startsWith("data-")) {
|
|
27
|
-
acc[k] = v;
|
|
28
|
-
}
|
|
29
|
-
return acc;
|
|
30
|
-
}, {});
|
|
31
|
-
return {
|
|
32
|
-
"aria-labelledby": `${uid}-label`,
|
|
33
|
-
...!props.noDetails ? { "aria-describedby": `${uid}-details` } : {},
|
|
34
|
-
...errors.hasError ? { "aria-invalid": errors.hasError } : {},
|
|
35
|
-
...errors.errorMessage ? { "aria-errormessage": errors.errorMessage } : {},
|
|
36
|
-
...props.readonly ? { "aria-readonly": props.readonly } : {},
|
|
37
|
-
...props.disabled ? { "aria-disabled": props.disabled } : {},
|
|
38
|
-
...map
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { useFieldAttrs };
|