@epilot/volt-ui-experimental-griffel 0.3.0 → 0.3.1
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/components/accordion/accordion.js +66 -126
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +138 -238
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/avatar/avatar-group.js +47 -102
- package/dist/components/avatar/avatar-group.js.map +1 -1
- package/dist/components/avatar/avatar.js +72 -96
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js +48 -56
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +49 -97
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/button/button.js +49 -57
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button-group/button-group.js +31 -55
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/callout/callout.js +164 -288
- package/dist/components/callout/callout.js.map +1 -1
- package/dist/components/card/card.js +81 -137
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +48 -96
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js +107 -155
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js.map +1 -1
- package/dist/components/command/command.js +161 -285
- package/dist/components/command/command.js.map +1 -1
- package/dist/components/data-table/data-table-body.js +54 -114
- package/dist/components/data-table/data-table-body.js.map +1 -1
- package/dist/components/data-table/data-table-column-header.js +45 -117
- package/dist/components/data-table/data-table-column-header.js.map +1 -1
- package/dist/components/data-table/data-table-column-visibility.js +39 -98
- package/dist/components/data-table/data-table-column-visibility.js.map +1 -1
- package/dist/components/data-table/data-table-content.js +58 -90
- package/dist/components/data-table/data-table-content.js.map +1 -1
- package/dist/components/data-table/data-table-error.js +39 -83
- package/dist/components/data-table/data-table-error.js.map +1 -1
- package/dist/components/data-table/data-table-header.js +54 -88
- package/dist/components/data-table/data-table-header.js.map +1 -1
- package/dist/components/data-table/data-table-loading.js +15 -27
- package/dist/components/data-table/data-table-loading.js.map +1 -1
- package/dist/components/data-table/data-table-pagination.js +19 -27
- package/dist/components/data-table/data-table-pagination.js.map +1 -1
- package/dist/components/data-table/data-table-row.js +64 -87
- package/dist/components/data-table/data-table-row.js.map +1 -1
- package/dist/components/data-table/data-table-toolbar.js +16 -24
- package/dist/components/data-table/data-table-toolbar.js.map +1 -1
- package/dist/components/data-table/data-table.js +145 -181
- package/dist/components/data-table/data-table.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +214 -342
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-range-picker/range-calendar.js +92 -132
- package/dist/components/date-range-picker/range-calendar.js.map +1 -1
- package/dist/components/date-time-picker/calendar.js +317 -501
- package/dist/components/date-time-picker/calendar.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-context.js +60 -64
- package/dist/components/date-time-picker/date-time-picker-context.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-input.js +149 -249
- package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-panel.js +165 -273
- package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-popover.js +14 -22
- package/dist/components/date-time-picker/date-time-picker-popover.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker.js +90 -134
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -1
- package/dist/components/date-time-picker/time-picker.js +132 -198
- package/dist/components/date-time-picker/time-picker.js.map +1 -1
- package/dist/components/density-provider/density-provider.js +19 -39
- package/dist/components/density-provider/density-provider.js.map +1 -1
- package/dist/components/dialog/dialog.js +145 -253
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.js +164 -272
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +204 -384
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field-combobox.js +243 -435
- package/dist/components/field/field-combobox.js.map +1 -1
- package/dist/components/field/field-select.js +19 -23
- package/dist/components/field/field-select.js.map +1 -1
- package/dist/components/field/field.js +189 -297
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/label/label.js +19 -27
- package/dist/components/label/label.js.map +1 -1
- package/dist/components/list/list.js +315 -595
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/option-card/option-card.js +159 -323
- package/dist/components/option-card/option-card.js.map +1 -1
- package/dist/components/pill/pill.js +68 -84
- package/dist/components/pill/pill.js.map +1 -1
- package/dist/components/popover/popover.js +48 -84
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/radio/radio.js +49 -89
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/scroll-overflow/scroll-overflow.js +198 -350
- package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +97 -141
- package/dist/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/select/select.js +200 -396
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/separator/separator.js +16 -24
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/skeleton/skeleton.js +43 -83
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/spinner/spinner.js +20 -44
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/switch/switch.js +83 -155
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/table/table-pagination.js +210 -468
- package/dist/components/table/table-pagination.js.map +1 -1
- package/dist/components/table/table.js +131 -211
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/tabs/tabs.js +58 -94
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/text/text.js +32 -40
- package/dist/components/text/text.js.map +1 -1
- package/dist/components/toast/toast.js +111 -187
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toggle/toggle-group.js +24 -40
- package/dist/components/toggle/toggle-group.js.map +1 -1
- package/dist/components/toggle/toggle.js +39 -47
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +62 -106
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/lib/clear-button.js +15 -27
- package/dist/lib/clear-button.js.map +1 -1
- package/dist/lib/icons.js +6 -18
- package/dist/lib/icons.js.map +1 -1
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/_virtual/jsx-dev-runtime.js +0 -5
- package/dist/_virtual/jsx-dev-runtime.js.map +0 -1
- package/dist/_virtual/react-jsx-dev-runtime.development.js +0 -5
- package/dist/_virtual/react-jsx-dev-runtime.development.js.map +0 -1
- package/dist/_virtual/react-jsx-dev-runtime.production.js +0 -5
- package/dist/_virtual/react-jsx-dev-runtime.production.js.map +0 -1
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.development.js +0 -236
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.development.js.map +0 -1
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.production.js +0 -21
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.production.js.map +0 -1
- package/dist/vendor/react/jsx-dev-runtime.js +0 -9
- package/dist/vendor/react/jsx-dev-runtime.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import * as v from "react";
|
|
3
|
-
import { shorthands as
|
|
4
|
-
import { SLOT_ATTR as
|
|
5
|
-
import { mergeClasses as
|
|
6
|
-
import { makeVoltStyles as
|
|
7
|
-
import { radiusMd as w, spacingElement3 as
|
|
8
|
-
import { isCoreFamily as
|
|
9
|
-
import { useVoltPaletteTokensFor as
|
|
3
|
+
import { shorthands as S } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/index.js";
|
|
4
|
+
import { SLOT_ATTR as b } from "../../packages/volt-runtime/dist/renderer/contract.js";
|
|
5
|
+
import { mergeClasses as y } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/mergeClasses.js";
|
|
6
|
+
import { makeVoltStyles as x } from "../../styles/make-styles.js";
|
|
7
|
+
import { radiusMd as w, spacingElement3 as $, spacingElement1 as n, textBase as C, radiusSm as R, spacingElement2 as O, textSm as k, textXs as A, errorA8 as B, accentA8 as N, fontWeightNormal as T } from "../../tokens/index.js";
|
|
8
|
+
import { isCoreFamily as W } from "../../tokens/install.js";
|
|
9
|
+
import { useVoltPaletteTokensFor as E } from "../../tokens/use-palette-tokens.js";
|
|
10
10
|
import { NS as I } from "../../tokens/core.generated.js";
|
|
11
|
-
import { NS as
|
|
12
|
-
const
|
|
11
|
+
import { NS as z } from "../../tokens/palette.generated.js";
|
|
12
|
+
const J = [
|
|
13
13
|
"accent",
|
|
14
14
|
"neutral",
|
|
15
15
|
"gray",
|
|
@@ -31,29 +31,29 @@ const q = [
|
|
|
31
31
|
"orange",
|
|
32
32
|
"yellow",
|
|
33
33
|
"bronze"
|
|
34
|
-
],
|
|
34
|
+
], i = "--volt2-badge-bg", a = "--volt2-badge-fg", s = "--volt2-badge-bd", m = (e) => e === "neutral" ? "gray" : e, d = (e) => W(e) ? I : z, o = (e, r) => {
|
|
35
35
|
const t = m(e);
|
|
36
36
|
return `var(--volt2-${d(t)}-sem-${t}-${r})`;
|
|
37
|
-
},
|
|
37
|
+
}, F = (e, r) => {
|
|
38
38
|
const t = m(e);
|
|
39
39
|
return `var(--volt2-${d(t)}-${t}-${r})`;
|
|
40
|
-
},
|
|
40
|
+
}, L = {
|
|
41
41
|
soft: (e) => ({
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
42
|
+
[i]: o(e, "soft"),
|
|
43
|
+
[a]: o(e, "default"),
|
|
44
|
+
[s]: "transparent"
|
|
45
45
|
}),
|
|
46
46
|
solid: (e) => ({
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
47
|
+
[i]: o(e, "solid"),
|
|
48
|
+
[a]: o(e, "contrast"),
|
|
49
|
+
[s]: "transparent"
|
|
50
50
|
}),
|
|
51
51
|
surface: (e) => ({
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
52
|
+
[i]: o(e, "surface"),
|
|
53
|
+
[a]: o(e, "default"),
|
|
54
|
+
[s]: F(e, "a6")
|
|
55
55
|
})
|
|
56
|
-
},
|
|
56
|
+
}, G = x({
|
|
57
57
|
root: {
|
|
58
58
|
display: "inline-flex",
|
|
59
59
|
alignItems: "center",
|
|
@@ -62,36 +62,36 @@ const q = [
|
|
|
62
62
|
whiteSpace: "nowrap",
|
|
63
63
|
flexShrink: 0,
|
|
64
64
|
overflow: "hidden",
|
|
65
|
-
fontWeight:
|
|
65
|
+
fontWeight: T,
|
|
66
66
|
// NEVER write a CSS shorthand in a Griffel style object. Atoms are one declaration each, so a
|
|
67
67
|
// shorthand cannot be resolved against a longhand — `border` and a later `borderColor` would
|
|
68
68
|
// both survive with the winner decided by insertion order. Griffel warns at runtime, which
|
|
69
69
|
// means the mistake ships silently in production where nobody reads the console.
|
|
70
70
|
// `shorthands.*` expands to the individual longhands.
|
|
71
|
-
...
|
|
71
|
+
...S.border("1px", "solid", `var(${s})`),
|
|
72
72
|
// The whole point: one rule each, colour supplied per instance.
|
|
73
|
-
backgroundColor: `var(${
|
|
74
|
-
color: `var(${
|
|
73
|
+
backgroundColor: `var(${i})`,
|
|
74
|
+
color: `var(${a})`,
|
|
75
75
|
transitionProperty: "color, box-shadow",
|
|
76
76
|
":focus-visible": {
|
|
77
77
|
outlineWidth: "2px",
|
|
78
78
|
outlineStyle: "solid",
|
|
79
79
|
outlineOffset: "2px",
|
|
80
|
-
outlineColor:
|
|
80
|
+
outlineColor: N
|
|
81
81
|
},
|
|
82
82
|
// v1 `aria-invalid:outline-error-a8`. Declared after the focus ring so an invalid focused
|
|
83
83
|
// badge paints the error ring, matching v1's variant ordering.
|
|
84
84
|
"&[aria-invalid]": {
|
|
85
|
-
outlineColor:
|
|
85
|
+
outlineColor: B
|
|
86
86
|
},
|
|
87
87
|
"& > svg": { pointerEvents: "none" }
|
|
88
88
|
},
|
|
89
89
|
sm: {
|
|
90
|
-
fontSize:
|
|
90
|
+
fontSize: A,
|
|
91
91
|
lineHeight: "1rem",
|
|
92
92
|
letterSpacing: "0.04px",
|
|
93
|
-
gap:
|
|
94
|
-
paddingInline:
|
|
93
|
+
gap: n,
|
|
94
|
+
paddingInline: n,
|
|
95
95
|
minWidth: "1rem",
|
|
96
96
|
borderRadius: "3px",
|
|
97
97
|
"& > svg": { width: "0.75rem", height: "0.75rem" }
|
|
@@ -99,22 +99,22 @@ const q = [
|
|
|
99
99
|
base: {
|
|
100
100
|
fontSize: k,
|
|
101
101
|
lineHeight: "1.25rem",
|
|
102
|
-
gap:
|
|
103
|
-
paddingInline:
|
|
102
|
+
gap: n,
|
|
103
|
+
paddingInline: O,
|
|
104
104
|
minWidth: "1.25rem",
|
|
105
|
-
borderRadius:
|
|
105
|
+
borderRadius: R,
|
|
106
106
|
"& > svg": { width: "1rem", height: "1rem" }
|
|
107
107
|
},
|
|
108
108
|
lg: {
|
|
109
|
-
fontSize:
|
|
109
|
+
fontSize: C,
|
|
110
110
|
lineHeight: "1.5rem",
|
|
111
|
-
gap:
|
|
112
|
-
paddingInline:
|
|
111
|
+
gap: n,
|
|
112
|
+
paddingInline: $,
|
|
113
113
|
minWidth: "1.5rem",
|
|
114
114
|
borderRadius: w,
|
|
115
115
|
"& > svg": { width: "1rem", height: "1rem" }
|
|
116
116
|
}
|
|
117
|
-
}),
|
|
117
|
+
}), K = v.forwardRef(
|
|
118
118
|
function({
|
|
119
119
|
className: r,
|
|
120
120
|
color: t = "accent",
|
|
@@ -123,31 +123,23 @@ const q = [
|
|
|
123
123
|
style: f,
|
|
124
124
|
...c
|
|
125
125
|
}, u) {
|
|
126
|
-
|
|
127
|
-
const l =
|
|
128
|
-
return /* @__PURE__ */ h
|
|
126
|
+
E(t);
|
|
127
|
+
const l = G();
|
|
128
|
+
return /* @__PURE__ */ h(
|
|
129
129
|
"span",
|
|
130
130
|
{
|
|
131
131
|
ref: u,
|
|
132
132
|
"data-slot": "badge",
|
|
133
|
-
[
|
|
134
|
-
className:
|
|
135
|
-
style: { ...
|
|
133
|
+
[b]: "badge",
|
|
134
|
+
className: y(l.root, l[p], r),
|
|
135
|
+
style: { ...L[g](t), ...f },
|
|
136
136
|
...c
|
|
137
|
-
}
|
|
138
|
-
void 0,
|
|
139
|
-
!1,
|
|
140
|
-
{
|
|
141
|
-
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/badge/badge.tsx",
|
|
142
|
-
lineNumber: 212,
|
|
143
|
-
columnNumber: 7
|
|
144
|
-
},
|
|
145
|
-
this
|
|
137
|
+
}
|
|
146
138
|
);
|
|
147
139
|
}
|
|
148
140
|
);
|
|
149
141
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
142
|
+
J as BADGE_COLORS,
|
|
143
|
+
K as Badge
|
|
152
144
|
};
|
|
153
145
|
//# sourceMappingURL=badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sources":["../../../src/components/badge/badge.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport { NS, PALETTE_NS } from \"../../tokens\"\nimport { isCoreFamily } from \"../../tokens/install\"\nimport { useVoltPaletteTokensFor } from \"../../tokens/use-palette-tokens\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * REFERENCE COMPONENT — the colour-matrix collapse. Read this before writing another component\n * that takes a `color` prop.\n *\n * v1 enumerates 20 colours x 3 styles as 60 `compoundVariants`, each a distinct class string like\n * `volt-bg-mint-soft`. Because those names are built by interpolation, Tailwind's scanner cannot\n * see them, which is what `safelist.css` exists to force — 9 lines that emit ~945 rules, 65.6 KB\n * and 59% of v1's entire rule count. The Griffel PoC carried the same shape forward as 60 static\n * style objects.\n *\n * Here the colour is a VALUE, not part of a class name. Three atoms read three custom properties;\n * the component sets those properties inline from the `color` prop. Total rules: one small set per\n * style variant, regardless of how many colours exist. Adding a 22nd palette family costs zero\n * rules.\n *\n * Two consequences worth knowing:\n * - `color` may legitimately arrive from a runtime expression (`getColorForEntityLabel(label)` and\n * `WCAG_BADGE_MAP[level].color` both exist in consumer code today), which no build step can\n * resolve. That is exactly why the palette sheet cannot be statically shaken, and why this\n * component calls `ensurePaletteTokens()`.\n * - Selectors key on SLOT_ATTR, never on `data-slot`. `data-slot` values are shared with v1, so a\n * rule keyed on one also matches v1-rendered DOM — the StyleX track had a v1 icon compute to\n * 0x0 through a green gate this way. `data-slot` is still emitted, purely as a diagnostic.\n */\n\nconst COLORS = [\n \"accent\",\n \"neutral\",\n \"gray\",\n \"success\",\n \"warning\",\n \"error\",\n \"info\",\n \"blue\",\n \"sky\",\n \"mint\",\n \"lime\",\n \"green\",\n \"teal\",\n \"cyan\",\n \"indigo\",\n \"purple\",\n \"pink\",\n \"red\",\n \"orange\",\n \"yellow\",\n \"bronze\",\n] as const\n\nexport type BadgeColor = (typeof COLORS)[number]\nexport type BadgeVariant = \"soft\" | \"solid\" | \"surface\"\nexport type BadgeSize = \"sm\" | \"base\" | \"lg\"\n\n/** The three slots a variant can paint. Set inline; read by the atoms below. */\nconst BG = \"--volt2-badge-bg\"\nconst FG = \"--volt2-badge-fg\"\nconst BD = \"--volt2-badge-bd\"\n\nconst resolveColor = (color: BadgeColor): string =>\n color === \"neutral\" ? \"gray\" : color\n\n/**\n * The namespace fix. `resolveColor` runs FIRST so `neutral` is classified as `gray` (core) rather\n * than as the literal string \"neutral\" (which is in neither sheet's family list) — same order\n * `semantic`/`primitive` already apply it in. This does not touch `useVoltPaletteTokensFor(color)`\n * above, which still receives the raw, unresolved `color` prop and therefore still installs the\n * palette sheet for `color=\"neutral\"` even though the resolved family needs none of it — a\n * separate, pre-existing inefficiency this fix does not optimize. See BADGE-PILL-NAMESPACE-FIX.md.\n */\nconst namespaceFor = (family: string): string =>\n isCoreFamily(family) ? NS : PALETTE_NS\n\nconst semantic = (color: BadgeColor, slot: string): string => {\n const family = resolveColor(color)\n return `var(--volt2-${namespaceFor(family)}-sem-${family}-${slot})`\n}\nconst primitive = (color: BadgeColor, step: string): string => {\n const family = resolveColor(color)\n return `var(--volt2-${namespaceFor(family)}-${family}-${step})`\n}\n\n/**\n * Which token each variant pulls into each slot. This replaces the 60-entry compound matrix: it is\n * data about three variants, not about 60 combinations.\n */\nconst VARIANT_SLOTS: Record<\n BadgeVariant,\n (color: BadgeColor) => Record<string, string>\n> = {\n soft: (c) => ({\n [BG]: semantic(c, \"soft\"),\n [FG]: semantic(c, \"default\"),\n [BD]: \"transparent\",\n }),\n solid: (c) => ({\n [BG]: semantic(c, \"solid\"),\n [FG]: semantic(c, \"contrast\"),\n [BD]: \"transparent\",\n }),\n surface: (c) => ({\n [BG]: semantic(c, \"surface\"),\n [FG]: semantic(c, \"default\"),\n [BD]: primitive(c, \"a6\"),\n }),\n}\n\nconst useStyles = makeVoltStyles({\n root: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"fit-content\",\n whiteSpace: \"nowrap\",\n flexShrink: 0,\n overflow: \"hidden\",\n fontWeight: tokens.fontWeightNormal,\n // NEVER write a CSS shorthand in a Griffel style object. Atoms are one declaration each, so a\n // shorthand cannot be resolved against a longhand — `border` and a later `borderColor` would\n // both survive with the winner decided by insertion order. Griffel warns at runtime, which\n // means the mistake ships silently in production where nobody reads the console.\n // `shorthands.*` expands to the individual longhands.\n ...shorthands.border(\"1px\", \"solid\", `var(${BD})`),\n // The whole point: one rule each, colour supplied per instance.\n backgroundColor: `var(${BG})`,\n color: `var(${FG})`,\n transitionProperty: \"color, box-shadow\",\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n // v1 `aria-invalid:outline-error-a8`. Declared after the focus ring so an invalid focused\n // badge paints the error ring, matching v1's variant ordering.\n \"&[aria-invalid]\": {\n outlineColor: tokens.errorA8,\n },\n \"& > svg\": { pointerEvents: \"none\" },\n },\n sm: {\n fontSize: tokens.textXs,\n lineHeight: \"1rem\",\n letterSpacing: \"0.04px\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement1,\n minWidth: \"1rem\",\n borderRadius: \"3px\",\n \"& > svg\": { width: \"0.75rem\", height: \"0.75rem\" },\n },\n base: {\n fontSize: tokens.textSm,\n lineHeight: \"1.25rem\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement2,\n minWidth: \"1.25rem\",\n borderRadius: tokens.radiusSm,\n \"& > svg\": { width: \"1rem\", height: \"1rem\" },\n },\n lg: {\n fontSize: tokens.textBase,\n lineHeight: \"1.5rem\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement3,\n minWidth: \"1.5rem\",\n borderRadius: tokens.radiusMd,\n \"& > svg\": { width: \"1rem\", height: \"1rem\" },\n },\n})\n\nexport type BadgeProps = Omit<React.ComponentProps<\"span\">, \"color\"> & {\n color?: BadgeColor\n /**\n * Named `variant`, not `style`. v1 called this `style`, which shadows the HTML `style` attribute\n * and made a badge unable to take both a visual treatment and an inline style. Retrocompat is\n * not a requirement here, so the collision is fixed rather than inherited.\n */\n variant?: BadgeVariant\n size?: BadgeSize\n}\n\nexport const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(\n function Badge(\n {\n className,\n color = \"accent\",\n variant = \"soft\",\n size = \"base\",\n style,\n ...props\n },\n ref\n ) {\n // A decorative family can still arrive from an expression the build cannot see, so this has to\n // be re-evaluated every commit (WP2B2 — the hook closes over this render's resolved value) —\n // but it is the resolved family that decides, and a core one needs no palette sheet.\n useVoltPaletteTokensFor(color)\n\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"badge\"\n {...{ [SLOT_ATTR]: \"badge\" }}\n className={mergeClasses(styles.root, styles[size], className)}\n style={\n { ...VARIANT_SLOTS[variant](color), ...style } as React.CSSProperties\n }\n {...props}\n />\n )\n }\n)\n\nexport { COLORS as BADGE_COLORS }\n"],"names":["COLORS","BG","FG","BD","resolveColor","color","namespaceFor","family","isCoreFamily","NS","PALETTE_NS","semantic","slot","primitive","step","VARIANT_SLOTS","c","useStyles","makeVoltStyles","tokens.fontWeightNormal","shorthands","tokens.accentA8","tokens.errorA8","tokens.textXs","tokens.spacingElement1","tokens.textSm","tokens.spacingElement2","tokens.radiusSm","tokens.textBase","tokens.spacingElement3","tokens.radiusMd","Badge","React","className","variant","size","style","props","ref","useVoltPaletteTokensFor","styles","jsxDEV","SLOT_ATTR","mergeClasses"],"mappings":";;;;;;;;;;;AAoCA,MAAMA,IAAS;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOMC,IAAK,oBACLC,IAAK,oBACLC,IAAK,oBAELC,IAAe,CAACC,MACpBA,MAAU,YAAY,SAASA,GAU3BC,IAAe,CAACC,MACpBC,EAAaD,CAAM,IAAIE,IAAKC,GAExBC,IAAW,CAACN,GAAmBO,MAAyB;AAC5D,QAAML,IAASH,EAAaC,CAAK;AACjC,SAAO,eAAeC,EAAaC,CAAM,CAAC,QAAQA,CAAM,IAAIK,CAAI;AAClE,GACMC,IAAY,CAACR,GAAmBS,MAAyB;AAC7D,QAAMP,IAASH,EAAaC,CAAK;AACjC,SAAO,eAAeC,EAAaC,CAAM,CAAC,IAAIA,CAAM,IAAIO,CAAI;AAC9D,GAMMC,IAGF;AAAA,EACF,MAAM,CAACC,OAAO;AAAA,IACZ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":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport { NS, PALETTE_NS } from \"../../tokens\"\nimport { isCoreFamily } from \"../../tokens/install\"\nimport { useVoltPaletteTokensFor } from \"../../tokens/use-palette-tokens\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * REFERENCE COMPONENT — the colour-matrix collapse. Read this before writing another component\n * that takes a `color` prop.\n *\n * v1 enumerates 20 colours x 3 styles as 60 `compoundVariants`, each a distinct class string like\n * `volt-bg-mint-soft`. Because those names are built by interpolation, Tailwind's scanner cannot\n * see them, which is what `safelist.css` exists to force — 9 lines that emit ~945 rules, 65.6 KB\n * and 59% of v1's entire rule count. The Griffel PoC carried the same shape forward as 60 static\n * style objects.\n *\n * Here the colour is a VALUE, not part of a class name. Three atoms read three custom properties;\n * the component sets those properties inline from the `color` prop. Total rules: one small set per\n * style variant, regardless of how many colours exist. Adding a 22nd palette family costs zero\n * rules.\n *\n * Two consequences worth knowing:\n * - `color` may legitimately arrive from a runtime expression (`getColorForEntityLabel(label)` and\n * `WCAG_BADGE_MAP[level].color` both exist in consumer code today), which no build step can\n * resolve. That is exactly why the palette sheet cannot be statically shaken, and why this\n * component calls `ensurePaletteTokens()`.\n * - Selectors key on SLOT_ATTR, never on `data-slot`. `data-slot` values are shared with v1, so a\n * rule keyed on one also matches v1-rendered DOM — the StyleX track had a v1 icon compute to\n * 0x0 through a green gate this way. `data-slot` is still emitted, purely as a diagnostic.\n */\n\nconst COLORS = [\n \"accent\",\n \"neutral\",\n \"gray\",\n \"success\",\n \"warning\",\n \"error\",\n \"info\",\n \"blue\",\n \"sky\",\n \"mint\",\n \"lime\",\n \"green\",\n \"teal\",\n \"cyan\",\n \"indigo\",\n \"purple\",\n \"pink\",\n \"red\",\n \"orange\",\n \"yellow\",\n \"bronze\",\n] as const\n\nexport type BadgeColor = (typeof COLORS)[number]\nexport type BadgeVariant = \"soft\" | \"solid\" | \"surface\"\nexport type BadgeSize = \"sm\" | \"base\" | \"lg\"\n\n/** The three slots a variant can paint. Set inline; read by the atoms below. */\nconst BG = \"--volt2-badge-bg\"\nconst FG = \"--volt2-badge-fg\"\nconst BD = \"--volt2-badge-bd\"\n\nconst resolveColor = (color: BadgeColor): string =>\n color === \"neutral\" ? \"gray\" : color\n\n/**\n * The namespace fix. `resolveColor` runs FIRST so `neutral` is classified as `gray` (core) rather\n * than as the literal string \"neutral\" (which is in neither sheet's family list) — same order\n * `semantic`/`primitive` already apply it in. This does not touch `useVoltPaletteTokensFor(color)`\n * above, which still receives the raw, unresolved `color` prop and therefore still installs the\n * palette sheet for `color=\"neutral\"` even though the resolved family needs none of it — a\n * separate, pre-existing inefficiency this fix does not optimize. See BADGE-PILL-NAMESPACE-FIX.md.\n */\nconst namespaceFor = (family: string): string =>\n isCoreFamily(family) ? NS : PALETTE_NS\n\nconst semantic = (color: BadgeColor, slot: string): string => {\n const family = resolveColor(color)\n return `var(--volt2-${namespaceFor(family)}-sem-${family}-${slot})`\n}\nconst primitive = (color: BadgeColor, step: string): string => {\n const family = resolveColor(color)\n return `var(--volt2-${namespaceFor(family)}-${family}-${step})`\n}\n\n/**\n * Which token each variant pulls into each slot. This replaces the 60-entry compound matrix: it is\n * data about three variants, not about 60 combinations.\n */\nconst VARIANT_SLOTS: Record<\n BadgeVariant,\n (color: BadgeColor) => Record<string, string>\n> = {\n soft: (c) => ({\n [BG]: semantic(c, \"soft\"),\n [FG]: semantic(c, \"default\"),\n [BD]: \"transparent\",\n }),\n solid: (c) => ({\n [BG]: semantic(c, \"solid\"),\n [FG]: semantic(c, \"contrast\"),\n [BD]: \"transparent\",\n }),\n surface: (c) => ({\n [BG]: semantic(c, \"surface\"),\n [FG]: semantic(c, \"default\"),\n [BD]: primitive(c, \"a6\"),\n }),\n}\n\nconst useStyles = makeVoltStyles({\n root: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"fit-content\",\n whiteSpace: \"nowrap\",\n flexShrink: 0,\n overflow: \"hidden\",\n fontWeight: tokens.fontWeightNormal,\n // NEVER write a CSS shorthand in a Griffel style object. Atoms are one declaration each, so a\n // shorthand cannot be resolved against a longhand — `border` and a later `borderColor` would\n // both survive with the winner decided by insertion order. Griffel warns at runtime, which\n // means the mistake ships silently in production where nobody reads the console.\n // `shorthands.*` expands to the individual longhands.\n ...shorthands.border(\"1px\", \"solid\", `var(${BD})`),\n // The whole point: one rule each, colour supplied per instance.\n backgroundColor: `var(${BG})`,\n color: `var(${FG})`,\n transitionProperty: \"color, box-shadow\",\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n // v1 `aria-invalid:outline-error-a8`. Declared after the focus ring so an invalid focused\n // badge paints the error ring, matching v1's variant ordering.\n \"&[aria-invalid]\": {\n outlineColor: tokens.errorA8,\n },\n \"& > svg\": { pointerEvents: \"none\" },\n },\n sm: {\n fontSize: tokens.textXs,\n lineHeight: \"1rem\",\n letterSpacing: \"0.04px\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement1,\n minWidth: \"1rem\",\n borderRadius: \"3px\",\n \"& > svg\": { width: \"0.75rem\", height: \"0.75rem\" },\n },\n base: {\n fontSize: tokens.textSm,\n lineHeight: \"1.25rem\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement2,\n minWidth: \"1.25rem\",\n borderRadius: tokens.radiusSm,\n \"& > svg\": { width: \"1rem\", height: \"1rem\" },\n },\n lg: {\n fontSize: tokens.textBase,\n lineHeight: \"1.5rem\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement3,\n minWidth: \"1.5rem\",\n borderRadius: tokens.radiusMd,\n \"& > svg\": { width: \"1rem\", height: \"1rem\" },\n },\n})\n\nexport type BadgeProps = Omit<React.ComponentProps<\"span\">, \"color\"> & {\n color?: BadgeColor\n /**\n * Named `variant`, not `style`. v1 called this `style`, which shadows the HTML `style` attribute\n * and made a badge unable to take both a visual treatment and an inline style. Retrocompat is\n * not a requirement here, so the collision is fixed rather than inherited.\n */\n variant?: BadgeVariant\n size?: BadgeSize\n}\n\nexport const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(\n function Badge(\n {\n className,\n color = \"accent\",\n variant = \"soft\",\n size = \"base\",\n style,\n ...props\n },\n ref\n ) {\n // A decorative family can still arrive from an expression the build cannot see, so this has to\n // be re-evaluated every commit (WP2B2 — the hook closes over this render's resolved value) —\n // but it is the resolved family that decides, and a core one needs no palette sheet.\n useVoltPaletteTokensFor(color)\n\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"badge\"\n {...{ [SLOT_ATTR]: \"badge\" }}\n className={mergeClasses(styles.root, styles[size], className)}\n style={\n { ...VARIANT_SLOTS[variant](color), ...style } as React.CSSProperties\n }\n {...props}\n />\n )\n }\n)\n\nexport { COLORS as BADGE_COLORS }\n"],"names":["COLORS","BG","FG","BD","resolveColor","color","namespaceFor","family","isCoreFamily","NS","PALETTE_NS","semantic","slot","primitive","step","VARIANT_SLOTS","c","useStyles","makeVoltStyles","tokens.fontWeightNormal","shorthands","tokens.accentA8","tokens.errorA8","tokens.textXs","tokens.spacingElement1","tokens.textSm","tokens.spacingElement2","tokens.radiusSm","tokens.textBase","tokens.spacingElement3","tokens.radiusMd","Badge","React","className","variant","size","style","props","ref","useVoltPaletteTokensFor","styles","jsx","SLOT_ATTR","mergeClasses"],"mappings":";;;;;;;;;;;AAoCA,MAAMA,IAAS;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOMC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AA,QACC,KAAAH;AAAA,QACA,aAAU;AAAA,QACJ,CAACI,CAAS,GAAG;AAAA,QACnB,WAAWC,EAAaH,EAAO,MAAMA,EAAOL,CAAI,GAAGF,CAAS;AAAA,QAC5D,OACE,EAAE,GAAGlB,EAAcmB,CAAO,EAAE7B,CAAK,GAAG,GAAG+B,EAAA;AAAA,QAExC,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { shorthands as
|
|
1
|
+
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { shorthands as u } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/index.js";
|
|
4
4
|
import { SLOT_ATTR as c } from "../../packages/volt-runtime/dist/renderer/contract.js";
|
|
5
5
|
import { mergeClasses as p } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/mergeClasses.js";
|
|
6
|
-
import { makeVoltStyles as
|
|
7
|
-
import { spacingElement1 as
|
|
8
|
-
import { Root as
|
|
9
|
-
const
|
|
6
|
+
import { makeVoltStyles as B } from "../../styles/make-styles.js";
|
|
7
|
+
import { spacingElement1 as L, spacingElement2 as R, semGrayDefault as b, fontWeightSemibold as f, accentA8 as S, semGrayLight as g, leadingBase as I, textBase as N } from "../../tokens/index.js";
|
|
8
|
+
import { Root as T } from "../../vendor/@radix-ui/react-slot/dist/index.js";
|
|
9
|
+
const h = B({
|
|
10
10
|
list: {
|
|
11
11
|
display: "flex",
|
|
12
12
|
alignItems: "center",
|
|
13
13
|
// gap-2
|
|
14
|
-
...
|
|
15
|
-
fontSize:
|
|
16
|
-
lineHeight:
|
|
14
|
+
...u.gap(R),
|
|
15
|
+
fontSize: N,
|
|
16
|
+
lineHeight: I
|
|
17
17
|
},
|
|
18
18
|
separator: {
|
|
19
19
|
color: g
|
|
@@ -22,7 +22,7 @@ const x = k({
|
|
|
22
22
|
display: "inline-flex",
|
|
23
23
|
alignItems: "center",
|
|
24
24
|
// gap-1
|
|
25
|
-
...
|
|
25
|
+
...u.gap(L)
|
|
26
26
|
},
|
|
27
27
|
link: {
|
|
28
28
|
fontWeight: f,
|
|
@@ -32,130 +32,82 @@ const x = k({
|
|
|
32
32
|
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
33
33
|
cursor: "pointer",
|
|
34
34
|
":hover": {
|
|
35
|
-
color:
|
|
35
|
+
color: b,
|
|
36
36
|
textDecorationLine: "underline"
|
|
37
37
|
},
|
|
38
38
|
":focus-visible": {
|
|
39
39
|
outlineWidth: "2px",
|
|
40
40
|
outlineStyle: "solid",
|
|
41
41
|
outlineOffset: "2px",
|
|
42
|
-
outlineColor:
|
|
42
|
+
outlineColor: S
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
page: {
|
|
46
46
|
fontWeight: f,
|
|
47
|
-
color:
|
|
47
|
+
color: b
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
50
|
-
function({ separator:
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */ e
|
|
49
|
+
}), F = o.forwardRef(
|
|
50
|
+
function({ separator: t = "/", className: a, children: i, ...n }, s) {
|
|
51
|
+
const l = h(), m = o.Children.toArray(i).filter(o.isValidElement);
|
|
52
|
+
return /* @__PURE__ */ e(
|
|
53
53
|
"nav",
|
|
54
54
|
{
|
|
55
55
|
ref: s,
|
|
56
56
|
"data-slot": "breadcrumb",
|
|
57
57
|
[c]: "breadcrumb",
|
|
58
58
|
"aria-label": "Breadcrumb",
|
|
59
|
-
className:
|
|
60
|
-
...
|
|
61
|
-
children: /* @__PURE__ */ e
|
|
62
|
-
|
|
59
|
+
className: a,
|
|
60
|
+
...n,
|
|
61
|
+
children: /* @__PURE__ */ e("ol", { className: l.list, children: m.map((r, d) => /* @__PURE__ */ x(o.Fragment, { children: [
|
|
62
|
+
d > 0 && /* @__PURE__ */ e(
|
|
63
63
|
"li",
|
|
64
64
|
{
|
|
65
65
|
role: "presentation",
|
|
66
66
|
"aria-hidden": "true",
|
|
67
|
-
className:
|
|
68
|
-
children:
|
|
69
|
-
}
|
|
70
|
-
void 0,
|
|
71
|
-
!1,
|
|
72
|
-
{
|
|
73
|
-
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/breadcrumb/breadcrumb.tsx",
|
|
74
|
-
lineNumber: 97,
|
|
75
|
-
columnNumber: 17
|
|
76
|
-
},
|
|
77
|
-
this
|
|
67
|
+
className: l.separator,
|
|
68
|
+
children: t
|
|
69
|
+
}
|
|
78
70
|
),
|
|
79
|
-
|
|
80
|
-
] },
|
|
81
|
-
|
|
82
|
-
lineNumber: 95,
|
|
83
|
-
columnNumber: 13
|
|
84
|
-
}, this)) }, void 0, !1, {
|
|
85
|
-
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/breadcrumb/breadcrumb.tsx",
|
|
86
|
-
lineNumber: 93,
|
|
87
|
-
columnNumber: 9
|
|
88
|
-
}, this)
|
|
89
|
-
},
|
|
90
|
-
void 0,
|
|
91
|
-
!1,
|
|
92
|
-
{
|
|
93
|
-
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/breadcrumb/breadcrumb.tsx",
|
|
94
|
-
lineNumber: 85,
|
|
95
|
-
columnNumber: 7
|
|
96
|
-
},
|
|
97
|
-
this
|
|
71
|
+
r
|
|
72
|
+
] }, d)) })
|
|
73
|
+
}
|
|
98
74
|
);
|
|
99
75
|
}
|
|
100
|
-
),
|
|
101
|
-
const
|
|
102
|
-
|
|
76
|
+
), G = o.forwardRef(function({ href: t, isCurrent: a = !1, className: i, children: n, asChild: s = !1, ...l }, m) {
|
|
77
|
+
const r = h(), k = !!t || s ? /* @__PURE__ */ e(
|
|
78
|
+
s ? T : "a",
|
|
103
79
|
{
|
|
104
80
|
"data-slot": "breadcrumb-link",
|
|
105
81
|
[c]: "breadcrumb-link",
|
|
106
|
-
...
|
|
107
|
-
className: p(
|
|
108
|
-
...
|
|
109
|
-
...
|
|
110
|
-
children:
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
!1,
|
|
114
|
-
{
|
|
115
|
-
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/breadcrumb/breadcrumb.tsx",
|
|
116
|
-
lineNumber: 139,
|
|
117
|
-
columnNumber: 7
|
|
118
|
-
},
|
|
119
|
-
this
|
|
120
|
-
) : /* @__PURE__ */ e.jsxDEV(
|
|
82
|
+
...t ? { href: t } : {},
|
|
83
|
+
className: p(r.link, i),
|
|
84
|
+
...a ? { "aria-current": "page" } : {},
|
|
85
|
+
...l,
|
|
86
|
+
children: n
|
|
87
|
+
}
|
|
88
|
+
) : /* @__PURE__ */ e(
|
|
121
89
|
"span",
|
|
122
90
|
{
|
|
123
91
|
"data-slot": "breadcrumb-page",
|
|
124
92
|
[c]: "breadcrumb-page",
|
|
125
|
-
className: p(
|
|
126
|
-
...
|
|
127
|
-
children:
|
|
128
|
-
}
|
|
129
|
-
void 0,
|
|
130
|
-
!1,
|
|
131
|
-
{
|
|
132
|
-
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/breadcrumb/breadcrumb.tsx",
|
|
133
|
-
lineNumber: 150,
|
|
134
|
-
columnNumber: 7
|
|
135
|
-
},
|
|
136
|
-
this
|
|
93
|
+
className: p(r.page, i),
|
|
94
|
+
...a ? { "aria-current": "page" } : {},
|
|
95
|
+
children: n
|
|
96
|
+
}
|
|
137
97
|
);
|
|
138
|
-
return /* @__PURE__ */ e
|
|
98
|
+
return /* @__PURE__ */ e(
|
|
139
99
|
"li",
|
|
140
100
|
{
|
|
141
|
-
ref:
|
|
101
|
+
ref: m,
|
|
142
102
|
"data-slot": "breadcrumb-item",
|
|
143
103
|
[c]: "breadcrumb-item",
|
|
144
|
-
className:
|
|
145
|
-
children:
|
|
146
|
-
}
|
|
147
|
-
void 0,
|
|
148
|
-
!1,
|
|
149
|
-
{
|
|
150
|
-
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/breadcrumb/breadcrumb.tsx",
|
|
151
|
-
lineNumber: 161,
|
|
152
|
-
columnNumber: 5
|
|
153
|
-
},
|
|
154
|
-
this
|
|
104
|
+
className: r.item,
|
|
105
|
+
children: k
|
|
106
|
+
}
|
|
155
107
|
);
|
|
156
108
|
});
|
|
157
109
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
110
|
+
F as Breadcrumb,
|
|
111
|
+
G as BreadcrumbItem
|
|
160
112
|
};
|
|
161
113
|
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\n/**\n * Breadcrumb — Card's compound pattern applied to the nav / ol / li structure.\n *\n * v1's `Breadcrumb` walks its children and interleaves a presentational separator `<li>` between\n * them; `BreadcrumbItem` decides between a link and a plain page by whether a `href` exists. The\n * `nav` / `ol` / `li` semantics and the `aria-current=\"page\"` handling are the real value of this\n * component and are reproduced exactly.\n *\n * v1 renders the link branch through Radix `Slot` when `asChild` is set — dropped here per\n * CONVENTIONS rule 6 (no Radix dependency). There is no `asChild` escape hatch; a consumer wanting\n * a non-`<a>` link anchors it themselves.\n *\n * `BreadcrumbItem` with a `href` renders an `<a>` (slot `breadcrumb-link`); without one, a `<span>`\n * (slot `breadcrumb-page`). Either way the item is wrapped in a `breadcrumb-item` `<li>`. The nav\n * itself has no base styles in v1 — it is left to the caller's className — so it carries only the\n * slot attributes.\n *\n * The link's `transition-colors` expands to Tailwind v4's default property list plus the 150ms\n * `cubic-bezier(0.4, 0, 0.2, 1)` easing — literals from the framework's default theme, which is\n * visible motion and cannot be read from the v1 file (Rule 0: flagged, not approximated away).\n */\n\nexport type BreadcrumbProps = React.ComponentProps<\"nav\"> & {\n separator?: React.ReactNode\n}\n\nconst useStyles = makeVoltStyles({\n list: {\n display: \"flex\",\n alignItems: \"center\",\n // gap-2\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textBase,\n lineHeight: tokens.leadingBase,\n },\n separator: {\n color: tokens.semGrayLight,\n },\n item: {\n display: \"inline-flex\",\n alignItems: \"center\",\n // gap-1\n ...shorthands.gap(tokens.spacingElement1),\n },\n link: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.semGrayLight,\n transitionProperty:\n \"color, background-color, border-color, text-decoration-color, fill, stroke\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n cursor: \"pointer\",\n \":hover\": {\n color: tokens.semGrayDefault,\n textDecorationLine: \"underline\",\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n },\n page: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.semGrayDefault,\n },\n})\n\nexport const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\n function Breadcrumb({ separator = \"/\", className, children, ...props }, ref) {\n const styles = useStyles()\n const items = React.Children.toArray(children).filter(React.isValidElement)\n\n return (\n <nav\n ref={ref}\n data-slot=\"breadcrumb\"\n {...{ [SLOT_ATTR]: \"breadcrumb\" }}\n aria-label=\"Breadcrumb\"\n className={className}\n {...props}\n >\n <ol className={styles.list}>\n {items.map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={styles.separator}\n >\n {separator}\n </li>\n )}\n {child}\n </React.Fragment>\n ))}\n </ol>\n </nav>\n )\n }\n)\n\nexport type BreadcrumbItemProps = Omit<React.ComponentProps<\"a\">, \"href\"> & {\n href?: string\n isCurrent?: boolean\n /**\n * Render the child instead of the built-in `a`, keeping the link styling and slot markers. This\n * is how a consumer supplies a router link. v1 supports it; it was dropped here while the package\n * was on Base UI and restored once it moved back to Radix.\n */\n asChild?: boolean\n}\n\nexport const BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbItemProps\n>(function BreadcrumbItem(\n { href, isCurrent = false, className, children, asChild = false, ...props },\n ref\n) {\n const styles = useStyles()\n const isLink = !!href\n\n const LinkRoot = asChild ? Slot : \"a\"\n\n const content =\n isLink || asChild ? (\n <LinkRoot\n data-slot=\"breadcrumb-link\"\n {...{ [SLOT_ATTR]: \"breadcrumb-link\" }}\n {...(href ? { href } : {})}\n className={mergeClasses(styles.link, className)}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n {...props}\n >\n {children}\n </LinkRoot>\n ) : (\n <span\n data-slot=\"breadcrumb-page\"\n {...{ [SLOT_ATTR]: \"breadcrumb-page\" }}\n className={mergeClasses(styles.page, className)}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n >\n {children}\n </span>\n )\n\n return (\n <li\n ref={ref}\n data-slot=\"breadcrumb-item\"\n {...{ [SLOT_ATTR]: \"breadcrumb-item\" }}\n className={styles.item}\n >\n {content}\n </li>\n )\n})\n"],"names":["useStyles","makeVoltStyles","shorthands","tokens.spacingElement2","tokens.textBase","tokens.leadingBase","tokens.semGrayLight","tokens.spacingElement1","tokens.fontWeightSemibold","tokens.semGrayDefault","tokens.accentA8","Breadcrumb","React","separator","className","children","props","ref","styles","items","
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\n/**\n * Breadcrumb — Card's compound pattern applied to the nav / ol / li structure.\n *\n * v1's `Breadcrumb` walks its children and interleaves a presentational separator `<li>` between\n * them; `BreadcrumbItem` decides between a link and a plain page by whether a `href` exists. The\n * `nav` / `ol` / `li` semantics and the `aria-current=\"page\"` handling are the real value of this\n * component and are reproduced exactly.\n *\n * v1 renders the link branch through Radix `Slot` when `asChild` is set — dropped here per\n * CONVENTIONS rule 6 (no Radix dependency). There is no `asChild` escape hatch; a consumer wanting\n * a non-`<a>` link anchors it themselves.\n *\n * `BreadcrumbItem` with a `href` renders an `<a>` (slot `breadcrumb-link`); without one, a `<span>`\n * (slot `breadcrumb-page`). Either way the item is wrapped in a `breadcrumb-item` `<li>`. The nav\n * itself has no base styles in v1 — it is left to the caller's className — so it carries only the\n * slot attributes.\n *\n * The link's `transition-colors` expands to Tailwind v4's default property list plus the 150ms\n * `cubic-bezier(0.4, 0, 0.2, 1)` easing — literals from the framework's default theme, which is\n * visible motion and cannot be read from the v1 file (Rule 0: flagged, not approximated away).\n */\n\nexport type BreadcrumbProps = React.ComponentProps<\"nav\"> & {\n separator?: React.ReactNode\n}\n\nconst useStyles = makeVoltStyles({\n list: {\n display: \"flex\",\n alignItems: \"center\",\n // gap-2\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textBase,\n lineHeight: tokens.leadingBase,\n },\n separator: {\n color: tokens.semGrayLight,\n },\n item: {\n display: \"inline-flex\",\n alignItems: \"center\",\n // gap-1\n ...shorthands.gap(tokens.spacingElement1),\n },\n link: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.semGrayLight,\n transitionProperty:\n \"color, background-color, border-color, text-decoration-color, fill, stroke\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n cursor: \"pointer\",\n \":hover\": {\n color: tokens.semGrayDefault,\n textDecorationLine: \"underline\",\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n },\n page: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.semGrayDefault,\n },\n})\n\nexport const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\n function Breadcrumb({ separator = \"/\", className, children, ...props }, ref) {\n const styles = useStyles()\n const items = React.Children.toArray(children).filter(React.isValidElement)\n\n return (\n <nav\n ref={ref}\n data-slot=\"breadcrumb\"\n {...{ [SLOT_ATTR]: \"breadcrumb\" }}\n aria-label=\"Breadcrumb\"\n className={className}\n {...props}\n >\n <ol className={styles.list}>\n {items.map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={styles.separator}\n >\n {separator}\n </li>\n )}\n {child}\n </React.Fragment>\n ))}\n </ol>\n </nav>\n )\n }\n)\n\nexport type BreadcrumbItemProps = Omit<React.ComponentProps<\"a\">, \"href\"> & {\n href?: string\n isCurrent?: boolean\n /**\n * Render the child instead of the built-in `a`, keeping the link styling and slot markers. This\n * is how a consumer supplies a router link. v1 supports it; it was dropped here while the package\n * was on Base UI and restored once it moved back to Radix.\n */\n asChild?: boolean\n}\n\nexport const BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbItemProps\n>(function BreadcrumbItem(\n { href, isCurrent = false, className, children, asChild = false, ...props },\n ref\n) {\n const styles = useStyles()\n const isLink = !!href\n\n const LinkRoot = asChild ? Slot : \"a\"\n\n const content =\n isLink || asChild ? (\n <LinkRoot\n data-slot=\"breadcrumb-link\"\n {...{ [SLOT_ATTR]: \"breadcrumb-link\" }}\n {...(href ? { href } : {})}\n className={mergeClasses(styles.link, className)}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n {...props}\n >\n {children}\n </LinkRoot>\n ) : (\n <span\n data-slot=\"breadcrumb-page\"\n {...{ [SLOT_ATTR]: \"breadcrumb-page\" }}\n className={mergeClasses(styles.page, className)}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n >\n {children}\n </span>\n )\n\n return (\n <li\n ref={ref}\n data-slot=\"breadcrumb-item\"\n {...{ [SLOT_ATTR]: \"breadcrumb-item\" }}\n className={styles.item}\n >\n {content}\n </li>\n )\n})\n"],"names":["useStyles","makeVoltStyles","shorthands","tokens.spacingElement2","tokens.textBase","tokens.leadingBase","tokens.semGrayLight","tokens.spacingElement1","tokens.fontWeightSemibold","tokens.semGrayDefault","tokens.accentA8","Breadcrumb","React","separator","className","children","props","ref","styles","items","jsx","SLOT_ATTR","child","index","jsxs","BreadcrumbItem","href","isCurrent","asChild","content","Slot","mergeClasses"],"mappings":";;;;;;;;AAmCA,MAAMA,IAAYC,EAAe;AAAA,EAC/B,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA;AAAA,IAEZ,GAAGC,EAAW,IAAIC,CAAsB;AAAA,IACxC,UAAUC;AAAAA,IACV,YAAYC;AAAAA,EAAO;AAAA,EAErB,WAAW;AAAA,IACT,OAAOC;AAAAA,EAAO;AAAA,EAEhB,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA;AAAA,IAEZ,GAAGJ,EAAW,IAAIK,CAAsB;AAAA,EAAA;AAAA,EAE1C,MAAM;AAAA,IACJ,YAAYC;AAAAA,IACZ,OAAOF;AAAAA,IACP,oBACE;AAAA,IACF,oBAAoB;AAAA,IACpB,0BAA0B;AAAA,IAC1B,QAAQ;AAAA,IACR,UAAU;AAAA,MACR,OAAOG;AAAAA,MACP,oBAAoB;AAAA,IAAA;AAAA,IAEtB,kBAAkB;AAAA,MAChB,cAAc;AAAA,MACd,cAAc;AAAA,MACd,eAAe;AAAA,MACf,cAAcC;AAAAA,IAAO;AAAA,EACvB;AAAA,EAEF,MAAM;AAAA,IACJ,YAAYF;AAAAA,IACZ,OAAOC;AAA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