bitboss-ui 2.1.135 → 3.0.0-alpha.4
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/LICENSE +21 -0
- package/README.md +274 -24
- package/bin/bitboss-ui-mcp.mjs +662 -0
- package/bin/bitboss-ui.mjs +710 -0
- package/bin/bitboss-ui.node.test.mjs +113 -0
- package/dist/ai/BbAccordion.md +528 -113
- package/dist/ai/BbAlert.md +380 -197
- package/dist/ai/BbAsterisk.md +46 -0
- package/dist/ai/BbAvatar.md +458 -178
- package/dist/ai/BbBadge.md +697 -225
- package/dist/ai/BbBadgeButton.md +54 -0
- package/dist/ai/BbBaseButton.md +491 -0
- package/dist/ai/BbBaseCheckbox.md +49 -0
- package/dist/ai/BbBaseCheckboxGroup.md +64 -0
- package/dist/ai/BbBaseCheckboxIcon.md +176 -0
- package/dist/ai/BbBaseColorInput.md +64 -0
- package/dist/ai/BbBaseColorPalette.md +39 -0
- package/dist/ai/BbBaseDatePicker.md +42 -0
- package/dist/ai/BbBaseDatePickerInput.md +73 -0
- package/dist/ai/BbBaseInputContainer.md +48 -0
- package/dist/ai/BbBaseNumberInput.md +71 -0
- package/dist/ai/BbBaseRadio.md +46 -0
- package/dist/ai/BbBaseRadioGroup.md +64 -0
- package/dist/ai/BbBaseRadioIcon.md +191 -0
- package/dist/ai/BbBaseRating.md +51 -0
- package/dist/ai/BbBaseSelect.md +88 -0
- package/dist/ai/BbBaseSlider.md +56 -0
- package/dist/ai/BbBaseSwitch.md +49 -0
- package/dist/ai/BbBaseSwitchGroup.md +64 -0
- package/dist/ai/BbBaseSwitchIcon.md +186 -0
- package/dist/ai/BbBaseTag.md +68 -0
- package/dist/ai/BbBaseTextInput.md +75 -0
- package/dist/ai/BbBaseTextarea.md +62 -0
- package/dist/ai/BbBaseTimePickerInput.md +62 -0
- package/dist/ai/BbBreadcrumbs.md +553 -503
- package/dist/ai/BbButton.md +841 -636
- package/dist/ai/BbCheckbox.md +585 -254
- package/dist/ai/BbCheckboxGroup.md +573 -361
- package/dist/ai/BbCollapsible.md +425 -103
- package/dist/ai/BbColorInput.md +536 -323
- package/dist/ai/BbColorPalette.md +569 -330
- package/dist/ai/BbConfirm.md +659 -136
- package/dist/ai/BbConfirmPortal.md +28 -0
- package/dist/ai/BbDatePicker.md +244 -0
- package/dist/ai/BbDatePickerInput.md +720 -388
- package/dist/ai/BbDialog.md +778 -99
- package/dist/ai/BbDropdown.md +1072 -763
- package/dist/ai/BbDropdownButton.md +525 -614
- package/dist/ai/BbDropdownGroup.md +34 -0
- package/dist/ai/BbDropzone.md +1206 -436
- package/dist/ai/BbForm.md +239 -0
- package/dist/ai/BbIcon.md +382 -212
- package/dist/ai/BbIndicator.md +283 -0
- package/dist/ai/BbNumberInput.md +717 -355
- package/dist/ai/BbOffCanvas.md +897 -498
- package/dist/ai/BbPagination.md +489 -535
- package/dist/ai/BbPopover.md +591 -546
- package/dist/ai/BbProgress.md +462 -69
- package/dist/ai/BbRadio.md +352 -229
- package/dist/ai/BbRadioGroup.md +437 -353
- package/dist/ai/BbRating.md +372 -225
- package/dist/ai/BbSelect.md +1399 -536
- package/dist/ai/BbSelectPopover.md +1255 -1578
- package/dist/ai/BbSlider.md +500 -256
- package/dist/ai/BbSmoothHeight.md +485 -139
- package/dist/ai/BbSpinner.md +718 -131
- package/dist/ai/BbSwitch.md +573 -119
- package/dist/ai/BbSwitchGroup.md +521 -214
- package/dist/ai/BbTable.md +1996 -2365
- package/dist/ai/BbTabs.md +1147 -0
- package/dist/ai/BbTabsList.md +29 -0
- package/dist/ai/BbTabsPanes.md +27 -0
- package/dist/ai/BbTabsRoot.md +57 -0
- package/dist/ai/BbTag.md +416 -292
- package/dist/ai/BbTextInput.md +878 -333
- package/dist/ai/BbTextarea.md +850 -255
- package/dist/ai/BbTimePicker.md +231 -0
- package/dist/ai/BbTimePickerInput.md +200 -0
- package/dist/ai/BbToast.md +669 -196
- package/dist/ai/BbToastPortal.md +28 -0
- package/dist/ai/BbTooltip.md +453 -346
- package/dist/ai/BbTree.md +993 -234
- package/dist/ai/ChipsBox.md +27 -199
- package/dist/ai/ClearableButton.md +21 -55
- package/dist/ai/CommaBox.md +25 -200
- package/dist/ai/CommonInputWrapper.md +42 -0
- package/dist/ai/CommonPopover.md +30 -510
- package/dist/ai/ErrorIcon.md +19 -56
- package/dist/ai/FlatListBox.md +35 -379
- package/dist/ai/GroupedListBox.md +37 -535
- package/dist/ai/GuidesComponent.md +21 -0
- package/dist/ai/ListBox.md +38 -231
- package/dist/ai/OptionsContainer.md +34 -253
- package/dist/ai/WarningIcon.md +21 -0
- package/dist/ai/components.json +15897 -0
- package/dist/ai/composables/useBbConfig.md +80 -0
- package/dist/ai/composables/useBbFormContext.md +110 -0
- package/dist/ai/composables/useBbTableContext.md +167 -0
- package/dist/ai/composables/useBbTabsContext.md +118 -0
- package/dist/ai/composables/useBroadcastChannelInstance.md +97 -0
- package/dist/ai/composables/useConfirm.md +313 -0
- package/dist/ai/composables/useCountdown.md +86 -0
- package/dist/ai/composables/useId.md +60 -0
- package/dist/ai/composables/useMobile.md +85 -0
- package/dist/ai/composables/useToast.md +238 -0
- package/dist/ai/guides/agent-contract.md +165 -0
- package/dist/ai/guides/ai-router.md +113 -0
- package/dist/ai/guides/app-layout.md +318 -0
- package/dist/ai/guides/coherence-playbook.md +136 -0
- package/dist/ai/guides/component-picker.md +236 -0
- package/dist/ai/guides/design-language.md +478 -0
- package/dist/ai/guides/design-tokens.md +450 -0
- package/dist/ai/guides/fetch-items-playbook.md +161 -0
- package/dist/ai/guides/floating-bottom-panel.md +130 -0
- package/dist/ai/guides/icons-policy.md +257 -0
- package/dist/ai/guides/inertia-helpers.md +1443 -0
- package/dist/ai/guides/inline-edit-playbook.md +267 -0
- package/dist/ai/guides/installation-and-plugin-setup.md +440 -0
- package/dist/ai/guides/migration/components/bb-alert.md +37 -0
- package/dist/ai/guides/migration/components/bb-avatar.md +24 -0
- package/dist/ai/guides/migration/components/bb-badge.md +110 -0
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +26 -0
- package/dist/ai/guides/migration/components/bb-button.md +55 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +54 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +45 -0
- package/dist/ai/guides/migration/components/bb-chip.md +35 -0
- package/dist/ai/guides/migration/components/bb-collapsible.md +26 -0
- package/dist/ai/guides/migration/components/bb-color-input.md +23 -0
- package/dist/ai/guides/migration/components/bb-color-palette.md +31 -0
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +84 -0
- package/dist/ai/guides/migration/components/bb-dialog.md +46 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +31 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +36 -0
- package/dist/ai/guides/migration/components/bb-dropzone.md +27 -0
- package/dist/ai/guides/migration/components/bb-icon.md +27 -0
- package/dist/ai/guides/migration/components/bb-offcanvas.md +63 -0
- package/dist/ai/guides/migration/components/bb-pagination.md +24 -0
- package/dist/ai/guides/migration/components/bb-popover.md +52 -0
- package/dist/ai/guides/migration/components/bb-rating.md +24 -0
- package/dist/ai/guides/migration/components/bb-select-popover.md +59 -0
- package/dist/ai/guides/migration/components/bb-select.md +69 -0
- package/dist/ai/guides/migration/components/bb-slider.md +25 -0
- package/dist/ai/guides/migration/components/bb-smooth-height.md +45 -0
- package/dist/ai/guides/migration/components/bb-spinner.md +23 -0
- package/dist/ai/guides/migration/components/bb-table.md +66 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +47 -0
- package/dist/ai/guides/migration/components/bb-tag.md +29 -0
- package/dist/ai/guides/migration/components/bb-text-input.md +37 -0
- package/dist/ai/guides/migration/components/bb-toast.md +47 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +34 -0
- package/dist/ai/guides/migration/components/bb-tree.md +77 -0
- package/dist/ai/guides/migration/components/use-confirm.md +46 -0
- package/dist/ai/guides/migration/v2-to-v3.md +649 -0
- package/dist/ai/guides/options-items-playbook.md +222 -0
- package/dist/ai/guides/page-shell.md +113 -0
- package/dist/ai/guides/validated-forms.md +177 -0
- package/dist/ai/index.md +158 -32
- package/dist/ai/recipes/inertia/approvals-inbox.md +1635 -0
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1765 -0
- package/dist/ai/recipes/inertia/layout-scaffold.md +385 -0
- package/dist/ai/recipes/inertia/onboarding.md +1791 -0
- package/dist/ai/recipes/inertia/ownership-atlas.md +1327 -0
- package/dist/ai/recipes/inertia/record-form.md +1489 -0
- package/dist/ai/recipes/inertia/records-workspace.md +1416 -0
- package/dist/ai/recipes/inertia/upload-center.md +2003 -0
- package/dist/ai/recipes/inertia/wizard-form.md +1500 -0
- package/dist/ai/recipes/nuxt/approvals-inbox.md +1578 -0
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1703 -0
- package/dist/ai/recipes/nuxt/layout-scaffold.md +385 -0
- package/dist/ai/recipes/nuxt/onboarding.md +1724 -0
- package/dist/ai/recipes/nuxt/record-form.md +1502 -0
- package/dist/ai/recipes/nuxt/records-workspace.md +1329 -0
- package/dist/ai/recipes/nuxt/upload-center.md +1886 -0
- package/dist/ai/recipes/nuxt/wizard-form.md +1509 -0
- package/dist/ai/recipes/vue/approvals-inbox.md +1496 -0
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1594 -0
- package/dist/ai/recipes/vue/layout-scaffold.md +385 -0
- package/dist/ai/recipes/vue/onboarding.md +1679 -0
- package/dist/ai/recipes/vue/record-form.md +1586 -0
- package/dist/ai/recipes/vue/records-workspace.md +1245 -0
- package/dist/ai/recipes/vue/upload-center.md +1845 -0
- package/dist/ai/recipes/vue/wizard-form.md +1441 -0
- package/dist/ai/source/BbAccordion.md +123 -0
- package/dist/ai/source/BbAlert.md +401 -0
- package/dist/ai/source/BbAsterisk.md +32 -0
- package/dist/ai/source/BbAvatar.md +258 -0
- package/dist/ai/source/BbBadge.md +560 -0
- package/dist/ai/source/BbBadgeButton.md +490 -0
- package/dist/ai/source/BbBaseButton.md +682 -0
- package/dist/ai/source/BbBaseCheckbox.md +461 -0
- package/dist/ai/source/BbBaseCheckboxGroup.md +554 -0
- package/dist/ai/source/BbBaseCheckboxIcon.md +201 -0
- package/dist/ai/source/BbBaseColorInput.md +416 -0
- package/dist/ai/source/BbBaseColorPalette.md +934 -0
- package/dist/ai/source/BbBaseDatePicker.md +1001 -0
- package/dist/ai/source/BbBaseDatePickerInput.md +1785 -0
- package/dist/ai/source/BbBaseInputContainer.md +1210 -0
- package/dist/ai/source/BbBaseNumberInput.md +617 -0
- package/dist/ai/source/BbBaseRadio.md +377 -0
- package/dist/ai/source/BbBaseRadioGroup.md +533 -0
- package/dist/ai/source/BbBaseRadioIcon.md +153 -0
- package/dist/ai/source/BbBaseRating.md +573 -0
- package/dist/ai/source/BbBaseSelect.md +898 -0
- package/dist/ai/source/BbBaseSlider.md +1085 -0
- package/dist/ai/source/BbBaseSwitch.md +246 -0
- package/dist/ai/source/BbBaseSwitchGroup.md +302 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +206 -0
- package/dist/ai/source/BbBaseTag.md +694 -0
- package/dist/ai/source/BbBaseTextInput.md +511 -0
- package/dist/ai/source/BbBaseTextarea.md +480 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +1031 -0
- package/dist/ai/source/BbBreadcrumbs.md +815 -0
- package/dist/ai/source/BbButton.md +1006 -0
- package/dist/ai/source/BbCheckbox.md +326 -0
- package/dist/ai/source/BbCheckboxGroup.md +419 -0
- package/dist/ai/source/BbCollapsible.md +137 -0
- package/dist/ai/source/BbColorInput.md +322 -0
- package/dist/ai/source/BbColorPalette.md +371 -0
- package/dist/ai/source/BbConfirm.md +193 -0
- package/dist/ai/source/BbConfirmPortal.md +74 -0
- package/dist/ai/source/BbDatePicker.md +729 -0
- package/dist/ai/source/BbDatePickerInput.md +525 -0
- package/dist/ai/source/BbDialog.md +818 -0
- package/dist/ai/source/BbDropdown.md +2387 -0
- package/dist/ai/source/BbDropdownButton.md +315 -0
- package/dist/ai/source/BbDropdownGroup.md +1259 -0
- package/dist/ai/source/BbDropzone.md +864 -0
- package/dist/ai/source/BbForm.md +100 -0
- package/dist/ai/source/BbIcon.md +214 -0
- package/dist/ai/source/BbIndicator.md +298 -0
- package/dist/ai/source/BbNumberInput.md +374 -0
- package/dist/ai/source/BbOffCanvas.md +1266 -0
- package/dist/ai/source/BbPagination.md +835 -0
- package/dist/ai/source/BbPopover.md +860 -0
- package/dist/ai/source/BbProgress.md +140 -0
- package/dist/ai/source/BbRadio.md +303 -0
- package/dist/ai/source/BbRadioGroup.md +420 -0
- package/dist/ai/source/BbRating.md +369 -0
- package/dist/ai/source/BbSelect.md +688 -0
- package/dist/ai/source/BbSelectPopover.md +2234 -0
- package/dist/ai/source/BbSlider.md +378 -0
- package/dist/ai/source/BbSmoothHeight.md +265 -0
- package/dist/ai/source/BbSpinner.md +127 -0
- package/dist/ai/source/BbSwitch.md +175 -0
- package/dist/ai/source/BbSwitchGroup.md +240 -0
- package/dist/ai/source/BbTable.md +3433 -0
- package/dist/ai/source/BbTabs.md +403 -0
- package/dist/ai/source/BbTabsList.md +578 -0
- package/dist/ai/source/BbTabsPanes.md +368 -0
- package/dist/ai/source/BbTabsRoot.md +372 -0
- package/dist/ai/source/BbTag.md +390 -0
- package/dist/ai/source/BbTextInput.md +352 -0
- package/dist/ai/source/BbTextarea.md +337 -0
- package/dist/ai/source/BbTimePicker.md +595 -0
- package/dist/ai/source/BbTimePickerInput.md +376 -0
- package/dist/ai/source/BbToast.md +525 -0
- package/dist/ai/source/BbToastPortal.md +482 -0
- package/dist/ai/source/BbTooltip.md +522 -0
- package/dist/ai/source/BbTree.md +323 -0
- package/dist/ai/source/ChipsBox.md +201 -0
- package/dist/ai/source/ClearableButton.md +70 -0
- package/dist/ai/source/CommaBox.md +202 -0
- package/dist/ai/source/CommonInputWrapper.md +554 -0
- package/dist/ai/source/CommonPopover.md +616 -0
- package/dist/ai/source/ErrorIcon.md +43 -0
- package/dist/ai/source/FlatListBox.md +396 -0
- package/dist/ai/source/GroupedListBox.md +540 -0
- package/dist/ai/source/GuidesComponent.md +383 -0
- package/dist/ai/source/ListBox.md +238 -0
- package/dist/ai/source/OptionsContainer.md +191 -0
- package/dist/ai/source/WarningIcon.md +47 -0
- package/dist/alert-variants.d.ts +19 -0
- package/dist/assets/css/reset.css_inline.js +4 -0
- package/dist/assets/svgs/alert.svg_raw.js +4 -0
- package/dist/assets/svgs/calendar.svg_raw.js +4 -0
- package/dist/assets/svgs/check_stroke.svg_raw.js +4 -0
- package/dist/assets/svgs/chevron_down.svg_raw.js +4 -0
- package/dist/assets/svgs/chevron_right.svg_raw.js +4 -0
- package/dist/assets/svgs/clear.svg_raw.js +4 -0
- package/dist/assets/svgs/clock.svg_raw.js +4 -0
- package/dist/assets/svgs/error.svg_raw.js +4 -0
- package/dist/assets/svgs/search.svg_raw.js +4 -0
- package/dist/assets/svgs/sort.svg_raw.js +4 -0
- package/dist/assets/svgs/spinner.svg_raw.js +4 -0
- package/dist/assets/svgs/user.svg_raw.js +4 -0
- package/dist/badge-variants.d.ts +19 -0
- package/dist/button-variants.d.ts +21 -0
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +9 -3
- package/dist/components/BbAccordion/BbAccordion.vue.js +6 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/BbAccordion/types.d.ts +12 -8
- package/dist/components/BbAlert/BbAlert.vue.d.ts +12 -3
- package/dist/components/BbAlert/BbAlert.vue.js +6 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BbAlert/types.d.ts +56 -12
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.js +6 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +5 -0
- package/dist/components/BbAvatar/BbAvatar.vue.js +6 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/components/BbAvatar/types.d.ts +6 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +3 -0
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +5 -0
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +15 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue.js +5 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/components/BbBadge/BbBadge.vue.d.ts +8 -1
- package/dist/components/BbBadge/BbBadge.vue.js +6 -0
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/components/BbBadge/BbBadgeButton.vue.d.ts +12 -0
- package/dist/components/BbBadge/BbBadgeButton.vue.js +5 -0
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/components/BbBadge/badgeButtonContext.d.ts +27 -0
- package/dist/components/BbBadge/badgeButtonContext.js +5 -0
- package/dist/components/BbBadge/types.d.ts +61 -16
- package/dist/components/BbBaseButton/BbBaseButton.vue.d.ts +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue.js +6 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +171 -0
- package/dist/components/BbBaseButton/RouterComponent.vue.js +5 -0
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/components/BbBaseButton/types.d.ts +191 -0
- package/dist/components/BbBaseButton/types.js +33 -0
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +40 -0
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +6 -0
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +145 -0
- package/dist/components/BbBaseCheckbox/types.d.ts +224 -0
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +19 -0
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +6 -0
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +257 -0
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.d.ts +4 -0
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.js +6 -0
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +47 -0
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +42 -0
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +6 -0
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/components/BbBaseColorInput/types.d.ts +210 -0
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +13 -0
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.js +6 -0
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +395 -0
- package/dist/components/BbBaseColorPalette/types.d.ts +40 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +6 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +300 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +44 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +310 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/components/BbBaseDatePicker/typeahead.d.ts +112 -0
- package/dist/components/BbBaseDatePicker/typeahead.js +37 -0
- package/dist/components/BbBaseDatePicker/types.d.ts +97 -0
- package/dist/components/BbBaseDatePicker/useDatePickerContext.d.ts +58 -0
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +11 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +30 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +6 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +716 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts +30 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +6 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/components/BbBaseDatePickerInput/types.d.ts +311 -0
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +17 -0
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +6 -0
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +191 -0
- package/dist/components/BbBaseInputContainer/types.d.ts +197 -0
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +52 -0
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +6 -0
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +215 -0
- package/dist/components/BbBaseNumberInput/types.d.ts +211 -0
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +33 -0
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.js +6 -0
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/BbBaseRadio/types.d.ts +179 -0
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +19 -0
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.js +6 -0
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +177 -0
- package/dist/components/BbBaseRadioGroup/types.d.ts +223 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.d.ts +4 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.js +6 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/components/BbBaseRadioIcon/types.d.ts +41 -0
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +38 -0
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +6 -0
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +184 -0
- package/dist/components/BbBaseRating/types.d.ts +168 -0
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +19 -0
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +6 -0
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +307 -0
- package/dist/components/BbBaseSelect/types.d.ts +297 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +35 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +6 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +324 -0
- package/dist/components/BbBaseSlider/types.d.ts +200 -0
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +35 -0
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.js +6 -0
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BbBaseSwitch/types.d.ts +10 -0
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +19 -0
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +6 -0
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbBaseSwitchGroup/types.d.ts +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.d.ts +4 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.js +6 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/BbBaseSwitchIcon/types.d.ts +48 -0
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +50 -0
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +6 -0
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +266 -0
- package/dist/components/BbBaseTag/types.d.ts +160 -0
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +45 -0
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +6 -0
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BbBaseTextInput/types.d.ts +209 -0
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +39 -0
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +6 -0
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +175 -0
- package/dist/components/BbBaseTextarea/types.d.ts +170 -0
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +27 -0
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +6 -0
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +522 -0
- package/dist/components/BbBaseTimePickerInput/types.d.ts +151 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +0 -1
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.js +6 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +224 -0
- package/dist/components/BbBreadcrumbs/estimateBreadcrumbItemWidth.js +47 -0
- package/dist/components/BbBreadcrumbs/types.d.ts +37 -22
- package/dist/components/BbButton/BbButton.vue.d.ts +6 -5
- package/dist/components/BbButton/BbButton.vue.js +6 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +181 -0
- package/dist/components/BbButton/types.d.ts +48 -47
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +4 -3
- package/dist/components/BbCheckbox/BbCheckbox.vue.js +6 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BbCheckbox/types.d.ts +31 -10
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +2 -13
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.js +6 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbCheckboxGroup/types.d.ts +51 -23
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue.js +6 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/BbCollapsible/types.d.ts +13 -8
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +10 -1
- package/dist/components/BbColorInput/BbColorInput.vue.js +6 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +177 -0
- package/dist/components/BbColorInput/types.d.ts +44 -11
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +5 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue.js +5 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbColorPalette/types.d.ts +71 -52
- package/dist/components/BbConfirm/BbConfirm.vue.js +6 -0
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +138 -0
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +5 -6
- package/dist/components/BbConfirm/BbConfirmPortal.vue.js +5 -0
- package/dist/components/BbConfirm/BbConfirmPortal.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +37 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.js +6 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +319 -0
- package/dist/components/BbDatePicker/types.d.ts +159 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.js +6 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +179 -0
- package/dist/components/BbDatePickerInput/types.d.ts +134 -16
- package/dist/components/BbDialog/BbDialog.vue.d.ts +14 -6
- package/dist/components/BbDialog/BbDialog.vue.js +6 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +214 -0
- package/dist/components/BbDialog/types.d.ts +146 -1
- package/dist/components/BbDialog/useDialogStack.d.ts +5 -0
- package/dist/components/BbDialog/useDialogStack.js +20 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.js +6 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +14 -7
- package/dist/components/BbDropdown/BbDropdown.vue.js +6 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +561 -0
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +44 -0
- package/dist/components/BbDropdown/BbDropdownGroup.vue.js +5 -0
- package/dist/components/BbDropdown/BbDropdownGroup.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +31 -0
- package/dist/components/BbDropdown/BbDropdownList.vue.js +6 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +470 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue.d.ts +16 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +18 -0
- package/dist/components/BbDropdown/normalizeGroups.js +46 -0
- package/dist/components/BbDropdown/types.d.ts +468 -46
- package/dist/components/BbDropdown/types.js +4 -0
- package/dist/components/BbDropdown/useDropdownContext.d.ts +89 -0
- package/dist/components/BbDropdown/useDropdownContext.js +9 -0
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +108 -0
- package/dist/components/BbDropdown/useDropdownGroupRegistry.js +5 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.js +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/components/BbDropdownButton/types.d.ts +47 -52
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +5 -4
- package/dist/components/BbDropzone/BbDropzone.vue.js +6 -0
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +308 -0
- package/dist/components/BbDropzone/types.d.ts +77 -8
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -2
- package/dist/components/BbIcon/BbIcon.vue.js +6 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BbIcon/types.d.ts +6 -19
- package/dist/components/BbIndicator/BbIndicator.vue.d.ts +14 -0
- package/dist/components/BbIndicator/BbIndicator.vue.js +6 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/components/BbIndicator/types.d.ts +49 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -6
- package/dist/components/BbNumberInput/BbNumberInput.vue.js +6 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/BbNumberInput/types.d.ts +40 -4
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +16 -10
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.js +6 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +284 -0
- package/dist/components/BbOffCanvas/types.d.ts +71 -39
- package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +25 -0
- package/dist/components/BbOffCanvas/useOffCanvasStack.js +68 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +9 -4
- package/dist/components/BbPagination/BbPagination.vue.js +6 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BbPagination/paginationFit.d.ts +38 -0
- package/dist/components/BbPagination/paginationFit.js +13 -0
- package/dist/components/BbPagination/types.d.ts +51 -16
- package/dist/components/BbPopover/BbPopover.vue.d.ts +16 -15
- package/dist/components/BbPopover/BbPopover.vue.js +6 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +309 -0
- package/dist/components/BbPopover/escapeStack.d.ts +6 -0
- package/dist/components/BbPopover/escapeStack.js +10 -0
- package/dist/components/BbPopover/types.d.ts +90 -31
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -0
- package/dist/components/BbProgress/BbProgress.vue.js +6 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/BbProgress/types.d.ts +15 -1
- package/dist/components/BbRadio/BbRadio.vue.d.ts +5 -3
- package/dist/components/BbRadio/BbRadio.vue.js +6 -0
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +133 -0
- package/dist/components/BbRadio/types.d.ts +32 -9
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -14
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.js +6 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +186 -0
- package/dist/components/BbRadioGroup/types.d.ts +48 -22
- package/dist/components/BbRating/BbRating.vue.d.ts +4 -1
- package/dist/components/BbRating/BbRating.vue.js +6 -0
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +150 -0
- package/dist/components/BbRating/types.d.ts +44 -10
- package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -11
- package/dist/components/BbSelect/BbSelect.vue.js +6 -0
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +241 -0
- package/dist/components/BbSelect/types.d.ts +112 -59
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +1 -10
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.js +6 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +639 -0
- package/dist/components/BbSelectPopover/types.d.ts +197 -105
- package/dist/components/BbSlider/BbSlider.vue.d.ts +3 -6
- package/dist/components/BbSlider/BbSlider.vue.js +6 -0
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +166 -0
- package/dist/components/BbSlider/types.d.ts +44 -13
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +3 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.js +6 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/BbSmoothHeight/types.d.ts +17 -2
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
- package/dist/components/BbSpinner/BbSpinner.vue.js +6 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/BbSpinner/types.d.ts +10 -3
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +5 -3
- package/dist/components/BbSwitch/BbSwitch.vue.js +6 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +142 -0
- package/dist/components/BbSwitch/types.d.ts +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +4 -14
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.js +6 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbSwitchGroup/types.d.ts +3 -22
- package/dist/components/BbTable/BbTable.vue.d.ts +58 -31
- package/dist/components/BbTable/BbTable.vue.js +6 -0
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +900 -0
- package/dist/components/BbTable/types.d.ts +213 -37
- package/dist/components/BbTable/utils.d.ts +9 -1
- package/dist/components/BbTable/utils.js +53 -0
- package/dist/components/BbTabs/BbTabs.vue.d.ts +20 -0
- package/dist/components/BbTabs/BbTabs.vue.js +6 -0
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +19 -0
- package/dist/components/BbTabs/BbTabsList.vue.js +6 -0
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/components/BbTabs/BbTabsPanes.vue.d.ts +16 -0
- package/dist/components/BbTabs/BbTabsPanes.vue.js +6 -0
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +20 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.js +5 -0
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/BbTabs/types.d.ts +264 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +19 -6
- package/dist/components/BbTag/BbTag.vue.js +6 -0
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/BbTag/types.d.ts +55 -17
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -1
- package/dist/components/BbTextInput/BbTextInput.vue.js +6 -0
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +195 -0
- package/dist/components/BbTextInput/types.d.ts +31 -4
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +10 -1
- package/dist/components/BbTextarea/BbTextarea.vue.js +6 -0
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/components/BbTextarea/types.d.ts +33 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +33 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.js +6 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BbTimePicker/types.d.ts +133 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +25 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.js +6 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/BbTimePickerInput/types.d.ts +174 -0
- package/dist/components/BbToast/BbToast.vue.d.ts +2 -3
- package/dist/components/BbToast/BbToast.vue.js +6 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +17 -8
- package/dist/components/BbToast/BbToastMessage.vue.js +5 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +30 -0
- package/dist/components/BbToast/BbToastPortal.vue.js +5 -0
- package/dist/components/BbToast/BbToastPortal.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +8 -0
- package/dist/components/BbToast/BbToastRegion.vue.js +5 -0
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/BbToast/types.d.ts +69 -5
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +10 -3
- package/dist/components/BbTooltip/BbTooltip.vue.js +6 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +160 -0
- package/dist/components/BbTooltip/types.d.ts +69 -11
- package/dist/components/BbTree/BbTree.vue.d.ts +28 -13
- package/dist/components/BbTree/BbTree.vue.js +6 -0
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +19 -0
- package/dist/components/BbTree/BbTreeLevel.vue.js +5 -0
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/components/BbTree/context.d.ts +17 -0
- package/dist/components/BbTree/context.js +4 -0
- package/dist/components/BbTree/types.d.ts +94 -41
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +2 -1
- package/dist/components/ChipsBox/ChipsBox.vue.js +5 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/components/ChipsBox/types.d.ts +12 -5
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +2 -1
- package/dist/components/ClearableButton/ClearableButton.vue.js +6 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/ClearableButton/types.d.ts +7 -1
- package/dist/components/CloseIcon/CloseButton.vue.d.ts +5 -0
- package/dist/components/CloseIcon/CloseButton.vue.js +7 -0
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/components/CloseIcon/types.d.ts +2 -0
- package/dist/components/CommaBox/CommaBox.vue.d.ts +2 -1
- package/dist/components/CommaBox/CommaBox.vue.js +6 -0
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/CommaBox/types.d.ts +6 -7
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.d.ts +19 -0
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +6 -0
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/components/CommonInputWrapper/types.d.ts +96 -0
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +9 -3
- package/dist/components/CommonPopover/CommonPopover.vue.js +6 -0
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +160 -0
- package/dist/components/CommonPopover/types.d.ts +65 -16
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +2 -0
- package/dist/components/ErrorIcon/ErrorIcon.vue.js +6 -0
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +2 -5
- package/dist/components/FlatListBox/FlatListBox.vue.js +5 -0
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/FlatListBox/types.d.ts +1 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +2 -5
- package/dist/components/GroupedListBox/GroupedListBox.vue.js +5 -0
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/components/ListBox/ListBox.vue.d.ts +3 -6
- package/dist/components/ListBox/ListBox.vue.js +5 -0
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/ListBox/types.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue.js +5 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/components/OptionsContainer/types.d.ts +14 -24
- package/dist/components/Transitions/ScaleFade.vue.d.ts +2 -2
- package/dist/components/Transitions/ScaleFade.vue.js +5 -0
- package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/components/Transitions/Slide.vue.d.ts +15 -0
- package/dist/components/Transitions/Slide.vue.js +7 -0
- package/dist/components/Transitions/Slide.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/components/WarningIcon/WarningIcon.vue.d.ts +5 -0
- package/dist/components/WarningIcon/WarningIcon.vue.js +6 -0
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/WarningIcon/types.d.ts +3 -0
- package/dist/composables/__testResets.d.ts +1 -0
- package/dist/composables/useActiveInactiveState.d.ts +4 -0
- package/dist/composables/useActiveInactiveState.js +21 -0
- package/dist/composables/useBaseOptions.d.ts +3 -3
- package/dist/composables/useBaseOptions.js +31 -0
- package/dist/composables/useBbConfig.d.ts +8 -37
- package/dist/composables/useBbConfig.js +5 -0
- package/dist/composables/useBbDropdownContext.d.ts +89 -0
- package/dist/composables/useBbDropdownContext.js +46 -0
- package/dist/composables/useBbFormContext.d.ts +90 -0
- package/dist/composables/useBbFormContext.js +69 -0
- package/dist/composables/useBbTableContext.d.ts +195 -0
- package/dist/composables/useBbTableContext.js +208 -0
- package/dist/composables/useBbTabsContext.d.ts +111 -0
- package/dist/composables/useBbTabsContext.js +225 -0
- package/dist/composables/useBreakpoint.d.ts +13 -0
- package/dist/composables/useBreakpoint.js +39 -0
- package/dist/composables/useBroadcastChannelInstance.d.ts +1 -3
- package/dist/composables/useBroadcastChannelInstance.js +39 -0
- package/dist/composables/useCancelableFunction.js +37 -0
- package/dist/composables/useClosingInert.d.ts +28 -0
- package/dist/composables/useClosingInert.js +23 -0
- package/dist/composables/useCoherence.js +16 -0
- package/dist/composables/useConfirm.d.ts +278 -68
- package/dist/composables/useConfirm.js +130 -0
- package/dist/composables/useCountdown.js +42 -0
- package/dist/composables/useHashedWatcher.d.ts +17 -0
- package/dist/composables/useHashedWatcher.js +14 -0
- package/dist/composables/useId.d.ts +3 -2
- package/dist/composables/useIndexById.js +16 -0
- package/dist/composables/useInertiaPage.d.ts +10 -0
- package/dist/composables/useInertiaPage.js +8 -0
- package/dist/composables/useItemText.js +17 -0
- package/dist/composables/useItemValue.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +1 -1
- package/dist/composables/useItemsGetter.js +30 -0
- package/dist/composables/useListboxFocus.js +66 -0
- package/dist/composables/useLocale.d.ts +1 -1
- package/dist/composables/useLocale.js +11 -0
- package/dist/composables/useLogger.d.ts +1 -1
- package/dist/composables/useLogger.js +10 -0
- package/dist/composables/useMinimalQueue.d.ts +1 -1
- package/dist/composables/useMobile.js +7 -0
- package/dist/composables/useOnFalsy.d.ts +2 -0
- package/dist/composables/useOnFalsy.js +9 -0
- package/dist/composables/useOnTruthy.d.ts +7 -0
- package/dist/composables/useOnTruthy.js +9 -0
- package/dist/composables/usePrefill.d.ts +2 -1
- package/dist/composables/usePrefill.js +24 -0
- package/dist/composables/useQuery.d.ts +15 -3
- package/dist/composables/useQuery.js +42 -0
- package/dist/composables/useRoute.js +11 -0
- package/dist/composables/useRouter.js +8 -0
- package/dist/composables/useSafeArea.d.ts +51 -0
- package/dist/composables/useSafeArea.js +16 -0
- package/dist/composables/useSegmentedFields.d.ts +104 -0
- package/dist/composables/useSegmentedFields.js +159 -0
- package/dist/composables/useTableWidthContext.d.ts +5 -0
- package/dist/composables/useTableWidthContext.js +42 -0
- package/dist/composables/useToast.d.ts +40 -70
- package/dist/composables/useToast.js +58 -0
- package/dist/composables/useTopLayer.d.ts +9 -0
- package/dist/composables/useTopLayer.js +7 -0
- package/dist/composables/useUntil.js +13 -0
- package/dist/composables/useViewportWidth.d.ts +17 -0
- package/dist/composables/useViewportWidth.js +6 -0
- package/dist/confirm-variants.d.ts +17 -0
- package/dist/deprecation/ai-deprecations.json.d.ts +784 -0
- package/dist/deprecation/ai-deprecations.json.js +4 -0
- package/dist/deprecation/removedProps.d.ts +3 -0
- package/dist/deprecation/removedProps.js +13 -0
- package/dist/directives/bbColor.d.ts +65 -0
- package/dist/directives/bbColor.js +24 -0
- package/dist/directives/bbDate.d.ts +66 -0
- package/dist/directives/bbDate.js +24 -0
- package/dist/directives/bbDropdown.d.ts +15 -11
- package/dist/directives/bbDropdown.js +23 -0
- package/dist/directives/bbTime.d.ts +64 -0
- package/dist/directives/bbTime.js +24 -0
- package/dist/directives/bbTooltip.d.ts +16 -11
- package/dist/directives/bbTooltip.js +24 -0
- package/dist/directives/createPopoverDirective.js +54 -0
- package/dist/dropdown-item-variants.d.ts +17 -0
- package/dist/i18n/index.d.ts +51 -3
- package/dist/i18n/index.js +27 -0
- package/dist/i18n/locales/cs.json +115 -0
- package/dist/i18n/locales/da.json +115 -0
- package/dist/i18n/locales/de.json +115 -0
- package/dist/i18n/locales/el.json +115 -0
- package/dist/i18n/locales/en.json +115 -0
- package/dist/i18n/locales/es.json +115 -0
- package/dist/i18n/locales/fi.json +115 -0
- package/dist/i18n/locales/fr.json +115 -0
- package/dist/i18n/locales/hu.json +115 -0
- package/dist/i18n/locales/it.json +115 -0
- package/dist/i18n/locales/ja.json +115 -0
- package/dist/i18n/locales/ko.json +115 -0
- package/dist/i18n/locales/nb.json +115 -0
- package/dist/i18n/locales/nl.json +115 -0
- package/dist/i18n/locales/pl.json +115 -0
- package/dist/i18n/locales/pt.json +115 -0
- package/dist/i18n/locales/ro.json +115 -0
- package/dist/i18n/locales/ru.json +115 -0
- package/dist/i18n/locales/sv.json +115 -0
- package/dist/i18n/locales/tr.json +115 -0
- package/dist/i18n/locales/uk.json +115 -0
- package/dist/i18n/locales/zh-cn.json +115 -0
- package/dist/icons-whitelist.d.ts +8 -0
- package/dist/index.d.ts +96 -79
- package/dist/index.js +76 -82
- package/dist/indicator-variants.d.ts +20 -0
- package/dist/llms-full.txt +79703 -0
- package/dist/llms-medium.txt +1514 -0
- package/dist/llms.txt +105 -0
- package/dist/locale-blueprint.json +141 -0
- package/dist/locale-registry.d.ts +37 -0
- package/dist/nuxt-module.d.ts +3 -0
- package/dist/nuxt.js +19 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/plugin.js +22 -0
- package/dist/reset.css +1 -0
- package/dist/reset.d.ts +0 -0
- package/dist/runtime/nuxt-plugin.d.ts +2 -0
- package/dist/runtime/nuxt-plugin.js +24 -0
- package/dist/styles.css +2 -0
- package/dist/styles.d.ts +0 -0
- package/dist/toast-variants.d.ts +20 -0
- package/dist/tooltip-variants.d.ts +17 -0
- package/dist/types/ActionButton.d.ts +32 -0
- package/dist/types/AlertVariant.d.ts +16 -0
- package/dist/types/BadgeVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.d.ts +17 -0
- package/dist/types/Classes.d.ts +1 -1
- package/dist/types/ColumnName.d.ts +1 -1
- package/dist/types/CommonProps.d.ts +68 -277
- package/dist/types/Config.d.ts +84 -0
- package/dist/types/ConfirmVariant.d.ts +15 -0
- package/dist/types/DropdownItemVariant.d.ts +18 -0
- package/dist/types/Icon.d.ts +5 -7
- package/dist/types/IndicatorVariant.d.ts +16 -0
- package/dist/types/InputDirection.d.ts +15 -0
- package/dist/types/ItemAccessor.d.ts +21 -0
- package/dist/types/Placement.d.ts +6 -0
- package/dist/types/ResponsiveSize.d.ts +20 -0
- package/dist/types/SizeScale.d.ts +8 -0
- package/dist/types/ToastVariant.d.ts +17 -0
- package/dist/types/TooltipVariant.d.ts +18 -0
- package/dist/utilities/functions/bytesToUnit.d.ts +2 -0
- package/dist/utilities/functions/bytesToUnit.js +18 -0
- package/dist/utilities/functions/clampPrecision.js +10 -0
- package/dist/utilities/functions/convertDateValue.d.ts +23 -10
- package/dist/utilities/functions/convertDateValue.js +12 -0
- package/dist/utilities/functions/deburr.js +5 -0
- package/dist/utilities/functions/empty.js +5 -0
- package/dist/utilities/functions/flattenTree.d.ts +1 -1
- package/dist/utilities/functions/hash.js +5 -0
- package/dist/utilities/functions/isDateDisabled.d.ts +1 -0
- package/dist/utilities/functions/isDateDisabled.js +20 -0
- package/dist/utilities/functions/isEqual.js +5 -0
- package/dist/utilities/functions/isNotEmpty.js +5 -0
- package/dist/utilities/functions/matchAnyKey.d.ts +1 -1
- package/dist/utilities/functions/matchAnyKey.js +15 -0
- package/dist/utilities/functions/parseSize.d.ts +1 -1
- package/dist/utilities/functions/parseSize.js +15 -0
- package/dist/utilities/functions/percentage.js +11 -0
- package/dist/utilities/functions/pipe.d.ts +1 -1
- package/dist/utilities/functions/reject.d.ts +25 -0
- package/dist/utilities/functions/reject.js +28 -0
- package/dist/utilities/functions/resolveEnumProp.d.ts +19 -0
- package/dist/utilities/functions/resolveEnumProp.js +5 -0
- package/dist/utilities/functions/slotKey.d.ts +13 -0
- package/dist/utilities/functions/slotKey.js +4 -0
- package/dist/utilities/functions/sort.d.ts +2 -2
- package/dist/utilities/functions/sort.js +19 -0
- package/dist/utilities/functions/throttle.js +5 -0
- package/dist/utilities/functions/waitFor.d.ts +9 -2
- package/dist/utilities/functions/waitFor.js +14 -0
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +11 -0
- package/dist/utilities/functions/warnRemovedAttrs.js +20 -0
- package/dist/utilities/functions/when.js +5 -0
- package/dist/utilities/misc/iconsInjectionKey.d.ts +15 -0
- package/dist/utilities/misc/iconsInjectionKey.js +4 -0
- package/dist/utilities/misc/transitions.d.ts +5 -0
- package/dist/utilities/misc/transitions.js +8 -0
- package/dist/utils/injectLibraryStyles.d.ts +6 -0
- package/dist/utils/injectLibraryStyles.js +38 -0
- package/dist/validated/BbCheckbox.vue.d.ts +29 -0
- package/dist/validated/BbCheckbox.vue.js +5 -0
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/validated/BbCheckboxGroup.vue.d.ts +34 -0
- package/dist/validated/BbCheckboxGroup.vue.js +5 -0
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/validated/BbColorInput.vue.d.ts +36 -0
- package/dist/validated/BbColorInput.vue.js +5 -0
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/validated/BbDatePickerInput.vue.d.ts +41 -0
- package/dist/validated/BbDatePickerInput.vue.js +5 -0
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +90 -0
- package/dist/validated/BbDropzone.vue.d.ts +24 -0
- package/dist/validated/BbDropzone.vue.js +5 -0
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/validated/BbForm.vue.d.ts +28 -0
- package/dist/validated/BbForm.vue.js +5 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/validated/BbNumberInput.vue.d.ts +36 -0
- package/dist/validated/BbNumberInput.vue.js +5 -0
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/validated/BbRadioGroup.vue.d.ts +34 -0
- package/dist/validated/BbRadioGroup.vue.js +5 -0
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/validated/BbRating.vue.d.ts +30 -0
- package/dist/validated/BbRating.vue.js +5 -0
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/validated/BbSelect.vue.d.ts +46 -0
- package/dist/validated/BbSelect.vue.js +5 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +109 -0
- package/dist/validated/BbSlider.vue.d.ts +36 -0
- package/dist/validated/BbSlider.vue.js +5 -0
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/validated/BbSwitch.vue.d.ts +29 -0
- package/dist/validated/BbSwitch.vue.js +5 -0
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/validated/BbSwitchGroup.vue.d.ts +34 -0
- package/dist/validated/BbSwitchGroup.vue.js +5 -0
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/validated/BbTag.vue.d.ts +36 -0
- package/dist/validated/BbTag.vue.js +5 -0
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/validated/BbTextInput.vue.d.ts +36 -0
- package/dist/validated/BbTextInput.vue.js +5 -0
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/validated/BbTextarea.vue.d.ts +36 -0
- package/dist/validated/BbTextarea.vue.js +5 -0
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/validated/BbTimePickerInput.vue.d.ts +37 -0
- package/dist/validated/BbTimePickerInput.vue.js +5 -0
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/validated/index.d.ts +29 -0
- package/dist/validated/useValidatedField.d.ts +93 -0
- package/dist/validated/useValidatedField.js +51 -0
- package/dist/validated.js +21 -0
- package/dist/vite-plugin.d.ts +261 -0
- package/dist/vite.js +603 -0
- package/llms.txt +107 -0
- package/package.json +181 -60
- package/scripts/lib/__fixtures__/validated-manifest.json +65 -0
- package/scripts/lib/ensure-manifest.mjs +39 -0
- package/scripts/lib/eslint-plugin-autofix.node.test.mjs +109 -0
- package/scripts/lib/eslint-plugin-recommended.node.test.mjs +87 -0
- package/scripts/lib/eslint-plugin-slots.node.test.mjs +271 -0
- package/scripts/lib/eslint-plugin.mjs +702 -0
- package/scripts/lib/eslint-plugin.node.test.mjs +193 -0
- package/scripts/lib/html-attributes.mjs +191 -0
- package/scripts/lib/mcp-config.mjs +126 -0
- package/scripts/lib/migrate-fix.mjs +115 -0
- package/scripts/lib/validate-bb-markup.mjs +488 -0
- package/dist/ai/BaseButton.md +0 -449
- package/dist/ai/BaseCheckbox.md +0 -512
- package/dist/ai/BaseCheckboxGroup.md +0 -597
- package/dist/ai/BaseColorInput.md +0 -461
- package/dist/ai/BaseDatePicker.md +0 -739
- package/dist/ai/BaseDatePickerInput.md +0 -1517
- package/dist/ai/BaseDialog.md +0 -610
- package/dist/ai/BaseInputContainer.md +0 -570
- package/dist/ai/BaseNumberInput.md +0 -509
- package/dist/ai/BaseRadio.md +0 -405
- package/dist/ai/BaseRadioGroup.md +0 -535
- package/dist/ai/BaseRating.md +0 -489
- package/dist/ai/BaseSelect.md +0 -1742
- package/dist/ai/BaseSlider.md +0 -871
- package/dist/ai/BaseSwitch.md +0 -322
- package/dist/ai/BaseSwitchGroup.md +0 -298
- package/dist/ai/BaseTag.md +0 -623
- package/dist/ai/BaseTextInput.md +0 -392
- package/dist/ai/BaseTextarea.md +0 -398
- package/dist/ai/BbChip.md +0 -147
- package/dist/ai/BbIntersection.md +0 -120
- package/dist/ai/BbRatio.md +0 -61
- package/dist/ai/BbRows.md +0 -307
- package/dist/ai/BbTab.md +0 -950
- package/dist/ai/CommonInputInnerContainer.md +0 -414
- package/dist/ai/CommonInputOuterContainer.md +0 -55
- package/dist/components/BaseButton/BaseButton.vue.d.ts +0 -14
- package/dist/components/BaseButton/types.d.ts +0 -159
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +0 -39
- package/dist/components/BaseCheckbox/types.d.ts +0 -213
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +0 -30
- package/dist/components/BaseCheckboxGroup/types.d.ts +0 -282
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +0 -35
- package/dist/components/BaseColorInput/ColorPalette.vue.d.ts +0 -13
- package/dist/components/BaseColorInput/types.d.ts +0 -233
- package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +0 -15
- package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +0 -58
- package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +0 -12
- package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +0 -12
- package/dist/components/BaseDatePicker/types.d.ts +0 -100
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -26
- package/dist/components/BaseDatePickerInput/types.d.ts +0 -206
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +0 -37
- package/dist/components/BaseDialog/types.d.ts +0 -180
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +0 -18
- package/dist/components/BaseInputContainer/types.d.ts +0 -126
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +0 -46
- package/dist/components/BaseNumberInput/types.d.ts +0 -191
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +0 -31
- package/dist/components/BaseRadio/types.d.ts +0 -173
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +0 -30
- package/dist/components/BaseRadioGroup/types.d.ts +0 -240
- package/dist/components/BaseRating/BaseRating.vue.d.ts +0 -35
- package/dist/components/BaseRating/types.d.ts +0 -144
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +0 -28
- package/dist/components/BaseSelect/types.d.ts +0 -470
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +0 -38
- package/dist/components/BaseSlider/types.d.ts +0 -201
- package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +0 -34
- package/dist/components/BaseSwitch/types.d.ts +0 -25
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +0 -30
- package/dist/components/BaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BaseTag/BaseTag.vue.d.ts +0 -37
- package/dist/components/BaseTag/types.d.ts +0 -136
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +0 -33
- package/dist/components/BaseTextInput/types.d.ts +0 -166
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +0 -31
- package/dist/components/BaseTextarea/types.d.ts +0 -151
- package/dist/components/BbChip/BbChip.vue.d.ts +0 -17
- package/dist/components/BbChip/types.d.ts +0 -23
- package/dist/components/BbIntersection/BbIntersection.vue.d.ts +0 -23
- package/dist/components/BbIntersection/types.d.ts +0 -36
- package/dist/components/BbRatio/BbRatio.vue.d.ts +0 -14
- package/dist/components/BbRatio/types.d.ts +0 -15
- package/dist/components/BbRows/BbRows.vue.d.ts +0 -62
- package/dist/components/BbRows/types.d.ts +0 -21
- package/dist/components/BbTab/BbTab.vue.d.ts +0 -27
- package/dist/components/BbTab/types.d.ts +0 -186
- package/dist/components/CommonInputInnerContainer/CommonInputInnerContainer.vue.d.ts +0 -15
- package/dist/components/CommonInputInnerContainer/types.d.ts +0 -47
- package/dist/components/CommonInputOuterContainer/CommonInputOuterContainer.vue.d.ts +0 -11
- package/dist/components/CommonInputOuterContainer/types.d.ts +0 -16
- package/dist/composables/useModalsState.d.ts +0 -5
- package/dist/composables/useQueue.d.ts +0 -58
- package/dist/composables/useWizard.d.ts +0 -85
- package/dist/i18n/en.d.ts +0 -67
- package/dist/i18n/it.d.ts +0 -67
- package/dist/index.css +0 -2
- package/dist/index100.js +0 -6
- package/dist/index101.js +0 -300
- package/dist/index102.js +0 -16
- package/dist/index103.js +0 -16
- package/dist/index104.js +0 -27
- package/dist/index109.js +0 -19
- package/dist/index11.js +0 -42
- package/dist/index110.js +0 -12
- package/dist/index111.js +0 -19
- package/dist/index112.js +0 -25
- package/dist/index114.js +0 -7
- package/dist/index115.js +0 -241
- package/dist/index116.js +0 -5
- package/dist/index117.js +0 -42
- package/dist/index118.js +0 -5
- package/dist/index119.js +0 -53
- package/dist/index120.js +0 -5
- package/dist/index121.js +0 -32
- package/dist/index122.js +0 -5
- package/dist/index124.js +0 -52
- package/dist/index125.js +0 -5
- package/dist/index126.js +0 -223
- package/dist/index128.js +0 -6
- package/dist/index129.js +0 -162
- package/dist/index13.js +0 -92
- package/dist/index130.js +0 -25
- package/dist/index131.js +0 -51
- package/dist/index132.js +0 -5
- package/dist/index133.js +0 -607
- package/dist/index135.js +0 -6
- package/dist/index136.js +0 -14
- package/dist/index137.js +0 -153
- package/dist/index139.js +0 -6
- package/dist/index14.js +0 -306
- package/dist/index140.js +0 -224
- package/dist/index141.js +0 -5
- package/dist/index143.js +0 -128
- package/dist/index145.js +0 -6
- package/dist/index146.js +0 -8
- package/dist/index147.js +0 -182
- package/dist/index149.js +0 -6
- package/dist/index15.js +0 -10
- package/dist/index151.js +0 -4
- package/dist/index152.js +0 -95
- package/dist/index154.js +0 -6
- package/dist/index155.js +0 -168
- package/dist/index157.js +0 -6
- package/dist/index158.js +0 -145
- package/dist/index16.js +0 -59
- package/dist/index160.js +0 -6
- package/dist/index161.js +0 -53
- package/dist/index163.js +0 -6
- package/dist/index164.js +0 -16
- package/dist/index166.js +0 -35
- package/dist/index168.js +0 -6
- package/dist/index169.js +0 -89
- package/dist/index171.js +0 -6
- package/dist/index172.js +0 -82
- package/dist/index174.js +0 -6
- package/dist/index175.js +0 -38
- package/dist/index176.js +0 -461
- package/dist/index177.js +0 -28
- package/dist/index178.js +0 -66
- package/dist/index18.js +0 -35
- package/dist/index180.js +0 -162
- package/dist/index181.js +0 -5
- package/dist/index182.js +0 -217
- package/dist/index183.js +0 -5
- package/dist/index184.js +0 -112
- package/dist/index185.js +0 -5
- package/dist/index186.js +0 -459
- package/dist/index188.js +0 -6
- package/dist/index19.js +0 -4
- package/dist/index192.js +0 -268
- package/dist/index194.js +0 -6
- package/dist/index195.js +0 -124
- package/dist/index197.js +0 -6
- package/dist/index198.js +0 -174
- package/dist/index2.js +0 -20
- package/dist/index20.js +0 -9
- package/dist/index200.js +0 -6
- package/dist/index201.js +0 -224
- package/dist/index203.js +0 -6
- package/dist/index204.js +0 -135
- package/dist/index206.js +0 -6
- package/dist/index207.js +0 -5
- package/dist/index208.js +0 -170
- package/dist/index21.js +0 -35
- package/dist/index210.js +0 -6
- package/dist/index211.js +0 -37
- package/dist/index213.js +0 -6
- package/dist/index214.js +0 -63
- package/dist/index216.js +0 -6
- package/dist/index217.js +0 -74
- package/dist/index219.js +0 -6
- package/dist/index22.js +0 -6
- package/dist/index220.js +0 -65
- package/dist/index222.js +0 -6
- package/dist/index223.js +0 -67
- package/dist/index225.js +0 -6
- package/dist/index226.js +0 -41
- package/dist/index228.js +0 -6
- package/dist/index229.js +0 -10
- package/dist/index23.js +0 -7
- package/dist/index230.js +0 -22
- package/dist/index232.js +0 -8
- package/dist/index233.js +0 -297
- package/dist/index235.js +0 -6
- package/dist/index236.js +0 -47
- package/dist/index237.js +0 -165
- package/dist/index239.js +0 -6
- package/dist/index24.js +0 -9
- package/dist/index241.js +0 -159
- package/dist/index243.js +0 -6
- package/dist/index244.js +0 -134
- package/dist/index246.js +0 -6
- package/dist/index247.js +0 -167
- package/dist/index249.js +0 -6
- package/dist/index25.js +0 -24
- package/dist/index250.js +0 -147
- package/dist/index252.js +0 -6
- package/dist/index253.js +0 -35
- package/dist/index255.js +0 -6
- package/dist/index256.js +0 -65
- package/dist/index258.js +0 -6
- package/dist/index259.js +0 -19
- package/dist/index260.js +0 -5
- package/dist/index261.js +0 -160
- package/dist/index263.js +0 -6
- package/dist/index264.js +0 -60
- package/dist/index266.js +0 -6
- package/dist/index267.js +0 -134
- package/dist/index269.js +0 -6
- package/dist/index27.js +0 -4
- package/dist/index271.js +0 -206
- package/dist/index273.js +0 -6
- package/dist/index274.js +0 -85
- package/dist/index275.js +0 -5
- package/dist/index276.js +0 -55
- package/dist/index277.js +0 -5
- package/dist/index278.js +0 -164
- package/dist/index28.js +0 -8
- package/dist/index280.js +0 -6
- package/dist/index281.js +0 -145
- package/dist/index283.js +0 -6
- package/dist/index284.js +0 -11
- package/dist/index285.js +0 -200
- package/dist/index287.js +0 -6
- package/dist/index288.js +0 -241
- package/dist/index29.js +0 -7
- package/dist/index290.js +0 -6
- package/dist/index291.js +0 -21
- package/dist/index293.js +0 -6
- package/dist/index294.js +0 -125
- package/dist/index296.js +0 -6
- package/dist/index297.js +0 -161
- package/dist/index299.js +0 -6
- package/dist/index30.js +0 -118
- package/dist/index300.js +0 -127
- package/dist/index302.js +0 -6
- package/dist/index303.js +0 -20
- package/dist/index305.js +0 -6
- package/dist/index306.js +0 -116
- package/dist/index307.js +0 -5
- package/dist/index308.js +0 -507
- package/dist/index31.js +0 -10
- package/dist/index310.js +0 -6
- package/dist/index311.js +0 -196
- package/dist/index313.js +0 -6
- package/dist/index314.js +0 -142
- package/dist/index316.js +0 -6
- package/dist/index317.js +0 -134
- package/dist/index319.js +0 -6
- package/dist/index32.js +0 -28
- package/dist/index320.js +0 -162
- package/dist/index322.js +0 -6
- package/dist/index323.js +0 -319
- package/dist/index325.js +0 -6
- package/dist/index326.js +0 -40
- package/dist/index327.js +0 -43
- package/dist/index328.js +0 -665
- package/dist/index33.js +0 -5
- package/dist/index330.js +0 -6
- package/dist/index331.js +0 -155
- package/dist/index333.js +0 -6
- package/dist/index334.js +0 -142
- package/dist/index336.js +0 -6
- package/dist/index337.js +0 -155
- package/dist/index339.js +0 -6
- package/dist/index34.js +0 -112
- package/dist/index340.js +0 -58
- package/dist/index341.js +0 -5
- package/dist/index342.js +0 -20
- package/dist/index344.js +0 -6
- package/dist/index345.js +0 -142
- package/dist/index347.js +0 -6
- package/dist/index349.js +0 -109
- package/dist/index351.js +0 -6
- package/dist/index352.js +0 -55
- package/dist/index353.js +0 -24
- package/dist/index354.js +0 -23
- package/dist/index355.js +0 -839
- package/dist/index356.js +0 -474
- package/dist/index357.js +0 -52
- package/dist/index358.js +0 -7
- package/dist/index36.js +0 -6
- package/dist/index38.js +0 -63
- package/dist/index39.js +0 -63
- package/dist/index40.js +0 -9
- package/dist/index42.js +0 -8
- package/dist/index43.js +0 -179
- package/dist/index44.js +0 -21
- package/dist/index46.js +0 -385
- package/dist/index48.js +0 -6
- package/dist/index49.js +0 -33
- package/dist/index5.js +0 -34
- package/dist/index50.js +0 -12
- package/dist/index51.js +0 -8
- package/dist/index52.js +0 -106
- package/dist/index53.js +0 -330
- package/dist/index54.js +0 -97
- package/dist/index55.js +0 -328
- package/dist/index56.js +0 -28
- package/dist/index57.js +0 -102
- package/dist/index58.js +0 -157
- package/dist/index6.js +0 -38
- package/dist/index60.js +0 -6
- package/dist/index61.js +0 -131
- package/dist/index62.js +0 -5
- package/dist/index65.js +0 -35
- package/dist/index66.js +0 -26
- package/dist/index68.js +0 -6
- package/dist/index69.js +0 -54
- package/dist/index7.js +0 -58
- package/dist/index71.js +0 -6
- package/dist/index72.js +0 -14
- package/dist/index74.js +0 -6
- package/dist/index75.js +0 -159
- package/dist/index77.js +0 -6
- package/dist/index78.js +0 -4
- package/dist/index79.js +0 -4
- package/dist/index80.js +0 -54
- package/dist/index81.js +0 -5
- package/dist/index82.js +0 -5
- package/dist/index83.js +0 -141
- package/dist/index85.js +0 -6
- package/dist/index86.js +0 -65
- package/dist/index88.js +0 -6
- package/dist/index89.js +0 -30
- package/dist/index9.js +0 -11
- package/dist/index90.js +0 -19
- package/dist/index91.js +0 -17
- package/dist/index92.js +0 -9
- package/dist/index93.js +0 -34
- package/dist/index95.js +0 -16
- package/dist/index96.js +0 -10
- package/dist/index97.js +0 -18
- package/dist/index98.js +0 -189
- package/dist/types/VoidHtmlElements.d.ts +0 -1
- package/dist/utilities/functions/add.d.ts +0 -1
- package/dist/utilities/functions/booleanishToBoolean.d.ts +0 -6
- package/dist/utilities/functions/capitalize.d.ts +0 -4
- package/dist/utilities/functions/cloneDeep.d.ts +0 -1
- package/dist/utilities/functions/debounce.d.ts +0 -1
- package/dist/utilities/functions/drop.d.ts +0 -1
- package/dist/utilities/functions/exceedsPrecision.d.ts +0 -1
- package/dist/utilities/functions/findRight.d.ts +0 -4
- package/dist/utilities/functions/findRightIndex.d.ts +0 -4
- package/dist/utilities/functions/flow.d.ts +0 -1
- package/dist/utilities/functions/getHueFromRGB.d.ts +0 -9
- package/dist/utilities/functions/groupBy.d.ts +0 -6
- package/dist/utilities/functions/gt.d.ts +0 -7
- package/dist/utilities/functions/hexToRGB.d.ts +0 -7
- package/dist/utilities/functions/hslToHex.d.ts +0 -1
- package/dist/utilities/functions/includes.d.ts +0 -1
- package/dist/utilities/functions/initial.d.ts +0 -1
- package/dist/utilities/functions/isCssColor.d.ts +0 -5
- package/dist/utilities/functions/lt.d.ts +0 -7
- package/dist/utilities/functions/makeUrl.d.ts +0 -1
- package/dist/utilities/functions/mapKeys.d.ts +0 -5
- package/dist/utilities/functions/mapValues.d.ts +0 -1
- package/dist/utilities/functions/matchesPropertyInsensitive.d.ts +0 -1
- package/dist/utilities/functions/max.d.ts +0 -2
- package/dist/utilities/functions/mean.d.ts +0 -4
- package/dist/utilities/functions/merge.d.ts +0 -11
- package/dist/utilities/functions/millisecondsTo.d.ts +0 -1
- package/dist/utilities/functions/negate.d.ts +0 -4
- package/dist/utilities/functions/normalizeItemGroups.d.ts +0 -13
- package/dist/utilities/functions/omit.d.ts +0 -2
- package/dist/utilities/functions/overEvery.d.ts +0 -4
- package/dist/utilities/functions/pick.d.ts +0 -1
- package/dist/utilities/functions/replace.d.ts +0 -1
- package/dist/utilities/functions/replaceInTree.d.ts +0 -4
- package/dist/utilities/functions/retry.d.ts +0 -5
- package/dist/utilities/functions/roundToTheNearest.d.ts +0 -8
- package/dist/utilities/functions/set.d.ts +0 -15
- package/dist/utilities/functions/stub.d.ts +0 -6
- package/dist/utilities/functions/transposePercent.d.ts +0 -9
- package/dist/utilities/functions/tryTo.d.ts +0 -2
- package/dist/utilities/functions/uniqBy.d.ts +0 -1
- /package/dist/{index64.js → _virtual/_plugin-vue_export-helper.js} +0 -0
- /package/dist/components/{BaseButton → BbBaseButton}/RouterComponent.vue.d.ts +0 -0
- /package/dist/components/{BaseDatePicker/BaseDatePicker.vue.d.ts → BbBaseDatePicker/BbBaseDatePicker.vue.d.ts} +0 -0
- /package/dist/{index165.js → composables/useArray.js} +0 -0
- /package/dist/{index17.js → composables/useFrameworkDetection.js} +0 -0
- /package/dist/{index12.js → composables/useId.js} +0 -0
- /package/dist/{index107.js → utilities/functions/chunk.js} +0 -0
- /package/dist/{index8.js → utilities/functions/clamp.js} +0 -0
- /package/dist/{index150.js → utilities/functions/curry.js} +0 -0
- /package/dist/{index45.js → utilities/functions/extractDomContainer.js} +0 -0
- /package/dist/{index270.js → utilities/functions/findInTree.js} +0 -0
- /package/dist/{index348.js → utilities/functions/flattenTree.js} +0 -0
- /package/dist/{index41.js → utilities/functions/get.js} +0 -0
- /package/dist/{index189.js → utilities/functions/head.js} +0 -0
- /package/dist/{index108.js → utilities/functions/identity.js} +0 -0
- /package/dist/{index179.js → utilities/functions/indexBy.js} +0 -0
- /package/dist/{index37.js → utilities/functions/isHex.js} +0 -0
- /package/dist/{index94.js → utilities/functions/isNil.js} +0 -0
- /package/dist/{index26.js → utilities/functions/isNotNil.js} +0 -0
- /package/dist/{index105.js → utilities/functions/last.js} +0 -0
- /package/dist/{index142.js → utilities/functions/noop.js} +0 -0
- /package/dist/{index231.js → utilities/functions/parseWidthString.js} +0 -0
- /package/dist/{index240.js → utilities/functions/pickBy.js} +0 -0
- /package/dist/{index123.js → utilities/functions/range.js} +0 -0
- /package/dist/{index190.js → utilities/functions/snapToStep.js} +0 -0
- /package/dist/{index191.js → utilities/functions/transpose.js} +0 -0
- /package/dist/{index106.js → utilities/functions/validateDateFormat.js} +0 -0
- /package/dist/{index10.js → utilities/functions/wait.js} +0 -0
package/dist/ai/BbTree.md
CHANGED
|
@@ -1,270 +1,1029 @@
|
|
|
1
1
|
# BbTree
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Agent Contract
|
|
4
|
+
|
|
5
|
+
- Safety level: **Consumer API**
|
|
6
|
+
- Group: **Navigation**
|
|
7
|
+
- Description: Renders hierarchical expandable tree structures.
|
|
8
|
+
- Usage rule: Prefer this component for consumer-facing implementations.
|
|
9
|
+
- Implementation source (only when the contract below is not enough): [source/BbTree.md](./source/BbTree.md)
|
|
10
|
+
|
|
11
|
+
## Usage & Guidelines
|
|
12
|
+
|
|
13
|
+
### When to use
|
|
14
|
+
|
|
15
|
+
Reach for `BbTree` when your data is genuinely hierarchical and of unbounded
|
|
16
|
+
depth: a file/folder browser, a docs sidebar, a category picker, an org chart.
|
|
17
|
+
Nodes expand and collapse to reveal their children.
|
|
18
|
+
|
|
19
|
+
- Flat rows that happen to have one level of detail? Use `BbTable` with its
|
|
20
|
+
`#expand` slot — trees are for recursion, not master/detail.
|
|
21
|
+
- A short one-off menu? A dropdown or list is lighter than a tree.
|
|
22
|
+
- One collapsible section? `BbCollapsible` — a tree of one node is overkill.
|
|
23
|
+
|
|
24
|
+
`BbTree` renders no visual chrome of its own — no rows, chevrons, icons or
|
|
25
|
+
lines. You own every node's markup through slots; the component owns the
|
|
26
|
+
structure, expansion state and accessibility wiring.
|
|
27
|
+
|
|
28
|
+
### The node grammar: `BbTreeItem<Meta>`
|
|
29
|
+
|
|
30
|
+
Feed `items` a nested array of `BbTreeItem<Meta>`. The envelope is fixed so the
|
|
31
|
+
component can reason about the tree; `meta` carries your data and flows to
|
|
32
|
+
every slot **fully typed** when you declare the array as
|
|
33
|
+
`BbTreeItem<YourMeta>[]`.
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
type BbTreeItem<Meta> = {
|
|
37
|
+
meta: Meta; // your data — arrives typed in every slot
|
|
38
|
+
children?: BbTreeItem<Meta>[]; // presence makes the node a branch
|
|
39
|
+
expanded?: boolean; // INITIAL state only; branches default to expanded
|
|
40
|
+
expandable?: boolean | ((item, depth, parent) => boolean); // per-node override
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Rules the component lives by:
|
|
45
|
+
|
|
46
|
+
- A node with `children` is a branch; one without is a leaf. **Leaves always
|
|
47
|
+
report `expanded: true`** — they have nothing to hide. (This matters for
|
|
48
|
+
lazy loading; see the placeholder-child pattern below.)
|
|
49
|
+
- Nothing is expandable by default. Pass `expandable` — a boolean, or a
|
|
50
|
+
function `(item, depth, parent) => boolean` — to decide which nodes get a
|
|
51
|
+
live toggle and `aria-expanded`. The everyday idiom is
|
|
52
|
+
`:expandable="(n) => !!n.children?.length"`; a function can also lock levels
|
|
53
|
+
(`depth > 2`) or gate on `item.meta`. A node's own `expandable` field
|
|
54
|
+
overrides the tree-level prop for that node.
|
|
55
|
+
- Non-expandable branches still render their children (expanded, frozen);
|
|
56
|
+
`expandable` controls the _toggle_, not the rendering.
|
|
57
|
+
- `expanded` on an item is the initial state only — live state belongs to
|
|
58
|
+
`v-model:expandedItems` (next sections).
|
|
59
|
+
|
|
60
|
+
The per-node override earns its keep in mixed hierarchies. This team
|
|
61
|
+
directory gates toggles with the tree-level function, then pins the
|
|
62
|
+
Leadership branch with `expandable: false` on the node itself — its members
|
|
63
|
+
render expanded and frozen, no chevron, while departments and teams toggle
|
|
64
|
+
normally:
|
|
65
|
+
|
|
66
|
+
**Team directory with a pinned branch**
|
|
4
67
|
|
|
5
68
|
```vue
|
|
6
69
|
<template>
|
|
7
70
|
<div
|
|
8
|
-
|
|
9
|
-
:key="item.identifier"
|
|
10
|
-
class="bb-tree"
|
|
11
|
-
:class="{
|
|
12
|
-
[`bb-tree--depth-${item.depth}`]: true,
|
|
13
|
-
'bb-tree--open': item.open,
|
|
14
|
-
}"
|
|
71
|
+
class="w-full max-w-xs overflow-hidden rounded-[var(--bb-radius)] border border-[color:var(--bb-border)]"
|
|
15
72
|
>
|
|
16
|
-
<div
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
:open="item.open"
|
|
29
|
-
:parent="item.parent"
|
|
30
|
-
/>
|
|
31
|
-
<!-- Slot for all items in this level -->
|
|
32
|
-
<slot
|
|
33
|
-
v-else-if="$slots[item.depth]"
|
|
34
|
-
:depth="item.depth"
|
|
35
|
-
:expandable="item.expandable"
|
|
36
|
-
:identifier="item.identifier"
|
|
37
|
-
:index="item.index"
|
|
38
|
-
:item="item.original"
|
|
39
|
-
:name="item.depth"
|
|
40
|
-
:offset="item.offset"
|
|
41
|
-
:open="item.open"
|
|
42
|
-
:parent="item.parent"
|
|
43
|
-
/>
|
|
44
|
-
<!-- Default slot -->
|
|
45
|
-
<slot
|
|
46
|
-
v-else
|
|
47
|
-
:depth="item.depth"
|
|
48
|
-
:expandable="item.expandable"
|
|
49
|
-
:identifier="item.identifier"
|
|
50
|
-
:index="item.index"
|
|
51
|
-
:item="item.original"
|
|
52
|
-
:name="'default'"
|
|
53
|
-
:offset="item.offset"
|
|
54
|
-
:open="item.open"
|
|
55
|
-
:parent="item.parent"
|
|
56
|
-
></slot>
|
|
57
|
-
</div>
|
|
73
|
+
<div
|
|
74
|
+
class="flex items-center gap-1.5 border-b border-[color:var(--bb-border)] px-2.5 py-1.5"
|
|
75
|
+
>
|
|
76
|
+
<BbIcon
|
|
77
|
+
class="text-[color:var(--bb-text-muted)]"
|
|
78
|
+
icon="lucide:users"
|
|
79
|
+
size="sm"
|
|
80
|
+
/>
|
|
81
|
+
<span class="text-xs font-medium">People</span>
|
|
82
|
+
<span class="ml-auto text-xs text-[color:var(--bb-text-muted)]"
|
|
83
|
+
>Acme Studio</span
|
|
84
|
+
>
|
|
58
85
|
</div>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
:
|
|
69
|
-
|
|
86
|
+
|
|
87
|
+
<BbTree
|
|
88
|
+
class="p-1.5"
|
|
89
|
+
:expandable="(node) => !!node.children?.length"
|
|
90
|
+
item-value="id"
|
|
91
|
+
:items="org"
|
|
92
|
+
style="--indent: 0.875rem; --gap: 0.125rem"
|
|
93
|
+
>
|
|
94
|
+
<template #default="{ meta, item, expanded, expandable, expandProps }">
|
|
95
|
+
<!-- Toggleable group: department or team, with a member count. -->
|
|
96
|
+
<button
|
|
97
|
+
v-if="expandable"
|
|
98
|
+
:aria-label="`${expanded ? 'Collapse' : 'Expand'} ${meta.name}`"
|
|
99
|
+
class="flex w-full items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-left text-sm font-medium hover:bg-[color:var(--bb-surface-hover)]"
|
|
100
|
+
type="button"
|
|
101
|
+
v-bind="expandProps"
|
|
102
|
+
>
|
|
103
|
+
<BbIcon
|
|
104
|
+
class="shrink-0 text-[color:var(--bb-text-muted)]"
|
|
105
|
+
:icon="expanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
|
|
106
|
+
size="sm"
|
|
107
|
+
/>
|
|
108
|
+
<span class="min-w-0 flex-1 truncate">{{ meta.name }}</span>
|
|
109
|
+
<BbBadge size="sm" variant="secondary">{{
|
|
110
|
+
memberCount(item)
|
|
111
|
+
}}</BbBadge>
|
|
112
|
+
</button>
|
|
113
|
+
<!-- Frozen branch (`expandable: false` on the node): children render
|
|
114
|
+
expanded with no toggle, so it reads as a pinned section. -->
|
|
115
|
+
<span
|
|
116
|
+
v-else-if="item.children?.length"
|
|
117
|
+
class="flex items-center gap-1.5 px-1.5 py-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--bb-text-muted)]"
|
|
118
|
+
>
|
|
119
|
+
{{ meta.name }}
|
|
120
|
+
</span>
|
|
121
|
+
<!-- Leaf: a person. -->
|
|
122
|
+
<span v-else class="flex items-center gap-2 px-1.5 py-0.5 text-sm">
|
|
123
|
+
<BbAvatar :alt="meta.name" size="sm">
|
|
124
|
+
{{ initials(meta.name) }}
|
|
125
|
+
</BbAvatar>
|
|
126
|
+
<span class="min-w-0 truncate font-medium">{{ meta.name }}</span>
|
|
127
|
+
<span class="shrink-0 text-xs text-[color:var(--bb-text-muted)]">{{
|
|
128
|
+
meta.role
|
|
129
|
+
}}</span>
|
|
130
|
+
</span>
|
|
131
|
+
</template>
|
|
132
|
+
</BbTree>
|
|
133
|
+
</div>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<script setup lang="ts">
|
|
137
|
+
import { ref } from 'vue';
|
|
138
|
+
import { BbTree, BbAvatar, BbBadge, BbIcon } from 'bitboss-ui';
|
|
139
|
+
import type { BbTreeItem } from 'bitboss-ui';
|
|
140
|
+
|
|
141
|
+
type OrgEntry = { id: string; name: string; role?: string };
|
|
142
|
+
|
|
143
|
+
const initials = (name: string) =>
|
|
144
|
+
name
|
|
145
|
+
.split(' ')
|
|
146
|
+
.map((part) => part[0])
|
|
147
|
+
.join('');
|
|
148
|
+
|
|
149
|
+
/** Count people under a branch (leaves only), not nested team nodes. */
|
|
150
|
+
const memberCount = (node: BbTreeItem<OrgEntry>): number => {
|
|
151
|
+
if (!node.children?.length) return 0;
|
|
152
|
+
return node.children.reduce(
|
|
153
|
+
(sum, child) => sum + (child.children?.length ? memberCount(child) : 1),
|
|
154
|
+
0
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const org = ref<Array<BbTreeItem<OrgEntry>>>([
|
|
159
|
+
{
|
|
160
|
+
// Node-level override: Leadership is pinned open, no toggle.
|
|
161
|
+
meta: { id: 'leadership', name: 'Leadership' },
|
|
162
|
+
expandable: false,
|
|
163
|
+
children: [
|
|
164
|
+
{ meta: { id: 'ada', name: 'Ada Kim', role: 'CEO' } },
|
|
165
|
+
{ meta: { id: 'grace', name: 'Grace Okafor', role: 'CTO' } },
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
meta: { id: 'engineering', name: 'Engineering' },
|
|
170
|
+
children: [
|
|
171
|
+
{
|
|
172
|
+
meta: { id: 'platform', name: 'Platform' },
|
|
173
|
+
children: [
|
|
174
|
+
{ meta: { id: 'maya', name: 'Maya Chen', role: 'Staff engineer' } },
|
|
175
|
+
{ meta: { id: 'tom', name: 'Tom Iversen', role: 'SRE' } },
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
meta: { id: 'web', name: 'Web' },
|
|
180
|
+
expanded: false,
|
|
181
|
+
children: [
|
|
182
|
+
{ meta: { id: 'priya', name: 'Priya Nair', role: 'Frontend' } },
|
|
183
|
+
{ meta: { id: 'leo', name: 'Leo Marchetti', role: 'Frontend' } },
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
meta: { id: 'design', name: 'Design' },
|
|
190
|
+
expanded: false,
|
|
191
|
+
children: [
|
|
192
|
+
{ meta: { id: 'sofia', name: 'Sofia Duarte', role: 'Product designer' } },
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
]);
|
|
196
|
+
</script>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### The default slot: you own every node
|
|
200
|
+
|
|
201
|
+
The `default` slot renders each node and receives:
|
|
202
|
+
|
|
203
|
+
- `meta` — the typed data; `item` — the full node including `children`;
|
|
204
|
+
`parent` — the parent node (`undefined` at root); `index` — zero-based
|
|
205
|
+
position among siblings; `depth` — `0` at root; `value` — the node's
|
|
206
|
+
resolved identity (see `item-value`).
|
|
207
|
+
- `expanded` / `expandable` — current booleans for this node.
|
|
208
|
+
- `toggleExpanded()` — flips this node's expansion.
|
|
209
|
+
- `expandProps` — bind onto your toggle element (`v-bind="expandProps"`); it
|
|
210
|
+
wires `aria-expanded`, `aria-controls` (pointing at the children container),
|
|
211
|
+
a click handler (which also stops propagation), and an Enter/Space keydown
|
|
212
|
+
fallback for non-`<button>` elements. Prefer a real `<button>` — it gets
|
|
213
|
+
focus and key activation natively.
|
|
214
|
+
|
|
215
|
+
Everything in the payload is a one-way snapshot: mutate nothing, and change
|
|
216
|
+
expansion only through `toggleExpanded` / `expandProps` (or by writing
|
|
217
|
+
`v-model:expandedItems`). Gate the toggle with `expandable` so leaves render
|
|
218
|
+
as plain rows.
|
|
219
|
+
|
|
220
|
+
**A project file browser**
|
|
221
|
+
|
|
222
|
+
```vue
|
|
223
|
+
<template>
|
|
224
|
+
<div
|
|
225
|
+
class="w-full max-w-xs overflow-hidden rounded-[var(--bb-radius)] border border-[color:var(--bb-border)]"
|
|
226
|
+
>
|
|
227
|
+
<div
|
|
228
|
+
class="flex items-center gap-1.5 border-b border-[color:var(--bb-border)] px-2.5 py-1.5"
|
|
229
|
+
>
|
|
230
|
+
<BbIcon
|
|
231
|
+
class="text-[color:var(--bb-text-muted)]"
|
|
232
|
+
icon="lucide:files"
|
|
233
|
+
size="sm"
|
|
234
|
+
/>
|
|
235
|
+
<span class="text-xs font-medium">Explorer</span>
|
|
236
|
+
<span class="ml-auto text-xs text-[color:var(--bb-text-muted)]"
|
|
237
|
+
>acme-web</span
|
|
70
238
|
>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<BbTree
|
|
242
|
+
class="p-1.5"
|
|
243
|
+
:expandable="(node) => !!node.children?.length"
|
|
244
|
+
item-value="path"
|
|
245
|
+
:items="items"
|
|
246
|
+
style="--indent: 0.875rem; --gap: 0.125rem"
|
|
247
|
+
>
|
|
248
|
+
<template #default="{ meta, expanded, expandable, expandProps }">
|
|
249
|
+
<button
|
|
250
|
+
v-if="expandable"
|
|
251
|
+
:aria-label="`${expanded ? 'Collapse' : 'Expand'} ${meta.name}`"
|
|
252
|
+
class="flex w-full items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-left text-sm hover:bg-[color:var(--bb-surface-hover)]"
|
|
253
|
+
type="button"
|
|
254
|
+
v-bind="expandProps"
|
|
255
|
+
>
|
|
256
|
+
<BbIcon
|
|
257
|
+
class="shrink-0 text-[color:var(--bb-text-muted)]"
|
|
258
|
+
:icon="expanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
|
|
259
|
+
size="sm"
|
|
260
|
+
/>
|
|
261
|
+
<BbIcon
|
|
262
|
+
class="shrink-0 text-[color:var(--bb-text-muted)]"
|
|
263
|
+
:icon="expanded ? 'lucide:folder-open' : 'lucide:folder'"
|
|
264
|
+
size="sm"
|
|
265
|
+
/>
|
|
266
|
+
<span class="truncate font-medium">{{ meta.name }}</span>
|
|
267
|
+
</button>
|
|
268
|
+
<span
|
|
269
|
+
v-else
|
|
270
|
+
class="flex items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 pl-[1.55rem] text-sm text-[color:var(--bb-text-muted)]"
|
|
81
271
|
>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
272
|
+
<BbIcon
|
|
273
|
+
class="shrink-0 text-[color:var(--bb-text-faint)]"
|
|
274
|
+
icon="lucide:file"
|
|
275
|
+
size="sm"
|
|
276
|
+
/>
|
|
277
|
+
<span class="truncate text-[color:var(--bb-text)]">{{
|
|
278
|
+
meta.name
|
|
279
|
+
}}</span>
|
|
280
|
+
</span>
|
|
281
|
+
</template>
|
|
282
|
+
</BbTree>
|
|
283
|
+
</div>
|
|
284
|
+
</template>
|
|
285
|
+
|
|
286
|
+
<script setup lang="ts">
|
|
287
|
+
import { ref } from 'vue';
|
|
288
|
+
import { BbTree, BbIcon } from 'bitboss-ui';
|
|
289
|
+
import type { BbTreeItem } from 'bitboss-ui';
|
|
290
|
+
|
|
291
|
+
type FileNode = { name: string; path: string };
|
|
292
|
+
|
|
293
|
+
const items = ref<Array<BbTreeItem<FileNode>>>([
|
|
294
|
+
{
|
|
295
|
+
meta: { name: 'src', path: 'src' },
|
|
296
|
+
children: [
|
|
297
|
+
{
|
|
298
|
+
meta: { name: 'components', path: 'src/components' },
|
|
299
|
+
children: [
|
|
300
|
+
{
|
|
301
|
+
meta: { name: 'BbButton.vue', path: 'src/components/BbButton.vue' },
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
meta: { name: 'BbTable.vue', path: 'src/components/BbTable.vue' },
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
},
|
|
308
|
+
{ meta: { name: 'main.ts', path: 'src/main.ts' } },
|
|
309
|
+
],
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
meta: { name: 'public', path: 'public' },
|
|
313
|
+
expanded: false,
|
|
314
|
+
children: [{ meta: { name: 'favicon.ico', path: 'public/favicon.ico' } }],
|
|
315
|
+
},
|
|
316
|
+
{ meta: { name: 'package.json', path: 'package.json' } },
|
|
317
|
+
{ meta: { name: 'vite.config.ts', path: 'vite.config.ts' } },
|
|
318
|
+
]);
|
|
319
|
+
</script>
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Node identity: `item-value`
|
|
323
|
+
|
|
324
|
+
Set `item-value` to a `meta` key (`item-value="path"`) or a function
|
|
325
|
+
`(meta) => value` so each node has a stable identity. The identity is what:
|
|
326
|
+
|
|
327
|
+
- fills `v-model:expandedItems` (readable entries like `'src/components'`
|
|
328
|
+
instead of whole objects);
|
|
329
|
+
- is hashed to track expansion — without `item-value` the **whole `meta`
|
|
330
|
+
object** is hashed, so re-fetching data and recreating objects with a new
|
|
331
|
+
property order or extra fields silently resets expansion state;
|
|
332
|
+
- names per-node slots when it resolves to a string or number (next section);
|
|
333
|
+
- arrives in every slot as `value`.
|
|
334
|
+
|
|
335
|
+
Always set it when items come from a server.
|
|
336
|
+
|
|
337
|
+
### Controlling expansion state
|
|
338
|
+
|
|
339
|
+
Live expansion is a `v-model:expandedItems` — a list of node **values**, with
|
|
340
|
+
the exact verbs of `BbTable`. `update:expandedItems` fires with the full new
|
|
341
|
+
list every time a node toggles; you rarely listen to it directly — bind the
|
|
342
|
+
model and treat it as state.
|
|
343
|
+
|
|
344
|
+
Seeding: when a branch node is seen for the first time (initial render, or
|
|
345
|
+
appended later), it joins the model automatically **unless** it is marked
|
|
346
|
+
`expanded: false` or already tracked. After that first sighting the model is
|
|
347
|
+
the single source of truth — later flips of the `expanded` flag are ignored.
|
|
348
|
+
Write the model to drive expand-all / collapse-all, persist the open folders,
|
|
349
|
+
or restore them on reload.
|
|
350
|
+
|
|
351
|
+
**Docs sidebar with expand / collapse all**
|
|
352
|
+
|
|
353
|
+
```vue
|
|
354
|
+
<template>
|
|
355
|
+
<div class="w-full max-w-xs">
|
|
356
|
+
<div class="mb-2 flex gap-1.5">
|
|
357
|
+
<BbButton size="sm" variant="outline" @click="expandAll">
|
|
358
|
+
Expand all
|
|
359
|
+
</BbButton>
|
|
360
|
+
<BbButton size="sm" variant="ghost" @click="collapseAll">
|
|
361
|
+
Collapse all
|
|
362
|
+
</BbButton>
|
|
95
363
|
</div>
|
|
364
|
+
|
|
365
|
+
<BbTree
|
|
366
|
+
v-model:expanded-items="expandedSections"
|
|
367
|
+
class="rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-1.5"
|
|
368
|
+
:expandable="(node) => !!node.children?.length"
|
|
369
|
+
item-value="id"
|
|
370
|
+
:items="sections"
|
|
371
|
+
style="--indent: 0.75rem; --gap: 0.125rem"
|
|
372
|
+
>
|
|
373
|
+
<template #default="{ meta, expanded, expandable, expandProps }">
|
|
374
|
+
<button
|
|
375
|
+
v-if="expandable"
|
|
376
|
+
:aria-label="`${expanded ? 'Collapse' : 'Expand'} ${meta.label}`"
|
|
377
|
+
class="flex w-full items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-left text-xs font-semibold uppercase tracking-wide text-[color:var(--bb-text-muted)] hover:bg-[color:var(--bb-surface-hover)]"
|
|
378
|
+
type="button"
|
|
379
|
+
v-bind="expandProps"
|
|
380
|
+
>
|
|
381
|
+
<BbIcon
|
|
382
|
+
class="shrink-0"
|
|
383
|
+
:icon="expanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
|
|
384
|
+
size="sm"
|
|
385
|
+
/>
|
|
386
|
+
{{ meta.label }}
|
|
387
|
+
</button>
|
|
388
|
+
<!-- Leaf pages navigate through the item itself, never @click. -->
|
|
389
|
+
<BbButton
|
|
390
|
+
v-else
|
|
391
|
+
active-class="docs-sidebar-active"
|
|
392
|
+
class="w-full justify-start"
|
|
393
|
+
:href="meta.href"
|
|
394
|
+
size="sm"
|
|
395
|
+
variant="ghost"
|
|
396
|
+
>
|
|
397
|
+
{{ meta.label }}
|
|
398
|
+
</BbButton>
|
|
399
|
+
</template>
|
|
400
|
+
</BbTree>
|
|
96
401
|
</div>
|
|
97
402
|
</template>
|
|
98
403
|
|
|
99
404
|
<script setup lang="ts">
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import type {
|
|
103
|
-
|
|
104
|
-
const props = withDefaults(defineProps<BbTreeProps>(), {
|
|
105
|
-
identifier: 'id',
|
|
106
|
-
depth: 0,
|
|
107
|
-
offset: 0,
|
|
108
|
-
items: () => [] as TreeItem[],
|
|
109
|
-
});
|
|
405
|
+
import { ref } from 'vue';
|
|
406
|
+
import { BbTree, BbButton, BbIcon } from 'bitboss-ui';
|
|
407
|
+
import type { BbTreeItem } from 'bitboss-ui';
|
|
110
408
|
|
|
111
|
-
|
|
409
|
+
type NavEntry = { id: string; label: string; href?: string };
|
|
112
410
|
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
411
|
+
const sections = ref<Array<BbTreeItem<NavEntry>>>([
|
|
412
|
+
{
|
|
413
|
+
meta: { id: 'start', label: 'Getting started' },
|
|
414
|
+
children: [
|
|
415
|
+
{ meta: { id: 'install', label: 'Installation', href: '#install' } },
|
|
416
|
+
{ meta: { id: 'theming', label: 'Theming', href: '#theming' } },
|
|
417
|
+
],
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
meta: { id: 'components', label: 'Components' },
|
|
421
|
+
expanded: false,
|
|
422
|
+
children: [
|
|
423
|
+
{ meta: { id: 'button', label: 'Button', href: '#button' } },
|
|
424
|
+
{ meta: { id: 'tree', label: 'Tree', href: '#tree' } },
|
|
425
|
+
{ meta: { id: 'dropzone', label: 'Dropzone', href: '#dropzone' } },
|
|
426
|
+
],
|
|
427
|
+
},
|
|
428
|
+
]);
|
|
118
429
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
identifier: any;
|
|
124
|
-
index: number;
|
|
125
|
-
offset: number;
|
|
126
|
-
open: boolean;
|
|
127
|
-
original: any;
|
|
128
|
-
parent: BbTreeProps['parent'];
|
|
129
|
-
};
|
|
430
|
+
/* The identity of every branch node, for expand-all. */
|
|
431
|
+
const branchIds = sections.value
|
|
432
|
+
.filter((node) => node.children?.length)
|
|
433
|
+
.map((node) => node.meta.id);
|
|
130
434
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const expandableProp = item.expandable ?? props.expandable;
|
|
137
|
-
const offset = currentOffset + 1;
|
|
138
|
-
|
|
139
|
-
currentOffset = currentOffset + flattenTree([item], 'children').length;
|
|
140
|
-
|
|
141
|
-
let expandable = false;
|
|
142
|
-
if (typeof expandableProp !== 'undefined') {
|
|
143
|
-
if (typeof expandableProp === 'function')
|
|
144
|
-
expandable = expandableProp(item, props.depth, props.parent);
|
|
145
|
-
else expandable = expandableProp;
|
|
146
|
-
}
|
|
147
|
-
return {
|
|
148
|
-
children: item.children,
|
|
149
|
-
depth: props.depth,
|
|
150
|
-
expandable: expandable,
|
|
151
|
-
identifier: item[props.identifier],
|
|
152
|
-
offset,
|
|
153
|
-
index,
|
|
154
|
-
open,
|
|
155
|
-
original: item,
|
|
156
|
-
parent: props.parent,
|
|
157
|
-
};
|
|
158
|
-
});
|
|
159
|
-
});
|
|
435
|
+
/* Start empty: BbTree seeds it from each branch's `expanded` flag — so
|
|
436
|
+
"Getting started" opens and "Components" (expanded: false) stays collapsed. */
|
|
437
|
+
const expandedSections = ref<string[]>([]);
|
|
438
|
+
const expandAll = () => (expandedSections.value = [...branchIds]);
|
|
439
|
+
const collapseAll = () => (expandedSections.value = []);
|
|
160
440
|
</script>
|
|
161
441
|
|
|
162
|
-
<style
|
|
163
|
-
|
|
442
|
+
<style scoped>
|
|
443
|
+
/* Primary tint for the current page — follows theme / dark mode. */
|
|
444
|
+
.docs-sidebar-active {
|
|
445
|
+
background: color-mix(in oklab, var(--bb-primary) 8%, var(--bb-panel));
|
|
446
|
+
color: var(--bb-text);
|
|
447
|
+
font-weight: 500;
|
|
448
|
+
}
|
|
164
449
|
</style>
|
|
165
450
|
```
|
|
166
451
|
|
|
167
|
-
|
|
452
|
+
Leaves never appear in the model — they are always "expanded". So expand-all
|
|
453
|
+
is just "the identities of every branch node", as the sidebar computes.
|
|
168
454
|
|
|
169
|
-
|
|
170
|
-
export type TreeItem = {
|
|
171
|
-
/**
|
|
172
|
-
* Array of children of the current item. Is the key
|
|
173
|
-
* with which we can identify whether the node is nested or not.
|
|
174
|
-
*/
|
|
175
|
-
children?: TreeItem[];
|
|
176
|
-
/**
|
|
177
|
-
* Status of the current node. When a node is open
|
|
178
|
-
* its children are displayed. Otherwise its children are hidden.
|
|
179
|
-
*/
|
|
180
|
-
open?: boolean;
|
|
181
|
-
[key: symbol | string]: any;
|
|
182
|
-
} & Pick<BbTreeProps, 'expandable'>;
|
|
183
|
-
|
|
184
|
-
export type BbTreeProps = {
|
|
185
|
-
/**
|
|
186
|
-
* Array containing the tree-like structure of the items.
|
|
187
|
-
*/
|
|
188
|
-
items: TreeItem[];
|
|
189
|
-
/**
|
|
190
|
-
* Parent of the current node. `undefined` for the first level.
|
|
191
|
-
*/
|
|
192
|
-
parent?: TreeItem;
|
|
193
|
-
/**
|
|
194
|
-
* Identifier of the item.
|
|
195
|
-
*
|
|
196
|
-
* @defaultValue `'id'`
|
|
197
|
-
*/
|
|
198
|
-
identifier?: string | number;
|
|
199
|
-
/**
|
|
200
|
-
* Current depth of the tree. Starting at 0 for
|
|
201
|
-
* the first level, increasing at every level down.
|
|
202
|
-
*
|
|
203
|
-
* @defaultValue `0`
|
|
204
|
-
*/
|
|
205
|
-
depth?: number;
|
|
206
|
-
/**
|
|
207
|
-
* Defines the item as expandable. It can be a global boolean defining all items as
|
|
208
|
-
* expandable, or a function that receives the item, depth, and parent of the current
|
|
209
|
-
* node and returns a boolean.
|
|
210
|
-
*/
|
|
211
|
-
expandable?:
|
|
212
|
-
| boolean
|
|
213
|
-
| ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);
|
|
214
|
-
};
|
|
455
|
+
### Per-node and per-depth slots
|
|
215
456
|
|
|
216
|
-
|
|
217
|
-
export type BbTreeNodeSlotProps = {
|
|
218
|
-
/** The raw item from the `items` prop for this node. */
|
|
219
|
-
item: any;
|
|
220
|
-
/** The parent item, or `undefined` for root-level nodes. */
|
|
221
|
-
parent?: any;
|
|
222
|
-
/** Zero-based index of this node among its siblings. */
|
|
223
|
-
index: number;
|
|
224
|
-
/** Absolute position of this node in the flattened tree. */
|
|
225
|
-
offset: number;
|
|
226
|
-
/** Whether this node is currently expanded (children visible). */
|
|
227
|
-
open: boolean;
|
|
228
|
-
/** Nesting depth of this node, starting at `0` for the root level. */
|
|
229
|
-
depth: number;
|
|
230
|
-
/** The resolved identifier value for this node. */
|
|
231
|
-
identifier?: string | number;
|
|
232
|
-
/** Whether this node can be expanded. */
|
|
233
|
-
expandable: boolean;
|
|
234
|
-
};
|
|
457
|
+
Beyond `default`, `BbTree` resolves named slots per node, in priority order:
|
|
235
458
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
459
|
+
1. `#<value>` — the node whose resolved identity equals the slot name (only
|
|
460
|
+
for string/number identities, e.g. `#trash` with `item-value="id"`);
|
|
461
|
+
2. `#<depth>` — every node at that depth (`#0` for root nodes);
|
|
462
|
+
3. `default` — everything else.
|
|
463
|
+
|
|
464
|
+
Each receives the same payload as `default`. There are also `#<value>-children`
|
|
465
|
+
and `#<depth>-children` slots that **replace the children container** of the
|
|
466
|
+
matching node — the recursion stops there and your content renders instead,
|
|
467
|
+
useful for a custom layout or an inline empty state under one branch.
|
|
468
|
+
|
|
469
|
+
**Sections, pages and a special trash node**
|
|
470
|
+
|
|
471
|
+
```vue
|
|
472
|
+
<template>
|
|
473
|
+
<BbTree
|
|
474
|
+
class="w-full max-w-xs rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-1.5"
|
|
475
|
+
:expandable="(n) => !!n.children?.length"
|
|
476
|
+
item-value="id"
|
|
477
|
+
:items="pages"
|
|
478
|
+
style="--indent: 0.875rem; --gap: 0.125rem"
|
|
479
|
+
>
|
|
480
|
+
<!-- Depth slot: every top-level node becomes a section header. -->
|
|
481
|
+
<template #0="{ meta, expanded, expandProps }">
|
|
482
|
+
<button
|
|
483
|
+
:aria-label="`${expanded ? 'Collapse' : 'Expand'} ${meta.label}`"
|
|
484
|
+
class="flex w-full items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-left text-xs font-semibold uppercase tracking-wide text-[color:var(--bb-text-muted)] hover:bg-[color:var(--bb-surface-hover)]"
|
|
485
|
+
type="button"
|
|
486
|
+
v-bind="expandProps"
|
|
487
|
+
>
|
|
488
|
+
<BbIcon
|
|
489
|
+
class="shrink-0"
|
|
490
|
+
:icon="expanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
|
|
491
|
+
size="sm"
|
|
492
|
+
/>
|
|
493
|
+
{{ meta.label }}
|
|
494
|
+
</button>
|
|
495
|
+
</template>
|
|
496
|
+
|
|
497
|
+
<!-- Value slot: one specific node, wherever it sits. Beats the depth slot. -->
|
|
498
|
+
<template #trash="{ meta, expanded, expandProps }">
|
|
499
|
+
<button
|
|
500
|
+
:aria-label="`${expanded ? 'Collapse' : 'Expand'} ${meta.label}`"
|
|
501
|
+
class="knowledge-base-tree__trash flex w-full items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-left text-sm"
|
|
502
|
+
type="button"
|
|
503
|
+
v-bind="expandProps"
|
|
504
|
+
>
|
|
505
|
+
<BbIcon icon="lucide:trash-2" size="sm" />
|
|
506
|
+
<span class="font-medium">{{ meta.label }}</span>
|
|
507
|
+
</button>
|
|
508
|
+
</template>
|
|
509
|
+
|
|
510
|
+
<!-- Children slot: replaces the recursion under one node with your own
|
|
511
|
+
layout — the deleted pages render dimmed, with a retention note. -->
|
|
512
|
+
<template #trash-children="{ item }">
|
|
513
|
+
<ul class="flex flex-col gap-0.5">
|
|
514
|
+
<li
|
|
515
|
+
v-for="page in item.children ?? []"
|
|
516
|
+
:key="page.meta.id"
|
|
517
|
+
class="flex items-center gap-1.5 px-1.5 py-0.5 pl-[1.55rem] text-sm text-[color:var(--bb-text-muted)] line-through"
|
|
518
|
+
>
|
|
519
|
+
<BbIcon icon="lucide:file-x" size="sm" /> {{ page.meta.label }}
|
|
520
|
+
</li>
|
|
521
|
+
<li
|
|
522
|
+
class="px-1.5 pb-1 pl-[1.55rem] text-xs text-[color:var(--bb-text-muted)]"
|
|
523
|
+
>
|
|
524
|
+
Deleted pages are removed for good after 30 days.
|
|
525
|
+
</li>
|
|
526
|
+
</ul>
|
|
527
|
+
</template>
|
|
528
|
+
|
|
529
|
+
<!-- Default slot: every remaining node (the pages). -->
|
|
530
|
+
<template #default="{ meta }">
|
|
531
|
+
<span
|
|
532
|
+
class="flex items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 pl-[1.55rem] text-sm"
|
|
533
|
+
>
|
|
534
|
+
<BbIcon
|
|
535
|
+
class="text-[color:var(--bb-text-faint)]"
|
|
536
|
+
icon="lucide:file-text"
|
|
537
|
+
size="sm"
|
|
538
|
+
/>
|
|
539
|
+
{{ meta.label }}
|
|
540
|
+
</span>
|
|
541
|
+
</template>
|
|
542
|
+
</BbTree>
|
|
543
|
+
</template>
|
|
544
|
+
|
|
545
|
+
<script setup lang="ts">
|
|
546
|
+
import { ref } from 'vue';
|
|
547
|
+
import { BbTree, BbIcon } from 'bitboss-ui';
|
|
548
|
+
import type { BbTreeItem } from 'bitboss-ui';
|
|
549
|
+
|
|
550
|
+
type KbNode = { id: string; label: string };
|
|
551
|
+
|
|
552
|
+
const pages = ref<Array<BbTreeItem<KbNode>>>([
|
|
553
|
+
{
|
|
554
|
+
meta: { id: 'handbook', label: 'Handbook' },
|
|
555
|
+
children: [
|
|
556
|
+
{ meta: { id: 'onboarding', label: 'Onboarding' } },
|
|
557
|
+
{ meta: { id: 'benefits', label: 'Benefits' } },
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
meta: { id: 'engineering', label: 'Engineering' },
|
|
562
|
+
children: [
|
|
563
|
+
{ meta: { id: 'code-style', label: 'Code style' } },
|
|
564
|
+
{ meta: { id: 'releases', label: 'Release process' } },
|
|
565
|
+
],
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
meta: { id: 'trash', label: 'Trash' },
|
|
569
|
+
expanded: false,
|
|
570
|
+
children: [
|
|
571
|
+
{ meta: { id: 'old-roadmap', label: 'Old roadmap' } },
|
|
572
|
+
{ meta: { id: 'draft-copy', label: 'Draft copy' } },
|
|
573
|
+
],
|
|
574
|
+
},
|
|
575
|
+
]);
|
|
576
|
+
</script>
|
|
577
|
+
|
|
578
|
+
<style scoped>
|
|
579
|
+
.knowledge-base-tree__trash {
|
|
580
|
+
color: var(--bb-danger);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.knowledge-base-tree__trash:hover {
|
|
584
|
+
background: color-mix(in oklab, var(--bb-danger) 8%, var(--bb-panel));
|
|
585
|
+
}
|
|
586
|
+
</style>
|
|
244
587
|
```
|
|
245
588
|
|
|
246
|
-
|
|
589
|
+
Here `#0` styles every top-level node as a section header, `#trash` restyles
|
|
590
|
+
one specific node (value slots beat depth slots — trash sits at depth 0 too),
|
|
591
|
+
and `default` covers the rest. `#trash-children` then replaces the recursion
|
|
592
|
+
under that one branch: the deleted pages render as a dimmed custom list with
|
|
593
|
+
a retention note, straight from `item.children` — expansion still animates,
|
|
594
|
+
but no `BbTreeLevel` is rendered inside.
|
|
247
595
|
|
|
248
|
-
|
|
249
|
-
.bb-tree {
|
|
250
|
-
display: grid;
|
|
251
|
-
grid-template-rows: min-content 0fr;
|
|
252
|
-
transition: grid-template-rows 0.3s;
|
|
596
|
+
### Navigation belongs to the node
|
|
253
597
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
598
|
+
Because you render each node, wire navigation through the item itself — never
|
|
599
|
+
`@click` + `router.push`. Leaf pages are links: render a `BbButton` (or
|
|
600
|
+
`BbBaseButton`) with `href`, `to`, and `active-class` so the current page
|
|
601
|
+
highlights itself. The sidebar above does exactly this — its pages are
|
|
602
|
+
`BbButton variant="ghost" :href="…"`, its sections are expand toggles.
|
|
257
603
|
|
|
258
|
-
|
|
259
|
-
display: flex;
|
|
604
|
+
In a Nuxt or Inertia app, swap `href="#…"` for a real target:
|
|
260
605
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
606
|
+
```vue
|
|
607
|
+
<!-- Vue Router: leaf navigates via `to`, active page auto-highlights -->
|
|
608
|
+
<BbButton
|
|
609
|
+
:to="{ name: 'docs', params: { slug: meta.slug } }"
|
|
610
|
+
active-class="is-active"
|
|
611
|
+
variant="ghost"
|
|
612
|
+
>
|
|
613
|
+
{{ meta.label }}
|
|
614
|
+
</BbButton>
|
|
615
|
+
```
|
|
265
616
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
617
|
+
```vue
|
|
618
|
+
<!-- Inertia: `href` becomes a visit; `method`/`data` are forwarded -->
|
|
619
|
+
<BbButton
|
|
620
|
+
:href="`/docs/${meta.slug}`"
|
|
621
|
+
variant="ghost"
|
|
622
|
+
>{{ meta.label }}</BbButton>
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
`BbTree` itself is SSR-safe (no browser APIs, no teleports) and reads nothing
|
|
626
|
+
from the global plugin config — no locale strings, no `adaptive` behavior.
|
|
627
|
+
|
|
628
|
+
### Indentation, rhythm and connector lines
|
|
629
|
+
|
|
630
|
+
Two sealed CSS tokens on `.bb-tree` shape the layout: `--indent` shifts each
|
|
631
|
+
child level, `--gap` adds vertical space between siblings. Both default to `0`,
|
|
632
|
+
so set them to taste — inline, in a class, or per instance. Expansion animates
|
|
633
|
+
out of the box: collapsing is a smooth CSS grid-rows transition, not a remount.
|
|
634
|
+
|
|
635
|
+
**Tuning --indent and --gap**
|
|
636
|
+
|
|
637
|
+
```vue
|
|
638
|
+
<BbTree
|
|
639
|
+
:items="[
|
|
640
|
+
{
|
|
641
|
+
meta: { name: 'Design' },
|
|
642
|
+
children: [
|
|
643
|
+
{ meta: { name: 'Logo.svg' } },
|
|
644
|
+
{ meta: { name: 'Palette.png' } },
|
|
645
|
+
],
|
|
646
|
+
},
|
|
647
|
+
]"
|
|
648
|
+
:expandable="(n) => !!n.children?.length"
|
|
649
|
+
class="max-w-xs rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-1.5"
|
|
650
|
+
style="--indent:1.5rem; --gap:.375rem"
|
|
651
|
+
>
|
|
652
|
+
<template #default="{ meta, expandable, expanded, expandProps }">
|
|
653
|
+
<button
|
|
654
|
+
v-if="expandable"
|
|
655
|
+
v-bind="expandProps"
|
|
656
|
+
type="button"
|
|
657
|
+
class="flex w-full items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-left text-sm font-medium hover:bg-[color:var(--bb-surface-hover)]"
|
|
658
|
+
>
|
|
659
|
+
<BbIcon
|
|
660
|
+
class="text-[color:var(--bb-text-muted)]"
|
|
661
|
+
:icon="expanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
|
|
662
|
+
size="sm"
|
|
663
|
+
/>
|
|
664
|
+
{{ meta.name }}
|
|
665
|
+
</button>
|
|
666
|
+
<span v-else class="px-1.5 py-0.5 text-sm text-[color:var(--bb-text-muted)]">{{ meta.name }}</span>
|
|
667
|
+
</template>
|
|
668
|
+
</BbTree>
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
Connector lines (the elbows joining a parent to its children) are **deliberately
|
|
672
|
+
not shipped** — they are a look, not a behavior, and every product wants them
|
|
673
|
+
slightly different. Draw them yourself in plain CSS, anchored to `--indent` /
|
|
674
|
+
`--gap`, targeting the internal `.bb-tree__node` / `.bb-tree__row` /
|
|
675
|
+
`.bb-tree__children` elements (nodes also carry `--depth-<n>`, `--expanded`
|
|
676
|
+
and `--leaf` modifier classes to hook onto). This is the one place a documented
|
|
677
|
+
style override into the component's internals is expected; keep it scoped under
|
|
678
|
+
a wrapper class so it stays local.
|
|
679
|
+
|
|
680
|
+
**Connector lines drawn in CSS**
|
|
681
|
+
|
|
682
|
+
```vue
|
|
683
|
+
<template>
|
|
684
|
+
<BbTree
|
|
685
|
+
class="connector-tree w-full max-w-xs rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-1.5"
|
|
686
|
+
:expandable="(node) => !!node.children?.length"
|
|
687
|
+
item-value="path"
|
|
688
|
+
:items="items"
|
|
689
|
+
>
|
|
690
|
+
<template #default="{ meta, expanded, expandable, expandProps }">
|
|
691
|
+
<button
|
|
692
|
+
v-if="expandable"
|
|
693
|
+
:aria-label="`${expanded ? 'Collapse' : 'Expand'} ${meta.name}`"
|
|
694
|
+
class="flex items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-sm hover:bg-[color:var(--bb-surface-hover)]"
|
|
695
|
+
type="button"
|
|
696
|
+
v-bind="expandProps"
|
|
697
|
+
>
|
|
698
|
+
<BbIcon
|
|
699
|
+
class="shrink-0 text-[color:var(--bb-text-muted)]"
|
|
700
|
+
:icon="expanded ? 'lucide:folder-open' : 'lucide:folder'"
|
|
701
|
+
size="sm"
|
|
702
|
+
/>
|
|
703
|
+
<span class="font-medium">{{ meta.name }}</span>
|
|
704
|
+
</button>
|
|
705
|
+
<span
|
|
706
|
+
v-else
|
|
707
|
+
class="flex items-center gap-1.5 px-1.5 py-0.5 text-sm text-[color:var(--bb-text-muted)]"
|
|
708
|
+
>
|
|
709
|
+
<BbIcon
|
|
710
|
+
class="shrink-0 text-[color:var(--bb-text-faint)]"
|
|
711
|
+
icon="lucide:file"
|
|
712
|
+
size="sm"
|
|
713
|
+
/>
|
|
714
|
+
<span class="text-[color:var(--bb-text)]">{{ meta.name }}</span>
|
|
715
|
+
</span>
|
|
716
|
+
</template>
|
|
717
|
+
</BbTree>
|
|
718
|
+
</template>
|
|
719
|
+
|
|
720
|
+
<script setup lang="ts">
|
|
721
|
+
import { ref } from 'vue';
|
|
722
|
+
import { BbTree, BbIcon } from 'bitboss-ui';
|
|
723
|
+
import type { BbTreeItem } from 'bitboss-ui';
|
|
724
|
+
|
|
725
|
+
type FileNode = { name: string; path: string };
|
|
726
|
+
|
|
727
|
+
const items = ref<Array<BbTreeItem<FileNode>>>([
|
|
728
|
+
{
|
|
729
|
+
meta: { name: 'app', path: 'app' },
|
|
730
|
+
children: [
|
|
731
|
+
{
|
|
732
|
+
meta: { name: 'routes', path: 'app/routes' },
|
|
733
|
+
children: [
|
|
734
|
+
{ meta: { name: 'index.ts', path: 'app/routes/index.ts' } },
|
|
735
|
+
{ meta: { name: 'users.ts', path: 'app/routes/users.ts' } },
|
|
736
|
+
],
|
|
737
|
+
},
|
|
738
|
+
{ meta: { name: 'server.ts', path: 'app/server.ts' } },
|
|
739
|
+
],
|
|
740
|
+
},
|
|
741
|
+
]);
|
|
742
|
+
</script>
|
|
743
|
+
|
|
744
|
+
<!--
|
|
745
|
+
The library ships NO connector lines by design — the node markup is entirely
|
|
746
|
+
yours. When a file-browser look calls for them, draw them in plain CSS off the
|
|
747
|
+
--indent / --gap tokens. This is a deliberate, documented style override that
|
|
748
|
+
reaches into the component's internal BEM classes; keep it scoped under a
|
|
749
|
+
wrapper class (.connector-tree) so it never leaks to other trees.
|
|
750
|
+
-->
|
|
751
|
+
<style>
|
|
752
|
+
.connector-tree {
|
|
753
|
+
--indent: 1.25rem;
|
|
754
|
+
--gap: 0.25rem;
|
|
755
|
+
--line: var(--bb-border); /* token-driven: follows the theme */
|
|
269
756
|
}
|
|
757
|
+
|
|
758
|
+
.connector-tree .bb-tree__children > .bb-tree__node {
|
|
759
|
+
position: relative;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/* Trunk: vertical line continuing past a node while siblings follow. */
|
|
763
|
+
.connector-tree .bb-tree__children > .bb-tree__node:not(:last-child)::before {
|
|
764
|
+
border-left: 1px solid var(--line);
|
|
765
|
+
bottom: 0;
|
|
766
|
+
content: '';
|
|
767
|
+
left: calc(var(--indent) / -2);
|
|
768
|
+
position: absolute;
|
|
769
|
+
top: calc(var(--gap) * -1);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/* Elbow: drops from the level above and turns into this node's row. */
|
|
773
|
+
.connector-tree .bb-tree__children > .bb-tree__node > .bb-tree__row {
|
|
774
|
+
position: relative;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.connector-tree .bb-tree__children > .bb-tree__node > .bb-tree__row::before {
|
|
778
|
+
border-bottom: 1px solid var(--line);
|
|
779
|
+
border-bottom-left-radius: var(--bb-radius-sm);
|
|
780
|
+
border-left: 1px solid var(--line);
|
|
781
|
+
content: '';
|
|
782
|
+
height: calc(50% + var(--gap));
|
|
783
|
+
left: calc(var(--indent) / -2);
|
|
784
|
+
position: absolute;
|
|
785
|
+
top: calc(var(--gap) * -1);
|
|
786
|
+
width: calc(var(--indent) / 2);
|
|
787
|
+
}
|
|
788
|
+
</style>
|
|
270
789
|
```
|
|
790
|
+
|
|
791
|
+
### Large trees and lazy-loaded branches
|
|
792
|
+
|
|
793
|
+
The whole tree stays mounted: collapsed branches are hidden by CSS, not
|
|
794
|
+
removed, and there is no virtualization. For hundreds of nodes that is fine;
|
|
795
|
+
for folders of unbounded size, don't ship the entire hierarchy up front — load
|
|
796
|
+
children when a branch first opens. `items` is watched deeply, so appending
|
|
797
|
+
`children` to a node updates the tree in place, and newly appeared branches
|
|
798
|
+
follow the same seeding rules (`expanded: false` keeps them collapsed).
|
|
799
|
+
|
|
800
|
+
The pattern: give each unloaded folder a single **placeholder child** (a
|
|
801
|
+
loading row) so it is a real branch — remember, a childless node is a leaf
|
|
802
|
+
that always reports `expanded: true`, so a chevron driven by `expanded` would
|
|
803
|
+
render open before any load. Mark those folders `expanded: false`, or the
|
|
804
|
+
seeding rules open them at first sight and every fetch fires at mount. Then
|
|
805
|
+
watch `expandedItems`: when an unloaded folder's identity enters the model,
|
|
806
|
+
fetch and swap its children.
|
|
807
|
+
|
|
808
|
+
**Folders that load on first expand**
|
|
809
|
+
|
|
810
|
+
```vue
|
|
811
|
+
<template>
|
|
812
|
+
<div
|
|
813
|
+
class="w-full max-w-xs overflow-hidden rounded-[var(--bb-radius)] border border-[color:var(--bb-border)]"
|
|
814
|
+
>
|
|
815
|
+
<div
|
|
816
|
+
class="flex items-center gap-1.5 border-b border-[color:var(--bb-border)] px-2.5 py-1.5"
|
|
817
|
+
>
|
|
818
|
+
<BbIcon
|
|
819
|
+
class="text-[color:var(--bb-text-muted)]"
|
|
820
|
+
icon="lucide:cloud"
|
|
821
|
+
size="sm"
|
|
822
|
+
/>
|
|
823
|
+
<span class="text-xs font-medium">Remote files</span>
|
|
824
|
+
<span class="ml-auto text-xs text-[color:var(--bb-text-muted)]"
|
|
825
|
+
>lazy load</span
|
|
826
|
+
>
|
|
827
|
+
</div>
|
|
828
|
+
|
|
829
|
+
<BbTree
|
|
830
|
+
v-model:expanded-items="expanded"
|
|
831
|
+
class="p-1.5"
|
|
832
|
+
:expandable="(node) => !node.meta.leaf"
|
|
833
|
+
item-value="id"
|
|
834
|
+
:items="tree"
|
|
835
|
+
style="--indent: 0.875rem; --gap: 0.125rem"
|
|
836
|
+
>
|
|
837
|
+
<template #default="{ meta, expanded: isOpen, expandable, expandProps }">
|
|
838
|
+
<button
|
|
839
|
+
v-if="expandable"
|
|
840
|
+
:aria-label="`${isOpen ? 'Collapse' : 'Expand'} ${meta.label}`"
|
|
841
|
+
class="flex w-full items-center gap-1.5 rounded-[calc(var(--bb-radius)*0.6)] px-1.5 py-0.5 text-left text-sm hover:bg-[color:var(--bb-surface-hover)]"
|
|
842
|
+
type="button"
|
|
843
|
+
v-bind="expandProps"
|
|
844
|
+
>
|
|
845
|
+
<BbIcon
|
|
846
|
+
class="shrink-0 text-[color:var(--bb-text-muted)]"
|
|
847
|
+
:icon="isOpen ? 'lucide:chevron-down' : 'lucide:chevron-right'"
|
|
848
|
+
size="sm"
|
|
849
|
+
/>
|
|
850
|
+
<BbIcon
|
|
851
|
+
class="shrink-0 text-[color:var(--bb-text-muted)]"
|
|
852
|
+
:icon="isOpen ? 'lucide:folder-open' : 'lucide:folder'"
|
|
853
|
+
size="sm"
|
|
854
|
+
/>
|
|
855
|
+
<span class="truncate font-medium">{{ meta.label }}</span>
|
|
856
|
+
</button>
|
|
857
|
+
<span
|
|
858
|
+
v-else-if="meta.loading"
|
|
859
|
+
class="flex items-center gap-1.5 px-1.5 py-0.5 pl-[1.55rem] text-sm text-[color:var(--bb-text-muted)]"
|
|
860
|
+
>
|
|
861
|
+
<BbSpinner size="xs" /> Loading…
|
|
862
|
+
</span>
|
|
863
|
+
<span
|
|
864
|
+
v-else
|
|
865
|
+
class="flex items-center gap-1.5 px-1.5 py-0.5 pl-[1.55rem] text-sm"
|
|
866
|
+
>
|
|
867
|
+
<BbIcon
|
|
868
|
+
class="text-[color:var(--bb-text-faint)]"
|
|
869
|
+
icon="lucide:file"
|
|
870
|
+
size="sm"
|
|
871
|
+
/>
|
|
872
|
+
{{ meta.label }}
|
|
873
|
+
</span>
|
|
874
|
+
</template>
|
|
875
|
+
</BbTree>
|
|
876
|
+
</div>
|
|
877
|
+
</template>
|
|
878
|
+
|
|
879
|
+
<script setup lang="ts">
|
|
880
|
+
import { ref, watch } from 'vue';
|
|
881
|
+
import { BbTree, BbIcon, BbSpinner } from 'bitboss-ui';
|
|
882
|
+
import type { BbTreeItem } from 'bitboss-ui';
|
|
883
|
+
|
|
884
|
+
type Node = { id: string; label: string; leaf?: boolean; loading?: boolean };
|
|
885
|
+
|
|
886
|
+
// Each unloaded folder ships with a single placeholder child, so it is a real
|
|
887
|
+
// (expandable) branch with a visible loading row until its contents arrive.
|
|
888
|
+
const placeholder = (id: string): BbTreeItem<Node> => ({
|
|
889
|
+
meta: { id: `${id}:loading`, label: 'Loading', leaf: true, loading: true },
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
// `expanded: false` matters: branches otherwise seed the model as expanded
|
|
893
|
+
// on first sight, which would kick off every fetch at mount.
|
|
894
|
+
const tree = ref<Array<BbTreeItem<Node>>>([
|
|
895
|
+
{
|
|
896
|
+
meta: { id: 'src', label: 'src' },
|
|
897
|
+
expanded: false,
|
|
898
|
+
children: [placeholder('src')],
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
meta: { id: 'assets', label: 'assets' },
|
|
902
|
+
expanded: false,
|
|
903
|
+
children: [placeholder('assets')],
|
|
904
|
+
},
|
|
905
|
+
]);
|
|
906
|
+
|
|
907
|
+
const expanded = ref<string[]>([]);
|
|
908
|
+
const loaded = new Set<string>();
|
|
909
|
+
|
|
910
|
+
// Fake fetch — swap in a directory listing keyed by the folder id.
|
|
911
|
+
const fetchChildren = (id: string): Promise<Array<BbTreeItem<Node>>> =>
|
|
912
|
+
new Promise((resolve) =>
|
|
913
|
+
setTimeout(
|
|
914
|
+
() =>
|
|
915
|
+
resolve([
|
|
916
|
+
{ meta: { id: `${id}/index.ts`, label: 'index.ts', leaf: true } },
|
|
917
|
+
{ meta: { id: `${id}/utils.ts`, label: 'utils.ts', leaf: true } },
|
|
918
|
+
]),
|
|
919
|
+
400
|
|
920
|
+
)
|
|
921
|
+
);
|
|
922
|
+
|
|
923
|
+
// When an unloaded folder's identity first enters the model, load and swap.
|
|
924
|
+
watch(expanded, async (ids) => {
|
|
925
|
+
for (const id of ids) {
|
|
926
|
+
if (loaded.has(id)) continue;
|
|
927
|
+
const branch = tree.value.find((node) => node.meta.id === id);
|
|
928
|
+
if (!branch) continue;
|
|
929
|
+
loaded.add(id);
|
|
930
|
+
branch.children = await fetchChildren(id);
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
</script>
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
### Works well with
|
|
937
|
+
|
|
938
|
+
- `BbButton` — leaf navigation with `href`/`to` + `active-class`; also the
|
|
939
|
+
natural expand toggle if you want library styling on it.
|
|
940
|
+
- `BbIcon` — chevrons, folder/file glyphs keyed off `expanded` and `meta`.
|
|
941
|
+
- `BbBadge` — counts on branch rows (unread per folder, items per category).
|
|
942
|
+
- `BbTable` — the sibling to reach for when data is flat with one detail
|
|
943
|
+
level (`#expand` slot) instead of recursive.
|
|
944
|
+
- `BbCollapsible` — a single expandable section without tree semantics.
|
|
945
|
+
|
|
946
|
+
### Gotchas and anti-patterns
|
|
947
|
+
|
|
948
|
+
- `expanded` on an item seeds the initial state only; the component ignores
|
|
949
|
+
later flips. To open a node programmatically, push its value into
|
|
950
|
+
`expandedItems` — don't mutate the flag.
|
|
951
|
+
- Without `item-value`, identity is a hash of the whole `meta` object —
|
|
952
|
+
re-created objects (e.g. after a refetch) can orphan the expansion state.
|
|
953
|
+
Set `item-value` whenever items aren't literal constants.
|
|
954
|
+
- Collapsed branches remain in the DOM (collapse is a CSS-grid animation), so
|
|
955
|
+
focusable elements inside them — leaf links, buttons — **stay in the Tab
|
|
956
|
+
order** even while invisible. For link-heavy trees, disable hidden controls
|
|
957
|
+
yourself (e.g. `:tabindex="parentExpanded ? undefined : -1"`) if keyboard
|
|
958
|
+
traversal of closed sections is a problem in your product.
|
|
959
|
+
- No `expandable` prop means no toggles anywhere: the tree renders fully
|
|
960
|
+
expanded and static. If your chevrons don't respond, this is why.
|
|
961
|
+
- Don't track expansion in your own `ref` next to the model, and don't decide
|
|
962
|
+
"expandedness" from your own state — `expanded` in the slot payload is
|
|
963
|
+
already live.
|
|
964
|
+
- Don't navigate with `@click` + `router.push` in node markup — leaves take
|
|
965
|
+
`href`/`to` through `BbButton`.
|
|
966
|
+
- Don't reach into `.bb-tree__*` internals for styling _except_ for the
|
|
967
|
+
sanctioned connector-line/indent hooks above.
|
|
968
|
+
|
|
969
|
+
### Accessibility
|
|
970
|
+
|
|
971
|
+
**`BbTree` is a nested disclosure list, not a WAI-ARIA tree — deliberately.**
|
|
972
|
+
It renders no `role="tree"`, no `role="treeitem"`, and no
|
|
973
|
+
`aria-level`/`aria-posinset`/`aria-setsize`. An APG tree makes the treeitem
|
|
974
|
+
itself the one focusable unit under a roving tabindex, which cannot coexist
|
|
975
|
+
with a slot-driven component whose nodes hold _your_ links and buttons. So
|
|
976
|
+
rather than advertise tree semantics and then ignore the Arrow/Home/End
|
|
977
|
+
keyboard contract they promise — a role without its keyboard behaviour is worse
|
|
978
|
+
than no role, because assistive tech announces an affordance that isn't there —
|
|
979
|
+
the tree claim is simply not made. Each branch is an ordinary disclosure: a
|
|
980
|
+
button that shows and hides a region.
|
|
981
|
+
|
|
982
|
+
What the component renders automatically:
|
|
983
|
+
|
|
984
|
+
- Each children container gets the `id` that the `aria-controls` in
|
|
985
|
+
`expandProps` points at — that pairing is the whole disclosure wiring.
|
|
986
|
+
- A collapsed container is `inert`, so its contents leave the tab order and the
|
|
987
|
+
accessibility tree. Collapsing is CSS-only (`grid-template-rows: 0fr`), which
|
|
988
|
+
hides pixels but not focusability, so without this a collapsed branch's nested
|
|
989
|
+
toggles would stay Tab-reachable while invisible.
|
|
990
|
+
|
|
991
|
+
What you must add:
|
|
992
|
+
|
|
993
|
+
- A real focusable toggle per branch: bind `expandProps` to a `<button>`. It
|
|
994
|
+
carries `aria-expanded` and `aria-controls` for you, and Enter/Space work
|
|
995
|
+
natively. On a non-button element `expandProps`' keydown handler covers
|
|
996
|
+
Enter/Space, but you'd still owe it `tabindex="0"` and a role — use a button.
|
|
997
|
+
- An `aria-label` on icon-only toggles naming node and action (e.g.
|
|
998
|
+
`Collapse src`) — a bare chevron has no accessible text.
|
|
999
|
+
|
|
1000
|
+
Keyboard users Tab through whatever focusable controls your slots render and
|
|
1001
|
+
toggle with Enter/Space — the standard disclosure interaction, and there is
|
|
1002
|
+
nothing tree-specific to learn. Plan your node markup (one focusable control per
|
|
1003
|
+
row) with that in mind.
|
|
1004
|
+
|
|
1005
|
+
## v-model
|
|
1006
|
+
|
|
1007
|
+
- `v-model:expandedItems` — type: `any[] \| undefined`
|
|
1008
|
+
|
|
1009
|
+
## Props
|
|
1010
|
+
|
|
1011
|
+
| Prop | Type | Default | Required | Description |
|
|
1012
|
+
| --- | --- | --- | --- | --- |
|
|
1013
|
+
| `expandable` | `BbTreeExpandable<Meta> \| undefined` | | | Defines nodes as expandable. It can be a global boolean, or a function that receives the node, its depth, and its parent and returns a boolean. |
|
|
1014
|
+
| `expandedItems` | `any[] \| undefined` | `[]` | | Live expansion state: the list of expanded node values (see `itemValue`). Branch nodes not explicitly collapsed via `expanded: false` seed the list when they first appear in `items`; from then on this model is the single source of truth. |
|
|
1015
|
+
| `items` | `BbTreeItem<Meta>[]` | `[]` | yes | Tree-like structure of nodes to render. |
|
|
1016
|
+
| `itemValue` | `ItemAccessor<Meta> \| undefined` | | | Identity of a node, used to hash entries of `expandedItems` and to name per-node slots. A string reads that key from `meta`; a function receives `meta` and returns the value. |
|
|
1017
|
+
|
|
1018
|
+
## Events
|
|
1019
|
+
|
|
1020
|
+
- `update:expandedItems` — `(event: "update:expandedItems", value: any[]): void`
|
|
1021
|
+
|
|
1022
|
+
## Slots
|
|
1023
|
+
|
|
1024
|
+
- `default` — scope: `BbTreeNodeSlotProps<Meta>`
|
|
1025
|
+
|
|
1026
|
+
## See Also
|
|
1027
|
+
|
|
1028
|
+
- [BbTable](./BbTable.md) — Displays tabular data, configurable columns and data mapper.
|
|
1029
|
+
- [BbAccordion](./BbAccordion.md) — Expands and collapses a content panel.
|