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
|
@@ -173,7 +173,8 @@ var c = () => i("svg", {
|
|
|
173
173
|
"bb-table__row--highlighted": t.highlighted,
|
|
174
174
|
"bb-table__row--highlightable": t.highlightable,
|
|
175
175
|
"bb-table__row--expanded": t.expanded,
|
|
176
|
-
"bb-table__row--disabled": n.disabled
|
|
176
|
+
"bb-table__row--disabled": n.disabled,
|
|
177
|
+
"bb-table__row--menu": e.menuRows.has(t.valueHash)
|
|
177
178
|
}
|
|
178
179
|
],
|
|
179
180
|
"data-index": r.virtualIndex,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import e from "../BbDropdown/BbDropdown.vue.js";
|
|
2
|
+
import { provideDropdownHandle as t } from "../BbDropdown/dropdownHandle.js";
|
|
3
|
+
import { defineComponent as n, h as r } from "vue";
|
|
4
|
+
// src/components/BbTable/BbTableRowMenu.ts
|
|
5
|
+
var i = n({
|
|
6
|
+
name: "BbTableRowMenu",
|
|
7
|
+
props: {
|
|
8
|
+
items: {
|
|
9
|
+
type: Array,
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
label: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: void 0
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
emits: ["hide"],
|
|
18
|
+
setup(n, { emit: i, expose: a }) {
|
|
19
|
+
let o = null;
|
|
20
|
+
return t((e) => {
|
|
21
|
+
o = e;
|
|
22
|
+
}), a({
|
|
23
|
+
open: (...e) => o?.open(...e),
|
|
24
|
+
close: () => o?.close(),
|
|
25
|
+
isOpen: () => !!o?.isOpen()
|
|
26
|
+
}), () => r(e, {
|
|
27
|
+
items: n.items,
|
|
28
|
+
placement: "cursor",
|
|
29
|
+
trigger: [],
|
|
30
|
+
pt: { list: { attrs: { "aria-label": n.label } } },
|
|
31
|
+
onHide: () => i("hide"),
|
|
32
|
+
onHidden: () => i("hide")
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export { i as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Classes } from '../../types/Classes.js';
|
|
2
|
+
import { Item as DropdownItem } from '../BbDropdown/types.js';
|
|
2
3
|
import { PtCompoundProps, PtNoInfer, PtItemCtx, PtScopedItemMap, PtItemResult, PtValue } from '../../types/passthrough.js';
|
|
3
4
|
import { ItemAccessor } from '../../types/ItemAccessor.js';
|
|
4
5
|
import { BbTableItemsContext } from '../../types/ItemsProvider.js';
|
|
@@ -76,6 +77,7 @@ export type BaseColumn<Item> = {
|
|
|
76
77
|
};
|
|
77
78
|
/**
|
|
78
79
|
* Column definition for BbTable. Controls data extraction, formatting, alignment, and styling.
|
|
80
|
+
* Declare an array as `[...] satisfies Array<BbTableColumn<Row>>`: an annotation widens the keys and the table stops checking them.
|
|
79
81
|
*/
|
|
80
82
|
export type BbTableColumn<Item = any> = BaseColumn<Item> & {
|
|
81
83
|
/**
|
|
@@ -368,7 +370,8 @@ export type BbTableProps<Item = any> = BbTablePtProps & {
|
|
|
368
370
|
*
|
|
369
371
|
* Optional: the component defaults to `[]` (columns can also come entirely
|
|
370
372
|
* from slots/virtual keys), so the type no longer demands what the runtime
|
|
371
|
-
* never required.
|
|
373
|
+
* never required. In script, `[...] satisfies Array<BbTableColumn<Row>>`
|
|
374
|
+
* keeps the per-key check an annotation turns off.
|
|
372
375
|
*/
|
|
373
376
|
columns?: Array<BbTableColumn<Item>>;
|
|
374
377
|
/**
|
|
@@ -475,6 +478,8 @@ export type BbTableProps<Item = any> = BbTablePtProps & {
|
|
|
475
478
|
* details are open), a single item value or `null`. Opt-in: bound,
|
|
476
479
|
* a row click highlights; unbound, it only emits `click:row`. The row gets
|
|
477
480
|
* `aria-current="true"` and a shipped tint.
|
|
481
|
+
*
|
|
482
|
+
* @defaultValue `undefined` (unset: whether it is bound is read off it)
|
|
478
483
|
*/
|
|
479
484
|
highlighted?: any;
|
|
480
485
|
/**
|
|
@@ -634,6 +639,13 @@ export type BbTableProps<Item = any> = BbTablePtProps & {
|
|
|
634
639
|
* Classes for each data row, or a function of the row's item.
|
|
635
640
|
*/
|
|
636
641
|
rowClass?: RowClasses<Item>;
|
|
642
|
+
/**
|
|
643
|
+
* A row's context menu: right-click, a long press on touch, or Shift+F10 /
|
|
644
|
+
* the Menu key on a focused row open one shared menu with these items.
|
|
645
|
+
* Never on an in-row control; with no visible item the browser's menu
|
|
646
|
+
* shows. Reuse it for the visible `#actions` menu.
|
|
647
|
+
*/
|
|
648
|
+
rowMenu?: (item: PtNoInfer<Item>) => DropdownItem[];
|
|
637
649
|
/**
|
|
638
650
|
* Makes rows selectable: a boolean for every row, or a function of the
|
|
639
651
|
* row's item deciding for that row.
|
|
@@ -772,7 +784,7 @@ export type ExpandControllerProps = {
|
|
|
772
784
|
onClick: () => void;
|
|
773
785
|
onKeydown: (event: KeyboardEvent) => void;
|
|
774
786
|
};
|
|
775
|
-
export type BbTableEvents<Item = any> = {
|
|
787
|
+
export type BbTableEvents<Item = any, V = any, Model = any> = {
|
|
776
788
|
/**
|
|
777
789
|
* A body row was clicked, or activated with Enter/Space under
|
|
778
790
|
* `keyboardNavigation`. Carries the DOM `MouseEvent` and the raw record.
|
|
@@ -782,8 +794,8 @@ export type BbTableEvents<Item = any> = {
|
|
|
782
794
|
(e: 'contextmenu:row', event: MouseEvent, item: PtNoInfer<Item>): void;
|
|
783
795
|
/** A body row was double-clicked. Carries the DOM `MouseEvent` and the raw record. */
|
|
784
796
|
(e: 'dblclick:row', event: MouseEvent, item: PtNoInfer<Item>): void;
|
|
785
|
-
(e: 'update:highlighted', value:
|
|
786
|
-
(e: 'update:modelValue', value:
|
|
797
|
+
(e: 'update:highlighted', value: V | null): void;
|
|
798
|
+
(e: 'update:modelValue', value: Model): void;
|
|
787
799
|
(e: 'update:selectAll', value: boolean): void;
|
|
788
800
|
(e: 'update:sort', value: BbTableSortEntry[]): void;
|
|
789
801
|
(e: 'update:order', value: string[]): void;
|
|
@@ -807,15 +819,15 @@ export type BbTableEvents<Item = any> = {
|
|
|
807
819
|
* write `hidden: true` into the column definition to persist it.
|
|
808
820
|
*/
|
|
809
821
|
(e: 'hide:column', key: string): void;
|
|
810
|
-
(e: 'update:expandedItems', value:
|
|
811
|
-
(e: 'update:unselectedItems', value:
|
|
822
|
+
(e: 'update:expandedItems', value: V[]): void;
|
|
823
|
+
(e: 'update:unselectedItems', value: V[]): void;
|
|
812
824
|
/**
|
|
813
825
|
* The user selected one row. Carries the row's value (read through
|
|
814
826
|
* `itemValue`, the same value the selection v-model holds).
|
|
815
827
|
*/
|
|
816
|
-
(e: 'item:selected', value:
|
|
828
|
+
(e: 'item:selected', value: V): void;
|
|
817
829
|
/** The user unselected one row. Carries the row's value, like `item:selected`. */
|
|
818
|
-
(e: 'item:unselected', value:
|
|
830
|
+
(e: 'item:unselected', value: V): void;
|
|
819
831
|
};
|
|
820
832
|
/**
|
|
821
833
|
* Props exposed by the table-wide `header:prepend` / `header:append` slots and
|
|
@@ -863,8 +875,9 @@ export type BbTableEdgeCellSlotProps<Item> = {
|
|
|
863
875
|
* Scope of a column's body-cell slot `#<key>`. A data cell always has a row,
|
|
864
876
|
* so `item` is required.
|
|
865
877
|
*/
|
|
866
|
-
export type BbTableCellSlotProps<Item> = {
|
|
878
|
+
export type BbTableCellSlotProps<Item, V = any> = {
|
|
867
879
|
classes?: Classes;
|
|
880
|
+
/** This cell: the value at the column `key`, after its `formatter`. */
|
|
868
881
|
content?: any;
|
|
869
882
|
expanded?: boolean;
|
|
870
883
|
expandProps?: ExpandControllerProps;
|
|
@@ -875,7 +888,8 @@ export type BbTableCellSlotProps<Item> = {
|
|
|
875
888
|
toggleSelected?: () => void;
|
|
876
889
|
sortOrder?: 'asc' | 'desc' | null;
|
|
877
890
|
item: Item;
|
|
878
|
-
value
|
|
891
|
+
/** The row's value through `item-value` (its id), not this cell: read the cell from `content`. */
|
|
892
|
+
value?: V;
|
|
879
893
|
};
|
|
880
894
|
/** Scope of a column's header slot `#<key>:header`. Headers have no row. */
|
|
881
895
|
export type BbTableHeaderSlotProps<Item> = {
|
|
@@ -893,21 +907,22 @@ export type BbTableHeaderSlotProps<Item> = {
|
|
|
893
907
|
* The per-column slots, by name shape. One `Record<string, …>` used to
|
|
894
908
|
* type them all, so `#<key>` got an optional `item` and `#<key>:header` the
|
|
895
909
|
* body scope wherever the column keys are not literal (a wrapper declaring
|
|
896
|
-
* `defineSlots<BbTableSlots<Row>>()`, a `BbTableColumn<Row>[]`
|
|
910
|
+
* `defineSlots<BbTableSlots<Row>>()`, a variable annotated `BbTableColumn<Row>[]`
|
|
911
|
+
* instead of `[...] satisfies Array<BbTableColumn<Row>>`). A key
|
|
897
912
|
* matching a template-literal index signature skips the `string` one, so each
|
|
898
913
|
* shape resolves to its own scope. It comes FIRST in {@link BbTableSlots}: vue-tsc
|
|
899
914
|
* reads a slot's scope from the last signature, so the named slots win.
|
|
900
915
|
*/
|
|
901
|
-
type BbTableColumnSlots<Item> = Record<string, (props: BbTableCellSlotProps<Item>) => any> & Record<`${string}:${'first' | 'last'}`, (props: BbTableEdgeCellSlotProps<Item>) => any> & Record<`${string}:header`, (props: BbTableHeaderSlotProps<Item>) => any> & Record<`${string}:header:${HeaderAffixSuffix}`, (props: BbTableHeaderAffixSlotProps<Item>) => any>;
|
|
916
|
+
type BbTableColumnSlots<Item, V> = Record<string, (props: BbTableCellSlotProps<Item, V>) => any> & Record<`${string}:${'first' | 'last'}`, (props: BbTableEdgeCellSlotProps<Item>) => any> & Record<`${string}:header`, (props: BbTableHeaderSlotProps<Item>) => any> & Record<`${string}:header:${HeaderAffixSuffix}`, (props: BbTableHeaderAffixSlotProps<Item>) => any>;
|
|
902
917
|
/**
|
|
903
|
-
* @dynamicSlot `<key>` - One column's body cell in every row, by the column `key` through `slotKey`. Scope: `{ item, value, content, selected, expanded, highlighted, classes, sortOrder, toggleSelected, toggleExpanded, toggleHighlighted, expandProps }`.
|
|
918
|
+
* @dynamicSlot `<key>` - One column's body cell in every row, by the column `key` through `slotKey`. Scope: `{ item, value, content, selected, expanded, highlighted, classes, sortOrder, toggleSelected, toggleExpanded, toggleHighlighted, expandProps }`; `content` is this cell, `value` the row's `item-value`.
|
|
904
919
|
* @dynamicSlot `<key>:header` - One column's header content, replacing its label and the built-in sort button. Scope: `{ label, items, sortable, sortOrder, toggleSort, hideColumn, classes }`.
|
|
905
920
|
* @dynamicSlot `<key>:header:prepend` {BbTableHeaderAffixSlotProps<Item>} - Content before one column's header, keeping the sort button; beats `header:prepend` (they never stack).
|
|
906
921
|
* @dynamicSlot `<key>:header:append` {BbTableHeaderAffixSlotProps<Item>} - Content after one column's header, keeping the sort button; beats `header:append` (they never stack).
|
|
907
922
|
* @dynamicSlot `<key>:first` {BbTableEdgeCellSlotProps<Item>} - One column's cell in a row before the data rows; any such slot creates the row, aligned with the columns. Only over rows.
|
|
908
923
|
* @dynamicSlot `<key>:last` {BbTableEdgeCellSlotProps<Item>} - One column's cell in a row after the data rows (a totals row); any such slot creates that row, aligned like `<key>:first`.
|
|
909
924
|
*/
|
|
910
|
-
export type BbTableSlots<Item = any> = BbTableColumnSlots<Item> & {
|
|
925
|
+
export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
|
|
911
926
|
/**
|
|
912
927
|
* Replaces the header row group's content (`.bb-table__head`). The table is
|
|
913
928
|
* a CSS grid: provide `<div role="row">` rows of `<div
|
|
@@ -1020,7 +1035,7 @@ export type BbTableSlots<Item = any> = BbTableColumnSlots<Item> & {
|
|
|
1020
1035
|
selected?: boolean;
|
|
1021
1036
|
toggleSelected?: () => void;
|
|
1022
1037
|
item: Item;
|
|
1023
|
-
value:
|
|
1038
|
+
value: V;
|
|
1024
1039
|
}) => any;
|
|
1025
1040
|
/**
|
|
1026
1041
|
* Full-width expandable content row rendered below each main row when expanded.
|
|
@@ -1043,7 +1058,7 @@ export type BbTableSlots<Item = any> = BbTableColumnSlots<Item> & {
|
|
|
1043
1058
|
selected?: boolean;
|
|
1044
1059
|
toggleSelected?: () => void;
|
|
1045
1060
|
item: Item;
|
|
1046
|
-
value:
|
|
1061
|
+
value: V;
|
|
1047
1062
|
}) => any;
|
|
1048
1063
|
/**
|
|
1049
1064
|
* Replaces the default checkbox/radio in the selection cell for each row.
|
|
@@ -1057,7 +1072,7 @@ export type BbTableSlots<Item = any> = BbTableColumnSlots<Item> & {
|
|
|
1057
1072
|
*/
|
|
1058
1073
|
select?: (props: {
|
|
1059
1074
|
item: Item;
|
|
1060
|
-
value:
|
|
1075
|
+
value: V;
|
|
1061
1076
|
checked: boolean;
|
|
1062
1077
|
disabled: boolean;
|
|
1063
1078
|
inputName: string;
|
|
@@ -133,11 +133,11 @@ var pe = { class: "bb-tabs-list__prepend" }, me = ["aria-orientation", "role"],
|
|
|
133
133
|
}, q = b(0), J = b(0), ke = b(0), Ae = b(0), Y = b(!1), X = () => {
|
|
134
134
|
if (!I.value) return;
|
|
135
135
|
let e = I.value.querySelector(".bb-tabs-list__item--active");
|
|
136
|
-
e
|
|
136
|
+
e ? (ke.value = e.offsetLeft, Ae.value = e.offsetTop, q.value = e.clientWidth, J.value = e.clientHeight, !Y.value && e.clientWidth > 0 && requestAnimationFrame(() => {
|
|
137
137
|
requestAnimationFrame(() => {
|
|
138
138
|
Y.value = !0;
|
|
139
139
|
});
|
|
140
|
-
}));
|
|
140
|
+
})) : (q.value = 0, J.value = 0);
|
|
141
141
|
}, Z = async () => {
|
|
142
142
|
K(), await v(), X(), z(), W();
|
|
143
143
|
}, je = fe(Z, 200, !0), Q, $ = () => {
|
|
@@ -76,6 +76,12 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
|
|
|
76
76
|
* tab is inactive.
|
|
77
77
|
*/
|
|
78
78
|
eager?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Leaves the tab out: no trigger, no panel, not reachable by keyboard or
|
|
81
|
+
* by the URL. A `v-model` naming it keeps it, and the strip then shows no
|
|
82
|
+
* active tab and no panel.
|
|
83
|
+
*/
|
|
84
|
+
hidden?: boolean;
|
|
79
85
|
/**
|
|
80
86
|
* The page this tab links to. Any item with `href` or `to` makes the strip
|
|
81
87
|
* a set of links (link mode): a `<nav>` of real `<a>`s with
|
|
@@ -56,7 +56,7 @@ declare const __VLS_export: <E extends NullValuePolicy = RegisteredNullValue<"Bb
|
|
|
56
56
|
required?: boolean;
|
|
57
57
|
reverse?: boolean;
|
|
58
58
|
type?: "text" | "email" | "url" | "tel" | "search" | "password";
|
|
59
|
-
} & import('../../composables/useFormBinding.js').FormFieldProps<string | null> & Omit<import('vue').HTMLAttributes, "label" | "reverse" | `pt:${string}&${string}` | "placeholder" | "readonly" | "disabled" | "warnings" | "errors" | "loading" | "description" | "hint" | "type" | "pt" | "
|
|
59
|
+
} & import('../../composables/useFormBinding.js').FormFieldProps<string | null> & Omit<import('vue').HTMLAttributes, "label" | "reverse" | `pt:${string}&${string}` | "placeholder" | "readonly" | "disabled" | "warnings" | "errors" | "loading" | "description" | "hint" | "type" | "pt" | "onClick" | "variant" | "prepend:icon" | "append:icon" | "compact" | "layout" | "labelMode" | "autocomplete" | "nullValue" | "modelValue" | "clearable" | "autofocus" | "labelAlign" | "inputAlign" | "hasErrors" | "hasWarnings" | "hideLabel" | "id" | "labelPosition" | "name" | "persistentHint" | "required" | keyof import('../../composables/useFormBinding.js').FormFieldProps<string | null> | "counter" | keyof import('./ptKeys.generated.js').BbTextInputPtKeys | "emitMasked" | "inputMode" | "mask" | "onPaste" | "onCompositionend" | "onCompositionstart" | "onFocus" | "onBlur" | "onChange" | "onInput" | "onKeydown" | "onKeyup" | "onMousedown" | "onMouseup"> & {} & ControlAttrs<"input", "list" | "form" | "maxlength" | "minlength" | "pattern" | "spellcheck" | "autocapitalize" | "autocorrect" | "enterkeyhint" | "inputmode" | "dirname" | "wrap">) & {
|
|
60
60
|
onInput?: ((event: Event) => any) | undefined;
|
|
61
61
|
"onUpdate:modelValue"?: ((value: string | NullValueOf<E>) => any) | undefined;
|
|
62
62
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
@@ -54,7 +54,7 @@ declare const __VLS_export: <E extends NullValuePolicy = RegisteredNullValue<"Bb
|
|
|
54
54
|
required?: boolean;
|
|
55
55
|
reverse?: boolean;
|
|
56
56
|
rows?: string | number;
|
|
57
|
-
} & import('../../composables/useFormBinding.js').FormFieldProps<string | null> & Omit<import('vue').HTMLAttributes, "label" | "reverse" | `pt:${string}&${string}` | "placeholder" | "readonly" | "disabled" | "warnings" | "errors" | "loading" | "description" | "hint" | "pt" | "
|
|
57
|
+
} & import('../../composables/useFormBinding.js').FormFieldProps<string | null> & Omit<import('vue').HTMLAttributes, "label" | "reverse" | `pt:${string}&${string}` | "placeholder" | "readonly" | "disabled" | "warnings" | "errors" | "loading" | "description" | "hint" | "pt" | "onClick" | "variant" | "prepend:icon" | "append:icon" | "compact" | "layout" | "labelMode" | "autocomplete" | "nullValue" | "autoGrow" | "modelValue" | "clearable" | "autofocus" | "labelAlign" | "inputAlign" | "hasErrors" | "hasWarnings" | "hideLabel" | "id" | "labelPosition" | "name" | "persistentHint" | "required" | keyof import('../../composables/useFormBinding.js').FormFieldProps<string | null> | "counter" | keyof import('./ptKeys.generated.js').BbTextareaPtKeys | "rows" | "onPaste" | "onCompositionend" | "onCompositionstart" | "onFocus" | "onBlur" | "onChange" | "onInput" | "onKeydown" | "onKeyup" | "onMousedown" | "onMouseup"> & {} & ControlAttrs<"textarea", "list" | "form" | "maxlength" | "minlength" | "pattern" | "spellcheck" | "autocapitalize" | "autocorrect" | "enterkeyhint" | "inputmode" | "dirname" | "wrap">) & {
|
|
58
58
|
onInput?: ((event: Event) => any) | undefined;
|
|
59
59
|
"onUpdate:modelValue"?: ((value: string | NullValueOf<E>) => any) | undefined;
|
|
60
60
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
@@ -62,7 +62,7 @@ declare const __VLS_export: <R extends boolean = false>(__VLS_props: NonNullable
|
|
|
62
62
|
seconds?: boolean;
|
|
63
63
|
step?: number;
|
|
64
64
|
transitionDuration?: number;
|
|
65
|
-
} & import('../../composables/useFormBinding.js').FormFieldProps<string | string[] | null> & BbTimePickerInputModelProps<R> & Omit<import('vue').HTMLAttributes, "label" | "reverse" | `pt:${string}&${string}` | "placeholder" | "readonly" | "disabled" | "warnings" | "errors" | "loading" | "description" | "hint" | "step" | "pt" | "onError" | "
|
|
65
|
+
} & import('../../composables/useFormBinding.js').FormFieldProps<string | string[] | null> & BbTimePickerInputModelProps<R> & Omit<import('vue').HTMLAttributes, "label" | "reverse" | `pt:${string}&${string}` | "placeholder" | "readonly" | "disabled" | "warnings" | "errors" | "loading" | "description" | "hint" | "step" | "pt" | "onError" | "variant" | "prepend:icon" | "append:icon" | "compact" | "layout" | "labelMode" | "autocomplete" | "adaptive" | "transitionDuration" | "clearable" | "autofocus" | "labelAlign" | "inputAlign" | "hasErrors" | "hasWarnings" | "hideLabel" | "id" | "labelPosition" | "name" | "persistentHint" | "required" | "max" | "offCanvasProps" | "seconds" | "ampm" | "min" | "disableWriting" | keyof import('../../composables/useFormBinding.js').FormFieldProps<string | string[] | null> | keyof import('./ptKeys.generated.js').BbTimePickerInputPtKeys | "onFocus" | keyof BbTimePickerInputModelProps<R>> & {} & ControlAttrs<"input", "form" | "spellcheck" | "autocapitalize" | "autocorrect" | "enterkeyhint">) & {
|
|
66
66
|
onActive?: (() => any) | undefined;
|
|
67
67
|
"onUpdate:modelValue"?: ((value: import('../../index.js').BbTimeValue<R>) => any) | undefined;
|
|
68
68
|
onInactive?: (() => any) | undefined;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { actionButtonProps as e } from "../../types/ActionButton.js";
|
|
2
|
+
import t from "../../assets/svgs/x.svg_raw.js";
|
|
3
|
+
import { useLocale as n } from "../../composables/useLocale.js";
|
|
4
|
+
import { useConfig as ee } from "../../composables/useConfig.js";
|
|
4
5
|
import r from "../BbIcon/BbIcon.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { namedToastPortalRegistry as
|
|
8
|
-
import { Fragment as
|
|
6
|
+
import te from "../BbSpinner/BbSpinner.vue.js";
|
|
7
|
+
import ne from "../BbButton/BbButton.vue.js";
|
|
8
|
+
import { namedToastPortalRegistry as re } from "../../composables/useToast.js";
|
|
9
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as ie, defineComponent as u, mergeProps as d, normalizeProps as f, onBeforeUnmount as ae, onMounted as oe, openBlock as p, ref as m, renderList as se, resolveDynamicComponent as h, toDisplayString as g, unref as _, watch as v } from "vue";
|
|
9
10
|
// src/components/BbToast/BbToastMessage.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
11
|
+
var ce = ["aria-live", "role"], le = ["aria-label"], ue = 3, y = 4e3, b = /*@__PURE__*/ u({
|
|
11
12
|
__name: "BbToastMessage",
|
|
12
13
|
props: {
|
|
13
14
|
toast: {},
|
|
@@ -20,148 +21,141 @@ var oe = ["aria-live", "role"], se = ["aria-label"], ce = 3, b = 4e3, x = /*@__P
|
|
|
20
21
|
passthrough: {}
|
|
21
22
|
},
|
|
22
23
|
emits: ["height", "dismiss"],
|
|
23
|
-
setup(
|
|
24
|
-
let
|
|
25
|
-
toast:
|
|
26
|
-
data:
|
|
24
|
+
setup(u, { emit: b }) {
|
|
25
|
+
let x = u, S = b, C = (e) => x.passthrough?.part?.(e, { loading: !!x.toast.loading }, void 0, x.toast.variant), { t: de } = n(), w = m(), T = m(), E = m(!1), D = m(0), fe = a(() => x.frontIndex === 0), O = a(() => x.frontIndex < ue), pe = a(() => !Number.isFinite(x.toast.duration ?? y)), me = a(() => !x.toast.hideClose), k = a(() => x.toast.variant === "destructive" || x.toast.variant === "warning"), he = a(() => k.value ? "alert" : "status"), ge = a(() => !O.value || x.toast.removed ? "off" : k.value ? "assertive" : "polite"), _e = ee(), A = a(() => x.toast.hideIcon ? void 0 : x.toast.icon ?? _e.variantIcons?.toast?.[x.toast.variant]), ve = a(() => x.toast.loading || !!A.value), j = a(() => typeof x.toast.portal == "string" ? re.get(x.toast.portal) ?? null : null), M = a(() => x.toast.portal && typeof x.toast.portal != "string" ? x.toast.portal : null), N = a(() => !!j.value || !!M.value), P = a(() => ({
|
|
26
|
+
toast: x.toast,
|
|
27
|
+
data: x.toast.data ?? {},
|
|
27
28
|
close: $
|
|
28
|
-
})),
|
|
29
|
-
...
|
|
29
|
+
})), ye = a(() => ({
|
|
30
|
+
...x.toast.data ?? {},
|
|
30
31
|
close: $
|
|
31
|
-
})), F =
|
|
32
|
-
"--front-index":
|
|
33
|
-
"--height-before": `${
|
|
34
|
-
"--front-height": `${
|
|
35
|
-
"--toast-height": `${
|
|
36
|
-
"--z":
|
|
32
|
+
})), F = a(() => x.position.startsWith("top") ? "top" : "bottom"), I = m(0), L = m(!1), be = a(() => ({
|
|
33
|
+
"--front-index": x.frontIndex,
|
|
34
|
+
"--height-before": `${x.heightBefore}px`,
|
|
35
|
+
"--front-height": `${x.frontHeight}px`,
|
|
36
|
+
"--toast-height": `${D.value}px`,
|
|
37
|
+
"--z": x.total - x.frontIndex,
|
|
37
38
|
"--swipe-amount": `${I.value}px`
|
|
38
39
|
})), R, z, B = () => {
|
|
39
|
-
if (!
|
|
40
|
-
let e =
|
|
41
|
-
n !==
|
|
42
|
-
}, V =
|
|
40
|
+
if (!T.value) return;
|
|
41
|
+
let e = w.value, t = e ? e.offsetHeight - e.clientHeight : 0, n = T.value.offsetHeight + t;
|
|
42
|
+
n !== D.value && (D.value = n, S("height", x.toast.id, n));
|
|
43
|
+
}, V = m(null), xe = async (e) => {
|
|
43
44
|
if (V.value !== null) return;
|
|
44
|
-
let t =
|
|
45
|
+
let t = x.toast.actions?.[e];
|
|
45
46
|
if (!t) return;
|
|
46
47
|
V.value = e, J();
|
|
47
|
-
let n =
|
|
48
|
+
let n = x.toast.updatedAt;
|
|
48
49
|
try {
|
|
49
|
-
if (t.onClick && await t.onClick(), V.value = null,
|
|
50
|
+
if (t.onClick && await t.onClick(), V.value = null, x.toast.updatedAt !== n) {
|
|
50
51
|
Y();
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
+
S("dismiss", x.toast.id, "action");
|
|
54
55
|
} catch {
|
|
55
|
-
V.value = null,
|
|
56
|
+
V.value = null, x.paused || q();
|
|
56
57
|
}
|
|
57
|
-
}, H =
|
|
58
|
+
}, H = a(() => x.toast.duration ?? y), U, W = 0, G = 0, K = () => {
|
|
58
59
|
U && clearTimeout(U), U = void 0;
|
|
59
60
|
}, q = () => {
|
|
60
|
-
K(), V.value === null && Number.isFinite(H.value) && (G = Date.now(), U = setTimeout(() =>
|
|
61
|
+
K(), V.value === null && Number.isFinite(H.value) && (G = Date.now(), U = setTimeout(() => S("dismiss", x.toast.id, "auto"), W));
|
|
61
62
|
}, J = () => {
|
|
62
63
|
U && (K(), W -= Date.now() - G);
|
|
63
64
|
}, Y = () => {
|
|
64
|
-
W = H.value,
|
|
65
|
+
W = H.value, x.paused || q();
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
+
v(() => x.paused, (e) => {
|
|
67
68
|
e ? J() : q();
|
|
68
|
-
}),
|
|
69
|
-
let X = null, Z = 0,
|
|
70
|
-
|
|
71
|
-
},
|
|
69
|
+
}), v(() => [x.toast.updatedAt, H.value], () => Y());
|
|
70
|
+
let X = null, Z = 0, Se = (e) => {
|
|
71
|
+
pe.value || e.button !== 0 || V.value === null && (e.target.closest("button") || (X = e.pointerId, Z = e.clientY, L.value = !0, w.value?.setPointerCapture(e.pointerId)));
|
|
72
|
+
}, Ce = (e) => {
|
|
72
73
|
if (!L.value || e.pointerId !== X) return;
|
|
73
74
|
let t = e.clientY - Z;
|
|
74
75
|
I.value = F.value === "bottom" ? Math.max(0, t) : Math.min(0, t);
|
|
75
76
|
}, Q = (e) => {
|
|
76
|
-
L.value && e.pointerId === X && (L.value = !1, X = null, Math.abs(I.value) > 45 ?
|
|
77
|
-
}, $ = () =>
|
|
78
|
-
return
|
|
79
|
-
B(), R = new ResizeObserver(B),
|
|
77
|
+
L.value && e.pointerId === X && (L.value = !1, X = null, Math.abs(I.value) > 45 ? S("dismiss", x.toast.id, "manual") : I.value = 0);
|
|
78
|
+
}, $ = () => S("dismiss", x.toast.id, "manual");
|
|
79
|
+
return oe(() => {
|
|
80
|
+
B(), R = new ResizeObserver(B), T.value && R.observe(T.value), Y(), z = requestAnimationFrame(() => {
|
|
80
81
|
z = requestAnimationFrame(() => {
|
|
81
|
-
|
|
82
|
+
E.value = !0;
|
|
82
83
|
});
|
|
83
84
|
});
|
|
84
|
-
}),
|
|
85
|
+
}), ae(() => {
|
|
85
86
|
K(), z !== void 0 && cancelAnimationFrame(z), R?.disconnect();
|
|
86
|
-
}), (
|
|
87
|
+
}), (n, ee) => (p(), c("li", d({
|
|
87
88
|
ref_key: "cardEl",
|
|
88
|
-
ref:
|
|
89
|
+
ref: w,
|
|
89
90
|
"aria-atomic": !0,
|
|
90
|
-
"aria-live":
|
|
91
|
-
class: ["bb-toast__panel", [`bb-toast__panel--${
|
|
92
|
-
"bb-toast__panel--front":
|
|
93
|
-
"bb-toast__panel--hidden": !
|
|
94
|
-
"bb-toast__panel--mounted":
|
|
95
|
-
"bb-toast__panel--removed": !!
|
|
91
|
+
"aria-live": ge.value,
|
|
92
|
+
class: ["bb-toast__panel", [`bb-toast__panel--${u.toast.variant}`, {
|
|
93
|
+
"bb-toast__panel--front": fe.value,
|
|
94
|
+
"bb-toast__panel--hidden": !O.value,
|
|
95
|
+
"bb-toast__panel--mounted": E.value,
|
|
96
|
+
"bb-toast__panel--removed": !!u.toast.removed,
|
|
96
97
|
"bb-toast__panel--swiping": L.value
|
|
97
98
|
}]],
|
|
98
|
-
role:
|
|
99
|
-
style:
|
|
99
|
+
role: he.value,
|
|
100
|
+
style: be.value,
|
|
100
101
|
onPointercancel: Q,
|
|
101
|
-
onPointerdown:
|
|
102
|
-
onPointermove:
|
|
102
|
+
onPointerdown: Se,
|
|
103
|
+
onPointermove: Ce,
|
|
103
104
|
onPointerup: Q
|
|
104
|
-
},
|
|
105
|
+
}, C("panel")), [l("div", {
|
|
105
106
|
ref_key: "innerEl",
|
|
106
|
-
ref:
|
|
107
|
+
ref: T,
|
|
107
108
|
class: "bb-toast__inner"
|
|
108
|
-
}, [
|
|
109
|
+
}, [N.value ? (p(), c("div", d({
|
|
109
110
|
key: 0,
|
|
110
111
|
class: "bb-toast__content bb-toast__content--portal"
|
|
111
|
-
},
|
|
112
|
+
}, C("content")), [j.value ? (p(), o(h(j.value), f(d({ key: 0 }, P.value)), null, 16)) : (p(), o(h(M.value), f(d({ key: 1 }, ye.value)), null, 16))], 16)) : (p(), c(i, { key: 1 }, [ve.value ? (p(), c("div", d({
|
|
112
113
|
key: 0,
|
|
113
114
|
"aria-hidden": "true",
|
|
114
115
|
class: "bb-toast__icon"
|
|
115
|
-
},
|
|
116
|
+
}, C("icon")), [u.toast.loading ? (p(), o(te, {
|
|
116
117
|
key: 0,
|
|
117
118
|
size: "sm"
|
|
118
|
-
})) :
|
|
119
|
+
})) : A.value ? (p(), o(r, {
|
|
119
120
|
key: 1,
|
|
120
|
-
icon:
|
|
121
|
-
}, null, 8, ["icon"])) :
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
icon: A.value
|
|
122
|
+
}, null, 8, ["icon"])) : s("", !0)], 16)) : s("", !0), l("div", d({ class: "bb-toast__content" }, C("content")), [
|
|
123
|
+
l("p", d({ class: "bb-toast__title" }, C("title")), g(u.toast.title), 17),
|
|
124
|
+
u.toast.text ? (p(), c("p", d({
|
|
124
125
|
key: 0,
|
|
125
126
|
class: "bb-toast__text"
|
|
126
|
-
},
|
|
127
|
-
|
|
127
|
+
}, C("text")), g(u.toast.text), 17)) : s("", !0),
|
|
128
|
+
u.toast.actions?.length ? (p(), c("div", d({
|
|
128
129
|
key: 1,
|
|
129
130
|
class: "bb-toast__footer"
|
|
130
|
-
},
|
|
131
|
-
key:
|
|
131
|
+
}, C("footer")), [(p(!0), c(i, null, se(u.toast.actions, (t, n) => (p(), o(ne, d({
|
|
132
|
+
key: n,
|
|
132
133
|
class: "bb-toast__action",
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
"append:icon",
|
|
145
|
-
"block",
|
|
134
|
+
disabled: V.value !== null && V.value !== n,
|
|
135
|
+
loading: V.value === n,
|
|
136
|
+
onClick: (e) => xe(n)
|
|
137
|
+
}, { ref_for: !0 }, {
|
|
138
|
+
..._(e)({
|
|
139
|
+
size: "sm",
|
|
140
|
+
variant: "primary",
|
|
141
|
+
...t
|
|
142
|
+
}),
|
|
143
|
+
...C("action")
|
|
144
|
+
}), null, 16, [
|
|
146
145
|
"disabled",
|
|
147
|
-
"icon",
|
|
148
146
|
"loading",
|
|
149
|
-
"prepend:icon",
|
|
150
|
-
"size",
|
|
151
|
-
"text",
|
|
152
|
-
"variant",
|
|
153
147
|
"onClick"
|
|
154
|
-
]))), 128))], 16)) :
|
|
155
|
-
], 16)], 64)),
|
|
148
|
+
]))), 128))], 16)) : s("", !0)
|
|
149
|
+
], 16)], 64)), me.value ? (p(), c("button", d({
|
|
156
150
|
key: 2,
|
|
157
|
-
"aria-label":
|
|
151
|
+
"aria-label": _(de)("common.closeLabel").value,
|
|
158
152
|
class: "bb-toast__close",
|
|
159
153
|
type: "button",
|
|
160
154
|
onClick: $
|
|
161
|
-
},
|
|
162
|
-
icon:
|
|
155
|
+
}, C("close")), [ie(r, {
|
|
156
|
+
icon: _(t),
|
|
163
157
|
size: "100%"
|
|
164
|
-
}, null, 8, ["icon"])], 16,
|
|
158
|
+
}, null, 8, ["icon"])], 16, le)) : s("", !0)], 512)], 16, ce));
|
|
165
159
|
}
|
|
166
160
|
});
|
|
167
|
-
export {
|
|
161
|
+
export { b as default };
|
|
@@ -53,7 +53,7 @@ var O = /*@__PURE__*/ p({
|
|
|
53
53
|
passthrough: k,
|
|
54
54
|
valueFor: j,
|
|
55
55
|
hashFor: M,
|
|
56
|
-
isExpanded: (e) => !e.children?.
|
|
56
|
+
isExpanded: (e) => !e.children?.some((e) => !e.hidden) || N.has(M(e)),
|
|
57
57
|
toggleExpanded: (e) => {
|
|
58
58
|
let t = j(e), n = l(t);
|
|
59
59
|
h.value = n in A.value ? h.value.filter((e) => l(e) !== n) : [...h.value, t];
|
|
@@ -14,10 +14,10 @@ var y = { class: "bb-tree__row" }, b = { class: "bb-tree__content" }, x = ["id",
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
setup(l) {
|
|
17
|
-
let S = l, C = _(), w = u(t, null), T = (e) => {
|
|
17
|
+
let S = l, C = _(), w = u(t, null), T = (e) => !!e.children?.some((e) => !e.hidden), E = (e) => {
|
|
18
18
|
let t = e.expandable ?? S.expandable;
|
|
19
|
-
return typeof t == "function" ? t(e, S.depth, S.parent) :
|
|
20
|
-
},
|
|
19
|
+
return typeof t == "function" ? t(e, S.depth, S.parent) : t === void 0 ? T(e) : t;
|
|
20
|
+
}, D = (e) => typeof e == "string" || typeof e == "number", O = (e, t, n) => ({
|
|
21
21
|
"aria-controls": n,
|
|
22
22
|
"aria-expanded": t ? "true" : "false",
|
|
23
23
|
onClick: (t) => {
|
|
@@ -26,10 +26,10 @@ var y = { class: "bb-tree__row" }, b = { class: "bb-tree__content" }, x = ["id",
|
|
|
26
26
|
onKeydown: (t) => {
|
|
27
27
|
t.target instanceof HTMLElement && (t.target instanceof HTMLButtonElement || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), w?.toggleExpanded(e)));
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
30
|
-
let r = w?.valueFor(t), i = w?.hashFor(t) ?? `${S.depth}:${n}`, a =
|
|
31
|
-
s &&
|
|
32
|
-
let l = s ||
|
|
29
|
+
}), k = /* @__PURE__ */ new Set(), A = r(() => S.items.filter((e) => !e.hidden).map((t, n) => {
|
|
30
|
+
let r = w?.valueFor(t), i = w?.hashFor(t) ?? `${S.depth}:${n}`, a = E(t), o = (t.children ?? []).filter((e) => !e.hidden), s = !a && (t.expandable ?? S.expandable) !== void 0 ? !0 : w?.isExpanded(t) ?? !0, c = w ? `expanded_${w.id}_${i}` : `expanded_${i}`;
|
|
31
|
+
s && k.add(i);
|
|
32
|
+
let l = s || k.has(i), u = D(r) ? e(String(r)) : void 0, d = String(S.depth), f = u && C[u] ? u : C[d] ? d : void 0, p = u && C[`${u}:children`] ? `${u}:children` : C[`${d}:children`] ? `${d}:children` : void 0, m = {
|
|
33
33
|
meta: t.meta,
|
|
34
34
|
item: t,
|
|
35
35
|
parent: S.parent,
|
|
@@ -39,7 +39,7 @@ var y = { class: "bb-tree__row" }, b = { class: "bb-tree__content" }, x = ["id",
|
|
|
39
39
|
expanded: s,
|
|
40
40
|
expandable: a,
|
|
41
41
|
toggleExpanded: () => w?.toggleExpanded(t),
|
|
42
|
-
expandProps:
|
|
42
|
+
expandProps: O(t, s, c)
|
|
43
43
|
};
|
|
44
44
|
return {
|
|
45
45
|
hash: i,
|
|
@@ -58,7 +58,7 @@ var y = { class: "bb-tree__row" }, b = { class: "bb-tree__content" }, x = ["id",
|
|
|
58
58
|
}));
|
|
59
59
|
return (e, t) => {
|
|
60
60
|
let r = h("BbTreeLevel", !0);
|
|
61
|
-
return f(!0), o(n, null, p(
|
|
61
|
+
return f(!0), o(n, null, p(A.value, (t) => (f(), o("div", d({
|
|
62
62
|
key: t.hash,
|
|
63
63
|
class: ["bb-tree__item", {
|
|
64
64
|
[`bb-tree__item--depth-${l.depth}`]: !0,
|
|
@@ -27,6 +27,11 @@ export type BbTreeItem<Meta = any> = {
|
|
|
27
27
|
* Per-node override of the tree-level `expandable`.
|
|
28
28
|
*/
|
|
29
29
|
expandable?: BbTreeExpandable<Meta>;
|
|
30
|
+
/**
|
|
31
|
+
* Leaves the node out with its whole subtree. `expandedItems` keeps what
|
|
32
|
+
* it holds for it; a branch whose children are all hidden shows as a leaf.
|
|
33
|
+
*/
|
|
34
|
+
hidden?: boolean;
|
|
30
35
|
};
|
|
31
36
|
/**
|
|
32
37
|
* @deprecated Use `BbTreeItem` instead.
|
|
@@ -84,8 +89,9 @@ export type BbTreeProps<Meta = any> = BbTreePtKeys & {
|
|
|
84
89
|
*/
|
|
85
90
|
itemValue: ItemAccessor<Meta>;
|
|
86
91
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
92
|
+
* Which nodes get a toggle: a boolean for all, or a function of the node,
|
|
93
|
+
* its depth and its parent. Unset: every node with a child that is not
|
|
94
|
+
* `hidden`.
|
|
89
95
|
*/
|
|
90
96
|
expandable?: BbTreeExpandable<Meta>;
|
|
91
97
|
};
|