bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.41
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 +317 -98
- package/bin/bitboss-ui-mcp.mjs +1566 -75
- package/bin/bitboss-ui.mjs +716 -72
- package/dist/ai/BbAccordion.md +178 -56
- package/dist/ai/BbAlert.md +140 -28
- package/dist/ai/BbAsterisk.md +61 -4
- package/dist/ai/BbAvatar.md +194 -53
- package/dist/ai/BbBadge.md +250 -50
- package/dist/ai/BbBadgeButton.md +74 -21
- package/dist/ai/BbBaseButton.md +132 -51
- package/dist/ai/BbBaseCheckboxIcon.md +118 -26
- package/dist/ai/BbBaseRadioIcon.md +115 -26
- package/dist/ai/BbBaseSwitchIcon.md +123 -28
- package/dist/ai/BbBreadcrumbs.md +221 -51
- package/dist/ai/BbButton.md +389 -107
- package/dist/ai/BbCalendar.md +667 -0
- package/dist/ai/BbCheckbox.md +242 -80
- package/dist/ai/BbCheckboxGroup.md +575 -66
- package/dist/ai/BbCollapsible.md +158 -39
- package/dist/ai/BbColorInput.md +322 -82
- package/dist/ai/BbColorPalette.md +261 -61
- package/dist/ai/BbConfirm.md +220 -51
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +272 -37
- package/dist/ai/BbDatePickerInput.md +321 -92
- package/dist/ai/BbDialog.md +492 -87
- package/dist/ai/BbDropdown.md +1182 -104
- package/dist/ai/BbDropdownButton.md +239 -61
- package/dist/ai/BbDropdownGroup.md +5 -5
- package/dist/ai/BbDropzone.md +140 -36
- package/dist/ai/BbForm.md +1165 -40
- package/dist/ai/BbIcon.md +100 -33
- package/dist/ai/BbIndicator.md +79 -12
- package/dist/ai/BbNumberInput.md +257 -87
- package/dist/ai/BbOffCanvas.md +396 -91
- package/dist/ai/BbPagination.md +199 -32
- package/dist/ai/BbPopover.md +219 -54
- package/dist/ai/BbProgress.md +137 -71
- package/dist/ai/BbPtScope.md +136 -0
- package/dist/ai/BbRadio.md +234 -43
- package/dist/ai/BbRadioGroup.md +529 -91
- package/dist/ai/BbRating.md +243 -61
- package/dist/ai/BbSelect.md +690 -120
- package/dist/ai/BbSelectPopover.md +434 -122
- package/dist/ai/BbSlider.md +275 -79
- package/dist/ai/BbSmoothHeight.md +142 -34
- package/dist/ai/BbSpinner.md +179 -81
- package/dist/ai/BbSwitch.md +249 -63
- package/dist/ai/BbSwitchGroup.md +394 -65
- package/dist/ai/BbTable.md +1666 -222
- package/dist/ai/BbTabs.md +898 -178
- package/dist/ai/BbTabsList.md +81 -7
- package/dist/ai/BbTabsPanels.md +77 -0
- package/dist/ai/BbTabsRoot.md +16 -15
- package/dist/ai/BbTag.md +256 -76
- package/dist/ai/BbTextInput.md +480 -102
- package/dist/ai/BbTextarea.md +310 -96
- package/dist/ai/BbTimePicker.md +159 -24
- package/dist/ai/BbTimePickerInput.md +277 -46
- package/dist/ai/BbToast.md +286 -40
- package/dist/ai/BbToastPortal.md +3 -3
- package/dist/ai/BbTooltip.md +187 -34
- package/dist/ai/BbTree.md +260 -85
- package/dist/ai/ChipsBox.md +43 -2
- package/dist/ai/ClearableButton.md +12 -0
- package/dist/ai/CommaBox.md +2 -1
- package/dist/ai/CommonField.md +63 -0
- package/dist/ai/CommonFieldInput.md +90 -0
- package/dist/ai/CommonPopover.md +17 -12
- package/dist/ai/CommonTimeSelector.md +63 -0
- package/dist/ai/ErrorIcon.md +20 -0
- package/dist/ai/FlatListBox.md +41 -11
- package/dist/ai/GroupedListBox.md +42 -12
- package/dist/ai/ListBox.md +46 -11
- package/dist/ai/OptionsContainer.md +13 -10
- package/dist/ai/WarningIcon.md +20 -0
- package/dist/ai/changelog.json +4025 -141
- package/dist/ai/components.json +51872 -10136
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useBbDropdownContext.md +168 -0
- package/dist/ai/composables/useBbFormContext.md +51 -24
- package/dist/ai/composables/useBbFormField.md +134 -0
- package/dist/ai/composables/useBbTableContext.md +41 -19
- package/dist/ai/composables/useConfirm.md +16 -8
- package/dist/ai/composables/useCountdown.md +1 -1
- package/dist/ai/composables/useId.md +10 -10
- package/dist/ai/composables/useMobile.md +17 -10
- package/dist/ai/composables/useToast.md +25 -19
- package/dist/ai/design-tokens.json +940 -0
- package/dist/ai/design-tokens.manifest.yaml +175 -0
- package/dist/ai/guides/agent-contract.md +168 -22
- package/dist/ai/guides/ai-router.md +79 -40
- package/dist/ai/guides/app-layout.md +8 -4
- package/dist/ai/guides/coherence-playbook.md +8 -8
- package/dist/ai/guides/component-picker.md +42 -34
- package/dist/ai/guides/design-language.md +274 -97
- package/dist/ai/guides/design-tokens.md +493 -105
- package/dist/ai/guides/fetch-items-playbook.md +22 -16
- package/dist/ai/guides/icons-policy.md +67 -35
- package/dist/ai/guides/inertia-helpers.md +4 -1
- package/dist/ai/guides/inline-edit-playbook.md +13 -6
- package/dist/ai/guides/installation-and-plugin-setup.md +817 -73
- package/dist/ai/guides/migration/components/bb-accordion.md +37 -0
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-avatar.md +13 -14
- package/dist/ai/guides/migration/components/bb-badge.md +5 -5
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +9 -8
- package/dist/ai/guides/migration/components/bb-button.md +80 -20
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +116 -29
- package/dist/ai/guides/migration/components/bb-checkbox.md +53 -10
- package/dist/ai/guides/migration/components/bb-chip.md +6 -6
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-input.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +16 -9
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +45 -35
- package/dist/ai/guides/migration/components/bb-dialog.md +69 -36
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +7 -1
- package/dist/ai/guides/migration/components/bb-dropdown.md +31 -8
- package/dist/ai/guides/migration/components/bb-dropzone.md +8 -0
- package/dist/ai/guides/migration/components/bb-icon.md +7 -7
- package/dist/ai/guides/migration/components/bb-intersection.md +1 -1
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -31
- package/dist/ai/guides/migration/components/bb-pagination.md +10 -0
- package/dist/ai/guides/migration/components/bb-popover.md +19 -11
- package/dist/ai/guides/migration/components/bb-radio-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-rating.md +61 -24
- package/dist/ai/guides/migration/components/bb-select-popover.md +9 -1
- package/dist/ai/guides/migration/components/bb-select.md +21 -4
- package/dist/ai/guides/migration/components/bb-slider.md +14 -6
- package/dist/ai/guides/migration/components/bb-switch-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-table.md +574 -33
- package/dist/ai/guides/migration/components/bb-tabs.md +91 -41
- package/dist/ai/guides/migration/components/bb-tag.md +9 -7
- package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/components/bb-tree.md +11 -9
- package/dist/ai/guides/migration/components/use-confirm.md +9 -1
- package/dist/ai/guides/migration/v2-to-v3.md +828 -240
- package/dist/ai/guides/migration/v3-beta-css-classes.md +751 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +119 -0
- package/dist/ai/guides/options-items-playbook.md +161 -12
- package/dist/ai/guides/page-shell.md +1 -1
- package/dist/ai/guides/passthrough.md +958 -0
- package/dist/ai/guides/preset-components.md +361 -0
- package/dist/ai/guides/ssr-prefill.md +127 -0
- package/dist/ai/guides/validated-forms.md +466 -55
- package/dist/ai/guides/validation-libraries.md +171 -0
- package/dist/ai/guides/validation-providers.md +113 -0
- package/dist/ai/index.md +45 -44
- package/dist/ai/recipes/inertia/approvals-inbox.md +26 -10
- package/dist/ai/recipes/inertia/command-palette.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +46 -30
- package/dist/ai/recipes/inertia/layout-scaffold.md +6 -2
- package/dist/ai/recipes/inertia/onboarding.md +30 -8
- package/dist/ai/recipes/inertia/ownership-atlas.md +72 -49
- package/dist/ai/recipes/inertia/record-form.md +53 -19
- package/dist/ai/recipes/inertia/records-workspace.md +201 -49
- package/dist/ai/recipes/inertia/settings-workspace.md +3809 -0
- package/dist/ai/recipes/inertia/upload-center.md +54 -43
- package/dist/ai/recipes/inertia/wizard-form.md +98 -14
- package/dist/ai/recipes/nuxt/approvals-inbox.md +26 -10
- package/dist/ai/recipes/nuxt/command-palette.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +68 -52
- package/dist/ai/recipes/nuxt/layout-scaffold.md +6 -2
- package/dist/ai/recipes/nuxt/onboarding.md +30 -8
- package/dist/ai/recipes/nuxt/record-form.md +66 -22
- package/dist/ai/recipes/nuxt/records-workspace.md +199 -48
- package/dist/ai/recipes/nuxt/settings-workspace.md +3898 -0
- package/dist/ai/recipes/nuxt/upload-center.md +52 -41
- package/dist/ai/recipes/nuxt/wizard-form.md +98 -14
- package/dist/ai/recipes/vue/approvals-inbox.md +28 -12
- package/dist/ai/recipes/vue/command-palette.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +69 -53
- package/dist/ai/recipes/vue/layout-scaffold.md +6 -2
- package/dist/ai/recipes/vue/onboarding.md +32 -8
- package/dist/ai/recipes/vue/record-form.md +81 -54
- package/dist/ai/recipes/vue/records-workspace.md +198 -49
- package/dist/ai/recipes/vue/settings-workspace.md +3836 -0
- package/dist/ai/recipes/vue/upload-center.md +53 -42
- package/dist/ai/recipes/vue/wizard-form.md +97 -14
- package/dist/ai/source/BbAccordion.md +90 -24
- package/dist/ai/source/BbAlert.md +209 -62
- package/dist/ai/source/BbAsterisk.md +54 -4
- package/dist/ai/source/BbAvatar.md +73 -16
- package/dist/ai/source/BbBadge.md +265 -97
- package/dist/ai/source/BbBadgeButton.md +218 -79
- package/dist/ai/source/BbBaseButton.md +108 -12
- package/dist/ai/source/BbBaseCheckboxIcon.md +151 -36
- package/dist/ai/source/BbBaseRadioIcon.md +121 -17
- package/dist/ai/source/BbBaseSwitchIcon.md +138 -28
- package/dist/ai/source/BbBreadcrumbs.md +363 -69
- package/dist/ai/source/BbButton.md +563 -174
- package/dist/ai/source/BbCalendar.md +1744 -0
- package/dist/ai/source/BbCheckbox.md +470 -68
- package/dist/ai/source/BbCheckboxGroup.md +976 -95
- package/dist/ai/source/BbCollapsible.md +96 -8
- package/dist/ai/source/BbColorInput.md +597 -67
- package/dist/ai/source/BbColorPalette.md +1284 -65
- package/dist/ai/source/BbConfirm.md +149 -7
- package/dist/ai/source/BbConfirmPortal.md +89 -3
- package/dist/ai/source/BbDatePicker.md +527 -381
- package/dist/ai/source/BbDatePickerInput.md +2015 -118
- package/dist/ai/source/BbDialog.md +531 -64
- package/dist/ai/source/BbDropdown.md +885 -175
- package/dist/ai/source/BbDropdownButton.md +377 -79
- package/dist/ai/source/BbDropdownGroup.md +687 -96
- package/dist/ai/source/BbDropzone.md +140 -31
- package/dist/ai/source/BbForm.md +875 -17
- package/dist/ai/source/BbIcon.md +130 -52
- package/dist/ai/source/BbIndicator.md +117 -60
- package/dist/ai/source/BbNumberInput.md +667 -84
- package/dist/ai/source/BbOffCanvas.md +1007 -261
- package/dist/ai/source/BbPagination.md +203 -31
- package/dist/ai/source/BbPopover.md +267 -90
- package/dist/ai/source/BbProgress.md +88 -26
- package/dist/ai/source/BbPtScope.md +54 -0
- package/dist/ai/source/BbRadio.md +388 -58
- package/dist/ai/source/BbRadioGroup.md +940 -109
- package/dist/ai/source/BbRating.md +736 -84
- package/dist/ai/source/BbSelect.md +1096 -96
- package/dist/ai/source/BbSelectPopover.md +807 -114
- package/dist/ai/source/BbSlider.md +1390 -98
- package/dist/ai/source/BbSmoothHeight.md +48 -2
- package/dist/ai/source/BbSpinner.md +62 -6
- package/dist/ai/source/BbSwitch.md +297 -60
- package/dist/ai/source/BbSwitchGroup.md +761 -83
- package/dist/ai/source/BbTable.md +6950 -1864
- package/dist/ai/source/BbTabs.md +368 -111
- package/dist/ai/source/BbTabsList.md +503 -146
- package/dist/ai/source/BbTabsPanels.md +625 -0
- package/dist/ai/source/BbTabsRoot.md +319 -100
- package/dist/ai/source/BbTag.md +796 -87
- package/dist/ai/source/BbTextInput.md +497 -68
- package/dist/ai/source/BbTextarea.md +550 -65
- package/dist/ai/source/BbTimePicker.md +395 -69
- package/dist/ai/source/BbTimePickerInput.md +1233 -106
- package/dist/ai/source/BbToast.md +250 -74
- package/dist/ai/source/BbToastPortal.md +210 -66
- package/dist/ai/source/BbTooltip.md +181 -30
- package/dist/ai/source/BbTree.md +76 -11
- package/dist/ai/source/ChipsBox.md +25 -5
- package/dist/ai/source/CommaBox.md +21 -6
- package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +467 -250
- package/dist/ai/source/CommonFieldInput.md +848 -0
- package/dist/ai/source/CommonPopover.md +116 -30
- package/dist/ai/source/CommonTimeSelector.md +726 -0
- package/dist/ai/source/ErrorIcon.md +2 -2
- package/dist/ai/source/FlatListBox.md +188 -17
- package/dist/ai/source/GroupedListBox.md +236 -44
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/ListBox.md +46 -8
- package/dist/ai/source/OptionsContainer.md +288 -60
- package/dist/ai/source/WarningIcon.md +2 -2
- package/dist/assets/css/reset.css_inline.js +1 -1
- package/dist/assets/svgs/star.svg_raw.js +4 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
- package/dist/components/BbAccordion/types.d.ts +35 -3
- package/dist/components/BbAccordion/types.js +11 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +46 -30
- package/dist/components/BbAlert/types.d.ts +37 -3
- package/dist/components/BbAlert/types.js +13 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +23 -8
- package/dist/components/BbAsterisk/types.d.ts +18 -0
- package/dist/components/BbAsterisk/types.js +7 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +57 -44
- package/dist/components/BbAvatar/types.d.ts +23 -0
- package/dist/components/BbAvatar/types.js +7 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -18
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +96 -53
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +27 -8
- package/dist/components/BbBadge/badgeButtonContext.d.ts +25 -8
- package/dist/components/BbBadge/types.d.ts +46 -3
- package/dist/components/BbBadge/types.js +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +109 -96
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/BbBaseButton/types.d.ts +33 -3
- package/dist/components/BbBaseButton/types.js +9 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +50 -18
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +31 -2
- package/dist/components/BbBaseCheckboxIcon/types.js +8 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +45 -15
- package/dist/components/BbBaseRadioIcon/types.d.ts +31 -2
- package/dist/components/BbBaseRadioIcon/types.js +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +48 -16
- package/dist/components/BbBaseSwitchIcon/types.d.ts +31 -2
- package/dist/components/BbBaseSwitchIcon/types.js +8 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +187 -132
- package/dist/components/BbBreadcrumbs/types.d.ts +45 -3
- package/dist/components/BbBreadcrumbs/types.js +12 -0
- package/dist/components/BbButton/BbButton.vue.d.ts +5 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +107 -81
- package/dist/components/BbButton/types.d.ts +113 -2
- package/dist/components/BbButton/types.js +12 -0
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +34 -0
- package/dist/components/BbCalendar/BbCalendar.vue.js +6 -0
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +608 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbCalendar/calendarHost.d.ts +29 -0
- package/dist/components/BbCalendar/calendarHost.js +10 -0
- package/dist/components/BbCalendar/types.d.ts +225 -0
- package/dist/components/BbCalendar/types.js +29 -0
- package/dist/components/{BbBaseDatePicker/useDatePickerContext.d.ts → BbCalendar/useCalendarContext.d.ts} +10 -7
- package/dist/components/BbCalendar/useCalendarContext.js +11 -0
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +208 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +274 -0
- package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
- package/dist/components/BbCalendar/useDayGrid.js +204 -0
- package/dist/components/BbCalendar/useToday.d.ts +23 -0
- package/dist/components/BbCalendar/useToday.js +21 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +214 -72
- package/dist/components/BbCheckbox/types.d.ts +180 -13
- package/dist/components/BbCheckbox/types.js +8 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +15 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbCheckboxGroup/types.d.ts +195 -20
- package/dist/components/BbCheckboxGroup/types.js +10 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +41 -19
- package/dist/components/BbCollapsible/types.d.ts +44 -1
- package/dist/components/BbCollapsible/types.js +7 -0
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +17 -7
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +330 -86
- package/dist/components/BbColorInput/types.d.ts +230 -12
- package/dist/components/BbColorInput/types.js +24 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +10 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +515 -108
- package/dist/components/BbColorPalette/types.d.ts +76 -7
- package/dist/components/BbColorPalette/types.js +12 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +125 -76
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -0
- package/dist/components/BbConfirm/types.d.ts +49 -0
- package/dist/components/BbConfirm/types.js +17 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -10
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +320 -223
- package/dist/components/BbDatePicker/types.d.ts +111 -17
- package/dist/components/BbDatePicker/types.js +33 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -4
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1172 -87
- package/dist/components/BbDatePickerInput/types.d.ts +224 -19
- package/dist/components/BbDatePickerInput/types.js +39 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +227 -136
- package/dist/components/BbDialog/types.d.ts +92 -3
- package/dist/components/BbDialog/types.js +16 -0
- package/dist/components/BbDialog/useDialogStack.d.ts +12 -0
- package/dist/components/BbDialog/useDialogStack.js +9 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +108 -96
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +10 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +337 -268
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +5 -1
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +8 -2
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +377 -293
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +129 -118
- package/dist/components/BbDropdown/normalizeGroups.js +55 -31
- package/dist/components/BbDropdown/types.d.ts +288 -30
- package/dist/components/BbDropdown/types.js +21 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +10 -4
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +18 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +172 -40
- package/dist/components/BbDropdownButton/types.d.ts +137 -8
- package/dist/components/BbDropdownButton/types.js +35 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +186 -144
- package/dist/components/BbDropzone/types.d.ts +38 -4
- package/dist/components/BbDropzone/types.js +16 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +94 -0
- package/dist/{validated → components/BbForm}/BbForm.vue.js +1 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +317 -0
- package/dist/components/BbForm/BbFormCustomField.d.ts +14 -0
- package/dist/components/BbForm/BbFormCustomField.js +43 -0
- package/dist/components/BbForm/bindFormField.d.ts +16 -0
- package/dist/components/BbForm/bindFormField.js +85 -0
- package/dist/components/BbForm/formFields.d.ts +64 -0
- package/dist/components/BbForm/formFields.js +11 -0
- package/dist/components/BbForm/formSchema.d.ts +56 -0
- package/dist/components/BbForm/formSchema.js +196 -0
- package/dist/components/BbForm/standardSchema.d.ts +59 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +58 -48
- package/dist/components/BbIcon/iconCache.d.ts +63 -0
- package/dist/components/BbIcon/iconCache.js +35 -0
- package/dist/components/BbIcon/types.d.ts +22 -2
- package/dist/components/BbIcon/types.js +7 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +34 -21
- package/dist/components/BbIndicator/types.d.ts +24 -0
- package/dist/components/BbIndicator/types.js +7 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -8
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +308 -85
- package/dist/components/BbNumberInput/types.d.ts +201 -18
- package/dist/components/BbNumberInput/types.js +8 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +311 -210
- package/dist/components/BbOffCanvas/types.d.ts +79 -6
- package/dist/components/BbOffCanvas/types.js +15 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +125 -90
- package/dist/components/BbPagination/types.d.ts +38 -0
- package/dist/components/BbPagination/types.js +13 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +219 -179
- package/dist/components/BbPopover/types.d.ts +51 -5
- package/dist/components/BbPopover/types.js +14 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +29 -16
- package/dist/components/BbProgress/types.d.ts +25 -0
- package/dist/components/BbProgress/types.js +7 -0
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +12 -0
- package/dist/components/BbPtScope/BbPtScope.vue.js +5 -0
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbPtScope/types.d.ts +15 -0
- package/dist/components/BbRadio/BbRadio.vue.d.ts +7 -7
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +172 -59
- package/dist/components/BbRadio/types.d.ts +152 -13
- package/dist/components/BbRadio/types.js +8 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +14 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +319 -92
- package/dist/components/BbRadioGroup/types.d.ts +198 -22
- package/dist/components/BbRadioGroup/types.js +10 -0
- package/dist/components/BbRating/BbRating.vue.d.ts +10 -8
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +259 -78
- package/dist/components/BbRating/types.d.ts +174 -13
- package/dist/components/BbRating/types.js +21 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +553 -83
- package/dist/components/BbSelect/types.d.ts +235 -20
- package/dist/components/BbSelect/types.js +41 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +541 -391
- package/dist/components/BbSelectPopover/types.d.ts +124 -8
- package/dist/components/BbSelectPopover/types.js +24 -0
- package/dist/components/BbSlider/BbSlider.vue.d.ts +13 -8
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +472 -96
- package/dist/components/BbSlider/types.d.ts +202 -13
- package/dist/components/BbSlider/types.js +26 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +60 -48
- package/dist/components/BbSmoothHeight/types.d.ts +19 -0
- package/dist/components/BbSmoothHeight/types.js +7 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +27 -14
- package/dist/components/BbSpinner/types.d.ts +22 -1
- package/dist/components/BbSpinner/types.js +7 -0
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +7 -7
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +220 -78
- package/dist/components/BbSwitch/types.d.ts +25 -10
- package/dist/components/BbSwitch/types.js +5 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +14 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbSwitchGroup/types.d.ts +30 -7
- package/dist/components/BbSwitchGroup/types.js +5 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +27 -6
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +2013 -685
- package/dist/components/BbTable/BbTableDataRow.d.ts +196 -0
- package/dist/components/BbTable/BbTableDataRow.js +151 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +84 -0
- package/dist/components/BbTable/BbTableExpandRow.js +62 -0
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +120 -0
- package/dist/components/BbTable/BbTableSelectToggle.js +122 -0
- package/dist/components/BbTable/gridWidgets.d.ts +30 -0
- package/dist/components/BbTable/gridWidgets.js +14 -0
- package/dist/components/BbTable/types.d.ts +473 -123
- package/dist/components/BbTable/types.js +31 -0
- package/dist/components/BbTable/utils.d.ts +145 -4
- package/dist/components/BbTable/utils.js +154 -37
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +62 -26
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +143 -81
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +12 -0
- package/dist/components/{BbBaseSwitch/BbBaseSwitch.vue.js → BbTabs/BbTabsPanels.vue.js} +2 -2
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbTabs/types.d.ts +183 -23
- package/dist/components/BbTabs/types.js +34 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +13 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +383 -92
- package/dist/components/BbTag/types.d.ts +139 -14
- package/dist/components/BbTag/types.js +22 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -8
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +257 -84
- package/dist/components/BbTextInput/types.d.ts +168 -13
- package/dist/components/BbTextInput/types.js +8 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -7
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +291 -94
- package/dist/components/BbTextarea/types.d.ts +158 -14
- package/dist/components/BbTextarea/types.js +8 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -4
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +199 -122
- package/dist/components/BbTimePicker/types.d.ts +94 -7
- package/dist/components/BbTimePicker/types.js +18 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +14 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +749 -86
- package/dist/components/BbTimePickerInput/types.d.ts +171 -22
- package/dist/components/BbTimePickerInput/types.js +25 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +63 -25
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -76
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -0
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
- package/dist/components/BbToast/types.d.ts +54 -1
- package/dist/components/BbToast/types.js +28 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +104 -87
- package/dist/components/BbTooltip/types.d.ts +40 -2
- package/dist/components/BbTooltip/types.js +7 -0
- package/dist/components/BbTree/BbTree.vue.d.ts +15 -3
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +51 -29
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/components/BbTree/context.d.ts +9 -1
- package/dist/components/BbTree/types.d.ts +40 -5
- package/dist/components/BbTree/types.js +7 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +46 -44
- package/dist/components/ChipsBox/types.d.ts +7 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/components/CommaBox/types.d.ts +7 -0
- package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +5 -5
- package/dist/components/{BbBaseRadio/BbBaseRadio.vue.js → CommonField/CommonField.vue.js} +2 -2
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +189 -0
- package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
- package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +52 -16
- package/dist/components/{CommonInputWrapper/CommonInputWrapper.vue.d.ts → CommonFieldInput/CommonFieldInput.vue.d.ts} +5 -4
- package/dist/components/{BbBaseRadioGroup/BbBaseRadioGroup.vue.js → CommonFieldInput/CommonFieldInput.vue.js} +2 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
- package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +27 -8
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +11 -2
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +76 -63
- package/dist/components/CommonPopover/types.d.ts +27 -8
- package/dist/components/{BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts → CommonTimeSelector/CommonTimeSelector.vue.d.ts} +21 -2
- package/dist/components/{BbBaseColorPalette/BbBaseColorPalette.vue.js → CommonTimeSelector/CommonTimeSelector.vue.js} +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +232 -0
- package/dist/components/CommonTimeSelector/types.d.ts +6 -0
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +5 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +165 -95
- package/dist/components/FlatListBox/types.d.ts +24 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +5 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +217 -134
- package/dist/components/GroupedListBox/types.d.ts +24 -2
- package/dist/components/ListBox/ListBox.vue.d.ts +5 -1
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +95 -69
- package/dist/components/ListBox/types.d.ts +24 -2
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +109 -37
- package/dist/components/OptionsContainer/types.d.ts +53 -9
- package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/Transitions/Slide.vue.js +1 -1
- package/dist/composables/useBaseOptions.d.ts +12 -1
- package/dist/composables/useBaseOptions.js +77 -37
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useBbDropdownContext.d.ts +5 -0
- package/dist/composables/useBbFormContext.d.ts +131 -8
- package/dist/composables/useBbFormContext.js +49 -30
- package/dist/composables/useBbFormField.d.ts +40 -0
- package/dist/composables/useBbFormField.js +39 -0
- package/dist/composables/useBbTableContext.d.ts +45 -1
- package/dist/composables/useBbTableContext.js +93 -87
- package/dist/composables/useBbTabsContext.d.ts +15 -9
- package/dist/composables/useBbTabsContext.js +121 -90
- package/dist/composables/useClosingInert.d.ts +4 -4
- package/dist/composables/useCoarsePointer.js +7 -10
- package/dist/composables/useCoherence.js +1 -1
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +15 -0
- package/dist/composables/useConfirm.d.ts +39 -7
- package/dist/composables/useConfirm.js +50 -41
- package/dist/composables/useEscapeStackEntry.d.ts +13 -0
- package/dist/composables/useEscapeStackEntry.js +16 -0
- package/dist/composables/useFormBinding.d.ts +116 -0
- package/dist/composables/useFormBinding.js +34 -0
- package/dist/composables/useHydrated.d.ts +18 -0
- package/dist/composables/useHydrated.js +13 -7
- package/dist/composables/useId.d.ts +4 -3
- package/dist/composables/useId.js +1 -7
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useKeyboardInset.d.ts +28 -0
- package/dist/composables/useKeyboardInset.js +32 -0
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +7 -10
- package/dist/composables/usePassthrough.d.ts +228 -0
- package/dist/composables/usePassthrough.js +247 -0
- package/dist/composables/usePrefill.d.ts +22 -2
- package/dist/composables/usePrefill.js +35 -19
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useSegmentedFields.d.ts +2 -2
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.d.ts +18 -1
- package/dist/composables/useToast.js +31 -18
- package/dist/composables/useToggleInput.d.ts +44 -0
- package/dist/composables/useToggleInput.js +39 -0
- package/dist/composables/useViewportWidth.d.ts +5 -25
- package/dist/composables/useViewportWidth.js +14 -7
- package/dist/deprecation/ai-deprecations.json.d.ts +1977 -289
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +9 -4
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/bbTooltip.d.ts +6 -0
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +92 -37
- package/dist/i18n/index.d.ts +10 -16
- package/dist/i18n/locales/cs.json +9 -5
- package/dist/i18n/locales/da.json +9 -5
- package/dist/i18n/locales/de.json +9 -5
- package/dist/i18n/locales/el.json +9 -5
- package/dist/i18n/locales/en.json +9 -5
- package/dist/i18n/locales/es.json +9 -5
- package/dist/i18n/locales/fi.json +9 -5
- package/dist/i18n/locales/fr.json +9 -5
- package/dist/i18n/locales/hu.json +9 -5
- package/dist/i18n/locales/it.json +9 -5
- package/dist/i18n/locales/ja.json +9 -5
- package/dist/i18n/locales/ko.json +9 -5
- package/dist/i18n/locales/nb.json +9 -5
- package/dist/i18n/locales/nl.json +9 -5
- package/dist/i18n/locales/pl.json +9 -5
- package/dist/i18n/locales/pt.json +9 -5
- package/dist/i18n/locales/ro.json +9 -5
- package/dist/i18n/locales/ru.json +9 -5
- package/dist/i18n/locales/sv.json +9 -5
- package/dist/i18n/locales/tr.json +9 -5
- package/dist/i18n/locales/uk.json +9 -5
- package/dist/i18n/locales/zh-cn.json +9 -5
- package/dist/icon-scan.d.ts +276 -0
- package/dist/icon-scan.js +485 -0
- package/dist/icons-whitelist.d.ts +5 -4
- package/dist/index.d.ts +40 -21
- package/dist/index.js +78 -71
- package/dist/llms-full.txt +61164 -27972
- package/dist/llms-medium.txt +1482 -366
- package/dist/llms.txt +32 -15
- package/dist/locale-blueprint.json +9 -5
- package/dist/nuxt-auto-imports.d.ts +76 -0
- package/dist/nuxt-auto-imports.js +32 -0
- package/dist/nuxt-module.d.ts +30 -15
- package/dist/nuxt.js +35 -9
- package/dist/passthrough-deduper.js +5 -0
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +29 -19
- package/dist/project-dts.d.ts +84 -0
- package/dist/project-dts.js +170 -0
- package/dist/reset.css +1 -1
- package/dist/runtime/nuxt-plugin.js +34 -21
- package/dist/styles.css +3 -2
- package/dist/types/AlertVariant.d.ts +10 -1
- package/dist/types/BadgeVariant.d.ts +16 -5
- package/dist/types/ButtonVariant.d.ts +12 -1
- package/dist/types/ColumnName.d.ts +30 -3
- package/dist/types/CommonProps.d.ts +2 -2
- package/dist/types/Config.d.ts +94 -1
- package/dist/types/ConfirmVariant.d.ts +8 -1
- package/dist/types/DropdownItemVariant.d.ts +8 -1
- package/dist/types/FieldLayout.d.ts +32 -0
- package/dist/types/IndicatorVariant.d.ts +11 -1
- package/dist/types/InputVariant.d.ts +30 -0
- package/dist/types/ItemProps.d.ts +50 -0
- package/dist/types/Option.d.ts +6 -0
- package/dist/types/PtScope.d.ts +15 -0
- package/dist/types/RegistryKey.d.ts +10 -0
- package/dist/types/TabsVariant.d.ts +25 -0
- package/dist/types/ToastVariant.d.ts +12 -2
- package/dist/types/TooltipVariant.d.ts +8 -1
- package/dist/types/passthrough.d.ts +362 -0
- package/dist/types/passthrough.js +78 -0
- package/dist/types/ptComponentMap.d.ts +62 -0
- package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
- package/dist/utilities/functions/hasVnodeListener.js +12 -0
- package/dist/utilities/functions/isImeComposing.d.ts +7 -0
- package/dist/utilities/functions/isImeComposing.js +4 -0
- package/dist/utilities/functions/itemProps.d.ts +46 -0
- package/dist/utilities/functions/itemProps.js +47 -0
- package/dist/utilities/functions/slotKey.d.ts +13 -8
- package/dist/utilities/functions/slotKey.js +78 -2
- package/dist/utilities/functions/snapToStep.js +2 -1
- package/dist/utilities/functions/toggleInput.d.ts +98 -0
- package/dist/utilities/functions/toggleInput.js +56 -0
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +27 -1
- package/dist/utilities/functions/warnRemovedAttrs.js +75 -14
- package/dist/utilities/misc/listboxMetrics.d.ts +9 -3
- package/dist/utilities/misc/listboxMetrics.js +5 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/utils/cssLayers.d.ts +91 -0
- package/dist/utils/cssLayers.js +43 -0
- package/dist/utils/injectLibraryStyles.d.ts +3 -1
- package/dist/utils/injectLibraryStyles.js +24 -23
- package/dist/utils/overlayEscapeStack.d.ts +10 -0
- package/dist/utils/overlayEscapeStack.js +5 -3
- package/dist/utils/passthrough.d.ts +67 -0
- package/dist/utils/passthrough.js +100 -0
- package/dist/utils/passthroughDeduper.d.ts +2 -0
- package/dist/utils/ptScope.d.ts +8 -0
- package/dist/utils/ptScope.js +4 -0
- package/dist/utils/versionCheck.d.ts +19 -0
- package/dist/utils/versionCheck.js +18 -0
- package/dist/vite-plugin.d.ts +301 -53
- package/dist/vite.js +547 -375
- package/llms.txt +33 -16
- package/package.json +49 -27
- package/scripts/lib/check-fix.mjs +129 -0
- package/scripts/lib/component-attr-targets.ts +123 -0
- package/scripts/lib/component-tree.ts +648 -0
- package/scripts/lib/css-class-check.mjs +326 -0
- package/scripts/lib/css-class-surface.mjs +292 -0
- package/scripts/lib/css-color-resolve.mjs +172 -0
- package/scripts/lib/css-local-check.mjs +267 -0
- package/scripts/lib/design-token-manifest.mjs +499 -0
- package/scripts/lib/doc-sections.mjs +248 -0
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-disable.mjs +141 -0
- package/scripts/lib/eslint-plugin.d.ts +64 -1
- package/scripts/lib/eslint-plugin.mjs +1285 -30
- package/scripts/lib/hand-imported-styles.mjs +326 -0
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +353 -0
- package/scripts/lib/local-components.mjs +177 -0
- package/scripts/lib/mcp-config.mjs +87 -58
- package/scripts/lib/migrate-fix.mjs +62 -3
- package/scripts/lib/project-variant-dts.mjs +122 -0
- package/scripts/lib/public-type-exports.mjs +273 -0
- package/scripts/lib/slot-key.mjs +147 -0
- package/scripts/lib/slot-renames.mjs +46 -0
- package/scripts/lib/squashed-slot-words.mjs +133 -0
- package/scripts/lib/validate-bb-markup.mjs +2213 -76
- package/scripts/lib/wrapper-props.mjs +188 -0
- package/dist/ai/BbBaseCheckbox.md +0 -49
- package/dist/ai/BbBaseCheckboxGroup.md +0 -64
- package/dist/ai/BbBaseColorInput.md +0 -65
- package/dist/ai/BbBaseColorPalette.md +0 -39
- package/dist/ai/BbBaseDatePicker.md +0 -43
- package/dist/ai/BbBaseDatePickerInput.md +0 -73
- package/dist/ai/BbBaseInputContainer.md +0 -48
- package/dist/ai/BbBaseNumberInput.md +0 -71
- package/dist/ai/BbBaseRadio.md +0 -46
- package/dist/ai/BbBaseRadioGroup.md +0 -64
- package/dist/ai/BbBaseRating.md +0 -52
- package/dist/ai/BbBaseSelect.md +0 -88
- package/dist/ai/BbBaseSlider.md +0 -56
- package/dist/ai/BbBaseSwitch.md +0 -49
- package/dist/ai/BbBaseSwitchGroup.md +0 -64
- package/dist/ai/BbBaseTag.md +0 -68
- package/dist/ai/BbBaseTextInput.md +0 -75
- package/dist/ai/BbBaseTextarea.md +0 -62
- package/dist/ai/BbBaseTimePickerInput.md +0 -62
- package/dist/ai/BbTabsPanes.md +0 -27
- package/dist/ai/CommonInputWrapper.md +0 -42
- package/dist/ai/source/BbBaseCheckbox.md +0 -461
- package/dist/ai/source/BbBaseCheckboxGroup.md +0 -554
- package/dist/ai/source/BbBaseColorInput.md +0 -431
- package/dist/ai/source/BbBaseColorPalette.md +0 -942
- package/dist/ai/source/BbBaseDatePicker.md +0 -1448
- package/dist/ai/source/BbBaseDatePickerInput.md +0 -1940
- package/dist/ai/source/BbBaseNumberInput.md +0 -617
- package/dist/ai/source/BbBaseRadio.md +0 -381
- package/dist/ai/source/BbBaseRadioGroup.md +0 -539
- package/dist/ai/source/BbBaseRating.md +0 -607
- package/dist/ai/source/BbBaseSelect.md +0 -945
- package/dist/ai/source/BbBaseSlider.md +0 -1144
- package/dist/ai/source/BbBaseSwitch.md +0 -246
- package/dist/ai/source/BbBaseSwitchGroup.md +0 -302
- package/dist/ai/source/BbBaseTag.md +0 -694
- package/dist/ai/source/BbBaseTextInput.md +0 -511
- package/dist/ai/source/BbBaseTextarea.md +0 -504
- package/dist/ai/source/BbBaseTimePickerInput.md +0 -1037
- package/dist/ai/source/BbTabsPanes.md +0 -377
- package/dist/ai/source/CommonInputWrapper.md +0 -584
- package/dist/alert-variants.d.ts +0 -19
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/badge-variants.d.ts +0 -19
- package/dist/button-variants.d.ts +0 -21
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +0 -40
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +0 -6
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +0 -145
- package/dist/components/BbBaseCheckbox/types.d.ts +0 -224
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +0 -6
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +0 -257
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +0 -43
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +0 -6
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +0 -184
- package/dist/components/BbBaseColorInput/types.d.ts +0 -219
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +0 -13
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +0 -395
- package/dist/components/BbBaseColorPalette/types.d.ts +0 -40
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +0 -20
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +0 -6
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +0 -407
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +0 -47
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +0 -318
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +0 -115
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +0 -116
- package/dist/components/BbBaseDatePicker/types.d.ts +0 -108
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +0 -11
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +0 -31
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -737
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +0 -204
- package/dist/components/BbBaseDatePickerInput/types.d.ts +0 -325
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +0 -6
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +0 -52
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +0 -6
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +0 -215
- package/dist/components/BbBaseNumberInput/types.d.ts +0 -211
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +0 -33
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/components/BbBaseRadio/types.d.ts +0 -179
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -179
- package/dist/components/BbBaseRadioGroup/types.d.ts +0 -223
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +0 -38
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +0 -6
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +0 -192
- package/dist/components/BbBaseRating/types.d.ts +0 -176
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +0 -19
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +0 -6
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +0 -311
- package/dist/components/BbBaseSelect/types.d.ts +0 -297
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +0 -35
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +0 -6
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +0 -340
- package/dist/components/BbBaseSlider/types.d.ts +0 -200
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +0 -35
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +0 -146
- package/dist/components/BbBaseSwitch/types.d.ts +0 -10
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +0 -6
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +0 -50
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +0 -6
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +0 -266
- package/dist/components/BbBaseTag/types.d.ts +0 -160
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +0 -45
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +0 -6
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +0 -200
- package/dist/components/BbBaseTextInput/types.d.ts +0 -209
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +0 -39
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +0 -6
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +0 -187
- package/dist/components/BbBaseTextarea/types.d.ts +0 -170
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +0 -27
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +0 -6
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -519
- package/dist/components/BbBaseTimePickerInput/types.d.ts +0 -151
- package/dist/components/BbTabs/BbTabsPanes.vue.d.ts +0 -16
- package/dist/components/BbTabs/BbTabsPanes.vue.js +0 -6
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +0 -35
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +0 -6
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +0 -107
- package/dist/confirm-variants.d.ts +0 -17
- package/dist/dropdown-item-variants.d.ts +0 -17
- package/dist/indicator-variants.d.ts +0 -20
- package/dist/locale-registry.d.ts +0 -37
- package/dist/toast-variants.d.ts +0 -20
- package/dist/tooltip-variants.d.ts +0 -17
- package/dist/types/InputDirection.d.ts +0 -15
- package/dist/validated/BbCheckbox.vue.d.ts +0 -29
- package/dist/validated/BbCheckbox.vue.js +0 -5
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbCheckboxGroup.vue.d.ts +0 -34
- package/dist/validated/BbCheckboxGroup.vue.js +0 -5
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbColorInput.vue.d.ts +0 -37
- package/dist/validated/BbColorInput.vue.js +0 -5
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbDatePickerInput.vue.d.ts +0 -41
- package/dist/validated/BbDatePickerInput.vue.js +0 -5
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -90
- package/dist/validated/BbDropzone.vue.d.ts +0 -24
- package/dist/validated/BbDropzone.vue.js +0 -5
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/validated/BbForm.vue.d.ts +0 -28
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +0 -42
- package/dist/validated/BbNumberInput.vue.d.ts +0 -36
- package/dist/validated/BbNumberInput.vue.js +0 -5
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbRadioGroup.vue.d.ts +0 -34
- package/dist/validated/BbRadioGroup.vue.js +0 -5
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -78
- package/dist/validated/BbRating.vue.d.ts +0 -30
- package/dist/validated/BbRating.vue.js +0 -5
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/validated/BbSelect.vue.d.ts +0 -46
- package/dist/validated/BbSelect.vue.js +0 -5
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +0 -109
- package/dist/validated/BbSlider.vue.d.ts +0 -36
- package/dist/validated/BbSlider.vue.js +0 -5
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +0 -69
- package/dist/validated/BbSwitch.vue.d.ts +0 -29
- package/dist/validated/BbSwitch.vue.js +0 -5
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbSwitchGroup.vue.d.ts +0 -34
- package/dist/validated/BbSwitchGroup.vue.js +0 -5
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbTag.vue.d.ts +0 -36
- package/dist/validated/BbTag.vue.js +0 -5
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextInput.vue.d.ts +0 -36
- package/dist/validated/BbTextInput.vue.js +0 -5
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextarea.vue.d.ts +0 -36
- package/dist/validated/BbTextarea.vue.js +0 -5
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +0 -70
- package/dist/validated/BbTimePickerInput.vue.d.ts +0 -37
- package/dist/validated/BbTimePickerInput.vue.js +0 -5
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -81
- package/dist/validated/index.d.ts +0 -43
- package/dist/validated/useValidatedField.d.ts +0 -93
- package/dist/validated/useValidatedField.js +0 -51
- package/dist/validated.js +0 -21
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts → BbCalendar/CalendarMonthPanel.vue.d.ts} +0 -0
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts → BbCalendar/CalendarYearPanel.vue.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.d.ts → composables/useTypeahead.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.js → composables/useTypeahead.js} +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { MaybeRef, Ref } from 'vue';
|
|
2
|
+
import { BbFormFieldEntry, BbFormServerErrors, BbFormSetErrorsOptions } from '../../composables/useBbFormContext';
|
|
3
|
+
import { ValidationMode } from '../../types/Config';
|
|
4
|
+
import { BbFormInvalidPayload, BbFormSchema, BbFormSubmitValues } from './formSchema';
|
|
5
|
+
declare const __VLS_export: <S extends BbFormSchema = BbFormSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<{
|
|
7
|
+
/**
|
|
8
|
+
* Explicit id, so anything outside the form can read and drive it through
|
|
9
|
+
* `useBbFormContext(id)` — a dialog footer's submit button, a page toolbar,
|
|
10
|
+
* a leave guard. Omit it when the form is self-contained: the slot scope
|
|
11
|
+
* already carries the same state for chrome that lives inside.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* One schema for the whole form: any Standard Schema — Zod (3.24+, 4),
|
|
16
|
+
* Valibot, ArkType, Yup, Joi, Effect — passed as it is, no adapter (the
|
|
17
|
+
* vee-validate option underneath is `validationSchema`). Errors land on the field
|
|
18
|
+
* whose `name` is the issue path (`address.city` or `address[city]`,
|
|
19
|
+
* `items.0.qty`), and `@submit` receives the schema's output (transforms
|
|
20
|
+
* applied) typed from it, and the required asterisk comes from the schema
|
|
21
|
+
* (every library above). A vee-validate `toTypedSchema(...)` or rules
|
|
22
|
+
* object works too.
|
|
23
|
+
*
|
|
24
|
+
* Reactive: pass a `computed` to validate a wizard one step at a time. It
|
|
25
|
+
* must be set when the form mounts; it can change, not appear later. While
|
|
26
|
+
* a schema is set, per-field `rules` are ignored (vee-validate's design).
|
|
27
|
+
*/
|
|
28
|
+
schema?: MaybeRef<S | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Keep a field's value (and its place in `@submit`) when it unmounts —
|
|
31
|
+
* the `v-if` wizard step you left, a collapsed section. Off, an unmounted
|
|
32
|
+
* field drops out of the values.
|
|
33
|
+
*/
|
|
34
|
+
keepValuesOnUnmount?: boolean | Ref<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* When the fields inside check themselves while the user works:
|
|
37
|
+
* `aggressive`, `balanced`, `lazy`, `submit-only` or `submit-live` (see
|
|
38
|
+
* `ValidationMode`). A field's own `validation-mode` wins. Unset, the app's
|
|
39
|
+
* `formControls.validationMode` applies (`'balanced'` by default).
|
|
40
|
+
*/
|
|
41
|
+
validationMode?: ValidationMode;
|
|
42
|
+
/**
|
|
43
|
+
* Any reactive object (a `reactive({})`, a `ref({})`, Inertia's `useForm()`)
|
|
44
|
+
* that holds the fields' values, both ways, updated IN PLACE, never
|
|
45
|
+
* replaced. A field without its own `v-model` starts from the value at its
|
|
46
|
+
* path (its `name`, else its slugged label), writes every change back there
|
|
47
|
+
* (nested paths created: `lines[0][qty]` → `lines[0].qty`), and follows
|
|
48
|
+
* the page's own writes (`values.email = 'x'`, `form.reset()`). Keys no
|
|
49
|
+
* field owns are never touched. Nothing is written on mount. A field's own
|
|
50
|
+
* `v-model` wins over it.
|
|
51
|
+
*/
|
|
52
|
+
modelValue?: Record<string, any>;
|
|
53
|
+
} & {
|
|
54
|
+
onSubmit?: ((values: BbFormSubmitValues<S>) => any) | undefined;
|
|
55
|
+
onInvalid?: ((payload: BbFormInvalidPayload) => any) | undefined;
|
|
56
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
57
|
+
}> & (typeof globalThis extends {
|
|
58
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
59
|
+
} ? P : {});
|
|
60
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
61
|
+
$el: Readonly<import('vue').ShallowRef<HTMLFormElement | null>>;
|
|
62
|
+
}>) => void;
|
|
63
|
+
attrs: any;
|
|
64
|
+
slots: {
|
|
65
|
+
default?: (props: {
|
|
66
|
+
touched: boolean;
|
|
67
|
+
dirty: boolean;
|
|
68
|
+
valid: boolean;
|
|
69
|
+
pending: boolean;
|
|
70
|
+
initialValues?: Partial<import('vee-validate').GenericObject> | undefined;
|
|
71
|
+
errors: Record<string, string[]>;
|
|
72
|
+
fields: Record<string, BbFormFieldEntry>;
|
|
73
|
+
isSubmitting: boolean;
|
|
74
|
+
removeField: (path: string) => void;
|
|
75
|
+
resetForm: (state?: Partial<import('vee-validate').FormState<import('vee-validate').GenericObject>> | undefined, opts?: Partial<import('vee-validate').ResetFormOpts>) => void;
|
|
76
|
+
setErrors: (serverErrors: BbFormServerErrors, options?: BbFormSetErrorsOptions) => void;
|
|
77
|
+
snapshot: (next?: Record<string, unknown>) => void;
|
|
78
|
+
submitCount: number;
|
|
79
|
+
unmatchedErrors: Record<string, string[]>;
|
|
80
|
+
validate: (opts?: Partial<import('vee-validate').ValidationOptions>) => Promise<import('vee-validate').FormValidationResult<import('vee-validate').GenericObject, import('vee-validate').GenericObject>>;
|
|
81
|
+
values: import('vee-validate').GenericObject;
|
|
82
|
+
}) => any;
|
|
83
|
+
};
|
|
84
|
+
emit: ((evt: "submit", values: BbFormSubmitValues<S>) => void) & ((evt: "invalid", payload: BbFormInvalidPayload) => void) & ((evt: "update:modelValue", value: Record<string, any>) => void);
|
|
85
|
+
}>) => import('vue').VNode & {
|
|
86
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
87
|
+
};
|
|
88
|
+
declare const _default: typeof __VLS_export;
|
|
89
|
+
export default _default;
|
|
90
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
91
|
+
[K in keyof T]: T[K];
|
|
92
|
+
} : {
|
|
93
|
+
[K in keyof T as K]: T[K];
|
|
94
|
+
}) & {};
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { isEqual as e } from "../../utilities/functions/isEqual.js";
|
|
2
|
+
import { BB_FORM_CONNECTION as t } from "../../composables/useFormBinding.js";
|
|
3
|
+
import { messagesByKey as n, useBbFormContextHost as r } from "../../composables/useBbFormContext.js";
|
|
4
|
+
import { BB_FORM_FIELDS as i, byDocumentOrder as a, focusTarget as o } from "./formFields.js";
|
|
5
|
+
import { bindFormField as ee, nameToPath as s } from "./bindFormField.js";
|
|
6
|
+
import { customFieldsOf as te } from "../../composables/useBbFormField.js";
|
|
7
|
+
import ne from "./BbFormCustomField.js";
|
|
8
|
+
import { schemaRequires as re, toFormSchema as ie } from "./formSchema.js";
|
|
9
|
+
import { Fragment as ae, computed as c, createBlock as oe, createElementBlock as se, defineComponent as ce, getCurrentInstance as le, mergeProps as ue, nextTick as l, openBlock as u, provide as d, reactive as f, ref as de, renderList as fe, renderSlot as pe, shallowReactive as me, unref as p, useTemplateRef as he, withModifiers as ge } from "vue";
|
|
10
|
+
import { useForm as _e } from "vee-validate";
|
|
11
|
+
//#region src/components/BbForm/BbForm.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var ve = /*@__PURE__*/ ce({
|
|
13
|
+
__name: "BbForm",
|
|
14
|
+
props: {
|
|
15
|
+
id: {},
|
|
16
|
+
schema: {},
|
|
17
|
+
keepValuesOnUnmount: { type: [Boolean, Object] },
|
|
18
|
+
validationMode: {},
|
|
19
|
+
modelValue: {}
|
|
20
|
+
},
|
|
21
|
+
emits: [
|
|
22
|
+
"submit",
|
|
23
|
+
"invalid",
|
|
24
|
+
"update:modelValue"
|
|
25
|
+
],
|
|
26
|
+
setup(ce, { expose: ve, emit: ye }) {
|
|
27
|
+
let m = ce, h = ye, be = c(() => ie(p(m.schema))), { handleSubmit: xe, isSubmitting: Se, submitCount: g, resetForm: Ce, meta: _, values: v, errors: we, validate: y, setFieldError: b, setValues: x } = _e({
|
|
28
|
+
validationSchema: be.value ? be : void 0,
|
|
29
|
+
keepValuesOnUnmount: c(() => p(m.keepValuesOnUnmount) ?? !1)
|
|
30
|
+
}), S = (e) => e.replace(/\.(0|[1-9]\d*)(?=\.|$)/g, "[$1]"), C = me(/* @__PURE__ */ new Set()), w = f({}), T = f({}), E = {}, D = () => {
|
|
31
|
+
for (let e of Object.keys(T)) delete T[e];
|
|
32
|
+
for (let e of Object.keys(E)) delete E[e];
|
|
33
|
+
}, O = (e) => [...C].some((t) => S(t.name()) === e), Te = te(m.id);
|
|
34
|
+
d(t, { bind: ee }), d(i, {
|
|
35
|
+
isRequired: (e) => re(p(m.schema), e),
|
|
36
|
+
validationMode: () => m.validationMode,
|
|
37
|
+
register: (e) => {
|
|
38
|
+
C.add(e);
|
|
39
|
+
let t = S(e.name());
|
|
40
|
+
delete w[t];
|
|
41
|
+
let n = T[t];
|
|
42
|
+
n && (b(t, n), E[t] = n, delete T[t]);
|
|
43
|
+
let r = Object.keys(j.value).find((e) => S(e) === t);
|
|
44
|
+
if (r) {
|
|
45
|
+
let e = j.value[r];
|
|
46
|
+
b(t, e), E[t] = e;
|
|
47
|
+
let { [r]: n, ...i } = j.value;
|
|
48
|
+
j.value = i;
|
|
49
|
+
}
|
|
50
|
+
return (t) => {
|
|
51
|
+
C.delete(e), K.add(e.name()), (U(e.name()) || m.modelValue) && X();
|
|
52
|
+
let n = S(e.name()), r = (E[n] ?? []).filter((e) => t.errors.includes(e));
|
|
53
|
+
delete E[n], !(!p(m.keepValuesOnUnmount) || O(n)) && (r.length && (T[n] = r), w[n] = {
|
|
54
|
+
key: e.name(),
|
|
55
|
+
label: e.label(),
|
|
56
|
+
validationLabel: e.validationLabel(),
|
|
57
|
+
dirty: t.dirty,
|
|
58
|
+
touched: t.touched
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
moved: (e) => {
|
|
63
|
+
q.add(e), X();
|
|
64
|
+
},
|
|
65
|
+
model: () => m.modelValue,
|
|
66
|
+
read: (e) => G(m.modelValue, e),
|
|
67
|
+
write: (t, n) => {
|
|
68
|
+
let r = m.modelValue;
|
|
69
|
+
!r || e(G(r, t), n) || (Fe(r, t, n), h("update:modelValue", r));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
let k = c(() => {
|
|
73
|
+
let e = {};
|
|
74
|
+
for (let [t, n] of Object.entries(w)) {
|
|
75
|
+
let { key: r, ...i } = n, a = we.value[t];
|
|
76
|
+
e[r] = {
|
|
77
|
+
...i,
|
|
78
|
+
mounted: !1,
|
|
79
|
+
errors: [...T[t] ?? [], ...a ? [a] : []]
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
for (let t of C) e[t.name()] = {
|
|
83
|
+
mounted: !0,
|
|
84
|
+
label: t.label(),
|
|
85
|
+
validationLabel: t.validationLabel(),
|
|
86
|
+
errors: [...t.errors()],
|
|
87
|
+
dirty: t.dirty(),
|
|
88
|
+
touched: t.touched()
|
|
89
|
+
};
|
|
90
|
+
return e;
|
|
91
|
+
}), A = c(() => {
|
|
92
|
+
let e = {};
|
|
93
|
+
for (let [t, n] of Object.entries(k.value)) n.errors.length && (e[t] = n.errors);
|
|
94
|
+
return e;
|
|
95
|
+
}), j = de({}), M = (e, t = {}) => {
|
|
96
|
+
let r = document.activeElement, i = new Map(Object.keys(k.value).map((e) => [S(s(e)), e]));
|
|
97
|
+
D();
|
|
98
|
+
let a = {}, o = {};
|
|
99
|
+
for (let [t, r] of Object.entries(n(e))) {
|
|
100
|
+
let e = S(s(t));
|
|
101
|
+
if (!i.has(e)) {
|
|
102
|
+
a[s(t)] = r;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
o[i.get(e)] = r, O(e) ? (b(e, r), E[e] = r) : T[e] = r;
|
|
106
|
+
}
|
|
107
|
+
j.value = a, $(), t.focus !== !1 && Object.keys(o).length && Ee(o, r);
|
|
108
|
+
}, Ee = async (e, t) => {
|
|
109
|
+
await l();
|
|
110
|
+
let n = Q.value, r = document.activeElement;
|
|
111
|
+
r !== t && r && r !== document.body || (!r || r === document.body ? g.value === 0 : !n?.contains(r)) || I(e);
|
|
112
|
+
}, N = (e) => {
|
|
113
|
+
let t = JSON.parse(JSON.stringify(v)), n = e ? P(t, e) : t, r = {};
|
|
114
|
+
for (let e of C) {
|
|
115
|
+
let t = e.errors();
|
|
116
|
+
t.length && (r[S(e.name())] = [...t]);
|
|
117
|
+
}
|
|
118
|
+
let i = g.value;
|
|
119
|
+
Ce({
|
|
120
|
+
values: n,
|
|
121
|
+
submitCount: i
|
|
122
|
+
}, { force: !0 });
|
|
123
|
+
for (let [e, t] of Object.entries(r)) b(e, t);
|
|
124
|
+
for (let e of Object.values(w)) Object.assign(e, {
|
|
125
|
+
dirty: !1,
|
|
126
|
+
touched: !1
|
|
127
|
+
});
|
|
128
|
+
}, P = (e, t) => {
|
|
129
|
+
let n = { ...e };
|
|
130
|
+
for (let [e, r] of Object.entries(t)) {
|
|
131
|
+
let t = n[e];
|
|
132
|
+
n[e] = F(t) && F(r) ? P(t, r) : r;
|
|
133
|
+
}
|
|
134
|
+
return n;
|
|
135
|
+
}, F = (e) => !!e && typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype, I = (e) => {
|
|
136
|
+
let t = Q.value;
|
|
137
|
+
if (!t) return;
|
|
138
|
+
let n = [...C].filter((t) => e[t.name()] !== void 0).map((e) => e.el()).filter((e) => !!e && t.contains(e)).sort(a);
|
|
139
|
+
for (let e of n) {
|
|
140
|
+
let t = o(e);
|
|
141
|
+
if (t) {
|
|
142
|
+
t.focus();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}, De = async (e) => {
|
|
147
|
+
let t = {};
|
|
148
|
+
for (let [n, r] of Object.entries(e.results ?? {})) {
|
|
149
|
+
let e = r?.errors;
|
|
150
|
+
e?.length && (t[s(n)] = [...e]);
|
|
151
|
+
}
|
|
152
|
+
for (let [n, r] of Object.entries(e.errors ?? {})) r && !t[s(n)] && (t[s(n)] = [r]);
|
|
153
|
+
let n = {
|
|
154
|
+
errors: t,
|
|
155
|
+
values: e.values
|
|
156
|
+
}, r = document.activeElement;
|
|
157
|
+
h("invalid", n), await l();
|
|
158
|
+
let i = document.activeElement;
|
|
159
|
+
i !== r && i && i !== document.body || I(n.errors);
|
|
160
|
+
}, L = le(), Oe = !1, ke = (e) => {
|
|
161
|
+
let t = L?.appContext.config.errorHandler;
|
|
162
|
+
t ? t(e, L?.proxy ?? null, "component event handler") : console.error(e);
|
|
163
|
+
}, Ae = (e) => typeof e?.then == "function", je = (e) => {
|
|
164
|
+
let t = L?.vnode.props, n = (e) => Array.isArray(e) ? e : typeof e == "function" ? [e] : [], r = n(t?.onSubmit);
|
|
165
|
+
if (!Oe) {
|
|
166
|
+
let e = n(t?.onSubmitOnce);
|
|
167
|
+
e.length && (Oe = !0, r.push(...e));
|
|
168
|
+
}
|
|
169
|
+
if (!r.length) return;
|
|
170
|
+
let i = [];
|
|
171
|
+
for (let t of r) try {
|
|
172
|
+
let n = t(e);
|
|
173
|
+
Ae(n) && i.push(Promise.resolve(n).catch(ke));
|
|
174
|
+
} catch (e) {
|
|
175
|
+
ke(e);
|
|
176
|
+
}
|
|
177
|
+
return i.length ? Promise.all(i) : void 0;
|
|
178
|
+
}, Me = xe((e) => je(e), De), R = (e) => e.split(/\.|\[(\d+)\]/).filter((e) => e !== void 0 && e !== ""), z = (e, t) => e === t || e.startsWith(`${t}.`) || e.startsWith(`${t}[`), B = (e) => Array.isArray(e) ? e.map(B) : e && Object.getPrototypeOf(e) === Object.prototype ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, B(t)])) : e, V = (e) => {
|
|
179
|
+
let t = S(s(e)), n = R(t);
|
|
180
|
+
if (!n.length) return;
|
|
181
|
+
let [r, ...i] = n, a = v[r];
|
|
182
|
+
if (!i.length) r in v && x({ [r]: void 0 }, !1);
|
|
183
|
+
else if (a && typeof a == "object") {
|
|
184
|
+
let e = B(a), t = e;
|
|
185
|
+
for (let e of i.slice(0, -1)) if (t = t?.[e], !t || typeof t != "object") break;
|
|
186
|
+
let n = i[i.length - 1];
|
|
187
|
+
t && typeof t == "object" && (Array.isArray(t) && Number(n) === t.length - 1 ? --t.length : n in t && (t[n] = void 0), x({ [r]: e }, !1));
|
|
188
|
+
}
|
|
189
|
+
for (let e of Object.keys(we.value)) z(S(e), t) && b(e, void 0);
|
|
190
|
+
for (let e of Object.keys(T)) z(e, t) && delete T[e];
|
|
191
|
+
for (let e of Object.keys(E)) z(e, t) && delete E[e];
|
|
192
|
+
j.value = Object.fromEntries(Object.entries(j.value).filter(([e]) => !z(S(e), t)));
|
|
193
|
+
for (let e of Object.keys(w)) z(e, t) && delete w[e];
|
|
194
|
+
$();
|
|
195
|
+
}, H = (e) => R(s(e)).join("."), U = (e) => {
|
|
196
|
+
let t = R(s(e));
|
|
197
|
+
for (let e = t.length - 1; e > 0; e--) if (/^(0|[1-9]\d*)$/.test(t[e])) return {
|
|
198
|
+
container: t.slice(0, e).join("."),
|
|
199
|
+
index: Number(t[e])
|
|
200
|
+
};
|
|
201
|
+
return null;
|
|
202
|
+
}, Ne = (e) => e.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, v), W = (e) => {
|
|
203
|
+
let t = H(e);
|
|
204
|
+
return [...C].some((e) => {
|
|
205
|
+
let n = H(e.name());
|
|
206
|
+
return n === t || n.startsWith(`${t}.`);
|
|
207
|
+
});
|
|
208
|
+
}, Pe = (e) => {
|
|
209
|
+
let t = Ne(e);
|
|
210
|
+
if (!Array.isArray(t)) return;
|
|
211
|
+
let n = -1;
|
|
212
|
+
for (let t of C) {
|
|
213
|
+
let r = U(t.name());
|
|
214
|
+
r && r.container === e && (n = Math.max(n, r.index));
|
|
215
|
+
}
|
|
216
|
+
let r = G(m.modelValue, e);
|
|
217
|
+
Array.isArray(r) && (n = Math.max(n, r.length - 1));
|
|
218
|
+
for (let r = t.length - 1; r > n; r--) V(`${e}.${r}`);
|
|
219
|
+
}, G = (e, t) => R(s(t)).reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e), Fe = (e, t, n) => {
|
|
220
|
+
let r = R(s(t)), i = e;
|
|
221
|
+
r.slice(0, -1).forEach((e, t) => {
|
|
222
|
+
let n = i[e];
|
|
223
|
+
(!n || typeof n != "object") && (i[e] = /^(0|[1-9]\d*)$/.test(r[t + 1]) ? [] : {}), i = i[e];
|
|
224
|
+
}), i[r[r.length - 1]] = n;
|
|
225
|
+
}, Ie = (e, t) => {
|
|
226
|
+
let n = R(s(t)), r = G(e, n.slice(0, -1).join(".")), i = n[n.length - 1];
|
|
227
|
+
!r || typeof r != "object" || Array.isArray(r) || i in r && (delete r[i], h("update:modelValue", e));
|
|
228
|
+
}, K = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set(), J = /* @__PURE__ */ new Set(), Y = !1, X = () => {
|
|
229
|
+
Y || (Y = !0, l().then(() => l()).then(Le));
|
|
230
|
+
}, Le = () => {
|
|
231
|
+
Y = !1;
|
|
232
|
+
for (let e of C) e.reassert();
|
|
233
|
+
let e = !!p(m.keepValuesOnUnmount), t = /* @__PURE__ */ new Set();
|
|
234
|
+
if (!e) for (let e of C) {
|
|
235
|
+
let n = U(e.name());
|
|
236
|
+
n && t.add(n.container);
|
|
237
|
+
}
|
|
238
|
+
for (let e of [...q, ...J]) {
|
|
239
|
+
let n = U(e), r = n !== null && H(e) === `${n.container}.${n.index}`;
|
|
240
|
+
n && (r || q.has(e)) ? (r && J.has(e) && !W(e) && V(e), t.add(n.container)) : W(e) || V(e);
|
|
241
|
+
}
|
|
242
|
+
let n = m.modelValue;
|
|
243
|
+
if (n) {
|
|
244
|
+
for (let e of C) {
|
|
245
|
+
let n = U(e.name());
|
|
246
|
+
n && t.add(n.container);
|
|
247
|
+
}
|
|
248
|
+
for (let r of K) {
|
|
249
|
+
let i = U(r);
|
|
250
|
+
i ? t.add(i.container) : !e && !W(r) && Ie(n, r);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
K.clear(), q.clear(), J.clear();
|
|
254
|
+
for (let e of t) Pe(e);
|
|
255
|
+
$();
|
|
256
|
+
}, Re = (e) => {
|
|
257
|
+
J.add(e), X();
|
|
258
|
+
}, ze = (e) => (j.value = {}, Me(e)), Be = (e, t) => {
|
|
259
|
+
let n = e;
|
|
260
|
+
for (let e of t.split(/\.|\[(\d+)\]/).filter(Boolean)) {
|
|
261
|
+
if (!n || typeof n != "object" || !(e in n)) return !1;
|
|
262
|
+
n = n[e];
|
|
263
|
+
}
|
|
264
|
+
return !0;
|
|
265
|
+
}, Z = (...e) => {
|
|
266
|
+
Ce(...e), j.value = {}, D();
|
|
267
|
+
for (let [e, t] of Object.entries(w)) Be(v, e) ? Object.assign(t, {
|
|
268
|
+
dirty: !1,
|
|
269
|
+
touched: !1
|
|
270
|
+
}) : delete w[e];
|
|
271
|
+
}, Q = he("form-el"), $ = r(() => m.id, {
|
|
272
|
+
state: () => ({
|
|
273
|
+
valid: _.value.valid,
|
|
274
|
+
dirty: _.value.dirty,
|
|
275
|
+
touched: _.value.touched,
|
|
276
|
+
pending: _.value.pending,
|
|
277
|
+
submitting: Se.value,
|
|
278
|
+
submitCount: g.value,
|
|
279
|
+
values: { ...v },
|
|
280
|
+
errors: A.value,
|
|
281
|
+
fields: k.value,
|
|
282
|
+
unmatchedErrors: j.value
|
|
283
|
+
}),
|
|
284
|
+
actions: {
|
|
285
|
+
submit: () => void ze(),
|
|
286
|
+
reset: () => Z(),
|
|
287
|
+
snapshot: N,
|
|
288
|
+
validate: async () => (await y()).valid,
|
|
289
|
+
setErrors: M,
|
|
290
|
+
removeField: Re
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
return ve({ $el: Q }), (e, t) => (u(), se("form", {
|
|
294
|
+
ref: "form-el",
|
|
295
|
+
novalidate: "",
|
|
296
|
+
onReset: t[0] ||= ge((e) => Z(), ["prevent"]),
|
|
297
|
+
onSubmit: ze
|
|
298
|
+
}, [pe(e.$slots, "default", ue({
|
|
299
|
+
errors: A.value,
|
|
300
|
+
fields: k.value,
|
|
301
|
+
isSubmitting: p(Se),
|
|
302
|
+
removeField: Re,
|
|
303
|
+
resetForm: Z,
|
|
304
|
+
setErrors: M,
|
|
305
|
+
snapshot: N,
|
|
306
|
+
submitCount: p(g),
|
|
307
|
+
unmatchedErrors: j.value,
|
|
308
|
+
validate: p(y),
|
|
309
|
+
values: p(v)
|
|
310
|
+
}, p(_))), (u(!0), se(ae, null, fe(p(Te), (e) => (u(), oe(p(ne), {
|
|
311
|
+
key: e.key,
|
|
312
|
+
spec: e
|
|
313
|
+
}, null, 8, ["spec"]))), 128))], 544));
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
//#endregion
|
|
317
|
+
export { ve as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { BbFormFieldSpec } from '../../composables/useBbFormField';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
spec: {
|
|
5
|
+
type: PropType<BbFormFieldSpec>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, () => null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
|
+
spec: {
|
|
10
|
+
type: PropType<BbFormFieldSpec>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BB_FORM_FIELDS as e } from "./formFields.js";
|
|
2
|
+
import { nameToPath as t } from "./bindFormField.js";
|
|
3
|
+
import { defineComponent as n, inject as r, onBeforeUnmount as i, onMounted as a, watch as o } from "vue";
|
|
4
|
+
import { useField as s } from "vee-validate";
|
|
5
|
+
//#region src/components/BbForm/BbFormCustomField.ts
|
|
6
|
+
var c = n({
|
|
7
|
+
name: "BbFormCustomField",
|
|
8
|
+
props: { spec: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: !0
|
|
11
|
+
} },
|
|
12
|
+
setup(n) {
|
|
13
|
+
let c = n.spec, l = r(e, null), u = () => t(c.name), d = c.value === void 0 ? l?.read(u()) : c.value, { value: f, errors: p, meta: m, validate: h, setValue: g } = s(u, c.rules, {
|
|
14
|
+
initialValue: d,
|
|
15
|
+
validateOnValueUpdate: !1,
|
|
16
|
+
label: () => c.validationLabel ?? c.name
|
|
17
|
+
});
|
|
18
|
+
c.setValue = (e) => {
|
|
19
|
+
g(e, !1), l?.model() && l.write(u(), e);
|
|
20
|
+
}, c.validate = async () => (await h()).valid, o(f, (e) => c.value = e, { immediate: !0 }), o(p, (e) => c.errors = [...e], { immediate: !0 }), c.bound = !0;
|
|
21
|
+
let _;
|
|
22
|
+
return a(() => {
|
|
23
|
+
_ = l?.register({
|
|
24
|
+
name: u,
|
|
25
|
+
el: () => document.querySelector(`[data-bb-field="${CSS.escape(c.name)}"]`),
|
|
26
|
+
label: () => c.validationLabel,
|
|
27
|
+
validationLabel: () => c.validationLabel,
|
|
28
|
+
errors: () => p.value,
|
|
29
|
+
dirty: () => m.dirty,
|
|
30
|
+
touched: () => m.touched,
|
|
31
|
+
reassert: () => {}
|
|
32
|
+
});
|
|
33
|
+
}), i(() => {
|
|
34
|
+
_?.({
|
|
35
|
+
dirty: m.dirty,
|
|
36
|
+
touched: m.touched,
|
|
37
|
+
errors: [...p.value]
|
|
38
|
+
}), c.bound = !1, c.setValue = void 0, c.validate = void 0;
|
|
39
|
+
}), () => null;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { c as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldBinding, FieldBindingOptions } from '../../composables/useFormBinding';
|
|
2
|
+
/**
|
|
3
|
+
* Q53.22 — a native form `name` as a vee-validate path. Brackets are how an
|
|
4
|
+
* HTML form (and PHP / Laravel on the other end) spells nesting, so both
|
|
5
|
+
* spellings reach the same field: `address[city]` → `address.city`,
|
|
6
|
+
* `users[0][name]` → `users.0.name`, and a trailing `[]` (the "post every
|
|
7
|
+
* value" suffix) goes: `tags[]` → `tags`. Dots are accepted as they are.
|
|
8
|
+
*/
|
|
9
|
+
export declare const nameToPath: (name: string) => string;
|
|
10
|
+
/**
|
|
11
|
+
* The binding a `BbForm` gives every form control inside it: binds the field to
|
|
12
|
+
* vee-validate, keeps `modelValue` and the field value in sync, merges the
|
|
13
|
+
* engine's errors with any external `errors` prop, and derives the required
|
|
14
|
+
* asterisk. The control routes its events through it (useFormBinding).
|
|
15
|
+
*/
|
|
16
|
+
export declare function bindFormField<T>(props: Record<string, any>, emit: (event: any, ...args: any[]) => void, opts: FieldBindingOptions): FieldBinding<T>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import { useLocale as t } from "../../composables/useLocale.js";
|
|
3
|
+
import { isEqual as n } from "../../utilities/functions/isEqual.js";
|
|
4
|
+
import { deburr as r } from "../../utilities/functions/deburr.js";
|
|
5
|
+
import { BB_FORM_FIELDS as i } from "./formFields.js";
|
|
6
|
+
import { computed as a, getCurrentInstance as o, inject as s, onBeforeMount as c, onBeforeUnmount as l, onMounted as u, watch as d } from "vue";
|
|
7
|
+
import { useField as f } from "vee-validate";
|
|
8
|
+
//#region src/components/BbForm/bindFormField.ts
|
|
9
|
+
var p = (e) => r(e).replace(/\s+/g, "").toLowerCase(), m = (e) => e.replace(/\[\]$/, "").replace(/\[([^\]]*)\]/g, ".$1").replace(/^\./, ""), h = (e) => typeof e == "string" ? e.split("|").some((e) => e.trim().split(":")[0] === "required") : e && typeof e == "object" && !Array.isArray(e) ? !!e.required : !1;
|
|
10
|
+
function g(r, g, _) {
|
|
11
|
+
let v = a(() => _.identifierFallback()), y = a(() => {
|
|
12
|
+
let e = typeof r.name == "string" ? r.name.trim() : "";
|
|
13
|
+
return e ? m(e) : v.value ? p(v.value) : void 0;
|
|
14
|
+
}), { t: b } = t(), x = b("common.fieldLabel"), S = a(() => r.validationLabel || v.value || x.value);
|
|
15
|
+
c(() => {
|
|
16
|
+
if (!y.value) throw Error(`[bitboss-ui] ${_.componentName} is inside a BbForm: give the field a \`label\` or a \`name\`, or \`formless\` if it is not form data.`);
|
|
17
|
+
});
|
|
18
|
+
let C = e(), w = a(() => r.rules), T = a(() => y.value ?? ""), E = s(i, null), D = a(() => r.validationMode ?? E?.validationMode() ?? C.formControls?.validationMode ?? "balanced"), O = () => I.value.length > 0, k = () => D.value === "aggressive" || O() && (D.value === "balanced" || D.value === "submit-live"), A = () => D.value === "aggressive" || D.value === "balanced" || D.value === "lazy", j;
|
|
19
|
+
E && l(() => j?.({
|
|
20
|
+
dirty: L.dirty,
|
|
21
|
+
touched: L.touched,
|
|
22
|
+
errors: [...I.value]
|
|
23
|
+
}));
|
|
24
|
+
let M = () => r.modelValue !== void 0, N = () => M() ? r.modelValue : E?.model() ? E.read(T.value) : void 0, P = (e) => {
|
|
25
|
+
!M() && E?.model() && E.write(T.value, e), g("update:modelValue", e);
|
|
26
|
+
}, { value: F, errors: I, meta: L, validate: R, setValue: z } = f(T, w, {
|
|
27
|
+
initialValue: N(),
|
|
28
|
+
validateOnValueUpdate: !1,
|
|
29
|
+
label: () => S.value
|
|
30
|
+
});
|
|
31
|
+
d(() => N(), (e, t) => {
|
|
32
|
+
if (n(e, t)) return;
|
|
33
|
+
let r = !n(e, F.value);
|
|
34
|
+
F.value = e, r && O() && D.value !== "lazy" && D.value !== "submit-only" && R();
|
|
35
|
+
});
|
|
36
|
+
let B = () => {
|
|
37
|
+
let e = N();
|
|
38
|
+
e !== void 0 && (n(F.value, e) || z(e, !1));
|
|
39
|
+
};
|
|
40
|
+
E && d(T, (e, t) => {
|
|
41
|
+
!t || e === t || (B(), E.moved(t));
|
|
42
|
+
}, { flush: "sync" }), d(F, (e) => {
|
|
43
|
+
n(e, N()) || P(e);
|
|
44
|
+
}, { flush: "post" });
|
|
45
|
+
let V = a(() => {
|
|
46
|
+
let e = [...I.value];
|
|
47
|
+
return r.errors && e.push(...[].concat(r.errors)), e;
|
|
48
|
+
});
|
|
49
|
+
if (E) {
|
|
50
|
+
let e = o();
|
|
51
|
+
u(() => {
|
|
52
|
+
j = E.register({
|
|
53
|
+
name: () => T.value,
|
|
54
|
+
el: () => {
|
|
55
|
+
let t = e?.proxy?.$el;
|
|
56
|
+
return t instanceof Element ? t : null;
|
|
57
|
+
},
|
|
58
|
+
label: () => v.value,
|
|
59
|
+
validationLabel: () => r.validationLabel,
|
|
60
|
+
errors: () => V.value,
|
|
61
|
+
dirty: () => L.dirty,
|
|
62
|
+
touched: () => L.touched,
|
|
63
|
+
reassert: B
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
let H = a(() => !!E?.isRequired(T.value)), U = a(() => C.requiredAsterisk && (!!r.required || h(r.rules) || H.value)), W = a(() => r.modelValue === void 0 ? F.value === void 0 ? (_.emptyValue ?? (() => null))() : F.value : r.modelValue), G = a(() => !!r.required || H.value), K = (e) => {
|
|
68
|
+
z(e, k()), P(e);
|
|
69
|
+
}, q = () => {
|
|
70
|
+
L.touched = !0, A() && R();
|
|
71
|
+
}, J = () => k() || A();
|
|
72
|
+
return {
|
|
73
|
+
model: W,
|
|
74
|
+
errors: V,
|
|
75
|
+
required: G,
|
|
76
|
+
showAsterisk: U,
|
|
77
|
+
setModelValue: K,
|
|
78
|
+
leave: q,
|
|
79
|
+
commit: (e) => {
|
|
80
|
+
z(e, J()), P(e);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { g as bindFormField, m as nameToPath };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { ValidationMode } from '../../types/Config';
|
|
3
|
+
export type BbFormField = {
|
|
4
|
+
/** The field's vee-validate path (its `name` as a path, or its slugged label). */
|
|
5
|
+
name: () => string;
|
|
6
|
+
/** The field's root element, once mounted. */
|
|
7
|
+
el: () => Element | null;
|
|
8
|
+
/** The visible label (the legend for a group). */
|
|
9
|
+
label: () => string | undefined;
|
|
10
|
+
/** The `validation-label` prop. */
|
|
11
|
+
validationLabel: () => string | undefined;
|
|
12
|
+
/** Every current message: rules, schema, server and the `errors` prop. */
|
|
13
|
+
errors: () => string[];
|
|
14
|
+
dirty: () => boolean;
|
|
15
|
+
touched: () => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Q54.3 — write the value the page owns for this field (its `v-model`)
|
|
18
|
+
* back to its path, when the page owns one. The form calls it after a
|
|
19
|
+
* render that moved or removed fields, because vee-validate keys values by
|
|
20
|
+
* path: a field that moved (an id-keyed row after a delete) would otherwise
|
|
21
|
+
* read the leftover at its new path, and a removed sibling's unmount can
|
|
22
|
+
* unset it.
|
|
23
|
+
*/
|
|
24
|
+
reassert: () => void;
|
|
25
|
+
};
|
|
26
|
+
export type BbFormFieldsContext = {
|
|
27
|
+
/** The current schema marks the field at this path as mandatory. */
|
|
28
|
+
isRequired: (name: string) => boolean;
|
|
29
|
+
/** The form's `validation-mode`, when it sets one (a field's own wins). */
|
|
30
|
+
validationMode: () => ValidationMode | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Registers a mounted field; returns the function its unmount calls, with
|
|
33
|
+
* `dirty` / `touched` / its vee-validate messages as the user left them (a
|
|
34
|
+
* preserving form keeps what still applies).
|
|
35
|
+
*/
|
|
36
|
+
register: (field: BbFormField) => (left: {
|
|
37
|
+
dirty: boolean;
|
|
38
|
+
touched: boolean;
|
|
39
|
+
errors: string[];
|
|
40
|
+
}) => void;
|
|
41
|
+
/**
|
|
42
|
+
* A mounted field's path changed (`lines.2` → `lines.1`): after the render,
|
|
43
|
+
* the form re-asserts the fields the page owns and releases the old path if
|
|
44
|
+
* no field on the page owns it any more.
|
|
45
|
+
*/
|
|
46
|
+
moved: (from: string) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Q54.5 — the object bound with `<BbForm v-model>`, when there is one. A
|
|
49
|
+
* field without its own `v-model` reads its page value from it (`read`) and
|
|
50
|
+
* writes every change back into it (`write`), by path.
|
|
51
|
+
*/
|
|
52
|
+
model: () => Record<string, unknown> | undefined;
|
|
53
|
+
read: (path: string) => unknown;
|
|
54
|
+
write: (path: string, value: unknown) => void;
|
|
55
|
+
};
|
|
56
|
+
export declare const BB_FORM_FIELDS: InjectionKey<BbFormFieldsContext>;
|
|
57
|
+
/**
|
|
58
|
+
* The element to focus inside a field: the one marked `aria-invalid` when the
|
|
59
|
+
* control marks one, else its first tabbable element (a radio group's roving
|
|
60
|
+
* tabindex leaves exactly one at `0`).
|
|
61
|
+
*/
|
|
62
|
+
export declare const focusTarget: (root: Element) => HTMLElement | null;
|
|
63
|
+
/** Document order, so "first" means first on the page, not first mounted. */
|
|
64
|
+
export declare const byDocumentOrder: (a: Element, b: Element) => 0 | 1 | -1;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/components/BbForm/formFields.ts
|
|
2
|
+
var e = Symbol.for("bitboss-ui:form-fields"), t = "input:not([type=\"hidden\"]), select, textarea, button, [contenteditable=\"true\"], [tabindex]", n = (e) => {
|
|
3
|
+
if (e.closest("[inert]")) return !1;
|
|
4
|
+
let t = e.checkVisibility;
|
|
5
|
+
return typeof t == "function" ? t.call(e, { visibilityProperty: !0 }) : e.getClientRects().length > 0;
|
|
6
|
+
}, r = (e) => e instanceof HTMLElement && !e.disabled && e.tabIndex >= 0 && n(e), i = (e) => {
|
|
7
|
+
let n = [e, ...e.querySelectorAll(t)].filter(r);
|
|
8
|
+
return n.find((e) => e.getAttribute("aria-invalid") === "true") ?? n[0] ?? null;
|
|
9
|
+
}, a = (e, t) => e === t ? 0 : e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e as BB_FORM_FIELDS, a as byDocumentOrder, i as focusTarget };
|