@42-central/ui-react 0.27.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/{chunk-OVT2KZHY.js → chunk-3KARNPW4.js} +3 -3
  2. package/dist/{chunk-OVT2KZHY.js.map → chunk-3KARNPW4.js.map} +1 -1
  3. package/dist/chunk-6B2GNPJP.js +43 -0
  4. package/dist/chunk-6B2GNPJP.js.map +1 -0
  5. package/dist/{chunk-E52Z2FKU.js → chunk-7BY5I2RB.js} +3 -3
  6. package/dist/{chunk-E52Z2FKU.js.map → chunk-7BY5I2RB.js.map} +1 -1
  7. package/dist/{chunk-X3YIHN2U.js → chunk-ASKQ6N5V.js} +3 -3
  8. package/dist/{chunk-X3YIHN2U.js.map → chunk-ASKQ6N5V.js.map} +1 -1
  9. package/dist/{chunk-6IRMKF5T.js → chunk-B4GNSSHU.js} +4 -4
  10. package/dist/{chunk-6IRMKF5T.js.map → chunk-B4GNSSHU.js.map} +1 -1
  11. package/dist/{chunk-BMEJBY6H.js → chunk-B5YHYI7E.js} +22 -27
  12. package/dist/chunk-B5YHYI7E.js.map +1 -0
  13. package/dist/{chunk-7OGZT7U2.js → chunk-G3AD3NJG.js} +3 -3
  14. package/dist/{chunk-7OGZT7U2.js.map → chunk-G3AD3NJG.js.map} +1 -1
  15. package/dist/{chunk-MNYY7UU2.js → chunk-GJFCIG34.js} +4 -4
  16. package/dist/{chunk-MNYY7UU2.js.map → chunk-GJFCIG34.js.map} +1 -1
  17. package/dist/{chunk-5H5YOPCF.js → chunk-I53TMAV2.js} +5 -5
  18. package/dist/{chunk-5H5YOPCF.js.map → chunk-I53TMAV2.js.map} +1 -1
  19. package/dist/{chunk-MCRTAUSZ.js → chunk-K3FZHYJL.js} +3 -3
  20. package/dist/{chunk-MCRTAUSZ.js.map → chunk-K3FZHYJL.js.map} +1 -1
  21. package/dist/{chunk-ZVECQBGG.js → chunk-KNGSO7A3.js} +41 -13
  22. package/dist/chunk-KNGSO7A3.js.map +1 -0
  23. package/dist/{chunk-4D2V4JE4.js → chunk-KYVXPSNW.js} +3 -3
  24. package/dist/{chunk-4D2V4JE4.js.map → chunk-KYVXPSNW.js.map} +1 -1
  25. package/dist/{chunk-L24N5EON.js → chunk-P7SH3XWY.js} +3 -3
  26. package/dist/{chunk-L24N5EON.js.map → chunk-P7SH3XWY.js.map} +1 -1
  27. package/dist/{chunk-LKFHUDEW.js → chunk-QVOBLRCM.js} +3 -3
  28. package/dist/{chunk-LKFHUDEW.js.map → chunk-QVOBLRCM.js.map} +1 -1
  29. package/dist/{chunk-SCXXJDKQ.js → chunk-SP6LCCTZ.js} +21 -28
  30. package/dist/chunk-SP6LCCTZ.js.map +1 -0
  31. package/dist/{chunk-Y2G47ARQ.js → chunk-TGGNSSOJ.js} +3 -3
  32. package/dist/{chunk-Y2G47ARQ.js.map → chunk-TGGNSSOJ.js.map} +1 -1
  33. package/dist/{chunk-D2QIPQ74.js → chunk-W3XX7BYT.js} +2 -2
  34. package/dist/chunk-W3XX7BYT.js.map +1 -0
  35. package/dist/{chunk-F374BNL4.js → chunk-YVTM2KRR.js} +12 -8
  36. package/dist/chunk-YVTM2KRR.js.map +1 -0
  37. package/dist/colors.css +328 -0
  38. package/dist/components/action-icon/action-icon.d.ts +6 -5
  39. package/dist/components/action-icon/action-icon.d.ts.map +1 -1
  40. package/dist/components/action-icon/index.js +3 -2
  41. package/dist/components/alert/index.js +2 -2
  42. package/dist/components/app-shell/index.js +5 -4
  43. package/dist/components/app-shell/index.js.map +1 -1
  44. package/dist/components/badge/badge.d.ts +1 -1
  45. package/dist/components/badge/badge.d.ts.map +1 -1
  46. package/dist/components/badge/index.js +2 -1
  47. package/dist/components/button/button.d.ts +11 -9
  48. package/dist/components/button/button.d.ts.map +1 -1
  49. package/dist/components/button/index.js +3 -2
  50. package/dist/components/button-multi-select/index.js +4 -3
  51. package/dist/components/button-multi-select/index.js.map +1 -1
  52. package/dist/components/button-select/index.js +4 -3
  53. package/dist/components/button-select/index.js.map +1 -1
  54. package/dist/components/calendar/index.js +4 -3
  55. package/dist/components/camera/index.js +6 -5
  56. package/dist/components/clipboard/index.js +3 -2
  57. package/dist/components/clipboard/index.js.map +1 -1
  58. package/dist/components/data-table/index.js +10 -9
  59. package/dist/components/data-table/index.js.map +1 -1
  60. package/dist/components/date-picker/index.js +7 -6
  61. package/dist/components/date-picker/index.js.map +1 -1
  62. package/dist/components/download-button/index.js +4 -3
  63. package/dist/components/drawer/index.js +5 -4
  64. package/dist/components/file-item/index.js +4 -3
  65. package/dist/components/file-preview/index.js +4 -3
  66. package/dist/components/file-preview/index.js.map +1 -1
  67. package/dist/components/file-trigger/index.js +4 -3
  68. package/dist/components/file-upload/index.js +4 -3
  69. package/dist/components/file-upload/index.js.map +1 -1
  70. package/dist/components/image-cropper/index.js +4 -3
  71. package/dist/components/lightbox/index.js +7 -6
  72. package/dist/components/lightbox/index.js.map +1 -1
  73. package/dist/components/modal/index.js +5 -4
  74. package/dist/components/notification/index.js +3 -3
  75. package/dist/components/overlays/index.js +7 -6
  76. package/dist/components/overlays/index.js.map +1 -1
  77. package/dist/components/photo-capture/index.js +8 -7
  78. package/dist/components/photo-capture/index.js.map +1 -1
  79. package/dist/components/schedule/index.js +4 -3
  80. package/dist/components/schedule/index.js.map +1 -1
  81. package/dist/components/spinner/index.js +1 -1
  82. package/dist/components/spinner/spinner.d.ts +1 -1
  83. package/dist/components/spinner/spinner.d.ts.map +1 -1
  84. package/dist/components/spotlight/index.js +5 -4
  85. package/dist/components/spotlight/index.js.map +1 -1
  86. package/dist/components/theme-icon/index.js +1 -1
  87. package/dist/components/theme-icon/theme-icon.d.ts.map +1 -1
  88. package/dist/lib/button-colors.d.ts +25 -0
  89. package/dist/lib/button-colors.d.ts.map +1 -0
  90. package/package.json +1 -1
  91. package/src/colors.css +328 -0
  92. package/src/components/action-icon/action-icon.test.tsx +22 -0
  93. package/src/components/action-icon/action-icon.tsx +24 -28
  94. package/src/components/badge/badge.test.tsx +53 -10
  95. package/src/components/badge/badge.tsx +64 -11
  96. package/src/components/button/button.test.tsx +41 -5
  97. package/src/components/button/button.tsx +28 -33
  98. package/src/components/spinner/spinner.tsx +3 -3
  99. package/src/components/theme-icon/theme-icon.test.tsx +7 -0
  100. package/src/components/theme-icon/theme-icon.tsx +10 -6
  101. package/src/lib/button-colors.ts +55 -0
  102. package/dist/chunk-BMEJBY6H.js.map +0 -1
  103. package/dist/chunk-D2QIPQ74.js.map +0 -1
  104. package/dist/chunk-F374BNL4.js.map +0 -1
  105. package/dist/chunk-SCXXJDKQ.js.map +0 -1
  106. package/dist/chunk-ZVECQBGG.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/clipboard/clipboard.tsx","../../../src/components/clipboard/copy.tsx"],"names":["Ark","jsx","useClipboardContext"],"mappings":";;;;;;;;;;;;;;AAkDA,IAAM,cAAA,GAAiB,QAAA;AAIvB,IAAM,YAAA,GAAe,CAAC,EAAE,KAAA,EAAM,KAAyB;AACrD,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,mBAAA,EAAoB;AACvC,EAAA,uBACE,GAAA,CAAC,UAAK,IAAA,EAAK,QAAA,EAAS,WAAU,SAAA,EAC3B,QAAA,EAAA,MAAA,GAAS,QAAQ,EAAA,EACpB,CAAA;AAEJ,CAAA;AAuBA,IAAM,OAAO,CAAC;AAAA,EACZ,QAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA0B;AACxB,EAAA,MAAM,EAAE,MAAA,GAAS,cAAA,EAAgB,GAAG,eAAA,EAAgB,GAAI,gBAAgB,EAAC;AACzE,EAAA,uBACE,GAAA;AAAA,IAACA,WAAA,CAAI,IAAA;AAAA,IAAJ;AAAA,MACC,eAAe,QAAA,GAAW,CAAC,YAAY,QAAA,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A;AAAA,IACA,OAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IAEC,QAAA,EAAA,OAAO,QAAA,KAAa,UAAA,mBACnBA,IAAC,cAAA,EAAA,EAAgB,QAAA,EAAS,CAAA,mBAE1BA,GAAAA,CAAC,SAAA,CAAU,OAAA,EAAV,EAAkB,SAAO,IAAA,EACxB,QAAA,kBAAAA,GAAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAkB,IAAA,EAAY,MAAA,EAAgB,KAAA,EAAc,QACtE,QAAA,kBAAAA,GAAAA,CAAC,aAAA,EAAA,EAAc,KAAA,EAAO,UAAA,CAAW,aAAA,EAAe,KAAK,CAAA,EAAG,GAC1D,CAAA,EACF;AAAA;AAEJ","file":"index.js","sourcesContent":["\"use client\"\n\nimport { Clipboard as Ark, useClipboardContext } from \"@ark-ui/react/clipboard\"\nimport type { ComponentProps, ReactNode } from \"react\"\nimport { composeChildren } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { InputBase, type InputSize, type InputVariant, inputControlClasses } from \"../input/input\"\n\n/**\n * Clipboard — a styled compound over Ark UI's Clipboard machine, for the\n * \"read-only value + copy button\" field pattern (share links, API keys,\n * invite codes). `Object.assign`-free parts namespace only, no bare-invocation\n * convenience form — matches `Popover`'s shape, since a rich field like this\n * isn't a single-prop drop-in the way `Copy` (this package's simple icon-button\n * preset) is.\n *\n * <Clipboard.Root value={link}>\n * <Clipboard.Label>Share link</Clipboard.Label>\n * <Clipboard.Input>\n * <Clipboard.Trigger asChild>\n * <ActionIcon variant=\"subtle\" aria-label=\"Copy link\">\n * <Clipboard.Indicator copied={<CheckIcon />}>\n * <CopyIcon />\n * </Clipboard.Indicator>\n * </ActionIcon>\n * </Clipboard.Trigger>\n * </Clipboard.Input>\n * </Clipboard.Root>\n *\n * For the common \"just an icon button, no visible value\" case, reach for\n * `Copy` instead — it composes this same machine with `ActionIcon` internally.\n */\n\n/** Ark's own `translations` prop type, derived structurally rather than imported\n * by name — `IntlTranslations` lives in `@zag-js/clipboard`, a transitive\n * dependency of the `@ark-ui/react` peer dep, not one this package declares\n * itself (same derivation `Calendar` uses for its own translations type).\n * Ark's shape is already fully partial (a single optional `triggerLabel`) and\n * its machine merges it over its own English default, so `Root` forwards only\n * the keys the caller set. */\ntype ArkClipboardTranslations = NonNullable<ComponentProps<typeof Ark.Root>[\"translations\"]>\n\nexport type ClipboardTranslations = ArkClipboardTranslations & {\n /** Announced through a polite `role=\"status\"` region once the value is copied. Ark's\n * `triggerLabel` swap renames the focused button, which screen readers don't re-read. */\n copied?: string\n}\n\nconst DEFAULT_COPIED = \"Copied\"\n\n/** The live region behind the icon swap: always mounted (a region that appears\n * together with its text isn't announced), filled only while `copied`. */\nconst CopiedStatus = ({ label }: { label: string }) => {\n const { copied } = useClipboardContext()\n return (\n <span role=\"status\" className=\"sr-only\">\n {copied ? label : \"\"}\n </span>\n )\n}\n\nexport type ClipboardRootProps = Omit<\n ComponentProps<typeof Ark.Root>,\n \"onChange\" | \"onValueChange\" | \"onStatusChange\" | \"translations\"\n> &\n WithTestId & {\n /** Flattened from Ark's `onValueChange` — the next clipboard value. */\n onChange?: (value: string) => void\n /** Flattened from Ark's `onStatusChange` — fires `true` once the value is\n * copied. Ark's machine only emits this on copy, not on the automatic\n * revert to idle after `timeout` — read `Clipboard.Indicator` (or its\n * `copied` render prop) for the live state instead. */\n onCopiedChange?: (copied: boolean) => void\n /** Microcopy: Ark's `triggerLabel` (the trigger's name, copied or not) and `copied`\n * (the status announced on copy). English defaults; set only the keys you translate. */\n translations?: ClipboardTranslations\n }\n\n/** Owns open-ended clipboard state (value + copied/idle) and renders the real\n * `<div>` the rest of the compound reads context from, plus the visually\n * hidden status that announces a copy (positioned, so it can't escape a\n * scroller). */\nconst Root = ({\n onChange,\n onCopiedChange,\n testId,\n translations,\n asChild,\n className,\n children,\n ...rest\n}: ClipboardRootProps) => {\n const { copied = DEFAULT_COPIED, ...arkTranslations } = translations ?? {}\n return (\n <Ark.Root\n onValueChange={onChange ? (details) => onChange(details.value) : undefined}\n onStatusChange={onCopiedChange ? (details) => onCopiedChange(details.copied) : undefined}\n translations={arkTranslations}\n asChild={asChild}\n className={cn(\"relative\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => (\n <>\n {own}\n <CopiedStatus label={copied} />\n </>\n ))}\n </Ark.Root>\n )\n}\n\nexport type ClipboardInputProps = Omit<ComponentProps<typeof Ark.Input>, \"size\" | \"readOnly\"> &\n WithTestId & {\n /** Shell treatment — same scale as `Input`'s. */\n variant?: InputVariant\n /** Height step — same scale as `Input`'s. */\n size?: InputSize\n /** The copy `Trigger`, rendered as a real sibling of the input inside the\n * shell — pass it as `children`, not via a decorative `endSlot` (whose\n * wrapper is `aria-hidden` and would hide an interactive trigger from\n * assistive tech; see `PasswordInput`'s reveal toggle for the same call). */\n children?: ReactNode\n classNames?: { root?: string; input?: string }\n }\n\n/** The clipboard value, in the kit's shared `InputBase` shell — reused\n * directly (like `Input` / `PasswordInput` do), rather than through a\n * separate `Clipboard.Control` shell. `Clipboard.Control` (Ark's raw part,\n * re-exported below) stays available for consumers who want a different\n * layout and just need its `data-copied` attribute.\n *\n * Always read-only: Ark's own machine already sets `readOnly` on the real\n * `<input>` it renders; the `readOnly` given to `InputBase` here just mirrors\n * that onto the shell's own `data-readonly` hook. */\nconst Input = ({\n variant,\n size,\n className,\n classNames,\n children,\n testId,\n asChild,\n ...rest\n}: ClipboardInputProps) => (\n <InputBase variant={variant} size={size} readOnly className={cn(className, classNames?.root)}>\n {/* `children` is the trailing slot (usually the copy trigger), except under\n `asChild`, where the single child is the input element itself. */}\n <Ark.Input\n asChild={asChild}\n className={cn(inputControlClasses, classNames?.input)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {asChild ? children : undefined}\n </Ark.Input>\n {!asChild && children}\n </InputBase>\n)\n\nexport const Clipboard = {\n Root,\n /** Ark's raw `Label` part — a real `<label>`; unstyled by default, size/style\n * it like any other field label (or reuse `Field`'s own `fieldLabel`). */\n Label: Ark.Label,\n /** Ark's raw `Control` part — wraps `Input` (+ `Trigger`) when you want a\n * different shell than `InputBase`; carries `data-copied` for that case. */\n Control: Ark.Control,\n Input,\n /** Ark's raw `Trigger` part — a real `<button>`; `asChild` to swap in\n * `ActionIcon` or any other trigger element. */\n Trigger: Ark.Trigger,\n /** Ark's raw `Indicator` part — pass `copied={<CheckIcon />}` to swap content\n * once the value is copied, reverting once the state returns to idle. */\n Indicator: Ark.Indicator,\n /** Ark's raw `ValueText` part — renders the live value as plain (non-input)\n * text, for a read-only display that isn't a form control. */\n ValueText: Ark.ValueText,\n}\n","\"use client\"\n\nimport { useClipboardContext } from \"@ark-ui/react/clipboard\"\nimport { CheckIcon, CopyIcon } from \"lucide-react\"\nimport type { ReactNode } from \"react\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { ActionIcon, type ActionIconProps } from \"../action-icon/action-icon\"\nimport { Clipboard, type ClipboardTranslations } from \"./clipboard\"\n\nexport type CopyIconSlot = \"copy\" | \"copied\"\nexport type CopyIcons = IconMap<CopyIconSlot>\n\n/** The default icons: the copy glyph, and the check it swaps to once copied. */\nexport const DEFAULT_ICONS: Record<CopyIconSlot, ReactNode> = {\n copy: <CopyIcon className={iconStroke} />,\n copied: <CheckIcon className={iconStroke} />,\n}\n\n/** Reads the live `copied` flag off the enclosing `Clipboard.Root` — context,\n * not the one-shot `onStatusChange` callback, which never fires `false` on the\n * automatic revert to idle — and draws the matching icon. */\nconst CopyIndicator = ({ icons }: { icons: Record<CopyIconSlot, ReactNode> }) => {\n const { copied } = useClipboardContext()\n return copied ? icons.copied : icons.copy\n}\n\nexport type CopyRenderState = {\n /** Whether `value` was just copied to the clipboard — flips back to\n * `false` once `timeout` elapses. */\n copied: boolean\n /** Writes `value` to the clipboard — the exact same action `Clipboard.Trigger`\n * itself calls on click. Wire it to your own trigger's `onClick`; `Copy`\n * doesn't attach it for you. */\n copy: () => void\n}\n\n/** Reads `{ copied, copy }` off the enclosing `Clipboard.Root` context and hands\n * them straight to the render-prop `children` — no markup of its own, so the\n * consumer's returned JSX is the only thing rendered. `copy` is Ark's own\n * `copy()` action (`send({ type: \"COPY\" })`), so calling it behaves\n * identically to clicking the default `Clipboard.Trigger`: it writes `value`\n * to the clipboard, flips `copied`, fires `Root`'s `onCopiedChange`, and\n * reverts after `timeout`. */\nconst CopyRenderProp = ({ children }: { children: (state: CopyRenderState) => ReactNode }) => {\n const { copied, copy } = useClipboardContext()\n return children({ copied, copy })\n}\n\nexport type CopyProps = Pick<\n ActionIconProps,\n \"variant\" | \"size\" | \"radius\" | \"color\" | \"testId\"\n> & {\n /** The value copied to the clipboard on click. */\n value: string\n /** Ms before the copied state reverts to idle. Ark's own default (3000). */\n timeout?: number\n /** Fires `true` once the value is copied — flattened from Ark's\n * `onStatusChange`. Ark's machine only emits this on copy, never on the\n * automatic revert to idle after `timeout` (an upstream characteristic of\n * the machine, not a gap in this wrapper). */\n onCopiedChange?: (copied: boolean) => void\n /** Replaces the default icons: `copy`, and `copied` once the value is copied. A missing key\n * keeps its default; a function `children` renders its own trigger instead. */\n icons?: CopyIcons\n /** Microcopy: the button's `triggerLabel` and the `copied` status announced on copy. English\n * defaults; set only the keys you translate. */\n translations?: ClipboardTranslations\n /** Omit for the default rendering (an icon-button `ActionIcon` whose icon\n * swaps to a checkmark on copy). Pass a function instead to go fully\n * headless: `Copy` renders none of its own markup and instead calls this\n * with `{ copied, copy }`, letting you render whatever trigger you want —\n * your own button, a text link, a custom icon — wiring `copy` to its\n * `onClick` yourself. `copied` and `copy` still ride the same `timeout` /\n * `onCopiedChange` behavior as the default button.\n *\n * <Copy value={value}>\n * {({ copied, copy }) => (\n * <button type=\"button\" onClick={copy}>\n * {copied ? \"Copied!\" : \"Copy\"}\n * </button>\n * )}\n * </Copy>\n */\n children?: (state: CopyRenderState) => ReactNode\n}\n\n/**\n * Copy — a one-line preset: `Clipboard.Root` + `Clipboard.Trigger` wrapping this\n * kit's own `ActionIcon`. No visible input, just an icon button whose icon\n * swaps to a checkmark on copy and reverts to the copy icon after `timeout`.\n * `variant` / `size` / `radius` / `color` forward straight to `ActionIcon` — see\n * its own docs for that model.\n *\n * <Copy value=\"https://example.com/s/abc123\" />\n *\n * The accessible name comes from Ark's own `\"Copy to clipboard\"` /\n * `\"Copied to clipboard\"` translations, and a copy is announced as \"Copied\"\n * through a visually hidden status; both are overridable via `translations`.\n * `Copy` is a closed leaf preset — it owns its `ActionIcon` outright and\n * doesn't accept `asChild` or a custom `aria-label`; compose `Clipboard.Root` /\n * `Clipboard.Trigger` directly (see the `Clipboard` docs) for a different\n * trigger element.\n *\n * For anything else — a text link, a custom icon, your own button styling —\n * pass a function as `children` instead and go headless: `Copy` then renders\n * only the function's own return value, no `ActionIcon`/icon-swap markup of\n * its own, and hands you `{ copied, copy }` to build the trigger yourself.\n *\n * <Copy value=\"https://example.com/s/abc123\">\n * {({ copied, copy }) => (\n * <button type=\"button\" onClick={copy}>{copied ? \"Copied!\" : \"Copy\"}</button>\n * )}\n * </Copy>\n */\nexport const Copy = ({\n value,\n timeout,\n onCopiedChange,\n variant,\n size,\n radius,\n color,\n testId,\n icons,\n translations,\n children,\n}: CopyProps) => (\n <Clipboard.Root\n value={value}\n timeout={timeout}\n onCopiedChange={onCopiedChange}\n translations={translations}\n >\n {typeof children === \"function\" ? (\n <CopyRenderProp>{children}</CopyRenderProp>\n ) : (\n <Clipboard.Trigger asChild>\n <ActionIcon variant={variant} size={size} radius={radius} color={color} testId={testId}>\n <CopyIndicator icons={mergeIcons(DEFAULT_ICONS, icons)} />\n </ActionIcon>\n </Clipboard.Trigger>\n )}\n </Clipboard.Root>\n)\n"]}
