jenosize-ui 0.1.0 → 0.2.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/README.md +13 -10
- package/dist/Cartesian-ZIKPEYWP.d.ts +26 -0
- package/dist/{PaymentInput-CKPIPNWH.d.ts → PaymentInput-Dn5WVQVy.d.ts} +4 -0
- package/dist/{Select-CVbEQ2Ep.d.ts → Select-Dt5ARIH8.d.ts} +4 -0
- package/dist/{TagInput-CTJYOB4J.d.ts → TagInput-BaBeve6L.d.ts} +4 -0
- package/dist/area-chart.d.ts +54 -0
- package/dist/area-chart.js +9 -0
- package/dist/avatar.d.ts +24 -0
- package/dist/avatar.js +13 -7
- package/dist/badge.d.ts +4 -0
- package/dist/badge.js +6 -5
- package/dist/bar-chart.d.ts +32 -0
- package/dist/bar-chart.js +9 -0
- package/dist/breadcrumb.d.ts +4 -0
- package/dist/breadcrumb.js +5 -3
- package/dist/button.d.ts +16 -1
- package/dist/button.js +10 -8
- package/dist/calendar.d.ts +5 -0
- package/dist/calendar.js +18 -14
- package/dist/callout.d.ts +6 -6
- package/dist/callout.js +12 -9
- package/dist/card-D56VxyAe.d.ts +123 -0
- package/dist/card.d.ts +3 -1
- package/dist/card.js +7 -3
- package/dist/checkbox.js +9 -7
- package/dist/chunk-22M75A3N.js +396 -0
- package/dist/{chunk-D5BTFSL7.js → chunk-33TOK7ES.js} +7 -5
- package/dist/{chunk-THC2ISYP.js → chunk-3H444OJA.js} +6 -4
- package/dist/{chunk-GFOAJVW5.js → chunk-3QXLIZIX.js} +4 -13
- package/dist/chunk-3ZEEGXYF.js +8 -0
- package/dist/chunk-45Y2ZGNK.js +34 -0
- package/dist/{chunk-FHHAPGCR.js → chunk-4RBIWI2Q.js} +3 -3
- package/dist/chunk-4VGEJG4M.js +1510 -0
- package/dist/{chunk-PWKWNDBS.js → chunk-54SIZR63.js} +16 -8
- package/dist/chunk-5AZKP4KZ.js +49 -0
- package/dist/chunk-5DP7W5HX.js +254 -0
- package/dist/{chunk-J2BCKBHC.js → chunk-5KSD4WKN.js} +14 -5
- package/dist/{chunk-ZOOX3TUB.js → chunk-5XPMY2LF.js} +6 -6
- package/dist/chunk-5ZEUTSCV.js +147 -0
- package/dist/chunk-5ZPUAGOP.js +19 -0
- package/dist/{chunk-JTNFJLIY.js → chunk-667ZHY3T.js} +114 -42
- package/dist/{chunk-JP26LPCY.js → chunk-6B6BWTXC.js} +30 -13
- package/dist/{chunk-W5GGOUUI.js → chunk-6H4LNWQ7.js} +3 -3
- package/dist/{chunk-WFY7DKQD.js → chunk-6MMBQVRO.js} +61 -51
- package/dist/{chunk-7HOIZ3UO.js → chunk-7GUPNTAH.js} +15 -7
- package/dist/chunk-7VLYQR4D.js +44 -0
- package/dist/{chunk-KNYKWUYX.js → chunk-7ZM7SNCZ.js} +3 -3
- package/dist/{chunk-E7ZSWBAK.js → chunk-A323V6AI.js} +6 -4
- package/dist/chunk-AFYXSZGW.js +23 -0
- package/dist/chunk-AIARANKE.js +33 -0
- package/dist/{chunk-4OLULPQG.js → chunk-AIGYMTCU.js} +10 -6
- package/dist/{chunk-JVJRHBTD.js → chunk-AZ7DKRBY.js} +21 -8
- package/dist/{chunk-JYGR44ZC.js → chunk-BBKE4W3B.js} +19 -11
- package/dist/{chunk-Z3ETJN5G.js → chunk-BFVJHH7S.js} +8 -12
- package/dist/chunk-BLIZ3CL3.js +49 -0
- package/dist/{chunk-F2K7VJUV.js → chunk-CFFWYXDW.js} +19 -7
- package/dist/{chunk-MQGD2OUF.js → chunk-CGHYXWTT.js} +11 -5
- package/dist/{chunk-CYPPEUX5.js → chunk-CKMWBVRR.js} +27 -12
- package/dist/{chunk-GTHJWR3Q.js → chunk-D7EE5GWU.js} +21 -22
- package/dist/{chunk-5NOBSXJN.js → chunk-E2YZ7IMT.js} +24 -8
- package/dist/{chunk-T7FCG7XV.js → chunk-FFMTYQXE.js} +31 -11
- package/dist/{chunk-J36M3KRX.js → chunk-FH7Z7SGQ.js} +67 -32
- package/dist/chunk-FKVPAEJ6.js +57 -0
- package/dist/{chunk-GRLSUQQE.js → chunk-FNQJJO63.js} +4 -4
- package/dist/{chunk-5RAPA22E.js → chunk-FWRHBMWT.js} +4 -4
- package/dist/chunk-GLKFFA7N.js +171 -0
- package/dist/{chunk-KDLPXXD2.js → chunk-GQRSABRN.js} +4 -4
- package/dist/{chunk-DRZCJCBO.js → chunk-GZMDZF2V.js} +8 -7
- package/dist/chunk-HHYEAFCL.js +525 -0
- package/dist/{chunk-LME57Z6J.js → chunk-I6WMNXC7.js} +6 -6
- package/dist/chunk-IQNVSQRK.js +605 -0
- package/dist/chunk-KHGW72BM.js +10 -0
- package/dist/{chunk-ZZA2LUTL.js → chunk-KZP6B6B3.js} +41 -16
- package/dist/chunk-LCG34A5T.js +98 -0
- package/dist/chunk-LLPWQDF7.js +26 -0
- package/dist/{chunk-J7ZQQFPT.js → chunk-LO22VQL5.js} +18 -18
- package/dist/{chunk-BVJWBYIG.js → chunk-LQURV7HQ.js} +9 -7
- package/dist/{chunk-R6RGJF4L.js → chunk-LYXPJERB.js} +15 -5
- package/dist/{chunk-CME4DIML.js → chunk-MCQG4H6T.js} +54 -3
- package/dist/{chunk-VWC72TR3.js → chunk-MVG5MABV.js} +11 -8
- package/dist/{chunk-5FATN5YD.js → chunk-N3RVMBPX.js} +6 -9
- package/dist/chunk-NKG4N6HA.js +188 -0
- package/dist/{chunk-W46K56XU.js → chunk-OACWA4TC.js} +15 -69
- package/dist/chunk-OLLD2BZN.js +33 -0
- package/dist/{chunk-KMSYEE23.js → chunk-P6CON2R2.js} +25 -11
- package/dist/chunk-PO2TYK3C.js +17 -0
- package/dist/{chunk-7EWQKTNQ.js → chunk-POQTE7JI.js} +66 -25
- package/dist/{chunk-HMUZE6EK.js → chunk-QDKETK7D.js} +4 -4
- package/dist/{chunk-GCVA3OIV.js → chunk-QDYE5LVT.js} +13 -3
- package/dist/{chunk-WEUJYDCV.js → chunk-QHH6AUR3.js} +16 -8
- package/dist/chunk-RJTVCA62.js +42 -0
- package/dist/{chunk-MUFHLP4S.js → chunk-S5TEWPWW.js} +50 -41
- package/dist/{chunk-D6TPWNRK.js → chunk-SB3DG572.js} +15 -8
- package/dist/chunk-SKRR3ZMP.js +10 -0
- package/dist/chunk-T4ZFZTY6.js +62 -0
- package/dist/{chunk-I7WU4GTY.js → chunk-T5574MXM.js} +34 -46
- package/dist/{chunk-MKC5HNA7.js → chunk-U4WSJAYK.js} +374 -147
- package/dist/{chunk-BJUZVYQC.js → chunk-UGKELBNC.js} +60 -44
- package/dist/chunk-ULGCGKOE.js +77 -0
- package/dist/{chunk-QA74ITR4.js → chunk-X2VMIBK5.js} +45 -17
- package/dist/chunk-X2X7Q7NW.js +17 -0
- package/dist/chunk-YHBI52P2.js +10 -0
- package/dist/chunk-YIHKQ63K.js +13 -0
- package/dist/{chunk-3Y5X7B5C.js → chunk-YQYVGWIC.js} +6 -11
- package/dist/{chunk-WZQFC7ZN.js → chunk-ZHAT2XZ4.js} +139 -66
- package/dist/{chunk-7IU5TMFL.js → chunk-ZMFY7WAY.js} +124 -40
- package/dist/{chunk-SV56BSUQ.js → chunk-ZZSNTCCL.js} +6 -5
- package/dist/combobox.d.ts +5 -0
- package/dist/combobox.js +15 -12
- package/dist/control-size-CaxQhkKh.d.ts +3 -0
- package/dist/date-input.d.ts +4 -0
- package/dist/date-input.js +12 -9
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +25 -20
- package/dist/dialog.d.ts +37 -5
- package/dist/dialog.js +12 -8
- package/dist/drawer.d.ts +20 -3
- package/dist/drawer.js +11 -7
- package/dist/dropdown-menu.d.ts +26 -2
- package/dist/dropdown-menu.js +9 -4
- package/dist/dropzone.d.ts +35 -0
- package/dist/dropzone.js +23 -0
- package/dist/form.d.ts +82 -3
- package/dist/form.js +205 -45
- package/dist/header-navigation.d.ts +19 -4
- package/dist/header-navigation.js +23 -16
- package/dist/helper.d.ts +36 -0
- package/dist/helper.js +3 -0
- package/dist/index.d.ts +32 -8
- package/dist/index.js +87 -62
- package/dist/indicator.js +4 -4
- package/dist/input.d.ts +4 -0
- package/dist/input.js +10 -8
- package/dist/kanban-board.d.ts +489 -0
- package/dist/kanban-board.js +25 -0
- package/dist/labels-DPrh0se9.d.ts +627 -0
- package/dist/line-chart.d.ts +36 -0
- package/dist/line-chart.js +9 -0
- package/dist/{nav-Bla0o_-1.d.ts → nav-CKKqjBs6.d.ts} +18 -11
- package/dist/number-input.d.ts +4 -0
- package/dist/number-input.js +10 -8
- package/dist/pagination.d.ts +7 -1
- package/dist/pagination.js +14 -10
- package/dist/panel-El4oI68p.d.ts +9 -0
- package/dist/payment-input.d.ts +3 -2
- package/dist/payment-input.js +10 -8
- package/dist/pie-chart.d.ts +64 -0
- package/dist/pie-chart.js +9 -0
- package/dist/popover.d.ts +9 -3
- package/dist/popover.js +11 -7
- package/dist/progress-steps.d.ts +275 -0
- package/dist/progress-steps.js +8 -0
- package/dist/progress.d.ts +21 -1
- package/dist/progress.js +3 -2
- package/dist/provider.d.ts +212 -0
- package/dist/provider.js +7 -0
- package/dist/radar-chart.d.ts +77 -0
- package/dist/radar-chart.js +9 -0
- package/dist/radial-chart.d.ts +73 -0
- package/dist/radial-chart.js +9 -0
- package/dist/radio.js +9 -7
- package/dist/rule-BqzaIwJy.d.ts +80 -0
- package/dist/scroll-area.d.ts +62 -0
- package/dist/scroll-area.js +7 -0
- package/dist/select.d.ts +3 -3
- package/dist/select.js +17 -14
- package/dist/separator.d.ts +114 -0
- package/dist/separator.js +5 -0
- package/dist/shared-CxAedkiy.d.ts +68 -0
- package/dist/sidebar-navigation.d.ts +80 -12
- package/dist/sidebar-navigation.js +18 -9
- package/dist/skeleton.d.ts +61 -0
- package/dist/skeleton.js +5 -0
- package/dist/styles.css +1 -1
- package/dist/switch.js +4 -4
- package/dist/table.d.ts +148 -42
- package/dist/table.js +39 -33
- package/dist/tabs.d.ts +22 -0
- package/dist/tabs.js +3 -3
- package/dist/tag-input.d.ts +3 -2
- package/dist/tag-input.js +13 -11
- package/dist/tag.d.ts +4 -0
- package/dist/tag.js +4 -3
- package/dist/textarea.js +7 -5
- package/dist/theme.css +151 -6
- package/dist/theme.js +11 -9
- package/dist/toast.d.ts +11 -2
- package/dist/toast.js +12 -9
- package/dist/tooltip-surface-C2I9o2QM.d.ts +35 -0
- package/dist/tooltip.d.ts +15 -1
- package/dist/tooltip.js +3 -2
- package/dist/tree.d.ts +5 -0
- package/dist/tree.js +8 -6
- package/dist/types-DR9rAEy1.d.ts +188 -0
- package/dist/use-uploads-KaPqDklo.d.ts +482 -0
- package/dist/verification-code-input.d.ts +84 -0
- package/dist/verification-code-input.js +14 -0
- package/package.json +70 -9
- package/dist/card-nWicloNi.d.ts +0 -80
- package/dist/chunk-24TO7E32.js +0 -42
- package/dist/chunk-FXIBGTS5.js +0 -14
- package/dist/chunk-MFJP5FA7.js +0 -20
- package/dist/chunk-ZZT2E5VT.js +0 -24
- package/dist/shared-BNXAdgh2.d.ts +0 -9
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { P as PanelDividers } from './panel-El4oI68p.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The **in-flow card surface** — one recipe for every bordered/rounded panel that sits in the
|
|
6
|
+
* document flow, so the library stops shipping three spellings of the same box.
|
|
7
|
+
*
|
|
8
|
+
* Before this table there were three, and they disagreed on the edge technique alone:
|
|
9
|
+
* `table/shared.ts` used `ring-1 ring-secondary` + `shadow-xs`, `field/option-row.tsx` used
|
|
10
|
+
* `border border-secondary` + no shadow, and the playground had ~88 distinct strings approximating
|
|
11
|
+
* both. The axis below is derived from what already shipped rather than invented.
|
|
12
|
+
*
|
|
13
|
+
* **One entry point: `surfaceBox(variant, shadow)`.** Card, `<Table>`'s shell, the `bordered` option
|
|
14
|
+
* row and KanbanBoard's column/card all call it, so the box is composed in ONE place and a caller
|
|
15
|
+
* cannot pick a fill without its matching edge. The tables it reads (`SURFACE_FILL`, `SURFACE_EDGE`,
|
|
16
|
+
* `SURFACE_SHADOW`) stay exported for the few sites that need one layer alone.
|
|
17
|
+
*
|
|
18
|
+
* **Ring, never border.** `lib/color.ts`'s `OUTLINE` table already commits to `ring-1 ring-inset`
|
|
19
|
+
* for exactly this reason: a `border` adds to the box, so a bordered card renders 2px larger than a
|
|
20
|
+
* ringed sibling in the same row — the defect that got `Badge`'s `modern` variant deleted. Measured
|
|
21
|
+
* on the `bordered` option row: the old `border` recipe boxed 200×50, the inset-ring one 200×48.
|
|
22
|
+
* An inset ring paints *inside* the border-box, so a surface never changes size when its edge
|
|
23
|
+
* changes weight — and a heavier selected edge cannot bleed onto whatever sits next to it.
|
|
24
|
+
*
|
|
25
|
+
* **Not the overlay family.** Dialog / Drawer / Toast / the four listbox popups are a separate,
|
|
26
|
+
* already-consistent recipe — `ring-1 ring-secondary_alt ring-inset` + `shadow-lg`/`xl`, where the
|
|
27
|
+
* alpha `border-alt` hairline reads correctly over whatever the popup floats above. Floating
|
|
28
|
+
* elevation is a different concern from an in-flow card; do not merge them into this table.
|
|
29
|
+
*
|
|
30
|
+
* This module lives in `src/lib/` (not `src/components/`) so it is invisible to the dependency-graph
|
|
31
|
+
* gate — `field/` is FOUNDATION and may import only foundation, so it could not reach a
|
|
32
|
+
* `components/card/` module at all. Same reason `cn`, `slot` and `seamless` live here.
|
|
33
|
+
*/
|
|
34
|
+
/** The inner gutter. `none` means the caller owns all spacing (full-bleed content, e.g. a table). */
|
|
35
|
+
type SurfacePadding = "none" | "sm" | "md" | "lg";
|
|
36
|
+
declare const SURFACE_PADDINGS: readonly SurfacePadding[];
|
|
37
|
+
/**
|
|
38
|
+
* Which edge + fill a surface wears — **fill only; the lift is a separate axis** (`SurfaceShadow`).
|
|
39
|
+
*
|
|
40
|
+
* - `outlined` — flat, same fill as the page. The default, and the base a `shadow` lifts.
|
|
41
|
+
* Was `option-row.tsx`'s `bordered` card, and it is what `<Table>`'s shell wears.
|
|
42
|
+
* - `subtle` — recedes instead of lifting; for a well/inset region (a control panel, a nested
|
|
43
|
+
* detail block) where the surface is a background, not an object.
|
|
44
|
+
*
|
|
45
|
+
* _There used to be a third, fused member — `elevated` (`bg-primary_alt shadow-sm`) — and a
|
|
46
|
+
* `SURFACE_VARIANT` map keyed by all three. It is deleted, in two steps. First Card split it, because
|
|
47
|
+
* a fused axis can only ever offer ONE step of a seven-step shadow scale and it made that step the
|
|
48
|
+
* default. Then KanbanBoard, its last consumer, gave up its `surface`/`cardSurface` props for a fixed
|
|
49
|
+
* recipe + `bordered`, which left `elevated` with no caller at all. The measurement that shaped it
|
|
50
|
+
* survives in `SURFACE_FILL` below — it is the reason a lifted card steps its fill._
|
|
51
|
+
*/
|
|
52
|
+
type CardSurfaceVariant = "outlined" | "subtle";
|
|
53
|
+
declare const CARD_SURFACE_VARIANTS: readonly CardSurfaceVariant[];
|
|
54
|
+
/**
|
|
55
|
+
* How far the surface lifts. The values are `theme.css`'s `--shadow-*`, which ARE the design
|
|
56
|
+
* system's published scale 1:1 — `xs`(`0 1px 2px 0 /.05`) · `sm` · `md` · `lg` · `xl` ·
|
|
57
|
+
* `2xl`(`0 24px 48px -12px /.18`) — so this table imports no new value, it only opens the scale to a
|
|
58
|
+
* caller. `none` is a real member, not an unspellable default: it names the flat state, which is
|
|
59
|
+
* what a card nested in an already-lifted surface or repeated down a dense list wants.
|
|
60
|
+
*
|
|
61
|
+
* (The published scale has a seventh step, `3xl`. `--shadow-3xl` is deliberately not declared here —
|
|
62
|
+
* it had zero call sites and was deleted; a `2xl` at 48px of blur is already the heaviest thing the
|
|
63
|
+
* library draws in flow.)
|
|
64
|
+
*/
|
|
65
|
+
type SurfaceShadow = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
66
|
+
declare const SURFACE_SHADOWS: readonly SurfaceShadow[];
|
|
67
|
+
|
|
68
|
+
type CardVariant = CardSurfaceVariant;
|
|
69
|
+
type CardPadding = SurfacePadding;
|
|
70
|
+
type CardShadow = SurfaceShadow;
|
|
71
|
+
/** `title` is a `ReactNode` here, which collides with the DOM's `title?: string` tooltip attribute. */
|
|
72
|
+
interface CardProps extends Omit<React.ComponentPropsWithoutRef<"div">, "title"> {
|
|
73
|
+
/**
|
|
74
|
+
* Edge + fill — **not** the lift, which is `shadow`. `outlined` sits flush with the page ·
|
|
75
|
+
* `subtle` is a sunken well that reads as background rather than as an object. The two differ by
|
|
76
|
+
* FILL, in both themes and at every `shadow` step, so no two combinations paint the same box.
|
|
77
|
+
* @default "outlined"
|
|
78
|
+
*/
|
|
79
|
+
variant?: CardVariant;
|
|
80
|
+
/**
|
|
81
|
+
* How far the card lifts, over the design system's published scale — `none` (flat) · `xs` · `sm` ·
|
|
82
|
+
* `md` · `lg` · `xl` · `2xl`. Any step other than `none` draws `theme.css`'s `--shadow-*` **and**
|
|
83
|
+
* raises `outlined`'s fill one stop to `bg-primary_alt`, because a black shadow at 3–18% opacity
|
|
84
|
+
* composites to a 1/255 step on dark: in light the shadow carries the lift, in dark the fill does.
|
|
85
|
+
* `subtle` is a well, so it takes the shadow but never the lifted fill. @default "none"
|
|
86
|
+
*/
|
|
87
|
+
shadow?: CardShadow;
|
|
88
|
+
/**
|
|
89
|
+
* Inner gutter. `none` hands ALL spacing to the caller — use it for full-bleed content that must
|
|
90
|
+
* reach the radius (a table, a media header). @default "md"
|
|
91
|
+
*/
|
|
92
|
+
padding?: CardPadding;
|
|
93
|
+
/**
|
|
94
|
+
* Full-bleed rule between the header and body, and the body and footer — in the library-wide
|
|
95
|
+
* texture vocabulary (`line` · `dot` · `dashed`), with `"none"` naming the off state. All three
|
|
96
|
+
* draw the same token; the texture changes the ink, never the colour. See `docs/rule-policy.md`.
|
|
97
|
+
* @default "none"
|
|
98
|
+
*/
|
|
99
|
+
dividers?: PanelDividers;
|
|
100
|
+
/**
|
|
101
|
+
* The card's headline. A `ReactNode`, so pass a heading element (`<h3>`) when the card should sit
|
|
102
|
+
* in the document outline — the wrapper is a `<div>` precisely so that stays valid HTML.
|
|
103
|
+
*/
|
|
104
|
+
title?: React.ReactNode;
|
|
105
|
+
/** One supporting line under the title. */
|
|
106
|
+
description?: React.ReactNode;
|
|
107
|
+
/** Leading header node — an `<Avatar>`, an icon. The node keeps its own a11y semantics. */
|
|
108
|
+
leading?: React.ReactNode;
|
|
109
|
+
/** Trailing header node — a `<Badge>`, a `<DropdownMenu>` trigger, an action `<Button>`. */
|
|
110
|
+
trailing?: React.ReactNode;
|
|
111
|
+
/** Footer row, below the body. */
|
|
112
|
+
footer?: React.ReactNode;
|
|
113
|
+
/** **Layout/spacing only** (width, margin, grid/flex), merged via `cn()`. Never restyles the surface. */
|
|
114
|
+
className?: string;
|
|
115
|
+
/** The body. */
|
|
116
|
+
children?: React.ReactNode;
|
|
117
|
+
}
|
|
118
|
+
declare function Card({ variant, shadow, padding, dividers, title, description, leading, trailing, footer, className, children, ...rest }: CardProps): React.JSX.Element;
|
|
119
|
+
declare namespace Card {
|
|
120
|
+
var displayName: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { CARD_SURFACE_VARIANTS as C, SURFACE_PADDINGS as S, Card as a, type CardPadding as b, type CardProps as c, type CardShadow as d, type CardSurfaceVariant as e, type CardVariant as f, SURFACE_SHADOWS as g, type SurfacePadding as h, type SurfaceShadow as i };
|
package/dist/card.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as Card, b as CardPadding, c as CardProps, d as CardShadow, f as CardVariant } from './card-D56VxyAe.js';
|
|
2
2
|
import 'react';
|
|
3
|
+
import './panel-El4oI68p.js';
|
|
4
|
+
import './rule-BqzaIwJy.js';
|
package/dist/card.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
"use client";export { Card } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
"use client";export { Card } from './chunk-GZMDZF2V.js';
|
|
2
|
+
import './chunk-LO22VQL5.js';
|
|
3
|
+
import './chunk-FKVPAEJ6.js';
|
|
4
|
+
import './chunk-45Y2ZGNK.js';
|
|
5
|
+
import './chunk-LCG34A5T.js';
|
|
6
|
+
import './chunk-O2LG3PNI.js';
|
|
7
|
+
import './chunk-EDSK6FEH.js';
|
|
4
8
|
import './chunk-52IFGFTL.js';
|
|
5
9
|
import './chunk-ZSNJ6UA3.js';
|
|
6
10
|
//# sourceMappingURL=card.js.map
|
package/dist/checkbox.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
"use client";export { Checkbox, CheckboxGroup } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
"use client";export { Checkbox, CheckboxGroup } from './chunk-5XPMY2LF.js';
|
|
2
|
+
import './chunk-D7EE5GWU.js';
|
|
3
|
+
import './chunk-45Y2ZGNK.js';
|
|
4
|
+
import './chunk-5KSD4WKN.js';
|
|
5
|
+
import './chunk-KZP6B6B3.js';
|
|
6
|
+
import './chunk-AFYXSZGW.js';
|
|
7
7
|
import './chunk-O4GRKO3I.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-BLIZ3CL3.js';
|
|
9
9
|
import './chunk-ZSNJ6UA3.js';
|
|
10
|
+
import './chunk-RJTVCA62.js';
|
|
11
|
+
import './chunk-QDYE5LVT.js';
|
|
10
12
|
//# sourceMappingURL=checkbox.js.map
|
|
11
13
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { TOOLTIP_TONE, TOOLTIP_SWATCH } from './chunk-AFYXSZGW.js';
|
|
2
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
3
|
+
import { useLabels } from './chunk-RJTVCA62.js';
|
|
4
|
+
import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
|
|
5
|
+
import { ResponsiveContainer } from 'recharts';
|
|
6
|
+
export { Area, AreaChart, Bar, BarChart, CartesianGrid, Label, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart, RadialBar, RadialBarChart, ReferenceLine, Text, Tooltip, XAxis, YAxis } from 'recharts';
|
|
7
|
+
import * as React2 from 'react';
|
|
8
|
+
import { useRef, useLayoutEffect } from 'react';
|
|
9
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
// src/components/chart/shared.ts
|
|
12
|
+
var CHART_ROOT = "text-tertiary [&_.recharts-text]:text-xs";
|
|
13
|
+
var POLAR_ROOT = "font-medium text-tertiary [&_.recharts-polar-grid]:text-utility-neutral-100 [&_.recharts-text]:text-xs";
|
|
14
|
+
var MARGIN = {
|
|
15
|
+
line: { left: 5, right: 5, top: 12, bottom: 16 },
|
|
16
|
+
bar: { left: 4, right: 0, top: 12, bottom: 18 },
|
|
17
|
+
/** `bars` layout needs room for the category labels down the left edge. */
|
|
18
|
+
barsLayout: { left: 12, right: 8, top: 12, bottom: 8 },
|
|
19
|
+
/** Pie and Radial draw nothing outside the arc, so their box IS the disc. */
|
|
20
|
+
polar: { left: 0, right: 0, top: 0, bottom: 0 },
|
|
21
|
+
/**
|
|
22
|
+
* The radar's is NOT `polar`, and the asymmetry is the whole point: **this margin IS the band its
|
|
23
|
+
* spoke labels are painted in**, so it is half a text width to the sides and half a line height
|
|
24
|
+
* above and below.
|
|
25
|
+
*
|
|
26
|
+
* Recharts derives the radius as `outerRadius × min(width − left − right, height − top − bottom) / 2`,
|
|
27
|
+
* so pairing this with `outerRadius="100%"` makes the constraint exact — the ring grows until the
|
|
28
|
+
* labels touch the box and stops. The previous pairing (a zero margin and a `72%` guess) got both
|
|
29
|
+
* ends wrong at once: 45px of dead space above and below at a wide size, and clipped labels
|
|
30
|
+
* ("Coverage" → "Cove") the moment a side legend narrowed the plot, because a percentage of
|
|
31
|
+
* `min(w, h)` cannot know how wide a word is.
|
|
32
|
+
*
|
|
33
|
+
* The numbers are measured, not guessed: an angle tick is anchored `POLAR_ANGLE_TICK_SIZE` (17px)
|
|
34
|
+
* outside the ring, and the widest label in the demos ("Coverage") is 56px × 15px, so 32 ends
|
|
35
|
+
* clears a label with a little air. **The sides do NOT carry that same 17px**, which is why they
|
|
36
|
+
* are 64 and not 73: a wide radar is bound by its HEIGHT, so the side band is never the binding
|
|
37
|
+
* constraint there, and in a NARROW one every pixel of side margin comes straight off the radius
|
|
38
|
+
* (a 147px-wide plot is already down to r≈10). **They are a band, not a guarantee** — SVG text
|
|
39
|
+
* does not wrap, so a spoke label materially longer than that, in a plot materially narrower than
|
|
40
|
+
* a card, will still run past the edge. Nothing short of measuring the text can fix that, and the
|
|
41
|
+
* radius has to be decided before there is a tick to measure.
|
|
42
|
+
*/
|
|
43
|
+
radar: { left: 64, right: 64, top: 32, bottom: 32 }
|
|
44
|
+
};
|
|
45
|
+
var AXIS = {
|
|
46
|
+
fill: "currentColor",
|
|
47
|
+
axisLine: false,
|
|
48
|
+
tickLine: false,
|
|
49
|
+
interval: "preserveStartEnd"
|
|
50
|
+
};
|
|
51
|
+
var X_AXIS_PADDING = { left: 10, right: 10 };
|
|
52
|
+
var AXIS_TICK = "text-quaternary";
|
|
53
|
+
var AXIS_LABEL = "text-xs! font-medium";
|
|
54
|
+
var GRID = "text-utility-neutral-100";
|
|
55
|
+
var ZERO_LINE = "text-utility-neutral-300";
|
|
56
|
+
var BAND_SEPARATOR = "text-utility-neutral-200";
|
|
57
|
+
var TOOLTIP_CURSOR = {
|
|
58
|
+
line: { className: "stroke-utility-brand-600 stroke-2" },
|
|
59
|
+
bar: { className: "fill-utility-neutral-200/20" }
|
|
60
|
+
};
|
|
61
|
+
var AREA_BAND = {
|
|
62
|
+
detached: "[&_.recharts-area-area]:translate-y-1.5 [&_.recharts-area-area]:[clip-path:inset(0_0_6px_0)]",
|
|
63
|
+
flush: ""
|
|
64
|
+
};
|
|
65
|
+
var AREA_FILL_OPACITY = 0.1;
|
|
66
|
+
var AREA_SOLID_OPACITY = 0.25;
|
|
67
|
+
var AREA_GRADIENT_STOPS = { from: 0.7, to: 0, fromOffset: "5%", toOffset: "95%" };
|
|
68
|
+
var LINE_DASH = { strokeDasharray: "6 4", strokeLinecap: "butt" };
|
|
69
|
+
var DOT_SIZE = { r: 3, activeR: 4, strokeWidth: 2 };
|
|
70
|
+
var dot = (color, r) => ({
|
|
71
|
+
className: "fill-bg-primary",
|
|
72
|
+
style: { color },
|
|
73
|
+
stroke: "currentColor",
|
|
74
|
+
strokeDasharray: "none",
|
|
75
|
+
strokeWidth: DOT_SIZE.strokeWidth,
|
|
76
|
+
r
|
|
77
|
+
});
|
|
78
|
+
var DOT = (color) => dot(color, DOT_SIZE.r);
|
|
79
|
+
var ACTIVE_DOT = (color) => dot(color, DOT_SIZE.activeR);
|
|
80
|
+
var NO_ANIMATION = { isAnimationActive: false };
|
|
81
|
+
var TOOLTIP_FOLLOW = "transform 400ms ease";
|
|
82
|
+
var MAX_BAR_SIZE = 32;
|
|
83
|
+
var BAR_RADIUS = [6, 6, 0, 0];
|
|
84
|
+
var BAR_RADIUS_HORIZONTAL = [0, 6, 6, 0];
|
|
85
|
+
var BAR_LAYOUT = { columns: "horizontal", bars: "vertical" };
|
|
86
|
+
var PIE_SIZE = {
|
|
87
|
+
xs: { height: 160, outer: 80 },
|
|
88
|
+
sm: { height: 200, outer: 100 },
|
|
89
|
+
md: { height: 240, outer: 120 },
|
|
90
|
+
lg: { height: 280, outer: 140 }
|
|
91
|
+
};
|
|
92
|
+
var PIE_DONUT = {
|
|
93
|
+
thin: 0.65,
|
|
94
|
+
regular: 0.5,
|
|
95
|
+
thick: 0.35
|
|
96
|
+
};
|
|
97
|
+
var RADIAL_SIZE = {
|
|
98
|
+
xs: {
|
|
99
|
+
height: 172,
|
|
100
|
+
inner: 52,
|
|
101
|
+
outer: 86,
|
|
102
|
+
label: "text-xl font-semibold",
|
|
103
|
+
description: "text-xs font-medium",
|
|
104
|
+
labelDy: "1.25em",
|
|
105
|
+
descriptionDy: "-1.175em"
|
|
106
|
+
},
|
|
107
|
+
sm: {
|
|
108
|
+
height: 220,
|
|
109
|
+
inner: 61,
|
|
110
|
+
outer: 110,
|
|
111
|
+
label: "text-display-xs font-semibold",
|
|
112
|
+
description: "text-xs font-medium",
|
|
113
|
+
labelDy: "1.15em",
|
|
114
|
+
descriptionDy: "-1.35em"
|
|
115
|
+
},
|
|
116
|
+
md: {
|
|
117
|
+
height: 264,
|
|
118
|
+
inner: 74,
|
|
119
|
+
outer: 132,
|
|
120
|
+
label: "text-display-sm font-semibold",
|
|
121
|
+
description: "text-sm font-medium",
|
|
122
|
+
labelDy: "1.075em",
|
|
123
|
+
descriptionDy: "-1.45em"
|
|
124
|
+
},
|
|
125
|
+
lg: {
|
|
126
|
+
height: 308,
|
|
127
|
+
inner: 84,
|
|
128
|
+
outer: 154,
|
|
129
|
+
label: "text-display-md font-semibold",
|
|
130
|
+
description: "text-sm font-medium",
|
|
131
|
+
labelDy: "1.05em",
|
|
132
|
+
descriptionDy: "-1.5em"
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
var RADIAL_TRACK = { className: "fill-utility-neutral-100" };
|
|
136
|
+
var POLAR_HOVER = [
|
|
137
|
+
"[&_.recharts-radial-bar-sector]:transition-opacity",
|
|
138
|
+
"[&_.recharts-radial-bar-sectors:hover_.recharts-radial-bar-sector:not(:hover)]:opacity-40",
|
|
139
|
+
"[&_.recharts-pie-sector]:transition-opacity",
|
|
140
|
+
"[&_.recharts-pie:hover_.recharts-pie-sector:not(:hover)]:opacity-40"
|
|
141
|
+
].join(" ");
|
|
142
|
+
var POLAR_ANGLE_TICK = "fill-utility-neutral-700 text-xs font-medium";
|
|
143
|
+
var POLAR_RADIUS_PILL = "fill-utility-neutral-50 stroke-border-secondary_alt stroke-1";
|
|
144
|
+
var POLAR_ANGLE_TICK_LIFT = 9;
|
|
145
|
+
var POLAR_RADIUS_PILL_HEIGHT = 20;
|
|
146
|
+
var POLAR_RADIUS_PILL_PAD_X = 10;
|
|
147
|
+
var POLAR_RADIUS_PILL_BASELINE = 4;
|
|
148
|
+
var POLAR_RADIUS_RINGS_DEFAULT = 4;
|
|
149
|
+
var LEGEND = {
|
|
150
|
+
list: "flex flex-wrap",
|
|
151
|
+
horizontal: "flex-row justify-center gap-3",
|
|
152
|
+
vertical: "flex-col items-start gap-1",
|
|
153
|
+
item: "flex items-center gap-2 text-sm text-tertiary",
|
|
154
|
+
swatch: "block size-2 shrink-0 rounded-full bg-current ring-[0.5px] ring-secondary_alt ring-inset"
|
|
155
|
+
};
|
|
156
|
+
var LEGEND_GAP = { vertical: "gap-4", horizontal: "gap-2" };
|
|
157
|
+
var TOOLTIP = {
|
|
158
|
+
layout: "flex flex-col gap-0.5 px-2.5 py-1.5",
|
|
159
|
+
/** The row box. Its `text-*` colour comes from the tone — see `ChartTooltip.tsx`. */
|
|
160
|
+
row: "flex items-center gap-1.5"
|
|
161
|
+
};
|
|
162
|
+
var EMPTY = "flex items-center justify-center text-sm text-tertiary";
|
|
163
|
+
var formatNumber = (value) => value.toLocaleString();
|
|
164
|
+
|
|
165
|
+
// src/components/chart/labels.ts
|
|
166
|
+
var CHART_LABELS = {
|
|
167
|
+
empty: "No data to display"
|
|
168
|
+
};
|
|
169
|
+
function ChartFrame({
|
|
170
|
+
ariaLabel,
|
|
171
|
+
height,
|
|
172
|
+
isEmpty,
|
|
173
|
+
emptyMessage,
|
|
174
|
+
labels,
|
|
175
|
+
component,
|
|
176
|
+
className,
|
|
177
|
+
table,
|
|
178
|
+
legend,
|
|
179
|
+
legendPlacement = "bottom",
|
|
180
|
+
legendAlign = "center",
|
|
181
|
+
children
|
|
182
|
+
}) {
|
|
183
|
+
warnPositiveInt(component, "height", height);
|
|
184
|
+
const t = useLabels("chart", CHART_LABELS, labels);
|
|
185
|
+
const gradientId = `jz-chart-${React2.useId().replaceAll(/[^a-zA-Z0-9]/g, "")}`;
|
|
186
|
+
const legendNode = !isEmpty && legend ? legend : null;
|
|
187
|
+
const isBeside = legendPlacement === "left" || legendPlacement === "right";
|
|
188
|
+
const isFirst = legendPlacement === "top" || legendPlacement === "left";
|
|
189
|
+
const plot = isEmpty ? /* @__PURE__ */ jsx("div", { className: EMPTY, style: { height }, children: emptyMessage ?? t.empty }) : (
|
|
190
|
+
/*
|
|
191
|
+
* The plot is hidden from assistive tech, and the table below is the WHOLE accessible story.
|
|
192
|
+
*
|
|
193
|
+
* The alternative was recharts' `accessibilityLayer`, which buys keyboard tooltip traversal.
|
|
194
|
+
* Measured, it puts `role="application"` and `tabindex="0"` on the `<svg>` — axe passes it,
|
|
195
|
+
* but `role="application"` tells a screen reader to hand every keystroke to the widget, and
|
|
196
|
+
* that is a large claim for a static plot. Leaving the SVG exposed instead is worse: its
|
|
197
|
+
* axis and legend text would be announced as loose fragments AROUND the table, so the same
|
|
198
|
+
* numbers get read twice, once meaninglessly. One representation, and it is the real one.
|
|
199
|
+
*
|
|
200
|
+
* **It defaults to `true` in recharts 3, so declining it means saying so.** The clone below
|
|
201
|
+
* is that declaration, and it is done HERE rather than at four chart roots so a fifth chart
|
|
202
|
+
* cannot forget it. Two things it fixes at once: the UA focus ring the tabbable `<svg>` drew
|
|
203
|
+
* around the whole plot on click, and the `aria-hidden` + focusable contradiction that ring
|
|
204
|
+
* was the visible symptom of — a wrapper cannot hide something the tab order still reaches.
|
|
205
|
+
*
|
|
206
|
+
* `[&_:focus]:outline-none` covers what that clone CANNOT reach. recharts 3 renders its
|
|
207
|
+
* paint order as a stack of `<g class="recharts-zIndex-layer_*" tabindex="-1">` portals, and
|
|
208
|
+
* `tabindex="-1"` is set unconditionally — no prop turns it off. An SVG element does not get
|
|
209
|
+
* the mouse-focus exemption a `<div>` does, so a plain CLICK anywhere on the plot focuses
|
|
210
|
+
* whichever layer was hit and Chrome paints its UA ring (`auto 5px`) around that layer's
|
|
211
|
+
* bounding box: the whole plot rect on a cartesian chart, the hovered wedge's box on a pie.
|
|
212
|
+
* A blanket `:focus` reset is safe HERE and only here — the subtree is `aria-hidden`, holds
|
|
213
|
+
* nothing interactive, and nothing in it is reachable by keyboard to need a ring.
|
|
214
|
+
*/
|
|
215
|
+
/*
|
|
216
|
+
* `min-w-0` is load-bearing beside a legend: a flex item's `min-width: auto` floors it at
|
|
217
|
+
* min-content, and `ResponsiveContainer` reports the width it is GIVEN, so without this the plot
|
|
218
|
+
* refuses to shrink and pushes the legend off the card instead.
|
|
219
|
+
*/
|
|
220
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: cn("[&_:focus]:outline-none", isBeside && legendNode && "min-w-0 flex-1"), style: { height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { initialDimension: { width: 1, height: 1 }, width: "100%", height: "100%", children: React2.cloneElement(children(gradientId), { accessibilityLayer: false }) }) })
|
|
221
|
+
);
|
|
222
|
+
return /* @__PURE__ */ jsxs("figure", { "aria-label": ariaLabel, className: cn("m-0 w-full", className), children: [
|
|
223
|
+
legendNode ? /* @__PURE__ */ jsxs(
|
|
224
|
+
"div",
|
|
225
|
+
{
|
|
226
|
+
className: cn(
|
|
227
|
+
"flex",
|
|
228
|
+
isBeside ? cn("flex-row", LEGEND_GAP.vertical, legendAlign === "start" ? "items-start" : "items-center") : cn("flex-col", LEGEND_GAP.horizontal)
|
|
229
|
+
),
|
|
230
|
+
children: [
|
|
231
|
+
isFirst ? /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "shrink-0", children: legendNode }) : null,
|
|
232
|
+
plot,
|
|
233
|
+
isFirst ? null : /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "shrink-0", children: legendNode })
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
) : plot,
|
|
237
|
+
table
|
|
238
|
+
] });
|
|
239
|
+
}
|
|
240
|
+
function ChartLegendContent({ items, placement }) {
|
|
241
|
+
const isVertical = placement === "left" || placement === "right";
|
|
242
|
+
return /* @__PURE__ */ jsx("ul", { className: cn(LEGEND.list, isVertical ? LEGEND.vertical : LEGEND.horizontal), children: items.map((item, index) => /* @__PURE__ */ jsxs("li", { className: LEGEND.item, style: { color: item.color }, children: [
|
|
243
|
+
/* @__PURE__ */ jsx("span", { className: LEGEND.swatch }),
|
|
244
|
+
/* @__PURE__ */ jsx("span", { className: "text-tertiary", children: item.label })
|
|
245
|
+
] }, `${item.label}-${index}`)) });
|
|
246
|
+
}
|
|
247
|
+
var keyOf = (entry, labels) => {
|
|
248
|
+
const datum = entry.payload?.["name"];
|
|
249
|
+
for (const candidate of [entry.dataKey, entry.name, datum]) {
|
|
250
|
+
const key = typeof candidate === "string" || typeof candidate === "number" ? String(candidate) : "";
|
|
251
|
+
if (key && labels[key] !== void 0) return key;
|
|
252
|
+
}
|
|
253
|
+
return String(datum ?? entry.name ?? entry.dataKey ?? "");
|
|
254
|
+
};
|
|
255
|
+
var APPEARANCE_FRAMES = 2;
|
|
256
|
+
function usePointerFollow(active) {
|
|
257
|
+
const ref = useRef(null);
|
|
258
|
+
useLayoutEffect(() => {
|
|
259
|
+
if (!active) return;
|
|
260
|
+
const wrapper = ref.current?.closest(".recharts-tooltip-wrapper");
|
|
261
|
+
if (!wrapper) return;
|
|
262
|
+
if (globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
263
|
+
wrapper.style.transition = "none";
|
|
264
|
+
let frame = 0;
|
|
265
|
+
let remaining = APPEARANCE_FRAMES;
|
|
266
|
+
const arm = () => {
|
|
267
|
+
if (remaining-- > 0) {
|
|
268
|
+
frame = requestAnimationFrame(arm);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
wrapper.style.transition = TOOLTIP_FOLLOW;
|
|
272
|
+
};
|
|
273
|
+
frame = requestAnimationFrame(arm);
|
|
274
|
+
return () => {
|
|
275
|
+
cancelAnimationFrame(frame);
|
|
276
|
+
wrapper.style.transition = "";
|
|
277
|
+
};
|
|
278
|
+
}, [active]);
|
|
279
|
+
return ref;
|
|
280
|
+
}
|
|
281
|
+
function ChartTooltipContent({ colors, labels, formatValue, formatLabel, tone = "surface", active, payload, label }) {
|
|
282
|
+
const ref = usePointerFollow(active === true);
|
|
283
|
+
if (!active || !payload || payload.length === 0) return null;
|
|
284
|
+
const t = TOOLTIP_TONE[tone];
|
|
285
|
+
const surface = cn(TOOLTIP.layout, t.surface);
|
|
286
|
+
const format = (value) => typeof value === "number" ? formatValue(value) : String(value ?? "");
|
|
287
|
+
if (payload.length === 1) {
|
|
288
|
+
const entry = payload[0];
|
|
289
|
+
const key = keyOf(entry, labels);
|
|
290
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: surface, children: [
|
|
291
|
+
/* @__PURE__ */ jsx("p", { className: t.title, children: format(entry.value) }),
|
|
292
|
+
/* @__PURE__ */ jsx("p", { className: cn(TOOLTIP.row, t.supporting), children: labels[key] ?? key })
|
|
293
|
+
] });
|
|
294
|
+
}
|
|
295
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: surface, children: [
|
|
296
|
+
/* @__PURE__ */ jsx("p", { className: t.title, children: formatLabel ? formatLabel(label) : String(label ?? "") }),
|
|
297
|
+
payload.map((entry, index) => {
|
|
298
|
+
const key = keyOf(entry, labels);
|
|
299
|
+
return (
|
|
300
|
+
/* The series colour rides as an inline `style` — on this row it is not type, it is what the
|
|
301
|
+
`bg-current` swatch reads, and a style always beats the tone's `text-*` class. The tone's
|
|
302
|
+
own colour is re-applied to the inner span, which IS type. */
|
|
303
|
+
/* @__PURE__ */ jsxs("p", { className: cn(TOOLTIP.row, t.supporting), style: { color: colors[key] }, children: [
|
|
304
|
+
/* @__PURE__ */ jsx("span", { className: TOOLTIP_SWATCH }),
|
|
305
|
+
/* @__PURE__ */ jsxs("span", { className: t.supporting, children: [
|
|
306
|
+
labels[key] ?? key,
|
|
307
|
+
": ",
|
|
308
|
+
format(entry.value)
|
|
309
|
+
] })
|
|
310
|
+
] }, `${key}-${index}`)
|
|
311
|
+
);
|
|
312
|
+
})
|
|
313
|
+
] });
|
|
314
|
+
}
|
|
315
|
+
function ChartDataTable({ caption, rowHeader, columns, rows }) {
|
|
316
|
+
return /* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsxs("table", { children: [
|
|
317
|
+
caption ? /* @__PURE__ */ jsx("caption", { children: caption }) : null,
|
|
318
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
319
|
+
/* @__PURE__ */ jsx("th", { scope: "col", children: rowHeader }),
|
|
320
|
+
columns.map((column, i) => /* @__PURE__ */ jsx("th", { scope: "col", children: column }, `${column}-${i}`))
|
|
321
|
+
] }) }),
|
|
322
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
323
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: row[0] }),
|
|
324
|
+
row.slice(1).map((cell, j) => /* @__PURE__ */ jsx("td", { children: cell }, j))
|
|
325
|
+
] }, i)) })
|
|
326
|
+
] }) });
|
|
327
|
+
}
|
|
328
|
+
var BRAND = [
|
|
329
|
+
"var(--color-utility-brand-700)",
|
|
330
|
+
"var(--color-utility-brand-600)",
|
|
331
|
+
"var(--color-utility-brand-500)",
|
|
332
|
+
"var(--color-utility-brand-400)",
|
|
333
|
+
"var(--color-utility-brand-300)",
|
|
334
|
+
"var(--color-utility-brand-200)"
|
|
335
|
+
];
|
|
336
|
+
BRAND.length;
|
|
337
|
+
var DEFAULT_PALETTE = [];
|
|
338
|
+
function paletteRamp(palette) {
|
|
339
|
+
return palette.length > 0 ? palette : BRAND;
|
|
340
|
+
}
|
|
341
|
+
function paletteLength(palette) {
|
|
342
|
+
return paletteRamp(palette).length;
|
|
343
|
+
}
|
|
344
|
+
function seriesColor(color, index, palette) {
|
|
345
|
+
if (color) return color;
|
|
346
|
+
const ramp = paletteRamp(palette);
|
|
347
|
+
return ramp[index % ramp.length];
|
|
348
|
+
}
|
|
349
|
+
var FORMER_HUES = {
|
|
350
|
+
brand: "utility-brand-600",
|
|
351
|
+
blue: "utility-blue-600",
|
|
352
|
+
green: "utility-green-600",
|
|
353
|
+
amber: "utility-amber-600",
|
|
354
|
+
red: "utility-red-600",
|
|
355
|
+
neutral: "utility-neutral-600"
|
|
356
|
+
};
|
|
357
|
+
function warnChartColor(component, where, value) {
|
|
358
|
+
const replacement = FORMER_HUES[value];
|
|
359
|
+
if (replacement) {
|
|
360
|
+
devWarn(
|
|
361
|
+
`<${component}> ${where} is "${value}", which is now the CSS colour of that name, not the house token it used to mean. Use token("${replacement}").`
|
|
362
|
+
);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
if (typeof CSS !== "undefined" && typeof CSS.supports === "function" && !CSS.supports("color", value)) {
|
|
366
|
+
devWarn(
|
|
367
|
+
`<${component}> ${where} is "${value}", which is not a CSS colour. Pass a colour VALUE ("#e11d48", "oklch(62% .21 25)") or token("utility-blue-600") \u2014 not a class name.`
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
function useSeriesColors(component, total, resolve, steps) {
|
|
372
|
+
const colors = React2.useMemo(() => Array.from({ length: total }, (_, i) => resolve(i)), [total, resolve]);
|
|
373
|
+
const joined = colors.join("|");
|
|
374
|
+
React2.useEffect(() => {
|
|
375
|
+
if (total > steps) {
|
|
376
|
+
devWarn(
|
|
377
|
+
`<${component}> has ${total} series but the palette has ${steps} steps \u2014 colours repeat from series ${steps + 1}. Give the extra series an explicit \`color\`, or pass a longer \`palette\`.`
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
const seen = /* @__PURE__ */ new Set();
|
|
381
|
+
for (const [i, value] of joined.split("|").entries()) {
|
|
382
|
+
if (!value || seen.has(value)) continue;
|
|
383
|
+
seen.add(value);
|
|
384
|
+
warnChartColor(component, `series ${i + 1}'s colour`, value);
|
|
385
|
+
}
|
|
386
|
+
}, [component, total, steps, joined]);
|
|
387
|
+
return colors;
|
|
388
|
+
}
|
|
389
|
+
function useCartesianColors(component, series, palette) {
|
|
390
|
+
const resolve = React2.useCallback((i) => seriesColor(series[i]?.color, i, palette), [series, palette]);
|
|
391
|
+
return useSeriesColors(component, series.length, resolve, paletteLength(palette));
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export { ACTIVE_DOT, AREA_BAND, AREA_FILL_OPACITY, AREA_GRADIENT_STOPS, AREA_SOLID_OPACITY, AXIS, AXIS_LABEL, AXIS_TICK, BAND_SEPARATOR, BAR_LAYOUT, BAR_RADIUS, BAR_RADIUS_HORIZONTAL, CHART_ROOT, ChartDataTable, ChartFrame, ChartLegendContent, ChartTooltipContent, DEFAULT_PALETTE, DOT, GRID, LINE_DASH, MARGIN, MAX_BAR_SIZE, NO_ANIMATION, PIE_DONUT, PIE_SIZE, POLAR_ANGLE_TICK, POLAR_ANGLE_TICK_LIFT, POLAR_HOVER, POLAR_RADIUS_PILL, POLAR_RADIUS_PILL_BASELINE, POLAR_RADIUS_PILL_HEIGHT, POLAR_RADIUS_PILL_PAD_X, POLAR_RADIUS_RINGS_DEFAULT, POLAR_ROOT, RADIAL_SIZE, RADIAL_TRACK, TOOLTIP_CURSOR, X_AXIS_PADDING, ZERO_LINE, formatNumber, paletteLength, seriesColor, useCartesianColors, useSeriesColors };
|
|
395
|
+
//# sourceMappingURL=chunk-22M75A3N.js.map
|
|
396
|
+
//# sourceMappingURL=chunk-22M75A3N.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FILL } from './chunk-MCQG4H6T.js';
|
|
2
2
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
3
|
+
import { warnNeedsName, warnRange, devWarn } from './chunk-QDYE5LVT.js';
|
|
3
4
|
import 'react';
|
|
4
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
7
|
var TRACK = "relative w-full overflow-hidden rounded-full bg-tertiary";
|
|
7
8
|
var TRACK_SIZE = { sm: "h-1.5", md: "h-2" };
|
|
8
|
-
var
|
|
9
|
+
var FILL_BASE = "size-full rounded-full transition-transform duration-75 ease-linear";
|
|
9
10
|
var NOTCH = "absolute inset-y-0 w-1 -translate-x-1/2 bg-primary transition-[left] duration-75 ease-linear";
|
|
10
11
|
var VALUE_TEXT = "shrink-0 text-sm font-medium text-tertiary tabular-nums";
|
|
11
12
|
var BUBBLE = "absolute rounded-[10px] bg-primary_alt px-3 py-2 shadow-lg ring-1 ring-secondary_alt ring-inset";
|
|
@@ -26,6 +27,7 @@ function Progress(props) {
|
|
|
26
27
|
valuePosition = "none",
|
|
27
28
|
formatValue,
|
|
28
29
|
size = "md",
|
|
30
|
+
color = "brand",
|
|
29
31
|
"aria-label": ariaLabel,
|
|
30
32
|
"aria-labelledby": ariaLabelledBy,
|
|
31
33
|
className
|
|
@@ -52,7 +54,7 @@ function Progress(props) {
|
|
|
52
54
|
"aria-labelledby": ariaLabelledBy,
|
|
53
55
|
className: cn(TRACK, TRACK_SIZE[size], valuePosition === "none" && className),
|
|
54
56
|
children: [
|
|
55
|
-
/* @__PURE__ */ jsx("div", { className: FILL, style: { transform: `translateX(-${100 - paintPercent}%)` } }),
|
|
57
|
+
/* @__PURE__ */ jsx("div", { className: cn(FILL_BASE, FILL[color]), style: { transform: `translateX(-${100 - paintPercent}%)` } }),
|
|
56
58
|
notchPercent !== null && /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: NOTCH, style: { left: `${notchPercent}%` } })
|
|
57
59
|
]
|
|
58
60
|
}
|
|
@@ -67,5 +69,5 @@ function Progress(props) {
|
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
export { Progress };
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-33TOK7ES.js.map
|
|
73
|
+
//# sourceMappingURL=chunk-33TOK7ES.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useControllableOpen, DialogSurface } from './chunk-
|
|
1
|
+
import { useControllableOpen, DialogSurface } from './chunk-CKMWBVRR.js';
|
|
2
2
|
import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -10,8 +10,9 @@ function AlertDialog(props) {
|
|
|
10
10
|
defaultOpen = false,
|
|
11
11
|
onOpenChange,
|
|
12
12
|
size = "md",
|
|
13
|
+
backdrop = "scrim",
|
|
13
14
|
showClose = false,
|
|
14
|
-
dividers =
|
|
15
|
+
dividers = "line",
|
|
15
16
|
keepMounted = false,
|
|
16
17
|
title,
|
|
17
18
|
description,
|
|
@@ -33,6 +34,7 @@ function AlertDialog(props) {
|
|
|
33
34
|
DialogSurface,
|
|
34
35
|
{
|
|
35
36
|
size,
|
|
37
|
+
backdrop,
|
|
36
38
|
showClose,
|
|
37
39
|
dividers,
|
|
38
40
|
keepMounted,
|
|
@@ -53,5 +55,5 @@ function AlertDialog(props) {
|
|
|
53
55
|
AlertDialog.displayName = "AlertDialog";
|
|
54
56
|
|
|
55
57
|
export { AlertDialog };
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-3H444OJA.js.map
|
|
59
|
+
//# sourceMappingURL=chunk-3H444OJA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { devWarn } from './chunk-
|
|
1
|
+
import { devWarn } from './chunk-QDYE5LVT.js';
|
|
2
2
|
|
|
3
3
|
// src/components/date-input/date-utils.ts
|
|
4
4
|
var BE_OFFSET = 543;
|
|
@@ -309,15 +309,6 @@ var SEG_PLACEHOLDER = {
|
|
|
309
309
|
second: "--",
|
|
310
310
|
dayPeriod: "AM"
|
|
311
311
|
};
|
|
312
|
-
var SEG_LABEL = {
|
|
313
|
-
month: "Month",
|
|
314
|
-
day: "Day",
|
|
315
|
-
year: "Year",
|
|
316
|
-
hour: "Hour",
|
|
317
|
-
minute: "Minute",
|
|
318
|
-
second: "Second",
|
|
319
|
-
dayPeriod: "AM/PM"
|
|
320
|
-
};
|
|
321
312
|
function displaySeg(seg, p, cfg) {
|
|
322
313
|
if (seg === "dayPeriod") {
|
|
323
314
|
const v2 = getDisp("dayPeriod", p, cfg);
|
|
@@ -331,6 +322,6 @@ function segValueText(seg, p, cfg) {
|
|
|
331
322
|
return displaySeg(seg, p, cfg);
|
|
332
323
|
}
|
|
333
324
|
|
|
334
|
-
export { BE_OFFSET, DEFAULT_FORMAT,
|
|
335
|
-
//# sourceMappingURL=chunk-
|
|
336
|
-
//# sourceMappingURL=chunk-
|
|
325
|
+
export { BE_OFFSET, DEFAULT_FORMAT, applyPastedDate, clamp, dispBounds, displaySeg, fromISO, getDisp, pad, parseFormat, parsePastedDate, segValueText, setDisp, toISO, wrap };
|
|
326
|
+
//# sourceMappingURL=chunk-3QXLIZIX.js.map
|
|
327
|
+
//# sourceMappingURL=chunk-3QXLIZIX.js.map
|