bitboss-ui 3.0.0-beta.67 → 3.0.0-beta.69
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 +230 -91
- package/bin/bitboss-ui-mcp.mjs +368 -142
- package/bin/bitboss-ui.mjs +24 -2073
- package/bin/cli.mjs +1922 -0
- package/dist/ai/BbAccordion.md +1 -1
- package/dist/ai/BbAlert.md +16 -12
- package/dist/ai/BbAsterisk.md +1 -1
- package/dist/ai/BbAvatar.md +3 -3
- package/dist/ai/BbBadge.md +5 -5
- package/dist/ai/BbBadgeButton.md +1 -1
- package/dist/ai/BbBaseButton.md +1 -1
- package/dist/ai/BbBaseCheckboxIcon.md +4 -0
- package/dist/ai/BbBaseRadioIcon.md +7 -3
- package/dist/ai/BbBaseSwitchIcon.md +11 -2
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +63 -10
- package/dist/ai/BbCalendar.md +15 -2
- package/dist/ai/BbCarousel.md +1093 -0
- package/dist/ai/BbCheckbox.md +28 -8
- package/dist/ai/BbCheckboxGroup.md +65 -32
- package/dist/ai/BbColorInput.md +18 -15
- package/dist/ai/BbColorPalette.md +9 -6
- package/dist/ai/BbConfigScope.md +218 -0
- package/dist/ai/BbConfirm.md +25 -22
- package/dist/ai/BbDatePicker.md +12 -6
- package/dist/ai/BbDatePickerInput.md +29 -18
- package/dist/ai/BbDialog.md +11 -10
- package/dist/ai/BbDropdown.md +36 -29
- package/dist/ai/BbDropdownButton.md +21 -21
- package/dist/ai/BbDropzone.md +5 -16
- package/dist/ai/BbForm.md +14 -8
- package/dist/ai/BbHost.md +20 -14
- package/dist/ai/BbHoverCard.md +2 -2
- package/dist/ai/BbIcon.md +3 -3
- package/dist/ai/BbIndicator.md +4 -4
- package/dist/ai/BbNumberInput.md +20 -16
- package/dist/ai/BbOffCanvas.md +15 -10
- package/dist/ai/BbPagination.md +15 -6
- package/dist/ai/BbPopover.md +16 -9
- package/dist/ai/BbRadio.md +30 -9
- package/dist/ai/BbRadioGroup.md +78 -35
- package/dist/ai/BbRating.md +13 -11
- package/dist/ai/BbSelect.md +84 -49
- package/dist/ai/BbSelectPopover.md +33 -31
- package/dist/ai/BbSlider.md +266 -66
- package/dist/ai/BbSpinner.md +3 -3
- package/dist/ai/BbSwitch.md +33 -9
- package/dist/ai/BbSwitchGroup.md +27 -18
- package/dist/ai/BbTable.md +28 -25
- package/dist/ai/BbTabs.md +29 -32
- package/dist/ai/BbTabsList.md +4 -4
- package/dist/ai/BbTabsRoot.md +2 -2
- package/dist/ai/BbTag.md +15 -14
- package/dist/ai/BbTextInput.md +32 -22
- package/dist/ai/BbTextarea.md +20 -18
- package/dist/ai/BbTimePicker.md +5 -5
- package/dist/ai/BbTimePickerInput.md +15 -14
- package/dist/ai/BbToast.md +72 -28
- package/dist/ai/BbTooltip.md +7 -6
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/ClearableButton.md +1 -1
- package/dist/ai/CommonField.md +5 -5
- package/dist/ai/CommonFieldInput.md +3 -2
- package/dist/ai/CommonPopover.md +4 -4
- package/dist/ai/CommonTimeSelector.md +1 -1
- package/dist/ai/ErrorIcon.md +1 -1
- package/dist/ai/FlatListBox.md +5 -4
- package/dist/ai/GroupedListBox.md +5 -4
- package/dist/ai/ListBox.md +6 -5
- package/dist/ai/OptionsContainer.md +20 -4
- package/dist/ai/WarningIcon.md +1 -1
- package/dist/ai/changelog.json +1002 -39
- package/dist/ai/components.json +117 -246
- package/dist/ai/composables/useBbConfig.md +3 -3
- package/dist/ai/composables/useBbDialog.md +1 -1
- package/dist/ai/composables/useBbFormField.md +1 -1
- package/dist/ai/composables/useConfirm.md +1 -1
- package/dist/ai/composables/useToast.md +16 -16
- package/dist/ai/design-tokens.json +10 -5
- package/dist/ai/guides/agent-contract.md +15 -10
- package/dist/ai/guides/ai-router.md +15 -10
- package/dist/ai/guides/app-layout.md +1 -1
- package/dist/ai/guides/calendars-and-digits.md +123 -0
- package/dist/ai/guides/component-picker.md +1 -1
- package/dist/ai/guides/design-language.md +18 -14
- package/dist/ai/guides/design-tokens.md +85 -43
- package/dist/ai/guides/eslint-rules.md +21 -2
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +322 -41
- package/dist/ai/guides/inline-edit-playbook.md +1 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +498 -189
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +1 -1
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +15 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +2 -2
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -1
- package/dist/ai/guides/migration/components/bb-host.md +10 -8
- package/dist/ai/guides/migration/components/bb-offcanvas.md +1 -1
- package/dist/ai/guides/migration/components/bb-rating.md +1 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
- package/dist/ai/guides/migration/components/bb-select.md +3 -3
- package/dist/ai/guides/migration/components/bb-slider.md +17 -2
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +33 -15
- package/dist/ai/guides/migration/components/bb-toast.md +10 -9
- package/dist/ai/guides/migration/components/use-confirm.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +345 -76
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +30 -13
- package/dist/ai/guides/options-items-playbook.md +5 -1
- package/dist/ai/guides/passthrough.md +150 -135
- package/dist/ai/guides/ssr-prefill.md +7 -1
- package/dist/ai/guides/typescript-generic-components.md +7 -7
- package/dist/ai/guides/validated-forms.md +14 -5
- package/dist/ai/guides/validation-libraries.md +4 -4
- package/dist/ai/helpers/inertia/manifest.json +23 -14
- package/dist/ai/helpers/inertia/useQuery.ts +74 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +33 -1
- package/dist/ai/helpers/inertia/useRouteQuery.ts +158 -30
- package/dist/ai/index.md +5 -3
- package/dist/ai/manifest/common.json +13 -15
- package/dist/ai/manifest/components/BbAccordion.tree.json +22 -4
- package/dist/ai/manifest/components/BbAlert.json +3 -2
- package/dist/ai/manifest/components/BbAlert.tree.json +26 -3
- package/dist/ai/manifest/components/BbAsterisk.tree.json +7 -1
- package/dist/ai/manifest/components/BbAvatar.json +2 -1
- package/dist/ai/manifest/components/BbAvatar.tree.json +16 -2
- package/dist/ai/manifest/components/BbBadge.json +4 -3
- package/dist/ai/manifest/components/BbBadge.tree.json +39 -4
- package/dist/ai/manifest/components/BbBadgeButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbBaseButton.tree.json +16 -1
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +23 -2
- package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +21 -4
- package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +26 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +34 -4
- package/dist/ai/manifest/components/BbButton.json +5 -4
- package/dist/ai/manifest/components/BbButton.tree.json +78 -5
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbCalendar.tree.json +81 -5
- package/dist/ai/manifest/components/BbCarousel.json +59 -0
- package/dist/ai/manifest/components/BbCarousel.tree.json +135 -0
- package/dist/ai/manifest/components/BbCheckbox.json +5 -4
- package/dist/ai/manifest/components/BbCheckbox.tree.json +31 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.json +18 -15
- package/dist/ai/manifest/components/BbCheckboxGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +89 -5
- package/dist/ai/manifest/components/BbCollapsible.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +7 -6
- package/dist/ai/manifest/components/BbColorInput.tree.json +49 -4
- package/dist/ai/manifest/components/BbColorPalette.json +4 -3
- package/dist/ai/manifest/components/BbColorPalette.tree.json +36 -2
- package/dist/ai/manifest/components/BbConfigScope.json +23 -0
- package/dist/ai/manifest/components/BbConfirm.json +3 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +27 -3
- package/dist/ai/manifest/components/BbDatePicker.json +7 -6
- package/dist/ai/manifest/components/BbDatePicker.tree.json +42 -3
- package/dist/ai/manifest/components/BbDatePickerInput.json +7 -6
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +86 -5
- package/dist/ai/manifest/components/BbDialog.json +3 -2
- package/dist/ai/manifest/components/BbDialog.tree.json +28 -3
- package/dist/ai/manifest/components/BbDropdown.json +14 -10
- package/dist/ai/manifest/components/BbDropdown.tree.json +80 -3
- package/dist/ai/manifest/components/BbDropdownButton.json +14 -11
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +47 -4
- package/dist/ai/manifest/components/BbDropzone.json +2 -1
- package/dist/ai/manifest/components/BbDropzone.tree.json +27 -1
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +3 -3
- package/dist/ai/manifest/components/BbHoverCard.tree.json +18 -1
- package/dist/ai/manifest/components/BbIcon.json +2 -1
- package/dist/ai/manifest/components/BbIcon.tree.json +7 -1
- package/dist/ai/manifest/components/BbIndicator.json +2 -1
- package/dist/ai/manifest/components/BbIndicator.tree.json +27 -1
- package/dist/ai/manifest/components/BbNumberInput.json +6 -5
- package/dist/ai/manifest/components/BbNumberInput.tree.json +40 -3
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +55 -2
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbPagination.tree.json +23 -3
- package/dist/ai/manifest/components/BbPopover.json +5 -4
- package/dist/ai/manifest/components/BbPopover.tree.json +20 -2
- package/dist/ai/manifest/components/BbProgress.tree.json +9 -1
- package/dist/ai/manifest/components/BbRadio.json +3 -2
- package/dist/ai/manifest/components/BbRadio.tree.json +30 -2
- package/dist/ai/manifest/components/BbRadioGroup.json +22 -19
- package/dist/ai/manifest/components/BbRadioGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +88 -5
- package/dist/ai/manifest/components/BbRating.json +6 -5
- package/dist/ai/manifest/components/BbRating.removed.json +1 -0
- package/dist/ai/manifest/components/BbRating.tree.json +37 -2
- package/dist/ai/manifest/components/BbSelect.json +13 -11
- package/dist/ai/manifest/components/BbSelect.tree.json +70 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +17 -13
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +94 -8
- package/dist/ai/manifest/components/BbSlider.json +30 -27
- package/dist/ai/manifest/components/BbSlider.removed.json +3 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +48 -3
- package/dist/ai/manifest/components/BbSmoothHeight.tree.json +10 -1
- package/dist/ai/manifest/components/BbSpinner.tree.json +21 -2
- package/dist/ai/manifest/components/BbSwitch.json +3 -2
- package/dist/ai/manifest/components/BbSwitch.tree.json +31 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +9 -7
- package/dist/ai/manifest/components/BbSwitchGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +65 -3
- package/dist/ai/manifest/components/BbTable.json +10 -9
- package/dist/ai/manifest/components/BbTable.tree.json +144 -5
- package/dist/ai/manifest/components/BbTabs.json +7 -6
- package/dist/ai/manifest/components/BbTabs.removed.json +5 -1
- package/dist/ai/manifest/components/BbTabs.tree.json +34 -3
- package/dist/ai/manifest/components/BbTabsList.json +4 -4
- package/dist/ai/manifest/components/BbTabsList.removed.json +5 -1
- package/dist/ai/manifest/components/BbTabsList.tree.json +24 -2
- package/dist/ai/manifest/components/BbTabsPanels.tree.json +16 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +3 -3
- package/dist/ai/manifest/components/BbTag.json +7 -6
- package/dist/ai/manifest/components/BbTag.tree.json +49 -4
- package/dist/ai/manifest/components/BbTextInput.json +6 -5
- package/dist/ai/manifest/components/BbTextInput.tree.json +43 -3
- package/dist/ai/manifest/components/BbTextarea.json +7 -6
- package/dist/ai/manifest/components/BbTextarea.tree.json +46 -3
- package/dist/ai/manifest/components/BbTimePicker.json +7 -6
- package/dist/ai/manifest/components/BbTimePicker.tree.json +30 -3
- package/dist/ai/manifest/components/BbTimePickerInput.json +7 -6
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +58 -6
- package/dist/ai/manifest/components/BbToast.json +3 -2
- package/dist/ai/manifest/components/BbToast.tree.json +46 -2
- package/dist/ai/manifest/components/BbTooltip.json +4 -3
- package/dist/ai/manifest/components/BbTooltip.tree.json +17 -1
- package/dist/ai/manifest/components/BbTree.tree.json +14 -1
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/ClearableButton.tree.json +8 -2
- package/dist/ai/manifest/components/CommonField.json +2 -2
- package/dist/ai/manifest/components/CommonField.tree.json +68 -1
- package/dist/ai/manifest/components/CommonFieldInput.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +38 -6
- package/dist/ai/manifest/components/CommonPopover.json +7 -5
- package/dist/ai/manifest/components/CommonPopover.tree.json +11 -1
- package/dist/ai/manifest/components/CommonTimeSelector.tree.json +18 -2
- package/dist/ai/manifest/components/ErrorIcon.tree.json +8 -2
- package/dist/ai/manifest/components/FlatListBox.json +1 -1
- package/dist/ai/manifest/components/FlatListBox.tree.json +4 -3
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +4 -3
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +2 -2
- package/dist/ai/manifest/components/OptionsContainer.json +4 -3
- package/dist/ai/manifest/components/OptionsContainer.tree.json +16 -1
- package/dist/ai/manifest/components/WarningIcon.tree.json +8 -2
- package/dist/ai/manifest/index.json +6 -5
- package/dist/ai/manifest/meta.json +23 -153
- package/dist/ai/manifest/types.advanced.json +78 -77
- package/dist/ai/manifest/types.api.json +29 -19
- package/dist/ai/manifest/types.wrapper.json +115 -112
- package/dist/ai/recipes/inertia/approvals-inbox.md +10 -10
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +24 -20
- package/dist/ai/recipes/inertia/onboarding.md +10 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +8 -8
- package/dist/ai/recipes/inertia/record-form.md +16 -16
- package/dist/ai/recipes/inertia/records-workspace.md +13 -12
- package/dist/ai/recipes/inertia/settings-workspace.md +16 -15
- package/dist/ai/recipes/inertia/upload-center.md +13 -13
- package/dist/ai/recipes/inertia/wizard-form.md +16 -16
- package/dist/ai/recipes/nuxt/approvals-inbox.md +13 -13
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +26 -22
- package/dist/ai/recipes/nuxt/onboarding.md +10 -10
- package/dist/ai/recipes/nuxt/ownership-atlas.md +12 -12
- package/dist/ai/recipes/nuxt/record-form.md +16 -16
- package/dist/ai/recipes/nuxt/records-workspace.md +16 -15
- package/dist/ai/recipes/nuxt/settings-workspace.md +15 -14
- package/dist/ai/recipes/nuxt/upload-center.md +15 -15
- package/dist/ai/recipes/nuxt/wizard-form.md +17 -17
- package/dist/ai/recipes/vue/approvals-inbox.md +15 -13
- package/dist/ai/recipes/vue/inline-edit-workspace.md +26 -22
- package/dist/ai/recipes/vue/onboarding.md +16 -11
- package/dist/ai/recipes/vue/ownership-atlas.md +12 -12
- package/dist/ai/recipes/vue/record-form.md +18 -16
- package/dist/ai/recipes/vue/records-workspace.md +18 -15
- package/dist/ai/recipes/vue/settings-workspace.md +18 -15
- package/dist/ai/recipes/vue/upload-center.md +15 -15
- package/dist/ai/recipes/vue/wizard-form.md +18 -16
- package/dist/ai/source/BbAccordion.md +11 -14
- package/dist/ai/source/BbAlert.md +103 -91
- package/dist/ai/source/BbAsterisk.md +6 -7
- package/dist/ai/source/BbAvatar.md +42 -41
- package/dist/ai/source/BbBadge.md +100 -89
- package/dist/ai/source/BbBadgeButton.md +80 -76
- package/dist/ai/source/BbBaseButton.md +284 -276
- package/dist/ai/source/BbBaseCheckboxIcon.md +76 -68
- package/dist/ai/source/BbBaseRadioIcon.md +80 -68
- package/dist/ai/source/BbBaseSwitchIcon.md +98 -74
- package/dist/ai/source/BbBreadcrumbs.md +76 -63
- package/dist/ai/source/BbButton.md +101 -77
- package/dist/ai/source/BbCalendar.md +166 -176
- package/dist/ai/source/BbCarousel.md +2897 -0
- package/dist/ai/source/BbCheckbox.md +230 -192
- package/dist/ai/source/BbCheckboxGroup.md +172 -79
- package/dist/ai/source/BbCollapsible.md +7 -10
- package/dist/ai/source/BbColorInput.md +256 -243
- package/dist/ai/source/BbColorPalette.md +239 -160
- package/dist/ai/source/BbConfigScope.md +123 -0
- package/dist/ai/source/BbConfirm.md +38 -32
- package/dist/ai/source/BbConfirmPortal.md +30 -26
- package/dist/ai/source/BbDatePicker.md +218 -187
- package/dist/ai/source/BbDatePickerInput.md +789 -428
- package/dist/ai/source/BbDialog.md +207 -191
- package/dist/ai/source/BbDropdown.md +326 -234
- package/dist/ai/source/BbDropdownButton.md +115 -68
- package/dist/ai/source/BbDropdownGroup.md +271 -216
- package/dist/ai/source/BbDropzone.md +101 -100
- package/dist/ai/source/BbForm.md +29 -29
- package/dist/ai/source/BbHost.md +6 -6
- package/dist/ai/source/BbHoverCard.md +34 -20
- package/dist/ai/source/BbHoverCardPortal.md +9 -12
- package/dist/ai/source/BbIcon.md +32 -30
- package/dist/ai/source/BbIndicator.md +76 -70
- package/dist/ai/source/BbNumberInput.md +334 -313
- package/dist/ai/source/BbOffCanvas.md +245 -216
- package/dist/ai/source/BbPagination.md +144 -116
- package/dist/ai/source/BbPopover.md +49 -31
- package/dist/ai/source/BbPopoverPortal.md +11 -14
- package/dist/ai/source/BbProgress.md +20 -12
- package/dist/ai/source/BbRadio.md +205 -181
- package/dist/ai/source/BbRadioGroup.md +461 -364
- package/dist/ai/source/BbRating.md +212 -177
- package/dist/ai/source/BbSelect.md +514 -482
- package/dist/ai/source/BbSelectPopover.md +497 -413
- package/dist/ai/source/BbSlider.md +1208 -777
- package/dist/ai/source/BbSmoothHeight.md +8 -9
- package/dist/ai/source/BbSpinner.md +20 -20
- package/dist/ai/source/BbSwitch.md +25 -13
- package/dist/ai/source/BbSwitchGroup.md +115 -34
- package/dist/ai/source/BbTable.md +577 -531
- package/dist/ai/source/BbTabs.md +134 -116
- package/dist/ai/source/BbTabsList.md +164 -136
- package/dist/ai/source/BbTabsPanels.md +128 -113
- package/dist/ai/source/BbTabsRoot.md +125 -110
- package/dist/ai/source/BbTag.md +286 -281
- package/dist/ai/source/BbTextInput.md +59 -50
- package/dist/ai/source/BbTextarea.md +85 -71
- package/dist/ai/source/BbTimePicker.md +145 -126
- package/dist/ai/source/BbTimePickerInput.md +383 -316
- package/dist/ai/source/BbToast.md +97 -44
- package/dist/ai/source/BbToastPortal.md +56 -36
- package/dist/ai/source/BbTooltip.md +155 -129
- package/dist/ai/source/BbTree.md +16 -12
- package/dist/ai/source/CommonField.md +94 -59
- package/dist/ai/source/CommonFieldInput.md +18 -13
- package/dist/ai/source/CommonPopover.md +28 -9
- package/dist/ai/source/CommonTimeSelector.md +41 -8
- package/dist/ai/source/FlatListBox.md +16 -5
- package/dist/ai/source/GroupedListBox.md +18 -6
- package/dist/ai/source/ListBox.md +2 -1
- package/dist/ai/source/OptionsContainer.md +82 -4
- package/dist/assets/svgs/arrow_up.svg_raw.js +3 -0
- package/dist/assets/svgs/caret_down.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_left.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_left_small.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_right_small.svg_raw.js +3 -0
- package/dist/assets/svgs/close.svg_raw.js +3 -0
- package/dist/assets/svgs/eyedropper.svg_raw.js +3 -0
- package/dist/assets/svgs/move.svg_raw.js +3 -0
- package/dist/assets/svgs/pause.svg_raw.js +3 -0
- package/dist/assets/svgs/play.svg_raw.js +3 -0
- package/dist/assets/svgs/star.svg_raw.js +1 -1
- package/dist/assets/svgs/x.svg_raw.js +3 -0
- package/dist/calendar-runtime.js +112 -0
- package/dist/calendars.js +83 -0
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +2 -2
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +44 -0
- package/dist/components/BbAccordion/types.d.ts +5 -6
- package/dist/components/BbAlert/BbAlert.vue.d.ts +5 -4
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +52 -48
- package/dist/components/BbAlert/ptKeys.generated.d.ts +104 -0
- package/dist/components/BbAlert/types.d.ts +16 -9
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +2 -2
- package/dist/components/BbAsterisk/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbAsterisk/types.d.ts +4 -5
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +3 -3
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +54 -53
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +12 -0
- package/dist/components/BbAvatar/types.d.ts +5 -6
- package/dist/components/BbBadge/BbBadge.vue.d.ts +4 -4
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +75 -71
- package/dist/components/BbBadge/BbBadgeButton.vue.d.ts +2 -2
- package/dist/components/BbBadge/badgeButtonContext.d.ts +5 -5
- package/dist/components/BbBadge/ptKeys.generated.d.ts +160 -0
- package/dist/components/BbBadge/types.d.ts +17 -10
- package/dist/components/BbBaseButton/BbBaseButton.vue.d.ts +2 -2
- package/dist/components/BbBaseButton/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbBaseButton/types.d.ts +13 -6
- package/dist/components/BbBaseButton/useLinkState.d.ts +1 -1
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.d.ts +2 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseCheckboxIcon/ptKeys.generated.d.ts +40 -0
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +12 -6
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.d.ts +2 -2
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseRadioIcon/ptKeys.generated.d.ts +36 -0
- package/dist/components/BbBaseRadioIcon/types.d.ts +12 -6
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.d.ts +2 -2
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseSwitchIcon/ptKeys.generated.d.ts +40 -0
- package/dist/components/BbBaseSwitchIcon/types.d.ts +12 -6
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +2 -2
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBreadcrumbs/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbBreadcrumbs/types.d.ts +15 -8
- package/dist/components/BbButton/BbButton.vue.d.ts +6 -4
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -118
- package/dist/components/BbButton/ptKeys.generated.d.ts +196 -0
- package/dist/components/BbButton/toggleRoving.js +29 -28
- package/dist/components/BbButton/types.d.ts +29 -21
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +9 -71
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +327 -340
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +67 -65
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +76 -67
- package/dist/components/BbCalendar/calendarHost.d.ts +1 -1
- package/dist/components/BbCalendar/calendarMath.d.ts +102 -0
- package/dist/components/BbCalendar/calendarMath.js +124 -0
- package/dist/components/BbCalendar/ptKeys.generated.d.ts +248 -0
- package/dist/components/BbCalendar/types.d.ts +15 -9
- package/dist/components/BbCalendar/useCalendarContext.d.ts +43 -17
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +71 -4
- package/dist/components/BbCalendar/useCalendarGrid.js +264 -209
- package/dist/components/BbCalendar/useDayGrid.d.ts +26 -8
- package/dist/components/BbCalendar/useDayGrid.js +178 -172
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +18 -3
- package/dist/components/BbCalendar/useDayjsLocale.js +28 -28
- package/dist/components/BbCalendar/useToday.d.ts +5 -3
- package/dist/components/BbCalendar/useToday.js +22 -12
- package/dist/components/BbCarousel/BbCarousel.vue.d.ts +51 -0
- package/dist/components/BbCarousel/BbCarousel.vue.js +5 -0
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +818 -0
- package/dist/components/BbCarousel/ptKeys.generated.d.ts +60 -0
- package/dist/components/BbCarousel/types.d.ts +213 -0
- package/dist/components/BbCarousel/types.js +27 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +8 -6
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +123 -111
- package/dist/components/BbCheckbox/ptKeys.generated.d.ts +220 -0
- package/dist/components/BbCheckbox/types.d.ts +30 -14
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +167 -306
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +222 -189
- package/dist/components/BbCheckboxGroup/ptKeys.generated.d.ts +492 -0
- package/dist/components/BbCheckboxGroup/types.d.ts +42 -28
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +4 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCollapsible/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbCollapsible/types.d.ts +5 -6
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +16 -14
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +206 -195
- package/dist/components/BbColorInput/ptKeys.generated.d.ts +656 -0
- package/dist/components/BbColorInput/types.d.ts +30 -20
- package/dist/components/BbColorInput/types.js +1 -1
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +4 -4
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +331 -296
- package/dist/components/BbColorPalette/ptKeys.generated.d.ts +40 -0
- package/dist/components/BbColorPalette/types.d.ts +17 -10
- package/dist/components/BbConfigScope/BbConfigScope.vue.d.ts +12 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue.js +4 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/BbConfigScope/types.d.ts +20 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -1
- package/dist/components/BbConfirm/confirmEntry.d.ts +2 -2
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +184 -0
- package/dist/components/BbConfirm/types.d.ts +14 -7
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -97
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +201 -197
- package/dist/components/BbDatePicker/ptKeys.generated.d.ts +324 -0
- package/dist/components/BbDatePicker/types.d.ts +22 -15
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +20 -309
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +793 -660
- package/dist/components/BbDatePickerInput/calendarFields.d.ts +91 -0
- package/dist/components/BbDatePickerInput/calendarFields.js +188 -0
- package/dist/components/BbDatePickerInput/dateFieldLayout.d.ts +6 -0
- package/dist/components/BbDatePickerInput/dateFieldLayout.js +11 -1
- package/dist/components/BbDatePickerInput/ptKeys.generated.d.ts +1156 -0
- package/dist/components/BbDatePickerInput/types.d.ts +36 -26
- package/dist/components/BbDatePickerInput/types.js +1 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +9 -8
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +211 -204
- package/dist/components/BbDialog/ptKeys.generated.d.ts +100 -0
- package/dist/components/BbDialog/types.d.ts +26 -20
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +1 -1
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +7 -6
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +399 -377
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -1
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +297 -292
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +97 -97
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +3 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbDropdown/normalizeGroups.d.ts +2 -2
- package/dist/components/BbDropdown/pointerTrail.d.ts +5 -0
- package/dist/components/BbDropdown/pointerTrail.js +26 -0
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +228 -0
- package/dist/components/BbDropdown/types.d.ts +65 -48
- package/dist/components/BbDropdown/types.js +11 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +3 -3
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +5 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +7 -6
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +168 -144
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +616 -0
- package/dist/components/BbDropdownButton/types.d.ts +47 -23
- package/dist/components/BbDropdownButton/types.js +7 -3
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +7 -26
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbDropzone/ptKeys.generated.d.ts +76 -0
- package/dist/components/BbDropzone/types.d.ts +15 -8
- package/dist/components/BbForm/BbForm.vue.d.ts +5 -5
- package/dist/components/BbForm/BbFormCustomField.d.ts +1 -1
- package/dist/components/BbForm/BbFormCustomField.js +2 -2
- package/dist/components/BbForm/bindFormField.d.ts +4 -4
- package/dist/components/BbForm/bindFormField.js +66 -66
- package/dist/components/BbForm/formFields.d.ts +5 -5
- package/dist/components/BbForm/formSchema.d.ts +4 -4
- package/dist/components/BbHost/BbHost.vue.d.ts +1 -1
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbHost/BbHostOpening.d.ts +4 -4
- package/dist/components/BbHost/types.d.ts +3 -3
- package/dist/components/BbHoverCard/BbHoverCard.vue.d.ts +4 -4
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +169 -162
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +1 -1
- package/dist/components/BbHoverCard/ptKeys.generated.d.ts +44 -0
- package/dist/components/BbHoverCard/types.d.ts +8 -9
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -3
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/components/BbIcon/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbIcon/types.d.ts +7 -8
- package/dist/components/BbIndicator/BbIndicator.vue.d.ts +4 -4
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbIndicator/ptKeys.generated.d.ts +52 -0
- package/dist/components/BbIndicator/types.d.ts +15 -8
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +15 -12
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +327 -311
- package/dist/components/BbNumberInput/numberDisplay.d.ts +10 -11
- package/dist/components/BbNumberInput/ptKeys.generated.d.ts +476 -0
- package/dist/components/BbNumberInput/types.d.ts +33 -22
- package/dist/components/BbNumberInput/types.js +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +9 -9
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +408 -406
- package/dist/components/BbOffCanvas/ptKeys.generated.d.ts +88 -0
- package/dist/components/BbOffCanvas/sheetAttrs.d.ts +1 -1
- package/dist/components/BbOffCanvas/sheetSnap.d.ts +2 -2
- package/dist/components/BbOffCanvas/types.d.ts +30 -23
- package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue.d.ts +3 -3
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +110 -114
- package/dist/components/BbPagination/paginationFit.d.ts +1 -1
- package/dist/components/BbPagination/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbPagination/types.d.ts +16 -8
- package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +121 -115
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +1 -1
- package/dist/components/BbPopover/ptKeys.generated.d.ts +52 -0
- package/dist/components/BbPopover/types.d.ts +10 -11
- package/dist/components/BbProgress/BbProgress.vue.d.ts +2 -2
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbProgress/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbProgress/types.d.ts +4 -5
- package/dist/components/BbRadio/BbRadio.vue.d.ts +8 -6
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +134 -122
- package/dist/components/BbRadio/ptKeys.generated.d.ts +196 -0
- package/dist/components/BbRadio/types.d.ts +24 -13
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +152 -248
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +248 -215
- package/dist/components/BbRadioGroup/ptKeys.generated.d.ts +492 -0
- package/dist/components/BbRadioGroup/types.d.ts +41 -24
- package/dist/components/BbRating/BbRating.vue.d.ts +9 -7
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +153 -142
- package/dist/components/BbRating/ptKeys.generated.d.ts +152 -0
- package/dist/components/BbRating/types.d.ts +31 -20
- package/dist/components/BbRating/types.js +1 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +269 -483
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +362 -341
- package/dist/components/BbSelect/ptKeys.generated.d.ts +960 -0
- package/dist/components/BbSelect/types.d.ts +50 -37
- package/dist/components/BbSelect/types.js +4 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +23 -50
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +750 -730
- package/dist/components/BbSelectPopover/knownItems.d.ts +4 -4
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +148 -0
- package/dist/components/BbSelectPopover/reclickClears.d.ts +17 -0
- package/dist/components/BbSelectPopover/reclickClears.js +4 -0
- package/dist/components/BbSelectPopover/sheetChipAttrs.d.ts +1 -1
- package/dist/components/BbSelectPopover/types.d.ts +44 -31
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSlider/BbSlider.vue.d.ts +27 -86
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +414 -331
- package/dist/components/BbSlider/ptKeys.generated.d.ts +316 -0
- package/dist/components/BbSlider/types.d.ts +162 -61
- package/dist/components/BbSlider/types.js +2 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +3 -3
- package/dist/components/BbSmoothHeight/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbSmoothHeight/types.d.ts +5 -6
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -3
- package/dist/components/BbSpinner/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbSpinner/types.d.ts +5 -6
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +6 -6
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +30 -30
- package/dist/components/BbSwitch/ptKeys.generated.d.ts +220 -0
- package/dist/components/BbSwitch/types.d.ts +15 -5
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +38 -116
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +13 -10
- package/dist/components/BbSwitchGroup/ptKeys.generated.d.ts +332 -0
- package/dist/components/BbSwitchGroup/types.d.ts +14 -5
- package/dist/components/BbTable/BbTable.vue.d.ts +13 -13
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1360 -1366
- package/dist/components/BbTable/BbTableDataRow.d.ts +4 -4
- package/dist/components/BbTable/BbTableEdgeRow.d.ts +5 -5
- package/dist/components/BbTable/BbTableExpandRow.d.ts +2 -2
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +3 -3
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +1 -1
- package/dist/components/BbTable/gridWidgets.d.ts +1 -1
- package/dist/components/BbTable/measuredFloors.d.ts +1 -1
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +1 -1
- package/dist/components/BbTable/ptKeys.generated.d.ts +280 -0
- package/dist/components/BbTable/types.d.ts +30 -22
- package/dist/components/BbTable/utils.d.ts +5 -5
- package/dist/components/BbTable/utils.js +89 -88
- package/dist/components/BbTabs/BbTabs.vue.d.ts +41 -69
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +21 -15
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -3
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +121 -122
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +3 -3
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +2 -2
- package/dist/components/BbTabs/ptKeys.generated.d.ts +226 -0
- package/dist/components/BbTabs/types.d.ts +41 -23
- package/dist/components/BbTag/BbTag.vue.d.ts +18 -16
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +248 -238
- package/dist/components/BbTag/ptKeys.generated.d.ts +540 -0
- package/dist/components/BbTag/types.d.ts +28 -18
- package/dist/components/BbTag/types.js +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +19 -171
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +176 -165
- package/dist/components/BbTextInput/ptKeys.generated.d.ts +608 -0
- package/dist/components/BbTextInput/types.d.ts +30 -21
- package/dist/components/BbTextInput/types.js +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +19 -171
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +206 -196
- package/dist/components/BbTextarea/ptKeys.generated.d.ts +608 -0
- package/dist/components/BbTextarea/types.d.ts +29 -20
- package/dist/components/BbTextarea/types.js +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +13 -33
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +137 -136
- package/dist/components/BbTimePicker/ptKeys.generated.d.ts +80 -0
- package/dist/components/BbTimePicker/types.d.ts +19 -13
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +18 -201
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +421 -397
- package/dist/components/BbTimePickerInput/ptKeys.generated.d.ts +732 -0
- package/dist/components/BbTimePickerInput/types.d.ts +35 -23
- package/dist/components/BbTimePickerInput/types.js +1 -1
- package/dist/components/BbToast/BbToast.vue.d.ts +2 -2
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +60 -53
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +2 -2
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +75 -80
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -1
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +5 -3
- package/dist/components/BbToast/ptKeys.generated.d.ts +232 -0
- package/dist/components/BbToast/types.d.ts +22 -13
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +6 -6
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +99 -88
- package/dist/components/BbTooltip/ptKeys.generated.d.ts +36 -0
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +2 -2
- package/dist/components/BbTooltip/types.d.ts +16 -9
- package/dist/components/BbTree/BbTree.vue.d.ts +7 -11
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/context.d.ts +2 -2
- package/dist/components/BbTree/ptKeys.generated.d.ts +16 -0
- package/dist/components/BbTree/types.d.ts +5 -6
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +2 -2
- package/dist/components/ChipsBox/types.d.ts +2 -2
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +2 -2
- package/dist/components/CloseIcon/CloseButton.vue.d.ts +2 -2
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +11 -16
- package/dist/components/CommaBox/CommaBox.vue.d.ts +2 -2
- package/dist/components/CommaBox/types.d.ts +2 -2
- package/dist/components/CommonField/CommonField.vue.d.ts +7 -7
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +9 -4
- package/dist/components/CommonField/messageHeightMatrix.d.ts +1 -1
- package/dist/components/CommonField/types.d.ts +18 -14
- package/dist/components/CommonFieldInput/CommonFieldInput.vue.d.ts +3 -3
- package/dist/components/CommonFieldInput/types.d.ts +4 -4
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +4 -4
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +56 -55
- package/dist/components/CommonPopover/resolvePlacement.d.ts +9 -0
- package/dist/components/CommonPopover/resolvePlacement.js +9 -0
- package/dist/components/CommonPopover/types.d.ts +5 -5
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue.d.ts +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +110 -99
- package/dist/components/CommonTimeSelector/useMeridiem.d.ts +1 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +2 -2
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +2 -2
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/FlatListBox/types.d.ts +3 -3
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +2 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/GroupedListBox/types.d.ts +3 -3
- package/dist/components/ListBox/ListBox.vue.d.ts +2 -2
- package/dist/components/ListBox/types.d.ts +3 -3
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +101 -69
- package/dist/components/OptionsContainer/types.d.ts +8 -3
- package/dist/components/Transitions/Slide.vue.d.ts +5 -3
- package/dist/components/Transitions/Slide.vue.js +1 -1
- package/dist/components/WarningIcon/WarningIcon.vue.d.ts +2 -2
- package/dist/composables/autoHost.d.ts +1 -1
- package/dist/composables/formSubmitLock.d.ts +5 -5
- package/dist/composables/hostOpenings.d.ts +6 -6
- package/dist/composables/hostRegistry.d.ts +2 -2
- package/dist/composables/overlayRegistry.d.ts +25 -25
- package/dist/composables/overlayRegistry.js +13 -7
- package/dist/composables/useBaseOptions.d.ts +2 -2
- package/dist/composables/useBbConfig.d.ts +5 -5
- package/dist/composables/useBbDialog.d.ts +17 -17
- package/dist/composables/useBbDialog.js +2 -1
- package/dist/composables/useBbDropdown.d.ts +1 -1
- package/dist/composables/useBbForm.d.ts +2 -2
- package/dist/composables/useBbFormField.d.ts +4 -4
- package/dist/composables/useBbOffCanvas.d.ts +6 -6
- package/dist/composables/useBbTable.d.ts +4 -4
- package/dist/composables/useBbTabs.d.ts +4 -4
- package/dist/composables/useBbTabs.js +99 -94
- package/dist/composables/useBreakpoint.d.ts +1 -1
- package/dist/composables/useCharacterCounter.d.ts +2 -2
- package/dist/composables/useChoiceIndicator.d.ts +2 -2
- package/dist/composables/useClosingInert.d.ts +1 -1
- package/dist/composables/useConfig.d.ts +3 -3
- package/dist/composables/useConfig.js +2 -9
- package/dist/composables/useConfigDefaults.d.ts +54 -0
- package/dist/composables/useConfigDefaults.js +56 -0
- package/dist/composables/useConfirm.d.ts +18 -18
- package/dist/composables/useDirection.d.ts +43 -0
- package/dist/composables/useDirection.js +12 -0
- package/dist/composables/useFormBinding.d.ts +5 -5
- package/dist/composables/useFormBinding.js +3 -3
- package/dist/composables/useId.d.ts +1 -1
- package/dist/composables/useItemsGetter.d.ts +3 -3
- package/dist/composables/useKeyboardInset.d.ts +1 -1
- package/dist/composables/useListboxFocus.d.ts +1 -1
- package/dist/composables/useLocale.d.ts +2 -2
- package/dist/composables/useOnDemandOpener.d.ts +3 -3
- package/dist/composables/useOverlayNavigation.d.ts +1 -1
- package/dist/composables/useOverlayYield.d.ts +1 -1
- package/dist/composables/usePassthrough.d.ts +13 -11
- package/dist/composables/usePassthrough.js +137 -133
- package/dist/composables/useQuery.d.ts +1 -1
- package/dist/composables/useRefusedCloseAnnouncement.d.ts +1 -1
- package/dist/composables/useSafeArea.d.ts +1 -1
- package/dist/composables/useSafeAreaInternal.d.ts +1 -1
- package/dist/composables/useSegmentedFields.d.ts +25 -0
- package/dist/composables/useSegmentedFields.js +165 -115
- package/dist/composables/useServerPrefetch.d.ts +2 -2
- package/dist/composables/useSheetSurface.d.ts +1 -1
- package/dist/composables/useSsrState.d.ts +2 -2
- package/dist/composables/useToast.d.ts +13 -5
- package/dist/composables/useToast.js +52 -38
- package/dist/composables/useTypeahead.js +22 -21
- package/dist/deprecation/ai-deprecations.json.d.ts +160 -15
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.d.ts +1 -1
- package/dist/directives/bbColor.d.ts +1 -1
- package/dist/directives/bbDate.d.ts +1 -1
- package/dist/directives/bbDialog.d.ts +3 -3
- package/dist/directives/bbDropdown.d.ts +1 -1
- package/dist/directives/bbDropdown.js +7 -7
- package/dist/directives/bbHoverCard.d.ts +3 -3
- package/dist/directives/bbOffCanvas.d.ts +2 -2
- package/dist/directives/bbPopover.d.ts +3 -3
- package/dist/directives/bbTime.d.ts +1 -1
- package/dist/directives/bbTooltip.d.ts +4 -4
- package/dist/directives/directivePortal.d.ts +4 -4
- package/dist/directives/overlayTrigger.d.ts +4 -4
- package/dist/directives/overlayTrigger.js +2 -1
- package/dist/i18n/eraNames.d.ts +2 -0
- package/dist/i18n/eraNames.js +2013 -0
- package/dist/i18n/index.d.ts +9 -7
- package/dist/i18n/localeTags.d.ts +36 -0
- package/dist/i18n/locales/ar.json +176 -0
- package/dist/i18n/locales/cs.json +23 -3
- package/dist/i18n/locales/da.json +23 -3
- package/dist/i18n/locales/de-CH.json +23 -3
- package/dist/i18n/locales/de.json +23 -3
- package/dist/i18n/locales/el.json +23 -3
- package/dist/i18n/locales/en-GB.json +23 -3
- package/dist/i18n/locales/en.json +23 -3
- package/dist/i18n/locales/es-MX.json +23 -3
- package/dist/i18n/locales/es.json +23 -3
- package/dist/i18n/locales/fa.json +176 -0
- package/dist/i18n/locales/fi.json +23 -3
- package/dist/i18n/locales/fr.json +23 -3
- package/dist/i18n/locales/he.json +176 -0
- package/dist/i18n/locales/hu.json +23 -3
- package/dist/i18n/locales/it.json +23 -3
- package/dist/i18n/locales/ja.json +23 -3
- package/dist/i18n/locales/ko.json +23 -3
- package/dist/i18n/locales/nb.json +23 -3
- package/dist/i18n/locales/nl.json +23 -3
- package/dist/i18n/locales/pl.json +23 -3
- package/dist/i18n/locales/pt-BR.json +23 -3
- package/dist/i18n/locales/pt-PT.json +23 -3
- package/dist/i18n/locales/ro.json +23 -3
- package/dist/i18n/locales/ru.json +23 -3
- package/dist/i18n/locales/sv.json +23 -3
- package/dist/i18n/locales/tr.json +23 -3
- package/dist/i18n/locales/uk.json +23 -3
- package/dist/i18n/locales/zh-CN.json +23 -3
- package/dist/i18n/locales/zh-HK.json +23 -3
- package/dist/i18n/locales/zh-TW.json +23 -3
- package/dist/i18n/regionHints.js +22 -22
- package/dist/i18n/regions.d.ts +73 -24
- package/dist/i18n/regions.js +57 -12
- package/dist/index.d.ts +192 -190
- package/dist/index.js +55 -54
- package/dist/llms-full.txt +8848 -5872
- package/dist/llms-medium.txt +830 -506
- package/dist/llms.txt +6 -5
- package/dist/locale-blueprint.json +26 -3
- package/dist/locale-tags.js +81 -0
- package/dist/mcp-sdk.LICENSES.txt +210 -0
- package/dist/mcp-sdk.mjs +78 -0
- package/dist/nuxt-auto-imports.d.ts +1 -1
- package/dist/nuxt-auto-imports.js +1 -1
- package/dist/nuxt-module.d.ts +5 -5
- package/dist/nuxt.js +26 -23
- package/dist/plugin.d.ts +2 -2
- package/dist/project-dts.d.ts +76 -14
- package/dist/project-dts.js +117 -63
- package/dist/setup-kit.LICENSES.txt +23 -0
- package/dist/setup-kit.mjs +9 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -3
- package/dist/types/AlertVariant.d.ts +2 -2
- package/dist/types/BadgeVariant.d.ts +2 -2
- package/dist/types/ButtonVariant.d.ts +2 -2
- package/dist/types/CheckboxVariant.d.ts +9 -6
- package/dist/types/CheckboxVariant.js +5 -1
- package/dist/types/ColumnName.d.ts +1 -1
- package/dist/types/CommonProps.d.ts +25 -3
- package/dist/types/Config.d.ts +24 -110
- package/dist/types/ConfigDefaults.d.ts +352 -0
- package/dist/types/ConfigDefaults.js +115 -0
- package/dist/types/ConfirmVariant.d.ts +2 -2
- package/dist/types/DatePickerType.d.ts +29 -2
- package/dist/types/DatePickerType.js +6 -2
- package/dist/types/DropdownItemVariant.d.ts +2 -2
- package/dist/types/FieldLayout.d.ts +3 -3
- package/dist/types/IndicatorVariant.d.ts +2 -2
- package/dist/types/InputVariant.d.ts +58 -25
- package/dist/types/ItemAccessor.d.ts +7 -1
- package/dist/types/ItemProps.d.ts +3 -3
- package/dist/types/ItemsProvider.d.ts +2 -2
- package/dist/types/Placement.d.ts +7 -2
- package/dist/types/RadioVariant.d.ts +9 -6
- package/dist/types/RadioVariant.js +5 -1
- package/dist/types/ShapeErased.d.ts +1 -1
- package/dist/types/SizeScale.d.ts +4 -0
- package/dist/types/SizeScale.js +17 -0
- package/dist/types/TabsVariant.d.ts +2 -2
- package/dist/types/ToastVariant.d.ts +2 -2
- package/dist/types/TooltipVariant.d.ts +2 -2
- package/dist/types/fallthrough.d.ts +1 -1
- package/dist/types/passthrough.d.ts +23 -23
- package/dist/types/ptComponentMap.d.ts +29 -28
- package/dist/utilities/calendar/canonicalParts.d.ts +29 -0
- package/dist/utilities/calendar/canonicalParts.js +12 -0
- package/dist/utilities/calendar/digits.d.ts +18 -0
- package/dist/utilities/calendar/digits.js +26 -0
- package/dist/utilities/calendar/gregorian.d.ts +2 -0
- package/dist/utilities/calendar/gregorian.js +36 -0
- package/dist/utilities/calendar/index.d.ts +3 -0
- package/dist/utilities/calendar/index.js +1 -0
- package/dist/utilities/calendar/international.d.ts +19 -0
- package/dist/utilities/calendar/resolve.d.ts +32 -0
- package/dist/utilities/calendar/resolve.js +12 -0
- package/dist/utilities/calendar/runtime.d.ts +49 -0
- package/dist/utilities/calendar/types.d.ts +140 -0
- package/dist/utilities/calendar/types.js +83 -0
- package/dist/utilities/functions/convertDateValue.d.ts +15 -2
- package/dist/utilities/functions/convertDateValue.js +22 -17
- package/dist/utilities/functions/elementLabel.d.ts +1 -1
- package/dist/utilities/functions/extractDomContainer.d.ts +1 -1
- package/dist/utilities/functions/isDateDisabled.d.ts +9 -1
- package/dist/utilities/functions/isDateDisabled.js +38 -21
- package/dist/utilities/functions/itemProps.d.ts +1 -1
- package/dist/utilities/functions/normalizeDateBound.d.ts +45 -2
- package/dist/utilities/functions/normalizeDateBound.js +52 -11
- package/dist/utilities/functions/parseSize.d.ts +2 -2
- package/dist/utilities/functions/readableValue.d.ts +1 -1
- package/dist/utilities/functions/responsiveDefault.d.ts +1 -1
- package/dist/utilities/functions/searchRank.d.ts +19 -0
- package/dist/utilities/functions/searchRank.js +76 -0
- package/dist/utilities/functions/slotKey.d.ts +1 -1
- package/dist/utilities/functions/toggleInput.d.ts +1 -1
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +3 -3
- package/dist/utilities/functions/when.d.ts +1 -1
- package/dist/utilities/misc/autofocus.d.ts +2 -2
- package/dist/utilities/misc/listboxMetrics.d.ts +2 -2
- package/dist/utilities/misc/maskaDataOptions.d.ts +1 -1
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +1 -1
- package/dist/utilities/misc/ssrValue.d.ts +1 -1
- package/dist/utils/configDefaults.d.ts +43 -0
- package/dist/utils/configDefaults.js +170 -0
- package/dist/utils/configScope.d.ts +43 -0
- package/dist/utils/configScope.js +13 -0
- package/dist/utils/copyData.d.ts +2 -2
- package/dist/utils/cssLayers.d.ts +1 -1
- package/dist/utils/focusVisibility.d.ts +1 -1
- package/dist/utils/injectLibraryStyles.d.ts +1 -1
- package/dist/utils/overlayEscapeStack.d.ts +1 -1
- package/dist/utils/passthrough.d.ts +5 -8
- package/dist/utils/passthrough.js +31 -29
- package/dist/utils/passthroughDeduper.d.ts +1 -1
- package/dist/utils/releasedActivator.d.ts +20 -0
- package/dist/utils/releasedActivator.js +11 -0
- package/dist/utils/versionCheck.d.ts +1 -1
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +139 -218
- package/dist/vite.js +451 -425
- package/llms.txt +6 -5
- package/package.json +51 -19
- package/scripts/README.md +2 -1
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/agent-manifest.mjs +107 -22
- package/scripts/lib/agent-refresh.mjs +151 -0
- package/scripts/lib/agent-setup.mjs +679 -0
- package/scripts/lib/carousel-items-without-slide.mjs +263 -0
- package/scripts/lib/carousel-prop-or-local.mjs +117 -0
- package/scripts/lib/check-fix.mjs +1 -1
- package/scripts/lib/collapsible-trigger-aria.mjs +1 -1
- package/scripts/lib/css-class-check.mjs +3 -3
- package/scripts/lib/css-local-check.mjs +25 -17
- package/scripts/lib/css-surface-answer.mjs +117 -0
- package/scripts/lib/define-preset-copy.mjs +1 -1
- package/scripts/lib/distributed-alias.mjs +81 -0
- package/scripts/lib/doc-sections.mjs +12 -4
- package/scripts/lib/dropdown-default-slot.mjs +1 -1
- package/scripts/lib/eslint-disable.mjs +60 -2
- package/scripts/lib/eslint-plugin.d.ts +13 -2
- package/scripts/lib/eslint-plugin.mjs +609 -64
- package/scripts/lib/form-v-model.mjs +1 -1
- package/scripts/lib/hand-imported-styles.mjs +2 -2
- package/scripts/lib/hand-roll-hints.mjs +25 -3
- package/scripts/lib/helper-canon.mjs +4 -4
- package/scripts/lib/helpers-add.mjs +39 -24
- package/scripts/lib/hidden-label-placeholder.mjs +1 -1
- package/scripts/lib/idiom-scan.mjs +12 -11
- package/scripts/lib/is-direct-run.mjs +20 -0
- package/scripts/lib/items-provider-context.mjs +1 -1
- package/scripts/lib/linked-target.mjs +26 -2
- package/scripts/lib/local-components.mjs +2 -2
- package/scripts/lib/locale-check.mjs +109 -13
- package/scripts/lib/mcp-config.mjs +140 -75
- package/scripts/lib/mcp-sdk.mjs +199 -0
- package/scripts/lib/migrate-fix.mjs +3 -3
- package/scripts/lib/plugin-options-check.mjs +170 -0
- package/scripts/lib/pnp.mjs +165 -0
- package/scripts/lib/portal-names.mjs +4 -4
- package/scripts/lib/prefer-v-bb-dialog.mjs +1 -1
- package/scripts/lib/project-variant-dts.mjs +182 -48
- package/scripts/lib/reactive-v-model.mjs +2 -2
- package/scripts/lib/redundant-item-accessor.mjs +1 -1
- package/scripts/lib/renamed-item-field.mjs +1 -1
- package/scripts/lib/renamed-slot-prop.mjs +524 -0
- package/scripts/lib/rule-registry.mjs +1 -1
- package/scripts/lib/setup-edits.mjs +1845 -0
- package/scripts/lib/setup.mjs +440 -0
- package/scripts/lib/slot-key.mjs +1 -1
- package/scripts/lib/slot-renames.mjs +3 -3
- package/scripts/lib/squashed-slot-words.mjs +1 -1
- package/scripts/lib/tab-links.mjs +2 -2
- package/scripts/lib/text-null-value.mjs +1 -1
- package/scripts/lib/toolchain-check.mjs +3 -3
- package/scripts/lib/tooling-options.mjs +87 -0
- package/scripts/lib/unimported-components.mjs +1 -1
- package/scripts/lib/unstyled-variants.mjs +1 -1
- package/scripts/lib/valid-locale.mjs +119 -0
- package/scripts/lib/validate-bb-markup.mjs +219 -115
- package/scripts/lib/wrapper-props.mjs +2 -2
- package/dist/ai/BbPtScope.md +0 -138
- package/dist/ai/manifest/components/BbPtScope.json +0 -21
- package/dist/ai/source/BbPtScope.md +0 -54
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +0 -58
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +0 -28
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +0 -2
- package/dist/components/BbNumberInput/warroom/harness.d.ts +0 -217
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +0 -150
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +0 -12
- package/dist/components/BbPtScope/BbPtScope.vue.js +0 -4
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +0 -12
- package/dist/components/BbPtScope/types.d.ts +0 -15
- package/dist/components/BbTable/warroom/harness.d.ts +0 -260
- package/dist/types/PtScope.d.ts +0 -15
- package/dist/utilities/functions/head.js +0 -3
- package/dist/utilities/functions/matchAnyKey.d.ts +0 -8
- package/dist/utilities/functions/matchAnyKey.js +0 -14
- package/dist/utilities/functions/pipe.d.ts +0 -3
- package/dist/utilities/functions/range.js +0 -7
- package/dist/utils/ptScope.d.ts +0 -8
- package/dist/utils/ptScope.js +0 -3
- package/scripts/lib/check-queue.mjs +0 -102
- package/scripts/lib/component-attr-targets.ts +0 -123
- package/scripts/lib/component-tree.ts +0 -648
- package/scripts/lib/consumer-install.mjs +0 -64
- package/scripts/lib/css-class-surface.mjs +0 -328
- package/scripts/lib/css-color-resolve.mjs +0 -296
- package/scripts/lib/css-comment-text.mjs +0 -16
- package/scripts/lib/design-token-manifest.mjs +0 -506
- package/scripts/lib/ensure-manifest.mjs +0 -135
- package/scripts/lib/example-checks.mjs +0 -337
- package/scripts/lib/guide-claims.mjs +0 -452
- package/scripts/lib/manifest-pointers.mjs +0 -71
- package/scripts/lib/pack.mjs +0 -55
- package/scripts/lib/public-type-exports.mjs +0 -273
- package/scripts/lib/quiet-gate.mjs +0 -385
- package/scripts/lib/recipe-excerpts.mjs +0 -98
- package/scripts/lib/swap-noun.mjs +0 -33
- package/scripts/lib/token-color-mix.mjs +0 -114
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:id="id"
|
|
11
11
|
class="bb-date-picker-input"
|
|
12
12
|
:clearable="clearable && hasValue"
|
|
13
|
-
:compact="compact"
|
|
13
|
+
:compact="configDefaults.compact"
|
|
14
14
|
:description="description"
|
|
15
15
|
:disabled="disabled"
|
|
16
16
|
:errors="fieldErrors"
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
:label-align="labelAlign"
|
|
25
25
|
:label-mode="resolvedLabelMode"
|
|
26
26
|
:label-position="labelPosition"
|
|
27
|
-
:layout="layout"
|
|
27
|
+
:layout="configDefaults.layout"
|
|
28
28
|
:loading="loading"
|
|
29
29
|
:name="name"
|
|
30
30
|
:passthrough="passthrough"
|
|
31
31
|
:readonly="fieldReadonly"
|
|
32
|
-
:reverse="reverse"
|
|
32
|
+
:reverse="configDefaults.reverse"
|
|
33
33
|
:show-asterisk="showAsterisk"
|
|
34
34
|
:show-hint="showHint"
|
|
35
35
|
:warnings="warnings"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
'bb-date-picker-input__field--range': range,
|
|
57
57
|
}"
|
|
58
58
|
:clearable="clearable && !isEmpty(fieldModel)"
|
|
59
|
-
:compact="compact"
|
|
59
|
+
:compact="configDefaults.compact"
|
|
60
60
|
:disabled="disabled"
|
|
61
61
|
:has-errors="fieldHasErrors"
|
|
62
62
|
:has-value="hasValue"
|
|
@@ -93,74 +93,106 @@
|
|
|
93
93
|
>
|
|
94
94
|
{{ placeholderText }}
|
|
95
95
|
</span>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
>
|
|
100
|
-
<!-- `type="week"`: the ISO week's literal `W` (W44 2026). -->
|
|
96
|
+
<!-- A date or a time is one run, isolated and read left to right like
|
|
97
|
+
its digits; the runs follow the page's direction. -->
|
|
98
|
+
<template v-for="(run, r) in runs" :key="run.key">
|
|
101
99
|
<span
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
@click="focusField(descriptor, { select: true })"
|
|
106
|
-
>W</span
|
|
100
|
+
class="bb-segmented-field__run"
|
|
101
|
+
:class="`bb-segmented-field__run--${run.kind}`"
|
|
102
|
+
:dir="runDir(run)"
|
|
107
103
|
>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
104
|
+
<template
|
|
105
|
+
v-for="({ descriptor, index }, i) in run.items"
|
|
106
|
+
:key="descriptorKey(descriptor)"
|
|
107
|
+
>
|
|
108
|
+
<!-- `type="week"`: the ISO week's literal `W` (W44 2026). -->
|
|
109
|
+
<span
|
|
110
|
+
v-if="descriptor.field === 'week'"
|
|
111
|
+
aria-hidden="true"
|
|
112
|
+
class="bb-segmented-field__separator bb-segmented-field__week-prefix"
|
|
113
|
+
@click="focusField(descriptor, { select: true })"
|
|
114
|
+
>W</span
|
|
115
|
+
>
|
|
116
|
+
<span
|
|
117
|
+
class="bb-segmented-field__field-sizer"
|
|
118
|
+
:data-value="getSizedValue(descriptor)"
|
|
119
|
+
>
|
|
120
|
+
<!-- eslint-disable vue/attributes-order -- `pt` binds LAST so a consumer listener runs after ours (PASSTHROUGH.md T17) -->
|
|
121
|
+
<input
|
|
122
|
+
:id="
|
|
123
|
+
index === 0 ? fieldId : getFieldId(descriptor, fieldId)
|
|
124
|
+
"
|
|
125
|
+
:ref="
|
|
126
|
+
(el) =>
|
|
127
|
+
(fieldRefs[descriptorKey(descriptor)] =
|
|
128
|
+
el as HTMLInputElement)
|
|
129
|
+
"
|
|
130
|
+
:aria-describedby="describedBy(ariaDescribedby, fieldId)"
|
|
131
|
+
:aria-disabled="disabled || undefined"
|
|
132
|
+
:aria-invalid="fieldHasErrors ? 'true' : undefined"
|
|
133
|
+
:aria-label="getFieldLabel(descriptor)"
|
|
134
|
+
:aria-readonly="isInputReadonly || undefined"
|
|
135
|
+
:autocomplete="configDefaults.autocomplete"
|
|
136
|
+
v-autofocus
|
|
137
|
+
:autofocus="autofocus && index === 0"
|
|
138
|
+
class="bb-segmented-field__input"
|
|
139
|
+
:class="[
|
|
140
|
+
`bb-segmented-field__input--${descriptor.field}`,
|
|
141
|
+
`bb-segmented-field__input--${descriptor.segment}`,
|
|
142
|
+
]"
|
|
143
|
+
:disabled="disabled"
|
|
144
|
+
:inputmode="inputmodeFor(descriptor.field)"
|
|
145
|
+
:maxlength="fieldSpecs[descriptor.field].maxLength"
|
|
146
|
+
:name="getFieldName(descriptor)"
|
|
147
|
+
:readonly="isInputReadonly"
|
|
148
|
+
:required="fieldRequired"
|
|
149
|
+
:aria-required="fieldAriaRequired"
|
|
150
|
+
:tabindex="isSegmentEntry(index) ? 0 : -1"
|
|
151
|
+
type="text"
|
|
152
|
+
:value="
|
|
153
|
+
displayOf(fields[descriptor.segment][descriptor.field])
|
|
154
|
+
"
|
|
155
|
+
@blur="onFieldBlur(descriptor)"
|
|
156
|
+
@focus="onSegmentFieldFocus(descriptor, $event)"
|
|
157
|
+
@input="onSegmentInput(descriptor, $event)"
|
|
158
|
+
@keydown="onSegmentKeydown(descriptor, $event)"
|
|
159
|
+
@paste="onFieldPaste(descriptor, $event)"
|
|
160
|
+
v-bind="
|
|
161
|
+
mergeProps(passthrough.controlAttrs, passthrough.input)
|
|
162
|
+
"
|
|
163
|
+
/>
|
|
164
|
+
<!-- eslint-enable vue/attributes-order -->
|
|
165
|
+
</span>
|
|
166
|
+
<span
|
|
167
|
+
v-if="i < run.items.length - 1"
|
|
168
|
+
aria-hidden="true"
|
|
169
|
+
class="bb-segmented-field__separator"
|
|
170
|
+
role="presentation"
|
|
171
|
+
@click="focusField(fieldOrder[index + 1], { select: true })"
|
|
172
|
+
>{{
|
|
173
|
+
separatorBetween(fieldOrder[index], fieldOrder[index + 1])
|
|
174
|
+
}}</span
|
|
175
|
+
>
|
|
176
|
+
</template>
|
|
151
177
|
</span>
|
|
152
178
|
<span
|
|
153
|
-
v-if="
|
|
179
|
+
v-if="r < runs.length - 1"
|
|
154
180
|
aria-hidden="true"
|
|
155
181
|
class="bb-segmented-field__separator"
|
|
156
182
|
:class="{
|
|
157
183
|
'bb-segmented-field__separator--range':
|
|
158
|
-
fieldOrder[
|
|
184
|
+
fieldOrder[lastIndex(run)].segment !==
|
|
185
|
+
fieldOrder[lastIndex(run) + 1].segment,
|
|
159
186
|
}"
|
|
160
187
|
role="presentation"
|
|
161
|
-
@click="
|
|
188
|
+
@click="
|
|
189
|
+
focusField(fieldOrder[lastIndex(run) + 1], { select: true })
|
|
190
|
+
"
|
|
162
191
|
>{{
|
|
163
|
-
separatorBetween(
|
|
192
|
+
separatorBetween(
|
|
193
|
+
fieldOrder[lastIndex(run)],
|
|
194
|
+
fieldOrder[lastIndex(run) + 1]
|
|
195
|
+
)
|
|
164
196
|
}}</span
|
|
165
197
|
>
|
|
166
198
|
</template>
|
|
@@ -175,12 +207,12 @@
|
|
|
175
207
|
<BbDatePicker
|
|
176
208
|
v-if="!isCalendarDisabled"
|
|
177
209
|
:active-segment="timeTargetSegment"
|
|
178
|
-
:adaptive="adaptive"
|
|
210
|
+
:adaptive="configDefaults.adaptive"
|
|
179
211
|
:ampm="ampm"
|
|
180
212
|
:anchor="wrapper"
|
|
181
213
|
:disabled="disabled"
|
|
182
214
|
:first-day-of-week="firstDayOfWeek"
|
|
183
|
-
:floating="floating"
|
|
215
|
+
:floating="configDefaults.floating"
|
|
184
216
|
:label="accessibleButtonLabel"
|
|
185
217
|
:max="max"
|
|
186
218
|
:min="min"
|
|
@@ -272,6 +304,7 @@ import {
|
|
|
272
304
|
onBeforeUnmount,
|
|
273
305
|
onDeactivated,
|
|
274
306
|
ref,
|
|
307
|
+
toRaw,
|
|
275
308
|
useAttrs,
|
|
276
309
|
watch,
|
|
277
310
|
} from 'vue';
|
|
@@ -281,6 +314,7 @@ import { default as customParseFormat } from 'dayjs/plugin/customParseFormat';
|
|
|
281
314
|
import { default as isSameOrAfter } from 'dayjs/plugin/isSameOrAfter';
|
|
282
315
|
import { default as isSameOrBefore } from 'dayjs/plugin/isSameOrBefore';
|
|
283
316
|
import { useConfig } from '@/composables/useConfig';
|
|
317
|
+
import { useConfigDefaults } from '@/composables/useConfigDefaults';
|
|
284
318
|
import { useFormBinding } from '@/composables/useFormBinding';
|
|
285
319
|
import { useLocale } from '@/composables/useLocale';
|
|
286
320
|
import { useLogger } from '@/composables/useLogger';
|
|
@@ -292,7 +326,9 @@ import {
|
|
|
292
326
|
variantPt,
|
|
293
327
|
} from '@/composables/usePassthrough';
|
|
294
328
|
import {
|
|
329
|
+
fieldRuns,
|
|
295
330
|
useSegmentedFields,
|
|
331
|
+
type FieldRun,
|
|
296
332
|
type SegmentedFieldSpec,
|
|
297
333
|
type FieldDescriptor as SegmentedFieldDescriptor,
|
|
298
334
|
} from '@/composables/useSegmentedFields';
|
|
@@ -318,10 +354,18 @@ import { isEmpty } from '@/utilities/functions/empty';
|
|
|
318
354
|
import { hash } from '@/utilities/functions/hash';
|
|
319
355
|
import { isNotEmpty } from '@/utilities/functions/isNotEmpty';
|
|
320
356
|
import { normalizeDateBound } from '@/utilities/functions/normalizeDateBound';
|
|
357
|
+
import { isDateDisabled as isDateDisabledIn } from '@/utilities/functions/isDateDisabled';
|
|
321
358
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
322
359
|
import calendarIcon from '@/assets/svgs/calendar.svg?raw';
|
|
360
|
+
import { calendars, localeOf } from '@/utilities/calendar';
|
|
361
|
+
import type { InternationalCalendarId } from '@/utilities/calendar/types';
|
|
362
|
+
// `null` in a build whose locales are all Gregorian: the calendar fields
|
|
363
|
+
// below are then dead code, and the bundler drops them with the engine seams.
|
|
364
|
+
import { formatCalendarDate, formatDigits } from 'virtual:bitboss-ui/calendars';
|
|
365
|
+
import { foldDigits } from '@/utilities/calendar/digits';
|
|
323
366
|
import {
|
|
324
367
|
formatDateOf,
|
|
368
|
+
intlLocaleOf,
|
|
325
369
|
spokenDateOptionsOf,
|
|
326
370
|
timeFieldsOf,
|
|
327
371
|
useDayjsLocale,
|
|
@@ -347,10 +391,21 @@ import {
|
|
|
347
391
|
type BbDatePickerInputSlots,
|
|
348
392
|
type DatePickerInputError,
|
|
349
393
|
} from './types';
|
|
350
|
-
import {
|
|
394
|
+
import {
|
|
395
|
+
dateLayoutFromHint,
|
|
396
|
+
dateReadsRtl,
|
|
397
|
+
monthLayoutFromHint,
|
|
398
|
+
} from './dateFieldLayout';
|
|
399
|
+
import {
|
|
400
|
+
calendarFieldSpecs,
|
|
401
|
+
calendarFieldsOf,
|
|
402
|
+
eraHint,
|
|
403
|
+
matchEra,
|
|
404
|
+
type CalendarFieldValues,
|
|
405
|
+
} from './calendarFields';
|
|
351
406
|
|
|
352
407
|
defineOptions({
|
|
353
|
-
// An app's own variants as declared `pt:<part>:<name>` props
|
|
408
|
+
// An app's own variants as declared `pt:<part>:<name>` props.
|
|
354
409
|
mixins: [variantPt(BB_DATE_PICKER_INPUT_PT)],
|
|
355
410
|
inheritAttrs: false,
|
|
356
411
|
});
|
|
@@ -370,14 +425,20 @@ const declaredProps = withDefaults(
|
|
|
370
425
|
>(),
|
|
371
426
|
{
|
|
372
427
|
// `undefined` (declared, not omitted) keeps `adaptive` three-state: it disables
|
|
373
|
-
// Vue's absent→`false` Boolean cast so `props.adaptive ??
|
|
428
|
+
// Vue's absent→`false` Boolean cast so `props.adaptive ?? all.adaptive`
|
|
374
429
|
// (here and in BbDatePicker) can reach the config default, while keeping the
|
|
375
430
|
// Boolean type so the valueless `adaptive` shorthand still resolves to `true`.
|
|
376
431
|
adaptive: undefined,
|
|
377
|
-
autocomplete:
|
|
432
|
+
autocomplete: undefined,
|
|
378
433
|
disableCalendar: false,
|
|
379
434
|
disableWriting: false,
|
|
380
435
|
type: 'date',
|
|
436
|
+
// Tri-state: unset lets the components map show through.
|
|
437
|
+
compact: undefined,
|
|
438
|
+
// Tri-state: unset lets the components map show through.
|
|
439
|
+
reverse: undefined,
|
|
440
|
+
// Tri-state: unset lets the components map show through.
|
|
441
|
+
floating: undefined,
|
|
381
442
|
}
|
|
382
443
|
);
|
|
383
444
|
|
|
@@ -396,7 +457,7 @@ const anyRangeProps = declaredProps as unknown as ShapeErasedProps<
|
|
|
396
457
|
>;
|
|
397
458
|
const anyRangeEmit = declaredEmit as unknown as BbDatePickerInputEvents;
|
|
398
459
|
|
|
399
|
-
// Inside a BbForm the field joins it
|
|
460
|
+
// Inside a BbForm the field joins it: `props` / `emit` are bound.
|
|
400
461
|
const {
|
|
401
462
|
props,
|
|
402
463
|
emit,
|
|
@@ -465,12 +526,17 @@ onBeforeUnmount(resetActiveState);
|
|
|
465
526
|
|
|
466
527
|
const showHint = computed(() => props.persistentHint || isActive.value);
|
|
467
528
|
const hasValue = computed(() => isNotEmpty(props.modelValue));
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
|
|
529
|
+
const configDefaults = useConfigDefaults('BbDatePickerInput', props, {
|
|
530
|
+
labelMode: 'outside',
|
|
531
|
+
autocomplete: 'off',
|
|
532
|
+
compact: false,
|
|
533
|
+
reverse: false,
|
|
534
|
+
floating: false,
|
|
535
|
+
});
|
|
536
|
+
const resolvedLabelMode = computed(() => configDefaults.labelMode);
|
|
471
537
|
|
|
472
538
|
/**
|
|
473
|
-
* Passthrough
|
|
539
|
+
* Passthrough. The frame binds `root` /
|
|
474
540
|
* `label` / `description` / `message` / `hint`, the box row `box` / `icon` /
|
|
475
541
|
* `spinner` / `prefix` / `clear`; `input` lands on every segment field and
|
|
476
542
|
* `suffix` on the affix span beside the calendar trigger. `panel`, `sheet` and
|
|
@@ -509,13 +575,30 @@ const passthrough = usePassthrough({
|
|
|
509
575
|
const isDateTime = computed(() => props.type === 'datetime');
|
|
510
576
|
/** `month`/`year` select a calendar label — no zone, no time, always floating. */
|
|
511
577
|
const isCoarse = computed(() => isCoarseType(props.type));
|
|
512
|
-
const isFloating = computed(
|
|
578
|
+
const isFloating = computed(
|
|
579
|
+
() => configDefaults.floating || isLabelType(props.type)
|
|
580
|
+
);
|
|
513
581
|
/** `type="week"`: a week segment and a year segment, `W44 2026`. */
|
|
514
582
|
const isWeek = computed(() => props.type === 'week');
|
|
515
583
|
/** The dayjs unit this field edits: `day`, `month` or `year`. */
|
|
516
584
|
const unit = computed(() => unitOfType(props.type));
|
|
517
585
|
/** The floating string shape for this type (`YYYY-MM-DD` / `YYYY-MM` / `YYYY`). */
|
|
518
|
-
|
|
586
|
+
/**
|
|
587
|
+
* The locale's calendar off Gregorian (`fa` → Persian), for the value, the
|
|
588
|
+
* bounds and the disabled check: a `month` / `year` is that calendar's, its
|
|
589
|
+
* value the ISO day it starts on. Nothing in a Gregorian-only build.
|
|
590
|
+
*/
|
|
591
|
+
const localeCalendar = formatCalendarDate
|
|
592
|
+
? computed(() => {
|
|
593
|
+
const { calendar } = localeOf(config.locale);
|
|
594
|
+
return calendar === 'gregory'
|
|
595
|
+
? undefined
|
|
596
|
+
: calendars[calendar as InternationalCalendarId];
|
|
597
|
+
})
|
|
598
|
+
: null;
|
|
599
|
+
const valueFormat = computed(() =>
|
|
600
|
+
formatOfType(props.type, localeCalendar?.value)
|
|
601
|
+
);
|
|
519
602
|
dayjs.extend(customParseFormat);
|
|
520
603
|
dayjs.extend(isSameOrAfter);
|
|
521
604
|
dayjs.extend(isSameOrBefore);
|
|
@@ -558,7 +641,7 @@ const isWritingAllowed = computed(() => {
|
|
|
558
641
|
});
|
|
559
642
|
|
|
560
643
|
/*
|
|
561
|
-
*
|
|
644
|
+
* when writing is off for this device, the field
|
|
562
645
|
* is a button for the picker — a tap or click anywhere on the box opens it,
|
|
563
646
|
* and Enter / Space on a segment does too. The ✕ still only clears, the
|
|
564
647
|
* activator keeps its own toggle, and a click inside the open panel is the
|
|
@@ -604,12 +687,35 @@ const onSegmentKeydown = (
|
|
|
604
687
|
openPicker();
|
|
605
688
|
return;
|
|
606
689
|
}
|
|
607
|
-
//
|
|
690
|
+
// a read-only field (its `readonly`, or its form saving) refuses
|
|
608
691
|
// the keys that change a segment; moving between segments still works.
|
|
609
692
|
if (props.readonly && changesSegment(event)) {
|
|
610
693
|
event.preventDefault();
|
|
611
694
|
return;
|
|
612
695
|
}
|
|
696
|
+
// An era year steps inside its era (民國 1 stays 1), never wrapping to the
|
|
697
|
+
// highest year a field could hold.
|
|
698
|
+
if (
|
|
699
|
+
formatCalendarDate &&
|
|
700
|
+
kit!.value?.eras.length &&
|
|
701
|
+
descriptor.field === 'year' &&
|
|
702
|
+
(event.key === 'ArrowUp' || event.key === 'ArrowDown')
|
|
703
|
+
) {
|
|
704
|
+
event.preventDefault();
|
|
705
|
+
const group = fields.value[descriptor.segment];
|
|
706
|
+
const last = kit!.value.lastYearOf(group.era);
|
|
707
|
+
const year = group.year ? parseInt(group.year, 10) : 0;
|
|
708
|
+
const next = group.year
|
|
709
|
+
? Math.min(Math.max(year + (event.key === 'ArrowUp' ? 1 : -1), 1), last)
|
|
710
|
+
: 1;
|
|
711
|
+
if (next !== year) {
|
|
712
|
+
group.year = String(next);
|
|
713
|
+
updateAllSizedValues();
|
|
714
|
+
combineFieldsToModelValue({ finalize: false });
|
|
715
|
+
}
|
|
716
|
+
(event.target as HTMLInputElement).value = displayOf(group.year);
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
613
719
|
onFieldKeydown(descriptor, event);
|
|
614
720
|
};
|
|
615
721
|
|
|
@@ -665,13 +771,21 @@ const parseBoundary = (value: string): Dayjs => {
|
|
|
665
771
|
* only push the same rounding into every consumer.
|
|
666
772
|
*/
|
|
667
773
|
const boundMin = computed(() =>
|
|
668
|
-
normalizeDateBound(
|
|
669
|
-
|
|
774
|
+
normalizeDateBound(
|
|
775
|
+
props.min,
|
|
776
|
+
props.type,
|
|
777
|
+
'min',
|
|
778
|
+
(m) => logger.warn(`BbDatePickerInput: ${m}`),
|
|
779
|
+
localeCalendar?.value
|
|
670
780
|
)
|
|
671
781
|
);
|
|
672
782
|
const boundMax = computed(() =>
|
|
673
|
-
normalizeDateBound(
|
|
674
|
-
|
|
783
|
+
normalizeDateBound(
|
|
784
|
+
props.max,
|
|
785
|
+
props.type,
|
|
786
|
+
'max',
|
|
787
|
+
(m) => logger.warn(`BbDatePickerInput: ${m}`),
|
|
788
|
+
localeCalendar?.value
|
|
675
789
|
)
|
|
676
790
|
);
|
|
677
791
|
|
|
@@ -732,8 +846,27 @@ const valueOptions = computed(() => ({
|
|
|
732
846
|
floating: isFloating.value,
|
|
733
847
|
utc: props.utc,
|
|
734
848
|
type: props.type,
|
|
849
|
+
calendar: localeCalendar?.value,
|
|
735
850
|
}));
|
|
736
851
|
|
|
852
|
+
/**
|
|
853
|
+
* The locale's calendar and digits (`fa` → Persian, `۱۴۰۵`). Outside
|
|
854
|
+
* Gregorian the date fields are that calendar's (`calendarFields`); a week
|
|
855
|
+
* stays ISO under every calendar, so it keeps the Gregorian path.
|
|
856
|
+
*/
|
|
857
|
+
const kit = formatCalendarDate
|
|
858
|
+
? computed(() => {
|
|
859
|
+
const { calendar, intl } = localeOf(config.locale);
|
|
860
|
+
if (calendar === 'gregory' || props.type === 'week') return null;
|
|
861
|
+
// The bundled engine calendar (`localeOf` only resolves to one this build has).
|
|
862
|
+
const system = calendars[calendar as InternationalCalendarId];
|
|
863
|
+
if (!system) return null;
|
|
864
|
+
return calendarFieldsOf(system, intl, (date, options) =>
|
|
865
|
+
formatDateOf(date, config.locale, options)
|
|
866
|
+
);
|
|
867
|
+
})
|
|
868
|
+
: null;
|
|
869
|
+
|
|
737
870
|
const toOuterValue = (value: Dayjs): string =>
|
|
738
871
|
convertToOuterValue(value, valueOptions.value);
|
|
739
872
|
|
|
@@ -743,7 +876,7 @@ const toInnerValue = (value: string): Dayjs =>
|
|
|
743
876
|
// `floating` + `utc` is incoherent (a plain date has no zone): `utc` is
|
|
744
877
|
// ignored, matching the library's warn-and-ignore pattern for inert
|
|
745
878
|
// combinations (cf. the slider's range-mode stepper warning).
|
|
746
|
-
if (import.meta.env.DEV &&
|
|
879
|
+
if (import.meta.env.DEV && configDefaults.floating && props.utc) {
|
|
747
880
|
logger.warn(
|
|
748
881
|
'BbDatePickerInput: `utc` has no effect when `floating` is set — a plain date carries no zone. The prop is ignored.'
|
|
749
882
|
);
|
|
@@ -770,7 +903,7 @@ if (import.meta.env.DEV) {
|
|
|
770
903
|
'BbDatePickerInput: `v-model:time` has no effect without `type="datetime"`. The model is ignored.'
|
|
771
904
|
);
|
|
772
905
|
} else if (
|
|
773
|
-
|
|
906
|
+
configDefaults.floating &&
|
|
774
907
|
!getCurrentInstance()?.vnode.props?.['onUpdate:time']
|
|
775
908
|
) {
|
|
776
909
|
// A floating date is plain `YYYY-MM-DD`: `v-model:time` is the only
|
|
@@ -845,6 +978,10 @@ const applyPickedDate = (segment: Segment, value: string) => {
|
|
|
845
978
|
const parsed = toInnerValue(value);
|
|
846
979
|
if (!parsed.isValid()) return;
|
|
847
980
|
const group = fields.value[segment];
|
|
981
|
+
if (formatCalendarDate && kit!.value) {
|
|
982
|
+
writeDateFields(group, parsed);
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
848
985
|
group.day = parsed.format('DD');
|
|
849
986
|
group.month = parsed.format('MM');
|
|
850
987
|
group.year = parsed.format('YYYY');
|
|
@@ -869,7 +1006,7 @@ const weekFieldsOf = (date: Dayjs) => {
|
|
|
869
1006
|
const calendarEventListeners = {
|
|
870
1007
|
'onUpdate:modelValue': (value: string | string[] | null) => {
|
|
871
1008
|
// A range calendar reports "nothing picked" as `null`; the input's
|
|
872
|
-
// empty range is `[]
|
|
1009
|
+
// empty range is `[]`.
|
|
873
1010
|
if (value === null && props.range) value = [];
|
|
874
1011
|
if (!isDateTime.value) {
|
|
875
1012
|
emit('update:modelValue', value);
|
|
@@ -907,7 +1044,19 @@ const calendarEventListeners = {
|
|
|
907
1044
|
const dateCompleteFor = (segment: Segment) => {
|
|
908
1045
|
const g = fields.value[segment];
|
|
909
1046
|
if (isWeek.value) return !!(g.week && g.year && g.year.length === 4);
|
|
910
|
-
return !!(
|
|
1047
|
+
return !!(
|
|
1048
|
+
g.day &&
|
|
1049
|
+
g.month &&
|
|
1050
|
+
(formatCalendarDate ? yearComplete(g) : g.year.length === 4)
|
|
1051
|
+
);
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
/** The year (and its era, where there is one) is typed far enough to read. */
|
|
1055
|
+
const yearComplete = (g: Record<DateFieldKey, string>) => {
|
|
1056
|
+
const k = kit!.value;
|
|
1057
|
+
if (!k) return g.year.length === 4;
|
|
1058
|
+
if (k.eras.length && !g.era) return false;
|
|
1059
|
+
return k.yearFullLength ? g.year.length === k.yearDigits : !!g.year;
|
|
911
1060
|
};
|
|
912
1061
|
|
|
913
1062
|
/**
|
|
@@ -984,7 +1133,7 @@ const spokenValue = (value: Dayjs) => {
|
|
|
984
1133
|
};
|
|
985
1134
|
|
|
986
1135
|
/**
|
|
987
|
-
*
|
|
1136
|
+
* the trigger's name reads exactly what the field
|
|
988
1137
|
* displays — the segments, time included — not `modelValue`, which under
|
|
989
1138
|
* `floating` holds no time (the `time` companion does) and so read 00:00
|
|
990
1139
|
* while the field showed 09:30. Pure: an incomplete or impossible segment
|
|
@@ -998,6 +1147,14 @@ const displayedValue = (segment: Segment): Dayjs | null => {
|
|
|
998
1147
|
return monday.isValid() ? monday : null;
|
|
999
1148
|
}
|
|
1000
1149
|
const active = activeDateFields.value;
|
|
1150
|
+
if (formatCalendarDate && kit!.value) {
|
|
1151
|
+
const date = kit!.value.dateOf(calendarValues(g), active);
|
|
1152
|
+
const time = isDateTime.value ? timeOfGroup(g) : null;
|
|
1153
|
+
if (!date || (isDateTime.value && !time)) return null;
|
|
1154
|
+
return time
|
|
1155
|
+
? date.hour(+time.hour).minute(+time.minute).second(+time.second)
|
|
1156
|
+
: date;
|
|
1157
|
+
}
|
|
1001
1158
|
const day = active.has('day') ? g.day.padStart(2, '0') : '01';
|
|
1002
1159
|
const month = active.has('month') ? g.month.padStart(2, '0') : '01';
|
|
1003
1160
|
let text = `${g.year.padStart(4, '0')}-${month}-${day}`;
|
|
@@ -1043,6 +1200,16 @@ const isDateDisabled = (date: Dayjs) => {
|
|
|
1043
1200
|
}
|
|
1044
1201
|
|
|
1045
1202
|
let passing = true;
|
|
1203
|
+
// Off Gregorian a month or a year is the calendar's: compared where each
|
|
1204
|
+
// starts, inside the calendar's range (the shared check).
|
|
1205
|
+
if (formatCalendarDate && localeCalendar!.value && isCoarse.value)
|
|
1206
|
+
return isDateDisabledIn(date, {
|
|
1207
|
+
min: props.min,
|
|
1208
|
+
max: props.max,
|
|
1209
|
+
selectable: props.selectable,
|
|
1210
|
+
type: props.type,
|
|
1211
|
+
calendar: localeCalendar!.value,
|
|
1212
|
+
});
|
|
1046
1213
|
// Date-only bounds compare day-granular on purpose: a datetime value
|
|
1047
1214
|
// inside the boundary day (10:00 on the `max` date) must not be rejected
|
|
1048
1215
|
// by the midnight boundary instant. A time-bearing bound (with `type="datetime"`)
|
|
@@ -1090,6 +1257,7 @@ const onClickClear = () => {
|
|
|
1090
1257
|
// ==========================================================================
|
|
1091
1258
|
|
|
1092
1259
|
type DateFieldKey =
|
|
1260
|
+
| 'era'
|
|
1093
1261
|
| 'week'
|
|
1094
1262
|
| 'day'
|
|
1095
1263
|
| 'month'
|
|
@@ -1157,7 +1325,13 @@ const dateLayout = computed<{ order: DateFieldKey[]; separator: string }>(
|
|
|
1157
1325
|
}
|
|
1158
1326
|
);
|
|
1159
1327
|
|
|
1160
|
-
|
|
1328
|
+
/** The date fields in order; the era beside the year, where `Intl` puts it. */
|
|
1329
|
+
const dateFieldOrder = computed<DateFieldKey[]>(() => {
|
|
1330
|
+
const order = dateLayout.value.order;
|
|
1331
|
+
if (!formatCalendarDate || !kit!.value?.eras.length) return order;
|
|
1332
|
+
const at = order.indexOf('year') + (kit!.value.eraFirst ? 0 : 1);
|
|
1333
|
+
return [...order.slice(0, at), 'era', ...order.slice(at)];
|
|
1334
|
+
});
|
|
1161
1335
|
|
|
1162
1336
|
/** The fields this type actually renders — the set every parse/commit works on. */
|
|
1163
1337
|
const activeDateFields = computed(() => new Set(dateFieldOrder.value));
|
|
@@ -1194,7 +1368,7 @@ const fieldOrder = computed<FieldDescriptor[]>(() => {
|
|
|
1194
1368
|
* stopped describing anything: `datetime` put a second stop on `hour`, and
|
|
1195
1369
|
* `range` + `datetime` scattered stops mid-segment (`end.day`, `end.minute`).
|
|
1196
1370
|
* BbTimePickerInput never had the bug because it keys off the field name
|
|
1197
|
-
* (`field === 'hour'`) rather than a position
|
|
1371
|
+
* (`field === 'hour'`) rather than a position.
|
|
1198
1372
|
*/
|
|
1199
1373
|
const segmentEntryIndexes = computed(() => {
|
|
1200
1374
|
const seen = new Set<string>();
|
|
@@ -1214,6 +1388,8 @@ const isSegmentEntry = (index: number) => segmentEntryIndexes.value.has(index);
|
|
|
1214
1388
|
* meridiem enum segment).
|
|
1215
1389
|
*/
|
|
1216
1390
|
const fieldSpecs = computed<Record<DateFieldKey, SegmentedFieldSpec>>(() => ({
|
|
1391
|
+
// Off Gregorian, `calendarSpecs` gives the era field its names.
|
|
1392
|
+
era: { kind: 'enum', maxLength: 0 },
|
|
1217
1393
|
week: {
|
|
1218
1394
|
kind: 'numeric',
|
|
1219
1395
|
maxLength: 2,
|
|
@@ -1294,13 +1470,63 @@ const fieldSpecs = computed<Record<DateFieldKey, SegmentedFieldSpec>>(() => ({
|
|
|
1294
1470
|
label: 'Second',
|
|
1295
1471
|
},
|
|
1296
1472
|
meridiem: meridiemWords.fieldSpec.value,
|
|
1473
|
+
...calendarSpecs?.value,
|
|
1297
1474
|
}));
|
|
1298
1475
|
|
|
1476
|
+
/**
|
|
1477
|
+
* Off Gregorian, the calendar's limits (13 months, 30-day months, a year
|
|
1478
|
+
* counted in its era) and the era field.
|
|
1479
|
+
*/
|
|
1480
|
+
const calendarSpecs = formatCalendarDate
|
|
1481
|
+
? computed(() => (kit!.value ? calendarFieldSpecs(kit!.value) : null))
|
|
1482
|
+
: null;
|
|
1483
|
+
|
|
1484
|
+
/** A group's date fields as the calendar reads them. */
|
|
1485
|
+
const calendarValues = (
|
|
1486
|
+
g: Record<DateFieldKey, string>
|
|
1487
|
+
): CalendarFieldValues => ({
|
|
1488
|
+
era: g.era,
|
|
1489
|
+
year: g.year,
|
|
1490
|
+
month: g.month,
|
|
1491
|
+
day: g.day,
|
|
1492
|
+
});
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* The day each field group last stood for, off Gregorian: a year edit maps
|
|
1496
|
+
* its month through the month's identity from there.
|
|
1497
|
+
*/
|
|
1498
|
+
const resolvedDates = new WeakMap<object, Dayjs>();
|
|
1499
|
+
|
|
1500
|
+
/** Writes `date` into a group's rendered date fields, in the locale's calendar. */
|
|
1501
|
+
const writeDateFields = (group: Record<DateFieldKey, string>, date: Dayjs) => {
|
|
1502
|
+
resolvedDates.set(toRaw(group), date);
|
|
1503
|
+
const f = kit!.value!.fieldsOf(date);
|
|
1504
|
+
group.era = f.era;
|
|
1505
|
+
group.year = f.year;
|
|
1506
|
+
if (activeDateFields.value.has('month')) group.month = f.month;
|
|
1507
|
+
if (activeDateFields.value.has('day')) group.day = f.day;
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1299
1510
|
/**
|
|
1300
1511
|
* Separator between two adjacent fields: `–` between range ends, the
|
|
1301
1512
|
* locale's own (`/`, `.`, `-`) inside a date, `:` inside a time, and a non-breaking space at the date→time
|
|
1302
1513
|
* boundary.
|
|
1303
1514
|
*/
|
|
1515
|
+
/** The row in runs: one per date, per time's numbers, per day period. */
|
|
1516
|
+
const runs = computed(() =>
|
|
1517
|
+
fieldRuns(fieldOrder.value, (field) =>
|
|
1518
|
+
field === 'meridiem' ? 'meridiem' : TIME_FIELDS.has(field) ? 'time' : 'date'
|
|
1519
|
+
)
|
|
1520
|
+
);
|
|
1521
|
+
const lastIndex = (run: FieldRun<DateFieldKey, Segment>) =>
|
|
1522
|
+
run.items.at(-1)!.index;
|
|
1523
|
+
/** Arabic writes its numeric date right to left (`Intl`'s marks): that run keeps the page's direction. */
|
|
1524
|
+
const dateRtl = computed(() => dateReadsRtl(intlLocaleOf(config.locale)));
|
|
1525
|
+
const runDir = (run: FieldRun<DateFieldKey, Segment>) =>
|
|
1526
|
+
run.kind === 'meridiem' || (run.kind === 'date' && dateRtl.value)
|
|
1527
|
+
? undefined
|
|
1528
|
+
: 'ltr';
|
|
1529
|
+
|
|
1304
1530
|
const separatorBetween = (a: FieldDescriptor, b: FieldDescriptor) => {
|
|
1305
1531
|
if (a.segment !== b.segment) return '–';
|
|
1306
1532
|
if (b.field === 'meridiem') return ' ';
|
|
@@ -1308,13 +1534,26 @@ const separatorBetween = (a: FieldDescriptor, b: FieldDescriptor) => {
|
|
|
1308
1534
|
const bTime = TIME_FIELDS.has(b.field);
|
|
1309
1535
|
if (aTime && bTime) return ':';
|
|
1310
1536
|
if (!aTime && bTime) return ' ';
|
|
1311
|
-
|
|
1537
|
+
// The era's own separator sits between the era and its year only: WebKit
|
|
1538
|
+
// writes `11/5/Reiwa8`, so the era after the day keeps the date's `/`.
|
|
1539
|
+
if (
|
|
1540
|
+
formatCalendarDate &&
|
|
1541
|
+
((a.field === 'era' && b.field === 'year') ||
|
|
1542
|
+
(a.field === 'year' && b.field === 'era'))
|
|
1543
|
+
)
|
|
1544
|
+
return kit!.value?.eraSeparator ?? ' ';
|
|
1545
|
+
// Arabic keeps the right-to-left mark `Intl` writes before each separator
|
|
1546
|
+
// (Arabic writes Arabic-Indic digits, so its builds carry `formatDigits`).
|
|
1547
|
+
return formatDigits && dateRtl.value
|
|
1548
|
+
? `\u200F${dateLayout.value.separator}`
|
|
1549
|
+
: dateLayout.value.separator;
|
|
1312
1550
|
};
|
|
1313
1551
|
|
|
1314
1552
|
const {
|
|
1315
1553
|
fields,
|
|
1316
1554
|
fieldRefs,
|
|
1317
1555
|
descriptorKey,
|
|
1556
|
+
displayOf,
|
|
1318
1557
|
emptyFieldGroup,
|
|
1319
1558
|
getSizedValue,
|
|
1320
1559
|
minChars,
|
|
@@ -1333,6 +1572,7 @@ const {
|
|
|
1333
1572
|
specs: fieldSpecs,
|
|
1334
1573
|
segments: ['start', 'end'],
|
|
1335
1574
|
fieldKeys: [
|
|
1575
|
+
'era',
|
|
1336
1576
|
'week',
|
|
1337
1577
|
'day',
|
|
1338
1578
|
'month',
|
|
@@ -1350,6 +1590,10 @@ const {
|
|
|
1350
1590
|
// Typing any locale's date separator (`/`, `-`, `.`) moves to the next field.
|
|
1351
1591
|
advanceKeys: ['/', '-', '.', ' '],
|
|
1352
1592
|
onDirty: () => combineFieldsToModelValue({ finalize: false }),
|
|
1593
|
+
// The locale's digits (fa ۱۴۰۵, ar ١٤٤٨); the fields hold ASCII.
|
|
1594
|
+
numberingSystem: formatDigits
|
|
1595
|
+
? () => localeOf(config.locale).numberingSystem
|
|
1596
|
+
: undefined,
|
|
1353
1597
|
});
|
|
1354
1598
|
|
|
1355
1599
|
/**
|
|
@@ -1357,6 +1601,29 @@ const {
|
|
|
1357
1601
|
* a pasted `pm`); every other entry goes to the engine as it is.
|
|
1358
1602
|
*/
|
|
1359
1603
|
const onSegmentInput = (descriptor: FieldDescriptor, event: Event) => {
|
|
1604
|
+
if (formatCalendarDate && descriptor.field === 'era' && kit!.value) {
|
|
1605
|
+
const group = fields.value[descriptor.segment];
|
|
1606
|
+
const target = event.target as HTMLInputElement;
|
|
1607
|
+
const typed = foldDigits(target.value);
|
|
1608
|
+
const word = matchEra(kit!.value, typed, group.era);
|
|
1609
|
+
const digits = typed.replace(/\D/g, '');
|
|
1610
|
+
if (word && word !== group.era) {
|
|
1611
|
+
group.era = word;
|
|
1612
|
+
combineFieldsToModelValue({ finalize: false });
|
|
1613
|
+
} else if (digits && kit!.value.eraFirst) {
|
|
1614
|
+
// A year typed into the era before it: today's era, the digits to the year.
|
|
1615
|
+
group.era ||= kit!.value.fieldsOf(todayInRange()).era;
|
|
1616
|
+
group.year = digits.slice(0, fieldSpecs.value.year.maxLength);
|
|
1617
|
+
target.value = group.era;
|
|
1618
|
+
updateAllSizedValues();
|
|
1619
|
+
focusField(
|
|
1620
|
+
{ segment: descriptor.segment, field: 'year' },
|
|
1621
|
+
{ caretToEnd: true }
|
|
1622
|
+
);
|
|
1623
|
+
combineFieldsToModelValue({ finalize: false });
|
|
1624
|
+
return;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1360
1627
|
if (descriptor.field === 'meridiem') {
|
|
1361
1628
|
const group = fields.value[descriptor.segment];
|
|
1362
1629
|
const word = meridiemWords.match(
|
|
@@ -1378,6 +1645,13 @@ meridiemWords.onRelabel((from, to) => {
|
|
|
1378
1645
|
updateAllSizedValues();
|
|
1379
1646
|
});
|
|
1380
1647
|
|
|
1648
|
+
/** Today, or the nearest day the calendar's verified range has. */
|
|
1649
|
+
const todayInRange = () => {
|
|
1650
|
+
const { min, max } = kit!.value!.system.range;
|
|
1651
|
+
const today = dayjs().format(BOUNDARY_DATE_FORMAT);
|
|
1652
|
+
return dayjs(today < min ? min : today > max ? max : today);
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1381
1655
|
const getFieldId = (d: FieldDescriptor, fieldId: string): string => {
|
|
1382
1656
|
if (!props.range) return `${fieldId}-${d.field}`;
|
|
1383
1657
|
return `${fieldId}-${d.segment}-${d.field}`;
|
|
@@ -1390,6 +1664,7 @@ const getFieldName = (d: FieldDescriptor): string | undefined => {
|
|
|
1390
1664
|
};
|
|
1391
1665
|
|
|
1392
1666
|
const fieldLabelKeys = {
|
|
1667
|
+
era: 'datePickerInput.eraField',
|
|
1393
1668
|
week: 'datePickerInput.weekField',
|
|
1394
1669
|
day: 'datePickerInput.dayField',
|
|
1395
1670
|
month: 'datePickerInput.monthField',
|
|
@@ -1484,7 +1759,20 @@ const timeHintKey = computed(() =>
|
|
|
1484
1759
|
);
|
|
1485
1760
|
|
|
1486
1761
|
/** Localized format hint used by the placeholder and the bb-sr-only description. */
|
|
1487
|
-
const formatHint = computed(() =>
|
|
1762
|
+
const formatHint = computed(() =>
|
|
1763
|
+
// An era calendar's year is the era and its year: `元号YY/MM/DD`.
|
|
1764
|
+
formatCalendarDate && kit!.value?.eras.length
|
|
1765
|
+
? eraHint(
|
|
1766
|
+
kit!.value,
|
|
1767
|
+
dictionaryHint.value,
|
|
1768
|
+
t('datePickerInput.dateFormatSingle').value,
|
|
1769
|
+
t('datePickerInput.eraField').value
|
|
1770
|
+
)
|
|
1771
|
+
: dictionaryHint.value
|
|
1772
|
+
);
|
|
1773
|
+
|
|
1774
|
+
/** The dictionary's hint for the fields this type renders. */
|
|
1775
|
+
const dictionaryHint = computed(() => {
|
|
1488
1776
|
// The hint has to describe the fields that are actually there — promising
|
|
1489
1777
|
// DD/MM/YYYY to a two-field month input is worse than no hint at all.
|
|
1490
1778
|
if (
|
|
@@ -1524,14 +1812,17 @@ const parseValueToFieldGroup = (
|
|
|
1524
1812
|
if (!parsed.isValid()) return emptyFieldGroup();
|
|
1525
1813
|
const group = emptyFieldGroup();
|
|
1526
1814
|
if (isWeek.value) return { ...group, ...weekFieldsOf(parsed) };
|
|
1527
|
-
if (
|
|
1528
|
-
|
|
1529
|
-
|
|
1815
|
+
if (formatCalendarDate && kit!.value) writeDateFields(group, parsed);
|
|
1816
|
+
else {
|
|
1817
|
+
if (activeDateFields.value.has('day')) group.day = parsed.format('DD');
|
|
1818
|
+
if (activeDateFields.value.has('month')) group.month = parsed.format('MM');
|
|
1819
|
+
group.year = parsed.format('YYYY');
|
|
1820
|
+
}
|
|
1530
1821
|
// Non-floating values carry their time inline; floating dates are plain
|
|
1531
1822
|
// and the time is overlaid from the `time` model by the caller. Without
|
|
1532
1823
|
// `seconds` an incoming seconds part displays truncated (and zeroes out on
|
|
1533
1824
|
// the next user commit) — deliberate, no hidden precision rides along.
|
|
1534
|
-
if (isDateTime.value && !
|
|
1825
|
+
if (isDateTime.value && !configDefaults.floating) {
|
|
1535
1826
|
setGroupHour(group, parsed.hour());
|
|
1536
1827
|
group.minute = parsed.format('mm');
|
|
1537
1828
|
group.second = props.seconds ? parsed.format('ss') : '';
|
|
@@ -1568,7 +1859,7 @@ const parseModelValueToFields = (value: typeof props.modelValue) => {
|
|
|
1568
1859
|
};
|
|
1569
1860
|
}
|
|
1570
1861
|
// Floating dates carry no time — the `time` model is the only source.
|
|
1571
|
-
if (isDateTime.value &&
|
|
1862
|
+
if (isDateTime.value && configDefaults.floating) {
|
|
1572
1863
|
for (const segment of ['start', 'end'] as const) {
|
|
1573
1864
|
const group = fields.value[segment];
|
|
1574
1865
|
if (group.day) applyTimeToGroup(group, timeModelFor(segment));
|
|
@@ -1588,12 +1879,19 @@ const restoreFieldsFromModelValue = () => {
|
|
|
1588
1879
|
parseModelValueToFields(props.modelValue);
|
|
1589
1880
|
updateAllSizedValues();
|
|
1590
1881
|
|
|
1882
|
+
// Another calendar numbers the same value differently: read it again.
|
|
1883
|
+
if (formatCalendarDate)
|
|
1884
|
+
watch(kit!, () => {
|
|
1885
|
+
parseModelValueToFields(props.modelValue);
|
|
1886
|
+
updateAllSizedValues();
|
|
1887
|
+
});
|
|
1888
|
+
|
|
1591
1889
|
/**
|
|
1592
1890
|
* Mirrors the time part of a (non-floating) modelValue into `update:time`
|
|
1593
1891
|
* after an external change, keeping the two models in sync without a commit.
|
|
1594
1892
|
*/
|
|
1595
1893
|
const mirrorTimeFromModelValue = (value: typeof props.modelValue) => {
|
|
1596
|
-
if (!isDateTime.value ||
|
|
1894
|
+
if (!isDateTime.value || configDefaults.floating) return;
|
|
1597
1895
|
let time: string | string[] | null;
|
|
1598
1896
|
if (!value) time = null;
|
|
1599
1897
|
else if (Array.isArray(value))
|
|
@@ -1679,6 +1977,43 @@ const parseSegmentAndCorrect = (segment: Segment): Dayjs | null => {
|
|
|
1679
1977
|
if (active.has('month') && !g.month) return null;
|
|
1680
1978
|
if (!g.year) return null;
|
|
1681
1979
|
|
|
1980
|
+
// Off Gregorian: the nearest day the calendar has (30 Esfand 1404 → 29),
|
|
1981
|
+
// inside its verified range, written back like the Gregorian snap below.
|
|
1982
|
+
if (formatCalendarDate && kit!.value) {
|
|
1983
|
+
const time = isDateTime.value ? timeOfGroup(g) : null;
|
|
1984
|
+
if (isDateTime.value && !time) return null;
|
|
1985
|
+
// A new year keeps the month, not its ordinal (C0's `addYears`): Hebrew
|
|
1986
|
+
// Adar II 5787 → Adar 5788, Adar 5786 → Adar II 5787, Nisan stays Nisan.
|
|
1987
|
+
let values = calendarValues(g);
|
|
1988
|
+
const before = resolvedDates.get(toRaw(fields.value[segment]));
|
|
1989
|
+
if (before && !kit!.value.eras.length && active.has('month')) {
|
|
1990
|
+
const was = kit!.value.fieldsOf(before);
|
|
1991
|
+
const years = parseInt(g.year, 10) - parseInt(was.year, 10);
|
|
1992
|
+
if (years && parseInt(g.month, 10) === parseInt(was.month, 10))
|
|
1993
|
+
values = {
|
|
1994
|
+
...values,
|
|
1995
|
+
month: kit!.value.fieldsOf(kit!.value.system.addYears(before, years))
|
|
1996
|
+
.month,
|
|
1997
|
+
};
|
|
1998
|
+
}
|
|
1999
|
+
const date = kit!.value.nearest(values, active);
|
|
2000
|
+
if (!date) return null;
|
|
2001
|
+
resolvedDates.set(toRaw(fields.value[segment]), date);
|
|
2002
|
+
// Only what the snap changed: a day mid-typing (`3` of `30`) stays as typed.
|
|
2003
|
+
const snapped = kit!.value.fieldsOf(date);
|
|
2004
|
+
for (const field of ['era', 'year', 'month', 'day'] as const)
|
|
2005
|
+
if (
|
|
2006
|
+
active.has(field) &&
|
|
2007
|
+
(field === 'era'
|
|
2008
|
+
? g.era !== snapped.era
|
|
2009
|
+
: parseInt(g[field], 10) !== parseInt(snapped[field], 10))
|
|
2010
|
+
)
|
|
2011
|
+
fields.value[segment][field] = snapped[field];
|
|
2012
|
+
return time
|
|
2013
|
+
? date.hour(+time.hour).minute(+time.minute).second(+time.second)
|
|
2014
|
+
: date;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
1682
2017
|
// Unrendered parts default to the start of the unit, which is exactly what
|
|
1683
2018
|
// `2026-08` means when it has to become a Dayjs.
|
|
1684
2019
|
const dayNum = active.has('day') ? parseInt(g.day, 10) : 1;
|
|
@@ -1705,23 +2040,9 @@ const parseSegmentAndCorrect = (segment: Segment): Dayjs | null => {
|
|
|
1705
2040
|
let timeSuffix = '';
|
|
1706
2041
|
let timeFormatSuffix = '';
|
|
1707
2042
|
if (isDateTime.value) {
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
const hour12 = parseInt(g.hour, 10);
|
|
1712
|
-
if (hour12 < 1 || hour12 > 12) return null;
|
|
1713
|
-
}
|
|
1714
|
-
const hour = String(groupHour24(g)).padStart(2, '0');
|
|
1715
|
-
const minute = (g.minute || '0').padStart(2, '0');
|
|
1716
|
-
const second = ((props.seconds ? g.second : '') || '0').padStart(2, '0');
|
|
1717
|
-
if (
|
|
1718
|
-
parseInt(hour, 10) > 23 ||
|
|
1719
|
-
parseInt(minute, 10) > 59 ||
|
|
1720
|
-
parseInt(second, 10) > 59
|
|
1721
|
-
) {
|
|
1722
|
-
return null;
|
|
1723
|
-
}
|
|
1724
|
-
timeSuffix = `T${hour}:${minute}:${second}`;
|
|
2043
|
+
const time = timeOfGroup(g);
|
|
2044
|
+
if (!time) return null;
|
|
2045
|
+
timeSuffix = `T${time.hour}:${time.minute}:${time.second}`;
|
|
1725
2046
|
timeFormatSuffix = 'THH:mm:ss';
|
|
1726
2047
|
}
|
|
1727
2048
|
|
|
@@ -1750,6 +2071,30 @@ const parseSegmentAndCorrect = (segment: Segment): Dayjs | null => {
|
|
|
1750
2071
|
return parsed.isValid() ? parsed : null;
|
|
1751
2072
|
};
|
|
1752
2073
|
|
|
2074
|
+
/**
|
|
2075
|
+
* A group's time as 24-hour `HH` / `mm` / `ss` (blank fields → 00; without
|
|
2076
|
+
* `seconds` any typed seconds are ignored), or null when a field is out of
|
|
2077
|
+
* range.
|
|
2078
|
+
*/
|
|
2079
|
+
const timeOfGroup = (g: Record<DateFieldKey, string>) => {
|
|
2080
|
+
// With `ampm` the field holds 1-12 and the meridiem disambiguates;
|
|
2081
|
+
// convert to 24h before building the value string.
|
|
2082
|
+
if (props.ampm && g.hour) {
|
|
2083
|
+
const hour12 = parseInt(g.hour, 10);
|
|
2084
|
+
if (hour12 < 1 || hour12 > 12) return null;
|
|
2085
|
+
}
|
|
2086
|
+
const hour = String(groupHour24(g)).padStart(2, '0');
|
|
2087
|
+
const minute = (g.minute || '0').padStart(2, '0');
|
|
2088
|
+
const second = ((props.seconds ? g.second : '') || '0').padStart(2, '0');
|
|
2089
|
+
if (
|
|
2090
|
+
parseInt(hour, 10) > 23 ||
|
|
2091
|
+
parseInt(minute, 10) > 59 ||
|
|
2092
|
+
parseInt(second, 10) > 59
|
|
2093
|
+
)
|
|
2094
|
+
return null;
|
|
2095
|
+
return { hour, minute, second };
|
|
2096
|
+
};
|
|
2097
|
+
|
|
1753
2098
|
/**
|
|
1754
2099
|
* Converts a Dayjs into the display field strings used by the inputs
|
|
1755
2100
|
* (DD/MM/YYYY, plus HH/mm/ss when `datetime` is on).
|
|
@@ -1757,9 +2102,12 @@ const parseSegmentAndCorrect = (segment: Segment): Dayjs | null => {
|
|
|
1757
2102
|
const dayjsToFieldGroup = (d: Dayjs): Record<DateFieldKey, string> => {
|
|
1758
2103
|
const group = emptyFieldGroup();
|
|
1759
2104
|
if (isWeek.value) return { ...group, ...weekFieldsOf(d) };
|
|
1760
|
-
if (
|
|
1761
|
-
|
|
1762
|
-
|
|
2105
|
+
if (formatCalendarDate && kit!.value) writeDateFields(group, d);
|
|
2106
|
+
else {
|
|
2107
|
+
if (activeDateFields.value.has('day')) group.day = d.format('DD');
|
|
2108
|
+
if (activeDateFields.value.has('month')) group.month = d.format('MM');
|
|
2109
|
+
group.year = d.format('YYYY');
|
|
2110
|
+
}
|
|
1763
2111
|
if (isDateTime.value) {
|
|
1764
2112
|
setGroupHour(group, d.hour());
|
|
1765
2113
|
group.minute = d.format('mm');
|
|
@@ -1803,8 +2151,15 @@ const normalizeDisabledDate = (date: Dayjs): Dayjs | null => {
|
|
|
1803
2151
|
isDateTime.value && !hasTime
|
|
1804
2152
|
? bound.hour(date.hour()).minute(date.minute()).second(date.second())
|
|
1805
2153
|
: bound;
|
|
2154
|
+
// Off Gregorian a month's bounds are already the days its units start on.
|
|
2155
|
+
const calendarCoarse = !!(
|
|
2156
|
+
formatCalendarDate &&
|
|
2157
|
+
localeCalendar!.value &&
|
|
2158
|
+
isCoarse.value
|
|
2159
|
+
);
|
|
2160
|
+
const coarseUnit = calendarCoarse ? 'day' : unit.value;
|
|
1806
2161
|
const compareUnit = isCoarse.value
|
|
1807
|
-
?
|
|
2162
|
+
? coarseUnit
|
|
1808
2163
|
: isDateTime.value
|
|
1809
2164
|
? 'minute'
|
|
1810
2165
|
: 'day';
|
|
@@ -1818,7 +2173,7 @@ const normalizeDisabledDate = (date: Dayjs): Dayjs | null => {
|
|
|
1818
2173
|
candidate.isBefore(
|
|
1819
2174
|
min,
|
|
1820
2175
|
isCoarse.value
|
|
1821
|
-
?
|
|
2176
|
+
? coarseUnit
|
|
1822
2177
|
: isDateTime.value && hasTime
|
|
1823
2178
|
? 'minute'
|
|
1824
2179
|
: 'day'
|
|
@@ -1833,14 +2188,16 @@ const normalizeDisabledDate = (date: Dayjs): Dayjs | null => {
|
|
|
1833
2188
|
candidate.isAfter(
|
|
1834
2189
|
max,
|
|
1835
2190
|
isCoarse.value
|
|
1836
|
-
?
|
|
2191
|
+
? coarseUnit
|
|
1837
2192
|
: isDateTime.value && hasTime
|
|
1838
2193
|
? 'minute'
|
|
1839
2194
|
: 'day'
|
|
1840
2195
|
)
|
|
1841
2196
|
)
|
|
1842
2197
|
candidate = isCoarse.value
|
|
1843
|
-
?
|
|
2198
|
+
? calendarCoarse
|
|
2199
|
+
? max
|
|
2200
|
+
: max.startOf(unit.value)
|
|
1844
2201
|
: grafted(max, hasTime);
|
|
1845
2202
|
}
|
|
1846
2203
|
// No boundary clamping happened → date is disabled by `selectable` only
|
|
@@ -1933,7 +2290,7 @@ const combineFieldsToModelValue = (
|
|
|
1933
2290
|
|
|
1934
2291
|
const endStatus = segmentStatus('end');
|
|
1935
2292
|
|
|
1936
|
-
//
|
|
2293
|
+
// an emptied range is `[]`, the value the clear button emits.
|
|
1937
2294
|
if (startStatus === 'empty' && endStatus === 'empty') {
|
|
1938
2295
|
emitValue([]);
|
|
1939
2296
|
return;
|
|
@@ -2084,8 +2441,8 @@ import type { Responsive } from '@/types/ResponsiveSize';
|
|
|
2084
2441
|
import {
|
|
2085
2442
|
INPUT_VARIANTS,
|
|
2086
2443
|
type InputVariantBuiltIn,
|
|
2087
|
-
type
|
|
2088
|
-
type
|
|
2444
|
+
type DatePickerInputVariantRegistry,
|
|
2445
|
+
type InputVariantOf,
|
|
2089
2446
|
} from '@/types/InputVariant';
|
|
2090
2447
|
import {
|
|
2091
2448
|
type PtCompoundProps,
|
|
@@ -2106,10 +2463,11 @@ import type { IconType } from '@/types/Icon';
|
|
|
2106
2463
|
import type { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
2107
2464
|
import type { FormFieldProps } from '@/composables/useFormBinding';
|
|
2108
2465
|
import type { CommonFieldAsteriskSlotProps } from '../CommonField/types';
|
|
2466
|
+
import type { BbDatePickerInputPtKeys } from './ptKeys.generated';
|
|
2109
2467
|
|
|
2110
2468
|
/**
|
|
2111
|
-
* Passthrough parts of `BbDatePickerInput
|
|
2112
|
-
*
|
|
2469
|
+
* Passthrough parts of `BbDatePickerInput`:
|
|
2470
|
+
* the text-control family parts, plus
|
|
2113
2471
|
* `activator` and the calendar's parts, forwarded to the `BbDatePicker` it
|
|
2114
2472
|
* opens.
|
|
2115
2473
|
*
|
|
@@ -2315,11 +2673,11 @@ export const BB_DATE_PICKER_INPUT_PT = {
|
|
|
2315
2673
|
},
|
|
2316
2674
|
/** The ✕ is not rendered while the control is `disabled` or `readonly`. */
|
|
2317
2675
|
except: { clear: ['disabled', 'readonly'] },
|
|
2318
|
-
// The input `variant` is a state on the field's parts
|
|
2676
|
+
// The input `variant` is a state on the field's parts, below
|
|
2319
2677
|
// the real states; a picker's panel and rows are not the field's.
|
|
2320
2678
|
variant: {
|
|
2321
2679
|
names: INPUT_VARIANTS,
|
|
2322
|
-
option: '
|
|
2680
|
+
option: 'datePickerInputVariants',
|
|
2323
2681
|
parts: [...TEXT_CONTROL_PT_PARTS, 'activator'],
|
|
2324
2682
|
},
|
|
2325
2683
|
} as const satisfies {
|
|
@@ -2341,357 +2699,360 @@ export const BB_DATE_PICKER_INPUT_PT = {
|
|
|
2341
2699
|
|
|
2342
2700
|
// Spelled INLINE with this component's own unions (Vue's SFC type resolver
|
|
2343
2701
|
// does not substitute a generic alias's type parameters — PASSTHROUGH.md T20).
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
| `pt:${BbDatePickerInputViewItemPtPart}:${BbDatePickerInputViewItemPtState}`
|
|
2353
|
-
| `pt:${BbDatePickerInputHeadingPtPart}:active`
|
|
2354
|
-
| 'pt:item:selected'
|
|
2355
|
-
| `pt:${TextControlPtPart}:${InputVariantBuiltIn}`
|
|
2356
|
-
| `pt:activator:${InputVariantBuiltIn}`]?: PtValue;
|
|
2357
|
-
} & /* @vue-ignore */ PtCompoundProps<
|
|
2702
|
+
|
|
2703
|
+
/**
|
|
2704
|
+
* BbDatePickerInput's `pt:*` attributes: the documented keys, and the patterns
|
|
2705
|
+
* Vue's SFC resolver skips (compound keys, an app's own variant states; the
|
|
2706
|
+
* vue-ignore marker). This alias keeps the marker on a member right after its
|
|
2707
|
+
* `=`: the declaration emit drops it at the start of a line or ahead of a whole type.
|
|
2708
|
+
*/
|
|
2709
|
+
type BbDatePickerInputPtProps = /* @vue-ignore */ PtCompoundProps<
|
|
2358
2710
|
typeof BB_DATE_PICKER_INPUT_PT,
|
|
2359
|
-
PtVariantAttrs<
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
2366
|
-
pt?: {
|
|
2367
|
-
[K in BbDatePickerInputPtKey]?: PtValue;
|
|
2368
|
-
} & {
|
|
2369
|
-
[K in `${TextControlPtPart | 'activator'}:${InputVariantBuiltIn | keyof InputVariantRegistry}`]?: PtValue;
|
|
2370
|
-
};
|
|
2371
|
-
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
2372
|
-
/**
|
|
2373
|
-
* On mobile the calendar opens inside a bottom off-canvas sheet instead of a
|
|
2374
|
-
* floating popover, mirroring the adaptive behaviour of `BbPopover`/`BbSelect`.
|
|
2375
|
-
* When unset, falls back to the global `config.adaptive`.
|
|
2376
|
-
* @defaultValue `config.adaptive` (`true`)
|
|
2377
|
-
*/
|
|
2378
|
-
adaptive?: boolean;
|
|
2711
|
+
PtVariantAttrs<
|
|
2712
|
+
TextControlPtPart | 'activator',
|
|
2713
|
+
keyof DatePickerInputVariantRegistry
|
|
2714
|
+
>
|
|
2715
|
+
> &
|
|
2716
|
+
BbDatePickerInputPtKeys;
|
|
2379
2717
|
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2718
|
+
export type BbDatePickerInputBaseProps = BbDatePickerInputPtProps & {
|
|
2719
|
+
/**
|
|
2720
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
2721
|
+
* without the prefix. See the `pt:<part>` row.
|
|
2722
|
+
*/
|
|
2723
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
2724
|
+
pt?: {
|
|
2725
|
+
[K in BbDatePickerInputPtKey]?: PtValue;
|
|
2726
|
+
} & {
|
|
2727
|
+
[K in `${TextControlPtPart | 'activator'}:${InputVariantBuiltIn | keyof DatePickerInputVariantRegistry}`]?: PtValue;
|
|
2728
|
+
};
|
|
2729
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
2730
|
+
/**
|
|
2731
|
+
* On mobile the calendar opens inside a bottom off-canvas sheet instead of a
|
|
2732
|
+
* floating popover, mirroring the adaptive behaviour of `BbPopover`/`BbSelect`.
|
|
2733
|
+
* When unset, falls back to the global `all.adaptive`.
|
|
2734
|
+
* @defaultValue `all.adaptive` (`true`)
|
|
2735
|
+
*/
|
|
2736
|
+
adaptive?: boolean;
|
|
2386
2737
|
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
offCanvasProps?: Partial<BbOffCanvasProps>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Text between the label and the input. Unlike the hint it is always
|
|
2740
|
+
* visible; it joins the input's `aria-describedby` after any `errors` /
|
|
2741
|
+
* `warnings`, before the `hint`.
|
|
2742
|
+
*/
|
|
2743
|
+
description?: string;
|
|
2394
2744
|
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2745
|
+
/**
|
|
2746
|
+
* Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on
|
|
2747
|
+
* mobile), spread over its defaults. A `pt` inside it styles only the sheet
|
|
2748
|
+
* (passthrough guide § Inside the sheet). The sheet hides its ✕; `{
|
|
2749
|
+
* hideClose: false }` brings it back.
|
|
2750
|
+
*/
|
|
2751
|
+
offCanvasProps?: Partial<BbOffCanvasProps>;
|
|
2402
2752
|
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2753
|
+
/**
|
|
2754
|
+
* Disables typing into the input.
|
|
2755
|
+
* Use `'mobile'` to disable typing only on mobile, `'desktop'` to disable typing only on desktop.
|
|
2756
|
+
*
|
|
2757
|
+
* @defaultValue `false`
|
|
2758
|
+
*/
|
|
2759
|
+
disableWriting?: boolean | 'mobile' | 'desktop';
|
|
2406
2760
|
|
|
2407
|
-
|
|
2761
|
+
/**
|
|
2762
|
+
* Name of the icon to be added at the end of the input.
|
|
2763
|
+
*/
|
|
2408
2764
|
|
|
2409
|
-
|
|
2410
|
-
* Guides the browser as to the type of information expected in the field.
|
|
2411
|
-
* @defaultValue `'off'`
|
|
2412
|
-
*/
|
|
2413
|
-
// Not Vue's InputHTMLAttributes['autocomplete']: since Vue 3.5.27 that is a
|
|
2414
|
-
// ~10k-member union, and our props overflow TS on it (TS2590).
|
|
2415
|
-
autocomplete?: string;
|
|
2765
|
+
'append:icon'?: IconType;
|
|
2416
2766
|
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2767
|
+
/**
|
|
2768
|
+
* Guides the browser as to the type of information expected in the field.
|
|
2769
|
+
* @defaultValue `'off'`
|
|
2770
|
+
*/
|
|
2771
|
+
// Not Vue's InputHTMLAttributes['autocomplete']: since Vue 3.5.27 that is a
|
|
2772
|
+
// ~10k-member union, and our props overflow TS on it (TS2590).
|
|
2773
|
+
autocomplete?: string;
|
|
2421
2774
|
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2775
|
+
/**
|
|
2776
|
+
* Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field.
|
|
2777
|
+
*/
|
|
2778
|
+
autofocus?: InputHTMLAttributes['autofocus'];
|
|
2426
2779
|
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
* `--bb-input-h-compact` (and `--bb-input-py-compact`).
|
|
2432
|
-
*/
|
|
2433
|
-
compact?: boolean;
|
|
2780
|
+
/**
|
|
2781
|
+
* Displays a clear button when the input has a value and is being interacted with.
|
|
2782
|
+
*/
|
|
2783
|
+
clearable?: boolean;
|
|
2434
2784
|
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
*/
|
|
2443
|
-
variant?: InputVariantType;
|
|
2785
|
+
/**
|
|
2786
|
+
* Compact density: the field uses the `-compact` twins of `--bb-input-h`,
|
|
2787
|
+
* `--bb-input-py` and `--bb-label-spacing-y`, so a `--bb-input-h` set on
|
|
2788
|
+
* the component is ignored while it is on. Size a compact field with
|
|
2789
|
+
* `--bb-input-h-compact` (and `--bb-input-py-compact`).
|
|
2790
|
+
*/
|
|
2791
|
+
compact?: boolean;
|
|
2444
2792
|
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2793
|
+
/**
|
|
2794
|
+
* The field box's look, with `BbButton`'s names and tokens. Colours only,
|
|
2795
|
+
* so a form never reflows; `'ghost'` has no border in any state, `'none'`
|
|
2796
|
+
* no look at all (you own hover, focus and the states). Register more with
|
|
2797
|
+
* the plugin's `components.BbDatePickerInput.variants`.
|
|
2798
|
+
*
|
|
2799
|
+
* @defaultValue `'outline'`
|
|
2800
|
+
*/
|
|
2801
|
+
variant?: InputVariantOf<DatePickerInputVariantRegistry>;
|
|
2451
2802
|
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2803
|
+
/**
|
|
2804
|
+
* How label and input sit together: `'vertical'`, `'horizontal'` (50/50),
|
|
2805
|
+
* `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a
|
|
2806
|
+
* per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`).
|
|
2807
|
+
*/
|
|
2808
|
+
layout?: Responsive<FieldLayout>;
|
|
2458
2809
|
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2810
|
+
/**
|
|
2811
|
+
* Vertical position of the label block in a side-by-side row; not
|
|
2812
|
+
* `labelPosition`, the horizontal one. Omitted, the label's first line
|
|
2813
|
+
* meets the control's.
|
|
2814
|
+
*/
|
|
2815
|
+
labelAlign?: FieldCrossAlign;
|
|
2465
2816
|
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2817
|
+
/**
|
|
2818
|
+
* Vertical position of the control in a side-by-side row; not
|
|
2819
|
+
* `inputPosition`, the horizontal one. Omitted, the control's first line
|
|
2820
|
+
* meets the label's.
|
|
2821
|
+
*/
|
|
2822
|
+
inputAlign?: FieldCrossAlign;
|
|
2470
2823
|
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
*/
|
|
2476
|
-
errors?: string | string[];
|
|
2824
|
+
/**
|
|
2825
|
+
* Disables the component.
|
|
2826
|
+
*/
|
|
2827
|
+
disabled?: boolean;
|
|
2477
2828
|
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
*/
|
|
2485
|
-
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
2829
|
+
/**
|
|
2830
|
+
* Error messages under the field, a string or array, in an
|
|
2831
|
+
* `aria-live="polite"` region and first in the control's
|
|
2832
|
+
* `aria-describedby`, so they are re-read when it regains focus.
|
|
2833
|
+
*/
|
|
2834
|
+
errors?: string | string[];
|
|
2486
2835
|
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2836
|
+
/**
|
|
2837
|
+
* First day of the week (0 = Sunday … 6 = Saturday). Omitted, the active
|
|
2838
|
+
* locale's week start: Monday for `it`, `de`, `fr`, `en-gb`…, Sunday for
|
|
2839
|
+
* bare `en` (US) and `pt` (Brazil). Ignored under `type="week"`: ISO
|
|
2840
|
+
* weeks run Monday to Sunday, so a week grid always starts on Monday.
|
|
2841
|
+
* @defaultValue the locale's week start
|
|
2842
|
+
*/
|
|
2843
|
+
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
2491
2844
|
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
hasErrors?: boolean;
|
|
2845
|
+
/**
|
|
2846
|
+
* If true the date will have a format YYYY-MM-DD instead of the default ISO string.
|
|
2847
|
+
*/
|
|
2848
|
+
floating?: boolean;
|
|
2497
2849
|
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
*/
|
|
2504
|
-
warnings?: string | string[];
|
|
2850
|
+
/**
|
|
2851
|
+
* Define if the component should be in an error state.
|
|
2852
|
+
* It usually attaches a CSS class for styling purposes.
|
|
2853
|
+
*/
|
|
2854
|
+
hasErrors?: boolean;
|
|
2505
2855
|
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2856
|
+
/**
|
|
2857
|
+
* Warning messages under the field, a string or array: amber, in their own
|
|
2858
|
+
* `aria-live` region and in the control's `aria-describedby` after the
|
|
2859
|
+
* errors. Non-empty turns on the warning state; errors win when both are
|
|
2860
|
+
* set.
|
|
2861
|
+
*/
|
|
2862
|
+
warnings?: string | string[];
|
|
2511
2863
|
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
* @defaultValue `false`
|
|
2518
|
-
*/
|
|
2519
|
-
disableCalendar?: boolean | 'mobile' | 'desktop';
|
|
2864
|
+
/**
|
|
2865
|
+
* Define if the component should be in a warning state.
|
|
2866
|
+
* Same chrome as errors with `--bb-warn`; errors take priority.
|
|
2867
|
+
*/
|
|
2868
|
+
hasWarnings?: boolean;
|
|
2520
2869
|
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2870
|
+
/**
|
|
2871
|
+
* Disables the calendar: hides the trigger button and prevents the popover
|
|
2872
|
+
* from opening. Use `'desktop'` to disable it on desktop only (keeping the
|
|
2873
|
+
* calendar for mobile, complementing `disableWriting: 'mobile'`) or
|
|
2874
|
+
* `'mobile'` to disable it on mobile only.
|
|
2875
|
+
* @defaultValue `false`
|
|
2876
|
+
*/
|
|
2877
|
+
disableCalendar?: boolean | 'mobile' | 'desktop';
|
|
2527
2878
|
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2879
|
+
/**
|
|
2880
|
+
* Visually hides the label of the input while maintaining accessibility.
|
|
2881
|
+
* Pair it with a `placeholder`: an empty field otherwise shows nothing
|
|
2882
|
+
* saying what it is for.
|
|
2883
|
+
*/
|
|
2884
|
+
hideLabel?: boolean;
|
|
2532
2885
|
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
id?: HTMLAttributes['id'];
|
|
2886
|
+
/**
|
|
2887
|
+
* Text box to be displayed near the input, usually to indicate instructions.
|
|
2888
|
+
*/
|
|
2889
|
+
hint?: string;
|
|
2538
2890
|
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2891
|
+
/**
|
|
2892
|
+
* The `id` of the native control; the label's `for` and the description
|
|
2893
|
+
* and message ids derive from it. Generated when omitted.
|
|
2894
|
+
*/
|
|
2895
|
+
id?: HTMLAttributes['id'];
|
|
2543
2896
|
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2897
|
+
/**
|
|
2898
|
+
* Text content of the label of the element.
|
|
2899
|
+
*/
|
|
2900
|
+
label: string;
|
|
2548
2901
|
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2902
|
+
/**
|
|
2903
|
+
* Text alignment of the label. `'start'` / `'end'` follow the page direction (the inline start is the left in a left-to-right page, the right in a right-to-left one); `'left'` / `'right'` stay physical; `'center'` centres it.
|
|
2904
|
+
* The default, `'start'`, follows the page direction.
|
|
2905
|
+
*
|
|
2906
|
+
* @defaultValue `'start'`
|
|
2907
|
+
*/
|
|
2908
|
+
labelPosition?: 'left' | 'center' | 'right' | 'start' | 'end';
|
|
2553
2909
|
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2910
|
+
/**
|
|
2911
|
+
* Label rendering mode.
|
|
2912
|
+
*/
|
|
2913
|
+
labelMode?: 'outside' | 'floating' | 'inside';
|
|
2558
2914
|
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
* mistakes. `type="week"`: a week (`YYYY-Www`) or a date, whole weeks only.
|
|
2564
|
-
*/
|
|
2565
|
-
max?: string;
|
|
2915
|
+
/**
|
|
2916
|
+
* Sets the component in a loading state, usually triggering some visual styles.
|
|
2917
|
+
*/
|
|
2918
|
+
loading?: boolean;
|
|
2566
2919
|
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2920
|
+
/**
|
|
2921
|
+
* Maximum selectable date in `YYYY-MM-DD` format — or, with `type="datetime"`,
|
|
2922
|
+
* `YYYY-MM-DDTHH:mm` to tighten the boundary day to a minute. Values
|
|
2923
|
+
* outside both patterns throw during setup to surface configuration
|
|
2924
|
+
* mistakes. `type="week"`: a week (`YYYY-Www`) or a date, whole weeks only.
|
|
2925
|
+
*/
|
|
2926
|
+
max?: string;
|
|
2574
2927
|
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2928
|
+
/**
|
|
2929
|
+
* Minimum selectable date in `YYYY-MM-DD` format — or, with `type="datetime"`,
|
|
2930
|
+
* `YYYY-MM-DDTHH:mm` to tighten the boundary day to a minute. Values
|
|
2931
|
+
* outside both patterns throw during setup to surface configuration
|
|
2932
|
+
* mistakes. `type="week"`: a week (`YYYY-Www`) or a date, whole weeks only.
|
|
2933
|
+
*/
|
|
2934
|
+
min?: string;
|
|
2579
2935
|
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2936
|
+
/**
|
|
2937
|
+
* Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed.
|
|
2938
|
+
*/
|
|
2939
|
+
modelValue?: string | string[] | null;
|
|
2584
2940
|
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2941
|
+
/**
|
|
2942
|
+
* Defines the name of the input.
|
|
2943
|
+
*/
|
|
2944
|
+
name?: InputHTMLAttributes['name'];
|
|
2589
2945
|
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2946
|
+
/**
|
|
2947
|
+
* Keeps the hint displayed.
|
|
2948
|
+
*/
|
|
2949
|
+
persistentHint?: boolean;
|
|
2594
2950
|
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2951
|
+
/**
|
|
2952
|
+
* Text shown while the field is empty.
|
|
2953
|
+
*/
|
|
2954
|
+
placeholder?: InputHTMLAttributes['placeholder'];
|
|
2598
2955
|
|
|
2599
|
-
|
|
2956
|
+
/**
|
|
2957
|
+
* Name of the icon to be added at the start of the input.
|
|
2958
|
+
*/
|
|
2600
2959
|
|
|
2601
|
-
|
|
2602
|
-
* Selects a range of dates between two dates. It selects all of the days between start and end.
|
|
2603
|
-
*/
|
|
2604
|
-
range?: boolean;
|
|
2960
|
+
'prepend:icon'?: IconType;
|
|
2605
2961
|
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
* @defaultValue `1`
|
|
2611
|
-
*/
|
|
2612
|
-
numberOfMonths?: number;
|
|
2962
|
+
/**
|
|
2963
|
+
* Selects a range of dates between two dates. It selects all of the days between start and end.
|
|
2964
|
+
*/
|
|
2965
|
+
range?: boolean;
|
|
2613
2966
|
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2967
|
+
/**
|
|
2968
|
+
* How many months the calendar popover shows side by side (day grids
|
|
2969
|
+
* only); the phone sheet always shows one. Too narrow for them all,
|
|
2970
|
+
* the months wrap.
|
|
2971
|
+
* @defaultValue `1`
|
|
2972
|
+
*/
|
|
2973
|
+
numberOfMonths?: number;
|
|
2618
2974
|
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2975
|
+
/**
|
|
2976
|
+
* Sets the input in a readonly state.
|
|
2977
|
+
*/
|
|
2978
|
+
readonly?: boolean;
|
|
2623
2979
|
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2980
|
+
/**
|
|
2981
|
+
* Sets the input as required.
|
|
2982
|
+
*/
|
|
2983
|
+
required?: boolean;
|
|
2628
2984
|
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
selectable?: (date: string) => boolean;
|
|
2985
|
+
/**
|
|
2986
|
+
* Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
|
|
2987
|
+
*/
|
|
2988
|
+
reverse?: boolean;
|
|
2634
2989
|
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
* the time travels only through `v-model:time`.
|
|
2641
|
-
*/
|
|
2642
|
-
/**
|
|
2643
|
-
* What the field edits, so its segments and emitted shape: `date`
|
|
2644
|
-
* (`DD/MM/YYYY`), `datetime` (adds the time segments and rail), `week`
|
|
2645
|
-
* (`W44 2026`, emits `2026-W44`), `month` (`MM/YYYY`, emits `YYYY-MM`)
|
|
2646
|
-
* or `year` (`YYYY`). The last three force `floating` and ignore `utc`
|
|
2647
|
-
* and the time props.
|
|
2648
|
-
*
|
|
2649
|
-
* @defaultValue `'date'`
|
|
2650
|
-
*/
|
|
2651
|
-
type?: DatePickerType;
|
|
2990
|
+
/**
|
|
2991
|
+
* Function that accepts a `string` object and returns a boolean. `false` meaning the date cannot be selected.
|
|
2992
|
+
* Under `type="week"` it receives the week value (`2026-W44`).
|
|
2993
|
+
*/
|
|
2994
|
+
selectable?: (date: string) => boolean;
|
|
2652
2995
|
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2996
|
+
/**
|
|
2997
|
+
* Adds time selection beside date selection: `HH:mm` segments in the text
|
|
2998
|
+
* field (24-hour) and time columns under the calendar. A picked or typed
|
|
2999
|
+
* date with a blank time commits at `00:00`. Non-floating values carry the
|
|
3000
|
+
* time inside `modelValue`; with `floating` the date string stays plain and
|
|
3001
|
+
* the time travels only through `v-model:time`.
|
|
3002
|
+
*/
|
|
3003
|
+
/**
|
|
3004
|
+
* What the field edits, so its segments and emitted shape: `date`
|
|
3005
|
+
* (`DD/MM/YYYY`), `datetime` (adds the time segments and rail), `week`
|
|
3006
|
+
* (`W44 2026`, emits `2026-W44`), `month` (`MM/YYYY`, emits `YYYY-MM`)
|
|
3007
|
+
* or `year` (`YYYY`). The last three force `floating` and ignore `utc`
|
|
3008
|
+
* and the time props.
|
|
3009
|
+
*
|
|
3010
|
+
* @defaultValue `'date'`
|
|
3011
|
+
*/
|
|
3012
|
+
type?: DatePickerType;
|
|
2659
3013
|
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
3014
|
+
/**
|
|
3015
|
+
* 12-hour display with an AM/PM segment (requires `type="datetime"`). Purely a
|
|
3016
|
+
* field-composition concern: `modelValue` and the `time` model stay 24-hour
|
|
3017
|
+
* regardless. Type `A`/`P` (or ArrowUp/Down) to set the meridiem.
|
|
3018
|
+
*/
|
|
3019
|
+
ampm?: boolean;
|
|
2666
3020
|
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
*/
|
|
2674
|
-
step?: number;
|
|
3021
|
+
/**
|
|
3022
|
+
* Adds the seconds segment (requires `type="datetime"`). Without it, an incoming
|
|
3023
|
+
* value carrying seconds displays truncated and is left untouched until the
|
|
3024
|
+
* user commits an edit, at which point seconds zero out.
|
|
3025
|
+
*/
|
|
3026
|
+
seconds?: boolean;
|
|
2675
3027
|
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
3028
|
+
/**
|
|
3029
|
+
* Minute granularity for the calendar's minute column and arrow stepping
|
|
3030
|
+
* (requires `type="datetime"`). Constrains what the component produces, never what
|
|
3031
|
+
* it accepts: a typed off-grid value (e.g. `10:07` with `step: 15`) is
|
|
3032
|
+
* emitted verbatim, and no column row highlights for it.
|
|
3033
|
+
* @defaultValue `1`
|
|
3034
|
+
*/
|
|
3035
|
+
step?: number;
|
|
2682
3036
|
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
3037
|
+
/**
|
|
3038
|
+
* `v-model:time`: the time part, always 24-hour `HH:mm` / `HH:mm:ss`. With
|
|
3039
|
+
* `floating` it is the only carrier of the time; otherwise it mirrors
|
|
3040
|
+
* `modelValue`'s, and writing it rewrites that. Requires `type="datetime"`.
|
|
3041
|
+
*/
|
|
3042
|
+
time?: string | string[] | null;
|
|
2687
3043
|
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
3044
|
+
/**
|
|
3045
|
+
* Transition duration, in milliseconds, for the popover appearance.
|
|
3046
|
+
*/
|
|
3047
|
+
transitionDuration?: number;
|
|
3048
|
+
|
|
3049
|
+
/**
|
|
3050
|
+
* Emits UTC ISO strings (`…Z`) instead of the local offset (`…+01:00`).
|
|
3051
|
+
* Emission only: incoming values parse the same either way, and the field
|
|
3052
|
+
* always displays local time. Ignored with `floating`.
|
|
3053
|
+
*/
|
|
3054
|
+
utc?: boolean;
|
|
3055
|
+
} & FormFieldProps<string | string[] | null>;
|
|
2695
3056
|
|
|
2696
3057
|
/**
|
|
2697
3058
|
* Structured payload carried by every `error` event.
|
|
@@ -2734,7 +3095,7 @@ export type DatePickerInputError =
|
|
|
2734
3095
|
};
|
|
2735
3096
|
|
|
2736
3097
|
/**
|
|
2737
|
-
* The v-model of `BbDatePickerInput`, typed by the mode props (
|
|
3098
|
+
* The v-model of `BbDatePickerInput`, typed by the mode props (vmodel): what the
|
|
2738
3099
|
* generic component adds to `BbDatePickerInputBaseProps`, whose own spelling stays
|
|
2739
3100
|
* non-generic so the SFC compiler keeps Vue's Boolean cast on them.
|
|
2740
3101
|
*/
|