vueless 0.0.475 → 0.0.476
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composables/useBreakpoint.js +1 -1
- package/composables/useUI.js +1 -204
- package/constants.js +1 -2
- package/directives/clickOutside/vClickOutside.js +2 -2
- package/directives/tooltip/storybook/stories.js +5 -5
- package/{index.ts → index.js} +6 -9
- package/package.json +17 -28
- package/{preset.tailwind.ts → preset.tailwind.js} +22 -30
- package/ui.button/config.js +0 -12
- package/ui.button-link/ULink.vue +1 -1
- package/ui.button-link/config.js +0 -9
- package/ui.data-list/UDataList.vue +4 -4
- package/ui.dropdown-badge/config.js +0 -1
- package/ui.dropdown-button/config.js +0 -1
- package/ui.form-checkbox/config.js +0 -9
- package/ui.form-color-picker/config.js +0 -7
- package/ui.form-input/UInput.vue +1 -1
- package/ui.form-input-money/useFormatCurrency.js +1 -1
- package/ui.form-input-number/UInputNumber.vue +3 -4
- package/ui.form-label/config.js +2 -2
- package/ui.form-radio/config.js +0 -6
- package/ui.form-switch/config.js +0 -6
- package/ui.image-avatar/config.js +0 -5
- package/ui.image-icon/config.js +0 -5
- package/ui.loader/config.js +0 -1
- package/ui.loader-overlay/config.js +0 -1
- package/ui.loader-progress/config.js +0 -1
- package/ui.navigation-progress/config.js +0 -9
- package/ui.other-dot/config.js +0 -1
- package/ui.text-alert/config.js +0 -7
- package/ui.text-badge/config.js +0 -8
- package/ui.text-block/UText.vue +62 -18
- package/ui.text-block/storybook/Docs.mdx +2 -2
- package/ui.text-block/storybook/{stories.ts → stories.js} +7 -12
- package/ui.text-block/useAttrs.js +15 -0
- package/ui.text-file/UFile.vue +14 -12
- package/ui.text-file/config.js +2 -12
- package/ui.text-files/config.js +1 -1
- package/ui.text-header/config.js +0 -1
- package/ui.text-money/config.js +0 -1
- package/ui.text-money/utilMoney.js +2 -2
- package/{utilsTs/utilTheme.ts → utils/utilTheme.js} +27 -31
- package/utils/utilUI.js +204 -0
- package/web-types.json +120 -30
- package/adatper.locale/locales/en.d.ts +0 -289
- package/adatper.locale/vue-i18n.d.ts +0 -9
- package/adatper.locale/vueless.d.ts +0 -11
- package/composables/useAutoPosition.d.ts +0 -15
- package/composables/useBreakpoint.d.ts +0 -7
- package/composables/useLocale.d.ts +0 -3
- package/composables/useMutationObserver.d.ts +0 -7
- package/composables/useUI.d.ts +0 -17
- package/composablesTs/useAutoPosition.d.ts +0 -28
- package/composablesTs/useAutoPosition.ts +0 -115
- package/composablesTs/useBreakpoint.d.ts +0 -7
- package/composablesTs/useBreakpoint.ts +0 -106
- package/composablesTs/useLocale.d.ts +0 -3
- package/composablesTs/useLocale.ts +0 -25
- package/composablesTs/useMutationObserver.d.ts +0 -8
- package/composablesTs/useMutationObserver.ts +0 -50
- package/composablesTs/useUI.d.ts +0 -68
- package/composablesTs/useUI.ts +0 -566
- package/constants.d.ts +0 -42
- package/constants.ts +0 -73
- package/directives/clickOutside/storybook/stories.d.ts +0 -653
- package/directives/clickOutside/vClickOutside.d.ts +0 -6
- package/directives/index.d.ts +0 -2
- package/directives/tooltip/storybook/stories.d.ts +0 -252
- package/directives/tooltip/vTooltip.d.ts +0 -6
- package/index.d.ts +0 -15
- package/preset.tailwind.d.ts +0 -116
- package/types.d.ts +0 -131
- package/types.ts +0 -218
- package/ui.button/UButton.vue.d.ts +0 -73
- package/ui.button/config.d.ts +0 -130
- package/ui.button/constants.d.ts +0 -1
- package/ui.button/storybook/stories.d.ts +0 -3062
- package/ui.button/useAttrs.d.ts +0 -11
- package/ui.button-link/ULink.vue.d.ts +0 -66
- package/ui.button-link/config.d.ts +0 -101
- package/ui.button-link/constants.d.ts +0 -1
- package/ui.button-link/storybook/stories.d.ts +0 -4567
- package/ui.button-link/useAttrs.d.ts +0 -14
- package/ui.button-toggle/UToggle.vue.d.ts +0 -50
- package/ui.button-toggle/config.d.ts +0 -65
- package/ui.button-toggle/constants.d.ts +0 -3
- package/ui.button-toggle/storybook/stories.d.ts +0 -2683
- package/ui.button-toggle/useAttrs.d.ts +0 -11
- package/ui.button-toggle-item/UToggleItem.vue.d.ts +0 -36
- package/ui.button-toggle-item/config.d.ts +0 -41
- package/ui.button-toggle-item/constants.d.ts +0 -1
- package/ui.button-toggle-item/storybook/stories.d.ts +0 -495
- package/ui.button-toggle-item/useAttrs.d.ts +0 -15
- package/ui.container-accordion/UAccordion.vue.d.ts +0 -32
- package/ui.container-accordion/config.d.ts +0 -40
- package/ui.container-accordion/constants.d.ts +0 -1
- package/ui.container-accordion/storybook/stories.d.ts +0 -732
- package/ui.container-accordion/useAttrs.d.ts +0 -13
- package/ui.container-card/UCard.vue.d.ts +0 -31
- package/ui.container-card/config.d.ts +0 -13
- package/ui.container-card/constants.d.ts +0 -1
- package/ui.container-card/storybook/stories.d.ts +0 -3906
- package/ui.container-card/useAttrs.d.ts +0 -11
- package/ui.container-col/UCol.vue.d.ts +0 -33
- package/ui.container-col/config.d.ts +0 -81
- package/ui.container-col/constants.d.ts +0 -1
- package/ui.container-col/storybook/stories.d.ts +0 -840
- package/ui.container-col/useAttrs.d.ts +0 -11
- package/ui.container-divider/UDivider.vue.d.ts +0 -25
- package/ui.container-divider/config.d.ts +0 -102
- package/ui.container-divider/constants.d.ts +0 -1
- package/ui.container-divider/storybook/stories.d.ts +0 -577
- package/ui.container-divider/useAttrs.d.ts +0 -11
- package/ui.container-group/UGroup.vue.d.ts +0 -33
- package/ui.container-group/config.d.ts +0 -38
- package/ui.container-group/constants.d.ts +0 -1
- package/ui.container-group/storybook/stories.d.ts +0 -2869
- package/ui.container-group/useAttrs.d.ts +0 -11
- package/ui.container-modal/UModal.vue.d.ts +0 -59
- package/ui.container-modal/config.d.ts +0 -77
- package/ui.container-modal/constants.d.ts +0 -1
- package/ui.container-modal/storybook/stories.d.ts +0 -8377
- package/ui.container-modal/useAttrs.d.ts +0 -11
- package/ui.container-modal-confirm/UModalConfirm.vue.d.ts +0 -59
- package/ui.container-modal-confirm/config.d.ts +0 -23
- package/ui.container-modal-confirm/constants.d.ts +0 -1
- package/ui.container-modal-confirm/storybook/stories.d.ts +0 -4494
- package/ui.container-modal-confirm/useAttrs.d.ts +0 -11
- package/ui.container-page/UPage.vue.d.ts +0 -47
- package/ui.container-page/config.d.ts +0 -85
- package/ui.container-page/constants.d.ts +0 -1
- package/ui.container-page/storybook/stories.d.ts +0 -8723
- package/ui.container-page/useAttrs.d.ts +0 -13
- package/ui.container-row/URow.vue.d.ts +0 -35
- package/ui.container-row/config.d.ts +0 -85
- package/ui.container-row/constants.d.ts +0 -1
- package/ui.container-row/storybook/stories.d.ts +0 -2619
- package/ui.container-row/useAttrs.d.ts +0 -11
- package/ui.data-list/UDataList.vue.d.ts +0 -74
- package/ui.data-list/config.d.ts +0 -48
- package/ui.data-list/constants.d.ts +0 -1
- package/ui.data-list/storybook/stories.d.ts +0 -3342
- package/ui.data-list/useAttrs.d.ts +0 -11
- package/ui.data-table/UTable.vue.d.ts +0 -90
- package/ui.data-table/UTableRow.vue.d.ts +0 -61
- package/ui.data-table/config.d.ts +0 -128
- package/ui.data-table/constants.d.ts +0 -1
- package/ui.data-table/storybook/stories.d.ts +0 -13069
- package/ui.data-table/useAttrs.d.ts +0 -17
- package/ui.data-table/utilTable.d.ts +0 -9
- package/ui.dropdown-badge/UDropdownBadge.vue.d.ts +0 -145
- package/ui.dropdown-badge/config.d.ts +0 -39
- package/ui.dropdown-badge/constants.d.ts +0 -1
- package/ui.dropdown-badge/storybook/stories.d.ts +0 -1246
- package/ui.dropdown-badge/useAttrs.d.ts +0 -13
- package/ui.dropdown-button/UDropdownButton.vue.d.ts +0 -151
- package/ui.dropdown-button/config.d.ts +0 -52
- package/ui.dropdown-button/constants.d.ts +0 -4
- package/ui.dropdown-button/storybook/stories.d.ts +0 -1912
- package/ui.dropdown-button/useAttrs.d.ts +0 -13
- package/ui.dropdown-link/UDropdownLink.vue.d.ts +0 -149
- package/ui.dropdown-link/config.d.ts +0 -37
- package/ui.dropdown-link/constants.d.ts +0 -1
- package/ui.dropdown-link/storybook/stories.d.ts +0 -1333
- package/ui.dropdown-link/useAttrs.d.ts +0 -13
- package/ui.dropdown-list/UDropdownList.vue.d.ts +0 -59
- package/ui.dropdown-list/config.d.ts +0 -77
- package/ui.dropdown-list/constants.d.ts +0 -1
- package/ui.dropdown-list/storybook/stories.d.ts +0 -783
- package/ui.dropdown-list/useAttrs.d.ts +0 -11
- package/ui.dropdown-list/usePointer.d.ts +0 -8
- package/ui.form-calendar/UCalendar.vue.d.ts +0 -31
- package/ui.form-calendar/UCalendarDayView.vue.d.ts +0 -26
- package/ui.form-calendar/UCalendarMonthView.vue.d.ts +0 -26
- package/ui.form-calendar/UCalendarYearView.vue.d.ts +0 -26
- package/ui.form-calendar/config.d.ts +0 -207
- package/ui.form-calendar/constants.d.ts +0 -66
- package/ui.form-calendar/storybook/stories.d.ts +0 -262
- package/ui.form-calendar/useAttrs.d.ts +0 -11
- package/ui.form-calendar/utilCalendar.d.ts +0 -8
- package/ui.form-calendar/utilDate.d.ts +0 -30
- package/ui.form-calendar/utilFormatting.d.ts +0 -68
- package/ui.form-checkbox/UCheckbox.vue.d.ts +0 -50
- package/ui.form-checkbox/config.d.ts +0 -67
- package/ui.form-checkbox/constants.d.ts +0 -1
- package/ui.form-checkbox/storybook/stories.d.ts +0 -1589
- package/ui.form-checkbox/useAttrs.d.ts +0 -14
- package/ui.form-checkbox-group/UCheckboxGroup.vue.d.ts +0 -40
- package/ui.form-checkbox-group/config.d.ts +0 -21
- package/ui.form-checkbox-group/constants.d.ts +0 -1
- package/ui.form-checkbox-group/storybook/stories.d.ts +0 -2441
- package/ui.form-checkbox-group/useAttrs.d.ts +0 -11
- package/ui.form-checkbox-multi-state/UCheckboxMultiState.vue.d.ts +0 -24
- package/ui.form-checkbox-multi-state/config.d.ts +0 -10
- package/ui.form-checkbox-multi-state/constants.d.ts +0 -1
- package/ui.form-checkbox-multi-state/storybook/stories.d.ts +0 -187
- package/ui.form-checkbox-multi-state/useAttrs.d.ts +0 -13
- package/ui.form-color-picker/UColorPicker.vue.d.ts +0 -28
- package/ui.form-color-picker/config.d.ts +0 -42
- package/ui.form-color-picker/constants.d.ts +0 -1
- package/ui.form-color-picker/storybook/stories.d.ts +0 -316
- package/ui.form-color-picker/useAttrs.d.ts +0 -11
- package/ui.form-date-picker/UDatePicker.vue.d.ts +0 -135
- package/ui.form-date-picker/config.d.ts +0 -184
- package/ui.form-date-picker/constants.d.ts +0 -1
- package/ui.form-date-picker/index.d.ts +0 -1
- package/ui.form-date-picker/storybook/stories.d.ts +0 -3242
- package/ui.form-date-picker/useAttrs.d.ts +0 -14
- package/ui.form-date-picker-range/UDatePickerRange.vue.d.ts +0 -545
- package/ui.form-date-picker-range/UDatePickerRangeInputs.vue.d.ts +0 -6
- package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue.d.ts +0 -7
- package/ui.form-date-picker-range/config.d.ts +0 -265
- package/ui.form-date-picker-range/constants.d.ts +0 -20
- package/ui.form-date-picker-range/storybook/stories.d.ts +0 -5545
- package/ui.form-date-picker-range/useAttrs.d.ts +0 -17
- package/ui.form-date-picker-range/useUserFormat.d.ts +0 -3
- package/ui.form-date-picker-range/utilDateRange.d.ts +0 -20
- package/ui.form-date-picker-range/utilValidation.d.ts +0 -3
- package/ui.form-input/UInput.vue.d.ts +0 -59
- package/ui.form-input/config.d.ts +0 -59
- package/ui.form-input/constants.d.ts +0 -1
- package/ui.form-input/storybook/stories.d.ts +0 -5734
- package/ui.form-input/useAttrs.d.ts +0 -11
- package/ui.form-input-file/UInputFile.vue.d.ts +0 -57
- package/ui.form-input-file/config.d.ts +0 -94
- package/ui.form-input-file/constants.d.ts +0 -1
- package/ui.form-input-file/storybook/stories.d.ts +0 -1116
- package/ui.form-input-file/useAttrs.d.ts +0 -11
- package/ui.form-input-file/utilFileForm.d.ts +0 -1
- package/ui.form-input-money/UInputMoney.vue.d.ts +0 -183
- package/ui.form-input-money/config.d.ts +0 -17
- package/ui.form-input-money/constants.d.ts +0 -1
- package/ui.form-input-money/storybook/stories.d.ts +0 -7519
- package/ui.form-input-money/useAttrs.d.ts +0 -11
- package/ui.form-input-money/useFormatCurrency.d.ts +0 -5
- package/ui.form-input-money/utilFormat.d.ts +0 -7
- package/ui.form-input-number/UInputNumber.vue.d.ts +0 -30
- package/ui.form-input-number/config.d.ts +0 -40
- package/ui.form-input-number/constants.d.ts +0 -1
- package/ui.form-input-number/storybook/stories.d.ts +0 -363
- package/ui.form-input-number/useAttrs.d.ts +0 -11
- package/ui.form-input-rating/UInputRating.vue.d.ts +0 -49
- package/ui.form-input-rating/config.d.ts +0 -56
- package/ui.form-input-rating/constants.d.ts +0 -1
- package/ui.form-input-rating/storybook/stories.d.ts +0 -1336
- package/ui.form-input-rating/useAttrs.d.ts +0 -11
- package/ui.form-input-search/UInputSearch.vue.d.ts +0 -177
- package/ui.form-input-search/config.d.ts +0 -21
- package/ui.form-input-search/constants.d.ts +0 -1
- package/ui.form-input-search/storybook/stories.d.ts +0 -3325
- package/ui.form-input-search/useAttrs.d.ts +0 -11
- package/ui.form-label/ULabel.vue.d.ts +0 -46
- package/ui.form-label/config.d.ts +0 -139
- package/ui.form-label/constants.d.ts +0 -8
- package/ui.form-label/storybook/stories.d.ts +0 -1133
- package/ui.form-label/useAttrs.d.ts +0 -11
- package/ui.form-radio/URadio.vue.d.ts +0 -46
- package/ui.form-radio/config.d.ts +0 -30
- package/ui.form-radio/constants.d.ts +0 -1
- package/ui.form-radio/storybook/stories.d.ts +0 -1270
- package/ui.form-radio/useAttrs.d.ts +0 -14
- package/ui.form-radio-group/URadioGroup.vue.d.ts +0 -40
- package/ui.form-radio-group/config.d.ts +0 -21
- package/ui.form-radio-group/constants.d.ts +0 -1
- package/ui.form-radio-group/storybook/stories.d.ts +0 -1239
- package/ui.form-radio-group/useAttrs.d.ts +0 -11
- package/ui.form-select/USelect.vue.d.ts +0 -405
- package/ui.form-select/config.d.ts +0 -146
- package/ui.form-select/constants.d.ts +0 -13
- package/ui.form-select/storybook/stories.d.ts +0 -19025
- package/ui.form-select/useAttrs.d.ts +0 -15
- package/ui.form-select/utilSelect.d.ts +0 -11
- package/ui.form-switch/USwitch.vue.d.ts +0 -30
- package/ui.form-switch/config.d.ts +0 -106
- package/ui.form-switch/constants.d.ts +0 -1
- package/ui.form-switch/storybook/stories.d.ts +0 -703
- package/ui.form-switch/useAttrs.d.ts +0 -13
- package/ui.form-switch/utilVariant.d.ts +0 -169
- package/ui.form-textarea/UTextarea.vue.d.ts +0 -132
- package/ui.form-textarea/config.d.ts +0 -55
- package/ui.form-textarea/constants.d.ts +0 -1
- package/ui.form-textarea/storybook/stories.d.ts +0 -2175
- package/ui.form-textarea/useAttrs.d.ts +0 -11
- package/ui.image-avatar/UAvatar.vue.d.ts +0 -40
- package/ui.image-avatar/config.d.ts +0 -51
- package/ui.image-avatar/constants.d.ts +0 -1
- package/ui.image-avatar/storybook/stories.d.ts +0 -1640
- package/ui.image-avatar/useAttrs.d.ts +0 -11
- package/ui.image-icon/UIcon.vue.d.ts +0 -28
- package/ui.image-icon/config.d.ts +0 -52
- package/ui.image-icon/constants.d.ts +0 -1
- package/ui.image-icon/storybook/stories.d.ts +0 -516
- package/ui.image-icon/useAttrs.d.ts +0 -11
- package/ui.loader/ULoader.vue.d.ts +0 -23
- package/ui.loader/config.d.ts +0 -49
- package/ui.loader/constants.d.ts +0 -2
- package/ui.loader/storybook/stories.d.ts +0 -655
- package/ui.loader/useAttrs.d.ts +0 -11
- package/ui.loader-overlay/ULoaderOverlay.vue.d.ts +0 -21
- package/ui.loader-overlay/config.d.ts +0 -25
- package/ui.loader-overlay/constants.d.ts +0 -1
- package/ui.loader-overlay/storybook/stories.d.ts +0 -362
- package/ui.loader-overlay/useAttrs.d.ts +0 -11
- package/ui.loader-overlay/useLoaderOverlay.d.ts +0 -10
- package/ui.loader-overlay/utilLoaderOverlay.d.ts +0 -2
- package/ui.loader-progress/ULoaderProgress.vue.d.ts +0 -11
- package/ui.loader-progress/config.d.ts +0 -24
- package/ui.loader-progress/constants.d.ts +0 -3
- package/ui.loader-progress/storybook/stories.d.ts +0 -742
- package/ui.loader-progress/useAttrs.d.ts +0 -11
- package/ui.loader-progress/useLoaderProgress.d.ts +0 -15
- package/ui.loader-progress/utilLoaderProgress.d.ts +0 -5
- package/ui.navigation-pagination/UPagination.vue.d.ts +0 -54
- package/ui.navigation-pagination/config.d.ts +0 -41
- package/ui.navigation-pagination/constants.d.ts +0 -1
- package/ui.navigation-pagination/storybook/stories.d.ts +0 -1033
- package/ui.navigation-pagination/useAttrs.d.ts +0 -11
- package/ui.navigation-progress/StepperProgress.vue.d.ts +0 -15
- package/ui.navigation-progress/UProgress.vue.d.ts +0 -41
- package/ui.navigation-progress/config.d.ts +0 -139
- package/ui.navigation-progress/constants.d.ts +0 -5
- package/ui.navigation-progress/storybook/stories.d.ts +0 -2827
- package/ui.navigation-progress/useAttrs.d.ts +0 -11
- package/ui.navigation-tab/UTab.vue.d.ts +0 -27
- package/ui.navigation-tab/config.d.ts +0 -24
- package/ui.navigation-tab/constants.d.ts +0 -1
- package/ui.navigation-tab/storybook/stories.d.ts +0 -316
- package/ui.navigation-tab/useAttrs.d.ts +0 -14
- package/ui.navigation-tabs/UTabs.vue.d.ts +0 -30
- package/ui.navigation-tabs/config.d.ts +0 -24
- package/ui.navigation-tabs/constants.d.ts +0 -1
- package/ui.navigation-tabs/storybook/stories.d.ts +0 -354
- package/ui.navigation-tabs/useAttrs.d.ts +0 -11
- package/ui.other-dot/UDot.vue.d.ts +0 -13
- package/ui.other-dot/config.d.ts +0 -28
- package/ui.other-dot/constants.d.ts +0 -1
- package/ui.other-dot/storybook/stories.d.ts +0 -645
- package/ui.other-dot/useAttrs.d.ts +0 -11
- package/ui.text-alert/UAlert.vue.d.ts +0 -53
- package/ui.text-alert/config.d.ts +0 -75
- package/ui.text-alert/constants.d.ts +0 -1
- package/ui.text-alert/storybook/stories.d.ts +0 -4845
- package/ui.text-alert/useAttrs.d.ts +0 -11
- package/ui.text-badge/UBadge.vue.d.ts +0 -60
- package/ui.text-badge/config.d.ts +0 -102
- package/ui.text-badge/constants.d.ts +0 -1
- package/ui.text-badge/storybook/stories.d.ts +0 -1869
- package/ui.text-badge/useAttrs.d.ts +0 -11
- package/ui.text-block/UText.vue.d.ts +0 -21
- package/ui.text-block/config.d.ts +0 -27
- package/ui.text-block/constants.d.ts +0 -1
- package/ui.text-block/storybook/stories.d.ts +0 -12
- package/ui.text-block/types.d.ts +0 -9
- package/ui.text-block/types.ts +0 -33
- package/ui.text-block/useAttrs.d.ts +0 -3
- package/ui.text-block/useAttrs.ts +0 -18
- package/ui.text-empty/UEmpty.vue.d.ts +0 -29
- package/ui.text-empty/config.d.ts +0 -55
- package/ui.text-empty/constants.d.ts +0 -1
- package/ui.text-empty/storybook/stories.d.ts +0 -1212
- package/ui.text-empty/useAttrs.d.ts +0 -11
- package/ui.text-file/UFile.vue.d.ts +0 -57
- package/ui.text-file/config.d.ts +0 -42
- package/ui.text-file/constants.d.ts +0 -1
- package/ui.text-file/storybook/stories.d.ts +0 -136
- package/ui.text-file/useAttrs.d.ts +0 -11
- package/ui.text-files/UFiles.vue.d.ts +0 -52
- package/ui.text-files/config.d.ts +0 -10
- package/ui.text-files/constants.d.ts +0 -1
- package/ui.text-files/storybook/stories.d.ts +0 -131
- package/ui.text-files/useAttrs.d.ts +0 -11
- package/ui.text-header/UHeader.vue.d.ts +0 -33
- package/ui.text-header/config.d.ts +0 -54
- package/ui.text-header/constants.d.ts +0 -1
- package/ui.text-header/storybook/stories.d.ts +0 -694
- package/ui.text-header/useAttrs.d.ts +0 -11
- package/ui.text-money/UMoney.vue.d.ts +0 -48
- package/ui.text-money/config.d.ts +0 -77
- package/ui.text-money/constants.d.ts +0 -1
- package/ui.text-money/storybook/stories.d.ts +0 -2090
- package/ui.text-money/useAttrs.d.ts +0 -11
- package/ui.text-money/utilMoney.d.ts +0 -14
- package/ui.text-notify/UNotify.vue.d.ts +0 -13
- package/ui.text-notify/config.d.ts +0 -58
- package/ui.text-notify/constants.d.ts +0 -20
- package/ui.text-notify/storybook/stories.d.ts +0 -653
- package/ui.text-notify/useAttrs.d.ts +0 -11
- package/ui.text-notify/utilNotify.d.ts +0 -7
- package/utils/utilHelper.d.ts +0 -9
- package/utils/utilPlatform.d.ts +0 -6
- package/utils/utilStorybook.d.ts +0 -15
- package/utils/utilUI.d.ts +0 -68
- package/utilsTs/utilHelper.d.ts +0 -9
- package/utilsTs/utilHelper.ts +0 -70
- package/utilsTs/utilPlatform.d.ts +0 -7
- package/utilsTs/utilPlatform.ts +0 -53
- package/utilsTs/utilStorybook.d.ts +0 -24
- package/utilsTs/utilStorybook.ts +0 -292
- package/utilsTs/utilTailwind.d.ts +0 -1
- package/utilsTs/utilTailwind.ts +0 -38
- package/utilsTs/utilTheme.d.ts +0 -8
- package/utilsTs/utilUI.d.ts +0 -67
- package/utilsTs/utilUI.ts +0 -142
- /package/ui.text-block/{config.ts → config.js} +0 -0
- /package/ui.text-block/{constants.ts → constants.js} +0 -0
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
:error="error"
|
|
7
7
|
:size="size"
|
|
8
8
|
:align="labelAlign"
|
|
9
|
-
centred
|
|
10
|
-
v-bind="labelAttrs"
|
|
11
9
|
:data-test="dataTest"
|
|
10
|
+
v-bind="labelAttrs"
|
|
12
11
|
>
|
|
13
12
|
<UButton
|
|
14
13
|
variant="thirdary"
|
|
@@ -18,7 +17,6 @@
|
|
|
18
17
|
round
|
|
19
18
|
:disabled="isRemoveButtonDisabled || disabled"
|
|
20
19
|
v-bind="removeButtonAttrs"
|
|
21
|
-
:data-test="`${dataTest}-remove`"
|
|
22
20
|
@click="onClickRemove"
|
|
23
21
|
>
|
|
24
22
|
<UIcon
|
|
@@ -26,6 +24,7 @@
|
|
|
26
24
|
:size="size"
|
|
27
25
|
:name="config.defaults.removeIcon"
|
|
28
26
|
:color="isRemoveButtonDisabled ? 'gray' : 'grayscale'"
|
|
27
|
+
:data-test="`${dataTest}-remove`"
|
|
29
28
|
v-bind="removeIconAttrs"
|
|
30
29
|
/>
|
|
31
30
|
</UButton>
|
|
@@ -42,7 +41,6 @@
|
|
|
42
41
|
round
|
|
43
42
|
:disabled="isAddButtonDisabled || disabled"
|
|
44
43
|
v-bind="addButtonAttrs"
|
|
45
|
-
:data-test="`${dataTest}-add`"
|
|
46
44
|
@click="onClickAdd"
|
|
47
45
|
>
|
|
48
46
|
<UIcon
|
|
@@ -50,6 +48,7 @@
|
|
|
50
48
|
:size="size"
|
|
51
49
|
:name="config.defaults.addIcon"
|
|
52
50
|
:color="isAddButtonDisabled ? 'gray' : 'grayscale'"
|
|
51
|
+
:data-test="`${dataTest}-add`"
|
|
53
52
|
v-bind="addIconAttrs"
|
|
54
53
|
/>
|
|
55
54
|
</UButton>
|
package/ui.form-label/config.js
CHANGED
|
@@ -20,8 +20,8 @@ export default /*tw*/ {
|
|
|
20
20
|
{ align: "right", size: "sm", class: "gap-2.5" },
|
|
21
21
|
{ align: "right", size: "md", class: "gap-3" },
|
|
22
22
|
{ align: "right", size: "lg", class: "gap-3.5" },
|
|
23
|
-
{ align: "left", centred: true, class: "items-center
|
|
24
|
-
{ align: "right", centred: true, class: "items-center
|
|
23
|
+
{ align: "left", centred: true, class: "items-center w-auto" },
|
|
24
|
+
{ align: "right", centred: true, class: "items-center w-auto" },
|
|
25
25
|
],
|
|
26
26
|
},
|
|
27
27
|
content: {
|
package/ui.form-radio/config.js
CHANGED
|
@@ -26,10 +26,4 @@ export default /*tw*/ {
|
|
|
26
26
|
checked: false,
|
|
27
27
|
disabled: false,
|
|
28
28
|
},
|
|
29
|
-
safelist: (colors) => [
|
|
30
|
-
{ pattern: `border-(${colors})-500`, variants: ["focus"] },
|
|
31
|
-
{ pattern: `border-(${colors})-800`, variants: ["active"] },
|
|
32
|
-
{ pattern: `text-(${colors})-600`, variants: ["checked"] },
|
|
33
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus"] },
|
|
34
|
-
],
|
|
35
29
|
};
|
package/ui.form-switch/config.js
CHANGED
|
@@ -79,10 +79,4 @@ export default /*tw*/ {
|
|
|
79
79
|
onIcon: "check",
|
|
80
80
|
offIcon: "close",
|
|
81
81
|
},
|
|
82
|
-
safelist: (colors) => [
|
|
83
|
-
{ pattern: `ring-(${colors})-700` },
|
|
84
|
-
{ pattern: `bg-(${colors})-600` },
|
|
85
|
-
{ pattern: `bg-(${colors})-700`, variants: ["hover"] },
|
|
86
|
-
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
87
|
-
],
|
|
88
82
|
};
|
package/ui.image-icon/config.js
CHANGED
package/ui.loader/config.js
CHANGED
|
@@ -107,13 +107,4 @@ export default /*tw*/ {
|
|
|
107
107
|
variant: "progress",
|
|
108
108
|
indicator: false,
|
|
109
109
|
},
|
|
110
|
-
safelist: (colors) => [
|
|
111
|
-
{ pattern: `text-(${colors})-600` },
|
|
112
|
-
{ pattern: `text-(${colors})-100` },
|
|
113
|
-
{ pattern: `stroke-(${colors})-100` },
|
|
114
|
-
{
|
|
115
|
-
pattern: `bg-(${colors})-50`,
|
|
116
|
-
variants: ["[&::-webkit-progress-bar]", "[@supports(selector(&::-moz-progress-bar))]"],
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
110
|
};
|
package/ui.other-dot/config.js
CHANGED
package/ui.text-alert/config.js
CHANGED
|
@@ -54,11 +54,4 @@ export default /*tw*/ {
|
|
|
54
54
|
/* icons */
|
|
55
55
|
closeIcon: "close",
|
|
56
56
|
},
|
|
57
|
-
safelist: (colors) => [
|
|
58
|
-
{ pattern: `bg-(${colors})-50` },
|
|
59
|
-
{ pattern: `bg-(${colors})-600` },
|
|
60
|
-
{ pattern: `text-(${colors})-600` },
|
|
61
|
-
{ pattern: `border-(${colors})-100` },
|
|
62
|
-
{ pattern: `border-(${colors})-600` },
|
|
63
|
-
],
|
|
64
57
|
};
|
package/ui.text-badge/config.js
CHANGED
|
@@ -63,12 +63,4 @@ export default /*tw*/ {
|
|
|
63
63
|
round: false,
|
|
64
64
|
bordered: false,
|
|
65
65
|
},
|
|
66
|
-
safelist: (colors) => [
|
|
67
|
-
{ pattern: `bg-(${colors})-50` },
|
|
68
|
-
{ pattern: `bg-(${colors})-600` },
|
|
69
|
-
{ pattern: `border-(${colors})-100` },
|
|
70
|
-
{ pattern: `border-(${colors})-600` },
|
|
71
|
-
{ pattern: `text-(${colors})-600` },
|
|
72
|
-
{ pattern: `ring-(${colors})-700`, variants: ["focus", "focus-within"] },
|
|
73
|
-
],
|
|
74
66
|
};
|
package/ui.text-block/UText.vue
CHANGED
|
@@ -1,27 +1,71 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div v-bind="wrapperAttrs" :data-test="dataTest">
|
|
3
|
+
<!-- @slot Use it to add something inside. -->
|
|
4
|
+
<div v-if="!hasSlotContent($slots['default'])" v-bind="htmlAttrs" v-html="html" />
|
|
5
|
+
<slot />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
3
8
|
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import useAttrs from "./useAttrs";
|
|
9
|
+
<script setup>
|
|
10
|
+
import { getDefault } from "../utils/utilUI.js";
|
|
7
11
|
|
|
8
|
-
import
|
|
12
|
+
import { UText } from "./constants.js";
|
|
13
|
+
import defaultConfig from "./config.js";
|
|
14
|
+
import useAttrs from "./useAttrs.js";
|
|
9
15
|
|
|
10
16
|
defineOptions({ inheritAttrs: false });
|
|
11
17
|
|
|
12
|
-
const props =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
/**
|
|
20
|
+
* НTML markdown or plain text.
|
|
21
|
+
*/
|
|
22
|
+
html: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: undefined,
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Text size.
|
|
29
|
+
* @values sm, md, lg
|
|
30
|
+
*/
|
|
31
|
+
size: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: getDefault(defaultConfig, UText).size,
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Text align.
|
|
38
|
+
* @values left, center, right
|
|
39
|
+
*/
|
|
40
|
+
align: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: getDefault(defaultConfig, UText).align,
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Remove line height (useful for 1-line text).
|
|
47
|
+
*/
|
|
48
|
+
line: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: getDefault(defaultConfig, UText).line,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Component config object.
|
|
55
|
+
*/
|
|
56
|
+
config: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default: () => ({}),
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Data-test attribute for automated testing.
|
|
63
|
+
*/
|
|
64
|
+
dataTest: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "",
|
|
67
|
+
},
|
|
16
68
|
});
|
|
17
69
|
|
|
18
70
|
const { wrapperAttrs, htmlAttrs, hasSlotContent } = useAttrs(props);
|
|
19
71
|
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<div v-bind="wrapperAttrs" :data-test="dataTest">
|
|
23
|
-
<!-- @slot Use it to add something inside. -->
|
|
24
|
-
<div v-if="!hasSlotContent($slots['default'])" v-bind="htmlAttrs" v-html="html" />
|
|
25
|
-
<slot />
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source } from "@storybook/blocks";
|
|
2
2
|
import { getSource } from "../../utils/utilStorybook.js";
|
|
3
3
|
|
|
4
|
-
import * as stories from "./stories.
|
|
5
|
-
import defaultConfig from "../config.
|
|
4
|
+
import * as stories from "./stories.js";
|
|
5
|
+
import defaultConfig from "../config.js?raw"
|
|
6
6
|
|
|
7
7
|
<Meta of={stories} />
|
|
8
8
|
<Title of={stories} />
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
1
|
import { getArgTypes, getSlotNames, getSlotsFragment } from "../../utils/utilStorybook.js";
|
|
3
2
|
|
|
4
3
|
import UText from "../../ui.text-block/UText.vue";
|
|
5
4
|
import URow from "../../ui.container-row/URow.vue";
|
|
6
5
|
|
|
7
|
-
import type { UTextProps } from "../types";
|
|
8
|
-
|
|
9
|
-
interface UTextArgs extends UTextProps {
|
|
10
|
-
slotTemplate?: string;
|
|
11
|
-
enum: "size";
|
|
12
|
-
}
|
|
13
|
-
|
|
14
6
|
/**
|
|
15
7
|
* The `UText` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.text-block)
|
|
16
8
|
*/
|
|
@@ -22,7 +14,7 @@ export default {
|
|
|
22
14
|
...getArgTypes(UText.__name),
|
|
23
15
|
},
|
|
24
16
|
args: {},
|
|
25
|
-
}
|
|
17
|
+
};
|
|
26
18
|
|
|
27
19
|
const defaultTemplate = `
|
|
28
20
|
<p>
|
|
@@ -32,7 +24,7 @@ const defaultTemplate = `
|
|
|
32
24
|
</p>
|
|
33
25
|
`;
|
|
34
26
|
|
|
35
|
-
const DefaultTemplate
|
|
27
|
+
const DefaultTemplate = (args) => ({
|
|
36
28
|
components: { UText, URow },
|
|
37
29
|
setup() {
|
|
38
30
|
const slots = getSlotNames(UText.__name);
|
|
@@ -46,12 +38,12 @@ const DefaultTemplate: StoryFn<UTextArgs> = (args) => ({
|
|
|
46
38
|
`,
|
|
47
39
|
});
|
|
48
40
|
|
|
49
|
-
const EnumVariantTemplate
|
|
41
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
50
42
|
components: { UText, URow },
|
|
51
43
|
setup() {
|
|
52
44
|
return {
|
|
53
45
|
args,
|
|
54
|
-
options: argTypes
|
|
46
|
+
options: argTypes[args.enum].options,
|
|
55
47
|
};
|
|
56
48
|
},
|
|
57
49
|
template: `
|
|
@@ -96,6 +88,7 @@ Paragraphs.args = {
|
|
|
96
88
|
rapidly changing landscape and emerge stronger and more competitive.
|
|
97
89
|
</p>
|
|
98
90
|
</template>
|
|
91
|
+
|
|
99
92
|
`,
|
|
100
93
|
};
|
|
101
94
|
|
|
@@ -109,6 +102,8 @@ List.args = {
|
|
|
109
102
|
<li>Update your profile information</li>
|
|
110
103
|
<li>Check your email for updates</li>
|
|
111
104
|
</ul>
|
|
105
|
+
|
|
106
|
+
|
|
112
107
|
<ol>
|
|
113
108
|
<li>Create an account by signing up</li>
|
|
114
109
|
<li>Verify your email address</li>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import useUI from "../composables/useUI.js";
|
|
2
|
+
|
|
3
|
+
import defaultConfig from "./config.js";
|
|
4
|
+
|
|
5
|
+
export default function useAttrs(props) {
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
7
|
+
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
config,
|
|
12
|
+
...keysAttrs,
|
|
13
|
+
hasSlotContent,
|
|
14
|
+
};
|
|
15
|
+
}
|
package/ui.text-file/UFile.vue
CHANGED
|
@@ -23,14 +23,16 @@
|
|
|
23
23
|
</slot>
|
|
24
24
|
|
|
25
25
|
<slot name="right" :file="{ elementId, label, url, imageUrl }">
|
|
26
|
-
<
|
|
26
|
+
<UButton
|
|
27
27
|
v-if="removable"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
round
|
|
29
|
+
filled
|
|
30
|
+
square
|
|
31
|
+
no-ring
|
|
32
|
+
variant="thirdary"
|
|
33
|
+
:size="removeButtonSize"
|
|
34
|
+
:icon="config.defaults.removeIcon"
|
|
35
|
+
v-bind="removeButtonAttrs"
|
|
34
36
|
:data-test="`${dataTest}-remove-item`"
|
|
35
37
|
@click.stop.prevent="onRemove"
|
|
36
38
|
/>
|
|
@@ -139,20 +141,20 @@ const {
|
|
|
139
141
|
fileIconAttrs,
|
|
140
142
|
fileLabelAttrs,
|
|
141
143
|
fileImageAttrs,
|
|
142
|
-
|
|
144
|
+
removeButtonAttrs,
|
|
143
145
|
} = useAttrs(props);
|
|
144
146
|
|
|
145
147
|
const iconSize = computed(() => {
|
|
146
148
|
const sizes = {
|
|
147
|
-
sm: "
|
|
148
|
-
md: "
|
|
149
|
-
lg: "
|
|
149
|
+
sm: "2xs",
|
|
150
|
+
md: "xs",
|
|
151
|
+
lg: "sm",
|
|
150
152
|
};
|
|
151
153
|
|
|
152
154
|
return sizes[props.size];
|
|
153
155
|
});
|
|
154
156
|
|
|
155
|
-
const
|
|
157
|
+
const removeButtonSize = computed(() => {
|
|
156
158
|
const sizes = {
|
|
157
159
|
sm: "2xs",
|
|
158
160
|
md: "xs",
|
package/ui.text-file/config.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
file: {
|
|
3
|
-
component: "{ULink}",
|
|
4
|
-
base: "flex items-center",
|
|
5
|
-
variants: {
|
|
6
|
-
size: {
|
|
7
|
-
sm: "gap-0.5",
|
|
8
|
-
md: "gap-1",
|
|
9
|
-
lg: "gap-1.5",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
2
|
+
file: "{ULink}",
|
|
13
3
|
body: {
|
|
14
4
|
base: "flex items-center",
|
|
15
5
|
variants: {
|
|
@@ -23,7 +13,7 @@ export default /*tw*/ {
|
|
|
23
13
|
fileImage: "rounded-sm max-w-7",
|
|
24
14
|
fileIcon: "{UIcon}",
|
|
25
15
|
fileLabel: "{ULink}",
|
|
26
|
-
|
|
16
|
+
removeButton: "{UButton} ml-2",
|
|
27
17
|
defaults: {
|
|
28
18
|
size: "md",
|
|
29
19
|
/* icons */
|
package/ui.text-files/config.js
CHANGED
package/ui.text-header/config.js
CHANGED
package/ui.text-money/config.js
CHANGED
|
@@ -16,8 +16,8 @@ export function separatedMoney(
|
|
|
16
16
|
thousandsSeparator = " ",
|
|
17
17
|
) {
|
|
18
18
|
const options = {
|
|
19
|
-
minimumFractionDigits:
|
|
20
|
-
maximumFractionDigits:
|
|
19
|
+
minimumFractionDigits: minFractionDigits,
|
|
20
|
+
maximumFractionDigits: maxFractionDigits,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const formattedMoney =
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { vuelessConfig } from "./utilUI";
|
|
1
|
+
import colors from "tailwindcss/colors.js";
|
|
2
|
+
|
|
3
|
+
import { vuelessConfig } from "./utilUI.js";
|
|
4
|
+
import { isSSR, isCSR } from "./utilHelper.js";
|
|
4
5
|
import {
|
|
6
|
+
GRAY_COLOR,
|
|
7
|
+
COOL_COLOR,
|
|
5
8
|
BRAND_COLORS,
|
|
6
9
|
GRAYSCALE_COLOR,
|
|
7
10
|
DEFAULT_RING,
|
|
8
11
|
DEFAULT_RING_OFFSET,
|
|
12
|
+
DEFAULT_RING_OFFSET_COLOR_LIGHT,
|
|
13
|
+
DEFAULT_RING_OFFSET_COLOR_DARK,
|
|
9
14
|
DEFAULT_ROUNDING,
|
|
10
15
|
DEFAULT_BRAND_COLOR,
|
|
11
16
|
DEFAULT_GRAY_COLOR,
|
|
12
|
-
DEFAULT_RING_OFFSET_COLOR_LIGHT,
|
|
13
|
-
DEFAULT_RING_OFFSET_COLOR_DARK,
|
|
14
17
|
DARK_MODE_SELECTOR,
|
|
15
18
|
GRAY_COLORS,
|
|
16
19
|
PX_IN_REM,
|
|
17
|
-
} from "../constants";
|
|
18
|
-
|
|
19
|
-
import type { ThemeConfig, GrayColors, BrandColors, VuelessCssVariables } from "../types";
|
|
20
|
-
|
|
21
|
-
interface InternalThemeConfig extends ThemeConfig {
|
|
22
|
-
systemDarkMode?: boolean;
|
|
23
|
-
}
|
|
20
|
+
} from "../constants.js";
|
|
24
21
|
|
|
25
22
|
export function themeInit() {
|
|
26
23
|
if (isSSR) return;
|
|
@@ -34,12 +31,8 @@ export function themeInit() {
|
|
|
34
31
|
);
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
export function setTheme(config
|
|
34
|
+
export function setTheme(config = {}) {
|
|
38
35
|
const isDarkMode = setDarkMode(config);
|
|
39
|
-
const rounding = config?.rounding ?? vuelessConfig.rounding ?? DEFAULT_ROUNDING;
|
|
40
|
-
let brand: BrandColors | GrayColors = config?.brand ?? vuelessConfig.brand ?? DEFAULT_BRAND_COLOR;
|
|
41
|
-
const gray = config?.gray ?? vuelessConfig.gray ?? DEFAULT_GRAY_COLOR;
|
|
42
|
-
|
|
43
36
|
const ring = config?.ring ?? vuelessConfig.ring ?? DEFAULT_RING;
|
|
44
37
|
const ringOffset = config?.ringOffset ?? vuelessConfig.ringOffset ?? DEFAULT_RING_OFFSET;
|
|
45
38
|
|
|
@@ -53,7 +46,10 @@ export function setTheme(config: InternalThemeConfig = {}) {
|
|
|
53
46
|
vuelessConfig.ringOffsetColorLight ??
|
|
54
47
|
DEFAULT_RING_OFFSET_COLOR_LIGHT;
|
|
55
48
|
|
|
56
|
-
const
|
|
49
|
+
const rounding = config?.rounding ?? vuelessConfig.rounding ?? DEFAULT_ROUNDING;
|
|
50
|
+
let brand = config?.brand ?? vuelessConfig.brand ?? DEFAULT_BRAND_COLOR;
|
|
51
|
+
let gray = config?.gray ?? vuelessConfig.gray ?? DEFAULT_GRAY_COLOR;
|
|
52
|
+
|
|
57
53
|
const isBrandColor = BRAND_COLORS.some((color) => color === brand);
|
|
58
54
|
const isGrayColor = GRAY_COLORS.some((color) => color === gray);
|
|
59
55
|
|
|
@@ -73,29 +69,29 @@ export function setTheme(config: InternalThemeConfig = {}) {
|
|
|
73
69
|
? defaultRingOffsetColorDark
|
|
74
70
|
: defaultRingOffsetColorLight;
|
|
75
71
|
|
|
72
|
+
if (gray === COOL_COLOR) {
|
|
73
|
+
gray = GRAY_COLOR;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
76
|
if (brand === GRAYSCALE_COLOR) {
|
|
77
77
|
brand = gray;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
const variables
|
|
81
|
-
"--vl-rounding": `${Number(rounding) / PX_IN_REM}rem`,
|
|
80
|
+
const variables = {
|
|
82
81
|
"--vl-ring": `${ring}px`,
|
|
83
82
|
"--vl-ring-offset": `${ringOffset}px`,
|
|
84
|
-
"--vl-ring-offset-color": convertHexInRgb(defaultRingOffsetColor)
|
|
83
|
+
"--vl-ring-offset-color": `rgb(${convertHexInRgb(defaultRingOffsetColor)})`,
|
|
84
|
+
"--vl-rounding": `${Number(rounding) / PX_IN_REM}rem`,
|
|
85
85
|
"--vl-color-gray-default": convertHexInRgb(colors[gray][defaultBrandShade]),
|
|
86
86
|
"--vl-color-brand-default": convertHexInRgb(colors[brand][defaultGrayShade]),
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
for (const key in colors[gray]) {
|
|
90
|
-
variables[`--vl-color-gray-${key}`
|
|
91
|
-
colors[gray][key],
|
|
92
|
-
);
|
|
90
|
+
variables[`--vl-color-gray-${key}`] = convertHexInRgb(colors[gray][key]);
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
for (const key in colors[brand]) {
|
|
96
|
-
variables[`--vl-color-brand-${key}`
|
|
97
|
-
colors[brand][key],
|
|
98
|
-
);
|
|
94
|
+
variables[`--vl-color-brand-${key}`] = convertHexInRgb(colors[brand][key]);
|
|
99
95
|
}
|
|
100
96
|
|
|
101
97
|
const stringVariables = Object.entries(variables)
|
|
@@ -114,14 +110,14 @@ export function setTheme(config: InternalThemeConfig = {}) {
|
|
|
114
110
|
return rootVariables;
|
|
115
111
|
}
|
|
116
112
|
|
|
117
|
-
function setDarkMode(config
|
|
113
|
+
function setDarkMode(config) {
|
|
118
114
|
config?.darkMode === undefined
|
|
119
115
|
? isCSR && localStorage.removeItem(DARK_MODE_SELECTOR)
|
|
120
|
-
: isCSR && localStorage.setItem(DARK_MODE_SELECTOR, Number(config?.darkMode)
|
|
116
|
+
: isCSR && localStorage.setItem(DARK_MODE_SELECTOR, Number(!!config?.darkMode));
|
|
121
117
|
|
|
122
118
|
const storedDarkMode = isCSR ? localStorage.getItem(DARK_MODE_SELECTOR) : null;
|
|
123
119
|
|
|
124
|
-
|
|
120
|
+
let isDarkMode =
|
|
125
121
|
storedDarkMode !== null
|
|
126
122
|
? !!Number(storedDarkMode)
|
|
127
123
|
: !!(config?.darkMode ?? vuelessConfig.darkMode ?? config?.systemDarkMode);
|
|
@@ -133,7 +129,7 @@ function setDarkMode(config: InternalThemeConfig) {
|
|
|
133
129
|
return isDarkMode;
|
|
134
130
|
}
|
|
135
131
|
|
|
136
|
-
export function convertHexInRgb(hex
|
|
132
|
+
export function convertHexInRgb(hex) {
|
|
137
133
|
const color = hex.replace(/#/g, "");
|
|
138
134
|
|
|
139
135
|
let r, g, b;
|