bitboss-ui 3.0.0-beta.67 → 3.0.0-beta.68
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 +1 -1
- package/bin/bitboss-ui-mcp.mjs +87 -19
- package/bin/bitboss-ui.mjs +6 -2
- package/dist/ai/BbAlert.md +15 -11
- package/dist/ai/BbAsterisk.md +1 -1
- package/dist/ai/BbAvatar.md +2 -2
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbBaseCheckboxIcon.md +4 -0
- package/dist/ai/BbBaseRadioIcon.md +7 -3
- package/dist/ai/BbBaseSwitchIcon.md +11 -2
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +62 -9
- package/dist/ai/BbCalendar.md +1 -1
- package/dist/ai/BbCheckbox.md +23 -5
- package/dist/ai/BbCheckboxGroup.md +52 -25
- package/dist/ai/BbColorInput.md +13 -12
- package/dist/ai/BbColorPalette.md +5 -5
- package/dist/ai/BbConfigScope.md +218 -0
- package/dist/ai/BbConfirm.md +24 -21
- package/dist/ai/BbDatePicker.md +4 -4
- package/dist/ai/BbDatePickerInput.md +16 -15
- package/dist/ai/BbDialog.md +10 -9
- package/dist/ai/BbDropdown.md +26 -16
- package/dist/ai/BbDropdownButton.md +18 -18
- package/dist/ai/BbDropzone.md +1 -1
- package/dist/ai/BbForm.md +6 -4
- package/dist/ai/BbHost.md +19 -13
- package/dist/ai/BbIcon.md +3 -3
- package/dist/ai/BbIndicator.md +4 -4
- package/dist/ai/BbNumberInput.md +17 -13
- package/dist/ai/BbOffCanvas.md +4 -3
- package/dist/ai/BbPagination.md +10 -2
- package/dist/ai/BbPopover.md +5 -5
- package/dist/ai/BbRadio.md +23 -4
- package/dist/ai/BbRadioGroup.md +69 -30
- package/dist/ai/BbRating.md +5 -5
- package/dist/ai/BbSelect.md +74 -39
- package/dist/ai/BbSelectPopover.md +28 -26
- package/dist/ai/BbSlider.md +258 -61
- package/dist/ai/BbSpinner.md +2 -2
- package/dist/ai/BbSwitch.md +27 -4
- package/dist/ai/BbSwitchGroup.md +22 -13
- package/dist/ai/BbTable.md +10 -5
- package/dist/ai/BbTabs.md +6 -6
- package/dist/ai/BbTabsRoot.md +1 -1
- package/dist/ai/BbTag.md +12 -11
- package/dist/ai/BbTextInput.md +25 -17
- package/dist/ai/BbTextarea.md +15 -14
- package/dist/ai/BbTimePicker.md +3 -3
- package/dist/ai/BbTimePickerInput.md +12 -11
- package/dist/ai/BbToast.md +65 -26
- package/dist/ai/BbTooltip.md +2 -2
- package/dist/ai/CommonField.md +2 -2
- package/dist/ai/CommonFieldInput.md +2 -1
- package/dist/ai/FlatListBox.md +4 -3
- package/dist/ai/GroupedListBox.md +4 -3
- package/dist/ai/ListBox.md +5 -4
- package/dist/ai/OptionsContainer.md +17 -1
- package/dist/ai/changelog.json +454 -7
- package/dist/ai/components.json +77 -69
- package/dist/ai/composables/useBbConfig.md +3 -3
- package/dist/ai/composables/useBbDialog.md +1 -1
- package/dist/ai/composables/useBbFormField.md +1 -1
- package/dist/ai/composables/useConfirm.md +1 -1
- package/dist/ai/composables/useToast.md +16 -16
- package/dist/ai/design-tokens.json +10 -5
- package/dist/ai/guides/agent-contract.md +8 -8
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/app-layout.md +1 -1
- package/dist/ai/guides/design-language.md +17 -13
- package/dist/ai/guides/design-tokens.md +81 -42
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +1 -1
- package/dist/ai/guides/inline-edit-playbook.md +1 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +335 -161
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +1 -1
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +15 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +2 -2
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -1
- package/dist/ai/guides/migration/components/bb-host.md +10 -8
- package/dist/ai/guides/migration/components/bb-offcanvas.md +1 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
- package/dist/ai/guides/migration/components/bb-select.md +3 -3
- package/dist/ai/guides/migration/components/bb-slider.md +17 -2
- package/dist/ai/guides/migration/components/bb-tabs.md +1 -1
- package/dist/ai/guides/migration/components/bb-toast.md +6 -6
- package/dist/ai/guides/migration/components/use-confirm.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +191 -56
- package/dist/ai/guides/migration/v3-beta-tooling.md +2 -2
- package/dist/ai/guides/passthrough.md +140 -131
- package/dist/ai/guides/typescript-generic-components.md +7 -7
- package/dist/ai/guides/validated-forms.md +5 -5
- package/dist/ai/guides/validation-libraries.md +4 -4
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +9 -11
- package/dist/ai/manifest/components/BbAlert.json +3 -2
- package/dist/ai/manifest/components/BbAvatar.json +2 -1
- package/dist/ai/manifest/components/BbBadge.json +3 -2
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +5 -1
- package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +7 -3
- package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +9 -1
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +4 -3
- package/dist/ai/manifest/components/BbButton.tree.json +3 -1
- package/dist/ai/manifest/components/BbCalendar.tree.json +1 -0
- package/dist/ai/manifest/components/BbCheckbox.json +4 -3
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +17 -14
- package/dist/ai/manifest/components/BbCheckboxGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +25 -4
- package/dist/ai/manifest/components/BbColorInput.json +6 -5
- package/dist/ai/manifest/components/BbColorInput.tree.json +4 -3
- package/dist/ai/manifest/components/BbColorPalette.json +2 -1
- package/dist/ai/manifest/components/BbColorPalette.tree.json +2 -1
- package/dist/ai/manifest/components/BbConfigScope.json +23 -0
- package/dist/ai/manifest/components/BbConfirm.json +2 -1
- package/dist/ai/manifest/components/BbConfirm.tree.json +2 -2
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.json +6 -5
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +6 -4
- package/dist/ai/manifest/components/BbDialog.json +3 -2
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +7 -4
- package/dist/ai/manifest/components/BbDropdown.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownButton.json +11 -8
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +3 -3
- package/dist/ai/manifest/components/BbDropzone.json +1 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbIcon.json +2 -1
- package/dist/ai/manifest/components/BbIndicator.json +2 -1
- package/dist/ai/manifest/components/BbNumberInput.json +5 -4
- package/dist/ai/manifest/components/BbNumberInput.tree.json +3 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbPagination.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +2 -1
- package/dist/ai/manifest/components/BbPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadio.json +3 -2
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +21 -18
- package/dist/ai/manifest/components/BbRadioGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +25 -4
- package/dist/ai/manifest/components/BbRating.json +3 -2
- package/dist/ai/manifest/components/BbSelect.json +11 -9
- package/dist/ai/manifest/components/BbSelect.tree.json +7 -5
- package/dist/ai/manifest/components/BbSelectPopover.json +11 -9
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -2
- package/dist/ai/manifest/components/BbSlider.json +20 -18
- package/dist/ai/manifest/components/BbSlider.removed.json +3 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +4 -2
- package/dist/ai/manifest/components/BbSwitch.json +2 -1
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -5
- package/dist/ai/manifest/components/BbSwitchGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +6 -2
- package/dist/ai/manifest/components/BbTable.json +3 -2
- package/dist/ai/manifest/components/BbTable.tree.json +4 -3
- package/dist/ai/manifest/components/BbTabs.json +3 -2
- package/dist/ai/manifest/components/BbTabsRoot.json +2 -2
- package/dist/ai/manifest/components/BbTag.json +6 -5
- package/dist/ai/manifest/components/BbTag.tree.json +3 -2
- package/dist/ai/manifest/components/BbTextInput.json +5 -4
- package/dist/ai/manifest/components/BbTextInput.tree.json +3 -2
- package/dist/ai/manifest/components/BbTextarea.json +6 -5
- package/dist/ai/manifest/components/BbTextarea.tree.json +3 -2
- package/dist/ai/manifest/components/BbTimePicker.json +2 -1
- package/dist/ai/manifest/components/BbTimePicker.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +6 -5
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +5 -3
- package/dist/ai/manifest/components/BbToast.json +2 -1
- package/dist/ai/manifest/components/BbToast.tree.json +6 -1
- package/dist/ai/manifest/components/BbTooltip.json +1 -0
- package/dist/ai/manifest/components/CommonField.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +2 -0
- package/dist/ai/manifest/components/FlatListBox.json +1 -1
- package/dist/ai/manifest/components/FlatListBox.tree.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +2 -2
- package/dist/ai/manifest/components/OptionsContainer.json +3 -2
- package/dist/ai/manifest/components/OptionsContainer.tree.json +16 -1
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +16 -7
- package/dist/ai/manifest/types.advanced.json +5 -6
- package/dist/ai/manifest/types.api.json +15 -6
- package/dist/ai/manifest/types.wrapper.json +2 -2
- package/dist/ai/recipes/inertia/approvals-inbox.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/inertia/onboarding.md +2 -2
- package/dist/ai/recipes/inertia/ownership-atlas.md +2 -2
- package/dist/ai/recipes/inertia/record-form.md +2 -2
- package/dist/ai/recipes/inertia/records-workspace.md +2 -2
- package/dist/ai/recipes/inertia/settings-workspace.md +5 -4
- package/dist/ai/recipes/inertia/upload-center.md +3 -3
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/nuxt/onboarding.md +2 -2
- package/dist/ai/recipes/nuxt/ownership-atlas.md +2 -2
- package/dist/ai/recipes/nuxt/record-form.md +2 -2
- package/dist/ai/recipes/nuxt/records-workspace.md +2 -2
- package/dist/ai/recipes/nuxt/settings-workspace.md +5 -4
- package/dist/ai/recipes/nuxt/upload-center.md +4 -4
- package/dist/ai/recipes/nuxt/wizard-form.md +2 -2
- package/dist/ai/recipes/vue/approvals-inbox.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/recipes/vue/ownership-atlas.md +2 -2
- package/dist/ai/recipes/vue/record-form.md +2 -2
- package/dist/ai/recipes/vue/records-workspace.md +2 -2
- package/dist/ai/recipes/vue/settings-workspace.md +5 -4
- package/dist/ai/recipes/vue/upload-center.md +4 -4
- package/dist/ai/recipes/vue/wizard-form.md +2 -2
- package/dist/ai/source/BbAlert.md +10 -4
- package/dist/ai/source/BbAvatar.md +5 -4
- package/dist/ai/source/BbBadge.md +16 -9
- package/dist/ai/source/BbBadgeButton.md +1 -1
- package/dist/ai/source/BbBaseCheckboxIcon.md +7 -5
- package/dist/ai/source/BbBaseRadioIcon.md +17 -11
- package/dist/ai/source/BbBaseSwitchIcon.md +14 -9
- package/dist/ai/source/BbButton.md +38 -22
- package/dist/ai/source/BbCalendar.md +5 -30
- package/dist/ai/source/BbCheckbox.md +20 -7
- package/dist/ai/source/BbCheckboxGroup.md +66 -27
- package/dist/ai/source/BbColorInput.md +29 -22
- package/dist/ai/source/BbColorPalette.md +23 -22
- package/dist/ai/source/BbConfigScope.md +123 -0
- package/dist/ai/source/BbConfirm.md +5 -3
- package/dist/ai/source/BbDatePicker.md +18 -8
- package/dist/ai/source/BbDatePickerInput.md +44 -27
- package/dist/ai/source/BbDialog.md +23 -13
- package/dist/ai/source/BbDropdown.md +61 -25
- package/dist/ai/source/BbDropdownButton.md +67 -25
- package/dist/ai/source/BbDropdownGroup.md +38 -15
- package/dist/ai/source/BbForm.md +1 -1
- package/dist/ai/source/BbHost.md +4 -4
- package/dist/ai/source/BbHoverCard.md +6 -2
- package/dist/ai/source/BbIcon.md +5 -4
- package/dist/ai/source/BbIndicator.md +1 -1
- package/dist/ai/source/BbNumberInput.md +44 -30
- package/dist/ai/source/BbOffCanvas.md +17 -10
- package/dist/ai/source/BbPagination.md +10 -18
- package/dist/ai/source/BbPopover.md +17 -9
- package/dist/ai/source/BbPopoverPortal.md +2 -2
- package/dist/ai/source/BbRadio.md +18 -7
- package/dist/ai/source/BbRadioGroup.md +67 -27
- package/dist/ai/source/BbRating.md +21 -11
- package/dist/ai/source/BbSelect.md +51 -32
- package/dist/ai/source/BbSelectPopover.md +81 -38
- package/dist/ai/source/BbSlider.md +929 -565
- package/dist/ai/source/BbSwitchGroup.md +28 -9
- package/dist/ai/source/BbTable.md +17 -30
- package/dist/ai/source/BbTabs.md +5 -2
- package/dist/ai/source/BbTabsList.md +1 -1
- package/dist/ai/source/BbTabsPanels.md +1 -1
- package/dist/ai/source/BbTabsRoot.md +1 -1
- package/dist/ai/source/BbTag.md +27 -20
- package/dist/ai/source/BbTextInput.md +29 -26
- package/dist/ai/source/BbTextarea.md +53 -45
- package/dist/ai/source/BbTimePicker.md +19 -7
- package/dist/ai/source/BbTimePickerInput.md +34 -21
- package/dist/ai/source/BbToast.md +18 -9
- package/dist/ai/source/BbToastPortal.md +14 -6
- package/dist/ai/source/BbTooltip.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +9 -4
- package/dist/ai/source/FlatListBox.md +11 -1
- package/dist/ai/source/GroupedListBox.md +12 -1
- package/dist/ai/source/ListBox.md +1 -1
- package/dist/ai/source/OptionsContainer.md +48 -1
- package/dist/assets/svgs/arrow_up.svg_raw.js +3 -0
- package/dist/assets/svgs/caret_down.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_left_small.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_right_small.svg_raw.js +3 -0
- package/dist/assets/svgs/close.svg_raw.js +3 -0
- package/dist/assets/svgs/eyedropper.svg_raw.js +3 -0
- package/dist/assets/svgs/move.svg_raw.js +3 -0
- package/dist/assets/svgs/x.svg_raw.js +3 -0
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +48 -44
- package/dist/components/BbAlert/types.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +54 -53
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -56
- package/dist/components/BbBadge/types.d.ts +1 -1
- package/dist/components/BbButton/BbButton.vue.d.ts +2 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +110 -98
- package/dist/components/BbButton/types.d.ts +12 -10
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +17 -17
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +298 -313
- package/dist/components/BbCalendar/useCalendarGrid.js +3 -2
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +4 -2
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +94 -82
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +78 -55
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +184 -151
- package/dist/components/BbCheckboxGroup/types.d.ts +10 -5
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +13 -11
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +82 -71
- package/dist/components/BbColorInput/types.d.ts +8 -8
- package/dist/components/BbColorInput/types.js +1 -1
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +180 -182
- package/dist/components/BbColorPalette/types.d.ts +2 -2
- package/dist/components/BbConfigScope/BbConfigScope.vue.d.ts +12 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue.js +4 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/BbConfigScope/types.d.ts +20 -0
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +31 -31
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +171 -170
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +110 -110
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +457 -441
- package/dist/components/BbDatePickerInput/types.d.ts +8 -8
- package/dist/components/BbDatePickerInput/types.js +1 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +4 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +204 -197
- package/dist/components/BbDialog/types.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +5 -4
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +302 -286
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +348 -344
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +97 -97
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +1 -1
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbDropdown/pointerTrail.d.ts +5 -0
- package/dist/components/BbDropdown/pointerTrail.js +26 -0
- package/dist/components/BbDropdown/types.d.ts +25 -13
- package/dist/components/BbDropdown/types.js +11 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +4 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -69
- package/dist/components/BbDropdownButton/types.d.ts +30 -13
- package/dist/components/BbDropdownButton/types.js +7 -3
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +5 -5
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -2
- package/dist/components/BbForm/BbFormCustomField.js +2 -2
- package/dist/components/BbForm/bindFormField.js +66 -66
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbHost/BbHostOpening.d.ts +1 -1
- package/dist/components/BbHost/types.d.ts +2 -2
- package/dist/components/BbHoverCard/BbHoverCard.vue.d.ts +2 -2
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +158 -157
- package/dist/components/BbIcon/BbIcon.vue.d.ts +1 -1
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/components/BbIndicator/types.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -9
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +248 -232
- package/dist/components/BbNumberInput/types.d.ts +12 -11
- package/dist/components/BbNumberInput/types.js +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +2 -2
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +275 -274
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +104 -108
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +90 -90
- package/dist/components/BbPopover/types.d.ts +2 -2
- package/dist/components/BbRadio/BbRadio.vue.d.ts +4 -2
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +105 -93
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +72 -49
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +214 -181
- package/dist/components/BbRadioGroup/types.d.ts +11 -5
- package/dist/components/BbRating/BbRating.vue.d.ts +7 -5
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +139 -128
- package/dist/components/BbSelect/BbSelect.vue.d.ts +174 -155
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +179 -158
- package/dist/components/BbSelect/types.d.ts +23 -19
- package/dist/components/BbSelect/types.js +4 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +21 -16
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +637 -623
- package/dist/components/BbSelectPopover/reclickClears.d.ts +17 -0
- package/dist/components/BbSelectPopover/reclickClears.js +4 -0
- package/dist/components/BbSelectPopover/types.d.ts +21 -16
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSlider/BbSlider.vue.d.ts +22 -15
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +382 -315
- package/dist/components/BbSlider/types.d.ts +136 -47
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +28 -27
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +4 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1128 -1135
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +1 -1
- package/dist/components/BbTabs/BbTabs.vue.d.ts +21 -21
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/components/BbTabs/types.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue.d.ts +15 -13
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +196 -185
- package/dist/components/BbTag/types.d.ts +7 -7
- package/dist/components/BbTag/types.js +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +30 -30
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +66 -55
- package/dist/components/BbTextInput/types.d.ts +9 -9
- package/dist/components/BbTextInput/types.js +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +30 -30
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +96 -86
- package/dist/components/BbTextarea/types.d.ts +8 -8
- package/dist/components/BbTextarea/types.js +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -12
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +73 -73
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +286 -273
- package/dist/components/BbTimePickerInput/types.d.ts +8 -8
- package/dist/components/BbTimePickerInput/types.js +1 -1
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +75 -80
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
- package/dist/components/BbTooltip/types.d.ts +1 -1
- package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +11 -16
- package/dist/components/CommonFieldInput/types.d.ts +1 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/FlatListBox/types.d.ts +1 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/GroupedListBox/types.d.ts +1 -1
- package/dist/components/ListBox/types.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +87 -69
- package/dist/components/OptionsContainer/types.d.ts +5 -0
- package/dist/components/Transitions/Slide.vue.d.ts +1 -1
- package/dist/composables/useBbTabs.js +94 -90
- package/dist/composables/useConfig.js +2 -9
- package/dist/composables/useConfigDefaults.d.ts +54 -0
- package/dist/composables/useConfigDefaults.js +56 -0
- package/dist/composables/useConfirm.d.ts +7 -7
- package/dist/composables/useFormBinding.d.ts +1 -1
- package/dist/composables/useFormBinding.js +3 -3
- package/dist/composables/usePassthrough.d.ts +7 -5
- package/dist/composables/usePassthrough.js +137 -133
- package/dist/composables/useToast.d.ts +5 -4
- package/dist/composables/useToast.js +47 -37
- package/dist/deprecation/ai-deprecations.json.d.ts +44 -15
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.js +7 -7
- package/dist/i18n/locales/cs.json +2 -1
- package/dist/i18n/locales/da.json +2 -1
- package/dist/i18n/locales/de-CH.json +2 -1
- package/dist/i18n/locales/de.json +2 -1
- package/dist/i18n/locales/el.json +2 -1
- package/dist/i18n/locales/en-GB.json +2 -1
- package/dist/i18n/locales/en.json +2 -1
- package/dist/i18n/locales/es-MX.json +2 -1
- package/dist/i18n/locales/es.json +2 -1
- package/dist/i18n/locales/fi.json +2 -1
- package/dist/i18n/locales/fr.json +2 -1
- package/dist/i18n/locales/hu.json +2 -1
- package/dist/i18n/locales/it.json +2 -1
- package/dist/i18n/locales/ja.json +2 -1
- package/dist/i18n/locales/ko.json +2 -1
- package/dist/i18n/locales/nb.json +2 -1
- package/dist/i18n/locales/nl.json +2 -1
- package/dist/i18n/locales/pl.json +2 -1
- package/dist/i18n/locales/pt-BR.json +2 -1
- package/dist/i18n/locales/pt-PT.json +2 -1
- package/dist/i18n/locales/ro.json +2 -1
- package/dist/i18n/locales/ru.json +2 -1
- package/dist/i18n/locales/sv.json +2 -1
- package/dist/i18n/locales/tr.json +2 -1
- package/dist/i18n/locales/uk.json +2 -1
- package/dist/i18n/locales/zh-CN.json +2 -1
- package/dist/i18n/locales/zh-HK.json +2 -1
- package/dist/i18n/locales/zh-TW.json +2 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/llms-full.txt +2273 -1243
- package/dist/llms-medium.txt +362 -184
- package/dist/llms.txt +4 -4
- package/dist/locale-blueprint.json +2 -1
- package/dist/nuxt-auto-imports.js +1 -1
- package/dist/nuxt-module.d.ts +1 -1
- package/dist/nuxt.js +17 -17
- package/dist/project-dts.d.ts +72 -10
- package/dist/project-dts.js +69 -21
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +1 -1
- package/dist/types/BadgeVariant.d.ts +1 -1
- package/dist/types/ButtonVariant.d.ts +1 -1
- package/dist/types/CheckboxVariant.d.ts +7 -4
- package/dist/types/CheckboxVariant.js +5 -1
- package/dist/types/Config.d.ts +17 -103
- package/dist/types/ConfigDefaults.d.ts +352 -0
- package/dist/types/ConfigDefaults.js +115 -0
- package/dist/types/ConfirmVariant.d.ts +1 -1
- package/dist/types/DropdownItemVariant.d.ts +1 -1
- package/dist/types/FieldLayout.d.ts +3 -3
- package/dist/types/IndicatorVariant.d.ts +1 -1
- package/dist/types/InputVariant.d.ts +57 -24
- package/dist/types/RadioVariant.d.ts +7 -4
- package/dist/types/RadioVariant.js +5 -1
- package/dist/types/SizeScale.d.ts +4 -0
- package/dist/types/SizeScale.js +17 -0
- package/dist/types/TabsVariant.d.ts +1 -1
- package/dist/types/ToastVariant.d.ts +1 -1
- package/dist/types/TooltipVariant.d.ts +1 -1
- package/dist/types/passthrough.d.ts +6 -6
- package/dist/types/ptComponentMap.d.ts +14 -14
- package/dist/utilities/functions/searchRank.d.ts +19 -0
- package/dist/utilities/functions/searchRank.js +76 -0
- package/dist/utilities/misc/listboxMetrics.d.ts +1 -1
- package/dist/utils/configDefaults.d.ts +33 -0
- package/dist/utils/configDefaults.js +140 -0
- package/dist/utils/configScope.d.ts +43 -0
- package/dist/utils/configScope.js +13 -0
- package/dist/utils/passthrough.d.ts +4 -7
- package/dist/utils/passthrough.js +31 -29
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +54 -191
- package/dist/vite.js +318 -367
- package/llms.txt +4 -4
- package/package.json +3 -3
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/agent-manifest.mjs +2 -0
- package/scripts/lib/eslint-disable.mjs +2 -0
- package/scripts/lib/eslint-plugin.d.ts +4 -2
- package/scripts/lib/eslint-plugin.mjs +67 -0
- package/scripts/lib/idiom-scan.mjs +8 -7
- package/scripts/lib/project-variant-dts.mjs +105 -36
- package/scripts/lib/validate-bb-markup.mjs +73 -13
- package/dist/ai/BbPtScope.md +0 -138
- package/dist/ai/manifest/components/BbPtScope.json +0 -21
- package/dist/ai/source/BbPtScope.md +0 -54
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +0 -12
- package/dist/components/BbPtScope/BbPtScope.vue.js +0 -4
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +0 -12
- package/dist/components/BbPtScope/types.d.ts +0 -15
- package/dist/types/PtScope.d.ts +0 -15
- package/dist/utilities/functions/head.js +0 -3
- package/dist/utilities/functions/matchAnyKey.d.ts +0 -8
- package/dist/utilities/functions/matchAnyKey.js +0 -14
- package/dist/utils/ptScope.d.ts +0 -8
- package/dist/utils/ptScope.js +0 -3
|
@@ -32,7 +32,7 @@ export declare const ALERT_VARIANTS: readonly ["outline", "primary", "destructiv
|
|
|
32
32
|
* Variant type for `BbAlert.variant`.
|
|
33
33
|
*
|
|
34
34
|
* Locked to registered variants — the built-in set plus any added via the vite
|
|
35
|
-
* plugin `
|
|
35
|
+
* plugin `components.BbAlert.variants` option — so unknown names are a compile error. For a
|
|
36
36
|
* one-off, register it (recommended) or force it with a cast: the class
|
|
37
37
|
* `bb-alert--<variant>` is interpolated at runtime, so your CSS still applies.
|
|
38
38
|
*/
|
|
@@ -32,7 +32,7 @@ export declare const BADGE_VARIANTS: readonly ["primary", "secondary", "destruct
|
|
|
32
32
|
* Variant type for `BbBadge.variant`.
|
|
33
33
|
*
|
|
34
34
|
* Locked to registered variants — the built-in set plus any added via the vite
|
|
35
|
-
* plugin `
|
|
35
|
+
* plugin `components.BbBadge.variants` option — so unknown names are a compile error.
|
|
36
36
|
* `'none'` opts out of variant styling: no `bb-badge--*` class, the base
|
|
37
37
|
* tokens stay, and you set `--bg` / `--fg` yourself. For a one-off, register
|
|
38
38
|
* it (recommended) or force it with a cast: the class `bb-badge--<variant>` is
|
|
@@ -36,7 +36,7 @@ export declare const BUTTON_VARIANTS: readonly ["primary", "outline", "secondary
|
|
|
36
36
|
* Variant type for `BbButton.variant`.
|
|
37
37
|
*
|
|
38
38
|
* Locked to registered variants — the built-in set plus any added via the vite
|
|
39
|
-
* plugin `
|
|
39
|
+
* plugin `components.BbButton.variants` option — so unknown names are a compile error rather
|
|
40
40
|
* than a silently unstyled button. `'none'` opts out of variant styling. For a
|
|
41
41
|
* one-off, register it (recommended) or force it with a cast: the class
|
|
42
42
|
* `bb-button--<variant>` is interpolated at runtime, so your CSS still applies.
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export interface CheckboxVariantRegistry {
|
|
11
11
|
pill: true;
|
|
12
12
|
line: true;
|
|
13
|
+
outline: true;
|
|
13
14
|
}
|
|
14
15
|
export type CheckboxVariantFromRegistry = keyof CheckboxVariantRegistry;
|
|
15
16
|
/**
|
|
@@ -21,16 +22,18 @@ export type CheckboxVariantFromRegistry = keyof CheckboxVariantRegistry;
|
|
|
21
22
|
*
|
|
22
23
|
* @state pill - On every part: `variant: 'pill'`. Merged after the part's base entry and before its states, so the real states still win.
|
|
23
24
|
* @state line - On every part: `variant: 'line'`. Below the real states, like every variant.
|
|
25
|
+
* @state outline - On every part: `variant: 'outline'`. Below the real states, like every variant.
|
|
24
26
|
*/
|
|
25
|
-
export type CheckboxVariantBuiltIn = 'pill' | 'line';
|
|
27
|
+
export type CheckboxVariantBuiltIn = 'pill' | 'line' | 'outline';
|
|
26
28
|
/** The built-in names at runtime, for the passthrough resolver. */
|
|
27
|
-
export declare const CHECKBOX_VARIANTS: readonly ["pill", "line"];
|
|
29
|
+
export declare const CHECKBOX_VARIANTS: readonly ["pill", "line", "outline"];
|
|
28
30
|
/**
|
|
29
31
|
* Variant type for the `variant` of `BbCheckboxGroup`: a tab-strip look on the
|
|
30
32
|
* group (Q76.11 d).
|
|
31
33
|
*
|
|
32
|
-
* Locked to registered variants — the built-in set (`pill`, `line
|
|
33
|
-
*
|
|
34
|
+
* Locked to registered variants — the built-in set (`pill`, `line`,
|
|
35
|
+
* `outline`) plus
|
|
36
|
+
* any added via the vite plugin `components.BbCheckboxGroup.variants` option — so unknown names
|
|
34
37
|
* are a compile error. For a one-off, register it (recommended) or force it
|
|
35
38
|
* with a cast: the class `bb-checkbox-group__list--<variant>` is interpolated at
|
|
36
39
|
* runtime, so your CSS still applies.
|
package/dist/types/Config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CssLayersOption } from '../utils/cssLayers';
|
|
2
|
+
import { BbComponentsMap } from './ConfigDefaults';
|
|
2
3
|
import { PtGlobalMap } from './passthrough';
|
|
3
4
|
import { Sizes } from './SizeScale';
|
|
4
|
-
import { BbToastPosition } from '../components/BbToast/types';
|
|
5
5
|
import { BuiltinLocaleKey, LocaleKey } from '../i18n';
|
|
6
6
|
export type { Sizes as DialogSizes };
|
|
7
7
|
export type { BuiltinLocaleKey, LocaleKey };
|
|
@@ -15,7 +15,7 @@ export type NullValuePolicy = 'null' | 'string';
|
|
|
15
15
|
export type NullValueOf<Policy extends NullValuePolicy> = Policy extends 'string' ? '' : null;
|
|
16
16
|
/**
|
|
17
17
|
* The text controls whose app-wide policy is `'string'`: one key per
|
|
18
|
-
* `
|
|
18
|
+
* `components.<C>.nullValue: 'string'` of the Vite plugin, written into the
|
|
19
19
|
* project's committed `bitboss-ui.d.ts`. Empty in the package, so every
|
|
20
20
|
* control types its empty value as `null`.
|
|
21
21
|
* @internal
|
|
@@ -37,42 +37,6 @@ export type RegisteredNullValue<Component extends string> = Component extends ke
|
|
|
37
37
|
* fixed, then quiet again until the next submit.
|
|
38
38
|
*/
|
|
39
39
|
export type ValidationMode = 'aggressive' | 'balanced' | 'lazy' | 'submit-only' | 'submit-live';
|
|
40
|
-
/**
|
|
41
|
-
* App-wide defaults for form controls. Every key is optional where you set
|
|
42
|
-
* it (the plugin option and `app.use`), and an unset key keeps its default.
|
|
43
|
-
*/
|
|
44
|
-
/**
|
|
45
|
-
* App-wide settings of the confirm dialog `<BbHost />` renders (Q72.18 D5:
|
|
46
|
-
* host settings live in the plugin config, nested per host part).
|
|
47
|
-
*/
|
|
48
|
-
export type ConfirmConfig = {
|
|
49
|
-
/**
|
|
50
|
-
* Default maximum width of every confirm, as one of the dialog presets
|
|
51
|
-
* (`'xs'` – `'2xl'`). A per-call `size` wins. Unset, the dialog's own
|
|
52
|
-
* default applies.
|
|
53
|
-
*/
|
|
54
|
-
defaultSize?: keyof Sizes;
|
|
55
|
-
};
|
|
56
|
-
export type FormControlsConfig = {
|
|
57
|
-
/**
|
|
58
|
-
* What `BbTextInput` emits when it is emptied (typing it empty, the clear
|
|
59
|
-
* button, a mask with nothing in it): `'null'` (the default) emits `null`,
|
|
60
|
-
* `'string'` emits `''`. Pick the one your backend and your schema expect:
|
|
61
|
-
* with `'string'`, a schema such as `z.string().min(1, 'Required')` shows
|
|
62
|
-
* your message on an empty field instead of the library's type error for
|
|
63
|
-
* `null`. Set in the Vite plugin, it also types the field's
|
|
64
|
-
* `update:modelValue` payload.
|
|
65
|
-
*/
|
|
66
|
-
textInputNullValue: NullValuePolicy;
|
|
67
|
-
/** The same, for `BbTextarea`. */
|
|
68
|
-
textareaNullValue: NullValuePolicy;
|
|
69
|
-
/**
|
|
70
|
-
* The app-wide `validation-mode` of the form controls inside a `BbForm`. A
|
|
71
|
-
* `BbForm`'s `validation-mode` overrides it for its fields, and a field's
|
|
72
|
-
* own overrides both. Default `'balanced'`.
|
|
73
|
-
*/
|
|
74
|
-
validationMode: ValidationMode;
|
|
75
|
-
};
|
|
76
40
|
export type EditableConfig = {
|
|
77
41
|
inertiaLinkName: string;
|
|
78
42
|
nuxtLinkName: string;
|
|
@@ -95,27 +59,6 @@ export type EditableConfig = {
|
|
|
95
59
|
* a fixed width matching your audience. See the installation guide.
|
|
96
60
|
*/
|
|
97
61
|
ssrViewportWidth: number;
|
|
98
|
-
/**
|
|
99
|
-
* Default for the `adaptive` prop of surface components (BbDialog, BbPopover,
|
|
100
|
-
* BbDropdown, the select family, the date/time picker family, BbColorInput,
|
|
101
|
-
* BbColorPalette). When true, those components open as a bottom off-canvas
|
|
102
|
-
* sheet on mobile instead of their floating surface. Overridable per component
|
|
103
|
-
* via the `adaptive` prop (an explicit value always wins over this default).
|
|
104
|
-
*/
|
|
105
|
-
adaptive: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* The select family's (BbSelect, BbSelectPopover) `disableWriting: 'auto'`
|
|
108
|
-
* threshold — and `'auto'` is what an unset `disable-writing` means. An
|
|
109
|
-
* **array** `items` with FEWER options than this (disabled ones included,
|
|
110
|
-
* group headers excluded) opens without a search field, decided when the
|
|
111
|
-
* panel opens and held until it closes; a provider (function) `items`, or a
|
|
112
|
-
* consumer listening to `option:add`, always keeps the field. Non-negative
|
|
113
|
-
* integer, default `6`; `0` turns `'auto'` off, so every search field is
|
|
114
|
-
* shown unless the instance sets `disable-writing` itself. There is
|
|
115
|
-
* deliberately no global "hide every search field" switch — hiding or
|
|
116
|
-
* forcing a field is a per-instance `disable-writing`.
|
|
117
|
-
*/
|
|
118
|
-
autoDisableWritingThreshold: number;
|
|
119
62
|
locale: LocaleKey;
|
|
120
63
|
injectStyles: boolean;
|
|
121
64
|
resetCss: boolean;
|
|
@@ -137,41 +80,8 @@ export type EditableConfig = {
|
|
|
137
80
|
*/
|
|
138
81
|
cssLayers: CssLayersOption | undefined;
|
|
139
82
|
injectDirectives: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* When `true` (the default), form controls render a red asterisk next to
|
|
142
|
-
* the label/legend of `required` fields. Purely presentational — it keys
|
|
143
|
-
* off the standard `required` prop and does not change validation or
|
|
144
|
-
* native `required` semantics.
|
|
145
|
-
*
|
|
146
|
-
* Inside a `BbForm` it also reads the field's `rules`, but
|
|
147
|
-
* only a `required` rule raises it — never the mere presence of rules. Every
|
|
148
|
-
* other vee-validate rule is conditional on a value being present (`max:5`
|
|
149
|
-
* passes on an empty field), so "has rules" would mark optional fields
|
|
150
|
-
* mandatory.
|
|
151
|
-
*/
|
|
152
|
-
requiredAsterisk: boolean;
|
|
153
|
-
/**
|
|
154
|
-
* App-wide form-control defaults: what an emptied `BbTextInput` /
|
|
155
|
-
* `BbTextarea` emits (`null` by default, or `''`). See
|
|
156
|
-
* {@link FormControlsConfig}.
|
|
157
|
-
*/
|
|
158
|
-
formControls: FormControlsConfig;
|
|
159
|
-
defaultInputLabelMode: InputLabelMode;
|
|
160
|
-
iconDefaultSizes: Partial<Sizes>;
|
|
161
|
-
dialogDefaultSizes: Partial<Sizes>;
|
|
162
|
-
offCanvasDefaultSizes: Partial<Sizes>;
|
|
163
|
-
/**
|
|
164
|
-
* Default viewport corner toasts render in when the toast names no
|
|
165
|
-
* `position` of its own.
|
|
166
|
-
*/
|
|
167
|
-
toastPosition: BbToastPosition;
|
|
168
|
-
/** The confirm dialog's settings. See {@link ConfirmConfig}. */
|
|
169
|
-
confirm: ConfirmConfig;
|
|
170
83
|
};
|
|
171
|
-
export type ResolvedConfig =
|
|
172
|
-
iconDefaultSizes: Sizes;
|
|
173
|
-
dialogDefaultSizes: Sizes;
|
|
174
|
-
offCanvasDefaultSizes: Sizes;
|
|
84
|
+
export type ResolvedConfig = EditableConfig & {
|
|
175
85
|
/**
|
|
176
86
|
* The per-key fallback anchor for string lookups, resolved by the plugin:
|
|
177
87
|
* the `locale` option when it is a built-in, otherwise `'en'`. Always among
|
|
@@ -188,9 +98,16 @@ export type ResolvedConfig = Omit<EditableConfig, 'iconDefaultSizes' | 'dialogDe
|
|
|
188
98
|
* source of truth for something that is global by construction.
|
|
189
99
|
*/
|
|
190
100
|
readonly pt: Readonly<PtGlobalMap>;
|
|
101
|
+
/**
|
|
102
|
+
* The plugin's `components` map (each entry's `pt` is under `pt` above):
|
|
103
|
+
* per component its allowlisted prop defaults, `variants` and `sizeMap`,
|
|
104
|
+
* plus `all`. Build-time only, like `pt`; a config scope's map is read
|
|
105
|
+
* through `<BbConfigScope>`, never from here.
|
|
106
|
+
*/
|
|
107
|
+
readonly components: Readonly<BbComponentsMap>;
|
|
191
108
|
/**
|
|
192
109
|
* Each variant's icon, from the object form of the build plugin's
|
|
193
|
-
* `
|
|
110
|
+
* `components.BbToast.variants` / `components.BbAlert.variants` (owner 2026-10-13). Build-time only,
|
|
194
111
|
* like `pt`: a toast or alert without its own `icon` uses its variant's,
|
|
195
112
|
* and `hideIcon` hides either.
|
|
196
113
|
*/
|
|
@@ -199,8 +116,9 @@ export type ResolvedConfig = Omit<EditableConfig, 'iconDefaultSizes' | 'dialogDe
|
|
|
199
116
|
alert: Readonly<Record<string, string>>;
|
|
200
117
|
}>;
|
|
201
118
|
/**
|
|
202
|
-
* The app's OWN variant names
|
|
203
|
-
*
|
|
119
|
+
* The app's OWN variant names, keyed by the internal name of each
|
|
120
|
+
* `variants` entry (`buttonVariants` for `components.BbButton.variants`, …), the
|
|
121
|
+
* built-ins left out. Build-time only, like `pt`: the components
|
|
204
122
|
* declare `pt:<part>:<name>` props from it (Q76.7), and the passthrough
|
|
205
123
|
* dev check knows the names.
|
|
206
124
|
*/
|
|
@@ -208,14 +126,10 @@ export type ResolvedConfig = Omit<EditableConfig, 'iconDefaultSizes' | 'dialogDe
|
|
|
208
126
|
};
|
|
209
127
|
/**
|
|
210
128
|
* What `app.use(bitbossUiPlugin, …)` accepts: per-app runtime overrides of the
|
|
211
|
-
* build-time config. `pt`
|
|
129
|
+
* build-time config. `pt` and `components` are not among them — see
|
|
130
|
+
* `ResolvedConfig.pt`.
|
|
212
131
|
*/
|
|
213
|
-
export type PerAppConfig = Partial<Omit<ResolvedConfig, 'pt' | '
|
|
214
|
-
/** Merged key by key over the build-time `formControls`. */
|
|
215
|
-
formControls?: Partial<FormControlsConfig>;
|
|
216
|
-
/** Merged key by key over the build-time `confirm`. */
|
|
217
|
-
confirm?: Partial<ConfirmConfig>;
|
|
218
|
-
};
|
|
132
|
+
export type PerAppConfig = Partial<Omit<ResolvedConfig, 'pt' | 'components'>>;
|
|
219
133
|
/**
|
|
220
134
|
* The runtime-settable slice of the config (`setConfig`).
|
|
221
135
|
*/
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { BbAlertProps } from '../components/BbAlert/types';
|
|
2
|
+
import { BbBadgeProps } from '../components/BbBadge/types';
|
|
3
|
+
import { BbButtonProps } from '../components/BbButton/types';
|
|
4
|
+
import { BbCheckboxProps } from '../components/BbCheckbox/types';
|
|
5
|
+
import { BbCheckboxGroupProps } from '../components/BbCheckboxGroup/types';
|
|
6
|
+
import { BbColorInputProps } from '../components/BbColorInput/types';
|
|
7
|
+
import { BbColorPaletteProps } from '../components/BbColorPalette/types';
|
|
8
|
+
import { BbDatePickerProps } from '../components/BbDatePicker/types';
|
|
9
|
+
import { BbDatePickerInputProps } from '../components/BbDatePickerInput/types';
|
|
10
|
+
import { BbDialogProps } from '../components/BbDialog/types';
|
|
11
|
+
import { BbDropdownProps } from '../components/BbDropdown/types';
|
|
12
|
+
import { BbDropdownButtonProps } from '../components/BbDropdownButton/types';
|
|
13
|
+
import { BbDropzoneProps } from '../components/BbDropzone/types';
|
|
14
|
+
import { BbNumberInputProps } from '../components/BbNumberInput/types';
|
|
15
|
+
import { BbOffCanvasProps } from '../components/BbOffCanvas/types';
|
|
16
|
+
import { BbPopoverProps } from '../components/BbPopover/types';
|
|
17
|
+
import { BbRadioProps } from '../components/BbRadio/types';
|
|
18
|
+
import { BbRadioGroupProps } from '../components/BbRadioGroup/types';
|
|
19
|
+
import { BbRatingProps } from '../components/BbRating/types';
|
|
20
|
+
import { BbSelectProps } from '../components/BbSelect/types';
|
|
21
|
+
import { BbSelectPopoverProps } from '../components/BbSelectPopover/types';
|
|
22
|
+
import { BbSliderProps } from '../components/BbSlider/types';
|
|
23
|
+
import { BbSwitchProps } from '../components/BbSwitch/types';
|
|
24
|
+
import { BbSwitchGroupProps } from '../components/BbSwitchGroup/types';
|
|
25
|
+
import { BbTableProps } from '../components/BbTable/types';
|
|
26
|
+
import { BbTabsProps } from '../components/BbTabs/types';
|
|
27
|
+
import { BbTagProps } from '../components/BbTag/types';
|
|
28
|
+
import { BbTextInputProps } from '../components/BbTextInput/types';
|
|
29
|
+
import { BbTextareaProps } from '../components/BbTextarea/types';
|
|
30
|
+
import { BbTimePickerProps } from '../components/BbTimePicker/types';
|
|
31
|
+
import { BbTimePickerInputProps } from '../components/BbTimePickerInput/types';
|
|
32
|
+
import { BbToastPosition } from '../components/BbToast/types';
|
|
33
|
+
import { InputLabelMode, NullValuePolicy, ValidationMode } from './Config';
|
|
34
|
+
import { BbPtComponentMap } from './ptComponentMap';
|
|
35
|
+
import { RegistryKey } from './RegistryKey';
|
|
36
|
+
import { Sizes } from './SizeScale';
|
|
37
|
+
/**
|
|
38
|
+
* The props a component takes from the plugin's `components` map (and a config
|
|
39
|
+
* scope's): the allowlist, ONE table (Q86.11 review R1–R11). A prop qualifies
|
|
40
|
+
* when apps set it often AND one value makes sense for a whole app or area;
|
|
41
|
+
* never data, wording, ids, `v-model`, handlers or `pt`. Adding a row is data
|
|
42
|
+
* plus its prop's tri-state default (`default: undefined`) and the component
|
|
43
|
+
* reading it through `useConfigDefaults`. A prop `all` takes (`ALL_PROPS`)
|
|
44
|
+
* reaches exactly the components that list it here.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEFAULTS_ALLOWLIST: {
|
|
47
|
+
readonly BbAlert: readonly ["hideClose"];
|
|
48
|
+
readonly BbBadge: readonly ["size", "variant"];
|
|
49
|
+
readonly BbButton: readonly ["variant", "size", "disableAutoLoading", "block"];
|
|
50
|
+
readonly BbCheckbox: readonly ["validationMode", "compact", "layout", "reverse", "inputPosition"];
|
|
51
|
+
readonly BbCheckboxGroup: readonly ["validationMode", "compact", "layout", "listLayout", "itemLayout", "itemReverse", "reverse", "inputPosition", "block"];
|
|
52
|
+
readonly BbColorInput: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse", "adaptive"];
|
|
53
|
+
readonly BbColorPalette: readonly ["adaptive"];
|
|
54
|
+
readonly BbDatePicker: readonly ["adaptive"];
|
|
55
|
+
readonly BbDatePickerInput: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse", "adaptive", "floating"];
|
|
56
|
+
readonly BbDialog: readonly ["adaptive", "fullscreen"];
|
|
57
|
+
readonly BbDropdown: readonly ["adaptive", "compact"];
|
|
58
|
+
readonly BbDropdownButton: readonly ["block"];
|
|
59
|
+
readonly BbDropzone: readonly ["validationMode"];
|
|
60
|
+
readonly BbNumberInput: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse", "disableFormatting", "maxPrecision"];
|
|
61
|
+
readonly BbOffCanvas: readonly ["side"];
|
|
62
|
+
readonly BbPopover: readonly ["adaptive"];
|
|
63
|
+
readonly BbRadio: readonly ["compact", "layout", "reverse", "inputPosition"];
|
|
64
|
+
readonly BbRadioGroup: readonly ["validationMode", "compact", "layout", "listLayout", "itemLayout", "itemReverse", "reverse", "inputPosition", "block"];
|
|
65
|
+
readonly BbRating: readonly ["validationMode", "compact", "layout", "reverse", "inputPosition"];
|
|
66
|
+
readonly BbSelect: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse", "adaptive"];
|
|
67
|
+
readonly BbSelectPopover: readonly ["adaptive", "compact"];
|
|
68
|
+
readonly BbSlider: readonly ["labelMode", "validationMode", "compact", "layout", "reverse"];
|
|
69
|
+
readonly BbSwitch: readonly ["validationMode"];
|
|
70
|
+
readonly BbSwitchGroup: readonly ["validationMode"];
|
|
71
|
+
readonly BbTable: readonly ["compact"];
|
|
72
|
+
readonly BbTabs: readonly ["compact", "block"];
|
|
73
|
+
readonly BbTag: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse"];
|
|
74
|
+
readonly BbTextarea: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse", "nullValue", "autoGrow"];
|
|
75
|
+
readonly BbTextInput: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse", "nullValue"];
|
|
76
|
+
readonly BbTimePicker: readonly ["adaptive"];
|
|
77
|
+
readonly BbTimePickerInput: readonly ["labelMode", "validationMode", "autocomplete", "compact", "layout", "reverse", "adaptive"];
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Per-component settings that are not props: a host's default the component
|
|
81
|
+
* reads where no instance prop exists (`useToast` / `useConfirm` messages).
|
|
82
|
+
*/
|
|
83
|
+
export declare const COMPONENT_SETTINGS: {
|
|
84
|
+
readonly BbConfirm: readonly ["size"];
|
|
85
|
+
readonly BbToast: readonly ["position"];
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* The props `all` takes: each reaches every component that lists it on the
|
|
89
|
+
* allowlist, and nothing else.
|
|
90
|
+
*/
|
|
91
|
+
export declare const ALL_PROPS: readonly ["adaptive", "labelMode", "validationMode", "autocomplete", "compact", "layout", "listLayout", "itemLayout", "itemReverse", "reverse", "inputPosition", "block"];
|
|
92
|
+
/** The settings `all` holds that are no component's prop. */
|
|
93
|
+
export declare const ALL_SETTINGS: readonly ["requiredAsterisk", "autoDisableWritingThreshold", "popoverOffset"];
|
|
94
|
+
/**
|
|
95
|
+
* The components with a size scale (`sizeMap`): what each size name means in
|
|
96
|
+
* px. BbIcon, BbAvatar and BbRating used to share one (`iconDefaultSizes`).
|
|
97
|
+
*/
|
|
98
|
+
export declare const SIZE_MAP_COMPONENTS: readonly ["BbAvatar", "BbDialog", "BbIcon", "BbOffCanvas", "BbRating"];
|
|
99
|
+
/**
|
|
100
|
+
* The keys of a component entry that are not props, a closed list. A
|
|
101
|
+
* library-side check (`check-api-consistency`) fails our build when a
|
|
102
|
+
* component declares a prop under one of them (`pt` is the passthrough prop
|
|
103
|
+
* itself), so a config key can never mean two things.
|
|
104
|
+
*/
|
|
105
|
+
export declare const RESERVED_CONFIG_KEYS: readonly ["pt", "variants", "sizeMap"];
|
|
106
|
+
/**
|
|
107
|
+
* The allowlisted props a config scope may NOT set: the model's type follows
|
|
108
|
+
* them (`RegisteredNullValue`), and TypeScript cannot know which scope a
|
|
109
|
+
* template sits in. App-wide only, like `variants`.
|
|
110
|
+
*/
|
|
111
|
+
export declare const GLOBAL_ONLY_DEFAULTS: {
|
|
112
|
+
readonly BbTextarea: readonly ["nullValue"];
|
|
113
|
+
readonly BbTextInput: readonly ["nullValue"];
|
|
114
|
+
};
|
|
115
|
+
type Allowlist = typeof DEFAULTS_ALLOWLIST;
|
|
116
|
+
type GlobalOnly = typeof GLOBAL_ONLY_DEFAULTS;
|
|
117
|
+
/**
|
|
118
|
+
* Each allowlisted component's props type, where its values come from: a
|
|
119
|
+
* default is typed like the prop (`BbBadge.variant` from the registry, an
|
|
120
|
+
* app-registered name included).
|
|
121
|
+
*/
|
|
122
|
+
interface DefaultsPropsOf {
|
|
123
|
+
BbAlert: BbAlertProps;
|
|
124
|
+
BbBadge: BbBadgeProps;
|
|
125
|
+
BbButton: BbButtonProps;
|
|
126
|
+
BbCheckbox: BbCheckboxProps;
|
|
127
|
+
BbCheckboxGroup: BbCheckboxGroupProps<unknown>;
|
|
128
|
+
BbColorInput: BbColorInputProps;
|
|
129
|
+
BbColorPalette: BbColorPaletteProps;
|
|
130
|
+
BbDatePicker: BbDatePickerProps;
|
|
131
|
+
BbDatePickerInput: BbDatePickerInputProps;
|
|
132
|
+
BbDialog: BbDialogProps;
|
|
133
|
+
BbDropdown: BbDropdownProps;
|
|
134
|
+
BbDropdownButton: BbDropdownButtonProps;
|
|
135
|
+
BbDropzone: BbDropzoneProps;
|
|
136
|
+
BbNumberInput: BbNumberInputProps;
|
|
137
|
+
BbOffCanvas: BbOffCanvasProps;
|
|
138
|
+
BbPopover: BbPopoverProps;
|
|
139
|
+
BbRadio: BbRadioProps;
|
|
140
|
+
BbRadioGroup: BbRadioGroupProps<unknown>;
|
|
141
|
+
BbRating: BbRatingProps;
|
|
142
|
+
BbSelect: BbSelectProps<unknown>;
|
|
143
|
+
BbSelectPopover: BbSelectPopoverProps<unknown>;
|
|
144
|
+
BbSlider: BbSliderProps;
|
|
145
|
+
BbSwitch: BbSwitchProps;
|
|
146
|
+
BbSwitchGroup: BbSwitchGroupProps;
|
|
147
|
+
BbTable: BbTableProps;
|
|
148
|
+
BbTabs: BbTabsProps;
|
|
149
|
+
BbTag: BbTagProps;
|
|
150
|
+
BbTextarea: BbTextareaProps<NullValuePolicy>;
|
|
151
|
+
BbTextInput: BbTextInputProps<NullValuePolicy>;
|
|
152
|
+
BbTimePicker: BbTimePickerProps;
|
|
153
|
+
BbTimePickerInput: BbTimePickerInputProps;
|
|
154
|
+
}
|
|
155
|
+
/** The type of a key `all` takes: the union over the components that own it. */
|
|
156
|
+
type AllKeyType<P extends string> = {
|
|
157
|
+
[C in keyof DefaultsPropsOf]: P extends keyof DefaultsPropsOf[C] ? NonNullable<DefaultsPropsOf[C][P]> : never;
|
|
158
|
+
}[keyof DefaultsPropsOf];
|
|
159
|
+
type KeyType<C, P> = C extends keyof DefaultsPropsOf ? P extends keyof DefaultsPropsOf[C] ? NonNullable<DefaultsPropsOf[C][P]> : never : never;
|
|
160
|
+
/** The components `components` takes prop defaults for. */
|
|
161
|
+
export type BbDefaultsComponent = keyof Allowlist;
|
|
162
|
+
/** One component's allowlisted props, typed off the component itself. */
|
|
163
|
+
export type BbComponentDefaults<C extends BbDefaultsComponent> = {
|
|
164
|
+
[P in Allowlist[C][number]]?: KeyType<C, P>;
|
|
165
|
+
};
|
|
166
|
+
/** The variant names an entry registers; toast and alert take icons too. */
|
|
167
|
+
export type BbVariantNames = readonly string[];
|
|
168
|
+
/** `variants` of BbToast / BbAlert: names, or names → `{ icon }`. */
|
|
169
|
+
export type BbIconVariantNames = readonly string[] | Readonly<Record<string, {
|
|
170
|
+
readonly icon?: string;
|
|
171
|
+
}>>;
|
|
172
|
+
/** The components that register variants, and the form each takes. */
|
|
173
|
+
interface VariantsOf {
|
|
174
|
+
BbAlert: BbIconVariantNames;
|
|
175
|
+
BbBadge: BbVariantNames;
|
|
176
|
+
BbButton: BbVariantNames;
|
|
177
|
+
BbCheckboxGroup: BbVariantNames;
|
|
178
|
+
BbColorInput: BbVariantNames;
|
|
179
|
+
BbConfirm: BbVariantNames;
|
|
180
|
+
BbDatePickerInput: BbVariantNames;
|
|
181
|
+
BbDropdown: BbVariantNames;
|
|
182
|
+
BbIndicator: BbVariantNames;
|
|
183
|
+
BbNumberInput: BbVariantNames;
|
|
184
|
+
BbRadioGroup: BbVariantNames;
|
|
185
|
+
BbSelect: BbVariantNames;
|
|
186
|
+
BbTabs: BbVariantNames;
|
|
187
|
+
BbTag: BbVariantNames;
|
|
188
|
+
BbTextarea: BbVariantNames;
|
|
189
|
+
BbTextInput: BbVariantNames;
|
|
190
|
+
BbTimePickerInput: BbVariantNames;
|
|
191
|
+
BbToast: BbIconVariantNames;
|
|
192
|
+
BbTooltip: BbVariantNames;
|
|
193
|
+
}
|
|
194
|
+
/** Per component, the non-prop settings (`COMPONENT_SETTINGS`). */
|
|
195
|
+
interface SettingsOf {
|
|
196
|
+
/** Default maximum width of every confirm, a `BbDialog` size; a per-call `size` wins. */
|
|
197
|
+
BbConfirm: {
|
|
198
|
+
size?: keyof Sizes;
|
|
199
|
+
};
|
|
200
|
+
/** The viewport corner a toast renders in when the call names none. */
|
|
201
|
+
BbToast: {
|
|
202
|
+
position?: BbToastPosition;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
type SizeMapOwner = (typeof SIZE_MAP_COMPONENTS)[number];
|
|
206
|
+
type AnyComponent = keyof BbPtComponentMap;
|
|
207
|
+
/**
|
|
208
|
+
* No inference source (a map in its own file, the Nuxt module, a scope prop):
|
|
209
|
+
* `variant` then also takes any string, so it is never red while typing, and
|
|
210
|
+
* the plugin's build check catches a wrong name. The default of
|
|
211
|
+
* `BbComponentsMap`'s second parameter.
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
214
|
+
export interface BbUninferredVariants {
|
|
215
|
+
readonly 'bitboss-ui:uninferred': true;
|
|
216
|
+
}
|
|
217
|
+
/** The names a `variants` value registers: the list, or the object form's keys. */
|
|
218
|
+
type VariantNamesOf<X> = X extends ReadonlyArray<infer N> ? N & string : X extends Readonly<Record<infer K, unknown>> ? K & string : never;
|
|
219
|
+
/**
|
|
220
|
+
* `variant`'s extra names in an inline map: the `variants` written beside it,
|
|
221
|
+
* or — when none are (the map came from a file of its own, or the names are
|
|
222
|
+
* only in the generated registry) — any string, so it is never red before
|
|
223
|
+
* the dev server has written `bitboss-ui.d.ts`; the build check judges it.
|
|
224
|
+
*/
|
|
225
|
+
type InferredNames<X> = unknown extends X ? string & {} : VariantNamesOf<X>;
|
|
226
|
+
/** The allowlisted props of `C` other than `variant`. */
|
|
227
|
+
type DefaultsExceptVariant<C extends string> = C extends BbDefaultsComponent ? {
|
|
228
|
+
[P in Exclude<Allowlist[C][number], 'variant'>]?: KeyType<C, P>;
|
|
229
|
+
} : unknown;
|
|
230
|
+
/** Every key of an entry but `variant` / `variants`. */
|
|
231
|
+
type EntryRest<C extends string> = DefaultsExceptVariant<C> & (C extends keyof SettingsOf ? SettingsOf[C] : unknown) & {
|
|
232
|
+
/** The component's `pt` map, merged under every instance's own. */
|
|
233
|
+
pt?: C extends keyof BbPtComponentMap ? NonNullable<BbPtComponentMap[C]> : Record<string, unknown>;
|
|
234
|
+
} & (C extends SizeMapOwner ? {
|
|
235
|
+
/** What each size name means, in px; unset names keep the built-in. */
|
|
236
|
+
sizeMap?: Partial<Sizes>;
|
|
237
|
+
} : unknown);
|
|
238
|
+
/**
|
|
239
|
+
* The `variant` default: the component's own type (built-ins, the registry,
|
|
240
|
+
* BbButton's `'none'`) plus `Extra` (the names registered beside it, or any
|
|
241
|
+
* string where nothing infers them).
|
|
242
|
+
*/
|
|
243
|
+
type VariantDefault<C extends string, Extra> = C extends BbDefaultsComponent ? 'variant' extends Allowlist[C][number] ? {
|
|
244
|
+
variant?: KeyType<C, 'variant'> | Extra;
|
|
245
|
+
} : unknown : unknown;
|
|
246
|
+
/** The `variants` key, `Names` being what the call registered (or the open form). */
|
|
247
|
+
type VariantsKey<C extends string, Names> = C extends keyof VariantsOf ? {
|
|
248
|
+
/** The app's own variant names, appended to the built-ins. App-wide only. */
|
|
249
|
+
variants?: Names & VariantsOf[C];
|
|
250
|
+
} : unknown;
|
|
251
|
+
/** `variant`'s extra names for component `C` under the variants map `V`. */
|
|
252
|
+
type ExtraNames<C extends string, V> = V extends BbUninferredVariants ? string & {} : C extends keyof V ? NoInfer<VariantNamesOf<V[C]>> : never;
|
|
253
|
+
/**
|
|
254
|
+
* One component's entry of the `components` map: its allowlisted props under
|
|
255
|
+
* the component's own prop names, its `pt`, and (where the component has them)
|
|
256
|
+
* `variants` (the app's own variant names) and `sizeMap` (its size scale).
|
|
257
|
+
* `V` (component → its `variants`) types `variant` against the names
|
|
258
|
+
* registered beside it; unset, `variant` also takes any string.
|
|
259
|
+
*/
|
|
260
|
+
export type BbComponentConfig<C extends string, V = BbUninferredVariants> = EntryRest<C> & VariantDefault<C, ExtraNames<C, V>> & VariantsKey<C, unknown>;
|
|
261
|
+
/**
|
|
262
|
+
* `all`: settings for every component that owns the prop (`adaptive` reaches
|
|
263
|
+
* the eleven surfaces that take it, and nothing else), plus the cross-component
|
|
264
|
+
* settings no single component owns. A component's own entry wins over `all`.
|
|
265
|
+
*/
|
|
266
|
+
export interface BbAllConfig {
|
|
267
|
+
/** Surfaces open as a bottom sheet on mobile. Default `true`. */
|
|
268
|
+
adaptive?: boolean;
|
|
269
|
+
/** The text-like fields' label placement. Default `'outside'`. */
|
|
270
|
+
labelMode?: InputLabelMode;
|
|
271
|
+
/** When validated fields check themselves. A `BbForm`'s own wins. Default `'balanced'`. */
|
|
272
|
+
validationMode?: ValidationMode;
|
|
273
|
+
/** A red asterisk beside required fields' labels. Default `true`. */
|
|
274
|
+
requiredAsterisk?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* `disable-writing: 'auto'` of BbSelect / BbSelectPopover: an array `items`
|
|
277
|
+
* shorter than this opens without a search field. Non-negative integer,
|
|
278
|
+
* default `6`; `0` turns `'auto'` off.
|
|
279
|
+
*/
|
|
280
|
+
autoDisableWritingThreshold?: number;
|
|
281
|
+
/**
|
|
282
|
+
* The gap, in px, between every floating surface and its trigger (the
|
|
283
|
+
* popovers, menus, pickers): their `offset` default. An instance's own
|
|
284
|
+
* `offset` wins. Default `4`.
|
|
285
|
+
*/
|
|
286
|
+
popoverOffset?: number;
|
|
287
|
+
/** `autocomplete` of the text-like fields (an auth scope sets its own). */
|
|
288
|
+
autocomplete?: AllKeyType<'autocomplete'>;
|
|
289
|
+
/** The dense look of every component that has one. */
|
|
290
|
+
compact?: boolean;
|
|
291
|
+
/** The label / control arrangement of the fields and choices (R10). */
|
|
292
|
+
layout?: AllKeyType<'layout'>;
|
|
293
|
+
/** How a choice group lays its options out. */
|
|
294
|
+
listLayout?: AllKeyType<'listLayout'>;
|
|
295
|
+
/** How each option of a choice group is laid out. */
|
|
296
|
+
itemLayout?: AllKeyType<'itemLayout'>;
|
|
297
|
+
/** A choice group's options with the label first. */
|
|
298
|
+
itemReverse?: boolean;
|
|
299
|
+
/** The label after the control. */
|
|
300
|
+
reverse?: boolean;
|
|
301
|
+
/** Which side the box / radio sits on. */
|
|
302
|
+
inputPosition?: AllKeyType<'inputPosition'>;
|
|
303
|
+
/** Full-width buttons, groups and tab strips. */
|
|
304
|
+
block?: boolean;
|
|
305
|
+
}
|
|
306
|
+
/** One component's entry in a scope: the app's minus the app-wide-only keys. */
|
|
307
|
+
type ScopeEntry<C extends string, V> = Omit<EntryRest<C>, C extends keyof GlobalOnly ? GlobalOnly[C][number] : never> & VariantDefault<C, ExtraNames<C, V>>;
|
|
308
|
+
/**
|
|
309
|
+
* The `components` map: per component its allowlisted prop defaults, `pt`,
|
|
310
|
+
* `variants` and `sizeMap`, plus `all`. Data only (it ships as JSON) and
|
|
311
|
+
* build-checked. ONE type, two modes:
|
|
312
|
+
*
|
|
313
|
+
* - `'global'` (the default): the plugin's `components` option, every key.
|
|
314
|
+
* - `'scope'`: a `configScopes` entry and `<BbConfigScope :config>`, minus
|
|
315
|
+
* the app-wide-only keys (`variants`, `nullValue`).
|
|
316
|
+
*
|
|
317
|
+
* A map kept in its own file: `satisfies BbComponentsMap` (or
|
|
318
|
+
* `BbComponentsMap<'scope'>` for a scope). `V` (component → its
|
|
319
|
+
* `variants`, e.g. `{ BbButton: readonly ['brand'] }`) types each `variant`
|
|
320
|
+
* against those names; `bitbossUi({ components })` infers it.
|
|
321
|
+
*/
|
|
322
|
+
export type BbComponentsMap<Mode extends 'global' | 'scope' = 'global', V = BbUninferredVariants> = {
|
|
323
|
+
all?: BbAllConfig;
|
|
324
|
+
} & {
|
|
325
|
+
[C in AnyComponent]?: Mode extends 'scope' ? ScopeEntry<C, V> : BbComponentConfig<C, V>;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* The `components` option as `bitbossUi()` reads it: one key per component
|
|
329
|
+
* written, `V` inferred from each `variants` (the only inference site), and
|
|
330
|
+
* each `variant` checked against the built-ins and those names.
|
|
331
|
+
* @internal
|
|
332
|
+
*/
|
|
333
|
+
export type BbInferredComponentsMap<V> = {
|
|
334
|
+
[C in keyof V]: C extends 'all' ? BbAllConfig : C extends AnyComponent ? EntryRest<C> & VariantDefault<C, NoInfer<InferredNames<V[C]>>> & VariantsKey<C, V[C]> : {
|
|
335
|
+
'bitboss-ui: not a component name': never;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* One key per `configScopes` entry of the plugin config, written by the Vite
|
|
340
|
+
* plugin into the project's committed `bitboss-ui.d.ts`. Empty in the package.
|
|
341
|
+
* @internal
|
|
342
|
+
*/
|
|
343
|
+
export interface ConfigScopeRegistry {
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* The name of a scope registered with the plugin's `configScopes` option: what
|
|
347
|
+
* `<BbConfigScope name="…">` accepts. An unknown name is a compile error. With
|
|
348
|
+
* no scope registered (no `configScopes`, or the project file not written or
|
|
349
|
+
* not committed yet) every name is rejected, and the error text says why.
|
|
350
|
+
*/
|
|
351
|
+
export type BbConfigScopeName = RegistryKey<ConfigScopeRegistry, 'bitboss-ui: no configScopes configured — add configScopes to bitbossUi() and commit bitboss-ui.d.ts'>;
|
|
352
|
+
export {};
|