@acronis-platform/ui-react 0.33.1 → 0.35.1

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.
@@ -1,4 +1,4 @@
1
- import { jsx as i, jsxs as c } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import { mergeProps as o } from "@base-ui/react/merge-props";
4
4
  import { useRender as n } from "@base-ui/react/use-render";
@@ -1,14 +1,14 @@
1
1
  import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import { Select as a } from "@base-ui/react/select";
4
- import { ChevronDownIcon as v, MagnifierIcon as m, CheckIcon as p, InboxIcon as g, CircleWarningIcon as x } from "@acronis-platform/icons-react/stroke-mono";
4
+ import { CheckIcon as p, MagnifierIcon as m, InboxIcon as g, CircleWarningIcon as x, ChevronDownIcon as h } from "@acronis-platform/icons-react/stroke-mono";
5
5
  import { cn as i } from "../../../lib/utils.js";
6
6
  const u = l.createContext(!1);
7
- function h(e) {
7
+ function f(e) {
8
8
  return /* @__PURE__ */ o(u.Provider, { value: !!e.multiple, children: /* @__PURE__ */ o(a.Root, { ...e }) });
9
9
  }
10
- h.displayName = "InputSelect";
11
- const V = a.Group, f = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
10
+ f.displayName = "InputSelect";
11
+ const E = a.Group, w = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
12
12
  "div",
13
13
  {
14
14
  ref: t,
@@ -19,8 +19,8 @@ const V = a.Group, f = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__
19
19
  ...r
20
20
  }
21
21
  ));
