vueless 0.0.476-0 → 0.0.476
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/composables/useBreakpoint.js +1 -1
- package/composables/useUI.js +1 -204
- package/constants.js +1 -2
- package/directives/clickOutside/vClickOutside.js +2 -2
- package/directives/tooltip/storybook/stories.js +5 -5
- package/{index.ts → index.js} +6 -9
- package/package.json +17 -28
- package/{preset.tailwind.ts → preset.tailwind.js} +22 -30
- package/ui.button/config.js +0 -12
- package/ui.button-link/ULink.vue +1 -1
- package/ui.button-link/config.js +0 -9
- package/ui.data-list/UDataList.vue +4 -4
- package/ui.dropdown-badge/config.js +0 -1
- package/ui.dropdown-button/config.js +0 -1
- package/ui.form-checkbox/config.js +0 -9
- package/ui.form-color-picker/config.js +0 -7
- package/ui.form-input/UInput.vue +1 -1
- package/ui.form-input-money/useFormatCurrency.js +1 -1
- package/ui.form-input-number/UInputNumber.vue +3 -4
- package/ui.form-label/config.js +2 -2
- package/ui.form-radio/config.js +0 -6
- package/ui.form-switch/config.js +0 -6
- package/ui.image-avatar/config.js +0 -5
- package/ui.image-icon/config.js +0 -5
- package/ui.loader/config.js +0 -1
- package/ui.loader-overlay/config.js +0 -1
- package/ui.loader-progress/config.js +0 -1
- package/ui.navigation-progress/config.js +0 -9
- package/ui.other-dot/config.js +0 -1
- package/ui.text-alert/config.js +0 -7
- package/ui.text-badge/config.js +0 -8
- package/ui.text-block/UText.vue +62 -18
- package/ui.text-block/storybook/Docs.mdx +2 -2
- package/ui.text-block/storybook/{stories.ts → stories.js} +7 -12
- package/ui.text-block/useAttrs.js +15 -0
- package/ui.text-file/UFile.vue +14 -12
- package/ui.text-file/config.js +2 -12
- package/ui.text-files/config.js +1 -1
- package/ui.text-header/config.js +0 -1
- package/ui.text-money/config.js +0 -1
- package/ui.text-money/utilMoney.js +2 -2
- package/{utilsTs/utilTheme.ts → utils/utilTheme.js} +27 -31
- package/utils/utilUI.js +204 -0
- package/web-types.json +120 -30
- package/adatper.locale/locales/en.d.ts +0 -289
- package/adatper.locale/vue-i18n.d.ts +0 -9
- package/adatper.locale/vueless.d.ts +0 -11
- package/composables/useAutoPosition.d.ts +0 -15
- package/composables/useBreakpoint.d.ts +0 -7
- package/composables/useLocale.d.ts +0 -3
- package/composables/useMutationObserver.d.ts +0 -7
- package/composables/useUI.d.ts +0 -17
- package/composablesTs/useAutoPosition.d.ts +0 -28
- package/composablesTs/useAutoPosition.ts +0 -115
- package/composablesTs/useBreakpoint.d.ts +0 -7
- package/composablesTs/useBreakpoint.ts +0 -106
- package/composablesTs/useLocale.d.ts +0 -3
- package/composablesTs/useLocale.ts +0 -25
- package/composablesTs/useMutationObserver.d.ts +0 -8
- package/composablesTs/useMutationObserver.ts +0 -50
- package/composablesTs/useUI.d.ts +0 -68
- package/composablesTs/useUI.ts +0 -566
- package/constants.d.ts +0 -42
- package/constants.ts +0 -73
- package/directives/clickOutside/storybook/stories.d.ts +0 -653
- package/directives/clickOutside/vClickOutside.d.ts +0 -6
- package/directives/index.d.ts +0 -2
- package/directives/tooltip/storybook/stories.d.ts +0 -252
- package/directives/tooltip/vTooltip.d.ts +0 -6
- package/index.d.ts +0 -15
- package/preset.tailwind.d.ts +0 -116
- package/types.d.ts +0 -131
- package/types.ts +0 -218
- package/ui.button/UButton.vue.d.ts +0 -73
- package/ui.button/config.d.ts +0 -130
- package/ui.button/constants.d.ts +0 -1
- package/ui.button/storybook/stories.d.ts +0 -3062
- package/ui.button/useAttrs.d.ts +0 -11
- package/ui.button-link/ULink.vue.d.ts +0 -66
- package/ui.button-link/config.d.ts +0 -101
- package/ui.button-link/constants.d.ts +0 -1
- package/ui.button-link/storybook/stories.d.ts +0 -4567
- package/ui.button-link/useAttrs.d.ts +0 -14
- package/ui.button-toggle/UToggle.vue.d.ts +0 -50
- package/ui.button-toggle/config.d.ts +0 -65
- package/ui.button-toggle/constants.d.ts +0 -3
- package/ui.button-toggle/storybook/stories.d.ts +0 -2683
- package/ui.button-toggle/useAttrs.d.ts +0 -11
- package/ui.button-toggle-item/UToggleItem.vue.d.ts +0 -36
- package/ui.button-toggle-item/config.d.ts +0 -41
- package/ui.button-toggle-item/constants.d.ts +0 -1
- package/ui.button-toggle-item/storybook/stories.d.ts +0 -495
- package/ui.button-toggle-item/useAttrs.d.ts +0 -15
- package/ui.container-accordion/UAccordion.vue.d.ts +0 -32
- package/ui.container-accordion/config.d.ts +0 -40
- package/ui.container-accordion/constants.d.ts +0 -1
- package/ui.container-accordion/storybook/stories.d.ts +0 -732
- package/ui.container-accordion/useAttrs.d.ts +0 -13
- package/ui.container-card/UCard.vue.d.ts +0 -31
- package/ui.container-card/config.d.ts +0 -13
- package/ui.container-card/constants.d.ts +0 -1
- package/ui.container-card/storybook/stories.d.ts +0 -3906
- package/ui.container-card/useAttrs.d.ts +0 -11
- package/ui.container-col/UCol.vue.d.ts +0 -33
- package/ui.container-col/config.d.ts +0 -81
- package/ui.container-col/constants.d.ts +0 -1
- package/ui.container-col/storybook/stories.d.ts +0 -840
- package/ui.container-col/useAttrs.d.ts +0 -11
- package/ui.container-divider/UDivider.vue.d.ts +0 -25
- package/ui.container-divider/config.d.ts +0 -102
- package/ui.container-divider/constants.d.ts +0 -1
- package/ui.container-divider/storybook/stories.d.ts +0 -577
- package/ui.container-divider/useAttrs.d.ts +0 -11
- package/ui.container-group/UGroup.vue.d.ts +0 -33
- package/ui.container-group/config.d.ts +0 -38
- package/ui.container-group/constants.d.ts +0 -1
- package/ui.container-group/storybook/stories.d.ts +0 -2869
- package/ui.container-group/useAttrs.d.ts +0 -11
- package/ui.container-modal/UModal.vue.d.ts +0 -59
- package/ui.container-modal/config.d.ts +0 -77
- package/ui.container-modal/constants.d.ts +0 -1
- package/ui.container-modal/storybook/stories.d.ts +0 -8377
- package/ui.container-modal/useAttrs.d.ts +0 -11
- package/ui.container-modal-confirm/UModalConfirm.vue.d.ts +0 -59
- package/ui.container-modal-confirm/config.d.ts +0 -23
- package/ui.container-modal-confirm/constants.d.ts +0 -1
- package/ui.container-modal-confirm/storybook/stories.d.ts +0 -4494
- package/ui.container-modal-confirm/useAttrs.d.ts +0 -11
- package/ui.container-page/UPage.vue.d.ts +0 -47
- package/ui.container-page/config.d.ts +0 -85
- package/ui.container-page/constants.d.ts +0 -1
- package/ui.container-page/storybook/stories.d.ts +0 -8723
- package/ui.container-page/useAttrs.d.ts +0 -13
- package/ui.container-row/URow.vue.d.ts +0 -35
- package/ui.container-row/config.d.ts +0 -85
- package/ui.container-row/constants.d.ts +0 -1
- package/ui.container-row/storybook/stories.d.ts +0 -2619
- package/ui.container-row/useAttrs.d.ts +0 -11
- package/ui.data-list/UDataList.vue.d.ts +0 -74
- package/ui.data-list/config.d.ts +0 -48
- package/ui.data-list/constants.d.ts +0 -1
- package/ui.data-list/storybook/stories.d.ts +0 -3342
- package/ui.data-list/useAttrs.d.ts +0 -11
- package/ui.data-table/UTable.vue.d.ts +0 -90
- package/ui.data-table/UTableRow.vue.d.ts +0 -61
- package/ui.data-table/config.d.ts +0 -128
- package/ui.data-table/constants.d.ts +0 -1
- package/ui.data-table/storybook/stories.d.ts +0 -13069
- package/ui.data-table/useAttrs.d.ts +0 -17
- package/ui.data-table/utilTable.d.ts +0 -9
- package/ui.dropdown-badge/UDropdownBadge.vue.d.ts +0 -145
- package/ui.dropdown-badge/config.d.ts +0 -39
- package/ui.dropdown-badge/constants.d.ts +0 -1
- package/ui.dropdown-badge/storybook/stories.d.ts +0 -1246
- package/ui.dropdown-badge/useAttrs.d.ts +0 -13
- package/ui.dropdown-button/UDropdownButton.vue.d.ts +0 -151
- package/ui.dropdown-button/config.d.ts +0 -52
- package/ui.dropdown-button/constants.d.ts +0 -4
- package/ui.dropdown-button/storybook/stories.d.ts +0 -1912
- package/ui.dropdown-button/useAttrs.d.ts +0 -13
- package/ui.dropdown-link/UDropdownLink.vue.d.ts +0 -149
- package/ui.dropdown-link/config.d.ts +0 -37
- package/ui.dropdown-link/constants.d.ts +0 -1
- package/ui.dropdown-link/storybook/stories.d.ts +0 -1333
- package/ui.dropdown-link/useAttrs.d.ts +0 -13
- package/ui.dropdown-list/UDropdownList.vue.d.ts +0 -59
- package/ui.dropdown-list/config.d.ts +0 -77
- package/ui.dropdown-list/constants.d.ts +0 -1
- package/ui.dropdown-list/storybook/stories.d.ts +0 -783
- package/ui.dropdown-list/useAttrs.d.ts +0 -11
- package/ui.dropdown-list/usePointer.d.ts +0 -8
- package/ui.form-calendar/UCalendar.vue.d.ts +0 -31
- package/ui.form-calendar/UCalendarDayView.vue.d.ts +0 -26
- package/ui.form-calendar/UCalendarMonthView.vue.d.ts +0 -26
- package/ui.form-calendar/UCalendarYearView.vue.d.ts +0 -26
- package/ui.form-calendar/config.d.ts +0 -207
- package/ui.form-calendar/constants.d.ts +0 -66
- package/ui.form-calendar/storybook/stories.d.ts +0 -262
- package/ui.form-calendar/useAttrs.d.ts +0 -11
- package/ui.form-calendar/utilCalendar.d.ts +0 -8
- package/ui.form-calendar/utilDate.d.ts +0 -30
- package/ui.form-calendar/utilFormatting.d.ts +0 -68
- package/ui.form-checkbox/UCheckbox.vue.d.ts +0 -50
- package/ui.form-checkbox/config.d.ts +0 -67
- package/ui.form-checkbox/constants.d.ts +0 -1
- package/ui.form-checkbox/storybook/stories.d.ts +0 -1589
- package/ui.form-checkbox/useAttrs.d.ts +0 -14
- package/ui.form-checkbox-group/UCheckboxGroup.vue.d.ts +0 -40
- package/ui.form-checkbox-group/config.d.ts +0 -21
- package/ui.form-checkbox-group/constants.d.ts +0 -1
- package/ui.form-checkbox-group/storybook/stories.d.ts +0 -2441
- package/ui.form-checkbox-group/useAttrs.d.ts +0 -11
- package/ui.form-checkbox-multi-state/UCheckboxMultiState.vue.d.ts +0 -24
- package/ui.form-checkbox-multi-state/config.d.ts +0 -10
- package/ui.form-checkbox-multi-state/constants.d.ts +0 -1
- package/ui.form-checkbox-multi-state/storybook/stories.d.ts +0 -187
- package/ui.form-checkbox-multi-state/useAttrs.d.ts +0 -13
- package/ui.form-color-picker/UColorPicker.vue.d.ts +0 -28
- package/ui.form-color-picker/config.d.ts +0 -42
- package/ui.form-color-picker/constants.d.ts +0 -1
- package/ui.form-color-picker/storybook/stories.d.ts +0 -316
- package/ui.form-color-picker/useAttrs.d.ts +0 -11
- package/ui.form-date-picker/UDatePicker.vue.d.ts +0 -135
- package/ui.form-date-picker/config.d.ts +0 -184
- package/ui.form-date-picker/constants.d.ts +0 -1
- package/ui.form-date-picker/index.d.ts +0 -1
- package/ui.form-date-picker/storybook/stories.d.ts +0 -3242
- package/ui.form-date-picker/useAttrs.d.ts +0 -14
- package/ui.form-date-picker-range/UDatePickerRange.vue.d.ts +0 -545
- package/ui.form-date-picker-range/UDatePickerRangeInputs.vue.d.ts +0 -6
- package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue.d.ts +0 -7
- package/ui.form-date-picker-range/config.d.ts +0 -265
- package/ui.form-date-picker-range/constants.d.ts +0 -20
- package/ui.form-date-picker-range/storybook/stories.d.ts +0 -5545
- package/ui.form-date-picker-range/useAttrs.d.ts +0 -17
- package/ui.form-date-picker-range/useUserFormat.d.ts +0 -3
- package/ui.form-date-picker-range/utilDateRange.d.ts +0 -20
- package/ui.form-date-picker-range/utilValidation.d.ts +0 -3
- package/ui.form-input/UInput.vue.d.ts +0 -59
- package/ui.form-input/config.d.ts +0 -59
- package/ui.form-input/constants.d.ts +0 -1
- package/ui.form-input/storybook/stories.d.ts +0 -5734
- package/ui.form-input/useAttrs.d.ts +0 -11
- package/ui.form-input-file/UInputFile.vue.d.ts +0 -57
- package/ui.form-input-file/config.d.ts +0 -94
- package/ui.form-input-file/constants.d.ts +0 -1
- package/ui.form-input-file/storybook/stories.d.ts +0 -1116
- package/ui.form-input-file/useAttrs.d.ts +0 -11
- package/ui.form-input-file/utilFileForm.d.ts +0 -1
- package/ui.form-input-money/UInputMoney.vue.d.ts +0 -183
- package/ui.form-input-money/config.d.ts +0 -17
- package/ui.form-input-money/constants.d.ts +0 -1
- package/ui.form-input-money/storybook/stories.d.ts +0 -7519
- package/ui.form-input-money/useAttrs.d.ts +0 -11
- package/ui.form-input-money/useFormatCurrency.d.ts +0 -5
- package/ui.form-input-money/utilFormat.d.ts +0 -7
- package/ui.form-input-number/UInputNumber.vue.d.ts +0 -30
- package/ui.form-input-number/config.d.ts +0 -40
- package/ui.form-input-number/constants.d.ts +0 -1
- package/ui.form-input-number/storybook/stories.d.ts +0 -363
- package/ui.form-input-number/useAttrs.d.ts +0 -11
- package/ui.form-input-rating/UInputRating.vue.d.ts +0 -49
- package/ui.form-input-rating/config.d.ts +0 -56
- package/ui.form-input-rating/constants.d.ts +0 -1
- package/ui.form-input-rating/storybook/stories.d.ts +0 -1336
- package/ui.form-input-rating/useAttrs.d.ts +0 -11
- package/ui.form-input-search/UInputSearch.vue.d.ts +0 -177
- package/ui.form-input-search/config.d.ts +0 -21
- package/ui.form-input-search/constants.d.ts +0 -1
- package/ui.form-input-search/storybook/stories.d.ts +0 -3325
- package/ui.form-input-search/useAttrs.d.ts +0 -11
- package/ui.form-label/ULabel.vue.d.ts +0 -46
- package/ui.form-label/config.d.ts +0 -139
- package/ui.form-label/constants.d.ts +0 -8
- package/ui.form-label/storybook/stories.d.ts +0 -1133
- package/ui.form-label/useAttrs.d.ts +0 -11
- package/ui.form-radio/URadio.vue.d.ts +0 -46
- package/ui.form-radio/config.d.ts +0 -30
- package/ui.form-radio/constants.d.ts +0 -1
- package/ui.form-radio/storybook/stories.d.ts +0 -1270
- package/ui.form-radio/useAttrs.d.ts +0 -14
- package/ui.form-radio-group/URadioGroup.vue.d.ts +0 -40
- package/ui.form-radio-group/config.d.ts +0 -21
- package/ui.form-radio-group/constants.d.ts +0 -1
- package/ui.form-radio-group/storybook/stories.d.ts +0 -1239
- package/ui.form-radio-group/useAttrs.d.ts +0 -11
- package/ui.form-select/USelect.vue.d.ts +0 -405
- package/ui.form-select/config.d.ts +0 -146
- package/ui.form-select/constants.d.ts +0 -13
- package/ui.form-select/storybook/stories.d.ts +0 -19025
- package/ui.form-select/useAttrs.d.ts +0 -15
- package/ui.form-select/utilSelect.d.ts +0 -11
- package/ui.form-switch/USwitch.vue.d.ts +0 -30
- package/ui.form-switch/config.d.ts +0 -106
- package/ui.form-switch/constants.d.ts +0 -1
- package/ui.form-switch/storybook/stories.d.ts +0 -703
- package/ui.form-switch/useAttrs.d.ts +0 -13
- package/ui.form-switch/utilVariant.d.ts +0 -169
- package/ui.form-textarea/UTextarea.vue.d.ts +0 -132
- package/ui.form-textarea/config.d.ts +0 -55
- package/ui.form-textarea/constants.d.ts +0 -1
- package/ui.form-textarea/storybook/stories.d.ts +0 -2175
- package/ui.form-textarea/useAttrs.d.ts +0 -11
- package/ui.image-avatar/UAvatar.vue.d.ts +0 -40
- package/ui.image-avatar/config.d.ts +0 -51
- package/ui.image-avatar/constants.d.ts +0 -1
- package/ui.image-avatar/storybook/stories.d.ts +0 -1640
- package/ui.image-avatar/useAttrs.d.ts +0 -11
- package/ui.image-icon/UIcon.vue.d.ts +0 -28
- package/ui.image-icon/config.d.ts +0 -52
- package/ui.image-icon/constants.d.ts +0 -1
- package/ui.image-icon/storybook/stories.d.ts +0 -516
- package/ui.image-icon/useAttrs.d.ts +0 -11
- package/ui.loader/ULoader.vue.d.ts +0 -23
- package/ui.loader/config.d.ts +0 -49
- package/ui.loader/constants.d.ts +0 -2
- package/ui.loader/storybook/stories.d.ts +0 -655
- package/ui.loader/useAttrs.d.ts +0 -11
- package/ui.loader-overlay/ULoaderOverlay.vue.d.ts +0 -21
- package/ui.loader-overlay/config.d.ts +0 -25
- package/ui.loader-overlay/constants.d.ts +0 -1
- package/ui.loader-overlay/storybook/stories.d.ts +0 -362
- package/ui.loader-overlay/useAttrs.d.ts +0 -11
- package/ui.loader-overlay/useLoaderOverlay.d.ts +0 -10
- package/ui.loader-overlay/utilLoaderOverlay.d.ts +0 -2
- package/ui.loader-progress/ULoaderProgress.vue.d.ts +0 -11
- package/ui.loader-progress/config.d.ts +0 -24
- package/ui.loader-progress/constants.d.ts +0 -3
- package/ui.loader-progress/storybook/stories.d.ts +0 -742
- package/ui.loader-progress/useAttrs.d.ts +0 -11
- package/ui.loader-progress/useLoaderProgress.d.ts +0 -15
- package/ui.loader-progress/utilLoaderProgress.d.ts +0 -5
- package/ui.navigation-pagination/UPagination.vue.d.ts +0 -54
- package/ui.navigation-pagination/config.d.ts +0 -41
- package/ui.navigation-pagination/constants.d.ts +0 -1
- package/ui.navigation-pagination/storybook/stories.d.ts +0 -1033
- package/ui.navigation-pagination/useAttrs.d.ts +0 -11
- package/ui.navigation-progress/StepperProgress.vue.d.ts +0 -15
- package/ui.navigation-progress/UProgress.vue.d.ts +0 -41
- package/ui.navigation-progress/config.d.ts +0 -139
- package/ui.navigation-progress/constants.d.ts +0 -5
- package/ui.navigation-progress/storybook/stories.d.ts +0 -2827
- package/ui.navigation-progress/useAttrs.d.ts +0 -11
- package/ui.navigation-tab/UTab.vue.d.ts +0 -27
- package/ui.navigation-tab/config.d.ts +0 -24
- package/ui.navigation-tab/constants.d.ts +0 -1
- package/ui.navigation-tab/storybook/stories.d.ts +0 -316
- package/ui.navigation-tab/useAttrs.d.ts +0 -14
- package/ui.navigation-tabs/UTabs.vue.d.ts +0 -30
- package/ui.navigation-tabs/config.d.ts +0 -24
- package/ui.navigation-tabs/constants.d.ts +0 -1
- package/ui.navigation-tabs/storybook/stories.d.ts +0 -354
- package/ui.navigation-tabs/useAttrs.d.ts +0 -11
- package/ui.other-dot/UDot.vue.d.ts +0 -13
- package/ui.other-dot/config.d.ts +0 -28
- package/ui.other-dot/constants.d.ts +0 -1
- package/ui.other-dot/storybook/stories.d.ts +0 -645
- package/ui.other-dot/useAttrs.d.ts +0 -11
- package/ui.text-alert/UAlert.vue.d.ts +0 -53
- package/ui.text-alert/config.d.ts +0 -75
- package/ui.text-alert/constants.d.ts +0 -1
- package/ui.text-alert/storybook/stories.d.ts +0 -4845
- package/ui.text-alert/useAttrs.d.ts +0 -11
- package/ui.text-badge/UBadge.vue.d.ts +0 -60
- package/ui.text-badge/config.d.ts +0 -102
- package/ui.text-badge/constants.d.ts +0 -1
- package/ui.text-badge/storybook/stories.d.ts +0 -1869
- package/ui.text-badge/useAttrs.d.ts +0 -11
- package/ui.text-block/UText.vue.d.ts +0 -21
- package/ui.text-block/config.d.ts +0 -27
- package/ui.text-block/constants.d.ts +0 -1
- package/ui.text-block/storybook/stories.d.ts +0 -12
- package/ui.text-block/types.d.ts +0 -9
- package/ui.text-block/types.ts +0 -33
- package/ui.text-block/useAttrs.d.ts +0 -3
- package/ui.text-block/useAttrs.ts +0 -18
- package/ui.text-empty/UEmpty.vue.d.ts +0 -29
- package/ui.text-empty/config.d.ts +0 -55
- package/ui.text-empty/constants.d.ts +0 -1
- package/ui.text-empty/storybook/stories.d.ts +0 -1212
- package/ui.text-empty/useAttrs.d.ts +0 -11
- package/ui.text-file/UFile.vue.d.ts +0 -57
- package/ui.text-file/config.d.ts +0 -42
- package/ui.text-file/constants.d.ts +0 -1
- package/ui.text-file/storybook/stories.d.ts +0 -136
- package/ui.text-file/useAttrs.d.ts +0 -11
- package/ui.text-files/UFiles.vue.d.ts +0 -52
- package/ui.text-files/config.d.ts +0 -10
- package/ui.text-files/constants.d.ts +0 -1
- package/ui.text-files/storybook/stories.d.ts +0 -131
- package/ui.text-files/useAttrs.d.ts +0 -11
- package/ui.text-header/UHeader.vue.d.ts +0 -33
- package/ui.text-header/config.d.ts +0 -54
- package/ui.text-header/constants.d.ts +0 -1
- package/ui.text-header/storybook/stories.d.ts +0 -694
- package/ui.text-header/useAttrs.d.ts +0 -11
- package/ui.text-money/UMoney.vue.d.ts +0 -48
- package/ui.text-money/config.d.ts +0 -77
- package/ui.text-money/constants.d.ts +0 -1
- package/ui.text-money/storybook/stories.d.ts +0 -2090
- package/ui.text-money/useAttrs.d.ts +0 -11
- package/ui.text-money/utilMoney.d.ts +0 -14
- package/ui.text-notify/UNotify.vue.d.ts +0 -13
- package/ui.text-notify/config.d.ts +0 -58
- package/ui.text-notify/constants.d.ts +0 -20
- package/ui.text-notify/storybook/stories.d.ts +0 -653
- package/ui.text-notify/useAttrs.d.ts +0 -11
- package/ui.text-notify/utilNotify.d.ts +0 -7
- package/utils/utilHelper.d.ts +0 -9
- package/utils/utilPlatform.d.ts +0 -6
- package/utils/utilStorybook.d.ts +0 -15
- package/utils/utilUI.d.ts +0 -68
- package/utilsTs/utilHelper.d.ts +0 -9
- package/utilsTs/utilHelper.ts +0 -70
- package/utilsTs/utilPlatform.d.ts +0 -7
- package/utilsTs/utilPlatform.ts +0 -53
- package/utilsTs/utilStorybook.d.ts +0 -24
- package/utilsTs/utilStorybook.ts +0 -292
- package/utilsTs/utilTailwind.d.ts +0 -1
- package/utilsTs/utilTailwind.ts +0 -38
- package/utilsTs/utilTheme.d.ts +0 -8
- package/utilsTs/utilUI.d.ts +0 -67
- package/utilsTs/utilUI.ts +0 -142
- /package/ui.text-block/{config.ts → config.js} +0 -0
- /package/ui.text-block/{constants.ts → constants.js} +0 -0
|
@@ -59,7 +59,7 @@ export default function useBreakpoint() {
|
|
|
59
59
|
onBeforeUnmount(() => {
|
|
60
60
|
if (isSSR) return;
|
|
61
61
|
|
|
62
|
-
window.removeEventListener("resize", resizeListener);
|
|
62
|
+
window.removeEventListener("resize", resizeListener, { passive: true });
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
watch(windowWidth, setBreakpoint, { immediate: true });
|
package/composables/useUI.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
computed,
|
|
12
12
|
} from "vue";
|
|
13
13
|
|
|
14
|
-
import { cx, cva, setColor, getColor, vuelessConfig } from "../utils/utilUI.js";
|
|
14
|
+
import { cx, cva, setColor, getColor, vuelessConfig, mergeConfigs } from "../utils/utilUI.js";
|
|
15
15
|
|
|
16
16
|
import { cloneDeep, isCSR } from "../utils/utilHelper.js";
|
|
17
17
|
import {
|
|
@@ -241,209 +241,6 @@ function getMergedConfig({ defaultConfig, globalConfig, propsConfig, vuelessStra
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
/**
|
|
245
|
-
* Recursively merge config objects with removing tailwind classes duplicates.
|
|
246
|
-
* @param {Object} defaultConfig
|
|
247
|
-
* @param {Object} globalConfig
|
|
248
|
-
* @param {Object} propsConfig
|
|
249
|
-
* @param {Object} config - final merged config.
|
|
250
|
-
* @param {boolean} isReplace - enables class replacement instead of merge.
|
|
251
|
-
* @param {boolean} isVarinants - if true, prevents adding a "base" key into nested objects.
|
|
252
|
-
*
|
|
253
|
-
* @returns {Object}
|
|
254
|
-
*/
|
|
255
|
-
function mergeConfigs({
|
|
256
|
-
defaultConfig,
|
|
257
|
-
globalConfig,
|
|
258
|
-
propsConfig,
|
|
259
|
-
config = {},
|
|
260
|
-
isReplace = false,
|
|
261
|
-
isVariants = false,
|
|
262
|
-
}) {
|
|
263
|
-
globalConfig = cloneDeep(globalConfig || {});
|
|
264
|
-
propsConfig = cloneDeep(propsConfig || {});
|
|
265
|
-
|
|
266
|
-
const isGlobalConfig = Object.keys(globalConfig).length;
|
|
267
|
-
const isPropsConfig = Object.keys(propsConfig).length;
|
|
268
|
-
|
|
269
|
-
// Add unique keys from defaultConfig to composedConfig
|
|
270
|
-
let composedConfig = cloneDeep(defaultConfig);
|
|
271
|
-
|
|
272
|
-
// Add unique keys from globalConfig to composedConfig
|
|
273
|
-
for (let key in globalConfig) {
|
|
274
|
-
if (!Object.keys(composedConfig).includes(key)) {
|
|
275
|
-
composedConfig[key] = globalConfig[key];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
// Add unique keys from propsConfig to composedConfig
|
|
280
|
-
for (let key in propsConfig) {
|
|
281
|
-
if (!Object.keys(composedConfig).includes(key)) {
|
|
282
|
-
composedConfig[key] = propsConfig[key];
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
const {
|
|
287
|
-
i18n,
|
|
288
|
-
defaults,
|
|
289
|
-
strategy,
|
|
290
|
-
safelist,
|
|
291
|
-
component,
|
|
292
|
-
safelistColors,
|
|
293
|
-
defaultVariants,
|
|
294
|
-
compoundVariants,
|
|
295
|
-
} = SYSTEM_CONFIG_KEY;
|
|
296
|
-
|
|
297
|
-
for (let key in composedConfig) {
|
|
298
|
-
if (isGlobalConfig || isPropsConfig) {
|
|
299
|
-
if (key === safelist || key === safelistColors) {
|
|
300
|
-
if (propsConfig[key]) {
|
|
301
|
-
// eslint-disable-next-line no-console
|
|
302
|
-
console.warn(`Passing '${key}' key in 'config' prop is not allowed.`);
|
|
303
|
-
}
|
|
304
|
-
} else if (key === component) {
|
|
305
|
-
config[key] = propsConfig[key] || defaultConfig[key];
|
|
306
|
-
|
|
307
|
-
if (globalConfig[key]) {
|
|
308
|
-
// eslint-disable-next-line no-console
|
|
309
|
-
console.warn(`Passing '${key}' key in 'config' prop or by global config is not allowed.`);
|
|
310
|
-
}
|
|
311
|
-
} else if (key === strategy) {
|
|
312
|
-
config[key] = propsConfig[key] || globalConfig[key] || defaultConfig[key];
|
|
313
|
-
} else if (key === defaults || key === defaultVariants) {
|
|
314
|
-
config[key] = { ...defaultConfig[key], ...globalConfig[key], ...propsConfig[key] };
|
|
315
|
-
} else if (key === compoundVariants) {
|
|
316
|
-
config[key] = mergeCompoundVariants({
|
|
317
|
-
defaultConfig: composedConfig,
|
|
318
|
-
globalConfig,
|
|
319
|
-
propsConfig,
|
|
320
|
-
isReplace,
|
|
321
|
-
key,
|
|
322
|
-
});
|
|
323
|
-
} else {
|
|
324
|
-
const isObjectComposedConfig = typeof composedConfig[key] === "object";
|
|
325
|
-
const isObjectGlobalConfig = typeof globalConfig[key] === "object";
|
|
326
|
-
const isObjectPropsConfig = typeof propsConfig[key] === "object";
|
|
327
|
-
|
|
328
|
-
const isObject = isObjectComposedConfig || isObjectGlobalConfig || isObjectPropsConfig;
|
|
329
|
-
const isEmpty = composedConfig[key] === null;
|
|
330
|
-
const isI18n = key === i18n;
|
|
331
|
-
|
|
332
|
-
if (key === "variants" && !isVariants) {
|
|
333
|
-
isVariants = true;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
config[key] =
|
|
337
|
-
isObject && !isEmpty && !isI18n
|
|
338
|
-
? mergeConfigs({
|
|
339
|
-
defaultConfig: stringToObject(composedConfig[key], { addBase: !isVariants }),
|
|
340
|
-
globalConfig: stringToObject(globalConfig[key], { addBase: !isVariants }),
|
|
341
|
-
propsConfig: stringToObject(propsConfig[key], { addBase: !isVariants }),
|
|
342
|
-
config: stringToObject(composedConfig[key], { addBase: !isVariants }),
|
|
343
|
-
isReplace,
|
|
344
|
-
isVariants,
|
|
345
|
-
})
|
|
346
|
-
: isReplace || isI18n
|
|
347
|
-
? propsConfig[key] || globalConfig[key] || defaultConfig[key]
|
|
348
|
-
: cx([defaultConfig[key], globalConfig[key], propsConfig[key]]);
|
|
349
|
-
}
|
|
350
|
-
} else {
|
|
351
|
-
config[key] = composedConfig[key];
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
return config;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
Turn simplified nested component config to regular config.
|
|
360
|
-
@param {Object | String} value
|
|
361
|
-
@param {Boolean} addBase
|
|
362
|
-
@returns {Object}
|
|
363
|
-
*/
|
|
364
|
-
function stringToObject(value, { addBase = false }) {
|
|
365
|
-
if (value === undefined) value = "";
|
|
366
|
-
|
|
367
|
-
return typeof value !== "object" ? addBase && { base: value } : value;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Merge CVA compound variants arrays.
|
|
372
|
-
* @param {Object} defaultConfig
|
|
373
|
-
* @param {Object} globalConfig
|
|
374
|
-
* @param {Object} propsConfig
|
|
375
|
-
* @param {string} key
|
|
376
|
-
* @param {boolean} isReplace - enables class replacement instead of merge.
|
|
377
|
-
*
|
|
378
|
-
* @returns {Array}
|
|
379
|
-
*/
|
|
380
|
-
function mergeCompoundVariants({ defaultConfig, globalConfig, propsConfig, key, isReplace }) {
|
|
381
|
-
if (
|
|
382
|
-
(globalConfig[key] && !Array.isArray(globalConfig[key])) ||
|
|
383
|
-
(propsConfig[key] && !Array.isArray(propsConfig[key])) ||
|
|
384
|
-
(defaultConfig[key] && !Array.isArray(defaultConfig[key]))
|
|
385
|
-
) {
|
|
386
|
-
// eslint-disable-next-line no-console
|
|
387
|
-
console.error("CompoundVariants should be an array.");
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
let globalConfigUniqueItems = cloneDeep(globalConfig[key] || []);
|
|
391
|
-
let propsConfigUniqueItems = cloneDeep(propsConfig[key] || []);
|
|
392
|
-
|
|
393
|
-
const config = defaultConfig[key].map((defaultConfigItem) => {
|
|
394
|
-
/**
|
|
395
|
-
* Compare two objects by keys for match.
|
|
396
|
-
* @param {Object} configItem
|
|
397
|
-
* @returns {Boolean}
|
|
398
|
-
*/
|
|
399
|
-
function isSameItem(configItem) {
|
|
400
|
-
const hasConfigItemKeys = Object.keys(defaultConfigItem)
|
|
401
|
-
.map((key) => defaultConfigItem[key] === configItem[key] || key === "class")
|
|
402
|
-
.every((item) => !!item);
|
|
403
|
-
|
|
404
|
-
const hasDefaultConfigItemKeys = Object.keys(configItem)
|
|
405
|
-
.map((key) => defaultConfigItem[key] === configItem[key] || key === "class")
|
|
406
|
-
.every((item) => !!item);
|
|
407
|
-
|
|
408
|
-
return hasConfigItemKeys && hasDefaultConfigItemKeys;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Find the same compound variant item in custom config if exist.
|
|
413
|
-
* @param {Object} config
|
|
414
|
-
* @returns {Object|undefined}
|
|
415
|
-
*/
|
|
416
|
-
function findItem(config = []) {
|
|
417
|
-
const globalConfigUniqueItemIndex = globalConfigUniqueItems.findIndex(isSameItem);
|
|
418
|
-
const propsConfigUniqueItemIndex = propsConfigUniqueItems.findIndex(isSameItem);
|
|
419
|
-
|
|
420
|
-
if (~globalConfigUniqueItemIndex) {
|
|
421
|
-
globalConfigUniqueItems.splice(globalConfigUniqueItemIndex, 1);
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
if (~propsConfigUniqueItemIndex) {
|
|
425
|
-
propsConfigUniqueItems.splice(propsConfigUniqueItemIndex, 1);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
return config.find(isSameItem);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
const globalConfigItem = findItem(globalConfig[key]);
|
|
432
|
-
const propsConfigItem = findItem(propsConfig[key]);
|
|
433
|
-
|
|
434
|
-
return globalConfigItem || propsConfigItem
|
|
435
|
-
? {
|
|
436
|
-
...defaultConfigItem,
|
|
437
|
-
class: isReplace
|
|
438
|
-
? propsConfigItem?.class || globalConfigItem?.class || defaultConfigItem.class
|
|
439
|
-
: cx([defaultConfigItem.class, globalConfigItem?.class, propsConfigItem?.class]),
|
|
440
|
-
}
|
|
441
|
-
: defaultConfigItem;
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
return [...config, ...globalConfigUniqueItems, ...propsConfigUniqueItems];
|
|
445
|
-
}
|
|
446
|
-
|
|
447
244
|
/**
|
|
448
245
|
* Merge component classes from "class" attribute into final config.
|
|
449
246
|
* @param {Object} config
|
package/constants.js
CHANGED
|
@@ -14,7 +14,7 @@ export const DEFAULT_GRAY_COLOR = COOL_COLOR;
|
|
|
14
14
|
export const DEFAULT_RING = 4; /* pixels */
|
|
15
15
|
export const DEFAULT_RING_OFFSET = 0; /* pixels */
|
|
16
16
|
export const DEFAULT_RING_OFFSET_COLOR_LIGHT = "#ffffff"; // white
|
|
17
|
-
export const DEFAULT_RING_OFFSET_COLOR_DARK = "#
|
|
17
|
+
export const DEFAULT_RING_OFFSET_COLOR_DARK = "#4b5563"; // gray-600
|
|
18
18
|
export const DEFAULT_ROUNDING = 8; /* pixels */
|
|
19
19
|
|
|
20
20
|
/* Vueless supported colors and shades */
|
|
@@ -61,7 +61,6 @@ export const SYSTEM_CONFIG_KEY = {
|
|
|
61
61
|
i18n: "i18n",
|
|
62
62
|
defaults: "defaults",
|
|
63
63
|
strategy: "strategy",
|
|
64
|
-
safelist: "safelist",
|
|
65
64
|
component: "component",
|
|
66
65
|
transition: "transition",
|
|
67
66
|
safelistColors: "safelistColors",
|
|
@@ -24,8 +24,8 @@ function clickOutside(target, handler, options) {
|
|
|
24
24
|
window.addEventListener("pointerdown", onClick, { passive: true });
|
|
25
25
|
|
|
26
26
|
function removeEvents() {
|
|
27
|
-
window.removeEventListener("click", onClick, capture);
|
|
28
|
-
window.removeEventListener("pointerdown", onClick);
|
|
27
|
+
window.removeEventListener("click", onClick, { capture, passive: true });
|
|
28
|
+
window.removeEventListener("pointerdown", onClick, { passive: true });
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
return removeEvents;
|
|
@@ -36,11 +36,11 @@ const EnumTemplate = (args) => ({
|
|
|
36
36
|
},
|
|
37
37
|
template: `
|
|
38
38
|
<URow>
|
|
39
|
-
<UIcon
|
|
40
|
-
v-for="option in args.options"
|
|
41
|
-
interactive
|
|
42
|
-
name="sentiment_satisfied"
|
|
43
|
-
v-tooltip="{ content: option, ...args.tooltip, [args.enum]: option }"
|
|
39
|
+
<UIcon
|
|
40
|
+
v-for="option in args.options"
|
|
41
|
+
interactive
|
|
42
|
+
name="sentiment_satisfied"
|
|
43
|
+
v-tooltip="{ content: option, ...args.tooltip, [args.enum]: option }"
|
|
44
44
|
>
|
|
45
45
|
</URow>
|
|
46
46
|
`,
|
package/{index.ts → index.js}
RENAMED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
/* eslint-disable prettier/prettier */
|
|
1
|
+
/* eslint-disable vue/max-len, prettier/prettier */
|
|
2
2
|
import { createLocale, LocaleSymbol } from "./composables/useLocale.js";
|
|
3
3
|
import { createLoaderOverlay, LoaderOverlaySymbol } from "./ui.loader-overlay/useLoaderOverlay.js";
|
|
4
4
|
import { createLoaderProgress, LoaderProgressSymbol } from "./ui.loader-progress/useLoaderProgress.js";
|
|
5
|
-
import { themeInit } from "./
|
|
6
|
-
|
|
7
|
-
import type { App } from 'vue'
|
|
8
|
-
import type { CreateVuelessOptions } from './types'
|
|
5
|
+
import { themeInit } from "./utils/utilTheme.js";
|
|
9
6
|
|
|
10
7
|
export { setTitle } from "./utils/utilHelper.js";
|
|
11
|
-
export { setTheme } from "./
|
|
8
|
+
export { setTheme } from "./utils/utilTheme.js";
|
|
12
9
|
export { default as createVueI18nAdapter } from "./adatper.locale/vue-i18n.js";
|
|
13
10
|
export { default as defaultEnLocale } from "./adatper.locale/locales/en.js";
|
|
14
11
|
export { useLocale } from "./composables/useLocale.js";
|
|
@@ -25,14 +22,14 @@ export {
|
|
|
25
22
|
setDelayedNotify,
|
|
26
23
|
getDelayedNotify,
|
|
27
24
|
} from "./ui.text-notify/utilNotify.js";
|
|
28
|
-
/* eslint-enable prettier/prettier */
|
|
25
|
+
/* eslint-enable vue/max-len, prettier/prettier */
|
|
29
26
|
|
|
30
|
-
export function createVueless(options
|
|
27
|
+
export function createVueless(options = {}) {
|
|
31
28
|
const i18n = createLocale(options.i18n);
|
|
32
29
|
const loaderOverlay = createLoaderOverlay();
|
|
33
30
|
const loaderProgress = createLoaderProgress();
|
|
34
31
|
|
|
35
|
-
const install = (app
|
|
32
|
+
const install = (app) => {
|
|
36
33
|
app.provide(LocaleSymbol, i18n);
|
|
37
34
|
app.provide(LoaderOverlaySymbol, loaderOverlay);
|
|
38
35
|
app.provide(LoaderProgressSymbol, loaderProgress);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.476
|
|
3
|
+
"version": "0.0.476",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"homepage": "https://vueless.com",
|
|
23
23
|
"author": "Johnny Grid",
|
|
24
|
-
"main": "index.
|
|
24
|
+
"main": "index.js",
|
|
25
25
|
"type": "module",
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
@@ -31,16 +31,13 @@
|
|
|
31
31
|
"dev": "npx @vueless/web-types && node prepare.icons && STORYBOOK_FULL=1 storybook dev -p 6006 --no-open",
|
|
32
32
|
"build": "npx @vueless/web-types && node prepare.icons && storybook build --docs",
|
|
33
33
|
"preview": "vite preview --host --outDir=storybook-static",
|
|
34
|
-
"
|
|
35
|
-
"ts:build": "vue-tsc --build --force --declaration --emitDeclarationOnly",
|
|
36
|
-
"release:prepare": "npx @vueless/web-types && node prepare.icons && rm -rf dist && mkdir -p dist && cp -r src/. package.json LICENSE web-types.json README.md dist/ && node prepare.package && npm run ts:build",
|
|
37
|
-
"release:beta": "release-it patch --ci --npm.publish --npm.tag=beta",
|
|
34
|
+
"release:prepare": "npx @vueless/web-types && node prepare.icons && rm -rf dist && mkdir -p dist && cp -r src/. package.json LICENSE web-types.json README.md dist/ && node prepare.package",
|
|
38
35
|
"release:patch": "release-it patch --ci --npm.publish",
|
|
39
36
|
"release:minor": "release-it minor --ci --npm.publish --git.tag --github.release",
|
|
40
37
|
"release:major": "release-it major --ci --npm.publish --git.tag --github.release",
|
|
41
|
-
"lint": "eslint --no-fix src/ .storybook/",
|
|
42
|
-
"lint:fix": "eslint --fix src/ .storybook/",
|
|
43
|
-
"lint:ci": "eslint --no-fix --max-warnings=0"
|
|
38
|
+
"lint": "eslint --ext .vue,.js,.ts --no-fix --ignore-path .eslintignore src/ .storybook/",
|
|
39
|
+
"lint:fix": "eslint --ext .vue,.js,.ts --fix --ignore-path .eslintignore src/ .storybook/",
|
|
40
|
+
"lint:ci": "eslint --ext .vue,.js,.ts --no-fix --ignore-path .eslintignore --max-warnings=0"
|
|
44
41
|
},
|
|
45
42
|
"dependencies": {
|
|
46
43
|
"@tailwindcss/forms": "^0.5.7",
|
|
@@ -52,38 +49,30 @@
|
|
|
52
49
|
"vuedraggable": "^4.1.0"
|
|
53
50
|
},
|
|
54
51
|
"devDependencies": {
|
|
55
|
-
"@eslint/js": "^9.12.0",
|
|
56
52
|
"@material-symbols/svg-500": "^0.17.4",
|
|
57
53
|
"@release-it/bumper": "^6.0.1",
|
|
58
|
-
"@tsconfig/node20": "^20.1.4",
|
|
59
|
-
"@types/jsdom": "^21.1.7",
|
|
60
|
-
"@types/lodash-es": "^4.17.12",
|
|
61
|
-
"@types/node": "^22.7.7",
|
|
62
54
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
63
|
-
"@
|
|
64
|
-
"@vue/eslint-config-prettier": "^10.0.0",
|
|
65
|
-
"@vue/eslint-config-typescript": "^14.1.1",
|
|
66
|
-
"@vue/tsconfig": "^0.5.1",
|
|
55
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
67
56
|
"@vueless/plugin-vite": "^0.0.74",
|
|
68
57
|
"@vueless/storybook": "^0.0.37",
|
|
69
58
|
"@vueless/web-types": "^0.0.17",
|
|
70
59
|
"autoprefixer": "^10.4.19",
|
|
71
60
|
"cssnano": "^6.1.2",
|
|
72
|
-
"eslint": "^
|
|
73
|
-
"eslint-plugin-
|
|
74
|
-
"eslint-plugin-
|
|
61
|
+
"eslint": "^8.55.0",
|
|
62
|
+
"eslint-plugin-node": "^11.1.0",
|
|
63
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
64
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
65
|
+
"eslint-plugin-tailwindcss": "^3.15.1",
|
|
75
66
|
"eslint-plugin-vue": "^9.25.0",
|
|
76
|
-
"globals": "^15.11.0",
|
|
77
|
-
"jsdom": "^25.0.1",
|
|
78
67
|
"postcss": "^8.4.38",
|
|
79
|
-
"prettier": "^3.
|
|
68
|
+
"prettier": "^3.2.5",
|
|
69
|
+
"prettier-eslint": "^16.3.0",
|
|
80
70
|
"release-it": "^17.2.1",
|
|
81
|
-
"
|
|
82
|
-
"vite": "^5.4.9",
|
|
71
|
+
"vite": "^5.2.13",
|
|
83
72
|
"vite-plugin-compression": "^0.5.1",
|
|
73
|
+
"vite-plugin-eslint": "^1.8.1",
|
|
84
74
|
"vue": "^3.5.4",
|
|
85
|
-
"vue-router": "^4.3.2"
|
|
86
|
-
"vue-tsc": "^2.1.6"
|
|
75
|
+
"vue-router": "^4.3.2"
|
|
87
76
|
},
|
|
88
77
|
"resolutions": {
|
|
89
78
|
"jackspeak": "2.3.6"
|
|
@@ -10,18 +10,9 @@ import {
|
|
|
10
10
|
DEFAULT_RING,
|
|
11
11
|
DEFAULT_RING_OFFSET,
|
|
12
12
|
DEFAULT_RING_OFFSET_COLOR_LIGHT,
|
|
13
|
-
DEFAULT_BRAND_COLOR,
|
|
14
|
-
DEFAULT_GRAY_COLOR,
|
|
15
|
-
GRAYSCALE_COLOR,
|
|
16
13
|
} from "./constants.js";
|
|
17
14
|
|
|
18
|
-
import type { BrandColors, GrayColors, TailwindColorShades, TailwindSafelist } from "./types";
|
|
19
|
-
|
|
20
|
-
type TailwindColors = BrandColors | GrayColors | typeof GRAY_COLOR;
|
|
21
|
-
|
|
22
15
|
const isStrategyOverride = process.env.VUELESS_STRATEGY === "override";
|
|
23
|
-
const brandColor = (process.env.VUELESS_BRAND as BrandColors) || DEFAULT_BRAND_COLOR;
|
|
24
|
-
const grayColor = (process.env.VUELESS_GRAY as GrayColors) || DEFAULT_GRAY_COLOR;
|
|
25
16
|
|
|
26
17
|
/**
|
|
27
18
|
* Vueless Tailwind CSS `content` config.
|
|
@@ -85,9 +76,6 @@ export const vuelessTailwindConfig = {
|
|
|
85
76
|
fontSize: {
|
|
86
77
|
"2xs": ["0.625rem", "0.875rem"] /* 10px / 14px */,
|
|
87
78
|
},
|
|
88
|
-
borderRadius: {
|
|
89
|
-
dynamic: "var(--vl-rounding)",
|
|
90
|
-
},
|
|
91
79
|
ringWidth: {
|
|
92
80
|
dynamic: "var(--vl-ring)",
|
|
93
81
|
},
|
|
@@ -95,7 +83,10 @@ export const vuelessTailwindConfig = {
|
|
|
95
83
|
dynamic: "var(--vl-ring-offset)",
|
|
96
84
|
},
|
|
97
85
|
ringOffsetColor: {
|
|
98
|
-
dynamic:
|
|
86
|
+
dynamic: "var(--vl-ring-offset-color)",
|
|
87
|
+
},
|
|
88
|
+
borderRadius: {
|
|
89
|
+
dynamic: "var(--vl-rounding)",
|
|
99
90
|
},
|
|
100
91
|
},
|
|
101
92
|
configViewer: {
|
|
@@ -105,8 +96,8 @@ export const vuelessTailwindConfig = {
|
|
|
105
96
|
"var(--vl-ring-offset)": DEFAULT_RING_OFFSET,
|
|
106
97
|
"var(--vl-ring-offset-color)": DEFAULT_RING_OFFSET_COLOR_LIGHT,
|
|
107
98
|
"var(--vl-rounding)": DEFAULT_ROUNDING,
|
|
108
|
-
...getReplacementColors(GRAY_COLOR,
|
|
109
|
-
...getReplacementColors(BRAND_COLOR,
|
|
99
|
+
...getReplacementColors(GRAY_COLOR, GRAY_COLOR),
|
|
100
|
+
...getReplacementColors(BRAND_COLOR, GRAY_COLOR),
|
|
110
101
|
},
|
|
111
102
|
},
|
|
112
103
|
},
|
|
@@ -114,6 +105,7 @@ export const vuelessTailwindConfig = {
|
|
|
114
105
|
|
|
115
106
|
/**
|
|
116
107
|
* Generates preset for TailwindCSS base on Vueless config.
|
|
108
|
+
* @returns {Object}
|
|
117
109
|
*/
|
|
118
110
|
export function vuelessPreset() {
|
|
119
111
|
return {
|
|
@@ -125,9 +117,10 @@ export function vuelessPreset() {
|
|
|
125
117
|
|
|
126
118
|
/**
|
|
127
119
|
* Convert sting patterns to RegExp.
|
|
120
|
+
* @returns {Array} - TailwindCSS safelist.
|
|
128
121
|
*/
|
|
129
122
|
export function getSafelist() {
|
|
130
|
-
return JSON.parse(process.env.VUELESS_SAFELIST || "[]").map((rule
|
|
123
|
+
return JSON.parse(process.env.VUELESS_SAFELIST || "[]").map((rule) => ({
|
|
131
124
|
...rule,
|
|
132
125
|
pattern: new RegExp(rule.pattern),
|
|
133
126
|
}));
|
|
@@ -135,23 +128,25 @@ export function getSafelist() {
|
|
|
135
128
|
|
|
136
129
|
/**
|
|
137
130
|
* Transform CSS variable with RGB numbers into CSS color.
|
|
131
|
+
* @param { String } variableName
|
|
132
|
+
* @returns {Function}
|
|
138
133
|
*/
|
|
139
|
-
function twColorWithOpacity(variableName
|
|
134
|
+
function twColorWithOpacity(variableName) {
|
|
140
135
|
return `rgba(var(${variableName}))`;
|
|
141
136
|
}
|
|
142
137
|
|
|
143
138
|
/**
|
|
144
139
|
* Convert sting patterns to RegExp.
|
|
140
|
+
* @param { String } color (gray | brand)
|
|
141
|
+
* @returns { Object } - TailwindCSS color object palette.
|
|
145
142
|
*/
|
|
146
|
-
function getPalette(color
|
|
147
|
-
|
|
143
|
+
function getPalette(color) {
|
|
144
|
+
let palette = {
|
|
148
145
|
DEFAULT: twColorWithOpacity(`--vl-color-${color}-default`),
|
|
149
146
|
};
|
|
150
147
|
|
|
151
148
|
COLOR_SHADES.forEach((shade) => {
|
|
152
|
-
palette[shade
|
|
153
|
-
`--vl-color-${color}-${shade}`,
|
|
154
|
-
);
|
|
149
|
+
palette[shade] = twColorWithOpacity(`--vl-color-${color}-${shade}`);
|
|
155
150
|
});
|
|
156
151
|
|
|
157
152
|
return palette;
|
|
@@ -159,20 +154,17 @@ function getPalette(color: string) {
|
|
|
159
154
|
|
|
160
155
|
/**
|
|
161
156
|
* Prepare a color object for theme replacement to fix missing css color variables in `tailwind-config-viewer`.
|
|
157
|
+
* @param { String } color (gray | brand)
|
|
158
|
+
* @param { String } tailwindColor any tailwind color with pallet.
|
|
159
|
+
* @returns { Object } - `tailwind-config-viewer` color replacement object.
|
|
162
160
|
*/
|
|
163
|
-
function getReplacementColors(color
|
|
164
|
-
if (tailwindColor === GRAYSCALE_COLOR || tailwindColor === COOL_COLOR) {
|
|
165
|
-
tailwindColor = GRAY_COLOR;
|
|
166
|
-
}
|
|
167
|
-
|
|
161
|
+
function getReplacementColors(color, tailwindColor) {
|
|
168
162
|
const varsPalette = {
|
|
169
163
|
[twColorWithOpacity(`--vl-color-${color}-default`)]: colors[tailwindColor][600],
|
|
170
164
|
};
|
|
171
165
|
|
|
172
166
|
COLOR_SHADES.forEach((shade) => {
|
|
173
|
-
varsPalette[twColorWithOpacity(`--vl-color-${color}-${shade}`)] =
|
|
174
|
-
tailwindColor
|
|
175
|
-
][shade];
|
|
167
|
+
varsPalette[twColorWithOpacity(`--vl-color-${color}-${shade}`)] = colors[tailwindColor][shade];
|
|
176
168
|
});
|
|
177
169
|
|
|
178
170
|
return varsPalette;
|
package/ui.button/config.js
CHANGED
|
@@ -161,16 +161,4 @@ export default /*tw*/ {
|
|
|
161
161
|
loading: false,
|
|
162
162
|
disabled: false,
|
|
163
163
|
},
|
|
164
|
-
safelist: (colors) => [
|
|
165
|
-
{ pattern: `border-(${colors})-600` },
|
|
166
|
-
{ pattern: `border-(${colors})-700`, variants: ["hover", "focus"] },
|
|
167
|
-
{ pattern: `border-(${colors})-800`, variants: ["active"] },
|
|
168
|
-
{ pattern: `bg-(${colors})-600` },
|
|
169
|
-
{ pattern: `bg-(${colors})-700`, variants: ["hover", "focus"] },
|
|
170
|
-
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
171
|
-
{ pattern: `text-(${colors})-600` },
|
|
172
|
-
{ pattern: `text-(${colors})-700`, variants: ["hover", "focus"] },
|
|
173
|
-
{ pattern: `text-(${colors})-800`, variants: ["active"] },
|
|
174
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus", "focus-within"] },
|
|
175
|
-
],
|
|
176
164
|
};
|
package/ui.button-link/ULink.vue
CHANGED
package/ui.button-link/config.js
CHANGED
|
@@ -80,13 +80,4 @@ export default /*tw*/ {
|
|
|
80
80
|
custom: false,
|
|
81
81
|
replace: false,
|
|
82
82
|
},
|
|
83
|
-
safelist: (colors) => [
|
|
84
|
-
{ pattern: `text-(${colors})-600` },
|
|
85
|
-
{ pattern: `text-(${colors})-700`, variants: ["hover", "focus"] },
|
|
86
|
-
{ pattern: `text-(${colors})-800`, variants: ["active"] },
|
|
87
|
-
{ pattern: `decoration-(${colors})-600` },
|
|
88
|
-
{ pattern: `decoration-(${colors})-700`, variants: ["hover", "focus"] },
|
|
89
|
-
{ pattern: `decoration-(${colors})-800`, variants: ["active"] },
|
|
90
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus-within"] },
|
|
91
|
-
],
|
|
92
83
|
};
|
|
@@ -366,20 +366,20 @@ function onClickDelete(value, label) {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
function prepareSortData(list, parentId) {
|
|
369
|
-
|
|
369
|
+
let sortData = [];
|
|
370
370
|
|
|
371
371
|
list.forEach((item) => {
|
|
372
|
-
|
|
372
|
+
let hasItemChildren = item?.children?.length;
|
|
373
373
|
|
|
374
374
|
if (hasItemChildren) {
|
|
375
|
-
|
|
375
|
+
let childrenItem = prepareSortData(item.children, item[props.valueKey]);
|
|
376
376
|
|
|
377
377
|
childrenItem.forEach((item) => {
|
|
378
378
|
sortData.push(item);
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
|
|
382
|
+
let parentItem = { ...item, parentId: 0 || parentId };
|
|
383
383
|
|
|
384
384
|
sortData.push(parentItem);
|
|
385
385
|
});
|
|
@@ -51,13 +51,4 @@ export default /*tw*/ {
|
|
|
51
51
|
partiallyCheckedIcon: "remove",
|
|
52
52
|
checkedIcon: "check",
|
|
53
53
|
},
|
|
54
|
-
safelist: (colors) => [
|
|
55
|
-
{ pattern: `bg-(${colors})-600` },
|
|
56
|
-
{ pattern: `bg-(${colors})-700`, variants: ["hover"] },
|
|
57
|
-
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
58
|
-
{ pattern: `border-(${colors})-500`, variants: ["focus"] },
|
|
59
|
-
{ pattern: `border-(${colors})-800`, variants: ["active"] },
|
|
60
|
-
{ pattern: `text-(${colors})-600`, variants: ["checked"] },
|
|
61
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus"] },
|
|
62
|
-
],
|
|
63
54
|
};
|
|
@@ -49,11 +49,4 @@ export default /*tw*/ {
|
|
|
49
49
|
/* icons */
|
|
50
50
|
unselectedIcon: "close",
|
|
51
51
|
},
|
|
52
|
-
safelist: (colors) => [
|
|
53
|
-
{ pattern: `bg-(${colors})-400`, variants: ["disabled"] },
|
|
54
|
-
{ pattern: `bg-(${colors})-600` },
|
|
55
|
-
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
56
|
-
{ pattern: `border-(${colors})-400`, variants: ["disabled"] },
|
|
57
|
-
{ pattern: `border-(${colors})-600`, variants: ["hover"] },
|
|
58
|
-
],
|
|
59
52
|
};
|
package/ui.form-input/UInput.vue
CHANGED
|
@@ -459,7 +459,7 @@ function setLabelPosition() {
|
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
|
|
462
|
+
let leftSlotOrIconWidth = leftSlotWrapperRef.value.getBoundingClientRect().width;
|
|
463
463
|
|
|
464
464
|
const leftPaddingValue = parseFloat(getComputedStyle(inputRef.value).paddingLeft);
|
|
465
465
|
|