visits-style 1.4.16 → 2.0.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.
Files changed (68) hide show
  1. package/README.md +59 -26
  2. package/dist/index.cjs.js +1 -1571
  3. package/dist/index.d.ts +447 -7
  4. package/dist/index.es.js +953 -1440
  5. package/dist/lib.css +26 -0
  6. package/package.json +9 -8
  7. package/dist/components/Accordion/index.d.ts +0 -12
  8. package/dist/components/AppBar/index.d.ts +0 -19
  9. package/dist/components/Modal/index.d.ts +0 -32
  10. package/dist/components/Popover/index.d.ts +0 -46
  11. package/dist/components/Portal/index.d.ts +0 -8
  12. package/dist/components/Spinner/index.d.ts +0 -12
  13. package/dist/components/Toast/ToastItem.d.ts +0 -2
  14. package/dist/components/Toast/index.d.ts +0 -2
  15. package/dist/components/Toast/types.d.ts +0 -44
  16. package/dist/components/Tooltip/index.d.ts +0 -37
  17. package/dist/components/index.d.ts +0 -10
  18. package/dist/elements/Box/index.d.ts +0 -10
  19. package/dist/elements/Button/ButtonGroup.d.ts +0 -3
  20. package/dist/elements/Button/TextButton.d.ts +0 -18
  21. package/dist/elements/Button/index.d.ts +0 -16
  22. package/dist/elements/Content/index.d.ts +0 -3
  23. package/dist/elements/Divider/index.d.ts +0 -3
  24. package/dist/elements/Grid/Col.d.ts +0 -12
  25. package/dist/elements/Grid/Container.d.ts +0 -7
  26. package/dist/elements/Grid/Row.d.ts +0 -3
  27. package/dist/elements/Icons/Approved.d.ts +0 -2
  28. package/dist/elements/Icons/ArrowDown.d.ts +0 -2
  29. package/dist/elements/Icons/ChevronLeftRound.d.ts +0 -2
  30. package/dist/elements/Icons/ChevronRightRound.d.ts +0 -2
  31. package/dist/elements/Icons/Close.d.ts +0 -2
  32. package/dist/elements/Icons/FileRound.d.ts +0 -2
  33. package/dist/elements/Icons/Pencil.d.ts +0 -2
  34. package/dist/elements/Icons/PencilSimple.d.ts +0 -2
  35. package/dist/elements/Icons/Plus.d.ts +0 -2
  36. package/dist/elements/Icons/Refresh.d.ts +0 -2
  37. package/dist/elements/Icons/User.d.ts +0 -2
  38. package/dist/elements/Icons/index.d.ts +0 -11
  39. package/dist/elements/Placeholder/index.d.ts +0 -3
  40. package/dist/elements/Progress/index.d.ts +0 -18
  41. package/dist/elements/Table/index.d.ts +0 -12
  42. package/dist/elements/Tag/index.d.ts +0 -15
  43. package/dist/elements/index.d.ts +0 -14
  44. package/dist/forms/Checkbox/index.d.ts +0 -8
  45. package/dist/forms/Field/index.d.ts +0 -7
  46. package/dist/forms/HelpMessage.d.ts +0 -8
  47. package/dist/forms/Radio/index.d.ts +0 -8
  48. package/dist/forms/Select/index.d.ts +0 -29
  49. package/dist/forms/Switch/index.d.ts +0 -21
  50. package/dist/forms/TextInput/index.d.ts +0 -22
  51. package/dist/forms/Textarea/index.d.ts +0 -11
  52. package/dist/forms/index.d.ts +0 -7
  53. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -3
  54. package/dist/styles/normalize.d.ts +0 -3
  55. package/dist/theme.d.ts +0 -3
  56. package/dist/types.d.ts +0 -36
  57. package/dist/utils/arrow.d.ts +0 -1
  58. package/dist/utils/boxShadow.d.ts +0 -1
  59. package/dist/utils/disabledColor.d.ts +0 -2
  60. package/dist/utils/findColorInvert.d.ts +0 -2
  61. package/dist/utils/hambuger.d.ts +0 -1
  62. package/dist/utils/index.d.ts +0 -6
  63. package/dist/utils/isClient.d.ts +0 -2
  64. package/dist/utils/media.d.ts +0 -6
  65. package/dist/utils/setAlign.d.ts +0 -3
  66. package/dist/utils/setSize.d.ts +0 -4
  67. package/dist/utils/stopPropagation.d.ts +0 -2
  68. package/dist/utils/wrapEvent.d.ts +0 -2
