@senvenli/react 0.3.3 → 0.3.4

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 (93) hide show
  1. package/dist/action/fab.d.ts +7 -0
  2. package/dist/action/fab.js +22 -3
  3. package/dist/action/fab.js.map +1 -1
  4. package/dist/collection/data-table.d.ts +1 -1
  5. package/dist/collection/data-table.js +2 -2
  6. package/dist/collection/data-table.js.map +1 -1
  7. package/dist/collection/table.d.ts +7 -2
  8. package/dist/collection/table.js +17 -7
  9. package/dist/collection/table.js.map +1 -1
  10. package/dist/i18n.d.ts +8 -0
  11. package/dist/i18n.js +18 -1
  12. package/dist/i18n.js.map +1 -1
  13. package/dist/navigation/index.d.ts +2 -2
  14. package/dist/navigation/index.js +1 -1
  15. package/dist/navigation/index.js.map +1 -1
  16. package/dist/navigation/sidebar.d.ts +18 -0
  17. package/dist/navigation/sidebar.js +26 -2
  18. package/dist/navigation/sidebar.js.map +1 -1
  19. package/dist/overlay/floating.js +4 -1
  20. package/dist/overlay/floating.js.map +1 -1
  21. package/dist/overlay/index.d.ts +2 -0
  22. package/dist/overlay/index.js +2 -1
  23. package/dist/overlay/index.js.map +1 -1
  24. package/dist/overlay/tour.d.ts +88 -0
  25. package/dist/overlay/tour.js +302 -0
  26. package/dist/overlay/tour.js.map +1 -0
  27. package/package.json +2 -2
  28. package/dist/action/files.d.ts +0 -70
  29. package/dist/action/files.js +0 -156
  30. package/dist/action/files.js.map +0 -1
  31. package/dist/action/theme-toggle.d.ts +0 -43
  32. package/dist/action/theme-toggle.js +0 -259
  33. package/dist/action/theme-toggle.js.map +0 -1
  34. package/dist/display/image-crop.d.ts +0 -106
  35. package/dist/display/image-crop.js +0 -117
  36. package/dist/display/image-crop.js.map +0 -1
  37. package/dist/display/image-cropper.d.ts +0 -68
  38. package/dist/display/image-cropper.js +0 -284
  39. package/dist/display/image-cropper.js.map +0 -1
  40. package/dist/display/lozenge.d.ts +0 -30
  41. package/dist/display/lozenge.js +0 -55
  42. package/dist/display/lozenge.js.map +0 -1
  43. package/dist/display/scroll-area.d.ts +0 -29
  44. package/dist/display/scroll-area.js +0 -95
  45. package/dist/display/scroll-area.js.map +0 -1
  46. package/dist/feedback/cooldown.d.ts +0 -17
  47. package/dist/feedback/cooldown.js +0 -59
  48. package/dist/feedback/cooldown.js.map +0 -1
  49. package/dist/feedback/status-dot.d.ts +0 -23
  50. package/dist/feedback/status-dot.js +0 -37
  51. package/dist/feedback/status-dot.js.map +0 -1
  52. package/dist/form/input-otp.d.ts +0 -35
  53. package/dist/form/input-otp.js +0 -83
  54. package/dist/form/input-otp.js.map +0 -1
  55. package/dist/layout/auth-form-layout.d.ts +0 -71
  56. package/dist/layout/auth-form-layout.js +0 -61
  57. package/dist/layout/auth-form-layout.js.map +0 -1
  58. package/dist/layout/auth-layout.d.ts +0 -59
  59. package/dist/layout/auth-layout.js +0 -26
  60. package/dist/layout/auth-layout.js.map +0 -1
  61. package/dist/layout/pressable.d.ts +0 -40
  62. package/dist/layout/pressable.js +0 -65
  63. package/dist/layout/pressable.js.map +0 -1
  64. package/dist/layout/reset-sent-card.d.ts +0 -39
  65. package/dist/layout/reset-sent-card.js +0 -22
  66. package/dist/layout/reset-sent-card.js.map +0 -1
  67. package/dist/navigation/dock.d.ts +0 -27
  68. package/dist/navigation/dock.js +0 -47
  69. package/dist/navigation/dock.js.map +0 -1
  70. package/dist/navigation/footer.d.ts +0 -43
  71. package/dist/navigation/footer.js +0 -43
  72. package/dist/navigation/footer.js.map +0 -1
  73. package/dist/navigation/language-names.d.ts +0 -19
  74. package/dist/navigation/language-names.js +0 -79
  75. package/dist/navigation/language-names.js.map +0 -1
  76. package/dist/navigation/language-switcher.d.ts +0 -55
  77. package/dist/navigation/language-switcher.js +0 -53
  78. package/dist/navigation/language-switcher.js.map +0 -1
  79. package/dist/navigation/panel-header.d.ts +0 -37
  80. package/dist/navigation/panel-header.js +0 -50
  81. package/dist/navigation/panel-header.js.map +0 -1
  82. package/dist/navigation/toolbar.d.ts +0 -37
  83. package/dist/navigation/toolbar.js +0 -334
  84. package/dist/navigation/toolbar.js.map +0 -1
  85. package/dist/overlay/command-palette.d.ts +0 -53
  86. package/dist/overlay/command-palette.js +0 -130
  87. package/dist/overlay/command-palette.js.map +0 -1
  88. package/dist/overlay/overlay.d.ts +0 -299
  89. package/dist/overlay/overlay.js +0 -558
  90. package/dist/overlay/overlay.js.map +0 -1
  91. package/dist/selection/radio-card.d.ts +0 -31
  92. package/dist/selection/radio-card.js +0 -29
  93. package/dist/selection/radio-card.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"overlay.js","sourceRoot":"","sources":["../../src/overlay/overlay.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,IAAI,UAAU,EACpB,aAAa,IAAI,iBAAiB,EAClC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,0BAA0B,EAC1B,SAAS,GAEV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAoB,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO;AACL,6FAA6F;AAC7F,WAAW,IAAI,kBAAkB,EACjC,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAcjB,MAAM,YAAY,GAAgC;IAChD,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,WAAW;CACpB,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EACvB,SAAS,EAAE,EAAE,CACX,8DAA8D;oCAC9D,wEAAwE;oCACxE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,+DAA+D,CACvF,YAEA,QAAQ,GACL,EACL,MAAM,IAAI,CACT,2BACY,eAAe,EACzB,SAAS,EAAC,gKAAgK,YAEzK,MAAM,GACH,CACP,IAC2B,GACZ,EAClB,KAAC,aAAa,IACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAC9B,SAAS,EAAE,GAAG,EAAE;4BACd,SAAS,CAAC,KAAK,CAAC,CAAC;4BACjB,KAAK,CAAC,KAAK,EAAE,CAAC;wBAChB,CAAC,GACD,IACS,GACP,GACK,CAChB,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n Dialog as AriaDialog,\n DialogTrigger as AriaDialogTrigger,\n Heading,\n Modal,\n ModalOverlay,\n OverlayTriggerStateContext,\n useLocale,\n type DialogTriggerProps,\n} from \"react-aria-components\";\n\nimport { cn } from \"../utils\";\nimport { Button, type ButtonProps } from \"../action/button\";\nimport { CloseButton } from \"../action/close-button\";\nimport { IconGlyph, type IconName } from \"../display/icon\";\nimport { TextField } from \"../form/text-field\";\nimport {\n // The prop of the same name (AlertDialog's `cancelLabel`) takes the plain name in this file.\n cancelLabel as defaultCancelLabel,\n collapseSheetLabel,\n discardCloseLabel,\n expandSheetLabel,\n keepEditingLabel,\n typeToConfirmLabel,\n unsavedBodyLabel,\n unsavedTitleLabel,\n} from \"../i18n\";\n\n/**\n * One size dictionary for Dialog and Drawer: small, medium, large. A dialog is 440, 600 or\n * 800px wide; a drawer is 380 or 560px (it has no medium; medium reads as large).\n */\nexport type OverlaySize = \"small\" | \"medium\" | \"large\";\n\n/**\n * `xlarge` is Dialog's only: 1152px, for a two- or three-column form over the page it edits\n * (an order edit). Below that it takes the viewport less the frame's padding, as every size does.\n */\ntype DialogWidth = OverlaySize | \"xlarge\";\n\nconst DIALOG_WIDTH: Record<DialogWidth, string> = {\n small: \"max-w-110\",\n medium: \"max-w-150\",\n large: \"max-w-200\",\n xlarge: \"max-w-288\",\n};\nconst DRAWER_WIDTH: Record<OverlaySize, string> = {\n small: \"w-95\",\n medium: \"w-140\",\n large: \"w-140\",\n};\n\n/** The scrim: `ds-blanket`, fading in `ds-duration-slow`; still for reduced motion. */\nconst BLANKET =\n \"fixed inset-0 z-50 bg-ds-blanket transition-opacity duration-(--ds-duration-slow) ease-ds-enter \" +\n \"data-[entering]:opacity-0 data-[exiting]:opacity-0 data-[exiting]:ease-ds-exit motion-reduce:transition-none\";\n\n/** Every overlay's inner focus target: React Aria's dialog element, never outlined itself. */\nconst DIALOG_ELEMENT = \"flex min-h-0 flex-1 flex-col outline-hidden\";\n\ntype TriggerState = NonNullable<React.ContextType<typeof OverlayTriggerStateContext>>;\n\n/**\n * The state of the DialogTrigger an overlay belongs to. React Aria's own context is also provided by every\n * open modal, so a Dialog nested in a Drawer would bind to the drawer; this one is set by DialogTrigger only\n * and cleared inside every overlay.\n */\nconst OwnTriggerContext = React.createContext<TriggerState | null>(null);\n\nfunction TriggerBridge({ children }: { children: React.ReactNode }) {\n const state = React.useContext(OverlayTriggerStateContext);\n return <OwnTriggerContext.Provider value={state}>{children}</OwnTriggerContext.Provider>;\n}\n\n/** True inside an open overlay's contents, where React Aria's trigger context is that overlay's own. */\nconst InsideOverlayContext = React.createContext(false);\n\n/** Overlay contents: a nested overlay must not see the outer one's trigger. */\nexport function OverlayContents({ children }: { children: React.ReactNode }) {\n return (\n <InsideOverlayContext.Provider value>\n <OwnTriggerContext.Provider value={null}>{children}</OwnTriggerContext.Provider>\n </InsideOverlayContext.Provider>\n );\n}\n\n/**\n * The button that opens a Dialog, AlertDialog or Drawer: put it first, the overlay after it. Inside another\n * overlay (a Dialog in a Drawer) use this one, not React Aria's own DialogTrigger, which there only sees the\n * outer overlay's state.\n */\nexport function DialogTrigger({ children, ...props }: DialogTriggerProps) {\n return (\n <AriaDialogTrigger {...props}>\n <TriggerBridge>{children}</TriggerBridge>\n </AriaDialogTrigger>\n );\n}\n\ntype OpenProps = {\n /**\n * Open without a DialogTrigger (a URL, a row click). Inside a DialogTrigger, put `onOpenChange` on the\n * trigger instead: the trigger owns the state there.\n */\n isOpen?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n};\n\n/**\n * Open state for an overlay that can sit in a DialogTrigger or stand alone. Inside a trigger the trigger's\n * state is used; otherwise `isOpen`/`defaultOpen`. `close` is the one way to close, so `onOpenChange(false)`\n * fires once whichever control asked (button, Esc, scrim).\n */\nfunction useOverlayOpen({ isOpen, defaultOpen, onOpenChange }: OpenProps) {\n const ownTrigger = React.useContext(OwnTriggerContext);\n const ariaTrigger = React.useContext(OverlayTriggerStateContext);\n const inside = React.useContext(InsideOverlayContext);\n // Our DialogTrigger first; React Aria's own DialogTrigger also works, except inside another overlay, where\n // that context belongs to the outer overlay.\n const trigger = ownTrigger ?? (inside ? null : ariaTrigger);\n const [own, setOwn] = React.useState(defaultOpen ?? false);\n const open = trigger ? trigger.isOpen : (isOpen ?? own);\n const set = (next: boolean) => {\n if (trigger) {\n if (next) trigger.open();\n else trigger.close();\n return;\n }\n if (isOpen === undefined) setOwn(next);\n onOpenChange?.(next);\n };\n return { isOpen: open, open: () => set(true), close: () => set(false) };\n}\n\n/**\n * `isDisabled`: the action cannot be pressed yet, e.g. until the form is valid.\n * `iconBefore` / `iconAfter`: a Lucide icon beside the label (\"Continue\" with `arrow-right`), as on\n * Button. The label is always shown and is the button's name, so the icon is decorative (`aria-hidden`); the\n * button keeps its size and focus ring. Left out, the button's DOM is unchanged.\n */\nexport type DialogAction = Pick<ButtonProps, \"isPending\" | \"isDisabled\" | \"iconBefore\" | \"iconAfter\"> & DataAttributes & {\n /** The verb of the title: \"Cancel order\", never \"OK\". */\n label: string;\n variant?: \"primary\" | \"danger\";\n onPress?: () => void;\n /**\n * The `id` of the form this action submits: the button becomes `type=\"submit\"` with that `form`\n * attribute, so it submits the form from the footer, outside the form element, and Enter in one of the form's\n * fields submits it too (the browser's implicit submission). Handle the submit in the form's `onSubmit`;\n * `onPress`, when given, still runs first. `isDisabled` keeps the form from submitting (click or Enter), and\n * so does `isPending`: while pending, a submit of that form is stopped before it reaches `onSubmit`, so the\n * action never runs twice. Left out, the button is `type=\"button\"` as before.\n *\n * The id must be unique on the page. With two forms of that id, the browser's `form=` targets the first one in\n * document order, and the pending block also stops a submit of a same-id form outside the dialog.\n */\n form?: string;\n};\n\n/**\n * `data-*` attributes, such as `data-testid`, passed through to a part of the dialog. `data-slot`\n * (and the footer's `data-layout`) is the DS's own and is never overridden. Not exported: the props that take it name it.\n */\ntype DataAttributes = { [name: `data-${string}`]: string | number | boolean | undefined };\n\n/** The `data-*` entries of a props object, without the DS's own `data-slot`. */\nfunction dataAttributes(source: object | null | undefined): DataAttributes {\n const picked: DataAttributes = {};\n if (!source) return picked;\n for (const [name, value] of Object.entries(source)) {\n if (name.startsWith(\"data-\") && name !== \"data-slot\") picked[name as `data-${string}`] = value as DataAttributes[`data-${string}`];\n }\n return picked;\n}\n\n/** The secondary action: \"Cancel\" (closing) unless given a label or a handler. Not exported: DialogProps[\"secondaryAction\"] names it. */\ntype DialogSecondaryAction = Pick<ButtonProps, \"iconBefore\" | \"iconAfter\"> & DataAttributes & {\n label?: string;\n onPress?: () => void;\n isDisabled?: boolean;\n};\n\nexport type DialogProps = OpenProps & DataAttributes & {\n title: React.ReactNode;\n /**\n * One short line under the title: what the dialog is about. When given, the dialog is\n * described by it (`aria-describedby`); without it (or with `\"\"`, `false`, `null`) nothing is rendered.\n */\n description?: React.ReactNode;\n children: React.ReactNode;\n primaryAction?: DialogAction;\n /**\n * \"Cancel\" by default, closing the dialog; pass a label or a handler to change it. `isDisabled`\n * blocks it, e.g. while the primary action runs; `iconBefore` / `iconAfter` add a\n * decorative icon. `null` leaves it out: a\n * full-screen dialog whose steps carry their own buttons, or a locked completion view, has no secondary action,\n * and with no `primaryAction` either it has no footer at all (the body then takes the bottom padding, and on\n * `fullscreen` reaches down to the home indicator). With `null` and a `danger` primary there is no safe button\n * to focus first, so focus goes to the body's first field (as for any other dialog), or to the dialog itself\n * when the body has none. `data-*` keys reach the button.\n */\n secondaryAction?: DialogSecondaryAction | null;\n /**\n * Leaves out the close button in the header, and does nothing else: Esc and a press outside\n * still follow `isDismissable`. A locked view the user must not dismiss before the flow ends, such as a\n * completion step, sets both: `isCloseButtonHidden` and `isDismissable={false}`. It then closes only when the\n * app closes it (`isOpen`/`onOpenChange`, or an action whose handler does) or through the secondary action, when\n * there is one; a locked dialog inside a DialogTrigger has no close handle, so control it with `isOpen`. Focus\n * stays trapped inside and the title still names the dialog. Give it a way on (a `primaryAction` or a control\n * in the body): with the close button hidden and nothing a keyboard can reach inside, the dialog warns in\n * development (with `isDismissable` Esc still closes it, but a touch user on `fullscreen` has no press outside).\n */\n isCloseButtonHidden?: boolean;\n /**\n * The element that takes focus when the dialog opens, in place of the DS rule (the first field,\n * or the secondary action before a `danger` primary). Pass a ref to an element inside the dialog. Left\n * out, or empty when the dialog opens, the rule applies as before.\n *\n * The ref keeps focus only if, once the dialog calls its `focus()`, focus is on that element or inside it;\n * otherwise the rule applies after all. So a ref to an element that cannot take focus (a container without a\n * `tabIndex`, a hidden title) falls through to the rule, and so does a ref whose own focus handler moves focus\n * to an element outside it: the rule then moves focus again, to the safe action or the first field (with\n * neither, focus stays where the handler put it). A handler that moves focus to an element inside the ref keeps\n * it there. To open on a container, give it `tabIndex={-1}`; to open on another element, pass that element's ref.\n */\n initialFocusRef?: React.RefObject<HTMLElement | null>;\n /**\n * Where focus goes when the dialog closes, in place of the element that opened it (the\n * trigger): the next step's heading, or a control that stays when the trigger is gone. Read when the dialog\n * closes, so it may point at an element mounted by then. If the app has already moved focus elsewhere on\n * close, it stays there; if the ref is empty, focus returns to the trigger as before.\n */\n returnFocusRef?: React.RefObject<HTMLElement | null>;\n /**\n * A ref to the title's heading, for an app that puts focus on the title: on open (a completion view,\n * \"Password saved\"), or when the dialog's content moves to its next step. Given, the heading takes\n * `tabIndex={-1}`: focusable from code (`titleRef.current.focus()`), never a Tab stop, and a pointer press on it\n * focuses it. It stays the dialog's heading (`role` heading, level 2) and its name (`aria-labelledby`), so a screen\n * reader reads \"heading\" with the title when focus lands on it.\n *\n * To open on the title, pass the same ref as `initialFocusRef` (`initialFocusRef={titleRef}`): that ref comes first\n * on open, before the first field and the safe secondary action, as for any other element. The title shows the DS\n * focus ring only for keyboard focus (`:focus-visible`), never for a pointer user's; focus on close returns as\n * before (`returnFocusRef`, or the trigger). Left out, the heading renders exactly as before.\n *\n * A hidden title (`isTitleHidden`, fullscreen) is never a focus target: it is `sr-only`, so focus on it would show\n * no indicator. With `isTitleHidden` the ref still holds the heading, but it takes no `tabIndex` and no focus ring,\n * so `titleRef.current.focus()` does nothing and `initialFocusRef={titleRef}` falls through to the dialog's own\n * rule (the first field, or the safe secondary action). To land on something there, aim at a visible element\n * instead: the first field (the default), or a visible heading or control in the body via `initialFocusRef`.\n */\n titleRef?: React.Ref<HTMLHeadingElement>;\n /**\n * `data-*` attributes for the dialog's parts: `header`, `title`, `body`, `footer` and the\n * `close` button. The dialog itself (`role=\"dialog\"`, `data-slot=\"dialog\"`) takes the `data-*` props given to\n * Dialog (`data-testid=\"set-password\"`); the actions take theirs on `primaryAction` / `secondaryAction`. The\n * footer's `data-layout` (`spread`) is the DS's own, like `data-slot`: `partData.footer` cannot set it.\n */\n partData?: Partial<Record<\"header\" | \"title\" | \"body\" | \"footer\" | \"close\", DataAttributes>>;\n /**\n * `small` (default, 440px), `medium` (600px) or `large` (800px); `xlarge` (1152px) for a form in two\n * or three columns over the page it edits, such as an order edit; or `fullscreen` for a long\n * task that needs the whole screen, such as a signup: it fills the viewport at every width, slides up as a sheet\n * on phones (below 640px) and fades in above. The header (title, close) and the footer (actions) stay put, clear\n * of the notch and the home indicator, while the body scrolls between them. Below its width every size but\n * `fullscreen` takes the viewport less 24px a side, and its body scrolls inside 100dvh less 48px. Focus, Esc and\n * naming are the same at every size.\n */\n size?: OverlaySize | \"xlarge\" | \"fullscreen\";\n /**\n * Scrim click and Esc close it (default). Off for destructive flows with typed input. A `fullscreen`\n * dialog has no scrim, so a press outside it (a toast or banner layered above) never closes it; there\n * this prop controls Esc only. It is independent of `isCloseButtonHidden`: a locked view sets\n * both, `isCloseButtonHidden` and `isDismissable={false}`; a locked dialog inside a DialogTrigger has no close\n * handle, so control it with `isOpen`.\n */\n isDismissable?: boolean;\n /**\n * `fullscreen` only. How the footer places its actions: `end` (default) groups them at the\n * inline end; `spread` puts the secondary action at the inline start and the primary at the inline end\n * (\"Back\" … \"Continue\"), mirrored in RTL. A lone primary action stays at the end; a lone secondary action\n * (no `primaryAction`) sits at the inline start.\n */\n footerLayout?: \"end\" | \"spread\";\n /**\n * `fullscreen` only. Shown before the title in the header, such as the product's logo. The\n * title then keeps to one line and truncates with an ellipsis (its full text is still the dialog's name);\n * the close button keeps its place at the inline end.\n */\n headerStart?: React.ReactNode;\n /**\n * `fullscreen` only. Hides the title visually, for a frame whose header shows a logo instead;\n * the title stays in the DOM and still names the dialog (`aria-labelledby`), so `title` is still required.\n * A description, when given, stays visible. An empty title (`\"\"`, blank, `null`, `false`) would leave the dialog\n * unnamed, and warns in development.\n */\n isTitleHidden?: boolean;\n};\n\n/**\n * Focus on open: the first field of the body, or the secondary action when the primary one destroys\n * something. Runs after React Aria's own first-focus, so it wins. A destructive primary with no secondary\n * (`secondaryAction={null}` on a full-screen dialog) has no safe button to start on, so focus goes to the first\n * field as it does for any other dialog, and to the dialog itself when the body has none. The\n * app's `initialFocusRef`, when it holds an element, comes before every rule.\n */\nfunction useInitialFocus(\n body: React.RefObject<HTMLElement | null>,\n secondary: React.RefObject<HTMLElement | null>,\n safeFirst: boolean,\n initial?: React.RefObject<HTMLElement | null>,\n) {\n React.useEffect(() => {\n if (initial?.current) {\n initial.current.focus();\n // An element that cannot take focus (a hidden title, which has no tabIndex; UI#528 review, or a\n // container without one) leaves focus where it was, and a focus handler on the ref may move it\n // outside: in both cases the dialog's own rule below picks the target instead (UI#529 review).\n if (initial.current.contains(document.activeElement)) return;\n }\n if (safeFirst && secondary.current) {\n secondary.current.focus();\n return;\n }\n const field = [...(body.current?.querySelectorAll<HTMLElement>(FIRST_FIELD) ?? [])].find(isReachableField);\n field?.focus();\n }, []);\n}\n\n/**\n * A field the dialog may start on: a text input, a text area, a native select, a combobox, a date or time segment,\n * or a Select or MultiSelect's button (it opens a listbox). In document order.\n */\nconst FIRST_FIELD =\n \"input:not([type='hidden']):not([disabled]), textarea:not([disabled]), select:not([disabled]), [role='combobox'], [role='spinbutton'][tabindex], \" +\n \"button[aria-haspopup='listbox']:not([disabled])\";\n\n/**\n * Not the native fields React Aria keeps for forms and autofill behind a Select (its hidden `<select>` and input),\n * which are hidden from assistive tech, marked to take no focus and out of the tab order: the dialog\n * started on that `<select>` and not on the Select's button. Anything under `aria-hidden` or `inert`, or with a\n * negative tabindex on a native field, is passed over.\n */\nfunction isReachableField(element: HTMLElement) {\n if (element.closest(\"[aria-hidden='true'], [inert], [data-react-aria-prevent-focus]\")) return false;\n if (element.matches(\"input, textarea, select\") && element.tabIndex < 0) return false;\n return true;\n}\n\n/** React Aria's FocusScope dispatches this on the element it is about to give focus back to; cancelling it stops that. */\nconst RESTORE_FOCUS_EVENT = \"react-aria-focus-scope-restore\";\n\n/**\n * `returnFocusRef`: when the dialog's contents unmount (it closed), focus goes to the ref's element\n * instead of the opener. React Aria's own return to the opener is cancelled for that one close, so the opener\n * never flashes focus (and its focus handlers never run). Focus the app moved elsewhere on purpose is left alone.\n * Without the ref, or with it empty, nothing here runs and React Aria returns focus to the opener as before.\n */\nfunction useReturnFocus(target: React.RefObject<HTMLElement | null> | undefined) {\n const latest = React.useRef(target);\n latest.current = target;\n // The element focused as the dialog opens is the one React Aria would return to.\n const [opener] = React.useState(() => (typeof document === \"undefined\" ? null : document.activeElement));\n // Strict Mode unmounts and remounts effects once in development: that is not a close.\n const mounted = React.useRef(false);\n React.useLayoutEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n if (!latest.current) return;\n const ref = latest.current;\n const cancel = (event: Event) => {\n if (!mounted.current && ref.current && event.target === opener) event.preventDefault();\n };\n document.addEventListener(RESTORE_FOCUS_EVENT, cancel, true);\n requestAnimationFrame(() => {\n document.removeEventListener(RESTORE_FOCUS_EVENT, cancel, true);\n if (mounted.current) return;\n const element = ref.current;\n const active = document.activeElement;\n const unclaimed = !active || active === document.body || active === opener || !active.isConnected;\n if (element?.isConnected && unclaimed) element.focus();\n });\n };\n }, [opener]);\n}\n\n/**\n * A form-submit primary while pending: React Aria turns the button into `type=\"button\"`, so a click\n * no longer submits, but Enter in a form with one field still would (HTML's implicit submission needs no\n * button). Every submit of that form is stopped here until the action settles, before React's `onSubmit` sees it.\n * The listener sits on `document` (capture) and matches the form by its id when the submit happens, so a form\n * remounted with the same id while pending is stopped too; another form still submits. React's capture\n * handlers on the form (`onSubmitCapture`) still run while pending: the event is cancelled on `document` but\n * stopped only on the form itself, after React's root has seen its capture phase and before its bubble.\n */\nfunction useBlockedSubmit(formId: string | undefined, blocked: boolean) {\n React.useEffect(() => {\n if (!formId || !blocked) return;\n const stopAtForm = (event: Event) => event.stopPropagation();\n const block = (event: Event) => {\n const form = event.target;\n if (!(form instanceof HTMLFormElement) || form.id !== formId) return;\n event.preventDefault();\n // Added while the event is on its way down, so it runs when the event reaches the form; taken off after this\n // dispatch in case something above stopped the event first (a task, so never in the middle of it).\n form.addEventListener(\"submit\", stopAtForm, { capture: true, once: true });\n setTimeout(() => form.removeEventListener(\"submit\", stopAtForm, { capture: true }), 0);\n };\n document.addEventListener(\"submit\", block, true);\n return () => document.removeEventListener(\"submit\", block, true);\n }, [formId, blocked]);\n}\n\nconst TABBABLE = [\n \"button:not([disabled])\",\n \"[href]\",\n \"input:not([type='hidden']):not([disabled])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n \"[contenteditable]:not([contenteditable='false'])\",\n \"summary\",\n \"audio[controls]\",\n \"video[controls]\",\n].join(\", \");\n\n/**\n * Development only: with the close button hidden and no control a keyboard can reach inside, a\n * keyboard user can neither go on nor, without `isDismissable`, leave; even with it (Esc), a touch user on\n * `fullscreen` has no press outside. So it warns whenever the close button is hidden and nothing inside is\n * tabbable, whatever `isDismissable` says. Checked once it opens.\n */\nfunction useStrandedWarning(closeHidden: boolean, body: React.RefObject<HTMLElement | null>) {\n React.useEffect(() => {\n if (process.env.NODE_ENV === \"production\" || !closeHidden) return;\n const dialog = body.current?.closest(\"[data-slot='dialog']\");\n if (dialog && !dialog.querySelector(TABBABLE)) {\n console.warn(\"Dialog: isCloseButtonHidden leaves no close button, and the dialog has no control a keyboard can reach, so a user may be unable to go on or leave. Give it a primaryAction or a control in the body.\");\n }\n }, [closeHidden]);\n}\n\nfunction DialogFrame({ size, children, role, isDismissable, escapeCloses, isOpen, onClose, describedBy, rootData }: {\n size: DialogWidth; children: React.ReactNode; role?: \"dialog\" | \"alertdialog\"; isDismissable: boolean; escapeCloses: boolean;\n isOpen: boolean;\n /** The app's `data-*` attributes for the dialog element; its own `data-slot` comes after them. */\n rootData?: DataAttributes;\n /** Every close request (Esc, scrim, the parts' buttons) comes here. */\n onClose: () => void;\n /** The element whose text describes the dialog (an alert's consequence). */\n describedBy?: string;\n}) {\n return (\n <ModalOverlay\n // Always controlled here: closing goes through `onClose` only, so it is reported once.\n isOpen={isOpen}\n onOpenChange={(next) => {\n if (!next) onClose();\n }}\n isDismissable={isDismissable}\n isKeyboardDismissDisabled={!escapeCloses}\n data-slot=\"dialog-overlay\"\n className={cn(BLANKET, \"grid place-items-center overflow-y-auto p-ds-300 pt-[max(var(--ds-space-300),env(safe-area-inset-top,0px))] pb-[max(var(--ds-space-300),env(safe-area-inset-bottom,0px))]\")}\n >\n <Modal\n data-slot=\"dialog-modal\"\n // Every size names itself, as fullscreen already did: an app's test reads it, never the width class.\n data-size={size}\n className={cn(\n // A default max height with the body scrolling inside, so a small screen never pushes the footer away.\n \"flex max-h-[calc(100dvh-2*var(--ds-space-300))] w-full flex-col overflow-hidden rounded-ds-xlarge bg-ds-surface-overlay text-ds-text shadow-ds-overlay outline-hidden\",\n \"transition-[opacity,translate] duration-(--ds-duration-slow) ease-ds-enter data-[entering]:translate-y-2 data-[entering]:opacity-0 data-[exiting]:opacity-0 data-[exiting]:ease-ds-exit motion-reduce:transition-none\",\n DIALOG_WIDTH[size],\n )}\n >\n <AriaDialog {...rootData} role={role} aria-describedby={describedBy} data-slot=\"dialog\" className={DIALOG_ELEMENT}>\n <OverlayContents>{children}</OverlayContents>\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\n/**\n * The full-screen frame: the modal covers the viewport, edge to edge, at every width. On a phone\n * (below 640px, Drawer's query) it is presented as a sheet sliding up from the bottom edge; above, it fades in.\n * The side insets (landscape notch) pad the modal; the top and bottom ones pad the header and the footer.\n * Small, medium and large never come here: their frame above is unchanged.\n */\nfunction FullScreenFrame({ children, isDismissable, isOpen, onClose, describedBy, rootData }: {\n children: React.ReactNode; isDismissable: boolean; isOpen: boolean; onClose: () => void; describedBy?: string; rootData?: DataAttributes;\n}) {\n const sheet = useNarrow();\n return (\n <ModalOverlay\n isOpen={isOpen}\n onOpenChange={(next) => {\n if (!next) onClose();\n }}\n // No scrim to press: a press on something layered above the frame (a toast, a cookie banner) must not\n // close it, so outside presses never dismiss; `isDismissable` decides Esc alone.\n isDismissable={false}\n isKeyboardDismissDisabled={!isDismissable}\n data-slot=\"dialog-overlay\"\n className={BLANKET}\n >\n <Modal\n data-slot=\"dialog-modal\"\n data-size=\"fullscreen\"\n data-presentation={sheet ? \"sheet\" : \"fullscreen\"}\n className={cn(\n \"fixed inset-0 flex flex-col overflow-hidden bg-ds-surface-overlay text-ds-text outline-hidden\",\n \"ps-[env(safe-area-inset-left,0px)] pe-[env(safe-area-inset-right,0px)] rtl:ps-[env(safe-area-inset-right,0px)] rtl:pe-[env(safe-area-inset-left,0px)]\",\n \"duration-(--ds-duration-slow) ease-ds-enter data-[exiting]:ease-ds-exit motion-reduce:transition-none\",\n sheet\n ? \"transition-[translate] data-[entering]:translate-y-full data-[exiting]:translate-y-full\"\n : \"transition-opacity data-[entering]:opacity-0 data-[exiting]:opacity-0\",\n )}\n >\n <AriaDialog {...rootData} aria-describedby={describedBy} data-slot=\"dialog\" className={DIALOG_ELEMENT}>\n <OverlayContents>{children}</OverlayContents>\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\n/** Pulled into the corner so its icon lines up with the padding, not its 32px hit area. */\nfunction CornerClose({ onPress, slot, data }: { onPress: () => void; slot: string; data?: DataAttributes }) {\n return (\n <span data-slot={`${slot}-wrap`} className=\"-me-ds-100 -mt-ds-050 flex\">\n <CloseButton {...data} data-slot={slot} onPress={onPress} />\n </span>\n );\n}\n\n/**\n * The full-screen parts. Header and footer never shrink and the body is the one scroll container\n * between them, so they stay at the top and bottom; the header clears the notch, the footer the home indicator.\n */\nconst FULL_HEADER =\n \"flex shrink-0 items-start justify-between gap-ds-200 border-b border-ds-border px-ds-300 pb-ds-200 pt-[max(var(--ds-space-300),env(safe-area-inset-top,0px))]\";\nconst FULL_BODY = \"min-h-0 flex-1 overflow-y-auto overscroll-contain px-ds-300 py-ds-300 text-body text-ds-text-subtle\";\nconst FULL_FOOTER =\n \"flex shrink-0 flex-wrap items-center justify-end gap-ds-100 border-t border-ds-border px-ds-300 pt-ds-200 pb-[max(var(--ds-space-300),env(safe-area-inset-bottom,0px))]\";\n\n/** An empty description (`\"\"`, `false`, `true`, `null`) renders nothing, so it is the same as none. */\nfunction hasDescription(description: React.ReactNode) {\n return description != null && typeof description !== \"boolean\" && description !== \"\";\n}\n\n/** A node that renders something: the `headerStart` test (`null`, `false`, `true`, `\"\"` count as none). */\nconst isRenderable = hasDescription;\n\n// The full-screen options, each added to the classes above only when used, so a full-screen\n// dialog without them renders exactly as before.\n\n/** No footer: the body is the last part, so it clears the home indicator itself (as Drawer's body does). */\nconst FULL_BODY_NO_FOOTER = \"min-h-0 flex-1 overflow-y-auto overscroll-contain px-ds-300 pt-ds-300 pb-[max(var(--ds-space-300),env(safe-area-inset-bottom,0px))] text-body text-ds-text-subtle\";\n/** `footerLayout=\"spread\"`: the secondary takes the free space after it, so it sits at the start and the primary at the end. */\nconst FOOTER_SPREAD = \"[&>[data-slot=dialog-secondary]]:me-auto\";\n/** A hidden title is out of flow, so the close button is held at the inline end on its own. */\nconst HEADER_CLOSE_END = \"[&>[data-slot=dialog-close-wrap]]:ms-auto\";\n/** With `headerStart` the title side takes the room left between the slot and the close button. */\nconst TITLE_SIDE = \"min-w-0 flex-1\";\n\ntype FullScreenOptions = Pick<DialogProps, \"footerLayout\" | \"headerStart\" | \"isTitleHidden\">;\n\n/** Small, medium and large without a footer (`secondaryAction={null}` and no primary): the body takes the footer's bottom padding. */\nconst BODY = \"min-h-0 flex-1 overflow-y-auto px-ds-300 py-ds-200 text-body text-ds-text-subtle\";\nconst BODY_NO_FOOTER = \"min-h-0 flex-1 overflow-y-auto px-ds-300 pt-ds-200 pb-ds-300 text-body text-ds-text-subtle\";\n\ntype ContentOptions = Pick<DialogProps, \"isCloseButtonHidden\" | \"initialFocusRef\" | \"returnFocusRef\" | \"partData\" | \"titleRef\">;\n\n/**\n * The title with `titleRef`: the DS focus ring, a 2px ds-border-focused inset ring, for keyboard focus\n * only (`:focus-visible`), as on the drawer grip and the scroll area, so a pointer user never sees one. The browser's\n * own outline is hidden; no outline or external ring is hand-written (focus-outline.test.ts, focus-state.test.ts).\n * The heading's box reaches 4px past its text on each side (`-mx-ds-050 px-ds-050`), so the ring clears the first and\n * last letters while the text stays exactly where it was. Added only with `titleRef`, and only to a visible title: a\n * hidden one (`isTitleHidden`) keeps `sr-only` alone, takes no tabIndex and is never a focus target (its margin and\n * padding would also partly override `sr-only`'s).\n */\nconst TITLE_FOCUSABLE =\n \"-mx-ds-050 px-ds-050 outline-hidden focus-visible:rounded-ds-small focus-visible:inset-ring-2 focus-visible:inset-ring-ds-border-focused\";\n\nfunction DialogContent({\n title, description, descriptionId, children, primaryAction, secondaryAction, close, fullScreen, footerLayout, headerStart, isTitleHidden,\n isCloseButtonHidden, initialFocusRef, returnFocusRef, partData, titleRef,\n}: Pick<DialogProps, \"title\" | \"description\" | \"children\" | \"primaryAction\" | \"secondaryAction\"> & FullScreenOptions & ContentOptions & { descriptionId: string; close: () => void; fullScreen?: boolean }) {\n const { locale } = useLocale();\n const body = React.useRef<HTMLDivElement>(null);\n const secondary = React.useRef<HTMLButtonElement>(null);\n const destructive = primaryAction?.variant === \"danger\";\n const closeHidden = isCloseButtonHidden === true;\n useInitialFocus(body, secondary, destructive, initialFocusRef);\n useReturnFocus(returnFocusRef);\n useBlockedSubmit(primaryAction?.form, primaryAction?.isPending === true);\n useStrandedWarning(closeHidden, body);\n // The full-screen options below reach this component only for `fullscreen` (Dialog drops them for the other sizes).\n const hasStart = isRenderable(headerStart);\n const hasSecondary = secondaryAction !== null;\n const hasFooter = hasSecondary || primaryAction != null;\n // A hidden title keeps only `sr-only` (its own margin and size would fight it); with a start slot it truncates.\n const titleClass = isTitleHidden ? \"sr-only\" : hasStart ? \"m-0 truncate text-heading-medium\" : \"m-0 text-heading-medium\";\n // The app's data-* attributes come first in every part, so the DS's own data-slot wins.\n // With `titleRef` the heading takes the ref, tabIndex -1 and the focus ring; without it, nothing changes.\n // A hidden title takes the ref only: an sr-only heading would show no focus indicator, so it is never a focus target.\n const hasTitleRef = titleRef !== undefined && titleRef !== null;\n const titleText = hasTitleRef && isTitleHidden ? (\n <Heading {...partData?.title} ref={titleRef} slot=\"title\" data-slot=\"dialog-title\" className={titleClass}>{title}</Heading>\n ) : hasTitleRef ? (\n <Heading {...partData?.title} ref={titleRef} tabIndex={-1} slot=\"title\" data-slot=\"dialog-title\" className={`${titleClass} ${TITLE_FOCUSABLE}`}>{title}</Heading>\n ) : (\n <Heading {...partData?.title} slot=\"title\" data-slot=\"dialog-title\" className={titleClass}>{title}</Heading>\n );\n const headerClass = fullScreen ? FULL_HEADER : \"flex items-start justify-between gap-ds-200 px-ds-300 pt-ds-300\";\n return (\n <>\n <div {...partData?.header} data-slot=\"dialog-header\" className={isTitleHidden ? `${headerClass} ${HEADER_CLOSE_END}` : headerClass}>\n {hasStart && (\n <div data-slot=\"dialog-header-start\" className=\"flex shrink-0 items-center\">{headerStart}</div>\n )}\n {hasDescription(description) ? (\n <div data-slot=\"dialog-heading\" className={hasStart ? `flex flex-col gap-ds-050 ${TITLE_SIDE}` : \"flex min-w-0 flex-col gap-ds-050\"}>\n {titleText}\n <div id={descriptionId} data-slot=\"dialog-description\" className=\"text-body text-ds-text-subtle\">{description}</div>\n </div>\n ) : hasStart && !isTitleHidden ? (\n <div data-slot=\"dialog-heading\" className={TITLE_SIDE}>{titleText}</div>\n ) : (\n titleText\n )}\n {!closeHidden && <CornerClose slot=\"dialog-close\" onPress={close} data={partData?.close} />}\n </div>\n <div\n {...partData?.body}\n ref={body}\n data-slot=\"dialog-body\"\n className={fullScreen ? (hasFooter ? FULL_BODY : FULL_BODY_NO_FOOTER) : hasFooter ? BODY : BODY_NO_FOOTER}\n >\n {children}\n </div>\n {hasFooter && (\n <div\n {...partData?.footer}\n data-slot=\"dialog-footer\"\n data-layout={footerLayout === \"spread\" ? \"spread\" : undefined}\n className={fullScreen ? (footerLayout === \"spread\" ? `${FULL_FOOTER} ${FOOTER_SPREAD}` : FULL_FOOTER) : \"flex flex-wrap items-center justify-end gap-ds-100 px-ds-300 pb-ds-300 pt-ds-100\"}\n >\n {hasSecondary && (\n <Button\n {...dataAttributes(secondaryAction)}\n ref={secondary}\n variant=\"subtle\"\n data-slot=\"dialog-secondary\"\n isDisabled={secondaryAction?.isDisabled}\n iconBefore={secondaryAction?.iconBefore}\n iconAfter={secondaryAction?.iconAfter}\n onPress={() => (secondaryAction?.onPress ? secondaryAction.onPress() : close())}\n >\n {secondaryAction?.label ?? defaultCancelLabel(locale)}\n </Button>\n )}\n {primaryAction && (\n <Button\n {...dataAttributes(primaryAction)}\n variant={primaryAction.variant ?? \"primary\"}\n isPending={primaryAction.isPending}\n isDisabled={primaryAction.isDisabled}\n iconBefore={primaryAction.iconBefore}\n iconAfter={primaryAction.iconAfter}\n onPress={primaryAction.onPress}\n // A form-submit action; without `form` the Button stays type=\"button\".\n type={primaryAction.form ? \"submit\" : undefined}\n form={primaryAction.form}\n data-slot=\"dialog-primary\"\n >\n {primaryAction.label}\n </Button>\n )}\n </div>\n )}\n </>\n );\n}\n\n/**\n * Development only: the full-screen options a smaller size was given, which it ignores. Only values that would\n * change a full-screen dialog count: `isTitleHidden={false}`, `footerLayout=\"end\"` or an empty\n * `headerStart` are the defaults there too, so nothing is lost and nothing is said.\n */\nfunction useFullScreenOnlyWarning(size: DialogWidth | \"fullscreen\", props: FullScreenOptions) {\n const ignored =\n size === \"fullscreen\"\n ? []\n : [\n props.footerLayout === \"spread\" && \"footerLayout\",\n isRenderable(props.headerStart) && \"headerStart\",\n props.isTitleHidden === true && \"isTitleHidden\",\n ].filter((name): name is string => typeof name === \"string\");\n const signature = ignored.join(\", \");\n // One option named takes the singular (\"isTitleHidden only applies … ignores it\"), several the plural.\n const one = ignored.length === 1;\n React.useEffect(() => {\n if (process.env.NODE_ENV === \"production\" || !signature) return;\n console.warn(`Dialog: ${signature} only ${one ? \"applies\" : \"apply\"} to size=\"fullscreen\"; size=\"${size}\" ignores ${one ? \"it\" : \"them\"}.`);\n }, [signature, size, one]);\n}\n\n/** A title that names nothing: empty, blank or not text at all (`\"\"`, `\" \"`, `null`, `false`, `true`). */\nfunction isEmptyTitle(title: React.ReactNode) {\n return title === null || typeof title === \"boolean\" || (typeof title === \"string\" && title.trim() === \"\");\n}\n\n/**\n * Development only: `isTitleHidden` with an empty title leaves the dialog without a name, since the\n * hidden title is what names it. A left-out title (`undefined`) is already a TypeScript error, so only the empty\n * values that type-check are said here. Fullscreen only: the other sizes ignore `isTitleHidden` (the fullscreen-only\n * warning names it), so their title shows and names the dialog.\n */\nfunction useHiddenEmptyTitleWarning(isTitleHidden: boolean | undefined, title: React.ReactNode, fullScreen: boolean) {\n const unnamed = fullScreen && isTitleHidden === true && isEmptyTitle(title);\n React.useEffect(() => {\n if (process.env.NODE_ENV === \"production\" || !unnamed) return;\n console.warn(\"Dialog: isTitleHidden hides the title, but the title is empty, so the dialog has no accessible name. Give it a title; it stays visually hidden.\");\n }, [unnamed]);\n}\n\n/**\n * A decision or a short input that must be resolved before the user goes on. Put it inside a DialogTrigger\n * after its button, or control it with `isOpen`. Focus moves to the first field (to \"Cancel\" when the\n * primary action is destructive and \"Cancel\" is there), stays inside, and returns to the trigger on close; Esc closes it.\n * `size=\"fullscreen\"` covers the viewport, a sheet on phones, for a long task like a signup; it\n * also takes a logo before the title (`headerStart`), a visually hidden title (`isTitleHidden`) and a spread footer\n * (`footerLayout`). Every size: a primary action that submits a form\n * (`primaryAction.form`), no secondary action (`secondaryAction={null}`; with no primary either, no footer), no\n * close button (`isCloseButtonHidden`; a locked view adds `isDismissable={false}`), `data-*` attributes on the\n * dialog and its parts (`partData`, the actions' own), and focus hooks (`initialFocusRef`, `returnFocusRef`). A\n * focusable title (`titleRef`), which `initialFocusRef` can name to open on it.\n */\nexport function Dialog({\n size = \"small\", isDismissable = true, isOpen, defaultOpen, onOpenChange, footerLayout, headerStart, isTitleHidden, ...content\n}: DialogProps) {\n const state = useOverlayOpen({ isOpen, defaultOpen, onOpenChange });\n const descriptionId = React.useId();\n // Described only when there is a description; otherwise the dialog's DOM is unchanged.\n const describedBy = hasDescription(content.description) ? descriptionId : undefined;\n // The app's data-* props go to the dialog element; none given, nothing is added.\n const rootData = dataAttributes(content);\n useFullScreenOnlyWarning(size, { footerLayout, headerStart, isTitleHidden });\n useHiddenEmptyTitleWarning(isTitleHidden, content.title, size === \"fullscreen\");\n if (size === \"fullscreen\") {\n return (\n <FullScreenFrame isDismissable={isDismissable} isOpen={state.isOpen} onClose={state.close} describedBy={describedBy} rootData={rootData}>\n <DialogContent\n {...content}\n footerLayout={footerLayout}\n headerStart={headerStart}\n isTitleHidden={isTitleHidden}\n descriptionId={descriptionId}\n close={state.close}\n fullScreen\n />\n </FullScreenFrame>\n );\n }\n return (\n <DialogFrame size={size} isDismissable={isDismissable} escapeCloses={isDismissable} isOpen={state.isOpen} onClose={state.close} describedBy={describedBy} rootData={rootData}>\n {/* The full-screen options stay with `fullscreen`. */}\n <DialogContent {...content} descriptionId={descriptionId} close={state.close} />\n </DialogFrame>\n );\n}\n\nexport type AlertDialogProps = OpenProps & {\n /**\n * `danger` (default: a delete, `trash-2`, a danger button), `warning` (`triangle-alert`, a primary button), or\n * `neutral` for a confirm that neither destroys nor risks anything, such as reactivating an account\n * (`info` on a neutral ground, a primary button).\n */\n tone?: \"danger\" | \"warning\" | \"neutral\";\n /** The action as a question with the object's name: \"PG AB 482 filodan silinsin mi?\" */\n title: React.ReactNode;\n /** The consequence, and what to do first. */\n children: React.ReactNode;\n /** The verb again: \"Delete item\". */\n confirmLabel: string;\n /**\n * The cancel button's text, and so its accessible name (\"No, keep it\"), in place of the library's \"Cancel\"\n *. The app passes it already localized; the DS does not translate it. Left out (or `\"\"`), the\n * locale's \"Cancel\" renders and the DOM is unchanged. A long label wraps inside the button, which takes at\n * most the footer's width; focus, Esc and the pending lock are the same either way.\n */\n cancelLabel?: string;\n /**\n * May be async: the button shows pending until it settles, and while it runs the dialog cannot be cancelled\n * (the action is under way); it closes when the action succeeds and stays open when it fails.\n */\n onConfirm: () => void | Promise<void>;\n /** For irreversible deletes: the text the user types before the button enables (\"PG AB 482\"). */\n requireTypedConfirmation?: string;\n /**\n * Holds the confirm back while the app loads what it needs (\"Loading linked orders\"). The\n * button keeps its name and stays in the dialog, disabled as with `requireTypedConfirmation`: it cannot be pressed\n * (pointer, Enter or Space) and Tab passes it, so \"Cancel\" stays the one control; screen readers list it as\n * unavailable. Say why in the description or in the element `aria-describedby` names. Esc and \"Cancel\" still work.\n */\n isConfirmDisabled?: boolean;\n /**\n * More of what the alert says, by id: an element the app renders, inside the alert (a Banner in its\n * body) or outside it (a page notice). Added to the alert's own description in `aria-describedby`, after it, so\n * the alert is announced with both when it opens.\n */\n \"aria-describedby\"?: string;\n /** The field's label; \"Type ORD-482 to confirm\" by default. */\n typedConfirmationLabel?: string;\n /** Overrides the tone's icon (danger `trash-2`, warning `triangle-alert`). */\n icon?: IconName;\n /**\n * Where focus goes when the alert closes and React Aria's return would leave it on the page or on the\n * opener, as on Dialog. Needed when the element React Aria returns to is gone by the close: an alert\n * opened from a menu whose trigger unmounts when it closes (pass a stable button), or a confirmed action that removes the row\n * with its Menu (pass a stable element). Opened from a DS Menu item it is not needed: React Aria returns focus to\n * the Menu button itself, and a ref naming another element does not override that. Read when the alert closes; if\n * the app has already moved focus elsewhere on close, it stays there; if the ref is empty, focus returns as before.\n * There is no `initialFocusRef`: the alert's controls are its own, and \"Cancel\" takes the first focus. Nor is there a\n * `titleRef`: the alert is announced with its title and consequence when it opens (`aria-labelledby`,\n * `aria-describedby`), and focus starts on the safe answer, never on its text.\n */\n returnFocusRef?: React.RefObject<HTMLElement | null>;\n};\n\nconst ALERT_ICON: Record<NonNullable<AlertDialogProps[\"tone\"]>, { name: IconName; className: string }> = {\n danger: { name: \"trash-2\", className: \"bg-ds-background-danger text-ds-icon-danger\" },\n warning: { name: \"triangle-alert\", className: \"bg-ds-background-warning text-ds-icon-warning\" },\n neutral: { name: \"info\", className: \"bg-ds-background-neutral text-ds-icon\" },\n};\n\n/**\n * Only with a custom `cancelLabel`: the cancel button may wrap its text and grow in height, at most\n * as wide as the footer, so a long app label never overflows a 320px screen. The default \"Cancel\" is short and\n * keeps the footer's classes unchanged, and so does a blank label (`\" \"`), which counts as unset. A word breaks only\n * when it is too long for a line (`break-words`).\n */\nconst CUSTOM_CANCEL_FOOTER =\n \"[&>[data-slot=alert-dialog-cancel]]:h-auto [&>[data-slot=alert-dialog-cancel]]:min-h-ds-control [&>[data-slot=alert-dialog-cancel]]:max-w-full \" +\n \"[&>[data-slot=alert-dialog-cancel]]:py-ds-075 [&>[data-slot=alert-dialog-cancel]]:whitespace-normal [&>[data-slot=alert-dialog-cancel]]:text-center \" +\n \"[&>[data-slot=alert-dialog-cancel]]:break-words\";\nconst ALERT_FOOTER = \"flex flex-wrap items-center justify-end gap-ds-100 px-ds-300 pb-ds-300 pt-ds-200\";\n\nfunction AlertContent({\n tone = \"danger\", title, children, confirmLabel, cancelLabel, onConfirm, requireTypedConfirmation, typedConfirmationLabel, icon, returnFocusRef, isConfirmDisabled, descriptionId, close, pending, setPending,\n}: Omit<AlertDialogProps, keyof OpenProps | \"aria-describedby\"> & { descriptionId: string; close: () => void; pending: boolean; setPending: (pending: boolean) => void }) {\n const { locale } = useLocale();\n const cancel = React.useRef<HTMLButtonElement>(null);\n const [typed, setTyped] = React.useState(\"\");\n // \"Cancel\" first: the destructive button never has default focus.\n React.useEffect(() => cancel.current?.focus(), []);\n // Without the ref nothing runs, so React Aria returns focus to the opener as before.\n useReturnFocus(returnFocusRef);\n const ready = requireTypedConfirmation === undefined || typed.trim() === requireTypedConfirmation;\n const confirm = async () => {\n setPending(true);\n let done = false;\n try {\n await onConfirm();\n done = true;\n } catch {\n // The action failed: the dialog stays open so the user can retry or cancel. Saying what went wrong\n // (a Toast, an inline Banner) is the caller's, which knows the error.\n } finally {\n setPending(false);\n }\n if (done) close();\n };\n const glyph = ALERT_ICON[tone];\n return (\n <>\n <div data-slot=\"alert-dialog-header\" className=\"flex items-start gap-ds-200 px-ds-300 pt-ds-300\">\n <span data-slot=\"alert-dialog-icon\" className={cn(\"grid size-10 shrink-0 place-items-center rounded-ds-full\", glyph.className)}>\n <IconGlyph name={icon ?? glyph.name} />\n </span>\n <div data-slot=\"alert-dialog-text\" className=\"flex min-w-0 flex-col gap-ds-050\">\n <Heading slot=\"title\" data-slot=\"alert-dialog-title\" className=\"m-0 text-heading-medium\">{title}</Heading>\n <div id={descriptionId} data-slot=\"alert-dialog-description\" className=\"text-body text-ds-text-subtle\">{children}</div>\n </div>\n </div>\n {requireTypedConfirmation !== undefined && (\n <div data-slot=\"alert-dialog-body\" className=\"px-ds-300 pt-ds-200\">\n <TextField\n label={typedConfirmationLabel ?? typeToConfirmLabel(locale, requireTypedConfirmation)}\n value={typed}\n onChange={setTyped}\n placeholder={requireTypedConfirmation}\n appearance=\"code\"\n autoComplete=\"off\"\n isDisabled={pending}\n />\n </div>\n )}\n <div data-slot=\"alert-dialog-footer\" className={cancelLabel?.trim() ? `${ALERT_FOOTER} ${CUSTOM_CANCEL_FOOTER}` : ALERT_FOOTER}>\n <Button ref={cancel} variant=\"subtle\" onPress={close} isDisabled={pending} data-slot=\"alert-dialog-cancel\">{cancelLabel?.trim() || defaultCancelLabel(locale)}</Button>\n <Button\n variant={tone === \"danger\" ? \"danger\" : \"primary\"}\n isDisabled={!ready || Boolean(isConfirmDisabled)}\n isPending={pending}\n onPress={confirm}\n data-slot=\"alert-dialog-confirm\"\n >\n {confirmLabel}\n </Button>\n </div>\n </>\n );\n}\n\n/**\n * Confirms an action that destroys data, costs money or cannot be undone (role=\"alertdialog\"). Not closed\n * by a scrim click; Esc cancels (not while the action runs); \"Cancel\" (or the app's `cancelLabel`) has the first focus. With\n * `requireTypedConfirmation` the action enables only once the text is typed. If the action can be undone,\n * skip it and offer \"Undo\" in a Toast. Opened from a menu whose trigger unmounts, or when the confirmed action\n * removes the opener, pass `returnFocusRef` so focus has somewhere to go back to.\n */\nexport function AlertDialog({ isOpen, defaultOpen, onOpenChange, \"aria-describedby\": ariaDescribedBy, ...content }: AlertDialogProps) {\n const state = useOverlayOpen({ isOpen, defaultOpen, onOpenChange });\n const descriptionId = React.useId();\n const [pending, setPending] = React.useState(false);\n const describedBy = ariaDescribedBy?.trim() ? `${descriptionId} ${ariaDescribedBy.trim()}` : descriptionId;\n return (\n // No scrim click (a stray tap must not answer it); Esc cancels, except while the action is running.\n <DialogFrame size=\"small\" role=\"alertdialog\" isDismissable={false} escapeCloses={!pending} describedBy={describedBy} isOpen={state.isOpen} onClose={state.close}>\n <AlertContent {...content} descriptionId={descriptionId} close={state.close} pending={pending} setPending={setPending} />\n </DialogFrame>\n );\n}\n\nexport type DrawerProps = OpenProps & {\n title: React.ReactNode;\n /**\n * Under the title: \"Ana Petrović · 14–18 Eki\". When given, the drawer is described by it\n * (`aria-describedby`); without it (or with `\"\"`, `false`, `null`) nothing is rendered.\n */\n subtitle?: React.ReactNode;\n /** Beside the close button: a status lozenge, a menu. */\n headerActions?: React.ReactNode;\n children: React.ReactNode;\n /** Sticky at the bottom: the record's actions. */\n footer?: React.ReactNode;\n /** small 380px, large 560px (medium reads as large). */\n size?: OverlaySize;\n /** `end` (the side; a bottom sheet on phones) or `bottom` everywhere. */\n placement?: \"end\" | \"bottom\";\n /** Closing (button, Esc, scrim, useDrawerClose) asks first: \"Unsaved changes\". */\n hasUnsavedChanges?: boolean;\n};\n\n/** Phones (below 640px) get the bottom sheet whatever the placement; decided after mount. */\nfunction useNarrow() {\n return React.useSyncExternalStore(\n (notify) => {\n if (typeof window.matchMedia !== \"function\") return () => {};\n const query = window.matchMedia(\"(max-width: 639px)\");\n query.addEventListener(\"change\", notify);\n return () => query.removeEventListener(\"change\", notify);\n },\n () => typeof window.matchMedia === \"function\" && window.matchMedia(\"(max-width: 639px)\").matches,\n () => false,\n );\n}\n\nexport type DrawerClose = (options?: {\n /**\n * Close without the unsaved question: after a save (\"Save and close\"), when the parent's\n * `hasUnsavedChanges` has not re-rendered yet.\n */\n force?: boolean;\n}) => void;\n\nconst DrawerCloseContext = React.createContext<DrawerClose>(() => {});\n\n/**\n * The drawer's close, for its footer or body. By default it asks first with unsaved edits, like the close\n * button, Esc and the scrim; after saving call `close({ force: true })`.\n */\nexport function useDrawerClose(): DrawerClose {\n return React.useContext(DrawerCloseContext);\n}\n\n/** Drag distance on the grip that counts as a swipe rather than a tap (px). */\nconst SWIPE = 40;\n\n/** The sheet's grip: tap toggles half/full; swipe up expands, swipe down collapses (or closes from half). */\nfunction Grip({ expanded, onExpand, onCollapse, onDismiss }: { expanded: boolean; onExpand: () => void; onCollapse: () => void; onDismiss: () => void }) {\n const { locale } = useLocale();\n const start = React.useRef<number | null>(null);\n const moved = React.useRef(false);\n return (\n <button\n type=\"button\"\n data-slot=\"drawer-grip\"\n aria-label={expanded ? collapseSheetLabel(locale) : expandSheetLabel(locale)}\n aria-expanded={expanded}\n onPointerDown={(event) => {\n start.current = event.clientY;\n moved.current = false;\n // Keep the pointer while it drags past the 24px grip (touch is captured anyway; a mouse is not).\n event.currentTarget.setPointerCapture?.(event.pointerId);\n }}\n onPointerUp={(event) => {\n if (start.current === null) return;\n const dy = event.clientY - start.current;\n start.current = null;\n if (Math.abs(dy) < SWIPE) return;\n moved.current = true;\n if (dy < 0) onExpand();\n else if (expanded) onCollapse();\n else onDismiss();\n }}\n onClick={() => {\n if (moved.current) {\n moved.current = false;\n return;\n }\n if (expanded) onCollapse();\n else onExpand();\n }}\n className=\"mx-auto mt-ds-100 grid h-6 w-full shrink-0 cursor-grab touch-none place-items-center outline-hidden focus-visible:inset-ring-2 focus-visible:inset-ring-ds-border-focused\"\n >\n <span aria-hidden className=\"h-1 w-9 rounded-ds-full bg-ds-border-bold\" />\n </button>\n );\n}\n\n/** \"Unsaved changes\": a real nested modal (focus kept inside, the drawer behind it inert, Esc = keep editing). */\nfunction UnsavedPrompt({ isOpen, onKeep, onDiscard }: { isOpen: boolean; onKeep: () => void; onDiscard: () => void }) {\n const { locale } = useLocale();\n return (\n <ModalOverlay\n isOpen={isOpen}\n onOpenChange={(next) => {\n if (!next) onKeep();\n }}\n isDismissable\n data-slot=\"drawer-unsaved-overlay\"\n className={cn(BLANKET, \"grid place-items-center p-ds-300\")}\n >\n <Modal data-slot=\"drawer-unsaved-modal\" className=\"w-full max-w-90 rounded-ds-xlarge bg-ds-surface-overlay text-ds-text shadow-ds-overlay outline-hidden\">\n <AriaDialog role=\"alertdialog\" data-slot=\"drawer-unsaved\" className=\"flex flex-col gap-ds-150 p-ds-300 outline-hidden\">\n <Heading slot=\"title\" data-slot=\"drawer-unsaved-title\" className=\"m-0 text-heading-small\">{unsavedTitleLabel(locale)}</Heading>\n <span data-slot=\"drawer-unsaved-body\" className=\"text-body text-ds-text-subtle\">{unsavedBodyLabel(locale)}</span>\n <div data-slot=\"drawer-unsaved-actions\" className=\"flex flex-wrap justify-end gap-ds-100\">\n <Button variant=\"subtle\" autoFocus onPress={onKeep} data-slot=\"drawer-keep-editing\">{keepEditingLabel(locale)}</Button>\n <Button variant=\"danger\" onPress={onDiscard} data-slot=\"drawer-discard\">{discardCloseLabel(locale)}</Button>\n </div>\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\n/**\n * A panel over the page to show or edit one record without losing the list behind it: on the inline end\n * (380 or 560px, full height), a bottom sheet on phones that snaps between half and full height. Header with\n * title, subtitle and status; a scrolling body; a sticky footer; both keep clear of notches and the home\n * indicator. With unsaved edits every way of closing asks first. The title names the drawer and the\n * subtitle, when there is one, describes it.\n */\nexport function Drawer({\n size = \"small\", placement = \"end\", isOpen, defaultOpen, onOpenChange, hasUnsavedChanges,\n title, subtitle, headerActions, children, footer,\n}: DrawerProps) {\n const state = useOverlayOpen({ isOpen, defaultOpen, onOpenChange });\n const subtitleId = React.useId();\n // Described only when there is a subtitle, as Dialog's description; otherwise the drawer's DOM is unchanged.\n const describedBy = hasDescription(subtitle) ? subtitleId : undefined;\n const narrow = useNarrow();\n const bottom = placement === \"bottom\" || narrow;\n const [expanded, setExpanded] = React.useState(false);\n // A sheet opens at half height every time. Reset as it opens, not as it closes, so the closing slide does\n // not also animate the height down.\n const [wasOpen, setWasOpen] = React.useState(state.isOpen);\n if (wasOpen !== state.isOpen) {\n setWasOpen(state.isOpen);\n if (state.isOpen) setExpanded(false);\n }\n const [asking, setAsking] = React.useState(false);\n // Every close request (button, Esc, scrim, grip swipe, useDrawerClose) comes through here.\n const request = () => (hasUnsavedChanges ? setAsking(true) : state.close());\n const close: DrawerClose = (options) => (options?.force ? state.close() : request());\n return (\n <ModalOverlay\n isOpen={state.isOpen}\n onOpenChange={(next) => {\n if (!next) request();\n }}\n isDismissable\n data-slot=\"drawer-overlay\"\n data-placement={bottom ? \"bottom\" : \"end\"}\n className={BLANKET}\n >\n <Modal\n data-slot=\"drawer\"\n className={cn(\n \"fixed flex flex-col overflow-hidden bg-ds-surface-overlay text-ds-text shadow-ds-overlay outline-hidden\",\n \"transition-[translate,height] duration-(--ds-duration-slow) ease-ds-enter data-[exiting]:ease-ds-exit motion-reduce:transition-none\",\n bottom\n ? cn(\n \"inset-x-0 bottom-0 rounded-t-ds-xlarge data-[entering]:translate-y-full data-[exiting]:translate-y-full\",\n expanded ? \"h-[calc(100dvh-env(safe-area-inset-top,0px)-var(--ds-space-200))]\" : \"h-[50dvh]\",\n )\n : cn(\n // Clear of a notch at the top and, in landscape, at the inline end.\n \"inset-y-0 end-0 max-w-full pt-[env(safe-area-inset-top,0px)] pe-[env(safe-area-inset-right,0px)] rtl:pe-[env(safe-area-inset-left,0px)]\",\n \"data-[entering]:translate-x-full data-[exiting]:translate-x-full rtl:data-[entering]:-translate-x-full rtl:data-[exiting]:-translate-x-full\",\n DRAWER_WIDTH[size],\n ),\n )}\n >\n <AriaDialog aria-describedby={describedBy} data-slot=\"drawer-dialog\" className={DIALOG_ELEMENT}>\n <OverlayContents>\n <DrawerCloseContext.Provider value={close}>\n {bottom && (\n <Grip expanded={expanded} onExpand={() => setExpanded(true)} onCollapse={() => setExpanded(false)} onDismiss={request} />\n )}\n <div data-slot=\"drawer-header\" className=\"flex items-start justify-between gap-ds-200 border-b border-ds-border px-ds-300 py-ds-200\">\n <div data-slot=\"drawer-heading\" className=\"flex min-w-0 flex-col gap-ds-025\">\n <Heading slot=\"title\" data-slot=\"drawer-title\" className=\"m-0 text-heading-medium\">{title}</Heading>\n {describedBy && <span id={describedBy} data-slot=\"drawer-subtitle\" className=\"text-body-small text-ds-text-subtle\">{subtitle}</span>}\n </div>\n <div data-slot=\"drawer-header-actions\" className=\"flex shrink-0 items-center gap-ds-100\">\n {headerActions}\n <CloseButton data-slot=\"drawer-close\" onPress={request} />\n </div>\n </div>\n <div\n data-slot=\"drawer-body\"\n className={cn(\n \"min-h-0 flex-1 overflow-y-auto px-ds-300 pt-ds-200 text-body\",\n // Without a footer the body is the last thing above the home indicator.\n footer ? \"pb-ds-200\" : \"pb-[max(var(--ds-space-200),env(safe-area-inset-bottom,0px))]\",\n )}\n >\n {children}\n </div>\n {footer && (\n <div\n data-slot=\"drawer-footer\"\n className=\"flex flex-wrap items-center justify-end gap-ds-100 border-t border-ds-border px-ds-300 pt-ds-150 pb-[max(var(--ds-space-150),env(safe-area-inset-bottom,0px))]\"\n >\n {footer}\n </div>\n )}\n </DrawerCloseContext.Provider>\n </OverlayContents>\n <UnsavedPrompt\n isOpen={asking}\n onKeep={() => setAsking(false)}\n onDiscard={() => {\n setAsking(false);\n state.close();\n }}\n />\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n"]}
