vueless 0.0.477-beta.0 → 0.0.477
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composables/useBreakpoint.js +1 -1
- package/composables/useUI.js +1 -204
- package/constants.js +1 -2
- package/directives/clickOutside/vClickOutside.js +2 -2
- package/directives/tooltip/storybook/stories.js +5 -5
- package/{index.ts → index.js} +6 -9
- package/package.json +17 -28
- package/preset.tailwind.js +7 -16
- package/ui.button/config.js +0 -12
- package/ui.button-link/ULink.vue +1 -1
- package/ui.button-link/config.js +0 -9
- package/ui.data-list/UDataList.vue +4 -4
- package/ui.dropdown-badge/config.js +0 -1
- package/ui.dropdown-button/config.js +0 -1
- package/ui.form-checkbox/config.js +0 -9
- package/ui.form-color-picker/config.js +0 -7
- package/ui.form-input/UInput.vue +1 -1
- package/ui.form-input-money/useFormatCurrency.js +1 -1
- package/ui.form-input-number/UInputNumber.vue +3 -4
- package/ui.form-label/config.js +2 -2
- package/ui.form-radio/config.js +0 -6
- package/ui.form-switch/config.js +0 -6
- package/ui.image-avatar/config.js +0 -5
- package/ui.image-icon/config.js +0 -5
- package/ui.loader/config.js +0 -1
- package/ui.loader-overlay/config.js +0 -1
- package/ui.loader-progress/config.js +0 -1
- package/ui.navigation-progress/config.js +0 -9
- package/ui.other-dot/config.js +0 -1
- package/ui.text-alert/config.js +0 -7
- package/ui.text-badge/config.js +0 -8
- package/ui.text-block/UText.vue +62 -18
- package/ui.text-block/storybook/Docs.mdx +2 -2
- package/ui.text-block/storybook/{stories.ts → stories.js} +7 -12
- package/ui.text-block/useAttrs.js +15 -0
- package/ui.text-file/UFile.vue +14 -12
- package/ui.text-file/config.js +2 -12
- package/ui.text-files/config.js +1 -1
- package/ui.text-header/config.js +0 -1
- package/ui.text-money/config.js +0 -1
- package/ui.text-money/utilMoney.js +2 -2
- package/{utilsTs/utilTheme.ts → utils/utilTheme.js} +27 -31
- package/utils/utilUI.js +204 -0
- package/web-types.json +120 -30
- package/adatper.locale/locales/en.d.ts +0 -289
- package/adatper.locale/vue-i18n.d.ts +0 -9
- package/adatper.locale/vueless.d.ts +0 -11
- package/composables/useAutoPosition.d.ts +0 -15
- package/composables/useBreakpoint.d.ts +0 -7
- package/composables/useLocale.d.ts +0 -3
- package/composables/useMutationObserver.d.ts +0 -7
- package/composables/useUI.d.ts +0 -17
- package/composablesTs/useAutoPosition.d.ts +0 -28
- package/composablesTs/useAutoPosition.ts +0 -115
- package/composablesTs/useBreakpoint.d.ts +0 -7
- package/composablesTs/useBreakpoint.ts +0 -106
- package/composablesTs/useLocale.d.ts +0 -3
- package/composablesTs/useLocale.ts +0 -25
- package/composablesTs/useMutationObserver.d.ts +0 -8
- package/composablesTs/useMutationObserver.ts +0 -50
- package/composablesTs/useUI.d.ts +0 -68
- package/composablesTs/useUI.ts +0 -566
- package/constants.d.ts +0 -42
- package/constants.ts +0 -73
- package/directives/clickOutside/storybook/stories.d.ts +0 -653
- package/directives/clickOutside/vClickOutside.d.ts +0 -6
- package/directives/index.d.ts +0 -2
- package/directives/tooltip/storybook/stories.d.ts +0 -252
- package/directives/tooltip/vTooltip.d.ts +0 -6
- package/index.d.ts +0 -15
- package/preset.tailwind.d.ts +0 -69
- package/types.d.ts +0 -131
- package/types.ts +0 -218
- package/ui.button/UButton.vue.d.ts +0 -73
- package/ui.button/config.d.ts +0 -130
- package/ui.button/constants.d.ts +0 -1
- package/ui.button/storybook/stories.d.ts +0 -3062
- package/ui.button/useAttrs.d.ts +0 -11
- package/ui.button-link/ULink.vue.d.ts +0 -66
- package/ui.button-link/config.d.ts +0 -101
- package/ui.button-link/constants.d.ts +0 -1
- package/ui.button-link/storybook/stories.d.ts +0 -4567
- package/ui.button-link/useAttrs.d.ts +0 -14
- package/ui.button-toggle/UToggle.vue.d.ts +0 -50
- package/ui.button-toggle/config.d.ts +0 -65
- package/ui.button-toggle/constants.d.ts +0 -3
- package/ui.button-toggle/storybook/stories.d.ts +0 -2683
- package/ui.button-toggle/useAttrs.d.ts +0 -11
- package/ui.button-toggle-item/UToggleItem.vue.d.ts +0 -36
- package/ui.button-toggle-item/config.d.ts +0 -41
- package/ui.button-toggle-item/constants.d.ts +0 -1
- package/ui.button-toggle-item/storybook/stories.d.ts +0 -495
- package/ui.button-toggle-item/useAttrs.d.ts +0 -15
- package/ui.container-accordion/UAccordion.vue.d.ts +0 -32
- package/ui.container-accordion/config.d.ts +0 -40
- package/ui.container-accordion/constants.d.ts +0 -1
- package/ui.container-accordion/storybook/stories.d.ts +0 -732
- package/ui.container-accordion/useAttrs.d.ts +0 -13
- package/ui.container-card/UCard.vue.d.ts +0 -31
- package/ui.container-card/config.d.ts +0 -13
- package/ui.container-card/constants.d.ts +0 -1
- package/ui.container-card/storybook/stories.d.ts +0 -3906
- package/ui.container-card/useAttrs.d.ts +0 -11
- package/ui.container-col/UCol.vue.d.ts +0 -33
- package/ui.container-col/config.d.ts +0 -81
- package/ui.container-col/constants.d.ts +0 -1
- package/ui.container-col/storybook/stories.d.ts +0 -840
- package/ui.container-col/useAttrs.d.ts +0 -11
- package/ui.container-divider/UDivider.vue.d.ts +0 -25
- package/ui.container-divider/config.d.ts +0 -102
- package/ui.container-divider/constants.d.ts +0 -1
- package/ui.container-divider/storybook/stories.d.ts +0 -577
- package/ui.container-divider/useAttrs.d.ts +0 -11
- package/ui.container-group/UGroup.vue.d.ts +0 -33
- package/ui.container-group/config.d.ts +0 -38
- package/ui.container-group/constants.d.ts +0 -1
- package/ui.container-group/storybook/stories.d.ts +0 -2869
- package/ui.container-group/useAttrs.d.ts +0 -11
- package/ui.container-modal/UModal.vue.d.ts +0 -59
- package/ui.container-modal/config.d.ts +0 -77
- package/ui.container-modal/constants.d.ts +0 -1
- package/ui.container-modal/storybook/stories.d.ts +0 -8377
- package/ui.container-modal/useAttrs.d.ts +0 -11
- package/ui.container-modal-confirm/UModalConfirm.vue.d.ts +0 -59
- package/ui.container-modal-confirm/config.d.ts +0 -23
- package/ui.container-modal-confirm/constants.d.ts +0 -1
- package/ui.container-modal-confirm/storybook/stories.d.ts +0 -4494
- package/ui.container-modal-confirm/useAttrs.d.ts +0 -11
- package/ui.container-page/UPage.vue.d.ts +0 -47
- package/ui.container-page/config.d.ts +0 -85
- package/ui.container-page/constants.d.ts +0 -1
- package/ui.container-page/storybook/stories.d.ts +0 -8723
- package/ui.container-page/useAttrs.d.ts +0 -13
- package/ui.container-row/URow.vue.d.ts +0 -35
- package/ui.container-row/config.d.ts +0 -85
- package/ui.container-row/constants.d.ts +0 -1
- package/ui.container-row/storybook/stories.d.ts +0 -2619
- package/ui.container-row/useAttrs.d.ts +0 -11
- package/ui.data-list/UDataList.vue.d.ts +0 -74
- package/ui.data-list/config.d.ts +0 -48
- package/ui.data-list/constants.d.ts +0 -1
- package/ui.data-list/storybook/stories.d.ts +0 -3342
- package/ui.data-list/useAttrs.d.ts +0 -11
- package/ui.data-table/UTable.vue.d.ts +0 -90
- package/ui.data-table/UTableRow.vue.d.ts +0 -61
- package/ui.data-table/config.d.ts +0 -128
- package/ui.data-table/constants.d.ts +0 -1
- package/ui.data-table/storybook/stories.d.ts +0 -13069
- package/ui.data-table/useAttrs.d.ts +0 -17
- package/ui.data-table/utilTable.d.ts +0 -9
- package/ui.dropdown-badge/UDropdownBadge.vue.d.ts +0 -145
- package/ui.dropdown-badge/config.d.ts +0 -39
- package/ui.dropdown-badge/constants.d.ts +0 -1
- package/ui.dropdown-badge/storybook/stories.d.ts +0 -1246
- package/ui.dropdown-badge/useAttrs.d.ts +0 -13
- package/ui.dropdown-button/UDropdownButton.vue.d.ts +0 -151
- package/ui.dropdown-button/config.d.ts +0 -52
- package/ui.dropdown-button/constants.d.ts +0 -4
- package/ui.dropdown-button/storybook/stories.d.ts +0 -1912
- package/ui.dropdown-button/useAttrs.d.ts +0 -13
- package/ui.dropdown-link/UDropdownLink.vue.d.ts +0 -149
- package/ui.dropdown-link/config.d.ts +0 -37
- package/ui.dropdown-link/constants.d.ts +0 -1
- package/ui.dropdown-link/storybook/stories.d.ts +0 -1333
- package/ui.dropdown-link/useAttrs.d.ts +0 -13
- package/ui.dropdown-list/UDropdownList.vue.d.ts +0 -59
- package/ui.dropdown-list/config.d.ts +0 -77
- package/ui.dropdown-list/constants.d.ts +0 -1
- package/ui.dropdown-list/storybook/stories.d.ts +0 -783
- package/ui.dropdown-list/useAttrs.d.ts +0 -11
- package/ui.dropdown-list/usePointer.d.ts +0 -8
- package/ui.form-calendar/UCalendar.vue.d.ts +0 -31
- package/ui.form-calendar/UCalendarDayView.vue.d.ts +0 -26
- package/ui.form-calendar/UCalendarMonthView.vue.d.ts +0 -26
- package/ui.form-calendar/UCalendarYearView.vue.d.ts +0 -26
- package/ui.form-calendar/config.d.ts +0 -207
- package/ui.form-calendar/constants.d.ts +0 -66
- package/ui.form-calendar/storybook/stories.d.ts +0 -262
- package/ui.form-calendar/useAttrs.d.ts +0 -11
- package/ui.form-calendar/utilCalendar.d.ts +0 -8
- package/ui.form-calendar/utilDate.d.ts +0 -30
- package/ui.form-calendar/utilFormatting.d.ts +0 -68
- package/ui.form-checkbox/UCheckbox.vue.d.ts +0 -50
- package/ui.form-checkbox/config.d.ts +0 -67
- package/ui.form-checkbox/constants.d.ts +0 -1
- package/ui.form-checkbox/storybook/stories.d.ts +0 -1589
- package/ui.form-checkbox/useAttrs.d.ts +0 -14
- package/ui.form-checkbox-group/UCheckboxGroup.vue.d.ts +0 -40
- package/ui.form-checkbox-group/config.d.ts +0 -21
- package/ui.form-checkbox-group/constants.d.ts +0 -1
- package/ui.form-checkbox-group/storybook/stories.d.ts +0 -2441
- package/ui.form-checkbox-group/useAttrs.d.ts +0 -11
- package/ui.form-checkbox-multi-state/UCheckboxMultiState.vue.d.ts +0 -24
- package/ui.form-checkbox-multi-state/config.d.ts +0 -10
- package/ui.form-checkbox-multi-state/constants.d.ts +0 -1
- package/ui.form-checkbox-multi-state/storybook/stories.d.ts +0 -187
- package/ui.form-checkbox-multi-state/useAttrs.d.ts +0 -13
- package/ui.form-color-picker/UColorPicker.vue.d.ts +0 -28
- package/ui.form-color-picker/config.d.ts +0 -42
- package/ui.form-color-picker/constants.d.ts +0 -1
- package/ui.form-color-picker/storybook/stories.d.ts +0 -316
- package/ui.form-color-picker/useAttrs.d.ts +0 -11
- package/ui.form-date-picker/UDatePicker.vue.d.ts +0 -135
- package/ui.form-date-picker/config.d.ts +0 -184
- package/ui.form-date-picker/constants.d.ts +0 -1
- package/ui.form-date-picker/index.d.ts +0 -1
- package/ui.form-date-picker/storybook/stories.d.ts +0 -3242
- package/ui.form-date-picker/useAttrs.d.ts +0 -14
- package/ui.form-date-picker-range/UDatePickerRange.vue.d.ts +0 -545
- package/ui.form-date-picker-range/UDatePickerRangeInputs.vue.d.ts +0 -6
- package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue.d.ts +0 -7
- package/ui.form-date-picker-range/config.d.ts +0 -265
- package/ui.form-date-picker-range/constants.d.ts +0 -20
- package/ui.form-date-picker-range/storybook/stories.d.ts +0 -5545
- package/ui.form-date-picker-range/useAttrs.d.ts +0 -17
- package/ui.form-date-picker-range/useUserFormat.d.ts +0 -3
- package/ui.form-date-picker-range/utilDateRange.d.ts +0 -20
- package/ui.form-date-picker-range/utilValidation.d.ts +0 -3
- package/ui.form-input/UInput.vue.d.ts +0 -59
- package/ui.form-input/config.d.ts +0 -59
- package/ui.form-input/constants.d.ts +0 -1
- package/ui.form-input/storybook/stories.d.ts +0 -5734
- package/ui.form-input/useAttrs.d.ts +0 -11
- package/ui.form-input-file/UInputFile.vue.d.ts +0 -57
- package/ui.form-input-file/config.d.ts +0 -94
- package/ui.form-input-file/constants.d.ts +0 -1
- package/ui.form-input-file/storybook/stories.d.ts +0 -1116
- package/ui.form-input-file/useAttrs.d.ts +0 -11
- package/ui.form-input-file/utilFileForm.d.ts +0 -1
- package/ui.form-input-money/UInputMoney.vue.d.ts +0 -183
- package/ui.form-input-money/config.d.ts +0 -17
- package/ui.form-input-money/constants.d.ts +0 -1
- package/ui.form-input-money/storybook/stories.d.ts +0 -7519
- package/ui.form-input-money/useAttrs.d.ts +0 -11
- package/ui.form-input-money/useFormatCurrency.d.ts +0 -5
- package/ui.form-input-money/utilFormat.d.ts +0 -7
- package/ui.form-input-number/UInputNumber.vue.d.ts +0 -30
- package/ui.form-input-number/config.d.ts +0 -40
- package/ui.form-input-number/constants.d.ts +0 -1
- package/ui.form-input-number/storybook/stories.d.ts +0 -363
- package/ui.form-input-number/useAttrs.d.ts +0 -11
- package/ui.form-input-rating/UInputRating.vue.d.ts +0 -49
- package/ui.form-input-rating/config.d.ts +0 -56
- package/ui.form-input-rating/constants.d.ts +0 -1
- package/ui.form-input-rating/storybook/stories.d.ts +0 -1336
- package/ui.form-input-rating/useAttrs.d.ts +0 -11
- package/ui.form-input-search/UInputSearch.vue.d.ts +0 -177
- package/ui.form-input-search/config.d.ts +0 -21
- package/ui.form-input-search/constants.d.ts +0 -1
- package/ui.form-input-search/storybook/stories.d.ts +0 -3325
- package/ui.form-input-search/useAttrs.d.ts +0 -11
- package/ui.form-label/ULabel.vue.d.ts +0 -46
- package/ui.form-label/config.d.ts +0 -139
- package/ui.form-label/constants.d.ts +0 -8
- package/ui.form-label/storybook/stories.d.ts +0 -1133
- package/ui.form-label/useAttrs.d.ts +0 -11
- package/ui.form-radio/URadio.vue.d.ts +0 -46
- package/ui.form-radio/config.d.ts +0 -30
- package/ui.form-radio/constants.d.ts +0 -1
- package/ui.form-radio/storybook/stories.d.ts +0 -1270
- package/ui.form-radio/useAttrs.d.ts +0 -14
- package/ui.form-radio-group/URadioGroup.vue.d.ts +0 -40
- package/ui.form-radio-group/config.d.ts +0 -21
- package/ui.form-radio-group/constants.d.ts +0 -1
- package/ui.form-radio-group/storybook/stories.d.ts +0 -1239
- package/ui.form-radio-group/useAttrs.d.ts +0 -11
- package/ui.form-select/USelect.vue.d.ts +0 -405
- package/ui.form-select/config.d.ts +0 -146
- package/ui.form-select/constants.d.ts +0 -13
- package/ui.form-select/storybook/stories.d.ts +0 -19025
- package/ui.form-select/useAttrs.d.ts +0 -15
- package/ui.form-select/utilSelect.d.ts +0 -11
- package/ui.form-switch/USwitch.vue.d.ts +0 -30
- package/ui.form-switch/config.d.ts +0 -106
- package/ui.form-switch/constants.d.ts +0 -1
- package/ui.form-switch/storybook/stories.d.ts +0 -703
- package/ui.form-switch/useAttrs.d.ts +0 -13
- package/ui.form-switch/utilVariant.d.ts +0 -169
- package/ui.form-textarea/UTextarea.vue.d.ts +0 -132
- package/ui.form-textarea/config.d.ts +0 -55
- package/ui.form-textarea/constants.d.ts +0 -1
- package/ui.form-textarea/storybook/stories.d.ts +0 -2175
- package/ui.form-textarea/useAttrs.d.ts +0 -11
- package/ui.image-avatar/UAvatar.vue.d.ts +0 -40
- package/ui.image-avatar/config.d.ts +0 -51
- package/ui.image-avatar/constants.d.ts +0 -1
- package/ui.image-avatar/storybook/stories.d.ts +0 -1640
- package/ui.image-avatar/useAttrs.d.ts +0 -11
- package/ui.image-icon/UIcon.vue.d.ts +0 -28
- package/ui.image-icon/config.d.ts +0 -52
- package/ui.image-icon/constants.d.ts +0 -1
- package/ui.image-icon/storybook/stories.d.ts +0 -516
- package/ui.image-icon/useAttrs.d.ts +0 -11
- package/ui.loader/ULoader.vue.d.ts +0 -23
- package/ui.loader/config.d.ts +0 -49
- package/ui.loader/constants.d.ts +0 -2
- package/ui.loader/storybook/stories.d.ts +0 -655
- package/ui.loader/useAttrs.d.ts +0 -11
- package/ui.loader-overlay/ULoaderOverlay.vue.d.ts +0 -21
- package/ui.loader-overlay/config.d.ts +0 -25
- package/ui.loader-overlay/constants.d.ts +0 -1
- package/ui.loader-overlay/storybook/stories.d.ts +0 -362
- package/ui.loader-overlay/useAttrs.d.ts +0 -11
- package/ui.loader-overlay/useLoaderOverlay.d.ts +0 -10
- package/ui.loader-overlay/utilLoaderOverlay.d.ts +0 -2
- package/ui.loader-progress/ULoaderProgress.vue.d.ts +0 -11
- package/ui.loader-progress/config.d.ts +0 -24
- package/ui.loader-progress/constants.d.ts +0 -3
- package/ui.loader-progress/storybook/stories.d.ts +0 -742
- package/ui.loader-progress/useAttrs.d.ts +0 -11
- package/ui.loader-progress/useLoaderProgress.d.ts +0 -15
- package/ui.loader-progress/utilLoaderProgress.d.ts +0 -5
- package/ui.navigation-pagination/UPagination.vue.d.ts +0 -54
- package/ui.navigation-pagination/config.d.ts +0 -41
- package/ui.navigation-pagination/constants.d.ts +0 -1
- package/ui.navigation-pagination/storybook/stories.d.ts +0 -1033
- package/ui.navigation-pagination/useAttrs.d.ts +0 -11
- package/ui.navigation-progress/StepperProgress.vue.d.ts +0 -15
- package/ui.navigation-progress/UProgress.vue.d.ts +0 -41
- package/ui.navigation-progress/config.d.ts +0 -139
- package/ui.navigation-progress/constants.d.ts +0 -5
- package/ui.navigation-progress/storybook/stories.d.ts +0 -2827
- package/ui.navigation-progress/useAttrs.d.ts +0 -11
- package/ui.navigation-tab/UTab.vue.d.ts +0 -27
- package/ui.navigation-tab/config.d.ts +0 -24
- package/ui.navigation-tab/constants.d.ts +0 -1
- package/ui.navigation-tab/storybook/stories.d.ts +0 -316
- package/ui.navigation-tab/useAttrs.d.ts +0 -14
- package/ui.navigation-tabs/UTabs.vue.d.ts +0 -30
- package/ui.navigation-tabs/config.d.ts +0 -24
- package/ui.navigation-tabs/constants.d.ts +0 -1
- package/ui.navigation-tabs/storybook/stories.d.ts +0 -354
- package/ui.navigation-tabs/useAttrs.d.ts +0 -11
- package/ui.other-dot/UDot.vue.d.ts +0 -13
- package/ui.other-dot/config.d.ts +0 -28
- package/ui.other-dot/constants.d.ts +0 -1
- package/ui.other-dot/storybook/stories.d.ts +0 -645
- package/ui.other-dot/useAttrs.d.ts +0 -11
- package/ui.text-alert/UAlert.vue.d.ts +0 -53
- package/ui.text-alert/config.d.ts +0 -75
- package/ui.text-alert/constants.d.ts +0 -1
- package/ui.text-alert/storybook/stories.d.ts +0 -4845
- package/ui.text-alert/useAttrs.d.ts +0 -11
- package/ui.text-badge/UBadge.vue.d.ts +0 -60
- package/ui.text-badge/config.d.ts +0 -102
- package/ui.text-badge/constants.d.ts +0 -1
- package/ui.text-badge/storybook/stories.d.ts +0 -1869
- package/ui.text-badge/useAttrs.d.ts +0 -11
- package/ui.text-block/UText.vue.d.ts +0 -21
- package/ui.text-block/config.d.ts +0 -27
- package/ui.text-block/constants.d.ts +0 -1
- package/ui.text-block/storybook/stories.d.ts +0 -12
- package/ui.text-block/types.d.ts +0 -9
- package/ui.text-block/types.ts +0 -33
- package/ui.text-block/useAttrs.d.ts +0 -3
- package/ui.text-block/useAttrs.ts +0 -18
- package/ui.text-empty/UEmpty.vue.d.ts +0 -29
- package/ui.text-empty/config.d.ts +0 -55
- package/ui.text-empty/constants.d.ts +0 -1
- package/ui.text-empty/storybook/stories.d.ts +0 -1212
- package/ui.text-empty/useAttrs.d.ts +0 -11
- package/ui.text-file/UFile.vue.d.ts +0 -57
- package/ui.text-file/config.d.ts +0 -42
- package/ui.text-file/constants.d.ts +0 -1
- package/ui.text-file/storybook/stories.d.ts +0 -136
- package/ui.text-file/useAttrs.d.ts +0 -11
- package/ui.text-files/UFiles.vue.d.ts +0 -52
- package/ui.text-files/config.d.ts +0 -10
- package/ui.text-files/constants.d.ts +0 -1
- package/ui.text-files/storybook/stories.d.ts +0 -131
- package/ui.text-files/useAttrs.d.ts +0 -11
- package/ui.text-header/UHeader.vue.d.ts +0 -33
- package/ui.text-header/config.d.ts +0 -54
- package/ui.text-header/constants.d.ts +0 -1
- package/ui.text-header/storybook/stories.d.ts +0 -694
- package/ui.text-header/useAttrs.d.ts +0 -11
- package/ui.text-money/UMoney.vue.d.ts +0 -48
- package/ui.text-money/config.d.ts +0 -77
- package/ui.text-money/constants.d.ts +0 -1
- package/ui.text-money/storybook/stories.d.ts +0 -2090
- package/ui.text-money/useAttrs.d.ts +0 -11
- package/ui.text-money/utilMoney.d.ts +0 -14
- package/ui.text-notify/UNotify.vue.d.ts +0 -13
- package/ui.text-notify/config.d.ts +0 -58
- package/ui.text-notify/constants.d.ts +0 -20
- package/ui.text-notify/storybook/stories.d.ts +0 -653
- package/ui.text-notify/useAttrs.d.ts +0 -11
- package/ui.text-notify/utilNotify.d.ts +0 -7
- package/utils/utilHelper.d.ts +0 -9
- package/utils/utilPlatform.d.ts +0 -6
- package/utils/utilStorybook.d.ts +0 -15
- package/utils/utilUI.d.ts +0 -68
- package/utilsTs/utilHelper.d.ts +0 -9
- package/utilsTs/utilHelper.ts +0 -70
- package/utilsTs/utilPlatform.d.ts +0 -7
- package/utilsTs/utilPlatform.ts +0 -53
- package/utilsTs/utilStorybook.d.ts +0 -24
- package/utilsTs/utilStorybook.ts +0 -292
- package/utilsTs/utilTailwind.d.ts +0 -1
- package/utilsTs/utilTailwind.ts +0 -38
- package/utilsTs/utilTheme.d.ts +0 -8
- package/utilsTs/utilUI.d.ts +0 -67
- package/utilsTs/utilUI.ts +0 -142
- /package/ui.text-block/{config.ts → config.js} +0 -0
- /package/ui.text-block/{constants.ts → constants.js} +0 -0
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
let USelect: {
|
|
3
|
-
listIsEmpty: string;
|
|
4
|
-
noDataToShow: string;
|
|
5
|
-
clear: string;
|
|
6
|
-
addMore: string;
|
|
7
|
-
};
|
|
8
|
-
let USwitch: {
|
|
9
|
-
inactive: string;
|
|
10
|
-
active: string;
|
|
11
|
-
};
|
|
12
|
-
let UInputFile: {
|
|
13
|
-
sizeError: string;
|
|
14
|
-
formatError: string;
|
|
15
|
-
noFile: string;
|
|
16
|
-
uploadFile: string;
|
|
17
|
-
};
|
|
18
|
-
let UDropdownList: {
|
|
19
|
-
noDataToShow: string;
|
|
20
|
-
add: string;
|
|
21
|
-
};
|
|
22
|
-
let UModalConfirm: {
|
|
23
|
-
confirm: string;
|
|
24
|
-
cancel: string;
|
|
25
|
-
};
|
|
26
|
-
let UTable: {
|
|
27
|
-
noData: string;
|
|
28
|
-
};
|
|
29
|
-
let UCalendar: {
|
|
30
|
-
weekdays: {
|
|
31
|
-
shorthand: {
|
|
32
|
-
sunday: string;
|
|
33
|
-
monday: string;
|
|
34
|
-
tuesday: string;
|
|
35
|
-
wednesday: string;
|
|
36
|
-
thursday: string;
|
|
37
|
-
friday: string;
|
|
38
|
-
saturday: string;
|
|
39
|
-
};
|
|
40
|
-
longhand: {
|
|
41
|
-
sunday: string;
|
|
42
|
-
monday: string;
|
|
43
|
-
tuesday: string;
|
|
44
|
-
wednesday: string;
|
|
45
|
-
thursday: string;
|
|
46
|
-
friday: string;
|
|
47
|
-
saturday: string;
|
|
48
|
-
};
|
|
49
|
-
userFormat: {
|
|
50
|
-
sunday: string;
|
|
51
|
-
monday: string;
|
|
52
|
-
tuesday: string;
|
|
53
|
-
wednesday: string;
|
|
54
|
-
thursday: string;
|
|
55
|
-
friday: string;
|
|
56
|
-
saturday: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
months: {
|
|
60
|
-
shorthand: {
|
|
61
|
-
january: string;
|
|
62
|
-
february: string;
|
|
63
|
-
march: string;
|
|
64
|
-
april: string;
|
|
65
|
-
may: string;
|
|
66
|
-
june: string;
|
|
67
|
-
july: string;
|
|
68
|
-
august: string;
|
|
69
|
-
september: string;
|
|
70
|
-
october: string;
|
|
71
|
-
november: string;
|
|
72
|
-
december: string;
|
|
73
|
-
};
|
|
74
|
-
longhand: {
|
|
75
|
-
january: string;
|
|
76
|
-
february: string;
|
|
77
|
-
march: string;
|
|
78
|
-
april: string;
|
|
79
|
-
may: string;
|
|
80
|
-
june: string;
|
|
81
|
-
july: string;
|
|
82
|
-
august: string;
|
|
83
|
-
september: string;
|
|
84
|
-
october: string;
|
|
85
|
-
november: string;
|
|
86
|
-
december: string;
|
|
87
|
-
};
|
|
88
|
-
userFormat: {
|
|
89
|
-
january: string;
|
|
90
|
-
february: string;
|
|
91
|
-
march: string;
|
|
92
|
-
april: string;
|
|
93
|
-
may: string;
|
|
94
|
-
june: string;
|
|
95
|
-
july: string;
|
|
96
|
-
august: string;
|
|
97
|
-
september: string;
|
|
98
|
-
october: string;
|
|
99
|
-
november: string;
|
|
100
|
-
december: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
timeLabel: string;
|
|
104
|
-
okLabel: string;
|
|
105
|
-
};
|
|
106
|
-
let UDatePicker: {
|
|
107
|
-
today: string;
|
|
108
|
-
yesterday: string;
|
|
109
|
-
tomorrow: string;
|
|
110
|
-
weekdays: {
|
|
111
|
-
shorthand: {
|
|
112
|
-
sunday: string;
|
|
113
|
-
monday: string;
|
|
114
|
-
tuesday: string;
|
|
115
|
-
wednesday: string;
|
|
116
|
-
thursday: string;
|
|
117
|
-
friday: string;
|
|
118
|
-
saturday: string;
|
|
119
|
-
};
|
|
120
|
-
longhand: {
|
|
121
|
-
sunday: string;
|
|
122
|
-
monday: string;
|
|
123
|
-
tuesday: string;
|
|
124
|
-
wednesday: string;
|
|
125
|
-
thursday: string;
|
|
126
|
-
friday: string;
|
|
127
|
-
saturday: string;
|
|
128
|
-
};
|
|
129
|
-
userFormat: {
|
|
130
|
-
sunday: string;
|
|
131
|
-
monday: string;
|
|
132
|
-
tuesday: string;
|
|
133
|
-
wednesday: string;
|
|
134
|
-
thursday: string;
|
|
135
|
-
friday: string;
|
|
136
|
-
saturday: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
months: {
|
|
140
|
-
shorthand: {
|
|
141
|
-
january: string;
|
|
142
|
-
february: string;
|
|
143
|
-
march: string;
|
|
144
|
-
april: string;
|
|
145
|
-
may: string;
|
|
146
|
-
june: string;
|
|
147
|
-
july: string;
|
|
148
|
-
august: string;
|
|
149
|
-
september: string;
|
|
150
|
-
october: string;
|
|
151
|
-
november: string;
|
|
152
|
-
december: string;
|
|
153
|
-
};
|
|
154
|
-
longhand: {
|
|
155
|
-
january: string;
|
|
156
|
-
february: string;
|
|
157
|
-
march: string;
|
|
158
|
-
april: string;
|
|
159
|
-
may: string;
|
|
160
|
-
june: string;
|
|
161
|
-
july: string;
|
|
162
|
-
august: string;
|
|
163
|
-
september: string;
|
|
164
|
-
october: string;
|
|
165
|
-
november: string;
|
|
166
|
-
december: string;
|
|
167
|
-
};
|
|
168
|
-
userFormat: {
|
|
169
|
-
january: string;
|
|
170
|
-
february: string;
|
|
171
|
-
march: string;
|
|
172
|
-
april: string;
|
|
173
|
-
may: string;
|
|
174
|
-
june: string;
|
|
175
|
-
july: string;
|
|
176
|
-
august: string;
|
|
177
|
-
september: string;
|
|
178
|
-
october: string;
|
|
179
|
-
november: string;
|
|
180
|
-
december: string;
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
timeLabel: string;
|
|
184
|
-
okLabel: string;
|
|
185
|
-
};
|
|
186
|
-
let UDatePickerRange: {
|
|
187
|
-
ownRange: string;
|
|
188
|
-
week: string;
|
|
189
|
-
month: string;
|
|
190
|
-
quarter: string;
|
|
191
|
-
year: string;
|
|
192
|
-
dateFormatWithDot: string;
|
|
193
|
-
notCorrectMonthNumber: string;
|
|
194
|
-
notCorrectDayNumber: string;
|
|
195
|
-
fromDateGraterThanSecond: string;
|
|
196
|
-
toDateSmallerThanFirst: string;
|
|
197
|
-
weekdays: {
|
|
198
|
-
shorthand: {
|
|
199
|
-
sunday: string;
|
|
200
|
-
monday: string;
|
|
201
|
-
tuesday: string;
|
|
202
|
-
wednesday: string;
|
|
203
|
-
thursday: string;
|
|
204
|
-
friday: string;
|
|
205
|
-
saturday: string;
|
|
206
|
-
};
|
|
207
|
-
longhand: {
|
|
208
|
-
sunday: string;
|
|
209
|
-
monday: string;
|
|
210
|
-
tuesday: string;
|
|
211
|
-
wednesday: string;
|
|
212
|
-
thursday: string;
|
|
213
|
-
friday: string;
|
|
214
|
-
saturday: string;
|
|
215
|
-
};
|
|
216
|
-
userFormat: {
|
|
217
|
-
sunday: string;
|
|
218
|
-
monday: string;
|
|
219
|
-
tuesday: string;
|
|
220
|
-
wednesday: string;
|
|
221
|
-
thursday: string;
|
|
222
|
-
friday: string;
|
|
223
|
-
saturday: string;
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
months: {
|
|
227
|
-
shorthand: {
|
|
228
|
-
january: string;
|
|
229
|
-
february: string;
|
|
230
|
-
march: string;
|
|
231
|
-
april: string;
|
|
232
|
-
may: string;
|
|
233
|
-
june: string;
|
|
234
|
-
july: string;
|
|
235
|
-
august: string;
|
|
236
|
-
september: string;
|
|
237
|
-
october: string;
|
|
238
|
-
november: string;
|
|
239
|
-
december: string;
|
|
240
|
-
};
|
|
241
|
-
longhand: {
|
|
242
|
-
january: string;
|
|
243
|
-
february: string;
|
|
244
|
-
march: string;
|
|
245
|
-
april: string;
|
|
246
|
-
may: string;
|
|
247
|
-
june: string;
|
|
248
|
-
july: string;
|
|
249
|
-
august: string;
|
|
250
|
-
september: string;
|
|
251
|
-
october: string;
|
|
252
|
-
november: string;
|
|
253
|
-
december: string;
|
|
254
|
-
};
|
|
255
|
-
userFormat: {
|
|
256
|
-
january: string;
|
|
257
|
-
february: string;
|
|
258
|
-
march: string;
|
|
259
|
-
april: string;
|
|
260
|
-
may: string;
|
|
261
|
-
june: string;
|
|
262
|
-
july: string;
|
|
263
|
-
august: string;
|
|
264
|
-
september: string;
|
|
265
|
-
october: string;
|
|
266
|
-
november: string;
|
|
267
|
-
december: string;
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
let UDataList: {
|
|
272
|
-
edit: string;
|
|
273
|
-
delete: string;
|
|
274
|
-
emptyTitle: string;
|
|
275
|
-
emptyDescription: string;
|
|
276
|
-
};
|
|
277
|
-
let UNotify: {
|
|
278
|
-
success: {
|
|
279
|
-
default: string;
|
|
280
|
-
};
|
|
281
|
-
warning: {
|
|
282
|
-
default: string;
|
|
283
|
-
};
|
|
284
|
-
error: {
|
|
285
|
-
default: string;
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export default function createVuelessAdapter(options: any): {
|
|
2
|
-
name: string;
|
|
3
|
-
locale: import("vue").ShallowRef<any>;
|
|
4
|
-
fallback: import("vue").ShallowRef<any>;
|
|
5
|
-
messages: import("vue").Ref<any, any>;
|
|
6
|
-
t: (key: any, ...params: any[]) => any;
|
|
7
|
-
tm: (key: any) => any;
|
|
8
|
-
n: (value: any, options: any) => string;
|
|
9
|
-
};
|
|
10
|
-
export function getObjectValueByPath(obj: any, path: any, fallback: any): any;
|
|
11
|
-
export function getNestedValue(obj: any, path: any, fallback: any): any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export function useAutoPosition(anchorElement: any, targetElement: any, position: any, preferredPosition: any): {
|
|
2
|
-
isTop: import("vue").ComputedRef<boolean>;
|
|
3
|
-
isRight: import("vue").ComputedRef<boolean>;
|
|
4
|
-
isBottom: import("vue").ComputedRef<boolean>;
|
|
5
|
-
isLeft: import("vue").ComputedRef<boolean>;
|
|
6
|
-
adjustPositionY: () => void;
|
|
7
|
-
adjustPositionX: () => void;
|
|
8
|
-
};
|
|
9
|
-
export namespace POSITION {
|
|
10
|
-
let left: string;
|
|
11
|
-
let right: string;
|
|
12
|
-
let top: string;
|
|
13
|
-
let bottom: string;
|
|
14
|
-
let auto: string;
|
|
15
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export default function useBreakpoint(): {
|
|
2
|
-
isLaptopBreakpoint: import("vue").ComputedRef<boolean>;
|
|
3
|
-
isTabletBreakpoint: import("vue").ComputedRef<boolean>;
|
|
4
|
-
isMobileBreakpoint: import("vue").ComputedRef<boolean>;
|
|
5
|
-
isPortableBreakpoint: import("vue").ComputedRef<boolean>;
|
|
6
|
-
elementSize: import("vue").ComputedRef<string>;
|
|
7
|
-
};
|
package/composables/useUI.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export default function useUI(defaultConfig: {} | undefined, propsConfigGetter: null | undefined, topLevelClassKey: any): {
|
|
2
|
-
config: import("vue").Ref<{}, {}>;
|
|
3
|
-
setColor: typeof setColor;
|
|
4
|
-
getColor: typeof getColor;
|
|
5
|
-
getAttrs: (configKey: string, options: Object) => Object;
|
|
6
|
-
getKeysAttrs: (mutatedProps?: {}, extendingKeys?: any[], keysToExtendConfig?: {}) => Object;
|
|
7
|
-
getExtendingKeysClasses: (extendingKeys: any[], mutatedProps?: Object) => Object;
|
|
8
|
-
isCVA: typeof isCVA;
|
|
9
|
-
isSystemKey: typeof isSystemKey;
|
|
10
|
-
hasSlotContent: typeof hasSlotContent;
|
|
11
|
-
};
|
|
12
|
-
import { setColor } from "../utils/utilUI.js";
|
|
13
|
-
import { getColor } from "../utils/utilUI.js";
|
|
14
|
-
declare function isCVA(config: Object | string): boolean;
|
|
15
|
-
declare function isSystemKey(key: string): boolean;
|
|
16
|
-
declare function hasSlotContent(slot: any, props?: {}): boolean;
|
|
17
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Ref, ComputedRef } from "vue";
|
|
2
|
-
interface PositionXY {
|
|
3
|
-
x: Position;
|
|
4
|
-
y: Position;
|
|
5
|
-
}
|
|
6
|
-
export declare enum Position {
|
|
7
|
-
Left = "left",
|
|
8
|
-
Right = "right",
|
|
9
|
-
Top = "top",
|
|
10
|
-
Bottom = "bottom",
|
|
11
|
-
Auto = "auto"
|
|
12
|
-
}
|
|
13
|
-
export declare const POSITION: {
|
|
14
|
-
left: string;
|
|
15
|
-
right: string;
|
|
16
|
-
top: string;
|
|
17
|
-
bottom: string;
|
|
18
|
-
auto: string;
|
|
19
|
-
};
|
|
20
|
-
export declare function useAutoPosition(anchorElement: Ref<HTMLElement | null>, targetElement: Ref<HTMLElement | null>, position: PositionXY | ComputedRef<PositionXY>, preferredPosition: PositionXY | ComputedRef<PositionXY>): {
|
|
21
|
-
isTop: ComputedRef<boolean>;
|
|
22
|
-
isRight: ComputedRef<boolean>;
|
|
23
|
-
isBottom: ComputedRef<boolean>;
|
|
24
|
-
isLeft: ComputedRef<boolean>;
|
|
25
|
-
adjustPositionY: () => void;
|
|
26
|
-
adjustPositionX: () => void;
|
|
27
|
-
};
|
|
28
|
-
export {};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { computed, toValue, ref } from "vue";
|
|
2
|
-
import { isSSR } from "../utils/utilHelper.js";
|
|
3
|
-
|
|
4
|
-
import type { Ref, ComputedRef } from "vue";
|
|
5
|
-
|
|
6
|
-
interface PositionXY {
|
|
7
|
-
x: Position;
|
|
8
|
-
y: Position;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum Position {
|
|
12
|
-
Left = "left",
|
|
13
|
-
Right = "right",
|
|
14
|
-
Top = "top",
|
|
15
|
-
Bottom = "bottom",
|
|
16
|
-
Auto = "auto",
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// TODO: Remove after full TS migration, use enum instead.
|
|
20
|
-
export const POSITION = {
|
|
21
|
-
left: "left",
|
|
22
|
-
right: "right",
|
|
23
|
-
top: "top",
|
|
24
|
-
bottom: "bottom",
|
|
25
|
-
auto: "auto",
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export function useAutoPosition(
|
|
29
|
-
anchorElement: Ref<HTMLElement | null>,
|
|
30
|
-
targetElement: Ref<HTMLElement | null>,
|
|
31
|
-
position: PositionXY | ComputedRef<PositionXY>,
|
|
32
|
-
preferredPosition: PositionXY | ComputedRef<PositionXY>,
|
|
33
|
-
) {
|
|
34
|
-
const localAnchorElement = computed(() => toValue(anchorElement));
|
|
35
|
-
const localTargetElement = computed(() => toValue(targetElement));
|
|
36
|
-
const localPosition = computed(() => toValue(position));
|
|
37
|
-
const localPreferredPosition = computed(() => toValue(preferredPosition));
|
|
38
|
-
|
|
39
|
-
const preferredOpenDirectionY = ref(localPreferredPosition.value?.y || Position.Bottom);
|
|
40
|
-
const preferredOpenDirectionX = ref(localPreferredPosition.value?.x || Position.Left);
|
|
41
|
-
|
|
42
|
-
const isTop = computed(() => {
|
|
43
|
-
if (localPosition.value.y !== Position.Auto) {
|
|
44
|
-
return localPosition.value.y === Position.Top;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return preferredOpenDirectionY.value === Position.Top;
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const isLeft = computed(() => {
|
|
51
|
-
if (localPosition.value.x !== Position.Auto) {
|
|
52
|
-
return localPosition.value.x === Position.Left;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return preferredOpenDirectionX.value === Position.Left;
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
const isBottom = computed(() => {
|
|
59
|
-
if (localPosition.value.y !== Position.Auto) {
|
|
60
|
-
return localPosition.value.y === Position.Bottom;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return preferredOpenDirectionY.value === Position.Bottom;
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const isRight = computed(() => {
|
|
67
|
-
if (localPosition.value.x !== Position.Auto) {
|
|
68
|
-
return localPosition.value.x === Position.Right;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return preferredOpenDirectionX.value === Position.Right;
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
function adjustPositionY(): void {
|
|
75
|
-
if (isSSR || !localAnchorElement.value || !localTargetElement.value) return;
|
|
76
|
-
|
|
77
|
-
const spaceAbove = localAnchorElement.value.getBoundingClientRect().top;
|
|
78
|
-
const spaceBelow = window.innerHeight - localAnchorElement.value.getBoundingClientRect().bottom;
|
|
79
|
-
const hasEnoughSpaceBelow =
|
|
80
|
-
spaceBelow > localTargetElement.value.getBoundingClientRect().height;
|
|
81
|
-
const hasEnoughSpaceAbove =
|
|
82
|
-
spaceAbove > localTargetElement.value.getBoundingClientRect().height;
|
|
83
|
-
|
|
84
|
-
if (localPreferredPosition.value.y === Position.Bottom) {
|
|
85
|
-
preferredOpenDirectionY.value =
|
|
86
|
-
hasEnoughSpaceBelow || spaceBelow > spaceAbove ? Position.Bottom : Position.Top;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (localPreferredPosition.value.y === Position.Top) {
|
|
90
|
-
preferredOpenDirectionY.value =
|
|
91
|
-
hasEnoughSpaceAbove || spaceAbove > spaceBelow ? Position.Top : Position.Bottom;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function adjustPositionX(): void {
|
|
96
|
-
if (isSSR || !localAnchorElement.value || !localTargetElement.value) return;
|
|
97
|
-
|
|
98
|
-
const spaceRight = localAnchorElement.value.getBoundingClientRect().right;
|
|
99
|
-
const spaceLeft = window.innerWidth - localAnchorElement.value.getBoundingClientRect().left;
|
|
100
|
-
const hasEnoughSpaceLeft = spaceLeft > localTargetElement.value.getBoundingClientRect().width;
|
|
101
|
-
const hasEnoughSpaceRight = spaceRight > localTargetElement.value.getBoundingClientRect().width;
|
|
102
|
-
|
|
103
|
-
if (localPreferredPosition.value.x === Position.Right) {
|
|
104
|
-
preferredOpenDirectionX.value =
|
|
105
|
-
hasEnoughSpaceRight || spaceRight > spaceLeft ? Position.Right : Position.Left;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (localPreferredPosition.value.x === Position.Left) {
|
|
109
|
-
preferredOpenDirectionX.value =
|
|
110
|
-
hasEnoughSpaceLeft || spaceLeft > spaceRight ? Position.Left : Position.Right;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return { isTop, isRight, isBottom, isLeft, adjustPositionY, adjustPositionX };
|
|
115
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export default function useBreakpoint(): {
|
|
2
|
-
isLaptopBreakpoint: import("vue").ComputedRef<boolean>;
|
|
3
|
-
isTabletBreakpoint: import("vue").ComputedRef<boolean>;
|
|
4
|
-
isMobileBreakpoint: import("vue").ComputedRef<boolean>;
|
|
5
|
-
isPortableBreakpoint: import("vue").ComputedRef<boolean>;
|
|
6
|
-
elementSize: import("vue").ComputedRef<string>;
|
|
7
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { onMounted, ref, watch, computed, onBeforeUnmount } from "vue";
|
|
2
|
-
import { isSSR } from "../utils/utilHelper.js";
|
|
3
|
-
|
|
4
|
-
import type { Ref } from "vue";
|
|
5
|
-
|
|
6
|
-
const BREAKPOINT_NAME = {
|
|
7
|
-
xs: "xs",
|
|
8
|
-
sm: "sm",
|
|
9
|
-
md: "md",
|
|
10
|
-
lg: "lg",
|
|
11
|
-
xl: "xl",
|
|
12
|
-
"2xl": "2xl",
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const BREAKPOINT = {
|
|
16
|
-
xs: 0,
|
|
17
|
-
sm: 640,
|
|
18
|
-
md: 768,
|
|
19
|
-
lg: 1024,
|
|
20
|
-
xl: 1280,
|
|
21
|
-
"2xl": 1536,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const mobileDevices = ["xs", "sm"];
|
|
25
|
-
const portableDevices = ["xs", "sm", "md"];
|
|
26
|
-
|
|
27
|
-
export default function useBreakpoint() {
|
|
28
|
-
let timeout: number;
|
|
29
|
-
|
|
30
|
-
const windowWidth: Ref<number | undefined> = ref(undefined);
|
|
31
|
-
const currentBreakpoint = ref(BREAKPOINT_NAME.xs);
|
|
32
|
-
|
|
33
|
-
const isMobileBreakpoint = computed(() => {
|
|
34
|
-
return mobileDevices.includes(currentBreakpoint.value);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const isTabletBreakpoint = computed(() => {
|
|
38
|
-
return mobileDevices.includes(currentBreakpoint.value);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const isLaptopBreakpoint = computed(() => {
|
|
42
|
-
return currentBreakpoint.value === BREAKPOINT_NAME.lg;
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const isPortableBreakpoint = computed(() => {
|
|
46
|
-
return portableDevices.includes(currentBreakpoint.value);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const elementSize = computed(() => {
|
|
50
|
-
return isMobileBreakpoint.value ? BREAKPOINT_NAME.md : BREAKPOINT_NAME.lg;
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
onMounted(() => {
|
|
54
|
-
if (isSSR) return;
|
|
55
|
-
|
|
56
|
-
windowWidth.value = window.innerWidth;
|
|
57
|
-
|
|
58
|
-
window.addEventListener("resize", resizeListener, { passive: true });
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
onBeforeUnmount(() => {
|
|
62
|
-
if (isSSR) return;
|
|
63
|
-
|
|
64
|
-
window.removeEventListener("resize", resizeListener);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
watch(windowWidth, setBreakpoint, { immediate: true });
|
|
68
|
-
|
|
69
|
-
function resizeListener() {
|
|
70
|
-
if (isSSR) return;
|
|
71
|
-
|
|
72
|
-
if (timeout) {
|
|
73
|
-
window.cancelAnimationFrame(timeout);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
timeout = window.requestAnimationFrame(() => {
|
|
77
|
-
windowWidth.value = window.innerWidth;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function setBreakpoint(newWindowWidth: number | undefined) {
|
|
82
|
-
if (newWindowWidth === undefined) return;
|
|
83
|
-
|
|
84
|
-
currentBreakpoint.value = "xs";
|
|
85
|
-
|
|
86
|
-
if (newWindowWidth >= BREAKPOINT.sm && newWindowWidth < BREAKPOINT.md) {
|
|
87
|
-
currentBreakpoint.value = "sm";
|
|
88
|
-
} else if (newWindowWidth >= BREAKPOINT.md && newWindowWidth < BREAKPOINT.lg) {
|
|
89
|
-
currentBreakpoint.value = "md";
|
|
90
|
-
} else if (newWindowWidth >= BREAKPOINT.lg && newWindowWidth < BREAKPOINT.xl) {
|
|
91
|
-
currentBreakpoint.value = "lg";
|
|
92
|
-
} else if (newWindowWidth >= BREAKPOINT.xl && newWindowWidth < BREAKPOINT["2xl"]) {
|
|
93
|
-
currentBreakpoint.value = "xl";
|
|
94
|
-
} else if (newWindowWidth >= BREAKPOINT["2xl"]) {
|
|
95
|
-
currentBreakpoint.value = "2xl";
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return {
|
|
100
|
-
isLaptopBreakpoint,
|
|
101
|
-
isTabletBreakpoint,
|
|
102
|
-
isMobileBreakpoint,
|
|
103
|
-
isPortableBreakpoint,
|
|
104
|
-
elementSize,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { inject } from "vue";
|
|
2
|
-
import createVuelessAdapter from "../adatper.locale/vueless.js";
|
|
3
|
-
|
|
4
|
-
export const LocaleSymbol = Symbol.for("vueless:locale");
|
|
5
|
-
|
|
6
|
-
function isLocaleInstance(obj): boolean {
|
|
7
|
-
return obj.name !== null;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function createLocale(options) {
|
|
11
|
-
const i18n =
|
|
12
|
-
options?.adapter && isLocaleInstance(options?.adapter)
|
|
13
|
-
? options?.adapter
|
|
14
|
-
: createVuelessAdapter(options);
|
|
15
|
-
|
|
16
|
-
return { ...i18n };
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function useLocale() {
|
|
20
|
-
const locale = inject(LocaleSymbol);
|
|
21
|
-
|
|
22
|
-
if (!locale) throw new Error("[vueless] Could not find injected locale instance");
|
|
23
|
-
|
|
24
|
-
return locale;
|
|
25
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Ref } from "vue";
|
|
2
|
-
export declare function useMutationObserver(target: Ref<HTMLElement | null>, callBack: () => void, config?: {
|
|
3
|
-
childList: boolean;
|
|
4
|
-
attributes: boolean;
|
|
5
|
-
characterData: boolean;
|
|
6
|
-
}): {
|
|
7
|
-
observer: MutationObserver;
|
|
8
|
-
} | undefined;
|