vueless 1.1.1-beta.6 → 1.1.1-beta.60
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 +15 -38
- package/bin/constants.d.ts +3 -0
- package/bin/constants.js +0 -14
- package/composables/tests/useUI.test.ts +30 -15
- package/composables/useAutoPosition.ts +1 -1
- package/composables/useBreakpoint.ts +1 -1
- package/composables/useComponentLocaleMassages.ts +9 -6
- 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 +25 -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 +20 -7
- 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 +10 -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 +89 -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/index.ts
CHANGED
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
/* eslint-disable prettier/prettier */
|
|
2
|
-
import { createLocale, LocaleSymbol } from "./composables/useLocale
|
|
3
|
-
import { createLoaderOverlay, LoaderOverlaySymbol } from "./ui.loader-overlay/useLoaderOverlay
|
|
4
|
-
import { createLoaderProgress, LoaderProgressSymbol } from "./ui.loader-progress/useLoaderProgress
|
|
5
|
-
import { setTheme } from "./utils/theme
|
|
6
|
-
import { setVuelessConfig } from "./utils/ui
|
|
2
|
+
import { createLocale, LocaleSymbol } from "./composables/useLocale";
|
|
3
|
+
import { createLoaderOverlay, LoaderOverlaySymbol } from "./ui.loader-overlay/useLoaderOverlay";
|
|
4
|
+
import { createLoaderProgress, LoaderProgressSymbol } from "./ui.loader-progress/useLoaderProgress";
|
|
5
|
+
import { setTheme } from "./utils/theme";
|
|
6
|
+
import { setVuelessConfig } from "./utils/ui";
|
|
7
7
|
|
|
8
8
|
import type { App } from "vue"
|
|
9
9
|
import type { CreateVuelessOptions } from "./types.ts"
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
11
|
+
/* utils */
|
|
12
|
+
export {
|
|
13
|
+
isSSR,
|
|
14
|
+
isCSR,
|
|
15
|
+
setTitle,
|
|
16
|
+
getRandomId,
|
|
17
|
+
getCookie,
|
|
18
|
+
setCookie,
|
|
19
|
+
deleteCookie,
|
|
20
|
+
createDebounce,
|
|
21
|
+
hasSlotContent
|
|
22
|
+
} from "./utils/helper";
|
|
23
|
+
export { getStored, setTheme, cssVar } from "./utils/theme";
|
|
24
|
+
export { isMac, isPWA, isIOS, isAndroid, isMobileApp, isWindows } from "./utils/platform";
|
|
25
|
+
export { cx, cva, compose, getDefaults, setVuelessConfig, setColor, vuelessConfig } from "./utils/ui";
|
|
26
|
+
export { getArgTypes, getSlotNames, getSlotsFragment, getSource, getDocsDescription } from "./utils/storybook";
|
|
27
|
+
/* adapters */
|
|
28
|
+
export { default as defaultEnLocale } from "./adapter.locale/locales/en";
|
|
29
|
+
export { createVuelessAdapter } from "./adapter.locale/vueless";
|
|
30
|
+
export { createVueI18nAdapter } from "./adapter.locale/vue-i18n";
|
|
31
|
+
/* composables */
|
|
32
|
+
export { useLocale } from "./composables/useLocale";
|
|
33
|
+
export { default as useUI } from "./composables/useUI";
|
|
34
|
+
export { useDarkMode } from "./composables/useDarkMode";
|
|
35
|
+
export { useLoaderProgress } from "./ui.loader-progress/useLoaderProgress";
|
|
36
|
+
export { useMutationObserver } from "./composables/useMutationObserver";
|
|
37
|
+
/* loaders */
|
|
38
|
+
export { loaderProgressOn, loaderProgressOff } from "./ui.loader-progress/utilLoaderProgress";
|
|
39
|
+
export { useLoaderOverlay } from "./ui.loader-overlay/useLoaderOverlay";
|
|
40
|
+
export { loaderOverlayOn, loaderOverlayOff } from "./ui.loader-overlay/utilLoaderOverlay";
|
|
41
|
+
/* notifications */
|
|
25
42
|
export {
|
|
26
43
|
notify,
|
|
27
44
|
notifySuccess,
|
|
@@ -30,9 +47,130 @@ export {
|
|
|
30
47
|
clearNotifications,
|
|
31
48
|
setDelayedNotify,
|
|
32
49
|
getDelayedNotify,
|
|
33
|
-
} from "./ui.text-notify/utilNotify
|
|
50
|
+
} from "./ui.text-notify/utilNotify";
|
|
51
|
+
export { NotificationType, NotificationPosition, NotificationDuration } from "./ui.text-notify/constants";
|
|
52
|
+
/* directives */
|
|
53
|
+
export { default as vTooltip } from "./v.tooltip/vTooltip";
|
|
54
|
+
export { default as vClickOutside } from "./v.click-outside/vClickOutside";
|
|
55
|
+
/* components */
|
|
56
|
+
/* Buttons & Links */
|
|
57
|
+
export { default as UButton } from "./ui.button/UButton.vue";
|
|
58
|
+
export { default as ULink } from "./ui.button-link/ULink.vue";
|
|
59
|
+
export { default as UToggle } from "./ui.button-toggle/UToggle.vue";
|
|
60
|
+
/* Dropdowns */
|
|
61
|
+
export { default as UDropdownButton } from "./ui.dropdown-button/UDropdownButton.vue";
|
|
62
|
+
export { default as UDropdownBadge } from "./ui.dropdown-badge/UDropdownBadge.vue";
|
|
63
|
+
export { default as UDropdownLink } from "./ui.dropdown-link/UDropdownLink.vue";
|
|
64
|
+
/* Form Inputs & Controls */
|
|
65
|
+
export { default as UInput } from "./ui.form-input/UInput.vue";
|
|
66
|
+
export { default as UInputFile } from "./ui.form-input-file/UInputFile.vue";
|
|
67
|
+
export { default as UInputNumber } from "./ui.form-input-number/UInputNumber.vue";
|
|
68
|
+
export { default as UInputCounter } from "./ui.form-input-counter/UInputCounter.vue";
|
|
69
|
+
export { default as UInputPassword } from "./ui.form-input-password/UInputPassword.vue";
|
|
70
|
+
export { default as UInputRating } from "./ui.form-input-rating/UInputRating.vue";
|
|
71
|
+
export { default as UInputSearch } from "./ui.form-input-search/UInputSearch.vue";
|
|
72
|
+
export { default as UTextarea } from "./ui.form-textarea/UTextarea.vue";
|
|
73
|
+
export { default as USelect } from "./ui.form-select/USelect.vue";
|
|
74
|
+
export { default as UListbox } from "./ui.form-listbox/UListbox.vue";
|
|
75
|
+
export { default as UCheckbox } from "./ui.form-checkbox/UCheckbox.vue";
|
|
76
|
+
export { default as UCheckboxGroup } from "./ui.form-checkbox-group/UCheckboxGroup.vue";
|
|
77
|
+
export { default as UCheckboxMultiState } from "./ui.form-checkbox-multi-state/UCheckboxMultiState.vue";
|
|
78
|
+
export { default as USwitch } from "./ui.form-switch/USwitch.vue";
|
|
79
|
+
export { default as URadio } from "./ui.form-radio/URadio.vue";
|
|
80
|
+
export { default as URadioGroup } from "./ui.form-radio-group/URadioGroup.vue";
|
|
81
|
+
export { default as UCalendar } from "./ui.form-calendar/UCalendar.vue";
|
|
82
|
+
export { default as UDatePicker } from "./ui.form-date-picker/UDatePicker.vue";
|
|
83
|
+
export { default as UDatePickerRange } from "./ui.form-date-picker-range/UDatePickerRange.vue";
|
|
84
|
+
export { default as UColorPicker } from "./ui.form-color-picker/UColorPicker.vue";
|
|
85
|
+
export { default as ULabel } from "./ui.form-label/ULabel.vue";
|
|
86
|
+
/* Text & Content */
|
|
87
|
+
export { default as UHeader } from "./ui.text-header/UHeader.vue";
|
|
88
|
+
export { default as UText } from "./ui.text-block/UText.vue";
|
|
89
|
+
export { default as UAlert } from "./ui.text-alert/UAlert.vue";
|
|
90
|
+
export { default as UNotify } from "./ui.text-notify/UNotify.vue";
|
|
91
|
+
export { default as UNumber } from "./ui.text-number/UNumber.vue";
|
|
92
|
+
export { default as UFile } from "./ui.text-file/UFile.vue";
|
|
93
|
+
export { default as UFiles } from "./ui.text-files/UFiles.vue";
|
|
94
|
+
export { default as UEmpty } from "./ui.text-empty/UEmpty.vue";
|
|
95
|
+
export { default as UBadge } from "./ui.text-badge/UBadge.vue";
|
|
96
|
+
/* Containers */
|
|
97
|
+
export { default as UDivider } from "./ui.container-divider/UDivider.vue";
|
|
98
|
+
export { default as UCol } from "./ui.container-col/UCol.vue";
|
|
99
|
+
export { default as URow } from "./ui.container-row/URow.vue";
|
|
100
|
+
export { default as UGroup } from "./ui.container-group/UGroup.vue";
|
|
101
|
+
export { default as UGroups } from "./ui.container-groups/UGroups.vue";
|
|
102
|
+
export { default as UAccordion } from "./ui.container-accordion/UAccordion.vue";
|
|
103
|
+
export { default as UCard } from "./ui.container-card/UCard.vue";
|
|
104
|
+
export { default as UModal } from "./ui.container-modal/UModal.vue";
|
|
105
|
+
export { default as UModalConfirm } from "./ui.container-modal-confirm/UModalConfirm.vue";
|
|
106
|
+
export { default as UPage } from "./ui.container-page/UPage.vue";
|
|
107
|
+
/* Images and Icons */
|
|
108
|
+
export { default as UIcon } from "./ui.image-icon/UIcon.vue";
|
|
109
|
+
export { default as UAvatar } from "./ui.image-avatar/UAvatar.vue";
|
|
110
|
+
/* Data */
|
|
111
|
+
export { default as UTable } from "./ui.data-table/UTable.vue";
|
|
112
|
+
export { default as UDataList } from "./ui.data-list/UDataList.vue";
|
|
113
|
+
/* Navigation */
|
|
114
|
+
export { default as UTab } from "./ui.navigation-tab/UTab.vue";
|
|
115
|
+
export { default as UTabs } from "./ui.navigation-tabs/UTabs.vue";
|
|
116
|
+
export { default as UProgress } from "./ui.navigation-progress/UProgress.vue";
|
|
117
|
+
export { default as UPagination } from "./ui.navigation-pagination/UPagination.vue";
|
|
118
|
+
export { default as UBreadcrumbs } from "./ui.navigation-breadcrumbs/UBreadcrumbs.vue";
|
|
119
|
+
/* Loaders and Skeletons */
|
|
120
|
+
export { default as ULoader } from "./ui.loader/ULoader.vue";
|
|
121
|
+
export { default as ULoaderProgress } from "./ui.loader-progress/ULoaderProgress.vue";
|
|
122
|
+
export { default as ULoaderOverlay } from "./ui.loader-overlay/ULoaderOverlay.vue";
|
|
123
|
+
export { default as USkeleton } from "./ui.skeleton/USkeleton.vue";
|
|
124
|
+
export { default as USkeletonText } from "./ui.skeleton-text/USkeletonText.vue";
|
|
125
|
+
export { default as USkeletonInput } from "./ui.skeleton-input/USkeletonInput.vue";
|
|
126
|
+
export { default as USkeletonChoice } from "./ui.skeleton-choice/USkeletonChoice.vue";
|
|
127
|
+
/* Other */
|
|
128
|
+
export { default as UDot } from "./ui.other-dot/UDot.vue";
|
|
129
|
+
export { default as UChip } from "./ui.other-chip/UChip.vue";
|
|
130
|
+
export { default as UThemeColorToggle } from "./ui.other-theme-color-toggle/UThemeColorToggle.vue";
|
|
34
131
|
/* eslint-enable prettier/prettier */
|
|
35
132
|
|
|
133
|
+
/* types */
|
|
134
|
+
export type {
|
|
135
|
+
/* Core configuration types */
|
|
136
|
+
Config,
|
|
137
|
+
ThemeConfig,
|
|
138
|
+
ThemeConfigText,
|
|
139
|
+
ThemeConfigRounding,
|
|
140
|
+
ThemeConfigOutline,
|
|
141
|
+
NestedComponent,
|
|
142
|
+
ComponentConfig,
|
|
143
|
+
ComponentDefaults,
|
|
144
|
+
CreateVuelessOptions,
|
|
145
|
+
/* Color and theme types */
|
|
146
|
+
StateColors,
|
|
147
|
+
PrimaryColors,
|
|
148
|
+
NeutralColors,
|
|
149
|
+
VuelessCssVariables,
|
|
150
|
+
/* Component and Directive types */
|
|
151
|
+
Directives,
|
|
152
|
+
Components,
|
|
153
|
+
ComponentNames,
|
|
154
|
+
/* Utility types */
|
|
155
|
+
UnknownType,
|
|
156
|
+
UnknownArray,
|
|
157
|
+
UnknownObject,
|
|
158
|
+
CVACompoundVariants,
|
|
159
|
+
CVA,
|
|
160
|
+
/* Vue component utility types */
|
|
161
|
+
ComponentType,
|
|
162
|
+
ComponentProps,
|
|
163
|
+
ComponentSlots,
|
|
164
|
+
ComponentEmit,
|
|
165
|
+
ComponentExposed,
|
|
166
|
+
/* Locale types */
|
|
167
|
+
LocaleOptions,
|
|
168
|
+
LocaleInstance,
|
|
169
|
+
LocaleMessages,
|
|
170
|
+
} from "./types";
|
|
171
|
+
/* Export enums directly (not as types) */
|
|
172
|
+
export { ColorMode } from "./types";
|
|
173
|
+
|
|
36
174
|
export function createVueless(options: CreateVuelessOptions = {}) {
|
|
37
175
|
const i18n = createLocale(options.i18n);
|
|
38
176
|
const loaderOverlay = createLoaderOverlay();
|
package/modules.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare module "*.svg?url" {
|
|
2
|
+
const src: string;
|
|
3
|
+
export default src;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
declare module "*.svg?raw" {
|
|
7
|
+
const content: string;
|
|
8
|
+
export default content;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module "*.svg?component" {
|
|
12
|
+
import type { DefineComponent, SVGAttributes } from "vue";
|
|
13
|
+
const component: DefineComponent<SVGAttributes> | undefined;
|
|
14
|
+
export default component;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare module "*.svg?skipsvgo" {
|
|
18
|
+
import type { DefineComponent, SVGAttributes } from "vue";
|
|
19
|
+
const component: DefineComponent<SVGAttributes> | undefined;
|
|
20
|
+
export default component;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module "virtual:vueless/icons" {
|
|
24
|
+
import type { UnknownArray } from "./types";
|
|
25
|
+
export const cachedIcons: UnknownArray;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Fake minimal types just to suppress errors */
|
|
29
|
+
declare module "virtual:vueless/vue-i18n" {
|
|
30
|
+
import type { UnknownObject } from "./types";
|
|
31
|
+
export type I18n = UnknownObject;
|
|
32
|
+
export type VueMessageType = UnknownObject;
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.1.1-beta.
|
|
3
|
+
"version": "1.1.1-beta.60",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
7
|
-
"style": "tailwind.css",
|
|
8
|
-
"main": "index.ts",
|
|
9
|
-
"type": "module",
|
|
10
7
|
"license": "MIT",
|
|
11
8
|
"publishConfig": {
|
|
12
9
|
"access": "public"
|
|
13
10
|
},
|
|
14
11
|
"scripts": {
|
|
15
|
-
"pre:start": "npx node .scripts/icons",
|
|
16
12
|
"dev:docs": "storybook dev -p 6006 --docs --no-open",
|
|
17
13
|
"dev": "storybook dev -p 6006 --no-open",
|
|
18
14
|
"build": "storybook build --docs",
|
|
19
15
|
"preview": "vite preview --host --outDir=storybook-static",
|
|
20
16
|
"ts:check": "vue-tsc --build --force",
|
|
21
|
-
"release:
|
|
17
|
+
"release:icons": "npx node .scripts/icons",
|
|
18
|
+
"release:types": "rm -f ./node_modules/.tmp/tsconfig.app.tsbuildinfo && npx tsc --project tsconfig.build.json",
|
|
19
|
+
"release:prepare": "npm run release:icons && rm -rf dist && mkdir -p dist && cp -r src/. package.json LICENSE README.md dist/ && npx node .scripts/writeLocales && npm run release:types",
|
|
22
20
|
"release:beta": "release-it --ci --npm.publish --preRelease=beta --increment=prerelease",
|
|
23
21
|
"release:patch": "release-it patch --ci --npm.publish --git.tag --github.release",
|
|
24
22
|
"release:minor": "release-it minor --ci --npm.publish --git.tag --github.release",
|
|
25
23
|
"release:major": "release-it major --ci --npm.publish --git.tag --github.release",
|
|
26
|
-
"lint": "eslint --no-fix src/ .storybook/",
|
|
27
|
-
"lint:fix": "eslint --fix src/ .storybook/",
|
|
24
|
+
"lint": "eslint --no-fix src/ test/ .storybook/ .vueless/",
|
|
25
|
+
"lint:fix": "eslint --fix src/ test/ .storybook/ .vueless/",
|
|
28
26
|
"lint:ci": "eslint --no-fix --max-warnings=0",
|
|
29
27
|
"test": "vitest",
|
|
30
28
|
"test:ci": "vitest --run"
|
|
@@ -35,6 +33,7 @@
|
|
|
35
33
|
"dependencies": {
|
|
36
34
|
"@tailwindcss/postcss": "^4.1.11",
|
|
37
35
|
"@tailwindcss/vite": "^4.1.11",
|
|
36
|
+
"@types/lodash-es": "^4.17.12",
|
|
38
37
|
"cva": "^1.0.0-beta.4",
|
|
39
38
|
"lodash-es": "^4.17.21",
|
|
40
39
|
"svgo": "^4.0.0",
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
"@release-it/bumper": "^7.0.5",
|
|
50
49
|
"@tsconfig/node20": "^20.1.6",
|
|
51
50
|
"@types/jsdom": "^21.1.7",
|
|
52
|
-
"@types/lodash-es": "^4.17.12",
|
|
53
51
|
"@types/node": "^24.1.0",
|
|
54
52
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
55
53
|
"@vitest/eslint-plugin": "^1.3.4",
|
|
@@ -69,10 +67,35 @@
|
|
|
69
67
|
"vite": "^7.0.6",
|
|
70
68
|
"vitest": "^3.2.4",
|
|
71
69
|
"vue": "^3.5.18",
|
|
72
|
-
"vue-i18n": "^11.1.11",
|
|
73
70
|
"vue-router": "^4.5.1",
|
|
74
71
|
"vue-tsc": "^3.0.4"
|
|
75
72
|
},
|
|
73
|
+
"sideEffects": false,
|
|
74
|
+
"style": "tailwind.css",
|
|
75
|
+
"types": "index.d.ts",
|
|
76
|
+
"main": "index.ts",
|
|
77
|
+
"type": "module",
|
|
78
|
+
"exports": {
|
|
79
|
+
".": {
|
|
80
|
+
"import": "./index.ts",
|
|
81
|
+
"types": "./index.d.ts",
|
|
82
|
+
"style": "./tailwind.css"
|
|
83
|
+
},
|
|
84
|
+
"./v.*": "./v.*",
|
|
85
|
+
"./ui.*": "./ui.*",
|
|
86
|
+
"./utils/*": "./utils/*",
|
|
87
|
+
"./utils/node/*": "./utils/node/*",
|
|
88
|
+
"./composables/*": "./composables/*",
|
|
89
|
+
"./constants": "./constants.js",
|
|
90
|
+
"./constants.js": "./constants.js",
|
|
91
|
+
"./plugin-vite": "./plugin-vite.js",
|
|
92
|
+
"./plugin-vite.js": "./plugin-vite.js",
|
|
93
|
+
"./tailwind.css": "./tailwind.css",
|
|
94
|
+
"./types": "./types.ts",
|
|
95
|
+
"./modules": {
|
|
96
|
+
"types": "./modules.d.ts"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
76
99
|
"resolutions": {
|
|
77
100
|
"jackspeak": "2.3.6"
|
|
78
101
|
},
|
package/plugin-vite.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare function Vueless(options?: {
|
|
|
5
5
|
env?: string;
|
|
6
6
|
debug?: boolean;
|
|
7
7
|
include?: string[];
|
|
8
|
-
|
|
8
|
+
basePath?: string;
|
|
9
9
|
svgoConfig?: Config;
|
|
10
10
|
svgo?: boolean;
|
|
11
11
|
defaultImport?: "url" | "raw" | "component";
|
|
@@ -24,30 +24,3 @@ declare module "vueless/plugin-vite" {
|
|
|
24
24
|
declare module "vueless/plugin-vite.js" {
|
|
25
25
|
export { Vueless, UnpluginComponents, TailwindCSS };
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
declare module "*.svg?component" {
|
|
29
|
-
import type { FunctionalComponent, SVGAttributes } from "vue";
|
|
30
|
-
const component: FunctionalComponent<SVGAttributes>;
|
|
31
|
-
export default component;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
declare module "*.svg?url" {
|
|
35
|
-
const src: string;
|
|
36
|
-
export default src;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare module "*.svg?raw" {
|
|
40
|
-
const content: string;
|
|
41
|
-
export default content;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
declare module "*.svg?skipsvgo" {
|
|
45
|
-
import type { FunctionalComponent, SVGAttributes } from "vue";
|
|
46
|
-
const component: FunctionalComponent<SVGAttributes>;
|
|
47
|
-
export default component;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare module "virtual:vueless/icons" {
|
|
51
|
-
import type { UnknownArray } from "./types.ts";
|
|
52
|
-
export const cachedIcons: UnknownArray;
|
|
53
|
-
}
|
package/plugin-vite.js
CHANGED
|
@@ -20,7 +20,6 @@ import { createTailwindSafelist, clearTailwindSafelist } from "./utils/node/tail
|
|
|
20
20
|
import { componentResolver, directiveResolver } from "./utils/node/vuelessResolver.js";
|
|
21
21
|
import { setCustomPropTypes, removeCustomPropTypes } from "./utils/node/dynamicProps.js";
|
|
22
22
|
import { buildWebTypes } from "./utils/node/webTypes.js";
|
|
23
|
-
import { hideHiddenStories, showHiddenStories } from "./utils/node/dynamicStories.js";
|
|
24
23
|
import {
|
|
25
24
|
getNuxtDirs,
|
|
26
25
|
getVueDirs,
|
|
@@ -61,7 +60,7 @@ export const UnpluginComponents = (options) =>
|
|
|
61
60
|
– Loads SVG images as a Vue component.
|
|
62
61
|
*/
|
|
63
62
|
export const Vueless = function (options = {}) {
|
|
64
|
-
const { debug, env, include,
|
|
63
|
+
const { debug, env, include, basePath } = options;
|
|
65
64
|
|
|
66
65
|
const isInternalEnv = env === INTERNAL_ENV;
|
|
67
66
|
const isStorybookEnv = env === STORYBOOK_ENV;
|
|
@@ -81,12 +80,11 @@ export const Vueless = function (options = {}) {
|
|
|
81
80
|
/* if server stopped by developer (Ctrl+C) */
|
|
82
81
|
process.on("SIGINT", async () => {
|
|
83
82
|
if (isInternalEnv || isStorybookEnv) {
|
|
84
|
-
await showHiddenStories(vuelessSrcDir);
|
|
85
83
|
await removeCustomPropTypes(vuelessSrcDir);
|
|
86
84
|
}
|
|
87
85
|
|
|
88
86
|
/* remove cached icons */
|
|
89
|
-
await removeIconsCache(
|
|
87
|
+
await removeIconsCache(basePath);
|
|
90
88
|
|
|
91
89
|
/* clear tailwind safelist */
|
|
92
90
|
await clearTailwindSafelist(debug);
|
|
@@ -97,16 +95,6 @@ export const Vueless = function (options = {}) {
|
|
|
97
95
|
process.exit(DEFAULT_EXIT_CODE);
|
|
98
96
|
});
|
|
99
97
|
|
|
100
|
-
/* cache vueless built-in and project icons */
|
|
101
|
-
async function prepareIcons() {
|
|
102
|
-
await removeIconsCache(mirrorCacheDir);
|
|
103
|
-
await createIconsCache({ env, debug, targetFiles });
|
|
104
|
-
|
|
105
|
-
if (isNuxtModuleEnv) {
|
|
106
|
-
await copyIconsCache(mirrorCacheDir);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
98
|
return {
|
|
111
99
|
name: "vite-plugin-vue-vueless",
|
|
112
100
|
enforce: "pre",
|
|
@@ -116,33 +104,50 @@ export const Vueless = function (options = {}) {
|
|
|
116
104
|
"process.env": {},
|
|
117
105
|
},
|
|
118
106
|
optimizeDeps: {
|
|
119
|
-
include:
|
|
107
|
+
include: isInternalEnv
|
|
108
|
+
? []
|
|
109
|
+
: [
|
|
110
|
+
"vueless",
|
|
111
|
+
"vueless/types",
|
|
112
|
+
"vueless/constants",
|
|
113
|
+
"vueless/constants.js",
|
|
114
|
+
"vueless/v.tooltip/vTooltip.ts",
|
|
115
|
+
"vueless/v.click-outside/vClickOutside.ts",
|
|
116
|
+
],
|
|
120
117
|
},
|
|
121
118
|
}),
|
|
122
119
|
|
|
123
|
-
configResolved: async () => {
|
|
120
|
+
configResolved: async (config) => {
|
|
124
121
|
if (!isNuxtModuleEnv) {
|
|
122
|
+
/* auto import user configs */
|
|
123
|
+
await autoImportUserConfigs();
|
|
124
|
+
|
|
125
125
|
/* merge and cache component configs. */
|
|
126
126
|
await cacheMergedConfigs(vuelessSrcDir);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
if (!isInternalEnv) {
|
|
130
|
-
await autoImportUserConfigs();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
129
|
await buildWebTypes(vuelessSrcDir);
|
|
134
130
|
await setCustomPropTypes(vuelessSrcDir);
|
|
135
131
|
|
|
136
|
-
if (isInternalEnv || isStorybookEnv) {
|
|
137
|
-
await showHiddenStories(vuelessSrcDir);
|
|
138
|
-
await hideHiddenStories(vuelessSrcDir);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
132
|
/* collect used in project colors for tailwind safelist */
|
|
142
133
|
await createTailwindSafelist({ env, srcDir: vuelessSrcDir, targetFiles, debug });
|
|
143
134
|
|
|
144
135
|
/* cache vueless built-in and project icons */
|
|
145
|
-
await
|
|
136
|
+
await removeIconsCache(basePath);
|
|
137
|
+
await createIconsCache({ env, debug, targetFiles });
|
|
138
|
+
|
|
139
|
+
if (isNuxtModuleEnv) {
|
|
140
|
+
await copyIconsCache(basePath);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* suppress rollup warnings */
|
|
144
|
+
const originalOnWarn = config.build.rollupOptions.onwarn;
|
|
145
|
+
|
|
146
|
+
config.build.rollupOptions.onwarn = (warning, warn) => {
|
|
147
|
+
// eslint-disable-next-line prettier/prettier
|
|
148
|
+
if (warning.code === "SOURCEMAP_BROKEN" && warning.plugin === "@tailwindcss/vite:generate:build") return;
|
|
149
|
+
originalOnWarn ? originalOnWarn(warning, warn) : warn(warning);
|
|
150
|
+
};
|
|
146
151
|
},
|
|
147
152
|
|
|
148
153
|
/* update icons cache in dev env */
|
|
@@ -168,7 +173,7 @@ export const Vueless = function (options = {}) {
|
|
|
168
173
|
await createIconsCache({ env, debug, targetFiles: [file] });
|
|
169
174
|
|
|
170
175
|
if (isNuxtModuleEnv) {
|
|
171
|
-
await copyIconsCache(
|
|
176
|
+
await copyIconsCache(basePath);
|
|
172
177
|
}
|
|
173
178
|
|
|
174
179
|
reloadServerOnIconsCacheUpdate(server);
|
|
@@ -195,7 +200,7 @@ export const Vueless = function (options = {}) {
|
|
|
195
200
|
|
|
196
201
|
/* remove cached icons */
|
|
197
202
|
buildEnd: async () => {
|
|
198
|
-
await removeIconsCache(
|
|
203
|
+
await removeIconsCache(basePath);
|
|
199
204
|
},
|
|
200
205
|
};
|
|
201
206
|
};
|
package/tailwind.css
CHANGED
|
@@ -131,3 +131,28 @@
|
|
|
131
131
|
outline-style: var(--tw-outline-style);
|
|
132
132
|
outline-width: var(--vl-outline-lg);
|
|
133
133
|
}
|
|
134
|
+
|
|
135
|
+
/* ------ Tippy.js Vueless default theme ------ */
|
|
136
|
+
.tippy-box[data-theme~="vueless"] {
|
|
137
|
+
background-color: var(--vl-bg-inverted);
|
|
138
|
+
color: var(--vl-text-inverted);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.tippy-box[data-theme~="vueless"][data-placement^="top"] > .tippy-arrow:before {
|
|
142
|
+
border-top-color: var(--vl-bg-inverted);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.tippy-box[data-theme~="vueless"][data-placement^="bottom"] > .tippy-arrow:before {
|
|
146
|
+
border-bottom-color: var(--vl-bg-inverted);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.tippy-box[data-theme~="vueless"][data-placement^="left"] > .tippy-arrow:before {
|
|
150
|
+
border-left-color: var(--vl-bg-inverted);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.tippy-box[data-theme~="vueless"][data-placement^="right"] > .tippy-arrow:before {
|
|
154
|
+
border-right-color: var(--vl-bg-inverted);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|