bitboss-ui 3.0.0-beta.75 → 3.0.0-beta.76
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 +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +1 -1
- package/dist/ai/BbDatePickerInput.md +1 -1
- package/dist/ai/BbDialog.md +3 -2
- package/dist/ai/BbDropdown.md +23 -21
- package/dist/ai/BbDropdownButton.md +13 -11
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbSelect.md +153 -43
- package/dist/ai/BbSelectPopover.md +115 -9
- package/dist/ai/BbTable.md +1 -1
- package/dist/ai/BbTimePicker.md +1 -1
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/GroupedListBox.md +2 -2
- package/dist/ai/ListBox.md +3 -2
- package/dist/ai/changelog.json +153 -7
- package/dist/ai/components.json +12 -12
- package/dist/ai/guides/agent-contract.md +1 -1
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/v2-to-v3.md +48 -19
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdown.json +19 -17
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
- package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +44 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
- package/dist/ai/manifest/components/BbTable.tree.json +5 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +9 -2
- package/dist/ai/source/BbBadge.md +6 -2
- package/dist/ai/source/BbBreadcrumbs.md +5 -2
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +10 -6
- package/dist/ai/source/BbColorPalette.md +5 -2
- package/dist/ai/source/BbDatePickerInput.md +7 -2
- package/dist/ai/source/BbDropdown.md +91 -66
- package/dist/ai/source/BbDropdownButton.md +36 -19
- package/dist/ai/source/BbDropdownGroup.md +91 -66
- package/dist/ai/source/BbGallery.md +6 -5
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +130 -106
- package/dist/ai/source/BbSelectPopover.md +128 -21
- package/dist/ai/source/BbTable.md +42 -9
- package/dist/ai/source/BbTimePickerInput.md +6 -2
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +7 -2
- package/dist/ai/source/GroupedListBox.md +22 -3
- package/dist/ai/source/ListBox.md +7 -1
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
- package/dist/components/BbDropdown/types.d.ts +51 -53
- package/dist/components/BbDropdown/types.js +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
- package/dist/components/BbDropdownButton/types.d.ts +12 -10
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +101 -105
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +22 -13
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/llms-full.txt +477 -187
- package/dist/llms-medium.txt +25 -24
- package/dist/llms.txt +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +4 -4
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +319 -306
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +73 -12
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -232,7 +232,7 @@ For components accepting `items`:
|
|
|
232
232
|
|
|
233
233
|
## Icons Rule
|
|
234
234
|
|
|
235
|
-
External-provider-first: prefer iconify provider icons — default set `lucide:*` — sourced from `@iconify-json/*` packages the consumer installs separately (`npm i -D @iconify-json/lucide`). Use `local:*` SVGs only for brand-specific art placed in the configured `
|
|
235
|
+
External-provider-first: prefer iconify provider icons — default set `lucide:*` — sourced from `@iconify-json/*` packages the consumer installs separately (`npm i -D @iconify-json/lucide`). Use `local:*` SVGs only for brand-specific art placed in the configured `icons.dir`. Only reference icons from installed providers or existing local files — **never invent icon names**. Provider icons ship only when written as a `prefix:name` literal somewhere in the project (any file type, PHP included) or listed in the plugin's `icons.whitelist`; the same rule applies in dev, and a name that does not resolve renders a placeholder and logs an error instead of throwing. Full workflow: [Icons Policy](./icons-policy.md).
|
|
236
236
|
|
|
237
237
|
## Variants Rule
|
|
238
238
|
|
|
@@ -27,7 +27,7 @@ There is no separate option: write it where you write the locale, in
|
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
29
|
bitbossUi({
|
|
30
|
-
|
|
30
|
+
icons: { dir: './src/assets/icons' },
|
|
31
31
|
locale: 'fa',
|
|
32
32
|
enabledLocales: [
|
|
33
33
|
'fa-u-ca-gregory', // Persian words and digits, Gregorian calendar
|
|
@@ -70,7 +70,7 @@ Two rules in `recommended` are `warn` rather than `error`, because each describe
|
|
|
70
70
|
- `dts`, `components`, `components.<Component>` and `components.<Component>.variants`: `check` does not write `bitboss-ui.d.ts`, so registered variant names type-check only once Vite starts (the plugin writes the file then). For `BbAlert` and `BbToast` object-form variants only the names must be written out; an `icon` value may be an import.
|
|
71
71
|
- `components.BbTextInput.nullValue`, `components.BbTextarea.nullValue`: `check` keeps the empty-string controls the plugin last wrote to `bitboss-ui.d.ts`.
|
|
72
72
|
|
|
73
|
-
Options passed as a variable (`bitbossUi(options)`, `bitboss: options`) are one report at the call: the CLI reads none of them. A spread or computed key hides the keys at its own level the same way — at the top (`...shared`) every key, in `components` or in one component's entry the variant and `nullValue` keys under it, and a spread in a read list (`allowComponents`, `enabledLocales`, a `variants` list) hides that list; each is reported where it is. A spread deeper than that (inside `configScopes`, or in a value no reader parses) hides nothing the CLI reads and is not reported: a literal `locale` or `ai` beside it is still read. Other keys (`cssLayers`, `
|
|
73
|
+
Options passed as a variable (`bitbossUi(options)`, `bitboss: options`) are one report at the call: the CLI reads none of them. A spread or computed key hides the keys at its own level the same way — at the top (`...shared`) every key, in `components` or in one component's entry the variant and `nullValue` keys under it, and a spread in a read list (`allowComponents`, `enabledLocales`, a `variants` list) hides that list; each is reported where it is. A spread deeper than that (inside `configScopes`, or in a value no reader parses) hides nothing the CLI reads and is not reported: a literal `locale` or `ai` beside it is still read. Other keys (`cssLayers`, `icons`, `configScopes`, a component's own defaults) are not read without running the config and may be computed. `as const`, `satisfies` and `!` are fine. The config builds and runs either way, so it is a warning; silence a deliberate one with `// eslint-disable-next-line bitboss-ui/static-plugin-options`.
|
|
74
74
|
|
|
75
75
|
It also enables `bitboss-ui/require-partner-prop`: an opt-in prop set without its documented required partner — BbTable `loading-text` without `:loading` bound, `selectable` without `legend`, or `method` on BbButton / BbBadgeButton / BbBaseButton without `href` (only an `href` becomes an Inertia visit; `to` is a RouterLink) — compiles and mounts clean and just does nothing; the rule names the missing partner and quotes why.
|
|
76
76
|
|
|
@@ -14,9 +14,9 @@ Mandatory for AI-generated code.
|
|
|
14
14
|
(`npm install -D @iconify-json/lucide`); the plugin resolves them
|
|
15
15
|
automatically — no registration step.
|
|
16
16
|
2. **`local:*` is for brand-specific art only** — logos, custom marks, one-off
|
|
17
|
-
illustrations. They are SVG files in the configured `
|
|
17
|
+
illustrations. They are SVG files in the configured `icons.dir`.
|
|
18
18
|
3. **Never invent icon names.** Use only names that exist in an installed
|
|
19
|
-
`@iconify-json/*` set or as files in `
|
|
19
|
+
`@iconify-json/*` set or as files in `icons.dir`. A name that does not
|
|
20
20
|
resolve renders the built-in placeholder (a question mark in a circle,
|
|
21
21
|
tagged `data-bb-icon-missing="<name>"`) and logs one `console.error` with
|
|
22
22
|
the fix — in dev also as a Vite error overlay. It never throws. This guide
|
|
@@ -26,15 +26,15 @@ Mandatory for AI-generated code.
|
|
|
26
26
|
scans the whole project (PHP included) for `provider:name` literals and
|
|
27
27
|
bundles only those; `local:` ships everything. A name the scanner cannot
|
|
28
28
|
see as a literal — composed at runtime (`` `lucide:${kind}` ``), stored in a
|
|
29
|
-
database, chosen in an admin panel — goes in the plugin's `
|
|
29
|
+
database, chosen in an admin panel — goes in the plugin's `icons.whitelist`.
|
|
30
30
|
This holds in dev exactly as in production: dev registers the same set.
|
|
31
31
|
5. **Never hand-place `BbIcon` where a component already accepts an icon** via
|
|
32
32
|
a prop, item field, or dedicated slot (catalog below).
|
|
33
33
|
|
|
34
34
|
## How resolution works
|
|
35
35
|
|
|
36
|
-
The `bitbossUi` Vite plugin (`
|
|
37
|
-
`bitboss`, default `
|
|
36
|
+
The `bitbossUi` Vite plugin (`icons.dir` option) — or the Nuxt module (config key
|
|
37
|
+
`bitboss`, default `icons: { dir: './assets/icons' }`) — serves every icon through the
|
|
38
38
|
`virtual:bitboss-ui/icons` module that `bitbossUiPlugin` provides to `BbIcon`:
|
|
39
39
|
|
|
40
40
|
- **Provider sets**: every `@iconify-json/*` package found in `node_modules` is
|
|
@@ -42,7 +42,7 @@ The `bitbossUi` Vite plugin (`iconDir` option) — or the Nuxt module (config ke
|
|
|
42
42
|
`lucide:<name>` available; removing it makes them all errors. Nothing to
|
|
43
43
|
configure.
|
|
44
44
|
- **What ships — `local:` everything, providers only what is scanned or
|
|
45
|
-
whitelisted.** Every SVG in `
|
|
45
|
+
whitelisted.** Every SVG in `icons.dir` is bundled. For provider sets the
|
|
46
46
|
plugin reads the **whole project** as bytes — every file under the Vite
|
|
47
47
|
root, PHP, Blade, JSON, SQL seeders and Markdown included — looking for
|
|
48
48
|
`<prefix>:<name>` where `<prefix>` is an installed set; what resolves in the
|
|
@@ -59,7 +59,7 @@ The `bitbossUi` Vite plugin (`iconDir` option) — or the Nuxt module (config ke
|
|
|
59
59
|
neither scanned nor whitelisted therefore shows the placeholder and the
|
|
60
60
|
error on first render in dev — not after deploy.
|
|
61
61
|
- **Names the scanner cannot see** — composed at runtime, persisted in a
|
|
62
|
-
database, picked by an admin — go in `
|
|
62
|
+
database, picked by an admin — go in `icons.whitelist`: exact names
|
|
63
63
|
(`'tabler:crown'`) or globs (`'tabler:calendar-*'`). An entry that resolves
|
|
64
64
|
in no installed set fails the build with the same message the overlay shows.
|
|
65
65
|
- **A missing name is loud, in both environments.** `BbIcon` renders the
|
|
@@ -68,12 +68,12 @@ The `bitbossUi` Vite plugin (`iconDir` option) — or the Nuxt module (config ke
|
|
|
68
68
|
error overlay. A typo inside an installed set reads "does not exist in the
|
|
69
69
|
lucide icon set — did you mean `lucide:…`?"; a real icon nobody wrote as a
|
|
70
70
|
literal reads "exists in the lucide icon set but is not bundled … add it to
|
|
71
|
-
`
|
|
71
|
+
`icons.whitelist`"; a set that is not installed reads "no installed icon set
|
|
72
72
|
has the prefix `mdi` (installed sets: lucide) … run:
|
|
73
73
|
`npm install -D @iconify-json/mdi`". Read the message: a typo wants a
|
|
74
74
|
different name, an unscanned name wants the whitelist, a missing set wants
|
|
75
75
|
an install, never a guess.
|
|
76
|
-
- **Local icons**: `
|
|
76
|
+
- **Local icons**: `icons.dir` is scanned recursively; each `.svg` becomes
|
|
77
77
|
`local:<basename-without-extension>`. A bare, unprefixed name normalizes to
|
|
78
78
|
`local:`. Adding/removing files is picked up live in dev, and the plugin
|
|
79
79
|
maintains a collection JSON plus the VS Code `iconify.customCollectionJsonPaths`
|
|
@@ -93,7 +93,7 @@ controls size, so they are redundant). Use base names — `heroicons:check`, not
|
|
|
93
93
|
`@iconify-json/lucide`).
|
|
94
94
|
2. Verify each name exists in that set's `icons.json` (or its `aliases`) before
|
|
95
95
|
using it.
|
|
96
|
-
3. For `local:*`, list the `.svg` files in the configured `
|
|
96
|
+
3. For `local:*`, list the `.svg` files in the configured `icons.dir`.
|
|
97
97
|
|
|
98
98
|
## Where the library accepts icons — full catalog
|
|
99
99
|
|
|
@@ -247,6 +247,27 @@ markup) yourself:
|
|
|
247
247
|
`<value>:append` slots, when an entry's leading/trailing region needs more than
|
|
248
248
|
a named icon (e.g. an avatar). A slot replaces the icon, never sits beside it.
|
|
249
249
|
|
|
250
|
+
### The library's own glyphs (app-wide)
|
|
251
|
+
|
|
252
|
+
The glyphs the library draws itself (✕, chevrons, check, …) swap by role,
|
|
253
|
+
app-wide or for one component, which wins:
|
|
254
|
+
|
|
255
|
+
```ts
|
|
256
|
+
bitbossUi({
|
|
257
|
+
icons: { defaults: { close: 'ph:x-bold' } },
|
|
258
|
+
components: { BbSelect: { icons: { search: 'ph:magnifying-glass-bold' } } },
|
|
259
|
+
});
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Roles: `close`, `clear`, `expandChevron`, `prev`, `next`, `separator`,
|
|
263
|
+
`search`, `check`, `dragHandle`, `move`, `sortAsc`, `sortDesc`, `calendar`,
|
|
264
|
+
`clock`, `error`, `warning`, `avatar`, `star`, `eyedropper`, `play`, `pause`;
|
|
265
|
+
a component takes only the roles it draws. Names are bundled at build time
|
|
266
|
+
(app-wide only); unset roles keep the built-in; sizes stay the library's. With
|
|
267
|
+
Phosphor, use `-bold` names (and `-fill` for `error`, `warning`, `avatar`,
|
|
268
|
+
`star`). A custom `check` has no draw-in; a `sortDesc` replaces the rotated
|
|
269
|
+
`sortAsc`.
|
|
270
|
+
|
|
250
271
|
## Sizing and color
|
|
251
272
|
|
|
252
273
|
- Icons paint in `currentColor`: they inherit the parent's text color. Color
|
|
@@ -287,7 +308,7 @@ markup) yourself:
|
|
|
287
308
|
- Inventing or guessing icon names; assuming a set is installed without
|
|
288
309
|
checking `package.json`.
|
|
289
310
|
- Runtime-composed icon names (template strings / concatenation) without a
|
|
290
|
-
matching `
|
|
311
|
+
matching `icons.whitelist` entry — invisible to the scanner, so they render the
|
|
291
312
|
placeholder (in dev too). Prefer a lookup of full literals; whitelist what
|
|
292
313
|
must stay dynamic.
|
|
293
314
|
- Setting `color`/`fill` on the icon element instead of the parent.
|
|
@@ -19,7 +19,7 @@ Source of truth for integrating `bitboss-ui`. Two pieces are always required:
|
|
|
19
19
|
3. [Register the runtime plugin](#2-vite--vue): `app.use(bitbossUiPlugin)` (automatic in Nuxt; in [Inertia](#4-inertia) it goes in `createInertiaApp`).
|
|
20
20
|
4. [Styles](#5-styling): the plugin injects `styles.css` for you, so do not import it by hand. On Tailwind v4 also set `cssLayers`.
|
|
21
21
|
5. [Locale](#locale-localekey-default-en): set `locale` (default `'en'`) and list any others in `enabledLocales`.
|
|
22
|
-
6. [Icons](#6-icons): install an `@iconify-json/*` set, and point `
|
|
22
|
+
6. [Icons](#6-icons): install an `@iconify-json/*` set, and point `icons.dir` at your own SVG folder if you use `local:` icons.
|
|
23
23
|
7. [SSR and Inertia notes](#4-inertia): the build plugin handles `noExternal` and the Inertia `Link`; in Nuxt do not call `app.use`.
|
|
24
24
|
8. [App-wide defaults and area looks](#the-components-map): one `components` map (and `configScopes` / `<BbConfigScope>` for an area) instead of repeating props.
|
|
25
25
|
9. [Set up coding agents](#8-ai-knowledge-base) so they find the docs and the MCP server: `setup` does it, every install keeps it current.
|
|
@@ -161,7 +161,7 @@ export default defineConfig({
|
|
|
161
161
|
plugins: [
|
|
162
162
|
vue(),
|
|
163
163
|
bitbossUi({
|
|
164
|
-
|
|
164
|
+
icons: { dir: './src/assets/icons' },
|
|
165
165
|
// Tailwind v4: keep this line (§5 Cascade layers). v3 or plain CSS: drop it.
|
|
166
166
|
cssLayers: TAILWIND_V4_LAYERS,
|
|
167
167
|
}),
|
|
@@ -194,7 +194,7 @@ The plugin registers no components globally: import each one where you use it
|
|
|
194
194
|
(`import { BbButton, BbSelect } from 'bitboss-ui'`). Guide examples leave those
|
|
195
195
|
imports out. In Nuxt, `autoImport: true` registers them instead (§3).
|
|
196
196
|
|
|
197
|
-
If the icon folder does not exist yet, create it (`mkdir -p src/assets/icons`) and keep the path aligned with `
|
|
197
|
+
If the icon folder does not exist yet, create it (`mkdir -p src/assets/icons`) and keep the path aligned with `icons.dir`.
|
|
198
198
|
|
|
199
199
|
## 3) Nuxt
|
|
200
200
|
|
|
@@ -207,7 +207,7 @@ import { TAILWIND_V4_LAYERS } from 'bitboss-ui/nuxt';
|
|
|
207
207
|
export default defineNuxtConfig({
|
|
208
208
|
modules: ['bitboss-ui/nuxt'],
|
|
209
209
|
bitboss: {
|
|
210
|
-
|
|
210
|
+
icons: { dir: './assets/icons' }, // module default = app/assets/icons (relative to the Vite root, app/ under Nuxt 4)
|
|
211
211
|
// Tailwind v4: keep this line (§5 Cascade layers). v3 or plain CSS: drop it.
|
|
212
212
|
cssLayers: TAILWIND_V4_LAYERS,
|
|
213
213
|
},
|
|
@@ -238,7 +238,7 @@ Registers the library's components and composables with Nuxt's auto-import syste
|
|
|
238
238
|
export default defineNuxtConfig({
|
|
239
239
|
modules: ['bitboss-ui/nuxt'],
|
|
240
240
|
bitboss: {
|
|
241
|
-
|
|
241
|
+
icons: { dir: './assets/icons' },
|
|
242
242
|
autoImport: true,
|
|
243
243
|
},
|
|
244
244
|
});
|
|
@@ -372,7 +372,7 @@ you the order:
|
|
|
372
372
|
|
|
373
373
|
```ts
|
|
374
374
|
// vite.config.ts / the `bitboss` key in nuxt.config.ts
|
|
375
|
-
bitbossUi({
|
|
375
|
+
bitbossUi({ icons: { dir: '…' }, injectStyles: false, resetCss: false });
|
|
376
376
|
```
|
|
377
377
|
|
|
378
378
|
```ts
|
|
@@ -422,7 +422,7 @@ by its first mention — so the order you configure is the order you get.
|
|
|
422
422
|
import { bitbossUi, TAILWIND_V4_LAYERS } from 'bitboss-ui/vite';
|
|
423
423
|
|
|
424
424
|
bitbossUi({
|
|
425
|
-
|
|
425
|
+
icons: { dir: './assets/icons' },
|
|
426
426
|
cssLayers: TAILWIND_V4_LAYERS,
|
|
427
427
|
});
|
|
428
428
|
```
|
|
@@ -524,7 +524,7 @@ it is the only way to get v4's behaviour on v3. Three edits, made together:
|
|
|
524
524
|
import { bitbossUi, TAILWIND_V3_LAYERS } from 'bitboss-ui/vite';
|
|
525
525
|
|
|
526
526
|
bitbossUi({
|
|
527
|
-
|
|
527
|
+
icons: { dir: './assets/icons' },
|
|
528
528
|
// ['tailwind-base', 'bitboss-ui-reset', 'bitboss-ui', 'tailwind-utilities']
|
|
529
529
|
cssLayers: TAILWIND_V3_LAYERS,
|
|
530
530
|
// 3. v3 class names for the pt deduper: a module whose default export is
|
|
@@ -549,7 +549,7 @@ fixed by its first mention, so they agree rather than fight.
|
|
|
549
549
|
|
|
550
550
|
```ts
|
|
551
551
|
bitbossUi({
|
|
552
|
-
|
|
552
|
+
icons: { dir: './assets/icons' },
|
|
553
553
|
cssLayers: ['bitboss-ui'], // ['bitboss-ui-reset', 'bitboss-ui'] with resetCss: true
|
|
554
554
|
});
|
|
555
555
|
```
|
|
@@ -631,14 +631,14 @@ Reach for the documented variable before reaching for a utility.
|
|
|
631
631
|
|
|
632
632
|
## 6) Icons
|
|
633
633
|
|
|
634
|
-
- `
|
|
634
|
+
- `icons.dir` (default `'./assets/icons'`) is scanned recursively for `.svg` files; each file becomes `local:<basename>`. **`local:` ships everything.**
|
|
635
635
|
- Provider icons (`lucide:pencil`, `mdi:home`, …) require the matching `@iconify-json/<prefix>` package installed in the consumer app. **Providers ship only what is scanned or whitelisted**: the plugin reads the whole project as bytes — every file under the Vite root, PHP and Blade and JSON and SQL included — for `<prefix>:<name>` literals of the installed sets, and emits one lazy chunk per name that resolves. Skipped: gitignored paths (every `.gitignore` level), `node_modules`, `vendor`, `storage`, the build `outDir`, hidden paths, binaries, and `iconsScanner.exclude` globs; `iconsScanner.include` adds locations. The scan is cached by content hash under `node_modules/.cache/bitboss-ui/`, runs on 2–4 worker threads once a project passes ~1500 files (a cold scan is disk-bound, and the threads let a slow disk serve reads in parallel — roughly 0.2 s for 10k files on a laptop), prints one line (file count, elapsed, threads) after a cold scan, and stays silent when warm.
|
|
636
636
|
- **This holds in dev exactly as in prod.** Dev registers the same scanned-plus-whitelisted set, re-scans a file on every save, and hot-updates the registry — a new literal renders without a restart, and a name that is neither scanned nor whitelisted fails on first render in dev instead of after deploy.
|
|
637
|
-
- **Names the scanner cannot see** — composed at runtime, stored in a database, chosen in an admin UI — go in `
|
|
638
|
-
- **A name that does not resolve renders the built-in placeholder** (a question mark in a circle, sized and coloured like the icon it replaces, with `data-bb-icon-missing="<name>"`) and logs one `console.error` per name per page load, in both environments; dev also raises the Vite error overlay. The message is the fix: a mistyped name inside an installed set gets a "did you mean …?" hint, a real icon nobody wrote as a literal is told to use `
|
|
637
|
+
- **Names the scanner cannot see** — composed at runtime, stored in a database, chosen in an admin UI — go in `icons.whitelist` (exact names or globs). An entry that resolves in no installed set fails the build with the actionable message.
|
|
638
|
+
- **A name that does not resolve renders the built-in placeholder** (a question mark in a circle, sized and coloured like the icon it replaces, with `data-bb-icon-missing="<name>"`) and logs one `console.error` per name per page load, in both environments; dev also raises the Vite error overlay. The message is the fix: a mistyped name inside an installed set gets a "did you mean …?" hint, a real icon nobody wrote as a literal is told to use `icons.whitelist`, and an uninstalled prefix gets the list of installed sets plus the `npm install -D @iconify-json/<prefix>` command (the optional `@iconify/collections` peer only sharpens that wording, see [Install](#1-install)). A missing `local:` icon names the `.svg` that is not in `icons.dir`. `BbIcon` never throws for a missing name, so the surrounding tree stays mounted.
|
|
639
639
|
- In dev (unless `vscodeSettings: false`) the plugin also writes `.vscode/bitboss-ui.local-icons.json` and wires `.vscode/settings.json` so the Iconify editor extension previews local icons and Tailwind IntelliSense completes inside `pt:*` / `:pt`. The collection lives in the project tree, not under `node_modules`, so a host editor sees what a container (Sail, a named `node_modules` volume) wrote.
|
|
640
640
|
|
|
641
|
-
|
|
641
|
+
Choosing icons, and swapping the library's own: [Icons Policy](./icons-policy.md).
|
|
642
642
|
|
|
643
643
|
## The components map
|
|
644
644
|
|
|
@@ -918,9 +918,9 @@ fails the build naming its home:
|
|
|
918
918
|
|
|
919
919
|
Options are the same for `bitboss-ui/vite` and the `bitboss` key in Nuxt.
|
|
920
920
|
|
|
921
|
-
### `
|
|
921
|
+
### `icons.dir?: string` (default: `'./assets/icons'`)
|
|
922
922
|
|
|
923
|
-
Path to local SVG icons, absolute, or relative to the Vite root: the project root in a Vite app, `app/` under Nuxt 4 (so the default `./assets/icons` there is `app/assets/icons`; do not write `./app/assets/icons`). Scanned recursively; file basename (without extension) becomes the icon name, addressable as `local:<name>`. Every file in it ships. Only needed when you use `local:` icons: a missing folder at the default path is silent, while a custom `
|
|
923
|
+
Path to local SVG icons, absolute, or relative to the Vite root: the project root in a Vite app, `app/` under Nuxt 4 (so the default `./assets/icons` there is `app/assets/icons`; do not write `./app/assets/icons`). Scanned recursively; file basename (without extension) becomes the icon name, addressable as `local:<name>`. Every file in it ships. Only needed when you use `local:` icons: a missing folder at the default path is silent, while a custom `icons.dir` that resolves to a missing or SVG-less folder logs a build warning.
|
|
924
924
|
|
|
925
925
|
### `iconsScanner?: { include?: string[]; exclude?: string[]; maxFileSize?: number }`
|
|
926
926
|
|
|
@@ -932,7 +932,7 @@ Tunes the provider-icon source scan (see [Icons](#6-icons)). All three are optio
|
|
|
932
932
|
|
|
933
933
|
```ts
|
|
934
934
|
bitbossUi({
|
|
935
|
-
|
|
935
|
+
icons: { dir: './resources/icons' },
|
|
936
936
|
iconsScanner: {
|
|
937
937
|
include: ['vendor/acme/ui-kit/src'],
|
|
938
938
|
exclude: ['database/dumps/**'],
|
|
@@ -940,15 +940,16 @@ bitbossUi({
|
|
|
940
940
|
});
|
|
941
941
|
```
|
|
942
942
|
|
|
943
|
-
### `
|
|
943
|
+
### `icons.whitelist?: string[]`
|
|
944
944
|
|
|
945
|
-
Provider icons that **always** ship, scanned or not — exact names (`'tabler:crown'`) and globs (`'tabler:calendar-*'`, expanded against the installed set).
|
|
945
|
+
Provider icons that **always** ship, scanned or not — exact names (`'tabler:crown'`) and globs (`'tabler:calendar-*'`, expanded against the installed set). An entry that resolves in no installed set — a typo, an uninstalled prefix, a glob matching nothing — **fails the build** with the same actionable message the dev overlay shows for a missing icon. `local:` names never belong here (they all ship already).
|
|
946
946
|
|
|
947
947
|
```ts
|
|
948
948
|
bitbossUi({
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
949
|
+
icons: {
|
|
950
|
+
dir: './resources/icons',
|
|
951
|
+
whitelist: ['tabler:category', 'tabler:tag', 'tabler:calendar-*'],
|
|
952
|
+
},
|
|
952
953
|
});
|
|
953
954
|
```
|
|
954
955
|
|
|
@@ -1250,7 +1251,7 @@ anything. Apps that switch locales at runtime list what they offer:
|
|
|
1250
1251
|
|
|
1251
1252
|
```ts
|
|
1252
1253
|
bitbossUi({
|
|
1253
|
-
|
|
1254
|
+
icons: { dir: './src/assets/icons' },
|
|
1254
1255
|
locale: 'it',
|
|
1255
1256
|
enabledLocales: ['it', 'en', 'de', 'fr'], // ~4 dictionaries + 4 dayjs packs
|
|
1256
1257
|
});
|
|
@@ -1702,7 +1703,7 @@ leave it alone with no configuration, as long as they can see it is yours:
|
|
|
1702
1703
|
|
|
1703
1704
|
- [ ] package installed (plus `@iconify-json/*` packages for every provider prefix used);
|
|
1704
1705
|
- [ ] build plugin configured: `bitboss-ui/vite` plugin or `bitboss-ui/nuxt` module (`bitboss` config key);
|
|
1705
|
-
- [ ] using `local:` icons? `
|
|
1706
|
+
- [ ] using `local:` icons? `icons.dir` points at an existing SVG folder;
|
|
1706
1707
|
- [ ] runtime plugin installed: `app.use(bitbossUiPlugin)` (automatic in Nuxt);
|
|
1707
1708
|
- [ ] style strategy chosen: auto injection (default) or `injectStyles: false` + `import 'bitboss-ui/styles.css'` — auto injection is always library-first, so a Tailwind **v3** app that needs Preflight to load before the library must take the second option (§5);
|
|
1708
1709
|
- [ ] if a reset is required: `resetCss: true` or `import 'bitboss-ui/reset.css'`;
|
|
@@ -192,7 +192,7 @@ Each row: what you will find, how to find it, and what to write instead.
|
|
|
192
192
|
21. **`all: { adaptive: false }` (plugin) or `:adaptive="false"` (one component): the temporary crutch from the migration** → Remove it in the adaptive phase (below) `[adaptive-false]`
|
|
193
193
|
|
|
194
194
|
- Find: `rg -n -g '*.{vue,ts,js,mjs}' 'adaptive:\s*false|:adaptive=.false.'`
|
|
195
|
-
- Write: `bitbossUi({
|
|
195
|
+
- Write: `bitbossUi({ icons: { dir: 'resources/icons' } })`
|
|
196
196
|
- Keep it only on a surface that must never become a sheet, and say why in a comment.
|
|
197
197
|
<!-- /generated:rows -->
|
|
198
198
|
|
|
@@ -37,7 +37,7 @@ const icons = import.meta.glob('../../assets/icons/*.svg', { as: 'raw' });
|
|
|
37
37
|
app.provide('icons', toRegistry(icons));
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
v3 does both halves itself. The **build** plugin scans `
|
|
40
|
+
v3 does both halves itself. The **build** plugin scans `icons.dir` recursively
|
|
41
41
|
and turns every `.svg` into `local:<basename>`; the **runtime** plugin provides
|
|
42
42
|
that registry to `BbIcon`. If your plugin scanned the same folder and provided
|
|
43
43
|
it under `'icons'`, it is now duplicating both.
|
|
@@ -51,9 +51,9 @@ map stops rendering and nothing warns.
|
|
|
51
51
|
|
|
52
52
|
Check before you delete — the plugin is dead only if both hold:
|
|
53
53
|
|
|
54
|
-
1. **Every SVG it registers also lives under `
|
|
54
|
+
1. **Every SVG it registers also lives under `icons.dir`.** Diff the two folders.
|
|
55
55
|
If the plugin globbed a different directory (`resources/js/icons`,
|
|
56
|
-
a package's `assets/`), move those files into `
|
|
56
|
+
a package's `assets/`), move those files into `icons.dir` first — otherwise
|
|
57
57
|
deletion and non-deletion both leave you with missing icons.
|
|
58
58
|
2. **Nothing else injects `'icons'`.** `rg -n "inject\(['\"]icons['\"]\)"` — an
|
|
59
59
|
app component reading the map to render `<img>` or to enumerate names is
|
|
@@ -70,7 +70,7 @@ build on it.
|
|
|
70
70
|
|
|
71
71
|
## Prefix your own icons with `local:` while you are in there
|
|
72
72
|
|
|
73
|
-
A v2 `type` naming an icon from your own `
|
|
73
|
+
A v2 `type` naming an icon from your own `icons.dir` was bare — `type="user-circle"`.
|
|
74
74
|
Carry it over **with the prefix**:
|
|
75
75
|
|
|
76
76
|
```diff
|
|
@@ -149,7 +149,7 @@ export default defineConfig({
|
|
|
149
149
|
plugins: [
|
|
150
150
|
vue(),
|
|
151
151
|
bitbossUi({
|
|
152
|
-
|
|
152
|
+
icons: { dir: './src/assets/icons' }, // required — create the folder
|
|
153
153
|
}),
|
|
154
154
|
],
|
|
155
155
|
});
|
|
@@ -167,14 +167,14 @@ app.mount('#app');
|
|
|
167
167
|
|
|
168
168
|
Migration deltas, one by one:
|
|
169
169
|
|
|
170
|
-
| v2 | v3
|
|
171
|
-
| -------------------------------------------------------------------------- |
|
|
172
|
-
| `import 'bitboss-ui/styles.css'` in the entry file | **Delete it.** The runtime plugin auto-injects styles (`injectStyles` defaults `true`). Keep a manual import only if you set `injectStyles: false` — see the Tailwind exception below.
|
|
173
|
-
| No build plugin | **Add `bitbossUi({
|
|
174
|
-
| `app.use(BbTooltipDirectivePlugin)` / `app.use(BbDropdownDirectivePlugin)` | **Delete both.** `bitbossUiPlugin` registers `v-bb-tooltip` and `v-bb-dropdown` itself (opt out with `injectDirectives: false` if the names collide).
|
|
175
|
-
| No reset stylesheet | Optional: `resetCss: true` or `import 'bitboss-ui/reset.css'`. Skip in Tailwind apps — Preflight already does this.
|
|
176
|
-
| Icons registered by augmenting the `IconRegistry` type | **Gone** (the `IconRegistry` export no longer exists — see section 5). Drop `.svg` files into `
|
|
177
|
-
| A hand-rolled icon plugin doing `app.provide('icons', { … })` | **Delete it** and move the art into `
|
|
170
|
+
| v2 | v3 |
|
|
171
|
+
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
172
|
+
| `import 'bitboss-ui/styles.css'` in the entry file | **Delete it.** The runtime plugin auto-injects styles (`injectStyles` defaults `true`). Keep a manual import only if you set `injectStyles: false` — see the Tailwind exception below. |
|
|
173
|
+
| No build plugin | **Add `bitbossUi({ icons: { dir } })`** to `vite.config.ts` (or the `bitboss-ui/nuxt` module). The app does not build without it — components import the virtual config module. |
|
|
174
|
+
| `app.use(BbTooltipDirectivePlugin)` / `app.use(BbDropdownDirectivePlugin)` | **Delete both.** `bitbossUiPlugin` registers `v-bb-tooltip` and `v-bb-dropdown` itself (opt out with `injectDirectives: false` if the names collide). |
|
|
175
|
+
| No reset stylesheet | Optional: `resetCss: true` or `import 'bitboss-ui/reset.css'`. Skip in Tailwind apps — Preflight already does this. |
|
|
176
|
+
| Icons registered by augmenting the `IconRegistry` type | **Gone** (the `IconRegistry` export no longer exists — see section 5). Drop `.svg` files into `icons.dir` and reference them as `local:<name>`; provider icons (`lucide:*`, `mdi:*`, …) need the matching `@iconify-json/*` dev dependency. |
|
|
177
|
+
| A hand-rolled icon plugin doing `app.provide('icons', { … })` | **Delete it** and move the art into `icons.dir`. See the shadowing warning below — this one is silent. |
|
|
178
178
|
|
|
179
179
|
### ⚠ silent — a hand-rolled `provide('icons', …)` is shadowed, not merged
|
|
180
180
|
|
|
@@ -184,7 +184,7 @@ icon plugin typically uses. `BbIcon` reads the **Symbol first**
|
|
|
184
184
|
(`inject(ICONS_INJECTION_KEY) ?? inject('icons')`), so once the library plugin
|
|
185
185
|
is installed your own `provide('icons', …)` map never wins. Any glyph that
|
|
186
186
|
existed only in that map stops resolving, and nothing warns. Move those SVGs
|
|
187
|
-
into `
|
|
187
|
+
into `icons.dir` and reference them as `local:<name>`.
|
|
188
188
|
|
|
189
189
|
App code that still calls `inject('icons')` now receives the **library's**
|
|
190
190
|
registry object, not yours. The string key is a one-release compatibility shim
|
|
@@ -205,7 +205,7 @@ manual import and turn injection off:
|
|
|
205
205
|
|
|
206
206
|
```ts
|
|
207
207
|
// vite.config.ts
|
|
208
|
-
bitbossUi({
|
|
208
|
+
bitbossUi({ icons: { dir: './src/assets/icons' }, injectStyles: false });
|
|
209
209
|
```
|
|
210
210
|
|
|
211
211
|
```ts
|
|
@@ -227,7 +227,7 @@ v3 ships a module that does both halves — do **not** also call `app.use`:
|
|
|
227
227
|
export default defineNuxtConfig({
|
|
228
228
|
modules: ['bitboss-ui/nuxt'],
|
|
229
229
|
bitboss: {
|
|
230
|
-
|
|
230
|
+
icons: { dir: './assets/icons' },
|
|
231
231
|
},
|
|
232
232
|
});
|
|
233
233
|
```
|
|
@@ -241,8 +241,8 @@ not rewriting setup.
|
|
|
241
241
|
|
|
242
242
|
| `@bitboss-dev/bitboss-ui-nuxt` option | v3 `bitboss-ui/nuxt` |
|
|
243
243
|
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
244
|
-
| `icons.path` | `
|
|
245
|
-
| `icons.enabled: false` | **Gone** — the icon pipeline is not optional in v3; components import the virtual icon module. Point `
|
|
244
|
+
| `icons.path` | `icons.dir`. Same job. |
|
|
245
|
+
| `icons.enabled: false` | **Gone** — the icon pipeline is not optional in v3; components import the virtual icon module. Point `icons.dir` at an empty folder if you ship no local art. |
|
|
246
246
|
| `styles.enabled` | `injectStyles` (still defaults `true`). |
|
|
247
247
|
| `styles.index` | **Gone**, and nothing replaces it — see the ordering note below. |
|
|
248
248
|
| `link.name` | `nuxtLinkName` (still defaults `'NuxtLink'`). |
|
|
@@ -264,7 +264,7 @@ or opt back in:
|
|
|
264
264
|
export default defineNuxtConfig({
|
|
265
265
|
modules: ['bitboss-ui/nuxt'],
|
|
266
266
|
bitboss: {
|
|
267
|
-
|
|
267
|
+
icons: { dir: './assets/icons' },
|
|
268
268
|
autoImport: true, // BbForm and the form controls included
|
|
269
269
|
},
|
|
270
270
|
});
|
|
@@ -331,7 +331,7 @@ the `components` map:
|
|
|
331
331
|
```ts
|
|
332
332
|
// v3
|
|
333
333
|
bitbossUi({
|
|
334
|
-
|
|
334
|
+
icons: { dir: './src/assets/icons' },
|
|
335
335
|
inertiaLinkName: 'Link',
|
|
336
336
|
mobileMaxWidth: 768,
|
|
337
337
|
components: { BbDialog: { sizeMap: { md: 700 } } },
|
|
@@ -375,7 +375,7 @@ without any error. If your app relied on the v2 widths, pin them explicitly:
|
|
|
375
375
|
|
|
376
376
|
```ts
|
|
377
377
|
bitbossUi({
|
|
378
|
-
|
|
378
|
+
icons: { dir: '…' },
|
|
379
379
|
components: {
|
|
380
380
|
BbDialog: { sizeMap: { md: 652, lg: 896 } },
|
|
381
381
|
BbOffCanvas: { sizeMap: { md: 652, lg: 896 } },
|
|
@@ -802,7 +802,7 @@ modifier class), register the name and ship its CSS:
|
|
|
802
802
|
```ts
|
|
803
803
|
// vite.config.ts
|
|
804
804
|
bitbossUi({
|
|
805
|
-
|
|
805
|
+
icons: { dir: '…' },
|
|
806
806
|
components: {
|
|
807
807
|
BbButton: { variants: ['brand'] },
|
|
808
808
|
BbBadge: { variants: ['soft-blue'] },
|
|
@@ -853,7 +853,7 @@ every occurrence; this section explains each pattern once.
|
|
|
853
853
|
| `BbRatio` (+ `BbRatioProps`, `.bb-ratio`) | **removed** | No replacement — it was a one-rule wrapper. Use the `aspect-ratio` CSS property, or copy the v2 component. |
|
|
854
854
|
| `useQueue`, `useQuery` | **removed** | Both were public v2 exports and neither has a v3 equivalent; the import fails at build. Copy the v2 implementations out of the 2.1.135 tarball (`dist/composables/useQueue.d.ts`, `useQuery.d.ts`) into your app, or replace them with `@vueuse/core` equivalents. |
|
|
855
855
|
| `BbToastMessage` type export | **removed** | Use `BbToastOptions` (the `toast()` options shape). |
|
|
856
|
-
| `IconRegistry` / `IconNameFromRegistry` exports | **removed** | Icon names are plain strings now. Local art goes in `
|
|
856
|
+
| `IconRegistry` / `IconNameFromRegistry` exports | **removed** | Icon names are plain strings now. Local art goes in `icons.dir` as `local:<name>`; delete your `IconRegistry` augmentation. |
|
|
857
857
|
| `BbConfirm` + `BbToast` (the hosts; `BbConfirmProps`, `BbToastProps`) | **removed** — delete the tags: the plugin renders `<BbHost />` | Delete both tags: the plugin renders a `<BbHost />` beside the app (after 3.0.0-beta.65; one placed at the app root since beta.56 keeps working). It renders every `confirm()` and `toast()`, takes no props, and a second one renders nothing. Their settings moved to the plugin config: `<BbConfirm size>` → `confirm: { defaultSize }`, `<BbToast position>` → `toastPosition`, the hosts' `pt` / `pt:*` → the build-time `pt.BbConfirm` / `pt.BbToast` maps. `<BbConfirmPortal>`, `<BbToastPortal>`, `confirm()` and `toast()` are unchanged. With no host, `confirm()` now resolves `false` after one second instead of hanging. |
|
|
858
858
|
|
|
859
859
|
### 5.2 The polarity wave: booleans now read as opt-in
|
|
@@ -2981,6 +2981,35 @@ nullValue }, BbTextarea: { nullValue } }`, same values (`'null'` /
|
|
|
2981
2981
|
arrow keys + Enter) emits `option:add`, as Enter already did. A
|
|
2982
2982
|
`#empty` that offered a create link or button is redundant: drop it.
|
|
2983
2983
|
|
|
2984
|
+
169. **The icon options move under `icons`** (after 3.0.0-beta.75).
|
|
2985
|
+
`iconDir` is `icons.dir` and `iconWhitelist` is `icons.whitelist`,
|
|
2986
|
+
in `bitbossUi()` and in Nuxt's `bitboss` key; the old keys fail the
|
|
2987
|
+
build naming the new ones. `iconsScanner` stays where it is.
|
|
2988
|
+
|
|
2989
|
+
```ts
|
|
2990
|
+
bitbossUi({
|
|
2991
|
+
icons: { dir: './src/assets/icons', whitelist: ['tabler:crown'] },
|
|
2992
|
+
});
|
|
2993
|
+
```
|
|
2994
|
+
|
|
2995
|
+
170. **BbSelect / BbSelectPopover take `v-model:query`** (after
|
|
2996
|
+
3.0.0-beta.75). The search field's text, bound: written back raw on
|
|
2997
|
+
every committed keystroke and `''` when the component empties the
|
|
2998
|
+
field (close, a pick that closes, `option:add`, the ✕). A write
|
|
2999
|
+
searches at once and is held while closed, so a cancelled create can
|
|
3000
|
+
reopen on its search: `query = text; open = true`. On the phone
|
|
3001
|
+
sheet the query now clears when the close begins, not after the
|
|
3002
|
+
slide-out.
|
|
3003
|
+
|
|
3004
|
+
171. **Dropdown group titles are `group-label`, `groupBy` headings
|
|
3005
|
+
`group-header`** (after 3.0.0-beta.75). `.bb-dropdown__group-title`
|
|
3006
|
+
is `.bb-dropdown__group-label` (its `group-title__*` children follow),
|
|
3007
|
+
and a `groupBy` heading carries only `.bb-dropdown__group-header` (was
|
|
3008
|
+
`__group-title __section-title`; its wrapper `__section` is
|
|
3009
|
+
`__group-section`). Rename them in your CSS, or better, style them
|
|
3010
|
+
through the new parts: `pt:group-label` on BbDropdown and
|
|
3011
|
+
`pt:group-header` on BbDropdown and BbSelect.
|
|
3012
|
+
|
|
2984
3013
|
## 7. Class overrides → variants
|
|
2985
3014
|
|
|
2986
3015
|
### The v2 pattern to hunt down
|
|
@@ -35,7 +35,7 @@ Each `pt` part now has a class with the same name, on the same element:
|
|
|
35
35
|
|
|
36
36
|
<!-- generated:count -->
|
|
37
37
|
|
|
38
|
-
In numbers: **
|
|
38
|
+
In numbers: **94** classes renamed, **23** added beside an existing class, and **7** new state classes and elements.
|
|
39
39
|
|
|
40
40
|
<!-- /generated:count -->
|
|
41
41
|
|
|
@@ -75,7 +75,7 @@ bash and zsh. On Windows, use Git Bash or WSL.
|
|
|
75
75
|
|
|
76
76
|
```sh
|
|
77
77
|
rg -nP --glob '!node_modules' --glob '!dist' --glob '!rename-bb-classes.mjs' \
|
|
78
|
-
'(?<![\w-])(bb-checkbox-group-item__description|bb-switch-group-item__description|bb-radio-group-item__description|bb-dropdown-button__dropdown-btn|bb-segmented-field__trigger-btn|bb-select-popover__search-input|bb-select-popover__search-clear|bb-listbox__option-description|bb-dropzone__interactive-label|bb-time-picker-input-offcanvas|bb-checkbox-group-item__label|bb-dropdown__items-container|bb-dropdown-button__main-btn|bb-pagination__page-chevron|bb-switch-group-item__label|bb-table-column-ghost__icon|bb-select-popover-offcanvas|bb-radio-group-item__label|bb-color-palette-offcanvas|bb-checkbox-group__no-data|bb-segmented-field__field|bb-time-selector__readout|bb-toast-message__content|bb-toast-message__actions|bb-color-palette__popover|bb-commabox-item--focused|bb-listbox__option-label|bb-calendar__header-cell|bb-calendar__date-button|bb-time-selector__header|bb-date-picker-offcanvas|bb-time-picker-offcanvas|bb-calendar__date-append|bb-switch-group__no-data|bb-indicator__indicator|bb-toast-message__title|bb-toast-message__close|bb-date-picker__popover|bb-time-picker__popover|bb-toast-message__inner|bb-radio-group__no-data|bb-badge__clear-button|bb-checkbox-group-item|bb-toast-message__icon|bb-toast-message__text|bb-table-no-data__cell|bb-table-no-data__text|bb-select__comma-item|bb-calendar__controls|bb-time-selector__btn|bb-tabs-list__tablist|bb-table-no-data__row|bb-offcanvas--stacked|bb-calendar__nav-btn|bb-switch-group-item|bb-popover-offcanvas|bb-field__hint-text|bb-tooltip__content|bb-radio-group-item|bb-table-header-row|bb-table-sort__icon|bb-table-data__cell|bb-listbox--no-data|bb-listbox__no-data|bb-tag__text-input|bb-button__content|bb-table-data__row|bb-offcanvas__body|bb-calendar__month|bb-dialog--stacked|bb-badge__content|bb-calendar__date|item__description|bb-rating__option|bb-badge--focused|bb-button--active|bb-chipsbox-item|bb-commabox-item|bb-table-caption|bb-tabs__trigger|bb-toast-message|bb-select__chip|bb-table-header|bb-dialog__body|bb-tree__node|bb-tabs-panes|bb-tabs__pane|item__text)(?![\w]|-(?!-))'
|
|
78
|
+
'(?<![\w-])(bb-checkbox-group-item__description|bb-switch-group-item__description|bb-radio-group-item__description|bb-dropdown-button__dropdown-btn|bb-segmented-field__trigger-btn|bb-select-popover__search-input|bb-select-popover__search-clear|bb-listbox__option-description|bb-dropzone__interactive-label|bb-time-picker-input-offcanvas|bb-checkbox-group-item__label|bb-dropdown__items-container|bb-dropdown-button__main-btn|bb-pagination__page-chevron|bb-switch-group-item__label|bb-table-column-ghost__icon|bb-select-popover-offcanvas|bb-radio-group-item__label|bb-color-palette-offcanvas|bb-checkbox-group__no-data|bb-dropdown__section-title|bb-segmented-field__field|bb-time-selector__readout|bb-toast-message__content|bb-toast-message__actions|bb-color-palette__popover|bb-commabox-item--focused|group-title__prepend-icon|bb-listbox__option-label|bb-calendar__header-cell|bb-calendar__date-button|bb-time-selector__header|bb-date-picker-offcanvas|bb-time-picker-offcanvas|bb-calendar__date-append|bb-switch-group__no-data|bb-dropdown__group-title|group-title__append-icon|bb-indicator__indicator|bb-toast-message__title|bb-toast-message__close|bb-date-picker__popover|bb-time-picker__popover|bb-toast-message__inner|bb-radio-group__no-data|bb-badge__clear-button|bb-checkbox-group-item|bb-toast-message__icon|bb-toast-message__text|bb-table-no-data__cell|bb-table-no-data__text|bb-select__comma-item|bb-calendar__controls|bb-time-selector__btn|bb-tabs-list__tablist|bb-table-no-data__row|bb-offcanvas--stacked|bb-calendar__nav-btn|bb-switch-group-item|bb-popover-offcanvas|group-title__content|bb-dropdown__section|bb-field__hint-text|bb-tooltip__content|bb-radio-group-item|bb-table-header-row|bb-table-sort__icon|bb-table-data__cell|bb-listbox--no-data|bb-listbox__no-data|bb-tag__text-input|bb-button__content|bb-table-data__row|bb-offcanvas__body|bb-calendar__month|bb-dialog--stacked|bb-badge__content|bb-calendar__date|item__description|bb-rating__option|bb-badge--focused|bb-button--active|bb-chipsbox-item|bb-commabox-item|bb-table-caption|bb-tabs__trigger|bb-toast-message|bb-select__chip|bb-table-header|bb-dialog__body|bb-tree__node|bb-tabs-panes|bb-tabs__pane|item__text)(?![\w]|-(?!-))'
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
<!-- /generated:find -->
|
|
@@ -98,7 +98,7 @@ List the nested selectors that may spell an old name:
|
|
|
98
98
|
|
|
99
99
|
```sh
|
|
100
100
|
rg -nP --glob '*.{css,scss,sass,less,styl,pcss,postcss,vue,svelte,astro}' --glob '!node_modules' --glob '!dist' \
|
|
101
|
-
'(?:&|#\{&\})(-picker-input-offcanvas|__option-description|__interactive-label|-popover-offcanvas|-palette-offcanvas|__items-container|-picker-offcanvas|-input-offcanvas|__dropdown-btn|__search-input|__search-clear|__page-chevron|-item--focused|__option-label|__clear-button|__description|__trigger-btn|-column-ghost|__header-cell|__date-button|__date-append|-description|__comma-item|__text-input|-group-item|__indicator|__hint-text|-header-row|-offcanvas|-container|__main-btn|__controls|__no-data|__readout|-selector|__content|__actions|__popover|--focused|__tablist|--stacked|__nav-btn|--no-data|__trigger|-popover|-chevron|-message|-palette|-focused|__header|-no-data|-stacked|__option|--active|-caption|-button|__label|__field|-append|__title|__close|-picker|__inner|__month|-active|-header|-field|-input|-clear|-label|__icon|-ghost|-group|__text|__cell|__body|__date|__chip|__node|-panes|__pane|-item|-data|-cell|__btn|-list|__row|-text|-sort|-btn|-row)(?=[\s,{:.>+~\[)]|__|--|$)'
|
|
101
|
+
'(?:&|#\{&\})(-picker-input-offcanvas|__option-description|__interactive-label|-popover-offcanvas|-palette-offcanvas|__items-container|-picker-offcanvas|-input-offcanvas|__section-title|__dropdown-btn|__search-input|__search-clear|__page-chevron|-item--focused|__option-label|__clear-button|__description|__trigger-btn|-column-ghost|__header-cell|__date-button|__date-append|__group-title|-description|__comma-item|__text-input|-group-item|__indicator|__hint-text|-header-row|-offcanvas|-container|__main-btn|__controls|__no-data|__readout|-selector|__content|__actions|__popover|--focused|__tablist|--stacked|__nav-btn|__section|--no-data|__trigger|-popover|-chevron|-message|-palette|-focused|__header|-no-data|-stacked|__option|--active|-caption|-button|__label|__field|-append|__title|__close|-picker|__inner|__month|-active|-header|-field|-input|-clear|-label|__icon|-ghost|-group|-title|__text|__cell|__body|__date|__chip|__node|-panes|__pane|-item|-data|-cell|__btn|-list|__row|-text|-sort|-btn|-row)(?=[\s,{:.>+~\[)]|__|--|$)'
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
<!-- /generated:nested -->
|
|
@@ -260,6 +260,9 @@ const MAP = {
|
|
|
260
260
|
'bb-table-no-data__text': 'bb-table-empty__text',
|
|
261
261
|
'bb-dialog--stacked': 'bb-dialog--above',
|
|
262
262
|
'bb-offcanvas--stacked': 'bb-offcanvas--above',
|
|
263
|
+
'bb-dropdown__group-title': 'bb-dropdown__group-label',
|
|
264
|
+
'bb-dropdown__section-title': 'bb-dropdown__group-header',
|
|
265
|
+
'bb-dropdown__section': 'bb-dropdown__group-section',
|
|
263
266
|
};
|
|
264
267
|
|
|
265
268
|
/**
|
|
@@ -282,6 +285,12 @@ const MANUAL = {
|
|
|
282
285
|
'bb-dropdown__item-text — only inside a .bb-dropdown / .bb-dropdown-button selector (the name has no bb- prefix: yours stay)',
|
|
283
286
|
item__description:
|
|
284
287
|
'bb-dropdown__item-description — only inside a .bb-dropdown / .bb-dropdown-button selector (the name has no bb- prefix: yours stay)',
|
|
288
|
+
'group-title__content':
|
|
289
|
+
'group-label__content — only inside a .bb-dropdown / .bb-dropdown-button selector (the name has no bb- prefix: yours stay)',
|
|
290
|
+
'group-title__prepend-icon':
|
|
291
|
+
'group-label__prepend-icon — only inside a .bb-dropdown / .bb-dropdown-button selector (the name has no bb- prefix: yours stay)',
|
|
292
|
+
'group-title__append-icon':
|
|
293
|
+
'group-label__append-icon — only inside a .bb-dropdown / .bb-dropdown-button selector (the name has no bb- prefix: yours stay)',
|
|
285
294
|
};
|
|
286
295
|
|
|
287
296
|
const USAGE =
|
|
@@ -765,5 +774,11 @@ consistent.
|
|
|
765
774
|
| `.bb-checkbox-group__no-data` | `.bb-checkbox-group__empty` | `empty` | |
|
|
766
775
|
| `.bb-radio-group__no-data` | `.bb-radio-group__empty` | `empty` | |
|
|
767
776
|
| `.bb-switch-group__no-data` | `.bb-switch-group__empty` | `empty` | |
|
|
777
|
+
| `.bb-dropdown__group-title` | `.bb-dropdown__group-label` | `groupLabel` | |
|
|
778
|
+
| `.group-title__content` | `.group-label__content` | _internal_ | |
|
|
779
|
+
| `.group-title__prepend-icon` | `.group-label__prepend-icon` | _internal_ | |
|
|
780
|
+
| `.group-title__append-icon` | `.group-label__append-icon` | _internal_ | |
|
|
781
|
+
| `.bb-dropdown__section-title` | `.bb-dropdown__group-header` | `groupHeader` | A `groupBy` heading. It no longer carries `.bb-dropdown__group-title` (a group's own label row, now `__group-label`): the two share rules, not a class. Its content span is `.group-header__content`. |
|
|
782
|
+
| `.bb-dropdown__section` | `.bb-dropdown__group-section` | _internal_ | |
|
|
768
783
|
|
|
769
784
|
<!-- /generated:renames -->
|