@kerfjs/ui 5.0.0-beta.46 → 5.0.0-beta.47

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.
@@ -97,6 +97,11 @@ tiers:
97
97
  complete surface and the inset within it. Accordion applies the outer margin
98
98
  once to the group rather than separating connected items; Card's header,
99
99
  body, and footer all receive the full inset.
100
+ - `appearance="sunken"` is a Kerf theme extension for Accordion, Card, and
101
+ Details. It removes raised chrome, paints the lowered semantic surface, and
102
+ uses the shared rounded-rectangle radius. Override
103
+ `--kui-wa-sunken-background` or `--kui-wa-sunken-radius` on an instance or
104
+ containing scope when that surface needs different tokens.
100
105
  - `--kui-wa-container-inset` defaults to the 16px homogeneous-group step. Tab
101
106
  Panel retains this roomier tier for unframed panel content. Dialog body uses
102
107
  the 8px surface inset, while its footer uses the 16px container inset so
@@ -111,9 +116,19 @@ parts, which CSS shadow parts do not support.
111
116
 
112
117
  Badge remains intentionally compact at Web Awesome's intrinsic `0.375em` block /
113
118
  `0.625em` inline padding (4.5px / 7.5px at its default 12px text size): it is a
114
- short status or count, not a content item. Breadcrumb has no bordered or filled
115
- container, and Scroller delegates item chrome to its slotted children, so both
116
- retain their upstream geometry. Web Awesome 3.12's free catalog has
119
+ short status or count, not a content item. A badge with `appearance="filled"` or
120
+ `appearance="filled-outlined"` uses its variant's quiet fill with normal text by
121
+ default so every shipped semantic variant meets WCAG AA for that small text;
122
+ filled-outlined keeps its normal variant border. Accent badges keep their loud
123
+ fills, with brand, success, and danger using a dark foreground that clears AA in
124
+ both themes (neutral and warning retain their already-safe variant foregrounds).
125
+ Override
126
+ `--kui-wa-badge-filled-background` and `--kui-wa-badge-filled-foreground` on a
127
+ badge or containing scope when a product needs a different contrast-safe pair,
128
+ or `--kui-wa-badge-accent-foreground` for a reviewed accent foreground.
129
+ Breadcrumb has no bordered or filled container, and Scroller delegates item chrome
130
+ to its slotted children, so both retain their upstream geometry. Web Awesome
131
+ 3.12's free catalog has
117
132
  `wa-dropdown-item`, but no `wa-menu-item`; the theme therefore styles the
118
133
  supported dropdown item rather than carrying a dead selector.
119
134
 
@@ -174,8 +189,9 @@ generic Kerf wrappers around them. Their variants and appearances already read
174
189
  the semantic palette above, and importing their component modules remains
175
190
  independent and tree-shakeable.
176
191
 
177
- - Use `wa-badge pill` for compact status, count, or activity labels. Hot Sheet
178
- 2's pill-shaped ticket status treatment is the reference shape.
192
+ - Use `wa-badge pill appearance="filled"` for compact status, count, or activity
193
+ labels. Hot Sheet 2's quiet, contrast-safe pill-shaped ticket status treatment
194
+ is the reference shape.
179
195
  - Use the default, non-pill `wa-tag` for categories, filters, and removable
180
196
  selections. Its medium-radius rounded rectangle keeps tags distinct from
181
197
  status badges. Handle the bubbling `wa-remove` event in the feature that owns
package/llms.txt CHANGED
@@ -115,6 +115,11 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
115
115
  the surface (8px) and container (16px) tiers respectively, independent of the
116
116
  dialog's shared `--spacing`. Override the tier at the narrowest useful scope
117
117
  instead of restyling individual shadow parts.
118
+ Filled badges use each semantic variant's quiet fill with normal text for
119
+ WCAG-AA compact-copy contrast. Override
120
+ `--kui-wa-badge-filled-background` and
121
+ `--kui-wa-badge-filled-foreground` as a contrast-safe pair instead of adding
122
+ host selectors.
118
123
  When a dialog provides another dismissal affordance, add `hide-actions` to
