bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76
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/README.md +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +4 -4
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +13 -1
- package/dist/ai/BbColorPalette.md +12 -7
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +13 -1
- package/dist/ai/BbDatePickerInput.md +18 -2
- package/dist/ai/BbDialog.md +6 -3
- package/dist/ai/BbDropdown.md +174 -77
- package/dist/ai/BbDropdownButton.md +37 -16
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +227 -105
- package/dist/ai/BbSelectPopover.md +139 -14
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +18 -17
- package/dist/ai/BbTimePicker.md +13 -1
- package/dist/ai/BbTimePickerInput.md +16 -2
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +3 -2
- package/dist/ai/ListBox.md +4 -2
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +310 -7
- package/dist/ai/components.json +33 -35
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +9 -5
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +70 -24
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
- package/dist/ai/manifest/components/BbDropdown.json +36 -28
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
- package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +47 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +9 -1
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +3 -2
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +3 -2
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +128 -11
- package/dist/ai/source/BbBadge.md +18 -7
- package/dist/ai/source/BbBreadcrumbs.md +57 -56
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +41 -34
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +23 -2
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +47 -3
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +296 -99
- package/dist/ai/source/BbDropdownButton.md +61 -19
- package/dist/ai/source/BbDropdownGroup.md +189 -98
- package/dist/ai/source/BbGallery.md +82 -60
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +151 -112
- package/dist/ai/source/BbSelectPopover.md +244 -29
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +114 -35
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +21 -2
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +33 -7
- package/dist/ai/source/GroupedListBox.md +85 -14
- package/dist/ai/source/ListBox.md +11 -1
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
- package/dist/components/BbDropdown/types.d.ts +109 -87
- package/dist/components/BbDropdown/types.js +3 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
- package/dist/components/BbDropdownButton/types.d.ts +23 -10
- package/dist/components/BbDropdownButton/types.js +4 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +110 -111
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +32 -17
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +1038 -451
- package/dist/llms-medium.txt +33 -28
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +5 -5
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +323 -307
- package/llms.txt +2 -2
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +93 -12
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -3,42 +3,45 @@ import { useConfig as t } from "../../composables/useConfig.js";
|
|
|
3
3
|
import { useConfigDefaults as n } from "../../composables/useConfigDefaults.js";
|
|
4
4
|
import { useFormBinding as r } from "../../composables/useFormBinding.js";
|
|
5
5
|
import { useLocale as i } from "../../composables/useLocale.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { useOpenProp as a } from "../../composables/useOpenModel.js";
|
|
7
|
+
import { useLogger as o } from "../../composables/useLogger.js";
|
|
8
|
+
import { useMobile as s } from "../../composables/useMobile.js";
|
|
9
|
+
import { SEGMENTED_CONTROL_NATIVE_ATTRS as c, formControlPtActive as l, usePassthrough as u, variantPt as d } from "../../composables/usePassthrough.js";
|
|
10
|
+
import { fieldRuns as f, useSegmentedFields as ee } from "../../composables/useSegmentedFields.js";
|
|
10
11
|
import { removedPropsFor as te } from "../../deprecation/removedProps.js";
|
|
11
12
|
import { formatOfType as ne, isCoarseType as re, isLabelType as ie, unitOfType as ae } from "../../types/DatePickerType.js";
|
|
12
|
-
import { isoMondayOf as
|
|
13
|
+
import { isoMondayOf as p, isoWeekOf as oe, isoWeekStart as se, isoWeeksInYear as ce, weekBoundAsDay as le } from "../../utilities/functions/isoWeek.js";
|
|
13
14
|
import { toInnerValue as ue, toOuterValue as de } from "../../utilities/functions/convertDateValue.js";
|
|
14
15
|
import { isEmpty as fe } from "../../utilities/functions/empty.js";
|
|
15
16
|
import { hash as pe } from "../../utilities/functions/hash.js";
|
|
16
17
|
import { isNotEmpty as me } from "../../utilities/functions/isNotEmpty.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import ve from "../../
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import ke from "
|
|
26
|
-
import
|
|
27
|
-
import Me from "../
|
|
28
|
-
import Ne from "../
|
|
29
|
-
import Pe from "../
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import ct from "
|
|
37
|
-
import
|
|
38
|
-
import ut from "dayjs/plugin/
|
|
39
|
-
import dt from "
|
|
18
|
+
import { isNotNil as he } from "../../utilities/functions/isNotNil.js";
|
|
19
|
+
import { normalizeDateBound as ge } from "../../utilities/functions/normalizeDateBound.js";
|
|
20
|
+
import { isDateDisabled as _e } from "../../utilities/functions/isDateDisabled.js";
|
|
21
|
+
import { warnRemovedAttrs as ve } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
22
|
+
import ye from "../../assets/svgs/calendar.svg_raw.js";
|
|
23
|
+
import { calendars as be, localeOf as xe } from "../../utilities/calendar/index.js";
|
|
24
|
+
import { foldDigits as Se } from "../../utilities/calendar/digits.js";
|
|
25
|
+
import { formatDateOf as Ce, intlLocaleOf as we, spokenClockOf as Te, spokenDateOptionsOf as Ee, useDayjsLocale as De, weekSpanOf as Oe } from "../BbCalendar/useDayjsLocale.js";
|
|
26
|
+
import { useHydrated as ke } from "../../composables/useHydrated.js";
|
|
27
|
+
import Ae from "../BbDatePicker/BbDatePicker.vue.js";
|
|
28
|
+
import { BB_DATE_PICKER_PT as je, DATE_PICKER_CALENDAR_PARTS as Me } from "../BbDatePicker/types.js";
|
|
29
|
+
import Ne from "../BbIcon/BbIcon.vue.js";
|
|
30
|
+
import Pe from "../CommonField/CommonField.vue.js";
|
|
31
|
+
import Fe from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
32
|
+
import { useMeridiem as Ie } from "../CommonTimeSelector/useMeridiem.js";
|
|
33
|
+
import { BB_DATE_PICKER_INPUT_PT as Le } from "./types.js";
|
|
34
|
+
import { dateLayoutFromHint as Re, dateReadsRtl as ze, monthLayoutFromHint as Be } from "./dateFieldLayout.js";
|
|
35
|
+
import { calendarFieldSpecs as Ve, calendarFieldsOf as He, eraHint as Ue, matchEra as We } from "./calendarFields.js";
|
|
36
|
+
import { useInternalIcon as Ge } from "../../composables/useInternalIcon.js";
|
|
37
|
+
import { Fragment as Ke, computed as m, createBlock as qe, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as Je, createVNode as Ye, defineComponent as Xe, guardReactiveProps as Ze, mergeProps as v, normalizeClass as Qe, normalizeProps as $e, normalizeStyle as et, onBeforeUnmount as tt, onDeactivated as nt, openBlock as y, ref as b, renderList as rt, renderSlot as x, toDisplayString as it, toRaw as at, unref as S, useAttrs as ot, useSlots as st, watch as ct, withCtx as C, withDirectives as lt } from "vue";
|
|
38
|
+
import w from "dayjs";
|
|
39
|
+
import ut from "dayjs/plugin/customParseFormat";
|
|
40
|
+
import { formatCalendarDate as T, formatDigits as dt } from "virtual:bitboss-ui/calendars";
|
|
41
|
+
import ft from "dayjs/plugin/isSameOrAfter";
|
|
42
|
+
import pt from "dayjs/plugin/isSameOrBefore";
|
|
40
43
|
// src/components/BbDatePickerInput/BbDatePickerInput.vue?vue&type=script&setup=true&lang.ts
|
|
41
|
-
var
|
|
44
|
+
var mt = ["dir"], ht = ["onClick"], gt = ["data-value"], _t = [
|
|
42
45
|
"id",
|
|
43
46
|
"aria-describedby",
|
|
44
47
|
"aria-disabled",
|
|
@@ -61,8 +64,8 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
61
64
|
"onInput",
|
|
62
65
|
"onKeydown",
|
|
63
66
|
"onPaste"
|
|
64
|
-
],
|
|
65
|
-
mixins: [
|
|
67
|
+
], vt = ["onClick"], yt = ["onClick"], bt = ["aria-disabled", "disabled"], xt = ["id"], E = "YYYY-MM-DD", St = "YYYY-MM-DDTHH:mm", Ct = /*@__PURE__*/ Xe({
|
|
68
|
+
mixins: [d(Le)],
|
|
66
69
|
inheritAttrs: !1,
|
|
67
70
|
__name: "BbDatePickerInput",
|
|
68
71
|
props: {
|
|
@@ -354,6 +357,7 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
354
357
|
"pt:item:errors": {},
|
|
355
358
|
"pt:item:open": {},
|
|
356
359
|
"pt:item:loading": {},
|
|
360
|
+
open: { type: Boolean },
|
|
357
361
|
pt: {},
|
|
358
362
|
adaptive: {
|
|
359
363
|
type: Boolean,
|
|
@@ -430,6 +434,7 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
430
434
|
"show",
|
|
431
435
|
"shown",
|
|
432
436
|
"hide",
|
|
437
|
+
"update:open",
|
|
433
438
|
"hidden",
|
|
434
439
|
"active",
|
|
435
440
|
"error",
|
|
@@ -438,199 +443,204 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
438
443
|
"update:modelValue",
|
|
439
444
|
"update:time"
|
|
440
445
|
],
|
|
441
|
-
setup(
|
|
442
|
-
let
|
|
446
|
+
setup(d, { emit: Xe }) {
|
|
447
|
+
let Ct = d, wt = Xe, Tt = st(), Et = Ge("calendar", ye), { props: D, emit: O, showAsterisk: Dt, errors: Ot, required: kt, ariaRequired: At, model: jt, readonly: Mt, locked: Nt } = r(Ct, wt, {
|
|
443
448
|
componentName: "BbDatePickerInput",
|
|
444
|
-
identifierFallback: () =>
|
|
449
|
+
identifierFallback: () => Ct.label,
|
|
445
450
|
leaveOn: "inactive",
|
|
446
451
|
emptyValue: () => null
|
|
447
|
-
}),
|
|
448
|
-
process.env.NODE_ENV !== "production" &&
|
|
449
|
-
let
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}),
|
|
459
|
-
let
|
|
452
|
+
}), Pt = /^\d{4}-\d{2}-\d{2}(:append)?$/, Ft = () => Object.keys(Tt).filter((e) => Pt.test(e)), k = t();
|
|
453
|
+
process.env.NODE_ENV !== "production" && ve("BbDatePickerInput", te("BbDatePickerInput"), { fixedSlots: ["append:outer"] });
|
|
454
|
+
let It = b(!1), Lt = b(!1), Rt = () => {
|
|
455
|
+
Lt.value = !1;
|
|
456
|
+
}, zt = b(!1), Bt = () => {
|
|
457
|
+
zt.value = !0, O("show");
|
|
458
|
+
}, Vt = () => {
|
|
459
|
+
zt.value = !1, O("hide");
|
|
460
|
+
}, { model: Ht, set: Ut } = a(Ct, wt);
|
|
461
|
+
nt(() => {
|
|
462
|
+
It.value ? yn() : Rt();
|
|
463
|
+
}), tt(Rt);
|
|
464
|
+
let Wt = m(() => D.persistentHint || Lt.value), Gt = m(() => me(D.modelValue)), A = n("BbDatePickerInput", D, {
|
|
460
465
|
labelMode: "outside",
|
|
461
466
|
autocomplete: "off",
|
|
462
467
|
compact: !1,
|
|
463
468
|
reverse: !1,
|
|
464
469
|
floating: !1
|
|
465
|
-
}),
|
|
470
|
+
}), Kt = m(() => A.labelMode), qt = [
|
|
466
471
|
"panel",
|
|
467
472
|
"sheet",
|
|
468
|
-
...
|
|
469
|
-
],
|
|
473
|
+
...Me
|
|
474
|
+
], j = u({
|
|
470
475
|
component: "BbDatePickerInput",
|
|
471
|
-
attrs:
|
|
472
|
-
controlAttrs:
|
|
473
|
-
props:
|
|
474
|
-
parts:
|
|
475
|
-
states:
|
|
476
|
+
attrs: ot(),
|
|
477
|
+
controlAttrs: c,
|
|
478
|
+
props: D,
|
|
479
|
+
parts: Le.parts,
|
|
480
|
+
states: Le.states,
|
|
476
481
|
active: {
|
|
477
|
-
...
|
|
478
|
-
open: () =>
|
|
482
|
+
...l(D, () => Gt.value),
|
|
483
|
+
open: () => zt.value
|
|
479
484
|
},
|
|
480
485
|
variant: {
|
|
481
|
-
...
|
|
482
|
-
current: () =>
|
|
486
|
+
...Le.variant,
|
|
487
|
+
current: () => D.variant ?? "outline"
|
|
483
488
|
}
|
|
484
|
-
}),
|
|
485
|
-
let { calendar: e } =
|
|
486
|
-
return e === "gregory" ? void 0 :
|
|
487
|
-
}) : null,
|
|
488
|
-
|
|
489
|
-
let { t:
|
|
490
|
-
let n = [e,
|
|
489
|
+
}), M = m(() => D.type === "datetime"), N = m(() => re(D.type)), Jt = m(() => A.floating || ie(D.type)), P = m(() => D.type === "week"), Yt = m(() => ae(D.type)), F = T ? m(() => {
|
|
490
|
+
let { calendar: e } = xe(k.locale);
|
|
491
|
+
return e === "gregory" ? void 0 : be[e];
|
|
492
|
+
}) : null, Xt = m(() => ne(D.type, F?.value));
|
|
493
|
+
w.extend(ut), w.extend(ft), w.extend(pt), De();
|
|
494
|
+
let { t: I } = i(), Zt = o(), L = b(null), Qt = (e) => `bdpi-description_${e}`, $t = (e, t) => {
|
|
495
|
+
let n = [e, Qt(t)].filter((e) => !!e?.trim()).flatMap((e) => e.split(/\s+/)).filter(Boolean);
|
|
491
496
|
return Array.from(new Set(n)).join(" ");
|
|
492
|
-
}, { isMobile:
|
|
493
|
-
|
|
494
|
-
},
|
|
497
|
+
}, { isMobile: en } = s(), tn = m(() => D.disableWriting === "mobile" ? !en.value : D.disableWriting === "desktop" ? en.value : !D.disableWriting), nn = m(() => !tn.value && !cn.value && !D.disabled && !D.readonly), rn = () => {
|
|
498
|
+
nn.value && !zt.value && (L.value?.$el)?.querySelector(".bb-segmented-field__activator")?.click();
|
|
499
|
+
}, an = (e) => {
|
|
495
500
|
let t = e.target;
|
|
496
|
-
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") ||
|
|
497
|
-
},
|
|
498
|
-
if (
|
|
499
|
-
else if (
|
|
500
|
-
else if (
|
|
501
|
+
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") || rn());
|
|
502
|
+
}, on = (e) => e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Backspace" || e.key === "Delete" || e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, sn = (e, t) => {
|
|
503
|
+
if (nn.value && (t.key === "Enter" || t.key === " ")) t.preventDefault(), rn();
|
|
504
|
+
else if (D.readonly && on(t)) t.preventDefault();
|
|
505
|
+
else if (T && V.value?.eras.length && e.field === "year" && (t.key === "ArrowUp" || t.key === "ArrowDown")) {
|
|
501
506
|
t.preventDefault();
|
|
502
|
-
let n =
|
|
503
|
-
a !== i && (n.year = String(a),
|
|
504
|
-
} else
|
|
505
|
-
},
|
|
506
|
-
if (
|
|
507
|
-
if (
|
|
508
|
-
let t =
|
|
509
|
-
return t.isValid() ? t :
|
|
507
|
+
let n = J.value[e.segment], r = V.value.lastYearOf(n.era), i = n.year ? parseInt(n.year, 10) : 0, a = n.year ? Math.min(Math.max(i + (t.key === "ArrowUp" ? 1 : -1), 1), r) : 1;
|
|
508
|
+
a !== i && (n.year = String(a), X(), $({ finalize: !1 })), t.target.value = rr(n.year);
|
|
509
|
+
} else dr(e, t);
|
|
510
|
+
}, cn = m(() => D.disableCalendar === "mobile" ? en.value : D.disableCalendar === "desktop" ? !en.value : !!D.disableCalendar), ln = m(() => !!D.readonly || !tn.value), un = (e) => tn.value ? Wn.value[e].kind === "enum" ? "none" : "numeric" : "none", dn = (e) => e.includes("T"), R = (e) => {
|
|
511
|
+
if (P.value) return w(le(e, "min"), E, !0);
|
|
512
|
+
if (N.value) {
|
|
513
|
+
let t = w(e, Xt.value, !0);
|
|
514
|
+
return t.isValid() ? t : w(e);
|
|
510
515
|
}
|
|
511
|
-
return
|
|
512
|
-
}, z =
|
|
513
|
-
for (let [e, t] of [["min",
|
|
514
|
-
let
|
|
515
|
-
!
|
|
516
|
-
let
|
|
517
|
-
floating:
|
|
518
|
-
utc:
|
|
519
|
-
type:
|
|
520
|
-
calendar:
|
|
521
|
-
})), V =
|
|
522
|
-
let { calendar: e, intl: t } =
|
|
523
|
-
if (e === "gregory" ||
|
|
524
|
-
let n =
|
|
525
|
-
return n ?
|
|
526
|
-
}) : null, H = (e) => de(e,
|
|
527
|
-
|
|
516
|
+
return dn(e) ? w(e, St, !0) : w(e, E, !0);
|
|
517
|
+
}, z = m(() => ge(D.min, D.type, "min", (e) => Zt.warn(`BbDatePickerInput: ${e}`), F?.value)), B = m(() => ge(D.max, D.type, "max", (e) => Zt.warn(`BbDatePickerInput: ${e}`), F?.value));
|
|
518
|
+
for (let [e, t] of [["min", D.min], ["max", D.max]]) t && (R(t).isValid() || Zt.throw(P.value ? `BbDatePickerInput: ${e} must be a week (YYYY-Www) or a date (YYYY-MM-DD) with type="week"` : N.value ? `BbDatePickerInput: ${e} must be a ${Xt.value} value (a longer date is accepted and rounded to the ${Yt.value}) with type="${D.type}"` : `BbDatePickerInput: ${e} must be in the format YYYY-MM-DD or YYYY-MM-DDTHH:mm`), (N.value || P.value) && (e === "min" ? z.value : B.value));
|
|
519
|
+
let fn = D.disableWriting !== !0 && D.disableWriting !== "desktop", pn = D.disableCalendar !== !0 && D.disableCalendar !== "desktop", mn = D.disableWriting !== !0 && D.disableWriting !== "mobile", hn = D.disableCalendar !== !0 && D.disableCalendar !== "mobile";
|
|
520
|
+
!fn && !pn && Zt.throw("BbDatePickerInput: desktop users would have no interaction method — disableWriting:true (or \"desktop\") and disableCalendar:true (or \"desktop\") cannot be combined."), !mn && !hn && Zt.throw("BbDatePickerInput: mobile users would have no interaction method — combine disableWriting:\"mobile\" with disableCalendar:\"desktop\" to keep calendar interaction on mobile while staying keyboard-first on desktop.");
|
|
521
|
+
let gn = m(() => ({
|
|
522
|
+
floating: Jt.value,
|
|
523
|
+
utc: D.utc,
|
|
524
|
+
type: D.type,
|
|
525
|
+
calendar: F?.value
|
|
526
|
+
})), V = T ? m(() => {
|
|
527
|
+
let { calendar: e, intl: t } = xe(k.locale);
|
|
528
|
+
if (e === "gregory" || D.type === "week") return null;
|
|
529
|
+
let n = be[e];
|
|
530
|
+
return n ? He(n, t, (e, t) => Ce(e, k.locale, t)) : null;
|
|
531
|
+
}) : null, H = (e) => de(e, gn.value), _n = (e) => ue(e, gn.value), vn = () => {
|
|
532
|
+
It.value || (Lt.value = !0, O("active"), It.value = !0, document.addEventListener("focusin", U), document.addEventListener("click", U, !0));
|
|
528
533
|
}, U = (e) => {
|
|
529
534
|
let t = e.target;
|
|
530
|
-
t instanceof HTMLElement && L.value?.$el && (e.type === "focusin" && t.contains(L.value.$el) || L.value.$el.contains(t) ||
|
|
531
|
-
},
|
|
532
|
-
$({ finalize: !0 }),
|
|
533
|
-
},
|
|
534
|
-
let n =
|
|
535
|
+
t instanceof HTMLElement && L.value?.$el && (e.type === "focusin" && t.contains(L.value.$el) || L.value.$el.contains(t) || yn());
|
|
536
|
+
}, yn = () => {
|
|
537
|
+
$({ finalize: !0 }), Rr() && (Ir(), X()), It.value = !1, Rt(), O("inactive"), document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
538
|
+
}, bn = (e, t) => {
|
|
539
|
+
let n = _n(t);
|
|
535
540
|
if (!n.isValid()) return;
|
|
536
|
-
let r =
|
|
537
|
-
|
|
538
|
-
},
|
|
541
|
+
let r = J.value[e];
|
|
542
|
+
T && V.value ? Yn(r, n) : (r.day = n.format("DD"), r.month = n.format("MM"), r.year = n.format("YYYY"));
|
|
543
|
+
}, xn = (e) => {
|
|
539
544
|
let { week: t, year: n } = oe(e);
|
|
540
545
|
return {
|
|
541
546
|
week: String(t).padStart(2, "0"),
|
|
542
547
|
year: String(n).padStart(4, "0")
|
|
543
548
|
};
|
|
544
|
-
},
|
|
545
|
-
if (e === null &&
|
|
546
|
-
else if (e === null || Array.isArray(e) && !e.length)
|
|
549
|
+
}, Sn = { "onUpdate:modelValue": (e) => {
|
|
550
|
+
if (e === null && D.range && (e = []), !M.value) O("update:modelValue", e);
|
|
551
|
+
else if (e === null || Array.isArray(e) && !e.length) J.value.start = Y(), J.value.end = Y(), X(), Q(D.range ? [] : null);
|
|
547
552
|
else if (Array.isArray(e)) {
|
|
548
553
|
let [t, n] = e;
|
|
549
|
-
t ?
|
|
550
|
-
} else
|
|
551
|
-
} },
|
|
552
|
-
let t =
|
|
553
|
-
return
|
|
554
|
-
},
|
|
554
|
+
t ? bn("start", t) : J.value.start = Y(), n ? bn("end", n) : J.value.end = Y(), X(), $({ finalize: !1 });
|
|
555
|
+
} else bn("start", e), X(), $({ finalize: !1 });
|
|
556
|
+
} }, Cn = (e) => {
|
|
557
|
+
let t = J.value[e];
|
|
558
|
+
return P.value ? !!(t.week && t.year && t.year.length === 4) : !!(t.day && t.month && (T ? wn(t) : t.year.length === 4));
|
|
559
|
+
}, wn = (e) => {
|
|
555
560
|
let t = V.value;
|
|
556
561
|
return t ? t.eras.length && !e.era ? !1 : t.yearFullLength ? e.year.length === t.yearDigits : !!e.year : e.year.length === 4;
|
|
557
|
-
},
|
|
558
|
-
|
|
559
|
-
},
|
|
560
|
-
let n =
|
|
561
|
-
e === "hour" ?
|
|
562
|
-
},
|
|
563
|
-
if (
|
|
564
|
-
let t =
|
|
565
|
-
return
|
|
566
|
-
},
|
|
567
|
-
if (
|
|
568
|
-
let t =
|
|
569
|
-
if (
|
|
562
|
+
}, Tn = b("start"), En = (e, t) => {
|
|
563
|
+
Tn.value = e.segment, fr(e, t), O("focus", t);
|
|
564
|
+
}, Dn = m(() => D.range ? Cn(Tn.value) ? Tn.value : Cn("end") ? "end" : "start" : "start"), On = ({ unit: e, value: t }) => {
|
|
565
|
+
let n = J.value[Dn.value];
|
|
566
|
+
e === "hour" ? xr(n, parseInt(t, 10)) : e === "meridiem" ? n.meridiem = G.label(t === "PM" ? "PM" : "AM") : n[e] = t, n.hour ||= D.ampm ? "12" : "00", D.ampm && !n.meridiem && (n.meridiem = G.am.value), n.minute ||= "00", D.seconds && !n.second && (n.second = "00"), X(), $({ finalize: !1 });
|
|
567
|
+
}, kn = m(() => Ee(D.type)), { isHydrated: An } = ke(), jn = (e) => {
|
|
568
|
+
if (P.value) return I("datePicker.weekSpan", String(oe(e).week), Oe(p(e), k.locale)).value;
|
|
569
|
+
let t = Ce(e, k.locale, kn.value);
|
|
570
|
+
return M.value ? `${t} ${Te(e, k.locale, !!D.ampm, !!D.seconds, An.value)}` : t;
|
|
571
|
+
}, Mn = (e) => {
|
|
572
|
+
if (lr(e) !== "complete") return null;
|
|
573
|
+
let t = J.value[e];
|
|
574
|
+
if (P.value) {
|
|
570
575
|
let e = se(parseInt(t.year, 10), parseInt(t.week, 10));
|
|
571
576
|
return e.isValid() ? e : null;
|
|
572
577
|
}
|
|
573
|
-
let n =
|
|
574
|
-
if (
|
|
575
|
-
let e = V.value.dateOf(
|
|
576
|
-
return !e ||
|
|
578
|
+
let n = K.value;
|
|
579
|
+
if (T && V.value) {
|
|
580
|
+
let e = V.value.dateOf(qn(t), n), r = M.value ? Br(t) : null;
|
|
581
|
+
return !e || M.value && !r ? null : r ? e.hour(+r.hour).minute(+r.minute).second(+r.second) : e;
|
|
577
582
|
}
|
|
578
|
-
let r = n.has("day") ? t.day.padStart(2, "0") : "01", i = n.has("month") ? t.month.padStart(2, "0") : "01", a = `${t.year.padStart(4, "0")}-${i}-${r}`, o =
|
|
579
|
-
|
|
580
|
-
let s =
|
|
583
|
+
let r = n.has("day") ? t.day.padStart(2, "0") : "01", i = n.has("month") ? t.month.padStart(2, "0") : "01", a = `${t.year.padStart(4, "0")}-${i}-${r}`, o = E;
|
|
584
|
+
M.value && (a += `T${Ur(e)}`, o += D.seconds ? "THH:mm:ss" : "THH:mm");
|
|
585
|
+
let s = w(a, o, !0);
|
|
581
586
|
return s.isValid() ? s : null;
|
|
582
|
-
},
|
|
583
|
-
if (
|
|
584
|
-
let e =
|
|
585
|
-
return !e || !t ?
|
|
587
|
+
}, Nn = m(() => {
|
|
588
|
+
if (D.range) {
|
|
589
|
+
let e = Mn("start"), t = Mn("end");
|
|
590
|
+
return !e || !t ? I("datePickerInput.emptyRange").value : I("datePickerInput.changeSelectionRange", jn(e), jn(t)).value;
|
|
586
591
|
}
|
|
587
|
-
let e =
|
|
588
|
-
return e ?
|
|
589
|
-
}),
|
|
592
|
+
let e = Mn("start");
|
|
593
|
+
return e ? I("datePickerInput.changeSelection", jn(e)).value : I("datePickerInput.emptySelection").value;
|
|
594
|
+
}), W = (e) => {
|
|
590
595
|
if (!e.isValid()) return !0;
|
|
591
|
-
if (
|
|
592
|
-
let t =
|
|
593
|
-
return n && t.isBefore(R(n), "day") || r && t.add(6, "day").isAfter(R(r), "day") ? !0 : typeof
|
|
596
|
+
if (P.value) {
|
|
597
|
+
let t = p(e), n = z.value, r = B.value;
|
|
598
|
+
return n && t.isBefore(R(n), "day") || r && t.add(6, "day").isAfter(R(r), "day") ? !0 : typeof D.selectable == "function" && !D.selectable(H(t));
|
|
594
599
|
}
|
|
595
600
|
let t = !0;
|
|
596
|
-
if (
|
|
597
|
-
min:
|
|
598
|
-
max:
|
|
599
|
-
selectable:
|
|
600
|
-
type:
|
|
601
|
-
calendar:
|
|
601
|
+
if (T && F.value && N.value) return _e(e, {
|
|
602
|
+
min: D.min,
|
|
603
|
+
max: D.max,
|
|
604
|
+
selectable: D.selectable,
|
|
605
|
+
type: D.type,
|
|
606
|
+
calendar: F.value
|
|
602
607
|
});
|
|
603
|
-
let n = (e) =>
|
|
604
|
-
return r && (t &&= e.isSameOrAfter(R(r), n(r))), i && (t &&= e.isSameOrBefore(R(i), n(i))), typeof
|
|
605
|
-
},
|
|
606
|
-
|
|
607
|
-
|
|
608
|
+
let n = (e) => N.value ? Yt.value : M.value && dn(e) ? "minute" : "day", r = z.value, i = B.value;
|
|
609
|
+
return r && (t &&= e.isSameOrAfter(R(r), n(r))), i && (t &&= e.isSameOrBefore(R(i), n(i))), typeof D.selectable == "function" && (t &&= D.selectable(H(e))), !t;
|
|
610
|
+
}, Pn = m(() => {
|
|
611
|
+
let e = Mn("start"), t = [e, e && D.range ? Mn("end") : null].filter(he);
|
|
612
|
+
if (!t.some(W)) return jt.value;
|
|
613
|
+
let n = t.map(H);
|
|
614
|
+
return D.range ? n : n[0];
|
|
615
|
+
}), Fn = () => {
|
|
616
|
+
D.range ? (O("update:modelValue", []), M.value && (Wr.value = [], O("update:time", []))) : (O("update:modelValue", null), M.value && (Wr.value = null, O("update:time", null)));
|
|
617
|
+
}, In = /* @__PURE__ */ new Set([
|
|
608
618
|
"hour",
|
|
609
619
|
"minute",
|
|
610
620
|
"second",
|
|
611
621
|
"meridiem"
|
|
612
|
-
]),
|
|
622
|
+
]), G = Ie(), Ln = (e, t) => G.isPm(t) ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e, Rn = (e) => {
|
|
613
623
|
let t = e >= 12 ? "PM" : "AM", n = e % 12;
|
|
614
624
|
return n === 0 && (n = 12), {
|
|
615
625
|
hour: String(n).padStart(2, "0"),
|
|
616
626
|
meridiem: t
|
|
617
627
|
};
|
|
618
|
-
},
|
|
619
|
-
if (
|
|
628
|
+
}, zn = m(() => {
|
|
629
|
+
if (D.type === "year") return {
|
|
620
630
|
order: ["year"],
|
|
621
631
|
separator: "/"
|
|
622
632
|
};
|
|
623
|
-
if (
|
|
633
|
+
if (P.value) return {
|
|
624
634
|
order: ["week", "year"],
|
|
625
635
|
separator: " "
|
|
626
636
|
};
|
|
627
|
-
let e =
|
|
628
|
-
if (
|
|
637
|
+
let e = I("datePickerInput.monthFormatSingle").value;
|
|
638
|
+
if (D.type === "month") return Be(e) ?? {
|
|
629
639
|
order: ["month", "year"],
|
|
630
640
|
separator: "/"
|
|
631
641
|
};
|
|
632
|
-
let t =
|
|
633
|
-
return
|
|
642
|
+
let t = I("datePickerInput.dateFormatSingle").value;
|
|
643
|
+
return Re(t, e) ?? {
|
|
634
644
|
order: [
|
|
635
645
|
"day",
|
|
636
646
|
"month",
|
|
@@ -638,36 +648,36 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
638
648
|
],
|
|
639
649
|
separator: "/"
|
|
640
650
|
};
|
|
641
|
-
}),
|
|
642
|
-
let e =
|
|
643
|
-
if (!
|
|
651
|
+
}), Bn = m(() => {
|
|
652
|
+
let e = zn.value.order;
|
|
653
|
+
if (!T || !V.value?.eras.length) return e;
|
|
644
654
|
let t = e.indexOf("year") + +!V.value.eraFirst;
|
|
645
655
|
return [
|
|
646
656
|
...e.slice(0, t),
|
|
647
657
|
"era",
|
|
648
658
|
...e.slice(t)
|
|
649
659
|
];
|
|
650
|
-
}),
|
|
651
|
-
if (!
|
|
660
|
+
}), K = m(() => new Set(Bn.value)), Vn = m(() => {
|
|
661
|
+
if (!M.value) return [];
|
|
652
662
|
let e = ["hour", "minute"];
|
|
653
|
-
return
|
|
654
|
-
}),
|
|
655
|
-
let e = [...
|
|
663
|
+
return D.seconds && e.push("second"), D.ampm && e.push("meridiem"), e;
|
|
664
|
+
}), q = m(() => {
|
|
665
|
+
let e = [...Bn.value, ...Vn.value], t = e.map((e) => ({
|
|
656
666
|
segment: "start",
|
|
657
667
|
field: e
|
|
658
668
|
}));
|
|
659
|
-
if (!
|
|
669
|
+
if (!D.range) return t;
|
|
660
670
|
let n = e.map((e) => ({
|
|
661
671
|
segment: "end",
|
|
662
672
|
field: e
|
|
663
673
|
}));
|
|
664
674
|
return [...t, ...n];
|
|
665
|
-
}),
|
|
675
|
+
}), Hn = m(() => {
|
|
666
676
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
667
|
-
return
|
|
677
|
+
return q.value.forEach((n, r) => {
|
|
668
678
|
e.has(n.segment) || (e.add(n.segment), t.add(r));
|
|
669
679
|
}), t;
|
|
670
|
-
}),
|
|
680
|
+
}), Un = (e) => Hn.value.has(e), Wn = m(() => ({
|
|
671
681
|
era: {
|
|
672
682
|
kind: "enum",
|
|
673
683
|
maxLength: 0
|
|
@@ -705,7 +715,7 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
705
715
|
requireFullLength: !0,
|
|
706
716
|
label: "Year"
|
|
707
717
|
},
|
|
708
|
-
hour:
|
|
718
|
+
hour: D.ampm ? {
|
|
709
719
|
kind: "numeric",
|
|
710
720
|
maxLength: 2,
|
|
711
721
|
max: 12,
|
|
@@ -737,25 +747,25 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
737
747
|
autoAdvanceFrom: 6,
|
|
738
748
|
label: "Second"
|
|
739
749
|
},
|
|
740
|
-
meridiem:
|
|
741
|
-
...
|
|
742
|
-
})),
|
|
750
|
+
meridiem: G.fieldSpec.value,
|
|
751
|
+
...Kn?.value
|
|
752
|
+
})), Gn = (e) => Wn.value[e].kind === "numeric" ? void 0 : Wn.value[e].maxLength, Kn = T ? m(() => V.value ? Ve(V.value) : null) : null, qn = (e) => ({
|
|
743
753
|
era: e.era,
|
|
744
754
|
year: e.year,
|
|
745
755
|
month: e.month,
|
|
746
756
|
day: e.day
|
|
747
|
-
}),
|
|
748
|
-
|
|
757
|
+
}), Jn = /* @__PURE__ */ new WeakMap(), Yn = (e, t) => {
|
|
758
|
+
Jn.set(at(e), t);
|
|
749
759
|
let n = V.value.fieldsOf(t);
|
|
750
|
-
e.era = n.era, e.year = n.year,
|
|
751
|
-
},
|
|
760
|
+
e.era = n.era, e.year = n.year, K.value.has("month") && (e.month = n.month), K.value.has("day") && (e.day = n.day);
|
|
761
|
+
}, Xn = m(() => f(q.value, (e) => e === "meridiem" ? "meridiem" : In.has(e) ? "time" : "date")), Zn = (e) => e.items.at(-1).index, Qn = m(() => ze(we(k.locale))), $n = (e) => e.kind === "meridiem" || e.kind === "date" && Qn.value ? void 0 : "ltr", er = (e, t) => {
|
|
752
762
|
if (e.segment !== t.segment) return "–";
|
|
753
763
|
if (t.field === "meridiem") return "\xA0";
|
|
754
|
-
let n =
|
|
755
|
-
return n && r ? ":" : !n && r ? "\xA0" :
|
|
756
|
-
}, { fields:
|
|
757
|
-
fieldOrder:
|
|
758
|
-
specs:
|
|
764
|
+
let n = In.has(e.field), r = In.has(t.field);
|
|
765
|
+
return n && r ? ":" : !n && r ? "\xA0" : T && (e.field === "era" && t.field === "year" || e.field === "year" && t.field === "era") ? V.value?.eraSeparator ?? " " : dt && Qn.value ? `\u200F${zn.value.separator}` : zn.value.separator;
|
|
766
|
+
}, { fields: J, fieldRefs: tr, descriptorKey: nr, displayOf: rr, emptyFieldGroup: Y, getSizedValue: ir, minChars: ar, updateAllSizedValues: X, isOwnField: or, focusField: sr, focusFirstField: cr, segmentStatus: lr, onFieldInput: ur, onFieldKeydown: dr, onFieldFocus: fr, onFieldBlur: pr, onFieldPaste: mr } = ee({
|
|
767
|
+
fieldOrder: q,
|
|
768
|
+
specs: Wn,
|
|
759
769
|
segments: ["start", "end"],
|
|
760
770
|
fieldKeys: [
|
|
761
771
|
"era",
|
|
@@ -780,13 +790,13 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
780
790
|
" "
|
|
781
791
|
],
|
|
782
792
|
onDirty: () => $({ finalize: !1 }),
|
|
783
|
-
numberingSystem:
|
|
784
|
-
}),
|
|
785
|
-
if (
|
|
786
|
-
let n =
|
|
793
|
+
numberingSystem: dt ? () => xe(k.locale).numberingSystem : void 0
|
|
794
|
+
}), hr = (e, t) => {
|
|
795
|
+
if (T && e.field === "era" && V.value) {
|
|
796
|
+
let n = J.value[e.segment], r = t.target, i = Se(r.value), a = We(V.value, i, n.era), o = i.replace(/\D/g, "");
|
|
787
797
|
if (a && a !== n.era) n.era = a, $({ finalize: !1 });
|
|
788
798
|
else if (o && V.value.eraFirst) {
|
|
789
|
-
n.era ||= V.value.fieldsOf(
|
|
799
|
+
n.era ||= V.value.fieldsOf(gr()).era, n.year = o.slice(0, Wn.value.year.maxLength), r.value = n.era, X(), sr({
|
|
790
800
|
segment: e.segment,
|
|
791
801
|
field: "year"
|
|
792
802
|
}, { caretToEnd: !0 }), $({ finalize: !1 });
|
|
@@ -794,21 +804,21 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
794
804
|
}
|
|
795
805
|
}
|
|
796
806
|
if (e.field === "meridiem") {
|
|
797
|
-
let n =
|
|
807
|
+
let n = J.value[e.segment], r = G.match(t.target.value, n.meridiem);
|
|
798
808
|
r && r !== n.meridiem && (n.meridiem = r, $({ finalize: !1 }));
|
|
799
809
|
}
|
|
800
|
-
|
|
810
|
+
ur(e, t);
|
|
801
811
|
};
|
|
802
|
-
|
|
803
|
-
for (let n of Object.values(
|
|
804
|
-
|
|
812
|
+
G.onRelabel((e, t) => {
|
|
813
|
+
for (let n of Object.values(J.value)) n.meridiem === e && (n.meridiem = t);
|
|
814
|
+
X();
|
|
805
815
|
});
|
|
806
|
-
let
|
|
807
|
-
let { min: e, max: t } = V.value.system.range, n =
|
|
808
|
-
return
|
|
809
|
-
},
|
|
810
|
-
if (
|
|
811
|
-
},
|
|
816
|
+
let gr = () => {
|
|
817
|
+
let { min: e, max: t } = V.value.system.range, n = w().format(E);
|
|
818
|
+
return w(n < e ? e : n > t ? t : n);
|
|
819
|
+
}, _r = (e, t) => D.range ? `${t}-${e.segment}-${e.field}` : `${t}-${e.field}`, vr = (e) => {
|
|
820
|
+
if (D.name) return D.range ? `${D.name}-${e.segment}-${e.field}` : `${D.name}-${e.field}`;
|
|
821
|
+
}, yr = {
|
|
812
822
|
era: "datePickerInput.eraField",
|
|
813
823
|
week: "datePickerInput.weekField",
|
|
814
824
|
day: "datePickerInput.dayField",
|
|
@@ -818,23 +828,23 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
818
828
|
minute: "datePickerInput.minuteField",
|
|
819
829
|
second: "datePickerInput.secondField",
|
|
820
830
|
meridiem: "datePickerInput.meridiemField"
|
|
821
|
-
},
|
|
822
|
-
let t =
|
|
823
|
-
return
|
|
824
|
-
},
|
|
825
|
-
if (!
|
|
831
|
+
}, br = (e) => {
|
|
832
|
+
let t = I(yr[e.field]).value;
|
|
833
|
+
return D.range ? I(e.segment === "start" ? "datePickerInput.startFieldLabel" : "datePickerInput.endFieldLabel", t).value : t;
|
|
834
|
+
}, xr = (e, t) => {
|
|
835
|
+
if (!D.ampm) {
|
|
826
836
|
e.hour = String(t).padStart(2, "0");
|
|
827
837
|
return;
|
|
828
838
|
}
|
|
829
|
-
let n =
|
|
830
|
-
e.hour = n.hour, e.meridiem =
|
|
831
|
-
},
|
|
839
|
+
let n = Rn(t);
|
|
840
|
+
e.hour = n.hour, e.meridiem = G.label(n.meridiem);
|
|
841
|
+
}, Sr = (e) => {
|
|
832
842
|
if (!e.hour) return 0;
|
|
833
843
|
let t = parseInt(e.hour, 10);
|
|
834
|
-
return
|
|
835
|
-
},
|
|
844
|
+
return D.ampm ? Ln(t, e.meridiem || "AM") : t;
|
|
845
|
+
}, Cr = m(() => D.seconds ? "HH:mm:ss" : "HH:mm"), wr = (e) => e.format(Cr.value), Tr = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, Er = (e) => {
|
|
836
846
|
if (!e) return null;
|
|
837
|
-
let t =
|
|
847
|
+
let t = Tr.exec(e);
|
|
838
848
|
if (!t) return null;
|
|
839
849
|
let [, n, r, i] = t;
|
|
840
850
|
return parseInt(n, 10) > 23 || parseInt(r, 10) > 59 || i && parseInt(i, 10) > 59 ? null : {
|
|
@@ -842,97 +852,97 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
842
852
|
minute: r.padStart(2, "0"),
|
|
843
853
|
second: (i ?? "").padStart(i ? 2 : 0, "0")
|
|
844
854
|
};
|
|
845
|
-
},
|
|
846
|
-
if (!
|
|
847
|
-
let n =
|
|
848
|
-
n ? (
|
|
849
|
-
},
|
|
850
|
-
if (
|
|
851
|
-
let e =
|
|
852
|
-
return
|
|
855
|
+
}, Dr = (e, t) => {
|
|
856
|
+
if (!M.value) return;
|
|
857
|
+
let n = Er(t);
|
|
858
|
+
n ? (xr(e, parseInt(n.hour, 10)), e.minute = n.minute, e.second = D.seconds ? n.second : "") : (e.hour = "", e.minute = "", e.second = "", e.meridiem = "");
|
|
859
|
+
}, Or = m(() => D.seconds ? "datePickerInput.timeFormatSeconds" : "datePickerInput.timeFormat"), kr = m(() => T && V.value?.eras.length ? Ue(V.value, Ar.value, I("datePickerInput.dateFormatSingle").value, I("datePickerInput.eraField").value) : Ar.value), Ar = m(() => {
|
|
860
|
+
if (D.type === "week" || D.type === "month" || D.type === "year") {
|
|
861
|
+
let e = D.type;
|
|
862
|
+
return I(D.range ? `datePickerInput.${e}FormatRange` : `datePickerInput.${e}FormatSingle`).value;
|
|
853
863
|
}
|
|
854
|
-
if (!
|
|
855
|
-
let e = `${
|
|
856
|
-
return
|
|
857
|
-
}),
|
|
858
|
-
if (!e) return
|
|
859
|
-
let t =
|
|
860
|
-
if (!t.isValid()) return
|
|
861
|
-
let n =
|
|
862
|
-
return
|
|
864
|
+
if (!M.value) return I(D.range ? "datePickerInput.dateFormatRange" : "datePickerInput.dateFormatSingle").value;
|
|
865
|
+
let e = `${I("datePickerInput.dateFormatSingle").value} ${I(Or.value).value}`;
|
|
866
|
+
return D.range ? `${e} – ${e}` : e;
|
|
867
|
+
}), jr = m(() => D.placeholder || kr.value), Mr = m(() => q.value.every((e) => !J.value[e.segment][e.field])), Nr = (e) => {
|
|
868
|
+
if (!e) return Y();
|
|
869
|
+
let t = _n(e);
|
|
870
|
+
if (!t.isValid()) return Y();
|
|
871
|
+
let n = Y();
|
|
872
|
+
return P.value ? {
|
|
863
873
|
...n,
|
|
864
|
-
...
|
|
865
|
-
} : (
|
|
866
|
-
},
|
|
867
|
-
if (!e)
|
|
868
|
-
start:
|
|
869
|
-
end:
|
|
874
|
+
...xn(t)
|
|
875
|
+
} : (T && V.value ? Yn(n, t) : (K.value.has("day") && (n.day = t.format("DD")), K.value.has("month") && (n.month = t.format("MM")), n.year = t.format("YYYY")), M.value && !A.floating && (xr(n, t.hour()), n.minute = t.format("mm"), n.second = D.seconds ? t.format("ss") : ""), n);
|
|
876
|
+
}, Pr = (e) => Array.isArray(D.time) ? D.time[e === "start" ? 0 : 1] : e === "start" ? D.time : void 0, Fr = (e) => {
|
|
877
|
+
if (!e) J.value = {
|
|
878
|
+
start: Y(),
|
|
879
|
+
end: Y()
|
|
870
880
|
};
|
|
871
881
|
else {
|
|
872
|
-
if (
|
|
882
|
+
if (D.range) {
|
|
873
883
|
let [t, n] = Array.isArray(e) ? e : [];
|
|
874
|
-
|
|
875
|
-
start:
|
|
876
|
-
end:
|
|
884
|
+
J.value = {
|
|
885
|
+
start: Nr(t),
|
|
886
|
+
end: Nr(n)
|
|
877
887
|
};
|
|
878
|
-
} else Array.isArray(e) ?
|
|
879
|
-
start:
|
|
880
|
-
end:
|
|
881
|
-
} :
|
|
882
|
-
start:
|
|
883
|
-
end:
|
|
888
|
+
} else Array.isArray(e) ? J.value = {
|
|
889
|
+
start: Y(),
|
|
890
|
+
end: Y()
|
|
891
|
+
} : J.value = {
|
|
892
|
+
start: Nr(e),
|
|
893
|
+
end: Y()
|
|
884
894
|
};
|
|
885
|
-
if (
|
|
886
|
-
let t =
|
|
887
|
-
t.day &&
|
|
895
|
+
if (M.value && A.floating) for (let e of ["start", "end"]) {
|
|
896
|
+
let t = J.value[e];
|
|
897
|
+
t.day && Dr(t, Pr(e));
|
|
888
898
|
}
|
|
889
899
|
}
|
|
890
|
-
},
|
|
891
|
-
|
|
900
|
+
}, Ir = () => {
|
|
901
|
+
Fr(D.modelValue);
|
|
892
902
|
};
|
|
893
|
-
|
|
894
|
-
|
|
903
|
+
Fr(D.modelValue), X(), T && ct(V, () => {
|
|
904
|
+
Fr(D.modelValue), X();
|
|
895
905
|
});
|
|
896
|
-
let
|
|
897
|
-
if (!
|
|
906
|
+
let Lr = (e) => {
|
|
907
|
+
if (!M.value || A.floating) return;
|
|
898
908
|
let t;
|
|
899
|
-
t = e ? Array.isArray(e) ? e.map((e) =>
|
|
909
|
+
t = e ? Array.isArray(e) ? e.map((e) => wr(_n(e))) : wr(_n(e)) : null, Wr.value = t, O("update:time", t);
|
|
900
910
|
};
|
|
901
|
-
|
|
911
|
+
ct(() => D.modelValue, (e) => {
|
|
902
912
|
if (e === null || Array.isArray(e) && e.length === 0) {
|
|
903
|
-
|
|
913
|
+
Fr(e), X(), Lr(e);
|
|
904
914
|
return;
|
|
905
915
|
}
|
|
906
916
|
let t = document.activeElement;
|
|
907
|
-
t &&
|
|
908
|
-
}),
|
|
909
|
-
if (!
|
|
917
|
+
t && or(t) || (Fr(e), X(), Lr(e));
|
|
918
|
+
}), ct(() => D.time, (e) => {
|
|
919
|
+
if (!M.value || pe(e ?? null) === pe(Wr.value ?? null)) return;
|
|
910
920
|
let t = document.activeElement;
|
|
911
|
-
if (!(t &&
|
|
921
|
+
if (!(t && or(t))) {
|
|
912
922
|
for (let e of ["start", "end"]) {
|
|
913
|
-
if (e === "end" && !
|
|
914
|
-
let t =
|
|
915
|
-
t !== void 0 &&
|
|
923
|
+
if (e === "end" && !D.range) break;
|
|
924
|
+
let t = Pr(e), n = J.value[e];
|
|
925
|
+
t !== void 0 && Dr(n, t);
|
|
916
926
|
}
|
|
917
|
-
|
|
927
|
+
X(), $({ finalize: !1 });
|
|
918
928
|
}
|
|
919
929
|
});
|
|
920
|
-
let
|
|
921
|
-
let t =
|
|
922
|
-
if (
|
|
930
|
+
let Rr = () => lr("start") === "partial" ? !0 : D.range ? lr("end") === "partial" : !1, zr = (e) => {
|
|
931
|
+
let t = J.value[e], n = K.value;
|
|
932
|
+
if (P.value) {
|
|
923
933
|
if (!t.week || !t.year) return null;
|
|
924
934
|
let n = parseInt(t.year, 10), r = parseInt(t.week, 10);
|
|
925
935
|
if (n < 1e3 || n > 9999 || r < 1) return null;
|
|
926
936
|
let i = ce(n);
|
|
927
|
-
r > i && (
|
|
937
|
+
r > i && (J.value[e].week = String(i).padStart(2, "0"));
|
|
928
938
|
let a = se(n, Math.min(r, i));
|
|
929
939
|
return a.isValid() ? a : null;
|
|
930
940
|
}
|
|
931
941
|
if (n.has("day") && !t.day || n.has("month") && !t.month || !t.year) return null;
|
|
932
|
-
if (
|
|
933
|
-
let r =
|
|
934
|
-
if (
|
|
935
|
-
let i =
|
|
942
|
+
if (T && V.value) {
|
|
943
|
+
let r = M.value ? Br(t) : null;
|
|
944
|
+
if (M.value && !r) return null;
|
|
945
|
+
let i = qn(t), a = Jn.get(at(J.value[e]));
|
|
936
946
|
if (a && !V.value.eras.length && n.has("month")) {
|
|
937
947
|
let e = V.value.fieldsOf(a), n = parseInt(t.year, 10) - parseInt(e.year, 10);
|
|
938
948
|
n && parseInt(t.month, 10) === parseInt(e.month, 10) && (i = {
|
|
@@ -942,92 +952,92 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
942
952
|
}
|
|
943
953
|
let o = V.value.nearest(i, n);
|
|
944
954
|
if (!o) return null;
|
|
945
|
-
|
|
955
|
+
Jn.set(at(J.value[e]), o);
|
|
946
956
|
let s = V.value.fieldsOf(o);
|
|
947
957
|
for (let r of [
|
|
948
958
|
"era",
|
|
949
959
|
"year",
|
|
950
960
|
"month",
|
|
951
961
|
"day"
|
|
952
|
-
]) n.has(r) && (r === "era" ? t.era !== s.era : parseInt(t[r], 10) !== parseInt(s[r], 10)) && (
|
|
962
|
+
]) n.has(r) && (r === "era" ? t.era !== s.era : parseInt(t[r], 10) !== parseInt(s[r], 10)) && (J.value[e][r] = s[r]);
|
|
953
963
|
return r ? o.hour(+r.hour).minute(+r.minute).second(+r.second) : o;
|
|
954
964
|
}
|
|
955
965
|
let r = n.has("day") ? parseInt(t.day, 10) : 1, i = n.has("month") ? parseInt(t.month, 10) : 1, a = parseInt(t.year, 10);
|
|
956
966
|
if (r < 1 || r > 31 || i < 1 || i > 12 || a < 1e3 || a > 9999) return null;
|
|
957
967
|
let o = t.year.padStart(4, "0"), s = String(i).padStart(2, "0"), c = String(r).padStart(2, "0"), l = "", u = "";
|
|
958
|
-
if (
|
|
959
|
-
let e =
|
|
968
|
+
if (M.value) {
|
|
969
|
+
let e = Br(t);
|
|
960
970
|
if (!e) return null;
|
|
961
971
|
l = `T${e.hour}:${e.minute}:${e.second}`, u = "THH:mm:ss";
|
|
962
972
|
}
|
|
963
|
-
let
|
|
964
|
-
if (!
|
|
965
|
-
let t =
|
|
966
|
-
|
|
973
|
+
let d = `${o}-${s}-${c}${l}`, f = w(d, E + u, !0);
|
|
974
|
+
if (!f.isValid()) {
|
|
975
|
+
let t = w(`${o}-${s}-01`, E, !0).endOf("month").date(), n = Math.min(r, t), i = `${o}-${s}-${String(n).padStart(2, "0")}${l}`;
|
|
976
|
+
f = w(i, E + u, !0), J.value[e].day = String(n).padStart(2, "0");
|
|
967
977
|
}
|
|
968
|
-
return
|
|
969
|
-
},
|
|
970
|
-
if (
|
|
978
|
+
return f.isValid() ? f : null;
|
|
979
|
+
}, Br = (e) => {
|
|
980
|
+
if (D.ampm && e.hour) {
|
|
971
981
|
let t = parseInt(e.hour, 10);
|
|
972
982
|
if (t < 1 || t > 12) return null;
|
|
973
983
|
}
|
|
974
|
-
let t = String(
|
|
984
|
+
let t = String(Sr(e)).padStart(2, "0"), n = (e.minute || "0").padStart(2, "0"), r = ((D.seconds ? e.second : "") || "0").padStart(2, "0");
|
|
975
985
|
return parseInt(t, 10) > 23 || parseInt(n, 10) > 59 || parseInt(r, 10) > 59 ? null : {
|
|
976
986
|
hour: t,
|
|
977
987
|
minute: n,
|
|
978
988
|
second: r
|
|
979
989
|
};
|
|
980
|
-
},
|
|
981
|
-
let t =
|
|
982
|
-
return
|
|
990
|
+
}, Vr = (e) => {
|
|
991
|
+
let t = Y();
|
|
992
|
+
return P.value ? {
|
|
983
993
|
...t,
|
|
984
|
-
...
|
|
985
|
-
} : (
|
|
986
|
-
},
|
|
987
|
-
if (
|
|
988
|
-
let t =
|
|
989
|
-
return n && t.isBefore(n, "day") && (t =
|
|
994
|
+
...xn(e)
|
|
995
|
+
} : (T && V.value ? Yn(t, e) : (K.value.has("day") && (t.day = e.format("DD")), K.value.has("month") && (t.month = e.format("MM")), t.year = e.format("YYYY")), M.value && (xr(t, e.hour()), t.minute = e.format("mm"), t.second = D.seconds ? e.format("ss") : ""), t);
|
|
996
|
+
}, Hr = (e) => {
|
|
997
|
+
if (P.value) {
|
|
998
|
+
let t = p(e), n = z.value ? R(z.value) : null, r = B.value ? R(B.value) : null;
|
|
999
|
+
return n && t.isBefore(n, "day") && (t = p(n), t.isBefore(n, "day") && (t = t.add(1, "week"))), r && t.add(6, "day").isAfter(r, "day") && (t = p(r), t.add(6, "day").isAfter(r, "day") && (t = t.subtract(1, "week"))), t.isSame(p(e), "day") || W(t) ? null : t;
|
|
990
1000
|
}
|
|
991
|
-
let t = (t, n) =>
|
|
1001
|
+
let t = (t, n) => M.value && !n ? t.hour(e.hour()).minute(e.minute()).second(e.second()) : t, n = !!(T && F.value && N.value), r = n ? "day" : Yt.value, i = N.value ? r : M.value ? "minute" : "day", a = e, o = z.value, s = B.value;
|
|
992
1002
|
if (o) {
|
|
993
|
-
let e =
|
|
994
|
-
a.isBefore(n,
|
|
1003
|
+
let e = dn(o), n = R(o);
|
|
1004
|
+
a.isBefore(n, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n : t(n, e));
|
|
995
1005
|
}
|
|
996
1006
|
if (s) {
|
|
997
|
-
let e =
|
|
998
|
-
a.isAfter(i,
|
|
1007
|
+
let e = dn(s), i = R(s);
|
|
1008
|
+
a.isAfter(i, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n ? i : i.startOf(Yt.value) : t(i, e));
|
|
999
1009
|
}
|
|
1000
|
-
return a.isSame(e, i) ||
|
|
1010
|
+
return a.isSame(e, i) || W(a) ? null : a;
|
|
1001
1011
|
}, Z = (e) => {
|
|
1002
|
-
|
|
1003
|
-
},
|
|
1004
|
-
let t =
|
|
1005
|
-
return
|
|
1006
|
-
},
|
|
1007
|
-
if (
|
|
1012
|
+
O("error", e);
|
|
1013
|
+
}, Ur = (e) => {
|
|
1014
|
+
let t = J.value[e], n = String(Sr(t)).padStart(2, "0"), r = (t.minute || "0").padStart(2, "0");
|
|
1015
|
+
return D.seconds ? `${n}:${r}:${(t.second || "0").padStart(2, "0")}` : `${n}:${r}`;
|
|
1016
|
+
}, Wr = b(void 0), Q = (e) => {
|
|
1017
|
+
if (O("update:modelValue", e), !M.value) return;
|
|
1008
1018
|
let t;
|
|
1009
|
-
t = e === null ? null : Array.isArray(e) ? e.map((e, t) =>
|
|
1019
|
+
t = e === null ? null : Array.isArray(e) ? e.map((e, t) => Ur(t === 0 ? "start" : "end")) : Ur("start"), Wr.value = t, O("update:time", t);
|
|
1010
1020
|
}, $ = (e = {}) => {
|
|
1011
|
-
let t = !!e.finalize, n =
|
|
1012
|
-
if (!
|
|
1021
|
+
let t = !!e.finalize, n = lr("start");
|
|
1022
|
+
if (!D.range) {
|
|
1013
1023
|
if (n === "empty") {
|
|
1014
1024
|
Q(null);
|
|
1015
1025
|
return;
|
|
1016
1026
|
}
|
|
1017
1027
|
if (n === "partial") return;
|
|
1018
|
-
let e =
|
|
1028
|
+
let e = zr("start");
|
|
1019
1029
|
if (!e) return;
|
|
1020
|
-
if (
|
|
1030
|
+
if (W(e)) {
|
|
1021
1031
|
if (!t) return;
|
|
1022
|
-
let n = H(e), r =
|
|
1032
|
+
let n = H(e), r = Hr(e);
|
|
1023
1033
|
if (r) {
|
|
1024
1034
|
let e = H(r);
|
|
1025
|
-
|
|
1035
|
+
J.value.start = Vr(r), Q(e), Z({
|
|
1026
1036
|
code: "disabled_date",
|
|
1027
1037
|
original: n,
|
|
1028
1038
|
normalized: e
|
|
1029
1039
|
});
|
|
1030
|
-
} else
|
|
1040
|
+
} else J.value.start = Y(), Q(null), Z({
|
|
1031
1041
|
code: "disabled_date",
|
|
1032
1042
|
original: n,
|
|
1033
1043
|
normalized: null
|
|
@@ -1037,27 +1047,27 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
1037
1047
|
Q(H(e));
|
|
1038
1048
|
return;
|
|
1039
1049
|
}
|
|
1040
|
-
let r =
|
|
1050
|
+
let r = lr("end");
|
|
1041
1051
|
if (n === "empty" && r === "empty") {
|
|
1042
1052
|
Q([]);
|
|
1043
1053
|
return;
|
|
1044
1054
|
}
|
|
1045
1055
|
if (n === "partial" || r === "partial" || n === "empty") return;
|
|
1046
|
-
let i =
|
|
1056
|
+
let i = zr("start");
|
|
1047
1057
|
if (!i) return;
|
|
1048
|
-
let a = r === "empty" ? null :
|
|
1049
|
-
if (
|
|
1058
|
+
let a = r === "empty" ? null : zr("end"), o = H(i), s = a ? H(a) : null, c = i, l = !1;
|
|
1059
|
+
if (W(i)) {
|
|
1050
1060
|
if (!t) return;
|
|
1051
|
-
let e =
|
|
1061
|
+
let e = Hr(i), n = s ? [o, s] : [o];
|
|
1052
1062
|
if (!e) {
|
|
1053
|
-
|
|
1063
|
+
J.value.start = Y(), J.value.end = Y(), Q([]), Z({
|
|
1054
1064
|
code: "disabled_range_start",
|
|
1055
1065
|
original: n,
|
|
1056
1066
|
normalized: []
|
|
1057
1067
|
});
|
|
1058
1068
|
return;
|
|
1059
1069
|
}
|
|
1060
|
-
if (c = e, l = !0,
|
|
1070
|
+
if (c = e, l = !0, J.value.start = Vr(e), !a) {
|
|
1061
1071
|
let t = [H(e)];
|
|
1062
1072
|
Q(t), Z({
|
|
1063
1073
|
code: "disabled_range_start",
|
|
@@ -1071,13 +1081,13 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
1071
1081
|
Q([H(c)]);
|
|
1072
1082
|
return;
|
|
1073
1083
|
}
|
|
1074
|
-
let u = a,
|
|
1075
|
-
if (
|
|
1084
|
+
let u = a, d = !1;
|
|
1085
|
+
if (W(a)) {
|
|
1076
1086
|
if (!t) return;
|
|
1077
|
-
let e =
|
|
1087
|
+
let e = Hr(a), n = [o, s];
|
|
1078
1088
|
if (!e) {
|
|
1079
1089
|
let e = [H(c)];
|
|
1080
|
-
|
|
1090
|
+
J.value.end = Y(), Q(e), l && Z({
|
|
1081
1091
|
code: "disabled_range_start",
|
|
1082
1092
|
original: n,
|
|
1083
1093
|
normalized: e
|
|
@@ -1088,16 +1098,16 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
1088
1098
|
});
|
|
1089
1099
|
return;
|
|
1090
1100
|
}
|
|
1091
|
-
u = e,
|
|
1101
|
+
u = e, d = !0, J.value.end = Vr(e);
|
|
1092
1102
|
}
|
|
1093
|
-
if (u.isBefore(c,
|
|
1103
|
+
if (u.isBefore(c, M.value ? "second" : "day")) {
|
|
1094
1104
|
if (!t) return;
|
|
1095
|
-
let e = [H(c), H(u)], n = [H(u), H(c)], r = { ...
|
|
1096
|
-
|
|
1105
|
+
let e = [H(c), H(u)], n = [H(u), H(c)], r = { ...J.value.start };
|
|
1106
|
+
J.value.start = { ...J.value.end }, J.value.end = r, X(), Q(n), l && Z({
|
|
1097
1107
|
code: "disabled_range_start",
|
|
1098
1108
|
original: [o, s],
|
|
1099
1109
|
normalized: n
|
|
1100
|
-
}),
|
|
1110
|
+
}), d && Z({
|
|
1101
1111
|
code: "disabled_range_end",
|
|
1102
1112
|
original: [o, s],
|
|
1103
1113
|
normalized: n
|
|
@@ -1108,224 +1118,200 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
1108
1118
|
});
|
|
1109
1119
|
return;
|
|
1110
1120
|
}
|
|
1111
|
-
let
|
|
1112
|
-
Q(
|
|
1121
|
+
let f = [H(c), H(u)];
|
|
1122
|
+
Q(f), l && Z({
|
|
1113
1123
|
code: "disabled_range_start",
|
|
1114
1124
|
original: s ? [o, s] : [o],
|
|
1115
|
-
normalized:
|
|
1116
|
-
}),
|
|
1125
|
+
normalized: f
|
|
1126
|
+
}), d && Z({
|
|
1117
1127
|
code: "disabled_range_end",
|
|
1118
1128
|
original: [o, s],
|
|
1119
|
-
normalized:
|
|
1129
|
+
normalized: f
|
|
1120
1130
|
});
|
|
1121
1131
|
};
|
|
1122
|
-
return
|
|
1132
|
+
return tt(() => {
|
|
1123
1133
|
document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
1124
|
-
}), (t, n) => (
|
|
1125
|
-
id:
|
|
1134
|
+
}), (t, n) => (y(), qe(Pe, v({
|
|
1135
|
+
id: d.id,
|
|
1126
1136
|
class: "bb-date-picker-input",
|
|
1127
|
-
clearable:
|
|
1128
|
-
compact:
|
|
1129
|
-
description:
|
|
1130
|
-
disabled:
|
|
1131
|
-
errors:
|
|
1132
|
-
"has-errors":
|
|
1133
|
-
"has-value":
|
|
1134
|
-
"has-warnings":
|
|
1135
|
-
"hide-label":
|
|
1136
|
-
hint:
|
|
1137
|
-
"input-align":
|
|
1138
|
-
label:
|
|
1139
|
-
"label-align":
|
|
1140
|
-
"label-mode":
|
|
1141
|
-
"label-position":
|
|
1142
|
-
layout:
|
|
1143
|
-
loading:
|
|
1144
|
-
name:
|
|
1145
|
-
passthrough:
|
|
1146
|
-
readonly:
|
|
1147
|
-
reverse:
|
|
1148
|
-
"show-asterisk":
|
|
1149
|
-
"show-hint":
|
|
1150
|
-
warnings:
|
|
1151
|
-
},
|
|
1152
|
-
label:
|
|
1153
|
-
input:
|
|
1137
|
+
clearable: d.clearable && Gt.value,
|
|
1138
|
+
compact: S(A).compact,
|
|
1139
|
+
description: d.description,
|
|
1140
|
+
disabled: d.disabled,
|
|
1141
|
+
errors: S(Ot),
|
|
1142
|
+
"has-errors": d.hasErrors,
|
|
1143
|
+
"has-value": Gt.value,
|
|
1144
|
+
"has-warnings": d.hasWarnings,
|
|
1145
|
+
"hide-label": d.hideLabel,
|
|
1146
|
+
hint: d.hint,
|
|
1147
|
+
"input-align": d.inputAlign,
|
|
1148
|
+
label: d.label,
|
|
1149
|
+
"label-align": d.labelAlign,
|
|
1150
|
+
"label-mode": Kt.value,
|
|
1151
|
+
"label-position": d.labelPosition,
|
|
1152
|
+
layout: S(A).layout,
|
|
1153
|
+
loading: d.loading,
|
|
1154
|
+
name: d.name,
|
|
1155
|
+
passthrough: S(j),
|
|
1156
|
+
readonly: S(Mt),
|
|
1157
|
+
reverse: S(A).reverse,
|
|
1158
|
+
"show-asterisk": S(Dt),
|
|
1159
|
+
"show-hint": Wt.value,
|
|
1160
|
+
warnings: d.warnings
|
|
1161
|
+
}, S(j).forwardAttrs), Je({
|
|
1162
|
+
label: C((e) => [x(t.$slots, "label", $e(Ze(e)))]),
|
|
1163
|
+
input: C(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [Ye(Fe, {
|
|
1154
1164
|
ref_key: "wrapper",
|
|
1155
1165
|
ref: L,
|
|
1156
|
-
active:
|
|
1157
|
-
"append:icon":
|
|
1158
|
-
class:
|
|
1159
|
-
clearable:
|
|
1160
|
-
compact:
|
|
1161
|
-
disabled:
|
|
1166
|
+
active: It.value,
|
|
1167
|
+
"append:icon": S(D)["append:icon"],
|
|
1168
|
+
class: Qe(["bb-date-picker-input__field", { "bb-date-picker-input__field--range": d.range }]),
|
|
1169
|
+
clearable: d.clearable && !S(fe)(S(jt)),
|
|
1170
|
+
compact: S(A).compact,
|
|
1171
|
+
disabled: d.disabled,
|
|
1162
1172
|
"has-errors": i,
|
|
1163
|
-
"has-value":
|
|
1173
|
+
"has-value": Gt.value,
|
|
1164
1174
|
"has-warnings": a,
|
|
1165
|
-
loading:
|
|
1166
|
-
passthrough:
|
|
1167
|
-
"prepend:icon":
|
|
1168
|
-
readonly:
|
|
1169
|
-
variant:
|
|
1170
|
-
onClick:
|
|
1171
|
-
"onClick:clear":
|
|
1172
|
-
onFocusin:
|
|
1173
|
-
},
|
|
1174
|
-
"prepend:outer":
|
|
1175
|
-
prepend:
|
|
1176
|
-
append:
|
|
1175
|
+
loading: d.loading,
|
|
1176
|
+
passthrough: S(j),
|
|
1177
|
+
"prepend:icon": S(D)["prepend:icon"],
|
|
1178
|
+
readonly: S(Mt),
|
|
1179
|
+
variant: d.variant,
|
|
1180
|
+
onClick: an,
|
|
1181
|
+
"onClick:clear": Fn,
|
|
1182
|
+
onFocusin: vn
|
|
1183
|
+
}, Je({
|
|
1184
|
+
"prepend:outer": C(() => [x(t.$slots, "prepend:outer")]),
|
|
1185
|
+
prepend: C(() => [x(t.$slots, "prepend")]),
|
|
1186
|
+
append: C(() => [cn.value ? h("", !0) : (y(), qe(Ae, {
|
|
1177
1187
|
key: 0,
|
|
1178
|
-
"active-segment":
|
|
1179
|
-
adaptive:
|
|
1180
|
-
ampm:
|
|
1188
|
+
"active-segment": Dn.value,
|
|
1189
|
+
adaptive: S(A).adaptive,
|
|
1190
|
+
ampm: d.ampm,
|
|
1181
1191
|
anchor: L.value,
|
|
1182
|
-
clearable:
|
|
1183
|
-
disabled:
|
|
1184
|
-
"first-day-of-week":
|
|
1185
|
-
floating:
|
|
1186
|
-
label:
|
|
1187
|
-
max:
|
|
1188
|
-
min:
|
|
1189
|
-
"model-value":
|
|
1190
|
-
"number-of-months":
|
|
1191
|
-
"off-canvas-props":
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1192
|
+
clearable: d.clearable,
|
|
1193
|
+
disabled: d.disabled,
|
|
1194
|
+
"first-day-of-week": d.firstDayOfWeek,
|
|
1195
|
+
floating: S(A).floating,
|
|
1196
|
+
label: Nn.value,
|
|
1197
|
+
max: d.max,
|
|
1198
|
+
min: d.min,
|
|
1199
|
+
"model-value": Pn.value,
|
|
1200
|
+
"number-of-months": d.numberOfMonths,
|
|
1201
|
+
"off-canvas-props": d.offCanvasProps,
|
|
1202
|
+
open: S(Ht),
|
|
1203
|
+
pt: S(j).forward(qt, S(je).states),
|
|
1204
|
+
range: S(D).range,
|
|
1205
|
+
readonly: S(Mt),
|
|
1206
|
+
seconds: d.seconds,
|
|
1207
|
+
selectable: d.selectable,
|
|
1208
|
+
step: d.step,
|
|
1209
|
+
time: d.time,
|
|
1210
|
+
"transition-duration": d.transitionDuration,
|
|
1211
|
+
type: d.type,
|
|
1212
|
+
utc: d.utc,
|
|
1213
|
+
onGridPick: Sn["onUpdate:modelValue"],
|
|
1214
|
+
onHidden: n[1] ||= (e) => S(O)("hidden"),
|
|
1215
|
+
onHide: Vt,
|
|
1216
|
+
onShow: Bt,
|
|
1217
|
+
onShown: n[2] ||= (e) => S(O)("shown"),
|
|
1218
|
+
onTimePick: On,
|
|
1219
|
+
"onUpdate:open": S(Ut)
|
|
1220
|
+
}, Je({
|
|
1221
|
+
activator: C(({ props: e }) => [_("button", v({
|
|
1222
|
+
"aria-disabled": S(Nt) || void 0,
|
|
1211
1223
|
class: "bb-segmented-field__activator",
|
|
1212
|
-
disabled:
|
|
1224
|
+
disabled: d.disabled || d.readonly,
|
|
1213
1225
|
type: "button"
|
|
1214
|
-
},
|
|
1226
|
+
}, v(e, S(j).activator)), [Ye(Ne, {
|
|
1215
1227
|
class: "bb-segmented-field__trigger-icon",
|
|
1216
|
-
icon:
|
|
1217
|
-
}, null, 8, ["icon"])], 16,
|
|
1218
|
-
day:
|
|
1219
|
-
"day:append":
|
|
1228
|
+
icon: S(Et)
|
|
1229
|
+
}, null, 8, ["icon"])], 16, bt)]),
|
|
1230
|
+
day: C((e) => [x(t.$slots, "day", $e(Ze(e)))]),
|
|
1231
|
+
"day:append": C((e) => [x(t.$slots, "day:append", $e(Ze(e)))]),
|
|
1220
1232
|
_: 2
|
|
1221
|
-
}, [
|
|
1233
|
+
}, [rt(Ft(), (e) => ({
|
|
1222
1234
|
name: e,
|
|
1223
|
-
fn:
|
|
1224
|
-
}))]), 1032, [
|
|
1225
|
-
"active-segment",
|
|
1226
|
-
"adaptive",
|
|
1227
|
-
"ampm",
|
|
1228
|
-
"anchor",
|
|
1229
|
-
"clearable",
|
|
1230
|
-
"disabled",
|
|
1231
|
-
"first-day-of-week",
|
|
1232
|
-
"floating",
|
|
1233
|
-
"label",
|
|
1234
|
-
"max",
|
|
1235
|
-
"min",
|
|
1236
|
-
"model-value",
|
|
1237
|
-
"number-of-months",
|
|
1238
|
-
"off-canvas-props",
|
|
1239
|
-
"pt",
|
|
1240
|
-
"range",
|
|
1241
|
-
"readonly",
|
|
1242
|
-
"seconds",
|
|
1243
|
-
"selectable",
|
|
1244
|
-
"step",
|
|
1245
|
-
"time",
|
|
1246
|
-
"transition-duration",
|
|
1247
|
-
"type",
|
|
1248
|
-
"utc",
|
|
1249
|
-
"onGridPick"
|
|
1250
|
-
])), b(t.$slots, "append", {}, () => [t.$slots.suffix ? (v(), h("span", _({
|
|
1235
|
+
fn: C((n) => [x(t.$slots, e, $e(Ze(n)))])
|
|
1236
|
+
}))]), 1032, /* @__PURE__ */ "active-segment.adaptive.ampm.anchor.clearable.disabled.first-day-of-week.floating.label.max.min.model-value.number-of-months.off-canvas-props.open.pt.range.readonly.seconds.selectable.step.time.transition-duration.type.utc.onGridPick.onUpdate:open".split("."))), x(t.$slots, "append", {}, () => [t.$slots.suffix ? (y(), g("span", v({
|
|
1251
1237
|
key: 0,
|
|
1252
1238
|
class: "bb-field-input__suffix"
|
|
1253
|
-
},
|
|
1254
|
-
"append:outer":
|
|
1255
|
-
default:
|
|
1256
|
-
class:
|
|
1257
|
-
"bb-segmented-field__fields--empty":
|
|
1258
|
-
"bb-segmented-field__fields--range":
|
|
1239
|
+
}, S(j).suffix), [x(t.$slots, "suffix")], 16)) : h("", !0)])]),
|
|
1240
|
+
"append:outer": C(() => [x(t.$slots, "append:outer")]),
|
|
1241
|
+
default: C(() => [_("div", {
|
|
1242
|
+
class: Qe(["bb-segmented-field__fields", {
|
|
1243
|
+
"bb-segmented-field__fields--empty": Mr.value,
|
|
1244
|
+
"bb-segmented-field__fields--range": d.range
|
|
1259
1245
|
}]),
|
|
1260
|
-
style:
|
|
1261
|
-
}, [
|
|
1246
|
+
style: et({ "--fields-min-ch": S(ar) })
|
|
1247
|
+
}, [Mr.value ? (y(), g("span", {
|
|
1262
1248
|
key: 0,
|
|
1263
1249
|
"aria-hidden": "true",
|
|
1264
1250
|
class: "bb-segmented-field__placeholder",
|
|
1265
|
-
onClick: n[0] ||= (...e) =>
|
|
1266
|
-
},
|
|
1267
|
-
class:
|
|
1268
|
-
dir:
|
|
1269
|
-
}, [(
|
|
1270
|
-
n.field === "week" ? (
|
|
1251
|
+
onClick: n[0] ||= (...e) => S(cr) && S(cr)(...e)
|
|
1252
|
+
}, it(jr.value), 1)) : h("", !0), (y(!0), g(Ke, null, rt(Xn.value, (t, n) => (y(), g(Ke, { key: t.key }, [_("span", {
|
|
1253
|
+
class: Qe(["bb-segmented-field__run", `bb-segmented-field__run--${t.kind}`]),
|
|
1254
|
+
dir: $n(t)
|
|
1255
|
+
}, [(y(!0), g(Ke, null, rt(t.items, ({ descriptor: n, index: a }, s) => (y(), g(Ke, { key: S(nr)(n) }, [
|
|
1256
|
+
n.field === "week" ? (y(), g("span", {
|
|
1271
1257
|
key: 0,
|
|
1272
1258
|
"aria-hidden": "true",
|
|
1273
1259
|
class: "bb-segmented-field__separator bb-segmented-field__week-prefix",
|
|
1274
|
-
onClick: (e) =>
|
|
1275
|
-
}, "W", 8,
|
|
1276
|
-
|
|
1260
|
+
onClick: (e) => S(sr)(n, { select: !0 })
|
|
1261
|
+
}, "W", 8, ht)) : h("", !0),
|
|
1262
|
+
_("span", {
|
|
1277
1263
|
class: "bb-segmented-field__field-sizer",
|
|
1278
|
-
"data-value":
|
|
1279
|
-
}, [
|
|
1280
|
-
id: a === 0 ? r :
|
|
1264
|
+
"data-value": S(ir)(n)
|
|
1265
|
+
}, [lt(_("input", v({
|
|
1266
|
+
id: a === 0 ? r : _r(n, r),
|
|
1281
1267
|
ref_for: !0,
|
|
1282
|
-
ref: (e) =>
|
|
1283
|
-
"aria-describedby":
|
|
1284
|
-
"aria-disabled":
|
|
1268
|
+
ref: (e) => S(tr)[S(nr)(n)] = e,
|
|
1269
|
+
"aria-describedby": $t(o, r),
|
|
1270
|
+
"aria-disabled": d.disabled || void 0,
|
|
1285
1271
|
"aria-invalid": i ? "true" : void 0,
|
|
1286
|
-
"aria-label":
|
|
1287
|
-
"aria-readonly":
|
|
1288
|
-
autocomplete:
|
|
1289
|
-
autofocus:
|
|
1272
|
+
"aria-label": br(n),
|
|
1273
|
+
"aria-readonly": ln.value || void 0,
|
|
1274
|
+
autocomplete: S(A).autocomplete,
|
|
1275
|
+
autofocus: d.autofocus && a === 0,
|
|
1290
1276
|
class: ["bb-segmented-field__input", [`bb-segmented-field__input--${n.field}`, `bb-segmented-field__input--${n.segment}`]],
|
|
1291
|
-
disabled:
|
|
1292
|
-
inputmode:
|
|
1293
|
-
maxlength:
|
|
1294
|
-
name:
|
|
1295
|
-
readonly:
|
|
1296
|
-
required:
|
|
1297
|
-
"aria-required":
|
|
1298
|
-
tabindex:
|
|
1277
|
+
disabled: d.disabled,
|
|
1278
|
+
inputmode: un(n.field),
|
|
1279
|
+
maxlength: Gn(n.field),
|
|
1280
|
+
name: vr(n),
|
|
1281
|
+
readonly: ln.value,
|
|
1282
|
+
required: S(kt),
|
|
1283
|
+
"aria-required": S(At),
|
|
1284
|
+
tabindex: Un(a) ? 0 : -1,
|
|
1299
1285
|
type: "text",
|
|
1300
|
-
value:
|
|
1301
|
-
onBlur: (e) =>
|
|
1302
|
-
onFocus: (e) =>
|
|
1303
|
-
onInput: (e) =>
|
|
1304
|
-
onKeydown: (e) =>
|
|
1305
|
-
onPaste: (e) =>
|
|
1306
|
-
}, { ref_for: !0 },
|
|
1307
|
-
s < t.items.length - 1 ? (
|
|
1286
|
+
value: S(rr)(S(J)[n.segment][n.field]),
|
|
1287
|
+
onBlur: (e) => S(pr)(n),
|
|
1288
|
+
onFocus: (e) => En(n, e),
|
|
1289
|
+
onInput: (e) => hr(n, e),
|
|
1290
|
+
onKeydown: (e) => sn(n, e),
|
|
1291
|
+
onPaste: (e) => S(mr)(n, e)
|
|
1292
|
+
}, { ref_for: !0 }, v(S(j).controlAttrs, S(j).input)), null, 16, _t), [[S(e)]])], 8, gt),
|
|
1293
|
+
s < t.items.length - 1 ? (y(), g("span", {
|
|
1308
1294
|
key: 1,
|
|
1309
1295
|
"aria-hidden": "true",
|
|
1310
1296
|
class: "bb-segmented-field__separator",
|
|
1311
1297
|
role: "presentation",
|
|
1312
|
-
onClick: (e) =>
|
|
1313
|
-
},
|
|
1314
|
-
], 64))), 128))], 10,
|
|
1298
|
+
onClick: (e) => S(sr)(q.value[a + 1], { select: !0 })
|
|
1299
|
+
}, it(er(q.value[a], q.value[a + 1])), 9, vt)) : h("", !0)
|
|
1300
|
+
], 64))), 128))], 10, mt), n < Xn.value.length - 1 ? (y(), g("span", {
|
|
1315
1301
|
key: 0,
|
|
1316
1302
|
"aria-hidden": "true",
|
|
1317
|
-
class:
|
|
1303
|
+
class: Qe(["bb-segmented-field__separator", { "bb-segmented-field__separator--range": q.value[Zn(t)].segment !== q.value[Zn(t) + 1].segment }]),
|
|
1318
1304
|
role: "presentation",
|
|
1319
|
-
onClick: (e) =>
|
|
1320
|
-
},
|
|
1321
|
-
id:
|
|
1305
|
+
onClick: (e) => S(sr)(q.value[Zn(t) + 1], { select: !0 })
|
|
1306
|
+
}, it(er(q.value[Zn(t)], q.value[Zn(t) + 1])), 11, yt)) : h("", !0)], 64))), 128))], 6), _("span", {
|
|
1307
|
+
id: Qt(r),
|
|
1322
1308
|
class: "bb-date-picker-input__accessible-description",
|
|
1323
1309
|
hidden: ""
|
|
1324
|
-
},
|
|
1310
|
+
}, it(S(I)("datePickerInput.dateFormat")) + " " + it(kr.value), 9, xt)]),
|
|
1325
1311
|
_: 2
|
|
1326
1312
|
}, [t.$slots.prefix ? {
|
|
1327
1313
|
name: "prefix",
|
|
1328
|
-
fn:
|
|
1314
|
+
fn: C(() => [x(t.$slots, "prefix")]),
|
|
1329
1315
|
key: "0"
|
|
1330
1316
|
} : void 0]), 1032, [
|
|
1331
1317
|
"active",
|
|
@@ -1346,7 +1332,7 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
1346
1332
|
_: 2
|
|
1347
1333
|
}, [t.$slots.description ? {
|
|
1348
1334
|
name: "description",
|
|
1349
|
-
fn:
|
|
1335
|
+
fn: C((e) => [x(t.$slots, "description", $e(Ze(e)))]),
|
|
1350
1336
|
key: "0"
|
|
1351
1337
|
} : void 0]), 1040, [
|
|
1352
1338
|
"id",
|
|
@@ -1377,4 +1363,4 @@ var ft = ["dir"], pt = ["onClick"], mt = ["data-value"], ht = [
|
|
|
1377
1363
|
]));
|
|
1378
1364
|
}
|
|
1379
1365
|
});
|
|
1380
|
-
export {
|
|
1366
|
+
export { Ct as default };
|