1
+ {"version":3,"sources":["../../../src/components/clipboard/clipboard.tsx","../../../src/components/clipboard/copy.tsx"],"names":["Ark","jsx","useClipboardContext"],"mappings":";;;;;;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GAAgB,CAAC,EAAE,KAAA,EAAM,KAAkD;AAC/E,EAAA,MAAM,EAAE,MAAA,EAAO,GAAIC,mBAAAA,EAAoB;AACvC,EAAA,OAAO,MAAA,GAAS,KAAA,CAAM,MAAA,GAAS,KAAA,CAAM,IAAA;AACvC,CAAA;AAmBA,IAAM,cAAA,GAAiB,CAAC,EAAE,QAAA,EAAS,KAA2D;AAC5F,EAAA,MAAM,EAAE,MAAA,EAAQ,IAAA,EAAK,GAAIA,mBAAAA,EAAoB;AAC7C,EAAA,OAAO,QAAA,CAAS,EAAE,MAAA,EAAQ,IAAA,EAAM,CAAA;AAClC,CAAA;AAoEO,IAAM,OAAO,CAAC;AAAA,EACnB,KAAA;AAAA,EACA,OAAA;AAAA,EACA,cAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAAA,qBACED,GAAAA;AAAA,EAAC,SAAA,CAAU,IAAA;AAAA,EAAV;AAAA,IACC,KAAA;AAAA,IACA,OAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IAEC,QAAA,EAAA,OAAO,QAAA,KAAa,UAAA,mBACnBA,IAAC,cAAA,EAAA,EAAgB,QAAA,EAAS,CAAA,mBAE1BA,GAAAA,CAAC,SAAA,CAAU,OAAA,EAAV,EAAkB,SAAO,IAAA,EACxB,QAAA,kBAAAA,GAAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAkB,IAAA,EAAY,MAAA,EAAgB,KAAA,EAAc,QACtE,QAAA,kBAAAA,GAAAA,CAAC,aAAA,EAAA,EAAc,KAAA,EAAO,UAAA,CAAW,aAAA,EAAe,KAAK,CAAA,EAAG,GAC1D,CAAA,EACF;AAAA;AAEJ","file":"index.js","sourcesContent":["\"use client\"\n\nimport { Clipboard as Ark, useClipboardContext } from \"@ark-ui/react/clipboard\"\nimport type { ComponentProps, ReactNode } from \"react\"\nimport { composeChildren } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { InputBase, type InputSize, type InputVariant, inputControlClasses } from \"../input/input\"\n\n/**\n * Clipboard — a styled compound over Ark UI's Clipboard machine, for the\n * \"read-only value + copy button\" field pattern (share links, API keys,\n * invite codes). `Object.assign`-free parts namespace only, no bare-invocation\n * convenience form — matches `Popover`'s shape, since a rich field like this\n * isn't a single-prop drop-in the way `Copy` (this package's simple icon-button\n * preset) is.\n *\n * <Clipboard.Root value={link}>\n * <Clipboard.Label>Share link</Clipboard.Label>\n * <Clipboard.Input>\n * <Clipboard.Trigger asChild>\n * <ActionIcon variant=\"subtle\" aria-label=\"Copy link\">\n * <Clipboard.Indicator copied={<CheckIcon />}>\n * <CopyIcon />\n * </Clipboard.Indicator>\n * </ActionIcon>\n * </Clipboard.Trigger>\n * </Clipboard.Input>\n * </Clipboard.Root>\n *\n * For the common \"just an icon button, no visible value\" case, reach for\n * `Copy` instead — it composes this same machine with `ActionIcon` internally.\n */\n\n/** Ark's own `translations` prop type, derived structurally rather than imported\n * by name — `IntlTranslations` lives in `@zag-js/clipboard`, a transitive\n * dependency of the `@ark-ui/react` peer dep, not one this package declares\n * itself (same derivation `Calendar` uses for its own translations type).\n * Ark's shape is already fully partial (a single optional `triggerLabel`) and\n * its machine merges it over its own English default, so `Root` forwards only\n * the keys the caller set. */\ntype ArkClipboardTranslations = NonNullable<ComponentProps<typeof Ark.Root>[\"translations\"]>\n\nexport type ClipboardTranslations = ArkClipboardTranslations & {\n /** Announced through a polite `role=\"status\"` region once the value is copied. Ark's\n * `triggerLabel` swap renames the focused button, which screen readers don't re-read. */\n copied?: string\n}\n\nconst DEFAULT_COPIED = \"Copied\"\n\n/** The live region behind the icon swap: always mounted (a region that appears\n * together with its text isn't announced), filled only while `copied`. */\nconst CopiedStatus = ({ label }: { label: string }) => {\n const { copied } = useClipboardContext()\n return (\n <span role=\"status\" className=\"sr-only\">\n {copied ? label : \"\"}\n </span>\n )\n}\n\nexport type ClipboardRootProps = Omit<\n ComponentProps<typeof Ark.Root>,\n \"onChange\" | \"onValueChange\" | \"onStatusChange\" | \"translations\"\n> &\n WithTestId & {\n /** Flattened from Ark's `onValueChange` — the next clipboard value. */\n onChange?: (value: string) => void\n /** Flattened from Ark's `onStatusChange` — fires `true` once the value is\n * copied. Ark's machine only emits this on copy, not on the automatic\n * revert to idle after `timeout` — read `Clipboard.Indicator` (or its\n * `copied` render prop) for the live state instead. */\n onCopiedChange?: (copied: boolean) => void\n /** Microcopy: Ark's `triggerLabel` (the trigger's name, copied or not) and `copied`\n * (the status announced on copy). English defaults; set only the keys you translate. */\n translations?: ClipboardTranslations\n }\n\n/** Owns open-ended clipboard state (value + copied/idle) and renders the real\n * `<div>` the rest of the compound reads context from, plus the visually\n * hidden status that announces a copy (positioned, so it can't escape a\n * scroller). */\nconst Root = ({\n onChange,\n onCopiedChange,\n testId,\n translations,\n asChild,\n className,\n children,\n ...rest\n}: ClipboardRootProps) => {\n const { copied = DEFAULT_COPIED, ...arkTranslations } = translations ?? {}\n return (\n <Ark.Root\n onValueChange={onChange ? (details) => onChange(details.value) : undefined}\n onStatusChange={onCopiedChange ? (details) => onCopiedChange(details.copied) : undefined}\n translations={arkTranslations}\n asChild={asChild}\n className={cn(\"relative\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => (\n <>\n {own}\n <CopiedStatus label={copied} />\n </>\n ))}\n </Ark.Root>\n )\n}\n\nexport type ClipboardInputProps = Omit<ComponentProps<typeof Ark.Input>, \"size\" | \"readOnly\"> &\n WithTestId & {\n /** Shell treatment — same scale as `Input`'s. */\n variant?: InputVariant\n /** Height step — same scale as `Input`'s. */\n size?: InputSize\n /** The copy `Trigger`, rendered as a real sibling of the input inside the\n * shell — pass it as `children`, not via a decorative `endSlot` (whose\n * wrapper is `aria-hidden` and would hide an interactive trigger from\n * assistive tech; see `PasswordInput`'s reveal toggle for the same call). */\n children?: ReactNode\n classNames?: { root?: string; input?: string }\n }\n\n/** The clipboard value, in the kit's shared `InputBase` shell — reused\n * directly (like `Input` / `PasswordInput` do), rather than through a\n * separate `Clipboard.Control` shell. `Clipboard.Control` (Ark's raw part,\n * re-exported below) stays available for consumers who want a different\n * layout and just need its `data-copied` attribute.\n *\n * Always read-only: Ark's own machine already sets `readOnly` on the real\n * `<input>` it renders; the `readOnly` given to `InputBase` here just mirrors\n * that onto the shell's own `data-readonly` hook. */\nconst Input = ({\n variant,\n size,\n className,\n classNames,\n children,\n testId,\n asChild,\n ...rest\n}: ClipboardInputProps) => (\n <InputBase variant={variant} size={size} readOnly className={cn(className, classNames?.root)}>\n {/* `children` is the trailing slot (usually the copy trigger), except under\n `asChild`, where the single child is the input element itself. */}\n <Ark.Input\n asChild={asChild}\n className={cn(inputControlClasses, classNames?.input)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {asChild ? children : undefined}\n </Ark.Input>\n {!asChild && children}\n </InputBase>\n)\n\nexport const Clipboard = {\n Root,\n /** Ark's raw `Label` part — a real `<label>`; unstyled by default, size/style\n * it like any other field label (or reuse `Field`'s own `fieldLabel`). */\n Label: Ark.Label,\n /** Ark's raw `Control` part — wraps `Input` (+ `Trigger`) when you want a\n * different shell than `InputBase`; carries `data-copied` for that case. */\n Control: Ark.Control,\n Input,\n /** Ark's raw `Trigger` part — a real `<button>`; `asChild` to swap in\n * `ActionIcon` or any other trigger element. */\n Trigger: Ark.Trigger,\n /** Ark's raw `Indicator` part — pass `copied={<CheckIcon />}` to swap content\n * once the value is copied, reverting once the state returns to idle. */\n Indicator: Ark.Indicator,\n /** Ark's raw `ValueText` part — renders the live value as plain (non-input)\n * text, for a read-only display that isn't a form control. */\n ValueText: Ark.ValueText,\n}\n","\"use client\"\n\nimport { useClipboardContext } from \"@ark-ui/react/clipboard\"\nimport { CheckIcon, CopyIcon } from \"lucide-react\"\nimport type { ReactNode } from \"react\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { ActionIcon, type ActionIconProps } from \"../action-icon/action-icon\"\nimport { Clipboard, type ClipboardTranslations } from \"./clipboard\"\n\nexport type CopyIconSlot = \"copy\" | \"copied\"\nexport type CopyIcons = IconMap<CopyIconSlot>\n\n/** The default icons: the copy glyph, and the check it swaps to once copied. */\nexport const DEFAULT_ICONS: Record<CopyIconSlot, ReactNode> = {\n copy: <CopyIcon className={iconStroke} />,\n copied: <CheckIcon className={iconStroke} />,\n}\n\n/** Reads the live `copied` flag off the enclosing `Clipboard.Root` — context,\n * not the one-shot `onStatusChange` callback, which never fires `false` on the\n * automatic revert to idle — and draws the matching icon. */\nconst CopyIndicator = ({ icons }: { icons: Record<CopyIconSlot, ReactNode> }) => {\n const { copied } = useClipboardContext()\n return copied ? icons.copied : icons.copy\n}\n\nexport type CopyRenderState = {\n /** Whether `value` was just copied to the clipboard — flips back to\n * `false` once `timeout` elapses. */\n copied: boolean\n /** Writes `value` to the clipboard — the exact same action `Clipboard.Trigger`\n * itself calls on click. Wire it to your own trigger's `onClick`; `Copy`\n * doesn't attach it for you. */\n copy: () => void\n}\n\n/** Reads `{ copied, copy }` off the enclosing `Clipboard.Root` context and hands\n * them straight to the render-prop `children` — no markup of its own, so the\n * consumer's returned JSX is the only thing rendered. `copy` is Ark's own\n * `copy()` action (`send({ type: \"COPY\" })`), so calling it behaves\n * identically to clicking the default `Clipboard.Trigger`: it writes `value`\n * to the clipboard, flips `copied`, fires `Root`'s `onCopiedChange`, and\n * reverts after `timeout`. */\nconst CopyRenderProp = ({ children }: { children: (state: CopyRenderState) => ReactNode }) => {\n const { copied, copy } = useClipboardContext()\n return children({ copied, copy })\n}\n\nexport type CopyProps = Pick<\n ActionIconProps,\n \"variant\" | \"size\" | \"radius\" | \"color\" | \"testId\"\n> & {\n /** The value copied to the clipboard on click. */\n value: string\n /** Ms before the copied state reverts to idle. Ark's own default (3000). */\n timeout?: number\n /** Fires `true` once the value is copied — flattened from Ark's\n * `onStatusChange`. Ark's machine only emits this on copy, never on the\n * automatic revert to idle after `timeout` (an upstream characteristic of\n * the machine, not a gap in this wrapper). */\n onCopiedChange?: (copied: boolean) => void\n /** Replaces the default icons: `copy`, and `copied` once the value is copied. A missing key\n * keeps its default; a function `children` renders its own trigger instead. */\n icons?: CopyIcons\n /** Microcopy: the button's `triggerLabel` and the `copied` status announced on copy. English\n * defaults; set only the keys you translate. */\n translations?: ClipboardTranslations\n /** Omit for the default rendering (an icon-button `ActionIcon` whose icon\n * swaps to a checkmark on copy). Pass a function instead to go fully\n * headless: `Copy` renders none of its own markup and instead calls this\n * with `{ copied, copy }`, letting you render whatever trigger you want —\n * your own button, a text link, a custom icon — wiring `copy` to its\n * `onClick` yourself. `copied` and `copy` still ride the same `timeout` /\n * `onCopiedChange` behavior as the default button.\n *\n * <Copy value={value}>\n * {({ copied, copy }) => (\n * <button type=\"button\" onClick={copy}>\n * {copied ? \"Copied!\" : \"Copy\"}\n * </button>\n * )}\n * </Copy>\n */\n children?: (state: CopyRenderState) => ReactNode\n}\n\n/**\n * Copy — a one-line preset: `Clipboard.Root` + `Clipboard.Trigger` wrapping this\n * kit's own `ActionIcon`. No visible input, just an icon button whose icon\n * swaps to a checkmark on copy and reverts to the copy icon after `timeout`.\n * `variant` / `size` / `radius` / `color` forward straight to `ActionIcon` — see\n * its own docs for that model.\n *\n * <Copy value=\"https://example.com/s/abc123\" />\n *\n * The accessible name comes from Ark's own `\"Copy to clipboard\"` /\n * `\"Copied to clipboard\"` translations, and a copy is announced as \"Copied\"\n * through a visually hidden status; both are overridable via `translations`.\n * `Copy` is a closed leaf preset — it owns its `ActionIcon` outright and\n * doesn't accept `asChild` or a custom `aria-label`; compose `Clipboard.Root` /\n * `Clipboard.Trigger` directly (see the `Clipboard` docs) for a different\n * trigger element.\n *\n * For anything else — a text link, a custom icon, your own button styling —\n * pass a function as `children` instead and go headless: `Copy` then renders\n * only the function's own return value, no `ActionIcon`/icon-swap markup of\n * its own, and hands you `{ copied, copy }` to build the trigger yourself.\n *\n * <Copy value=\"https://example.com/s/abc123\">\n * {({ copied, copy }) => (\n * <button type=\"button\" onClick={copy}>{copied ? \"Copied!\" : \"Copy\"}</button>\n * )}\n * </Copy>\n */\nexport const Copy = ({\n value,\n timeout,\n onCopiedChange,\n variant,\n size,\n radius,\n color,\n testId,\n icons,\n translations,\n children,\n}: CopyProps) => (\n <Clipboard.Root\n value={value}\n timeout={timeout}\n onCopiedChange={onCopiedChange}\n translations={translations}\n >\n {typeof children === \"function\" ? (\n <CopyRenderProp>{children}</CopyRenderProp>\n ) : (\n <Clipboard.Trigger asChild>\n <ActionIcon variant={variant} size={size} radius={radius} color={color} testId={testId}>\n <CopyIndicator icons={mergeIcons(DEFAULT_ICONS, icons)} />\n </ActionIcon>\n </Clipboard.Trigger>\n )}\n </Clipboard.Root>\n)\n"]}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { ThemeIcon } from '../../chunk-F374BNL4.js';
2
+ import { ThemeIcon } from '../../chunk-YVTM2KRR.js';
3
3
  import '../../chunk-J2WSKRJW.js';
