vueless 0.0.3 → 0.0.5
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/.browserslistrc +4 -0
- package/.editorconfig +12 -0
- package/.eslintignore +7 -0
- package/.eslintrc.js +59 -0
- package/.storybook/configs/main.config.js +20 -0
- package/.storybook/decorators/vue3SourceDecorator.js +119 -0
- package/.storybook/main.js +20 -0
- package/.storybook/manager-head.html +10 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview-head.html +72 -0
- package/.storybook/preview.js +50 -0
- package/.storybook/themes/vueless.docs.theme.js +41 -0
- package/.storybook/themes/vueless.theme.js +45 -0
- package/.web-types-gen/lib/config.js +32 -0
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/index.pcss +3 -0
- package/package.json +53 -36
- package/postcss.config.js +9 -0
- package/public/images/logo.png +0 -0
- package/{composable.ui → src/composable.ui}/index.js +4 -1
- package/src/library.web-types-gen/index.js +17 -0
- package/src/library.web-types-gen/lib/build.js +252 -0
- package/src/library.web-types-gen/package.json +3 -0
- package/{plugin.vite → src/plugin.vite}/services/iconResolver.service.js +1 -1
- package/{plugin.vite → src/plugin.vite}/services/tailwindSafelist.service.js +0 -2
- package/{service.tailwind → src/service.tailwind}/index.js +2 -0
- package/{service.ui → src/service.ui}/index.js +1 -1
- package/{ui.button-toggle-item → src/ui.button}/Docs.mdx +1 -1
- package/{ui.button → src/ui.button}/composables/attrs.composable.js +2 -2
- package/{ui.button → src/ui.button}/configs/default.config.js +1 -0
- package/{ui.button → src/ui.button}/index.stories.js +5 -5
- package/{ui.button → src/ui.button}/index.vue +3 -4
- package/{ui.button-toggle → src/ui.button-link}/Docs.mdx +1 -1
- package/{ui.button-link → src/ui.button-link}/composables/attrs.composable.js +2 -2
- package/{ui.button-link → src/ui.button-link}/configs/default.config.js +2 -2
- package/{ui.button-link → src/ui.button-link}/index.stories.js +4 -4
- package/{ui.button-link → src/ui.button-link}/index.vue +3 -3
- package/{ui.button-link → src/ui.button-toggle}/Docs.mdx +1 -1
- package/{ui.button-toggle → src/ui.button-toggle}/composables/attrs.composable.js +1 -1
- package/{ui.button-toggle → src/ui.button-toggle}/index.stories.js +5 -5
- package/{ui.button-toggle → src/ui.button-toggle}/index.vue +2 -2
- package/{ui.button → src/ui.button-toggle-item}/Docs.mdx +1 -1
- package/{ui.button-toggle-item → src/ui.button-toggle-item}/composables/attrs.composable.js +2 -2
- package/{ui.button-toggle-item → src/ui.button-toggle-item}/index.stories.js +3 -3
- package/{ui.button-toggle-item → src/ui.button-toggle-item}/index.vue +2 -2
- package/{ui.container-accordion → src/ui.container-accordion}/composables/attrs.composable.js +2 -2
- package/{ui.container-accordion → src/ui.container-accordion}/index.stories.js +4 -4
- package/{ui.container-accordion → src/ui.container-accordion}/index.vue +2 -2
- package/src/ui.container-card/Docs.mdx +16 -0
- package/{ui.container-card → src/ui.container-card}/composable/attrs.composable.js +2 -2
- package/{ui.container-card → src/ui.container-card}/index.stories.js +7 -7
- package/{ui.container-card → src/ui.container-card}/index.vue +3 -3
- package/src/ui.container-divider/Docs.mdx +16 -0
- package/{ui.container-divider → src/ui.container-divider}/composables/attrs.composable.js +2 -2
- package/{ui.container-divider → src/ui.container-divider}/index.stories.js +3 -3
- package/{ui.container-divider → src/ui.container-divider}/index.vue +1 -1
- package/src/ui.container-group/Docs.mdx +16 -0
- package/{ui.container-group → src/ui.container-group}/composables/attrs.composable.js +2 -2
- package/{ui.container-group → src/ui.container-group}/index.stories.js +4 -4
- package/{ui.container-group → src/ui.container-group}/index.vue +3 -3
- package/src/ui.container-groups/Docs.mdx +16 -0
- package/{ui.container-groups → src/ui.container-groups}/composables/attrs.composable.js +1 -1
- package/{ui.container-groups → src/ui.container-groups}/index.stories.js +4 -4
- package/src/ui.container-modal/Docs.mdx +16 -0
- package/{ui.container-modal → src/ui.container-modal}/composables/attrs.composable.js +2 -2
- package/{ui.container-modal → src/ui.container-modal}/index.stories.js +9 -9
- package/{ui.container-modal → src/ui.container-modal}/index.vue +4 -4
- package/src/ui.container-modal-confirm/Docs.mdx +16 -0
- package/{ui.container-modal-confirm → src/ui.container-modal-confirm}/composable/attrs.composable.js +3 -2
- package/{ui.container-modal-confirm → src/ui.container-modal-confirm}/configs/default.config.js +3 -0
- package/{ui.container-modal-confirm → src/ui.container-modal-confirm}/index.stories.js +6 -6
- package/{ui.container-modal-confirm → src/ui.container-modal-confirm}/index.vue +5 -19
- package/src/ui.container-page/Docs.mdx +16 -0
- package/{ui.container-page → src/ui.container-page}/composables/attrs.composable.js +2 -2
- package/{ui.container-page → src/ui.container-page}/index.stories.js +10 -10
- package/{ui.container-page → src/ui.container-page}/index.vue +1 -1
- package/src/ui.container-row/Docs.mdx +16 -0
- package/{ui.container-row → src/ui.container-row}/composables/attrs.composable.js +2 -2
- package/{ui.container-row → src/ui.container-row}/index.stories.js +3 -3
- package/{ui.container-row → src/ui.container-row}/index.vue +1 -1
- package/{ui.data-list → src/ui.data-list}/composables/attrs.composable.js +2 -2
- package/{ui.data-list → src/ui.data-list}/index.stories.js +3 -3
- package/{ui.data-list → src/ui.data-list}/index.vue +3 -3
- package/src/ui.data-table/Docs.mdx +16 -0
- package/{ui.data-table → src/ui.data-table}/composables/attrs.composable.js +10 -10
- package/{ui.data-table → src/ui.data-table}/configs/default.config.js +6 -0
- package/{ui.data-table → src/ui.data-table}/index.stories.js +8 -8
- package/{ui.data-table → src/ui.data-table}/index.vue +20 -35
- package/{ui.data-table-cell → src/ui.data-table-cell}/composables/attrs.composable.js +2 -2
- package/{ui.data-table-cell → src/ui.data-table-cell}/index.vue +1 -1
- package/src/ui.dropdown-badge/Docs.mdx +16 -0
- package/{ui.dropdown-badge → src/ui.dropdown-badge}/composables/attrs.composable.js +2 -2
- package/{ui.dropdown-badge → src/ui.dropdown-badge}/index.stories.js +4 -4
- package/{ui.dropdown-badge → src/ui.dropdown-badge}/index.vue +4 -4
- package/src/ui.dropdown-button/Docs.mdx +16 -0
- package/{ui.dropdown-button → src/ui.dropdown-button}/composables/attrs.composable.js +2 -2
- package/{ui.dropdown-button → src/ui.dropdown-button}/index.stories.js +5 -5
- package/{ui.dropdown-button → src/ui.dropdown-button}/index.vue +5 -5
- package/src/ui.dropdown-item/Docs.mdx +16 -0
- package/{ui.dropdown-item → src/ui.dropdown-item}/composables/attrs.composable.js +1 -1
- package/{ui.dropdown-item → src/ui.dropdown-item}/index.stories.js +2 -2
- package/src/ui.dropdown-link/Docs.mdx +16 -0
- package/{ui.dropdown-link → src/ui.dropdown-link}/composables/attrs.composable.js +2 -2
- package/{ui.dropdown-link → src/ui.dropdown-link}/index.stories.js +4 -4
- package/{ui.dropdown-link → src/ui.dropdown-link}/index.vue +4 -4
- package/src/ui.dropdown-list/Docs.mdx +16 -0
- package/{ui.dropdown-list → src/ui.dropdown-list}/composables/attrs.composable.js +4 -2
- package/{ui.dropdown-list → src/ui.dropdown-list}/configs/default.config.js +6 -0
- package/{ui.dropdown-list → src/ui.dropdown-list}/index.stories.js +3 -3
- package/{ui.dropdown-list → src/ui.dropdown-list}/index.vue +9 -25
- package/{ui.form-calendar → src/ui.form-calendar}/Docs.mdx +2 -2
- package/{ui.form-calendar → src/ui.form-calendar}/components/DayView.vue +39 -1
- package/{ui.form-calendar → src/ui.form-calendar}/composables/attrs.composable.js +21 -2
- package/{ui.form-calendar → src/ui.form-calendar}/configs/default.config.js +12 -2
- package/{ui.form-calendar → src/ui.form-calendar}/constants/index.js +2 -0
- package/{ui.form-calendar → src/ui.form-calendar}/index.stories.js +11 -2
- package/{ui.form-calendar → src/ui.form-calendar}/index.vue +155 -45
- package/{ui.form-calendar → src/ui.form-calendar}/services/calendar.service.js +3 -15
- package/src/ui.form-calendar/services/date.service.js +282 -0
- package/src/ui.form-checkbox/Docs.mdx +16 -0
- package/{ui.form-checkbox → src/ui.form-checkbox}/composables/attrs.composable.js +2 -2
- package/{ui.form-checkbox → src/ui.form-checkbox}/configs/default.config.js +1 -1
- package/{ui.form-checkbox → src/ui.form-checkbox}/index.stories.js +5 -5
- package/{ui.form-checkbox → src/ui.form-checkbox}/index.vue +3 -3
- package/src/ui.form-checkbox-group/Docs.mdx +16 -0
- package/{ui.form-checkbox-group → src/ui.form-checkbox-group}/composables/attrs.composable.js +1 -1
- package/{ui.form-checkbox-group → src/ui.form-checkbox-group}/index.stories.js +2 -2
- package/{ui.form-checkbox-group → src/ui.form-checkbox-group}/index.vue +3 -3
- package/src/ui.form-checkbox-multi-state/Docs.mdx +16 -0
- package/{ui.form-checkbox-multi-state → src/ui.form-checkbox-multi-state}/composables/attrs.composable.js +1 -1
- package/{ui.form-checkbox-multi-state → src/ui.form-checkbox-multi-state}/index.stories.js +3 -3
- package/{ui.form-checkbox-multi-state → src/ui.form-checkbox-multi-state}/index.vue +1 -1
- package/{ui.form-color-picker → src/ui.form-color-picker}/composables/attrs.composable.js +2 -2
- package/{ui.form-color-picker → src/ui.form-color-picker}/index.stories.js +3 -3
- package/{ui.form-color-picker → src/ui.form-color-picker}/index.vue +1 -1
- package/{ui.form-date-picker → src/ui.form-date-picker}/Docs.mdx +3 -3
- package/{ui.form-date-picker → src/ui.form-date-picker}/composables/attrs.composable.js +1 -1
- package/{ui.form-date-picker → src/ui.form-date-picker}/configs/default.config.js +0 -1
- package/{ui.form-date-picker → src/ui.form-date-picker}/index.stories.js +4 -4
- package/{ui.form-date-picker → src/ui.form-date-picker}/index.vue +2 -3
- package/src/ui.form-date-picker-range/composables/attrs.composable.js +100 -0
- package/src/ui.form-date-picker-range/configs/default.config.js +172 -0
- package/src/ui.form-date-picker-range/constants/index.js +23 -0
- package/src/ui.form-date-picker-range/index.stories.js +135 -0
- package/src/ui.form-date-picker-range/index.vue +929 -0
- package/src/ui.form-date-picker-range/services/dateRange.service.js +116 -0
- package/src/ui.form-date-picker-range/services/validation.service.js +22 -0
- package/src/ui.form-input/Docs.mdx +16 -0
- package/{ui.form-input → src/ui.form-input}/composables/attrs.composable.js +2 -2
- package/{ui.form-input → src/ui.form-input}/index.stories.js +5 -5
- package/{ui.form-input → src/ui.form-input}/index.vue +2 -2
- package/{ui.form-input-file → src/ui.form-input-file}/composables/attrs.composable.js +2 -2
- package/{ui.form-input-file → src/ui.form-input-file}/configs/default.config.js +9 -1
- package/{ui.form-input-file → src/ui.form-input-file}/index.stories.js +4 -4
- package/{ui.form-input-file → src/ui.form-input-file}/index.vue +14 -47
- package/src/ui.form-input-money/Docs.mdx +16 -0
- package/{ui.form-input-money → src/ui.form-input-money}/composables/attrs.composable.js +1 -1
- package/{ui.form-input-money → src/ui.form-input-money}/index.stories.js +4 -4
- package/{ui.form-input-money → src/ui.form-input-money}/index.vue +2 -2
- package/src/ui.form-input-number/Docs.mdx +16 -0
- package/{ui.form-input-number → src/ui.form-input-number}/composables/attrs.composable.js +2 -2
- package/{ui.form-input-number → src/ui.form-input-number}/index.stories.js +3 -3
- package/{ui.form-input-number → src/ui.form-input-number}/index.vue +1 -1
- package/{ui.form-input-rating → src/ui.form-input-rating}/composables/attrs.composable.js +2 -2
- package/{ui.form-input-rating → src/ui.form-input-rating}/index.stories.js +3 -3
- package/{ui.form-input-rating → src/ui.form-input-rating}/index.vue +2 -2
- package/{ui.form-input-search → src/ui.form-input-search}/composables/attrs.composable.js +1 -1
- package/{ui.form-input-search → src/ui.form-input-search}/index.stories.js +4 -4
- package/{ui.form-input-search → src/ui.form-input-search}/index.vue +1 -2
- package/src/ui.form-label/Docs.mdx +16 -0
- package/{ui.form-label → src/ui.form-label}/composables/attrs.composable.js +2 -2
- package/{ui.form-label → src/ui.form-label}/index.stories.js +5 -5
- package/{ui.form-label → src/ui.form-label}/index.vue +1 -1
- package/src/ui.form-radio/Docs.mdx +16 -0
- package/{ui.form-radio → src/ui.form-radio}/composables/attrs.composable.js +2 -2
- package/{ui.form-radio → src/ui.form-radio}/index.stories.js +3 -3
- package/{ui.form-radio → src/ui.form-radio}/index.vue +1 -1
- package/src/ui.form-radio-card/Docs.mdx +16 -0
- package/{ui.form-radio-card → src/ui.form-radio-card}/composables/attrs.composable.js +8 -3
- package/{ui.form-radio-card → src/ui.form-radio-card}/configs/default.config.js +1 -1
- package/{ui.form-radio-card → src/ui.form-radio-card}/index.stories.js +3 -3
- package/{ui.form-radio-card → src/ui.form-radio-card}/index.vue +11 -21
- package/{ui.form-radio-card → src/ui.form-radio-card}/services/variant.service.js +1 -1
- package/src/ui.form-radio-group/Docs.mdx +16 -0
- package/{ui.form-radio-group → src/ui.form-radio-group}/composables/attrs.composable.js +2 -2
- package/{ui.form-radio-group → src/ui.form-radio-group}/index.stories.js +3 -3
- package/{ui.form-radio-group → src/ui.form-radio-group}/index.vue +1 -1
- package/src/ui.form-select/Docs.mdx +16 -0
- package/{ui.form-select → src/ui.form-select}/composables/attrs.composable.js +2 -2
- package/{ui.form-select → src/ui.form-select}/configs/default.config.js +7 -0
- package/{ui.form-select → src/ui.form-select}/index.stories.js +4 -4
- package/{ui.form-select → src/ui.form-select}/index.vue +38 -72
- package/{ui.form-switch → src/ui.form-switch}/composables/attrs.composable.js +2 -2
- package/{ui.form-switch → src/ui.form-switch}/configs/default.config.js +4 -0
- package/{ui.form-switch → src/ui.form-switch}/index.stories.js +4 -4
- package/{ui.form-switch → src/ui.form-switch}/index.vue +3 -23
- package/{ui.form-switch → src/ui.form-switch}/services/variant.service.js +1 -1
- package/src/ui.form-textarea/Docs.mdx +16 -0
- package/{ui.form-textarea → src/ui.form-textarea}/composables/attrs.composable.js +2 -2
- package/{ui.form-textarea → src/ui.form-textarea}/index.stories.js +5 -5
- package/{ui.form-textarea → src/ui.form-textarea}/index.vue +2 -2
- package/{ui.image-avatar → src/ui.image-avatar}/composables/attrs.composable.js +2 -2
- package/{ui.image-avatar → src/ui.image-avatar}/index.stories.js +3 -3
- package/{ui.image-avatar → src/ui.image-avatar}/index.vue +1 -1
- package/src/ui.image-icon/Docs.mdx +16 -0
- package/{ui.image-icon → src/ui.image-icon}/composables/attrs.composable.js +2 -2
- package/{ui.image-icon → src/ui.image-icon}/index.stories.js +3 -3
- package/{ui.image-icon → src/ui.image-icon}/index.vue +1 -1
- package/{ui.image-logo → src/ui.image-logo}/composables/attrs.composable.js +2 -2
- package/{ui.image-logo → src/ui.image-logo}/index.stories.js +3 -3
- package/{ui.image-logo → src/ui.image-logo}/index.vue +1 -1
- package/src/ui.loader-rendering/index.vue +72 -0
- package/src/ui.loader-rendering/store/index.js +17 -0
- package/src/ui.loader-top/components/TopProgress.vue +277 -0
- package/src/ui.loader-top/index.vue +221 -0
- package/src/ui.loader-top/store/index.js +59 -0
- package/{ui.navigation-pagination → src/ui.navigation-pagination}/composables/attrs.composable.js +2 -2
- package/{ui.navigation-pagination → src/ui.navigation-pagination}/index.stories.js +2 -2
- package/{ui.navigation-pagination → src/ui.navigation-pagination}/index.vue +2 -2
- package/{ui.navigation-stepper → src/ui.navigation-stepper}/composables/attrs.composable.js +1 -1
- package/{ui.navigation-stepper → src/ui.navigation-stepper}/index.stories.js +2 -2
- package/{ui.navigation-stepper → src/ui.navigation-stepper}/index.vue +2 -2
- package/{ui.navigation-tab → src/ui.navigation-tab}/composables/attrs.composable.js +2 -2
- package/{ui.navigation-tab → src/ui.navigation-tab}/index.stories.js +3 -3
- package/{ui.navigation-tab → src/ui.navigation-tab}/index.vue +1 -1
- package/{ui.navigation-tabs → src/ui.navigation-tabs}/composables/attrs.composable.js +2 -2
- package/{ui.navigation-tabs → src/ui.navigation-tabs}/index.stories.js +2 -2
- package/{ui.navigation-tabs → src/ui.navigation-tabs}/index.vue +2 -2
- package/src/ui.notify/index.stories.js +102 -0
- package/src/ui.notify/index.vue +248 -0
- package/src/ui.notify/services/index.js +87 -0
- package/{ui.other-dot → src/ui.other-dot}/composables/attrs.composable.js +2 -2
- package/{ui.other-dot → src/ui.other-dot}/index.stories.js +3 -3
- package/{ui.other-dot → src/ui.other-dot}/index.vue +1 -1
- package/{ui.other-loader → src/ui.other-loader}/composables/attrs.composable.js +2 -2
- package/{ui.other-loader → src/ui.other-loader}/index.stories.js +3 -3
- package/{ui.other-loader → src/ui.other-loader}/index.vue +1 -1
- package/{ui.text-alert → src/ui.text-alert}/composables/attrs.composable.js +2 -2
- package/{ui.text-alert → src/ui.text-alert}/configs/default.config.js +1 -1
- package/{ui.text-alert → src/ui.text-alert}/index.stories.js +3 -3
- package/{ui.text-alert → src/ui.text-alert}/index.vue +2 -2
- package/src/ui.text-badge/Docs.mdx +16 -0
- package/{ui.text-badge → src/ui.text-badge}/composables/attrs.composable.js +2 -2
- package/{ui.text-badge → src/ui.text-badge}/index.stories.js +5 -5
- package/{ui.text-badge → src/ui.text-badge}/index.vue +1 -1
- package/{ui.text-block → src/ui.text-block}/composables/attrs.composable.js +2 -2
- package/{ui.text-block → src/ui.text-block}/index.stories.js +3 -3
- package/{ui.text-block → src/ui.text-block}/index.vue +1 -1
- package/src/ui.text-empty/Docs.mdx +16 -0
- package/{ui.text-empty → src/ui.text-empty}/composables/attrs.composable.js +2 -2
- package/{ui.text-empty → src/ui.text-empty}/index.stories.js +5 -5
- package/{ui.text-empty → src/ui.text-empty}/index.vue +1 -1
- package/{ui.text-file → src/ui.text-file}/composables/attrs.composable.js +2 -2
- package/{ui.text-file → src/ui.text-file}/index.stories.js +2 -2
- package/{ui.text-file → src/ui.text-file}/index.vue +3 -3
- package/{ui.text-files → src/ui.text-files}/composables/attrs.composable.js +1 -1
- package/{ui.text-files → src/ui.text-files}/index.stories.js +2 -2
- package/{ui.text-files → src/ui.text-files}/index.vue +2 -2
- package/src/ui.text-header/Docs.mdx +16 -0
- package/{ui.text-header → src/ui.text-header}/composables/attrs.composable.js +2 -2
- package/{ui.text-header → src/ui.text-header}/index.stories.js +3 -3
- package/{ui.text-header → src/ui.text-header}/index.vue +1 -1
- package/src/ui.text-money/Docs.mdx +16 -0
- package/{ui.text-money → src/ui.text-money}/composables/attrs.composable.js +2 -2
- package/{ui.text-money → src/ui.text-money}/index.stories.js +6 -6
- package/{ui.text-money → src/ui.text-money}/index.vue +1 -1
- package/src/ui.viewport/index.vue +78 -0
- package/src/ui.viewport/store/index.js +47 -0
- package/tailwind.config.js +69 -0
- package/vite.config.mjs +39 -0
- package/vueless.config.js +7 -0
- package/web-types.json +7187 -0
- package/library.vue-tailwind-3/TDatepicker/components/t-date-trigger.js +0 -257
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-navigator.js +0 -600
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-time-selector.js +0 -522
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-calendar-days-day.js +0 -289
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-calendar-days.js +0 -236
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-calendar-headers.js +0 -64
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-calendar.js +0 -159
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-months-month.js +0 -106
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-months.js +0 -97
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-years-year.js +0 -117
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view-years.js +0 -104
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views-view.js +0 -294
- package/library.vue-tailwind-3/TDatepicker/components/t-datepicker-views.js +0 -212
- package/library.vue-tailwind-3/TDatepicker/components/t-toggle.js +0 -323
- package/library.vue-tailwind-3/TDatepicker/index.js +0 -1051
- package/library.vue-tailwind-3/base/Component.js +0 -126
- package/library.vue-tailwind-3/base/HtmlInput.js +0 -38
- package/library.vue-tailwind-3/base/TextInput.js +0 -102
- package/library.vue-tailwind-3/index.js +0 -7
- package/library.vue-tailwind-3/l10n/ar.js +0 -27
- package/library.vue-tailwind-3/l10n/at.js +0 -29
- package/library.vue-tailwind-3/l10n/az.js +0 -40
- package/library.vue-tailwind-3/l10n/be.js +0 -35
- package/library.vue-tailwind-3/l10n/bg.js +0 -41
- package/library.vue-tailwind-3/l10n/bn.js +0 -39
- package/library.vue-tailwind-3/l10n/bs.js +0 -28
- package/library.vue-tailwind-3/l10n/cat.js +0 -59
- package/library.vue-tailwind-3/l10n/cs.js +0 -35
- package/library.vue-tailwind-3/l10n/cy.js +0 -68
- package/library.vue-tailwind-3/l10n/da.js +0 -31
- package/library.vue-tailwind-3/l10n/de.js +0 -30
- package/library.vue-tailwind-3/l10n/default.js +0 -54
- package/library.vue-tailwind-3/l10n/eo.js +0 -31
- package/library.vue-tailwind-3/l10n/es.js +0 -32
- package/library.vue-tailwind-3/l10n/et.js +0 -46
- package/library.vue-tailwind-3/l10n/fa.js +0 -41
- package/library.vue-tailwind-3/l10n/fi.js +0 -50
- package/library.vue-tailwind-3/l10n/fo.js +0 -40
- package/library.vue-tailwind-3/l10n/fr.js +0 -48
- package/library.vue-tailwind-3/l10n/ga.js +0 -36
- package/library.vue-tailwind-3/l10n/gr.js +0 -33
- package/library.vue-tailwind-3/l10n/he.js +0 -41
- package/library.vue-tailwind-3/l10n/hi.js +0 -39
- package/library.vue-tailwind-3/l10n/hr.js +0 -41
- package/library.vue-tailwind-3/l10n/hu.js +0 -46
- package/library.vue-tailwind-3/l10n/id.js +0 -30
- package/library.vue-tailwind-3/l10n/index.js +0 -127
- package/library.vue-tailwind-3/l10n/is.js +0 -40
- package/library.vue-tailwind-3/l10n/it.js +0 -31
- package/library.vue-tailwind-3/l10n/ja.js +0 -42
- package/library.vue-tailwind-3/l10n/ka.js +0 -35
- package/library.vue-tailwind-3/l10n/km.js +0 -45
- package/library.vue-tailwind-3/l10n/ko.js +0 -41
- package/library.vue-tailwind-3/l10n/kz.js +0 -34
- package/library.vue-tailwind-3/l10n/lt.js +0 -41
- package/library.vue-tailwind-3/l10n/lv.js +0 -37
- package/library.vue-tailwind-3/l10n/mk.js +0 -30
- package/library.vue-tailwind-3/l10n/mn.js +0 -42
- package/library.vue-tailwind-3/l10n/ms.js +0 -28
- package/library.vue-tailwind-3/l10n/my.js +0 -42
- package/library.vue-tailwind-3/l10n/nl.js +0 -48
- package/library.vue-tailwind-3/l10n/no.js +0 -31
- package/library.vue-tailwind-3/l10n/pa.js +0 -27
- package/library.vue-tailwind-3/l10n/pl.js +0 -31
- package/library.vue-tailwind-3/l10n/pt.js +0 -36
- package/library.vue-tailwind-3/l10n/ro.js +0 -29
- package/library.vue-tailwind-3/l10n/ru.js +0 -48
- package/library.vue-tailwind-3/l10n/si.js +0 -40
- package/library.vue-tailwind-3/l10n/sk.js +0 -32
- package/library.vue-tailwind-3/l10n/sl.js +0 -32
- package/library.vue-tailwind-3/l10n/sq.js +0 -27
- package/library.vue-tailwind-3/l10n/sr-cyr.js +0 -29
- package/library.vue-tailwind-3/l10n/sr.js +0 -30
- package/library.vue-tailwind-3/l10n/sv.js +0 -30
- package/library.vue-tailwind-3/l10n/th.js +0 -43
- package/library.vue-tailwind-3/l10n/tr.js +0 -32
- package/library.vue-tailwind-3/l10n/uk.js +0 -28
- package/library.vue-tailwind-3/l10n/uz.js +0 -35
- package/library.vue-tailwind-3/l10n/uz_latn.js +0 -48
- package/library.vue-tailwind-3/l10n/vn.js +0 -41
- package/library.vue-tailwind-3/l10n/zh-tw.js +0 -41
- package/library.vue-tailwind-3/l10n/zh.js +0 -41
- package/library.vue-tailwind-3/services/date.service.js +0 -294
- package/library.vue-tailwind-3/services/formatting.service.js +0 -205
- package/library.vue-tailwind-3/services/vueTailwind.service.js +0 -41
- package/library.vue-tailwind-3/t-alert.js +0 -151
- package/library.vue-tailwind-3/t-button.js +0 -243
- package/library.vue-tailwind-3/t-card.js +0 -98
- package/library.vue-tailwind-3/t-checkbox.js +0 -292
- package/library.vue-tailwind-3/t-dropdown.js +0 -322
- package/library.vue-tailwind-3/t-radio.js +0 -301
- package/ui.container-card/Docs.mdx +0 -16
- package/ui.container-divider/Docs.mdx +0 -16
- package/ui.container-group/Docs.mdx +0 -16
- package/ui.container-groups/Docs.mdx +0 -16
- package/ui.container-modal/Docs.mdx +0 -16
- package/ui.container-modal-confirm/Docs.mdx +0 -16
- package/ui.container-page/Docs.mdx +0 -16
- package/ui.container-row/Docs.mdx +0 -16
- package/ui.data-table/Docs.mdx +0 -16
- package/ui.dropdown-badge/Docs.mdx +0 -16
- package/ui.dropdown-button/Docs.mdx +0 -16
- package/ui.dropdown-item/Docs.mdx +0 -16
- package/ui.dropdown-link/Docs.mdx +0 -16
- package/ui.dropdown-list/Docs.mdx +0 -16
- package/ui.form-calendar/services/date.service.js +0 -121
- package/ui.form-checkbox/Docs.mdx +0 -16
- package/ui.form-checkbox-group/Docs.mdx +0 -16
- package/ui.form-checkbox-multi-state/Docs.mdx +0 -16
- package/ui.form-input/Docs.mdx +0 -16
- package/ui.form-input-money/Docs.mdx +0 -16
- package/ui.form-input-number/Docs.mdx +0 -16
- package/ui.form-label/Docs.mdx +0 -16
- package/ui.form-radio/Docs.mdx +0 -16
- package/ui.form-radio-card/Docs.mdx +0 -16
- package/ui.form-radio-group/Docs.mdx +0 -16
- package/ui.form-select/Docs.mdx +0 -16
- package/ui.form-textarea/Docs.mdx +0 -16
- package/ui.image-icon/Docs.mdx +0 -16
- package/ui.text-badge/Docs.mdx +0 -16
- package/ui.text-empty/Docs.mdx +0 -16
- package/ui.text-header/Docs.mdx +0 -16
- package/ui.text-money/Docs.mdx +0 -16
- /package/{library.web-types-gen → .web-types-gen}/index.js +0 -0
- /package/{library.web-types-gen → .web-types-gen}/lib/build.js +0 -0
- /package/{library.web-types-gen → .web-types-gen}/package.json +0 -0
- /package/{_readme → readme}/README.md +0 -0
- /package/{_readme → readme}/UGroup.md +0 -0
- /package/{_readme → readme}/UNotify.md +0 -0
- /package/{_readme → readme}/UPage.md +0 -0
- /package/{_readme → readme}/UTopLoader.md +0 -0
- /package/{_readme → readme}/customization.md +0 -0
- /package/{_readme → readme}/installation.md +0 -0
- /package/{_readme → readme}/storybook-pages/Customisation.mdx +0 -0
- /package/{_readme → readme}/storybook-pages/Installation.mdx +0 -0
- /package/{library.web-types-gen → src/library.web-types-gen}/lib/config.js +0 -0
- /package/{plugin.vite → src/plugin.vite}/index.js +0 -0
- /package/{plugin.vite → src/plugin.vite}/services/svgLoader.service.js +0 -0
- /package/{plugin.vite → src/plugin.vite}/services/unpluginComponentsResolver.js +0 -0
- /package/{service.storybook → src/service.storybook}/index.js +0 -0
- /package/{ui.button → src/ui.button}/constants/index.js +0 -0
- /package/{ui.button-link → src/ui.button-link}/constants/index.js +0 -0
- /package/{ui.button-toggle → src/ui.button-toggle}/configs/default.config.js +0 -0
- /package/{ui.button-toggle → src/ui.button-toggle}/constants/index.js +0 -0
- /package/{ui.button-toggle-item → src/ui.button-toggle-item}/configs/default.config.js +0 -0
- /package/{ui.button-toggle-item → src/ui.button-toggle-item}/constants/index.js +0 -0
- /package/{ui.container-accordion → src/ui.container-accordion}/configs/default.config.js +0 -0
- /package/{ui.container-accordion → src/ui.container-accordion}/constants/index.js +0 -0
- /package/{ui.container-card → src/ui.container-card}/configs/default.config.js +0 -0
- /package/{ui.container-card → src/ui.container-card}/constants/index.js +0 -0
- /package/{ui.container-divider → src/ui.container-divider}/configs/default.config.js +0 -0
- /package/{ui.container-divider → src/ui.container-divider}/constants/index.js +0 -0
- /package/{ui.container-group → src/ui.container-group}/configs/default.config.js +0 -0
- /package/{ui.container-group → src/ui.container-group}/constants/index.js +0 -0
- /package/{ui.container-groups → src/ui.container-groups}/configs/default.config.js +0 -0
- /package/{ui.container-groups → src/ui.container-groups}/index.vue +0 -0
- /package/{ui.container-modal → src/ui.container-modal}/configs/default.config.js +0 -0
- /package/{ui.container-modal → src/ui.container-modal}/constants/index.js +0 -0
- /package/{ui.container-modal-confirm → src/ui.container-modal-confirm}/constants/index.js +0 -0
- /package/{ui.container-page → src/ui.container-page}/configs/default.config.js +0 -0
- /package/{ui.container-page → src/ui.container-page}/constants/index.js +0 -0
- /package/{ui.container-row → src/ui.container-row}/configs/default.config.js +0 -0
- /package/{ui.container-row → src/ui.container-row}/constants/index.js +0 -0
- /package/{ui.data-list → src/ui.data-list}/configs/default.config.js +0 -0
- /package/{ui.data-list → src/ui.data-list}/constants/index.js +0 -0
- /package/{ui.data-table → src/ui.data-table}/constants/index.js +0 -0
- /package/{ui.data-table → src/ui.data-table}/services/table.service.js +0 -0
- /package/{ui.data-table-cell → src/ui.data-table-cell}/configs/default.config.js +0 -0
- /package/{ui.data-table-cell → src/ui.data-table-cell}/constants/index.js +0 -0
- /package/{ui.dropdown-badge → src/ui.dropdown-badge}/configs/default.config.js +0 -0
- /package/{ui.dropdown-badge → src/ui.dropdown-badge}/constants/index.js +0 -0
- /package/{ui.dropdown-button → src/ui.dropdown-button}/configs/default.config.js +0 -0
- /package/{ui.dropdown-button → src/ui.dropdown-button}/constants/index.js +0 -0
- /package/{ui.dropdown-item → src/ui.dropdown-item}/configs/default.config.js +0 -0
- /package/{ui.dropdown-item → src/ui.dropdown-item}/index.vue +0 -0
- /package/{ui.dropdown-link → src/ui.dropdown-link}/configs/default.config.js +0 -0
- /package/{ui.dropdown-link → src/ui.dropdown-link}/constants/index.js +0 -0
- /package/{ui.dropdown-list → src/ui.dropdown-list}/composables/usePointer.js +0 -0
- /package/{ui.dropdown-list → src/ui.dropdown-list}/constants/index.js +0 -0
- /package/{ui.form-calendar → src/ui.form-calendar}/components/MonthView.vue +0 -0
- /package/{ui.form-calendar → src/ui.form-calendar}/components/YearView.vue +0 -0
- /package/{ui.form-calendar → src/ui.form-calendar}/services/formatting.service.js +0 -0
- /package/{ui.form-checkbox → src/ui.form-checkbox}/constants/index.js +0 -0
- /package/{ui.form-checkbox-group → src/ui.form-checkbox-group}/configs/default.config.js +0 -0
- /package/{ui.form-checkbox-group → src/ui.form-checkbox-group}/constants/index.js +0 -0
- /package/{ui.form-checkbox-multi-state → src/ui.form-checkbox-multi-state}/configs/default.config.js +0 -0
- /package/{ui.form-checkbox-multi-state → src/ui.form-checkbox-multi-state}/constants/index.js +0 -0
- /package/{ui.form-color-picker → src/ui.form-color-picker}/configs/default.config.js +0 -0
- /package/{ui.form-color-picker → src/ui.form-color-picker}/constants/index.js +0 -0
- /package/{ui.form-date-picker → src/ui.form-date-picker}/constants/index.js +0 -0
- /package/{ui.form-input → src/ui.form-input}/assets/fonts/text-security-disc.woff +0 -0
- /package/{ui.form-input → src/ui.form-input}/configs/default.config.js +0 -0
- /package/{ui.form-input → src/ui.form-input}/constants/index.js +0 -0
- /package/{ui.form-input-file → src/ui.form-input-file}/constants/index.js +0 -0
- /package/{ui.form-input-money → src/ui.form-input-money}/composables/useFormatCurrency.js +0 -0
- /package/{ui.form-input-money → src/ui.form-input-money}/configs/default.config.js +0 -0
- /package/{ui.form-input-money → src/ui.form-input-money}/constants/index.js +0 -0
- /package/{ui.form-input-money → src/ui.form-input-money}/services/format.service.js +0 -0
- /package/{ui.form-input-number → src/ui.form-input-number}/configs/default.config.js +0 -0
- /package/{ui.form-input-number → src/ui.form-input-number}/constants/index.js +0 -0
- /package/{ui.form-input-rating → src/ui.form-input-rating}/configs/default.config.js +0 -0
- /package/{ui.form-input-rating → src/ui.form-input-rating}/constants/index.js +0 -0
- /package/{ui.form-input-search → src/ui.form-input-search}/configs/default.config.js +0 -0
- /package/{ui.form-input-search → src/ui.form-input-search}/constants/index.js +0 -0
- /package/{ui.form-label → src/ui.form-label}/configs/default.config.js +0 -0
- /package/{ui.form-label → src/ui.form-label}/constants/index.js +0 -0
- /package/{ui.form-radio → src/ui.form-radio}/configs/default.config.js +0 -0
- /package/{ui.form-radio → src/ui.form-radio}/constants/index.js +0 -0
- /package/{ui.form-radio-card → src/ui.form-radio-card}/constants/index.js +0 -0
- /package/{ui.form-radio-group → src/ui.form-radio-group}/configs/default.config.js +0 -0
- /package/{ui.form-radio-group → src/ui.form-radio-group}/constants/index.js +0 -0
- /package/{ui.form-select → src/ui.form-select}/constants/index.js +0 -0
- /package/{ui.form-select → src/ui.form-select}/services/select.service.js +0 -0
- /package/{ui.form-switch → src/ui.form-switch}/constants/index.js +0 -0
- /package/{ui.form-textarea → src/ui.form-textarea}/configs/default.config.js +0 -0
- /package/{ui.form-textarea → src/ui.form-textarea}/constants/index.js +0 -0
- /package/{ui.image-avatar → src/ui.image-avatar}/configs/default.config.js +0 -0
- /package/{ui.image-avatar → src/ui.image-avatar}/constants/index.js +0 -0
- /package/{ui.image-avatar → src/ui.image-avatar}/default-avatar.png +0 -0
- /package/{ui.image-icon → src/ui.image-icon}/configs/default.config.js +0 -0
- /package/{ui.image-icon → src/ui.image-icon}/constants/index.js +0 -0
- /package/{ui.image-logo → src/ui.image-logo}/configs/default.config.js +0 -0
- /package/{ui.image-logo → src/ui.image-logo}/constants/index.js +0 -0
- /package/{ui.navigation-pagination → src/ui.navigation-pagination}/configs/default.config.js +0 -0
- /package/{ui.navigation-pagination → src/ui.navigation-pagination}/constants/index.js +0 -0
- /package/{ui.navigation-stepper → src/ui.navigation-stepper}/configs/default.config.js +0 -0
- /package/{ui.navigation-stepper → src/ui.navigation-stepper}/constants/index.js +0 -0
- /package/{ui.navigation-tab → src/ui.navigation-tab}/configs/default.config.js +0 -0
- /package/{ui.navigation-tab → src/ui.navigation-tab}/constants/index.js +0 -0
- /package/{ui.navigation-tabs → src/ui.navigation-tabs}/configs/default.config.js +0 -0
- /package/{ui.navigation-tabs → src/ui.navigation-tabs}/constants/index.js +0 -0
- /package/{ui.other-dot → src/ui.other-dot}/configs/default.config.js +0 -0
- /package/{ui.other-dot → src/ui.other-dot}/constants/index.js +0 -0
- /package/{ui.other-loader → src/ui.other-loader}/configs/default.config.js +0 -0
- /package/{ui.other-loader → src/ui.other-loader}/constants/index.js +0 -0
- /package/{ui.text-alert → src/ui.text-alert}/constatns/index.js +0 -0
- /package/{ui.text-badge → src/ui.text-badge}/configs/default.config.js +0 -0
- /package/{ui.text-badge → src/ui.text-badge}/constants/index.js +0 -0
- /package/{ui.text-block → src/ui.text-block}/configs/default.config.js +0 -0
- /package/{ui.text-block → src/ui.text-block}/constatns/index.js +0 -0
- /package/{ui.text-empty → src/ui.text-empty}/configs/default.config.js +0 -0
- /package/{ui.text-empty → src/ui.text-empty}/constants/index.js +0 -0
- /package/{ui.text-file → src/ui.text-file}/configs/default.config.js +0 -0
- /package/{ui.text-files → src/ui.text-files}/configs/default.config.js +0 -0
- /package/{ui.text-files → src/ui.text-files}/constants/index.js +0 -0
- /package/{ui.text-header → src/ui.text-header}/configs/default.config.js +0 -0
- /package/{ui.text-header → src/ui.text-header}/constants/index.js +0 -0
- /package/{ui.text-money → src/ui.text-money}/assets/credit.svg +0 -0
- /package/{ui.text-money → src/ui.text-money}/assets/debit.svg +0 -0
- /package/{ui.text-money → src/ui.text-money}/configs/default.config.js +0 -0
- /package/{ui.text-money → src/ui.text-money}/constants/index.js +0 -0
- /package/{ui.text-money → src/ui.text-money}/services/money.services.js +0 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LOCALE_TYPE,
|
|
3
|
+
DAYS_IN_WEEK,
|
|
4
|
+
SECONDS_IN_MINUTES,
|
|
5
|
+
MILLISECONDS_IN_MINUTE,
|
|
6
|
+
} from "../constants";
|
|
7
|
+
|
|
8
|
+
const daysMap = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
9
|
+
const monthsMap = [
|
|
10
|
+
"january",
|
|
11
|
+
"february",
|
|
12
|
+
"march",
|
|
13
|
+
"april",
|
|
14
|
+
"may",
|
|
15
|
+
"june",
|
|
16
|
+
"july",
|
|
17
|
+
"august",
|
|
18
|
+
"september",
|
|
19
|
+
"october",
|
|
20
|
+
"november",
|
|
21
|
+
"december",
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export function minutesToSeconds(minutes) {
|
|
25
|
+
return Math.trunc(minutes * SECONDS_IN_MINUTES);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function utcToGMT(date) {
|
|
29
|
+
return new Date(date.getTime() + date.getTimezoneOffset() * MILLISECONDS_IN_MINUTE);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function getDaysInMonth(date) {
|
|
33
|
+
return new Date(new Date(date.valueOf()).setDate(0)).getDate();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function getWeeksInMonth(date, settings = {}) {
|
|
37
|
+
const { weekStartsOn = 0 } = settings;
|
|
38
|
+
|
|
39
|
+
const monthIndex = date.getMonth() - 1;
|
|
40
|
+
const firstOfMonth = new Date(date.getFullYear(), monthIndex, 1);
|
|
41
|
+
const daysInMonth = getDaysInMonth(date);
|
|
42
|
+
const firstWeekDay = (firstOfMonth.getDay() - weekStartsOn + DAYS_IN_WEEK) % DAYS_IN_WEEK;
|
|
43
|
+
|
|
44
|
+
return Math.ceil((firstWeekDay + daysInMonth) / DAYS_IN_WEEK);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function getEndOfYear(date) {
|
|
48
|
+
const localDate = new Date(date.valueOf());
|
|
49
|
+
const year = localDate.getFullYear() + 1;
|
|
50
|
+
|
|
51
|
+
localDate.setFullYear(year, 0, 0);
|
|
52
|
+
localDate.setHours(23, 59, 59, 999);
|
|
53
|
+
|
|
54
|
+
return localDate;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function getStartOfYear(date) {
|
|
58
|
+
const localDate = new Date(date.valueOf());
|
|
59
|
+
|
|
60
|
+
localDate.setFullYear(localDate.getFullYear(), 0, 1);
|
|
61
|
+
localDate.setHours(0, 0, 0, 0);
|
|
62
|
+
|
|
63
|
+
return localDate;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function getEndOfQuarter(date) {
|
|
67
|
+
const localDate = new Date(date.valueOf());
|
|
68
|
+
|
|
69
|
+
const currentMonth = localDate.getMonth();
|
|
70
|
+
const month = currentMonth - (currentMonth % 3) + 3;
|
|
71
|
+
|
|
72
|
+
localDate.setMonth(month, 0);
|
|
73
|
+
localDate.setHours(23, 59, 59, 999);
|
|
74
|
+
|
|
75
|
+
return localDate;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function getStartOfQuarter(date) {
|
|
79
|
+
const localDate = new Date(date.valueOf());
|
|
80
|
+
|
|
81
|
+
const currentMonth = localDate.getMonth();
|
|
82
|
+
const month = currentMonth - (currentMonth % 3);
|
|
83
|
+
|
|
84
|
+
localDate.setMonth(month, 1);
|
|
85
|
+
localDate.setHours(0, 0, 0, 0);
|
|
86
|
+
|
|
87
|
+
return localDate;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function getStartOfMonth(date) {
|
|
91
|
+
const localDate = new Date(date.valueOf());
|
|
92
|
+
|
|
93
|
+
localDate.setDate(1);
|
|
94
|
+
localDate.setHours(0, 0, 0, 0);
|
|
95
|
+
|
|
96
|
+
return localDate;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function getEndOfMonth(date) {
|
|
100
|
+
const localDate = new Date(date.valueOf());
|
|
101
|
+
const month = localDate.getMonth() + 1;
|
|
102
|
+
|
|
103
|
+
localDate.setFullYear(localDate.getFullYear(), month, 0);
|
|
104
|
+
localDate.setHours(23, 59, 59, 999);
|
|
105
|
+
|
|
106
|
+
return localDate;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function getEndOfWeek(date, settings = {}) {
|
|
110
|
+
const { weekStartsOn = 0 } = settings;
|
|
111
|
+
const localDate = new Date(date.valueOf());
|
|
112
|
+
|
|
113
|
+
const day = localDate.getDay();
|
|
114
|
+
const oneDay = 1;
|
|
115
|
+
|
|
116
|
+
const diff =
|
|
117
|
+
(day < weekStartsOn ? DAYS_IN_WEEK * -1 : 0) + DAYS_IN_WEEK - oneDay - (day - weekStartsOn);
|
|
118
|
+
|
|
119
|
+
localDate.setDate(localDate.getDate() + diff);
|
|
120
|
+
localDate.setHours(23, 59, 59, 999);
|
|
121
|
+
|
|
122
|
+
return localDate;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function getStartOfWeek(date, settings = {}) {
|
|
126
|
+
const { weekStartsOn = 0 } = settings;
|
|
127
|
+
const localDate = new Date(date.valueOf());
|
|
128
|
+
|
|
129
|
+
const day = localDate.getDay();
|
|
130
|
+
|
|
131
|
+
const diff = (day < weekStartsOn ? DAYS_IN_WEEK : 0) + day - weekStartsOn;
|
|
132
|
+
|
|
133
|
+
localDate.setDate(localDate.getDate() - diff);
|
|
134
|
+
localDate.setHours(0, 0, 0, 0);
|
|
135
|
+
|
|
136
|
+
return localDate;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function getEndOfDay(date) {
|
|
140
|
+
const localDate = new Date(date.valueOf());
|
|
141
|
+
|
|
142
|
+
localDate.setHours(23, 59, 59, 999);
|
|
143
|
+
|
|
144
|
+
return localDate;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function getStartOfDay(date) {
|
|
148
|
+
const localDate = new Date(date.valueOf());
|
|
149
|
+
|
|
150
|
+
localDate.setHours(0, 0, 0, 0);
|
|
151
|
+
|
|
152
|
+
return localDate;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function gmtToUTC(date) {
|
|
156
|
+
return new Date(
|
|
157
|
+
Date.UTC(
|
|
158
|
+
date.getUTCFullYear(),
|
|
159
|
+
date.getUTCMonth(),
|
|
160
|
+
date.getUTCDate(),
|
|
161
|
+
date.getUTCHours(),
|
|
162
|
+
date.getUTCMinutes(),
|
|
163
|
+
date.getUTCSeconds(),
|
|
164
|
+
),
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function getSortedLocale(locale, type) {
|
|
169
|
+
const targetMap = type === LOCALE_TYPE.month ? monthsMap : daysMap;
|
|
170
|
+
|
|
171
|
+
const sortedDays = Object.entries(locale)
|
|
172
|
+
.map((entry) => {
|
|
173
|
+
entry[0] = targetMap.indexOf(entry[0]);
|
|
174
|
+
|
|
175
|
+
return entry;
|
|
176
|
+
})
|
|
177
|
+
.sort((entryA, entryB) => entryA[0] - entryB[0]);
|
|
178
|
+
|
|
179
|
+
return sortedDays.map((entry) => entry[1]);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function getDateFromUnixTimestamp(timestamp) {
|
|
183
|
+
return new Date(timestamp * 1000);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function getUnixTimestampFromDate(date) {
|
|
187
|
+
return date.getTime() / 1000;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function getDatesDifference(dateOne, dateTwo, timeless = true) {
|
|
191
|
+
if (timeless !== false) {
|
|
192
|
+
return (
|
|
193
|
+
new Date(dateOne.getTime()).setHours(0, 0, 0, 0) -
|
|
194
|
+
new Date(dateTwo.getTime()).setHours(0, 0, 0, 0)
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return dateOne.getTime() - dateTwo.getTime();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function getDateWithoutTime(date = new Date()) {
|
|
202
|
+
date.setHours(0, 0, 0, 0);
|
|
203
|
+
|
|
204
|
+
return date;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export function isSameMonth(dateOne, dateTwo) {
|
|
208
|
+
return (
|
|
209
|
+
Boolean(dateOne) &&
|
|
210
|
+
Boolean(dateTwo) &&
|
|
211
|
+
dateOne.getFullYear() === dateTwo.getFullYear() &&
|
|
212
|
+
dateOne.getMonth() === dateTwo.getMonth()
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function isSameDay(dateOne, dateTwo) {
|
|
217
|
+
return isSameMonth(dateOne, dateTwo) && dateOne?.getDate() === dateTwo?.getDate();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function isAnotherMothDay(day, activeMonth) {
|
|
221
|
+
return (
|
|
222
|
+
activeMonth.getFullYear() !== day.getFullYear() || activeMonth.getMonth() !== day.getMonth()
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function addDays(date, amount = 1) {
|
|
227
|
+
const result = new Date(date);
|
|
228
|
+
|
|
229
|
+
result.setDate(result.getDate() + amount);
|
|
230
|
+
|
|
231
|
+
return result;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export function addWeeks(date, amount = 1) {
|
|
235
|
+
const days = amount * DAYS_IN_WEEK;
|
|
236
|
+
|
|
237
|
+
return addDays(date, days);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export function addQuarters(date, amount = 1) {
|
|
241
|
+
const months = amount * 3;
|
|
242
|
+
|
|
243
|
+
return addMonths(date, months);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export function addMonths(date, amount = 1) {
|
|
247
|
+
let newDate = new Date(date.valueOf());
|
|
248
|
+
|
|
249
|
+
newDate.setMonth(date.getMonth() + amount);
|
|
250
|
+
|
|
251
|
+
// Means the current day has less days so the extra month is
|
|
252
|
+
// in the following month
|
|
253
|
+
if (newDate.getDate() !== date.getDate()) {
|
|
254
|
+
// Assign the last day of previous month
|
|
255
|
+
newDate = new Date(newDate.getFullYear(), newDate.getMonth(), 0);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return newDate;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export function addYears(date, amount = 1) {
|
|
262
|
+
let newDate = new Date(date.valueOf());
|
|
263
|
+
|
|
264
|
+
newDate.setFullYear(date.getFullYear() + amount);
|
|
265
|
+
|
|
266
|
+
// Means the current day has less days so the extra month is
|
|
267
|
+
// in the following month
|
|
268
|
+
if (newDate.getDate() !== date.getDate()) {
|
|
269
|
+
// Assign the last day of previous month
|
|
270
|
+
newDate = new Date(newDate.getFullYear(), newDate.getMonth(), 0);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return newDate;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export function isToday(date) {
|
|
277
|
+
return isSameDay(date, new Date());
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function getLastDayOfMonth(date) {
|
|
281
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
282
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source } from "@storybook/blocks";
|
|
2
|
+
import { getSource } from "../service.storybook";
|
|
3
|
+
|
|
4
|
+
import * as stories from "./index.stories";
|
|
5
|
+
import defaultConfig from "./configs/default.config?raw"
|
|
6
|
+
|
|
7
|
+
<Meta of={stories} />
|
|
8
|
+
<Title of={stories} />
|
|
9
|
+
<Subtitle of={stories} />
|
|
10
|
+
<Description of={stories} />
|
|
11
|
+
<Primary of={stories} />
|
|
12
|
+
<Controls of={stories.Default} />
|
|
13
|
+
<Stories of={stories} />
|
|
14
|
+
|
|
15
|
+
## **Default config**
|
|
16
|
+
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getArgTypes, getSlotNames } from "
|
|
1
|
+
import { getArgTypes, getSlotNames } from "../service.storybook";
|
|
2
2
|
|
|
3
|
-
import UCheckbox from "
|
|
4
|
-
import UCheckboxGroup from "
|
|
5
|
-
import UBadge from "
|
|
6
|
-
import UGroup from "
|
|
3
|
+
import UCheckbox from "../ui.form-checkbox";
|
|
4
|
+
import UCheckboxGroup from "../ui.form-checkbox-group";
|
|
5
|
+
import UBadge from "../ui.text-badge";
|
|
6
|
+
import UGroup from "../ui.container-group";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
id: "3100",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
|
|
35
35
|
<script setup>
|
|
36
36
|
import { inject, ref, onMounted, computed } from "vue";
|
|
37
|
-
import isEqual from "lodash
|
|
37
|
+
import { isEqual } from "lodash-es";
|
|
38
38
|
|
|
39
|
-
import UIService, { getRandomId } from "
|
|
39
|
+
import UIService, { getRandomId } from "../service.ui";
|
|
40
40
|
|
|
41
41
|
import defaultConfig from "./configs/default.config";
|
|
42
42
|
import { UCheckbox } from "./constants";
|
|
43
43
|
|
|
44
|
-
import UIcon from "
|
|
44
|
+
import UIcon from "../ui.image-icon";
|
|
45
45
|
import { useAttrs } from "./composables/attrs.composable";
|
|
46
46
|
|
|
47
47
|
/* Should be a string for correct web-types gen */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source } from "@storybook/blocks";
|
|
2
|
+
import { getSource } from "../service.storybook";
|
|
3
|
+
|
|
4
|
+
import * as stories from "./index.stories";
|
|
5
|
+
import defaultConfig from "./configs/default.config?raw"
|
|
6
|
+
|
|
7
|
+
<Meta of={stories} />
|
|
8
|
+
<Title of={stories} />
|
|
9
|
+
<Subtitle of={stories} />
|
|
10
|
+
<Description of={stories} />
|
|
11
|
+
<Primary of={stories} />
|
|
12
|
+
<Controls of={stories.Default} />
|
|
13
|
+
<Stories of={stories} />
|
|
14
|
+
|
|
15
|
+
## **Default config**
|
|
16
|
+
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getArgTypes } from "
|
|
1
|
+
import { getArgTypes } from "../service.storybook";
|
|
2
2
|
|
|
3
|
-
import UCheckboxGroup from "
|
|
3
|
+
import UCheckboxGroup from "../ui.form-checkbox-group";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
id: "3110",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
33
|
import { provide, ref, watch } from "vue";
|
|
34
|
-
import isEqual from "lodash
|
|
34
|
+
import { isEqual } from "lodash-es";
|
|
35
35
|
|
|
36
|
-
import UIService, { getRandomId } from "
|
|
37
|
-
import UCheckbox from "
|
|
36
|
+
import UIService, { getRandomId } from "../service.ui";
|
|
37
|
+
import UCheckbox from "../ui.form-checkbox";
|
|
38
38
|
|
|
39
39
|
import { UCheckboxGroup } from "./constants";
|
|
40
40
|
import defaultConfig from "./configs/default.config";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source } from "@storybook/blocks";
|
|
2
|
+
import { getSource } from "../service.storybook";
|
|
3
|
+
|
|
4
|
+
import * as stories from "./index.stories";
|
|
5
|
+
import defaultConfig from "./configs/default.config?raw"
|
|
6
|
+
|
|
7
|
+
<Meta of={stories} />
|
|
8
|
+
<Title of={stories} />
|
|
9
|
+
<Subtitle of={stories} />
|
|
10
|
+
<Description of={stories} />
|
|
11
|
+
<Primary of={stories} />
|
|
12
|
+
<Controls of={stories.Default} />
|
|
13
|
+
<Stories of={stories} />
|
|
14
|
+
|
|
15
|
+
## **Default config**
|
|
16
|
+
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getArgTypes } from "
|
|
1
|
+
import { getArgTypes } from "../service.storybook";
|
|
2
2
|
|
|
3
|
-
import UCheckboxMultiState from "
|
|
4
|
-
import URow from "
|
|
3
|
+
import UCheckboxMultiState from "../ui.form-checkbox-multi-state";
|
|
4
|
+
import URow from "../ui.container-row";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
id: "3120",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script setup>
|
|
16
16
|
import { computed, ref, watchEffect } from "vue";
|
|
17
17
|
|
|
18
|
-
import UIService from "
|
|
18
|
+
import UIService from "../service.ui";
|
|
19
19
|
|
|
20
20
|
import defaultConfig from "./configs/default.config";
|
|
21
21
|
import { UCheckboxMultiState } from "./constants";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import useUI from "
|
|
1
|
+
import useUI from "../../composable.ui";
|
|
2
2
|
|
|
3
3
|
import defaultConfig from "../configs/default.config";
|
|
4
|
-
import { cva } from "
|
|
4
|
+
import { cva } from "../../service.ui";
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
|
|
7
7
|
export function useAttrs(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getArgTypes } from "
|
|
2
|
-
import UColorPicker from "
|
|
3
|
-
import UGroup from "
|
|
1
|
+
import { getArgTypes } from "../service.storybook";
|
|
2
|
+
import UColorPicker from "../ui.form-color-picker";
|
|
3
|
+
import UGroup from "../ui.container-group";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
id: "3210",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<script setup>
|
|
53
53
|
import { computed } from "vue";
|
|
54
54
|
|
|
55
|
-
import UIService, { getRandomId } from "
|
|
55
|
+
import UIService, { getRandomId } from "../service.ui";
|
|
56
56
|
|
|
57
57
|
import { UColorPicker } from "./constants";
|
|
58
58
|
import defaultConfig from "./configs/default.config";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source, Markdown } from "@storybook/blocks";
|
|
2
|
-
import { getSource } from "
|
|
2
|
+
import { getSource } from "../service.storybook";
|
|
3
3
|
|
|
4
4
|
import * as stories from "./index.stories";
|
|
5
5
|
import defaultConfig from "./configs/default.config?raw"
|
|
@@ -16,7 +16,7 @@ import defaultConfig from "./configs/default.config?raw"
|
|
|
16
16
|
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
17
17
|
|
|
18
18
|
## Formatting tokens
|
|
19
|
-
Each character in the table below can be used in `dateFormat` and `userFormat` options to achieve the format you need.
|
|
19
|
+
Each character in the table below can be used in `dateFormat` and `userFormat` options to achieve the format you need.
|
|
20
20
|
|
|
21
21
|
<Markdown>
|
|
22
22
|
{`
|
|
@@ -49,4 +49,4 @@ Each character in the table below can be used in `dateFormat` and `userFormat` o
|
|
|
49
49
|
## Escaping Formatting Tokens
|
|
50
50
|
You may escape formatting tokens using \\\\.
|
|
51
51
|
|
|
52
|
-
<Source code={`dateFormat: "Y-m-d\\Z", // Displays: 2017-01-22Z`} language="jsx" dark />
|
|
52
|
+
<Source code={`dateFormat: "Y-m-d\\Z", // Displays: 2017-01-22Z`} language="jsx" dark />
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getArgTypes, getSlotNames } from "
|
|
1
|
+
import { getArgTypes, getSlotNames } from "../service.storybook";
|
|
2
2
|
|
|
3
|
-
import UDatePicker from "
|
|
4
|
-
import UIcon from "
|
|
5
|
-
import URow from "
|
|
3
|
+
import UDatePicker from "../ui.form-date-picker";
|
|
4
|
+
import UIcon from "../ui.image-icon";
|
|
5
|
+
import URow from "../ui.container-row";
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
id: "3170",
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
:id="id"
|
|
5
5
|
:key="isShownCalendar"
|
|
6
6
|
v-model="userFormatDate"
|
|
7
|
-
:config="inputAttrs.config"
|
|
8
7
|
:label="label"
|
|
9
8
|
:placeholder="placeholder"
|
|
10
9
|
:error="error"
|
|
@@ -54,14 +53,14 @@
|
|
|
54
53
|
|
|
55
54
|
<script setup>
|
|
56
55
|
import { computed, nextTick, ref } from "vue";
|
|
57
|
-
import UIService, { getRandomId } from "
|
|
56
|
+
import UIService, { getRandomId } from "../service.ui";
|
|
58
57
|
|
|
59
58
|
import useAttrs from "./composables/attrs.composable";
|
|
60
59
|
|
|
61
60
|
import defaultConfig from "./configs/default.config";
|
|
62
61
|
import { UDatePicker } from "./constants";
|
|
63
62
|
|
|
64
|
-
import { VIEW } from "
|
|
63
|
+
import { VIEW } from "../ui.form-calendar/constants";
|
|
65
64
|
|
|
66
65
|
defineOptions({ name: "UDatePicker" });
|
|
67
66
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import useUI from "../../composable.ui";
|
|
2
|
+
import { cx } from "../../service.ui";
|
|
3
|
+
|
|
4
|
+
import { computed, watchEffect } from "vue";
|
|
5
|
+
|
|
6
|
+
import defaultConfig from "../configs/default.config";
|
|
7
|
+
|
|
8
|
+
export default function useAttrs(props, { isShownMenu }) {
|
|
9
|
+
const { config, getAttrs } = useUI(defaultConfig, () => props.config);
|
|
10
|
+
|
|
11
|
+
const buttonWrapperAttrsRaw = getAttrs("buttonWrapper");
|
|
12
|
+
const buttonAttrsRaw = getAttrs("button");
|
|
13
|
+
const shiftRangeButtonAttrs = getAttrs("shiftRangeButton");
|
|
14
|
+
const calendarAttrs = getAttrs("calendar", { isComponent: true });
|
|
15
|
+
const inputBlurAttrs = getAttrs("input", { isComponent: true });
|
|
16
|
+
const inputActiveAttrs = getAttrs("inputActive");
|
|
17
|
+
const rangeInputAttrs = getAttrs("rangeInput", { isComponent: true });
|
|
18
|
+
const rangeInputWrapperAttrs = getAttrs("rangeInputWrapper");
|
|
19
|
+
const inputRangeErrorAttrs = getAttrs("inputRangeError");
|
|
20
|
+
|
|
21
|
+
// This watcher rewrites default calendar locales with datepicker range locales
|
|
22
|
+
// Watcher will not rewrite custom calendar locales
|
|
23
|
+
watchEffect(() => {
|
|
24
|
+
if (!calendarAttrs.value.config) {
|
|
25
|
+
calendarAttrs.value.config = {};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (calendarAttrs.value.config.i18n) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
calendarAttrs.value.config.i18n = {
|
|
33
|
+
weekdays: {
|
|
34
|
+
shorthand: { ...config.value.i18n.weekdays.shorthand },
|
|
35
|
+
longhand: { ...config.value.i18n.weekdays.longhand },
|
|
36
|
+
},
|
|
37
|
+
months: {
|
|
38
|
+
shorthand: { ...config.value.i18n.months.shorthand },
|
|
39
|
+
longhand: { ...config.value.i18n.months.longhand },
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const inputAttrs = computed(() => {
|
|
45
|
+
return isShownMenu.value ? inputActiveAttrs.value : inputBlurAttrs.value;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const menuAttrs = getAttrs("menu");
|
|
49
|
+
const periodsRowAttrs = getAttrs("periodsRow");
|
|
50
|
+
const rangeSwitchWrapperAttrs = getAttrs("rangeSwitchWrapper");
|
|
51
|
+
const nextIconAttrs = getAttrs("nextIcon");
|
|
52
|
+
const prevIconAttrs = getAttrs("prevIcon");
|
|
53
|
+
const rangeSwitchTitleAttrs = getAttrs("rangeSwitchTitle");
|
|
54
|
+
|
|
55
|
+
const periodButtonAttrs = (classes = []) => {
|
|
56
|
+
return getAttrs("periodButton", { classes }).value;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const periodDateListAttrs = (classes = []) => {
|
|
60
|
+
return getAttrs("periodDateList", { classes }).value;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const periodDateAttrs = (classes = []) => {
|
|
64
|
+
return getAttrs("periodDate", { classes }).value;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const buttonWrapperAttrs = computed(() => ({
|
|
68
|
+
...buttonWrapperAttrsRaw.value,
|
|
69
|
+
class: cx([
|
|
70
|
+
buttonWrapperAttrsRaw.value.class,
|
|
71
|
+
isShownMenu.value && config.value.buttonWrapperActive,
|
|
72
|
+
]),
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
const buttonAttrs = computed(() => ({
|
|
76
|
+
...buttonAttrsRaw.value,
|
|
77
|
+
class: cx([buttonAttrsRaw.value.class, isShownMenu.value && config.value.buttonActive]),
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
config,
|
|
82
|
+
calendarAttrs,
|
|
83
|
+
inputAttrs,
|
|
84
|
+
menuAttrs,
|
|
85
|
+
periodsRowAttrs,
|
|
86
|
+
periodButtonAttrs,
|
|
87
|
+
rangeSwitchWrapperAttrs,
|
|
88
|
+
nextIconAttrs,
|
|
89
|
+
prevIconAttrs,
|
|
90
|
+
periodDateAttrs,
|
|
91
|
+
periodDateListAttrs,
|
|
92
|
+
rangeSwitchTitleAttrs,
|
|
93
|
+
buttonWrapperAttrs,
|
|
94
|
+
buttonAttrs,
|
|
95
|
+
shiftRangeButtonAttrs,
|
|
96
|
+
rangeInputAttrs,
|
|
97
|
+
rangeInputWrapperAttrs,
|
|
98
|
+
inputRangeErrorAttrs,
|
|
99
|
+
};
|
|
100
|
+
}
|