@jfrader/ui 0.7.1 → 0.7.3
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 -28
- package/dist/editable-details-BndqEnYF.js +365 -0
- package/dist/editable-details.js +2 -0
- package/dist/{flip-game-card-xmcR_QSq.js → flip-game-card-BOJIhBrh.js} +8 -4
- package/dist/flip-game-card.js +1 -1
- package/dist/index.js +92 -93
- package/dist/{locale-switcher-DTkySKsM.js → locale-switcher-Ce_tN4Gb.js} +2 -2
- package/dist/locale-switcher.js +1 -1
- package/dist/{billing-toggle-CgC7yxxo.js → toggle-subscription-Ytz7ew1q.js} +19 -19
- package/dist/toggle-subscription.js +2 -0
- package/dist/types/components/editable-details/editable-details.d.ts +58 -0
- package/dist/types/components/editable-details/index.d.ts +2 -0
- package/dist/types/components/locale-switcher/locale-switcher.d.ts +2 -2
- package/dist/types/components/toggle-subscription/index.d.ts +2 -0
- package/dist/types/components/toggle-subscription/toggle-subscription.d.ts +57 -0
- package/dist/types/index.d.ts +2 -3
- package/dist/types/styling/motion-timings.d.ts +8 -0
- package/dist/types/styling/theme.d.ts +2 -0
- package/package.json +10 -14
- package/dist/billing-toggle.js +0 -2
- package/dist/in-view-title-BUZCMqge.js +0 -225
- package/dist/in-view-title.js +0 -2
- package/dist/shortcut-recorder-VgTQdjjn.js +0 -688
- package/dist/shortcut-recorder.js +0 -2
- package/dist/types/components/billing-toggle/billing-toggle.d.ts +0 -57
- package/dist/types/components/billing-toggle/index.d.ts +0 -2
- package/dist/types/components/in-view-title/in-view-title.d.ts +0 -23
- package/dist/types/components/in-view-title/index.d.ts +0 -1
- package/dist/types/components/shortcut-recorder/index.d.ts +0 -2
- package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +0 -117
package/dist/index.js
CHANGED
|
@@ -8,98 +8,97 @@ import { t as a } from "./announcement-bar-B5J33QUh.js";
|
|
|
8
8
|
import { t as o } from "./avatar-BuM1zB_f.js";
|
|
9
9
|
import { t as s } from "./avatar-group-D1UEihvh.js";
|
|
10
10
|
import { t as c } from "./badge-CfhTcA-Z.js";
|
|
11
|
-
import { t as l } from "./
|
|
12
|
-
import { t as u } from "./
|
|
13
|
-
import { t as d } from "./
|
|
14
|
-
import { t as f } from "./
|
|
15
|
-
import { t as p } from "./
|
|
16
|
-
import { t as m } from "./
|
|
17
|
-
import { t as h } from "./
|
|
18
|
-
import { t as g } from "./
|
|
19
|
-
import { t as _ } from "./
|
|
20
|
-
import { t as v } from "./
|
|
21
|
-
import { t as y } from "./
|
|
22
|
-
import { t as b } from "./
|
|
23
|
-
import { t as x } from "./
|
|
24
|
-
import { t as S } from "./
|
|
25
|
-
import { t as C } from "./
|
|
26
|
-
import { t as w } from "./
|
|
27
|
-
import { t as T } from "./
|
|
28
|
-
import { t as E } from "./
|
|
29
|
-
import { t as D } from "./
|
|
30
|
-
import { t as O } from "./
|
|
31
|
-
import { t as k } from "./
|
|
32
|
-
import { t as A } from "./
|
|
33
|
-
import { t as j } from "./
|
|
34
|
-
import { t as M } from "./
|
|
35
|
-
import { t as N } from "./
|
|
36
|
-
import { t as P } from "./
|
|
37
|
-
import { t as F } from "./
|
|
38
|
-
import { t as I } from "./
|
|
39
|
-
import { t as L } from "./
|
|
40
|
-
import { t as R } from "./
|
|
41
|
-
import { t as z } from "./search-
|
|
42
|
-
import { t as B } from "./
|
|
43
|
-
import { t as V } from "./
|
|
44
|
-
import { t as H } from "./
|
|
45
|
-
import { t as U } from "./
|
|
46
|
-
import { t as W } from "./
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import { t as X } from "./
|
|
50
|
-
import { t as Z } from "./
|
|
51
|
-
import { t as Q } from "./
|
|
52
|
-
import { t as $ } from "./
|
|
53
|
-
import { t as ee } from "./
|
|
54
|
-
import { t as te } from "./
|
|
55
|
-
import { t as ne } from "./
|
|
56
|
-
import { t as re } from "./
|
|
57
|
-
import { t as ie } from "./
|
|
58
|
-
import {
|
|
59
|
-
import { t as
|
|
60
|
-
import {
|
|
61
|
-
import { t as ue } from "./
|
|
62
|
-
import { t as de } from "./
|
|
63
|
-
import { t as fe } from "./
|
|
64
|
-
import {
|
|
65
|
-
import { t as
|
|
66
|
-
import {
|
|
67
|
-
import { t as _e } from "./
|
|
68
|
-
import { t as ve } from "./
|
|
69
|
-
import { t as ye } from "./
|
|
70
|
-
import { t as be } from "./
|
|
71
|
-
import { t as xe } from "./
|
|
72
|
-
import { t as Se } from "./
|
|
73
|
-
import { t as Ce } from "./
|
|
74
|
-
import { t as we } from "./
|
|
75
|
-
import {
|
|
76
|
-
import { n as
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import { t as
|
|
80
|
-
import { t as
|
|
81
|
-
import { t as
|
|
82
|
-
import { t as
|
|
83
|
-
import { t as
|
|
84
|
-
import { t as
|
|
85
|
-
import { t as
|
|
86
|
-
import { t as
|
|
87
|
-
import { t as
|
|
88
|
-
import { t as
|
|
89
|
-
import { t as
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import { t as
|
|
93
|
-
import {
|
|
94
|
-
import { t as it } from "./timeline-BPKY94mT.js";
|
|
95
|
-
import { a as at, n as ot } from "./toast-CSAbl5yK.js";
|
|
11
|
+
import { t as l } from "./bottom-sheet-BFQKO0Wo.js";
|
|
12
|
+
import { t as u } from "./breadcrumbs-CG3akw-b.js";
|
|
13
|
+
import { t as d } from "./menu-CVzpsyXn.js";
|
|
14
|
+
import { t as f } from "./tooltip-IajLwdUb.js";
|
|
15
|
+
import { t as p } from "./button-group-B9wP2ddS.js";
|
|
16
|
+
import { t as m } from "./calendar-Bg6D2sul.js";
|
|
17
|
+
import { t as h } from "./card-C008OQCp.js";
|
|
18
|
+
import { t as g } from "./carousel-lTH4Foke.js";
|
|
19
|
+
import { t as _ } from "./textarea-D1YwEPmn.js";
|
|
20
|
+
import { t as v } from "./chat-thread-CMhwxhoA.js";
|
|
21
|
+
import { t as y } from "./checkbox-CClE61GV.js";
|
|
22
|
+
import { t as b } from "./chip-group-BZUX9KPF.js";
|
|
23
|
+
import { t as x } from "./copy-button-C0p_qrgf.js";
|
|
24
|
+
import { t as S } from "./code-block-CYP89_6h.js";
|
|
25
|
+
import { t as C } from "./command-palette-BrT1n9bb.js";
|
|
26
|
+
import { t as w } from "./text-field-D0VP7b4P.js";
|
|
27
|
+
import { t as T } from "./combobox-D2Oc-co7.js";
|
|
28
|
+
import { t as E } from "./comment-thread-DbOzYr0q.js";
|
|
29
|
+
import { t as D } from "./container-BxtwJSSD.js";
|
|
30
|
+
import { t as O } from "./context-menu-I4i0LRpm.js";
|
|
31
|
+
import { t as k } from "./date-picker-D-bn-iHs.js";
|
|
32
|
+
import { t as A } from "./date-range-picker-rXcZsI1Y.js";
|
|
33
|
+
import { t as j } from "./dialog-CR1xdkrC.js";
|
|
34
|
+
import { t as M } from "./divider-zOJzkcHh.js";
|
|
35
|
+
import { t as N } from "./drawer-CceaEhCr.js";
|
|
36
|
+
import { t as P } from "./editable-details-BndqEnYF.js";
|
|
37
|
+
import { t as F } from "./emblem-DnXmpZCh.js";
|
|
38
|
+
import { t as I } from "./empty-state-DO0ApylK.js";
|
|
39
|
+
import { t as L } from "./expandable-card-W97vjix9.js";
|
|
40
|
+
import { t as R } from "./search-field-CbsajaZb.js";
|
|
41
|
+
import { t as z } from "./expanding-search-Bb2_YfNx.js";
|
|
42
|
+
import { t as B } from "./progress-Bcuz3Ob4.js";
|
|
43
|
+
import { t as V } from "./file-dropzone-Bi5ikRIz.js";
|
|
44
|
+
import { t as H } from "./filter-toolbar-QRnC4S_H.js";
|
|
45
|
+
import { t as U } from "./flex-CS7eMRcK.js";
|
|
46
|
+
import { t as W } from "./flip-game-card-BOJIhBrh.js";
|
|
47
|
+
import { i as G, n as K, r as q, t as J } from "./game-card-Bnhpz78f.js";
|
|
48
|
+
import { t as Y } from "./hold-to-confirm-CVBA0wNT.js";
|
|
49
|
+
import { t as X } from "./image-compare-Ln2UUqTU.js";
|
|
50
|
+
import { t as Z } from "./inline-edit-D-pR2RPC.js";
|
|
51
|
+
import { t as Q } from "./hover-card--ijYr1cd.js";
|
|
52
|
+
import { t as $ } from "./json-viewer-Dro3WrjS.js";
|
|
53
|
+
import { t as ee } from "./kbd-BI_9qzYr.js";
|
|
54
|
+
import { t as te } from "./keycap-keyboard-Cdx-OAS1.js";
|
|
55
|
+
import { t as ne } from "./lightbox-gallery-D0YaSTut.js";
|
|
56
|
+
import { t as re } from "./link-unfurl-CReyIjyy.js";
|
|
57
|
+
import { t as ie } from "./locale-switcher-Ce_tN4Gb.js";
|
|
58
|
+
import { n as ae, r as oe, t as se } from "./mention-input-BjjAbJCf.js";
|
|
59
|
+
import { t as ce } from "./pill-Dd7pog19.js";
|
|
60
|
+
import { t as le } from "./metric-card-BnFssTXj.js";
|
|
61
|
+
import { t as ue } from "./multi-select-B3puEVo0.js";
|
|
62
|
+
import { t as de } from "./navigation-C_JD43gA.js";
|
|
63
|
+
import { t as fe } from "./slider-DjAnGmlC.js";
|
|
64
|
+
import { n as pe, t as me } from "./now-playing-DjVm1Phm.js";
|
|
65
|
+
import { t as he } from "./pagination-Dkh4bJQh.js";
|
|
66
|
+
import { t as ge } from "./password-field-Da58GP1g.js";
|
|
67
|
+
import { t as _e } from "./photo-grid-Dtl17D74.js";
|
|
68
|
+
import { t as ve } from "./popover-CUMOcMtj.js";
|
|
69
|
+
import { t as ye } from "./radio-cards-FkAhESb5.js";
|
|
70
|
+
import { t as be } from "./radio-group-DItMf2YM.js";
|
|
71
|
+
import { t as xe } from "./resizable-panels-61h9hA3B.js";
|
|
72
|
+
import { t as Se } from "./scroll-area-B8KkCPOM.js";
|
|
73
|
+
import { t as Ce } from "./segmented-control-DCh-4ca-.js";
|
|
74
|
+
import { t as we } from "./select-SrcQqZjo.js";
|
|
75
|
+
import { n as Te, t as Ee } from "./sheet-stack-DYX1SGSB.js";
|
|
76
|
+
import { i as De, n as Oe, r as ke, t as Ae } from "./signature-pad-khL2yhQI.js";
|
|
77
|
+
import { t as je } from "./skeleton-LJsQsveI.js";
|
|
78
|
+
import { t as Me } from "./sortable-data-table-Bpitup_d.js";
|
|
79
|
+
import { t as Ne } from "./spinner-CvzajSg9.js";
|
|
80
|
+
import { t as Pe } from "./split-button-Bu41f2AY.js";
|
|
81
|
+
import { t as Fe } from "./stack-Bac4sJeI.js";
|
|
82
|
+
import { t as Ie } from "./stepper-C8Ncavbr.js";
|
|
83
|
+
import { t as Le } from "./stretch-refresh-OrnTEj7P.js";
|
|
84
|
+
import { t as Re } from "./swipe-actions-1H5UOZKE.js";
|
|
85
|
+
import { t as ze } from "./switch-79-hkQqg.js";
|
|
86
|
+
import { t as Be } from "./tabs-Bb5-noYE.js";
|
|
87
|
+
import { t as Ve } from "./tag-input-BQaueKEb.js";
|
|
88
|
+
import { n as He, r as Ue, t as We } from "./theme-provider-BvcY-iJu.js";
|
|
89
|
+
import { n as Ge, r as Ke, t as qe } from "./theme-root-BrYVcTzt.js";
|
|
90
|
+
import { t as Je } from "./theme-switch-CP42mVDb.js";
|
|
91
|
+
import { t as Ye } from "./time-picker-Tnd-JBLC.js";
|
|
92
|
+
import { t as Xe } from "./timeline-BPKY94mT.js";
|
|
93
|
+
import { a as Ze, n as Qe } from "./toast-CSAbl5yK.js";
|
|
96
94
|
import "./toast.js";
|
|
97
|
-
import { t as
|
|
98
|
-
import { t as
|
|
95
|
+
import { t as $e } from "./toast-stack-BCR4Cu7V.js";
|
|
96
|
+
import { t as et } from "./toggle-group-C7ye1v4s.js";
|
|
97
|
+
import { t as tt } from "./toggle-subscription-Ytz7ew1q.js";
|
|
99
98
|
import "./tooltip.js";
|
|
100
|
-
import { t as
|
|
101
|
-
import { t as
|
|
102
|
-
import { t as
|
|
103
|
-
import { t as
|
|
104
|
-
import
|
|
105
|
-
export { e as Accordion, t as ActivityRings, n as Alert, a as AnnouncementBar, o as Avatar, s as AvatarGroup, c as Badge,
|
|
99
|
+
import { t as nt } from "./tree-view-CoW4oJIZ.js";
|
|
100
|
+
import { t as rt } from "./typewriter-terminal-BUEsMzo3.js";
|
|
101
|
+
import { t as it } from "./usage-meter-CYvlB6l3.js";
|
|
102
|
+
import { t as at } from "./user-menu-Czrrk93A.js";
|
|
103
|
+
import ot from "@emotion/styled";
|
|
104
|
+
export { e as Accordion, t as ActivityRings, n as Alert, a as AnnouncementBar, o as Avatar, s as AvatarGroup, c as Badge, l as BottomSheet, u as Breadcrumbs, r as Button, p as ButtonGroup, m as Calendar, h as Card, g as Carousel, v as ChatThread, y as Checkbox, b as ChipGroup, S as CodeBlock, T as Combobox, C as CommandPalette, E as CommentThread, D as Container, O as ContextMenu, x as CopyButton, i as Countdown, k as DatePicker, A as DateRangePicker, j as Dialog, M as Divider, N as Drawer, P as EditableDetails, F as Emblem, I as EmptyState, L as ExpandableCard, z as ExpandingSearch, V as FileDropzone, H as FilterToolbar, U as Flex, W as FlipGameCard, J as GameCard, Y as HoldToConfirm, Q as HoverCard, X as ImageCompare, Z as InlineEdit, $ as JsonViewer, ee as Kbd, te as KeycapKeyboard, ne as LightboxGallery, re as LinkUnfurl, ie as LocaleSwitcher, se as MentionInput, d as Menu, le as MetricCard, ue as MultiSelect, de as Navigation, me as NowPlaying, pe as NowPlayingLevels, he as Pagination, ge as PasswordField, _e as PhotoGrid, ce as Pill, ve as Popover, B as Progress, K as RANK_MARKS, ye as RadioCards, be as RadioGroup, xe as ResizablePanels, q as SUIT_GLYPHS, G as SUIT_INK, Se as ScrollArea, R as SearchField, Ce as SegmentedControl, we as Select, Ee as SheetStack, Ae as SignatureExportError, Oe as SignaturePad, je as Skeleton, fe as Slider, Me as SortableDataTable, Ne as Spinner, Pe as SplitButton, Fe as Stack, Ie as Stepper, Le as StretchRefresh, Re as SwipeActions, ze as Switch, Be as Tabs, Ve as TagInput, w as TextField, _ as Textarea, We as ThemeProvider, qe as ThemeRoot, Je as ThemeSwitch, Ye as TimePicker, Xe as Timeline, Qe as Toast, $e as ToastStack, et as ToggleGroup, tt as ToggleSubscription, f as Tooltip, nt as TreeView, rt as TypewriterTerminal, it as UsageMeter, at as UserMenu, Ge as createTheme, ae as mentionText, oe as serializeMentions, ke as signatureToPng, De as signatureToSvg, ot as styled, Ue as theme, Ke as themeTokenStyle, Te as useSheetStack, He as useTheme, Ze as useToast };
|
|
@@ -324,12 +324,12 @@ var Q = {
|
|
|
324
324
|
menu: q,
|
|
325
325
|
swap: J,
|
|
326
326
|
inline: X,
|
|
327
|
-
|
|
327
|
+
pills: Z
|
|
328
328
|
}, ee = {
|
|
329
329
|
menu: "div",
|
|
330
330
|
swap: "div",
|
|
331
331
|
inline: "nav",
|
|
332
|
-
|
|
332
|
+
pills: "nav"
|
|
333
333
|
};
|
|
334
334
|
function $({ ref: e, options: t, value: n, variant: r = "menu", size: a = "md", triggerLabel: o, label: s, icon: c = U, open: l, defaultOpen: u, onOpenChange: d, placement: f, slotProps: p, className: m, sx: h, ...g }) {
|
|
335
335
|
let _ = w([e]), y = t.find((e) => e.value === n), b = t.length, x = y !== void 0, C = !!o;
|
package/dist/locale-switcher.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as LocaleSwitcher } from "./locale-switcher-
|
|
2
|
+
export { t as LocaleSwitcher } from "./locale-switcher-Ce_tN4Gb.js";
|
|
@@ -11,11 +11,11 @@ import { vars as p } from "@jfrader/tokens/vars";
|
|
|
11
11
|
import { jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
|
|
12
12
|
import { AnimatePresence as g, MotionConfig as _, motion as v, useReducedMotion as y } from "motion/react";
|
|
13
13
|
import { base as b } from "@jfrader/tokens";
|
|
14
|
-
//#region src/components/
|
|
14
|
+
//#region src/components/toggle-subscription/toggle-subscription.tsx
|
|
15
15
|
var x = s(null);
|
|
16
16
|
function S() {
|
|
17
17
|
let e = c(x);
|
|
18
|
-
if (!e) throw Error("
|
|
18
|
+
if (!e) throw Error("ToggleSubscription parts must be rendered inside <ToggleSubscription>.");
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
21
21
|
var C = e({
|
|
@@ -97,7 +97,7 @@ function B({ ref: e, nativeProps: t, ...n }) {
|
|
|
97
97
|
...t,
|
|
98
98
|
...n,
|
|
99
99
|
ref: e,
|
|
100
|
-
"data-ui": "
|
|
100
|
+
"data-ui": "toggle-subscription-price"
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
var V = v.create(B);
|
|
@@ -137,14 +137,14 @@ function H({ ref: e, value: t, defaultValue: i, onValueChange: a, disabled: o =
|
|
|
137
137
|
...v,
|
|
138
138
|
ref: e,
|
|
139
139
|
className: t,
|
|
140
|
-
"data-ui": "
|
|
140
|
+
"data-ui": "toggle-subscription",
|
|
141
141
|
children: g
|
|
142
142
|
})
|
|
143
143
|
})
|
|
144
144
|
})
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
H.displayName = "
|
|
147
|
+
H.displayName = "ToggleSubscription";
|
|
148
148
|
function U({ ref: e, id: t, className: r, sx: i, children: o, ...s }) {
|
|
149
149
|
let { setLabels: c } = S(), d = l(), f = t ?? d, p = a(o) && o !== "";
|
|
150
150
|
return u(() => {
|
|
@@ -161,17 +161,17 @@ function U({ ref: e, id: t, className: r, sx: i, children: o, ...s }) {
|
|
|
161
161
|
...s,
|
|
162
162
|
ref: e,
|
|
163
163
|
id: f,
|
|
164
|
-
"data-ui": "
|
|
164
|
+
"data-ui": "toggle-subscription-label",
|
|
165
165
|
className: t,
|
|
166
166
|
children: o
|
|
167
167
|
})
|
|
168
168
|
}) : null;
|
|
169
169
|
}
|
|
170
|
-
U.displayName = "
|
|
170
|
+
U.displayName = "ToggleSubscription.Label";
|
|
171
171
|
function W({ ref: e, className: t, sx: r, children: i, ...a }) {
|
|
172
172
|
let s = S(), c = s.value === void 0 ? void 0 : s.selections.get(s.value);
|
|
173
173
|
return /* @__PURE__ */ m("div", {
|
|
174
|
-
"data-ui": "
|
|
174
|
+
"data-ui": "toggle-subscription-list",
|
|
175
175
|
css: w,
|
|
176
176
|
children: /* @__PURE__ */ m(n, {
|
|
177
177
|
className: t,
|
|
@@ -200,7 +200,7 @@ function W({ ref: e, className: t, sx: r, children: i, ...a }) {
|
|
|
200
200
|
})
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
W.displayName = "
|
|
203
|
+
W.displayName = "ToggleSubscription.List";
|
|
204
204
|
function G({ badge: e, activeBadge: t, slotProps: r, children: i, className: s, sx: c, ...l }) {
|
|
205
205
|
let d = S(), { setSelections: f } = d, p = r?.selection, g = l.value;
|
|
206
206
|
u(() => {
|
|
@@ -215,7 +215,7 @@ function G({ badge: e, activeBadge: t, slotProps: r, children: i, className: s,
|
|
|
215
215
|
]);
|
|
216
216
|
let _ = d.value === l.value && t !== void 0 ? t : e, v = a(_) && _ !== "";
|
|
217
217
|
return /* @__PURE__ */ m("span", {
|
|
218
|
-
"data-ui": "
|
|
218
|
+
"data-ui": "toggle-subscription-item",
|
|
219
219
|
css: T,
|
|
220
220
|
children: /* @__PURE__ */ m(n, {
|
|
221
221
|
className: s,
|
|
@@ -225,7 +225,7 @@ function G({ badge: e, activeBadge: t, slotProps: r, children: i, className: s,
|
|
|
225
225
|
className: n,
|
|
226
226
|
accessory: v ? /* @__PURE__ */ h("span", {
|
|
227
227
|
...r?.badge,
|
|
228
|
-
"data-ui": "
|
|
228
|
+
"data-ui": "toggle-subscription-badge",
|
|
229
229
|
css: [
|
|
230
230
|
D,
|
|
231
231
|
A[d.tone],
|
|
@@ -250,7 +250,7 @@ function G({ badge: e, activeBadge: t, slotProps: r, children: i, className: s,
|
|
|
250
250
|
}) : void 0,
|
|
251
251
|
children: a(i) && i !== "" && /* @__PURE__ */ m("span", {
|
|
252
252
|
...r?.label,
|
|
253
|
-
"data-ui": "
|
|
253
|
+
"data-ui": "toggle-subscription-item-label",
|
|
254
254
|
css: r?.label?.css,
|
|
255
255
|
children: i
|
|
256
256
|
})
|
|
@@ -258,9 +258,9 @@ function G({ badge: e, activeBadge: t, slotProps: r, children: i, className: s,
|
|
|
258
258
|
})
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
G.displayName = "
|
|
261
|
+
G.displayName = "ToggleSubscription.Item";
|
|
262
262
|
function K({ ref: e, amount: t, currency: r, locale: o, formatOptions: s, was: c, period: l, previousLabel: u, slotProps: f, className: p, sx: _, ...b }) {
|
|
263
|
-
if (!Number.isFinite(t)) throw RangeError("
|
|
263
|
+
if (!Number.isFinite(t)) throw RangeError("ToggleSubscription.Price amount must be finite.");
|
|
264
264
|
let { locale: x } = S(), C = y(), w = o ?? x, T = JSON.stringify([
|
|
265
265
|
Intl.getCanonicalLocales(w === void 0 ? [] : [w].flat().map(String)),
|
|
266
266
|
r,
|
|
@@ -273,7 +273,7 @@ function K({ ref: e, amount: t, currency: r, locale: o, formatOptions: s, was: c
|
|
|
273
273
|
currency: t
|
|
274
274
|
});
|
|
275
275
|
}, [T]), D = E.format(t), O = c !== void 0 && Number.isFinite(c) && c > t;
|
|
276
|
-
if (O && !u) throw Error("
|
|
276
|
+
if (O && !u) throw Error("ToggleSubscription.Price requires previousLabel when was exceeds amount.");
|
|
277
277
|
return /* @__PURE__ */ m(n, {
|
|
278
278
|
className: p,
|
|
279
279
|
styles: N,
|
|
@@ -288,7 +288,7 @@ function K({ ref: e, amount: t, currency: r, locale: o, formatOptions: s, was: c
|
|
|
288
288
|
children: [
|
|
289
289
|
/* @__PURE__ */ h("span", {
|
|
290
290
|
...f?.amount,
|
|
291
|
-
"data-ui": "
|
|
291
|
+
"data-ui": "toggle-subscription-amount",
|
|
292
292
|
css: [P, f?.amount?.css],
|
|
293
293
|
children: [/* @__PURE__ */ m("span", {
|
|
294
294
|
css: i,
|
|
@@ -321,7 +321,7 @@ function K({ ref: e, amount: t, currency: r, locale: o, formatOptions: s, was: c
|
|
|
321
321
|
}),
|
|
322
322
|
O && /* @__PURE__ */ h("del", {
|
|
323
323
|
...f?.previous,
|
|
324
|
-
"data-ui": "
|
|
324
|
+
"data-ui": "toggle-subscription-previous",
|
|
325
325
|
css: [L, f?.previous?.css],
|
|
326
326
|
children: [/* @__PURE__ */ m("span", {
|
|
327
327
|
css: i,
|
|
@@ -330,7 +330,7 @@ function K({ ref: e, amount: t, currency: r, locale: o, formatOptions: s, was: c
|
|
|
330
330
|
}),
|
|
331
331
|
a(l) && l !== "" && /* @__PURE__ */ m("span", {
|
|
332
332
|
...f?.period,
|
|
333
|
-
"data-ui": "
|
|
333
|
+
"data-ui": "toggle-subscription-period",
|
|
334
334
|
css: [R, f?.period?.css],
|
|
335
335
|
children: l
|
|
336
336
|
})
|
|
@@ -338,7 +338,7 @@ function K({ ref: e, amount: t, currency: r, locale: o, formatOptions: s, was: c
|
|
|
338
338
|
})
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
K.displayName = "
|
|
341
|
+
K.displayName = "ToggleSubscription.Price";
|
|
342
342
|
var q = Object.assign(H, {
|
|
343
343
|
List: W,
|
|
344
344
|
Item: G,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode, type Ref, type RefCallback } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export interface EditableDetailsMessages {
|
|
5
|
+
edit: string;
|
|
6
|
+
}
|
|
7
|
+
export interface EditableDetailsPartProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
css?: Interpolation<Theme>;
|
|
10
|
+
}
|
|
11
|
+
export interface EditableDetailsProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
12
|
+
messages?: Partial<EditableDetailsMessages>;
|
|
13
|
+
}
|
|
14
|
+
export interface EditableDetailsSectionProps extends Omit<ComponentPropsWithRef<'section'>, 'title'>, SxProps {
|
|
15
|
+
title: ReactNode;
|
|
16
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
|
+
open?: boolean;
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
onOpenChange?: (open: boolean) => void;
|
|
20
|
+
triggerRef?: Ref<HTMLButtonElement>;
|
|
21
|
+
slotProps?: {
|
|
22
|
+
heading?: EditableDetailsPartProps;
|
|
23
|
+
trigger?: EditableDetailsPartProps;
|
|
24
|
+
panel?: EditableDetailsPartProps;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface EditableDetailsListProps extends ComponentPropsWithRef<'dl'>, SxProps {
|
|
28
|
+
}
|
|
29
|
+
export interface EditableDetailsEditorProps {
|
|
30
|
+
initialFocusRef: RefCallback<HTMLElement>;
|
|
31
|
+
complete: () => void;
|
|
32
|
+
cancel: () => void;
|
|
33
|
+
visible: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface EditableDetailsItemProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
36
|
+
label: ReactNode;
|
|
37
|
+
renderEditor?: (props: EditableDetailsEditorProps) => ReactNode;
|
|
38
|
+
open?: boolean;
|
|
39
|
+
defaultOpen?: boolean;
|
|
40
|
+
onOpenChange?: (open: boolean) => void;
|
|
41
|
+
slotProps?: {
|
|
42
|
+
label?: EditableDetailsPartProps;
|
|
43
|
+
description?: EditableDetailsPartProps;
|
|
44
|
+
summary?: EditableDetailsPartProps;
|
|
45
|
+
edit?: EditableDetailsPartProps;
|
|
46
|
+
editor?: EditableDetailsPartProps;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
declare function EditableDetailsRoot({ messages, className, sx, ...rest }: EditableDetailsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare function EditableDetailsSection({ ref, title, headingLevel, open: openProp, defaultOpen, onOpenChange, triggerRef, slotProps, children, className, sx, ...rest }: EditableDetailsSectionProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare function EditableDetailsList({ className, sx, ...rest }: EditableDetailsListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
52
|
+
declare function EditableDetailsItem({ ref, label, renderEditor, open: openProp, defaultOpen, onOpenChange, children, slotProps, className, sx, ...rest }: EditableDetailsItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare const EditableDetails: typeof EditableDetailsRoot & {
|
|
54
|
+
Section: typeof EditableDetailsSection;
|
|
55
|
+
List: typeof EditableDetailsList;
|
|
56
|
+
Item: typeof EditableDetailsItem;
|
|
57
|
+
};
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { EditableDetails } from './editable-details';
|
|
2
|
+
export type { EditableDetailsProps, EditableDetailsMessages, EditableDetailsPartProps, EditableDetailsSectionProps, EditableDetailsListProps, EditableDetailsItemProps, EditableDetailsEditorProps, } from './editable-details';
|
|
@@ -2,7 +2,7 @@ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNo
|
|
|
2
2
|
import { type Placement } from '@floating-ui/react';
|
|
3
3
|
import { type Interpolation, type Theme } from '../../styling/css';
|
|
4
4
|
import { type SxProps } from '../../styling/sx';
|
|
5
|
-
export type LocaleSwitcherVariant = 'menu' | 'swap' | 'inline' | '
|
|
5
|
+
export type LocaleSwitcherVariant = 'menu' | 'swap' | 'inline' | 'pills';
|
|
6
6
|
export type LocaleSwitcherSize = 'sm' | 'md' | 'lg';
|
|
7
7
|
/** Spread these props onto the link returned by an option's `render` callback. */
|
|
8
8
|
export interface LocaleSwitcherLinkProps extends Omit<ComponentPropsWithRef<'a'>, 'href' | 'children'> {
|
|
@@ -44,7 +44,7 @@ export interface LocaleSwitcherProps extends Omit<ComponentPropsWithRef<'nav'>,
|
|
|
44
44
|
size?: LocaleSwitcherSize;
|
|
45
45
|
/** Names the menu trigger's action, such as "Change language". Read before the current label. */
|
|
46
46
|
triggerLabel?: string;
|
|
47
|
-
/** Names the navigation landmark in the inline and
|
|
47
|
+
/** Names the navigation landmark in the inline and pills variants. */
|
|
48
48
|
label?: string;
|
|
49
49
|
/** Shows a decorative icon before the menu's current label. Defaults to a globe. `null` removes it. */
|
|
50
50
|
icon?: ReactNode;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { ToggleSubscription } from './toggle-subscription';
|
|
2
|
+
export type { ToggleSubscriptionProps, ToggleSubscriptionListProps, ToggleSubscriptionItemProps, ToggleSubscriptionLabelProps, ToggleSubscriptionPriceProps, ToggleSubscriptionSize, ToggleSubscriptionTone, } from './toggle-subscription';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
import { type SegmentedControlItemProps } from '../segmented-control';
|
|
5
|
+
export type ToggleSubscriptionSize = 'md' | 'lg';
|
|
6
|
+
export type ToggleSubscriptionTone = 'neutral' | 'accent' | 'success';
|
|
7
|
+
type SlotProps<Element extends 'span' | 'del'> = ComponentPropsWithoutRef<Element> & {
|
|
8
|
+
css?: Interpolation<Theme>;
|
|
9
|
+
};
|
|
10
|
+
export interface ToggleSubscriptionProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'>, SxProps {
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
size?: ToggleSubscriptionSize;
|
|
16
|
+
tone?: ToggleSubscriptionTone;
|
|
17
|
+
locale?: Intl.LocalesArgument;
|
|
18
|
+
}
|
|
19
|
+
export interface ToggleSubscriptionListProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'>, SxProps {
|
|
20
|
+
}
|
|
21
|
+
export interface ToggleSubscriptionLabelProps extends ComponentPropsWithRef<'span'>, SxProps {
|
|
22
|
+
}
|
|
23
|
+
export interface ToggleSubscriptionItemProps extends Omit<SegmentedControlItemProps, 'accessory'> {
|
|
24
|
+
badge?: ReactNode;
|
|
25
|
+
activeBadge?: ReactNode;
|
|
26
|
+
slotProps?: {
|
|
27
|
+
label?: SlotProps<'span'>;
|
|
28
|
+
badge?: SlotProps<'span'>;
|
|
29
|
+
selection?: SlotProps<'span'>;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface ToggleSubscriptionPriceProps extends Omit<ComponentPropsWithRef<'span'>, 'children'>, SxProps {
|
|
33
|
+
amount: number;
|
|
34
|
+
currency: string;
|
|
35
|
+
locale?: Intl.LocalesArgument;
|
|
36
|
+
formatOptions?: Omit<Intl.NumberFormatOptions, 'style' | 'currency'>;
|
|
37
|
+
was?: number;
|
|
38
|
+
period?: ReactNode;
|
|
39
|
+
previousLabel?: string;
|
|
40
|
+
slotProps?: {
|
|
41
|
+
amount?: SlotProps<'span'>;
|
|
42
|
+
previous?: SlotProps<'del'>;
|
|
43
|
+
period?: SlotProps<'span'>;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
declare function ToggleSubscriptionRoot({ ref, value: valueProp, defaultValue, onValueChange, disabled, size, tone, locale, className, sx, children, ...rest }: ToggleSubscriptionProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
47
|
+
declare function ToggleSubscriptionLabel({ ref, id: idProp, className, sx, children, ...rest }: ToggleSubscriptionLabelProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
48
|
+
declare function ToggleSubscriptionList({ ref, className, sx, children, ...rest }: ToggleSubscriptionListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
49
|
+
declare function ToggleSubscriptionItem({ badge, activeBadge, slotProps, children, className, sx, ...rest }: ToggleSubscriptionItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare function ToggleSubscriptionPrice({ ref, amount, currency, locale: localeProp, formatOptions, was, period, previousLabel, slotProps, className, sx, ...rest }: ToggleSubscriptionPriceProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare const ToggleSubscription: typeof ToggleSubscriptionRoot & {
|
|
52
|
+
List: typeof ToggleSubscriptionList;
|
|
53
|
+
Item: typeof ToggleSubscriptionItem;
|
|
54
|
+
Label: typeof ToggleSubscriptionLabel;
|
|
55
|
+
Price: typeof ToggleSubscriptionPrice;
|
|
56
|
+
};
|
|
57
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './components/announcement-bar';
|
|
|
5
5
|
export * from './components/avatar';
|
|
6
6
|
export * from './components/avatar-group';
|
|
7
7
|
export * from './components/badge';
|
|
8
|
-
export * from './components/billing-toggle';
|
|
9
8
|
export * from './components/bottom-sheet';
|
|
10
9
|
export * from './components/breadcrumbs';
|
|
11
10
|
export * from './components/button';
|
|
@@ -29,6 +28,7 @@ export * from './components/date-range-picker';
|
|
|
29
28
|
export * from './components/dialog';
|
|
30
29
|
export * from './components/divider';
|
|
31
30
|
export * from './components/drawer';
|
|
31
|
+
export * from './components/editable-details';
|
|
32
32
|
export * from './components/emblem';
|
|
33
33
|
export * from './components/empty-state';
|
|
34
34
|
export * from './components/expandable-card';
|
|
@@ -40,7 +40,6 @@ export * from './components/flip-game-card';
|
|
|
40
40
|
export * from './components/game-card';
|
|
41
41
|
export * from './components/hold-to-confirm';
|
|
42
42
|
export * from './components/image-compare';
|
|
43
|
-
export * from './components/in-view-title';
|
|
44
43
|
export * from './components/inline-edit';
|
|
45
44
|
export * from './components/hover-card';
|
|
46
45
|
export * from './components/json-viewer';
|
|
@@ -69,7 +68,6 @@ export * from './components/search-field';
|
|
|
69
68
|
export * from './components/segmented-control';
|
|
70
69
|
export * from './components/select';
|
|
71
70
|
export * from './components/sheet-stack';
|
|
72
|
-
export * from './components/shortcut-recorder';
|
|
73
71
|
export * from './components/signature-pad';
|
|
74
72
|
export * from './components/skeleton';
|
|
75
73
|
export * from './components/slider';
|
|
@@ -93,6 +91,7 @@ export * from './components/timeline';
|
|
|
93
91
|
export * from './components/toast';
|
|
94
92
|
export * from './components/toast-stack';
|
|
95
93
|
export * from './components/toggle-group';
|
|
94
|
+
export * from './components/toggle-subscription';
|
|
96
95
|
export * from './components/tooltip';
|
|
97
96
|
export * from './components/tree-view';
|
|
98
97
|
export * from './components/typewriter-terminal';
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a `120ms` token into a number. A token that is missing or stops being milliseconds resolves
|
|
3
|
+
* to `0` — no animation, and the state still completes — because a design system cannot take the page
|
|
4
|
+
* down over a configuration mistake. Exported for the Foundations/Motion page to prove the fallback;
|
|
5
|
+
* the report is loud in development and silent in production.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveMotionDurationMs(name: string, value: unknown): number;
|
|
1
8
|
export declare const motionDurationMs: {
|
|
2
9
|
readonly fast: number;
|
|
3
10
|
readonly base: number;
|
|
4
11
|
readonly slow: number;
|
|
12
|
+
readonly cardFlip: number;
|
|
5
13
|
};
|
|
@@ -103,9 +103,11 @@ export declare const theme: {
|
|
|
103
103
|
readonly base: "var(--ui-motion-duration-base)";
|
|
104
104
|
readonly slow: "var(--ui-motion-duration-slow)";
|
|
105
105
|
readonly presence: "var(--ui-motion-duration-presence)";
|
|
106
|
+
readonly cardFlip: "var(--ui-motion-duration-card-flip)";
|
|
106
107
|
};
|
|
107
108
|
readonly easeStandard: "var(--ui-motion-ease-standard)";
|
|
108
109
|
readonly easePresence: "var(--ui-motion-ease-presence)";
|
|
110
|
+
readonly easeCardFlip: "var(--ui-motion-ease-card-flip)";
|
|
109
111
|
};
|
|
110
112
|
readonly size: {
|
|
111
113
|
readonly emblemSm: "var(--ui-size-emblem-sm)";
|