4
4
  import { Table } from '../../chunk-PEHFWGTT.js';
5
5
  import { Text } from '../../chunk-XKDL4QS6.js';
@@ -13,30 +13,30 @@ import '../../chunk-XFEPUGUZ.js';
13
13
  import '../../chunk-FMMKEYHB.js';
14
14
  import { ComboboxList } from '../../chunk-NNPSBC7O.js';
15
15
  import '../../chunk-ISX3AM32.js';
16
- import { serializeDateValue, DatePicker } from '../../chunk-MNYY7UU2.js';
16
+ import { serializeDateValue, DatePicker } from '../../chunk-GJFCIG34.js';
17
17
  import { resolveHourCycle } from '../../chunk-ULF5LOBS.js';
18
18
  import '../../chunk-NF2PBGD3.js';
19
19
  import { NUMBER_INPUT_DEFAULT_TRANSLATIONS, NumberInput } from '../../chunk-SBZJGFZ6.js';
20
20
  import { Checkbox } from '../../chunk-7E7JNWOC.js';
21
21
  import '../../chunk-NLOBBJAA.js';
22
- import { resolveCalendarTranslations } from '../../chunk-E52Z2FKU.js';
22
+ import { resolveCalendarTranslations } from '../../chunk-7BY5I2RB.js';
23
23
  import '../../chunk-ZB5VMGKB.js';
