@jfrader/ui 0.7.0 → 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.
Files changed (52) hide show
  1. package/README.md +14 -28
  2. package/dist/avatar-BuM1zB_f.js +164 -0
  3. package/dist/{avatar-group-BlMLNw4J.js → avatar-group-D1UEihvh.js} +1 -1
  4. package/dist/avatar-group.js +1 -1
  5. package/dist/avatar.js +1 -1
  6. package/dist/card-frame-CcLa6NQ4.js +13 -0
  7. package/dist/{chat-thread-DkB-WMWJ.js → chat-thread-CMhwxhoA.js} +1 -1
  8. package/dist/chat-thread.js +1 -1
  9. package/dist/{comment-thread-DXfqgRNI.js → comment-thread-DbOzYr0q.js} +1 -1
  10. package/dist/comment-thread.js +1 -1
  11. package/dist/editable-details-BndqEnYF.js +365 -0
  12. package/dist/editable-details.js +2 -0
  13. package/dist/flip-game-card-BOJIhBrh.js +104 -0
  14. package/dist/flip-game-card.js +2 -0
  15. package/dist/{game-card-Oeu74giK.js → game-card-Bnhpz78f.js} +42 -49
  16. package/dist/game-card.js +1 -1
  17. package/dist/{hover-card-Dgu2CwMD.js → hover-card--ijYr1cd.js} +1 -1
  18. package/dist/hover-card.js +1 -1
  19. package/dist/index.js +90 -90
  20. package/dist/{locale-switcher-DTkySKsM.js → locale-switcher-Ce_tN4Gb.js} +2 -2
  21. package/dist/locale-switcher.js +1 -1
  22. package/dist/{thread-parts-Cpktor6D.js → thread-parts-DbKhuwVU.js} +1 -1
  23. package/dist/{timeline-BcF46lG9.js → timeline-BPKY94mT.js} +1 -1
  24. package/dist/timeline.js +1 -1
  25. package/dist/{billing-toggle-CgC7yxxo.js → toggle-subscription-Ytz7ew1q.js} +19 -19
  26. package/dist/toggle-subscription.js +2 -0
  27. package/dist/types/components/avatar/avatar.d.ts +3 -1
  28. package/dist/types/components/editable-details/editable-details.d.ts +58 -0
  29. package/dist/types/components/editable-details/index.d.ts +2 -0
  30. package/dist/types/components/flip-game-card/flip-game-card.d.ts +22 -0
  31. package/dist/types/components/flip-game-card/index.d.ts +2 -0
  32. package/dist/types/components/locale-switcher/locale-switcher.d.ts +2 -2
  33. package/dist/types/components/toggle-subscription/index.d.ts +2 -0
  34. package/dist/types/components/toggle-subscription/toggle-subscription.d.ts +57 -0
  35. package/dist/types/index.d.ts +3 -3
  36. package/dist/types/styling/motion-timings.d.ts +8 -0
  37. package/dist/types/styling/theme.d.ts +5 -0
  38. package/dist/{user-menu-MctRu_Lh.js → user-menu-Czrrk93A.js} +1 -1
  39. package/dist/user-menu.js +1 -1
  40. package/package.json +14 -14
  41. package/dist/avatar-sPxDqFiZ.js +0 -133
  42. package/dist/billing-toggle.js +0 -2
  43. package/dist/in-view-title-BUZCMqge.js +0 -225
  44. package/dist/in-view-title.js +0 -2
  45. package/dist/shortcut-recorder-VgTQdjjn.js +0 -688
  46. package/dist/shortcut-recorder.js +0 -2
  47. package/dist/types/components/billing-toggle/billing-toggle.d.ts +0 -57
  48. package/dist/types/components/billing-toggle/index.d.ts +0 -2
  49. package/dist/types/components/in-view-title/in-view-title.d.ts +0 -23
  50. package/dist/types/components/in-view-title/index.d.ts +0 -1
  51. package/dist/types/components/shortcut-recorder/index.d.ts +0 -2
  52. package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +0 -117
@@ -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/billing-toggle/billing-toggle.tsx
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("BillingToggle parts must be rendered inside <BillingToggle>.");
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": "billing-toggle-price"
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": "billing-toggle",
140
+ "data-ui": "toggle-subscription",
141
141
  children: g
