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
|
@@ -33,24 +33,15 @@
|
|
|
33
33
|
/>
|
|
34
34
|
</Transition>
|
|
35
35
|
<!-- `passthrough.icon` is a BROADCAST: the same binding lands on whichever content
|
|
36
|
-
icons render (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
same class, so `pt:icon`, `--icon-size` and the spinner swap hold.
|
|
36
|
+
icons render (one or both). Bound LAST on each so a consumer
|
|
37
|
+
attribute beats ours and a consumer class appends. An icon slot
|
|
38
|
+
beats its prop and renders INSIDE the part, a box of the
|
|
39
|
+
same class, so `pt:icon`, `--icon-size` and the spinner swap hold.
|
|
40
|
+
`icon-only` is CSS alone: the label is hidden
|
|
41
|
+
but stays the name, and the append icon goes when a prepend one is
|
|
42
|
+
there, so a breakpoint can switch it with no render. -->
|
|
40
43
|
<span
|
|
41
|
-
v-if="slots
|
|
42
|
-
class="bb-button__icon bb-button__icon-slot"
|
|
43
|
-
v-bind="passthrough.icon"
|
|
44
|
-
><slot name="icon" v-bind="iconScope"
|
|
45
|
-
/></span>
|
|
46
|
-
<BbIcon
|
|
47
|
-
v-else-if="props['icon']"
|
|
48
|
-
class="bb-button__icon"
|
|
49
|
-
:icon="props['icon']"
|
|
50
|
-
v-bind="passthrough.icon"
|
|
51
|
-
/>
|
|
52
|
-
<span
|
|
53
|
-
v-else-if="slots['prepend:icon']"
|
|
44
|
+
v-if="slots['prepend:icon']"
|
|
54
45
|
class="bb-button__prepend-icon bb-button__icon-slot"
|
|
55
46
|
v-bind="passthrough.icon"
|
|
56
47
|
><slot name="prepend:icon" v-bind="iconScope"
|
|
@@ -63,7 +54,7 @@
|
|
|
63
54
|
/>
|
|
64
55
|
<span
|
|
65
56
|
class="bb-button__text"
|
|
66
|
-
:class="{ 'bb-sr-only': iconOnly }"
|
|
57
|
+
:class="{ 'bb-sr-only': props.iconOnly === true }"
|
|
67
58
|
v-bind="passthrough.text"
|
|
68
59
|
><slot v-bind="linkState">{{ text }}</slot></span
|
|
69
60
|
>
|
|
@@ -71,27 +62,26 @@
|
|
|
71
62
|
t('common.loadingText')
|
|
72
63
|
}}</span>
|
|
73
64
|
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/>
|
|
87
|
-
</template>
|
|
65
|
+
<span
|
|
66
|
+
v-if="slots['append:icon']"
|
|
67
|
+
class="bb-button__append-icon bb-button__icon-slot"
|
|
68
|
+
v-bind="passthrough.icon"
|
|
69
|
+
><slot name="append:icon" v-bind="iconScope"
|
|
70
|
+
/></span>
|
|
71
|
+
<BbIcon
|
|
72
|
+
v-else-if="props['append:icon']"
|
|
73
|
+
class="bb-button__append-icon"
|
|
74
|
+
:icon="props['append:icon']"
|
|
75
|
+
v-bind="passthrough.icon"
|
|
76
|
+
/>
|
|
88
77
|
</BbBaseButton>
|
|
89
78
|
</template>
|
|
90
79
|
|
|
91
80
|
<script setup lang="ts">
|
|
92
81
|
import type { FallthroughAttrs } from '@/types/fallthrough';
|
|
93
82
|
import { useBbFormSavingById } from '@/composables/useBbForm';
|
|
94
|
-
import
|
|
83
|
+
import BbBaseButton from '@/components/BbBaseButton/BbBaseButton.vue';
|
|
84
|
+
import BbSpinner from '@/components/BbSpinner/BbSpinner.vue';
|
|
95
85
|
import BbIcon from '../BbIcon/BbIcon.vue';
|
|
96
86
|
import { computed, inject, mergeProps, ref, useAttrs, watchEffect } from 'vue';
|
|
97
87
|
import { BB_FORM_SUBMIT_LOCK } from '@/composables/formSubmitLock';
|
|
@@ -163,6 +153,8 @@ if (process.env.NODE_ENV !== 'production')
|
|
|
163
153
|
warnRemovedAttrs('BbButton', removedPropsFor('BbButton'));
|
|
164
154
|
|
|
165
155
|
const BUTTON_SIZES = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'] as const;
|
|
156
|
+
/** The viewport bands `icon-only` switches in, smallest first (index.css). */
|
|
157
|
+
const ICON_ONLY_BANDS = ['default', 'sm', 'md', 'lg', 'xl', '2xl'] as const;
|
|
166
158
|
const logger = useLogger();
|
|
167
159
|
|
|
168
160
|
const isToggle = computed(() => modelValue.value !== undefined);
|
|
@@ -235,8 +227,21 @@ const hasLoadedOnce = useUntil(loading);
|
|
|
235
227
|
const linkState = useLinkState(props);
|
|
236
228
|
provideLinkState(linkState);
|
|
237
229
|
|
|
238
|
-
/**
|
|
239
|
-
|
|
230
|
+
/**
|
|
231
|
+
* `icon-only` as classes: `true` everywhere, or one class per
|
|
232
|
+
* viewport band the responsive map turns it on in (each value holds from its
|
|
233
|
+
* breakpoint up, like `size`), so the CSS switches it with no render.
|
|
234
|
+
*/
|
|
235
|
+
const iconOnlyClasses = computed(() => {
|
|
236
|
+
const value = props.iconOnly;
|
|
237
|
+
if (!value) return [];
|
|
238
|
+
if (value === true) return ['bb-button--icon'];
|
|
239
|
+
let on = !!value.default;
|
|
240
|
+
return ICON_ONLY_BANDS.flatMap((band) => {
|
|
241
|
+
if (band !== 'default' && value[band] !== undefined) on = !!value[band];
|
|
242
|
+
return on ? [`bb-button--icon-${band}`] : [];
|
|
243
|
+
});
|
|
244
|
+
});
|
|
240
245
|
|
|
241
246
|
/** What an icon slot sees: the button's `pt` states. */
|
|
242
247
|
const iconScope = computed<BbButtonIconSlotProps>(() => ({
|
|
@@ -347,7 +352,7 @@ const OWN_PROPS = new Set([
|
|
|
347
352
|
'interactiveWhileLoading',
|
|
348
353
|
'falseValue',
|
|
349
354
|
'group',
|
|
350
|
-
'
|
|
355
|
+
'iconOnly',
|
|
351
356
|
'loading',
|
|
352
357
|
'modelValue',
|
|
353
358
|
'prepend:icon',
|
|
@@ -422,11 +427,11 @@ const rootBindings = computed(() =>
|
|
|
422
427
|
class: [
|
|
423
428
|
'bb-button',
|
|
424
429
|
sizeClasses.value,
|
|
430
|
+
iconOnlyClasses.value,
|
|
425
431
|
{
|
|
426
432
|
'bb-button--loading': loading.value,
|
|
427
433
|
'bb-button--soft-disabled': softDisabled.value,
|
|
428
434
|
'bb-button--group': props.group,
|
|
429
|
-
'bb-button--icon': iconOnly.value,
|
|
430
435
|
'bb-button--pressed': isToggle.value && isPressed.value,
|
|
431
436
|
[`bb-button--${config.variant}`]: config.variant !== 'none',
|
|
432
437
|
},
|
|
@@ -675,9 +680,11 @@ export type BbButtonOwnProps = {
|
|
|
675
680
|
*/
|
|
676
681
|
external?: boolean;
|
|
677
682
|
/**
|
|
678
|
-
*
|
|
683
|
+
* Shows only the button's icon (`prepend:icon` when it has both); the
|
|
684
|
+
* label is hidden but stays its accessible name, so always write it.
|
|
685
|
+
* `true`, or per breakpoint: `{ default: true, md: false }`.
|
|
679
686
|
*/
|
|
680
|
-
|
|
687
|
+
iconOnly?: Responsive<boolean>;
|
|
681
688
|
|
|
682
689
|
/**
|
|
683
690
|
* Triggers a loading indicator. A loading button is soft-disabled on its
|
|
@@ -941,11 +948,10 @@ export type BbButtonSlots = {
|
|
|
941
948
|
*/
|
|
942
949
|
default?: (props: BbLinkSlotProps) => any;
|
|
943
950
|
/**
|
|
944
|
-
* The
|
|
945
|
-
* the `icon` part: `pt:icon`, `--icon-size` and the loading
|
|
951
|
+
* The leading icon, replacing `prepend:icon` (the one `icon-only` shows).
|
|
952
|
+
* Renders inside the `icon` part: `pt:icon`, `--icon-size` and the loading
|
|
953
|
+
* spinner apply.
|
|
946
954
|
*/
|
|
947
|
-
icon?: (props: BbButtonIconSlotProps) => any;
|
|
948
|
-
/** The leading icon, replacing `prepend:icon`; inside the `icon` part. */
|
|
949
955
|
'prepend:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
950
956
|
/** The trailing icon, replacing `append:icon`; inside the `icon` part. */
|
|
951
957
|
'append:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
@@ -1319,20 +1325,14 @@ export type BbButtonSlots = {
|
|
|
1319
1325
|
}
|
|
1320
1326
|
}
|
|
1321
1327
|
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
&:has(.bb-button__prepend-icon),
|
|
1329
|
-
&.bb-button--loading:not(.bb-button--icon):not(
|
|
1330
|
-
:has(.bb-button__append-icon)
|
|
1331
|
-
) {
|
|
1328
|
+
/* Zero-specificity on purpose: an `icon-only` band (below) squares the
|
|
1329
|
+
button over them, whatever icons it holds. */
|
|
1330
|
+
&:where(:has(.bb-button__prepend-icon)),
|
|
1331
|
+
&:where(.bb-button--loading:not(:has(.bb-button__append-icon))) {
|
|
1332
1332
|
padding-inline-start: var(--ipx);
|
|
1333
1333
|
}
|
|
1334
1334
|
|
|
1335
|
-
&:has(.bb-button__append-icon) {
|
|
1335
|
+
&:where(:has(.bb-button__append-icon)) {
|
|
1336
1336
|
padding-inline-end: var(--ipx);
|
|
1337
1337
|
}
|
|
1338
1338
|
|
|
@@ -1493,7 +1493,6 @@ export type BbButtonSlots = {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
|
|
1495
1495
|
.bb-spinner,
|
|
1496
|
-
.bb-button__icon,
|
|
1497
1496
|
.bb-button__prepend-icon,
|
|
1498
1497
|
.bb-button__append-icon {
|
|
1499
1498
|
color: currentColor;
|
|
@@ -1808,6 +1807,157 @@ export type BbButtonSlots = {
|
|
|
1808
1807
|
}
|
|
1809
1808
|
}
|
|
1810
1809
|
|
|
1810
|
+
/* `icon-only`: the button squares to its one icon (the
|
|
1811
|
+
prepend one when it has both) and its label stays the accessible name,
|
|
1812
|
+
visually hidden. `true` is `--icon` (the label also takes `bb-sr-only`);
|
|
1813
|
+
a breakpoint map gets one class per viewport band it is on in, each band
|
|
1814
|
+
its own range, so no band has to undo another. CSS alone: SSR-safe. */
|
|
1815
|
+
|
|
1816
|
+
.bb-button.bb-button--icon {
|
|
1817
|
+
min-width: var(--h);
|
|
1818
|
+
padding-inline: 0;
|
|
1819
|
+
|
|
1820
|
+
.bb-button__text {
|
|
1821
|
+
clip-path: inset(50%);
|
|
1822
|
+
height: 1px;
|
|
1823
|
+
margin: -1px;
|
|
1824
|
+
overflow: hidden;
|
|
1825
|
+
position: absolute;
|
|
1826
|
+
white-space: nowrap;
|
|
1827
|
+
width: 1px;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
&:has(.bb-button__prepend-icon) .bb-button__append-icon {
|
|
1831
|
+
display: none;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
@media (max-width: 639.98px) {
|
|
1836
|
+
.bb-button.bb-button--icon-default {
|
|
1837
|
+
min-width: var(--h);
|
|
1838
|
+
padding-inline: 0;
|
|
1839
|
+
|
|
1840
|
+
.bb-button__text {
|
|
1841
|
+
clip-path: inset(50%);
|
|
1842
|
+
height: 1px;
|
|
1843
|
+
margin: -1px;
|
|
1844
|
+
overflow: hidden;
|
|
1845
|
+
position: absolute;
|
|
1846
|
+
white-space: nowrap;
|
|
1847
|
+
width: 1px;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
&:has(.bb-button__prepend-icon) .bb-button__append-icon {
|
|
1851
|
+
display: none;
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
@media (min-width: 640px) and (max-width: 767.98px) {
|
|
1857
|
+
.bb-button.bb-button--icon-sm {
|
|
1858
|
+
min-width: var(--h);
|
|
1859
|
+
padding-inline: 0;
|
|
1860
|
+
|
|
1861
|
+
.bb-button__text {
|
|
1862
|
+
clip-path: inset(50%);
|
|
1863
|
+
height: 1px;
|
|
1864
|
+
margin: -1px;
|
|
1865
|
+
overflow: hidden;
|
|
1866
|
+
position: absolute;
|
|
1867
|
+
white-space: nowrap;
|
|
1868
|
+
width: 1px;
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
&:has(.bb-button__prepend-icon) .bb-button__append-icon {
|
|
1872
|
+
display: none;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
@media (min-width: 768px) and (max-width: 1023.98px) {
|
|
1878
|
+
.bb-button.bb-button--icon-md {
|
|
1879
|
+
min-width: var(--h);
|
|
1880
|
+
padding-inline: 0;
|
|
1881
|
+
|
|
1882
|
+
.bb-button__text {
|
|
1883
|
+
clip-path: inset(50%);
|
|
1884
|
+
height: 1px;
|
|
1885
|
+
margin: -1px;
|
|
1886
|
+
overflow: hidden;
|
|
1887
|
+
position: absolute;
|
|
1888
|
+
white-space: nowrap;
|
|
1889
|
+
width: 1px;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
&:has(.bb-button__prepend-icon) .bb-button__append-icon {
|
|
1893
|
+
display: none;
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
@media (min-width: 1024px) and (max-width: 1279.98px) {
|
|
1899
|
+
.bb-button.bb-button--icon-lg {
|
|
1900
|
+
min-width: var(--h);
|
|
1901
|
+
padding-inline: 0;
|
|
1902
|
+
|
|
1903
|
+
.bb-button__text {
|
|
1904
|
+
clip-path: inset(50%);
|
|
1905
|
+
height: 1px;
|
|
1906
|
+
margin: -1px;
|
|
1907
|
+
overflow: hidden;
|
|
1908
|
+
position: absolute;
|
|
1909
|
+
white-space: nowrap;
|
|
1910
|
+
width: 1px;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
&:has(.bb-button__prepend-icon) .bb-button__append-icon {
|
|
1914
|
+
display: none;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
@media (min-width: 1280px) and (max-width: 1535.98px) {
|
|
1920
|
+
.bb-button.bb-button--icon-xl {
|
|
1921
|
+
min-width: var(--h);
|
|
1922
|
+
padding-inline: 0;
|
|
1923
|
+
|
|
1924
|
+
.bb-button__text {
|
|
1925
|
+
clip-path: inset(50%);
|
|
1926
|
+
height: 1px;
|
|
1927
|
+
margin: -1px;
|
|
1928
|
+
overflow: hidden;
|
|
1929
|
+
position: absolute;
|
|
1930
|
+
white-space: nowrap;
|
|
1931
|
+
width: 1px;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
&:has(.bb-button__prepend-icon) .bb-button__append-icon {
|
|
1935
|
+
display: none;
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
@media (min-width: 1536px) {
|
|
1941
|
+
.bb-button.bb-button--icon-2xl {
|
|
1942
|
+
min-width: var(--h);
|
|
1943
|
+
padding-inline: 0;
|
|
1944
|
+
|
|
1945
|
+
.bb-button__text {
|
|
1946
|
+
clip-path: inset(50%);
|
|
1947
|
+
height: 1px;
|
|
1948
|
+
margin: -1px;
|
|
1949
|
+
overflow: hidden;
|
|
1950
|
+
position: absolute;
|
|
1951
|
+
white-space: nowrap;
|
|
1952
|
+
width: 1px;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
&:has(.bb-button__prepend-icon) .bb-button__append-icon {
|
|
1956
|
+
display: none;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1811
1961
|
/* Reduced motion: the label no longer slides
|
|
1812
1962
|
aside for the loading spinner — it steps, and the spinner still appears. */
|
|
1813
1963
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1373,6 +1373,11 @@ export type BbCalendarBaseProps = BbCalendarPtProps & {
|
|
|
1373
1373
|
disabled?: boolean;
|
|
1374
1374
|
/** Shows the calendar and lets the user page through it, but no pick changes the value. */
|
|
1375
1375
|
readonly?: boolean;
|
|
1376
|
+
/**
|
|
1377
|
+
* Clicking the selected date (week, month, year) again clears a single
|
|
1378
|
+
* value. Off: re-picking keeps it. `multiple` and `range` ignore it.
|
|
1379
|
+
*/
|
|
1380
|
+
clearable?: boolean;
|
|
1376
1381
|
};
|
|
1377
1382
|
|
|
1378
1383
|
/**
|
|
@@ -141,7 +141,23 @@
|
|
|
141
141
|
</CommonField>
|
|
142
142
|
</template>
|
|
143
143
|
|
|
144
|
-
<script
|
|
144
|
+
<script
|
|
145
|
+
setup
|
|
146
|
+
lang="ts"
|
|
147
|
+
generic="
|
|
148
|
+
const T = any,
|
|
149
|
+
A extends string | ((...args: never[]) => unknown) | undefined = undefined,
|
|
150
|
+
Tx extends string | undefined = undefined,
|
|
151
|
+
M extends boolean = true
|
|
152
|
+
"
|
|
153
|
+
>
|
|
154
|
+
import type { ItemGetter } from '@/types/ItemAccessor';
|
|
155
|
+
import type {
|
|
156
|
+
ItemKeyInput,
|
|
157
|
+
MultipleInput,
|
|
158
|
+
OptionValueOf,
|
|
159
|
+
SelectModelOf,
|
|
160
|
+
} from '@/types/ItemPath';
|
|
145
161
|
import { useConfigDefaults } from '@/composables/useConfigDefaults';
|
|
146
162
|
import type { FallthroughAttrs } from '@/types/fallthrough';
|
|
147
163
|
import { vAutofocus } from '@/utilities/misc/autofocus';
|
|
@@ -207,8 +223,12 @@ defineOptions({
|
|
|
207
223
|
});
|
|
208
224
|
const declaredProps = withDefaults(
|
|
209
225
|
defineProps<
|
|
210
|
-
BbCheckboxGroupProps<T> &
|
|
211
|
-
|
|
226
|
+
BbCheckboxGroupProps<T> & /* @vue-ignore */ {
|
|
227
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- a getter returns any value; `A` reads which
|
|
228
|
+
itemValue?: ItemKeyInput<T, A> | ItemGetter<T, any>;
|
|
229
|
+
itemText?: ItemKeyInput<T, Tx> | ItemGetter<T, string>;
|
|
230
|
+
multiple?: MultipleInput<M, true>;
|
|
231
|
+
} & /* @vue-ignore */ FallthroughAttrs<
|
|
212
232
|
'div',
|
|
213
233
|
BbCheckboxGroupProps<T>,
|
|
214
234
|
BbCheckboxGroupEvents
|
|
@@ -216,7 +236,8 @@ const declaredProps = withDefaults(
|
|
|
216
236
|
>(),
|
|
217
237
|
{
|
|
218
238
|
inputPosition: undefined,
|
|
219
|
-
|
|
239
|
+
// `as never`: the declared type reads `M`, which a default cannot know.
|
|
240
|
+
multiple: true as never,
|
|
220
241
|
selectable: true,
|
|
221
242
|
// Tri-state: unset lets the components map show through.
|
|
222
243
|
compact: undefined,
|
|
@@ -228,7 +249,8 @@ const declaredProps = withDefaults(
|
|
|
228
249
|
block: undefined,
|
|
229
250
|
}
|
|
230
251
|
);
|
|
231
|
-
const declaredEmit =
|
|
252
|
+
const declaredEmit =
|
|
253
|
+
defineEmits<BbCheckboxGroupEvents<SelectModelOf<OptionValueOf<T, A>, M>>>();
|
|
232
254
|
|
|
233
255
|
defineSlots<BbCheckboxGroupSlots<T>>();
|
|
234
256
|
|
|
@@ -325,7 +347,7 @@ const { hasPrefilled, whenPrefilled } = usePrefill({
|
|
|
325
347
|
clientReproducible,
|
|
326
348
|
trigger: true,
|
|
327
349
|
currentValue: props.modelValue,
|
|
328
|
-
multiple: props.multiple,
|
|
350
|
+
multiple: !!props.multiple,
|
|
329
351
|
fn: async () => {
|
|
330
352
|
// The group has no search field: no `query` in the context.
|
|
331
353
|
// Coherence runs on an APPLIED result only: a superseded or
|
|
@@ -363,7 +385,10 @@ const { options } = useBaseOptions({
|
|
|
363
385
|
|
|
364
386
|
const onOptionSelected = (option: Option) => {
|
|
365
387
|
if (props.multiple) {
|
|
366
|
-
emit('update:modelValue', [
|
|
388
|
+
emit('update:modelValue', [
|
|
389
|
+
...modelValueArray.value,
|
|
390
|
+
option.value,
|
|
391
|
+
] as never);
|
|
367
392
|
return;
|
|
368
393
|
}
|
|
369
394
|
emit('update:modelValue', option.value);
|
|
@@ -371,12 +396,12 @@ const onOptionSelected = (option: Option) => {
|
|
|
371
396
|
|
|
372
397
|
const onOptionUnselected = (option: Option) => {
|
|
373
398
|
if (!props.multiple) {
|
|
374
|
-
emit('update:modelValue', null);
|
|
399
|
+
emit('update:modelValue', null as never);
|
|
375
400
|
return;
|
|
376
401
|
}
|
|
377
402
|
const copy = { ...modelValueIndexedByHash.value };
|
|
378
403
|
delete copy[option.valueHash];
|
|
379
|
-
emit('update:modelValue', Object.values(copy));
|
|
404
|
+
emit('update:modelValue', Object.values(copy) as never);
|
|
380
405
|
};
|
|
381
406
|
|
|
382
407
|
const { data: optionsIndexedByHash } = useIndexById({
|
|
@@ -386,7 +411,7 @@ const { data: optionsIndexedByHash } = useIndexById({
|
|
|
386
411
|
|
|
387
412
|
const { coherent, coherentValue } = useCoherence({
|
|
388
413
|
modelValue: toRef(() => props.modelValue),
|
|
389
|
-
multiple: props.multiple,
|
|
414
|
+
multiple: !!props.multiple,
|
|
390
415
|
iteratee: (item) => !!optionsIndexedByHash.value[hash(item)],
|
|
391
416
|
});
|
|
392
417
|
|
|
@@ -983,7 +1008,8 @@ export type BbCheckboxGroupBaseProps<T> = {
|
|
|
983
1008
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- `rules` take the model's type (see `modelValue`), so a rule annotated with the app's value type fits
|
|
984
1009
|
} & FormFieldProps<any>;
|
|
985
1010
|
|
|
986
|
-
|
|
1011
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- untyped unless the component supplies the value
|
|
1012
|
+
export type BbCheckboxGroupEvents<V = any> = {
|
|
987
1013
|
/**
|
|
988
1014
|
* Emitted when one of the generated checkbox inputs loses focus.
|
|
989
1015
|
* Forwards the original DOM `FocusEvent`.
|
|
@@ -1034,8 +1060,7 @@ export type BbCheckboxGroupEvents = {
|
|
|
1034
1060
|
/**
|
|
1035
1061
|
* Emitted with the coherent next selection array whenever selection changes.
|
|
1036
1062
|
*/
|
|
1037
|
-
|
|
1038
|
-
(e: 'update:modelValue', value: any): void;
|
|
1063
|
+
(e: 'update:modelValue', value: V): void;
|
|
1039
1064
|
};
|
|
1040
1065
|
|
|
1041
1066
|
/**
|
|
@@ -43,12 +43,29 @@ const warned = new Set<string>();
|
|
|
43
43
|
* object on every parent render, so the layer is rebuilt only when the
|
|
44
44
|
* serialised map differs, and the subtree re-resolves only then.
|
|
45
45
|
*/
|
|
46
|
+
/** A copy the page cannot mutate under us, functions kept (JSON drops them). */
|
|
47
|
+
const detached = (value: unknown): unknown => {
|
|
48
|
+
if (Array.isArray(value)) return value.map(detached);
|
|
49
|
+
if (
|
|
50
|
+
value &&
|
|
51
|
+
typeof value === 'object' &&
|
|
52
|
+
[Object.prototype, null].includes(Object.getPrototypeOf(toRaw(value)))
|
|
53
|
+
)
|
|
54
|
+
return Object.fromEntries(
|
|
55
|
+
Object.entries(toRaw(value)).map(([k, v]) => [k, detached(v)])
|
|
56
|
+
);
|
|
57
|
+
return value;
|
|
58
|
+
};
|
|
46
59
|
let lastKey: string | undefined;
|
|
47
60
|
let lastLayer: ConfigLayer | undefined;
|
|
48
61
|
const inlineLayer = (): ConfigLayer | undefined => {
|
|
49
62
|
const map = props.config;
|
|
50
63
|
if (!map) return (lastKey = lastLayer = undefined);
|
|
51
|
-
|
|
64
|
+
// A function setting (`BbForm.isValidationError`) keys by its source, so an
|
|
65
|
+
// inline arrow rebuilt on every render does not rebuild the layer.
|
|
66
|
+
const key = JSON.stringify(toRaw(map), (_key, value: unknown) =>
|
|
67
|
+
typeof value === 'function' ? `fn:${String(value)}` : value
|
|
68
|
+
);
|
|
52
69
|
if (key === lastKey && lastLayer) return lastLayer;
|
|
53
70
|
if (logger)
|
|
54
71
|
for (const [component, entry] of Object.entries(map))
|
|
@@ -65,7 +82,7 @@ const inlineLayer = (): ConfigLayer | undefined => {
|
|
|
65
82
|
lastKey = key;
|
|
66
83
|
lastLayer = {
|
|
67
84
|
source: '<BbConfigScope :config>',
|
|
68
|
-
map:
|
|
85
|
+
map: detached(toRaw(map)) as ConfigMap,
|
|
69
86
|
};
|
|
70
87
|
return lastLayer;
|
|
71
88
|
};
|