@kanso-labs/kanso-ui 0.2.0 → 0.4.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/assets/stylex.css +32 -0
- package/dist/cjs/assets/stylex.css +32 -0
- package/dist/cjs/components/code/index.cjs +51 -0
- package/dist/cjs/components/code/index.cjs.map +1 -0
- package/dist/cjs/components/code/index.d.cts +11 -0
- package/dist/cjs/components/copy-field/index.cjs +59 -0
- package/dist/cjs/components/copy-field/index.cjs.map +1 -0
- package/dist/cjs/components/copy-field/index.d.cts +36 -0
- package/dist/cjs/components/index.d.cts +4 -1
- package/dist/cjs/components/keycap/index.cjs +52 -0
- package/dist/cjs/components/keycap/index.cjs.map +1 -0
- package/dist/cjs/components/keycap/index.d.cts +12 -0
- package/dist/cjs/index.cjs +24 -18
- package/dist/cjs/index.d.cts +4 -1
- package/dist/components/code/index.d.ts +11 -0
- package/dist/components/code/index.js +51 -0
- package/dist/components/code/index.js.map +1 -0
- package/dist/components/copy-field/index.d.ts +36 -0
- package/dist/components/copy-field/index.js +59 -0
- package/dist/components/copy-field/index.js.map +1 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/components/keycap/index.d.ts +12 -0
- package/dist/components/keycap/index.js +52 -0
- package/dist/components/keycap/index.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/package.json +2 -2
package/dist/assets/stylex.css
CHANGED
|
@@ -123,6 +123,10 @@
|
|
|
123
123
|
padding-block: var(--x6borv4);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
.xmqoko8 {
|
|
127
|
+
padding-block: var(--xbmbo34);
|
|
128
|
+
}
|
|
129
|
+
|
|
126
130
|
.x1cmllll {
|
|
127
131
|
padding-block: var(--xod9tvo);
|
|
128
132
|
}
|
|
@@ -135,6 +139,10 @@
|
|
|
135
139
|
padding-inline: var(--x196ey9q);
|
|
136
140
|
}
|
|
137
141
|
|
|
142
|
+
.xdomwbk {
|
|
143
|
+
padding-inline: var(--x1ug6acx);
|
|
144
|
+
}
|
|
145
|
+
|
|
138
146
|
.x790zyz {
|
|
139
147
|
padding-inline: var(--x3km7fe);
|
|
140
148
|
}
|
|
@@ -301,6 +309,10 @@
|
|
|
301
309
|
box-shadow: var(--xt04dnm);
|
|
302
310
|
}
|
|
303
311
|
|
|
312
|
+
.x1hyvwdk {
|
|
313
|
+
clip-path: inset(50%);
|
|
314
|
+
}
|
|
315
|
+
|
|
304
316
|
.x1xj74d8 {
|
|
305
317
|
color: color-mix(in srgb,var(--xn0syi6) calc(var(--xu361ij) * 100%),var(--x1dzgr7y));
|
|
306
318
|
}
|
|
@@ -373,6 +385,10 @@
|
|
|
373
385
|
display: flex;
|
|
374
386
|
}
|
|
375
387
|
|
|
388
|
+
.x1rg5ohu {
|
|
389
|
+
display: inline-block;
|
|
390
|
+
}
|
|
391
|
+
|
|
376
392
|
.x3nfvp2 {
|
|
377
393
|
display: inline-flex;
|
|
378
394
|
}
|
|
@@ -453,6 +469,14 @@
|
|
|
453
469
|
font-family: var(--xyhb918);
|
|
454
470
|
}
|
|
455
471
|
|
|
472
|
+
.xuegzgz {
|
|
473
|
+
font-size: .8125em;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.x1s8wshw {
|
|
477
|
+
font-size: .875em;
|
|
478
|
+
}
|
|
479
|
+
|
|
456
480
|
.xwsyq91 {
|
|
457
481
|
font-size: 20px;
|
|
458
482
|
}
|
|
@@ -677,6 +701,10 @@
|
|
|
677
701
|
letter-spacing: var(--xw822is);
|
|
678
702
|
}
|
|
679
703
|
|
|
704
|
+
.x37zpob {
|
|
705
|
+
line-height: 1.4;
|
|
706
|
+
}
|
|
707
|
+
|
|
680
708
|
.xv61bfh {
|
|
681
709
|
line-height: var(--x1j54qr5);
|
|
682
710
|
}
|
|
@@ -769,6 +797,10 @@
|
|
|
769
797
|
outline-width: 2px;
|
|
770
798
|
}
|
|
771
799
|
|
|
800
|
+
.xj0a0fe {
|
|
801
|
+
overflow-wrap: anywhere;
|
|
802
|
+
}
|
|
803
|
+
|
|
772
804
|
.x47corl {
|
|
773
805
|
pointer-events: none;
|
|
774
806
|
}
|
|
@@ -123,6 +123,10 @@
|
|
|
123
123
|
padding-block: var(--x6borv4);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
.xmqoko8 {
|
|
127
|
+
padding-block: var(--xbmbo34);
|
|
128
|
+
}
|
|
129
|
+
|
|
126
130
|
.x1cmllll {
|
|
127
131
|
padding-block: var(--xod9tvo);
|
|
128
132
|
}
|
|
@@ -135,6 +139,10 @@
|
|
|
135
139
|
padding-inline: var(--x196ey9q);
|
|
136
140
|
}
|
|
137
141
|
|
|
142
|
+
.xdomwbk {
|
|
143
|
+
padding-inline: var(--x1ug6acx);
|
|
144
|
+
}
|
|
145
|
+
|
|
138
146
|
.x790zyz {
|
|
139
147
|
padding-inline: var(--x3km7fe);
|
|
140
148
|
}
|
|
@@ -301,6 +309,10 @@
|
|
|
301
309
|
box-shadow: var(--xt04dnm);
|
|
302
310
|
}
|
|
303
311
|
|
|
312
|
+
.x1hyvwdk {
|
|
313
|
+
clip-path: inset(50%);
|
|
314
|
+
}
|
|
315
|
+
|
|
304
316
|
.x1xj74d8 {
|
|
305
317
|
color: color-mix(in srgb,var(--xn0syi6) calc(var(--xu361ij) * 100%),var(--x1dzgr7y));
|
|
306
318
|
}
|
|
@@ -373,6 +385,10 @@
|
|
|
373
385
|
display: flex;
|
|
374
386
|
}
|
|
375
387
|
|
|
388
|
+
.x1rg5ohu {
|
|
389
|
+
display: inline-block;
|
|
390
|
+
}
|
|
391
|
+
|
|
376
392
|
.x3nfvp2 {
|
|
377
393
|
display: inline-flex;
|
|
378
394
|
}
|
|
@@ -453,6 +469,14 @@
|
|
|
453
469
|
font-family: var(--xyhb918);
|
|
454
470
|
}
|
|
455
471
|
|
|
472
|
+
.xuegzgz {
|
|
473
|
+
font-size: .8125em;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.x1s8wshw {
|
|
477
|
+
font-size: .875em;
|
|
478
|
+
}
|
|
479
|
+
|
|
456
480
|
.xwsyq91 {
|
|
457
481
|
font-size: 20px;
|
|
458
482
|
}
|
|
@@ -677,6 +701,10 @@
|
|
|
677
701
|
letter-spacing: var(--xw822is);
|
|
678
702
|
}
|
|
679
703
|
|
|
704
|
+
.x37zpob {
|
|
705
|
+
line-height: 1.4;
|
|
706
|
+
}
|
|
707
|
+
|
|
680
708
|
.xv61bfh {
|
|
681
709
|
line-height: var(--x1j54qr5);
|
|
682
710
|
}
|
|
@@ -769,6 +797,10 @@
|
|
|
769
797
|
outline-width: 2px;
|
|
770
798
|
}
|
|
771
799
|
|
|
800
|
+
.xj0a0fe {
|
|
801
|
+
overflow-wrap: anywhere;
|
|
802
|
+
}
|
|
803
|
+
|
|
772
804
|
.x47corl {
|
|
773
805
|
pointer-events: none;
|
|
774
806
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
2
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
|
+
//#region src/components/code/index.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A fragment of code, a path, or an identifier set in the mono face. It
|
|
6
|
+
* renders a `<code>` and takes its scale from the text around it.
|
|
7
|
+
*/
|
|
8
|
+
function Code(t0) {
|
|
9
|
+
const $ = (0, react_compiler_runtime.c)(9);
|
|
10
|
+
let props;
|
|
11
|
+
let render;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({render, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = props;
|
|
16
|
+
$[2] = render;
|
|
17
|
+
} else {
|
|
18
|
+
props = $[1];
|
|
19
|
+
render = $[2];
|
|
20
|
+
}
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
23
|
+
t1 = { className: "x139gbkf xbppi91 x1s8wshw xj0a0fe" };
|
|
24
|
+
$[3] = t1;
|
|
25
|
+
} else t1 = $[3];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[4] !== props) {
|
|
28
|
+
t2 = {
|
|
29
|
+
...props,
|
|
30
|
+
...t1
|
|
31
|
+
};
|
|
32
|
+
$[4] = props;
|
|
33
|
+
$[5] = t2;
|
|
34
|
+
} else t2 = $[5];
|
|
35
|
+
let t3;
|
|
36
|
+
if ($[6] !== render || $[7] !== t2) {
|
|
37
|
+
t3 = {
|
|
38
|
+
defaultTagName: "code",
|
|
39
|
+
props: t2,
|
|
40
|
+
render
|
|
41
|
+
};
|
|
42
|
+
$[6] = render;
|
|
43
|
+
$[7] = t2;
|
|
44
|
+
$[8] = t3;
|
|
45
|
+
} else t3 = $[8];
|
|
46
|
+
return (0, _base_ui_react_use_render.useRender)(t3);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
exports.default = Code;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/components/code/index.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport * as stylex from '@stylexjs/stylex';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, typography } from '../../tokens/design.tokens.stylex';\n\n// Sized in em rather than px, so a fragment of code takes the scale of\n// whatever it interrupts. A mono face at the same nominal size as the prose\n// around it reads a little larger — its glyphs are wider and its x-height\n// taller — so 0.875em is what makes the two look level rather than what makes\n// them measure the same.\n//\n// No background. The mono face against the serif and sans faces the rest of\n// the system uses is already an unmistakable signal, and a tint here would\n// introduce a second surface inside Card and Sheet, competing with the\n// hierarchy those already establish. A call site wanting one can wrap this.\n\ntype CodeProps = useRender.ComponentProps<'code'>;\n\n/**\n * A fragment of code, a path, or an identifier set in the mono face. It\n * renders a `<code>` and takes its scale from the text around it.\n */\nfunction Code({\n render,\n ...props\n}: CodeProps) {\n // stylex.props() spreads after `props` for the same reason Text and Currency\n // do it: it wins over a consumer-supplied className rather than merging with\n // one, so which of the two applies is not left to stylesheet order.\n return useRender({\n defaultTagName: 'code',\n props: {\n ...props,\n ...{\n className: \"x139gbkf xbppi91 x1s8wshw xj0a0fe\"\n }\n },\n render\n });\n}\nexport type { CodeProps };\nexport default Code;"],"mappings":";;;;;;;AAsBA,SAAA,KAAA,IAAA;CAAA,MAAA,KAAA,GAAA,uBAAA,EAAA,CAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAc,CAAA,CAAA,WAAA,SAAA;EAGF,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,QAAA,EAAA;EAAA,SAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EAQH,KAAA,EAAA,WACU,oCACb;EAAC,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA;EAJI,KAAA;GAAA,GACF;GAAK,GACL;EAGL;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,UAAA,EAAA,OAAA,IAAA;EAPc,KAAA;GAAA,gBACC;GAAM,OACf;GAKN;EAEH;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,QAAA,GATM,0BAAA,UAAA,CAAU,EAShB;AAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
//#region src/components/code/index.d.ts
|
|
3
|
+
type CodeProps = useRender.ComponentProps<'code'>;
|
|
4
|
+
/**
|
|
5
|
+
* A fragment of code, a path, or an identifier set in the mono face. It
|
|
6
|
+
* renders a `<code>` and takes its scale from the text around it.
|
|
7
|
+
*/
|
|
8
|
+
declare function Code({ render, ...props }: CodeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { type CodeProps, Code as default };
|
|
11
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const require_index = require("../button/index.cjs");
|
|
2
|
+
const require_index$1 = require("../code/index.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let react = require("react");
|
|
5
|
+
//#region src/components/copy-field/index.tsx
|
|
6
|
+
const COPIED_RESET_MS = 2e3;
|
|
7
|
+
/**
|
|
8
|
+
* A value to be read and taken away — a repository URL, a token, a command.
|
|
9
|
+
* It shows the value in the mono face and copies it on request, confirming
|
|
10
|
+
* on the button itself.
|
|
11
|
+
*/
|
|
12
|
+
function CopyField({ copiedLabel = "Copied", copyLabel = "Copy", onCopied, value, ...props }) {
|
|
13
|
+
const [copied, setCopied] = (0, react.useState)(false);
|
|
14
|
+
const timer = (0, react.useRef)(void 0);
|
|
15
|
+
(0, react.useEffect)(() => () => {
|
|
16
|
+
clearTimeout(timer.current);
|
|
17
|
+
}, []);
|
|
18
|
+
const handleCopy = (0, react.useCallback)(() => {
|
|
19
|
+
const write = async () => {
|
|
20
|
+
try {
|
|
21
|
+
await navigator.clipboard.writeText(value);
|
|
22
|
+
} catch {
|
|
23
|
+
setCopied(false);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
setCopied(true);
|
|
27
|
+
onCopied?.(value);
|
|
28
|
+
clearTimeout(timer.current);
|
|
29
|
+
timer.current = setTimeout(() => {
|
|
30
|
+
setCopied(false);
|
|
31
|
+
}, COPIED_RESET_MS);
|
|
32
|
+
};
|
|
33
|
+
write();
|
|
34
|
+
}, [onCopied, value]);
|
|
35
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
36
|
+
...props,
|
|
37
|
+
className: "x6s0dn4 x14s9m32 x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x78zum5 x126z3so xmqoko8 x18fpw6u",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
40
|
+
className: "x1iyjqo2 x1b35g6e xeuugli",
|
|
41
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$1.default, { children: value })
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.default, {
|
|
44
|
+
onClick: handleCopy,
|
|
45
|
+
size: "xs",
|
|
46
|
+
variant: "text",
|
|
47
|
+
children: copied ? copiedLabel : copyLabel
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("output", {
|
|
50
|
+
className: "xjm9jq1 x1hyvwdk x1i1rx1s xb3r6kr x10l6tqk xuxw1ft",
|
|
51
|
+
children: copied ? copiedLabel : ""
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
exports.default = CopyField;
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/components/copy-field/index.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport Code from '../code';\n\n// How long the confirmation stands before the control returns to offering the\n// copy again. Not a motion token: those are transition durations, measured in\n// hundreds of milliseconds, and this is a dwell — long enough to be read\n// without being long enough to leave the button lying about what it will do.\nconst COPIED_RESET_MS = 2000;\ntype CopyFieldProps = {\n /**\n * What the button says once the value has been copied. It reverts to\n * `copyLabel` on its own after a couple of seconds.\n * @default 'Copied'\n */\n copiedLabel?: string;\n /**\n * What the button says at rest.\n * @default 'Copy'\n */\n copyLabel?: string;\n /**\n * Called with the value after it reaches the clipboard, never before.\n *\n * Named `onCopied` rather than `onCopy` because the root is a `<div>`, which\n * already has an `onCopy` of its own — React's handler for the native copy\n * event, fired when the reader presses the copy shortcut inside the element.\n * The two are different moments, and a prop that quietly shadowed the\n * built-in would be a trap rather than a convenience.\n */\n onCopied?: (value: string) => void;\n /** The text shown, and the text copied. */\n value: string;\n} & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;\n\n/**\n * A value to be read and taken away — a repository URL, a token, a command.\n * It shows the value in the mono face and copies it on request, confirming\n * on the button itself.\n */\nfunction CopyField({\n copiedLabel = 'Copied',\n copyLabel = 'Copy',\n onCopied,\n value,\n ...props\n}: CopyFieldProps) {\n const [copied, setCopied] = useState(false);\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n // Without this, a field unmounted inside the dwell leaves a timer holding a\n // setState for a tree that is gone.\n useEffect(() => () => {\n clearTimeout(timer.current);\n }, []);\n const handleCopy = useCallback(() => {\n const write = async () => {\n try {\n await navigator.clipboard.writeText(value);\n } catch {\n // A clipboard write is refused outside a secure context and wherever\n // the permission is denied, and neither is something the call site can\n // fix. Staying at rest is the honest report: the value is not on the\n // clipboard, so the control must not claim it is.\n setCopied(false);\n return;\n }\n setCopied(true);\n onCopied?.(value);\n clearTimeout(timer.current);\n timer.current = setTimeout(() => {\n setCopied(false);\n }, COPIED_RESET_MS);\n };\n void write();\n }, [onCopied, value]);\n return <div {...props} className=\"x6s0dn4 x14s9m32 x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x78zum5 x126z3so xmqoko8 x18fpw6u\">\n <span className=\"x1iyjqo2 x1b35g6e xeuugli\">\n <Code>{value}</Code>\n </span>\n <Button onClick={handleCopy} size=\"xs\" variant=\"text\">\n {copied ? copiedLabel : copyLabel}\n </Button>\n {/* The button's own label changes, but a label changing under a screen\n reader is not reliably announced. This is. `<output>` carries an\n implicit role of status, so it needs no role attribute of its own. */}\n <output className=\"xjm9jq1 x1hyvwdk x1i1rx1s xb3r6kr x10l6tqk xuxw1ft\">\n {copied ? copiedLabel : ''}\n </output>\n </div>;\n}\nexport type { CopyFieldProps };\nexport default CopyField;"],"mappings":";;;;;AAYA,MAAM,kBAAkB;;;;;;AAgCxB,SAAS,UAAU,EACjB,cAAc,UACd,YAAY,QACZ,UACA,OACA,GAAG,SACc;CACjB,MAAM,CAAC,QAAQ,cAAA,GAAa,MAAA,SAAA,CAAS,KAAK;CAC1C,MAAM,SAAA,GAAQ,MAAA,OAAA,CAAkD,KAAA,CAAS;CAIzE,CAAA,GAAA,MAAA,UAAA,aAAsB;EACpB,aAAa,MAAM,OAAO;CAC5B,GAAG,CAAA,CAAE;CACL,MAAM,cAAA,GAAa,MAAA,YAAA,OAAkB;EACnC,MAAM,QAAQ,YAAY;GACxB,IAAI;IACF,MAAM,UAAU,UAAU,UAAU,KAAK;GAC3C,QAAQ;IAKN,UAAU,KAAK;IACf;GACF;GACA,UAAU,IAAI;GACd,WAAW,KAAK;GAChB,aAAa,MAAM,OAAO;GAC1B,MAAM,UAAU,iBAAiB;IAC/B,UAAU,KAAK;GACjB,GAAG,eAAe;EACpB;EACA,MAAW;CACb,GAAG,CAAC,UAAU,KAAK,CAAC;CACpB,OAAO,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,GAAI;EAAO,WAAU;EAA1B,UAAA;GACH,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAU;IACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAA,SAAD,EAAA,UAAO,MAAY,CAAA;GACf,CAAA;GACN,iBAAA,GAAA,kBAAA,IAAA,CAAC,cAAA,SAAD;IAAQ,SAAS;IAAY,MAAK;IAAK,SAAQ;IAC5C,UAAA,SAAS,cAAc;GAClB,CAAA;GAIR,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAQ,WAAU;IACf,UAAA,SAAS,cAAc;GAClB,CAAA;EACL;;AACT"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/copy-field/index.d.ts
|
|
3
|
+
type CopyFieldProps = {
|
|
4
|
+
/**
|
|
5
|
+
* What the button says once the value has been copied. It reverts to
|
|
6
|
+
* `copyLabel` on its own after a couple of seconds.
|
|
7
|
+
* @default 'Copied'
|
|
8
|
+
*/
|
|
9
|
+
copiedLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* What the button says at rest.
|
|
12
|
+
* @default 'Copy'
|
|
13
|
+
*/
|
|
14
|
+
copyLabel?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Called with the value after it reaches the clipboard, never before.
|
|
17
|
+
*
|
|
18
|
+
* Named `onCopied` rather than `onCopy` because the root is a `<div>`, which
|
|
19
|
+
* already has an `onCopy` of its own — React's handler for the native copy
|
|
20
|
+
* event, fired when the reader presses the copy shortcut inside the element.
|
|
21
|
+
* The two are different moments, and a prop that quietly shadowed the
|
|
22
|
+
* built-in would be a trap rather than a convenience.
|
|
23
|
+
*/
|
|
24
|
+
onCopied?: (value: string) => void;
|
|
25
|
+
/** The text shown, and the text copied. */
|
|
26
|
+
value: string;
|
|
27
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
28
|
+
/**
|
|
29
|
+
* A value to be read and taken away — a repository URL, a token, a command.
|
|
30
|
+
* It shows the value in the mono face and copies it on request, confirming
|
|
31
|
+
* on the button itself.
|
|
32
|
+
*/
|
|
33
|
+
declare function CopyField({ copiedLabel, copyLabel, onCopied, value, ...props }: CopyFieldProps): import("react").JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { type CopyFieldProps, CopyField as default };
|
|
36
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -3,8 +3,11 @@ import Badge, { BadgeProps } from "./badge/index.cjs";
|
|
|
3
3
|
import Button, { ButtonProps } from "./button/index.cjs";
|
|
4
4
|
import Card, { CardProps } from "./card/index.cjs";
|
|
5
5
|
import Chip, { ChipProps } from "./chip/index.cjs";
|
|
6
|
+
import Code, { CodeProps } from "./code/index.cjs";
|
|
7
|
+
import CopyField, { CopyFieldProps } from "./copy-field/index.cjs";
|
|
6
8
|
import Currency, { CurrencyProps } from "./currency/index.cjs";
|
|
7
9
|
import IconButton, { IconButtonProps } from "./icon-button/index.cjs";
|
|
10
|
+
import Keycap, { KeycapProps } from "./keycap/index.cjs";
|
|
8
11
|
import Link, { LinkProps } from "./link/index.cjs";
|
|
9
12
|
import ListItem, { ListItemProps } from "./list-item/index.cjs";
|
|
10
13
|
import Separator, { SeparatorProps } from "./separator/index.cjs";
|
|
@@ -12,4 +15,4 @@ import Sheet, { SheetProps } from "./sheet/index.cjs";
|
|
|
12
15
|
import Tabs, { TabsProps } from "./tabs/index.cjs";
|
|
13
16
|
import Text, { TextProps } from "./text/index.cjs";
|
|
14
17
|
import TextField, { TextFieldProps } from "./text-field/index.cjs";
|
|
15
|
-
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
|
18
|
+
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Code, type CodeProps, CopyField, type CopyFieldProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Keycap, type KeycapProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
2
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
|
+
//#region src/components/keycap/index.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A single key on a keyboard, as named in an instruction — `Enter`, `Esc`,
|
|
6
|
+
* `Ctrl`. It renders a `<kbd>` and takes its scale from the text around it. A
|
|
7
|
+
* chord is several of these, combined at the call site.
|
|
8
|
+
*/
|
|
9
|
+
function Keycap(t0) {
|
|
10
|
+
const $ = (0, react_compiler_runtime.c)(9);
|
|
11
|
+
let props;
|
|
12
|
+
let render;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({render, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = props;
|
|
17
|
+
$[2] = render;
|
|
18
|
+
} else {
|
|
19
|
+
props = $[1];
|
|
20
|
+
render = $[2];
|
|
21
|
+
}
|
|
22
|
+
let t1;
|
|
23
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
24
|
+
t1 = { className: "xjbqb8w x1fwvt7v x1tfhd1 x1y0btm7 xmkeg23 x139gbkf x1rg5ohu xbppi91 xuegzgz x37zpob xt970qd xdomwbk xuxw1ft" };
|
|
25
|
+
$[3] = t1;
|
|
26
|
+
} else t1 = $[3];
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[4] !== props) {
|
|
29
|
+
t2 = {
|
|
30
|
+
...props,
|
|
31
|
+
...t1
|
|
32
|
+
};
|
|
33
|
+
$[4] = props;
|
|
34
|
+
$[5] = t2;
|
|
35
|
+
} else t2 = $[5];
|
|
36
|
+
let t3;
|
|
37
|
+
if ($[6] !== render || $[7] !== t2) {
|
|
38
|
+
t3 = {
|
|
39
|
+
defaultTagName: "kbd",
|
|
40
|
+
props: t2,
|
|
41
|
+
render
|
|
42
|
+
};
|
|
43
|
+
$[6] = render;
|
|
44
|
+
$[7] = t2;
|
|
45
|
+
$[8] = t3;
|
|
46
|
+
} else t3 = $[8];
|
|
47
|
+
return (0, _base_ui_react_use_render.useRender)(t3);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
exports.default = Keycap;
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/components/keycap/index.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport * as stylex from '@stylexjs/stylex';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../../tokens/design.tokens.stylex';\n\n// Named for the physical thing it draws rather than for the element it\n// renders. `Kbd` would match the tag, but a component library is read by\n// people writing call sites, not markup, and `Key` in that setting is already\n// spoken for several times over — an API key, an object key, React's own key\n// prop. A keycap is unambiguously the one on a keyboard.\n//\n// Sized in em for the same reason Code is: a key named inside a footnote and\n// one named inside a paragraph are the same component. The ratio is smaller\n// than Code's because the border adds height that the glyphs do not, and\n// matching Code's 0.875 leaves a keycap standing taller than the line it\n// sits in.\n//\n// Transparent rather than filled, so a keycap inside a Card or a Sheet does\n// not read as a nested surface. The border alone carries the metaphor.\n\ntype KeycapProps = useRender.ComponentProps<'kbd'>;\n\n/**\n * A single key on a keyboard, as named in an instruction — `Enter`, `Esc`,\n * `Ctrl`. It renders a `<kbd>` and takes its scale from the text around it. A\n * chord is several of these, combined at the call site.\n */\nfunction Keycap({\n render,\n ...props\n}: KeycapProps) {\n // stylex.props() spreads after `props` for the same reason Text and Currency\n // do it: it wins over a consumer-supplied className rather than merging with\n // one, so which of the two applies is not left to stylesheet order.\n return useRender({\n defaultTagName: 'kbd',\n props: {\n ...props,\n ...{\n className: \"xjbqb8w x1fwvt7v x1tfhd1 x1y0btm7 xmkeg23 x139gbkf x1rg5ohu xbppi91 xuegzgz x37zpob xt970qd xdomwbk xuxw1ft\"\n }\n },\n render\n });\n}\nexport type { KeycapProps };\nexport default Keycap;"],"mappings":";;;;;;;;AA2BA,SAAA,OAAA,IAAA;CAAA,MAAA,KAAA,GAAA,uBAAA,EAAA,CAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAgB,CAAA,CAAA,WAAA,SAAA;EAGF,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,QAAA,EAAA;EAAA,SAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EAQL,KAAA,EAAA,WACU,8GACb;EAAC,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA;EAJI,KAAA;GAAA,GACF;GAAK,GACL;EAGL;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,UAAA,EAAA,OAAA,IAAA;EAPc,KAAA;GAAA,gBACC;GAAK,OACd;GAKN;EAEH;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,QAAA,GATM,0BAAA,UAAA,CAAU,EAShB;AAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
//#region src/components/keycap/index.d.ts
|
|
3
|
+
type KeycapProps = useRender.ComponentProps<'kbd'>;
|
|
4
|
+
/**
|
|
5
|
+
* A single key on a keyboard, as named in an instruction — `Enter`, `Esc`,
|
|
6
|
+
* `Ctrl`. It renders a `<kbd>` and takes its scale from the text around it. A
|
|
7
|
+
* chord is several of these, combined at the call site.
|
|
8
|
+
*/
|
|
9
|
+
declare function Keycap({ render, ...props }: KeycapProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { type KeycapProps, Keycap as default };
|
|
12
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -4,26 +4,32 @@ const require_index$1 = require("./components/badge/index.cjs");
|
|
|
4
4
|
const require_index$2 = require("./components/button/index.cjs");
|
|
5
5
|
const require_index$3 = require("./components/card/index.cjs");
|
|
6
6
|
const require_index$4 = require("./components/chip/index.cjs");
|
|
7
|
-
const require_index$5 = require("./components/
|
|
8
|
-
const require_index$6 = require("./components/
|
|
9
|
-
const require_index$7 = require("./components/
|
|
10
|
-
const require_index$8 = require("./components/
|
|
11
|
-
const require_index$9 = require("./components/
|
|
12
|
-
const require_index$10 = require("./components/
|
|
13
|
-
const require_index$11 = require("./components/
|
|
14
|
-
const require_index$12 = require("./components/
|
|
15
|
-
const require_index$13 = require("./components/
|
|
7
|
+
const require_index$5 = require("./components/code/index.cjs");
|
|
8
|
+
const require_index$6 = require("./components/copy-field/index.cjs");
|
|
9
|
+
const require_index$7 = require("./components/currency/index.cjs");
|
|
10
|
+
const require_index$8 = require("./components/icon-button/index.cjs");
|
|
11
|
+
const require_index$9 = require("./components/keycap/index.cjs");
|
|
12
|
+
const require_index$10 = require("./components/link/index.cjs");
|
|
13
|
+
const require_index$11 = require("./components/list-item/index.cjs");
|
|
14
|
+
const require_index$12 = require("./components/separator/index.cjs");
|
|
15
|
+
const require_index$13 = require("./components/sheet/index.cjs");
|
|
16
|
+
const require_index$14 = require("./components/tabs/index.cjs");
|
|
17
|
+
const require_index$15 = require("./components/text/index.cjs");
|
|
18
|
+
const require_index$16 = require("./components/text-field/index.cjs");
|
|
16
19
|
exports.Avatar = require_index.default;
|
|
17
20
|
exports.Badge = require_index$1.default;
|
|
18
21
|
exports.Button = require_index$2.default;
|
|
19
22
|
exports.Card = require_index$3.default;
|
|
20
23
|
exports.Chip = require_index$4.default;
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
24
|
+
exports.Code = require_index$5.default;
|
|
25
|
+
exports.CopyField = require_index$6.default;
|
|
26
|
+
exports.Currency = require_index$7.default;
|
|
27
|
+
exports.IconButton = require_index$8.default;
|
|
28
|
+
exports.Keycap = require_index$9.default;
|
|
29
|
+
exports.Link = require_index$10.default;
|
|
30
|
+
exports.ListItem = require_index$11.default;
|
|
31
|
+
exports.Separator = require_index$12.default;
|
|
32
|
+
exports.Sheet = require_index$13.default;
|
|
33
|
+
exports.Tabs = require_index$14.default;
|
|
34
|
+
exports.Text = require_index$15.default;
|
|
35
|
+
exports.TextField = require_index$16.default;
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -3,8 +3,11 @@ import Badge, { BadgeProps } from "./components/badge/index.cjs";
|
|
|
3
3
|
import Button, { ButtonProps } from "./components/button/index.cjs";
|
|
4
4
|
import Card, { CardProps } from "./components/card/index.cjs";
|
|
5
5
|
import Chip, { ChipProps } from "./components/chip/index.cjs";
|
|
6
|
+
import Code, { CodeProps } from "./components/code/index.cjs";
|
|
7
|
+
import CopyField, { CopyFieldProps } from "./components/copy-field/index.cjs";
|
|
6
8
|
import Currency, { CurrencyProps } from "./components/currency/index.cjs";
|
|
7
9
|
import IconButton, { IconButtonProps } from "./components/icon-button/index.cjs";
|
|
10
|
+
import Keycap, { KeycapProps } from "./components/keycap/index.cjs";
|
|
8
11
|
import Link, { LinkProps } from "./components/link/index.cjs";
|
|
9
12
|
import ListItem, { ListItemProps } from "./components/list-item/index.cjs";
|
|
10
13
|
import Separator, { SeparatorProps } from "./components/separator/index.cjs";
|
|
@@ -13,4 +16,4 @@ import Tabs, { TabsProps } from "./components/tabs/index.cjs";
|
|
|
13
16
|
import Text, { TextProps } from "./components/text/index.cjs";
|
|
14
17
|
import TextField, { TextFieldProps } from "./components/text-field/index.cjs";
|
|
15
18
|
import "./components/index.cjs";
|
|
16
|
-
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
|
19
|
+
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Code, type CodeProps, CopyField, type CopyFieldProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Keycap, type KeycapProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
//#region src/components/code/index.d.ts
|
|
3
|
+
type CodeProps = useRender.ComponentProps<'code'>;
|
|
4
|
+
/**
|
|
5
|
+
* A fragment of code, a path, or an identifier set in the mono face. It
|
|
6
|
+
* renders a `<code>` and takes its scale from the text around it.
|
|
7
|
+
*/
|
|
8
|
+
declare function Code({ render, ...props }: CodeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { type CodeProps, Code as default };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
//#region src/components/code/index.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A fragment of code, a path, or an identifier set in the mono face. It
|
|
6
|
+
* renders a `<code>` and takes its scale from the text around it.
|
|
7
|
+
*/
|
|
8
|
+
function Code(t0) {
|
|
9
|
+
const $ = c(9);
|
|
10
|
+
let props;
|
|
11
|
+
let render;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({render, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = props;
|
|
16
|
+
$[2] = render;
|
|
17
|
+
} else {
|
|
18
|
+
props = $[1];
|
|
19
|
+
render = $[2];
|
|
20
|
+
}
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
23
|
+
t1 = { className: "x139gbkf xbppi91 x1s8wshw xj0a0fe" };
|
|
24
|
+
$[3] = t1;
|
|
25
|
+
} else t1 = $[3];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[4] !== props) {
|
|
28
|
+
t2 = {
|
|
29
|
+
...props,
|
|
30
|
+
...t1
|
|
31
|
+
};
|
|
32
|
+
$[4] = props;
|
|
33
|
+
$[5] = t2;
|
|
34
|
+
} else t2 = $[5];
|
|
35
|
+
let t3;
|
|
36
|
+
if ($[6] !== render || $[7] !== t2) {
|
|
37
|
+
t3 = {
|
|
38
|
+
defaultTagName: "code",
|
|
39
|
+
props: t2,
|
|
40
|
+
render
|
|
41
|
+
};
|
|
42
|
+
$[6] = render;
|
|
43
|
+
$[7] = t2;
|
|
44
|
+
$[8] = t3;
|
|
45
|
+
} else t3 = $[8];
|
|
46
|
+
return useRender(t3);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { Code as default };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/code/index.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport * as stylex from '@stylexjs/stylex';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, typography } from '../../tokens/design.tokens.stylex';\n\n// Sized in em rather than px, so a fragment of code takes the scale of\n// whatever it interrupts. A mono face at the same nominal size as the prose\n// around it reads a little larger — its glyphs are wider and its x-height\n// taller — so 0.875em is what makes the two look level rather than what makes\n// them measure the same.\n//\n// No background. The mono face against the serif and sans faces the rest of\n// the system uses is already an unmistakable signal, and a tint here would\n// introduce a second surface inside Card and Sheet, competing with the\n// hierarchy those already establish. A call site wanting one can wrap this.\n\ntype CodeProps = useRender.ComponentProps<'code'>;\n\n/**\n * A fragment of code, a path, or an identifier set in the mono face. It\n * renders a `<code>` and takes its scale from the text around it.\n */\nfunction Code({\n render,\n ...props\n}: CodeProps) {\n // stylex.props() spreads after `props` for the same reason Text and Currency\n // do it: it wins over a consumer-supplied className rather than merging with\n // one, so which of the two applies is not left to stylesheet order.\n return useRender({\n defaultTagName: 'code',\n props: {\n ...props,\n ...{\n className: \"x139gbkf xbppi91 x1s8wshw xj0a0fe\"\n }\n },\n render\n });\n}\nexport type { CodeProps };\nexport default Code;"],"mappings":";;;;;;;AAsBA,SAAA,KAAA,IAAA;CAAA,MAAA,IAAA,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAc,CAAA,CAAA,WAAA,SAAA;EAGF,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,QAAA,EAAA;EAAA,SAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EAQH,KAAA,EAAA,WACU,oCACb;EAAC,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA;EAJI,KAAA;GAAA,GACF;GAAK,GACL;EAGL;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,UAAA,EAAA,OAAA,IAAA;EAPc,KAAA;GAAA,gBACC;GAAM,OACf;GAKN;EAEH;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OATM,UAAU,EAShB;AAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/copy-field/index.d.ts
|
|
3
|
+
type CopyFieldProps = {
|
|
4
|
+
/**
|
|
5
|
+
* What the button says once the value has been copied. It reverts to
|
|
6
|
+
* `copyLabel` on its own after a couple of seconds.
|
|
7
|
+
* @default 'Copied'
|
|
8
|
+
*/
|
|
9
|
+
copiedLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* What the button says at rest.
|
|
12
|
+
* @default 'Copy'
|
|
13
|
+
*/
|
|
14
|
+
copyLabel?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Called with the value after it reaches the clipboard, never before.
|
|
17
|
+
*
|
|
18
|
+
* Named `onCopied` rather than `onCopy` because the root is a `<div>`, which
|
|
19
|
+
* already has an `onCopy` of its own — React's handler for the native copy
|
|
20
|
+
* event, fired when the reader presses the copy shortcut inside the element.
|
|
21
|
+
* The two are different moments, and a prop that quietly shadowed the
|
|
22
|
+
* built-in would be a trap rather than a convenience.
|
|
23
|
+
*/
|
|
24
|
+
onCopied?: (value: string) => void;
|
|
25
|
+
/** The text shown, and the text copied. */
|
|
26
|
+
value: string;
|
|
27
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
28
|
+
/**
|
|
29
|
+
* A value to be read and taken away — a repository URL, a token, a command.
|
|
30
|
+
* It shows the value in the mono face and copies it on request, confirming
|
|
31
|
+
* on the button itself.
|
|
32
|
+
*/
|
|
33
|
+
declare function CopyField({ copiedLabel, copyLabel, onCopied, value, ...props }: CopyFieldProps): import("react").JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { type CopyFieldProps, CopyField as default };
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Button from "../button/index.js";
|
|
2
|
+
import Code from "../code/index.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
5
|
+
//#region src/components/copy-field/index.tsx
|
|
6
|
+
const COPIED_RESET_MS = 2e3;
|
|
7
|
+
/**
|
|
8
|
+
* A value to be read and taken away — a repository URL, a token, a command.
|
|
9
|
+
* It shows the value in the mono face and copies it on request, confirming
|
|
10
|
+
* on the button itself.
|
|
11
|
+
*/
|
|
12
|
+
function CopyField({ copiedLabel = "Copied", copyLabel = "Copy", onCopied, value, ...props }) {
|
|
13
|
+
const [copied, setCopied] = useState(false);
|
|
14
|
+
const timer = useRef(void 0);
|
|
15
|
+
useEffect(() => () => {
|
|
16
|
+
clearTimeout(timer.current);
|
|
17
|
+
}, []);
|
|
18
|
+
const handleCopy = useCallback(() => {
|
|
19
|
+
const write = async () => {
|
|
20
|
+
try {
|
|
21
|
+
await navigator.clipboard.writeText(value);
|
|
22
|
+
} catch {
|
|
23
|
+
setCopied(false);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
setCopied(true);
|
|
27
|
+
onCopied?.(value);
|
|
28
|
+
clearTimeout(timer.current);
|
|
29
|
+
timer.current = setTimeout(() => {
|
|
30
|
+
setCopied(false);
|
|
31
|
+
}, COPIED_RESET_MS);
|
|
32
|
+
};
|
|
33
|
+
write();
|
|
34
|
+
}, [onCopied, value]);
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
...props,
|
|
37
|
+
className: "x6s0dn4 x14s9m32 x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x78zum5 x126z3so xmqoko8 x18fpw6u",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx("span", {
|
|
40
|
+
className: "x1iyjqo2 x1b35g6e xeuugli",
|
|
41
|
+
children: /* @__PURE__ */ jsx(Code, { children: value })
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx(Button, {
|
|
44
|
+
onClick: handleCopy,
|
|
45
|
+
size: "xs",
|
|
46
|
+
variant: "text",
|
|
47
|
+
children: copied ? copiedLabel : copyLabel
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx("output", {
|
|
50
|
+
className: "xjm9jq1 x1hyvwdk x1i1rx1s xb3r6kr x10l6tqk xuxw1ft",
|
|
51
|
+
children: copied ? copiedLabel : ""
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { CopyField as default };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/copy-field/index.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport Code from '../code';\n\n// How long the confirmation stands before the control returns to offering the\n// copy again. Not a motion token: those are transition durations, measured in\n// hundreds of milliseconds, and this is a dwell — long enough to be read\n// without being long enough to leave the button lying about what it will do.\nconst COPIED_RESET_MS = 2000;\ntype CopyFieldProps = {\n /**\n * What the button says once the value has been copied. It reverts to\n * `copyLabel` on its own after a couple of seconds.\n * @default 'Copied'\n */\n copiedLabel?: string;\n /**\n * What the button says at rest.\n * @default 'Copy'\n */\n copyLabel?: string;\n /**\n * Called with the value after it reaches the clipboard, never before.\n *\n * Named `onCopied` rather than `onCopy` because the root is a `<div>`, which\n * already has an `onCopy` of its own — React's handler for the native copy\n * event, fired when the reader presses the copy shortcut inside the element.\n * The two are different moments, and a prop that quietly shadowed the\n * built-in would be a trap rather than a convenience.\n */\n onCopied?: (value: string) => void;\n /** The text shown, and the text copied. */\n value: string;\n} & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;\n\n/**\n * A value to be read and taken away — a repository URL, a token, a command.\n * It shows the value in the mono face and copies it on request, confirming\n * on the button itself.\n */\nfunction CopyField({\n copiedLabel = 'Copied',\n copyLabel = 'Copy',\n onCopied,\n value,\n ...props\n}: CopyFieldProps) {\n const [copied, setCopied] = useState(false);\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n // Without this, a field unmounted inside the dwell leaves a timer holding a\n // setState for a tree that is gone.\n useEffect(() => () => {\n clearTimeout(timer.current);\n }, []);\n const handleCopy = useCallback(() => {\n const write = async () => {\n try {\n await navigator.clipboard.writeText(value);\n } catch {\n // A clipboard write is refused outside a secure context and wherever\n // the permission is denied, and neither is something the call site can\n // fix. Staying at rest is the honest report: the value is not on the\n // clipboard, so the control must not claim it is.\n setCopied(false);\n return;\n }\n setCopied(true);\n onCopied?.(value);\n clearTimeout(timer.current);\n timer.current = setTimeout(() => {\n setCopied(false);\n }, COPIED_RESET_MS);\n };\n void write();\n }, [onCopied, value]);\n return <div {...props} className=\"x6s0dn4 x14s9m32 x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x78zum5 x126z3so xmqoko8 x18fpw6u\">\n <span className=\"x1iyjqo2 x1b35g6e xeuugli\">\n <Code>{value}</Code>\n </span>\n <Button onClick={handleCopy} size=\"xs\" variant=\"text\">\n {copied ? copiedLabel : copyLabel}\n </Button>\n {/* The button's own label changes, but a label changing under a screen\n reader is not reliably announced. This is. `<output>` carries an\n implicit role of status, so it needs no role attribute of its own. */}\n <output className=\"xjm9jq1 x1hyvwdk x1i1rx1s xb3r6kr x10l6tqk xuxw1ft\">\n {copied ? copiedLabel : ''}\n </output>\n </div>;\n}\nexport type { CopyFieldProps };\nexport default CopyField;"],"mappings":";;;;;AAYA,MAAM,kBAAkB;;;;;;AAgCxB,SAAS,UAAU,EACjB,cAAc,UACd,YAAY,QACZ,UACA,OACA,GAAG,SACc;CACjB,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,QAAQ,OAAkD,KAAA,CAAS;CAIzE,sBAAsB;EACpB,aAAa,MAAM,OAAO;CAC5B,GAAG,CAAA,CAAE;CACL,MAAM,aAAa,kBAAkB;EACnC,MAAM,QAAQ,YAAY;GACxB,IAAI;IACF,MAAM,UAAU,UAAU,UAAU,KAAK;GAC3C,QAAQ;IAKN,UAAU,KAAK;IACf;GACF;GACA,UAAU,IAAI;GACd,WAAW,KAAK;GAChB,aAAa,MAAM,OAAO;GAC1B,MAAM,UAAU,iBAAiB;IAC/B,UAAU,KAAK;GACjB,GAAG,eAAe;EACpB;EACA,MAAW;CACb,GAAG,CAAC,UAAU,KAAK,CAAC;CACpB,OAAO,qBAAC,OAAD;EAAK,GAAI;EAAO,WAAU;EAA1B,UAAA;GACH,oBAAC,QAAD;IAAM,WAAU;IACd,UAAA,oBAAC,MAAD,EAAA,UAAO,MAAY,CAAA;GACf,CAAA;GACN,oBAAC,QAAD;IAAQ,SAAS;IAAY,MAAK;IAAK,SAAQ;IAC5C,UAAA,SAAS,cAAc;GAClB,CAAA;GAIR,oBAAC,UAAD;IAAQ,WAAU;IACf,UAAA,SAAS,cAAc;GAClB,CAAA;EACL;;AACT"}
|
|
@@ -3,8 +3,11 @@ import Badge, { BadgeProps } from "./badge/index.js";
|
|
|
3
3
|
import Button, { ButtonProps } from "./button/index.js";
|
|
4
4
|
import Card, { CardProps } from "./card/index.js";
|
|
5
5
|
import Chip, { ChipProps } from "./chip/index.js";
|
|
6
|
+
import Code, { CodeProps } from "./code/index.js";
|
|
7
|
+
import CopyField, { CopyFieldProps } from "./copy-field/index.js";
|
|
6
8
|
import Currency, { CurrencyProps } from "./currency/index.js";
|
|
7
9
|
import IconButton, { IconButtonProps } from "./icon-button/index.js";
|
|
10
|
+
import Keycap, { KeycapProps } from "./keycap/index.js";
|
|
8
11
|
import Link, { LinkProps } from "./link/index.js";
|
|
9
12
|
import ListItem, { ListItemProps } from "./list-item/index.js";
|
|
10
13
|
import Separator, { SeparatorProps } from "./separator/index.js";
|
|
@@ -12,4 +15,4 @@ import Sheet, { SheetProps } from "./sheet/index.js";
|
|
|
12
15
|
import Tabs, { TabsProps } from "./tabs/index.js";
|
|
13
16
|
import Text, { TextProps } from "./text/index.js";
|
|
14
17
|
import TextField, { TextFieldProps } from "./text-field/index.js";
|
|
15
|
-
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
|
18
|
+
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Code, type CodeProps, CopyField, type CopyFieldProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Keycap, type KeycapProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
//#region src/components/keycap/index.d.ts
|
|
3
|
+
type KeycapProps = useRender.ComponentProps<'kbd'>;
|
|
4
|
+
/**
|
|
5
|
+
* A single key on a keyboard, as named in an instruction — `Enter`, `Esc`,
|
|
6
|
+
* `Ctrl`. It renders a `<kbd>` and takes its scale from the text around it. A
|
|
7
|
+
* chord is several of these, combined at the call site.
|
|
8
|
+
*/
|
|
9
|
+
declare function Keycap({ render, ...props }: KeycapProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { type KeycapProps, Keycap as default };
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
//#region src/components/keycap/index.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A single key on a keyboard, as named in an instruction — `Enter`, `Esc`,
|
|
6
|
+
* `Ctrl`. It renders a `<kbd>` and takes its scale from the text around it. A
|
|
7
|
+
* chord is several of these, combined at the call site.
|
|
8
|
+
*/
|
|
9
|
+
function Keycap(t0) {
|
|
10
|
+
const $ = c(9);
|
|
11
|
+
let props;
|
|
12
|
+
let render;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({render, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = props;
|
|
17
|
+
$[2] = render;
|
|
18
|
+
} else {
|
|
19
|
+
props = $[1];
|
|
20
|
+
render = $[2];
|
|
21
|
+
}
|
|
22
|
+
let t1;
|
|
23
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
24
|
+
t1 = { className: "xjbqb8w x1fwvt7v x1tfhd1 x1y0btm7 xmkeg23 x139gbkf x1rg5ohu xbppi91 xuegzgz x37zpob xt970qd xdomwbk xuxw1ft" };
|
|
25
|
+
$[3] = t1;
|
|
26
|
+
} else t1 = $[3];
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[4] !== props) {
|
|
29
|
+
t2 = {
|
|
30
|
+
...props,
|
|
31
|
+
...t1
|
|
32
|
+
};
|
|
33
|
+
$[4] = props;
|
|
34
|
+
$[5] = t2;
|
|
35
|
+
} else t2 = $[5];
|
|
36
|
+
let t3;
|
|
37
|
+
if ($[6] !== render || $[7] !== t2) {
|
|
38
|
+
t3 = {
|
|
39
|
+
defaultTagName: "kbd",
|
|
40
|
+
props: t2,
|
|
41
|
+
render
|
|
42
|
+
};
|
|
43
|
+
$[6] = render;
|
|
44
|
+
$[7] = t2;
|
|
45
|
+
$[8] = t3;
|
|
46
|
+
} else t3 = $[8];
|
|
47
|
+
return useRender(t3);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Keycap as default };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/keycap/index.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport * as stylex from '@stylexjs/stylex';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../../tokens/design.tokens.stylex';\n\n// Named for the physical thing it draws rather than for the element it\n// renders. `Kbd` would match the tag, but a component library is read by\n// people writing call sites, not markup, and `Key` in that setting is already\n// spoken for several times over — an API key, an object key, React's own key\n// prop. A keycap is unambiguously the one on a keyboard.\n//\n// Sized in em for the same reason Code is: a key named inside a footnote and\n// one named inside a paragraph are the same component. The ratio is smaller\n// than Code's because the border adds height that the glyphs do not, and\n// matching Code's 0.875 leaves a keycap standing taller than the line it\n// sits in.\n//\n// Transparent rather than filled, so a keycap inside a Card or a Sheet does\n// not read as a nested surface. The border alone carries the metaphor.\n\ntype KeycapProps = useRender.ComponentProps<'kbd'>;\n\n/**\n * A single key on a keyboard, as named in an instruction — `Enter`, `Esc`,\n * `Ctrl`. It renders a `<kbd>` and takes its scale from the text around it. A\n * chord is several of these, combined at the call site.\n */\nfunction Keycap({\n render,\n ...props\n}: KeycapProps) {\n // stylex.props() spreads after `props` for the same reason Text and Currency\n // do it: it wins over a consumer-supplied className rather than merging with\n // one, so which of the two applies is not left to stylesheet order.\n return useRender({\n defaultTagName: 'kbd',\n props: {\n ...props,\n ...{\n className: \"xjbqb8w x1fwvt7v x1tfhd1 x1y0btm7 xmkeg23 x139gbkf x1rg5ohu xbppi91 xuegzgz x37zpob xt970qd xdomwbk xuxw1ft\"\n }\n },\n render\n });\n}\nexport type { KeycapProps };\nexport default Keycap;"],"mappings":";;;;;;;;AA2BA,SAAA,OAAA,IAAA;CAAA,MAAA,IAAA,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAgB,CAAA,CAAA,WAAA,SAAA;EAGF,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,QAAA,EAAA;EAAA,SAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EAQL,KAAA,EAAA,WACU,8GACb;EAAC,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA;EAJI,KAAA;GAAA,GACF;GAAK,GACL;EAGL;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,UAAA,EAAA,OAAA,IAAA;EAPc,KAAA;GAAA,gBACC;GAAK,OACd;GAKN;EAEH;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OATM,UAAU,EAShB;AAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,11 @@ import Badge, { BadgeProps } from "./components/badge/index.js";
|
|
|
3
3
|
import Button, { ButtonProps } from "./components/button/index.js";
|
|
4
4
|
import Card, { CardProps } from "./components/card/index.js";
|
|
5
5
|
import Chip, { ChipProps } from "./components/chip/index.js";
|
|
6
|
+
import Code, { CodeProps } from "./components/code/index.js";
|
|
7
|
+
import CopyField, { CopyFieldProps } from "./components/copy-field/index.js";
|
|
6
8
|
import Currency, { CurrencyProps } from "./components/currency/index.js";
|
|
7
9
|
import IconButton, { IconButtonProps } from "./components/icon-button/index.js";
|
|
10
|
+
import Keycap, { KeycapProps } from "./components/keycap/index.js";
|
|
8
11
|
import Link, { LinkProps } from "./components/link/index.js";
|
|
9
12
|
import ListItem, { ListItemProps } from "./components/list-item/index.js";
|
|
10
13
|
import Separator, { SeparatorProps } from "./components/separator/index.js";
|
|
@@ -13,4 +16,4 @@ import Tabs, { TabsProps } from "./components/tabs/index.js";
|
|
|
13
16
|
import Text, { TextProps } from "./components/text/index.js";
|
|
14
17
|
import TextField, { TextFieldProps } from "./components/text-field/index.js";
|
|
15
18
|
import "./components/index.js";
|
|
16
|
-
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
|
19
|
+
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Code, type CodeProps, CopyField, type CopyFieldProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Keycap, type KeycapProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,11 @@ import Badge from "./components/badge/index.js";
|
|
|
3
3
|
import Button from "./components/button/index.js";
|
|
4
4
|
import Card from "./components/card/index.js";
|
|
5
5
|
import Chip from "./components/chip/index.js";
|
|
6
|
+
import Code from "./components/code/index.js";
|
|
7
|
+
import CopyField from "./components/copy-field/index.js";
|
|
6
8
|
import Currency from "./components/currency/index.js";
|
|
7
9
|
import IconButton from "./components/icon-button/index.js";
|
|
10
|
+
import Keycap from "./components/keycap/index.js";
|
|
8
11
|
import Link from "./components/link/index.js";
|
|
9
12
|
import ListItem from "./components/list-item/index.js";
|
|
10
13
|
import Separator from "./components/separator/index.js";
|
|
@@ -12,4 +15,4 @@ import Sheet from "./components/sheet/index.js";
|
|
|
12
15
|
import Tabs from "./components/tabs/index.js";
|
|
13
16
|
import Text from "./components/text/index.js";
|
|
14
17
|
import TextField from "./components/text-field/index.js";
|
|
15
|
-
export { Avatar, Badge, Button, Card, Chip, Currency, IconButton, Link, ListItem, Separator, Sheet, Tabs, Text, TextField };
|
|
18
|
+
export { Avatar, Badge, Button, Card, Chip, Code, CopyField, Currency, IconButton, Keycap, Link, ListItem, Separator, Sheet, Tabs, Text, TextField };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanso-labs/kanso-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "A React component library built on Base UI primitives and styled with StyleX, with design tokens sourced from a single W3C DTCG file and compiled via Style Dictionary",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@commitlint/cli": "21.2.2",
|
|
64
64
|
"@commitlint/config-conventional": "21.2.2",
|
|
65
65
|
"@eslint/js": "10.0.1",
|
|
66
|
-
"@kanso-labs/unplugin-style-dictionary": "0.2.
|
|
66
|
+
"@kanso-labs/unplugin-style-dictionary": "0.2.2",
|
|
67
67
|
"@rolldown/plugin-babel": "0.2.3",
|
|
68
68
|
"@storybook/addon-a11y": "10.5.10",
|
|
69
69
|
"@storybook/addon-docs": "10.5.10",
|