142
142
  })
143
143
  })
144
144
  })
145
145
  });
146
146
  }
147
- H.displayName = "BillingToggle";
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": "billing-toggle-label",
164
+ "data-ui": "toggle-subscription-label",
165
165
  className: t,
166
166
  children: o
167
167
  })
168
168
  }) : null;
169
169
  }
170
- U.displayName = "BillingToggle.Label";
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": "billing-toggle-list",
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 = "BillingToggle.List";
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": "billing-toggle-item",
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": "billing-toggle-badge",
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": "billing-toggle-item-label",
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 = "BillingToggle.Item";
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("BillingToggle.Price amount must be finite.");
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("BillingToggle.Price requires previousLabel when was exceeds amount.");
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": "billing-toggle-amount",
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": "billing-toggle-previous",
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": "billing-toggle-period",
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 = "BillingToggle.Price";
341
+ K.displayName = "ToggleSubscription.Price";
342
342
  var q = Object.assign(H, {
343
343
  List: W,
344
344
  Item: G,
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export { t as ToggleSubscription } from "./toggle-subscription-Ytz7ew1q.js";
@@ -13,6 +13,8 @@ export interface AvatarProps extends Omit<ComponentPropsWithRef<'span'>, 'childr
13
13
  src?: string;
14
14
  size?: AvatarSize;
15
15
  status?: AvatarStatus;
16
+ /** Pulse the presence ring only when `status="online"`. Defaults to `false`. */
17
+ pulse?: boolean;
16
18
  /** Spoken status word; defaults to the `status` value. Pass a translated word for other locales. */
17
19
  statusLabel?: string;
18
20
  slotProps?: {
@@ -21,7 +23,7 @@ export interface AvatarProps extends Omit<ComponentPropsWithRef<'span'>, 'childr
21
23
  status?: AvatarPartProps;
22
24
  };
23
25
  }
24
- export declare function Avatar({ ref, name, src, size, status, statusLabel, slotProps, className, sx, ...rest }: AvatarProps): import("@emotion/react/jsx-runtime").JSX.Element;
26
+ export declare function Avatar({ ref, name, src, size, status, pulse, statusLabel, slotProps, className, sx, ...rest }: AvatarProps): import("@emotion/react/jsx-runtime").JSX.Element;
25
27
  export declare namespace Avatar {
26
28
  var displayName: string;
27
29
  }
@@ -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';
@@ -0,0 +1,22 @@
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ import { type SxProps } from '../../styling/sx';
3
+ import type { GameCardPartProps, GameCardSize } from '../game-card';
4
+ export interface FlipGameCardProps extends Omit<ComponentPropsWithRef<'div'>, 'children'>, SxProps {
5
+ /** Shows `back` when true and `front` when false. No interaction changes this prop. */
6
+ flipped: boolean;
7
+ /** Content shown when `flipped` is false. */
8
+ front: ReactNode;
9
+ /** Content shown when `flipped` is true. Both faces stay mounted. */
10
+ back: ReactNode;
11
+ /** Card width, using the GameCard scale. Defaults to `md`. */
12
+ size?: GameCardSize;
13
+ slotProps?: {
14
+ rotator?: GameCardPartProps;
15
+ front?: GameCardPartProps;
16
+ back?: GameCardPartProps;
17
+ };
18
+ }
19
+ export declare function FlipGameCard({ ref, flipped, front, back, size, slotProps, className, sx, ...rest }: FlipGameCardProps): import("@emotion/react/jsx-runtime").JSX.Element;
20
+ export declare namespace FlipGameCard {
21
+ var displayName: string;
22
+ }
@@ -0,0 +1,2 @@
1
+ export { FlipGameCard } from './flip-game-card';
2
+ export type { FlipGameCardProps } from './flip-game-card';
@@ -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' | 'segmented';
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 segmented variants. */
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 {};
@@ -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';
@@ -36,10 +36,10 @@ export * from './components/expanding-search';
36
36
  export * from './components/file-dropzone';
37
37
  export * from './components/filter-toolbar';
38
38
  export * from './components/flex';
39
+ export * from './components/flip-game-card';
39
40
  export * from './components/game-card';
40
41
  export * from './components/hold-to-confirm';
41
42
  export * from './components/image-compare';
42
- export * from './components/in-view-title';
43
43
  export * from './components/inline-edit';
44
44
  export * from './components/hover-card';
45
45
  export * from './components/json-viewer';
@@ -68,7 +68,6 @@ export * from './components/search-field';
68
68
  export * from './components/segmented-control';
69
69
  export * from './components/select';
70
70
  export * from './components/sheet-stack';
71
- export * from './components/shortcut-recorder';
72
71
  export * from './components/signature-pad';
73
72
  export * from './components/skeleton';
74
73
  export * from './components/slider';
@@ -92,6 +91,7 @@ export * from './components/timeline';
92
91
  export * from './components/toast';
93
92
  export * from './components/toast-stack';
94
93
  export * from './components/toggle-group';
94
+ export * from './components/toggle-subscription';
95
95
  export * from './components/tooltip';
96
96
  export * from './components/tree-view';
97
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
  };
