@astryxdesign/lab 0.7.7-canary.f9ac85f → 0.7.8-canary.07ee4b5

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 (65) hide show
  1. package/dist/Chart/ChartZoom.d.ts.map +1 -1
  2. package/dist/Chart/ChartZoom.js +10 -24
  3. package/dist/Comments/CommentActions.d.ts +2 -2
  4. package/dist/Comments/CommentActions.d.ts.map +1 -1
  5. package/dist/Comments/CommentActions.js +9 -23
  6. package/dist/SelectableCardGroup/SelectableCardGroup.d.ts +91 -0
  7. package/dist/SelectableCardGroup/SelectableCardGroup.d.ts.map +1 -0
  8. package/dist/SelectableCardGroup/SelectableCardGroup.js +205 -0
  9. package/dist/SelectableCardGroup/index.d.ts +6 -0
  10. package/dist/SelectableCardGroup/index.d.ts.map +1 -0
  11. package/dist/SelectableCardGroup/index.js +7 -0
  12. package/dist/index.d.ts +1 -2
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +4 -11
  15. package/dist/lab.css +0 -27
  16. package/package.json +5 -5
  17. package/src/Chart/ChartZoom.test.tsx +41 -2
  18. package/src/Chart/ChartZoom.tsx +12 -23
  19. package/src/CircularProgress/__tests__/CircularProgressMotion.a11y.chromium.spec.ts +33 -34
  20. package/src/Comments/CommentActions.tsx +7 -29
  21. package/src/Comments/Comments.test.tsx +32 -0
  22. package/src/SelectableCardGroup/SelectableCardGroup.doc.mjs +262 -0
  23. package/src/SelectableCardGroup/SelectableCardGroup.test.tsx +269 -0
  24. package/src/SelectableCardGroup/SelectableCardGroup.tsx +321 -0
  25. package/src/SelectableCardGroup/__tests__/SelectableCardGroupRadio.a11y.chromium.spec.ts +124 -0
  26. package/src/SelectableCardGroup/index.ts +14 -0
  27. package/src/index.ts +9 -18
  28. package/dist/MobilePowerSearch/MobilePowerSearch.d.ts +0 -154
  29. package/dist/MobilePowerSearch/MobilePowerSearch.d.ts.map +0 -1
  30. package/dist/MobilePowerSearch/MobilePowerSearch.js +0 -1738
  31. package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts +0 -42
  32. package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts.map +0 -1
  33. package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.js +0 -635
  34. package/dist/MobilePowerSearch/index.d.ts +0 -9
  35. package/dist/MobilePowerSearch/index.d.ts.map +0 -1
  36. package/dist/MobilePowerSearch/index.js +0 -11
  37. package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts +0 -91
  38. package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts.map +0 -1
  39. package/dist/MobilePowerSearch/mobilePowerSearchUtils.js +0 -454
  40. package/dist/MobileTokenizer/MobileTokenizer.d.ts +0 -92
  41. package/dist/MobileTokenizer/MobileTokenizer.d.ts.map +0 -1
  42. package/dist/MobileTokenizer/MobileTokenizer.js +0 -928
  43. package/dist/MobileTokenizer/index.d.ts +0 -9
  44. package/dist/MobileTokenizer/index.d.ts.map +0 -1
  45. package/dist/MobileTokenizer/index.js +0 -11
  46. package/dist/internal/MobileSheetConfirmation.d.ts +0 -12
  47. package/dist/internal/MobileSheetConfirmation.d.ts.map +0 -1
  48. package/dist/internal/MobileSheetConfirmation.js +0 -88
  49. package/dist/internal/useDismissSearchOnTouchDrag.d.ts +0 -21
  50. package/dist/internal/useDismissSearchOnTouchDrag.d.ts.map +0 -1
  51. package/dist/internal/useDismissSearchOnTouchDrag.js +0 -43
  52. package/src/MobilePowerSearch/MobilePowerSearch.doc.mjs +0 -160
  53. package/src/MobilePowerSearch/MobilePowerSearch.test.tsx +0 -2852
  54. package/src/MobilePowerSearch/MobilePowerSearch.tsx +0 -2375
  55. package/src/MobilePowerSearch/MobilePowerSearchValueEditor.tsx +0 -776
  56. package/src/MobilePowerSearch/index.ts +0 -13
  57. package/src/MobilePowerSearch/mobilePowerSearchUtils.ts +0 -591
  58. package/src/MobileTokenizer/MobileTokenizer.doc.mjs +0 -37
  59. package/src/MobileTokenizer/MobileTokenizer.test.tsx +0 -1348
  60. package/src/MobileTokenizer/MobileTokenizer.tsx +0 -1295
  61. package/src/MobileTokenizer/index.ts +0 -16
  62. package/src/internal/MobileSheetConfirmation.test.tsx +0 -68
  63. package/src/internal/MobileSheetConfirmation.tsx +0 -97
  64. package/src/internal/useDismissSearchOnTouchDrag.test.tsx +0 -94
  65. package/src/internal/useDismissSearchOnTouchDrag.ts +0 -57
