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
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
`role="none"`: Chromium exposes every `[popover]` element as an unnamed group
|
|
36
36
|
of its own, around the `role="tooltip"` span (Q62.3, measured in the AX tree,
|
|
37
37
|
BbTooltip.axTree.test.ts); BbHoverCard's read-only card says the same.
|
|
38
|
+
`aria-hidden` (ATT-11): the bubble renders next to its activator, so inside a
|
|
39
|
+
`<label>` its text joined the control's name; its text reaches assistive tech
|
|
40
|
+
as the description above, and a describedby target is read even when hidden.
|
|
38
41
|
Mounted on the first open (or at once with `eager`), never before (Q63.5):
|
|
39
42
|
a closed tooltip is the description node above and the activator's
|
|
40
43
|
listeners, so a thousand of them cost half the instances and under a third of
|
|
@@ -45,6 +48,7 @@
|
|
|
45
48
|
ref="popover"
|
|
46
49
|
v-model="popoverOpen"
|
|
47
50
|
:anchor="activatorEl"
|
|
51
|
+
aria-hidden="true"
|
|
48
52
|
:arrow-padding="arrowPadding"
|
|
49
53
|
:boundary="boundary"
|
|
50
54
|
class="bb-tooltip"
|
|
@@ -99,17 +103,23 @@ import { removedPropsFor } from '@/deprecation/removedProps';
|
|
|
99
103
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
100
104
|
import CommonPopover from '../CommonPopover/CommonPopover.vue';
|
|
101
105
|
import { useElementSize } from '@vueuse/core';
|
|
102
|
-
import {
|
|
106
|
+
import {
|
|
107
|
+
domElement,
|
|
108
|
+
extractDomContainer,
|
|
109
|
+
type DomHost,
|
|
110
|
+
} from '@/utilities/functions/extractDomContainer';
|
|
103
111
|
import {
|
|
104
112
|
BB_TOOLTIP_PT,
|
|
105
113
|
type BbTooltipProps,
|
|
106
114
|
type BbTooltipSlots,
|
|
107
115
|
} from './types';
|
|
108
|
-
import { usePassthrough } from '@/composables/usePassthrough';
|
|
116
|
+
import { usePassthrough, variantPt } from '@/composables/usePassthrough';
|
|
109
117
|
import { transitions } from '@/utilities/misc/transitions';
|
|
110
118
|
export type { BbTooltipProps, BbTooltipSlots };
|
|
111
119
|
|
|
112
120
|
defineOptions({
|
|
121
|
+
// An app's own variants as declared `pt:<part>:<name>` props (Q76.7).
|
|
122
|
+
mixins: [variantPt(BB_TOOLTIP_PT)],
|
|
113
123
|
inheritAttrs: false,
|
|
114
124
|
});
|
|
115
125
|
|
|
@@ -141,6 +151,7 @@ const passthrough = usePassthrough({
|
|
|
141
151
|
parts: BB_TOOLTIP_PT.parts,
|
|
142
152
|
states: BB_TOOLTIP_PT.states,
|
|
143
153
|
active: { open: () => open.value },
|
|
154
|
+
variant: { ...BB_TOOLTIP_PT.variant, current: () => props.variant },
|
|
144
155
|
});
|
|
145
156
|
|
|
146
157
|
if (process.env.NODE_ENV !== 'production')
|
|
@@ -191,7 +202,7 @@ const resolvedDescription = computed(() => {
|
|
|
191
202
|
props.text ?? (canReadSlots.value ? slotToText(slots.default?.({})) : '');
|
|
192
203
|
return raw.replace(/\s+/g, ' ').trim();
|
|
193
204
|
});
|
|
194
|
-
const activatorEl = ref<
|
|
205
|
+
const activatorEl = ref<DomHost>();
|
|
195
206
|
const hasExternalActivator = computed(() => props.activator != null);
|
|
196
207
|
const popoverRef = useTemplateRef('popover');
|
|
197
208
|
const popoverDom = computed(() => extractDomContainer(popoverRef.value));
|
|
@@ -357,10 +368,19 @@ watch(
|
|
|
357
368
|
|
|
358
369
|
// --- Sync external activator prop ---
|
|
359
370
|
|
|
371
|
+
// A selector is looked up once the tooltip is in the document (the whole render
|
|
372
|
+
// is by `onMounted`), and again whenever the prop changes.
|
|
373
|
+
const isMounted = ref(false);
|
|
374
|
+
onMounted(() => {
|
|
375
|
+
isMounted.value = true;
|
|
376
|
+
});
|
|
377
|
+
|
|
360
378
|
watch(
|
|
361
|
-
() => props.activator,
|
|
362
|
-
(val) => {
|
|
363
|
-
if (val)
|
|
379
|
+
[() => props.activator, isMounted],
|
|
380
|
+
([val, mounted]) => {
|
|
381
|
+
if (typeof val !== 'string') {
|
|
382
|
+
if (val) setActivatorRef(val);
|
|
383
|
+
} else if (mounted) setActivatorRef(document.querySelector(val));
|
|
364
384
|
},
|
|
365
385
|
{ immediate: true }
|
|
366
386
|
);
|
|
@@ -426,9 +446,9 @@ watch(
|
|
|
426
446
|
const ownTokens = new Set([id, descId]);
|
|
427
447
|
|
|
428
448
|
/** The element currently carrying our token, so an activator swap can clean it. */
|
|
429
|
-
let describedByHost:
|
|
449
|
+
let describedByHost: DomHost | null = null;
|
|
430
450
|
|
|
431
|
-
const setDescribedBy = (el:
|
|
451
|
+
const setDescribedBy = (el: DomHost, token: string | null) => {
|
|
432
452
|
const tokens = (el.getAttribute('aria-describedby') ?? '')
|
|
433
453
|
.split(/\s+/)
|
|
434
454
|
.filter((entry) => entry && !ownTokens.has(entry));
|
|
@@ -498,7 +518,9 @@ const percentWidth = computed(() => {
|
|
|
498
518
|
// Only `%` widths need the activator measured — skip the ResizeObserver for
|
|
499
519
|
// fixed widths and the (common) no-width case.
|
|
500
520
|
const { width: activatorWidth } = useElementSize(
|
|
501
|
-
computed(() =>
|
|
521
|
+
computed(() =>
|
|
522
|
+
domElement(percentWidth.value != null ? activatorEl.value : undefined)
|
|
523
|
+
),
|
|
502
524
|
{ width: 0, height: 0 },
|
|
503
525
|
{
|
|
504
526
|
box: 'border-box',
|
|
@@ -544,12 +566,14 @@ onDeactivated(forceClose);
|
|
|
544
566
|
## Types
|
|
545
567
|
|
|
546
568
|
```ts
|
|
547
|
-
import
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
} from '@/types/
|
|
569
|
+
import {
|
|
570
|
+
TOOLTIP_VARIANTS,
|
|
571
|
+
type TooltipVariantBuiltIn,
|
|
572
|
+
type TooltipVariantRegistry,
|
|
573
|
+
type TooltipVariantType,
|
|
574
|
+
} from '@/types/TooltipVariant';
|
|
575
|
+
import type { PtMap, PtValue, PtVariantAttrs } from '@/types/passthrough';
|
|
576
|
+
import type { ElementOrComponentRefOrSelector } from '@/types/CommonProps';
|
|
553
577
|
import type { Placement } from '@/types/Placement';
|
|
554
578
|
|
|
555
579
|
/**
|
|
@@ -577,9 +601,12 @@ export type BbTooltipPtState = 'open';
|
|
|
577
601
|
export const BB_TOOLTIP_PT = {
|
|
578
602
|
parts: ['root', 'panel'],
|
|
579
603
|
states: ['open'],
|
|
604
|
+
// The `variant` is a state on every part (Q76.7), below `open`.
|
|
605
|
+
variant: { names: TOOLTIP_VARIANTS, option: 'tooltipVariants' },
|
|
580
606
|
} as const satisfies {
|
|
581
607
|
parts: readonly BbTooltipPtPart[];
|
|
582
608
|
states: readonly BbTooltipPtState[];
|
|
609
|
+
variant: { names: readonly TooltipVariantBuiltIn[]; option: string };
|
|
583
610
|
};
|
|
584
611
|
|
|
585
612
|
// Spelled INLINE with this component's own unions (Vue's SFC type resolver
|
|
@@ -588,104 +615,112 @@ export const BB_TOOLTIP_PT = {
|
|
|
588
615
|
export type BbTooltipProps = {
|
|
589
616
|
[K in
|
|
590
617
|
| `pt:${BbTooltipPtPart}`
|
|
591
|
-
| `pt:${BbTooltipPtPart}:${BbTooltipPtState}`
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
618
|
+
| `pt:${BbTooltipPtPart}:${BbTooltipPtState}`
|
|
619
|
+
| `pt:${BbTooltipPtPart}:${TooltipVariantBuiltIn}`]?: PtValue;
|
|
620
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
621
|
+
BbTooltipPtPart,
|
|
622
|
+
keyof TooltipVariantRegistry
|
|
623
|
+
> & {
|
|
624
|
+
/**
|
|
625
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
626
|
+
* without the prefix. See the `pt:<part>` row.
|
|
627
|
+
*/
|
|
628
|
+
pt?: PtMap<
|
|
629
|
+
BbTooltipPtPart,
|
|
630
|
+
BbTooltipPtState | TooltipVariantBuiltIn | keyof TooltipVariantRegistry
|
|
631
|
+
>;
|
|
632
|
+
/**
|
|
633
|
+
* Space the arrow will maintain to the edge of the tooltip bubble.
|
|
634
|
+
* Useful when the floating element has border radius so it won't appear broken
|
|
635
|
+
*
|
|
636
|
+
* @defaultValue `10`
|
|
637
|
+
*/
|
|
638
|
+
arrowPadding?: number;
|
|
639
|
+
/**
|
|
640
|
+
* Disables the component
|
|
641
|
+
*/
|
|
642
|
+
disabled?: boolean;
|
|
643
|
+
/**
|
|
644
|
+
* Renders the tooltip's popover and content at mount instead of on the
|
|
645
|
+
* first open. The description screen readers hear exists from mount either
|
|
646
|
+
* way.
|
|
647
|
+
*/
|
|
648
|
+
eager?: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Hides the tooltip arrow. A tooltip shows its arrow by default (it's the
|
|
651
|
+
* one popover-family surface where an arrow is meaningful — a speech bubble
|
|
652
|
+
* pointing at its anchor); set this to drop it.
|
|
653
|
+
*
|
|
654
|
+
* @defaultValue `false`
|
|
655
|
+
*/
|
|
656
|
+
hideArrow?: boolean;
|
|
657
|
+
/**
|
|
658
|
+
* Seed for the tooltip's internal id. It is **prefixed** (`bb_<id>`) and set
|
|
659
|
+
* on the inner content element, not on the root — so
|
|
660
|
+
* `document.getElementById(theIdYouPassed)` finds nothing. Pass it to make
|
|
661
|
+
* the generated id stable (SSR snapshots, tests), not to look the element
|
|
662
|
+
* up.
|
|
663
|
+
*/
|
|
664
|
+
id?: string;
|
|
665
|
+
/**
|
|
666
|
+
* Minimum empty space to keep from the edge of the page
|
|
667
|
+
*
|
|
668
|
+
* @defaultValue `10`
|
|
669
|
+
*/
|
|
670
|
+
padding?: number;
|
|
671
|
+
/**
|
|
672
|
+
* Position of the overlay in respect to the related activator.
|
|
673
|
+
*
|
|
674
|
+
* @defaultValue `'top'`
|
|
675
|
+
*/
|
|
676
|
+
placement?: Placement;
|
|
677
|
+
/**
|
|
678
|
+
* Text content of the component.
|
|
679
|
+
*/
|
|
680
|
+
text?: string;
|
|
681
|
+
/**
|
|
682
|
+
* How long the transition has to last in milliseconds
|
|
683
|
+
*
|
|
684
|
+
* @defaultValue `250`
|
|
685
|
+
*/
|
|
686
|
+
transitionDuration?: number;
|
|
687
|
+
/**
|
|
688
|
+
* External activator: an HTMLElement, a Vue component ref, or a CSS
|
|
689
|
+
* selector string (looked up in the document once the tooltip mounts).
|
|
690
|
+
* When provided, the activator slot is not rendered and event listeners
|
|
691
|
+
* are attached programmatically to the referenced element.
|
|
692
|
+
*/
|
|
693
|
+
activator?: ElementOrComponentRefOrSelector;
|
|
694
|
+
/**
|
|
695
|
+
* Constrains the tooltip within a bounding element: it stays inside it
|
|
696
|
+
* alongside its trigger (sideways for a tooltip above or below); away from
|
|
697
|
+
* the trigger it may pass the edge, and it flips at the viewport only.
|
|
698
|
+
* Accepts an HTMLElement, a Vue component ref, or a CSS selector string.
|
|
699
|
+
*/
|
|
700
|
+
boundary?: ElementOrComponentRefOrSelector;
|
|
701
|
+
/**
|
|
702
|
+
* Visual variant. `'default'` is the inverted (primary) bubble,
|
|
703
|
+
* `'destructive'` is the danger-tinted bubble for warnings. Any other
|
|
704
|
+
* string is applied as a `bb-tooltip--<name>` class hook.
|
|
705
|
+
*
|
|
706
|
+
* @defaultValue `'default'`
|
|
707
|
+
*/
|
|
708
|
+
variant?: BbTooltipVariant;
|
|
709
|
+
/**
|
|
710
|
+
* Milliseconds a pointer rests on the activator before the tooltip shows
|
|
711
|
+
* (`0`: at once). Keyboard focus shows it at once, and so does a pointer
|
|
712
|
+
* arriving while another tooltip shows or within 300 ms of one closing.
|
|
713
|
+
*
|
|
714
|
+
* @defaultValue `100`
|
|
715
|
+
*/
|
|
716
|
+
delay?: number;
|
|
717
|
+
/**
|
|
718
|
+
* Caps the bubble's width (it still shrinks to its text): a number is px, a
|
|
719
|
+
* percentage is of the activator, any other CSS length passes through.
|
|
720
|
+
* Replaces the default `40ch` cap, also `--max-w` on the tooltip root.
|
|
721
|
+
*/
|
|
722
|
+
width?: number | string;
|
|
723
|
+
};
|
|
689
724
|
|
|
690
725
|
/** Props exposed by the `activator` slot. */
|
|
691
726
|
export type BbTooltipActivatorSlotProps = {
|
|
@@ -200,11 +200,15 @@ const middleware = computed(() => {
|
|
|
200
200
|
];
|
|
201
201
|
});
|
|
202
202
|
|
|
203
|
+
const openPlacement = ref(props.placement);
|
|
204
|
+
|
|
203
205
|
const { floatingStyles, placement, middlewareData, update } = useFloating(
|
|
204
206
|
anchor,
|
|
205
207
|
wrapper,
|
|
206
208
|
{
|
|
207
|
-
|
|
209
|
+
// Latched at each open (`toggle()`): a change while open applies at the
|
|
210
|
+
// next open, so an open panel never jumps; flip and shift stay live.
|
|
211
|
+
placement: openPlacement,
|
|
208
212
|
middleware,
|
|
209
213
|
strategy: 'fixed',
|
|
210
214
|
// Without this, floating-ui computes a position the moment both elements
|
|
@@ -262,6 +266,7 @@ const { execute: toggle, cancel: cancelToggle } = useCancelableFunction(
|
|
|
262
266
|
signal.addEventListener('abort', eventListener);
|
|
263
267
|
if (value) {
|
|
264
268
|
emit('show');
|
|
269
|
+
openPlacement.value = props.placement;
|
|
265
270
|
showPopover();
|
|
266
271
|
update();
|
|
267
272
|
// Signal-bound: a close (or unmount) that aborts this execution
|
|
@@ -38,15 +38,25 @@
|
|
|
38
38
|
<span class="bb-listbox__outer-container scrollbar-border">
|
|
39
39
|
<span ref="inner" class="bb-listbox__inner-container" tabindex="-1">
|
|
40
40
|
<slot name="options:prepend"></slot>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<span
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
<!-- The empty / loading row is announced: it renders inside a
|
|
42
|
+
polite region that is always there, so the row appearing is a
|
|
43
|
+
change a reader speaks (a region that appears with its text is
|
|
44
|
+
not). What is read is what shows, the slot's or ours. The failed
|
|
45
|
+
footer is a status of its own; the empty row stays out then. -->
|
|
46
|
+
<span class="bb-listbox__status" role="status">
|
|
47
|
+
<span v-if="loading && !hasOptions" class="bb-listbox__loading">
|
|
48
|
+
<slot name="loading">{{
|
|
49
|
+
loadingText || t('common.loadingText').value
|
|
50
|
+
}}</slot>
|
|
51
|
+
</span>
|
|
52
|
+
<span
|
|
53
|
+
v-else-if="!hasOptions && !failedText"
|
|
54
|
+
class="bb-listbox__empty"
|
|
55
|
+
>
|
|
56
|
+
<slot name="empty">{{
|
|
57
|
+
emptyText || t('common.emptyText').value
|
|
58
|
+
}}</slot>
|
|
59
|
+
</span>
|
|
50
60
|
</span>
|
|
51
61
|
<!-- eslint-disable vue/attributes-order -- `pt` binds LAST so a consumer listener runs after ours (PASSTHROUGH.md T17) -->
|
|
52
62
|
<span
|
|
@@ -34,15 +34,25 @@
|
|
|
34
34
|
<span class="bb-listbox__outer-container scrollbar-border">
|
|
35
35
|
<span ref="inner" class="bb-listbox__inner-container" tabindex="-1">
|
|
36
36
|
<slot name="options:prepend"></slot>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<span
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
<!-- The empty / loading row is announced: it renders inside a
|
|
38
|
+
polite region that is always there, so the row appearing is a
|
|
39
|
+
change a reader speaks (a region that appears with its text is
|
|
40
|
+
not). What is read is what shows, the slot's or ours. The failed
|
|
41
|
+
footer is a status of its own; the empty row stays out then. -->
|
|
42
|
+
<span class="bb-listbox__status" role="status">
|
|
43
|
+
<span v-if="loading && !hasOptions" class="bb-listbox__loading">
|
|
44
|
+
<slot name="loading">{{
|
|
45
|
+
loadingText || t('common.loadingText').value
|
|
46
|
+
}}</slot>
|
|
47
|
+
</span>
|
|
48
|
+
<span
|
|
49
|
+
v-else-if="!hasOptions && !failedText"
|
|
50
|
+
class="bb-listbox__empty"
|
|
51
|
+
>
|
|
52
|
+
<slot name="empty">{{
|
|
53
|
+
emptyText || t('common.emptyText').value
|
|
54
|
+
}}</slot>
|
|
55
|
+
</span>
|
|
46
56
|
</span>
|
|
47
57
|
<!-- eslint-disable vue/attributes-order -- `pt` binds LAST so a consumer listener runs after ours (PASSTHROUGH.md T17) -->
|
|
48
58
|
<span
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
[`${classes.root}--errors`]: hasErrors,
|
|
16
16
|
[`${classes.root}--warnings`]: showWarning,
|
|
17
17
|
[`${classes.root}--${resolvedListLayout}`]: true,
|
|
18
|
+
[`${classes.root}--strip`]: !!variant,
|
|
19
|
+
[`${classes.root}--${variant}`]: !!variant,
|
|
20
|
+
[`${classes.root}--no-transition`]: !!variant && !indicatorReady,
|
|
18
21
|
},
|
|
19
22
|
]"
|
|
20
23
|
v-bind="passthrough?.list"
|
|
@@ -65,7 +68,7 @@
|
|
|
65
68
|
option.description ? descriptionId(index) : undefined
|
|
66
69
|
"
|
|
67
70
|
:index="index"
|
|
68
|
-
:label-id="
|
|
71
|
+
:label-id="textId(index)"
|
|
69
72
|
name="input"
|
|
70
73
|
:option="option"
|
|
71
74
|
:row-states="rowStates(option, index)"
|
|
@@ -212,11 +215,11 @@ const itemRatioStyle = computed(() => {
|
|
|
212
215
|
|
|
213
216
|
/**
|
|
214
217
|
* Per-row ids for the option text and its description. The row is a `<label>`
|
|
215
|
-
* wrapping the input, the text AND the description, so the
|
|
216
|
-
* would be "Text Description".
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
218
|
+
* wrapping the input, the `icon` slot, the text AND the description, so the
|
|
219
|
+
* input's native name would be "Icon Text Description". Every row hands the
|
|
220
|
+
* text's id to the `input` slot (`labelId`), so the input is named by its text
|
|
221
|
+
* alone (ATT-11: an icon with a name of its own joined it), and a described
|
|
222
|
+
* row also hands `descriptionId`, so the description describes it.
|
|
220
223
|
*/
|
|
221
224
|
const uid = useId().id;
|
|
222
225
|
const textId = (index: number) => `${uid.value}-option-${index}__text`;
|
|
@@ -334,6 +337,19 @@ export type OptionsContainerProps<T = any> = {
|
|
|
334
337
|
*/
|
|
335
338
|
listLayout?: ListLayout;
|
|
336
339
|
|
|
340
|
+
/**
|
|
341
|
+
* A tab-strip look on the list (Q76.11 d): `--strip` plus the variant's
|
|
342
|
+
* class hook (`--pill`, `--line`, a registered name), the strip and its
|
|
343
|
+
* triggers (choice-strip.css). The owning group renders the indicators.
|
|
344
|
+
*/
|
|
345
|
+
variant?: string;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* With a `variant`: the indicators have been measured and painted, so they
|
|
349
|
+
* may transition. Until then the list is `--no-transition`.
|
|
350
|
+
*/
|
|
351
|
+
indicatorReady?: boolean;
|
|
352
|
+
|
|
337
353
|
/**
|
|
338
354
|
* Define if the component should be in an error state.
|
|
339
355
|
* It usually attaches a CSS class for styling purposes.
|
|
@@ -412,10 +428,10 @@ export type OptionsContainerInputSlotProps<T = any> = {
|
|
|
412
428
|
/** The full internal Option object for this row. */
|
|
413
429
|
option: Option<T>;
|
|
414
430
|
/**
|
|
415
|
-
* Id of the row's text
|
|
416
|
-
*
|
|
431
|
+
* Id of the row's text. Pass as `aria-labelledby` so the `icon` slot and the
|
|
432
|
+
* description stay out of the input's name.
|
|
417
433
|
*/
|
|
418
|
-
labelId: string
|
|
434
|
+
labelId: string;
|
|
419
435
|
/**
|
|
420
436
|
* Id of the row's description, set only when it has one. Add it to the
|
|
421
437
|
* input's `aria-describedby` (see `withItemDescribedby`).
|