bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49
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 +24 -7
- package/bin/bitboss-ui-mcp.mjs +15 -3
- package/bin/bitboss-ui.mjs +115 -13
- package/dist/ai/BbAvatar.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +65 -65
- package/dist/ai/BbButton.md +16 -5
- package/dist/ai/BbCheckbox.md +0 -2
- package/dist/ai/BbCheckboxGroup.md +13 -20
- package/dist/ai/BbDatePickerInput.md +4 -2
- package/dist/ai/BbDialog.md +1 -8
- package/dist/ai/BbDropdown.md +231 -220
- package/dist/ai/BbDropdownButton.md +65 -65
- package/dist/ai/BbDropdownGroup.md +2 -2
- package/dist/ai/BbDropzone.md +10 -10
- package/dist/ai/BbForm.md +43 -52
- package/dist/ai/BbHoverCard.md +4 -2
- package/dist/ai/BbNumberInput.md +88 -21
- package/dist/ai/BbPopover.md +29 -23
- package/dist/ai/BbProgress.md +48 -22
- package/dist/ai/BbRadioGroup.md +13 -19
- package/dist/ai/BbSelect.md +16 -36
- package/dist/ai/BbSelectPopover.md +14 -30
- package/dist/ai/BbSmoothHeight.md +0 -2
- package/dist/ai/BbSwitchGroup.md +13 -20
- package/dist/ai/BbTable.md +11 -10
- package/dist/ai/BbTabs.md +106 -105
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +1 -1
- package/dist/ai/BbTabsRoot.md +2 -2
- package/dist/ai/BbTooltip.md +24 -10
- package/dist/ai/BbTree.md +14 -11
- package/dist/ai/changelog.json +256 -5
- package/dist/ai/components.json +36 -34
- package/dist/ai/composables/useBbDropdownContext.md +16 -16
- package/dist/ai/composables/useBbFormField.md +5 -1
- package/dist/ai/composables/useBbTabsContext.md +14 -14
- package/dist/ai/guides/agent-contract.md +27 -27
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/component-picker.md +3 -3
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +10 -10
- package/dist/ai/guides/inertia-helpers.md +120 -67
- package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
- package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
- package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
- package/dist/ai/guides/migration/components/bb-select.md +10 -2
- package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
- package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +114 -17
- package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
- package/dist/ai/guides/options-items-playbook.md +30 -24
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/preset-components.md +18 -3
- package/dist/ai/guides/typescript-generic-components.md +1 -1
- package/dist/ai/guides/validated-forms.md +11 -22
- package/dist/ai/guides/validation-providers.md +4 -3
- package/dist/ai/helpers/inertia/manifest.json +636 -0
- package/dist/ai/helpers/inertia/types.ts +15 -0
- package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
- package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
- package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
- package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
- package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
- package/dist/ai/helpers/inertia/useLoading.ts +20 -0
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
- package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
- package/dist/ai/helpers/inertia/useProp.ts +63 -0
- package/dist/ai/helpers/inertia/useQuery.ts +19 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
- package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
- package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
- package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
- package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
- package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
- package/dist/ai/helpers/inertia/useUntil.ts +33 -0
- package/dist/ai/helpers/inertia/utils.ts +24 -0
- package/dist/ai/index.md +6 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +23 -20
- package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -0
- package/dist/ai/manifest/components/BbNumberInput.json +6 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -0
- package/dist/ai/manifest/components/BbProgress.json +6 -6
- package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbTabs.json +7 -6
- package/dist/ai/manifest/components/BbTabsList.json +3 -3
- package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +2 -0
- package/dist/ai/manifest/types.advanced.json +10 -9
- package/dist/ai/manifest/types.api.json +5 -4
- package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
- package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
- package/dist/ai/recipes/inertia/onboarding.md +6 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
- package/dist/ai/recipes/inertia/record-form.md +11 -11
- package/dist/ai/recipes/inertia/records-workspace.md +38 -41
- package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
- package/dist/ai/recipes/inertia/upload-center.md +31 -39
- package/dist/ai/recipes/inertia/wizard-form.md +10 -19
- package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
- package/dist/ai/recipes/nuxt/onboarding.md +2 -6
- package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
- package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
- package/dist/ai/recipes/nuxt/upload-center.md +22 -29
- package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
- package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
- package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
- package/dist/ai/recipes/vue/onboarding.md +2 -6
- package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
- package/dist/ai/recipes/vue/record-form.md +5 -5
- package/dist/ai/recipes/vue/records-workspace.md +29 -31
- package/dist/ai/recipes/vue/settings-workspace.md +22 -34
- package/dist/ai/recipes/vue/upload-center.md +22 -29
- package/dist/ai/recipes/vue/wizard-form.md +3 -11
- package/dist/ai/source/BbAccordion.md +1 -1
- package/dist/ai/source/BbAlert.md +3 -3
- package/dist/ai/source/BbBadge.md +2 -2
- package/dist/ai/source/BbBadgeButton.md +5 -4
- package/dist/ai/source/BbBaseButton.md +1 -1
- package/dist/ai/source/BbBaseRadioIcon.md +1 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
- package/dist/ai/source/BbBreadcrumbs.md +63 -42
- package/dist/ai/source/BbButton.md +71 -33
- package/dist/ai/source/BbCalendar.md +17 -16
- package/dist/ai/source/BbCheckbox.md +3 -2
- package/dist/ai/source/BbCheckboxGroup.md +11 -4
- package/dist/ai/source/BbColorInput.md +10 -9
- package/dist/ai/source/BbConfirm.md +1 -1
- package/dist/ai/source/BbConfirmPortal.md +1 -1
- package/dist/ai/source/BbDatePicker.md +2 -2
- package/dist/ai/source/BbDatePickerInput.md +47 -20
- package/dist/ai/source/BbDialog.md +5 -5
- package/dist/ai/source/BbDropdown.md +230 -158
- package/dist/ai/source/BbDropdownButton.md +19 -12
- package/dist/ai/source/BbDropdownGroup.md +126 -93
- package/dist/ai/source/BbForm.md +25 -1
- package/dist/ai/source/BbIndicator.md +4 -0
- package/dist/ai/source/BbNumberInput.md +855 -19
- package/dist/ai/source/BbOffCanvas.md +27 -11
- package/dist/ai/source/BbPagination.md +3 -3
- package/dist/ai/source/BbPopover.md +152 -8
- package/dist/ai/source/BbPopoverPortal.md +11 -0
- package/dist/ai/source/BbProgress.md +82 -18
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +11 -9
- package/dist/ai/source/BbSelect.md +16 -10
- package/dist/ai/source/BbSelectPopover.md +29 -23
- package/dist/ai/source/BbSlider.md +12 -6
- package/dist/ai/source/BbSwitch.md +3 -2
- package/dist/ai/source/BbSwitchGroup.md +5 -2
- package/dist/ai/source/BbTable.md +102 -18
- package/dist/ai/source/BbTabs.md +27 -23
- package/dist/ai/source/BbTabsList.md +26 -22
- package/dist/ai/source/BbTabsPanels.md +26 -22
- package/dist/ai/source/BbTabsRoot.md +25 -21
- package/dist/ai/source/BbTag.md +10 -9
- package/dist/ai/source/BbTextInput.md +5 -4
- package/dist/ai/source/BbTextarea.md +6 -5
- package/dist/ai/source/BbTimePicker.md +1 -1
- package/dist/ai/source/BbTimePickerInput.md +46 -9
- package/dist/ai/source/BbToast.md +10 -7
- package/dist/ai/source/BbToastPortal.md +10 -7
- package/dist/ai/source/BbTooltip.md +54 -8
- package/dist/ai/source/BbTree.md +21 -3
- package/dist/ai/source/CommonField.md +6 -4
- package/dist/ai/source/CommonFieldInput.md +15 -10
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/CommonTimeSelector.md +5 -4
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
- package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
- package/dist/components/BbButton/toggleRoving.d.ts +6 -0
- package/dist/components/BbButton/toggleRoving.js +45 -0
- package/dist/components/BbButton/types.d.ts +4 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
- package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
- package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
- package/dist/components/BbDropdown/normalizeGroups.js +60 -46
- package/dist/components/BbDropdown/types.d.ts +119 -88
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
- package/dist/components/BbDropdownButton/types.d.ts +2 -2
- package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
- package/dist/components/BbForm/BbFormCustomField.js +1 -1
- package/dist/components/BbForm/bindFormField.js +2 -1
- package/dist/components/BbForm/formFields.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
- package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
- package/dist/components/BbNumberInput/numberDisplay.js +499 -0
- package/dist/components/BbNumberInput/types.d.ts +54 -1
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
- package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
- package/dist/components/BbPopover/types.d.ts +11 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
- package/dist/components/BbProgress/types.d.ts +23 -7
- package/dist/components/BbProgress/types.js +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
- package/dist/components/BbRadioGroup/types.d.ts +6 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
- package/dist/components/BbSelect/types.d.ts +6 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbSelectPopover/types.d.ts +6 -2
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/types.d.ts +25 -21
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
- package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
- package/dist/components/BbTooltip/types.d.ts +7 -2
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/composables/formSubmitLock.d.ts +6 -0
- package/dist/composables/formSubmitLock.js +4 -0
- package/dist/composables/useBaseOptions.d.ts +7 -1
- package/dist/composables/useBaseOptions.js +32 -32
- package/dist/composables/useBbDropdownContext.d.ts +8 -8
- package/dist/composables/useBbFormField.d.ts +9 -0
- package/dist/composables/useBbFormField.js +5 -3
- package/dist/composables/useBbTabsContext.d.ts +10 -10
- package/dist/composables/useBbTabsContext.js +18 -18
- package/dist/composables/useFormBinding.d.ts +11 -0
- package/dist/composables/useFormBinding.js +15 -13
- package/dist/composables/useItemText.d.ts +5 -1
- package/dist/composables/useItemText.js +8 -3
- package/dist/composables/useItemValue.d.ts +5 -1
- package/dist/composables/useItemValue.js +8 -3
- package/dist/composables/useLocale.js +10 -9
- package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/i18n/index.d.ts +7 -12
- package/dist/i18n/locales/cs.json +11 -14
- package/dist/i18n/locales/da.json +13 -16
- package/dist/i18n/locales/de-CH.json +137 -0
- package/dist/i18n/locales/de.json +14 -17
- package/dist/i18n/locales/el.json +10 -13
- package/dist/i18n/locales/en-GB.json +137 -0
- package/dist/i18n/locales/en.json +8 -11
- package/dist/i18n/locales/es-MX.json +137 -0
- package/dist/i18n/locales/es.json +16 -19
- package/dist/i18n/locales/fi.json +8 -11
- package/dist/i18n/locales/fr.json +23 -26
- package/dist/i18n/locales/hu.json +8 -11
- package/dist/i18n/locales/it.json +12 -15
- package/dist/i18n/locales/ja.json +13 -16
- package/dist/i18n/locales/ko.json +10 -13
- package/dist/i18n/locales/nb.json +13 -16
- package/dist/i18n/locales/nl.json +21 -24
- package/dist/i18n/locales/pl.json +10 -13
- package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
- package/dist/i18n/locales/pt-PT.json +137 -0
- package/dist/i18n/locales/ro.json +22 -25
- package/dist/i18n/locales/ru.json +11 -14
- package/dist/i18n/locales/sv.json +16 -19
- package/dist/i18n/locales/tr.json +14 -17
- package/dist/i18n/locales/uk.json +11 -14
- package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
- package/dist/i18n/locales/zh-HK.json +137 -0
- package/dist/i18n/locales/zh-TW.json +137 -0
- package/dist/i18n/regionHints.d.ts +16 -0
- package/dist/i18n/regionHints.js +49 -0
- package/dist/i18n/regions.d.ts +286 -0
- package/dist/i18n/regions.js +265 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/llms-full.txt +1785 -1637
- package/dist/llms-medium.txt +74 -46
- package/dist/llms.txt +7 -7
- package/dist/locale-blueprint.json +16 -13
- package/dist/styles.css +2 -2
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/slotKey.d.ts +2 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +22 -19
- package/dist/vite.js +309 -297
- package/llms.txt +7 -7
- package/package.json +5 -3
- package/scripts/lib/agent-manifest.mjs +2 -1
- package/scripts/lib/eslint-disable.mjs +12 -4
- package/scripts/lib/eslint-plugin.d.ts +5 -1
- package/scripts/lib/eslint-plugin.mjs +187 -6
- package/scripts/lib/helper-canon.mjs +176 -0
- package/scripts/lib/helpers-add.mjs +1303 -0
- package/scripts/lib/local-components.mjs +33 -4
- package/scripts/lib/locale-check.mjs +165 -0
- package/scripts/lib/redundant-item-accessor.mjs +398 -0
- package/scripts/lib/renamed-item-field.mjs +343 -0
- package/scripts/lib/slot-key.mjs +2 -2
- package/scripts/lib/slot-renames.mjs +1 -1
- package/scripts/lib/validate-bb-markup.mjs +123 -56
- package/dist/i18n/index.js +0 -27
|
@@ -3,19 +3,20 @@ import { useId as t } from "../../composables/useId.js";
|
|
|
3
3
|
import { isTopEscapeEntry as n, pushEscapeEntry as ee, removeEscapeEntry as r } from "../../utils/overlayEscapeStack.js";
|
|
4
4
|
import { useUntil as i } from "../../composables/useUntil.js";
|
|
5
5
|
import { useOverlayYield as te } from "../../composables/useOverlayYield.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { isWarm as ne, markHidden as a, markShown as re } from "./tooltipWarmup.js";
|
|
7
|
+
import { removedPropsFor as ie } from "../../deprecation/removedProps.js";
|
|
8
|
+
import { warnRemovedAttrs as ae } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
9
|
+
import { extractDomContainer as o } from "../../utilities/functions/extractDomContainer.js";
|
|
10
|
+
import { transitions as s } from "../../utilities/misc/transitions.js";
|
|
11
|
+
import oe from "../CommonPopover/CommonPopover.vue.js";
|
|
12
|
+
import { BB_TOOLTIP_PT as c } from "./types.js";
|
|
13
|
+
import { Comment as se, Fragment as ce, computed as l, createBlock as le, createCommentVNode as u, createElementBlock as d, createElementVNode as ue, createTextVNode as de, defineComponent as f, mergeModels as p, mergeProps as m, normalizeProps as fe, onBeforeUnmount as pe, onDeactivated as me, onMounted as he, openBlock as h, ref as g, renderSlot as _, toDisplayString as v, unref as y, useModel as ge, useSlots as _e, useTemplateRef as ve, watch as b, withCtx as ye } from "vue";
|
|
14
|
+
import { useElementSize as be } from "@vueuse/core";
|
|
14
15
|
//#region src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
-
var
|
|
16
|
+
var x = /*@__PURE__*/ f({
|
|
16
17
|
inheritAttrs: !1,
|
|
17
18
|
__name: "BbTooltip",
|
|
18
|
-
props: /*@__PURE__*/
|
|
19
|
+
props: /*@__PURE__*/ p({
|
|
19
20
|
"pt:root": {},
|
|
20
21
|
"pt:panel": {},
|
|
21
22
|
"pt:root:open": {},
|
|
@@ -29,11 +30,11 @@ var S = /*@__PURE__*/ d({
|
|
|
29
30
|
padding: { default: 10 },
|
|
30
31
|
placement: { default: "top" },
|
|
31
32
|
text: {},
|
|
32
|
-
transitionDuration: { default:
|
|
33
|
+
transitionDuration: { default: s.medium },
|
|
33
34
|
activator: {},
|
|
34
35
|
boundary: {},
|
|
35
36
|
variant: { default: "default" },
|
|
36
|
-
delay: { default:
|
|
37
|
+
delay: { default: 100 },
|
|
37
38
|
width: {}
|
|
38
39
|
}, {
|
|
39
40
|
modelValue: {
|
|
@@ -43,119 +44,123 @@ var S = /*@__PURE__*/ d({
|
|
|
43
44
|
modelModifiers: {}
|
|
44
45
|
}),
|
|
45
46
|
emits: ["update:modelValue"],
|
|
46
|
-
setup(
|
|
47
|
-
let
|
|
47
|
+
setup(s) {
|
|
48
|
+
let f = ge(s, "modelValue"), p = s, x = _e(), S = e({
|
|
48
49
|
component: "BbTooltip",
|
|
49
|
-
props:
|
|
50
|
-
parts:
|
|
51
|
-
states:
|
|
52
|
-
active: { open: () =>
|
|
50
|
+
props: p,
|
|
51
|
+
parts: c.parts,
|
|
52
|
+
states: c.states,
|
|
53
|
+
active: { open: () => f.value }
|
|
53
54
|
});
|
|
54
|
-
process.env.NODE_ENV !== "production" &&
|
|
55
|
-
let
|
|
55
|
+
process.env.NODE_ENV !== "production" && ae("BbTooltip", ie("BbTooltip"));
|
|
56
|
+
let xe = t().id.value, C = `bb_${p.id ?? xe}`, w = `${C}_desc`, T = (e) => {
|
|
56
57
|
if (!e) return "";
|
|
57
58
|
let t = "";
|
|
58
59
|
for (let n of e) {
|
|
59
|
-
if (n.type ===
|
|
60
|
+
if (n.type === se) continue;
|
|
60
61
|
let e = n.children;
|
|
61
|
-
typeof e == "string" ? t += e : Array.isArray(e) && (t +=
|
|
62
|
+
typeof e == "string" ? t += e : Array.isArray(e) && (t += T(e));
|
|
62
63
|
}
|
|
63
64
|
return t;
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
get: () =>
|
|
65
|
+
}, E = g(!1), D = l(() => (p.text ?? (E.value ? T(x.default?.({})) : "")).replace(/\s+/g, " ").trim()), O = g(), Se = l(() => p.activator != null), Ce = ve("popover"), k = l(() => o(Ce.value)), A = i(f), we = i(() => !!p.eager || f.value), j = g(!1), Te = () => {
|
|
66
|
+
k.value?.getBoundingClientRect(), j.value = !0;
|
|
67
|
+
}, M = l({
|
|
68
|
+
get: () => f.value && j.value,
|
|
68
69
|
set: (e) => {
|
|
69
|
-
|
|
70
|
+
f.value = e;
|
|
70
71
|
}
|
|
71
|
-
}),
|
|
72
|
-
let t =
|
|
73
|
-
t && (
|
|
74
|
-
},
|
|
75
|
-
clearTimeout(
|
|
72
|
+
}), N = (e) => {
|
|
73
|
+
let t = o(e);
|
|
74
|
+
t && (O.value = t);
|
|
75
|
+
}, P, F, I = () => {
|
|
76
|
+
clearTimeout(F);
|
|
77
|
+
}, L = () => {
|
|
78
|
+
clearTimeout(P), clearTimeout(F), f.value = !1;
|
|
79
|
+
}, R = () => {
|
|
80
|
+
clearTimeout(P), clearTimeout(F), F = setTimeout(L, 50);
|
|
76
81
|
}, z = () => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
e.key !== "Escape" || !n(
|
|
86
|
-
},
|
|
87
|
-
e.currentTarget?.matches(":focus-visible") &&
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
e ? (ee(
|
|
91
|
-
element: () =>
|
|
82
|
+
I(), !(f.value || p.disabled || V()) && (P = setTimeout(() => {
|
|
83
|
+
V() || (f.value = !0);
|
|
84
|
+
}, ne() ? 0 : p.delay));
|
|
85
|
+
}, Ee = () => {
|
|
86
|
+
I(), clearTimeout(P), !(f.value || p.disabled || V()) && (f.value = !0);
|
|
87
|
+
}, B = !1, { blocked: V } = te(() => O.value, () => k.value, () => {
|
|
88
|
+
B = !0, L();
|
|
89
|
+
}), H = () => L(), U = Symbol("bb-tooltip-escape"), W = (e) => {
|
|
90
|
+
e.key !== "Escape" || !n(U) || (e.preventDefault(), e.stopImmediatePropagation(), L());
|
|
91
|
+
}, G = (e) => {
|
|
92
|
+
e.currentTarget?.matches(":focus-visible") && Ee();
|
|
93
|
+
}, K = !1;
|
|
94
|
+
b(f, (e) => {
|
|
95
|
+
e && !K ? (K = !0, re()) : !e && K && (K = !1, a(!B)), B = !1, e ? (ee(U, {
|
|
96
|
+
element: () => k.value,
|
|
92
97
|
transient: !0
|
|
93
|
-
}), document.addEventListener("keydown",
|
|
94
|
-
}),
|
|
95
|
-
e &&
|
|
96
|
-
}),
|
|
97
|
-
e &&
|
|
98
|
+
}), document.addEventListener("keydown", W, { capture: !0 })) : (r(U), document.removeEventListener("keydown", W, { capture: !0 }));
|
|
99
|
+
}), b(() => p.disabled, (e) => {
|
|
100
|
+
e && L();
|
|
101
|
+
}), b(() => p.activator, (e) => {
|
|
102
|
+
e && N(e);
|
|
98
103
|
}, { immediate: !0 });
|
|
99
104
|
let q = null;
|
|
100
|
-
|
|
101
|
-
q &&= (q(), null), e && (e.addEventListener("mouseenter",
|
|
102
|
-
e.removeEventListener("mouseenter",
|
|
105
|
+
b(O, (e) => {
|
|
106
|
+
q &&= (q(), null), e && (e.addEventListener("mouseenter", z, { passive: !0 }), e.addEventListener("mouseleave", R, { passive: !0 }), e.addEventListener("focus", G, { passive: !0 }), e.addEventListener("blur", L, { passive: !0 }), e.addEventListener("pointerdown", H, { passive: !0 }), e.addEventListener("contextmenu", H, { passive: !0 }), q = () => {
|
|
107
|
+
e.removeEventListener("mouseenter", z), e.removeEventListener("mouseleave", R), e.removeEventListener("focus", G), e.removeEventListener("blur", L), e.removeEventListener("pointerdown", H), e.removeEventListener("contextmenu", H);
|
|
103
108
|
});
|
|
104
109
|
}, { immediate: !0 });
|
|
105
110
|
let J = null;
|
|
106
|
-
|
|
107
|
-
J &&= (J(), null), e && (e.addEventListener("mouseenter",
|
|
108
|
-
e.removeEventListener("mouseenter",
|
|
111
|
+
b(k, (e) => {
|
|
112
|
+
J &&= (J(), null), e && (e.addEventListener("mouseenter", I, { passive: !0 }), e.addEventListener("mouseleave", R, { passive: !0 }), J = () => {
|
|
113
|
+
e.removeEventListener("mouseenter", I), e.removeEventListener("mouseleave", R);
|
|
109
114
|
});
|
|
110
115
|
}, { immediate: !0 });
|
|
111
|
-
let
|
|
112
|
-
let n = (e.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((e) => e && !
|
|
116
|
+
let De = /* @__PURE__ */ new Set([C, w]), Y = null, X = (e, t) => {
|
|
117
|
+
let n = (e.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((e) => e && !De.has(e));
|
|
113
118
|
t && n.push(t), n.length ? e.setAttribute("aria-describedby", n.join(" ")) : e.removeAttribute("aria-describedby");
|
|
114
119
|
}, Z = () => {
|
|
115
|
-
let e =
|
|
116
|
-
Y && Y !== e && X(Y, null), Y = e, e && (
|
|
120
|
+
let e = O.value ?? null;
|
|
121
|
+
Y && Y !== e && X(Y, null), Y = e, e && (D.value ? X(e, w) : X(e, A.value ? C : null));
|
|
117
122
|
};
|
|
118
|
-
|
|
119
|
-
Z(),
|
|
120
|
-
}),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
], Z, { flush: "post" }),
|
|
125
|
-
q?.(), J?.(), Y &&= (X(Y, null), null),
|
|
123
|
+
he(() => {
|
|
124
|
+
Z(), E.value = !0;
|
|
125
|
+
}), b([
|
|
126
|
+
O,
|
|
127
|
+
A,
|
|
128
|
+
D
|
|
129
|
+
], Z, { flush: "post" }), pe(() => {
|
|
130
|
+
q?.(), J?.(), Y &&= (X(Y, null), null), L(), K && (K = !1, a(!1)), r(U), document.removeEventListener("keydown", W, { capture: !0 });
|
|
126
131
|
});
|
|
127
|
-
let
|
|
128
|
-
if (typeof
|
|
129
|
-
let e =
|
|
132
|
+
let Oe = /^-?\d*\.?\d+$/, ke = /^(-?\d*\.?\d+)%$/, Q = l(() => {
|
|
133
|
+
if (typeof p.width != "string") return;
|
|
134
|
+
let e = p.width.trim().match(ke);
|
|
130
135
|
return e ? parseFloat(e[1]) : void 0;
|
|
131
|
-
}), { width: $ } =
|
|
136
|
+
}), { width: $ } = be(l(() => Q.value == null ? void 0 : O.value), {
|
|
132
137
|
width: 0,
|
|
133
138
|
height: 0
|
|
134
|
-
}, { box: "border-box" }),
|
|
135
|
-
if (
|
|
139
|
+
}, { box: "border-box" }), Ae = l(() => {
|
|
140
|
+
if (p.width == null || p.width === "") return;
|
|
136
141
|
if (Q.value != null) return $.value ? `${$.value * (Q.value / 100)}px` : void 0;
|
|
137
|
-
if (typeof
|
|
138
|
-
let e =
|
|
139
|
-
return
|
|
142
|
+
if (typeof p.width == "number") return Number.isFinite(p.width) ? `${p.width}px` : void 0;
|
|
143
|
+
let e = p.width.trim();
|
|
144
|
+
return Oe.test(e) ? `${e}px` : e;
|
|
140
145
|
});
|
|
141
|
-
return
|
|
142
|
-
|
|
146
|
+
return me(L), (e, t) => (h(), d(ce, null, [
|
|
147
|
+
D.value ? (h(), d("span", {
|
|
143
148
|
key: 0,
|
|
144
|
-
id:
|
|
149
|
+
id: w,
|
|
145
150
|
hidden: ""
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
props: { ref:
|
|
151
|
+
}, v(D.value), 1)) : u("", !0),
|
|
152
|
+
Se.value ? u("", !0) : _(e.$slots, "activator", fe(m({ key: 1 }, {
|
|
153
|
+
props: { ref: N },
|
|
149
154
|
disabled: e.disabled,
|
|
150
|
-
open:
|
|
155
|
+
open: f.value,
|
|
151
156
|
placement: e.placement
|
|
152
157
|
}))),
|
|
153
|
-
|
|
158
|
+
y(we) ? (h(), le(oe, m({
|
|
154
159
|
key: 2,
|
|
155
160
|
ref: "popover",
|
|
156
|
-
modelValue:
|
|
157
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
158
|
-
anchor:
|
|
161
|
+
modelValue: M.value,
|
|
162
|
+
"onUpdate:modelValue": t[0] ||= (e) => M.value = e,
|
|
163
|
+
anchor: O.value,
|
|
159
164
|
"arrow-padding": e.arrowPadding,
|
|
160
165
|
boundary: e.boundary,
|
|
161
166
|
class: ["bb-tooltip", { [`bb-tooltip--${e.variant}`]: !0 }],
|
|
@@ -166,13 +171,13 @@ var S = /*@__PURE__*/ d({
|
|
|
166
171
|
role: "none",
|
|
167
172
|
tag: "span",
|
|
168
173
|
"transition-duration": e.transitionDuration
|
|
169
|
-
},
|
|
170
|
-
default:
|
|
171
|
-
id:
|
|
174
|
+
}, m(e.$attrs, y(S).root), { onVnodeMounted: Te }), {
|
|
175
|
+
default: ye(() => [ue("span", m({
|
|
176
|
+
id: C,
|
|
172
177
|
class: "bb-tooltip__panel",
|
|
173
178
|
role: "tooltip",
|
|
174
|
-
style: { "--max-w":
|
|
175
|
-
},
|
|
179
|
+
style: { "--max-w": Ae.value }
|
|
180
|
+
}, y(S).panel), [_(e.$slots, "default", {}, () => [de(v(e.text), 1)])], 16)]),
|
|
176
181
|
_: 3
|
|
177
182
|
}, 16, [
|
|
178
183
|
"modelValue",
|
|
@@ -185,9 +190,9 @@ var S = /*@__PURE__*/ d({
|
|
|
185
190
|
"padding",
|
|
186
191
|
"placement",
|
|
187
192
|
"transition-duration"
|
|
188
|
-
])) :
|
|
193
|
+
])) : u("", !0)
|
|
189
194
|
], 64));
|
|
190
195
|
}
|
|
191
196
|
});
|
|
192
197
|
//#endregion
|
|
193
|
-
export {
|
|
198
|
+
export { x as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tooltips' shared skip delay (Q60.22 c, owner 2026-10-07): once one
|
|
3
|
+
* tooltip is showing, or closed less than {@link SKIP_DELAY_MS} ago, the next
|
|
4
|
+
* one a pointer reaches opens at once instead of waiting its `delay` again —
|
|
5
|
+
* running a pointer along a toolbar reads every hint without a stall at each
|
|
6
|
+
* button. Module state, not `<script setup>` state, so every BbTooltip and
|
|
7
|
+
* `v-bb-tooltip` shares it. Tooltips only: BbHoverCard keeps its own delay and
|
|
8
|
+
* neither warms nor reads this.
|
|
9
|
+
*/
|
|
10
|
+
/** How long after a tooltip closes the next one still skips its delay. */
|
|
11
|
+
export declare const SKIP_DELAY_MS = 300;
|
|
12
|
+
/** A tooltip is showing, or one closed within the skip window. */
|
|
13
|
+
export declare const isWarm: () => boolean;
|
|
14
|
+
/** A tooltip started showing. */
|
|
15
|
+
export declare const markShown: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* A tooltip stopped showing. `warm: false` for a close that is not the user
|
|
18
|
+
* moving on (it yielded to a menu or dialog, Q63.7, or was unmounted): that
|
|
19
|
+
* must not hurry the next tooltip.
|
|
20
|
+
*/
|
|
21
|
+
export declare const markHidden: (warm: boolean) => void;
|
|
22
|
+
/** Test-only: no tooltip showing, none closed recently. */
|
|
23
|
+
export declare const __resetForTest: () => void;
|
|
@@ -111,9 +111,14 @@ export type BbTooltipProps = {
|
|
|
111
111
|
*/
|
|
112
112
|
variant?: BbTooltipVariant;
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* How long, in milliseconds, a pointer has to rest on the activator before
|
|
115
|
+
* the tooltip shows; it keeps hints from flashing under a pointer passing
|
|
116
|
+
* by. Keyboard focus shows it at once whatever this says, and so does a
|
|
117
|
+
* pointer arriving while another tooltip shows or within 300 ms of one
|
|
118
|
+
* closing (the skip delay, shared by every tooltip). `0` shows it on hover
|
|
119
|
+
* at once.
|
|
115
120
|
*
|
|
116
|
-
* @defaultValue `
|
|
121
|
+
* @defaultValue `100`
|
|
117
122
|
*/
|
|
118
123
|
delay?: number;
|
|
119
124
|
/**
|
|
@@ -8,9 +8,9 @@ import { BbTreeContextKey as o } from "./context.js";
|
|
|
8
8
|
import s from "./BbTreeLevel.vue.js";
|
|
9
9
|
import { BB_TREE_PT as c } from "./types.js";
|
|
10
10
|
import { flattenTree as l } from "../../utilities/functions/flattenTree.js";
|
|
11
|
-
import { createElementBlock as u, createSlots as d, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeModels as h, mergeProps as g, normalizeProps as _, openBlock as v, provide as y,
|
|
11
|
+
import { createElementBlock as u, createSlots as d, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeModels as h, mergeProps as g, normalizeProps as _, openBlock as v, provide as y, reactive as b, renderList as x, renderSlot as S, unref as C, useAttrs as w, useModel as T, watch as E, withCtx as D } from "vue";
|
|
12
12
|
//#region src/components/BbTree/BbTree.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
13
|
+
var O = /*@__PURE__*/ p({
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
__name: "BbTree",
|
|
16
16
|
props: /*@__PURE__*/ h({
|
|
@@ -31,45 +31,53 @@ var D = /*@__PURE__*/ p({
|
|
|
31
31
|
}),
|
|
32
32
|
emits: ["update:expandedItems"],
|
|
33
33
|
setup(p) {
|
|
34
|
-
let h =
|
|
34
|
+
let h = T(p, "expandedItems"), O = p, k = e({
|
|
35
35
|
component: "BbTree",
|
|
36
|
-
attrs:
|
|
37
|
-
props:
|
|
36
|
+
attrs: w(),
|
|
37
|
+
props: O,
|
|
38
38
|
parts: c.parts,
|
|
39
39
|
states: c.states,
|
|
40
40
|
active: {}
|
|
41
|
-
}), { data:
|
|
42
|
-
process.env.NODE_ENV !== "production" && i("BbTree", r("BbTree"), { slotKeys: () => l(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
}), { data: A } = a({ items: h }), j = (e) => typeof O.itemValue == "function" ? O.itemValue(e.meta) : typeof O.itemValue == "string" ? e.meta?.[O.itemValue] : e.meta, M = (e) => t(j(e));
|
|
42
|
+
process.env.NODE_ENV !== "production" && i("BbTree", r("BbTree"), { slotKeys: () => l(O.items ?? [], "children").map(j).filter((e) => typeof e == "string" || typeof e == "number") });
|
|
43
|
+
let N = b(/* @__PURE__ */ new Set());
|
|
44
|
+
E(A, (e) => {
|
|
45
|
+
for (let t of N) t in e || N.delete(t);
|
|
46
|
+
for (let t of Object.keys(e)) N.add(t);
|
|
47
|
+
}, {
|
|
48
|
+
immediate: !0,
|
|
49
|
+
flush: "sync"
|
|
50
|
+
}), y(o, {
|
|
51
|
+
passthrough: k,
|
|
52
|
+
valueFor: j,
|
|
53
|
+
hashFor: M,
|
|
54
|
+
isExpanded: (e) => !e.children?.length || N.has(M(e)),
|
|
47
55
|
toggleExpanded: (e) => {
|
|
48
|
-
let n =
|
|
49
|
-
h.value = r in
|
|
56
|
+
let n = j(e), r = t(n);
|
|
57
|
+
h.value = r in A.value ? h.value.filter((e) => t(e) !== r) : [...h.value, n];
|
|
50
58
|
},
|
|
51
59
|
id: n().id.value
|
|
52
60
|
});
|
|
53
|
-
let
|
|
54
|
-
return
|
|
61
|
+
let P = /* @__PURE__ */ new Set();
|
|
62
|
+
return E(() => O.items, (e) => {
|
|
55
63
|
let t = [];
|
|
56
64
|
for (let n of l(e ?? [], "children")) {
|
|
57
|
-
let e =
|
|
58
|
-
|
|
65
|
+
let e = M(n);
|
|
66
|
+
P.has(e) || (P.add(e), n.children?.length && n.expanded !== !1 && (e in A.value || t.push(j(n))));
|
|
59
67
|
}
|
|
60
68
|
t.length && (h.value = [...h.value, ...t]);
|
|
61
69
|
}, {
|
|
62
70
|
deep: !0,
|
|
63
71
|
immediate: !0
|
|
64
|
-
}), (e, t) => (v(), u("div", g({ class: "bb-tree" },
|
|
72
|
+
}), (e, t) => (v(), u("div", g({ class: "bb-tree" }, C(k).rootAttrs), [f(s, {
|
|
65
73
|
depth: 0,
|
|
66
74
|
expandable: e.expandable,
|
|
67
75
|
items: e.items
|
|
68
|
-
}, d({ _: 2 }, [
|
|
76
|
+
}, d({ _: 2 }, [x(e.$slots, (t, n) => ({
|
|
69
77
|
name: n,
|
|
70
|
-
fn:
|
|
78
|
+
fn: D((t) => [S(e.$slots, n, _(m(t)))])
|
|
71
79
|
}))]), 1032, ["expandable", "items"])], 16));
|
|
72
80
|
}
|
|
73
81
|
});
|
|
74
82
|
//#endregion
|
|
75
|
-
export {
|
|
83
|
+
export { O as default };
|
|
@@ -23,8 +23,10 @@ var y = { class: "bb-tree__row" }, b = { class: "bb-tree__content" }, x = ["id",
|
|
|
23
23
|
onKeydown: (t) => {
|
|
24
24
|
t.target instanceof HTMLElement && (t.target instanceof HTMLButtonElement || t.key !== "Enter" && t.key !== " " || (t.preventDefault(), w?.toggleExpanded(e)));
|
|
25
25
|
}
|
|
26
|
-
}), O = r(() => S.items.map((t, n) => {
|
|
27
|
-
let r = w?.valueFor(t), i = w?.hashFor(t) ?? `${S.depth}:${n}`, a = T(t), o = t.children ?? [], s = !a && (t.expandable ?? S.expandable) !== void 0 ? !0 : w?.isExpanded(t) ?? !0, c = w ? `expanded_${w.id}_${i}` : `expanded_${i}
|
|
26
|
+
}), O = /* @__PURE__ */ new Set(), k = r(() => S.items.map((t, n) => {
|
|
27
|
+
let r = w?.valueFor(t), i = w?.hashFor(t) ?? `${S.depth}:${n}`, a = T(t), o = t.children ?? [], s = !a && (t.expandable ?? S.expandable) !== void 0 ? !0 : w?.isExpanded(t) ?? !0, c = w ? `expanded_${w.id}_${i}` : `expanded_${i}`;
|
|
28
|
+
s && O.add(i);
|
|
29
|
+
let l = s || O.has(i), u = E(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 = {
|
|
28
30
|
meta: t.meta,
|
|
29
31
|
item: t,
|
|
30
32
|
parent: S.parent,
|
|
@@ -45,14 +47,15 @@ var y = { class: "bb-tree__row" }, b = { class: "bb-tree__content" }, x = ["id",
|
|
|
45
47
|
expanded: s,
|
|
46
48
|
expandable: a,
|
|
47
49
|
childrenId: c,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
mountChildren: l,
|
|
51
|
+
slotName: f,
|
|
52
|
+
childrenSlotName: p,
|
|
53
|
+
slotProps: m
|
|
51
54
|
};
|
|
52
55
|
}));
|
|
53
56
|
return (e, t) => {
|
|
54
57
|
let r = h("BbTreeLevel", !0);
|
|
55
|
-
return f(!0), o(n, null, p(
|
|
58
|
+
return f(!0), o(n, null, p(k.value, (t) => (f(), o("div", d({
|
|
56
59
|
key: t.hash,
|
|
57
60
|
class: ["bb-tree__item", {
|
|
58
61
|
[`bb-tree__item--depth-${e.depth}`]: !0,
|
|
@@ -73,7 +76,7 @@ var y = { class: "bb-tree__row" }, b = { class: "bb-tree__content" }, x = ["id",
|
|
|
73
76
|
}, [t.childrenSlotName ? m(e.$slots, t.childrenSlotName, d({
|
|
74
77
|
key: 0,
|
|
75
78
|
ref_for: !0
|
|
76
|
-
}, t.slotProps)) : t.children.length ? (f(), i(r, {
|
|
79
|
+
}, t.slotProps)) : t.mountChildren && t.children.length ? (f(), i(r, {
|
|
77
80
|
key: 1,
|
|
78
81
|
depth: e.depth + 1,
|
|
79
82
|
expandable: e.expandable,
|
package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -3,9 +3,9 @@ import t from "../BbSpinner/BbSpinner.vue.js";
|
|
|
3
3
|
import n from "../ErrorIcon/ErrorIcon.vue.js";
|
|
4
4
|
import r from "../ClearableButton/ClearableButton.vue.js";
|
|
5
5
|
import i from "../WarningIcon/WarningIcon.vue.js";
|
|
6
|
-
import { Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, onBeforeUnmount as h, openBlock as g, ref as _, renderSlot as v, unref as y, withCtx as b } from "vue";
|
|
6
|
+
import { Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, onBeforeUnmount as h, openBlock as g, ref as _, renderSlot as v, unref as y, withCtx as b, withModifiers as x } from "vue";
|
|
7
7
|
//#region src/components/CommonFieldInput/CommonFieldInput.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var S = /*@__PURE__*/ f({
|
|
9
9
|
__name: "CommonFieldInput",
|
|
10
10
|
props: {
|
|
11
11
|
"append:icon": {},
|
|
@@ -28,47 +28,47 @@ var x = /*@__PURE__*/ f({
|
|
|
28
28
|
variant: { default: "outline" }
|
|
29
29
|
},
|
|
30
30
|
emits: ["click:clear", "container:click"],
|
|
31
|
-
setup(f, { emit:
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
setup(f, { emit: S }) {
|
|
32
|
+
let C = f, w = S, T = _(), E = _(!1), D = _(!1), O = null, k = o(() => !!C.hasWarnings && !C.hasErrors), A = () => {
|
|
33
|
+
O !== null && clearTimeout(O), O = setTimeout(() => {
|
|
34
|
+
E.value = !0;
|
|
35
35
|
}, 150);
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
let e =
|
|
40
|
-
return !!
|
|
41
|
-
}),
|
|
36
|
+
}, j = () => {
|
|
37
|
+
O !== null && (clearTimeout(O), O = null), E.value = !1;
|
|
38
|
+
}, M = o(() => {
|
|
39
|
+
let e = C.hasValue ?? !0;
|
|
40
|
+
return !!C.clearable && e && !C.disabled && !C.readonly;
|
|
41
|
+
}), N = o(() => M.value && (E.value || D.value || !!C.active));
|
|
42
42
|
h(() => {
|
|
43
|
-
|
|
43
|
+
O !== null && clearTimeout(O);
|
|
44
44
|
});
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
if (!
|
|
45
|
+
let P = (e) => {
|
|
46
|
+
T.value?.contains(e.relatedTarget) || (D.value = !1);
|
|
47
|
+
}, F = () => T.value?.querySelector("input,textarea") ?? null, I = (e) => {
|
|
48
|
+
if (!T.value || C.preventFocus || C.disabled) return;
|
|
49
49
|
let t = e.target;
|
|
50
|
-
t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.closest(".bb-clearable-button") || (
|
|
51
|
-
},
|
|
50
|
+
t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.closest(".bb-clearable-button") || (F()?.focus(), w("container:click"));
|
|
51
|
+
}, L = o(() => {
|
|
52
52
|
let e = {
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: I,
|
|
54
54
|
onFocusin: () => {
|
|
55
|
-
|
|
55
|
+
D.value = !0;
|
|
56
56
|
},
|
|
57
|
-
onFocusout:
|
|
58
|
-
onPointerenter:
|
|
59
|
-
onPointerleave:
|
|
57
|
+
onFocusout: P,
|
|
58
|
+
onPointerenter: A,
|
|
59
|
+
onPointerleave: j
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
}),
|
|
63
|
-
|
|
61
|
+
return C.passthrough?.box ? p(e, C.passthrough.box) : e;
|
|
62
|
+
}), R = () => {
|
|
63
|
+
M.value && (w("click:clear"), F()?.focus());
|
|
64
64
|
};
|
|
65
65
|
return (o, f) => (g(), l("span", { class: m(["bb-field-input", {
|
|
66
66
|
"bb-field-input--active": o.active,
|
|
67
|
-
"bb-field-input--clearable":
|
|
67
|
+
"bb-field-input--clearable": M.value,
|
|
68
68
|
"bb-field-input--compact": o.compact,
|
|
69
69
|
"bb-field-input--disabled": o.disabled,
|
|
70
70
|
"bb-field-input--errors": o.hasErrors,
|
|
71
|
-
"bb-field-input--warnings":
|
|
71
|
+
"bb-field-input--warnings": k.value,
|
|
72
72
|
"bb-field-input--loading": o.loading,
|
|
73
73
|
"bb-field-input--readonly": o.readonly,
|
|
74
74
|
[`bb-field-input--${o.variant}`]: o.variant !== "none"
|
|
@@ -76,9 +76,9 @@ var x = /*@__PURE__*/ f({
|
|
|
76
76
|
v(o.$slots, "prepend:outer"),
|
|
77
77
|
u("span", p({
|
|
78
78
|
ref_key: "container",
|
|
79
|
-
ref:
|
|
79
|
+
ref: T,
|
|
80
80
|
class: "bb-field-input__box"
|
|
81
|
-
},
|
|
81
|
+
}, L.value), [
|
|
82
82
|
v(o.$slots, "prepend", {}, () => [o.$slots.prefix ? (g(), l("span", p({
|
|
83
83
|
key: 0,
|
|
84
84
|
class: "bb-field-input__prefix"
|
|
@@ -89,18 +89,19 @@ var x = /*@__PURE__*/ f({
|
|
|
89
89
|
icon: o.$props["prepend:icon"]
|
|
90
90
|
}, o.passthrough?.icon), null, 16, ["icon"])) : c("", !0),
|
|
91
91
|
v(o.$slots, "default"),
|
|
92
|
-
u("span", { class: m(["bb-field-input__icon-spacer", { "bb-field-input__icon-spacer--reserved":
|
|
92
|
+
u("span", { class: m(["bb-field-input__icon-spacer", { "bb-field-input__icon-spacer--reserved": C.reserveAppendSpace }]) }, [d(a, {
|
|
93
93
|
appear: "",
|
|
94
94
|
name: "bb-field-input-icon"
|
|
95
95
|
}, {
|
|
96
|
-
default: b(() => [
|
|
96
|
+
default: b(() => [N.value ? (g(), s(r, p({
|
|
97
97
|
key: "clear",
|
|
98
98
|
class: "bb-field-input__clear",
|
|
99
|
-
onClick:
|
|
99
|
+
onClick: R,
|
|
100
|
+
onMousedown: f[0] ||= x(() => {}, ["prevent"])
|
|
100
101
|
}, o.passthrough?.clear), null, 16)) : o.loading ? (g(), s(y(t), p({
|
|
101
102
|
key: "spinner",
|
|
102
103
|
class: "bb-field-input__spinner"
|
|
103
|
-
}, o.passthrough?.spinner), null, 16)) : o.hasErrors ? (g(), s(n, { key: "error" })) :
|
|
104
|
+
}, o.passthrough?.spinner), null, 16)) : o.hasErrors ? (g(), s(n, { key: "error" })) : k.value ? (g(), s(i, { key: "warning" })) : o.$props["append:icon"] ? (g(), s(y(e), p({
|
|
104
105
|
key: "icon",
|
|
105
106
|
class: "bb-field-input__append-icon",
|
|
106
107
|
icon: o.$props["append:icon"]
|
|
@@ -117,4 +118,4 @@ var x = /*@__PURE__*/ f({
|
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
120
|
//#endregion
|
|
120
|
-
export {
|
|
121
|
+
export { S as default };
|