@@ -1 +1 @@
1
- {"version":3,"file":"ChartZoom.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartZoom.tsx"],"names":[],"mappings":"AAmBA,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAC7B,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAErD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,mBAAmB,CAAC;CACvC;AAiDD,wBAAgB,SAAS,CAAC,EACxB,eAAe,EACf,eAAe,EACf,SAAe,EACf,KAAa,EACb,KAAa,EACb,OAAqB,GACtB,EAAE,cAAc,+BAwShB"}
1
+ {"version":3,"file":"ChartZoom.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartZoom.tsx"],"names":[],"mappings":"AAmBA,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAC7B,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAErD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,mBAAmB,CAAC;CACvC;AAiDD,wBAAgB,SAAS,CAAC,EACxB,eAAe,EACf,eAAe,EACf,SAAe,EACf,KAAa,EACb,KAAa,EACb,OAAqB,GACtB,EAAE,cAAc,+BA6RhB"}
@@ -7,10 +7,10 @@
7
7
  *
8
8
  * Zoom is aspect-ratio-normalized: both axes scale by the same visual
9
9
  * factor regardless of their domain ranges. Reset button restores
10
- * the initial domains captured on mount.
10
+ * the domains of the first render.
11
11
  */
12
12
 
13
- import { useCallback, useRef, useEffect } from 'react';
13
+ import { useCallback, useRef, useState } from 'react';
14
14
  import { createPortal } from 'react-dom';
15
15
  import { IconButton } from '@astryxdesign/core/IconButton';
16
16
  import { useChart } from "./ChartContext.js";
@@ -77,20 +77,10 @@ export function ChartZoom({
77
77
  yScale,
78
78
  svgRef
79
79
  } = useChart();
80
-
81
- // Capture initial domains on mount for reset
82
- const initialDomainsRef = useRef(null);
83
- useEffect(() => {
84
- if (initialDomainsRef.current) {
85
- return;
86
- } // only capture once
87
- const xDomain = isBandScale(xScale) ? null : xScale.domain();
88
- const yDomain = yScale.domain();
89
- initialDomainsRef.current = {
90
- x: xDomain,
91
- y: yDomain
92
- };
93
- }, [xScale, yScale]);
80
+ const [initialDomains] = useState(() => ({
81
+ x: isBandScale(xScale) ? null : xScale.domain(),
82
+ y: yScale.domain()
83
+ }));
94
84
  const dragRef = useRef(null);
95
85
  const pointersRef = useRef(new Map());
96
86
  const pinchRef = useRef(null);
@@ -219,15 +209,11 @@ export function ChartZoom({
219
209
  }
220
210
  }, []);
221
211
  const handleReset = useCallback(() => {
222
- const init = initialDomainsRef.current;
223
- if (!init) {
224
- return;
225
- }
226
- if (init.x) {
227
- onXDomainChange?.(init.x);
212
+ if (initialDomains.x) {
213
+ onXDomainChange?.(initialDomains.x);
228
214
  }
229
- onYDomainChange?.(init.y);
230
- }, [onXDomainChange, onYDomainChange]);
215
+ onYDomainChange?.(initialDomains.y);
216
+ }, [initialDomains, onXDomainChange, onYDomainChange]);
231
217
 
