@urbicon-ui/design-content 6.1.8 → 6.2.0
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.
|
@@ -570,8 +570,8 @@ Then use across the project:
|
|
|
570
570
|
|
|
571
571
|
When defining a preset, specify **all interactive states explicitly** (`hover:`, `active:`,
|
|
572
572
|
and `focus-visible:` where applicable). The preset's `slotClasses.base` is merged *after*
|
|
573
|
-
the `tv()` defaults, so conflicting Tailwind utilities are resolved by
|
|
574
|
-
(last
|
|
573
|
+
the `tv()` defaults, so conflicting Tailwind utilities are resolved by the built-in bucket
|
|
574
|
+
conflict resolver (last source wins) — no `!` needed.
|
|
575
575
|
|
|
576
576
|
An unknown preset name emits a dev-only console warning, so typos are discoverable.
|
|
577
577
|
|
|
@@ -592,16 +592,31 @@ apply to *every* instance of a component — e.g. "all Buttons should be rounded
|
|
|
592
592
|
</BlocksProvider>
|
|
593
593
|
```
|
|
594
594
|
|
|
595
|
-
`defaults` vs. `presets` — when to use which:
|
|
596
|
-
- **`defaults`**: blanket project style applied to every instance (no opt-in required)
|
|
595
|
+
`defaults` vs. `presets` vs. `overrides` — when to use which:
|
|
596
|
+
- **`defaults.slotClasses`**: blanket project style applied to every instance (no opt-in required)
|
|
597
597
|
- **`presets`**: named alternative look, opt-in via `preset="…"` prop at the call site
|
|
598
|
+
- **`defaults.overrides` / `presets[…].overrides`**: prop-conditional rules targeting only a specific
|
|
599
|
+
variant/intent/state (e.g. only `variant="outlined"`) — what unconditional `slotClasses` cannot express
|
|
598
600
|
|
|
599
|
-
|
|
601
|
+
```svelte
|
|
602
|
+
<!-- Only outlined badges get a 1px border; the conflict resolver strips the variant's border-2. -->
|
|
603
|
+
<BlocksProvider defaults={{ Badge: { overrides: [{ variant: 'outlined', class: { base: 'border' } }] } }}>
|
|
604
|
+
<slot />
|
|
605
|
+
</BlocksProvider>
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
Each `overrides` entry is a `compoundVariant`-shaped matcher (`string` = equals, `string[]` = one-of →
|
|
609
|
+
per-slot `class`); it matches active prop *values*, so it works regardless of whether the library
|
|
610
|
+
defines the conflicting class in a `variant` or a `compoundVariant`.
|
|
611
|
+
|
|
612
|
+
Merge priority (lowest → highest), conflict-resolved per Tailwind bucket (a later source wins):
|
|
600
613
|
1. `tv()` variant styles (library default)
|
|
601
|
-
2. `
|
|
602
|
-
3. `
|
|
603
|
-
4.
|
|
604
|
-
5.
|
|
614
|
+
2. `defaults.slotClasses` (global baseline)
|
|
615
|
+
3. `defaults.overrides[match]` (prop-conditional)
|
|
616
|
+
4. `presets[Component][name].slotClasses` (when `preset` prop is set)
|
|
617
|
+
5. `presets[Component][name].overrides[match]`
|
|
618
|
+
6. Instance `slotClasses` prop
|
|
619
|
+
7. Instance `class` prop
|
|
605
620
|
|
|
606
621
|
### Level 4: Global Unstyled Mode
|
|
607
622
|
|
package/content/meta.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@urbicon-ui/design-content",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Version-pinned bundle of Urbicon UI design knowledge — component catalog, per-component llm.txt, design-system principles + patterns, guide template and icon metadata — plus a package-relative locator. Consumed by the remote MCP server and the urbicon CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|