@newtone-dev/ui-react-web 0.22.0 → 0.23.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.
- package/dist/avatar/avatar.css +11 -2
- package/dist/avatar/avatar.d.ts +34 -12
- package/dist/avatar/avatar.d.ts.map +1 -1
- package/dist/avatar/avatar.js +39 -15
- package/dist/avatar/avatar.js.map +1 -1
- package/dist/framed-icon/framed-icon.css +61 -0
- package/dist/framed-icon/framed-icon.d.ts +11 -1
- package/dist/framed-icon/framed-icon.d.ts.map +1 -1
- package/dist/framed-icon/framed-icon.js +2 -2
- package/dist/framed-icon/framed-icon.js.map +1 -1
- package/dist/framed-icon/index.d.ts +1 -1
- package/dist/framed-icon/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/avatar/avatar.css
CHANGED
|
@@ -34,8 +34,17 @@
|
|
|
34
34
|
a presentational hint, so this is what makes the circle the caller was promised.
|
|
35
35
|
adenario_website measured 108x256, 56x128 and 240x480 on 2026-09-15. */
|
|
36
36
|
block-size: auto;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
|
|
38
|
+
/* THE SHAPE AND THE CORNER ARE PROPS TOO, from `ratio` and `radius`: a cut-out portrait on this
|
|
39
|
+
plate is this component in every shape, not only in a circle. `1` and `50%` are the circle,
|
|
40
|
+
which is what every call site before them rendered and still renders.
|
|
41
|
+
|
|
42
|
+
A RATIO WITH NO RADIUS IS SQUARE, AND avatar.tsx IS WHERE THAT IS DECIDED: `50%` on a 2:3 box
|
|
43
|
+
is an ellipse, a fallback cannot tell a rectangle from a circle, so the component writes `0`
|
|
44
|
+
when it is handed a shape and not a corner. The `50%` here is reached only by something already
|
|
45
|
+
square. components/avatar.md, *`ratio` and `radius`*. */
|
|
46
|
+
aspect-ratio: var(--newtone-avatar-ratio, 1);
|
|
47
|
+
border-radius: var(--newtone-avatar-radius, 50%);
|
|
39
48
|
/* TWO TOKENS AND THE GRADIENT IS DRAWN HERE, from 2026-10-01. A themed colour is one step, so a
|
|
40
49
|
gradient cannot be one token: the ends are `avatar.gradient-{start,end}.fill`. Top to bottom
|
|
41
50
|
is 180deg; Joshua asked for it turned 30 degrees counterclockwise, and CSS counts clockwise,
|
package/dist/avatar/avatar.d.ts
CHANGED
|
@@ -25,30 +25,52 @@ export interface AvatarProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, '
|
|
|
25
25
|
* avatar.md.
|
|
26
26
|
*/
|
|
27
27
|
hoverSrc?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The shape -- any CSS `aspect-ratio`, `1` when omitted, which with the default corner is the
|
|
30
|
+
* circle. A cut-out portrait on this plate is this component in every shape; the plate is what it
|
|
31
|
+
* is for, and the plate does not care what outline was cut around it. A string, like `size`, so a
|
|
32
|
+
* site's own `var()` survives. Since 2026-10-02, issue 329; avatar.md.
|
|
33
|
+
*/
|
|
34
|
+
ratio?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The corner -- any CSS `border-radius`, `50%` for a circle and **`0` as soon as a `ratio`
|
|
37
|
+
* arrives**, because `50%` on a 2:3 box is an ellipse and no fallback can tell the two apart. It
|
|
38
|
+
* is not a token: the core scale is 4 and 8, and the one caller that asked for this wants 24, so a
|
|
39
|
+
* default off the scale would be a corner nobody asked for. Since 2026-10-02, issue 329;
|
|
40
|
+
* avatar.md.
|
|
41
|
+
*/
|
|
42
|
+
radius?: string;
|
|
28
43
|
}
|
|
29
44
|
/**
|
|
30
|
-
* A person, in a circle
|
|
45
|
+
* A person, on a plate -- in a circle unless a `ratio` says otherwise.
|
|
31
46
|
*
|
|
32
47
|
* **The plate is the point and it is why this is not an `<img>` with a class.** A portrait is
|
|
33
|
-
* usually a photograph with a transparent or near-white edge, and a
|
|
34
|
-
* nothing unless something is behind it.
|
|
35
|
-
*
|
|
36
|
-
* without the caller naming a second colour. That is exactly what
|
|
37
|
-
* the consuming site were doing by hand and what none of them did for
|
|
48
|
+
* usually a photograph with a transparent or near-white edge, and a shape cut out of one sits on
|
|
49
|
+
* nothing unless something is behind it. The plate is `avatar.gradient-start.fill` and
|
|
50
|
+
* `avatar.gradient-end.fill` -- two theme maps, so it resolves per theme, per mode and per elevation
|
|
51
|
+
* -- so it follows the page into dark without the caller naming a second colour. That is exactly what
|
|
52
|
+
* three hand-written copies in the consuming site were doing by hand and what none of them did for
|
|
53
|
+
* dark. (It was one `avatar.fill` until 2026-10-01, when the ground became a gradient Joshua can tune
|
|
54
|
+
* in the studio; a themed colour is one step, so a gradient cannot be one token.)
|
|
55
|
+
*
|
|
56
|
+
* **BECAUSE THE PLATE IS THE POINT, THE SHAPE IS A KNOB AND NOT A PREMISE.** `ratio` and `radius`,
|
|
57
|
+
* from 2026-10-02: a cut-out portrait on this ground is this component in every shape, and a consumer
|
|
58
|
+
* whose rectangle re-drew the gradient by hand is why -- issue 329. Both default to the circle.
|
|
38
59
|
*
|
|
39
60
|
* ---- the size is the caller's, and that was settled by the third call site ----
|
|
40
61
|
*
|
|
41
|
-
*
|
|
62
|
+
* **`size` is a prop from 2026-09-26, and the first draft's version of it was a ladder.** It offered
|
|
63
|
+
* `sm` / `md` / `lg` at 3.5rem,
|
|
42
64
|
* 7rem and 15rem, sized from two of the three call sites this arrived from. The third is
|
|
43
65
|
* `clamp(5rem, 28%, 7rem)` -- a portrait that gives way as its card narrows -- and it is not a rung
|
|
44
66
|
* on any ladder those two could have implied. **A ladder proposed at two would have been wrong about
|
|
45
67
|
* its own shape**, which is exactly what governance/code/propose-the-system-at-the-third-repetition.md
|
|
46
68
|
* says the third occurrence is for.
|
|
47
69
|
*
|
|
48
|
-
* So the
|
|
49
|
-
*
|
|
50
|
-
* use
|
|
51
|
-
*
|
|
70
|
+
* So the measure is `--newtone-avatar-size`, read with a 7rem default and written inline from the
|
|
71
|
+
* prop. **That is `--newtone-card-grid-min`'s shape**, and `ratio` and `radius` are its second and
|
|
72
|
+
* third use on this component: a CSS string, so a `clamp()`, a `calc()` or a site's own `var()`
|
|
73
|
+
* survives the move, and every call site keeps its own exact value.
|
|
52
74
|
*
|
|
53
75
|
* **What it deliberately does not have is a corner marker.** A consuming site's own portrait component
|
|
54
76
|
* puts a country flag on one, hardcoding a path into that app's public folder, and that is the
|
|
@@ -56,5 +78,5 @@ export interface AvatarProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, '
|
|
|
56
78
|
* Nothing here has a slot for one. The day a second site wants a marker, what crosses is the slot,
|
|
57
79
|
* not the flag.
|
|
58
80
|
*/
|
|
59
|
-
export declare function Avatar({ src, alt, size, hoverSrc, className, style, ...rest }: AvatarProps): import("react").JSX.Element;
|
|
81
|
+
export declare function Avatar({ src, alt, size, hoverSrc, ratio, radius, className, style, ...rest }: AvatarProps): import("react").JSX.Element;
|
|
60
82
|
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE7D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;IACjF;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE7D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;IACjF;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,MAAM,CAAC,EACnB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACV,EAAE,WAAW,+BAiFb"}
|
package/dist/avatar/avatar.js
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* A person, in a circle
|
|
3
|
+
* A person, on a plate -- in a circle unless a `ratio` says otherwise.
|
|
4
4
|
*
|
|
5
5
|
* **The plate is the point and it is why this is not an `<img>` with a class.** A portrait is
|
|
6
|
-
* usually a photograph with a transparent or near-white edge, and a
|
|
7
|
-
* nothing unless something is behind it.
|
|
8
|
-
*
|
|
9
|
-
* without the caller naming a second colour. That is exactly what
|
|
10
|
-
* the consuming site were doing by hand and what none of them did for
|
|
6
|
+
* usually a photograph with a transparent or near-white edge, and a shape cut out of one sits on
|
|
7
|
+
* nothing unless something is behind it. The plate is `avatar.gradient-start.fill` and
|
|
8
|
+
* `avatar.gradient-end.fill` -- two theme maps, so it resolves per theme, per mode and per elevation
|
|
9
|
+
* -- so it follows the page into dark without the caller naming a second colour. That is exactly what
|
|
10
|
+
* three hand-written copies in the consuming site were doing by hand and what none of them did for
|
|
11
|
+
* dark. (It was one `avatar.fill` until 2026-10-01, when the ground became a gradient Joshua can tune
|
|
12
|
+
* in the studio; a themed colour is one step, so a gradient cannot be one token.)
|
|
13
|
+
*
|
|
14
|
+
* **BECAUSE THE PLATE IS THE POINT, THE SHAPE IS A KNOB AND NOT A PREMISE.** `ratio` and `radius`,
|
|
15
|
+
* from 2026-10-02: a cut-out portrait on this ground is this component in every shape, and a consumer
|
|
16
|
+
* whose rectangle re-drew the gradient by hand is why -- issue 329. Both default to the circle.
|
|
11
17
|
*
|
|
12
18
|
* ---- the size is the caller's, and that was settled by the third call site ----
|
|
13
19
|
*
|
|
14
|
-
*
|
|
20
|
+
* **`size` is a prop from 2026-09-26, and the first draft's version of it was a ladder.** It offered
|
|
21
|
+
* `sm` / `md` / `lg` at 3.5rem,
|
|
15
22
|
* 7rem and 15rem, sized from two of the three call sites this arrived from. The third is
|
|
16
23
|
* `clamp(5rem, 28%, 7rem)` -- a portrait that gives way as its card narrows -- and it is not a rung
|
|
17
24
|
* on any ladder those two could have implied. **A ladder proposed at two would have been wrong about
|
|
18
25
|
* its own shape**, which is exactly what governance/code/propose-the-system-at-the-third-repetition.md
|
|
19
26
|
* says the third occurrence is for.
|
|
20
27
|
*
|
|
21
|
-
* So the
|
|
22
|
-
*
|
|
23
|
-
* use
|
|
24
|
-
*
|
|
28
|
+
* So the measure is `--newtone-avatar-size`, read with a 7rem default and written inline from the
|
|
29
|
+
* prop. **That is `--newtone-card-grid-min`'s shape**, and `ratio` and `radius` are its second and
|
|
30
|
+
* third use on this component: a CSS string, so a `clamp()`, a `calc()` or a site's own `var()`
|
|
31
|
+
* survives the move, and every call site keeps its own exact value.
|
|
25
32
|
*
|
|
26
33
|
* **What it deliberately does not have is a corner marker.** A consuming site's own portrait component
|
|
27
34
|
* puts a country flag on one, hardcoding a path into that app's public folder, and that is the
|
|
@@ -29,10 +36,27 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
29
36
|
* Nothing here has a slot for one. The day a second site wants a marker, what crosses is the slot,
|
|
30
37
|
* not the flag.
|
|
31
38
|
*/
|
|
32
|
-
export function Avatar({ src, alt, size, hoverSrc, className, style, ...rest }) {
|
|
33
|
-
// The
|
|
34
|
-
// consuming site declares no
|
|
35
|
-
|
|
39
|
+
export function Avatar({ src, alt, size, hoverSrc, ratio, radius, className, style, ...rest }) {
|
|
40
|
+
// The measure, the shape and the corner, each written here since 2026-09-26, 2026-10-02 and
|
|
41
|
+
// 2026-10-02 rather than declared by the caller's sheet: a consuming site declares no
|
|
42
|
+
// `--newtone-*` property (issue 201). Each is the property avatar.css already reads.
|
|
43
|
+
//
|
|
44
|
+
// A RATIO WITH NO RADIUS IS SQUARE, AND THIS LINE IS THE WHOLE OF THAT DECISION. `border-radius:
|
|
45
|
+
// 50%` on a 2:3 box is an ellipse; the sheet's fallback cannot tell a rectangle from a circle,
|
|
46
|
+
// because a custom property has no conditions. So a shape given without a corner gets `0`, and
|
|
47
|
+
// the sheet's `50%` is reached only by something that is already square. avatar.md, *`ratio` and
|
|
48
|
+
// `radius`*.
|
|
49
|
+
const corner = radius ?? (ratio === undefined ? undefined : '0');
|
|
50
|
+
const vars = {};
|
|
51
|
+
if (size !== undefined)
|
|
52
|
+
vars['--newtone-avatar-size'] = size;
|
|
53
|
+
if (ratio !== undefined)
|
|
54
|
+
vars['--newtone-avatar-ratio'] = ratio;
|
|
55
|
+
if (corner !== undefined)
|
|
56
|
+
vars['--newtone-avatar-radius'] = corner;
|
|
57
|
+
// OMITTING EVERY PROP WRITES NO `style` ATTRIBUTE AT ALL, which is what keeps a call site that
|
|
58
|
+
// has never heard of these props rendering the markup it rendered before.
|
|
59
|
+
const sized = Object.keys(vars).length === 0 ? style : { ...vars, ...style };
|
|
36
60
|
// NO PICTURE IS A SPAN AND NOT AN `<img>` WITHOUT A SOURCE: each engine draws a sourceless
|
|
37
61
|
// `<img>` its own way -- an empty box, a broken-image glyph, nothing -- and none of them is the
|
|
38
62
|
// plate. `alt` keeps its meaning: a name makes the span an image named by it, and `""` hides it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/avatar/avatar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/avatar/avatar.tsx"],"names":[],"mappings":";AA6CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,UAAU,MAAM,CAAC,EACnB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACG;IACV,4FAA4F;IAC5F,sFAAsF;IACtF,qFAAqF;IACrF,EAAE;IACF,iGAAiG;IACjG,+FAA+F;IAC/F,+FAA+F;IAC/F,iGAAiG;IACjG,aAAa;IACb,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IAChE,MAAM,IAAI,GAA2B,EAAE,CAAA;IACvC,IAAI,IAAI,KAAK,SAAS;QAAE,IAAI,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAA;IAC5D,IAAI,KAAK,KAAK,SAAS;QAAE,IAAI,CAAC,wBAAwB,CAAC,GAAG,KAAK,CAAA;IAC/D,IAAI,MAAM,KAAK,SAAS;QAAE,IAAI,CAAC,yBAAyB,CAAC,GAAG,MAAM,CAAA;IAElE,+FAA+F;IAC/F,0EAA0E;IAC1E,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAoB,CAAA;IAE/F,2FAA2F;IAC3F,gGAAgG;IAChG,iGAAiG;IACjG,+FAA+F;IAC/F,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACpB,OAAO,CACH,eACI,SAAS,EAAE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
@@ -75,3 +75,64 @@
|
|
|
75
75
|
height: 2.5rem;
|
|
76
76
|
border-radius: 50%;
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
/* THE SIGNAGE PALETTES, 2026-10-02. Set, `signage` paints from that palette's group in the
|
|
80
|
+
`signage` slice, in whatever theme the mark sits in; unset, the two lines above stand. The
|
|
81
|
+
glyph still inherits through `currentColor`. One rule per palette, because a component reads
|
|
82
|
+
only its own tokens and a palette name cannot be spliced into a property name in CSS. */
|
|
83
|
+
.newtone-framed-icon[data-newtone-signage='neutral'] {
|
|
84
|
+
background: var(--newtone-signage-neutral-fill);
|
|
85
|
+
color: var(--newtone-signage-neutral-text);
|
|
86
|
+
}
|
|
87
|
+
.newtone-framed-icon[data-newtone-signage='accent'] {
|
|
88
|
+
background: var(--newtone-signage-accent-fill);
|
|
89
|
+
color: var(--newtone-signage-accent-text);
|
|
90
|
+
}
|
|
91
|
+
.newtone-framed-icon[data-newtone-signage='support'] {
|
|
92
|
+
background: var(--newtone-signage-support-fill);
|
|
93
|
+
color: var(--newtone-signage-support-text);
|
|
94
|
+
}
|
|
95
|
+
.newtone-framed-icon[data-newtone-signage='success'] {
|
|
96
|
+
background: var(--newtone-signage-success-fill);
|
|
97
|
+
color: var(--newtone-signage-success-text);
|
|
98
|
+
}
|
|
99
|
+
.newtone-framed-icon[data-newtone-signage='warning'] {
|
|
100
|
+
background: var(--newtone-signage-warning-fill);
|
|
101
|
+
color: var(--newtone-signage-warning-text);
|
|
102
|
+
}
|
|
103
|
+
.newtone-framed-icon[data-newtone-signage='error'] {
|
|
104
|
+
background: var(--newtone-signage-error-fill);
|
|
105
|
+
color: var(--newtone-signage-error-text);
|
|
106
|
+
}
|
|
107
|
+
.newtone-framed-icon[data-newtone-signage='red'] {
|
|
108
|
+
background: var(--newtone-signage-red-fill);
|
|
109
|
+
color: var(--newtone-signage-red-text);
|
|
110
|
+
}
|
|
111
|
+
.newtone-framed-icon[data-newtone-signage='orange'] {
|
|
112
|
+
background: var(--newtone-signage-orange-fill);
|
|
113
|
+
color: var(--newtone-signage-orange-text);
|
|
114
|
+
}
|
|
115
|
+
.newtone-framed-icon[data-newtone-signage='yellow'] {
|
|
116
|
+
background: var(--newtone-signage-yellow-fill);
|
|
117
|
+
color: var(--newtone-signage-yellow-text);
|
|
118
|
+
}
|
|
119
|
+
.newtone-framed-icon[data-newtone-signage='green'] {
|
|
120
|
+
background: var(--newtone-signage-green-fill);
|
|
121
|
+
color: var(--newtone-signage-green-text);
|
|
122
|
+
}
|
|
123
|
+
.newtone-framed-icon[data-newtone-signage='teal'] {
|
|
124
|
+
background: var(--newtone-signage-teal-fill);
|
|
125
|
+
color: var(--newtone-signage-teal-text);
|
|
126
|
+
}
|
|
127
|
+
.newtone-framed-icon[data-newtone-signage='blue'] {
|
|
128
|
+
background: var(--newtone-signage-blue-fill);
|
|
129
|
+
color: var(--newtone-signage-blue-text);
|
|
130
|
+
}
|
|
131
|
+
.newtone-framed-icon[data-newtone-signage='purple'] {
|
|
132
|
+
background: var(--newtone-signage-purple-fill);
|
|
133
|
+
color: var(--newtone-signage-purple-text);
|
|
134
|
+
}
|
|
135
|
+
.newtone-framed-icon[data-newtone-signage='pink'] {
|
|
136
|
+
background: var(--newtone-signage-pink-fill);
|
|
137
|
+
color: var(--newtone-signage-pink-text);
|
|
138
|
+
}
|
|
@@ -51,11 +51,21 @@ import type { HTMLAttributes } from 'react';
|
|
|
51
51
|
* drift.
|
|
52
52
|
*/
|
|
53
53
|
export type FramedIconShape = 'square' | 'round';
|
|
54
|
+
/**
|
|
55
|
+
* The palettes the `signage` slice names, since 2026-10-02: the six system palettes and the eight
|
|
56
|
+
* custom ones. Fixed by contracts/seeds.md, so the list cannot drift from a seed. Joshua: *"a slice
|
|
57
|
+
* in newtone for signage, that we would use on status tags or icon tiles, that would have all
|
|
58
|
+
* palettes"*. It names a group the studio tunes, never a colour -- which is why it is not the `fill`
|
|
59
|
+
* this file refuses. blueprints/newtone/DECISIONS/2026-10-02-signage-is-a-slice-for-every-palette.md
|
|
60
|
+
*/
|
|
61
|
+
export type SignagePalette = 'neutral' | 'accent' | 'support' | 'success' | 'warning' | 'error' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'purple' | 'pink';
|
|
54
62
|
export interface FramedIconProps extends HTMLAttributes<HTMLElement> {
|
|
55
63
|
/** A Material Symbols ligature. */
|
|
56
64
|
icon: string;
|
|
57
65
|
/** The 96px square a credential leads with, or the 40px circle a feature card leads with. */
|
|
58
66
|
shape: FramedIconShape;
|
|
67
|
+
/** Paint from the `signage` slice's palette instead of `framed-icon`. Unset, nothing changes. */
|
|
68
|
+
signage?: SignagePalette;
|
|
59
69
|
}
|
|
60
|
-
export declare function FramedIcon({ icon, shape, className, ...rest }: FramedIconProps): import("react").JSX.Element;
|
|
70
|
+
export declare function FramedIcon({ icon, shape, signage, className, ...rest }: FramedIconProps): import("react").JSX.Element;
|
|
61
71
|
//# sourceMappingURL=framed-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framed-icon.d.ts","sourceRoot":"","sources":["../../src/framed-icon/framed-icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"framed-icon.d.ts","sourceRoot":"","sources":["../../src/framed-icon/framed-icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACpB,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,CAAA;AASZ,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,WAAW,CAAC;IAChE,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,6FAA6F;IAC7F,KAAK,EAAE,eAAe,CAAA;IACtB,iGAAiG;IACjG,OAAO,CAAC,EAAE,cAAc,CAAA;CAC3B;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAYvF"}
|
|
@@ -6,9 +6,9 @@ import { Icon } from '../icon/index.js';
|
|
|
6
6
|
* caller decides.
|
|
7
7
|
*/
|
|
8
8
|
const GLYPH = { square: 'xl', round: 'md' };
|
|
9
|
-
export function FramedIcon({ icon, shape, className, ...rest }) {
|
|
9
|
+
export function FramedIcon({ icon, shape, signage, className, ...rest }) {
|
|
10
10
|
return (_jsx("span", { className: [`newtone-framed-icon newtone-framed-icon--${shape}`, className]
|
|
11
11
|
.filter(Boolean)
|
|
12
|
-
.join(' '), ...rest, children: _jsx(Icon, { name: icon, size: GLYPH[shape] }) }));
|
|
12
|
+
.join(' '), "data-newtone-signage": signage, ...rest, children: _jsx(Icon, { name: icon, size: GLYPH[shape] }) }));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=framed-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framed-icon.js","sourceRoot":"","sources":["../../src/framed-icon/framed-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"framed-icon.js","sourceRoot":"","sources":["../../src/framed-icon/framed-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,kBAAkB,CAAA;AAgFtD;;;;GAIG;AACH,MAAM,KAAK,GAAsC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AAW9E,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAmB;IACpF,OAAO,CACH,eACI,SAAS,EAAE,CAAC,4CAA4C,KAAK,EAAE,EAAE,SAAS,CAAC;aACtE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,0BACQ,OAAO,KACzB,IAAI,YAER,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAI,GACrC,CACV,CAAA;AACL,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** The door. See the repo blueprint, section 4.1.6. */
|
|
2
2
|
export { FramedIcon } from './framed-icon.js';
|
|
3
|
-
export type { FramedIconProps, FramedIconShape } from './framed-icon.js';
|
|
3
|
+
export type { FramedIconProps, FramedIconShape, SignagePalette } from './framed-icon.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/framed-icon/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/framed-icon/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type { IdentityProps } from './identity/index.js';
|
|
|
15
15
|
export { Icon } from './icon/index.js';
|
|
16
16
|
export type { IconProps, IconSize } from './icon/index.js';
|
|
17
17
|
export { FramedIcon } from './framed-icon/index.js';
|
|
18
|
-
export type { FramedIconProps, FramedIconShape } from './framed-icon/index.js';
|
|
18
|
+
export type { FramedIconProps, FramedIconShape, SignagePalette } from './framed-icon/index.js';
|
|
19
19
|
export { CardBox } from './card-box/index.js';
|
|
20
20
|
export type { CardBoxProps } from './card-box/index.js';
|
|
21
21
|
export { CardGrid } from './card-grid/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,SAAS,GACZ,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,YAAY,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,GACd,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,MAAM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