bitboss-ui 3.0.0-beta.2 → 3.0.0-beta.20
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 +791 -88
- 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 +110 -2
- package/dist/ai/components.json +882 -90
- 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 +2 -2
- 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 +4 -2
- package/dist/ai/guides/installation-and-plugin-setup.md +74 -9
- 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 +446 -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/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +41 -20
- package/dist/ai/recipes/inertia/records-workspace.md +26 -7
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -7
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -7
- 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 +4642 -1387
- 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 +8 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1319 -616
- 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 +247 -86
- package/dist/components/BbTable/utils.d.ts +87 -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/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +99 -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 +3712 -1381
- package/dist/llms-medium.txt +113 -43
- 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 +6 -2
- 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 +146 -0
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -4
- 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
|
@@ -315,9 +315,23 @@ export type BbCheckboxSlots = {
|
|
|
315
315
|
.bb-base-input-container__layout--horizontal {
|
|
316
316
|
align-items: flex-start;
|
|
317
317
|
|
|
318
|
+
/*
|
|
319
|
+
* `align-items` + `min-height` are what pin the control to the
|
|
320
|
+
* LABEL'S FIRST LINE instead of the block centre — measured: with a
|
|
321
|
+
* 4-line label the control's mid sits exactly on the first line's
|
|
322
|
+
* mid, and 28px above the block centre.
|
|
323
|
+
*
|
|
324
|
+
* There used to be a `display: inline-flex` here too, and it was
|
|
325
|
+
* doing none of that vertical work — but it silently killed
|
|
326
|
+
* `input-position`, whose only lever is `justify-items` (a grid
|
|
327
|
+
* property, inert on a flex container). So a described row with
|
|
328
|
+
* `input-position="right"` painted its control at the START of the
|
|
329
|
+
* column: 182px out on a 198px column (Q20.2). Removing the one
|
|
330
|
+
* declaration restores left/center/right and leaves the vertical
|
|
331
|
+
* geometry byte-identical.
|
|
332
|
+
*/
|
|
318
333
|
.bb-base-input-container__control {
|
|
319
334
|
align-items: center;
|
|
320
|
-
display: inline-flex;
|
|
321
335
|
min-height: var(--bb-label-lh);
|
|
322
336
|
}
|
|
323
337
|
}
|
|
@@ -282,7 +282,8 @@ export type BbCheckboxGroupProps<T> = {
|
|
|
282
282
|
/**
|
|
283
283
|
* Legend rendering mode. `'outside'` renders the legend above the fieldset in the normal flow;
|
|
284
284
|
* `'inside'` overlays the legend inside the fieldset border.
|
|
285
|
-
* Floating mode is not supported for checkbox
|
|
285
|
+
* Floating mode is not supported for option groups (checkbox, radio or
|
|
286
|
+
* switch) — there is no single field for the legend to float against.
|
|
286
287
|
*/
|
|
287
288
|
legendMode?: 'outside' | 'inside';
|
|
288
289
|
|
|
@@ -68,9 +68,15 @@ export type BbCollapsibleProps = {
|
|
|
68
68
|
/**
|
|
69
69
|
* Used by v-model to trigger opening / closing the collapsible.
|
|
70
70
|
*
|
|
71
|
+
* Optional, matching the runtime: `withDefaults` supplies `false`, so an
|
|
72
|
+
* omitted binding renders closed and Vue never warns. It was typed required
|
|
73
|
+
* while carrying that default, which made the manifest publish a row that
|
|
74
|
+
* was `required: true` AND `default: false` — a contradiction that read as
|
|
75
|
+
* a generator bug.
|
|
76
|
+
*
|
|
71
77
|
* @defaultValue `false`
|
|
72
78
|
*/
|
|
73
|
-
modelValue
|
|
79
|
+
modelValue?: boolean;
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
export type BbCollapsibleSlots = {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
<script setup lang="ts">
|
|
68
68
|
import { ref, computed } from 'vue';
|
|
69
|
-
import {
|
|
69
|
+
import { useConfig } from '@/composables/useConfig';
|
|
70
70
|
import { isNotNil } from '@/utilities/functions/isNotNil';
|
|
71
71
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
72
72
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
@@ -78,7 +78,6 @@ import type {
|
|
|
78
78
|
BbColorInputEvents,
|
|
79
79
|
BbColorInputSlots,
|
|
80
80
|
} from './types';
|
|
81
|
-
export type { BbColorInputProps, BbColorInputEvents, BbColorInputSlots };
|
|
82
81
|
|
|
83
82
|
const props = withDefaults(defineProps<BbColorInputProps>(), {
|
|
84
83
|
// `undefined` (declared, not omitted) keeps `adaptive` three-state: it
|
|
@@ -87,10 +86,10 @@ const props = withDefaults(defineProps<BbColorInputProps>(), {
|
|
|
87
86
|
// keeping the Boolean type so the valueless `adaptive` shorthand → `true`.
|
|
88
87
|
adaptive: undefined,
|
|
89
88
|
});
|
|
90
|
-
|
|
91
89
|
const emit = defineEmits<BaseColorInputEvents>();
|
|
92
|
-
|
|
93
90
|
defineSlots<BbColorInputSlots>();
|
|
91
|
+
const config = useConfig();
|
|
92
|
+
export type { BbColorInputProps, BbColorInputEvents, BbColorInputSlots };
|
|
94
93
|
|
|
95
94
|
if (process.env.NODE_ENV !== 'production')
|
|
96
95
|
warnRemovedAttrs('BbColorInput', removedPropsFor('BbColorInput'));
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
|
|
81
81
|
<script setup lang="ts">
|
|
82
82
|
import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue';
|
|
83
|
-
import {
|
|
83
|
+
import { useConfig } from '@/composables/useConfig';
|
|
84
84
|
import { createReusableTemplate } from '@vueuse/core';
|
|
85
85
|
import { extractDomContainer } from '@/utilities/functions/extractDomContainer';
|
|
86
86
|
import { useClosingInert } from '@/composables/useClosingInert';
|
|
@@ -98,7 +98,6 @@ import type {
|
|
|
98
98
|
BbColorPaletteSlots,
|
|
99
99
|
} from './types';
|
|
100
100
|
import { transitions } from '@/utilities/misc/transitions';
|
|
101
|
-
export type { BbColorPaletteProps, BbColorPaletteEvents, BbColorPaletteSlots };
|
|
102
101
|
|
|
103
102
|
const props = withDefaults(defineProps<BbColorPaletteProps>(), {
|
|
104
103
|
// `undefined` (declared, not omitted) keeps `adaptive` three-state: it disables
|
|
@@ -112,10 +111,10 @@ const props = withDefaults(defineProps<BbColorPaletteProps>(), {
|
|
|
112
111
|
eyeDropper: false,
|
|
113
112
|
transitionDuration: transitions.medium,
|
|
114
113
|
});
|
|
115
|
-
|
|
116
114
|
const emit = defineEmits<BbColorPaletteEvents>();
|
|
117
|
-
|
|
118
115
|
defineSlots<BbColorPaletteSlots>();
|
|
116
|
+
const config = useConfig();
|
|
117
|
+
export type { BbColorPaletteProps, BbColorPaletteEvents, BbColorPaletteSlots };
|
|
119
118
|
|
|
120
119
|
if (process.env.NODE_ENV !== 'production')
|
|
121
120
|
warnRemovedAttrs('BbColorPalette', removedPropsFor('BbColorPalette'));
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
</template>
|
|
105
105
|
|
|
106
106
|
<script setup lang="ts">
|
|
107
|
-
import {
|
|
107
|
+
import { useConfig } from '@/composables/useConfig';
|
|
108
108
|
import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue';
|
|
109
109
|
import { createReusableTemplate } from '@vueuse/core';
|
|
110
110
|
import { extractDomContainer } from '@/utilities/functions/extractDomContainer';
|
|
@@ -144,7 +144,11 @@ const props = withDefaults(defineProps<BbDatePickerProps>(), {
|
|
|
144
144
|
});
|
|
145
145
|
|
|
146
146
|
const emit = defineEmits<BbDatePickerEvents>();
|
|
147
|
+
|
|
147
148
|
defineSlots<BbDatePickerSlots>();
|
|
149
|
+
|
|
150
|
+
const config = useConfig();
|
|
151
|
+
|
|
148
152
|
/**
|
|
149
153
|
* The time rail is a `datetime` affordance only. Every former `props.datetime`
|
|
150
154
|
* read goes through this, so the type union stays the single source of truth.
|
|
@@ -88,7 +88,7 @@ import BaseDatePickerInput from '../BbBaseDatePickerInput/BbBaseDatePickerInput.
|
|
|
88
88
|
import BaseInputContainer from '../BbBaseInputContainer/BbBaseInputContainer.vue';
|
|
89
89
|
import type { BaseDatePickerInputEvents } from '../BbBaseDatePickerInput/types';
|
|
90
90
|
import { ref, computed, onBeforeUnmount, onDeactivated } from 'vue';
|
|
91
|
-
import {
|
|
91
|
+
import { useConfig } from '@/composables/useConfig';
|
|
92
92
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
93
93
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
94
94
|
import { isNotEmpty } from '@/utilities/functions/isNotEmpty';
|
|
@@ -106,9 +106,13 @@ const props = withDefaults(defineProps<BbDatePickerInputProps>(), {
|
|
|
106
106
|
// resolves to `true`.
|
|
107
107
|
adaptive: undefined,
|
|
108
108
|
});
|
|
109
|
+
|
|
109
110
|
const emit = defineEmits<BaseDatePickerInputEvents>();
|
|
111
|
+
|
|
110
112
|
defineSlots<BbDatePickerInputSlots>();
|
|
111
113
|
|
|
114
|
+
const config = useConfig();
|
|
115
|
+
|
|
112
116
|
if (process.env.NODE_ENV !== 'production')
|
|
113
117
|
warnRemovedAttrs('BbDatePickerInput', removedPropsFor('BbDatePickerInput'));
|
|
114
118
|
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
<template v-if="$slots.title" #title="slotProps">
|
|
25
25
|
<slot name="title" v-bind="slotProps" />
|
|
26
26
|
</template>
|
|
27
|
+
<template v-if="$slots.description" #description="slotProps">
|
|
28
|
+
<slot name="description" v-bind="slotProps" />
|
|
29
|
+
</template>
|
|
27
30
|
<template v-if="$slots.footer" #footer>
|
|
28
31
|
<slot name="footer" />
|
|
29
32
|
</template>
|
|
@@ -31,8 +34,11 @@
|
|
|
31
34
|
<dialog
|
|
32
35
|
v-else
|
|
33
36
|
ref="dialog"
|
|
37
|
+
:aria-describedby="
|
|
38
|
+
hasRenderedAtLeastOnce && hasDescription() ? descriptionId : undefined
|
|
39
|
+
"
|
|
34
40
|
:aria-labelledby="
|
|
35
|
-
hasRenderedAtLeastOnce && (
|
|
41
|
+
hasRenderedAtLeastOnce && (hasTitle() || $slots.header)
|
|
36
42
|
? titleId
|
|
37
43
|
: undefined
|
|
38
44
|
"
|
|
@@ -57,11 +63,20 @@
|
|
|
57
63
|
@pointerdown="onBackdropPointerDown"
|
|
58
64
|
>
|
|
59
65
|
<template v-if="hasRenderedAtLeastOnce">
|
|
60
|
-
<div v-if="renderHeader || $slots.header" class="bb-dialog__header">
|
|
66
|
+
<div v-if="renderHeader() || $slots.header" class="bb-dialog__header">
|
|
61
67
|
<slot :close="close" name="header" :title="title" :title-id="titleId">
|
|
62
|
-
<span :id="titleId" class="bb-dialog__title">
|
|
68
|
+
<span v-if="hasTitle()" :id="titleId" class="bb-dialog__title">
|
|
63
69
|
<slot name="title" :text="title">{{ title }}</slot>
|
|
64
70
|
</span>
|
|
71
|
+
<p
|
|
72
|
+
v-if="hasDescription()"
|
|
73
|
+
:id="descriptionId"
|
|
74
|
+
class="bb-dialog__description"
|
|
75
|
+
>
|
|
76
|
+
<slot name="description" :text="description">{{
|
|
77
|
+
description
|
|
78
|
+
}}</slot>
|
|
79
|
+
</p>
|
|
65
80
|
<CloseButton
|
|
66
81
|
v-if="!hideClose"
|
|
67
82
|
:aria-label="t('dialog.closeLabel').value"
|
|
@@ -72,7 +87,7 @@
|
|
|
72
87
|
<div class="bb-dialog__body scrollbar-border">
|
|
73
88
|
<div class="bb-dialog__body-content">
|
|
74
89
|
<CloseButton
|
|
75
|
-
v-if="!renderHeader && !$slots.header && !hideClose"
|
|
90
|
+
v-if="!renderHeader() && !$slots.header && !hideClose"
|
|
76
91
|
:aria-label="t('dialog.closeLabel').value"
|
|
77
92
|
@click="onCloseButtonClick"
|
|
78
93
|
/>
|
|
@@ -106,13 +121,14 @@ import {
|
|
|
106
121
|
} from '@/utils/overlayEscapeStack';
|
|
107
122
|
import { useId } from '@/composables/useId';
|
|
108
123
|
import { useLocale } from '@/composables/useLocale';
|
|
124
|
+
import { useLogger } from '@/composables/useLogger';
|
|
109
125
|
import { useMobile } from '@/composables/useMobile';
|
|
110
126
|
import { useBreakpoint } from '@/composables/useBreakpoint';
|
|
111
127
|
import { useUntil } from '@/composables/useUntil';
|
|
112
128
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
113
129
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
114
130
|
import { wait } from '@/utilities/functions/wait';
|
|
115
|
-
import {
|
|
131
|
+
import { useConfig } from '@/composables/useConfig';
|
|
116
132
|
import type { BbDialogProps, BbDialogEvents, BbDialogSlots } from './types';
|
|
117
133
|
import type { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
118
134
|
import CloseButton from '../CloseIcon/CloseButton.vue';
|
|
@@ -142,7 +158,9 @@ const props = withDefaults(defineProps<BbDialogProps>(), {
|
|
|
142
158
|
|
|
143
159
|
const emit = defineEmits<BbDialogEvents>();
|
|
144
160
|
|
|
145
|
-
defineSlots<BbDialogSlots>();
|
|
161
|
+
const slots = defineSlots<BbDialogSlots>();
|
|
162
|
+
|
|
163
|
+
const config = useConfig();
|
|
146
164
|
|
|
147
165
|
if (process.env.NODE_ENV !== 'production')
|
|
148
166
|
warnRemovedAttrs('BbDialog', removedPropsFor('BbDialog'));
|
|
@@ -173,6 +191,7 @@ watch([() => props.adaptive, isMobile], () => {
|
|
|
173
191
|
// drawer's extent mean different things, so the drawer defaults to 'auto';
|
|
174
192
|
// 3. `offCanvasProps`, so the consumer overrides any of the above.
|
|
175
193
|
const canvasBindings = computed<Partial<BbOffCanvasProps>>(() => ({
|
|
194
|
+
description: props.description,
|
|
176
195
|
disabled: props.disabled,
|
|
177
196
|
eager: props.eager,
|
|
178
197
|
focusTarget: props.focusTarget,
|
|
@@ -190,7 +209,40 @@ const canvasBindings = computed<Partial<BbOffCanvasProps>>(() => ({
|
|
|
190
209
|
|
|
191
210
|
const dialog = ref<HTMLDialogElement | null>(null);
|
|
192
211
|
const titleId = `title_${useId().id.value}`;
|
|
193
|
-
|
|
212
|
+
/*
|
|
213
|
+
* `aria-describedby` points HERE and nowhere else.
|
|
214
|
+
*
|
|
215
|
+
* BbConfirm has described its dialog by its message for a while, and its
|
|
216
|
+
* comment says exactly why that is safe there and was not safe on BbDialog:
|
|
217
|
+
* a confirm's text is short and static, where BbDialog's body is arbitrary
|
|
218
|
+
* markup and pointing at it would read entire forms aloud. A dedicated
|
|
219
|
+
* `description` is the confirm case — one short static line — so the wiring
|
|
220
|
+
* that v3 dropped along with the prop can come back with it, aimed at the
|
|
221
|
+
* element that is actually a description.
|
|
222
|
+
*/
|
|
223
|
+
const descriptionId = `desc_${useId().id.value}`;
|
|
224
|
+
const hasDescription = () => !!props.description || !!slots.description;
|
|
225
|
+
/*
|
|
226
|
+
* A `#title` slot is a title — it renders the default header exactly as the
|
|
227
|
+
* `title` prop does. It was keyed on `!!props.title` alone, so a dialog that
|
|
228
|
+
* only slotted its title rendered NO header at all and the declared slot was
|
|
229
|
+
* silently inert (v2 rendered it: the slot replaced the title text, and the
|
|
230
|
+
* header was not gated on the prop). `#header` stays separate below: it
|
|
231
|
+
* REPLACES the header rather than filling it, and owns its own close control.
|
|
232
|
+
*
|
|
233
|
+
* A function, not a computed, now that it reads a slot: `$slots` is not a
|
|
234
|
+
* reactive dependency, so a computed would latch its first value and miss a
|
|
235
|
+
* `#title` that appears later (a consumer's `<template v-if="…" #title>`).
|
|
236
|
+
* Evaluated per render it tracks the slot correctly — the same reason
|
|
237
|
+
* BbOffCanvas's twin is a function.
|
|
238
|
+
*/
|
|
239
|
+
const hasTitle = () => !!props.title || !!slots.title;
|
|
240
|
+
/*
|
|
241
|
+
* A description raises the header on its own — a describing line with no title
|
|
242
|
+
* is a legitimate shape, and gating the header on the title alone would drop
|
|
243
|
+
* it silently.
|
|
244
|
+
*/
|
|
245
|
+
const renderHeader = () => hasTitle() || hasDescription();
|
|
194
246
|
const hasRenderedAtLeastOnce: Ref<boolean> = useUntil(
|
|
195
247
|
() => model.value || props.eager,
|
|
196
248
|
{
|
|
@@ -426,6 +478,29 @@ const toggleDialog = async (value: boolean) => {
|
|
|
426
478
|
}
|
|
427
479
|
};
|
|
428
480
|
|
|
481
|
+
/*
|
|
482
|
+
* Q18.13 — `aria-labelledby` is bound to `titleId` as soon as a `#header` slot
|
|
483
|
+
* exists, but the slot content is the author's: nothing guarantees they put
|
|
484
|
+
* that id on their heading. A name pointing at a missing element is WORSE than
|
|
485
|
+
* no name — assistive tech announces the surface unnamed and the author has no
|
|
486
|
+
* signal. Binding conditionally is not possible (the attribute is computed
|
|
487
|
+
* before the slot renders), so warn once, in dev, after the header is in the
|
|
488
|
+
* DOM.
|
|
489
|
+
*/
|
|
490
|
+
const warnIfHeaderNameIsDangling = () => {
|
|
491
|
+
if (process.env.NODE_ENV === 'production') return;
|
|
492
|
+
// `props.title`, not `renderHeader` (which now also counts `#title`): a
|
|
493
|
+
// `#header` slot replaces the whole header, so the dangling-id risk is the
|
|
494
|
+
// same whatever else was passed. Keyed exactly like BbOffCanvas's twin.
|
|
495
|
+
if (!slots.header || props.title) return;
|
|
496
|
+
nextTick(() => {
|
|
497
|
+
if (!dialog.value || document.getElementById(titleId)) return;
|
|
498
|
+
useLogger().warn(
|
|
499
|
+
`BbDialog: the #header slot does not contain an element with id="${titleId}", so aria-labelledby points at nothing and the dialog announces as unnamed. Bind the slot's \`titleId\` to your heading: <template #header="{ titleId }"><h2 :id="titleId">…</h2></template>.`
|
|
500
|
+
);
|
|
501
|
+
});
|
|
502
|
+
};
|
|
503
|
+
|
|
429
504
|
watch(model, (value) => {
|
|
430
505
|
// Latch the surface at the moment we open, then freeze it: a resize across
|
|
431
506
|
// the mobile breakpoint mid-session must not swap dialog <-> drawer.
|
|
@@ -435,6 +510,7 @@ watch(model, (value) => {
|
|
|
435
510
|
});
|
|
436
511
|
onMounted(() => {
|
|
437
512
|
if (model.value && surface.value === 'dialog') toggleDialog(true);
|
|
513
|
+
warnIfHeaderNameIsDangling();
|
|
438
514
|
});
|
|
439
515
|
onBeforeUnmount(() => {
|
|
440
516
|
clearTimeout(denyCloseTimer);
|
|
@@ -507,6 +583,18 @@ export type { Sizes };
|
|
|
507
583
|
* Props controlling the BbDialog appearance, accessibility, and closing behaviour.
|
|
508
584
|
*/
|
|
509
585
|
export type BbDialogProps = {
|
|
586
|
+
/**
|
|
587
|
+
* One short line under the title, in the header — the shadcn
|
|
588
|
+
* `DialogDescription` shape: same block as the title, lower hierarchy,
|
|
589
|
+
* muted.
|
|
590
|
+
*
|
|
591
|
+
* It is also what `aria-describedby` points at. That wiring was dropped in
|
|
592
|
+
* v3 along with the old `description` prop, on the reasoning that pointing
|
|
593
|
+
* it at arbitrary body content would read whole forms aloud — true, and the
|
|
594
|
+
* reason it aims at THIS element only. Keep it to a sentence; anything
|
|
595
|
+
* longer belongs in the body.
|
|
596
|
+
*/
|
|
597
|
+
description?: string;
|
|
510
598
|
/**
|
|
511
599
|
* Disable EVERY user-initiated dismissal: backdrop click, Escape AND the
|
|
512
600
|
* header close (×) button (denied attempts play the deny nudge). Use it
|
|
@@ -540,7 +628,7 @@ export type BbDialogProps = {
|
|
|
540
628
|
/**
|
|
541
629
|
* Overrides merged over the offcanvas (mobile) surface's props. The drawer
|
|
542
630
|
* defaults to a bottom, draggable, content-sized sheet
|
|
543
|
-
* (`
|
|
631
|
+
* (`side: 'bottom'`, `draggable: true`, `size: 'auto'`); use this to
|
|
544
632
|
* override those, set other drawer-only options (`stackGap`), or override
|
|
545
633
|
* shared props whose meaning differs on the drawer (`stack`). Ignored on the
|
|
546
634
|
* desktop dialog surface.
|
|
@@ -615,12 +703,24 @@ export type BbDialogHeaderSlotProps = {
|
|
|
615
703
|
};
|
|
616
704
|
|
|
617
705
|
/** Props exposed by the `title` slot. */
|
|
706
|
+
/** Props exposed by the `description` slot. */
|
|
707
|
+
export type BbDialogDescriptionSlotProps = {
|
|
708
|
+
/** The `description` prop value. */
|
|
709
|
+
text: BbDialogProps['description'];
|
|
710
|
+
};
|
|
711
|
+
|
|
618
712
|
export type BbDialogTitleSlotProps = {
|
|
619
713
|
/** The `title` prop value. */
|
|
620
714
|
text: BbDialogProps['title'];
|
|
621
715
|
};
|
|
622
716
|
|
|
623
717
|
export type BbDialogSlots = {
|
|
718
|
+
/**
|
|
719
|
+
* Replaces the description text under the title. Renders the header even
|
|
720
|
+
* when `title` and `description` are unset — a slotted description is a
|
|
721
|
+
* description, the same rule `#title` follows.
|
|
722
|
+
*/
|
|
723
|
+
description?: (props: BbDialogDescriptionSlotProps) => any;
|
|
624
724
|
/** Primary body content of the dialog, rendered in the scrollable body area. */
|
|
625
725
|
default?: (props: BbDialogDefaultSlotProps) => any;
|
|
626
726
|
/** Content rendered in the dialog footer, below the body area. Typically used for action buttons. */
|
|
@@ -640,7 +740,11 @@ export type BbDialogSlots = {
|
|
|
640
740
|
* width, or it renders squeezed against the left edge.
|
|
641
741
|
*/
|
|
642
742
|
header?: (props: BbDialogHeaderSlotProps) => any;
|
|
643
|
-
/**
|
|
743
|
+
/**
|
|
744
|
+
* Replaces the default title text inside the header. Remains linked to the
|
|
745
|
+
* dialog through `aria-labelledby`. Providing this slot renders the header
|
|
746
|
+
* even when `title` is unset — a slotted title is a title.
|
|
747
|
+
*/
|
|
644
748
|
title?: (props: BbDialogTitleSlotProps) => any;
|
|
645
749
|
};
|
|
646
750
|
|
|
@@ -657,6 +761,13 @@ export type { BbDialogSlots as BaseDialogSlots };
|
|
|
657
761
|
```css
|
|
658
762
|
/* @inherit --transition-duration --max-width — set inline from props; @inherit --scrollbar-width — set on body by the scroll lock */
|
|
659
763
|
.bb-dialog {
|
|
764
|
+
/* Axis split of --bb-panel-p: --px (inline) / --py (block),
|
|
765
|
+
each branching off it. Set the pair only when the axes differ; setting
|
|
766
|
+
--bb-panel-p alone keeps them equal. Local on this root class (not
|
|
767
|
+
:root) so scoped --bb-panel-p overrides keep reaching the slots; for
|
|
768
|
+
per-part asymmetry, scope --py to the part class. */
|
|
769
|
+
--px: var(--bb-panel-p);
|
|
770
|
+
--py: var(--bb-panel-p);
|
|
660
771
|
--page-padding: 20px;
|
|
661
772
|
--transition-timing-function: var(--bb-ease);
|
|
662
773
|
|
|
@@ -751,26 +862,71 @@ export type { BbDialogSlots as BaseDialogSlots };
|
|
|
751
862
|
}
|
|
752
863
|
|
|
753
864
|
.bb-dialog__header {
|
|
865
|
+
/* Shared by the close control and by the space the title reserves for it,
|
|
866
|
+
* so the two can never drift apart. */
|
|
867
|
+
--close-size: 28px;
|
|
868
|
+
|
|
754
869
|
align-items: center;
|
|
755
870
|
column-gap: 12px;
|
|
756
871
|
display: flex;
|
|
757
872
|
flex-shrink: 0;
|
|
758
873
|
justify-content: space-between;
|
|
759
|
-
padding: var(--
|
|
760
|
-
var(--bb-panel-p);
|
|
874
|
+
padding: var(--py) var(--px) calc(var(--py) / 2) var(--px);
|
|
761
875
|
|
|
762
876
|
.bb-dialog__title {
|
|
763
877
|
font-size: var(--dialog-title-fs, calc(var(--bb-fs) + 2px));
|
|
764
878
|
font-weight: 500;
|
|
765
879
|
line-height: var(--dialog-title-fs, calc(var(--bb-fs) + 2px));
|
|
880
|
+
/* Long titles wrap rather than truncate — a dialog title is usually
|
|
881
|
+
* naming the record you are about to act on, so hiding the end of it
|
|
882
|
+
* is worse than a second line. `anywhere` because the thing that
|
|
883
|
+
* overflows is typically one unbroken id with nowhere to break. */
|
|
884
|
+
min-width: 0;
|
|
885
|
+
overflow-wrap: anywhere;
|
|
886
|
+
|
|
887
|
+
/* The close control is out of flow (below), so `column-gap` has
|
|
888
|
+
* nothing to push against and the title would run under it. Reserve
|
|
889
|
+
* the space here instead — only when there is actually a control to
|
|
890
|
+
* clear, so `hideClose` keeps the full width. */
|
|
891
|
+
&:has(~ .bb-close-button) {
|
|
892
|
+
padding-right: calc(var(--close-size) + 4px);
|
|
893
|
+
}
|
|
766
894
|
}
|
|
767
895
|
|
|
896
|
+
/* Absolute on purpose: pinned to the panel corner, so a title that wraps
|
|
897
|
+
* to two lines does not drag the × down with it, and the control never
|
|
898
|
+
* adds its 28px to the header's height (the title's line box sets that).
|
|
899
|
+
* The negative offsets align the ICON's edges with the padding box —
|
|
900
|
+
* the button's own `--p` sits outside it. */
|
|
768
901
|
> .bb-close-button {
|
|
769
|
-
--size:
|
|
902
|
+
--size: var(--close-size);
|
|
770
903
|
--p: 7px;
|
|
771
904
|
position: absolute;
|
|
772
|
-
right: calc(var(--
|
|
773
|
-
top: calc(var(--
|
|
905
|
+
right: calc(var(--px) - var(--p));
|
|
906
|
+
top: calc(var(--py) - var(--p));
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/* Only when a description is present. A header without one keeps its
|
|
910
|
+
original single-row, vertically-centred layout exactly — this must not
|
|
911
|
+
move any dialog that does not opt in. */
|
|
912
|
+
&:has(.bb-dialog__description) {
|
|
913
|
+
align-items: flex-start;
|
|
914
|
+
flex-direction: column;
|
|
915
|
+
row-gap: 2px;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.bb-dialog__description {
|
|
919
|
+
color: var(--bb-text-muted);
|
|
920
|
+
font-size: var(--bb-fs);
|
|
921
|
+
font-weight: 400;
|
|
922
|
+
line-height: 20px;
|
|
923
|
+
margin: 0;
|
|
924
|
+
/* Clears the absolutely-positioned close button the same way the title
|
|
925
|
+
does. The × sits at the top-right, and a one-line title is short
|
|
926
|
+
enough that the description's first line can still run under it. */
|
|
927
|
+
&:has(~ .bb-close-button) {
|
|
928
|
+
padding-right: calc(var(--close-size) + 4px);
|
|
929
|
+
}
|
|
774
930
|
}
|
|
775
931
|
}
|
|
776
932
|
|
|
@@ -781,20 +937,20 @@ export type { BbDialogSlots as BaseDialogSlots };
|
|
|
781
937
|
|
|
782
938
|
&:first-child {
|
|
783
939
|
.bb-dialog__body-content {
|
|
784
|
-
padding-top: var(--
|
|
940
|
+
padding-top: var(--py);
|
|
785
941
|
|
|
786
942
|
> .bb-close-button {
|
|
787
943
|
--size: 28px;
|
|
788
944
|
--p: 7px;
|
|
789
945
|
position: absolute;
|
|
790
|
-
right: calc(var(--
|
|
791
|
-
top: calc(var(--
|
|
946
|
+
right: calc(var(--px) - var(--p));
|
|
947
|
+
top: calc(var(--py) - var(--p));
|
|
792
948
|
}
|
|
793
949
|
}
|
|
794
950
|
}
|
|
795
951
|
|
|
796
952
|
&-content {
|
|
797
|
-
padding: 0px var(--
|
|
953
|
+
padding: 0px var(--px) var(--dialog-gap, var(--py));
|
|
798
954
|
}
|
|
799
955
|
|
|
800
956
|
/* Hide any nested dialogs that are not open so that scale transition works without affecting fixed positioning */
|
|
@@ -805,7 +961,7 @@ export type { BbDialogSlots as BaseDialogSlots };
|
|
|
805
961
|
|
|
806
962
|
.bb-dialog__footer {
|
|
807
963
|
border-top: 1px solid var(--bb-border);
|
|
808
|
-
padding: var(--dialog-gap, var(--
|
|
964
|
+
padding: var(--dialog-gap, var(--py)) var(--px);
|
|
809
965
|
pointer-events: auto;
|
|
810
966
|
|
|
811
967
|
&:empty {
|