24
24
  import '../../chunk-ZP6EBROY.js';
25
25
  import { Select } from '../../chunk-IA6DCC3N.js';
26
26
  import { Skeleton } from '../../chunk-TWNIAF7K.js';
27
27
  import { Card } from '../../chunk-KKLCHLCZ.js';
28
- import { Drawer } from '../../chunk-L24N5EON.js';
29
- import '../../chunk-4D2V4JE4.js';
28
+ import { Drawer } from '../../chunk-P7SH3XWY.js';
29
+ import '../../chunk-KYVXPSNW.js';
30
30
  import { normalizeSelectData } from '../../chunk-7TDHT3QD.js';
31
31
  import { COMBOBOX_DEFAULT_TRANSLATIONS } from '../../chunk-QRNQQIQM.js';
32
32
  import '../../chunk-5FDOOG4J.js';
33
33
  import { Input } from '../../chunk-I4B3N3UX.js';
34
34
  import '../../chunk-X6DESK37.js';
35
35
  import '../../chunk-DHM4IG2O.js';
36
- import { Badge } from '../../chunk-ZVECQBGG.js';
36
+ import { Badge } from '../../chunk-KNGSO7A3.js';
37
37
  import '../../chunk-SKPM2FRX.js';
38
38
  import '../../chunk-ORTCK34Y.js';
