bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.41
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 +317 -98
- package/bin/bitboss-ui-mcp.mjs +1566 -75
- package/bin/bitboss-ui.mjs +716 -72
- package/dist/ai/BbAccordion.md +178 -56
- package/dist/ai/BbAlert.md +140 -28
- package/dist/ai/BbAsterisk.md +61 -4
- package/dist/ai/BbAvatar.md +194 -53
- package/dist/ai/BbBadge.md +250 -50
- package/dist/ai/BbBadgeButton.md +74 -21
- package/dist/ai/BbBaseButton.md +132 -51
- package/dist/ai/BbBaseCheckboxIcon.md +118 -26
- package/dist/ai/BbBaseRadioIcon.md +115 -26
- package/dist/ai/BbBaseSwitchIcon.md +123 -28
- package/dist/ai/BbBreadcrumbs.md +221 -51
- package/dist/ai/BbButton.md +389 -107
- package/dist/ai/BbCalendar.md +667 -0
- package/dist/ai/BbCheckbox.md +242 -80
- package/dist/ai/BbCheckboxGroup.md +575 -66
- package/dist/ai/BbCollapsible.md +158 -39
- package/dist/ai/BbColorInput.md +322 -82
- package/dist/ai/BbColorPalette.md +261 -61
- package/dist/ai/BbConfirm.md +220 -51
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +272 -37
- package/dist/ai/BbDatePickerInput.md +321 -92
- package/dist/ai/BbDialog.md +492 -87
- package/dist/ai/BbDropdown.md +1182 -104
- package/dist/ai/BbDropdownButton.md +239 -61
- package/dist/ai/BbDropdownGroup.md +5 -5
- package/dist/ai/BbDropzone.md +140 -36
- package/dist/ai/BbForm.md +1165 -40
- package/dist/ai/BbIcon.md +100 -33
- package/dist/ai/BbIndicator.md +79 -12
- package/dist/ai/BbNumberInput.md +257 -87
- package/dist/ai/BbOffCanvas.md +396 -91
- package/dist/ai/BbPagination.md +199 -32
- package/dist/ai/BbPopover.md +219 -54
- package/dist/ai/BbProgress.md +137 -71
- package/dist/ai/BbPtScope.md +136 -0
- package/dist/ai/BbRadio.md +234 -43
- package/dist/ai/BbRadioGroup.md +529 -91
- package/dist/ai/BbRating.md +243 -61
- package/dist/ai/BbSelect.md +690 -120
- package/dist/ai/BbSelectPopover.md +434 -122
- package/dist/ai/BbSlider.md +275 -79
- package/dist/ai/BbSmoothHeight.md +142 -34
- package/dist/ai/BbSpinner.md +179 -81
- package/dist/ai/BbSwitch.md +249 -63
- package/dist/ai/BbSwitchGroup.md +394 -65
- package/dist/ai/BbTable.md +1666 -222
- package/dist/ai/BbTabs.md +898 -178
- package/dist/ai/BbTabsList.md +81 -7
- package/dist/ai/BbTabsPanels.md +77 -0
- package/dist/ai/BbTabsRoot.md +16 -15
- package/dist/ai/BbTag.md +256 -76
- package/dist/ai/BbTextInput.md +480 -102
- package/dist/ai/BbTextarea.md +310 -96
- package/dist/ai/BbTimePicker.md +159 -24
- package/dist/ai/BbTimePickerInput.md +277 -46
- package/dist/ai/BbToast.md +286 -40
- package/dist/ai/BbToastPortal.md +3 -3
- package/dist/ai/BbTooltip.md +187 -34
- package/dist/ai/BbTree.md +260 -85
- package/dist/ai/ChipsBox.md +43 -2
- package/dist/ai/ClearableButton.md +12 -0
- package/dist/ai/CommaBox.md +2 -1
- package/dist/ai/CommonField.md +63 -0
- package/dist/ai/CommonFieldInput.md +90 -0
- package/dist/ai/CommonPopover.md +17 -12
- package/dist/ai/CommonTimeSelector.md +63 -0
- package/dist/ai/ErrorIcon.md +20 -0
- package/dist/ai/FlatListBox.md +41 -11
- package/dist/ai/GroupedListBox.md +42 -12
- package/dist/ai/ListBox.md +46 -11
- package/dist/ai/OptionsContainer.md +13 -10
- package/dist/ai/WarningIcon.md +20 -0
- package/dist/ai/changelog.json +4025 -141
- package/dist/ai/components.json +51872 -10136
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useBbDropdownContext.md +168 -0
- package/dist/ai/composables/useBbFormContext.md +51 -24
- package/dist/ai/composables/useBbFormField.md +134 -0
- package/dist/ai/composables/useBbTableContext.md +41 -19
- package/dist/ai/composables/useConfirm.md +16 -8
- package/dist/ai/composables/useCountdown.md +1 -1
- package/dist/ai/composables/useId.md +10 -10
- package/dist/ai/composables/useMobile.md +17 -10
- package/dist/ai/composables/useToast.md +25 -19
- package/dist/ai/design-tokens.json +940 -0
- package/dist/ai/design-tokens.manifest.yaml +175 -0
- package/dist/ai/guides/agent-contract.md +168 -22
- package/dist/ai/guides/ai-router.md +79 -40
- package/dist/ai/guides/app-layout.md +8 -4
- package/dist/ai/guides/coherence-playbook.md +8 -8
- package/dist/ai/guides/component-picker.md +42 -34
- package/dist/ai/guides/design-language.md +274 -97
- package/dist/ai/guides/design-tokens.md +493 -105
- package/dist/ai/guides/fetch-items-playbook.md +22 -16
- package/dist/ai/guides/icons-policy.md +67 -35
- package/dist/ai/guides/inertia-helpers.md +4 -1
- package/dist/ai/guides/inline-edit-playbook.md +13 -6
- package/dist/ai/guides/installation-and-plugin-setup.md +817 -73
- package/dist/ai/guides/migration/components/bb-accordion.md +37 -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-badge.md +5 -5
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +9 -8
- package/dist/ai/guides/migration/components/bb-button.md +80 -20
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +116 -29
- package/dist/ai/guides/migration/components/bb-checkbox.md +53 -10
- package/dist/ai/guides/migration/components/bb-chip.md +6 -6
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-input.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +16 -9
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +45 -35
- package/dist/ai/guides/migration/components/bb-dialog.md +69 -36
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +7 -1
- package/dist/ai/guides/migration/components/bb-dropdown.md +31 -8
- package/dist/ai/guides/migration/components/bb-dropzone.md +8 -0
- package/dist/ai/guides/migration/components/bb-icon.md +7 -7
- package/dist/ai/guides/migration/components/bb-intersection.md +1 -1
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -31
- package/dist/ai/guides/migration/components/bb-pagination.md +10 -0
- package/dist/ai/guides/migration/components/bb-popover.md +19 -11
- package/dist/ai/guides/migration/components/bb-radio-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-rating.md +61 -24
- package/dist/ai/guides/migration/components/bb-select-popover.md +9 -1
- package/dist/ai/guides/migration/components/bb-select.md +21 -4
- package/dist/ai/guides/migration/components/bb-slider.md +14 -6
- package/dist/ai/guides/migration/components/bb-switch-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-table.md +574 -33
- package/dist/ai/guides/migration/components/bb-tabs.md +91 -41
- package/dist/ai/guides/migration/components/bb-tag.md +9 -7
- package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/components/bb-tree.md +11 -9
- package/dist/ai/guides/migration/components/use-confirm.md +9 -1
- package/dist/ai/guides/migration/v2-to-v3.md +828 -240
- package/dist/ai/guides/migration/v3-beta-css-classes.md +751 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +119 -0
- package/dist/ai/guides/options-items-playbook.md +161 -12
- package/dist/ai/guides/page-shell.md +1 -1
- package/dist/ai/guides/passthrough.md +958 -0
- package/dist/ai/guides/preset-components.md +361 -0
- package/dist/ai/guides/ssr-prefill.md +127 -0
- package/dist/ai/guides/validated-forms.md +466 -55
- package/dist/ai/guides/validation-libraries.md +171 -0
- package/dist/ai/guides/validation-providers.md +113 -0
- package/dist/ai/index.md +45 -44
- package/dist/ai/recipes/inertia/approvals-inbox.md +26 -10
- package/dist/ai/recipes/inertia/command-palette.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +46 -30
- package/dist/ai/recipes/inertia/layout-scaffold.md +6 -2
- package/dist/ai/recipes/inertia/onboarding.md +30 -8
- package/dist/ai/recipes/inertia/ownership-atlas.md +72 -49
- package/dist/ai/recipes/inertia/record-form.md +53 -19
- package/dist/ai/recipes/inertia/records-workspace.md +201 -49
- package/dist/ai/recipes/inertia/settings-workspace.md +3809 -0
- package/dist/ai/recipes/inertia/upload-center.md +54 -43
- package/dist/ai/recipes/inertia/wizard-form.md +98 -14
- package/dist/ai/recipes/nuxt/approvals-inbox.md +26 -10
- package/dist/ai/recipes/nuxt/command-palette.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +68 -52
- package/dist/ai/recipes/nuxt/layout-scaffold.md +6 -2
- package/dist/ai/recipes/nuxt/onboarding.md +30 -8
- package/dist/ai/recipes/nuxt/record-form.md +66 -22
- package/dist/ai/recipes/nuxt/records-workspace.md +199 -48
- package/dist/ai/recipes/nuxt/settings-workspace.md +3898 -0
- package/dist/ai/recipes/nuxt/upload-center.md +52 -41
- package/dist/ai/recipes/nuxt/wizard-form.md +98 -14
- package/dist/ai/recipes/vue/approvals-inbox.md +28 -12
- package/dist/ai/recipes/vue/command-palette.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +69 -53
- package/dist/ai/recipes/vue/layout-scaffold.md +6 -2
- package/dist/ai/recipes/vue/onboarding.md +32 -8
- package/dist/ai/recipes/vue/record-form.md +81 -54
- package/dist/ai/recipes/vue/records-workspace.md +198 -49
- package/dist/ai/recipes/vue/settings-workspace.md +3836 -0
- package/dist/ai/recipes/vue/upload-center.md +53 -42
- package/dist/ai/recipes/vue/wizard-form.md +97 -14
- package/dist/ai/source/BbAccordion.md +90 -24
- package/dist/ai/source/BbAlert.md +209 -62
- package/dist/ai/source/BbAsterisk.md +54 -4
- package/dist/ai/source/BbAvatar.md +73 -16
- package/dist/ai/source/BbBadge.md +265 -97
- package/dist/ai/source/BbBadgeButton.md +218 -79
- package/dist/ai/source/BbBaseButton.md +108 -12
- 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 +363 -69
- package/dist/ai/source/BbButton.md +563 -174
- package/dist/ai/source/BbCalendar.md +1744 -0
- package/dist/ai/source/BbCheckbox.md +470 -68
- package/dist/ai/source/BbCheckboxGroup.md +976 -95
- package/dist/ai/source/BbCollapsible.md +96 -8
- package/dist/ai/source/BbColorInput.md +597 -67
- package/dist/ai/source/BbColorPalette.md +1284 -65
- package/dist/ai/source/BbConfirm.md +149 -7
- package/dist/ai/source/BbConfirmPortal.md +89 -3
- package/dist/ai/source/BbDatePicker.md +527 -381
- package/dist/ai/source/BbDatePickerInput.md +2015 -118
- package/dist/ai/source/BbDialog.md +531 -64
- package/dist/ai/source/BbDropdown.md +885 -175
- package/dist/ai/source/BbDropdownButton.md +377 -79
- package/dist/ai/source/BbDropdownGroup.md +687 -96
- package/dist/ai/source/BbDropzone.md +140 -31
- package/dist/ai/source/BbForm.md +875 -17
- package/dist/ai/source/BbIcon.md +130 -52
- package/dist/ai/source/BbIndicator.md +117 -60
- package/dist/ai/source/BbNumberInput.md +667 -84
- package/dist/ai/source/BbOffCanvas.md +1007 -261
- package/dist/ai/source/BbPagination.md +203 -31
- package/dist/ai/source/BbPopover.md +267 -90
- package/dist/ai/source/BbProgress.md +88 -26
- package/dist/ai/source/BbPtScope.md +54 -0
- package/dist/ai/source/BbRadio.md +388 -58
- package/dist/ai/source/BbRadioGroup.md +940 -109
- package/dist/ai/source/BbRating.md +736 -84
- package/dist/ai/source/BbSelect.md +1096 -96
- package/dist/ai/source/BbSelectPopover.md +807 -114
- package/dist/ai/source/BbSlider.md +1390 -98
- package/dist/ai/source/BbSmoothHeight.md +48 -2
- package/dist/ai/source/BbSpinner.md +62 -6
- package/dist/ai/source/BbSwitch.md +297 -60
- package/dist/ai/source/BbSwitchGroup.md +761 -83
- package/dist/ai/source/BbTable.md +6950 -1864
- package/dist/ai/source/BbTabs.md +368 -111
- package/dist/ai/source/BbTabsList.md +503 -146
- package/dist/ai/source/BbTabsPanels.md +625 -0
- package/dist/ai/source/BbTabsRoot.md +319 -100
- package/dist/ai/source/BbTag.md +796 -87
- package/dist/ai/source/BbTextInput.md +497 -68
- package/dist/ai/source/BbTextarea.md +550 -65
- package/dist/ai/source/BbTimePicker.md +395 -69
- package/dist/ai/source/BbTimePickerInput.md +1233 -106
- package/dist/ai/source/BbToast.md +250 -74
- package/dist/ai/source/BbToastPortal.md +210 -66
- package/dist/ai/source/BbTooltip.md +181 -30
- package/dist/ai/source/BbTree.md +76 -11
- package/dist/ai/source/ChipsBox.md +25 -5
- package/dist/ai/source/CommaBox.md +21 -6
- package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +467 -250
- package/dist/ai/source/CommonFieldInput.md +848 -0
- package/dist/ai/source/CommonPopover.md +116 -30
- package/dist/ai/source/CommonTimeSelector.md +726 -0
- package/dist/ai/source/ErrorIcon.md +2 -2
- package/dist/ai/source/FlatListBox.md +188 -17
- package/dist/ai/source/GroupedListBox.md +236 -44
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/ListBox.md +46 -8
- package/dist/ai/source/OptionsContainer.md +288 -60
- package/dist/ai/source/WarningIcon.md +2 -2
- package/dist/assets/css/reset.css_inline.js +1 -1
- package/dist/assets/svgs/star.svg_raw.js +4 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
- package/dist/components/BbAccordion/types.d.ts +35 -3
- package/dist/components/BbAccordion/types.js +11 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +46 -30
- package/dist/components/BbAlert/types.d.ts +37 -3
- 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 +24 -18
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +96 -53
- 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 +109 -96
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/BbBaseButton/types.d.ts +33 -3
- 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 +187 -132
- package/dist/components/BbBreadcrumbs/types.d.ts +45 -3
- package/dist/components/BbBreadcrumbs/types.js +12 -0
- package/dist/components/BbButton/BbButton.vue.d.ts +5 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +107 -81
- package/dist/components/BbButton/types.d.ts +113 -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 +608 -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 +225 -0
- package/dist/components/BbCalendar/types.js +29 -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 +274 -0
- package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
- package/dist/components/BbCalendar/useDayGrid.js +204 -0
- package/dist/components/BbCalendar/useToday.d.ts +23 -0
- package/dist/components/BbCalendar/useToday.js +21 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +214 -72
- package/dist/components/BbCheckbox/types.d.ts +180 -13
- package/dist/components/BbCheckbox/types.js +8 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +15 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbCheckboxGroup/types.d.ts +195 -20
- 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 +17 -7
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +330 -86
- package/dist/components/BbColorInput/types.d.ts +230 -12
- 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 +515 -108
- package/dist/components/BbColorPalette/types.d.ts +76 -7
- 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 +125 -76
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -0
- 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 +320 -223
- package/dist/components/BbDatePicker/types.d.ts +111 -17
- package/dist/components/BbDatePicker/types.js +33 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -4
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1172 -87
- package/dist/components/BbDatePickerInput/types.d.ts +224 -19
- package/dist/components/BbDatePickerInput/types.js +39 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +227 -136
- package/dist/components/BbDialog/types.d.ts +92 -3
- 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 +337 -268
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +5 -1
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +8 -2
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +377 -293
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +129 -118
- package/dist/components/BbDropdown/normalizeGroups.js +55 -31
- package/dist/components/BbDropdown/types.d.ts +288 -30
- package/dist/components/BbDropdown/types.js +21 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +10 -4
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +18 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +172 -40
- package/dist/components/BbDropdownButton/types.d.ts +137 -8
- package/dist/components/BbDropdownButton/types.js +35 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +186 -144
- package/dist/components/BbDropzone/types.d.ts +38 -4
- package/dist/components/BbDropzone/types.js +16 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +94 -0
- package/dist/{validated → components/BbForm}/BbForm.vue.js +1 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +317 -0
- package/dist/components/BbForm/BbFormCustomField.d.ts +14 -0
- package/dist/components/BbForm/BbFormCustomField.js +43 -0
- package/dist/components/BbForm/bindFormField.d.ts +16 -0
- package/dist/components/BbForm/bindFormField.js +85 -0
- package/dist/components/BbForm/formFields.d.ts +64 -0
- package/dist/components/BbForm/formFields.js +11 -0
- package/dist/components/BbForm/formSchema.d.ts +56 -0
- package/dist/components/BbForm/formSchema.js +196 -0
- package/dist/components/BbForm/standardSchema.d.ts +59 -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 +34 -21
- 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 +12 -8
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +308 -85
- package/dist/components/BbNumberInput/types.d.ts +201 -18
- package/dist/components/BbNumberInput/types.js +8 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +311 -210
- package/dist/components/BbOffCanvas/types.d.ts +79 -6
- package/dist/components/BbOffCanvas/types.js +15 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +125 -90
- package/dist/components/BbPagination/types.d.ts +38 -0
- package/dist/components/BbPagination/types.js +13 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +219 -179
- package/dist/components/BbPopover/types.d.ts +51 -5
- package/dist/components/BbPopover/types.js +14 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +29 -16
- package/dist/components/BbProgress/types.d.ts +25 -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 +7 -7
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +172 -59
- package/dist/components/BbRadio/types.d.ts +152 -13
- package/dist/components/BbRadio/types.js +8 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +14 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +319 -92
- package/dist/components/BbRadioGroup/types.d.ts +198 -22
- package/dist/components/BbRadioGroup/types.js +10 -0
- package/dist/components/BbRating/BbRating.vue.d.ts +10 -8
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +259 -78
- package/dist/components/BbRating/types.d.ts +174 -13
- package/dist/components/BbRating/types.js +21 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +553 -83
- package/dist/components/BbSelect/types.d.ts +235 -20
- package/dist/components/BbSelect/types.js +41 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +541 -391
- package/dist/components/BbSelectPopover/types.d.ts +124 -8
- package/dist/components/BbSelectPopover/types.js +24 -0
- package/dist/components/BbSlider/BbSlider.vue.d.ts +13 -8
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +472 -96
- package/dist/components/BbSlider/types.d.ts +202 -13
- package/dist/components/BbSlider/types.js +26 -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 +7 -7
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +220 -78
- 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 +14 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbSwitchGroup/types.d.ts +30 -7
- package/dist/components/BbSwitchGroup/types.js +5 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +27 -6
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +2013 -685
- package/dist/components/BbTable/BbTableDataRow.d.ts +196 -0
- package/dist/components/BbTable/BbTableDataRow.js +151 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +84 -0
- package/dist/components/BbTable/BbTableExpandRow.js +62 -0
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +120 -0
- package/dist/components/BbTable/BbTableSelectToggle.js +122 -0
- package/dist/components/BbTable/gridWidgets.d.ts +30 -0
- package/dist/components/BbTable/gridWidgets.js +14 -0
- package/dist/components/BbTable/types.d.ts +473 -123
- package/dist/components/BbTable/types.js +31 -0
- package/dist/components/BbTable/utils.d.ts +145 -4
- package/dist/components/BbTable/utils.js +154 -37
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +62 -26
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +143 -81
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +12 -0
- package/dist/components/{BbBaseSwitch/BbBaseSwitch.vue.js → BbTabs/BbTabsPanels.vue.js} +2 -2
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbTabs/types.d.ts +183 -23
- package/dist/components/BbTabs/types.js +34 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +13 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +383 -92
- package/dist/components/BbTag/types.d.ts +139 -14
- package/dist/components/BbTag/types.js +22 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -8
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +257 -84
- package/dist/components/BbTextInput/types.d.ts +168 -13
- package/dist/components/BbTextInput/types.js +8 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -7
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +291 -94
- package/dist/components/BbTextarea/types.d.ts +158 -14
- package/dist/components/BbTextarea/types.js +8 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -4
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +199 -122
- package/dist/components/BbTimePicker/types.d.ts +94 -7
- package/dist/components/BbTimePicker/types.js +18 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +14 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +749 -86
- package/dist/components/BbTimePickerInput/types.d.ts +171 -22
- package/dist/components/BbTimePickerInput/types.js +25 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +63 -25
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -76
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -0
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
- package/dist/components/BbToast/types.d.ts +54 -1
- package/dist/components/BbToast/types.js +28 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +104 -87
- 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 +15 -3
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +51 -29
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/components/BbTree/context.d.ts +9 -1
- package/dist/components/BbTree/types.d.ts +40 -5
- package/dist/components/BbTree/types.js +7 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +46 -44
- package/dist/components/ChipsBox/types.d.ts +7 -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 +7 -0
- package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +5 -5
- 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 +189 -0
- package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
- package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +52 -16
- 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 +120 -0
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
- package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +27 -8
- 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} +21 -2
- 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 +232 -0
- package/dist/components/CommonTimeSelector/types.d.ts +6 -0
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +5 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +165 -95
- package/dist/components/FlatListBox/types.d.ts +24 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +5 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +217 -134
- package/dist/components/GroupedListBox/types.d.ts +24 -2
- package/dist/components/ListBox/ListBox.vue.d.ts +5 -1
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +95 -69
- package/dist/components/ListBox/types.d.ts +24 -2
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +109 -37
- package/dist/components/OptionsContainer/types.d.ts +53 -9
- package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/Transitions/Slide.vue.js +1 -1
- package/dist/composables/useBaseOptions.d.ts +12 -1
- package/dist/composables/useBaseOptions.js +77 -37
- 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/useBbFormContext.d.ts +131 -8
- package/dist/composables/useBbFormContext.js +49 -30
- package/dist/composables/useBbFormField.d.ts +40 -0
- package/dist/composables/useBbFormField.js +39 -0
- package/dist/composables/useBbTableContext.d.ts +45 -1
- package/dist/composables/useBbTableContext.js +93 -87
- package/dist/composables/useBbTabsContext.d.ts +15 -9
- package/dist/composables/useBbTabsContext.js +121 -90
- package/dist/composables/useClosingInert.d.ts +4 -4
- package/dist/composables/useCoarsePointer.js +7 -10
- package/dist/composables/useCoherence.js +1 -1
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +15 -0
- package/dist/composables/useConfirm.d.ts +39 -7
- package/dist/composables/useConfirm.js +50 -41
- package/dist/composables/useEscapeStackEntry.d.ts +13 -0
- package/dist/composables/useEscapeStackEntry.js +16 -0
- package/dist/composables/useFormBinding.d.ts +116 -0
- package/dist/composables/useFormBinding.js +34 -0
- package/dist/composables/useHydrated.d.ts +18 -0
- package/dist/composables/useHydrated.js +13 -7
- package/dist/composables/useId.d.ts +4 -3
- package/dist/composables/useId.js +1 -7
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useKeyboardInset.d.ts +28 -0
- package/dist/composables/useKeyboardInset.js +32 -0
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +7 -10
- package/dist/composables/usePassthrough.d.ts +228 -0
- package/dist/composables/usePassthrough.js +247 -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 +31 -18
- package/dist/composables/useToggleInput.d.ts +44 -0
- package/dist/composables/useToggleInput.js +39 -0
- package/dist/composables/useViewportWidth.d.ts +5 -25
- package/dist/composables/useViewportWidth.js +14 -7
- package/dist/deprecation/ai-deprecations.json.d.ts +1977 -289
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +9 -4
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/bbTooltip.d.ts +6 -0
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +92 -37
- package/dist/i18n/index.d.ts +10 -16
- package/dist/i18n/locales/cs.json +9 -5
- package/dist/i18n/locales/da.json +9 -5
- package/dist/i18n/locales/de.json +9 -5
- package/dist/i18n/locales/el.json +9 -5
- package/dist/i18n/locales/en.json +9 -5
- package/dist/i18n/locales/es.json +9 -5
- package/dist/i18n/locales/fi.json +9 -5
- package/dist/i18n/locales/fr.json +9 -5
- package/dist/i18n/locales/hu.json +9 -5
- package/dist/i18n/locales/it.json +9 -5
- package/dist/i18n/locales/ja.json +9 -5
- package/dist/i18n/locales/ko.json +9 -5
- package/dist/i18n/locales/nb.json +9 -5
- package/dist/i18n/locales/nl.json +9 -5
- package/dist/i18n/locales/pl.json +9 -5
- package/dist/i18n/locales/pt.json +9 -5
- package/dist/i18n/locales/ro.json +9 -5
- package/dist/i18n/locales/ru.json +9 -5
- package/dist/i18n/locales/sv.json +9 -5
- package/dist/i18n/locales/tr.json +9 -5
- package/dist/i18n/locales/uk.json +9 -5
- package/dist/i18n/locales/zh-cn.json +9 -5
- 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 +40 -21
- package/dist/index.js +78 -71
- package/dist/llms-full.txt +61164 -27972
- package/dist/llms-medium.txt +1482 -366
- package/dist/llms.txt +32 -15
- package/dist/locale-blueprint.json +9 -5
- package/dist/nuxt-auto-imports.d.ts +76 -0
- package/dist/nuxt-auto-imports.js +32 -0
- package/dist/nuxt-module.d.ts +30 -15
- package/dist/nuxt.js +35 -9
- package/dist/passthrough-deduper.js +5 -0
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +29 -19
- package/dist/project-dts.d.ts +84 -0
- package/dist/project-dts.js +170 -0
- package/dist/reset.css +1 -1
- package/dist/runtime/nuxt-plugin.js +34 -21
- package/dist/styles.css +3 -2
- package/dist/types/AlertVariant.d.ts +10 -1
- package/dist/types/BadgeVariant.d.ts +16 -5
- package/dist/types/ButtonVariant.d.ts +12 -1
- package/dist/types/ColumnName.d.ts +30 -3
- package/dist/types/CommonProps.d.ts +2 -2
- package/dist/types/Config.d.ts +94 -1
- package/dist/types/ConfirmVariant.d.ts +8 -1
- package/dist/types/DropdownItemVariant.d.ts +8 -1
- package/dist/types/FieldLayout.d.ts +32 -0
- package/dist/types/IndicatorVariant.d.ts +11 -1
- package/dist/types/InputVariant.d.ts +30 -0
- package/dist/types/ItemProps.d.ts +50 -0
- package/dist/types/Option.d.ts +6 -0
- package/dist/types/PtScope.d.ts +15 -0
- package/dist/types/RegistryKey.d.ts +10 -0
- package/dist/types/TabsVariant.d.ts +25 -0
- package/dist/types/ToastVariant.d.ts +12 -2
- package/dist/types/TooltipVariant.d.ts +8 -1
- package/dist/types/passthrough.d.ts +362 -0
- package/dist/types/passthrough.js +78 -0
- package/dist/types/ptComponentMap.d.ts +62 -0
- package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
- package/dist/utilities/functions/hasVnodeListener.js +12 -0
- package/dist/utilities/functions/isImeComposing.d.ts +7 -0
- package/dist/utilities/functions/isImeComposing.js +4 -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 +13 -8
- package/dist/utilities/functions/slotKey.js +78 -2
- package/dist/utilities/functions/snapToStep.js +2 -1
- package/dist/utilities/functions/toggleInput.d.ts +98 -0
- package/dist/utilities/functions/toggleInput.js +56 -0
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +27 -1
- package/dist/utilities/functions/warnRemovedAttrs.js +75 -14
- 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/overlayEscapeStack.d.ts +10 -0
- package/dist/utils/overlayEscapeStack.js +5 -3
- package/dist/utils/passthrough.d.ts +67 -0
- package/dist/utils/passthrough.js +100 -0
- package/dist/utils/passthroughDeduper.d.ts +2 -0
- package/dist/utils/ptScope.d.ts +8 -0
- package/dist/utils/ptScope.js +4 -0
- package/dist/utils/versionCheck.d.ts +19 -0
- package/dist/utils/versionCheck.js +18 -0
- package/dist/vite-plugin.d.ts +301 -53
- package/dist/vite.js +547 -375
- package/llms.txt +33 -16
- package/package.json +49 -27
- package/scripts/lib/check-fix.mjs +129 -0
- package/scripts/lib/component-attr-targets.ts +123 -0
- package/scripts/lib/component-tree.ts +648 -0
- package/scripts/lib/css-class-check.mjs +326 -0
- package/scripts/lib/css-class-surface.mjs +292 -0
- package/scripts/lib/css-color-resolve.mjs +172 -0
- package/scripts/lib/css-local-check.mjs +267 -0
- package/scripts/lib/design-token-manifest.mjs +499 -0
- package/scripts/lib/doc-sections.mjs +248 -0
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-disable.mjs +141 -0
- package/scripts/lib/eslint-plugin.d.ts +64 -1
- package/scripts/lib/eslint-plugin.mjs +1285 -30
- package/scripts/lib/hand-imported-styles.mjs +326 -0
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +353 -0
- package/scripts/lib/local-components.mjs +177 -0
- package/scripts/lib/mcp-config.mjs +87 -58
- package/scripts/lib/migrate-fix.mjs +62 -3
- package/scripts/lib/project-variant-dts.mjs +122 -0
- package/scripts/lib/public-type-exports.mjs +273 -0
- package/scripts/lib/slot-key.mjs +147 -0
- package/scripts/lib/slot-renames.mjs +46 -0
- package/scripts/lib/squashed-slot-words.mjs +133 -0
- package/scripts/lib/validate-bb-markup.mjs +2213 -76
- package/scripts/lib/wrapper-props.mjs +188 -0
- 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/BbBaseInputContainer.md +0 -48
- 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/BbTabsPanes.md +0 -27
- 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/BbTabsPanes.md +0 -377
- package/dist/ai/source/CommonInputWrapper.md +0 -584
- package/dist/alert-variants.d.ts +0 -19
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/badge-variants.d.ts +0 -19
- package/dist/button-variants.d.ts +0 -21
- 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_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/BbTabs/BbTabsPanes.vue.d.ts +0 -16
- package/dist/components/BbTabs/BbTabsPanes.vue.js +0 -6
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +0 -35
- 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/confirm-variants.d.ts +0 -17
- package/dist/dropdown-item-variants.d.ts +0 -17
- package/dist/indicator-variants.d.ts +0 -20
- package/dist/locale-registry.d.ts +0 -37
- package/dist/toast-variants.d.ts +0 -20
- package/dist/tooltip-variants.d.ts +0 -17
- package/dist/types/InputDirection.d.ts +0 -15
- package/dist/validated/BbCheckbox.vue.d.ts +0 -29
- package/dist/validated/BbCheckbox.vue.js +0 -5
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbCheckboxGroup.vue.d.ts +0 -34
- package/dist/validated/BbCheckboxGroup.vue.js +0 -5
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbColorInput.vue.d.ts +0 -37
- package/dist/validated/BbColorInput.vue.js +0 -5
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbDatePickerInput.vue.d.ts +0 -41
- package/dist/validated/BbDatePickerInput.vue.js +0 -5
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -90
- package/dist/validated/BbDropzone.vue.d.ts +0 -24
- package/dist/validated/BbDropzone.vue.js +0 -5
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/validated/BbForm.vue.d.ts +0 -28
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +0 -42
- package/dist/validated/BbNumberInput.vue.d.ts +0 -36
- package/dist/validated/BbNumberInput.vue.js +0 -5
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbRadioGroup.vue.d.ts +0 -34
- package/dist/validated/BbRadioGroup.vue.js +0 -5
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -78
- package/dist/validated/BbRating.vue.d.ts +0 -30
- package/dist/validated/BbRating.vue.js +0 -5
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/validated/BbSelect.vue.d.ts +0 -46
- package/dist/validated/BbSelect.vue.js +0 -5
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +0 -109
- package/dist/validated/BbSlider.vue.d.ts +0 -36
- package/dist/validated/BbSlider.vue.js +0 -5
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +0 -69
- package/dist/validated/BbSwitch.vue.d.ts +0 -29
- package/dist/validated/BbSwitch.vue.js +0 -5
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbSwitchGroup.vue.d.ts +0 -34
- package/dist/validated/BbSwitchGroup.vue.js +0 -5
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbTag.vue.d.ts +0 -36
- package/dist/validated/BbTag.vue.js +0 -5
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextInput.vue.d.ts +0 -36
- package/dist/validated/BbTextInput.vue.js +0 -5
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextarea.vue.d.ts +0 -36
- package/dist/validated/BbTextarea.vue.js +0 -5
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +0 -70
- package/dist/validated/BbTimePickerInput.vue.d.ts +0 -37
- package/dist/validated/BbTimePickerInput.vue.js +0 -5
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -81
- package/dist/validated/index.d.ts +0 -43
- package/dist/validated/useValidatedField.d.ts +0 -93
- package/dist/validated/useValidatedField.js +0 -51
- package/dist/validated.js +0 -21
- /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
|
@@ -1,1448 +0,0 @@
|
|
|
1
|
-
# BbBaseDatePicker — Implementation Source
|
|
2
|
-
|
|
3
|
-
> Full implementation for deep dives. For everyday usage read the typed contract: [../BbBaseDatePicker.md](../BbBaseDatePicker.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
|
|
12
|
-
class="bb-base-date-picker"
|
|
13
|
-
:class="isCoarse ? `bb-base-date-picker--unit-${homeMode}` : undefined"
|
|
14
|
-
:style="{ '--weeks': weeksInMonth }"
|
|
15
|
-
>
|
|
16
|
-
<span aria-live="polite" class="sr-only">{{ formattedYear }}</span>
|
|
17
|
-
<div aria-live="polite" class="sr-only">{{ cursorAnnouncement }}</div>
|
|
18
|
-
<div class="bb-base-date-picker__body">
|
|
19
|
-
<!-- No controls row under `type="year"`: the year list scrolls itself
|
|
20
|
-
(and extends lazily at both ends), so there is nothing for the
|
|
21
|
-
arrows to page and no coarser unit left for a heading to open.
|
|
22
|
-
A row of inert chrome is worse than no row. -->
|
|
23
|
-
<div v-if="type !== 'year'" class="bb-base-date-picker__controls">
|
|
24
|
-
<BbBaseButton
|
|
25
|
-
:aria-label="previousPageLabel"
|
|
26
|
-
class="bb-base-date-picker__nav-btn"
|
|
27
|
-
:disabled="disabled || mode !== homeMode || !canPagePrevious"
|
|
28
|
-
@click="goToPreviousPage"
|
|
29
|
-
>
|
|
30
|
-
<svg
|
|
31
|
-
fill="none"
|
|
32
|
-
height="16"
|
|
33
|
-
viewBox="0 0 16 16"
|
|
34
|
-
width="16"
|
|
35
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
36
|
-
>
|
|
37
|
-
<path
|
|
38
|
-
d="M10 12 6 8l4-4"
|
|
39
|
-
stroke="currentColor"
|
|
40
|
-
stroke-linecap="round"
|
|
41
|
-
stroke-linejoin="round"
|
|
42
|
-
stroke-width="1.5"
|
|
43
|
-
/>
|
|
44
|
-
</svg>
|
|
45
|
-
<span class="sr-only">{{ previousPageLabel }}</span>
|
|
46
|
-
</BbBaseButton>
|
|
47
|
-
|
|
48
|
-
<div class="bb-base-date-picker__nav-center">
|
|
49
|
-
<BbBaseButton
|
|
50
|
-
v-if="type !== 'month'"
|
|
51
|
-
ref="monthHeadingButton"
|
|
52
|
-
:aria-expanded="mode === 'month'"
|
|
53
|
-
:aria-label="monthHeadingLabel"
|
|
54
|
-
class="bb-base-date-picker__heading-btn"
|
|
55
|
-
:class="{
|
|
56
|
-
'bb-base-date-picker__heading-btn--active': mode === 'month',
|
|
57
|
-
}"
|
|
58
|
-
:disabled="disabled"
|
|
59
|
-
@click="toggleMode('month')"
|
|
60
|
-
@keydown="onMonthHeadingKeydown"
|
|
61
|
-
>
|
|
62
|
-
{{ formattedMonth }}
|
|
63
|
-
</BbBaseButton>
|
|
64
|
-
<BbBaseButton
|
|
65
|
-
ref="yearHeadingButton"
|
|
66
|
-
:aria-expanded="mode === 'year'"
|
|
67
|
-
:aria-label="yearHeadingLabel"
|
|
68
|
-
class="bb-base-date-picker__heading-btn"
|
|
69
|
-
:class="{
|
|
70
|
-
'bb-base-date-picker__heading-btn--active': mode === 'year',
|
|
71
|
-
}"
|
|
72
|
-
:disabled="disabled || !canOpenYearPanel"
|
|
73
|
-
@click="toggleMode('year')"
|
|
74
|
-
@keydown="onYearHeadingKeydown"
|
|
75
|
-
>
|
|
76
|
-
{{ formattedYear }}
|
|
77
|
-
</BbBaseButton>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<BbBaseButton
|
|
81
|
-
:aria-label="nextPageLabel"
|
|
82
|
-
class="bb-base-date-picker__nav-btn"
|
|
83
|
-
:disabled="disabled || mode !== homeMode || !canPageNext"
|
|
84
|
-
@click="goToNextPage"
|
|
85
|
-
>
|
|
86
|
-
<svg
|
|
87
|
-
fill="none"
|
|
88
|
-
height="16"
|
|
89
|
-
viewBox="0 0 16 16"
|
|
90
|
-
width="16"
|
|
91
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
92
|
-
>
|
|
93
|
-
<path
|
|
94
|
-
d="M6 12l4-4-4-4"
|
|
95
|
-
stroke="currentColor"
|
|
96
|
-
stroke-linecap="round"
|
|
97
|
-
stroke-linejoin="round"
|
|
98
|
-
stroke-width="1.5"
|
|
99
|
-
/>
|
|
100
|
-
</svg>
|
|
101
|
-
<span class="sr-only">{{ nextPageLabel }}</span>
|
|
102
|
-
</BbBaseButton>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div class="bb-base-date-picker__content">
|
|
106
|
-
<DaySelector
|
|
107
|
-
v-if="!isCoarse"
|
|
108
|
-
:id="globalId"
|
|
109
|
-
:current="mode === 'day'"
|
|
110
|
-
:cursor="cursor"
|
|
111
|
-
:disabled="disabled"
|
|
112
|
-
:first-day-of-week="firstDayOfWeek"
|
|
113
|
-
:floating="floating"
|
|
114
|
-
:inert="mode !== 'day'"
|
|
115
|
-
:max="max"
|
|
116
|
-
:min="min"
|
|
117
|
-
:model-value="modelValue"
|
|
118
|
-
:multiple="multiple"
|
|
119
|
-
:range="range"
|
|
120
|
-
:readonly="readonly"
|
|
121
|
-
:selectable="selectable"
|
|
122
|
-
:type="type"
|
|
123
|
-
:utc="utc"
|
|
124
|
-
@update:cursor="handleCursorUpdate"
|
|
125
|
-
@update:model-value="updateModelValue"
|
|
126
|
-
>
|
|
127
|
-
<!-- @vue-ignore -->
|
|
128
|
-
<template v-for="(_, name) in $slots" #[name]="data">
|
|
129
|
-
<slot :name="name" v-bind="data" />
|
|
130
|
-
</template>
|
|
131
|
-
</DaySelector>
|
|
132
|
-
<ScaleFadeTransition :duration="150">
|
|
133
|
-
<MonthSelector v-if="mode === 'month'" />
|
|
134
|
-
</ScaleFadeTransition>
|
|
135
|
-
<ScaleFadeTransition :duration="150">
|
|
136
|
-
<YearSelector v-if="mode === 'year'" />
|
|
137
|
-
</ScaleFadeTransition>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
<div
|
|
141
|
-
:id="`${globalId}-status`"
|
|
142
|
-
aria-atomic="true"
|
|
143
|
-
aria-live="polite"
|
|
144
|
-
class="sr-only"
|
|
145
|
-
role="status"
|
|
146
|
-
>
|
|
147
|
-
{{ modeAnnouncement }}
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</template>
|
|
151
|
-
|
|
152
|
-
<script setup lang="ts">
|
|
153
|
-
import { BbBaseButton, useId } from '@/index';
|
|
154
|
-
import type { Dayjs } from 'dayjs';
|
|
155
|
-
import { default as dayjs } from 'dayjs';
|
|
156
|
-
import { default as isSameOrAfter } from 'dayjs/plugin/isSameOrAfter';
|
|
157
|
-
import { default as isSameOrBefore } from 'dayjs/plugin/isSameOrBefore';
|
|
158
|
-
import { default as weekOfYear } from 'dayjs/plugin/weekOfYear';
|
|
159
|
-
import { hash } from '@/utilities/functions/hash';
|
|
160
|
-
import { last } from '@/utilities/functions/last';
|
|
161
|
-
import { validateDateFormat } from '@/utilities/functions/validateDateFormat';
|
|
162
|
-
import { normalizeDateBound } from '@/utilities/functions/normalizeDateBound';
|
|
163
|
-
import { isDateDisabled } from '@/utilities/functions/isDateDisabled';
|
|
164
|
-
import {
|
|
165
|
-
toOuterValue,
|
|
166
|
-
toInnerValue,
|
|
167
|
-
} from '@/utilities/functions/convertDateValue';
|
|
168
|
-
import { isCoarseType, unitOfType } from '@/types/DatePickerType';
|
|
169
|
-
import { identity } from '@/utilities/functions/identity';
|
|
170
|
-
import { isNotNil } from '@/utilities/functions/isNotNil';
|
|
171
|
-
import { sort } from '@/utilities/functions/sort';
|
|
172
|
-
import { ref, watch, computed, nextTick } from 'vue';
|
|
173
|
-
import { useLogger } from '@/composables/useLogger';
|
|
174
|
-
import DaySelector from './BbBaseDatePickerInputDaySelector.vue';
|
|
175
|
-
import MonthSelector from './BbBaseDatePickerMonthSelector.vue';
|
|
176
|
-
import ScaleFadeTransition from '@/components/Transitions/ScaleFade.vue';
|
|
177
|
-
import YearSelector from './BbBaseDatePickerYearSelector.vue';
|
|
178
|
-
import { useLocale } from '@/composables/useLocale';
|
|
179
|
-
import { config } from 'virtual:bitboss-ui/config';
|
|
180
|
-
import { normalizeSearchToken, useTypeahead } from './typeahead';
|
|
181
|
-
import {
|
|
182
|
-
provideDatePickerContext,
|
|
183
|
-
type MonthOptionBase,
|
|
184
|
-
} from './useDatePickerContext';
|
|
185
|
-
|
|
186
|
-
const props = withDefaults(defineProps<BaseDatePickerProps>(), {
|
|
187
|
-
firstDayOfWeek: 1,
|
|
188
|
-
type: 'date',
|
|
189
|
-
});
|
|
190
|
-
const emit = defineEmits<BaseDatePickerEvents>();
|
|
191
|
-
defineSlots<BaseDatePickerSlots>();
|
|
192
|
-
dayjs.extend(weekOfYear);
|
|
193
|
-
dayjs.extend(isSameOrAfter);
|
|
194
|
-
dayjs.extend(isSameOrBefore);
|
|
195
|
-
|
|
196
|
-
import type {
|
|
197
|
-
BaseDatePickerProps,
|
|
198
|
-
BaseDatePickerEvents,
|
|
199
|
-
BaseDatePickerSlots,
|
|
200
|
-
} from './types';
|
|
201
|
-
|
|
202
|
-
const { t } = useLocale();
|
|
203
|
-
|
|
204
|
-
const globalId = props.id || useId().id;
|
|
205
|
-
|
|
206
|
-
const logger = useLogger();
|
|
207
|
-
if (props.multiple && props.range) {
|
|
208
|
-
logger.throw('Date picker cannot be both multiple and range.');
|
|
209
|
-
}
|
|
210
|
-
if (props.multiple || props.range) {
|
|
211
|
-
if (!Array.isArray(props.modelValue)) {
|
|
212
|
-
logger.throw(
|
|
213
|
-
'Date picker is set to select multiple dates but modelValue is not an array.'
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* `month`/`year` select a calendar label, so their whole selection model — the
|
|
220
|
-
* terminal panel, the emitted string, bound comparison — moves up a unit.
|
|
221
|
-
*/
|
|
222
|
-
const isCoarse = computed(() => isCoarseType(props.type));
|
|
223
|
-
const unit = computed(() => unitOfType(props.type));
|
|
224
|
-
/** Bounds restated in the unit being selected (`min` floors, `max` ceils). */
|
|
225
|
-
const boundMin = computed(() =>
|
|
226
|
-
normalizeDateBound(props.min, props.type, 'min', (m) =>
|
|
227
|
-
logger.warn(`Date picker: ${m}`)
|
|
228
|
-
)
|
|
229
|
-
);
|
|
230
|
-
const boundMax = computed(() =>
|
|
231
|
-
normalizeDateBound(props.max, props.type, 'max', (m) =>
|
|
232
|
-
logger.warn(`Date picker: ${m}`)
|
|
233
|
-
)
|
|
234
|
-
);
|
|
235
|
-
|
|
236
|
-
// Day-shaped types keep the strict YYYY-MM-DD contract they always had; the
|
|
237
|
-
// coarse ones are normalized above instead, since their bounds are shorter.
|
|
238
|
-
if (!isCoarse.value) {
|
|
239
|
-
if (props.min) {
|
|
240
|
-
validateDateFormat(props.min, 'Min');
|
|
241
|
-
}
|
|
242
|
-
if (props.max) {
|
|
243
|
-
validateDateFormat(props.max, 'Max');
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/** Outer-string contract for every parse/emit in this component. */
|
|
248
|
-
const valueOptions = computed(() => ({
|
|
249
|
-
floating: props.floating,
|
|
250
|
-
utc: props.utc,
|
|
251
|
-
type: props.type,
|
|
252
|
-
}));
|
|
253
|
-
const parseValue = (value: string) => toInnerValue(value, valueOptions.value);
|
|
254
|
-
|
|
255
|
-
const cursor = ref<Dayjs>(dayjs());
|
|
256
|
-
|
|
257
|
-
/** A bound as a Dayjs, in whatever shape this type states its bounds. */
|
|
258
|
-
const boundDate = (bound: string | undefined) => {
|
|
259
|
-
if (!bound) return null;
|
|
260
|
-
const parsed = parseValue(bound);
|
|
261
|
-
return parsed.isValid() ? parsed : null;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Where an empty picker opens. Today, unless the bounds put today outside the
|
|
266
|
-
* selectable range — then the nearest edge of that range, so a window entirely
|
|
267
|
-
* in the past or the future opens *on* it rather than on a fully disabled grid
|
|
268
|
-
* the user has to page out of. A picker with a value always follows the value,
|
|
269
|
-
* even an out-of-bounds one: moving away from it would hide what is set.
|
|
270
|
-
*/
|
|
271
|
-
const openingCursor = () => {
|
|
272
|
-
const today = dayjs().startOf('day');
|
|
273
|
-
const min = boundDate(boundMin.value);
|
|
274
|
-
const max = boundDate(boundMax.value);
|
|
275
|
-
if (min && today.isBefore(min, unit.value)) return min.startOf(unit.value);
|
|
276
|
-
if (max && today.isAfter(max, unit.value)) return max.startOf(unit.value);
|
|
277
|
-
return today;
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
const setCursor = (value: typeof props.modelValue) => {
|
|
281
|
-
if (!value) {
|
|
282
|
-
cursor.value = openingCursor();
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
if (Array.isArray(value)) {
|
|
287
|
-
if (value.length === 0) {
|
|
288
|
-
cursor.value = openingCursor();
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// Unit-granular: values may carry finer parts, the cursor is always the
|
|
293
|
-
// start of the unit being selected.
|
|
294
|
-
const datesAsNumber = value.map((el) =>
|
|
295
|
-
parseValue(el).startOf(unit.value).valueOf()
|
|
296
|
-
);
|
|
297
|
-
const cursorTimestamp = cursor.value.valueOf();
|
|
298
|
-
|
|
299
|
-
if (datesAsNumber.includes(cursorTimestamp)) {
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
cursor.value = parseValue(last(value) ?? '').startOf(unit.value);
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
cursor.value = parseValue(value).startOf(unit.value);
|
|
308
|
-
};
|
|
309
|
-
setCursor(props.modelValue);
|
|
310
|
-
|
|
311
|
-
type Mode = 'day' | 'month' | 'year';
|
|
312
|
-
/**
|
|
313
|
-
* In `date`/`datetime` the month and year panels are *navigation* — a detour
|
|
314
|
-
* that ends back on the day grid. In `month`/`year` the same panel is the
|
|
315
|
-
* grid: it never closes, and picking in it commits the value.
|
|
316
|
-
*/
|
|
317
|
-
/** The panel this picker rests on — its grid, whatever is open over it. */
|
|
318
|
-
const homeMode = computed<Mode>(() =>
|
|
319
|
-
isCoarse.value ? (unit.value as Mode) : 'day'
|
|
320
|
-
);
|
|
321
|
-
const mode = ref<Mode>(homeMode.value);
|
|
322
|
-
watch(homeMode, (next) => {
|
|
323
|
-
mode.value = next;
|
|
324
|
-
});
|
|
325
|
-
const monthHeadingButton = ref<InstanceType<typeof BbBaseButton> | null>(null);
|
|
326
|
-
const yearHeadingButton = ref<InstanceType<typeof BbBaseButton> | null>(null);
|
|
327
|
-
/**
|
|
328
|
-
* Monotonic reset signal forwarded to month/year selectors.
|
|
329
|
-
* Incrementing this key tells child panels to clear typeahead buffer/state.
|
|
330
|
-
*/
|
|
331
|
-
const typeaheadResetKey = ref(0);
|
|
332
|
-
const resetTypeahead = () => {
|
|
333
|
-
typeaheadResetKey.value += 1;
|
|
334
|
-
};
|
|
335
|
-
/**
|
|
336
|
-
* Toggles between day/month/year modes.
|
|
337
|
-
* Any panel transition resets typeahead to avoid stale buffers carrying over.
|
|
338
|
-
*/
|
|
339
|
-
const toggleMode = (target: Mode) => {
|
|
340
|
-
// A panel can only be opened over a coarser grid, never over itself: under
|
|
341
|
-
// `type="month"` the year list is still navigation (jump years instead of
|
|
342
|
-
// paging one at a time), but the month panel IS the grid, and `type="year"`
|
|
343
|
-
// has nothing coarser left to reach for.
|
|
344
|
-
if (target === homeMode.value || props.type === 'year') return;
|
|
345
|
-
mode.value = mode.value === target ? homeMode.value : target;
|
|
346
|
-
resetTypeahead();
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
const formattedMonth = computed(() =>
|
|
350
|
-
cursor.value.locale(config.locale).format('MMMM')
|
|
351
|
-
);
|
|
352
|
-
|
|
353
|
-
const formattedYear = computed(() => cursor.value.format('YYYY'));
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* The heading buttons display which page the grid is on, so their accessible
|
|
357
|
-
* name has to start with that visible text: a bare "Select a month" never says
|
|
358
|
-
* which month, and dropping the visible string out of the name is a WCAG 2.5.3
|
|
359
|
-
* (Label in Name) failure that leaves voice-control users unable to say "click
|
|
360
|
-
* March". The localized affordance follows the value instead of replacing it.
|
|
361
|
-
*/
|
|
362
|
-
const monthHeadingLabel = computed(
|
|
363
|
-
() => `${formattedMonth.value}, ${t('datePicker.monthLabel').value}`
|
|
364
|
-
);
|
|
365
|
-
|
|
366
|
-
const yearHeadingLabel = computed(
|
|
367
|
-
() => `${formattedYear.value}, ${t('datePicker.yearLabel').value}`
|
|
368
|
-
);
|
|
369
|
-
|
|
370
|
-
const weeksInMonth = computed(() => {
|
|
371
|
-
const startOfMonth = cursor.value.startOf('month');
|
|
372
|
-
const endOfMonth = cursor.value.endOf('month');
|
|
373
|
-
const startOffset = (startOfMonth.day() - props.firstDayOfWeek + 7) % 7;
|
|
374
|
-
const lastDayOfWeek = (props.firstDayOfWeek + 6) % 7;
|
|
375
|
-
const endOffset = ((lastDayOfWeek - endOfMonth.day() + 7) % 7) + 1;
|
|
376
|
-
return (cursor.value.daysInMonth() - 1 + startOffset + endOffset) / 7;
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
const modeAnnouncement = computed(() => {
|
|
380
|
-
if (mode.value === 'month') return t('datePicker.selectingMonth').value;
|
|
381
|
-
if (mode.value === 'year') return t('datePicker.selectingYear').value;
|
|
382
|
-
return '';
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* The live region above the grid reads the cursor as a full date, which is a
|
|
387
|
-
* lie in the coarse modes — there is no day to announce.
|
|
388
|
-
*/
|
|
389
|
-
const cursorAnnouncement = computed(() => {
|
|
390
|
-
if (props.type === 'year') return formattedYear.value;
|
|
391
|
-
if (props.type === 'month')
|
|
392
|
-
return `${formattedMonth.value} ${formattedYear.value}`;
|
|
393
|
-
return `${cursor.value.format('ddd')}, ${cursor.value.format('D')} ${formattedMonth.value}`;
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
const updateMonth = (monthNumber: number) => {
|
|
397
|
-
cursor.value = cursor.value.set('month', monthNumber);
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
// ── Paging ──────────────────────────────────────────────────────────────────
|
|
401
|
-
// The arrows page whatever the grid is showing: a month of days, a year of
|
|
402
|
-
// months, or a decade of years. Same control, one step of the visible span.
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* One arrow press moves one page of whatever the grid is showing: a month of
|
|
406
|
-
* days, or a year of months. (`type="year"` has no arrows — see the template.)
|
|
407
|
-
*/
|
|
408
|
-
const pageUnit = computed<'month' | 'year'>(() =>
|
|
409
|
-
props.type === 'month' ? 'year' : 'month'
|
|
410
|
-
);
|
|
411
|
-
|
|
412
|
-
const goToPreviousPage = () => {
|
|
413
|
-
hoveredUnit.value = null;
|
|
414
|
-
cursor.value = cursor.value.subtract(1, pageUnit.value);
|
|
415
|
-
};
|
|
416
|
-
const goToNextPage = () => {
|
|
417
|
-
hoveredUnit.value = null;
|
|
418
|
-
cursor.value = cursor.value.add(1, pageUnit.value);
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Whether anything selectable lies outside the span the cursor is sitting in.
|
|
423
|
-
* Both the paging arrows and the year panel are navigation: pointing them at a
|
|
424
|
-
* span where every cell is disabled is an invitation to get lost.
|
|
425
|
-
*/
|
|
426
|
-
const hasSelectableBefore = (span: 'month' | 'year') => {
|
|
427
|
-
const min = boundDate(boundMin.value);
|
|
428
|
-
return !min || min.isBefore(cursor.value.startOf(span));
|
|
429
|
-
};
|
|
430
|
-
const hasSelectableAfter = (span: 'month' | 'year') => {
|
|
431
|
-
const max = boundDate(boundMax.value);
|
|
432
|
-
return !max || max.isAfter(cursor.value.endOf(span));
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
const canPagePrevious = computed(() => hasSelectableBefore(pageUnit.value));
|
|
436
|
-
const canPageNext = computed(() => hasSelectableAfter(pageUnit.value));
|
|
437
|
-
/**
|
|
438
|
-
* The year list has somewhere to go only if some other year is reachable. With
|
|
439
|
-
* `min` and `max` inside one year the button would open a list whose every
|
|
440
|
-
* entry but the current one is disabled; with the bounds in another year
|
|
441
|
-
* entirely it stays live, because jumping there is exactly what it is for.
|
|
442
|
-
*/
|
|
443
|
-
const canOpenYearPanel = computed(
|
|
444
|
-
() => hasSelectableBefore('year') || hasSelectableAfter('year')
|
|
445
|
-
);
|
|
446
|
-
|
|
447
|
-
const previousPageLabel = computed(() =>
|
|
448
|
-
isCoarse.value
|
|
449
|
-
? t('datePicker.previousYearLabel').value
|
|
450
|
-
: t('datePicker.previousMonthLabel').value
|
|
451
|
-
);
|
|
452
|
-
const nextPageLabel = computed(() =>
|
|
453
|
-
isCoarse.value
|
|
454
|
-
? t('datePicker.nextYearLabel').value
|
|
455
|
-
: t('datePicker.nextMonthLabel').value
|
|
456
|
-
);
|
|
457
|
-
|
|
458
|
-
const updateYear = (yearNumber: number) => {
|
|
459
|
-
cursor.value = cursor.value.set('year', yearNumber);
|
|
460
|
-
};
|
|
461
|
-
|
|
462
|
-
// ── Shared context ──────────────────────────────────────────────────────────
|
|
463
|
-
// Month options and the year-token function are computed once here and
|
|
464
|
-
// distributed to all consumers (heading-button typeaheads + panel selectors)
|
|
465
|
-
// via provide/inject so they are never rebuilt more than once per change.
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* Twelve month options rebuilt whenever the cursor year or locale changes.
|
|
469
|
-
* Provides all fields required by `MonthOptionBase`; panel selectors add
|
|
470
|
-
* their own `selected` state on top.
|
|
471
|
-
*/
|
|
472
|
-
const monthOptions = computed<MonthOptionBase[]>(() => {
|
|
473
|
-
const firstMonth = cursor.value.startOf('year');
|
|
474
|
-
const locale = config.locale;
|
|
475
|
-
return Array.from({ length: 12 }, (_, i) => {
|
|
476
|
-
const d = firstMonth.add(i, 'month');
|
|
477
|
-
const full = d.locale(locale).format('MMMM');
|
|
478
|
-
const short = d.locale(locale).format('MMM');
|
|
479
|
-
return {
|
|
480
|
-
ariaLabel: full,
|
|
481
|
-
key: d.format('YYYY-MM'),
|
|
482
|
-
text: short,
|
|
483
|
-
tokens: [full, short, String(i + 1), String(i + 1).padStart(2, '0')].map(
|
|
484
|
-
(t) => normalizeSearchToken(t, locale)
|
|
485
|
-
),
|
|
486
|
-
value: i,
|
|
487
|
-
};
|
|
488
|
-
});
|
|
489
|
-
});
|
|
490
|
-
|
|
491
|
-
/** Normalizes a year number to a typeahead search token. */
|
|
492
|
-
const yearToken = (year: number) => normalizeSearchToken(String(year), 'en');
|
|
493
|
-
|
|
494
|
-
// ── Coarse-unit selection ───────────────────────────────────────────────────
|
|
495
|
-
// The day grid owns its own selection engine (DaySelector). Months and years
|
|
496
|
-
// need the same three behaviours — toggle, range, multiple — over whole units,
|
|
497
|
-
// so they live here, where the model and the emit already do.
|
|
498
|
-
|
|
499
|
-
/** Model values parsed and snapped to the unit, as timestamps. */
|
|
500
|
-
const unitSelection = computed(() => {
|
|
501
|
-
const stamps = ([] as Array<string | null>)
|
|
502
|
-
.concat(props.modelValue as never)
|
|
503
|
-
.filter(identity)
|
|
504
|
-
.map((value) =>
|
|
505
|
-
parseValue(value as string)
|
|
506
|
-
.startOf(unit.value)
|
|
507
|
-
.valueOf()
|
|
508
|
-
);
|
|
509
|
-
const min = stamps.length ? Math.min(...stamps) : Infinity;
|
|
510
|
-
const max = stamps.length ? Math.max(...stamps) : -Infinity;
|
|
511
|
-
const index: Record<number, number> = {};
|
|
512
|
-
stamps.forEach((stamp, i) => {
|
|
513
|
-
index[stamp] = i;
|
|
514
|
-
});
|
|
515
|
-
return {
|
|
516
|
-
min,
|
|
517
|
-
max,
|
|
518
|
-
selected: (date: Dayjs) => isNotNil(index[date.valueOf()]),
|
|
519
|
-
isFirst: (date: Dayjs) => date.valueOf() === min,
|
|
520
|
-
isLast: (date: Dayjs) => date.valueOf() === max,
|
|
521
|
-
isBetween: (date: Dayjs) => date.valueOf() > min && date.valueOf() < max,
|
|
522
|
-
};
|
|
523
|
-
});
|
|
524
|
-
|
|
525
|
-
/** Half-open range in progress: one end committed, the other still hovering. */
|
|
526
|
-
const rangePending = computed(
|
|
527
|
-
() =>
|
|
528
|
-
!!props.range &&
|
|
529
|
-
Array.isArray(props.modelValue) &&
|
|
530
|
-
props.modelValue.length === 1
|
|
531
|
-
);
|
|
532
|
-
/**
|
|
533
|
-
* The cell the user is currently aiming at — pointer or keyboard. Distinct
|
|
534
|
-
* from `cursor`, which only says which page the grid is showing.
|
|
535
|
-
*/
|
|
536
|
-
const hoveredUnit = ref<number | null>(null);
|
|
537
|
-
const setHoveredUnit = (date: Dayjs | null) => {
|
|
538
|
-
hoveredUnit.value = rangePending.value && date ? date.valueOf() : null;
|
|
539
|
-
};
|
|
540
|
-
|
|
541
|
-
const isUnitDisabled = (date: Dayjs) =>
|
|
542
|
-
isDateDisabled(date, {
|
|
543
|
-
min: boundMin.value,
|
|
544
|
-
max: boundMax.value,
|
|
545
|
-
selectable: props.selectable,
|
|
546
|
-
floating: props.floating,
|
|
547
|
-
utc: props.utc,
|
|
548
|
-
type: props.type,
|
|
549
|
-
});
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* Everything a coarse cell needs to paint itself: selection, the range band,
|
|
553
|
-
* the pending-range preview, and whether it is reachable at all.
|
|
554
|
-
*/
|
|
555
|
-
const unitState = (date: Dayjs) => {
|
|
556
|
-
const snapped = date.startOf(unit.value);
|
|
557
|
-
const meta = unitSelection.value;
|
|
558
|
-
const stamp = snapped.valueOf();
|
|
559
|
-
const selected = meta.selected(snapped);
|
|
560
|
-
const first = !!props.range && meta.isFirst(snapped);
|
|
561
|
-
const last = !!props.range && meta.isLast(snapped);
|
|
562
|
-
const anchor = rangePending.value ? meta.min : null;
|
|
563
|
-
// Only a real aim previews — the pointer, or the keyboard cell the panel
|
|
564
|
-
// reports. NOT the cursor: here it is the *paging* cursor (which year the
|
|
565
|
-
// grid is showing), so falling back to it drew a band from the committed
|
|
566
|
-
// start to some arbitrary cell of whatever year you paged to, before the
|
|
567
|
-
// user aimed at anything at all.
|
|
568
|
-
const target = rangePending.value ? hoveredUnit.value : null;
|
|
569
|
-
const lo =
|
|
570
|
-
anchor !== null && target !== null ? Math.min(anchor, target) : null;
|
|
571
|
-
const hi =
|
|
572
|
-
anchor !== null && target !== null ? Math.max(anchor, target) : null;
|
|
573
|
-
return {
|
|
574
|
-
selected,
|
|
575
|
-
first,
|
|
576
|
-
last,
|
|
577
|
-
middle: !!props.range && !first && !last && meta.isBetween(snapped),
|
|
578
|
-
preview:
|
|
579
|
-
lo !== null && hi !== null && lo !== hi && stamp >= lo && stamp <= hi,
|
|
580
|
-
disabled: props.disabled === true || isUnitDisabled(snapped),
|
|
581
|
-
};
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Commits a whole-unit pick. Mirrors the day grid's semantics exactly: single
|
|
586
|
-
* toggles off when re-picked, range restarts once both ends are set, multiple
|
|
587
|
-
* toggles membership — so `type` changes what a value *is*, never how the
|
|
588
|
-
* picker behaves.
|
|
589
|
-
*/
|
|
590
|
-
const selectUnitValue = (date: Dayjs) => {
|
|
591
|
-
if (props.readonly) return;
|
|
592
|
-
const snapped = date.startOf(unit.value);
|
|
593
|
-
if (isUnitDisabled(snapped)) return;
|
|
594
|
-
const asString = toOuterValue(snapped, valueOptions.value);
|
|
595
|
-
const state = unitState(snapped);
|
|
596
|
-
|
|
597
|
-
if (props.range) {
|
|
598
|
-
if (!Array.isArray(props.modelValue)) return;
|
|
599
|
-
if (props.modelValue.length !== 1) updateModelValue([asString]);
|
|
600
|
-
else updateModelValue(sort([props.modelValue[0], asString]));
|
|
601
|
-
hoveredUnit.value = null;
|
|
602
|
-
return;
|
|
603
|
-
}
|
|
604
|
-
if (props.multiple) {
|
|
605
|
-
if (!Array.isArray(props.modelValue)) return;
|
|
606
|
-
updateModelValue(
|
|
607
|
-
state.selected
|
|
608
|
-
? props.modelValue.filter((el) => el !== asString)
|
|
609
|
-
: sort([...props.modelValue, asString])
|
|
610
|
-
);
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
updateModelValue(state.selected ? null : asString);
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* Commits a month selection made inside the month panel.
|
|
618
|
-
*
|
|
619
|
-
* Under `type="month"` the panel *is* the picker, so this emits; otherwise it
|
|
620
|
-
* is navigation — move the cursor, close the panel, restore focus.
|
|
621
|
-
*/
|
|
622
|
-
const selectMonth = (month: number) => {
|
|
623
|
-
if (isCoarse.value) {
|
|
624
|
-
selectUnitValue(cursor.value.set('month', month));
|
|
625
|
-
updateMonth(month);
|
|
626
|
-
return;
|
|
627
|
-
}
|
|
628
|
-
updateMonth(month);
|
|
629
|
-
resetTypeahead();
|
|
630
|
-
mode.value = homeMode.value;
|
|
631
|
-
nextTick(() => {
|
|
632
|
-
if (monthHeadingButton.value?.$el instanceof HTMLElement) {
|
|
633
|
-
monthHeadingButton.value.$el.focus();
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
|
-
};
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* Commits a year selection made inside the year panel — emitting under
|
|
640
|
-
* `type="year"`, navigating otherwise (see `selectMonth`).
|
|
641
|
-
*/
|
|
642
|
-
const selectYear = (year: number) => {
|
|
643
|
-
if (props.type === 'year') {
|
|
644
|
-
selectUnitValue(cursor.value.set('year', year));
|
|
645
|
-
updateYear(year);
|
|
646
|
-
return;
|
|
647
|
-
}
|
|
648
|
-
updateYear(year);
|
|
649
|
-
resetTypeahead();
|
|
650
|
-
mode.value = homeMode.value;
|
|
651
|
-
nextTick(() => {
|
|
652
|
-
if (yearHeadingButton.value?.$el instanceof HTMLElement) {
|
|
653
|
-
yearHeadingButton.value.$el.focus();
|
|
654
|
-
}
|
|
655
|
-
});
|
|
656
|
-
};
|
|
657
|
-
|
|
658
|
-
provideDatePickerContext({
|
|
659
|
-
cursor,
|
|
660
|
-
disabled: computed(() => props.disabled === true),
|
|
661
|
-
monthOptions,
|
|
662
|
-
yearToken,
|
|
663
|
-
typeaheadResetKey,
|
|
664
|
-
selectMonth,
|
|
665
|
-
selectYear,
|
|
666
|
-
terminalUnit: computed(() =>
|
|
667
|
-
props.type === 'month' || props.type === 'year' ? props.type : null
|
|
668
|
-
),
|
|
669
|
-
boundYears: computed(() => {
|
|
670
|
-
const yearOf = (bound: string | undefined) => {
|
|
671
|
-
if (!bound) return null;
|
|
672
|
-
const parsed = parseValue(bound);
|
|
673
|
-
return parsed.isValid() ? parsed.year() : null;
|
|
674
|
-
};
|
|
675
|
-
return { min: yearOf(boundMin.value), max: yearOf(boundMax.value) };
|
|
676
|
-
}),
|
|
677
|
-
unitState,
|
|
678
|
-
setHoveredUnit,
|
|
679
|
-
});
|
|
680
|
-
|
|
681
|
-
// ── Heading-button typeahead ────────────────────────────────────────────────
|
|
682
|
-
// When focus is on the month or year heading button and no panel is open,
|
|
683
|
-
// typing auto-commits the first match so the cursor changes without requiring
|
|
684
|
-
// the panel to open. Enter is left to the button's click handler so it still
|
|
685
|
-
// toggles the panel.
|
|
686
|
-
|
|
687
|
-
const { onKeydown: _onMonthHeadingKeydown, reset: resetMonthHeadingTypeahead } =
|
|
688
|
-
useTypeahead({
|
|
689
|
-
candidates: () => monthOptions.value,
|
|
690
|
-
getTokens: (opt) => opt.tokens,
|
|
691
|
-
getCurrent: () =>
|
|
692
|
-
monthOptions.value.find((o) => o.value === cursor.value.month()),
|
|
693
|
-
onMatch: () => {},
|
|
694
|
-
onCommit: (opt) => updateMonth(opt.value),
|
|
695
|
-
autoCommit: true,
|
|
696
|
-
locale: () => config.locale,
|
|
697
|
-
});
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* Forwards printable keys to the month heading typeahead only while no panel
|
|
701
|
-
* is open. Enter is intentionally excluded so it continues to toggle the
|
|
702
|
-
* month panel via the button's native click handler.
|
|
703
|
-
*/
|
|
704
|
-
const onMonthHeadingKeydown = (event: KeyboardEvent) => {
|
|
705
|
-
if (event.key === 'Enter' || mode.value !== homeMode.value) return;
|
|
706
|
-
_onMonthHeadingKeydown(event);
|
|
707
|
-
};
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* Year options for the heading-button typeahead.
|
|
711
|
-
* A ±100 year window around the cursor covers typical usage; sticky matching
|
|
712
|
-
* prevents premature commits while the user builds a multi-digit query
|
|
713
|
-
* (e.g. "2", "0", "2", "5" keeps 2026 selected until "2025" breaks the match).
|
|
714
|
-
*/
|
|
715
|
-
const yearHeadingOptions = computed(() => {
|
|
716
|
-
const cy = cursor.value.year();
|
|
717
|
-
const opts: Array<{ value: number; token: string }> = [];
|
|
718
|
-
for (let y = cy - 100; y <= cy + 100; y++) {
|
|
719
|
-
opts.push({ value: y, token: yearToken(y) });
|
|
720
|
-
}
|
|
721
|
-
return opts;
|
|
722
|
-
});
|
|
723
|
-
|
|
724
|
-
const { onKeydown: _onYearHeadingKeydown, reset: resetYearHeadingTypeahead } =
|
|
725
|
-
useTypeahead({
|
|
726
|
-
candidates: () => yearHeadingOptions.value,
|
|
727
|
-
getTokens: (opt) => [opt.token],
|
|
728
|
-
getCurrent: () =>
|
|
729
|
-
yearHeadingOptions.value.find((o) => o.value === cursor.value.year()),
|
|
730
|
-
onMatch: () => {},
|
|
731
|
-
onCommit: (opt) => updateYear(opt.value),
|
|
732
|
-
autoCommit: true,
|
|
733
|
-
locale: () => 'en',
|
|
734
|
-
});
|
|
735
|
-
|
|
736
|
-
/**
|
|
737
|
-
* Same policy as `onMonthHeadingKeydown` — Enter toggles the year panel,
|
|
738
|
-
* printable keys drive the typeahead while the panel is closed.
|
|
739
|
-
*/
|
|
740
|
-
const onYearHeadingKeydown = (event: KeyboardEvent) => {
|
|
741
|
-
if (event.key === 'Enter' || mode.value !== homeMode.value) return;
|
|
742
|
-
_onYearHeadingKeydown(event);
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
watch(typeaheadResetKey, () => {
|
|
746
|
-
resetMonthHeadingTypeahead();
|
|
747
|
-
resetYearHeadingTypeahead();
|
|
748
|
-
});
|
|
749
|
-
|
|
750
|
-
const handleCursorUpdate = (value: Dayjs) => {
|
|
751
|
-
cursor.value = value;
|
|
752
|
-
};
|
|
753
|
-
|
|
754
|
-
const lastValue = ref(props.modelValue);
|
|
755
|
-
const updateModelValue = (value: BaseDatePickerProps['modelValue']) => {
|
|
756
|
-
lastValue.value = value;
|
|
757
|
-
emit('update:modelValue', value);
|
|
758
|
-
};
|
|
759
|
-
|
|
760
|
-
watch(
|
|
761
|
-
() => props.modelValue,
|
|
762
|
-
() => {
|
|
763
|
-
if (hash(props.modelValue) !== hash(lastValue.value)) {
|
|
764
|
-
lastValue.value = props.modelValue;
|
|
765
|
-
setCursor(props.modelValue);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
);
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Called by the surface when it closes, so the next open starts on the grid
|
|
772
|
-
* rather than on whatever panel was left showing.
|
|
773
|
-
*
|
|
774
|
-
* "The grid" is `day` only for the day-shaped types — under `month`/`year` the
|
|
775
|
-
* panel IS the grid, and resetting to `day` there rendered an empty popover on
|
|
776
|
-
* every reopen (the day selector is not mounted at all).
|
|
777
|
-
*/
|
|
778
|
-
const resetStatus = () => {
|
|
779
|
-
mode.value = homeMode.value;
|
|
780
|
-
};
|
|
781
|
-
|
|
782
|
-
defineExpose({
|
|
783
|
-
resetStatus,
|
|
784
|
-
});
|
|
785
|
-
</script>
|
|
786
|
-
|
|
787
|
-
<style lang="postcss">
|
|
788
|
-
@import './index.css';
|
|
789
|
-
</style>
|
|
790
|
-
```
|
|
791
|
-
|
|
792
|
-
## Types
|
|
793
|
-
|
|
794
|
-
```ts
|
|
795
|
-
import type { HTMLAttributes } from 'vue';
|
|
796
|
-
import type { Dayjs } from 'dayjs';
|
|
797
|
-
import type { DatePickerType } from '@/types/DatePickerType';
|
|
798
|
-
|
|
799
|
-
export type BaseDatePickerProps = {
|
|
800
|
-
/**
|
|
801
|
-
* Disables the component.
|
|
802
|
-
*/
|
|
803
|
-
disabled?: boolean;
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday.
|
|
807
|
-
* @defaultValue `1`
|
|
808
|
-
*/
|
|
809
|
-
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* If true the value is a plain calendar string (`YYYY-MM-DD`, or the shape
|
|
813
|
-
* `type` dictates) instead of the default ISO instant.
|
|
814
|
-
*/
|
|
815
|
-
floating?: boolean;
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* The identifier of the component.
|
|
819
|
-
*/
|
|
820
|
-
id?: HTMLAttributes['id'];
|
|
821
|
-
|
|
822
|
-
/**
|
|
823
|
-
* Maximum selectable date.
|
|
824
|
-
*/
|
|
825
|
-
max?: string;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* Minimum selectable date.
|
|
829
|
-
*/
|
|
830
|
-
min?: string;
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* 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.
|
|
834
|
-
*/
|
|
835
|
-
modelValue: string | string[] | null;
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* Allows the selection of multiple items.
|
|
839
|
-
*/
|
|
840
|
-
multiple?: boolean;
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* Selects a range of dates between two dates. It selects all of the days between start and end.
|
|
844
|
-
*/
|
|
845
|
-
range?: boolean;
|
|
846
|
-
|
|
847
|
-
/**
|
|
848
|
-
* Sets the input in a readonly state.
|
|
849
|
-
*/
|
|
850
|
-
readonly?: boolean;
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Function that accepts a date string and returns a boolean. Returning `false` means the date cannot be selected.
|
|
854
|
-
* The string is shaped by `type`: `YYYY-MM` under `month`, `YYYY` under `year`.
|
|
855
|
-
*/
|
|
856
|
-
selectable?: (date: string) => boolean;
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* What the grid selects: a day (`date`/`datetime`), a month, or a year.
|
|
860
|
-
* The coarse types make the month/year panel terminal instead of a
|
|
861
|
-
* navigation step, and emit `YYYY-MM` / `YYYY`.
|
|
862
|
-
*
|
|
863
|
-
* @defaultValue `'date'`
|
|
864
|
-
*/
|
|
865
|
-
type?: DatePickerType;
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* Emits values as UTC ISO strings (`...Z`) instead of ISO strings carrying
|
|
869
|
-
* the local offset (`...+01:00`). Emission-only: incoming values are parsed
|
|
870
|
-
* identically either way, so the prop can be added or removed without
|
|
871
|
-
* touching stored values. Ignored when `floating` is set.
|
|
872
|
-
*/
|
|
873
|
-
utc?: boolean;
|
|
874
|
-
};
|
|
875
|
-
|
|
876
|
-
export type BaseDatePickerEvents =
|
|
877
|
-
/**
|
|
878
|
-
* Emitted whenever the selected date(s) change via calendar interaction.
|
|
879
|
-
* Payload is `null` for cleared values, a single ISO string for single-date mode,
|
|
880
|
-
* or an array of ISO strings for multiple/range mode.
|
|
881
|
-
*/
|
|
882
|
-
(event: 'update:modelValue', value: string | string[] | null) => void;
|
|
883
|
-
|
|
884
|
-
/**
|
|
885
|
-
* Props exposed by day slots (keyed by date string, e.g. `"2024-03-15"`, or `"day"` as a fallback for all days).
|
|
886
|
-
*/
|
|
887
|
-
export type BaseDatePickerDaySlotProps = {
|
|
888
|
-
/**
|
|
889
|
-
* Whether this day is the first in a selected range.
|
|
890
|
-
*/
|
|
891
|
-
first: boolean;
|
|
892
|
-
/**
|
|
893
|
-
* Whether this day falls within the highlighted range.
|
|
894
|
-
*/
|
|
895
|
-
highlighted: boolean;
|
|
896
|
-
/**
|
|
897
|
-
* The underlying date value for this day, as a `dayjs` object.
|
|
898
|
-
*/
|
|
899
|
-
item: Dayjs;
|
|
900
|
-
/**
|
|
901
|
-
* The display label for this day (day number as string).
|
|
902
|
-
*/
|
|
903
|
-
label: string;
|
|
904
|
-
/**
|
|
905
|
-
* Whether this day is the last in a selected range.
|
|
906
|
-
*/
|
|
907
|
-
last: boolean;
|
|
908
|
-
/**
|
|
909
|
-
* Whether this day falls between the first and last of a selected range.
|
|
910
|
-
*/
|
|
911
|
-
middle: boolean;
|
|
912
|
-
/**
|
|
913
|
-
* Whether this day is currently selected.
|
|
914
|
-
*/
|
|
915
|
-
selected: boolean;
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
export type BaseDatePickerSlots = Record<
|
|
919
|
-
string,
|
|
920
|
-
(props: BaseDatePickerDaySlotProps) => any
|
|
921
|
-
>;
|
|
922
|
-
```
|
|
923
|
-
|
|
924
|
-
## Styles
|
|
925
|
-
|
|
926
|
-
```css
|
|
927
|
-
.bb-base-date-picker {
|
|
928
|
-
/* Cell size drives all grid math: 224px ÷ 7 = 32px exactly */
|
|
929
|
-
--cell: 28px;
|
|
930
|
-
--pad-x: 6px;
|
|
931
|
-
--pad-y: 8px;
|
|
932
|
-
--nav-button-h: 24px;
|
|
933
|
-
--weeks: 6;
|
|
934
|
-
/* Allowance for the day slot append area - needed for the slot to be visible */
|
|
935
|
-
--day-slot-allowance: 0px;
|
|
936
|
-
/* Row pitch for the coarse grids (month/year), where a "row" is one of four
|
|
937
|
-
month rows rather than a week. Roomier than --cell because twelve months
|
|
938
|
-
in a 4×3 grid have space the 6×7 day grid does not. */
|
|
939
|
-
--unit-row: calc(var(--cell) * 1.25);
|
|
940
|
-
|
|
941
|
-
background-color: var(--bb-panel);
|
|
942
|
-
border-radius: var(--bb-radius);
|
|
943
|
-
overflow: clip;
|
|
944
|
-
width: calc(var(--cell) * 7 + var(--pad-x) * 2);
|
|
945
|
-
|
|
946
|
-
/* ── Body ── */
|
|
947
|
-
&__body {
|
|
948
|
-
padding: var(--pad-y) var(--pad-x);
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
/* ── Controls: < [Month] [Year] > ── */
|
|
952
|
-
&__controls {
|
|
953
|
-
align-items: center;
|
|
954
|
-
display: flex;
|
|
955
|
-
justify-content: space-between;
|
|
956
|
-
margin-bottom: 6px;
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
&__nav-btn {
|
|
960
|
-
align-items: center;
|
|
961
|
-
border-radius: var(--bb-radius-sm);
|
|
962
|
-
color: var(--bb-text-muted);
|
|
963
|
-
display: flex;
|
|
964
|
-
height: var(--nav-button-h);
|
|
965
|
-
justify-content: center;
|
|
966
|
-
transition:
|
|
967
|
-
background-color var(--bb-transition-fast),
|
|
968
|
-
color var(--bb-transition-fast);
|
|
969
|
-
width: var(--nav-button-h);
|
|
970
|
-
|
|
971
|
-
&:hover:not(:disabled) {
|
|
972
|
-
background-color: color-mix(in oklab, var(--bb-text) 8%, transparent);
|
|
973
|
-
color: var(--bb-text);
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
&:focus-visible {
|
|
977
|
-
box-shadow: 0 0 0 var(--bb-ring-size) var(--bb-ring);
|
|
978
|
-
outline: none;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
&:disabled {
|
|
982
|
-
cursor: not-allowed;
|
|
983
|
-
opacity: 0.25;
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
&__nav-center {
|
|
988
|
-
align-items: center;
|
|
989
|
-
display: flex;
|
|
990
|
-
gap: 2px;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
&__heading-btn {
|
|
994
|
-
border-radius: var(--bb-radius-sm);
|
|
995
|
-
color: var(--bb-text);
|
|
996
|
-
font-size: 14px;
|
|
997
|
-
font-weight: 500;
|
|
998
|
-
line-height: 1;
|
|
999
|
-
padding: 4px 7px;
|
|
1000
|
-
text-transform: capitalize;
|
|
1001
|
-
transition:
|
|
1002
|
-
background-color var(--bb-transition-fast),
|
|
1003
|
-
color var(--bb-transition-fast);
|
|
1004
|
-
|
|
1005
|
-
&:hover:not(:disabled) {
|
|
1006
|
-
background-color: color-mix(in oklab, var(--bb-text) 8%, transparent);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
&:focus-visible {
|
|
1010
|
-
box-shadow: 0 0 0 var(--bb-ring-size) var(--bb-ring);
|
|
1011
|
-
outline: none;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
&:disabled {
|
|
1015
|
-
cursor: not-allowed;
|
|
1016
|
-
opacity: 0.4;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
&--active {
|
|
1020
|
-
background-color: color-mix(in oklab, var(--bb-text) 8%, transparent);
|
|
1021
|
-
color: var(--bb-primary);
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
/* ── Content area (day grid + overlay panels) ── */
|
|
1026
|
-
&__content {
|
|
1027
|
-
overflow-y: clip;
|
|
1028
|
-
position: relative;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/* Terminal month/year modes have no day grid to give the content its
|
|
1032
|
-
height, and the panels are absolute overlays — so state the box here.
|
|
1033
|
-
Keyed off the GRID, never off the panel currently open: over the day grid
|
|
1034
|
-
the year list already scrolls inside a box the calendar owns, and a month
|
|
1035
|
-
picker that grew taller the moment you reached for the year list would be
|
|
1036
|
-
the odd one out (and would have to animate a height nothing else does). */
|
|
1037
|
-
&--unit-month &__content {
|
|
1038
|
-
height: calc(var(--unit-row) * 4);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
&--unit-year &__content {
|
|
1042
|
-
height: calc(var(--unit-row) * 6);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
/* One row pitch for BOTH coarse panels, so the year list opened over a month
|
|
1046
|
-
grid shows four rows exactly where the four month rows were, instead of
|
|
1047
|
-
packing five denser ones into the same box. Scoped to the coarse pickers:
|
|
1048
|
-
over the DAY grid these panels are transient overlays sized by the
|
|
1049
|
-
calendar, and their existing rhythm is not this one's business. */
|
|
1050
|
-
&--unit-month,
|
|
1051
|
-
&--unit-year {
|
|
1052
|
-
.bb-base-date-picker__button-menu .content {
|
|
1053
|
-
align-content: start;
|
|
1054
|
-
grid-auto-rows: var(--unit-row);
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
.bb-base-date-picker__button-menu .content__btn {
|
|
1058
|
-
height: var(--unit-row);
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
/* ── Day grid ── */
|
|
1063
|
-
&__days-selector {
|
|
1064
|
-
height: calc(
|
|
1065
|
-
var(--cell) * (var(--weeks) + 1) + var(--weeks) *
|
|
1066
|
-
var(--day-slot-allowance)
|
|
1067
|
-
);
|
|
1068
|
-
opacity: 1;
|
|
1069
|
-
transition:
|
|
1070
|
-
height var(--bb-transition-medium),
|
|
1071
|
-
opacity var(--bb-transition-medium) 100ms;
|
|
1072
|
-
|
|
1073
|
-
&--hidden {
|
|
1074
|
-
opacity: 0;
|
|
1075
|
-
transition:
|
|
1076
|
-
height var(--bb-transition-medium),
|
|
1077
|
-
opacity var(--bb-transition-medium) 0ms;
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
&__month {
|
|
1082
|
-
display: inline-block;
|
|
1083
|
-
left: 0;
|
|
1084
|
-
position: absolute;
|
|
1085
|
-
top: 0;
|
|
1086
|
-
width: 100%;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
/* ── Weekday header row (M T W …) ── */
|
|
1090
|
-
&__header-container {
|
|
1091
|
-
display: flex;
|
|
1092
|
-
margin-bottom: 2px;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
&__header-cell {
|
|
1096
|
-
align-items: center;
|
|
1097
|
-
color: var(--bb-text-muted);
|
|
1098
|
-
display: flex;
|
|
1099
|
-
/* Zero basis: columns split the row exactly like the day cells below
|
|
1100
|
-
(auto basis let glyph widths skew the columns off the grid). */
|
|
1101
|
-
flex: 1 1 0%;
|
|
1102
|
-
font-size: 12px;
|
|
1103
|
-
font-weight: 600;
|
|
1104
|
-
height: 26px;
|
|
1105
|
-
justify-content: center;
|
|
1106
|
-
letter-spacing: 0.06em;
|
|
1107
|
-
/* Cancels the trailing tracking space so the glyph centers optically. */
|
|
1108
|
-
text-indent: 0.06em;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
/* ── Week row ── */
|
|
1112
|
-
&__week {
|
|
1113
|
-
display: flex;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
/* ── Day cell ── */
|
|
1117
|
-
&__date {
|
|
1118
|
-
align-items: center;
|
|
1119
|
-
/* Adjacent-month days are live controls: keep them muted but above the
|
|
1120
|
-
disabled look (disabled cells add 0.3 opacity on top). */
|
|
1121
|
-
color: var(--bb-text-faint);
|
|
1122
|
-
display: flex;
|
|
1123
|
-
flex: 1 1 0%;
|
|
1124
|
-
flex-direction: column;
|
|
1125
|
-
height: calc(var(--cell) + var(--day-slot-allowance));
|
|
1126
|
-
justify-content: flex-start;
|
|
1127
|
-
position: relative;
|
|
1128
|
-
|
|
1129
|
-
/* Range band — a soft primary wash the same height as the buttons.
|
|
1130
|
-
Endpoints render as solid primary rects (via --selected), so the band
|
|
1131
|
-
only needs to bridge between them: same-radius rects over rects, no
|
|
1132
|
-
cap or crescent workarounds required. */
|
|
1133
|
-
&::before {
|
|
1134
|
-
background-color: transparent;
|
|
1135
|
-
border-radius: 0;
|
|
1136
|
-
content: '';
|
|
1137
|
-
height: calc(var(--cell) - 4px);
|
|
1138
|
-
left: 0;
|
|
1139
|
-
pointer-events: none;
|
|
1140
|
-
position: absolute;
|
|
1141
|
-
right: 0;
|
|
1142
|
-
top: 2px;
|
|
1143
|
-
transition: background-color var(--bb-transition-fast);
|
|
1144
|
-
z-index: 0;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
/* Committed range: middle cells carry the wash band */
|
|
1148
|
-
&--middle::before {
|
|
1149
|
-
background-color: color-mix(in oklab, var(--bb-primary) 15%, transparent);
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
/* Endpoints extend the wash on their inner side only, under the solid cap */
|
|
1153
|
-
&--first:not([class*='--last'])::before {
|
|
1154
|
-
background-color: color-mix(in oklab, var(--bb-primary) 15%, transparent);
|
|
1155
|
-
left: 50%;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
&--last:not([class*='--first'])::before {
|
|
1159
|
-
background-color: color-mix(in oklab, var(--bb-primary) 15%, transparent);
|
|
1160
|
-
right: 50%;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
/* Round the band where it terminates at a row wrap */
|
|
1164
|
-
&--middle:first-child::before {
|
|
1165
|
-
border-radius: var(--bb-radius-sm) 0 0 var(--bb-radius-sm);
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
&--middle:last-child::before {
|
|
1169
|
-
border-radius: 0 var(--bb-radius-sm) var(--bb-radius-sm) 0;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/* Pending-range preview: fainter wash while the user aims for the end
|
|
1173
|
-
date (hover or keyboard cursor). The aimed-at cell gets the far cap. */
|
|
1174
|
-
&--preview::before {
|
|
1175
|
-
background-color: color-mix(in oklab, var(--bb-primary) 8%, transparent);
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
&--preview-end::before {
|
|
1179
|
-
border-radius: 0 var(--bb-radius-sm) var(--bb-radius-sm) 0;
|
|
1180
|
-
right: 2px;
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
&--preview-start::before {
|
|
1184
|
-
border-radius: var(--bb-radius-sm) 0 0 var(--bb-radius-sm);
|
|
1185
|
-
left: 2px;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
/* Current month dates */
|
|
1189
|
-
&--highlighted {
|
|
1190
|
-
color: color-mix(in oklab, var(--bb-text) 75%, transparent);
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
/* Today: an ink dot under the number, so outline geometry stays owned
|
|
1194
|
-
by the focus ring alone. Inherits the button's color, flipping to
|
|
1195
|
-
primary-fg automatically when the day is selected. */
|
|
1196
|
-
&--today .bb-base-date-picker__date-button {
|
|
1197
|
-
color: var(--bb-primary);
|
|
1198
|
-
|
|
1199
|
-
&::after {
|
|
1200
|
-
background-color: currentColor;
|
|
1201
|
-
/* Clamped by the browser to half the bar height: full endcaps. */
|
|
1202
|
-
border-radius: var(--bb-radius-sm);
|
|
1203
|
-
bottom: 2px;
|
|
1204
|
-
content: '';
|
|
1205
|
-
height: 2px;
|
|
1206
|
-
left: 50%;
|
|
1207
|
-
position: absolute;
|
|
1208
|
-
transform: translateX(-50%);
|
|
1209
|
-
width: 12px;
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
/* Keyboard cursor (focused but not selected): same wash as hover */
|
|
1214
|
-
&--current:not([class*='--selected']) .bb-base-date-picker__date-button {
|
|
1215
|
-
background-color: color-mix(in oklab, var(--bb-text) 8%, transparent);
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
/* Selected: solid primary rect — the one selected-mark grammar shared
|
|
1219
|
-
with the month/year panels and the time rail. The hover override
|
|
1220
|
-
below replaces the old !important cluster. */
|
|
1221
|
-
&--selected .bb-base-date-picker__date-button {
|
|
1222
|
-
background-color: var(--bb-primary);
|
|
1223
|
-
color: var(--bb-primary-fg);
|
|
1224
|
-
font-weight: 600;
|
|
1225
|
-
|
|
1226
|
-
&:hover:not(:disabled) {
|
|
1227
|
-
background-color: var(--bb-primary);
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
&:focus-visible {
|
|
1231
|
-
box-shadow:
|
|
1232
|
-
0 0 0 2px var(--bb-panel),
|
|
1233
|
-
0 0 0 calc(2px + var(--bb-ring-size)) var(--bb-ring);
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
/* Disabled */
|
|
1238
|
-
&--disabled {
|
|
1239
|
-
pointer-events: none;
|
|
1240
|
-
|
|
1241
|
-
.bb-base-date-picker__date-button {
|
|
1242
|
-
cursor: not-allowed;
|
|
1243
|
-
opacity: 0.3;
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
/* The clickable day mark */
|
|
1248
|
-
&-button {
|
|
1249
|
-
align-items: center;
|
|
1250
|
-
border-radius: var(--bb-radius-sm);
|
|
1251
|
-
display: inline-flex;
|
|
1252
|
-
font-size: 12px;
|
|
1253
|
-
font-variant-numeric: tabular-nums;
|
|
1254
|
-
height: calc(var(--cell) - 4px);
|
|
1255
|
-
justify-content: center;
|
|
1256
|
-
line-height: 1;
|
|
1257
|
-
margin-top: 2px;
|
|
1258
|
-
outline: none;
|
|
1259
|
-
position: relative;
|
|
1260
|
-
transition:
|
|
1261
|
-
background-color var(--bb-transition-fast),
|
|
1262
|
-
color var(--bb-transition-fast);
|
|
1263
|
-
width: calc(var(--cell) - 4px);
|
|
1264
|
-
z-index: 1;
|
|
1265
|
-
|
|
1266
|
-
&:focus-visible {
|
|
1267
|
-
box-shadow: 0 0 0 var(--bb-ring-size) var(--bb-ring);
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
&:hover:not(:disabled) {
|
|
1271
|
-
background-color: color-mix(in oklab, var(--bb-text) 8%, transparent);
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
/* Append area below the button — height driven by --day-slot-allowance */
|
|
1276
|
-
&-append {
|
|
1277
|
-
display: flex;
|
|
1278
|
-
height: var(--day-slot-allowance);
|
|
1279
|
-
justify-content: center;
|
|
1280
|
-
overflow: hidden;
|
|
1281
|
-
width: 100%;
|
|
1282
|
-
z-index: 1;
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
/* ── Month / Year overlay panels ── */
|
|
1287
|
-
&__button-menu {
|
|
1288
|
-
background-color: var(--bb-panel);
|
|
1289
|
-
height: 100%;
|
|
1290
|
-
left: 0;
|
|
1291
|
-
position: absolute;
|
|
1292
|
-
top: 0;
|
|
1293
|
-
width: 100%;
|
|
1294
|
-
z-index: 2;
|
|
1295
|
-
|
|
1296
|
-
.content {
|
|
1297
|
-
display: grid;
|
|
1298
|
-
gap: 2px;
|
|
1299
|
-
height: 100%;
|
|
1300
|
-
|
|
1301
|
-
/* ARIA rows only (`role="grid"` needs `role="row"` children):
|
|
1302
|
-
no box, so the buttons stay direct grid items of `.content` and
|
|
1303
|
-
the column/nth-child rules below keep working unchanged. */
|
|
1304
|
-
.content__row {
|
|
1305
|
-
display: contents;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
.content__btn {
|
|
1309
|
-
align-items: center;
|
|
1310
|
-
border-radius: var(--bb-radius-sm);
|
|
1311
|
-
color: var(--bb-text-muted);
|
|
1312
|
-
display: flex;
|
|
1313
|
-
font-size: 12px;
|
|
1314
|
-
font-weight: 500;
|
|
1315
|
-
height: var(--cell);
|
|
1316
|
-
justify-content: center;
|
|
1317
|
-
letter-spacing: 0.01em;
|
|
1318
|
-
text-transform: capitalize;
|
|
1319
|
-
transition:
|
|
1320
|
-
background-color var(--bb-transition-fast),
|
|
1321
|
-
color var(--bb-transition-fast);
|
|
1322
|
-
|
|
1323
|
-
&:hover:not(:disabled) {
|
|
1324
|
-
background-color: color-mix(in oklab, var(--bb-text) 8%, transparent);
|
|
1325
|
-
color: var(--bb-text);
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
&:focus-visible {
|
|
1329
|
-
box-shadow: 0 0 0 var(--bb-ring-size) var(--bb-ring);
|
|
1330
|
-
outline: none;
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
&:disabled {
|
|
1334
|
-
cursor: not-allowed;
|
|
1335
|
-
opacity: 0.4;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
&--selected {
|
|
1339
|
-
background-color: var(--bb-primary);
|
|
1340
|
-
color: var(--bb-primary-fg);
|
|
1341
|
-
font-weight: 600;
|
|
1342
|
-
|
|
1343
|
-
&:hover {
|
|
1344
|
-
background-color: var(--bb-primary);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
/* ── Terminal mode (type="month" / type="year") ──
|
|
1351
|
-
The same panel, now the grid itself: cells carry the model's range
|
|
1352
|
-
band instead of merely pointing at the cursor. The band is painted
|
|
1353
|
-
behind the button in the same primary wash the day grid uses, so a
|
|
1354
|
-
month range and a day range read as one language. */
|
|
1355
|
-
&--terminal .content .content__btn {
|
|
1356
|
-
border-radius: var(--bb-radius-sm);
|
|
1357
|
-
position: relative;
|
|
1358
|
-
|
|
1359
|
-
&::before {
|
|
1360
|
-
background-color: transparent;
|
|
1361
|
-
border-radius: 0;
|
|
1362
|
-
content: '';
|
|
1363
|
-
inset: 1px 0;
|
|
1364
|
-
pointer-events: none;
|
|
1365
|
-
position: absolute;
|
|
1366
|
-
transition: background-color var(--bb-transition-fast);
|
|
1367
|
-
z-index: -1;
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
&--middle::before {
|
|
1371
|
-
background-color: color-mix(
|
|
1372
|
-
in oklab,
|
|
1373
|
-
var(--bb-primary) 15%,
|
|
1374
|
-
transparent
|
|
1375
|
-
);
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
/* Endpoints wash only their inner half — the solid cap is the button. */
|
|
1379
|
-
&--first:not([class*='--last'])::before {
|
|
1380
|
-
background-color: color-mix(
|
|
1381
|
-
in oklab,
|
|
1382
|
-
var(--bb-primary) 15%,
|
|
1383
|
-
transparent
|
|
1384
|
-
);
|
|
1385
|
-
left: 50%;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
&--last:not([class*='--first'])::before {
|
|
1389
|
-
background-color: color-mix(
|
|
1390
|
-
in oklab,
|
|
1391
|
-
var(--bb-primary) 15%,
|
|
1392
|
-
transparent
|
|
1393
|
-
);
|
|
1394
|
-
right: 50%;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
/* Row wraps: cap the band where the grid breaks. */
|
|
1398
|
-
&--middle:nth-child(3n + 1)::before {
|
|
1399
|
-
border-radius: var(--bb-radius-sm) 0 0 var(--bb-radius-sm);
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
&--middle:nth-child(3n)::before {
|
|
1403
|
-
border-radius: 0 var(--bb-radius-sm) var(--bb-radius-sm) 0;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
/* Pending range: fainter wash under the cell being aimed at. */
|
|
1407
|
-
&--preview:not([class*='--selected'])::before {
|
|
1408
|
-
background-color: color-mix(
|
|
1409
|
-
in oklab,
|
|
1410
|
-
var(--bb-primary) 8%,
|
|
1411
|
-
transparent
|
|
1412
|
-
);
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
&__month-selector .content {
|
|
1418
|
-
align-content: space-evenly;
|
|
1419
|
-
grid-template-columns: repeat(3, 1fr);
|
|
1420
|
-
row-gap: 0;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
&__year-selector {
|
|
1424
|
-
.content {
|
|
1425
|
-
align-content: start;
|
|
1426
|
-
grid-template-columns: repeat(3, 1fr);
|
|
1427
|
-
/* 7 rows × --cell = 196px fills overlay exactly; odd count aligns centering */
|
|
1428
|
-
height: 100%;
|
|
1429
|
-
overflow-y: auto;
|
|
1430
|
-
row-gap: 0;
|
|
1431
|
-
scroll-snap-type: y mandatory;
|
|
1432
|
-
/* No scrollbar. A gutter on one side pushes the three columns off the
|
|
1433
|
-
panel's centre line, which reads as a misaligned grid rather than as
|
|
1434
|
-
a scroll affordance — and the list is scrolled by wheel, drag and
|
|
1435
|
-
the keyboard, none of which need the track. */
|
|
1436
|
-
scrollbar-width: none;
|
|
1437
|
-
|
|
1438
|
-
&::-webkit-scrollbar {
|
|
1439
|
-
display: none;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
.content__btn {
|
|
1443
|
-
scroll-snap-align: start;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
```
|