@acronis-platform/ui-react 0.36.0 → 0.43.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 (102) hide show
  1. package/dist/components/ui/card/card.js +92 -0
  2. package/dist/components/ui/card/card.js.map +1 -0
  3. package/dist/components/ui/data-table/data-table-column-header.js +48 -0
  4. package/dist/components/ui/data-table/data-table-column-header.js.map +1 -0
  5. package/dist/components/ui/data-table/data-table-pagination.js +89 -0
  6. package/dist/components/ui/data-table/data-table-pagination.js.map +1 -0
  7. package/dist/components/ui/data-table/data-table-toolbar.js +46 -0
  8. package/dist/components/ui/data-table/data-table-toolbar.js.map +1 -0
  9. package/dist/components/ui/data-table/data-table-view-options.js +40 -0
  10. package/dist/components/ui/data-table/data-table-view-options.js.map +1 -0
  11. package/dist/components/ui/data-table/data-table.js +89 -0
  12. package/dist/components/ui/data-table/data-table.js.map +1 -0
  13. package/dist/components/ui/dialog/dialog.js +140 -0
  14. package/dist/components/ui/dialog/dialog.js.map +1 -0
  15. package/dist/components/ui/dropdown-menu/dropdown-menu.js +159 -0
  16. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -0
  17. package/dist/components/ui/empty/empty.js +78 -0
  18. package/dist/components/ui/empty/empty.js.map +1 -0
  19. package/dist/components/ui/input/input.js +2 -2
  20. package/dist/components/ui/input/input.js.map +1 -1
  21. package/dist/components/ui/input-search/input-search.js +4 -4
  22. package/dist/components/ui/input-search/input-search.js.map +1 -1
  23. package/dist/components/ui/input-text/input-text.js +1 -1
  24. package/dist/components/ui/input-text/input-text.js.map +1 -1
  25. package/dist/components/ui/label/label.js +12 -0
  26. package/dist/components/ui/label/label.js.map +1 -0
  27. package/dist/components/ui/popover/popover.js +48 -0
  28. package/dist/components/ui/popover/popover.js.map +1 -0
  29. package/dist/components/ui/progress/progress.js +30 -0
  30. package/dist/components/ui/progress/progress.js.map +1 -0
  31. package/dist/components/ui/search/search.js +2 -2
  32. package/dist/components/ui/search/search.js.map +1 -1
  33. package/dist/components/ui/separator/separator.js +22 -0
  34. package/dist/components/ui/separator/separator.js.map +1 -0
  35. package/dist/components/ui/spinner/spinner.js +38 -0
  36. package/dist/components/ui/spinner/spinner.js.map +1 -0
  37. package/dist/components/ui/table/table.js +118 -0
  38. package/dist/components/ui/table/table.js.map +1 -0
  39. package/dist/components/ui/tabs/tabs.js +44 -0
  40. package/dist/components/ui/tabs/tabs.js.map +1 -0
  41. package/dist/components/ui/toast/toast.js +83 -0
  42. package/dist/components/ui/toast/toast.js.map +1 -0
  43. package/dist/components/ui/widget-placeholder/widget-placeholder.js +106 -0
  44. package/dist/components/ui/widget-placeholder/widget-placeholder.js.map +1 -0
  45. package/dist/index.js +210 -113
  46. package/dist/index.js.map +1 -1
  47. package/dist/node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-table/build/lib/index.js +104 -0
  48. package/dist/node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-table/build/lib/index.js.map +1 -0
  49. package/dist/node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js +1900 -0
  50. package/dist/node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -0
  51. package/dist/react.js +210 -113
  52. package/dist/react.js.map +1 -1
  53. package/dist/src/components/ui/card/card.d.ts +17 -0
  54. package/dist/src/components/ui/card/index.d.ts +1 -0
  55. package/dist/src/components/ui/data-table/data-table-column-header.d.ts +8 -0
  56. package/dist/src/components/ui/data-table/data-table-pagination.d.ts +8 -0
  57. package/dist/src/components/ui/data-table/data-table-toolbar.d.ts +9 -0
  58. package/dist/src/components/ui/data-table/data-table-view-options.d.ts +6 -0
  59. package/dist/src/components/ui/data-table/data-table.d.ts +24 -0
  60. package/dist/src/components/ui/data-table/data-table.docs.d.ts +22 -0
  61. package/dist/src/components/ui/data-table/index.d.ts +5 -0
  62. package/dist/src/components/ui/dialog/dialog.d.ts +39 -0
  63. package/dist/src/components/ui/dialog/dialog.docs.d.ts +24 -0
  64. package/dist/src/components/ui/dialog/index.d.ts +1 -0
  65. package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +39 -0
  66. package/dist/src/components/ui/dropdown-menu/dropdown-menu.docs.d.ts +25 -0
  67. package/dist/src/components/ui/dropdown-menu/index.d.ts +1 -0
  68. package/dist/src/components/ui/empty/empty.d.ts +9 -0
  69. package/dist/src/components/ui/empty/index.d.ts +1 -0
  70. package/dist/src/components/ui/input/index.d.ts +1 -1
  71. package/dist/src/components/ui/input/input.d.ts +3 -3
  72. package/dist/src/components/ui/input-search/input-search.d.ts +2 -2
  73. package/dist/src/components/ui/label/index.d.ts +1 -0
  74. package/dist/src/components/ui/label/label.d.ts +5 -0
  75. package/dist/src/components/ui/label/label.docs.d.ts +10 -0
  76. package/dist/src/components/ui/popover/index.d.ts +1 -0
  77. package/dist/src/components/ui/popover/popover.d.ts +27 -0
  78. package/dist/src/components/ui/popover/popover.docs.d.ts +25 -0
  79. package/dist/src/components/ui/progress/index.d.ts +1 -0
  80. package/dist/src/components/ui/progress/progress.d.ts +9 -0
  81. package/dist/src/components/ui/progress/progress.docs.d.ts +16 -0
  82. package/dist/src/components/ui/search/index.d.ts +1 -1
  83. package/dist/src/components/ui/search/search.d.ts +3 -3
  84. package/dist/src/components/ui/separator/index.d.ts +1 -0
  85. package/dist/src/components/ui/separator/separator.d.ts +3 -0
  86. package/dist/src/components/ui/spinner/index.d.ts +1 -0
  87. package/dist/src/components/ui/spinner/spinner.d.ts +9 -0
  88. package/dist/src/components/ui/table/index.d.ts +1 -0
  89. package/dist/src/components/ui/table/table.d.ts +23 -0
  90. package/dist/src/components/ui/tabs/index.d.ts +1 -0
  91. package/dist/src/components/ui/tabs/tabs.d.ts +6 -0
  92. package/dist/src/components/ui/tabs/tabs.docs.d.ts +25 -0
  93. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  94. package/dist/src/components/ui/toast/index.d.ts +1 -0
  95. package/dist/src/components/ui/toast/toast.d.ts +48 -0
  96. package/dist/src/components/ui/toast/toast.docs.d.ts +12 -0
  97. package/dist/src/components/ui/widget-placeholder/index.d.ts +1 -0
  98. package/dist/src/components/ui/widget-placeholder/widget-placeholder.d.ts +18 -0
  99. package/dist/src/components/ui/widget-placeholder/widget-placeholder.docs.d.ts +14 -0
  100. package/dist/src/index.d.ts +18 -2
  101. package/dist/ui-react.css +1 -1
  102. package/package.json +4 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.js","sources":["../../../../src/components/ui/dialog/dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { TimesIcon } from '@acronis-platform/icons-react/stroke-mono';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// Initial version ported from `@acronis-platform/shadcn-uikit`'s `dialog`\n// (packages/ui-legacy/src/components/ui/dialog.tsx). A modal overlay built on\n// the Base UI Dialog primitive (keyboard, focus trap, scroll lock, ARIA come\n// from Base UI). No `--ui-dialog-*` token tier exists yet, so this design-\n// pending v1 themes from the shared semantic tokens via bridged Tailwind names:\n// • overlay -> var(--ui-background-overlay-primary) (legacy `bg-black/80`)\n// • popup -> bg-muted = --ui-background-surface-secondary\n// • header / footer -> bg-background = --ui-background-surface-primary (white\n// bars over the muted body), divided by border-border\n// • title -> text-foreground / description -> text-muted-foreground\n// • close -> text-muted-foreground → hover text-foreground (replaces the\n// legacy opacity hack), focus ring var(--ui-focus-primary)\n// Enter/exit animations use `tw-animate-css` (imported in styles/index.css),\n// keyed to Base UI's data-[open] / data-[closed] state attributes — overlay\n// fades, popup fades + zooms. The `size` scale (max-width) mirrors the reference\n// design's six widths; until a `--ui-dialog-*` tier defines them, they are plain\n// max-width utilities. Reconcile against the real design with\n// `/figma-component Dialog <url> --update` once a mockup lands.\n\n// Popup width scale. `sm` (512px) is the default and matches the pre-size width.\nconst dialogContentVariants = cva(\n 'fixed left-1/2 top-1/2 z-50 flex w-full -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg bg-muted text-foreground shadow-lg duration-200 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95',\n {\n variants: {\n size: {\n xs: 'max-w-[464px]',\n sm: 'max-w-lg',\n md: 'max-w-2xl',\n lg: 'max-w-[832px]',\n xl: 'max-w-[992px]',\n '2xl': 'max-w-[1136px]',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n }\n);\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Backdrop>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Backdrop>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-[var(--ui-background-overlay-primary)] duration-200 data-[open]:animate-in data-[open]:fade-in-0 data-[closed]:animate-out data-[closed]:fade-out-0',\n className\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = 'DialogOverlay';\n\nexport interface DialogContentProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Popup>,\n VariantProps<typeof dialogContentVariants> {\n /**\n * Popup max-width. `sm` 512 · `xs` 464 · `md` 672 · `lg` 832 · `xl` 992 ·\n * `2xl` 1136 (px). Defaults to `sm`.\n */\n size?: VariantProps<typeof dialogContentVariants>['size'];\n /**\n * Render the content inside a portal (default `true`). Base UI requires the\n * Popup to sit in a Portal for correct stacking; set `false` for inline usage\n * (e.g. when the caller supplies its own `DialogPortal`, or in tests).\n */\n portal?: boolean;\n /**\n * Portal container. Pass a shadow-root mount for isolated-style previews\n * (the docs demos do this via `useShadowMount`).\n */\n portalContainer?: DialogPrimitive.Portal.Props['container'];\n /** Keep the content mounted while closed (Base UI `Portal` prop). */\n keepMounted?: DialogPrimitive.Portal.Props['keepMounted'];\n}\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Popup>,\n DialogContentProps\n>(\n (\n {\n className,\n children,\n size,\n portal = true,\n portalContainer,\n keepMounted,\n ...props\n },\n ref\n ) => {\n const popup = (\n <>\n <DialogOverlay />\n <DialogPrimitive.Popup\n ref={ref}\n className={cn(dialogContentVariants({ size }), className)}\n {...props}\n >\n {children}\n </DialogPrimitive.Popup>\n </>\n );\n\n return portal ? (\n <DialogPrimitive.Portal container={portalContainer} keepMounted={keepMounted}>\n {popup}\n </DialogPrimitive.Portal>\n ) : (\n popup\n );\n }\n);\nDialogContent.displayName = 'DialogContent';\n\nconst DialogHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex h-16 items-center gap-4 border-b border-border bg-background px-5 py-4',\n className\n )}\n {...props}\n />\n));\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex h-16 items-center justify-end gap-4 border-t border-border bg-background px-6 py-4',\n className\n )}\n {...props}\n />\n));\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex-1 overflow-auto p-6', className)} {...props} />\n));\nDialogBody.displayName = 'DialogBody';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n 'flex-1 text-2xl font-normal leading-8 text-foreground',\n className\n )}\n {...props}\n />\n));\nDialogTitle.displayName = 'DialogTitle';\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nDialogDescription.displayName = 'DialogDescription';\n\nconst DialogCloseButton = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Close>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Close\n ref={ref}\n className={cn(\n 'rounded p-1 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)] disabled:pointer-events-none',\n className\n )}\n {...props}\n >\n <TimesIcon size={24} />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n));\nDialogCloseButton.displayName = 'DialogCloseButton';\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogCloseButton,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogBody,\n DialogDescription,\n dialogContentVariants,\n};\n"],"names":["dialogContentVariants","cva","Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","jsx","cn","DialogContent","children","size","portal","portalContainer","keepMounted","popup","jsxs","Fragment","DialogHeader","DialogFooter","DialogBody","DialogTitle","DialogDescription","DialogCloseButton","TimesIcon"],"mappings":";;;;;;AA2BA,MAAMA,IAAwBC;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,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,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAE,EAACiB,GAAA,EAAU,MAAM,GAAA,CAAI;AAAA,MACrB,gBAAAjB,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CAAK;AAAA,IAAA;AAAA,EAAA;AACjC,CACD;AACDgB,EAAkB,cAAc;"}
