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/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { hash as e } from "../../utilities/functions/hash.js";
|
|
2
|
+
import { useItemsGetter as t } from "../../composables/useItemsGetter.js";
|
|
3
3
|
import { useHashedWatcher as n } from "../../composables/useHashedWatcher.js";
|
|
4
4
|
import r from "../OptionsContainer/OptionsContainer.vue.js";
|
|
5
5
|
import { useIndexById as i } from "../../composables/useIndexById.js";
|
|
@@ -61,39 +61,41 @@ var D = /*@__PURE__*/ g({
|
|
|
61
61
|
setup(g, { emit: D }) {
|
|
62
62
|
let O = g, k = D, A = w(), j = f(() => O.ariaLabelledby || A["aria-labelledby"] || A["aria-label"] ? "radiogroup" : void 0), M = T("container"), { active: N } = c(M);
|
|
63
63
|
l(N, () => k("inactive")), u(N, () => k("active"));
|
|
64
|
-
let { getter: P,
|
|
65
|
-
O.enforceCoherence && !
|
|
66
|
-
}, { hasPrefilled:
|
|
64
|
+
let { getter: P, clientReproducible: F, hydratedFromSsr: I, items: L, loading: R } = t({ items: S(O, "items") }), z = () => {
|
|
65
|
+
O.enforceCoherence && !W.value && k("update:modelValue", null);
|
|
66
|
+
}, { hasPrefilled: B } = s({
|
|
67
|
+
alreadyLoaded: I,
|
|
68
|
+
clientReproducible: F,
|
|
67
69
|
trigger: !0,
|
|
68
70
|
currentValue: O.modelValue,
|
|
69
71
|
multiple: !1,
|
|
70
72
|
fn: async (e) => {
|
|
71
|
-
await P(e, O.modelValue),
|
|
73
|
+
await P(e, O.modelValue), z();
|
|
72
74
|
}
|
|
73
|
-
}), { data:
|
|
75
|
+
}), { data: V } = i({ items: f(() => [].concat(O.modelValue)) }), { options: H } = a({
|
|
74
76
|
disabled: S(O, "disabled"),
|
|
75
|
-
items:
|
|
77
|
+
items: L,
|
|
76
78
|
itemText: O.itemText,
|
|
77
79
|
itemValue: O.itemValue,
|
|
78
80
|
max: Infinity,
|
|
79
81
|
selectable: S(O, "selectable"),
|
|
80
|
-
selectedIndexedByHash:
|
|
81
|
-
}), { data:
|
|
82
|
-
items:
|
|
82
|
+
selectedIndexedByHash: V
|
|
83
|
+
}), { data: U } = i({
|
|
84
|
+
items: H,
|
|
83
85
|
key: "valueHash"
|
|
84
|
-
}), { coherent:
|
|
86
|
+
}), { coherent: W } = o({
|
|
85
87
|
modelValue: S(O, "modelValue"),
|
|
86
88
|
multiple: !1,
|
|
87
|
-
iteratee: (
|
|
88
|
-
}),
|
|
89
|
+
iteratee: (t) => !!U.value[e(t)]
|
|
90
|
+
}), G = 0;
|
|
89
91
|
n(() => O.modelValue, async () => {
|
|
90
|
-
|
|
92
|
+
G++, W.value || (await P(!0, O.modelValue), z()), G--;
|
|
91
93
|
}, { debounce: O.modelValueDebounceTime }), n(() => [O.dependencies, O.items], async () => {
|
|
92
|
-
|
|
94
|
+
B.value && (G++, await P(!0, O.modelValue), G === 1 && z(), G--);
|
|
93
95
|
}, { debounce: O.depsDebounceTime });
|
|
94
|
-
let
|
|
96
|
+
let K = (e) => {
|
|
95
97
|
if (O.id) return [O.id, e.valueHash].filter(Boolean).join("-");
|
|
96
|
-
},
|
|
98
|
+
}, q = {
|
|
97
99
|
onBlur: (e) => k("blur", e),
|
|
98
100
|
onChange: (e) => k("change", e),
|
|
99
101
|
onClick: (e) => k("click", e),
|
|
@@ -114,10 +116,10 @@ var D = /*@__PURE__*/ g({
|
|
|
114
116
|
"has-errors": e.hasErrors,
|
|
115
117
|
"has-warning": e.hasWarning,
|
|
116
118
|
"hide-label": e.hideLabel,
|
|
117
|
-
loading: !!C(
|
|
119
|
+
loading: !!C(R),
|
|
118
120
|
"loading-text": e.loadingText,
|
|
119
121
|
"no-data-text": e.noDataText,
|
|
120
|
-
options: C(
|
|
122
|
+
options: C(H),
|
|
121
123
|
role: j.value
|
|
122
124
|
}, {
|
|
123
125
|
prepend: E(() => [x(e.$slots, "prepend")]),
|
|
@@ -125,7 +127,7 @@ var D = /*@__PURE__*/ g({
|
|
|
125
127
|
"no-data": E(() => [x(e.$slots, "no-data")]),
|
|
126
128
|
label: E((t) => [x(e.$slots, "label", y(_(t)))]),
|
|
127
129
|
input: E(({ option: t, index: n }) => [h(d, v({
|
|
128
|
-
id:
|
|
130
|
+
id: K(t),
|
|
129
131
|
"aria-describedby": e.ariaDescribedby,
|
|
130
132
|
autofocus: e.autofocus && !n,
|
|
131
133
|
checked: t.selected,
|
|
@@ -137,7 +139,7 @@ var D = /*@__PURE__*/ g({
|
|
|
137
139
|
readonly: e.readonly,
|
|
138
140
|
required: e.required,
|
|
139
141
|
value: t.value
|
|
140
|
-
},
|
|
142
|
+
}, q), m({ _: 2 }, [e.$slots.icon ? {
|
|
141
143
|
name: "icon",
|
|
142
144
|
fn: E((n) => [x(e.$slots, "icon", v({
|
|
143
145
|
item: t.item,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import { useId as t } from "../../composables/useId.js";
|
|
3
|
+
import { useLogger as n } from "../../composables/useLogger.js";
|
|
4
4
|
import { useLocale as r } from "../../composables/useLocale.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { parseSize as i } from "../../utilities/functions/parseSize.js";
|
|
6
|
+
import { identity as a } from "../../utilities/functions/identity.js";
|
|
7
|
+
import { useActiveInactiveState as o } from "../../composables/useActiveInactiveState.js";
|
|
8
|
+
import { useOnFalsy as s } from "../../composables/useOnFalsy.js";
|
|
9
|
+
import { useOnTruthy as c } from "../../composables/useOnTruthy.js";
|
|
10
10
|
import { Fragment as l, computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, defineComponent as m, mergeProps as h, normalizeClass as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, unref as S, useTemplateRef as C } from "vue";
|
|
11
11
|
//#region src/components/BbBaseRating/BbBaseRating.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var w = [
|
|
@@ -57,25 +57,25 @@ var w = [
|
|
|
57
57
|
"update:modelValue"
|
|
58
58
|
],
|
|
59
59
|
setup(m, { emit: k }) {
|
|
60
|
-
let A = m, j = k, { t:
|
|
61
|
-
let e = [A.ariaDescribedby,
|
|
60
|
+
let A = m, j = k, M = e(), { t: N } = r(), P = n(), F = C("container"), { active: I } = o(F), L = u(() => A.id || t().id.value), R = t().id, z = v(!1), B = u(() => A.ariaLabelledby ? "radiogroup" : void 0), V = u(() => A.clearable && !A.disabled && !A.readonly), H = N("rating.clearHint"), U = u(() => {
|
|
61
|
+
let e = [A.ariaDescribedby, V.value ? R.value : void 0].filter(Boolean);
|
|
62
62
|
return e.length ? e.join(" ") : void 0;
|
|
63
63
|
});
|
|
64
|
-
|
|
65
|
-
let
|
|
64
|
+
s(I, () => j("inactive")), c(I, () => j("active"));
|
|
65
|
+
let W = (e) => {
|
|
66
66
|
if (A.readonly) {
|
|
67
67
|
e.target instanceof HTMLInputElement && (e.target.checked = +e.target.value === A.modelValue);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
j("change", e), e.target instanceof HTMLInputElement && e.target.checked && j("update:modelValue", +e.target.value);
|
|
71
|
-
},
|
|
72
|
-
A.readonly && e.preventDefault(), j("click", e), !A.readonly && e.target instanceof HTMLInputElement && A.clearable && e.target.checked && +e.target.value === A.modelValue && (
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
},
|
|
71
|
+
}, G = (e) => {
|
|
72
|
+
A.readonly && e.preventDefault(), j("click", e), !A.readonly && e.target instanceof HTMLInputElement && A.clearable && e.target.checked && +e.target.value === A.modelValue && (z.value = !0, j("update:modelValue", null));
|
|
73
|
+
}, K = () => {
|
|
74
|
+
z.value &&= !1;
|
|
75
|
+
}, q = {
|
|
76
76
|
onBlur: (e) => j("blur", e),
|
|
77
|
-
onChange:
|
|
78
|
-
onClick:
|
|
77
|
+
onChange: W,
|
|
78
|
+
onClick: G,
|
|
79
79
|
onFocus: (e) => j("focus", e),
|
|
80
80
|
onInput: (e) => j("input", e),
|
|
81
81
|
onKeydown: (e) => {
|
|
@@ -95,27 +95,27 @@ var w = [
|
|
|
95
95
|
},
|
|
96
96
|
onMousedown: (e) => j("mousedown", e),
|
|
97
97
|
onMouseup: (e) => j("mouseup", e)
|
|
98
|
-
},
|
|
98
|
+
}, J = u(() => {
|
|
99
99
|
if (A.size != null) try {
|
|
100
|
-
return
|
|
100
|
+
return i(A.size, M.iconDefaultSizes);
|
|
101
101
|
} catch {
|
|
102
|
-
|
|
102
|
+
P.warn(`Invalid size: "${A.size}" in BbRating. Falling back to the default star size.`);
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
}),
|
|
106
|
-
let t = [
|
|
105
|
+
}), Y = u(() => Array.from({ length: A.stars }, (e, t) => t + 1).map((e) => {
|
|
106
|
+
let t = [L.value, e].filter(a).join("_"), n = e === A.modelValue, r = e <= (A.modelValue ?? 0);
|
|
107
107
|
return {
|
|
108
108
|
checked: n,
|
|
109
109
|
disabled: !!A.disabled,
|
|
110
110
|
filled: r,
|
|
111
111
|
id: t,
|
|
112
112
|
name: A.name,
|
|
113
|
-
size:
|
|
113
|
+
size: J.value,
|
|
114
114
|
value: e
|
|
115
115
|
};
|
|
116
|
-
})),
|
|
116
|
+
})), X = u(() => {
|
|
117
117
|
let e = {};
|
|
118
|
-
return
|
|
118
|
+
return J.value && (e["--size"] = J.value), {
|
|
119
119
|
class: {
|
|
120
120
|
"bb-base-rating": !0,
|
|
121
121
|
"bb-base-rating--has-value": A.modelValue,
|
|
@@ -123,28 +123,28 @@ var w = [
|
|
|
123
123
|
"bb-base-rating--errors": A.hasErrors,
|
|
124
124
|
"bb-base-rating--warnings": !!A.hasWarning && !A.hasErrors,
|
|
125
125
|
"bb-base-rating--readonly": A.readonly,
|
|
126
|
-
"bb-base-rating--forced-clear":
|
|
126
|
+
"bb-base-rating--forced-clear": z.value
|
|
127
127
|
},
|
|
128
128
|
style: e
|
|
129
129
|
};
|
|
130
130
|
});
|
|
131
|
-
return (e, t) => (_(), f("span", h(
|
|
131
|
+
return (e, t) => (_(), f("span", h(X.value, {
|
|
132
132
|
ref_key: "container",
|
|
133
|
-
ref:
|
|
134
|
-
onPointermove:
|
|
133
|
+
ref: F,
|
|
134
|
+
onPointermove: K
|
|
135
135
|
}), [p("span", {
|
|
136
136
|
"aria-labelledby": e.ariaLabelledby,
|
|
137
|
-
"aria-readonly":
|
|
137
|
+
"aria-readonly": B.value && e.readonly ? !0 : void 0,
|
|
138
138
|
class: "bb-base-rating__inner-container",
|
|
139
|
-
role:
|
|
139
|
+
role: B.value
|
|
140
140
|
}, [
|
|
141
141
|
b(e.$slots, "prepend"),
|
|
142
|
-
|
|
142
|
+
V.value ? (_(), f("span", {
|
|
143
143
|
key: 0,
|
|
144
|
-
id: S(
|
|
144
|
+
id: S(R),
|
|
145
145
|
class: "sr-only"
|
|
146
|
-
}, x(S(
|
|
147
|
-
(_(!0), f(l, null, y(
|
|
146
|
+
}, x(S(H)), 9, T)) : d("", !0),
|
|
147
|
+
(_(!0), f(l, null, y(Y.value, (n, r) => (_(), f("label", {
|
|
148
148
|
key: n.value,
|
|
149
149
|
class: g(["bb-base-rating__option", {
|
|
150
150
|
"bb-base-rating__option--filled": n.filled,
|
|
@@ -153,10 +153,10 @@ var w = [
|
|
|
153
153
|
"bb-base-rating__option--readonly": e.readonly
|
|
154
154
|
}])
|
|
155
155
|
}, [
|
|
156
|
-
p("span", E, x(n.value == 1 ? S(
|
|
156
|
+
p("span", E, x(n.value == 1 ? S(N)("rating.singleStar", n.value, A.stars).value : S(N)("rating.multipleStars", n.value, A.stars).value), 1),
|
|
157
157
|
p("input", h({
|
|
158
158
|
id: n.id,
|
|
159
|
-
"aria-describedby":
|
|
159
|
+
"aria-describedby": U.value,
|
|
160
160
|
autofocus: e.autofocus && !r,
|
|
161
161
|
checked: n.checked,
|
|
162
162
|
class: "sr-only",
|
|
@@ -166,7 +166,7 @@ var w = [
|
|
|
166
166
|
type: "radio",
|
|
167
167
|
value: n.value,
|
|
168
168
|
ref_for: !0
|
|
169
|
-
},
|
|
169
|
+
}, q), null, 16, D),
|
|
170
170
|
b(e.$slots, "icon", {
|
|
171
171
|
id: n.id,
|
|
172
172
|
checked: n.checked,
|
|
@@ -9,17 +9,17 @@ import { throttle as a } from "../../utilities/functions/throttle.js";
|
|
|
9
9
|
import { when as o } from "../../utilities/functions/when.js";
|
|
10
10
|
import s from "../BbSelectPopover/BbSelectPopover.vue.js";
|
|
11
11
|
import { reject as c } from "../../utilities/functions/reject.js";
|
|
12
|
-
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createTextVNode as
|
|
12
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createTextVNode as g, createVNode as _, defineComponent as v, guardReactiveProps as y, mergeProps as b, nextTick as x, normalizeClass as S, normalizeProps as C, onMounted as w, onUnmounted as T, openBlock as E, ref as D, renderList as O, renderSlot as k, toDisplayString as A, unref as j, watch as M, withCtx as N, withModifiers as ne } from "vue";
|
|
13
13
|
//#region src/components/BbBaseSelect/BbBaseSelect.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
14
|
+
var re = ["id"], ie = [
|
|
15
15
|
"id",
|
|
16
16
|
"aria-labelledby",
|
|
17
17
|
"autofocus",
|
|
18
18
|
"disabled"
|
|
19
|
-
],
|
|
19
|
+
], ae = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "bb-base-select__max-reached"
|
|
22
|
-
},
|
|
22
|
+
}, oe = ["id"], P = /*@__PURE__*/ v({
|
|
23
23
|
__name: "BbBaseSelect",
|
|
24
24
|
props: {
|
|
25
25
|
adaptive: {
|
|
@@ -86,48 +86,48 @@ var ae = ["id"], oe = [
|
|
|
86
86
|
"update:modelValue",
|
|
87
87
|
"option:add"
|
|
88
88
|
],
|
|
89
|
-
setup(i, { emit:
|
|
90
|
-
let P = i, F =
|
|
91
|
-
if (
|
|
89
|
+
setup(i, { emit: v }) {
|
|
90
|
+
let P = i, F = v, I = D(), L = D(), R = D(), { t: se } = t(), z = P.id || e().id.value, B = u(() => !r(P.modelValue)), ce = u(() => B.value ? !0 : P.prefill), V = u(() => P.multiple ? Array.isArray(P.modelValue) ? P.modelValue.length : P.modelValue == null ? 0 : 1 : 0), H = u(() => P.maxSelectedLabels !== Infinity), U = u(() => !H.value), W = D(!1), G = D(0), K = D(!1), q = u(() => V.value <= 1 ? !1 : H.value ? V.value > P.maxSelectedLabels : W.value), J = u(() => !P.disabled && !P.readonly), Y = (e) => {
|
|
91
|
+
if (J.value) if (P.multiple) {
|
|
92
92
|
let t = c(P.modelValue, e.value);
|
|
93
93
|
F("update:modelValue", t);
|
|
94
94
|
} else F("update:modelValue", null);
|
|
95
95
|
}, le = () => {
|
|
96
96
|
(I.value?.$el)?.querySelector(".bb-base-select__activator")?.focus();
|
|
97
|
-
}, X = u(() => P.selectedLabelsFn ? P.selectedLabelsFn(
|
|
98
|
-
|
|
97
|
+
}, X = u(() => P.selectedLabelsFn ? P.selectedLabelsFn(V.value) : se("select.multipleMaxReached", V.value).value), ue = (e) => P.multiple ? q.value ? X.value : e : e || P.placeholder || "", de = () => {
|
|
98
|
+
K.value = !1, G.value = 0;
|
|
99
99
|
}, fe = () => {
|
|
100
|
-
if (
|
|
100
|
+
if (K.value || !R.value) return;
|
|
101
101
|
let e = getComputedStyle(R.value), t = Number.parseFloat(e.marginLeft || "0");
|
|
102
|
-
|
|
102
|
+
G.value = Math.max(0, -t), K.value = !0;
|
|
103
103
|
}, Z = a(() => {
|
|
104
|
-
if (!
|
|
105
|
-
|
|
104
|
+
if (!U.value || !R.value || !L.value || V.value <= 1) {
|
|
105
|
+
W.value = !1;
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
fe();
|
|
109
|
-
let e = L.value.clientWidth +
|
|
110
|
-
|
|
109
|
+
let e = L.value.clientWidth + G.value;
|
|
110
|
+
W.value = R.value.scrollWidth > e + 1;
|
|
111
111
|
}, 100, {
|
|
112
112
|
leading: !0,
|
|
113
113
|
trailing: !0
|
|
114
114
|
}), Q = null, $ = () => {
|
|
115
|
-
Q?.disconnect(), Q = null,
|
|
115
|
+
Q?.disconnect(), Q = null, U.value && (Q = new ResizeObserver(Z), L.value && Q.observe(L.value), x(() => {
|
|
116
116
|
Z();
|
|
117
117
|
}));
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
w($), M(U, $, { flush: "post" }), T(() => {
|
|
120
120
|
Q?.disconnect(), Z.cancel();
|
|
121
|
-
}),
|
|
122
|
-
|
|
121
|
+
}), M(() => [P.modelValue, P.maxSelectedLabels], () => {
|
|
122
|
+
U.value && x(() => {
|
|
123
123
|
Z();
|
|
124
124
|
});
|
|
125
|
-
}),
|
|
125
|
+
}), M(() => [
|
|
126
126
|
P.compact,
|
|
127
127
|
P.comma,
|
|
128
128
|
P["prepend:icon"]
|
|
129
129
|
], () => {
|
|
130
|
-
|
|
130
|
+
U.value && (de(), x(() => {
|
|
131
131
|
Z();
|
|
132
132
|
}));
|
|
133
133
|
});
|
|
@@ -138,8 +138,8 @@ var ae = ["id"], oe = [
|
|
|
138
138
|
type: "hidden",
|
|
139
139
|
value: pe(e)
|
|
140
140
|
})));
|
|
141
|
-
return (e, t) => (
|
|
142
|
-
id:
|
|
141
|
+
return (e, t) => (E(), d(s, {
|
|
142
|
+
id: j(z),
|
|
143
143
|
adaptive: e.adaptive,
|
|
144
144
|
anchor: I.value,
|
|
145
145
|
"aria-describedby": e.ariaDescribedby,
|
|
@@ -167,7 +167,7 @@ var ae = ["id"], oe = [
|
|
|
167
167
|
multiple: e.multiple,
|
|
168
168
|
"no-data-text": e.noDataText,
|
|
169
169
|
"off-canvas-props": e.offCanvasProps,
|
|
170
|
-
prefill:
|
|
170
|
+
prefill: ce.value,
|
|
171
171
|
"query-debounce-time": e.queryDebounceTime,
|
|
172
172
|
readonly: e.readonly,
|
|
173
173
|
selectable: e.selectable,
|
|
@@ -184,12 +184,12 @@ var ae = ["id"], oe = [
|
|
|
184
184
|
"onOption:add": t[7] ||= (t) => e.$emit("option:add", t),
|
|
185
185
|
"onUpdate:modelValue": t[8] ||= (t) => e.$emit("update:modelValue", t)
|
|
186
186
|
}, h({
|
|
187
|
-
activator:
|
|
187
|
+
activator: N(({ props: t, shown: r, loading: i, text: a, selectedOptions: o, clear: s, query: c, focus: u, close: d, toggle: v }) => [_(te, {
|
|
188
188
|
ref_key: "wrapperRef",
|
|
189
189
|
ref: I,
|
|
190
190
|
active: r,
|
|
191
191
|
"append:icon": P["append:icon"],
|
|
192
|
-
class:
|
|
192
|
+
class: S(["bb-base-select", {
|
|
193
193
|
"bb-base-select--shown": r,
|
|
194
194
|
"bb-base-select--disabled": e.disabled,
|
|
195
195
|
"bb-base-select--readonly": e.readonly
|
|
@@ -198,79 +198,88 @@ var ae = ["id"], oe = [
|
|
|
198
198
|
compact: e.compact,
|
|
199
199
|
disabled: e.disabled,
|
|
200
200
|
"has-errors": e.hasErrors,
|
|
201
|
-
"has-value":
|
|
201
|
+
"has-value": B.value,
|
|
202
202
|
"has-warning": e.hasWarning,
|
|
203
203
|
loading: i,
|
|
204
204
|
"prepend:icon": P["prepend:icon"],
|
|
205
205
|
readonly: e.readonly,
|
|
206
206
|
"onClick:clear": () => {
|
|
207
|
-
s(),
|
|
207
|
+
s(), x(le);
|
|
208
208
|
},
|
|
209
|
-
"onContainer:click":
|
|
209
|
+
"onContainer:click": v
|
|
210
210
|
}, h({
|
|
211
|
-
"append-outer":
|
|
211
|
+
"append-outer": N(() => [k(e.$slots, "append-outer", C(y({
|
|
212
212
|
query: c,
|
|
213
|
-
close:
|
|
213
|
+
close: d
|
|
214
214
|
})))]),
|
|
215
|
-
append:
|
|
215
|
+
append: N(() => [k(e.$slots, "append", C(y({
|
|
216
216
|
query: c,
|
|
217
217
|
focus: u,
|
|
218
|
-
close:
|
|
218
|
+
close: d
|
|
219
219
|
})))]),
|
|
220
|
-
prepend:
|
|
220
|
+
prepend: N(() => [k(e.$slots, "prepend", C(y({
|
|
221
221
|
query: c,
|
|
222
222
|
focus: u,
|
|
223
|
-
close:
|
|
223
|
+
close: d
|
|
224
224
|
})))]),
|
|
225
|
-
"prepend-outer":
|
|
225
|
+
"prepend-outer": N(() => [k(e.$slots, "prepend-outer", C(y({
|
|
226
226
|
query: c,
|
|
227
|
-
close:
|
|
227
|
+
close: d
|
|
228
228
|
})))]),
|
|
229
|
-
default:
|
|
230
|
-
id: `${
|
|
229
|
+
default: N(() => [m("span", {
|
|
230
|
+
id: `${j(z)}__value`,
|
|
231
231
|
ref_key: "valueRef",
|
|
232
232
|
ref: L,
|
|
233
233
|
class: "bb-base-select__value"
|
|
234
|
-
}, [m("input",
|
|
235
|
-
id:
|
|
236
|
-
"aria-labelledby": `${
|
|
234
|
+
}, [m("input", b(t, {
|
|
235
|
+
id: j(z),
|
|
236
|
+
"aria-labelledby": `${j(z)}__label ${j(z)}__selection`,
|
|
237
237
|
autofocus: e.autofocus,
|
|
238
238
|
class: "bb-base-select__activator",
|
|
239
239
|
disabled: e.disabled,
|
|
240
240
|
type: "button"
|
|
241
|
-
}), null, 16,
|
|
241
|
+
}), null, 16, ie), e.multiple ? (E(), p(l, { key: 0 }, [U.value || !q.value ? (E(), p("span", {
|
|
242
242
|
key: 0,
|
|
243
243
|
ref_key: "chipsContainerRef",
|
|
244
244
|
ref: R,
|
|
245
|
-
class:
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
class: S(["bb-base-select__chips-row", {
|
|
246
|
+
"bb-base-select__chips-row--hidden": q.value,
|
|
247
|
+
"bb-base-select__chips-row--chips": !e.comma && !!o.length
|
|
248
|
+
}])
|
|
249
|
+
}, [e.comma ? (E(!0), p(l, { key: 0 }, O(o, (e) => (E(), p("span", {
|
|
250
|
+
key: j(n)(e.value),
|
|
248
251
|
class: "bb-base-select__comma-item"
|
|
249
|
-
},
|
|
250
|
-
key:
|
|
252
|
+
}, A(e.text), 1))), 128)) : (E(!0), p(l, { key: 1 }, O(o, (t) => k(e.$slots, "chip", {
|
|
253
|
+
key: j(n)(t.value),
|
|
254
|
+
deselect: () => Y(t),
|
|
255
|
+
disabled: !J.value,
|
|
256
|
+
item: t.item,
|
|
257
|
+
text: t.text,
|
|
258
|
+
value: t.value
|
|
259
|
+
}, () => [_(ee, {
|
|
251
260
|
class: "bb-base-select__chip",
|
|
252
|
-
clearable:
|
|
261
|
+
clearable: J.value,
|
|
253
262
|
size: "lg",
|
|
254
263
|
variant: "secondary",
|
|
255
|
-
"onClick:clear":
|
|
264
|
+
"onClick:clear": ne((e) => Y(t), ["stop"])
|
|
256
265
|
}, {
|
|
257
|
-
default:
|
|
266
|
+
default: N(() => [g(A(t.text), 1)]),
|
|
258
267
|
_: 2
|
|
259
|
-
}, 1032, ["clearable", "onClick:clear"]))), 128))], 2)) : f("", !0),
|
|
268
|
+
}, 1032, ["clearable", "onClick:clear"])])), 128))], 2)) : f("", !0), q.value ? (E(), p("span", ae, A(X.value), 1)) : f("", !0)], 64)) : (E(), p("span", {
|
|
260
269
|
key: 1,
|
|
261
|
-
class:
|
|
262
|
-
},
|
|
263
|
-
id: `${
|
|
270
|
+
class: S(["bb-base-select__display-value", [{ "bb-base-select__placeholder": !a }]])
|
|
271
|
+
}, A(a || e.placeholder), 3))], 8, re), m("span", {
|
|
272
|
+
id: `${j(z)}__selection`,
|
|
264
273
|
class: "sr-only"
|
|
265
|
-
},
|
|
274
|
+
}, A(ue(a)), 9, oe)]),
|
|
266
275
|
_: 2
|
|
267
276
|
}, [e.$slots.prefix ? {
|
|
268
277
|
name: "prefix",
|
|
269
|
-
fn:
|
|
278
|
+
fn: N(() => [k(e.$slots, "prefix")]),
|
|
270
279
|
key: "0"
|
|
271
280
|
} : void 0, e.$slots.suffix ? {
|
|
272
281
|
name: "suffix",
|
|
273
|
-
fn:
|
|
282
|
+
fn: N(() => [k(e.$slots, "suffix")]),
|
|
274
283
|
key: "1"
|
|
275
284
|
} : void 0]), 1032, [
|
|
276
285
|
"active",
|
|
@@ -287,22 +296,22 @@ var ae = ["id"], oe = [
|
|
|
287
296
|
"readonly",
|
|
288
297
|
"onClick:clear",
|
|
289
298
|
"onContainer:click"
|
|
290
|
-
]), (
|
|
299
|
+
]), (E(!0), p(l, null, O(me.value, (e) => (E(), p("input", b({
|
|
291
300
|
key: e.value,
|
|
292
301
|
ref_for: !0
|
|
293
302
|
}, e), null, 16))), 128))]),
|
|
294
|
-
loading:
|
|
295
|
-
"no-data":
|
|
296
|
-
option:
|
|
297
|
-
group:
|
|
303
|
+
loading: N((t) => [k(e.$slots, "loading", C(y(t)))]),
|
|
304
|
+
"no-data": N((t) => [k(e.$slots, "no-data", C(y(t)))]),
|
|
305
|
+
option: N((t) => [k(e.$slots, "option", b({ hasErrors: e.hasErrors }, t))]),
|
|
306
|
+
group: N((t) => [k(e.$slots, "group", C(y(t)))]),
|
|
298
307
|
_: 2
|
|
299
308
|
}, [e.$slots.header ? {
|
|
300
309
|
name: "header",
|
|
301
|
-
fn:
|
|
310
|
+
fn: N((t) => [k(e.$slots, "header", C(y(t)))]),
|
|
302
311
|
key: "0"
|
|
303
312
|
} : void 0, e.$slots.footer ? {
|
|
304
313
|
name: "footer",
|
|
305
|
-
fn:
|
|
314
|
+
fn: N((t) => [k(e.$slots, "footer", C(y(t)))]),
|
|
306
315
|
key: "1"
|
|
307
316
|
} : void 0]), 1032, /* @__PURE__ */ "id.adaptive.anchor.aria-describedby.autocomplete.compact.dependencies.deps-debounce-time.disable-writing.disabled.enforce-coherence.filter-by.group-by.has-errors.has-warning.header-height.item-height.item-text.item-value.items.loading.loading-text.max.model-value.model-value-debounce-time.multiple.no-data-text.off-canvas-props.prefill.query-debounce-time.readonly.selectable.stash.transition-duration".split(".")));
|
|
308
317
|
}
|
|
@@ -274,6 +274,26 @@ export type BaseSelectPanelSlotProps = {
|
|
|
274
274
|
/** The resolved options that are currently selected. */
|
|
275
275
|
selectedOptions: BbSelectResolvedOption[];
|
|
276
276
|
};
|
|
277
|
+
/**
|
|
278
|
+
* Props exposed by the `chip` slot — called once per selected value in
|
|
279
|
+
* `multiple` mode, in place of the default badge. Not called in `comma` mode
|
|
280
|
+
* (there are no chips there) nor for the collapsed "+N" summary.
|
|
281
|
+
*/
|
|
282
|
+
export type BaseSelectChipSlotProps<Item = any> = {
|
|
283
|
+
/** The selected item, exactly as it was supplied in `items`. */
|
|
284
|
+
item: Item;
|
|
285
|
+
/** The item's resolved display text (what the default badge prints). */
|
|
286
|
+
text: string;
|
|
287
|
+
/** The item's resolved value — what sits in the v-model. */
|
|
288
|
+
value: any;
|
|
289
|
+
/**
|
|
290
|
+
* `true` while the control is disabled or readonly: the chip must not offer
|
|
291
|
+
* a way to remove itself, and `deselect` is a no-op.
|
|
292
|
+
*/
|
|
293
|
+
disabled: boolean;
|
|
294
|
+
/** Drops this value from the selection. No-op while `disabled`. */
|
|
295
|
+
deselect: () => void;
|
|
296
|
+
};
|
|
277
297
|
export type BaseSelectSlots<Item = any> = {
|
|
278
298
|
/** Content pinned to the top of the panel, above the search field. */
|
|
279
299
|
header?: (props: BaseSelectPanelSlotProps) => any;
|
|
@@ -294,4 +314,6 @@ export type BaseSelectSlots<Item = any> = {
|
|
|
294
314
|
}) => any;
|
|
295
315
|
option?: (props: BaseSelectOptionSlotProps<Item>) => any;
|
|
296
316
|
group?: (props: BaseSelectGroupSlotProps<Item>) => any;
|
|
317
|
+
/** Replaces the default badge rendered for each selection in `multiple` mode. */
|
|
318
|
+
chip?: (props: BaseSelectChipSlotProps<Item>) => any;
|
|
297
319
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLogger as e } from "../../composables/useLogger.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useLocale as t } from "../../composables/useLocale.js";
|
|
3
|
+
import { isNil as n } from "../../utilities/functions/isNil.js";
|
|
4
4
|
import { last as r } from "../../utilities/functions/last.js";
|
|
5
5
|
import { clamp as i } from "../../utilities/functions/clamp.js";
|
|
6
6
|
import { getAsPercentage as a, getAsPercentageBetween as o, getValueFromPercentageInInterval as s } from "../../utilities/functions/percentage.js";
|
|
@@ -69,9 +69,9 @@ var le = {
|
|
|
69
69
|
"update:modelValue"
|
|
70
70
|
],
|
|
71
71
|
setup(m, { emit: he }) {
|
|
72
|
-
let S = m, C = he, w = e(), { t: T } =
|
|
72
|
+
let S = m, C = he, w = e(), { t: T } = t(), E = u(() => S.id ? `${S.id}__label` : void 0), ge = u(() => S.id && S.range ? `${E.value} ${S.id}__thumb_label_lower` : E.value), _e = u(() => S.id && S.range ? `${E.value} ${S.id}__thumb_label_higher` : E.value);
|
|
73
73
|
(S.min < -(2 ** 53 - 1) || S.max > 2 ** 53 - 1) && w.throw("BaseSlider min or max is too large"), (!Number.isFinite(S.min) || !Number.isFinite(S.max)) && w.throw("BaseSlider min and max must be finite numbers", TypeError), S.max <= S.min && w.throw("BaseSlider max must be greater than min", RangeError), (!Number.isFinite(S.step) || S.step <= 0) && w.throw("BaseSlider step must be a finite number greater than 0", RangeError), (!Number.isFinite(S.maxPrecision) || S.maxPrecision < 0) && w.throw("BaseSlider maxPrecision must be a non-negative number", RangeError);
|
|
74
|
-
let D = v(), O = v(), k = v(), A = v(), j = v(), M = v(0), N = v(0), P = u(() => Array.isArray(S.modelValue) ? ee(S.modelValue) ?? void 0 :
|
|
74
|
+
let D = v(), O = v(), k = v(), A = v(), j = v(), M = v(0), N = v(0), P = u(() => Array.isArray(S.modelValue) ? ee(S.modelValue) ?? void 0 : n(S.modelValue) ? void 0 : Number(S.modelValue)), F = u(() => Array.isArray(S.modelValue) ? r(S.modelValue) ?? void 0 : n(S.modelValue) ? void 0 : Number(S.modelValue)), I = u(() => [M.value, N.value].sort((e, t) => e - t)), L = v(!1);
|
|
75
75
|
S.range && !Array.isArray(S.modelValue) && w.throw("BaseSlider mode is set as range but modelValue is not an array", TypeError), oe(() => {
|
|
76
76
|
S.autofocus && B();
|
|
77
77
|
});
|
|
@@ -197,7 +197,7 @@ var le = {
|
|
|
197
197
|
left: `${I.value[0]}%`
|
|
198
198
|
}
|
|
199
199
|
})), ke = (e) => {
|
|
200
|
-
if (
|
|
200
|
+
if (n(S.modelValue)) return !1;
|
|
201
201
|
if (Array.isArray(S.modelValue)) {
|
|
202
202
|
if (S.modelValue.length === 0) return !1;
|
|
203
203
|
let t = [...S.modelValue].sort((e, t) => e - t);
|