bitboss-ui 3.0.0-beta.2 → 3.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -33
- package/dist/ai/BbAccordion.md +3 -3
- package/dist/ai/BbAlert.md +9 -5
- package/dist/ai/BbAsterisk.md +17 -0
- package/dist/ai/BbAvatar.md +12 -3
- package/dist/ai/BbBadge.md +15 -10
- package/dist/ai/BbBadgeButton.md +16 -16
- package/dist/ai/BbBaseButton.md +16 -16
- package/dist/ai/BbBaseCheckbox.md +8 -8
- package/dist/ai/BbBaseCheckboxGroup.md +13 -13
- package/dist/ai/BbBaseCheckboxIcon.md +26 -9
- package/dist/ai/BbBaseColorInput.md +11 -11
- package/dist/ai/BbBaseDatePicker.md +6 -6
- package/dist/ai/BbBaseDatePickerInput.md +15 -15
- package/dist/ai/BbBaseInputContainer.md +12 -12
- package/dist/ai/BbBaseNumberInput.md +8 -8
- package/dist/ai/BbBaseRadio.md +5 -5
- package/dist/ai/BbBaseRadioGroup.md +7 -7
- package/dist/ai/BbBaseRadioIcon.md +25 -9
- package/dist/ai/BbBaseRating.md +5 -5
- package/dist/ai/BbBaseSelect.md +22 -21
- package/dist/ai/BbBaseSlider.md +9 -9
- package/dist/ai/BbBaseSwitch.md +8 -8
- package/dist/ai/BbBaseSwitchGroup.md +13 -13
- package/dist/ai/BbBaseSwitchIcon.md +28 -10
- package/dist/ai/BbBaseTag.md +10 -10
- package/dist/ai/BbBaseTextInput.md +9 -9
- package/dist/ai/BbBaseTextarea.md +9 -9
- package/dist/ai/BbBaseTimePickerInput.md +13 -13
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +15 -15
- package/dist/ai/BbCheckbox.md +18 -17
- package/dist/ai/BbCheckboxGroup.md +15 -14
- package/dist/ai/BbCollapsible.md +11 -9
- package/dist/ai/BbColorInput.md +15 -15
- package/dist/ai/BbColorPalette.md +12 -6
- package/dist/ai/BbConfirm.md +12 -5
- package/dist/ai/BbDatePicker.md +13 -13
- package/dist/ai/BbDatePickerInput.md +20 -20
- package/dist/ai/BbDialog.md +78 -12
- package/dist/ai/BbDropdown.md +132 -22
- package/dist/ai/BbDropdownButton.md +12 -12
- package/dist/ai/BbDropdownGroup.md +1 -1
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +6 -0
- package/dist/ai/BbIndicator.md +5 -5
- package/dist/ai/BbNumberInput.md +11 -11
- package/dist/ai/BbOffCanvas.md +90 -20
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +32 -17
- package/dist/ai/BbProgress.md +7 -4
- package/dist/ai/BbRadio.md +16 -15
- package/dist/ai/BbRadioGroup.md +20 -17
- package/dist/ai/BbRating.md +11 -11
- package/dist/ai/BbSelect.md +138 -37
- package/dist/ai/BbSelectPopover.md +40 -41
- package/dist/ai/BbSlider.md +37 -22
- package/dist/ai/BbSmoothHeight.md +1 -1
- package/dist/ai/BbSwitch.md +25 -10
- package/dist/ai/BbSwitchGroup.md +17 -14
- package/dist/ai/BbTable.md +920 -109
- package/dist/ai/BbTabs.md +28 -14
- package/dist/ai/BbTabsList.md +1 -1
- package/dist/ai/BbTabsPanes.md +1 -1
- package/dist/ai/BbTabsRoot.md +10 -10
- package/dist/ai/BbTag.md +14 -14
- package/dist/ai/BbTextInput.md +16 -15
- package/dist/ai/BbTextarea.md +13 -13
- package/dist/ai/BbTimePicker.md +10 -10
- package/dist/ai/BbTimePickerInput.md +17 -17
- package/dist/ai/BbToast.md +1 -1
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTooltip.md +12 -10
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonInputWrapper.md +10 -10
- package/dist/ai/CommonPopover.md +6 -6
- package/dist/ai/FlatListBox.md +5 -5
- package/dist/ai/GroupedListBox.md +5 -5
- package/dist/ai/ListBox.md +4 -4
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +128 -2
- package/dist/ai/components.json +917 -100
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +5 -3
- package/dist/ai/guides/ai-router.md +9 -4
- package/dist/ai/guides/component-picker.md +18 -18
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +11 -5
- package/dist/ai/guides/installation-and-plugin-setup.md +85 -23
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +30 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +37 -3
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +62 -34
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-rating.md +8 -2
- package/dist/ai/guides/migration/components/bb-select.md +5 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/v2-to-v3.md +260 -89
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/index.md +10 -9
- package/dist/ai/recipes/inertia/approvals-inbox.md +0 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +49 -29
- package/dist/ai/recipes/inertia/record-form.md +0 -1
- package/dist/ai/recipes/inertia/records-workspace.md +26 -8
- package/dist/ai/recipes/inertia/upload-center.md +0 -1
- package/dist/ai/recipes/nuxt/approvals-inbox.md +0 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/record-form.md +0 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -8
- package/dist/ai/recipes/nuxt/upload-center.md +0 -1
- package/dist/ai/recipes/vue/approvals-inbox.md +0 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -8
- package/dist/ai/recipes/vue/upload-center.md +0 -1
- package/dist/ai/source/BbAlert.md +60 -2
- package/dist/ai/source/BbAvatar.md +3 -3
- package/dist/ai/source/BbBadge.md +60 -15
- package/dist/ai/source/BbBadgeButton.md +8 -2
- package/dist/ai/source/BbBaseButton.md +3 -1
- package/dist/ai/source/BbBaseCheckboxGroup.md +6 -2
- package/dist/ai/source/BbBaseDatePicker.md +3 -1
- package/dist/ai/source/BbBaseDatePickerInput.md +5 -1
- package/dist/ai/source/BbBaseInputContainer.md +52 -1
- package/dist/ai/source/BbBaseRadioGroup.md +4 -0
- package/dist/ai/source/BbBaseRating.md +3 -1
- package/dist/ai/source/BbBaseSelect.md +71 -16
- package/dist/ai/source/BbBaseSwitchGroup.md +4 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +5 -1
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbButton.md +51 -24
- package/dist/ai/source/BbCheckbox.md +15 -1
- package/dist/ai/source/BbCheckboxGroup.md +2 -1
- package/dist/ai/source/BbCollapsible.md +7 -1
- package/dist/ai/source/BbColorInput.md +3 -4
- package/dist/ai/source/BbColorPalette.md +3 -4
- package/dist/ai/source/BbDatePicker.md +5 -1
- package/dist/ai/source/BbDatePickerInput.md +5 -1
- package/dist/ai/source/BbDialog.md +175 -19
- package/dist/ai/source/BbDropdown.md +376 -69
- package/dist/ai/source/BbDropdownGroup.md +330 -59
- package/dist/ai/source/BbForm.md +93 -5
- package/dist/ai/source/BbIcon.md +46 -36
- package/dist/ai/source/BbNumberInput.md +3 -4
- package/dist/ai/source/BbOffCanvas.md +474 -194
- package/dist/ai/source/BbPopover.md +24 -17
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbRadio.md +15 -1
- package/dist/ai/source/BbRadioGroup.md +3 -1
- package/dist/ai/source/BbSelect.md +50 -2
- package/dist/ai/source/BbSelectPopover.md +171 -23
- package/dist/ai/source/BbSlider.md +3 -4
- package/dist/ai/source/BbSwitch.md +15 -1
- package/dist/ai/source/BbSwitchGroup.md +8 -5
- package/dist/ai/source/BbTable.md +5092 -1446
- package/dist/ai/source/BbTabs.md +6 -7
- package/dist/ai/source/BbTabsList.md +6 -7
- package/dist/ai/source/BbTabsPanes.md +6 -7
- package/dist/ai/source/BbTabsRoot.md +6 -7
- package/dist/ai/source/BbTag.md +3 -4
- package/dist/ai/source/BbTextInput.md +3 -4
- package/dist/ai/source/BbTextarea.md +3 -4
- package/dist/ai/source/BbTimePicker.md +4 -1
- package/dist/ai/source/BbTimePickerInput.md +5 -1
- package/dist/ai/source/BbToast.md +3 -1
- package/dist/ai/source/BbTooltip.md +5 -1
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/FlatListBox.md +11 -5
- package/dist/ai/source/GroupedListBox.md +7 -5
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAlert/types.d.ts +10 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +36 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +21 -8
- package/dist/components/BbBadge/types.d.ts +8 -2
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +167 -167
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +9 -9
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +78 -78
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +24 -22
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/components/BbBaseSelect/types.d.ts +22 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +104 -104
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +85 -81
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -1
- package/dist/components/BbCollapsible/types.d.ts +7 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +133 -107
- package/dist/components/BbDialog/types.d.ts +29 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +99 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +208 -201
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +225 -208
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDropdown/types.d.ts +20 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/BbIcon/iconCache.d.ts +33 -0
- package/dist/components/BbIcon/iconCache.js +17 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +254 -208
- package/dist/components/BbOffCanvas/types.d.ts +30 -5
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +149 -146
- package/dist/components/BbPopover/types.d.ts +3 -2
- package/dist/components/BbRadioGroup/types.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +27 -23
- package/dist/components/BbSelect/types.d.ts +32 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +221 -213
- package/dist/components/BbSlider/BbSlider.vue.d.ts +1 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1433 -600
- package/dist/components/BbTable/BbTableDataRow.d.ts +162 -0
- package/dist/components/BbTable/BbTableDataRow.js +136 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/types.d.ts +324 -111
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +71 -36
- package/dist/components/BbTabs/types.d.ts +0 -8
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +80 -80
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +61 -61
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbTooltip/types.d.ts +5 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/composables/useBaseOptions.js +30 -20
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePrefill.d.ts +21 -2
- package/dist/composables/usePrefill.js +25 -19
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +121 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +63 -23
- package/dist/i18n/locales/cs.json +4 -1
- package/dist/i18n/locales/da.json +4 -1
- package/dist/i18n/locales/de.json +4 -1
- package/dist/i18n/locales/el.json +4 -1
- package/dist/i18n/locales/en.json +4 -1
- package/dist/i18n/locales/es.json +4 -1
- package/dist/i18n/locales/fi.json +4 -1
- package/dist/i18n/locales/fr.json +4 -1
- package/dist/i18n/locales/hu.json +4 -1
- package/dist/i18n/locales/it.json +4 -1
- package/dist/i18n/locales/ja.json +4 -1
- package/dist/i18n/locales/ko.json +4 -1
- package/dist/i18n/locales/nb.json +4 -1
- package/dist/i18n/locales/nl.json +4 -1
- package/dist/i18n/locales/pl.json +4 -1
- package/dist/i18n/locales/pt.json +4 -1
- package/dist/i18n/locales/ro.json +4 -1
- package/dist/i18n/locales/ru.json +4 -1
- package/dist/i18n/locales/sv.json +4 -1
- package/dist/i18n/locales/tr.json +4 -1
- package/dist/i18n/locales/uk.json +4 -1
- package/dist/i18n/locales/zh-cn.json +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +69 -67
- package/dist/llms-full.txt +3997 -1458
- package/dist/llms-medium.txt +140 -73
- package/dist/llms.txt +7 -6
- package/dist/locale-blueprint.json +4 -1
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +22 -1
- package/dist/nuxt.js +22 -8
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +20 -19
- package/dist/runtime/nuxt-plugin.js +28 -21
- package/dist/styles.css +1 -1
- package/dist/utilities/misc/listboxMetrics.d.ts +3 -3
- package/dist/utilities/misc/listboxMetrics.js +2 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -27
- package/dist/validated/BbSelect.vue.d.ts +2 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite.js +7 -3
- package/llms.txt +8 -7
- package/package.json +2 -2
- package/scripts/lib/eslint-plugin.d.ts +19 -1
- package/scripts/lib/eslint-plugin.mjs +155 -14
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -11
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# SSR prefill
|
|
2
|
+
|
|
3
|
+
Five components load their options from a function you give them — `BbSelect`,
|
|
4
|
+
`BbSelectPopover`, `BbTable`, and the checkbox / radio / switch groups. This
|
|
5
|
+
page is about one question: **does that function run on the server?**
|
|
6
|
+
|
|
7
|
+
The short answer: **only when the host installed an SSR-state adapter.**
|
|
8
|
+
`bitboss-ui/nuxt` installs one for you. Nothing else does, and that is a
|
|
9
|
+
deliberate design, not a gap.
|
|
10
|
+
|
|
11
|
+
## Why it is conditional
|
|
12
|
+
|
|
13
|
+
Server-side resolution is only useful if the client starts from the same data.
|
|
14
|
+
The server can resolve `loadCities()` and paint "Milan"; if the client boots
|
|
15
|
+
with an empty list, its first render paints the placeholder instead — and the
|
|
16
|
+
two disagree. Vue calls that a hydration mismatch: a console error in dev, and
|
|
17
|
+
in production the stale server HTML is simply kept, because Vue does not
|
|
18
|
+
re-patch text it did not expect to differ.
|
|
19
|
+
|
|
20
|
+
So the rule the library follows is:
|
|
21
|
+
|
|
22
|
+
> Resolve on the server only if the result can reach the client.
|
|
23
|
+
> Otherwise do not resolve on the server at all.
|
|
24
|
+
|
|
25
|
+
A cold panel for one tick is a much cheaper failure than markup nobody can
|
|
26
|
+
reproduce.
|
|
27
|
+
|
|
28
|
+
## What happens on each platform
|
|
29
|
+
|
|
30
|
+
| Host | Provider runs on the server? | Client re-fetches on mount? |
|
|
31
|
+
| ---------------------------- | ---------------------------- | --------------------------- |
|
|
32
|
+
| **Nuxt** (`bitboss-ui/nuxt`) | yes | no — it reads the payload |
|
|
33
|
+
| Plain Vue SSR | no | yes |
|
|
34
|
+
| Inertia SSR | no | yes |
|
|
35
|
+
| Any client-only app (SPA) | n/a | yes, as always |
|
|
36
|
+
|
|
37
|
+
In every row hydration is clean. The difference is only whether the first paint
|
|
38
|
+
already has the data.
|
|
39
|
+
|
|
40
|
+
## Nuxt: nothing to do
|
|
41
|
+
|
|
42
|
+
Install the module and you are done.
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
// nuxt.config.ts
|
|
46
|
+
export default defineNuxtConfig({ modules: ['bitboss-ui/nuxt'] });
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```vue
|
|
50
|
+
<BbSelect v-model="city" :items="loadCities" item-text="name" item-value="id" />
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
On the server the provider runs inside `onServerPrefetch`, its rows are written
|
|
54
|
+
into `nuxtApp.payload` under a `bb-items:` key, and the client picks them up
|
|
55
|
+
during setup — before its first render. The provider is called **once, on the
|
|
56
|
+
server**, and the seeded model resolves to its label in the server HTML.
|
|
57
|
+
|
|
58
|
+
## Any other SSR host: opt in with an adapter
|
|
59
|
+
|
|
60
|
+
The library cannot import from your framework, so it asks for two methods:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { SSR_STATE_INJECTION_KEY, type SsrStateAdapter } from 'bitboss-ui';
|
|
64
|
+
|
|
65
|
+
const adapter: SsrStateAdapter = {
|
|
66
|
+
get: (key) => myPayload[key],
|
|
67
|
+
set: (key, value) => {
|
|
68
|
+
myPayload[key] = value;
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
app.provide(SSR_STATE_INJECTION_KEY, adapter);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The contract:
|
|
76
|
+
|
|
77
|
+
- `set` is called on the **server only**, during `onServerPrefetch`, before the
|
|
78
|
+
component renders.
|
|
79
|
+
- `get` is called on the **client only**, during setup of the same component,
|
|
80
|
+
before its first render — so whatever the server wrote must already be
|
|
81
|
+
readable by then. (This is the hard part: your payload has to be rehydrated
|
|
82
|
+
before the Vue app mounts. Nuxt does this; a hand-rolled SSR setup must too.)
|
|
83
|
+
- Keys are opaque strings namespaced with `bb-items:`, unique per component
|
|
84
|
+
instance, and identical on both sides.
|
|
85
|
+
|
|
86
|
+
Provide it at the **app** level (`app.provide`), not inside a component.
|
|
87
|
+
|
|
88
|
+
## Rules for your provider
|
|
89
|
+
|
|
90
|
+
- **Return plain, serializable rows.** They go through the host's payload
|
|
91
|
+
serializer — under Nuxt that is devalue: objects, arrays, dates, maps, sets.
|
|
92
|
+
Not class instances, not ORM models, not anything carrying methods. If the
|
|
93
|
+
library spots a function or symbol on a row it warns in dev, drops the
|
|
94
|
+
server-rendered rows, and lets the client fetch instead — hydration stays
|
|
95
|
+
clean, you just lose the server-side head start.
|
|
96
|
+
- **Keep it isomorphic.** No `window`, no `document`.
|
|
97
|
+
- **Let it reject safely.** If the provider throws on the server the error is
|
|
98
|
+
logged, nothing is transferred, and the client loads normally.
|
|
99
|
+
|
|
100
|
+
## What is NOT transferred
|
|
101
|
+
|
|
102
|
+
Only the **first** load — the prefill. Everything after it is client-side by
|
|
103
|
+
nature and stays that way:
|
|
104
|
+
|
|
105
|
+
- a search query the user types,
|
|
106
|
+
- a `dependencies` change re-running the fetch,
|
|
107
|
+
- a page change in `BbTable`.
|
|
108
|
+
|
|
109
|
+
That is the intent: the transfer exists to make the first paint correct, not to
|
|
110
|
+
cache a session.
|
|
111
|
+
|
|
112
|
+
## Payload size
|
|
113
|
+
|
|
114
|
+
Every provider-backed control on an SSR page adds its resolved rows to the
|
|
115
|
+
page payload. For a select that is a handful of options; for a `BbTable` it is
|
|
116
|
+
a page of rows, which is the same data you would otherwise fetch immediately
|
|
117
|
+
after hydration — traded from a second request into first-paint bytes. If a
|
|
118
|
+
particular control's list is large and it is not worth server-rendering, set
|
|
119
|
+
`prefill="interaction"` (or `false` for a search-first select) and it will not
|
|
120
|
+
load on the server at all.
|
package/dist/ai/index.md
CHANGED
|
@@ -59,12 +59,12 @@ Start from a recipe when building a whole page or flow — they encode the idiom
|
|
|
59
59
|
### Feedback
|
|
60
60
|
|
|
61
61
|
- [BbAlert](./BbAlert.md) - Shows contextual status messages.
|
|
62
|
-
- [BbBadge](./BbBadge.md) - Displays compact status
|
|
62
|
+
- [BbBadge](./BbBadge.md) - Displays a compact inline status counter or label. It sits in the flow — for a bubble or dot anchored OVER another element, use BbIndicator (includes the co-located BbBadgeButton export).
|
|
63
63
|
- [BbBadgeButton](./BbBadgeButton.md) - Makes a badge's body interactive: slotted as a direct child of BbBadge it renders the badge body as a real button/link with full BbBaseButton parity, leaving `clearable` free to remain a separate control.
|
|
64
|
-
- [BbIndicator](./BbIndicator.md) - Anchors a notification bubble (count/short text) or a dot over a wrapped element
|
|
64
|
+
- [BbIndicator](./BbIndicator.md) - Anchors a notification bubble (count/short text) or a dot over a wrapped element.
|
|
65
65
|
- [BbProgress](./BbProgress.md) - Visualizes task or operation progress state.
|
|
66
66
|
- [BbSpinner](./BbSpinner.md) - Indicates ongoing loading or pending operations.
|
|
67
|
-
- [BbToast](./BbToast.md) - Shows transient notification messages.
|
|
67
|
+
- [BbToast](./BbToast.md) - Shows transient notification messages (includes the co-located BbToastPortal export).
|
|
68
68
|
- [BbToastPortal](./BbToastPortal.md) - Registers named slot content that toast() renders via `portal`.
|
|
69
69
|
|
|
70
70
|
### Inputs
|
|
@@ -91,7 +91,7 @@ Start from a recipe when building a whole page or flow — they encode the idiom
|
|
|
91
91
|
- [BbBreadcrumbs](./BbBreadcrumbs.md) - Renders hierarchical navigation paths.
|
|
92
92
|
- [BbCollapsible](./BbCollapsible.md) - Toggles visibility of collapsible content blocks.
|
|
93
93
|
- [BbPagination](./BbPagination.md) - Navigates paginated data sets by page index.
|
|
94
|
-
- [BbTabs](./BbTabs.md) - Switches between tabbed content views (shadcn-like strip;
|
|
94
|
+
- [BbTabs](./BbTabs.md) - Switches between tabbed content views (shadcn-like strip; the co-located BbTabsRoot / BbTabsList / BbTabsPanes exports enable split layouts).
|
|
95
95
|
- [BbTabsList](./BbTabsList.md) - The trigger strip of a split BbTabsRoot layout (renders the tab buttons only).
|
|
96
96
|
- [BbTabsPanes](./BbTabsPanes.md) - The pane host of a split BbTabsRoot layout (renders the tab content only).
|
|
97
97
|
- [BbTabsRoot](./BbTabsRoot.md) - Provide/inject root that lets BbTabsList and BbTabsPanes live in separate layout slots.
|
|
@@ -108,7 +108,7 @@ Start from a recipe when building a whole page or flow — they encode the idiom
|
|
|
108
108
|
- [BbConfirmPortal](./BbConfirmPortal.md) - Registers named slot content that confirm() renders via `portal`.
|
|
109
109
|
- [BbDatePicker](./BbDatePicker.md) - Opens an anchored calendar (and optional time rail) popover on a trigger you own — the date analog of BbColorPalette; also the v-bb-date directive.
|
|
110
110
|
- [BbDialog](./BbDialog.md) - Presents modal dialogs for focused user interactions.
|
|
111
|
-
- [BbDropdown](./BbDropdown.md) - Displays contextual action menus and menu content.
|
|
111
|
+
- [BbDropdown](./BbDropdown.md) - Displays contextual action menus and menu content (includes the co-located BbDropdownGroup export, which is how a selectable group is bound).
|
|
112
112
|
- [BbDropdownButton](./BbDropdownButton.md) - A button with primary action and all other actions collected in a dropdown.
|
|
113
113
|
- [BbDropdownGroup](./BbDropdownGroup.md) - Renderless v-model companion for a group declared in BbDropdown.items, bound by id.
|
|
114
114
|
- [BbOffCanvas](./BbOffCanvas.md) - Shows side-panel overlay content outside normal layout flow.
|
|
@@ -222,17 +222,17 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
222
222
|
- [Migration v2→v3: BbCheckbox / BbRadio / BbSwitch](./guides/migration/components/bb-checkbox.md) - reverse polarity inverted (explicit values flip, default layout unchanged), checked narrowed to boolean, color removed, BbRadio's name no longer required.
|
|
223
223
|
- [Migration v2→v3: BbCheckboxGroup / BbRadioGroup / BbSwitchGroup](./guides/migration/components/bb-checkbox-group.md) - labelPosition renamed legendPosition, per-item disabled is now inert (use selectable), color and the option affix slots removed, BbRadioGroup's name no longer required, and the shared bb-cr-container CSS block split into one per group.
|
|
224
224
|
- [Migration v2→v3: BbChip (removed)](./guides/migration/components/bb-chip.md) - BbChip is gone — BbBadge with clearable is the replacement; non-clearable chips were badges all along.
|
|
225
|
-
- [Migration v2→v3: BbCollapsible](./guides/migration/components/bb-collapsible.md) - The tag prop is removed; the root is always a
|
|
225
|
+
- [Migration v2→v3: BbCollapsible](./guides/migration/components/bb-collapsible.md) - The tag prop is removed; the root is always a span.
|
|
226
226
|
- [Migration v2→v3: BbColorInput](./guides/migration/components/bb-color-input.md) - picker renamed to eyeDropper.
|
|
227
227
|
- [Migration v2→v3: BbColorPalette](./guides/migration/components/bb-color-palette.md) - flip inverted to disableFlip, showArrow removed, picker renamed eyeDropper, update:open dropped, model updates never emit null.
|
|
228
228
|
- [Migration v2→v3: BbDatePickerInput](./guides/migration/components/bb-date-picker-input.md) - allowWriting inverted to disableWriting and hidePopover renamed to disableCalendar, both with a changed token set; the width prop is removed; adaptive mobile sheet by default; non-floating output carries the local offset instead of UTC `Z` (new `utc` prop restores v2 output).
|
|
229
|
-
- [Migration v2→v3: BbDialog](./guides/migration/components/bb-dialog.md) - showClose inverted to hideClose,
|
|
229
|
+
- [Migration v2→v3: BbDialog](./guides/migration/components/bb-dialog.md) - showClose inverted to hideClose, #close removed (description restored in beta.19), default widths changed, adaptive bottom sheet on mobile by default, --bb-dialog-* tokens replaced by --bb-panel-p plus locals.
|
|
230
230
|
- [Migration v2→v3: BbDropdown](./guides/migration/components/bb-dropdown.md) - Items now expect text as the label and can carry variants/submenus; arrowPadding removed; adaptive mobile sheet on by default.
|
|
231
231
|
- [Migration v2→v3: BbDropdownButton](./guides/migration/components/bb-dropdown-button.md) - autoLoading renamed to disableAutoLoading, disabledWhileLoading and theme removed.
|
|
232
232
|
- [Migration v2→v3: BbDropzone](./guides/migration/components/bb-dropzone.md) - modelValue is typed, accept no longer throws and takes bare tokens, and the hidden native-submit input only renders when name is set.
|
|
233
233
|
- [Migration v2→v3: BbIcon](./guides/migration/components/bb-icon.md) - The required prop is renamed type→icon, color is removed, and the xxl size key becomes 2xl.
|
|
234
234
|
- [Migration v2→v3: BbIntersection](./guides/migration/components/bb-intersection.md) - Removed with no replacement — it wrapped IntersectionObserver and carried no styling; use @vueuse/core's useIntersectionObserver.
|
|
235
|
-
- [Migration v2→v3: BbOffCanvas](./guides/migration/components/bb-offcanvas.md) - direction→side; showClose→hideClose;
|
|
235
|
+
- [Migration v2→v3: BbOffCanvas](./guides/migration/components/bb-offcanvas.md) - direction→side; showClose→hideClose; #close removed (description restored in beta.19); size defaults change; adaptive drawer configs unify on offCanvasProps.
|
|
236
236
|
- [Migration v2→v3: BbPagination](./guides/migration/components/bb-pagination.md) - querykey renamed to queryKey; the loading prop is removed.
|
|
237
237
|
- [Migration v2→v3: BbPopover](./guides/migration/components/bb-popover.md) - Built-in close button, restoreFocus, theme, and the arrow are gone; close affordances move into your content.
|
|
238
238
|
- [Migration v2→v3: BbRating](./guides/migration/components/bb-rating.md) - color removed; name no longer required; the star state modifier renamed --highlighted to --filled/--empty; --bb-rating-size demoted to a local --size; input-position finally works.
|
|
@@ -241,7 +241,7 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
241
241
|
- [Migration v2→v3: BbSlider](./guides/migration/components/bb-slider.md) - thumbTranslate inverted to disableThumbTranslate; string model values and color removed.
|
|
242
242
|
- [Migration v2→v3: BbSmoothHeight](./guides/migration/components/bb-smooth-height.md) - The `tag` prop is narrowed to `div | span`, and the inner measuring element now mirrors it instead of always being a `<div>`.
|
|
243
243
|
- [Migration v2→v3: BbSpinner](./guides/migration/components/bb-spinner.md) - The color prop is removed; spinners follow currentColor.
|
|
244
|
-
- [Migration v2→v3: BbTable](./guides/migration/components/bb-table.md) - allowSelectAll inverted to disableSelectAll; loading no longer blanks populated tables and now inerts rows; #loading is first-load-only; #no-data fills a full-width
|
|
244
|
+
- [Migration v2→v3: BbTable](./guides/migration/components/bb-table.md) - The table renders as a CSS grid of divs with ARIA roles, not a <table> — every element selector (table/thead/tbody/tr/th/td) under .bb-table matches nothing, #thead/#tbody/#tfoot take role-complete div rows, --fill/--natural-width are gone, column widths drift within documented bounds, copy-to-spreadsheet and print header repetition degrade; allowSelectAll inverted to disableSelectAll; loading no longer blanks populated tables and now inerts rows; #loading is first-load-only; #no-data fills a full-width cell instead of replacing the row; row events drop the selected argument; columns gained sortable + rowClass, which collide with same-named consumer fields.
|
|
245
245
|
- [Migration v2→v3: BbTabs (was BbTab)](./guides/migration/components/bb-tabs.md) - Component renamed; querykey→queryKey; animations default on; label slots renamed and all dynamic names/URL slugs normalized; the entire .bb-tab BEM tree renamed to .bb-tabs / .bb-tabs-list / .bb-tabs-panes.
|
|
246
246
|
- [Migration v2→v3: BbTag](./guides/migration/components/bb-tag.md) - modelValue is strictly string[] now, multiple is removed, and duplicates are rejected case-insensitively by default.
|
|
247
247
|
- [Migration v2→v3: BbTextInput](./guides/migration/components/bb-text-input.md) - The type prop narrows to the text-like input types — number/date values must move to their dedicated components; a bare `floating` attribute was never a prop, the spelling is label-mode="floating".
|
|
@@ -252,4 +252,5 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
252
252
|
- [Migration v2→v3: useBroadcastChannelInstance](./guides/migration/components/use-broadcast-channel-instance.md) - Removed — cross-tab messaging is not a UI concern; use useBroadcastChannel from @vueuse/core.
|
|
253
253
|
- [Options and Items Playbook](./guides/options-items-playbook.md) - How item-driven components turn raw domain items into options — mapping, value identity, model seeding, and the supported ways to disable choices.
|
|
254
254
|
- [Page Shell](./guides/page-shell.md) - App-side page layout — topbar, content, and a right details sidebar driven by a stack-based context (push a record to peek it, pop to go back). The implementation ships in the per-platform Layout Scaffold recipe; this guide covers when and how to use it.
|
|
255
|
+
- [ssr-prefill](./guides/ssr-prefill.md) - Guide for ssr-prefill usage and decision-making context.
|
|
255
256
|
- [Validated Forms (vee-validate)](./guides/validated-forms.md) - The `bitboss-ui/validated` entrypoint — form controls pre-wired to vee-validate. Global rules give an effort-free `rules="required|email"` string syntax; BbForm hosts the form; requiredAsterisk marks required fields.
|
|
@@ -596,7 +596,6 @@ export function useApprovalsInbox(): ApprovalsInboxContext {
|
|
|
596
596
|
v-model:highlighted="ctx.highlighted.value"
|
|
597
597
|
v-model:select-all="ctx.table.all.value"
|
|
598
598
|
v-model:unselected-items="ctx.table.unselected.value"
|
|
599
|
-
actions
|
|
600
599
|
caption="Expense approvals"
|
|
601
600
|
:columns="columns"
|
|
602
601
|
compact
|
|
@@ -826,7 +826,6 @@ export function useBacklogWorkspace(): BacklogWorkspaceContext {
|
|
|
826
826
|
v-model:highlighted="highlightedIssue"
|
|
827
827
|
v-model:select-all="ctx.table.all.value"
|
|
828
828
|
v-model:unselected-items="ctx.table.unselected.value"
|
|
829
|
-
actions
|
|
830
829
|
caption="Sprint 24 backlog"
|
|
831
830
|
:columns="columns"
|
|
832
831
|
compact
|
|
@@ -648,7 +648,11 @@ paints a selected row but opens nothing is a dead affordance.
|
|
|
648
648
|
|
|
649
649
|
`.plain-link`, `.table-flush` and the row tints are project CSS by design (the
|
|
650
650
|
library ships no such classes), but they are the _same_ project CSS on every
|
|
651
|
-
workspace page.
|
|
651
|
+
workspace page. (`.table-flush`'s edge-inset rules address the table through
|
|
652
|
+
its grid containers — `> .bb-table__table > .bb-table__body > [role='row'] >
|
|
653
|
+
:first-child` — never through `table`/`tbody`/`tr`/`td`, which the table no
|
|
654
|
+
longer renders; the canonical block is in the BbTable guide § Styling hooks.)
|
|
655
|
+
Author them **once**, next to the layout, and import that file
|
|
652
656
|
from the app entry — not per page, and never copy-pasted into a page's
|
|
653
657
|
`<style scoped>`, which is how three pages end up with three underline colours.
|
|
654
658
|
|
|
@@ -63,19 +63,21 @@ OwnerPaginator::make(...), 'tabCounts' => [...], 'ownerOptions' => [...]])` —
|
|
|
63
63
|
the page.
|
|
64
64
|
- **The expand row is a real nested `BbTable` that inherits the parent's
|
|
65
65
|
column tracks.** `inherit-column-widths` snaps the holdings table onto the
|
|
66
|
-
owners table's grid;
|
|
67
|
-
column
|
|
68
|
-
|
|
69
|
-
one edge. This is the recipe's signature move — the full defense is in
|
|
66
|
+
owners table's grid; every child column carries an explicit `snap` naming
|
|
67
|
+
the parent column it sits under (`snap: 'name'` … `'monthly'` — the
|
|
68
|
+
parent's `select` column is accounted for by name), so Resource sits
|
|
69
|
+
exactly under Owner and the right-aligned $/mo columns share one edge. This is the recipe's signature move — the full defense is in
|
|
70
70
|
"Why it is built this way" and in the
|
|
71
71
|
[BbTable guide](../../BbTable.md) ("Nested tables that align with the
|
|
72
72
|
parent").
|
|
73
73
|
- **Page-level cell-padding overrides are scoped with direct-child
|
|
74
74
|
combinators.** The full-bleed treatment (`.table-flush`) pads the outer
|
|
75
|
-
table's first/last cells via
|
|
76
|
-
|
|
77
|
-
the
|
|
78
|
-
|
|
75
|
+
table's first/last cells via
|
|
76
|
+
`:deep(> .bb-table__table > .bb-table__head > [role='row'] > :first-child)`
|
|
77
|
+
— the table is a CSS grid of roled `div`s, not a `<table>`, so the chain
|
|
78
|
+
runs through its container classes, and a bare descendant selector would
|
|
79
|
+
also hit the nested table (inside `.bb-table-expand__cell`) and clobber the
|
|
80
|
+
structural offset padding it computes to stay flush with the parent grid.
|
|
79
81
|
- **Expansion is page state, not table-internal state.** `expanded` (owner
|
|
80
82
|
ids) lives in the context and binds through `v-model:expanded-items`, so
|
|
81
83
|
the toolbar (expand-all/collapse-all), the bulk bar (expand selected) and
|
|
@@ -190,7 +192,8 @@ one-off pixel inset per page:
|
|
|
190
192
|
|
|
191
193
|
`--table-identity-lead` is the width of the identity cell's toggle track, so
|
|
192
194
|
the two can never drift. Set the knob on the nest container — never pad the
|
|
193
|
-
child's `
|
|
195
|
+
child's body (`.bb-table__body`) alone, which reintroduces the edge mismatch
|
|
196
|
+
the snap removed.
|
|
194
197
|
|
|
195
198
|
## The code
|
|
196
199
|
|
|
@@ -568,7 +571,6 @@ export function useOwnershipAtlas(): OwnershipAtlasContext {
|
|
|
568
571
|
v-model:highlighted="highlightedOwner"
|
|
569
572
|
v-model:select-all="ctx.table.all.value"
|
|
570
573
|
v-model:unselected-items="ctx.table.unselected.value"
|
|
571
|
-
actions
|
|
572
574
|
actions-text="Holdings"
|
|
573
575
|
caption="Resource owners"
|
|
574
576
|
class="table-flush"
|
|
@@ -780,25 +782,42 @@ const rowClass = (item: Owner) => {
|
|
|
780
782
|
}
|
|
781
783
|
|
|
782
784
|
/* Direct-child combinators keep these overrides on the OWNER table's own
|
|
783
|
-
cells.
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
785
|
+
cells. The table is a CSS grid of roled divs (no <table>/<tr>/<td>), so the
|
|
786
|
+
chain runs through its container classes. A bare
|
|
787
|
+
`:deep([role='cell']:first-child)` would also match the nested holdings
|
|
788
|
+
table and clobber the structural offset padding it computes to stay flush
|
|
789
|
+
with the parent grid — the one selector mistake that silently breaks
|
|
790
|
+
nested-table alignment. */
|
|
788
791
|
.table-flush
|
|
789
|
-
:deep(>
|
|
792
|
+
:deep(> .bb-table__table > .bb-table__head > [role='row'] > :first-child),
|
|
793
|
+
.table-flush
|
|
794
|
+
:deep(
|
|
795
|
+
> .bb-table__table
|
|
796
|
+
> .bb-table__body
|
|
797
|
+
> [role='row']
|
|
798
|
+
> :first-child:not(.bb-table-expand__cell)
|
|
799
|
+
) {
|
|
790
800
|
padding-inline-start: var(--page-inset);
|
|
791
801
|
}
|
|
792
802
|
|
|
793
|
-
.table-flush :deep(> table > thead > tr > th:last-child),
|
|
794
803
|
.table-flush
|
|
795
|
-
:deep(>
|
|
804
|
+
:deep(> .bb-table__table > .bb-table__head > [role='row'] > :last-child),
|
|
805
|
+
.table-flush
|
|
806
|
+
:deep(
|
|
807
|
+
> .bb-table__table
|
|
808
|
+
> .bb-table__body
|
|
809
|
+
> [role='row']
|
|
810
|
+
> :last-child:not(.bb-table-expand__cell)
|
|
811
|
+
) {
|
|
796
812
|
padding-inline-end: var(--page-inset);
|
|
797
813
|
}
|
|
798
814
|
|
|
799
815
|
/* Expand rows stay edge-to-edge so the nested table can inherit the parent
|
|
800
816
|
tracks without an extra inset shifting everything sideways. */
|
|
801
|
-
.table-flush
|
|
817
|
+
.table-flush
|
|
818
|
+
:deep(
|
|
819
|
+
> .bb-table__table > .bb-table__body > [role='row'] > .bb-table-expand__cell
|
|
820
|
+
) {
|
|
802
821
|
padding-inline: 0;
|
|
803
822
|
}
|
|
804
823
|
|
|
@@ -882,10 +901,10 @@ defineProps<{ owner: Owner }>();
|
|
|
882
901
|
* the parent's first data column, and that inset is what reads as hierarchy.
|
|
883
902
|
*/
|
|
884
903
|
const columns: Array<BbTableColumn<Holding>> = [
|
|
885
|
-
{ key: 'name', label: 'Resource', snap:
|
|
886
|
-
{ key: 'kind', label: 'Type', snap:
|
|
887
|
-
{ key: 'status', label: 'Status', snap:
|
|
888
|
-
{ key: 'monthlyCost', label: '$ / mo', align: 'right', snap:
|
|
904
|
+
{ key: 'name', label: 'Resource', snap: 'name' },
|
|
905
|
+
{ key: 'kind', label: 'Type', snap: 'team' },
|
|
906
|
+
{ key: 'status', label: 'Status', snap: 'region' },
|
|
907
|
+
{ key: 'monthlyCost', label: '$ / mo', align: 'right', snap: 'monthly' },
|
|
889
908
|
];
|
|
890
909
|
|
|
891
910
|
const money = (value: number) =>
|
|
@@ -1304,7 +1323,7 @@ export interface OwnerDetail extends Owner {
|
|
|
1304
1323
|
widths.** `inherit-column-widths` is the whole alignment mechanism: the
|
|
1305
1324
|
holdings table reads the owners table's measured tracks, so Resource sits
|
|
1306
1325
|
under Owner and both $/mo columns share one right edge at every viewport
|
|
1307
|
-
width. Two hand-maintained
|
|
1326
|
+
width. Two hand-maintained width lists (or two tables that merely look
|
|
1308
1327
|
similar) drift apart the first time a label changes; the inheritance
|
|
1309
1328
|
cannot.
|
|
1310
1329
|
- **Every child column snaps, and the base is 1.** The parent is
|
|
@@ -1321,11 +1340,12 @@ export interface OwnerDetail extends Owner {
|
|
|
1321
1340
|
- **Cell-padding overrides use direct-child combinators.** `.table-flush`
|
|
1322
1341
|
bleeds the owner table past the page padding and re-adds the inset on the
|
|
1323
1342
|
outermost cells — but only via
|
|
1324
|
-
`:deep(>
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1343
|
+
`:deep(> .bb-table__table > .bb-table__body > [role='row'] > :first-child)`
|
|
1344
|
+
(the table is a CSS grid of roled `div`s; `table`/`tbody`/`tr`/`td`
|
|
1345
|
+
selectors match nothing). A bare descendant selector would also hit the
|
|
1346
|
+
nested table's cells and clobber the offset padding it computes to stay on
|
|
1347
|
+
the parent grid. The expand cell itself is excluded from the inset and
|
|
1348
|
+
zero-padded, so the nested table gets the full row width to snap within.
|
|
1329
1349
|
- **Expansion is rung-3 page state.** `expanded` lives in the context
|
|
1330
1350
|
because four surfaces touch it: the per-row control, the toolbar's
|
|
1331
1351
|
expand-all/collapse-all, the bulk bar's Expand, and the peek's "Expand in
|
|
@@ -817,7 +817,6 @@ const ctx = useInvoiceForm();
|
|
|
817
817
|
<!-- Inline-editing table (§6.3): every editable cell type is its own
|
|
818
818
|
leaf. The amount column is virtual — computed from the row. -->
|
|
819
819
|
<BbTable
|
|
820
|
-
actions
|
|
821
820
|
caption="Invoice line items"
|
|
822
821
|
:columns="columns"
|
|
823
822
|
compact
|
|
@@ -531,7 +531,6 @@ export function useInvoicesWorkspace(): InvoicesWorkspaceContext {
|
|
|
531
531
|
v-model="ctx.table.selected.value"
|
|
532
532
|
v-model:select-all="ctx.table.all.value"
|
|
533
533
|
v-model:unselected-items="ctx.table.unselected.value"
|
|
534
|
-
actions
|
|
535
534
|
caption="Invoices"
|
|
536
535
|
:columns="columns"
|
|
537
536
|
compact
|
|
@@ -814,7 +813,11 @@ const statusGroup: BbDropdownItem = {
|
|
|
814
813
|
|
|
815
814
|
// Pipeline facet: `prefill: true` resolves a picked customer's name eagerly,
|
|
816
815
|
// so a chip never sits on a bare id while this group's own submenu (inside
|
|
817
|
-
// the Filters menu) has never been opened.
|
|
816
|
+
// the Filters menu) has never been opened. The eager flag belongs HERE, on
|
|
817
|
+
// the menu's copy only — the chip derives its own copy with
|
|
818
|
+
// `prefill: 'interaction'` (see FilterChip.vue), because a second dropdown
|
|
819
|
+
// redeclaring `prefill: true` would fetch every seeded facet twice on page
|
|
820
|
+
// load for nothing.
|
|
818
821
|
const customerGroup: BbDropdownItem = {
|
|
819
822
|
key: 'customer',
|
|
820
823
|
label: 'Customer',
|
|
@@ -866,10 +869,10 @@ const menu = computed<BbDropdownItem[]>(() => [
|
|
|
866
869
|
component sitting between `BbBadge` and `BbBadgeButton` breaks the
|
|
867
870
|
badge's direct-child vnode scan (the companion must be a literal
|
|
868
871
|
child). This IS "the chip is itself a dropdown onto the same filter
|
|
869
|
-
group": `
|
|
870
|
-
|
|
871
|
-
own submenu can never drift apart. -->
|
|
872
|
-
<BbDropdown :activator="chipRef" :items="[
|
|
872
|
+
group": `chipGroup` is derived from the exact descriptor FilterRail
|
|
873
|
+
declared (spread, one override — never redeclared), so this scoped
|
|
874
|
+
picker and the Filters menu's own submenu can never drift apart. -->
|
|
875
|
+
<BbDropdown :activator="chipRef" :items="[chipGroup]" :width="220">
|
|
873
876
|
<BbDropdownGroup
|
|
874
877
|
:id="groupKey"
|
|
875
878
|
:model-value="modelValue"
|
|
@@ -903,9 +906,24 @@ const emit = defineEmits<{ 'update:modelValue': [value: unknown] }>();
|
|
|
903
906
|
|
|
904
907
|
const chipRef = useTemplateRef('chipRef');
|
|
905
908
|
|
|
909
|
+
// The chip's own copy of the shared descriptor, one override: `prefill:
|
|
910
|
+
// 'interaction'`. BbDropdown mounts a pipeline resolver for every group it
|
|
911
|
+
// declares at its own root, independent of the panel ever opening — so if
|
|
912
|
+
// this second dropdown repeated the menu's `prefill: true` verbatim, each
|
|
913
|
+
// seeded pipeline facet would be fetched TWICE on page load, and the chip's
|
|
914
|
+
// copy of the result would feed nothing (the label below comes from the
|
|
915
|
+
// menu's resolution via context). `'interaction'` defers this copy's fetch
|
|
916
|
+
// to the moment the chip's dropdown is actually opened. For static array
|
|
917
|
+
// facets the override is inert — arrays resolve synchronously either way.
|
|
918
|
+
const chipGroup = computed<BbDropdownItem>(() => ({
|
|
919
|
+
...props.group,
|
|
920
|
+
prefill: 'interaction',
|
|
921
|
+
}));
|
|
922
|
+
|
|
906
923
|
// Reads the Filters menu's already-resolved selection — no twin fetch. A
|
|
907
|
-
// pipeline group needs `prefill: true` (set on `group` by
|
|
908
|
-
// never sits on a bare id/value while the menu's own
|
|
924
|
+
// pipeline group needs `prefill: true` (set on the MENU's copy of `group` by
|
|
925
|
+
// FilterRail) so this never sits on a bare id/value while the menu's own
|
|
926
|
+
// submenu is unopened.
|
|
909
927
|
const dropdownFilters = useBbDropdownContext('invoice-filters');
|
|
910
928
|
const chipText = computed(() => {
|
|
911
929
|
const options =
|
|
@@ -687,7 +687,6 @@ export function useUploadCenter(): UploadCenterContext {
|
|
|
687
687
|
v-model="ctx.table.selected.value"
|
|
688
688
|
v-model:select-all="ctx.table.all.value"
|
|
689
689
|
v-model:unselected-items="ctx.table.unselected.value"
|
|
690
|
-
actions
|
|
691
690
|
caption="Expense receipts"
|
|
692
691
|
:columns="columns"
|
|
693
692
|
compact
|
|
@@ -648,7 +648,11 @@ paints a selected row but opens nothing is a dead affordance.
|
|
|
648
648
|
|
|
649
649
|
`.plain-link`, `.table-flush` and the row tints are project CSS by design (the
|
|
650
650
|
library ships no such classes), but they are the _same_ project CSS on every
|
|
651
|
-
workspace page.
|
|
651
|
+
workspace page. (`.table-flush`'s edge-inset rules address the table through
|
|
652
|
+
its grid containers — `> .bb-table__table > .bb-table__body > [role='row'] >
|
|
653
|
+
:first-child` — never through `table`/`tbody`/`tr`/`td`, which the table no
|
|
654
|
+
longer renders; the canonical block is in the BbTable guide § Styling hooks.)
|
|
655
|
+
Author them **once**, next to the layout, and import that file
|
|
652
656
|
from the app entry — not per page, and never copy-pasted into a page's
|
|
653
657
|
`<style scoped>`, which is how three pages end up with three underline colours.
|
|
654
658
|
|
|
@@ -846,7 +846,6 @@ const ctx = useInvoiceForm();
|
|
|
846
846
|
<!-- Inline-editing table (§6.3): every editable cell type is its own
|
|
847
847
|
leaf. The amount column is virtual — computed from the row. -->
|
|
848
848
|
<BbTable
|
|
849
|
-
actions
|
|
850
849
|
caption="Invoice line items"
|
|
851
850
|
:columns="columns"
|
|
852
851
|
compact
|
|
@@ -534,7 +534,6 @@ export function useInvoicesWorkspace(): InvoicesWorkspaceContext {
|
|
|
534
534
|
|
|
535
535
|
<BbTable
|
|
536
536
|
id="invoices-table"
|
|
537
|
-
actions
|
|
538
537
|
caption="Invoices"
|
|
539
538
|
:columns="columns"
|
|
540
539
|
compact
|
|
@@ -802,7 +801,11 @@ const statusGroup: BbDropdownItem = {
|
|
|
802
801
|
|
|
803
802
|
// Pipeline facet: `prefill: true` resolves a picked customer's name eagerly,
|
|
804
803
|
// so a chip never sits on a bare id while this group's own submenu (inside
|
|
805
|
-
// the Filters menu) has never been opened.
|
|
804
|
+
// the Filters menu) has never been opened. The eager flag belongs HERE, on
|
|
805
|
+
// the menu's copy only — the chip derives its own copy with
|
|
806
|
+
// `prefill: 'interaction'` (see FilterChip.vue), because a second dropdown
|
|
807
|
+
// redeclaring `prefill: true` would fetch every seeded facet twice on page
|
|
808
|
+
// load for nothing.
|
|
806
809
|
const customerGroup: BbDropdownItem = {
|
|
807
810
|
key: 'customer',
|
|
808
811
|
label: 'Customer',
|
|
@@ -854,10 +857,10 @@ const menu = computed<BbDropdownItem[]>(() => [
|
|
|
854
857
|
component sitting between `BbBadge` and `BbBadgeButton` breaks the
|
|
855
858
|
badge's direct-child vnode scan (the companion must be a literal
|
|
856
859
|
child). This IS "the chip is itself a dropdown onto the same filter
|
|
857
|
-
group": `
|
|
858
|
-
|
|
859
|
-
own submenu can never drift apart. -->
|
|
860
|
-
<BbDropdown :activator="chipRef" :items="[
|
|
860
|
+
group": `chipGroup` is derived from the exact descriptor FilterRail
|
|
861
|
+
declared (spread, one override — never redeclared), so this scoped
|
|
862
|
+
picker and the Filters menu's own submenu can never drift apart. -->
|
|
863
|
+
<BbDropdown :activator="chipRef" :items="[chipGroup]" :width="220">
|
|
861
864
|
<BbDropdownGroup
|
|
862
865
|
:id="groupKey"
|
|
863
866
|
:model-value="modelValue"
|
|
@@ -891,9 +894,24 @@ const emit = defineEmits<{ 'update:modelValue': [value: unknown] }>();
|
|
|
891
894
|
|
|
892
895
|
const chipRef = useTemplateRef('chipRef');
|
|
893
896
|
|
|
897
|
+
// The chip's own copy of the shared descriptor, one override: `prefill:
|
|
898
|
+
// 'interaction'`. BbDropdown mounts a pipeline resolver for every group it
|
|
899
|
+
// declares at its own root, independent of the panel ever opening — so if
|
|
900
|
+
// this second dropdown repeated the menu's `prefill: true` verbatim, each
|
|
901
|
+
// seeded pipeline facet would be fetched TWICE on page load, and the chip's
|
|
902
|
+
// copy of the result would feed nothing (the label below comes from the
|
|
903
|
+
// menu's resolution via context). `'interaction'` defers this copy's fetch
|
|
904
|
+
// to the moment the chip's dropdown is actually opened. For static array
|
|
905
|
+
// facets the override is inert — arrays resolve synchronously either way.
|
|
906
|
+
const chipGroup = computed<BbDropdownItem>(() => ({
|
|
907
|
+
...props.group,
|
|
908
|
+
prefill: 'interaction',
|
|
909
|
+
}));
|
|
910
|
+
|
|
894
911
|
// Reads the Filters menu's already-resolved selection — no twin fetch. A
|
|
895
|
-
// pipeline group needs `prefill: true` (set on `group` by
|
|
896
|
-
// never sits on a bare id/value while the menu's own
|
|
912
|
+
// pipeline group needs `prefill: true` (set on the MENU's copy of `group` by
|
|
913
|
+
// FilterRail) so this never sits on a bare id/value while the menu's own
|
|
914
|
+
// submenu is unopened.
|
|
897
915
|
const dropdownFilters = useBbDropdownContext('invoice-filters');
|
|
898
916
|
const chipText = computed(() => {
|
|
899
917
|
const options =
|
|
@@ -648,7 +648,11 @@ paints a selected row but opens nothing is a dead affordance.
|
|
|
648
648
|
|
|
649
649
|
`.plain-link`, `.table-flush` and the row tints are project CSS by design (the
|
|
650
650
|
library ships no such classes), but they are the _same_ project CSS on every
|
|
651
|
-
workspace page.
|
|
651
|
+
workspace page. (`.table-flush`'s edge-inset rules address the table through
|
|
652
|
+
its grid containers — `> .bb-table__table > .bb-table__body > [role='row'] >
|
|
653
|
+
:first-child` — never through `table`/`tbody`/`tr`/`td`, which the table no
|
|
654
|
+
longer renders; the canonical block is in the BbTable guide § Styling hooks.)
|
|
655
|
+
Author them **once**, next to the layout, and import that file
|
|
652
656
|
from the app entry — not per page, and never copy-pasted into a page's
|
|
653
657
|
`<style scoped>`, which is how three pages end up with three underline colours.
|
|
654
658
|
|