@@ -0,0 +1,159 @@
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { Menu as n } from "@base-ui/react/menu";
4
+ import { CheckIcon as b, ChevronRightIcon as h } from "@acronis-platform/icons-react/stroke-mono";
5
+ import { cn as d } from "../../../lib/utils.js";
6
+ const T = n.Root, j = n.Trigger, G = n.Group, _ = n.Portal, L = n.SubmenuRoot, q = n.RadioGroup, p = "z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-border bg-background py-1 text-foreground shadow-md outline-none duration-200 data-[open]:animate-in data-[closed]:animate-out data-[open]:fade-in-0 data-[closed]:fade-out-0 data-[open]:zoom-in-95 data-[closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2", m = "relative flex cursor-default select-none items-center gap-2 px-4 py-2 text-sm leading-6 outline-none transition-colors data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", N = s.forwardRef(
7
+ ({
8
+ className: e,
9
+ side: o,
10
+ align: a,
11
+ sideOffset: r = 4,
12
+ portal: i = !0,
13
+ portalContainer: u,
14
+ keepMounted: f,
15
+ ...g
16
+ }, w) => {
17
+ const c = /* @__PURE__ */ t(
18
+ n.Positioner,
19
+ {
20
+ side: o,
21
+ align: a,
22
+ sideOffset: r,
23
+ className: "z-50",
24
+ children: /* @__PURE__ */ t(
25
+ n.Popup,
26
+ {
27
+ ref: w,
28
+ className: d(p, e),
29
+ ...g
30
+ }
31
+ )
32
+ }
33
+ );
34
+ return i ? /* @__PURE__ */ t(n.Portal, { container: u, keepMounted: f, children: c }) : c;
35
+ }
36
+ );
37
+ N.displayName = "DropdownMenuContent";
38
+ const M = s.forwardRef(({ className: e, sideOffset: o = 4, ...a }, r) => /* @__PURE__ */ t(n.Positioner, { sideOffset: o, className: "z-50", children: /* @__PURE__ */ t(
39
+ n.Popup,
40
+ {
41
+ ref: r,
42
+ className: d(p, e),
43
+ ...a
44
+ }
45
+ ) }));
46
+ M.displayName = "DropdownMenuSubContent";
47
+ const x = s.forwardRef(({ className: e, inset: o, ...a }, r) => /* @__PURE__ */ t(
48
+ n.Item,
49
+ {
50
+ ref: r,
51
+ className: d(m, o && "pl-8", e),
52
+ ...a
53
+ }
54
+ ));
55
+ x.displayName = "DropdownMenuItem";
56
+ const D = s.forwardRef(({ className: e, inset: o, children: a, ...r }, i) => /* @__PURE__ */ l(
57
+ n.SubmenuTrigger,
58
+ {
59
+ ref: i,
60
+ className: d(
61
+ m,
62
+ "data-[popup-open]:bg-accent",
63
+ o && "pl-8",
64
+ e
65
+ ),
66
+ ...r,
67
+ children: [
68
+ a,
69
+ /* @__PURE__ */ t(h, { className: "ml-auto" })
70
+ ]
71
+ }
72
+ ));
73
+ D.displayName = "DropdownMenuSubTrigger";
74
+ const y = s.forwardRef(({ className: e, children: o, ...a }, r) => /* @__PURE__ */ l(
75
+ n.CheckboxItem,
76
+ {
77
+ ref: r,
78
+ className: d(
79
+ "relative flex cursor-default select-none items-center py-2 pl-8 pr-4 text-sm leading-6 outline-none transition-colors data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
80
+ e
81
+ ),
82
+ ...a,
83
+ children: [
84
+ /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.CheckboxItemIndicator, { children: /* @__PURE__ */ t(b, { className: "size-4" }) }) }),
85
+ o
86
+ ]
87
+ }
88
+ ));
89
+ y.displayName = "DropdownMenuCheckboxItem";
90
+ const R = s.forwardRef(({ className: e, children: o, ...a }, r) => /* @__PURE__ */ l(
91
+ n.RadioItem,
92
+ {
93
+ ref: r,
94
+ className: d(
95
+ "relative flex cursor-default select-none items-center py-2 pl-8 pr-4 text-sm leading-6 outline-none transition-colors data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
96
+ e
97
+ ),
98
+ ...a,
99
+ children: [
100
+ /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.RadioItemIndicator, { children: /* @__PURE__ */ t("span", { className: "size-2 rounded-full bg-current" }) }) }),
101
+ o
102
+ ]
103
+ }
104
+ ));
105
+ R.displayName = "DropdownMenuRadioItem";
106
+ const v = s.forwardRef(({ className: e, inset: o, ...a }, r) => /* @__PURE__ */ t(
107
+ "div",
108
+ {
109
+ ref: r,
110
+ className: d(
111
+ "px-4 py-2 text-sm font-semibold leading-6",
112
+ o && "pl-8",
113
+ e
114
+ ),
115
+ ...a
116
+ }
117
+ ));
118
+ v.displayName = "DropdownMenuLabel";
119
+ const I = s.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
120
+ "div",
121
+ {
122
+ ref: a,
123
+ role: "separator",
124
+ className: d("my-1 h-px bg-border", e),
125
+ ...o
126
+ }
127
+ ));
128
+ I.displayName = "DropdownMenuSeparator";
129
+ function C({
130
+ className: e,
131
+ ...o
132
+ }) {
133
+ return /* @__PURE__ */ t(
134
+ "span",
135
+ {
136
+ className: d("ml-auto text-xs tracking-widest text-muted-foreground", e),
137
+ ...o
138
+ }
139
+ );
140
+ }
141
+ C.displayName = "DropdownMenuShortcut";
142
+ export {
143
+ T as DropdownMenu,
144
+ y as DropdownMenuCheckboxItem,
145
+ N as DropdownMenuContent,
146
+ G as DropdownMenuGroup,
147
+ x as DropdownMenuItem,
148
+ v as DropdownMenuLabel,
149
+ _ as DropdownMenuPortal,
150
+ q as DropdownMenuRadioGroup,
151
+ R as DropdownMenuRadioItem,
152
+ I as DropdownMenuSeparator,
153
+ C as DropdownMenuShortcut,
154
+ L as DropdownMenuSub,
155
+ M as DropdownMenuSubContent,
156
+ D as DropdownMenuSubTrigger,
157
+ j as DropdownMenuTrigger
158
+ };
159
+ //# sourceMappingURL=dropdown-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.js","sources":["../../../../src/components/ui/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { CheckIcon, ChevronRightIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `dropdown-menu`\n// (packages/ui-legacy/src/components/ui/dropdown-menu.tsx). A menu of actions\n// anchored to a trigger, built on the Base UI Menu primitive (positioning, focus\n// management, typeahead, outside-press / Esc dismissal, ARIA). No `--ui-menu-*`\n// token tier exists yet, so this design-pending v1 themes from the shared\n// semantic tokens:\n// • popup surface -> bg-background / text-foreground / border-border, shadow-md\n// (legacy `bg-popover` / `text-popover-foreground` have no ui-react bridge)\n// • item highlight -> bg-accent on data-[highlighted] (Base UI sets it on both\n// pointer hover and keyboard nav; replaces legacy hover:bg-primary/10)\n// • separator -> bg-border · shortcut -> text-muted-foreground (no opacity hack)\n// Enter/exit animations use `tw-animate-css` keyed to data-[open]/[closed]/[side].\n// Reconcile with `/figma-component DropdownMenu <url> --update` once a mockup lands.\n\nconst DropdownMenu = MenuPrimitive.Root;\nconst DropdownMenuTrigger = MenuPrimitive.Trigger;\nconst DropdownMenuGroup = MenuPrimitive.Group;\nconst DropdownMenuPortal = MenuPrimitive.Portal;\nconst DropdownMenuSub = MenuPrimitive.SubmenuRoot;\nconst DropdownMenuRadioGroup = MenuPrimitive.RadioGroup;\n\nconst popupClassName =\n 'z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-border bg-background py-1 text-foreground shadow-md outline-none duration-200 data-[open]:animate-in data-[closed]:animate-out data-[open]:fade-in-0 data-[closed]:fade-out-0 data-[open]:zoom-in-95 data-[closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2';\n\nconst itemClassName =\n 'relative flex cursor-default select-none items-center gap-2 px-4 py-2 text-sm leading-6 outline-none transition-colors data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0';\n\nexport interface DropdownMenuContentProps\n extends React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup> {\n side?: MenuPrimitive.Positioner.Props['side'];\n align?: MenuPrimitive.Positioner.Props['align'];\n sideOffset?: number;\n /** Render inside a portal (default `true`). */\n portal?: boolean;\n /** Portal container — pass a shadow-root mount for isolated-style previews. */\n portalContainer?: MenuPrimitive.Portal.Props['container'];\n keepMounted?: MenuPrimitive.Portal.Props['keepMounted'];\n}\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof MenuPrimitive.Popup>,\n DropdownMenuContentProps\n>(\n (\n {\n className,\n side,\n align,\n sideOffset = 4,\n portal = true,\n portalContainer,\n keepMounted,\n ...props\n },\n ref\n ) => {\n const positioner = (\n <MenuPrimitive.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset}\n className=\"z-50\"\n >\n <MenuPrimitive.Popup\n ref={ref}\n className={cn(popupClassName, className)}\n {...props}\n />\n </MenuPrimitive.Positioner>\n );\n return portal ? (\n <MenuPrimitive.Portal container={portalContainer} keepMounted={keepMounted}>\n {positioner}\n </MenuPrimitive.Portal>\n ) : (\n positioner\n );\n }\n);\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof MenuPrimitive.Popup>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup> & {\n sideOffset?: number;\n }\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <MenuPrimitive.Positioner sideOffset={sideOffset} className=\"z-50\">\n <MenuPrimitive.Popup\n ref={ref}\n className={cn(popupClassName, className)}\n {...props}\n />\n </MenuPrimitive.Positioner>\n));\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof MenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenuPrimitive.Item\n ref={ref}\n className={cn(itemClassName, inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenuPrimitive.SubmenuTrigger>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubmenuTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenuPrimitive.SubmenuTrigger\n ref={ref}\n className={cn(\n itemClassName,\n 'data-[popup-open]:bg-accent',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </MenuPrimitive.SubmenuTrigger>\n));\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>\n>(({ className, children, ...props }, ref) => (\n <MenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center py-2 pl-8 pr-4 text-sm leading-6 outline-none transition-colors data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenuPrimitive.CheckboxItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof MenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center py-2 pl-8 pr-4 text-sm leading-6 outline-none transition-colors data-[highlighted]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenuPrimitive.RadioItemIndicator>\n <span className=\"size-2 rounded-full bg-current\" />\n </MenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\nconst DropdownMenuLabel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'px-4 py-2 text-sm font-semibold leading-6',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\nconst DropdownMenuSeparator = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"separator\"\n className={cn('my-1 h-px bg-border', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}\n {...props}\n />\n );\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"names":["DropdownMenu","MenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","popupClassName","itemClassName","DropdownMenuContent","React","className","side","align","sideOffset","portal","portalContainer","keepMounted","props","ref","positioner","jsx","cn","DropdownMenuSubContent","DropdownMenuItem","inset","DropdownMenuSubTrigger","children","jsxs","ChevronRightIcon","DropdownMenuCheckboxItem","CheckIcon","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;;AAoBA,MAAMA,IAAeC,EAAc,MAC7BC,IAAsBD,EAAc,SACpCE,IAAoBF,EAAc,OAClCG,IAAqBH,EAAc,QACnCI,IAAkBJ,EAAc,aAChCK,IAAyBL,EAAc,YAEvCM,IACJ,2cAEIC,IACJ,kRAcIC,IAAsBC,EAAM;AAAA,EAIhC,CACE;AAAA,IACE,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,QAAAC,IAAS;AAAA,IACT,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IACJ,gBAAAC;AAAA,MAACpB,EAAc;AAAA,MAAd;AAAA,QACC,MAAAW;AAAA,QACA,OAAAC;AAAA,QACA,YAAAC;AAAA,QACA,WAAU;AAAA,QAEV,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d;AAAA,IAAA;AAAA,IAED,GAAGO;AAAA,EAAA;AACN,CACD;AACDe,EAAkB,cAAc;AAEhC,MAAMC,IAAwBxB,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,GAAGO,EAAA,GAASC,MAC1B,gBAAAE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,MAAK;AAAA,IACL,WAAWG,EAAG,uBAAuBX,CAAS;AAAA,IAC7C,GAAGO;AAAA,EAAA;AACN,CACD;AACDgB,EAAsB,cAAc;AAEpC,SAASC,EAAqB;AAAA,EAC5B,WAAAxB;AAAA,EACA,GAAGO;AACL,GAA0C;AACxC,SACE,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAG,yDAAyDX,CAAS;AAAA,MAC/E,GAAGO;AAAA,IAAA;AAAA,EAAA;AAGV;AACAiB,EAAqB,cAAc;"}
@@ -0,0 +1,78 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { cn as l } from "../../../lib/utils.js";
4
+ const r = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a(
5
+ "div",
6
+ {
7
+ ref: s,
8
+ className: l(
9
+ "flex w-full max-w-[448px] flex-col items-center justify-center text-center text-muted-foreground",
10
+ e
11
+ ),
12
+ ...t
13
+ }
14
+ ));
15
+ r.displayName = "Empty";
16
+ const o = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a(
17
+ "div",
18
+ {
19
+ ref: s,
20
+ className: l(
21
+ "mb-4 flex size-[72px] items-center justify-center [&_svg]:size-full",
22
+ e
23
+ ),
24
+ ...t
25
+ }
26
+ ));
27
+ o.displayName = "EmptyIcon";
28
+ const i = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a(
29
+ "div",
30
+ {
31
+ ref: s,
32
+ className: l(
33
+ "flex w-full flex-col items-center gap-2 text-center",
34
+ e
35
+ ),
36
+ ...t
37
+ }
38
+ ));
39
+ i.displayName = "EmptyHeader";
40
+ const c = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a(
41
+ "h3",
42
+ {
43
+ ref: s,
44
+ className: l("text-lg font-normal leading-6 text-foreground", e),
45
+ ...t
46
+ }
47
+ ));
48
+ c.displayName = "EmptyTitle";
49
+ const f = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a("p", { ref: s, className: l("text-sm leading-6", e), ...t }));
50
+ f.displayName = "EmptyDescription";
51
+ const p = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a(
52
+ "div",
53
+ {
54
+ ref: s,
55
+ className: l("mt-4 flex flex-col items-center gap-4", e),
56
+ ...t
57
+ }
58
+ ));
59
+ p.displayName = "EmptyActions";
60
+ const n = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a(
61
+ "div",
62
+ {
63
+ ref: s,
64
+ className: l("flex flex-col items-center gap-2", e),
65
+ ...t
66
+ }
67
+ ));
68
+ n.displayName = "EmptyLinks";
69
+ export {
70
+ r as Empty,
71
+ p as EmptyActions,
72
+ f as EmptyDescription,
73
+ i as EmptyHeader,
74
+ o as EmptyIcon,
75
+ n as EmptyLinks,
76
+ c as EmptyTitle
77
+ };
78
+ //# sourceMappingURL=empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.js","sources":["../../../../src/components/ui/empty/empty.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// Composable empty-state parts ported from `@acronis-platform/shadcn-uikit`'s\n// `empty` (packages/ui-legacy/src/components/ui/empty.tsx). Plain styled\n// elements — no Base UI primitive. No `--ui-empty-*` token tier exists yet, so\n// this design-pending v1 themes from the shared semantic text tokens:\n// • title -> text-foreground (--ui-text-on-surface-primary)\n// • description / icon -> text-muted-foreground (--ui-text-on-surface-secondary)\n// (Legacy used a single `--empty-foreground` for the whole block; this splits it\n// into an emphasized title over muted supporting content.) The legacy\n// `--empty-icon-size` (72px) becomes a fixed size. Reconcile with\n// `/figma-component Empty <url> --update` once a mockup lands.\n\nconst Empty = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex w-full max-w-[448px] flex-col items-center justify-center text-center text-muted-foreground',\n className\n )}\n {...props}\n />\n));\nEmpty.displayName = 'Empty';\n\nconst EmptyIcon = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'mb-4 flex size-[72px] items-center justify-center [&_svg]:size-full',\n className\n )}\n {...props}\n />\n));\nEmptyIcon.displayName = 'EmptyIcon';\n\nconst EmptyHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex w-full flex-col items-center gap-2 text-center',\n className\n )}\n {...props}\n />\n));\nEmptyHeader.displayName = 'EmptyHeader';\n\nconst EmptyTitle = React.forwardRef<\n HTMLHeadingElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn('text-lg font-normal leading-6 text-foreground', className)}\n {...props}\n />\n));\nEmptyTitle.displayName = 'EmptyTitle';\n\nconst EmptyDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn('text-sm leading-6', className)} {...props} />\n));\nEmptyDescription.displayName = 'EmptyDescription';\n\nconst EmptyActions = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('mt-4 flex flex-col items-center gap-4', className)}\n {...props}\n />\n));\nEmptyActions.displayName = 'EmptyActions';\n\nconst EmptyLinks = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col items-center gap-2', className)}\n {...props}\n />\n));\nEmptyLinks.displayName = 'EmptyLinks';\n\nexport {\n Empty,\n EmptyIcon,\n EmptyHeader,\n EmptyTitle,\n EmptyDescription,\n EmptyActions,\n EmptyLinks,\n};\n"],"names":["Empty","React","className","props","ref","jsx","cn","EmptyIcon","EmptyHeader","EmptyTitle","EmptyDescription","EmptyActions","EmptyLinks"],"mappings":";;;AAeA,MAAMA,IAAQC,EAAM,WAGlB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAM,cAAc;AAEpB,MAAMO,IAAYN,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAU,cAAc;AAExB,MAAMC,IAAcP,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDK,EAAY,cAAc;AAE1B,MAAMC,IAAaR,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,iDAAiDJ,CAAS;AAAA,IACvE,GAAGC;AAAA,EAAA;AACN,CACD;AACDM,EAAW,cAAc;AAEzB,MAAMC,IAAmBT,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBACzB,KAAA,EAAE,KAAAA,GAAU,WAAWE,EAAG,qBAAqBJ,CAAS,GAAI,GAAGC,GAAO,CACxE;AACDO,EAAiB,cAAc;AAE/B,MAAMC,IAAeV,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,yCAAyCJ,CAAS;AAAA,IAC/D,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAa,cAAc;AAE3B,MAAMC,IAAaX,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,oCAAoCJ,CAAS;AAAA,IAC1D,GAAGC;AAAA,EAAA;AACN,CACD;AACDS,EAAW,cAAc;"}
@@ -15,8 +15,8 @@ const d = t.forwardRef(
15
15
  }
