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,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CommonField — Implementation Source
|
|
2
2
|
|
|
3
|
-
> Full implementation for deep dives. For everyday usage read the typed contract: [../
|
|
3
|
+
> Full implementation for deep dives. For everyday usage read the typed contract: [../CommonField.md](../CommonField.md).
|
|
4
4
|
>
|
|
5
5
|
> Safety level: **Reference Only - Internal** — do not use in consumer-facing code unless explicitly requested.
|
|
6
6
|
|
|
@@ -9,44 +9,57 @@
|
|
|
9
9
|
```vue
|
|
10
10
|
<template>
|
|
11
11
|
<div
|
|
12
|
-
class="bb-
|
|
12
|
+
class="bb-field"
|
|
13
13
|
:class="{
|
|
14
|
-
'bb-
|
|
15
|
-
'bb-
|
|
16
|
-
'bb-
|
|
17
|
-
'bb-
|
|
18
|
-
'bb-
|
|
19
|
-
'bb-
|
|
20
|
-
'bb-
|
|
21
|
-
'bb-
|
|
22
|
-
'bb-
|
|
23
|
-
'bb-
|
|
24
|
-
'bb-
|
|
25
|
-
'bb-
|
|
26
|
-
'bb-
|
|
14
|
+
'bb-field--clearable': props.clearable,
|
|
15
|
+
'bb-field--description': hasDescription(),
|
|
16
|
+
'bb-field--disabled': props.disabled,
|
|
17
|
+
'bb-field--errors': hasErrors,
|
|
18
|
+
'bb-field--warnings': showWarning,
|
|
19
|
+
'bb-field--has-value': props.hasValue,
|
|
20
|
+
'bb-field--hint': showHint,
|
|
21
|
+
'bb-field--loading': props.loading,
|
|
22
|
+
'bb-field--mobile': props.mobile,
|
|
23
|
+
'bb-field--compact': props.compact,
|
|
24
|
+
'bb-field--floating-label': props.labelMode === 'floating',
|
|
25
|
+
'bb-field--inside-label': props.labelMode === 'inside',
|
|
26
|
+
'bb-field--readonly': props.readonly,
|
|
27
27
|
}"
|
|
28
|
+
v-bind="passthrough?.root"
|
|
28
29
|
>
|
|
29
|
-
<component :is="tag" v-bind="containerAttributes">
|
|
30
|
+
<component :is="tag" v-bind="containerAttributes()">
|
|
30
31
|
<component :is="labelTag" v-bind="labelAttributes">
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<span :id="labelTextId" class="bb-field__label-text"
|
|
33
|
+
><slot
|
|
34
|
+
name="label"
|
|
35
|
+
v-bind="{
|
|
36
|
+
text: label,
|
|
37
|
+
hasErrors,
|
|
38
|
+
hasWarnings: showWarning,
|
|
39
|
+
showAsterisk: showAsterisk || undefined,
|
|
40
|
+
}"
|
|
41
|
+
>{{ label }}<BbAsterisk v-if="showAsterisk" /></slot
|
|
42
|
+
></span>
|
|
36
43
|
<span
|
|
37
|
-
v-if="
|
|
44
|
+
v-if="hasDescription() && !overlayLabelMode"
|
|
38
45
|
:id="descriptionId"
|
|
39
|
-
class="bb-
|
|
40
|
-
|
|
46
|
+
class="bb-field__description"
|
|
47
|
+
v-bind="passthrough?.description"
|
|
48
|
+
><slot name="description" v-bind="descriptionSlotProps">{{
|
|
49
|
+
description
|
|
50
|
+
}}</slot></span
|
|
41
51
|
>
|
|
42
52
|
</component>
|
|
43
53
|
<!-- In floating/inside modes the label is an absolutely positioned chip,
|
|
44
54
|
so the description renders as a layout sibling instead of inside it. -->
|
|
45
55
|
<span
|
|
46
|
-
v-if="
|
|
56
|
+
v-if="hasDescription() && overlayLabelMode"
|
|
47
57
|
:id="descriptionId"
|
|
48
|
-
class="bb-
|
|
49
|
-
|
|
58
|
+
class="bb-field__description"
|
|
59
|
+
v-bind="passthrough?.description"
|
|
60
|
+
><slot name="description" v-bind="descriptionSlotProps">{{
|
|
61
|
+
description
|
|
62
|
+
}}</slot></span
|
|
50
63
|
>
|
|
51
64
|
<span v-bind="inputAttributes">
|
|
52
65
|
<slot
|
|
@@ -55,42 +68,45 @@
|
|
|
55
68
|
id,
|
|
56
69
|
name,
|
|
57
70
|
hasErrors,
|
|
58
|
-
|
|
59
|
-
ariaDescribedby,
|
|
71
|
+
hasWarnings: showWarning,
|
|
72
|
+
ariaDescribedby: ariaDescribedby(),
|
|
73
|
+
ariaLabelledby: ariaLabelledby(),
|
|
60
74
|
}"
|
|
61
75
|
></slot>
|
|
62
76
|
</span>
|
|
63
77
|
</component>
|
|
64
78
|
<Transition name="hint">
|
|
65
|
-
<span
|
|
66
|
-
v-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
>
|
|
70
|
-
<span class="bb-base-input-container__hint-text">{{ hint }}</span>
|
|
79
|
+
<span v-show="showHint" :id="hintId" class="bb-field__hint-wrap">
|
|
80
|
+
<span class="bb-field__hint" v-bind="passthrough?.hint">{{
|
|
81
|
+
hint
|
|
82
|
+
}}</span>
|
|
71
83
|
</span>
|
|
72
84
|
</Transition>
|
|
73
85
|
<Transition name="errors">
|
|
74
|
-
<!-- Always mounted by design
|
|
75
|
-
|
|
86
|
+
<!-- Always mounted by design (the live region must exist before its
|
|
87
|
+
text): the wrap opens with a grid-row transition sized by its
|
|
88
|
+
content, so a `pt:message` font size, a narrower field or a late
|
|
89
|
+
font can never clip a message. -->
|
|
76
90
|
<!-- eslint-disable-next-line vue/require-toggle-inside-transition -->
|
|
77
91
|
<div
|
|
78
|
-
ref="errorsWrap"
|
|
79
92
|
aria-live="polite"
|
|
80
|
-
class="bb-
|
|
93
|
+
class="bb-field__errors-wrap"
|
|
94
|
+
:class="{
|
|
95
|
+
'bb-field__errors-wrap--open': computedErrors.length > 0,
|
|
96
|
+
}"
|
|
81
97
|
>
|
|
82
98
|
<!-- The id lives on the CONTENT node, never on the `-wrap`: the wrap is a
|
|
83
99
|
`height: 0; overflow: hidden` animation shell, so describing it would
|
|
84
100
|
point assistive tech at the animation rather than at the copy. -->
|
|
85
101
|
<div
|
|
86
102
|
:id="errorsId"
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
class="bb-field__message bb-field__errors"
|
|
104
|
+
v-bind="showWarning ? undefined : passthrough?.message"
|
|
89
105
|
>
|
|
90
106
|
<span
|
|
91
107
|
v-for="error in computedErrors"
|
|
92
108
|
:key="error"
|
|
93
|
-
class="bb-
|
|
109
|
+
class="bb-field__error"
|
|
94
110
|
>{{ error }}</span
|
|
95
111
|
>
|
|
96
112
|
</div>
|
|
@@ -101,20 +117,22 @@
|
|
|
101
117
|
and collapses to zero height while the error state wins. -->
|
|
102
118
|
<!-- eslint-disable-next-line vue/require-toggle-inside-transition -->
|
|
103
119
|
<div
|
|
104
|
-
ref="warningsWrap"
|
|
105
120
|
aria-live="polite"
|
|
106
|
-
class="bb-
|
|
121
|
+
class="bb-field__warnings-wrap"
|
|
122
|
+
:class="{
|
|
123
|
+
'bb-field__warnings-wrap--open': displayedWarnings.length > 0,
|
|
124
|
+
}"
|
|
107
125
|
>
|
|
108
126
|
<!-- Same rule as the error channel: id on the content node, not the shell. -->
|
|
109
127
|
<div
|
|
110
128
|
:id="warningsId"
|
|
111
|
-
|
|
112
|
-
|
|
129
|
+
class="bb-field__message bb-field__warnings"
|
|
130
|
+
v-bind="showWarning ? passthrough?.message : undefined"
|
|
113
131
|
>
|
|
114
132
|
<span
|
|
115
133
|
v-for="warning in displayedWarnings"
|
|
116
134
|
:key="warning"
|
|
117
|
-
class="bb-
|
|
135
|
+
class="bb-field__warning"
|
|
118
136
|
>{{ warning }}</span
|
|
119
137
|
>
|
|
120
138
|
</div>
|
|
@@ -124,30 +142,35 @@
|
|
|
124
142
|
</template>
|
|
125
143
|
|
|
126
144
|
<script setup lang="ts">
|
|
127
|
-
import { computed,
|
|
145
|
+
import { computed, mergeProps } from 'vue';
|
|
128
146
|
import { deburr } from '@/utilities/functions/deburr';
|
|
129
147
|
import { getAsPercentage } from '@/utilities/functions/percentage';
|
|
130
148
|
import { noop } from '@/utilities/functions/noop';
|
|
131
149
|
import { useId } from '@/composables/useId';
|
|
132
150
|
import { useLogger } from '@/composables/useLogger';
|
|
133
|
-
import
|
|
151
|
+
import BbAsterisk from '../BbAsterisk/BbAsterisk.vue';
|
|
152
|
+
import type { CommonFieldProps, CommonFieldSlots } from './types';
|
|
134
153
|
|
|
135
|
-
const props = withDefaults(defineProps<
|
|
136
|
-
|
|
154
|
+
const props = withDefaults(defineProps<CommonFieldProps>(), {
|
|
155
|
+
layout: 'vertical',
|
|
137
156
|
// inputPosition is intentionally NOT defaulted here — see resolvedInputPosition:
|
|
138
|
-
// inputs align left by default and right only when the
|
|
157
|
+
// inputs align left by default and right only when the layout is a split.
|
|
139
158
|
labelPosition: 'left',
|
|
140
159
|
labelTag: 'label',
|
|
141
160
|
reverse: false,
|
|
142
161
|
tag: 'span',
|
|
143
162
|
});
|
|
144
163
|
|
|
145
|
-
defineSlots<
|
|
164
|
+
const slots = defineSlots<CommonFieldSlots>();
|
|
146
165
|
|
|
147
166
|
const logger = useLogger();
|
|
148
167
|
|
|
149
|
-
// Always provide an id so that inputs can be focussed by clicking
|
|
150
|
-
|
|
168
|
+
// Always provide an id so that inputs can be focussed by clicking on the label.
|
|
169
|
+
// `useId()` is called unconditionally: a conditional call would shift every
|
|
170
|
+
// later auto id whenever the mix of explicit and generated ids differs between
|
|
171
|
+
// the server and the client (plans/FLATTEN.md, standing rule).
|
|
172
|
+
const generatedId = useId().id.value;
|
|
173
|
+
const id = props.id || generatedId;
|
|
151
174
|
|
|
152
175
|
/**
|
|
153
176
|
* Hint management
|
|
@@ -159,10 +182,16 @@ const showHint = computed(() => props.showHint && !!props.hint);
|
|
|
159
182
|
* Description management. The description renders below the label (above the
|
|
160
183
|
* field), is always visible (unlike the hint) and is announced together with
|
|
161
184
|
* the hint via aria-describedby.
|
|
185
|
+
*
|
|
186
|
+
* The `description` prop OR the `#description` slot renders it. A function, not
|
|
187
|
+
* a computed, because it reads a slot: `$slots` is not reactive, so a computed
|
|
188
|
+
* would latch its first value and miss a `#description` a wrapper forwards
|
|
189
|
+
* later (they forward it behind `v-if="$slots.description"`). Evaluated per
|
|
190
|
+
* render it tracks correctly — the same rule as BbDialog's `hasDescription`.
|
|
191
|
+
* Everything derived from it below is a function for the same reason.
|
|
162
192
|
*/
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
);
|
|
193
|
+
const hasDescription = () => !!props.description || !!slots.description;
|
|
194
|
+
const descriptionId = `description_${id}`;
|
|
166
195
|
/**
|
|
167
196
|
* Message-channel ids. These sit on the inner CONTENT nodes
|
|
168
197
|
* (`__errors` / `__warnings`), not on the `-wrap` animation shells, so that
|
|
@@ -171,27 +200,67 @@ const descriptionId = computed(() =>
|
|
|
171
200
|
const errorsId = `errors_${id}`;
|
|
172
201
|
const warningsId = `warnings_${id}`;
|
|
173
202
|
|
|
203
|
+
/**
|
|
204
|
+
* The label TEXT, not the label element. `${id}__label` sits on the inner span
|
|
205
|
+
* that wraps the label slot, so everything that names a control by it
|
|
206
|
+
* (BbSelect's activator, the radiogroup / rating role, the slider thumbs)
|
|
207
|
+
* gets the label alone.
|
|
208
|
+
*
|
|
209
|
+
* It used to sit on the `<label>` / `<legend>` itself, which also contains the
|
|
210
|
+
* description span, so every one of those names read "Label Description" —
|
|
211
|
+
* and then the description a second time through `aria-describedby`.
|
|
212
|
+
*/
|
|
213
|
+
const labelTextId = `${id}__label`;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Override for the name the control would otherwise take from its `<label>` or
|
|
217
|
+
* `<legend>` — needed ONLY while a description renders inside that element,
|
|
218
|
+
* because native label naming takes all of its text. With no description the
|
|
219
|
+
* native association already yields the label alone, and staying off
|
|
220
|
+
* `aria-labelledby` keeps a consumer's own `aria-label` in charge.
|
|
221
|
+
*/
|
|
222
|
+
const ariaLabelledby = () => (hasDescription() ? labelTextId : undefined);
|
|
223
|
+
|
|
174
224
|
/** Label modes where the label overlays the field instead of sitting above it. */
|
|
175
225
|
const overlayLabelMode = computed(
|
|
176
226
|
() => props.labelMode === 'floating' || props.labelMode === 'inside'
|
|
177
227
|
);
|
|
178
228
|
// Floating/inside labels are embedded in the field, so those modes force a
|
|
179
|
-
// vertical layout. An 'outside' (or unset) label honors `
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
229
|
+
// vertical layout. An 'outside' (or unset) label honors `layout`.
|
|
230
|
+
const resolvedLayout = computed<NonNullable<CommonFieldProps['layout']>>(() =>
|
|
231
|
+
overlayLabelMode.value ? 'vertical' : props.layout
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
const LAYOUT_KEYWORDS = [
|
|
235
|
+
'auto',
|
|
236
|
+
'horizontal',
|
|
237
|
+
'vertical',
|
|
238
|
+
'label-fill',
|
|
239
|
+
'input-fill',
|
|
240
|
+
] as const;
|
|
241
|
+
const isRatioPattern = (layout: string) => /^[\S]+\s[\S]+$/.test(layout);
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The keyword the layout resolves to — a ratio pattern is `'ratio'`, and an
|
|
245
|
+
* unrecognized value is `'auto'` (the `widths` fallback, which also warns).
|
|
246
|
+
* Drives the `bb-field__layout--<keyword>` modifier.
|
|
247
|
+
*/
|
|
248
|
+
const layoutKeyword = computed(() => {
|
|
249
|
+
const layout = resolvedLayout.value;
|
|
250
|
+
if ((LAYOUT_KEYWORDS as readonly string[]).includes(layout)) return layout;
|
|
251
|
+
return isRatioPattern(layout) ? 'ratio' : 'auto';
|
|
189
252
|
});
|
|
253
|
+
|
|
254
|
+
// A split (either the `horizontal` keyword or a two-token ratio like `"x xx"`)
|
|
255
|
+
// gives the label and the input a column each.
|
|
256
|
+
const isSplitLayout = computed(
|
|
257
|
+
() => layoutKeyword.value === 'horizontal' || layoutKeyword.value === 'ratio'
|
|
258
|
+
);
|
|
190
259
|
// Inputs align LEFT by default; in a horizontal layout they align RIGHT (next to
|
|
191
260
|
// the left-hand label). An explicit `inputPosition` always wins. Control-first
|
|
192
261
|
// widgets (checkbox/radio/switch/rating) pass `inputPosition: 'left'` to stay left.
|
|
193
262
|
const resolvedInputPosition = computed(
|
|
194
|
-
() => props.inputPosition ?? (
|
|
263
|
+
() => props.inputPosition ?? (isSplitLayout.value ? 'right' : 'left')
|
|
195
264
|
);
|
|
196
265
|
|
|
197
266
|
// If no name is passed use a normalized version of the label
|
|
@@ -202,43 +271,54 @@ const name = computed(() => {
|
|
|
202
271
|
return nospace.toLowerCase();
|
|
203
272
|
});
|
|
204
273
|
|
|
205
|
-
const containerAttributes =
|
|
274
|
+
const containerAttributes = () => {
|
|
206
275
|
const initial: Record<string, any> = {
|
|
207
276
|
class: {
|
|
208
|
-
'bb-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
'bb-
|
|
212
|
-
|
|
213
|
-
|
|
277
|
+
'bb-field__layout': true,
|
|
278
|
+
// The axis: every layout but `vertical` sits side by side.
|
|
279
|
+
'bb-field__layout--horizontal': layoutKeyword.value !== 'vertical',
|
|
280
|
+
'bb-field__layout--vertical': layoutKeyword.value === 'vertical',
|
|
281
|
+
// The keyword itself (for `horizontal` / `vertical` the same key as
|
|
282
|
+
// the axis, so it only ever sets it true).
|
|
283
|
+
[`bb-field__layout--${layoutKeyword.value}`]: true,
|
|
284
|
+
'bb-field__layout--reverse': props.reverse,
|
|
214
285
|
},
|
|
215
286
|
};
|
|
216
287
|
if (props.tag === 'label') initial.for = id;
|
|
288
|
+
// A fieldset is named by its legend, description included — same override.
|
|
289
|
+
const labelledby = ariaLabelledby();
|
|
290
|
+
if (props.tag === 'fieldset' && labelledby)
|
|
291
|
+
initial['aria-labelledby'] = labelledby;
|
|
217
292
|
return initial;
|
|
218
|
-
}
|
|
293
|
+
};
|
|
219
294
|
|
|
220
295
|
const labelAttributes = computed(() => {
|
|
221
296
|
const initial: Record<string, any> = {
|
|
222
297
|
class: {
|
|
223
|
-
'bb-
|
|
224
|
-
'
|
|
225
|
-
|
|
226
|
-
|
|
298
|
+
'bb-field__label': true,
|
|
299
|
+
// An option group's heading is its `legend` part (Q48.1: the class
|
|
300
|
+
// names the part).
|
|
301
|
+
'bb-field__legend': props.labelTag === 'legend',
|
|
302
|
+
'bb-field__label--hidden': props.hideLabel,
|
|
303
|
+
[`bb-field__label--${props.labelPosition}`]: props.labelPosition,
|
|
227
304
|
},
|
|
228
|
-
id: `${id}__label`,
|
|
229
305
|
style: {
|
|
230
306
|
width: widths.value.label,
|
|
231
307
|
},
|
|
232
308
|
};
|
|
233
309
|
if (props.labelTag === 'label') initial.for = id;
|
|
234
|
-
|
|
310
|
+
// `pt:label` last: the element already carries one `v-bind`, so the merge
|
|
311
|
+
// happens here rather than as a second directive.
|
|
312
|
+
return props.passthrough?.label
|
|
313
|
+
? mergeProps(initial, props.passthrough.label)
|
|
314
|
+
: initial;
|
|
235
315
|
});
|
|
236
316
|
|
|
237
317
|
const inputAttributes = computed(() => {
|
|
238
318
|
const initial: Record<string, any> = {
|
|
239
319
|
class: {
|
|
240
|
-
'bb-
|
|
241
|
-
[`bb-
|
|
320
|
+
'bb-field__input-wrapper': true,
|
|
321
|
+
[`bb-field__input-wrapper--${resolvedInputPosition.value}`]: true,
|
|
242
322
|
},
|
|
243
323
|
style: {
|
|
244
324
|
width: widths.value.input,
|
|
@@ -252,14 +332,17 @@ const widths = computed(() => {
|
|
|
252
332
|
label: 'auto',
|
|
253
333
|
input: 'auto',
|
|
254
334
|
};
|
|
255
|
-
|
|
335
|
+
const layout = resolvedLayout.value;
|
|
336
|
+
if (layout === 'auto' || layout === 'label-fill' || layout === 'input-fill') {
|
|
337
|
+
// Natural sizes; the `--label-fill` / `--input-fill` modifiers hand the
|
|
338
|
+
// free space to one side in CSS.
|
|
256
339
|
noop();
|
|
257
|
-
} else if (
|
|
340
|
+
} else if (layout === 'vertical') {
|
|
258
341
|
initial.label = initial.input = 100 + '%';
|
|
259
|
-
} else if (
|
|
342
|
+
} else if (layout === 'horizontal') {
|
|
260
343
|
initial.label = initial.input = 50 + '%';
|
|
261
|
-
} else if (
|
|
262
|
-
const [firstLength, secondLength] =
|
|
344
|
+
} else if (isRatioPattern(layout)) {
|
|
345
|
+
const [firstLength, secondLength] = layout
|
|
263
346
|
.split(/\s+/)
|
|
264
347
|
.map((string) => string.length);
|
|
265
348
|
const first =
|
|
@@ -274,8 +357,11 @@ const widths = computed(() => {
|
|
|
274
357
|
initial.input = second;
|
|
275
358
|
}
|
|
276
359
|
} else {
|
|
360
|
+
// The ratio is CHARACTER COUNT, not numeric value: 'x xx' is 1:2. This
|
|
361
|
+
// message used to name '1 2', which is two one-character tokens — a
|
|
362
|
+
// 50/50 split, and precisely the mistake the warning exists to prevent.
|
|
277
363
|
logger.warn(
|
|
278
|
-
`Invalid
|
|
364
|
+
`Invalid layout: "${layout}". Expected 'auto', 'vertical', 'horizontal', 'label-fill', 'input-fill', or a two-token pattern whose TOKEN LENGTHS are the ratio, like 'x xx' for 1:2. Falling back to 'auto'.`
|
|
279
365
|
);
|
|
280
366
|
// `initial` is already the auto shape (label/input: 'auto'), so falling
|
|
281
367
|
// through here leaves the layout at the safe default.
|
|
@@ -299,7 +385,7 @@ const computedWarnings = computed(() => {
|
|
|
299
385
|
*/
|
|
300
386
|
const showWarning = computed(
|
|
301
387
|
() =>
|
|
302
|
-
(Boolean(props.
|
|
388
|
+
(Boolean(props.hasWarnings) || Boolean(computedWarnings.value.length)) &&
|
|
303
389
|
!hasErrors.value
|
|
304
390
|
);
|
|
305
391
|
/** Warning messages are suppressed while the field shows the error state. */
|
|
@@ -322,7 +408,7 @@ const displayedWarnings = computed(() =>
|
|
|
322
408
|
*
|
|
323
409
|
* A channel is referenced ONLY while it actually has copy:
|
|
324
410
|
* - errors/warnings: gated on a non-empty message list. `hasErrors` /
|
|
325
|
-
* `
|
|
411
|
+
* `hasWarnings` alone force the *chrome* without producing text, so referencing
|
|
326
412
|
* the (empty) node would describe the control with nothing.
|
|
327
413
|
* - hint: gated on `showHint` — the hint is `v-show`'d (`display: none` when
|
|
328
414
|
* hidden), so describing it while hidden would point at an
|
|
@@ -334,52 +420,22 @@ const displayedWarnings = computed(() =>
|
|
|
334
420
|
* focus) and live (read on mutation) are separate channels and carrying both is
|
|
335
421
|
* the standard pattern, not a duplicate.
|
|
336
422
|
*/
|
|
337
|
-
const ariaDescribedby =
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
const errorsContent = ref<HTMLElement | null>(null);
|
|
354
|
-
const warningsWrap = ref<HTMLElement | null>(null);
|
|
355
|
-
const warningsContent = ref<HTMLElement | null>(null);
|
|
356
|
-
|
|
357
|
-
// Re-measure when the message list changes; immediate + post flush matches the
|
|
358
|
-
// previous watchPostEffect timing.
|
|
359
|
-
// Deref INSIDE nextTick: on the immediate run the template refs are still null
|
|
360
|
-
// (component not mounted yet), so we must read them after the DOM flush.
|
|
361
|
-
const animateHeight = (
|
|
362
|
-
containerRef: Ref<HTMLElement | null>,
|
|
363
|
-
contentRef: Ref<HTMLElement | null>
|
|
364
|
-
) => {
|
|
365
|
-
nextTick(() => {
|
|
366
|
-
const container = containerRef.value;
|
|
367
|
-
const content = contentRef.value;
|
|
368
|
-
if (container && content) {
|
|
369
|
-
const min = Math.min(content.clientHeight, content.scrollHeight);
|
|
370
|
-
container.style.height = `${min}px`;
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
watch(computedErrors, () => animateHeight(errorsWrap, errorsContent), {
|
|
376
|
-
immediate: true,
|
|
377
|
-
flush: 'post',
|
|
378
|
-
});
|
|
379
|
-
watch(displayedWarnings, () => animateHeight(warningsWrap, warningsContent), {
|
|
380
|
-
immediate: true,
|
|
381
|
-
flush: 'post',
|
|
382
|
-
});
|
|
423
|
+
const ariaDescribedby = () =>
|
|
424
|
+
[
|
|
425
|
+
computedErrors.value.length ? errorsId : undefined,
|
|
426
|
+
displayedWarnings.value.length ? warningsId : undefined,
|
|
427
|
+
hasDescription() ? descriptionId : undefined,
|
|
428
|
+
showHint.value ? hintId.value : undefined,
|
|
429
|
+
]
|
|
430
|
+
.filter(Boolean)
|
|
431
|
+
.join(' ') || undefined;
|
|
432
|
+
|
|
433
|
+
/** Same shape as the `label` slot: the prop text plus the state flags. */
|
|
434
|
+
const descriptionSlotProps = computed(() => ({
|
|
435
|
+
text: props.description ?? '',
|
|
436
|
+
hasErrors: hasErrors.value,
|
|
437
|
+
hasWarnings: showWarning.value,
|
|
438
|
+
}));
|
|
383
439
|
</script>
|
|
384
440
|
|
|
385
441
|
<style lang="postcss">
|
|
@@ -391,13 +447,14 @@ watch(displayedWarnings, () => animateHeight(warningsWrap, warningsContent), {
|
|
|
391
447
|
|
|
392
448
|
```ts
|
|
393
449
|
import type { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
394
|
-
import type {
|
|
450
|
+
import type { FieldLayout } from '@/types/FieldLayout';
|
|
395
451
|
import type { ContainerTag, LabelTag } from '@/types/CommonProps';
|
|
452
|
+
import type { FieldPtPart, PtBindings } from '@/types/passthrough';
|
|
396
453
|
|
|
397
454
|
/**
|
|
398
455
|
* Wrapper responsible for aligning labels, inputs, hints, and error messages consistently across form controls.
|
|
399
456
|
*/
|
|
400
|
-
export type
|
|
457
|
+
export type CommonFieldProps = {
|
|
401
458
|
/**
|
|
402
459
|
* Whether the inner control exposes a clear action.
|
|
403
460
|
*/
|
|
@@ -424,12 +481,13 @@ export type BaseInputContainerProps = {
|
|
|
424
481
|
|
|
425
482
|
/**
|
|
426
483
|
* Controls label/input layout.
|
|
427
|
-
* Accepts `'vertical'`, `'horizontal'`, `'auto'`,
|
|
428
|
-
* such as `"xx xxxxx"` that sizes the
|
|
484
|
+
* Accepts `'vertical'`, `'horizontal'`, `'auto'`, `'label-fill'`, `'input-fill'`,
|
|
485
|
+
* or a two-token ratio pattern such as `"xx xxxxx"` that sizes the
|
|
486
|
+
* label/input columns by token length.
|
|
429
487
|
* An unrecognized value warns and falls back to `'auto'`.
|
|
430
488
|
* @defaultValue `'vertical'`
|
|
431
489
|
*/
|
|
432
|
-
|
|
490
|
+
layout?: FieldLayout;
|
|
433
491
|
|
|
434
492
|
/**
|
|
435
493
|
* Messages displayed beneath the input. Accepts a string or array; values are rendered one per line.
|
|
@@ -459,13 +517,22 @@ export type BaseInputContainerProps = {
|
|
|
459
517
|
* Forces the warning state independently of `warnings`. Same chrome as
|
|
460
518
|
* errors but with `--bb-warn`; errors take priority when both are set.
|
|
461
519
|
*/
|
|
462
|
-
|
|
520
|
+
hasWarnings?: boolean;
|
|
463
521
|
|
|
464
522
|
/**
|
|
465
523
|
* Hide the visual label while keeping it available to assistive technology.
|
|
466
524
|
*/
|
|
467
525
|
hideLabel?: boolean;
|
|
468
526
|
|
|
527
|
+
/**
|
|
528
|
+
* Passthrough bindings resolved by the public control (`usePassthrough`),
|
|
529
|
+
* one `v-bind` object per part this container renders: `root`, `label`,
|
|
530
|
+
* `description`, `message` (the errors AND the warnings node — only one
|
|
531
|
+
* ever shows). Bound last on each node. Internal: the public control's
|
|
532
|
+
* `pt:*` props are the consumer-facing surface.
|
|
533
|
+
*/
|
|
534
|
+
passthrough?: PtBindings<FieldPtPart>;
|
|
535
|
+
|
|
469
536
|
/**
|
|
470
537
|
* Hint text rendered below the input. While shown, its id is exposed to the input slot via
|
|
471
538
|
* `ariaDescribedby` — last in the list, after any error/warning ids and the description id.
|
|
@@ -478,9 +545,9 @@ export type BaseInputContainerProps = {
|
|
|
478
545
|
id?: HTMLAttributes['id'];
|
|
479
546
|
|
|
480
547
|
/**
|
|
481
|
-
* Horizontal alignment of the input column when
|
|
548
|
+
* Horizontal alignment of the input column when the layout is side by side.
|
|
482
549
|
* Unset, it follows the layout: `'right'` in a horizontal/ratio split (beside
|
|
483
|
-
* the left-hand label), `'left'` otherwise — and `
|
|
550
|
+
* the left-hand label), `'left'` otherwise — and `layout` is `'vertical'`
|
|
484
551
|
* by default, so the effective default is `'left'`.
|
|
485
552
|
* @defaultValue `'left'`
|
|
486
553
|
*/
|
|
@@ -546,6 +613,13 @@ export type BaseInputContainerProps = {
|
|
|
546
613
|
*/
|
|
547
614
|
showHint?: boolean;
|
|
548
615
|
|
|
616
|
+
/**
|
|
617
|
+
* Render the required marker (`BbAsterisk`) after the label text. The
|
|
618
|
+
* control decides (useFormBinding); a `#label` slot gets it as
|
|
619
|
+
* `showAsterisk` and renders its own.
|
|
620
|
+
*/
|
|
621
|
+
showAsterisk?: boolean;
|
|
622
|
+
|
|
549
623
|
/**
|
|
550
624
|
* Element used for the inner wrapper: `span` (default) to remain inline,
|
|
551
625
|
* `div` for a block wrapper, `fieldset` for grouped controls (pair it with
|
|
@@ -559,7 +633,7 @@ export type BaseInputContainerProps = {
|
|
|
559
633
|
/**
|
|
560
634
|
* Props exposed by the `input` slot.
|
|
561
635
|
*/
|
|
562
|
-
export type
|
|
636
|
+
export type CommonFieldInputSlotProps = {
|
|
563
637
|
/**
|
|
564
638
|
* The resolved `id` for the input element; matches the `for` attribute on the label.
|
|
565
639
|
*/
|
|
@@ -574,9 +648,9 @@ export type BaseInputContainerInputSlotProps = {
|
|
|
574
648
|
hasErrors: boolean;
|
|
575
649
|
/**
|
|
576
650
|
* Whether the container is in a warning state (from `warnings` or
|
|
577
|
-
* `
|
|
651
|
+
* `hasWarnings`, suppressed when `hasErrors` is true).
|
|
578
652
|
*/
|
|
579
|
-
|
|
653
|
+
hasWarnings: boolean;
|
|
580
654
|
/**
|
|
581
655
|
* Space-separated ids of every message node that currently has copy, in
|
|
582
656
|
* spoken order: errors, warnings, description, hint. Pass as
|
|
@@ -585,12 +659,20 @@ export type BaseInputContainerInputSlotProps = {
|
|
|
585
659
|
* yields `undefined`.
|
|
586
660
|
*/
|
|
587
661
|
ariaDescribedby: string | undefined;
|
|
662
|
+
/**
|
|
663
|
+
* Id of the label text (`${id}__label`), set only while a description is
|
|
664
|
+
* rendered. Pass as `aria-labelledby` to the inner input: the description sits
|
|
665
|
+
* inside the label element, so the name the input would take from that element
|
|
666
|
+
* reads "Label Description". `undefined` otherwise, so the native label (or a
|
|
667
|
+
* consumer `aria-label`) names the control as before.
|
|
668
|
+
*/
|
|
669
|
+
ariaLabelledby: string | undefined;
|
|
588
670
|
};
|
|
589
671
|
|
|
590
672
|
/**
|
|
591
673
|
* Props exposed by the `label` slot.
|
|
592
674
|
*/
|
|
593
|
-
export type
|
|
675
|
+
export type CommonFieldLabelSlotProps = {
|
|
594
676
|
/**
|
|
595
677
|
* The `label` prop value.
|
|
596
678
|
*/
|
|
@@ -602,28 +684,40 @@ export type BaseInputContainerLabelSlotProps = {
|
|
|
602
684
|
/**
|
|
603
685
|
* Whether the container is in a warning state (suppressed when errors win).
|
|
604
686
|
*/
|
|
605
|
-
|
|
687
|
+
hasWarnings: boolean;
|
|
688
|
+
/**
|
|
689
|
+
* `true` when the field shows the required marker (else absent): a
|
|
690
|
+
* `#label` slot that replaces the text renders its own
|
|
691
|
+
* (`<BbAsterisk v-if="showAsterisk" />`).
|
|
692
|
+
*/
|
|
693
|
+
showAsterisk?: boolean;
|
|
606
694
|
};
|
|
607
695
|
|
|
608
|
-
export type
|
|
696
|
+
export type CommonFieldSlots = {
|
|
609
697
|
/**
|
|
610
698
|
* The form control to render, positioned in the input column. Receives pre-computed
|
|
611
699
|
* wiring attributes so the inner input can be correctly associated with the label and hint.
|
|
612
700
|
*/
|
|
613
|
-
input?: (props:
|
|
701
|
+
input?: (props: CommonFieldInputSlotProps) => any;
|
|
614
702
|
/**
|
|
615
703
|
* Replaces the default label text. The outer label element and its `for` association are always rendered.
|
|
616
704
|
*/
|
|
617
|
-
label?: (props:
|
|
705
|
+
label?: (props: CommonFieldLabelSlotProps) => any;
|
|
706
|
+
/**
|
|
707
|
+
* Replaces the description text. Rendering the slot alone (no `description`
|
|
708
|
+
* prop) shows the description region and wires it into `aria-describedby`.
|
|
709
|
+
* Stacks below the label, never beside it.
|
|
710
|
+
*/
|
|
711
|
+
description?: (props: CommonFieldLabelSlotProps) => any;
|
|
618
712
|
};
|
|
619
713
|
```
|
|
620
714
|
|
|
621
715
|
## Styles
|
|
622
716
|
|
|
623
717
|
```css
|
|
624
|
-
.bb-
|
|
718
|
+
.bb-field {
|
|
625
719
|
/*
|
|
626
|
-
*
|
|
720
|
+
* CommonField stylesheet
|
|
627
721
|
* -------------------------------------------------------------------------
|
|
628
722
|
* This file coordinates the entire field wrapper behavior:
|
|
629
723
|
* - layout orchestration (vertical/horizontal/reverse/custom-width patterns)
|
|
@@ -650,26 +744,42 @@ export type BaseInputContainerSlots = {
|
|
|
650
744
|
*
|
|
651
745
|
* Important:
|
|
652
746
|
* - This stylesheet intentionally consumes state classes emitted at the
|
|
653
|
-
* outermost container level (e.g. `bb-
|
|
747
|
+
* outermost container level (e.g. `bb-field--errors`).
|
|
654
748
|
* - Inner controls inherit behavior through descendant selectors so we keep
|
|
655
749
|
* behavioral flags centralized.
|
|
656
750
|
*/
|
|
657
751
|
display: flex;
|
|
658
752
|
flex-direction: column;
|
|
659
753
|
|
|
754
|
+
/*
|
|
755
|
+
* A field never sizes its own track from its content.
|
|
756
|
+
* -----------------------------------------------------------------
|
|
757
|
+
* As a grid or flex item this container's automatic minimum size is
|
|
758
|
+
* `min-content`, and for a select that is the ENTIRE placeholder string:
|
|
759
|
+
* the trigger paints its placeholder as real `nowrap` text, because a
|
|
760
|
+
* native `::placeholder` only exists on a real `<input>`. So a long
|
|
761
|
+
* placeholder used to widen the column it sat in, while a `BbTextInput`
|
|
762
|
+
* next to it held its own (its `<input>` floors at `min-width: 50px` and
|
|
763
|
+
* `::placeholder` is paint-only). In a `repeat(3, 1fr)` form row that
|
|
764
|
+
* measured 188.9 / 226 / 68px instead of three equal tracks.
|
|
765
|
+
*
|
|
766
|
+
* The floor lives on the control, not here — see `__control` below.
|
|
767
|
+
*/
|
|
768
|
+
min-width: 0;
|
|
769
|
+
|
|
660
770
|
/*
|
|
661
771
|
* Compact mode
|
|
662
772
|
* -----------------------------------------------------------------
|
|
663
773
|
* Only remaps spacing/size tokens. Structural behavior remains identical.
|
|
664
774
|
*/
|
|
665
|
-
&.bb-
|
|
775
|
+
&.bb-field--compact {
|
|
666
776
|
/* Swap in the pre-derived compact token (base − 2px). Deriving inline here
|
|
667
777
|
would reference this same property on the same element — a CSS custom-
|
|
668
778
|
property cycle that resolves to invalid, silently killing the tweak. */
|
|
669
779
|
--bb-label-spacing-y: var(--bb-label-spacing-y-compact);
|
|
670
780
|
}
|
|
671
781
|
|
|
672
|
-
&.bb-
|
|
782
|
+
&.bb-field--inside-label {
|
|
673
783
|
/*
|
|
674
784
|
* INSIDE LABEL MODE
|
|
675
785
|
* -----------------------------------------------------------------
|
|
@@ -679,10 +789,13 @@ export type BaseInputContainerSlots = {
|
|
|
679
789
|
* because they render visually below this label row.
|
|
680
790
|
*/
|
|
681
791
|
position: relative;
|
|
682
|
-
--inside-label-offset-l-prefix: 0px;
|
|
683
|
-
--inside-label-offset-r-suffix: 0px;
|
|
792
|
+
--inside-label-offset-l-prefix: 0px; /* width a prefix claims on the left */
|
|
793
|
+
--inside-label-offset-r-suffix: 0px; /* width a suffix claims on the right */
|
|
794
|
+
/* Inner padding at each edge of the input box. */
|
|
684
795
|
--inside-label-edge-l: var(--bb-input-px);
|
|
685
796
|
--inside-label-edge-r: var(--bb-input-px);
|
|
797
|
+
/* The two totals the label and the description read: `--…-offset-l` is
|
|
798
|
+
where they start, and the pair clamps their max-width. */
|
|
686
799
|
--inside-label-offset-l: calc(
|
|
687
800
|
var(--inside-label-edge-l) + var(--inside-label-offset-l-prefix)
|
|
688
801
|
);
|
|
@@ -690,14 +803,14 @@ export type BaseInputContainerSlots = {
|
|
|
690
803
|
var(--inside-label-edge-r) + var(--inside-label-offset-r-suffix)
|
|
691
804
|
);
|
|
692
805
|
|
|
693
|
-
&:has(.
|
|
806
|
+
&:has(.bb-field-input__prefix:not(:empty)) {
|
|
694
807
|
/* Prefix neutralizes inner edge padding via negative margins. */
|
|
695
808
|
--inside-label-edge-l: 0px;
|
|
696
809
|
--inside-label-offset-l-prefix: calc(
|
|
697
810
|
var(--bb-input-prefix-w) + var(--bb-input-spacing)
|
|
698
811
|
);
|
|
699
812
|
}
|
|
700
|
-
&:has(.
|
|
813
|
+
&:has(.bb-field-input__suffix:not(:empty)) {
|
|
701
814
|
/* Suffix follows same edge-cancel pattern on the right side. */
|
|
702
815
|
--inside-label-edge-r: 0px;
|
|
703
816
|
--inside-label-offset-r-suffix: calc(
|
|
@@ -713,38 +826,38 @@ export type BaseInputContainerSlots = {
|
|
|
713
826
|
* input box in inside-label mode, so the layout wrapper becomes the
|
|
714
827
|
* visual container and anchor for the absolute label.
|
|
715
828
|
*/
|
|
716
|
-
.bb-
|
|
717
|
-
border: var(--bb-border-w) solid var(--bb-border);
|
|
829
|
+
.bb-field__layout {
|
|
830
|
+
border: var(--bb-border-w) solid var(--bb-field-border);
|
|
718
831
|
border-radius: var(--bb-radius);
|
|
719
832
|
padding: var(--bb-input-px);
|
|
720
833
|
padding-top: calc(var(--bb-label-fs-sm) + var(--bb-input-px));
|
|
721
834
|
position: relative;
|
|
722
835
|
}
|
|
723
836
|
|
|
724
|
-
.bb-
|
|
837
|
+
.bb-field__label {
|
|
725
838
|
left: var(--bb-input-px);
|
|
726
839
|
top: 5px;
|
|
727
840
|
}
|
|
728
841
|
|
|
729
|
-
.bb-
|
|
842
|
+
.bb-field__input-wrapper {
|
|
730
843
|
translate: 0 5px;
|
|
731
844
|
}
|
|
732
845
|
|
|
733
|
-
&.bb-
|
|
734
|
-
.bb-
|
|
846
|
+
&.bb-field--errors {
|
|
847
|
+
.bb-field__layout {
|
|
735
848
|
border-color: var(--bb-danger);
|
|
736
849
|
}
|
|
737
850
|
}
|
|
738
851
|
|
|
739
|
-
&.bb-
|
|
740
|
-
.bb-
|
|
852
|
+
&.bb-field--warnings {
|
|
853
|
+
.bb-field__layout {
|
|
741
854
|
border-color: var(--bb-warn);
|
|
742
855
|
}
|
|
743
856
|
}
|
|
744
857
|
}
|
|
745
858
|
|
|
746
859
|
/* Label styles */
|
|
747
|
-
.bb-
|
|
860
|
+
.bb-field__label {
|
|
748
861
|
-webkit-box-orient: vertical;
|
|
749
862
|
/* Keep inside labels single-line and clipped in crowded layouts. */
|
|
750
863
|
display: -webkit-box;
|
|
@@ -763,7 +876,35 @@ export type BaseInputContainerSlots = {
|
|
|
763
876
|
}
|
|
764
877
|
}
|
|
765
878
|
|
|
766
|
-
&.bb-
|
|
879
|
+
&.bb-field--floating-label {
|
|
880
|
+
/*
|
|
881
|
+
* The risen label is a chip ON the box's top border (Q44.14): its upper
|
|
882
|
+
* half lies over whatever the field sits on, its lower half over the
|
|
883
|
+
* box's own fill. Painting both halves `--bb-panel` put a panel-coloured
|
|
884
|
+
* chip on a secondary (filled) box. `--label-bg` follows the variant's
|
|
885
|
+
* fill — the label sits outside the box, so it cannot read the box's
|
|
886
|
+
* `--bg`; a box given a custom `--bg` sets `--label-bg` on the field
|
|
887
|
+
* root (`pt:root="[--label-bg:…]"`) to match. Outline boxes are
|
|
888
|
+
* panel-filled: both halves stay the panel, exactly as before.
|
|
889
|
+
*/
|
|
890
|
+
--label-outer: var(--bb-panel);
|
|
891
|
+
--label-bg: var(--bb-panel);
|
|
892
|
+
&:has(.bb-field-input--secondary) {
|
|
893
|
+
--label-bg: var(--bb-secondary);
|
|
894
|
+
}
|
|
895
|
+
&:has(.bb-field-input--secondary):focus-within {
|
|
896
|
+
--label-bg: var(--bb-secondary-hover);
|
|
897
|
+
}
|
|
898
|
+
&.bb-field--disabled {
|
|
899
|
+
--label-bg: var(--bb-muted);
|
|
900
|
+
}
|
|
901
|
+
/* A ghost box has no border to mask: no chip at all. Last, so it also
|
|
902
|
+
wins over the disabled fill above. */
|
|
903
|
+
&:has(.bb-field-input--ghost) {
|
|
904
|
+
--label-outer: transparent;
|
|
905
|
+
--label-bg: transparent;
|
|
906
|
+
}
|
|
907
|
+
|
|
767
908
|
/*
|
|
768
909
|
* FLOATING LABEL MODE
|
|
769
910
|
* -----------------------------------------------------------------
|
|
@@ -779,6 +920,11 @@ export type BaseInputContainerSlots = {
|
|
|
779
920
|
* --fl-icon-r right icon-slot clearance (resting only)
|
|
780
921
|
* --fl-h input height for vertical centering
|
|
781
922
|
* --fl-nudge x nudge for the top-border chip
|
|
923
|
+
*
|
|
924
|
+
* The four sums below are what the label actually reads — a left origin
|
|
925
|
+
* and a right clearance for each of its two positions (`rest` inside the
|
|
926
|
+
* field, `over` risen onto the border); each pair also clamps the
|
|
927
|
+
* label's max-width in that position.
|
|
782
928
|
*/
|
|
783
929
|
--fl-edge-l: var(--bb-input-px);
|
|
784
930
|
--fl-over-edge-l: var(--bb-input-px);
|
|
@@ -800,45 +946,45 @@ export type BaseInputContainerSlots = {
|
|
|
800
946
|
/* Prepend icon: the icon has margin-left: -input-px * 0.4, so the icon
|
|
801
947
|
starts at input-px * 0.6 from the left edge. Match that for the label
|
|
802
948
|
so it aligns with the visible text start regardless of input-px value. */
|
|
803
|
-
&:has(.
|
|
949
|
+
&:has(.bb-field-input__prepend-icon) {
|
|
804
950
|
--fl-edge-l: calc(var(--bb-input-px) * 0.6);
|
|
805
951
|
--fl-prepend-icon: calc(var(--bb-input-icon) + var(--bb-input-spacing));
|
|
806
952
|
}
|
|
807
953
|
|
|
808
954
|
/* Prefix: cancel the inner padding; prefix carries its own clearance.
|
|
809
955
|
Declared after prepend-icon so it wins when both are present. */
|
|
810
|
-
&:has(.
|
|
956
|
+
&:has(.bb-field-input__prefix:not(:empty)) {
|
|
811
957
|
--fl-edge-l: 0px;
|
|
812
958
|
--fl-over-edge-l: 0px;
|
|
813
959
|
--fl-prefix: calc(var(--bb-input-prefix-w) + var(--bb-input-spacing));
|
|
814
960
|
}
|
|
815
961
|
|
|
816
962
|
/* Suffix: cancel the right inner padding; suffix carries its own clearance. */
|
|
817
|
-
&:has(.
|
|
963
|
+
&:has(.bb-field-input__suffix:not(:empty)) {
|
|
818
964
|
--fl-edge-r: 0px;
|
|
819
965
|
--fl-suffix: calc(var(--bb-input-prefix-w) + var(--bb-input-spacing));
|
|
820
966
|
}
|
|
821
967
|
|
|
822
|
-
/* Right icon slot:
|
|
968
|
+
/* Right icon slot: CommonFieldInput shows one icon at a time via a
|
|
823
969
|
single fixed-width slot — no mutual exclusion needed, just reserve it
|
|
824
970
|
when any icon source is active. */
|
|
825
|
-
&.bb-
|
|
826
|
-
&.bb-
|
|
827
|
-
&.bb-
|
|
828
|
-
&.bb-
|
|
829
|
-
&:has(.
|
|
971
|
+
&.bb-field--clearable,
|
|
972
|
+
&.bb-field--errors,
|
|
973
|
+
&.bb-field--warnings,
|
|
974
|
+
&.bb-field--loading,
|
|
975
|
+
&:has(.bb-field-input__icon-spacer:not(:empty)) {
|
|
830
976
|
--fl-icon-r: calc(var(--bb-input-icon) + var(--bb-input-spacing));
|
|
831
977
|
}
|
|
832
978
|
|
|
833
979
|
/* Compact: override input height so vertical centering uses compact value. */
|
|
834
|
-
&.bb-
|
|
980
|
+
&.bb-field--compact {
|
|
835
981
|
--fl-h: var(--bb-input-h-compact);
|
|
836
982
|
}
|
|
837
983
|
|
|
838
|
-
.bb-
|
|
984
|
+
.bb-field__layout {
|
|
839
985
|
position: relative;
|
|
840
986
|
|
|
841
|
-
.bb-
|
|
987
|
+
.bb-field__label {
|
|
842
988
|
background-color: transparent;
|
|
843
989
|
display: inline-block;
|
|
844
990
|
/* At rest the label mimics a placeholder: normal label size.
|
|
@@ -866,10 +1012,13 @@ export type BaseInputContainerSlots = {
|
|
|
866
1012
|
}
|
|
867
1013
|
|
|
868
1014
|
/* Active: label rises to sit on the top border */
|
|
869
|
-
.bb-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
1015
|
+
.bb-field__layout:focus-within .bb-field__label,
|
|
1016
|
+
&.bb-field--has-value .bb-field__label {
|
|
1017
|
+
background: linear-gradient(
|
|
1018
|
+
to bottom,
|
|
1019
|
+
var(--label-outer) 50%,
|
|
1020
|
+
var(--label-bg) 50%
|
|
1021
|
+
);
|
|
873
1022
|
font-size: var(--bb-label-fs-sm);
|
|
874
1023
|
max-width: calc(100% - var(--fl-over-l) - var(--fl-over-r));
|
|
875
1024
|
opacity: 1;
|
|
@@ -883,18 +1032,20 @@ export type BaseInputContainerSlots = {
|
|
|
883
1032
|
* Fieldset behaves differently in some flex contexts. This keeps vertical
|
|
884
1033
|
* rhythm consistent with other wrapper tags.
|
|
885
1034
|
*/
|
|
886
|
-
fieldset.bb-
|
|
1035
|
+
fieldset.bb-field__layout {
|
|
887
1036
|
> :not(:last-child) {
|
|
888
1037
|
margin-bottom: var(--bb-label-spacing-y);
|
|
889
1038
|
}
|
|
890
1039
|
}
|
|
891
1040
|
|
|
892
|
-
.bb-
|
|
1041
|
+
.bb-field__layout {
|
|
893
1042
|
/*
|
|
894
1043
|
* Layout engine
|
|
895
1044
|
* -----------------------------------------------------------------
|
|
896
|
-
* This node controls geometric relationship between label and
|
|
897
|
-
*
|
|
1045
|
+
* This node controls geometric relationship between label and input.
|
|
1046
|
+
* The `layout` and `reverse` classes are computed in Vue and mapped here:
|
|
1047
|
+
* `--horizontal` / `--vertical` name the axis, `--auto`, `--ratio`,
|
|
1048
|
+
* `--label-fill` and `--input-fill` the side-by-side keyword.
|
|
898
1049
|
*/
|
|
899
1050
|
column-gap: var(--bb-label-spacing-x);
|
|
900
1051
|
display: flex;
|
|
@@ -904,19 +1055,41 @@ export type BaseInputContainerSlots = {
|
|
|
904
1055
|
|
|
905
1056
|
&--vertical {
|
|
906
1057
|
flex-direction: column;
|
|
907
|
-
&.bb-
|
|
1058
|
+
&.bb-field__layout--reverse {
|
|
908
1059
|
& > *:first-child {
|
|
909
1060
|
order: 2;
|
|
910
1061
|
}
|
|
911
1062
|
}
|
|
912
1063
|
}
|
|
913
1064
|
&--horizontal {
|
|
914
|
-
&.bb-
|
|
1065
|
+
&.bb-field__layout--reverse {
|
|
915
1066
|
& > *:first-child {
|
|
916
1067
|
order: 2;
|
|
917
1068
|
}
|
|
918
1069
|
}
|
|
919
1070
|
}
|
|
1071
|
+
|
|
1072
|
+
/* One side takes the free space, the other keeps its own size. The
|
|
1073
|
+
label is a basis-0 grower so a long label wraps inside its cell
|
|
1074
|
+
instead of squeezing the input; `min-width: 0` lets it shrink below
|
|
1075
|
+
its longest word's min-content too. */
|
|
1076
|
+
&--label-fill {
|
|
1077
|
+
> .bb-field__label {
|
|
1078
|
+
flex: 1 1 0;
|
|
1079
|
+
min-width: 0;
|
|
1080
|
+
}
|
|
1081
|
+
> .bb-field__input-wrapper {
|
|
1082
|
+
flex: none;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
&--input-fill {
|
|
1086
|
+
> .bb-field__label {
|
|
1087
|
+
flex: none;
|
|
1088
|
+
}
|
|
1089
|
+
> .bb-field__input-wrapper {
|
|
1090
|
+
flex: 1 1 0;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
920
1093
|
}
|
|
921
1094
|
|
|
922
1095
|
&__label {
|
|
@@ -954,13 +1127,23 @@ export type BaseInputContainerSlots = {
|
|
|
954
1127
|
width: 1px !important;
|
|
955
1128
|
}
|
|
956
1129
|
}
|
|
957
|
-
&
|
|
1130
|
+
&__input-wrapper {
|
|
958
1131
|
/*
|
|
959
|
-
*
|
|
960
|
-
* Width is injected by Vue-computed inline styles based on
|
|
1132
|
+
* Input column wrapper.
|
|
1133
|
+
* Width is injected by Vue-computed inline styles based on layout rules.
|
|
961
1134
|
*/
|
|
962
1135
|
display: grid;
|
|
963
1136
|
|
|
1137
|
+
/* Same reason as the container root: this is a flex item, so its
|
|
1138
|
+
automatic minimum would re-introduce the content floor the root just
|
|
1139
|
+
dropped. `min-width` has to be 0 on EVERY link between the sized
|
|
1140
|
+
ancestor and the element that ellipses, or the chain stops truncating
|
|
1141
|
+
at the first link that still says `auto`. The 50px keeps a squeezed
|
|
1142
|
+
field usable, mirroring the `min-width: 50px` the native input and
|
|
1143
|
+
textarea already carry so a select and a text input degrade
|
|
1144
|
+
identically. */
|
|
1145
|
+
min-width: min(50px, 100%);
|
|
1146
|
+
|
|
964
1147
|
&--left {
|
|
965
1148
|
justify-items: flex-start;
|
|
966
1149
|
}
|
|
@@ -970,6 +1153,35 @@ export type BaseInputContainerSlots = {
|
|
|
970
1153
|
&--right {
|
|
971
1154
|
justify-items: flex-end;
|
|
972
1155
|
}
|
|
1156
|
+
|
|
1157
|
+
/* A box row fills its control column. One rule for every text-like
|
|
1158
|
+
control (it used to be re-declared by each of them); the column itself
|
|
1159
|
+
is sized by `layout`. */
|
|
1160
|
+
> .bb-field-input {
|
|
1161
|
+
width: 100%;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/*
|
|
1166
|
+
* Control-first widgets opt OUT of that floor.
|
|
1167
|
+
* -----------------------------------------------------------------
|
|
1168
|
+
* The 50px above buys a squeezed text track a usable minimum. These four
|
|
1169
|
+
* have no track: their control is a fixed-size glyph (a 16px box, a 32px
|
|
1170
|
+
* switch) and `layout: 'auto'` leaves `widths.input` at `auto`, so the
|
|
1171
|
+
* floor was the only thing sizing the column — a 16px checkbox sat in a
|
|
1172
|
+
* 50px cell and its label started 42px away instead of the
|
|
1173
|
+
* `--bb-label-spacing-x` the layout intends. Pinned in BbCheckbox.test.ts.
|
|
1174
|
+
*
|
|
1175
|
+
* Groups are deliberately NOT here: a group's control column holds full
|
|
1176
|
+
* option rows with their own labels, so it still wants a floor.
|
|
1177
|
+
*/
|
|
1178
|
+
&.bb-checkbox,
|
|
1179
|
+
&.bb-radio,
|
|
1180
|
+
&.bb-switch,
|
|
1181
|
+
&.bb-rating {
|
|
1182
|
+
.bb-field__input-wrapper {
|
|
1183
|
+
min-width: 0;
|
|
1184
|
+
}
|
|
973
1185
|
}
|
|
974
1186
|
|
|
975
1187
|
&__description {
|
|
@@ -983,9 +1195,9 @@ export type BaseInputContainerSlots = {
|
|
|
983
1195
|
*/
|
|
984
1196
|
color: var(--bb-text-muted);
|
|
985
1197
|
display: block;
|
|
986
|
-
font-size:
|
|
987
|
-
font-weight:
|
|
988
|
-
line-height:
|
|
1198
|
+
font-size: var(--bb-description-fs);
|
|
1199
|
+
font-weight: var(--bb-description-weight);
|
|
1200
|
+
line-height: var(--bb-description-lh);
|
|
989
1201
|
margin-top: 2px;
|
|
990
1202
|
position: relative;
|
|
991
1203
|
}
|
|
@@ -999,17 +1211,19 @@ export type BaseInputContainerSlots = {
|
|
|
999
1211
|
* and row gap) and floats up to the reserved line — the usual float
|
|
1000
1212
|
* distance plus one description line of leading.
|
|
1001
1213
|
*/
|
|
1002
|
-
&.bb-
|
|
1214
|
+
&.bb-field--floating-label.bb-field--description {
|
|
1003
1215
|
/* Sized for the full label font: above the description the floated
|
|
1004
1216
|
label acts as an outside label and keeps its normal size. */
|
|
1005
1217
|
--fl-label-line: calc(var(--bb-label-fs) + 4px);
|
|
1006
|
-
--fl-desc-lh:
|
|
1218
|
+
--fl-desc-lh: var(
|
|
1219
|
+
--bb-description-lh
|
|
1220
|
+
); /* the description's line; the label clears it at rest and crosses it when it floats */
|
|
1007
1221
|
|
|
1008
|
-
.bb-
|
|
1222
|
+
.bb-field__layout {
|
|
1009
1223
|
padding-top: var(--fl-label-line);
|
|
1010
1224
|
}
|
|
1011
1225
|
|
|
1012
|
-
.bb-
|
|
1226
|
+
.bb-field__description {
|
|
1013
1227
|
line-height: var(--fl-desc-lh);
|
|
1014
1228
|
margin-top: 0;
|
|
1015
1229
|
overflow: hidden;
|
|
@@ -1017,7 +1231,7 @@ export type BaseInputContainerSlots = {
|
|
|
1017
1231
|
white-space: nowrap;
|
|
1018
1232
|
}
|
|
1019
1233
|
|
|
1020
|
-
.bb-
|
|
1234
|
+
.bb-field__layout .bb-field__label {
|
|
1021
1235
|
translate: calc(var(--fl-rest-l) + var(--fl-nudge))
|
|
1022
1236
|
calc(
|
|
1023
1237
|
var(--fl-label-line) + var(--fl-desc-lh) + var(--bb-label-spacing-y) +
|
|
@@ -1028,10 +1242,9 @@ export type BaseInputContainerSlots = {
|
|
|
1028
1242
|
/* Floated: rises past the description into the reserved top line, where
|
|
1029
1243
|
it reads as an outside label — normal font size, no masking chip
|
|
1030
1244
|
background (free space, not the input border). */
|
|
1031
|
-
.bb-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
background-color: transparent;
|
|
1245
|
+
.bb-field__layout:focus-within .bb-field__label,
|
|
1246
|
+
&.bb-field--has-value .bb-field__label {
|
|
1247
|
+
background: transparent;
|
|
1035
1248
|
font-size: var(--bb-label-fs);
|
|
1036
1249
|
/* Left-aligned with the description, like an outside label — not
|
|
1037
1250
|
indented to the border-chip offset. */
|
|
@@ -1044,14 +1257,14 @@ export type BaseInputContainerSlots = {
|
|
|
1044
1257
|
* -----------------------------------------------------------------
|
|
1045
1258
|
* The description renders as a second single-line overlay right under
|
|
1046
1259
|
* the inside label; the field's clearance grows to two label lines (see
|
|
1047
|
-
*
|
|
1260
|
+
* CommonFieldInput). Anchored like the label: to the container root
|
|
1048
1261
|
* for plain inputs, to the bordered layout for group controls.
|
|
1049
1262
|
*/
|
|
1050
|
-
&.bb-
|
|
1051
|
-
.bb-
|
|
1052
|
-
font-size:
|
|
1263
|
+
&.bb-field--inside-label.bb-field--description {
|
|
1264
|
+
.bb-field__description {
|
|
1265
|
+
font-size: var(--bb-description-fs-sm);
|
|
1053
1266
|
left: var(--inside-label-offset-l);
|
|
1054
|
-
line-height: var(--bb-
|
|
1267
|
+
line-height: var(--bb-description-lh-sm);
|
|
1055
1268
|
margin-top: 0;
|
|
1056
1269
|
max-width: calc(
|
|
1057
1270
|
100% - var(--inside-label-offset-l) - var(--inside-label-offset-r)
|
|
@@ -1068,7 +1281,7 @@ export type BaseInputContainerSlots = {
|
|
|
1068
1281
|
&.bb-checkbox-group,
|
|
1069
1282
|
&.bb-radio-group,
|
|
1070
1283
|
&.bb-switch-group {
|
|
1071
|
-
.bb-
|
|
1284
|
+
.bb-field__layout {
|
|
1072
1285
|
padding-top: calc(
|
|
1073
1286
|
var(--bb-label-fs-sm) + var(--bb-label-lh-sm) + var(--bb-input-px)
|
|
1074
1287
|
);
|
|
@@ -1076,8 +1289,7 @@ export type BaseInputContainerSlots = {
|
|
|
1076
1289
|
}
|
|
1077
1290
|
|
|
1078
1291
|
/* A hidden label collapses the clearance — hide the description too. */
|
|
1079
|
-
&:has(.bb-
|
|
1080
|
-
.bb-base-input-container__description {
|
|
1292
|
+
&:has(.bb-field__label--hidden) .bb-field__description {
|
|
1081
1293
|
display: none;
|
|
1082
1294
|
}
|
|
1083
1295
|
}
|
|
@@ -1088,37 +1300,53 @@ export type BaseInputContainerSlots = {
|
|
|
1088
1300
|
* Vue controls mount/unmount, CSS handles the visual treatment.
|
|
1089
1301
|
*/
|
|
1090
1302
|
color: var(--bb-text-muted);
|
|
1091
|
-
font-size:
|
|
1092
|
-
|
|
1303
|
+
font-size: var(--bb-message-fs);
|
|
1304
|
+
font-weight: var(--bb-message-weight);
|
|
1305
|
+
line-height: var(--bb-message-lh);
|
|
1093
1306
|
margin-top: 6px;
|
|
1094
1307
|
position: relative;
|
|
1095
1308
|
}
|
|
1096
|
-
&
|
|
1309
|
+
&__hint {
|
|
1097
1310
|
/*
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
* CSS provides transition behavior and spacing contract.
|
|
1311
|
+
* Block, so `pt:hint` owns its own line box: a consumer font-size /
|
|
1312
|
+
* line-height on the text then sizes the line, instead of the wrap's
|
|
1313
|
+
* 18px strut holding it open. The type still inherits from the wrap.
|
|
1102
1314
|
*/
|
|
1103
1315
|
display: block;
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1316
|
+
}
|
|
1317
|
+
&__errors-wrap,
|
|
1318
|
+
&__warnings-wrap {
|
|
1319
|
+
/*
|
|
1320
|
+
* Message channel shells (errors, warnings)
|
|
1321
|
+
* -----------------------------------------------------------------
|
|
1322
|
+
* A one-row grid that opens from 0fr to 1fr, so the row is always the
|
|
1323
|
+
* content's own height: a `pt:message` font size, a narrower field that
|
|
1324
|
+
* wraps a message, or a font that loads late re-size it with no JS
|
|
1325
|
+
* measurement to go stale. The warnings shell stays closed while the
|
|
1326
|
+
* error state wins (its list is empty then).
|
|
1327
|
+
*/
|
|
1328
|
+
display: grid;
|
|
1329
|
+
grid-template-rows: 0fr;
|
|
1330
|
+
transition: grid-template-rows 300ms var(--bb-ease);
|
|
1107
1331
|
width: 100%;
|
|
1108
|
-
|
|
1109
|
-
|
|
1332
|
+
|
|
1333
|
+
&.bb-field__errors-wrap--open,
|
|
1334
|
+
&.bb-field__warnings-wrap--open {
|
|
1335
|
+
grid-template-rows: 1fr;
|
|
1110
1336
|
}
|
|
1111
1337
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1338
|
+
> * {
|
|
1339
|
+
min-height: 0;
|
|
1340
|
+
overflow: hidden;
|
|
1114
1341
|
}
|
|
1115
1342
|
}
|
|
1116
1343
|
&__errors {
|
|
1117
1344
|
/* Error text stack root */
|
|
1118
1345
|
color: var(--bb-danger);
|
|
1119
1346
|
display: block;
|
|
1120
|
-
font-size:
|
|
1121
|
-
|
|
1347
|
+
font-size: var(--bb-message-fs);
|
|
1348
|
+
font-weight: var(--bb-message-weight);
|
|
1349
|
+
line-height: var(--bb-message-lh);
|
|
1122
1350
|
position: relative;
|
|
1123
1351
|
width: 100%;
|
|
1124
1352
|
}
|
|
@@ -1127,25 +1355,14 @@ export type BaseInputContainerSlots = {
|
|
|
1127
1355
|
display: inline-block;
|
|
1128
1356
|
width: 100%;
|
|
1129
1357
|
}
|
|
1130
|
-
&__warnings-wrap {
|
|
1131
|
-
/*
|
|
1132
|
-
* Warning channel container — mirrors the error channel; height is
|
|
1133
|
-
* animated via inline updates from Vue logic and collapses to 0 while
|
|
1134
|
-
* the error state wins.
|
|
1135
|
-
*/
|
|
1136
|
-
display: block;
|
|
1137
|
-
height: 0;
|
|
1138
|
-
overflow: hidden;
|
|
1139
|
-
transition: height 300ms var(--bb-ease);
|
|
1140
|
-
width: 100%;
|
|
1141
|
-
}
|
|
1142
1358
|
&__warnings {
|
|
1143
1359
|
/* Warning text stack root — text budget, so --bb-text-warn (not the
|
|
1144
1360
|
lighter --bb-warn chrome token). */
|
|
1145
1361
|
color: var(--bb-text-warn);
|
|
1146
1362
|
display: block;
|
|
1147
|
-
font-size:
|
|
1148
|
-
|
|
1363
|
+
font-size: var(--bb-message-fs);
|
|
1364
|
+
font-weight: var(--bb-message-weight);
|
|
1365
|
+
line-height: var(--bb-message-lh);
|
|
1149
1366
|
position: relative;
|
|
1150
1367
|
width: 100%;
|
|
1151
1368
|
}
|