bitboss-ui 3.0.0-beta.47 → 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 +167 -14
- package/dist/ai/BbAccordion.md +1 -1
- package/dist/ai/BbAvatar.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +65 -65
- package/dist/ai/BbButton.md +28 -8
- package/dist/ai/BbCheckbox.md +0 -2
- package/dist/ai/BbCheckboxGroup.md +13 -20
- package/dist/ai/BbCollapsible.md +1 -1
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +8 -0
- package/dist/ai/BbConfirmPortal.md +1 -1
- 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 +19 -7
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +88 -21
- package/dist/ai/BbPopover.md +47 -40
- package/dist/ai/BbPopoverPortal.md +1 -1
- 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 +107 -106
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +1 -1
- package/dist/ai/BbTabsRoot.md +3 -3
- package/dist/ai/BbTooltip.md +29 -13
- package/dist/ai/BbTree.md +14 -11
- package/dist/ai/CommonPopover.md +1 -1
- package/dist/ai/changelog.json +297 -6
- package/dist/ai/components.json +50 -45
- 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 +45 -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 +143 -28
- package/dist/ai/guides/migration/v3-beta-css-classes.md +29 -27
- 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 +4 -4
- 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/BbAccordion.json +1 -1
- 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 +2 -1
- package/dist/ai/manifest/components/BbButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCollapsible.json +1 -1
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirmPortal.json +5 -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/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +2 -2
- 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 +2 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +2 -2
- 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/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbTabs.json +8 -7
- 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 +6 -5
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.json +2 -2
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +5 -0
- package/dist/ai/manifest/types.advanced.json +10 -9
- package/dist/ai/manifest/types.api.json +8 -5
- package/dist/ai/manifest/types.wrapper.json +1 -0
- 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 +14 -10
- package/dist/ai/source/BbBadgeButton.md +17 -12
- 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 +84 -38
- 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/BbCollapsible.md +2 -1
- package/dist/ai/source/BbColorInput.md +10 -9
- package/dist/ai/source/BbColorPalette.md +2 -1
- package/dist/ai/source/BbConfirm.md +18 -1
- package/dist/ai/source/BbConfirmPortal.md +20 -6
- 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 +231 -158
- package/dist/ai/source/BbDropdownButton.md +19 -12
- package/dist/ai/source/BbDropdownGroup.md +127 -93
- package/dist/ai/source/BbForm.md +25 -1
- package/dist/ai/source/BbHoverCard.md +30 -3
- package/dist/ai/source/BbHoverCardPortal.md +18 -3
- 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 +185 -12
- package/dist/ai/source/BbPopoverPortal.md +30 -3
- 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 +30 -24
- package/dist/ai/source/BbTabsList.md +29 -23
- package/dist/ai/source/BbTabsPanels.md +29 -23
- package/dist/ai/source/BbTabsRoot.md +28 -22
- 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 +88 -11
- 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 +8 -1
- 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 +88 -70
- package/dist/components/BbButton/toggleRoving.d.ts +6 -0
- package/dist/components/BbButton/toggleRoving.js +45 -0
- package/dist/components/BbButton/types.d.ts +12 -4
- package/dist/components/BbButton/types.js +5 -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/BbCollapsible/types.d.ts +2 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/BbColorPalette/types.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -5
- package/dist/components/BbConfirm/types.d.ts +15 -0
- 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 +120 -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/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +145 -142
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -2
- package/dist/components/BbHoverCard/types.d.ts +14 -1
- 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 -162
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -2
- package/dist/components/BbPopover/types.d.ts +26 -1
- 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 +28 -22
- 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 +99 -86
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
- package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
- package/dist/components/BbTooltip/types.d.ts +10 -3
- 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/CommonPopover/types.d.ts +2 -1
- 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/directives/directivePortal.d.ts +13 -7
- package/dist/directives/directivePortal.js +1 -4
- 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 +4 -4
- package/dist/index.js +4 -4
- package/dist/llms-full.txt +1914 -1714
- package/dist/llms-medium.txt +76 -46
- package/dist/llms.txt +7 -7
- package/dist/locale-blueprint.json +16 -13
- package/dist/styles.css +2 -2
- package/dist/types/passthrough.d.ts +1 -1
- package/dist/types/ptComponentMap.d.ts +2 -2
- 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 +17 -4
- package/scripts/lib/eslint-plugin.d.ts +9 -1
- package/scripts/lib/eslint-plugin.mjs +256 -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/portal-names.mjs +458 -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/unimported-components.mjs +5 -2
- package/scripts/lib/validate-bb-markup.mjs +123 -56
- package/dist/i18n/index.js +0 -27
|
@@ -3,17 +3,19 @@ import { TEXT_CONTROL_NATIVE_ATTRS as t, formControlPtActive as n, usePassthroug
|
|
|
3
3
|
import { useConfig as i } from "../../composables/useConfig.js";
|
|
4
4
|
import { removedPropsFor as a } from "../../deprecation/removedProps.js";
|
|
5
5
|
import { warnRemovedAttrs as o } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import l from "
|
|
9
|
-
import
|
|
10
|
-
import te from "
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { intlLocaleOf as s } from "../BbCalendar/useDayjsLocale.js";
|
|
7
|
+
import { isNotNil as c } from "../../utilities/functions/isNotNil.js";
|
|
8
|
+
import { clamp as l } from "../../utilities/functions/clamp.js";
|
|
9
|
+
import ee from "../CommonField/CommonField.vue.js";
|
|
10
|
+
import { useFormBinding as te } from "../../composables/useFormBinding.js";
|
|
11
|
+
import ne from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
12
|
+
import { clampPrecision as re } from "../../utilities/functions/clampPrecision.js";
|
|
13
|
+
import { vSsrValue as ie } from "../../utilities/misc/ssrValue.js";
|
|
14
|
+
import { PLAIN_SYMBOLS as ae, affixOf as oe, applyEdit as se, currencyDigitsOf as ce, displayIndexOf as le, formatAffixed as ue, isShellOnly as de, numberSymbolsOf as fe, rawAtRest as u, rawIndexOf as d, rawOfNumber as pe, readText as me, snapOffset as he, spokenAffixed as ge, stripAffix as _e, valueOfRaw as f, withPaddedMark as ve, writeStrategy as ye } from "./numberDisplay.js";
|
|
15
|
+
import { BB_NUMBER_INPUT_PT as be } from "./types.js";
|
|
16
|
+
import { computed as p, createBlock as xe, createCommentVNode as Se, createElementBlock as Ce, createElementVNode as we, createSlots as Te, createVNode as Ee, defineComponent as De, guardReactiveProps as Oe, mergeProps as m, normalizeProps as ke, onBeforeUnmount as Ae, onMounted as je, openBlock as Me, ref as h, renderSlot as g, unref as _, useAttrs as Ne, watch as Pe, withCtx as v, withDirectives as Fe, withModifiers as Ie } from "vue";
|
|
15
17
|
//#region src/components/BbNumberInput/BbNumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
18
|
+
var Le = [
|
|
17
19
|
"id",
|
|
18
20
|
"aria-describedby",
|
|
19
21
|
"aria-disabled",
|
|
@@ -23,6 +25,7 @@ var oe = [
|
|
|
23
25
|
"aria-valuemax",
|
|
24
26
|
"aria-valuemin",
|
|
25
27
|
"aria-valuenow",
|
|
28
|
+
"aria-valuetext",
|
|
26
29
|
"autocomplete",
|
|
27
30
|
"autofocus",
|
|
28
31
|
"disabled",
|
|
@@ -31,7 +34,12 @@ var oe = [
|
|
|
31
34
|
"readonly",
|
|
32
35
|
"required",
|
|
33
36
|
"aria-required"
|
|
34
|
-
],
|
|
37
|
+
], Re = [
|
|
38
|
+
"disabled",
|
|
39
|
+
"form",
|
|
40
|
+
"name",
|
|
41
|
+
"value"
|
|
42
|
+
], ze = /*@__PURE__*/ De({
|
|
35
43
|
inheritAttrs: !1,
|
|
36
44
|
__name: "BbNumberInput",
|
|
37
45
|
props: {
|
|
@@ -125,6 +133,7 @@ var oe = [
|
|
|
125
133
|
autofocus: {},
|
|
126
134
|
clearable: { type: Boolean },
|
|
127
135
|
compact: { type: Boolean },
|
|
136
|
+
currency: {},
|
|
128
137
|
variant: {},
|
|
129
138
|
description: {},
|
|
130
139
|
layout: {},
|
|
@@ -143,7 +152,9 @@ var oe = [
|
|
|
143
152
|
labelMode: {},
|
|
144
153
|
loading: { type: Boolean },
|
|
145
154
|
max: { default: 2 ** 53 - 1 },
|
|
146
|
-
maxPrecision: {
|
|
155
|
+
maxPrecision: {},
|
|
156
|
+
minPrecision: {},
|
|
157
|
+
disableFormatting: { type: Boolean },
|
|
147
158
|
min: { default: -(2 ** 53 - 1) },
|
|
148
159
|
modelValue: {},
|
|
149
160
|
name: {},
|
|
@@ -154,6 +165,7 @@ var oe = [
|
|
|
154
165
|
required: { type: Boolean },
|
|
155
166
|
reverse: { type: Boolean },
|
|
156
167
|
step: { default: 1 },
|
|
168
|
+
unit: {},
|
|
157
169
|
validationLabel: {},
|
|
158
170
|
rules: {},
|
|
159
171
|
validationMode: {},
|
|
@@ -176,58 +188,323 @@ var oe = [
|
|
|
176
188
|
"paste",
|
|
177
189
|
"update:modelValue"
|
|
178
190
|
],
|
|
179
|
-
setup(
|
|
180
|
-
let
|
|
191
|
+
setup(De, { emit: ze }) {
|
|
192
|
+
let Be = De, { props: y, emit: b, showAsterisk: Ve, errors: He, required: Ue, ariaRequired: We, model: Ge, readonly: x } = te(Be, ze, {
|
|
181
193
|
componentName: "BbNumberInput",
|
|
182
|
-
identifierFallback: () =>
|
|
194
|
+
identifierFallback: () => Be.label,
|
|
183
195
|
emptyValue: () => null,
|
|
184
196
|
leaveOn: "blur"
|
|
185
197
|
});
|
|
186
198
|
process.env.NODE_ENV !== "production" && o("BbNumberInput", a("BbNumberInput"));
|
|
187
|
-
let
|
|
199
|
+
let S = i(), C = h(!1), Ke = p(() => y.persistentHint || C.value), w = p(() => c(y.modelValue)), qe = p(() => !!y.clearable && w.value), Je = p(() => y.labelMode ?? S.defaultInputLabelMode), T = r({
|
|
188
200
|
component: "BbNumberInput",
|
|
189
|
-
attrs:
|
|
201
|
+
attrs: Ne(),
|
|
190
202
|
controlAttrs: t,
|
|
191
|
-
props:
|
|
192
|
-
parts:
|
|
193
|
-
states:
|
|
194
|
-
active: n(
|
|
195
|
-
}),
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
203
|
+
props: y,
|
|
204
|
+
parts: be.parts,
|
|
205
|
+
states: be.states,
|
|
206
|
+
active: n(y, () => w.value)
|
|
207
|
+
}), E = h(null), D = p(() => y.disableFormatting ? null : oe(s(S.locale), y.currency, y.unit)), O = p(() => D.value?.kind === "currency" ? ce(D.value.code, D.value.tag) : null), k = p(() => y.maxPrecision ?? (O.value ? Math.max(O.value.max, y.minPrecision ?? 0) : 8)), A = p(() => y.minPrecision ?? O.value?.min ?? 0), j = p(() => !!y.disableFormatting && !(A.value > 0)), M = p(() => y.disableFormatting ? ae : fe(s(S.locale), D.value?.kind === "currency" ? D.value.code : void 0)), N = p(() => Math.max(0, Math.min(A.value, k.value))), Ye = () => ({
|
|
208
|
+
maxPrecision: k.value,
|
|
209
|
+
minPrecision: A.value,
|
|
210
|
+
max: y.max,
|
|
211
|
+
localeKey: M.value.decimal === "," ? "," : "."
|
|
212
|
+
}), P = (e) => ue(e, M.value, { minPrecision: N.value }, D.value), F = (e) => me(_e(e, D.value), M.value), I = {
|
|
213
|
+
raw: "",
|
|
214
|
+
decChar: "",
|
|
215
|
+
groupChar: ""
|
|
216
|
+
}, L = {
|
|
217
|
+
text: "",
|
|
218
|
+
positions: []
|
|
219
|
+
}, R = "", z = !1, B = !1, V = !1, H = (e) => {
|
|
220
|
+
if (e == null || e === "") return null;
|
|
221
|
+
let t = Number(e);
|
|
222
|
+
return Number.isFinite(t) ? t : null;
|
|
223
|
+
}, U = h(H(y.modelValue)), Xe = p(() => u(U.value, k.value)), Ze = (e) => P(u(e, k.value)).text, Qe = h(!1), $e = p(() => {
|
|
224
|
+
if (!Qe.value || y.disableFormatting || C.value || e(y.modelValue)) return;
|
|
225
|
+
let t = H(y.modelValue);
|
|
226
|
+
return D.value && t !== null ? ge(u(t, k.value), N.value, D.value) : Ze(t);
|
|
227
|
+
}), W = (e) => {
|
|
228
|
+
I = {
|
|
229
|
+
raw: ve(e, N.value),
|
|
230
|
+
decChar: "",
|
|
231
|
+
groupChar: ""
|
|
232
|
+
};
|
|
233
|
+
}, G = () => !!E.value && E.value.ownerDocument.activeElement === E.value, K = (e, t = !1) => {
|
|
234
|
+
let n = E.value;
|
|
235
|
+
if (!n) return;
|
|
236
|
+
let r = L.shell;
|
|
237
|
+
L = P(I.raw);
|
|
238
|
+
let i = L.text;
|
|
239
|
+
if (n.value !== i && (t && G() && et(n, i, r !== L.shell), n.value !== i && (n.value = i)), R = i, e !== void 0 && G()) {
|
|
240
|
+
let t = le(L, e);
|
|
241
|
+
n.setSelectionRange(t, t);
|
|
242
|
+
}
|
|
243
|
+
}, et = (e, t, n) => {
|
|
244
|
+
let r = e.value, i = 0;
|
|
245
|
+
for (; !n && i < r.length && i < t.length && r[i] === t[i];) i++;
|
|
246
|
+
let a = 0;
|
|
247
|
+
if (ye.span === "minimal" && !n) for (; a < r.length - i && a < t.length - i && r[r.length - 1 - a] === t[t.length - 1 - a];) a++;
|
|
248
|
+
let o = t.slice(i, t.length - a);
|
|
249
|
+
z = !0;
|
|
250
|
+
try {
|
|
251
|
+
e.setSelectionRange(i, r.length - a), o ? document.execCommand("insertText", !1, o) : document.execCommand("delete");
|
|
252
|
+
} catch {} finally {
|
|
253
|
+
z = !1;
|
|
254
|
+
}
|
|
255
|
+
}, tt = () => {
|
|
256
|
+
let e = f(I.raw);
|
|
257
|
+
e !== void 0 && (U.value = e, b("update:modelValue", e));
|
|
258
|
+
}, q = (e, t, n) => {
|
|
259
|
+
let r = se(I, e, Ye());
|
|
260
|
+
if (r.rejected) {
|
|
261
|
+
let e = E.value, t = !!e && e.value === L.text && e.selectionStart === e.selectionEnd && d(L, e.selectionStart ?? 0) === r.caret;
|
|
262
|
+
I = r, K(t ? void 0 : r.caret);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
I = r, B = !1, K(r.caret, n), B || b("input", t), tt();
|
|
266
|
+
}, nt = (e) => [d(L, e.selectionStart ?? e.value.length), d(L, e.selectionEnd ?? e.value.length)], rt = {
|
|
267
|
+
deleteContentBackward: "deleteBackward",
|
|
268
|
+
deleteContent: "deleteBackward",
|
|
269
|
+
deleteByCut: "deleteBackward",
|
|
270
|
+
deleteByDrag: "deleteBackward",
|
|
271
|
+
deleteContentForward: "deleteForward",
|
|
272
|
+
deleteWordBackward: "deleteToStart",
|
|
273
|
+
deleteSoftLineBackward: "deleteToStart",
|
|
274
|
+
deleteHardLineBackward: "deleteToStart",
|
|
275
|
+
deleteWordForward: "deleteToEnd",
|
|
276
|
+
deleteSoftLineForward: "deleteToEnd",
|
|
277
|
+
deleteHardLineForward: "deleteToEnd"
|
|
278
|
+
}, it = (e) => e.data ?? (e.dataTransfer ? e.dataTransfer.getData("text/plain") : null), at = (e, t, n) => [...e].length > 1 ? {
|
|
279
|
+
type: "paste",
|
|
280
|
+
start: t,
|
|
281
|
+
end: n,
|
|
282
|
+
raw: F(e)
|
|
283
|
+
} : e ? {
|
|
284
|
+
type: "insert",
|
|
285
|
+
start: t,
|
|
286
|
+
end: n,
|
|
287
|
+
text: e
|
|
288
|
+
} : {
|
|
289
|
+
type: "deleteBackward",
|
|
290
|
+
start: t,
|
|
291
|
+
end: n
|
|
292
|
+
}, ot = (e) => {
|
|
293
|
+
let t = E.value;
|
|
294
|
+
if (j.value || z || !t || V || e.isComposing || !e.cancelable || e.inputType === "insertText" && !e.data) return;
|
|
295
|
+
let n = e.inputType, [r, i] = nt(t), a;
|
|
296
|
+
if (n === "insertText") a = {
|
|
297
|
+
type: "insert",
|
|
298
|
+
start: r,
|
|
299
|
+
end: i,
|
|
300
|
+
text: e.data ?? ""
|
|
301
|
+
};
|
|
302
|
+
else if (n === "insertReplacementText") {
|
|
303
|
+
let t = it(e);
|
|
304
|
+
if (t === null || !t && r === i) return;
|
|
305
|
+
a = at(t, r, i);
|
|
306
|
+
} else if (n === "insertFromPaste" || n === "insertFromDrop") {
|
|
307
|
+
let t = e.dataTransfer?.getData("text/plain") ?? e.data ?? "";
|
|
308
|
+
a = {
|
|
309
|
+
type: "paste",
|
|
310
|
+
start: r,
|
|
311
|
+
end: i,
|
|
312
|
+
raw: F(t)
|
|
313
|
+
};
|
|
314
|
+
} else if (rt[n]) {
|
|
315
|
+
let o = t.selectionStart ?? 0, s = t.selectionEnd ?? 0;
|
|
316
|
+
if (de(L, o, s)) {
|
|
317
|
+
e.preventDefault();
|
|
318
|
+
let n = he(L, s <= L.hole[0] ? L.hole[0] : L.hole[1]);
|
|
319
|
+
t.setSelectionRange(n, n);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
a = {
|
|
323
|
+
type: rt[n],
|
|
324
|
+
start: r,
|
|
325
|
+
end: i
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
a && (e.preventDefault(), q(a, e, !0));
|
|
329
|
+
}, st = (e) => {
|
|
330
|
+
let t = E.value;
|
|
331
|
+
if (j.value || !t || !e.clipboardData || x.value || y.disabled) return;
|
|
332
|
+
let [n, r] = nt(t), i = e.clipboardData.getData("text/plain");
|
|
333
|
+
e.preventDefault(), q({
|
|
334
|
+
type: "paste",
|
|
335
|
+
start: n,
|
|
336
|
+
end: r,
|
|
337
|
+
raw: F(i)
|
|
338
|
+
}, e, !0);
|
|
339
|
+
}, ct = !1, lt = (e, t) => {
|
|
340
|
+
let n = e.ownerDocument.caretPositionFromPoint?.(t.clientX, t.clientY);
|
|
341
|
+
return n?.offsetNode === e ? n.offset : e.value.length;
|
|
342
|
+
}, ut = (e) => {
|
|
343
|
+
let t = E.value;
|
|
344
|
+
if (j.value || !t || !e.dataTransfer || ct || x.value || y.disabled) return;
|
|
345
|
+
let n = e.dataTransfer.getData("text/plain");
|
|
346
|
+
e.preventDefault();
|
|
347
|
+
let r = d(L, lt(t, e));
|
|
348
|
+
t.focus(), q({
|
|
349
|
+
type: "paste",
|
|
350
|
+
start: r,
|
|
351
|
+
end: r,
|
|
352
|
+
raw: F(n)
|
|
353
|
+
}, e, !0);
|
|
354
|
+
}, dt = () => {
|
|
355
|
+
let e = E.value;
|
|
356
|
+
if (!e) return;
|
|
357
|
+
let t = se({
|
|
358
|
+
raw: "",
|
|
359
|
+
decChar: "",
|
|
360
|
+
groupChar: ""
|
|
361
|
+
}, {
|
|
362
|
+
type: "paste",
|
|
363
|
+
start: 0,
|
|
364
|
+
end: 0,
|
|
365
|
+
raw: F(e.value)
|
|
366
|
+
}, Ye());
|
|
367
|
+
if (t.rejected) {
|
|
368
|
+
K(G() ? I.raw.length : void 0);
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (W(t.raw), L = P(I.raw), L.text === e.value) {
|
|
372
|
+
R = e.value;
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
K(G() ? I.raw.length : void 0);
|
|
376
|
+
}, ft = (e) => {
|
|
377
|
+
let t = E.value;
|
|
378
|
+
if (!t) return;
|
|
379
|
+
let n = R, r = t.value;
|
|
380
|
+
if (n === r) return;
|
|
381
|
+
if (e.inputType === "insertReplacementText") {
|
|
382
|
+
mt(e, n, r);
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
let i = t.selectionStart ?? r.length, a = 0;
|
|
386
|
+
for (; a < n.length && a < r.length - i && n[n.length - 1 - a] === r[r.length - 1 - a];) a++;
|
|
387
|
+
let o = 0;
|
|
388
|
+
for (; o < n.length - a && o < r.length - a && o < i && n[o] === r[o];) o++;
|
|
389
|
+
let s = r.slice(o, r.length - a), c = d(L, o), l = d(L, n.length - a);
|
|
390
|
+
if (!s && de(L, o, n.length - a)) {
|
|
391
|
+
let e = d(L, o);
|
|
392
|
+
K(e);
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
let ee = /Forward$/.test(e.inputType ?? "");
|
|
396
|
+
q(s ? {
|
|
397
|
+
type: "insert",
|
|
398
|
+
start: c,
|
|
399
|
+
end: l,
|
|
400
|
+
text: s
|
|
401
|
+
} : {
|
|
402
|
+
type: ee ? "deleteForward" : "deleteBackward",
|
|
403
|
+
start: c,
|
|
404
|
+
end: l
|
|
405
|
+
}, e, !1);
|
|
406
|
+
}, pt = (e, t, n, r) => {
|
|
407
|
+
let i = e.length - (t.length - n.length);
|
|
408
|
+
if (i < 0) return null;
|
|
409
|
+
let a = null;
|
|
410
|
+
for (let o = 0; o + n.length <= t.length && e.slice(0, o) === t.slice(0, o); o++) {
|
|
411
|
+
if (t.slice(o, o + n.length) !== n || e.slice(o + i) !== t.slice(o + n.length)) continue;
|
|
412
|
+
let s = Math.abs(o + n.length - r);
|
|
413
|
+
(a === null || s < Math.abs(a + n.length - r)) && (a = o);
|
|
414
|
+
}
|
|
415
|
+
return a === null ? null : [a, a + i];
|
|
416
|
+
}, mt = (e, t, n) => {
|
|
417
|
+
let r = E.value, i = it(e), a = i === null ? null : pt(t, n, i, r.selectionStart ?? n.length), o = i !== null && a ? at(i, d(L, a[0]), d(L, a[1])) : {
|
|
418
|
+
type: "paste",
|
|
419
|
+
start: 0,
|
|
420
|
+
end: I.raw.length,
|
|
421
|
+
raw: F(n)
|
|
422
|
+
};
|
|
423
|
+
q(o, e, !1);
|
|
424
|
+
}, ht = /* @__PURE__ */ new Set([
|
|
425
|
+
"historyUndo",
|
|
426
|
+
"historyRedo",
|
|
427
|
+
""
|
|
428
|
+
]), gt = (e) => {
|
|
429
|
+
if (z) {
|
|
430
|
+
B = !0, b("input", e);
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
if (V) return;
|
|
434
|
+
let t = e.inputType ?? "";
|
|
435
|
+
if (ht.has(t) || !(e instanceof InputEvent)) {
|
|
436
|
+
dt(), b("input", e), tt();
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
ft(e);
|
|
440
|
+
}, _t = () => {
|
|
441
|
+
j.value || (V = !0);
|
|
442
|
+
}, vt = (e) => {
|
|
443
|
+
j.value || !V || (V = !1, ft(e));
|
|
444
|
+
}, J = h(null), Y = () => {
|
|
445
|
+
j.value || !E.value || E.value.value !== R && (dt(), tt(), J.value && (J.value.value = Xe.value));
|
|
446
|
+
}, yt = (e = !1) => {
|
|
447
|
+
j.value || (W(u(U.value, k.value)), K(e ? I.raw.length : void 0));
|
|
448
|
+
}, bt = (e) => {
|
|
449
|
+
e.persisted && Y();
|
|
450
|
+
}, xt = null, St = (e) => {
|
|
451
|
+
let t = (J.value ?? E.value)?.form;
|
|
452
|
+
t && e.target === t && Y();
|
|
453
|
+
}, Ct = !1, wt = () => {
|
|
454
|
+
let e = E.value;
|
|
455
|
+
if (!e || !L.hole || z || V || Ct || !G() || e.value !== L.text) return;
|
|
456
|
+
let t = e.selectionStart ?? 0;
|
|
457
|
+
if (t !== e.selectionEnd) return;
|
|
458
|
+
let n = he(L, t);
|
|
459
|
+
n !== t && e.setSelectionRange(n, n);
|
|
460
|
+
}, X = () => {
|
|
461
|
+
Ct = !1, window.removeEventListener("pointerup", X), window.removeEventListener("pointercancel", X), wt();
|
|
462
|
+
}, Tt = () => {
|
|
463
|
+
L.hole && (Ct = !0, window.addEventListener("pointerup", X), window.addEventListener("pointercancel", X));
|
|
464
|
+
}, Et = (e, t = !0) => l(Number(re(e.toString(), k.value)), t ? y.min : -Infinity, y.max), Dt = () => {
|
|
465
|
+
if (!j.value) {
|
|
466
|
+
Y();
|
|
467
|
+
let e = f(I.raw);
|
|
468
|
+
if (typeof e != "number" || e >= y.min) return;
|
|
469
|
+
W(pe(y.min, k.value)), U.value = y.min, K(G() ? I.raw.length : void 0), b("update:modelValue", y.min);
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (!E.value?.value) return;
|
|
473
|
+
let e = Number($(E.value.value));
|
|
474
|
+
!Number.isFinite(e) || e >= y.min || (E.value.value = y.min.toString(), b("update:modelValue", y.min));
|
|
475
|
+
}, Ot = (e) => {
|
|
476
|
+
let t = Number(y.modelValue || 0);
|
|
477
|
+
return Et(t + e);
|
|
478
|
+
}, Z = () => {
|
|
479
|
+
if (y.disabled || y.readonly) return;
|
|
480
|
+
let e = Ot(y.step * -1);
|
|
481
|
+
b("decrease", e), b("update:modelValue", e);
|
|
482
|
+
}, Q = () => {
|
|
483
|
+
if (y.disabled || y.readonly) return;
|
|
484
|
+
let e = Ot(y.step);
|
|
485
|
+
b("increase", e), b("update:modelValue", e);
|
|
486
|
+
}, kt = (e) => {
|
|
487
|
+
if (!j.value) return gt(e);
|
|
488
|
+
if (E.value && e.target instanceof HTMLInputElement) {
|
|
212
489
|
let t = e.target.value, n = e.target.selectionStart, r = e.target.selectionEnd;
|
|
213
|
-
|
|
490
|
+
b("input", e);
|
|
214
491
|
let i = t;
|
|
215
|
-
i =
|
|
492
|
+
i = Pt(i), i = jt(i), i = Mt(i), i = Nt(i), It(i) && (i = Ft(i));
|
|
216
493
|
let a = null;
|
|
217
494
|
if (i) {
|
|
218
|
-
let e =
|
|
219
|
-
Number.isFinite(t) && (a =
|
|
495
|
+
let e = $(i), t = Number(e);
|
|
496
|
+
Number.isFinite(t) && (a = Et(t, !1));
|
|
220
497
|
}
|
|
221
|
-
|
|
222
|
-
let o =
|
|
223
|
-
if (
|
|
498
|
+
b("update:modelValue", a);
|
|
499
|
+
let o = re(i, k.value);
|
|
500
|
+
if (E.value.value !== o && (E.value.value = o, n !== null && r !== null)) {
|
|
224
501
|
let e = o.length - t.length, i = Math.max(0, n + e), a = Math.max(0, r + e);
|
|
225
|
-
|
|
502
|
+
E.value.setSelectionRange(i, a);
|
|
226
503
|
}
|
|
227
504
|
}
|
|
228
|
-
},
|
|
229
|
-
e.key === "ArrowUp" ? (e.preventDefault(),
|
|
230
|
-
},
|
|
505
|
+
}, At = (e) => {
|
|
506
|
+
e.key === "ArrowUp" ? (e.preventDefault(), Q()) : e.key === "ArrowDown" ? (e.preventDefault(), Z()) : e.key === "Enter" && (Dt(), !e.isComposing && !V && yt(!0));
|
|
507
|
+
}, jt = (e) => {
|
|
231
508
|
let t = e.lastIndexOf(","), n = e.lastIndexOf("."), r = (t) => e.split(t).length - 1;
|
|
232
509
|
if (t !== -1 && n !== -1) {
|
|
233
510
|
let r = t > n ? t : n;
|
|
@@ -235,144 +512,185 @@ var oe = [
|
|
|
235
512
|
}
|
|
236
513
|
let i = t === -1 ? "." : ",";
|
|
237
514
|
return r(i) > 1 ? e.replaceAll(i, "") : e.replace(",", ".");
|
|
238
|
-
},
|
|
239
|
-
let t = Number(e), n =
|
|
515
|
+
}, Mt = (e) => e.length ? [...e[0] + e.slice(1).replaceAll("-", "")].reduce((e, t) => (t === "." && e.includes(".") || e.push(t), e), []).join("").replaceAll(/[^\d.-]/g, "") : "", Nt = (e) => e.startsWith(".") && e.length === 1 ? "0." : e.startsWith("-.") && e.length === 2 ? "-0." : e, Pt = (e) => e.slice(0, 20), Ft = (e) => {
|
|
516
|
+
let t = Number(e), n = l(t, -Infinity, y.max), r = n.toString();
|
|
240
517
|
return n === t && r.includes("e") ? e : r;
|
|
241
|
-
},
|
|
518
|
+
}, It = (e) => !(e.length === 0 || e.endsWith(".") || e.endsWith("-") || e.endsWith("-0") || /\.\d*0+$/.test(e)), $ = (e) => {
|
|
242
519
|
let [t, n] = e.split(".");
|
|
243
|
-
return t ||= "0", n ? (n = n?.slice(0,
|
|
244
|
-
},
|
|
520
|
+
return t ||= "0", n ? (n = n?.slice(0, k.value) || "0", `${t}.${n}`) : t;
|
|
521
|
+
}, Lt = {
|
|
522
|
+
onBeforeinput: (e) => ot(e),
|
|
245
523
|
onBlur: (e) => {
|
|
246
|
-
|
|
524
|
+
C.value = !1, Y(), Dt(), yt(), b("blur", e);
|
|
525
|
+
},
|
|
526
|
+
onChange: (e) => b("change", e),
|
|
527
|
+
onClick: (e) => b("click", e),
|
|
528
|
+
onCompositionend: (e) => {
|
|
529
|
+
vt(e), b("compositionend", e);
|
|
530
|
+
},
|
|
531
|
+
onCompositionstart: (e) => {
|
|
532
|
+
_t(), b("compositionstart", e);
|
|
247
533
|
},
|
|
248
|
-
onChange: (e) => j("change", e),
|
|
249
|
-
onClick: (e) => j("click", e),
|
|
250
|
-
onCompositionend: (e) => j("compositionend", e),
|
|
251
|
-
onCompositionstart: (e) => j("compositionstart", e),
|
|
252
534
|
onFocus: (e) => {
|
|
253
|
-
|
|
535
|
+
C.value = !0, Y(), b("focus", e);
|
|
254
536
|
},
|
|
255
537
|
onKeydown: (e) => {
|
|
256
|
-
|
|
538
|
+
At(e), b("keydown", e);
|
|
539
|
+
},
|
|
540
|
+
onKeyup: (e) => b("keyup", e),
|
|
541
|
+
onMousedown: (e) => b("mousedown", e),
|
|
542
|
+
onMouseup: (e) => b("mouseup", e),
|
|
543
|
+
onPointerdown: () => Tt(),
|
|
544
|
+
onPaste: (e) => {
|
|
545
|
+
st(e), b("paste", e);
|
|
257
546
|
},
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
if (e(
|
|
264
|
-
|
|
265
|
-
|
|
547
|
+
onDragstart: () => ct = !0,
|
|
548
|
+
onDragend: () => ct = !1,
|
|
549
|
+
onDrop: (e) => ut(e),
|
|
550
|
+
onSelectionchange: () => wt()
|
|
551
|
+
}, Rt = p(() => T.input ? m(Lt, T.input) : Lt), zt = (t) => {
|
|
552
|
+
if (e(E.value)) return;
|
|
553
|
+
if (!j.value) {
|
|
554
|
+
if (U.value = H(t), G() && f(I.raw) === U.value) return;
|
|
555
|
+
W(u(U.value, k.value)), K(G() ? I.raw.length : void 0);
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
let n = E.value.value;
|
|
559
|
+
if (!e(t) && document.activeElement === E.value && !It(n) && n.length > 0 && Number(t) === Et(Number($(n)), !1)) return;
|
|
266
560
|
let r = t;
|
|
267
|
-
e(r) && (r = ""),
|
|
561
|
+
e(r) && (r = ""), E.value.value = r?.toString() || "";
|
|
268
562
|
};
|
|
269
|
-
|
|
270
|
-
|
|
563
|
+
Pe(() => y.modelValue, (e) => {
|
|
564
|
+
zt(e);
|
|
271
565
|
});
|
|
272
|
-
let
|
|
273
|
-
return
|
|
274
|
-
|
|
275
|
-
|
|
566
|
+
let Bt = () => j.value ? y.modelValue?.toString() || "" : u(H(y.modelValue), k.value);
|
|
567
|
+
return je(() => {
|
|
568
|
+
let e = E.value;
|
|
569
|
+
G() && (C.value = !0);
|
|
570
|
+
let t = e && !j.value && G() && e.value === Bt() ? e.selectionStart : null;
|
|
571
|
+
if (zt(y.modelValue), e && t !== null && G()) {
|
|
572
|
+
let n = le(L, Math.min(t, I.raw.length));
|
|
573
|
+
e.setSelectionRange(n, n);
|
|
574
|
+
}
|
|
575
|
+
window.addEventListener("pageshow", bt), xt = e?.ownerDocument ?? null, xt?.addEventListener("submit", St, !0), Qe.value = !0;
|
|
576
|
+
}), Ae(() => {
|
|
577
|
+
window.removeEventListener("pageshow", bt), xt?.removeEventListener("submit", St, !0), window.removeEventListener("pointerup", X), window.removeEventListener("pointercancel", X);
|
|
578
|
+
}), Pe([
|
|
579
|
+
M,
|
|
580
|
+
N,
|
|
581
|
+
k,
|
|
582
|
+
j,
|
|
583
|
+
D
|
|
584
|
+
], () => {
|
|
585
|
+
if (E.value) {
|
|
586
|
+
if (j.value) {
|
|
587
|
+
E.value.value = y.modelValue?.toString() || "";
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
G() || W(u(U.value, k.value)), K(G() ? I.raw.length : void 0);
|
|
591
|
+
}
|
|
592
|
+
}), (e, t) => (Me(), xe(ee, m({
|
|
276
593
|
id: e.id,
|
|
277
594
|
class: "bb-number-input",
|
|
278
|
-
clearable:
|
|
595
|
+
clearable: qe.value,
|
|
279
596
|
compact: e.compact,
|
|
280
597
|
description: e.description,
|
|
281
598
|
disabled: e.disabled,
|
|
282
|
-
errors:
|
|
599
|
+
errors: _(He),
|
|
283
600
|
"has-errors": e.hasErrors,
|
|
284
|
-
"has-value":
|
|
601
|
+
"has-value": w.value,
|
|
285
602
|
"has-warnings": e.hasWarnings,
|
|
286
603
|
"hide-label": e.hideLabel,
|
|
287
604
|
hint: e.hint,
|
|
288
605
|
"input-align": e.inputAlign,
|
|
289
606
|
label: e.label,
|
|
290
607
|
"label-align": e.labelAlign,
|
|
291
|
-
"label-mode":
|
|
608
|
+
"label-mode": Je.value,
|
|
292
609
|
"label-position": e.labelPosition,
|
|
293
610
|
layout: e.layout,
|
|
294
611
|
loading: e.loading,
|
|
295
612
|
name: e.name,
|
|
296
|
-
passthrough:
|
|
297
|
-
readonly:
|
|
613
|
+
passthrough: _(T),
|
|
614
|
+
readonly: _(x),
|
|
298
615
|
reverse: e.reverse,
|
|
299
|
-
"show-asterisk":
|
|
300
|
-
"show-hint":
|
|
616
|
+
"show-asterisk": _(Ve),
|
|
617
|
+
"show-hint": Ke.value,
|
|
301
618
|
warnings: e.warnings
|
|
302
|
-
},
|
|
303
|
-
label:
|
|
304
|
-
input:
|
|
305
|
-
"append:icon":
|
|
619
|
+
}, _(T).forwardAttrs), Te({
|
|
620
|
+
label: v((t) => [g(e.$slots, "label", ke(Oe(t)))]),
|
|
621
|
+
input: v(({ id: n, hasErrors: r, hasWarnings: i, ariaDescribedby: a, ariaLabelledby: o }) => [Ee(ne, {
|
|
622
|
+
"append:icon": _(y)["append:icon"],
|
|
306
623
|
clearable: e.clearable,
|
|
307
624
|
compact: e.compact,
|
|
308
625
|
disabled: e.disabled,
|
|
309
626
|
"has-errors": r,
|
|
310
|
-
"has-value":
|
|
627
|
+
"has-value": w.value,
|
|
311
628
|
"has-warnings": i,
|
|
312
629
|
loading: e.loading,
|
|
313
|
-
passthrough:
|
|
314
|
-
"prepend:icon":
|
|
315
|
-
readonly:
|
|
630
|
+
passthrough: _(T),
|
|
631
|
+
"prepend:icon": _(y)["prepend:icon"],
|
|
632
|
+
readonly: _(x),
|
|
316
633
|
"reserve-append-space": e.clearable,
|
|
317
634
|
variant: e.variant,
|
|
318
|
-
"onClick:clear": t[0] ||= (e) =>
|
|
319
|
-
},
|
|
320
|
-
"prepend:outer":
|
|
321
|
-
decrease:
|
|
322
|
-
increase:
|
|
635
|
+
"onClick:clear": t[0] ||= (e) => _(b)("update:modelValue", null)
|
|
636
|
+
}, Te({
|
|
637
|
+
"prepend:outer": v(() => [g(e.$slots, "prepend:outer", {
|
|
638
|
+
decrease: Z,
|
|
639
|
+
increase: Q
|
|
323
640
|
})]),
|
|
324
|
-
prepend:
|
|
325
|
-
decrease:
|
|
326
|
-
increase:
|
|
641
|
+
prepend: v(() => [g(e.$slots, "prepend", {
|
|
642
|
+
decrease: Z,
|
|
643
|
+
increase: Q
|
|
327
644
|
})]),
|
|
328
|
-
append:
|
|
329
|
-
decrease:
|
|
330
|
-
increase:
|
|
645
|
+
append: v(() => [g(e.$slots, "append", {
|
|
646
|
+
decrease: Z,
|
|
647
|
+
increase: Q
|
|
331
648
|
})]),
|
|
332
|
-
"append:outer":
|
|
333
|
-
decrease:
|
|
334
|
-
increase:
|
|
649
|
+
"append:outer": v(() => [g(e.$slots, "append:outer", {
|
|
650
|
+
decrease: Z,
|
|
651
|
+
increase: Q
|
|
335
652
|
})]),
|
|
336
|
-
default:
|
|
653
|
+
default: v(() => [Fe(we("input", m({
|
|
337
654
|
id: n,
|
|
338
655
|
ref_key: "input",
|
|
339
|
-
ref:
|
|
656
|
+
ref: E,
|
|
340
657
|
"aria-describedby": a,
|
|
341
658
|
"aria-disabled": e.disabled || void 0,
|
|
342
659
|
"aria-invalid": r || void 0,
|
|
343
660
|
"aria-labelledby": o,
|
|
344
|
-
"aria-readonly":
|
|
661
|
+
"aria-readonly": _(x) || void 0,
|
|
345
662
|
"aria-valuemax": e.max === 2 ** 53 - 1 ? void 0 : e.max,
|
|
346
663
|
"aria-valuemin": e.min === -(2 ** 53 - 1) ? void 0 : e.min,
|
|
347
|
-
"aria-valuenow":
|
|
664
|
+
"aria-valuenow": _(c)(_(Ge)) ? _(Ge) : void 0,
|
|
665
|
+
"aria-valuetext": $e.value,
|
|
348
666
|
autocomplete: e.autocomplete,
|
|
349
667
|
autofocus: e.autofocus,
|
|
350
668
|
class: "bb-number-input__input",
|
|
351
669
|
disabled: e.disabled,
|
|
352
670
|
inputmode: "decimal",
|
|
353
|
-
name: e.name,
|
|
671
|
+
name: e.disableFormatting ? e.name : void 0,
|
|
354
672
|
placeholder: e.placeholder,
|
|
355
|
-
readonly:
|
|
356
|
-
required:
|
|
357
|
-
"aria-required":
|
|
673
|
+
readonly: _(x),
|
|
674
|
+
required: _(Ue),
|
|
675
|
+
"aria-required": _(We),
|
|
358
676
|
role: "spinbutton",
|
|
359
677
|
size: "1",
|
|
360
678
|
type: "text",
|
|
361
|
-
onInput:
|
|
362
|
-
},
|
|
679
|
+
onInput: Ie(kt, ["stop"])
|
|
680
|
+
}, m(_(T).controlAttrs, Rt.value)), null, 16, Le), [[_(ie), Bt]])]),
|
|
363
681
|
_: 2
|
|
364
682
|
}, [e.$slots.prefix ? {
|
|
365
683
|
name: "prefix",
|
|
366
|
-
fn:
|
|
367
|
-
decrease:
|
|
368
|
-
increase:
|
|
684
|
+
fn: v(() => [g(e.$slots, "prefix", {
|
|
685
|
+
decrease: Z,
|
|
686
|
+
increase: Q
|
|
369
687
|
})]),
|
|
370
688
|
key: "0"
|
|
371
689
|
} : void 0, e.$slots.suffix ? {
|
|
372
690
|
name: "suffix",
|
|
373
|
-
fn:
|
|
374
|
-
decrease:
|
|
375
|
-
increase:
|
|
691
|
+
fn: v(() => [g(e.$slots, "suffix", {
|
|
692
|
+
decrease: Z,
|
|
693
|
+
increase: Q
|
|
376
694
|
})]),
|
|
377
695
|
key: "1"
|
|
378
696
|
} : void 0]), 1032, [
|
|
@@ -389,11 +707,20 @@ var oe = [
|
|
|
389
707
|
"readonly",
|
|
390
708
|
"reserve-append-space",
|
|
391
709
|
"variant"
|
|
392
|
-
])
|
|
710
|
+
]), !e.disableFormatting && e.name ? (Me(), Ce("input", {
|
|
711
|
+
key: 0,
|
|
712
|
+
ref_key: "posted",
|
|
713
|
+
ref: J,
|
|
714
|
+
disabled: e.disabled,
|
|
715
|
+
form: _(T).controlAttrs.form,
|
|
716
|
+
name: e.name,
|
|
717
|
+
type: "hidden",
|
|
718
|
+
value: Xe.value
|
|
719
|
+
}, null, 8, Re)) : Se("", !0)]),
|
|
393
720
|
_: 2
|
|
394
721
|
}, [e.$slots.description ? {
|
|
395
722
|
name: "description",
|
|
396
|
-
fn:
|
|
723
|
+
fn: v((t) => [g(e.$slots, "description", ke(Oe(t)))]),
|
|
397
724
|
key: "0"
|
|
398
725
|
} : void 0]), 1040, [
|
|
399
726
|
"id",
|
|
@@ -425,4 +752,4 @@ var oe = [
|
|
|
425
752
|
}
|
|
426
753
|
});
|
|
427
754
|
//#endregion
|
|
428
|
-
export {
|
|
755
|
+
export { ze as default };
|