bitboss-ui 3.0.0-beta.3 → 3.0.0-beta.31
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 +220 -65
- package/bin/bitboss-ui-mcp.mjs +474 -17
- package/bin/bitboss-ui.mjs +348 -50
- package/dist/ai/BbAccordion.md +150 -32
- package/dist/ai/BbAlert.md +124 -21
- package/dist/ai/BbAsterisk.md +53 -1
- package/dist/ai/BbAvatar.md +179 -27
- package/dist/ai/BbBadge.md +228 -37
- package/dist/ai/BbBadgeButton.md +68 -16
- package/dist/ai/BbBaseButton.md +123 -46
- package/dist/ai/BbBaseCheckboxIcon.md +114 -26
- package/dist/ai/BbBaseRadioIcon.md +111 -26
- package/dist/ai/BbBaseSwitchIcon.md +119 -28
- package/dist/ai/BbBreadcrumbs.md +195 -43
- package/dist/ai/BbButton.md +323 -76
- package/dist/ai/BbCalendar.md +621 -0
- package/dist/ai/BbCheckbox.md +216 -56
- package/dist/ai/BbCheckboxGroup.md +267 -30
- package/dist/ai/BbCollapsible.md +154 -39
- package/dist/ai/BbColorInput.md +280 -44
- package/dist/ai/BbColorPalette.md +228 -45
- package/dist/ai/BbConfirm.md +201 -41
- package/dist/ai/BbDatePicker.md +253 -25
- package/dist/ai/BbDatePickerInput.md +297 -54
- package/dist/ai/BbDialog.md +464 -73
- package/dist/ai/BbDropdown.md +938 -77
- package/dist/ai/BbDropdownButton.md +188 -48
- package/dist/ai/BbDropdownGroup.md +9 -1
- package/dist/ai/BbDropzone.md +122 -16
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +93 -32
- package/dist/ai/BbIndicator.md +73 -10
- package/dist/ai/BbNumberInput.md +211 -45
- package/dist/ai/BbOffCanvas.md +357 -66
- package/dist/ai/BbPagination.md +165 -26
- package/dist/ai/BbPopover.md +189 -34
- package/dist/ai/BbProgress.md +96 -55
- package/dist/ai/BbPtScope.md +136 -0
- package/dist/ai/BbRadio.md +205 -26
- package/dist/ai/BbRadioGroup.md +346 -39
- package/dist/ai/BbRating.md +130 -25
- package/dist/ai/BbSelect.md +583 -77
- package/dist/ai/BbSelectPopover.md +351 -82
- package/dist/ai/BbSlider.md +226 -51
- package/dist/ai/BbSmoothHeight.md +136 -32
- package/dist/ai/BbSpinner.md +166 -74
- package/dist/ai/BbSwitch.md +219 -31
- package/dist/ai/BbSwitchGroup.md +267 -29
- package/dist/ai/BbTable.md +1314 -162
- package/dist/ai/BbTabs.md +586 -114
- package/dist/ai/BbTabsList.md +58 -3
- package/dist/ai/BbTabsPanes.md +34 -2
- package/dist/ai/BbTabsRoot.md +61 -10
- package/dist/ai/BbTag.md +220 -42
- package/dist/ai/BbTextInput.md +429 -55
- package/dist/ai/BbTextarea.md +263 -51
- package/dist/ai/BbTimePicker.md +126 -11
- package/dist/ai/BbTimePickerInput.md +237 -22
- package/dist/ai/BbToast.md +183 -38
- package/dist/ai/BbToastPortal.md +28 -1
- package/dist/ai/BbTooltip.md +170 -30
- package/dist/ai/BbTree.md +236 -74
- package/dist/ai/ChipsBox.md +41 -1
- package/dist/ai/ClearableButton.md +12 -0
- package/dist/ai/CommaBox.md +1 -0
- package/dist/ai/{BbBaseInputContainer.md → CommonField.md} +19 -17
- package/dist/ai/CommonFieldInput.md +90 -0
- package/dist/ai/CommonPopover.md +12 -7
- package/dist/ai/CommonTimeSelector.md +61 -0
- package/dist/ai/ErrorIcon.md +20 -0
- package/dist/ai/FlatListBox.md +33 -5
- package/dist/ai/GroupedListBox.md +33 -5
- package/dist/ai/ListBox.md +37 -4
- package/dist/ai/OptionsContainer.md +6 -5
- package/dist/ai/WarningIcon.md +20 -0
- package/dist/ai/changelog.json +1212 -44
- package/dist/ai/components.json +41488 -9859
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +10 -5
- package/dist/ai/composables/useToast.md +4 -2
- package/dist/ai/guides/agent-contract.md +95 -10
- package/dist/ai/guides/ai-router.md +57 -31
- package/dist/ai/guides/app-layout.md +3 -1
- package/dist/ai/guides/component-picker.md +27 -20
- package/dist/ai/guides/design-language.md +217 -61
- package/dist/ai/guides/design-tokens.md +448 -105
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +55 -23
- package/dist/ai/guides/inline-edit-playbook.md +1 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +621 -45
- package/dist/ai/guides/migration/components/bb-accordion.md +29 -0
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-avatar.md +13 -14
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +8 -7
- package/dist/ai/guides/migration/components/bb-button.md +80 -20
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +61 -28
- package/dist/ai/guides/migration/components/bb-checkbox.md +45 -10
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +9 -9
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +39 -29
- package/dist/ai/guides/migration/components/bb-dialog.md +68 -35
- package/dist/ai/guides/migration/components/bb-dropdown.md +30 -8
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-popover.md +12 -11
- package/dist/ai/guides/migration/components/bb-rating.md +52 -17
- package/dist/ai/guides/migration/components/bb-select-popover.md +8 -0
- package/dist/ai/guides/migration/components/bb-select.md +18 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-tabs.md +56 -14
- package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/v2-to-v3.md +526 -192
- package/dist/ai/guides/options-items-playbook.md +57 -1
- package/dist/ai/guides/passthrough.md +748 -0
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/guides/validated-forms.md +5 -0
- package/dist/ai/index.md +24 -36
- package/dist/ai/recipes/inertia/approvals-inbox.md +3 -4
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +10 -11
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/onboarding.md +2 -2
- package/dist/ai/recipes/inertia/ownership-atlas.md +66 -44
- package/dist/ai/recipes/inertia/record-form.md +5 -6
- package/dist/ai/recipes/inertia/records-workspace.md +133 -12
- package/dist/ai/recipes/inertia/upload-center.md +8 -9
- package/dist/ai/recipes/inertia/wizard-form.md +68 -5
- package/dist/ai/recipes/nuxt/approvals-inbox.md +3 -4
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +10 -11
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/onboarding.md +2 -2
- package/dist/ai/recipes/nuxt/record-form.md +5 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +135 -12
- package/dist/ai/recipes/nuxt/upload-center.md +8 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +68 -5
- package/dist/ai/recipes/vue/approvals-inbox.md +3 -4
- package/dist/ai/recipes/vue/inline-edit-workspace.md +10 -11
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/recipes/vue/record-form.md +10 -10
- package/dist/ai/recipes/vue/records-workspace.md +129 -12
- package/dist/ai/recipes/vue/upload-center.md +8 -9
- package/dist/ai/recipes/vue/wizard-form.md +65 -5
- package/dist/ai/source/BbAccordion.md +83 -21
- package/dist/ai/source/BbAlert.md +188 -60
- package/dist/ai/source/BbAsterisk.md +54 -4
- package/dist/ai/source/BbAvatar.md +63 -16
- package/dist/ai/source/BbBadge.md +196 -60
- package/dist/ai/source/BbBadgeButton.md +150 -43
- package/dist/ai/source/BbBaseButton.md +103 -9
- package/dist/ai/source/BbBaseCheckboxIcon.md +151 -36
- package/dist/ai/source/BbBaseRadioIcon.md +121 -17
- package/dist/ai/source/BbBaseSwitchIcon.md +138 -28
- package/dist/ai/source/BbBreadcrumbs.md +246 -57
- package/dist/ai/source/BbButton.md +457 -165
- package/dist/ai/source/BbCalendar.md +1621 -0
- package/dist/ai/source/BbCheckbox.md +433 -59
- package/dist/ai/source/BbCheckboxGroup.md +722 -77
- package/dist/ai/source/BbCollapsible.md +90 -8
- package/dist/ai/source/BbColorInput.md +505 -58
- package/dist/ai/source/BbColorPalette.md +1169 -51
- package/dist/ai/source/BbConfirm.md +134 -4
- package/dist/ai/source/BbConfirmPortal.md +83 -0
- package/dist/ai/source/BbDatePicker.md +471 -369
- package/dist/ai/source/BbDatePickerInput.md +1973 -106
- package/dist/ai/source/BbDialog.md +435 -45
- package/dist/ai/source/BbDropdown.md +777 -135
- package/dist/ai/source/BbDropdownButton.md +305 -74
- package/dist/ai/source/BbDropdownGroup.md +605 -68
- package/dist/ai/source/BbDropzone.md +93 -14
- package/dist/ai/source/BbForm.md +95 -7
- package/dist/ai/source/BbIcon.md +114 -48
- package/dist/ai/source/BbIndicator.md +85 -42
- package/dist/ai/source/BbNumberInput.md +574 -73
- package/dist/ai/source/BbOffCanvas.md +789 -249
- package/dist/ai/source/BbPagination.md +124 -19
- package/dist/ai/source/BbPopover.md +227 -79
- package/dist/ai/source/BbProgress.md +53 -5
- package/dist/ai/source/BbPtScope.md +54 -0
- package/dist/ai/source/BbRadio.md +369 -52
- package/dist/ai/source/BbRadioGroup.md +707 -91
- package/dist/ai/source/BbRating.md +645 -73
- package/dist/ai/source/BbSelect.md +939 -76
- package/dist/ai/source/BbSelectPopover.md +614 -66
- package/dist/ai/source/BbSlider.md +1205 -81
- package/dist/ai/source/BbSmoothHeight.md +48 -2
- package/dist/ai/source/BbSpinner.md +62 -6
- package/dist/ai/source/BbSwitch.md +277 -55
- package/dist/ai/source/BbSwitchGroup.md +568 -77
- package/dist/ai/source/BbTable.md +5754 -1777
- package/dist/ai/source/BbTabs.md +189 -90
- package/dist/ai/source/BbTabsList.md +219 -90
- package/dist/ai/source/BbTabsPanes.md +191 -85
- package/dist/ai/source/BbTabsRoot.md +183 -84
- package/dist/ai/source/BbTag.md +670 -76
- package/dist/ai/source/BbTextInput.md +439 -59
- package/dist/ai/source/BbTextarea.md +483 -54
- package/dist/ai/source/BbTimePicker.md +305 -56
- package/dist/ai/source/BbTimePickerInput.md +1145 -91
- package/dist/ai/source/BbToast.md +121 -36
- package/dist/ai/source/BbToastPortal.md +77 -27
- package/dist/ai/source/BbTooltip.md +147 -22
- package/dist/ai/source/BbTree.md +61 -3
- package/dist/ai/source/ChipsBox.md +12 -2
- package/dist/ai/source/CommaBox.md +10 -2
- package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +318 -210
- package/dist/ai/source/CommonFieldInput.md +799 -0
- package/dist/ai/source/CommonPopover.md +108 -26
- package/dist/ai/source/CommonTimeSelector.md +642 -0
- package/dist/ai/source/ErrorIcon.md +2 -2
- package/dist/ai/source/FlatListBox.md +172 -11
- package/dist/ai/source/GroupedListBox.md +198 -11
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/ListBox.md +29 -2
- package/dist/ai/source/OptionsContainer.md +197 -26
- package/dist/ai/source/WarningIcon.md +2 -2
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
- package/dist/components/BbAccordion/types.d.ts +32 -1
- package/dist/components/BbAccordion/types.js +11 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +45 -29
- package/dist/components/BbAlert/types.d.ts +35 -1
- package/dist/components/BbAlert/types.js +13 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +23 -8
- package/dist/components/BbAsterisk/types.d.ts +18 -0
- package/dist/components/BbAsterisk/types.js +7 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +57 -44
- package/dist/components/BbAvatar/types.d.ts +23 -0
- package/dist/components/BbAvatar/types.js +7 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +95 -52
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +27 -8
- package/dist/components/BbBadge/badgeButtonContext.d.ts +25 -8
- package/dist/components/BbBadge/types.d.ts +46 -3
- package/dist/components/BbBadge/types.js +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +110 -97
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/BbBaseButton/types.d.ts +28 -0
- package/dist/components/BbBaseButton/types.js +9 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +50 -18
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +31 -2
- package/dist/components/BbBaseCheckboxIcon/types.js +8 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +45 -15
- package/dist/components/BbBaseRadioIcon/types.d.ts +31 -2
- package/dist/components/BbBaseRadioIcon/types.js +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +48 -16
- package/dist/components/BbBaseSwitchIcon/types.d.ts +31 -2
- package/dist/components/BbBaseSwitchIcon/types.js +8 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +151 -110
- package/dist/components/BbBreadcrumbs/types.d.ts +40 -0
- package/dist/components/BbBreadcrumbs/types.js +12 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +104 -77
- package/dist/components/BbButton/types.d.ts +49 -2
- package/dist/components/BbButton/types.js +12 -0
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +34 -0
- package/dist/components/BbCalendar/BbCalendar.vue.js +6 -0
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +576 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbCalendar/calendarHost.d.ts +29 -0
- package/dist/components/BbCalendar/calendarHost.js +10 -0
- package/dist/components/BbCalendar/types.d.ts +215 -0
- package/dist/components/BbCalendar/types.js +28 -0
- package/dist/components/{BbBaseDatePicker/useDatePickerContext.d.ts → BbCalendar/useCalendarContext.d.ts} +10 -7
- package/dist/components/BbCalendar/useCalendarContext.js +11 -0
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +208 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +269 -0
- package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
- package/dist/components/BbCalendar/useDayGrid.js +203 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +1 -1
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +194 -67
- package/dist/components/BbCheckbox/types.d.ts +164 -9
- package/dist/components/BbCheckbox/types.js +8 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +310 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +152 -8
- package/dist/components/BbCheckboxGroup/types.js +10 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +41 -19
- package/dist/components/BbCollapsible/types.d.ts +44 -1
- package/dist/components/BbCollapsible/types.js +7 -0
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +11 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +306 -81
- package/dist/components/BbColorInput/types.d.ts +204 -6
- package/dist/components/BbColorInput/types.js +24 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +10 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +508 -104
- package/dist/components/BbColorPalette/types.d.ts +72 -3
- package/dist/components/BbColorPalette/types.js +12 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +116 -76
- package/dist/components/BbConfirm/types.d.ts +49 -0
- package/dist/components/BbConfirm/types.js +17 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -10
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +294 -218
- package/dist/components/BbDatePicker/types.d.ts +98 -15
- package/dist/components/BbDatePicker/types.js +32 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +14 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1148 -82
- package/dist/components/BbDatePickerInput/types.d.ts +201 -11
- package/dist/components/BbDatePickerInput/types.js +38 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +4 -4
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +218 -136
- package/dist/components/BbDialog/types.d.ts +86 -2
- package/dist/components/BbDialog/types.js +16 -0
- package/dist/components/BbDialog/useDialogStack.d.ts +12 -0
- package/dist/components/BbDialog/useDialogStack.js +9 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +108 -96
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +10 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +354 -290
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +6 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +330 -281
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -89
- package/dist/components/BbDropdown/normalizeGroups.js +35 -31
- package/dist/components/BbDropdown/types.d.ts +230 -12
- package/dist/components/BbDropdown/types.js +20 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +7 -1
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +13 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +123 -37
- package/dist/components/BbDropdownButton/types.d.ts +105 -3
- package/dist/components/BbDropdownButton/types.js +30 -0
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +169 -138
- package/dist/components/BbDropzone/types.d.ts +32 -1
- package/dist/components/BbDropzone/types.js +16 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +58 -48
- package/dist/components/BbIcon/iconCache.d.ts +63 -0
- package/dist/components/BbIcon/iconCache.js +35 -0
- package/dist/components/BbIcon/types.d.ts +22 -2
- package/dist/components/BbIcon/types.js +7 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +33 -20
- package/dist/components/BbIndicator/types.d.ts +24 -0
- package/dist/components/BbIndicator/types.js +7 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +6 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +272 -80
- package/dist/components/BbNumberInput/types.d.ts +178 -11
- package/dist/components/BbNumberInput/types.js +8 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +4 -4
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +294 -207
- package/dist/components/BbOffCanvas/types.d.ts +73 -5
- package/dist/components/BbOffCanvas/types.js +15 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +119 -96
- package/dist/components/BbPagination/types.d.ts +32 -0
- package/dist/components/BbPagination/types.js +11 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +5 -5
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +151 -121
- package/dist/components/BbPopover/types.d.ts +47 -2
- package/dist/components/BbPopover/types.js +14 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +27 -15
- package/dist/components/BbProgress/types.d.ts +21 -0
- package/dist/components/BbProgress/types.js +7 -0
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +12 -0
- package/dist/components/BbPtScope/BbPtScope.vue.js +5 -0
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbPtScope/types.d.ts +15 -0
- package/dist/components/BbRadio/BbRadio.vue.d.ts +1 -1
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +166 -56
- package/dist/components/BbRadio/types.d.ts +137 -9
- package/dist/components/BbRadio/types.js +8 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +2 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +292 -82
- package/dist/components/BbRadioGroup/types.d.ts +155 -10
- package/dist/components/BbRadioGroup/types.js +10 -0
- package/dist/components/BbRating/BbRating.vue.d.ts +4 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +244 -73
- package/dist/components/BbRating/types.d.ts +152 -6
- package/dist/components/BbRating/types.js +21 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +474 -75
- package/dist/components/BbSelect/types.d.ts +174 -8
- package/dist/components/BbSelect/types.js +26 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +461 -349
- package/dist/components/BbSelectPopover/types.d.ts +114 -4
- package/dist/components/BbSelectPopover/types.js +24 -0
- package/dist/components/BbSlider/BbSlider.vue.d.ts +10 -4
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +396 -92
- package/dist/components/BbSlider/types.d.ts +175 -6
- package/dist/components/BbSlider/types.js +21 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +60 -48
- package/dist/components/BbSmoothHeight/types.d.ts +19 -0
- package/dist/components/BbSmoothHeight/types.js +7 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +27 -14
- package/dist/components/BbSpinner/types.d.ts +22 -1
- package/dist/components/BbSpinner/types.js +7 -0
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +1 -1
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +202 -75
- package/dist/components/BbSwitch/types.d.ts +25 -10
- package/dist/components/BbSwitch/types.js +5 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +2 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +310 -80
- package/dist/components/BbSwitchGroup/types.d.ts +29 -6
- package/dist/components/BbSwitchGroup/types.js +5 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1583 -655
- package/dist/components/BbTable/BbTableDataRow.d.ts +169 -0
- package/dist/components/BbTable/BbTableDataRow.js +133 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +103 -0
- package/dist/components/BbTable/BbTableSelectToggle.js +114 -0
- package/dist/components/BbTable/types.d.ts +372 -111
- package/dist/components/BbTable/types.js +18 -0
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +72 -37
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +32 -20
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +39 -33
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +14 -13
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +12 -1
- package/dist/components/BbTabs/types.d.ts +84 -11
- package/dist/components/BbTabs/types.js +11 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +7 -4
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +350 -88
- package/dist/components/BbTag/types.d.ts +90 -5
- package/dist/components/BbTag/types.js +8 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +4 -2
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +245 -80
- package/dist/components/BbTextInput/types.d.ts +147 -6
- package/dist/components/BbTextInput/types.js +8 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +273 -91
- package/dist/components/BbTextarea/types.d.ts +134 -6
- package/dist/components/BbTextarea/types.js +8 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +10 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +159 -107
- package/dist/components/BbTimePicker/types.d.ts +66 -3
- package/dist/components/BbTimePicker/types.js +12 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +12 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +708 -83
- package/dist/components/BbTimePickerInput/types.d.ts +128 -12
- package/dist/components/BbTimePickerInput/types.js +23 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +51 -25
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +3 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +3 -0
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
- package/dist/components/BbToast/types.d.ts +28 -0
- package/dist/components/BbToast/types.js +13 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +100 -84
- package/dist/components/BbTooltip/types.d.ts +40 -2
- package/dist/components/BbTooltip/types.js +7 -0
- package/dist/components/BbTree/BbTree.vue.d.ts +11 -1
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +44 -28
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +13 -12
- package/dist/components/BbTree/context.d.ts +4 -1
- package/dist/components/BbTree/types.d.ts +36 -1
- package/dist/components/BbTree/types.js +7 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/ChipsBox/types.d.ts +6 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/components/CommaBox/types.d.ts +6 -0
- package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +4 -4
- package/dist/components/{BbBaseRadio/BbBaseRadio.vue.js → CommonField/CommonField.vue.js} +2 -2
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
- package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +33 -10
- package/dist/components/{CommonInputWrapper/CommonInputWrapper.vue.d.ts → CommonFieldInput/CommonFieldInput.vue.d.ts} +5 -4
- package/dist/components/{BbBaseRadioGroup/BbBaseRadioGroup.vue.js → CommonFieldInput/CommonFieldInput.vue.js} +2 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
- package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +25 -6
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +11 -2
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +76 -63
- package/dist/components/CommonPopover/types.d.ts +27 -8
- package/dist/components/{BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts → CommonTimeSelector/CommonTimeSelector.vue.d.ts} +4 -1
- package/dist/components/{BbBaseColorPalette/BbBaseColorPalette.vue.js → CommonTimeSelector/CommonTimeSelector.vue.js} +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/components/CommonTimeSelector/types.d.ts +6 -0
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +163 -100
- package/dist/components/FlatListBox/types.d.ts +15 -0
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +190 -127
- package/dist/components/GroupedListBox/types.d.ts +15 -0
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +82 -66
- package/dist/components/ListBox/types.d.ts +15 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +89 -35
- package/dist/components/OptionsContainer/types.d.ts +37 -5
- package/dist/composables/useBaseOptions.d.ts +12 -1
- package/dist/composables/useBaseOptions.js +63 -31
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useBbDropdownContext.d.ts +5 -0
- package/dist/composables/useBbTabsContext.d.ts +16 -2
- package/dist/composables/useBbTabsContext.js +157 -145
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +11 -0
- package/dist/composables/useConfirm.d.ts +33 -2
- package/dist/composables/useConfirm.js +43 -40
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePassthrough.d.ts +206 -0
- package/dist/composables/usePassthrough.js +224 -0
- package/dist/composables/usePrefill.d.ts +22 -2
- package/dist/composables/usePrefill.js +35 -19
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useSegmentedFields.d.ts +2 -2
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.d.ts +18 -1
- package/dist/composables/useToast.js +22 -18
- package/dist/composables/useToggleInput.d.ts +44 -0
- package/dist/composables/useToggleInput.js +39 -0
- package/dist/composables/useViewportWidth.d.ts +20 -6
- package/dist/composables/useViewportWidth.js +8 -7
- package/dist/deprecation/ai-deprecations.json.d.ts +352 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +92 -37
- package/dist/i18n/locales/cs.json +6 -3
- package/dist/i18n/locales/da.json +6 -3
- package/dist/i18n/locales/de.json +6 -3
- package/dist/i18n/locales/el.json +6 -3
- package/dist/i18n/locales/en.json +6 -3
- package/dist/i18n/locales/es.json +6 -3
- package/dist/i18n/locales/fi.json +6 -3
- package/dist/i18n/locales/fr.json +6 -3
- package/dist/i18n/locales/hu.json +6 -3
- package/dist/i18n/locales/it.json +6 -3
- package/dist/i18n/locales/ja.json +6 -3
- package/dist/i18n/locales/ko.json +6 -3
- package/dist/i18n/locales/nb.json +6 -3
- package/dist/i18n/locales/nl.json +6 -3
- package/dist/i18n/locales/pl.json +6 -3
- package/dist/i18n/locales/pt.json +6 -3
- package/dist/i18n/locales/ro.json +6 -3
- package/dist/i18n/locales/ru.json +6 -3
- package/dist/i18n/locales/sv.json +6 -3
- package/dist/i18n/locales/tr.json +6 -3
- package/dist/i18n/locales/uk.json +6 -3
- package/dist/i18n/locales/zh-cn.json +6 -3
- package/dist/icon-scan.d.ts +276 -0
- package/dist/icon-scan.js +485 -0
- package/dist/icons-whitelist.d.ts +5 -4
- package/dist/index.d.ts +25 -4
- package/dist/index.js +71 -67
- package/dist/input-variants.d.ts +18 -0
- package/dist/llms-full.txt +19548 -4738
- package/dist/llms-medium.txt +1036 -184
- package/dist/llms.txt +14 -11
- package/dist/locale-blueprint.json +6 -3
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +26 -1
- package/dist/nuxt.js +26 -9
- package/dist/passthrough-deduper.js +5 -0
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +21 -19
- package/dist/pt-scope-registry.d.ts +15 -0
- package/dist/runtime/nuxt-plugin.js +29 -21
- package/dist/styles.css +1 -1
- package/dist/tabs-variants.d.ts +18 -0
- package/dist/types/BadgeVariant.d.ts +6 -4
- package/dist/types/ColumnName.d.ts +1 -1
- package/dist/types/CommonProps.d.ts +2 -2
- package/dist/types/Config.d.ts +47 -0
- package/dist/types/InputVariant.d.ts +22 -0
- package/dist/types/ItemProps.d.ts +50 -0
- package/dist/types/Option.d.ts +6 -0
- package/dist/types/PtScope.d.ts +13 -0
- package/dist/types/TabsVariant.d.ts +17 -0
- package/dist/types/passthrough.d.ts +332 -0
- package/dist/types/passthrough.js +78 -0
- package/dist/types/ptComponentMap.d.ts +60 -0
- package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
- package/dist/utilities/functions/hasVnodeListener.js +12 -0
- package/dist/utilities/functions/itemProps.d.ts +46 -0
- package/dist/utilities/functions/itemProps.js +47 -0
- package/dist/utilities/functions/slotKey.d.ts +5 -5
- package/dist/utilities/functions/slotKey.js +1 -1
- package/dist/utilities/functions/toggleInput.d.ts +98 -0
- package/dist/utilities/functions/toggleInput.js +56 -0
- package/dist/utilities/misc/listboxMetrics.d.ts +9 -3
- package/dist/utilities/misc/listboxMetrics.js +5 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/utils/cssLayers.d.ts +91 -0
- package/dist/utils/cssLayers.js +43 -0
- package/dist/utils/injectLibraryStyles.d.ts +3 -1
- package/dist/utils/injectLibraryStyles.js +24 -23
- package/dist/utils/passthrough.d.ts +70 -0
- package/dist/utils/passthrough.js +100 -0
- package/dist/utils/passthroughDeduper.d.ts +2 -0
- package/dist/utils/passthroughTestKit.d.ts +54 -0
- package/dist/utils/ptScope.d.ts +8 -0
- package/dist/utils/ptScope.js +4 -0
- package/dist/utils/swipeTestKit.d.ts +9 -0
- package/dist/validated/BbCheckbox.vue.d.ts +3 -1
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +82 -23
- package/dist/validated/BbCheckboxGroup.vue.d.ts +125 -2
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +113 -25
- package/dist/validated/BbColorInput.vue.d.ts +9 -7
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +145 -25
- package/dist/validated/BbDatePickerInput.vue.d.ts +11 -9
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +417 -27
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +17 -1
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -28
- package/dist/validated/BbNumberInput.vue.d.ts +9 -7
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +115 -25
- package/dist/validated/BbRadioGroup.vue.d.ts +124 -2
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +113 -25
- package/dist/validated/BbRating.vue.d.ts +6 -4
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +69 -22
- package/dist/validated/BbSelect.vue.d.ts +235 -2
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -32
- package/dist/validated/BbSlider.vue.d.ts +9 -7
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +72 -25
- package/dist/validated/BbSwitch.vue.d.ts +3 -1
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +82 -23
- package/dist/validated/BbSwitchGroup.vue.d.ts +125 -2
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +113 -25
- package/dist/validated/BbTag.vue.d.ts +9 -7
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +122 -25
- package/dist/validated/BbTextInput.vue.d.ts +9 -7
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +115 -25
- package/dist/validated/BbTextarea.vue.d.ts +9 -7
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +115 -25
- package/dist/validated/BbTimePickerInput.vue.d.ts +9 -7
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +175 -25
- package/dist/validated/index.d.ts +3 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite-plugin.d.ts +233 -27
- package/dist/vite.js +517 -303
- package/llms.txt +15 -12
- package/package.json +15 -11
- package/scripts/lib/component-tree.ts +611 -0
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-plugin.d.ts +58 -1
- package/scripts/lib/eslint-plugin.mjs +899 -17
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +133 -0
- package/scripts/lib/mcp-config.mjs +87 -58
- package/scripts/lib/public-type-exports.mjs +246 -0
- package/scripts/lib/validate-bb-markup.mjs +318 -34
- package/dist/ai/BbBaseCheckbox.md +0 -49
- package/dist/ai/BbBaseCheckboxGroup.md +0 -64
- package/dist/ai/BbBaseColorInput.md +0 -65
- package/dist/ai/BbBaseColorPalette.md +0 -39
- package/dist/ai/BbBaseDatePicker.md +0 -43
- package/dist/ai/BbBaseDatePickerInput.md +0 -73
- package/dist/ai/BbBaseNumberInput.md +0 -71
- package/dist/ai/BbBaseRadio.md +0 -46
- package/dist/ai/BbBaseRadioGroup.md +0 -64
- package/dist/ai/BbBaseRating.md +0 -52
- package/dist/ai/BbBaseSelect.md +0 -88
- package/dist/ai/BbBaseSlider.md +0 -56
- package/dist/ai/BbBaseSwitch.md +0 -49
- package/dist/ai/BbBaseSwitchGroup.md +0 -64
- package/dist/ai/BbBaseTag.md +0 -68
- package/dist/ai/BbBaseTextInput.md +0 -75
- package/dist/ai/BbBaseTextarea.md +0 -62
- package/dist/ai/BbBaseTimePickerInput.md +0 -62
- package/dist/ai/CommonInputWrapper.md +0 -42
- package/dist/ai/source/BbBaseCheckbox.md +0 -461
- package/dist/ai/source/BbBaseCheckboxGroup.md +0 -554
- package/dist/ai/source/BbBaseColorInput.md +0 -431
- package/dist/ai/source/BbBaseColorPalette.md +0 -942
- package/dist/ai/source/BbBaseDatePicker.md +0 -1448
- package/dist/ai/source/BbBaseDatePickerInput.md +0 -1940
- package/dist/ai/source/BbBaseNumberInput.md +0 -617
- package/dist/ai/source/BbBaseRadio.md +0 -381
- package/dist/ai/source/BbBaseRadioGroup.md +0 -539
- package/dist/ai/source/BbBaseRating.md +0 -607
- package/dist/ai/source/BbBaseSelect.md +0 -945
- package/dist/ai/source/BbBaseSlider.md +0 -1144
- package/dist/ai/source/BbBaseSwitch.md +0 -246
- package/dist/ai/source/BbBaseSwitchGroup.md +0 -302
- package/dist/ai/source/BbBaseTag.md +0 -694
- package/dist/ai/source/BbBaseTextInput.md +0 -511
- package/dist/ai/source/BbBaseTextarea.md +0 -504
- package/dist/ai/source/BbBaseTimePickerInput.md +0 -1037
- package/dist/ai/source/CommonInputWrapper.md +0 -584
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +0 -40
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +0 -6
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +0 -145
- package/dist/components/BbBaseCheckbox/types.d.ts +0 -224
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +0 -6
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +0 -257
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +0 -43
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +0 -6
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +0 -184
- package/dist/components/BbBaseColorInput/types.d.ts +0 -219
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +0 -13
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +0 -395
- package/dist/components/BbBaseColorPalette/types.d.ts +0 -40
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +0 -20
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +0 -6
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +0 -407
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +0 -47
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +0 -318
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +0 -115
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +0 -116
- package/dist/components/BbBaseDatePicker/types.d.ts +0 -108
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +0 -11
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +0 -31
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -737
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +0 -204
- package/dist/components/BbBaseDatePickerInput/types.d.ts +0 -325
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +0 -6
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +0 -52
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +0 -6
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +0 -215
- package/dist/components/BbBaseNumberInput/types.d.ts +0 -211
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +0 -33
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/components/BbBaseRadio/types.d.ts +0 -179
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -179
- package/dist/components/BbBaseRadioGroup/types.d.ts +0 -223
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +0 -38
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +0 -6
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +0 -192
- package/dist/components/BbBaseRating/types.d.ts +0 -176
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +0 -19
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +0 -6
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +0 -311
- package/dist/components/BbBaseSelect/types.d.ts +0 -297
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +0 -35
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +0 -6
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +0 -340
- package/dist/components/BbBaseSlider/types.d.ts +0 -200
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +0 -35
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.js +0 -6
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +0 -146
- package/dist/components/BbBaseSwitch/types.d.ts +0 -10
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +0 -6
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +0 -50
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +0 -6
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +0 -266
- package/dist/components/BbBaseTag/types.d.ts +0 -160
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +0 -45
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +0 -6
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +0 -200
- package/dist/components/BbBaseTextInput/types.d.ts +0 -209
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +0 -39
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +0 -6
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +0 -187
- package/dist/components/BbBaseTextarea/types.d.ts +0 -170
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +0 -27
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +0 -6
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -519
- package/dist/components/BbBaseTimePickerInput/types.d.ts +0 -151
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +0 -6
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +0 -107
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts → BbCalendar/CalendarMonthPanel.vue.d.ts} +0 -0
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts → BbCalendar/CalendarYearPanel.vue.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.d.ts → composables/useTypeahead.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.js → composables/useTypeahead.js} +0 -0
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
# CommonTimeSelector — Implementation Source
|
|
2
|
+
|
|
3
|
+
> Full implementation for deep dives. For everyday usage read the typed contract: [../CommonTimeSelector.md](../CommonTimeSelector.md).
|
|
4
|
+
>
|
|
5
|
+
> Safety level: **Reference Only - Internal** — do not use in consumer-facing code unless explicitly requested.
|
|
6
|
+
|
|
7
|
+
## Template & Script
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div class="bb-time-selector">
|
|
12
|
+
<div
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
class="bb-time-selector__readout"
|
|
15
|
+
:class="{ 'bb-time-selector__readout--empty': readoutEmpty }"
|
|
16
|
+
>
|
|
17
|
+
{{ readout }}
|
|
18
|
+
</div>
|
|
19
|
+
<div class="bb-time-selector__columns">
|
|
20
|
+
<div
|
|
21
|
+
v-for="column in columns"
|
|
22
|
+
:key="column.unit"
|
|
23
|
+
:aria-label="column.ariaLabel"
|
|
24
|
+
class="bb-time-selector__column"
|
|
25
|
+
:class="`bb-time-selector__column--${column.unit}`"
|
|
26
|
+
role="group"
|
|
27
|
+
@keydown="onColumnKeydown(column, $event)"
|
|
28
|
+
>
|
|
29
|
+
<div aria-hidden="true" class="bb-time-selector__header">
|
|
30
|
+
{{ column.header }}
|
|
31
|
+
</div>
|
|
32
|
+
<!-- `data-bb-no-drag`: a wheel is a scroller inside a draggable sheet.
|
|
33
|
+
Without it a downward swipe on a wheel already at its top was handed to
|
|
34
|
+
the sheet and dismissed it mid-pick (BbOffCanvas only yields to a
|
|
35
|
+
scroller that can still scroll the gesture's way). -->
|
|
36
|
+
<div
|
|
37
|
+
:ref="(el) => (columnRefs[column.unit] = el as HTMLElement)"
|
|
38
|
+
class="bb-time-selector__scroll"
|
|
39
|
+
data-bb-no-drag
|
|
40
|
+
>
|
|
41
|
+
<!-- eslint-disable vue/attributes-order -- `pt` binds LAST so a consumer listener runs after ours (PASSTHROUGH.md T17) -->
|
|
42
|
+
<BbBaseButton
|
|
43
|
+
v-for="option in column.options"
|
|
44
|
+
:key="option.value"
|
|
45
|
+
:aria-pressed="option.selected"
|
|
46
|
+
class="bb-time-selector__btn"
|
|
47
|
+
:class="{ 'bb-time-selector__btn--selected': option.selected }"
|
|
48
|
+
:data-value="option.value"
|
|
49
|
+
:disabled="disabled"
|
|
50
|
+
@click="select(column, option)"
|
|
51
|
+
v-bind="passthrough?.part?.('item', { selected: option.selected })"
|
|
52
|
+
>
|
|
53
|
+
{{ option.text }}
|
|
54
|
+
</BbBaseButton>
|
|
55
|
+
<!-- eslint-enable vue/attributes-order -->
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup lang="ts">
|
|
63
|
+
import { computed, watch, nextTick, onMounted } from 'vue';
|
|
64
|
+
import type { PtBindings } from '@/types/passthrough';
|
|
65
|
+
import { useLocale } from '@/composables/useLocale';
|
|
66
|
+
import { useTypeahead } from '@/composables/useTypeahead';
|
|
67
|
+
import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
|
|
68
|
+
import type { TimeUnit } from './types';
|
|
69
|
+
|
|
70
|
+
const props = defineProps<{
|
|
71
|
+
/** The owning picker's passthrough resolver: `item` per entry, with `selected`. Internal. */
|
|
72
|
+
passthrough?: PtBindings<'item', 'selected'>;
|
|
73
|
+
/** Current hour as a 24-hour field string (may be empty). */
|
|
74
|
+
hour: string;
|
|
75
|
+
/** Current minute/second field strings (may be empty). */
|
|
76
|
+
minute: string;
|
|
77
|
+
second: string;
|
|
78
|
+
/** Current meridiem field value (`AM`/`PM`, may be empty). */
|
|
79
|
+
meridiem?: string;
|
|
80
|
+
/** Renders the seconds column. */
|
|
81
|
+
seconds?: boolean;
|
|
82
|
+
/** 12-hour hour column plus an AM/PM column; emitted hours stay 24-hour. */
|
|
83
|
+
ampm?: boolean;
|
|
84
|
+
/** Minute-column granularity; off-grid values highlight nothing. */
|
|
85
|
+
step?: number;
|
|
86
|
+
disabled?: boolean;
|
|
87
|
+
}>();
|
|
88
|
+
|
|
89
|
+
const emit = defineEmits<
|
|
90
|
+
/**
|
|
91
|
+
* A column entry was chosen. `hour` is always the 24-hour value (already
|
|
92
|
+
* combined with the meridiem in `ampm` mode); `meridiem` carries `AM`/`PM`.
|
|
93
|
+
* Numeric values arrive zero-padded.
|
|
94
|
+
*/
|
|
95
|
+
(e: 'select', payload: { unit: TimeUnit; value: string }) => void
|
|
96
|
+
>();
|
|
97
|
+
|
|
98
|
+
const { t } = useLocale();
|
|
99
|
+
|
|
100
|
+
const columnRefs: Partial<Record<TimeUnit, HTMLElement | null>> = {};
|
|
101
|
+
|
|
102
|
+
// ── 12h/24h helpers (display-only; the emitted contract stays 24h) ──────────
|
|
103
|
+
|
|
104
|
+
const to24Hour = (hour12: number, meridiem: string): number => {
|
|
105
|
+
if (meridiem === 'PM') return hour12 === 12 ? 12 : hour12 + 12;
|
|
106
|
+
return hour12 === 12 ? 0 : hour12;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const currentMeridiem = computed<'AM' | 'PM'>(() => {
|
|
110
|
+
if (props.meridiem === 'PM') return 'PM';
|
|
111
|
+
if (props.meridiem === 'AM') return 'AM';
|
|
112
|
+
// Derive from a 24h hour when the field is unset (incoming model values).
|
|
113
|
+
if (props.hour && parseInt(props.hour, 10) >= 12) return 'PM';
|
|
114
|
+
return 'AM';
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
/** The selected number for a column, in that column's own value space. */
|
|
118
|
+
const selectedNumber = (unit: TimeUnit): number | null => {
|
|
119
|
+
if (unit === 'hour') {
|
|
120
|
+
if (!props.hour) return null;
|
|
121
|
+
const hour24 = parseInt(props.hour, 10);
|
|
122
|
+
if (!props.ampm) return hour24;
|
|
123
|
+
let hour12 = hour24 % 12;
|
|
124
|
+
if (hour12 === 0) hour12 = 12;
|
|
125
|
+
return hour12;
|
|
126
|
+
}
|
|
127
|
+
const raw = props[unit as 'minute' | 'second'];
|
|
128
|
+
if (!raw) return null;
|
|
129
|
+
return parseInt(raw, 10);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
type Option = {
|
|
133
|
+
value: number | string;
|
|
134
|
+
text: string;
|
|
135
|
+
selected: boolean;
|
|
136
|
+
tokens: string[];
|
|
137
|
+
};
|
|
138
|
+
type Column = {
|
|
139
|
+
unit: TimeUnit;
|
|
140
|
+
header: string;
|
|
141
|
+
ariaLabel: string;
|
|
142
|
+
options: Option[];
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const buildNumericOptions = (unit: TimeUnit, values: number[]): Option[] => {
|
|
146
|
+
const current = selectedNumber(unit);
|
|
147
|
+
return values.map((value) => {
|
|
148
|
+
const text = String(value).padStart(2, '0');
|
|
149
|
+
return {
|
|
150
|
+
value,
|
|
151
|
+
text,
|
|
152
|
+
// Exact match only: an off-grid value (10:07 under step 15) highlights
|
|
153
|
+
// nothing rather than lying with the nearest slot.
|
|
154
|
+
selected: current === value,
|
|
155
|
+
tokens: [String(value), text],
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const minuteValues = computed(() => {
|
|
161
|
+
const step = Math.max(1, Math.floor(props.step ?? 1));
|
|
162
|
+
const values: number[] = [];
|
|
163
|
+
for (let m = 0; m < 60; m += step) values.push(m);
|
|
164
|
+
return values;
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Column headers reuse the localized format hint (`HH:MM[:SS]`), so the
|
|
169
|
+
* letters match the placeholder the user already read in the field.
|
|
170
|
+
*/
|
|
171
|
+
const unitHeaders = computed(() => {
|
|
172
|
+
const parts = t(
|
|
173
|
+
props.seconds
|
|
174
|
+
? 'datePickerInput.timeFormatSeconds'
|
|
175
|
+
: 'datePickerInput.timeFormat'
|
|
176
|
+
).value.split(':');
|
|
177
|
+
return {
|
|
178
|
+
hour: parts[0] ?? 'HH',
|
|
179
|
+
minute: parts[1] ?? 'MM',
|
|
180
|
+
second: parts[2] ?? 'SS',
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
const columns = computed<Column[]>(() => {
|
|
185
|
+
const list: Column[] = [
|
|
186
|
+
{
|
|
187
|
+
unit: 'hour',
|
|
188
|
+
header: unitHeaders.value.hour,
|
|
189
|
+
ariaLabel: t('datePicker.hoursLabel').value,
|
|
190
|
+
options: buildNumericOptions(
|
|
191
|
+
'hour',
|
|
192
|
+
props.ampm
|
|
193
|
+
? Array.from({ length: 12 }, (_, i) => i + 1)
|
|
194
|
+
: Array.from({ length: 24 }, (_, i) => i)
|
|
195
|
+
),
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
unit: 'minute',
|
|
199
|
+
header: unitHeaders.value.minute,
|
|
200
|
+
ariaLabel: t('datePicker.minutesLabel').value,
|
|
201
|
+
options: buildNumericOptions('minute', minuteValues.value),
|
|
202
|
+
},
|
|
203
|
+
];
|
|
204
|
+
if (props.seconds) {
|
|
205
|
+
list.push({
|
|
206
|
+
unit: 'second',
|
|
207
|
+
header: unitHeaders.value.second,
|
|
208
|
+
ariaLabel: t('datePicker.secondsLabel').value,
|
|
209
|
+
options: buildNumericOptions(
|
|
210
|
+
'second',
|
|
211
|
+
Array.from({ length: 60 }, (_, i) => i)
|
|
212
|
+
),
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
if (props.ampm) {
|
|
216
|
+
list.push({
|
|
217
|
+
unit: 'meridiem',
|
|
218
|
+
header: ' ',
|
|
219
|
+
ariaLabel: t('datePickerInput.meridiemField').value,
|
|
220
|
+
options: (['AM', 'PM'] as const).map((value) => ({
|
|
221
|
+
value,
|
|
222
|
+
text: value,
|
|
223
|
+
selected: !!props.hour && currentMeridiem.value === value,
|
|
224
|
+
tokens: [value.toLowerCase(), value[0].toLowerCase()],
|
|
225
|
+
})),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
return list;
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The rail's counterpart of the calendar heading: the selected time exactly
|
|
233
|
+
* as the fields display it (12-hour under `ampm`), with dashes while a unit
|
|
234
|
+
* is still unset.
|
|
235
|
+
*/
|
|
236
|
+
const DASH = '\u2013\u2013';
|
|
237
|
+
|
|
238
|
+
const readout = computed(() => {
|
|
239
|
+
const hourNum = selectedNumber('hour');
|
|
240
|
+
const parts = [
|
|
241
|
+
hourNum === null ? DASH : String(hourNum).padStart(2, '0'),
|
|
242
|
+
props.minute ? props.minute.padStart(2, '0') : DASH,
|
|
243
|
+
];
|
|
244
|
+
if (props.seconds) {
|
|
245
|
+
parts.push(props.second ? props.second.padStart(2, '0') : DASH);
|
|
246
|
+
}
|
|
247
|
+
let text = parts.join(':');
|
|
248
|
+
if (props.ampm) text += ` ${props.hour ? currentMeridiem.value : DASH}`;
|
|
249
|
+
return text;
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
const readoutEmpty = computed(() => !props.hour && !props.minute);
|
|
253
|
+
|
|
254
|
+
const select = (column: Column, option: Option) => {
|
|
255
|
+
if (column.unit === 'hour' && props.ampm) {
|
|
256
|
+
// Combine the picked 12h row with the active meridiem → 24h contract.
|
|
257
|
+
const hour24 = to24Hour(option.value as number, currentMeridiem.value);
|
|
258
|
+
emit('select', { unit: 'hour', value: String(hour24).padStart(2, '0') });
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (column.unit === 'meridiem') {
|
|
262
|
+
emit('select', { unit: 'meridiem', value: String(option.value) });
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
emit('select', {
|
|
266
|
+
unit: column.unit,
|
|
267
|
+
value: String(option.value).padStart(2, '0'),
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
// ── Scroll management ───────────────────────────────────────────────────────
|
|
272
|
+
// Keep the selected (or nearest, for off-grid values) row centered so the
|
|
273
|
+
// current time is always visible when the panel opens or the value changes.
|
|
274
|
+
|
|
275
|
+
const prefersReducedMotion = () =>
|
|
276
|
+
typeof window !== 'undefined' &&
|
|
277
|
+
!!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
278
|
+
|
|
279
|
+
/** Recenter a column; animate only on live changes, never against reduced-motion. */
|
|
280
|
+
const scrollColumnTo = (el: HTMLElement, top: number, smooth: boolean) => {
|
|
281
|
+
el.scrollTo({
|
|
282
|
+
top,
|
|
283
|
+
behavior: smooth && !prefersReducedMotion() ? 'smooth' : 'auto',
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
const centerColumn = (unit: TimeUnit, smooth = false) => {
|
|
288
|
+
const container = columnRefs[unit];
|
|
289
|
+
if (!container) return;
|
|
290
|
+
const column = columns.value.find((c) => c.unit === unit);
|
|
291
|
+
if (!column) return;
|
|
292
|
+
const selected = column.options.find((o) => o.selected);
|
|
293
|
+
const buttons = Array.from(
|
|
294
|
+
container.querySelectorAll<HTMLElement>('[data-value]')
|
|
295
|
+
);
|
|
296
|
+
if (!buttons.length) return;
|
|
297
|
+
let target: HTMLElement | undefined;
|
|
298
|
+
if (selected) {
|
|
299
|
+
target = buttons.find((el) => el.dataset.value === String(selected.value));
|
|
300
|
+
} else if (unit === 'minute' && props.minute) {
|
|
301
|
+
// Off-grid value: scroll to the nearest slot without highlighting it.
|
|
302
|
+
const current = parseInt(props.minute, 10);
|
|
303
|
+
target = buttons.reduce((best, el) => {
|
|
304
|
+
const d = (el2: HTMLElement) =>
|
|
305
|
+
Math.abs(parseInt(el2.dataset.value ?? '0', 10) - current);
|
|
306
|
+
return d(el) < d(best) ? el : best;
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
if (!target) {
|
|
310
|
+
scrollColumnTo(container, 0, smooth);
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
// Center the target, then snap to a whole number of rows. Snapping keeps the
|
|
314
|
+
// scroll offset a multiple of the row height, so the rows always render at the
|
|
315
|
+
// same phase as the resting (scrollTop 0) list — i.e. level with the calendar
|
|
316
|
+
// day rows — instead of an exact center landing them on a fractional grid that
|
|
317
|
+
// shifts with the panel height (a taller/shorter month would drift otherwise).
|
|
318
|
+
const rowHeight = target.offsetHeight || 1;
|
|
319
|
+
const centered =
|
|
320
|
+
target.offsetTop -
|
|
321
|
+
container.offsetTop -
|
|
322
|
+
container.clientHeight / 2 +
|
|
323
|
+
target.offsetHeight / 2;
|
|
324
|
+
scrollColumnTo(
|
|
325
|
+
container,
|
|
326
|
+
Math.round(centered / rowHeight) * rowHeight,
|
|
327
|
+
smooth
|
|
328
|
+
);
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
const centerAll = (smooth = false) => {
|
|
332
|
+
for (const column of columns.value) centerColumn(column.unit, smooth);
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
// Instant on first paint (the panel should appear already centered); animate the
|
|
336
|
+
// recenter that follows a live hour/minute/second/meridiem change.
|
|
337
|
+
onMounted(() => nextTick(() => centerAll(false)));
|
|
338
|
+
watch(
|
|
339
|
+
() => [props.hour, props.minute, props.second, props.meridiem],
|
|
340
|
+
() => nextTick(() => centerAll(true))
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
// ── Keyboard ────────────────────────────────────────────────────────────────
|
|
344
|
+
// ArrowUp/Down walk the (stepped) rows; printable keys drive a per-column
|
|
345
|
+
// typeahead, mirroring the month/year selectors.
|
|
346
|
+
|
|
347
|
+
const typeaheadFor = (index: number) =>
|
|
348
|
+
useTypeahead({
|
|
349
|
+
candidates: () => columns.value[index]?.options ?? [],
|
|
350
|
+
getTokens: (o: Option) => o.tokens,
|
|
351
|
+
getCurrent: () => columns.value[index]?.options.find((o) => o.selected),
|
|
352
|
+
onMatch: (o: Option) =>
|
|
353
|
+
focusValue(columns.value[index].unit, String(o.value)),
|
|
354
|
+
onCommit: (o: Option) => select(columns.value[index], o),
|
|
355
|
+
locale: () => 'en',
|
|
356
|
+
}).onKeydown;
|
|
357
|
+
|
|
358
|
+
const typeaheads = [0, 1, 2, 3].map(typeaheadFor);
|
|
359
|
+
|
|
360
|
+
const focusValue = (unit: TimeUnit, value: string) => {
|
|
361
|
+
const button = columnRefs[unit]?.querySelector<HTMLElement>(
|
|
362
|
+
`[data-value="${value}"]`
|
|
363
|
+
);
|
|
364
|
+
button?.focus();
|
|
365
|
+
button?.scrollIntoView({ block: 'nearest' });
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
const onColumnKeydown = (column: Column, event: KeyboardEvent) => {
|
|
369
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
370
|
+
event.preventDefault();
|
|
371
|
+
const container = columnRefs[column.unit];
|
|
372
|
+
if (!container) return;
|
|
373
|
+
const buttons = Array.from(
|
|
374
|
+
container.querySelectorAll<HTMLElement>('[data-value]')
|
|
375
|
+
);
|
|
376
|
+
const active = document.activeElement;
|
|
377
|
+
const index = buttons.findIndex((el) => el === active);
|
|
378
|
+
const next =
|
|
379
|
+
event.key === 'ArrowDown'
|
|
380
|
+
? buttons[Math.min(index + 1, buttons.length - 1)]
|
|
381
|
+
: buttons[Math.max(index - 1, 0)];
|
|
382
|
+
next?.focus();
|
|
383
|
+
next?.scrollIntoView({ block: 'nearest' });
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
const columnIndex = columns.value.findIndex((c) => c.unit === column.unit);
|
|
387
|
+
typeaheads[columnIndex]?.(event);
|
|
388
|
+
};
|
|
389
|
+
</script>
|
|
390
|
+
|
|
391
|
+
<style lang="postcss">
|
|
392
|
+
@import './index.css';
|
|
393
|
+
</style>
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
## Types
|
|
397
|
+
|
|
398
|
+
```ts
|
|
399
|
+
/**
|
|
400
|
+
* One column of the shared time rail (`CommonTimeSelector`): the unit a
|
|
401
|
+
* `select` / `time-pick` payload carries. Used by BbDatePicker, BbTimePicker
|
|
402
|
+
* and BbTimePickerInput.
|
|
403
|
+
*/
|
|
404
|
+
export type TimeUnit = 'hour' | 'minute' | 'second' | 'meridiem';
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
## Styles
|
|
408
|
+
|
|
409
|
+
```css
|
|
410
|
+
/*
|
|
411
|
+
* The time rail: hour/minute(/second/AM-PM) columns rendered beside the
|
|
412
|
+
* calendar grid (below it in the mobile sheet). Shares the month/year
|
|
413
|
+
* selectors' visual language — same pill rows, same muted header ramp as the
|
|
414
|
+
* calendar's weekday initials — so it reads as part of the calendar, not an
|
|
415
|
+
* attachment.
|
|
416
|
+
*/
|
|
417
|
+
.bb-time-selector {
|
|
418
|
+
--time-row-h: 28px;
|
|
419
|
+
--time-col-w: 44px;
|
|
420
|
+
/* Visible mark = the day-cell mark (--cell - 4). Hit area stays the full
|
|
421
|
+
row; only the painted knob matches the calendar's. */
|
|
422
|
+
--time-mark: 24px;
|
|
423
|
+
|
|
424
|
+
border-left: var(--bb-border-w) solid var(--bb-border);
|
|
425
|
+
bottom: 0;
|
|
426
|
+
display: flex;
|
|
427
|
+
flex-direction: column;
|
|
428
|
+
/* Mirror the calendar body's vertical padding (--pad-y, 8px) top AND bottom:
|
|
429
|
+
the readout then sits level with the month/year controls, the headers level
|
|
430
|
+
with the weekday initials, and — because the middle scroll flexes — the last
|
|
431
|
+
row anchors on the calendar's bottom edge. 12px left gutter for the divider. */
|
|
432
|
+
padding: 8px 8px 8px 12px;
|
|
433
|
+
position: absolute;
|
|
434
|
+
right: 0;
|
|
435
|
+
top: 0;
|
|
436
|
+
width: calc(var(--rail-w, 252px) - 12px);
|
|
437
|
+
|
|
438
|
+
/* The rail's counterpart of "Luglio 2026": the currently selected time,
|
|
439
|
+
sized and weighted like the heading buttons. */
|
|
440
|
+
&__readout {
|
|
441
|
+
align-items: center;
|
|
442
|
+
color: var(--bb-text);
|
|
443
|
+
display: flex;
|
|
444
|
+
flex: none;
|
|
445
|
+
font-size: 14px;
|
|
446
|
+
font-variant-numeric: tabular-nums;
|
|
447
|
+
font-weight: 500;
|
|
448
|
+
height: 24px;
|
|
449
|
+
justify-content: center;
|
|
450
|
+
margin-bottom: 6px;
|
|
451
|
+
user-select: none;
|
|
452
|
+
|
|
453
|
+
&--empty {
|
|
454
|
+
color: var(--bb-text-faint);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
&__columns {
|
|
459
|
+
display: flex;
|
|
460
|
+
flex: 1 1 auto;
|
|
461
|
+
gap: 6px;
|
|
462
|
+
min-height: 0;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
&__column {
|
|
466
|
+
display: flex;
|
|
467
|
+
flex-direction: column;
|
|
468
|
+
min-height: 0;
|
|
469
|
+
width: var(--time-col-w);
|
|
470
|
+
|
|
471
|
+
&--meridiem {
|
|
472
|
+
--time-col-w: 48px;
|
|
473
|
+
|
|
474
|
+
.bb-time-selector__btn::before {
|
|
475
|
+
width: calc(var(--time-mark) + 10px);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/* Mirrors the calendar's weekday header cells: 12px/600, 60% text, 26px tall
|
|
481
|
+
with the same 2px gap the calendar's header-container leaves below it, so
|
|
482
|
+
the first row lands exactly on the calendar's first day row. */
|
|
483
|
+
&__header {
|
|
484
|
+
align-items: center;
|
|
485
|
+
color: var(--bb-text-muted);
|
|
486
|
+
display: flex;
|
|
487
|
+
flex: none;
|
|
488
|
+
font-size: 12px;
|
|
489
|
+
font-weight: 600;
|
|
490
|
+
height: 26px;
|
|
491
|
+
justify-content: center;
|
|
492
|
+
margin-bottom: 2px;
|
|
493
|
+
user-select: none;
|
|
494
|
+
white-space: pre;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/* The rows fill the space between the header and the bottom padding, so the
|
|
498
|
+
window shows exactly one row per calendar week (--time-row-h == --cell) and
|
|
499
|
+
grows a row automatically when a month adds a sixth week. No inset or fade:
|
|
500
|
+
the first and last rows sit crisp and level with the calendar's first/last
|
|
501
|
+
day rows (scrolling snaps to whole rows — see centerColumn). */
|
|
502
|
+
&__scroll {
|
|
503
|
+
display: flex;
|
|
504
|
+
flex: 1 1 auto;
|
|
505
|
+
flex-direction: column;
|
|
506
|
+
gap: 0;
|
|
507
|
+
min-height: 0;
|
|
508
|
+
overflow-y: auto;
|
|
509
|
+
scrollbar-width: none;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
&__btn {
|
|
513
|
+
align-items: center;
|
|
514
|
+
color: var(--bb-text-muted);
|
|
515
|
+
display: flex;
|
|
516
|
+
flex: none;
|
|
517
|
+
font-size: 12px;
|
|
518
|
+
font-variant-numeric: tabular-nums;
|
|
519
|
+
font-weight: 500;
|
|
520
|
+
height: var(--time-row-h);
|
|
521
|
+
/* Contains the mark's z-index:-1 so it can never slip behind ancestors. */
|
|
522
|
+
isolation: isolate;
|
|
523
|
+
justify-content: center;
|
|
524
|
+
letter-spacing: 0.01em;
|
|
525
|
+
/* Text line box fills the whole row height, like a calendar day cell. */
|
|
526
|
+
line-height: var(--time-row-h);
|
|
527
|
+
position: relative;
|
|
528
|
+
transition: color var(--bb-transition-fast);
|
|
529
|
+
|
|
530
|
+
/* The painted knob: same square as a day cell, centered in the full
|
|
531
|
+
hit row so the two zones share one visual measure. */
|
|
532
|
+
&::before {
|
|
533
|
+
border-radius: var(--bb-radius-sm);
|
|
534
|
+
content: '';
|
|
535
|
+
height: var(--time-mark);
|
|
536
|
+
left: 50%;
|
|
537
|
+
position: absolute;
|
|
538
|
+
top: 50%;
|
|
539
|
+
transform: translate(-50%, -50%);
|
|
540
|
+
transition: background-color var(--bb-transition-fast);
|
|
541
|
+
width: var(--time-mark);
|
|
542
|
+
z-index: -1;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
&:hover:not(:disabled) {
|
|
546
|
+
color: var(--bb-text);
|
|
547
|
+
|
|
548
|
+
&::before {
|
|
549
|
+
background-color: color-mix(in oklab, var(--bb-text) 8%, transparent);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
&:focus-visible {
|
|
554
|
+
outline: none;
|
|
555
|
+
|
|
556
|
+
&::before {
|
|
557
|
+
box-shadow: 0 0 0 var(--bb-ring-size) var(--bb-ring);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/* Waiting for a date: rows recede, headers stay crisp. */
|
|
562
|
+
&:disabled {
|
|
563
|
+
cursor: not-allowed;
|
|
564
|
+
opacity: 0.35;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
&--selected {
|
|
568
|
+
color: var(--bb-primary-fg);
|
|
569
|
+
font-weight: 600;
|
|
570
|
+
|
|
571
|
+
&::before {
|
|
572
|
+
background-color: var(--bb-primary);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
&:hover:not(:disabled) {
|
|
576
|
+
color: var(--bb-primary-fg);
|
|
577
|
+
|
|
578
|
+
&::before {
|
|
579
|
+
background-color: var(--bb-primary);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/* The container reserving the rail width lives in BbCalendar/index.css
|
|
587
|
+
* (`.bb-calendar--datetime`); the rail's layout in the date picker's mobile
|
|
588
|
+
* sheet in BbDatePicker/index.css (`.bb-date-picker__panel--sheet`). */
|
|
589
|
+
|
|
590
|
+
/* Standalone rail (the time-only pickers — BbTimePickerInput's panel and
|
|
591
|
+
* BbTimePicker's panel): no calendar to size against, so the rail
|
|
592
|
+
* backs into the flow with a fixed height instead of overlaying a grid. */
|
|
593
|
+
.bb-time-picker-input__panel,
|
|
594
|
+
.bb-time-picker__panel {
|
|
595
|
+
position: relative;
|
|
596
|
+
|
|
597
|
+
.bb-time-selector {
|
|
598
|
+
border-left: 0;
|
|
599
|
+
padding-left: 0;
|
|
600
|
+
padding-top: 8px;
|
|
601
|
+
position: static;
|
|
602
|
+
width: auto;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/* No calendar to size against: pin the scroll window to exactly 5 rows so the
|
|
606
|
+
picker always shows 5 cells (a fixed panel height landed on ~6.5). Works at
|
|
607
|
+
any row height — 28px desktop, 40px sheet. */
|
|
608
|
+
.bb-time-selector__scroll {
|
|
609
|
+
flex: none;
|
|
610
|
+
height: calc(var(--time-row-h) * 5);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/* No calendar heading to sit beside — the readout just repeats the selected
|
|
614
|
+
value (the model), so hide it in the standalone pickers. The HH/MM/SS column
|
|
615
|
+
headers stay. (The readout is already aria-hidden, so no a11y impact.) */
|
|
616
|
+
.bb-time-selector__readout {
|
|
617
|
+
display: none;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* Mobile sheet for those standalone pickers: centre the column cluster in the
|
|
622
|
+
* full-width sheet and scale the rows to touch, mirroring the datetime rail's
|
|
623
|
+
* sheet treatment (BbDatePicker/index.css). Column layout so BbTimePicker's range segment toggle
|
|
624
|
+
* stacks above the centred columns. */
|
|
625
|
+
.bb-time-picker-input__panel--sheet,
|
|
626
|
+
.bb-time-picker__panel--sheet {
|
|
627
|
+
align-items: center;
|
|
628
|
+
display: flex;
|
|
629
|
+
flex-direction: column;
|
|
630
|
+
|
|
631
|
+
.bb-time-selector {
|
|
632
|
+
--time-mark: 36px;
|
|
633
|
+
--time-row-h: 40px;
|
|
634
|
+
--time-col-w: 48px;
|
|
635
|
+
|
|
636
|
+
.bb-time-selector__columns {
|
|
637
|
+
gap: 4px;
|
|
638
|
+
justify-content: center;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
```
|