bitboss-ui 3.0.0-beta.2 → 3.0.0-beta.21
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 +72 -33
- package/dist/ai/BbAccordion.md +3 -3
- package/dist/ai/BbAlert.md +9 -5
- package/dist/ai/BbAsterisk.md +17 -0
- package/dist/ai/BbAvatar.md +12 -3
- package/dist/ai/BbBadge.md +15 -10
- package/dist/ai/BbBadgeButton.md +16 -16
- package/dist/ai/BbBaseButton.md +16 -16
- package/dist/ai/BbBaseCheckbox.md +8 -8
- package/dist/ai/BbBaseCheckboxGroup.md +13 -13
- package/dist/ai/BbBaseCheckboxIcon.md +26 -9
- package/dist/ai/BbBaseColorInput.md +11 -11
- package/dist/ai/BbBaseDatePicker.md +6 -6
- package/dist/ai/BbBaseDatePickerInput.md +15 -15
- package/dist/ai/BbBaseInputContainer.md +12 -12
- package/dist/ai/BbBaseNumberInput.md +8 -8
- package/dist/ai/BbBaseRadio.md +5 -5
- package/dist/ai/BbBaseRadioGroup.md +7 -7
- package/dist/ai/BbBaseRadioIcon.md +25 -9
- package/dist/ai/BbBaseRating.md +5 -5
- package/dist/ai/BbBaseSelect.md +22 -21
- package/dist/ai/BbBaseSlider.md +9 -9
- package/dist/ai/BbBaseSwitch.md +8 -8
- package/dist/ai/BbBaseSwitchGroup.md +13 -13
- package/dist/ai/BbBaseSwitchIcon.md +28 -10
- package/dist/ai/BbBaseTag.md +10 -10
- package/dist/ai/BbBaseTextInput.md +9 -9
- package/dist/ai/BbBaseTextarea.md +9 -9
- package/dist/ai/BbBaseTimePickerInput.md +13 -13
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +15 -15
- package/dist/ai/BbCheckbox.md +18 -17
- package/dist/ai/BbCheckboxGroup.md +15 -14
- package/dist/ai/BbCollapsible.md +11 -9
- package/dist/ai/BbColorInput.md +15 -15
- package/dist/ai/BbColorPalette.md +12 -6
- package/dist/ai/BbConfirm.md +12 -5
- package/dist/ai/BbDatePicker.md +13 -13
- package/dist/ai/BbDatePickerInput.md +20 -20
- package/dist/ai/BbDialog.md +78 -12
- package/dist/ai/BbDropdown.md +132 -22
- package/dist/ai/BbDropdownButton.md +12 -12
- package/dist/ai/BbDropdownGroup.md +1 -1
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +6 -0
- package/dist/ai/BbIndicator.md +5 -5
- package/dist/ai/BbNumberInput.md +11 -11
- package/dist/ai/BbOffCanvas.md +90 -20
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +32 -17
- package/dist/ai/BbProgress.md +7 -4
- package/dist/ai/BbRadio.md +16 -15
- package/dist/ai/BbRadioGroup.md +20 -17
- package/dist/ai/BbRating.md +11 -11
- package/dist/ai/BbSelect.md +138 -37
- package/dist/ai/BbSelectPopover.md +40 -41
- package/dist/ai/BbSlider.md +37 -22
- package/dist/ai/BbSmoothHeight.md +1 -1
- package/dist/ai/BbSwitch.md +25 -10
- package/dist/ai/BbSwitchGroup.md +17 -14
- package/dist/ai/BbTable.md +920 -109
- package/dist/ai/BbTabs.md +28 -14
- package/dist/ai/BbTabsList.md +1 -1
- package/dist/ai/BbTabsPanes.md +1 -1
- package/dist/ai/BbTabsRoot.md +10 -10
- package/dist/ai/BbTag.md +14 -14
- package/dist/ai/BbTextInput.md +16 -15
- package/dist/ai/BbTextarea.md +13 -13
- package/dist/ai/BbTimePicker.md +10 -10
- package/dist/ai/BbTimePickerInput.md +17 -17
- package/dist/ai/BbToast.md +1 -1
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTooltip.md +12 -10
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonInputWrapper.md +10 -10
- package/dist/ai/CommonPopover.md +6 -6
- package/dist/ai/FlatListBox.md +5 -5
- package/dist/ai/GroupedListBox.md +5 -5
- package/dist/ai/ListBox.md +4 -4
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +128 -2
- package/dist/ai/components.json +917 -100
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +5 -3
- package/dist/ai/guides/ai-router.md +9 -4
- package/dist/ai/guides/component-picker.md +18 -18
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +11 -5
- package/dist/ai/guides/installation-and-plugin-setup.md +85 -23
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +30 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +37 -3
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +62 -34
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-rating.md +8 -2
- package/dist/ai/guides/migration/components/bb-select.md +5 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/v2-to-v3.md +260 -89
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/index.md +10 -9
- package/dist/ai/recipes/inertia/approvals-inbox.md +0 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +49 -29
- package/dist/ai/recipes/inertia/record-form.md +0 -1
- package/dist/ai/recipes/inertia/records-workspace.md +26 -8
- package/dist/ai/recipes/inertia/upload-center.md +0 -1
- package/dist/ai/recipes/nuxt/approvals-inbox.md +0 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/record-form.md +0 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -8
- package/dist/ai/recipes/nuxt/upload-center.md +0 -1
- package/dist/ai/recipes/vue/approvals-inbox.md +0 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -8
- package/dist/ai/recipes/vue/upload-center.md +0 -1
- package/dist/ai/source/BbAlert.md +60 -2
- package/dist/ai/source/BbAvatar.md +3 -3
- package/dist/ai/source/BbBadge.md +60 -15
- package/dist/ai/source/BbBadgeButton.md +8 -2
- package/dist/ai/source/BbBaseButton.md +3 -1
- package/dist/ai/source/BbBaseCheckboxGroup.md +6 -2
- package/dist/ai/source/BbBaseDatePicker.md +3 -1
- package/dist/ai/source/BbBaseDatePickerInput.md +5 -1
- package/dist/ai/source/BbBaseInputContainer.md +52 -1
- package/dist/ai/source/BbBaseRadioGroup.md +4 -0
- package/dist/ai/source/BbBaseRating.md +3 -1
- package/dist/ai/source/BbBaseSelect.md +71 -16
- package/dist/ai/source/BbBaseSwitchGroup.md +4 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +5 -1
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbButton.md +51 -24
- package/dist/ai/source/BbCheckbox.md +15 -1
- package/dist/ai/source/BbCheckboxGroup.md +2 -1
- package/dist/ai/source/BbCollapsible.md +7 -1
- package/dist/ai/source/BbColorInput.md +3 -4
- package/dist/ai/source/BbColorPalette.md +3 -4
- package/dist/ai/source/BbDatePicker.md +5 -1
- package/dist/ai/source/BbDatePickerInput.md +5 -1
- package/dist/ai/source/BbDialog.md +175 -19
- package/dist/ai/source/BbDropdown.md +376 -69
- package/dist/ai/source/BbDropdownGroup.md +330 -59
- package/dist/ai/source/BbForm.md +93 -5
- package/dist/ai/source/BbIcon.md +46 -36
- package/dist/ai/source/BbNumberInput.md +3 -4
- package/dist/ai/source/BbOffCanvas.md +474 -194
- package/dist/ai/source/BbPopover.md +24 -17
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbRadio.md +15 -1
- package/dist/ai/source/BbRadioGroup.md +3 -1
- package/dist/ai/source/BbSelect.md +50 -2
- package/dist/ai/source/BbSelectPopover.md +171 -23
- package/dist/ai/source/BbSlider.md +3 -4
- package/dist/ai/source/BbSwitch.md +15 -1
- package/dist/ai/source/BbSwitchGroup.md +8 -5
- package/dist/ai/source/BbTable.md +5092 -1446
- package/dist/ai/source/BbTabs.md +6 -7
- package/dist/ai/source/BbTabsList.md +6 -7
- package/dist/ai/source/BbTabsPanes.md +6 -7
- package/dist/ai/source/BbTabsRoot.md +6 -7
- package/dist/ai/source/BbTag.md +3 -4
- package/dist/ai/source/BbTextInput.md +3 -4
- package/dist/ai/source/BbTextarea.md +3 -4
- package/dist/ai/source/BbTimePicker.md +4 -1
- package/dist/ai/source/BbTimePickerInput.md +5 -1
- package/dist/ai/source/BbToast.md +3 -1
- package/dist/ai/source/BbTooltip.md +5 -1
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/FlatListBox.md +11 -5
- package/dist/ai/source/GroupedListBox.md +7 -5
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAlert/types.d.ts +10 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +36 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +21 -8
- package/dist/components/BbBadge/types.d.ts +8 -2
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +167 -167
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +9 -9
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +78 -78
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +24 -22
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/components/BbBaseSelect/types.d.ts +22 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +104 -104
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +85 -81
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -1
- package/dist/components/BbCollapsible/types.d.ts +7 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +133 -107
- package/dist/components/BbDialog/types.d.ts +29 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +99 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +208 -201
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +225 -208
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDropdown/types.d.ts +20 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/BbIcon/iconCache.d.ts +33 -0
- package/dist/components/BbIcon/iconCache.js +17 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +254 -208
- package/dist/components/BbOffCanvas/types.d.ts +30 -5
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +149 -146
- package/dist/components/BbPopover/types.d.ts +3 -2
- package/dist/components/BbRadioGroup/types.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +27 -23
- package/dist/components/BbSelect/types.d.ts +32 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +221 -213
- package/dist/components/BbSlider/BbSlider.vue.d.ts +1 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1433 -600
- package/dist/components/BbTable/BbTableDataRow.d.ts +162 -0
- package/dist/components/BbTable/BbTableDataRow.js +136 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/types.d.ts +324 -111
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +71 -36
- package/dist/components/BbTabs/types.d.ts +0 -8
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +80 -80
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +61 -61
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbTooltip/types.d.ts +5 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/composables/useBaseOptions.js +30 -20
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePrefill.d.ts +21 -2
- package/dist/composables/usePrefill.js +25 -19
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +121 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +63 -23
- package/dist/i18n/locales/cs.json +4 -1
- package/dist/i18n/locales/da.json +4 -1
- package/dist/i18n/locales/de.json +4 -1
- package/dist/i18n/locales/el.json +4 -1
- package/dist/i18n/locales/en.json +4 -1
- package/dist/i18n/locales/es.json +4 -1
- package/dist/i18n/locales/fi.json +4 -1
- package/dist/i18n/locales/fr.json +4 -1
- package/dist/i18n/locales/hu.json +4 -1
- package/dist/i18n/locales/it.json +4 -1
- package/dist/i18n/locales/ja.json +4 -1
- package/dist/i18n/locales/ko.json +4 -1
- package/dist/i18n/locales/nb.json +4 -1
- package/dist/i18n/locales/nl.json +4 -1
- package/dist/i18n/locales/pl.json +4 -1
- package/dist/i18n/locales/pt.json +4 -1
- package/dist/i18n/locales/ro.json +4 -1
- package/dist/i18n/locales/ru.json +4 -1
- package/dist/i18n/locales/sv.json +4 -1
- package/dist/i18n/locales/tr.json +4 -1
- package/dist/i18n/locales/uk.json +4 -1
- package/dist/i18n/locales/zh-cn.json +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +69 -67
- package/dist/llms-full.txt +3997 -1458
- package/dist/llms-medium.txt +140 -73
- package/dist/llms.txt +7 -6
- package/dist/locale-blueprint.json +4 -1
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +22 -1
- package/dist/nuxt.js +22 -8
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +20 -19
- package/dist/runtime/nuxt-plugin.js +28 -21
- package/dist/styles.css +1 -1
- package/dist/utilities/misc/listboxMetrics.d.ts +3 -3
- package/dist/utilities/misc/listboxMetrics.js +2 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -27
- package/dist/validated/BbSelect.vue.d.ts +2 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite.js +7 -3
- package/llms.txt +8 -7
- package/package.json +2 -2
- package/scripts/lib/eslint-plugin.d.ts +19 -1
- package/scripts/lib/eslint-plugin.mjs +155 -14
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -11
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
1
|
+
import { useLocale as e } from "../../composables/useLocale.js";
|
|
2
|
+
import t from "../BbIcon/BbIcon.vue.js";
|
|
3
3
|
import n from "../../assets/svgs/clear.svg_raw.js";
|
|
4
4
|
import { createElementBlock as r, createVNode as i, defineComponent as a, openBlock as o, unref as s } from "vue";
|
|
5
5
|
//#region src/components/ClearableButton/ClearableButton.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -7,12 +7,12 @@ var c = ["aria-label"], l = /*@__PURE__*/ a({
|
|
|
7
7
|
__name: "ClearableButton",
|
|
8
8
|
props: { label: {} },
|
|
9
9
|
setup(a) {
|
|
10
|
-
let l = a, { t: u } =
|
|
11
|
-
return (
|
|
10
|
+
let l = a, { t: u } = e();
|
|
11
|
+
return (e, a) => (o(), r("button", {
|
|
12
12
|
"aria-label": l.label || s(u)("common.clearLabel").value,
|
|
13
13
|
class: "bb-clearable-button",
|
|
14
14
|
type: "button"
|
|
15
|
-
}, [i(
|
|
15
|
+
}, [i(t, { icon: s(n) }, null, 8, ["icon"])], 8, c));
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
//#endregion
|
|
@@ -63,7 +63,8 @@ var N = /*@__PURE__*/ u({
|
|
|
63
63
|
}), { floatingStyles: G, placement: K, middlewareData: q, update: J } = M(L, F, {
|
|
64
64
|
placement: d.placement,
|
|
65
65
|
middleware: W,
|
|
66
|
-
strategy: "fixed"
|
|
66
|
+
strategy: "fixed",
|
|
67
|
+
whileElementsMounted: () => () => {}
|
|
67
68
|
}), Y = null;
|
|
68
69
|
C([
|
|
69
70
|
N,
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { transitions as e } from "../../utilities/misc/transitions.js";
|
|
2
2
|
import { useTouchRowLadder as t } from "../../composables/useSheetSurface.js";
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import i from "../../
|
|
6
|
-
import
|
|
3
|
+
import { useLocale as n } from "../../composables/useLocale.js";
|
|
4
|
+
import r from "../BbIcon/BbIcon.vue.js";
|
|
5
|
+
import { isNil as i } from "../../utilities/functions/isNil.js";
|
|
6
|
+
import a from "../../assets/svgs/check_stroke.svg_raw.js";
|
|
7
7
|
import { hash as o } from "../../utilities/functions/hash.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { useVirtualizer as
|
|
8
|
+
import { listboxOptionFontSize as s, listboxOptionHeight as c } from "../../utilities/misc/listboxMetrics.js";
|
|
9
|
+
import { isNotNil as ee } from "../../utilities/functions/isNotNil.js";
|
|
10
|
+
import { useListboxFocus as te } from "../../composables/useListboxFocus.js";
|
|
11
|
+
import { Fragment as ne, computed as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, normalizeStyle as g, openBlock as _, ref as v, renderList as re, renderSlot as y, toDisplayString as b, unref as x, useId as S, useTemplateRef as C, watch as w, withModifiers as T } from "vue";
|
|
12
|
+
import { useVirtualizer as E } from "@tanstack/vue-virtual";
|
|
13
13
|
//#region src/components/FlatListBox/FlatListBox.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
14
|
+
var D = { class: "bb-listbox__outer-container scrollbar-border" }, O = {
|
|
15
15
|
ref: "inner",
|
|
16
16
|
class: "bb-listbox__inner-container",
|
|
17
17
|
tabindex: "-1"
|
|
18
|
-
},
|
|
18
|
+
}, k = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "bb-listbox__loading"
|
|
21
|
-
},
|
|
21
|
+
}, A = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "bb-listbox__no-data"
|
|
24
24
|
}, ie = [
|
|
25
25
|
"id",
|
|
26
26
|
"aria-activedescendant",
|
|
27
27
|
"aria-multiselectable"
|
|
28
|
-
],
|
|
28
|
+
], ae = [
|
|
29
29
|
"id",
|
|
30
30
|
"aria-disabled",
|
|
31
31
|
"aria-posinset",
|
|
@@ -33,7 +33,7 @@ var A = { class: "bb-listbox__outer-container scrollbar-border" }, te = {
|
|
|
33
33
|
"aria-setsize",
|
|
34
34
|
"data-index",
|
|
35
35
|
"onMouseenter"
|
|
36
|
-
],
|
|
36
|
+
], j = { class: "bb-listbox__option-label" }, M = /*@__PURE__*/ m({
|
|
37
37
|
__name: "FlatListBox",
|
|
38
38
|
props: {
|
|
39
39
|
id: {},
|
|
@@ -52,15 +52,15 @@ var A = { class: "bb-listbox__outer-container scrollbar-border" }, te = {
|
|
|
52
52
|
"option:unselected",
|
|
53
53
|
"focused:change"
|
|
54
54
|
],
|
|
55
|
-
setup(e, { expose:
|
|
56
|
-
let
|
|
55
|
+
setup(e, { expose: m, emit: M }) {
|
|
56
|
+
let N = e, P = M, { t: F } = n(), I = C("inner"), L = C("listbox"), { touch: R } = t(), z = l(() => N.optionHeight ? N.optionHeight : c(R.value, !!N.compact)), B = l(() => s(R.value)), V = E({
|
|
57
57
|
get count() {
|
|
58
|
-
return
|
|
58
|
+
return N.options.length;
|
|
59
59
|
},
|
|
60
|
-
getScrollElement: () =>
|
|
61
|
-
estimateSize: () =>
|
|
60
|
+
getScrollElement: () => I.value ?? null,
|
|
61
|
+
estimateSize: () => z.value,
|
|
62
62
|
overscan: 5
|
|
63
|
-
}),
|
|
63
|
+
}), H = l(() => V.value.getVirtualItems()), U = l(() => V.value.getTotalSize()), W = l(() => N.options.map((e, t) => ({
|
|
64
64
|
index: t,
|
|
65
65
|
text: e.text,
|
|
66
66
|
value: e.value,
|
|
@@ -68,107 +68,107 @@ var A = { class: "bb-listbox__outer-container scrollbar-border" }, te = {
|
|
|
68
68
|
item: e.item,
|
|
69
69
|
selected: !!e.selected,
|
|
70
70
|
disabled: !!e.disabled
|
|
71
|
-
}))),
|
|
72
|
-
if (
|
|
73
|
-
let e =
|
|
74
|
-
if (e) return
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
}))), G = S(), K = (e) => `${G}-listbox-option-${e}`, q = l(() => {
|
|
72
|
+
if (i(Y.value)) return;
|
|
73
|
+
let e = W.value[Y.value];
|
|
74
|
+
if (e) return K(e.valueHash);
|
|
75
|
+
}), J = l(() => W.value.length > 0), { focusedIndex: Y, focusNext: oe, focusPrevious: se, focusFirst: ce, focusLast: le, focusFirstSelected: X, focusLastSelected: ue, focusByHash: de, focusByPointer: fe, blurPointerFocus: pe, blur: Z, getHighlighted: me } = te(() => N.options, { disabled: () => !N.open }), Q = v(!1);
|
|
76
|
+
w(Y, (e) => {
|
|
77
|
+
I.value && ee(e) && !Q.value && V.value.scrollToIndex(e, { align: "center" }), Q.value = !1, P("focused:change", q.value);
|
|
78
78
|
});
|
|
79
79
|
let he = (e) => {
|
|
80
|
-
|
|
80
|
+
N.open && (Q.value = !0, fe(e));
|
|
81
81
|
}, ge = () => {
|
|
82
82
|
pe();
|
|
83
83
|
}, $ = () => {
|
|
84
|
-
if (
|
|
85
|
-
let e =
|
|
86
|
-
e.disabled || (e.selected ?
|
|
84
|
+
if (i(Y.value) || !N.open) return;
|
|
85
|
+
let e = W.value[Y.value];
|
|
86
|
+
e.disabled || (e.selected ? P("option:unselected", e) : P("option:selected", e));
|
|
87
87
|
}, _e = (e) => {
|
|
88
|
-
if (e.preventDefault(),
|
|
88
|
+
if (e.preventDefault(), I.value && e.target instanceof HTMLElement && L.value) {
|
|
89
89
|
let t = e.target, n = t.dataset.index;
|
|
90
|
-
for (;
|
|
90
|
+
for (; i(n) && t.parentElement;) t = t.parentElement, n = t.dataset.index;
|
|
91
91
|
if (n) {
|
|
92
|
-
let e =
|
|
93
|
-
e && !e.disabled && (
|
|
92
|
+
let e = W.value[+n];
|
|
93
|
+
e && !e.disabled && (Y.value = +n, $());
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
return
|
|
98
|
-
o(e.map((e) => e.valueHash)) !== o(t.map((e) => e.valueHash)) && (
|
|
99
|
-
}, { flush: "post" }),
|
|
100
|
-
|
|
101
|
-
}, { flush: "post" }),
|
|
102
|
-
focusNext:
|
|
103
|
-
focusPrevious:
|
|
104
|
-
focusFirst:
|
|
105
|
-
focusFirstSelected:
|
|
106
|
-
focusLast:
|
|
97
|
+
return w(() => N.options, (e, t) => {
|
|
98
|
+
o(e.map((e) => e.valueHash)) !== o(t.map((e) => e.valueHash)) && (V.value.measure(), Z());
|
|
99
|
+
}, { flush: "post" }), w(z, () => {
|
|
100
|
+
V.value.measure();
|
|
101
|
+
}, { flush: "post" }), m({
|
|
102
|
+
focusNext: oe,
|
|
103
|
+
focusPrevious: se,
|
|
104
|
+
focusFirst: ce,
|
|
105
|
+
focusFirstSelected: X,
|
|
106
|
+
focusLast: le,
|
|
107
107
|
focusLastSelected: ue,
|
|
108
108
|
blur: Z,
|
|
109
109
|
confirmOption: $,
|
|
110
110
|
focusByHash: de,
|
|
111
111
|
getHighlighted: me,
|
|
112
|
-
getActiveDescendantId: () =>
|
|
113
|
-
}), (e, t) => (
|
|
114
|
-
class:
|
|
112
|
+
getActiveDescendantId: () => q.value
|
|
113
|
+
}), (e, t) => (_(), u("span", {
|
|
114
|
+
class: h(["bb-listbox", {
|
|
115
115
|
"bb-listbox--compact": e.compact,
|
|
116
116
|
"bb-listbox--loading": e.loading,
|
|
117
117
|
"bb-listbox--multiple": e.multiple,
|
|
118
|
-
"bb-listbox--no-data": !
|
|
118
|
+
"bb-listbox--no-data": !J.value,
|
|
119
119
|
"bb-listbox--open": e.open
|
|
120
120
|
}]),
|
|
121
|
-
style:
|
|
121
|
+
style: g({
|
|
122
122
|
"--transition-duration": `${e.transitionDuration}ms`,
|
|
123
|
-
"--option-height": `${
|
|
124
|
-
"--option-font-size":
|
|
123
|
+
"--option-height": `${z.value}px`,
|
|
124
|
+
"--option-font-size": B.value
|
|
125
125
|
}),
|
|
126
|
-
onClick:
|
|
127
|
-
onMousedown: t[0] ||=
|
|
128
|
-
}, [
|
|
129
|
-
|
|
130
|
-
e.loading && !
|
|
126
|
+
onClick: T(_e, ["stop"]),
|
|
127
|
+
onMousedown: t[0] ||= T(() => {}, ["prevent"])
|
|
128
|
+
}, [d("span", D, [d("span", O, [
|
|
129
|
+
y(e.$slots, "options:prepend"),
|
|
130
|
+
e.loading && !J.value ? (_(), u("span", k, [y(e.$slots, "loading", {}, () => [f(b(e.loadingText || x(F)("common.loadingText").value), 1)])])) : J.value ? (_(), u("span", {
|
|
131
131
|
key: 2,
|
|
132
132
|
id: e.id,
|
|
133
133
|
ref: "listbox",
|
|
134
|
-
"aria-activedescendant":
|
|
134
|
+
"aria-activedescendant": q.value,
|
|
135
135
|
"aria-multiselectable": e.multiple ? !0 : void 0,
|
|
136
136
|
role: "listbox",
|
|
137
|
-
style:
|
|
137
|
+
style: g({ height: `${U.value}px` }),
|
|
138
138
|
tabindex: "-1",
|
|
139
139
|
onMouseleave: ge
|
|
140
|
-
}, [(
|
|
141
|
-
id:
|
|
142
|
-
key:
|
|
143
|
-
"aria-disabled":
|
|
140
|
+
}, [(_(!0), u(ne, null, re(H.value, (t) => (_(), u("span", {
|
|
141
|
+
id: K(W.value[t.index].valueHash),
|
|
142
|
+
key: W.value[t.index].valueHash,
|
|
143
|
+
"aria-disabled": W.value[t.index].disabled ? !0 : void 0,
|
|
144
144
|
"aria-posinset": t.index + 1,
|
|
145
|
-
"aria-selected":
|
|
146
|
-
"aria-setsize":
|
|
147
|
-
class:
|
|
148
|
-
"bb-listbox__option--focused":
|
|
149
|
-
"bb-listbox__option--selected":
|
|
150
|
-
"bb-listbox__option--disabled":
|
|
145
|
+
"aria-selected": W.value[t.index].selected,
|
|
146
|
+
"aria-setsize": N.options.length,
|
|
147
|
+
class: h(["bb-listbox__option", {
|
|
148
|
+
"bb-listbox__option--focused": x(Y) === t.index,
|
|
149
|
+
"bb-listbox__option--selected": W.value[t.index].selected,
|
|
150
|
+
"bb-listbox__option--disabled": W.value[t.index].disabled
|
|
151
151
|
}]),
|
|
152
152
|
"data-index": t.index,
|
|
153
153
|
role: "option",
|
|
154
|
-
style:
|
|
155
|
-
onMouseenter:
|
|
156
|
-
}, [
|
|
157
|
-
disabled:
|
|
158
|
-
focused:
|
|
154
|
+
style: g({ transform: `translateY(${t.start}px)` }),
|
|
155
|
+
onMouseenter: T((e) => he(t.index), ["stop"])
|
|
156
|
+
}, [y(e.$slots, "option", {
|
|
157
|
+
disabled: W.value[t.index].disabled,
|
|
158
|
+
focused: x(Y) === t.index,
|
|
159
159
|
index: t.index,
|
|
160
|
-
item:
|
|
161
|
-
selected:
|
|
162
|
-
text:
|
|
163
|
-
value:
|
|
164
|
-
}, () => [
|
|
160
|
+
item: W.value[t.index].item,
|
|
161
|
+
selected: W.value[t.index].selected,
|
|
162
|
+
text: W.value[t.index].text,
|
|
163
|
+
value: W.value[t.index].value
|
|
164
|
+
}, () => [d("span", j, b(W.value[t.index].text), 1)]), p(r, {
|
|
165
165
|
"aria-hidden": "true",
|
|
166
166
|
class: "bb-listbox__option-check",
|
|
167
|
-
icon:
|
|
168
|
-
}, null, 8, ["icon"])]
|
|
169
|
-
|
|
167
|
+
icon: x(a)
|
|
168
|
+
}, null, 8, ["icon"])], 46, ae))), 128))], 44, ie)) : (_(), u("span", A, [y(e.$slots, "no-data", {}, () => [f(b(e.noDataText || x(F)("common.noDataText").value), 1)])])),
|
|
169
|
+
y(e.$slots, "options:append")
|
|
170
170
|
], 512)])], 38));
|
|
171
171
|
}
|
|
172
172
|
});
|
|
173
173
|
//#endregion
|
|
174
|
-
export {
|
|
174
|
+
export { M as default };
|
package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { transitions as e } from "../../utilities/misc/transitions.js";
|
|
2
2
|
import { useTouchRowLadder as t } from "../../composables/useSheetSurface.js";
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import i from "../../
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { useLocale as n } from "../../composables/useLocale.js";
|
|
4
|
+
import r from "../BbIcon/BbIcon.vue.js";
|
|
5
|
+
import { isNil as i } from "../../utilities/functions/isNil.js";
|
|
6
|
+
import a from "../../assets/svgs/check_stroke.svg_raw.js";
|
|
7
|
+
import { listboxHeaderHeight as o, listboxOptionFontSize as s, listboxOptionHeight as c } from "../../utilities/misc/listboxMetrics.js";
|
|
8
|
+
import { isNotNil as l } from "../../utilities/functions/isNotNil.js";
|
|
9
|
+
import { useListboxFocus as u } from "../../composables/useListboxFocus.js";
|
|
10
10
|
import { indexBy as d } from "../../utilities/functions/indexBy.js";
|
|
11
|
-
import { Fragment as f, computed as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as ee, defineComponent as _, nextTick as te, normalizeClass as v, normalizeStyle as y, openBlock as b, ref as
|
|
12
|
-
import { useVirtualizer as
|
|
11
|
+
import { Fragment as f, computed as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as ee, defineComponent as _, nextTick as te, normalizeClass as v, normalizeStyle as y, openBlock as b, ref as ne, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useId as re, useTemplateRef as T, watch as E, withModifiers as D } from "vue";
|
|
12
|
+
import { useVirtualizer as ie } from "@tanstack/vue-virtual";
|
|
13
13
|
//#region src/components/GroupedListBox/GroupedListBox.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
14
|
+
var ae = { class: "bb-listbox__outer-container scrollbar-border" }, oe = {
|
|
15
15
|
ref: "inner",
|
|
16
16
|
class: "bb-listbox__inner-container",
|
|
17
17
|
tabindex: "-1"
|
|
18
|
-
},
|
|
18
|
+
}, se = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "bb-listbox__loading"
|
|
21
|
-
},
|
|
21
|
+
}, ce = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "bb-listbox__no-data"
|
|
24
|
-
},
|
|
24
|
+
}, le = [
|
|
25
25
|
"id",
|
|
26
26
|
"aria-activedescendant",
|
|
27
27
|
"aria-multiselectable"
|
|
28
|
-
],
|
|
28
|
+
], O = ["aria-disabled", "aria-labelledby"], k = ["id"], A = { class: "bb-listbox__group-header-label" }, ue = [
|
|
29
29
|
"id",
|
|
30
30
|
"aria-disabled",
|
|
31
31
|
"aria-posinset",
|
|
@@ -54,7 +54,7 @@ var ie = { class: "bb-listbox__outer-container scrollbar-border" }, ae = {
|
|
|
54
54
|
"focused:change"
|
|
55
55
|
],
|
|
56
56
|
setup(e, { expose: _, emit: j }) {
|
|
57
|
-
let M = e, N = j, { t: P } =
|
|
57
|
+
let M = e, N = j, { t: P } = n(), F = T("inner"), fe = T("listbox"), { touch: I } = t(), L = p(() => M.optionHeight ? M.optionHeight : c(I.value, !!M.compact)), R = p(() => M.headerHeight ? M.headerHeight : o(I.value, !!M.compact)), z = p(() => s(I.value)), B = p(() => {
|
|
58
58
|
let e = 0;
|
|
59
59
|
return M.groups.map((t, n) => {
|
|
60
60
|
let r = t.id, i = e, a = t.options.length, o = R.value + a * L.value, s = `${W}-group-header-${t.id}`, c = typeof t.data == "string" ? t.data : JSON.stringify(t.data), l = t.options.every((e) => e.disabled), u = t.data, d = t.options;
|
|
@@ -83,25 +83,25 @@ var ie = { class: "bb-listbox__outer-container scrollbar-border" }, ae = {
|
|
|
83
83
|
text: n.text,
|
|
84
84
|
value: n.value,
|
|
85
85
|
valueHash: n.valueHash
|
|
86
|
-
})))), U = p(() => d(H.value, "id")), W =
|
|
87
|
-
if (
|
|
86
|
+
})))), U = p(() => d(H.value, "id")), W = re(), G = (e) => `${W}-listbox-option-${e}`, K = p(() => {
|
|
87
|
+
if (i(X.value)) return;
|
|
88
88
|
let e = H.value[X.value];
|
|
89
89
|
if (e) return G(e.valueHash);
|
|
90
|
-
}), q = p(() => H.value.length > 0), pe = (e) => R.value + M.groups[e].options.length * L.value, J =
|
|
90
|
+
}), q = p(() => H.value.length > 0), pe = (e) => R.value + M.groups[e].options.length * L.value, J = ie({
|
|
91
91
|
get count() {
|
|
92
92
|
return M.groups.length;
|
|
93
93
|
},
|
|
94
94
|
getScrollElement: () => F.value ?? null,
|
|
95
95
|
estimateSize: (e) => pe(e),
|
|
96
96
|
overscan: 2
|
|
97
|
-
}), me = p(() => J.value.getVirtualItems()), Y = p(() => J.value.getTotalSize()), { focusedIndex: X, focusNext: he, focusPrevious: ge, focusFirst: _e, focusLast: ve, focusFirstSelected: ye, focusLastSelected: be, focusByHash: xe, focusByPointer: Se, blurPointerFocus: Ce, blur: Z, getHighlighted: we } =
|
|
98
|
-
if (!F.value ||
|
|
97
|
+
}), me = p(() => J.value.getVirtualItems()), Y = p(() => J.value.getTotalSize()), { focusedIndex: X, focusNext: he, focusPrevious: ge, focusFirst: _e, focusLast: ve, focusFirstSelected: ye, focusLastSelected: be, focusByHash: xe, focusByPointer: Se, blurPointerFocus: Ce, blur: Z, getHighlighted: we } = u(p(() => H.value), { disabled: () => !M.open }), Q = ne(!1), Te = async () => {
|
|
98
|
+
if (!F.value || i(X.value)) return;
|
|
99
99
|
let e = H.value[X.value]?.groupIndex;
|
|
100
|
-
|
|
100
|
+
l(e) && (J.value.scrollToIndex(e, { align: "auto" }), await te());
|
|
101
101
|
let t = F.value.querySelector(`[data-index="${X.value}"]`);
|
|
102
102
|
t && t.scrollIntoView({ block: "nearest" });
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
E(X, () => {
|
|
105
105
|
Q.value || Te(), Q.value = !1, N("focused:change", K.value);
|
|
106
106
|
});
|
|
107
107
|
let Ee = (e) => {
|
|
@@ -109,7 +109,7 @@ var ie = { class: "bb-listbox__outer-container scrollbar-border" }, ae = {
|
|
|
109
109
|
}, De = () => {
|
|
110
110
|
Ce();
|
|
111
111
|
}, $ = () => {
|
|
112
|
-
if (
|
|
112
|
+
if (i(X.value) || !M.open) return;
|
|
113
113
|
let e = H.value[X.value];
|
|
114
114
|
if (!e || e.disabled) return;
|
|
115
115
|
let t = {
|
|
@@ -124,16 +124,16 @@ var ie = { class: "bb-listbox__outer-container scrollbar-border" }, ae = {
|
|
|
124
124
|
}, Oe = (e) => {
|
|
125
125
|
if (e.preventDefault(), F.value && e.target instanceof HTMLElement && fe.value) {
|
|
126
126
|
let t = e.target, n = t.dataset.index;
|
|
127
|
-
for (;
|
|
127
|
+
for (; i(n) && t.parentElement;) t = t.parentElement, n = t.dataset.index;
|
|
128
128
|
if (n) {
|
|
129
129
|
let e = H.value[+n];
|
|
130
130
|
e && !e.disabled && (X.value = +n, $());
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
return
|
|
134
|
+
return E(() => M.groups, (e, t) => {
|
|
135
135
|
e.flatMap((e) => e.options.map((e) => e.valueHash)).join(",") !== t.flatMap((e) => e.options.map((e) => e.valueHash)).join(",") && (J.value.measure(), Z());
|
|
136
|
-
}, { flush: "post" }),
|
|
136
|
+
}, { flush: "post" }), E([L, R], () => {
|
|
137
137
|
J.value.measure();
|
|
138
138
|
}, { flush: "post" }), _({
|
|
139
139
|
focusNext: he,
|
|
@@ -161,11 +161,11 @@ var ie = { class: "bb-listbox__outer-container scrollbar-border" }, ae = {
|
|
|
161
161
|
"--group-header-height": `${R.value}px`,
|
|
162
162
|
"--option-font-size": z.value
|
|
163
163
|
}),
|
|
164
|
-
onClick:
|
|
165
|
-
onMousedown: t[0] ||=
|
|
166
|
-
}, [h("span",
|
|
167
|
-
|
|
168
|
-
e.loading && !q.value ? (b(), m("span",
|
|
164
|
+
onClick: D(Oe, ["stop"]),
|
|
165
|
+
onMousedown: t[0] ||= D(() => {}, ["prevent"])
|
|
166
|
+
}, [h("span", ae, [h("span", oe, [
|
|
167
|
+
S(e.$slots, "options:prepend"),
|
|
168
|
+
e.loading && !q.value ? (b(), m("span", se, [S(e.$slots, "loading", {}, () => [g(C(e.loadingText || w(P)("common.loadingText").value), 1)])])) : q.value ? (b(), m("span", {
|
|
169
169
|
key: 2,
|
|
170
170
|
id: e.id,
|
|
171
171
|
ref: "listbox",
|
|
@@ -175,7 +175,7 @@ var ie = { class: "bb-listbox__outer-container scrollbar-border" }, ae = {
|
|
|
175
175
|
style: y({ height: `${Y.value}px` }),
|
|
176
176
|
tabindex: "-1",
|
|
177
177
|
onMouseleave: De
|
|
178
|
-
}, [(b(!0), m(f, null,
|
|
178
|
+
}, [(b(!0), m(f, null, x(me.value, (t) => (b(), m("span", {
|
|
179
179
|
key: V.value[t.index].id,
|
|
180
180
|
"aria-disabled": V.value[t.index].allOptionsAreDisabled,
|
|
181
181
|
"aria-labelledby": V.value[t.index].headerId,
|
|
@@ -186,41 +186,41 @@ var ie = { class: "bb-listbox__outer-container scrollbar-border" }, ae = {
|
|
|
186
186
|
id: V.value[t.index].headerId,
|
|
187
187
|
class: "bb-listbox__group-header",
|
|
188
188
|
role: "presentation"
|
|
189
|
-
}, [
|
|
189
|
+
}, [S(e.$slots, "group", {
|
|
190
190
|
disabled: V.value[t.index].allOptionsAreDisabled,
|
|
191
191
|
index: t.index,
|
|
192
192
|
item: V.value[t.index].data,
|
|
193
193
|
length: V.value[t.index].length,
|
|
194
194
|
text: V.value[t.index].label
|
|
195
|
-
}, () => [h("span",
|
|
196
|
-
id: G(
|
|
197
|
-
key:
|
|
198
|
-
"aria-disabled": U.value[
|
|
199
|
-
"aria-posinset": U.value[
|
|
200
|
-
"aria-selected": U.value[
|
|
195
|
+
}, () => [h("span", A, C(V.value[t.index].label), 1)])], 8, k), (b(!0), m(f, null, x(V.value[t.index].options, (n) => (b(), m("span", {
|
|
196
|
+
id: G(n.valueHash),
|
|
197
|
+
key: n.valueHash,
|
|
198
|
+
"aria-disabled": U.value[n.valueHash].disabled ? !0 : void 0,
|
|
199
|
+
"aria-posinset": U.value[n.valueHash].indexInGroup + 1,
|
|
200
|
+
"aria-selected": U.value[n.valueHash].selected,
|
|
201
201
|
"aria-setsize": V.value[t.index].length,
|
|
202
202
|
class: v(["bb-listbox__option", {
|
|
203
|
-
"bb-listbox__option--focused":
|
|
204
|
-
"bb-listbox__option--selected": U.value[
|
|
205
|
-
"bb-listbox__option--disabled": U.value[
|
|
203
|
+
"bb-listbox__option--focused": w(X) === U.value[n.valueHash].globalIndex,
|
|
204
|
+
"bb-listbox__option--selected": U.value[n.valueHash].selected,
|
|
205
|
+
"bb-listbox__option--disabled": U.value[n.valueHash].disabled
|
|
206
206
|
}]),
|
|
207
|
-
"data-index": U.value[
|
|
207
|
+
"data-index": U.value[n.valueHash].globalIndex,
|
|
208
208
|
role: "option",
|
|
209
|
-
onMouseenter:
|
|
210
|
-
}, [
|
|
211
|
-
disabled: !!U.value[
|
|
212
|
-
focused:
|
|
213
|
-
index: U.value[
|
|
214
|
-
item: U.value[
|
|
215
|
-
selected: !!U.value[
|
|
216
|
-
text: U.value[
|
|
217
|
-
value: U.value[
|
|
218
|
-
}, () => [h("span", de,
|
|
209
|
+
onMouseenter: D((e) => Ee(U.value[n.valueHash].globalIndex), ["stop"])
|
|
210
|
+
}, [S(e.$slots, "option", {
|
|
211
|
+
disabled: !!U.value[n.valueHash].disabled,
|
|
212
|
+
focused: w(X) === U.value[n.valueHash].globalIndex,
|
|
213
|
+
index: U.value[n.valueHash].globalIndex,
|
|
214
|
+
item: U.value[n.valueHash].item,
|
|
215
|
+
selected: !!U.value[n.valueHash].selected,
|
|
216
|
+
text: U.value[n.valueHash].text,
|
|
217
|
+
value: U.value[n.valueHash].value
|
|
218
|
+
}, () => [h("span", de, C(U.value[n.valueHash].text), 1)]), ee(r, {
|
|
219
219
|
"aria-hidden": "true",
|
|
220
220
|
class: "bb-listbox__option-check",
|
|
221
|
-
icon:
|
|
222
|
-
}, null, 8, ["icon"])]
|
|
223
|
-
|
|
221
|
+
icon: w(a)
|
|
222
|
+
}, null, 8, ["icon"])], 42, ue))), 128))], 12, O))), 128))], 44, le)) : (b(), m("span", ce, [S(e.$slots, "no-data", {}, () => [g(C(e.noDataText || w(P)("common.noDataText").value), 1)])])),
|
|
223
|
+
S(e.$slots, "options:append")
|
|
224
224
|
], 512)])], 38));
|
|
225
225
|
}
|
|
226
226
|
});
|
|
@@ -1,37 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { hash as e } from "../utilities/functions/hash.js";
|
|
2
|
+
import { useItemText as t } from "./useItemText.js";
|
|
3
|
+
import { useItemValue as n } from "./useItemValue.js";
|
|
4
4
|
import { computed as r, unref as i } from "vue";
|
|
5
5
|
//#region src/composables/useBaseOptions.ts
|
|
6
|
-
var { getItemText: a } =
|
|
7
|
-
let p = r(() => i(
|
|
8
|
-
let
|
|
6
|
+
var { getItemText: a } = t(), { getItemValue: o } = n(), s = (e, t, n, r, i, a) => t ? !0 : typeof n == "function" ? !n(e) : typeof n == "boolean" && !n || !a && r !== void 0 && i >= r, c = ({ items: t, disabled: n, selectable: c, itemText: l, itemValue: u, selectedIndexedByHash: d, max: f = Infinity }) => {
|
|
7
|
+
let p = r(() => i(n)), m = r(() => i(t)), h = r(() => Object.keys(d.value).length), g = (t) => {
|
|
8
|
+
let n = o(t, i(u)), r = e(n), m = a(t, i(l)), g = d.value[r] !== void 0;
|
|
9
9
|
return {
|
|
10
|
-
item:
|
|
10
|
+
item: t,
|
|
11
11
|
text: m,
|
|
12
|
-
value:
|
|
12
|
+
value: n,
|
|
13
13
|
valueHash: r,
|
|
14
14
|
selected: g,
|
|
15
|
-
disabled: i(s(
|
|
15
|
+
disabled: i(s(t, p.value, i(c), i(f), h.value, g))
|
|
16
16
|
};
|
|
17
17
|
}, _ = r(() => {
|
|
18
|
-
let
|
|
19
|
-
for (let
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
let t = [], n = /* @__PURE__ */ new Set(), r = i(l);
|
|
19
|
+
for (let s of m.value) {
|
|
20
|
+
let c = o(s, i(u)), l = e(c);
|
|
21
|
+
if (n.has(l)) continue;
|
|
22
|
+
n.add(l);
|
|
23
|
+
let d;
|
|
24
|
+
t.push({
|
|
25
|
+
item: s,
|
|
26
|
+
get text() {
|
|
27
|
+
return d ??= a(s, r);
|
|
28
|
+
},
|
|
29
|
+
value: c,
|
|
30
|
+
valueHash: l
|
|
31
|
+
});
|
|
27
32
|
}
|
|
28
|
-
return
|
|
33
|
+
return t;
|
|
29
34
|
});
|
|
30
35
|
return {
|
|
31
36
|
options: r(() => _.value.map((e) => {
|
|
32
37
|
let t = d.value[e.valueHash] !== void 0;
|
|
33
38
|
return {
|
|
34
|
-
|
|
39
|
+
item: e.item,
|
|
40
|
+
get text() {
|
|
41
|
+
return e.text;
|
|
42
|
+
},
|
|
43
|
+
value: e.value,
|
|
44
|
+
valueHash: e.valueHash,
|
|
35
45
|
selected: t,
|
|
36
46
|
disabled: s(e.item, p.value, i(c), i(f), h.value, t)
|
|
37
47
|
};
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import { DynamicConfig } from '../types/Config';
|
|
2
2
|
export type { DynamicConfig } from '../types/Config';
|
|
3
|
+
/**
|
|
4
|
+
* Change the runtime config for **this app**.
|
|
5
|
+
*
|
|
6
|
+
* Q18.2 — this used to `Object.assign` into the module-level virtual config,
|
|
7
|
+
* i.e. one object shared by the whole Node process. Under SSR that made a
|
|
8
|
+
* per-visitor locale impossible: setting it during one request set it for
|
|
9
|
+
* every request being served at that moment, and the visitor who suffered was
|
|
10
|
+
* not the one who triggered it.
|
|
11
|
+
*
|
|
12
|
+
* Called from a component (or a composable a component calls) it now writes to
|
|
13
|
+
* the config `bitbossUiPlugin` provided for that app, and SSR gives every
|
|
14
|
+
* request its own app — so this is per-request without the caller doing
|
|
15
|
+
* anything differently.
|
|
16
|
+
*
|
|
17
|
+
* With no app to address, the write lands on the process-global defaults —
|
|
18
|
+
* the old behaviour and the old hazard. That is fine in a browser (one
|
|
19
|
+
* process, one user) and wrong on a server, so it warns in dev.
|
|
20
|
+
*
|
|
21
|
+
* Q20.4 — the warning is gated on WHERE THE WRITE ACTUALLY LANDS, by identity
|
|
22
|
+
* against the build-time object, not on `getCurrentInstance()`. The two are
|
|
23
|
+
* not the same question, and a consumer found the gap the hard way: under the
|
|
24
|
+
* Nuxt module nothing provided `BB_CONFIG_KEY`, so `inject` fell through to
|
|
25
|
+
* the process-global even inside a component's setup. The old gate saw an
|
|
26
|
+
* instance, stayed silent, and let a cross-visitor locale write through — the
|
|
27
|
+
* exact failure it existed to catch, in the one place it could not see.
|
|
28
|
+
*/
|
|
3
29
|
export declare const useBbConfig: () => {
|
|
4
|
-
setConfig: (patch: Partial<DynamicConfig>) =>
|
|
5
|
-
iconDefaultSizes: import('../types/Config').DialogSizes;
|
|
6
|
-
dialogDefaultSizes: import('../types/Config').DialogSizes;
|
|
7
|
-
offCanvasDefaultSizes: import('../types/Config').DialogSizes;
|
|
8
|
-
defaultLocale: import('../types/Config').BuiltinLocaleKey;
|
|
9
|
-
} & Partial<DynamicConfig>;
|
|
30
|
+
setConfig: (patch: Partial<DynamicConfig>) => void;
|
|
10
31
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useConfig as e } from "./useConfig.js";
|
|
2
|
+
import { config as t } from "virtual:bitboss-ui/config";
|
|
2
3
|
//#region src/composables/useBbConfig.ts
|
|
3
|
-
var
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e(), r = n === t;
|
|
6
|
+
return { setConfig: (e) => {
|
|
7
|
+
process.env.NODE_ENV !== "production" && r && typeof window > "u" && console.warn("[bitboss-ui] setConfig() wrote the process-global defaults rather than one app, during a SERVER render — that leaks into other visitors being served concurrently. This app has no per-app config to write to, which means either the call is outside any app context, or the library plugin was never installed on it. Fix, by framework: Vue/Inertia — pass per-request values where the app is created, `app.use(bitbossUiPlugin, { locale })`. Nuxt — the module provides the config for you, so call setConfig from a component, or from your own Nuxt plugin inside `nuxtApp.vueApp.runWithContext(() => …)`; if this still fires, the bitboss-ui Nuxt module is not registered in `modules`."), Object.assign(n, e);
|
|
8
|
+
} };
|
|
9
|
+
};
|
|
4
10
|
//#endregion
|
|
5
11
|
export { n as useBbConfig };
|