bitboss-ui 3.0.0-beta.67 → 3.0.0-beta.68
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 +1 -1
- package/bin/bitboss-ui-mcp.mjs +87 -19
- package/bin/bitboss-ui.mjs +6 -2
- package/dist/ai/BbAlert.md +15 -11
- package/dist/ai/BbAsterisk.md +1 -1
- package/dist/ai/BbAvatar.md +2 -2
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbBaseCheckboxIcon.md +4 -0
- package/dist/ai/BbBaseRadioIcon.md +7 -3
- package/dist/ai/BbBaseSwitchIcon.md +11 -2
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +62 -9
- package/dist/ai/BbCalendar.md +1 -1
- package/dist/ai/BbCheckbox.md +23 -5
- package/dist/ai/BbCheckboxGroup.md +52 -25
- package/dist/ai/BbColorInput.md +13 -12
- package/dist/ai/BbColorPalette.md +5 -5
- package/dist/ai/BbConfigScope.md +218 -0
- package/dist/ai/BbConfirm.md +24 -21
- package/dist/ai/BbDatePicker.md +4 -4
- package/dist/ai/BbDatePickerInput.md +16 -15
- package/dist/ai/BbDialog.md +10 -9
- package/dist/ai/BbDropdown.md +26 -16
- package/dist/ai/BbDropdownButton.md +18 -18
- package/dist/ai/BbDropzone.md +1 -1
- package/dist/ai/BbForm.md +6 -4
- package/dist/ai/BbHost.md +19 -13
- package/dist/ai/BbIcon.md +3 -3
- package/dist/ai/BbIndicator.md +4 -4
- package/dist/ai/BbNumberInput.md +17 -13
- package/dist/ai/BbOffCanvas.md +4 -3
- package/dist/ai/BbPagination.md +10 -2
- package/dist/ai/BbPopover.md +5 -5
- package/dist/ai/BbRadio.md +23 -4
- package/dist/ai/BbRadioGroup.md +69 -30
- package/dist/ai/BbRating.md +5 -5
- package/dist/ai/BbSelect.md +74 -39
- package/dist/ai/BbSelectPopover.md +28 -26
- package/dist/ai/BbSlider.md +258 -61
- package/dist/ai/BbSpinner.md +2 -2
- package/dist/ai/BbSwitch.md +27 -4
- package/dist/ai/BbSwitchGroup.md +22 -13
- package/dist/ai/BbTable.md +10 -5
- package/dist/ai/BbTabs.md +6 -6
- package/dist/ai/BbTabsRoot.md +1 -1
- package/dist/ai/BbTag.md +12 -11
- package/dist/ai/BbTextInput.md +25 -17
- package/dist/ai/BbTextarea.md +15 -14
- package/dist/ai/BbTimePicker.md +3 -3
- package/dist/ai/BbTimePickerInput.md +12 -11
- package/dist/ai/BbToast.md +65 -26
- package/dist/ai/BbTooltip.md +2 -2
- package/dist/ai/CommonField.md +2 -2
- package/dist/ai/CommonFieldInput.md +2 -1
- package/dist/ai/FlatListBox.md +4 -3
- package/dist/ai/GroupedListBox.md +4 -3
- package/dist/ai/ListBox.md +5 -4
- package/dist/ai/OptionsContainer.md +17 -1
- package/dist/ai/changelog.json +454 -7
- package/dist/ai/components.json +77 -69
- package/dist/ai/composables/useBbConfig.md +3 -3
- package/dist/ai/composables/useBbDialog.md +1 -1
- package/dist/ai/composables/useBbFormField.md +1 -1
- package/dist/ai/composables/useConfirm.md +1 -1
- package/dist/ai/composables/useToast.md +16 -16
- package/dist/ai/design-tokens.json +10 -5
- package/dist/ai/guides/agent-contract.md +8 -8
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/app-layout.md +1 -1
- package/dist/ai/guides/design-language.md +17 -13
- package/dist/ai/guides/design-tokens.md +81 -42
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +1 -1
- package/dist/ai/guides/inline-edit-playbook.md +1 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +335 -161
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +1 -1
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +15 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +2 -2
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -1
- package/dist/ai/guides/migration/components/bb-host.md +10 -8
- package/dist/ai/guides/migration/components/bb-offcanvas.md +1 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
- package/dist/ai/guides/migration/components/bb-select.md +3 -3
- package/dist/ai/guides/migration/components/bb-slider.md +17 -2
- package/dist/ai/guides/migration/components/bb-tabs.md +1 -1
- package/dist/ai/guides/migration/components/bb-toast.md +6 -6
- package/dist/ai/guides/migration/components/use-confirm.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +191 -56
- package/dist/ai/guides/migration/v3-beta-tooling.md +2 -2
- package/dist/ai/guides/passthrough.md +140 -131
- package/dist/ai/guides/typescript-generic-components.md +7 -7
- package/dist/ai/guides/validated-forms.md +5 -5
- package/dist/ai/guides/validation-libraries.md +4 -4
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +9 -11
- package/dist/ai/manifest/components/BbAlert.json +3 -2
- package/dist/ai/manifest/components/BbAvatar.json +2 -1
- package/dist/ai/manifest/components/BbBadge.json +3 -2
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +5 -1
- package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +7 -3
- package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +9 -1
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +4 -3
- package/dist/ai/manifest/components/BbButton.tree.json +3 -1
- package/dist/ai/manifest/components/BbCalendar.tree.json +1 -0
- package/dist/ai/manifest/components/BbCheckbox.json +4 -3
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +17 -14
- package/dist/ai/manifest/components/BbCheckboxGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +25 -4
- package/dist/ai/manifest/components/BbColorInput.json +6 -5
- package/dist/ai/manifest/components/BbColorInput.tree.json +4 -3
- package/dist/ai/manifest/components/BbColorPalette.json +2 -1
- package/dist/ai/manifest/components/BbColorPalette.tree.json +2 -1
- package/dist/ai/manifest/components/BbConfigScope.json +23 -0
- package/dist/ai/manifest/components/BbConfirm.json +2 -1
- package/dist/ai/manifest/components/BbConfirm.tree.json +2 -2
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.json +6 -5
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +6 -4
- package/dist/ai/manifest/components/BbDialog.json +3 -2
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +7 -4
- package/dist/ai/manifest/components/BbDropdown.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownButton.json +11 -8
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +3 -3
- package/dist/ai/manifest/components/BbDropzone.json +1 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbIcon.json +2 -1
- package/dist/ai/manifest/components/BbIndicator.json +2 -1
- package/dist/ai/manifest/components/BbNumberInput.json +5 -4
- package/dist/ai/manifest/components/BbNumberInput.tree.json +3 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbPagination.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +2 -1
- package/dist/ai/manifest/components/BbPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadio.json +3 -2
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +21 -18
- package/dist/ai/manifest/components/BbRadioGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +25 -4
- package/dist/ai/manifest/components/BbRating.json +3 -2
- package/dist/ai/manifest/components/BbSelect.json +11 -9
- package/dist/ai/manifest/components/BbSelect.tree.json +7 -5
- package/dist/ai/manifest/components/BbSelectPopover.json +11 -9
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -2
- package/dist/ai/manifest/components/BbSlider.json +20 -18
- package/dist/ai/manifest/components/BbSlider.removed.json +3 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +4 -2
- package/dist/ai/manifest/components/BbSwitch.json +2 -1
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -5
- package/dist/ai/manifest/components/BbSwitchGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +6 -2
- package/dist/ai/manifest/components/BbTable.json +3 -2
- package/dist/ai/manifest/components/BbTable.tree.json +4 -3
- package/dist/ai/manifest/components/BbTabs.json +3 -2
- package/dist/ai/manifest/components/BbTabsRoot.json +2 -2
- package/dist/ai/manifest/components/BbTag.json +6 -5
- package/dist/ai/manifest/components/BbTag.tree.json +3 -2
- package/dist/ai/manifest/components/BbTextInput.json +5 -4
- package/dist/ai/manifest/components/BbTextInput.tree.json +3 -2
- package/dist/ai/manifest/components/BbTextarea.json +6 -5
- package/dist/ai/manifest/components/BbTextarea.tree.json +3 -2
- package/dist/ai/manifest/components/BbTimePicker.json +2 -1
- package/dist/ai/manifest/components/BbTimePicker.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +6 -5
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +5 -3
- package/dist/ai/manifest/components/BbToast.json +2 -1
- package/dist/ai/manifest/components/BbToast.tree.json +6 -1
- package/dist/ai/manifest/components/BbTooltip.json +1 -0
- package/dist/ai/manifest/components/CommonField.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +2 -0
- package/dist/ai/manifest/components/FlatListBox.json +1 -1
- package/dist/ai/manifest/components/FlatListBox.tree.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +2 -2
- package/dist/ai/manifest/components/OptionsContainer.json +3 -2
- package/dist/ai/manifest/components/OptionsContainer.tree.json +16 -1
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +16 -7
- package/dist/ai/manifest/types.advanced.json +5 -6
- package/dist/ai/manifest/types.api.json +15 -6
- package/dist/ai/manifest/types.wrapper.json +2 -2
- package/dist/ai/recipes/inertia/approvals-inbox.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/inertia/onboarding.md +2 -2
- package/dist/ai/recipes/inertia/ownership-atlas.md +2 -2
- package/dist/ai/recipes/inertia/record-form.md +2 -2
- package/dist/ai/recipes/inertia/records-workspace.md +2 -2
- package/dist/ai/recipes/inertia/settings-workspace.md +5 -4
- package/dist/ai/recipes/inertia/upload-center.md +3 -3
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/nuxt/onboarding.md +2 -2
- package/dist/ai/recipes/nuxt/ownership-atlas.md +2 -2
- package/dist/ai/recipes/nuxt/record-form.md +2 -2
- package/dist/ai/recipes/nuxt/records-workspace.md +2 -2
- package/dist/ai/recipes/nuxt/settings-workspace.md +5 -4
- package/dist/ai/recipes/nuxt/upload-center.md +4 -4
- package/dist/ai/recipes/nuxt/wizard-form.md +2 -2
- package/dist/ai/recipes/vue/approvals-inbox.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/recipes/vue/ownership-atlas.md +2 -2
- package/dist/ai/recipes/vue/record-form.md +2 -2
- package/dist/ai/recipes/vue/records-workspace.md +2 -2
- package/dist/ai/recipes/vue/settings-workspace.md +5 -4
- package/dist/ai/recipes/vue/upload-center.md +4 -4
- package/dist/ai/recipes/vue/wizard-form.md +2 -2
- package/dist/ai/source/BbAlert.md +10 -4
- package/dist/ai/source/BbAvatar.md +5 -4
- package/dist/ai/source/BbBadge.md +16 -9
- package/dist/ai/source/BbBadgeButton.md +1 -1
- package/dist/ai/source/BbBaseCheckboxIcon.md +7 -5
- package/dist/ai/source/BbBaseRadioIcon.md +17 -11
- package/dist/ai/source/BbBaseSwitchIcon.md +14 -9
- package/dist/ai/source/BbButton.md +38 -22
- package/dist/ai/source/BbCalendar.md +5 -30
- package/dist/ai/source/BbCheckbox.md +20 -7
- package/dist/ai/source/BbCheckboxGroup.md +66 -27
- package/dist/ai/source/BbColorInput.md +29 -22
- package/dist/ai/source/BbColorPalette.md +23 -22
- package/dist/ai/source/BbConfigScope.md +123 -0
- package/dist/ai/source/BbConfirm.md +5 -3
- package/dist/ai/source/BbDatePicker.md +18 -8
- package/dist/ai/source/BbDatePickerInput.md +44 -27
- package/dist/ai/source/BbDialog.md +23 -13
- package/dist/ai/source/BbDropdown.md +61 -25
- package/dist/ai/source/BbDropdownButton.md +67 -25
- package/dist/ai/source/BbDropdownGroup.md +38 -15
- package/dist/ai/source/BbForm.md +1 -1
- package/dist/ai/source/BbHost.md +4 -4
- package/dist/ai/source/BbHoverCard.md +6 -2
- package/dist/ai/source/BbIcon.md +5 -4
- package/dist/ai/source/BbIndicator.md +1 -1
- package/dist/ai/source/BbNumberInput.md +44 -30
- package/dist/ai/source/BbOffCanvas.md +17 -10
- package/dist/ai/source/BbPagination.md +10 -18
- package/dist/ai/source/BbPopover.md +17 -9
- package/dist/ai/source/BbPopoverPortal.md +2 -2
- package/dist/ai/source/BbRadio.md +18 -7
- package/dist/ai/source/BbRadioGroup.md +67 -27
- package/dist/ai/source/BbRating.md +21 -11
- package/dist/ai/source/BbSelect.md +51 -32
- package/dist/ai/source/BbSelectPopover.md +81 -38
- package/dist/ai/source/BbSlider.md +929 -565
- package/dist/ai/source/BbSwitchGroup.md +28 -9
- package/dist/ai/source/BbTable.md +17 -30
- package/dist/ai/source/BbTabs.md +5 -2
- package/dist/ai/source/BbTabsList.md +1 -1
- package/dist/ai/source/BbTabsPanels.md +1 -1
- package/dist/ai/source/BbTabsRoot.md +1 -1
- package/dist/ai/source/BbTag.md +27 -20
- package/dist/ai/source/BbTextInput.md +29 -26
- package/dist/ai/source/BbTextarea.md +53 -45
- package/dist/ai/source/BbTimePicker.md +19 -7
- package/dist/ai/source/BbTimePickerInput.md +34 -21
- package/dist/ai/source/BbToast.md +18 -9
- package/dist/ai/source/BbToastPortal.md +14 -6
- package/dist/ai/source/BbTooltip.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +9 -4
- package/dist/ai/source/FlatListBox.md +11 -1
- package/dist/ai/source/GroupedListBox.md +12 -1
- package/dist/ai/source/ListBox.md +1 -1
- package/dist/ai/source/OptionsContainer.md +48 -1
- package/dist/assets/svgs/arrow_up.svg_raw.js +3 -0
- package/dist/assets/svgs/caret_down.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_left_small.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_right_small.svg_raw.js +3 -0
- package/dist/assets/svgs/close.svg_raw.js +3 -0
- package/dist/assets/svgs/eyedropper.svg_raw.js +3 -0
- package/dist/assets/svgs/move.svg_raw.js +3 -0
- package/dist/assets/svgs/x.svg_raw.js +3 -0
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +48 -44
- package/dist/components/BbAlert/types.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +54 -53
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -56
- package/dist/components/BbBadge/types.d.ts +1 -1
- package/dist/components/BbButton/BbButton.vue.d.ts +2 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +110 -98
- package/dist/components/BbButton/types.d.ts +12 -10
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +17 -17
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +298 -313
- package/dist/components/BbCalendar/useCalendarGrid.js +3 -2
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +4 -2
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +94 -82
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +78 -55
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +184 -151
- package/dist/components/BbCheckboxGroup/types.d.ts +10 -5
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +13 -11
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +82 -71
- package/dist/components/BbColorInput/types.d.ts +8 -8
- package/dist/components/BbColorInput/types.js +1 -1
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +180 -182
- package/dist/components/BbColorPalette/types.d.ts +2 -2
- package/dist/components/BbConfigScope/BbConfigScope.vue.d.ts +12 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue.js +4 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/BbConfigScope/types.d.ts +20 -0
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +31 -31
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +171 -170
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +110 -110
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +457 -441
- package/dist/components/BbDatePickerInput/types.d.ts +8 -8
- package/dist/components/BbDatePickerInput/types.js +1 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +4 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +204 -197
- package/dist/components/BbDialog/types.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +5 -4
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +302 -286
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +348 -344
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +97 -97
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +1 -1
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbDropdown/pointerTrail.d.ts +5 -0
- package/dist/components/BbDropdown/pointerTrail.js +26 -0
- package/dist/components/BbDropdown/types.d.ts +25 -13
- package/dist/components/BbDropdown/types.js +11 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +4 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -69
- package/dist/components/BbDropdownButton/types.d.ts +30 -13
- package/dist/components/BbDropdownButton/types.js +7 -3
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +5 -5
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -2
- package/dist/components/BbForm/BbFormCustomField.js +2 -2
- package/dist/components/BbForm/bindFormField.js +66 -66
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbHost/BbHostOpening.d.ts +1 -1
- package/dist/components/BbHost/types.d.ts +2 -2
- package/dist/components/BbHoverCard/BbHoverCard.vue.d.ts +2 -2
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +158 -157
- package/dist/components/BbIcon/BbIcon.vue.d.ts +1 -1
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/components/BbIndicator/types.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -9
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +248 -232
- package/dist/components/BbNumberInput/types.d.ts +12 -11
- package/dist/components/BbNumberInput/types.js +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +2 -2
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +275 -274
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +104 -108
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +90 -90
- package/dist/components/BbPopover/types.d.ts +2 -2
- package/dist/components/BbRadio/BbRadio.vue.d.ts +4 -2
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +105 -93
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +72 -49
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +214 -181
- package/dist/components/BbRadioGroup/types.d.ts +11 -5
- package/dist/components/BbRating/BbRating.vue.d.ts +7 -5
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +139 -128
- package/dist/components/BbSelect/BbSelect.vue.d.ts +174 -155
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +179 -158
- package/dist/components/BbSelect/types.d.ts +23 -19
- package/dist/components/BbSelect/types.js +4 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +21 -16
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +637 -623
- package/dist/components/BbSelectPopover/reclickClears.d.ts +17 -0
- package/dist/components/BbSelectPopover/reclickClears.js +4 -0
- package/dist/components/BbSelectPopover/types.d.ts +21 -16
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSlider/BbSlider.vue.d.ts +22 -15
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +382 -315
- package/dist/components/BbSlider/types.d.ts +136 -47
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +28 -27
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +4 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1128 -1135
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +1 -1
- package/dist/components/BbTabs/BbTabs.vue.d.ts +21 -21
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/components/BbTabs/types.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue.d.ts +15 -13
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +196 -185
- package/dist/components/BbTag/types.d.ts +7 -7
- package/dist/components/BbTag/types.js +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +30 -30
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +66 -55
- package/dist/components/BbTextInput/types.d.ts +9 -9
- package/dist/components/BbTextInput/types.js +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +30 -30
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +96 -86
- package/dist/components/BbTextarea/types.d.ts +8 -8
- package/dist/components/BbTextarea/types.js +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -12
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +73 -73
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +286 -273
- package/dist/components/BbTimePickerInput/types.d.ts +8 -8
- package/dist/components/BbTimePickerInput/types.js +1 -1
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +75 -80
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
- package/dist/components/BbTooltip/types.d.ts +1 -1
- package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +11 -16
- package/dist/components/CommonFieldInput/types.d.ts +1 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/FlatListBox/types.d.ts +1 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/GroupedListBox/types.d.ts +1 -1
- package/dist/components/ListBox/types.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +87 -69
- package/dist/components/OptionsContainer/types.d.ts +5 -0
- package/dist/components/Transitions/Slide.vue.d.ts +1 -1
- package/dist/composables/useBbTabs.js +94 -90
- package/dist/composables/useConfig.js +2 -9
- package/dist/composables/useConfigDefaults.d.ts +54 -0
- package/dist/composables/useConfigDefaults.js +56 -0
- package/dist/composables/useConfirm.d.ts +7 -7
- package/dist/composables/useFormBinding.d.ts +1 -1
- package/dist/composables/useFormBinding.js +3 -3
- package/dist/composables/usePassthrough.d.ts +7 -5
- package/dist/composables/usePassthrough.js +137 -133
- package/dist/composables/useToast.d.ts +5 -4
- package/dist/composables/useToast.js +47 -37
- package/dist/deprecation/ai-deprecations.json.d.ts +44 -15
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.js +7 -7
- package/dist/i18n/locales/cs.json +2 -1
- package/dist/i18n/locales/da.json +2 -1
- package/dist/i18n/locales/de-CH.json +2 -1
- package/dist/i18n/locales/de.json +2 -1
- package/dist/i18n/locales/el.json +2 -1
- package/dist/i18n/locales/en-GB.json +2 -1
- package/dist/i18n/locales/en.json +2 -1
- package/dist/i18n/locales/es-MX.json +2 -1
- package/dist/i18n/locales/es.json +2 -1
- package/dist/i18n/locales/fi.json +2 -1
- package/dist/i18n/locales/fr.json +2 -1
- package/dist/i18n/locales/hu.json +2 -1
- package/dist/i18n/locales/it.json +2 -1
- package/dist/i18n/locales/ja.json +2 -1
- package/dist/i18n/locales/ko.json +2 -1
- package/dist/i18n/locales/nb.json +2 -1
- package/dist/i18n/locales/nl.json +2 -1
- package/dist/i18n/locales/pl.json +2 -1
- package/dist/i18n/locales/pt-BR.json +2 -1
- package/dist/i18n/locales/pt-PT.json +2 -1
- package/dist/i18n/locales/ro.json +2 -1
- package/dist/i18n/locales/ru.json +2 -1
- package/dist/i18n/locales/sv.json +2 -1
- package/dist/i18n/locales/tr.json +2 -1
- package/dist/i18n/locales/uk.json +2 -1
- package/dist/i18n/locales/zh-CN.json +2 -1
- package/dist/i18n/locales/zh-HK.json +2 -1
- package/dist/i18n/locales/zh-TW.json +2 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/llms-full.txt +2273 -1243
- package/dist/llms-medium.txt +362 -184
- package/dist/llms.txt +4 -4
- package/dist/locale-blueprint.json +2 -1
- package/dist/nuxt-auto-imports.js +1 -1
- package/dist/nuxt-module.d.ts +1 -1
- package/dist/nuxt.js +17 -17
- package/dist/project-dts.d.ts +72 -10
- package/dist/project-dts.js +69 -21
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +1 -1
- package/dist/types/BadgeVariant.d.ts +1 -1
- package/dist/types/ButtonVariant.d.ts +1 -1
- package/dist/types/CheckboxVariant.d.ts +7 -4
- package/dist/types/CheckboxVariant.js +5 -1
- package/dist/types/Config.d.ts +17 -103
- package/dist/types/ConfigDefaults.d.ts +352 -0
- package/dist/types/ConfigDefaults.js +115 -0
- package/dist/types/ConfirmVariant.d.ts +1 -1
- package/dist/types/DropdownItemVariant.d.ts +1 -1
- package/dist/types/FieldLayout.d.ts +3 -3
- package/dist/types/IndicatorVariant.d.ts +1 -1
- package/dist/types/InputVariant.d.ts +57 -24
- package/dist/types/RadioVariant.d.ts +7 -4
- package/dist/types/RadioVariant.js +5 -1
- package/dist/types/SizeScale.d.ts +4 -0
- package/dist/types/SizeScale.js +17 -0
- package/dist/types/TabsVariant.d.ts +1 -1
- package/dist/types/ToastVariant.d.ts +1 -1
- package/dist/types/TooltipVariant.d.ts +1 -1
- package/dist/types/passthrough.d.ts +6 -6
- package/dist/types/ptComponentMap.d.ts +14 -14
- package/dist/utilities/functions/searchRank.d.ts +19 -0
- package/dist/utilities/functions/searchRank.js +76 -0
- package/dist/utilities/misc/listboxMetrics.d.ts +1 -1
- package/dist/utils/configDefaults.d.ts +33 -0
- package/dist/utils/configDefaults.js +140 -0
- package/dist/utils/configScope.d.ts +43 -0
- package/dist/utils/configScope.js +13 -0
- package/dist/utils/passthrough.d.ts +4 -7
- package/dist/utils/passthrough.js +31 -29
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +54 -191
- package/dist/vite.js +318 -367
- package/llms.txt +4 -4
- package/package.json +3 -3
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/agent-manifest.mjs +2 -0
- package/scripts/lib/eslint-disable.mjs +2 -0
- package/scripts/lib/eslint-plugin.d.ts +4 -2
- package/scripts/lib/eslint-plugin.mjs +67 -0
- package/scripts/lib/idiom-scan.mjs +8 -7
- package/scripts/lib/project-variant-dts.mjs +105 -36
- package/scripts/lib/validate-bb-markup.mjs +73 -13
- package/dist/ai/BbPtScope.md +0 -138
- package/dist/ai/manifest/components/BbPtScope.json +0 -21
- package/dist/ai/source/BbPtScope.md +0 -54
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +0 -12
- package/dist/components/BbPtScope/BbPtScope.vue.js +0 -4
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +0 -12
- package/dist/components/BbPtScope/types.d.ts +0 -15
- package/dist/types/PtScope.d.ts +0 -15
- package/dist/utilities/functions/head.js +0 -3
- package/dist/utilities/functions/matchAnyKey.d.ts +0 -8
- package/dist/utilities/functions/matchAnyKey.js +0 -14
- package/dist/utils/ptScope.d.ts +0 -8
- package/dist/utils/ptScope.js +0 -3
package/dist/ai/BbSlider.md
CHANGED
|
@@ -36,6 +36,9 @@ carries meaning: volume, brightness, opacity, a price filter. The trade-off is
|
|
|
36
36
|
precision — a slider is for "about here", not exact entry.
|
|
37
37
|
|
|
38
38
|
- Need an exact number typed in? Use `BbNumberInput`.
|
|
39
|
+
- Choosing between a few _unordered_ options (red / green / blue), or only
|
|
40
|
+
two or three? Use `BbRadioGroup`. A slider says the options sit in order
|
|
41
|
+
along a scale (low → high, small → large).
|
|
39
42
|
- Rating a few discrete points (1–5 stars, a score)? Use `BbRating`.
|
|
40
43
|
- Bounded interval, approximate, visual? `BbSlider`.
|
|
41
44
|
|
|
@@ -63,14 +66,18 @@ Besides `update:modelValue` the slider re-emits interaction events (`active`,
|
|
|
63
66
|
use them for analytics or "commit on release" patterns, never to derive the
|
|
64
67
|
value: the value is what `v-model` gives you.
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
Pressing the **track** jumps the closest thumb to the press and drags it in
|
|
70
|
+
the same gesture — no second click on the thumb. Pressing a **thumb** only
|
|
71
|
+
grabs it: the value does not move until the pointer does. Only the primary
|
|
72
|
+
pointer drags; a second touch mid-drag is ignored rather than retargeting
|
|
73
|
+
the drag.
|
|
67
74
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
`
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
### Several thumbs
|
|
76
|
+
|
|
77
|
+
Set `multiple` and bind an array to put more than one thumb on the track. A
|
|
78
|
+
bare `multiple` gives **two** thumbs, the canonical "price from–to" filter;
|
|
79
|
+
`:multiple="3"` gives three, and so on. The value is one number per thumb,
|
|
80
|
+
always sorted, so `price[0]` is the lower end and `price[1]` the higher.
|
|
74
81
|
|
|
75
82
|
**Price range filter**
|
|
76
83
|
|
|
@@ -94,7 +101,7 @@ have to reason about which handle is which.
|
|
|
94
101
|
label="Price range"
|
|
95
102
|
:max="1000"
|
|
96
103
|
:min="0"
|
|
97
|
-
|
|
104
|
+
multiple
|
|
98
105
|
:step="50"
|
|
99
106
|
/>
|
|
100
107
|
<p class="text-xs text-(--bb-text-muted)">324 stays in this range</p>
|
|
@@ -108,9 +115,62 @@ const price = ref<[number, number]>([200, 800]);
|
|
|
108
115
|
</script>
|
|
109
116
|
```
|
|
110
117
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
118
|
+
**Milestone stops**
|
|
119
|
+
|
|
120
|
+
```vue
|
|
121
|
+
<template>
|
|
122
|
+
<div
|
|
123
|
+
class="flex w-full max-w-sm flex-col gap-2 rounded-(--bb-radius) border p-4"
|
|
124
|
+
>
|
|
125
|
+
<div class="flex items-baseline justify-between gap-2">
|
|
126
|
+
<p class="text-sm font-medium">Release milestones</p>
|
|
127
|
+
<p
|
|
128
|
+
class="text-xs text-(--bb-text-muted) tabular-nums"
|
|
129
|
+
data-testid="stops"
|
|
130
|
+
>
|
|
131
|
+
{{ stops.map((stop) => `${stop}%`).join(' · ') }}
|
|
132
|
+
</p>
|
|
133
|
+
</div>
|
|
134
|
+
<BbSlider
|
|
135
|
+
v-model="stops"
|
|
136
|
+
hide-label
|
|
137
|
+
label="Release milestone stops"
|
|
138
|
+
:max="100"
|
|
139
|
+
:min="0"
|
|
140
|
+
:multiple="3"
|
|
141
|
+
:step="5"
|
|
142
|
+
/>
|
|
143
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
144
|
+
Three stops on one track — drag one past another and they trade places;
|
|
145
|
+
the list stays in order.
|
|
146
|
+
</p>
|
|
147
|
+
</div>
|
|
148
|
+
</template>
|
|
149
|
+
<script setup lang="ts">
|
|
150
|
+
import { ref } from 'vue';
|
|
151
|
+
import { BbSlider } from 'bitboss-ui';
|
|
152
|
+
|
|
153
|
+
const stops = ref<number[]>([25, 60, 90]);
|
|
154
|
+
</script>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The model may **start empty** (`[]` or `null`): the thumbs then spread
|
|
158
|
+
evenly from `min` to `max` (two thumbs sit at the ends) and nothing is
|
|
159
|
+
committed until the user moves one; that first move emits every thumb's
|
|
160
|
+
value. Otherwise the array must hold exactly one value per thumb: a wrong
|
|
161
|
+
length, a scalar with `multiple` or an array without it throws at mount.
|
|
162
|
+
|
|
163
|
+
Thumbs **cross**: drag one past its neighbour and they trade places, and
|
|
164
|
+
the drag (and focus) carries on with the moved value, so the emitted array
|
|
165
|
+
stays sorted and a stack of thumbs on one value always comes apart in the
|
|
166
|
+
direction you drag. The `thumb` slot renders every thumb and receives its
|
|
167
|
+
`index` in the sorted array. The `increase` / `decrease` steppers stay
|
|
168
|
+
inert with `multiple`.
|
|
169
|
+
|
|
170
|
+
`v-model` types itself from `multiple`: a number without it, `number[]` with
|
|
171
|
+
it (`[number, number]` for a bare `multiple`); with `items`, the stop values
|
|
172
|
+
take the place of `number`. A `rules` function (inside a
|
|
173
|
+
`BbForm`) is typed `number | number[] | null` and narrows in one line:
|
|
114
174
|
|
|
115
175
|
```ts no-check
|
|
116
176
|
const priceRules = (value: number | number[] | null) =>
|
|
@@ -119,6 +179,70 @@ const priceRules = (value: number | number[] | null) =>
|
|
|
119
179
|
'Keep at least 50 apart';
|
|
120
180
|
```
|
|
121
181
|
|
|
182
|
+
### Painting the rail: `fill`
|
|
183
|
+
|
|
184
|
+
The thumbs cut the rail into segments, numbered from the start (`0`) to the
|
|
185
|
+
end (`N`). `fill` picks which ones get a coloured `bar`:
|
|
186
|
+
|
|
187
|
+
- `'normal'` (default) — from the start to the thumb; with `multiple`, from
|
|
188
|
+
the lowest to the highest thumb.
|
|
189
|
+
- `'inverted'` — the rest: from the thumb to the end; with `multiple`, from
|
|
190
|
+
the start to the lowest thumb and from the highest to the end ("outside
|
|
191
|
+
these hours").
|
|
192
|
+
- `'segments'` — every segment is its own bar, from the start to the end.
|
|
193
|
+
|
|
194
|
+
To colour each segment, give `pt:bar` a function: it is called per bar with
|
|
195
|
+
`item`, the segment (`{ index, from, to }`), so a list of classes indexed by
|
|
196
|
+
`item.index` paints the zones. Two thumbs make three segments:
|
|
197
|
+
|
|
198
|
+
**Alert thresholds**
|
|
199
|
+
|
|
200
|
+
```vue
|
|
201
|
+
<template>
|
|
202
|
+
<div
|
|
203
|
+
class="flex w-full max-w-sm flex-col gap-2 rounded-(--bb-radius) border p-4"
|
|
204
|
+
>
|
|
205
|
+
<div class="flex items-baseline justify-between gap-2">
|
|
206
|
+
<p class="text-sm font-medium">CPU alert levels</p>
|
|
207
|
+
<p
|
|
208
|
+
class="text-xs text-(--bb-text-muted) tabular-nums"
|
|
209
|
+
data-testid="levels"
|
|
210
|
+
>
|
|
211
|
+
warn at {{ levels[0] }}% · page at {{ levels[1] }}%
|
|
212
|
+
</p>
|
|
213
|
+
</div>
|
|
214
|
+
<BbSlider
|
|
215
|
+
v-model="levels"
|
|
216
|
+
fill="segments"
|
|
217
|
+
hide-label
|
|
218
|
+
label="CPU alert levels"
|
|
219
|
+
:max="100"
|
|
220
|
+
:min="0"
|
|
221
|
+
multiple
|
|
222
|
+
:pt:bar="({ item }) => zones[item.index]"
|
|
223
|
+
:step="5"
|
|
224
|
+
/>
|
|
225
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
226
|
+
Green is normal, amber warns the team, red pages whoever is on call.
|
|
227
|
+
</p>
|
|
228
|
+
</div>
|
|
229
|
+
</template>
|
|
230
|
+
<script setup lang="ts">
|
|
231
|
+
import { ref } from 'vue';
|
|
232
|
+
import { BbSlider } from 'bitboss-ui';
|
|
233
|
+
|
|
234
|
+
const levels = ref<[number, number]>([60, 85]);
|
|
235
|
+
// One class per rail segment: start → first thumb, between, last → end.
|
|
236
|
+
const zones = ['bg-(--bb-success)', 'bg-(--bb-warn)', 'bg-(--bb-danger)'];
|
|
237
|
+
</script>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
A bar takes the rail's rounding only where it meets an end of the rail.
|
|
241
|
+
Ticks follow the paint: `pt:tick:in-range` reaches the ticks under a painted
|
|
242
|
+
bar, and the `tick` slot and a `pt:tick` function get the segment the tick
|
|
243
|
+
sits on (a tick on a thumb belongs to the segment before it), so ticks can
|
|
244
|
+
match their zone's colour. Each bar and tick also carries `data-segment`.
|
|
245
|
+
|
|
122
246
|
### Min, max and step
|
|
123
247
|
|
|
124
248
|
`min`/`max` bound the interval (defaults `0`–`100`) and `step` sets the
|
|
@@ -148,6 +272,73 @@ match the step's resolution (e.g. `:step="0.001"` needs
|
|
|
148
272
|
</div>
|
|
149
273
|
```
|
|
150
274
|
|
|
275
|
+
### Named stops: `items`
|
|
276
|
+
|
|
277
|
+
When the scale is a list rather than a range of numbers — priority levels,
|
|
278
|
+
sizes, "1h / 4h / 1d / 1w", or uneven numbers like `[1, 2, 5, 10, 50]` —
|
|
279
|
+
pass `items`. The thumb lands only on those stops, spaced **evenly in list
|
|
280
|
+
order** (so an uneven number list feels logarithmic). Each stop is a string
|
|
281
|
+
or number, or `{ value, label }`: `v-model` holds the `value` (and a form
|
|
282
|
+
posts it), and `label` is what screen readers announce (`aria-valuetext`)
|
|
283
|
+
and what the `tick` and `thumb` slots receive. A bare string or number is its
|
|
284
|
+
own label. `v-model` is typed from the list.
|
|
285
|
+
|
|
286
|
+
**Priority levels**
|
|
287
|
+
|
|
288
|
+
```vue
|
|
289
|
+
<template>
|
|
290
|
+
<div
|
|
291
|
+
class="flex w-full max-w-sm flex-col gap-2 rounded-(--bb-radius) border p-4"
|
|
292
|
+
>
|
|
293
|
+
<div class="flex items-baseline justify-between gap-2">
|
|
294
|
+
<p class="text-sm font-medium">Ticket priority</p>
|
|
295
|
+
<p class="text-xs text-(--bb-text-muted)" data-testid="priority">
|
|
296
|
+
{{ priority }}
|
|
297
|
+
</p>
|
|
298
|
+
</div>
|
|
299
|
+
<BbSlider
|
|
300
|
+
v-model="priority"
|
|
301
|
+
disable-thumb-translate
|
|
302
|
+
hide-label
|
|
303
|
+
:items="levels"
|
|
304
|
+
label="Ticket priority"
|
|
305
|
+
ticks
|
|
306
|
+
>
|
|
307
|
+
<template #tick="{ label, active }">
|
|
308
|
+
<span
|
|
309
|
+
class="mt-1 text-xs whitespace-nowrap"
|
|
310
|
+
:class="active ? 'text-(--bb-text)' : 'text-(--bb-text-muted)'"
|
|
311
|
+
>{{ label }}</span
|
|
312
|
+
>
|
|
313
|
+
</template>
|
|
314
|
+
</BbSlider>
|
|
315
|
+
</div>
|
|
316
|
+
</template>
|
|
317
|
+
<script setup lang="ts">
|
|
318
|
+
import { ref } from 'vue';
|
|
319
|
+
import { BbSlider } from 'bitboss-ui';
|
|
320
|
+
|
|
321
|
+
// Each stop's `value` is what v-model holds and the form posts; its `label`
|
|
322
|
+
// is what the ticks show and screen readers announce.
|
|
323
|
+
const levels = [
|
|
324
|
+
{ value: 'low', label: 'Low' },
|
|
325
|
+
{ value: 'normal', label: 'Normal' },
|
|
326
|
+
{ value: 'high', label: 'High' },
|
|
327
|
+
{ value: 'urgent', label: 'Urgent' },
|
|
328
|
+
] as const;
|
|
329
|
+
const priority = ref<(typeof levels)[number]['value']>('normal');
|
|
330
|
+
</script>
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
`items` replaces `min`, `max` and `step`: setting any of them beside it
|
|
334
|
+
throws at mount, is a type error, and the ESLint rule
|
|
335
|
+
`bitboss-ui/no-conflicting-props` reports it. The list needs at least two
|
|
336
|
+
stops and no duplicate values, and a `v-model` value outside the list
|
|
337
|
+
throws. The keys move one stop (Page Up / Down ten), the `increase` /
|
|
338
|
+
`decrease` steppers one stop, and `multiple` and `fill` work as with
|
|
339
|
+
numbers: values sort by list order, and a segment's `from` / `to` are stop
|
|
340
|
+
positions (`0` = the first stop).
|
|
341
|
+
|
|
151
342
|
### Stepper controls
|
|
152
343
|
|
|
153
344
|
The `prepend` and `append` slots receive `increase` / `decrease` callbacks that
|
|
@@ -156,9 +347,11 @@ nudge the value by one `step`. Wrap them in `BbButton`s for an accessible
|
|
|
156
347
|
for you. Each side also gets `disabled`, true when its stepper would do
|
|
157
348
|
nothing: `#prepend` (decrease) at `min`, `#append` (increase) at `max`, and
|
|
158
349
|
both while the slider is `disabled` or `readonly` — bind it to the button's
|
|
159
|
-
`disabled`.
|
|
160
|
-
`
|
|
161
|
-
|
|
350
|
+
`disabled`. A slot holding both − and + reads **`decreaseDisabled` /
|
|
351
|
+
`increaseDisabled`** instead (BbNumberInput's names, the same in either slot).
|
|
352
|
+
These callbacks are **single-value only**; they are inert with
|
|
353
|
+
`multiple` (they early-return, and `disabled` is true there), so don't build
|
|
354
|
+
a stepper around a multi-thumb slider.
|
|
162
355
|
|
|
163
356
|
**Volume with ± buttons**
|
|
164
357
|
|
|
@@ -229,9 +422,9 @@ points and looks like nothing happened. Each tick is a zero-wide point on the
|
|
|
229
422
|
scale with its content centred on it, and the tick row sits below the rail
|
|
230
423
|
taking the room that content needs, so labels push what follows the slider
|
|
231
424
|
down instead of overlapping it. The first and last labels overhang the rail
|
|
232
|
-
ends by half their width: leave that room at the sides. Fill the `tick` slot (`{ value, percent, active }`) with
|
|
425
|
+
ends by half their width: leave that room at the sides. Fill the `tick` slot (`{ value, percent, active, segment }`) with
|
|
233
426
|
your notch or per-step label, or style the marks through `pt:tick`;
|
|
234
|
-
`pt:tick:in-range` reaches only the ticks under
|
|
427
|
+
`pt:tick:in-range` reaches only the ticks under a bar.
|
|
235
428
|
|
|
236
429
|
Add `disable-thumb-translate` so the thumb sits exactly over each tick instead
|
|
237
430
|
of being nudged to stay centred — the two pair naturally when you want a
|
|
@@ -260,19 +453,20 @@ value from the keyboard when focused:
|
|
|
260
453
|
|
|
261
454
|
- **Arrow Right / Arrow Up** — increase by one `step`.
|
|
262
455
|
- **Arrow Left / Arrow Down** — decrease by one `step`.
|
|
263
|
-
- **Page Up / Page Down** — jump by ten steps.
|
|
456
|
+
- **Page Up / Page Down** — jump by ten steps (Shift+Arrow does the same).
|
|
264
457
|
- **Home / End** — snap to `min` / `max`.
|
|
265
458
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
459
|
+
With `multiple` the keys drive whichever thumb has focus; a key that takes it
|
|
460
|
+
past a neighbour moves focus with the value, so holding the key keeps moving
|
|
461
|
+
it. Every keystroke emits `update:modelValue`, so keyboard and pointer produce
|
|
462
|
+
identical, clamped values — never wire your own key handlers on top.
|
|
269
463
|
|
|
270
464
|
### Displaying the value on the thumb
|
|
271
465
|
|
|
272
466
|
Because there is no built-in tooltip, use the `thumb` slot to render the current
|
|
273
|
-
value on the handle itself. The slot gives you `{ value, percent, focused }`; its
|
|
467
|
+
value on the handle itself. The slot gives you `{ value, percent, focused, index }`; its
|
|
274
468
|
content renders inside the thumb, so you augment the handle rather than replacing
|
|
275
|
-
it.
|
|
469
|
+
it. With `multiple`, branch on `index` to tell the thumbs apart.
|
|
276
470
|
|
|
277
471
|
**Value bubble on the thumb**
|
|
278
472
|
|
|
@@ -363,7 +557,7 @@ const limit = ref<number | null>(200);
|
|
|
363
557
|
it. It does not throw: an explicit `'floating'` from untyped code warns in
|
|
364
558
|
dev and falls back to `'outside'` (`resolveEnumProp`, the library-wide policy
|
|
365
559
|
that a bad enum token is cosmetic, never fatal). A plugin-level
|
|
366
|
-
`
|
|
560
|
+
`all: { labelMode: 'floating' }` degrades to `'outside'` **silently** —
|
|
367
561
|
the consumer made no per-slider choice, so there is nothing to warn about.
|
|
368
562
|
- `layout` (`'horizontal'`, `'vertical'`, `'auto'`, or a pattern like
|
|
369
563
|
`'xx xxxxxx'`), `reverse`, and `label-position` arrange the label against the
|
|
@@ -462,9 +656,9 @@ const warmth = ref(20);
|
|
|
462
656
|
No plugin options change `BbSlider` behaviour (no i18n strings, no teleport, no
|
|
463
657
|
variant registry) and it renders SSR-safe static markup in Nuxt and Inertia
|
|
464
658
|
apps. For classic form posts, hidden inputs carry the value under `name`: one
|
|
465
|
-
field for a single value (`volume=50`), one field PER value
|
|
659
|
+
field for a single value (`volume=50`), one field PER value with `multiple`
|
|
466
660
|
(`price=20&price=80` — name it `price[]` to receive an array in PHP / Laravel),
|
|
467
|
-
like `BbSelect` with `multiple`. A null value posts nothing.
|
|
661
|
+
like `BbSelect` with `multiple`. A null or empty value posts nothing.
|
|
468
662
|
|
|
469
663
|
Works well with:
|
|
470
664
|
|
|
@@ -478,10 +672,11 @@ Works well with:
|
|
|
478
672
|
object form, a style and attributes — optionally only while a state is on.
|
|
479
673
|
Parts: `root`, `label`, `description`, `message`, `hint` (the helper line —
|
|
480
674
|
shown on focus, or always with `persistent-hint`), `box` (around the rail,
|
|
481
|
-
ticks and thumbs), `track` (the rail, its full length), `bar` (
|
|
482
|
-
|
|
483
|
-
`tick` (every mark, a broadcast) and `thumb` (every handle
|
|
484
|
-
|
|
675
|
+
ticks and thumbs), `track` (the rail, its full length), `bar` (every painted
|
|
676
|
+
segment on it, a broadcast — see `fill`), `ticks` (the tick row),
|
|
677
|
+
`tick` (every mark, a broadcast) and `thumb` (every handle, one per value
|
|
678
|
+
with `multiple`, a broadcast). `bar` and `tick` also take a per-item
|
|
679
|
+
function, called with the rail segment (`{ index, from, to }`). States: `errors`, `warnings`, `disabled`, `readonly`,
|
|
485
680
|
`active` — on while the slider is engaged (a thumb focused or dragged) — and,
|
|
486
681
|
per tick, `inRange`. A name outside that list is a type error and an ESLint
|
|
487
682
|
error.
|
|
@@ -493,7 +688,7 @@ or put a colour class straight on `pt:bar` / `pt:track` for one of them.
|
|
|
493
688
|
The volume stepper above, restyled through those parts: a thicker rail on
|
|
494
689
|
`pt:track`, a primary hairline on `pt:thumb`, a muted ring on
|
|
495
690
|
`pt:thumb:active` while a thumb is focused or dragged. `thumb` is a broadcast
|
|
496
|
-
—
|
|
691
|
+
— every handle with `multiple`.
|
|
497
692
|
|
|
498
693
|
**pt:track, pt:thumb and the active state**
|
|
499
694
|
|
|
@@ -556,7 +751,7 @@ import { BbButton, BbSlider } from 'bitboss-ui';
|
|
|
556
751
|
// Same volume stepper as `VolumeControl.vue`, restyled through passthrough:
|
|
557
752
|
// a thicker rail on `pt:track`, a primary hairline on `pt:thumb`, a muted
|
|
558
753
|
// ring on `pt:thumb:active` while a thumb is focused or dragged. `thumb` is
|
|
559
|
-
// a broadcast —
|
|
754
|
+
// a broadcast — every handle with `multiple`.
|
|
560
755
|
const volume = ref(40);
|
|
561
756
|
</script>
|
|
562
757
|
```
|
|
@@ -572,13 +767,14 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
572
767
|
|
|
573
768
|
### Gotchas and anti-patterns
|
|
574
769
|
|
|
575
|
-
- Don't
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
-
|
|
581
|
-
|
|
770
|
+
- Don't mix the mode and the model shape: a scalar with `multiple`, an
|
|
771
|
+
array without it, or an array whose length is not the thumb count all
|
|
772
|
+
throw at mount. Start unset with `[]`, not a placeholder of the wrong
|
|
773
|
+
length.
|
|
774
|
+
- Don't expect `increase`/`decrease` to work with `multiple`; they are
|
|
775
|
+
single-value only. Drive the thumbs with the keyboard or pointer.
|
|
776
|
+
- Don't keep per-thumb state keyed by "the thumb the user grabbed": thumbs
|
|
777
|
+
cross, so index `0` is always the lowest value, not a fixed handle.
|
|
582
778
|
- Don't set `label-mode="floating"` — it is not in the type, and at runtime it
|
|
583
779
|
warns and falls back to `'outside'`. Use `'outside'` or `'inside'`.
|
|
584
780
|
- Don't rely on a slider for exact numbers — steps finer than `0.01` round away
|
|
@@ -590,11 +786,13 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
590
786
|
### Accessibility
|
|
591
787
|
|
|
592
788
|
- Always provide a `label` — it is the slider's accessible name: each thumb
|
|
593
|
-
references it via `aria-labelledby`, and
|
|
594
|
-
"minimum"/"maximum"
|
|
595
|
-
distinguishable to assistive tech.
|
|
789
|
+
references it via `aria-labelledby`, and with `multiple` a localized
|
|
790
|
+
qualifier is appended — "minimum"/"maximum" for two thumbs, "2 of 3" for
|
|
791
|
+
more — so the thumbs are distinguishable to assistive tech.
|
|
596
792
|
- Each thumb exposes `role="slider"` with `aria-valuemin`/`aria-valuemax`/
|
|
597
|
-
`aria-valuenow` automatically; do not add your own ARIA.
|
|
793
|
+
`aria-valuenow` automatically; do not add your own ARIA. With `items`,
|
|
794
|
+
`aria-valuenow` is the stop's position and `aria-valuetext` its `label`,
|
|
795
|
+
so give stops a readable `label` (or translate it) rather than a code.
|
|
598
796
|
- `errors`, `warnings`, `description` and `hint` are all wired to each thumb through
|
|
599
797
|
`aria-describedby`, in that order: the reason the field is invalid is spoken
|
|
600
798
|
first when it regains focus, and a channel is referenced only while it
|
|
@@ -608,7 +806,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
608
806
|
|
|
609
807
|
## v-model
|
|
610
808
|
|
|
611
|
-
- `v-model` — type: `number \| number[] \| null \| undefined`
|
|
809
|
+
- `v-model` — type: `string \| number \| (string \| number)[] \| null \| undefined`
|
|
612
810
|
|
|
613
811
|
## Props
|
|
614
812
|
|
|
@@ -616,11 +814,12 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
616
814
|
| --- | --- | --- | --- | --- |
|
|
617
815
|
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `bar`, `box`, `description`, `hint`, `label`, `message`, `root`, `thumb`, `tick`, `ticks`, `track`. States: `active`, `disabled`, `errors`, `readonly`, `warnings`, `inRange`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbSliderProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
618
816
|
| `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
|
|
619
|
-
| `compact` | `boolean \| undefined` | `
|
|
817
|
+
| `compact` | `boolean \| undefined` | `undefined` | | Compact density. The track's height follows `--bb-input-h-compact` and the label gap `--bb-label-spacing-y-compact`, so a `--bb-input-h` or `--bb-label-spacing-y` you set on the component is ignored while `compact` is on: set the `-compact` tokens instead. |
|
|
620
818
|
| `description` | `string \| undefined` | | | Text between the label and the input. Unlike the hint it is always visible; it joins the input's `aria-describedby` after any `errors` / `warnings`, before the `hint`. |
|
|
621
819
|
| `disabled` | `boolean \| undefined` | `false` | | Disables the component. |
|
|
622
820
|
| `disableThumbTranslate` | `boolean \| undefined` | `false` | | Disables the proportional thumb translation that keeps the thumb on track (enabled by default). Set it when displaying ticks so they align with less effort. |
|
|
623
821
|
| `errors` | `string \| string[] \| undefined` | | | Error messages under the field, a string or array, in an `aria-live="polite"` region and first in the control's `aria-describedby`, so they are re-read when it regains focus. |
|
|
822
|
+
| `fill` | `"normal" \| "inverted" \| "segments" \| undefined` | `"normal"` | | Which rail segments are painted: `'normal'` start → thumb (lowest → highest with `multiple`), `'inverted'` the rest, `'segments'` every segment as its own `bar` (colour each with a `pt:bar` function on `item.index`). |
|
|
624
823
|
| `formless` | `boolean \| undefined` | `false` | | Keep this control out of the enclosing `BbForm` entirely: not submitted, not dirty, not reset, not validated. For a control that is not form data (a filter, a "show advanced" switch). |
|
|
625
824
|
| `hasErrors` | `boolean \| undefined` | `false` | | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
|
|
626
825
|
| `hasWarnings` | `boolean \| undefined` | `false` | | Define if the component should be in a warning state. Same chrome as errors with `--bb-warn`; errors take priority. |
|
|
@@ -628,25 +827,26 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
628
827
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
629
828
|
| `id` | `string \| undefined` | | | The `id` of the native control; the label's `for` and the description and message ids derive from it. Generated when omitted. |
|
|
630
829
|
| `inputAlign` | `'top'` \| `'center'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted, the control's first line meets the label's. |
|
|
830
|
+
| `items` | `readonly (string \| number \| { readonly value: string \| number; readonly label?: string \| undefined; })[] \| undefined` | | | Named stops instead of a numeric scale, spaced evenly in list order: strings, numbers or `{ value, label }`. `v-model` holds the `value`; `label` is announced and passed to the slots. Replaces `min` / `max` / `step` (setting them too throws). |
|
|
631
831
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
632
832
|
| `labelAlign` | `'top'` \| `'center'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, the label's first line meets the control's. |
|
|
633
833
|
| `labelMode` | `"outside" \| "inside" \| undefined` | | | Label rendering mode. Sliders do not support `floating` labels. |
|
|
634
|
-
| `labelPosition` | `"
|
|
834
|
+
| `labelPosition` | `"center" \| "left" \| "right" \| undefined` | | | Sets the text alignment of the label. |
|
|
635
835
|
| `layout` | `Responsive<FieldLayout> \| undefined` | | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
636
836
|
| `max` | `number \| undefined` | `100` | | Maximum value cap. |
|
|
637
837
|
| `maxPrecision` | `number \| undefined` | `2` | | Maximum decimal places to retain in emitted values. |
|
|
638
838
|
| `min` | `number \| undefined` | `0` | | Minimum value cap. |
|
|
639
|
-
| `modelValue` | `number \| number[] \| null \| undefined` | `0` | | Used by v-model. |
|
|
839
|
+
| `modelValue` | `string \| number \| (string \| number)[] \| null \| undefined` | `0` | | Used by v-model. |
|
|
840
|
+
| `multiple` | `boolean \| number` | `false` | | Several thumbs: `multiple` is two (a min–max interval), `:multiple="3"` three (at least 2). `modelValue` holds one value per thumb, always sorted, or is empty (`[]` / `null`) to start unset; another length throws. Thumbs may cross. |
|
|
640
841
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
641
842
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
642
|
-
| `range` | `boolean` | `false` | | Set the input as range. modelValue must be an array. |
|
|
643
843
|
| `readonly` | `boolean \| undefined` | `false` | | Sets the input in a readonly state. |
|
|
644
|
-
| `reverse` | `boolean \| undefined` | `
|
|
645
|
-
| `rules` | `RuleExpression<number \| number[] \| null>` | | | vee-validate rules for this field. Only inside a `BbForm`. |
|
|
844
|
+
| `reverse` | `boolean \| undefined` | `undefined` | | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
|
|
845
|
+
| `rules` | `RuleExpression<string \| number \| (string \| number)[] \| null>` | | | vee-validate rules for this field. Only inside a `BbForm`. |
|
|
646
846
|
| `step` | `number \| undefined` | `1` | | The step attribute specifies the granularity that the value must adhere to. |
|
|
647
847
|
| `ticks` | `boolean \| undefined` | `false` | | Displays ticks on step. |
|
|
648
848
|
| `validationLabel` | `string \| undefined` | | | The field's name in validation messages (`{field}`): "Email is not valid". Defaults to the `label` (or `legend`), then "This field"; never the `name`. Set it when the label is hidden or reads badly in a sentence (icon-only, a question). `BbForm` only. |
|
|
649
|
-
| `validationMode` | `'aggressive'` \| `'balanced'` \| `'lazy'` \| `'submit-only'` \| `'submit-live'` | | | When the field validates: `aggressive` (each change), `balanced` (on leave, then live while in error), `lazy` (on leave), `submit-only`, `submit-live`. Unset: the `BbForm`'s `validation-mode`, then `
|
|
849
|
+
| `validationMode` | `'aggressive'` \| `'balanced'` \| `'lazy'` \| `'submit-only'` \| `'submit-live'` | | | When the field validates: `aggressive` (each change), `balanced` (on leave, then live while in error), `lazy` (on leave), `submit-only`, `submit-live`. Unset: the `BbForm`'s `validation-mode`, then `all.validationMode` (`'balanced'`). `BbForm` only. |
|
|
650
850
|
| `warnings` | `string \| string[] \| undefined` | | | Warning messages under the field, a string or array: amber, in their own `aria-live` region and in the control's `aria-describedby` after the errors. Non-empty turns on the warning state; errors win when both are set. |
|
|
651
851
|
|
|
652
852
|
## Passthrough parts and states
|
|
@@ -662,10 +862,10 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
662
862
|
| `hint` | The helper line (the `hint` prop). |
|
|
663
863
|
| `box` | The box around the rail, ticks and thumbs: bare by default, the bordered field look in inside-label mode. The slider's look locals (`--accent`, `--track-color`, `--thumb`, `--track`, `--bg`, `--bw`, …) set here reach everything inside. |
|
|
664
864
|
| `track` | The rail the thumbs slide on: its full length, painted with `--track-color`. |
|
|
665
|
-
| `bar` |
|
|
865
|
+
| `bar` | A coloured piece on the rail: from the start to the value, or from the lowest to the highest thumb with `multiple`; `fill` picks other pieces. Painted with `--accent`; its size and position are set from the value (the same word as BbProgress's fill). A broadcast. |
|
|
666
866
|
| `ticks` | The row that holds the tick marks (`ticks` prop). |
|
|
667
867
|
| `tick` | Every tick mark; a broadcast, resolved per tick with its own `inRange`. Its content is the `tick` slot. |
|
|
668
|
-
| `thumb` | Every handle — one, or
|
|
868
|
+
| `thumb` | Every handle — one, or one per value with `multiple`; a broadcast. Per-item functions: on the instance, `bar` and `tick` also accept `({ item, inRange, … }) => PtValue \| false \| null \| undefined` — `item` is the rail segment (`{ index, from, to }`; the thumbs cut the rail into segments `0…N`) the bar paints or the tick sits on, and every state a boolean beside it — in the `pt` object or the `:pt:<part>` attribute, never on a `<part>:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the node as it was. See the passthrough guide, _Per-item functions_. |
|
|
669
869
|
|
|
670
870
|
States are listed in precedence order: when two are on at once and their entries conflict, the later one wins.
|
|
671
871
|
|
|
@@ -684,21 +884,19 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
684
884
|
- `focus` — `(event: FocusEvent): void` — Emitted when a thumb gains focus. Forwards the original DOM `FocusEvent`.
|
|
685
885
|
- `inactive` — `(): void` — Emitted when focus/click moves outside the slider after it was active.
|
|
686
886
|
- `keydown` — `(event: KeyboardEvent): void` — Emitted for keyboard interaction on a thumb. Forwards the original DOM `KeyboardEvent`.
|
|
687
|
-
- `pointerdown` — `(event: PointerEvent): void` — Emitted when a pointer device is pressed on a thumb. Forwards the original DOM `PointerEvent`.
|
|
887
|
+
- `pointerdown` — `(event: PointerEvent): void` — Emitted when a pointer device is pressed on a thumb or on the track. Forwards the original DOM `PointerEvent`.
|
|
688
888
|
- `pointermove` — `(event: PointerEvent): void` — Emitted as a pointer device moves while dragging a thumb. Forwards the original DOM `PointerEvent`.
|
|
689
889
|
- `pointerup` — `(event: PointerEvent): void` — Emitted when a pointer device is released after dragging. Forwards the original DOM `PointerEvent`.
|
|
690
|
-
- `update:modelValue` — `(value:
|
|
890
|
+
- `update:modelValue` — `(value: string \| number \| (string \| number)[] \| null): void` — Emitted with new value(s) whenever the slider position changes. A number for a single slider (an `items` value with `items`), one per thumb (sorted) with `multiple`.
|
|
691
891
|
|
|
692
892
|
## Slots
|
|
693
893
|
|
|
694
|
-
- `append` — scope: `BbSliderStepSlotProps` `{ increase: () => void; decrease: () => void; disabled: boolean }` — Content rendered after the slider track, typically used to add a max-value label or button.
|
|
894
|
+
- `append` — scope: `BbSliderStepSlotProps` `{ increase: () => void; decrease: () => void; disabled: boolean; increaseDisabled: boolean; decreaseDisabled: boolean }` — Content rendered after the slider track, typically used to add a max-value label or button.
|
|
695
895
|
- `description` — scope: `BbSliderDescriptionSlotProps` `{ text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the description text. Provided alone (no `description` prop) it still renders the description region and wires it into `aria-describedby`.
|
|
696
896
|
- `label` — scope: `BbSliderLabelSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default label text rendered above the slider.
|
|
697
|
-
- `prepend` — scope: `BbSliderStepSlotProps` `{ increase: () => void; decrease: () => void; disabled: boolean }` — Content rendered before the slider track, typically used to add a min-value label or button.
|
|
698
|
-
- `thumb` — scope: `BbSliderThumbSlotProps` `{
|
|
699
|
-
- `
|
|
700
|
-
- `thumb:lower` — scope: `BbSliderThumbSlotProps` `{ value: number; percent: number; focused: boolean }` — Replaces the default lower-value thumb in range mode (`range: true`).
|
|
701
|
-
- `tick` — scope: `BbSliderTickSlotProps` `{ value: number; percent: number; active: boolean }` — Replaces the default tick mark rendered at each step when ticks are enabled.
|
|
897
|
+
- `prepend` — scope: `BbSliderStepSlotProps` `{ increase: () => void; decrease: () => void; disabled: boolean; increaseDisabled: boolean; decreaseDisabled: boolean }` — Content rendered before the slider track, typically used to add a min-value label or button.
|
|
898
|
+
- `thumb` — scope: `BbSliderThumbSlotProps` `{ index: number; value: V; label: string; percent: number; focused: boolean }` — Replaces every thumb's content; with `multiple`, tell them apart by `index`.
|
|
899
|
+
- `tick` — scope: `BbSliderTickSlotProps` `{ value: V; label: string; percent: number; active: boolean; segment: number }` — Replaces the default tick mark rendered at each step when ticks are enabled.
|
|
702
900
|
|
|
703
901
|
## CSS custom properties
|
|
704
902
|
|
|
@@ -730,7 +928,6 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
730
928
|
| `--bg` | `.bb-slider__thumb` | `var(--bb-panel)` | |
|
|
731
929
|
| `--elev` | `.bb-slider__thumb` | `var(--bb-elev-sm)` | Small-chrome resting lift, DECLARED here so it is sealed: an ancestor that sets `--elev` for its own plate must not reach in and lift this. Same tier and same name as the checkbox and radio glyphs. |
|
|
732
930
|
| `--ring-t` | `.bb-slider__thumb` | `var(--bb-transition-medium)` | |
|
|
733
|
-
| `--border-color` | `pt:box` | `per variant` | The resting border, at the fixed --bb-border-w. Errors and warnings paint their frame over it, so `pt:box="[--border-color:…]"` recolours the rest without hiding the state; a plain `border-*` utility on the base pt:box would hide it (ESLint `no-box-border-color`). |
|
|
734
931
|
|
|
735
932
|
## Component tree
|
|
736
933
|
|
package/dist/ai/BbSpinner.md
CHANGED
|
@@ -182,7 +182,7 @@ const onAdvance = () => {
|
|
|
182
182
|
### Sizing and color
|
|
183
183
|
|
|
184
184
|
`size` follows the icon scale `xs–2xl` (12/16/24/28/36/40 px by default — the
|
|
185
|
-
same `
|
|
185
|
+
same `components.BbIcon.sizeMap` plugin option that sizes `BbIcon` remaps these keys), a
|
|
186
186
|
number (px), or a CSS dimension string (`"3rem"`). The spinner paints in
|
|
187
187
|
`currentColor`, so it inherits the text color of whatever it sits in — put it
|
|
188
188
|
inside muted helper text and it turns muted for free. To recolor it, set a
|
|
@@ -725,7 +725,7 @@ mixed content) or the indicator is inline with text.
|
|
|
725
725
|
|
|
726
726
|
### Config, platform & performance
|
|
727
727
|
|
|
728
|
-
- **Global config**: only `
|
|
728
|
+
- **Global config**: only `components.BbIcon.sizeMap` affects this component (it remaps
|
|
729
729
|
the `xs–2xl` keys library-wide). Nothing else in the plugin config applies.
|
|
730
730
|
- **SSR (Nuxt / Inertia)**: safe. The spinner embeds its own SVG payload — no
|
|
731
731
|
icon-registry lookup, no client-only work — and animates in pure CSS, so it
|
package/dist/ai/BbSwitch.md
CHANGED
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
| `--accent` | `pt:icon` | `BbBaseSwitchIcon` | Track fill and border once checked or indeterminate; --errors, --warnings and --disabled re-point it. |
|
|
30
30
|
| `--bg` | `pt:icon` | `BbBaseSwitchIcon` | track fill while off |
|
|
31
31
|
| `--ring-color` | `pt:icon` | `BbBaseSwitchIcon` | focus ring; follows the accent colour (a consumer text colour too) — --errors / --warnings set their own |
|
|
32
|
-
| `--r` | `pt:icon` | `BbBaseSwitchIcon` | track corners
|
|
32
|
+
| `--r` | `pt:icon` | `BbBaseSwitchIcon` | track corners |
|
|
33
|
+
| `--border-color` | `pt:icon` | `BbBaseSwitchIcon` | Resting track edge; checked, errors and warnings paint their own. |
|
|
34
|
+
| `--thumb-bg` | `pt:icon` | `BbBaseSwitchIcon` | the knob's colour, on and off |
|
|
35
|
+
| `--thumb-r` | `pt:icon` | `BbBaseSwitchIcon` | the knob's corners |
|
|
36
|
+
| `--t` | `pt:icon` | `BbBaseSwitchIcon` | State-change time: the knob's slide and the track's fill fade. |
|
|
33
37
|
| `--bw` | `pt:icon` | `BbBaseSwitchIcon` | Geometry — change --h / --w / --thumb freely: everything else is derived, so the thumb stays vertically centred and travels flush-to-flush at any size. --bw is the track border; the box is border-box, so the border eats into the inner track and has to be subtracted here. Nested hairline (`--bb-border-w-sm`) so a 3px plate theme does not swallow an 18px track; a theme that wants the full plate stroke sets `--bw` on this class. |
|
|
34
38
|
| `--h` | `pt:icon` | `BbBaseSwitchIcon` | track height, border included (border-box) |
|
|
35
39
|
| `--w` | `pt:icon` | `BbBaseSwitchIcon` | track width, border included |
|
|
@@ -674,6 +678,25 @@ const settings = reactive<Setting[]>([
|
|
|
674
678
|
</script>
|
|
675
679
|
```
|
|
676
680
|
|
|
681
|
+
**The drawing is set through CSS locals on `icon`.** The knob is not a part:
|
|
682
|
+
every visual setting of the drawn switch is one of these, set on `pt:icon`
|
|
683
|
+
(`pt:icon="[--thumb-bg:var(--color-slate-900)] [--t:300ms]"`, or a state entry
|
|
684
|
+
such as `pt:icon:checked="[--thumb-bg:white]"`).
|
|
685
|
+
|
|
686
|
+
| Local | Default | What it sets |
|
|
687
|
+
| ---------------- | ---------------------------- | ---------------------------------------------------------- |
|
|
688
|
+
| `--h` / `--w` | `18px` / `32px` | Track height and width, border included |
|
|
689
|
+
| `--thumb` | `16px` (capped by the track) | Knob size; it stays centred and travels flush at any size |
|
|
690
|
+
| `--bg` | `--bb-track` | Track fill while off |
|
|
691
|
+
| `--accent` | `--bb-primary` | Track fill and edge while on (a text colour on `icon` too) |
|
|
692
|
+
| `--border-color` | `--bb-border` | Track edge while off |
|
|
693
|
+
| `--bw` | `--bb-border-w-sm` | Track border width |
|
|
694
|
+
| `--r` | `999px` | Track corners |
|
|
695
|
+
| `--thumb-bg` | `--bb-panel` | Knob colour, on and off (disabled too) |
|
|
696
|
+
| `--thumb-r` | `calc(var(--r) * 0.8)` | Knob corners |
|
|
697
|
+
| `--t` | `--bb-transition-medium` | Slide time: the knob's travel and the track's fade |
|
|
698
|
+
| `--ring-color` | the accent at ring opacity | Focus ring colour (errors and warnings set their own) |
|
|
699
|
+
|
|
677
700
|
An attribute in `attrs` wins over ours. The invisible native input under the glyph is
|
|
678
701
|
not a part — plain attributes on the component land on the root. A listener in `attrs` runs after the control's own
|
|
679
702
|
handler, never instead of it. The full grammar, the merge rules and the global
|
|
@@ -742,10 +765,10 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
742
765
|
| `id` | `string \| undefined` | | | The `id` of the native control; the label's `for` and the description and message ids derive from it. Generated when omitted. |
|
|
743
766
|
| `indeterminate` | `boolean \| undefined` | `false` | | Sets the input in an indeterminate state. |
|
|
744
767
|
| `inputAlign` | `'top'` \| `'center'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted, the control's first line meets the label's. |
|
|
745
|
-
| `inputPosition` | `"
|
|
768
|
+
| `inputPosition` | `"center" \| "left" \| "right" \| undefined` | `"left"` | | Sets the alignment of the input. Since inputs are inline block they can be aligned just as text can. |
|
|
746
769
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
747
770
|
| `labelAlign` | `'top'` \| `'center'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, the label's first line meets the control's. |
|
|
748
|
-
| `labelPosition` | `"
|
|
771
|
+
| `labelPosition` | `"center" \| "left" \| "right" \| undefined` | | | Sets the text alignment of the label. |
|
|
749
772
|
| `layout` | `Responsive<FieldLayout> \| undefined` | `"auto"` | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
750
773
|
| `modelValue` | `any` | | | Used by v-model. Can be any serializable type. |
|
|
751
774
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
@@ -757,7 +780,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
757
780
|
| `submitWhenFalse` | `boolean \| undefined` | `false` | | Will submit "falseValue" if the input is not checked. Otherwise "trueValue" will be submitted. |
|
|
758
781
|
| `trueValue` | `any` | | | Value of the input when checked. It handles any kind of serializable object. |
|
|
759
782
|
| `validationLabel` | `string \| undefined` | | | The field's name in validation messages (`{field}`): "Email is not valid". Defaults to the `label` (or `legend`), then "This field"; never the `name`. Set it when the label is hidden or reads badly in a sentence (icon-only, a question). `BbForm` only. |
|
|
760
|
-
| `validationMode` | `'aggressive'` \| `'balanced'` \| `'lazy'` \| `'submit-only'` \| `'submit-live'` | | | When the field validates: `aggressive` (each change), `balanced` (on leave, then live while in error), `lazy` (on leave), `submit-only`, `submit-live`. Unset: the `BbForm`'s `validation-mode`, then `
|
|
783
|
+
| `validationMode` | `'aggressive'` \| `'balanced'` \| `'lazy'` \| `'submit-only'` \| `'submit-live'` | | | When the field validates: `aggressive` (each change), `balanced` (on leave, then live while in error), `lazy` (on leave), `submit-only`, `submit-live`. Unset: the `BbForm`'s `validation-mode`, then `all.validationMode` (`'balanced'`). `BbForm` only. |
|
|
761
784
|
| `warnings` | `string \| string[] \| undefined` | | | Warning messages under the field, a string or array: amber, in their own `aria-live` region and in the control's `aria-describedby` after the errors. Non-empty turns on the warning state; errors win when both are set. |
|
|
762
785
|
|
|
763
786
|
## Passthrough parts and states
|