package/dist/index.cjs.js CHANGED
@@ -1,1571 +1 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const styledComponents = require('styled-components');
6
- const jsxRuntime = require('react/jsx-runtime');
7
- const React = require('react');
8
- const polished = require('polished');
9
- const react = require('@floating-ui/react');
10
- const reactDom = require('react-dom');
11
-
12
- const _interopDefaultCompat = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
13
-
14
- const React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
-
16
- const Wrapper$6 = /* @__PURE__ */ styledComponents.styled.div.withConfig({
17
- displayName: "Field__Wrapper",
18
- componentId: "sc-1ayqhds-0"
19
- })(["display:block;margin:1.5rem 0;"]);
20
- const Label = /* @__PURE__ */ styledComponents.styled.h5.withConfig({
21
- displayName: "Field__Label",
22
- componentId: "sc-1ayqhds-1"
23
- })(["display:block;font-size:1rem;font-weight:normal;margin-bottom:0.625rem;text-align:left;color:", ";& > i{color:", ";margin-left:0.325rem;}"], ({
24
- theme
25
- }) => theme.textStrong, ({
26
- theme
27
- }) => theme.primary);
28
- function Field({
29
- label,
30
- children,
31
- required,
32
- ...rest
33
- }) {
34
- return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$6, { ...rest, children: [
35
- label ? /* @__PURE__ */ jsxRuntime.jsxs(Label, { children: [
36
- label,
37
- required && /* @__PURE__ */ jsxRuntime.jsx("i", { children: "*" })
38
- ] }) : null,
39
- children
40
- ] });
41
- }
42
-
43
- function findColorInvert({
44
- black,
45
- white
46
- }, color) {
47
- if (!color || polished.getLuminance(color) > 0.55) {
48
- return black || "#000";
49
- }
50
- return white || "#fff";
51
- }
52
-
53
- function hamburger(size) {
54
- return styledComponents.css(["display:block;position:relative;height:", ";width:", ";cursor:pointer;span{background-color:currentColor;display:block;height:1px;left:calc(50% - 8px);position:absolute;transform-origin:center;transition-duration:100ms;transition-property:background-color,opacity,transform;transition-timing-function:ease-out;width:16px;&:nth-child(1){top:calc(50% - 6px);}&:nth-child(2){top:calc(50% - 1px);}&:nth-child(3){top:calc(50% + 4px);}&:hover{background-color:rgba(black,0.05);}}&.active span{&:nth-child(1){transform:translateY(5px) rotate(45deg);}&:nth-child(2){opacity:0;}&:nth-child(3){transform:translateY(-5px) rotate(-45deg);}}"], size, size);
55
- }
56
-
57
- function boxShadow(size, color, amount) {
58
- const shadowColor = amount ? polished.transparentize(amount, color) : color;
59
- return styledComponents.css(["box-shadow:0 0 0 ", " ", ";"], size, shadowColor);
60
- }
61
-
62
- function Arrow(color) {
63
- return styledComponents.css(["position:absolute;border:3px solid ", ';border-radius:2px;border-right:0;border-top:0;content:" ";display:block;height:0.625em;margin-top:-0.625em;pointer-events:none;top:50%;transform:rotate(-45deg);transform-origin:center;width:0.625em;'], color);
64
- }
65
-
66
- function setSize(name, size) {
67
- switch (size) {
68
- case "small":
69
- return `${name}: 0.75rem;`;
70
- case "medium":
71
- return `${name}: 1.25rem;`;
72
- case "large":
73
- return `${name}: 1.5rem;`;
74
- default:
75
- return `${name}: 1rem;`;
76
- }
77
- }
78
-
79
- function mediaMobile({
80
- theme
81
- }) {
82
- if (!theme.responsive)
83
- return "@media (max-width: 0)";
84
- return `@media screen and (max-width: ${theme.media.mobile})`;
85
- }
86
- function mediaTablet({
87
- theme
88
- }) {
89
- if (!theme.responsive)
90
- return "@media (max-width: 0)";
91
- return `@media screen and (max-width: ${theme.media.tablet})`;
92
- }
93
- function mediaDesktop({
94
- theme
95
- }) {
96
- if (!theme.responsive)
97
- return "@media (max-width: 0)";
98
- return `@media screen and (max-width: ${theme.media.desktop})`;
99
- }
100
- function mediaFullHD({
101
- theme
102
- }) {
103
- if (!theme.responsive)
104
- return "@media (max-width: 0)";
105
- return `@media screen and (max-width: ${theme.media.fullhd})`;
106
- }
107
- function mediaUntilFullHD({
108
- theme
109
- }) {
110
- if (!theme.responsive)
111
- return "@media (max-width: 0)";
112
- return `@media screen and (min-width: ${theme.media.fullhd})`;
113
- }
114
-
115
- function disabledColor(theme) {
116
- const textColor = polished.transparentize(0.15, theme.textDark || "#000");
117
- const backColor = polished.transparentize(0.55, theme.border || "#EEE");
118
- return styledComponents.css(["pointer-events:none;box-shadow:none;color:", ";background-color:", ";"], textColor, backColor);
119
- }
120
-
121
- const Message = /* @__PURE__ */ styledComponents.styled.small.withConfig({
122
- shouldForwardProp: (name) => name !== "error"
123
- }).withConfig({
124
- displayName: "HelpMessage__Message",
125
- componentId: "sc-14wou17-0"
126
- })(["font-size:0.8rem;color:", ";"], ({
127
- error,
128
- theme
129
- }) => error ? theme.danger : theme.textLight);
130
- function HelpMessage({
131
- help,
132
- error,
133
- noErrorMessage
134
- }) {
135
- if (error && !noErrorMessage)
136
- return /* @__PURE__ */ jsxRuntime.jsx(Message, { error: true, children: error });
137
- if (help)
138
- return /* @__PURE__ */ jsxRuntime.jsx(Message, { children: help });
139
- return null;
140
- }
141
-
142
- const TextInput = React.forwardRef(({
143
- className,
144
- outline,
145
- error,
146
- style,
147
- help,
148
- leftIcon: leftIcon2,
149
- rightIcon: rightIcon2,
150
- type = "text",
151
- maxLength = 255,
152
- noErrorMessage,
153
- ...rest
154
- }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$5, { className, outline, error: !!error, style, disabled: rest.disabled, children: [
155
- leftIcon2 && /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: leftIcon2 }),
156
- rightIcon2 && /* @__PURE__ */ jsxRuntime.jsx(Icon, { $right: true, children: rightIcon2 }),
157
- /* @__PURE__ */ jsxRuntime.jsx("input", { type, maxLength, ref, ...rest }),
158
- /* @__PURE__ */ jsxRuntime.jsx(HelpMessage, { help, error, noErrorMessage })
159
- ] }));
160
- TextInput.displayName = "TextInput";
161
- const TextInput$1 = TextInput;
162
- const rightIcon = /* @__PURE__ */ styledComponents.css(["right:0.375em;& ~ input{padding-right:1.555em !important;}"]);
163
- const leftIcon = /* @__PURE__ */ styledComponents.css(["left:0.375em;& ~ input{padding-left:1.55em !important;}"]);
164
- const Icon = /* @__PURE__ */ styledComponents.styled.span.withConfig({
165
- displayName: "TextInput__Icon",
166
- componentId: "sc-1myda3q-0"
167
- })(["position:absolute;top:0.375em;bottom:0;z-index:1;color:", ";", " svg,img{height:1em;width:1em;}"], ({
168
- theme
169
- }) => theme.border, ({
170
- $right
171
- }) => $right ? rightIcon : leftIcon);
172
- function shouldForwardProp$9(name) {
173
- return name !== "outline" && name !== "error" && name !== "disabled";
174
- }
175
- const Wrapper$5 = /* @__PURE__ */ styledComponents.styled.span.withConfig({
176
- shouldForwardProp: shouldForwardProp$9
177
- }).withConfig({
178
- displayName: "TextInput__Wrapper",
179
- componentId: "sc-1myda3q-1"
180
- })(["position:relative;display:block;input{max-width:100%;width:100%;height:100%;position:relative;display:block;outline:none;box-shadow:none;appearance:none;text-align:left;color:inherit;padding:", ";border:1px solid ", ";", " ", " transition-property:box-shadow;transition-duration:150ms;transition-timing-function:ease-in-out;&:focus{border-color:", ";box-shadow:", ";}&:disabled,[disabled]{resize:none;}&::placeholder{color:", ";}}&:hover{input:not(:disabled):not(:focus):not(:active){border-color:", ";}", "{color:", ";}}", ""], ({
181
- theme
182
- }) => theme.formPadding, ({
183
- error,
184
- theme
185
- }) => error ? theme.danger : theme.border, ({
186
- outline,
187
- theme
188
- }) => outline ? {
189
- borderRadius: theme.radius
190
- } : {
191
- borderRadius: 0,
192
- borderWidth: 0,
193
- borderBottomWidth: "1px"
194
- }, setSize("font-size"), ({
195
- error,
196
- theme
197
- }) => error ? theme.danger : theme.primary, ({
198
- theme,
199
- outline,
200
- error
201
- }) => outline ? `0 0 0 0.1em ${error ? theme.danger : theme.primary}` : `0 0.1em ${error ? theme.danger : theme.primary}`, ({
202
- theme
203
- }) => theme.placeholder, ({
204
- theme
205
- }) => theme.borderHover, Icon, ({
206
- theme
207
- }) => theme.borderHover, ({
208
- disabled,
209
- theme
210
- }) => disabled ? styledComponents.css(["input{", " border-style:dashed;}"], disabledColor(theme)) : void 0);
211
-
212
- const Textarea = React.forwardRef(({
213
- className,
214
- help,
215
- error,
216
- style,
217
- noErrorMessage,
218
- ...rest
219
- }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(InputWrapper$2, { className, error: Boolean(error), style, disabled: Boolean(rest.disabled), children: [
220
- /* @__PURE__ */ jsxRuntime.jsx("textarea", { ...rest, ref }),
221
- /* @__PURE__ */ jsxRuntime.jsx(HelpMessage, { help, error, noErrorMessage })
222
- ] }));
223
- Textarea.displayName = "Textarea";
224
- const Textarea$1 = Textarea;
225
- function shouldForwardProp$8(name) {
226
- return name !== "error" && name !== "disabled";
227
- }
228
- const InputWrapper$2 = /* @__PURE__ */ styledComponents.styled.span.withConfig({
229
- shouldForwardProp: shouldForwardProp$8
230
- }).withConfig({
231
- displayName: "Textarea__InputWrapper",
232
- componentId: "sc-z9p0uf-0"
233
- })(["display:block;position:relative;textarea{max-width:100%;width:100%;height:100%;padding:0.625em;resize:vertical;appearance:none;overflow:auto;outline:none;text-align:left;color:inherit;border-radius:", ";border:1px solid ", ";transition-property:box-shadow;transition-duration:0.15s;transition-timing-function:ease-in-out;", " &:focus{border-color:", ";", "}&:disabled,[disabled],&:readonly{", "}&:disabled,[disabled]{resize:none;}&::placeholder{color:", ";}}&:hover{textarea:not(:disabled):not(:focus){border-color:", ";}}", ""], ({
234
- theme
235
- }) => theme.radius, ({
236
- theme,
237
- error
238
- }) => error ? theme.danger : theme.border, setSize("font-size"), ({
239
- theme,
240
- error
241
- }) => error ? theme.danger : theme.primary, ({
242
- theme,
243
- error
244
- }) => boxShadow("0.1em", error ? theme.danger : theme.primary), ({
245
- theme
246
- }) => disabledColor(theme), ({
247
- theme
248
- }) => theme.placeholder, ({
249
- theme
250
- }) => theme.borderHover, ({
251
- disabled,
252
- theme
253
- }) => disabled ? styledComponents.css(["textarea{", " border-style:dashed;}"], disabledColor(theme)) : void 0);
254
-
255
- const isClient = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
256
-
257
- const useIsomorphicLayoutEffect = isClient ? React.useLayoutEffect : React.useEffect;
258
-
259
- function Approved$1() {
260
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.5 18.5l-3.9-4L6 16l5.6 5.6 11.6-11.5-1.7-1.6z", fill: "currentColor" }) });
261
- }
262
- function Indeterminate() {
263
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "20", height: "4", y: "13", x: "4.5", fill: "currentColor", stroke: "none", rx: "2" }) });
264
- }
265
- const Checkbox = React.forwardRef(({
266
- className,
267
- children,
268
- indeterminate,
269
- ...rest
270
- }, ref) => {
271
- const innerRef = React.useRef(null);
272
- const id = `checkbox_${rest.name}_${rest.value ?? "none"}`;
273
- const innerClass = React.useMemo(() => {
274
- const arr = [];
275
- if (rest.checked || indeterminate)
276
- arr.push("checked");
277
- if (rest.disabled)
278
- arr.push("disabled");
279
- return arr.join(" ");
280
- }, [rest.checked, rest.disabled, indeterminate]);
281
- React.useImperativeHandle(ref, () => innerRef.current);
282
- useIsomorphicLayoutEffect(() => {
283
- if (innerRef.current) {
284
- innerRef.current.indeterminate = indeterminate || false;
285
- }
286
- }, [indeterminate]);
287
- return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$4, { className, children: [
288
- /* @__PURE__ */ jsxRuntime.jsx("input", { type: "checkbox", id, ...rest, ref: innerRef }),
289
- /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: id, children: [
290
- /* @__PURE__ */ jsxRuntime.jsx(Shape$1, { className: innerClass, children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(Indeterminate, {}) : /* @__PURE__ */ jsxRuntime.jsx(Approved$1, {}) }),
291
- children
292
- ] })
293
- ] });
294
- });
295
- Checkbox.displayName = "Checkbox";
296
- const Checkbox$1 = Checkbox;
297
- const Shape$1 = /* @__PURE__ */ styledComponents.styled.div.withConfig({
298
- displayName: "Checkbox__Shape",
299
- componentId: "sc-1lh5swj-0"
300
- })(["display:inline-flex;margin:0.5rem;width:1.25em;height:1.25em;background:transparent;border:0.1em solid ", ";border-radius:", ";justify-content:center;align-items:center;will-change:background-color;transition:background-color 150ms ease-out;svg{opacity:0;stroke-width:0.1em;stroke:currentColor;}&.checked{border-color:", ";background-color:", ";color:", ";svg{opacity:1;}&.disabled{color:", ";}}&.disabled{background:", ";border-color:", ";}"], ({
301
- theme
302
- }) => theme.border, ({
303
- theme
304
- }) => theme.radius, ({
305
- theme
306
- }) => theme.primary, ({
307
- theme
308
- }) => theme.primary, ({
309
- theme
310
- }) => theme.white, ({
311
- theme
312
- }) => polished.transparentize(0.15, theme.textDark), ({
313
- theme
314
- }) => polished.transparentize(0.55, theme.border), ({
315
- theme
316
- }) => theme.border);
317
- const Wrapper$4 = /* @__PURE__ */ styledComponents.styled.span.withConfig({
318
- displayName: "Checkbox__Wrapper",
319
- componentId: "sc-1lh5swj-1"
320
- })(["display:block;position:relative;width:auto;label{display:flex;align-items:center;cursor:pointer;padding-left:0.625em;max-width:100%;width:100%;line-height:1.25;margin-right:0.625rem;}input{display:none;&:disabled + label{color:", ";}}"], ({
321
- theme
322
- }) => polished.transparentize(0.25, theme.textDark));
323
-
324
- function ChevronDown(props) {
325
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.6 0L6 4.6 1.4 0 0 1.4l6 6 6-6L10.6 0z", fill: "currentColor" }) });
326
- }
327
-
328
- const Select = React.forwardRef(({
329
- options = [],
330
- placeholder,
331
- render,
332
- help,
333
- error,
334
- className,
335
- inputSize,
336
- outline,
337
- optional,
338
- noErrorMessage,
339
- arrow,
340
- ...rest
341
- }, ref) => {
342
- const list = React.useMemo(() => options.map((item) => typeof item === "string" ? /* @__PURE__ */ jsxRuntime.jsx("option", { value: item, children: render ? render(item) : item }, item) : /* @__PURE__ */ jsxRuntime.jsx("option", { value: item.id, children: render ? render(item.name) : item.name }, item.id)), [options, render]);
343
- return /* @__PURE__ */ jsxRuntime.jsxs(InputWrapper$1, { className, inputSize, outline, error: !!error, disabled: rest.disabled, children: [
344
- /* @__PURE__ */ jsxRuntime.jsxs("select", { ...rest, ref, children: [
345
- placeholder && /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: !optional, children: placeholder }),
346
- list
347
- ] }),
348
- arrow || /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, {}),
349
- /* @__PURE__ */ jsxRuntime.jsx(HelpMessage, { help, error, noErrorMessage })
350
- ] });
351
- });
352
- Select.displayName = "Select";
353
- const Select$1 = Select;
354
- function shouldForwardProp$7(name) {
355
- return name !== "error" && name !== "disabled" && name !== "inputSize" && name !== "outline";
356
- }
357
- const InputWrapper$1 = /* @__PURE__ */ styledComponents.styled.span.withConfig({
358
- shouldForwardProp: shouldForwardProp$7
359
- }).withConfig({
360
- displayName: "Select__InputWrapper",
361
- componentId: "sc-gevlx8-0"
362
- })(["position:relative;display:block;select{display:block;cursor:pointer;appearance:none;outline:none;max-width:100%;width:100%;height:100%;background-color:transparent;padding:", ";padding-right:1.85rem;text-align:left;color:inherit;", " border:1px solid ", ";", " will-change:box-shadow;transition-property:box-shadow;transition-duration:150ms;transition-timing-function:ease-in-out;&:hover{border-color:", ";}&:focus{border-color:", ";box-shadow:", ";}&::-ms-expand{display:none;}&:-moz-focusring{color:transparent;text-shadow:0 0 0 #000;}&:invalid{color:", ";}}svg{position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);color:", ";}select:hover + svg{color:", ";}", ""], ({
363
- theme
364
- }) => theme.formPadding, ({
365
- inputSize
366
- }) => setSize("font-size", inputSize), ({
367
- error,
368
- theme
369
- }) => error ? theme.danger : theme.border, ({
370
- outline,
371
- theme
372
- }) => outline ? styledComponents.css(["border-radius:", ";"], theme.radius) : styledComponents.css(["border-width:0;border-radius:0;border-bottom-width:1px;"]), ({
373
- theme
374
- }) => theme.borderHover, ({
375
- error,
376
- theme
377
- }) => error ? theme.danger : theme.primary, ({
378
- theme,
379
- outline,
380
- error
381
- }) => outline ? `0 0 0 0.1em ${error ? theme.danger : theme.primary}` : `0 0.1em ${error ? theme.danger : theme.primary}`, ({
382
- theme
383
- }) => theme.placeholder, ({
384
- theme
385
- }) => theme.border, ({
386
- theme
387
- }) => theme.borderHover, ({
388
- disabled,
389
- theme
390
- }) => disabled ? styledComponents.css(["select{", " border-style:dashed;}svg{display:none;}"], disabledColor(theme)) : void 0);
391
-
392
- const Radio = React.forwardRef(({
393
- className,
394
- style,
395
- children,
396
- ...rest
397
- }, ref) => {
398
- const id = `radio_${rest.name}_${rest.value}`;
399
- const innerClass = React.useMemo(() => {
400
- const arr = [];
401
- if (rest.checked)
402
- arr.push("checked");
403
- if (rest.disabled)
404
- arr.push("disabled");
405
- return arr.join(" ");
406
- }, [rest.checked, rest.disabled]);
407
- return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$3, { className, style, children: [
408
- /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: id, children: [
409
- /* @__PURE__ */ jsxRuntime.jsx(Shape, { className: innerClass, children: /* @__PURE__ */ jsxRuntime.jsx("i", {}) }),
410
- children
411
- ] }),
412
- /* @__PURE__ */ jsxRuntime.jsx("input", { id, type: "radio", ...rest, ref })
413
- ] });
414
- });
415
- Radio.displayName = "Radio";
416
- const Radio$1 = Radio;
417
- const Shape = /* @__PURE__ */ styledComponents.styled.div.withConfig({
418
- displayName: "Radio__Shape",
419
- componentId: "sc-13m0vd4-0"
420
- })(["display:inline-flex;margin:0.5rem;width:1.25em;height:1.25em;background:transparent;border:0.1em solid ", ";border-radius:50%;justify-content:center;align-items:center;will-change:background-color,border-color;transition-property:background-color,border-color;transition-duration:150ms;transition-timing-function:ease-out;&.checked{border-color:", ";& > i{transform:scale(1);}&.disabled > i{background-color:", ";}}&.disabled{background:", ";border-color:", ";}& > i{display:block;width:0.5em;height:0.5em;background:", ";border:none;transform:scale(0);border-radius:50%;will-change:transform;transition:transform 150ms ease-out;}"], ({
421
- theme
422
- }) => theme.border, ({
423
- theme
424
- }) => theme.primary, ({
425
- theme
426
- }) => polished.transparentize(0.15, theme.textDark), ({
427
- theme
428
- }) => polished.transparentize(0.55, theme.border), ({
429
- theme
430
- }) => theme.border, ({
431
- theme
432
- }) => theme.primary);
433
- const Wrapper$3 = /* @__PURE__ */ styledComponents.styled.span.withConfig({
434
- displayName: "Radio__Wrapper",
435
- componentId: "sc-13m0vd4-1"
436
- })(["display:block;width:auto;label{cursor:pointer;max-width:100%;width:100%;line-height:1.25;margin-right:0.625rem;display:flex;align-items:center;&:hover > div:not(.checked):not(.disabled){border-color:", ";}}input{display:none;}"], ({
437
- theme
438
- }) => theme.borderHover);
439
-
440
- const Switch = React.forwardRef(({
441
- className,
442
- showLabel,
443
- background,
444
- anchorColor,
445
- onLabel = "ON",
446
- offLabel = "OFF",
447
- ...rest
448
- }, ref) => {
449
- const id = `switch_${rest.name}`;
450
- return /* @__PURE__ */ jsxRuntime.jsxs(InputWrapper, { className, showLabel, background, anchorColor, labelTextOn: onLabel, labelTextOff: offLabel, disabled: rest.disabled, children: [
451
- /* @__PURE__ */ jsxRuntime.jsx("input", { id, type: "checkbox", ...rest, ref }),
452
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, "aria-label": id })
453
- ] });
454
- });
455
- Switch.displayName = "Switch";
456
- const Switch$1 = Switch;
457
- const labelStyle = /* @__PURE__ */ styledComponents.css(["label:before{position:absolute;display:block;content:'", "';top:0.5rem;right:0.6875rem;font-size:0.825rem;line-height:0.825rem;color:", ";}input:checked ~ label:before{content:'", "';right:unset;left:0.6875rem;color:", ";}"], ({
458
- offLabel
459
- }) => offLabel, ({
460
- theme
461
- }) => theme.textLight, ({
462
- onLabel
463
- }) => onLabel, ({
464
- theme
465
- }) => findColorInvert(theme, theme.primary));
466
- function shouldForwardProp$6(name) {
467
- return name !== "labelTextOn" && name !== "labelTextOff" && name !== "anchorColor" && name !== "background" && name !== "showLabel";
468
- }
469
- const InputWrapper = /* @__PURE__ */ styledComponents.styled.span.withConfig({
470
- shouldForwardProp: shouldForwardProp$6
471
- }).withConfig({
472
- displayName: "Switch__InputWrapper",
473
- componentId: "sc-1ljdf1-0"
474
- })(["display:inline-block;cursor:pointer;line-height:1.25;position:relative;input{display:none;}label{position:relative;display:block;height:1.875rem;min-width:5rem;background:transparent;border:1px solid ", ";border-radius:1.25rem;cursor:pointer;will-change:background-color;transition:background-color 300ms ease;box-shadow:inset 0 0.25rem 0.25rem rgba(0,0,0,0.05);&:after{position:absolute;display:block;left:0.375rem;top:0.2rem;width:1.375rem;height:1.375rem;border-radius:100%;background:", ";content:'';text-align:right;border:1px solid ", ";will-change:left;transition:left 300ms ease;box-shadow:0 0 0.375rem rgba(0,0,0,0.1);}}input:checked ~ label{background:", ";box-shadow:inset 0 0.25rem 0.25rem rgba(0,0,0,0.15);&:after{left:calc(100% - 1.75rem);box-shadow:0 0 0.375rem rgba(0,0,0,0.15);}}", " ", ""], ({
475
- theme
476
- }) => theme.border, ({
477
- theme,
478
- anchorColor
479
- }) => anchorColor || theme.white, ({
480
- theme
481
- }) => theme.border, ({
482
- theme,
483
- background
484
- }) => background || theme.primary, ({
485
- showLabel
486
- }) => showLabel ? labelStyle : void 0, ({
487
- disabled,
488
- theme
489
- }) => disabled ? styledComponents.css(["cursor:default;label{", " &:after{background:", ";}}input:checked ~ label{background:", ";}"], disabledColor(theme), theme.disabled, theme.grey) : void 0);
490
-
491
- function Accordion({
492
- header,
493
- show,
494
- children,
495
- timeout = 300,
496
- ...rest
497
- }) {
498
- const ref = React.useRef(null);
499
- const prevHeight = React.useRef(0);
500
- const timeoutRef = React.useRef(0);
501
- const init = React.useRef(true);
502
- React.useEffect(() => {
503
- timeoutRef.current = timeout;
504
- }, [timeout]);
505
- useIsomorphicLayoutEffect(() => {
506
- if (!ref.current)
507
- return;
508
- ref.current.style.overflow = "hidden";
509
- ref.current.style.opacity = "1";
510
- if (init.current) {
511
- init.current = false;
512
- ref.current.style.height = show ? "auto" : "0px";
513
- if (show) {
514
- requestAnimationFrame(() => {
515
- if (ref.current) {
516
- prevHeight.current = ref.current.offsetHeight;
517
- }
518
- });
519
- } else {
520
- requestAnimationFrame(() => {
521
- if (ref.current) {
522
- ref.current.style.height = "auto";
523
- prevHeight.current = ref.current.offsetHeight;
524
- ref.current.style.height = "0px";
525
- }
526
- });
527
- ref.current.style.opacity = "0";
528
- }
529
- return;
530
- }
531
- if (!show) {
532
- ref.current.style.height = `${prevHeight.current}px`;
533
- }
534
- const frameIds = [];
535
- frameIds[0] = requestAnimationFrame(() => {
536
- frameIds[1] = requestAnimationFrame(() => {
537
- if (!ref.current)
538
- return;
539
- ref.current.style.height = `${show ? prevHeight.current : 0}px`;
540
- ref.current.style.opacity = show ? "1" : "0";
541
- });
542
- });
543
- const timeoutId = setTimeout(() => {
544
- if (!ref.current)
545
- return;
546
- if (show) {
547
- ref.current.style.height = "auto";
548
- ref.current.style.overflow = "";
549
- ref.current.style.opacity = "";
550
- requestAnimationFrame(() => {
551
- if (ref.current) {
552
- prevHeight.current = ref.current.offsetHeight;
553
- }
554
- });
555
- } else {
556
- ref.current.style.height = "0px";
557
- }
558
- }, timeoutRef.current);
559
- return () => {
560
- frameIds.forEach(cancelAnimationFrame);
561
- clearTimeout(timeoutId);
562
- };
563
- }, [show]);
564
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, children: [
565
- header,
566
- /* @__PURE__ */ jsxRuntime.jsx(AnimatedContent, { "aria-hidden": !show, ref, style: {
567
- transitionDuration: `${timeout}ms`
568
- }, children })
569
- ] });
570
- }
571
- const AnimatedContent = /* @__PURE__ */ styledComponents.styled.div.withConfig({
572
- displayName: "Accordion__AnimatedContent",
573
- componentId: "sc-1yjowun-0"
574
- })(["will-change:opacity,height,transform;transition-property:opacity,height,transform;transition-timing-function:ease-in-out;"]);
575
-
576
- function setAlign({
577
- align
578
- }) {
579
- switch (align) {
580
- case "left":
581
- return "flex-start";
582
- case "right":
583
- return "flex-end";
584
- case "center":
585
- return "center";
586
- default:
587
- return "space-evenly";
588
- }
589
- }
590
-
591
- function AppBar({
592
- children,
593
- align,
594
- brand,
595
- ...rest
596
- }) {
597
- const [show, setShow] = React.useState(false);
598
- const toggleMenu = () => setShow(!show);
599
- return /* @__PURE__ */ jsxRuntime.jsx(NavBar, { role: "navigation", ...rest, children: /* @__PURE__ */ jsxRuntime.jsxs("nav", { children: [
600
- brand,
601
- children && /* @__PURE__ */ jsxRuntime.jsxs(Burger, { className: show ? "active" : void 0, onClick: toggleMenu, children: [
602
- /* @__PURE__ */ jsxRuntime.jsx("span", {}),
603
- /* @__PURE__ */ jsxRuntime.jsx("span", {}),
604
- /* @__PURE__ */ jsxRuntime.jsx("span", {})
605
- ] }),
606
- /* @__PURE__ */ jsxRuntime.jsx(NavContent, { className: show ? "active" : void 0, align, children })
607
- ] }) });
608
- }
609
- function setColor$1({
610
- color,
611
- theme,
612
- backdrop
613
- }) {
614
- const backgroundColor = color ? theme[color] : "transparent";
615
- const textColor = findColorInvert(theme, backgroundColor === "transparent" ? theme.background : backgroundColor);
616
- if (backdrop) {
617
- const backColor = polished.transparentize(0.2, backgroundColor === "transparent" ? theme.white : backgroundColor);
618
- return styledComponents.css(["background-color:", ";color:", ";"], backColor, textColor);
619
- }
620
- return styledComponents.css(["background-color:", ";color:", ";"], backgroundColor, textColor);
621
- }
622
- const NavBar = /* @__PURE__ */ styledComponents.styled.header.withConfig({
623
- displayName: "AppBar__NavBar",
624
- componentId: "sc-t8gqca-0"
625
- })(["position:", ";display:flex;top:-1px;min-height:3.25rem;width:100%;z-index:30;padding:", ";& > nav{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;flex:1 0 auto;}", " a{color:inherit;}", "{padding:", ";}"], ({
626
- fixed,
627
- sticky
628
- }) => {
629
- if (sticky)
630
- return "sticky";
631
- if (fixed)
632
- return "fixed";
633
- return "relative";
634
- }, ({
635
- fluid
636
- }) => fluid ? "0 0.75rem" : "0 5%", setColor$1, mediaTablet, ({
637
- fluid
638
- }) => fluid ? "0 0.5rem" : "0 3%");
639
- const Burger = /* @__PURE__ */ styledComponents.styled.button.withConfig({
640
- displayName: "AppBar__Burger",
641
- componentId: "sc-t8gqca-1"
642
- })(["", " display:none;margin-left:auto;border:none;background-color:transparent;color:inherit;outline:none;&:hover{background-color:rgba(0,0,0,.05);}", "{display:block;}"], hamburger("3.25rem"), mediaMobile);
643
- const NavContent = /* @__PURE__ */ styledComponents.styled.div.withConfig({
644
- displayName: "AppBar__NavContent",
645
- componentId: "sc-t8gqca-2"
646
- })(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;flex-basis:auto;flex-grow:1;height:100%;& > ul{display:flex;flex-direction:row;list-style:none;flex-grow:1;flex-basis:100%;height:inherit;align-items:center;justify-content:", ";li{padding:0.85rem;}}& > div,& > span,& > form{display:flex;", "}", "{width:100%;flex-direction:column;align-items:flex-start;height:auto;padding-bottom:0.5rem;&:not(.active){display:none;}& > ul{flex-direction:column;align-items:flex-start;width:100%;flex-basis:auto;li{padding:.5rem 0;}}& > div,& > span,& > form{padding:.5rem 0;width:100%;}}"], setAlign, ({
647
- color
648
- }) => color ? `color: ${color};` : "", mediaMobile);
649
-
650
- const Portal = React__default.default.forwardRef(({
651
- children,
652
- container,
653
- disabled
654
- }, ref) => {
655
- const [mountNode, setMountNode] = React.useState(null);
656
- useIsomorphicLayoutEffect(() => {
657
- if (disabled) {
658
- setMountNode(null);
659
- return;
660
- }
661
- if (!container) {
662
- let dom = document.getElementById("visits-style-portals");
663
- if (!dom) {
664
- dom = document.createElement("div");
665
- dom.id = "visits-style-portals";
666
- document.body.appendChild(dom);
667
- }
668
- setMountNode(dom);
669
- return;
670
- }
671
- setMountNode(container);
672
- }, [container, disabled]);
673
- return mountNode ? reactDom.createPortal(children, mountNode) : null;
674
- });
675
- Portal.displayName = "Portal";
676
- const Portal$1 = Portal;
677
-
678
- const Tooltip$1 = React.forwardRef(({
679
- children,
680
- position = "bottom",
681
- label,
682
- color,
683
- className = "",
684
- offset = {
685
- x: 0,
686
- y: 6
687
- },
688
- clientPoint = false,
689
- disabled
690
- }, ref) => {
691
- const [open, setOpen] = React.useState(false);
692
- const nodeId = react.useId();
693
- const {
694
- refs,
695
- floatingStyles,
696
- context
697
- } = react.useFloating({
698
- nodeId,
699
- open,
700
- placement: position,
701
- middleware: [react.shift(), react.flip(), react.offset({
702
- mainAxis: offset.y,
703
- crossAxis: offset.x
704
- })],
705
- whileElementsMounted: disabled ? void 0 : react.autoUpdate,
706
- onOpenChange: setOpen
707
- });
708
- const {
709
- getReferenceProps,
710
- getFloatingProps
711
- } = react.useInteractions([react.useHover(context, {
712
- enabled: !disabled
713
- }), react.useClientPoint(context, {
714
- enabled: clientPoint
715
- })]);
716
- React.useImperativeHandle(ref, () => ({
717
- floating: refs.floating,
718
- reference: refs.reference,
719
- open: () => setOpen(true),
720
- close: () => setOpen(false)
721
- }));
722
- const child = typeof children === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children }) : children;
723
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
724
- React.cloneElement(React.Children.only(child), {
725
- ref: refs.setReference,
726
- ...getReferenceProps()
727
- }),
728
- /* @__PURE__ */ jsxRuntime.jsx(Portal$1, { children: open && !disabled ? /* @__PURE__ */ jsxRuntime.jsx(TooltipWrapper, { className, ref: refs.setFloating, role: "tooltip", $color: color, style: floatingStyles, ...getFloatingProps(), children: label }) : null })
729
- ] });
730
- });
731
- const Tooltip$2 = Tooltip$1;
732
- const TooltipWrapper = /* @__PURE__ */ styledComponents.styled.div.withConfig({
733
- displayName: "Tooltip__TooltipWrapper",
734
- componentId: "sc-1xyhucq-0"
735
- })(["position:relative;box-shadow:0 1px 2px 0 rgba(0,0,0,0.05);z-index:9999;padding:0.375rem 0.625rem;cursor:default;white-space:pre;font-size:0.85rem;z-index:9999;background-color:", ";&:focus{outline:none;}"], ({
736
- $color,
737
- theme
738
- }) => $color ? theme[$color] || theme.background : theme.background);
739
-
740
- const Box = styledComponents.styled.div.withConfig({
741
- shouldForwardProp: (name) => name !== "color" && name !== "borderless"
742
- }).withConfig({
743
- displayName: "Box",
744
- componentId: "sc-kc6ybp-0"
745
- })(["position:relative;display:flex;flex-direction:column;border:", ";border-radius:", ";width:100%;min-width:0;word-wrap:break-word;", ""], ({
746
- borderless,
747
- theme
748
- }) => borderless ? "none" : `1px solid ${theme.border}`, ({
749
- theme
750
- }) => theme.radius, ({
751
- color,
752
- theme
753
- }) => {
754
- if (!color)
755
- return void 0;
756
- const target = theme[color] || color;
757
- const invertColor = findColorInvert(theme, target);
758
- return {
759
- backgroundColor: target,
760
- color: invertColor
761
- };
762
- });
763
-
764
- function stopPropagation$1(e) {
765
- if (!e)
766
- return;
767
- e.stopPropagation();
768
- e.preventDefault();
769
- }
770
-
771
- const Popover = React.forwardRef(({
772
- position,
773
- label,
774
- children,
775
- color = "background",
776
- onOpen,
777
- onClose,
778
- disabled,
779
- offset = {
780
- x: 0,
781
- y: 6
782
- },
783
- onManualClose,
784
- zIndex = 9996,
785
- ...rest
786
- }, ref) => {
787
- const [open, setOpen] = React.useState(false);
788
- const nodeId = react.useId();
789
- const openRef = React.useRef(onOpen);
790
- const closeRef = React.useRef(onClose);
791
- const {
792
- refs,
793
- floatingStyles,
794
- context
795
- } = react.useFloating({
796
- nodeId,
797
- placement: position,
798
- middleware: [react.shift(), react.flip({
799
- fallbackAxisSideDirection: "end"
800
- }), react.offset({
801
- mainAxis: offset.y,
802
- crossAxis: offset.x
803
- })],
804
- open,
805
- onOpenChange: (value) => {
806
- if (value) {
807
- openRef.current?.(refs.reference.current, refs.floating.current);
808
- } else {
809
- closeRef.current?.(refs.reference.current, refs.floating.current);
810
- }
811
- setOpen(value);
812
- },
813
- whileElementsMounted: react.autoUpdate
814
- });
815
- const handleBlur = React.useCallback((e) => {
816
- stopPropagation$1(e);
817
- if (onManualClose)
818
- return onManualClose();
819
- setOpen(false);
820
- closeRef.current?.(refs.reference.current, refs.floating.current);
821
- }, [onManualClose]);
822
- React.useEffect(() => {
823
- if (disabled && open) {
824
- setOpen(false);
825
- }
826
- }, [disabled, open]);
827
- React.useImperativeHandle(ref, () => ({
828
- open: () => {
829
- setOpen(true);
830
- openRef.current?.(refs.reference.current, refs.floating.current);
831
- },
832
- close: () => {
833
- setOpen(false);
834
- closeRef.current?.(refs.reference.current, refs.floating.current);
835
- }
836
- // eslint-disable-next-line react-hooks/exhaustive-deps
837
- }), []);
838
- const {
839
- getFloatingProps,
840
- getReferenceProps
841
- } = react.useInteractions([react.useClick(context, {
842
- enabled: !disabled
843
- })]);
844
- openRef.current = onOpen;
845
- closeRef.current = onClose;
846
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
847
- React.cloneElement(React.Children.only(label), getReferenceProps({
848
- ref: refs.setReference,
849
- tabIndex: 0,
850
- role: "button",
851
- disabled,
852
- onClick: stopPropagation$1
853
- })),
854
- /* @__PURE__ */ jsxRuntime.jsx(Portal$1, { children: open && !disabled ? /* @__PURE__ */ jsxRuntime.jsx(react.FloatingOverlay, { "data-testid": "visits-style-shadow", onClick: handleBlur, style: {
855
- zIndex
856
- }, children: /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { role: "tooltip", ref: refs.setFloating, color, style: floatingStyles, ...getFloatingProps({
857
- ...rest,
858
- onClick: stopPropagation$1
859
- }), children }) }) : null })
860
- ] });
861
- });
862
- Popover.displayName = "Popover";
863
- const Popover$1 = Popover;
864
- const Tooltip = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
865
- displayName: "Popover__Tooltip",
866
- componentId: "sc-1huajr8-0"
867
- })(["display:flex;box-shadow:0 1px 2px 0 rgba(0,0,0,0.05);padding:0.5rem 0;width:auto;height:auto;cursor:auto;z-index:20;"]);
868
-
869
- function stopPropagation(e) {
870
- if (!e)
871
- return;
872
- e.stopPropagation();
873
- }
874
- function Modal({
875
- show,
876
- children,
877
- timeout = 200,
878
- padding = "0.85rem",
879
- verticalAlign = "center",
880
- closeModal,
881
- closeOnOverlay,
882
- closeOnEsc,
883
- onExited,
884
- ...rest
885
- }) {
886
- const exitRef = React.useRef(onExited);
887
- const isTransMountedRef = React.useRef(false);
888
- const id = react.useId();
889
- const {
890
- refs,
891
- context
892
- } = react.useFloating({
893
- open: show,
894
- onOpenChange: closeModal,
895
- nodeId: id
896
- });
897
- const {
898
- getFloatingProps
899
- } = react.useInteractions([react.useDismiss(context, {
900
- enabled: closeOnEsc,
901
- outsidePress: false,
902
- escapeKey: closeOnEsc
903
- })]);
904
- const {
905
- isMounted,
906
- styles
907
- } = react.useTransitionStyles(context, {
908
- duration: timeout,
909
- initial: {
910
- opacity: 0,
911
- transform: "scale(0.8)"
912
- }
913
- });
914
- React.useEffect(() => {
915
- if (isTransMountedRef.current === isMounted)
916
- return;
917
- isTransMountedRef.current = isMounted;
918
- if (isMounted)
919
- return;
920
- exitRef.current?.();
921
- }, [isMounted]);
922
- const handleOverlayClose = (e) => {
923
- if (!closeOnOverlay)
924
- return;
925
- closeModal?.();
926
- };
927
- exitRef.current = onExited;
928
- return /* @__PURE__ */ jsxRuntime.jsx(Portal$1, { children: isMounted ? /* @__PURE__ */ jsxRuntime.jsx(Overlay, { lockScroll: true, "data-testid": "vs-modal-overlay", onClick: handleOverlayClose, style: {
929
- padding
930
- }, $verticalAlign: verticalAlign, children: /* @__PURE__ */ jsxRuntime.jsx(Wrapper$2, { ref: refs.setFloating, role: "dialog", ...getFloatingProps({
931
- ...rest,
932
- style: styles,
933
- onClick: stopPropagation
934
- }), children }) }) : null });
935
- }
936
- const Overlay = /* @__PURE__ */ styledComponents.styled(react.FloatingOverlay).withConfig({
937
- displayName: "Modal__Overlay",
938
- componentId: "sc-pb7lhx-0"
939
- })([" display:flex;display:grid;place-items:", ";align-items:", ";justify-content:center;background:", ";z-index:9997;"], ({
940
- $verticalAlign
941
- }) => {
942
- if ($verticalAlign === "start")
943
- return "flex-start";
944
- if ($verticalAlign === "end")
945
- return "flex-end";
946
- return "center";
947
- }, ({
948
- $verticalAlign
949
- }) => {
950
- if ($verticalAlign === "start")
951
- return "flex-start";
952
- if ($verticalAlign === "end")
953
- return "flex-end";
954
- return "center";
955
- }, ({
956
- theme
957
- }) => theme.backdrop);
958
- const Wrapper$2 = /* @__PURE__ */ styledComponents.styled.div.withConfig({
959
- displayName: "Modal__Wrapper",
960
- componentId: "sc-pb7lhx-1"
961
- })(["will-change:transform,opacity;transform-origin:center top;transition-timing-function:cubic-bezier(0.645,0.045,0.355,1);z-index:9999;"]);
962
-
963
- function ToastItem({
964
- className,
965
- message,
966
- duration = 5e3,
967
- clear,
968
- id,
969
- clearOnClick
970
- }) {
971
- const clearRef = React.useRef(clear);
972
- const isPrevMountedRef = React.useRef(false);
973
- const [open, setOpen] = React.useState(false);
974
- const {
975
- context,
976
- refs
977
- } = react.useFloating({
978
- open,
979
- onOpenChange: setOpen,
980
- nodeId: id
981
- });
982
- const {
983
- isMounted,
984
- styles
985
- } = react.useTransitionStyles(context, {
986
- duration: 250,
987
- initial: {
988
- opacity: 0,
989
- transform: "scale(0.8)"
990
- }
991
- });
992
- React.useEffect(() => setOpen(true), [id]);
993
- React.useEffect(() => {
994
- if (isPrevMountedRef.current === isMounted)
995
- return;
996
- if (!isMounted) {
997
- clearRef.current?.(id);
998
- }
999
- isPrevMountedRef.current = isMounted;
1000
- }, [isMounted, id]);
1001
- React.useEffect(() => {
1002
- if (!duration)
1003
- return;
1004
- const timeout = setTimeout(() => setOpen(false), duration);
1005
- return () => clearTimeout(timeout);
1006
- }, [duration]);
1007
- const handleClickToast = React.useCallback(() => {
1008
- if (!clearOnClick)
1009
- return;
1010
- setOpen(false);
1011
- }, [clearOnClick]);
1012
- clearRef.current = clear;
1013
- if (!isMounted)
1014
- return null;
1015
- return /* @__PURE__ */ jsxRuntime.jsx(Item, { ref: refs.setFloating, role: "status", "data-testid": "vs-toast-item", className, style: styles, onClick: handleClickToast, children: message });
1016
- }
1017
- const Item = /* @__PURE__ */ styledComponents.styled.li.withConfig({
1018
- displayName: "ToastItem__Item",
1019
- componentId: "sc-193rp7r-0"
1020
- })(["position:relative;display:flex;width:fit-content;padding:0.375em 0.75em;max-width:100%;transition-timing-function:cubic-bezier(0.645,0.045,0.355,1);"]);
1021
-
1022
- function Toast({
1023
- toasts,
1024
- clear,
1025
- fixed,
1026
- margin = "16px",
1027
- position = "top-left",
1028
- space = "16px"
1029
- }) {
1030
- const style = React.useMemo(() => {
1031
- const base = {
1032
- position: fixed ? "fixed" : "absolute"
1033
- };
1034
- if (position.indexOf("top") > -1) {
1035
- base.top = margin;
1036
- } else if (position.indexOf("bottom") > -1) {
1037
- base.bottom = margin;
1038
- }
1039
- if (position.indexOf("left") > -1) {
1040
- base.left = margin;
1041
- base.alignItems = "flex-start";
1042
- } else if (position.indexOf("right") > -1) {
1043
- base.right = margin;
1044
- base.alignItems = "flex-end";
1045
- } else {
1046
- base.left = "50%";
1047
- base.alignItems = "center";
1048
- base.transform = "translateX(-50%)";
1049
- }
1050
- return base;
1051
- }, [fixed, margin, position]);
1052
- return /* @__PURE__ */ jsxRuntime.jsx(Portal$1, { children: /* @__PURE__ */ jsxRuntime.jsx(ToastList, { style, $space: space, children: toasts.map((props) => /* @__PURE__ */ React.createElement(ToastItem, { ...props, key: props.id, clear })) }) });
1053
- }
1054
- const ToastList = /* @__PURE__ */ styledComponents.styled.ul.withConfig({
1055
- displayName: "Toast__ToastList",
1056
- componentId: "sc-8192b2-0"
1057
- })(["display:flex;flex-direction:column;z-index:9999;overflow:hidden;li + li{margin-top:", ";}"], ({
1058
- $space
1059
- }) => $space);
1060
-
1061
- function getColor$1({
1062
- theme,
1063
- color
1064
- }) {
1065
- const value = !color || color === "light" ? theme.background : theme[color];
1066
- return styledComponents.css(["border-color:", ";border-right-color:", ";border-top-color:", ";"], value, theme.border, theme.border);
1067
- }
1068
- const spin = /* @__PURE__ */ styledComponents.keyframes(["from{transform:rotate(0deg);}to{transform:rotate(359deg);}"]);
1069
- function shouldForwardProp$5(name) {
1070
- return name !== "color" && name !== "size" && name !== "borderSize";
1071
- }
1072
- const Spinner = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1073
- shouldForwardProp: shouldForwardProp$5
1074
- }).withConfig({
1075
- displayName: "Spinner",
1076
- componentId: "sc-34g0il-0"
1077
- })(["display:inline-block;width:", ";height:", ";margin:0;padding:0;position:relative;&:after{display:block;top:0;left:0;animation:", " 750ms infinite linear;border:", " solid;border-radius:100%;", ' content:"";height:100%;width:100%;position:absolute;}'], ({
1078
- size
1079
- }) => size || "100%", ({
1080
- size
1081
- }) => size || "100%", spin, ({
1082
- borderSize
1083
- }) => borderSize, getColor$1);
1084
- Spinner.defaultProps = {
1085
- borderSize: "2px"
1086
- };
1087
- const Spinner$1 = Spinner;
1088
-
1089
- function setGap(width, gap) {
1090
- return parseInt(width.replace("px", ""), 10) - 2 * gap;
1091
- }
1092
- function setResponsive({
1093
- fluid
1094
- }) {
1095
- if (fluid) {
1096
- return styledComponents.css(["padding-right:0.75rem;padding-left:0.75rem;", "{padding-right:0.5rem;padding-left:0.5rem;}"], mediaTablet);
1097
- }
1098
- return styledComponents.css(["margin-right:auto;margin-left:auto;", "{max-width:", "px;}", "{max-width:", "px;}", "{max-width:", "px;}", "{max-width:", "px;}"], mediaUntilFullHD, ({
1099
- theme
1100
- }) => setGap(theme.media.fullhd, theme.gutter), mediaDesktop, ({
1101
- theme
1102
- }) => setGap(theme.media.desktop, theme.gutter), mediaTablet, ({
1103
- theme
1104
- }) => setGap(theme.media.tablet, theme.smallGutter), mediaMobile, ({
1105
- theme
1106
- }) => setGap(theme.media.mobile, theme.smallGutter));
1107
- }
1108
- const Container = styledComponents.styled.div.withConfig({
1109
- shouldForwardProp: (name) => name !== "fluid"
1110
- }).withConfig({
1111
- displayName: "Container",
1112
- componentId: "sc-1308ay5-0"
1113
- })(["position:relative;width:100%;", ""], setResponsive);
1114
-
1115
- const Row = styledComponents.styled.div.withConfig({
1116
- displayName: "Row",
1117
- componentId: "sc-1qqbtdw-0"
1118
- })(["display:flex;flex:0 1 auto;flex-direction:row;flex-wrap:wrap;margin:-", "px;padding:", "px;", "{margin:-", "px;padding:", "px;}"], ({
1119
- theme
1120
- }) => theme.gutter / 2, ({
1121
- theme
1122
- }) => theme.gutter / 2, mediaTablet, ({
1123
- theme
1124
- }) => theme.smallGutter / 2, ({
1125
- theme
1126
- }) => theme.smallGutter / 2);
1127
-
1128
- const sizes = ["auto", "8.3333333%", "16.666667%", "25%", "33.333333%", "41.666667%", "50%", "58.333333%", "66.666667%", "75%", "83.333333%", "91.666667%", "100%"];
1129
- function setAutoSize({
1130
- size,
1131
- auto
1132
- }) {
1133
- if (!auto || !size)
1134
- return void 0;
1135
- const mobileSize = size >= 4 ? sizes[12] : sizes[Math.round(size * 3)];
1136
- const desktopSize = size >= 8 ? sizes[12] : sizes[Math.round(size * 1.5)];
1137
- return styledComponents.css(["", "{flex-basis:", ";max-width:", ";}", "{flex-basis:", ";max-width:", ";}"], mediaDesktop, desktopSize, desktopSize, mediaMobile, mobileSize, mobileSize);
1138
- }
1139
- function shouldForwardProp$4(name) {
1140
- return name !== "size" && name !== "offset" && name !== "auto";
1141
- }
1142
- const Col = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1143
- shouldForwardProp: shouldForwardProp$4
1144
- }).withConfig({
1145
- displayName: "Col",
1146
- componentId: "sc-16i9d04-0"
1147
- })(["display:flex;flex:0 0 auto;flex-direction:row;flex-wrap:wrap;padding:", "px;", " ", " ", "{padding:", "px;}", ""], ({
1148
- theme
1149
- }) => theme.gutter / 2, ({
1150
- size
1151
- }) => size ? {
1152
- flexBasis: sizes[size],
1153
- maxWidth: sizes[size]
1154
- } : {
1155
- flexGrow: 1,
1156
- flexBasis: 0,
1157
- maxWidth: "100%"
1158
- }, ({
1159
- offset
1160
- }) => offset ? {
1161
- marginLeft: sizes[offset]
1162
- } : void 0, mediaTablet, ({
1163
- theme
1164
- }) => theme.smallGutter / 2, setAutoSize);
1165
- Col.defaultProps = {
1166
- size: 0,
1167
- offset: 0
1168
- };
1169
- const Col$1 = Col;
1170
-
1171
- const index$3 = styledComponents.styled.div.withConfig({
1172
- displayName: "Content",
1173
- componentId: "sc-180oh4h-0"
1174
- })(["color:", ";line-height:1.5;li + li{margin-top:0.25em;}p,dl,ol,ul,blockquote,pre,table{&:not(:last-child){margin-bottom:1em;}}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.125;}h1{font-size:2rem;margin-bottom:0.5em;}h2{font-size:1.75em;margin-bottom:0.5714em;&:not(:first-child){margin-top:1.1428em;}}h3{font-size:1.5em;margin-bottom:0.6666em;&:not(:first-child){margin-top:1.3333em;}}h4{font-size:1.25em;margin-bottom:0.8em;}h5{font-size:1.125em;margin-bottom:0.8888em;}h6{font-size:1em;margin-bottom:1em;}ol{list-style:decimal outside;margin-left:2em;margin-top:1em;}ul{list-style:disc outside;margin-left:2em;margin-top:1em;ul{list-style-type:circle;margin-top:0.5em;ul{list-style-type:square;}}}dd{margin-left:2em;}table{width:100%;td,th{border:1px solid ", ";border-width:0 0 1px;padding:0.5em 0.75em;vertical-align:top;}th{color:", ";text-align:left;}thead{td,th{border-width:0 0 2px;color:", ";}}tfoot{td,th{border-width:2px 0 0;color:", ";}}tbody > tr:last-child{td,th{border-bottom-width:0;}}}"], ({
1175
- theme
1176
- }) => theme.text, ({
1177
- theme
1178
- }) => theme.border, ({
1179
- theme
1180
- }) => theme.text, ({
1181
- theme
1182
- }) => theme.text, ({
1183
- theme
1184
- }) => theme.text);
1185
-
1186
- const setAnimation = ({
1187
- theme
1188
- }) => styledComponents.keyframes(["0%{background-color:", ";}50%{background-color:", ";}100%{background-color:", ";}"], theme.greyLighter, theme.grey, theme.greyLighter);
1189
- const index$2 = styledComponents.styled.span.withConfig({
1190
- displayName: "Placeholder",
1191
- componentId: "sc-1091c0n-0"
1192
- })(["display:inline-block;height:1rem;width:100%;animation:", " 3.5s ease infinite;border-radius:", ";opacity:0.125;"], setAnimation, ({
1193
- theme
1194
- }) => theme.radius);
1195
-
1196
- function setColor({
1197
- theme,
1198
- color,
1199
- outline,
1200
- disabled
1201
- }) {
1202
- if (disabled) {
1203
- return disabledColor(theme);
1204
- }
1205
- if (!color) {
1206
- return styledComponents.css(["border-color:", ";color:", ";&:hover{border-color:", ";}&:active{border-color:", ";}"], theme.border, theme.text, theme.borderHover, theme.borderActive);
1207
- }
1208
- const target = theme[color] || color;
1209
- const invertColor = findColorInvert(theme, target);
1210
- if (outline) {
1211
- return styledComponents.css(["background-color:transparent;border-color:", ";color:", ";&:hover{background-color:", ";color:", ";}&:active{background-color:", ";}&:focus:not(:active){", "}"], target, target, target, invertColor, polished.darken(0.1, target), boxShadow("0.1rem", target, 0.5));
1212
- }
1213
- return styledComponents.css(["background-color:", ";border-color:transparent;color:", ";box-shadow:none;&:hover{color:", ";background-color:", ";}&:active{background-color:", ";}&:focus:not(:active){", "}"], target, invertColor, invertColor, polished.darken(0.05, target), polished.darken(0.1, target), boxShadow("0.1rem", target, 0.5));
1214
- }
1215
- function shouldForwardProp$3(name) {
1216
- return name !== "color" && name !== "size" && name !== "outline" && name !== "round" && name !== "icon";
1217
- }
1218
- const Button = styledComponents.styled.button.withConfig({
1219
- shouldForwardProp: shouldForwardProp$3
1220
- }).withConfig({
1221
- displayName: "Button",
1222
- componentId: "sc-f6cc58-0"
1223
- })(["position:relative;outline:none;appearance:none;box-sizing:border-box;display:inline-block;text-align:center;white-space:nowrap;cursor:pointer;justify-content:center;vertical-align:middle;user-select:none;background:transparent;border:1px solid transparent;border-radius:", ";padding:", ";line-height:", ";", " ", ""], ({
1224
- round,
1225
- theme
1226
- }) => round ? "2456189px" : theme.radius, ({
1227
- icon
1228
- }) => icon ? "0.375em" : "0.375em 0.75em", ({
1229
- icon
1230
- }) => icon ? 1 : 1.5, setColor, ({
1231
- size
1232
- }) => setSize("font-size", size));
1233
-
1234
- function shouldForwardProp$2(name) {
1235
- return name !== "color" && name !== "size" && name !== "pure" && name !== "underline" && name !== "round" && name !== "icon";
1236
- }
1237
- const TextButton = styledComponents.styled.button.withConfig({
1238
- shouldForwardProp: shouldForwardProp$2
1239
- }).withConfig({
1240
- displayName: "TextButton",
1241
- componentId: "sc-14wzat7-0"
1242
- })(["background-color:transparent;border:none;cursor:pointer;display:inline;margin:0;border-radius:", ";padding:", ";line-height:", ";color:", ";", " &:hover,&:focus{", " ", "}&:focus,&:active{outline:none;}&:active{", "}", ""], ({
1243
- round,
1244
- theme
1245
- }) => round ? "2456189px" : theme.radius, ({
1246
- pure,
1247
- icon
1248
- }) => {
1249
- if (pure)
1250
- return "0";
1251
- if (icon)
1252
- return "0.375em";
1253
- return "0.375em 0.75em";
1254
- }, ({
1255
- icon
1256
- }) => icon ? 1 : 1.5, ({
1257
- color,
1258
- theme
1259
- }) => color ? theme[color] : theme.text, ({
1260
- size
1261
- }) => setSize("font-size", size), ({
1262
- underline
1263
- }) => underline ? {
1264
- textDecoration: "underline"
1265
- } : void 0, ({
1266
- pure,
1267
- theme,
1268
- color
1269
- }) => pure ? void 0 : {
1270
- background: polished.transparentize(0.9, color ? theme[color] || theme.text : theme.text)
1271
- }, ({
1272
- pure,
1273
- theme,
1274
- color
1275
- }) => pure ? void 0 : {
1276
- background: polished.transparentize(0.8, color ? theme[color] || theme.text : theme.text)
1277
- }, ({
1278
- disabled,
1279
- theme
1280
- }) => disabled ? styledComponents.css(["color:", ";cursor:default;&:hover{background:transparent;text-decoration:none;}"], polished.transparentize(0.75, theme.textDark)) : void 0);
1281
-
1282
- const ButtonGroup = styledComponents.styled.div.withConfig({
1283
- displayName: "ButtonGroup",
1284
- componentId: "sc-b4d11t-0"
1285
- })(["display:inline-block;&:not(:last-child){margin-right:0.5rem;}", "{margin:0;border-radius:0;&:hover{z-index:1;}&:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;}&:not(:first-child){margin-left:-1px;}&:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;}}"], Button);
1286
-
1287
- const stripedStyle = /* @__PURE__ */ styledComponents.css(["tbody > tr:nth-child(odd){background-color:rgba(0,0,0,0.02);}"]);
1288
- const hoverStyle = /* @__PURE__ */ styledComponents.css(["tbody > tr:hover{background-color:rgba(0,0,0,0.04);}"]);
1289
- function shouldForwardProp$1(name) {
1290
- return name !== "size" && name !== "full" && name !== "headerStyle" && name !== "bordered" && name !== "striped" && name !== "hover";
1291
- }
1292
- const index$1 = styledComponents.styled.table.withConfig({
1293
- shouldForwardProp: shouldForwardProp$1
1294
- }).withConfig({
1295
- displayName: "Table",
1296
- componentId: "sc-1x2nuaf-0"
1297
- })(["", " max-width:100%;margin-bottom:1rem;background-color:transparent;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;td,th{vertical-align:top;padding:0.75rem;", " border-width:0 0 1px;}th{white-space:nowrap;}", " ", " ", ""], ({
1298
- full
1299
- }) => full ? styledComponents.css(["width:100%;"]) : void 0, ({
1300
- theme,
1301
- bordered
1302
- }) => bordered ? styledComponents.css(["border:1px solid ", ";"], theme.border) : void 0, ({
1303
- striped
1304
- }) => striped ? stripedStyle : void 0, ({
1305
- hover
1306
- }) => hover ? hoverStyle : void 0, ({
1307
- headerStyle
1308
- }) => headerStyle ? styledComponents.css(["th{", "}"], headerStyle) : void 0);
1309
-
1310
- function Progress({
1311
- value,
1312
- max,
1313
- color = "primary",
1314
- height,
1315
- size,
1316
- ...rest
1317
- }) {
1318
- const percent = React.useMemo(() => value ? Math.round(value / max * 100) : 0, [value, max]);
1319
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$1, { $color: color, $height: height, $size: size, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx("div", { role: "progressbar", "aria-label": "progress", className: value !== max ? "in-progress" : void 0, style: {
1320
- width: `${percent > 100 ? 100 : percent}%`
1321
- } }) });
1322
- }
1323
- const Wrapper$1 = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1324
- displayName: "Progress__Wrapper",
1325
- componentId: "sc-807hhi-0"
1326
- })(["position:relative;display:block;width:100%;border-radius:", ";background-color:", ";", ' & > div[role="progressbar"]{position:relative;height:100%;border-radius:', ";background-color:", ";&.in-progress{border-bottom-right-radius:0;border-top-right-radius:0;}will-change:width;transition-property:width;transition-duration:350ms;transition-timing-function:cubic-bezier(0.645,0.045,0.355,1);z-index:1;}"], ({
1327
- theme
1328
- }) => theme.radius, ({
1329
- theme
1330
- }) => theme.background, ({
1331
- $size,
1332
- $height
1333
- }) => $height || setSize("height", $size), ({
1334
- theme
1335
- }) => theme.radius, ({
1336
- $color,
1337
- theme
1338
- }) => theme[$color] || $color);
1339
-
1340
- const index = styledComponents.styled.hr.withConfig({
1341
- displayName: "Divider",
1342
- componentId: "sc-13lwfus-0"
1343
- })(["border:none;height:1px;margin:0;flex-shrink:0;background-color:", ";"], ({
1344
- theme
1345
- }) => theme.border);
1346
-
1347
- function Close(props) {
1348
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: [
1349
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M25.999 26l-12.5-12.5L25.999 1" }),
1350
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 26l12.5-12.5L1 1" })
1351
- ] }) });
1352
- }
1353
-
1354
- function getColor(theme, color) {
1355
- return !color || color === "light" ? theme.background : theme[color];
1356
- }
1357
- const closeCss = /* @__PURE__ */ styledComponents.css(["padding-right:1.625rem;", "{display:flex;position:absolute;align-items:center;color:inherit;top:0;right:0;bottom:0;padding:0 0.35rem;svg{width:0.625rem;height:0.625rem;}&:hover{background-color:rgba(0,0,0,0.15);}}"], TextButton);
1358
- function shouldForwardProp(name) {
1359
- return name !== "color" && name !== "round" && name !== "close";
1360
- }
1361
- const Wrapper = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1362
- shouldForwardProp
1363
- }).withConfig({
1364
- displayName: "Tag__Wrapper",
1365
- componentId: "sc-10pvl04-0"
1366
- })(["display:inline-flex;position:relative;font-size:0.75rem;cursor:default;padding:0.325rem 0.5rem;align-items:center;justify-content:center;height:1.5rem;border-radius:", ";white-space:nowrap;", " &:not(:last-child){margin-right:0.5rem;}", "{border-radius:0;border-top-right-radius:", ";border-bottom-right-radius:", ";}", ""], ({
1367
- theme,
1368
- round
1369
- }) => round ? "50rem" : theme.radius, ({
1370
- color,
1371
- theme
1372
- }) => {
1373
- const target = getColor(theme, color);
1374
- const invertColor = findColorInvert(theme, target);
1375
- return styledComponents.css(["color:", ";background-color:", ";a,span{color:", ";}"], invertColor, target, invertColor);
1376
- }, TextButton, ({
1377
- theme,
1378
- round
1379
- }) => round ? "50rem" : theme.radius, ({
1380
- theme,
1381
- round
1382
- }) => round ? "50rem" : theme.radius, ({
1383
- close
1384
- }) => close ? closeCss : void 0);
1385
- function Tag({
1386
- children,
1387
- onClose,
1388
- ...rest
1389
- }) {
1390
- return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper, { close: !!onClose, ...rest, children: [
1391
- children,
1392
- onClose && /* @__PURE__ */ jsxRuntime.jsx(TextButton, { onClick: onClose, pure: true, children: /* @__PURE__ */ jsxRuntime.jsx(Close, {}) })
1393
- ] });
1394
- }
1395
-
1396
- function Approved(props) {
1397
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...props, children: [
1398
- /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", children: [
1399
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z" }),
1400
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z", fill: "currentColor" })
1401
- ] }),
1402
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.515 18.466l-3.878-3.985L6 16.005l5.59 5.59 11.562-11.533-1.7-1.595z", fill: "currentColor" })
1403
- ] });
1404
- }
1405
-
1406
- function ChevronLeftRound(props) {
1407
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...props, children: [
1408
- /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", children: [
1409
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z" }),
1410
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z", fill: "currentColor" })
1411
- ] }),
1412
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.066 8.5l-7.567 6.731 7.567 6.2", fill: "none", stroke: "currentColor", strokeWidth: "2" })
1413
- ] });
1414
- }
1415
-
1416
- function ChevronRightRound(props) {
1417
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...props, children: [
1418
- /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", children: [
1419
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1z" }),
1420
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28m0 2C6.716 30 0 23.284 0 15 0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15z", fill: "currentColor" })
1421
- ] }),
1422
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.934 21.5l7.567-6.731-7.567-6.2", fill: "none", stroke: "currentColor", strokeWidth: "2" })
1423
- ] });
1424
- }
1425
-
1426
- function FileRound(props) {
1427
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...props, children: [
1428
- /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", children: [
1429
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z" }),
1430
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z", fill: "currentColor" })
1431
- ] }),
1432
- /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(9 7)", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1433
- /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "12", height: "16", rx: "1", stroke: "none" }),
1434
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 1h10v14H1z" })
1435
- ] }),
1436
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "M13 11h4v1.3h-4zM13 14h4v1.3h-4zM13 17h4v1.3h-4z" })
1437
- ] });
1438
- }
1439
-
1440
- function Pencil(props) {
1441
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17.796", height: "17.908", viewBox: "0 0 17.796 17.908", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1.254 12.674L.5 17.408l4.726-.8L17.3 4.472 13.281.5zM1.375 12.766l3.851 3.838M10.949 2.959l3.836 3.801", fill: "none", stroke: "currentColor" }) });
1442
- }
1443
-
1444
- function PencilSimple(props) {
1445
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.97.22a.75.75 0 011.06 0l3.75 3.75a.75.75 0 010 1.06l-9.75 9.75a.75.75 0 01-.53.22H.75a.75.75 0 01-.75-.75V10.5a.75.75 0 01.22-.53L9.97.22zM1.5 10.81v2.69h2.69l9-9-2.69-2.69-9 9z", fill: "currentColor" }) });
1446
- }
1447
-
1448
- function User(props) {
1449
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...props, children: [
1450
- /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1451
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "15", cy: "15", r: "15", stroke: "none" }),
1452
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "15", cy: "15", r: "14" })
1453
- ] }),
1454
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 23a6.018 6.018 0 016-6h2a6.018 6.018 0 016 6zm2.6-2h8.9a4.033 4.033 0 00-3.5-2h-1.9a4.035 4.035 0 00-3.5 2zm.4-9v-1a4.012 4.012 0 014-4 4.012 4.012 0 014 4v1a4.012 4.012 0 01-4 4 4.012 4.012 0 01-4-4zm2-1v1a2.006 2.006 0 002 2 2.006 2.006 0 002-2v-1a2.006 2.006 0 00-2-2 2.006 2.006 0 00-2 2z", fill: "currentColor" })
1455
- ] });
1456
- }
1457
-
1458
- function Refresh(props) {
1459
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.065 0A15.069 15.069 0 00.142 13.105a1.256 1.256 0 102.478.406c0-.027.008-.055.01-.082a12.52 12.52 0 0121.3-7.226l-2.584 2.584 7.532 1.255-1.255-7.532-1.92 1.92A15 15 0 0015.065 0zm13.7 15.589A1.255 1.255 0 0027.5 16.7a12.512 12.512 0 01-21.893 6.569l1.927-1.927L0 20.086l1.255 7.532 2.572-2.572a15.02 15.02 0 0026.16-8.023 1.256 1.256 0 00-1.064-1.423 1.273 1.273 0 00-.16-.011z", fill: "currentColor" }) });
1460
- }
1461
-
1462
- function Plus(props) {
1463
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "21", height: "21", viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 0v9H0v3h9v9h3v-9h9V9h-9V0H9z", fill: "currentColor" }) });
1464
- }
1465
-
1466
- const theme = {
1467
- fontFamily: "-apple-system BlinkMacSystemFont, Meiryo, system-ui, sans-serif",
1468
- fontSize: "16px",
1469
- gutter: 24,
1470
- smallGutter: 16,
1471
- media: {
1472
- mobile: "576px",
1473
- tablet: "769px",
1474
- desktop: "960px",
1475
- fullhd: "1344px"
1476
- },
1477
- radius: "4px",
1478
- timeout: 250,
1479
- formPadding: "0.75rem 0.625rem",
1480
- primary: "#37B151",
1481
- link: "#578ba9",
1482
- info: "#209cee",
1483
- success: "#0fa886",
1484
- warning: "#f2b541",
1485
- danger: "#f3575a",
1486
- dark: "#363636",
1487
- light: "#9b9b9b",
1488
- black: "#0a0a0a",
1489
- blackBis: "#121212",
1490
- blackTer: "#242424",
1491
- white: "#ffffff",
1492
- whiteBis: "#fafafa",
1493
- whiteTer: "#f5f5f5",
1494
- grey: "#7a7a7a",
1495
- greyLight: "#9b9b9b",
1496
- greyLighter: "#dbdbdb",
1497
- text: "#4a4a4a",
1498
- textDark: "#4a4a4a",
1499
- textLight: "#7a7a7a",
1500
- textStrong: "#4a4a4a",
1501
- background: "#f5f5f5",
1502
- border: "#dbdbdb",
1503
- borderHover: "#9b9b9b",
1504
- borderActive: "#4a4a4a",
1505
- placeholder: "#7a7a7a",
1506
- backdrop: "rgba(10,10,10,0.25)",
1507
- responsive: true
1508
- };
1509
- const theme$1 = theme;
1510
-
1511
- /*! based on normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
1512
- const normalized = /* @__PURE__ */ styledComponents.css(["*,::after,::before{box-sizing:border-box;}html{line-height:1.15;-webkit-text-size-adjust:100%;-ms-overflow-style:scrollbar;}body{margin:0;font-family:", ";font-size:", ";text-align:left;}h1{font-size:2em;margin:.67em 0;}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace,monospace;font-size:1em;}a{background-color:transparent;color:", ';}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder;}code,kbd,samp{font-family:monospace,monospace;font-size:1em;}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sub{bottom:-.25em;}sup{top:-.5em;}img{border-style:none;}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible;}button,select{text-transform:none;}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0;}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText;}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox;}fieldset{padding:.35em .75em .625em;}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline;resize:vertical;}textarea{overflow:auto;}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto;}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none;}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block;}summary{display:list-item;}template{display:none;}[hidden]{display:none;}blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0;}button{font-size:inherit;}article,aside,figure,footer,header,hgroup,section{display:block;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}a{cursor:pointer;text-decoration:none;color:#3273dc;&:hover{color:currentColor;}}img{vertical-align:middle;border-style:none;}svg{overflow:hidden;vertical-align:middle;}small{font-size:.875em;}span{font-style:inherit;font-weight:inherit;}strong{color:#363636;font-weight:700;}table{border-collapse:collapse;border-spacing:0;}th{text-align:inherit;}ul{list-style-type:none;}'], ({
1513
- theme
1514
- }) => theme ? theme.fontFamily : "sans-serif", ({
1515
- theme
1516
- }) => theme ? theme.fontSize : "16px", ({
1517
- theme
1518
- }) => theme.link);
1519
- const normalized$1 = normalized;
1520
-
1521
- exports.Accordion = Accordion;
1522
- exports.AppBar = AppBar;
1523
- exports.Box = Box;
1524
- exports.Button = Button;
1525
- exports.ButtonGroup = ButtonGroup;
1526
- exports.Checkbox = Checkbox$1;
1527
- exports.Col = Col$1;
1528
- exports.Container = Container;
1529
- exports.Content = index$3;
1530
- exports.Divider = index;
1531
- exports.Field = Field;
1532
- exports.IconApproved = Approved;
1533
- exports.IconArrowDown = ChevronDown;
1534
- exports.IconChevronLeftRound = ChevronLeftRound;
1535
- exports.IconChevronRightRound = ChevronRightRound;
1536
- exports.IconClose = Close;
1537
- exports.IconFileRound = FileRound;
1538
- exports.IconPencil = Pencil;
1539
- exports.IconPencilSimple = PencilSimple;
1540
- exports.IconPlus = Plus;
1541
- exports.IconRefresh = Refresh;
1542
- exports.IconUser = User;
1543
- exports.Modal = Modal;
1544
- exports.Placeholder = index$2;
1545
- exports.Popover = Popover$1;
1546
- exports.Portal = Portal$1;
1547
- exports.Progress = Progress;
1548
- exports.Radio = Radio$1;
1549
- exports.Row = Row;
1550
- exports.Select = Select$1;
1551
- exports.Spinner = Spinner$1;
1552
- exports.Switch = Switch$1;
1553
- exports.Table = index$1;
1554
- exports.Tag = Tag;
1555
- exports.TextButton = TextButton;
1556
- exports.TextInput = TextInput$1;
1557
- exports.Textarea = Textarea$1;
1558
- exports.Toast = Toast;
1559
- exports.Tooltip = Tooltip$2;
1560
- exports.arrow = Arrow;
1561
- exports.boxShadow = boxShadow;
1562
- exports.defaultTheme = theme$1;
1563
- exports.findColorInvert = findColorInvert;
1564
- exports.hambuger = hamburger;
1565
- exports.mediaDesktop = mediaDesktop;
1566
- exports.mediaFullHD = mediaFullHD;
1567
- exports.mediaMobile = mediaMobile;
1568
- exports.mediaTablet = mediaTablet;
1569
- exports.mediaUntilFullHD = mediaUntilFullHD;
1570
- exports.normalizeStyle = normalized$1;
1571
- exports.setSize = setSize;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("clsx"),t=require("react/jsx-runtime"),r=require("react"),f=require("@floating-ui/react"),ne=require("react-dom");function k(e,n){return n?e+" "+n:e}function H({className:e,...n}){const o=r.useMemo(()=>m("leading-none peer-disabled:opacity-70",e),[e]);return t.jsx("label",{className:o,...n})}function re({label:e,children:n,required:o,htmlFor:s,error:l,help:i,helpBefore:a,className:d,innerClass:u,...x}){const p=r.useMemo(()=>m("font-medium",o?'after:content-["*"] after:text-danger after:text-sm after:pl-0.5':""),[o]),g=r.useMemo(()=>k("flex flex-col space-y-2",d),[d]);return t.jsxs("div",{className:g,...x,children:[e?t.jsx(H,{className:p,htmlFor:s,children:e}):null,i&&a?t.jsx("p",{className:"text-xs text-muted pb-2",children:i}):null,t.jsx("div",{className:u,children:oe(n,!!l)}),i&&!a&&!l?t.jsx("p",{className:"text-xs text-muted",children:i}):null,l?t.jsx("p",{className:"text-xs text-danger",children:l}):null]})}function oe(e,n){const o=r.Children.count(e);if(!o)return null;if(o===1)return r.cloneElement(e,{error:n});const s=r.Children.toArray(e);return s[0]=r.cloneElement(s[0],{error:n}),s}function se({error:e,unstyled:n,className:o,...s}){const l=r.useMemo(()=>n?o:k(m("flex rounded-md border bg-background px-3 py-2 w-full [&_input]:placeholder:text-muted","[&_input]:disabled:opacity-50 [&_input]:focus-visible:outline-none",e?"border-danger hover:border-danger-fore":"border-input"),o),[o,e,n]);return t.jsx("div",{className:l,...s})}const W=r.forwardRef(({className:e,type:n,error:o,unstyled:s,...l},i)=>{const a=r.useMemo(()=>s?e:k(m("flex rounded-md border bg-background px-3 py-2 w-full placeholder:text-muted","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",o?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore",n==="file"?"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground":null),e),[e,n,o,s]);return t.jsx("input",{ref:i,type:n,className:a,...l})});W.displayName="Input";const X=r.forwardRef(({className:e,error:n,unstyled:o,...s},l)=>{const i=r.useMemo(()=>o?e:k(m("flex rounded-md border bg-background px-3 py-2 w-full","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",n?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore"),e),[e,n,o]);return t.jsx("textarea",{ref:l,className:i,...s})});X.displayName="Textarea";function D(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:t.jsx("path",{d:"M11.5 18.5l-3.9-4L6 16l5.6 5.6 11.6-11.5-1.7-1.6z",fill:"currentColor"})})}function ie(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",children:t.jsx("rect",{width:"20",height:"3",y:"13.5",x:"4.5",fill:"currentColor",stroke:"none",rx:"2"})})}function le({checked:e,indeterminate:n,className:o,id:s,name:l,onChange:i,value:a,...d}){const u=r.useMemo(()=>k(m("inline-flex justify-center items-center border w-4.5 h-4.5 rounded","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",e||n?"bg-primary text-inverted disabled:text-text disabled:bg-input disabled:border-input":"border-input not-disabled:hover:border-input-fore"),o),[e,n,o]),x=()=>{d.disabled||i?.(!e)};return t.jsxs("button",{type:"button",role:"checkbox",id:s||l,className:u,onClick:x,"aria-checked":e,...d,children:[e?t.jsx(D,{}):null,n&&!e?t.jsx(ie,{}):null,t.jsx("input",{type:"checkbox","aria-hidden":"true",name:l,checked:e,value:a,onChange:x,disabled:d.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})}const ae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=ae?r.useLayoutEffect:r.useEffect;function z({children:e,container:n,disabled:o}){const[s,l]=r.useState(null);return _(()=>{if(!n){let i=document.getElementById("visits-style-portals");return i||(i=document.createElement("div"),i.id="visits-style-portals",document.body.appendChild(i)),l(i)}l(n)},[n]),o||!s?null:ne.createPortal(e,s)}function P(e){e&&(e.stopPropagation(),e.preventDefault())}const ce={open:150,close:75},O=r.forwardRef(({position:e,label:n,children:o,color:s="background",disabled:l,offset:i={x:0,y:6},onOpen:a,onClose:d,onManualClose:u,timeout:x=ce,unstyled:p,zIndex:g=9996,role:w,...c},b)=>{const[v,y]=r.useState(!1),I=f.useId(),j=r.useRef(a),A=r.useRef(d),{refs:M,floatingStyles:S,context:F}=f.useFloating({nodeId:I,placement:e,middleware:[f.shift(),f.flip({fallbackAxisSideDirection:"end"}),f.offset({mainAxis:i.y,crossAxis:i.x})],open:v,onOpenChange:C=>{C?j.current?.(M.reference.current,M.floating.current):A.current?.(M.reference.current,M.floating.current),y(C)},whileElementsMounted:f.autoUpdate}),{isMounted:T,styles:E}=f.useTransitionStyles(F,{duration:x,initial({side:C}){let R="";return C==="top"?R="translateY(5%) scale(0.95)":C==="bottom"?R="translateY(-5%) scale(0.95)":C==="left"?R="translateX(5%) scale(0.95)":R="translateX(-5%) scale(0.95)",{opacity:0,transform:R}}}),B=r.useCallback(C=>{if(P(C),u)return u();y(!1),A.current?.(M.reference.current,M.floating.current)},[u]);r.useEffect(()=>{if(l&&v)return y(!1)},[l,v]),r.useImperativeHandle(b,()=>({open:()=>{y(!0),j.current?.(M.reference.current,M.floating.current)},close:()=>{y(!1),A.current?.(M.reference.current,M.floating.current)}}),[]);const{getFloatingProps:h,getReferenceProps:N}=f.useInteractions([f.useClick(F,{enabled:!l})]);return j.current=a,A.current=d,t.jsxs(t.Fragment,{children:[r.cloneElement(r.Children.only(n),N({ref:M.setReference,tabIndex:0,role:"button","aria-expanded":v,disabled:l,onClick:P})),t.jsx(z,{disabled:l||!T,children:t.jsx(f.FloatingOverlay,{"data-testid":"vs-popover-shadow",onClick:B,style:{zIndex:g},autoFocus:!0,children:t.jsx("div",{role:w||"region",ref:M.setFloating,style:S,children:t.jsx(Y,{unstyled:p,styles:E,...h({...c,onClick:P}),children:o})})})})]})});O.displayName="Popover";const Y=r.forwardRef(({className:e,unstyled:n,styles:o,style:s={},...l},i)=>{const a=r.useMemo(()=>m("z-20 w-auto h-auto outline-none transition-transform ease-in-out",n?null:"border border-accent rounded-md shadow-lg p-1 bg-background",e),[e,n]);return t.jsx("div",{ref:i,className:a,style:{...o,...s},...l})});Y.displayName="PopoverContent";function U(e){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("path",{d:"M11.7 14.8 7 9.8a.5.5 0 0 1 0-.7c.2-.2.5-.2.7 0l4.5 5c.2.2.2.6 0 .8-.1.2-.4.2-.6 0Z",fill:"currentColor"}),t.jsx("path",{d:"m16.9 9.9-4.6 5c-.2.2-.4.2-.6 0a.5.5 0 0 1 0-.8l4.5-5c.2-.2.5-.2.7 0 .1.2.1.6 0 .8Z",fill:"currentColor"})]})}function V(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",...e,children:t.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[t.jsx("path",{d:"M26 26l-12.5-12.5L26 1"}),t.jsx("path",{d:"M1 26l12.5-12.5L1 1"})]})})}function ue({className:e,placeholder:n="",options:o=[],error:s,unstyled:l,disabled:i,value:a,maxHeight:d=408,arrow:u,onChange:x,onClear:p,renderItem:g,...w}){const c=r.useRef(null),[b,v]=r.useState(0),y=r.useMemo(()=>l?e:k(m("flex items-center justify-between rounded-md border bg-background px-3 py-2 w-full overflow-hidden cursor-pointer","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",s?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore"),e),[e,s,l]),I=r.useMemo(()=>Array.isArray(a),[]),j=r.useCallback(h=>{x?.(h),I||c.current?.close()},[x,I]),A=r.useCallback(h=>Array.isArray(a)?a.indexOf(h)>-1:a===h,[a]),M=r.useMemo(()=>{const h={},N=o.filter(C=>typeof C!="string");for(let C=0,R=N.length;C<R;C+=1){const $=N[C];h[`${$.value}`]=$.label}return h},[o]),S=r.useMemo(()=>{if(!a)return n;if(Array.isArray(a)){if(!a.length)return n;const h=[...a].sort(),N=[];for(let C=0,R=h.length;C<R;C+=1)N[C]=M[`${h[C]}`]||"";return N.filter(Boolean).join(",")||n}return M[`${a}`]||n},[n,a,M]),F=S===n,T=r.useMemo(()=>m("overflow-hidden overflow-ellipsis whitespace-nowrap",F?"text-muted":"text-text"),[F]),E=r.useMemo(()=>u||t.jsx(U,{className:"absolute right-0 text-muted size-5"}),[u]),B=r.useCallback((h,N)=>g?typeof h=="string"?g(h,{index:N,selected:!1,onChange:()=>{}}):g(h,{index:N,selected:A(h.value),onChange:()=>j(h.value)}):typeof h=="string"?t.jsx("h5",{className:"font-medium py-1 px-2 text-muted",children:h},`optionheader-${N}`):t.jsx(de,{selected:A(h.value),onChange:j,...h},h.label),[g,j,A]);return t.jsx(O,{label:t.jsxs("button",{type:"button",className:y,disabled:i,...w,children:[t.jsx("span",{className:T,children:S}),t.jsxs("div",{className:"relative flex items-center pl-8 pr-3 space-x-2",children:[p&&!F?t.jsx("div",{tabIndex:-1,role:"button",className:"size-6 p-1.5 rounded hover:bg-accent","aria-label":"clear selected values",onKeyDown:h=>{h.key!=="Enter"&&h.key!=="Space"||p()},onClick:h=>{h.stopPropagation(),p()},children:t.jsx(V,{})}):null,E]})]}),ref:c,onOpen:h=>v(h?.getBoundingClientRect().width||0),disabled:i,children:t.jsx("ul",{className:"overflow-y-auto flex flex-col",role:"listbox",style:{minWidth:b,maxWidth:"calc(100vw - 3rem)",maxHeight:d},children:o.map(B)})})}function de({className:e,value:n,label:o,selected:s,onChange:l}){const i=r.useMemo(()=>m("flex items-center w-full hover:bg-accent rounded p-1",e),[e]);return t.jsxs("button",{type:"button",role:"option",className:i,"aria-selected":s,onClick:()=>l?.(n),children:[s?t.jsx(D,{className:"w-5 h-5 mr-1"}):t.jsx("div",{className:"w-5 h-1 mr-1"}),o]})}function fe({checked:e,className:n,id:o,name:s,onChange:l,value:i,...a}){const d=r.useMemo(()=>m("relative inline-flex justify-center items-center border border-input w-4.5 h-4.5 rounded-full","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed not-disabled:hover:border-input-fore",e?"[&_i]:bg-primary disabled:[&_i]:bg-text disabled:border-input":"",n),[n,e]),u=()=>{a.disabled||l?.(!e)};return t.jsxs("button",{type:"button",role:"radio",id:o||s,className:d,onClick:u,"aria-checked":e,...a,children:[t.jsx("i",{className:"block w-2.5 h-2.5 rounded-full transition-transform",style:{transform:e?"":"scale(0.8)",opacity:e?1:0}}),t.jsx("input",{type:"radio","aria-hidden":"true",name:s,checked:e,value:i,onChange:u,disabled:a.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})}const G=r.forwardRef(({className:e,checked:n,onChange:o,value:s,id:l,name:i,...a},d)=>{const u=r.useMemo(()=>k(m("inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50","w-11",n?"bg-primary":"bg-input"),e),[e,n]),x=r.useMemo(()=>k("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",e),[e]),p=()=>{a.disabled||o?.(!n)};return t.jsxs("button",{type:"button",role:"switch",id:l||i,className:u,onClick:p,"aria-checked":n,...a,children:[t.jsx("span",{className:x,style:{transform:n?"translateX(100%)":""}}),t.jsx("input",{ref:d,type:"checkbox","aria-hidden":"true",name:i,checked:n,value:s,onChange:p,disabled:a.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})});G.displayName="Switch";function he({header:e,show:n,children:o,timeout:s=300,...l}){const i=r.useRef(null),a=r.useRef(0),d=r.useRef(0),u=r.useRef(!0);return r.useEffect(()=>{d.current=s},[s]),_(()=>{if(!i.current)return;if(i.current.style.overflow="hidden",i.current.style.opacity="1",u.current){u.current=!1,i.current.style.height=n?"auto":"0px",n?window.requestAnimationFrame(()=>{i.current&&(a.current=i.current.offsetHeight)}):(window.requestAnimationFrame(()=>{i.current&&(i.current.style.height="auto",a.current=i.current.offsetHeight,i.current.style.height="0px")}),i.current.style.opacity="0");return}n||(i.current.style.height=`${a.current}px`);const x=[];x[0]=window.requestAnimationFrame(()=>{x[1]=window.requestAnimationFrame(()=>{i.current&&(i.current.style.height=`${n?a.current:0}px`,i.current.style.opacity=n?"1":"0")})});let p;const g=()=>{i.current&&(n?(i.current.style.height="auto",i.current.style.overflow="",i.current.style.opacity="",window.requestAnimationFrame(()=>{i.current&&(a.current=i.current.offsetHeight)})):i.current.style.height="0px")};return d.current===0?g():p=window.setTimeout(g,d.current),()=>{x.forEach(window.cancelAnimationFrame),p&&window.clearTimeout(p)}},[n]),t.jsxs("div",{...l,children:[e,t.jsx("div",{className:"transition-all ease-in-out overflow-hidden",role:"region","aria-hidden":!n,ref:i,style:{transitionDuration:`${s}ms`},children:o})]})}const xe=r.forwardRef(({children:e,position:n="bottom",label:o,className:s,timeout:l=150,offset:i={x:0,y:6},clientPoint:a=!1,disabled:d},u)=>{const[x,p]=r.useState(!1),g=f.useId(),{refs:w,floatingStyles:c,context:b}=f.useFloating({nodeId:g,open:x,placement:n,middleware:[f.shift(),f.flip(),f.offset({mainAxis:i.y,crossAxis:i.x})],whileElementsMounted:d?void 0:f.autoUpdate,onOpenChange:p}),{getReferenceProps:v,getFloatingProps:y}=f.useInteractions([f.useHover(b,{enabled:!d}),f.useClientPoint(b,{enabled:a})]),{isMounted:I,styles:j}=f.useTransitionStyles(b,{duration:l,initial:{opacity:0,transform:"scale(0.8)"}});r.useImperativeHandle(u,()=>({floating:w.floating,reference:w.reference,open:()=>p(!0),close:()=>p(!1)}));const A=typeof e=="string"?t.jsx("span",{children:e}):e;return t.jsxs(t.Fragment,{children:[r.cloneElement(r.Children.only(A),{ref:w.setReference,...v()}),t.jsx(z,{disabled:d||!I,children:t.jsx("div",{role:"tooltip",className:"z-[9999]",ref:w.setFloating,...y({style:c}),children:t.jsx(pe,{className:s,style:j,children:o})})})]})}),pe=r.forwardRef(({className:e,custom:n,...o},s)=>{const l=r.useMemo(()=>m("relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre",n?null:"border border-accent rounded shadow-md px-3 py-1 bg-background",e),[e,n]);return t.jsx("div",{ref:s,className:l,...o})});function ge({variant:e,size:n}){return m("inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto",{"bg-primary text-inverted hover:bg-primary-fore":!e||e==="primary","bg-info text-inverted hover:bg-info-fore":e==="info","bg-warn text-inverted hover:bg-warn-fore":e==="warn","bg-danger text-inverted hover:bg-danger-fore":e==="danger","hover:bg-accent":e==="ghost","hover:underline":e==="link","border border-input hover:bg-accent":e==="outline"},{"px-2 py-1":!n,"p-1.5":n==="icon"})}function me({size:e,variant:n,className:o,...s}){const l=r.useMemo(()=>m(ge({size:e,variant:n}),o),[e,n,o]);return t.jsx("button",{className:l,type:"button",...s})}function be({open:e,children:n,timeout:o=150,padding:s="0.85rem",verticalAlign:l="center",closeOnOverlay:i,closeOnEsc:a,onExited:d,className:u,onOpenChange:x,size:p,...g}){const w=r.useRef(d),c=r.useRef(!1),b=f.useId(),{refs:v,context:y}=f.useFloating({open:e,onOpenChange:x,nodeId:b}),{getFloatingProps:I}=f.useInteractions([f.useDismiss(y,{enabled:a,escapeKey:a,outsidePress:!1})]),{isMounted:j,styles:A}=f.useTransitionStyles(y,{duration:o,initial:{opacity:0,transform:"scale(0.8)"}});r.useEffect(()=>{c.current!==j&&(c.current=j,!j&&w.current?.())},[j]);const M=r.useCallback(()=>{i&&x?.(!1)},[x,i]);w.current=d;const S=r.useMemo(()=>m("grid bg-backdrop z-40 justify-items-center",{"place-items-start items-start":l==="start","place-items-end":l==="end","place-items-center":l==="center"||!l}),[l]),F=r.useMemo(()=>k("transition ease-in-out",u),[u]);return t.jsx(z,{disabled:!j,children:t.jsx(f.FloatingOverlay,{className:S,"data-testid":"vs-dialog-overlay",onClick:M,style:{padding:s,opacity:A.opacity},lockScroll:!0,children:t.jsx(K,{ref:v.setFloating,className:F,role:"dialog",size:p,...I({...g,style:A,onClick:P}),children:n})})})}const K=r.forwardRef(({size:e,className:n,...o},s)=>{const l=r.useMemo(()=>m(e?"flex flex-col bg-background shadow-lg p-5 rounded":null,{"w-full max-w-sm":e==="small","w-full max-w-lg":e==="medium","w-full max-w-2xl":e==="large"},n),[e,n]);return t.jsx("div",{ref:s,className:l,...o})});K.displayName="DialogContent";const we={open:300,close:150};function ve({open:e,timeout:n=we,onOpenChange:o,position:s="right",overlay:l,...i}){const a=f.useId(),{refs:d,context:u}=f.useFloating({open:e,onOpenChange:o,nodeId:a}),{isMounted:x,styles:p}=f.useTransitionStyles(u,{duration:n,initial(){let w="translateX(75%)";return s==="left"?w="translateX(-75%)":s==="top"?w="translateY(-75%)":s==="bottom"&&(w="translateY(75%)"),{opacity:0,transform:w}}}),g=r.useMemo(()=>m("fixed transition-transform z-30",{"top-0 right-0 h-full max-h-screen":s==="right","top-0 left-0 h-full max-h-screen":s==="left","top-0 left-0 right-0 w-full max-w-screen":s==="top","bottom-0 left-0 right-0 w-full max-w-screen":s==="bottom"}),[s]);return t.jsxs(z,{disabled:!x,children:[l?t.jsx(f.FloatingOverlay,{className:"bg-backdrop",style:{opacity:p.opacity},onClick:()=>o?.(!1)}):null,t.jsx("div",{ref:d.setFloating,className:g,role:"dialog",style:p,children:t.jsx(ye,{...i})})]})}function ye({className:e,unstyled:n,...o}){const s=r.useMemo(()=>n?e:k(m("relative bg-background min-w-full min-h-full border border-input shadow-lg"),e),[n,e]);return t.jsx("div",{className:s,...o})}function J(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsx("path",{d:"M15 29a14 14 0 0 1-9.9-4.1A14 14 0 0 1 1 15a14 14 0 0 1 4.1-9.9A14 14 0 0 1 15 1a14 14 0 0 1 9.9 4.1A14 14 0 0 1 29 15a14 14 0 0 1-4.1 9.9A14 14 0 0 1 15 29z",fill:"none"}),t.jsx("path",{d:"M15 2a13 13 0 0 0-9.2 3.8A13 13 0 0 0 2 15a13 13 0 0 0 3.8 9.2A13 13 0 0 0 15 28a13 13 0 0 0 9.2-3.8A13 13 0 0 0 28 15a13 13 0 0 0-3.8-9.2A13 13 0 0 0 15 2m0-2a15 15 0 1 1 0 30 15 15 0 0 1 0-30z",fill:"currentColor"}),t.jsx("path",{d:"m11.5 18.5-3.9-4L6 16l5.6 5.6L23.2 10l-1.7-1.6z",fill:"currentColor"})]})}function L(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 32 32",...e,children:[t.jsx("path",{d:"M16 0C7.16 0 0 7.16 0 16C0 24.84 7.16 32 16 32C24.84 32 32 24.84 32 16C32 7.16 24.84 0 16 0ZM16 31C7.73 31 1 24.27 1 16C1 7.73 7.73 1 16 1C24.27 1 31 7.73 31 16C31 24.27 24.27 31 16 31Z",fill:"currentColor"}),t.jsx("path",{d:"M15.5 19.55V8.54999C15.5 8.26999 15.72 8.04999 16 8.04999C16.28 8.04999 16.5 8.26999 16.5 8.54999V19.55C16.5 19.83 16.28 20.05 16 20.05C15.72 20.05 15.5 19.83 15.5 19.55Z",fill:"currentColor"}),t.jsx("path",{d:"M16 23.95C16.5523 23.95 17 23.5023 17 22.95C17 22.3977 16.5523 21.95 16 21.95C15.4477 21.95 15 22.3977 15 22.95C15 23.5023 15.4477 23.95 16 23.95Z",fill:"currentColor"})]})}function Q(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 52 45",...e,children:t.jsx("path",{d:"M50.6 37.8 29.3 2c-1.5-2.6-5.1-2.8-6.7-.3l-21.2 36c-1.7 2.6.2 6.6 3.4 6.6h42.4c3.1 0 5-4 3.4-6.6Zm-24.7.6a2.7 2.7 0 1 1 0-5.5 2.7 2.7 0 0 1 0 5.5Zm2.9-10.1c0 1.5-1.3 2.7-2.8 2.7a2.8 2.8 0 0 1-2.8-2.7V13.9c0-1.5 1.3-2.7 2.8-2.7 1.5 0 2.8 1.2 2.8 2.7v14.4Z",fill:"currentColor"})})}function ee({size:e=20,label:n="Loading...",...o}){return t.jsxs("div",{role:"status",...o,children:[t.jsxs("svg",{"aria-hidden":"true",className:"text-accent animate-spin fill-primary",width:e,height:e,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z",fill:"currentColor"}),t.jsx("path",{d:"M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z",fill:"currentFill"})]}),t.jsx("span",{className:"sr-only",children:n})]})}function te({type:e,label:n,message:o}){return t.jsxs("div",{className:"flex items-center px-4 py-3 w-80 text-sm bg-background border border-input rounded-lg shadow-md m-2",children:[e?t.jsxs("figure",{className:"mr-2",children:[e==="success"?t.jsx(J,{className:"text-primary size-5"}):null,e==="info"?t.jsx(L,{className:"text-info size-5"}):null,e==="error"?t.jsx(L,{className:"text-danger size-5"}):null,e==="warn"?t.jsx(Q,{className:"text-warn size-5"}):null,e==="loading"?t.jsx(ee,{size:20}):null]}):null,t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"font-medium leading-none",children:n}),o?t.jsx("p",{children:o}):null]})]})}function q(){}class je{notify=q;lastId=0;subscribe=n=>(this.notify=n,()=>{this.notify=q});add=(n,o={})=>{this.lastId+=1;const s=`${this.lastId}`;return this.notify({id:s,type:"add",config:{id:s,label:n,...o}}),s};update=(n,o)=>{this.notify({id:n,type:"update",config:o})};remove=n=>{this.notify({id:n,type:"remove"})};clear=()=>{this.lastId=0}}const Z=new je;function Ce({id:e,type:n,index:o,duration:s,className:l,children:i,inverted:a,timeout:d=250,max:u=3}){const x=r.useRef(!1),[p,g]=r.useState(!1),{context:w,refs:c}=f.useFloating({open:p,onOpenChange:g,nodeId:e}),{isMounted:b,styles:v}=f.useTransitionStyles(w,{duration:d,initial:{opacity:0,transform:`translateY(${a?"":"-"}50%)`}});r.useLayoutEffect(()=>{g(o<=u)},[o,u]),r.useEffect(()=>{x.current!==b&&(b||Z.remove(e),x.current=b)},[b,e]),r.useEffect(()=>{if(!s)return;const j=window.setTimeout(()=>g(!1),s);return()=>window.clearTimeout(j)},[s,e]);const y=r.useCallback(()=>{n!=="loading"&&g(!1)},[n]),I=r.useMemo(()=>m("relative flex w-fit transition-transform ease-in-out cursor-pointer",l),[l]);return b?t.jsx("li",{role:"log",tabIndex:-1,ref:c.setFloating,className:I,style:v,onClick:y,children:i}):null}function Me({className:e,margin:n=16,position:o="top-left",max:s,ListItem:l=te}){const i=r.useMemo(()=>{const c={position:"fixed"};return o.indexOf("top")>-1?c.top=n:o.indexOf("bottom")>-1&&(c.bottom=n),o.indexOf("left")>-1?(c.left=n,c.alignItems="flex-start"):o.indexOf("right")>-1?(c.right=n,c.alignItems="flex-end"):(c.left="50%",c.alignItems="center",c.transform="translateX(-50%)"),c},[n,o]),a=r.useMemo(()=>m("flex flex-col z-40 overflow-hidden",e),[e]),d=r.useMemo(()=>o?.startsWith("bottom")||!1,[o]),u=r.useRef(new Map),[x,p]=r.useState([]),g=r.useState(0)[1];_(()=>Z.subscribe(c=>{r.startTransition(()=>{if(c.type==="add")u.current.set(c.id,c.config),p(b=>[...b,c.id]);else if(c.type==="remove"){if(!u.current.delete(c.id))return;p(v=>{const y=new Set(v);return y.has(c.id)?(y.delete(c.id),Array.from(y)):v})}else if(c.type==="update"){const b=u.current.get(c.id);if(!b)return;u.current.set(c.id,{...b,...c.config}),g(v=>v+1)}})}),[]);const w=x.length;return t.jsx(z,{children:t.jsx("ol",{className:a,style:i,"aria-live":"polite",children:x.map((c,b)=>{const v=u.current.get(c);if(!v)return null;const{className:y,duration:I,...j}=v;return t.jsx(Ce,{id:c,index:w-b,className:y,duration:I,inverted:d,max:s,children:r.createElement(l,j)},c)})})})}function ke({className:e,...n}){const o=r.useMemo(()=>k("inline-block animate-pulse rounded-md bg-accent",e),[e]);return t.jsx("span",{className:o,...n})}function Ae({className:e,...n}){const o=r.useMemo(()=>m("flex items-center justify-center","[&_button]:rounded-none [&_:first-child]:rounded-bl [&_:first-child]:rounded-tl [&_:last-child]:rounded-br [&_:last-child]:rounded-tr","[&_:first-child]:border-r-0 [&_:last-child]:border-l-0",e),[e]);return t.jsx("div",{role:"group",className:o,...n})}function Ie({value:e,max:n,className:o,...s}){const l=r.useMemo(()=>e?Math.round(e/n*100):0,[e,n]),i=r.useMemo(()=>k("relative overflow-hidden rounded-full bg-primary",o),[o]);return t.jsx("div",{role:"progressbar",className:i,"aria-valuemax":n,"aria-valuemin":0,...s,children:t.jsx("div",{className:"h-full w-full flex-1 bg-input transition-all origin-right",style:{transform:`translateX(${l>100?100:l}%)`}})})}function Ne({className:e,orientation:n="horizontal",...o}){const s=r.useMemo(()=>k(m("border-0 p-0 shrink-0 bg-input",n==="horizontal"?"h-[1px] w-full":"w-[1px] h-full"),e),[e,n]);return t.jsx("hr",{className:s,role:"none",...o})}function Re(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",children:[t.jsx("path",{d:"M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"}),t.jsx("path",{d:"M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",fill:"currentColor"})]}),t.jsx("path",{d:"M18.066 8.5l-7.567 6.731 7.567 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2"})]})}function Fe(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",children:[t.jsx("path",{d:"M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"}),t.jsx("path",{d:"M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",fill:"currentColor"})]}),t.jsxs("g",{transform:"translate(9 7)",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t.jsx("rect",{width:"12",height:"16",rx:"1",stroke:"none"}),t.jsx("path",{d:"M1 1h10v14H1z"})]}),t.jsx("path",{fill:"currentColor",d:"M13 11h4v1.3h-4zM13 14h4v1.3h-4zM13 17h4v1.3h-4z"})]})}function Se(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17.796",height:"17.908",viewBox:"0 0 17.796 17.908",...e,children:t.jsx("path",{d:"M1.254 12.674L.5 17.408l4.726-.8L17.3 4.472 13.281.5zM1.375 12.766l3.851 3.838M10.949 2.959l3.836 3.801",fill:"none",stroke:"currentColor"})})}function ze(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t.jsx("circle",{cx:"15",cy:"15",r:"15",stroke:"none"}),t.jsx("circle",{cx:"15",cy:"15",r:"14"})]}),t.jsx("path",{d:"M8 23a6.018 6.018 0 016-6h2a6.018 6.018 0 016 6zm2.6-2h8.9a4.033 4.033 0 00-3.5-2h-1.9a4.035 4.035 0 00-3.5 2zm.4-9v-1a4.012 4.012 0 014-4 4.012 4.012 0 014 4v1a4.012 4.012 0 01-4 4 4.012 4.012 0 01-4-4zm2-1v1a2.006 2.006 0 002 2 2.006 2.006 0 002-2v-1a2.006 2.006 0 00-2-2 2.006 2.006 0 00-2 2z",fill:"currentColor"})]})}function Pe(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:t.jsx("path",{d:"M15.065 0A15.069 15.069 0 00.142 13.105a1.256 1.256 0 102.478.406c0-.027.008-.055.01-.082a12.52 12.52 0 0121.3-7.226l-2.584 2.584 7.532 1.255-1.255-7.532-1.92 1.92A15 15 0 0015.065 0zm13.7 15.589A1.255 1.255 0 0027.5 16.7a12.512 12.512 0 01-21.893 6.569l1.927-1.927L0 20.086l1.255 7.532 2.572-2.572a15.02 15.02 0 0026.16-8.023 1.256 1.256 0 00-1.064-1.423 1.273 1.273 0 00-.16-.011z",fill:"currentColor"})})}function Te(e){return t.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"16.5",y:"9",width:"14",height:"1",rx:".5",transform:"rotate(90 16.5 9)",fill:"currentColor"}),t.jsx("rect",{x:"9",y:"15.5",width:"14",height:"1",rx:".5",fill:"currentColor"})]})}exports.clsx=m;exports.Accordion=he;exports.Button=me;exports.ButtonGroup=Ae;exports.Checkbox=le;exports.Dialog=be;exports.Divider=Ne;exports.FormField=re;exports.FormLabel=H;exports.IconAlert=L;exports.IconApproved=J;exports.IconArrowDown=U;exports.IconCaution=Q;exports.IconCheck=D;exports.IconChevronRound=Re;exports.IconClose=V;exports.IconFileRound=Fe;exports.IconPencil=Se;exports.IconPlus=Te;exports.IconRefresh=Pe;exports.IconUser=ze;exports.Input=W;exports.InputField=se;exports.Placeholder=ke;exports.Popover=O;exports.Portal=z;exports.Progress=Ie;exports.Radio=fe;exports.Select=ue;exports.Sheet=ve;exports.Spinner=ee;exports.Switch=G;exports.Textarea=X;exports.Toast=Me;exports.ToastItem=te;exports.Tooltip=xe;exports.merge=k;exports.toast=Z;