bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.73
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 +2 -2
- package/bin/cli.mjs +9 -3
- package/dist/ai/BbAccordion.md +38 -19
- package/dist/ai/BbBadge.md +25 -22
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +32 -27
- package/dist/ai/BbCalendar.md +1 -0
- package/dist/ai/BbCarousel.md +6 -4
- package/dist/ai/BbCheckboxGroup.md +2 -1
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbConfirm.md +65 -81
- package/dist/ai/BbConfirmPortal.md +2 -2
- package/dist/ai/BbDatePicker.md +1 -6
- package/dist/ai/BbDatePickerInput.md +2 -2
- package/dist/ai/BbDialog.md +233 -164
- package/dist/ai/BbDropdown.md +52 -16
- package/dist/ai/BbDropdownButton.md +11 -12
- package/dist/ai/BbDropzone.md +12 -8
- package/dist/ai/BbForm.md +100 -13
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbIcon.md +1 -1
- package/dist/ai/BbIndicator.md +17 -15
- package/dist/ai/BbNumberInput.md +7 -5
- package/dist/ai/BbOffCanvas.md +29 -7
- package/dist/ai/BbPagination.md +2 -2
- package/dist/ai/BbPopover.md +15 -9
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +29 -7
- package/dist/ai/BbRating.md +8 -7
- package/dist/ai/BbSelect.md +29 -8
- package/dist/ai/BbSelectPopover.md +9 -3
- package/dist/ai/BbSlider.md +12 -8
- package/dist/ai/BbSpinner.md +3 -2
- package/dist/ai/BbSwitch.md +3 -3
- package/dist/ai/BbSwitchGroup.md +7 -6
- package/dist/ai/BbTable.md +205 -82
- package/dist/ai/BbTabs.md +29 -4
- package/dist/ai/BbTag.md +1 -1
- package/dist/ai/BbTextInput.md +7 -5
- package/dist/ai/BbTextarea.md +4 -3
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTooltip.md +22 -17
- package/dist/ai/BbTree.md +49 -24
- package/dist/ai/CommonFieldInput.md +1 -1
- package/dist/ai/changelog.json +242 -9
- package/dist/ai/components.json +52 -51
- package/dist/ai/composables/useBbDialog.md +5 -8
- package/dist/ai/composables/useBbForm.md +3 -0
- package/dist/ai/composables/useConfirm.md +65 -56
- package/dist/ai/composables/useToast.md +2 -1
- package/dist/ai/guides/agent-contract.md +3 -3
- package/dist/ai/guides/app-layout.md +3 -2
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/floating-bottom-panel.md +3 -2
- package/dist/ai/guides/icons-policy.md +7 -5
- package/dist/ai/guides/inertia-helpers.md +35 -30
- package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
- package/dist/ai/guides/migration/adoption-checklist.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +12 -1
- package/dist/ai/guides/migration/components/bb-button.md +24 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
- package/dist/ai/guides/migration/components/bb-toast.md +11 -0
- package/dist/ai/guides/migration/components/use-confirm.md +72 -26
- package/dist/ai/guides/migration/v2-to-v3.md +52 -10
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
- package/dist/ai/guides/options-items-playbook.md +4 -3
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/helpers/inertia/manifest.json +28 -15
- package/dist/ai/helpers/inertia/messages.ts +3 -3
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
- package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
- package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +3 -3
- package/dist/ai/manifest/components/BbAccordion.json +8 -5
- package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
- package/dist/ai/manifest/components/BbBadge.json +8 -7
- package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
- package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +5 -6
- package/dist/ai/manifest/components/BbButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbButton.tree.json +24 -7
- package/dist/ai/manifest/components/BbCalendar.json +2 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbColorInput.json +1 -1
- package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
- package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
- package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
- package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbDialog.json +6 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
- package/dist/ai/manifest/components/BbDropdown.json +9 -8
- package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +8 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbForm.json +3 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
- package/dist/ai/manifest/components/BbRating.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +16 -15
- package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
- package/dist/ai/manifest/components/BbSwitch.json +4 -4
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
- package/dist/ai/manifest/components/BbTable.json +15 -14
- package/dist/ai/manifest/components/BbTable.tree.json +2 -0
- package/dist/ai/manifest/components/BbTabs.json +3 -3
- package/dist/ai/manifest/components/BbTabsList.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
- package/dist/ai/manifest/components/BbTag.json +1 -1
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbToast.removed.json +2 -1
- package/dist/ai/manifest/components/BbTree.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
- package/dist/ai/manifest/index.json +4 -4
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +9 -9
- package/dist/ai/manifest/types.api.json +6 -5
- package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
- package/dist/ai/recipes/inertia/onboarding.md +23 -12
- package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
- package/dist/ai/recipes/inertia/record-form.md +12 -8
- package/dist/ai/recipes/inertia/records-workspace.md +14 -7
- package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
- package/dist/ai/recipes/inertia/upload-center.md +17 -9
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
- package/dist/ai/recipes/nuxt/onboarding.md +5 -4
- package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
- package/dist/ai/recipes/nuxt/record-form.md +14 -10
- package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
- package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
- package/dist/ai/recipes/nuxt/upload-center.md +17 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
- package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
- package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
- package/dist/ai/recipes/vue/onboarding.md +5 -4
- package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
- package/dist/ai/recipes/vue/record-form.md +14 -10
- package/dist/ai/recipes/vue/records-workspace.md +14 -7
- package/dist/ai/recipes/vue/settings-workspace.md +70 -60
- package/dist/ai/recipes/vue/upload-center.md +17 -9
- package/dist/ai/recipes/vue/wizard-form.md +4 -4
- package/dist/ai/source/BbAccordion.md +50 -16
- package/dist/ai/source/BbBadge.md +420 -26
- package/dist/ai/source/BbBadgeButton.md +378 -12
- package/dist/ai/source/BbButton.md +205 -55
- package/dist/ai/source/BbCalendar.md +5 -0
- package/dist/ai/source/BbCheckboxGroup.md +38 -13
- package/dist/ai/source/BbConfigScope.md +19 -2
- package/dist/ai/source/BbConfirm.md +74 -80
- package/dist/ai/source/BbConfirmPortal.md +6 -6
- package/dist/ai/source/BbDatePicker.md +9 -2
- package/dist/ai/source/BbDatePickerInput.md +3 -1
- package/dist/ai/source/BbDialog.md +53 -2
- package/dist/ai/source/BbDropdown.md +350 -98
- package/dist/ai/source/BbDropdownButton.md +20 -12
- package/dist/ai/source/BbDropdownGroup.md +136 -58
- package/dist/ai/source/BbForm.md +152 -11
- package/dist/ai/source/BbOffCanvas.md +53 -2
- package/dist/ai/source/BbPagination.md +1 -1
- package/dist/ai/source/BbRadioGroup.md +72 -10
- package/dist/ai/source/BbRating.md +30 -22
- package/dist/ai/source/BbSelect.md +11 -1
- package/dist/ai/source/BbSelectPopover.md +105 -34
- package/dist/ai/source/BbSwitch.md +23 -8
- package/dist/ai/source/BbSwitchGroup.md +67 -21
- package/dist/ai/source/BbTable.md +359 -48
- package/dist/ai/source/BbTabs.md +6 -0
- package/dist/ai/source/BbTabsList.md +10 -0
- package/dist/ai/source/BbTabsPanels.md +6 -0
- package/dist/ai/source/BbTabsRoot.md +6 -0
- package/dist/ai/source/BbTree.md +14 -4
- package/dist/ai/source/CommonFieldInput.md +2 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbAccordion/types.d.ts +21 -7
- package/dist/components/BbAccordion/types.js +1 -1
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
- package/dist/components/BbBadge/types.d.ts +15 -12
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
- package/dist/components/BbButton/types.d.ts +7 -6
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbCalendar/types.d.ts +5 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
- package/dist/components/BbCalendar/useDayGrid.js +1 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
- package/dist/components/BbConfirm/types.d.ts +5 -5
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbDatePicker/types.d.ts +5 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDatePickerInput/types.d.ts +2 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
- package/dist/components/BbDialog/overlayActions.js +94 -0
- package/dist/components/BbDialog/types.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +382 -332
- package/dist/components/BbDropdown/dropdownHandle.js +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +58 -48
- package/dist/components/BbDropdown/types.d.ts +107 -48
- package/dist/components/BbDropdown/types.js +2 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +71 -71
- package/dist/components/BbDropdownButton/types.d.ts +2 -4
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +241 -199
- package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
- package/dist/components/BbForm/recognizeValidation.js +55 -0
- package/dist/components/BbForm/validationError.d.ts +10 -0
- package/dist/components/BbForm/validationError.js +11 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
- package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
- package/dist/components/BbOffCanvas/types.d.ts +24 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
- package/dist/components/BbRadioGroup/types.d.ts +9 -3
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +112 -103
- package/dist/components/BbRating/types.d.ts +3 -2
- package/dist/components/BbSelect/BbSelect.vue.d.ts +9 -8
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/components/BbSelect/types.d.ts +8 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
- package/dist/components/BbSelectPopover/types.d.ts +10 -2
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
- package/dist/components/BbSwitchGroup/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
- package/dist/components/BbTable/BbTableDataRow.js +2 -1
- package/dist/components/BbTable/BbTableRowMenu.js +36 -0
- package/dist/components/BbTable/types.d.ts +32 -17
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbTabs/types.d.ts +6 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/BbTree/types.d.ts +8 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/composables/formSubmitLock.js +15 -8
- package/dist/composables/overlayRegistry.d.ts +5 -0
- package/dist/composables/overlayRegistry.js +154 -148
- package/dist/composables/useBbDropdown.d.ts +8 -0
- package/dist/composables/useBbDropdown.js +3 -1
- package/dist/composables/useBbTabs.js +138 -138
- package/dist/composables/useConfirm.d.ts +63 -52
- package/dist/composables/useConfirm.js +22 -18
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +7 -7
- package/dist/directives/bbDropdown.js +21 -14
- package/dist/directives/bbTooltip.d.ts +3 -3
- package/dist/directives/createPopoverDirective.js +57 -35
- package/dist/i18n/locales/ar.json +5 -1
- package/dist/i18n/locales/cs.json +5 -1
- package/dist/i18n/locales/da.json +5 -1
- package/dist/i18n/locales/de-CH.json +5 -1
- package/dist/i18n/locales/de.json +5 -1
- package/dist/i18n/locales/el.json +5 -1
- package/dist/i18n/locales/en-GB.json +5 -1
- package/dist/i18n/locales/en.json +5 -1
- package/dist/i18n/locales/es-MX.json +5 -1
- package/dist/i18n/locales/es.json +5 -1
- package/dist/i18n/locales/fa.json +5 -1
- package/dist/i18n/locales/fi.json +5 -1
- package/dist/i18n/locales/fr.json +5 -1
- package/dist/i18n/locales/he.json +5 -1
- package/dist/i18n/locales/hu.json +5 -1
- package/dist/i18n/locales/it.json +5 -1
- package/dist/i18n/locales/ja.json +5 -1
- package/dist/i18n/locales/ko.json +5 -1
- package/dist/i18n/locales/nb.json +5 -1
- package/dist/i18n/locales/nl.json +5 -1
- package/dist/i18n/locales/pl.json +5 -1
- package/dist/i18n/locales/pt-BR.json +5 -1
- package/dist/i18n/locales/pt-PT.json +5 -1
- package/dist/i18n/locales/ro.json +5 -1
- package/dist/i18n/locales/ru.json +5 -1
- package/dist/i18n/locales/sv.json +5 -1
- package/dist/i18n/locales/tr.json +5 -1
- package/dist/i18n/locales/uk.json +5 -1
- package/dist/i18n/locales/zh-CN.json +5 -1
- package/dist/i18n/locales/zh-HK.json +5 -1
- package/dist/i18n/locales/zh-TW.json +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/llms-full.txt +1997 -1151
- package/dist/llms-medium.txt +21 -18
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +5 -1
- package/dist/plugin.js +17 -40
- package/dist/pluginCore.js +30 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +26 -5
- package/dist/types/ActionButton.js +11 -0
- package/dist/types/ConfigDefaults.d.ts +34 -3
- package/dist/types/ConfigDefaults.js +14 -8
- package/dist/types/ItemPath.d.ts +33 -4
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/clickCount.js +14 -0
- package/dist/utilities/functions/hash.js +90 -3
- package/dist/utilities/functions/isEqual.js +61 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +0 -1
- package/llms.txt +2 -2
- package/package.json +12 -2
- package/scripts/README.md +43 -39
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/eslint-disable.mjs +5 -3
- package/scripts/lib/eslint-plugin.d.ts +2 -0
- package/scripts/lib/eslint-plugin.mjs +213 -1
- package/scripts/lib/helpers-add.mjs +21 -2
- package/scripts/lib/redundant-item-accessor.mjs +4 -1
- package/scripts/lib/release-results.mjs +180 -5
- package/scripts/lib/renamed-item-field.mjs +4 -1
- package/scripts/lib/tab-links.mjs +4 -1
- package/scripts/lib/tree-default-expandable.mjs +53 -0
- package/scripts/lib/validate-bb-markup.mjs +536 -52
|
@@ -247,7 +247,7 @@ import { useBbConfig } from 'bitboss-ui';
|
|
|
247
247
|
import { computed } from 'vue';
|
|
248
248
|
|
|
249
249
|
export type HelperMessages = {
|
|
250
|
-
leave: { title: string; text: string;
|
|
250
|
+
leave: { title: string; text: string; ok: string; cancel: string };
|
|
251
251
|
};
|
|
252
252
|
|
|
253
253
|
export const messages: Record<string, HelperMessages> = {
|
|
@@ -255,8 +255,8 @@ export const messages: Record<string, HelperMessages> = {
|
|
|
255
255
|
leave: {
|
|
256
256
|
title: 'Unsaved changes',
|
|
257
257
|
text: 'You have unsaved changes. Leave without saving?',
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
ok: 'Discard changes',
|
|
259
|
+
cancel: 'Keep editing',
|
|
260
260
|
},
|
|
261
261
|
},
|
|
262
262
|
};
|
|
@@ -2104,7 +2104,7 @@ export const usePromiseForm = <T extends Record<string, FormValue>>(
|
|
|
2104
2104
|
const { fn: send, loading: isSubmitting } = useLoading(
|
|
2105
2105
|
(method: Method, url: string, options: Options = {}): Promise<boolean> =>
|
|
2106
2106
|
// true: the server answered and the save went through. false: not
|
|
2107
|
-
// confirmed (cancelled, interrupted). Rejects with
|
|
2107
|
+
// confirmed (cancelled, interrupted). Rejects with a BbValidationError, or
|
|
2108
2108
|
// for an error page / a response that is not Inertia's
|
|
2109
2109
|
// (usePromiseRouter.ts, `settleVisit`).
|
|
2110
2110
|
settleVisit(
|
|
@@ -2157,9 +2157,9 @@ export const usePromiseForm = <T extends Record<string, FormValue>>(
|
|
|
2157
2157
|
> recipes follows one of those two shapes — copy them, not a bare `post(...)`.
|
|
2158
2158
|
|
|
2159
2159
|
**A summary line over the form is the page's, not the helper's.** The
|
|
2160
|
-
rejection tells the two failures apart:
|
|
2161
|
-
`form.errors`) or
|
|
2162
|
-
Inertia's). Word them in the `catch`:
|
|
2160
|
+
rejection tells the two failures apart: a `BbValidationError` (its bag, under
|
|
2161
|
+
`.errors`, already in `form.errors`) or any other `Error` (the server answered
|
|
2162
|
+
with something that is not Inertia's). Word them in the `catch`:
|
|
2163
2163
|
|
|
2164
2164
|
```ts
|
|
2165
2165
|
const failure = ref('');
|
|
@@ -2169,9 +2169,9 @@ const save = async () => {
|
|
|
2169
2169
|
await put(`/invoices/${invoice.id}`);
|
|
2170
2170
|
} catch (error) {
|
|
2171
2171
|
failure.value =
|
|
2172
|
-
error instanceof
|
|
2173
|
-
? '
|
|
2174
|
-
: '
|
|
2172
|
+
error instanceof BbValidationError
|
|
2173
|
+
? 'Check the highlighted fields.'
|
|
2174
|
+
: 'The save did not go through. Try again.';
|
|
2175
2175
|
}
|
|
2176
2176
|
};
|
|
2177
2177
|
```
|
|
@@ -2262,7 +2262,7 @@ const confirmDelete = (expense: Expense) =>
|
|
|
2262
2262
|
confirm({
|
|
2263
2263
|
variant: 'destructive',
|
|
2264
2264
|
title: `Delete ${expense.merchant}?`,
|
|
2265
|
-
|
|
2265
|
+
ok: {
|
|
2266
2266
|
text: 'Delete',
|
|
2267
2267
|
onClick: async () => {
|
|
2268
2268
|
try {
|
|
@@ -2290,13 +2290,13 @@ two share `settleVisit`):
|
|
|
2290
2290
|
(an optimistic toggle, an inline edit) is unknown on `false`**: put it back,
|
|
2291
2291
|
or reload, so the screen does not keep a value nothing confirmed. Two quick
|
|
2292
2292
|
edits interrupt each other, so this path is ordinary.
|
|
2293
|
-
- **Rejects** with the
|
|
2294
|
-
error, and with an `Error` on an error page Inertia 3 renders, a response
|
|
2293
|
+
- **Rejects** with a `BbValidationError` (the bag under `.errors`) on a
|
|
2294
|
+
validation error, and with an `Error` on an error page Inertia 3 renders, a response
|
|
2295
2295
|
that is not Inertia's (419, 423, an HTML 500), a network error, or an error
|
|
2296
2296
|
your own callback threw (or a promise it returned rejected). **Catch it**:
|
|
2297
2297
|
a `@click` that returns a rejected promise is an `Uncaught (in promise)`,
|
|
2298
2298
|
and in a confirm's `onClick` it rejects the `confirm()`. To read the bag,
|
|
2299
|
-
`error instanceof
|
|
2299
|
+
`error instanceof BbValidationError ? error.errors : null`, and toast when there is none (no
|
|
2300
2300
|
field will show it). With an `onError` option that already shows the error,
|
|
2301
2301
|
end the call with `.catch(() => {})`.
|
|
2302
2302
|
|
|
@@ -2328,6 +2328,7 @@ rejects an `Error`, not `{}`.
|
|
|
2328
2328
|
import { useLoading } from './useLoading';
|
|
2329
2329
|
import type { RequestPayload, VisitOptions } from '@inertiajs/core';
|
|
2330
2330
|
import { router } from '@inertiajs/vue3';
|
|
2331
|
+
import { BbValidationError } from 'bitboss-ui';
|
|
2331
2332
|
|
|
2332
2333
|
type Method = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
2333
2334
|
|
|
@@ -2379,7 +2380,8 @@ const sameRequest = (visit: Visit, config: NonNullable<RequestConfig>) =>
|
|
|
2379
2380
|
* leaves with `onFinish` only).
|
|
2380
2381
|
* - `false`: never sent (its `onBefore` or a `before` listener refused it),
|
|
2381
2382
|
* cancelled, interrupted, or held by the leave guard and then kept.
|
|
2382
|
-
* - Rejects with
|
|
2383
|
+
* - Rejects with a `BbValidationError` (the bag under `.errors`) on a
|
|
2384
|
+
* validation error, which a `BbForm` `@submit` applies on its own; with an `Error` on an
|
|
2383
2385
|
* error page (Inertia 3), a response that is not Inertia's (419, 423, an
|
|
2384
2386
|
* HTML 500) or a network error; with the error a callback of yours threw.
|
|
2385
2387
|
*
|
|
@@ -2461,7 +2463,10 @@ export const settleVisit = (
|
|
|
2461
2463
|
const decide = () =>
|
|
2462
2464
|
queueMicrotask(() => {
|
|
2463
2465
|
if (settled || started > finished) return;
|
|
2464
|
-
if (answer && answer !== 'page')
|
|
2466
|
+
if (answer && answer !== 'page')
|
|
2467
|
+
reject(
|
|
2468
|
+
new BbValidationError(answer.errors as Record<string, unknown>)
|
|
2469
|
+
);
|
|
2465
2470
|
// An error page Inertia rendered (a 403 / 500 with `x-inertia`)
|
|
2466
2471
|
// lands like a success: it is not a save.
|
|
2467
2472
|
else if (failedStatus !== null && answer === 'page')
|
|
@@ -2737,8 +2742,8 @@ type Options = {
|
|
|
2737
2742
|
* or a full button config. Default words: `leave` in `messages.ts`, in the
|
|
2738
2743
|
* library's `locale`; `variant: 'destructive'`.
|
|
2739
2744
|
*/
|
|
2740
|
-
|
|
2741
|
-
|
|
2745
|
+
ok?: BbConfirmMessage['ok'];
|
|
2746
|
+
cancel?: BbConfirmMessage['cancel'];
|
|
2742
2747
|
variant?: BbConfirmMessage['variant'];
|
|
2743
2748
|
/** The `BbDialog` stack the dialog joins (BbConfirm's `stack`). */
|
|
2744
2749
|
stack?: BbConfirmMessage['stack'];
|
|
@@ -2770,8 +2775,8 @@ export const useConfirmOnRouteLeave = ({
|
|
|
2770
2775
|
onLeave = () => true,
|
|
2771
2776
|
title,
|
|
2772
2777
|
text,
|
|
2773
|
-
|
|
2774
|
-
|
|
2778
|
+
ok,
|
|
2779
|
+
cancel,
|
|
2775
2780
|
variant = 'destructive',
|
|
2776
2781
|
stack,
|
|
2777
2782
|
}: Options = {}) => {
|
|
@@ -2824,15 +2829,15 @@ export const useConfirmOnRouteLeave = ({
|
|
|
2824
2829
|
const confirmed = await confirm({
|
|
2825
2830
|
title: title ?? words.title,
|
|
2826
2831
|
text: text ?? words.text,
|
|
2827
|
-
|
|
2828
|
-
|
|
2832
|
+
ok: ok ?? words.ok,
|
|
2833
|
+
cancel: cancel ?? words.cancel,
|
|
2829
2834
|
variant,
|
|
2830
2835
|
...(stack && { stack }),
|
|
2831
2836
|
});
|
|
2832
2837
|
// "Keep editing" (or an `onLeave` that throws) ends the held visit
|
|
2833
2838
|
// the way Inertia ends a cancelled one, so its own callbacks (a
|
|
2834
2839
|
// form's processing state, a pending promise) settle.
|
|
2835
|
-
const
|
|
2840
|
+
const cancelVisit = () => {
|
|
2836
2841
|
const callbacks = visit as {
|
|
2837
2842
|
onCancel?: () => void;
|
|
2838
2843
|
onFinish?: (visit: Visit) => void;
|
|
@@ -2840,12 +2845,12 @@ export const useConfirmOnRouteLeave = ({
|
|
|
2840
2845
|
callbacks.onCancel?.();
|
|
2841
2846
|
callbacks.onFinish?.({ ...visit, cancelled: true });
|
|
2842
2847
|
};
|
|
2843
|
-
if (!confirmed) return
|
|
2848
|
+
if (!confirmed) return cancelVisit();
|
|
2844
2849
|
|
|
2845
2850
|
try {
|
|
2846
2851
|
await onLeave(visit);
|
|
2847
2852
|
} catch (error) {
|
|
2848
|
-
|
|
2853
|
+
cancelVisit();
|
|
2849
2854
|
throw error;
|
|
2850
2855
|
}
|
|
2851
2856
|
// Re-sent as a plain visit: never as a prefetch or a background one,
|
|
@@ -2869,7 +2874,7 @@ export const useConfirmOnRouteLeave = ({
|
|
|
2869
2874
|
});
|
|
2870
2875
|
} catch (error) {
|
|
2871
2876
|
// A re-send that throws before it starts finishes as cancelled.
|
|
2872
|
-
|
|
2877
|
+
cancelVisit();
|
|
2873
2878
|
throw error;
|
|
2874
2879
|
} finally {
|
|
2875
2880
|
bypassNextVisit = false;
|
|
@@ -2949,7 +2954,7 @@ mean fighting Inertia's own history and scroll restore.
|
|
|
2949
2954
|
`messages.ts` (see [Shared types and utilities](#shared-types-and-utilities)),
|
|
2950
2955
|
which ships English only. Add your app's locale there once, keyed as you set
|
|
2951
2956
|
the library's `locale`, and every guard follows `setConfig({ locale })`; a
|
|
2952
|
-
locale with no entry falls back to English. `title` / `text` / `
|
|
2957
|
+
locale with no entry falls back to English. `title` / `text` / `ok` / `cancel`
|
|
2953
2958
|
passed to one guard still win over it.
|
|
2954
2959
|
|
|
2955
2960
|
> **`router.on(...)` subscribes to a global, module-level event bus — it
|
|
@@ -2967,7 +2972,7 @@ passed to one guard still win over it.
|
|
|
2967
2972
|
> scope.
|
|
2968
2973
|
|
|
2969
2974
|
The dialog's words and look are BbConfirm's own options — `title`, `text`,
|
|
2970
|
-
`
|
|
2975
|
+
`ok`, `cancel` (a label, or a full button config) and `variant` — defaulting to
|
|
2971
2976
|
English (`'Discard changes'` / `'Keep editing'`, `variant: 'destructive'`).
|
|
2972
2977
|
A localized app passes its own:
|
|
2973
2978
|
|
|
@@ -2976,8 +2981,8 @@ useConfirmOnRouteLeave({
|
|
|
2976
2981
|
disabled: () => !form.isDirty,
|
|
2977
2982
|
title: t('leave.title'),
|
|
2978
2983
|
text: t('leave.text'),
|
|
2979
|
-
|
|
2980
|
-
|
|
2984
|
+
ok: t('leave.discard'),
|
|
2985
|
+
cancel: t('leave.stay'),
|
|
2981
2986
|
});
|
|
2982
2987
|
```
|
|
2983
2988
|
|
|
@@ -772,15 +772,15 @@ Every key at every level is optional: write only what you change. The props
|
|
|
772
772
|
|
|
773
773
|
- `adaptive` (also through `all`): `BbColorInput`, `BbColorPalette`, `BbDatePicker`, `BbDatePickerInput`, `BbDialog`, `BbDropdown`, `BbPopover`, `BbSelect`, `BbSelectPopover`, `BbTimePicker`, `BbTimePickerInput`
|
|
774
774
|
- `autocomplete` (also through `all`): `BbColorInput`, `BbDatePickerInput`, `BbNumberInput`, `BbSelect`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
775
|
-
- `block` (also through `all`): `BbButton`, `BbCheckboxGroup`, `BbDropdownButton`, `BbRadioGroup`, `BbTabs`
|
|
776
|
-
- `compact` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbColorInput`, `BbDatePickerInput`, `BbDropdown`, `BbNumberInput`, `BbRadio`, `BbRadioGroup`, `BbRating`, `BbSelect`, `BbSelectPopover`, `BbSlider`, `BbTable`, `BbTabs`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
777
|
-
- `inputPosition` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbRadio`, `BbRadioGroup`, `BbRating`
|
|
778
|
-
- `itemLayout` (also through `all`): `BbCheckboxGroup`, `BbRadioGroup`
|
|
779
|
-
- `itemReverse` (also through `all`): `BbCheckboxGroup`, `BbRadioGroup`
|
|
775
|
+
- `block` (also through `all`): `BbButton`, `BbCheckboxGroup`, `BbDropdownButton`, `BbRadioGroup`, `BbSwitchGroup`, `BbTabs`
|
|
776
|
+
- `compact` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbColorInput`, `BbDatePickerInput`, `BbDropdown`, `BbNumberInput`, `BbRadio`, `BbRadioGroup`, `BbRating`, `BbSelect`, `BbSelectPopover`, `BbSlider`, `BbSwitch`, `BbSwitchGroup`, `BbTable`, `BbTabs`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
777
|
+
- `inputPosition` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbRadio`, `BbRadioGroup`, `BbRating`, `BbSwitch`, `BbSwitchGroup`
|
|
778
|
+
- `itemLayout` (also through `all`): `BbCheckboxGroup`, `BbRadioGroup`, `BbSwitchGroup`
|
|
779
|
+
- `itemReverse` (also through `all`): `BbCheckboxGroup`, `BbRadioGroup`, `BbSwitchGroup`
|
|
780
780
|
- `labelMode` (also through `all`): `BbColorInput`, `BbDatePickerInput`, `BbNumberInput`, `BbSelect`, `BbSlider`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
781
|
-
- `layout` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbColorInput`, `BbDatePickerInput`, `BbNumberInput`, `BbRadio`, `BbRadioGroup`, `BbRating`, `BbSelect`, `BbSlider`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
782
|
-
- `listLayout` (also through `all`): `BbCheckboxGroup`, `BbRadioGroup`
|
|
783
|
-
- `reverse` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbColorInput`, `BbDatePickerInput`, `BbNumberInput`, `BbRadio`, `BbRadioGroup`, `BbRating`, `BbSelect`, `BbSlider`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
781
|
+
- `layout` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbColorInput`, `BbDatePickerInput`, `BbNumberInput`, `BbRadio`, `BbRadioGroup`, `BbRating`, `BbSelect`, `BbSlider`, `BbSwitch`, `BbSwitchGroup`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
782
|
+
- `listLayout` (also through `all`): `BbCheckboxGroup`, `BbRadioGroup`, `BbSwitchGroup`
|
|
783
|
+
- `reverse` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbColorInput`, `BbDatePickerInput`, `BbNumberInput`, `BbRadio`, `BbRadioGroup`, `BbRating`, `BbSelect`, `BbSlider`, `BbSwitch`, `BbSwitchGroup`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
784
784
|
- `validationMode` (also through `all`): `BbCheckbox`, `BbCheckboxGroup`, `BbColorInput`, `BbDatePickerInput`, `BbDropzone`, `BbNumberInput`, `BbRadioGroup`, `BbRating`, `BbSelect`, `BbSlider`, `BbSwitch`, `BbSwitchGroup`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`
|
|
785
785
|
- `autoGrow`: `BbTextarea`
|
|
786
786
|
- `disableAutoLoading`: `BbButton`
|
|
@@ -804,6 +804,8 @@ The keys that are not props:
|
|
|
804
804
|
- `variants` (app-wide only): `BbAlert`, `BbBadge`, `BbButton`, `BbCheckboxGroup`, `BbColorInput`, `BbConfirm`, `BbDatePickerInput`, `BbDropdown`, `BbIndicator`, `BbNumberInput`, `BbRadioGroup`, `BbSelect`, `BbTabs`, `BbTag`, `BbTextInput`, `BbTextarea`, `BbTimePickerInput`, `BbToast`, `BbTooltip`
|
|
805
805
|
- `sizeMap`: `BbAvatar`, `BbDialog`, `BbIcon`, `BbOffCanvas`, `BbRating`
|
|
806
806
|
- `size`: `BbConfirm`
|
|
807
|
+
- `okProps`, `cancelProps`: `BbConfirm`, `BbDialog`, `BbOffCanvas`
|
|
808
|
+
- `isValidationError`: `BbForm`
|
|
807
809
|
- `position`: `BbToast`
|
|
808
810
|
- only in `all`: `requiredAsterisk`, `autoDisableWritingThreshold`, `popoverOffset`
|
|
809
811
|
|
|
@@ -834,8 +836,8 @@ change **types**: the plugin writes the registered names and the empty-value
|
|
|
834
836
|
policy into your project's `bitboss-ui.d.ts`, and TypeScript cannot know which
|
|
835
837
|
scope a template sits in. In a scope they are a type error, and a build error
|
|
836
838
|
(or a dev warning, inline) naming the path. A scope's size scales,
|
|
837
|
-
`BbToast.position` and `BbConfirm.size` do apply to
|
|
838
|
-
|
|
839
|
+
`BbToast.position` and `BbConfirm.size` do apply to the toasts and confirms
|
|
840
|
+
called inside it.
|
|
839
841
|
|
|
840
842
|
**`nullValue`: what an emptied text field emits.** `BbTextInput` /
|
|
841
843
|
`BbTextarea` emit `null` when they are emptied (typed empty, the clear button,
|
|
@@ -1650,17 +1652,18 @@ Every rule in `recommended`, in one line each. The whole list with the long expl
|
|
|
1650
1652
|
- `carousel-prop-or-local`: a `BbCarousel` layout prop and its CSS local together. Fix: keep one.
|
|
1651
1653
|
- `carousel-items-without-slide`: `BbCarousel` `items` objects with no `src` and no `#slide`. Fix: add either.
|
|
1652
1654
|
- `hidden-label-placeholder` (warn): a field or select with `hide-label` and no `placeholder`, an empty unlabelled box to a sighted user. Fix: add a `placeholder`.
|
|
1653
|
-
- `prefer-v-bb-dialog` (warn): a `ref(false)` that only a `BbDialog` / `BbOffCanvas` `v-model` and `@click="x = true"` use. Fix: an `id` on the dialog and `v-bb-dialog` on the trigger (autofixed when nothing else uses the ref
|
|
1654
|
-
- `no-dialog-in-panel`: `v-bb-dialog` / `v-bb-off-canvas` opening a component
|
|
1655
|
+
- `prefer-v-bb-dialog` (warn): a `ref(false)` that only a `BbDialog` / `BbOffCanvas` `v-model` and `@click="x = true"` use. Fix: an `id` on the dialog and `v-bb-dialog` on the trigger (autofixed when nothing else uses the ref).
|
|
1656
|
+
- `no-dialog-in-panel`: `v-bb-dialog` / `v-bb-off-canvas` opening a component inside a `BbSelect` / `BbSelectPopover` / `BbDropdown` panel slot, which unmounts as the panel closes. Fix: `useBbDialog(Component)` / `useBbOffCanvas(Component)` in setup and a plain `@click`.
|
|
1655
1657
|
- `no-unregistered-rule`: a `rules` name no `defineRule` in the project registers, or one whose registration it cannot read. Fix: register it with a literal name, or list it under `registeredRules` in `bitboss-ui.check.json`.
|
|
1656
1658
|
- `form-model`: `v-model` or `:model-value` on `BbForm`. Fix: `:model="draft"` (autofixed).
|
|
1657
1659
|
- `no-redundant-item-accessor` (warn): an `item-text` / `item-value` that restates the default. Fix: delete it (autofixed).
|
|
1658
|
-
- `require-slot-key` (warn): a computed slot name (`#[column.key]`) on `BbTable` and the other per-key slot components, over keys the rule cannot see, not spelled through `slotKey`. Fix: `#[slotKey(column.key)]
|
|
1660
|
+
- `require-slot-key` (warn): a computed slot name (`#[column.key]`) on `BbTable` and the other per-key slot components, over keys the rule cannot see, not spelled through `slotKey`. Fix: `#[slotKey(column.key)]`.
|
|
1659
1661
|
- `items-provider-context` (error) and `items-provider-reason` (warn): a positional `items` provider, and a provider that compares `reason` with one cause. Fix: take the one context object `({ query, reason, modelValue, signal })`, and check `reason !== 'search'`.
|
|
1660
1662
|
- `require-partner-prop`: an opt-in prop set without its required partner (`loading-text` without `loading`, `method` without `href`). Fix: add the partner.
|
|
1661
1663
|
- `no-conflicting-props`: two props that replace each other set together (`BbSlider` `items` beside `step` / `min` / `max`). Fix: remove the one you did not mean.
|
|
1664
|
+
- `table-columns-satisfies` (warn): BbTable columns annotated `BbTableColumn<Row>[]` lose the per-key check. Fix: `[...] satisfies Array<BbTableColumn<Row>>`.
|
|
1662
1665
|
- `valid-locale` (warn): a locale whose `-u-` extension the build plugin drops or does not honour (`fa-u-ca-gregorian`). Fix: the spelling the message names.
|
|
1663
|
-
- `static-plugin-options` (warn, `vite.config.*` / `nuxt.config.*` only): a plugin option the CLI reads
|
|
1666
|
+
- `static-plugin-options` (warn, `vite.config.*` / `nuxt.config.*` only): a plugin option the CLI reads as text (`ai`, `locale`, `components.<Component>.variants`…) written as a computed value; the CLI falls back. Fix: write the value out; for `ai` on one machine, `BITBOSS_UI_AI=0`.
|
|
1664
1667
|
|
|
1665
1668
|
`bitboss-ui check` has one finding with no ESLint twin, `object-items-without-text`: object `items` with no `item-text` where an item has neither `label` nor `text`. Fix: give each item a `label`, or set `item-text`. Two hints (a hand-rolled avatar or spinner) are advisory in `check` only.
|
|
1666
1669
|
|
|
@@ -111,7 +111,7 @@ Each row: what you will find, how to find it, and what to write instead.
|
|
|
111
111
|
- Keep `#option` for the row's content; the selection mark is the component's.
|
|
112
112
|
8. **A hand-built stepper: minus / plus buttons around a number, with your own increment and decrement code** → BbNumberInput (its slots get `{ increase, decrease }`) `[stepper]`
|
|
113
113
|
- Find: `rg -n -g '*.vue' '(increment|decrement|stepUp|stepDown)\s*\('` (in files that also match `<button`; skip files that match `<BbNumberInput`)
|
|
114
|
-
- Write: `<BbNumberInput v-model="qty" label="Quantity" :min="0"><template #append="{ increase }"><BbButton icon="lucide:plus" variant="ghost" @click="increase">More</BbButton></template></BbNumberInput>`
|
|
114
|
+
- Write: `<BbNumberInput v-model="qty" label="Quantity" :min="0"><template #append="{ increase }"><BbButton icon-only prepend:icon="lucide:plus" variant="ghost" @click="increase">More</BbButton></template></BbNumberInput>`
|
|
115
115
|
- Arrow keys, clamping to `min` / `max`, `step` and locale formatting come with the field.
|
|
116
116
|
9. **A hand-built notice box: a styled `<div role="status">` / `role="alert"`** → BbAlert `[notice]`
|
|
117
117
|
- Find: `rg -n -g '*.vue' '<(div|p|section|aside)\b[^>]*role=.(status|alert).'` (skip a hit when it or the next 3 lines match `<BbSpinner\b|<bb-spinner\b`)
|
|
@@ -143,7 +143,7 @@ Each row: what you will find, how to find it, and what to write instead.
|
|
|
143
143
|
|
|
144
144
|
- Find: `rg -n -g '*.{vue,ts,js}' 'confirm\(\{'` (in files that also match `[Dd]elete|[Rr]emove|[Ee]limina|[Cc]ancella`; skip files that match `variant:\s*.destructive.`)
|
|
145
145
|
- Write: `const ok = await confirm({ title: 'Delete invoice?', variant: 'destructive' });`
|
|
146
|
-
- The
|
|
146
|
+
- The OK button takes the variant too. A row menu's delete item takes `variant: 'destructive'` on the item.
|
|
147
147
|
|
|
148
148
|
14. **Your own mobile check: a `useIsMobile`, `window.matchMedia(…)` or an `innerWidth` comparison deciding layout** → `useMobile()` from bitboss-ui `[media-query]`
|
|
149
149
|
|
|
@@ -30,7 +30,7 @@ re-express it with the new badge's `variant` API.
|
|
|
30
30
|
```diff
|
|
31
31
|
- <BbBadge :content="unread" color="#dc2626" floating>
|
|
32
32
|
+ <BbIndicator :text="unread" :max="99" variant="destructive">
|
|
33
|
-
<BbButton icon="lucide:bell" variant="ghost" />
|
|
33
|
+
<BbButton icon-only prepend:icon="lucide:bell" text="Notifications" variant="ghost" />
|
|
34
34
|
- </BbBadge>
|
|
35
35
|
+ </BbIndicator>
|
|
36
36
|
```
|
|
@@ -130,3 +130,14 @@ inline padding moved onto the side wrappers (via new `--pad-left` /
|
|
|
130
130
|
`--pad-right` custom properties) so each hit area runs flush to the border, and
|
|
131
131
|
the clear button's hover wash moved from the button onto its glyph, so the
|
|
132
132
|
button can span the full pill height while only the circle looks interactive.
|
|
133
|
+
|
|
134
|
+
## `icon` is `icon-only` (after beta.72)
|
|
135
|
+
|
|
136
|
+
An icon-only badge is `icon-only` with its icon in `prepend:icon` (or
|
|
137
|
+
`#prepend:icon`); the default slot stays its visually hidden label. The
|
|
138
|
+
`icon` prop and the `#icon` slot are gone.
|
|
139
|
+
|
|
140
|
+
```diff
|
|
141
|
+
- <BbBadge icon="lucide:star">Featured</BbBadge>
|
|
142
|
+
+ <BbBadge icon-only prepend:icon="lucide:star">Featured</BbBadge>
|
|
143
|
+
```
|
|
@@ -15,6 +15,7 @@ summary: Async click handlers now auto-track loading (behavior flip), built-in t
|
|
|
15
15
|
| `variant?: string`-ish | `variant?: ButtonVariantType` (default `primary`) | unregistered names are now compile errors; `none` opts out |
|
|
16
16
|
| `size` | `Responsive<Sizes>`, gains `'2xl'` | additive; per-breakpoint maps use `{ default: 'md', lg: 'xl' }` |
|
|
17
17
|
| `tag: string` | `'button' \| 'div' \| 'span' \| 'label'` | narrowed to the tags the button actually supports |
|
|
18
|
+
| `icon`, `#icon` | `icon-only` + `prepend:icon` / `#prepend:icon` | the label is always written: it stays the accessible name |
|
|
18
19
|
|
|
19
20
|
## The loading flip
|
|
20
21
|
|
|
@@ -170,6 +171,29 @@ A **per-instance** retint (this one button, not the whole variant) is the
|
|
|
170
171
|
shared locals on `.bb-button`: `--bg`, `--fg`, `--bg-hover`, `--bg-pressed`,
|
|
171
172
|
`--border-color`, `--ring-color`. Those are not the v2 names except `--border-color` and `--ring-color` (v3 betas up to beta.33 spelled the latter `--ring`).
|
|
172
173
|
|
|
174
|
+
## `icon` is `icon-only` (after beta.72)
|
|
175
|
+
|
|
176
|
+
A button always writes its label now. `icon-only` shows just its icon (the
|
|
177
|
+
`prepend:icon` one when it has both) and keeps the label as the accessible
|
|
178
|
+
name, visually hidden. The `icon` prop and the `#icon` slot are gone.
|
|
179
|
+
|
|
180
|
+
```diff
|
|
181
|
+
- <BbButton icon="lucide:trash-2" aria-label="Delete" />
|
|
182
|
+
+ <BbButton icon-only prepend:icon="lucide:trash-2" text="Delete" />
|
|
183
|
+
|
|
184
|
+
- <BbButton icon="lucide:x">Close</BbButton>
|
|
185
|
+
+ <BbButton icon-only prepend:icon="lucide:x">Close</BbButton>
|
|
186
|
+
|
|
187
|
+
- <template #icon><MyGlyph /></template>
|
|
188
|
+
+ <template #prepend:icon><MyGlyph /></template>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
`icon-only` also takes a breakpoint map, switched by CSS alone (SSR-safe):
|
|
192
|
+
`:icon-only="{ default: true, md: false }"` shows the icon below 768px and
|
|
193
|
+
the label from there up. The icon-only glyph is now `.bb-button__prepend-icon`
|
|
194
|
+
(was `.bb-button__icon`). `check` flags `icon=` and `#icon`; there is no
|
|
195
|
+
automatic fix, because the label has to be written.
|
|
196
|
+
|
|
173
197
|
## `loading-text` was never a BbButton prop
|
|
174
198
|
|
|
175
199
|
Not in v2, not in v3. If you find `loading-text` on a v2 button it was landing
|
|
@@ -59,3 +59,14 @@ A leading group, array or submenu item no longer throws: it is a menu row.
|
|
|
59
59
|
The prop that swaps the split toggle's chevron is named after the part it
|
|
60
60
|
sits in: `right:icon="lucide:ellipsis"` becomes `toggle:icon="lucide:ellipsis"`.
|
|
61
61
|
`npx bitboss-ui check --fix` rewrites it.
|
|
62
|
+
|
|
63
|
+
## `icon` is `icon-only` (after beta.72)
|
|
64
|
+
|
|
65
|
+
The main button follows BbButton: `icon` and the `#icon` slot are gone;
|
|
66
|
+
write `icon-only` with `prepend:icon` (or `#prepend:icon`) and keep the
|
|
67
|
+
label. `toggle:icon` is unchanged.
|
|
68
|
+
|
|
69
|
+
```diff
|
|
70
|
+
- <BbDropdownButton icon="lucide:plus" :items="items">New</BbDropdownButton>
|
|
71
|
+
+ <BbDropdownButton icon-only prepend:icon="lucide:plus" :items="items">New</BbDropdownButton>
|
|
72
|
+
```
|
|
@@ -58,12 +58,12 @@ right to left the start is the right edge, where `#wrapper:prepend` sits.
|
|
|
58
58
|
- <template #wrapper:prepend="{ canScrollLeft, scroll }">
|
|
59
59
|
- <BbButton :disabled="!canScrollLeft" icon="lucide:chevron-left" @click="scroll('left')" />
|
|
60
60
|
+ <template #wrapper:prepend="{ canScrollStart, scroll }">
|
|
61
|
-
+ <BbButton :disabled="!canScrollStart" class="rtl:-scale-x-100" icon="lucide:chevron-left" @click="scroll('start')" />
|
|
61
|
+
+ <BbButton :disabled="!canScrollStart" class="rtl:-scale-x-100" icon-only prepend:icon="lucide:chevron-left" text="Scroll back" @click="scroll('start')" />
|
|
62
62
|
</template>
|
|
63
63
|
- <template #wrapper:append="{ canScrollRight, scroll }">
|
|
64
64
|
- <BbButton :disabled="!canScrollRight" icon="lucide:chevron-right" @click="scroll('right')" />
|
|
65
65
|
+ <template #wrapper:append="{ canScrollEnd, scroll }">
|
|
66
|
-
+ <BbButton :disabled="!canScrollEnd" class="rtl:-scale-x-100" icon="lucide:chevron-right" @click="scroll('end')" />
|
|
66
|
+
+ <BbButton :disabled="!canScrollEnd" class="rtl:-scale-x-100" icon-only prepend:icon="lucide:chevron-right" text="Scroll forward" @click="scroll('end')" />
|
|
67
67
|
</template>
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -90,3 +90,14 @@ custom looks register through the plugin's `components.BbToast.variants` option
|
|
|
90
90
|
The card edge is a `border` (after 3.0.0-beta.63): a `box-shadow` override or
|
|
91
91
|
`--bb-shadow: none` no longer takes it away, and a `border` set on
|
|
92
92
|
`.bb-toast__panel` replaces it ([main guide §6 item 103](../v2-to-v3.md)).
|
|
93
|
+
|
|
94
|
+
## An icon-only action writes its label (after beta.72)
|
|
95
|
+
|
|
96
|
+
An `actions` entry has no `icon` field any more. An icon-only button writes
|
|
97
|
+
`text`, `'prepend:icon'` and `iconOnly: true`; the text becomes its accessible
|
|
98
|
+
name. The same holds for confirm buttons.
|
|
99
|
+
|
|
100
|
+
```diff
|
|
101
|
+
- toast({ title: 'Deleted', actions: [{ icon: 'lucide:undo-2', onClick: restore }] });
|
|
102
|
+
+ toast({ title: 'Deleted', actions: [{ text: 'Undo', 'prepend:icon': 'lucide:undo-2', iconOnly: true, onClick: restore }] });
|
|
103
|
+
```
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 'Migration v2→v3: confirm() / useConfirm'
|
|
3
|
-
summary: yesText/onYes/noText/onNo collapse into
|
|
3
|
+
summary: yes/yesText/onYes and no/noText/onNo collapse into ok/cancel configs, actions becomes an array-or-false, theme→variant, timeout→duration, autoClose flips to default-true, labels are localized, footer buttons default md.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `confirm()` / `useConfirm` — v2 → v3
|
|
7
7
|
|
|
8
8
|
## Options
|
|
9
9
|
|
|
10
|
-
| v2 | v3 | Kind
|
|
11
|
-
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
12
|
-
| `yes?: boolean`, `yesText?: string`, `onYes?: () => …` | `
|
|
13
|
-
| `no?: boolean`, `noText?: string`, `onNo?: () => …` | `
|
|
14
|
-
| `actions?: boolean` | `actions?: false \| ConfirmButtonConfig[]` | `false` hides the footer; an array replaces the
|
|
15
|
-
| default labels `"OK"` / `"Annulla"` (hard-coded) | localized via the active `locale` | **⚠ silent** — English apps stop showing Italian "Annulla"; apps that _wanted_ the literals must pass them
|
|
16
|
-
| footer buttons `lg` | footer buttons default `md` | visual
|
|
17
|
-
| `size` | `size?: keyof DialogSizes` — forwards to `BbDialog` | see the dialog width change in [main guide §2](../v2-to-v3.md)
|
|
18
|
-
| `theme?: string` | `variant?: ConfirmVariantType` (built-ins `default`, `destructive`) | typed rename — unregistered names are a compile error; add yours via the plugin's `variants.confirm`
|
|
19
|
-
| `timeout?: number` | `duration?: number` | rename — auto-dismisses, resolves `false` quietly (no `
|
|
20
|
-
| `autoClose?: boolean` — **opt-in**, omitted means the dialog stays open | `autoClose?: boolean` — **default `true`** | **⚠ silent behavior flip** — see [Requests and `close()`](#requests-and-close) below
|
|
21
|
-
| `hideHeader?: boolean` (a union that made `title` required when `false`) | removed — `title` is plain optional; omit it and no header renders | removed
|
|
22
|
-
| `useConfirm().setLoading(value)` | removed — busy state is driven by the button's `onClick` promise | removed — `useConfirm()` now returns `{ confirm, close, dismissAll }`
|
|
23
|
-
| — | `hideClose`, `portal` / `data` (mutually exclusive with `text`) | additive
|
|
24
|
-
| second `confirm()` while one is open: first promise **never settled** (hung forever) | the second covers the first, which stays pending and comes back when the second closes; both are asked, newest first | **⚠ behavioral** (after 3.0.0-beta.62; it used to resolve the first `false`)
|
|
10
|
+
| v2 | v3 | Kind |
|
|
11
|
+
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
12
|
+
| `yes?: boolean`, `yesText?: string`, `onYes?: () => …` | `ok?: boolean \| string \| ConfirmButtonConfig` (`{ text, variant, size, 'prepend:icon'?, iconOnly?, onClick? }`) | collapsed and renamed — `yes: false` becomes `ok: false` (still hides the button); `yesText`/`onYes` move into the config |
|
|
13
|
+
| `no?: boolean`, `noText?: string`, `onNo?: () => …` | `cancel?: boolean \| string \| ConfirmButtonConfig` | collapsed and renamed — `no: false` becomes `cancel: false` (still hides the button) |
|
|
14
|
+
| `actions?: boolean` | `actions?: false \| ConfirmButtonConfig[]` | `false` hides the footer; an array replaces the OK/Cancel pair with custom buttons |
|
|
15
|
+
| default labels `"OK"` / `"Annulla"` (hard-coded) | localized via the active `locale` | **⚠ silent** — English apps stop showing Italian "Annulla"; apps that _wanted_ the literals must pass them |
|
|
16
|
+
| footer buttons `lg` | footer buttons default `md` | visual |
|
|
17
|
+
| `size` | `size?: keyof DialogSizes` — forwards to `BbDialog` | see the dialog width change in [main guide §2](../v2-to-v3.md) |
|
|
18
|
+
| `theme?: string` | `variant?: ConfirmVariantType` (built-ins `default`, `destructive`) | typed rename — unregistered names are a compile error; add yours via the plugin's `variants.confirm` |
|
|
19
|
+
| `timeout?: number` | `duration?: number` | rename — auto-dismisses, resolves `false` quietly (no `cancel.onClick`), and implicitly forces `autoClose: true` |
|
|
20
|
+
| `autoClose?: boolean` — **opt-in**, omitted means the dialog stays open | `autoClose?: boolean` — **default `true`** | **⚠ silent behavior flip** — see [Requests and `close()`](#requests-and-close) below |
|
|
21
|
+
| `hideHeader?: boolean` (a union that made `title` required when `false`) | removed — `title` is plain optional; omit it and no header renders | removed |
|
|
22
|
+
| `useConfirm().setLoading(value)` | removed — busy state is driven by the button's `onClick` promise | removed — `useConfirm()` now returns `{ confirm, close, dismissAll }` |
|
|
23
|
+
| — | `hideClose`, `portal` / `data` (mutually exclusive with `text`) | additive |
|
|
24
|
+
| second `confirm()` while one is open: first promise **never settled** (hung forever) | the second covers the first, which stays pending and comes back when the second closes; both are asked, newest first | **⚠ behavioral** (after 3.0.0-beta.62; it used to resolve the first `false`) |
|
|
25
25
|
|
|
26
26
|
`title`, `text`, and the returned promise semantics otherwise carry over.
|
|
27
27
|
`autoClose` does **not** — see its row above.
|
|
28
28
|
|
|
29
|
-
Grep for the collapsed keys: `rg -n 'yesText|noText|onYes|onNo|hideHeader|setLoading|autoClose|timeout' --type ts --type js --type vue`.
|
|
29
|
+
Grep for the collapsed keys: `rg -n 'yes|no:|yesText|noText|onYes|onNo|hideHeader|setLoading|autoClose|timeout' --type ts --type js --type vue`.
|
|
30
30
|
TypeScript catches all of them (excess-property checks on the options literal,
|
|
31
31
|
a hard property error on `setLoading`); a JS app gets no signal at all.
|
|
32
32
|
|
|
@@ -42,13 +42,13 @@ a hard property error on `setLoading`); a JS app gets no signal at all.
|
|
|
42
42
|
+ const ok = await confirm({
|
|
43
43
|
+ title: 'Delete record?',
|
|
44
44
|
+ variant: 'destructive',
|
|
45
|
-
+
|
|
46
|
-
+
|
|
45
|
+
+ ok: { text: 'Delete', variant: 'destructive', onClick: destroy },
|
|
46
|
+
+ cancel: 'Keep',
|
|
47
47
|
+ });
|
|
48
48
|
|
|
49
49
|
<!-- hide ONE button -->
|
|
50
50
|
- confirm({ title: '…', yes: false }) // v2 boolean
|
|
51
|
-
+ confirm({ title: '…',
|
|
51
|
+
+ confirm({ title: '…', ok: false }) // still hides just the OK button
|
|
52
52
|
|
|
53
53
|
<!-- hide the footer entirely -->
|
|
54
54
|
- confirm({ title: '…', actions: false }) // v2 boolean
|
|
@@ -56,8 +56,8 @@ a hard property error on `setLoading`); a JS app gets no signal at all.
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
**Do not "migrate" `yes: false` to `actions: false`.** They are different:
|
|
59
|
-
`
|
|
60
|
-
drops the whole footer.
|
|
59
|
+
`ok: false` drops the OK button and keeps Cancel, `actions: false`
|
|
60
|
+
drops the whole footer.
|
|
61
61
|
|
|
62
62
|
If you only ever called `confirm('Are you sure?')`, nothing changes except the
|
|
63
63
|
(localized) button labels and their size.
|
|
@@ -66,7 +66,7 @@ If you only ever called `confirm('Are you sure?')`, nothing changes except the
|
|
|
66
66
|
|
|
67
67
|
A v2 confirm stayed up after it resolved, so a delete awaited it, ran the
|
|
68
68
|
request, and called `close()` from the request's callbacks. In v3 the request
|
|
69
|
-
goes in `
|
|
69
|
+
goes in `ok.onClick`: OK spins while it runs and the dialog closes when it
|
|
70
70
|
settles; a rejection rejects `confirm()` and closes the dialog too. An Inertia
|
|
71
71
|
visit returns no promise, so wrap it (the wrapper in
|
|
72
72
|
[useConfirm § async work](../../../composables/useConfirm.md)).
|
|
@@ -77,7 +77,7 @@ visit returns no promise, so wrap it (the wrapper in
|
|
|
77
77
|
+ await confirm({
|
|
78
78
|
+ title: 'Delete invoice?',
|
|
79
79
|
+ variant: 'destructive',
|
|
80
|
-
+
|
|
80
|
+
+ ok: { text: 'Delete', onClick: () => destroy(url) },
|
|
81
81
|
+ });
|
|
82
82
|
```
|
|
83
83
|
|
|
@@ -97,14 +97,14 @@ in the same dialog.
|
|
|
97
97
|
do not relocate it onto `.bb-dialog__content`.
|
|
98
98
|
|
|
99
99
|
The cancel button is the one that lost its hook. Restyle it per call instead of
|
|
100
|
-
in CSS — v3 defaults it to `size: 'md', variant: 'outline'`, and the
|
|
100
|
+
in CSS — v3 defaults it to `size: 'md', variant: 'outline'`, and the OK button
|
|
101
101
|
to `primary` (or `destructive` when the confirm `variant` is `destructive`):
|
|
102
102
|
|
|
103
103
|
```diff
|
|
104
104
|
- .bb-confirm .bb-base-dialog__footer .bb-confirm__no:hover:not(:disabled) {
|
|
105
105
|
- --color: var(--bb-primary);
|
|
106
106
|
- }
|
|
107
|
-
+ confirm({ title: '…',
|
|
107
|
+
+ confirm({ title: '…', cancel: { text: 'Keep', variant: 'ghost' } });
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
For a whole-skin change, register a confirm variant and hang the rules off
|
|
@@ -118,3 +118,49 @@ promise resolves `false` — quietly, no button callback runs, like
|
|
|
118
118
|
`dismissAll()` — and DEV warns. A host back within the second keeps the
|
|
119
119
|
dialog. Calling `confirm()` with no host at all resolves `false` after the
|
|
120
120
|
same second (DEV warns).
|
|
121
|
+
|
|
122
|
+
## `yes` / `no` are `ok` / `cancel` (after beta.72)
|
|
123
|
+
|
|
124
|
+
The confirm buttons take the names the dialog buttons use. A rename, no
|
|
125
|
+
alias: the old keys are a type error, and in JS they are ignored (the
|
|
126
|
+
default buttons show).
|
|
127
|
+
|
|
128
|
+
| beta.72 | now |
|
|
129
|
+
| -------------------------------------------- | -------------------------------------------- |
|
|
130
|
+
| `yes` | `ok` (also takes `true`: the default label) |
|
|
131
|
+
| `no` | `cancel` (same) |
|
|
132
|
+
| `dismissAsNo` | `dismissAsCancel` |
|
|
133
|
+
| `<BbConfirmPortal>` slot `{ yes, no, data }` | `{ ok, cancel, data }` |
|
|
134
|
+
| a button's `icon: 'lucide:x'` (no label) | `text` + `'prepend:icon'` + `iconOnly: true` |
|
|
135
|
+
|
|
136
|
+
```diff
|
|
137
|
+
await confirm({
|
|
138
|
+
title: 'Delete invoice?',
|
|
139
|
+
variant: 'destructive',
|
|
140
|
+
- yes: { text: 'Delete', onClick: () => remove(url) },
|
|
141
|
+
- no: 'Keep',
|
|
142
|
+
- dismissAsNo: false,
|
|
143
|
+
+ ok: { text: 'Delete', onClick: () => remove(url) },
|
|
144
|
+
+ cancel: 'Keep',
|
|
145
|
+
+ dismissAsCancel: false,
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
- <template #default="{ yes }"><BbButton @click="yes">Got it</BbButton></template>
|
|
149
|
+
+ <template #default="{ ok }"><BbButton @click="ok">Got it</BbButton></template>
|
|
150
|
+
|
|
151
|
+
- actions: [{ icon: 'lucide:x', onClick: dismiss }]
|
|
152
|
+
+ actions: [{ text: 'Close', 'prepend:icon': 'lucide:x', iconOnly: true, onClick: dismiss }]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
An icon-only button always writes its `text`: it becomes the button's
|
|
156
|
+
accessible name. The footer order is unchanged (Cancel, then OK). The
|
|
157
|
+
plugin's `components.BbConfirm.okProps` / `.cancelProps` set the look of every confirm's
|
|
158
|
+
buttons (`text`, `variant`, `size`, icons, `iconOnly`, `block`).
|
|
159
|
+
|
|
160
|
+
The Inertia helpers' `usePromiseRouter` / `usePromiseForm` reject with a
|
|
161
|
+
`BbValidationError` on a validation error (the bag under `.errors`) instead of
|
|
162
|
+
the bare bag; a `.catch` that read the bag reads `error.errors`.
|
|
163
|
+
`BbValidationError` extends `Error`, so a `.catch` that took
|
|
164
|
+
`error instanceof Error` to mean "not a validation error" now catches 422s
|
|
165
|
+
too: test `error instanceof BbValidationError` first. Their
|
|
166
|
+
`useConfirmOnRouteLeave` takes `ok` / `cancel` too.
|