119
124
  the `wa-dialog` host; the theme hides its directly exported `header-actions`
120
125
  part without an unsupported chained `::part()` selector.
@@ -160,9 +165,11 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
160
165
  toolbar.
161
166
  - **Use `Text` for ordinary semantic headings and paragraphs outside toolbar
162
167
  title zones.** Omit `variant` for the default `p`, or pass `h1`–`h6` based on
163
- the document outline. It passes native attributes through and owns the standard
164
- transparent border plus item padding; keep toolbar titles on `ToolbarText` and
165
- list-aligned bare prose on `ListInsetText`.
168
+ the document outline. Independently compose `tone="quiet|danger"`,
169
+ `size="compact"`, and `font="monospace"` for supporting, error, compact, and
170
+ code roles instead of global utility classes. It passes native attributes
171
+ through and owns the standard transparent border plus item padding; keep
172
+ toolbar titles on `ToolbarText` and list-aligned bare prose on `ListInsetText`.
166
173
  - **Space by the five-step scale, by relationship not by eye.** `0`
167
174
  `--kui-space-none`, `4px` `--kui-space-2xs`, `8px` `--kui-space-xs` (inside a
168
175
  group), `16px` `--kui-space-m`, `24px` `--kui-space-l` (between major differing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerfjs/ui",
3
- "version": "5.0.0-beta.46",
3
+ "version": "5.0.0-beta.47",
4
4
  "description": "Accessible, composable UI primitives for kerf applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,17 +0,0 @@
1
- import { jsx } from 'kerfjs/jsx-runtime';
2
-
3
- // src/text.tsx
4
- function Text({
5
- variant: Variant = "p",
6
- children,
7
- class: classValue = "",
8
- className = "",
9
- ...attributes
10
- }) {
11
- const classes = `kui-text ${classValue} ${className}`.trim();
12
- return /* @__PURE__ */ jsx(Variant, { ...attributes, class: classes, "data-component": "text", children });
13
- }
14
-
15
- export { Text };
16
-
17
- //# sourceMappingURL=chunk-QM4GQ7W3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/text.tsx"],"names":[],"mappings":";;;AAwBO,SAAS,IAAA,CAAK;AAAA,EACnB,SAAS,OAAA,GAAU,GAAA;AAAA,EACnB,QAAA;AAAA,EACA,OAAO,UAAA,GAAa,EAAA;AAAA,EACpB,SAAA,GAAY,EAAA;AAAA,EACZ,GAAG;AACL,CAAA,EAAc;AACZ,EAAA,MAAM,UAAU,CAAA,SAAA,EAAY,UAAU,CAAA,CAAA,EAAI,SAAS,GAAG,IAAA,EAAK;AAC3D,EAAA,uBACE,GAAA,CAAC,WAAS,GAAG,UAAA,EAAY,OAAO,OAAA,EAAS,gBAAA,EAAe,QACrD,QAAA,EACH,CAAA;AAEJ","file":"chunk-QM4GQ7W3.js","sourcesContent":["import type { KerfBaseAttrs } from 'kerfjs/jsx-runtime';\n\nimport type { KerfUiContent } from './semantic-content.js';\n\nexport type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';\n\nexport type TextContent =\n KerfUiContent | string | number | readonly TextContent[];\n\nexport type TextProps = Omit<\n KerfBaseAttrs,\n 'children' | 'class' | 'className'\n> & {\n /** Native heading or paragraph element to render. Defaults to `p`. */\n variant?: TextVariant;\n children: TextContent;\n class?: string;\n className?: string;\n};\n\n/**\n * Semantic heading or paragraph text with the standard content-item padding.\n * All ordinary native heading/paragraph attributes pass through to the element.\n */\nexport function Text({\n variant: Variant = 'p',\n children,\n class: classValue = '',\n className = '',\n ...attributes\n}: TextProps) {\n const classes = `kui-text ${classValue} ${className}`.trim();\n return (\n <Variant {...attributes} class={classes} data-component=\"text\">\n {children}\n </Variant>\n );\n}\n"]}