use-wc 1.0.0-pre.94 → 1.0.0-pre.95

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.
@@ -4533,7 +4533,7 @@
4533
4533
  "declarations": [
4534
4534
  {
4535
4535
  "kind": "class",
4536
- "description": "`use-pattern` arranges a region-based unit of content — a card, a row in a list, a chat\nmessage, a media object — styled entirely by the design system's theme layer\n(`theme/pattern.css`) rather than by any shadow DOM here. It renders its light-DOM children\nexactly as given.\n\nIts variant classes (`card`, `entry`, `message`, `media`) and their modifiers (`.divided`,\n`.compact`, `.outlined`, `.flush`) are plain classes rather than properties, the same as any\nother themed class in this system, like `use-avatar`'s `.circle`/`.square`. For generic flex\narrangement, or a page frame, use `use-layout`, which nests freely inside a pattern's regions.\n\n```html\n<use-pattern class=\"card\">\n <header>\n <hgroup><h3>Title</h3><p>Subtitle</p></hgroup>\n </header>\n <main><p>Body</p></main>\n <footer><button type=\"button\">Done</button></footer>\n</use-pattern>\n```",
4536
+ "description": "`use-pattern` arranges a region-based unit of content — a card, a row in a list, a chat\nmessage, a media object — styled entirely by the design system's theme layer\n(`theme/pattern.css`) rather than by any shadow DOM here. It renders its light-DOM children\nexactly as given.\n\nIts variant classes (`card`, `entry`, `message`, `media`) and their modifiers (`.divided`,\n`.compact`, `.elevated`, `.flush`) are plain classes rather than properties, the same as any\nother themed class in this system, like `use-avatar`'s `.circle`/`.square`. For generic flex\narrangement, or a page frame, use `use-layout`, which nests freely inside a pattern's regions.\n\n```html\n<use-pattern class=\"card\">\n <header>\n <hgroup><h3>Title</h3><p>Subtitle</p></hgroup>\n </header>\n <main><p>Body</p></main>\n <footer><button type=\"button\">Done</button></footer>\n</use-pattern>\n```",
4537
4537
  "name": "UsePattern",
4538
4538
  "slots": [
4539
4539
  {
@@ -3971,8 +3971,8 @@
3971
3971
 
3972
3972
  /* Card chrome — the one bit of floating surface treatment that isn't layout, and the only
3973
3973
  thing separating `.card` from the other three variants: they arrange regions, this also
3974
- paints a raised panel. `.outlined` keeps the border but drops the shadow, for a flatter
3975
- card.
3974
+ paints a panel. It's flat by default; `.elevated` lifts it with a shadow, for a card that
3975
+ floats above the content around it.
3976
3976
 
3977
3977
  A card nested directly in a `dialog` or `[popover]` skips the chrome: the overlay already
3978
3978
  paints a surface, and stacking a second border and shadow inside it reads as a panel within
@@ -3984,12 +3984,11 @@
3984
3984
  background: var(--usewc-color-surface-background);
3985
3985
  border: var(--usewc-layout-surface-border) solid var(--usewc-color-surface-border);
3986
3986
  border-radius: var(--usewc-effect-surface-border-radius);
3987
- box-shadow: var(--usewc-effect-surface-shadow);
3988
3987
  color: var(--usewc-color-document-text);
3989
3988
  }
3990
3989
 
3991
- use-pattern.card.outlined:not(:is(dialog, [popover]) > *) {
3992
- box-shadow: none;
3990
+ use-pattern.card.elevated:not(:is(dialog, [popover]) > *) {
3991
+ box-shadow: var(--usewc-effect-surface-shadow);
3993
3992
  }
3994
3993
  }
3995
3994
 
@@ -6,7 +6,7 @@ message, a media object — styled entirely by the design system's theme layer
6
6
  exactly as given.
7
7
 
8
8
  Its variant classes (`card`, `entry`, `message`, `media`) and their modifiers (`.divided`,
9
- `.compact`, `.outlined`, `.flush`) are plain classes rather than properties, the same as any
9
+ `.compact`, `.elevated`, `.flush`) are plain classes rather than properties, the same as any
10
10
  other themed class in this system, like `use-avatar`'s `.circle`/`.square`. For generic flex
11
11
  arrangement, or a page frame, use `use-layout`, which nests freely inside a pattern's regions.
12
12
 
package/dist/tokens.css CHANGED
@@ -83,6 +83,7 @@
83
83
  --usewc-color-graphite-900: oklch(0.25 0.005 264);
84
84
  --usewc-color-graphite-850: oklch(0.285 0.005 264);
85
85
  --usewc-color-graphite-800: oklch(0.31 0.005 264);
86
+ --usewc-color-graphite-750: oklch(0.35 0.005 264);
86
87
  --usewc-color-graphite-700: oklch(0.39 0.005 264);
87
88
  --usewc-color-graphite-600: oklch(0.465 0.005 264);
88
89
  --usewc-color-graphite-550: oklch(0.505 0.005 264);
@@ -90,6 +91,7 @@
90
91
  --usewc-color-graphite-400: oklch(0.725 0.004 264);
91
92
  --usewc-color-graphite-200: oklch(0.885 0.003 264);
92
93
  --usewc-color-graphite-100: oklch(0.95 0.002 264);
94
+ --usewc-color-graphite-50: oklch(0.985 0.002 264);
93
95
  --usewc-color-blue-900: oklch(0.3 0.115 258);
94
96
  --usewc-color-blue-800: oklch(0.395 0.15 258);
95
97
  --usewc-color-blue-700: oklch(0.478 0.18 258);
@@ -359,7 +361,7 @@
359
361
  /* Button */
360
362
  /* - Color */
361
363
  /* -- Base color: fills, everything else derives from the fill below */
362
- --usewc-color-button-base-background-static: var(--usewc-color-white);
364
+ --usewc-color-button-base-background-static: var(--usewc-color-graphite-50);
363
365
  --usewc-color-button-base-background-static-auxiliary: transparent;
364
366
  --usewc-color-button-primary-background-static: var(--usewc-color-brand-primary);
365
367
  --usewc-color-button-primary-background-static-auxiliary: transparent;
@@ -648,7 +650,7 @@
648
650
 
649
651
  /* Grid — `.table` is the default treatment a bare `use-grid` gets; `.chips` and `.list`
650
652
  (the latter still being defined) opt into their own layouts instead. */
651
- --usewc-color-grid-border: var(--usewc-color-button-base-border-static);
653
+ --usewc-color-grid-border: var(--usewc-color-surface-border);
652
654
  /* The table itself and its header paint no fill — only the hover and selected row bands do. */
653
655
  --usewc-color-grid-background: transparent;
654
656
  --usewc-color-grid-header-background: transparent;
@@ -748,7 +750,7 @@
748
750
  --usewc-layout-popover-menu-border: var(--usewc-space-1-relative);
749
751
  --usewc-effect-popover-menu-border-style: var(--usewc-effect-border-solid);
750
752
  --usewc-color-popover-menu-background: var(--usewc-color-canvas-background);
751
- --usewc-color-popover-menu-border: var(--usewc-color-button-base-border-static);
753
+ --usewc-color-popover-menu-border: var(--usewc-color-surface-border);
752
754
  --usewc-effect-popover-menu-border-radius: var(--usewc-effect-border-radius-8);
753
755
  --usewc-effect-popover-menu-shadow: var(--usewc-effect-surface-shadow);
754
756
  --usewc-font-popover-menu-header-size: var(--usewc-font-size-14);
@@ -907,7 +909,7 @@
907
909
  `dialog`/`[popover]` keeps from the viewport edge when sizing itself, not region padding —
908
910
  the regions inside one come from whichever `use-pattern` variant is nested there. */
909
911
  --usewc-color-surface-background: var(--usewc-color-canvas-background);
910
- --usewc-color-surface-border: var(--usewc-color-button-base-border-static);
912
+ --usewc-color-surface-border: var(--usewc-color-gray-200);
911
913
  --usewc-color-surface-backdrop: oklch(0% 0 0 / 0.4);
912
914
  --usewc-layout-surface-anchor-offset: var(--usewc-space-4);
913
915
  --usewc-layout-surface-border: var(--usewc-space-1);
@@ -937,8 +939,11 @@
937
939
  --usewc-color-form-helper-text-invalid: var(--usewc-color-red-400);
938
940
  /* A dark control is lighter than what surrounds it, so interaction has to
939
941
  move lightness the opposite way, and its border has to run lighter
940
- than its own face rather than darker. */
941
- --usewc-color-button-base-background-static: var(--usewc-color-graphite-800);
942
+ than its own face rather than darker. It also sits a full step above
943
+ the card surface, since dark shadows barely read and the fill alone has
944
+ to separate the two. */
945
+ --usewc-color-button-base-background-static: var(--usewc-color-graphite-750);
946
+ --usewc-color-surface-border: var(--usewc-color-graphite-700);
942
947
  --usewc-effect-button-base-shift: 1;
943
948
  --usewc-effect-button-base-border-direction: 1;
944
949
  --usewc-effect-button-base-border-step: 0.085;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-wc",
3
- "version": "1.0.0-pre.94",
3
+ "version": "1.0.0-pre.95",
4
4
  "private": false,
5
5
  "homepage": "https://usewc.com",
6
6
  "bugs": "https://github.com/dang-rabbits/use-wc/issues",
@@ -479,7 +479,7 @@
479
479
  },
480
480
  {
481
481
  "name": "use-pattern",
482
- "description": "`use-pattern` arranges a region-based unit of content — a card, a row in a list, a chat\nmessage, a media object — styled entirely by the design system's theme layer\n(`theme/pattern.css`) rather than by any shadow DOM here. It renders its light-DOM children\nexactly as given.\n\nIts variant classes (`card`, `entry`, `message`, `media`) and their modifiers (`.divided`,\n`.compact`, `.outlined`, `.flush`) are plain classes rather than properties, the same as any\nother themed class in this system, like `use-avatar`'s `.circle`/`.square`. For generic flex\narrangement, or a page frame, use `use-layout`, which nests freely inside a pattern's regions.\n\n```html\n<use-pattern class=\"card\">\n <header>\n <hgroup><h3>Title</h3><p>Subtitle</p></hgroup>\n </header>\n <main><p>Body</p></main>\n <footer><button type=\"button\">Done</button></footer>\n</use-pattern>\n```\n---\n\n\n### **Slots:**\n - _default_ - The pattern's regions — `figure`, `header`, `main`, `footer`, or any other element.",
482
+ "description": "`use-pattern` arranges a region-based unit of content — a card, a row in a list, a chat\nmessage, a media object — styled entirely by the design system's theme layer\n(`theme/pattern.css`) rather than by any shadow DOM here. It renders its light-DOM children\nexactly as given.\n\nIts variant classes (`card`, `entry`, `message`, `media`) and their modifiers (`.divided`,\n`.compact`, `.elevated`, `.flush`) are plain classes rather than properties, the same as any\nother themed class in this system, like `use-avatar`'s `.circle`/`.square`. For generic flex\narrangement, or a page frame, use `use-layout`, which nests freely inside a pattern's regions.\n\n```html\n<use-pattern class=\"card\">\n <header>\n <hgroup><h3>Title</h3><p>Subtitle</p></hgroup>\n </header>\n <main><p>Body</p></main>\n <footer><button type=\"button\">Done</button></footer>\n</use-pattern>\n```\n---\n\n\n### **Slots:**\n - _default_ - The pattern's regions — `figure`, `header`, `main`, `footer`, or any other element.",
483
483
  "attributes": [],
484
484
  "references": []
485
485
  },