bitboss-ui 3.0.0-beta.37 → 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 +32 -9
- package/bin/bitboss-ui-mcp.mjs +328 -19
- package/bin/bitboss-ui.mjs +275 -20
- package/dist/ai/BbAccordion.md +6 -2
- package/dist/ai/BbAlert.md +8 -4
- package/dist/ai/BbAsterisk.md +8 -4
- package/dist/ai/BbAvatar.md +47 -62
- package/dist/ai/BbBadge.md +11 -3
- package/dist/ai/BbBadgeButton.md +4 -4
- package/dist/ai/BbBaseButton.md +8 -4
- package/dist/ai/BbBaseCheckboxIcon.md +6 -2
- package/dist/ai/BbBaseRadioIcon.md +6 -2
- package/dist/ai/BbBaseSwitchIcon.md +6 -2
- package/dist/ai/BbBreadcrumbs.md +17 -6
- package/dist/ai/BbButton.md +13 -3
- package/dist/ai/BbCalendar.md +52 -15
- package/dist/ai/BbCheckbox.md +13 -13
- package/dist/ai/BbCheckboxGroup.md +38 -21
- package/dist/ai/BbCollapsible.md +6 -2
- package/dist/ai/BbColorInput.md +29 -24
- package/dist/ai/BbColorPalette.md +25 -16
- package/dist/ai/BbConfirm.md +16 -10
- package/dist/ai/BbDatePicker.md +21 -17
- package/dist/ai/BbDatePickerInput.md +24 -26
- package/dist/ai/BbDialog.md +6 -2
- package/dist/ai/BbDropdown.md +73 -23
- package/dist/ai/BbDropdownButton.md +15 -10
- package/dist/ai/BbDropzone.md +13 -15
- package/dist/ai/BbForm.md +1112 -24
- package/dist/ai/BbIcon.md +8 -2
- package/dist/ai/BbIndicator.md +6 -2
- package/dist/ai/BbNumberInput.md +28 -23
- package/dist/ai/BbOffCanvas.md +17 -24
- package/dist/ai/BbPagination.md +24 -10
- package/dist/ai/BbPopover.md +26 -16
- package/dist/ai/BbProgress.md +20 -9
- package/dist/ai/BbRadio.md +14 -3
- package/dist/ai/BbRadioGroup.md +34 -20
- package/dist/ai/BbRating.md +14 -16
- package/dist/ai/BbSelect.md +62 -31
- package/dist/ai/BbSelectPopover.md +45 -11
- package/dist/ai/BbSlider.md +22 -18
- package/dist/ai/BbSmoothHeight.md +6 -2
- package/dist/ai/BbSpinner.md +10 -4
- package/dist/ai/BbSwitch.md +15 -15
- package/dist/ai/BbSwitchGroup.md +39 -22
- package/dist/ai/BbTable.md +229 -92
- package/dist/ai/BbTabs.md +184 -16
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +2 -2
- package/dist/ai/BbTag.md +15 -17
- package/dist/ai/BbTextInput.md +22 -24
- package/dist/ai/BbTextarea.md +27 -26
- package/dist/ai/BbTimePicker.md +14 -7
- package/dist/ai/BbTimePickerInput.md +17 -19
- package/dist/ai/BbToast.md +6 -2
- package/dist/ai/BbTooltip.md +15 -2
- package/dist/ai/BbTree.md +23 -17
- package/dist/ai/CommonField.md +15 -2
- package/dist/ai/CommonFieldInput.md +2 -2
- package/dist/ai/FlatListBox.md +2 -2
- package/dist/ai/GroupedListBox.md +2 -2
- package/dist/ai/ListBox.md +2 -2
- package/dist/ai/OptionsContainer.md +2 -2
- package/dist/ai/changelog.json +2491 -305
- package/dist/ai/components.json +5359 -1046
- package/dist/ai/composables/useBbFormContext.md +38 -25
- package/dist/ai/composables/useBbFormField.md +134 -0
- package/dist/ai/composables/useBbTableContext.md +15 -14
- package/dist/ai/composables/useConfirm.md +3 -3
- package/dist/ai/composables/useCountdown.md +1 -1
- package/dist/ai/composables/useId.md +10 -10
- package/dist/ai/design-tokens.json +940 -0
- package/dist/ai/design-tokens.manifest.yaml +175 -0
- package/dist/ai/guides/agent-contract.md +70 -11
- package/dist/ai/guides/ai-router.md +26 -13
- package/dist/ai/guides/component-picker.md +17 -16
- package/dist/ai/guides/design-language.md +23 -5
- package/dist/ai/guides/design-tokens.md +17 -2
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +3 -1
- package/dist/ai/guides/inertia-helpers.md +4 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +126 -28
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +2 -2
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +42 -2
- package/dist/ai/guides/migration/components/bb-checkbox.md +7 -0
- package/dist/ai/guides/migration/components/bb-color-palette.md +7 -0
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +1 -1
- package/dist/ai/guides/migration/components/bb-icon.md +7 -7
- package/dist/ai/guides/migration/components/bb-offcanvas.md +0 -18
- package/dist/ai/guides/migration/components/bb-pagination.md +10 -0
- package/dist/ai/guides/migration/components/bb-radio-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-switch-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-table.md +28 -21
- package/dist/ai/guides/migration/components/bb-tabs.md +11 -9
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/components/bb-tree.md +3 -1
- package/dist/ai/guides/migration/v2-to-v3.md +201 -27
- package/dist/ai/guides/migration/v3-beta-css-classes.md +39 -11
- package/dist/ai/guides/migration/v3-beta-tooling.md +119 -0
- package/dist/ai/guides/options-items-playbook.md +80 -0
- package/dist/ai/guides/passthrough.md +193 -62
- package/dist/ai/guides/preset-components.md +361 -0
- package/dist/ai/guides/ssr-prefill.md +5 -0
- package/dist/ai/guides/validated-forms.md +462 -62
- package/dist/ai/guides/validation-libraries.md +171 -0
- package/dist/ai/guides/validation-providers.md +113 -0
- package/dist/ai/index.md +18 -7
- package/dist/ai/recipes/inertia/approvals-inbox.md +2 -2
- package/dist/ai/recipes/inertia/command-palette.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +1 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +5 -5
- package/dist/ai/recipes/inertia/record-form.md +34 -7
- package/dist/ai/recipes/inertia/records-workspace.md +12 -8
- package/dist/ai/recipes/inertia/settings-workspace.md +3809 -0
- package/dist/ai/recipes/inertia/upload-center.md +2 -2
- package/dist/ai/recipes/inertia/wizard-form.md +14 -6
- package/dist/ai/recipes/nuxt/approvals-inbox.md +2 -2
- package/dist/ai/recipes/nuxt/command-palette.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +1 -1
- package/dist/ai/recipes/nuxt/record-form.md +34 -7
- package/dist/ai/recipes/nuxt/records-workspace.md +12 -8
- package/dist/ai/recipes/nuxt/settings-workspace.md +3898 -0
- package/dist/ai/recipes/nuxt/upload-center.md +2 -2
- package/dist/ai/recipes/nuxt/wizard-form.md +14 -6
- package/dist/ai/recipes/vue/approvals-inbox.md +2 -2
- package/dist/ai/recipes/vue/command-palette.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +1 -1
- package/dist/ai/recipes/vue/record-form.md +28 -19
- package/dist/ai/recipes/vue/records-workspace.md +12 -8
- package/dist/ai/recipes/vue/settings-workspace.md +3836 -0
- package/dist/ai/recipes/vue/upload-center.md +2 -2
- package/dist/ai/recipes/vue/wizard-form.md +14 -6
- package/dist/ai/source/BbAlert.md +21 -2
- package/dist/ai/source/BbAsterisk.md +1 -1
- package/dist/ai/source/BbBadge.md +29 -0
- package/dist/ai/source/BbBadgeButton.md +32 -3
- package/dist/ai/source/BbBaseButton.md +5 -3
- package/dist/ai/source/BbBreadcrumbs.md +66 -7
- package/dist/ai/source/BbButton.md +8 -0
- package/dist/ai/source/BbCalendar.md +89 -25
- package/dist/ai/source/BbCheckbox.md +28 -4
- package/dist/ai/source/BbCheckboxGroup.md +75 -11
- package/dist/ai/source/BbColorInput.md +81 -17
- package/dist/ai/source/BbColorPalette.md +91 -10
- package/dist/ai/source/BbConfirm.md +11 -2
- package/dist/ai/source/BbDatePicker.md +40 -23
- package/dist/ai/source/BbDatePickerInput.md +34 -18
- package/dist/ai/source/BbDropdown.md +46 -20
- package/dist/ai/source/BbDropdownButton.md +11 -5
- package/dist/ai/source/BbDropdownGroup.md +42 -17
- package/dist/ai/source/BbDropzone.md +13 -5
- package/dist/ai/source/BbForm.md +788 -18
- package/dist/ai/source/BbIcon.md +9 -1
- package/dist/ai/source/BbIndicator.md +9 -0
- package/dist/ai/source/BbNumberInput.md +84 -25
- package/dist/ai/source/BbOffCanvas.md +17 -5
- package/dist/ai/source/BbPagination.md +31 -0
- package/dist/ai/source/BbPopover.md +5 -6
- package/dist/ai/source/BbRadio.md +9 -0
- package/dist/ai/source/BbRadioGroup.md +74 -11
- package/dist/ai/source/BbRating.md +59 -7
- package/dist/ai/source/BbSelect.md +67 -29
- package/dist/ai/source/BbSelectPopover.md +25 -17
- package/dist/ai/source/BbSlider.md +99 -14
- package/dist/ai/source/BbSwitch.md +18 -3
- package/dist/ai/source/BbSwitchGroup.md +64 -6
- package/dist/ai/source/BbTable.md +1102 -180
- package/dist/ai/source/BbTabs.md +9 -3
- package/dist/ai/source/BbTabsList.md +95 -34
- package/dist/ai/source/BbTabsPanels.md +5 -2
- package/dist/ai/source/BbTabsRoot.md +5 -2
- package/dist/ai/source/BbTag.md +37 -10
- package/dist/ai/source/BbTextInput.md +46 -14
- package/dist/ai/source/BbTextarea.md +56 -14
- package/dist/ai/source/BbTimePicker.md +37 -14
- package/dist/ai/source/BbTimePickerInput.md +33 -12
- package/dist/ai/source/BbToast.md +26 -0
- package/dist/ai/source/BbToastPortal.md +26 -0
- package/dist/ai/source/BbTree.md +17 -12
- package/dist/ai/source/CommonField.md +22 -4
- package/dist/ai/source/CommonFieldInput.md +48 -6
- package/dist/ai/source/CommonPopover.md +8 -4
- package/dist/ai/source/FlatListBox.md +6 -6
- package/dist/ai/source/GroupedListBox.md +6 -6
- package/dist/ai/source/ListBox.md +6 -6
- package/dist/ai/source/OptionsContainer.md +7 -7
- package/dist/assets/css/reset.css_inline.js +1 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbAlert/types.d.ts +2 -2
- package/dist/components/BbBaseButton/types.d.ts +5 -3
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +52 -47
- package/dist/components/BbBreadcrumbs/types.d.ts +5 -3
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +187 -186
- package/dist/components/BbCalendar/types.d.ts +6 -6
- package/dist/components/BbCalendar/useCalendarGrid.js +173 -168
- package/dist/components/BbCalendar/useDayGrid.js +118 -117
- package/dist/components/BbCalendar/useToday.d.ts +23 -0
- package/dist/components/BbCalendar/useToday.js +21 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +74 -59
- package/dist/components/BbCheckbox/types.d.ts +9 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +13 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +111 -99
- package/dist/components/BbCheckboxGroup/types.d.ts +12 -7
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +89 -70
- package/dist/components/BbColorInput/types.d.ts +6 -5
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +256 -254
- package/dist/components/BbColorPalette/types.d.ts +2 -2
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +121 -117
- package/dist/components/BbDatePicker/types.d.ts +10 -7
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +301 -290
- package/dist/components/BbDatePickerInput/types.d.ts +8 -7
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +6 -2
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +1 -1
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +334 -327
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbDropdown/normalizeGroups.js +48 -29
- package/dist/components/BbDropdown/types.d.ts +42 -19
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdown/useDropdownContext.d.ts +4 -4
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +6 -1
- package/dist/components/BbDropdownButton/types.d.ts +8 -4
- package/dist/components/BbDropdownButton/types.js +1 -0
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +141 -133
- package/dist/components/BbDropzone/types.d.ts +3 -2
- 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 +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -2
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +134 -106
- package/dist/components/BbNumberInput/types.d.ts +8 -6
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbRadio/types.d.ts +7 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +13 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +125 -114
- package/dist/components/BbRadioGroup/types.d.ts +12 -7
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +88 -77
- package/dist/components/BbRating/types.d.ts +3 -2
- package/dist/components/BbSelect/BbSelect.vue.d.ts +15 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +190 -162
- package/dist/components/BbSelect/types.d.ts +21 -13
- package/dist/components/BbSelect/types.js +1 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbSelectPopover/types.d.ts +12 -7
- package/dist/components/BbSlider/BbSlider.vue.d.ts +0 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +222 -191
- package/dist/components/BbSlider/types.d.ts +3 -2
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +88 -73
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +13 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +112 -100
- package/dist/components/BbSwitchGroup/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +19 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1088 -814
- package/dist/components/BbTable/BbTableDataRow.d.ts +40 -14
- package/dist/components/BbTable/BbTableDataRow.js +37 -29
- package/dist/components/BbTable/BbTableExpandRow.d.ts +11 -0
- package/dist/components/BbTable/BbTableExpandRow.js +35 -25
- package/dist/components/BbTable/gridWidgets.d.ts +30 -0
- package/dist/components/BbTable/gridWidgets.js +14 -0
- package/dist/components/BbTable/types.d.ts +62 -15
- package/dist/components/BbTable/utils.d.ts +53 -0
- package/dist/components/BbTable/utils.js +94 -12
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +93 -74
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +3 -1
- package/dist/components/BbTabs/types.d.ts +3 -3
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +86 -74
- package/dist/components/BbTag/types.d.ts +5 -4
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +89 -74
- package/dist/components/BbTextInput/types.d.ts +5 -4
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbTextarea/types.d.ts +7 -5
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +96 -96
- package/dist/components/BbTimePicker/types.d.ts +7 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +269 -254
- package/dist/components/BbTimePickerInput/types.d.ts +6 -5
- package/dist/components/BbTree/BbTree.vue.d.ts +7 -5
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +38 -34
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbTree/types.d.ts +11 -11
- package/dist/components/BbTree/types.js +1 -1
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +64 -61
- package/dist/components/CommonField/types.d.ts +12 -0
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/CommonFieldInput/types.d.ts +2 -2
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +5 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/FlatListBox/types.d.ts +2 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +5 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/GroupedListBox/types.d.ts +2 -2
- package/dist/components/ListBox/ListBox.vue.d.ts +5 -1
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/ListBox/types.d.ts +2 -2
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/OptionsContainer/types.d.ts +2 -2
- 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/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 +12 -0
- package/dist/composables/useBbTableContext.js +10 -7
- package/dist/composables/useBbTabsContext.js +86 -57
- package/dist/composables/useConfig.d.ts +1 -1
- package/dist/composables/useConfig.js +4 -0
- package/dist/composables/useConfirm.d.ts +6 -5
- package/dist/composables/useFormBinding.d.ts +116 -0
- package/dist/composables/useFormBinding.js +34 -0
- package/dist/composables/useId.d.ts +4 -3
- package/dist/composables/useId.js +1 -7
- package/dist/composables/usePassthrough.d.ts +2 -1
- package/dist/composables/usePassthrough.js +47 -44
- package/dist/composables/useToast.js +14 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +1450 -357
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +9 -4
- package/dist/directives/bbTooltip.d.ts +6 -0
- package/dist/i18n/locales/cs.json +3 -2
- package/dist/i18n/locales/da.json +3 -2
- package/dist/i18n/locales/de.json +3 -2
- package/dist/i18n/locales/el.json +3 -2
- package/dist/i18n/locales/en.json +3 -2
- package/dist/i18n/locales/es.json +3 -2
- package/dist/i18n/locales/fi.json +3 -2
- package/dist/i18n/locales/fr.json +3 -2
- package/dist/i18n/locales/hu.json +3 -2
- package/dist/i18n/locales/it.json +3 -2
- package/dist/i18n/locales/ja.json +3 -2
- package/dist/i18n/locales/ko.json +3 -2
- package/dist/i18n/locales/nb.json +3 -2
- package/dist/i18n/locales/nl.json +3 -2
- package/dist/i18n/locales/pl.json +3 -2
- package/dist/i18n/locales/pt.json +3 -2
- package/dist/i18n/locales/ro.json +3 -2
- package/dist/i18n/locales/ru.json +3 -2
- package/dist/i18n/locales/sv.json +3 -2
- package/dist/i18n/locales/tr.json +3 -2
- package/dist/i18n/locales/uk.json +3 -2
- package/dist/i18n/locales/zh-cn.json +3 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +14 -11
- package/dist/llms-full.txt +37931 -22478
- package/dist/llms-medium.txt +263 -74
- package/dist/llms.txt +21 -9
- package/dist/locale-blueprint.json +3 -2
- package/dist/nuxt-auto-imports.d.ts +6 -30
- package/dist/nuxt-auto-imports.js +13 -36
- package/dist/nuxt-module.d.ts +1 -1
- package/dist/project-dts.d.ts +36 -0
- package/dist/project-dts.js +76 -5
- package/dist/reset.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ColumnName.d.ts +30 -3
- package/dist/types/Config.d.ts +48 -2
- package/dist/types/passthrough.d.ts +25 -0
- package/dist/types/ptComponentMap.d.ts +4 -4
- 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/warnRemovedAttrs.d.ts +27 -1
- package/dist/utilities/functions/warnRemovedAttrs.js +75 -14
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +20 -20
- package/dist/vite.js +197 -234
- package/llms.txt +21 -9
- package/package.json +18 -10
- 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 +73 -6
- package/scripts/lib/eslint-disable.mjs +22 -0
- package/scripts/lib/eslint-plugin.d.ts +4 -1
- package/scripts/lib/eslint-plugin.mjs +226 -18
- package/scripts/lib/hand-imported-styles.mjs +326 -0
- package/scripts/lib/local-components.mjs +177 -0
- package/scripts/lib/migrate-fix.mjs +62 -3
- package/scripts/lib/project-variant-dts.mjs +122 -0
- package/scripts/lib/public-type-exports.mjs +27 -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 +1561 -37
- package/scripts/lib/wrapper-props.mjs +188 -0
- package/dist/validated/BbCheckbox.vue.d.ts +0 -31
- package/dist/validated/BbCheckbox.vue.js +0 -5
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +0 -134
- package/dist/validated/BbCheckboxGroup.vue.d.ts +0 -159
- package/dist/validated/BbCheckboxGroup.vue.js +0 -5
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -172
- package/dist/validated/BbColorInput.vue.d.ts +0 -39
- package/dist/validated/BbColorInput.vue.js +0 -5
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +0 -195
- package/dist/validated/BbDatePickerInput.vue.d.ts +0 -43
- package/dist/validated/BbDatePickerInput.vue.js +0 -5
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -496
- 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 -61
- package/dist/validated/BbForm.vue.d.ts +0 -28
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +0 -59
- package/dist/validated/BbNumberInput.vue.d.ts +0 -38
- package/dist/validated/BbNumberInput.vue.js +0 -5
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +0 -162
- package/dist/validated/BbRadioGroup.vue.d.ts +0 -158
- package/dist/validated/BbRadioGroup.vue.js +0 -5
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -168
- package/dist/validated/BbRating.vue.d.ts +0 -32
- package/dist/validated/BbRating.vue.js +0 -5
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +0 -110
- package/dist/validated/BbSelect.vue.d.ts +0 -315
- package/dist/validated/BbSelect.vue.js +0 -5
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +0 -330
- package/dist/validated/BbSlider.vue.d.ts +0 -38
- package/dist/validated/BbSlider.vue.js +0 -5
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +0 -151
- package/dist/validated/BbSwitch.vue.d.ts +0 -31
- package/dist/validated/BbSwitch.vue.js +0 -5
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +0 -134
- package/dist/validated/BbSwitchGroup.vue.d.ts +0 -159
- package/dist/validated/BbSwitchGroup.vue.js +0 -5
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -172
- package/dist/validated/BbTag.vue.d.ts +0 -38
- package/dist/validated/BbTag.vue.js +0 -5
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +0 -178
- package/dist/validated/BbTextInput.vue.d.ts +0 -38
- package/dist/validated/BbTextInput.vue.js +0 -5
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +0 -162
- package/dist/validated/BbTextarea.vue.d.ts +0 -38
- package/dist/validated/BbTextarea.vue.js +0 -5
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +0 -160
- package/dist/validated/BbTimePickerInput.vue.d.ts +0 -39
- package/dist/validated/BbTimePickerInput.vue.js +0 -5
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -249
- package/dist/validated/index.d.ts +0 -29
- package/dist/validated/useValidatedField.d.ts +0 -93
- package/dist/validated/useValidatedField.js +0 -53
- package/dist/validated.js +0 -21
package/bin/bitboss-ui.mjs
CHANGED
|
@@ -68,9 +68,25 @@ import {
|
|
|
68
68
|
disabledChecker,
|
|
69
69
|
ruleForFinding,
|
|
70
70
|
} from '../scripts/lib/eslint-disable.mjs';
|
|
71
|
+
import {
|
|
72
|
+
localBbImports,
|
|
73
|
+
localBbWarning,
|
|
74
|
+
projectLocalBbComponents,
|
|
75
|
+
} from '../scripts/lib/local-components.mjs';
|
|
71
76
|
import { applyBitbossFixes } from '../scripts/lib/check-fix.mjs';
|
|
77
|
+
import { cssClassFindings } from '../scripts/lib/css-class-check.mjs';
|
|
78
|
+
import {
|
|
79
|
+
cssLocalFindings,
|
|
80
|
+
libraryTokens,
|
|
81
|
+
localReads,
|
|
82
|
+
} from '../scripts/lib/css-local-check.mjs';
|
|
83
|
+
import {
|
|
84
|
+
HAND_IMPORTED_STYLES_EXTENSIONS,
|
|
85
|
+
handImportedStylesFindings,
|
|
86
|
+
} from '../scripts/lib/hand-imported-styles.mjs';
|
|
87
|
+
import { syncProjectVariantDts } from '../scripts/lib/project-variant-dts.mjs';
|
|
72
88
|
import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
73
|
-
import { fileURLToPath } from 'node:url';
|
|
89
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
74
90
|
import { parseArgs } from 'node:util';
|
|
75
91
|
import {
|
|
76
92
|
detectPackageManager,
|
|
@@ -82,6 +98,7 @@ import {
|
|
|
82
98
|
} from '../scripts/lib/mcp-config.mjs';
|
|
83
99
|
import {
|
|
84
100
|
loadManifest,
|
|
101
|
+
registeredRuleNames,
|
|
85
102
|
validateMarkdown,
|
|
86
103
|
validateVueSnippet,
|
|
87
104
|
} from '../scripts/lib/validate-bb-markup.mjs';
|
|
@@ -116,9 +133,13 @@ function coreRules(version) {
|
|
|
116
133
|
5. **Icons**: discover names first; never invent them (\`${KNOWLEDGE_BASE}/guides/icons-policy.md\`).
|
|
117
134
|
6. **Item-driven components**: declarative \`items\` / \`item-text\` / \`item-value\`, \`dependencies\`, \`enforce-coherence\` — no manual watchers for coherence.
|
|
118
135
|
7. **Whole pages**: one recipe under \`${KNOWLEDGE_BASE}/recipes/{vue|nuxt|inertia}/\` (see the router table).
|
|
119
|
-
8. **CSS near components**: \`${KNOWLEDGE_BASE}/guides/design-language.md\`. Two token tiers, and reaching for the wrong one is why apps end up re-skinning by class: \`--bb-*\` is the small GLOBAL theme tier (brand knobs,
|
|
120
|
-
9. **
|
|
121
|
-
10. **
|
|
136
|
+
8. **CSS near components**: \`${KNOWLEDGE_BASE}/guides/design-language.md\`. Paint as data is \`${KNOWLEDGE_BASE}/design-tokens.json\` and \`design-tokens.manifest.yaml\` (DESIGN.md-shaped). Grep \`--bb-*\`, not \`--color-*\` or \`--radius-*\`. A repo-root DESIGN.md is not this library. Two token tiers, and reaching for the wrong one is why apps end up re-skinning by class: \`--bb-*\` is the small GLOBAL theme tier (brand knobs, no numeric ramp — there is no \`--bb-primary-800\`), while each component declares its own **unprefixed** \`--*\` tokens for its look (\`.bb-table { --cell-h: 32px }\`). A missing \`--bb-*\` name is not a gap in the library — it means the knob you want is a component token. Set it on the element that DECLARES it (grep \`${KNOWLEDGE_BASE}/source/<ComponentName>.md\`); a value set further out is masked, not inherited. Prefer tokens, variants and \`pt\`; CSS on \`.bb-*__*\` internals is allowed for fine-tuning but unsupported: it can break on upgrade. \`.bb-common-*\` / \`.bb-field*\` internals: expect it to break. (\`.bb-base-button\` and the three \`.bb-base-*-icon\` glyph classes are consumer API — a supported hook, not an internal.) An override on an internal is a signal to check for a \`pt\` part or request one. A Tailwind utility on a \`Bb*\` component that does nothing is rule 9, not a library bug. One primary action per view region.
|
|
137
|
+
9. **Tailwind v4 app: turn on cascade layers when you set bitboss-ui up**, not later when a class "doesn't work". In the build plugin: \`import { bitbossUi, TAILWIND_V4_LAYERS } from 'bitboss-ui/vite'\` and \`bitbossUi({ cssLayers: TAILWIND_V4_LAYERS })\` (Nuxt: \`bitboss: { cssLayers: TAILWIND_V4_LAYERS }\`, same import). Tailwind v4 emits layered CSS; without this the library's CSS is unlayered and beats every utility you put on a \`Bb*\` component or a \`pt:*\` part, whatever the specificity. With it, your utilities win. You still need the runtime plugin (\`app.use(bitbossUiPlugin)\`; Nuxt does it for you): it is what injects the sheet, into that layer. **Do not also \`@import 'bitboss-ui/styles.css'\`**: a hand import adds a second, unlayered copy and undoes the setting. Tailwind v3 or plain CSS: leave it unset. Details: \`${KNOWLEDGE_BASE}/guides/installation-and-plugin-setup.md\` § Cascade layers.
|
|
138
|
+
10. **Set a \`font-family\` on \`body\`** (components inherit it; there is no font token), e.g. \`body { font-family: system-ui, sans-serif; }\`. Without one the whole app renders in the browser's default serif.
|
|
139
|
+
11. **Variants are yours to add**: the shipped \`variant\` names are a floor, not a ceiling. When the design needs a colour the library doesn't ship (soft status badges, a brand button tone), **register the name** in the build plugin's \`badgeVariants\`/\`buttonVariants\`/\`alertVariants\`/… and **style \`.bb-badge--<name>\`** (etc.) in a project stylesheet loaded after \`bitboss-ui/styles.css\`. Do both halves — a registered name with no CSS ships an unstyled pill, and CSS with no registration fails \`vue-tsc\`. After registering, run \`npx bitboss-ui check\`: it writes the project's \`bitboss-ui.d.ts\` so the new name type-checks before Vite has run. Never write an unregistered name, and never downgrade the design to a neutral shipped variant to avoid registering. Canonical palette + snippet: \`${KNOWLEDGE_BASE}/guides/design-language.md\` § Getting soft semantic badges.
|
|
140
|
+
12. **Never name your own components \`Bb…\`** — that prefix is bitboss-ui's. Use your app's prefix (\`App…\`, \`Acme…\`). \`check\` leaves an app's own \`Bb*\` component alone but warns: a future bitboss-ui component could take the name.
|
|
141
|
+
13. **Set \`locale\` explicitly** in the build plugin (\`bitbossUi({ locale: 'it' })\` / nuxt \`bitboss: { locale: 'it' }\`) for any app that is not English: the built-in strings default to English (\`'en'\`, since 3.0.0-beta.41; it was \`'it'\`).
|
|
142
|
+
14. **After writing bitboss-ui markup**, run \`npx bitboss-ui check\` — validates \`Bb*\` usage against the installed \`components.json\` and catches invented/removed props before review.
|
|
122
143
|
|
|
123
144
|
After upgrading bitboss-ui, re-run: \`npx bitboss-ui ai-init\``;
|
|
124
145
|
}
|
|
@@ -394,7 +415,7 @@ function inSkippedDir(relPath) {
|
|
|
394
415
|
* `recursive: true` readdir) is what keeps a multi-thousand-file `vendor/`
|
|
395
416
|
* tree from being walked at all.
|
|
396
417
|
*/
|
|
397
|
-
function collectCheckFiles(dir, relBase = dir) {
|
|
418
|
+
function collectCheckFiles(dir, relBase = dir, extensions = CHECK_EXTENSIONS) {
|
|
398
419
|
let entries;
|
|
399
420
|
try {
|
|
400
421
|
entries = readdirSync(dir, { withFileTypes: true });
|
|
@@ -407,11 +428,11 @@ function collectCheckFiles(dir, relBase = dir) {
|
|
|
407
428
|
if (entry.isDirectory()) {
|
|
408
429
|
if (isSkippedSegment(entry.name)) continue;
|
|
409
430
|
if (isSkippedSubpath(relative(relBase, full))) continue;
|
|
410
|
-
out.push(...collectCheckFiles(full, relBase));
|
|
431
|
+
out.push(...collectCheckFiles(full, relBase, extensions));
|
|
411
432
|
continue;
|
|
412
433
|
}
|
|
413
434
|
if (!entry.isFile()) continue;
|
|
414
|
-
if (!
|
|
435
|
+
if (!extensions.some((ext) => entry.name.endsWith(ext))) continue;
|
|
415
436
|
out.push(full);
|
|
416
437
|
}
|
|
417
438
|
return out;
|
|
@@ -559,7 +580,12 @@ function printFindingLegend(findings) {
|
|
|
559
580
|
const rows = [];
|
|
560
581
|
if (kinds.has('removed-prop'))
|
|
561
582
|
rows.push(
|
|
562
|
-
' "was removed from X" a v2→v3
|
|
583
|
+
' "was removed from X" a recorded break (v2→v3, or a v3 beta rename). X really\n' +
|
|
584
|
+
' / "was renamed on X" had this prop or pt key; `check --fix` rewrites the renames.'
|
|
585
|
+
);
|
|
586
|
+
if (kinds.has('renamed-slot'))
|
|
587
|
+
rows.push(
|
|
588
|
+
' "slot … was renamed" a recorded slot rename; `check --fix` rewrites it.'
|
|
563
589
|
);
|
|
564
590
|
if (kinds.has('unknown-prop'))
|
|
565
591
|
rows.push(
|
|
@@ -633,8 +659,14 @@ function changelogCommand({ since, until, json: jsonMode }) {
|
|
|
633
659
|
['--until', until],
|
|
634
660
|
]) {
|
|
635
661
|
if (value != null && !releases.includes(value)) {
|
|
662
|
+
// A tagged-but-never-published version (beta.34): say where its
|
|
663
|
+
// changes went instead of "unknown", which reads like a typo.
|
|
664
|
+
const unpublished = (doc.unpublished ?? []).includes(value);
|
|
665
|
+
const next = releases.find((r) => compareReleaseVersions(r, value) > 0);
|
|
636
666
|
console.error(
|
|
637
|
-
|
|
667
|
+
(unpublished
|
|
668
|
+
? `[bitboss-ui] changelog: ${label} ${value} was never published to npm; its changes shipped in ${next ?? 'the next release'}.\n`
|
|
669
|
+
: `[bitboss-ui] changelog: unknown ${label} version '${value}'.\n`) +
|
|
638
670
|
`Known releases: ${releases.join(', ')}`
|
|
639
671
|
);
|
|
640
672
|
process.exit(1);
|
|
@@ -687,8 +719,14 @@ function changelogCommand({ since, until, json: jsonMode }) {
|
|
|
687
719
|
for (const entry of rows) {
|
|
688
720
|
const at = entry.firstReleasedIn ?? 'unreleased';
|
|
689
721
|
if (entry.kind === 'rename') {
|
|
722
|
+
// `surface` says what kind of name it is (Q51.19); a slot reads `#…`.
|
|
723
|
+
const spell = (name) => (entry.surface === 'slot' ? `#${name}` : name);
|
|
724
|
+
const surface =
|
|
725
|
+
entry.surface && entry.surface !== 'prop' ? `${entry.surface} ` : '';
|
|
690
726
|
console.log(
|
|
691
|
-
` [${at}] ${entry.components.join(', ')}: \`${entry.from}\` →
|
|
727
|
+
` [${at}] ${entry.components.join(', ')}: ${surface}\`${spell(entry.from)}\` → ` +
|
|
728
|
+
(entry.to == null ? 'removed' : `\`${spell(entry.to)}\``) +
|
|
729
|
+
(entry.note ? ` (${entry.note})` : '')
|
|
692
730
|
);
|
|
693
731
|
} else {
|
|
694
732
|
console.log(` [${at}] ${entry.description}`);
|
|
@@ -768,6 +806,30 @@ async function checkCommand(
|
|
|
768
806
|
}
|
|
769
807
|
const manifest = loadManifest(manifestPath);
|
|
770
808
|
|
|
809
|
+
/*
|
|
810
|
+
* Q53.23: write the project's `bitboss-ui.d.ts` from the build config, the
|
|
811
|
+
* file the Vite plugin writes when Vite starts. Agents run `vue-tsc` before
|
|
812
|
+
* any dev start, so a name registered in `badgeVariants` was a type error
|
|
813
|
+
* (and an `as any`) until then. Same generator as the plugin; a config it
|
|
814
|
+
* cannot read is left alone. Not under `--manifest` (an upgrade preview
|
|
815
|
+
* must not touch the project).
|
|
816
|
+
*/
|
|
817
|
+
if (!manifestOverride) {
|
|
818
|
+
try {
|
|
819
|
+
const projectDts = await import(
|
|
820
|
+
pathToFileURL(join(PACKAGE_ROOT, 'dist', 'project-dts.js')).href
|
|
821
|
+
);
|
|
822
|
+
const synced = syncProjectVariantDts(projectRoot, projectDts);
|
|
823
|
+
if (synced.status === 'written' && !jsonMode)
|
|
824
|
+
console.log(
|
|
825
|
+
`[bitboss-ui] Wrote ${synced.path} from your build config: registered variant names now type-check. Commit it.`
|
|
826
|
+
);
|
|
827
|
+
} catch {
|
|
828
|
+
// No built `dist/project-dts.js` (the library repo before a build):
|
|
829
|
+
// nothing to write with, and nothing for `check` to fail over.
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
771
833
|
/*
|
|
772
834
|
* Every `--bb-*` the INSTALLED package declares, read from the stylesheet
|
|
773
835
|
* the consumer actually ships. Read from disk rather than hardcoded so this
|
|
@@ -788,10 +850,15 @@ async function checkCommand(
|
|
|
788
850
|
// CHK-ALLOWCOMPONENTS: `Bb` is a naming convention, not proof of ownership.
|
|
789
851
|
// An app component called `BbRichEditor` is not invalid library markup, and
|
|
790
852
|
// before this the only way to silence it was to rename the component.
|
|
791
|
-
const
|
|
853
|
+
const explicitlyAllowed = new Set([
|
|
792
854
|
...configuredAllowComponents(projectRoot),
|
|
793
855
|
...allowComponents,
|
|
794
|
-
];
|
|
856
|
+
]);
|
|
857
|
+
// Q53.18: the app's own `Bb*` components (`.vue` files in its `components`
|
|
858
|
+
// dirs, Nuxt path-prefix names included) are skipped with zero config;
|
|
859
|
+
// imports from the app's own paths are handled per file by the validator.
|
|
860
|
+
const projectLocal = projectLocalBbComponents(projectRoot);
|
|
861
|
+
const allowedComponents = [...explicitlyAllowed, ...projectLocal.keys()];
|
|
795
862
|
|
|
796
863
|
// Q46.8: `--fix` applies the ESLint plugin's fixes (the registered v2→v3
|
|
797
864
|
// migrations) with ONLY the bitboss rules, then the check below reports
|
|
@@ -822,16 +889,71 @@ async function checkCommand(
|
|
|
822
889
|
.join('\n')}`
|
|
823
890
|
);
|
|
824
891
|
}
|
|
825
|
-
|
|
892
|
+
// Q46.6: every `var(--x)` the project reads, from a whole-project sweep
|
|
893
|
+
// (explicit paths included): a local or token the app reads itself is its
|
|
894
|
+
// own, never "set and unread".
|
|
895
|
+
const projectReads = new Set();
|
|
896
|
+
for (const path of collectCheckFiles(
|
|
897
|
+
projectRoot,
|
|
898
|
+
projectRoot,
|
|
899
|
+
HAND_IMPORTED_STYLES_EXTENSIONS
|
|
900
|
+
))
|
|
901
|
+
try {
|
|
902
|
+
for (const name of localReads(readFileSync(path, 'utf-8')))
|
|
903
|
+
projectReads.add(name);
|
|
904
|
+
} catch {
|
|
905
|
+
/* unreadable: its reads are unknown, which only means fewer passes */
|
|
906
|
+
}
|
|
907
|
+
// The tokens of the sheet `check` judges against (the installed one, or
|
|
908
|
+
// the one beside `--manifest`) — read AND declared names both count.
|
|
909
|
+
if (manifest.localSurface && existsSync(stylesPath))
|
|
910
|
+
manifest.localSurface.knownTokens = libraryTokens([
|
|
911
|
+
readFileSync(stylesPath, 'utf-8'),
|
|
912
|
+
...[join(dirname(stylesPath), 'reset.css')]
|
|
913
|
+
.filter((path) => existsSync(path))
|
|
914
|
+
.map((path) => readFileSync(path, 'utf-8')),
|
|
915
|
+
]);
|
|
916
|
+
// Q54.2: the rules the project registers with `defineRule`, from the same
|
|
917
|
+
// whole-project sweep, so a string rule nobody registered is caught.
|
|
918
|
+
const registeredRules = { names: new Set(), dynamic: false };
|
|
919
|
+
for (const path of collectCheckFiles(projectRoot, projectRoot, [
|
|
920
|
+
'.ts',
|
|
921
|
+
'.js',
|
|
922
|
+
'.mjs',
|
|
923
|
+
'.cjs',
|
|
924
|
+
'.vue',
|
|
925
|
+
]))
|
|
926
|
+
try {
|
|
927
|
+
const found = registeredRuleNames(readFileSync(path, 'utf-8'));
|
|
928
|
+
for (const name of found.names) registeredRules.names.add(name);
|
|
929
|
+
if (found.dynamic) registeredRules.dynamic = true;
|
|
930
|
+
} catch {
|
|
931
|
+
/* unreadable: fewer names, which only means more caution below */
|
|
932
|
+
registeredRules.dynamic = true;
|
|
933
|
+
}
|
|
934
|
+
const validateOptions = {
|
|
935
|
+
allowComponents: allowedComponents,
|
|
936
|
+
projectReads,
|
|
937
|
+
registeredRules,
|
|
938
|
+
};
|
|
826
939
|
|
|
827
940
|
const findings = [];
|
|
828
941
|
let suppressed = 0;
|
|
942
|
+
/** One warning per local `Bb*` component, unless allowlisted (Q53.18). */
|
|
943
|
+
const warnedLocal = new Set();
|
|
944
|
+
const warnLocal = (name, file, line) => {
|
|
945
|
+
if (explicitlyAllowed.has(name) || warnedLocal.has(name)) return;
|
|
946
|
+
warnedLocal.add(name);
|
|
947
|
+
warnings.push(localBbWarning(name, file, line));
|
|
948
|
+
};
|
|
829
949
|
/*
|
|
830
950
|
* Advisory only — see scripts/lib/hand-roll-hints.mjs. Hints never touch the
|
|
831
951
|
* exit code, so a guess can never fail a consumer's build. `--no-hints`
|
|
832
952
|
* silences them for anyone who finds them noisy.
|
|
833
953
|
*/
|
|
834
954
|
const hints = [];
|
|
955
|
+
/** Findings graded `severity: 'warning'` — printed, never fatal. */
|
|
956
|
+
const warnings = [];
|
|
835
957
|
const wantHints = !process.argv.includes('--no-hints');
|
|
836
958
|
for (const file of files) {
|
|
837
959
|
const relPath = relative(projectRoot, file);
|
|
@@ -846,12 +968,19 @@ async function checkCommand(
|
|
|
846
968
|
const isDisabled = file.endsWith('.vue')
|
|
847
969
|
? disabledChecker(content)
|
|
848
970
|
: () => false;
|
|
971
|
+
if (file.endsWith('.vue'))
|
|
972
|
+
for (const [name, line] of localBbImports(content))
|
|
973
|
+
warnLocal(name, relPath, line);
|
|
849
974
|
for (const finding of fileFindings) {
|
|
850
975
|
if (isDisabled(finding.line, ruleForFinding(finding))) {
|
|
851
976
|
suppressed++;
|
|
852
977
|
continue;
|
|
853
978
|
}
|
|
854
|
-
|
|
979
|
+
// A `severity: 'warning'` finding (Q53.15 C9b: a slot spelled the
|
|
980
|
+
// pre-reset way) is shown and suppressible, but never fails the run.
|
|
981
|
+
if (finding.severity === 'warning')
|
|
982
|
+
warnings.push({ file: relPath, ...finding });
|
|
983
|
+
else findings.push({ file: relPath, ...finding });
|
|
855
984
|
}
|
|
856
985
|
// .md files are documentation ABOUT components; a round <img> in a doc
|
|
857
986
|
// example is illustrative, not a hand-roll.
|
|
@@ -862,6 +991,41 @@ async function checkCommand(
|
|
|
862
991
|
}
|
|
863
992
|
}
|
|
864
993
|
|
|
994
|
+
for (const [name, file] of projectLocal) warnLocal(name, file);
|
|
995
|
+
|
|
996
|
+
// Q25: a hand import of `bitboss-ui/styles.css` while the runtime plugin
|
|
997
|
+
// injects it. Project-level — the answer needs the build config — so it
|
|
998
|
+
// reads the style and script files too; with explicit paths, only those.
|
|
999
|
+
const styleScan = globs.length
|
|
1000
|
+
? files
|
|
1001
|
+
: collectCheckFiles(
|
|
1002
|
+
projectRoot,
|
|
1003
|
+
projectRoot,
|
|
1004
|
+
HAND_IMPORTED_STYLES_EXTENSIONS
|
|
1005
|
+
);
|
|
1006
|
+
findings.push(
|
|
1007
|
+
...handImportedStylesFindings(
|
|
1008
|
+
projectRoot,
|
|
1009
|
+
styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) }))
|
|
1010
|
+
)
|
|
1011
|
+
);
|
|
1012
|
+
// Q46.5: `.bb-*` selectors in the app's stylesheets (the `.vue` `<style>`
|
|
1013
|
+
// blocks are read by the validator above).
|
|
1014
|
+
for (const path of styleScan) {
|
|
1015
|
+
if (!/\.(?:css|scss|sass|less|pcss|postcss|styl)$/.test(path)) continue;
|
|
1016
|
+
const relPath = relative(projectRoot, path);
|
|
1017
|
+
const content = readFileSync(path, 'utf-8');
|
|
1018
|
+
for (const finding of [
|
|
1019
|
+
...cssClassFindings(content, manifest.cssSurface, { stylesheet: true }),
|
|
1020
|
+
// Q46.6: custom properties set where nothing reads them.
|
|
1021
|
+
...cssLocalFindings(content, manifest.cssSurface, manifest.localSurface, {
|
|
1022
|
+
stylesheet: true,
|
|
1023
|
+
projectReads,
|
|
1024
|
+
}),
|
|
1025
|
+
])
|
|
1026
|
+
findings.push({ file: relPath, ...finding });
|
|
1027
|
+
}
|
|
1028
|
+
|
|
865
1029
|
/** One line, so a silenced finding is never invisible. */
|
|
866
1030
|
const printSuppressed = () => {
|
|
867
1031
|
if (suppressed === 0) return;
|
|
@@ -870,6 +1034,18 @@ async function checkCommand(
|
|
|
870
1034
|
);
|
|
871
1035
|
};
|
|
872
1036
|
|
|
1037
|
+
/** Warning block, printed on success and on failure alike. Never fatal. */
|
|
1038
|
+
const printWarnings = () => {
|
|
1039
|
+
if (warnings.length === 0) return;
|
|
1040
|
+
console.log(
|
|
1041
|
+
`\n[bitboss-ui] ${warnings.length} warning(s) — not fatal, but likely wrong:`
|
|
1042
|
+
);
|
|
1043
|
+
for (const warning of warnings) {
|
|
1044
|
+
const at = warning.line != null ? `:${warning.line}` : '';
|
|
1045
|
+
console.log(` ⚠ ${warning.file}${at} ${warning.message}`);
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
|
|
873
1049
|
/** Advisory block, printed on success and on failure alike. Never fatal. */
|
|
874
1050
|
const printHints = () => {
|
|
875
1051
|
if (hints.length === 0) return;
|
|
@@ -908,6 +1084,7 @@ async function checkCommand(
|
|
|
908
1084
|
JSON.stringify(
|
|
909
1085
|
{
|
|
910
1086
|
findings,
|
|
1087
|
+
warnings,
|
|
911
1088
|
hints,
|
|
912
1089
|
suppressed,
|
|
913
1090
|
files: files.length,
|
|
@@ -948,11 +1125,13 @@ async function checkCommand(
|
|
|
948
1125
|
`[bitboss-ui] check OK — ${summarizeFileCounts(files)} file(s), zero unknown Bb* props/v-models/slots/nav-attrs.`
|
|
949
1126
|
);
|
|
950
1127
|
printSuppressed();
|
|
1128
|
+
printWarnings();
|
|
951
1129
|
printHints();
|
|
952
1130
|
return;
|
|
953
1131
|
}
|
|
954
1132
|
|
|
955
1133
|
printSuppressed();
|
|
1134
|
+
printWarnings();
|
|
956
1135
|
const fileCount = new Set(findings.map((f) => f.file)).size;
|
|
957
1136
|
console.error(
|
|
958
1137
|
`[bitboss-ui] check FAILED — ${findings.length} finding(s) across ${fileCount} file(s):`
|
|
@@ -1020,6 +1199,13 @@ Commands:
|
|
|
1020
1199
|
nothing (a typo'd CI path validates zero files silently) —
|
|
1021
1200
|
pass \`--allow-empty\` when an empty match is expected.
|
|
1022
1201
|
|
|
1202
|
+
It also writes your project's \`bitboss-ui.d.ts\` (the
|
|
1203
|
+
file the Vite plugin writes on start) from the variant
|
|
1204
|
+
options in vite.config / nuxt.config, so a newly
|
|
1205
|
+
registered variant name type-checks before Vite runs.
|
|
1206
|
+
Left alone when the options are not inline literals, and
|
|
1207
|
+
under \`--manifest\`.
|
|
1208
|
+
|
|
1023
1209
|
\`--fix\` first applies the ESLint plugin's fixes (the
|
|
1024
1210
|
registered v2→v3 renames, polarity flips and value
|
|
1025
1211
|
remaps) to the matched .vue files with ONLY the
|
|
@@ -1052,17 +1238,86 @@ Commands:
|
|
|
1052
1238
|
Same option name as the ESLint rules' \`allowComponents\`,
|
|
1053
1239
|
so both gates configure alike.
|
|
1054
1240
|
|
|
1055
|
-
\`--json\` prints \`{ findings: [...],
|
|
1241
|
+
\`--json\` prints \`{ findings: [...], warnings: [...], hints: [...],
|
|
1242
|
+
suppressed, files, manifestVersion, installedVersion }\`.
|
|
1056
1243
|
Each finding: \`{ file, line, component, attr, kind,
|
|
1057
1244
|
message, hint?, to? }\` (plus \`fenceIndex\`/\`fenceInfo\`
|
|
1058
1245
|
inside a markdown fence; \`line\` is absolute in the file).
|
|
1059
|
-
\`kind\` is one of: \`removed-prop\` (a
|
|
1060
|
-
|
|
1246
|
+
\`kind\` is one of: \`removed-prop\` (a recorded break on a
|
|
1247
|
+
prop or a \`pt\` key, v2→v3 or a v3 beta; \`to\` is the new
|
|
1248
|
+
name when there is one and \`--fix\` writes it, else the
|
|
1249
|
+
message says what to do), \`unknown-prop\` (not a v3 prop of that component;
|
|
1061
1250
|
may never have been one — see the legend the text output
|
|
1062
|
-
prints), \`unknown-
|
|
1251
|
+
prints), \`unknown-component\` (a \`Bb*\` tag the
|
|
1252
|
+
manifest doesn't have; \`attr\` is the tag),
|
|
1253
|
+
\`unknown-model\`, \`unknown-event\`, \`unknown-slot\`,
|
|
1254
|
+
\`unknown-pt-key\` (a key of the \`pt\` object form that
|
|
1255
|
+
matches no part / state; \`to\` when the part was renamed),
|
|
1063
1256
|
\`no-default-slot\`, \`inert-nav-attr\`,
|
|
1064
|
-
\`
|
|
1065
|
-
|
|
1257
|
+
\`nameless-control\` (an icon-only BbButton or BbBadge,
|
|
1258
|
+
or a BbProgress, with no accessible name),
|
|
1259
|
+
\`removed-css-local\` (a component CSS local the
|
|
1260
|
+
library removed, e.g. \`--day-slot-allowance\`),
|
|
1261
|
+
\`private-import\` (an import from inside the package's
|
|
1262
|
+
\`dist/\`), \`not-exported-type\` (a \`Pt*\` pt type
|
|
1263
|
+
imported from bitboss-ui: type pt through
|
|
1264
|
+
\`<Component>Props['pt']\` instead),
|
|
1265
|
+
\`missing-key\` / \`duplicate-row-text\` (a
|
|
1266
|
+
BbDropdown row or group that needs a \`key\`: selectable,
|
|
1267
|
+
or identical keyless text in one group),
|
|
1268
|
+
\`unknown-variant\` (a variant name from another
|
|
1269
|
+
library, e.g. \`danger\` on BbAlert / BbBadge; the
|
|
1270
|
+
message names ours),
|
|
1271
|
+
\`duplicate-field-identity\` (two validated fields in
|
|
1272
|
+
one \`BbForm\` on the same path: the same \`name\`,
|
|
1273
|
+
or the same label with no \`name\`),
|
|
1274
|
+
\`rules-ignored-by-schema\` (a validated field's
|
|
1275
|
+
\`rules\` inside a \`BbForm\` that has a \`schema\`:
|
|
1276
|
+
vee-validate reads only the schema),
|
|
1277
|
+
\`row-without-name\` (a form control in a \`v-for\`
|
|
1278
|
+
inside a \`BbForm\` with a bound label and no \`name\`),
|
|
1279
|
+
\`retired-entrypoint\` (an import from
|
|
1280
|
+
\`bitboss-ui/validated\`, retired: everything is in
|
|
1281
|
+
\`bitboss-ui\`; \`--fix\` rewrites it in .vue files),
|
|
1282
|
+
\`unregistered-rule\` (a string rule no
|
|
1283
|
+
\`defineRule\` in the project registers; silent when
|
|
1284
|
+
the project registers rules in a loop),
|
|
1285
|
+
\`wrapper-drops-props\` (a wrapper whose
|
|
1286
|
+
\`defineProps\` declares a \`Bb*Props\` type, bare,
|
|
1287
|
+
\`Omit\` or \`Pick\`, and never binds or reads some
|
|
1288
|
+
of those props: a caller's value is dropped),
|
|
1289
|
+
\`renamed-slot\` (a slot the library renamed;
|
|
1290
|
+
\`--fix\` rewrites it), \`missing-partner-prop\`,
|
|
1291
|
+
\`partner-prop\`,
|
|
1292
|
+
\`validated-only-prop\`, \`object-items-without-text\`
|
|
1293
|
+
(object \`items\` with no \`item-text\`; reads only
|
|
1294
|
+
an inline array, or a \`const\` array, \`ref([…])\` or
|
|
1295
|
+
\`reactive([…])\` in the same file's
|
|
1296
|
+
\`<script setup>\`), \`reserved-key\` (a key
|
|
1297
|
+
whose slot name is one of the component's own slots,
|
|
1298
|
+
e.g. a BbTable column keyed \`actions\`; read from the
|
|
1299
|
+
manifest, same-file keys only), \`hand-imported-styles\`
|
|
1300
|
+
(\`bitboss-ui/styles.css\` imported in CSS, a script or
|
|
1301
|
+
Nuxt's \`css\` while \`injectStyles\` is on: delete it;
|
|
1302
|
+
read only when vite.config / nuxt.config says so),
|
|
1303
|
+
\`unknown-class\` (a selector on a \`.bb-*\` class the
|
|
1304
|
+
library does not render, in a stylesheet or a
|
|
1305
|
+
\`<style>\` block; \`suggestion\` is the nearest real
|
|
1306
|
+
one), \`renamed-class\` (a class the library renamed;
|
|
1307
|
+
\`to\` is its successor). Your own classes are never
|
|
1308
|
+
read, nor a \`bb-*\` class the same file adds itself
|
|
1309
|
+
(\`class\`, \`:class\`, \`pt:*\`), \`inert-token\` (a
|
|
1310
|
+
\`--bb-*\` SET that the library neither declares nor
|
|
1311
|
+
reads; \`suggestion\` = the nearest token),
|
|
1312
|
+
\`inert-local\` (a local set on a \`.bb-*\` block whose
|
|
1313
|
+
component, and what it mounts, never reads it; \`to\`
|
|
1314
|
+
when it was renamed). A local on your own ancestor
|
|
1315
|
+
element, or one your CSS reads, is never judged.
|
|
1316
|
+
\`warnings[]\` (never fail the run) use the same shape with
|
|
1317
|
+
\`severity: "warning"\`: \`likely-squashed-slot\` (a slot
|
|
1318
|
+
name that looks like a camelCase key squashed, e.g.
|
|
1319
|
+
\`#createdat\`), \`local-bb-component\` (your own
|
|
1320
|
+
component uses the \`Bb\` prefix; rename it).
|
|
1066
1321
|
changelog [--since <version>] [--until <version>] [--json]
|
|
1067
1322
|
Breaking changes between two releases — "what breaks if I
|
|
1068
1323
|
bump". \`--since\` is the version you are ON, and is
|
package/dist/ai/BbAccordion.md
CHANGED
|
@@ -573,6 +573,10 @@ A listener on `pt:header` runs after the toggle, never instead of it. The full
|
|
|
573
573
|
grammar, the merge rules and the global map are in the
|
|
574
574
|
[passthrough guide](./guides/passthrough.md).
|
|
575
575
|
|
|
576
|
+
A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
577
|
+
`pt` prop) is typed as `BbAccordionProps['pt']`, never an imported `PtValue`: see
|
|
578
|
+
[passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
579
|
+
|
|
576
580
|
### Works well with
|
|
577
581
|
|
|
578
582
|
- `BbIcon` — a rotating chevron in the header, driven by the slot's `open` (see
|
|
@@ -617,7 +621,7 @@ grammar, the merge rules and the global map are in the
|
|
|
617
621
|
|
|
618
622
|
| Prop | Type | Default | Required | Description |
|
|
619
623
|
| --- | --- | --- | --- | --- |
|
|
620
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `header`, `panel`, `root`. States: `open`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. |
|
|
624
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `header`, `panel`, `root`. States: `open`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAccordionProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
621
625
|
| `eager` | `boolean \| undefined` | `false` | | Prevents rendering content before it's made visible. |
|
|
622
626
|
| `id` | `string \| undefined` | | | The root's `id`; the header button's id (`<id>_header`) derives from it. Generated when omitted. |
|
|
623
627
|
| `modelValue` | `boolean \| undefined` | `false` | | Used by v-model to trigger opening / closing the collapsible. An accordion with no `v-model` starts closed. |
|
|
@@ -625,7 +629,7 @@ grammar, the merge rules and the global map are in the
|
|
|
625
629
|
|
|
626
630
|
## Passthrough parts and states
|
|
627
631
|
|
|
628
|
-
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`.
|
|
632
|
+
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`. In `<script>`, type a `pt` value as `<Component>Props['pt']` (`<Component>Props<Row>['pt']` on a generic component); `PtValue` is not exported: `guides/passthrough.md` § Typing `pt` in `<script>`.
|
|
629
633
|
|
|
630
634
|
| Part | What it is |
|
|
631
635
|
| --- | --- |
|
package/dist/ai/BbAlert.md
CHANGED
|
@@ -409,6 +409,10 @@ A listener on `pt:close` runs after the alert closes, never instead of it. The
|
|
|
409
409
|
full grammar, the merge rules and the global map are in the
|
|
410
410
|
[passthrough guide](./guides/passthrough.md).
|
|
411
411
|
|
|
412
|
+
A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
413
|
+
`pt` prop) is typed as `BbAlertProps['pt']`, never an imported `PtValue`: see
|
|
414
|
+
[passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
415
|
+
|
|
412
416
|
### Works well with
|
|
413
417
|
|
|
414
418
|
- `BbToast` — pair them: the toast confirms _the action_ ("Saved"), the alert
|
|
@@ -447,19 +451,19 @@ full grammar, the merge rules and the global map are in the
|
|
|
447
451
|
|
|
448
452
|
## v-model
|
|
449
453
|
|
|
450
|
-
- `v-model` — type: `boolean`
|
|
454
|
+
- `v-model` — type: `boolean \| undefined`
|
|
451
455
|
|
|
452
456
|
## Props
|
|
453
457
|
|
|
454
458
|
| Prop | Type | Default | Required | Description |
|
|
455
459
|
| --- | --- | --- | --- | --- |
|
|
456
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `close`, `icon`, `root`, `text`, `title`. States: —. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. |
|
|
460
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `close`, `icon`, `root`, `text`, `title`. States: —. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAlertProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
457
461
|
| `ariaLive` | `"off" \| "polite" \| "assertive" \| undefined` | | | ARIA live region politeness. Defaults to `'assertive'` for destructive/warning variants, otherwise `'polite'`. |
|
|
458
462
|
| `closeLabel` | `string \| undefined` | | | Visually hidden string used to label the close button. |
|
|
459
463
|
| `hideClose` | `boolean \| undefined` | `false` | | Defines whether to hide the close button. |
|
|
460
464
|
| `icon` | `string \| undefined` | | | Name of a registered icon to use, or a full raw `<svg>` string (e.g. an SVG file imported with `?raw`). |
|
|
461
465
|
| `iconSize` | `number \| ({ size?: any; } & string) \| keyof Sizes \| undefined` | `"16"` | | Size of the icon to use. |
|
|
462
|
-
| `modelValue` | `
|
|
466
|
+
| `modelValue` | `boolean \| undefined` | `true` | | Used by v-model. Alerts are visible on mount; the model dismisses them. |
|
|
463
467
|
| `role` | `"alert" \| "status" \| undefined` | | | Accessibility role for the alert container. Defaults to `'alert'` for destructive/warning variants, otherwise `'status'`. |
|
|
464
468
|
| `text` | `string \| undefined` | | | Text content of the alert body. |
|
|
465
469
|
| `title` | `string \| undefined` | | | Text content of the alert title. |
|
|
@@ -468,7 +472,7 @@ full grammar, the merge rules and the global map are in the
|
|
|
468
472
|
|
|
469
473
|
## Passthrough parts and states
|
|
470
474
|
|
|
471
|
-
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`.
|
|
475
|
+
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`. In `<script>`, type a `pt` value as `<Component>Props['pt']` (`<Component>Props<Row>['pt']` on a generic component); `PtValue` is not exported: `guides/passthrough.md` § Typing `pt` in `<script>`.
|
|
472
476
|
|
|
473
477
|
| Part | What it is |
|
|
474
478
|
| --- | --- |
|
package/dist/ai/BbAsterisk.md
CHANGED
|
@@ -18,7 +18,7 @@ restyle its root), and it does not read
|
|
|
18
18
|
`required` or drive validation. You render it yourself wherever you build custom
|
|
19
19
|
label content, so the marker matches the library's styling (`--bb-danger`).
|
|
20
20
|
|
|
21
|
-
Most consumers never place it by hand: the
|
|
21
|
+
Most consumers never place it by hand: the form controls
|
|
22
22
|
render it for you in their `#label` slot when a field is `required`/has rules and
|
|
23
23
|
`config.requiredAsterisk` is enabled. Reach for `BbAsterisk` directly only when
|
|
24
24
|
you compose a bespoke label outside those controls.
|
|
@@ -47,7 +47,7 @@ The practical consequence: the marker is a _visual_ affordance only, and
|
|
|
47
47
|
without `required` (sighted users see a requirement that assistive tech cannot
|
|
48
48
|
perceive), and never assume the asterisk is doing accessibility work.
|
|
49
49
|
|
|
50
|
-
`showAsterisk` on the
|
|
50
|
+
`showAsterisk` on the form controls is also gated on the plugin option, so
|
|
51
51
|
with `requiredAsterisk: false` there is no way to render the marker through
|
|
52
52
|
them at all — placing `BbAsterisk` by hand is then the only route.
|
|
53
53
|
|
|
@@ -76,15 +76,19 @@ control's `required` still carries the requirement.
|
|
|
76
76
|
The full grammar, the merge rules and the global map are in the
|
|
77
77
|
[passthrough guide](./guides/passthrough.md).
|
|
78
78
|
|
|
79
|
+
A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
80
|
+
`pt` prop) is typed as `BbAsteriskProps['pt']`, never an imported `PtValue`: see
|
|
81
|
+
[passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
82
|
+
|
|
79
83
|
## Props
|
|
80
84
|
|
|
81
85
|
| Prop | Type | Default | Required | Description |
|
|
82
86
|
| --- | --- | --- | --- | --- |
|
|
83
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `root`. States: —. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. |
|
|
87
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `root`. States: —. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAsteriskProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
84
88
|
|
|
85
89
|
## Passthrough parts and states
|
|
86
90
|
|
|
87
|
-
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`.
|
|
91
|
+
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`. In `<script>`, type a `pt` value as `<Component>Props['pt']` (`<Component>Props<Row>['pt']` on a generic component); `PtValue` is not exported: `guides/passthrough.md` § Typing `pt` in `<script>`.
|
|
88
92
|
|
|
89
93
|
| Part | What it is |
|
|
90
94
|
| --- | --- |
|