ics-ui-kit 0.1.10 → 0.1.11
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.
- package/dist/Popover-CY_d3Ggn.js +274 -0
- package/dist/Popover-CY_d3Ggn.js.map +1 -0
- package/dist/components/background-pattern/BackgroundPattern.d.ts +43 -0
- package/dist/components/background-pattern/BackgroundPattern.stories.d.ts +26 -0
- package/dist/components/background-pattern/index.d.ts +2 -0
- package/dist/components/background-pattern/patterns.d.ts +21 -0
- package/dist/components/background-pattern.d.ts +2 -0
- package/dist/components/background-pattern.js +70 -0
- package/dist/components/background-pattern.js.map +1 -0
- package/dist/components/popover/Popover.stories.d.ts +6 -0
- package/dist/components/popover.js +1 -1
- package/dist/components/search-select.js +1 -1
- package/dist/styles-scoped.css +15 -0
- package/dist/styles.css +15 -0
- package/package.json +1 -1
- package/dist/Popover-Dvr7y0YY.js +0 -258
- package/dist/Popover-Dvr7y0YY.js.map +0 -1
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { P as O, c as P, a as G } from "./index-CFaU3UXv.js";
|
|
4
|
+
import { u as b } from "./index-DLcqcWxM.js";
|
|
5
|
+
import { c as H } from "./index-DFZozV_h.js";
|
|
6
|
+
import { P as V, D as K } from "./index-_ITz1IyW.js";
|
|
7
|
+
import { h as W, R as j, u as U, F as Y } from "./index-BzCriPiK.js";
|
|
8
|
+
import { u as Z } from "./index-xqkGMOJ8.js";
|
|
9
|
+
import { c as x, R as q, A as _, C as J, a as Q } from "./index-DRo26PBK.js";
|
|
10
|
+
import { P as w } from "./index-BpWB3aFK.js";
|
|
11
|
+
import { u as X } from "./index-437EL2iq.js";
|
|
12
|
+
import { T as y } from "./index-BVqs-uqP.js";
|
|
13
|
+
import { u as oo } from "./ComponentVariantProvider-brk0g-hm.js";
|
|
14
|
+
import { u as eo } from "./usePortalContainer-ae6EzS08.js";
|
|
15
|
+
import { T as ro } from "./TriggerButton-CfDObWP9.js";
|
|
16
|
+
var C = "Popover", [E, Io] = H(C, [
|
|
17
|
+
x
|
|
18
|
+
]), g = x(), [to, u] = E(C), N = (o) => {
|
|
19
|
+
const {
|
|
20
|
+
__scopePopover: n,
|
|
21
|
+
children: e,
|
|
22
|
+
open: a,
|
|
23
|
+
defaultOpen: r,
|
|
24
|
+
onOpenChange: t,
|
|
25
|
+
modal: c = !1
|
|
26
|
+
} = o, p = g(n), d = i.useRef(null), [l, m] = i.useState(!1), [h, f] = X({
|
|
27
|
+
prop: a,
|
|
28
|
+
defaultProp: r ?? !1,
|
|
29
|
+
onChange: t,
|
|
30
|
+
caller: C
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ s(q, { ...p, children: /* @__PURE__ */ s(
|
|
33
|
+
to,
|
|
34
|
+
{
|
|
35
|
+
scope: n,
|
|
36
|
+
contentId: Z(),
|
|
37
|
+
triggerRef: d,
|
|
38
|
+
open: h,
|
|
39
|
+
onOpenChange: f,
|
|
40
|
+
onOpenToggle: i.useCallback(() => f((R) => !R), [f]),
|
|
41
|
+
hasCustomAnchor: l,
|
|
42
|
+
onCustomAnchorAdd: i.useCallback(() => m(!0), []),
|
|
43
|
+
onCustomAnchorRemove: i.useCallback(() => m(!1), []),
|
|
44
|
+
modal: c,
|
|
45
|
+
children: e
|
|
46
|
+
}
|
|
47
|
+
) });
|
|
48
|
+
};
|
|
49
|
+
N.displayName = C;
|
|
50
|
+
var S = "PopoverAnchor", T = i.forwardRef(
|
|
51
|
+
(o, n) => {
|
|
52
|
+
const { __scopePopover: e, ...a } = o, r = u(S, e), t = g(e), { onCustomAnchorAdd: c, onCustomAnchorRemove: p } = r;
|
|
53
|
+
return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(_, { ...t, ...a, ref: n });
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
T.displayName = S;
|
|
57
|
+
var F = "PopoverTrigger", M = i.forwardRef(
|
|
58
|
+
(o, n) => {
|
|
59
|
+
const { __scopePopover: e, ...a } = o, r = u(F, e), t = g(e), c = b(n, r.triggerRef), p = /* @__PURE__ */ s(
|
|
60
|
+
O.button,
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
"aria-haspopup": "dialog",
|
|
64
|
+
"aria-expanded": r.open,
|
|
65
|
+
"aria-controls": r.contentId,
|
|
66
|
+
"data-state": L(r.open),
|
|
67
|
+
...a,
|
|
68
|
+
ref: c,
|
|
69
|
+
onClick: P(o.onClick, r.onOpenToggle)
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
return r.hasCustomAnchor ? p : /* @__PURE__ */ s(_, { asChild: !0, ...t, children: p });
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
M.displayName = F;
|
|
76
|
+
var A = "PopoverPortal", [no, ao] = E(A, {
|
|
77
|
+
forceMount: void 0
|
|
78
|
+
}), D = (o) => {
|
|
79
|
+
const { __scopePopover: n, forceMount: e, children: a, container: r } = o, t = u(A, n);
|
|
80
|
+
return /* @__PURE__ */ s(no, { scope: n, forceMount: e, children: /* @__PURE__ */ s(w, { present: e || t.open, children: /* @__PURE__ */ s(V, { asChild: !0, container: r, children: a }) }) });
|
|
81
|
+
};
|
|
82
|
+
D.displayName = A;
|
|
83
|
+
var v = "PopoverContent", k = i.forwardRef(
|
|
84
|
+
(o, n) => {
|
|
85
|
+
const e = ao(v, o.__scopePopover), { forceMount: a = e.forceMount, ...r } = o, t = u(v, o.__scopePopover);
|
|
86
|
+
return /* @__PURE__ */ s(w, { present: a || t.open, children: t.modal ? /* @__PURE__ */ s(co, { ...r, ref: n }) : /* @__PURE__ */ s(io, { ...r, ref: n }) });
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
k.displayName = v;
|
|
90
|
+
var so = G("PopoverContent.RemoveScroll"), co = i.forwardRef(
|
|
91
|
+
(o, n) => {
|
|
92
|
+
const e = u(v, o.__scopePopover), a = i.useRef(null), r = b(n, a), t = i.useRef(!1);
|
|
93
|
+
return i.useEffect(() => {
|
|
94
|
+
const c = a.current;
|
|
95
|
+
if (c) return W(c);
|
|
96
|
+
}, []), /* @__PURE__ */ s(j, { as: so, allowPinchZoom: !0, children: /* @__PURE__ */ s(
|
|
97
|
+
I,
|
|
98
|
+
{
|
|
99
|
+
...o,
|
|
100
|
+
ref: r,
|
|
101
|
+
trapFocus: e.open,
|
|
102
|
+
disableOutsidePointerEvents: !0,
|
|
103
|
+
onCloseAutoFocus: P(o.onCloseAutoFocus, (c) => {
|
|
104
|
+
c.preventDefault(), t.current || e.triggerRef.current?.focus();
|
|
105
|
+
}),
|
|
106
|
+
onPointerDownOutside: P(
|
|
107
|
+
o.onPointerDownOutside,
|
|
108
|
+
(c) => {
|
|
109
|
+
const p = c.detail.originalEvent, d = p.button === 0 && p.ctrlKey === !0, l = p.button === 2 || d;
|
|
110
|
+
t.current = l;
|
|
111
|
+
},
|
|
112
|
+
{ checkForDefaultPrevented: !1 }
|
|
113
|
+
),
|
|
114
|
+
onFocusOutside: P(
|
|
115
|
+
o.onFocusOutside,
|
|
116
|
+
(c) => c.preventDefault(),
|
|
117
|
+
{ checkForDefaultPrevented: !1 }
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
) });
|
|
121
|
+
}
|
|
122
|
+
), io = i.forwardRef(
|
|
123
|
+
(o, n) => {
|
|
124
|
+
const e = u(v, o.__scopePopover), a = i.useRef(!1), r = i.useRef(!1);
|
|
125
|
+
return /* @__PURE__ */ s(
|
|
126
|
+
I,
|
|
127
|
+
{
|
|
128
|
+
...o,
|
|
129
|
+
ref: n,
|
|
130
|
+
trapFocus: !1,
|
|
131
|
+
disableOutsidePointerEvents: !1,
|
|
132
|
+
onCloseAutoFocus: (t) => {
|
|
133
|
+
o.onCloseAutoFocus?.(t), t.defaultPrevented || (a.current || e.triggerRef.current?.focus(), t.preventDefault()), a.current = !1, r.current = !1;
|
|
134
|
+
},
|
|
135
|
+
onInteractOutside: (t) => {
|
|
136
|
+
o.onInteractOutside?.(t), t.defaultPrevented || (a.current = !0, t.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
137
|
+
const c = t.target;
|
|
138
|
+
e.triggerRef.current?.contains(c) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && r.current && t.preventDefault();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
), I = i.forwardRef(
|
|
144
|
+
(o, n) => {
|
|
145
|
+
const {
|
|
146
|
+
__scopePopover: e,
|
|
147
|
+
trapFocus: a,
|
|
148
|
+
onOpenAutoFocus: r,
|
|
149
|
+
onCloseAutoFocus: t,
|
|
150
|
+
disableOutsidePointerEvents: c,
|
|
151
|
+
onEscapeKeyDown: p,
|
|
152
|
+
onPointerDownOutside: d,
|
|
153
|
+
onFocusOutside: l,
|
|
154
|
+
onInteractOutside: m,
|
|
155
|
+
...h
|
|
156
|
+
} = o, f = u(v, e), R = g(e);
|
|
157
|
+
return U(), /* @__PURE__ */ s(
|
|
158
|
+
Y,
|
|
159
|
+
{
|
|
160
|
+
asChild: !0,
|
|
161
|
+
loop: !0,
|
|
162
|
+
trapped: a,
|
|
163
|
+
onMountAutoFocus: r,
|
|
164
|
+
onUnmountAutoFocus: t,
|
|
165
|
+
children: /* @__PURE__ */ s(
|
|
166
|
+
K,
|
|
167
|
+
{
|
|
168
|
+
asChild: !0,
|
|
169
|
+
disableOutsidePointerEvents: c,
|
|
170
|
+
onInteractOutside: m,
|
|
171
|
+
onEscapeKeyDown: p,
|
|
172
|
+
onPointerDownOutside: d,
|
|
173
|
+
onFocusOutside: l,
|
|
174
|
+
onDismiss: () => f.onOpenChange(!1),
|
|
175
|
+
children: /* @__PURE__ */ s(
|
|
176
|
+
J,
|
|
177
|
+
{
|
|
178
|
+
"data-state": L(f.open),
|
|
179
|
+
role: "dialog",
|
|
180
|
+
id: f.contentId,
|
|
181
|
+
...R,
|
|
182
|
+
...h,
|
|
183
|
+
ref: n,
|
|
184
|
+
style: {
|
|
185
|
+
...h.style,
|
|
186
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
187
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
188
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
189
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
190
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
), $ = "PopoverClose", po = i.forwardRef(
|
|
200
|
+
(o, n) => {
|
|
201
|
+
const { __scopePopover: e, ...a } = o, r = u($, e);
|
|
202
|
+
return /* @__PURE__ */ s(
|
|
203
|
+
O.button,
|
|
204
|
+
{
|
|
205
|
+
type: "button",
|
|
206
|
+
...a,
|
|
207
|
+
ref: n,
|
|
208
|
+
onClick: P(o.onClick, () => r.onOpenChange(!1))
|
|
209
|
+
}
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
po.displayName = $;
|
|
214
|
+
var lo = "PopoverArrow", uo = i.forwardRef(
|
|
215
|
+
(o, n) => {
|
|
216
|
+
const { __scopePopover: e, ...a } = o, r = g(e);
|
|
217
|
+
return /* @__PURE__ */ s(Q, { ...r, ...a, ref: n });
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
uo.displayName = lo;
|
|
221
|
+
function L(o) {
|
|
222
|
+
return o ? "open" : "closed";
|
|
223
|
+
}
|
|
224
|
+
var fo = N, vo = T, Po = M, go = D, z = k;
|
|
225
|
+
const B = [
|
|
226
|
+
"z-50 w-72 outline-none",
|
|
227
|
+
"origin-[--radix-popover-content-transform-origin]",
|
|
228
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
229
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
230
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
231
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
232
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
233
|
+
], mo = y({
|
|
234
|
+
base: [
|
|
235
|
+
...B,
|
|
236
|
+
"rounded-lg border border-secondary-border bg-secondary-bg p-4 text-popover-foreground shadow-soft-md"
|
|
237
|
+
]
|
|
238
|
+
}), ho = y({
|
|
239
|
+
base: [
|
|
240
|
+
...B,
|
|
241
|
+
"backdrop-glass-regular rounded-2xl bg-alpha-40 p-2 text-popover-foreground shadow-glass-md"
|
|
242
|
+
]
|
|
243
|
+
}), $o = fo, Co = Po, Lo = vo, Ro = i.forwardRef(
|
|
244
|
+
({ className: o, align: n = "center", sideOffset: e = 4, portalContainer: a, ...r }, t) => {
|
|
245
|
+
const { variant: c } = oo(), p = eo(a), d = c === "glass" ? ho({ className: o }) : mo({ className: o });
|
|
246
|
+
return /* @__PURE__ */ s(go, { container: p, children: /* @__PURE__ */ s(
|
|
247
|
+
z,
|
|
248
|
+
{
|
|
249
|
+
onWheel: (l) => {
|
|
250
|
+
l.stopPropagation();
|
|
251
|
+
},
|
|
252
|
+
onTouchMove: (l) => {
|
|
253
|
+
l.stopPropagation();
|
|
254
|
+
},
|
|
255
|
+
ref: t,
|
|
256
|
+
align: n,
|
|
257
|
+
sideOffset: e,
|
|
258
|
+
className: d,
|
|
259
|
+
...r
|
|
260
|
+
}
|
|
261
|
+
) });
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
Ro.displayName = z.displayName;
|
|
265
|
+
const Ao = i.forwardRef(({ children: o, ...n }, e) => /* @__PURE__ */ s(Co, { asChild: !0, ref: e, children: /* @__PURE__ */ s(ro, { ...n, children: o }) }));
|
|
266
|
+
Ao.displayName = "PopoverTriggerButton";
|
|
267
|
+
export {
|
|
268
|
+
$o as P,
|
|
269
|
+
Co as a,
|
|
270
|
+
Ro as b,
|
|
271
|
+
Lo as c,
|
|
272
|
+
Ao as d
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=Popover-CY_d3Ggn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover-CY_d3Ggn.js","sources":["../node_modules/.pnpm/@radix-ui+react-popover@1.1_3205396e68ca917639ebdf7a5c8fe165/node_modules/@radix-ui/react-popover/dist/index.mjs","../src/components/popover/Popover.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\r\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { useComponentVariant } from \"@/providers/component-variant-context\";\r\nimport { usePortalContainer } from \"../portal-container\";\r\nimport { TriggerButton } from \"../button\";\r\nimport type { TriggerButtonProps } from \"../button/trigger-button/TriggerButton\";\r\n\r\nconst POPOVER_ANATOMY = [\r\n\t\"z-50 w-72 outline-none\",\r\n\t\"origin-[--radix-popover-content-transform-origin]\",\r\n\t\"data-[state=open]:animate-in data-[state=closed]:animate-out\",\r\n\t\"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\r\n\t\"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\r\n\t\"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2\",\r\n\t\"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\r\n];\r\n\r\nconst popoverStyles = tv({\r\n\tbase: [\r\n\t\t...POPOVER_ANATOMY,\r\n\t\t\"rounded-lg border border-secondary-border bg-secondary-bg p-4 text-popover-foreground shadow-soft-md\"\r\n\t]\r\n});\r\n\r\nconst glassPopoverStyles = tv({\r\n\tbase: [\r\n\t\t...POPOVER_ANATOMY,\r\n\t\t\"backdrop-glass-regular rounded-2xl bg-alpha-40 p-2 text-popover-foreground shadow-glass-md\"\r\n\t]\r\n});\r\n\r\ntype PopoverContentProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\r\n\t/**\r\n\t * Контейнер для портала. Если не указан, используется хук usePortalContainer\r\n\t * для поиска PortalContainer\r\n\t */\r\n\tportalContainer?: HTMLElement;\r\n};\r\n\r\n/**\r\n * Корневой компонент Popover, который оборачивает всю функциональность всплывающего окна.\r\n * Построен на основе Radix UI Popover primitive.\r\n */\r\nconst Popover = PopoverPrimitive.Root;\r\n\r\n/**\r\n * Элемент-триггер, который открывает всплывающее окно при клике.\r\n */\r\nconst PopoverTrigger = PopoverPrimitive.Trigger;\r\n\r\n/**\r\n * Элемент-якорь, относительно которого позиционируется всплывающее окно.\r\n */\r\nconst PopoverAnchor = PopoverPrimitive.Anchor;\r\n\r\n/**\r\n * Компонент содержимого всплывающего окна.\r\n */\r\nconst PopoverContent = React.forwardRef<React.ElementRef<typeof PopoverPrimitive.Content>, PopoverContentProps>(\r\n\t({ className, align = \"center\", sideOffset = 4, portalContainer, ...props }, ref) => {\r\n\t\tconst { variant } = useComponentVariant();\r\n\t\tconst container = usePortalContainer(portalContainer);\r\n\t\tconst contentClassName = variant === \"glass\" ? glassPopoverStyles({ className }) : popoverStyles({ className });\r\n\t\treturn (\r\n\t\t\t<PopoverPrimitive.Portal container={container}>\r\n\t\t\t\t<PopoverPrimitive.Content\r\n\t\t\t\t\t// Фикс скроллинга внутри Popover когда он находится в Dialog\r\n\t\t\t\t\t// RemoveScroll в Dialog блокирует прокрутку body, но может блокировать и вложенные элементы\r\n\t\t\t\t\t// stopPropagation предотвращает всплытие событий скроллинга к заблокированному body\r\n\t\t\t\t\t// https://github.com/radix-ui/primitives/issues/1159\r\n\t\t\t\t\tonWheel={(e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonTouchMove={(e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tref={ref}\r\n\t\t\t\t\talign={align}\r\n\t\t\t\t\tsideOffset={sideOffset}\r\n\t\t\t\t\tclassName={contentClassName}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t</PopoverPrimitive.Portal>\r\n\t\t);\r\n\t}\r\n);\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\r\n\r\n/**\r\n * Компонент-обертка для использования TriggerButton в качестве триггера поповера\r\n */\r\nconst PopoverTriggerButton = React.forwardRef<\r\n\tReact.ElementRef<typeof PopoverTrigger>,\r\n\tReact.ComponentPropsWithoutRef<typeof PopoverTrigger> & Omit<TriggerButtonProps, \"dataState\">\r\n>(({ children, ...props }, ref) => {\r\n\treturn (\r\n\t\t<PopoverTrigger asChild ref={ref}>\r\n\t\t\t<TriggerButton {...props}>{children}</TriggerButton>\r\n\t\t</PopoverTrigger>\r\n\t);\r\n});\r\n\r\nPopoverTriggerButton.displayName = \"PopoverTriggerButton\";\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverTriggerButton };\r\n"],"names":["POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","jsx","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Anchor2","Trigger","Portal","Content2","POPOVER_ANATOMY","popoverStyles","tv","glassPopoverStyles","PopoverPrimitive.Root","PopoverPrimitive.Trigger","PopoverPrimitive.Anchor","className","align","sideOffset","portalContainer","ref","variant","useComponentVariant","usePortalContainer","contentClassName","PopoverPrimitive.Portal","PopoverPrimitive.Content","e","PopoverTriggerButton","TriggerButton"],"mappings":";;;;;;;;;;;;;;;AAqBA,IAAIA,IAAe,WACf,CAACC,GAAsBC,EAAkB,IAAIC,EAAmBH,GAAc;AAAA,EAChFI;AACF,CAAC,GACGC,IAAiBD,EAAmB,GACpC,CAACE,IAAiBC,CAAiB,IAAIN,EAAqBD,CAAY,GACxEQ,IAAU,CAACC,MAAU;AACvB,QAAM;AAAA,IACJ,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EACZ,IAAMN,GACEO,IAAcX,EAAeK,CAAc,GAC3CO,IAAaC,EAAM,OAAO,IAAI,GAC9B,CAACC,GAAiBC,CAAkB,IAAIF,EAAM,SAAS,EAAK,GAC5D,CAACG,GAA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AAQ;AAC9E,UAAA,EAAE,SAAAC,EAAQ,IAAIC,GAAoB,GAClC9D,IAAY+D,GAAmBJ,CAAe,GAC9CK,IAAmBH,MAAY,UAAUT,GAAmB,EAAE,WAAAI,EAAU,CAAC,IAAIN,GAAc,EAAE,WAAAM,GAAW;AAC9G,WACE,gBAAAlF,EAAA2F,IAAA,EAAwB,WAAAjE,GACxB,UAAA,gBAAA1B;AAAA,MAAC4F;AAAAA,MAAA;AAAA,QAKA,SAAS,CAACC,MAAM;AACf,UAAAA,EAAE,gBAAgB;AAAA,QACnB;AAAA,QACA,aAAa,CAACA,MAAM;AACnB,UAAAA,EAAE,gBAAgB;AAAA,QACnB;AAAA,QACA,KAAAP;AAAA,QACA,OAAAH;AAAA,QACA,YAAAC;AAAA,QACA,WAAWM;AAAA,QACV,GAAGzG;AAAA,MAAA;AAAA,IAAA,GAEN;AAAA,EAAA;AAGH;AACA6C,GAAe,cAAc8D,EAAyB;AAKhD,MAAAE,KAAuBpG,EAAM,WAGjC,CAAC,EAAE,UAAAP,GAAU,GAAGF,EAAM,GAAGqG,MAEzB,gBAAAtF,EAACa,IAAe,EAAA,SAAO,IAAC,KAAAyE,GACvB,4BAACS,IAAe,EAAA,GAAG9G,GAAQ,UAAAE,EAAA,CAAS,EACrC,CAAA,CAED;AAED2G,GAAqB,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BackgroundPatternName } from './patterns';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface BackgroundPatternProps extends React.SVGProps<SVGSVGElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Рисунок тайла.
|
|
6
|
+
* @default "circuitBoard"
|
|
7
|
+
*/
|
|
8
|
+
pattern?: BackgroundPatternName;
|
|
9
|
+
/**
|
|
10
|
+
* Масштаб тайла: 1 — исходный размер рисунка, 0.5 — вдвое мельче, 2 — вдвое крупнее.
|
|
11
|
+
* @default 1
|
|
12
|
+
*/
|
|
13
|
+
scale?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Прозрачность рисунка, 0–1. Влияет только на контуры — подложка (`bg-*`) остаётся непрозрачной.
|
|
16
|
+
*
|
|
17
|
+
* Нужен отдельным пропом, потому что цветовые токены кита объявлены как `hsl(var(--token))`
|
|
18
|
+
* без плейсхолдера `<alpha-value>`, и tailwind-модификатор альфы (`text-primary-fg/10`)
|
|
19
|
+
* с ними молча не работает.
|
|
20
|
+
* @default 0.4
|
|
21
|
+
*/
|
|
22
|
+
patternOpacity?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Слой с повторяющимся фоновым рисунком.
|
|
26
|
+
*
|
|
27
|
+
* Оба цвета задаются классами на самом компоненте: рисунок берётся из `currentColor`
|
|
28
|
+
* (то есть из `text-*`), подложка — из `bg-*`. Благодаря этому фон описывается
|
|
29
|
+
* дизайн-токенами, а не захардкоженными значениями. Прозрачность рисунка — проп
|
|
30
|
+
* `patternOpacity` (модификатор альфы у токенов кита не работает, см. описание пропа).
|
|
31
|
+
*
|
|
32
|
+
* Слой позиционируется абсолютно, поэтому контейнеру нужен `relative`
|
|
33
|
+
* (и `overflow-hidden`, если у контейнера скруглены углы).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <div className="relative overflow-hidden rounded-xl">
|
|
38
|
+
* <BackgroundPattern pattern="circuitBoard" className="bg-secondary-bg text-primary-fg" patternOpacity={0.1} />
|
|
39
|
+
* <div className="relative p-6">Контент поверх фона</div>
|
|
40
|
+
* </div>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const BackgroundPattern: React.ForwardRefExoticComponent<Omit<BackgroundPatternProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BackgroundPattern } from './BackgroundPattern';
|
|
3
|
+
declare const meta: Meta<typeof BackgroundPattern>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AllPatterns: Story;
|
|
8
|
+
/**
|
|
9
|
+
* Оба цвета задаются классами на самом компоненте: рисунок — через `text-*`
|
|
10
|
+
* (компонент рисует его в `currentColor`), подложка — через `bg-*`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Colors: Story;
|
|
13
|
+
/**
|
|
14
|
+
* `scale` меняет размер тайла, не трогая сам рисунок.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Scale: Story;
|
|
17
|
+
/**
|
|
18
|
+
* `patternOpacity` гасит только рисунок — подложка остаётся непрозрачной.
|
|
19
|
+
* Под контентом обычно нужны значения 0.05–0.2.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Opacity: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Типовое применение: фон под контентом. Контейнеру нужен `relative`,
|
|
24
|
+
* контенту — свой слой поверх фона.
|
|
25
|
+
*/
|
|
26
|
+
export declare const AsComponentBackground: Story;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Тайлы фоновых паттернов.
|
|
3
|
+
*
|
|
4
|
+
* Источник рисунков — https://heropatterns.com/ (CC BY 4.0). Оригинал раздаётся как
|
|
5
|
+
* CSS `background-image` с data-URI, где цвет и прозрачность зашиты в саму строку.
|
|
6
|
+
* Здесь пути вынесены в разметку, чтобы красить их через `currentColor` — то есть
|
|
7
|
+
* дизайн-токенами кита, а не хардкодом.
|
|
8
|
+
*
|
|
9
|
+
* Пути приведены к системе координат тайла `0 0 width height`; часть фигур намеренно
|
|
10
|
+
* выходит за его границы — так рисунок стыкуется при замощении.
|
|
11
|
+
*/
|
|
12
|
+
export type BackgroundPatternName = "circuitBoard" | "squares" | "food";
|
|
13
|
+
export interface BackgroundPatternTile {
|
|
14
|
+
/** Ширина тайла в исходных координатах */
|
|
15
|
+
width: number;
|
|
16
|
+
/** Высота тайла в исходных координатах */
|
|
17
|
+
height: number;
|
|
18
|
+
/** Контуры тайла. Заливка не задаётся — приходит из currentColor */
|
|
19
|
+
paths: string[];
|
|
20
|
+
}
|
|
21
|
+
export declare const BACKGROUND_PATTERNS: Record<BackgroundPatternName, BackgroundPatternTile>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsxs as n, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { c as M } from "../cn-dsXlqdJg.js";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
const d = {
|
|
5
|
+
/** Circuit Board — тайл 88×88 */
|
|
6
|
+
circuitBoard: {
|
|
7
|
+
width: 88,
|
|
8
|
+
height: 88,
|
|
9
|
+
paths: [
|
|
10
|
+
"M29.42 29.41c.36-.36.58-.85.58-1.4V0h-4v26H0v4h28c.55 0 1.05-.22 1.41-.58h.01zm0 29.18c.36.36.58.86.58 1.4V88h-4V62H0v-4h28c.56 0 1.05.22 1.41.58zm29.16 0c-.36.36-.58.85-.58 1.4V88h4V62h26v-4H60c-.55 0-1.05.22-1.41.58h-.01zM62 26V0h-4v28c0 .55.22 1.05.58 1.41.37.37.86.59 1.41.59H88v-4H62zM18 36c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm0 16c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm16-26a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 58a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 78a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1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a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm-48 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-48a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm24 32a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-4a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm36-36a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM10 44c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm56 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm8 24c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zM3 68c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm0-48c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm71 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm6 66a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM8 86a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-68A6 6 0 1 1 8 2a6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm36 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
/** Squares — тайл 32×64 */
|
|
14
|
+
squares: {
|
|
15
|
+
width: 32,
|
|
16
|
+
height: 64,
|
|
17
|
+
paths: [
|
|
18
|
+
"M0 28h20V16h-4v8H4V4h28v28h-4V8H8v12h4v-8h12v20H0v-4zm12 8h20v4H16v24H0v-4h12V36zm16 12h-4v12h8v4H20V44h12v12h-4v-8zM0 36h8v20H0v-4h4V40H0v-4z"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
/** I Like Food — тайл 260×260 */
|
|
22
|
+
food: {
|
|
23
|
+
width: 260,
|
|
24
|
+
height: 260,
|
|
25
|
+
paths: [
|
|
26
|
+
"M24.37 16c.2.65.39 1.32.54 2H21.17l1.17 2.34.45.9-.24.11V28a5 5 0 0 1-2.23 8.94l-.02.06a8 8 0 0 1-7.75 6h-20a8 8 0 0 1-7.74-6l-.02-.06A5 5 0 0 1-17.45 28v-6.76l-.79-1.58-.44-.9.9-.44.63-.32H-20a23.01 23.01 0 0 1 44.37-2zm-36.82 2a1 1 0 0 0-.44.1l-3.1 1.56.89 1.79 1.31-.66a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .86.02l2.88-1.27a3 3 0 0 1 2.43 0l2.88 1.27a1 1 0 0 0 .85-.02l3.1-1.55-.89-1.79-1.42.71a3 3 0 0 1-2.56.06l-2.77-1.23a1 1 0 0 0-.4-.09h-.01a1 1 0 0 0-.4.09l-2.78 1.23a3 3 0 0 1-2.56-.06l-2.3-1.15a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1L.9 19.22a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1l-2.21 1.11a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01zm0-2h-4.9a21.01 21.01 0 0 1 39.61 0h-2.09l-.06-.13-.26.13h-32.31zm30.35 7.68l1.36-.68h1.3v2h-36v-1.15l.34-.17 1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0l1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0L2.26 23h2.59l1.36.68a3 3 0 0 0 2.56.06l1.67-.74h3.23l1.67.74a3 3 0 0 0 2.56-.06zM-13.82 27l16.37 4.91L18.93 27h-32.75zm-.63 2h.34l16.66 5 16.67-5h.33a3 3 0 1 1 0 6h-34a3 3 0 1 1 0-6zm1.35 8a6 6 0 0 0 5.65 4h20a6 6 0 0 0 5.66-4H-13.1z",
|
|
27
|
+
"M284.37 16c.2.65.39 1.32.54 2H281.17l1.17 2.34.45.9-.24.11V28a5 5 0 0 1-2.23 8.94l-.02.06a8 8 0 0 1-7.75 6h-20a8 8 0 0 1-7.74-6l-.02-.06a5 5 0 0 1-2.24-8.94v-6.76l-.79-1.58-.44-.9.9-.44.63-.32H240a23.01 23.01 0 0 1 44.37-2zm-36.82 2a1 1 0 0 0-.44.1l-3.1 1.56.89 1.79 1.31-.66a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .86.02l2.88-1.27a3 3 0 0 1 2.43 0l2.88 1.27a1 1 0 0 0 .85-.02l3.1-1.55-.89-1.79-1.42.71a3 3 0 0 1-2.56.06l-2.77-1.23a1 1 0 0 0-.4-.09h-.01a1 1 0 0 0-.4.09l-2.78 1.23a3 3 0 0 1-2.56-.06l-2.3-1.15a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1l-2.21 1.11a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1l-2.21 1.11a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01zm0-2h-4.9a21.01 21.01 0 0 1 39.61 0h-2.09l-.06-.13-.26.13h-32.31zm30.35 7.68l1.36-.68h1.3v2h-36v-1.15l.34-.17 1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0l1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0l1.36-.68h2.59l1.36.68a3 3 0 0 0 2.56.06l1.67-.74h3.23l1.67.74a3 3 0 0 0 2.56-.06zM246.18 27l16.37 4.91L278.93 27h-32.75zm-.63 2h.34l16.66 5 16.67-5h.33a3 3 0 1 1 0 6h-34a3 3 0 1 1 0-6zm1.35 8a6 6 0 0 0 5.65 4h20a6 6 0 0 0 5.66-4H246.9z",
|
|
28
|
+
"M159.5 21.02A9 9 0 0 0 151 15h-42a9 9 0 0 0-8.5 6.02 6 6 0 0 0 .02 11.96A8.99 8.99 0 0 0 109 45h42a9 9 0 0 0 8.48-12.02 6 6 0 0 0 .02-11.96zM151 17h-42a7 7 0 0 0-6.33 4h54.66a7 7 0 0 0-6.33-4zm-9.34 26a8.98 8.98 0 0 0 3.34-7h-2a7 7 0 0 1-7 7h-4.34a8.98 8.98 0 0 0 3.34-7h-2a7 7 0 0 1-7 7h-4.34a8.98 8.98 0 0 0 3.34-7h-2a7 7 0 0 1-7 7h-7a7 7 0 1 1 0-14h42a7 7 0 1 1 0 14h-9.34zM109 27a9 9 0 0 0-7.48 4H101a4 4 0 1 1 0-8h58a4 4 0 0 1 0 8h-.52a9 9 0 0 0-7.48-4h-42z",
|
|
29
|
+
"M39 115a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm6-8a6 6 0 1 1-12 0 6 6 0 0 1 12 0zm-3-29v-2h8v-6H40a4 4 0 0 0-4 4v10H22l-1.33 4-.67 2h2.19L26 130h26l3.81-40H58l-.67-2L56 84H42v-6zm-4-4v10h2V74h8v-2h-8a2 2 0 0 0-2 2zm2 12h14.56l.67 2H22.77l.67-2H40zm13.8 4H24.2l3.62 38h22.36l3.62-38z",
|
|
30
|
+
"M129 92h-6v4h-6v4h-6v14h-3l.24 2 3.76 32h36l3.76-32 .24-2h-3v-14h-6v-4h-6v-4h-8zm18 22v-12h-4v4h3v8h1zm-3 0v-6h-4v6h4zm-6 6v-16h-4v19.17c1.6-.7 2.97-1.8 4-3.17zm-6 3.8V100h-4v23.8a10.04 10.04 0 0 0 4 0zm-6-.63V104h-4v16a10.04 10.04 0 0 0 4 3.17zm-6-9.17v-6h-4v6h4zm-6 0v-8h3v-4h-4v12h1zm27-12v-4h-4v4h3v4h1v-4zm-6 0v-8h-4v4h3v4h1zm-6-4v-4h-4v8h1v-4h3zm-6 4v-4h-4v8h1v-4h3zm7 24a12 12 0 0 0 11.83-10h7.92l-3.53 30h-32.44l-3.53-30h7.92A12 12 0 0 0 130 126z",
|
|
31
|
+
"M212 86v2h-4v-2h4zm4 0h-2v2h2v-2zm-20 0v.1a5 5 0 0 0-.56 9.65l.06.25 1.12 4.48a2 2 0 0 0 1.94 1.52h.01l7.02 24.55a2 2 0 0 0 1.92 1.45h4.98a2 2 0 0 0 1.92-1.45l7.02-24.55a2 2 0 0 0 1.95-1.52L224.5 96l.06-.25a5 5 0 0 0-.56-9.65V86a14 14 0 0 0-28 0zm4 0h6v2h-9a3 3 0 1 0 0 6H223a3 3 0 1 0 0-6H220v-2h2a12 12 0 1 0-24 0h2zm-1.44 14l-1-4h24.88l-1 4h-22.88zm8.95 26l-6.86-24h18.7l-6.86 24h-4.98zM150 242a22 22 0 1 0 0-44 22 22 0 0 0 0 44zm24-22a24 24 0 1 1-48 0 24 24 0 0 1 48 0zm-28.38 17.73l2.04-.87a6 6 0 0 1 4.68 0l2.04.87a2 2 0 0 0 2.5-.82l1.14-1.9a6 6 0 0 1 3.79-2.75l2.15-.5a2 2 0 0 0 1.54-2.12l-.19-2.2a6 6 0 0 1 1.45-4.46l1.45-1.67a2 2 0 0 0 0-2.62l-1.45-1.67a6 6 0 0 1-1.45-4.46l.2-2.2a2 2 0 0 0-1.55-2.13l-2.15-.5a6 6 0 0 1-3.8-2.75l-1.13-1.9a2 2 0 0 0-2.5-.8l-2.04.86a6 6 0 0 1-4.68 0l-2.04-.87a2 2 0 0 0-2.5.82l-1.14 1.9a6 6 0 0 1-3.79 2.75l-2.15.5a2 2 0 0 0-1.54 2.12l.19 2.2a6 6 0 0 1-1.45 4.46l-1.45 1.67a2 2 0 0 0 0 2.62l1.45 1.67a6 6 0 0 1 1.45 4.46l-.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68 1.76-.96 2.68a2 2 0 0 1-.21-3.71c.33.4.73.75 1.17 1.03zm2.32-4.54c-.54.86-1.03 1.76-1.49 2.68a3 3 0 0 1-.07-4.67 3 3 0 0 0 1.56 1.99zm1.14-1.7c.35-.5.72-.98 1.1-1.46a1 1 0 1 0-1.1 1.45zm5.34-5.77c-1.03.86-2 1.79-2.9 2.77a3 3 0 0 0-1.11-.77 3 3 0 0 1 4-2zm42.66 2.77c-.9-.98-1.87-1.9-2.9-2.77a3 3 0 0 1 4.01 2 3 3 0 0 0-1.1.77zm1.34 1.54c.38.48.75.96 1.1 1.45a1 1 0 1 0-1.1-1.45zm3.73 5.84c-.46-.92-.95-1.82-1.5-2.68a3 3 0 0 0 1.57-1.99 3 3 0 0 1-.07 4.67zm1.8 4.53c-.29-.9-.6-1.8-.97-2.67.44-.28.84-.63 1.17-1.03a2 2 0 0 1-.2 3.7zm1.14 5.51c-.14-1.21-.35-2.4-.62-3.57.45-.14.86-.35 1.23-.63a2.99 2.99 0 0 1-.6 4.2zM275 214a29 29 0 0 0-57.97 0h57.96zM72.33 198.12c-.21-.32-.34-.7-.34-1.12v-12h-2v12a4.01 4.01 0 0 0 7.09 2.54c.57-.69.91-1.57.91-2.54v-12h-2v12a1.99 1.99 0 0 1-2 2 2 2 0 0 1-1.66-.88zM75 176c.38 0 .74-.04 1.1-.12a4 4 0 0 0 6.19 2.4A13.94 13.94 0 0 1 84 185v24a6 6 0 0 1-6 6h-3v9a5 5 0 1 1-10 0v-9h-3a6 6 0 0 1-6-6v-24a14 14 0 0 1 14-14 5 5 0 0 0 5 5zm-17 15v12a1.99 1.99 0 0 0 1.22 1.84 2 2 0 0 0 2.44-.72c.21-.32.34-.7.34-1.12v-12h2v12a3.98 3.98 0 0 1-5.35 3.77 3.98 3.98 0 0 1-.65-.3V209a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4v-24c.01-1.53-.23-2.88-.72-4.17-.43.1-.87.16-1.28.17a6 6 0 0 1-5.2-3 7 7 0 0 1-6.47-4.88A12 12 0 0 0 58 185v6zm9 24v9a3 3 0 1 0 6 0v-9h-6z",
|
|
32
|
+
"M-17 191a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm19 9a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1zm-14 5a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm-25 1a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm5 4a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm9 0a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm15 1a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm12-2a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2H4zm-11-14a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm-19 0a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm6 5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm-25 15c0-.47.01-.94.03-1.4a5 5 0 0 1-1.7-8 3.99 3.99 0 0 1 1.88-5.18 5 5 0 0 1 3.4-6.22 3 3 0 0 1 1.46-1.05 5 5 0 0 1 7.76-3.27A30.86 30.86 0 0 1-14 184c6.79 0 13.06 2.18 18.17 5.88a5 5 0 0 1 7.76 3.27 3 3 0 0 1 1.47 1.05 5 5 0 0 1 3.4 6.22 4 4 0 0 1 1.87 5.18 4.98 4.98 0 0 1-1.7 8c.02.46.03.93.03 1.4v1h-62v-1zm.83-7.17a30.9 30.9 0 0 0-.62 3.57 3 3 0 0 1-.61-4.2c.37.28.78.49 1.23.63zm1.49-4.61c-.36.87-.68 1.76-.96 2.68a2 2 0 0 1-.21-3.71c.33.4.73.75 1.17 1.03zm2.32-4.54c-.54.86-1.03 1.76-1.49 2.68a3 3 0 0 1-.07-4.67 3 3 0 0 0 1.56 1.99zm1.14-1.7c.35-.5.72-.98 1.1-1.46a1 1 0 1 0-1.1 1.45zm5.34-5.77c-1.03.86-2 1.79-2.9 2.77a3 3 0 0 0-1.11-.77 3 3 0 0 1 4-2zm42.66 2.77c-.9-.98-1.87-1.9-2.9-2.77a3 3 0 0 1 4.01 2 3 3 0 0 0-1.1.77zm1.34 1.54c.38.48.75.96 1.1 1.45a1 1 0 1 0-1.1-1.45zm3.73 5.84c-.46-.92-.95-1.82-1.5-2.68a3 3 0 0 0 1.57-1.99 3 3 0 0 1-.07 4.67zm1.8 4.53c-.29-.9-.6-1.8-.97-2.67.44-.28.84-.63 1.17-1.03a2 2 0 0 1-.2 3.7zm1.14 5.51c-.14-1.21-.35-2.4-.62-3.57.45-.14.86-.35 1.23-.63a2.99 2.99 0 0 1-.6 4.2zM15 214a29 29 0 0 0-57.97 0h57.96z"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}, o = l.forwardRef(
|
|
36
|
+
({ pattern: v = "circuitBoard", scale: z = 1, patternOpacity: c = 0.4, className: t, ...e }, r) => {
|
|
37
|
+
const m = `background-pattern-${l.useId().replace(/:/g, "")}`, a = d[v];
|
|
38
|
+
return /* @__PURE__ */ n(
|
|
39
|
+
"svg",
|
|
40
|
+
{
|
|
41
|
+
ref: r,
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
focusable: "false",
|
|
44
|
+
"data-slot": "background-pattern",
|
|
45
|
+
className: M("pointer-events-none absolute inset-0 h-full w-full", t),
|
|
46
|
+
...e,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ h("defs", { children: /* @__PURE__ */ h(
|
|
49
|
+
"pattern",
|
|
50
|
+
{
|
|
51
|
+
id: m,
|
|
52
|
+
patternUnits: "userSpaceOnUse",
|
|
53
|
+
width: a.width * z,
|
|
54
|
+
height: a.height * z,
|
|
55
|
+
viewBox: `0 0 ${a.width} ${a.height}`,
|
|
56
|
+
children: /* @__PURE__ */ h("g", { fill: "currentColor", fillOpacity: c, fillRule: "evenodd", children: a.paths.map((i, H) => /* @__PURE__ */ h("path", { d: i }, H)) })
|
|
57
|
+
}
|
|
58
|
+
) }),
|
|
59
|
+
/* @__PURE__ */ h("rect", { width: "100%", height: "100%", fill: `url(#${m})` })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
o.displayName = "BackgroundPattern";
|
|
66
|
+
export {
|
|
67
|
+
d as BACKGROUND_PATTERNS,
|
|
68
|
+
o as BackgroundPattern
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=background-pattern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-pattern.js","sources":["../../src/components/background-pattern/patterns.ts","../../src/components/background-pattern/BackgroundPattern.tsx"],"sourcesContent":["/**\r\n * Тайлы фоновых паттернов.\r\n *\r\n * Источник рисунков — https://heropatterns.com/ (CC BY 4.0). Оригинал раздаётся как\r\n * CSS `background-image` с data-URI, где цвет и прозрачность зашиты в саму строку.\r\n * Здесь пути вынесены в разметку, чтобы красить их через `currentColor` — то есть\r\n * дизайн-токенами кита, а не хардкодом.\r\n *\r\n * Пути приведены к системе координат тайла `0 0 width height`; часть фигур намеренно\r\n * выходит за его границы — так рисунок стыкуется при замощении.\r\n */\r\nexport type BackgroundPatternName = \"circuitBoard\" | \"squares\" | \"food\";\r\n\r\nexport interface BackgroundPatternTile {\r\n\t/** Ширина тайла в исходных координатах */\r\n\twidth: number;\r\n\t/** Высота тайла в исходных координатах */\r\n\theight: number;\r\n\t/** Контуры тайла. Заливка не задаётся — приходит из currentColor */\r\n\tpaths: string[];\r\n}\r\n\r\nexport const BACKGROUND_PATTERNS: Record<BackgroundPatternName, BackgroundPatternTile> = {\r\n\t/** Circuit Board — тайл 88×88 */\r\n\tcircuitBoard: {\r\n\t\twidth: 88,\r\n\t\theight: 88,\r\n\t\tpaths: [\r\n\t\t\t\"M29.42 29.41c.36-.36.58-.85.58-1.4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0 4H5a2 2 0 0 1-2-2zm0-48c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm71 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm6 66a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM8 86a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-68A6 6 0 1 1 8 2a6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm36 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4z\"\r\n\t\t]\r\n\t},\r\n\t/** Squares — тайл 32×64 */\r\n\tsquares: {\r\n\t\twidth: 32,\r\n\t\theight: 64,\r\n\t\tpaths: [\r\n\t\t\t\"M0 28h20V16h-4v8H4V4h28v28h-4V8H8v12h4v-8h12v20H0v-4zm12 8h20v4H16v24H0v-4h12V36zm16 12h-4v12h8v4H20V44h12v12h-4v-8zM0 36h8v20H0v-4h4V40H0v-4z\"\r\n\t\t]\r\n\t},\r\n\t/** I Like Food — тайл 260×260 */\r\n\tfood: {\r\n\t\twidth: 260,\r\n\t\theight: 260,\r\n\t\tpaths: [\r\n\t\t\t\"M24.37 16c.2.65.39 1.32.54 2H21.17l1.17 2.34.45.9-.24.11V28a5 5 0 0 1-2.23 8.94l-.02.06a8 8 0 0 1-7.75 6h-20a8 8 0 0 1-7.74-6l-.02-.06A5 5 0 0 1-17.45 28v-6.76l-.79-1.58-.44-.9.9-.44.63-.32H-20a23.01 23.01 0 0 1 44.37-2zm-36.82 2a1 1 0 0 0-.44.1l-3.1 1.56.89 1.79 1.31-.66a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .86.02l2.88-1.27a3 3 0 0 1 2.43 0l2.88 1.27a1 1 0 0 0 .85-.02l3.1-1.55-.89-1.79-1.42.71a3 3 0 0 1-2.56.06l-2.77-1.23a1 1 0 0 0-.4-.09h-.01a1 1 0 0 0-.4.09l-2.78 1.23a3 3 0 0 1-2.56-.06l-2.3-1.15a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1L.9 19.22a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1l-2.21 1.11a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01zm0-2h-4.9a21.01 21.01 0 0 1 39.61 0h-2.09l-.06-.13-.26.13h-32.31zm30.35 7.68l1.36-.68h1.3v2h-36v-1.15l.34-.17 1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0l1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0L2.26 23h2.59l1.36.68a3 3 0 0 0 2.56.06l1.67-.74h3.23l1.67.74a3 3 0 0 0 2.56-.06zM-13.82 27l16.37 4.91L18.93 27h-32.75zm-.63 2h.34l16.66 5 16.67-5h.33a3 3 0 1 1 0 6h-34a3 3 0 1 1 0-6zm1.35 8a6 6 0 0 0 5.65 4h20a6 6 0 0 0 5.66-4H-13.1z\",\r\n\t\t\t\"M284.37 16c.2.65.39 1.32.54 2H281.17l1.17 2.34.45.9-.24.11V28a5 5 0 0 1-2.23 8.94l-.02.06a8 8 0 0 1-7.75 6h-20a8 8 0 0 1-7.74-6l-.02-.06a5 5 0 0 1-2.24-8.94v-6.76l-.79-1.58-.44-.9.9-.44.63-.32H240a23.01 23.01 0 0 1 44.37-2zm-36.82 2a1 1 0 0 0-.44.1l-3.1 1.56.89 1.79 1.31-.66a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .86.02l2.88-1.27a3 3 0 0 1 2.43 0l2.88 1.27a1 1 0 0 0 .85-.02l3.1-1.55-.89-1.79-1.42.71a3 3 0 0 1-2.56.06l-2.77-1.23a1 1 0 0 0-.4-.09h-.01a1 1 0 0 0-.4.09l-2.78 1.23a3 3 0 0 1-2.56-.06l-2.3-1.15a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1l-2.21 1.11a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1l-2.21 1.11a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01zm0-2h-4.9a21.01 21.01 0 0 1 39.61 0h-2.09l-.06-.13-.26.13h-32.31zm30.35 7.68l1.36-.68h1.3v2h-36v-1.15l.34-.17 1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0l1.36-.68h2.59l1.36.68a3 3 0 0 0 2.69 0l1.36-.68h2.59l1.36.68a3 3 0 0 0 2.56.06l1.67-.74h3.23l1.67.74a3 3 0 0 0 2.56-.06zM246.18 27l16.37 4.91L278.93 27h-32.75zm-.63 2h.34l16.66 5 16.67-5h.33a3 3 0 1 1 0 6h-34a3 3 0 1 1 0-6zm1.35 8a6 6 0 0 0 5.65 4h20a6 6 0 0 0 5.66-4H246.9z\",\r\n\t\t\t\"M159.5 21.02A9 9 0 0 0 151 15h-42a9 9 0 0 0-8.5 6.02 6 6 0 0 0 .02 11.96A8.99 8.99 0 0 0 109 45h42a9 9 0 0 0 8.48-12.02 6 6 0 0 0 .02-11.96zM151 17h-42a7 7 0 0 0-6.33 4h54.66a7 7 0 0 0-6.33-4zm-9.34 26a8.98 8.98 0 0 0 3.34-7h-2a7 7 0 0 1-7 7h-4.34a8.98 8.98 0 0 0 3.34-7h-2a7 7 0 0 1-7 7h-4.34a8.98 8.98 0 0 0 3.34-7h-2a7 7 0 0 1-7 7h-7a7 7 0 1 1 0-14h42a7 7 0 1 1 0 14h-9.34zM109 27a9 9 0 0 0-7.48 4H101a4 4 0 1 1 0-8h58a4 4 0 0 1 0 8h-.52a9 9 0 0 0-7.48-4h-42z\",\r\n\t\t\t\"M39 115a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm6-8a6 6 0 1 1-12 0 6 6 0 0 1 12 0zm-3-29v-2h8v-6H40a4 4 0 0 0-4 4v10H22l-1.33 4-.67 2h2.19L26 130h26l3.81-40H58l-.67-2L56 84H42v-6zm-4-4v10h2V74h8v-2h-8a2 2 0 0 0-2 2zm2 12h14.56l.67 2H22.77l.67-2H40zm13.8 4H24.2l3.62 38h22.36l3.62-38z\",\r\n\t\t\t\"M129 92h-6v4h-6v4h-6v14h-3l.24 2 3.76 32h36l3.76-32 .24-2h-3v-14h-6v-4h-6v-4h-8zm18 22v-12h-4v4h3v8h1zm-3 0v-6h-4v6h4zm-6 6v-16h-4v19.17c1.6-.7 2.97-1.8 4-3.17zm-6 3.8V100h-4v23.8a10.04 10.04 0 0 0 4 0zm-6-.63V104h-4v16a10.04 10.04 0 0 0 4 3.17zm-6-9.17v-6h-4v6h4zm-6 0v-8h3v-4h-4v12h1zm27-12v-4h-4v4h3v4h1v-4zm-6 0v-8h-4v4h3v4h1zm-6-4v-4h-4v8h1v-4h3zm-6 4v-4h-4v8h1v-4h3zm7 24a12 12 0 0 0 11.83-10h7.92l-3.53 30h-32.44l-3.53-30h7.92A12 12 0 0 0 130 126z\",\r\n\t\t\t\"M212 86v2h-4v-2h4zm4 0h-2v2h2v-2zm-20 0v.1a5 5 0 0 0-.56 9.65l.06.25 1.12 4.48a2 2 0 0 0 1.94 1.52h.01l7.02 24.55a2 2 0 0 0 1.92 1.45h4.98a2 2 0 0 0 1.92-1.45l7.02-24.55a2 2 0 0 0 1.95-1.52L224.5 96l.06-.25a5 5 0 0 0-.56-9.65V86a14 14 0 0 0-28 0zm4 0h6v2h-9a3 3 0 1 0 0 6H223a3 3 0 1 0 0-6H220v-2h2a12 12 0 1 0-24 0h2zm-1.44 14l-1-4h24.88l-1 4h-22.88zm8.95 26l-6.86-24h18.7l-6.86 24h-4.98zM150 242a22 22 0 1 0 0-44 22 22 0 0 0 0 44zm24-22a24 24 0 1 1-48 0 24 24 0 0 1 48 0zm-28.38 17.73l2.04-.87a6 6 0 0 1 4.68 0l2.04.87a2 2 0 0 0 2.5-.82l1.14-1.9a6 6 0 0 1 3.79-2.75l2.15-.5a2 2 0 0 0 1.54-2.12l-.19-2.2a6 6 0 0 1 1.45-4.46l1.45-1.67a2 2 0 0 0 0-2.62l-1.45-1.67a6 6 0 0 1-1.45-4.46l.2-2.2a2 2 0 0 0-1.55-2.13l-2.15-.5a6 6 0 0 1-3.8-2.75l-1.13-1.9a2 2 0 0 0-2.5-.8l-2.04.86a6 6 0 0 1-4.68 0l-2.04-.87a2 2 0 0 0-2.5.82l-1.14 1.9a6 6 0 0 1-3.79 2.75l-2.15.5a2 2 0 0 0-1.54 2.12l.19 2.2a6 6 0 0 1-1.45 4.46l-1.45 1.67a2 2 0 0 0 0 2.62l1.45 1.67a6 6 0 0 1 1.45 4.46l-.2 2.2a2 2 0 0 0 1.55 2.13l2.15.5a6 6 0 0 1 3.8 2.75l1.13 1.9a2 2 0 0 0 2.5.8zm2.82.97a4 4 0 0 1 3.12 0l2.04.87a4 4 0 0 0 4.99-1.62l1.14-1.9a4 4 0 0 1 2.53-1.84l2.15-.5a4 4 0 0 0 3.09-4.24l-.2-2.2a4 4 0 0 1 .97-2.98l1.45-1.67a4 4 0 0 0 0-5.24l-1.45-1.67a4 4 0 0 1-.97-2.97l.2-2.2a4 4 0 0 0-3.09-4.25l-2.15-.5a4 4 0 0 1-2.53-1.84l-1.14-1.9a4 4 0 0 0-5-1.62l-2.03.87a4 4 0 0 1-3.12 0l-2.04-.87a4 4 0 0 0-4.99 1.62l-1.14 1.9a4 4 0 0 1-2.53 1.84l-2.15.5a4 4 0 0 0-3.09 4.24l.2 2.2a4 4 0 0 1-.97 2.98l-1.45 1.67a4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 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm12-2a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm-11-14a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm-19 0a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm6 5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm-25 15c0-.47.01-.94.03-1.4a5 5 0 0 1-1.7-8 3.99 3.99 0 0 1 1.88-5.18 5 5 0 0 1 3.4-6.22 3 3 0 0 1 1.46-1.05 5 5 0 0 1 7.76-3.27A30.86 30.86 0 0 1 246 184c6.79 0 13.06 2.18 18.17 5.88a5 5 0 0 1 7.76 3.27 3 3 0 0 1 1.47 1.05 5 5 0 0 1 3.4 6.22 4 4 0 0 1 1.87 5.18 4.98 4.98 0 0 1-1.7 8c.02.46.03.93.03 1.4v1h-62v-1zm.83-7.17a30.9 30.9 0 0 0-.62 3.57 3 3 0 0 1-.61-4.2c.37.28.78.49 1.23.63zm1.49-4.61c-.36.87-.68 1.76-.96 2.68a2 2 0 0 1-.21-3.71c.33.4.73.75 1.17 1.03zm2.32-4.54c-.54.86-1.03 1.76-1.49 2.68a3 3 0 0 1-.07-4.67 3 3 0 0 0 1.56 1.99zm1.14-1.7c.35-.5.72-.98 1.1-1.46a1 1 0 1 0-1.1 1.45zm5.34-5.77c-1.03.86-2 1.79-2.9 2.77a3 3 0 0 0-1.11-.77 3 3 0 0 1 4-2zm42.66 2.77c-.9-.98-1.87-1.9-2.9-2.77a3 3 0 0 1 4.01 2 3 3 0 0 0-1.1.77zm1.34 1.54c.38.48.75.96 1.1 1.45a1 1 0 1 0-1.1-1.45zm3.73 5.84c-.46-.92-.95-1.82-1.5-2.68a3 3 0 0 0 1.57-1.99 3 3 0 0 1-.07 4.67zm1.8 4.53c-.29-.9-.6-1.8-.97-2.67.44-.28.84-.63 1.17-1.03a2 2 0 0 1-.2 3.7zm1.14 5.51c-.14-1.21-.35-2.4-.62-3.57.45-.14.86-.35 1.23-.63a2.99 2.99 0 0 1-.6 4.2zM275 214a29 29 0 0 0-57.97 0h57.96zM72.33 198.12c-.21-.32-.34-.7-.34-1.12v-12h-2v12a4.01 4.01 0 0 0 7.09 2.54c.57-.69.91-1.57.91-2.54v-12h-2v12a1.99 1.99 0 0 1-2 2 2 2 0 0 1-1.66-.88zM75 176c.38 0 .74-.04 1.1-.12a4 4 0 0 0 6.19 2.4A13.94 13.94 0 0 1 84 185v24a6 6 0 0 1-6 6h-3v9a5 5 0 1 1-10 0v-9h-3a6 6 0 0 1-6-6v-24a14 14 0 0 1 14-14 5 5 0 0 0 5 5zm-17 15v12a1.99 1.99 0 0 0 1.22 1.84 2 2 0 0 0 2.44-.72c.21-.32.34-.7.34-1.12v-12h2v12a3.98 3.98 0 0 1-5.35 3.77 3.98 3.98 0 0 1-.65-.3V209a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4v-24c.01-1.53-.23-2.88-.72-4.17-.43.1-.87.16-1.28.17a6 6 0 0 1-5.2-3 7 7 0 0 1-6.47-4.88A12 12 0 0 0 58 185v6zm9 24v9a3 3 0 1 0 6 0v-9h-6z\",\r\n\t\t\t\"M-17 191a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm19 9a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1zm-14 5a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm-25 1a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm5 4a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm9 0a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm15 1a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm12-2a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2H4zm-11-14a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm-19 0a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2h-2zm6 5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2h-2a1 1 0 0 1-1-1zm-25 15c0-.47.01-.94.03-1.4a5 5 0 0 1-1.7-8 3.99 3.99 0 0 1 1.88-5.18 5 5 0 0 1 3.4-6.22 3 3 0 0 1 1.46-1.05 5 5 0 0 1 7.76-3.27A30.86 30.86 0 0 1-14 184c6.79 0 13.06 2.18 18.17 5.88a5 5 0 0 1 7.76 3.27 3 3 0 0 1 1.47 1.05 5 5 0 0 1 3.4 6.22 4 4 0 0 1 1.87 5.18 4.98 4.98 0 0 1-1.7 8c.02.46.03.93.03 1.4v1h-62v-1zm.83-7.17a30.9 30.9 0 0 0-.62 3.57 3 3 0 0 1-.61-4.2c.37.28.78.49 1.23.63zm1.49-4.61c-.36.87-.68 1.76-.96 2.68a2 2 0 0 1-.21-3.71c.33.4.73.75 1.17 1.03zm2.32-4.54c-.54.86-1.03 1.76-1.49 2.68a3 3 0 0 1-.07-4.67 3 3 0 0 0 1.56 1.99zm1.14-1.7c.35-.5.72-.98 1.1-1.46a1 1 0 1 0-1.1 1.45zm5.34-5.77c-1.03.86-2 1.79-2.9 2.77a3 3 0 0 0-1.11-.77 3 3 0 0 1 4-2zm42.66 2.77c-.9-.98-1.87-1.9-2.9-2.77a3 3 0 0 1 4.01 2 3 3 0 0 0-1.1.77zm1.34 1.54c.38.48.75.96 1.1 1.45a1 1 0 1 0-1.1-1.45zm3.73 5.84c-.46-.92-.95-1.82-1.5-2.68a3 3 0 0 0 1.57-1.99 3 3 0 0 1-.07 4.67zm1.8 4.53c-.29-.9-.6-1.8-.97-2.67.44-.28.84-.63 1.17-1.03a2 2 0 0 1-.2 3.7zm1.14 5.51c-.14-1.21-.35-2.4-.62-3.57.45-.14.86-.35 1.23-.63a2.99 2.99 0 0 1-.6 4.2zM15 214a29 29 0 0 0-57.97 0h57.96z\"\r\n\t\t]\r\n\t}\r\n};\r\n","import { cn } from \"@/lib/utils\";\r\nimport * as React from \"react\";\r\nimport { BACKGROUND_PATTERNS, type BackgroundPatternName } from \"./patterns\";\r\n\r\nexport interface BackgroundPatternProps extends React.SVGProps<SVGSVGElement> {\r\n\t/**\r\n\t * Рисунок тайла.\r\n\t * @default \"circuitBoard\"\r\n\t */\r\n\tpattern?: BackgroundPatternName;\r\n\t/**\r\n\t * Масштаб тайла: 1 — исходный размер рисунка, 0.5 — вдвое мельче, 2 — вдвое крупнее.\r\n\t * @default 1\r\n\t */\r\n\tscale?: number;\r\n\t/**\r\n\t * Прозрачность рисунка, 0–1. Влияет только на контуры — подложка (`bg-*`) остаётся непрозрачной.\r\n\t *\r\n\t * Нужен отдельным пропом, потому что цветовые токены кита объявлены как `hsl(var(--token))`\r\n\t * без плейсхолдера `<alpha-value>`, и tailwind-модификатор альфы (`text-primary-fg/10`)\r\n\t * с ними молча не работает.\r\n\t * @default 0.4\r\n\t */\r\n\tpatternOpacity?: number;\r\n}\r\n\r\n/**\r\n * Слой с повторяющимся фоновым рисунком.\r\n *\r\n * Оба цвета задаются классами на самом компоненте: рисунок берётся из `currentColor`\r\n * (то есть из `text-*`), подложка — из `bg-*`. Благодаря этому фон описывается\r\n * дизайн-токенами, а не захардкоженными значениями. Прозрачность рисунка — проп\r\n * `patternOpacity` (модификатор альфы у токенов кита не работает, см. описание пропа).\r\n *\r\n * Слой позиционируется абсолютно, поэтому контейнеру нужен `relative`\r\n * (и `overflow-hidden`, если у контейнера скруглены углы).\r\n *\r\n * @example\r\n * ```tsx\r\n * <div className=\"relative overflow-hidden rounded-xl\">\r\n * <BackgroundPattern pattern=\"circuitBoard\" className=\"bg-secondary-bg text-primary-fg\" patternOpacity={0.1} />\r\n * <div className=\"relative p-6\">Контент поверх фона</div>\r\n * </div>\r\n * ```\r\n */\r\nexport const BackgroundPattern = React.forwardRef<SVGSVGElement, BackgroundPatternProps>(\r\n\t({ pattern = \"circuitBoard\", scale = 1, patternOpacity = 0.4, className, ...props }, ref) => {\r\n\t\t// В id из useId есть двоеточия — в ссылке url(#id) они нежелательны, убираем\r\n\t\tconst patternId = `background-pattern-${React.useId().replace(/:/g, \"\")}`;\r\n\t\tconst tile = BACKGROUND_PATTERNS[pattern];\r\n\r\n\t\treturn (\r\n\t\t\t<svg\r\n\t\t\t\tref={ref}\r\n\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\tfocusable=\"false\"\r\n\t\t\t\tdata-slot=\"background-pattern\"\r\n\t\t\t\tclassName={cn(\"pointer-events-none absolute inset-0 h-full w-full\", className)}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t<defs>\r\n\t\t\t\t\t<pattern\r\n\t\t\t\t\t\tid={patternId}\r\n\t\t\t\t\t\tpatternUnits=\"userSpaceOnUse\"\r\n\t\t\t\t\t\twidth={tile.width * scale}\r\n\t\t\t\t\t\theight={tile.height * scale}\r\n\t\t\t\t\t\tviewBox={`0 0 ${tile.width} ${tile.height}`}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<g fill=\"currentColor\" fillOpacity={patternOpacity} fillRule=\"evenodd\">\r\n\t\t\t\t\t\t\t{tile.paths.map((d, index) => (\r\n\t\t\t\t\t\t\t\t<path key={index} d={d} />\r\n\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t</g>\r\n\t\t\t\t\t</pattern>\r\n\t\t\t\t</defs>\r\n\t\t\t\t<rect width=\"100%\" height=\"100%\" fill={`url(#${patternId})`} />\r\n\t\t\t</svg>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nBackgroundPattern.displayName = \"BackgroundPattern\";\r\n"],"names":["BACKGROUND_PATTERNS","BackgroundPattern","React","pattern","scale","patternOpacity","className","props","ref","patternId","tile","jsxs","cn","jsx","d","index"],"mappings":";;;AAsBO,MAAMA,IAA4E;AAAA;AAAA,EAExF,cAAc;AAAA,IACb,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,MACN;AAAA,IAAA;AAAA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QAAO,QAAO,MAAM,QAAQJ,CAAS,IAAK,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC9D;AAAA,EAAA;AAGH;AAEAR,EAAkB,cAAc;"}
|
|
@@ -4,6 +4,12 @@ declare const meta: Meta<typeof Popover>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Popover>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
type GlassArgs = {
|
|
8
|
+
patternOpacity: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const Glass: StoryObj<{
|
|
11
|
+
render: (args: GlassArgs) => JSX.Element;
|
|
12
|
+
}>;
|
|
7
13
|
type PlaygroundArgs = {
|
|
8
14
|
modal: boolean;
|
|
9
15
|
side: "top" | "right" | "bottom" | "left";
|
|
@@ -4,7 +4,7 @@ import { T as Q } from "../index-BVqs-uqP.js";
|
|
|
4
4
|
import { u as K, S as fe } from "../SearchSelectTag-DFCX9zT1.js";
|
|
5
5
|
import { b as Se, g as re, C as te, c as ne, e as ge, i as ve } from "../Command-ClIm4U7r.js";
|
|
6
6
|
import { I as j } from "../Icon-DH3ev9GK.js";
|
|
7
|
-
import { b as ye, P as _, a as $ } from "../Popover-
|
|
7
|
+
import { b as ye, P as _, a as $ } from "../Popover-CY_d3Ggn.js";
|
|
8
8
|
import { m as Ce, s as be } from "../Select-B2WcoFf5.js";
|
|
9
9
|
import { C as Ne } from "../chevron-down-CAOItu8X.js";
|
|
10
10
|
import { C as ae } from "../check-CeyaOoZv.js";
|
package/dist/styles-scoped.css
CHANGED
|
@@ -1850,6 +1850,9 @@
|
|
|
1850
1850
|
.ui-kit .h-6 {
|
|
1851
1851
|
height: 1.5rem;
|
|
1852
1852
|
}
|
|
1853
|
+
.ui-kit .h-64 {
|
|
1854
|
+
height: 16rem;
|
|
1855
|
+
}
|
|
1853
1856
|
.ui-kit .h-7 {
|
|
1854
1857
|
height: 1.75rem;
|
|
1855
1858
|
}
|
|
@@ -2210,6 +2213,9 @@
|
|
|
2210
2213
|
.ui-kit .w-\[400px\] {
|
|
2211
2214
|
width: 400px;
|
|
2212
2215
|
}
|
|
2216
|
+
.ui-kit .w-\[420px\] {
|
|
2217
|
+
width: 420px;
|
|
2218
|
+
}
|
|
2213
2219
|
.ui-kit .w-\[480px\] {
|
|
2214
2220
|
width: 480px;
|
|
2215
2221
|
}
|
|
@@ -2222,6 +2228,9 @@
|
|
|
2222
2228
|
.ui-kit .w-\[551px\] {
|
|
2223
2229
|
width: 551px;
|
|
2224
2230
|
}
|
|
2231
|
+
.ui-kit .w-\[560px\] {
|
|
2232
|
+
width: 560px;
|
|
2233
|
+
}
|
|
2225
2234
|
.ui-kit .w-\[5px\] {
|
|
2226
2235
|
width: 5px;
|
|
2227
2236
|
}
|
|
@@ -2787,6 +2796,9 @@
|
|
|
2787
2796
|
.ui-kit .rounded-2xl {
|
|
2788
2797
|
border-radius: 1rem;
|
|
2789
2798
|
}
|
|
2799
|
+
.ui-kit .rounded-3xl {
|
|
2800
|
+
border-radius: 1.5rem;
|
|
2801
|
+
}
|
|
2790
2802
|
.ui-kit .rounded-\[inherit\] {
|
|
2791
2803
|
border-radius: inherit;
|
|
2792
2804
|
}
|
|
@@ -3789,6 +3801,9 @@
|
|
|
3789
3801
|
.ui-kit .text-primary-fg {
|
|
3790
3802
|
color: hsl(var(--primary-fg));
|
|
3791
3803
|
}
|
|
3804
|
+
.ui-kit .text-primary-fg\/10 {
|
|
3805
|
+
color: hsl(var(--primary-fg) / 0.1);
|
|
3806
|
+
}
|
|
3792
3807
|
.ui-kit .text-primary-foreground {
|
|
3793
3808
|
color: hsl(var(--primary-foreground));
|
|
3794
3809
|
}
|
package/dist/styles.css
CHANGED
|
@@ -1835,6 +1835,9 @@ body {
|
|
|
1835
1835
|
.h-6 {
|
|
1836
1836
|
height: 1.5rem;
|
|
1837
1837
|
}
|
|
1838
|
+
.h-64 {
|
|
1839
|
+
height: 16rem;
|
|
1840
|
+
}
|
|
1838
1841
|
.h-7 {
|
|
1839
1842
|
height: 1.75rem;
|
|
1840
1843
|
}
|
|
@@ -2195,6 +2198,9 @@ body {
|
|
|
2195
2198
|
.w-\[400px\] {
|
|
2196
2199
|
width: 400px;
|
|
2197
2200
|
}
|
|
2201
|
+
.w-\[420px\] {
|
|
2202
|
+
width: 420px;
|
|
2203
|
+
}
|
|
2198
2204
|
.w-\[480px\] {
|
|
2199
2205
|
width: 480px;
|
|
2200
2206
|
}
|
|
@@ -2207,6 +2213,9 @@ body {
|
|
|
2207
2213
|
.w-\[551px\] {
|
|
2208
2214
|
width: 551px;
|
|
2209
2215
|
}
|
|
2216
|
+
.w-\[560px\] {
|
|
2217
|
+
width: 560px;
|
|
2218
|
+
}
|
|
2210
2219
|
.w-\[5px\] {
|
|
2211
2220
|
width: 5px;
|
|
2212
2221
|
}
|
|
@@ -2772,6 +2781,9 @@ body {
|
|
|
2772
2781
|
.rounded-2xl {
|
|
2773
2782
|
border-radius: 1rem;
|
|
2774
2783
|
}
|
|
2784
|
+
.rounded-3xl {
|
|
2785
|
+
border-radius: 1.5rem;
|
|
2786
|
+
}
|
|
2775
2787
|
.rounded-\[inherit\] {
|
|
2776
2788
|
border-radius: inherit;
|
|
2777
2789
|
}
|
|
@@ -3774,6 +3786,9 @@ body {
|
|
|
3774
3786
|
.text-primary-fg {
|
|
3775
3787
|
color: hsl(var(--primary-fg));
|
|
3776
3788
|
}
|
|
3789
|
+
.text-primary-fg\/10 {
|
|
3790
|
+
color: hsl(var(--primary-fg) / 0.1);
|
|
3791
|
+
}
|
|
3777
3792
|
.text-primary-foreground {
|
|
3778
3793
|
color: hsl(var(--primary-foreground));
|
|
3779
3794
|
}
|
package/package.json
CHANGED
package/dist/Popover-Dvr7y0YY.js
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import * as i from "react";
|
|
3
|
-
import { P as O, c as P, a as z } from "./index-CFaU3UXv.js";
|
|
4
|
-
import { u as _ } from "./index-DLcqcWxM.js";
|
|
5
|
-
import { c as B } from "./index-DFZozV_h.js";
|
|
6
|
-
import { P as G, D as H } from "./index-_ITz1IyW.js";
|
|
7
|
-
import { h as K, R as W, u as j, F as U } from "./index-BzCriPiK.js";
|
|
8
|
-
import { u as V } from "./index-xqkGMOJ8.js";
|
|
9
|
-
import { c as x, R as Z, A as b, C as q, a as J } from "./index-DRo26PBK.js";
|
|
10
|
-
import { P as w } from "./index-BpWB3aFK.js";
|
|
11
|
-
import { u as Q } from "./index-437EL2iq.js";
|
|
12
|
-
import { T as X } from "./index-BVqs-uqP.js";
|
|
13
|
-
import { c as Y } from "./cn-dsXlqdJg.js";
|
|
14
|
-
import { u as oo } from "./usePortalContainer-ae6EzS08.js";
|
|
15
|
-
import { T as eo } from "./TriggerButton-CfDObWP9.js";
|
|
16
|
-
var C = "Popover", [y, Mo] = B(C, [
|
|
17
|
-
x
|
|
18
|
-
]), m = x(), [ro, l] = y(C), E = (o) => {
|
|
19
|
-
const {
|
|
20
|
-
__scopePopover: n,
|
|
21
|
-
children: e,
|
|
22
|
-
open: a,
|
|
23
|
-
defaultOpen: r,
|
|
24
|
-
onOpenChange: t,
|
|
25
|
-
modal: c = !1
|
|
26
|
-
} = o, p = m(n), f = i.useRef(null), [v, g] = i.useState(!1), [h, u] = Q({
|
|
27
|
-
prop: a,
|
|
28
|
-
defaultProp: r ?? !1,
|
|
29
|
-
onChange: t,
|
|
30
|
-
caller: C
|
|
31
|
-
});
|
|
32
|
-
return /* @__PURE__ */ s(Z, { ...p, children: /* @__PURE__ */ s(
|
|
33
|
-
ro,
|
|
34
|
-
{
|
|
35
|
-
scope: n,
|
|
36
|
-
contentId: V(),
|
|
37
|
-
triggerRef: f,
|
|
38
|
-
open: h,
|
|
39
|
-
onOpenChange: u,
|
|
40
|
-
onOpenToggle: i.useCallback(() => u((R) => !R), [u]),
|
|
41
|
-
hasCustomAnchor: v,
|
|
42
|
-
onCustomAnchorAdd: i.useCallback(() => g(!0), []),
|
|
43
|
-
onCustomAnchorRemove: i.useCallback(() => g(!1), []),
|
|
44
|
-
modal: c,
|
|
45
|
-
children: e
|
|
46
|
-
}
|
|
47
|
-
) });
|
|
48
|
-
};
|
|
49
|
-
E.displayName = C;
|
|
50
|
-
var N = "PopoverAnchor", F = i.forwardRef(
|
|
51
|
-
(o, n) => {
|
|
52
|
-
const { __scopePopover: e, ...a } = o, r = l(N, e), t = m(e), { onCustomAnchorAdd: c, onCustomAnchorRemove: p } = r;
|
|
53
|
-
return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(b, { ...t, ...a, ref: n });
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
F.displayName = N;
|
|
57
|
-
var S = "PopoverTrigger", T = i.forwardRef(
|
|
58
|
-
(o, n) => {
|
|
59
|
-
const { __scopePopover: e, ...a } = o, r = l(S, e), t = m(e), c = _(n, r.triggerRef), p = /* @__PURE__ */ s(
|
|
60
|
-
O.button,
|
|
61
|
-
{
|
|
62
|
-
type: "button",
|
|
63
|
-
"aria-haspopup": "dialog",
|
|
64
|
-
"aria-expanded": r.open,
|
|
65
|
-
"aria-controls": r.contentId,
|
|
66
|
-
"data-state": $(r.open),
|
|
67
|
-
...a,
|
|
68
|
-
ref: c,
|
|
69
|
-
onClick: P(o.onClick, r.onOpenToggle)
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
return r.hasCustomAnchor ? p : /* @__PURE__ */ s(b, { asChild: !0, ...t, children: p });
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
T.displayName = S;
|
|
76
|
-
var A = "PopoverPortal", [to, no] = y(A, {
|
|
77
|
-
forceMount: void 0
|
|
78
|
-
}), D = (o) => {
|
|
79
|
-
const { __scopePopover: n, forceMount: e, children: a, container: r } = o, t = l(A, n);
|
|
80
|
-
return /* @__PURE__ */ s(to, { scope: n, forceMount: e, children: /* @__PURE__ */ s(w, { present: e || t.open, children: /* @__PURE__ */ s(G, { asChild: !0, container: r, children: a }) }) });
|
|
81
|
-
};
|
|
82
|
-
D.displayName = A;
|
|
83
|
-
var d = "PopoverContent", M = i.forwardRef(
|
|
84
|
-
(o, n) => {
|
|
85
|
-
const e = no(d, o.__scopePopover), { forceMount: a = e.forceMount, ...r } = o, t = l(d, o.__scopePopover);
|
|
86
|
-
return /* @__PURE__ */ s(w, { present: a || t.open, children: t.modal ? /* @__PURE__ */ s(so, { ...r, ref: n }) : /* @__PURE__ */ s(co, { ...r, ref: n }) });
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
M.displayName = d;
|
|
90
|
-
var ao = z("PopoverContent.RemoveScroll"), so = i.forwardRef(
|
|
91
|
-
(o, n) => {
|
|
92
|
-
const e = l(d, o.__scopePopover), a = i.useRef(null), r = _(n, a), t = i.useRef(!1);
|
|
93
|
-
return i.useEffect(() => {
|
|
94
|
-
const c = a.current;
|
|
95
|
-
if (c) return K(c);
|
|
96
|
-
}, []), /* @__PURE__ */ s(W, { as: ao, allowPinchZoom: !0, children: /* @__PURE__ */ s(
|
|
97
|
-
k,
|
|
98
|
-
{
|
|
99
|
-
...o,
|
|
100
|
-
ref: r,
|
|
101
|
-
trapFocus: e.open,
|
|
102
|
-
disableOutsidePointerEvents: !0,
|
|
103
|
-
onCloseAutoFocus: P(o.onCloseAutoFocus, (c) => {
|
|
104
|
-
c.preventDefault(), t.current || e.triggerRef.current?.focus();
|
|
105
|
-
}),
|
|
106
|
-
onPointerDownOutside: P(
|
|
107
|
-
o.onPointerDownOutside,
|
|
108
|
-
(c) => {
|
|
109
|
-
const p = c.detail.originalEvent, f = p.button === 0 && p.ctrlKey === !0, v = p.button === 2 || f;
|
|
110
|
-
t.current = v;
|
|
111
|
-
},
|
|
112
|
-
{ checkForDefaultPrevented: !1 }
|
|
113
|
-
),
|
|
114
|
-
onFocusOutside: P(
|
|
115
|
-
o.onFocusOutside,
|
|
116
|
-
(c) => c.preventDefault(),
|
|
117
|
-
{ checkForDefaultPrevented: !1 }
|
|
118
|
-
)
|
|
119
|
-
}
|
|
120
|
-
) });
|
|
121
|
-
}
|
|
122
|
-
), co = i.forwardRef(
|
|
123
|
-
(o, n) => {
|
|
124
|
-
const e = l(d, o.__scopePopover), a = i.useRef(!1), r = i.useRef(!1);
|
|
125
|
-
return /* @__PURE__ */ s(
|
|
126
|
-
k,
|
|
127
|
-
{
|
|
128
|
-
...o,
|
|
129
|
-
ref: n,
|
|
130
|
-
trapFocus: !1,
|
|
131
|
-
disableOutsidePointerEvents: !1,
|
|
132
|
-
onCloseAutoFocus: (t) => {
|
|
133
|
-
o.onCloseAutoFocus?.(t), t.defaultPrevented || (a.current || e.triggerRef.current?.focus(), t.preventDefault()), a.current = !1, r.current = !1;
|
|
134
|
-
},
|
|
135
|
-
onInteractOutside: (t) => {
|
|
136
|
-
o.onInteractOutside?.(t), t.defaultPrevented || (a.current = !0, t.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
137
|
-
const c = t.target;
|
|
138
|
-
e.triggerRef.current?.contains(c) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && r.current && t.preventDefault();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
), k = i.forwardRef(
|
|
144
|
-
(o, n) => {
|
|
145
|
-
const {
|
|
146
|
-
__scopePopover: e,
|
|
147
|
-
trapFocus: a,
|
|
148
|
-
onOpenAutoFocus: r,
|
|
149
|
-
onCloseAutoFocus: t,
|
|
150
|
-
disableOutsidePointerEvents: c,
|
|
151
|
-
onEscapeKeyDown: p,
|
|
152
|
-
onPointerDownOutside: f,
|
|
153
|
-
onFocusOutside: v,
|
|
154
|
-
onInteractOutside: g,
|
|
155
|
-
...h
|
|
156
|
-
} = o, u = l(d, e), R = m(e);
|
|
157
|
-
return j(), /* @__PURE__ */ s(
|
|
158
|
-
U,
|
|
159
|
-
{
|
|
160
|
-
asChild: !0,
|
|
161
|
-
loop: !0,
|
|
162
|
-
trapped: a,
|
|
163
|
-
onMountAutoFocus: r,
|
|
164
|
-
onUnmountAutoFocus: t,
|
|
165
|
-
children: /* @__PURE__ */ s(
|
|
166
|
-
H,
|
|
167
|
-
{
|
|
168
|
-
asChild: !0,
|
|
169
|
-
disableOutsidePointerEvents: c,
|
|
170
|
-
onInteractOutside: g,
|
|
171
|
-
onEscapeKeyDown: p,
|
|
172
|
-
onPointerDownOutside: f,
|
|
173
|
-
onFocusOutside: v,
|
|
174
|
-
onDismiss: () => u.onOpenChange(!1),
|
|
175
|
-
children: /* @__PURE__ */ s(
|
|
176
|
-
q,
|
|
177
|
-
{
|
|
178
|
-
"data-state": $(u.open),
|
|
179
|
-
role: "dialog",
|
|
180
|
-
id: u.contentId,
|
|
181
|
-
...R,
|
|
182
|
-
...h,
|
|
183
|
-
ref: n,
|
|
184
|
-
style: {
|
|
185
|
-
...h.style,
|
|
186
|
-
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
187
|
-
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
188
|
-
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
189
|
-
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
190
|
-
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
)
|
|
194
|
-
}
|
|
195
|
-
)
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
), I = "PopoverClose", io = i.forwardRef(
|
|
200
|
-
(o, n) => {
|
|
201
|
-
const { __scopePopover: e, ...a } = o, r = l(I, e);
|
|
202
|
-
return /* @__PURE__ */ s(
|
|
203
|
-
O.button,
|
|
204
|
-
{
|
|
205
|
-
type: "button",
|
|
206
|
-
...a,
|
|
207
|
-
ref: n,
|
|
208
|
-
onClick: P(o.onClick, () => r.onOpenChange(!1))
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
);
|
|
213
|
-
io.displayName = I;
|
|
214
|
-
var po = "PopoverArrow", lo = i.forwardRef(
|
|
215
|
-
(o, n) => {
|
|
216
|
-
const { __scopePopover: e, ...a } = o, r = m(e);
|
|
217
|
-
return /* @__PURE__ */ s(J, { ...r, ...a, ref: n });
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
lo.displayName = po;
|
|
221
|
-
function $(o) {
|
|
222
|
-
return o ? "open" : "closed";
|
|
223
|
-
}
|
|
224
|
-
var uo = E, fo = F, vo = T, Po = D, L = M;
|
|
225
|
-
const mo = X({
|
|
226
|
-
base: "z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-lg border border-secondary-border bg-secondary-bg p-4 text-popover-foreground shadow-soft-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
227
|
-
}), ko = uo, go = vo, Io = fo, ho = i.forwardRef(
|
|
228
|
-
({ className: o, align: n = "center", sideOffset: e = 4, portalContainer: a, ...r }, t) => {
|
|
229
|
-
const c = oo(a);
|
|
230
|
-
return /* @__PURE__ */ s(Po, { container: c, children: /* @__PURE__ */ s(
|
|
231
|
-
L,
|
|
232
|
-
{
|
|
233
|
-
onWheel: (p) => {
|
|
234
|
-
p.stopPropagation();
|
|
235
|
-
},
|
|
236
|
-
onTouchMove: (p) => {
|
|
237
|
-
p.stopPropagation();
|
|
238
|
-
},
|
|
239
|
-
ref: t,
|
|
240
|
-
align: n,
|
|
241
|
-
sideOffset: e,
|
|
242
|
-
className: Y(mo(), o),
|
|
243
|
-
...r
|
|
244
|
-
}
|
|
245
|
-
) });
|
|
246
|
-
}
|
|
247
|
-
);
|
|
248
|
-
ho.displayName = L.displayName;
|
|
249
|
-
const Co = i.forwardRef(({ children: o, ...n }, e) => /* @__PURE__ */ s(go, { asChild: !0, ref: e, children: /* @__PURE__ */ s(eo, { ...n, children: o }) }));
|
|
250
|
-
Co.displayName = "PopoverTriggerButton";
|
|
251
|
-
export {
|
|
252
|
-
ko as P,
|
|
253
|
-
go as a,
|
|
254
|
-
ho as b,
|
|
255
|
-
Io as c,
|
|
256
|
-
Co as d
|
|
257
|
-
};
|
|
258
|
-
//# sourceMappingURL=Popover-Dvr7y0YY.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Popover-Dvr7y0YY.js","sources":["../node_modules/.pnpm/@radix-ui+react-popover@1.1_3205396e68ca917639ebdf7a5c8fe165/node_modules/@radix-ui/react-popover/dist/index.mjs","../src/components/popover/Popover.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\r\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { cn } from \"@/lib/utils\";\r\nimport { usePortalContainer } from \"../portal-container\";\r\nimport { TriggerButton } from \"../button\";\r\nimport { TriggerButtonProps } from \"../button/trigger-button/TriggerButton\";\r\n\r\nconst popoverStyles = tv({\r\n\tbase: \"z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-lg border border-secondary-border bg-secondary-bg p-4 text-popover-foreground shadow-soft-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\r\n});\r\n\r\ntype PopoverContentProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\r\n\t/**\r\n\t * Контейнер для портала. Если не указан, используется хук usePortalContainer\r\n\t * для поиска PortalContainer\r\n\t */\r\n\tportalContainer?: HTMLElement;\r\n};\r\n\r\n/**\r\n * Корневой компонент Popover, который оборачивает всю функциональность всплывающего окна.\r\n * Построен на основе Radix UI Popover primitive.\r\n */\r\nconst Popover = PopoverPrimitive.Root;\r\n\r\n/**\r\n * Элемент-триггер, который открывает всплывающее окно при клике.\r\n */\r\nconst PopoverTrigger = PopoverPrimitive.Trigger;\r\n\r\n/**\r\n * Элемент-якорь, относительно которого позиционируется всплывающее окно.\r\n */\r\nconst PopoverAnchor = PopoverPrimitive.Anchor;\r\n\r\n/**\r\n * Компонент содержимого всплывающего окна.\r\n */\r\nconst PopoverContent = React.forwardRef<React.ElementRef<typeof PopoverPrimitive.Content>, PopoverContentProps>(\r\n\t({ className, align = \"center\", sideOffset = 4, portalContainer, ...props }, ref) => {\r\n\t\tconst container = usePortalContainer(portalContainer);\r\n\t\treturn (\r\n\t\t\t<PopoverPrimitive.Portal container={container}>\r\n\t\t\t\t<PopoverPrimitive.Content\r\n\t\t\t\t\t// Фикс скроллинга внутри Popover когда он находится в Dialog\r\n\t\t\t\t\t// RemoveScroll в Dialog блокирует прокрутку body, но может блокировать и вложенные элементы\r\n\t\t\t\t\t// stopPropagation предотвращает всплытие событий скроллинга к заблокированному body\r\n\t\t\t\t\t// https://github.com/radix-ui/primitives/issues/1159\r\n\t\t\t\t\tonWheel={(e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonTouchMove={(e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tref={ref}\r\n\t\t\t\t\talign={align}\r\n\t\t\t\t\tsideOffset={sideOffset}\r\n\t\t\t\t\tclassName={cn(popoverStyles(), className)}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t</PopoverPrimitive.Portal>\r\n\t\t);\r\n\t}\r\n);\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\r\n\r\n/**\r\n * Компонент-обертка для использования TriggerButton в качестве триггера поповера\r\n */\r\nconst PopoverTriggerButton = React.forwardRef<\r\n\tReact.ElementRef<typeof PopoverTrigger>,\r\n\tReact.ComponentPropsWithoutRef<typeof PopoverTrigger> & Omit<TriggerButtonProps, \"dataState\">\r\n>(({ children, ...props }, ref) => {\r\n\treturn (\r\n\t\t<PopoverTrigger asChild ref={ref}>\r\n\t\t\t<TriggerButton {...props}>{children}</TriggerButton>\r\n\t\t</PopoverTrigger>\r\n\t);\r\n});\r\n\r\nPopoverTriggerButton.displayName = \"PopoverTriggerButton\";\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverTriggerButton };\r\n"],"names":["POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","jsx","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Anchor2","Trigger","Portal","Content2","popoverStyles","tv","PopoverPrimitive.Root","PopoverPrimitive.Trigger","PopoverPrimitive.Anchor","className","align","sideOffset","portalContainer","ref","usePortalContainer","PopoverPrimitive.Portal","PopoverPrimitive.Content","e","cn","PopoverTriggerButton","TriggerButton"],"mappings":";;;;;;;;;;;;;;;AAqBA,IAAIA,IAAe,WACf,CAACC,GAAsBC,EAAkB,IAAIC,EAAmBH,GAAc;AAAA,EAChFI;AACF,CAAC,GACGC,IAAiBD,EAAmB,GACpC,CAACE,IAAiBC,CAAiB,IAAIN,EAAqBD,CAAY,GACxEQ,IAAU,CAACC,MAAU;AACvB,QAAM;AAAA,IACJ,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EACZ,IAAMN,GACEO,IAAcX,EAAeK,CAAc,GAC3CO,IAAaC,EAAM,OAAO,IAAI,GAC9B,CAACC,GAAiBC,CAAkB,IAAIF,EAAM,SAAS,EAAK,GAC5D,CAACG,GAAMC,CAAO,IAAIC,EAAqB;AAAA,IAC3C,MAAMX;AAAA,IACN,aAAaC,KAAe;AAAA,IAC5B,UAAUC;AAAA,IACV,QAAQd;AAAA,EACZ,CAAG;AACD,SAAuB,gBAAAwB,EAAIC,GAAsB,EAAE,GAAGT,GAAa,UAA0B,gBAAAQ;AAAA,IAC3FlB;AAAA,IACA;AAAA,MACE,OAAOI;AAAA,MACP,WAAWgB,EAAO;AAAA,MAClB,YAAAT;AAAA,MACA,MAAAI;AAAA,MACA,cAAcC;AAAA,MACd,cAAcJ,EAAM,YAAY,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