@@ -102,8 +102,12 @@ export declare const theme: {
102
102
  readonly fast: "var(--ui-motion-duration-fast)";
103
103
  readonly base: "var(--ui-motion-duration-base)";
104
104
  readonly slow: "var(--ui-motion-duration-slow)";
105
+ readonly presence: "var(--ui-motion-duration-presence)";
106
+ readonly cardFlip: "var(--ui-motion-duration-card-flip)";
105
107
  };
106
108
  readonly easeStandard: "var(--ui-motion-ease-standard)";
109
+ readonly easePresence: "var(--ui-motion-ease-presence)";
110
+ readonly easeCardFlip: "var(--ui-motion-ease-card-flip)";
107
111
  };
108
112
  readonly size: {
109
113
  readonly emblemSm: "var(--ui-size-emblem-sm)";
@@ -113,6 +117,7 @@ export declare const theme: {
113
117
  readonly gameCardSm: "var(--ui-size-game-card-sm)";
114
118
  readonly gameCardMd: "var(--ui-size-game-card-md)";
115
119
  readonly gameCardLg: "var(--ui-size-game-card-lg)";
120
+ readonly gameCardPerspective: "var(--ui-size-game-card-perspective)";
116
121
  readonly sheetStackBreakpoint: "var(--ui-size-sheet-stack-breakpoint)";
117
122
  readonly sheetStackSheetPeek: "var(--ui-size-sheet-stack-sheet-peek)";
118
123
  readonly sheetStackDialogPeek: "var(--ui-size-sheet-stack-dialog-peek)";
@@ -8,7 +8,7 @@ import { t as c } from "./use-controlled-state-DpeVQZNR.js";
8
8
  import { t as l } from "./visually-hidden-DgVO3NaB.js";
9
9
  import { t as u } from "./renderable-DzcIj1Lo.js";
10
10
  import { t as d } from "./icon-wrapper-C-zMD0uL.js";
11
- import { t as f } from "./avatar-sPxDqFiZ.js";
11
+ import { t as f } from "./avatar-BuM1zB_f.js";
12
12
  import { t as p } from "./use-scroll-lock-40gXwwAy.js";
13
13
  import { s as m } from "./listbox-style-DNOxAulu.js";
14
14
  import { t as h } from "./overlay-portal-C9igMHnC.js";
package/dist/user-menu.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as UserMenu } from "./user-menu-MctRu_Lh.js";
2
+ export { t as UserMenu } from "./user-menu-Czrrk93A.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jfrader/ui",
3
- "version": "0.7.0",
3
+ "version": "0.7.3",
4
4
  "description": "React components styled with Emotion and themed through CSS custom properties.",
5
5
  "keywords": [
6
6
  "react",
@@ -54,10 +54,6 @@
54
54
  "types": "./dist/types/components/badge/index.d.ts",
55
55
  "import": "./dist/badge.js"
56
56
  },
57
- "./billing-toggle": {
58
- "types": "./dist/types/components/billing-toggle/index.d.ts",
59
- "import": "./dist/billing-toggle.js"
60
- },
61
57
  "./bottom-sheet": {
62
58
  "types": "./dist/types/components/bottom-sheet/index.d.ts",
63
59
  "import": "./dist/bottom-sheet.js"
@@ -154,6 +150,10 @@
154
150
  "types": "./dist/types/components/drawer/index.d.ts",
155
151
  "import": "./dist/drawer.js"
156
152
  },
153
+ "./editable-details": {
154
+ "types": "./dist/types/components/editable-details/index.d.ts",
155
+ "import": "./dist/editable-details.js"
156
+ },
157
157
  "./emblem": {
158
158
  "types": "./dist/types/components/emblem/index.d.ts",
159
159
  "import": "./dist/emblem.js"
@@ -182,6 +182,10 @@
182
182
  "types": "./dist/types/components/flex/index.d.ts",
183
183
  "import": "./dist/flex.js"
184
184
  },
185
+ "./flip-game-card": {
186
+ "types": "./dist/types/components/flip-game-card/index.d.ts",
187
+ "import": "./dist/flip-game-card.js"
188
+ },
185
189
  "./game-card": {
186
190
  "types": "./dist/types/components/game-card/index.d.ts",
187
191
  "import": "./dist/game-card.js"
@@ -194,10 +198,6 @@
194
198
  "types": "./dist/types/components/image-compare/index.d.ts",
195
199
  "import": "./dist/image-compare.js"
196
200
  },
197
- "./in-view-title": {
198
- "types": "./dist/types/components/in-view-title/index.d.ts",
199
- "import": "./dist/in-view-title.js"
200
- },
201
201
  "./inline-edit": {
202
202
  "types": "./dist/types/components/inline-edit/index.d.ts",
203
203
  "import": "./dist/inline-edit.js"
@@ -314,10 +314,6 @@
314
314
  "types": "./dist/types/components/sheet-stack/index.d.ts",
315
315
  "import": "./dist/sheet-stack.js"
316
316
  },
317
- "./shortcut-recorder": {
318
- "types": "./dist/types/components/shortcut-recorder/index.d.ts",
319
- "import": "./dist/shortcut-recorder.js"
320
- },
321
317
  "./signature-pad": {
322
318
  "types": "./dist/types/components/signature-pad/index.d.ts",
323
319
  "import": "./dist/signature-pad.js"
@@ -406,6 +402,10 @@
406
402
  "types": "./dist/types/components/toggle-group/index.d.ts",
407
403
  "import": "./dist/toggle-group.js"
408
404
  },
405
+ "./toggle-subscription": {
406
+ "types": "./dist/types/components/toggle-subscription/index.d.ts",
407
+ "import": "./dist/toggle-subscription.js"
408
+ },
409
409
  "./tooltip": {
410
410
  "types": "./dist/types/components/tooltip/index.d.ts",
411
411
  "import": "./dist/tooltip.js"
@@ -435,7 +435,7 @@
435
435
  "@emotion/styled": "^11.14.0",
436
436
  "@floating-ui/react": "^0.27.20",
437
437
  "motion": "^14.1.0",
438
- "@jfrader/tokens": "0.7.0"
438
+ "@jfrader/tokens": "0.7.3"
439
439
  },
440
440
  "peerDependencies": {
441
441
  "@emotion/cache": "^11.14.0",
@@ -1,133 +0,0 @@
1
- 'use client';
2
- import { i as e } from "./css-BYJhdGh-.js";
3
- import { n as t } from "./media-8yrN85VT.js";
4
- import { t as n } from "./sx-BJXJ2xJK.js";
5
- import { t as r } from "./initials-DEdwNe9_.js";
6
- import { useState as i } from "react";
7
- import { vars as a } from "@jfrader/tokens/vars";
8
- import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
9
- //#region src/components/avatar/avatar.tsx
10
- var c = 2, l = e({
11
- position: "relative",
12
- display: "inline-flex",
13
- alignItems: "center",
14
- justifyContent: "center",
15
- flexShrink: 0,
16
- boxSizing: "border-box",
17
- borderRadius: a.radius.full,
18
- backgroundColor: a.color.surfaceHover,
19
- color: a.color.text,
20
- fontWeight: a.fontWeight.medium,
21
- lineHeight: 1,
22
- userSelect: "none",
23
- verticalAlign: "middle",
24
- [t]: { outline: "1px solid CanvasText" }
25
- }), u = {
26
- sm: e({
27
- inlineSize: a.space[6],
28
- blockSize: a.space[6],
29
- fontSize: a.textSize.xs
30
- }),
31
- md: e({
32
- inlineSize: a.space[8],
33
- blockSize: a.space[8],
34
- fontSize: a.textSize.sm
35
- }),
36
- lg: e({
37
- inlineSize: a.space[10],
38
- blockSize: a.space[10],
39
- fontSize: a.textSize.md
40
- })
41
- }, d = e({
42
- display: "block",
43
- inlineSize: "100%",
44
- blockSize: "100%",
45
- borderRadius: a.radius.full,
46
- objectFit: "cover"
47
- }), f = e({
48
- position: "absolute",
49
- insetBlockEnd: 0,
50
- insetInlineEnd: 0,
51
- inlineSize: "25%",
52
- blockSize: "25%",
53
- "&::before": {
54
- content: "\"\"",
55
- position: "absolute",
56
- insetBlockStart: 0,
57
- insetInlineStart: 0,
58
- inlineSize: "100%",
59
- blockSize: "100%",
60
- boxSizing: "border-box",
61
- borderRadius: a.radius.full,
62
- boxShadow: `0 0 0 2px ${a.color.bg}`
63
- }
64
- }), p = {
65
- online: e({ "&::before": { backgroundColor: a.color.success } }),
66
- away: e({ "&::before": {
67
- border: `2px solid ${a.color.warning}`,
68
- backgroundColor: "transparent"
69
- } }),
70
- busy: e({ "&::before": {
71
- backgroundColor: a.color.danger,
72
- blockSize: "30%",
73
- insetBlockStart: "35%"
74
- } }),
75
- offline: e({ "&::before": {
76
- backgroundColor: a.color.textSubtle,
77
- inlineSize: "60%",
78
- blockSize: "60%",
79
- insetBlockStart: "20%",
80
- insetInlineStart: "20%"
81
- } })
82
- }, m = e({ [t]: {
83
- "&::before": {
84
- forcedColorAdjust: "none",
85
- backgroundColor: "CanvasText",
86
- outline: "2px solid Canvas"
87
- },
88
- "&[data-status=\"away\"]::before": {
89
- borderColor: "CanvasText",
90
- backgroundColor: "Canvas"
91
- }
92
- } });
93
- function h({ ref: e, name: t, src: a, size: h = "md", status: g, statusLabel: _, slotProps: v, className: y, sx: b, ...x }) {
94
- let [S, C] = i(), w = a !== void 0 && a !== "" && a !== S, T = g === void 0 ? t : `${t}, ${_ ?? g}`;
95
- return /* @__PURE__ */ o(n, {
96
- className: y,
97
- styles: [l, u[h]],
98
- sx: b,
99
- children: (n) => /* @__PURE__ */ s("span", {
100
- ...x,
101
- ref: e,
102
- "data-ui": "avatar",
103
- role: "img",
104
- "aria-label": T,
105
- className: n,
106
- children: [w ? /* @__PURE__ */ o("img", {
107
- src: a,
108
- alt: "",
109
- onError: () => C(a),
110
- className: v?.image?.className,
111
- css: [d, v?.image?.css]
112
- }) : /* @__PURE__ */ o("span", {
113
- "aria-hidden": "true",
114
- className: v?.fallback?.className,
115
- css: v?.fallback?.css,
116
- children: r(t, c)
117
- }), g !== void 0 && /* @__PURE__ */ o("span", {
118
- "aria-hidden": "true",
119
- "data-status": g,
120
- className: v?.status?.className,
121
- css: [
122
- f,
123
- p[g],
124
- m,
125
- v?.status?.css
126
- ]
127
- })]
128
- })
129
- });
130
- }
131
- h.displayName = "Avatar";
132
- //#endregion
133
- export { h as t };
@@ -1,2 +0,0 @@
1
- 'use client';
2
- export { t as BillingToggle } from "./billing-toggle-CgC7yxxo.js";