bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.64
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +7 -3
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +55 -22
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +17 -10
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +416 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +79 -49
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +163 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +147 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +15 -9
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
- package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +5 -2
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/records-workspace.md +49 -13
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +128 -33
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +369 -37
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +543 -532
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbFormContext.d.ts +4 -3
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +4 -4
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +2300 -543
- package/dist/llms-medium.txt +71 -53
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +35 -23
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +3 -3
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { isNil as e } from "../../utilities/functions/isNil.js";
|
|
2
|
-
import { TEXT_CONTROL_NATIVE_ATTRS as t, formControlPtActive as n, usePassthrough as r } from "../../composables/usePassthrough.js";
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { removedPropsFor as
|
|
5
|
-
import { warnRemovedAttrs as
|
|
6
|
-
import { intlLocaleOf as
|
|
7
|
-
import { isNotNil as
|
|
8
|
-
import { clamp as
|
|
9
|
-
import { vAutofocus as
|
|
10
|
-
import
|
|
11
|
-
import { useFormBinding as
|
|
12
|
-
import
|
|
13
|
-
import { clampPrecision as
|
|
14
|
-
import { vSsrValue as
|
|
15
|
-
import { isIPhone as
|
|
16
|
-
import { PLAIN_SYMBOLS as
|
|
17
|
-
import { BB_NUMBER_INPUT_PT as
|
|
18
|
-
import { computed as
|
|
2
|
+
import { TEXT_CONTROL_NATIVE_ATTRS as t, formControlPtActive as n, usePassthrough as r, variantPt as i } from "../../composables/usePassthrough.js";
|
|
3
|
+
import { useConfig as a } from "../../composables/useConfig.js";
|
|
4
|
+
import { removedPropsFor as o } from "../../deprecation/removedProps.js";
|
|
5
|
+
import { warnRemovedAttrs as s } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
6
|
+
import { intlLocaleOf as c } from "../BbCalendar/useDayjsLocale.js";
|
|
7
|
+
import { isNotNil as l } from "../../utilities/functions/isNotNil.js";
|
|
8
|
+
import { clamp as ee } from "../../utilities/functions/clamp.js";
|
|
9
|
+
import { vAutofocus as te } from "../../utilities/misc/autofocus.js";
|
|
10
|
+
import ne from "../CommonField/CommonField.vue.js";
|
|
11
|
+
import { useFormBinding as re } from "../../composables/useFormBinding.js";
|
|
12
|
+
import ie from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
13
|
+
import { clampPrecision as ae } from "../../utilities/functions/clampPrecision.js";
|
|
14
|
+
import { vSsrValue as oe } from "../../utilities/misc/ssrValue.js";
|
|
15
|
+
import { isIPhone as se } from "./platform.js";
|
|
16
|
+
import { PLAIN_SYMBOLS as ce, affixOf as le, applyEdit as ue, currencyDigitsOf as de, displayIndexOf as fe, formatAffixed as pe, isShellOnly as me, numberSymbolsOf as he, rawAtRest as u, rawIndexOf as d, rawOfNumber as ge, readText as _e, snapOffset as ve, spokenAffixed as ye, stripAffix as be, valueOfRaw as xe, withPaddedMark as Se, writeStrategy as Ce } from "./numberDisplay.js";
|
|
17
|
+
import { BB_NUMBER_INPUT_PT as f } from "./types.js";
|
|
18
|
+
import { computed as p, createBlock as we, createCommentVNode as Te, createElementBlock as Ee, createElementVNode as De, createSlots as Oe, createVNode as ke, defineComponent as Ae, guardReactiveProps as je, mergeProps as m, normalizeProps as Me, onBeforeUnmount as Ne, onMounted as Pe, openBlock as Fe, ref as h, renderSlot as g, unref as _, useAttrs as Ie, watch as Le, withCtx as v, withDirectives as Re, withModifiers as ze } from "vue";
|
|
19
19
|
//#region src/components/BbNumberInput/BbNumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
20
20
|
var Be = [
|
|
21
21
|
"id",
|
|
@@ -42,7 +42,8 @@ var Be = [
|
|
|
42
42
|
"form",
|
|
43
43
|
"name",
|
|
44
44
|
"value"
|
|
45
|
-
],
|
|
45
|
+
], y = /*@__PURE__*/ Ae({
|
|
46
|
+
mixins: [i(f)],
|
|
46
47
|
inheritAttrs: !1,
|
|
47
48
|
__name: "BbNumberInput",
|
|
48
49
|
props: {
|
|
@@ -130,6 +131,42 @@ var Be = [
|
|
|
130
131
|
"pt:clear:disabled": {},
|
|
131
132
|
"pt:clear:readonly": {},
|
|
132
133
|
"pt:clear:hasValue": {},
|
|
134
|
+
"pt:root:outline": {},
|
|
135
|
+
"pt:root:secondary": {},
|
|
136
|
+
"pt:root:ghost": {},
|
|
137
|
+
"pt:label:outline": {},
|
|
138
|
+
"pt:label:secondary": {},
|
|
139
|
+
"pt:label:ghost": {},
|
|
140
|
+
"pt:description:outline": {},
|
|
141
|
+
"pt:description:secondary": {},
|
|
142
|
+
"pt:description:ghost": {},
|
|
143
|
+
"pt:message:outline": {},
|
|
144
|
+
"pt:message:secondary": {},
|
|
145
|
+
"pt:message:ghost": {},
|
|
146
|
+
"pt:hint:outline": {},
|
|
147
|
+
"pt:hint:secondary": {},
|
|
148
|
+
"pt:hint:ghost": {},
|
|
149
|
+
"pt:box:outline": {},
|
|
150
|
+
"pt:box:secondary": {},
|
|
151
|
+
"pt:box:ghost": {},
|
|
152
|
+
"pt:input:outline": {},
|
|
153
|
+
"pt:input:secondary": {},
|
|
154
|
+
"pt:input:ghost": {},
|
|
155
|
+
"pt:icon:outline": {},
|
|
156
|
+
"pt:icon:secondary": {},
|
|
157
|
+
"pt:icon:ghost": {},
|
|
158
|
+
"pt:spinner:outline": {},
|
|
159
|
+
"pt:spinner:secondary": {},
|
|
160
|
+
"pt:spinner:ghost": {},
|
|
161
|
+
"pt:prefix:outline": {},
|
|
162
|
+
"pt:prefix:secondary": {},
|
|
163
|
+
"pt:prefix:ghost": {},
|
|
164
|
+
"pt:suffix:outline": {},
|
|
165
|
+
"pt:suffix:secondary": {},
|
|
166
|
+
"pt:suffix:ghost": {},
|
|
167
|
+
"pt:clear:outline": {},
|
|
168
|
+
"pt:clear:secondary": {},
|
|
169
|
+
"pt:clear:ghost": {},
|
|
133
170
|
pt: {},
|
|
134
171
|
"append:icon": {},
|
|
135
172
|
autocomplete: { default: "off" },
|
|
@@ -191,82 +228,86 @@ var Be = [
|
|
|
191
228
|
"paste",
|
|
192
229
|
"update:modelValue"
|
|
193
230
|
],
|
|
194
|
-
setup(
|
|
195
|
-
let
|
|
231
|
+
setup(i, { emit: Ae }) {
|
|
232
|
+
let y = i, { props: b, emit: x, showAsterisk: He, errors: Ue, required: We, ariaRequired: Ge, model: Ke, readonly: S } = re(y, Ae, {
|
|
196
233
|
componentName: "BbNumberInput",
|
|
197
|
-
identifierFallback: () =>
|
|
234
|
+
identifierFallback: () => y.label,
|
|
198
235
|
emptyValue: () => null,
|
|
199
236
|
leaveOn: "blur"
|
|
200
237
|
});
|
|
201
|
-
process.env.NODE_ENV !== "production" &&
|
|
202
|
-
let
|
|
238
|
+
process.env.NODE_ENV !== "production" && s("BbNumberInput", o("BbNumberInput"));
|
|
239
|
+
let C = a(), w = h(!1), T = p(() => !!S.value || !!b.disabled), qe = p(() => b.persistentHint || w.value), E = p(() => l(b.modelValue)), Je = p(() => !!b.clearable && E.value), Ye = p(() => b.labelMode ?? C.defaultInputLabelMode), D = r({
|
|
203
240
|
component: "BbNumberInput",
|
|
204
241
|
attrs: Ie(),
|
|
205
242
|
controlAttrs: t,
|
|
206
|
-
props:
|
|
207
|
-
parts:
|
|
208
|
-
states:
|
|
209
|
-
active: n(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
243
|
+
props: b,
|
|
244
|
+
parts: f.parts,
|
|
245
|
+
states: f.states,
|
|
246
|
+
active: n(b, () => E.value),
|
|
247
|
+
variant: {
|
|
248
|
+
...f.variant,
|
|
249
|
+
current: () => b.variant ?? "outline"
|
|
250
|
+
}
|
|
251
|
+
}), O = h(null), k = p(() => b.disableFormatting ? null : le(c(C.locale), b.currency, b.unit)), A = p(() => k.value?.kind === "currency" ? de(k.value.code, k.value.tag) : null), j = p(() => b.maxPrecision ?? (A.value ? Math.max(A.value.max, b.minPrecision ?? 0) : 8)), M = p(() => b.minPrecision ?? A.value?.min ?? 0), N = p(() => !!b.disableFormatting && !(M.value > 0)), P = p(() => b.disableFormatting ? ce : he(c(C.locale), k.value?.kind === "currency" ? k.value.code : void 0)), F = p(() => Math.max(0, Math.min(M.value, j.value))), Xe = () => ({
|
|
252
|
+
maxPrecision: j.value,
|
|
253
|
+
minPrecision: M.value,
|
|
254
|
+
max: b.max,
|
|
255
|
+
localeKey: P.value.decimal === "," ? "," : "."
|
|
256
|
+
}), Ze = (e) => pe(e, P.value, { minPrecision: F.value }, k.value), I = (e) => _e(be(e, k.value), P.value), L = {
|
|
216
257
|
raw: "",
|
|
217
258
|
decChar: "",
|
|
218
259
|
groupChar: ""
|
|
219
|
-
},
|
|
260
|
+
}, R = {
|
|
220
261
|
text: "",
|
|
221
262
|
positions: []
|
|
222
|
-
},
|
|
263
|
+
}, z = "", B = !1, Qe = !1, V = !1, H = (e) => {
|
|
223
264
|
if (e == null || e === "") return null;
|
|
224
265
|
let t = Number(e);
|
|
225
266
|
return Number.isFinite(t) ? t : null;
|
|
226
|
-
}, U =
|
|
227
|
-
if (!tt.value ||
|
|
228
|
-
let t = H(
|
|
229
|
-
return
|
|
267
|
+
}, U = h(H(b.modelValue)), $e = p(() => u(U.value, j.value)), et = (e) => Ze(u(e, j.value)).text, tt = h(!1), nt = p(() => {
|
|
268
|
+
if (!tt.value || b.disableFormatting || w.value || e(b.modelValue)) return;
|
|
269
|
+
let t = H(b.modelValue);
|
|
270
|
+
return k.value && t !== null ? ye(u(t, j.value), F.value, k.value) : et(t);
|
|
230
271
|
}), W = (e) => {
|
|
231
|
-
|
|
232
|
-
raw:
|
|
272
|
+
L = {
|
|
273
|
+
raw: Se(e, F.value),
|
|
233
274
|
decChar: "",
|
|
234
275
|
groupChar: ""
|
|
235
276
|
};
|
|
236
|
-
}, G = () => !!
|
|
237
|
-
let n =
|
|
277
|
+
}, G = () => !!O.value && O.value.ownerDocument.activeElement === O.value, K = (e, t = !1) => {
|
|
278
|
+
let n = O.value;
|
|
238
279
|
if (!n) return;
|
|
239
|
-
let r =
|
|
240
|
-
|
|
241
|
-
let i =
|
|
242
|
-
if (n.value !== i && (t && G() && rt(n, i, r !==
|
|
243
|
-
let t =
|
|
280
|
+
let r = R.shell;
|
|
281
|
+
R = Ze(L.raw);
|
|
282
|
+
let i = R.text;
|
|
283
|
+
if (n.value !== i && (t && G() && rt(n, i, r !== R.shell), n.value !== i && (n.value = i)), z = i, e !== void 0 && G()) {
|
|
284
|
+
let t = fe(R, e);
|
|
244
285
|
n.setSelectionRange(t, t);
|
|
245
286
|
}
|
|
246
287
|
}, rt = (e, t, n) => {
|
|
247
288
|
let r = e.value, i = 0;
|
|
248
289
|
for (; !n && i < r.length && i < t.length && r[i] === t[i];) i++;
|
|
249
290
|
let a = 0;
|
|
250
|
-
if (
|
|
291
|
+
if (Ce.span === "minimal" && !n) for (; a < r.length - i && a < t.length - i && r[r.length - 1 - a] === t[t.length - 1 - a];) a++;
|
|
251
292
|
let o = t.slice(i, t.length - a);
|
|
252
|
-
|
|
293
|
+
B = !0;
|
|
253
294
|
try {
|
|
254
295
|
e.setSelectionRange(i, r.length - a), o ? document.execCommand("insertText", !1, o) : document.execCommand("delete");
|
|
255
296
|
} catch {} finally {
|
|
256
|
-
|
|
297
|
+
B = !1;
|
|
257
298
|
}
|
|
258
299
|
}, it = () => {
|
|
259
|
-
let e =
|
|
260
|
-
e !== void 0 && (U.value = e,
|
|
300
|
+
let e = xe(L.raw);
|
|
301
|
+
e !== void 0 && (U.value = e, x("update:modelValue", e));
|
|
261
302
|
}, q = (e, t, n) => {
|
|
262
|
-
let r =
|
|
303
|
+
let r = ue(L, e, Xe());
|
|
263
304
|
if (r.rejected) {
|
|
264
|
-
let e =
|
|
265
|
-
|
|
305
|
+
let e = O.value, t = !!e && e.value === R.text && e.selectionStart === e.selectionEnd && d(R, e.selectionStart ?? 0) === r.caret;
|
|
306
|
+
L = r, K(t ? void 0 : r.caret);
|
|
266
307
|
return;
|
|
267
308
|
}
|
|
268
|
-
|
|
269
|
-
}, at = (e) => [d(
|
|
309
|
+
L = r, Qe = !1, K(r.caret, n), Qe || x("input", t), it();
|
|
310
|
+
}, at = (e) => [d(R, e.selectionStart ?? e.value.length), d(R, e.selectionEnd ?? e.value.length)], ot = {
|
|
270
311
|
deleteContentBackward: "deleteBackward",
|
|
271
312
|
deleteContent: "deleteBackward",
|
|
272
313
|
deleteByCut: "deleteBackward",
|
|
@@ -282,7 +323,7 @@ var Be = [
|
|
|
282
323
|
type: "paste",
|
|
283
324
|
start: t,
|
|
284
325
|
end: n,
|
|
285
|
-
raw:
|
|
326
|
+
raw: I(e)
|
|
286
327
|
} : e ? {
|
|
287
328
|
type: "insert",
|
|
288
329
|
start: t,
|
|
@@ -293,9 +334,9 @@ var Be = [
|
|
|
293
334
|
start: t,
|
|
294
335
|
end: n
|
|
295
336
|
}, lt = (e) => {
|
|
296
|
-
let t =
|
|
297
|
-
if (
|
|
298
|
-
if (
|
|
337
|
+
let t = O.value;
|
|
338
|
+
if (N.value || B || !t) return;
|
|
339
|
+
if (T.value) {
|
|
299
340
|
e.cancelable && e.preventDefault();
|
|
300
341
|
return;
|
|
301
342
|
}
|
|
@@ -317,13 +358,13 @@ var Be = [
|
|
|
317
358
|
type: "paste",
|
|
318
359
|
start: r,
|
|
319
360
|
end: i,
|
|
320
|
-
raw:
|
|
361
|
+
raw: I(t)
|
|
321
362
|
};
|
|
322
363
|
} else if (ot[n]) {
|
|
323
364
|
let o = t.selectionStart ?? 0, s = t.selectionEnd ?? 0;
|
|
324
|
-
if (
|
|
365
|
+
if (me(R, o, s)) {
|
|
325
366
|
e.preventDefault();
|
|
326
|
-
let n =
|
|
367
|
+
let n = ve(R, s <= R.hole[0] ? R.hole[0] : R.hole[1]);
|
|
327
368
|
t.setSelectionRange(n, n);
|
|
328
369
|
return;
|
|
329
370
|
}
|
|
@@ -335,34 +376,34 @@ var Be = [
|
|
|
335
376
|
}
|
|
336
377
|
a && (e.preventDefault(), q(a, e, !0));
|
|
337
378
|
}, ut = (e) => {
|
|
338
|
-
let t =
|
|
339
|
-
if (
|
|
379
|
+
let t = O.value;
|
|
380
|
+
if (N.value || !t || !e.clipboardData || S.value || b.disabled) return;
|
|
340
381
|
let [n, r] = at(t), i = e.clipboardData.getData("text/plain");
|
|
341
382
|
e.preventDefault(), q({
|
|
342
383
|
type: "paste",
|
|
343
384
|
start: n,
|
|
344
385
|
end: r,
|
|
345
|
-
raw:
|
|
386
|
+
raw: I(i)
|
|
346
387
|
}, e, !0);
|
|
347
388
|
}, dt = !1, ft = (e, t) => {
|
|
348
389
|
let n = e.ownerDocument.caretPositionFromPoint?.(t.clientX, t.clientY);
|
|
349
390
|
return n?.offsetNode === e ? n.offset : e.value.length;
|
|
350
391
|
}, pt = (e) => {
|
|
351
|
-
let t =
|
|
352
|
-
if (
|
|
392
|
+
let t = O.value;
|
|
393
|
+
if (N.value || !t || !e.dataTransfer || dt || S.value || b.disabled) return;
|
|
353
394
|
let n = e.dataTransfer.getData("text/plain");
|
|
354
395
|
e.preventDefault();
|
|
355
|
-
let r = d(
|
|
396
|
+
let r = d(R, ft(t, e));
|
|
356
397
|
t.focus(), q({
|
|
357
398
|
type: "paste",
|
|
358
399
|
start: r,
|
|
359
400
|
end: r,
|
|
360
|
-
raw:
|
|
401
|
+
raw: I(n)
|
|
361
402
|
}, e, !0);
|
|
362
403
|
}, mt = () => {
|
|
363
|
-
let e =
|
|
404
|
+
let e = O.value;
|
|
364
405
|
if (!e) return;
|
|
365
|
-
let t =
|
|
406
|
+
let t = ue({
|
|
366
407
|
raw: "",
|
|
367
408
|
decChar: "",
|
|
368
409
|
groupChar: ""
|
|
@@ -370,21 +411,21 @@ var Be = [
|
|
|
370
411
|
type: "paste",
|
|
371
412
|
start: 0,
|
|
372
413
|
end: 0,
|
|
373
|
-
raw:
|
|
374
|
-
},
|
|
414
|
+
raw: I(e.value)
|
|
415
|
+
}, Xe());
|
|
375
416
|
if (t.rejected) {
|
|
376
|
-
K(G() ?
|
|
417
|
+
K(G() ? L.raw.length : void 0);
|
|
377
418
|
return;
|
|
378
419
|
}
|
|
379
|
-
if (W(t.raw),
|
|
380
|
-
|
|
420
|
+
if (W(t.raw), R = Ze(L.raw), R.text === e.value) {
|
|
421
|
+
z = e.value;
|
|
381
422
|
return;
|
|
382
423
|
}
|
|
383
|
-
K(G() ?
|
|
424
|
+
K(G() ? L.raw.length : void 0);
|
|
384
425
|
}, ht = (e) => {
|
|
385
|
-
let t =
|
|
426
|
+
let t = O.value;
|
|
386
427
|
if (!t) return;
|
|
387
|
-
let n =
|
|
428
|
+
let n = z, r = t.value;
|
|
388
429
|
if (n === r) return;
|
|
389
430
|
if (e.inputType === "insertReplacementText") {
|
|
390
431
|
_t(e, n, r);
|
|
@@ -394,9 +435,9 @@ var Be = [
|
|
|
394
435
|
for (; a < n.length && a < r.length - i && n[n.length - 1 - a] === r[r.length - 1 - a];) a++;
|
|
395
436
|
let o = 0;
|
|
396
437
|
for (; o < n.length - a && o < r.length - a && o < i && n[o] === r[o];) o++;
|
|
397
|
-
let s = r.slice(o, r.length - a), c = d(
|
|
398
|
-
if (!s &&
|
|
399
|
-
let e = d(
|
|
438
|
+
let s = r.slice(o, r.length - a), c = d(R, o), l = d(R, n.length - a);
|
|
439
|
+
if (!s && me(R, o, n.length - a)) {
|
|
440
|
+
let e = d(R, o);
|
|
400
441
|
K(e);
|
|
401
442
|
return;
|
|
402
443
|
}
|
|
@@ -422,11 +463,11 @@ var Be = [
|
|
|
422
463
|
}
|
|
423
464
|
return a === null ? null : [a, a + i];
|
|
424
465
|
}, _t = (e, t, n) => {
|
|
425
|
-
let r =
|
|
466
|
+
let r = O.value, i = st(e), a = i === null ? null : gt(t, n, i, r.selectionStart ?? n.length), o = i !== null && a ? ct(i, d(R, a[0]), d(R, a[1])) : {
|
|
426
467
|
type: "paste",
|
|
427
468
|
start: 0,
|
|
428
|
-
end:
|
|
429
|
-
raw:
|
|
469
|
+
end: L.raw.length,
|
|
470
|
+
raw: I(n)
|
|
430
471
|
};
|
|
431
472
|
q(o, e, !1);
|
|
432
473
|
}, vt = /* @__PURE__ */ new Set([
|
|
@@ -434,81 +475,81 @@ var Be = [
|
|
|
434
475
|
"historyRedo",
|
|
435
476
|
""
|
|
436
477
|
]), yt = (e) => {
|
|
437
|
-
if (
|
|
438
|
-
|
|
478
|
+
if (B) {
|
|
479
|
+
Qe = !0, x("input", e);
|
|
439
480
|
return;
|
|
440
481
|
}
|
|
441
482
|
if (V) return;
|
|
442
|
-
if (
|
|
483
|
+
if (T.value) return K();
|
|
443
484
|
let t = e.inputType ?? "";
|
|
444
485
|
if (vt.has(t) || !(e instanceof InputEvent)) {
|
|
445
|
-
mt(),
|
|
486
|
+
mt(), x("input", e), it();
|
|
446
487
|
return;
|
|
447
488
|
}
|
|
448
489
|
ht(e);
|
|
449
490
|
}, bt = () => {
|
|
450
|
-
|
|
491
|
+
N.value || (V = !0);
|
|
451
492
|
}, xt = (e) => {
|
|
452
|
-
if (
|
|
453
|
-
if (V = !1,
|
|
493
|
+
if (N.value && T.value && O.value && (O.value.value = b.modelValue?.toString() || ""), !(N.value || !V)) {
|
|
494
|
+
if (V = !1, T.value) return K();
|
|
454
495
|
ht(e);
|
|
455
496
|
}
|
|
456
|
-
}, J =
|
|
457
|
-
if (!(
|
|
458
|
-
if (
|
|
459
|
-
|
|
497
|
+
}, J = h(null), Y = () => {
|
|
498
|
+
if (!(N.value || !O.value)) {
|
|
499
|
+
if (O.value.value !== z && T.value) return K();
|
|
500
|
+
O.value.value !== z && (mt(), it(), J.value && (J.value.value = $e.value));
|
|
460
501
|
}
|
|
461
502
|
}, St = (e = !1) => {
|
|
462
|
-
|
|
503
|
+
N.value || (W(u(U.value, j.value)), K(e ? L.raw.length : void 0));
|
|
463
504
|
}, Ct = (e) => {
|
|
464
505
|
e.persisted && Y();
|
|
465
506
|
}, wt = null, Tt = (e) => {
|
|
466
|
-
let t = (J.value ??
|
|
507
|
+
let t = (J.value ?? O.value)?.form;
|
|
467
508
|
t && e.target === t && Y();
|
|
468
509
|
}, Et = !1, Dt = () => {
|
|
469
|
-
let e =
|
|
470
|
-
if (!e || !
|
|
510
|
+
let e = O.value;
|
|
511
|
+
if (!e || !R.hole || B || V || Et || !G() || e.value !== R.text) return;
|
|
471
512
|
let t = e.selectionStart ?? 0;
|
|
472
513
|
if (t !== e.selectionEnd) return;
|
|
473
|
-
let n =
|
|
514
|
+
let n = ve(R, t);
|
|
474
515
|
n !== t && e.setSelectionRange(n, n);
|
|
475
516
|
}, X = () => {
|
|
476
517
|
Et = !1, window.removeEventListener("pointerup", X), window.removeEventListener("pointercancel", X), Dt();
|
|
477
518
|
}, Ot = () => {
|
|
478
|
-
|
|
479
|
-
}, kt = (e, t = !0) =>
|
|
480
|
-
if (
|
|
481
|
-
if (!
|
|
519
|
+
R.hole && (Et = !0, window.addEventListener("pointerup", X), window.addEventListener("pointercancel", X));
|
|
520
|
+
}, kt = (e, t = !0) => ee(Number(ae(e.toString(), j.value)), t ? b.min : -Infinity, b.max), At = () => {
|
|
521
|
+
if (T.value) return;
|
|
522
|
+
if (!N.value) {
|
|
482
523
|
Y();
|
|
483
|
-
let e =
|
|
484
|
-
if (typeof e != "number" || e >=
|
|
485
|
-
W(
|
|
524
|
+
let e = xe(L.raw);
|
|
525
|
+
if (typeof e != "number" || e >= b.min) return;
|
|
526
|
+
W(ge(b.min, j.value)), U.value = b.min, K(G() ? L.raw.length : void 0), x("update:modelValue", b.min);
|
|
486
527
|
return;
|
|
487
528
|
}
|
|
488
|
-
if (!
|
|
489
|
-
let e = Number($(
|
|
490
|
-
!Number.isFinite(e) || e >=
|
|
529
|
+
if (!O.value?.value) return;
|
|
530
|
+
let e = Number($(O.value.value));
|
|
531
|
+
!Number.isFinite(e) || e >= b.min || (O.value.value = b.min.toString(), x("update:modelValue", b.min));
|
|
491
532
|
}, jt = (e) => {
|
|
492
|
-
let t = Number(
|
|
533
|
+
let t = Number(b.modelValue || 0);
|
|
493
534
|
return kt(t + e);
|
|
494
535
|
}, Z = () => {
|
|
495
|
-
if (
|
|
496
|
-
let e = jt(
|
|
497
|
-
|
|
536
|
+
if (T.value) return;
|
|
537
|
+
let e = jt(b.step * -1);
|
|
538
|
+
x("decrease", e), x("update:modelValue", e);
|
|
498
539
|
}, Q = () => {
|
|
499
|
-
if (
|
|
500
|
-
let e = jt(
|
|
501
|
-
|
|
540
|
+
if (T.value) return;
|
|
541
|
+
let e = jt(b.step);
|
|
542
|
+
x("increase", e), x("update:modelValue", e);
|
|
502
543
|
}, Mt = (e) => {
|
|
503
|
-
if (!
|
|
504
|
-
if (
|
|
505
|
-
if (
|
|
506
|
-
|
|
544
|
+
if (!N.value) return yt(e);
|
|
545
|
+
if (O.value) {
|
|
546
|
+
if (T.value) {
|
|
547
|
+
O.value.value = b.modelValue?.toString() || "";
|
|
507
548
|
return;
|
|
508
549
|
}
|
|
509
550
|
if (e.target instanceof HTMLInputElement) {
|
|
510
551
|
let t = e.target.value, n = e.target.selectionStart, r = e.target.selectionEnd;
|
|
511
|
-
|
|
552
|
+
x("input", e);
|
|
512
553
|
let i = t;
|
|
513
554
|
i = Lt(i), i = Pt(i), i = Ft(i), i = It(i), zt(i) && (i = Rt(i));
|
|
514
555
|
let a = null;
|
|
@@ -516,11 +557,11 @@ var Be = [
|
|
|
516
557
|
let e = $(i), t = Number(e);
|
|
517
558
|
Number.isFinite(t) && (a = kt(t, !1));
|
|
518
559
|
}
|
|
519
|
-
|
|
520
|
-
let o =
|
|
521
|
-
if (
|
|
560
|
+
x("update:modelValue", a);
|
|
561
|
+
let o = ae(i, j.value);
|
|
562
|
+
if (O.value.value !== o && (O.value.value = o, n !== null && r !== null)) {
|
|
522
563
|
let e = o.length - t.length, i = Math.max(0, n + e), a = Math.max(0, r + e);
|
|
523
|
-
|
|
564
|
+
O.value.setSelectionRange(i, a);
|
|
524
565
|
}
|
|
525
566
|
}
|
|
526
567
|
}
|
|
@@ -535,156 +576,156 @@ var Be = [
|
|
|
535
576
|
let i = t === -1 ? "." : ",";
|
|
536
577
|
return r(i) > 1 ? e.replaceAll(i, "") : e.replace(",", ".");
|
|
537
578
|
}, Ft = (e) => e.length ? [...e[0] + e.slice(1).replaceAll("-", "")].reduce((e, t) => (t === "." && e.includes(".") || e.push(t), e), []).join("").replaceAll(/[^\d.-]/g, "") : "", It = (e) => e.startsWith(".") && e.length === 1 ? "0." : e.startsWith("-.") && e.length === 2 ? "-0." : e, Lt = (e) => e.slice(0, 20), Rt = (e) => {
|
|
538
|
-
let t = Number(e), n =
|
|
579
|
+
let t = Number(e), n = ee(t, -Infinity, b.max), r = n.toString();
|
|
539
580
|
return n === t && r.includes("e") ? e : r;
|
|
540
581
|
}, zt = (e) => !(e.length === 0 || e.endsWith(".") || e.endsWith("-") || e.endsWith("-0") || /\.\d*0+$/.test(e)), $ = (e) => {
|
|
541
582
|
let [t, n] = e.split(".");
|
|
542
|
-
return t ||= "0", n ? (n = n?.slice(0,
|
|
583
|
+
return t ||= "0", n ? (n = n?.slice(0, j.value) || "0", `${t}.${n}`) : t;
|
|
543
584
|
}, Bt = {
|
|
544
585
|
onBeforeinput: (e) => lt(e),
|
|
545
586
|
onBlur: (e) => {
|
|
546
|
-
|
|
587
|
+
w.value = !1, Y(), At(), St(), x("blur", e);
|
|
547
588
|
},
|
|
548
|
-
onChange: (e) =>
|
|
549
|
-
onClick: (e) =>
|
|
589
|
+
onChange: (e) => x("change", e),
|
|
590
|
+
onClick: (e) => x("click", e),
|
|
550
591
|
onCompositionend: (e) => {
|
|
551
|
-
xt(e),
|
|
592
|
+
xt(e), x("compositionend", e);
|
|
552
593
|
},
|
|
553
594
|
onCompositionstart: (e) => {
|
|
554
|
-
bt(),
|
|
595
|
+
bt(), x("compositionstart", e);
|
|
555
596
|
},
|
|
556
597
|
onFocus: (e) => {
|
|
557
|
-
|
|
598
|
+
w.value = !0, Y(), x("focus", e);
|
|
558
599
|
},
|
|
559
600
|
onKeydown: (e) => {
|
|
560
|
-
Nt(e),
|
|
601
|
+
Nt(e), x("keydown", e);
|
|
561
602
|
},
|
|
562
|
-
onKeyup: (e) =>
|
|
563
|
-
onMousedown: (e) =>
|
|
564
|
-
onMouseup: (e) =>
|
|
603
|
+
onKeyup: (e) => x("keyup", e),
|
|
604
|
+
onMousedown: (e) => x("mousedown", e),
|
|
605
|
+
onMouseup: (e) => x("mouseup", e),
|
|
565
606
|
onPointerdown: () => Ot(),
|
|
566
607
|
onPaste: (e) => {
|
|
567
|
-
ut(e),
|
|
608
|
+
ut(e), x("paste", e);
|
|
568
609
|
},
|
|
569
610
|
onDragstart: () => dt = !0,
|
|
570
611
|
onDragend: () => dt = !1,
|
|
571
612
|
onDrop: (e) => pt(e),
|
|
572
613
|
onSelectionchange: () => Dt()
|
|
573
|
-
}, Vt =
|
|
574
|
-
if (e(
|
|
575
|
-
if (!
|
|
576
|
-
if (U.value = H(t), G() &&
|
|
577
|
-
W(u(U.value,
|
|
614
|
+
}, Vt = p(() => D.input ? m(Bt, D.input) : Bt), Ht = (t) => {
|
|
615
|
+
if (e(O.value)) return;
|
|
616
|
+
if (!N.value) {
|
|
617
|
+
if (U.value = H(t), G() && xe(L.raw) === U.value) return;
|
|
618
|
+
W(u(U.value, j.value)), K(G() ? L.raw.length : void 0);
|
|
578
619
|
return;
|
|
579
620
|
}
|
|
580
|
-
let n =
|
|
581
|
-
if (!e(t) && document.activeElement ===
|
|
621
|
+
let n = O.value.value;
|
|
622
|
+
if (!e(t) && document.activeElement === O.value && !zt(n) && n.length > 0 && Number(t) === kt(Number($(n)), !1)) return;
|
|
582
623
|
let r = t;
|
|
583
|
-
e(r) && (r = ""),
|
|
624
|
+
e(r) && (r = ""), O.value.value = r?.toString() || "";
|
|
584
625
|
};
|
|
585
|
-
Le(() =>
|
|
626
|
+
Le(() => b.modelValue, (e) => {
|
|
586
627
|
Ht(e);
|
|
587
628
|
});
|
|
588
|
-
let Ut =
|
|
629
|
+
let Ut = h(!1), Wt = p(() => Ut.value && !(b.min >= 0) ? "text" : "decimal"), Gt = () => N.value ? b.modelValue?.toString() || "" : u(H(b.modelValue), j.value);
|
|
589
630
|
return Pe(() => {
|
|
590
|
-
Ut.value =
|
|
591
|
-
let e =
|
|
592
|
-
G() && (
|
|
593
|
-
let t = e && !
|
|
594
|
-
if (Ht(
|
|
595
|
-
let n =
|
|
631
|
+
Ut.value = se();
|
|
632
|
+
let e = O.value;
|
|
633
|
+
G() && (w.value = !0);
|
|
634
|
+
let t = e && !N.value && G() && e.value === Gt() ? e.selectionStart : null;
|
|
635
|
+
if (Ht(b.modelValue), e && t !== null && G()) {
|
|
636
|
+
let n = fe(R, Math.min(t, L.raw.length));
|
|
596
637
|
e.setSelectionRange(n, n);
|
|
597
638
|
}
|
|
598
639
|
window.addEventListener("pageshow", Ct), wt = e?.ownerDocument ?? null, wt?.addEventListener("submit", Tt, !0), tt.value = !0;
|
|
599
640
|
}), Ne(() => {
|
|
600
641
|
window.removeEventListener("pageshow", Ct), wt?.removeEventListener("submit", Tt, !0), window.removeEventListener("pointerup", X), window.removeEventListener("pointercancel", X);
|
|
601
642
|
}), Le([
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
k,
|
|
643
|
+
P,
|
|
644
|
+
F,
|
|
605
645
|
j,
|
|
606
|
-
|
|
646
|
+
N,
|
|
647
|
+
k
|
|
607
648
|
], () => {
|
|
608
|
-
if (
|
|
609
|
-
if (
|
|
610
|
-
|
|
649
|
+
if (O.value) {
|
|
650
|
+
if (N.value) {
|
|
651
|
+
O.value.value = b.modelValue?.toString() || "";
|
|
611
652
|
return;
|
|
612
653
|
}
|
|
613
|
-
G() || W(u(U.value,
|
|
654
|
+
G() || W(u(U.value, j.value)), K(G() ? L.raw.length : void 0);
|
|
614
655
|
}
|
|
615
|
-
}), (e, t) => (Fe(), we(
|
|
656
|
+
}), (e, t) => (Fe(), we(ne, m({
|
|
616
657
|
id: e.id,
|
|
617
658
|
class: "bb-number-input",
|
|
618
|
-
clearable:
|
|
659
|
+
clearable: Je.value,
|
|
619
660
|
compact: e.compact,
|
|
620
661
|
description: e.description,
|
|
621
662
|
disabled: e.disabled,
|
|
622
|
-
errors:
|
|
663
|
+
errors: _(Ue),
|
|
623
664
|
"has-errors": e.hasErrors,
|
|
624
|
-
"has-value":
|
|
665
|
+
"has-value": E.value,
|
|
625
666
|
"has-warnings": e.hasWarnings,
|
|
626
667
|
"hide-label": e.hideLabel,
|
|
627
668
|
hint: e.hint,
|
|
628
669
|
"input-align": e.inputAlign,
|
|
629
670
|
label: e.label,
|
|
630
671
|
"label-align": e.labelAlign,
|
|
631
|
-
"label-mode":
|
|
672
|
+
"label-mode": Ye.value,
|
|
632
673
|
"label-position": e.labelPosition,
|
|
633
674
|
layout: e.layout,
|
|
634
675
|
loading: e.loading,
|
|
635
676
|
name: e.name,
|
|
636
|
-
passthrough:
|
|
637
|
-
readonly:
|
|
677
|
+
passthrough: _(D),
|
|
678
|
+
readonly: _(S),
|
|
638
679
|
reverse: e.reverse,
|
|
639
|
-
"show-asterisk":
|
|
640
|
-
"show-hint":
|
|
680
|
+
"show-asterisk": _(He),
|
|
681
|
+
"show-hint": qe.value,
|
|
641
682
|
warnings: e.warnings
|
|
642
|
-
},
|
|
643
|
-
label:
|
|
644
|
-
input:
|
|
645
|
-
"append:icon":
|
|
683
|
+
}, _(D).forwardAttrs), Oe({
|
|
684
|
+
label: v((t) => [g(e.$slots, "label", Me(je(t)))]),
|
|
685
|
+
input: v(({ id: n, hasErrors: r, hasWarnings: i, ariaDescribedby: a, ariaLabelledby: o }) => [ke(ie, {
|
|
686
|
+
"append:icon": _(b)["append:icon"],
|
|
646
687
|
clearable: e.clearable,
|
|
647
688
|
compact: e.compact,
|
|
648
689
|
disabled: e.disabled,
|
|
649
690
|
"has-errors": r,
|
|
650
|
-
"has-value":
|
|
691
|
+
"has-value": E.value,
|
|
651
692
|
"has-warnings": i,
|
|
652
693
|
loading: e.loading,
|
|
653
|
-
passthrough:
|
|
654
|
-
"prepend:icon":
|
|
655
|
-
readonly:
|
|
694
|
+
passthrough: _(D),
|
|
695
|
+
"prepend:icon": _(b)["prepend:icon"],
|
|
696
|
+
readonly: _(S),
|
|
656
697
|
"reserve-append-space": e.clearable,
|
|
657
698
|
variant: e.variant,
|
|
658
|
-
"onClick:clear": t[0] ||= (e) =>
|
|
699
|
+
"onClick:clear": t[0] ||= (e) => _(x)("update:modelValue", null)
|
|
659
700
|
}, Oe({
|
|
660
|
-
"prepend:outer":
|
|
701
|
+
"prepend:outer": v(() => [g(e.$slots, "prepend:outer", {
|
|
661
702
|
decrease: Z,
|
|
662
703
|
increase: Q
|
|
663
704
|
})]),
|
|
664
|
-
prepend:
|
|
705
|
+
prepend: v(() => [g(e.$slots, "prepend", {
|
|
665
706
|
decrease: Z,
|
|
666
707
|
increase: Q
|
|
667
708
|
})]),
|
|
668
|
-
append:
|
|
709
|
+
append: v(() => [g(e.$slots, "append", {
|
|
669
710
|
decrease: Z,
|
|
670
711
|
increase: Q
|
|
671
712
|
})]),
|
|
672
|
-
"append:outer":
|
|
713
|
+
"append:outer": v(() => [g(e.$slots, "append:outer", {
|
|
673
714
|
decrease: Z,
|
|
674
715
|
increase: Q
|
|
675
716
|
})]),
|
|
676
|
-
default:
|
|
717
|
+
default: v(() => [Re(De("input", m({
|
|
677
718
|
id: n,
|
|
678
719
|
ref_key: "input",
|
|
679
|
-
ref:
|
|
720
|
+
ref: O,
|
|
680
721
|
"aria-describedby": a,
|
|
681
722
|
"aria-disabled": e.disabled || void 0,
|
|
682
723
|
"aria-invalid": r || void 0,
|
|
683
724
|
"aria-labelledby": o,
|
|
684
|
-
"aria-readonly":
|
|
725
|
+
"aria-readonly": _(S) || void 0,
|
|
685
726
|
"aria-valuemax": e.max === 2 ** 53 - 1 ? void 0 : e.max,
|
|
686
727
|
"aria-valuemin": e.min === -(2 ** 53 - 1) ? void 0 : e.min,
|
|
687
|
-
"aria-valuenow":
|
|
728
|
+
"aria-valuenow": _(l)(_(Ke)) ? _(Ke) : void 0,
|
|
688
729
|
"aria-valuetext": nt.value,
|
|
689
730
|
autocomplete: e.autocomplete,
|
|
690
731
|
autofocus: e.autofocus,
|
|
@@ -693,25 +734,25 @@ var Be = [
|
|
|
693
734
|
inputmode: Wt.value,
|
|
694
735
|
name: e.disableFormatting ? e.name : void 0,
|
|
695
736
|
placeholder: e.placeholder,
|
|
696
|
-
readonly:
|
|
697
|
-
required:
|
|
698
|
-
"aria-required":
|
|
737
|
+
readonly: _(S),
|
|
738
|
+
required: _(We),
|
|
739
|
+
"aria-required": _(Ge),
|
|
699
740
|
role: "spinbutton",
|
|
700
741
|
size: "1",
|
|
701
742
|
type: "text",
|
|
702
743
|
onInput: ze(Mt, ["stop"])
|
|
703
|
-
},
|
|
744
|
+
}, m(_(D).controlAttrs, Vt.value)), null, 16, Be), [[_(te)], [_(oe), Gt]])]),
|
|
704
745
|
_: 2
|
|
705
746
|
}, [e.$slots.prefix ? {
|
|
706
747
|
name: "prefix",
|
|
707
|
-
fn:
|
|
748
|
+
fn: v(() => [g(e.$slots, "prefix", {
|
|
708
749
|
decrease: Z,
|
|
709
750
|
increase: Q
|
|
710
751
|
})]),
|
|
711
752
|
key: "0"
|
|
712
753
|
} : void 0, e.$slots.suffix ? {
|
|
713
754
|
name: "suffix",
|
|
714
|
-
fn:
|
|
755
|
+
fn: v(() => [g(e.$slots, "suffix", {
|
|
715
756
|
decrease: Z,
|
|
716
757
|
increase: Q
|
|
717
758
|
})]),
|
|
@@ -735,7 +776,7 @@ var Be = [
|
|
|
735
776
|
ref_key: "posted",
|
|
736
777
|
ref: J,
|
|
737
778
|
disabled: e.disabled,
|
|
738
|
-
form:
|
|
779
|
+
form: _(D).controlAttrs.form,
|
|
739
780
|
name: e.name,
|
|
740
781
|
type: "hidden",
|
|
741
782
|
value: $e.value
|
|
@@ -743,7 +784,7 @@ var Be = [
|
|
|
743
784
|
_: 2
|
|
744
785
|
}, [e.$slots.description ? {
|
|
745
786
|
name: "description",
|
|
746
|
-
fn:
|
|
787
|
+
fn: v((t) => [g(e.$slots, "description", Me(je(t)))]),
|
|
747
788
|
key: "0"
|
|
748
789
|
} : void 0]), 1040, [
|
|
749
790
|
"id",
|
|
@@ -775,4 +816,4 @@ var Be = [
|
|
|
775
816
|
}
|
|
776
817
|
});
|
|
777
818
|
//#endregion
|
|
778
|
-
export {
|
|
819
|
+
export { y as default };
|