vueless 0.0.477-beta.0 → 0.0.478-beta.0
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/composablesTs/useAutoPosition.ts +1 -1
- package/composablesTs/useBreakpoint.ts +1 -1
- package/composablesTs/useMutationObserver.ts +1 -1
- package/composablesTs/useUI.ts +9 -13
- package/index.ts +4 -4
- package/package.json +2 -2
- package/types.ts +10 -5
- package/ui.text-block/UText.vue +8 -8
- package/ui.text-block/storybook/Docs.mdx +1 -1
- package/ui.text-block/storybook/stories.ts +2 -2
- package/ui.text-block/types.ts +1 -1
- package/ui.text-block/useAttrs.ts +9 -7
- package/utilsTs/utilHelper.ts +2 -4
- package/utilsTs/utilPlatform.ts +1 -1
- package/utilsTs/utilStorybook.ts +7 -3
- package/utilsTs/utilTailwind.ts +1 -1
- package/utilsTs/utilTheme.ts +5 -5
- package/utilsTs/utilUI.ts +12 -11
- 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/useBreakpoint.d.ts +0 -7
- package/composablesTs/useLocale.d.ts +0 -3
- package/composablesTs/useMutationObserver.d.ts +0 -8
- package/composablesTs/useUI.d.ts +0 -68
- package/constants.d.ts +0 -42
- 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 -69
- package/types.d.ts +0 -131
- 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/useAttrs.d.ts +0 -3
- 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/utilPlatform.d.ts +0 -7
- package/utilsTs/utilStorybook.d.ts +0 -24
- package/utilsTs/utilTailwind.d.ts +0 -1
- package/utilsTs/utilTheme.d.ts +0 -8
- package/utilsTs/utilUI.d.ts +0 -67
package/composablesTs/useUI.ts
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
computed,
|
|
12
12
|
} from "vue";
|
|
13
13
|
|
|
14
|
-
import { cx, cva, setColor, getColor, vuelessConfig } from "../utilsTs/utilUI";
|
|
15
|
-
import { cloneDeep, isCSR } from "../utilsTs/utilHelper";
|
|
14
|
+
import { cx, cva, setColor, getColor, vuelessConfig } from "../utilsTs/utilUI.ts";
|
|
15
|
+
import { cloneDeep, isCSR } from "../utilsTs/utilHelper.ts";
|
|
16
16
|
import {
|
|
17
17
|
STRATEGY_TYPE,
|
|
18
18
|
CVA_CONFIG_KEY,
|
|
19
19
|
SYSTEM_CONFIG_KEY,
|
|
20
20
|
NESTED_COMPONENT_REG_EXP,
|
|
21
|
-
} from "../constants.
|
|
21
|
+
} from "../constants.ts";
|
|
22
22
|
|
|
23
23
|
import type { ComponentInternalInstance, Slot, VNode, ComputedRef } from "vue";
|
|
24
24
|
import type {
|
|
@@ -33,7 +33,7 @@ import type {
|
|
|
33
33
|
KeyAttrs,
|
|
34
34
|
KeysToExtend,
|
|
35
35
|
CVACompoundVariants,
|
|
36
|
-
} from "../types";
|
|
36
|
+
} from "../types.ts";
|
|
37
37
|
|
|
38
38
|
interface GetMergedConfig {
|
|
39
39
|
defaultConfig: Component;
|
|
@@ -58,18 +58,14 @@ interface MergeConfigs {
|
|
|
58
58
|
* 3. Component config (:config="{...}" props)
|
|
59
59
|
* 4. Component classes (class="...")
|
|
60
60
|
*/
|
|
61
|
-
export default function useUI(
|
|
62
|
-
defaultConfig: Component,
|
|
63
|
-
propsConfigGetter?: () =>
|
|
61
|
+
export default function useUI<T>(
|
|
62
|
+
defaultConfig: T & Component,
|
|
63
|
+
propsConfigGetter?: () => (T & Component) | undefined,
|
|
64
64
|
topLevelClassKey?: string,
|
|
65
65
|
) {
|
|
66
66
|
const { type, props } = getCurrentInstance() as ComponentInternalInstance;
|
|
67
67
|
const componentName = type.__name as ComponentNames;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (vuelessConfig.component && componentName) {
|
|
71
|
-
globalConfig = vuelessConfig.component[componentName] as UnknownObject as Component;
|
|
72
|
-
}
|
|
68
|
+
const globalConfig = vuelessConfig?.component?.[componentName] || {};
|
|
73
69
|
|
|
74
70
|
const isStrategyValid =
|
|
75
71
|
vuelessConfig.strategy && Object.values(STRATEGY_TYPE).includes(vuelessConfig.strategy);
|
|
@@ -79,7 +75,7 @@ export default function useUI(
|
|
|
79
75
|
: (STRATEGY_TYPE.merge as Strategies);
|
|
80
76
|
|
|
81
77
|
const firstClassKey = defaultConfig ? Object.keys(defaultConfig)[0] : "";
|
|
82
|
-
const config = ref({} as
|
|
78
|
+
const config = ref({} as T);
|
|
83
79
|
const attrs = useAttrs();
|
|
84
80
|
|
|
85
81
|
watchEffect(() => {
|
package/index.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
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 "./utilsTs/utilTheme";
|
|
5
|
+
import { themeInit } from "./utilsTs/utilTheme.ts";
|
|
6
6
|
|
|
7
7
|
import type { App } from 'vue'
|
|
8
|
-
import type { CreateVuelessOptions } from './types'
|
|
8
|
+
import type { CreateVuelessOptions } from './types.ts'
|
|
9
9
|
|
|
10
|
-
export { setTitle } from "./utils/utilHelper.
|
|
11
|
-
export { setTheme } from "./utilsTs/utilTheme";
|
|
10
|
+
export { setTitle } from "./utils/utilHelper.ts";
|
|
11
|
+
export { setTheme } from "./utilsTs/utilTheme.ts";
|
|
12
12
|
export { default as createVueI18nAdapter } from "./adatper.locale/vue-i18n.js";
|
|
13
13
|
export { default as defaultEnLocale } from "./adatper.locale/locales/en.js";
|
|
14
14
|
export { useLocale } from "./composables/useLocale.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.478-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -31,7 +31,7 @@
|
|
|
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
|
-
"ts:check": "vue-tsc --build --force
|
|
34
|
+
"ts:check": "vue-tsc --build --force",
|
|
35
35
|
"ts:build": "vue-tsc --build --force --declaration --emitDeclarationOnly",
|
|
36
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
37
|
"release:beta": "release-it prepatch --ci --npm.publish --preRelease=beta",
|
package/types.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { hasSlotContent } from "./composablesTs/useUI";
|
|
1
|
+
import { hasSlotContent } from "./composablesTs/useUI.ts";
|
|
2
2
|
|
|
3
3
|
// TODO: Import all components here
|
|
4
|
-
import UTextDefaultConfig from "./ui.text-block/config";
|
|
5
|
-
import UButtonDefaultConfig from "./ui.button/config";
|
|
4
|
+
import UTextDefaultConfig from "./ui.text-block/config.ts";
|
|
5
|
+
import UButtonDefaultConfig from "./ui.button/config.ts";
|
|
6
6
|
|
|
7
7
|
import type { ComputedRef } from "vue";
|
|
8
8
|
|
|
@@ -101,7 +101,7 @@ export interface Components {
|
|
|
101
101
|
|
|
102
102
|
export interface Component {
|
|
103
103
|
i18n?: UnknownObject;
|
|
104
|
-
defaults?:
|
|
104
|
+
defaults?: Defaults;
|
|
105
105
|
safelist?: () => TailwindSafelist[];
|
|
106
106
|
strategy?: Strategies;
|
|
107
107
|
transition?: Transition;
|
|
@@ -109,6 +109,11 @@ export interface Component {
|
|
|
109
109
|
[key: string]: (CVA & NestedComponent) | object | string | undefined;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
export type Defaults = {
|
|
113
|
+
color?: string;
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
};
|
|
116
|
+
|
|
112
117
|
export interface NestedComponent {
|
|
113
118
|
component: string;
|
|
114
119
|
[key: string]: Record<string, string | object> | string;
|
|
@@ -142,7 +147,7 @@ export interface VueAttrs {
|
|
|
142
147
|
}
|
|
143
148
|
|
|
144
149
|
export interface UseAttrs {
|
|
145
|
-
hasSlotContent
|
|
150
|
+
hasSlotContent: typeof hasSlotContent;
|
|
146
151
|
[key: string]: object | undefined;
|
|
147
152
|
}
|
|
148
153
|
|
package/ui.text-block/UText.vue
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { getDefault } from "../utilsTs/utilUI";
|
|
2
|
+
import { getDefault } from "../utilsTs/utilUI.ts";
|
|
3
3
|
|
|
4
|
-
import { UText } from "./constants";
|
|
5
|
-
import defaultConfig from "./config";
|
|
6
|
-
import useAttrs from "./useAttrs";
|
|
4
|
+
import { UText } from "./constants.ts";
|
|
5
|
+
import defaultConfig from "./config.ts";
|
|
6
|
+
import useAttrs from "./useAttrs.ts";
|
|
7
7
|
|
|
8
|
-
import type { UTextProps } from "./types";
|
|
8
|
+
import type { UTextProps } from "./types.ts";
|
|
9
9
|
|
|
10
10
|
defineOptions({ inheritAttrs: false });
|
|
11
11
|
|
|
12
12
|
const props = withDefaults(defineProps<UTextProps>(), {
|
|
13
|
-
size: getDefault(defaultConfig, UText).size,
|
|
14
|
-
align: getDefault(defaultConfig, UText).align,
|
|
15
|
-
line: getDefault(defaultConfig, UText).line,
|
|
13
|
+
size: getDefault<UTextProps>(defaultConfig, UText).size,
|
|
14
|
+
align: getDefault<UTextProps>(defaultConfig, UText).align,
|
|
15
|
+
line: getDefault<UTextProps>(defaultConfig, UText).line,
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
const { wrapperAttrs, htmlAttrs, hasSlotContent } = useAttrs(props);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source } from "@storybook/blocks";
|
|
2
|
-
import { getSource } from "../../
|
|
2
|
+
import { getSource } from "../../utilsTs/utilStorybook.ts";
|
|
3
3
|
|
|
4
4
|
import * as stories from "./stories.ts";
|
|
5
5
|
import defaultConfig from "../config.ts?raw"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
|
-
import { getArgTypes, getSlotNames, getSlotsFragment } from "../../
|
|
2
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../../utilsTs/utilStorybook.ts";
|
|
3
3
|
|
|
4
4
|
import UText from "../../ui.text-block/UText.vue";
|
|
5
5
|
import URow from "../../ui.container-row/URow.vue";
|
|
6
6
|
|
|
7
|
-
import type { UTextProps } from "../types";
|
|
7
|
+
import type { UTextProps } from "../types.ts";
|
|
8
8
|
|
|
9
9
|
interface UTextArgs extends UTextProps {
|
|
10
10
|
slotTemplate?: string;
|
package/ui.text-block/types.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import useUI from "../composablesTs/useUI";
|
|
1
|
+
import useUI from "../composablesTs/useUI.ts";
|
|
2
2
|
|
|
3
|
-
import defaultConfig from "./config";
|
|
3
|
+
import defaultConfig from "./config.ts";
|
|
4
4
|
|
|
5
|
-
import type { UseAttrs } from "../types";
|
|
6
|
-
import type { UTextProps } from "./types";
|
|
5
|
+
import type { UseAttrs } from "../types.ts";
|
|
6
|
+
import type { UTextProps } from "./types.ts";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type Config = Partial<typeof defaultConfig>;
|
|
9
|
+
|
|
10
|
+
export default function useAttrs(props: UTextProps): UseAttrs {
|
|
11
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI<Config>(defaultConfig, () => props.config);
|
|
10
12
|
|
|
11
13
|
const keysAttrs = getKeysAttrs();
|
|
12
14
|
|
|
@@ -14,5 +16,5 @@ export default function useAttrs(props: UTextProps) {
|
|
|
14
16
|
config,
|
|
15
17
|
...keysAttrs,
|
|
16
18
|
hasSlotContent,
|
|
17
|
-
}
|
|
19
|
+
};
|
|
18
20
|
}
|
package/utilsTs/utilHelper.ts
CHANGED
|
@@ -59,12 +59,10 @@ export function setTitle({ title = "", separator = " / ", suffix = "" }) {
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Check is code rendering on the server side.
|
|
62
|
-
* @returns {boolean}
|
|
63
62
|
*/
|
|
64
|
-
export const isSSR = typeof window === "undefined";
|
|
63
|
+
export const isSSR: boolean = typeof window === "undefined";
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
66
|
* Check is code rendering on the client side.
|
|
68
|
-
* @returns {boolean}
|
|
69
67
|
*/
|
|
70
|
-
export const isCSR = typeof window !== "undefined";
|
|
68
|
+
export const isCSR: boolean = typeof window !== "undefined";
|
package/utilsTs/utilPlatform.ts
CHANGED
package/utilsTs/utilStorybook.ts
CHANGED
|
@@ -104,15 +104,19 @@ const [webTypes]: WebTypes[] = Object.values(
|
|
|
104
104
|
import.meta.glob("/web-types.json", { eager: true, import: "default" }),
|
|
105
105
|
);
|
|
106
106
|
|
|
107
|
-
const getComponentData = (componentName: string) => {
|
|
107
|
+
const getComponentData = (componentName: string | undefined) => {
|
|
108
|
+
if (!componentName) return;
|
|
109
|
+
|
|
108
110
|
return webTypes.contributions.html.tags.find((item: Tag) => item.name === componentName);
|
|
109
111
|
};
|
|
110
112
|
|
|
111
|
-
export function getSlotNames(componentName: string) {
|
|
113
|
+
export function getSlotNames(componentName: string | undefined) {
|
|
114
|
+
if (!componentName) return;
|
|
115
|
+
|
|
112
116
|
return getComponentData(componentName)?.slots?.map((item) => item.name);
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
export function getArgTypes(componentName: string) {
|
|
119
|
+
export function getArgTypes(componentName: string | undefined) {
|
|
116
120
|
const component = getComponentData(componentName);
|
|
117
121
|
|
|
118
122
|
if (!component) return;
|
package/utilsTs/utilTailwind.ts
CHANGED
package/utilsTs/utilTheme.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fullTailwindConfig } from "./utilTailwind";
|
|
2
|
-
import { isSSR, isCSR } from "./utilHelper";
|
|
3
|
-
import { vuelessConfig } from "./utilUI";
|
|
1
|
+
import { fullTailwindConfig } from "./utilTailwind.ts";
|
|
2
|
+
import { isSSR, isCSR } from "./utilHelper.ts";
|
|
3
|
+
import { vuelessConfig } from "./utilUI.ts";
|
|
4
4
|
import {
|
|
5
5
|
BRAND_COLORS,
|
|
6
6
|
GRAYSCALE_COLOR,
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
DARK_MODE_SELECTOR,
|
|
15
15
|
GRAY_COLORS,
|
|
16
16
|
PX_IN_REM,
|
|
17
|
-
} from "../constants";
|
|
17
|
+
} from "../constants.ts";
|
|
18
18
|
|
|
19
|
-
import type { ThemeConfig, GrayColors, BrandColors, VuelessCssVariables } from "../types";
|
|
19
|
+
import type { ThemeConfig, GrayColors, BrandColors, VuelessCssVariables } from "../types.ts";
|
|
20
20
|
|
|
21
21
|
interface InternalThemeConfig extends ThemeConfig {
|
|
22
22
|
systemDarkMode?: boolean;
|
package/utilsTs/utilUI.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { merge } from "lodash-es";
|
|
2
2
|
import { defineConfig } from "cva";
|
|
3
3
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
-
import { cloneDeep, isCSR, isSSR } from "./utilHelper.
|
|
4
|
+
import { cloneDeep, isCSR, isSSR } from "./utilHelper.ts";
|
|
5
5
|
import {
|
|
6
6
|
BRAND_COLOR,
|
|
7
7
|
GRAYSCALE_COLOR,
|
|
8
8
|
DEFAULT_BRAND_COLOR,
|
|
9
9
|
NESTED_COMPONENT_REG_EXP,
|
|
10
|
-
} from "../constants.
|
|
10
|
+
} from "../constants.ts";
|
|
11
11
|
|
|
12
|
-
import type { BrandColors, Config, ComponentNames, Component } from "../types";
|
|
12
|
+
import type { BrandColors, Config, ComponentNames, Component, Defaults } from "../types.ts";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Load Vueless config from the project root.
|
|
@@ -95,11 +95,11 @@ export const cva = ({ base = "", variants = {}, compoundVariants = [], defaultVa
|
|
|
95
95
|
/**
|
|
96
96
|
* Return default values for component props, icons, etc..
|
|
97
97
|
*/
|
|
98
|
-
export function getDefault(defaultConfig: Component, name: ComponentNames) {
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
) as
|
|
98
|
+
export function getDefault<T>(defaultConfig: Component, name: ComponentNames): T {
|
|
99
|
+
const componentDefaults = cloneDeep(defaultConfig.defaults) || {};
|
|
100
|
+
const globalDefaults = cloneDeep(vuelessConfig.component?.[name]?.defaults) || {};
|
|
101
|
+
|
|
102
|
+
const defaults = merge(componentDefaults, globalDefaults) as T & Defaults;
|
|
103
103
|
|
|
104
104
|
if (defaults.color) {
|
|
105
105
|
defaults.color = getColor(defaults.color as BrandColors);
|
|
@@ -113,9 +113,10 @@ export function getDefault(defaultConfig: Component, name: ComponentNames) {
|
|
|
113
113
|
* Otherwise return given color.
|
|
114
114
|
*/
|
|
115
115
|
export function getColor(color: string) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
const isBrandColorGrayscale = (vuelessConfig.brand ?? DEFAULT_BRAND_COLOR) === GRAYSCALE_COLOR;
|
|
117
|
+
const isComponentColorBrand = color === BRAND_COLOR;
|
|
118
|
+
|
|
119
|
+
return isBrandColorGrayscale && isComponentColorBrand ? GRAYSCALE_COLOR : color;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
/**
|