@crewlethq/ui 0.4.4 → 0.5.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/README.md +888 -24
- package/dist/Accordion/index.js +2 -2
- package/dist/AddPill/index.js +1 -1
- package/dist/{AddPill-DFWXYLIQ.css → AddPill-IJQYCY6C.css} +9 -0
- package/dist/AppShell/AppShell.d.ts +26 -5
- package/dist/AppShell/index.js +3 -3
- package/dist/{AppShell-NVE6LHNI.css → AppShell-XARELGIH.css} +178 -25
- package/dist/Avatar/Avatar.d.ts +85 -40
- package/dist/Avatar/AvatarStack.d.ts +76 -0
- package/dist/Avatar/index.d.ts +5 -2
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar-XID7Z74C.css +200 -0
- package/dist/AvatarStack-GEJBNV7E.css +72 -0
- package/dist/BrandLockup/index.js +1 -1
- package/dist/{BrandLockup-6ISDEHPJ.css → BrandLockup-JKGXFCZF.css} +25 -19
- package/dist/Button/Button.d.ts +7 -2
- package/dist/Button/index.js +1 -1
- package/dist/{Button-D4J6B4MA.css → Button-X4B2TJAQ.css} +50 -19
- package/dist/Callout/index.js +1 -1
- package/dist/Canvas/index.js +4 -4
- package/dist/Card/Card.d.ts +9 -5
- package/dist/Card/index.js +1 -1
- package/dist/{Card-RLR254LD.css → Card-GLP7SUV6.css} +25 -18
- package/dist/Charts/BarList.d.ts +18 -1
- package/dist/Charts/ChartTooltip.d.ts +68 -0
- package/dist/Charts/StackedBar.d.ts +25 -7
- package/dist/Charts/StackedColumns.d.ts +112 -0
- package/dist/Charts/TimeSeries.d.ts +33 -2
- package/dist/Charts/dataColor.d.ts +22 -14
- package/dist/Charts/index.d.ts +6 -0
- package/dist/Charts/index.js +1 -1
- package/dist/Charts/useChartHover.d.ts +56 -0
- package/dist/Charts-B3YEF7R4.css +742 -0
- package/dist/Checkbox/index.js +1 -1
- package/dist/{Checkbox-VGW26YLQ.css → Checkbox-BOXQ747I.css} +2 -2
- package/dist/CodeBlock/index.js +4 -4
- package/dist/Combobox/index.js +5 -5
- package/dist/CommandPalette/CommandPalette.d.ts +97 -6
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +9 -7
- package/dist/CommandPalette-C5AMKGN2.css +259 -0
- package/dist/Copyable/index.js +3 -3
- package/dist/DataTable/index.js +7 -7
- package/dist/{DataTable-37UWTRN6.css → DataTable-OLHPF7D4.css} +35 -38
- package/dist/DataView/index.js +15 -15
- package/dist/{DataView-256YF32J.css → DataView-N6JX464S.css} +5 -4
- package/dist/DateTimePicker/index.js +5 -5
- package/dist/DiffList/index.js +1 -1
- package/dist/Disclosure/index.js +2 -2
- package/dist/EntityChip/EntityChip.d.ts +9 -12
- package/dist/EntityChip/index.d.ts +1 -1
- package/dist/EntityChip/index.js +2 -2
- package/dist/ErrorBoundary/index.js +2 -2
- package/dist/{ErrorBoundary-ME36CQTA.css → ErrorBoundary-U2PA3LY2.css} +4 -4
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-VQGNMJDI.css → IconButton-TVEUWK6L.css} +2 -2
- package/dist/ImageUpload/ImageUpload.d.ts +10 -7
- package/dist/ImageUpload/index.js +2 -2
- package/dist/{ImageUpload-HKFIZR6D.css → ImageUpload-YCHJMUGX.css} +24 -10
- package/dist/Input/index.js +2 -2
- package/dist/Kbd/Kbd.d.ts +14 -4
- package/dist/Kbd/index.js +1 -1
- package/dist/Kbd-JPLDVJIP.css +71 -0
- package/dist/Layer/index.js +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/List/index.js +1 -1
- package/dist/{List-XTHESXLR.css → List-MYJIV6MP.css} +12 -2
- package/dist/ListInput/index.js +6 -6
- package/dist/Listbox/index.js +2 -2
- package/dist/Listbox/useListbox.d.ts +2 -0
- package/dist/{Listbox-ZXYYNN6U.css → Listbox-6WJNJQVQ.css} +32 -7
- package/dist/Menu/index.js +4 -4
- package/dist/Meter/Meter.d.ts +103 -16
- package/dist/Meter/index.d.ts +2 -2
- package/dist/Meter/index.js +1 -1
- package/dist/{Meter-SKOOXQBC.css → Meter-5VCSFMZW.css} +46 -7
- package/dist/Modal/index.js +4 -4
- package/dist/{Modal-XYQJ4BL6.css → Modal-JAYBS2KS.css} +13 -4
- package/dist/OrgLabel/OrgLabel.d.ts +60 -24
- package/dist/OrgLabel/index.d.ts +1 -1
- package/dist/OrgLabel/index.js +2 -1
- package/dist/{OrgLabel-D7U6QJZD.css → OrgLabel-CR233G34.css} +9 -18
- package/dist/OrgNode/index.js +3 -2
- package/dist/OrgTable/OrgTable.d.ts +2 -2
- package/dist/OrgTable/index.js +8 -7
- package/dist/Popover/index.js +2 -2
- package/dist/PricingCard/index.js +3 -3
- package/dist/{PricingCard-JFI7RYXP.css → PricingCard-7EFXRSD2.css} +4 -5
- package/dist/SearchTrigger/SearchTrigger.d.ts +23 -4
- package/dist/SearchTrigger/index.d.ts +1 -1
- package/dist/SearchTrigger/index.js +1 -1
- package/dist/SearchTrigger-Z5D4AAY7.css +112 -0
- package/dist/SegmentedControl/index.js +2 -2
- package/dist/SegmentedMeter/SegmentedMeter.d.ts +107 -0
- package/dist/SegmentedMeter/index.d.ts +3 -0
- package/dist/SegmentedMeter/index.js +2 -0
- package/dist/SegmentedMeter-KQNML2TW.css +109 -0
- package/dist/Select/index.js +3 -3
- package/dist/Shortcut/index.js +2 -2
- package/dist/SidebarNav/SidebarNav.d.ts +85 -25
- package/dist/SidebarNav/index.d.ts +1 -1
- package/dist/SidebarNav/index.js +1 -1
- package/dist/SidebarNav-X5NLZNWA.css +424 -0
- package/dist/StatCard/StatCard.d.ts +59 -12
- package/dist/StatCard/index.d.ts +1 -1
- package/dist/StatCard/index.js +1 -1
- package/dist/StatCard-KPAFD4E2.css +204 -0
- package/dist/StatGroup/index.js +1 -1
- package/dist/{StatGroup-TGB6AEKM.css → StatGroup-HVG6O62W.css} +8 -9
- package/dist/StatusDot/StatusDot.d.ts +24 -6
- package/dist/StatusDot/index.js +1 -1
- package/dist/StatusDot-7OMCQCZF.css +186 -0
- package/dist/Stepper/Stepper.d.ts +78 -0
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +4 -0
- package/dist/Stepper-HW4JM3YH.css +176 -0
- package/dist/Tabs/index.js +1 -1
- package/dist/{Tabs-MJ2E3VPK.css → Tabs-XCNPHA7B.css} +46 -26
- package/dist/Tag/Tag.d.ts +29 -22
- package/dist/Tag/index.js +2 -2
- package/dist/{Tag-VNZEYLB6.css → Tag-GBE7LQJP.css} +82 -83
- package/dist/TagsInput/index.js +7 -7
- package/dist/ThemeSwitcher/ThemeSwitcher.d.ts +53 -21
- package/dist/ThemeSwitcher/index.d.ts +3 -3
- package/dist/ThemeSwitcher/index.js +4 -3
- package/dist/ThemeSwitcher/preferences.d.ts +19 -5
- package/dist/ThemeToggle/ThemeToggle.d.ts +40 -0
- package/dist/ThemeToggle/index.d.ts +2 -0
- package/dist/ThemeToggle/index.js +5 -0
- package/dist/TimeWindowPicker/index.js +8 -8
- package/dist/Toaster/index.js +2 -2
- package/dist/Toolbar/index.js +2 -2
- package/dist/{Toolbar-IP6LXN45.css → Toolbar-HUOSMNTH.css} +3 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/Tree/index.d.ts +2 -2
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/layout.d.ts +103 -28
- package/dist/TreeCanvas/TreeCanvas.d.ts +60 -14
- package/dist/TreeCanvas/index.d.ts +1 -1
- package/dist/TreeCanvas/index.js +6 -6
- package/dist/TreeCanvas/motion.d.ts +3 -2
- package/dist/{TreeCanvas-WBNQPHC7.css → TreeCanvas-HVOV4SQN.css} +154 -30
- package/dist/TreeGrid/index.js +4 -4
- package/dist/{chunk-F6OE5FH3.js → chunk-2FPENTCF.js} +1 -1
- package/dist/chunk-4AK52VHB.js +88 -0
- package/dist/{chunk-7EM5T4ME.js → chunk-4IQD3HUQ.js} +2 -2
- package/dist/{chunk-YODNNSZL.js → chunk-4PZ6FJKW.js} +43 -13
- package/dist/{chunk-F27EPQ7D.js → chunk-4UQ7SMPK.js} +1 -1
- package/dist/chunk-5QWIJSQM.js +73 -0
- package/dist/{chunk-KIC7BZYJ.js → chunk-6MU7HNB4.js} +6 -5
- package/dist/{chunk-S2XHHEW4.js → chunk-74KMX7YH.js} +4 -4
- package/dist/{chunk-WNI2WSJF.js → chunk-7KBNFFM3.js} +1 -1
- package/dist/{chunk-EFSG7HNU.js → chunk-AUS5FNQE.js} +1 -1
- package/dist/{chunk-CMEE37QJ.js → chunk-BMYPGGPV.js} +4 -4
- package/dist/{chunk-H4FBTAYS.js → chunk-BNCCEER3.js} +8 -8
- package/dist/chunk-C5WJUZVR.js +56 -0
- package/dist/{chunk-5WS6L6FA.js → chunk-CAIHUYXV.js} +9 -9
- package/dist/{chunk-5KSRXHOW.js → chunk-CQY5NTRS.js} +1 -1
- package/dist/{chunk-MW356IVK.js → chunk-D6EVJUGU.js} +2 -2
- package/dist/{chunk-7PEFUMQJ.js → chunk-DHPUMOTX.js} +2 -2
- package/dist/{chunk-HZ5XZNPS.js → chunk-DS2C73RJ.js} +3 -3
- package/dist/{chunk-GKHAKGOF.js → chunk-DSUY5F4E.js} +3 -3
- package/dist/{chunk-Q4ZPPART.js → chunk-EFYPAJT3.js} +3 -3
- package/dist/{chunk-PATXSJGR.js → chunk-ERVO6OUF.js} +17 -17
- package/dist/{chunk-BZYDZBAN.js → chunk-ETYEBKR4.js} +3 -3
- package/dist/{chunk-CC67MUUO.js → chunk-FD5UEN6X.js} +30 -30
- package/dist/{chunk-5SDBMKUO.js → chunk-FIFNP6PL.js} +3 -3
- package/dist/{chunk-7HPRF5XN.js → chunk-FUF52K7E.js} +98 -16
- package/dist/{chunk-5KPQ6D7N.js → chunk-FZVJDJFN.js} +2 -2
- package/dist/chunk-IA232OTU.js +156 -0
- package/dist/{chunk-2EOKFKHX.js → chunk-IG27QX7Q.js} +7 -7
- package/dist/chunk-IKB6HFGK.js +55 -0
- package/dist/{chunk-T43A26SD.js → chunk-IPVQKAHO.js} +6 -6
- package/dist/{chunk-3EYF6HKB.js → chunk-IVFJD7WY.js} +28 -9
- package/dist/{chunk-XJWXPRSK.js → chunk-JGRNTBF2.js} +11 -11
- package/dist/chunk-K3OWD7BJ.js +121 -0
- package/dist/{chunk-6KCO2D5C.js → chunk-KD4H66L6.js} +7 -20
- package/dist/{chunk-SFZOKW2G.js → chunk-KJ34ZBBI.js} +8 -3
- package/dist/{chunk-AQTBF4EB.js → chunk-LFHCXZO5.js} +5 -5
- package/dist/{chunk-LWKJQTOM.js → chunk-MICH6QSJ.js} +1 -1
- package/dist/chunk-N3DPO6HG.js +226 -0
- package/dist/{chunk-S4GZWSKR.js → chunk-OM5E3TTK.js} +1 -1
- package/dist/{chunk-3QRYCPXQ.js → chunk-OPKIKM35.js} +6 -6
- package/dist/{chunk-5EKIWVOR.js → chunk-PGRPNDWM.js} +2 -2
- package/dist/{chunk-FSOW3ARP.js → chunk-PQNILU27.js} +9 -9
- package/dist/{chunk-QNCVHRZL.js → chunk-QVAFL2LE.js} +1 -1
- package/dist/{chunk-Q3B66TJM.js → chunk-QY7UU5ZB.js} +1 -1
- package/dist/{chunk-ITHXJHBB.js → chunk-R25RGPUB.js} +1 -0
- package/dist/{chunk-KLJCCMF3.js → chunk-R6735B37.js} +2 -2
- package/dist/{chunk-3ZP55QZE.js → chunk-R6FBDTP3.js} +4 -4
- package/dist/{chunk-7FZ53WDJ.js → chunk-RIAZM6L3.js} +1 -1
- package/dist/chunk-RJM4QCGG.js +550 -0
- package/dist/{chunk-NTRZGNEX.js → chunk-S3BCVWTU.js} +215 -46
- package/dist/chunk-S7KW47IQ.js +121 -0
- package/dist/{chunk-KNYYCWMK.js → chunk-SJQ546ID.js} +4 -4
- package/dist/{chunk-D35VTV2Z.js → chunk-SV7QAONL.js} +1 -1
- package/dist/{chunk-IAJLHVUA.js → chunk-TIWAHZZ6.js} +1 -1
- package/dist/{chunk-2PRH365R.js → chunk-UA7O3KKJ.js} +1 -1
- package/dist/{chunk-NPZY6YYL.js → chunk-UG5ZMAXW.js} +6 -6
- package/dist/{chunk-NDCATSW7.js → chunk-V34H2YCY.js} +1 -1
- package/dist/chunk-WIATRXEJ.js +22 -0
- package/dist/{chunk-5C5YMZQU.js → chunk-WOFOMTGB.js} +16 -10
- package/dist/{chunk-QYOFACSP.js → chunk-WSOFKOLP.js} +3 -3
- package/dist/{chunk-MNAXYY3R.js → chunk-WUVZDFHS.js} +31 -11
- package/dist/{chunk-DB2VDLVR.js → chunk-YIMOT5OO.js} +10 -10
- package/dist/{chunk-2ZQMA2WB.js → chunk-ZPSOF6VL.js} +2 -2
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.js +69 -65
- package/dist/index.js +69 -65
- package/dist/styles.css +2538 -741
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/tone.d.ts +7 -12
- package/package.json +4 -4
- package/scripts/check-css-literals.mjs +159 -23
- package/scripts/check-css-variables.mjs +5 -3
- package/scripts/css-source.mjs +97 -5
- package/dist/Avatar-P2KRQM2B.css +0 -156
- package/dist/Charts-D7G2BSXH.css +0 -277
- package/dist/CommandPalette-CSJDUCQA.css +0 -115
- package/dist/Kbd-W66MXQI5.css +0 -61
- package/dist/SearchTrigger-QXOYAUUY.css +0 -79
- package/dist/SidebarNav-QGSFKZYA.css +0 -319
- package/dist/StatCard-KYPKZUWX.css +0 -111
- package/dist/StatusDot-HA2L2FSX.css +0 -84
- package/dist/chunk-22O7LAW2.js +0 -41
- package/dist/chunk-AJNCATWZ.js +0 -144
- package/dist/chunk-F4PJZ4ED.js +0 -245
- package/dist/chunk-PNFASD6F.js +0 -98
- package/dist/chunk-PZSWF74H.js +0 -15
- package/dist/chunk-R66KLW7S.js +0 -143
- /package/dist/{chunk-ZCR6YGQ4.js → chunk-PKIN4IMB.js} +0 -0
package/dist/Meter/Meter.d.ts
CHANGED
|
@@ -2,12 +2,17 @@ import { type HTMLAttributes, type ReactNode } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* What the bar is saying.
|
|
4
4
|
*
|
|
5
|
-
* `
|
|
6
|
-
* in a state; it is just a number.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `quantity` is the ordinary reading, because a budget that is being spent is
|
|
6
|
+
* not in a state; it is just a number. It is the first data series,
|
|
7
|
+
* `--color-data-1`: a meter is a figure of one quantity, and the label that
|
|
8
|
+
* names it is what a data hue asks for, where the accent it used to take
|
|
9
|
+
* means "act here" and a bar is not an action. The three that ARE states are
|
|
10
|
+
* derived from the fill unless a caller overrides them, so a bar that is
|
|
11
|
+
* nearly full says so without every call site remembering to. A caller that
|
|
12
|
+
* owns the rule passes a `MeterState` instead, which names the state rather
|
|
13
|
+
* than the paint.
|
|
9
14
|
*/
|
|
10
|
-
export type MeterTone = '
|
|
15
|
+
export type MeterTone = 'quantity' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
11
16
|
/**
|
|
12
17
|
* WHICH DIRECTION A FULL BAR POINTS, which is the one thing the fill itself
|
|
13
18
|
* cannot say. A budget at 100 percent is a fault; a goal at 100 percent is the
|
|
@@ -26,7 +31,40 @@ export type MeterTone = 'brand' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
|
26
31
|
* other thing, and it is not this component.
|
|
27
32
|
*/
|
|
28
33
|
export type MeterPolarity = 'spent' | 'progress';
|
|
29
|
-
|
|
34
|
+
/**
|
|
35
|
+
* WHAT A LIMITED QUANTITY HAS COME TO, in the words of whoever enforces the
|
|
36
|
+
* limit: `ok` is inside it, `near` is close enough that somebody should look,
|
|
37
|
+
* and `refusing` is at it, where whatever the limit guards has stopped
|
|
38
|
+
* accepting more. It is the `spent` ramp's three steps named for what they
|
|
39
|
+
* MEAN rather than for how they are painted, which is what lets a consumer
|
|
40
|
+
* that owns the rule hand the meter its verdict instead of a number to judge.
|
|
41
|
+
*/
|
|
42
|
+
export type MeterState = 'ok' | 'near' | 'refusing';
|
|
43
|
+
/** Every `MeterState`, in escalating order, for a caller checking a value it was sent. */
|
|
44
|
+
export declare const METER_STATES: readonly MeterState[];
|
|
45
|
+
/**
|
|
46
|
+
* Where the `spent` ramp turns, as FRACTIONS OF THE LIMIT rather than
|
|
47
|
+
* percentages, because a limit is what the rule that owns it is written
|
|
48
|
+
* against ("warn at nine tenths of the budget").
|
|
49
|
+
*
|
|
50
|
+
* Only `near` is a threshold. `refusing` is the limit itself, a fraction of
|
|
51
|
+
* 1: a meter's maximum IS the limit, so a refusal anywhere else would be a
|
|
52
|
+
* second ceiling the bar could not draw.
|
|
53
|
+
*/
|
|
54
|
+
export interface MeterThresholds {
|
|
55
|
+
/**
|
|
56
|
+
* The fraction of the limit at and above which the reading is `near`.
|
|
57
|
+
* Greater than 0 and at most 1; at 1 the meter has no middle step, since
|
|
58
|
+
* the limit itself is `refusing`.
|
|
59
|
+
*/
|
|
60
|
+
near: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The thresholds a meter uses when nobody says otherwise: `near` at three
|
|
64
|
+
* quarters of the limit, the ramp every existing caller has always had.
|
|
65
|
+
*/
|
|
66
|
+
export declare const DEFAULT_METER_THRESHOLDS: Readonly<MeterThresholds>;
|
|
67
|
+
interface MeterBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
30
68
|
value: number;
|
|
31
69
|
/**
|
|
32
70
|
* The ceiling. NON-POSITIVE MEANS THERE IS NO CEILING, and the bar is then
|
|
@@ -49,6 +87,33 @@ export interface MeterProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'
|
|
|
49
87
|
valueText?: string | undefined;
|
|
50
88
|
/** Drawn at the trailing edge of the legend. Falls back to `valueText`. */
|
|
51
89
|
hint?: ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* `compact` is the bar inside a table cell. Its legend drops a type step;
|
|
92
|
+
* the track does not: it is the design's 6px at both sizes, and a thinner
|
|
93
|
+
* one in a dense row is the one a reader takes for a divider.
|
|
94
|
+
*/
|
|
95
|
+
size?: 'default' | 'compact' | undefined;
|
|
96
|
+
/** Keep the label out of the picture. It stays in the accessibility tree. */
|
|
97
|
+
hideLabel?: boolean | undefined;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* THE VERDICT: a caller that owns the rule says which state the quantity is
|
|
101
|
+
* in, and the meter paints it and derives nothing. The fill still draws the
|
|
102
|
+
* value against the maximum; only the tone is the caller's.
|
|
103
|
+
*
|
|
104
|
+
* Nothing else that decides a tone may stand beside it, because each would be
|
|
105
|
+
* a second opinion about one reading, and the types refuse them.
|
|
106
|
+
*/
|
|
107
|
+
export interface MeterVerdictProps {
|
|
108
|
+
/** The state the owner of the limit says this is: `ok`, `near` or `refusing`. */
|
|
109
|
+
state?: MeterState | undefined;
|
|
110
|
+
tone?: undefined;
|
|
111
|
+
polarity?: undefined;
|
|
112
|
+
thresholds?: undefined;
|
|
113
|
+
}
|
|
114
|
+
/** A tone chosen by hand, or derived from the fill on either ramp's own steps. */
|
|
115
|
+
export interface MeterRampProps {
|
|
116
|
+
state?: undefined;
|
|
52
117
|
/** Overrides the tone derived from the fill. */
|
|
53
118
|
tone?: MeterTone | undefined;
|
|
54
119
|
/**
|
|
@@ -57,21 +122,42 @@ export interface MeterProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'
|
|
|
57
122
|
* is given, which overrides the ramp entirely.
|
|
58
123
|
*/
|
|
59
124
|
polarity?: MeterPolarity | undefined;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
125
|
+
thresholds?: undefined;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The `spent` ramp with its middle step moved. Only that ramp has one, and a
|
|
129
|
+
* tone given by hand would ignore it, so neither stands beside `thresholds`.
|
|
130
|
+
*/
|
|
131
|
+
export interface MeterThresholdProps {
|
|
132
|
+
state?: undefined;
|
|
133
|
+
tone?: undefined;
|
|
134
|
+
polarity?: 'spent' | undefined;
|
|
135
|
+
/** Where `near` begins, as a fraction of the limit. Replaces `DEFAULT_METER_THRESHOLDS`. */
|
|
136
|
+
thresholds?: MeterThresholds | undefined;
|
|
68
137
|
}
|
|
138
|
+
export type MeterProps = MeterBaseProps & (MeterVerdictProps | MeterRampProps | MeterThresholdProps);
|
|
139
|
+
/** The tone a `MeterState` is painted in. */
|
|
140
|
+
export declare function meterStateTone(state: MeterState): MeterTone;
|
|
141
|
+
/**
|
|
142
|
+
* The state a fraction of the limit is in: at or past the limit it is
|
|
143
|
+
* `refusing`, at or past `thresholds.near` it is `near`, below that `ok`.
|
|
144
|
+
*
|
|
145
|
+
* The boundaries are INCLUSIVE, so `near: 0.9` flips at exactly `9 / 10`:
|
|
146
|
+
* a rule that says "warn at nine tenths" warns at nine tenths.
|
|
147
|
+
*
|
|
148
|
+
* A `near` outside (0, 1] is refused with a `RangeError` naming it, because
|
|
149
|
+
* every such value is a rule that cannot be drawn: at 0 or below everything,
|
|
150
|
+
* even an empty bar, is `near`, and past 1 the limit is `refusing` before it
|
|
151
|
+
* can ever be `near`.
|
|
152
|
+
*/
|
|
153
|
+
export declare function meterState(fraction: number, thresholds?: MeterThresholds): MeterState;
|
|
69
154
|
/**
|
|
70
155
|
* The `spent` ramp: at the top it is a fault, near the top it wants a person,
|
|
71
156
|
* below that it is just a number.
|
|
72
157
|
*
|
|
73
158
|
* Keeps its plain name because renaming an export is breaking, and it is still
|
|
74
|
-
* the ramp a `Meter` uses when nobody says otherwise.
|
|
159
|
+
* the ramp a `Meter` uses when nobody says otherwise. It is `meterState` at
|
|
160
|
+
* `DEFAULT_METER_THRESHOLDS`, painted, over a percentage.
|
|
75
161
|
*/
|
|
76
162
|
export declare function meterTone(percent: number): MeterTone;
|
|
77
163
|
/**
|
|
@@ -123,4 +209,5 @@ export declare function progressTone(percent: number): MeterTone;
|
|
|
123
209
|
* figures, so nothing is lost: what a reader hears is "140 of 100", not a bar
|
|
124
210
|
* that quietly rounds itself down to exactly the limit it has overrun.
|
|
125
211
|
*/
|
|
126
|
-
export declare function Meter({ value, max, label, valueText, hint, tone, polarity, size, hideLabel, className, ...rest }: MeterProps): import("react").JSX.Element;
|
|
212
|
+
export declare function Meter({ value, max, label, valueText, hint, state, tone, polarity, thresholds, size, hideLabel, className, ...rest }: MeterProps): import("react").JSX.Element;
|
|
213
|
+
export {};
|
package/dist/Meter/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './Meter.css';
|
|
2
|
-
export { Meter, meterTone, progressTone } from './Meter.js';
|
|
3
|
-
export type { MeterPolarity, MeterProps, MeterTone } from './Meter.js';
|
|
2
|
+
export { DEFAULT_METER_THRESHOLDS, METER_STATES, Meter, meterState, meterStateTone, meterTone, progressTone, } from './Meter.js';
|
|
3
|
+
export type { MeterPolarity, MeterProps, MeterRampProps, MeterState, MeterThresholdProps, MeterThresholds, MeterTone, MeterVerdictProps, } from './Meter.js';
|
package/dist/Meter/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Meter, meterTone, progressTone } from '../chunk-
|
|
1
|
+
export { DEFAULT_METER_THRESHOLDS, METER_STATES, Meter, meterState, meterStateTone, meterTone, progressTone } from '../chunk-4PZ6FJKW.js';
|
|
2
2
|
import '../chunk-BZFWDIV6.js';
|
|
3
3
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -42,22 +42,41 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/*
|
|
45
|
-
* A
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
45
|
+
* A 6px track with round ends, the approved design's meter, at both sizes. It
|
|
46
|
+
* stands at the end of a stat tile's value line beside a 28px number and a
|
|
47
|
+
* 28px sparkline, and under a line of 12px text inside a card; the design
|
|
48
|
+
* draws it at six in both places, where the engine's older bar was four.
|
|
49
|
+
*
|
|
50
|
+
* The track is RAISED, the approved design's, and a rung rather than a well.
|
|
51
|
+
* The fill is measured against it as a mark, and the palette suite measures a
|
|
52
|
+
* mark on the four opaque rungs: on the inset well this track used to be, the
|
|
53
|
+
* light warning and success fills measured 2.84:1 and 2.86:1 over the frame
|
|
54
|
+
* once the states took the approved hues, a pair no palette rule could see.
|
|
55
|
+
*
|
|
56
|
+
* An opaque track has an edge only against a ground that is not itself, so a
|
|
57
|
+
* meter is drawn on a CARD, where the design puts every one and where the
|
|
58
|
+
* palette holds raised a visible step above the ground (dE 3.13 dark, 3.65
|
|
59
|
+
* light). On the raised rung the unfilled remainder, and with it the extent
|
|
60
|
+
* of the bar, would not be there at all.
|
|
49
61
|
*/
|
|
50
62
|
.crewlet-meter__track {
|
|
51
|
-
height:
|
|
63
|
+
height: 6px;
|
|
52
64
|
border-radius: var(--radius-pill);
|
|
53
|
-
background: var(--color-surface-
|
|
65
|
+
background: var(--color-surface-elevated);
|
|
54
66
|
overflow: hidden;
|
|
55
67
|
}
|
|
56
68
|
|
|
69
|
+
/*
|
|
70
|
+
* The ordinary reading, `quantity`, is the first data series. A meter is a
|
|
71
|
+
* figure of ONE quantity and its label names it, which is all a data hue
|
|
72
|
+
* asks for; the accent it used to take means "act here", and a bar is not
|
|
73
|
+
* something to act on. Every other tone below is a state, derived from the
|
|
74
|
+
* fill or passed by the caller.
|
|
75
|
+
*/
|
|
57
76
|
.crewlet-meter__fill {
|
|
58
77
|
height: 100%;
|
|
59
78
|
border-radius: var(--radius-pill);
|
|
60
|
-
background: var(--color-
|
|
79
|
+
background: var(--color-data-1);
|
|
61
80
|
transition: width var(--motion-duration-slow) var(--motion-easing-emphasized);
|
|
62
81
|
}
|
|
63
82
|
|
|
@@ -85,3 +104,23 @@
|
|
|
85
104
|
transition: none;
|
|
86
105
|
}
|
|
87
106
|
}
|
|
107
|
+
|
|
108
|
+
/*
|
|
109
|
+
* FORCED COLORS. The mode repaints every author background to Canvas, and the
|
|
110
|
+
* track and the fill are nothing but backgrounds, so the bar used to disappear
|
|
111
|
+
* whole, track and reading together, for exactly the reader who asked for
|
|
112
|
+
* more contrast. A system colour an author writes is kept, so the fill is
|
|
113
|
+
* drawn in CanvasText and the track in GrayText, the system's own pair for
|
|
114
|
+
* "there" and "quieter", which is what a SegmentedMeter draws its parts and
|
|
115
|
+
* its remainder in. The tone goes, as every hue does in this mode; the length
|
|
116
|
+
* is the reading, and it stays.
|
|
117
|
+
*/
|
|
118
|
+
@media (forced-colors: active) {
|
|
119
|
+
.crewlet-meter__track {
|
|
120
|
+
background: GrayText;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.crewlet-meter__fill[data-tone] {
|
|
124
|
+
background: CanvasText;
|
|
125
|
+
}
|
|
126
|
+
}
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { ConfirmModal, Modal } from '../chunk-
|
|
1
|
+
export { ConfirmModal, Modal } from '../chunk-IG27QX7Q.js';
|
|
2
2
|
import '../chunk-PQADV6P6.js';
|
|
3
3
|
import '../chunk-7RPGY3JE.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-R25RGPUB.js';
|
|
5
|
+
import '../chunk-4UQ7SMPK.js';
|
|
6
|
+
import '../chunk-ETYEBKR4.js';
|
|
7
7
|
import '../chunk-BZFWDIV6.js';
|
|
8
8
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -220,10 +220,11 @@
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
/*
|
|
223
|
-
* The shell's one breakpoint
|
|
224
|
-
*
|
|
223
|
+
* The shell's one breakpoint, strictly under it as the shell switches. Below
|
|
224
|
+
* it there is no content beside a sheet to keep in view, so the sheet takes
|
|
225
|
+
* the whole width and its edge goes with it.
|
|
225
226
|
*/
|
|
226
|
-
@media (
|
|
227
|
+
@media (width < 1024px) {
|
|
227
228
|
.crewlet-modal--sheet {
|
|
228
229
|
width: 100%;
|
|
229
230
|
border-inline: none;
|
|
@@ -249,6 +250,14 @@
|
|
|
249
250
|
* it on the line the bar behind it draws, and holds the two buttons that
|
|
250
251
|
* commit and abandon the form at a full control step with room around them.
|
|
251
252
|
*
|
|
253
|
+
* THE HEIGHT IS THE ROOM, NOT THE PADDING. The head centres what it holds, so
|
|
254
|
+
* the room around the buttons is what the bar's height leaves, and the block
|
|
255
|
+
* padding is only the least it keeps when a title wraps. It was the 16px step
|
|
256
|
+
* while the bar was 64px, which a full control step filled exactly; at 52px
|
|
257
|
+
* the same padding stood the head 12px past the bar behind it. At the 4px step
|
|
258
|
+
* the head is the bar's height with the control step at every density, 36.48px
|
|
259
|
+
* at comfortable included, and with a subtitle under the title.
|
|
260
|
+
*
|
|
252
261
|
* It used to be the tighter band, 49px with a close control alone, and the
|
|
253
262
|
* commit pair sat in a foot below a body that scrolled 1,764px on a seat with
|
|
254
263
|
* a dozen fields: the reader had to travel the whole form to reach Apply, and
|
|
@@ -256,7 +265,7 @@
|
|
|
256
265
|
*/
|
|
257
266
|
.crewlet-modal__header--sheet {
|
|
258
267
|
min-height: var(--size-shell-topbar);
|
|
259
|
-
padding: var(--spacing-
|
|
268
|
+
padding: var(--spacing-1) var(--spacing-6);
|
|
260
269
|
gap: var(--spacing-4);
|
|
261
270
|
box-sizing: border-box;
|
|
262
271
|
}
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
* because a node is read as a box and a column is read down its leading
|
|
18
18
|
* edge: names centred in a column are a column nobody can scan;
|
|
19
19
|
* - the mark's zone is a large control step in a node and a small one in a
|
|
20
|
-
* row, and
|
|
21
|
-
* three-quarter-fills whichever zone it is in;
|
|
20
|
+
* row, and a glyph inside it takes the step that half-fills or
|
|
21
|
+
* three-quarter-fills whichever zone it is in; a seat's badge is the
|
|
22
|
+
* approved org chart's own 26px in a node and the smallest badge, 20px,
|
|
23
|
+
* in a row;
|
|
22
24
|
* - the push slot keeps a FIXED room in a node, because a node is
|
|
23
25
|
* `width: max-content` and a slot that grew with its content would relay
|
|
24
26
|
* the whole chart, and is content-sized in a row, where the grid already
|
|
@@ -41,36 +43,67 @@
|
|
|
41
43
|
* became one.
|
|
42
44
|
*/
|
|
43
45
|
import type { ReactNode } from 'react';
|
|
46
|
+
import { type AvatarKind } from '../Avatar/index.js';
|
|
44
47
|
import type { TreeCardTone } from '../TreeCanvas/index.js';
|
|
45
48
|
/**
|
|
46
49
|
* Which of the two things this label is: a card in a chart, or a line in a
|
|
47
50
|
* grid of them.
|
|
48
51
|
*/
|
|
49
52
|
export type OrgLabelLayout = 'node' | 'row';
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
/**
|
|
54
|
+
* The seat a node or a row stands for, drawn as its badge in the mark's zone.
|
|
55
|
+
*
|
|
56
|
+
* `kind` IS REQUIRED HERE, where `Avatar` defaults it: an org chart is the one
|
|
57
|
+
* surface whose whole job is saying which seats a person holds and which the
|
|
58
|
+
* engine runs, and a default would draw every person the caller forgot to
|
|
59
|
+
* mark as an agent.
|
|
60
|
+
*/
|
|
61
|
+
export interface OrgLabelAvatar {
|
|
62
|
+
/** Whose badge: the initials are made from it, usually the label's own name. */
|
|
63
|
+
name: string;
|
|
64
|
+
/** An agent is a squircle, a human a circle: `Avatar`'s own kind. */
|
|
65
|
+
kind: AvatarKind;
|
|
66
|
+
/** A picture, where the seat has one; otherwise the initials. */
|
|
67
|
+
src?: string | undefined;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The mark in the leading zone: a glyph, or a seat's badge. Never both, since
|
|
71
|
+
* the zone holds one mark.
|
|
72
|
+
*/
|
|
73
|
+
export type OrgLabelMark = {
|
|
74
|
+
/** A glyph, a brand mark or an image, for what is not a seat: a company, a unit, a group. */
|
|
53
75
|
icon?: ReactNode | undefined;
|
|
54
76
|
/**
|
|
55
|
-
*
|
|
77
|
+
* How big the glyph is drawn in its zone, as a proportion of the zone
|
|
78
|
+
* rather than as a size: `md` half-fills it, `lg` fills three quarters.
|
|
56
79
|
*
|
|
57
|
-
* `
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
80
|
+
* `md` is what a container takes (a company, a unit, a group) and `lg`
|
|
81
|
+
* is for the mark that stands for the THING the chart is about, so a
|
|
82
|
+
* reader tells one from the other at the far end of a chart without
|
|
83
|
+
* reading either caption. The zone itself does not change either way,
|
|
84
|
+
* so this moves nothing: only what is drawn inside it.
|
|
61
85
|
*/
|
|
62
|
-
|
|
86
|
+
iconSize?: 'md' | 'lg' | undefined;
|
|
87
|
+
avatar?: undefined;
|
|
88
|
+
} | {
|
|
63
89
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
90
|
+
* A SEAT'S BADGE, with its kind as its outline: a squircle for an agent,
|
|
91
|
+
* a circle for a person, which is the one cue that tells them apart.
|
|
92
|
+
* There used to be a second, a dashed ring round a glyph for a human
|
|
93
|
+
* seat, and two cues for one fact are two things to keep agreeing.
|
|
94
|
+
*
|
|
95
|
+
* The layout sizes it and nothing here does: the approved org chart's
|
|
96
|
+
* 26px badge in a node and the smallest step, 20px, in a row.
|
|
66
97
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* tells one from the other at the far end of a chart without reading either
|
|
70
|
-
* caption. The zone itself does not change either way, so this moves
|
|
71
|
-
* nothing: only what is drawn inside it.
|
|
98
|
+
* Optional in this branch as well, so a label that draws no mark at all
|
|
99
|
+
* matches both and a caller can hand either layout the same content.
|
|
72
100
|
*/
|
|
73
|
-
|
|
101
|
+
avatar?: OrgLabelAvatar | undefined;
|
|
102
|
+
icon?: undefined;
|
|
103
|
+
iconSize?: undefined;
|
|
104
|
+
};
|
|
105
|
+
/** What both layouts say besides the mark, in the order they say it. */
|
|
106
|
+
interface OrgLabelWords {
|
|
74
107
|
/** The name, which takes the width the two fixed zones leave and truncates. */
|
|
75
108
|
name: ReactNode;
|
|
76
109
|
/** What kind of thing this is: "Department", "Human seat", "Crewlet agent". */
|
|
@@ -98,7 +131,9 @@ export interface OrgLabelContent {
|
|
|
98
131
|
*/
|
|
99
132
|
className?: string | undefined;
|
|
100
133
|
}
|
|
101
|
-
|
|
134
|
+
/** What both layouts say, in the order they say it. */
|
|
135
|
+
export type OrgLabelContent = OrgLabelMark & OrgLabelWords;
|
|
136
|
+
export type OrgLabelNodeProps = OrgLabelContent & {
|
|
102
137
|
layout?: 'node' | undefined;
|
|
103
138
|
/**
|
|
104
139
|
* Refused on a node, because a node has no element to carry it. A chart card
|
|
@@ -106,12 +141,13 @@ export interface OrgLabelNodeProps extends OrgLabelContent {
|
|
|
106
141
|
* is where a node's ink comes from; there is nothing here to tone.
|
|
107
142
|
*/
|
|
108
143
|
tone?: never | undefined;
|
|
109
|
-
}
|
|
110
|
-
export
|
|
144
|
+
};
|
|
145
|
+
export type OrgLabelRowProps = OrgLabelContent & {
|
|
111
146
|
layout: 'row';
|
|
112
|
-
/** The row's hue, which its
|
|
147
|
+
/** The row's hue, which its glyph and its name are drawn in. */
|
|
113
148
|
tone?: TreeCardTone | undefined;
|
|
114
|
-
}
|
|
149
|
+
};
|
|
115
150
|
export type OrgLabelProps = OrgLabelNodeProps | OrgLabelRowProps;
|
|
116
151
|
/** The mark, the name and the caption of an org chart node or an org table row. */
|
|
117
152
|
export declare function OrgLabel(props: OrgLabelProps): import("react").JSX.Element;
|
|
153
|
+
export {};
|
package/dist/OrgLabel/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './OrgLabel.css';
|
|
2
2
|
export { OrgLabel } from './OrgLabel.js';
|
|
3
|
-
export type { OrgLabelContent, OrgLabelLayout, OrgLabelProps, OrgLabelNodeProps, OrgLabelRowProps, } from './OrgLabel.js';
|
|
3
|
+
export type { OrgLabelAvatar, OrgLabelContent, OrgLabelLayout, OrgLabelMark, OrgLabelProps, OrgLabelNodeProps, OrgLabelRowProps, } from './OrgLabel.js';
|
package/dist/OrgLabel/index.js
CHANGED
|
@@ -73,26 +73,17 @@
|
|
|
73
73
|
had the fill alone and therefore the same defect; one rule now answers for
|
|
74
74
|
both surfaces. */
|
|
75
75
|
color: inherit;
|
|
76
|
-
fill: currentColor;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/*
|
|
80
|
-
* THE DASHED RING is the boundary something standing for somebody outside the
|
|
81
|
-
* system wears, around the mark rather than instead of it: the card's own edge
|
|
82
|
-
* and the row's own mark carry the same dash, and the two together are what a
|
|
83
|
-
* reader recognises without reading a word.
|
|
84
|
-
*/
|
|
85
|
-
.crewlet-org-label__icon--dashed {
|
|
86
|
-
position: relative;
|
|
87
76
|
}
|
|
88
77
|
|
|
89
|
-
.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
78
|
+
/* THE FILL IS FOR A FILLED DRAWING, and a glyph is a stroke. Painting the
|
|
79
|
+
inside of a Lucide glyph turns every closed shape in it solid and every
|
|
80
|
+
open one into a smear (a person's head and shoulders, a unit's building, a
|
|
81
|
+
warning's triangle, each a blob), so a `.crewlet-glyph` keeps the fill its
|
|
82
|
+
own frame decides and takes the ink through its stroke. */
|
|
83
|
+
.crewlet-org-label__icon svg:not(.crewlet-glyph),
|
|
84
|
+
.crewlet-org-label__icon svg:not(.crewlet-glyph) g,
|
|
85
|
+
.crewlet-org-label__icon svg:not(.crewlet-glyph) path {
|
|
86
|
+
fill: currentColor;
|
|
96
87
|
}
|
|
97
88
|
|
|
98
89
|
/* ---- The name and its caption -------------------------------------------- */
|
package/dist/OrgNode/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { OrgNodeDisclosure, OrgNodeLabel, OrgNodeLead } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { OrgNodeDisclosure, OrgNodeLabel, OrgNodeLead } from '../chunk-TIWAHZZ6.js';
|
|
2
|
+
import '../chunk-WOFOMTGB.js';
|
|
3
|
+
import '../chunk-IA232OTU.js';
|
|
3
4
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -71,9 +71,9 @@ export declare function OrgTable({ rows, renderCell, tone, controls, labels, ref
|
|
|
71
71
|
* this folder is drawing. It adds nothing and takes nothing away beyond the
|
|
72
72
|
* row's `tone`, which only a row has: a chart card publishes its own.
|
|
73
73
|
*/
|
|
74
|
-
export
|
|
74
|
+
export type OrgTableNameProps = OrgLabelContent & {
|
|
75
75
|
tone?: OrgTableTone | undefined;
|
|
76
|
-
}
|
|
76
|
+
};
|
|
77
77
|
export declare function OrgTableName({ tone, ...content }: OrgTableNameProps): import("react").JSX.Element;
|
|
78
78
|
/**
|
|
79
79
|
* The strip of controls at the end of a row.
|
package/dist/OrgTable/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-BNCCEER3.js';
|
|
2
|
+
import '../chunk-FIFNP6PL.js';
|
|
3
|
+
import '../chunk-S3BCVWTU.js';
|
|
4
|
+
import '../chunk-WOFOMTGB.js';
|
|
5
5
|
import '../chunk-53DVJCVW.js';
|
|
6
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-OM5E3TTK.js';
|
|
7
7
|
import '../chunk-7RPGY3JE.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-R25RGPUB.js';
|
|
9
|
+
import '../chunk-4UQ7SMPK.js';
|
|
10
|
+
import '../chunk-IA232OTU.js';
|
|
10
11
|
import '../chunk-BZFWDIV6.js';
|
|
11
12
|
import '../chunk-ODEQTPFM.js';
|
package/dist/Popover/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PricingCard } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { PricingCard } from '../chunk-R6735B37.js';
|
|
2
|
+
import '../chunk-74KMX7YH.js';
|
|
3
|
+
import '../chunk-WIATRXEJ.js';
|
|
4
4
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -36,13 +36,12 @@
|
|
|
36
36
|
/* ── Card root ──────────────────────────────────────────────────── */
|
|
37
37
|
.crewlet-pricing-card {
|
|
38
38
|
text-align: left;
|
|
39
|
-
/* The
|
|
40
|
-
|
|
39
|
+
/* The card recipe, flat: the card's surface, its hairline and its 12px
|
|
40
|
+
corner. One card surface across the system, so a plan tier and a
|
|
41
41
|
dashboard panel are the same object. */
|
|
42
42
|
background: var(--color-surface-subtle);
|
|
43
43
|
border: 1px solid var(--color-border-default);
|
|
44
44
|
border-radius: var(--radius-lg);
|
|
45
|
-
box-shadow: var(--shadow-xs), var(--shadow-hairline);
|
|
46
45
|
padding: var(--spacing-4);
|
|
47
46
|
display: flex;
|
|
48
47
|
flex-direction: column;
|
|
@@ -75,7 +74,7 @@
|
|
|
75
74
|
.crewlet-pricing-card.is-selected {
|
|
76
75
|
border-color: var(--color-brand-accent);
|
|
77
76
|
background: var(--color-brand-accent-soft);
|
|
78
|
-
box-shadow: var(--shadow-selection)
|
|
77
|
+
box-shadow: var(--shadow-selection);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
.crewlet-pricing-card.is-disabled,
|
|
@@ -90,7 +89,7 @@
|
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
.crewlet-pricing-card.is-selected:has(.crewlet-pricing-card__amount--discounted) {
|
|
93
|
-
box-shadow: var(--shadow-selection), var(--shadow-
|
|
92
|
+
box-shadow: var(--shadow-selection), var(--shadow-glow);
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
/* Compact a card's interior at small container widths, so a four-up grid on a
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Where the field stands, which decides its ground, its height and whether it
|
|
4
|
+
* ever gives up its words.
|
|
5
|
+
*
|
|
6
|
+
* `rail` is the approved design's: the whole width of the sidebar, on the
|
|
7
|
+
* frame, so it takes the SHEET's ground one rung up, and it keeps its label
|
|
8
|
+
* and its hint at every width, because under the shell breakpoint the rail is
|
|
9
|
+
* a drawer as wide as it ever was.
|
|
10
|
+
*
|
|
11
|
+
* `toolbar` stands in a bar on the sheet, so it takes the CARD's ground, at
|
|
12
|
+
* the height of the controls beside it and a width of its own
|
|
13
|
+
* (`--crewlet-search-trigger-width`); under the shell breakpoint it drops its
|
|
14
|
+
* label and its hint and keeps the glyph, because a bar is where the room
|
|
15
|
+
* runs out.
|
|
16
|
+
*/
|
|
17
|
+
export type SearchTriggerVariant = 'rail' | 'toolbar';
|
|
2
18
|
export interface SearchTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'aria-label'> {
|
|
3
19
|
/** What it is called, drawn inside the box and used as its name. */
|
|
4
20
|
label?: string | undefined;
|
|
21
|
+
/** Where it stands. The sidebar field by default. See the type. */
|
|
22
|
+
variant?: SearchTriggerVariant | undefined;
|
|
5
23
|
/** The shortcut hint, as a Kbd with `keys`. */
|
|
6
24
|
shortcut?: ReactNode;
|
|
7
25
|
/**
|
|
@@ -21,9 +39,10 @@ export interface SearchTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButton
|
|
|
21
39
|
* and a box that takes focus and then throws the first keystroke away is worse
|
|
22
40
|
* than one that never looked like a field at all.
|
|
23
41
|
*
|
|
24
|
-
* ITS NAME IS ON THE BUTTON, not in its text. The
|
|
25
|
-
* label and the hint and leaves the glyph, and content under
|
|
26
|
-
* names nothing: the dashboard this comes from had a search
|
|
27
|
-
* screen reader announced as "button" at every width under the
|
|
42
|
+
* ITS NAME IS ON THE BUTTON, not in its text. The toolbar form's narrow
|
|
43
|
+
* layout hides the label and the hint and leaves the glyph, and content under
|
|
44
|
+
* `display: none` names nothing: the dashboard this comes from had a search
|
|
45
|
+
* button that a screen reader announced as "button" at every width under the
|
|
46
|
+
* breakpoint.
|
|
28
47
|
*/
|
|
29
48
|
export declare const SearchTrigger: import("react").ForwardRefExoticComponent<SearchTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SearchTrigger } from '../chunk-
|
|
1
|
+
export { SearchTrigger } from '../chunk-EFYPAJT3.js';
|
|
2
2
|
import '../chunk-ODEQTPFM.js';
|