bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -7
- package/bin/bitboss-ui-mcp.mjs +15 -3
- package/bin/bitboss-ui.mjs +115 -13
- package/dist/ai/BbAvatar.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +65 -65
- package/dist/ai/BbButton.md +16 -5
- package/dist/ai/BbCheckbox.md +0 -2
- package/dist/ai/BbCheckboxGroup.md +13 -20
- package/dist/ai/BbDatePickerInput.md +4 -2
- package/dist/ai/BbDialog.md +1 -8
- package/dist/ai/BbDropdown.md +231 -220
- package/dist/ai/BbDropdownButton.md +65 -65
- package/dist/ai/BbDropdownGroup.md +2 -2
- package/dist/ai/BbDropzone.md +10 -10
- package/dist/ai/BbForm.md +43 -52
- package/dist/ai/BbHoverCard.md +4 -2
- package/dist/ai/BbNumberInput.md +88 -21
- package/dist/ai/BbPopover.md +29 -23
- package/dist/ai/BbProgress.md +48 -22
- package/dist/ai/BbRadioGroup.md +13 -19
- package/dist/ai/BbSelect.md +16 -36
- package/dist/ai/BbSelectPopover.md +14 -30
- package/dist/ai/BbSmoothHeight.md +0 -2
- package/dist/ai/BbSwitchGroup.md +13 -20
- package/dist/ai/BbTable.md +11 -10
- package/dist/ai/BbTabs.md +106 -105
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +1 -1
- package/dist/ai/BbTabsRoot.md +2 -2
- package/dist/ai/BbTooltip.md +24 -10
- package/dist/ai/BbTree.md +14 -11
- package/dist/ai/changelog.json +256 -5
- package/dist/ai/components.json +36 -34
- package/dist/ai/composables/useBbDropdownContext.md +16 -16
- package/dist/ai/composables/useBbFormField.md +5 -1
- package/dist/ai/composables/useBbTabsContext.md +14 -14
- package/dist/ai/guides/agent-contract.md +27 -27
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/component-picker.md +3 -3
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +10 -10
- package/dist/ai/guides/inertia-helpers.md +120 -67
- package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
- package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
- package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
- package/dist/ai/guides/migration/components/bb-select.md +10 -2
- package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
- package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +114 -17
- package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
- package/dist/ai/guides/options-items-playbook.md +30 -24
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/preset-components.md +18 -3
- package/dist/ai/guides/typescript-generic-components.md +1 -1
- package/dist/ai/guides/validated-forms.md +11 -22
- package/dist/ai/guides/validation-providers.md +4 -3
- package/dist/ai/helpers/inertia/manifest.json +636 -0
- package/dist/ai/helpers/inertia/types.ts +15 -0
- package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
- package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
- package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
- package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
- package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
- package/dist/ai/helpers/inertia/useLoading.ts +20 -0
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
- package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
- package/dist/ai/helpers/inertia/useProp.ts +63 -0
- package/dist/ai/helpers/inertia/useQuery.ts +19 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
- package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
- package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
- package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
- package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
- package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
- package/dist/ai/helpers/inertia/useUntil.ts +33 -0
- package/dist/ai/helpers/inertia/utils.ts +24 -0
- package/dist/ai/index.md +6 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +23 -20
- package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -0
- package/dist/ai/manifest/components/BbNumberInput.json +6 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -0
- package/dist/ai/manifest/components/BbProgress.json +6 -6
- package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbTabs.json +7 -6
- package/dist/ai/manifest/components/BbTabsList.json +3 -3
- package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +2 -0
- package/dist/ai/manifest/types.advanced.json +10 -9
- package/dist/ai/manifest/types.api.json +5 -4
- package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
- package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
- package/dist/ai/recipes/inertia/onboarding.md +6 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
- package/dist/ai/recipes/inertia/record-form.md +11 -11
- package/dist/ai/recipes/inertia/records-workspace.md +38 -41
- package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
- package/dist/ai/recipes/inertia/upload-center.md +31 -39
- package/dist/ai/recipes/inertia/wizard-form.md +10 -19
- package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
- package/dist/ai/recipes/nuxt/onboarding.md +2 -6
- package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
- package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
- package/dist/ai/recipes/nuxt/upload-center.md +22 -29
- package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
- package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
- package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
- package/dist/ai/recipes/vue/onboarding.md +2 -6
- package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
- package/dist/ai/recipes/vue/record-form.md +5 -5
- package/dist/ai/recipes/vue/records-workspace.md +29 -31
- package/dist/ai/recipes/vue/settings-workspace.md +22 -34
- package/dist/ai/recipes/vue/upload-center.md +22 -29
- package/dist/ai/recipes/vue/wizard-form.md +3 -11
- package/dist/ai/source/BbAccordion.md +1 -1
- package/dist/ai/source/BbAlert.md +3 -3
- package/dist/ai/source/BbBadge.md +2 -2
- package/dist/ai/source/BbBadgeButton.md +5 -4
- package/dist/ai/source/BbBaseButton.md +1 -1
- package/dist/ai/source/BbBaseRadioIcon.md +1 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
- package/dist/ai/source/BbBreadcrumbs.md +63 -42
- package/dist/ai/source/BbButton.md +71 -33
- package/dist/ai/source/BbCalendar.md +17 -16
- package/dist/ai/source/BbCheckbox.md +3 -2
- package/dist/ai/source/BbCheckboxGroup.md +11 -4
- package/dist/ai/source/BbColorInput.md +10 -9
- package/dist/ai/source/BbConfirm.md +1 -1
- package/dist/ai/source/BbConfirmPortal.md +1 -1
- package/dist/ai/source/BbDatePicker.md +2 -2
- package/dist/ai/source/BbDatePickerInput.md +47 -20
- package/dist/ai/source/BbDialog.md +5 -5
- package/dist/ai/source/BbDropdown.md +230 -158
- package/dist/ai/source/BbDropdownButton.md +19 -12
- package/dist/ai/source/BbDropdownGroup.md +126 -93
- package/dist/ai/source/BbForm.md +25 -1
- package/dist/ai/source/BbIndicator.md +4 -0
- package/dist/ai/source/BbNumberInput.md +855 -19
- package/dist/ai/source/BbOffCanvas.md +27 -11
- package/dist/ai/source/BbPagination.md +3 -3
- package/dist/ai/source/BbPopover.md +152 -8
- package/dist/ai/source/BbPopoverPortal.md +11 -0
- package/dist/ai/source/BbProgress.md +82 -18
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +11 -9
- package/dist/ai/source/BbSelect.md +16 -10
- package/dist/ai/source/BbSelectPopover.md +29 -23
- package/dist/ai/source/BbSlider.md +12 -6
- package/dist/ai/source/BbSwitch.md +3 -2
- package/dist/ai/source/BbSwitchGroup.md +5 -2
- package/dist/ai/source/BbTable.md +102 -18
- package/dist/ai/source/BbTabs.md +27 -23
- package/dist/ai/source/BbTabsList.md +26 -22
- package/dist/ai/source/BbTabsPanels.md +26 -22
- package/dist/ai/source/BbTabsRoot.md +25 -21
- package/dist/ai/source/BbTag.md +10 -9
- package/dist/ai/source/BbTextInput.md +5 -4
- package/dist/ai/source/BbTextarea.md +6 -5
- package/dist/ai/source/BbTimePicker.md +1 -1
- package/dist/ai/source/BbTimePickerInput.md +46 -9
- package/dist/ai/source/BbToast.md +10 -7
- package/dist/ai/source/BbToastPortal.md +10 -7
- package/dist/ai/source/BbTooltip.md +54 -8
- package/dist/ai/source/BbTree.md +21 -3
- package/dist/ai/source/CommonField.md +6 -4
- package/dist/ai/source/CommonFieldInput.md +15 -10
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/CommonTimeSelector.md +5 -4
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
- package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
- package/dist/components/BbButton/toggleRoving.d.ts +6 -0
- package/dist/components/BbButton/toggleRoving.js +45 -0
- package/dist/components/BbButton/types.d.ts +4 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
- package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
- package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
- package/dist/components/BbDropdown/normalizeGroups.js +60 -46
- package/dist/components/BbDropdown/types.d.ts +119 -88
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
- package/dist/components/BbDropdownButton/types.d.ts +2 -2
- package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
- package/dist/components/BbForm/BbFormCustomField.js +1 -1
- package/dist/components/BbForm/bindFormField.js +2 -1
- package/dist/components/BbForm/formFields.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
- package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
- package/dist/components/BbNumberInput/numberDisplay.js +499 -0
- package/dist/components/BbNumberInput/types.d.ts +54 -1
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
- package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
- package/dist/components/BbPopover/types.d.ts +11 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
- package/dist/components/BbProgress/types.d.ts +23 -7
- package/dist/components/BbProgress/types.js +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
- package/dist/components/BbRadioGroup/types.d.ts +6 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
- package/dist/components/BbSelect/types.d.ts +6 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbSelectPopover/types.d.ts +6 -2
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/types.d.ts +25 -21
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
- package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
- package/dist/components/BbTooltip/types.d.ts +7 -2
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/composables/formSubmitLock.d.ts +6 -0
- package/dist/composables/formSubmitLock.js +4 -0
- package/dist/composables/useBaseOptions.d.ts +7 -1
- package/dist/composables/useBaseOptions.js +32 -32
- package/dist/composables/useBbDropdownContext.d.ts +8 -8
- package/dist/composables/useBbFormField.d.ts +9 -0
- package/dist/composables/useBbFormField.js +5 -3
- package/dist/composables/useBbTabsContext.d.ts +10 -10
- package/dist/composables/useBbTabsContext.js +18 -18
- package/dist/composables/useFormBinding.d.ts +11 -0
- package/dist/composables/useFormBinding.js +15 -13
- package/dist/composables/useItemText.d.ts +5 -1
- package/dist/composables/useItemText.js +8 -3
- package/dist/composables/useItemValue.d.ts +5 -1
- package/dist/composables/useItemValue.js +8 -3
- package/dist/composables/useLocale.js +10 -9
- package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/i18n/index.d.ts +7 -12
- package/dist/i18n/locales/cs.json +11 -14
- package/dist/i18n/locales/da.json +13 -16
- package/dist/i18n/locales/de-CH.json +137 -0
- package/dist/i18n/locales/de.json +14 -17
- package/dist/i18n/locales/el.json +10 -13
- package/dist/i18n/locales/en-GB.json +137 -0
- package/dist/i18n/locales/en.json +8 -11
- package/dist/i18n/locales/es-MX.json +137 -0
- package/dist/i18n/locales/es.json +16 -19
- package/dist/i18n/locales/fi.json +8 -11
- package/dist/i18n/locales/fr.json +23 -26
- package/dist/i18n/locales/hu.json +8 -11
- package/dist/i18n/locales/it.json +12 -15
- package/dist/i18n/locales/ja.json +13 -16
- package/dist/i18n/locales/ko.json +10 -13
- package/dist/i18n/locales/nb.json +13 -16
- package/dist/i18n/locales/nl.json +21 -24
- package/dist/i18n/locales/pl.json +10 -13
- package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
- package/dist/i18n/locales/pt-PT.json +137 -0
- package/dist/i18n/locales/ro.json +22 -25
- package/dist/i18n/locales/ru.json +11 -14
- package/dist/i18n/locales/sv.json +16 -19
- package/dist/i18n/locales/tr.json +14 -17
- package/dist/i18n/locales/uk.json +11 -14
- package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
- package/dist/i18n/locales/zh-HK.json +137 -0
- package/dist/i18n/locales/zh-TW.json +137 -0
- package/dist/i18n/regionHints.d.ts +16 -0
- package/dist/i18n/regionHints.js +49 -0
- package/dist/i18n/regions.d.ts +286 -0
- package/dist/i18n/regions.js +265 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/llms-full.txt +1785 -1637
- package/dist/llms-medium.txt +74 -46
- package/dist/llms.txt +7 -7
- package/dist/locale-blueprint.json +16 -13
- package/dist/styles.css +2 -2
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/slotKey.d.ts +2 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +22 -19
- package/dist/vite.js +309 -297
- package/llms.txt +7 -7
- package/package.json +5 -3
- package/scripts/lib/agent-manifest.mjs +2 -1
- package/scripts/lib/eslint-disable.mjs +12 -4
- package/scripts/lib/eslint-plugin.d.ts +5 -1
- package/scripts/lib/eslint-plugin.mjs +187 -6
- package/scripts/lib/helper-canon.mjs +176 -0
- package/scripts/lib/helpers-add.mjs +1303 -0
- package/scripts/lib/local-components.mjs +33 -4
- package/scripts/lib/locale-check.mjs +165 -0
- package/scripts/lib/redundant-item-accessor.mjs +398 -0
- package/scripts/lib/renamed-item-field.mjs +343 -0
- package/scripts/lib/slot-key.mjs +2 -2
- package/scripts/lib/slot-renames.mjs +1 -1
- package/scripts/lib/validate-bb-markup.mjs +123 -56
- package/dist/i18n/index.js +0 -27
|
@@ -14,16 +14,16 @@ import { useFormBinding as ae } from "../../composables/useFormBinding.js";
|
|
|
14
14
|
import oe from "../OptionsContainer/OptionsContainer.vue.js";
|
|
15
15
|
import { useIndexById as m } from "../../composables/useIndexById.js";
|
|
16
16
|
import { useBaseOptions as se } from "../../composables/useBaseOptions.js";
|
|
17
|
-
import { useCoherence as
|
|
18
|
-
import { usePrefill as
|
|
19
|
-
import { useActiveInactiveState as
|
|
20
|
-
import { useOnFalsy as
|
|
21
|
-
import { useOnTruthy as
|
|
22
|
-
import
|
|
23
|
-
import { BB_RADIO_GROUP_PT as
|
|
24
|
-
import { computed as
|
|
17
|
+
import { useCoherence as h } from "../../composables/useCoherence.js";
|
|
18
|
+
import { usePrefill as ce } from "../../composables/usePrefill.js";
|
|
19
|
+
import { useActiveInactiveState as le } from "../../composables/useActiveInactiveState.js";
|
|
20
|
+
import { useOnFalsy as ue } from "../../composables/useOnFalsy.js";
|
|
21
|
+
import { useOnTruthy as de } from "../../composables/useOnTruthy.js";
|
|
22
|
+
import fe from "../BbBaseRadioIcon/BbBaseRadioIcon.vue.js";
|
|
23
|
+
import { BB_RADIO_GROUP_PT as g } from "./types.js";
|
|
24
|
+
import { computed as _, createBlock as pe, createElementVNode as me, createSlots as he, createVNode as v, defineComponent as y, guardReactiveProps as b, mergeProps as x, nextTick as S, normalizeProps as C, openBlock as ge, ref as _e, renderSlot as w, shallowRef as ve, toRef as T, unref as E, useAttrs as ye, useSlots as D, withCtx as O } from "vue";
|
|
25
25
|
//#region src/components/BbRadioGroup/BbRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
26
|
-
var
|
|
26
|
+
var k = /*@__PURE__*/ y({
|
|
27
27
|
inheritAttrs: !1,
|
|
28
28
|
__name: "BbRadioGroup",
|
|
29
29
|
props: {
|
|
@@ -173,65 +173,66 @@ var A = /*@__PURE__*/ b({
|
|
|
173
173
|
"mouseup",
|
|
174
174
|
"update:modelValue"
|
|
175
175
|
],
|
|
176
|
-
setup(
|
|
177
|
-
let
|
|
176
|
+
setup(y, { emit: k }) {
|
|
177
|
+
let A = y, j = k, M = D(), { props: N, emit: P, showAsterisk: be, errors: xe, ariaRequired: Se, readonly: F } = ae(A, j, {
|
|
178
178
|
componentName: "BbRadioGroup",
|
|
179
|
-
identifierFallback: () =>
|
|
179
|
+
identifierFallback: () => A.legend,
|
|
180
180
|
leaveOn: "inactive"
|
|
181
|
-
}),
|
|
181
|
+
}), I = () => !!N.legend || !!M.legend;
|
|
182
182
|
process.env.NODE_ENV !== "production" && c("BbRadioGroup", s("BbRadioGroup"));
|
|
183
|
-
let
|
|
184
|
-
|
|
185
|
-
}, { active: V } =
|
|
186
|
-
|
|
187
|
-
H.value = !1,
|
|
188
|
-
}),
|
|
189
|
-
H.value = !0,
|
|
183
|
+
let Ce = o().id, L = _(() => N.name || Ce.value), we = [], R = _(() => N.items === void 0 ? we : N.items), z = ve(null), B = (e) => {
|
|
184
|
+
z.value = e?.$el ?? null;
|
|
185
|
+
}, { active: V } = le(z), H = _e(!1), Te = _(() => N.persistentHint || H.value);
|
|
186
|
+
ue(V, () => {
|
|
187
|
+
H.value = !1, P("inactive");
|
|
188
|
+
}), de(V, () => {
|
|
189
|
+
H.value = !0, P("active");
|
|
190
190
|
});
|
|
191
|
-
let { getter: U, clientReproducible:
|
|
192
|
-
items:
|
|
191
|
+
let { getter: U, clientReproducible: Ee, hydratedFromSsr: De, items: Oe, loading: W, error: ke, ssrMarker: Ae } = l({
|
|
192
|
+
items: R,
|
|
193
193
|
marker: !0
|
|
194
194
|
}), G = () => {
|
|
195
|
-
|
|
196
|
-
}, { hasPrefilled: K, whenPrefilled:
|
|
197
|
-
alreadyLoaded:
|
|
198
|
-
clientReproducible:
|
|
195
|
+
N.enforceCoherence && !J.value && P("update:modelValue", null);
|
|
196
|
+
}, { hasPrefilled: K, whenPrefilled: je } = ce({
|
|
197
|
+
alreadyLoaded: De,
|
|
198
|
+
clientReproducible: Ee,
|
|
199
199
|
trigger: !0,
|
|
200
|
-
currentValue:
|
|
200
|
+
currentValue: N.modelValue,
|
|
201
201
|
multiple: !1,
|
|
202
202
|
fn: async () => {
|
|
203
|
-
await U(void 0, "initial",
|
|
203
|
+
await U(void 0, "initial", N.modelValue) === "applied" && G();
|
|
204
204
|
}
|
|
205
|
-
}), { data:
|
|
206
|
-
disabled: T(
|
|
207
|
-
items:
|
|
208
|
-
itemText:
|
|
209
|
-
itemProps: T(
|
|
210
|
-
itemValue:
|
|
205
|
+
}), { data: Me } = m({ items: _(() => [N.modelValue]) }), { options: q } = se({
|
|
206
|
+
disabled: T(N, "disabled"),
|
|
207
|
+
items: Oe,
|
|
208
|
+
itemText: N.itemText,
|
|
209
|
+
itemProps: T(N, "itemProps"),
|
|
210
|
+
itemValue: N.itemValue,
|
|
211
|
+
optionDefaults: !0,
|
|
211
212
|
max: Infinity,
|
|
212
|
-
selectable: T(
|
|
213
|
-
selectedIndexedByHash:
|
|
214
|
-
}), { data:
|
|
213
|
+
selectable: T(N, "selectable"),
|
|
214
|
+
selectedIndexedByHash: Me
|
|
215
|
+
}), { data: Ne } = m({
|
|
215
216
|
items: q,
|
|
216
217
|
key: "valueHash"
|
|
217
|
-
}), { coherent: J } =
|
|
218
|
-
modelValue: T(
|
|
218
|
+
}), { coherent: J } = h({
|
|
219
|
+
modelValue: T(N, "modelValue"),
|
|
219
220
|
multiple: !1,
|
|
220
|
-
iteratee: (e) => !!
|
|
221
|
+
iteratee: (e) => !!Ne.value[a(e)]
|
|
221
222
|
}), Y = 0;
|
|
222
|
-
u(() =>
|
|
223
|
-
Y++, J.value || await U(void 0, "model",
|
|
224
|
-
}, { debounce:
|
|
225
|
-
K.value || await
|
|
226
|
-
}, { debounce:
|
|
227
|
-
let X =
|
|
223
|
+
u(() => N.modelValue, async () => {
|
|
224
|
+
Y++, J.value || await U(void 0, "model", N.modelValue) === "applied" && G(), Y--;
|
|
225
|
+
}, { debounce: N.modelValueDebounceTime === void 0 ? 0 : N.modelValueDebounceTime }), u(() => [N.dependencies, R.value], async () => {
|
|
226
|
+
K.value || await je(), K.value && (Y++, await U(void 0, "dependencies", N.modelValue) === "applied" && Y === 1 && G(), Y--);
|
|
227
|
+
}, { debounce: N.depsDebounceTime === void 0 ? 0 : N.depsDebounceTime });
|
|
228
|
+
let X = _(() => e(N.modelValue)), Z = i({
|
|
228
229
|
component: "BbRadioGroup",
|
|
229
|
-
attrs:
|
|
230
|
-
props:
|
|
231
|
-
parts:
|
|
232
|
-
states:
|
|
230
|
+
attrs: ye(),
|
|
231
|
+
props: N,
|
|
232
|
+
parts: g.parts,
|
|
233
|
+
states: g.states,
|
|
233
234
|
active: {
|
|
234
|
-
...r(n(
|
|
235
|
+
...r(n(N, () => X.value), [
|
|
235
236
|
"errors",
|
|
236
237
|
"warnings",
|
|
237
238
|
"disabled",
|
|
@@ -240,51 +241,51 @@ var A = /*@__PURE__*/ b({
|
|
|
240
241
|
]),
|
|
241
242
|
loading: () => W.value
|
|
242
243
|
}
|
|
243
|
-
}),
|
|
244
|
+
}), Pe = t(Z, { label: "legend" }), Q = ie(), $ = (e, t) => {
|
|
244
245
|
if (t) return [t, e.valueHash].filter(Boolean).join("-");
|
|
245
|
-
},
|
|
246
|
-
let e =
|
|
246
|
+
}, Fe = () => {
|
|
247
|
+
let e = z.value?.querySelectorAll("input[type=\"radio\"]") ?? [];
|
|
247
248
|
e.length === q.value.length && q.value.forEach((t, n) => {
|
|
248
249
|
e[n].checked = !!t.selected;
|
|
249
250
|
});
|
|
250
|
-
},
|
|
251
|
+
}, Ie = (e) => ({
|
|
251
252
|
onBlur: (t) => {
|
|
252
|
-
Q.onBlur(e.valueHash),
|
|
253
|
+
Q.onBlur(e.valueHash), P("blur", t);
|
|
253
254
|
},
|
|
254
255
|
onChange: (t) => {
|
|
255
|
-
if (
|
|
256
|
-
t.target instanceof HTMLInputElement && te(t.target,
|
|
256
|
+
if (N.readonly) {
|
|
257
|
+
t.target instanceof HTMLInputElement && te(t.target, N.readonly, !!e.selected);
|
|
257
258
|
return;
|
|
258
259
|
}
|
|
259
|
-
|
|
260
|
+
P("change", t), P("update:modelValue", e.value), S(Fe);
|
|
260
261
|
},
|
|
261
262
|
onClick: (e) => {
|
|
262
|
-
f(e,
|
|
263
|
+
f(e, N.readonly), P("click", e);
|
|
263
264
|
},
|
|
264
265
|
onFocus: (t) => {
|
|
265
|
-
Q.onFocus(e.valueHash, t), H.value = !0,
|
|
266
|
+
Q.onFocus(e.valueHash, t), H.value = !0, P("focus", t);
|
|
266
267
|
},
|
|
267
|
-
onInput: (e) =>
|
|
268
|
+
onInput: (e) => P("input", e),
|
|
268
269
|
onKeydown: (e) => {
|
|
269
|
-
p(e,
|
|
270
|
+
p(e, N.readonly), P("keydown", e);
|
|
270
271
|
},
|
|
271
|
-
onMousedown: (e) =>
|
|
272
|
-
onMouseup: (e) =>
|
|
273
|
-
}),
|
|
272
|
+
onMousedown: (e) => P("mousedown", e),
|
|
273
|
+
onMouseup: (e) => P("mouseup", e)
|
|
274
|
+
}), Le = (e, t, n, r, i, a) => ({
|
|
274
275
|
...ne("radio", {
|
|
275
276
|
ariaDescribedby: ee(r, a),
|
|
276
277
|
ariaLabelledby: i,
|
|
277
|
-
autofocus:
|
|
278
|
+
autofocus: N.autofocus && !t,
|
|
278
279
|
checked: !!e.selected,
|
|
279
280
|
disabled: e.disabled,
|
|
280
281
|
id: $(e, n),
|
|
281
|
-
name:
|
|
282
|
-
readonly:
|
|
283
|
-
required:
|
|
282
|
+
name: L.value,
|
|
283
|
+
readonly: N.readonly,
|
|
284
|
+
required: N.required,
|
|
284
285
|
value: e.value
|
|
285
286
|
}),
|
|
286
|
-
...
|
|
287
|
-
}),
|
|
287
|
+
...Ie(e)
|
|
288
|
+
}), Re = (e, t, n, r) => ({
|
|
288
289
|
checked: !!e.selected,
|
|
289
290
|
disabled: !!e.disabled,
|
|
290
291
|
focused: Q.focused(e.valueHash),
|
|
@@ -292,18 +293,18 @@ var A = /*@__PURE__*/ b({
|
|
|
292
293
|
hasErrors: !!n,
|
|
293
294
|
hasWarnings: !!r && !n,
|
|
294
295
|
id: $(e, t),
|
|
295
|
-
name:
|
|
296
|
+
name: L.value,
|
|
296
297
|
parsedValue: re("radio", e.value),
|
|
297
|
-
readonly: !!
|
|
298
|
+
readonly: !!N.readonly,
|
|
298
299
|
value: e.value
|
|
299
300
|
});
|
|
300
|
-
return (e, t) => (ge(),
|
|
301
|
+
return (e, t) => (ge(), pe(d, x({
|
|
301
302
|
id: e.id,
|
|
302
303
|
class: "bb-radio-group",
|
|
303
304
|
compact: e.compact,
|
|
304
305
|
description: e.description,
|
|
305
306
|
disabled: e.disabled,
|
|
306
|
-
errors: E(
|
|
307
|
+
errors: E(xe),
|
|
307
308
|
"has-errors": e.hasErrors,
|
|
308
309
|
"has-value": X.value,
|
|
309
310
|
"has-warnings": e.hasWarnings,
|
|
@@ -318,25 +319,25 @@ var A = /*@__PURE__*/ b({
|
|
|
318
319
|
"label-tag": "legend",
|
|
319
320
|
layout: e.layout,
|
|
320
321
|
loading: E(W),
|
|
321
|
-
name:
|
|
322
|
-
passthrough: E(
|
|
323
|
-
readonly:
|
|
322
|
+
name: L.value,
|
|
323
|
+
passthrough: E(Pe),
|
|
324
|
+
readonly: E(F),
|
|
324
325
|
reverse: e.reverse,
|
|
325
|
-
"show-asterisk": E(
|
|
326
|
-
"show-hint":
|
|
327
|
-
"ssr-marker": E(
|
|
326
|
+
"show-asterisk": E(be),
|
|
327
|
+
"show-hint": Te.value,
|
|
328
|
+
"ssr-marker": E(Ae),
|
|
328
329
|
tag: "fieldset",
|
|
329
330
|
warnings: e.warnings
|
|
330
|
-
}, E(Z).forwardAttrs),
|
|
331
|
-
label:
|
|
332
|
-
input:
|
|
333
|
-
ref:
|
|
334
|
-
"aria-labelledby":
|
|
335
|
-
"aria-readonly":
|
|
336
|
-
"aria-required":
|
|
331
|
+
}, E(Z).forwardAttrs), he({
|
|
332
|
+
label: O((t) => [w(e.$slots, "legend", C(b(t)))]),
|
|
333
|
+
input: O(({ id: t, hasErrors: n, hasWarnings: r, ariaDescribedby: i }) => [v(oe, {
|
|
334
|
+
ref: B,
|
|
335
|
+
"aria-labelledby": I() ? `${t}__label` : void 0,
|
|
336
|
+
"aria-readonly": I() && E(F) ? !0 : void 0,
|
|
337
|
+
"aria-required": I() ? E(Se) : void 0,
|
|
337
338
|
block: "bb-radio-group",
|
|
338
339
|
"empty-text": e.emptyText,
|
|
339
|
-
error: E(
|
|
340
|
+
error: E(ke),
|
|
340
341
|
"failed-text": e.failedText,
|
|
341
342
|
"has-errors": n,
|
|
342
343
|
"has-warnings": r,
|
|
@@ -350,23 +351,23 @@ var A = /*@__PURE__*/ b({
|
|
|
350
351
|
"loading-text": e.loadingText,
|
|
351
352
|
options: E(q),
|
|
352
353
|
passthrough: E(Z),
|
|
353
|
-
role:
|
|
354
|
+
role: I() ? "radiogroup" : void 0
|
|
354
355
|
}, {
|
|
355
|
-
prepend:
|
|
356
|
-
loading:
|
|
357
|
-
empty:
|
|
358
|
-
label:
|
|
359
|
-
input:
|
|
356
|
+
prepend: O(() => [w(e.$slots, "prepend")]),
|
|
357
|
+
loading: O(() => [w(e.$slots, "loading")]),
|
|
358
|
+
empty: O((t) => [w(e.$slots, "empty", C(b(t)))]),
|
|
359
|
+
label: O((t) => [w(e.$slots, "label", C(b(t)))]),
|
|
360
|
+
input: O(({ option: a, index: o, labelId: s, descriptionId: c, rowStates: l }) => [me("input", C(b(Le(a, o, t, i, s, c))), null, 16), w(e.$slots, "icon", x({
|
|
360
361
|
item: a.item,
|
|
361
362
|
text: a.text
|
|
362
|
-
},
|
|
363
|
+
}, Re(a, t, n, r)), () => [v(fe, x({
|
|
363
364
|
checked: !!a.selected,
|
|
364
365
|
disabled: !!a.disabled,
|
|
365
366
|
"focus-visible": E(Q).focusVisible(a.valueHash),
|
|
366
367
|
focused: E(Q).focused(a.valueHash),
|
|
367
368
|
"has-errors": !!n,
|
|
368
369
|
"has-warnings": !!r && !n,
|
|
369
|
-
readonly: !!
|
|
370
|
+
readonly: !!E(F)
|
|
370
371
|
}, E(Z).part("icon", l, a.item)), null, 16, [
|
|
371
372
|
"checked",
|
|
372
373
|
"disabled",
|
|
@@ -376,7 +377,7 @@ var A = /*@__PURE__*/ b({
|
|
|
376
377
|
"has-warnings",
|
|
377
378
|
"readonly"
|
|
378
379
|
])])]),
|
|
379
|
-
append:
|
|
380
|
+
append: O(() => [w(e.$slots, "append")]),
|
|
380
381
|
_: 2
|
|
381
382
|
}, 1032, [
|
|
382
383
|
"aria-labelledby",
|
|
@@ -402,10 +403,10 @@ var A = /*@__PURE__*/ b({
|
|
|
402
403
|
_: 2
|
|
403
404
|
}, [e.$slots.description ? {
|
|
404
405
|
name: "description",
|
|
405
|
-
fn:
|
|
406
|
+
fn: O((t) => [w(e.$slots, "description", C(b(t)))]),
|
|
406
407
|
key: "0"
|
|
407
408
|
} : void 0]), 1040, /* @__PURE__ */ "id.compact.description.disabled.errors.has-errors.has-value.has-warnings.hide-label.hint.input-align.input-position.label.label-align.label-mode.label-position.layout.loading.name.passthrough.readonly.reverse.show-asterisk.show-hint.ssr-marker.warnings".split(".")));
|
|
408
409
|
}
|
|
409
410
|
});
|
|
410
411
|
//#endregion
|
|
411
|
-
export {
|
|
412
|
+
export { k as default };
|
|
@@ -162,13 +162,17 @@ export type BbRadioGroupProps<T> = {
|
|
|
162
162
|
/**
|
|
163
163
|
* Defines a path that returns a property of the object to use as text or a function that returns a string.
|
|
164
164
|
*
|
|
165
|
-
*
|
|
165
|
+
* Unset: own `label`, else `text` (`{ label, value }` needs no accessor).
|
|
166
|
+
*
|
|
167
|
+
* @defaultValue own `label`, else `text`, else `JSON.stringify(item)`
|
|
166
168
|
*/
|
|
167
169
|
itemText?: ItemAccessor<T, string>;
|
|
168
170
|
/**
|
|
169
171
|
* Defines a path that returns a property of the object to use as value or a function that returns any value.
|
|
170
172
|
*
|
|
171
|
-
*
|
|
173
|
+
* Unset: own `value`, even `null`.
|
|
174
|
+
*
|
|
175
|
+
* @defaultValue own `value`, else the whole item
|
|
172
176
|
*/
|
|
173
177
|
itemValue?: ItemAccessor<T>;
|
|
174
178
|
/**
|
|
@@ -14,14 +14,14 @@ import { useOnFalsy as ae } from "../../composables/useOnFalsy.js";
|
|
|
14
14
|
import { useOnTruthy as oe } from "../../composables/useOnTruthy.js";
|
|
15
15
|
import se from "../../assets/svgs/star.svg_raw.js";
|
|
16
16
|
import { BB_RATING_PT as l } from "./types.js";
|
|
17
|
-
import { Fragment as ce, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as le, createVNode as ue, defineComponent as h, guardReactiveProps as g, mergeProps as _, normalizeClass as de, normalizeProps as v, normalizeStyle as fe, openBlock as y, ref as b, renderList as pe, renderSlot as x, toDisplayString as S, unref as C, useAttrs as
|
|
17
|
+
import { Fragment as ce, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as le, createVNode as ue, defineComponent as h, guardReactiveProps as g, mergeProps as _, normalizeClass as de, normalizeProps as v, normalizeStyle as fe, openBlock as y, ref as b, renderList as pe, renderSlot as x, toDisplayString as S, unref as C, useAttrs as me, useSlots as w, useTemplateRef as T, withCtx as E } from "vue";
|
|
18
18
|
//#region src/components/BbRating/BbRating.vue?vue&type=script&setup=true&lang.ts
|
|
19
|
-
var
|
|
19
|
+
var D = [
|
|
20
20
|
"aria-labelledby",
|
|
21
21
|
"aria-readonly",
|
|
22
22
|
"aria-required",
|
|
23
23
|
"role"
|
|
24
|
-
],
|
|
24
|
+
], O = ["id"], k = { class: "bb-rating__label-text bb-sr-only" }, A = [
|
|
25
25
|
"id",
|
|
26
26
|
"aria-describedby",
|
|
27
27
|
"autofocus",
|
|
@@ -30,7 +30,7 @@ var O = [
|
|
|
30
30
|
"name",
|
|
31
31
|
"required",
|
|
32
32
|
"value"
|
|
33
|
-
],
|
|
33
|
+
], j = /*@__PURE__*/ h({
|
|
34
34
|
inheritAttrs: !1,
|
|
35
35
|
__name: "BbRating",
|
|
36
36
|
props: {
|
|
@@ -125,55 +125,55 @@ var O = [
|
|
|
125
125
|
"mouseup",
|
|
126
126
|
"update:modelValue"
|
|
127
127
|
],
|
|
128
|
-
setup(h, { emit:
|
|
129
|
-
let
|
|
128
|
+
setup(h, { emit: j }) {
|
|
129
|
+
let M = h, N = j, P = w(), { props: F, emit: I, showAsterisk: L, errors: R, required: z, ariaRequired: he, model: ge, readonly: B } = re(M, N, {
|
|
130
130
|
componentName: "BbRating",
|
|
131
|
-
identifierFallback: () =>
|
|
131
|
+
identifierFallback: () => M.legend,
|
|
132
132
|
leaveOn: "inactive"
|
|
133
|
-
}),
|
|
133
|
+
}), _e = i(), { t: V } = s(), ve = e(), H = () => !!F.legend || !!P.legend;
|
|
134
134
|
process.env.NODE_ENV !== "production" && o("BbRating", ee("BbRating"));
|
|
135
|
-
let U = b(!1),
|
|
135
|
+
let U = b(!1), ye = u(() => F.persistentHint || U.value), be = a().id, W = u(() => F.name || be.value), G = a().id, K = r({
|
|
136
136
|
component: "BbRating",
|
|
137
|
-
attrs:
|
|
138
|
-
props:
|
|
137
|
+
attrs: me(),
|
|
138
|
+
props: F,
|
|
139
139
|
parts: l.parts,
|
|
140
140
|
states: l.states,
|
|
141
|
-
active: n(t(
|
|
141
|
+
active: n(t(F, () => !!F.modelValue), [
|
|
142
142
|
"errors",
|
|
143
143
|
"warnings",
|
|
144
144
|
"disabled",
|
|
145
145
|
"readonly",
|
|
146
146
|
"hasValue"
|
|
147
147
|
])
|
|
148
|
-
}), { active: q } = ie(
|
|
148
|
+
}), { active: q } = ie(T("container-el"));
|
|
149
149
|
ae(q, () => {
|
|
150
|
-
U.value = !1,
|
|
150
|
+
U.value = !1, I("inactive");
|
|
151
151
|
}), oe(q, () => {
|
|
152
|
-
U.value = !0,
|
|
152
|
+
U.value = !0, I("active");
|
|
153
153
|
});
|
|
154
|
-
let J = b(!1), Y = () => H() ? "radiogroup" : void 0, X = u(() =>
|
|
154
|
+
let J = b(!1), Y = () => H() ? "radiogroup" : void 0, X = u(() => F.clearable && !F.disabled && !F.readonly), xe = V("rating.clearHint"), Z = (e, t) => `${e}_${t}`, Se = (e) => {
|
|
155
155
|
let t = [e, X.value ? G.value : void 0].filter(Boolean);
|
|
156
156
|
return t.length ? t.join(" ") : void 0;
|
|
157
|
-
},
|
|
158
|
-
if (
|
|
159
|
-
e.target instanceof HTMLInputElement && (e.target.checked = +e.target.value ===
|
|
157
|
+
}, Ce = (e) => {
|
|
158
|
+
if (F.readonly) {
|
|
159
|
+
e.target instanceof HTMLInputElement && (e.target.checked = +e.target.value === F.modelValue);
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
},
|
|
162
|
+
I("change", e), e.target instanceof HTMLInputElement && e.target.checked && I("update:modelValue", +e.target.value);
|
|
163
|
+
}, we = (e) => {
|
|
164
|
+
F.readonly && e.preventDefault(), I("click", e), !F.readonly && e.target instanceof HTMLInputElement && F.clearable && e.target.checked && +e.target.value === F.modelValue && (J.value = !0, I("update:modelValue", null));
|
|
165
|
+
}, Q = () => {
|
|
166
166
|
J.value &&= !1;
|
|
167
|
-
},
|
|
168
|
-
onBlur: (e) =>
|
|
169
|
-
onChange:
|
|
170
|
-
onClick:
|
|
167
|
+
}, Te = {
|
|
168
|
+
onBlur: (e) => I("blur", e),
|
|
169
|
+
onChange: Ce,
|
|
170
|
+
onClick: we,
|
|
171
171
|
onFocus: (e) => {
|
|
172
|
-
U.value = !0,
|
|
172
|
+
U.value = !0, I("focus", e);
|
|
173
173
|
},
|
|
174
|
-
onInput: (e) =>
|
|
174
|
+
onInput: (e) => I("input", e),
|
|
175
175
|
onKeydown: (e) => {
|
|
176
|
-
!
|
|
176
|
+
!F.readonly && F.clearable && ["Delete", "Backspace"].includes(e.key) && e.target instanceof HTMLInputElement && +e.target.value === F.modelValue && (e.preventDefault(), I("update:modelValue", null)), F.readonly && [
|
|
177
177
|
" ",
|
|
178
178
|
"Spacebar",
|
|
179
179
|
"Enter",
|
|
@@ -185,28 +185,28 @@ var O = [
|
|
|
185
185
|
"ArrowDown",
|
|
186
186
|
"Home",
|
|
187
187
|
"End"
|
|
188
|
-
].includes(e.key) && e.preventDefault(),
|
|
188
|
+
].includes(e.key) && e.preventDefault(), I("keydown", e);
|
|
189
189
|
},
|
|
190
|
-
onMousedown: (e) =>
|
|
191
|
-
onMouseup: (e) =>
|
|
190
|
+
onMousedown: (e) => I("mousedown", e),
|
|
191
|
+
onMouseup: (e) => I("mouseup", e)
|
|
192
192
|
}, $ = u(() => {
|
|
193
|
-
if (
|
|
194
|
-
return c(
|
|
193
|
+
if (F.size != null) try {
|
|
194
|
+
return c(F.size, _e.iconDefaultSizes);
|
|
195
195
|
} catch {
|
|
196
|
-
|
|
196
|
+
ve.warn(`Invalid size: "${F.size}" in BbRating. Falling back to the default star size.`);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
200
|
-
let t = e ===
|
|
199
|
+
}), Ee = u(() => Array.from({ length: F.stars }, (e, t) => t + 1).map((e) => {
|
|
200
|
+
let t = e === F.modelValue, n = e <= (F.modelValue ?? 0);
|
|
201
201
|
return {
|
|
202
202
|
checked: t,
|
|
203
|
-
disabled: !!
|
|
203
|
+
disabled: !!F.disabled,
|
|
204
204
|
filled: n,
|
|
205
205
|
name: W.value,
|
|
206
206
|
size: $.value,
|
|
207
207
|
value: e
|
|
208
208
|
};
|
|
209
|
-
})),
|
|
209
|
+
})), De = u(() => $.value ? { "--star": $.value } : void 0), Oe = u(() => {
|
|
210
210
|
let e = {};
|
|
211
211
|
return $.value && (e["--size"] = $.value), e;
|
|
212
212
|
});
|
|
@@ -216,7 +216,7 @@ var O = [
|
|
|
216
216
|
compact: e.compact,
|
|
217
217
|
description: e.description,
|
|
218
218
|
disabled: e.disabled,
|
|
219
|
-
errors: C(
|
|
219
|
+
errors: C(R),
|
|
220
220
|
"has-errors": e.hasErrors,
|
|
221
221
|
"has-warnings": e.hasWarnings,
|
|
222
222
|
"hide-label": e.hideLegend,
|
|
@@ -231,32 +231,32 @@ var O = [
|
|
|
231
231
|
layout: e.layout,
|
|
232
232
|
name: W.value,
|
|
233
233
|
passthrough: C(K),
|
|
234
|
-
readonly:
|
|
234
|
+
readonly: C(B),
|
|
235
235
|
reverse: e.reverse,
|
|
236
|
-
"show-asterisk": C(
|
|
237
|
-
"show-hint":
|
|
238
|
-
style:
|
|
236
|
+
"show-asterisk": C(L),
|
|
237
|
+
"show-hint": ye.value,
|
|
238
|
+
style: De.value,
|
|
239
239
|
tag: "fieldset",
|
|
240
240
|
warnings: e.warnings
|
|
241
241
|
}, C(K).forwardAttrs), le({
|
|
242
|
-
label:
|
|
243
|
-
input:
|
|
242
|
+
label: E((t) => [x(e.$slots, "legend", v(g(t)))]),
|
|
243
|
+
input: E(({ id: t, hasErrors: n, hasWarnings: r, ariaDescribedby: i }) => [m("span", {
|
|
244
244
|
ref: "container-el",
|
|
245
245
|
class: de(["bb-rating__stars", {
|
|
246
|
-
"bb-rating__stars--has-value": C(
|
|
246
|
+
"bb-rating__stars--has-value": C(ge),
|
|
247
247
|
"bb-rating__stars--disabled": e.disabled,
|
|
248
248
|
"bb-rating__stars--errors": n,
|
|
249
249
|
"bb-rating__stars--warnings": !!r && !n,
|
|
250
|
-
"bb-rating__stars--readonly":
|
|
250
|
+
"bb-rating__stars--readonly": C(B),
|
|
251
251
|
"bb-rating__stars--forced-clear": J.value
|
|
252
252
|
}]),
|
|
253
253
|
"data-bb-no-drag": "",
|
|
254
|
-
style: fe(
|
|
255
|
-
onPointermove:
|
|
254
|
+
style: fe(Oe.value),
|
|
255
|
+
onPointermove: Q
|
|
256
256
|
}, [m("span", {
|
|
257
257
|
"aria-labelledby": H() ? `${t}__label` : void 0,
|
|
258
|
-
"aria-readonly": Y() &&
|
|
259
|
-
"aria-required": Y() ? C(
|
|
258
|
+
"aria-readonly": Y() && C(B) ? !0 : void 0,
|
|
259
|
+
"aria-required": Y() ? C(he) : void 0,
|
|
260
260
|
class: "bb-rating__options",
|
|
261
261
|
role: Y()
|
|
262
262
|
}, [
|
|
@@ -265,34 +265,34 @@ var O = [
|
|
|
265
265
|
key: 0,
|
|
266
266
|
id: C(G),
|
|
267
267
|
hidden: ""
|
|
268
|
-
}, S(C(
|
|
269
|
-
(y(!0), p(ce, null, pe(
|
|
268
|
+
}, S(C(xe)), 9, O)) : f("", !0),
|
|
269
|
+
(y(!0), p(ce, null, pe(Ee.value, (n, r) => (y(), p("label", _({
|
|
270
270
|
key: n.value,
|
|
271
271
|
class: ["bb-rating__item", {
|
|
272
272
|
"bb-rating__item--filled": n.filled,
|
|
273
273
|
"bb-rating__item--empty": !n.filled,
|
|
274
274
|
"bb-rating__item--disabled": n.disabled,
|
|
275
|
-
"bb-rating__item--readonly":
|
|
275
|
+
"bb-rating__item--readonly": C(B)
|
|
276
276
|
}],
|
|
277
277
|
ref_for: !0
|
|
278
278
|
}, C(K).part("item", {
|
|
279
279
|
selected: n.filled,
|
|
280
280
|
disabled: n.disabled || void 0
|
|
281
281
|
})), [
|
|
282
|
-
m("span",
|
|
282
|
+
m("span", k, S(n.value == 1 ? C(V)("rating.singleStar", n.value, C(F).stars).value : C(V)("rating.multipleStars", n.value, C(F).stars).value), 1),
|
|
283
283
|
m("input", _({
|
|
284
284
|
id: Z(t, n.value),
|
|
285
|
-
"aria-describedby":
|
|
285
|
+
"aria-describedby": Se(i),
|
|
286
286
|
autofocus: e.autofocus && !r,
|
|
287
287
|
checked: n.checked,
|
|
288
288
|
class: "bb-sr-only",
|
|
289
289
|
disabled: n.disabled,
|
|
290
290
|
name: n.name,
|
|
291
|
-
required:
|
|
291
|
+
required: C(B) ? void 0 : C(z) || void 0,
|
|
292
292
|
type: "radio",
|
|
293
293
|
value: n.value,
|
|
294
294
|
ref_for: !0
|
|
295
|
-
},
|
|
295
|
+
}, Te), null, 16, A),
|
|
296
296
|
x(e.$slots, "icon", {
|
|
297
297
|
id: Z(t, n.value),
|
|
298
298
|
checked: n.filled,
|
|
@@ -305,11 +305,11 @@ var O = [
|
|
|
305
305
|
}, null, 8, ["icon"])])
|
|
306
306
|
], 16))), 128)),
|
|
307
307
|
x(e.$slots, "append")
|
|
308
|
-
], 8,
|
|
308
|
+
], 8, D)], 38)]),
|
|
309
309
|
_: 2
|
|
310
310
|
}, [e.$slots.description ? {
|
|
311
311
|
name: "description",
|
|
312
|
-
fn:
|
|
312
|
+
fn: E((t) => [x(e.$slots, "description", v(g(t)))]),
|
|
313
313
|
key: "0"
|
|
314
314
|
} : void 0]), 1040, [
|
|
315
315
|
"id",
|
|
@@ -340,4 +340,4 @@ var O = [
|
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
342
|
//#endregion
|
|
343
|
-
export {
|
|
343
|
+
export { j as default };
|