@salesmind-ai/design-system 0.3.0 → 0.3.2
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/README.md +32 -2
- package/dist/admin/index.cjs +68 -2928
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.js +5 -2915
- package/dist/admin/index.js.map +1 -1
- package/dist/blog/index.cjs +53 -1064
- package/dist/blog/index.cjs.map +1 -1
- package/dist/blog/index.js +8 -1054
- package/dist/blog/index.js.map +1 -1
- package/dist/charts/index.cjs +46 -2694
- package/dist/charts/index.cjs.map +1 -1
- package/dist/charts/index.js +3 -2680
- package/dist/charts/index.js.map +1 -1
- package/dist/chunk-2GARWEJK.js +17 -0
- package/dist/chunk-2GARWEJK.js.map +1 -0
- package/dist/chunk-3NKRFUAR.js +37 -0
- package/dist/chunk-3NKRFUAR.js.map +1 -0
- package/dist/chunk-3TGSIILM.cjs +201 -0
- package/dist/chunk-3TGSIILM.cjs.map +1 -0
- package/dist/chunk-4GM5BGBN.cjs +801 -0
- package/dist/chunk-4GM5BGBN.cjs.map +1 -0
- package/dist/chunk-5LGDEZWY.cjs +2434 -0
- package/dist/chunk-5LGDEZWY.cjs.map +1 -0
- package/dist/chunk-6H4DSTXR.js +786 -0
- package/dist/chunk-6H4DSTXR.js.map +1 -0
- package/dist/chunk-6UNG76Y2.js +153 -0
- package/dist/chunk-6UNG76Y2.js.map +1 -0
- package/dist/chunk-7PX2AZ6Y.js +39 -0
- package/dist/chunk-7PX2AZ6Y.js.map +1 -0
- package/dist/chunk-B6AVAX4F.js +1415 -0
- package/dist/chunk-B6AVAX4F.js.map +1 -0
- package/dist/chunk-BILT5KD3.js +264 -0
- package/dist/chunk-BILT5KD3.js.map +1 -0
- package/dist/chunk-C2BCDNAV.js +24 -0
- package/dist/chunk-C2BCDNAV.js.map +1 -0
- package/dist/chunk-CH42VPWE.cjs +421 -0
- package/dist/chunk-CH42VPWE.cjs.map +1 -0
- package/dist/chunk-CJ2MKVAF.cjs +46 -0
- package/dist/chunk-CJ2MKVAF.cjs.map +1 -0
- package/dist/chunk-DP74LUXG.cjs +98 -0
- package/dist/chunk-DP74LUXG.cjs.map +1 -0
- package/dist/chunk-E7D6EKJ4.cjs +44 -0
- package/dist/chunk-E7D6EKJ4.cjs.map +1 -0
- package/dist/chunk-ECXBTUH6.cjs +584 -0
- package/dist/chunk-ECXBTUH6.cjs.map +1 -0
- package/dist/chunk-EFRAP5ES.js +157 -0
- package/dist/chunk-EFRAP5ES.js.map +1 -0
- package/dist/chunk-F6YYWMME.js +485 -0
- package/dist/chunk-F6YYWMME.js.map +1 -0
- package/dist/chunk-FAFAP4L5.js +183 -0
- package/dist/chunk-FAFAP4L5.js.map +1 -0
- package/dist/chunk-GUZIMHWS.js +1608 -0
- package/dist/chunk-GUZIMHWS.js.map +1 -0
- package/dist/chunk-H2Y6BSTL.cjs +69 -0
- package/dist/chunk-H2Y6BSTL.cjs.map +1 -0
- package/dist/chunk-HN4PHABT.js +126 -0
- package/dist/chunk-HN4PHABT.js.map +1 -0
- package/dist/chunk-HRENHNDJ.js +211 -0
- package/dist/chunk-HRENHNDJ.js.map +1 -0
- package/dist/chunk-I75BFEYT.cjs +2561 -0
- package/dist/chunk-I75BFEYT.cjs.map +1 -0
- package/dist/chunk-IFRATNLU.js +562 -0
- package/dist/chunk-IFRATNLU.js.map +1 -0
- package/dist/chunk-IYPXJ6YC.cjs +69 -0
- package/dist/chunk-IYPXJ6YC.cjs.map +1 -0
- package/dist/chunk-JPJN4YBC.js +409 -0
- package/dist/chunk-JPJN4YBC.js.map +1 -0
- package/dist/chunk-KBA2LFBG.js +62 -0
- package/dist/chunk-KBA2LFBG.js.map +1 -0
- package/dist/chunk-KCKUSU2M.cjs +166 -0
- package/dist/chunk-KCKUSU2M.cjs.map +1 -0
- package/dist/chunk-KJ2OXQF4.js +287 -0
- package/dist/chunk-KJ2OXQF4.js.map +1 -0
- package/dist/chunk-KNQEIU7O.cjs +1202 -0
- package/dist/chunk-KNQEIU7O.cjs.map +1 -0
- package/dist/chunk-KVGSVGRK.cjs +569 -0
- package/dist/chunk-KVGSVGRK.cjs.map +1 -0
- package/dist/chunk-L352JRV6.cjs +105 -0
- package/dist/chunk-L352JRV6.cjs.map +1 -0
- package/dist/chunk-LJADZITX.cjs +298 -0
- package/dist/chunk-LJADZITX.cjs.map +1 -0
- package/dist/chunk-LMJPWXTZ.cjs +194 -0
- package/dist/chunk-LMJPWXTZ.cjs.map +1 -0
- package/dist/chunk-LOWEAQST.js +701 -0
- package/dist/chunk-LOWEAQST.js.map +1 -0
- package/dist/chunk-MDB2WCRQ.cjs +137 -0
- package/dist/chunk-MDB2WCRQ.cjs.map +1 -0
- package/dist/chunk-MQDEE7HC.cjs +283 -0
- package/dist/chunk-MQDEE7HC.cjs.map +1 -0
- package/dist/chunk-MQRB634A.cjs +34 -0
- package/dist/chunk-MQRB634A.cjs.map +1 -0
- package/dist/chunk-MTI27RDV.js +185 -0
- package/dist/chunk-MTI27RDV.js.map +1 -0
- package/dist/chunk-MU6GW5ZV.js +2317 -0
- package/dist/chunk-MU6GW5ZV.js.map +1 -0
- package/dist/chunk-NN3TUHIH.js +28 -0
- package/dist/chunk-NN3TUHIH.js.map +1 -0
- package/dist/chunk-NT4LBP7D.cjs +111 -0
- package/dist/chunk-NT4LBP7D.cjs.map +1 -0
- package/dist/chunk-OLV7OD3X.cjs +502 -0
- package/dist/chunk-OLV7OD3X.cjs.map +1 -0
- package/dist/chunk-OXNXEQY7.js +2538 -0
- package/dist/chunk-OXNXEQY7.js.map +1 -0
- package/dist/chunk-P5BOFE5A.js +546 -0
- package/dist/chunk-P5BOFE5A.js.map +1 -0
- package/dist/chunk-Q2MFGYTE.cjs +1449 -0
- package/dist/chunk-Q2MFGYTE.cjs.map +1 -0
- package/dist/chunk-Q75DBVDY.cjs +68 -0
- package/dist/chunk-Q75DBVDY.cjs.map +1 -0
- package/dist/chunk-REQ5Q6ZI.js +1022 -0
- package/dist/chunk-REQ5Q6ZI.js.map +1 -0
- package/dist/chunk-SICKWUWB.js +62 -0
- package/dist/chunk-SICKWUWB.js.map +1 -0
- package/dist/chunk-T343CCH5.js +1190 -0
- package/dist/chunk-T343CCH5.js.map +1 -0
- package/dist/chunk-TEC62D4A.cjs +1624 -0
- package/dist/chunk-TEC62D4A.cjs.map +1 -0
- package/dist/chunk-TW5JB35D.js +2122 -0
- package/dist/chunk-TW5JB35D.js.map +1 -0
- package/dist/chunk-VC5LMUVQ.cjs +20 -0
- package/dist/chunk-VC5LMUVQ.cjs.map +1 -0
- package/dist/chunk-VM7WFMKI.cjs +76 -0
- package/dist/chunk-VM7WFMKI.cjs.map +1 -0
- package/dist/chunk-W2WTP6HS.cjs +233 -0
- package/dist/chunk-W2WTP6HS.cjs.map +1 -0
- package/dist/chunk-WH7PYHZY.cjs +35 -0
- package/dist/chunk-WH7PYHZY.cjs.map +1 -0
- package/dist/chunk-XQZVY7JJ.cjs +717 -0
- package/dist/chunk-XQZVY7JJ.cjs.map +1 -0
- package/dist/chunk-XU3OMQ7V.js +98 -0
- package/dist/chunk-XU3OMQ7V.js.map +1 -0
- package/dist/chunk-XWPDRMZG.js +62 -0
- package/dist/chunk-XWPDRMZG.js.map +1 -0
- package/dist/chunk-Y3CPKNB7.js +67 -0
- package/dist/chunk-Y3CPKNB7.js.map +1 -0
- package/dist/chunk-YNVRDD2P.js +98 -0
- package/dist/chunk-YNVRDD2P.js.map +1 -0
- package/dist/chunk-YSYR54XR.js +92 -0
- package/dist/chunk-YSYR54XR.js.map +1 -0
- package/dist/chunk-YTYDQBVY.cjs +162 -0
- package/dist/chunk-YTYDQBVY.cjs.map +1 -0
- package/dist/chunk-ZDLOA2UT.cjs +1042 -0
- package/dist/chunk-ZDLOA2UT.cjs.map +1 -0
- package/dist/chunk-ZWUKRCOJ.cjs +2162 -0
- package/dist/chunk-ZWUKRCOJ.cjs.map +1 -0
- package/dist/core/index.cjs +807 -4333
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +14 -4130
- package/dist/core/index.js.map +1 -1
- package/dist/i18n/index.cjs +86 -558
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.js +1 -544
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.cjs +1432 -17139
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +11 -7
- package/dist/index.css.map +1 -1
- package/dist/index.js +31 -16784
- package/dist/index.js.map +1 -1
- package/dist/marketing/index.cjs +142 -3072
- package/dist/marketing/index.cjs.map +1 -1
- package/dist/marketing/index.js +11 -3042
- package/dist/marketing/index.js.map +1 -1
- package/dist/motion/index.cjs +26 -1222
- package/dist/motion/index.cjs.map +1 -1
- package/dist/motion/index.js +2 -1215
- package/dist/motion/index.js.map +1 -1
- package/dist/nav/index.cjs +101 -1518
- package/dist/nav/index.cjs.map +1 -1
- package/dist/nav/index.js +4 -1498
- package/dist/nav/index.js.map +1 -1
- package/dist/report/index.cjs +171 -2403
- package/dist/report/index.cjs.map +1 -1
- package/dist/report/index.js +3 -2363
- package/dist/report/index.js.map +1 -1
- package/dist/sections/index.cjs +28 -378
- package/dist/sections/index.cjs.map +1 -1
- package/dist/sections/index.css +1 -4
- package/dist/sections/index.css.map +1 -1
- package/dist/sections/index.js +4 -372
- package/dist/sections/index.js.map +1 -1
- package/dist/social-proof/index.cjs +53 -1249
- package/dist/social-proof/index.cjs.map +1 -1
- package/dist/social-proof/index.css +10 -3
- package/dist/social-proof/index.css.map +1 -1
- package/dist/social-proof/index.js +6 -1234
- package/dist/social-proof/index.js.map +1 -1
- package/dist/theme/index.cjs +38 -565
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.js +2 -555
- package/dist/theme/index.js.map +1 -1
- package/dist/web/client/index.cjs +48 -0
- package/dist/web/client/index.cjs.map +1 -0
- package/dist/web/client/index.css +456 -0
- package/dist/web/client/index.css.map +1 -0
- package/dist/web/client/index.d.cts +172 -0
- package/dist/web/client/index.d.ts +172 -0
- package/dist/web/client/index.js +7 -0
- package/dist/web/client/index.js.map +1 -0
- package/dist/web/index.cjs +158 -1346
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +5 -893
- package/dist/web/index.d.ts +5 -893
- package/dist/web/index.js +9 -1305
- package/dist/web/index.js.map +1 -1
- package/dist/web/server/index.cjs +32 -0
- package/dist/web/server/index.cjs.map +1 -0
- package/dist/web/server/index.d.cts +725 -0
- package/dist/web/server/index.d.ts +725 -0
- package/dist/web/server/index.js +3 -0
- package/dist/web/server/index.js.map +1 -0
- package/package.json +14 -1
package/dist/core/index.js
CHANGED
|
@@ -1,4132 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export { FormattedDate, FormattedMessage, FormattedNumber, defineMessages } from 'react-intl';
|
|
16
|
-
|
|
17
|
-
// src/tokens/motion.ts
|
|
18
|
-
var DURATION = {
|
|
19
|
-
micro: 0.15,
|
|
20
|
-
// 150ms
|
|
21
|
-
short: 0.25,
|
|
22
|
-
// 250ms
|
|
23
|
-
medium: 0.5,
|
|
24
|
-
// 500ms
|
|
25
|
-
long: 1
|
|
26
|
-
// 1000ms
|
|
27
|
-
};
|
|
28
|
-
var EASING = {
|
|
29
|
-
standard: [0.16, 1, 0.3, 1],
|
|
30
|
-
// Smooth, premium feel
|
|
31
|
-
emphasis: [0.34, 1.56, 0.64, 1],
|
|
32
|
-
// Slight spring/overshoot
|
|
33
|
-
exit: [0.4, 0, 0.2, 1],
|
|
34
|
-
// Quick, decisive exit
|
|
35
|
-
linear: [0, 0, 1, 1]
|
|
36
|
-
};
|
|
37
|
-
var TRANSITION = {
|
|
38
|
-
standard: {
|
|
39
|
-
duration: DURATION.medium,
|
|
40
|
-
ease: EASING.standard
|
|
41
|
-
},
|
|
42
|
-
emphasis: {
|
|
43
|
-
duration: DURATION.medium,
|
|
44
|
-
ease: EASING.emphasis
|
|
45
|
-
},
|
|
46
|
-
quick: {
|
|
47
|
-
duration: DURATION.short,
|
|
48
|
-
ease: EASING.standard
|
|
49
|
-
},
|
|
50
|
-
spring: {
|
|
51
|
-
type: "spring",
|
|
52
|
-
stiffness: 200,
|
|
53
|
-
damping: 20
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
var VARIANTS = {
|
|
57
|
-
fadeIn: {
|
|
58
|
-
hidden: { opacity: 0 },
|
|
59
|
-
visible: { opacity: 1, transition: { duration: DURATION.medium, ease: EASING.standard } }
|
|
60
|
-
},
|
|
61
|
-
fadeUp: {
|
|
62
|
-
hidden: { opacity: 0, y: 12 },
|
|
63
|
-
visible: { opacity: 1, y: 0, transition: { duration: DURATION.medium, ease: EASING.standard } }
|
|
64
|
-
},
|
|
65
|
-
scaleIn: {
|
|
66
|
-
hidden: { opacity: 0, scale: 0.95 },
|
|
67
|
-
visible: {
|
|
68
|
-
opacity: 1,
|
|
69
|
-
scale: 1,
|
|
70
|
-
transition: { duration: DURATION.short, ease: EASING.emphasis }
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
staggerContainer: {
|
|
74
|
-
hidden: { opacity: 0 },
|
|
75
|
-
visible: {
|
|
76
|
-
opacity: 1,
|
|
77
|
-
transition: {
|
|
78
|
-
staggerChildren: 0.08,
|
|
79
|
-
delayChildren: 0.1
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
pulse: {
|
|
84
|
-
hidden: { scale: 1 },
|
|
85
|
-
visible: {
|
|
86
|
-
scale: [1, 1.05, 1],
|
|
87
|
-
transition: { duration: 1.5, repeat: Infinity, ease: "easeInOut" }
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
impact: {
|
|
91
|
-
hidden: { scale: 1 },
|
|
92
|
-
trigger: {
|
|
93
|
-
scale: [1, 0.95, 1.05, 1],
|
|
94
|
-
transition: { duration: 0.4, ease: "backOut" }
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
var DISTANCE = {
|
|
99
|
-
sm: 4,
|
|
100
|
-
md: 12,
|
|
101
|
-
lg: 24,
|
|
102
|
-
xl: 48
|
|
103
|
-
};
|
|
104
|
-
var MOTION = {
|
|
105
|
-
DURATION,
|
|
106
|
-
EASING,
|
|
107
|
-
TRANSITION,
|
|
108
|
-
VARIANTS,
|
|
109
|
-
DISTANCE
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
// src/tokens/colors.ts
|
|
113
|
-
var COLORS = {
|
|
114
|
-
text: {
|
|
115
|
-
primary: "var(--text-primary)",
|
|
116
|
-
secondary: "var(--text-secondary)",
|
|
117
|
-
tertiary: "var(--text-tertiary)",
|
|
118
|
-
disabled: "var(--text-disabled)"
|
|
119
|
-
},
|
|
120
|
-
glass: {
|
|
121
|
-
base: "var(--glass-base)",
|
|
122
|
-
baseHover: "var(--glass-base-hover)",
|
|
123
|
-
baseActive: "var(--glass-base-active)",
|
|
124
|
-
backdrop: "var(--glass-backdrop)"
|
|
125
|
-
},
|
|
126
|
-
rim: {
|
|
127
|
-
top: "var(--rim-light-top)",
|
|
128
|
-
bottom: "var(--rim-light-bottom)"
|
|
129
|
-
},
|
|
130
|
-
brand: {
|
|
131
|
-
pink: "var(--brand-pink)",
|
|
132
|
-
yellow: "var(--brand-yellow)",
|
|
133
|
-
pinkGlow: "var(--brand-pink-glow)"
|
|
134
|
-
},
|
|
135
|
-
status: {
|
|
136
|
-
success: "var(--status-success)",
|
|
137
|
-
warning: "var(--status-warning)",
|
|
138
|
-
error: "var(--status-error)",
|
|
139
|
-
info: "var(--status-info)"
|
|
140
|
-
},
|
|
141
|
-
button: {
|
|
142
|
-
primaryBg: "var(--btn-primary-bg)",
|
|
143
|
-
primaryBgHover: "var(--btn-primary-bg-hover)",
|
|
144
|
-
secondaryBg: "var(--btn-secondary-bg)",
|
|
145
|
-
secondaryBgHover: "var(--btn-secondary-bg-hover)"
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// src/tokens/spacing.ts
|
|
150
|
-
var SPACING = {
|
|
151
|
-
1: "var(--space-1)",
|
|
152
|
-
2: "var(--space-2)",
|
|
153
|
-
3: "var(--space-3)",
|
|
154
|
-
4: "var(--space-4)",
|
|
155
|
-
5: "var(--space-5)",
|
|
156
|
-
6: "var(--space-6)",
|
|
157
|
-
8: "var(--space-8)",
|
|
158
|
-
10: "var(--space-10)",
|
|
159
|
-
12: "var(--space-12)",
|
|
160
|
-
16: "var(--space-16)",
|
|
161
|
-
20: "var(--space-20)"
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
// src/tokens/typography.ts
|
|
165
|
-
var FONT_FAMILY = {
|
|
166
|
-
sans: "var(--font-family)",
|
|
167
|
-
mono: "var(--font-family-mono)"
|
|
168
|
-
};
|
|
169
|
-
var FONT_SIZE = {
|
|
170
|
-
xs: "var(--font-size-xs)",
|
|
171
|
-
sm: "var(--font-size-sm)",
|
|
172
|
-
base: "var(--font-size-base)",
|
|
173
|
-
lg: "var(--font-size-lg)",
|
|
174
|
-
xl: "var(--font-size-xl)",
|
|
175
|
-
"2xl": "var(--font-size-2xl)",
|
|
176
|
-
"3xl": "var(--font-size-3xl)"
|
|
177
|
-
};
|
|
178
|
-
var FONT_WEIGHT = {
|
|
179
|
-
normal: "var(--font-weight-normal)",
|
|
180
|
-
medium: "var(--font-weight-medium)",
|
|
181
|
-
semibold: "var(--font-weight-semibold)",
|
|
182
|
-
bold: "var(--font-weight-bold)"
|
|
183
|
-
};
|
|
184
|
-
var LINE_HEIGHT = {
|
|
185
|
-
tight: "var(--line-height-tight)",
|
|
186
|
-
normal: "var(--line-height-normal)",
|
|
187
|
-
relaxed: "var(--line-height-relaxed)"
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
// src/tokens/radius.ts
|
|
191
|
-
var RADIUS = {
|
|
192
|
-
panel: "var(--radius-panel)",
|
|
193
|
-
card: "var(--radius-card)",
|
|
194
|
-
button: "var(--radius-button)",
|
|
195
|
-
badge: "var(--radius-badge)",
|
|
196
|
-
pill: "var(--radius-pill)"
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
// src/tokens/shadows.ts
|
|
200
|
-
var SHADOWS = {
|
|
201
|
-
glass: {
|
|
202
|
-
outer: "var(--glass-shadow-outer)",
|
|
203
|
-
inner: "var(--glass-shadow-inner)",
|
|
204
|
-
combined: "var(--glass-shadow-combined)",
|
|
205
|
-
elevated: "var(--glass-shadow-elevated)",
|
|
206
|
-
elevatedCombined: "var(--glass-shadow-elevated-combined)"
|
|
207
|
-
},
|
|
208
|
-
interactive: {
|
|
209
|
-
rest: "var(--shadow-interactive-rest)",
|
|
210
|
-
restSubtle: "var(--shadow-interactive-rest-subtle)",
|
|
211
|
-
restLight: "var(--shadow-interactive-rest-light)",
|
|
212
|
-
hover: "var(--shadow-interactive-hover)",
|
|
213
|
-
hoverSubtle: "var(--shadow-interactive-hover-subtle)",
|
|
214
|
-
active: "var(--shadow-interactive-active)"
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
// src/tokens/z-index.ts
|
|
219
|
-
var Z_INDEX = {
|
|
220
|
-
void: "var(--z-void)",
|
|
221
|
-
glassPanel: "var(--z-glass-panel)",
|
|
222
|
-
ornament: "var(--z-ornament)",
|
|
223
|
-
dropdown: "var(--z-dropdown)",
|
|
224
|
-
modalBackdrop: "var(--z-modal-backdrop)",
|
|
225
|
-
modal: "var(--z-modal)",
|
|
226
|
-
tooltip: "var(--z-tooltip)"
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
// src/tokens/breakpoints.ts
|
|
230
|
-
var BREAKPOINTS = {
|
|
231
|
-
"3xs": 320,
|
|
232
|
-
"2xs": 375,
|
|
233
|
-
xs: 480,
|
|
234
|
-
sm: 640,
|
|
235
|
-
md: 768,
|
|
236
|
-
lg: 1024,
|
|
237
|
-
xl: 1280,
|
|
238
|
-
"2xl": 1536,
|
|
239
|
-
"3xl": 1920,
|
|
240
|
-
"4xl": 2560,
|
|
241
|
-
"5xl": 3840
|
|
242
|
-
};
|
|
243
|
-
var MEDIA_QUERIES = {
|
|
244
|
-
"3xs": `(min-width: ${BREAKPOINTS["3xs"]}px)`,
|
|
245
|
-
"2xs": `(min-width: ${BREAKPOINTS["2xs"]}px)`,
|
|
246
|
-
xs: `(min-width: ${BREAKPOINTS.xs}px)`,
|
|
247
|
-
sm: `(min-width: ${BREAKPOINTS.sm}px)`,
|
|
248
|
-
md: `(min-width: ${BREAKPOINTS.md}px)`,
|
|
249
|
-
lg: `(min-width: ${BREAKPOINTS.lg}px)`,
|
|
250
|
-
xl: `(min-width: ${BREAKPOINTS.xl}px)`,
|
|
251
|
-
"2xl": `(min-width: ${BREAKPOINTS["2xl"]}px)`,
|
|
252
|
-
"3xl": `(min-width: ${BREAKPOINTS["3xl"]}px)`,
|
|
253
|
-
"4xl": `(min-width: ${BREAKPOINTS["4xl"]}px)`,
|
|
254
|
-
"5xl": `(min-width: ${BREAKPOINTS["5xl"]}px)`
|
|
255
|
-
};
|
|
256
|
-
var STORAGE_KEY = "void-appearance-settings";
|
|
257
|
-
var DEFAULT_SETTINGS = {
|
|
258
|
-
theme: "dark",
|
|
259
|
-
brand: "default",
|
|
260
|
-
navPlacement: "left",
|
|
261
|
-
density: "comfortable",
|
|
262
|
-
radius: "playful",
|
|
263
|
-
customColor: "#f97316"
|
|
264
|
-
// Default orange as fallback
|
|
265
|
-
};
|
|
266
|
-
function hexToRgb(hex) {
|
|
267
|
-
const cleanHex = hex.replace(/^#/, "");
|
|
268
|
-
const r = parseInt(cleanHex.substring(0, 2), 16);
|
|
269
|
-
const g = parseInt(cleanHex.substring(2, 4), 16);
|
|
270
|
-
const b = parseInt(cleanHex.substring(4, 6), 16);
|
|
271
|
-
if (isNaN(r) || isNaN(g) || isNaN(b)) {
|
|
272
|
-
return "249, 115, 22";
|
|
273
|
-
}
|
|
274
|
-
return `${r}, ${g}, ${b}`;
|
|
275
|
-
}
|
|
276
|
-
function generateSecondaryColor(hex) {
|
|
277
|
-
const cleanHex = hex.replace(/^#/, "");
|
|
278
|
-
const r = parseInt(cleanHex.substring(0, 2), 16);
|
|
279
|
-
const g = parseInt(cleanHex.substring(2, 4), 16);
|
|
280
|
-
const b = parseInt(cleanHex.substring(4, 6), 16);
|
|
281
|
-
if (isNaN(r) || isNaN(g) || isNaN(b)) {
|
|
282
|
-
return "255, 208, 0";
|
|
283
|
-
}
|
|
284
|
-
const secondary = {
|
|
285
|
-
r: Math.min(255, g + 50),
|
|
286
|
-
g: Math.min(255, b + 100),
|
|
287
|
-
b: Math.min(255, r)
|
|
288
|
-
};
|
|
289
|
-
return `${secondary.r}, ${secondary.g}, ${secondary.b}`;
|
|
290
|
-
}
|
|
291
|
-
function loadSettings() {
|
|
292
|
-
if (typeof window === "undefined") return DEFAULT_SETTINGS;
|
|
293
|
-
try {
|
|
294
|
-
const stored = localStorage.getItem(STORAGE_KEY);
|
|
295
|
-
if (stored) {
|
|
296
|
-
const parsed = JSON.parse(stored);
|
|
297
|
-
return {
|
|
298
|
-
theme: parsed.theme || DEFAULT_SETTINGS.theme,
|
|
299
|
-
brand: parsed.brand || DEFAULT_SETTINGS.brand,
|
|
300
|
-
navPlacement: parsed.navPlacement || DEFAULT_SETTINGS.navPlacement,
|
|
301
|
-
density: parsed.density || DEFAULT_SETTINGS.density,
|
|
302
|
-
radius: parsed.radius || DEFAULT_SETTINGS.radius,
|
|
303
|
-
customColor: parsed.customColor || DEFAULT_SETTINGS.customColor
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
} catch {
|
|
307
|
-
}
|
|
308
|
-
return {
|
|
309
|
-
...DEFAULT_SETTINGS,
|
|
310
|
-
theme: "dark"
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
function saveSettings(settings) {
|
|
314
|
-
if (typeof window === "undefined") return;
|
|
315
|
-
try {
|
|
316
|
-
localStorage.setItem(STORAGE_KEY, JSON.stringify(settings));
|
|
317
|
-
} catch {
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
function applySettings(settings) {
|
|
321
|
-
if (typeof document === "undefined") return;
|
|
322
|
-
const root = document.documentElement;
|
|
323
|
-
root.setAttribute("data-theme", settings.theme);
|
|
324
|
-
root.setAttribute("data-brand", settings.brand);
|
|
325
|
-
root.setAttribute("data-nav", settings.navPlacement);
|
|
326
|
-
root.setAttribute("data-density", settings.density);
|
|
327
|
-
root.setAttribute("data-radius", settings.radius);
|
|
328
|
-
if (settings.brand === "custom") {
|
|
329
|
-
const primaryRgb = hexToRgb(settings.customColor);
|
|
330
|
-
const secondaryRgb = generateSecondaryColor(settings.customColor);
|
|
331
|
-
root.style.setProperty("--custom-accent-rgb", primaryRgb);
|
|
332
|
-
root.style.setProperty("--custom-accent2-rgb", secondaryRgb);
|
|
333
|
-
} else {
|
|
334
|
-
root.style.removeProperty("--custom-accent-rgb");
|
|
335
|
-
root.style.removeProperty("--custom-accent2-rgb");
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function prefersReducedMotion() {
|
|
339
|
-
if (typeof window === "undefined") return false;
|
|
340
|
-
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
341
|
-
}
|
|
342
|
-
var AppearanceContext = createContext(null);
|
|
343
|
-
function AppearanceProvider({
|
|
344
|
-
initialSettings,
|
|
345
|
-
disablePersistence = false,
|
|
346
|
-
children
|
|
347
|
-
}) {
|
|
348
|
-
const [settings, setSettings] = useState(() => ({
|
|
349
|
-
...DEFAULT_SETTINGS,
|
|
350
|
-
...initialSettings
|
|
351
|
-
}));
|
|
352
|
-
const [hydrated, setHydrated] = useState(false);
|
|
353
|
-
useEffect(() => {
|
|
354
|
-
if (!disablePersistence) {
|
|
355
|
-
const loaded = loadSettings();
|
|
356
|
-
setSettings({
|
|
357
|
-
...loaded,
|
|
358
|
-
// initialSettings still take priority over localStorage
|
|
359
|
-
...initialSettings
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
setHydrated(true);
|
|
363
|
-
}, []);
|
|
364
|
-
useEffect(() => {
|
|
365
|
-
applySettings(settings);
|
|
366
|
-
if (!disablePersistence && hydrated) {
|
|
367
|
-
saveSettings(settings);
|
|
368
|
-
}
|
|
369
|
-
}, [settings, disablePersistence, hydrated]);
|
|
370
|
-
useEffect(() => {
|
|
371
|
-
if (typeof window === "undefined") return;
|
|
372
|
-
const mediaQuery = window.matchMedia("(prefers-color-scheme: light)");
|
|
373
|
-
const handleChange = (e) => {
|
|
374
|
-
setSettings((prev) => {
|
|
375
|
-
if (prev.theme === "light-contrast" || prev.theme === "dark-contrast") {
|
|
376
|
-
return prev;
|
|
377
|
-
}
|
|
378
|
-
return {
|
|
379
|
-
...prev,
|
|
380
|
-
theme: e.matches ? "light" : "dark"
|
|
381
|
-
};
|
|
382
|
-
});
|
|
383
|
-
};
|
|
384
|
-
mediaQuery.addEventListener("change", handleChange);
|
|
385
|
-
return () => mediaQuery.removeEventListener("change", handleChange);
|
|
386
|
-
}, []);
|
|
387
|
-
useEffect(() => {
|
|
388
|
-
if (typeof window === "undefined") return;
|
|
389
|
-
const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
390
|
-
const handleChange = () => {
|
|
391
|
-
applySettings(settings);
|
|
392
|
-
};
|
|
393
|
-
mediaQuery.addEventListener("change", handleChange);
|
|
394
|
-
return () => mediaQuery.removeEventListener("change", handleChange);
|
|
395
|
-
}, [settings]);
|
|
396
|
-
const setTheme = useCallback((theme) => {
|
|
397
|
-
setSettings((prev) => ({ ...prev, theme }));
|
|
398
|
-
}, []);
|
|
399
|
-
const setBrand = useCallback((brand) => {
|
|
400
|
-
setSettings((prev) => ({ ...prev, brand }));
|
|
401
|
-
}, []);
|
|
402
|
-
const setNavPlacement = useCallback((navPlacement) => {
|
|
403
|
-
setSettings((prev) => ({ ...prev, navPlacement }));
|
|
404
|
-
}, []);
|
|
405
|
-
const setDensity = useCallback((density) => {
|
|
406
|
-
setSettings((prev) => ({ ...prev, density }));
|
|
407
|
-
}, []);
|
|
408
|
-
const setRadius = useCallback((radius) => {
|
|
409
|
-
setSettings((prev) => ({ ...prev, radius }));
|
|
410
|
-
}, []);
|
|
411
|
-
const setCustomColor = useCallback((customColor) => {
|
|
412
|
-
setSettings((prev) => ({ ...prev, customColor, brand: "custom" }));
|
|
413
|
-
}, []);
|
|
414
|
-
const setAppearance = useCallback((partial) => {
|
|
415
|
-
setSettings((prev) => ({ ...prev, ...partial }));
|
|
416
|
-
}, []);
|
|
417
|
-
const resetToDefaults = useCallback(() => {
|
|
418
|
-
setSettings(DEFAULT_SETTINGS);
|
|
419
|
-
}, []);
|
|
420
|
-
const contextValue = {
|
|
421
|
-
...settings,
|
|
422
|
-
setTheme,
|
|
423
|
-
setBrand,
|
|
424
|
-
setNavPlacement,
|
|
425
|
-
setDensity,
|
|
426
|
-
setRadius,
|
|
427
|
-
setCustomColor,
|
|
428
|
-
setAppearance,
|
|
429
|
-
resetToDefaults
|
|
430
|
-
};
|
|
431
|
-
return /* @__PURE__ */ jsx(AppearanceContext.Provider, { value: contextValue, children });
|
|
432
|
-
}
|
|
433
|
-
function useAppearance() {
|
|
434
|
-
const context = useContext(AppearanceContext);
|
|
435
|
-
if (!context) {
|
|
436
|
-
throw new Error("useAppearance must be used within an AppearanceProvider");
|
|
437
|
-
}
|
|
438
|
-
return context;
|
|
439
|
-
}
|
|
440
|
-
function initializeAppearance(settings) {
|
|
441
|
-
const loaded = loadSettings();
|
|
442
|
-
const merged = { ...loaded, ...settings };
|
|
443
|
-
applySettings(merged);
|
|
444
|
-
}
|
|
445
|
-
var AppearancePanel = React39.forwardRef(
|
|
446
|
-
({ className, labels: l }, ref) => {
|
|
447
|
-
const {
|
|
448
|
-
theme,
|
|
449
|
-
brand,
|
|
450
|
-
navPlacement,
|
|
451
|
-
density,
|
|
452
|
-
radius,
|
|
453
|
-
customColor,
|
|
454
|
-
setTheme,
|
|
455
|
-
setBrand,
|
|
456
|
-
setNavPlacement,
|
|
457
|
-
setDensity,
|
|
458
|
-
setRadius,
|
|
459
|
-
setCustomColor,
|
|
460
|
-
resetToDefaults
|
|
461
|
-
} = useAppearance();
|
|
462
|
-
const colorPickerId = useId();
|
|
463
|
-
const themeOptions = [
|
|
464
|
-
{ value: "light", label: l?.themeLight ?? "Light" },
|
|
465
|
-
{ value: "light-contrast", label: l?.themeLightContrast ?? "Light (High Contrast)" },
|
|
466
|
-
{ value: "dark", label: l?.themeDark ?? "Dark" },
|
|
467
|
-
{ value: "dark-contrast", label: l?.themeDarkContrast ?? "Dark (High Contrast)" }
|
|
468
|
-
];
|
|
469
|
-
const brandOptions = [
|
|
470
|
-
{ value: "default", label: l?.brandDefault ?? "Default", description: l?.brandDefaultDescription ?? "Warm Intelligence" },
|
|
471
|
-
{ value: "salesmind", label: l?.brandSalesmind ?? "SalesMind", description: l?.brandSalesmindDescription ?? "Pink-red + Gold" },
|
|
472
|
-
{ value: "custom", label: l?.brandCustom ?? "Custom", description: l?.brandCustomDescription ?? "Your color" }
|
|
473
|
-
];
|
|
474
|
-
const navOptions = [
|
|
475
|
-
{ value: "left", label: l?.navLeft ?? "Left Sidebar" },
|
|
476
|
-
{ value: "right", label: l?.navRight ?? "Right Sidebar" },
|
|
477
|
-
{ value: "bottom", label: l?.navBottom ?? "Bottom Tabs" }
|
|
478
|
-
];
|
|
479
|
-
const densityOptions = [
|
|
480
|
-
{ value: "comfortable", label: l?.densityComfortable ?? "Comfortable", description: l?.densityComfortableDescription ?? "Generous spacing" },
|
|
481
|
-
{ value: "compact", label: l?.densityCompact ?? "Compact", description: l?.densityCompactDescription ?? "Higher density" }
|
|
482
|
-
];
|
|
483
|
-
const radiusOptions = [
|
|
484
|
-
{ value: "playful", label: l?.radiusPlayful ?? "Playful", description: l?.radiusPlayfulDescription ?? "Rounded corners" },
|
|
485
|
-
{ value: "sharp", label: l?.radiusSharp ?? "Sharp", description: l?.radiusSharpDescription ?? "Technical feel" }
|
|
486
|
-
];
|
|
487
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: clsx28("ds-appearance-panel", className), children: [
|
|
488
|
-
/* @__PURE__ */ jsx("h3", { className: "ds-appearance-panel__title", children: l?.title ?? "Appearance Settings" }),
|
|
489
|
-
/* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
|
|
490
|
-
/* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.themeHeading ?? "Theme" }),
|
|
491
|
-
/* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options", children: themeOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
492
|
-
"label",
|
|
493
|
-
{
|
|
494
|
-
className: clsx28(
|
|
495
|
-
"ds-appearance-panel__option",
|
|
496
|
-
theme === option.value && "ds-appearance-panel__option--active"
|
|
497
|
-
),
|
|
498
|
-
children: [
|
|
499
|
-
/* @__PURE__ */ jsx(
|
|
500
|
-
"input",
|
|
501
|
-
{
|
|
502
|
-
type: "radio",
|
|
503
|
-
name: "theme",
|
|
504
|
-
value: option.value,
|
|
505
|
-
checked: theme === option.value,
|
|
506
|
-
onChange: () => setTheme(option.value),
|
|
507
|
-
className: "ds-appearance-panel__radio"
|
|
508
|
-
}
|
|
509
|
-
),
|
|
510
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label })
|
|
511
|
-
]
|
|
512
|
-
},
|
|
513
|
-
option.value
|
|
514
|
-
)) })
|
|
515
|
-
] }),
|
|
516
|
-
/* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
|
|
517
|
-
/* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.brandHeading ?? "Brand" }),
|
|
518
|
-
/* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options", children: brandOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
519
|
-
"label",
|
|
520
|
-
{
|
|
521
|
-
className: clsx28(
|
|
522
|
-
"ds-appearance-panel__option",
|
|
523
|
-
brand === option.value && "ds-appearance-panel__option--active"
|
|
524
|
-
),
|
|
525
|
-
children: [
|
|
526
|
-
/* @__PURE__ */ jsx(
|
|
527
|
-
"input",
|
|
528
|
-
{
|
|
529
|
-
type: "radio",
|
|
530
|
-
name: "brand",
|
|
531
|
-
value: option.value,
|
|
532
|
-
checked: brand === option.value,
|
|
533
|
-
onChange: () => setBrand(option.value),
|
|
534
|
-
className: "ds-appearance-panel__radio"
|
|
535
|
-
}
|
|
536
|
-
),
|
|
537
|
-
/* @__PURE__ */ jsxs("span", { className: "ds-appearance-panel__option-content", children: [
|
|
538
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label }),
|
|
539
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-description", children: option.description })
|
|
540
|
-
] })
|
|
541
|
-
]
|
|
542
|
-
},
|
|
543
|
-
option.value
|
|
544
|
-
)) }),
|
|
545
|
-
brand === "custom" && /* @__PURE__ */ jsxs("div", { className: "ds-appearance-panel__color-picker", children: [
|
|
546
|
-
/* @__PURE__ */ jsx("label", { htmlFor: colorPickerId, className: "ds-appearance-panel__color-label", children: l?.accentColorLabel ?? "Accent Color" }),
|
|
547
|
-
/* @__PURE__ */ jsxs("div", { className: "ds-appearance-panel__color-input-wrapper", children: [
|
|
548
|
-
/* @__PURE__ */ jsx(
|
|
549
|
-
"input",
|
|
550
|
-
{
|
|
551
|
-
type: "color",
|
|
552
|
-
id: colorPickerId,
|
|
553
|
-
value: customColor,
|
|
554
|
-
onChange: (e) => setCustomColor(e.target.value),
|
|
555
|
-
className: "ds-appearance-panel__color-input"
|
|
556
|
-
}
|
|
557
|
-
),
|
|
558
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__color-value", children: customColor.toUpperCase() })
|
|
559
|
-
] })
|
|
560
|
-
] })
|
|
561
|
-
] }),
|
|
562
|
-
/* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
|
|
563
|
-
/* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.densityHeading ?? "Density" }),
|
|
564
|
-
/* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options ds-appearance-panel__options--row", children: densityOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
565
|
-
"label",
|
|
566
|
-
{
|
|
567
|
-
className: clsx28(
|
|
568
|
-
"ds-appearance-panel__option",
|
|
569
|
-
"ds-appearance-panel__option--toggle",
|
|
570
|
-
density === option.value && "ds-appearance-panel__option--active"
|
|
571
|
-
),
|
|
572
|
-
children: [
|
|
573
|
-
/* @__PURE__ */ jsx(
|
|
574
|
-
"input",
|
|
575
|
-
{
|
|
576
|
-
type: "radio",
|
|
577
|
-
name: "density",
|
|
578
|
-
value: option.value,
|
|
579
|
-
checked: density === option.value,
|
|
580
|
-
onChange: () => setDensity(option.value),
|
|
581
|
-
className: "ds-appearance-panel__radio"
|
|
582
|
-
}
|
|
583
|
-
),
|
|
584
|
-
/* @__PURE__ */ jsxs("span", { className: "ds-appearance-panel__option-content", children: [
|
|
585
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label }),
|
|
586
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-description", children: option.description })
|
|
587
|
-
] })
|
|
588
|
-
]
|
|
589
|
-
},
|
|
590
|
-
option.value
|
|
591
|
-
)) })
|
|
592
|
-
] }),
|
|
593
|
-
/* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
|
|
594
|
-
/* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.geometryHeading ?? "Geometry" }),
|
|
595
|
-
/* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options ds-appearance-panel__options--row", children: radiusOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
596
|
-
"label",
|
|
597
|
-
{
|
|
598
|
-
className: clsx28(
|
|
599
|
-
"ds-appearance-panel__option",
|
|
600
|
-
"ds-appearance-panel__option--toggle",
|
|
601
|
-
radius === option.value && "ds-appearance-panel__option--active"
|
|
602
|
-
),
|
|
603
|
-
children: [
|
|
604
|
-
/* @__PURE__ */ jsx(
|
|
605
|
-
"input",
|
|
606
|
-
{
|
|
607
|
-
type: "radio",
|
|
608
|
-
name: "radius",
|
|
609
|
-
value: option.value,
|
|
610
|
-
checked: radius === option.value,
|
|
611
|
-
onChange: () => setRadius(option.value),
|
|
612
|
-
className: "ds-appearance-panel__radio"
|
|
613
|
-
}
|
|
614
|
-
),
|
|
615
|
-
/* @__PURE__ */ jsxs("span", { className: "ds-appearance-panel__option-content", children: [
|
|
616
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label }),
|
|
617
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-description", children: option.description })
|
|
618
|
-
] })
|
|
619
|
-
]
|
|
620
|
-
},
|
|
621
|
-
option.value
|
|
622
|
-
)) })
|
|
623
|
-
] }),
|
|
624
|
-
/* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
|
|
625
|
-
/* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.navHeading ?? "Navigation Layout" }),
|
|
626
|
-
/* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options", children: navOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
627
|
-
"label",
|
|
628
|
-
{
|
|
629
|
-
className: clsx28(
|
|
630
|
-
"ds-appearance-panel__option",
|
|
631
|
-
navPlacement === option.value && "ds-appearance-panel__option--active"
|
|
632
|
-
),
|
|
633
|
-
children: [
|
|
634
|
-
/* @__PURE__ */ jsx(
|
|
635
|
-
"input",
|
|
636
|
-
{
|
|
637
|
-
type: "radio",
|
|
638
|
-
name: "nav",
|
|
639
|
-
value: option.value,
|
|
640
|
-
checked: navPlacement === option.value,
|
|
641
|
-
onChange: () => setNavPlacement(option.value),
|
|
642
|
-
className: "ds-appearance-panel__radio"
|
|
643
|
-
}
|
|
644
|
-
),
|
|
645
|
-
/* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label })
|
|
646
|
-
]
|
|
647
|
-
},
|
|
648
|
-
option.value
|
|
649
|
-
)) })
|
|
650
|
-
] }),
|
|
651
|
-
/* @__PURE__ */ jsx("button", { type: "button", onClick: resetToDefaults, className: "ds-appearance-panel__reset", children: l?.resetLabel ?? "Reset to Defaults" })
|
|
652
|
-
] });
|
|
653
|
-
}
|
|
654
|
-
);
|
|
655
|
-
AppearancePanel.displayName = "AppearancePanel";
|
|
656
|
-
var Button = React39.forwardRef(
|
|
657
|
-
({ className, variant = "primary", size = "md", asChild = false, isLoading = false, children, disabled, ...props }, ref) => {
|
|
658
|
-
const buttonClass = clsx28(
|
|
659
|
-
"ds-button",
|
|
660
|
-
`ds-button--${variant}`,
|
|
661
|
-
size === "icon" ? "ds-button--icon ds-button--md" : `ds-button--${size}`,
|
|
662
|
-
isLoading && "ds-button--loading",
|
|
663
|
-
className
|
|
664
|
-
);
|
|
665
|
-
if (asChild) {
|
|
666
|
-
return /* @__PURE__ */ jsx(
|
|
667
|
-
Slot,
|
|
668
|
-
{
|
|
669
|
-
ref,
|
|
670
|
-
"aria-disabled": isLoading || disabled || void 0,
|
|
671
|
-
className: buttonClass,
|
|
672
|
-
...props,
|
|
673
|
-
children
|
|
674
|
-
}
|
|
675
|
-
);
|
|
676
|
-
}
|
|
677
|
-
return /* @__PURE__ */ jsxs(
|
|
678
|
-
"button",
|
|
679
|
-
{
|
|
680
|
-
ref,
|
|
681
|
-
disabled: isLoading || disabled,
|
|
682
|
-
className: buttonClass,
|
|
683
|
-
...props,
|
|
684
|
-
children: [
|
|
685
|
-
isLoading && /* @__PURE__ */ jsx(
|
|
686
|
-
"svg",
|
|
687
|
-
{
|
|
688
|
-
className: "ds-button__spinner",
|
|
689
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
690
|
-
width: "1em",
|
|
691
|
-
height: "1em",
|
|
692
|
-
viewBox: "0 0 24 24",
|
|
693
|
-
fill: "none",
|
|
694
|
-
stroke: "currentColor",
|
|
695
|
-
strokeWidth: "2",
|
|
696
|
-
strokeLinecap: "round",
|
|
697
|
-
strokeLinejoin: "round",
|
|
698
|
-
children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
699
|
-
}
|
|
700
|
-
),
|
|
701
|
-
/* @__PURE__ */ jsx("span", { className: clsx28("ds-button__content", isLoading && "ds-button__content--hidden"), children })
|
|
702
|
-
]
|
|
703
|
-
}
|
|
704
|
-
);
|
|
705
|
-
}
|
|
706
|
-
);
|
|
707
|
-
Button.displayName = "Button";
|
|
708
|
-
var ButtonGroup = React39.forwardRef(
|
|
709
|
-
({ orientation = "horizontal", fullWidth = false, size = "md", className, children, ...props }, ref) => {
|
|
710
|
-
return /* @__PURE__ */ jsx(
|
|
711
|
-
"div",
|
|
712
|
-
{
|
|
713
|
-
ref,
|
|
714
|
-
role: "group",
|
|
715
|
-
className: clsx28(
|
|
716
|
-
"ds-button-group",
|
|
717
|
-
`ds-button-group--${orientation}`,
|
|
718
|
-
fullWidth && "ds-button-group--full-width",
|
|
719
|
-
className
|
|
720
|
-
),
|
|
721
|
-
"data-size": size,
|
|
722
|
-
...props,
|
|
723
|
-
children
|
|
724
|
-
}
|
|
725
|
-
);
|
|
726
|
-
}
|
|
727
|
-
);
|
|
728
|
-
ButtonGroup.displayName = "ButtonGroup";
|
|
729
|
-
var TextField = React39.forwardRef(
|
|
730
|
-
({ className, label, error, helperText, endAdornment, id, ...props }, ref) => {
|
|
731
|
-
const generatedId = React39.useId();
|
|
732
|
-
const inputId = id || generatedId;
|
|
733
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx28("ds-textfield", className), children: [
|
|
734
|
-
label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "ds-textfield__label", children: label }),
|
|
735
|
-
/* @__PURE__ */ jsxs("div", { className: "ds-textfield__input-wrapper", children: [
|
|
736
|
-
/* @__PURE__ */ jsx(
|
|
737
|
-
Input,
|
|
738
|
-
{
|
|
739
|
-
id: inputId,
|
|
740
|
-
ref,
|
|
741
|
-
className: clsx28(
|
|
742
|
-
"ds-textfield__input",
|
|
743
|
-
error && "ds-textfield__input--error",
|
|
744
|
-
endAdornment && "ds-textfield__input--adorned"
|
|
745
|
-
),
|
|
746
|
-
...props
|
|
747
|
-
}
|
|
748
|
-
),
|
|
749
|
-
endAdornment && /* @__PURE__ */ jsx("div", { className: "ds-textfield__adornment", children: endAdornment })
|
|
750
|
-
] }),
|
|
751
|
-
helperText && /* @__PURE__ */ jsx("span", { className: clsx28("ds-textfield__helper", error && "ds-textfield__helper--error"), children: helperText })
|
|
752
|
-
] });
|
|
753
|
-
}
|
|
754
|
-
);
|
|
755
|
-
TextField.displayName = "TextField";
|
|
756
|
-
var TextArea = forwardRef(
|
|
757
|
-
({ className, label, error, helperText, id, ...props }, ref) => {
|
|
758
|
-
const generatedId = useId();
|
|
759
|
-
const inputId = id || generatedId;
|
|
760
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx28("ds-textarea", className), children: [
|
|
761
|
-
label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "ds-textarea__label", children: label }),
|
|
762
|
-
/* @__PURE__ */ jsx("div", { className: "ds-textarea__input-wrapper", children: /* @__PURE__ */ jsx(
|
|
763
|
-
"textarea",
|
|
764
|
-
{
|
|
765
|
-
id: inputId,
|
|
766
|
-
ref,
|
|
767
|
-
className: clsx28("ds-textarea__input", error && "ds-textarea__input--error"),
|
|
768
|
-
...props
|
|
769
|
-
}
|
|
770
|
-
) }),
|
|
771
|
-
helperText && /* @__PURE__ */ jsx("span", { className: clsx28("ds-textarea__helper", error && "ds-textarea__helper--error"), children: helperText })
|
|
772
|
-
] });
|
|
773
|
-
}
|
|
774
|
-
);
|
|
775
|
-
TextArea.displayName = "TextArea";
|
|
776
|
-
var Checkbox = React39.forwardRef(
|
|
777
|
-
({ className, label, id, ...props }, ref) => {
|
|
778
|
-
const generatedId = React39.useId();
|
|
779
|
-
const checkboxId = id || generatedId;
|
|
780
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx28("ds-checkbox-wrapper", className), children: [
|
|
781
|
-
/* @__PURE__ */ jsx(Checkbox$1.Root, { id: checkboxId, ref, className: "ds-checkbox", ...props, children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, { className: "ds-checkbox__indicator", children: /* @__PURE__ */ jsx(
|
|
782
|
-
"svg",
|
|
783
|
-
{
|
|
784
|
-
viewBox: "0 0 14 14",
|
|
785
|
-
fill: "none",
|
|
786
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
787
|
-
className: "ds-checkbox__icon",
|
|
788
|
-
children: /* @__PURE__ */ jsx(
|
|
789
|
-
"path",
|
|
790
|
-
{
|
|
791
|
-
d: "M11.6666 3.5L5.24992 9.91667L2.33325 7",
|
|
792
|
-
stroke: "currentColor",
|
|
793
|
-
strokeWidth: "2",
|
|
794
|
-
strokeLinecap: "round",
|
|
795
|
-
strokeLinejoin: "round"
|
|
796
|
-
}
|
|
797
|
-
)
|
|
798
|
-
}
|
|
799
|
-
) }) }),
|
|
800
|
-
label && /* @__PURE__ */ jsx("label", { htmlFor: checkboxId, className: "ds-checkbox__label", children: label })
|
|
801
|
-
] });
|
|
802
|
-
}
|
|
803
|
-
);
|
|
804
|
-
Checkbox.displayName = "Checkbox";
|
|
805
|
-
var RadioGroupContext = createContext(null);
|
|
806
|
-
var RadioGroup = forwardRef(
|
|
807
|
-
({
|
|
808
|
-
className,
|
|
809
|
-
name,
|
|
810
|
-
value,
|
|
811
|
-
onValueChange,
|
|
812
|
-
orientation = "vertical",
|
|
813
|
-
children,
|
|
814
|
-
...props
|
|
815
|
-
}, ref) => {
|
|
816
|
-
const generatedName = useId();
|
|
817
|
-
const groupName = name || generatedName;
|
|
818
|
-
return /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: { name: groupName, value, onChange: onValueChange }, children: /* @__PURE__ */ jsx(
|
|
819
|
-
"div",
|
|
820
|
-
{
|
|
821
|
-
ref,
|
|
822
|
-
role: "radiogroup",
|
|
823
|
-
className: clsx28(
|
|
824
|
-
"ds-radio-group",
|
|
825
|
-
orientation === "horizontal" && "ds-radio-group--horizontal",
|
|
826
|
-
className
|
|
827
|
-
),
|
|
828
|
-
...props,
|
|
829
|
-
children
|
|
830
|
-
}
|
|
831
|
-
) });
|
|
832
|
-
}
|
|
833
|
-
);
|
|
834
|
-
RadioGroup.displayName = "RadioGroup";
|
|
835
|
-
var Radio = forwardRef(
|
|
836
|
-
({ className, label, value, disabled, id, onChange, ...props }, ref) => {
|
|
837
|
-
const context = useContext(RadioGroupContext);
|
|
838
|
-
const generatedId = useId();
|
|
839
|
-
const radioId = id || generatedId;
|
|
840
|
-
const name = context?.name || props.name;
|
|
841
|
-
const isChecked = context?.value !== void 0 ? context.value === value : props.checked;
|
|
842
|
-
const handleChange = (e) => {
|
|
843
|
-
onChange?.(e);
|
|
844
|
-
context?.onChange?.(value);
|
|
845
|
-
};
|
|
846
|
-
return /* @__PURE__ */ jsxs(
|
|
847
|
-
"label",
|
|
848
|
-
{
|
|
849
|
-
className: clsx28("ds-radio-wrapper", disabled && "ds-radio-wrapper--disabled", className),
|
|
850
|
-
children: [
|
|
851
|
-
/* @__PURE__ */ jsx(
|
|
852
|
-
"input",
|
|
853
|
-
{
|
|
854
|
-
ref,
|
|
855
|
-
type: "radio",
|
|
856
|
-
className: "ds-radio-input",
|
|
857
|
-
id: radioId,
|
|
858
|
-
name,
|
|
859
|
-
value,
|
|
860
|
-
checked: isChecked,
|
|
861
|
-
onChange: handleChange,
|
|
862
|
-
disabled,
|
|
863
|
-
...props
|
|
864
|
-
}
|
|
865
|
-
),
|
|
866
|
-
/* @__PURE__ */ jsx("div", { className: clsx28("ds-radio", isChecked && "ds-radio--checked"), children: /* @__PURE__ */ jsx("div", { className: "ds-radio__indicator" }) }),
|
|
867
|
-
label && /* @__PURE__ */ jsx("span", { className: "ds-radio__label", children: label })
|
|
868
|
-
]
|
|
869
|
-
}
|
|
870
|
-
);
|
|
871
|
-
}
|
|
872
|
-
);
|
|
873
|
-
Radio.displayName = "Radio";
|
|
874
|
-
var Switch = React39.forwardRef(
|
|
875
|
-
({ className, label, id, ...props }, ref) => {
|
|
876
|
-
const generatedId = React39.useId();
|
|
877
|
-
const switchId = id || generatedId;
|
|
878
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx28("ds-switch-wrapper", className), children: [
|
|
879
|
-
/* @__PURE__ */ jsx(Switch$1.Root, { id: switchId, ref, className: "ds-switch", ...props, children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: "ds-switch__thumb" }) }),
|
|
880
|
-
label && /* @__PURE__ */ jsx("label", { htmlFor: switchId, className: "ds-switch__label", children: label })
|
|
881
|
-
] });
|
|
882
|
-
}
|
|
883
|
-
);
|
|
884
|
-
Switch.displayName = "Switch";
|
|
885
|
-
function Select({
|
|
886
|
-
value,
|
|
887
|
-
defaultValue,
|
|
888
|
-
onValueChange,
|
|
889
|
-
disabled,
|
|
890
|
-
required,
|
|
891
|
-
name,
|
|
892
|
-
items,
|
|
893
|
-
children
|
|
894
|
-
}) {
|
|
895
|
-
return /* @__PURE__ */ jsx(
|
|
896
|
-
Select$1.Root,
|
|
897
|
-
{
|
|
898
|
-
value,
|
|
899
|
-
defaultValue,
|
|
900
|
-
onValueChange: onValueChange ? (val) => onValueChange(val) : void 0,
|
|
901
|
-
disabled,
|
|
902
|
-
required,
|
|
903
|
-
name,
|
|
904
|
-
items,
|
|
905
|
-
children
|
|
906
|
-
}
|
|
907
|
-
);
|
|
908
|
-
}
|
|
909
|
-
Select.displayName = "Select";
|
|
910
|
-
var SelectTrigger = React39.forwardRef(
|
|
911
|
-
({ className, placeholder = "Select...", size = "md", ...props }, ref) => {
|
|
912
|
-
return /* @__PURE__ */ jsx("div", { className: "ds-select__trigger-wrapper", children: /* @__PURE__ */ jsxs(
|
|
913
|
-
Select$1.Trigger,
|
|
914
|
-
{
|
|
915
|
-
ref,
|
|
916
|
-
className: clsx28("ds-select__trigger", `ds-select__trigger--${size}`, className),
|
|
917
|
-
"aria-label": props["aria-label"] || (typeof placeholder === "string" ? placeholder : "Select"),
|
|
918
|
-
...props,
|
|
919
|
-
children: [
|
|
920
|
-
/* @__PURE__ */ jsx(Select$1.Value, { className: "ds-select__value", placeholder }),
|
|
921
|
-
/* @__PURE__ */ jsx(Select$1.Icon, { className: "ds-select__icon", "aria-hidden": true, children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
|
|
922
|
-
]
|
|
923
|
-
}
|
|
924
|
-
) });
|
|
925
|
-
}
|
|
926
|
-
);
|
|
927
|
-
SelectTrigger.displayName = "SelectTrigger";
|
|
928
|
-
var SelectContent = React39.forwardRef(
|
|
929
|
-
({ className, side = "bottom", sideOffset = 4, align = "start", children, ...props }, ref) => {
|
|
930
|
-
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
931
|
-
Select$1.Positioner,
|
|
932
|
-
{
|
|
933
|
-
side,
|
|
934
|
-
sideOffset,
|
|
935
|
-
align,
|
|
936
|
-
alignItemWithTrigger: false,
|
|
937
|
-
children: /* @__PURE__ */ jsx(Select$1.Popup, { ref, className: clsx28("ds-select__content", className), ...props, children: /* @__PURE__ */ jsx(Select$1.List, { className: "ds-select__list", children }) })
|
|
938
|
-
}
|
|
939
|
-
) });
|
|
940
|
-
}
|
|
941
|
-
);
|
|
942
|
-
SelectContent.displayName = "SelectContent";
|
|
943
|
-
var SelectItem = React39.forwardRef(
|
|
944
|
-
({ className, value, children, disabled, ...props }, ref) => {
|
|
945
|
-
return /* @__PURE__ */ jsxs(
|
|
946
|
-
Select$1.Item,
|
|
947
|
-
{
|
|
948
|
-
ref,
|
|
949
|
-
value,
|
|
950
|
-
disabled,
|
|
951
|
-
className: clsx28("ds-select__item", className),
|
|
952
|
-
...props,
|
|
953
|
-
children: [
|
|
954
|
-
/* @__PURE__ */ jsx(Select$1.ItemIndicator, { className: "ds-select__item-indicator", children: /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
|
955
|
-
/* @__PURE__ */ jsx(Select$1.ItemText, { children })
|
|
956
|
-
]
|
|
957
|
-
}
|
|
958
|
-
);
|
|
959
|
-
}
|
|
960
|
-
);
|
|
961
|
-
SelectItem.displayName = "SelectItem";
|
|
962
|
-
var SelectGroup = React39.forwardRef(
|
|
963
|
-
({ className, label, children, ...props }, ref) => {
|
|
964
|
-
return /* @__PURE__ */ jsxs(Select$1.Group, { ref, className: clsx28("ds-select__group", className), ...props, children: [
|
|
965
|
-
label && /* @__PURE__ */ jsx(Select$1.GroupLabel, { className: "ds-select__group-label", children: label }),
|
|
966
|
-
children
|
|
967
|
-
] });
|
|
968
|
-
}
|
|
969
|
-
);
|
|
970
|
-
SelectGroup.displayName = "SelectGroup";
|
|
971
|
-
var SelectSeparator = React39.forwardRef(({ className, ...props }, ref) => {
|
|
972
|
-
return /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-select__separator", className), ...props });
|
|
973
|
-
});
|
|
974
|
-
SelectSeparator.displayName = "SelectSeparator";
|
|
975
|
-
function ChevronDownIcon() {
|
|
976
|
-
return /* @__PURE__ */ jsx(
|
|
977
|
-
"svg",
|
|
978
|
-
{
|
|
979
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
980
|
-
width: "16",
|
|
981
|
-
height: "16",
|
|
982
|
-
viewBox: "0 0 24 24",
|
|
983
|
-
fill: "none",
|
|
984
|
-
stroke: "currentColor",
|
|
985
|
-
strokeWidth: "2",
|
|
986
|
-
strokeLinecap: "round",
|
|
987
|
-
strokeLinejoin: "round",
|
|
988
|
-
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
989
|
-
}
|
|
990
|
-
);
|
|
991
|
-
}
|
|
992
|
-
function CheckIcon() {
|
|
993
|
-
return /* @__PURE__ */ jsx(
|
|
994
|
-
"svg",
|
|
995
|
-
{
|
|
996
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
997
|
-
width: "14",
|
|
998
|
-
height: "14",
|
|
999
|
-
viewBox: "0 0 24 24",
|
|
1000
|
-
fill: "none",
|
|
1001
|
-
stroke: "currentColor",
|
|
1002
|
-
strokeWidth: "2",
|
|
1003
|
-
strokeLinecap: "round",
|
|
1004
|
-
strokeLinejoin: "round",
|
|
1005
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" })
|
|
1006
|
-
}
|
|
1007
|
-
);
|
|
1008
|
-
}
|
|
1009
|
-
var Dialog = Dialog$1.Root;
|
|
1010
|
-
var DialogTrigger = Dialog$1.Trigger;
|
|
1011
|
-
var DialogClose = Dialog$1.Close;
|
|
1012
|
-
var DialogTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Title, { ref, className: clsx28("ds-dialog__title", className), ...props }));
|
|
1013
|
-
DialogTitle.displayName = "DialogTitle";
|
|
1014
|
-
var DialogDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1015
|
-
Dialog$1.Description,
|
|
1016
|
-
{
|
|
1017
|
-
ref,
|
|
1018
|
-
className: clsx28("ds-dialog__description", className),
|
|
1019
|
-
...props
|
|
1020
|
-
}
|
|
1021
|
-
));
|
|
1022
|
-
DialogDescription.displayName = "DialogDescription";
|
|
1023
|
-
var DialogContent = React39.forwardRef(
|
|
1024
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
|
|
1025
|
-
/* @__PURE__ */ jsx(Dialog$1.Backdrop, { className: "ds-dialog__backdrop" }),
|
|
1026
|
-
/* @__PURE__ */ jsx(Dialog$1.Popup, { ref, className: clsx28("ds-dialog__content", className), ...props, children })
|
|
1027
|
-
] })
|
|
1028
|
-
);
|
|
1029
|
-
DialogContent.displayName = "DialogContent";
|
|
1030
|
-
var DialogHeader = React39.forwardRef(
|
|
1031
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-dialog__header", className), ...props })
|
|
1032
|
-
);
|
|
1033
|
-
DialogHeader.displayName = "DialogHeader";
|
|
1034
|
-
var DialogFooter = React39.forwardRef(
|
|
1035
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-dialog__footer", className), ...props })
|
|
1036
|
-
);
|
|
1037
|
-
DialogFooter.displayName = "DialogFooter";
|
|
1038
|
-
var TooltipProvider = Tooltip$1.Provider;
|
|
1039
|
-
var TooltipRoot = Tooltip$1.Root;
|
|
1040
|
-
var TooltipTrigger = Tooltip$1.Trigger;
|
|
1041
|
-
var TooltipContent = React39.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, { sideOffset: 5, children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, { ref, className: clsx28("ds-tooltip__content", className), ...props, children: [
|
|
1042
|
-
children,
|
|
1043
|
-
/* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "ds-tooltip__arrow" })
|
|
1044
|
-
] }) }) }));
|
|
1045
|
-
TooltipContent.displayName = "TooltipContent";
|
|
1046
|
-
var Tooltip = ({ content, children, delay = 200 }) => {
|
|
1047
|
-
return /* @__PURE__ */ jsx(Tooltip$1.Provider, { delay, children: /* @__PURE__ */ jsxs(Tooltip$1.Root, { children: [
|
|
1048
|
-
/* @__PURE__ */ jsx(Tooltip$1.Trigger, { render: children }),
|
|
1049
|
-
/* @__PURE__ */ jsx(TooltipContent, { children: content })
|
|
1050
|
-
] }) });
|
|
1051
|
-
};
|
|
1052
|
-
var Badge = React39.forwardRef(
|
|
1053
|
-
({ className, variant = "default", ...props }, ref) => {
|
|
1054
|
-
return /* @__PURE__ */ jsx(
|
|
1055
|
-
"span",
|
|
1056
|
-
{
|
|
1057
|
-
ref,
|
|
1058
|
-
className: clsx28("ds-badge", `ds-badge--${variant}`, className),
|
|
1059
|
-
...props
|
|
1060
|
-
}
|
|
1061
|
-
);
|
|
1062
|
-
}
|
|
1063
|
-
);
|
|
1064
|
-
Badge.displayName = "Badge";
|
|
1065
|
-
var StatusBadge = React39.forwardRef(
|
|
1066
|
-
({ variant = "default", size = "md", dot = false, className, children }, ref) => {
|
|
1067
|
-
return /* @__PURE__ */ jsxs(
|
|
1068
|
-
"span",
|
|
1069
|
-
{
|
|
1070
|
-
ref,
|
|
1071
|
-
className: clsx28(
|
|
1072
|
-
"ds-status-badge",
|
|
1073
|
-
`ds-status-badge--${variant}`,
|
|
1074
|
-
`ds-status-badge--${size}`,
|
|
1075
|
-
dot && "ds-status-badge--dot",
|
|
1076
|
-
className
|
|
1077
|
-
),
|
|
1078
|
-
children: [
|
|
1079
|
-
dot && /* @__PURE__ */ jsx("span", { className: "ds-status-badge__dot" }),
|
|
1080
|
-
children
|
|
1081
|
-
]
|
|
1082
|
-
}
|
|
1083
|
-
);
|
|
1084
|
-
}
|
|
1085
|
-
);
|
|
1086
|
-
StatusBadge.displayName = "StatusBadge";
|
|
1087
|
-
var DefaultIcons = {
|
|
1088
|
-
info: /* @__PURE__ */ jsxs(
|
|
1089
|
-
"svg",
|
|
1090
|
-
{
|
|
1091
|
-
width: "20",
|
|
1092
|
-
height: "20",
|
|
1093
|
-
viewBox: "0 0 24 24",
|
|
1094
|
-
fill: "none",
|
|
1095
|
-
stroke: "currentColor",
|
|
1096
|
-
strokeWidth: "2",
|
|
1097
|
-
strokeLinecap: "round",
|
|
1098
|
-
strokeLinejoin: "round",
|
|
1099
|
-
children: [
|
|
1100
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1101
|
-
/* @__PURE__ */ jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
1102
|
-
/* @__PURE__ */ jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
1103
|
-
]
|
|
1104
|
-
}
|
|
1105
|
-
),
|
|
1106
|
-
success: /* @__PURE__ */ jsxs(
|
|
1107
|
-
"svg",
|
|
1108
|
-
{
|
|
1109
|
-
width: "20",
|
|
1110
|
-
height: "20",
|
|
1111
|
-
viewBox: "0 0 24 24",
|
|
1112
|
-
fill: "none",
|
|
1113
|
-
stroke: "currentColor",
|
|
1114
|
-
strokeWidth: "2",
|
|
1115
|
-
strokeLinecap: "round",
|
|
1116
|
-
strokeLinejoin: "round",
|
|
1117
|
-
children: [
|
|
1118
|
-
/* @__PURE__ */ jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
1119
|
-
/* @__PURE__ */ jsx("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
1120
|
-
]
|
|
1121
|
-
}
|
|
1122
|
-
),
|
|
1123
|
-
warning: /* @__PURE__ */ jsxs(
|
|
1124
|
-
"svg",
|
|
1125
|
-
{
|
|
1126
|
-
width: "20",
|
|
1127
|
-
height: "20",
|
|
1128
|
-
viewBox: "0 0 24 24",
|
|
1129
|
-
fill: "none",
|
|
1130
|
-
stroke: "currentColor",
|
|
1131
|
-
strokeWidth: "2",
|
|
1132
|
-
strokeLinecap: "round",
|
|
1133
|
-
strokeLinejoin: "round",
|
|
1134
|
-
children: [
|
|
1135
|
-
/* @__PURE__ */ jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
1136
|
-
/* @__PURE__ */ jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
1137
|
-
/* @__PURE__ */ jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
1138
|
-
]
|
|
1139
|
-
}
|
|
1140
|
-
),
|
|
1141
|
-
error: /* @__PURE__ */ jsxs(
|
|
1142
|
-
"svg",
|
|
1143
|
-
{
|
|
1144
|
-
width: "20",
|
|
1145
|
-
height: "20",
|
|
1146
|
-
viewBox: "0 0 24 24",
|
|
1147
|
-
fill: "none",
|
|
1148
|
-
stroke: "currentColor",
|
|
1149
|
-
strokeWidth: "2",
|
|
1150
|
-
strokeLinecap: "round",
|
|
1151
|
-
strokeLinejoin: "round",
|
|
1152
|
-
children: [
|
|
1153
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1154
|
-
/* @__PURE__ */ jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
1155
|
-
/* @__PURE__ */ jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
1156
|
-
]
|
|
1157
|
-
}
|
|
1158
|
-
)
|
|
1159
|
-
};
|
|
1160
|
-
var Alert = React39.forwardRef(
|
|
1161
|
-
({ className, variant = "info", title, icon, children, ...props }, ref) => {
|
|
1162
|
-
const renderedIcon = icon || DefaultIcons[variant];
|
|
1163
|
-
return /* @__PURE__ */ jsxs(
|
|
1164
|
-
"div",
|
|
1165
|
-
{
|
|
1166
|
-
ref,
|
|
1167
|
-
role: "alert",
|
|
1168
|
-
className: clsx28("ds-alert", `ds-alert--${variant}`, className),
|
|
1169
|
-
...props,
|
|
1170
|
-
children: [
|
|
1171
|
-
/* @__PURE__ */ jsx("div", { className: "ds-alert__icon", "aria-hidden": "true", children: renderedIcon }),
|
|
1172
|
-
/* @__PURE__ */ jsxs("div", { className: "ds-alert__content", children: [
|
|
1173
|
-
title && /* @__PURE__ */ jsx("div", { className: "ds-alert__title", children: title }),
|
|
1174
|
-
children && /* @__PURE__ */ jsx("div", { className: "ds-alert__description", children })
|
|
1175
|
-
] })
|
|
1176
|
-
]
|
|
1177
|
-
}
|
|
1178
|
-
);
|
|
1179
|
-
}
|
|
1180
|
-
);
|
|
1181
|
-
Alert.displayName = "Alert";
|
|
1182
|
-
var ToastContext = createContext(void 0);
|
|
1183
|
-
var useToast = () => {
|
|
1184
|
-
const context = useContext(ToastContext);
|
|
1185
|
-
if (!context) {
|
|
1186
|
-
throw new Error("useToast must be used within a ToastProvider");
|
|
1187
|
-
}
|
|
1188
|
-
return context;
|
|
1189
|
-
};
|
|
1190
|
-
var ToastItem = ({
|
|
1191
|
-
title,
|
|
1192
|
-
description,
|
|
1193
|
-
variant = "info",
|
|
1194
|
-
action,
|
|
1195
|
-
onDismiss,
|
|
1196
|
-
dismissLabel = "Close"
|
|
1197
|
-
}) => {
|
|
1198
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx28("ds-toast-root", `ds-toast--${variant}`), "data-state": "open", role: "alert", children: [
|
|
1199
|
-
title && /* @__PURE__ */ jsx("div", { className: "ds-toast-title", children: title }),
|
|
1200
|
-
description && /* @__PURE__ */ jsx("div", { className: "ds-toast-description", children: description }),
|
|
1201
|
-
action && /* @__PURE__ */ jsx("div", { className: "ds-toast-action", children: action }),
|
|
1202
|
-
/* @__PURE__ */ jsx(
|
|
1203
|
-
"button",
|
|
1204
|
-
{
|
|
1205
|
-
onClick: onDismiss,
|
|
1206
|
-
style: {
|
|
1207
|
-
background: "transparent",
|
|
1208
|
-
border: "none",
|
|
1209
|
-
color: "var(--text-tertiary)",
|
|
1210
|
-
cursor: "pointer",
|
|
1211
|
-
padding: "4px",
|
|
1212
|
-
marginLeft: "auto",
|
|
1213
|
-
gridColumn: "action",
|
|
1214
|
-
alignSelf: "start"
|
|
1215
|
-
},
|
|
1216
|
-
"aria-label": dismissLabel,
|
|
1217
|
-
children: /* @__PURE__ */ jsxs(
|
|
1218
|
-
"svg",
|
|
1219
|
-
{
|
|
1220
|
-
width: "14",
|
|
1221
|
-
height: "14",
|
|
1222
|
-
viewBox: "0 0 24 24",
|
|
1223
|
-
fill: "none",
|
|
1224
|
-
stroke: "currentColor",
|
|
1225
|
-
strokeWidth: "2",
|
|
1226
|
-
strokeLinecap: "round",
|
|
1227
|
-
strokeLinejoin: "round",
|
|
1228
|
-
children: [
|
|
1229
|
-
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1230
|
-
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1231
|
-
]
|
|
1232
|
-
}
|
|
1233
|
-
)
|
|
1234
|
-
}
|
|
1235
|
-
)
|
|
1236
|
-
] });
|
|
1237
|
-
};
|
|
1238
|
-
var ToastProvider = ({ children }) => {
|
|
1239
|
-
const [toasts, setToasts] = useState([]);
|
|
1240
|
-
const [mounted, setMounted] = useState(false);
|
|
1241
|
-
const idCounter = useRef(0);
|
|
1242
|
-
useEffect(() => setMounted(true), []);
|
|
1243
|
-
const removeToast = useCallback((id) => {
|
|
1244
|
-
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
1245
|
-
}, []);
|
|
1246
|
-
const addToast = useCallback(
|
|
1247
|
-
({ duration = 5e3, ...props }) => {
|
|
1248
|
-
const id = `toast-${++idCounter.current}`;
|
|
1249
|
-
const newToast = { ...props, id, duration };
|
|
1250
|
-
setToasts((prev) => [...prev, newToast]);
|
|
1251
|
-
if (duration !== Infinity) {
|
|
1252
|
-
setTimeout(() => {
|
|
1253
|
-
removeToast(id);
|
|
1254
|
-
}, duration);
|
|
1255
|
-
}
|
|
1256
|
-
},
|
|
1257
|
-
[removeToast]
|
|
1258
|
-
);
|
|
1259
|
-
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { addToast, removeToast }, children: [
|
|
1260
|
-
children,
|
|
1261
|
-
mounted && createPortal(
|
|
1262
|
-
/* @__PURE__ */ jsx("div", { className: "ds-toast-viewport", children: toasts.map((toast) => /* @__PURE__ */ jsx(ToastItem, { ...toast, onDismiss: () => removeToast(toast.id) }, toast.id)) }),
|
|
1263
|
-
document.body
|
|
1264
|
-
)
|
|
1265
|
-
] });
|
|
1266
|
-
};
|
|
1267
|
-
var DropdownMenu = Menu.Root;
|
|
1268
|
-
var DropdownMenuTrigger = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1269
|
-
return /* @__PURE__ */ jsx(
|
|
1270
|
-
Menu.Trigger,
|
|
1271
|
-
{
|
|
1272
|
-
ref,
|
|
1273
|
-
className: clsx28("ds-dropdown-menu__trigger", className),
|
|
1274
|
-
...props
|
|
1275
|
-
}
|
|
1276
|
-
);
|
|
1277
|
-
});
|
|
1278
|
-
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
1279
|
-
var DropdownMenuContent = React39.forwardRef(
|
|
1280
|
-
({ className, side = "bottom", align = "start", sideOffset = 4, alignOffset = 0, ...props }, ref) => {
|
|
1281
|
-
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(
|
|
1282
|
-
Menu.Positioner,
|
|
1283
|
-
{
|
|
1284
|
-
side,
|
|
1285
|
-
align,
|
|
1286
|
-
sideOffset,
|
|
1287
|
-
alignOffset,
|
|
1288
|
-
children: /* @__PURE__ */ jsx(
|
|
1289
|
-
Menu.Popup,
|
|
1290
|
-
{
|
|
1291
|
-
ref,
|
|
1292
|
-
className: clsx28("ds-dropdown-menu__content", className),
|
|
1293
|
-
...props
|
|
1294
|
-
}
|
|
1295
|
-
)
|
|
1296
|
-
}
|
|
1297
|
-
) });
|
|
1298
|
-
}
|
|
1299
|
-
);
|
|
1300
|
-
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
1301
|
-
var DropdownMenuItem = React39.forwardRef(
|
|
1302
|
-
({ className, ...props }, ref) => {
|
|
1303
|
-
return /* @__PURE__ */ jsx(Menu.Item, { ref, className: clsx28("ds-dropdown-menu__item", className), ...props });
|
|
1304
|
-
}
|
|
1305
|
-
);
|
|
1306
|
-
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
1307
|
-
var DropdownMenuSeparator = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1308
|
-
return /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-dropdown-menu__separator", className), ...props });
|
|
1309
|
-
});
|
|
1310
|
-
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
1311
|
-
var DropdownMenuLabel = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1312
|
-
return /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-dropdown-menu__label", className), ...props });
|
|
1313
|
-
});
|
|
1314
|
-
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
1315
|
-
var EmptyState = React39.forwardRef(
|
|
1316
|
-
({ icon, title, description, action, className, ...props }, ref) => {
|
|
1317
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: clsx28("ds-empty-state", className), ...props, children: [
|
|
1318
|
-
icon && /* @__PURE__ */ jsx("div", { className: "ds-empty-state__icon", children: icon }),
|
|
1319
|
-
/* @__PURE__ */ jsx("h3", { className: "ds-empty-state__title", children: title }),
|
|
1320
|
-
description && /* @__PURE__ */ jsx("p", { className: "ds-empty-state__description", children: description }),
|
|
1321
|
-
action && /* @__PURE__ */ jsx("div", { className: "ds-empty-state__action", children: action })
|
|
1322
|
-
] });
|
|
1323
|
-
}
|
|
1324
|
-
);
|
|
1325
|
-
EmptyState.displayName = "EmptyState";
|
|
1326
|
-
var Card = React39.forwardRef(
|
|
1327
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-card", className), ...props })
|
|
1328
|
-
);
|
|
1329
|
-
Card.displayName = "Card";
|
|
1330
|
-
var CardHeader = React39.forwardRef(
|
|
1331
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-card__header", className), ...props })
|
|
1332
|
-
);
|
|
1333
|
-
CardHeader.displayName = "CardHeader";
|
|
1334
|
-
var CardTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: clsx28("ds-card__title", className), ...props }));
|
|
1335
|
-
CardTitle.displayName = "CardTitle";
|
|
1336
|
-
var CardDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: clsx28("ds-card__description", className), ...props }));
|
|
1337
|
-
CardDescription.displayName = "CardDescription";
|
|
1338
|
-
var CardContent = React39.forwardRef(
|
|
1339
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-card__content", className), ...props })
|
|
1340
|
-
);
|
|
1341
|
-
CardContent.displayName = "CardContent";
|
|
1342
|
-
var CardFooter = React39.forwardRef(
|
|
1343
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-card__footer", className), ...props })
|
|
1344
|
-
);
|
|
1345
|
-
CardFooter.displayName = "CardFooter";
|
|
1346
|
-
var AccordionContext = React39.createContext(null);
|
|
1347
|
-
function useAccordionContext() {
|
|
1348
|
-
const ctx = React39.useContext(AccordionContext);
|
|
1349
|
-
if (!ctx) {
|
|
1350
|
-
throw new Error("Accordion compound components must be used within <Accordion>");
|
|
1351
|
-
}
|
|
1352
|
-
return ctx;
|
|
1353
|
-
}
|
|
1354
|
-
var AccordionItemContext = React39.createContext(null);
|
|
1355
|
-
function useAccordionItemContext() {
|
|
1356
|
-
const ctx = React39.useContext(AccordionItemContext);
|
|
1357
|
-
if (!ctx) {
|
|
1358
|
-
throw new Error("AccordionTrigger/AccordionContent must be used within <AccordionItem>");
|
|
1359
|
-
}
|
|
1360
|
-
return ctx;
|
|
1361
|
-
}
|
|
1362
|
-
var Accordion = React39.forwardRef(
|
|
1363
|
-
({ className, type = "single", defaultValue = [], collapsible: _collapsible, children, ...props }, ref) => {
|
|
1364
|
-
const [openItems, setOpenItems] = React39.useState(
|
|
1365
|
-
() => new Set(defaultValue)
|
|
1366
|
-
);
|
|
1367
|
-
const toggle = React39.useCallback(
|
|
1368
|
-
(value) => {
|
|
1369
|
-
setOpenItems((prev) => {
|
|
1370
|
-
const next = new Set(prev);
|
|
1371
|
-
if (next.has(value)) {
|
|
1372
|
-
next.delete(value);
|
|
1373
|
-
} else {
|
|
1374
|
-
if (type === "single") {
|
|
1375
|
-
next.clear();
|
|
1376
|
-
}
|
|
1377
|
-
next.add(value);
|
|
1378
|
-
}
|
|
1379
|
-
return next;
|
|
1380
|
-
});
|
|
1381
|
-
},
|
|
1382
|
-
[type]
|
|
1383
|
-
);
|
|
1384
|
-
const contextValue = React39.useMemo(
|
|
1385
|
-
() => ({ openItems, toggle }),
|
|
1386
|
-
[openItems, toggle]
|
|
1387
|
-
);
|
|
1388
|
-
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-accordion", className), ...props, children }) });
|
|
1389
|
-
}
|
|
1390
|
-
);
|
|
1391
|
-
Accordion.displayName = "Accordion";
|
|
1392
|
-
var AccordionItem = React39.forwardRef(
|
|
1393
|
-
({ className, value, children, ...props }, ref) => {
|
|
1394
|
-
const { openItems } = useAccordionContext();
|
|
1395
|
-
const isOpen = openItems.has(value);
|
|
1396
|
-
const contextValue = React39.useMemo(
|
|
1397
|
-
() => ({ value, isOpen }),
|
|
1398
|
-
[value, isOpen]
|
|
1399
|
-
);
|
|
1400
|
-
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
1401
|
-
"div",
|
|
1402
|
-
{
|
|
1403
|
-
ref,
|
|
1404
|
-
className: clsx28("ds-accordion__item", className),
|
|
1405
|
-
"data-state": isOpen ? "open" : "closed",
|
|
1406
|
-
...props,
|
|
1407
|
-
children
|
|
1408
|
-
}
|
|
1409
|
-
) });
|
|
1410
|
-
}
|
|
1411
|
-
);
|
|
1412
|
-
AccordionItem.displayName = "AccordionItem";
|
|
1413
|
-
var AccordionTrigger = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
1414
|
-
const { toggle } = useAccordionContext();
|
|
1415
|
-
const { value, isOpen } = useAccordionItemContext();
|
|
1416
|
-
return /* @__PURE__ */ jsxs(
|
|
1417
|
-
"button",
|
|
1418
|
-
{
|
|
1419
|
-
ref,
|
|
1420
|
-
type: "button",
|
|
1421
|
-
className: clsx28("ds-accordion__trigger", className),
|
|
1422
|
-
"aria-expanded": isOpen,
|
|
1423
|
-
onClick: () => toggle(value),
|
|
1424
|
-
...props,
|
|
1425
|
-
children: [
|
|
1426
|
-
/* @__PURE__ */ jsx("span", { className: "ds-accordion__trigger-text", children }),
|
|
1427
|
-
/* @__PURE__ */ jsx(
|
|
1428
|
-
"svg",
|
|
1429
|
-
{
|
|
1430
|
-
className: "ds-accordion__chevron",
|
|
1431
|
-
width: "16",
|
|
1432
|
-
height: "16",
|
|
1433
|
-
viewBox: "0 0 24 24",
|
|
1434
|
-
fill: "none",
|
|
1435
|
-
stroke: "currentColor",
|
|
1436
|
-
strokeWidth: "2",
|
|
1437
|
-
strokeLinecap: "round",
|
|
1438
|
-
strokeLinejoin: "round",
|
|
1439
|
-
"aria-hidden": "true",
|
|
1440
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
1441
|
-
}
|
|
1442
|
-
)
|
|
1443
|
-
]
|
|
1444
|
-
}
|
|
1445
|
-
);
|
|
1446
|
-
});
|
|
1447
|
-
AccordionTrigger.displayName = "AccordionTrigger";
|
|
1448
|
-
var AccordionContent = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
1449
|
-
const { isOpen } = useAccordionItemContext();
|
|
1450
|
-
const contentRef = React39.useRef(null);
|
|
1451
|
-
const [height, setHeight] = React39.useState(
|
|
1452
|
-
isOpen ? void 0 : 0
|
|
1453
|
-
);
|
|
1454
|
-
React39.useEffect(() => {
|
|
1455
|
-
const el = contentRef.current;
|
|
1456
|
-
if (!el) return;
|
|
1457
|
-
if (isOpen) {
|
|
1458
|
-
const scrollHeight = el.scrollHeight;
|
|
1459
|
-
setHeight(scrollHeight);
|
|
1460
|
-
const timer = setTimeout(() => setHeight(void 0), 200);
|
|
1461
|
-
return () => clearTimeout(timer);
|
|
1462
|
-
} else {
|
|
1463
|
-
const scrollHeight = el.scrollHeight;
|
|
1464
|
-
setHeight(scrollHeight);
|
|
1465
|
-
requestAnimationFrame(() => {
|
|
1466
|
-
requestAnimationFrame(() => {
|
|
1467
|
-
setHeight(0);
|
|
1468
|
-
});
|
|
1469
|
-
});
|
|
1470
|
-
}
|
|
1471
|
-
}, [isOpen]);
|
|
1472
|
-
return /* @__PURE__ */ jsx(
|
|
1473
|
-
"div",
|
|
1474
|
-
{
|
|
1475
|
-
ref: contentRef,
|
|
1476
|
-
className: clsx28("ds-accordion__content", className),
|
|
1477
|
-
style: {
|
|
1478
|
-
height: height !== void 0 ? `${height}px` : "auto"
|
|
1479
|
-
},
|
|
1480
|
-
hidden: !isOpen && height === 0,
|
|
1481
|
-
...props,
|
|
1482
|
-
children: /* @__PURE__ */ jsx("div", { ref, className: "ds-accordion__content-inner", children })
|
|
1483
|
-
}
|
|
1484
|
-
);
|
|
1485
|
-
});
|
|
1486
|
-
AccordionContent.displayName = "AccordionContent";
|
|
1487
|
-
var Label = React39.forwardRef(
|
|
1488
|
-
({ className, disabled, ...props }, ref) => {
|
|
1489
|
-
return /* @__PURE__ */ jsx(
|
|
1490
|
-
"label",
|
|
1491
|
-
{
|
|
1492
|
-
ref,
|
|
1493
|
-
className: clsx28("ds-label", disabled && "ds-label--disabled", className),
|
|
1494
|
-
"data-disabled": disabled || void 0,
|
|
1495
|
-
...props
|
|
1496
|
-
}
|
|
1497
|
-
);
|
|
1498
|
-
}
|
|
1499
|
-
);
|
|
1500
|
-
Label.displayName = "Label";
|
|
1501
|
-
var Skeleton = React39.forwardRef(
|
|
1502
|
-
({ className, ...props }, ref) => {
|
|
1503
|
-
return /* @__PURE__ */ jsx(
|
|
1504
|
-
"div",
|
|
1505
|
-
{
|
|
1506
|
-
ref,
|
|
1507
|
-
className: clsx28("ds-skeleton", className),
|
|
1508
|
-
...props
|
|
1509
|
-
}
|
|
1510
|
-
);
|
|
1511
|
-
}
|
|
1512
|
-
);
|
|
1513
|
-
Skeleton.displayName = "Skeleton";
|
|
1514
|
-
var Separator = React39.forwardRef(
|
|
1515
|
-
({ className, orientation = "horizontal", ...props }, ref) => {
|
|
1516
|
-
return /* @__PURE__ */ jsx(
|
|
1517
|
-
"div",
|
|
1518
|
-
{
|
|
1519
|
-
ref,
|
|
1520
|
-
role: "separator",
|
|
1521
|
-
"aria-orientation": orientation,
|
|
1522
|
-
className: clsx28(
|
|
1523
|
-
"ds-separator",
|
|
1524
|
-
`ds-separator--${orientation}`,
|
|
1525
|
-
className
|
|
1526
|
-
),
|
|
1527
|
-
...props
|
|
1528
|
-
}
|
|
1529
|
-
);
|
|
1530
|
-
}
|
|
1531
|
-
);
|
|
1532
|
-
Separator.displayName = "Separator";
|
|
1533
|
-
var SheetContext = React39.createContext(void 0);
|
|
1534
|
-
function useSheetContext() {
|
|
1535
|
-
const ctx = React39.useContext(SheetContext);
|
|
1536
|
-
if (!ctx) {
|
|
1537
|
-
throw new Error("Sheet compound components must be used within a <Sheet> parent.");
|
|
1538
|
-
}
|
|
1539
|
-
return ctx;
|
|
1540
|
-
}
|
|
1541
|
-
var Sheet = ({ open: controlledOpen, onOpenChange, children }) => {
|
|
1542
|
-
const [uncontrolledOpen, setUncontrolledOpen] = React39.useState(false);
|
|
1543
|
-
const isControlled = controlledOpen !== void 0;
|
|
1544
|
-
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
1545
|
-
const handleOpenChange = React39.useCallback(
|
|
1546
|
-
(next) => {
|
|
1547
|
-
if (!isControlled) {
|
|
1548
|
-
setUncontrolledOpen(next);
|
|
1549
|
-
}
|
|
1550
|
-
onOpenChange?.(next);
|
|
1551
|
-
},
|
|
1552
|
-
[isControlled, onOpenChange]
|
|
1553
|
-
);
|
|
1554
|
-
return /* @__PURE__ */ jsx(SheetContext.Provider, { value: { open, onOpenChange: handleOpenChange }, children });
|
|
1555
|
-
};
|
|
1556
|
-
Sheet.displayName = "Sheet";
|
|
1557
|
-
var SheetTrigger = React39.forwardRef(
|
|
1558
|
-
({ onClick, asChild = false, ...props }, ref) => {
|
|
1559
|
-
const { onOpenChange } = useSheetContext();
|
|
1560
|
-
const handleClick = (e) => {
|
|
1561
|
-
onOpenChange(true);
|
|
1562
|
-
onClick?.(e);
|
|
1563
|
-
};
|
|
1564
|
-
const Comp = asChild ? Slot : "button";
|
|
1565
|
-
return /* @__PURE__ */ jsx(Comp, { ref, type: "button", onClick: handleClick, ...props });
|
|
1566
|
-
}
|
|
1567
|
-
);
|
|
1568
|
-
SheetTrigger.displayName = "SheetTrigger";
|
|
1569
|
-
var SheetClose = React39.forwardRef(
|
|
1570
|
-
({ onClick, asChild = false, ...props }, ref) => {
|
|
1571
|
-
const { onOpenChange } = useSheetContext();
|
|
1572
|
-
const handleClick = (e) => {
|
|
1573
|
-
onOpenChange(false);
|
|
1574
|
-
onClick?.(e);
|
|
1575
|
-
};
|
|
1576
|
-
const Comp = asChild ? Slot : "button";
|
|
1577
|
-
return /* @__PURE__ */ jsx(Comp, { ref, type: "button", onClick: handleClick, ...props });
|
|
1578
|
-
}
|
|
1579
|
-
);
|
|
1580
|
-
SheetClose.displayName = "SheetClose";
|
|
1581
|
-
var SheetContent = React39.forwardRef(
|
|
1582
|
-
({ side = "right", className, children, ...props }, ref) => {
|
|
1583
|
-
const { open, onOpenChange } = useSheetContext();
|
|
1584
|
-
if (!open) return null;
|
|
1585
|
-
return createPortal(
|
|
1586
|
-
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1587
|
-
/* @__PURE__ */ jsx(
|
|
1588
|
-
"div",
|
|
1589
|
-
{
|
|
1590
|
-
className: "ds-sheet__backdrop",
|
|
1591
|
-
onClick: () => onOpenChange(false),
|
|
1592
|
-
"aria-hidden": "true"
|
|
1593
|
-
}
|
|
1594
|
-
),
|
|
1595
|
-
/* @__PURE__ */ jsx(
|
|
1596
|
-
"div",
|
|
1597
|
-
{
|
|
1598
|
-
ref,
|
|
1599
|
-
role: "dialog",
|
|
1600
|
-
className: clsx28("ds-sheet__content", `ds-sheet__content--${side}`, className),
|
|
1601
|
-
...props,
|
|
1602
|
-
children
|
|
1603
|
-
}
|
|
1604
|
-
)
|
|
1605
|
-
] }),
|
|
1606
|
-
document.body
|
|
1607
|
-
);
|
|
1608
|
-
}
|
|
1609
|
-
);
|
|
1610
|
-
SheetContent.displayName = "SheetContent";
|
|
1611
|
-
var SheetHeader = React39.forwardRef(
|
|
1612
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-sheet__header", className), ...props })
|
|
1613
|
-
);
|
|
1614
|
-
SheetHeader.displayName = "SheetHeader";
|
|
1615
|
-
var SheetTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h2", { ref, className: clsx28("ds-sheet__title", className), ...props }));
|
|
1616
|
-
SheetTitle.displayName = "SheetTitle";
|
|
1617
|
-
var SheetDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: clsx28("ds-sheet__description", className), ...props }));
|
|
1618
|
-
SheetDescription.displayName = "SheetDescription";
|
|
1619
|
-
var SheetFooter = React39.forwardRef(
|
|
1620
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-sheet__footer", className), ...props })
|
|
1621
|
-
);
|
|
1622
|
-
SheetFooter.displayName = "SheetFooter";
|
|
1623
|
-
var AvatarContext = React39.createContext({
|
|
1624
|
-
hasImage: false,
|
|
1625
|
-
imageError: false,
|
|
1626
|
-
onImageError: () => {
|
|
1627
|
-
}
|
|
1628
|
-
});
|
|
1629
|
-
var Avatar = React39.forwardRef(
|
|
1630
|
-
({ size = "md", className, children, ...props }, ref) => {
|
|
1631
|
-
const [imageError, setImageError] = React39.useState(false);
|
|
1632
|
-
const [hasImage, setHasImage] = React39.useState(false);
|
|
1633
|
-
React39.useEffect(() => {
|
|
1634
|
-
let found = false;
|
|
1635
|
-
React39.Children.forEach(children, (child) => {
|
|
1636
|
-
if (React39.isValidElement(child) && child.type === AvatarImage) {
|
|
1637
|
-
found = true;
|
|
1638
|
-
}
|
|
1639
|
-
});
|
|
1640
|
-
setHasImage(found);
|
|
1641
|
-
}, [children]);
|
|
1642
|
-
const onImageError = React39.useCallback(() => {
|
|
1643
|
-
setImageError(true);
|
|
1644
|
-
}, []);
|
|
1645
|
-
return /* @__PURE__ */ jsx(AvatarContext.Provider, { value: { hasImage, imageError, onImageError }, children: /* @__PURE__ */ jsx(
|
|
1646
|
-
"span",
|
|
1647
|
-
{
|
|
1648
|
-
ref,
|
|
1649
|
-
className: clsx28("ds-avatar", `ds-avatar--${size}`, className),
|
|
1650
|
-
...props,
|
|
1651
|
-
children
|
|
1652
|
-
}
|
|
1653
|
-
) });
|
|
1654
|
-
}
|
|
1655
|
-
);
|
|
1656
|
-
Avatar.displayName = "Avatar";
|
|
1657
|
-
var AvatarImage = React39.forwardRef(({ className, onError, ...props }, ref) => {
|
|
1658
|
-
const { imageError, onImageError } = React39.useContext(AvatarContext);
|
|
1659
|
-
const handleError = (e) => {
|
|
1660
|
-
onImageError();
|
|
1661
|
-
onError?.(e);
|
|
1662
|
-
};
|
|
1663
|
-
if (imageError) return null;
|
|
1664
|
-
return /* @__PURE__ */ jsx(
|
|
1665
|
-
"img",
|
|
1666
|
-
{
|
|
1667
|
-
ref,
|
|
1668
|
-
className: clsx28("ds-avatar__image", className),
|
|
1669
|
-
onError: handleError,
|
|
1670
|
-
...props
|
|
1671
|
-
}
|
|
1672
|
-
);
|
|
1673
|
-
});
|
|
1674
|
-
AvatarImage.displayName = "AvatarImage";
|
|
1675
|
-
var AvatarFallback = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1676
|
-
const { hasImage, imageError } = React39.useContext(AvatarContext);
|
|
1677
|
-
if (hasImage && !imageError) return null;
|
|
1678
|
-
return /* @__PURE__ */ jsx("span", { ref, className: clsx28("ds-avatar__fallback", className), ...props });
|
|
1679
|
-
});
|
|
1680
|
-
AvatarFallback.displayName = "AvatarFallback";
|
|
1681
|
-
var PopoverContext = React39.createContext(null);
|
|
1682
|
-
function usePopoverContext() {
|
|
1683
|
-
const context = React39.useContext(PopoverContext);
|
|
1684
|
-
if (!context) {
|
|
1685
|
-
throw new Error("Popover compound components must be used within <Popover>");
|
|
1686
|
-
}
|
|
1687
|
-
return context;
|
|
1688
|
-
}
|
|
1689
|
-
var Popover = ({ open: controlledOpen, onOpenChange, children }) => {
|
|
1690
|
-
const [uncontrolledOpen, setUncontrolledOpen] = React39.useState(false);
|
|
1691
|
-
const isControlled = controlledOpen !== void 0;
|
|
1692
|
-
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
1693
|
-
const setOpen = React39.useCallback(
|
|
1694
|
-
(value) => {
|
|
1695
|
-
if (!isControlled) {
|
|
1696
|
-
setUncontrolledOpen(value);
|
|
1697
|
-
}
|
|
1698
|
-
onOpenChange?.(value);
|
|
1699
|
-
},
|
|
1700
|
-
[isControlled, onOpenChange]
|
|
1701
|
-
);
|
|
1702
|
-
const toggle = React39.useCallback(() => {
|
|
1703
|
-
setOpen(!open);
|
|
1704
|
-
}, [open, setOpen]);
|
|
1705
|
-
const contextValue = React39.useMemo(
|
|
1706
|
-
() => ({ open, setOpen, toggle }),
|
|
1707
|
-
[open, setOpen, toggle]
|
|
1708
|
-
);
|
|
1709
|
-
return /* @__PURE__ */ jsx(PopoverContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { className: "ds-popover", children }) });
|
|
1710
|
-
};
|
|
1711
|
-
Popover.displayName = "Popover";
|
|
1712
|
-
var PopoverTrigger = React39.forwardRef(
|
|
1713
|
-
({ className, onClick, asChild = false, ...props }, ref) => {
|
|
1714
|
-
const { toggle } = usePopoverContext();
|
|
1715
|
-
const handleClick = (e) => {
|
|
1716
|
-
toggle();
|
|
1717
|
-
onClick?.(e);
|
|
1718
|
-
};
|
|
1719
|
-
const Comp = asChild ? Slot : "button";
|
|
1720
|
-
return /* @__PURE__ */ jsx(
|
|
1721
|
-
Comp,
|
|
1722
|
-
{
|
|
1723
|
-
ref,
|
|
1724
|
-
type: "button",
|
|
1725
|
-
className: clsx28("ds-popover__trigger", className),
|
|
1726
|
-
onClick: handleClick,
|
|
1727
|
-
...props
|
|
1728
|
-
}
|
|
1729
|
-
);
|
|
1730
|
-
}
|
|
1731
|
-
);
|
|
1732
|
-
PopoverTrigger.displayName = "PopoverTrigger";
|
|
1733
|
-
var PopoverContent = React39.forwardRef(
|
|
1734
|
-
({ className, side = "bottom", align = "center", ...props }, ref) => {
|
|
1735
|
-
const { open } = usePopoverContext();
|
|
1736
|
-
if (!open) return null;
|
|
1737
|
-
return /* @__PURE__ */ jsx(
|
|
1738
|
-
"div",
|
|
1739
|
-
{
|
|
1740
|
-
ref,
|
|
1741
|
-
className: clsx28(
|
|
1742
|
-
"ds-popover__content",
|
|
1743
|
-
`ds-popover__content--${side}`,
|
|
1744
|
-
`ds-popover__content--align-${align}`,
|
|
1745
|
-
className
|
|
1746
|
-
),
|
|
1747
|
-
...props
|
|
1748
|
-
}
|
|
1749
|
-
);
|
|
1750
|
-
}
|
|
1751
|
-
);
|
|
1752
|
-
PopoverContent.displayName = "PopoverContent";
|
|
1753
|
-
var PopoverClose = React39.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
1754
|
-
const { setOpen } = usePopoverContext();
|
|
1755
|
-
const handleClick = (e) => {
|
|
1756
|
-
setOpen(false);
|
|
1757
|
-
onClick?.(e);
|
|
1758
|
-
};
|
|
1759
|
-
return /* @__PURE__ */ jsx(
|
|
1760
|
-
"button",
|
|
1761
|
-
{
|
|
1762
|
-
ref,
|
|
1763
|
-
type: "button",
|
|
1764
|
-
className: clsx28("ds-popover__close", className),
|
|
1765
|
-
onClick: handleClick,
|
|
1766
|
-
...props
|
|
1767
|
-
}
|
|
1768
|
-
);
|
|
1769
|
-
});
|
|
1770
|
-
PopoverClose.displayName = "PopoverClose";
|
|
1771
|
-
var Progress = React39.forwardRef(
|
|
1772
|
-
({ className, value = 0, max = 100, ...props }, ref) => {
|
|
1773
|
-
const percentage = max > 0 ? Math.min(100, Math.max(0, value / max * 100)) : 0;
|
|
1774
|
-
return /* @__PURE__ */ jsx(
|
|
1775
|
-
"div",
|
|
1776
|
-
{
|
|
1777
|
-
ref,
|
|
1778
|
-
role: "progressbar",
|
|
1779
|
-
"aria-valuenow": value,
|
|
1780
|
-
"aria-valuemin": 0,
|
|
1781
|
-
"aria-valuemax": max,
|
|
1782
|
-
className: clsx28("ds-progress", className),
|
|
1783
|
-
...props,
|
|
1784
|
-
children: /* @__PURE__ */ jsx(
|
|
1785
|
-
"div",
|
|
1786
|
-
{
|
|
1787
|
-
className: "ds-progress__indicator",
|
|
1788
|
-
style: { width: `${percentage}%` }
|
|
1789
|
-
}
|
|
1790
|
-
)
|
|
1791
|
-
}
|
|
1792
|
-
);
|
|
1793
|
-
}
|
|
1794
|
-
);
|
|
1795
|
-
Progress.displayName = "Progress";
|
|
1796
|
-
var ScrollArea = React39.forwardRef(
|
|
1797
|
-
({ className, children, ...props }, ref) => {
|
|
1798
|
-
return /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-scroll-area", className), ...props, children: /* @__PURE__ */ jsx("div", { className: "ds-scroll-area__viewport", children }) });
|
|
1799
|
-
}
|
|
1800
|
-
);
|
|
1801
|
-
ScrollArea.displayName = "ScrollArea";
|
|
1802
|
-
var ScrollBar = React39.forwardRef(
|
|
1803
|
-
({ className, orientation = "vertical", ...props }, ref) => {
|
|
1804
|
-
return /* @__PURE__ */ jsx(
|
|
1805
|
-
"div",
|
|
1806
|
-
{
|
|
1807
|
-
ref,
|
|
1808
|
-
className: clsx28(
|
|
1809
|
-
"ds-scroll-area__scrollbar",
|
|
1810
|
-
`ds-scroll-area__scrollbar--${orientation}`,
|
|
1811
|
-
className
|
|
1812
|
-
),
|
|
1813
|
-
...props
|
|
1814
|
-
}
|
|
1815
|
-
);
|
|
1816
|
-
}
|
|
1817
|
-
);
|
|
1818
|
-
ScrollBar.displayName = "ScrollBar";
|
|
1819
|
-
var Breadcrumb = React39.forwardRef(
|
|
1820
|
-
({ className, "aria-label": ariaLabel = "Breadcrumb", ...props }, ref) => {
|
|
1821
|
-
return /* @__PURE__ */ jsx(
|
|
1822
|
-
"nav",
|
|
1823
|
-
{
|
|
1824
|
-
ref,
|
|
1825
|
-
"aria-label": ariaLabel,
|
|
1826
|
-
className: clsx28("ds-breadcrumb", className),
|
|
1827
|
-
...props
|
|
1828
|
-
}
|
|
1829
|
-
);
|
|
1830
|
-
}
|
|
1831
|
-
);
|
|
1832
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
1833
|
-
var BreadcrumbList = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1834
|
-
return /* @__PURE__ */ jsx(
|
|
1835
|
-
"ol",
|
|
1836
|
-
{
|
|
1837
|
-
ref,
|
|
1838
|
-
className: clsx28("ds-breadcrumb__list", className),
|
|
1839
|
-
...props
|
|
1840
|
-
}
|
|
1841
|
-
);
|
|
1842
|
-
});
|
|
1843
|
-
BreadcrumbList.displayName = "BreadcrumbList";
|
|
1844
|
-
var BreadcrumbItem = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1845
|
-
return /* @__PURE__ */ jsx(
|
|
1846
|
-
"li",
|
|
1847
|
-
{
|
|
1848
|
-
ref,
|
|
1849
|
-
className: clsx28("ds-breadcrumb__item", className),
|
|
1850
|
-
...props
|
|
1851
|
-
}
|
|
1852
|
-
);
|
|
1853
|
-
});
|
|
1854
|
-
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
1855
|
-
var BreadcrumbLink = React39.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
1856
|
-
const Comp = asChild ? Slot : "a";
|
|
1857
|
-
return /* @__PURE__ */ jsx(
|
|
1858
|
-
Comp,
|
|
1859
|
-
{
|
|
1860
|
-
ref,
|
|
1861
|
-
className: clsx28("ds-breadcrumb__link", className),
|
|
1862
|
-
...props
|
|
1863
|
-
}
|
|
1864
|
-
);
|
|
1865
|
-
});
|
|
1866
|
-
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
1867
|
-
var BreadcrumbPage = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1868
|
-
return /* @__PURE__ */ jsx(
|
|
1869
|
-
"span",
|
|
1870
|
-
{
|
|
1871
|
-
ref,
|
|
1872
|
-
role: "link",
|
|
1873
|
-
"aria-current": "page",
|
|
1874
|
-
"aria-disabled": "true",
|
|
1875
|
-
className: clsx28("ds-breadcrumb__page", className),
|
|
1876
|
-
...props
|
|
1877
|
-
}
|
|
1878
|
-
);
|
|
1879
|
-
});
|
|
1880
|
-
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
1881
|
-
var BreadcrumbSeparator = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
1882
|
-
return /* @__PURE__ */ jsx(
|
|
1883
|
-
"li",
|
|
1884
|
-
{
|
|
1885
|
-
ref,
|
|
1886
|
-
role: "presentation",
|
|
1887
|
-
"aria-hidden": "true",
|
|
1888
|
-
className: clsx28("ds-breadcrumb__separator", className),
|
|
1889
|
-
...props,
|
|
1890
|
-
children: children ?? "/"
|
|
1891
|
-
}
|
|
1892
|
-
);
|
|
1893
|
-
});
|
|
1894
|
-
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
1895
|
-
var BreadcrumbEllipsis = React39.forwardRef(({ className, ...props }, ref) => {
|
|
1896
|
-
return /* @__PURE__ */ jsx(
|
|
1897
|
-
"span",
|
|
1898
|
-
{
|
|
1899
|
-
ref,
|
|
1900
|
-
className: clsx28("ds-breadcrumb__ellipsis", className),
|
|
1901
|
-
...props,
|
|
1902
|
-
children: "\u2026"
|
|
1903
|
-
}
|
|
1904
|
-
);
|
|
1905
|
-
});
|
|
1906
|
-
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
1907
|
-
var Toggle = React39.forwardRef(
|
|
1908
|
-
({
|
|
1909
|
-
className,
|
|
1910
|
-
pressed: controlledPressed,
|
|
1911
|
-
onPressedChange,
|
|
1912
|
-
variant = "default",
|
|
1913
|
-
size = "md",
|
|
1914
|
-
onClick,
|
|
1915
|
-
...props
|
|
1916
|
-
}, ref) => {
|
|
1917
|
-
const [uncontrolledPressed, setUncontrolledPressed] = React39.useState(false);
|
|
1918
|
-
const isControlled = controlledPressed !== void 0;
|
|
1919
|
-
const pressed = isControlled ? controlledPressed : uncontrolledPressed;
|
|
1920
|
-
const handleClick = (e) => {
|
|
1921
|
-
const next = !pressed;
|
|
1922
|
-
if (!isControlled) {
|
|
1923
|
-
setUncontrolledPressed(next);
|
|
1924
|
-
}
|
|
1925
|
-
onPressedChange?.(next);
|
|
1926
|
-
onClick?.(e);
|
|
1927
|
-
};
|
|
1928
|
-
return /* @__PURE__ */ jsx(
|
|
1929
|
-
"button",
|
|
1930
|
-
{
|
|
1931
|
-
ref,
|
|
1932
|
-
type: "button",
|
|
1933
|
-
className: clsx28(
|
|
1934
|
-
"ds-toggle",
|
|
1935
|
-
`ds-toggle--${variant}`,
|
|
1936
|
-
`ds-toggle--${size}`,
|
|
1937
|
-
className
|
|
1938
|
-
),
|
|
1939
|
-
"aria-pressed": pressed,
|
|
1940
|
-
"data-state": pressed ? "on" : "off",
|
|
1941
|
-
onClick: handleClick,
|
|
1942
|
-
...props
|
|
1943
|
-
}
|
|
1944
|
-
);
|
|
1945
|
-
}
|
|
1946
|
-
);
|
|
1947
|
-
Toggle.displayName = "Toggle";
|
|
1948
|
-
var ToggleGroupContext = React39.createContext({
|
|
1949
|
-
type: "single",
|
|
1950
|
-
value: [],
|
|
1951
|
-
onItemToggle: () => {
|
|
1952
|
-
}
|
|
1953
|
-
});
|
|
1954
|
-
var ToggleGroup = React39.forwardRef(
|
|
1955
|
-
({ className, type, value, onValueChange, children, ...props }, ref) => {
|
|
1956
|
-
const normalizedValue = React39.useMemo(() => {
|
|
1957
|
-
if (value === void 0) return [];
|
|
1958
|
-
return Array.isArray(value) ? value : [value];
|
|
1959
|
-
}, [value]);
|
|
1960
|
-
const onItemToggle = React39.useCallback(
|
|
1961
|
-
(itemValue) => {
|
|
1962
|
-
if (type === "single") {
|
|
1963
|
-
const next = normalizedValue.includes(itemValue) ? "" : itemValue;
|
|
1964
|
-
onValueChange?.(next);
|
|
1965
|
-
} else {
|
|
1966
|
-
const next = normalizedValue.includes(itemValue) ? normalizedValue.filter((v) => v !== itemValue) : [...normalizedValue, itemValue];
|
|
1967
|
-
onValueChange?.(next);
|
|
1968
|
-
}
|
|
1969
|
-
},
|
|
1970
|
-
[type, normalizedValue, onValueChange]
|
|
1971
|
-
);
|
|
1972
|
-
const ctx = React39.useMemo(
|
|
1973
|
-
() => ({ type, value: normalizedValue, onItemToggle }),
|
|
1974
|
-
[type, normalizedValue, onItemToggle]
|
|
1975
|
-
);
|
|
1976
|
-
return /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
1977
|
-
"div",
|
|
1978
|
-
{
|
|
1979
|
-
ref,
|
|
1980
|
-
role: "group",
|
|
1981
|
-
className: clsx28("ds-toggle-group", className),
|
|
1982
|
-
...props,
|
|
1983
|
-
children
|
|
1984
|
-
}
|
|
1985
|
-
) });
|
|
1986
|
-
}
|
|
1987
|
-
);
|
|
1988
|
-
ToggleGroup.displayName = "ToggleGroup";
|
|
1989
|
-
var ToggleGroupItem = React39.forwardRef(({ className, value, children, onClick, ...props }, ref) => {
|
|
1990
|
-
const ctx = React39.useContext(ToggleGroupContext);
|
|
1991
|
-
const pressed = ctx.value.includes(value);
|
|
1992
|
-
const handleClick = (e) => {
|
|
1993
|
-
ctx.onItemToggle(value);
|
|
1994
|
-
onClick?.(e);
|
|
1995
|
-
};
|
|
1996
|
-
return /* @__PURE__ */ jsx(
|
|
1997
|
-
"button",
|
|
1998
|
-
{
|
|
1999
|
-
ref,
|
|
2000
|
-
type: "button",
|
|
2001
|
-
"aria-pressed": pressed,
|
|
2002
|
-
className: clsx28(
|
|
2003
|
-
"ds-toggle-group__item",
|
|
2004
|
-
pressed && "ds-toggle-group__item--pressed",
|
|
2005
|
-
className
|
|
2006
|
-
),
|
|
2007
|
-
onClick: handleClick,
|
|
2008
|
-
...props,
|
|
2009
|
-
children
|
|
2010
|
-
}
|
|
2011
|
-
);
|
|
2012
|
-
});
|
|
2013
|
-
ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
2014
|
-
var Slider = React39.forwardRef(
|
|
2015
|
-
({
|
|
2016
|
-
className,
|
|
2017
|
-
value: controlledValue,
|
|
2018
|
-
defaultValue = 50,
|
|
2019
|
-
min = 0,
|
|
2020
|
-
max = 100,
|
|
2021
|
-
step = 1,
|
|
2022
|
-
onValueChange,
|
|
2023
|
-
disabled = false,
|
|
2024
|
-
...props
|
|
2025
|
-
}, ref) => {
|
|
2026
|
-
const [uncontrolledValue, setUncontrolledValue] = React39.useState(defaultValue);
|
|
2027
|
-
const isControlled = controlledValue !== void 0;
|
|
2028
|
-
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
2029
|
-
const handleChange = (e) => {
|
|
2030
|
-
const next = Number(e.target.value);
|
|
2031
|
-
if (!isControlled) {
|
|
2032
|
-
setUncontrolledValue(next);
|
|
2033
|
-
}
|
|
2034
|
-
onValueChange?.(next);
|
|
2035
|
-
};
|
|
2036
|
-
const percentage = (value - min) / (max - min) * 100;
|
|
2037
|
-
return /* @__PURE__ */ jsxs(
|
|
2038
|
-
"div",
|
|
2039
|
-
{
|
|
2040
|
-
ref,
|
|
2041
|
-
className: clsx28("ds-slider", disabled && "ds-slider--disabled", className),
|
|
2042
|
-
...props,
|
|
2043
|
-
children: [
|
|
2044
|
-
/* @__PURE__ */ jsx("div", { className: "ds-slider__track", children: /* @__PURE__ */ jsx(
|
|
2045
|
-
"div",
|
|
2046
|
-
{
|
|
2047
|
-
className: "ds-slider__range",
|
|
2048
|
-
style: { width: `${percentage}%` }
|
|
2049
|
-
}
|
|
2050
|
-
) }),
|
|
2051
|
-
/* @__PURE__ */ jsx(
|
|
2052
|
-
"input",
|
|
2053
|
-
{
|
|
2054
|
-
type: "range",
|
|
2055
|
-
className: "ds-slider__thumb",
|
|
2056
|
-
role: "slider",
|
|
2057
|
-
min,
|
|
2058
|
-
max,
|
|
2059
|
-
step,
|
|
2060
|
-
value,
|
|
2061
|
-
disabled,
|
|
2062
|
-
onChange: handleChange,
|
|
2063
|
-
"aria-valuemin": min,
|
|
2064
|
-
"aria-valuemax": max,
|
|
2065
|
-
"aria-valuenow": value
|
|
2066
|
-
}
|
|
2067
|
-
)
|
|
2068
|
-
]
|
|
2069
|
-
}
|
|
2070
|
-
);
|
|
2071
|
-
}
|
|
2072
|
-
);
|
|
2073
|
-
Slider.displayName = "Slider";
|
|
2074
|
-
var CollapsibleContext = React39.createContext(null);
|
|
2075
|
-
function useCollapsibleContext() {
|
|
2076
|
-
const context = React39.useContext(CollapsibleContext);
|
|
2077
|
-
if (!context) {
|
|
2078
|
-
throw new Error("Collapsible compound components must be used within <Collapsible>");
|
|
2079
|
-
}
|
|
2080
|
-
return context;
|
|
2081
|
-
}
|
|
2082
|
-
var Collapsible = React39.forwardRef(
|
|
2083
|
-
({ className, open: controlledOpen, onOpenChange, children, ...props }, ref) => {
|
|
2084
|
-
const [uncontrolledOpen, setUncontrolledOpen] = React39.useState(false);
|
|
2085
|
-
const isControlled = controlledOpen !== void 0;
|
|
2086
|
-
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
2087
|
-
const toggle = React39.useCallback(() => {
|
|
2088
|
-
const next = !open;
|
|
2089
|
-
if (!isControlled) {
|
|
2090
|
-
setUncontrolledOpen(next);
|
|
2091
|
-
}
|
|
2092
|
-
onOpenChange?.(next);
|
|
2093
|
-
}, [open, isControlled, onOpenChange]);
|
|
2094
|
-
const contextValue = React39.useMemo(
|
|
2095
|
-
() => ({ open, toggle }),
|
|
2096
|
-
[open, toggle]
|
|
2097
|
-
);
|
|
2098
|
-
return /* @__PURE__ */ jsx(CollapsibleContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
2099
|
-
"div",
|
|
2100
|
-
{
|
|
2101
|
-
ref,
|
|
2102
|
-
className: clsx28("ds-collapsible", className),
|
|
2103
|
-
"data-state": open ? "open" : "closed",
|
|
2104
|
-
...props,
|
|
2105
|
-
children
|
|
2106
|
-
}
|
|
2107
|
-
) });
|
|
2108
|
-
}
|
|
2109
|
-
);
|
|
2110
|
-
Collapsible.displayName = "Collapsible";
|
|
2111
|
-
var CollapsibleTrigger = React39.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
2112
|
-
const { toggle } = useCollapsibleContext();
|
|
2113
|
-
const handleClick = (e) => {
|
|
2114
|
-
toggle();
|
|
2115
|
-
onClick?.(e);
|
|
2116
|
-
};
|
|
2117
|
-
return /* @__PURE__ */ jsx(
|
|
2118
|
-
"button",
|
|
2119
|
-
{
|
|
2120
|
-
ref,
|
|
2121
|
-
type: "button",
|
|
2122
|
-
className: clsx28("ds-collapsible__trigger", className),
|
|
2123
|
-
onClick: handleClick,
|
|
2124
|
-
...props
|
|
2125
|
-
}
|
|
2126
|
-
);
|
|
2127
|
-
});
|
|
2128
|
-
CollapsibleTrigger.displayName = "CollapsibleTrigger";
|
|
2129
|
-
var CollapsibleContent = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
2130
|
-
const { open } = useCollapsibleContext();
|
|
2131
|
-
const contentRef = React39.useRef(null);
|
|
2132
|
-
const [maxHeight, setMaxHeight] = React39.useState(
|
|
2133
|
-
open ? void 0 : 0
|
|
2134
|
-
);
|
|
2135
|
-
React39.useEffect(() => {
|
|
2136
|
-
const el = contentRef.current;
|
|
2137
|
-
if (!el) return;
|
|
2138
|
-
if (open) {
|
|
2139
|
-
const scrollHeight = el.scrollHeight;
|
|
2140
|
-
setMaxHeight(scrollHeight);
|
|
2141
|
-
const timer = setTimeout(() => setMaxHeight(void 0), 200);
|
|
2142
|
-
return () => clearTimeout(timer);
|
|
2143
|
-
} else {
|
|
2144
|
-
const scrollHeight = el.scrollHeight;
|
|
2145
|
-
setMaxHeight(scrollHeight);
|
|
2146
|
-
requestAnimationFrame(() => {
|
|
2147
|
-
requestAnimationFrame(() => {
|
|
2148
|
-
setMaxHeight(0);
|
|
2149
|
-
});
|
|
2150
|
-
});
|
|
2151
|
-
}
|
|
2152
|
-
}, [open]);
|
|
2153
|
-
return /* @__PURE__ */ jsx(
|
|
2154
|
-
"div",
|
|
2155
|
-
{
|
|
2156
|
-
ref: contentRef,
|
|
2157
|
-
className: clsx28("ds-collapsible__content", className),
|
|
2158
|
-
"data-state": open ? "open" : "closed",
|
|
2159
|
-
style: {
|
|
2160
|
-
maxHeight: maxHeight !== void 0 ? `${maxHeight}px` : "none"
|
|
2161
|
-
},
|
|
2162
|
-
hidden: !open && maxHeight === 0,
|
|
2163
|
-
...props,
|
|
2164
|
-
children: /* @__PURE__ */ jsx("div", { ref, className: "ds-collapsible__content-inner", children })
|
|
2165
|
-
}
|
|
2166
|
-
);
|
|
2167
|
-
});
|
|
2168
|
-
CollapsibleContent.displayName = "CollapsibleContent";
|
|
2169
|
-
var HoverCardContext = React39.createContext(null);
|
|
2170
|
-
function useHoverCardContext() {
|
|
2171
|
-
const context = React39.useContext(HoverCardContext);
|
|
2172
|
-
if (!context) {
|
|
2173
|
-
throw new Error("HoverCard compound components must be used within <HoverCard>");
|
|
2174
|
-
}
|
|
2175
|
-
return context;
|
|
2176
|
-
}
|
|
2177
|
-
var HoverCard = ({
|
|
2178
|
-
openDelay = 200,
|
|
2179
|
-
closeDelay = 100,
|
|
2180
|
-
children
|
|
2181
|
-
}) => {
|
|
2182
|
-
const [open, setOpen] = React39.useState(false);
|
|
2183
|
-
const openTimerRef = React39.useRef();
|
|
2184
|
-
const closeTimerRef = React39.useRef();
|
|
2185
|
-
const onOpen = React39.useCallback(() => {
|
|
2186
|
-
clearTimeout(closeTimerRef.current);
|
|
2187
|
-
openTimerRef.current = setTimeout(() => setOpen(true), openDelay);
|
|
2188
|
-
}, [openDelay]);
|
|
2189
|
-
const onClose = React39.useCallback(() => {
|
|
2190
|
-
clearTimeout(openTimerRef.current);
|
|
2191
|
-
closeTimerRef.current = setTimeout(() => setOpen(false), closeDelay);
|
|
2192
|
-
}, [closeDelay]);
|
|
2193
|
-
React39.useEffect(() => {
|
|
2194
|
-
return () => {
|
|
2195
|
-
clearTimeout(openTimerRef.current);
|
|
2196
|
-
clearTimeout(closeTimerRef.current);
|
|
2197
|
-
};
|
|
2198
|
-
}, []);
|
|
2199
|
-
const contextValue = React39.useMemo(
|
|
2200
|
-
() => ({ open, onOpen, onClose }),
|
|
2201
|
-
[open, onOpen, onClose]
|
|
2202
|
-
);
|
|
2203
|
-
return /* @__PURE__ */ jsx(HoverCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { className: "ds-hover-card", children }) });
|
|
2204
|
-
};
|
|
2205
|
-
HoverCard.displayName = "HoverCard";
|
|
2206
|
-
var HoverCardTrigger = React39.forwardRef(({ className, onMouseEnter, onMouseLeave, ...props }, ref) => {
|
|
2207
|
-
const { onOpen, onClose } = useHoverCardContext();
|
|
2208
|
-
const handleMouseEnter = (e) => {
|
|
2209
|
-
onOpen();
|
|
2210
|
-
onMouseEnter?.(e);
|
|
2211
|
-
};
|
|
2212
|
-
const handleMouseLeave = (e) => {
|
|
2213
|
-
onClose();
|
|
2214
|
-
onMouseLeave?.(e);
|
|
2215
|
-
};
|
|
2216
|
-
return /* @__PURE__ */ jsx(
|
|
2217
|
-
"span",
|
|
2218
|
-
{
|
|
2219
|
-
ref,
|
|
2220
|
-
className: clsx28("ds-hover-card__trigger", className),
|
|
2221
|
-
onMouseEnter: handleMouseEnter,
|
|
2222
|
-
onMouseLeave: handleMouseLeave,
|
|
2223
|
-
...props
|
|
2224
|
-
}
|
|
2225
|
-
);
|
|
2226
|
-
});
|
|
2227
|
-
HoverCardTrigger.displayName = "HoverCardTrigger";
|
|
2228
|
-
var HoverCardContent = React39.forwardRef(
|
|
2229
|
-
({ className, side = "bottom", align = "center", onMouseEnter, onMouseLeave, ...props }, ref) => {
|
|
2230
|
-
const { open, onOpen, onClose } = useHoverCardContext();
|
|
2231
|
-
const handleMouseEnter = (e) => {
|
|
2232
|
-
onOpen();
|
|
2233
|
-
onMouseEnter?.(e);
|
|
2234
|
-
};
|
|
2235
|
-
const handleMouseLeave = (e) => {
|
|
2236
|
-
onClose();
|
|
2237
|
-
onMouseLeave?.(e);
|
|
2238
|
-
};
|
|
2239
|
-
if (!open) return null;
|
|
2240
|
-
return /* @__PURE__ */ jsx(
|
|
2241
|
-
"div",
|
|
2242
|
-
{
|
|
2243
|
-
ref,
|
|
2244
|
-
className: clsx28(
|
|
2245
|
-
"ds-hover-card__content",
|
|
2246
|
-
`ds-hover-card__content--${side}`,
|
|
2247
|
-
`ds-hover-card__content--align-${align}`,
|
|
2248
|
-
className
|
|
2249
|
-
),
|
|
2250
|
-
onMouseEnter: handleMouseEnter,
|
|
2251
|
-
onMouseLeave: handleMouseLeave,
|
|
2252
|
-
...props
|
|
2253
|
-
}
|
|
2254
|
-
);
|
|
2255
|
-
}
|
|
2256
|
-
);
|
|
2257
|
-
HoverCardContent.displayName = "HoverCardContent";
|
|
2258
|
-
var AspectRatio = React39.forwardRef(
|
|
2259
|
-
({ className, ratio = 1, style, children, ...props }, ref) => {
|
|
2260
|
-
return /* @__PURE__ */ jsx(
|
|
2261
|
-
"div",
|
|
2262
|
-
{
|
|
2263
|
-
ref,
|
|
2264
|
-
className: clsx28("ds-aspect-ratio", className),
|
|
2265
|
-
style: { ...style, paddingBottom: `${1 / ratio * 100}%` },
|
|
2266
|
-
...props,
|
|
2267
|
-
children
|
|
2268
|
-
}
|
|
2269
|
-
);
|
|
2270
|
-
}
|
|
2271
|
-
);
|
|
2272
|
-
AspectRatio.displayName = "AspectRatio";
|
|
2273
|
-
var Pagination = React39.forwardRef(
|
|
2274
|
-
({ className, "aria-label": ariaLabel = "pagination", ...props }, ref) => {
|
|
2275
|
-
return /* @__PURE__ */ jsx(
|
|
2276
|
-
"nav",
|
|
2277
|
-
{
|
|
2278
|
-
ref,
|
|
2279
|
-
role: "navigation",
|
|
2280
|
-
"aria-label": ariaLabel,
|
|
2281
|
-
className: clsx28("ds-pagination", className),
|
|
2282
|
-
...props
|
|
2283
|
-
}
|
|
2284
|
-
);
|
|
2285
|
-
}
|
|
2286
|
-
);
|
|
2287
|
-
Pagination.displayName = "Pagination";
|
|
2288
|
-
var PaginationContent = React39.forwardRef(({ className, ...props }, ref) => {
|
|
2289
|
-
return /* @__PURE__ */ jsx(
|
|
2290
|
-
"ul",
|
|
2291
|
-
{
|
|
2292
|
-
ref,
|
|
2293
|
-
className: clsx28("ds-pagination__content", className),
|
|
2294
|
-
...props
|
|
2295
|
-
}
|
|
2296
|
-
);
|
|
2297
|
-
});
|
|
2298
|
-
PaginationContent.displayName = "PaginationContent";
|
|
2299
|
-
var PaginationItem = React39.forwardRef(({ className, ...props }, ref) => {
|
|
2300
|
-
return /* @__PURE__ */ jsx(
|
|
2301
|
-
"li",
|
|
2302
|
-
{
|
|
2303
|
-
ref,
|
|
2304
|
-
className: clsx28("ds-pagination__item", className),
|
|
2305
|
-
...props
|
|
2306
|
-
}
|
|
2307
|
-
);
|
|
2308
|
-
});
|
|
2309
|
-
PaginationItem.displayName = "PaginationItem";
|
|
2310
|
-
var PaginationLink = React39.forwardRef(({ className, isActive = false, size = "md", asChild = false, ...props }, ref) => {
|
|
2311
|
-
const Comp = asChild ? Slot : "button";
|
|
2312
|
-
return /* @__PURE__ */ jsx(
|
|
2313
|
-
Comp,
|
|
2314
|
-
{
|
|
2315
|
-
ref,
|
|
2316
|
-
"aria-current": isActive ? "page" : void 0,
|
|
2317
|
-
className: clsx28(
|
|
2318
|
-
"ds-pagination__link",
|
|
2319
|
-
`ds-pagination__link--${size}`,
|
|
2320
|
-
isActive && "ds-pagination__link--active",
|
|
2321
|
-
className
|
|
2322
|
-
),
|
|
2323
|
-
...props
|
|
2324
|
-
}
|
|
2325
|
-
);
|
|
2326
|
-
});
|
|
2327
|
-
PaginationLink.displayName = "PaginationLink";
|
|
2328
|
-
var PaginationPrevious = React39.forwardRef(({ className, label = "Previous", "aria-label": ariaLabel = "Go to previous page", ...props }, ref) => {
|
|
2329
|
-
return /* @__PURE__ */ jsxs(
|
|
2330
|
-
PaginationLink,
|
|
2331
|
-
{
|
|
2332
|
-
ref,
|
|
2333
|
-
"aria-label": ariaLabel,
|
|
2334
|
-
className: clsx28("ds-pagination__prev", className),
|
|
2335
|
-
...props,
|
|
2336
|
-
children: [
|
|
2337
|
-
/* @__PURE__ */ jsx(
|
|
2338
|
-
"svg",
|
|
2339
|
-
{
|
|
2340
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2341
|
-
width: "16",
|
|
2342
|
-
height: "16",
|
|
2343
|
-
viewBox: "0 0 24 24",
|
|
2344
|
-
fill: "none",
|
|
2345
|
-
stroke: "currentColor",
|
|
2346
|
-
strokeWidth: "2",
|
|
2347
|
-
strokeLinecap: "round",
|
|
2348
|
-
strokeLinejoin: "round",
|
|
2349
|
-
"aria-hidden": "true",
|
|
2350
|
-
children: /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" })
|
|
2351
|
-
}
|
|
2352
|
-
),
|
|
2353
|
-
/* @__PURE__ */ jsx("span", { children: label })
|
|
2354
|
-
]
|
|
2355
|
-
}
|
|
2356
|
-
);
|
|
2357
|
-
});
|
|
2358
|
-
PaginationPrevious.displayName = "PaginationPrevious";
|
|
2359
|
-
var PaginationNext = React39.forwardRef(({ className, label = "Next", "aria-label": ariaLabel = "Go to next page", ...props }, ref) => {
|
|
2360
|
-
return /* @__PURE__ */ jsxs(
|
|
2361
|
-
PaginationLink,
|
|
2362
|
-
{
|
|
2363
|
-
ref,
|
|
2364
|
-
"aria-label": ariaLabel,
|
|
2365
|
-
className: clsx28("ds-pagination__next", className),
|
|
2366
|
-
...props,
|
|
2367
|
-
children: [
|
|
2368
|
-
/* @__PURE__ */ jsx("span", { children: label }),
|
|
2369
|
-
/* @__PURE__ */ jsx(
|
|
2370
|
-
"svg",
|
|
2371
|
-
{
|
|
2372
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2373
|
-
width: "16",
|
|
2374
|
-
height: "16",
|
|
2375
|
-
viewBox: "0 0 24 24",
|
|
2376
|
-
fill: "none",
|
|
2377
|
-
stroke: "currentColor",
|
|
2378
|
-
strokeWidth: "2",
|
|
2379
|
-
strokeLinecap: "round",
|
|
2380
|
-
strokeLinejoin: "round",
|
|
2381
|
-
"aria-hidden": "true",
|
|
2382
|
-
children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
|
|
2383
|
-
}
|
|
2384
|
-
)
|
|
2385
|
-
]
|
|
2386
|
-
}
|
|
2387
|
-
);
|
|
2388
|
-
});
|
|
2389
|
-
PaginationNext.displayName = "PaginationNext";
|
|
2390
|
-
var PaginationEllipsis = React39.forwardRef(({ className, ...props }, ref) => {
|
|
2391
|
-
return /* @__PURE__ */ jsx(
|
|
2392
|
-
"span",
|
|
2393
|
-
{
|
|
2394
|
-
ref,
|
|
2395
|
-
"aria-hidden": "true",
|
|
2396
|
-
className: clsx28("ds-pagination__ellipsis", className),
|
|
2397
|
-
...props,
|
|
2398
|
-
children: "..."
|
|
2399
|
-
}
|
|
2400
|
-
);
|
|
2401
|
-
});
|
|
2402
|
-
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
2403
|
-
var levelToElement = {
|
|
2404
|
-
display: "h1",
|
|
2405
|
-
h1: "h1",
|
|
2406
|
-
h2: "h2",
|
|
2407
|
-
h3: "h3",
|
|
2408
|
-
h4: "h4",
|
|
2409
|
-
h5: "h5",
|
|
2410
|
-
h6: "h6"
|
|
2411
|
-
};
|
|
2412
|
-
var Heading = React39.forwardRef(
|
|
2413
|
-
({ className, level = "h2", as, children, ...props }, ref) => {
|
|
2414
|
-
const Comp = as ?? levelToElement[level];
|
|
2415
|
-
return /* @__PURE__ */ jsx(
|
|
2416
|
-
Comp,
|
|
2417
|
-
{
|
|
2418
|
-
ref,
|
|
2419
|
-
className: clsx28("ds-heading", `ds-heading--${level}`, className),
|
|
2420
|
-
...props,
|
|
2421
|
-
children
|
|
2422
|
-
}
|
|
2423
|
-
);
|
|
2424
|
-
}
|
|
2425
|
-
);
|
|
2426
|
-
Heading.displayName = "Heading";
|
|
2427
|
-
var Text = React39.forwardRef(
|
|
2428
|
-
({ className, variant = "body", as = "p", children, ...props }, ref) => {
|
|
2429
|
-
const Comp = as;
|
|
2430
|
-
return /* @__PURE__ */ jsx(
|
|
2431
|
-
Comp,
|
|
2432
|
-
{
|
|
2433
|
-
ref,
|
|
2434
|
-
className: clsx28("ds-text", `ds-text--${variant}`, className),
|
|
2435
|
-
...props,
|
|
2436
|
-
children
|
|
2437
|
-
}
|
|
2438
|
-
);
|
|
2439
|
-
}
|
|
2440
|
-
);
|
|
2441
|
-
Text.displayName = "Text";
|
|
2442
|
-
var Prose = React39.forwardRef(
|
|
2443
|
-
({ className, children, ...props }, ref) => {
|
|
2444
|
-
return /* @__PURE__ */ jsx(
|
|
2445
|
-
"div",
|
|
2446
|
-
{
|
|
2447
|
-
ref,
|
|
2448
|
-
className: clsx28("ds-prose", className),
|
|
2449
|
-
...props,
|
|
2450
|
-
children
|
|
2451
|
-
}
|
|
2452
|
-
);
|
|
2453
|
-
}
|
|
2454
|
-
);
|
|
2455
|
-
Prose.displayName = "Prose";
|
|
2456
|
-
var CarouselContext = React39.createContext(void 0);
|
|
2457
|
-
function useCarouselContext() {
|
|
2458
|
-
const ctx = React39.useContext(CarouselContext);
|
|
2459
|
-
if (!ctx) {
|
|
2460
|
-
throw new Error("Carousel compound components must be used within a <Carousel> parent.");
|
|
2461
|
-
}
|
|
2462
|
-
return ctx;
|
|
2463
|
-
}
|
|
2464
|
-
var Carousel = React39.forwardRef(
|
|
2465
|
-
({ className, children, ...props }, ref) => {
|
|
2466
|
-
const scrollRef = React39.useRef(null);
|
|
2467
|
-
return /* @__PURE__ */ jsx(CarouselContext.Provider, { value: { scrollRef }, children: /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-carousel", className), ...props, children }) });
|
|
2468
|
-
}
|
|
2469
|
-
);
|
|
2470
|
-
Carousel.displayName = "Carousel";
|
|
2471
|
-
var CarouselContent = React39.forwardRef(({ className, ...props }, ref) => {
|
|
2472
|
-
const { scrollRef } = useCarouselContext();
|
|
2473
|
-
const mergedRef = React39.useCallback(
|
|
2474
|
-
(node) => {
|
|
2475
|
-
scrollRef.current = node;
|
|
2476
|
-
if (typeof ref === "function") {
|
|
2477
|
-
ref(node);
|
|
2478
|
-
} else if (ref) {
|
|
2479
|
-
ref.current = node;
|
|
2480
|
-
}
|
|
2481
|
-
},
|
|
2482
|
-
[ref, scrollRef]
|
|
2483
|
-
);
|
|
2484
|
-
return /* @__PURE__ */ jsx("div", { ref: mergedRef, className: clsx28("ds-carousel__content", className), ...props });
|
|
2485
|
-
});
|
|
2486
|
-
CarouselContent.displayName = "CarouselContent";
|
|
2487
|
-
var CarouselItem = React39.forwardRef(
|
|
2488
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-carousel__item", className), ...props })
|
|
2489
|
-
);
|
|
2490
|
-
CarouselItem.displayName = "CarouselItem";
|
|
2491
|
-
var CarouselPrevious = React39.forwardRef(({ className, onClick, children, "aria-label": ariaLabel = "Previous slide", ...props }, ref) => {
|
|
2492
|
-
const { scrollRef } = useCarouselContext();
|
|
2493
|
-
const handleClick = (e) => {
|
|
2494
|
-
const container = scrollRef.current;
|
|
2495
|
-
if (container) {
|
|
2496
|
-
const firstItem = container.querySelector(".ds-carousel__item");
|
|
2497
|
-
const scrollAmount = firstItem ? firstItem.clientWidth : container.clientWidth;
|
|
2498
|
-
container.scrollBy({ left: -scrollAmount, behavior: "smooth" });
|
|
2499
|
-
}
|
|
2500
|
-
onClick?.(e);
|
|
2501
|
-
};
|
|
2502
|
-
return /* @__PURE__ */ jsx(
|
|
2503
|
-
"button",
|
|
2504
|
-
{
|
|
2505
|
-
ref,
|
|
2506
|
-
type: "button",
|
|
2507
|
-
className: clsx28("ds-carousel__prev", className),
|
|
2508
|
-
"aria-label": ariaLabel,
|
|
2509
|
-
onClick: handleClick,
|
|
2510
|
-
...props,
|
|
2511
|
-
children: children ?? /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
2512
|
-
"path",
|
|
2513
|
-
{
|
|
2514
|
-
d: "M10 12L6 8L10 4",
|
|
2515
|
-
stroke: "currentColor",
|
|
2516
|
-
strokeWidth: "1.5",
|
|
2517
|
-
strokeLinecap: "round",
|
|
2518
|
-
strokeLinejoin: "round"
|
|
2519
|
-
}
|
|
2520
|
-
) })
|
|
2521
|
-
}
|
|
2522
|
-
);
|
|
2523
|
-
});
|
|
2524
|
-
CarouselPrevious.displayName = "CarouselPrevious";
|
|
2525
|
-
var CarouselNext = React39.forwardRef(({ className, onClick, children, "aria-label": ariaLabel = "Next slide", ...props }, ref) => {
|
|
2526
|
-
const { scrollRef } = useCarouselContext();
|
|
2527
|
-
const handleClick = (e) => {
|
|
2528
|
-
const container = scrollRef.current;
|
|
2529
|
-
if (container) {
|
|
2530
|
-
const firstItem = container.querySelector(".ds-carousel__item");
|
|
2531
|
-
const scrollAmount = firstItem ? firstItem.clientWidth : container.clientWidth;
|
|
2532
|
-
container.scrollBy({ left: scrollAmount, behavior: "smooth" });
|
|
2533
|
-
}
|
|
2534
|
-
onClick?.(e);
|
|
2535
|
-
};
|
|
2536
|
-
return /* @__PURE__ */ jsx(
|
|
2537
|
-
"button",
|
|
2538
|
-
{
|
|
2539
|
-
ref,
|
|
2540
|
-
type: "button",
|
|
2541
|
-
className: clsx28("ds-carousel__next", className),
|
|
2542
|
-
"aria-label": ariaLabel,
|
|
2543
|
-
onClick: handleClick,
|
|
2544
|
-
...props,
|
|
2545
|
-
children: children ?? /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
2546
|
-
"path",
|
|
2547
|
-
{
|
|
2548
|
-
d: "M6 4L10 8L6 12",
|
|
2549
|
-
stroke: "currentColor",
|
|
2550
|
-
strokeWidth: "1.5",
|
|
2551
|
-
strokeLinecap: "round",
|
|
2552
|
-
strokeLinejoin: "round"
|
|
2553
|
-
}
|
|
2554
|
-
) })
|
|
2555
|
-
}
|
|
2556
|
-
);
|
|
2557
|
-
});
|
|
2558
|
-
CarouselNext.displayName = "CarouselNext";
|
|
2559
|
-
function mergeRefs(...refs) {
|
|
2560
|
-
return (node) => {
|
|
2561
|
-
refs.forEach((ref) => {
|
|
2562
|
-
if (typeof ref === "function") ref(node);
|
|
2563
|
-
else if (ref) ref.current = node;
|
|
2564
|
-
});
|
|
2565
|
-
};
|
|
2566
|
-
}
|
|
2567
|
-
var CommandContext = React39.createContext(void 0);
|
|
2568
|
-
function useCommandContext() {
|
|
2569
|
-
const ctx = React39.useContext(CommandContext);
|
|
2570
|
-
if (!ctx) {
|
|
2571
|
-
throw new Error("Command compound components must be used within a <Command> parent.");
|
|
2572
|
-
}
|
|
2573
|
-
return ctx;
|
|
2574
|
-
}
|
|
2575
|
-
function getOptionElements(listEl) {
|
|
2576
|
-
if (!listEl) return [];
|
|
2577
|
-
return Array.from(listEl.querySelectorAll('[role="option"]'));
|
|
2578
|
-
}
|
|
2579
|
-
var Command = React39.forwardRef(
|
|
2580
|
-
({ className, value: controlledValue, onValueChange, onKeyDown, children, ...props }, ref) => {
|
|
2581
|
-
const [uncontrolledValue, setUncontrolledValue] = React39.useState("");
|
|
2582
|
-
const [activeId, setActiveId] = React39.useState(null);
|
|
2583
|
-
const listRef = React39.useRef(null);
|
|
2584
|
-
const isControlled = controlledValue !== void 0;
|
|
2585
|
-
const search = isControlled ? controlledValue : uncontrolledValue;
|
|
2586
|
-
const inputId = React39.useId();
|
|
2587
|
-
const listId = React39.useId();
|
|
2588
|
-
const setSearch = React39.useCallback(
|
|
2589
|
-
(next) => {
|
|
2590
|
-
if (!isControlled) {
|
|
2591
|
-
setUncontrolledValue(next);
|
|
2592
|
-
}
|
|
2593
|
-
onValueChange?.(next);
|
|
2594
|
-
},
|
|
2595
|
-
[isControlled, onValueChange]
|
|
2596
|
-
);
|
|
2597
|
-
React39.useEffect(() => {
|
|
2598
|
-
const frame = requestAnimationFrame(() => {
|
|
2599
|
-
const items = getOptionElements(listRef.current);
|
|
2600
|
-
if (items.length > 0) {
|
|
2601
|
-
setActiveId(items[0].id);
|
|
2602
|
-
} else {
|
|
2603
|
-
setActiveId(null);
|
|
2604
|
-
}
|
|
2605
|
-
});
|
|
2606
|
-
return () => cancelAnimationFrame(frame);
|
|
2607
|
-
}, [search]);
|
|
2608
|
-
const handleKeyDown = React39.useCallback(
|
|
2609
|
-
(e) => {
|
|
2610
|
-
const items = getOptionElements(listRef.current);
|
|
2611
|
-
if (items.length === 0) {
|
|
2612
|
-
onKeyDown?.(e);
|
|
2613
|
-
return;
|
|
2614
|
-
}
|
|
2615
|
-
const currentIndex = items.findIndex((el) => el.id === activeId);
|
|
2616
|
-
switch (e.key) {
|
|
2617
|
-
case "ArrowDown": {
|
|
2618
|
-
e.preventDefault();
|
|
2619
|
-
const nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;
|
|
2620
|
-
setActiveId(items[nextIndex].id);
|
|
2621
|
-
items[nextIndex].scrollIntoView?.({ block: "nearest" });
|
|
2622
|
-
break;
|
|
2623
|
-
}
|
|
2624
|
-
case "ArrowUp": {
|
|
2625
|
-
e.preventDefault();
|
|
2626
|
-
const prevIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;
|
|
2627
|
-
setActiveId(items[prevIndex].id);
|
|
2628
|
-
items[prevIndex].scrollIntoView?.({ block: "nearest" });
|
|
2629
|
-
break;
|
|
2630
|
-
}
|
|
2631
|
-
case "Home": {
|
|
2632
|
-
e.preventDefault();
|
|
2633
|
-
setActiveId(items[0].id);
|
|
2634
|
-
items[0].scrollIntoView?.({ block: "nearest" });
|
|
2635
|
-
break;
|
|
2636
|
-
}
|
|
2637
|
-
case "End": {
|
|
2638
|
-
e.preventDefault();
|
|
2639
|
-
const lastItem = items[items.length - 1];
|
|
2640
|
-
setActiveId(lastItem.id);
|
|
2641
|
-
lastItem.scrollIntoView?.({ block: "nearest" });
|
|
2642
|
-
break;
|
|
2643
|
-
}
|
|
2644
|
-
case "Enter": {
|
|
2645
|
-
const target = e.target;
|
|
2646
|
-
if (target.getAttribute("role") === "option") break;
|
|
2647
|
-
const activeEl = activeId ? document.getElementById(activeId) : null;
|
|
2648
|
-
if (activeEl) {
|
|
2649
|
-
e.preventDefault();
|
|
2650
|
-
activeEl.click();
|
|
2651
|
-
}
|
|
2652
|
-
break;
|
|
2653
|
-
}
|
|
2654
|
-
}
|
|
2655
|
-
onKeyDown?.(e);
|
|
2656
|
-
},
|
|
2657
|
-
[activeId, onKeyDown]
|
|
2658
|
-
);
|
|
2659
|
-
const ctx = React39.useMemo(
|
|
2660
|
-
() => ({ search, setSearch, activeId, setActiveId, listRef, inputId, listId }),
|
|
2661
|
-
[search, setSearch, activeId, inputId, listId]
|
|
2662
|
-
);
|
|
2663
|
-
return /* @__PURE__ */ jsx(CommandContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
2664
|
-
"div",
|
|
2665
|
-
{
|
|
2666
|
-
ref,
|
|
2667
|
-
className: clsx28("ds-command", className),
|
|
2668
|
-
onKeyDown: handleKeyDown,
|
|
2669
|
-
...props,
|
|
2670
|
-
children
|
|
2671
|
-
}
|
|
2672
|
-
) });
|
|
2673
|
-
}
|
|
2674
|
-
);
|
|
2675
|
-
Command.displayName = "Command";
|
|
2676
|
-
var CommandInput = React39.forwardRef(({ className, onChange, ...props }, ref) => {
|
|
2677
|
-
const { search, setSearch, activeId, inputId, listId } = useCommandContext();
|
|
2678
|
-
const handleChange = (e) => {
|
|
2679
|
-
setSearch(e.target.value);
|
|
2680
|
-
onChange?.(e);
|
|
2681
|
-
};
|
|
2682
|
-
return /* @__PURE__ */ jsxs("div", { className: "ds-command__input-wrapper", children: [
|
|
2683
|
-
/* @__PURE__ */ jsxs(
|
|
2684
|
-
"svg",
|
|
2685
|
-
{
|
|
2686
|
-
className: "ds-command__input-icon",
|
|
2687
|
-
width: "16",
|
|
2688
|
-
height: "16",
|
|
2689
|
-
viewBox: "0 0 16 16",
|
|
2690
|
-
fill: "none",
|
|
2691
|
-
"aria-hidden": "true",
|
|
2692
|
-
children: [
|
|
2693
|
-
/* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
2694
|
-
/* @__PURE__ */ jsx(
|
|
2695
|
-
"path",
|
|
2696
|
-
{
|
|
2697
|
-
d: "M11 11L14 14",
|
|
2698
|
-
stroke: "currentColor",
|
|
2699
|
-
strokeWidth: "1.5",
|
|
2700
|
-
strokeLinecap: "round"
|
|
2701
|
-
}
|
|
2702
|
-
)
|
|
2703
|
-
]
|
|
2704
|
-
}
|
|
2705
|
-
),
|
|
2706
|
-
/* @__PURE__ */ jsx(
|
|
2707
|
-
"input",
|
|
2708
|
-
{
|
|
2709
|
-
ref,
|
|
2710
|
-
id: inputId,
|
|
2711
|
-
type: "text",
|
|
2712
|
-
role: "combobox",
|
|
2713
|
-
"aria-expanded": "true",
|
|
2714
|
-
"aria-controls": listId,
|
|
2715
|
-
"aria-activedescendant": activeId ?? void 0,
|
|
2716
|
-
"aria-autocomplete": "list",
|
|
2717
|
-
autoComplete: "off",
|
|
2718
|
-
className: clsx28("ds-command__input", className),
|
|
2719
|
-
value: search,
|
|
2720
|
-
onChange: handleChange,
|
|
2721
|
-
...props
|
|
2722
|
-
}
|
|
2723
|
-
)
|
|
2724
|
-
] });
|
|
2725
|
-
});
|
|
2726
|
-
CommandInput.displayName = "CommandInput";
|
|
2727
|
-
var CommandList = React39.forwardRef(
|
|
2728
|
-
({ className, ...props }, ref) => {
|
|
2729
|
-
const { listRef, listId } = useCommandContext();
|
|
2730
|
-
return /* @__PURE__ */ jsx(
|
|
2731
|
-
"div",
|
|
2732
|
-
{
|
|
2733
|
-
ref: mergeRefs(ref, listRef),
|
|
2734
|
-
id: listId,
|
|
2735
|
-
role: "listbox",
|
|
2736
|
-
className: clsx28("ds-command__list", className),
|
|
2737
|
-
...props
|
|
2738
|
-
}
|
|
2739
|
-
);
|
|
2740
|
-
}
|
|
2741
|
-
);
|
|
2742
|
-
CommandList.displayName = "CommandList";
|
|
2743
|
-
var CommandEmpty = React39.forwardRef(
|
|
2744
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-command__empty", className), ...props })
|
|
2745
|
-
);
|
|
2746
|
-
CommandEmpty.displayName = "CommandEmpty";
|
|
2747
|
-
var CommandGroup = React39.forwardRef(
|
|
2748
|
-
({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: clsx28("ds-command__group", className), ...props, children: [
|
|
2749
|
-
heading && /* @__PURE__ */ jsx("div", { className: "ds-command__group-heading", children: heading }),
|
|
2750
|
-
children
|
|
2751
|
-
] })
|
|
2752
|
-
);
|
|
2753
|
-
CommandGroup.displayName = "CommandGroup";
|
|
2754
|
-
var CommandItem = React39.forwardRef(
|
|
2755
|
-
({ className, onSelect, onClick, onKeyDown, onPointerEnter, id: externalId, ...props }, ref) => {
|
|
2756
|
-
const generatedId = React39.useId();
|
|
2757
|
-
const { activeId, setActiveId } = useCommandContext();
|
|
2758
|
-
const itemId = externalId || generatedId;
|
|
2759
|
-
const isActive = activeId === itemId;
|
|
2760
|
-
const handleClick = (e) => {
|
|
2761
|
-
onSelect?.();
|
|
2762
|
-
onClick?.(e);
|
|
2763
|
-
};
|
|
2764
|
-
const handleKeyDown = (e) => {
|
|
2765
|
-
if (e.key === "Enter") {
|
|
2766
|
-
onSelect?.();
|
|
2767
|
-
}
|
|
2768
|
-
onKeyDown?.(e);
|
|
2769
|
-
};
|
|
2770
|
-
const handlePointerEnter = (e) => {
|
|
2771
|
-
setActiveId(itemId);
|
|
2772
|
-
onPointerEnter?.(e);
|
|
2773
|
-
};
|
|
2774
|
-
return /* @__PURE__ */ jsx(
|
|
2775
|
-
"div",
|
|
2776
|
-
{
|
|
2777
|
-
ref,
|
|
2778
|
-
id: itemId,
|
|
2779
|
-
role: "option",
|
|
2780
|
-
tabIndex: 0,
|
|
2781
|
-
"aria-selected": isActive,
|
|
2782
|
-
"data-active": isActive || void 0,
|
|
2783
|
-
className: clsx28("ds-command__item", className),
|
|
2784
|
-
onClick: handleClick,
|
|
2785
|
-
onKeyDown: handleKeyDown,
|
|
2786
|
-
onPointerEnter: handlePointerEnter,
|
|
2787
|
-
...props
|
|
2788
|
-
}
|
|
2789
|
-
);
|
|
2790
|
-
}
|
|
2791
|
-
);
|
|
2792
|
-
CommandItem.displayName = "CommandItem";
|
|
2793
|
-
var CommandSeparator = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-command__separator", className), ...props }));
|
|
2794
|
-
CommandSeparator.displayName = "CommandSeparator";
|
|
2795
|
-
var SIZE_CLASSES = {
|
|
2796
|
-
sm: "ds-dialog__content--sm",
|
|
2797
|
-
lg: "ds-dialog__content--lg",
|
|
2798
|
-
xl: "ds-dialog__content--xl"
|
|
2799
|
-
};
|
|
2800
|
-
var CommandDialog = ({
|
|
2801
|
-
open,
|
|
2802
|
-
onOpenChange,
|
|
2803
|
-
title = "Search",
|
|
2804
|
-
size = "lg",
|
|
2805
|
-
className,
|
|
2806
|
-
children
|
|
2807
|
-
}) => /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
|
|
2808
|
-
DialogContent,
|
|
2809
|
-
{
|
|
2810
|
-
className: clsx28("ds-command-dialog", SIZE_CLASSES[size], className),
|
|
2811
|
-
children: [
|
|
2812
|
-
/* @__PURE__ */ jsx(DialogTitle, { className: "ds-command-dialog__sr-title", children: title }),
|
|
2813
|
-
children
|
|
2814
|
-
]
|
|
2815
|
-
}
|
|
2816
|
-
) });
|
|
2817
|
-
CommandDialog.displayName = "CommandDialog";
|
|
2818
|
-
var DrawerContext = React39.createContext(void 0);
|
|
2819
|
-
function useDrawerContext() {
|
|
2820
|
-
const ctx = React39.useContext(DrawerContext);
|
|
2821
|
-
if (!ctx) {
|
|
2822
|
-
throw new Error("Drawer compound components must be used within a <Drawer> parent.");
|
|
2823
|
-
}
|
|
2824
|
-
return ctx;
|
|
2825
|
-
}
|
|
2826
|
-
var Drawer = ({ open: controlledOpen, onOpenChange, children }) => {
|
|
2827
|
-
const [uncontrolledOpen, setUncontrolledOpen] = React39.useState(false);
|
|
2828
|
-
const isControlled = controlledOpen !== void 0;
|
|
2829
|
-
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
2830
|
-
const handleOpenChange = React39.useCallback(
|
|
2831
|
-
(next) => {
|
|
2832
|
-
if (!isControlled) {
|
|
2833
|
-
setUncontrolledOpen(next);
|
|
2834
|
-
}
|
|
2835
|
-
onOpenChange?.(next);
|
|
2836
|
-
},
|
|
2837
|
-
[isControlled, onOpenChange]
|
|
2838
|
-
);
|
|
2839
|
-
return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: { open, onOpenChange: handleOpenChange }, children });
|
|
2840
|
-
};
|
|
2841
|
-
Drawer.displayName = "Drawer";
|
|
2842
|
-
var DrawerTrigger = React39.forwardRef(({ onClick, ...props }, ref) => {
|
|
2843
|
-
const { onOpenChange } = useDrawerContext();
|
|
2844
|
-
const handleClick = (e) => {
|
|
2845
|
-
onOpenChange(true);
|
|
2846
|
-
onClick?.(e);
|
|
2847
|
-
};
|
|
2848
|
-
return /* @__PURE__ */ jsx("button", { ref, type: "button", onClick: handleClick, ...props });
|
|
2849
|
-
});
|
|
2850
|
-
DrawerTrigger.displayName = "DrawerTrigger";
|
|
2851
|
-
var DrawerClose = React39.forwardRef(({ onClick, ...props }, ref) => {
|
|
2852
|
-
const { onOpenChange } = useDrawerContext();
|
|
2853
|
-
const handleClick = (e) => {
|
|
2854
|
-
onOpenChange(false);
|
|
2855
|
-
onClick?.(e);
|
|
2856
|
-
};
|
|
2857
|
-
return /* @__PURE__ */ jsx("button", { ref, type: "button", onClick: handleClick, ...props });
|
|
2858
|
-
});
|
|
2859
|
-
DrawerClose.displayName = "DrawerClose";
|
|
2860
|
-
var DrawerContent = React39.forwardRef(
|
|
2861
|
-
({ className, children, ...props }, ref) => {
|
|
2862
|
-
const { open, onOpenChange } = useDrawerContext();
|
|
2863
|
-
if (!open) return null;
|
|
2864
|
-
return createPortal(
|
|
2865
|
-
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2866
|
-
/* @__PURE__ */ jsx(
|
|
2867
|
-
"div",
|
|
2868
|
-
{
|
|
2869
|
-
className: "ds-drawer__backdrop",
|
|
2870
|
-
onClick: () => onOpenChange(false),
|
|
2871
|
-
"aria-hidden": "true"
|
|
2872
|
-
}
|
|
2873
|
-
),
|
|
2874
|
-
/* @__PURE__ */ jsxs(
|
|
2875
|
-
"div",
|
|
2876
|
-
{
|
|
2877
|
-
ref,
|
|
2878
|
-
role: "dialog",
|
|
2879
|
-
className: clsx28("ds-drawer__content", className),
|
|
2880
|
-
...props,
|
|
2881
|
-
children: [
|
|
2882
|
-
/* @__PURE__ */ jsx("div", { className: "ds-drawer__handle", "aria-hidden": "true", children: /* @__PURE__ */ jsx("div", { className: "ds-drawer__handle-bar" }) }),
|
|
2883
|
-
children
|
|
2884
|
-
]
|
|
2885
|
-
}
|
|
2886
|
-
)
|
|
2887
|
-
] }),
|
|
2888
|
-
document.body
|
|
2889
|
-
);
|
|
2890
|
-
}
|
|
2891
|
-
);
|
|
2892
|
-
DrawerContent.displayName = "DrawerContent";
|
|
2893
|
-
var DrawerHeader = React39.forwardRef(
|
|
2894
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-drawer__header", className), ...props })
|
|
2895
|
-
);
|
|
2896
|
-
DrawerHeader.displayName = "DrawerHeader";
|
|
2897
|
-
var DrawerTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h2", { ref, className: clsx28("ds-drawer__title", className), ...props }));
|
|
2898
|
-
DrawerTitle.displayName = "DrawerTitle";
|
|
2899
|
-
var DrawerDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: clsx28("ds-drawer__description", className), ...props }));
|
|
2900
|
-
DrawerDescription.displayName = "DrawerDescription";
|
|
2901
|
-
var DrawerFooter = React39.forwardRef(
|
|
2902
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-drawer__footer", className), ...props })
|
|
2903
|
-
);
|
|
2904
|
-
DrawerFooter.displayName = "DrawerFooter";
|
|
2905
|
-
var DEFAULT_WEEKDAY_LABELS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
2906
|
-
var DEFAULT_MONTH_NAMES = [
|
|
2907
|
-
"January",
|
|
2908
|
-
"February",
|
|
2909
|
-
"March",
|
|
2910
|
-
"April",
|
|
2911
|
-
"May",
|
|
2912
|
-
"June",
|
|
2913
|
-
"July",
|
|
2914
|
-
"August",
|
|
2915
|
-
"September",
|
|
2916
|
-
"October",
|
|
2917
|
-
"November",
|
|
2918
|
-
"December"
|
|
2919
|
-
];
|
|
2920
|
-
function isSameDay(a, b) {
|
|
2921
|
-
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
2922
|
-
}
|
|
2923
|
-
function getDaysInMonth(year, month) {
|
|
2924
|
-
return new Date(year, month + 1, 0).getDate();
|
|
2925
|
-
}
|
|
2926
|
-
function getCalendarGrid(year, month) {
|
|
2927
|
-
const firstDay = new Date(year, month, 1).getDay();
|
|
2928
|
-
const daysInMonth = getDaysInMonth(year, month);
|
|
2929
|
-
const daysInPrevMonth = getDaysInMonth(year, month - 1);
|
|
2930
|
-
const days = [];
|
|
2931
|
-
for (let i = firstDay - 1; i >= 0; i--) {
|
|
2932
|
-
days.push(new Date(year, month - 1, daysInPrevMonth - i));
|
|
2933
|
-
}
|
|
2934
|
-
for (let d = 1; d <= daysInMonth; d++) {
|
|
2935
|
-
days.push(new Date(year, month, d));
|
|
2936
|
-
}
|
|
2937
|
-
const remaining = 7 - days.length % 7;
|
|
2938
|
-
if (remaining < 7) {
|
|
2939
|
-
for (let d = 1; d <= remaining; d++) {
|
|
2940
|
-
days.push(new Date(year, month + 1, d));
|
|
2941
|
-
}
|
|
2942
|
-
}
|
|
2943
|
-
const weeks = [];
|
|
2944
|
-
for (let i = 0; i < days.length; i += 7) {
|
|
2945
|
-
weeks.push(days.slice(i, i + 7));
|
|
2946
|
-
}
|
|
2947
|
-
return weeks;
|
|
2948
|
-
}
|
|
2949
|
-
var Calendar = React39.forwardRef(
|
|
2950
|
-
({ className, selected, onSelect, month, onMonthChange, labels, ...props }, ref) => {
|
|
2951
|
-
const weekdayLabels = labels?.weekdays ?? DEFAULT_WEEKDAY_LABELS;
|
|
2952
|
-
const monthNames = labels?.months ?? DEFAULT_MONTH_NAMES;
|
|
2953
|
-
const formatDayLabel = labels?.formatDayLabel ?? ((d) => d.toDateString());
|
|
2954
|
-
const today = /* @__PURE__ */ new Date();
|
|
2955
|
-
const [internalMonth, setInternalMonth] = React39.useState(
|
|
2956
|
-
() => month ?? selected ?? /* @__PURE__ */ new Date()
|
|
2957
|
-
);
|
|
2958
|
-
const displayedMonth = month ?? internalMonth;
|
|
2959
|
-
const displayYear = displayedMonth.getFullYear();
|
|
2960
|
-
const displayMonthIndex = displayedMonth.getMonth();
|
|
2961
|
-
const weeks = getCalendarGrid(displayYear, displayMonthIndex);
|
|
2962
|
-
const navigateMonth = (delta) => {
|
|
2963
|
-
const next = new Date(displayYear, displayMonthIndex + delta, 1);
|
|
2964
|
-
if (onMonthChange) {
|
|
2965
|
-
onMonthChange(next);
|
|
2966
|
-
} else {
|
|
2967
|
-
setInternalMonth(next);
|
|
2968
|
-
}
|
|
2969
|
-
};
|
|
2970
|
-
const handleDayClick = (date) => {
|
|
2971
|
-
onSelect?.(date);
|
|
2972
|
-
};
|
|
2973
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: clsx28("ds-calendar", className), ...props, children: [
|
|
2974
|
-
/* @__PURE__ */ jsxs("div", { className: "ds-calendar__header", children: [
|
|
2975
|
-
/* @__PURE__ */ jsx(
|
|
2976
|
-
"button",
|
|
2977
|
-
{
|
|
2978
|
-
type: "button",
|
|
2979
|
-
className: "ds-calendar__nav-button",
|
|
2980
|
-
onClick: () => navigateMonth(-1),
|
|
2981
|
-
"aria-label": labels?.previousMonth ?? "Previous month",
|
|
2982
|
-
children: /* @__PURE__ */ jsx(
|
|
2983
|
-
"svg",
|
|
2984
|
-
{
|
|
2985
|
-
width: "16",
|
|
2986
|
-
height: "16",
|
|
2987
|
-
viewBox: "0 0 24 24",
|
|
2988
|
-
fill: "none",
|
|
2989
|
-
stroke: "currentColor",
|
|
2990
|
-
strokeWidth: "2",
|
|
2991
|
-
strokeLinecap: "round",
|
|
2992
|
-
strokeLinejoin: "round",
|
|
2993
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "15 18 9 12 15 6" })
|
|
2994
|
-
}
|
|
2995
|
-
)
|
|
2996
|
-
}
|
|
2997
|
-
),
|
|
2998
|
-
/* @__PURE__ */ jsxs("div", { className: "ds-calendar__title", children: [
|
|
2999
|
-
monthNames[displayMonthIndex],
|
|
3000
|
-
" ",
|
|
3001
|
-
displayYear
|
|
3002
|
-
] }),
|
|
3003
|
-
/* @__PURE__ */ jsx(
|
|
3004
|
-
"button",
|
|
3005
|
-
{
|
|
3006
|
-
type: "button",
|
|
3007
|
-
className: "ds-calendar__nav-button",
|
|
3008
|
-
onClick: () => navigateMonth(1),
|
|
3009
|
-
"aria-label": labels?.nextMonth ?? "Next month",
|
|
3010
|
-
children: /* @__PURE__ */ jsx(
|
|
3011
|
-
"svg",
|
|
3012
|
-
{
|
|
3013
|
-
width: "16",
|
|
3014
|
-
height: "16",
|
|
3015
|
-
viewBox: "0 0 24 24",
|
|
3016
|
-
fill: "none",
|
|
3017
|
-
stroke: "currentColor",
|
|
3018
|
-
strokeWidth: "2",
|
|
3019
|
-
strokeLinecap: "round",
|
|
3020
|
-
strokeLinejoin: "round",
|
|
3021
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "9 18 15 12 9 6" })
|
|
3022
|
-
}
|
|
3023
|
-
)
|
|
3024
|
-
}
|
|
3025
|
-
)
|
|
3026
|
-
] }),
|
|
3027
|
-
/* @__PURE__ */ jsxs("div", { className: "ds-calendar__grid", role: "grid", children: [
|
|
3028
|
-
/* @__PURE__ */ jsx("div", { className: "ds-calendar__head-row", role: "row", children: weekdayLabels.map((wdLabel) => /* @__PURE__ */ jsx("div", { className: "ds-calendar__head-cell", role: "columnheader", children: wdLabel }, wdLabel)) }),
|
|
3029
|
-
/* @__PURE__ */ jsx("div", { className: "ds-calendar__body", children: weeks.map((week, wi) => /* @__PURE__ */ jsx("div", { className: "ds-calendar__row", role: "row", children: week.map((date, di) => {
|
|
3030
|
-
const isOutside = date.getMonth() !== displayMonthIndex;
|
|
3031
|
-
const isSelected = selected ? isSameDay(date, selected) : false;
|
|
3032
|
-
const isToday = isSameDay(date, today);
|
|
3033
|
-
return /* @__PURE__ */ jsx("div", { className: "ds-calendar__cell", role: "gridcell", children: /* @__PURE__ */ jsx(
|
|
3034
|
-
"button",
|
|
3035
|
-
{
|
|
3036
|
-
type: "button",
|
|
3037
|
-
className: clsx28(
|
|
3038
|
-
"ds-calendar__day",
|
|
3039
|
-
isSelected && "ds-calendar__day--selected",
|
|
3040
|
-
isToday && "ds-calendar__day--today",
|
|
3041
|
-
isOutside && "ds-calendar__day--outside"
|
|
3042
|
-
),
|
|
3043
|
-
onClick: () => handleDayClick(date),
|
|
3044
|
-
tabIndex: isOutside ? -1 : 0,
|
|
3045
|
-
"aria-label": formatDayLabel(date),
|
|
3046
|
-
children: date.getDate()
|
|
3047
|
-
}
|
|
3048
|
-
) }, di);
|
|
3049
|
-
}) }, wi)) })
|
|
3050
|
-
] })
|
|
3051
|
-
] });
|
|
3052
|
-
}
|
|
3053
|
-
);
|
|
3054
|
-
Calendar.displayName = "Calendar";
|
|
3055
|
-
var InputOTPContext = React39.createContext({
|
|
3056
|
-
value: "",
|
|
3057
|
-
activeIndex: -1
|
|
3058
|
-
});
|
|
3059
|
-
var InputOTP = React39.forwardRef(
|
|
3060
|
-
({ className, length = 6, value = "", onChange, children, "aria-label": ariaLabel = "One-time password", ...props }, ref) => {
|
|
3061
|
-
const inputRef = React39.useRef(null);
|
|
3062
|
-
const [activeIndex, setActiveIndex] = React39.useState(-1);
|
|
3063
|
-
const handleChange = (e) => {
|
|
3064
|
-
const newValue = e.target.value.replace(/[^0-9]/g, "").slice(0, length);
|
|
3065
|
-
onChange?.(newValue);
|
|
3066
|
-
};
|
|
3067
|
-
const handleFocus = () => {
|
|
3068
|
-
setActiveIndex(Math.min(value.length, length - 1));
|
|
3069
|
-
};
|
|
3070
|
-
const handleBlur = () => {
|
|
3071
|
-
setActiveIndex(-1);
|
|
3072
|
-
};
|
|
3073
|
-
const handleKeyDown = (e) => {
|
|
3074
|
-
if (e.key === "Backspace" && value.length > 0) {
|
|
3075
|
-
onChange?.(value.slice(0, -1));
|
|
3076
|
-
}
|
|
3077
|
-
};
|
|
3078
|
-
const handleContainerClick = () => {
|
|
3079
|
-
inputRef.current?.focus();
|
|
3080
|
-
};
|
|
3081
|
-
const contextValue = React39.useMemo(
|
|
3082
|
-
() => ({ value, activeIndex }),
|
|
3083
|
-
[value, activeIndex]
|
|
3084
|
-
);
|
|
3085
|
-
return /* @__PURE__ */ jsx(InputOTPContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(
|
|
3086
|
-
"div",
|
|
3087
|
-
{
|
|
3088
|
-
ref,
|
|
3089
|
-
className: clsx28("ds-input-otp", className),
|
|
3090
|
-
onClick: handleContainerClick,
|
|
3091
|
-
...props,
|
|
3092
|
-
children: [
|
|
3093
|
-
/* @__PURE__ */ jsx(
|
|
3094
|
-
"input",
|
|
3095
|
-
{
|
|
3096
|
-
ref: inputRef,
|
|
3097
|
-
type: "text",
|
|
3098
|
-
inputMode: "numeric",
|
|
3099
|
-
autoComplete: "one-time-code",
|
|
3100
|
-
pattern: "[0-9]*",
|
|
3101
|
-
maxLength: length,
|
|
3102
|
-
value,
|
|
3103
|
-
onChange: handleChange,
|
|
3104
|
-
onFocus: handleFocus,
|
|
3105
|
-
onBlur: handleBlur,
|
|
3106
|
-
onKeyDown: handleKeyDown,
|
|
3107
|
-
className: "ds-input-otp__hidden-input",
|
|
3108
|
-
"aria-label": ariaLabel
|
|
3109
|
-
}
|
|
3110
|
-
),
|
|
3111
|
-
children
|
|
3112
|
-
]
|
|
3113
|
-
}
|
|
3114
|
-
) });
|
|
3115
|
-
}
|
|
3116
|
-
);
|
|
3117
|
-
InputOTP.displayName = "InputOTP";
|
|
3118
|
-
var InputOTPGroup = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3119
|
-
return /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-input-otp__group", className), ...props });
|
|
3120
|
-
});
|
|
3121
|
-
InputOTPGroup.displayName = "InputOTPGroup";
|
|
3122
|
-
var InputOTPSlot = React39.forwardRef(
|
|
3123
|
-
({ className, index, ...props }, ref) => {
|
|
3124
|
-
const { value, activeIndex } = React39.useContext(InputOTPContext);
|
|
3125
|
-
const char = value[index] ?? "";
|
|
3126
|
-
const isActive = activeIndex === index;
|
|
3127
|
-
const isFilled = char !== "";
|
|
3128
|
-
return /* @__PURE__ */ jsx(
|
|
3129
|
-
"div",
|
|
3130
|
-
{
|
|
3131
|
-
ref,
|
|
3132
|
-
className: clsx28(
|
|
3133
|
-
"ds-input-otp__slot",
|
|
3134
|
-
isActive && "ds-input-otp__slot--active",
|
|
3135
|
-
isFilled && "ds-input-otp__slot--filled",
|
|
3136
|
-
className
|
|
3137
|
-
),
|
|
3138
|
-
...props,
|
|
3139
|
-
children: char
|
|
3140
|
-
}
|
|
3141
|
-
);
|
|
3142
|
-
}
|
|
3143
|
-
);
|
|
3144
|
-
InputOTPSlot.displayName = "InputOTPSlot";
|
|
3145
|
-
var InputOTPSeparator = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3146
|
-
return /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-input-otp__separator", className), role: "separator", ...props, children: /* @__PURE__ */ jsx(
|
|
3147
|
-
"svg",
|
|
3148
|
-
{
|
|
3149
|
-
width: "8",
|
|
3150
|
-
height: "8",
|
|
3151
|
-
viewBox: "0 0 8 8",
|
|
3152
|
-
fill: "currentColor",
|
|
3153
|
-
children: /* @__PURE__ */ jsx("circle", { cx: "4", cy: "4", r: "2" })
|
|
3154
|
-
}
|
|
3155
|
-
) });
|
|
3156
|
-
});
|
|
3157
|
-
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
3158
|
-
var ContextMenuContext = React39.createContext({
|
|
3159
|
-
open: false,
|
|
3160
|
-
position: { x: 0, y: 0 },
|
|
3161
|
-
onClose: () => {
|
|
3162
|
-
}
|
|
3163
|
-
});
|
|
3164
|
-
function ContextMenu({ children }) {
|
|
3165
|
-
const [open, setOpen] = React39.useState(false);
|
|
3166
|
-
const [position, setPosition] = React39.useState({ x: 0, y: 0 });
|
|
3167
|
-
const handleOpen = React39.useCallback((x, y) => {
|
|
3168
|
-
setPosition({ x, y });
|
|
3169
|
-
setOpen(true);
|
|
3170
|
-
}, []);
|
|
3171
|
-
const handleClose = React39.useCallback(() => {
|
|
3172
|
-
setOpen(false);
|
|
3173
|
-
}, []);
|
|
3174
|
-
const contextValue = React39.useMemo(
|
|
3175
|
-
() => ({ open, position, onClose: handleClose }),
|
|
3176
|
-
[open, position, handleClose]
|
|
3177
|
-
);
|
|
3178
|
-
return /* @__PURE__ */ jsx(ContextMenuInternalContext.Provider, { value: { onOpen: handleOpen }, children: /* @__PURE__ */ jsx(ContextMenuContext.Provider, { value: contextValue, children }) });
|
|
3179
|
-
}
|
|
3180
|
-
ContextMenu.displayName = "ContextMenu";
|
|
3181
|
-
var ContextMenuInternalContext = React39.createContext({ onOpen: () => {
|
|
3182
|
-
} });
|
|
3183
|
-
var ContextMenuTrigger = React39.forwardRef(({ className, onContextMenu, ...props }, ref) => {
|
|
3184
|
-
const { onOpen } = React39.useContext(ContextMenuInternalContext);
|
|
3185
|
-
const handleContextMenu = (e) => {
|
|
3186
|
-
e.preventDefault();
|
|
3187
|
-
onOpen(e.clientX, e.clientY);
|
|
3188
|
-
onContextMenu?.(e);
|
|
3189
|
-
};
|
|
3190
|
-
return /* @__PURE__ */ jsx(
|
|
3191
|
-
"div",
|
|
3192
|
-
{
|
|
3193
|
-
ref,
|
|
3194
|
-
className: clsx28("ds-context-menu__trigger", className),
|
|
3195
|
-
onContextMenu: handleContextMenu,
|
|
3196
|
-
...props
|
|
3197
|
-
}
|
|
3198
|
-
);
|
|
3199
|
-
});
|
|
3200
|
-
ContextMenuTrigger.displayName = "ContextMenuTrigger";
|
|
3201
|
-
var ContextMenuContent = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3202
|
-
const { open, position, onClose } = React39.useContext(ContextMenuContext);
|
|
3203
|
-
const contentRef = React39.useRef(null);
|
|
3204
|
-
const mergedRef = React39.useCallback(
|
|
3205
|
-
(node) => {
|
|
3206
|
-
contentRef.current = node;
|
|
3207
|
-
if (typeof ref === "function") ref(node);
|
|
3208
|
-
else if (ref) ref.current = node;
|
|
3209
|
-
},
|
|
3210
|
-
[ref]
|
|
3211
|
-
);
|
|
3212
|
-
React39.useEffect(() => {
|
|
3213
|
-
if (!open) return;
|
|
3214
|
-
const handleClickOutside = (e) => {
|
|
3215
|
-
if (contentRef.current && !contentRef.current.contains(e.target)) {
|
|
3216
|
-
onClose();
|
|
3217
|
-
}
|
|
3218
|
-
};
|
|
3219
|
-
const handleEscape = (e) => {
|
|
3220
|
-
if (e.key === "Escape") {
|
|
3221
|
-
onClose();
|
|
3222
|
-
}
|
|
3223
|
-
};
|
|
3224
|
-
const timer = setTimeout(() => {
|
|
3225
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
3226
|
-
}, 0);
|
|
3227
|
-
document.addEventListener("keydown", handleEscape);
|
|
3228
|
-
return () => {
|
|
3229
|
-
clearTimeout(timer);
|
|
3230
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
3231
|
-
document.removeEventListener("keydown", handleEscape);
|
|
3232
|
-
};
|
|
3233
|
-
}, [open, onClose]);
|
|
3234
|
-
if (!open) return null;
|
|
3235
|
-
return ReactDOM.createPortal(
|
|
3236
|
-
/* @__PURE__ */ jsx(
|
|
3237
|
-
"div",
|
|
3238
|
-
{
|
|
3239
|
-
ref: mergedRef,
|
|
3240
|
-
role: "menu",
|
|
3241
|
-
className: clsx28("ds-context-menu__content", className),
|
|
3242
|
-
style: { top: position.y, left: position.x },
|
|
3243
|
-
...props
|
|
3244
|
-
}
|
|
3245
|
-
),
|
|
3246
|
-
document.body
|
|
3247
|
-
);
|
|
3248
|
-
});
|
|
3249
|
-
ContextMenuContent.displayName = "ContextMenuContent";
|
|
3250
|
-
var ContextMenuItem = React39.forwardRef(
|
|
3251
|
-
({ className, onSelect, onClick, ...props }, ref) => {
|
|
3252
|
-
const { onClose } = React39.useContext(ContextMenuContext);
|
|
3253
|
-
const handleClick = (e) => {
|
|
3254
|
-
onSelect?.();
|
|
3255
|
-
onClose();
|
|
3256
|
-
onClick?.(e);
|
|
3257
|
-
};
|
|
3258
|
-
return /* @__PURE__ */ jsx(
|
|
3259
|
-
"div",
|
|
3260
|
-
{
|
|
3261
|
-
ref,
|
|
3262
|
-
role: "menuitem",
|
|
3263
|
-
className: clsx28("ds-context-menu__item", className),
|
|
3264
|
-
onClick: handleClick,
|
|
3265
|
-
...props
|
|
3266
|
-
}
|
|
3267
|
-
);
|
|
3268
|
-
}
|
|
3269
|
-
);
|
|
3270
|
-
ContextMenuItem.displayName = "ContextMenuItem";
|
|
3271
|
-
var ContextMenuSeparator = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3272
|
-
return /* @__PURE__ */ jsx(
|
|
3273
|
-
"div",
|
|
3274
|
-
{
|
|
3275
|
-
ref,
|
|
3276
|
-
role: "separator",
|
|
3277
|
-
className: clsx28("ds-context-menu__separator", className),
|
|
3278
|
-
...props
|
|
3279
|
-
}
|
|
3280
|
-
);
|
|
3281
|
-
});
|
|
3282
|
-
ContextMenuSeparator.displayName = "ContextMenuSeparator";
|
|
3283
|
-
var ContextMenuLabel = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3284
|
-
return /* @__PURE__ */ jsx(
|
|
3285
|
-
"div",
|
|
3286
|
-
{
|
|
3287
|
-
ref,
|
|
3288
|
-
className: clsx28("ds-context-menu__label", className),
|
|
3289
|
-
...props
|
|
3290
|
-
}
|
|
3291
|
-
);
|
|
3292
|
-
});
|
|
3293
|
-
ContextMenuLabel.displayName = "ContextMenuLabel";
|
|
3294
|
-
var FormFieldContext = React39.createContext(void 0);
|
|
3295
|
-
function useFormField() {
|
|
3296
|
-
const ctx = React39.useContext(FormFieldContext);
|
|
3297
|
-
if (!ctx) {
|
|
3298
|
-
throw new Error("useFormField must be used within a <FormField>");
|
|
3299
|
-
}
|
|
3300
|
-
return ctx;
|
|
3301
|
-
}
|
|
3302
|
-
var FormItemContext = React39.createContext(void 0);
|
|
3303
|
-
function FormField({ name, children, value, onChange, onBlur, error }) {
|
|
3304
|
-
const id = React39.useId();
|
|
3305
|
-
const contextValue = React39.useMemo(
|
|
3306
|
-
() => ({ id: `${id}-form-item`, name, error }),
|
|
3307
|
-
[id, name, error]
|
|
3308
|
-
);
|
|
3309
|
-
const fieldProps = React39.useMemo(
|
|
3310
|
-
() => ({
|
|
3311
|
-
value: value ?? "",
|
|
3312
|
-
onChange: onChange ?? (() => {
|
|
3313
|
-
}),
|
|
3314
|
-
onBlur: onBlur ?? (() => {
|
|
3315
|
-
}),
|
|
3316
|
-
error,
|
|
3317
|
-
id: `${id}-form-item`
|
|
3318
|
-
}),
|
|
3319
|
-
[value, onChange, onBlur, error, id]
|
|
3320
|
-
);
|
|
3321
|
-
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: contextValue, children: children(fieldProps) });
|
|
3322
|
-
}
|
|
3323
|
-
FormField.displayName = "FormField";
|
|
3324
|
-
var FormItem = React39.forwardRef(
|
|
3325
|
-
({ className, ...props }, ref) => {
|
|
3326
|
-
const id = React39.useId();
|
|
3327
|
-
const contextValue = React39.useMemo(() => ({ id }), [id]);
|
|
3328
|
-
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-form__item", className), ...props }) });
|
|
3329
|
-
}
|
|
3330
|
-
);
|
|
3331
|
-
FormItem.displayName = "FormItem";
|
|
3332
|
-
var FormLabel = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3333
|
-
const fieldCtx = React39.useContext(FormFieldContext);
|
|
3334
|
-
const hasError = !!fieldCtx?.error;
|
|
3335
|
-
return /* @__PURE__ */ jsx(
|
|
3336
|
-
"label",
|
|
3337
|
-
{
|
|
3338
|
-
ref,
|
|
3339
|
-
htmlFor: fieldCtx?.id,
|
|
3340
|
-
className: clsx28("ds-form__label", hasError && "ds-form__label--error", className),
|
|
3341
|
-
...props
|
|
3342
|
-
}
|
|
3343
|
-
);
|
|
3344
|
-
});
|
|
3345
|
-
FormLabel.displayName = "FormLabel";
|
|
3346
|
-
var FormControl = React39.forwardRef(
|
|
3347
|
-
({ className, children, ...props }, ref) => {
|
|
3348
|
-
const fieldCtx = React39.useContext(FormFieldContext);
|
|
3349
|
-
const descriptionId = fieldCtx ? `${fieldCtx.id}-description` : void 0;
|
|
3350
|
-
const messageId = fieldCtx ? `${fieldCtx.id}-message` : void 0;
|
|
3351
|
-
const hasError = !!fieldCtx?.error;
|
|
3352
|
-
return /* @__PURE__ */ jsx("div", { ref, className: clsx28("ds-form__control", className), ...props, children: React39.isValidElement(children) ? React39.cloneElement(children, {
|
|
3353
|
-
id: fieldCtx?.id,
|
|
3354
|
-
"aria-describedby": descriptionId,
|
|
3355
|
-
"aria-invalid": hasError || void 0,
|
|
3356
|
-
"aria-errormessage": hasError ? messageId : void 0
|
|
3357
|
-
}) : children });
|
|
3358
|
-
}
|
|
3359
|
-
);
|
|
3360
|
-
FormControl.displayName = "FormControl";
|
|
3361
|
-
var FormDescription = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3362
|
-
const fieldCtx = React39.useContext(FormFieldContext);
|
|
3363
|
-
return /* @__PURE__ */ jsx(
|
|
3364
|
-
"p",
|
|
3365
|
-
{
|
|
3366
|
-
ref,
|
|
3367
|
-
id: fieldCtx ? `${fieldCtx.id}-description` : void 0,
|
|
3368
|
-
className: clsx28("ds-form__description", className),
|
|
3369
|
-
...props
|
|
3370
|
-
}
|
|
3371
|
-
);
|
|
3372
|
-
});
|
|
3373
|
-
FormDescription.displayName = "FormDescription";
|
|
3374
|
-
var FormMessage = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
3375
|
-
const fieldCtx = React39.useContext(FormFieldContext);
|
|
3376
|
-
const message = children ?? fieldCtx?.error;
|
|
3377
|
-
if (!message) return null;
|
|
3378
|
-
return /* @__PURE__ */ jsx(
|
|
3379
|
-
"p",
|
|
3380
|
-
{
|
|
3381
|
-
ref,
|
|
3382
|
-
id: fieldCtx ? `${fieldCtx.id}-message` : void 0,
|
|
3383
|
-
role: "alert",
|
|
3384
|
-
className: clsx28("ds-form__message", className),
|
|
3385
|
-
...props,
|
|
3386
|
-
children: message
|
|
3387
|
-
}
|
|
3388
|
-
);
|
|
3389
|
-
});
|
|
3390
|
-
FormMessage.displayName = "FormMessage";
|
|
3391
|
-
|
|
3392
|
-
// src/components/LayoutPrimitives/utils.ts
|
|
3393
|
-
var SPACING_ALIASES = {
|
|
3394
|
-
xs: "var(--space-2)",
|
|
3395
|
-
sm: "var(--space-3)",
|
|
3396
|
-
md: "var(--space-4)",
|
|
3397
|
-
lg: "var(--space-6)",
|
|
3398
|
-
xl: "var(--space-8)",
|
|
3399
|
-
"2xl": "var(--space-12)"
|
|
3400
|
-
};
|
|
3401
|
-
function resolveSpacing(value) {
|
|
3402
|
-
if (value === void 0) return void 0;
|
|
3403
|
-
if (typeof value === "number" && SPACING[value]) {
|
|
3404
|
-
return SPACING[value];
|
|
3405
|
-
}
|
|
3406
|
-
if (typeof value === "string" && value in SPACING_ALIASES) {
|
|
3407
|
-
return SPACING_ALIASES[value];
|
|
3408
|
-
}
|
|
3409
|
-
return String(value);
|
|
3410
|
-
}
|
|
3411
|
-
function extractSpacingStyles(props) {
|
|
3412
|
-
const styles = {};
|
|
3413
|
-
if (props.m !== void 0) styles.margin = resolveSpacing(props.m);
|
|
3414
|
-
if (props.mt !== void 0) styles.marginTop = resolveSpacing(props.mt);
|
|
3415
|
-
if (props.mb !== void 0) styles.marginBottom = resolveSpacing(props.mb);
|
|
3416
|
-
if (props.ml !== void 0) styles.marginLeft = resolveSpacing(props.ml);
|
|
3417
|
-
if (props.mr !== void 0) styles.marginRight = resolveSpacing(props.mr);
|
|
3418
|
-
if (props.mx !== void 0) {
|
|
3419
|
-
styles.marginLeft = resolveSpacing(props.mx);
|
|
3420
|
-
styles.marginRight = resolveSpacing(props.mx);
|
|
3421
|
-
}
|
|
3422
|
-
if (props.my !== void 0) {
|
|
3423
|
-
styles.marginTop = resolveSpacing(props.my);
|
|
3424
|
-
styles.marginBottom = resolveSpacing(props.my);
|
|
3425
|
-
}
|
|
3426
|
-
if (props.p !== void 0) styles.padding = resolveSpacing(props.p);
|
|
3427
|
-
if (props.pt !== void 0) styles.paddingTop = resolveSpacing(props.pt);
|
|
3428
|
-
if (props.pb !== void 0) styles.paddingBottom = resolveSpacing(props.pb);
|
|
3429
|
-
if (props.pl !== void 0) styles.paddingLeft = resolveSpacing(props.pl);
|
|
3430
|
-
if (props.pr !== void 0) styles.paddingRight = resolveSpacing(props.pr);
|
|
3431
|
-
if (props.px !== void 0) {
|
|
3432
|
-
styles.paddingLeft = resolveSpacing(props.px);
|
|
3433
|
-
styles.paddingRight = resolveSpacing(props.px);
|
|
3434
|
-
}
|
|
3435
|
-
if (props.py !== void 0) {
|
|
3436
|
-
styles.paddingTop = resolveSpacing(props.py);
|
|
3437
|
-
styles.paddingBottom = resolveSpacing(props.py);
|
|
3438
|
-
}
|
|
3439
|
-
if (props.gap !== void 0) styles.gap = resolveSpacing(props.gap);
|
|
3440
|
-
return styles;
|
|
3441
|
-
}
|
|
3442
|
-
var Box = forwardRef(
|
|
3443
|
-
({ as: Component = "div", className, style, children, ...props }, ref) => {
|
|
3444
|
-
const spacingStyles = extractSpacingStyles(props);
|
|
3445
|
-
const { m, mt, mb, ml, mr, mx, my, p, pt, pb, pl, pr, px, py, gap, ...domProps } = props;
|
|
3446
|
-
return /* @__PURE__ */ jsx(
|
|
3447
|
-
Component,
|
|
3448
|
-
{
|
|
3449
|
-
ref,
|
|
3450
|
-
className: clsx28("ds-box", className),
|
|
3451
|
-
style: { ...spacingStyles, ...style },
|
|
3452
|
-
...domProps,
|
|
3453
|
-
children
|
|
3454
|
-
}
|
|
3455
|
-
);
|
|
3456
|
-
}
|
|
3457
|
-
);
|
|
3458
|
-
Box.displayName = "Box";
|
|
3459
|
-
var Stack = forwardRef(
|
|
3460
|
-
({ direction = "column", align, justify, wrap, className, style, ...props }, ref) => {
|
|
3461
|
-
return /* @__PURE__ */ jsx(
|
|
3462
|
-
Box,
|
|
3463
|
-
{
|
|
3464
|
-
ref,
|
|
3465
|
-
className: clsx28("ds-stack", direction === "row" && "ds-stack--horizontal", className),
|
|
3466
|
-
style: {
|
|
3467
|
-
alignItems: align,
|
|
3468
|
-
justifyContent: justify === "between" ? "space-between" : justify,
|
|
3469
|
-
flexWrap: wrap ? "wrap" : void 0,
|
|
3470
|
-
...style
|
|
3471
|
-
},
|
|
3472
|
-
...props
|
|
3473
|
-
}
|
|
3474
|
-
);
|
|
3475
|
-
}
|
|
3476
|
-
);
|
|
3477
|
-
Stack.displayName = "Stack";
|
|
3478
|
-
var MAX_RESPONSIVE_COLS = 6;
|
|
3479
|
-
var Grid = forwardRef(
|
|
3480
|
-
({ columns, rows, align, justify, fixed, className, style, ...props }, ref) => {
|
|
3481
|
-
const useColClass = typeof columns === "number" && columns >= 1 && columns <= MAX_RESPONSIVE_COLS;
|
|
3482
|
-
return /* @__PURE__ */ jsx(
|
|
3483
|
-
Box,
|
|
3484
|
-
{
|
|
3485
|
-
ref,
|
|
3486
|
-
className: clsx28(
|
|
3487
|
-
"ds-grid",
|
|
3488
|
-
useColClass && `ds-grid--cols-${columns}`,
|
|
3489
|
-
fixed && "ds-grid--fixed",
|
|
3490
|
-
className
|
|
3491
|
-
),
|
|
3492
|
-
style: {
|
|
3493
|
-
gridTemplateColumns: useColClass ? void 0 : typeof columns === "number" ? `repeat(${columns}, 1fr)` : columns,
|
|
3494
|
-
gridTemplateRows: typeof rows === "number" ? `repeat(${rows}, 1fr)` : rows,
|
|
3495
|
-
alignItems: align,
|
|
3496
|
-
justifyItems: justify,
|
|
3497
|
-
...style
|
|
3498
|
-
},
|
|
3499
|
-
...props
|
|
3500
|
-
}
|
|
3501
|
-
);
|
|
3502
|
-
}
|
|
3503
|
-
);
|
|
3504
|
-
Grid.displayName = "Grid";
|
|
3505
|
-
var CONTAINER_SIZE_MAP = {
|
|
3506
|
-
sm: "768px",
|
|
3507
|
-
// 48rem — max-w-3xl
|
|
3508
|
-
md: "1024px",
|
|
3509
|
-
// 64rem — max-w-5xl
|
|
3510
|
-
lg: "1152px",
|
|
3511
|
-
// 72rem — max-w-6xl
|
|
3512
|
-
xl: "1280px",
|
|
3513
|
-
// 80rem — max-w-7xl
|
|
3514
|
-
full: "100%"
|
|
3515
|
-
};
|
|
3516
|
-
var Container = forwardRef(
|
|
3517
|
-
({ size, fluid, maxWidth, className, style, ...props }, ref) => {
|
|
3518
|
-
let resolvedMaxWidth;
|
|
3519
|
-
if (fluid) {
|
|
3520
|
-
resolvedMaxWidth = "100%";
|
|
3521
|
-
} else if (size) {
|
|
3522
|
-
resolvedMaxWidth = CONTAINER_SIZE_MAP[size];
|
|
3523
|
-
} else {
|
|
3524
|
-
resolvedMaxWidth = maxWidth || "var(--container-default-max, 1200px)";
|
|
3525
|
-
}
|
|
3526
|
-
return /* @__PURE__ */ jsx(
|
|
3527
|
-
Box,
|
|
3528
|
-
{
|
|
3529
|
-
ref,
|
|
3530
|
-
className: clsx28("ds-container", className),
|
|
3531
|
-
style: {
|
|
3532
|
-
maxWidth: resolvedMaxWidth,
|
|
3533
|
-
...style
|
|
3534
|
-
},
|
|
3535
|
-
...props
|
|
3536
|
-
}
|
|
3537
|
-
);
|
|
3538
|
-
}
|
|
3539
|
-
);
|
|
3540
|
-
Container.displayName = "Container";
|
|
3541
|
-
var Section = forwardRef(
|
|
3542
|
-
({ padding = "md", className, children, ...props }, ref) => {
|
|
3543
|
-
return /* @__PURE__ */ jsx(
|
|
3544
|
-
"section",
|
|
3545
|
-
{
|
|
3546
|
-
ref,
|
|
3547
|
-
className: clsx28("ds-section-block", `ds-section-block--${padding}`, className),
|
|
3548
|
-
...props,
|
|
3549
|
-
children
|
|
3550
|
-
}
|
|
3551
|
-
);
|
|
3552
|
-
}
|
|
3553
|
-
);
|
|
3554
|
-
Section.displayName = "Section";
|
|
3555
|
-
var VisuallyHidden = forwardRef(
|
|
3556
|
-
({ className, ...props }, ref) => {
|
|
3557
|
-
return /* @__PURE__ */ jsx("span", { ref, className: clsx28("ds-visually-hidden", className), ...props });
|
|
3558
|
-
}
|
|
3559
|
-
);
|
|
3560
|
-
VisuallyHidden.displayName = "VisuallyHidden";
|
|
3561
|
-
var Tabs = React39.forwardRef(
|
|
3562
|
-
({ className, orientation = "horizontal", ...props }, ref) => {
|
|
3563
|
-
return /* @__PURE__ */ jsx(
|
|
3564
|
-
Tabs$1.Root,
|
|
3565
|
-
{
|
|
3566
|
-
ref,
|
|
3567
|
-
className: clsx28("ds-tabs", `ds-tabs--${orientation}`, className),
|
|
3568
|
-
orientation,
|
|
3569
|
-
...props
|
|
3570
|
-
}
|
|
3571
|
-
);
|
|
3572
|
-
}
|
|
3573
|
-
);
|
|
3574
|
-
Tabs.displayName = "Tabs";
|
|
3575
|
-
var TabsList = React39.forwardRef(
|
|
3576
|
-
({ className, ...props }, ref) => {
|
|
3577
|
-
return /* @__PURE__ */ jsx(Tabs$1.List, { ref, className: clsx28("ds-tabs__list", className), ...props });
|
|
3578
|
-
}
|
|
3579
|
-
);
|
|
3580
|
-
TabsList.displayName = "TabsList";
|
|
3581
|
-
var TabsTrigger = React39.forwardRef(
|
|
3582
|
-
({ className, children, ...props }, ref) => {
|
|
3583
|
-
return /* @__PURE__ */ jsx(Tabs$1.Tab, { ref, className: clsx28("ds-tabs__trigger", className), ...props, children });
|
|
3584
|
-
}
|
|
3585
|
-
);
|
|
3586
|
-
TabsTrigger.displayName = "TabsTrigger";
|
|
3587
|
-
var TabsContent = React39.forwardRef(
|
|
3588
|
-
({ className, ...props }, ref) => {
|
|
3589
|
-
return /* @__PURE__ */ jsx(Tabs$1.Panel, { ref, className: clsx28("ds-tabs__content", className), ...props });
|
|
3590
|
-
}
|
|
3591
|
-
);
|
|
3592
|
-
TabsContent.displayName = "TabsContent";
|
|
3593
|
-
var defaultMessages = {
|
|
3594
|
-
// Common
|
|
3595
|
-
"ds.common.loading": "Loading...",
|
|
3596
|
-
"ds.common.error": "An error occurred",
|
|
3597
|
-
"ds.common.retry": "Retry",
|
|
3598
|
-
"ds.common.cancel": "Cancel",
|
|
3599
|
-
"ds.common.confirm": "Confirm",
|
|
3600
|
-
"ds.common.close": "Close",
|
|
3601
|
-
"ds.common.save": "Save",
|
|
3602
|
-
"ds.common.delete": "Delete",
|
|
3603
|
-
"ds.common.edit": "Edit",
|
|
3604
|
-
"ds.common.submit": "Submit",
|
|
3605
|
-
"ds.common.required": "Required",
|
|
3606
|
-
"ds.common.optional": "Optional",
|
|
3607
|
-
// Alert
|
|
3608
|
-
"ds.alert.dismissLabel": "Dismiss alert",
|
|
3609
|
-
"ds.alert.successTitle": "Success",
|
|
3610
|
-
"ds.alert.errorTitle": "Error",
|
|
3611
|
-
"ds.alert.warningTitle": "Warning",
|
|
3612
|
-
"ds.alert.infoTitle": "Information",
|
|
3613
|
-
// Toast
|
|
3614
|
-
"ds.toast.dismissLabel": "Dismiss notification",
|
|
3615
|
-
// Dialog
|
|
3616
|
-
"ds.dialog.closeLabel": "Close dialog",
|
|
3617
|
-
// Form
|
|
3618
|
-
"ds.form.showPassword": "Show password",
|
|
3619
|
-
"ds.form.hidePassword": "Hide password",
|
|
3620
|
-
"ds.form.clearInput": "Clear input",
|
|
3621
|
-
"ds.form.invalidEmail": "Please enter a valid email address",
|
|
3622
|
-
"ds.form.passwordRequired": "Password is required",
|
|
3623
|
-
// Auth
|
|
3624
|
-
"ds.auth.loginTitle": "Sign in to your account",
|
|
3625
|
-
"ds.auth.signupTitle": "Create your account",
|
|
3626
|
-
"ds.auth.forgotPasswordTitle": "Reset your password",
|
|
3627
|
-
"ds.auth.emailLabel": "Email address",
|
|
3628
|
-
"ds.auth.passwordLabel": "Password",
|
|
3629
|
-
"ds.auth.rememberMe": "Remember me",
|
|
3630
|
-
"ds.auth.forgotPassword": "Forgot your password?",
|
|
3631
|
-
"ds.auth.signIn": "Sign in",
|
|
3632
|
-
"ds.auth.signUp": "Sign up",
|
|
3633
|
-
"ds.auth.sendResetLink": "Send reset link",
|
|
3634
|
-
"ds.auth.backToLogin": "Back to login",
|
|
3635
|
-
// Navigation
|
|
3636
|
-
"ds.nav.menuLabel": "Navigation menu",
|
|
3637
|
-
"ds.nav.toggleSidebar": "Toggle sidebar",
|
|
3638
|
-
"ds.nav.expandSubmenu": "Expand submenu",
|
|
3639
|
-
"ds.nav.collapseSubmenu": "Collapse submenu",
|
|
3640
|
-
// Report
|
|
3641
|
-
"ds.report.confidenceLabel": "Confidence score",
|
|
3642
|
-
"ds.report.dataCoverageLabel": "Data coverage",
|
|
3643
|
-
"ds.report.insufficientData": "Insufficient data",
|
|
3644
|
-
"ds.report.exportPdf": "Export as PDF",
|
|
3645
|
-
"ds.report.exportCsv": "Export as CSV",
|
|
3646
|
-
"ds.report.exportPptx": "Export as PowerPoint",
|
|
3647
|
-
// Appearance
|
|
3648
|
-
"ds.appearance.themeLabel": "Theme",
|
|
3649
|
-
"ds.appearance.darkTheme": "Dark",
|
|
3650
|
-
"ds.appearance.lightTheme": "Light",
|
|
3651
|
-
"ds.appearance.highContrastTheme": "High contrast",
|
|
3652
|
-
"ds.appearance.densityLabel": "Density",
|
|
3653
|
-
"ds.appearance.comfortableDensity": "Comfortable",
|
|
3654
|
-
"ds.appearance.compactDensity": "Compact",
|
|
3655
|
-
// Pagination
|
|
3656
|
-
"ds.pagination.previous": "Previous",
|
|
3657
|
-
"ds.pagination.next": "Next",
|
|
3658
|
-
"ds.pagination.goToPreviousPage": "Go to previous page",
|
|
3659
|
-
"ds.pagination.goToNextPage": "Go to next page",
|
|
3660
|
-
// Calendar
|
|
3661
|
-
"ds.calendar.previousMonth": "Previous month",
|
|
3662
|
-
"ds.calendar.nextMonth": "Next month",
|
|
3663
|
-
// Carousel
|
|
3664
|
-
"ds.carousel.previousSlide": "Previous slide",
|
|
3665
|
-
"ds.carousel.nextSlide": "Next slide",
|
|
3666
|
-
// Methodology
|
|
3667
|
-
"ds.methodology.title": "Methodology",
|
|
3668
|
-
"ds.methodology.sampleSize": "Sample Size",
|
|
3669
|
-
"ds.methodology.dataSources": "Data Sources",
|
|
3670
|
-
"ds.methodology.calculation": "Calculation"
|
|
3671
|
-
};
|
|
3672
|
-
function DSIntlProvider({
|
|
3673
|
-
locale = "en",
|
|
3674
|
-
messages,
|
|
3675
|
-
intlConfig,
|
|
3676
|
-
children
|
|
3677
|
-
}) {
|
|
3678
|
-
const mergedMessages = {
|
|
3679
|
-
...defaultMessages,
|
|
3680
|
-
...messages
|
|
3681
|
-
};
|
|
3682
|
-
return /* @__PURE__ */ jsx(
|
|
3683
|
-
IntlProvider,
|
|
3684
|
-
{
|
|
3685
|
-
locale,
|
|
3686
|
-
messages: mergedMessages,
|
|
3687
|
-
defaultLocale: "en",
|
|
3688
|
-
onError: (err) => {
|
|
3689
|
-
if (process.env.NODE_ENV === "development") {
|
|
3690
|
-
if (err.code !== "MISSING_TRANSLATION") {
|
|
3691
|
-
console.error(err);
|
|
3692
|
-
}
|
|
3693
|
-
}
|
|
3694
|
-
},
|
|
3695
|
-
...intlConfig,
|
|
3696
|
-
children
|
|
3697
|
-
}
|
|
3698
|
-
);
|
|
3699
|
-
}
|
|
3700
|
-
function useMessage() {
|
|
3701
|
-
const intl = useIntl();
|
|
3702
|
-
const formatMessage = useCallback(
|
|
3703
|
-
(descriptor, values) => {
|
|
3704
|
-
return intl.formatMessage(descriptor, values);
|
|
3705
|
-
},
|
|
3706
|
-
[intl]
|
|
3707
|
-
);
|
|
3708
|
-
return formatMessage;
|
|
3709
|
-
}
|
|
3710
|
-
function useLocale() {
|
|
3711
|
-
const intl = useIntl();
|
|
3712
|
-
return intl.locale;
|
|
3713
|
-
}
|
|
3714
|
-
function useIsRTL() {
|
|
3715
|
-
const locale = useLocale();
|
|
3716
|
-
const rtlLocales = [
|
|
3717
|
-
"ar",
|
|
3718
|
-
// Arabic
|
|
3719
|
-
"he",
|
|
3720
|
-
// Hebrew
|
|
3721
|
-
"fa",
|
|
3722
|
-
// Persian/Farsi
|
|
3723
|
-
"ur",
|
|
3724
|
-
// Urdu
|
|
3725
|
-
"ps",
|
|
3726
|
-
// Pashto
|
|
3727
|
-
"sd",
|
|
3728
|
-
// Sindhi
|
|
3729
|
-
"yi"
|
|
3730
|
-
// Yiddish
|
|
3731
|
-
];
|
|
3732
|
-
return rtlLocales.some((rtl) => locale === rtl || locale.startsWith(`${rtl}-`));
|
|
3733
|
-
}
|
|
3734
|
-
function useTextDirection() {
|
|
3735
|
-
const isRTL = useIsRTL();
|
|
3736
|
-
return isRTL ? "rtl" : "ltr";
|
|
3737
|
-
}
|
|
3738
|
-
function useNumberFormat() {
|
|
3739
|
-
const intl = useIntl();
|
|
3740
|
-
const formatNumber = useCallback(
|
|
3741
|
-
(value, options) => {
|
|
3742
|
-
return intl.formatNumber(value, options);
|
|
3743
|
-
},
|
|
3744
|
-
[intl]
|
|
3745
|
-
);
|
|
3746
|
-
return formatNumber;
|
|
3747
|
-
}
|
|
3748
|
-
function useDateFormat() {
|
|
3749
|
-
const intl = useIntl();
|
|
3750
|
-
const formatDate = useCallback(
|
|
3751
|
-
(value, options) => {
|
|
3752
|
-
return intl.formatDate(value, options);
|
|
3753
|
-
},
|
|
3754
|
-
[intl]
|
|
3755
|
-
);
|
|
3756
|
-
return formatDate;
|
|
3757
|
-
}
|
|
3758
|
-
function useRelativeTime() {
|
|
3759
|
-
const intl = useIntl();
|
|
3760
|
-
const formatRelativeTime = useCallback(
|
|
3761
|
-
(value, unit, options) => {
|
|
3762
|
-
return intl.formatRelativeTime(value, unit, options);
|
|
3763
|
-
},
|
|
3764
|
-
[intl]
|
|
3765
|
-
);
|
|
3766
|
-
return formatRelativeTime;
|
|
3767
|
-
}
|
|
3768
|
-
var commonMessages = defineMessages({
|
|
3769
|
-
loading: {
|
|
3770
|
-
id: "ds.common.loading",
|
|
3771
|
-
defaultMessage: "Loading...",
|
|
3772
|
-
description: "Generic loading state text"
|
|
3773
|
-
},
|
|
3774
|
-
error: {
|
|
3775
|
-
id: "ds.common.error",
|
|
3776
|
-
defaultMessage: "An error occurred",
|
|
3777
|
-
description: "Generic error message"
|
|
3778
|
-
},
|
|
3779
|
-
retry: {
|
|
3780
|
-
id: "ds.common.retry",
|
|
3781
|
-
defaultMessage: "Retry",
|
|
3782
|
-
description: "Retry action button text"
|
|
3783
|
-
},
|
|
3784
|
-
cancel: {
|
|
3785
|
-
id: "ds.common.cancel",
|
|
3786
|
-
defaultMessage: "Cancel",
|
|
3787
|
-
description: "Cancel action button text"
|
|
3788
|
-
},
|
|
3789
|
-
confirm: {
|
|
3790
|
-
id: "ds.common.confirm",
|
|
3791
|
-
defaultMessage: "Confirm",
|
|
3792
|
-
description: "Confirm action button text"
|
|
3793
|
-
},
|
|
3794
|
-
close: {
|
|
3795
|
-
id: "ds.common.close",
|
|
3796
|
-
defaultMessage: "Close",
|
|
3797
|
-
description: "Close action button text"
|
|
3798
|
-
},
|
|
3799
|
-
save: {
|
|
3800
|
-
id: "ds.common.save",
|
|
3801
|
-
defaultMessage: "Save",
|
|
3802
|
-
description: "Save action button text"
|
|
3803
|
-
},
|
|
3804
|
-
delete: {
|
|
3805
|
-
id: "ds.common.delete",
|
|
3806
|
-
defaultMessage: "Delete",
|
|
3807
|
-
description: "Delete action button text"
|
|
3808
|
-
},
|
|
3809
|
-
edit: {
|
|
3810
|
-
id: "ds.common.edit",
|
|
3811
|
-
defaultMessage: "Edit",
|
|
3812
|
-
description: "Edit action button text"
|
|
3813
|
-
},
|
|
3814
|
-
submit: {
|
|
3815
|
-
id: "ds.common.submit",
|
|
3816
|
-
defaultMessage: "Submit",
|
|
3817
|
-
description: "Submit action button text"
|
|
3818
|
-
},
|
|
3819
|
-
required: {
|
|
3820
|
-
id: "ds.common.required",
|
|
3821
|
-
defaultMessage: "Required",
|
|
3822
|
-
description: "Field required indicator"
|
|
3823
|
-
},
|
|
3824
|
-
optional: {
|
|
3825
|
-
id: "ds.common.optional",
|
|
3826
|
-
defaultMessage: "Optional",
|
|
3827
|
-
description: "Field optional indicator"
|
|
3828
|
-
}
|
|
3829
|
-
});
|
|
3830
|
-
var alertMessages = defineMessages({
|
|
3831
|
-
dismissLabel: {
|
|
3832
|
-
id: "ds.alert.dismissLabel",
|
|
3833
|
-
defaultMessage: "Dismiss alert",
|
|
3834
|
-
description: "Accessible label for alert dismiss button"
|
|
3835
|
-
},
|
|
3836
|
-
successTitle: {
|
|
3837
|
-
id: "ds.alert.successTitle",
|
|
3838
|
-
defaultMessage: "Success",
|
|
3839
|
-
description: "Default title for success alerts"
|
|
3840
|
-
},
|
|
3841
|
-
errorTitle: {
|
|
3842
|
-
id: "ds.alert.errorTitle",
|
|
3843
|
-
defaultMessage: "Error",
|
|
3844
|
-
description: "Default title for error alerts"
|
|
3845
|
-
},
|
|
3846
|
-
warningTitle: {
|
|
3847
|
-
id: "ds.alert.warningTitle",
|
|
3848
|
-
defaultMessage: "Warning",
|
|
3849
|
-
description: "Default title for warning alerts"
|
|
3850
|
-
},
|
|
3851
|
-
infoTitle: {
|
|
3852
|
-
id: "ds.alert.infoTitle",
|
|
3853
|
-
defaultMessage: "Information",
|
|
3854
|
-
description: "Default title for info alerts"
|
|
3855
|
-
}
|
|
3856
|
-
});
|
|
3857
|
-
var toastMessages = defineMessages({
|
|
3858
|
-
dismissLabel: {
|
|
3859
|
-
id: "ds.toast.dismissLabel",
|
|
3860
|
-
defaultMessage: "Dismiss notification",
|
|
3861
|
-
description: "Accessible label for toast dismiss button"
|
|
3862
|
-
}
|
|
3863
|
-
});
|
|
3864
|
-
var dialogMessages = defineMessages({
|
|
3865
|
-
closeLabel: {
|
|
3866
|
-
id: "ds.dialog.closeLabel",
|
|
3867
|
-
defaultMessage: "Close dialog",
|
|
3868
|
-
description: "Accessible label for dialog close button"
|
|
3869
|
-
}
|
|
3870
|
-
});
|
|
3871
|
-
var formMessages = defineMessages({
|
|
3872
|
-
showPassword: {
|
|
3873
|
-
id: "ds.form.showPassword",
|
|
3874
|
-
defaultMessage: "Show password",
|
|
3875
|
-
description: "Toggle to show password text"
|
|
3876
|
-
},
|
|
3877
|
-
hidePassword: {
|
|
3878
|
-
id: "ds.form.hidePassword",
|
|
3879
|
-
defaultMessage: "Hide password",
|
|
3880
|
-
description: "Toggle to hide password text"
|
|
3881
|
-
},
|
|
3882
|
-
clearInput: {
|
|
3883
|
-
id: "ds.form.clearInput",
|
|
3884
|
-
defaultMessage: "Clear input",
|
|
3885
|
-
description: "Clear input field button"
|
|
3886
|
-
},
|
|
3887
|
-
invalidEmail: {
|
|
3888
|
-
id: "ds.form.invalidEmail",
|
|
3889
|
-
defaultMessage: "Please enter a valid email address",
|
|
3890
|
-
description: "Email validation error"
|
|
3891
|
-
},
|
|
3892
|
-
passwordRequired: {
|
|
3893
|
-
id: "ds.form.passwordRequired",
|
|
3894
|
-
defaultMessage: "Password is required",
|
|
3895
|
-
description: "Password required validation error"
|
|
3896
|
-
}
|
|
3897
|
-
});
|
|
3898
|
-
var authMessages = defineMessages({
|
|
3899
|
-
loginTitle: {
|
|
3900
|
-
id: "ds.auth.loginTitle",
|
|
3901
|
-
defaultMessage: "Sign in to your account",
|
|
3902
|
-
description: "Login page title"
|
|
3903
|
-
},
|
|
3904
|
-
signupTitle: {
|
|
3905
|
-
id: "ds.auth.signupTitle",
|
|
3906
|
-
defaultMessage: "Create your account",
|
|
3907
|
-
description: "Signup page title"
|
|
3908
|
-
},
|
|
3909
|
-
forgotPasswordTitle: {
|
|
3910
|
-
id: "ds.auth.forgotPasswordTitle",
|
|
3911
|
-
defaultMessage: "Reset your password",
|
|
3912
|
-
description: "Forgot password page title"
|
|
3913
|
-
},
|
|
3914
|
-
emailLabel: {
|
|
3915
|
-
id: "ds.auth.emailLabel",
|
|
3916
|
-
defaultMessage: "Email address",
|
|
3917
|
-
description: "Email field label"
|
|
3918
|
-
},
|
|
3919
|
-
passwordLabel: {
|
|
3920
|
-
id: "ds.auth.passwordLabel",
|
|
3921
|
-
defaultMessage: "Password",
|
|
3922
|
-
description: "Password field label"
|
|
3923
|
-
},
|
|
3924
|
-
rememberMe: {
|
|
3925
|
-
id: "ds.auth.rememberMe",
|
|
3926
|
-
defaultMessage: "Remember me",
|
|
3927
|
-
description: "Remember me checkbox label"
|
|
3928
|
-
},
|
|
3929
|
-
forgotPassword: {
|
|
3930
|
-
id: "ds.auth.forgotPassword",
|
|
3931
|
-
defaultMessage: "Forgot your password?",
|
|
3932
|
-
description: "Forgot password link text"
|
|
3933
|
-
},
|
|
3934
|
-
signIn: {
|
|
3935
|
-
id: "ds.auth.signIn",
|
|
3936
|
-
defaultMessage: "Sign in",
|
|
3937
|
-
description: "Sign in button text"
|
|
3938
|
-
},
|
|
3939
|
-
signUp: {
|
|
3940
|
-
id: "ds.auth.signUp",
|
|
3941
|
-
defaultMessage: "Sign up",
|
|
3942
|
-
description: "Sign up button text"
|
|
3943
|
-
},
|
|
3944
|
-
sendResetLink: {
|
|
3945
|
-
id: "ds.auth.sendResetLink",
|
|
3946
|
-
defaultMessage: "Send reset link",
|
|
3947
|
-
description: "Send password reset link button"
|
|
3948
|
-
},
|
|
3949
|
-
backToLogin: {
|
|
3950
|
-
id: "ds.auth.backToLogin",
|
|
3951
|
-
defaultMessage: "Back to login",
|
|
3952
|
-
description: "Back to login link text"
|
|
3953
|
-
}
|
|
3954
|
-
});
|
|
3955
|
-
var navigationMessages = defineMessages({
|
|
3956
|
-
menuLabel: {
|
|
3957
|
-
id: "ds.nav.menuLabel",
|
|
3958
|
-
defaultMessage: "Navigation menu",
|
|
3959
|
-
description: "Accessible label for navigation menu"
|
|
3960
|
-
},
|
|
3961
|
-
toggleSidebar: {
|
|
3962
|
-
id: "ds.nav.toggleSidebar",
|
|
3963
|
-
defaultMessage: "Toggle sidebar",
|
|
3964
|
-
description: "Toggle sidebar button label"
|
|
3965
|
-
},
|
|
3966
|
-
expandSubmenu: {
|
|
3967
|
-
id: "ds.nav.expandSubmenu",
|
|
3968
|
-
defaultMessage: "Expand submenu",
|
|
3969
|
-
description: "Expand submenu button label"
|
|
3970
|
-
},
|
|
3971
|
-
collapseSubmenu: {
|
|
3972
|
-
id: "ds.nav.collapseSubmenu",
|
|
3973
|
-
defaultMessage: "Collapse submenu",
|
|
3974
|
-
description: "Collapse submenu button label"
|
|
3975
|
-
}
|
|
3976
|
-
});
|
|
3977
|
-
var reportMessages = defineMessages({
|
|
3978
|
-
confidenceLabel: {
|
|
3979
|
-
id: "ds.report.confidenceLabel",
|
|
3980
|
-
defaultMessage: "Confidence score",
|
|
3981
|
-
description: "Label for confidence indicator"
|
|
3982
|
-
},
|
|
3983
|
-
dataCoverageLabel: {
|
|
3984
|
-
id: "ds.report.dataCoverageLabel",
|
|
3985
|
-
defaultMessage: "Data coverage",
|
|
3986
|
-
description: "Label for data coverage badge"
|
|
3987
|
-
},
|
|
3988
|
-
insufficientData: {
|
|
3989
|
-
id: "ds.report.insufficientData",
|
|
3990
|
-
defaultMessage: "Insufficient data",
|
|
3991
|
-
description: "Message when data is insufficient for analysis"
|
|
3992
|
-
},
|
|
3993
|
-
exportPdf: {
|
|
3994
|
-
id: "ds.report.exportPdf",
|
|
3995
|
-
defaultMessage: "Export as PDF",
|
|
3996
|
-
description: "Export to PDF option"
|
|
3997
|
-
},
|
|
3998
|
-
exportCsv: {
|
|
3999
|
-
id: "ds.report.exportCsv",
|
|
4000
|
-
defaultMessage: "Export as CSV",
|
|
4001
|
-
description: "Export to CSV option"
|
|
4002
|
-
},
|
|
4003
|
-
exportPptx: {
|
|
4004
|
-
id: "ds.report.exportPptx",
|
|
4005
|
-
defaultMessage: "Export as PowerPoint",
|
|
4006
|
-
description: "Export to PowerPoint option"
|
|
4007
|
-
}
|
|
4008
|
-
});
|
|
4009
|
-
var appearanceMessages = defineMessages({
|
|
4010
|
-
themeLabel: {
|
|
4011
|
-
id: "ds.appearance.themeLabel",
|
|
4012
|
-
defaultMessage: "Theme",
|
|
4013
|
-
description: "Theme selector label"
|
|
4014
|
-
},
|
|
4015
|
-
darkTheme: {
|
|
4016
|
-
id: "ds.appearance.darkTheme",
|
|
4017
|
-
defaultMessage: "Dark",
|
|
4018
|
-
description: "Dark theme option"
|
|
4019
|
-
},
|
|
4020
|
-
lightTheme: {
|
|
4021
|
-
id: "ds.appearance.lightTheme",
|
|
4022
|
-
defaultMessage: "Light",
|
|
4023
|
-
description: "Light theme option"
|
|
4024
|
-
},
|
|
4025
|
-
highContrastTheme: {
|
|
4026
|
-
id: "ds.appearance.highContrastTheme",
|
|
4027
|
-
defaultMessage: "High contrast",
|
|
4028
|
-
description: "High contrast theme option"
|
|
4029
|
-
},
|
|
4030
|
-
densityLabel: {
|
|
4031
|
-
id: "ds.appearance.densityLabel",
|
|
4032
|
-
defaultMessage: "Density",
|
|
4033
|
-
description: "Density selector label"
|
|
4034
|
-
},
|
|
4035
|
-
comfortableDensity: {
|
|
4036
|
-
id: "ds.appearance.comfortableDensity",
|
|
4037
|
-
defaultMessage: "Comfortable",
|
|
4038
|
-
description: "Comfortable density option"
|
|
4039
|
-
},
|
|
4040
|
-
compactDensity: {
|
|
4041
|
-
id: "ds.appearance.compactDensity",
|
|
4042
|
-
defaultMessage: "Compact",
|
|
4043
|
-
description: "Compact density option"
|
|
4044
|
-
}
|
|
4045
|
-
});
|
|
4046
|
-
var paginationMessages = defineMessages({
|
|
4047
|
-
previous: {
|
|
4048
|
-
id: "ds.pagination.previous",
|
|
4049
|
-
defaultMessage: "Previous",
|
|
4050
|
-
description: "Pagination previous button label"
|
|
4051
|
-
},
|
|
4052
|
-
next: {
|
|
4053
|
-
id: "ds.pagination.next",
|
|
4054
|
-
defaultMessage: "Next",
|
|
4055
|
-
description: "Pagination next button label"
|
|
4056
|
-
},
|
|
4057
|
-
goToPreviousPage: {
|
|
4058
|
-
id: "ds.pagination.goToPreviousPage",
|
|
4059
|
-
defaultMessage: "Go to previous page",
|
|
4060
|
-
description: "Accessible label for previous page button"
|
|
4061
|
-
},
|
|
4062
|
-
goToNextPage: {
|
|
4063
|
-
id: "ds.pagination.goToNextPage",
|
|
4064
|
-
defaultMessage: "Go to next page",
|
|
4065
|
-
description: "Accessible label for next page button"
|
|
4066
|
-
}
|
|
4067
|
-
});
|
|
4068
|
-
var calendarMessages = defineMessages({
|
|
4069
|
-
previousMonth: {
|
|
4070
|
-
id: "ds.calendar.previousMonth",
|
|
4071
|
-
defaultMessage: "Previous month",
|
|
4072
|
-
description: "Accessible label for previous month button"
|
|
4073
|
-
},
|
|
4074
|
-
nextMonth: {
|
|
4075
|
-
id: "ds.calendar.nextMonth",
|
|
4076
|
-
defaultMessage: "Next month",
|
|
4077
|
-
description: "Accessible label for next month button"
|
|
4078
|
-
}
|
|
4079
|
-
});
|
|
4080
|
-
var carouselMessages = defineMessages({
|
|
4081
|
-
previousSlide: {
|
|
4082
|
-
id: "ds.carousel.previousSlide",
|
|
4083
|
-
defaultMessage: "Previous slide",
|
|
4084
|
-
description: "Accessible label for previous slide button"
|
|
4085
|
-
},
|
|
4086
|
-
nextSlide: {
|
|
4087
|
-
id: "ds.carousel.nextSlide",
|
|
4088
|
-
defaultMessage: "Next slide",
|
|
4089
|
-
description: "Accessible label for next slide button"
|
|
4090
|
-
}
|
|
4091
|
-
});
|
|
4092
|
-
var methodologyMessages = defineMessages({
|
|
4093
|
-
title: {
|
|
4094
|
-
id: "ds.methodology.title",
|
|
4095
|
-
defaultMessage: "Methodology",
|
|
4096
|
-
description: "Methodology note title"
|
|
4097
|
-
},
|
|
4098
|
-
sampleSize: {
|
|
4099
|
-
id: "ds.methodology.sampleSize",
|
|
4100
|
-
defaultMessage: "Sample Size",
|
|
4101
|
-
description: "Methodology sample size label"
|
|
4102
|
-
},
|
|
4103
|
-
dataSources: {
|
|
4104
|
-
id: "ds.methodology.dataSources",
|
|
4105
|
-
defaultMessage: "Data Sources",
|
|
4106
|
-
description: "Methodology data sources label"
|
|
4107
|
-
},
|
|
4108
|
-
calculation: {
|
|
4109
|
-
id: "ds.methodology.calculation",
|
|
4110
|
-
defaultMessage: "Calculation",
|
|
4111
|
-
description: "Methodology calculation label"
|
|
4112
|
-
}
|
|
4113
|
-
});
|
|
4114
|
-
var allMessages = {
|
|
4115
|
-
...commonMessages,
|
|
4116
|
-
...alertMessages,
|
|
4117
|
-
...toastMessages,
|
|
4118
|
-
...dialogMessages,
|
|
4119
|
-
...formMessages,
|
|
4120
|
-
...authMessages,
|
|
4121
|
-
...navigationMessages,
|
|
4122
|
-
...reportMessages,
|
|
4123
|
-
...appearanceMessages,
|
|
4124
|
-
...paginationMessages,
|
|
4125
|
-
...calendarMessages,
|
|
4126
|
-
...carouselMessages,
|
|
4127
|
-
...methodologyMessages
|
|
4128
|
-
};
|
|
4129
|
-
|
|
4130
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AppearancePanel, AppearanceProvider, AspectRatio, Avatar, AvatarFallback, AvatarImage, BREAKPOINTS, Badge, Box, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, COLORS, CONTAINER_SIZE_MAP, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, Container, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger, DISTANCE, DSIntlProvider, DURATION, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EASING, EmptyState, FONT_FAMILY, FONT_SIZE, FONT_WEIGHT, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Grid, Heading, HoverCard, HoverCardContent, HoverCardTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, LINE_HEIGHT, Label, MEDIA_QUERIES, MOTION, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, Prose, RADIUS, Radio, RadioGroup, SHADOWS, SPACING, ScrollArea, ScrollBar, Section, Select, SelectContent, SelectGroup, SelectItem, SelectSeparator, SelectTrigger, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, Stack, StatusBadge, Switch, TRANSITION, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextArea, TextField, ToastContext, ToastItem, ToastProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, VARIANTS, VisuallyHidden, Z_INDEX, alertMessages, allMessages, appearanceMessages, authMessages, calendarMessages, carouselMessages, commonMessages, dialogMessages, extractSpacingStyles, formMessages, hexToRgb, initializeAppearance, methodologyMessages, navigationMessages, paginationMessages, prefersReducedMotion, reportMessages, resolveSpacing, toastMessages, useAppearance, useDateFormat, useFormField, useIsRTL, useLocale, useMessage, useNumberFormat, useRelativeTime, useTextDirection, useToast };
|
|
1
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AspectRatio, BREAKPOINTS, ButtonGroup, COLORS, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, EmptyState, FONT_FAMILY, FONT_SIZE, FONT_WEIGHT, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Grid, Heading, HoverCard, HoverCardContent, HoverCardTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, LINE_HEIGHT, Label, MEDIA_QUERIES, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, Prose, RADIUS, Radio, RadioGroup, SHADOWS, ScrollArea, ScrollBar, Section, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, StatusBadge, Switch, Text, TextArea, ToastContext, ToastItem, ToastProvider, Toggle, VisuallyHidden, Z_INDEX, useFormField, useToast } from '../chunk-MU6GW5ZV.js';
|
|
2
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from '../chunk-C2BCDNAV.js';
|
|
3
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectSeparator, SelectTrigger } from '../chunk-FAFAP4L5.js';
|
|
4
|
+
export { Checkbox } from '../chunk-7PX2AZ6Y.js';
|
|
5
|
+
export { AppearancePanel, AppearanceProvider, hexToRgb, initializeAppearance, prefersReducedMotion, useAppearance } from '../chunk-JPJN4YBC.js';
|
|
6
|
+
export { Stack } from '../chunk-NN3TUHIH.js';
|
|
7
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '../chunk-XU3OMQ7V.js';
|
|
8
|
+
export { DISTANCE, DURATION, EASING, MOTION, TRANSITION, VARIANTS } from '../chunk-YNVRDD2P.js';
|
|
9
|
+
export { Badge, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Slider, Tabs, TabsContent, TabsList, TabsTrigger, ToggleGroup, ToggleGroupItem } from '../chunk-HRENHNDJ.js';
|
|
10
|
+
export { TextField } from '../chunk-3NKRFUAR.js';
|
|
11
|
+
export { Button } from '../chunk-SICKWUWB.js';
|
|
12
|
+
export { DSIntlProvider, FormattedDate, FormattedMessage, FormattedNumber, alertMessages, allMessages, appearanceMessages, authMessages, calendarMessages, carouselMessages, commonMessages, defineMessages, dialogMessages, formMessages, methodologyMessages, navigationMessages, paginationMessages, reportMessages, toastMessages, useDateFormat, useIsRTL, useLocale, useMessage, useNumberFormat, useRelativeTime, useTextDirection } from '../chunk-P5BOFE5A.js';
|
|
13
|
+
export { Avatar, AvatarFallback, AvatarImage } from '../chunk-Y3CPKNB7.js';
|
|
14
|
+
export { Box, CONTAINER_SIZE_MAP, Container, SPACING, extractSpacingStyles, resolveSpacing } from '../chunk-HN4PHABT.js';
|
|
4131
15
|
//# sourceMappingURL=out.js.map
|
|
4132
16
|
//# sourceMappingURL=index.js.map
|