22
- f.displayName = "InputSelectField";
23
- const w = l.forwardRef(({ className: e, children: r, required: t, ...n }, d) => /* @__PURE__ */ c(
22
+ w.displayName = "InputSelectField";
23
+ const I = l.forwardRef(({ className: e, children: r, required: t, ...n }, d) => /* @__PURE__ */ c(
24
24
  a.Label,
25
25
  {
26
26
  ref: d,
@@ -42,8 +42,8 @@ const w = l.forwardRef(({ className: e, children: r, required: t, ...n }, d) =>
42
42
  ]
43
43
  }
44
44
  ));
45
- w.displayName = "InputSelectLabel";
46
- const I = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__ */ c(
45
+ I.displayName = "InputSelectLabel";
46
+ const N = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__ */ c(
47
47
  a.Trigger,
48
48
  {
49
49
  ref: n,
@@ -61,7 +61,7 @@ const I = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__
61
61
  children: [
62
62
  r,
63
63
  /* @__PURE__ */ o(a.Icon, { className: "flex shrink-0 items-center text-[var(--ui-input-select-normal-icon-expand-color-idle)] group-data-[disabled]:text-[var(--ui-input-select-normal-icon-expand-color-disabled)]", children: /* @__PURE__ */ o(
64
- v,
64
+ h,
65
65
  {
66
66
  size: 16,
67
67
  className: "transition-transform group-data-[popup-open]:rotate-180"
@@ -70,8 +70,8 @@ const I = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__
70
70
  ]
71
71
  }
72
72
  ));
73
- I.displayName = "InputSelectTrigger";
74
- const N = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
73
+ N.displayName = "InputSelectTrigger";
74
+ const S = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
75
75
  a.Value,
76
76
  {
77
77
  ref: t,
@@ -83,9 +83,17 @@ const N = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
83
83
  ...r
84
84
  }
85
85
  ));
86
- N.displayName = "InputSelectValue";
87
- const S = l.forwardRef(
88
- ({ className: e, children: r, sideOffset: t = 4, align: n = "start", side: d = "bottom", ...s }, b) => /* @__PURE__ */ o(a.Portal, { children: /* @__PURE__ */ o(
86
+ S.displayName = "InputSelectValue";
87
+ const y = l.forwardRef(
88
+ ({
89
+ className: e,
90
+ children: r,
91
+ sideOffset: t = 4,
92
+ align: n = "start",
93
+ side: d = "bottom",
94
+ portalContainer: s,
95
+ ...b
96
+ }, v) => /* @__PURE__ */ o(a.Portal, { container: s, children: /* @__PURE__ */ o(
89
97
  a.Positioner,
90
98
  {
91
99
  sideOffset: t,
@@ -96,20 +104,20 @@ const S = l.forwardRef(
96
104
  children: /* @__PURE__ */ o(
97
105
  a.Popup,
98
106
  {
99
- ref: b,
107
+ ref: v,
100
108
  className: i(
101
109
  "max-h-[var(--available-height)] min-w-[var(--anchor-width)] overflow-y-auto rounded-[var(--ui-input-select-dropdown-container-border-radius)] border border-[var(--ui-input-select-dropdown-container-border-color)] bg-[var(--ui-input-select-dropdown-container-color)] py-[var(--ui-input-select-dropdown-container-padding-y)] text-sm shadow-md outline-none",
102
110
  e
103
111
  ),
104
- ...s,
112
+ ...b,
105
113
  children: r
106
114
  }
107
115
  )
108
116
  }
109
117
  ) })
110
118
  );
111
- S.displayName = "InputSelectContent";
112
- const y = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c("div", { className: "flex items-center gap-[var(--ui-input-select-dropdown-dropdown-search-gap)] px-[var(--ui-input-select-dropdown-dropdown-search-padding-x)] py-[var(--ui-input-select-dropdown-dropdown-search-padding-y)]", children: [
119
+ y.displayName = "InputSelectContent";
120
+ const k = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c("div", { className: "flex items-center gap-[var(--ui-input-select-dropdown-dropdown-search-gap)] px-[var(--ui-input-select-dropdown-dropdown-search-padding-x)] py-[var(--ui-input-select-dropdown-dropdown-search-padding-y)]", children: [
113
121
  /* @__PURE__ */ o(
114
122
  m,
115
123
  {
@@ -130,8 +138,8 @@ const y = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c("div", {
130
138
  }
131
139
  )
132
140
  ] }));
133
- y.displayName = "InputSelectSearch";
134
- const k = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
141
+ k.displayName = "InputSelectSearch";
142
+ const R = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
135
143
  a.Group,
136
144
  {
137
145
  ref: t,
@@ -142,8 +150,8 @@ const k = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
142
150
  ...r
143
151
  }
144
152
  ));
145
- k.displayName = "InputSelectSection";
146
- const R = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
153
+ R.displayName = "InputSelectSection";
154
+ const z = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
147
155
  a.GroupLabel,
148
156
  {
149
157
  ref: t,
@@ -154,8 +162,8 @@ const R = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
154
162
  ...r
155
163
  }
156
164
  ));
157
- R.displayName = "InputSelectSectionLabel";
158
- const z = l.forwardRef(({ className: e, children: r, ...t }, n) => {
165
+ z.displayName = "InputSelectSectionLabel";
166
+ const C = l.forwardRef(({ className: e, children: r, ...t }, n) => {
159
167
  const d = l.useContext(u);
160
168
  return /* @__PURE__ */ c(
161
169
  a.Item,
@@ -186,8 +194,8 @@ const z = l.forwardRef(({ className: e, children: r, ...t }, n) => {
186
194
  }
187
195
  );
188
196
  });
189
- z.displayName = "InputSelectItem";
190
- const C = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
197
+ C.displayName = "InputSelectItem";
198
+ const L = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
191
199
  "p",
192
200
  {
193
201
  ref: t,
@@ -198,8 +206,8 @@ const C = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
198
206
  ...r
199
207
  }
200
208
  ));
201
- C.displayName = "InputSelectDescription";
202
- const L = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
209
+ L.displayName = "InputSelectDescription";
210
+ const T = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
203
211
  "p",
204
212
  {
205
213
  ref: t,
@@ -210,8 +218,8 @@ const L = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ o(
210
218
  ...r
211
219
  }
212
220
  ));
213
- L.displayName = "InputSelectError";
214
- const T = l.forwardRef(
221
+ T.displayName = "InputSelectError";
222
+ const j = l.forwardRef(
215
223
  ({ className: e, variant: r, children: t, action: n, ...d }, s) => /* @__PURE__ */ c(
216
224
  "div",
217
225
  {
@@ -237,21 +245,21 @@ const T = l.forwardRef(
237
245
  }
238
246
  )
239
247
  );
240
- T.displayName = "InputSelectStatus";
248
+ j.displayName = "InputSelectStatus";
241
249
  export {
242
- h as InputSelect,
243
- S as InputSelectContent,
244
- C as InputSelectDescription,
245
- L as InputSelectError,
246
- f as InputSelectField,
247
- V as InputSelectGroup,
248
- z as InputSelectItem,
249
- w as InputSelectLabel,
250
- y as InputSelectSearch,
251
- k as InputSelectSection,
252
- R as InputSelectSectionLabel,
253
- T as InputSelectStatus,
254
- I as InputSelectTrigger,
255
- N as InputSelectValue
250
+ f as InputSelect,
251
+ y as InputSelectContent,
252
+ L as InputSelectDescription,
253
+ T as InputSelectError,
254
+ w as InputSelectField,
255
+ E as InputSelectGroup,
256
+ C as InputSelectItem,
257
+ I as InputSelectLabel,
258
+ k as InputSelectSearch,
259
+ R as InputSelectSection,
260
+ z as InputSelectSectionLabel,
261
+ j as InputSelectStatus,
262
+ N as InputSelectTrigger,
263
+ S as InputSelectValue
256
264
  };
257
265
  //# sourceMappingURL=input-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-select.js","sources":["../../../../src/components/ui/input-select/input-select.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Select as SelectPrimitive } from '@base-ui/react/select';\nimport {\n CheckIcon,\n ChevronDownIcon,\n CircleWarningIcon,\n InboxIcon,\n MagnifierIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// The next-gen select, themed by the dedicated `--ui-input-select-*` tier (global /\n// normal / error / dropdown). It composes Base UI `Select` and adds the field\n// furniture (label, required, description, error) and the dropdown machinery\n// (in-dropdown search, sections/groups, single + multiple items, loading/empty/error\n// status). The trigger box wires each state to its own token — idle / hover / open\n// (`data-popup-open`) + focus ring / disabled — and switches to the error border +\n// `--ui-focus-error` ring when `aria-invalid` is set. Selection mode (single vs\n// multiple) flows from the `multiple` prop on the root via `InputSelectModeContext`:\n// single items toggle the row background and show a trailing check; multiple items\n// keep the row background and show a leading checkbox.\n\nconst InputSelectModeContext = React.createContext(false);\n\nfunction InputSelect<Value, Multiple extends boolean | undefined = false>(\n props: SelectPrimitive.Root.Props<Value, Multiple>\n) {\n return (\n <InputSelectModeContext.Provider value={Boolean(props.multiple)}>\n <SelectPrimitive.Root {...props} />\n </InputSelectModeContext.Provider>\n );\n}\nInputSelect.displayName = 'InputSelect';\n\nconst InputSelectGroup = SelectPrimitive.Group;\n\n/** Vertical field stack: label, trigger, description/error. */\nconst InputSelectField = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<'div'>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex w-full min-w-[var(--ui-input-select-global-container-width-min)] flex-col gap-[var(--ui-input-select-global-container-gap)]',\n className\n )}\n {...props}\n />\n));\nInputSelectField.displayName = 'InputSelectField';\n\nconst InputSelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label> & {\n /** Appends a required `*` after the label text. */\n required?: boolean;\n }\n>(({ className, children, required, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\n 'flex gap-[var(--ui-input-select-global-container-label-gap)] text-sm leading-4 text-[var(--ui-input-select-global-label-color-idle)] data-[disabled]:text-[var(--ui-input-select-global-label-color-disabled)]',\n className\n )}\n {...props}\n >\n {children}\n {required && (\n <span\n aria-hidden=\"true\"\n className=\"text-[var(--ui-input-select-global-required-color)]\"\n >\n *\n </span>\n )}\n </SelectPrimitive.Label>\n));\nInputSelectLabel.displayName = 'InputSelectLabel';\n\nconst InputSelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group flex h-[var(--ui-input-select-global-box-height)] w-full min-w-0 items-center gap-[var(--ui-input-select-global-box-gap)] rounded-[var(--ui-input-select-global-box-border-radius)] border bg-[var(--ui-input-select-global-box-color-idle)] border-[var(--ui-input-select-normal-box-border-color-idle)] px-[var(--ui-input-select-global-box-padding-x)] text-sm leading-6 text-[var(--ui-input-select-global-value-color-idle)] outline-none transition-colors',\n 'not-data-[disabled]:hover:bg-[var(--ui-input-select-global-box-color-hover)] not-data-[disabled]:hover:border-[var(--ui-input-select-normal-box-border-color-hover)]',\n 'focus-visible:border-[var(--ui-input-select-normal-box-border-color-hover)] focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)]',\n 'data-[popup-open]:border-[var(--ui-input-select-normal-box-border-color-hover)] data-[popup-open]:ring-[3px] data-[popup-open]:ring-[var(--ui-focus-primary)]',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:border-[var(--ui-input-select-normal-box-border-color-disabled)] data-[disabled]:bg-[var(--ui-input-select-global-box-color-disabled)] data-[disabled]:text-[var(--ui-input-select-global-value-color-disabled)]',\n // Error treatment (driven by `aria-invalid`).\n 'aria-invalid:border-[var(--ui-input-select-error-box-border-color-idle)] not-data-[disabled]:aria-invalid:hover:border-[var(--ui-input-select-error-box-border-color-hover)] aria-invalid:focus-visible:border-[var(--ui-input-select-error-box-border-color-hover)] aria-invalid:focus-visible:ring-[var(--ui-focus-error)] aria-invalid:data-[popup-open]:border-[var(--ui-input-select-error-box-border-color-hover)] aria-invalid:data-[popup-open]:ring-[var(--ui-focus-error)]',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon className=\"flex shrink-0 items-center text-[var(--ui-input-select-normal-icon-expand-color-idle)] group-data-[disabled]:text-[var(--ui-input-select-normal-icon-expand-color-disabled)]\">\n <ChevronDownIcon\n size={16}\n className=\"transition-transform group-data-[popup-open]:rotate-180\"\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nInputSelectTrigger.displayName = 'InputSelectTrigger';\n\nconst InputSelectValue = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Value>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Value\n ref={ref}\n className={cn(\n 'min-w-0 flex-1 truncate text-left text-[var(--ui-input-select-global-value-color-idle)] data-[placeholder]:text-[var(--ui-input-select-global-placeholder-color-idle)]',\n 'group-data-[disabled]:!text-[var(--ui-input-select-global-value-color-disabled)] group-data-[disabled]:data-[placeholder]:!text-[var(--ui-input-select-global-placeholder-color-disabled)]',\n className\n )}\n {...props}\n />\n));\nInputSelectValue.displayName = 'InputSelectValue';\n\nconst InputSelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Popup>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Popup> & {\n sideOffset?: number;\n align?: SelectPrimitive.Positioner.Props['align'];\n side?: SelectPrimitive.Positioner.Props['side'];\n }\n>(\n (\n { className, children, sideOffset = 4, align = 'start', side = 'bottom', ...props },\n ref\n ) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n sideOffset={sideOffset}\n align={align}\n side={side}\n alignItemWithTrigger={false}\n className=\"z-50 outline-none\"\n >\n <SelectPrimitive.Popup\n ref={ref}\n className={cn(\n 'max-h-[var(--available-height)] min-w-[var(--anchor-width)] overflow-y-auto rounded-[var(--ui-input-select-dropdown-container-border-radius)] border border-[var(--ui-input-select-dropdown-container-border-color)] bg-[var(--ui-input-select-dropdown-container-color)] py-[var(--ui-input-select-dropdown-container-padding-y)] text-sm shadow-md outline-none',\n className\n )}\n {...props}\n >\n {children}\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n);\nInputSelectContent.displayName = 'InputSelectContent';\n\n/**\n * Presentational in-dropdown search row (magnifier + input). The consumer wires\n * `value`/`onChange` to filter the items it renders.\n */\nconst InputSelectSearch = React.forwardRef<\n HTMLInputElement,\n React.ComponentPropsWithoutRef<'input'>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center gap-[var(--ui-input-select-dropdown-dropdown-search-gap)] px-[var(--ui-input-select-dropdown-dropdown-search-padding-x)] py-[var(--ui-input-select-dropdown-dropdown-search-padding-y)]\">\n <MagnifierIcon\n size={16}\n className=\"shrink-0 text-[var(--ui-input-select-dropdown-dropdown-search-label-color-placeholder)]\"\n />\n <input\n ref={ref}\n type=\"search\"\n className={cn(\n 'min-w-0 flex-1 border-0 bg-transparent p-0 text-sm leading-6 text-[var(--ui-input-select-dropdown-dropdown-search-label-color-value)] outline-none placeholder:text-[var(--ui-input-select-dropdown-dropdown-search-label-color-placeholder)] [&::-webkit-search-cancel-button]:appearance-none',\n className\n )}\n {...props}\n />\n </div>\n));\nInputSelectSearch.displayName = 'InputSelectSearch';\n\n/** A section (group) of items with an optional header. Divided by a top border. */\nconst InputSelectSection = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Group\n ref={ref}\n className={cn(\n 'flex flex-col border-t border-[var(--ui-input-select-dropdown-section-container-border-color)] py-[var(--ui-input-select-dropdown-section-container-padding-y)] first:border-t-0',\n className\n )}\n {...props}\n />\n));\nInputSelectSection.displayName = 'InputSelectSection';\n\nconst InputSelectSectionLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.GroupLabel>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.GroupLabel>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.GroupLabel\n ref={ref}\n className={cn(\n 'px-[var(--ui-input-select-dropdown-section-container-header-padding-x)] py-[var(--ui-input-select-dropdown-section-container-header-padding-y)] text-sm font-semibold leading-6 text-[var(--ui-input-select-dropdown-section-label-group-color)]',\n className\n )}\n {...props}\n />\n));\nInputSelectSectionLabel.displayName = 'InputSelectSectionLabel';\n\nconst InputSelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => {\n const multiple = React.useContext(InputSelectModeContext);\n return (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'group/item relative flex cursor-default items-center gap-[var(--ui-input-select-dropdown-item-global-container-gap)] px-[var(--ui-input-select-dropdown-item-global-container-padding-x)] py-[var(--ui-input-select-dropdown-item-global-container-padding-y)] leading-6 text-[var(--ui-input-select-dropdown-item-global-label-color)] outline-none select-none',\n 'bg-[var(--ui-input-select-dropdown-item-unselected-container-color-idle)] data-[highlighted]:bg-[var(--ui-input-select-dropdown-item-unselected-container-color-hover)]',\n // Single-select rows tint when selected; multiple-select rows keep the\n // unselected background (the leading checkbox carries the state).\n !multiple &&\n 'data-[selected]:bg-[var(--ui-input-select-dropdown-item-selected-container-color-idle)] data-[selected]:data-[highlighted]:bg-[var(--ui-input-select-dropdown-item-selected-container-color-hover)]',\n 'data-[disabled]:pointer-events-none data-[disabled]:bg-[var(--ui-input-select-dropdown-item-unselected-container-color-disabled)]',\n className\n )}\n {...props}\n >\n {multiple && (\n <span\n aria-hidden=\"true\"\n className=\"flex size-[var(--ui-checkbox-global-box-size)] shrink-0 items-center justify-center rounded-[var(--ui-checkbox-global-box-border-radius)] border-[length:var(--ui-checkbox-global-box-border-width)] border-[var(--ui-checkbox-unchecked-box-border-color-idle)] bg-[var(--ui-checkbox-unchecked-box-color-idle)] text-transparent group-data-[selected]/item:border-[var(--ui-checkbox-checked-box-border-color-idle)] group-data-[selected]/item:bg-[var(--ui-checkbox-checked-box-color-idle)] group-data-[selected]/item:text-[var(--ui-checkbox-checked-icon-color-idle)]\"\n >\n <CheckIcon size={16} />\n </span>\n )}\n <SelectPrimitive.ItemText className=\"min-w-0 flex-1 truncate\">\n {children}\n </SelectPrimitive.ItemText>\n {!multiple && (\n <SelectPrimitive.ItemIndicator className=\"flex shrink-0 items-center text-[var(--ui-input-select-normal-icon-expand-color-hover)]\">\n <CheckIcon size={16} />\n </SelectPrimitive.ItemIndicator>\n )}\n </SelectPrimitive.Item>\n );\n});\nInputSelectItem.displayName = 'InputSelectItem';\n\nconst InputSelectDescription = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentPropsWithoutRef<'p'>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\n 'text-xs leading-4 text-[var(--ui-input-select-normal-description-color-idle)]',\n className\n )}\n {...props}\n />\n));\nInputSelectDescription.displayName = 'InputSelectDescription';\n\nconst InputSelectError = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentPropsWithoutRef<'p'>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\n 'text-xs leading-4 text-[var(--ui-input-select-error-error-msg-color)]',\n className\n )}\n {...props}\n />\n));\nInputSelectError.displayName = 'InputSelectError';\n\nexport interface InputSelectStatusProps\n extends React.ComponentPropsWithoutRef<'div'> {\n /** Which status to show. Drives the leading icon. */\n variant: 'loading' | 'empty' | 'error';\n /** Optional trailing action (e.g. a \"Try again\" button) — shown for `error`. */\n action?: React.ReactNode;\n}\n\n/** Loading / empty / error status row shown instead of items inside the dropdown. */\nconst InputSelectStatus = React.forwardRef<HTMLDivElement, InputSelectStatusProps>(\n ({ className, variant, children, action, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex min-h-[128px] flex-col items-center justify-center gap-[var(--ui-input-select-dropdown-container-status-gap)] border-t border-[var(--ui-input-select-dropdown-section-container-border-color)] px-[var(--ui-input-select-dropdown-container-status-padding-x)] py-[var(--ui-input-select-dropdown-container-status-padding-y)] text-center text-sm leading-6 text-[var(--ui-input-select-dropdown-item-global-label-color)]',\n className\n )}\n {...props}\n >\n {variant === 'loading' && (\n <span\n aria-hidden=\"true\"\n className=\"size-6 animate-spin rounded-full border-2 border-current border-t-transparent opacity-70\"\n />\n )}\n {variant === 'empty' && <InboxIcon size={24} className=\"opacity-70\" />}\n {variant === 'error' && <CircleWarningIcon size={24} className=\"opacity-70\" />}\n {children}\n {variant === 'error' && action}\n </div>\n )\n);\nInputSelectStatus.displayName = 'InputSelectStatus';\n\nexport {\n InputSelect,\n InputSelectField,\n InputSelectLabel,\n InputSelectTrigger,\n InputSelectValue,\n InputSelectContent,\n InputSelectSearch,\n InputSelectGroup,\n InputSelectSection,\n InputSelectSectionLabel,\n InputSelectItem,\n InputSelectDescription,\n InputSelectError,\n InputSelectStatus,\n};\n"],"names":["InputSelectModeContext","React","InputSelect","props","jsx","SelectPrimitive","InputSelectGroup","InputSelectField","className","ref","cn","InputSelectLabel","children","required","jsxs","InputSelectTrigger","ChevronDownIcon","InputSelectValue","InputSelectContent","sideOffset","align","side","InputSelectSearch","MagnifierIcon","InputSelectSection","InputSelectSectionLabel","InputSelectItem","multiple","CheckIcon","InputSelectDescription","InputSelectError","InputSelectStatus","variant","action","InboxIcon","CircleWarningIcon"],"mappings":";;;;;AAuBA,MAAMA,IAAyBC,EAAM,cAAc,EAAK;AAExD,SAASC,EACPC,GACA;AACA,SACE,gBAAAC,EAACJ,EAAuB,UAAvB,EAAgC,OAAO,EAAQG,EAAM,UACpD,4BAACE,EAAgB,MAAhB,EAAsB,GAAGF,GAAO,GACnC;AAEJ;AACAD,EAAY,cAAc;AAE1B,MAAMI,IAAmBD,EAAgB,OAGnCE,IAAmBN,EAAM,WAG7B,CAAC,EAAE,WAAAO,GAAW,GAAGL,EAAA,GAASM,MAC1B,gBAAAL;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAK;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAED,GAAGL;AAAA,EAAA;AACN,CACD;AACDI,EAAiB,cAAc;AAE/B,MAAMI,IAAmBV,EAAM,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AAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAK;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAED,GAAGL;AAAA,EAAA;AACN,CACD;AACD0B,EAAuB,cAAc;AAErC,MAAMC,IAAmB7B,EAAM,WAG7B,CAAC,EAAE,WAAAO,GAAW,GAAGL,EAAA,GAASM,MAC1B,gBAAAL;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAK;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAED,GAAGL;AAAA,EAAA;AACN,CACD;AACD2B,EAAiB,cAAc;AAW/B,MAAMC,IAAoB9B,EAAM;AAAA,EAC9B,CAAC,EAAE,WAAAO,GAAW,SAAAwB,GAAS,UAAApB,GAAU,QAAAqB,GAAQ,GAAG9B,EAAA,GAASM,MACnD,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAL;AAAA,MACA,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEH,UAAA;AAAA,QAAA6B,MAAY,aACX,gBAAA5B;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA;AAAA,QAGb4B,MAAY,WAAW,gBAAA5B,EAAC8B,KAAU,MAAM,IAAI,WAAU,cAAa;AAAA,QACnEF,MAAY,WAAW,gBAAA5B,EAAC+B,KAAkB,MAAM,IAAI,WAAU,cAAa;AAAA,QAC3EvB;AAAA,QACAoB,MAAY,WAAWC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9B;AACAF,EAAkB,cAAc;"}
1
+ {"version":3,"file":"input-select.js","sources":["../../../../src/components/ui/input-select/input-select.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Select as SelectPrimitive } from '@base-ui/react/select';\nimport {\n CheckIcon,\n ChevronDownIcon,\n CircleWarningIcon,\n InboxIcon,\n MagnifierIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// The next-gen select, themed by the dedicated `--ui-input-select-*` tier (global /\n// normal / error / dropdown). It composes Base UI `Select` and adds the field\n// furniture (label, required, description, error) and the dropdown machinery\n// (in-dropdown search, sections/groups, single + multiple items, loading/empty/error\n// status). The trigger box wires each state to its own token — idle / hover / open\n// (`data-popup-open`) + focus ring / disabled — and switches to the error border +\n// `--ui-focus-error` ring when `aria-invalid` is set. Selection mode (single vs\n// multiple) flows from the `multiple` prop on the root via `InputSelectModeContext`:\n// single items toggle the row background and show a trailing check; multiple items\n// keep the row background and show a leading checkbox.\n\nconst InputSelectModeContext = React.createContext(false);\n\nfunction InputSelect<Value, Multiple extends boolean | undefined = false>(\n props: SelectPrimitive.Root.Props<Value, Multiple>\n) {\n return (\n <InputSelectModeContext.Provider value={Boolean(props.multiple)}>\n <SelectPrimitive.Root {...props} />\n </InputSelectModeContext.Provider>\n );\n}\nInputSelect.displayName = 'InputSelect';\n\nconst InputSelectGroup = SelectPrimitive.Group;\n\n/** Vertical field stack: label, trigger, description/error. */\nconst InputSelectField = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<'div'>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex w-full min-w-[var(--ui-input-select-global-container-width-min)] flex-col gap-[var(--ui-input-select-global-container-gap)]',\n className\n )}\n {...props}\n />\n));\nInputSelectField.displayName = 'InputSelectField';\n\nconst InputSelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label> & {\n /** Appends a required `*` after the label text. */\n required?: boolean;\n }\n>(({ className, children, required, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\n 'flex gap-[var(--ui-input-select-global-container-label-gap)] text-sm leading-4 text-[var(--ui-input-select-global-label-color-idle)] data-[disabled]:text-[var(--ui-input-select-global-label-color-disabled)]',\n className\n )}\n {...props}\n >\n {children}\n {required && (\n <span\n aria-hidden=\"true\"\n className=\"text-[var(--ui-input-select-global-required-color)]\"\n >\n *\n </span>\n )}\n </SelectPrimitive.Label>\n));\nInputSelectLabel.displayName = 'InputSelectLabel';\n\nconst InputSelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group flex h-[var(--ui-input-select-global-box-height)] w-full min-w-0 items-center gap-[var(--ui-input-select-global-box-gap)] rounded-[var(--ui-input-select-global-box-border-radius)] border bg-[var(--ui-input-select-global-box-color-idle)] border-[var(--ui-input-select-normal-box-border-color-idle)] px-[var(--ui-input-select-global-box-padding-x)] text-sm leading-6 text-[var(--ui-input-select-global-value-color-idle)] outline-none transition-colors',\n 'not-data-[disabled]:hover:bg-[var(--ui-input-select-global-box-color-hover)] not-data-[disabled]:hover:border-[var(--ui-input-select-normal-box-border-color-hover)]',\n 'focus-visible:border-[var(--ui-input-select-normal-box-border-color-hover)] focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)]',\n 'data-[popup-open]:border-[var(--ui-input-select-normal-box-border-color-hover)] data-[popup-open]:ring-[3px] data-[popup-open]:ring-[var(--ui-focus-primary)]',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:border-[var(--ui-input-select-normal-box-border-color-disabled)] data-[disabled]:bg-[var(--ui-input-select-global-box-color-disabled)] data-[disabled]:text-[var(--ui-input-select-global-value-color-disabled)]',\n // Error treatment (driven by `aria-invalid`).\n 'aria-invalid:border-[var(--ui-input-select-error-box-border-color-idle)] not-data-[disabled]:aria-invalid:hover:border-[var(--ui-input-select-error-box-border-color-hover)] aria-invalid:focus-visible:border-[var(--ui-input-select-error-box-border-color-hover)] aria-invalid:focus-visible:ring-[var(--ui-focus-error)] aria-invalid:data-[popup-open]:border-[var(--ui-input-select-error-box-border-color-hover)] aria-invalid:data-[popup-open]:ring-[var(--ui-focus-error)]',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon className=\"flex shrink-0 items-center text-[var(--ui-input-select-normal-icon-expand-color-idle)] group-data-[disabled]:text-[var(--ui-input-select-normal-icon-expand-color-disabled)]\">\n <ChevronDownIcon\n size={16}\n className=\"transition-transform group-data-[popup-open]:rotate-180\"\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nInputSelectTrigger.displayName = 'InputSelectTrigger';\n\nconst InputSelectValue = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Value>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Value\n ref={ref}\n className={cn(\n 'min-w-0 flex-1 truncate text-left text-[var(--ui-input-select-global-value-color-idle)] data-[placeholder]:text-[var(--ui-input-select-global-placeholder-color-idle)]',\n 'group-data-[disabled]:!text-[var(--ui-input-select-global-value-color-disabled)] group-data-[disabled]:data-[placeholder]:!text-[var(--ui-input-select-global-placeholder-color-disabled)]',\n className\n )}\n {...props}\n />\n));\nInputSelectValue.displayName = 'InputSelectValue';\n\nconst InputSelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Popup>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Popup> & {\n sideOffset?: number;\n align?: SelectPrimitive.Positioner.Props['align'];\n side?: SelectPrimitive.Positioner.Props['side'];\n /**\n * Container to portal the dropdown into. Defaults to the document body;\n * pass an element to scope the portal (e.g. a shadow root, so the popup\n * inherits styles defined there).\n */\n portalContainer?: SelectPrimitive.Portal.Props['container'];\n }\n>(\n (\n {\n className,\n children,\n sideOffset = 4,\n align = 'start',\n side = 'bottom',\n portalContainer,\n ...props\n },\n ref\n ) => (\n <SelectPrimitive.Portal container={portalContainer}>\n <SelectPrimitive.Positioner\n sideOffset={sideOffset}\n align={align}\n side={side}\n alignItemWithTrigger={false}\n className=\"z-50 outline-none\"\n >\n <SelectPrimitive.Popup\n ref={ref}\n className={cn(\n 'max-h-[var(--available-height)] min-w-[var(--anchor-width)] overflow-y-auto rounded-[var(--ui-input-select-dropdown-container-border-radius)] border border-[var(--ui-input-select-dropdown-container-border-color)] bg-[var(--ui-input-select-dropdown-container-color)] py-[var(--ui-input-select-dropdown-container-padding-y)] text-sm shadow-md outline-none',\n className\n )}\n {...props}\n >\n {children}\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n);\nInputSelectContent.displayName = 'InputSelectContent';\n\n/**\n * Presentational in-dropdown search row (magnifier + input). The consumer wires\n * `value`/`onChange` to filter the items it renders.\n */\nconst InputSelectSearch = React.forwardRef<\n HTMLInputElement,\n React.ComponentPropsWithoutRef<'input'>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center gap-[var(--ui-input-select-dropdown-dropdown-search-gap)] px-[var(--ui-input-select-dropdown-dropdown-search-padding-x)] py-[var(--ui-input-select-dropdown-dropdown-search-padding-y)]\">\n <MagnifierIcon\n size={16}\n className=\"shrink-0 text-[var(--ui-input-select-dropdown-dropdown-search-label-color-placeholder)]\"\n />\n <input\n ref={ref}\n type=\"search\"\n className={cn(\n 'min-w-0 flex-1 border-0 bg-transparent p-0 text-sm leading-6 text-[var(--ui-input-select-dropdown-dropdown-search-label-color-value)] outline-none placeholder:text-[var(--ui-input-select-dropdown-dropdown-search-label-color-placeholder)] [&::-webkit-search-cancel-button]:appearance-none',\n className\n )}\n {...props}\n />\n </div>\n));\nInputSelectSearch.displayName = 'InputSelectSearch';\n\n/** A section (group) of items with an optional header. Divided by a top border. */\nconst InputSelectSection = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Group\n ref={ref}\n className={cn(\n 'flex flex-col border-t border-[var(--ui-input-select-dropdown-section-container-border-color)] py-[var(--ui-input-select-dropdown-section-container-padding-y)] first:border-t-0',\n className\n )}\n {...props}\n />\n));\nInputSelectSection.displayName = 'InputSelectSection';\n\nconst InputSelectSectionLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.GroupLabel>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.GroupLabel>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.GroupLabel\n ref={ref}\n className={cn(\n 'px-[var(--ui-input-select-dropdown-section-container-header-padding-x)] py-[var(--ui-input-select-dropdown-section-container-header-padding-y)] text-sm font-semibold leading-6 text-[var(--ui-input-select-dropdown-section-label-group-color)]',\n className\n )}\n {...props}\n />\n));\nInputSelectSectionLabel.displayName = 'InputSelectSectionLabel';\n\nconst InputSelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => {\n const multiple = React.useContext(InputSelectModeContext);\n return (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'group/item relative flex cursor-default items-center gap-[var(--ui-input-select-dropdown-item-global-container-gap)] px-[var(--ui-input-select-dropdown-item-global-container-padding-x)] py-[var(--ui-input-select-dropdown-item-global-container-padding-y)] leading-6 text-[var(--ui-input-select-dropdown-item-global-label-color)] outline-none select-none',\n 'bg-[var(--ui-input-select-dropdown-item-unselected-container-color-idle)] data-[highlighted]:bg-[var(--ui-input-select-dropdown-item-unselected-container-color-hover)]',\n // Single-select rows tint when selected; multiple-select rows keep the\n // unselected background (the leading checkbox carries the state).\n !multiple &&\n 'data-[selected]:bg-[var(--ui-input-select-dropdown-item-selected-container-color-idle)] data-[selected]:data-[highlighted]:bg-[var(--ui-input-select-dropdown-item-selected-container-color-hover)]',\n 'data-[disabled]:pointer-events-none data-[disabled]:bg-[var(--ui-input-select-dropdown-item-unselected-container-color-disabled)]',\n className\n )}\n {...props}\n >\n {multiple && (\n <span\n aria-hidden=\"true\"\n className=\"flex size-[var(--ui-checkbox-global-box-size)] shrink-0 items-center justify-center rounded-[var(--ui-checkbox-global-box-border-radius)] border-[length:var(--ui-checkbox-global-box-border-width)] border-[var(--ui-checkbox-unchecked-box-border-color-idle)] bg-[var(--ui-checkbox-unchecked-box-color-idle)] text-transparent group-data-[selected]/item:border-[var(--ui-checkbox-checked-box-border-color-idle)] group-data-[selected]/item:bg-[var(--ui-checkbox-checked-box-color-idle)] group-data-[selected]/item:text-[var(--ui-checkbox-checked-icon-color-idle)]\"\n >\n <CheckIcon size={16} />\n </span>\n )}\n <SelectPrimitive.ItemText className=\"min-w-0 flex-1 truncate\">\n {children}\n </SelectPrimitive.ItemText>\n {!multiple && (\n <SelectPrimitive.ItemIndicator className=\"flex shrink-0 items-center text-[var(--ui-input-select-normal-icon-expand-color-hover)]\">\n <CheckIcon size={16} />\n </SelectPrimitive.ItemIndicator>\n )}\n </SelectPrimitive.Item>\n );\n});\nInputSelectItem.displayName = 'InputSelectItem';\n\nconst InputSelectDescription = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentPropsWithoutRef<'p'>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\n 'text-xs leading-4 text-[var(--ui-input-select-normal-description-color-idle)]',\n className\n )}\n {...props}\n />\n));\nInputSelectDescription.displayName = 'InputSelectDescription';\n\nconst InputSelectError = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentPropsWithoutRef<'p'>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\n 'text-xs leading-4 text-[var(--ui-input-select-error-error-msg-color)]',\n className\n )}\n {...props}\n />\n));\nInputSelectError.displayName = 'InputSelectError';\n\nexport interface InputSelectStatusProps\n extends React.ComponentPropsWithoutRef<'div'> {\n /** Which status to show. Drives the leading icon. */\n variant: 'loading' | 'empty' | 'error';\n /** Optional trailing action (e.g. a \"Try again\" button) — shown for `error`. */\n action?: React.ReactNode;\n}\n\n/** Loading / empty / error status row shown instead of items inside the dropdown. */\nconst InputSelectStatus = React.forwardRef<HTMLDivElement, InputSelectStatusProps>(\n ({ className, variant, children, action, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex min-h-[128px] flex-col items-center justify-center gap-[var(--ui-input-select-dropdown-container-status-gap)] border-t border-[var(--ui-input-select-dropdown-section-container-border-color)] px-[var(--ui-input-select-dropdown-container-status-padding-x)] py-[var(--ui-input-select-dropdown-container-status-padding-y)] text-center text-sm leading-6 text-[var(--ui-input-select-dropdown-item-global-label-color)]',\n className\n )}\n {...props}\n >\n {variant === 'loading' && (\n <span\n aria-hidden=\"true\"\n className=\"size-6 animate-spin rounded-full border-2 border-current border-t-transparent opacity-70\"\n />\n )}\n {variant === 'empty' && <InboxIcon size={24} className=\"opacity-70\" />}\n {variant === 'error' && <CircleWarningIcon size={24} className=\"opacity-70\" />}\n {children}\n {variant === 'error' && action}\n </div>\n )\n);\nInputSelectStatus.displayName = 'InputSelectStatus';\n\nexport {\n InputSelect,\n InputSelectField,\n InputSelectLabel,\n InputSelectTrigger,\n InputSelectValue,\n InputSelectContent,\n InputSelectSearch,\n InputSelectGroup,\n InputSelectSection,\n InputSelectSectionLabel,\n InputSelectItem,\n InputSelectDescription,\n InputSelectError,\n InputSelectStatus,\n};\n"],"names":["InputSelectModeContext","React","InputSelect","props","jsx","SelectPrimitive","InputSelectGroup","InputSelectField","className","ref","cn","InputSelectLabel","children","required","jsxs","InputSelectTrigger","ChevronDownIcon","InputSelectValue","InputSelectContent","sideOffset","align","side","portalContainer","InputSelectSearch","MagnifierIcon","InputSelectSection","InputSelectSectionLabel","InputSelectItem","multiple","CheckIcon","InputSelectDescription","InputSelectError","InputSelectStatus","variant","action","InboxIcon","CircleWarningIcon"],"mappings":";;;;;AAuBA,MAAMA,IAAyBC,EAAM,cAAc,EAAK;AAExD,SAASC,EACPC,GACA;AACA,SACE,gBAAAC,EAACJ,EAAuB,UAAvB,EAAgC,OAAO,EAAQG,EAAM,UACpD,4BAACE,EAAgB,MAAhB,EAAsB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