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
|
@@ -1,20 +1,105 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Validated Forms (vee-validate)
|
|
3
|
-
summary:
|
|
3
|
+
summary: Forms with validation — the form controls join a BbForm (vee-validate underneath). Validate with one schema for the whole form (any Standard Schema — Zod, Valibot, ArkType, Yup — on BbForm's `schema`, no adapter) or with per-field `rules="required|email"` strings; BbForm hosts the form, focuses the first invalid field on a failed submit and emits `invalid`; requiredAsterisk marks required fields.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Validated Forms
|
|
7
7
|
|
|
8
|
-
`
|
|
9
|
-
[vee-validate](https://vee-validate.logaretm.com/v4/)
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
The form controls (`BbTextInput`, `BbSelect`, the groups, the pickers…) join the
|
|
9
|
+
`BbForm` they are inside and get [vee-validate](https://vee-validate.logaretm.com/v4/)
|
|
10
|
+
field binding; outside a form they are plain. Everything comes from
|
|
11
|
+
`bitboss-ui`. An app without forms ships no vee-validate at all, and a build
|
|
12
|
+
that uses `BbForm` without the peer installed fails with the install hint.
|
|
13
|
+
(`bitboss-ui/validated` was retired in 3.0.0-beta.41; `npx bitboss-ui check
|
|
14
|
+
--fix` rewrites its imports.)
|
|
12
15
|
|
|
13
16
|
```bash
|
|
14
|
-
npm i vee-validate # required peer for
|
|
15
|
-
npm i @vee-validate/rules @vee-validate/i18n #
|
|
17
|
+
npm i vee-validate # required peer for BbForm
|
|
18
|
+
npm i @vee-validate/rules @vee-validate/i18n # only for string `rules` (§ 1)
|
|
16
19
|
```
|
|
17
20
|
|
|
21
|
+
**No adapter to install:** `@vee-validate/zod` and friends are NOT needed with
|
|
22
|
+
`schema` (§ 3). Install `@vee-validate/rules` (and optionally
|
|
23
|
+
`@vee-validate/i18n`) only if you use string `rules`.
|
|
24
|
+
|
|
25
|
+
## The shape of a form (start here)
|
|
26
|
+
|
|
27
|
+
```vue
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { z } from 'zod';
|
|
30
|
+
import { BbButton, BbCheckbox, BbForm, BbTextInput } from 'bitboss-ui';
|
|
31
|
+
|
|
32
|
+
const signup = z.object({
|
|
33
|
+
email: z.email('Enter a valid email'),
|
|
34
|
+
terms: z.literal(true, 'Accept the terms to continue'),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
async function createAccount(values: z.output<typeof signup>) {
|
|
38
|
+
await fetch('/api/signup', { method: 'POST', body: JSON.stringify(values) });
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<BbForm v-slot="{ isSubmitting }" :schema="signup" @submit="createAccount">
|
|
44
|
+
<BbTextInput label="Email" name="email" type="email" />
|
|
45
|
+
<BbCheckbox label="I accept the terms" name="terms" />
|
|
46
|
+
<BbButton :loading="isSubmitting" type="submit" variant="primary">
|
|
47
|
+
Create account
|
|
48
|
+
</BbButton>
|
|
49
|
+
</BbForm>
|
|
50
|
+
</template>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
That is the whole pattern. The rules that keep a form this small:
|
|
54
|
+
|
|
55
|
+
- **A field is a `label` and a `name`.** `name` is its key: in the schema, in
|
|
56
|
+
the `@submit` values, in the server's errors. **No `v-model` on a field**
|
|
57
|
+
and no ref per field: the form holds the values.
|
|
58
|
+
- **The page needs the values before submit** (an edit form filled from the
|
|
59
|
+
server, a live preview, Inertia's `useForm`)? Bind the whole object once,
|
|
60
|
+
`<BbForm v-model="profile">`: it seeds the fields and receives every change.
|
|
61
|
+
Still no `v-model` on the fields.
|
|
62
|
+
- **Validate with one `schema`** (Zod, Valibot, ArkType, Yup) **or with
|
|
63
|
+
`rules` strings** on the fields (§ 1–2), never both.
|
|
64
|
+
- **With a schema, give each field's message to its TYPE too**:
|
|
65
|
+
`z.string('Enter your name').trim().min(1, 'Enter your name')`. An emptied
|
|
66
|
+
text field holds `null` and one never touched holds `undefined`, so
|
|
67
|
+
`z.string().min(1, '…')` alone shows the library's "expected string,
|
|
68
|
+
received null" instead of your message. Same for Valibot
|
|
69
|
+
(`v.string('…')`); Yup's `.required('…')` covers it
|
|
70
|
+
([validation-libraries § What needs a tweak](./validation-libraries.md#what-needs-a-tweak)).
|
|
71
|
+
The app is on **Zod 4**: the message is the argument (`z.literal(true,
|
|
72
|
+
'Accept the terms')`, `z.email('…')`); Zod 3's `errorMap` /
|
|
73
|
+
`required_error` do not type-check.
|
|
74
|
+
- **Every value you submit is a key of the schema.** Zod and Valibot drop
|
|
75
|
+
undeclared keys from `@submit`'s values, so a switch or a hidden field the
|
|
76
|
+
schema does not name vanishes (declare it: `separateShipping: z.boolean()`).
|
|
77
|
+
- **`@submit` fires only when the form is valid**, with the values (the
|
|
78
|
+
schema's output, typed). The slot's `isSubmitting` drives the button. No
|
|
79
|
+
`saving` ref, no `@submit.prevent`, no `<form>` of your own.
|
|
80
|
+
- **A server's 422** goes to the form in one call:
|
|
81
|
+
`useBbFormContext(id).setErrors(body.errors)` (§ 4). No `:errors` ref per
|
|
82
|
+
field. Call `useBbFormContext(id)` once, at the top of `<script setup>`
|
|
83
|
+
(not inside a handler); its state is refs: `form.errors.value`,
|
|
84
|
+
`form.dirty.value`.
|
|
85
|
+
- **A page never imports `vee-validate`**: `defineRule` lives in one
|
|
86
|
+
validators module (§ 1), and nothing else is needed.
|
|
87
|
+
- **Seed only what you have.** The bound object holds loaded data and real
|
|
88
|
+
defaults (a quantity of 1); leave out what the user must choose (a terms
|
|
89
|
+
checkbox, an empty email), so its field starts empty and its message
|
|
90
|
+
shows. Typing the object as the schema's output fails for those
|
|
91
|
+
(`terms: false` is not `true`): type it by what you seed.
|
|
92
|
+
- **A form in steps** (a wizard) gets **one schema per step**,
|
|
93
|
+
`:schema="steps[step]"` with `steps = [account, account.extend(…)] as const`
|
|
94
|
+
and `keep-values-on-unmount`. One whole-form schema blocks "Next" on the
|
|
95
|
+
fields of the steps not shown yet
|
|
96
|
+
([BbForm § Multi-step forms](../BbForm.md#multi-step-forms)).
|
|
97
|
+
- **A control inside the form that is not form data** (a filter, a "show
|
|
98
|
+
advanced" switch) gets `formless`.
|
|
99
|
+
- **Rows** are a `v-for` over an array of the bound object:
|
|
100
|
+
`:name="`lines[${i}][qty]`"`, `:key="line.id"`; add is `push`, delete is
|
|
101
|
+
`splice` ([BbForm § Rows](../BbForm.md#rows-v-for)).
|
|
102
|
+
|
|
18
103
|
## 1. Define rules once (global)
|
|
19
104
|
|
|
20
105
|
The recommended, effort-free setup: `defineRule` your rules once as a
|
|
@@ -68,36 +153,33 @@ import './app/validators';
|
|
|
68
153
|
## 2. Build the form
|
|
69
154
|
|
|
70
155
|
Wrap fields in `<BbForm>` (a thin `useForm` host). Give each field a `label`
|
|
71
|
-
(or `legend`)
|
|
72
|
-
you don't write `vid`:
|
|
156
|
+
(or `legend`), a `name` and its `rules`:
|
|
73
157
|
|
|
74
158
|
```vue
|
|
75
159
|
<script setup lang="ts">
|
|
76
|
-
import { reactive, ref } from 'vue';
|
|
77
|
-
import { BbButton } from 'bitboss-ui';
|
|
78
160
|
import {
|
|
161
|
+
BbButton,
|
|
162
|
+
BbCheckbox,
|
|
79
163
|
BbForm,
|
|
80
|
-
BbTextInput,
|
|
81
164
|
BbNumberInput,
|
|
82
|
-
|
|
83
|
-
} from 'bitboss-ui
|
|
165
|
+
BbTextInput,
|
|
166
|
+
} from 'bitboss-ui';
|
|
84
167
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const submitted = ref<Record<string, unknown> | null>(null);
|
|
168
|
+
async function order(values: Record<string, unknown>) {
|
|
169
|
+
await fetch('/api/orders', { method: 'POST', body: JSON.stringify(values) });
|
|
170
|
+
}
|
|
89
171
|
</script>
|
|
90
172
|
|
|
91
173
|
<template>
|
|
92
|
-
<BbForm v-slot="{ isSubmitting }" @submit="
|
|
93
|
-
<BbTextInput
|
|
174
|
+
<BbForm v-slot="{ isSubmitting }" @submit="order">
|
|
175
|
+
<BbTextInput label="Email" name="email" rules="required|email" />
|
|
94
176
|
<BbNumberInput
|
|
95
|
-
v-model="form.quantity"
|
|
96
177
|
label="Quantity"
|
|
178
|
+
name="quantity"
|
|
97
179
|
rules="required|min_value:1"
|
|
98
180
|
/>
|
|
99
|
-
<BbCheckbox
|
|
100
|
-
<BbButton
|
|
181
|
+
<BbCheckbox label="Accept terms" name="terms" rules="required" />
|
|
182
|
+
<BbButton :loading="isSubmitting" type="submit">Order</BbButton>
|
|
101
183
|
</BbForm>
|
|
102
184
|
</template>
|
|
103
185
|
```
|
|
@@ -115,43 +197,355 @@ handle: `useBbFormContext` is the only outside surface, by design.
|
|
|
115
197
|
Prefer strings, but a one-off inline function still works:
|
|
116
198
|
`:rules="(v) => !!v || 'Required'"`.
|
|
117
199
|
|
|
118
|
-
|
|
119
|
-
(`"Preferred time"` → `preferredtime`),
|
|
120
|
-
|
|
200
|
+
**A field's path is its `name`.** Without one, the path is derived from the
|
|
201
|
+
label (`"Preferred time"` → `preferredtime`), which is enough for a throwaway
|
|
202
|
+
form; set `name` on real ones, and always when:
|
|
203
|
+
|
|
204
|
+
- **Rows in a `v-for`**, where the label repeats: `:name="`attendees[${i}]`"`.
|
|
205
|
+
- **Nested or array values**: `name` is read as a path, in either spelling.
|
|
206
|
+
`address[city]` and `address.city` are the same field, `users[0][name]` is
|
|
207
|
+
`users.0.name`, and a trailing `[]` goes (`tags[]` → `tags`). The `@submit`
|
|
208
|
+
payload nests to match.
|
|
209
|
+
- **A translated or changing label.** A label-derived path moves when the
|
|
210
|
+
label does (`"Email"` → `email`, `"E-mail"` → `e-mail`), and everything
|
|
211
|
+
keyed by it misses: server errors keyed by field, saved drafts, analytics.
|
|
212
|
+
A fixed `name` stays put.
|
|
213
|
+
- **`BbDropzone`**, which has no label, always needs one.
|
|
214
|
+
|
|
215
|
+
`name` also goes on the native input unchanged, so the same field posts under
|
|
216
|
+
it in a plain HTML form. **For a native post, use brackets** (`address[city]`):
|
|
217
|
+
PHP (so Laravel) turns dots in a posted field name into `_`, and
|
|
218
|
+
`address.city` arrives as `address_city`. The validation path is the same
|
|
219
|
+
either way.
|
|
121
220
|
|
|
122
221
|
```vue
|
|
222
|
+
<!-- <BbForm v-model="form">: the rows follow `form.attendees` -->
|
|
123
223
|
<BbTextInput
|
|
124
224
|
v-for="(_, i) in form.attendees"
|
|
125
225
|
:key="i"
|
|
126
|
-
v-model="form.attendees[i]"
|
|
127
226
|
label="Attendee"
|
|
128
|
-
:
|
|
227
|
+
:name="`attendees[${i}]`"
|
|
129
228
|
/>
|
|
130
229
|
```
|
|
131
230
|
|
|
132
|
-
|
|
231
|
+
**Messages name the field by its label, never its path.** `{field}` in a rule
|
|
232
|
+
message is the `label` (or `legend`). Set **`validation-label`** when the label
|
|
233
|
+
is not the noun a sentence needs (a question, an icon-only label, a hidden
|
|
234
|
+
one): `<BbTextInput label="Where do you live?" validation-label="City" />`
|
|
235
|
+
reads "City is required". A field with neither says "This field".
|
|
133
236
|
|
|
134
|
-
|
|
237
|
+
### Upgrading from a 3.0 beta: `vid` is gone
|
|
135
238
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
239
|
+
In the 3.0 betas `vid` was the field's path; it is `name` now, with the same
|
|
240
|
+
value (`vid="address.city"` → `name="address.city"`, or `address[city]`).
|
|
241
|
+
From v2, where `vid` was the name shown in messages, it is `validation-label`.
|
|
242
|
+
`npx bitboss-ui check --fix` rewrites each `vid` by its value, and the
|
|
243
|
+
[migration guide](./migration/v2-to-v3.md) has the details.
|
|
141
244
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
245
|
+
## 3. Or: one schema for the whole form
|
|
246
|
+
|
|
247
|
+
If your app already describes its data with Zod, Valibot, ArkType or Yup, hand
|
|
248
|
+
that schema to `BbForm`'s **`schema`** instead of writing `rules` per
|
|
249
|
+
field. Any [Standard Schema](https://standardschema.dev) works as it is: no
|
|
250
|
+
`@vee-validate/zod`, no adapter import, nothing extra to install.
|
|
251
|
+
|
|
252
|
+
```vue
|
|
253
|
+
<script setup lang="ts">
|
|
254
|
+
import { reactive } from 'vue';
|
|
255
|
+
import { z } from 'zod';
|
|
256
|
+
import { BbButton, BbForm, BbNumberInput, BbTextInput } from 'bitboss-ui';
|
|
257
|
+
|
|
258
|
+
const schema = z.object({
|
|
259
|
+
// An emptied text field holds `null`: give the type the message too.
|
|
260
|
+
email: z.email('Enter a valid email').toLowerCase(),
|
|
261
|
+
address: z.object({
|
|
262
|
+
city: z.string('Enter a city').trim().min(1, 'Enter a city'),
|
|
263
|
+
}),
|
|
264
|
+
quantity: z.number('How many?').int().min(1, 'At least 1'),
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// Only to start the quantity at 1: the fields read their start value here.
|
|
268
|
+
const order = reactive({ quantity: 1 });
|
|
269
|
+
|
|
270
|
+
// Typed from the schema, and it is the schema's OUTPUT: trimmed, lower-cased.
|
|
271
|
+
const save = async (values: z.output<typeof schema>) => {
|
|
272
|
+
console.log(values.address.city);
|
|
273
|
+
};
|
|
274
|
+
</script>
|
|
275
|
+
|
|
276
|
+
<template>
|
|
277
|
+
<BbForm
|
|
278
|
+
v-slot="{ isSubmitting }"
|
|
279
|
+
v-model="order"
|
|
280
|
+
:schema="schema"
|
|
281
|
+
@submit="save"
|
|
282
|
+
>
|
|
283
|
+
<BbTextInput label="Email" name="email" type="email" />
|
|
284
|
+
<BbTextInput label="City" name="address[city]" />
|
|
285
|
+
<BbNumberInput label="Quantity" name="quantity" />
|
|
286
|
+
<BbButton :loading="isSubmitting" type="submit">Save</BbButton>
|
|
287
|
+
</BbForm>
|
|
288
|
+
</template>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
- **`name` is the field's path in the schema** (`email`, `address[city]` or
|
|
292
|
+
`address.city`, `lines[0][qty]`); each issue lands on the field with that
|
|
293
|
+
path. With a schema, set `name` on every field rather than relying on the
|
|
294
|
+
label-derived path.
|
|
295
|
+
- **`@submit` gets the schema's output** (transforms and coercions applied),
|
|
296
|
+
typed from the schema. Async refinements gate the submit like any rule.
|
|
297
|
+
- **Per-field `rules` are ignored while a schema is set** (vee-validate's
|
|
298
|
+
design). Pick one per form. `npx bitboss-ui check` flags `rules` inside a
|
|
299
|
+
form that has a `schema` (`rules-ignored-by-schema`), and a string rule the
|
|
300
|
+
project never registers with `defineRule` (`unregistered-rule`).
|
|
301
|
+
- **Server errors (a 422): call `setErrors(errors)`** on the form, see
|
|
302
|
+
[§ 4](#4-server-errors-seterrors-fields-unmatchederrors). Each message lands on the field with that
|
|
303
|
+
path, beside the schema's. A field's own `errors` prop still merges in, for
|
|
304
|
+
one field's external message.
|
|
305
|
+
- **Set the schema when the form mounts.** It may change afterwards: a
|
|
306
|
+
`computed` per wizard step, together with `keep-values-on-unmount` so the
|
|
307
|
+
steps you leave keep their values. Pattern and traps:
|
|
308
|
+
[BbForm § Multi-step forms](../BbForm.md#multi-step-forms).
|
|
309
|
+
|
|
310
|
+
Verified against Zod 3.24 and 4, Valibot 1, ArkType 2 and Yup 1.7. vee-validate's
|
|
311
|
+
own `toTypedSchema(...)` schemas and rule objects keep working.
|
|
312
|
+
|
|
313
|
+
On a failed submit (schema or rules), `BbForm` focuses the first invalid field
|
|
314
|
+
that is on screen and emits `invalid` with `{ errors, values }`: every failing
|
|
315
|
+
path, including those whose field is not on screen, so a wizard can jump to the
|
|
316
|
+
step that holds one.
|
|
317
|
+
|
|
318
|
+
Which library does what (asterisk, messages per path, async, emptied fields) and what changes when you switch: [validation-libraries](./validation-libraries.md).
|
|
319
|
+
|
|
320
|
+
**Conditional validation has no on/off switch.** A field that does not apply
|
|
321
|
+
is `v-if`'d away; in a form with `keep-values-on-unmount` also call
|
|
322
|
+
`removeField(path)` (it applies after the re-render, so any watcher works), or its value is
|
|
323
|
+
still submitted (and still checked by a schema). A form checked differently by
|
|
324
|
+
state switches a computed `schema`, or binds computed `rules` (`''` = none).
|
|
325
|
+
A draft posts `useBbFormContext(id).values` and calls `snapshot()`; it never
|
|
326
|
+
goes through `@submit`. Patterns:
|
|
327
|
+
[BbForm § Conditional validation](../BbForm.md#conditional-validation) and
|
|
328
|
+
[§ Saving a draft](../BbForm.md#saving-a-draft). Rows (`v-for`): your array is
|
|
329
|
+
the truth, name fields by index, key by id or index, and in a keep-values form
|
|
330
|
+
call `removeField` on a deleted row: [BbForm § Rows](../BbForm.md#rows-v-for).
|
|
331
|
+
|
|
332
|
+
### A check across fields (confirm a password)
|
|
333
|
+
|
|
334
|
+
A rule that compares two fields is a refinement of the whole object, with
|
|
335
|
+
`path` naming the field that shows the message:
|
|
336
|
+
|
|
337
|
+
```ts
|
|
338
|
+
import { z } from 'zod';
|
|
339
|
+
|
|
340
|
+
const signup = z
|
|
341
|
+
.object({
|
|
342
|
+
password: z.string('At least 8 characters').min(8, 'At least 8 characters'),
|
|
343
|
+
password_confirmation: z.string('Repeat the password'),
|
|
344
|
+
})
|
|
345
|
+
.refine((form) => form.password === form.password_confirmation, {
|
|
346
|
+
message: 'The passwords do not match',
|
|
347
|
+
path: ['password_confirmation'],
|
|
348
|
+
});
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The message lands on the field whose `name` is `password_confirmation`, and a
|
|
352
|
+
failed submit focuses it. Valibot: `v.forward(v.partialCheck(...), [...])`;
|
|
353
|
+
Yup: `yup.string().oneOf([yup.ref('password')], '…')`.
|
|
145
354
|
|
|
146
|
-
|
|
355
|
+
### An edit form: filled from the server, Save only when something changed
|
|
147
356
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
| `['update:modelValue','change','blur']` | BbCheckbox, BbSwitch |
|
|
357
|
+
Bind the loaded object; the slot's `dirty` gates Save and Discard, `reset()`
|
|
358
|
+
puts the loaded values back, and `snapshot()` after a successful save makes
|
|
359
|
+
the saved values the new baseline (so `dirty` clears and Save disables
|
|
360
|
+
again):
|
|
153
361
|
|
|
154
|
-
|
|
362
|
+
```vue
|
|
363
|
+
<script setup lang="ts">
|
|
364
|
+
import { reactive } from 'vue';
|
|
365
|
+
import { z } from 'zod';
|
|
366
|
+
import {
|
|
367
|
+
BbButton,
|
|
368
|
+
BbForm,
|
|
369
|
+
BbTextarea,
|
|
370
|
+
BbTextInput,
|
|
371
|
+
useBbFormContext,
|
|
372
|
+
} from 'bitboss-ui';
|
|
373
|
+
|
|
374
|
+
// As loaded from the server; a preview elsewhere on the page reads it too.
|
|
375
|
+
const profile = reactive({ name: 'Ada Lovelace', bio: 'Analyst.' });
|
|
376
|
+
|
|
377
|
+
const schema = z.object({
|
|
378
|
+
name: z.string('Enter a name').trim().min(1, 'Enter a name'),
|
|
379
|
+
bio: z.string().max(160, 'Keep it under 160 characters').nullish(),
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
const form = useBbFormContext('profile');
|
|
383
|
+
|
|
384
|
+
async function save(values: z.output<typeof schema>) {
|
|
385
|
+
const response = await fetch('/api/profile', {
|
|
386
|
+
method: 'PUT',
|
|
387
|
+
body: JSON.stringify(values),
|
|
388
|
+
});
|
|
389
|
+
if (response.ok) form.snapshot();
|
|
390
|
+
}
|
|
391
|
+
</script>
|
|
392
|
+
|
|
393
|
+
<template>
|
|
394
|
+
<p>{{ profile.name }}: {{ profile.bio }}</p>
|
|
395
|
+
<BbForm
|
|
396
|
+
id="profile"
|
|
397
|
+
v-slot="{ dirty, isSubmitting }"
|
|
398
|
+
v-model="profile"
|
|
399
|
+
:schema="schema"
|
|
400
|
+
@submit="save"
|
|
401
|
+
>
|
|
402
|
+
<BbTextInput label="Name" name="name" />
|
|
403
|
+
<BbTextarea label="Bio" name="bio" />
|
|
404
|
+
<BbButton :disabled="!dirty" variant="ghost" @click="form.reset()">
|
|
405
|
+
Discard
|
|
406
|
+
</BbButton>
|
|
407
|
+
<BbButton
|
|
408
|
+
:disabled="!dirty"
|
|
409
|
+
:loading="isSubmitting"
|
|
410
|
+
type="submit"
|
|
411
|
+
variant="primary"
|
|
412
|
+
>
|
|
413
|
+
Save
|
|
414
|
+
</BbButton>
|
|
415
|
+
</BbForm>
|
|
416
|
+
</template>
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
## 4. Server errors: `setErrors`, `fields`, `unmatchedErrors`
|
|
420
|
+
|
|
421
|
+
Hand a server's validation errors to the form in one call, through
|
|
422
|
+
[`useBbFormContext(id)`](../composables/useBbFormContext.md) or the `BbForm`
|
|
423
|
+
slot: `setErrors(map)` takes Laravel's 422 `errors` (`{ key: string[] }`) and
|
|
424
|
+
Inertia's `errors` (`{ key: string }`), keyed by field path (dots or
|
|
425
|
+
brackets). It returns nothing; the form state is the answer:
|
|
426
|
+
|
|
427
|
+
- `errors` is every error of a field in `fields`, `{ [path]: string[] }`.
|
|
428
|
+
- `unmatchedErrors` is every other error (no field has that path), same
|
|
429
|
+
shape, never gating submit; it clears when a submit starts, on reset and
|
|
430
|
+
on the next `setErrors`.
|
|
431
|
+
- They never share a path: `{ ...errors, ...unmatchedErrors }` is every
|
|
432
|
+
error. `fields[path].errors` is one field's full list.
|
|
433
|
+
- Focus moves to the first failing field on screen, like a failed submit,
|
|
434
|
+
while focus is still the form's (`setErrors(map, { focus: false })` to
|
|
435
|
+
skip).
|
|
436
|
+
|
|
437
|
+
A save that keeps the user on the page ends with `snapshot()` (or
|
|
438
|
+
`snapshot(savedValues)`): the saved values become the baseline, so `dirty`
|
|
439
|
+
clears. See [BbForm § Saving in place](../BbForm.md#saving-in-place-snapshot).
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
// Inertia: router.post('/signup', values, { onError: (errors) => form.setErrors(errors) })
|
|
443
|
+
// fetch / axios: if (response.status === 422) form.setErrors((await response.json()).errors)
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
**One summary of every error**, messages only (never print the arrays):
|
|
447
|
+
|
|
448
|
+
```vue
|
|
449
|
+
<BbAlert v-if="Object.keys(allErrors).length" variant="destructive">
|
|
450
|
+
<p v-for="(messages, path) in allErrors" :key="path">{{ messages[0] }}</p>
|
|
451
|
+
</BbAlert>
|
|
452
|
+
<!-- script: const allErrors = computed(() => ({ ...form.errors.value, ...form.unmatchedErrors.value })) -->
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**A wizard that posts on the last step** keeps every step's values
|
|
456
|
+
(`keep-values-on-unmount`), so a 422 for a field on a step that is not on
|
|
457
|
+
screen still lands on that field (`fields[path].mounted` is `false`) and in
|
|
458
|
+
the summary above. To jump to it, find the first failing path's step:
|
|
459
|
+
|
|
460
|
+
```ts
|
|
461
|
+
const STEPS = [['email'], ['profile.name', 'profile.city']];
|
|
462
|
+
async function submit(values: Record<string, unknown>) {
|
|
463
|
+
if (step.value < STEPS.length - 1) return void step.value++;
|
|
464
|
+
const response = await fetch('/api/signup', {
|
|
465
|
+
method: 'POST',
|
|
466
|
+
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
|
467
|
+
body: JSON.stringify(values),
|
|
468
|
+
});
|
|
469
|
+
if (response.status !== 422) return;
|
|
470
|
+
form.setErrors((await response.json()).errors);
|
|
471
|
+
const failing = Object.keys(form.errors.value)[0];
|
|
472
|
+
const owner = STEPS.findIndex((paths) => paths.includes(failing ?? ''));
|
|
473
|
+
if (owner !== -1) step.value = owner;
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
Full pattern with a schema per step and a badge per step:
|
|
478
|
+
[BbForm § Multi-step forms](../BbForm.md#multi-step-forms) and
|
|
479
|
+
[§ Fields on a step you left](../BbForm.md#fields-on-a-step-you-left-and-the-step-badge).
|
|
480
|
+
|
|
481
|
+
With `keep-values-on-unmount`, fields on a step you left stay in `fields`
|
|
482
|
+
(`mounted: false`) and still receive their server errors. Full pattern, the
|
|
483
|
+
step badge and deleting rows (`removeField`):
|
|
484
|
+
[BbForm § Server errors (setErrors) and fields](../BbForm.md#server-errors-seterrors-and-fields).
|
|
485
|
+
Every provider's shape and bridge (Inertia, error bags, Laravel 422,
|
|
486
|
+
Precognition, vee-validate, Nuxt UI, API Platform):
|
|
487
|
+
[validation-providers](./validation-providers.md).
|
|
488
|
+
|
|
489
|
+
**`<BbForm v-model="values">`** keeps the values in an object your page owns
|
|
490
|
+
(any reactive object, Inertia's `useForm()` included), both ways, in place:
|
|
491
|
+
seeded from it, written by path (nested created), foreign keys untouched,
|
|
492
|
+
your writes drive the fields, rows follow its arrays with nothing to call.
|
|
493
|
+
With Inertia, declare every field in `useForm({ … })` (Inertia posts only the
|
|
494
|
+
keys it was created with). See
|
|
495
|
+
[BbForm § Binding the form to your object](../BbForm.md#binding-the-form-to-your-object-v-model).
|
|
496
|
+
|
|
497
|
+
**`v-model` is optional inside `BbForm`**: the form holds each field's value
|
|
498
|
+
by its `name`. Read it in `@submit`, the slot's `values` or
|
|
499
|
+
`useBbFormContext(id).values`
|
|
500
|
+
([BbForm § Fields without v-model](../BbForm.md#fields-without-v-model)); bind
|
|
501
|
+
`v-model` when the page owns the value.
|
|
502
|
+
|
|
503
|
+
## The three added props
|
|
504
|
+
|
|
505
|
+
| Prop | Type | Notes |
|
|
506
|
+
| ----------------- | ---------------------------- | -------------------------------------------------------------------- |
|
|
507
|
+
| `rules` | `RuleExpression<modelValue>` | A rule string (`"required\|email"`), function, or object. |
|
|
508
|
+
| `validationMode` | `ValidationMode` | When the field checks itself while the user works; see below. |
|
|
509
|
+
| `validationLabel` | `string` | The field's name in messages; defaults to the `label` (or `legend`). |
|
|
510
|
+
|
|
511
|
+
The field's path is the base control's own `name` (see above); there is no
|
|
512
|
+
separate id prop (`vid` is gone in 3.0.0-beta.41).
|
|
513
|
+
|
|
514
|
+
Types keep their home: a control's props and events come from `bitboss-ui`
|
|
515
|
+
(`import type { BbTextInputProps } from 'bitboss-ui'`), and the three added
|
|
516
|
+
props too (`FormFieldProps`, `ValidationMode`).
|
|
517
|
+
|
|
518
|
+
External errors compose: whatever you pass to the base `errors` prop is
|
|
519
|
+
**merged** with the vee-validate messages. For a server's 422, use
|
|
520
|
+
[`setErrors`](#4-server-errors-seterrors-fields-unmatchederrors) instead: one
|
|
521
|
+
call for the whole form.
|
|
522
|
+
|
|
523
|
+
## `validationMode`: when a field checks itself
|
|
524
|
+
|
|
525
|
+
One mode, the same for every control. "Leave" is blur for a text-like control
|
|
526
|
+
(BbTextInput, BbNumberInput, BbTextarea, BbColorInput, BbDropzone) and focus
|
|
527
|
+
leaving the whole control (`inactive`) for a picker or a group (BbSelect,
|
|
528
|
+
BbTag, BbSlider, BbRating, the date and time inputs, the groups). A checkbox or
|
|
529
|
+
switch click commits its value, so the click counts as the change and the leave.
|
|
530
|
+
|
|
531
|
+
| Mode | First check | While it shows an error | Once fixed |
|
|
532
|
+
| ------------------------ | ------------ | ----------------------- | --------------------------- |
|
|
533
|
+
| `aggressive` | every change | every change | every change |
|
|
534
|
+
| `balanced` (the default) | leave | every change | back to waiting for leave |
|
|
535
|
+
| `lazy` | leave | leave only | leave |
|
|
536
|
+
| `submit-only` | submit | the next submit | the next submit |
|
|
537
|
+
| `submit-live` | submit | every change | quiet until the next submit |
|
|
538
|
+
|
|
539
|
+
Set it on a field, on the `BbForm` (`validation-mode="submit-live"`, its fields
|
|
540
|
+
inherit it) or app-wide (`formControls: { validationMode: 'lazy' }`); the
|
|
541
|
+
field's own wins, then the form's. A failed submit validates every field
|
|
542
|
+
whatever its mode. Pick `balanced` for most forms, `submit-only` /
|
|
543
|
+
`submit-live` for long forms that should not nag, `lazy` for expensive async
|
|
544
|
+
checks; `aggressive` errors on half-typed values, so opt into it deliberately.
|
|
545
|
+
A page that writes the model itself re-checks a field that shows an error
|
|
546
|
+
(except `lazy` and `submit-only`).
|
|
547
|
+
|
|
548
|
+
`BbDropzone` has no label, so it **requires** `name`.
|
|
155
549
|
|
|
156
550
|
## Required asterisk
|
|
157
551
|
|
|
@@ -162,9 +556,9 @@ Turn on the plugin option to mark required fields with a red `*`:
|
|
|
162
556
|
bitbossUi({ requiredAsterisk: true });
|
|
163
557
|
```
|
|
164
558
|
|
|
165
|
-
|
|
166
|
-
contain a **`required` rule**
|
|
167
|
-
|
|
559
|
+
Inside a `BbForm` it shows on a control that is `required`, or whose `rules`
|
|
560
|
+
contain a **`required` rule** (outside a form: `required` only), after the
|
|
561
|
+
label text. Rules alone are not enough, and deliberately so: every other rule is
|
|
168
562
|
conditional on a value being present (`max:5` passes on an empty field, which is
|
|
169
563
|
what makes "optional, but at most 5 if filled" expressible), so raising the
|
|
170
564
|
asterisk for any rule would mark optional fields as mandatory and contradict the
|
|
@@ -173,20 +567,37 @@ engine.
|
|
|
173
567
|
Both rule shapes are read — the string form (`'required|email'`, arguments
|
|
174
568
|
allowed: `'required:true'`) and the object form (`{ required: true }`, where
|
|
175
569
|
`{ required: false }` correctly shows nothing). `required_if` and friends do
|
|
176
|
-
**not** count: conditionally required is not required. A validator function
|
|
177
|
-
|
|
178
|
-
|
|
570
|
+
**not** count: conditionally required is not required. A validator function is
|
|
571
|
+
opaque to this check; set `required` on the field for those.
|
|
572
|
+
|
|
573
|
+
With a `schema`, the schema decides, with every Standard Schema
|
|
574
|
+
library above: a field gets the asterisk when its key is required in the
|
|
575
|
+
schema (not optional, no default, not nullable, and its parent object required
|
|
576
|
+
too). Zod 4, ArkType and Joi are read through their JSON Schema; Zod 3, Yup,
|
|
577
|
+
Valibot and Effect through their own schema shape — nothing to wrap, no
|
|
578
|
+
`required` to add. The marker follows a reactive (per-step) schema.
|
|
179
579
|
|
|
180
|
-
|
|
181
|
-
`BbAsterisk` component — drop it into your own label content when you build a
|
|
580
|
+
The marker is the exported `BbAsterisk` component — drop it into your own label content when you build a
|
|
182
581
|
bespoke field.
|
|
183
582
|
|
|
184
583
|
## Controls
|
|
185
584
|
|
|
186
585
|
BbTextInput · BbNumberInput · BbTextarea · BbSelect · BbTag · BbCheckbox ·
|
|
187
586
|
BbCheckboxGroup · BbSwitch · BbSwitchGroup · BbRadioGroup · BbRating · BbSlider ·
|
|
188
|
-
BbDatePickerInput · BbTimePickerInput · BbColorInput
|
|
189
|
-
`
|
|
587
|
+
BbDatePickerInput · BbTimePickerInput · BbColorInput · BbDropzone — each one
|
|
588
|
+
joins the `BbForm` it sits in by itself (no wrapper, no second import) — plus
|
|
589
|
+
`BbForm` and the `useBbFormField` composable for a control of your own.
|
|
590
|
+
|
|
591
|
+
`BbCalendar` (the always-visible calendar) does **not** join a form: it is
|
|
592
|
+
bare, with no `errors` chrome to show a message in. When a form needs one, a
|
|
593
|
+
date field is `BbDatePickerInput`; if the calendar in place must be validated,
|
|
594
|
+
bind it with `useBbFormField` and render the message next to it yourself.
|
|
595
|
+
|
|
596
|
+
`BbRadio` (a single radio) does not join a form either — the one control of
|
|
597
|
+
the checkbox / switch / radio family that does not. A radio answers only as
|
|
598
|
+
part of a group: validate the choice with `BbRadioGroup`; for radios you lay
|
|
599
|
+
out by hand (one per pricing card, one per table row), bind the choice with
|
|
600
|
+
`useBbFormField`, or pass `errors` to them yourself.
|
|
190
601
|
|
|
191
602
|
A live, end-to-end demo lives in `fixtures/vue/pages/ValidatedForm` (with global
|
|
192
603
|
rules in `fixtures/vue/app/validators.ts`), asserted by
|