@nanisoft/prism-ui 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/blocks/site-footer/site-footer.d.ts +23 -8
- package/dist/blocks/site-footer/site-footer.d.ts.map +1 -1
- package/dist/blocks/site-footer/site-footer.js +10 -4
- package/dist/blocks/site-navbar/index.d.ts +1 -1
- package/dist/blocks/site-navbar/index.d.ts.map +1 -1
- package/dist/blocks/site-navbar/mobile-nav.d.ts +25 -4
- package/dist/blocks/site-navbar/mobile-nav.d.ts.map +1 -1
- package/dist/blocks/site-navbar/mobile-nav.js +11 -4
- package/dist/blocks/site-navbar/nav-menu.d.ts +50 -0
- package/dist/blocks/site-navbar/nav-menu.d.ts.map +1 -0
- package/dist/blocks/site-navbar/nav-menu.js +44 -0
- package/dist/blocks/site-navbar/navbar-controls.d.ts +9 -3
- package/dist/blocks/site-navbar/navbar-controls.d.ts.map +1 -1
- package/dist/blocks/site-navbar/site-navbar.d.ts +54 -13
- package/dist/blocks/site-navbar/site-navbar.d.ts.map +1 -1
- package/dist/blocks/site-navbar/site-navbar.js +45 -10
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +7 -2
- package/dist/components/ui/mini-calendar.js +1 -1
- package/dist/components/ui/product-mark.d.ts +26 -7
- package/dist/components/ui/product-mark.d.ts.map +1 -1
- package/dist/components/ui/product-mark.js +6 -4
- package/dist/components/ui/pulse-series.d.ts.map +1 -1
- package/dist/components/ui/pulse-series.js +1 -1
- package/dist/components/ui/sparkline.d.ts.map +1 -1
- package/dist/components/ui/sparkline.js +1 -2
- package/dist/styles.css +173 -0
- package/dist/theming/index.d.ts +1 -1
- package/dist/theming/index.d.ts.map +1 -1
- package/dist/theming/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { PackId } from '../../theming/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* The three sizes a product mark is drawn at: the mark's diameter and the name
|
|
@@ -32,10 +33,11 @@ export type ProductMarkSize = keyof typeof SIZES;
|
|
|
32
33
|
* The props a ProductMark takes.
|
|
33
34
|
*
|
|
34
35
|
* There is no product directory in this package. A product's identity is the
|
|
35
|
-
* consumer's data, so the Component takes the
|
|
36
|
-
*
|
|
37
|
-
* and `
|
|
38
|
-
*
|
|
36
|
+
* consumer's data, so the Component takes the facts the mark is drawn from and
|
|
37
|
+
* owns none of them: `id` for the markup, `name` for the second part, `pack`
|
|
38
|
+
* for the hue, and `mark` for the drawing itself when the identity has one.
|
|
39
|
+
* Where the set of products is published is the consumer's decision, and Prism
|
|
40
|
+
* ships the mark rather than a list of products.
|
|
39
41
|
*/
|
|
40
42
|
export type ProductMarkProps = {
|
|
41
43
|
/**
|
|
@@ -63,6 +65,21 @@ export type ProductMarkProps = {
|
|
|
63
65
|
* core resolves the base pack's `primary` from the page.
|
|
64
66
|
*/
|
|
65
67
|
pack?: PackId | null;
|
|
68
|
+
/**
|
|
69
|
+
* The product's drawn mark, when its identity includes one: the logo in
|
|
70
|
+
* place of the disc. The node is the consumer's drawing and this Component
|
|
71
|
+
* owns none of it, exactly as it owns none of the name; it is drawn inside
|
|
72
|
+
* the sized slot the disc occupies, so a `viewBox` drawing that fills its
|
|
73
|
+
* box arrives at every drawn size from one node. Ink strokes drawn in
|
|
74
|
+
* `currentColor` and accents drawn through a token class keep the drawing
|
|
75
|
+
* reachable by the cascade and by a pack boundary the same way the disc is.
|
|
76
|
+
*
|
|
77
|
+
* The drawing is hidden from assistive technology, as the disc is: the name
|
|
78
|
+
* is the mark's announced half either way. Omit it for the two-colour disc,
|
|
79
|
+
* which remains the mark of a product whose identity is a hue rather than a
|
|
80
|
+
* drawing.
|
|
81
|
+
*/
|
|
82
|
+
mark?: ReactNode;
|
|
66
83
|
/**
|
|
67
84
|
* Which of the three drawn sizes to use. @defaultValue 'md'
|
|
68
85
|
*/
|
|
@@ -75,8 +92,10 @@ export type ProductMarkProps = {
|
|
|
75
92
|
className?: string;
|
|
76
93
|
};
|
|
77
94
|
/**
|
|
78
|
-
* A product's two-part
|
|
79
|
-
*
|
|
95
|
+
* A product's two-part mark: the shape, beside the product's name in the brand
|
|
96
|
+
* ink. The shape is a disc by default, a hairline ring in the brand ink around
|
|
97
|
+
* a core in the pack's own fill, and it is the product's own drawing when
|
|
98
|
+
* `mark` carries one.
|
|
80
99
|
*
|
|
81
100
|
* Two parts, and both colours come from tokens, which is the whole reason this
|
|
82
101
|
* is promoted out of the two hand-written copies it replaces. The ring is
|
|
@@ -110,6 +129,6 @@ export type ProductMarkProps = {
|
|
|
110
129
|
* The disc is `aria-hidden` and the name is not, so the mark adds a shape beside
|
|
111
130
|
* the word rather than a second reading of it.
|
|
112
131
|
*/
|
|
113
|
-
declare function ProductMark({ id, name, pack, size, className }: ProductMarkProps): import("react").JSX.Element;
|
|
132
|
+
declare function ProductMark({ id, name, pack, mark, size, className }: ProductMarkProps): import("react").JSX.Element;
|
|
114
133
|
export { ProductMark };
|
|
115
134
|
//# sourceMappingURL=product-mark.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-mark.d.ts","sourceRoot":"","sources":["../../../src/components/ui/product-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AA2B3C;;;;;;;;GAQG;AACH,QAAA,MAAM,KAAK;;;;;;;;;;;;;CAID,CAAA;AAEV;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,KAAK,CAAA;AAEhD
|
|
1
|
+
{"version":3,"file":"product-mark.d.ts","sourceRoot":"","sources":["../../../src/components/ui/product-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AA2B3C;;;;;;;;GAQG;AACH,QAAA,MAAM,KAAK;;;;;;;;;;;;;CAID,CAAA;AAEV;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,KAAK,CAAA;AAEhD;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,iBAAS,WAAW,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BAsCtF;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -36,8 +36,10 @@ const SIZES = {
|
|
|
36
36
|
lg: { mark: 'size-6', name: 'text-base' },
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
|
-
* A product's two-part
|
|
40
|
-
*
|
|
39
|
+
* A product's two-part mark: the shape, beside the product's name in the brand
|
|
40
|
+
* ink. The shape is a disc by default, a hairline ring in the brand ink around
|
|
41
|
+
* a core in the pack's own fill, and it is the product's own drawing when
|
|
42
|
+
* `mark` carries one.
|
|
41
43
|
*
|
|
42
44
|
* Two parts, and both colours come from tokens, which is the whole reason this
|
|
43
45
|
* is promoted out of the two hand-written copies it replaces. The ring is
|
|
@@ -71,12 +73,12 @@ const SIZES = {
|
|
|
71
73
|
* The disc is `aria-hidden` and the name is not, so the mark adds a shape beside
|
|
72
74
|
* the word rather than a second reading of it.
|
|
73
75
|
*/
|
|
74
|
-
function ProductMark({ id, name, pack, size = 'md', className }) {
|
|
76
|
+
function ProductMark({ id, name, pack, mark, size = 'md', className }) {
|
|
75
77
|
const drawn = SIZES[size];
|
|
76
78
|
// `default` is the absence of a pack id, spelled the way the token build
|
|
77
79
|
// spells it, so a base-pack product resolves `primary` from the page rather
|
|
78
80
|
// than from an attribute that matches no emitted rule.
|
|
79
81
|
const boundary = pack && pack !== 'default' ? pack : undefined;
|
|
80
|
-
return (_jsxs("span", { "data-slot": "product-mark", "data-pack": boundary, className: cn('inline-flex items-center gap-2', className), children: [_jsx("span", { "data-slot": "product-mark-disc", "data-product": id, "aria-hidden": true, className: cn('inline-block shrink-0 rounded-full border border-brand-ink', drawn.mark, pack ? 'bg-primary' : SPECTRUM) }), _jsx("span", { "data-slot": "product-mark-name", className: cn('font-medium text-brand-ink', drawn.name), children: name })] }));
|
|
82
|
+
return (_jsxs("span", { "data-slot": "product-mark", "data-pack": boundary, className: cn('inline-flex items-center gap-2', className), children: [mark ? (_jsx("span", { "data-slot": "product-mark-drawn", "data-product": id, "aria-hidden": true, className: cn('inline-block shrink-0', drawn.mark), children: mark })) : (_jsx("span", { "data-slot": "product-mark-disc", "data-product": id, "aria-hidden": true, className: cn('inline-block shrink-0 rounded-full border border-brand-ink', drawn.mark, pack ? 'bg-primary' : SPECTRUM) })), _jsx("span", { "data-slot": "product-mark-name", className: cn('font-medium text-brand-ink', drawn.name), children: name })] }));
|
|
81
83
|
}
|
|
82
84
|
export { ProductMark };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulse-series.d.ts","sourceRoot":"","sources":["../../../src/components/ui/pulse-series.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,oFAAoF;IACpF,EAAE,EAAE,MAAM,CAAA;IACV,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;;;GAOG;AACH,KAAK,iBAAiB,GAClB;IACE;;;;OAIG;IACH,UAAU,EAAE,IAAI,CAAA;IAChB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,GACD;IACE,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,CAAA;AAEL,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD;;;;OAIG;IACD,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAA;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAoCH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,QAAQ,EACR,IAAY,EACZ,KAAK,EACL,UAAkB,EAClB,SAAS,GACV,EAAE,gBAAgB,+
|
|
1
|
+
{"version":3,"file":"pulse-series.d.ts","sourceRoot":"","sources":["../../../src/components/ui/pulse-series.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,oFAAoF;IACpF,EAAE,EAAE,MAAM,CAAA;IACV,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;;;GAOG;AACH,KAAK,iBAAiB,GAClB;IACE;;;;OAIG;IACH,UAAU,EAAE,IAAI,CAAA;IAChB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,GACD;IACE,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,CAAA;AAEL,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD;;;;OAIG;IACD,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAA;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAoCH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,QAAQ,EACR,IAAY,EACZ,KAAK,EACL,UAAkB,EAClB,SAAS,GACV,EAAE,gBAAgB,+BAiJlB;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -81,7 +81,7 @@ function PulseSeries({ bars, baseline, scan = false, label, decorative = false,
|
|
|
81
81
|
const tallest = Math.max(...bars.map((bar) => bar.value), 0);
|
|
82
82
|
const slot = bars.length ? roomX / bars.length : roomX;
|
|
83
83
|
const barWidth = Math.max(2, Math.min(MAX_BAR_WIDTH, slot * (1 / (1 + BAR_GAP))));
|
|
84
|
-
return (_jsxs("svg", { "data-slot": "pulse-series", "data-columns": bars.length, "data-scan": scan || undefined, viewBox: `0 0 ${CANVAS_WIDTH} ${CANVAS_HEIGHT}`, xmlns: "http://www.w3.org/2000/svg", role: decorative ? undefined : 'img', "aria-label": decorative ? undefined : label, "aria-hidden": decorative || undefined, className: cn('h-auto w-full', className), children: [scan ? (_jsx("g", { "data-slot": "pulse-series-scan", "aria-hidden": true, children: _jsxs("g", { className: "prism-ambient-scan", style: { '--ambient-scan-distance': `${roomX
|
|
84
|
+
return (_jsxs("svg", { "data-slot": "pulse-series", "data-columns": bars.length, "data-scan": scan || undefined, viewBox: `0 0 ${CANVAS_WIDTH} ${CANVAS_HEIGHT}`, xmlns: "http://www.w3.org/2000/svg", role: decorative ? undefined : 'img', "aria-label": decorative ? undefined : label, "aria-hidden": decorative || undefined, className: cn('h-auto w-full', className), children: [scan ? (_jsx("g", { "data-slot": "pulse-series-scan", "aria-hidden": true, transform: `translate(${PADDING} 0)`, children: _jsxs("g", { className: "prism-ambient-scan", style: { '--ambient-scan-distance': `${roomX}px` }, children: [_jsx("rect", { "data-slot": "pulse-series-scan-wash", x: -slot / 2, y: PADDING_TOP - 12, width: slot, height: baselineY - PADDING_TOP + 12, className: "fill-brand-ink/10" }), _jsx("line", { "data-slot": "pulse-series-scan-line", x1: 0, y1: PADDING_TOP - 12, x2: 0, y2: baselineY, strokeWidth: 1, className: "stroke-brand-ink/60" })] }) })) : null, bars.map((bar, index) => {
|
|
85
85
|
const centre = PADDING + slot * (index + 0.5);
|
|
86
86
|
// A column of value zero is drawn as a hairline rather than as nothing,
|
|
87
87
|
// because a gap in a series is a missing reading and a missing reading
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sparkline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sparkline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AA0C/C,uCAAuC;AACvC,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAChF;;;;;;;;OAQG;IACH,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IACzB;;;;;;;;;OASG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,MAAM,EACN,KAAK,EACL,IAAgB,EAChB,KAAU,EACV,MAAW,EACX,aAAqB,EACrB,GAAG,KAAK,EACT,EAAE,cAAc,+BAoGhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Table, TableBody, TableCaption, TableCell, TableHead, TableRow } from './table.js';
|
|
3
2
|
import { cn } from '../../lib/utils.js';
|
|
4
3
|
/** The fill a series mark is drawn in, from the role the caller assigned it. */
|
|
5
4
|
const FILL = {
|
|
@@ -108,6 +107,6 @@ function Sparkline({ className, values, label, tone = 'chart-1', width = 96, hei
|
|
|
108
107
|
const at = (index) => (index / (values.length - 1)) * 100;
|
|
109
108
|
const up = (value) => INSET + (1 - (value - lowest) / span) * (100 - INSET * 2);
|
|
110
109
|
const last = values.length - 1;
|
|
111
|
-
return (_jsxs("figure", { "data-slot": "sparkline", "aria-label": label, className: cn('inline-flex shrink-0 flex-col', className), style: { width, height }, ...props, children: [_jsxs("span", { "data-slot": "sparkline-plot", "aria-hidden": "true", className: "relative block size-full", children: [_jsx("svg", { className: "pointer-events-none absolute inset-0 size-full overflow-visible", children: values.slice(1).map((value, index) => (_jsx("line", { x1: `${at(index)}%`, y1: `${up(values[index])}%`, x2: `${at(index + 1)}%`, y2: `${up(value)}%`, className: STROKE[tone], strokeWidth: 1.5, strokeLinecap: "round" }, index))) }), emphasizeLast ? (_jsx("span", { "data-slot": "sparkline-last", className: cn('absolute size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full', FILL[tone]), style: { left: `${at(last)}%`, top: `${up(values[last])}%` } })) : null] }), _jsx("div", { "data-slot": "sparkline-table", className: "sr-only", children: _jsxs(
|
|
110
|
+
return (_jsxs("figure", { "data-slot": "sparkline", "aria-label": label, className: cn('inline-flex shrink-0 flex-col', className), style: { width, height }, ...props, children: [_jsxs("span", { "data-slot": "sparkline-plot", "aria-hidden": "true", className: "relative block size-full", children: [_jsx("svg", { className: "pointer-events-none absolute inset-0 size-full overflow-visible", children: values.slice(1).map((value, index) => (_jsx("line", { x1: `${at(index)}%`, y1: `${up(values[index])}%`, x2: `${at(index + 1)}%`, y2: `${up(value)}%`, className: STROKE[tone], strokeWidth: 1.5, strokeLinecap: "round" }, index))) }), emphasizeLast ? (_jsx("span", { "data-slot": "sparkline-last", className: cn('absolute size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full', FILL[tone]), style: { left: `${at(last)}%`, top: `${up(values[last])}%` } })) : null] }), _jsx("div", { "data-slot": "sparkline-table", className: "sr-only", children: _jsxs("table", { children: [_jsx("caption", { children: label }), _jsx("tbody", { children: values.map((value, index) => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: index + 1 }), _jsx("td", { children: value })] }, index))) })] }) })] }));
|
|
112
111
|
}
|
|
113
112
|
export { Sparkline };
|
package/dist/styles.css
CHANGED
|
@@ -944,6 +944,9 @@
|
|
|
944
944
|
.min-w-40 {
|
|
945
945
|
min-width: calc(var(--spacing) * 40);
|
|
946
946
|
}
|
|
947
|
+
.min-w-44 {
|
|
948
|
+
min-width: calc(var(--spacing) * 44);
|
|
949
|
+
}
|
|
947
950
|
.min-w-48 {
|
|
948
951
|
min-width: calc(var(--spacing) * 48);
|
|
949
952
|
}
|
|
@@ -2868,6 +2871,16 @@
|
|
|
2868
2871
|
.data-\[checked\]\:text-primary-foreground[data-checked] {
|
|
2869
2872
|
color: var(--primary-foreground);
|
|
2870
2873
|
}
|
|
2874
|
+
.data-\[current\]\:bg-accent[data-current] {
|
|
2875
|
+
background-color: var(--accent);
|
|
2876
|
+
}
|
|
2877
|
+
.data-\[current\]\:font-medium[data-current] {
|
|
2878
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
2879
|
+
font-weight: var(--font-weight-medium);
|
|
2880
|
+
}
|
|
2881
|
+
.data-\[current\]\:text-accent-foreground[data-current] {
|
|
2882
|
+
color: var(--accent-foreground);
|
|
2883
|
+
}
|
|
2871
2884
|
.data-\[disabled\]\:pointer-events-none[data-disabled] {
|
|
2872
2885
|
pointer-events: none;
|
|
2873
2886
|
}
|
|
@@ -4466,6 +4479,166 @@
|
|
|
4466
4479
|
--sidebar-ring: #feb98b;
|
|
4467
4480
|
--radius: 1rem;
|
|
4468
4481
|
}
|
|
4482
|
+
[data-pack="cyan"] {
|
|
4483
|
+
--background: #ffffff;
|
|
4484
|
+
--foreground: #2a2f30;
|
|
4485
|
+
--card: #ffffff;
|
|
4486
|
+
--card-foreground: #2a2f30;
|
|
4487
|
+
--popover: #ffffff;
|
|
4488
|
+
--popover-foreground: #2a2f30;
|
|
4489
|
+
--primary: #46bcd6;
|
|
4490
|
+
--primary-foreground: #001c23;
|
|
4491
|
+
--secondary: #e9eeef;
|
|
4492
|
+
--secondary-foreground: #2a2f30;
|
|
4493
|
+
--muted: #e9eeef;
|
|
4494
|
+
--muted-foreground: #555c5e;
|
|
4495
|
+
--accent: #cdf5ff;
|
|
4496
|
+
--accent-foreground: #001c23;
|
|
4497
|
+
--destructive: #dc2626;
|
|
4498
|
+
--destructive-foreground: #ffffff;
|
|
4499
|
+
--success: #15803d;
|
|
4500
|
+
--success-foreground: #ffffff;
|
|
4501
|
+
--warning: #f59e0b;
|
|
4502
|
+
--warning-foreground: #15191a;
|
|
4503
|
+
--border: #d9dfe1;
|
|
4504
|
+
--input: #d9dfe1;
|
|
4505
|
+
--ring: #00a0bb;
|
|
4506
|
+
--brand-ink: #006678;
|
|
4507
|
+
--chart-1: #00a0bb;
|
|
4508
|
+
--chart-2: #14b8a6;
|
|
4509
|
+
--chart-3: #f59e0b;
|
|
4510
|
+
--chart-4: #889193;
|
|
4511
|
+
--chart-5: #ef4444;
|
|
4512
|
+
--sidebar: #f4f7f8;
|
|
4513
|
+
--sidebar-foreground: #2a2f30;
|
|
4514
|
+
--sidebar-primary: #46bcd6;
|
|
4515
|
+
--sidebar-primary-foreground: #001c23;
|
|
4516
|
+
--sidebar-accent: #cdf5ff;
|
|
4517
|
+
--sidebar-accent-foreground: #001c23;
|
|
4518
|
+
--sidebar-border: #d9dfe1;
|
|
4519
|
+
--sidebar-ring: #008399;
|
|
4520
|
+
--radius: 0.5rem;
|
|
4521
|
+
}
|
|
4522
|
+
[data-pack="cyan"].dark, .dark [data-pack="cyan"] {
|
|
4523
|
+
--background: #15191a;
|
|
4524
|
+
--foreground: #e9eeef;
|
|
4525
|
+
--card: #2a2f30;
|
|
4526
|
+
--card-foreground: #e9eeef;
|
|
4527
|
+
--popover: #2a2f30;
|
|
4528
|
+
--popover-foreground: #e9eeef;
|
|
4529
|
+
--primary: #7fdaf0;
|
|
4530
|
+
--primary-foreground: #001c23;
|
|
4531
|
+
--secondary: #3d4445;
|
|
4532
|
+
--secondary-foreground: #e9eeef;
|
|
4533
|
+
--muted: #3d4445;
|
|
4534
|
+
--muted-foreground: #c4ccce;
|
|
4535
|
+
--accent: #004b59;
|
|
4536
|
+
--accent-foreground: #cdf5ff;
|
|
4537
|
+
--destructive: #f87171;
|
|
4538
|
+
--destructive-foreground: #15191a;
|
|
4539
|
+
--success: #4ade80;
|
|
4540
|
+
--success-foreground: #15191a;
|
|
4541
|
+
--warning: #fcd34d;
|
|
4542
|
+
--warning-foreground: #15191a;
|
|
4543
|
+
--border: #3d4445;
|
|
4544
|
+
--input: #3d4445;
|
|
4545
|
+
--ring: #7fdaf0;
|
|
4546
|
+
--brand-ink: #a7ebfc;
|
|
4547
|
+
--chart-1: #46bcd6;
|
|
4548
|
+
--chart-2: #2dd4bf;
|
|
4549
|
+
--chart-3: #fbbf24;
|
|
4550
|
+
--chart-4: #a4adaf;
|
|
4551
|
+
--chart-5: #f87171;
|
|
4552
|
+
--sidebar: #2a2f30;
|
|
4553
|
+
--sidebar-foreground: #e9eeef;
|
|
4554
|
+
--sidebar-primary: #7fdaf0;
|
|
4555
|
+
--sidebar-primary-foreground: #001c23;
|
|
4556
|
+
--sidebar-accent: #004b59;
|
|
4557
|
+
--sidebar-accent-foreground: #cdf5ff;
|
|
4558
|
+
--sidebar-border: #3d4445;
|
|
4559
|
+
--sidebar-ring: #7fdaf0;
|
|
4560
|
+
--radius: 0.5rem;
|
|
4561
|
+
}
|
|
4562
|
+
[data-pack="gold"] {
|
|
4563
|
+
--background: #ffffff;
|
|
4564
|
+
--foreground: #302d29;
|
|
4565
|
+
--card: #ffffff;
|
|
4566
|
+
--card-foreground: #302d29;
|
|
4567
|
+
--popover: #ffffff;
|
|
4568
|
+
--popover-foreground: #302d29;
|
|
4569
|
+
--primary: #d2a24b;
|
|
4570
|
+
--primary-foreground: #231600;
|
|
4571
|
+
--secondary: #efece9;
|
|
4572
|
+
--secondary-foreground: #302d29;
|
|
4573
|
+
--muted: #efece9;
|
|
4574
|
+
--muted-foreground: #5e5a54;
|
|
4575
|
+
--accent: #ffeac7;
|
|
4576
|
+
--accent-foreground: #231600;
|
|
4577
|
+
--destructive: #dc2626;
|
|
4578
|
+
--destructive-foreground: #ffffff;
|
|
4579
|
+
--success: #15803d;
|
|
4580
|
+
--success-foreground: #ffffff;
|
|
4581
|
+
--warning: #f59e0b;
|
|
4582
|
+
--warning-foreground: #1a1815;
|
|
4583
|
+
--border: #e1ddd9;
|
|
4584
|
+
--input: #e1ddd9;
|
|
4585
|
+
--ring: #b78520;
|
|
4586
|
+
--brand-ink: #775300;
|
|
4587
|
+
--chart-1: #b78520;
|
|
4588
|
+
--chart-2: #14b8a6;
|
|
4589
|
+
--chart-3: #f59e0b;
|
|
4590
|
+
--chart-4: #938e87;
|
|
4591
|
+
--chart-5: #ef4444;
|
|
4592
|
+
--sidebar: #f8f6f4;
|
|
4593
|
+
--sidebar-foreground: #302d29;
|
|
4594
|
+
--sidebar-primary: #d2a24b;
|
|
4595
|
+
--sidebar-primary-foreground: #231600;
|
|
4596
|
+
--sidebar-accent: #ffeac7;
|
|
4597
|
+
--sidebar-accent-foreground: #231600;
|
|
4598
|
+
--sidebar-border: #e1ddd9;
|
|
4599
|
+
--sidebar-ring: #986b00;
|
|
4600
|
+
--radius: 1rem;
|
|
4601
|
+
}
|
|
4602
|
+
[data-pack="gold"].dark, .dark [data-pack="gold"] {
|
|
4603
|
+
--background: #1a1815;
|
|
4604
|
+
--foreground: #efece9;
|
|
4605
|
+
--card: #302d29;
|
|
4606
|
+
--card-foreground: #efece9;
|
|
4607
|
+
--popover: #302d29;
|
|
4608
|
+
--popover-foreground: #efece9;
|
|
4609
|
+
--primary: #edc47d;
|
|
4610
|
+
--primary-foreground: #231600;
|
|
4611
|
+
--secondary: #45423c;
|
|
4612
|
+
--secondary-foreground: #efece9;
|
|
4613
|
+
--muted: #45423c;
|
|
4614
|
+
--muted-foreground: #cecac4;
|
|
4615
|
+
--accent: #583d00;
|
|
4616
|
+
--accent-foreground: #ffeac7;
|
|
4617
|
+
--destructive: #f87171;
|
|
4618
|
+
--destructive-foreground: #1a1815;
|
|
4619
|
+
--success: #4ade80;
|
|
4620
|
+
--success-foreground: #1a1815;
|
|
4621
|
+
--warning: #fcd34d;
|
|
4622
|
+
--warning-foreground: #1a1815;
|
|
4623
|
+
--border: #45423c;
|
|
4624
|
+
--input: #45423c;
|
|
4625
|
+
--ring: #edc47d;
|
|
4626
|
+
--brand-ink: #f9d9a4;
|
|
4627
|
+
--chart-1: #d2a24b;
|
|
4628
|
+
--chart-2: #2dd4bf;
|
|
4629
|
+
--chart-3: #fbbf24;
|
|
4630
|
+
--chart-4: #afaaa3;
|
|
4631
|
+
--chart-5: #f87171;
|
|
4632
|
+
--sidebar: #302d29;
|
|
4633
|
+
--sidebar-foreground: #efece9;
|
|
4634
|
+
--sidebar-primary: #edc47d;
|
|
4635
|
+
--sidebar-primary-foreground: #231600;
|
|
4636
|
+
--sidebar-accent: #583d00;
|
|
4637
|
+
--sidebar-accent-foreground: #ffeac7;
|
|
4638
|
+
--sidebar-border: #45423c;
|
|
4639
|
+
--sidebar-ring: #edc47d;
|
|
4640
|
+
--radius: 1rem;
|
|
4641
|
+
}
|
|
4469
4642
|
@keyframes prism-travel {
|
|
4470
4643
|
from {
|
|
4471
4644
|
transform: translateX(0);
|
package/dist/theming/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* client runtime. There is no theme factory and no override object: the pack
|
|
9
9
|
* and mode are the whole API.
|
|
10
10
|
*/
|
|
11
|
-
export declare const PACKS: readonly ["default", "blush", "mint", "lavender", "sky", "peach"];
|
|
11
|
+
export declare const PACKS: readonly ["default", "blush", "mint", "lavender", "sky", "peach", "cyan", "gold"];
|
|
12
12
|
export type PackId = (typeof PACKS)[number];
|
|
13
13
|
export declare const MODES: readonly ["light", "dark"];
|
|
14
14
|
export type Mode = (typeof MODES)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theming/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theming/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,KAAK,mFAAoF,CAAA;AACtG,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3C,eAAO,MAAM,KAAK,4BAA6B,CAAA;AAC/C,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzC,eAAO,MAAM,cAAc,cAAc,CAAA;AACzC,eAAO,MAAM,mBAAmB,gBAAgB,CAAA;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,sBAAsB,CAAA;AAEzD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,kEAAmE,CAAA;AAC7F,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAExD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,+BAAgC,CAAA;AAUrE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG,IAAI,CAgBxF;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,6EAA6E;IAC7E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,qEAAqE;IACrE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,iEAAiE;IACjE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,4DAA4D;IAC5D,YAAY,EAAE,OAAO,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,IAAI,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,IAAI,CAAA;IACV,iEAAiE;IACjE,MAAM,EAAE,WAAW,CAAA;CACpB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,GACZ,EAAE,oBAAoB,GAAG,eAAe,CAoBxC;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACnC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG,IAAI,CAMpC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,IAAI,GACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAK/C"}
|
package/dist/theming/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* client runtime. There is no theme factory and no override object: the pack
|
|
9
9
|
* and mode are the whole API.
|
|
10
10
|
*/
|
|
11
|
-
export const PACKS = ['default', 'blush', 'mint', 'lavender', 'sky', 'peach'];
|
|
11
|
+
export const PACKS = ['default', 'blush', 'mint', 'lavender', 'sky', 'peach', 'cyan', 'gold'];
|
|
12
12
|
export const MODES = ['light', 'dark'];
|
|
13
13
|
export const PACK_ATTRIBUTE = 'data-pack';
|
|
14
14
|
export const DEFAULT_STORAGE_KEY = 'prism-theme';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanisoft/prism-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Prism's React component, block and page library.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"clsx": "^2.1.1",
|
|
103
103
|
"lucide-react": "^0.545.0",
|
|
104
104
|
"tailwind-merge": "^3.3.1",
|
|
105
|
-
"@nanisoft/prism-tokens": "
|
|
105
|
+
"@nanisoft/prism-tokens": "1.2.0"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@tailwindcss/postcss": "^4.3.3",
|