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