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
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import r from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import o from "
|
|
8
|
-
import s from "../
|
|
9
|
-
import
|
|
10
|
-
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as
|
|
11
|
-
import { createReusableTemplate as
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import { useLogger as t } from "../../composables/useLogger.js";
|
|
3
|
+
import { extractDomContainer as n } from "../../utilities/functions/extractDomContainer.js";
|
|
4
|
+
import { transitions as r } from "../../utilities/misc/transitions.js";
|
|
5
|
+
import i from "../CommonPopover/CommonPopover.vue.js";
|
|
6
|
+
import { useMobile as a } from "../../composables/useMobile.js";
|
|
7
|
+
import { useLocale as o } from "../../composables/useLocale.js";
|
|
8
|
+
import s from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
9
|
+
import c from "../BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js";
|
|
10
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, mergeProps as _, nextTick as ee, normalizeClass as v, normalizeProps as te, onBeforeUnmount as ne, openBlock as y, ref as b, renderList as re, renderSlot as ie, toDisplayString as x, unref as S, watch as C, withCtx as w } from "vue";
|
|
11
|
+
import { createReusableTemplate as ae } from "@vueuse/core";
|
|
12
12
|
//#region src/components/BbTimePicker/BbTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
13
|
+
var oe = {
|
|
14
14
|
key: 0,
|
|
15
15
|
"aria-label": "Range end",
|
|
16
16
|
class: "bb-time-picker__segments",
|
|
17
17
|
role: "group"
|
|
18
|
-
},
|
|
18
|
+
}, se = [
|
|
19
19
|
"aria-pressed",
|
|
20
20
|
"disabled",
|
|
21
21
|
"onClick"
|
|
22
|
-
],
|
|
22
|
+
], T = /*@__PURE__*/ g({
|
|
23
23
|
__name: "BbTimePicker",
|
|
24
24
|
props: {
|
|
25
25
|
activator: {},
|
|
@@ -39,7 +39,7 @@ var ae = {
|
|
|
39
39
|
default: void 0
|
|
40
40
|
},
|
|
41
41
|
offCanvasProps: {},
|
|
42
|
-
transitionDuration: { default:
|
|
42
|
+
transitionDuration: { default: r.medium },
|
|
43
43
|
placement: {},
|
|
44
44
|
offset: { default: 4 },
|
|
45
45
|
padding: {},
|
|
@@ -54,48 +54,48 @@ var ae = {
|
|
|
54
54
|
"error",
|
|
55
55
|
"time-pick"
|
|
56
56
|
],
|
|
57
|
-
setup(
|
|
58
|
-
let E =
|
|
59
|
-
let t =
|
|
57
|
+
setup(r, { emit: g }) {
|
|
58
|
+
let T = r, E = g, ce = e(), { t: D } = o(), { isMobile: O } = a(), le = t(), [ue, k] = ae(), A = b(null), j = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, M = (e) => {
|
|
59
|
+
let t = j.exec(e);
|
|
60
60
|
if (!t) return null;
|
|
61
61
|
let n = parseInt(t[1], 10), r = parseInt(t[2], 10);
|
|
62
62
|
return n > 23 || r > 59 ? null : n * 60 + r;
|
|
63
63
|
};
|
|
64
|
-
for (let [e, t] of [["min",
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
},
|
|
64
|
+
for (let [e, t] of [["min", T.min], ["max", T.max]]) t && M(t) === null && le.throw(`BbTimePicker: ${e} must be in the format HH:mm`);
|
|
65
|
+
let N = u(() => T.activeSegment ?? P.value), P = b("start"), de = (e) => {
|
|
66
|
+
P.value = e, E("update:activeSegment", e);
|
|
67
|
+
}, F = u(() => [{
|
|
68
68
|
value: "start",
|
|
69
|
-
label:
|
|
69
|
+
label: D("baseTimePickerInput.start").value
|
|
70
70
|
}, {
|
|
71
71
|
value: "end",
|
|
72
|
-
label:
|
|
73
|
-
}]), I = b(), L = b(), R = u(() =>
|
|
74
|
-
I.value =
|
|
72
|
+
label: D("baseTimePickerInput.end").value
|
|
73
|
+
}]), I = b(), L = b(), R = u(() => T.activator != null), z = (e) => {
|
|
74
|
+
I.value = n(e) ?? void 0;
|
|
75
75
|
}, B = (e) => {
|
|
76
|
-
L.value =
|
|
76
|
+
L.value = n(e) ?? void 0;
|
|
77
77
|
};
|
|
78
|
-
|
|
79
|
-
I.value =
|
|
80
|
-
}, { immediate: !0 }),
|
|
81
|
-
L.value = e == null ? void 0 :
|
|
78
|
+
C(() => T.activator, (e) => {
|
|
79
|
+
I.value = n(e) ?? void 0;
|
|
80
|
+
}, { immediate: !0 }), C(() => T.anchor, (e) => {
|
|
81
|
+
L.value = e == null ? void 0 : n(e) ?? void 0;
|
|
82
82
|
}, { immediate: !0 });
|
|
83
83
|
let V = u(() => L.value ?? I.value), H = b(!1), U = null, W = (e) => {
|
|
84
|
-
|
|
84
|
+
T.disabled || T.readonly || (e.stopPropagation(), H.value || (Y.value = J()), H.value = !H.value);
|
|
85
85
|
}, G = (e) => {
|
|
86
86
|
e.target instanceof HTMLDialogElement && (H.value = !1);
|
|
87
87
|
};
|
|
88
|
-
|
|
89
|
-
e ? (U = document.activeElement instanceof HTMLElement ? document.activeElement : null, X.value || document.addEventListener("click", G, { passive: !0 }), await
|
|
88
|
+
C(H, async (e) => {
|
|
89
|
+
e ? (U = document.activeElement instanceof HTMLElement ? document.activeElement : null, X.value || document.addEventListener("click", G, { passive: !0 }), await ee(), A.value?.querySelector("[tabindex=\"0\"]")?.focus()) : (document.removeEventListener("click", G), U?.focus(), U = null);
|
|
90
90
|
});
|
|
91
91
|
let K = null;
|
|
92
|
-
|
|
92
|
+
C(I, (e) => {
|
|
93
93
|
K?.(), K = null, e && (e.addEventListener("click", W), K = () => {
|
|
94
94
|
e.removeEventListener("click", W), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-label");
|
|
95
95
|
});
|
|
96
96
|
}, { immediate: !0 });
|
|
97
|
-
let q = u(() =>
|
|
98
|
-
|
|
97
|
+
let q = u(() => T.label ?? D("baseTimePickerInput.openPicker").value);
|
|
98
|
+
C([
|
|
99
99
|
I,
|
|
100
100
|
H,
|
|
101
101
|
q
|
|
@@ -104,39 +104,39 @@ var ae = {
|
|
|
104
104
|
}, { immediate: !0 }), ne(() => {
|
|
105
105
|
K?.(), document.removeEventListener("click", G);
|
|
106
106
|
});
|
|
107
|
-
let J = () => (
|
|
108
|
-
|
|
109
|
-
() =>
|
|
110
|
-
|
|
107
|
+
let J = () => (T.adaptive ?? ce.adaptive) && O.value ? "canvas" : "popover", Y = b(J()), X = u(() => Y.value === "canvas");
|
|
108
|
+
C([
|
|
109
|
+
() => T.adaptive,
|
|
110
|
+
O,
|
|
111
111
|
H
|
|
112
112
|
], () => {
|
|
113
113
|
H.value || (Y.value = J());
|
|
114
114
|
});
|
|
115
|
-
let
|
|
115
|
+
let Z = u(() => ({
|
|
116
116
|
side: "bottom",
|
|
117
117
|
size: "auto",
|
|
118
118
|
draggable: !0,
|
|
119
|
-
disabled:
|
|
120
|
-
transitionDuration:
|
|
121
|
-
...
|
|
119
|
+
disabled: T.disabled,
|
|
120
|
+
transitionDuration: T.transitionDuration,
|
|
121
|
+
...T.offCanvasProps
|
|
122
122
|
})), fe = () => {
|
|
123
123
|
I.value?.focus();
|
|
124
|
-
}, pe = (e) => +(e === "end"),
|
|
125
|
-
let t =
|
|
124
|
+
}, pe = (e) => +(e === "end"), Q = (e) => {
|
|
125
|
+
let t = T.modelValue;
|
|
126
126
|
return t == null ? null : Array.isArray(t) ? t[pe(e)] ?? null : e === "start" && typeof t == "string" ? t : null;
|
|
127
127
|
}, me = (e) => {
|
|
128
|
-
let t =
|
|
128
|
+
let t = Q(e), n = t ? j.exec(t) : null;
|
|
129
129
|
return n ? {
|
|
130
130
|
hour: n[1].padStart(2, "0"),
|
|
131
131
|
minute: n[2].padStart(2, "0"),
|
|
132
132
|
second: (n[3] ?? "").padStart(n[3] ? 2 : 0, "0")
|
|
133
133
|
} : null;
|
|
134
|
-
},
|
|
135
|
-
let t =
|
|
136
|
-
return t === null ? e :
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
let t =
|
|
134
|
+
}, $ = u(() => me(N.value)), he = u(() => $.value?.hour ?? ""), ge = u(() => $.value?.minute ?? ""), _e = u(() => $.value?.second ?? ""), ve = (e) => T.seconds ? `${e.hour}:${e.minute}:${e.second || "00"}` : `${e.hour}:${e.minute}`, ye = (e) => {
|
|
135
|
+
let t = M(e);
|
|
136
|
+
return t === null ? e : T.min && t < M(T.min) ? T.min + (T.seconds ? ":00" : "") : T.max && t > M(T.max) ? T.max + (T.seconds ? ":00" : "") : e;
|
|
137
|
+
}, be = (e) => {
|
|
138
|
+
E("time-pick", e);
|
|
139
|
+
let t = N.value, n = $.value ? { ...$.value } : {
|
|
140
140
|
hour: "",
|
|
141
141
|
minute: "",
|
|
142
142
|
second: ""
|
|
@@ -145,48 +145,48 @@ var ae = {
|
|
|
145
145
|
let t = n.hour ? parseInt(n.hour, 10) : 0, r = e.value === "PM";
|
|
146
146
|
r && t < 12 && (t += 12), !r && t >= 12 && (t -= 12), n.hour = String(t).padStart(2, "0");
|
|
147
147
|
} else n[e.unit] = e.value;
|
|
148
|
-
n.hour ||= "00", n.minute ||= "00",
|
|
149
|
-
let r =
|
|
150
|
-
if (i !== r &&
|
|
148
|
+
n.hour ||= "00", n.minute ||= "00", T.seconds && !n.second && (n.second = "00");
|
|
149
|
+
let r = ve(n), i = ye(r);
|
|
150
|
+
if (i !== r && E("error", {
|
|
151
151
|
code: "disabled_time",
|
|
152
152
|
original: r,
|
|
153
153
|
normalized: i
|
|
154
|
-
}), !
|
|
155
|
-
|
|
154
|
+
}), !T.range) {
|
|
155
|
+
E("update:modelValue", i);
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
let a =
|
|
159
|
-
o && c.push(o), s && c.push(s),
|
|
158
|
+
let a = Q(t === "start" ? "end" : "start"), o = t === "start" ? i : a, s = t === "start" ? a : i, c = [];
|
|
159
|
+
o && c.push(o), s && c.push(s), E("update:modelValue", c.length ? c : null);
|
|
160
160
|
};
|
|
161
161
|
return (e, t) => (y(), p(l, null, [
|
|
162
|
-
R.value ? f("", !0) :
|
|
162
|
+
R.value ? f("", !0) : ie(e.$slots, "activator", te(_({ key: 0 }, {
|
|
163
163
|
props: { ref: z },
|
|
164
164
|
anchorProps: { ref: B },
|
|
165
165
|
open: H.value,
|
|
166
166
|
value: e.modelValue,
|
|
167
167
|
disabled: !!e.disabled
|
|
168
168
|
}))),
|
|
169
|
-
|
|
170
|
-
default:
|
|
169
|
+
h(S(ue), null, {
|
|
170
|
+
default: w(() => [m("div", {
|
|
171
171
|
ref_key: "panelRef",
|
|
172
|
-
ref:
|
|
172
|
+
ref: A,
|
|
173
173
|
class: v(["bb-time-picker__panel", { "bb-time-picker__panel--sheet": X.value }])
|
|
174
|
-
}, [e.range ? (y(), p("div",
|
|
174
|
+
}, [e.range ? (y(), p("div", oe, [(y(!0), p(l, null, re(F.value, (t) => (y(), p("button", {
|
|
175
175
|
key: t.value,
|
|
176
|
-
"aria-pressed":
|
|
177
|
-
class: v(["bb-time-picker__segment", { "bb-time-picker__segment--active":
|
|
176
|
+
"aria-pressed": N.value === t.value,
|
|
177
|
+
class: v(["bb-time-picker__segment", { "bb-time-picker__segment--active": N.value === t.value }]),
|
|
178
178
|
disabled: e.disabled || e.readonly,
|
|
179
179
|
type: "button",
|
|
180
|
-
onClick: (e) =>
|
|
181
|
-
},
|
|
180
|
+
onClick: (e) => de(t.value)
|
|
181
|
+
}, x(t.label), 11, se))), 128))])) : f("", !0), h(c, {
|
|
182
182
|
ampm: e.ampm,
|
|
183
183
|
disabled: e.disabled || e.readonly,
|
|
184
|
-
hour:
|
|
185
|
-
minute:
|
|
186
|
-
second:
|
|
184
|
+
hour: he.value,
|
|
185
|
+
minute: ge.value,
|
|
186
|
+
second: _e.value,
|
|
187
187
|
seconds: e.seconds,
|
|
188
188
|
step: e.step,
|
|
189
|
-
onSelect:
|
|
189
|
+
onSelect: be
|
|
190
190
|
}, null, 8, [
|
|
191
191
|
"ampm",
|
|
192
192
|
"disabled",
|
|
@@ -198,15 +198,15 @@ var ae = {
|
|
|
198
198
|
])], 2)]),
|
|
199
199
|
_: 1
|
|
200
200
|
}),
|
|
201
|
-
X.value ? (y(), d(
|
|
201
|
+
X.value ? (y(), d(s, _({
|
|
202
202
|
key: 1,
|
|
203
203
|
modelValue: H.value,
|
|
204
204
|
"onUpdate:modelValue": t[0] ||= (e) => H.value = e,
|
|
205
205
|
class: "bb-time-picker-offcanvas"
|
|
206
|
-
},
|
|
207
|
-
default:
|
|
206
|
+
}, Z.value, { onHidden: fe }), {
|
|
207
|
+
default: w(() => [h(S(k))]),
|
|
208
208
|
_: 1
|
|
209
|
-
}, 16, ["modelValue"])) : (y(), d(
|
|
209
|
+
}, 16, ["modelValue"])) : (y(), d(i, {
|
|
210
210
|
key: 2,
|
|
211
211
|
modelValue: H.value,
|
|
212
212
|
"onUpdate:modelValue": t[1] ||= (e) => H.value = e,
|
|
@@ -223,7 +223,7 @@ var ae = {
|
|
|
223
223
|
placement: e.placement,
|
|
224
224
|
"transition-duration": e.transitionDuration
|
|
225
225
|
}, {
|
|
226
|
-
default:
|
|
226
|
+
default: w(() => [h(S(k))]),
|
|
227
227
|
_: 1
|
|
228
228
|
}, 8, [
|
|
229
229
|
"modelValue",
|
|
@@ -241,4 +241,4 @@ var ae = {
|
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
//#endregion
|
|
244
|
-
export {
|
|
244
|
+
export { T as default };
|
package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import t from "../BbBaseInputContainer/BbBaseInputContainer.vue.js";
|
|
3
|
+
import { isNotEmpty as n } from "../../utilities/functions/isNotEmpty.js";
|
|
4
|
+
import r from "../BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js";
|
|
5
5
|
import { computed as i, createBlock as a, createVNode as o, defineComponent as s, guardReactiveProps as c, mergeProps as l, normalizeProps as u, onBeforeUnmount as d, onDeactivated as f, openBlock as p, ref as m, renderSlot as h, withCtx as g } from "vue";
|
|
6
6
|
//#region src/components/BbTimePickerInput/BbTimePickerInput.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _ = /*@__PURE__*/ s({
|
|
@@ -56,78 +56,78 @@ var _ = /*@__PURE__*/ s({
|
|
|
56
56
|
"update:modelValue"
|
|
57
57
|
],
|
|
58
58
|
setup(s, { emit: _ }) {
|
|
59
|
-
let v = s, y = _, b = m(!1),
|
|
60
|
-
|
|
59
|
+
let v = s, y = _, b = e(), x = m(!1), S = i(() => v.persistentHint || x.value), C = i(() => n(v.modelValue)), w = i(() => v.labelMode ?? b.defaultInputLabelMode), T = () => {
|
|
60
|
+
x.value = !1;
|
|
61
61
|
};
|
|
62
|
-
f(
|
|
63
|
-
let
|
|
62
|
+
f(T), d(T);
|
|
63
|
+
let E = {
|
|
64
64
|
onError: (e) => y("error", e),
|
|
65
65
|
onFocus: (e) => y("focus", e),
|
|
66
66
|
onActive: () => {
|
|
67
|
-
|
|
67
|
+
x.value = !0, y("active");
|
|
68
68
|
},
|
|
69
69
|
onInactive: () => {
|
|
70
|
-
|
|
70
|
+
T(), y("inactive");
|
|
71
71
|
},
|
|
72
72
|
"onUpdate:modelValue": (e) => y("update:modelValue", e)
|
|
73
73
|
};
|
|
74
|
-
return (
|
|
75
|
-
id:
|
|
74
|
+
return (e, n) => (p(), a(t, {
|
|
75
|
+
id: e.id,
|
|
76
76
|
class: "bb-time-picker-input",
|
|
77
|
-
compact:
|
|
78
|
-
description:
|
|
79
|
-
direction:
|
|
80
|
-
errors:
|
|
81
|
-
"has-errors":
|
|
82
|
-
"has-value":
|
|
83
|
-
"has-warning":
|
|
84
|
-
"hide-label":
|
|
85
|
-
hint:
|
|
86
|
-
label:
|
|
87
|
-
"label-mode":
|
|
88
|
-
"label-position":
|
|
89
|
-
"model-value":
|
|
90
|
-
name:
|
|
91
|
-
reverse:
|
|
92
|
-
"show-hint":
|
|
93
|
-
warnings:
|
|
77
|
+
compact: e.compact,
|
|
78
|
+
description: e.description,
|
|
79
|
+
direction: e.direction,
|
|
80
|
+
errors: e.errors,
|
|
81
|
+
"has-errors": e.hasErrors,
|
|
82
|
+
"has-value": C.value,
|
|
83
|
+
"has-warning": e.hasWarning,
|
|
84
|
+
"hide-label": e.hideLabel,
|
|
85
|
+
hint: e.hint,
|
|
86
|
+
label: e.label,
|
|
87
|
+
"label-mode": w.value,
|
|
88
|
+
"label-position": e.labelPosition,
|
|
89
|
+
"model-value": e.modelValue,
|
|
90
|
+
name: e.name,
|
|
91
|
+
reverse: e.reverse,
|
|
92
|
+
"show-hint": S.value,
|
|
93
|
+
warnings: e.warnings
|
|
94
94
|
}, {
|
|
95
|
-
label: g((
|
|
96
|
-
input: g(({ id:
|
|
97
|
-
id:
|
|
98
|
-
adaptive:
|
|
99
|
-
ampm:
|
|
95
|
+
label: g((t) => [h(e.$slots, "label", u(c(t)))]),
|
|
96
|
+
input: g(({ id: t, hasErrors: n, hasWarning: i, ariaDescribedby: a }) => [o(r, l({
|
|
97
|
+
id: t,
|
|
98
|
+
adaptive: e.adaptive,
|
|
99
|
+
ampm: e.ampm,
|
|
100
100
|
"append:icon": v["append:icon"],
|
|
101
101
|
"aria-describedby": a,
|
|
102
|
-
autocomplete:
|
|
103
|
-
autofocus:
|
|
104
|
-
clearable:
|
|
105
|
-
compact:
|
|
106
|
-
"disable-writing":
|
|
107
|
-
disabled:
|
|
108
|
-
"has-errors":
|
|
102
|
+
autocomplete: e.autocomplete,
|
|
103
|
+
autofocus: e.autofocus,
|
|
104
|
+
clearable: e.clearable,
|
|
105
|
+
compact: e.compact,
|
|
106
|
+
"disable-writing": e.disableWriting,
|
|
107
|
+
disabled: e.disabled,
|
|
108
|
+
"has-errors": n,
|
|
109
109
|
"has-warning": i,
|
|
110
|
-
loading:
|
|
111
|
-
max:
|
|
112
|
-
min:
|
|
113
|
-
"model-value":
|
|
114
|
-
name:
|
|
115
|
-
"off-canvas-props":
|
|
116
|
-
placeholder:
|
|
110
|
+
loading: e.loading,
|
|
111
|
+
max: e.max,
|
|
112
|
+
min: e.min,
|
|
113
|
+
"model-value": e.modelValue,
|
|
114
|
+
name: e.name,
|
|
115
|
+
"off-canvas-props": e.offCanvasProps,
|
|
116
|
+
placeholder: e.placeholder,
|
|
117
117
|
"prepend:icon": v["prepend:icon"],
|
|
118
|
-
range:
|
|
119
|
-
readonly:
|
|
120
|
-
required:
|
|
121
|
-
seconds:
|
|
122
|
-
step:
|
|
123
|
-
"transition-duration":
|
|
124
|
-
},
|
|
125
|
-
"prepend-outer": g(() => [h(
|
|
126
|
-
prepend: g(() => [h(
|
|
127
|
-
prefix: g(() => [h(
|
|
128
|
-
suffix: g(() => [h(
|
|
129
|
-
append: g(() => [h(
|
|
130
|
-
"append-outer": g(() => [h(
|
|
118
|
+
range: e.range,
|
|
119
|
+
readonly: e.readonly,
|
|
120
|
+
required: e.required,
|
|
121
|
+
seconds: e.seconds,
|
|
122
|
+
step: e.step,
|
|
123
|
+
"transition-duration": e.transitionDuration
|
|
124
|
+
}, E), {
|
|
125
|
+
"prepend-outer": g(() => [h(e.$slots, "prepend-outer")]),
|
|
126
|
+
prepend: g(() => [h(e.$slots, "prepend")]),
|
|
127
|
+
prefix: g(() => [h(e.$slots, "prefix")]),
|
|
128
|
+
suffix: g(() => [h(e.$slots, "suffix")]),
|
|
129
|
+
append: g(() => [h(e.$slots, "append")]),
|
|
130
|
+
"append-outer": g(() => [h(e.$slots, "append-outer")]),
|
|
131
131
|
_: 2
|
|
132
132
|
}, 1040, /* @__PURE__ */ "id.adaptive.ampm.append:icon.aria-describedby.autocomplete.autofocus.clearable.compact.disable-writing.disabled.has-errors.has-warning.loading.max.min.model-value.name.off-canvas-props.placeholder.prepend:icon.range.readonly.required.seconds.step.transition-duration".split("."))]),
|
|
133
133
|
_: 3
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import s from "
|
|
7
|
-
import
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import { removedPropsFor as t } from "../../deprecation/removedProps.js";
|
|
3
|
+
import { useLogger as n } from "../../composables/useLogger.js";
|
|
4
|
+
import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
5
|
+
import { topLayerHost as i } from "../../composables/useTopLayer.js";
|
|
6
|
+
import { __registerToastHost as a, resolveToastPosition as o, toastState as s } from "../../composables/useToast.js";
|
|
7
|
+
import c from "./BbToastRegion.vue.js";
|
|
8
8
|
import { Fragment as l, Teleport as u, computed as d, createBlock as f, createElementBlock as p, defineComponent as m, onMounted as h, onUnmounted as g, openBlock as _, renderList as v } from "vue";
|
|
9
9
|
//#region src/components/BbToast/BbToast.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var y = /*@__PURE__*/ m({
|
|
11
11
|
__name: "BbToast",
|
|
12
12
|
props: { position: {} },
|
|
13
13
|
setup(m) {
|
|
14
|
-
let y = m;
|
|
15
|
-
process.env.NODE_ENV !== "production" &&
|
|
16
|
-
let
|
|
14
|
+
let y = m, b = e();
|
|
15
|
+
process.env.NODE_ENV !== "production" && r("BbToast", t("BbToast"));
|
|
16
|
+
let x;
|
|
17
17
|
h(() => {
|
|
18
|
-
let { count: e, unregister:
|
|
19
|
-
|
|
18
|
+
let { count: e, unregister: t } = a();
|
|
19
|
+
x = t, process.env.NODE_ENV !== "production" && e > 1 && n().warn(`Toast: ${e} <BbToast> hosts are mounted at the same time. Every host renders the entire shared toast stack, so each message appears once per host — mount exactly one <BbToast> at the app root.`);
|
|
20
20
|
}), g(() => {
|
|
21
|
-
|
|
21
|
+
x?.();
|
|
22
22
|
});
|
|
23
|
-
let
|
|
23
|
+
let S = d(() => i.value ?? "body"), C = d(() => {
|
|
24
24
|
let e = /* @__PURE__ */ new Map();
|
|
25
|
-
for (let t of
|
|
26
|
-
let n =
|
|
25
|
+
for (let t of s.toasts) {
|
|
26
|
+
let n = o(t, y.position ?? b.toastPosition), r = e.get(n);
|
|
27
27
|
r ? r.push(t) : e.set(n, [t]);
|
|
28
28
|
}
|
|
29
29
|
return [...e];
|
|
30
30
|
});
|
|
31
|
-
return (e, t) => (_(), f(u, { to:
|
|
31
|
+
return (e, t) => (_(), f(u, { to: S.value }, [(_(!0), p(l, null, v(C.value, ([e, t]) => (_(), f(c, {
|
|
32
32
|
key: e,
|
|
33
33
|
position: e,
|
|
34
34
|
toasts: t
|
|
@@ -1,8 +1,8 @@
|
|
|
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 "../BbSpinner/BbSpinner.vue.js";
|
|
4
|
-
import { namedToastPortalRegistry as r } from "../../composables/useToast.js";
|
|
5
4
|
import ee from "../BbButton/BbButton.vue.js";
|
|
5
|
+
import { namedToastPortalRegistry as r } from "../../composables/useToast.js";
|
|
6
6
|
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, mergeProps as d, normalizeClass as te, normalizeProps as f, normalizeStyle as ne, onBeforeUnmount as re, onMounted as ie, openBlock as p, ref as m, renderList as ae, resolveDynamicComponent as h, toDisplayString as g, unref as oe, watch as _ } from "vue";
|
|
7
7
|
//#region src/components/BbToast/BbToastMessage.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var se = ["aria-live", "role"], ce = {
|
|
@@ -31,7 +31,7 @@ var se = ["aria-live", "role"], ce = {
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["height", "dismiss"],
|
|
33
33
|
setup(u, { emit: x }) {
|
|
34
|
-
let S = u, C = x, { t: me } =
|
|
34
|
+
let S = u, C = x, { t: me } = e(), w = m(), T = m(), E = m(!1), D = m(0), he = a(() => S.frontIndex === 0), O = a(() => S.frontIndex < pe), ge = a(() => !Number.isFinite(S.toast.duration ?? b)), _e = a(() => !S.toast.hideClose), k = a(() => S.toast.variant === "destructive" || S.toast.variant === "warning"), A = a(() => k.value ? "alert" : "status"), j = a(() => !O.value || S.toast.removed ? "off" : k.value ? "assertive" : "polite"), M = a(() => S.toast.loading || !!S.toast.icon), N = a(() => typeof S.toast.portal == "string" ? r.get(S.toast.portal) ?? null : null), P = a(() => S.toast.portal && typeof S.toast.portal != "string" ? S.toast.portal : null), F = a(() => !!N.value || !!P.value), ve = a(() => ({
|
|
35
35
|
toast: S.toast,
|
|
36
36
|
props: S.toast.portalProps ?? {},
|
|
37
37
|
close: $
|
|
@@ -93,16 +93,16 @@ var se = ["aria-live", "role"], ce = {
|
|
|
93
93
|
});
|
|
94
94
|
}), re(() => {
|
|
95
95
|
K(), z !== void 0 && cancelAnimationFrame(z), R?.disconnect();
|
|
96
|
-
}), (
|
|
96
|
+
}), (e, r) => (p(), c("li", {
|
|
97
97
|
ref_key: "cardEl",
|
|
98
98
|
ref: w,
|
|
99
99
|
"aria-atomic": !0,
|
|
100
100
|
"aria-live": j.value,
|
|
101
|
-
class: te(["bb-toast-message", [`bb-toast-message--${
|
|
101
|
+
class: te(["bb-toast-message", [`bb-toast-message--${e.toast.variant}`, {
|
|
102
102
|
"bb-toast-message--front": he.value,
|
|
103
103
|
"bb-toast-message--hidden": !O.value,
|
|
104
104
|
"bb-toast-message--mounted": E.value,
|
|
105
|
-
"bb-toast-message--removed": !!
|
|
105
|
+
"bb-toast-message--removed": !!e.toast.removed,
|
|
106
106
|
"bb-toast-message--swiping": L.value
|
|
107
107
|
}]]),
|
|
108
108
|
role: A.value,
|
|
@@ -115,16 +115,16 @@ var se = ["aria-live", "role"], ce = {
|
|
|
115
115
|
ref_key: "innerEl",
|
|
116
116
|
ref: T,
|
|
117
117
|
class: "bb-toast-message__inner"
|
|
118
|
-
}, [F.value ? (p(), c("div", ce, [N.value ? (p(), o(h(N.value), f(d({ key: 0 }, ve.value)), null, 16)) : (p(), o(h(P.value), f(d({ key: 1 }, ye.value)), null, 16))])) : (p(), c(i, { key: 1 }, [M.value ? (p(), c("div", le, [
|
|
118
|
+
}, [F.value ? (p(), c("div", ce, [N.value ? (p(), o(h(N.value), f(d({ key: 0 }, ve.value)), null, 16)) : (p(), o(h(P.value), f(d({ key: 1 }, ye.value)), null, 16))])) : (p(), c(i, { key: 1 }, [M.value ? (p(), c("div", le, [e.toast.loading ? (p(), o(n, {
|
|
119
119
|
key: 0,
|
|
120
120
|
size: "sm"
|
|
121
|
-
})) :
|
|
121
|
+
})) : e.toast.icon ? (p(), o(t, {
|
|
122
122
|
key: 1,
|
|
123
|
-
icon:
|
|
123
|
+
icon: e.toast.icon
|
|
124
124
|
}, null, 8, ["icon"])) : s("", !0)])) : s("", !0), l("div", ue, [
|
|
125
|
-
l("p", v, g(
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
l("p", v, g(e.toast.title), 1),
|
|
126
|
+
e.toast.text ? (p(), c("p", y, g(e.toast.text), 1)) : s("", !0),
|
|
127
|
+
e.toast.actions?.length ? (p(), c("div", de, [(p(!0), c(i, null, ae(e.toast.actions, (e, t) => (p(), o(ee, {
|
|
128
128
|
key: t,
|
|
129
129
|
"append:icon": e["append:icon"],
|
|
130
130
|
block: e.block,
|
|
@@ -32,7 +32,11 @@ export type BbTooltipProps = {
|
|
|
32
32
|
*/
|
|
33
33
|
hideArrow?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Seed for the tooltip's internal id. It is **prefixed** (`bb_<id>`) and set
|
|
36
|
+
* on the inner content element, not on the root — so
|
|
37
|
+
* `document.getElementById(theIdYouPassed)` finds nothing. Pass it to make
|
|
38
|
+
* the generated id stable (SSR snapshots, tests), not to look the element
|
|
39
|
+
* up.
|
|
36
40
|
*/
|
|
37
41
|
id?: string;
|
|
38
42
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "
|
|
1
|
+
import e from "../BbBadge/BbBadge.vue.js";
|
|
2
|
+
import { isNil as t } from "../../utilities/functions/isNil.js";
|
|
3
3
|
import { hash as n } from "../../utilities/functions/hash.js";
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, watch as h, withCtx as g, withModifiers as _ } from "vue";
|
|
5
5
|
//#region src/components/ChipsBox/ChipsBox.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -15,17 +15,17 @@ var v = {
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["option:unselected"],
|
|
17
17
|
setup(l, { expose: y, emit: b }) {
|
|
18
|
-
let x = l, S = b, C = f(null), w = i(() => x.options.some((e) => !e.disabled)), T = (
|
|
19
|
-
let n =
|
|
20
|
-
for (; x.options[r].disabled && r !== n;) r = T(
|
|
18
|
+
let x = l, S = b, C = f(null), w = i(() => x.options.some((e) => !e.disabled)), T = (e = 1) => {
|
|
19
|
+
let n = t(C.value) ? -1 : C.value, r = (n + e) % x.options.length;
|
|
20
|
+
for (; x.options[r].disabled && r !== n;) r = T(e + 1);
|
|
21
21
|
return r;
|
|
22
22
|
}, E = () => {
|
|
23
23
|
if (!w.value) return;
|
|
24
24
|
let e = T();
|
|
25
25
|
C.value = e;
|
|
26
|
-
}, D = (
|
|
27
|
-
let n =
|
|
28
|
-
for (; x.options[r].disabled && r !== n;) r = D(
|
|
26
|
+
}, D = (e = 1) => {
|
|
27
|
+
let n = t(C.value) ? 0 : C.value, r = (n - e + x.options.length) % x.options.length;
|
|
28
|
+
for (; x.options[r].disabled && r !== n;) r = D(e + 1);
|
|
29
29
|
return r;
|
|
30
30
|
}, O = async () => {
|
|
31
31
|
if (!w.value) return;
|
|
@@ -59,7 +59,7 @@ var v = {
|
|
|
59
59
|
t >= 0 && (C.value = t);
|
|
60
60
|
}, P = () => {
|
|
61
61
|
C.value = null;
|
|
62
|
-
}, F = i(() => x.disabled ||
|
|
62
|
+
}, F = i(() => x.disabled || t(C.value) ? "" : x.options[C.value]?.text ?? "");
|
|
63
63
|
return h(() => x.options, (e, t) => {
|
|
64
64
|
n(e) !== n(t) && P();
|
|
65
65
|
}, { flush: "post" }), y({
|
|
@@ -71,19 +71,19 @@ var v = {
|
|
|
71
71
|
focusLastSelected: M,
|
|
72
72
|
blur: P,
|
|
73
73
|
confirmOption: () => {
|
|
74
|
-
if (
|
|
75
|
-
let
|
|
76
|
-
|
|
74
|
+
if (t(C.value)) return;
|
|
75
|
+
let e = x.options[C.value];
|
|
76
|
+
e.selected && S("option:unselected", e);
|
|
77
77
|
},
|
|
78
78
|
focusByHash: N,
|
|
79
79
|
getHighlighted: () => {
|
|
80
|
-
if (!
|
|
80
|
+
if (!t(C.value)) return x.options[C.value];
|
|
81
81
|
}
|
|
82
|
-
}), (
|
|
82
|
+
}), (t, n) => (d(), o(r, null, [(d(!0), o(r, null, p(t.options, (n, r) => (d(), a(e, {
|
|
83
83
|
key: n.valueHash,
|
|
84
|
-
class: u(["bb-chipsbox-item", { "bb-badge--focused": !
|
|
85
|
-
clearable: !
|
|
86
|
-
size:
|
|
84
|
+
class: u(["bb-chipsbox-item", { "bb-badge--focused": !t.disabled && r === C.value }]),
|
|
85
|
+
clearable: !t.disabled,
|
|
86
|
+
size: t.size,
|
|
87
87
|
variant: "secondary",
|
|
88
88
|
"onClick:clear": _((e) => S("option:unselected", n), ["stop"])
|
|
89
89
|
}, {
|