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/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -7,31 +7,33 @@ import { useConfigDefaults as a } from "../../composables/useConfigDefaults.js";
|
|
|
7
7
|
import { useFormBinding as o } from "../../composables/useFormBinding.js";
|
|
8
8
|
import { useClosingInert as s } from "../../composables/useClosingInert.js";
|
|
9
9
|
import { useLocale as ee } from "../../composables/useLocale.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import fe from "../../
|
|
19
|
-
import pe from "
|
|
20
|
-
import me from "../
|
|
21
|
-
import
|
|
22
|
-
import ge from "../
|
|
23
|
-
import _e from "../
|
|
24
|
-
import ve from "../
|
|
25
|
-
import ye from "../
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
10
|
+
import { useOpenModel as te } from "../../composables/useOpenModel.js";
|
|
11
|
+
import { useLogger as ne } from "../../composables/useLogger.js";
|
|
12
|
+
import { useEscapeStackEntry as re } from "../../composables/useEscapeStackEntry.js";
|
|
13
|
+
import { useMobile as ie } from "../../composables/useMobile.js";
|
|
14
|
+
import { SEGMENTED_CONTROL_NATIVE_ATTRS as ae, formControlPtActive as oe, usePassthrough as se, variantPt as c } from "../../composables/usePassthrough.js";
|
|
15
|
+
import { fieldRuns as ce, useSegmentedFields as le } from "../../composables/useSegmentedFields.js";
|
|
16
|
+
import { isEmpty as ue } from "../../utilities/functions/empty.js";
|
|
17
|
+
import { isNotEmpty as de } from "../../utilities/functions/isNotEmpty.js";
|
|
18
|
+
import { transitions as fe } from "../../utilities/misc/transitions.js";
|
|
19
|
+
import pe from "../../assets/svgs/clock.svg_raw.js";
|
|
20
|
+
import me from "../BbIcon/BbIcon.vue.js";
|
|
21
|
+
import he from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
22
|
+
import { BB_OFF_CANVAS_PT as ge } from "../BbOffCanvas/types.js";
|
|
23
|
+
import _e from "../CommonField/CommonField.vue.js";
|
|
24
|
+
import ve from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
25
|
+
import ye from "../CommonPopover/CommonPopover.vue.js";
|
|
26
|
+
import be from "../CommonTimeSelector/CommonTimeSelector.vue.js";
|
|
27
|
+
import { useMeridiem as xe } from "../CommonTimeSelector/useMeridiem.js";
|
|
28
|
+
import { spokenTimeOf as Se } from "../BbCalendar/useDayjsLocale.js";
|
|
29
|
+
import { useHydrated as Ce } from "../../composables/useHydrated.js";
|
|
30
|
+
import { localeOf as we } from "../../utilities/calendar/index.js";
|
|
30
31
|
import { BB_TIME_PICKER_INPUT_PT as l } from "./types.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
32
|
+
import { useInternalIcon as Te } from "../../composables/useInternalIcon.js";
|
|
33
|
+
import { Fragment as u, computed as d, createBlock as Ee, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as De, createVNode as h, defineComponent as Oe, guardReactiveProps as ke, mergeProps as g, normalizeClass as _, normalizeProps as v, normalizeStyle as Ae, onBeforeUnmount as je, onDeactivated as Me, openBlock as y, ref as b, renderList as Ne, renderSlot as x, toDisplayString as S, unref as C, useAttrs as Pe, watch as Fe, withCtx as w, withDirectives as Ie, withModifiers as Le } from "vue";
|
|
34
|
+
import { createReusableTemplate as Re } from "@vueuse/core";
|
|
33
35
|
// src/components/BbTimePickerInput/BbTimePickerInput.vue?vue&type=script&setup=true&lang.ts
|
|
34
|
-
var
|
|
36
|
+
var ze = ["dir"], Be = ["data-value"], Ve = [
|
|
35
37
|
"id",
|
|
36
38
|
"aria-describedby",
|
|
37
39
|
"aria-disabled",
|
|
@@ -54,13 +56,13 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
54
56
|
"onInput",
|
|
55
57
|
"onKeydown",
|
|
56
58
|
"onPaste"
|
|
57
|
-
],
|
|
59
|
+
], He = ["onClick"], Ue = ["onClick"], We = [
|
|
58
60
|
"aria-controls",
|
|
59
61
|
"aria-disabled",
|
|
60
62
|
"aria-expanded",
|
|
61
63
|
"aria-label",
|
|
62
64
|
"disabled"
|
|
63
|
-
],
|
|
65
|
+
], Ge = ["id"], Ke = /*@__PURE__*/ Oe({
|
|
64
66
|
mixins: [c(l)],
|
|
65
67
|
inheritAttrs: !1,
|
|
66
68
|
__name: "BbTimePickerInput",
|
|
@@ -247,6 +249,7 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
247
249
|
"pt:item:errors": {},
|
|
248
250
|
"pt:item:open": {},
|
|
249
251
|
"pt:item:loading": {},
|
|
252
|
+
open: { type: Boolean },
|
|
250
253
|
pt: {},
|
|
251
254
|
adaptive: {
|
|
252
255
|
type: Boolean,
|
|
@@ -309,6 +312,7 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
309
312
|
"show",
|
|
310
313
|
"shown",
|
|
311
314
|
"hide",
|
|
315
|
+
"update:open",
|
|
312
316
|
"hidden",
|
|
313
317
|
"active",
|
|
314
318
|
"error",
|
|
@@ -316,77 +320,77 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
316
320
|
"inactive",
|
|
317
321
|
"update:modelValue"
|
|
318
322
|
],
|
|
319
|
-
setup(c, { emit:
|
|
320
|
-
let
|
|
323
|
+
setup(c, { emit: Oe }) {
|
|
324
|
+
let Ke = c, qe = Oe, Je = Te("clock", pe), { props: T, emit: E, showAsterisk: Ye, errors: Xe, required: Ze, ariaRequired: Qe, model: $e, readonly: et, locked: tt } = o(Ke, qe, {
|
|
321
325
|
componentName: "BbTimePickerInput",
|
|
322
|
-
identifierFallback: () =>
|
|
326
|
+
identifierFallback: () => Ke.label,
|
|
323
327
|
leaveOn: "inactive"
|
|
324
328
|
});
|
|
325
329
|
process.env.NODE_ENV !== "production" && n("BbTimePickerInput", t("BbTimePickerInput"));
|
|
326
|
-
let
|
|
327
|
-
|
|
330
|
+
let nt = i(), { t: D } = ee(), rt = ne(), O = b(!1), it = b(!1), k = () => {
|
|
331
|
+
it.value = !1;
|
|
328
332
|
};
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}),
|
|
332
|
-
let
|
|
333
|
+
Me(() => {
|
|
334
|
+
X.value = !1, O.value ? Zt() : k();
|
|
335
|
+
}), je(k);
|
|
336
|
+
let at = d(() => T.persistentHint || it.value), A = d(() => de(T.modelValue)), j = a("BbTimePickerInput", T, {
|
|
333
337
|
labelMode: "outside",
|
|
334
338
|
adaptive: !0,
|
|
335
339
|
autocomplete: "off",
|
|
336
340
|
compact: !1,
|
|
337
341
|
reverse: !1
|
|
338
|
-
}),
|
|
342
|
+
}), ot = d(() => j.labelMode), M = se({
|
|
339
343
|
component: "BbTimePickerInput",
|
|
340
|
-
attrs:
|
|
341
|
-
controlAttrs:
|
|
342
|
-
props:
|
|
344
|
+
attrs: Pe(),
|
|
345
|
+
controlAttrs: ae,
|
|
346
|
+
props: T,
|
|
343
347
|
parts: l.parts,
|
|
344
348
|
states: l.states,
|
|
345
349
|
active: {
|
|
346
|
-
...
|
|
347
|
-
open: () =>
|
|
350
|
+
...oe(T, () => A.value),
|
|
351
|
+
open: () => X.value
|
|
348
352
|
},
|
|
349
353
|
variant: {
|
|
350
354
|
...l.variant,
|
|
351
|
-
current: () =>
|
|
355
|
+
current: () => T.variant ?? "outline"
|
|
352
356
|
}
|
|
353
|
-
}),
|
|
357
|
+
}), N = xe(), st = (e, t) => N.isPm(t) ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e, ct = (e) => {
|
|
354
358
|
let t = e >= 12 ? "PM" : "AM", n = e % 12;
|
|
355
359
|
return n === 0 && (n = 12), {
|
|
356
360
|
hour: String(n).padStart(2, "0"),
|
|
357
361
|
meridiem: t
|
|
358
362
|
};
|
|
359
|
-
},
|
|
360
|
-
|
|
361
|
-
},
|
|
362
|
-
id:
|
|
363
|
-
class: ["bb-time-picker-input__panel", { "bb-time-picker-input__panel--sheet":
|
|
364
|
-
inert:
|
|
365
|
-
},
|
|
366
|
-
let n = [e,
|
|
363
|
+
}, P = b(null), F = b(null), lt = (e) => {
|
|
364
|
+
F.value = e.el?.parentElement ?? null;
|
|
365
|
+
}, ut = b(null), dt = (e) => `btpi-description_${e}`, ft = (e) => `btpi-panel_${e}`, pt = (e) => g({
|
|
366
|
+
id: ft(e),
|
|
367
|
+
class: ["bb-time-picker-input__panel", { "bb-time-picker-input__panel--sheet": Z.value }],
|
|
368
|
+
inert: en.value
|
|
369
|
+
}, Z.value ? {} : M.panel ?? {}), mt = (e, t) => {
|
|
370
|
+
let n = [e, dt(t)].filter((e) => !!e?.trim()).flatMap((e) => e.split(/\s+/)).filter(Boolean);
|
|
367
371
|
return Array.from(new Set(n)).join(" ");
|
|
368
|
-
}, { isMobile:
|
|
369
|
-
let t =
|
|
372
|
+
}, { isMobile: I } = ie(), ht = d(() => T.disableWriting === "mobile" ? !I.value : T.disableWriting === "desktop" ? I.value : !T.disableWriting), gt = d(() => !!T.readonly || !ht.value), _t = (e) => ht.value ? z.value[e].kind === "enum" ? "none" : "numeric" : "none", vt = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, L = (e) => {
|
|
373
|
+
let t = vt.exec(e);
|
|
370
374
|
if (!t) return null;
|
|
371
375
|
let [, n, r] = t, i = parseInt(n, 10), a = parseInt(r, 10);
|
|
372
376
|
return i > 23 || a > 59 ? null : i * 60 + a;
|
|
373
377
|
};
|
|
374
|
-
for (let [e, t] of [["min",
|
|
375
|
-
let
|
|
378
|
+
for (let [e, t] of [["min", T.min], ["max", T.max]]) t && L(t) === null && rt.throw(`BbTimePickerInput: ${e} must be in the format HH:mm`);
|
|
379
|
+
let R = d(() => {
|
|
376
380
|
let e = ["hour", "minute"];
|
|
377
|
-
|
|
381
|
+
T.seconds && e.push("second"), T.ampm && e.push("meridiem");
|
|
378
382
|
let t = e.map((e) => ({
|
|
379
383
|
segment: "start",
|
|
380
384
|
field: e
|
|
381
385
|
}));
|
|
382
|
-
if (!
|
|
386
|
+
if (!T.range) return t;
|
|
383
387
|
let n = e.map((e) => ({
|
|
384
388
|
segment: "end",
|
|
385
389
|
field: e
|
|
386
390
|
}));
|
|
387
391
|
return [...t, ...n];
|
|
388
|
-
}),
|
|
389
|
-
hour:
|
|
392
|
+
}), z = d(() => ({
|
|
393
|
+
hour: T.ampm ? {
|
|
390
394
|
kind: "numeric",
|
|
391
395
|
maxLength: 2,
|
|
392
396
|
max: 12,
|
|
@@ -418,10 +422,10 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
418
422
|
autoAdvanceFrom: 6,
|
|
419
423
|
label: "Second"
|
|
420
424
|
},
|
|
421
|
-
meridiem:
|
|
422
|
-
})),
|
|
423
|
-
fieldOrder:
|
|
424
|
-
specs:
|
|
425
|
+
meridiem: N.fieldSpec.value
|
|
426
|
+
})), yt = (e) => z.value[e].kind === "numeric" ? void 0 : z.value[e].maxLength, bt = d(() => ce(R.value, (e) => e === "meridiem" ? "meridiem" : "time")), B = (e) => e.items.at(-1).index, xt = (e, t) => e.segment === t.segment ? t.field === "meridiem" ? " " : ":" : "–", { fields: V, fieldRefs: St, descriptorKey: Ct, emptyFieldGroup: wt, getSizedValue: Tt, minChars: Et, updateAllSizedValues: H, isOwnField: Dt, focusField: Ot, focusFirstField: kt, segmentStatus: U, onFieldInput: At, onFieldKeydown: jt, onFieldFocus: Mt, onFieldBlur: Nt, onFieldPaste: Pt, displayOf: Ft } = le({
|
|
427
|
+
fieldOrder: R,
|
|
428
|
+
specs: z,
|
|
425
429
|
segments: ["start", "end"],
|
|
426
430
|
fieldKeys: [
|
|
427
431
|
"hour",
|
|
@@ -431,345 +435,351 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
431
435
|
],
|
|
432
436
|
optionalGroups: [["second"]],
|
|
433
437
|
advanceKeys: [":", " "],
|
|
434
|
-
onDirty: () =>
|
|
435
|
-
numberingSystem: () =>
|
|
436
|
-
}),
|
|
438
|
+
onDirty: () => J({ finalize: !1 }),
|
|
439
|
+
numberingSystem: () => we(nt.locale).numberingSystem
|
|
440
|
+
}), It = (e, t) => {
|
|
437
441
|
if (e.field === "meridiem") {
|
|
438
|
-
let n =
|
|
439
|
-
r && r !== n.meridiem && (n.meridiem = r,
|
|
442
|
+
let n = V.value[e.segment], r = N.match(t.target.value, n.meridiem);
|
|
443
|
+
r && r !== n.meridiem && (n.meridiem = r, J({ finalize: !1 }));
|
|
440
444
|
}
|
|
441
|
-
|
|
445
|
+
At(e, t);
|
|
442
446
|
};
|
|
443
|
-
|
|
444
|
-
for (let n of Object.values(
|
|
445
|
-
|
|
447
|
+
N.onRelabel((e, t) => {
|
|
448
|
+
for (let n of Object.values(V.value)) n.meridiem === e && (n.meridiem = t);
|
|
449
|
+
H();
|
|
446
450
|
});
|
|
447
|
-
let
|
|
448
|
-
if (
|
|
449
|
-
},
|
|
451
|
+
let Lt = (e, t) => T.range ? `${t}-${e.segment}-${e.field}` : `${t}-${e.field}`, Rt = (e) => {
|
|
452
|
+
if (T.name) return T.range ? `${T.name}-${e.segment}-${e.field}` : `${T.name}-${e.field}`;
|
|
453
|
+
}, zt = {
|
|
450
454
|
hour: "datePickerInput.hourField",
|
|
451
455
|
minute: "datePickerInput.minuteField",
|
|
452
456
|
second: "datePickerInput.secondField",
|
|
453
457
|
meridiem: "datePickerInput.meridiemField"
|
|
454
|
-
},
|
|
455
|
-
let t =
|
|
456
|
-
return
|
|
457
|
-
},
|
|
458
|
-
let e =
|
|
459
|
-
return
|
|
460
|
-
}),
|
|
458
|
+
}, Bt = (e) => {
|
|
459
|
+
let t = D(zt[e.field]).value;
|
|
460
|
+
return T.range ? D(e.segment === "start" ? "datePickerInput.startFieldLabel" : "datePickerInput.endFieldLabel", t).value : t;
|
|
461
|
+
}, Vt = d(() => {
|
|
462
|
+
let e = D(T.seconds ? "datePickerInput.timeFormatSeconds" : "datePickerInput.timeFormat").value;
|
|
463
|
+
return T.range ? `${e} – ${e}` : e;
|
|
464
|
+
}), Ht = d(() => T.placeholder || Vt.value), Ut = d(() => R.value.every((e) => !V.value[e.segment][e.field])), Wt = (e) => {
|
|
461
465
|
if (!e.hour) return 0;
|
|
462
466
|
let t = parseInt(e.hour, 10);
|
|
463
|
-
return
|
|
464
|
-
},
|
|
465
|
-
if (!
|
|
467
|
+
return T.ampm ? st(t, e.meridiem || "AM") : t;
|
|
468
|
+
}, Gt = (e, t) => {
|
|
469
|
+
if (!T.ampm) {
|
|
466
470
|
e.hour = String(t).padStart(2, "0");
|
|
467
471
|
return;
|
|
468
472
|
}
|
|
469
|
-
let n =
|
|
470
|
-
e.hour = n.hour, e.meridiem =
|
|
471
|
-
},
|
|
472
|
-
let t =
|
|
473
|
+
let n = ct(t);
|
|
474
|
+
e.hour = n.hour, e.meridiem = N.label(n.meridiem);
|
|
475
|
+
}, W = (e) => {
|
|
476
|
+
let t = wt();
|
|
473
477
|
if (!e) return t;
|
|
474
|
-
let n =
|
|
478
|
+
let n = vt.exec(e);
|
|
475
479
|
if (!n) return t;
|
|
476
480
|
let [, r, i, a] = n, o = parseInt(r, 10);
|
|
477
|
-
return o > 23 || parseInt(i, 10) > 59 || (
|
|
478
|
-
},
|
|
479
|
-
if (
|
|
481
|
+
return o > 23 || parseInt(i, 10) > 59 || (Gt(t, o), t.minute = i.padStart(2, "0"), t.second = T.seconds && a ? a.padStart(2, "0") : ""), t;
|
|
482
|
+
}, G = (e) => {
|
|
483
|
+
if (T.range) {
|
|
480
484
|
let [t, n] = Array.isArray(e) ? e : [];
|
|
481
|
-
|
|
482
|
-
start:
|
|
483
|
-
end:
|
|
485
|
+
V.value = {
|
|
486
|
+
start: W(t),
|
|
487
|
+
end: W(n)
|
|
484
488
|
};
|
|
485
|
-
} else
|
|
486
|
-
start:
|
|
487
|
-
end:
|
|
489
|
+
} else V.value = {
|
|
490
|
+
start: W(typeof e == "string" ? e : void 0),
|
|
491
|
+
end: wt()
|
|
488
492
|
};
|
|
489
|
-
},
|
|
490
|
-
|
|
493
|
+
}, Kt = () => {
|
|
494
|
+
G(T.modelValue);
|
|
491
495
|
};
|
|
492
|
-
|
|
496
|
+
G(T.modelValue), H(), Fe(() => T.modelValue, (e) => {
|
|
493
497
|
if (e === null || Array.isArray(e) && e.length === 0) {
|
|
494
|
-
|
|
498
|
+
G(e), H();
|
|
495
499
|
return;
|
|
496
500
|
}
|
|
497
501
|
let t = document.activeElement;
|
|
498
|
-
t &&
|
|
502
|
+
t && Dt(t) || (G(e), H());
|
|
499
503
|
});
|
|
500
|
-
let
|
|
501
|
-
let t =
|
|
502
|
-
return
|
|
503
|
-
},
|
|
504
|
-
let t =
|
|
505
|
-
return t === null ? e :
|
|
506
|
-
},
|
|
507
|
-
let t = !!e.finalize, n =
|
|
508
|
-
if (!
|
|
504
|
+
let K = (e) => {
|
|
505
|
+
let t = V.value[e], n = String(Wt(t)).padStart(2, "0"), r = (t.minute || "0").padStart(2, "0");
|
|
506
|
+
return T.seconds ? `${n}:${r}:${(t.second || "0").padStart(2, "0")}` : `${n}:${r}`;
|
|
507
|
+
}, q = (e) => E("error", e), qt = (e) => {
|
|
508
|
+
let t = L(e);
|
|
509
|
+
return t === null ? e : T.min && t < L(T.min) ? T.min + (T.seconds ? ":00" : "") : T.max && t > L(T.max) ? T.max + (T.seconds ? ":00" : "") : e;
|
|
510
|
+
}, Jt = () => U("start") === "partial" ? !0 : T.range ? U("end") === "partial" : !1, J = (e = {}) => {
|
|
511
|
+
let t = !!e.finalize, n = U("start");
|
|
512
|
+
if (!T.range) {
|
|
509
513
|
if (n === "empty") {
|
|
510
|
-
|
|
514
|
+
E("update:modelValue", null);
|
|
511
515
|
return;
|
|
512
516
|
}
|
|
513
517
|
if (n === "partial") return;
|
|
514
|
-
let e =
|
|
518
|
+
let e = K("start"), r = qt(e);
|
|
515
519
|
if (r !== e) {
|
|
516
520
|
if (!t) return;
|
|
517
|
-
|
|
521
|
+
V.value.start = W(r), H(), E("update:modelValue", r), q({
|
|
518
522
|
code: "disabled_time",
|
|
519
523
|
original: e,
|
|
520
524
|
normalized: r
|
|
521
525
|
});
|
|
522
526
|
return;
|
|
523
527
|
}
|
|
524
|
-
|
|
528
|
+
E("update:modelValue", e);
|
|
525
529
|
return;
|
|
526
530
|
}
|
|
527
|
-
let r =
|
|
531
|
+
let r = U("end");
|
|
528
532
|
if (n === "empty" && r === "empty") {
|
|
529
|
-
|
|
533
|
+
E("update:modelValue", []);
|
|
530
534
|
return;
|
|
531
535
|
}
|
|
532
536
|
if (n === "partial" || r === "partial" || n === "empty") return;
|
|
533
|
-
let i =
|
|
537
|
+
let i = K("start"), a = qt(i);
|
|
534
538
|
if (a !== i) {
|
|
535
539
|
if (!t) return;
|
|
536
|
-
|
|
540
|
+
V.value.start = W(a), q({
|
|
537
541
|
code: "disabled_time",
|
|
538
542
|
original: i,
|
|
539
543
|
normalized: a
|
|
540
544
|
}), i = a;
|
|
541
545
|
}
|
|
542
546
|
if (r === "empty") {
|
|
543
|
-
|
|
547
|
+
E("update:modelValue", [i]);
|
|
544
548
|
return;
|
|
545
549
|
}
|
|
546
|
-
let o =
|
|
550
|
+
let o = K("end"), s = qt(o);
|
|
547
551
|
if (s !== o) {
|
|
548
552
|
if (!t) return;
|
|
549
|
-
|
|
553
|
+
V.value.end = W(s), q({
|
|
550
554
|
code: "disabled_time",
|
|
551
555
|
original: o,
|
|
552
556
|
normalized: s
|
|
553
557
|
}), o = s;
|
|
554
558
|
}
|
|
555
|
-
if (
|
|
559
|
+
if (L(o) < L(i)) {
|
|
556
560
|
if (!t) return;
|
|
557
|
-
let e = { ...
|
|
558
|
-
|
|
561
|
+
let e = { ...V.value.start };
|
|
562
|
+
V.value.start = { ...V.value.end }, V.value.end = e, H(), E("update:modelValue", [o, i]), q({
|
|
559
563
|
code: "end_before_start",
|
|
560
564
|
original: [i, o],
|
|
561
565
|
normalized: [o, i]
|
|
562
566
|
});
|
|
563
|
-
} else
|
|
564
|
-
},
|
|
565
|
-
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
},
|
|
567
|
+
} else H(), E("update:modelValue", [i, o]);
|
|
568
|
+
}, Yt = () => {
|
|
569
|
+
E("update:modelValue", T.range ? [] : null);
|
|
570
|
+
}, Xt = () => {
|
|
571
|
+
O.value || (it.value = !0, E("active"), O.value = !0, document.addEventListener("focusin", Y), document.addEventListener("click", Y, !0));
|
|
572
|
+
}, Y = (e) => {
|
|
569
573
|
let t = e.target;
|
|
570
|
-
t instanceof HTMLElement &&
|
|
571
|
-
},
|
|
572
|
-
|
|
573
|
-
}, [
|
|
574
|
-
|
|
575
|
-
() =>
|
|
576
|
-
|
|
577
|
-
|
|
574
|
+
t instanceof HTMLElement && P.value?.$el && (e.type === "focusin" && t.contains(P.value.$el) || P.value.$el.contains(t) || F.value?.contains(t) || Zt());
|
|
575
|
+
}, Zt = () => {
|
|
576
|
+
J({ finalize: !0 }), Jt() && (Kt(), H()), O.value = !1, k(), E("inactive"), document.removeEventListener("focusin", Y), document.removeEventListener("click", Y, !0);
|
|
577
|
+
}, [Qt, $t] = Re(), X = b(!1), en = s(X, () => T.transitionDuration ?? fe.medium), tn = () => j.adaptive && I.value ? "canvas" : "popover", nn = b(tn()), Z = d(() => nn.value === "canvas");
|
|
578
|
+
Fe([
|
|
579
|
+
() => j.adaptive,
|
|
580
|
+
I,
|
|
581
|
+
X
|
|
578
582
|
], () => {
|
|
579
|
-
|
|
580
|
-
}),
|
|
581
|
-
let
|
|
583
|
+
X.value || (nn.value = tn());
|
|
584
|
+
}), re(() => X.value && !Z.value, () => X.value = !1);
|
|
585
|
+
let rn = d(() => ({
|
|
582
586
|
side: "bottom",
|
|
583
587
|
size: "auto",
|
|
584
588
|
draggable: !0,
|
|
585
|
-
transitionDuration:
|
|
589
|
+
transitionDuration: T.transitionDuration,
|
|
586
590
|
hideClose: !0,
|
|
587
|
-
...r(
|
|
588
|
-
})),
|
|
589
|
-
|
|
590
|
-
},
|
|
591
|
+
...r(T.offCanvasProps)
|
|
592
|
+
})), an = () => {
|
|
593
|
+
ut.value?.focus(), E("hidden");
|
|
594
|
+
}, on = (e) => {
|
|
591
595
|
let t = e.target;
|
|
592
|
-
t && t instanceof HTMLDialogElement && (
|
|
593
|
-
},
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
|
|
596
|
+
t && t instanceof HTMLDialogElement && (X.value = !1);
|
|
597
|
+
}, Q = () => {
|
|
598
|
+
T.disabled || T.readonly || (nn.value = tn(), X.value = !0);
|
|
599
|
+
};
|
|
600
|
+
te(T, E, {
|
|
601
|
+
isOpen: () => X.value,
|
|
602
|
+
open: Q,
|
|
603
|
+
close: () => X.value = !1
|
|
604
|
+
});
|
|
605
|
+
let sn = d(() => !ht.value && !T.disabled && !T.readonly), cn = (e) => {
|
|
606
|
+
if (!sn.value || X.value) return;
|
|
597
607
|
let t = e.target;
|
|
598
|
-
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-time-picker-input__panel, [role=\"dialog\"]") ||
|
|
599
|
-
},
|
|
600
|
-
|
|
608
|
+
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-time-picker-input__panel, [role=\"dialog\"]") || Q());
|
|
609
|
+
}, ln = (e) => e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Backspace" || e.key === "Delete" || e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, un = (e, t) => {
|
|
610
|
+
sn.value && (t.key === "Enter" || t.key === " ") ? (t.preventDefault(), X.value || Q()) : T.readonly && ln(t) ? t.preventDefault() : jt(e, t);
|
|
601
611
|
};
|
|
602
|
-
|
|
603
|
-
e ?
|
|
612
|
+
Fe(X, (e) => {
|
|
613
|
+
e ? Z.value || document.addEventListener("click", on, { passive: !0 }) : document.removeEventListener("click", on);
|
|
604
614
|
});
|
|
605
|
-
let
|
|
606
|
-
|
|
607
|
-
}, $ = d(() =>
|
|
608
|
-
let e =
|
|
609
|
-
return e.hour ? String(
|
|
610
|
-
}),
|
|
611
|
-
let n =
|
|
612
|
-
e === "hour" ?
|
|
613
|
-
}, { isHydrated:
|
|
614
|
-
if (
|
|
615
|
-
let [e, t] = Array.isArray(
|
|
616
|
-
return !e || !t ?
|
|
615
|
+
let dn = b("start"), fn = (e, t) => {
|
|
616
|
+
dn.value = e.segment, Mt(e, t), E("focus", t);
|
|
617
|
+
}, $ = d(() => T.range ? V.value[dn.value].hour ? dn.value : V.value.start.hour && !V.value.end.hour ? "end" : "start" : "start"), pn = d(() => {
|
|
618
|
+
let e = V.value[$.value];
|
|
619
|
+
return e.hour ? String(Wt(e)).padStart(2, "0") : "";
|
|
620
|
+
}), mn = ({ unit: e, value: t }) => {
|
|
621
|
+
let n = V.value[$.value];
|
|
622
|
+
e === "hour" ? Gt(n, parseInt(t, 10)) : e === "meridiem" ? n.meridiem = N.label(t === "PM" ? "PM" : "AM") : n[e] = t, n.hour ||= T.ampm ? "12" : "00", T.ampm && !n.meridiem && (n.meridiem = N.am.value), n.minute ||= "00", T.seconds && !n.second && (n.second = "00"), H(), J({ finalize: !1 });
|
|
623
|
+
}, { isHydrated: hn } = Ce(), gn = (e) => Se(e, nt.locale, !!T.ampm, !!T.seconds, hn.value), _n = d(() => {
|
|
624
|
+
if (T.range) {
|
|
625
|
+
let [e, t] = Array.isArray(T.modelValue) ? T.modelValue : [];
|
|
626
|
+
return !e || !t ? D("timePickerInput.emptyRange").value : D("timePickerInput.changeSelectionRange", gn(e), gn(t)).value;
|
|
617
627
|
}
|
|
618
|
-
return typeof
|
|
628
|
+
return typeof T.modelValue == "string" && T.modelValue ? D("timePickerInput.changeSelection", gn(T.modelValue)).value : D("timePickerInput.emptySelection").value;
|
|
619
629
|
});
|
|
620
|
-
return
|
|
621
|
-
document.removeEventListener("focusin",
|
|
622
|
-
}), (t, n) => (y(),
|
|
630
|
+
return je(() => {
|
|
631
|
+
document.removeEventListener("focusin", Y), document.removeEventListener("click", Y, !0), document.removeEventListener("click", on);
|
|
632
|
+
}), (t, n) => (y(), Ee(_e, g({
|
|
623
633
|
id: c.id,
|
|
624
634
|
class: "bb-time-picker-input",
|
|
625
|
-
clearable: c.clearable &&
|
|
626
|
-
compact: C(
|
|
635
|
+
clearable: c.clearable && A.value,
|
|
636
|
+
compact: C(j).compact,
|
|
627
637
|
description: c.description,
|
|
628
638
|
disabled: c.disabled,
|
|
629
|
-
errors: C(
|
|
639
|
+
errors: C(Xe),
|
|
630
640
|
"has-errors": c.hasErrors,
|
|
631
|
-
"has-value":
|
|
641
|
+
"has-value": A.value,
|
|
632
642
|
"has-warnings": c.hasWarnings,
|
|
633
643
|
"hide-label": c.hideLabel,
|
|
634
644
|
hint: c.hint,
|
|
635
645
|
"input-align": c.inputAlign,
|
|
636
646
|
label: c.label,
|
|
637
647
|
"label-align": c.labelAlign,
|
|
638
|
-
"label-mode":
|
|
648
|
+
"label-mode": ot.value,
|
|
639
649
|
"label-position": c.labelPosition,
|
|
640
|
-
layout: C(
|
|
650
|
+
layout: C(j).layout,
|
|
641
651
|
loading: c.loading,
|
|
642
652
|
name: c.name,
|
|
643
|
-
passthrough: C(
|
|
644
|
-
readonly: C(
|
|
645
|
-
reverse: C(
|
|
646
|
-
"show-asterisk": C(
|
|
647
|
-
"show-hint":
|
|
653
|
+
passthrough: C(M),
|
|
654
|
+
readonly: C(et),
|
|
655
|
+
reverse: C(j).reverse,
|
|
656
|
+
"show-asterisk": C(Ye),
|
|
657
|
+
"show-hint": at.value,
|
|
648
658
|
warnings: c.warnings
|
|
649
|
-
}, C(
|
|
650
|
-
label: w((e) => [x(t.$slots, "label", v(
|
|
651
|
-
input: w(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [h(
|
|
659
|
+
}, C(M).forwardAttrs), De({
|
|
660
|
+
label: w((e) => [x(t.$slots, "label", v(ke(e)))]),
|
|
661
|
+
input: w(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [h(ve, {
|
|
652
662
|
ref_key: "wrapper",
|
|
653
|
-
ref:
|
|
654
|
-
active:
|
|
655
|
-
"append:icon": C(
|
|
663
|
+
ref: P,
|
|
664
|
+
active: O.value,
|
|
665
|
+
"append:icon": C(T)["append:icon"],
|
|
656
666
|
class: _(["bb-time-picker-input__field", { "bb-time-picker-input__field--range": c.range }]),
|
|
657
|
-
clearable: c.clearable && !C(
|
|
658
|
-
compact: C(
|
|
667
|
+
clearable: c.clearable && !C(ue)(C($e)),
|
|
668
|
+
compact: C(j).compact,
|
|
659
669
|
disabled: c.disabled,
|
|
660
670
|
"has-errors": i,
|
|
661
|
-
"has-value":
|
|
671
|
+
"has-value": A.value,
|
|
662
672
|
"has-warnings": a,
|
|
663
673
|
loading: c.loading,
|
|
664
|
-
passthrough: C(
|
|
665
|
-
"prepend:icon": C(
|
|
666
|
-
readonly: C(
|
|
674
|
+
passthrough: C(M),
|
|
675
|
+
"prepend:icon": C(T)["prepend:icon"],
|
|
676
|
+
readonly: C(et),
|
|
667
677
|
variant: c.variant,
|
|
668
|
-
onClick:
|
|
669
|
-
"onClick:clear":
|
|
670
|
-
onFocusin:
|
|
671
|
-
},
|
|
678
|
+
onClick: cn,
|
|
679
|
+
"onClick:clear": Yt,
|
|
680
|
+
onFocusin: Xt
|
|
681
|
+
}, De({
|
|
672
682
|
"prepend:outer": w(() => [x(t.$slots, "prepend:outer")]),
|
|
673
683
|
prepend: w(() => [x(t.$slots, "prepend")]),
|
|
674
684
|
append: w(() => [m("button", g({
|
|
675
685
|
ref_key: "clockButton",
|
|
676
|
-
ref:
|
|
677
|
-
"aria-controls":
|
|
678
|
-
"aria-disabled": C(
|
|
679
|
-
"aria-expanded":
|
|
686
|
+
ref: ut,
|
|
687
|
+
"aria-controls": F.value ? ft(r) : void 0,
|
|
688
|
+
"aria-disabled": C(tt) || void 0,
|
|
689
|
+
"aria-expanded": X.value,
|
|
680
690
|
"aria-haspopup": "dialog",
|
|
681
|
-
"aria-label":
|
|
682
|
-
class: ["bb-segmented-field__activator", { "bb-segmented-field__activator--active":
|
|
691
|
+
"aria-label": _n.value,
|
|
692
|
+
class: ["bb-segmented-field__activator", { "bb-segmented-field__activator--active": X.value }],
|
|
683
693
|
disabled: c.disabled || c.readonly,
|
|
684
694
|
type: "button",
|
|
685
|
-
onClick:
|
|
686
|
-
}, C(
|
|
695
|
+
onClick: Le(Q, ["stop"])
|
|
696
|
+
}, C(M).activator), [h(me, {
|
|
687
697
|
class: "bb-segmented-field__trigger-icon",
|
|
688
|
-
icon: C(
|
|
689
|
-
}, null, 8, ["icon"])], 16,
|
|
698
|
+
icon: C(Je)
|
|
699
|
+
}, null, 8, ["icon"])], 16, We), x(t.$slots, "append", {}, () => [t.$slots.suffix ? (y(), p("span", g({
|
|
690
700
|
key: 0,
|
|
691
701
|
class: "bb-field-input__suffix"
|
|
692
|
-
}, C(
|
|
702
|
+
}, C(M).suffix), [x(t.$slots, "suffix")], 16)) : f("", !0)])]),
|
|
693
703
|
"append:outer": w(() => [x(t.$slots, "append:outer")]),
|
|
694
704
|
default: w(() => [
|
|
695
705
|
m("div", {
|
|
696
706
|
class: _(["bb-segmented-field__fields", {
|
|
697
|
-
"bb-segmented-field__fields--empty":
|
|
707
|
+
"bb-segmented-field__fields--empty": Ut.value,
|
|
698
708
|
"bb-segmented-field__fields--range": c.range
|
|
699
709
|
}]),
|
|
700
|
-
style:
|
|
701
|
-
}, [
|
|
710
|
+
style: Ae({ "--fields-min-ch": C(Et) })
|
|
711
|
+
}, [Ut.value ? (y(), p("span", {
|
|
702
712
|
key: 0,
|
|
703
713
|
"aria-hidden": "true",
|
|
704
714
|
class: "bb-segmented-field__placeholder",
|
|
705
|
-
onClick: n[0] ||= (...e) => C(
|
|
706
|
-
}, S(
|
|
715
|
+
onClick: n[0] ||= (...e) => C(kt) && C(kt)(...e)
|
|
716
|
+
}, S(Ht.value), 1)) : f("", !0), (y(!0), p(u, null, Ne(bt.value, (t, n) => (y(), p(u, { key: t.key }, [m("span", {
|
|
707
717
|
class: _(["bb-segmented-field__run", `bb-segmented-field__run--${t.kind}`]),
|
|
708
718
|
dir: t.kind === "time" ? "ltr" : void 0
|
|
709
|
-
}, [(y(!0), p(u, null,
|
|
719
|
+
}, [(y(!0), p(u, null, Ne(t.items, ({ descriptor: n, index: a }, s) => (y(), p(u, { key: C(Ct)(n) }, [m("span", {
|
|
710
720
|
class: "bb-segmented-field__field-sizer",
|
|
711
|
-
"data-value": C(
|
|
712
|
-
}, [
|
|
713
|
-
id: a === 0 ? r :
|
|
721
|
+
"data-value": C(Tt)(n)
|
|
722
|
+
}, [Ie(m("input", g({
|
|
723
|
+
id: a === 0 ? r : Lt(n, r),
|
|
714
724
|
ref_for: !0,
|
|
715
|
-
ref: (e) => C(
|
|
716
|
-
"aria-describedby":
|
|
725
|
+
ref: (e) => C(St)[C(Ct)(n)] = e,
|
|
726
|
+
"aria-describedby": mt(o, r),
|
|
717
727
|
"aria-disabled": c.disabled || void 0,
|
|
718
728
|
"aria-invalid": i ? "true" : void 0,
|
|
719
|
-
"aria-label":
|
|
720
|
-
"aria-readonly":
|
|
721
|
-
autocomplete: C(
|
|
729
|
+
"aria-label": Bt(n),
|
|
730
|
+
"aria-readonly": gt.value || void 0,
|
|
731
|
+
autocomplete: C(j).autocomplete,
|
|
722
732
|
autofocus: c.autofocus && a === 0,
|
|
723
733
|
class: ["bb-segmented-field__input", [`bb-segmented-field__input--${n.field}`, `bb-segmented-field__input--${n.segment}`]],
|
|
724
734
|
disabled: c.disabled,
|
|
725
|
-
inputmode:
|
|
726
|
-
maxlength:
|
|
727
|
-
name:
|
|
728
|
-
readonly:
|
|
729
|
-
required: C(
|
|
730
|
-
"aria-required": C(
|
|
735
|
+
inputmode: _t(n.field),
|
|
736
|
+
maxlength: yt(n.field),
|
|
737
|
+
name: Rt(n),
|
|
738
|
+
readonly: gt.value,
|
|
739
|
+
required: C(Ze),
|
|
740
|
+
"aria-required": C(Qe),
|
|
731
741
|
tabindex: n.field === "hour" ? 0 : -1,
|
|
732
742
|
type: "text",
|
|
733
|
-
value: C(
|
|
734
|
-
onBlur: (e) => C(
|
|
735
|
-
onFocus: (e) =>
|
|
736
|
-
onInput: (e) =>
|
|
737
|
-
onKeydown: (e) =>
|
|
738
|
-
onPaste: (e) => C(
|
|
739
|
-
}, { ref_for: !0 }, g(C(
|
|
743
|
+
value: C(Ft)(C(V)[n.segment][n.field]),
|
|
744
|
+
onBlur: (e) => C(Nt)(n),
|
|
745
|
+
onFocus: (e) => fn(n, e),
|
|
746
|
+
onInput: (e) => It(n, e),
|
|
747
|
+
onKeydown: (e) => un(n, e),
|
|
748
|
+
onPaste: (e) => C(Pt)(n, e)
|
|
749
|
+
}, { ref_for: !0 }, g(C(M).controlAttrs, C(M).input)), null, 16, Ve), [[C(e)]])], 8, Be), s < t.items.length - 1 ? (y(), p("span", {
|
|
740
750
|
key: 0,
|
|
741
751
|
"aria-hidden": "true",
|
|
742
752
|
class: "bb-segmented-field__separator",
|
|
743
753
|
role: "presentation",
|
|
744
|
-
onClick: (e) => C(
|
|
745
|
-
}, S(
|
|
754
|
+
onClick: (e) => C(Ot)(R.value[a + 1], { select: !0 })
|
|
755
|
+
}, S(xt(R.value[a], R.value[a + 1])), 9, He)) : f("", !0)], 64))), 128))], 10, ze), n < bt.value.length - 1 ? (y(), p("span", {
|
|
746
756
|
key: 0,
|
|
747
757
|
"aria-hidden": "true",
|
|
748
|
-
class: _(["bb-segmented-field__separator", { "bb-segmented-field__separator--range":
|
|
758
|
+
class: _(["bb-segmented-field__separator", { "bb-segmented-field__separator--range": R.value[B(t)].segment !== R.value[B(t) + 1].segment }]),
|
|
749
759
|
role: "presentation",
|
|
750
|
-
onClick: (e) => C(
|
|
751
|
-
}, S(
|
|
760
|
+
onClick: (e) => C(Ot)(R.value[B(t) + 1], { select: !0 })
|
|
761
|
+
}, S(xt(R.value[B(t)], R.value[B(t) + 1])), 11, Ue)) : f("", !0)], 64))), 128))], 6),
|
|
752
762
|
m("span", {
|
|
753
|
-
id:
|
|
763
|
+
id: dt(r),
|
|
754
764
|
class: "bb-time-picker-input__accessible-description",
|
|
755
765
|
hidden: ""
|
|
756
|
-
}, S(
|
|
757
|
-
h(C(
|
|
758
|
-
default: w(() => [h(
|
|
766
|
+
}, S(Vt.value), 9, Ge),
|
|
767
|
+
h(C(Qt), null, {
|
|
768
|
+
default: w(() => [h(be, {
|
|
759
769
|
ampm: c.ampm,
|
|
760
|
-
disabled: c.disabled || C(
|
|
761
|
-
hour:
|
|
770
|
+
disabled: c.disabled || C(et),
|
|
771
|
+
hour: pn.value,
|
|
762
772
|
max: c.max,
|
|
763
|
-
meridiem: C(
|
|
773
|
+
meridiem: C(V)[$.value].meridiem,
|
|
764
774
|
min: c.min,
|
|
765
|
-
minute: C(
|
|
766
|
-
passthrough: C(
|
|
767
|
-
second: C(
|
|
775
|
+
minute: C(V)[$.value].minute,
|
|
776
|
+
passthrough: C(M),
|
|
777
|
+
second: C(V)[$.value].second,
|
|
768
778
|
seconds: c.seconds,
|
|
769
779
|
step: c.step,
|
|
770
|
-
onSelect:
|
|
771
|
-
onVnodeBeforeUnmount: n[1] ||= (e) =>
|
|
772
|
-
onVnodeMounted:
|
|
780
|
+
onSelect: mn,
|
|
781
|
+
onVnodeBeforeUnmount: n[1] ||= (e) => F.value = null,
|
|
782
|
+
onVnodeMounted: lt
|
|
773
783
|
}, null, 8, [
|
|
774
784
|
"ampm",
|
|
775
785
|
"disabled",
|
|
@@ -785,39 +795,39 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
785
795
|
])]),
|
|
786
796
|
_: 1
|
|
787
797
|
}),
|
|
788
|
-
|
|
798
|
+
Z.value ? (y(), Ee(he, g({
|
|
789
799
|
key: 0,
|
|
790
|
-
modelValue:
|
|
791
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
800
|
+
modelValue: X.value,
|
|
801
|
+
"onUpdate:modelValue": n[2] ||= (e) => X.value = e,
|
|
792
802
|
class: "bb-time-picker-input__sheet",
|
|
793
|
-
pt: C(
|
|
803
|
+
pt: C(M).forward({
|
|
794
804
|
panel: "root",
|
|
795
805
|
sheet: "root"
|
|
796
|
-
}, C(
|
|
797
|
-
},
|
|
798
|
-
onHidden:
|
|
799
|
-
onHide: n[3] ||= (e) => C(
|
|
800
|
-
onShow: n[4] ||= (e) => C(
|
|
801
|
-
onShown: n[5] ||= (e) => C(
|
|
806
|
+
}, C(ge).states, () => c.offCanvasProps?.pt)
|
|
807
|
+
}, rn.value, {
|
|
808
|
+
onHidden: an,
|
|
809
|
+
onHide: n[3] ||= (e) => C(E)("hide"),
|
|
810
|
+
onShow: n[4] ||= (e) => C(E)("show"),
|
|
811
|
+
onShown: n[5] ||= (e) => C(E)("shown")
|
|
802
812
|
}), {
|
|
803
|
-
default: w(() => [m("div", v(
|
|
813
|
+
default: w(() => [m("div", v(ke(pt(r))), [h(C($t))], 16)]),
|
|
804
814
|
_: 2
|
|
805
|
-
}, 1040, ["modelValue", "pt"])) : (y(),
|
|
815
|
+
}, 1040, ["modelValue", "pt"])) : (y(), Ee(ye, {
|
|
806
816
|
key: 1,
|
|
807
|
-
modelValue:
|
|
808
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
809
|
-
anchor:
|
|
810
|
-
"bubble-attrs":
|
|
817
|
+
modelValue: X.value,
|
|
818
|
+
"onUpdate:modelValue": n[6] ||= (e) => X.value = e,
|
|
819
|
+
anchor: P.value,
|
|
820
|
+
"bubble-attrs": pt(r),
|
|
811
821
|
class: "bb-time-picker-input__popover",
|
|
812
822
|
dialog: "",
|
|
813
823
|
offset: 4,
|
|
814
824
|
"transition-duration": c.transitionDuration,
|
|
815
|
-
onHidden: n[7] ||= (e) => C(
|
|
816
|
-
onHide: n[8] ||= (e) => C(
|
|
817
|
-
onShow: n[9] ||= (e) => C(
|
|
818
|
-
onShown: n[10] ||= (e) => C(
|
|
825
|
+
onHidden: n[7] ||= (e) => C(E)("hidden"),
|
|
826
|
+
onHide: n[8] ||= (e) => C(E)("hide"),
|
|
827
|
+
onShow: n[9] ||= (e) => C(E)("show"),
|
|
828
|
+
onShown: n[10] ||= (e) => C(E)("shown")
|
|
819
829
|
}, {
|
|
820
|
-
default: w(() => [h(C(
|
|
830
|
+
default: w(() => [h(C($t))]),
|
|
821
831
|
_: 1
|
|
822
832
|
}, 8, [
|
|
823
833
|
"modelValue",
|
|
@@ -850,7 +860,7 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
850
860
|
_: 2
|
|
851
861
|
}, [t.$slots.description ? {
|
|
852
862
|
name: "description",
|
|
853
|
-
fn: w((e) => [x(t.$slots, "description", v(
|
|
863
|
+
fn: w((e) => [x(t.$slots, "description", v(ke(e)))]),
|
|
854
864
|
key: "0"
|
|
855
865
|
} : void 0]), 1040, [
|
|
856
866
|
"id",
|
|
@@ -881,4 +891,4 @@ var Le = ["dir"], Re = ["data-value"], ze = [
|
|
|
881
891
|
]));
|
|
882
892
|
}
|
|
883
893
|
});
|
|
884
|
-
export {
|
|
894
|
+
export { Ke as default };
|