232
218
  // Toolbar portal target
233
219
  const portalTarget = svgRef.current?.parentElement;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @file CommentActions.tsx
3
- * @input Uses React, React DOM flushSync, StyleX, IconButton, Button, Tooltip,
4
- * ToggleButton, OverflowList, DropdownMenu, Popover, Text
3
+ * @input Uses React, React DOM flushSync, StyleX, useClipboard, IconButton,
4
+ * Button, Tooltip, ToggleButton, OverflowList, DropdownMenu, Popover, Text
5
5
  * @output Exports CommentActions (a comment's header actions), ReactionSummary
6
6
  * (its reaction toggles), and the action-lookup helpers rows use for focus
7
7
  * hand-offs
@@ -1 +1 @@
1
- {"version":3,"file":"CommentActions.d.ts","sourceRoot":"","sources":["../../src/Comments/CommentActions.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI/E,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAazC,OAAO,EAAkB,KAAK,UAAU,EAAC,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAkB,qBAAqB,EAAC,MAAM,SAAS,CAAC;AAoBpE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhF,oEAAoE;AACpE,MAAM,M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,KAAK,IAAI,CAAC;CACrD,sCA0CA;AAkDD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,EACT,SAAS,EACT,YAAY,EACZ,OAAO,EACP,OAAO,EACP,OAAO,EACP,aAAa,GACd,EAAE;IACD,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,sDAAsD;IACtD,SAAS,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,CACP,OAAO,EAAE,UAAU,EACnB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,qBAAqB,KAC3B,IAAI,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC1C,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,+BAuQA"}
@@ -4,18 +4,19 @@
4
4
 
5
5
  /**
6
6
  * @file CommentActions.tsx
7
- * @input Uses React, React DOM flushSync, StyleX, IconButton, Button, Tooltip,
8
- * ToggleButton, OverflowList, DropdownMenu, Popover, Text
7
+ * @input Uses React, React DOM flushSync, StyleX, useClipboard, IconButton,
8
+ * Button, Tooltip, ToggleButton, OverflowList, DropdownMenu, Popover, Text
9
9
  * @output Exports CommentActions (a comment's header actions), ReactionSummary
10
10
  * (its reaction toggles), and the action-lookup helpers rows use for focus
11
11
  * hand-offs
12
12
  * @position Internal parts of a comment row in the Comments family
13
13
  */
14
- import { useCallback, useEffect, useRef, useState } from 'react';
14
+ import { useCallback, useRef, useState } from 'react';
15
15
  import { flushSync } from 'react-dom';
16
16
  import * as stylex from '@stylexjs/stylex';
17
17
  import { Button } from '@astryxdesign/core/Button';
18
18
  import { DropdownMenu } from '@astryxdesign/core/DropdownMenu';
19
+ import { useClipboard } from '@astryxdesign/core/hooks';
19
20
  import { Icon } from '@astryxdesign/core/Icon';
20
21
  import { IconButton } from '@astryxdesign/core/IconButton';
21
22
  import { HStack, VStack } from '@astryxdesign/core/Layout';
@@ -31,7 +32,6 @@ import { reactionDescription } from "./i18n.js";
31
32
  import { CommentIcon } from "./icons.js";
32
33
  import { commentAnchorId } from "./utils.js";
33
34
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
34
- const LINK_COPIED_RESET_MS = 2_000;
35
35
  const MORE_MENU_MIN_WIDTH = `calc(${spacingVars['--spacing-8']} * 5)`;
36
36
  const styles = {
37
37
  actionsList: {
@@ -218,7 +218,10 @@ export function CommentActions({
218
218
  resolveAction
219
219
  }) {
220
220
  const t = useTranslator();
221
- const [isLinkCopied, setIsLinkCopied] = useState(false);
221
+ const {
222
+ copy: copyToClipboard,
223
+ isCopied: isLinkCopied
224
+ } = useClipboard();
222
225
  const [isLinkTooltipOpen, setIsLinkTooltipOpen] = useState(false);
223
226
  const [isPickerOpen, setIsPickerOpen] = useState(false);
224
227
  const [collapsed, setCollapsed] = useState(NO_COLLAPSED_ACTIONS);
@@ -236,24 +239,7 @@ export function CommentActions({
236
239
  }) : /*#__PURE__*/_jsx(CommentIcon, {
237
240
  name: "copyLink"
238
241
  });
239
- const copyCommentLink = async () => {
240
- if (navigator.clipboard == null) {
241
- return;
242
- }
243
- try {
244
- await navigator.clipboard.writeText(new URL(href, window.location.href).href);
245
- setIsLinkCopied(true);
246
- } catch {
247
- setIsLinkCopied(false);
248
- }
249
- };
250
- useEffect(() => {
251
- if (!isLinkCopied) {
252
- return;
253
- }
254
- const timer = window.setTimeout(() => setIsLinkCopied(false), LINK_COPIED_RESET_MS);
255
- return () => window.clearTimeout(timer);
256
- }, [isLinkCopied]);
242
+ const copyCommentLink = () => copyToClipboard(new URL(href, window.location.href).href);
257
243
  const changePicker = isOpen => {
258
244
  setIsPickerOpen(isOpen);
259
245
  onOpenChange(isOpen);
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @file SelectableCardGroup.tsx
3
+ * @input Uses core SelectableCard (its input set through Core's internal
4
+ * SelectableCardInputContext), Field (the group label and description),
5
+ * useFieldInputStyling, useId, StyleX and the spacing tokens
6
+ * @output Exports SelectableCardGroup, SelectableCardGroupItem and their props
7
+ * @position Lab: a set of selectable cards with the semantics of its selection
8
+ *
9
+ * SYNC: When modified, update these files to stay in sync:
10
+ * - ./SelectableCardGroup.doc.mjs (props, usage)
11
+ * - ./index.ts (exports)
12
+ * - /apps/storybook/stories/SelectableCardGroup.stories.tsx (stories)
13
+ */
14
+ import { type ReactNode, type Ref } from 'react';
15
+ import type { BaseProps } from '@astryxdesign/core';
16
+ import { type FieldContainerStyleProps } from '@astryxdesign/core/Field';
17
+ import { type SelectableCardProps } from '@astryxdesign/core/SelectableCard';
18
+ /** One chosen value, or none yet. */
19
+ interface SingleSelection {
20
+ /**
21
+ * `single` (the default): a radio group, one value. `multiple`: a group of
22
+ * checkboxes, any number of values.
23
+ */
24
+ selectionMode?: 'single';
25
+ /** The chosen card's value, or `null` while none is chosen. */
26
+ value: string | null;
27
+ /** Called with the value of the card the user chose. */
28
+ onChange: (value: string) => void;
29
+ }
30
+ /** Any number of chosen values. */
31
+ interface MultipleSelection {
32
+ selectionMode: 'multiple';
33
+ /** The chosen cards' values. */
34
+ value: ReadonlyArray<string>;
35
+ /** Called with the new list of chosen values. The newest choice is last. */
36
+ onChange: (value: string[]) => void;
37
+ }
38
+ export type SelectableCardGroupProps = Omit<BaseProps, 'onChange' | 'xstyle' | 'className' | 'style'> & FieldContainerStyleProps & (SingleSelection | MultipleSelection) & {
39
+ /** Ref forwarded to the group element (role radiogroup or group). */
40
+ ref?: Ref<HTMLDivElement>;
41
+ /** The group's visible label and accessible name. */
42
+ label: string;
43
+ /** Hides the label visually; it still names the group. */
44
+ isLabelHidden?: boolean;
45
+ /** Helper text under the label, linked to the group. */
46
+ description?: string;
47
+ /**
48
+ * The name the group's value is submitted under. The radios group by a
49
+ * generated name. Defaults to a generated one.
50
+ */
51
+ htmlName?: string;
52
+ /** Disables every card; they stay focusable and announce disabled. */
53
+ isDisabled?: boolean;
54
+ /**
55
+ * `horizontal` (the default) wraps cards in rows; `vertical` stacks them.
56
+ */
57
+ orientation?: 'horizontal' | 'vertical';
58
+ /** The SelectableCardGroupItem cards. */
59
+ children: ReactNode;
60
+ };
61
+ export interface SelectableCardGroupItemProps extends Omit<SelectableCardProps, 'isSelected' | 'onChange'> {
62
+ /** The value this card stands for in the group's `value`. */
63
+ value: string;
64
+ }
65
+ /**
66
+ * A set of selectable cards with the semantics of its selection: one choice
67
+ * is a radio group (one tab stop, arrow keys, "2 of 3" spoken), several are a
68
+ * group of checkboxes.
69
+ *
70
+ * @example
71
+ * ```
72
+ * <SelectableCardGroup label="Plan" value={plan} onChange={setPlan}>
73
+ * <SelectableCardGroupItem value="basic" label="Basic">Basic</SelectableCardGroupItem>
74
+ * <SelectableCardGroupItem value="pro" label="Pro">Pro</SelectableCardGroupItem>
75
+ * </SelectableCardGroup>
76
+ * ```
77
+ */
78
+ export declare function SelectableCardGroup(props: SelectableCardGroupProps): import("react").JSX.Element;
79
+ export declare namespace SelectableCardGroup {
80
+ var displayName: string;
81
+ }
82
+ /**
83
+ * One card of a SelectableCardGroup: a SelectableCard whose input, name and
84
+ * selection come from the group.
85
+ */
86
+ export declare function SelectableCardGroupItem({ value, isDisabled, ...props }: SelectableCardGroupItemProps): import("react").JSX.Element;
87
+ export declare namespace SelectableCardGroupItem {
88
+ var displayName: string;
89
+ }
90
+ export {};
91
+ //# sourceMappingURL=SelectableCardGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Selectable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E;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,yCAAyC;IACzC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEJ,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,mBAAmB,EACnB,YAAY,GAAG,UAAU,CAC1B;IACC,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;CACf;AAuBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,+BAsHlE;yBAtHe,mBAAmB;;;AA0HnC;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,UAAU,EACV,GAAG,KAAK,EACT,EAAE,4BAA4B,+BAmC9B;yBAvCe,uBAAuB"}
@@ -0,0 +1,205 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ /**
6
+ * @file SelectableCardGroup.tsx
7
+ * @input Uses core SelectableCard (its input set through Core's internal
8
+ * SelectableCardInputContext), Field (the group label and description),
9
+ * useFieldInputStyling, useId, StyleX and the spacing tokens
10
+ * @output Exports SelectableCardGroup, SelectableCardGroupItem and their props
11
+ * @position Lab: a set of selectable cards with the semantics of its selection
12
+ *
13
+ * SYNC: When modified, update these files to stay in sync:
14
+ * - ./SelectableCardGroup.doc.mjs (props, usage)
15
+ * - ./index.ts (exports)
16
+ * - /apps/storybook/stories/SelectableCardGroup.stories.tsx (stories)
17
+ */
18
+ import { createContext, useContext, useId, useMemo } from 'react';
19
+ import * as stylex from '@stylexjs/stylex';
20
+ import { Field } from '@astryxdesign/core/Field';
21
+ import { SelectableCard } from '@astryxdesign/core/SelectableCard';
22
+ import { SelectableCardInputContext, joinAriaIDs, useFieldInputStyling } from '@astryxdesign/core/internal/selectable-card';
23
+ import '@astryxdesign/core/theme/tokens.stylex';
24
+ import { spacingVars } from '@astryxdesign/core/theme/tokens.stylex';
25
+ import { mergeProps, themeProps } from '@astryxdesign/core/utils';
26
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
+ // =============================================================================
28
+ // Props
29
+ // =============================================================================
30
+
31
+ /** One chosen value, or none yet. */
32
+
33
+ /** Any number of chosen values. */
34
+
35
+ // It composes Field: root styling goes to the Field box through `container*`
36
+ // (the input-fields family), not onto the group.
37
+
38
+ // =============================================================================
39
+ // Context
40
+ // =============================================================================
41
+
42
+ const SelectableCardGroupContext = /*#__PURE__*/createContext(null);
43
+
44
+ // =============================================================================
45
+ // Components
46
+ // =============================================================================
47
+
48
+ /**
49
+ * A set of selectable cards with the semantics of its selection: one choice
50
+ * is a radio group (one tab stop, arrow keys, "2 of 3" spoken), several are a
51
+ * group of checkboxes.
52
+ *
53
+ * @example
54
+ * ```
55
+ * <SelectableCardGroup label="Plan" value={plan} onChange={setPlan}>
56
+ * <SelectableCardGroupItem value="basic" label="Basic">Basic</SelectableCardGroupItem>
57
+ * <SelectableCardGroupItem value="pro" label="Pro">Pro</SelectableCardGroupItem>
58
+ * </SelectableCardGroup>
59
+ * ```
60
+ */
61
+ export function SelectableCardGroup(props) {
62
+ const {
63
+ ref,
64
+ label,
65
+ isLabelHidden,
66
+ description,
67
+ htmlName,
68
+ isDisabled = false,
69
+ orientation = 'horizontal',
70
+ children,
71
+ containerXstyle,
72
+ containerClassName,
73
+ containerStyle,
74
+ selectionMode: _selectionMode,
75
+ value: _value,
76
+ onChange: _onChange,
77
+ ...rest
78
+ } = props;
79
+ const labelID = useId();
80
+ const inputID = useId();
81
+ const descriptionID = useId();
82
+ const generatedName = useId();
83
+ const submitName = htmlName ?? generatedName;
84
+ const {
85
+ rest: groupProps,
86
+ container
87
+ } = useFieldInputStyling('SelectableCardGroup', rest, {
88
+ containerXstyle,
89
+ containerClassName,
90
+ containerStyle
91
+ });
92
+ const {
93
+ 'aria-labelledby': callerLabelledBy,
94
+ 'aria-describedby': callerDescribedBy,
95
+ ...otherGroupProps
96
+ } = groupProps;
97
+ const labelledBy = joinAriaIDs(labelID, callerLabelledBy);
98
+ const describedBy = joinAriaIDs(description ? descriptionID : undefined, callerDescribedBy);
99
+ const isMultiple = props.selectionMode === 'multiple';
100
+ const context = useMemo(() => {
101
+ if (props.selectionMode === 'multiple') {
102
+ const {
103
+ value,
104
+ onChange
105
+ } = props;
106
+ return {
107
+ inputType: 'checkbox',
108
+ groupName: submitName,
109
+ submitName,
110
+ isDisabled,
111
+ isSelected: v => value.includes(v),
112
+ change: (v, isSelected) => onChange(isSelected ? [...value.filter(x => x !== v), v] : value.filter(x => x !== v))
113
+ };
114
+ }
115
+ const {
116
+ value,
117
+ onChange
118
+ } = props;
119
+ // The radios leave the form, so a page-unique name keeps each group
120
+ // apart, even from another form's group with the same `htmlName`.
121
+ return {
122
+ inputType: 'radio',
123
+ groupName: generatedName,
124
+ submitName,
125
+ isDisabled,
126
+ isSelected: v => value === v,
127
+ change: (v, isSelected) => {
128
+ if (isSelected) {
129
+ onChange(v);
130
+ }
131
+ }
132
+ };
133
+ }, [props.selectionMode, props.value, props.onChange, generatedName, submitName, isDisabled]);
134
+ return /*#__PURE__*/_jsx(Field, {
135
+ label: label,
136
+ isLabelHidden: isLabelHidden,
137
+ description: description,
138
+ inputID: inputID,
139
+ labelID: labelID,
140
+ isGroupLabel: true,
141
+ descriptionID: description ? descriptionID : undefined,
142
+ isDisabled: isDisabled,
143
+ ...container,
144
+ children: /*#__PURE__*/_jsx("div", {
145
+ ...otherGroupProps,
146
+ ref: ref,
147
+ role: isMultiple ? 'group' : 'radiogroup',
148
+ "aria-labelledby": labelledBy,
149
+ "aria-describedby": describedBy,
150
+ "aria-disabled": isDisabled || undefined,
151
+ ...mergeProps(themeProps('selectable-card-group', {
152
+ orientation,
153
+ selectionMode: isMultiple ? 'multiple' : 'single'
154
+ }), {
155
+ 0: {
156
+ className: "x78zum5 x1a02dak xjcht0a"
157
+ },
158
+ 1: {
159
+ className: "x78zum5 xjcht0a xdt5ytf xozqiw3"
160
+ }
161
+ }[!!(orientation === 'vertical') << 0]),
162
+ children: /*#__PURE__*/_jsx(SelectableCardGroupContext.Provider, {
163
+ value: context,
164
+ children: children
165
+ })
166
+ })
167
+ });
168
+ }
169
+ SelectableCardGroup.displayName = 'SelectableCardGroup';
170
+
171
+ /**
172
+ * One card of a SelectableCardGroup: a SelectableCard whose input, name and
173
+ * selection come from the group.
174
+ */
175
+ export function SelectableCardGroupItem({
176
+ value,
177
+ isDisabled,
178
+ ...props
179
+ }) {
180
+ const group = useContext(SelectableCardGroupContext);
181
+ const input = useMemo(() => group == null ? null : {
182
+ type: group.inputType,
183
+ name: group.groupName,
184
+ value
185
+ }, [group, value]);
186
+ if (group == null) {
187
+ throw new Error('SelectableCardGroupItem must be rendered inside a SelectableCardGroup.');
188
+ }
189
+ const isSelected = group.isSelected(value);
190
+ const isCardDisabled = group.isDisabled || isDisabled === true;
191
+ return /*#__PURE__*/_jsxs(SelectableCardInputContext, {
192
+ value: input,
193
+ children: [/*#__PURE__*/_jsx(SelectableCard, {
194
+ ...props,
195
+ isSelected: isSelected,
196
+ isDisabled: isCardDisabled,
197
+ onChange: nextSelected => group.change(value, nextSelected)
198
+ }), group.inputType === 'radio' && isSelected && !isCardDisabled ? /*#__PURE__*/_jsx("input", {
199
+ type: "hidden",
200
+ name: group.submitName,
201
+ value: value
202
+ }) : null]
203
+ });
204
+ }
205
+ SelectableCardGroupItem.displayName = 'SelectableCardGroupItem';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @file SelectableCardGroup component barrel export
3
+ */
4
+ export { SelectableCardGroup, SelectableCardGroupItem, } from './SelectableCardGroup.js';
5
+ export type { SelectableCardGroupProps, SelectableCardGroupItemProps, } from './SelectableCardGroup.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SelectableCardGroup/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EACL,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file SelectableCardGroup component barrel export
5
+ */
6
+
7
+ export { SelectableCardGroup, SelectableCardGroupItem } from "./SelectableCardGroup.js";
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  export { CodeEditor, type CodeEditorProps } from './CodeEditor/index.js';
13
13
  export { tokenize, tokenizeAsync, SYNC_TOKENIZE_THRESHOLD, type SyntaxToken, } from '@astryxdesign/core/CodeBlock';
14
14
  export { InfoTip, type InfoTipProps, type InfoTipSize } from './InfoTip/index.js';
15
+ export { SelectableCardGroup, SelectableCardGroupItem, type SelectableCardGroupProps, type SelectableCardGroupItemProps, } from './SelectableCardGroup/index.js';
15
16
  export { EmojiPicker, DEFAULT_FREQUENT_EMOJIS, type EmojiPickerProps, type EmojiOption, type EmojiCategory, } from './EmojiPicker/index.js';
16
17
  export { CommentPin, type CommentPinParticipant, type CommentPinProps, } from './CommentPin/index.js';
17
18
  export { Comments, type CommentsProps, CommentThread, type CommentThreadProps, CommentComposer, type CommentComposerProps, DEFAULT_COMMENT_REACTIONS, COMMENT_ICON_KEYS, type CommentAgentCommand, type CommentAnchor, type CommentComposerContext, type CommentComposerRenderProps, type CommentData, type CommentStatus, type CommentHighlightColor, type CommentImageUploader, type CommentMode, type CommentProgress, type CommentReaction, type CommentReactionOption, type CommentThreadData, type CommentThreadSharedProps, type CommentUploadedImage, type CommentUser, type CommentVersion, type CommentActivityEvent, } from './Comments/index.js';
@@ -31,6 +32,4 @@ export * from './CircularProgress/index.js';
31
32
  export * from './ListInput/index.js';
32
33
  export { LogStream, type LogStreamProps, type LogEntry, type LogStreamLevel, } from './LogStream/index.js';
33
34
  export { DiffViewer, parseUnifiedDiff, createDiffFile, type DiffViewerProps, type DiffViewerViewMode, type CreateDiffFileOptions, type DiffViewerChangeIndicator, type DiffViewerInlineHighlight, type DiffViewerFile, type DiffViewerFileStatus, type DiffViewerHunk, type DiffViewerLine, type DiffViewerLineKind, type DiffViewerLineRef, type DiffViewerSide, } from './DiffViewer/index.js';
34
- export { MobileTokenizer, type MobileTokenizerProps, type MobileTokenizerChange, } from './MobileTokenizer/index.js';
35
- export { MobilePowerSearch, type MobilePowerSearchProps, } from './MobilePowerSearch/index.js';
36
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,QAAQ,EACR,aAAa,EACb,uBAAuB,EACvB,KAAK,WAAW,GACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,WAAW,CAAC;AAGvE,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,UAAU,EACV,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,eA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,UAAU,CAAC;AAGlB,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,SAAS,EACT,KAAK,cAAc,EACnB,WAAW,EACX,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,UAAU,EACV,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,eAAe,EACpB,WAAW,EACX,KAAK,gBAAgB,EACrB,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAIlB,cAAc,oBAAoB,CAAC;AAGnC,cAAc,aAAa,CAAC;AAG5B,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -19,6 +19,10 @@ export { tokenize, tokenizeAsync, SYNC_TOKENIZE_THRESHOLD } from '@astryxdesign/
19
19
  // InfoTip — accessible info-icon help affordance (RFC meta/astryx#3349)
20
20
  export { InfoTip } from "./InfoTip/index.js";
21
21
 
22
+ // SelectableCardGroup — a set of selectable cards with the semantics of its
23
+ // selection: one choice is a radio group, several a group of checkboxes
24
+ export { SelectableCardGroup, SelectableCardGroupItem } from "./SelectableCardGroup/index.js";
25
+
22
26
  // EmojiPicker — standalone searchable emoji panel
23
27
  export { EmojiPicker, DEFAULT_FREQUENT_EMOJIS } from "./EmojiPicker/index.js";
24
28
 
@@ -75,17 +79,6 @@ export { LogStream } from "./LogStream/index.js";
75
79
  // DiffViewer — read-only file diff (unified/split) for code review surfaces
76
80
  export { DiffViewer, parseUnifiedDiff, createDiffFile } from "./DiffViewer/index.js";
77
81
 
78
- // MobileTokenizer — Lab prototype (stack layer 1) of the touch Tokenizer
79
- // flow: summary trigger + stacked manage/add BottomSheets. Graduates to
80
- // Core Tokenizer presentation="bottom-sheet" (stack layer 2).
81
- export { MobileTokenizer } from "./MobileTokenizer/index.js";
82
-
83
- // MobilePowerSearch — Lab prototype (stack layer 1) of the touch PowerSearch
84
- // flow: field-wide "Manage filters" trigger with display-only tokens, a
85
- // Filters sheet, and a field → operator → value drill-down. The caller picks
86
- // it explicitly on touch layouts; the API mirrors Core PowerSearch.
87
- export { MobilePowerSearch } from "./MobilePowerSearch/index.js";
88
-
89
82
  // RichTextEditor (RFC meta/astryx#3899) moved out of @astryxdesign/lab into
90
83
  // its own package, @astryxdesign/richtext. Import it from there:
91
84
  // import {RichTextEditor, RichTextView} from '@astryxdesign/richtext';