bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.72
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 +6 -1
- 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 +230 -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 +93 -7
- 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 +238 -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 +69 -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 +144 -10
- 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 +240 -198
- 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 +1984 -1145
- 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/utils/versionCheck.js +1 -1
- package/llms.txt +2 -2
- package/package.json +11 -1
- package/scripts/README.md +31 -27
- 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/redundant-item-accessor.mjs +4 -1
- package/scripts/lib/release-results.mjs +32 -1
- 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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IconType } from '../../types/Icon.js';
|
|
2
2
|
import { PtCompoundProps, PtValue, PtVariantAttrs } from '../../types/passthrough.js';
|
|
3
3
|
import { Sizes } from '../../types/SizeScale.js';
|
|
4
|
+
import { Responsive } from '../../types/ResponsiveSize.js';
|
|
4
5
|
import { BadgeVariantBuiltIn, BadgeVariantRegistry, BadgeVariantType } from '../../types/BadgeVariant.js';
|
|
5
6
|
import { BbBaseButtonProps, BbLinkSlotProps } from '../BbBaseButton/types.js';
|
|
6
7
|
import { BbBadgePtKeys } from './ptKeys.generated.js';
|
|
@@ -72,11 +73,11 @@ export type BbBadgeProps = BbBadgePtProps & {
|
|
|
72
73
|
[K in `${BbBadgePtPart}:${BadgeVariantBuiltIn | keyof BadgeVariantRegistry}`]?: PtValue;
|
|
73
74
|
};
|
|
74
75
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
76
|
+
* Shows only the badge's icon (`prepend:icon` when it has both); the
|
|
77
|
+
* label (`text` or the slot) stays its visually hidden accessible name, so
|
|
78
|
+
* always write it. `true`, or per breakpoint: `{ default: true, md: false }`.
|
|
78
79
|
*/
|
|
79
|
-
|
|
80
|
+
iconOnly?: Responsive<boolean>;
|
|
80
81
|
/**
|
|
81
82
|
* Icon rendered before the label.
|
|
82
83
|
*/
|
|
@@ -88,7 +89,7 @@ export type BbBadgeProps = BbBadgePtProps & {
|
|
|
88
89
|
*/
|
|
89
90
|
'append:icon'?: IconType;
|
|
90
91
|
/**
|
|
91
|
-
* Shows a spinner in place of the leftmost icon (`
|
|
92
|
+
* Shows a spinner in place of the leftmost icon (`prepend:icon`;
|
|
92
93
|
* the `append:icon` when it is the only one; else the leading slot), as
|
|
93
94
|
* `BbButton` does, with a hidden loading announcement.
|
|
94
95
|
*/
|
|
@@ -106,10 +107,13 @@ export type BbBadgeProps = BbBadgePtProps & {
|
|
|
106
107
|
*/
|
|
107
108
|
clearableLabel?: string;
|
|
108
109
|
/**
|
|
109
|
-
* Preset size of the badge
|
|
110
|
+
* Preset size of the badge: one size, or per breakpoint
|
|
111
|
+
* (`{ default: 'sm', lg: 'md' }`), as on `BbButton`.
|
|
110
112
|
* @defaultValue `'md'`
|
|
111
113
|
*/
|
|
112
|
-
size?: keyof Sizes
|
|
114
|
+
size?: Responsive<keyof Sizes>;
|
|
115
|
+
/** The label, when the default slot is empty (the slot wins), as on `BbButton`. */
|
|
116
|
+
text?: string;
|
|
113
117
|
/**
|
|
114
118
|
* Visual variant: `primary`, `secondary`, `destructive`, or `outline`.
|
|
115
119
|
* Status colours are a registration (vite plugin `components.BbBadge.variants`, the
|
|
@@ -132,17 +136,16 @@ export type BbBadgeIconSlotProps = BbLinkSlotProps & {
|
|
|
132
136
|
};
|
|
133
137
|
export type BbBadgeSlots = {
|
|
134
138
|
/**
|
|
135
|
-
* The badge's label content.
|
|
139
|
+
* The badge's label content. With `icon-only` this becomes the visually
|
|
136
140
|
* hidden accessible label. Render a `BbBadgeButton` here to make the badge
|
|
137
141
|
* body interactive (the wrapper stays a passive `<span>`).
|
|
138
142
|
*/
|
|
139
143
|
default?: (props: object) => any;
|
|
140
144
|
/**
|
|
141
|
-
* The
|
|
142
|
-
* the `icon` part: `pt:icon`, `--icon-size` and the loading
|
|
145
|
+
* The leading icon, replacing `prepend:icon` (the one `icon-only` shows).
|
|
146
|
+
* Renders inside the `icon` part: `pt:icon`, `--icon-size` and the loading
|
|
147
|
+
* spinner apply.
|
|
143
148
|
*/
|
|
144
|
-
icon?: (props: BbBadgeIconSlotProps) => any;
|
|
145
|
-
/** The leading icon, replacing `prepend:icon`; inside the `icon` part. */
|
|
146
149
|
'prepend:icon'?: (props: BbBadgeIconSlotProps) => any;
|
|
147
150
|
/** The trailing icon, replacing `append:icon`; inside the `icon` part. */
|
|
148
151
|
'append:icon'?: (props: BbBadgeIconSlotProps) => any;
|
|
@@ -5,22 +5,22 @@ import r from "../BbIcon/BbIcon.vue.js";
|
|
|
5
5
|
import { BB_FORM_SUBMIT_LOCK as i } from "../../composables/formSubmitLock.js";
|
|
6
6
|
import { pickBy as a } from "../../utilities/functions/pickBy.js";
|
|
7
7
|
import { noop as o } from "../../utilities/functions/noop.js";
|
|
8
|
-
import { useLocale as
|
|
9
|
-
import { useLogger as
|
|
10
|
-
import { useUntil as
|
|
11
|
-
import { removedPropsFor as
|
|
12
|
-
import { warnRemovedAttrs as
|
|
13
|
-
import { extractHtmlContainer as
|
|
14
|
-
import { isEqual as
|
|
15
|
-
import { usePassthrough as
|
|
8
|
+
import { useLocale as ee } from "../../composables/useLocale.js";
|
|
9
|
+
import { useLogger as te } from "../../composables/useLogger.js";
|
|
10
|
+
import { useUntil as ne } from "../../composables/useUntil.js";
|
|
11
|
+
import { removedPropsFor as re } from "../../deprecation/removedProps.js";
|
|
12
|
+
import { warnRemovedAttrs as ie } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
13
|
+
import { extractHtmlContainer as s } from "../../utilities/functions/extractDomContainer.js";
|
|
14
|
+
import { isEqual as c } from "../../utilities/functions/isEqual.js";
|
|
15
|
+
import { usePassthrough as l, variantPt as u } from "../../composables/usePassthrough.js";
|
|
16
16
|
import { useConfigDefaults as d } from "../../composables/useConfigDefaults.js";
|
|
17
17
|
import { BB_BUTTON_PT as f } from "./types.js";
|
|
18
18
|
import { useToggleRoving as p } from "./toggleRoving.js";
|
|
19
19
|
import { provideLinkState as m, useLinkState as h } from "../BbBaseButton/useLinkState.js";
|
|
20
|
-
import {
|
|
20
|
+
import { Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as ae, defineComponent as S, guardReactiveProps as C, inject as oe, mergeModels as w, mergeProps as T, normalizeProps as E, openBlock as D, ref as O, renderSlot as k, toDisplayString as A, unref as j, useAttrs as se, useModel as ce, useSlots as le, watchEffect as M, withCtx as N } from "vue";
|
|
21
21
|
// src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts
|
|
22
22
|
var P = {
|
|
23
|
-
key:
|
|
23
|
+
key: 3,
|
|
24
24
|
class: "bb-button__loading-label bb-sr-only"
|
|
25
25
|
}, F = /*@__PURE__*/ S({
|
|
26
26
|
mixins: [u(f)],
|
|
@@ -96,7 +96,7 @@ var P = {
|
|
|
96
96
|
href: {},
|
|
97
97
|
download: { type: [Boolean, String] },
|
|
98
98
|
external: { type: Boolean },
|
|
99
|
-
|
|
99
|
+
iconOnly: { type: [Boolean, Object] },
|
|
100
100
|
loading: { type: Boolean },
|
|
101
101
|
method: {},
|
|
102
102
|
onBefore: {},
|
|
@@ -148,13 +148,13 @@ var P = {
|
|
|
148
148
|
}),
|
|
149
149
|
emits: ["update:modelValue"],
|
|
150
150
|
setup(u, { expose: S }) {
|
|
151
|
-
let w =
|
|
151
|
+
let w = ce(u, "modelValue"), F = u, I = le(), L = d("BbButton", F, {
|
|
152
152
|
disableAutoLoading: !1,
|
|
153
153
|
size: "md",
|
|
154
154
|
variant: "primary",
|
|
155
155
|
block: !1
|
|
156
156
|
});
|
|
157
|
-
process.env.NODE_ENV !== "production" &&
|
|
157
|
+
process.env.NODE_ENV !== "production" && ie("BbButton", re("BbButton"));
|
|
158
158
|
let R = [
|
|
159
159
|
"xs",
|
|
160
160
|
"sm",
|
|
@@ -162,62 +162,75 @@ var P = {
|
|
|
162
162
|
"lg",
|
|
163
163
|
"xl",
|
|
164
164
|
"2xl"
|
|
165
|
-
], z =
|
|
165
|
+
], z = [
|
|
166
|
+
"default",
|
|
167
|
+
"sm",
|
|
168
|
+
"md",
|
|
169
|
+
"lg",
|
|
170
|
+
"xl",
|
|
171
|
+
"2xl"
|
|
172
|
+
], B = te(), V = _(() => w.value !== void 0), H = _(() => c(w.value, F.trueValue)), { t: U } = ee(), W = se(), G = O();
|
|
166
173
|
process.env.NODE_ENV !== "production" && M(() => {
|
|
167
|
-
|
|
174
|
+
V.value || "aria-pressed" in W && B.warn("BbButton: `aria-pressed` is managed by the component and your binding is ignored. Bind `v-model` (with `true-value`/`false-value` when the state is not boolean) — that sets `aria-pressed`, applies `bb-button--pressed`, and flips the value on click.");
|
|
168
175
|
});
|
|
169
|
-
let
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
let { onClick: e, class: t, ...n } =
|
|
176
|
+
let ue = (e) => {
|
|
177
|
+
G.value = s(e) ?? void 0;
|
|
178
|
+
}, de = _(() => {
|
|
179
|
+
let { onClick: e, class: t, ...n } = W;
|
|
173
180
|
return n;
|
|
174
|
-
}),
|
|
175
|
-
m(
|
|
176
|
-
let
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
}), K = O(0), fe = oe(i, null), q = () => F.type === "submit" && W.form != null ? String(W.form) : void 0, pe = e(q), me = () => F.type === "submit" && (q() ? pe(G.value) : !!fe?.savingFor(G.value)), J = _(() => F.loading || !L.disableAutoLoading && (!!K.value || me())), he = ne(J), Y = h(F);
|
|
182
|
+
m(Y);
|
|
183
|
+
let ge = _(() => {
|
|
184
|
+
let e = F.iconOnly;
|
|
185
|
+
if (!e) return [];
|
|
186
|
+
if (e === !0) return ["bb-button--icon"];
|
|
187
|
+
let t = !!e.default;
|
|
188
|
+
return z.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-button--icon-${n}`] : []));
|
|
189
|
+
}), X = _(() => ({
|
|
190
|
+
...Y.value,
|
|
191
|
+
pressed: V.value && H.value,
|
|
192
|
+
loading: J.value,
|
|
180
193
|
disabled: !!F.disabled
|
|
181
|
-
})), Z =
|
|
194
|
+
})), Z = l({
|
|
182
195
|
component: "BbButton",
|
|
183
|
-
attrs:
|
|
196
|
+
attrs: W,
|
|
184
197
|
props: F,
|
|
185
198
|
parts: f.parts,
|
|
186
199
|
states: f.states,
|
|
187
200
|
active: {
|
|
188
|
-
loading: () =>
|
|
201
|
+
loading: () => J.value,
|
|
189
202
|
disabled: () => !!F.disabled,
|
|
190
|
-
pressed: () =>
|
|
191
|
-
activeLink: () =>
|
|
192
|
-
exactActiveLink: () =>
|
|
203
|
+
pressed: () => V.value && H.value,
|
|
204
|
+
activeLink: () => Y.value.activeLink,
|
|
205
|
+
exactActiveLink: () => Y.value.exactActiveLink
|
|
193
206
|
},
|
|
194
207
|
variant: {
|
|
195
208
|
...f.variant,
|
|
196
209
|
current: () => L.variant
|
|
197
210
|
}
|
|
198
211
|
}), _e = async (e) => {
|
|
199
|
-
if (
|
|
200
|
-
if (
|
|
212
|
+
if (J.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
|
|
213
|
+
if (V.value) {
|
|
201
214
|
let e = F.trueValue, t = F.falseValue;
|
|
202
|
-
w.value =
|
|
215
|
+
w.value = c(w.value, e) ? t : e;
|
|
203
216
|
}
|
|
204
|
-
let t = [
|
|
217
|
+
let t = [W.onClick ?? o].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
|
|
205
218
|
if (!r.length) return n[0];
|
|
206
219
|
let i = t.length === 1 ? n[0] : Promise.all(r).then(() => {});
|
|
207
|
-
|
|
220
|
+
K.value++;
|
|
208
221
|
try {
|
|
209
222
|
return await i;
|
|
210
223
|
} finally {
|
|
211
|
-
|
|
224
|
+
K.value--;
|
|
212
225
|
}
|
|
213
|
-
}, ve =
|
|
226
|
+
}, ve = _(() => {
|
|
214
227
|
let e = typeof L.size == "string" ? { default: L.size } : {
|
|
215
228
|
default: "md",
|
|
216
229
|
...L.size
|
|
217
230
|
};
|
|
218
231
|
return Object.fromEntries(Object.entries(e).map(([e, t]) => {
|
|
219
232
|
let n = t;
|
|
220
|
-
return R.includes(t) || (
|
|
233
|
+
return R.includes(t) || (B.warn(`Invalid size: "${t}" in BbButton. Expected one of: ${R.join(", ")}. Falling back to "md".`), n = "md"), [e === "default" ? `bb-button--${n}` : `bb-button--${e}-${n}`, !0];
|
|
221
234
|
}));
|
|
222
235
|
}), ye = /* @__PURE__ */ new Set([
|
|
223
236
|
"append:icon",
|
|
@@ -226,38 +239,38 @@ var P = {
|
|
|
226
239
|
"interactiveWhileLoading",
|
|
227
240
|
"falseValue",
|
|
228
241
|
"group",
|
|
229
|
-
"
|
|
242
|
+
"iconOnly",
|
|
230
243
|
"loading",
|
|
231
244
|
"modelValue",
|
|
232
245
|
"prepend:icon",
|
|
233
246
|
"size",
|
|
234
247
|
"trueValue",
|
|
235
248
|
"variant"
|
|
236
|
-
]), be =
|
|
237
|
-
...
|
|
249
|
+
]), be = _(() => ({
|
|
250
|
+
...de.value,
|
|
238
251
|
...a(F, (e, t) => !ye.has(t) && t !== "pt" && !t.startsWith("pt:"))
|
|
239
|
-
})), Q =
|
|
240
|
-
|
|
252
|
+
})), Q = _(() => J.value && !F.interactiveWhileLoading), $ = p(G, _(() => !!F.group && V.value && !("tabindex" in W)), () => [
|
|
253
|
+
H.value,
|
|
241
254
|
F.disabled,
|
|
242
255
|
Q.value
|
|
243
|
-
]), xe =
|
|
256
|
+
]), xe = _(() => {
|
|
244
257
|
let e = Q.value ? -1 : $.tabindex.value;
|
|
245
258
|
return {
|
|
246
259
|
...Q.value ? { "aria-disabled": !0 } : {},
|
|
247
260
|
...e === void 0 ? {} : { tabindex: e }
|
|
248
261
|
};
|
|
249
|
-
}), Se =
|
|
262
|
+
}), Se = _(() => T(be.value, {
|
|
250
263
|
...xe.value,
|
|
251
|
-
"aria-pressed":
|
|
264
|
+
"aria-pressed": V.value ? H.value : void 0,
|
|
252
265
|
class: [
|
|
253
266
|
"bb-button",
|
|
254
267
|
ve.value,
|
|
268
|
+
ge.value,
|
|
255
269
|
{
|
|
256
|
-
"bb-button--loading":
|
|
270
|
+
"bb-button--loading": J.value,
|
|
257
271
|
"bb-button--soft-disabled": Q.value,
|
|
258
272
|
"bb-button--group": F.group,
|
|
259
|
-
"bb-button--
|
|
260
|
-
"bb-button--pressed": B.value && V.value,
|
|
273
|
+
"bb-button--pressed": V.value && H.value,
|
|
261
274
|
[`bb-button--${L.variant}`]: L.variant !== "none"
|
|
262
275
|
}
|
|
263
276
|
],
|
|
@@ -266,44 +279,37 @@ var P = {
|
|
|
266
279
|
onFocusin: $.onFocusin,
|
|
267
280
|
onKeydown: $.onKeydown
|
|
268
281
|
}, Z.root));
|
|
269
|
-
return S({ $el:
|
|
282
|
+
return S({ $el: G }), (e, i) => (D(), v(t, T({ ref: ue }, Se.value), {
|
|
270
283
|
default: N(() => [
|
|
271
|
-
j(
|
|
284
|
+
j(he) ? (D(), v(g, {
|
|
272
285
|
key: 0,
|
|
273
286
|
appear: "",
|
|
274
287
|
name: "bb-button-spinner"
|
|
275
288
|
}, {
|
|
276
|
-
default: N(() => [
|
|
289
|
+
default: N(() => [J.value ? (D(), v(n, T({
|
|
277
290
|
key: 0,
|
|
278
291
|
class: "bb-button__spinner"
|
|
279
|
-
}, j(Z).spinner), null, 16)) :
|
|
292
|
+
}, j(Z).spinner), null, 16)) : y("", !0)]),
|
|
280
293
|
_: 1
|
|
281
|
-
})) :
|
|
282
|
-
I
|
|
294
|
+
})) : y("", !0),
|
|
295
|
+
I["prepend:icon"] ? (D(), b("span", T({
|
|
283
296
|
key: 1,
|
|
284
|
-
class: "bb-button__icon bb-button__icon-slot"
|
|
285
|
-
}, j(Z).icon), [k(e.$slots, "icon", E(C(X.value)))], 16)) : F.icon ? (D(), y(r, T({
|
|
286
|
-
key: 2,
|
|
287
|
-
class: "bb-button__icon",
|
|
288
|
-
icon: F.icon
|
|
289
|
-
}, j(Z).icon), null, 16, ["icon"])) : I["prepend:icon"] ? (D(), x("span", T({
|
|
290
|
-
key: 3,
|
|
291
297
|
class: "bb-button__prepend-icon bb-button__icon-slot"
|
|
292
|
-
}, j(Z).icon), [k(e.$slots, "prepend:icon", E(C(X.value)))], 16)) : F["prepend:icon"] ? (D(),
|
|
293
|
-
key:
|
|
298
|
+
}, j(Z).icon), [k(e.$slots, "prepend:icon", E(C(X.value)))], 16)) : F["prepend:icon"] ? (D(), v(r, T({
|
|
299
|
+
key: 2,
|
|
294
300
|
class: "bb-button__prepend-icon",
|
|
295
301
|
icon: F["prepend:icon"]
|
|
296
|
-
}, j(Z).icon), null, 16, ["icon"])) :
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
key:
|
|
302
|
+
}, j(Z).icon), null, 16, ["icon"])) : y("", !0),
|
|
303
|
+
x("span", T({ class: ["bb-button__text", { "bb-sr-only": F.iconOnly === !0 }] }, j(Z).text), [k(e.$slots, "default", E(C(j(Y))), () => [ae(A(u.text), 1)])], 16),
|
|
304
|
+
J.value ? (D(), b("span", P, A(j(U)("common.loadingText")), 1)) : y("", !0),
|
|
305
|
+
I["append:icon"] ? (D(), b("span", T({
|
|
306
|
+
key: 4,
|
|
301
307
|
class: "bb-button__append-icon bb-button__icon-slot"
|
|
302
|
-
}, j(Z).icon), [k(e.$slots, "append:icon", E(C(X.value)))], 16)) : F["append:icon"] ? (D(),
|
|
303
|
-
key:
|
|
308
|
+
}, j(Z).icon), [k(e.$slots, "append:icon", E(C(X.value)))], 16)) : F["append:icon"] ? (D(), v(r, T({
|
|
309
|
+
key: 5,
|
|
304
310
|
class: "bb-button__append-icon",
|
|
305
311
|
icon: F["append:icon"]
|
|
306
|
-
}, j(Z).icon), null, 16, ["icon"])) :
|
|
312
|
+
}, j(Z).icon), null, 16, ["icon"])) : y("", !0)
|
|
307
313
|
]),
|
|
308
314
|
_: 3
|
|
309
315
|
}, 16));
|
|
@@ -163,9 +163,11 @@ export type BbButtonOwnProps = {
|
|
|
163
163
|
*/
|
|
164
164
|
external?: boolean;
|
|
165
165
|
/**
|
|
166
|
-
*
|
|
166
|
+
* Shows only the button's icon (`prepend:icon` when it has both); the
|
|
167
|
+
* label is hidden but stays its accessible name, so always write it.
|
|
168
|
+
* `true`, or per breakpoint: `{ default: true, md: false }`.
|
|
167
169
|
*/
|
|
168
|
-
|
|
170
|
+
iconOnly?: Responsive<boolean>;
|
|
169
171
|
/**
|
|
170
172
|
* Triggers a loading indicator. A loading button is soft-disabled on its
|
|
171
173
|
* own (`aria-disabled`, out of the tab order, clicks and navigation
|
|
@@ -393,11 +395,10 @@ export type BbButtonSlots = {
|
|
|
393
395
|
*/
|
|
394
396
|
default?: (props: BbLinkSlotProps) => any;
|
|
395
397
|
/**
|
|
396
|
-
* The
|
|
397
|
-
* the `icon` part: `pt:icon`, `--icon-size` and the loading
|
|
398
|
+
* The leading icon, replacing `prepend:icon` (the one `icon-only` shows).
|
|
399
|
+
* Renders inside the `icon` part: `pt:icon`, `--icon-size` and the loading
|
|
400
|
+
* spinner apply.
|
|
398
401
|
*/
|
|
399
|
-
icon?: (props: BbButtonIconSlotProps) => any;
|
|
400
|
-
/** The leading icon, replacing `prepend:icon`; inside the `icon` part. */
|
|
401
402
|
'prepend:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
402
403
|
/** The trailing icon, replacing `append:icon`; inside the `icon` part. */
|
|
403
404
|
'append:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
@@ -40,7 +40,8 @@ declare const __VLS_export: <R extends boolean = false, M extends boolean = fals
|
|
|
40
40
|
utc?: boolean;
|
|
41
41
|
disabled?: boolean;
|
|
42
42
|
readonly?: boolean;
|
|
43
|
-
|
|
43
|
+
clearable?: boolean;
|
|
44
|
+
} & BbCalendarModelProps<R, M> & Omit<import('vue').HTMLAttributes, `pt:${string}&${string}` | "readonly" | "disabled" | "step" | "type" | "pt" | "floating" | "clearable" | "max" | "selectable" | "activeSegment" | "numberOfMonths" | "seconds" | "ampm" | "min" | "firstDayOfWeek" | "utc" | keyof import('./ptKeys.generated.js').BbCalendarPtKeys | keyof BbCalendarModelProps<R, M>> & {}) & {
|
|
44
45
|
"onUpdate:modelValue"?: ((value: import('./types.js').BbDateValue<R, M>) => any) | undefined;
|
|
45
46
|
"onUpdate:activeSegment"?: ((value: BbCalendarSegment) => any) | undefined;
|
|
46
47
|
"onTime-pick"?: ((payload: {
|
|
@@ -152,7 +152,8 @@ var De = ["role"], Oe = {
|
|
|
152
152
|
firstDayOfWeek: {},
|
|
153
153
|
utc: { type: Boolean },
|
|
154
154
|
disabled: { type: Boolean },
|
|
155
|
-
readonly: { type: Boolean }
|
|
155
|
+
readonly: { type: Boolean },
|
|
156
|
+
clearable: { type: Boolean }
|
|
156
157
|
},
|
|
157
158
|
emits: [
|
|
158
159
|
"update:modelValue",
|
|
@@ -225,6 +225,11 @@ export type BbCalendarBaseProps = BbCalendarPtProps & {
|
|
|
225
225
|
disabled?: boolean;
|
|
226
226
|
/** Shows the calendar and lets the user page through it, but no pick changes the value. */
|
|
227
227
|
readonly?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Clicking the selected date (week, month, year) again clears a single
|
|
230
|
+
* value. Off: re-picking keeps it. `multiple` and `range` ignore it.
|
|
231
|
+
*/
|
|
232
|
+
clearable?: boolean;
|
|
228
233
|
};
|
|
229
234
|
/**
|
|
230
235
|
* The v-model of `BbCalendar`, typed by the mode props (vmodel): what the
|
|
@@ -224,7 +224,7 @@ var x = ({ props: x, firstDayOfWeek: S, floating: Me, min: Ne, max: Pe, modelVal
|
|
|
224
224
|
} else if (x.multiple) {
|
|
225
225
|
if (!Array.isArray(i)) return;
|
|
226
226
|
$(r.selected ? i.filter((e) => e !== n) : Te([...i, n]));
|
|
227
|
-
} else $(r.selected ? null : n);
|
|
227
|
+
} else $(r.selected && x.clearable ? null : n);
|
|
228
228
|
};
|
|
229
229
|
De({
|
|
230
230
|
passthrough: Ie,
|
|
@@ -192,7 +192,7 @@ var D = ({ props: D, cursor: O, panes: k, system: A, nu: j, setCursor: M, pick:
|
|
|
192
192
|
} else N(m([...t, s(e.original, I.value)]));
|
|
193
193
|
}
|
|
194
194
|
}, we = (e) => {
|
|
195
|
-
e.selected ? N(null) : N(s(e.original, I.value));
|
|
195
|
+
e.selected && D.clearable ? N(null) : N(s(e.original, I.value));
|
|
196
196
|
}, $ = (e, t) => {
|
|
197
197
|
let n = O.value.clone();
|
|
198
198
|
for (let r = 0; r < 366; r++) if (n = n.add(e, t), !G(n)) return n;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ItemGetter } from '../../types/ItemAccessor.js';
|
|
2
|
+
import { ItemKeyInput, MultipleInput, OptionValueOf, SelectModelOf } from '../../types/ItemPath.js';
|
|
1
3
|
import { BbCheckboxGroupEvents, BbCheckboxGroupSlots } from './types.js';
|
|
2
|
-
declare const __VLS_export: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
declare const __VLS_export: <const T = any, A extends string | ((...args: never[]) => unknown) | undefined = undefined, Tx extends string | undefined = undefined, M extends boolean = true>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
5
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<({
|
|
4
6
|
[x: `pt:${string}&${string}`]: unknown;
|
|
5
7
|
} & {
|
|
@@ -204,10 +206,14 @@ declare const __VLS_export: <T = any>(__VLS_props: NonNullable<Awaited<typeof __
|
|
|
204
206
|
"indicator:line"?: import('../../types/passthrough.js').PtValue | undefined;
|
|
205
207
|
}) | undefined;
|
|
206
208
|
variant?: import('../../index.js').CheckboxVariantType;
|
|
207
|
-
} &
|
|
209
|
+
} & {
|
|
210
|
+
itemValue?: ItemKeyInput<T, A> | ItemGetter<T, any>;
|
|
211
|
+
itemText?: ItemKeyInput<T, Tx> | ItemGetter<T, string>;
|
|
212
|
+
multiple?: MultipleInput<M, true>;
|
|
213
|
+
} & Omit<import('vue').HTMLAttributes, "legend" | "reverse" | `pt:${string}&${string}` | "readonly" | "disabled" | "warnings" | "errors" | "description" | "hint" | "pt" | "block" | "onClick" | "variant" | "dependencies" | "compact" | "layout" | "inputPosition" | "listLayout" | "itemLayout" | "itemReverse" | "modelValue" | "autofocus" | "labelAlign" | "inputAlign" | "hasErrors" | "hasWarnings" | "hideLabel" | "id" | "name" | "persistentHint" | keyof import('../../composables/useFormBinding.js').FormFieldProps<any> | keyof import('./ptKeys.generated.js').BbCheckboxGroupPtKeys | "depsDebounceTime" | "enforceCoherence" | "hideLegend" | "items" | "itemText" | "itemValue" | "itemProps" | "itemLabelAlign" | "itemInputAlign" | "legendPosition" | "legendMode" | "loadingText" | "max" | "multiple" | "modelValueDebounceTime" | "emptyText" | "failedText" | "selectable" | "onFocus" | "onBlur" | "onChange" | "onInput" | "onKeydown" | "onMousedown" | "onMouseup"> & {}) & {
|
|
208
214
|
onActive?: (() => any) | undefined;
|
|
209
215
|
onInput?: ((event: Event) => any) | undefined;
|
|
210
|
-
"onUpdate:modelValue"?: ((value:
|
|
216
|
+
"onUpdate:modelValue"?: ((value: SelectModelOf<OptionValueOf<T, A>, M>) => any) | undefined;
|
|
211
217
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
212
218
|
onInactive?: (() => any) | undefined;
|
|
213
219
|
onChange?: ((event: Event) => any) | undefined;
|
|
@@ -222,7 +228,7 @@ declare const __VLS_export: <T = any>(__VLS_props: NonNullable<Awaited<typeof __
|
|
|
222
228
|
expose: (exposed: {}) => void;
|
|
223
229
|
attrs: any;
|
|
224
230
|
slots: BbCheckboxGroupSlots<T>;
|
|
225
|
-
emit: BbCheckboxGroupEvents
|
|
231
|
+
emit: BbCheckboxGroupEvents<SelectModelOf<OptionValueOf<T, A>, M>>;
|
|
226
232
|
}>) => import('vue').VNode & {
|
|
227
233
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
228
234
|
};
|
package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -271,7 +271,7 @@ var A = /*@__PURE__*/ x({
|
|
|
271
271
|
clientReproducible: Fe,
|
|
272
272
|
trigger: !0,
|
|
273
273
|
currentValue: M.modelValue,
|
|
274
|
-
multiple: M.multiple,
|
|
274
|
+
multiple: !!M.multiple,
|
|
275
275
|
fn: async () => {
|
|
276
276
|
await z(void 0, "initial", M.modelValue) === "applied" && V();
|
|
277
277
|
}
|
|
@@ -299,7 +299,7 @@ var A = /*@__PURE__*/ x({
|
|
|
299
299
|
key: "valueHash"
|
|
300
300
|
}), { coherent: K, coherentValue: We } = h({
|
|
301
301
|
modelValue: D(() => M.modelValue),
|
|
302
|
-
multiple: M.multiple,
|
|
302
|
+
multiple: !!M.multiple,
|
|
303
303
|
iteratee: (e) => !!Ue.value[ee(e)]
|
|
304
304
|
}), q = 0;
|
|
305
305
|
g(() => M.modelValue, async () => {
|
|
@@ -291,7 +291,7 @@ export type BbCheckboxGroupBaseProps<T> = {
|
|
|
291
291
|
*/
|
|
292
292
|
selectable?: boolean | ((item: T) => boolean);
|
|
293
293
|
} & FormFieldProps<any>;
|
|
294
|
-
export type BbCheckboxGroupEvents = {
|
|
294
|
+
export type BbCheckboxGroupEvents<V = any> = {
|
|
295
295
|
/**
|
|
296
296
|
* Emitted when one of the generated checkbox inputs loses focus.
|
|
297
297
|
* Forwards the original DOM `FocusEvent`.
|
|
@@ -342,7 +342,7 @@ export type BbCheckboxGroupEvents = {
|
|
|
342
342
|
/**
|
|
343
343
|
* Emitted with the coherent next selection array whenever selection changes.
|
|
344
344
|
*/
|
|
345
|
-
(e: 'update:modelValue', value:
|
|
345
|
+
(e: 'update:modelValue', value: V): void;
|
|
346
346
|
};
|
|
347
347
|
/**
|
|
348
348
|
* BbCheckboxGroup's `pt:*` attributes: the documented keys, and the patterns
|
|
@@ -12,16 +12,16 @@ var d = /*@__PURE__*/ o({
|
|
|
12
12
|
setup(o) {
|
|
13
13
|
let d = o;
|
|
14
14
|
r();
|
|
15
|
-
let f = s(n, null), p = t, m = process.env.NODE_ENV === "production" ? null : e(), h = /* @__PURE__ */ new Set(), g, _, v = a(() => {
|
|
15
|
+
let f = s(n, null), p = t, m = process.env.NODE_ENV === "production" ? null : e(), h = /* @__PURE__ */ new Set(), g = (e) => Array.isArray(e) ? e.map(g) : e && typeof e == "object" && [Object.prototype, null].includes(Object.getPrototypeOf(u(e))) ? Object.fromEntries(Object.entries(u(e)).map(([e, t]) => [e, g(t)])) : e, _, v, y = a(() => {
|
|
16
16
|
let e = d.config;
|
|
17
|
-
if (!e) return
|
|
18
|
-
let t = JSON.stringify(u(e));
|
|
19
|
-
if (t ===
|
|
17
|
+
if (!e) return _ = v = void 0;
|
|
18
|
+
let t = JSON.stringify(u(e), (e, t) => typeof t == "function" ? `fn:${String(t)}` : t);
|
|
19
|
+
if (t === _ && v) return v;
|
|
20
20
|
if (m) for (let [t, n] of Object.entries(e)) for (let e of Object.keys(n ?? {})) (e === "variants" || p[t]?.includes(e)) && !h.has(`${t}.${e}`) && (h.add(`${t}.${e}`), m.warn(`BbConfigScope: \`config.${t}.${e}\` is app-wide only and is ignored here. Set it in the plugin's \`components\` map.`));
|
|
21
|
-
return
|
|
21
|
+
return _ = t, v = {
|
|
22
22
|
source: "<BbConfigScope :config>",
|
|
23
|
-
map:
|
|
24
|
-
},
|
|
23
|
+
map: g(u(e))
|
|
24
|
+
}, v;
|
|
25
25
|
});
|
|
26
26
|
return c(n, a(() => {
|
|
27
27
|
let e = [...f?.value ?? []];
|
|
@@ -29,7 +29,7 @@ var d = /*@__PURE__*/ o({
|
|
|
29
29
|
source: `configScopes.${d.name}`,
|
|
30
30
|
map: i.value[d.name] ?? {}
|
|
31
31
|
});
|
|
32
|
-
let t =
|
|
32
|
+
let t = y.value;
|
|
33
33
|
return t && e.push(t), e;
|
|
34
34
|
})), (e, t) => l(e.$slots, "default");
|
|
35
35
|
}
|