vueless 1.1.1-beta.8 → 1.2.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/LICENSE +1 -1
- package/adapter.locale/locales/en.ts +11 -11
- package/adapter.locale/vue-i18n.ts +2 -3
- package/adapter.locale/vueless.ts +3 -3
- package/bin/commands/init.js +90 -59
- package/bin/constants.d.ts +3 -0
- package/bin/constants.js +0 -14
- package/composables/tests/useUI.test.ts +3 -3
- package/composables/useAutoPosition.ts +1 -1
- package/composables/useBreakpoint.ts +1 -1
- package/composables/useComponentLocaleMassages.ts +3 -3
- package/composables/useDarkMode.ts +2 -2
- package/composables/useLocale.ts +2 -2
- package/composables/useMutationObserver.ts +1 -1
- package/composables/useUI.ts +5 -5
- package/constants.d.ts +334 -0
- package/constants.js +23 -1
- package/icons/storybook/contact_mail.svg +1 -0
- package/icons/storybook/vpn_key.svg +1 -0
- package/icons/storybook/web_traffic.svg +1 -0
- package/index.d.ts +153 -18
- package/index.ts +158 -20
- package/modules.d.ts +33 -0
- package/package.json +33 -10
- package/plugin-vite.d.ts +1 -28
- package/plugin-vite.js +33 -28
- package/tailwind.css +30 -0
- package/types.ts +66 -74
- package/ui.boilerplate/UBoilerplate.vue +5 -5
- package/ui.boilerplate/storybook/{docs.hidden.mdx → docs.mdx} +3 -3
- package/ui.boilerplate/storybook/{stories.hidden.ts → stories.ts} +2 -2
- package/ui.boilerplate/tests/UBoilerplate.test.ts +1 -1
- package/ui.boilerplate/types.ts +2 -2
- package/ui.button/UButton.vue +6 -6
- package/ui.button/storybook/docs.mdx +3 -3
- package/ui.button/storybook/stories.ts +2 -2
- package/ui.button/tests/UButton.test.ts +1 -1
- package/ui.button/types.ts +2 -2
- package/ui.button-link/ULink.vue +6 -6
- package/ui.button-link/storybook/docs.mdx +3 -3
- package/ui.button-link/storybook/stories.ts +3 -3
- package/ui.button-link/tests/ULink.test.ts +1 -1
- package/ui.button-link/types.ts +2 -2
- package/ui.button-toggle/UToggle.vue +5 -5
- package/ui.button-toggle/storybook/docs.mdx +3 -3
- package/ui.button-toggle/storybook/stories.ts +4 -3
- package/ui.button-toggle/tests/UToggle.test.ts +1 -1
- package/ui.button-toggle/types.ts +2 -2
- package/ui.container-accordion/UAccordion.vue +26 -8
- package/ui.container-accordion/config.ts +1 -0
- package/ui.container-accordion/storybook/docs.mdx +3 -3
- package/ui.container-accordion/storybook/stories.ts +30 -3
- package/ui.container-accordion/tests/UAccordion.test.ts +47 -1
- package/ui.container-accordion/types.ts +2 -2
- package/ui.container-card/UCard.vue +6 -6
- package/ui.container-card/storybook/docs.mdx +3 -3
- package/ui.container-card/storybook/stories.ts +2 -2
- package/ui.container-card/tests/UCard.test.ts +1 -1
- package/ui.container-card/types.ts +2 -2
- package/ui.container-col/UCol.vue +5 -5
- package/ui.container-col/storybook/docs.mdx +3 -3
- package/ui.container-col/storybook/stories.ts +2 -2
- package/ui.container-col/tests/UCol.test.ts +1 -1
- package/ui.container-col/types.ts +2 -2
- package/ui.container-divider/UDivider.vue +6 -6
- package/ui.container-divider/storybook/docs.mdx +3 -3
- package/ui.container-divider/storybook/stories.ts +2 -2
- package/ui.container-divider/tests/UDivider.test.ts +1 -1
- package/ui.container-divider/types.ts +2 -2
- package/ui.container-group/UGroup.vue +5 -5
- package/ui.container-group/storybook/docs.mdx +3 -3
- package/ui.container-group/storybook/stories.ts +2 -2
- package/ui.container-group/types.ts +2 -2
- package/ui.container-groups/UGroups.vue +5 -5
- package/ui.container-groups/storybook/docs.mdx +3 -3
- package/ui.container-groups/storybook/stories.ts +2 -2
- package/ui.container-groups/tests/UGroups.test.ts +1 -1
- package/ui.container-groups/types.ts +2 -2
- package/ui.container-modal/UModal.vue +6 -6
- package/ui.container-modal/storybook/docs.mdx +3 -3
- package/ui.container-modal/storybook/stories.ts +3 -3
- package/ui.container-modal/tests/UModal.test.ts +2 -2
- package/ui.container-modal/types.ts +2 -2
- package/ui.container-modal-confirm/UModalConfirm.vue +7 -7
- package/ui.container-modal-confirm/storybook/docs.mdx +3 -3
- package/ui.container-modal-confirm/storybook/stories.ts +3 -3
- package/ui.container-modal-confirm/tests/UModalConfirm.test.ts +1 -1
- package/ui.container-modal-confirm/types.ts +2 -2
- package/ui.container-page/UPage.vue +6 -6
- package/ui.container-page/storybook/docs.mdx +3 -3
- package/ui.container-page/storybook/stories.ts +2 -2
- package/ui.container-page/tests/UPage.test.ts +2 -2
- package/ui.container-page/types.ts +2 -2
- package/ui.container-row/URow.vue +5 -5
- package/ui.container-row/storybook/docs.mdx +3 -3
- package/ui.container-row/storybook/stories.ts +2 -2
- package/ui.container-row/tests/URow.test.ts +1 -1
- package/ui.container-row/types.ts +2 -2
- package/ui.data-list/UDataList.vue +8 -8
- package/ui.data-list/storybook/docs.mdx +3 -3
- package/ui.data-list/storybook/stories.ts +3 -3
- package/ui.data-list/tests/UDataList.test.ts +1 -1
- package/ui.data-list/types.ts +2 -2
- package/ui.data-table/UTable.vue +29 -23
- package/ui.data-table/UTableRow.vue +8 -8
- package/ui.data-table/config.ts +1 -1
- package/ui.data-table/storybook/docs.mdx +3 -3
- package/ui.data-table/storybook/stories.ts +14 -3
- package/ui.data-table/tests/UTable.test.ts +20 -2
- package/ui.data-table/tests/UTableRow.test.ts +1 -1
- package/ui.data-table/types.ts +3 -3
- package/ui.data-table/utilTable.ts +1 -1
- package/ui.dropdown-badge/UDropdownBadge.vue +7 -7
- package/ui.dropdown-badge/storybook/docs.mdx +3 -3
- package/ui.dropdown-badge/storybook/stories.ts +2 -2
- package/ui.dropdown-badge/tests/UDropdownBadge.test.ts +1 -1
- package/ui.dropdown-badge/types.ts +3 -3
- package/ui.dropdown-button/UDropdownButton.vue +8 -7
- package/ui.dropdown-button/config.ts +9 -1
- package/ui.dropdown-button/storybook/docs.mdx +3 -3
- package/ui.dropdown-button/storybook/stories.ts +3 -3
- package/ui.dropdown-button/tests/UDropdownButton.test.ts +17 -1
- package/ui.dropdown-button/types.ts +8 -3
- package/ui.dropdown-link/UDropdownLink.vue +7 -7
- package/ui.dropdown-link/config.ts +1 -1
- package/ui.dropdown-link/storybook/docs.mdx +3 -3
- package/ui.dropdown-link/storybook/stories.ts +2 -2
- package/ui.dropdown-link/tests/UDropdownLink.test.ts +1 -1
- package/ui.dropdown-link/types.ts +3 -3
- package/ui.form-calendar/UCalendar.vue +11 -11
- package/ui.form-calendar/UCalendarDayView.vue +6 -6
- package/ui.form-calendar/UCalendarMonthView.vue +6 -6
- package/ui.form-calendar/UCalendarYearView.vue +6 -6
- package/ui.form-calendar/storybook/docs.mdx +3 -3
- package/ui.form-calendar/storybook/stories.ts +3 -3
- package/ui.form-calendar/tests/UCalendar.test.ts +2 -2
- package/ui.form-calendar/tests/UCalendarDayView.test.ts +2 -2
- package/ui.form-calendar/tests/UCalendarMonthView.test.ts +2 -2
- package/ui.form-calendar/tests/UCalendarYearView.test.ts +2 -2
- package/ui.form-calendar/types.ts +3 -3
- package/ui.form-calendar/utilCalendar.ts +4 -4
- package/ui.form-calendar/utilDate.ts +1 -1
- package/ui.form-calendar/utilFormatting.ts +1 -1
- package/ui.form-checkbox/UCheckbox.vue +6 -6
- package/ui.form-checkbox/storybook/docs.mdx +3 -3
- package/ui.form-checkbox/storybook/stories.ts +2 -2
- package/ui.form-checkbox/tests/UCheckbox.test.ts +1 -1
- package/ui.form-checkbox/types.ts +2 -2
- package/ui.form-checkbox-group/UCheckboxGroup.vue +6 -6
- package/ui.form-checkbox-group/storybook/docs.mdx +3 -3
- package/ui.form-checkbox-group/storybook/stories.ts +2 -2
- package/ui.form-checkbox-group/tests/UCheckboxGroup.test.ts +1 -1
- package/ui.form-checkbox-group/types.ts +3 -3
- package/ui.form-checkbox-multi-state/UCheckboxMultiState.vue +8 -8
- package/ui.form-checkbox-multi-state/storybook/docs.mdx +3 -3
- package/ui.form-checkbox-multi-state/storybook/stories.ts +2 -2
- package/ui.form-checkbox-multi-state/tests/UCheckboxMultiState.test.ts +1 -1
- package/ui.form-checkbox-multi-state/types.ts +3 -3
- package/ui.form-color-picker/UColorPicker.vue +6 -6
- package/ui.form-color-picker/storybook/docs.mdx +3 -3
- package/ui.form-color-picker/storybook/stories.ts +2 -2
- package/ui.form-color-picker/tests/UColorPicker.test.ts +1 -1
- package/ui.form-color-picker/types.ts +2 -2
- package/ui.form-date-picker/UDatePicker.vue +14 -14
- package/ui.form-date-picker/storybook/docs.mdx +3 -3
- package/ui.form-date-picker/storybook/stories.ts +3 -3
- package/ui.form-date-picker/tests/UDatePicker.test.ts +1 -1
- package/ui.form-date-picker/types.ts +2 -2
- package/ui.form-date-picker-range/UDatePickerRange.vue +14 -14
- package/ui.form-date-picker-range/UDatePickerRangeInputs.vue +6 -6
- package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue +5 -5
- package/ui.form-date-picker-range/storybook/docs.mdx +3 -3
- package/ui.form-date-picker-range/storybook/stories.ts +4 -4
- package/ui.form-date-picker-range/tests/UDatePickerRange.test.ts +1 -1
- package/ui.form-date-picker-range/types.ts +4 -4
- package/ui.form-date-picker-range/useLocale.ts +6 -6
- package/ui.form-date-picker-range/useUserFormat.ts +5 -5
- package/ui.form-date-picker-range/utilDateRange.ts +2 -2
- package/ui.form-date-picker-range/utilValidation.ts +1 -1
- package/ui.form-input/UInput.vue +7 -7
- package/ui.form-input/config.ts +1 -1
- package/ui.form-input/storybook/docs.mdx +3 -3
- package/ui.form-input/storybook/stories.ts +2 -2
- package/ui.form-input/tests/UInput.test.ts +1 -1
- package/ui.form-input/types.ts +2 -2
- package/ui.form-input-counter/UInputCounter.vue +5 -5
- package/ui.form-input-counter/storybook/docs.mdx +3 -3
- package/ui.form-input-counter/storybook/stories.ts +2 -2
- package/ui.form-input-counter/tests/UInputCounter.test.ts +1 -1
- package/ui.form-input-counter/types.ts +2 -2
- package/ui.form-input-file/UInputFile.vue +8 -8
- package/ui.form-input-file/storybook/docs.mdx +3 -3
- package/ui.form-input-file/storybook/stories.ts +2 -2
- package/ui.form-input-file/tests/UInputFile.test.ts +1 -1
- package/ui.form-input-file/types.ts +2 -2
- package/ui.form-input-number/UInputNumber.vue +7 -7
- package/ui.form-input-number/storybook/docs.mdx +3 -3
- package/ui.form-input-number/storybook/stories.ts +2 -2
- package/ui.form-input-number/tests/UInputNumber.test.ts +1 -1
- package/ui.form-input-number/types.ts +2 -2
- package/ui.form-input-number/useFormatNumber.ts +3 -3
- package/ui.form-input-number/utilFormat.ts +2 -2
- package/ui.form-input-password/UInputPassword.vue +6 -6
- package/ui.form-input-password/storybook/docs.mdx +3 -3
- package/ui.form-input-password/storybook/stories.ts +2 -2
- package/ui.form-input-password/tests/UInputPassword.test.ts +1 -1
- package/ui.form-input-password/types.ts +2 -2
- package/ui.form-input-rating/UInputRating.vue +6 -6
- package/ui.form-input-rating/storybook/docs.mdx +3 -3
- package/ui.form-input-rating/storybook/stories.ts +2 -2
- package/ui.form-input-rating/tests/UInputRating.test.ts +1 -1
- package/ui.form-input-rating/types.ts +2 -2
- package/ui.form-input-search/UInputSearch.vue +6 -6
- package/ui.form-input-search/storybook/docs.mdx +3 -3
- package/ui.form-input-search/storybook/stories.ts +2 -2
- package/ui.form-input-search/tests/UInputSearch.test.ts +1 -1
- package/ui.form-input-search/types.ts +2 -2
- package/ui.form-label/ULabel.vue +6 -6
- package/ui.form-label/storybook/docs.mdx +3 -3
- package/ui.form-label/storybook/stories.ts +2 -2
- package/ui.form-label/tests/ULabel.test.ts +1 -1
- package/ui.form-label/types.ts +2 -2
- package/ui.form-listbox/UListbox.vue +10 -10
- package/ui.form-listbox/storybook/docs.mdx +3 -3
- package/ui.form-listbox/storybook/stories.ts +7 -7
- package/ui.form-listbox/tests/UListbox.test.ts +1 -1
- package/ui.form-listbox/types.ts +2 -2
- package/ui.form-listbox/usePointer.ts +1 -1
- package/ui.form-listbox/utilListbox.ts +1 -1
- package/ui.form-radio/URadio.vue +6 -6
- package/ui.form-radio/storybook/docs.mdx +3 -3
- package/ui.form-radio/storybook/stories.ts +2 -2
- package/ui.form-radio/tests/URadio.test.ts +1 -1
- package/ui.form-radio/types.ts +2 -2
- package/ui.form-radio-group/URadioGroup.vue +5 -5
- package/ui.form-radio-group/storybook/docs.mdx +3 -3
- package/ui.form-radio-group/storybook/stories.ts +2 -2
- package/ui.form-radio-group/tests/URadioGroup.test.ts +6 -2
- package/ui.form-radio-group/types.ts +2 -2
- package/ui.form-select/USelect.vue +13 -12
- package/ui.form-select/config.ts +1 -1
- package/ui.form-select/storybook/docs.mdx +3 -3
- package/ui.form-select/storybook/stories.ts +7 -7
- package/ui.form-select/tests/USelect.test.ts +1 -1
- package/ui.form-select/types.ts +3 -3
- package/ui.form-select/utilSelect.ts +1 -1
- package/ui.form-switch/USwitch.vue +6 -6
- package/ui.form-switch/storybook/docs.mdx +3 -3
- package/ui.form-switch/storybook/stories.ts +2 -2
- package/ui.form-switch/tests/USwitch.test.ts +1 -1
- package/ui.form-switch/types.ts +2 -2
- package/ui.form-textarea/UTextarea.vue +7 -7
- package/ui.form-textarea/storybook/docs.mdx +3 -3
- package/ui.form-textarea/storybook/stories.ts +3 -3
- package/ui.form-textarea/tests/UTextarea.test.ts +1 -1
- package/ui.form-textarea/types.ts +2 -2
- package/ui.image-avatar/UAvatar.vue +5 -5
- package/ui.image-avatar/storybook/docs.mdx +3 -3
- package/ui.image-avatar/storybook/stories.ts +3 -3
- package/ui.image-avatar/tests/UAvatar.test.ts +1 -1
- package/ui.image-avatar/types.ts +2 -2
- package/ui.image-icon/UIcon.vue +6 -6
- package/ui.image-icon/storybook/docs.mdx +3 -3
- package/ui.image-icon/storybook/stories.ts +2 -2
- package/ui.image-icon/tests/UIcon.test.ts +0 -1
- package/ui.image-icon/types.ts +2 -2
- package/ui.loader/ULoader.vue +5 -5
- package/ui.loader/storybook/docs.mdx +3 -3
- package/ui.loader/storybook/stories.ts +2 -2
- package/ui.loader/tests/ULoader.test.ts +1 -1
- package/ui.loader/types.ts +2 -2
- package/ui.loader-overlay/ULoaderOverlay.vue +6 -6
- package/ui.loader-overlay/storybook/docs.mdx +3 -3
- package/ui.loader-overlay/storybook/stories.ts +2 -2
- package/ui.loader-overlay/tests/ULoaderOverlay.test.ts +2 -2
- package/ui.loader-overlay/types.ts +2 -2
- package/ui.loader-progress/ULoaderProgress.vue +7 -7
- package/ui.loader-progress/storybook/docs.mdx +3 -3
- package/ui.loader-progress/storybook/stories.ts +4 -4
- package/ui.loader-progress/tests/ULoaderProgress.test.ts +2 -2
- package/ui.loader-progress/types.ts +2 -2
- package/ui.loader-progress/useLoaderProgress.ts +1 -1
- package/ui.navigation-breadcrumbs/UBreadcrumbs.vue +6 -6
- package/ui.navigation-breadcrumbs/storybook/docs.mdx +3 -3
- package/ui.navigation-breadcrumbs/storybook/stories.ts +13 -2
- package/ui.navigation-breadcrumbs/tests/UBreadcrumbs.test.ts +2 -2
- package/ui.navigation-breadcrumbs/types.ts +3 -3
- package/ui.navigation-pagination/UPagination.vue +7 -12
- package/ui.navigation-pagination/config.ts +1 -0
- package/ui.navigation-pagination/storybook/docs.mdx +3 -3
- package/ui.navigation-pagination/storybook/stories.ts +5 -3
- package/ui.navigation-pagination/tests/UPagination.test.ts +2 -2
- package/ui.navigation-pagination/types.ts +3 -3
- package/ui.navigation-progress/UProgress.vue +5 -5
- package/ui.navigation-progress/UStepperProgress.vue +3 -3
- package/ui.navigation-progress/storybook/docs.mdx +3 -3
- package/ui.navigation-progress/storybook/stories.ts +2 -2
- package/ui.navigation-progress/tests/UProgress.test.ts +1 -1
- package/ui.navigation-progress/types.ts +2 -2
- package/ui.navigation-tab/UTab.vue +6 -6
- package/ui.navigation-tab/storybook/docs.mdx +3 -3
- package/ui.navigation-tab/storybook/stories.ts +2 -2
- package/ui.navigation-tab/types.ts +2 -2
- package/ui.navigation-tabs/UTabs.vue +5 -5
- package/ui.navigation-tabs/storybook/docs.mdx +3 -3
- package/ui.navigation-tabs/storybook/stories.ts +2 -2
- package/ui.navigation-tabs/tests/UTabs.test.ts +1 -1
- package/ui.navigation-tabs/types.ts +2 -2
- package/ui.other-chip/UChip.vue +5 -5
- package/ui.other-chip/storybook/docs.mdx +3 -3
- package/ui.other-chip/storybook/stories.ts +13 -2
- package/ui.other-chip/tests/UChip.test.ts +1 -1
- package/ui.other-chip/types.ts +2 -2
- package/ui.other-dot/UDot.vue +5 -5
- package/ui.other-dot/storybook/docs.mdx +3 -3
- package/ui.other-dot/storybook/stories.ts +2 -2
- package/ui.other-dot/tests/UDot.test.ts +1 -1
- package/ui.other-dot/types.ts +2 -2
- package/ui.other-theme-color-toggle/UThemeColorToggle.vue +6 -6
- package/ui.other-theme-color-toggle/storybook/docs.mdx +3 -3
- package/ui.other-theme-color-toggle/storybook/stories.ts +2 -2
- package/ui.other-theme-color-toggle/tests/UThemeColorToggle.test.ts +1 -1
- package/ui.other-theme-color-toggle/types.ts +2 -2
- package/ui.skeleton/USkeleton.vue +5 -5
- package/ui.skeleton/storybook/docs.mdx +3 -3
- package/ui.skeleton/storybook/stories.ts +7 -2
- package/ui.skeleton/tests/USkeleton.test.ts +1 -1
- package/ui.skeleton/types.ts +2 -2
- package/ui.skeleton-choice/USkeletonChoice.vue +5 -5
- package/ui.skeleton-choice/storybook/docs.mdx +3 -3
- package/ui.skeleton-choice/storybook/stories.ts +7 -2
- package/ui.skeleton-choice/tests/USkeletonChoice.test.ts +1 -1
- package/ui.skeleton-choice/types.ts +2 -2
- package/ui.skeleton-input/USkeletonInput.vue +5 -5
- package/ui.skeleton-input/storybook/docs.mdx +3 -3
- package/ui.skeleton-input/storybook/stories.ts +13 -2
- package/ui.skeleton-input/tests/USkeletonInput.test.ts +1 -1
- package/ui.skeleton-input/types.ts +2 -2
- package/ui.skeleton-text/USkeletonText.vue +5 -5
- package/ui.skeleton-text/storybook/docs.mdx +3 -3
- package/ui.skeleton-text/storybook/stories.ts +7 -2
- package/ui.skeleton-text/tests/USkeletonText.test.ts +1 -1
- package/ui.skeleton-text/types.ts +2 -2
- package/ui.text-alert/UAlert.vue +6 -6
- package/ui.text-alert/storybook/docs.mdx +3 -3
- package/ui.text-alert/storybook/stories.ts +2 -2
- package/ui.text-alert/tests/UAlert.test.ts +1 -1
- package/ui.text-alert/types.ts +2 -2
- package/ui.text-badge/UBadge.vue +6 -6
- package/ui.text-badge/storybook/docs.mdx +3 -3
- package/ui.text-badge/storybook/stories.ts +2 -2
- package/ui.text-badge/tests/UBadge.test.ts +1 -1
- package/ui.text-badge/types.ts +2 -2
- package/ui.text-block/UText.vue +5 -5
- package/ui.text-block/storybook/docs.mdx +3 -3
- package/ui.text-block/storybook/stories.ts +2 -2
- package/ui.text-block/tests/UText.test.ts +1 -1
- package/ui.text-block/types.ts +2 -2
- package/ui.text-empty/UEmpty.vue +5 -5
- package/ui.text-empty/storybook/docs.mdx +3 -3
- package/ui.text-empty/storybook/stories.ts +2 -2
- package/ui.text-empty/tests/UEmpty.test.ts +1 -1
- package/ui.text-empty/types.ts +2 -2
- package/ui.text-file/UFile.vue +5 -5
- package/ui.text-file/storybook/docs.mdx +3 -3
- package/ui.text-file/storybook/stories.ts +2 -2
- package/ui.text-file/tests/UFile.test.ts +1 -1
- package/ui.text-file/types.ts +2 -2
- package/ui.text-files/UFiles.vue +6 -6
- package/ui.text-files/storybook/docs.mdx +3 -3
- package/ui.text-files/storybook/stories.ts +2 -2
- package/ui.text-files/tests/UFiles.test.ts +1 -1
- package/ui.text-files/types.ts +2 -2
- package/ui.text-header/UHeader.vue +5 -5
- package/ui.text-header/storybook/docs.mdx +3 -3
- package/ui.text-header/storybook/stories.ts +2 -2
- package/ui.text-header/tests/UHeader.test.ts +1 -1
- package/ui.text-header/types.ts +2 -2
- package/ui.text-notify/UNotify.vue +6 -6
- package/ui.text-notify/storybook/docs.mdx +3 -3
- package/ui.text-notify/storybook/stories.ts +3 -3
- package/ui.text-notify/tests/UNotify.test.ts +4 -4
- package/ui.text-notify/types.ts +3 -3
- package/ui.text-notify/utilNotify.ts +3 -3
- package/ui.text-number/UNumber.vue +6 -6
- package/ui.text-number/storybook/docs.mdx +3 -3
- package/ui.text-number/storybook/stories.ts +13 -2
- package/ui.text-number/tests/UNumber.test.ts +2 -2
- package/ui.text-number/types.ts +2 -2
- package/utils/helper.ts +1 -1
- package/utils/node/dynamicProps.d.ts +2 -0
- package/utils/node/dynamicProps.js +17 -8
- package/utils/node/helper.d.ts +15 -0
- package/utils/node/helper.js +73 -27
- package/utils/node/loaderIcon.d.ts +7 -0
- package/utils/node/loaderIcon.js +12 -8
- package/utils/node/loaderSvg.d.ts +1 -0
- package/utils/node/mergeConfigs.d.ts +13 -0
- package/utils/node/storybook.d.ts +2 -0
- package/utils/node/storybook.js +93 -0
- package/utils/node/tailwindSafelist.d.ts +6 -0
- package/utils/node/vuelessConfig.d.ts +9 -0
- package/utils/node/vuelessConfig.js +30 -11
- package/utils/node/vuelessResolver.d.ts +13 -0
- package/utils/node/vuelessResolver.js +30 -14
- package/utils/node/webTypes.d.ts +1 -0
- package/utils/node/webTypes.js +4 -2
- package/utils/platform.ts +1 -1
- package/utils/storybook.ts +2 -2
- package/utils/theme.ts +20 -18
- package/utils/ui.ts +33 -8
- package/{directives/clickOutside → v.click-outside}/storybook/docs.mdx +2 -2
- package/{directives/clickOutside → v.click-outside}/storybook/stories.ts +5 -5
- package/{directives/clickOutside → v.click-outside}/vClickOutside.ts +1 -1
- package/v.tooltip/storybook/docs.mdx +47 -0
- package/{directives/tooltip → v.tooltip}/storybook/stories.ts +14 -11
- package/{directives/tooltip → v.tooltip}/vTooltip.ts +4 -9
- package/directives/index.js +0 -7
- package/directives/tooltip/storybook/docs.mdx +0 -10
- package/utils/node/dynamicStories.js +0 -62
- package/utils/tailwindConfig.ts +0 -36
- /package/{directives/clickOutside → v.click-outside}/types.ts +0 -0
- /package/{directives/tooltip → v.tooltip}/types.ts +0 -0
package/LICENSE
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import selectConfig from "../../ui.form-select/config
|
|
2
|
-
import switchConfig from "../../ui.form-switch/config
|
|
3
|
-
import inputFileConfig from "../../ui.form-input-file/config
|
|
4
|
-
import listboxConfig from "../../ui.form-listbox/config
|
|
5
|
-
import modalConfirmConfig from "../../ui.container-modal-confirm/config
|
|
6
|
-
import tableConfig from "../../ui.data-table/config
|
|
7
|
-
import calendarConfig from "../../ui.form-calendar/config
|
|
8
|
-
import datepickerConfig from "../../ui.form-date-picker/config
|
|
9
|
-
import datepickerRangeConfig from "../../ui.form-date-picker-range/config
|
|
10
|
-
import dataListConfig from "../../ui.data-list/config
|
|
11
|
-
import notifyDefaultConfig from "../../ui.text-notify/config
|
|
1
|
+
import selectConfig from "../../ui.form-select/config";
|
|
2
|
+
import switchConfig from "../../ui.form-switch/config";
|
|
3
|
+
import inputFileConfig from "../../ui.form-input-file/config";
|
|
4
|
+
import listboxConfig from "../../ui.form-listbox/config";
|
|
5
|
+
import modalConfirmConfig from "../../ui.container-modal-confirm/config";
|
|
6
|
+
import tableConfig from "../../ui.data-table/config";
|
|
7
|
+
import calendarConfig from "../../ui.form-calendar/config";
|
|
8
|
+
import datepickerConfig from "../../ui.form-date-picker/config";
|
|
9
|
+
import datepickerRangeConfig from "../../ui.form-date-picker-range/config";
|
|
10
|
+
import dataListConfig from "../../ui.data-list/config";
|
|
11
|
+
import notifyDefaultConfig from "../../ui.text-notify/config";
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
USelect: selectConfig.i18n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { I18n } from "vue-i18n";
|
|
2
|
-
import type { LocaleInstance } from "../types
|
|
1
|
+
import type { I18n } from "virtual:vueless/vue-i18n";
|
|
2
|
+
import type { LocaleInstance } from "../types";
|
|
3
3
|
|
|
4
4
|
export function createVueI18nAdapter(i18n: I18n): LocaleInstance {
|
|
5
5
|
return {
|
|
@@ -7,7 +7,6 @@ export function createVueI18nAdapter(i18n: I18n): LocaleInstance {
|
|
|
7
7
|
locale: i18n.global.locale,
|
|
8
8
|
fallback: i18n.global.fallbackLocale as string,
|
|
9
9
|
messages: i18n.global.messages,
|
|
10
|
-
// @ts-expect-error Type instantiation is excessively deep and possibly infinite
|
|
11
10
|
t: (key: string, ...params: unknown[]) => i18n.global.t(key, params),
|
|
12
11
|
tm: i18n.global.tm,
|
|
13
12
|
n: i18n.global.n,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { shallowRef, ref } from "vue";
|
|
2
2
|
import { merge } from "lodash-es";
|
|
3
3
|
|
|
4
|
-
import en from "./locales/en
|
|
4
|
+
import en from "./locales/en";
|
|
5
5
|
|
|
6
6
|
import type { Ref } from "vue";
|
|
7
|
-
import type { VueMessageType } from "vue-i18n";
|
|
8
|
-
import type { UnknownObject, LocaleOptions, LocaleMessages, LocaleInstance } from "../types
|
|
7
|
+
import type { VueMessageType } from "virtual:vueless/vue-i18n";
|
|
8
|
+
import type { UnknownObject, LocaleOptions, LocaleMessages, LocaleInstance } from "../types";
|
|
9
9
|
|
|
10
10
|
const FALLBACK_LOCALE_CODE = "en";
|
|
11
11
|
|
package/bin/commands/init.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
|
|
3
|
-
import { cwd } from "node:process";
|
|
4
3
|
import path from "node:path";
|
|
5
|
-
import {
|
|
6
|
-
import { writeFile, rename, readFile } from "node:fs/promises";
|
|
4
|
+
import { cwd } from "node:process";
|
|
7
5
|
import { styleText } from "node:util";
|
|
6
|
+
import { existsSync, mkdirSync } from "node:fs";
|
|
7
|
+
import { writeFile, rename } from "node:fs/promises";
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
SUPPRESS_TS_CHECK,
|
|
11
|
-
COMPONENTS_INDEX_EXPORT,
|
|
12
|
-
COMPONENTS_INDEX_COMMENT,
|
|
13
|
-
DEFAULT_VUELESS_CONFIG_CONTENT,
|
|
14
|
-
} from "../constants.js";
|
|
9
|
+
import { detectTypeScript, generateConfigIndexContent } from "../../utils/node/helper.js";
|
|
15
10
|
|
|
11
|
+
import { DEFAULT_VUELESS_CONFIG_CONTENT } from "../constants.js";
|
|
16
12
|
import {
|
|
17
13
|
JAVASCRIPT_EXT,
|
|
18
14
|
TYPESCRIPT_EXT,
|
|
15
|
+
VUELESS_CONFIG_DIR,
|
|
19
16
|
CONFIG_INDEX_FILE_NAME,
|
|
20
17
|
VUELESS_CONFIG_FILE_NAME,
|
|
21
18
|
} from "../../constants.js";
|
|
22
19
|
|
|
23
|
-
const vuelessInitOptions = ["--ts", "--js"];
|
|
20
|
+
const vuelessInitOptions = ["--ts", "--js", "--pnpm", "--yarn"];
|
|
24
21
|
|
|
25
22
|
/**
|
|
26
|
-
* Initializes Vueless in the project by creating a default config file and
|
|
23
|
+
* Initializes Vueless in the project by creating a default config file and vueless config directory.
|
|
27
24
|
* @param {string[]} options - The function options.
|
|
28
25
|
* @param {boolean} options.includes("--ts") - If true, creates a TypeScript config file.
|
|
29
26
|
* @param {boolean} options.includes("--js") - If true, creates a JavaScript config file.
|
|
27
|
+
* @param {boolean} options.includes("--pnpm") - If true, creates a `.npmrc` config with hoisting disabled.
|
|
28
|
+
* @param {boolean} options.includes("--yarn") - If true, creates a `.yarnrc.yml` config with pnp disabled.
|
|
30
29
|
*/
|
|
31
30
|
export async function vuelessInit(options) {
|
|
32
31
|
const isValidOptions = options.every((option) => vuelessInitOptions.includes(option));
|
|
@@ -40,73 +39,105 @@ export async function vuelessInit(options) {
|
|
|
40
39
|
const hasTypeScript = await detectTypeScript();
|
|
41
40
|
const fileExt = options.includes("--ts") || hasTypeScript ? TYPESCRIPT_EXT : JAVASCRIPT_EXT;
|
|
42
41
|
|
|
43
|
-
const
|
|
42
|
+
const destPath = path.format({
|
|
44
43
|
dir: cwd(),
|
|
45
44
|
name: VUELESS_CONFIG_FILE_NAME,
|
|
46
45
|
ext: fileExt,
|
|
47
46
|
});
|
|
48
47
|
|
|
49
48
|
/* Backup existing config if it exists. */
|
|
50
|
-
|
|
51
|
-
const timestamp = new Date().valueOf();
|
|
52
|
-
const renamedTarget = `${VUELESS_CONFIG_FILE_NAME}-backup-${timestamp}${fileExt}`;
|
|
53
|
-
|
|
54
|
-
await rename(formattedDestPath, renamedTarget);
|
|
55
|
-
|
|
56
|
-
console.warn(
|
|
57
|
-
styleText(
|
|
58
|
-
"yellow",
|
|
59
|
-
// eslint-disable-next-line vue/max-len
|
|
60
|
-
`Current Vueless config backed into: '${path.basename(renamedTarget)}' folder. Don't forget to remove it before commit.`,
|
|
61
|
-
),
|
|
62
|
-
);
|
|
63
|
-
}
|
|
49
|
+
await backupVuelessConfig(destPath);
|
|
64
50
|
|
|
65
51
|
/* Create a default config file. */
|
|
66
|
-
await
|
|
52
|
+
await createVuelessConfig(destPath);
|
|
53
|
+
|
|
54
|
+
/* Create a vueless config directory and index file. */
|
|
55
|
+
await createVuelessConfigDir(fileExt);
|
|
56
|
+
|
|
57
|
+
/* Create pnpm package manager config. */
|
|
58
|
+
if (options.includes("--pnpm")) {
|
|
59
|
+
await createPackageManagerConfig(".npmrc", [
|
|
60
|
+
"# pnpm",
|
|
61
|
+
"# Vueless: disable hoisting for the package related modules.",
|
|
62
|
+
"public-hoist-pattern[] = tailwindcss",
|
|
63
|
+
"public-hoist-pattern[] = *storybook*",
|
|
64
|
+
"public-hoist-pattern[] = prettier2",
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
/* Create yarn 2+ package manager config. */
|
|
69
|
+
if (options.includes("--yarn")) {
|
|
70
|
+
await createPackageManagerConfig(".yarnrc.yml", [
|
|
71
|
+
"# Yarn 2+",
|
|
72
|
+
"# Vueless: install Node packages into a standard node_modules folder, the same way as Yarn Classic or npm.",
|
|
73
|
+
"nodeLinker: node-modules",
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Backs up the existing Vueless config file by renaming it.
|
|
80
|
+
* @param {string} destPath - The path to the Vueless config file.
|
|
81
|
+
*/
|
|
82
|
+
async function backupVuelessConfig(destPath) {
|
|
83
|
+
if (!existsSync(destPath)) return;
|
|
84
|
+
|
|
85
|
+
const fileNameWithoutExtension = path.basename(destPath, path.extname(destPath));
|
|
86
|
+
const extension = path.extname(destPath);
|
|
87
|
+
const timestamp = new Date().valueOf();
|
|
88
|
+
|
|
89
|
+
const backupConfigName = `${fileNameWithoutExtension}-backup-${timestamp}${extension}`;
|
|
90
|
+
|
|
91
|
+
await rename(destPath, backupConfigName);
|
|
92
|
+
|
|
93
|
+
console.warn(
|
|
69
94
|
styleText(
|
|
70
|
-
"
|
|
71
|
-
`
|
|
95
|
+
"yellow",
|
|
96
|
+
`Current Vueless config backed into: '${path.basename(backupConfigName)}'. Remove it before commit.`,
|
|
72
97
|
),
|
|
73
98
|
);
|
|
99
|
+
}
|
|
74
100
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Creates a default Vueless config file.
|
|
103
|
+
* @param {string} destPath - The path to the Vueless config file.
|
|
104
|
+
*/
|
|
105
|
+
async function createVuelessConfig(destPath) {
|
|
106
|
+
await writeFile(destPath, DEFAULT_VUELESS_CONFIG_CONTENT, "utf-8");
|
|
78
107
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
108
|
+
const fileName = path.basename(destPath);
|
|
109
|
+
|
|
110
|
+
console.log(styleText("green", `The '${fileName}' was created in the project root.`));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Creates a Vueless config directory and index file.
|
|
115
|
+
* @param {string} fileExt - The file extension to use for the index file.
|
|
116
|
+
*/
|
|
117
|
+
async function createVuelessConfigDir(fileExt) {
|
|
118
|
+
const vuelessDir = path.join(cwd(), VUELESS_CONFIG_DIR);
|
|
85
119
|
|
|
86
|
-
|
|
120
|
+
if (existsSync(vuelessDir)) return;
|
|
87
121
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"utf-8",
|
|
122
|
+
mkdirSync(vuelessDir);
|
|
123
|
+
console.log(
|
|
124
|
+
styleText("green", `The '${VUELESS_CONFIG_DIR}' directory was created in the project root.`),
|
|
92
125
|
);
|
|
126
|
+
|
|
127
|
+
const indexFileContent = await generateConfigIndexContent();
|
|
128
|
+
const destPath = path.join(vuelessDir, `${CONFIG_INDEX_FILE_NAME}${fileExt}`);
|
|
129
|
+
|
|
130
|
+
await writeFile(destPath, indexFileContent, "utf-8");
|
|
93
131
|
}
|
|
94
132
|
|
|
95
133
|
/**
|
|
96
|
-
*
|
|
97
|
-
* @
|
|
134
|
+
* Creates a package manager config file.
|
|
135
|
+
* @param {string} fileName - The name of the config file.
|
|
136
|
+
* @param {string[]} fileContent - The content of the config file.
|
|
98
137
|
*/
|
|
99
|
-
async function
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
105
|
-
|
|
106
|
-
return Boolean(deps.typescript);
|
|
107
|
-
} catch (error) {
|
|
108
|
-
console.error("Failed to detect TypeScript:", error);
|
|
109
|
-
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
138
|
+
async function createPackageManagerConfig(fileName, fileContent) {
|
|
139
|
+
const filePath = path.join(cwd(), fileName);
|
|
140
|
+
|
|
141
|
+
await writeFile(filePath, fileContent.join("\n"), "utf-8");
|
|
142
|
+
console.log(styleText("green", `The '${fileName}' was created in the project root.`));
|
|
112
143
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const SRC_COMPONENTS_PATH: "/src/components";
|
|
2
|
+
export const COMPONENTS_PATH: "/components";
|
|
3
|
+
export const DEFAULT_VUELESS_CONFIG_CONTENT: "import { componentConfigs } from \"./.vueless\";\n\nexport default {\n /**\n * Global settings.\n */\n primary: \"grayscale\",\n neutral: \"gray\",\n text: 14,\n outline: 2,\n rounding: 8,\n disabledOpacity: 50,\n colorMode: \"auto\",\n\n /**\n * Component settings.\n */\n components: /*tw*/ {\n ...componentConfigs,\n },\n\n /**\n * Directive settings.\n */\n directives: {},\n\n /**\n * Light theme CSS variable settings.\n */\n lightTheme: {\n /* Primary colors */\n \"--vl-primary\": \"--vl-primary-600\",\n \"--vl-primary-lifted\": \"--vl-primary-700\",\n \"--vl-primary-accented\": \"--vl-primary-800\",\n\n /* Secondary colors */\n \"--vl-secondary\": \"--vl-neutral-500\",\n \"--vl-secondary-lifted\": \"--vl-neutral-600\",\n \"--vl-secondary-accented\": \"--vl-neutral-700\",\n\n /* Success colors */\n \"--vl-success\": \"--color-green-600\",\n \"--vl-success-lifted\": \"--color-green-700\",\n \"--vl-success-accented\": \"--color-green-800\",\n\n /* Info colors */\n \"--vl-info\": \"--color-blue-600\",\n \"--vl-info-lifted\": \"--color-blue-700\",\n \"--vl-info-accented\": \"--color-blue-800\",\n\n /* Notice colors */\n \"--vl-notice\": \"--color-violet-600\",\n \"--vl-notice-lifted\": \"--color-violet-700\",\n \"--vl-notice-accented\": \"--color-violet-800\",\n\n /* Warning colors */\n \"--vl-warning\": \"--color-orange-600\",\n \"--vl-warning-lifted\": \"--color-orange-700\",\n \"--vl-warning-accented\": \"--color-orange-800\",\n\n /* Error colors */\n \"--vl-error\": \"--color-red-600\",\n \"--vl-error-lifted\": \"--color-red-700\",\n \"--vl-error-accented\": \"--color-red-800\",\n\n /* Grayscale colors */\n \"--vl-grayscale\": \"--vl-neutral-900\",\n \"--vl-grayscale-lifted\": \"--vl-neutral-800\",\n \"--vl-grayscale-accented\": \"--vl-neutral-700\",\n\n /* Neutral colors */\n \"--vl-neutral\": \"--vl-neutral-500\",\n \"--vl-neutral-lifted\": \"--vl-neutral-600\",\n \"--vl-neutral-accented\": \"--vl-neutral-700\",\n\n /* Text neutral colors */\n \"--vl-text-inverted\": \"--color-white\",\n \"--vl-text-muted\": \"--vl-neutral-400\",\n \"--vl-text-lifted\": \"--vl-neutral-500\",\n \"--vl-text-accented\": \"--vl-neutral-600\",\n \"--vl-text\": \"--vl-neutral-900\",\n\n /* Border neutral colors */\n \"--vl-border-muted\": \"--vl-neutral-200\",\n \"--vl-border\": \"--vl-neutral-300\",\n \"--vl-border-lifted\": \"--vl-neutral-400\",\n \"--vl-border-accented\": \"--vl-neutral-600\",\n\n /* Background neutral colors */\n \"--vl-bg\": \"--color-white\",\n \"--vl-bg-muted\": \"--vl-neutral-50\",\n \"--vl-bg-lifted\": \"--vl-neutral-100\",\n \"--vl-bg-accented\": \"--vl-neutral-200\",\n \"--vl-bg-inverted\": \"--vl-neutral-900\",\n },\n\n /**\n * Dark theme CSS variable settings.\n */\n darkTheme: {\n /* Primary colors */\n \"--vl-primary\": \"--vl-primary-400\",\n \"--vl-primary-lifted\": \"--vl-primary-500\",\n \"--vl-primary-accented\": \"--vl-primary-600\",\n\n /* Secondary colors */\n \"--vl-secondary\": \"--vl-neutral-300\",\n \"--vl-secondary-lifted\": \"--vl-neutral-400\",\n \"--vl-secondary-accented\": \"--vl-neutral-500\",\n\n /* Success colors */\n \"--vl-success\": \"--color-green-400\",\n \"--vl-success-lifted\": \"--color-green-500\",\n \"--vl-success-accented\": \"--color-green-600\",\n\n /* Info colors */\n \"--vl-info\": \"--color-blue-400\",\n \"--vl-info-lifted\": \"--color-blue-500\",\n \"--vl-info-accented\": \"--color-blue-600\",\n\n /* Notice colors */\n \"--vl-notice\": \"--color-violet-400\",\n \"--vl-notice-lifted\": \"--color-violet-500\",\n \"--vl-notice-accented\": \"--color-violet-600\",\n\n /* Warning colors */\n \"--vl-warning\": \"--color-orange-400\",\n \"--vl-warning-lifted\": \"--color-orange-500\",\n \"--vl-warning-accented\": \"--color-orange-600\",\n\n /* Error colors */\n \"--vl-error\": \"--color-red-400\",\n \"--vl-error-lifted\": \"--color-red-500\",\n \"--vl-error-accented\": \"--color-red-600\",\n\n /* Grayscale colors */\n \"--vl-grayscale\": \"--vl-neutral-100\",\n \"--vl-grayscale-lifted\": \"--vl-neutral-200\",\n \"--vl-grayscale-accented\": \"--vl-neutral-300\",\n\n /* Neutral colors */\n \"--vl-neutral\": \"--vl-neutral-300\",\n \"--vl-neutral-lifted\": \"--vl-neutral-400\",\n \"--vl-neutral-accented\": \"--vl-neutral-500\",\n\n /* Text neutral colors */\n \"--vl-text-inverted\": \"--vl-neutral-900\",\n \"--vl-text-muted\": \"--vl-neutral-600\",\n \"--vl-text-lifted\": \"--vl-neutral-400\",\n \"--vl-text-accented\": \"--vl-neutral-300\",\n \"--vl-text\": \"--vl-neutral-100\",\n\n /* Border neutral colors */\n \"--vl-border-muted\": \"--vl-neutral-800\",\n \"--vl-border\": \"--vl-neutral-700\",\n \"--vl-border-lifted\": \"--vl-neutral-600\",\n \"--vl-border-accented\": \"--vl-neutral-400\",\n\n /* Background neutral colors */\n \"--vl-bg\": \"--vl-neutral-900\",\n \"--vl-bg-muted\": \"--vl-neutral-800\",\n \"--vl-bg-lifted\": \"--vl-neutral-800\",\n \"--vl-bg-accented\": \"--vl-neutral-700\",\n \"--vl-bg-inverted\": \"--vl-neutral-100\",\n },\n};\n";
|
package/bin/constants.js
CHANGED
|
@@ -168,17 +168,3 @@ export default {
|
|
|
168
168
|
},
|
|
169
169
|
};
|
|
170
170
|
`;
|
|
171
|
-
|
|
172
|
-
export const SUPPRESS_TS_CHECK = `// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
173
|
-
// @ts-nocheck`;
|
|
174
|
-
|
|
175
|
-
export const COMPONENTS_INDEX_COMMENT = `/**
|
|
176
|
-
* ⚠️ This file is auto-generated — do not edit it manually.
|
|
177
|
-
* It gets updated automatically whenever the Vite server restarts.
|
|
178
|
-
*
|
|
179
|
-
* This file imports all component config files from the current directory.
|
|
180
|
-
* Only files following the naming pattern "U[Component].config.[ts|js]" will be included.
|
|
181
|
-
* Example: "UButton.config.ts"
|
|
182
|
-
*/`;
|
|
183
|
-
|
|
184
|
-
export const COMPONENTS_INDEX_EXPORT = `export const componentConfigs = {};`;
|
|
@@ -53,10 +53,10 @@ vi.mock("vue", async () => {
|
|
|
53
53
|
};
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
import useUI from "../useUI
|
|
57
|
-
import * as uiUtils from "../../utils/ui
|
|
56
|
+
import useUI from "../useUI";
|
|
57
|
+
import * as uiUtils from "../../utils/ui";
|
|
58
58
|
import { getCurrentInstance, useAttrs } from "vue";
|
|
59
|
-
import type { UnknownObject } from "../../types
|
|
59
|
+
import type { UnknownObject } from "../../types";
|
|
60
60
|
|
|
61
61
|
// Test component for integration testing
|
|
62
62
|
const TestComponent = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed, ref, watch } from "vue";
|
|
2
2
|
import { merge } from "lodash-es";
|
|
3
|
-
import { recursiveRt } from "../adapter.locale/vueless
|
|
3
|
+
import { recursiveRt } from "../adapter.locale/vueless";
|
|
4
4
|
|
|
5
|
-
import { useLocale } from "./useLocale
|
|
5
|
+
import { useLocale } from "./useLocale";
|
|
6
6
|
|
|
7
7
|
import { COMPONENTS } from "../constants";
|
|
8
8
|
|
|
9
|
-
import type { VueMessageType } from "vue-i18n";
|
|
9
|
+
import type { VueMessageType } from "virtual:vueless/vue-i18n";
|
|
10
10
|
|
|
11
11
|
export function useComponentLocaleMessages<TLocale>(
|
|
12
12
|
componentName: keyof typeof COMPONENTS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onMounted, ref, nextTick } from "vue";
|
|
2
|
-
import { COLOR_MODE_KEY, DARK_MODE_CLASS } from "../constants
|
|
3
|
-
import { ColorMode } from "../types
|
|
2
|
+
import { COLOR_MODE_KEY, DARK_MODE_CLASS } from "../constants";
|
|
3
|
+
import { ColorMode } from "../types";
|
|
4
4
|
|
|
5
5
|
export function useDarkMode() {
|
|
6
6
|
const isDarkMode = ref(false);
|
package/composables/useLocale.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { inject } from "vue";
|
|
2
|
-
import { createVuelessAdapter } from "../adapter.locale/vueless
|
|
2
|
+
import { createVuelessAdapter } from "../adapter.locale/vueless";
|
|
3
3
|
|
|
4
4
|
import type { InjectionKey } from "vue";
|
|
5
|
-
import type { LocaleInstance, LocaleOptions } from "../types
|
|
5
|
+
import type { LocaleInstance, LocaleOptions } from "../types";
|
|
6
6
|
|
|
7
7
|
export const LocaleSymbol: InjectionKey<LocaleInstance> = Symbol.for("vueless:locale");
|
|
8
8
|
|
package/composables/useUI.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { ref, watch, getCurrentInstance, toValue, useAttrs, computed } from "vue";
|
|
2
2
|
import { isEqual } from "lodash-es";
|
|
3
3
|
|
|
4
|
-
import { cx, cva, setColor, vuelessConfig, getMergedConfig } from "../utils/ui
|
|
4
|
+
import { cx, cva, setColor, vuelessConfig, getMergedConfig } from "../utils/ui";
|
|
5
5
|
import {
|
|
6
6
|
CVA_CONFIG_KEY,
|
|
7
7
|
SYSTEM_CONFIG_KEY,
|
|
8
8
|
EXTENDS_PATTERN_REG_EXP,
|
|
9
9
|
NESTED_COMPONENT_PATTERN_REG_EXP,
|
|
10
|
-
} from "../constants
|
|
10
|
+
} from "../constants";
|
|
11
11
|
|
|
12
12
|
import type { Ref, ComputedRef } from "vue";
|
|
13
13
|
import type {
|
|
14
14
|
CVA,
|
|
15
15
|
UseUI,
|
|
16
|
-
Defaults,
|
|
17
16
|
KeyAttrs,
|
|
18
17
|
KeysAttrs,
|
|
19
18
|
MutatedProps,
|
|
@@ -21,9 +20,10 @@ import type {
|
|
|
21
20
|
PrimaryColors,
|
|
22
21
|
ComponentNames,
|
|
23
22
|
NestedComponent,
|
|
23
|
+
ComponentDefaults,
|
|
24
24
|
ComponentConfigFull,
|
|
25
25
|
VuelessComponentInstance,
|
|
26
|
-
} from "../types
|
|
26
|
+
} from "../types";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Merging component configs in a given sequence (bigger number = bigger priority):
|
|
@@ -235,7 +235,7 @@ export default function useUI<T>(
|
|
|
235
235
|
* Use an object where key = parent component prop value, value = nested component prop value.
|
|
236
236
|
* */
|
|
237
237
|
function getDefaults(defaultAttrs: NestedComponent["defaults"]) {
|
|
238
|
-
const defaults:
|
|
238
|
+
const defaults: ComponentDefaults = {};
|
|
239
239
|
|
|
240
240
|
for (const key in defaultAttrs) {
|
|
241
241
|
defaults[key] =
|