bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.64
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +7 -3
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +55 -22
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +17 -10
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +416 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +79 -49
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +163 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +147 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +15 -9
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
- package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +5 -2
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/records-workspace.md +49 -13
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +128 -33
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +369 -37
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +543 -532
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbFormContext.d.ts +4 -3
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +4 -4
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +2300 -543
- package/dist/llms-medium.txt +71 -53
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +35 -23
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +3 -3
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
:query="query"
|
|
165
165
|
/></template>
|
|
166
166
|
<template v-if="$slots.option" #option="data"
|
|
167
|
-
><slot
|
|
167
|
+
><slot name="option" v-bind="optionSlotProps(data)"
|
|
168
168
|
/></template>
|
|
169
169
|
<template #group="data"><slot name="group" v-bind="data" /></template>
|
|
170
170
|
</ListBox>
|
|
@@ -186,8 +186,12 @@
|
|
|
186
186
|
"
|
|
187
187
|
v-bind="mergeProps(offcanvasBindings, sheetEvents, withoutClass($attrs))"
|
|
188
188
|
>
|
|
189
|
-
<template v-if="$slots.header" #header>
|
|
190
|
-
|
|
189
|
+
<template v-if="$slots.header" #header="{ titleId: sheetTitleId }">
|
|
190
|
+
<!-- The sheet's own `titleId`: its dialog is labelled by it. -->
|
|
191
|
+
<slot
|
|
192
|
+
name="header"
|
|
193
|
+
v-bind="{ ...panelSlotProps, titleId: sheetTitleId }"
|
|
194
|
+
/>
|
|
191
195
|
</template>
|
|
192
196
|
<!-- `tabindex="-1"`: the sheet's own opening focus target. Not focusable
|
|
193
197
|
by Tab — only programmatically, by BbOffCanvas's `focusTarget`. See the
|
|
@@ -284,7 +288,11 @@
|
|
|
284
288
|
</CommonPopover>
|
|
285
289
|
</template>
|
|
286
290
|
|
|
287
|
-
<script
|
|
291
|
+
<script
|
|
292
|
+
setup
|
|
293
|
+
lang="ts"
|
|
294
|
+
generic="Item = any, Known extends BbSelectKnownItems | undefined = undefined"
|
|
295
|
+
>
|
|
288
296
|
import type { Option as BaseOption, GroupedOptions } from '@/types/Option';
|
|
289
297
|
import {
|
|
290
298
|
computed,
|
|
@@ -298,7 +306,11 @@ import {
|
|
|
298
306
|
onDeactivated,
|
|
299
307
|
} from 'vue';
|
|
300
308
|
import { isImeComposing } from '@/utilities/functions/isImeComposing';
|
|
301
|
-
import {
|
|
309
|
+
import {
|
|
310
|
+
domElement,
|
|
311
|
+
extractDomContainer,
|
|
312
|
+
type DomHost,
|
|
313
|
+
} from '@/utilities/functions/extractDomContainer';
|
|
302
314
|
import { elementLabel } from '@/utilities/functions/elementLabel';
|
|
303
315
|
import { get } from '@/utilities/functions/get';
|
|
304
316
|
import { hash } from '@/utilities/functions/hash';
|
|
@@ -371,7 +383,9 @@ import searchIcon from '@/assets/svgs/search.svg?raw';
|
|
|
371
383
|
import ListBox from '../ListBox/ListBox.vue';
|
|
372
384
|
import { waitFor } from '@/utilities/functions/waitFor';
|
|
373
385
|
import type {
|
|
386
|
+
BbSelectKnownItems,
|
|
374
387
|
BbSelectPopoverEvents,
|
|
388
|
+
BbSelectPopoverOptionSlotProps,
|
|
375
389
|
BbSelectPopoverProps,
|
|
376
390
|
BbSelectPopoverSlots,
|
|
377
391
|
BbSelectResolvedOption,
|
|
@@ -386,7 +400,7 @@ import { removedPropsFor } from '@/deprecation/removedProps';
|
|
|
386
400
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
387
401
|
import { hasVnodeListener } from '@/utilities/functions/hasVnodeListener';
|
|
388
402
|
|
|
389
|
-
const props = withDefaults(defineProps<BbSelectPopoverProps<Item>>(), {
|
|
403
|
+
const props = withDefaults(defineProps<BbSelectPopoverProps<Item, Known>>(), {
|
|
390
404
|
// `undefined` (declared, not omitted) keeps `adaptive` three-state: it disables
|
|
391
405
|
// Vue's absent→`false` Boolean cast so `props.adaptive ?? config.adaptive` can
|
|
392
406
|
// reach the config default, while keeping the Boolean type so the valueless
|
|
@@ -421,7 +435,7 @@ const props = withDefaults(defineProps<BbSelectPopoverProps<Item>>(), {
|
|
|
421
435
|
|
|
422
436
|
const emit = defineEmits<BbSelectPopoverEvents>();
|
|
423
437
|
|
|
424
|
-
defineSlots<BbSelectPopoverSlots<Item>>();
|
|
438
|
+
defineSlots<BbSelectPopoverSlots<Item, Known>>();
|
|
425
439
|
|
|
426
440
|
/**
|
|
427
441
|
* Passthrough (plans/passthrough/BbSelectPopover.md). `root` merges into the `$attrs` spread on the desktop floating element (no node on the phone sheet, where `panel` then `sheet` land on the sheet root); `option` is resolved per option inside the listbox with `part()`.
|
|
@@ -432,6 +446,7 @@ const passthrough = usePassthrough({
|
|
|
432
446
|
parts: BB_SELECT_POPOVER_PT.parts,
|
|
433
447
|
states: BB_SELECT_POPOVER_PT.states,
|
|
434
448
|
active: { open: () => shown.value },
|
|
449
|
+
facts: (row) => ({ known: isKnown(row) }),
|
|
435
450
|
});
|
|
436
451
|
|
|
437
452
|
const config = useConfig();
|
|
@@ -467,13 +482,13 @@ onBeforeMount(() => {
|
|
|
467
482
|
/**
|
|
468
483
|
* START ELEMENT REFERENCES
|
|
469
484
|
*/
|
|
470
|
-
const activatorEl = ref<
|
|
485
|
+
const activatorEl = ref<DomHost>();
|
|
471
486
|
const optionsContainer = ref<any | null>(null);
|
|
472
487
|
const searchInput = ref<HTMLInputElement | null>(null);
|
|
473
488
|
const popoverFocusProxy = ref<HTMLButtonElement | null>(null);
|
|
474
489
|
const activeDescendantId = ref<string>();
|
|
475
490
|
|
|
476
|
-
const positionAnchorEl = computed<
|
|
491
|
+
const positionAnchorEl = computed<DomHost | undefined>(() => {
|
|
477
492
|
if (props.anchor) {
|
|
478
493
|
const el = extractDomContainer(props.anchor);
|
|
479
494
|
if (el) return el;
|
|
@@ -482,7 +497,7 @@ const positionAnchorEl = computed<HTMLElement | undefined>(() => {
|
|
|
482
497
|
});
|
|
483
498
|
|
|
484
499
|
const { width: activatorWidth } = useElementSize(
|
|
485
|
-
positionAnchorEl,
|
|
500
|
+
() => domElement(positionAnchorEl.value),
|
|
486
501
|
{ width: 0, height: 0 },
|
|
487
502
|
{
|
|
488
503
|
box: 'border-box',
|
|
@@ -613,7 +628,7 @@ const computedAriaDescribedby = computed(() => {
|
|
|
613
628
|
let ignoreNextIntersection = false;
|
|
614
629
|
|
|
615
630
|
const { resume, pause } = useIntersectionObserver(
|
|
616
|
-
activatorEl,
|
|
631
|
+
() => domElement(activatorEl.value),
|
|
617
632
|
async ([{ intersectionRatio }]) => {
|
|
618
633
|
if (ignoreNextIntersection) {
|
|
619
634
|
ignoreNextIntersection = false;
|
|
@@ -1623,7 +1638,22 @@ const keepListedWhileOpen = (valueHash: string) => {
|
|
|
1623
1638
|
}
|
|
1624
1639
|
}
|
|
1625
1640
|
};
|
|
1626
|
-
if (knownSource)
|
|
1641
|
+
if (knownSource) {
|
|
1642
|
+
knownSource.userUnpick = markUserUnpicked;
|
|
1643
|
+
knownSource.isKnown = isKnown;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
/**
|
|
1647
|
+
* The option slot's props, with the `known` that tells a known row from the
|
|
1648
|
+
* list's own (Q77.7). The scope is typed by whether this popover binds
|
|
1649
|
+
* `known-items` (`Known`), which runtime cannot see: the one cast lives here.
|
|
1650
|
+
*/
|
|
1651
|
+
const optionSlotProps = <D extends { item: Item }>(data: D) =>
|
|
1652
|
+
({
|
|
1653
|
+
...data,
|
|
1654
|
+
loading: computedLoading.value,
|
|
1655
|
+
known: isKnown(data.item),
|
|
1656
|
+
}) as unknown as BbSelectPopoverOptionSlotProps<Item, Known>;
|
|
1627
1657
|
watch(modelValueIndexedByHash, (selected) => {
|
|
1628
1658
|
// Closed, a value leaving the model leaves its sticky place (R17).
|
|
1629
1659
|
if (!shown.value) pruneSticky();
|
|
@@ -2316,7 +2346,8 @@ const getGroupData = (option: BaseOption) => {
|
|
|
2316
2346
|
/**
|
|
2317
2347
|
* G5 (owner 2026-10-16): the page decides the order of the groups; a pinned
|
|
2318
2348
|
* row goes first inside its own group, and a group only pinned rows hold
|
|
2319
|
-
* goes first.
|
|
2349
|
+
* goes first. Rows with no group (a nullish `groupBy`, a known row) are
|
|
2350
|
+
* listed before every header (owner 2026-10-26, ATT-15), as in BbDropdown.
|
|
2320
2351
|
*/
|
|
2321
2352
|
const groupedOptions = computed<GroupedOptions[]>(() => {
|
|
2322
2353
|
// Every row the open list puts on top (pins and other outside rows) is
|
|
@@ -2358,14 +2389,16 @@ const groupedOptions = computed<GroupedOptions[]>(() => {
|
|
|
2358
2389
|
});
|
|
2359
2390
|
return groups
|
|
2360
2391
|
.map((group, order) => ({ group, order }))
|
|
2361
|
-
.sort(
|
|
2362
|
-
a
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
? -
|
|
2366
|
-
:
|
|
2367
|
-
? 1
|
|
2368
|
-
:
|
|
2392
|
+
.sort(
|
|
2393
|
+
(a, b) =>
|
|
2394
|
+
Number(b.group.data === null) - Number(a.group.data === null) ||
|
|
2395
|
+
(a.group.firstListed === b.group.firstListed
|
|
2396
|
+
? a.order - b.order
|
|
2397
|
+
: a.group.firstListed === Infinity
|
|
2398
|
+
? -1
|
|
2399
|
+
: b.group.firstListed === Infinity
|
|
2400
|
+
? 1
|
|
2401
|
+
: a.group.firstListed - b.group.firstListed)
|
|
2369
2402
|
)
|
|
2370
2403
|
.map(({ group: { id, data, options, pinnedOptions } }) => ({
|
|
2371
2404
|
id,
|
|
@@ -2864,6 +2897,8 @@ const panelSlotProps = computed(() => ({
|
|
|
2864
2897
|
focus: focusPopoverContent,
|
|
2865
2898
|
query: query.value,
|
|
2866
2899
|
selectedOptions: publicSelectedOptions.value,
|
|
2900
|
+
// The sheet hands its dialog's own id instead (Q76.10 d).
|
|
2901
|
+
titleId: `${id}_title`,
|
|
2867
2902
|
}));
|
|
2868
2903
|
|
|
2869
2904
|
/**
|
|
@@ -3150,6 +3185,41 @@ import type { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
|
3150
3185
|
/** A row naming a value the app already holds (`known-items`): the model value and its text. */
|
|
3151
3186
|
export type BbSelectKnownItem = { value: unknown; label: string };
|
|
3152
3187
|
|
|
3188
|
+
/** What `known-items` takes. */
|
|
3189
|
+
export type BbSelectKnownItems = Array<BbSelectKnownItem | null | undefined>;
|
|
3190
|
+
|
|
3191
|
+
/**
|
|
3192
|
+
* The row an option or chip slot gets, told apart by `known` (Q77.7). On a
|
|
3193
|
+
* select that binds `known-items`, a known row stands in as `item` until the
|
|
3194
|
+
* list brings the real one: `{ value, label }`, whatever the options' shape.
|
|
3195
|
+
* Without `known-items` the row is always the option. `BbSelectSlotRow<Row>`
|
|
3196
|
+
* alone is the bound case: what a helper taking a slot's `{ item, known }`
|
|
3197
|
+
* is typed with.
|
|
3198
|
+
*/
|
|
3199
|
+
export type BbSelectSlotRow<
|
|
3200
|
+
Item,
|
|
3201
|
+
Known extends BbSelectKnownItems | undefined = BbSelectKnownItems,
|
|
3202
|
+
> = [Known] extends [undefined]
|
|
3203
|
+
? {
|
|
3204
|
+
/** Always `false` here: this select binds no `known-items`. */
|
|
3205
|
+
known: false;
|
|
3206
|
+
/** The raw item from the `items` prop. */
|
|
3207
|
+
item: Item;
|
|
3208
|
+
}
|
|
3209
|
+
:
|
|
3210
|
+
| {
|
|
3211
|
+
/** A known row (`known-items`): the list has not brought this value's own row yet. */
|
|
3212
|
+
known: true;
|
|
3213
|
+
/** The known row, `{ value, label }`; read `text` for what it shows. */
|
|
3214
|
+
item: BbSelectKnownItem;
|
|
3215
|
+
}
|
|
3216
|
+
| {
|
|
3217
|
+
/** The list's own row. */
|
|
3218
|
+
known: false;
|
|
3219
|
+
/** The raw item from the `items` prop. */
|
|
3220
|
+
item: Item;
|
|
3221
|
+
};
|
|
3222
|
+
|
|
3153
3223
|
/**
|
|
3154
3224
|
* A selected option as resolved by the select family and exposed through slot
|
|
3155
3225
|
* props (`selectedOptions`): the raw source `item` plus its resolved display
|
|
@@ -3271,7 +3341,11 @@ export const BB_SELECT_POPOVER_PT = {
|
|
|
3271
3341
|
// Two mapped types, never `Partial<Record<…>>`: the lint autofix rewrites one
|
|
3272
3342
|
// into the other and the SFC resolver reads only the mapped spelling (T23).
|
|
3273
3343
|
/* eslint-disable @typescript-eslint/consistent-indexed-object-style */
|
|
3274
|
-
export type BbSelectPopoverProps<
|
|
3344
|
+
export type BbSelectPopoverProps<
|
|
3345
|
+
Item,
|
|
3346
|
+
// The type alone is the bound case, as on `BbSelectProps` (Q77.7).
|
|
3347
|
+
Known extends BbSelectKnownItems | undefined = BbSelectKnownItems,
|
|
3348
|
+
> = {
|
|
3275
3349
|
[K in
|
|
3276
3350
|
| `pt:${BbSelectPopoverSurfacePtPart}`
|
|
3277
3351
|
| `pt:${BbSelectPopoverPtPart}:${BbSelectPopoverPtState}`]?: PtValue;
|
|
@@ -3281,7 +3355,12 @@ export type BbSelectPopoverProps<Item> = {
|
|
|
3281
3355
|
[K in `pt:${BbSelectPopoverOptionPtPart}`]?:
|
|
3282
3356
|
| PtValue
|
|
3283
3357
|
| ((
|
|
3284
|
-
ctx: PtItemCtx<
|
|
3358
|
+
ctx: PtItemCtx<
|
|
3359
|
+
PtNoInfer<Item>,
|
|
3360
|
+
BbSelectPopoverPtState,
|
|
3361
|
+
never,
|
|
3362
|
+
BbSelectSlotRow<PtNoInfer<Item>, PtNoInfer<Known>>
|
|
3363
|
+
>
|
|
3285
3364
|
) => PtItemResult);
|
|
3286
3365
|
} & {
|
|
3287
3366
|
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
@@ -3293,7 +3372,9 @@ export type BbSelectPopoverProps<Item> = {
|
|
|
3293
3372
|
BbSelectPopoverPtPart,
|
|
3294
3373
|
BbSelectPopoverOptionPtPart,
|
|
3295
3374
|
BbSelectPopoverPtState,
|
|
3296
|
-
PtNoInfer<Item
|
|
3375
|
+
PtNoInfer<Item>,
|
|
3376
|
+
never,
|
|
3377
|
+
BbSelectSlotRow<PtNoInfer<Item>, PtNoInfer<Known>>
|
|
3297
3378
|
>;
|
|
3298
3379
|
/**
|
|
3299
3380
|
* External activator element or component ref.
|
|
@@ -3472,11 +3553,11 @@ export type BbSelectPopoverProps<Item> = {
|
|
|
3472
3553
|
/**
|
|
3473
3554
|
* `{ value, label }` rows naming the value the app already holds, whatever
|
|
3474
3555
|
* the options' shape: the activator's `text` with no request until the
|
|
3475
|
-
* first open (`prefill: true` still loads). Not options
|
|
3476
|
-
*
|
|
3556
|
+
* first open (`prefill: true` still loads). Not options: accessors never
|
|
3557
|
+
* run on them; slots get one as `item`, `known: true`, until the list
|
|
3477
3558
|
* brings its own.
|
|
3478
3559
|
*/
|
|
3479
|
-
knownItems?:
|
|
3560
|
+
knownItems?: [Known] extends [undefined] ? BbSelectKnownItems : Known;
|
|
3480
3561
|
/**
|
|
3481
3562
|
* Display the loading state styles.
|
|
3482
3563
|
*/
|
|
@@ -3671,15 +3752,16 @@ export type BbSelectPopoverActivatorSlotProps = {
|
|
|
3671
3752
|
};
|
|
3672
3753
|
|
|
3673
3754
|
/** Props exposed by the `option` slot. */
|
|
3674
|
-
export type BbSelectPopoverOptionSlotProps<
|
|
3755
|
+
export type BbSelectPopoverOptionSlotProps<
|
|
3756
|
+
Item,
|
|
3757
|
+
Known extends BbSelectKnownItems | undefined = undefined,
|
|
3758
|
+
> = BbSelectSlotRow<Item, Known> & {
|
|
3675
3759
|
/** Whether this option is disabled. */
|
|
3676
3760
|
disabled: boolean;
|
|
3677
3761
|
/** Whether this option currently has keyboard focus. */
|
|
3678
3762
|
focused: boolean;
|
|
3679
3763
|
/** Zero-based index of this option in the list. */
|
|
3680
3764
|
index: number;
|
|
3681
|
-
/** The raw item from the `items` prop. */
|
|
3682
|
-
item: Item;
|
|
3683
3765
|
/** Whether items are still being fetched. */
|
|
3684
3766
|
loading: boolean;
|
|
3685
3767
|
/** Whether this option is currently selected. */
|
|
@@ -3721,9 +3803,19 @@ export type BbSelectPopoverPanelSlotProps = {
|
|
|
3721
3803
|
query: string;
|
|
3722
3804
|
/** The resolved options that are currently selected. */
|
|
3723
3805
|
selectedOptions: BbSelectResolvedOption[];
|
|
3806
|
+
/**
|
|
3807
|
+
* Bind it as the `id` of a heading in `#header`: on the phone sheet the
|
|
3808
|
+
* dialog is labelled by it (`aria-labelledby`); on the desktop panel the
|
|
3809
|
+
* listbox keeps the trigger's name, and the id is there so one markup
|
|
3810
|
+
* serves both.
|
|
3811
|
+
*/
|
|
3812
|
+
titleId: string;
|
|
3724
3813
|
};
|
|
3725
3814
|
|
|
3726
|
-
export type BbSelectPopoverSlots<
|
|
3815
|
+
export type BbSelectPopoverSlots<
|
|
3816
|
+
Item,
|
|
3817
|
+
Known extends BbSelectKnownItems | undefined = undefined,
|
|
3818
|
+
> = {
|
|
3727
3819
|
/**
|
|
3728
3820
|
* Replaces the default trigger element that opens the select popover.
|
|
3729
3821
|
*/
|
|
@@ -3755,9 +3847,12 @@ export type BbSelectPopoverSlots<Item> = {
|
|
|
3755
3847
|
*/
|
|
3756
3848
|
empty?: (props: { query: string; focus: () => void; error: unknown }) => any;
|
|
3757
3849
|
/**
|
|
3758
|
-
* Replaces the default rendering of each option row in the dropdown.
|
|
3850
|
+
* Replaces the default rendering of each option row in the dropdown. With
|
|
3851
|
+
* `known-items` bound, a row the list has not brought yet is the known
|
|
3852
|
+
* `{ value, label }` row, `known: true`: check `known` before reading an
|
|
3853
|
+
* option field off `item`.
|
|
3759
3854
|
*/
|
|
3760
|
-
option?: (props: BbSelectPopoverOptionSlotProps<Item>) => any;
|
|
3855
|
+
option?: (props: BbSelectPopoverOptionSlotProps<Item, Known>) => any;
|
|
3761
3856
|
};
|
|
3762
3857
|
```
|
|
3763
3858
|
|
|
@@ -477,7 +477,7 @@ const rowListeners = (option: Option) => ({
|
|
|
477
477
|
onMouseup: (event: MouseEvent) => emit('mouseup', event),
|
|
478
478
|
});
|
|
479
479
|
|
|
480
|
-
/** One row's native switch: named by its text
|
|
480
|
+
/** One row's native switch: named by its text alone, described by the group then its own description. */
|
|
481
481
|
const rowInputAttrs = (
|
|
482
482
|
option: Option,
|
|
483
483
|
index: number,
|
|
@@ -538,18 +538,39 @@ const rowIconSlotProps = (
|
|
|
538
538
|
|
|
539
539
|
```ts
|
|
540
540
|
import type { BbCheckboxIconSlotProps } from '../BbCheckbox/types';
|
|
541
|
-
import {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
type BbCheckboxGroupProps,
|
|
541
|
+
import type {
|
|
542
|
+
BbCheckboxGroupBaseProps,
|
|
543
|
+
BbCheckboxGroupEvents,
|
|
545
544
|
} from '../BbCheckboxGroup/types';
|
|
545
|
+
import {
|
|
546
|
+
GROUP_PT_PARTS,
|
|
547
|
+
GROUP_PT_STATES,
|
|
548
|
+
GROUP_ROW_PT_PARTS,
|
|
549
|
+
GROUP_ROW_PT_STATES,
|
|
550
|
+
type GroupPtMap,
|
|
551
|
+
type PtNoInfer,
|
|
552
|
+
} from '@/types/passthrough';
|
|
546
553
|
import type { CommonFieldAsteriskSlotProps } from '../CommonField/types';
|
|
547
554
|
|
|
548
|
-
/**
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
export
|
|
555
|
+
/**
|
|
556
|
+
* `BbSwitchGroup`'s passthrough vocabulary: BbCheckboxGroup's, without the
|
|
557
|
+
* `variant` indicator (BbTabs' looks are the checkbox group's alone).
|
|
558
|
+
*/
|
|
559
|
+
export const BB_SWITCH_GROUP_PT = {
|
|
560
|
+
parts: GROUP_PT_PARTS,
|
|
561
|
+
states: GROUP_PT_STATES,
|
|
562
|
+
rowParts: GROUP_ROW_PT_PARTS,
|
|
563
|
+
rowStates: GROUP_ROW_PT_STATES,
|
|
564
|
+
} as const;
|
|
565
|
+
|
|
566
|
+
/** BbCheckboxGroup's props without its `variant` (and the `indicator` part). */
|
|
567
|
+
export type BbSwitchGroupProps<T = any> = BbCheckboxGroupBaseProps<T> & {
|
|
568
|
+
/**
|
|
569
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
570
|
+
* without the prefix. See the `pt:<part>` row.
|
|
571
|
+
*/
|
|
572
|
+
pt?: GroupPtMap<PtNoInfer<T>>;
|
|
573
|
+
};
|
|
553
574
|
|
|
554
575
|
/** Re-export for consumers importing events type from BbSwitchGroup. */
|
|
555
576
|
export type BbSwitchGroupEvents = BbCheckboxGroupEvents;
|
|
@@ -966,6 +987,19 @@ export type BbSwitchGroupSlots<T> = {
|
|
|
966
987
|
}
|
|
967
988
|
}
|
|
968
989
|
|
|
990
|
+
/* A side hidden with the library's or Tailwind's hiding classes takes its gap
|
|
991
|
+
with it (ATT-11 e): `hideLabel` / `pt:label="sr-only"` (out of flow) or
|
|
992
|
+
`pt:icon="hidden"` would leave an empty track AND the gap beside it (the
|
|
993
|
+
row gap in a `vertical` item, Q76.11 c), and the side still shown sat
|
|
994
|
+
off-centre. `:where` keeps the rule at the row's
|
|
995
|
+
one class, so a consumer `gap-*` on `pt:item` still wins. */
|
|
996
|
+
.bb-switch-group__item:where(
|
|
997
|
+
:has(> .bb-switch-group__label:is(.bb-sr-only, .sr-only)),
|
|
998
|
+
:has(> .bb-toggle-input + :is(.hidden, .sr-only, .bb-sr-only))
|
|
999
|
+
) {
|
|
1000
|
+
gap: 0;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
969
1003
|
.bb-switch-group__label {
|
|
970
1004
|
color: var(--bb-text);
|
|
971
1005
|
font-size: var(--bb-label-fs);
|
|
@@ -998,6 +1032,32 @@ export type BbSwitchGroupSlots<T> = {
|
|
|
998
1032
|
user-select: none;
|
|
999
1033
|
}
|
|
1000
1034
|
|
|
1035
|
+
/*
|
|
1036
|
+
* `tiles` (ATT-11 d): the invisible native input covers the WHOLE tile,
|
|
1037
|
+
* padding included, not only the glyph's cell, so a click, a hover tooltip on
|
|
1038
|
+
* the input and a test runner's hit-target check land on it anywhere on the
|
|
1039
|
+
* tile. `grid-area: auto` is load-bearing: an absolutely positioned grid child
|
|
1040
|
+
* is sized against its grid area, so `inset: 0` would still be the glyph
|
|
1041
|
+
* cell. A link or a button inside a tile sits above the input and keeps its
|
|
1042
|
+
* own click. List rows keep the cell overlay.
|
|
1043
|
+
*/
|
|
1044
|
+
.bb-switch-group__list--tiles > .bb-switch-group__item {
|
|
1045
|
+
position: relative;
|
|
1046
|
+
|
|
1047
|
+
> .bb-toggle-input {
|
|
1048
|
+
border-radius: inherit;
|
|
1049
|
+
grid-area: auto;
|
|
1050
|
+
inset: 0;
|
|
1051
|
+
position: absolute;
|
|
1052
|
+
z-index: 1;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
:is(a, button) {
|
|
1056
|
+
position: relative;
|
|
1057
|
+
z-index: 2;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1001
1061
|
/* ---- Touch targets (Q44.19) -------------------------------------------
|
|
1002
1062
|
* A row is one label line (`--bb-label-lh`, 18px) and the rows sit
|
|
1003
1063
|
* `--row-gap` (10px) apart. On a coarse pointer only, each row gets an
|