16
16
  )
17
17
  );
18
- d.displayName = "Input";
18
+ d.displayName = "InputBox";
19
19
  export {
20
- d as Input
20
+ d as InputBox
21
21
  };
22
22
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../../../src/components/ui/input/input.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// A single-line text input, themed by the dedicated next-gen `--ui-input-text-*`\n// token tier from @acronis-platform/tokens-pd. The box fill (`global-box-color-*`)\n// and the normal border (`normal-box-border-color-*`) are wired per state: idle /\n// hover / focus / disabled. The `normal-box-border-color-*` tier has no `-active`,\n// so focus reuses `-hover` for the border, paired with a 3px `--ui-focus-primary`\n// ring. Value and placeholder text use `global-value-color-*` /\n// `global-placeholder-color-*`. The error state is driven by `aria-invalid` —\n// `error-msg-box-border-color-*` border and, on focus, a `--ui-focus-error` ring —\n// scoped with `not-aria-[invalid]` so it wins over the hover/focus border. Box\n// geometry (32px height, 4px radius, 12px padding-x) comes from\n// `--ui-input-text-global-box-*`. Label, description, and error message are\n// composed by the consumer (a Field component is future work).\nexport type InputProps = React.ComponentPropsWithoutRef<'input'>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type = 'text', ...props }, ref) => (\n <input\n ref={ref}\n type={type}\n className={cn(\n 'h-[var(--ui-input-text-global-box-height)] w-full min-w-0 rounded-[var(--ui-input-text-global-box-border-radius)] border bg-[var(--ui-input-text-global-box-color-idle)] border-[var(--ui-input-text-normal-box-border-color-idle)] px-[var(--ui-input-text-global-box-padding-x)] text-sm leading-6 text-[var(--ui-input-text-global-value-color-idle)] transition-colors placeholder:text-[var(--ui-input-text-global-placeholder-color-idle)] focus-visible:outline-none focus-visible:ring-[3px] enabled:not-aria-[invalid=true]:hover:border-[var(--ui-input-text-normal-box-border-color-hover)] enabled:not-aria-[invalid=true]:hover:bg-[var(--ui-input-text-global-box-color-hover)] not-aria-[invalid=true]:focus-visible:border-[var(--ui-input-text-normal-box-border-color-hover)] not-aria-[invalid=true]:focus-visible:ring-[var(--ui-focus-primary)] aria-[invalid=true]:border-[var(--ui-input-text-error-msg-box-border-color-idle)] aria-[invalid=true]:focus-visible:ring-[var(--ui-focus-error)] disabled:cursor-not-allowed disabled:border-[var(--ui-input-text-normal-box-border-color-disabled)] disabled:bg-[var(--ui-input-text-global-box-color-disabled)] disabled:text-[var(--ui-input-text-global-value-color-disabled)] disabled:placeholder:text-[var(--ui-input-text-global-placeholder-color-disabled)]',\n className\n )}\n {...props}\n />\n )\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["Input","React","className","type","props","ref","jsx","cn"],"mappings":";;;AAkBA,MAAMA,IAAQC,EAAM;AAAA,EAClB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,EAAA,GAASC,MACvC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,MAAAF;AAAA,MACA,WAAWI;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AACAJ,EAAM,cAAc;"}
1
+ {"version":3,"file":"input.js","sources":["../../../../src/components/ui/input/input.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// Internal primitive: the bare single-line input box behind the public\n// `InputText` field (which is also exported as `Input`). Not exported from the\n// package; consumed by `input-text`. Themed by the dedicated next-gen `--ui-input-text-*`\n// token tier from @acronis-platform/tokens-pd. The box fill (`global-box-color-*`)\n// and the normal border (`normal-box-border-color-*`) are wired per state: idle /\n// hover / focus / disabled. The `normal-box-border-color-*` tier has no `-active`,\n// so focus reuses `-hover` for the border, paired with a 3px `--ui-focus-primary`\n// ring. Value and placeholder text use `global-value-color-*` /\n// `global-placeholder-color-*`. The error state is driven by `aria-invalid` —\n// `error-msg-box-border-color-*` border and, on focus, a `--ui-focus-error` ring —\n// scoped with `not-aria-[invalid]` so it wins over the hover/focus border. Box\n// geometry (32px height, 4px radius, 12px padding-x) comes from\n// `--ui-input-text-global-box-*`. Label, description, and error message are\n// composed by the consumer (a Field component is future work).\nexport type InputBoxProps = React.ComponentPropsWithoutRef<'input'>;\n\nconst InputBox = React.forwardRef<HTMLInputElement, InputBoxProps>(\n ({ className, type = 'text', ...props }, ref) => (\n <input\n ref={ref}\n type={type}\n className={cn(\n 'h-[var(--ui-input-text-global-box-height)] w-full min-w-0 rounded-[var(--ui-input-text-global-box-border-radius)] border bg-[var(--ui-input-text-global-box-color-idle)] border-[var(--ui-input-text-normal-box-border-color-idle)] px-[var(--ui-input-text-global-box-padding-x)] text-sm leading-6 text-[var(--ui-input-text-global-value-color-idle)] transition-colors placeholder:text-[var(--ui-input-text-global-placeholder-color-idle)] focus-visible:outline-none focus-visible:ring-[3px] enabled:not-aria-[invalid=true]:hover:border-[var(--ui-input-text-normal-box-border-color-hover)] enabled:not-aria-[invalid=true]:hover:bg-[var(--ui-input-text-global-box-color-hover)] not-aria-[invalid=true]:focus-visible:border-[var(--ui-input-text-normal-box-border-color-hover)] not-aria-[invalid=true]:focus-visible:ring-[var(--ui-focus-primary)] aria-[invalid=true]:border-[var(--ui-input-text-error-msg-box-border-color-idle)] aria-[invalid=true]:focus-visible:ring-[var(--ui-focus-error)] disabled:cursor-not-allowed disabled:border-[var(--ui-input-text-normal-box-border-color-disabled)] disabled:bg-[var(--ui-input-text-global-box-color-disabled)] disabled:text-[var(--ui-input-text-global-value-color-disabled)] disabled:placeholder:text-[var(--ui-input-text-global-placeholder-color-disabled)]',\n className\n )}\n {...props}\n />\n )\n);\nInputBox.displayName = 'InputBox';\n\nexport { InputBox };\n"],"names":["InputBox","React","className","type","props","ref","jsx","cn"],"mappings":";;;AAoBA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,EAAA,GAASC,MACvC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,MAAAF;AAAA,MACA,WAAWI;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AACAJ,EAAS,cAAc;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
- import { cn as f } from "../../../lib/utils.js";
4
- import { Search as x } from "../search/search.js";
3
+ import { cn as x } from "../../../lib/utils.js";
4
+ import { SearchBox as f } from "../search/search.js";
5
5
  const v = o.forwardRef(
6
6
  ({
7
7
  className: s,
@@ -18,7 +18,7 @@ const v = o.forwardRef(
18
18
  "label",
19
19
  {
20
20
  htmlFor: t,
21
- className: f(
21
+ className: x(
22
22
  "flex gap-[var(--ui-input-search-container-label-gap)] text-sm leading-4",
23
23
  e ? "text-[var(--ui-input-search-color-disabled)]" : "text-[var(--ui-input-search-color-idle)]"
24
24
  ),
@@ -36,7 +36,7 @@ const v = o.forwardRef(
36
36
  }
37
37
  ),
38
38
  /* @__PURE__ */ l(
39
- x,
39
+ f,
40
40
  {
41
41
  ref: d,
42
42
  id: t,
@@ -1 +1 @@
1
- {"version":3,"file":"input-search.js","sources":["../../../../src/components/ui/input-search/input-search.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\nimport { Search, type SearchProps } from '../search';\n\n// Mirrors the Figma \"InputSearch\" component: a full search field built around the\n// bare `Search` box (themed by the `--ui-input-search-*` tier). It adds the field\n// furniture — an optional `label` above the box (with an optional `required` `*`).\n// Every other prop (placeholder, value, onClear, disabled, …) passes straight\n// through to `Search`. Label colors come from `--ui-input-search-color-{idle,disabled}`\n// and the required marker from `--ui-input-search-required-color`, so brand overrides\n// are honored. When a visible label is present it names the field via `htmlFor`/`id`,\n// and `Search`'s built-in `aria-label=\"Search\"` is cleared so it doesn't shadow the\n// visible label.\nexport interface InputSearchProps extends SearchProps {\n /** Field label, rendered above the search box. */\n label?: React.ReactNode;\n /** Marks the field required — appends a `*` after the label. */\n required?: boolean;\n}\n\nconst InputSearch = React.forwardRef<HTMLInputElement, InputSearchProps>(\n (\n {\n className,\n id,\n label,\n required,\n disabled,\n 'aria-label': ariaLabel,\n ...props\n },\n ref\n ) => {\n const reactId = React.useId();\n const inputId = id ?? reactId;\n const hasLabel = label != null && label !== '';\n\n // A visible label names the field via `htmlFor`/`id`, so clear `Search`'s\n // default `aria-label`. With no label, forward the caller's `aria-label` (if\n // any) and otherwise let `Search`'s default stand.\n const ariaLabelProps = hasLabel\n ? { 'aria-label': undefined }\n : ariaLabel != null\n ? { 'aria-label': ariaLabel }\n : {};\n\n return (\n <div className=\"flex w-full min-w-[var(--ui-input-search-container-width-min)] flex-col gap-[var(--ui-input-search-container-gap)]\">\n {hasLabel && (\n <label\n htmlFor={inputId}\n className={cn(\n 'flex gap-[var(--ui-input-search-container-label-gap)] text-sm leading-4',\n disabled\n ? 'text-[var(--ui-input-search-color-disabled)]'\n : 'text-[var(--ui-input-search-color-idle)]'\n )}\n >\n {label}\n {required && (\n <span\n aria-hidden=\"true\"\n className=\"text-[var(--ui-input-search-required-color)]\"\n >\n *\n </span>\n )}\n </label>\n )}\n <Search\n ref={ref}\n id={inputId}\n disabled={disabled}\n aria-required={required || undefined}\n className={className}\n {...ariaLabelProps}\n {...props}\n />\n </div>\n );\n }\n);\nInputSearch.displayName = 'InputSearch';\n\nexport { InputSearch };\n"],"names":["InputSearch","React","className","id","label","required","disabled","ariaLabel","props","ref","reactId","inputId","hasLabel","ariaLabelProps","jsxs","cn","jsx","Search"],"mappings":";;;;AAqBA,MAAMA,IAAcC,EAAM;AAAA,EACxB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAcC;AAAA,IACd,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAUT,EAAM,MAAA,GAChBU,IAAUR,KAAMO,GAChBE,IAAWR,KAAS,QAAQA,MAAU,IAKtCS,IAAiBD,IACnB,EAAE,cAAc,OAAA,IAChBL,KAAa,OACX,EAAE,cAAcA,EAAA,IAChB,CAAA;AAEN,WACE,gBAAAO,EAAC,OAAA,EAAI,WAAU,sHACZ,UAAA;AAAA,MAAAF,KACC,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASH;AAAA,UACT,WAAWI;AAAA,YACT;AAAA,YACAT,IACI,iDACA;AAAA,UAAA;AAAA,UAGL,UAAA;AAAA,YAAAF;AAAA,YACAC,KACC,gBAAAW;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACX,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAED;AAAA,QAAA;AAAA,MAAA;AAAA,MAIN,gBAAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,KAAAR;AAAA,UACA,IAAIE;AAAA,UACJ,UAAAL;AAAA,UACA,iBAAeD,KAAY;AAAA,UAC3B,WAAAH;AAAA,UACC,GAAGW;AAAA,UACH,GAAGL;AAAA,QAAA;AAAA,MAAA;AAAA,IACN,GACF;AAAA,EAEJ;AACF;AACAR,EAAY,cAAc;"}
1
+ {"version":3,"file":"input-search.js","sources":["../../../../src/components/ui/input-search/input-search.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\nimport { SearchBox, type SearchBoxProps } from '../search';\n\n// Mirrors the Figma \"InputSearch\" component: a full search field built around the\n// bare `SearchBox` (themed by the `--ui-input-search-*` tier). It adds the field\n// furniture — an optional `label` above the box (with an optional `required` `*`).\n// Every other prop (placeholder, value, onClear, disabled, …) passes straight\n// through to `Search`. Label colors come from `--ui-input-search-color-{idle,disabled}`\n// and the required marker from `--ui-input-search-required-color`, so brand overrides\n// are honored. When a visible label is present it names the field via `htmlFor`/`id`,\n// and `Search`'s built-in `aria-label=\"Search\"` is cleared so it doesn't shadow the\n// visible label.\nexport interface InputSearchProps extends SearchBoxProps {\n /** Field label, rendered above the search box. */\n label?: React.ReactNode;\n /** Marks the field required — appends a `*` after the label. */\n required?: boolean;\n}\n\nconst InputSearch = React.forwardRef<HTMLInputElement, InputSearchProps>(\n (\n {\n className,\n id,\n label,\n required,\n disabled,\n 'aria-label': ariaLabel,\n ...props\n },\n ref\n ) => {\n const reactId = React.useId();\n const inputId = id ?? reactId;\n const hasLabel = label != null && label !== '';\n\n // A visible label names the field via `htmlFor`/`id`, so clear `Search`'s\n // default `aria-label`. With no label, forward the caller's `aria-label` (if\n // any) and otherwise let `Search`'s default stand.\n const ariaLabelProps = hasLabel\n ? { 'aria-label': undefined }\n : ariaLabel != null\n ? { 'aria-label': ariaLabel }\n : {};\n\n return (\n <div className=\"flex w-full min-w-[var(--ui-input-search-container-width-min)] flex-col gap-[var(--ui-input-search-container-gap)]\">\n {hasLabel && (\n <label\n htmlFor={inputId}\n className={cn(\n 'flex gap-[var(--ui-input-search-container-label-gap)] text-sm leading-4',\n disabled\n ? 'text-[var(--ui-input-search-color-disabled)]'\n : 'text-[var(--ui-input-search-color-idle)]'\n )}\n >\n {label}\n {required && (\n <span\n aria-hidden=\"true\"\n className=\"text-[var(--ui-input-search-required-color)]\"\n >\n *\n </span>\n )}\n </label>\n )}\n <SearchBox\n ref={ref}\n id={inputId}\n disabled={disabled}\n aria-required={required || undefined}\n className={className}\n {...ariaLabelProps}\n {...props}\n />\n </div>\n );\n }\n);\nInputSearch.displayName = 'InputSearch';\n\nexport { InputSearch };\n"],"names":["InputSearch","React","className","id","label","required","disabled","ariaLabel","props","ref","reactId","inputId","hasLabel","ariaLabelProps","jsxs","cn","jsx","SearchBox"],"mappings":";;;;AAqBA,MAAMA,IAAcC,EAAM;AAAA,EACxB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAcC;AAAA,IACd,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAUT,EAAM,MAAA,GAChBU,IAAUR,KAAMO,GAChBE,IAAWR,KAAS,QAAQA,MAAU,IAKtCS,IAAiBD,IACnB,EAAE,cAAc,OAAA,IAChBL,KAAa,OACX,EAAE,cAAcA,EAAA,IAChB,CAAA;AAEN,WACE,gBAAAO,EAAC,OAAA,EAAI,WAAU,sHACZ,UAAA;AAAA,MAAAF,KACC,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASH;AAAA,UACT,WAAWI;AAAA,YACT;AAAA,YACAT,IACI,iDACA;AAAA,UAAA;AAAA,UAGL,UAAA;AAAA,YAAAF;AAAA,YACAC,KACC,gBAAAW;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACX,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAED;AAAA,QAAA;AAAA,MAAA;AAAA,MAIN,gBAAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,KAAAR;AAAA,UACA,IAAIE;AAAA,UACJ,UAAAL;AAAA,UACA,iBAAeD,KAAY;AAAA,UAC3B,WAAAH;AAAA,UACC,GAAGW;AAAA,UACH,GAAGL;AAAA,QAAA;AAAA,MAAA;AAAA,IACN,GACF;AAAA,EAEJ;AACF;AACAR,EAAY,cAAc;"}
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
3
  import { TimesIcon as j } from "@acronis-platform/icons-react/stroke-mono";
4
4
  import { cn as c } from "../../../lib/utils.js";
5
- import { Input as C } from "../input/input.js";
5
+ import { InputBox as C } from "../input/input.js";
6
6
  const T = m.forwardRef(
7
7
  ({
8
8
  className: g,
@@ -1 +1 @@
1
- {"version":3,"file":"input-text.js","sources":["../../../../src/components/ui/input-text/input-text.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TimesIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\nimport { Input } from '../input';\n\n// Mirrors the Figma \"InputText\" component: a full single-line text field built\n// around the bare `Input` primitive (themed by the `--ui-input-text-*` tier). It\n// adds the field furniture: an optional `label` (with an optional `required` `*`),\n// an optional clear (✕) button, and an optional `description` or `error` message\n// below. Passing `error` switches the field to its error treatment — the box gets\n// the red error border (via the input's `aria-invalid` styling) and the red error\n// message replaces the description. The clear button appears only while `clearable`\n// is set and the (controlled) field has a value, and calls `onClear`. Colors come\n// from the `--ui-input-text-*` tokens — label/required/description/error/clear — so\n// brand overrides are honored; the clear button uses a 3px `--ui-focus-primary` ring.\nexport interface InputTextProps\n extends Omit<React.ComponentPropsWithoutRef<'input'>, 'children'> {\n /** Field label, rendered above the input. */\n label?: React.ReactNode;\n /** Marks the field required — appends a `*` after the label. */\n required?: boolean;\n /** Helper text below the input. Hidden while `error` is set. */\n description?: React.ReactNode;\n /**\n * Error message below the input. Its presence switches the field to the error\n * treatment (red box border + red message).\n */\n error?: React.ReactNode;\n /** Show a clear (✕) button while the (controlled) field has a value. */\n clearable?: boolean;\n /** Called when the clear button is activated. */\n onClear?: () => void;\n}\n\nconst InputText = React.forwardRef<HTMLInputElement, InputTextProps>(\n (\n {\n className,\n id,\n label,\n required,\n description,\n error,\n clearable,\n onClear,\n disabled,\n value,\n ...props\n },\n ref\n ) => {\n const reactId = React.useId();\n const inputId = id ?? reactId;\n const messageId = `${inputId}-message`;\n\n const hasError = error != null && error !== '';\n const hasValue = value != null && value !== '';\n const showClear = Boolean(clearable) && hasValue && !disabled;\n const message = hasError ? error : description;\n const hasMessage = message != null && message !== '';\n\n return (\n <div className=\"flex w-full min-w-[var(--ui-input-text-global-container-width-min)] flex-col gap-[var(--ui-input-text-global-container-gap)]\">\n {label != null && label !== '' && (\n <label\n htmlFor={inputId}\n className={cn(\n 'flex gap-[var(--ui-input-text-global-container-label-gap)] text-sm leading-4',\n disabled\n ? 'text-[var(--ui-input-text-global-label-color-disabled)]'\n : 'text-[var(--ui-input-text-global-label-color-idle)]'\n )}\n >\n {label}\n {required && (\n <span\n aria-hidden=\"true\"\n className=\"text-[var(--ui-input-text-global-required-color)]\"\n >\n *\n </span>\n )}\n </label>\n )}\n\n <div className=\"relative\">\n <Input\n ref={ref}\n id={inputId}\n disabled={disabled}\n value={value}\n aria-invalid={hasError || undefined}\n aria-required={required || undefined}\n aria-describedby={hasMessage ? messageId : undefined}\n className={cn(showClear && 'pr-9', className)}\n {...props}\n />\n {showClear && (\n <button\n type=\"button\"\n onClick={onClear}\n aria-label=\"Clear\"\n className=\"absolute right-[var(--ui-input-text-global-box-padding-x)] top-1/2 flex size-4 -translate-y-1/2 items-center justify-center rounded-[var(--ui-input-text-global-box-border-radius)] text-[var(--ui-input-text-global-clear-icon-color)] outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] [&_svg]:size-4 [&_svg]:shrink-0\"\n >\n <TimesIcon />\n </button>\n )}\n </div>\n\n {hasMessage && (\n <p\n id={messageId}\n className={cn(\n 'text-xs leading-4',\n hasError\n ? 'text-[var(--ui-input-text-error-msg-error-color)]'\n : disabled\n ? 'text-[var(--ui-input-text-normal-description-color-disabled)]'\n : 'text-[var(--ui-input-text-normal-description-color-idle)]'\n )}\n >\n {message}\n </p>\n )}\n </div>\n );\n }\n);\nInputText.displayName = 'InputText';\n\nexport { InputText };\n"],"names":["InputText","React","className","id","label","required","description","error","clearable","onClear","disabled","value","props","ref","reactId","inputId","messageId","hasError","hasValue","showClear","message","hasMessage","jsxs","cn","jsx","Input","TimesIcon"],"mappings":";;;;;AAmCA,MAAMA,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAUb,EAAM,MAAA,GAChBc,IAAUZ,KAAMW,GAChBE,IAAY,GAAGD,CAAO,YAEtBE,IAAWV,KAAS,QAAQA,MAAU,IACtCW,IAAWP,KAAS,QAAQA,MAAU,IACtCQ,IAAY,EAAQX,KAAcU,KAAY,CAACR,GAC/CU,IAAUH,IAAWV,IAAQD,GAC7Be,IAAaD,KAAW,QAAQA,MAAY;AAElD,WACE,gBAAAE,EAAC,OAAA,EAAI,WAAU,gIACZ,UAAA;AAAA,MAAAlB,KAAS,QAAQA,MAAU,MAC1B,gBAAAkB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASP;AAAA,UACT,WAAWQ;AAAA,YACT;AAAA,YACAb,IACI,4DACA;AAAA,UAAA;AAAA,UAGL,UAAA;AAAA,YAAAN;AAAA,YACAC,KACC,gBAAAmB;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACX,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAED;AAAA,QAAA;AAAA,MAAA;AAAA,MAKN,gBAAAF,EAAC,OAAA,EAAI,WAAU,YACb,UAAA;AAAA,QAAA,gBAAAE;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAAZ;AAAA,YACA,IAAIE;AAAA,YACJ,UAAAL;AAAA,YACA,OAAAC;AAAA,YACA,gBAAcM,KAAY;AAAA,YAC1B,iBAAeZ,KAAY;AAAA,YAC3B,oBAAkBgB,IAAaL,IAAY;AAAA,YAC3C,WAAWO,EAAGJ,KAAa,QAAQjB,CAAS;AAAA,YAC3C,GAAGU;AAAA,UAAA;AAAA,QAAA;AAAA,QAELO,KACC,gBAAAK;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASf;AAAA,YACT,cAAW;AAAA,YACX,WAAU;AAAA,YAEV,4BAACiB,GAAA,CAAA,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACb,GAEJ;AAAA,MAECL,KACC,gBAAAG;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAIR;AAAA,UACJ,WAAWO;AAAA,YACT;AAAA,YACAN,IACI,sDACAP,IACE,kEACA;AAAA,UAAA;AAAA,UAGP,UAAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,GAEJ;AAAA,EAEJ;AACF;AACApB,EAAU,cAAc;"}
1
+ {"version":3,"file":"input-text.js","sources":["../../../../src/components/ui/input-text/input-text.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TimesIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\nimport { InputBox } from '../input';\n\n// Mirrors the Figma \"InputText\" component: a full single-line text field built\n// around the bare `InputBox` primitive (themed by the `--ui-input-text-*` tier). It\n// adds the field furniture: an optional `label` (with an optional `required` `*`),\n// an optional clear (✕) button, and an optional `description` or `error` message\n// below. Passing `error` switches the field to its error treatment — the box gets\n// the red error border (via the input's `aria-invalid` styling) and the red error\n// message replaces the description. The clear button appears only while `clearable`\n// is set and the (controlled) field has a value, and calls `onClear`. Colors come\n// from the `--ui-input-text-*` tokens — label/required/description/error/clear — so\n// brand overrides are honored; the clear button uses a 3px `--ui-focus-primary` ring.\nexport interface InputTextProps\n extends Omit<React.ComponentPropsWithoutRef<'input'>, 'children'> {\n /** Field label, rendered above the input. */\n label?: React.ReactNode;\n /** Marks the field required — appends a `*` after the label. */\n required?: boolean;\n /** Helper text below the input. Hidden while `error` is set. */\n description?: React.ReactNode;\n /**\n * Error message below the input. Its presence switches the field to the error\n * treatment (red box border + red message).\n */\n error?: React.ReactNode;\n /** Show a clear (✕) button while the (controlled) field has a value. */\n clearable?: boolean;\n /** Called when the clear button is activated. */\n onClear?: () => void;\n}\n\nconst InputText = React.forwardRef<HTMLInputElement, InputTextProps>(\n (\n {\n className,\n id,\n label,\n required,\n description,\n error,\n clearable,\n onClear,\n disabled,\n value,\n ...props\n },\n ref\n ) => {\n const reactId = React.useId();\n const inputId = id ?? reactId;\n const messageId = `${inputId}-message`;\n\n const hasError = error != null && error !== '';\n const hasValue = value != null && value !== '';\n const showClear = Boolean(clearable) && hasValue && !disabled;\n const message = hasError ? error : description;\n const hasMessage = message != null && message !== '';\n\n return (\n <div className=\"flex w-full min-w-[var(--ui-input-text-global-container-width-min)] flex-col gap-[var(--ui-input-text-global-container-gap)]\">\n {label != null && label !== '' && (\n <label\n htmlFor={inputId}\n className={cn(\n 'flex gap-[var(--ui-input-text-global-container-label-gap)] text-sm leading-4',\n disabled\n ? 'text-[var(--ui-input-text-global-label-color-disabled)]'\n : 'text-[var(--ui-input-text-global-label-color-idle)]'\n )}\n >\n {label}\n {required && (\n <span\n aria-hidden=\"true\"\n className=\"text-[var(--ui-input-text-global-required-color)]\"\n >\n *\n </span>\n )}\n </label>\n )}\n\n <div className=\"relative\">\n <InputBox\n ref={ref}\n id={inputId}\n disabled={disabled}\n value={value}\n aria-invalid={hasError || undefined}\n aria-required={required || undefined}\n aria-describedby={hasMessage ? messageId : undefined}\n className={cn(showClear && 'pr-9', className)}\n {...props}\n />\n {showClear && (\n <button\n type=\"button\"\n onClick={onClear}\n aria-label=\"Clear\"\n className=\"absolute right-[var(--ui-input-text-global-box-padding-x)] top-1/2 flex size-4 -translate-y-1/2 items-center justify-center rounded-[var(--ui-input-text-global-box-border-radius)] text-[var(--ui-input-text-global-clear-icon-color)] outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] [&_svg]:size-4 [&_svg]:shrink-0\"\n >\n <TimesIcon />\n </button>\n )}\n </div>\n\n {hasMessage && (\n <p\n id={messageId}\n className={cn(\n 'text-xs leading-4',\n hasError\n ? 'text-[var(--ui-input-text-error-msg-error-color)]'\n : disabled\n ? 'text-[var(--ui-input-text-normal-description-color-disabled)]'\n : 'text-[var(--ui-input-text-normal-description-color-idle)]'\n )}\n >\n {message}\n </p>\n )}\n </div>\n );\n }\n);\nInputText.displayName = 'InputText';\n\nexport { InputText };\n"],"names":["InputText","React","className","id","label","required","description","error","clearable","onClear","disabled","value","props","ref","reactId","inputId","messageId","hasError","hasValue","showClear","message","hasMessage","jsxs","cn","jsx","InputBox","TimesIcon"],"mappings":";;;;;AAmCA,MAAMA,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAUb,EAAM,MAAA,GAChBc,IAAUZ,KAAMW,GAChBE,IAAY,GAAGD,CAAO,YAEtBE,IAAWV,KAAS,QAAQA,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,IACE,kEACA;AAAA,UAAA;AAAA,UAGP,UAAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,GAEJ;AAAA,EAEJ;AACF;AACApB,EAAU,cAAc;"}
@@ -0,0 +1,12 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import { cn as s } from "../../../lib/utils.js";
4
+ const m = "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", t = r.forwardRef(
5
+ ({ className: e, ...a }, o) => /* @__PURE__ */ l("label", { ref: o, className: s(m, e), ...a })
6
+ );
7
+ t.displayName = "Label";
8
+ export {
9
+ t as Label,
10
+ m as labelClassName
11
+ };
12
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.js","sources":["../../../../src/components/ui/label/label.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `label`\n// (packages/ui-legacy/src/components/ui/label.tsx). A caption for a form\n// control — a plain `<label>`, no Base UI primitive. The text color is\n// inherited (`text-foreground` from context), so no `--ui-label-*` tier is\n// needed. `peer-disabled:*` dims the label when an associated `peer`-marked\n// control is disabled, mirroring the legacy behavior.\nconst labelClassName =\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n\nexport type LabelProps = React.ComponentPropsWithoutRef<'label'>;\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ className, ...props }, ref) => (\n <label ref={ref} className={cn(labelClassName, className)} {...props} />\n )\n);\nLabel.displayName = 'Label';\n\nexport { Label, labelClassName };\n"],"names":["labelClassName","Label","React","className","props","ref","jsx","cn"],"mappings":";;;AAUA,MAAMA,IACJ,8FAIIC,IAAQC,EAAM;AAAA,EAClB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACxB,gBAAAC,EAAC,SAAA,EAAM,KAAAD,GAAU,WAAWE,EAAGP,GAAgBG,CAAS,GAAI,GAAGC,EAAA,CAAO;AAE1E;AACAH,EAAM,cAAc;"}
@@ -0,0 +1,48 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import * as c from "react";
3
+ import { Popover as o } from "@base-ui/react/popover";
4
+ import { cn as f } from "../../../lib/utils.js";
5
+ const v = o.Root, h = o.Trigger, w = o.Portal, P = c.forwardRef(
6
+ ({
7
+ className: r,
8
+ side: a = "bottom",
9
+ align: d = "center",
10
+ sideOffset: n = 4,
11
+ portal: i = !0,
12
+ portalContainer: s,
13
+ keepMounted: m,
14
+ ...p
15
+ }, l) => {
16
+ const e = /* @__PURE__ */ t(
17
+ o.Positioner,
18
+ {
19
+ side: a,
20
+ align: d,
21
+ sideOffset: n,
22
+ className: "z-50",
23
+ children: /* @__PURE__ */ t(
24
+ o.Popup,
25
+ {
26
+ ref: l,
27
+ className: f(
28
+ "w-72 rounded-md border border-border bg-background p-4 text-foreground shadow-md outline-none",
29
+ "duration-200 data-[open]:animate-in data-[closed]:animate-out data-[open]:fade-in-0 data-[closed]:fade-out-0 data-[open]:zoom-in-95 data-[closed]:zoom-out-95",
30
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
31
+ r
32
+ ),
33
+ ...p
34
+ }
35
+ )
36
+ }
37
+ );
38
+ return i ? /* @__PURE__ */ t(o.Portal, { container: s, keepMounted: m, children: e }) : e;
39
+ }
40
+ );
41
+ P.displayName = "PopoverContent";
42
+ export {
43
+ v as Popover,
44
+ P as PopoverContent,
45
+ w as PopoverPortal,
46
+ h as PopoverTrigger
47
+ };
48
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.js","sources":["../../../../src/components/ui/popover/popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `popover`\n// (packages/ui-legacy/src/components/ui/popover.tsx). A floating panel anchored\n// to a trigger, built on the Base UI Popover primitive (positioning, focus\n// management, outside-press / Esc dismissal, ARIA come from Base UI). No\n// `--ui-popover-*` token tier exists yet, so this design-pending v1 themes from\n// the shared semantic tokens:\n// • surface -> bg-background (--ui-background-surface-primary) (legacy `bg-popover`)\n// • text -> text-foreground (--ui-text-on-surface-primary) (legacy `text-popover-foreground`)\n// • border -> border-border (--ui-border-on-surface-border) (legacy bare `border`)\n// Enter/exit animations use `tw-animate-css` keyed to Base UI's data-[open] /\n// data-[closed] / data-[side] attributes. Reconcile (and a possible\n// `--ui-popover-*` tier) with `/figma-component Popover <url> --update`.\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverPortal = PopoverPrimitive.Portal;\n\nexport interface PopoverContentProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Popup> {\n /** Which side of the trigger to render on. */\n side?: PopoverPrimitive.Positioner.Props['side'];\n /** Alignment along the chosen side. */\n align?: PopoverPrimitive.Positioner.Props['align'];\n /** Distance in px from the trigger. */\n sideOffset?: number;\n /**\n * Render inside a portal (default `true`). Set `false` for inline usage\n * (e.g. when supplying your own `PopoverPortal`).\n */\n portal?: boolean;\n /**\n * Portal container. Pass a shadow-root mount for isolated-style previews\n * (the docs demos do this via `useShadowMount`).\n */\n portalContainer?: PopoverPrimitive.Portal.Props['container'];\n /** Keep the content mounted while closed (Base UI `Portal` prop). */\n keepMounted?: PopoverPrimitive.Portal.Props['keepMounted'];\n}\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Popup>,\n PopoverContentProps\n>(\n (\n {\n className,\n side = 'bottom',\n align = 'center',\n sideOffset = 4,\n portal = true,\n portalContainer,\n keepMounted,\n ...props\n },\n ref\n ) => {\n const positioner = (\n <PopoverPrimitive.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset}\n className=\"z-50\"\n >\n <PopoverPrimitive.Popup\n ref={ref}\n className={cn(\n 'w-72 rounded-md border border-border bg-background p-4 text-foreground shadow-md outline-none',\n 'duration-200 data-[open]:animate-in data-[closed]:animate-out data-[open]:fade-in-0 data-[closed]:fade-out-0 data-[open]:zoom-in-95 data-[closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n );\n\n return portal ? (\n <PopoverPrimitive.Portal container={portalContainer} keepMounted={keepMounted}>\n {positioner}\n </PopoverPrimitive.Portal>\n ) : (\n positioner\n );\n }\n);\nPopoverContent.displayName = 'PopoverContent';\n\nexport { Popover, PopoverTrigger, PopoverPortal, PopoverContent };\n"],"names":["Popover","PopoverPrimitive","PopoverTrigger","PopoverPortal","PopoverContent","React","className","side","align","sideOffset","portal","portalContainer","keepMounted","props","ref","positioner","jsx","cn"],"mappings":";;;;AAkBA,MAAMA,IAAUC,EAAiB,MAE3BC,IAAiBD,EAAiB,SAElCE,IAAgBF,EAAiB,QAwBjCG,IAAiBC,EAAM;AAAA,EAI3B,CACE;AAAA,IACE,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC,IAAQ;AAAA,IACR,YAAAC,IAAa;AAAA,IACb,QAAAC,IAAS;AAAA,IACT,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IACJ,gBAAAC;AAAA,MAACf,EAAiB;AAAA,MAAjB;AAAA,QACC,MAAAM;AAAA,QACA,OAAAC;AAAA,QACA,YAAAC;AAAA,QACA,WAAU;AAAA,QAEV,UAAA,gBAAAO;AAAA,UAACf,EAAiB;AAAA,UAAjB;AAAA,YACC,KAAAa;AAAA,YACA,WAAWG;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACAX;AAAA,YAAA;AAAA,YAED,GAAGO;AAAA,UAAA;AAAA,QAAA;AAAA,MACN;AAAA,IAAA;AAIJ,WAAOH,sBACJT,EAAiB,QAAjB,EAAwB,WAAWU,GAAiB,aAAAC,GAClD,UAAAG,EAAA,CACH,IAEAA;AAAA,EAEJ;AACF;AACAX,EAAe,cAAc;"}
@@ -0,0 +1,30 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { Progress as r } from "@base-ui/react";
4
+ import { cn as n } from "../../../lib/utils.js";
5
+ const s = i.forwardRef(
6
+ ({ className: o, value: a, ...l }, t) => /* @__PURE__ */ e(
7
+ r.Root,
8
+ {
9
+ ref: t,
10
+ value: a ?? null,
11
+ className: n(
12
+ "relative h-2 w-full overflow-hidden rounded-full",
13
+ o
14
+ ),
15
+ ...l,
16
+ children: /* @__PURE__ */ e(r.Track, { className: "relative h-full w-full overflow-hidden bg-input", children: /* @__PURE__ */ e(
17
+ r.Indicator,
18
+ {
19
+ className: "h-full bg-secondary transition-all data-[indeterminate]:animate-indeterminate-progress data-[indeterminate]:transition-none",
20
+ style: a == null ? { width: "33%" } : void 0
21
+ }
22
+ ) })
23
+ }
24
+ )
25
+ );
26
+ s.displayName = "Progress";
27
+ export {
28
+ s as Progress
29
+ };
30
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","sources":["../../../../src/components/ui/progress/progress.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Progress as ProgressPrimitive } from '@base-ui/react';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `progress`\n// (packages/ui-legacy/src/components/ui/progress.tsx). Wraps Base UI's Progress\n// primitive (Root → Track → Indicator). No `--ui-progress-*` tier yet: the\n// track uses the shared border token via `bg-input`, and the filled indicator\n// uses the brand action blue via `bg-secondary` (--ui-background-brand-secondary,\n// the same remap Spinner uses — ui-react's `primary` is the dark navy, not the\n// action color legacy's `bg-primary` meant). When `value` is `null` the bar is\n// indeterminate: Base UI sets `data-indeterminate`, which swaps the determinate\n// width transition for the sliding `indeterminate-progress` keyframe (registered\n// in src/styles/index.css).\n// Base UI types `value` as required; we make it optional so `<Progress />`\n// renders an indeterminate bar (the `value ?? null` below normalizes it).\nexport type ProgressProps = Omit<\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>,\n 'value'\n> & {\n value?: number | null;\n};\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n value={value ?? null}\n className={cn(\n 'relative h-2 w-full overflow-hidden rounded-full',\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Track className=\"relative h-full w-full overflow-hidden bg-input\">\n <ProgressPrimitive.Indicator\n className=\"h-full bg-secondary transition-all data-[indeterminate]:animate-indeterminate-progress data-[indeterminate]:transition-none\"\n style={value == null ? { width: '33%' } : undefined}\n />\n </ProgressPrimitive.Track>\n </ProgressPrimitive.Root>\n )\n);\nProgress.displayName = 'Progress';\n\nexport { Progress };\n"],"names":["Progress","React","className","value","props","ref","jsx","ProgressPrimitive","cn"],"mappings":";;;;AA0BA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,GAASC,MAC/B,gBAAAC;AAAA,IAACC,EAAkB;AAAA,IAAlB;AAAA,MACC,KAAAF;AAAA,MACA,OAAOF,KAAS;AAAA,MAChB,WAAWK;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEJ,UAAA,gBAAAE,EAACC,EAAkB,OAAlB,EAAwB,WAAU,mDACjC,UAAA,gBAAAD;AAAA,QAACC,EAAkB;AAAA,QAAlB;AAAA,UACC,WAAU;AAAA,UACV,OAAOJ,KAAS,OAAO,EAAE,OAAO,UAAU;AAAA,QAAA;AAAA,MAAA,EAC5C,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;AACAH,EAAS,cAAc;"}
@@ -86,8 +86,8 @@ const j = t.forwardRef(
86
86
  );
87
87
  }
88
88
  );
89
- j.displayName = "Search";
89
+ j.displayName = "SearchBox";
90
90
  export {
91
- j as Search
91
+ j as SearchBox
92
92
  };
93
93
  //# sourceMappingURL=search.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sources":["../../../../src/components/ui/search/search.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MagnifierIcon,\n TimesIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// A search field: a bordered box (the dedicated `--ui-input-search-*` token\n// tier) holding a leading magnifier, a borderless native input, and a trailing\n// clear button shown once there's a value. The box owns the visual state via\n// `focus-within` (the input-search tier has no focus/active border token, so the\n// focused border reuses `--ui-input-search-border-color-hover` plus a 3px\n// `--ui-focus-primary` ring) / hover / disabled; the magnifier uses\n// `--ui-input-search-icon-search-color-{idle,disabled}` (via the `group`) and the\n// clear button uses `--ui-input-search-clear-icon-color`.\n\nexport interface SearchProps extends React.ComponentPropsWithoutRef<'input'> {\n /** Called when the clear (×) button is pressed, after the value is cleared. */\n onClear?: () => void;\n}\n\nconst Search = React.forwardRef<HTMLInputElement, SearchProps>(\n (\n {\n className,\n type = 'search',\n disabled,\n onClear,\n onChange,\n value,\n defaultValue,\n ...props\n },\n forwardedRef\n ) => {\n const innerRef = React.useRef<HTMLInputElement>(null);\n const [hasValue, setHasValue] = React.useState(\n () => String(value ?? defaultValue ?? '').length > 0\n );\n\n // Keep the clear button in sync when the value is controlled externally.\n React.useEffect(() => {\n if (value !== undefined) setHasValue(String(value).length > 0);\n }, [value]);\n\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n },\n [forwardedRef]\n );\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setHasValue(event.target.value.length > 0);\n onChange?.(event);\n };\n\n const handleClear = () => {\n const input = innerRef.current;\n if (!input) return;\n // Use the native value setter when available + dispatch a real input event\n // so React's onChange fires for both controlled and uncontrolled usage.\n let setter: ((this: HTMLInputElement, value: string) => void) | undefined;\n try {\n setter = Object.getOwnPropertyDescriptor(\n globalThis.HTMLInputElement?.prototype,\n 'value'\n )?.set;\n } catch {\n setter = undefined;\n }\n\n if (setter) setter.call(input, '');\n else input.value = '';\n\n input.dispatchEvent(new Event('input', { bubbles: true }));\n setHasValue(false);\n input.focus();\n onClear?.();\n };\n\n return (\n <div\n data-disabled={disabled || undefined}\n className={cn(\n 'group inline-flex h-[var(--ui-input-search-box-height)] w-full min-w-0 items-center gap-[var(--ui-input-search-box-gap)] rounded-[var(--ui-input-search-box-border-radius)] border bg-[var(--ui-input-search-box-color-idle)] border-[var(--ui-input-search-border-color-idle)] px-[var(--ui-input-search-box-padding-x)] text-sm leading-6 text-[var(--ui-input-search-value-color-idle)] transition-colors not-data-[disabled]:hover:bg-[var(--ui-input-search-box-color-hover)] not-data-[disabled]:hover:border-[var(--ui-input-search-border-color-hover)] focus-within:border-[var(--ui-input-search-border-color-hover)] focus-within:ring-[3px] focus-within:ring-[var(--ui-focus-primary)] data-[disabled]:cursor-not-allowed data-[disabled]:border-[var(--ui-input-search-border-color-disabled)] data-[disabled]:bg-[var(--ui-input-search-box-color-disabled)] data-[disabled]:text-[var(--ui-input-search-value-color-disabled)]',\n className\n )}\n >\n <MagnifierIcon\n size={16}\n className=\"shrink-0 text-[var(--ui-input-search-icon-search-color-idle)] group-data-[disabled]:text-[var(--ui-input-search-icon-search-color-disabled)]\"\n />\n <input\n ref={setRefs}\n type={type}\n disabled={disabled}\n value={value}\n defaultValue={defaultValue}\n onChange={handleChange}\n aria-label=\"Search\"\n className=\"h-full min-w-0 flex-1 border-0 bg-transparent p-0 text-inherit outline-none placeholder:text-[var(--ui-input-search-placeholder-color-idle)] disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:appearance-none\"\n {...props}\n />\n {hasValue && !disabled && (\n <button\n type=\"button\"\n aria-label=\"Clear search\"\n onClick={handleClear}\n className=\"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm text-[var(--ui-input-search-clear-icon-color)] outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)] [&>svg]:size-4\"\n >\n <TimesIcon size={16} />\n </button>\n )}\n </div>\n );\n }\n);\nSearch.displayName = 'Search';\n\nexport { Search };\n"],"names":["Search","React","className","type","disabled","onClear","onChange","value","defaultValue","props","forwardedRef","innerRef","hasValue","setHasValue","setRefs","node","handleChange","event","handleClear","input","setter","_b","_a","jsxs","cn","jsx","MagnifierIcon","TimesIcon"],"mappings":";;;;AAsBA,MAAMA,IAASC,EAAM;AAAA,EACnB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAWV,EAAM,OAAyB,IAAI,GAC9C,CAACW,GAAUC,CAAW,IAAIZ,EAAM;AAAA,MACpC,MAAM,OAAOM,KAASC,KAAgB,EAAE,EAAE,SAAS;AAAA,IAAA;AAIrD,IAAAP,EAAM,UAAU,MAAM;AACpB,MAAIM,MAAU,UAAWM,EAAY,OAAON,CAAK,EAAE,SAAS,CAAC;AAAA,IAC/D,GAAG,CAACA,CAAK,CAAC;AAEV,UAAMO,IAAUb,EAAM;AAAA,MACpB,CAACc,MAAkC;AACjC,QAAAJ,EAAS,UAAUI,GACf,OAAOL,KAAiB,aAAYA,EAAaK,CAAI,IAChDL,QAA2B,UAAUK;AAAA,MAChD;AAAA,MACA,CAACL,CAAY;AAAA,IAAA,GAGTM,IAAe,CAACC,MAA+C;AACnE,MAAAJ,EAAYI,EAAM,OAAO,MAAM,SAAS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AAAA,IAAA;AAAA,EAIR;AACF;AACA3B,EAAO,cAAc;"}
1
+ {"version":3,"file":"search.js","sources":["../../../../src/components/ui/search/search.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MagnifierIcon,\n TimesIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// Internal primitive: the bare search box behind the public `InputSearch` field\n// (which is also exported as `Search`). Not exported from the package; consumed\n// by `input-search`. A bordered box (the dedicated `--ui-input-search-*` token\n// tier) holding a leading magnifier, a borderless native input, and a trailing\n// clear button shown once there's a value. The box owns the visual state via\n// `focus-within` (the input-search tier has no focus/active border token, so the\n// focused border reuses `--ui-input-search-border-color-hover` plus a 3px\n// `--ui-focus-primary` ring) / hover / disabled; the magnifier uses\n// `--ui-input-search-icon-search-color-{idle,disabled}` (via the `group`) and the\n// clear button uses `--ui-input-search-clear-icon-color`.\n\nexport interface SearchBoxProps extends React.ComponentPropsWithoutRef<'input'> {\n /** Called when the clear (×) button is pressed, after the value is cleared. */\n onClear?: () => void;\n}\n\nconst SearchBox = React.forwardRef<HTMLInputElement, SearchBoxProps>(\n (\n {\n className,\n type = 'search',\n disabled,\n onClear,\n onChange,\n value,\n defaultValue,\n ...props\n },\n forwardedRef\n ) => {\n const innerRef = React.useRef<HTMLInputElement>(null);\n const [hasValue, setHasValue] = React.useState(\n () => String(value ?? defaultValue ?? '').length > 0\n );\n\n // Keep the clear button in sync when the value is controlled externally.\n React.useEffect(() => {\n if (value !== undefined) setHasValue(String(value).length > 0);\n }, [value]);\n\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n },\n [forwardedRef]\n );\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setHasValue(event.target.value.length > 0);\n onChange?.(event);\n };\n\n const handleClear = () => {\n const input = innerRef.current;\n if (!input) return;\n // Use the native value setter when available + dispatch a real input event\n // so React's onChange fires for both controlled and uncontrolled usage.\n let setter: ((this: HTMLInputElement, value: string) => void) | undefined;\n try {\n setter = Object.getOwnPropertyDescriptor(\n globalThis.HTMLInputElement?.prototype,\n 'value'\n )?.set;\n } catch {\n setter = undefined;\n }\n\n if (setter) setter.call(input, '');\n else input.value = '';\n\n input.dispatchEvent(new Event('input', { bubbles: true }));\n setHasValue(false);\n input.focus();\n onClear?.();\n };\n\n return (\n <div\n data-disabled={disabled || undefined}\n className={cn(\n 'group inline-flex h-[var(--ui-input-search-box-height)] w-full min-w-0 items-center gap-[var(--ui-input-search-box-gap)] rounded-[var(--ui-input-search-box-border-radius)] border bg-[var(--ui-input-search-box-color-idle)] border-[var(--ui-input-search-border-color-idle)] px-[var(--ui-input-search-box-padding-x)] text-sm leading-6 text-[var(--ui-input-search-value-color-idle)] transition-colors not-data-[disabled]:hover:bg-[var(--ui-input-search-box-color-hover)] not-data-[disabled]:hover:border-[var(--ui-input-search-border-color-hover)] focus-within:border-[var(--ui-input-search-border-color-hover)] focus-within:ring-[3px] focus-within:ring-[var(--ui-focus-primary)] data-[disabled]:cursor-not-allowed data-[disabled]:border-[var(--ui-input-search-border-color-disabled)] data-[disabled]:bg-[var(--ui-input-search-box-color-disabled)] data-[disabled]:text-[var(--ui-input-search-value-color-disabled)]',\n className\n )}\n >\n <MagnifierIcon\n size={16}\n className=\"shrink-0 text-[var(--ui-input-search-icon-search-color-idle)] group-data-[disabled]:text-[var(--ui-input-search-icon-search-color-disabled)]\"\n />\n <input\n ref={setRefs}\n type={type}\n disabled={disabled}\n value={value}\n defaultValue={defaultValue}\n onChange={handleChange}\n aria-label=\"Search\"\n className=\"h-full min-w-0 flex-1 border-0 bg-transparent p-0 text-inherit outline-none placeholder:text-[var(--ui-input-search-placeholder-color-idle)] disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:appearance-none\"\n {...props}\n />\n {hasValue && !disabled && (\n <button\n type=\"button\"\n aria-label=\"Clear search\"\n onClick={handleClear}\n className=\"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm text-[var(--ui-input-search-clear-icon-color)] outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)] [&>svg]:size-4\"\n >\n <TimesIcon size={16} />\n </button>\n )}\n </div>\n );\n }\n);\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"names":["SearchBox","React","className","type","disabled","onClear","onChange","value","defaultValue","props","forwardedRef","innerRef","hasValue","setHasValue","setRefs","node","handleChange","event","handleClear","input","setter","_b","_a","jsxs","cn","jsx","MagnifierIcon","TimesIcon"],"mappings":";;;;AAwBA,MAAMA,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAWV,EAAM,OAAyB,IAAI,GAC9C,CAACW,GAAUC,CAAW,IAAIZ,EAAM;AAAA,MACpC,MAAM,OAAOM,KAASC,KAAgB,EAAE,EAAE,SAAS;AAAA,IAAA;AAIrD,IAAAP,EAAM,UAAU,MAAM;AACpB,MAAIM,MAAU,UAAWM,EAAY,OAAON,CAAK,EAAE,SAAS,CAAC;AAAA,IAC/D,GAAG,CAACA,CAAK,CAAC;AAEV,UAAMO,IAAUb,EAAM;AAAA,MACpB,CAACc,MAAkC;AACjC,QAAAJ,EAAS,UAAUI,GACf,OAAOL,KAAiB,aAAYA,EAAaK,CAAI,IAChDL,QAA2B,UAAUK;AAAA,MAChD;AAAA,MACA,CAACL,CAAY;AAAA,IAAA,GAGTM,IAAe,CAACC,MAA+C;AACnE,MAAAJ,EAAYI,EAAM,OAAO,MAAM,SAAS,CAAC,GACzCX,KAAA,QAAAA,EAAWW;AAAA,IACb,GAEMC,IAAc,MAAM;;AACxB,YAAMC,IAAQR,E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