39
- import { Button } from '../../chunk-SCXXJDKQ.js';
39
+ import { Button } from '../../chunk-SP6LCCTZ.js';
40
40
  import { useDebouncedCallback } from '../../chunk-ZYX564HO.js';
41
41
  import '../../chunk-HBWV5EPU.js';
42
42
  import { useLocale, useTimeZone } from '../../chunk-IUK7OJXZ.js';
@@ -45,13 +45,14 @@ import '../../chunk-HWBFRDX7.js';
45
45
  import { Tooltip } from '../../chunk-2W7H43WL.js';
46
46
  import '../../chunk-V6PY7C6S.js';
47
47
  import '../../chunk-SLUOF7XW.js';
48
- import { ActionIcon } from '../../chunk-BMEJBY6H.js';
48
+ import { ActionIcon } from '../../chunk-B5YHYI7E.js';
49
+ import '../../chunk-6B2GNPJP.js';
49
50
  import { devWarnOnce } from '../../chunk-LIZWCWED.js';
50
51
  import { useUncontrolled } from '../../chunk-PMUCGFY5.js';
51
52
  import '../../chunk-BUIHQJGE.js';
52
53
  import '../../chunk-6YNLRQ25.js';
53
54
  import { iconStroke, mergeIcons } from '../../chunk-XXOR34T4.js';
54
- import '../../chunk-D2QIPQ74.js';
55
+ import '../../chunk-W3XX7BYT.js';
55
56
  import '../../chunk-R5LYFTHA.js';
56
57
  import { props } from '../../chunk-WYCMIIRR.js';
57
58
  import { focusStyles } from '../../chunk-C6NVU4F7.js';