@@ -1,31 +0,0 @@
1
- import * as React from "react";
2
- import { type RadioGroupProps as AriaRadioGroupProps } from "react-aria-components";
3
- import type { RequiredValidation } from "../form/validation.js";
4
- export type RadioCardItem = {
5
- value: string;
6
- title: React.ReactNode;
7
- description?: React.ReactNode;
8
- price?: React.ReactNode;
9
- /** Marks the recommended option ("Recommended"), as a brand lozenge. */
10
- badge?: React.ReactNode;
11
- isDisabled?: boolean;
12
- };
13
- export type RadioCardProps = Omit<AriaRadioGroupProps, "children" | "className" | "style" | "orientation"> & {
14
- label: React.ReactNode;
15
- /** Two to four cards. */
16
- items: readonly RadioCardItem[];
17
- description?: React.ReactNode;
18
- errorMessage?: React.ReactNode;
19
- /**
20
- * As RadioGroup's: `field` (default) or `app`. See {@link RequiredValidation}. The app's `isInvalid`
21
- * (`true` with its `errorMessage`, or `false`) overrides the check, as on TextField. Disabled, empty and required,
22
- * it still blocks a DS Form's submit and cannot take focus (as TextField).
23
- */
24
- requiredValidation?: RequiredValidation;
25
- };
26
- /**
27
- * A RadioGroup whose options are cards (insurance packages, delivery options).
28
- * The whole card is the hit target; arrow keys move between cards; cards in a
29
- * row have equal height.
30
- */
31
- export declare function RadioCard({ label, items, description, errorMessage: errorMessageProp, requiredValidation, ...rest }: RadioCardProps): React.JSX.Element;
@@ -1,29 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { Radio as AriaRadio, RadioGroup as AriaRadioGroup } from "react-aria-components";
5
- import { FieldDescription, FieldError, FieldLabel } from "../form/field-parts.js";
6
- import { FIELD_STACK } from "../form/styles.js";
7
- import { hasContent } from "./choice-text.js";
8
- import { useRadioGroupRequired } from "./radio.js";
9
- import { CHOICE_DESCRIPTION, RADIO_CARD, RADIO_CARD_BADGE, RADIO_DOT } from "./styles.js";
10
- /**
11
- * A RadioGroup whose options are cards (insurance packages, delivery options).
12
- * The whole card is the hit target; arrow keys move between cards; cards in a
13
- * row have equal height.
14
- */
15
- export function RadioCard({ label, items, description, errorMessage: errorMessageProp, requiredValidation, ...rest }) {
16
- const { errorMessage, groupProps } = useRadioGroupRequired({ ...rest, errorMessage: errorMessageProp, requiredValidation });
17
- return (_jsxs(AriaRadioGroup, { ...rest, ...groupProps, "data-slot": "radio-card-group", className: FIELD_STACK, children: [_jsx(FieldLabel, { isRequired: rest.isRequired, children: label }), _jsx("div", { "data-slot": "radio-card-items", className: "grid grid-cols-[repeat(auto-fit,minmax(min(180px,100%),1fr))] gap-ds-150", children: items.map((item) => (_jsx(RadioCardOption, { item: item }, item.value))) }), description && _jsx(FieldDescription, { children: description }), _jsx(FieldError, { children: errorMessage })] }));
18
- }
19
- function RadioCardOption({ item }) {
20
- const id = React.useId();
21
- const titleId = `${id}-title`;
22
- const badgeId = hasContent(item.badge) ? `${id}-badge` : undefined;
23
- const detailsId = hasContent(item.description) || hasContent(item.price) ? `${id}-details` : undefined;
24
- const describedBy = [badgeId, detailsId].filter(Boolean).join(" ") || undefined;
25
- return (_jsxs(AriaRadio, { value: item.value, isDisabled: item.isDisabled, "aria-labelledby": titleId, "aria-describedby": describedBy, "data-slot": "radio-card", className: RADIO_CARD, children: [_jsx("span", { "aria-hidden": "true", "data-slot": "radio-dot", className: RADIO_DOT }), _jsxs("span", { "data-slot": "radio-card-body", className: "flex min-w-0 flex-col gap-ds-050", children: [_jsxs("span", { className: "flex flex-wrap items-center gap-ds-075", children: [_jsx("span", { id: titleId, "data-slot": "radio-card-title", className: "text-body-strong", children: item.title }), badgeId && (
26
- // A brand Lozenge; swap in the Lozenge component once the display group ships it.
27
- _jsx("span", { id: badgeId, "data-slot": "radio-card-badge", className: RADIO_CARD_BADGE, children: item.badge }))] }), detailsId && (_jsxs("span", { id: detailsId, className: "flex flex-col gap-ds-050", children: [hasContent(item.description) && (_jsx("span", { "data-slot": "radio-card-description", className: CHOICE_DESCRIPTION, children: item.description })), hasContent(item.price) && (_jsx("span", { "data-slot": "radio-card-price", className: "text-metric-small tabular-nums", children: item.price }))] }))] })] }));
28
- }
29
- //# sourceMappingURL=radio-card.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"radio-card.js","sourceRoot":"","sources":["../../src/selection/radio-card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,UAAU,IAAI,cAAc,EAA+C,MAAM,uBAAuB,CAAC;AAEtI,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,kBA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AC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IACvG,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;IAChF,OAAO,CACL,MAAC,SAAS,IACR,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,qBAEV,OAAO,sBACN,WAAW,eACnB,YAAY,EACtB,SAAS,EAAE,UAAU,aAErB,8BAAkB,MAAM,eAAW,WAAW,EAAC,SAAS,EAAE,SAAS,GAAI,EACvE,6BAAgB,iBAAiB,EAAC,SAAS,EAAC,kCAAkC,aAC5E,gBAAM,SAAS,EAAC,wCAAwC,aACtD,eAAM,EAAE,EAAE,OAAO,eAAY,kBAAkB,EAAC,SAAS,EAAC,kBAAkB,YAAE,IAAI,CAAC,KAAK,GAAQ,EAC/F,OAAO,IAAI;4BACV,kFAAkF;4BAClF,eAAM,EAAE,EAAE,OAAO,eAAY,kBAAkB,EAAC,SAAS,EAAE,gBAAgB,YACxE,IAAI,CAAC,KAAK,GACN,CACR,IACI,EACN,SAAS,IAAI,CACZ,gBAAM,EAAE,EAAE,SAAS,EAAE,SAAS,EAAC,0BAA0B,aACtD,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAC/B,4BAAgB,wBAAwB,EAAC,SAAS,EAAE,kBAAkB,YAAG,IAAI,CAAC,WAAW,GAAQ,CAClG,EACA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CACzB,4BAAgB,kBAAkB,EAAC,SAAS,EAAC,gCAAgC,YAAE,IAAI,CAAC,KAAK,GAAQ,CAClG,IACI,CACR,IACI,IACG,CACb,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Radio as AriaRadio, RadioGroup as AriaRadioGroup, type RadioGroupProps as AriaRadioGroupProps } from \"react-aria-components\";\n\nimport { FieldDescription, FieldError, FieldLabel } from \"../form/field-parts\";\nimport { FIELD_STACK } from \"../form/styles\";\nimport type { RequiredValidation } from \"../form/validation\";\nimport { hasContent } from \"./choice-text\";\nimport { useRadioGroupRequired } from \"./radio\";\nimport { CHOICE_DESCRIPTION, RADIO_CARD, RADIO_CARD_BADGE, RADIO_DOT } from \"./styles\";\n\nexport type RadioCardItem = {\n value: string;\n title: React.ReactNode;\n description?: React.ReactNode;\n price?: React.ReactNode;\n /** Marks the recommended option (\"Recommended\"), as a brand lozenge. */\n badge?: React.ReactNode;\n isDisabled?: boolean;\n};\n\nexport type RadioCardProps = Omit<AriaRadioGroupProps, \"children\" | \"className\" | \"style\" | \"orientation\"> & {\n label: React.ReactNode;\n /** Two to four cards. */\n items: readonly RadioCardItem[];\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n /**\n * As RadioGroup's: `field` (default) or `app`. See {@link RequiredValidation}. The app's `isInvalid`\n * (`true` with its `errorMessage`, or `false`) overrides the check, as on TextField. Disabled, empty and required,\n * it still blocks a DS Form's submit and cannot take focus (as TextField).\n */\n requiredValidation?: RequiredValidation;\n};\n\n/**\n * A RadioGroup whose options are cards (insurance packages, delivery options).\n * The whole card is the hit target; arrow keys move between cards; cards in a\n * row have equal height.\n */\nexport function RadioCard({ label, items, description, errorMessage: errorMessageProp, requiredValidation, ...rest }: RadioCardProps) {\n const { errorMessage, groupProps } = useRadioGroupRequired({ ...rest, errorMessage: errorMessageProp, requiredValidation });\n return (\n <AriaRadioGroup {...rest} {...groupProps} data-slot=\"radio-card-group\" className={FIELD_STACK}>\n <FieldLabel isRequired={rest.isRequired}>{label}</FieldLabel>\n <div data-slot=\"radio-card-items\" className=\"grid grid-cols-[repeat(auto-fit,minmax(min(180px,100%),1fr))] gap-ds-150\">\n {items.map((item) => (\n <RadioCardOption key={item.value} item={item} />\n ))}\n </div>\n {description && <FieldDescription>{description}</FieldDescription>}\n <FieldError>{errorMessage}</FieldError>\n </AriaRadioGroup>\n );\n}\n\nfunction RadioCardOption({ item }: { item: RadioCardItem }) {\n const id = React.useId();\n const titleId = `${id}-title`;\n const badgeId = hasContent(item.badge) ? `${id}-badge` : undefined;\n const detailsId = hasContent(item.description) || hasContent(item.price) ? `${id}-details` : undefined;\n const describedBy = [badgeId, detailsId].filter(Boolean).join(\" \") || undefined;\n return (\n <AriaRadio\n value={item.value}\n isDisabled={item.isDisabled}\n // Named by the title alone; badge, detail and price stay visible text and describe it.\n aria-labelledby={titleId}\n aria-describedby={describedBy}\n data-slot=\"radio-card\"\n className={RADIO_CARD}\n >\n <span aria-hidden=\"true\" data-slot=\"radio-dot\" className={RADIO_DOT} />\n <span data-slot=\"radio-card-body\" className=\"flex min-w-0 flex-col gap-ds-050\">\n <span className=\"flex flex-wrap items-center gap-ds-075\">\n <span id={titleId} data-slot=\"radio-card-title\" className=\"text-body-strong\">{item.title}</span>\n {badgeId && (\n // A brand Lozenge; swap in the Lozenge component once the display group ships it.\n <span id={badgeId} data-slot=\"radio-card-badge\" className={RADIO_CARD_BADGE}>\n {item.badge}\n </span>\n )}\n </span>\n {detailsId && (\n <span id={detailsId} className=\"flex flex-col gap-ds-050\">\n {hasContent(item.description) && (\n <span data-slot=\"radio-card-description\" className={CHOICE_DESCRIPTION}>{item.description}</span>\n )}\n {hasContent(item.price) && (\n <span data-slot=\"radio-card-price\" className=\"text-metric-small tabular-nums\">{item.price}</span>\n )}\n </span>\n )}\n </span>\n </AriaRadio>\n );\n}\n"]}