@zentauri-ui/zentauri-components 2.3.0 → 2.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.
Files changed (243) hide show
  1. package/README.md +9 -5
  2. package/cli/props.json +2508 -1458
  3. package/cli/registry.json +20 -0
  4. package/dist/chunk-2RBBXVFA.js +19 -0
  5. package/dist/{chunk-ENKXB2BA.js.map → chunk-2RBBXVFA.js.map} +1 -1
  6. package/dist/{chunk-BFHJF4MV.mjs → chunk-425DAZTS.mjs} +4 -4
  7. package/dist/{chunk-BFHJF4MV.mjs.map → chunk-425DAZTS.mjs.map} +1 -1
  8. package/dist/chunk-4U6PVVST.mjs +15 -0
  9. package/dist/chunk-4U6PVVST.mjs.map +1 -0
  10. package/dist/{chunk-AARJLZXP.js → chunk-6GP74P4F.js} +6 -6
  11. package/dist/{chunk-AARJLZXP.js.map → chunk-6GP74P4F.js.map} +1 -1
  12. package/dist/{chunk-DIAA5VH4.mjs → chunk-CIZQQ32L.mjs} +3 -3
  13. package/dist/chunk-CIZQQ32L.mjs.map +1 -0
  14. package/dist/chunk-DUKHIN2W.js +44 -0
  15. package/dist/chunk-DUKHIN2W.js.map +1 -0
  16. package/dist/{chunk-PQ2XTY3M.js → chunk-G36ZV446.js} +13 -13
  17. package/dist/{chunk-PQ2XTY3M.js.map → chunk-G36ZV446.js.map} +1 -1
  18. package/dist/chunk-HJ7EFBED.js +86 -0
  19. package/dist/chunk-HJ7EFBED.js.map +1 -0
  20. package/dist/{chunk-H3BJOK22.js → chunk-HNAUUCR5.js} +3 -3
  21. package/dist/chunk-HNAUUCR5.js.map +1 -0
  22. package/dist/chunk-K2VCZK4I.mjs +75 -0
  23. package/dist/chunk-K2VCZK4I.mjs.map +1 -0
  24. package/dist/{chunk-DSX6RUYI.js → chunk-KVBFWRPF.js} +12 -12
  25. package/dist/{chunk-DSX6RUYI.js.map → chunk-KVBFWRPF.js.map} +1 -1
  26. package/dist/chunk-N4MLFU2Q.mjs +69 -0
  27. package/dist/chunk-N4MLFU2Q.mjs.map +1 -0
  28. package/dist/{chunk-ATE5SCTR.mjs → chunk-N6Q4ZLQR.mjs} +3 -3
  29. package/dist/{chunk-ATE5SCTR.mjs.map → chunk-N6Q4ZLQR.mjs.map} +1 -1
  30. package/dist/{chunk-YY7G4NV3.js → chunk-NZQA4M35.js} +49 -17
  31. package/dist/chunk-NZQA4M35.js.map +1 -0
  32. package/dist/chunk-OME7XOPN.js +78 -0
  33. package/dist/chunk-OME7XOPN.js.map +1 -0
  34. package/dist/chunk-PVDWJUMF.mjs +34 -0
  35. package/dist/chunk-PVDWJUMF.mjs.map +1 -0
  36. package/dist/chunk-PVVYOIU2.js +38 -0
  37. package/dist/chunk-PVVYOIU2.js.map +1 -0
  38. package/dist/chunk-PWEZB53R.js +90 -0
  39. package/dist/chunk-PWEZB53R.js.map +1 -0
  40. package/dist/chunk-PWYEC3KY.mjs +30 -0
  41. package/dist/chunk-PWYEC3KY.mjs.map +1 -0
  42. package/dist/{chunk-JKKF5DCF.mjs → chunk-R2JXARKB.mjs} +3 -3
  43. package/dist/{chunk-JKKF5DCF.mjs.map → chunk-R2JXARKB.mjs.map} +1 -1
  44. package/dist/chunk-SD7YXMNV.js +40 -0
  45. package/dist/chunk-SD7YXMNV.js.map +1 -0
  46. package/dist/{chunk-ZB6C6CJQ.mjs → chunk-TZTUL6C4.mjs} +40 -8
  47. package/dist/chunk-TZTUL6C4.mjs.map +1 -0
  48. package/dist/chunk-UBQY572I.mjs +81 -0
  49. package/dist/chunk-UBQY572I.mjs.map +1 -0
  50. package/dist/chunk-V5EE5ATH.mjs +36 -0
  51. package/dist/chunk-V5EE5ATH.mjs.map +1 -0
  52. package/dist/chunk-XUK5P37Y.js +19 -0
  53. package/dist/chunk-XUK5P37Y.js.map +1 -0
  54. package/dist/{chunk-WZY32L6K.mjs → chunk-YDD5HQGX.mjs} +3 -3
  55. package/dist/{chunk-WZY32L6K.mjs.map → chunk-YDD5HQGX.mjs.map} +1 -1
  56. package/dist/design-system/facade.js +12 -8
  57. package/dist/design-system/facade.js.map +1 -1
  58. package/dist/design-system/facade.mjs +11 -7
  59. package/dist/design-system/facade.mjs.map +1 -1
  60. package/dist/design-system/index.d.ts +4 -0
  61. package/dist/design-system/index.d.ts.map +1 -1
  62. package/dist/design-system/qr-code.d.ts +4 -0
  63. package/dist/design-system/qr-code.d.ts.map +1 -0
  64. package/dist/design-system/qr-scanner.d.ts +11 -0
  65. package/dist/design-system/qr-scanner.d.ts.map +1 -0
  66. package/dist/design-system/secret-reveal.d.ts +1 -1
  67. package/dist/design-system/secret-reveal.d.ts.map +1 -1
  68. package/dist/design-system/speech-recognition.d.ts +39 -0
  69. package/dist/design-system/speech-recognition.d.ts.map +1 -0
  70. package/dist/design-system/speech-synthesizer.d.ts +41 -0
  71. package/dist/design-system/speech-synthesizer.d.ts.map +1 -0
  72. package/dist/ui/buttons/animated.js +14 -10
  73. package/dist/ui/buttons/animated.js.map +1 -1
  74. package/dist/ui/buttons/animated.mjs +12 -8
  75. package/dist/ui/buttons/animated.mjs.map +1 -1
  76. package/dist/ui/buttons.js +15 -11
  77. package/dist/ui/buttons.mjs +13 -9
  78. package/dist/ui/data-table.js +25 -21
  79. package/dist/ui/data-table.js.map +1 -1
  80. package/dist/ui/data-table.mjs +15 -11
  81. package/dist/ui/data-table.mjs.map +1 -1
  82. package/dist/ui/dynamic-stepper.js +24 -20
  83. package/dist/ui/dynamic-stepper.js.map +1 -1
  84. package/dist/ui/dynamic-stepper.mjs +13 -9
  85. package/dist/ui/dynamic-stepper.mjs.map +1 -1
  86. package/dist/ui/pagination.js +16 -12
  87. package/dist/ui/pagination.mjs +13 -9
  88. package/dist/ui/qr-code/animated/animations.d.ts +8 -0
  89. package/dist/ui/qr-code/animated/animations.d.ts.map +1 -0
  90. package/dist/ui/qr-code/animated/index.d.ts +4 -0
  91. package/dist/ui/qr-code/animated/index.d.ts.map +1 -0
  92. package/dist/ui/qr-code/animated/qr-code-animated.d.ts +6 -0
  93. package/dist/ui/qr-code/animated/qr-code-animated.d.ts.map +1 -0
  94. package/dist/ui/qr-code/animated/types.d.ts +9 -0
  95. package/dist/ui/qr-code/animated/types.d.ts.map +1 -0
  96. package/dist/ui/qr-code/animated.js +156 -0
  97. package/dist/ui/qr-code/animated.js.map +1 -0
  98. package/dist/ui/qr-code/animated.mjs +149 -0
  99. package/dist/ui/qr-code/animated.mjs.map +1 -0
  100. package/dist/ui/qr-code/index.d.ts +5 -0
  101. package/dist/ui/qr-code/index.d.ts.map +1 -0
  102. package/dist/ui/qr-code/qr-code-base.d.ts +47 -0
  103. package/dist/ui/qr-code/qr-code-base.d.ts.map +1 -0
  104. package/dist/ui/qr-code/qr-code.d.ts +2 -0
  105. package/dist/ui/qr-code/qr-code.d.ts.map +1 -0
  106. package/dist/ui/qr-code/types.d.ts +14 -0
  107. package/dist/ui/qr-code/types.d.ts.map +1 -0
  108. package/dist/ui/qr-code/variants.d.ts +4 -0
  109. package/dist/ui/qr-code/variants.d.ts.map +1 -0
  110. package/dist/ui/qr-code.js +35 -0
  111. package/dist/ui/qr-code.js.map +1 -0
  112. package/dist/ui/qr-code.mjs +17 -0
  113. package/dist/ui/qr-code.mjs.map +1 -0
  114. package/dist/ui/qr-scanner/index.d.ts +4 -0
  115. package/dist/ui/qr-scanner/index.d.ts.map +1 -0
  116. package/dist/ui/qr-scanner/qr-scanner-base.d.ts +62 -0
  117. package/dist/ui/qr-scanner/qr-scanner-base.d.ts.map +1 -0
  118. package/dist/ui/qr-scanner/qr-scanner.d.ts +2 -0
  119. package/dist/ui/qr-scanner/qr-scanner.d.ts.map +1 -0
  120. package/dist/ui/qr-scanner/types.d.ts +28 -0
  121. package/dist/ui/qr-scanner/types.d.ts.map +1 -0
  122. package/dist/ui/qr-scanner/variants.d.ts +9 -0
  123. package/dist/ui/qr-scanner/variants.d.ts.map +1 -0
  124. package/dist/ui/qr-scanner.js +316 -0
  125. package/dist/ui/qr-scanner.js.map +1 -0
  126. package/dist/ui/qr-scanner.mjs +308 -0
  127. package/dist/ui/qr-scanner.mjs.map +1 -0
  128. package/dist/ui/secret-reveal/animated/secret-reveal-animated.d.ts.map +1 -1
  129. package/dist/ui/secret-reveal/animated.js +10 -7
  130. package/dist/ui/secret-reveal/animated.js.map +1 -1
  131. package/dist/ui/secret-reveal/animated.mjs +6 -3
  132. package/dist/ui/secret-reveal/animated.mjs.map +1 -1
  133. package/dist/ui/secret-reveal/secret-reveal-base.d.ts.map +1 -1
  134. package/dist/ui/secret-reveal.js +14 -11
  135. package/dist/ui/secret-reveal.js.map +1 -1
  136. package/dist/ui/secret-reveal.mjs +7 -4
  137. package/dist/ui/secret-reveal.mjs.map +1 -1
  138. package/dist/ui/speech-recognition/animated/animations.d.ts +8 -0
  139. package/dist/ui/speech-recognition/animated/animations.d.ts.map +1 -0
  140. package/dist/ui/speech-recognition/animated/index.d.ts +4 -0
  141. package/dist/ui/speech-recognition/animated/index.d.ts.map +1 -0
  142. package/dist/ui/speech-recognition/animated/speech-recognition-animated.d.ts +6 -0
  143. package/dist/ui/speech-recognition/animated/speech-recognition-animated.d.ts.map +1 -0
  144. package/dist/ui/speech-recognition/animated/types.d.ts +9 -0
  145. package/dist/ui/speech-recognition/animated/types.d.ts.map +1 -0
  146. package/dist/ui/speech-recognition/animated.js +288 -0
  147. package/dist/ui/speech-recognition/animated.js.map +1 -0
  148. package/dist/ui/speech-recognition/animated.mjs +285 -0
  149. package/dist/ui/speech-recognition/animated.mjs.map +1 -0
  150. package/dist/ui/speech-recognition/index.d.ts +4 -0
  151. package/dist/ui/speech-recognition/index.d.ts.map +1 -0
  152. package/dist/ui/speech-recognition/speech-recognition-base.d.ts +6 -0
  153. package/dist/ui/speech-recognition/speech-recognition-base.d.ts.map +1 -0
  154. package/dist/ui/speech-recognition/speech-recognition.d.ts +2 -0
  155. package/dist/ui/speech-recognition/speech-recognition.d.ts.map +1 -0
  156. package/dist/ui/speech-recognition/types.d.ts +31 -0
  157. package/dist/ui/speech-recognition/types.d.ts.map +1 -0
  158. package/dist/ui/speech-recognition/variants.d.ts +11 -0
  159. package/dist/ui/speech-recognition/variants.d.ts.map +1 -0
  160. package/dist/ui/speech-recognition.js +242 -0
  161. package/dist/ui/speech-recognition.js.map +1 -0
  162. package/dist/ui/speech-recognition.mjs +233 -0
  163. package/dist/ui/speech-recognition.mjs.map +1 -0
  164. package/dist/ui/speech-synthesizer/animated/animations.d.ts +8 -0
  165. package/dist/ui/speech-synthesizer/animated/animations.d.ts.map +1 -0
  166. package/dist/ui/speech-synthesizer/animated/index.d.ts +4 -0
  167. package/dist/ui/speech-synthesizer/animated/index.d.ts.map +1 -0
  168. package/dist/ui/speech-synthesizer/animated/speech-synthesizer-animated.d.ts +6 -0
  169. package/dist/ui/speech-synthesizer/animated/speech-synthesizer-animated.d.ts.map +1 -0
  170. package/dist/ui/speech-synthesizer/animated/types.d.ts +9 -0
  171. package/dist/ui/speech-synthesizer/animated/types.d.ts.map +1 -0
  172. package/dist/ui/speech-synthesizer/animated.js +269 -0
  173. package/dist/ui/speech-synthesizer/animated.js.map +1 -0
  174. package/dist/ui/speech-synthesizer/animated.mjs +266 -0
  175. package/dist/ui/speech-synthesizer/animated.mjs.map +1 -0
  176. package/dist/ui/speech-synthesizer/index.d.ts +4 -0
  177. package/dist/ui/speech-synthesizer/index.d.ts.map +1 -0
  178. package/dist/ui/speech-synthesizer/speech-synthesizer-base.d.ts +6 -0
  179. package/dist/ui/speech-synthesizer/speech-synthesizer-base.d.ts.map +1 -0
  180. package/dist/ui/speech-synthesizer/speech-synthesizer.d.ts +2 -0
  181. package/dist/ui/speech-synthesizer/speech-synthesizer.d.ts.map +1 -0
  182. package/dist/ui/speech-synthesizer/types.d.ts +43 -0
  183. package/dist/ui/speech-synthesizer/types.d.ts.map +1 -0
  184. package/dist/ui/speech-synthesizer/variants.d.ts +13 -0
  185. package/dist/ui/speech-synthesizer/variants.d.ts.map +1 -0
  186. package/dist/ui/speech-synthesizer.js +220 -0
  187. package/dist/ui/speech-synthesizer.js.map +1 -0
  188. package/dist/ui/speech-synthesizer.mjs +211 -0
  189. package/dist/ui/speech-synthesizer.mjs.map +1 -0
  190. package/dist/ui/split-button.js +26 -22
  191. package/dist/ui/split-button.js.map +1 -1
  192. package/dist/ui/split-button.mjs +13 -9
  193. package/dist/ui/split-button.mjs.map +1 -1
  194. package/package.json +5 -2
  195. package/src/design-system/index.ts +4 -0
  196. package/src/design-system/qr-code.ts +13 -0
  197. package/src/design-system/qr-scanner.ts +32 -0
  198. package/src/design-system/secret-reveal.ts +1 -1
  199. package/src/design-system/speech-recognition.ts +82 -0
  200. package/src/design-system/speech-synthesizer.ts +90 -0
  201. package/src/ui/qr-code/animated/animations.ts +51 -0
  202. package/src/ui/qr-code/animated/index.ts +5 -0
  203. package/src/ui/qr-code/animated/qr-code-animated.tsx +111 -0
  204. package/src/ui/qr-code/animated/types.ts +10 -0
  205. package/src/ui/qr-code/index.ts +10 -0
  206. package/src/ui/qr-code/qr-code-base.tsx +149 -0
  207. package/src/ui/qr-code/qr-code.test.tsx +58 -0
  208. package/src/ui/qr-code/qr-code.tsx +2 -0
  209. package/src/ui/qr-code/types.ts +22 -0
  210. package/src/ui/qr-code/variants.ts +11 -0
  211. package/src/ui/qr-scanner/index.ts +17 -0
  212. package/src/ui/qr-scanner/qr-scanner-base.tsx +568 -0
  213. package/src/ui/qr-scanner/qr-scanner.test.tsx +61 -0
  214. package/src/ui/qr-scanner/qr-scanner.tsx +2 -0
  215. package/src/ui/qr-scanner/types.ts +32 -0
  216. package/src/ui/qr-scanner/variants.ts +26 -0
  217. package/src/ui/secret-reveal/animated/secret-reveal-animated.tsx +4 -1
  218. package/src/ui/secret-reveal/secret-reveal-base.tsx +4 -1
  219. package/src/ui/speech-recognition/animated/animations.ts +62 -0
  220. package/src/ui/speech-recognition/animated/index.ts +8 -0
  221. package/src/ui/speech-recognition/animated/speech-recognition-animated.tsx +276 -0
  222. package/src/ui/speech-recognition/animated/types.ts +11 -0
  223. package/src/ui/speech-recognition/index.ts +15 -0
  224. package/src/ui/speech-recognition/speech-recognition-base.tsx +276 -0
  225. package/src/ui/speech-recognition/speech-recognition.test.tsx +74 -0
  226. package/src/ui/speech-recognition/speech-recognition.tsx +1 -0
  227. package/src/ui/speech-recognition/types.ts +50 -0
  228. package/src/ui/speech-recognition/variants.ts +47 -0
  229. package/src/ui/speech-synthesizer/animated/animations.ts +62 -0
  230. package/src/ui/speech-synthesizer/animated/index.ts +8 -0
  231. package/src/ui/speech-synthesizer/animated/speech-synthesizer-animated.tsx +260 -0
  232. package/src/ui/speech-synthesizer/animated/types.ts +11 -0
  233. package/src/ui/speech-synthesizer/index.ts +14 -0
  234. package/src/ui/speech-synthesizer/speech-synthesizer-base.tsx +255 -0
  235. package/src/ui/speech-synthesizer/speech-synthesizer.test.tsx +87 -0
  236. package/src/ui/speech-synthesizer/speech-synthesizer.tsx +1 -0
  237. package/src/ui/speech-synthesizer/types.ts +57 -0
  238. package/src/ui/speech-synthesizer/variants.ts +55 -0
  239. package/dist/chunk-DIAA5VH4.mjs.map +0 -1
  240. package/dist/chunk-ENKXB2BA.js +0 -19
  241. package/dist/chunk-H3BJOK22.js.map +0 -1
  242. package/dist/chunk-YY7G4NV3.js.map +0 -1
  243. package/dist/chunk-ZB6C6CJQ.mjs.map +0 -1
@@ -0,0 +1,255 @@
1
+ "use client";
2
+
3
+ import {
4
+ useCallback,
5
+ useEffect,
6
+ useImperativeHandle,
7
+ useRef,
8
+ useState,
9
+ } from "react";
10
+
11
+ import { cn } from "../../lib/utils";
12
+
13
+ import type {
14
+ SpeechSynthesizerBaseProps,
15
+ SpeechSynthesizerRef,
16
+ SpeechSynthesizerState,
17
+ } from "./types";
18
+ import {
19
+ speechSynthesizerBtnActiveClasses,
20
+ speechSynthesizerBtnVariants,
21
+ speechSynthesizerControlsClasses,
22
+ speechSynthesizerProgressBarClasses,
23
+ speechSynthesizerProgressClasses,
24
+ speechSynthesizerTextClasses,
25
+ speechSynthesizerVariants,
26
+ } from "./variants";
27
+
28
+ function DefaultPlayIcon() {
29
+ return (
30
+ <svg viewBox="0 0 24 24" fill="currentColor" className="size-5">
31
+ <path d="M8 5v14l11-7z" />
32
+ </svg>
33
+ );
34
+ }
35
+
36
+ function DefaultPauseIcon() {
37
+ return (
38
+ <svg viewBox="0 0 24 24" fill="currentColor" className="size-5">
39
+ <rect x="6" y="4" width="4" height="16" />
40
+ <rect x="14" y="4" width="4" height="16" />
41
+ </svg>
42
+ );
43
+ }
44
+
45
+ function DefaultStopIcon() {
46
+ return (
47
+ <svg viewBox="0 0 24 24" fill="currentColor" className="size-5">
48
+ <rect x="6" y="6" width="12" height="12" />
49
+ </svg>
50
+ );
51
+ }
52
+
53
+ export function SpeechSynthesizerBase({
54
+ appearance,
55
+ size,
56
+ text,
57
+ lang,
58
+ rate = 1,
59
+ pitch = 1,
60
+ volume = 1,
61
+ autoSpeak = false,
62
+ onStart,
63
+ onEnd,
64
+ onError,
65
+ onStateChange,
66
+ renderPlay,
67
+ renderPause,
68
+ renderStop,
69
+ showProgress = false,
70
+ className,
71
+ children,
72
+ ...rest
73
+ }: SpeechSynthesizerBaseProps) {
74
+ const [state, setState] = useState<SpeechSynthesizerState>("idle");
75
+ const utteranceRef = useRef<SpeechSynthesisUtterance | null>(null);
76
+ const stateRef = useRef<SpeechSynthesizerState>("idle");
77
+ const localRef = useRef<HTMLDivElement>(null);
78
+
79
+ const setStateSafe = useCallback(
80
+ (newState: SpeechSynthesizerState) => {
81
+ stateRef.current = newState;
82
+ setState(newState);
83
+ onStateChange?.(newState);
84
+ },
85
+ [onStateChange],
86
+ );
87
+
88
+ const speak = useCallback(() => {
89
+ if (!text || typeof window === "undefined") return;
90
+ window.speechSynthesis.cancel();
91
+
92
+ const utterance = new SpeechSynthesisUtterance(text);
93
+ if (lang) utterance.lang = lang;
94
+ utterance.rate = rate;
95
+ utterance.pitch = pitch;
96
+ utterance.volume = volume;
97
+
98
+ utterance.onstart = () => {
99
+ setStateSafe("speaking");
100
+ onStart?.();
101
+ };
102
+ utterance.onend = () => {
103
+ setStateSafe("idle");
104
+ onEnd?.();
105
+ };
106
+ utterance.onerror = (event) => {
107
+ setStateSafe("idle");
108
+ onError?.(event.error);
109
+ };
110
+ utterance.onpause = () => setStateSafe("paused");
111
+ utterance.onresume = () => setStateSafe("speaking");
112
+
113
+ utteranceRef.current = utterance;
114
+ window.speechSynthesis.speak(utterance);
115
+ }, [text, lang, rate, pitch, volume, onStart, onEnd, onError, setStateSafe]);
116
+
117
+ const pause = useCallback(() => {
118
+ if (typeof window !== "undefined") {
119
+ window.speechSynthesis.pause();
120
+ }
121
+ }, []);
122
+
123
+ const resume = useCallback(() => {
124
+ if (typeof window !== "undefined") {
125
+ window.speechSynthesis.resume();
126
+ }
127
+ }, []);
128
+
129
+ const stop = useCallback(() => {
130
+ if (typeof window !== "undefined" && window.speechSynthesis) {
131
+ window.speechSynthesis.cancel();
132
+ }
133
+ setStateSafe("idle");
134
+ }, [setStateSafe]);
135
+
136
+ const imperativeHandle: SpeechSynthesizerRef = {
137
+ speak,
138
+ pause,
139
+ resume,
140
+ stop,
141
+ get state() {
142
+ return stateRef.current;
143
+ },
144
+ };
145
+
146
+ useImperativeHandle((rest as any).ref, () => imperativeHandle, [
147
+ speak,
148
+ pause,
149
+ resume,
150
+ stop,
151
+ ]);
152
+
153
+ useEffect(() => {
154
+ if (autoSpeak && text) speak();
155
+ return () => {
156
+ if (typeof window !== "undefined" && window.speechSynthesis) {
157
+ window.speechSynthesis.cancel();
158
+ }
159
+ };
160
+ }, []);
161
+
162
+ const isSpeaking = state === "speaking";
163
+ const isPaused = state === "paused";
164
+ const showPlay = state === "idle" || state === "paused";
165
+ const showPause = state === "speaking";
166
+
167
+ return (
168
+ <div
169
+ ref={localRef}
170
+ data-slot="speech-synthesizer"
171
+ className={cn(speechSynthesizerVariants({ size }), className)}
172
+ {...rest}
173
+ >
174
+ {text && (
175
+ <p
176
+ data-slot="speech-synthesizer-text"
177
+ className={speechSynthesizerTextClasses}
178
+ >
179
+ {text}
180
+ </p>
181
+ )}
182
+ {showProgress && isSpeaking && (
183
+ <div
184
+ data-slot="speech-synthesizer-progress"
185
+ className={speechSynthesizerProgressClasses}
186
+ >
187
+ <div
188
+ data-slot="speech-synthesizer-progress-bar"
189
+ className={cn(
190
+ speechSynthesizerProgressBarClasses,
191
+ "w-full animate-pulse",
192
+ )}
193
+ style={{ width: "100%" }}
194
+ />
195
+ </div>
196
+ )}
197
+ <div
198
+ data-slot="speech-synthesizer-controls"
199
+ className={speechSynthesizerControlsClasses}
200
+ >
201
+ {showPlay && (
202
+ <button
203
+ type="button"
204
+ data-slot="speech-synthesizer-play-btn"
205
+ className={cn(
206
+ speechSynthesizerBtnVariants({ appearance, size }),
207
+ isPaused && speechSynthesizerBtnActiveClasses,
208
+ )}
209
+ onClick={isPaused ? resume : speak}
210
+ aria-label={isPaused ? "Resume" : "Play"}
211
+ >
212
+ {renderPlay ? (
213
+ renderPlay({ isSpeaking, isPaused, state })
214
+ ) : (
215
+ <DefaultPlayIcon />
216
+ )}
217
+ </button>
218
+ )}
219
+ {showPause && (
220
+ <button
221
+ type="button"
222
+ data-slot="speech-synthesizer-pause-btn"
223
+ className={speechSynthesizerBtnVariants({ appearance, size })}
224
+ onClick={pause}
225
+ aria-label="Pause"
226
+ >
227
+ {renderPause ? (
228
+ renderPause({ isSpeaking, isPaused, state })
229
+ ) : (
230
+ <DefaultPauseIcon />
231
+ )}
232
+ </button>
233
+ )}
234
+ {(isSpeaking || isPaused) && (
235
+ <button
236
+ type="button"
237
+ data-slot="speech-synthesizer-stop-btn"
238
+ className={speechSynthesizerBtnVariants({ appearance, size })}
239
+ onClick={stop}
240
+ aria-label="Stop"
241
+ >
242
+ {renderStop ? (
243
+ renderStop({ isSpeaking, isPaused, state })
244
+ ) : (
245
+ <DefaultStopIcon />
246
+ )}
247
+ </button>
248
+ )}
249
+ </div>
250
+ {children}
251
+ </div>
252
+ );
253
+ }
254
+
255
+ SpeechSynthesizerBase.displayName = "SpeechSynthesizer";
@@ -0,0 +1,87 @@
1
+ import { createRef } from "react";
2
+ import { render } from "@testing-library/react";
3
+ import { describe, expect, it } from "vitest";
4
+
5
+ import { SpeechSynthesizer } from "./speech-synthesizer";
6
+
7
+ describe("SpeechSynthesizer", () => {
8
+ it("should set displayName", () => {
9
+ expect(SpeechSynthesizer.displayName).toBe("SpeechSynthesizer");
10
+ });
11
+
12
+ it("should stamp data-slot on the root container", () => {
13
+ const { container } = render(<SpeechSynthesizer />);
14
+ const root = container.querySelector('[data-slot="speech-synthesizer"]');
15
+ expect(root).toBeTruthy();
16
+ });
17
+
18
+ it("should render a play button when idle", () => {
19
+ const { container } = render(<SpeechSynthesizer />);
20
+ const btn = container.querySelector(
21
+ '[data-slot="speech-synthesizer-play-btn"]',
22
+ );
23
+ expect(btn).toBeTruthy();
24
+ });
25
+
26
+ it("should render text when provided", () => {
27
+ const { container } = render(<SpeechSynthesizer text="Hello world" />);
28
+ const textEl = container.querySelector(
29
+ '[data-slot="speech-synthesizer-text"]',
30
+ );
31
+ expect(textEl).toBeTruthy();
32
+ expect(textEl?.textContent).toBe("Hello world");
33
+ });
34
+
35
+ it("should not render text when not provided", () => {
36
+ const { container } = render(<SpeechSynthesizer />);
37
+ const textEl = container.querySelector(
38
+ '[data-slot="speech-synthesizer-text"]',
39
+ );
40
+ expect(textEl).toBeFalsy();
41
+ });
42
+
43
+ it("should render children when provided", () => {
44
+ const { container } = render(
45
+ <SpeechSynthesizer>
46
+ <div data-testid="child" />
47
+ </SpeechSynthesizer>,
48
+ );
49
+ expect(container.querySelector('[data-testid="child"]')).toBeTruthy();
50
+ });
51
+
52
+ it("should expose an imperative handle with speak, pause, resume, stop methods", () => {
53
+ const ref = createRef<{
54
+ speak: () => void;
55
+ pause: () => void;
56
+ resume: () => void;
57
+ stop: () => void;
58
+ state: string;
59
+ }>();
60
+ render(<SpeechSynthesizer ref={ref as any} />);
61
+ expect(ref.current).toBeTruthy();
62
+ expect(typeof ref.current?.speak).toBe("function");
63
+ expect(typeof ref.current?.pause).toBe("function");
64
+ expect(typeof ref.current?.resume).toBe("function");
65
+ expect(typeof ref.current?.stop).toBe("function");
66
+ });
67
+
68
+ it("should set default state to idle", () => {
69
+ const ref = createRef<{
70
+ speak: () => void;
71
+ pause: () => void;
72
+ resume: () => void;
73
+ stop: () => void;
74
+ state: string;
75
+ }>();
76
+ render(<SpeechSynthesizer ref={ref as any} />);
77
+ expect(ref.current?.state).toBe("idle");
78
+ });
79
+
80
+ it("should apply custom className", () => {
81
+ const { container } = render(
82
+ <SpeechSynthesizer className="custom-class" />,
83
+ );
84
+ const root = container.querySelector('[data-slot="speech-synthesizer"]');
85
+ expect(root?.className).toMatch(/custom-class/);
86
+ });
87
+ });
@@ -0,0 +1 @@
1
+ export { SpeechSynthesizerBase as SpeechSynthesizer } from "./speech-synthesizer-base";
@@ -0,0 +1,57 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ import type { ComponentPropsWithRef, Ref } from "react";
3
+
4
+ import type {
5
+ speechSynthesizerBtnVariants,
6
+ speechSynthesizerVariants,
7
+ } from "./variants";
8
+
9
+ export type SpeechSynthesizerVariantProps = VariantProps<
10
+ typeof speechSynthesizerBtnVariants
11
+ >;
12
+
13
+ export type SpeechSynthesizerState = "idle" | "speaking" | "paused";
14
+
15
+ export type SpeechSynthesizerBaseProps = VariantProps<
16
+ typeof speechSynthesizerVariants
17
+ > &
18
+ VariantProps<typeof speechSynthesizerBtnVariants> &
19
+ ComponentPropsWithRef<"div"> & {
20
+ text?: string;
21
+ lang?: string;
22
+ rate?: number;
23
+ pitch?: number;
24
+ volume?: number;
25
+ autoSpeak?: boolean;
26
+ onStart?: () => void;
27
+ onEnd?: () => void;
28
+ onError?: (error: string) => void;
29
+ onStateChange?: (state: SpeechSynthesizerState) => void;
30
+ renderPlay?: (props: {
31
+ isSpeaking: boolean;
32
+ isPaused: boolean;
33
+ state: SpeechSynthesizerState;
34
+ }) => React.ReactNode;
35
+ renderPause?: (props: {
36
+ isSpeaking: boolean;
37
+ isPaused: boolean;
38
+ state: SpeechSynthesizerState;
39
+ }) => React.ReactNode;
40
+ renderStop?: (props: {
41
+ isSpeaking: boolean;
42
+ isPaused: boolean;
43
+ state: SpeechSynthesizerState;
44
+ }) => React.ReactNode;
45
+ showProgress?: boolean;
46
+ children?: React.ReactNode;
47
+ };
48
+
49
+ export type SpeechSynthesizerProps = SpeechSynthesizerBaseProps;
50
+
51
+ export type SpeechSynthesizerRef = {
52
+ speak: () => void;
53
+ pause: () => void;
54
+ resume: () => void;
55
+ stop: () => void;
56
+ state: SpeechSynthesizerState;
57
+ };
@@ -0,0 +1,55 @@
1
+ import { cva } from "class-variance-authority";
2
+
3
+ import {
4
+ zuiSpeechSynthesizerAppearances,
5
+ zuiSpeechSynthesizerBase,
6
+ zuiSpeechSynthesizerBtnActive,
7
+ zuiSpeechSynthesizerBtnBase,
8
+ zuiSpeechSynthesizerBtnSizes,
9
+ zuiSpeechSynthesizerControlsBase,
10
+ zuiSpeechSynthesizerProgressBarBase,
11
+ zuiSpeechSynthesizerProgressBase,
12
+ zuiSpeechSynthesizerSizes,
13
+ zuiSpeechSynthesizerTextBase,
14
+ } from "../../design-system/speech-synthesizer";
15
+
16
+ export const speechSynthesizerVariants = cva(
17
+ zuiSpeechSynthesizerBase.join(" "),
18
+ {
19
+ variants: {
20
+ size: zuiSpeechSynthesizerSizes,
21
+ },
22
+ defaultVariants: {
23
+ size: "md",
24
+ },
25
+ },
26
+ );
27
+
28
+ export const speechSynthesizerBtnVariants = cva(
29
+ zuiSpeechSynthesizerBtnBase.join(" "),
30
+ {
31
+ variants: {
32
+ appearance: zuiSpeechSynthesizerAppearances,
33
+ size: zuiSpeechSynthesizerBtnSizes,
34
+ },
35
+ defaultVariants: {
36
+ appearance: "default",
37
+ size: "md",
38
+ },
39
+ },
40
+ );
41
+
42
+ export const speechSynthesizerTextClasses =
43
+ zuiSpeechSynthesizerTextBase.join(" ");
44
+
45
+ export const speechSynthesizerControlsClasses =
46
+ zuiSpeechSynthesizerControlsBase.join(" ");
47
+
48
+ export const speechSynthesizerBtnActiveClasses =
49
+ zuiSpeechSynthesizerBtnActive.join(" ");
50
+
51
+ export const speechSynthesizerProgressClasses =
52
+ zuiSpeechSynthesizerProgressBase.join(" ");
53
+
54
+ export const speechSynthesizerProgressBarClasses =
55
+ zuiSpeechSynthesizerProgressBarBase.join(" ");
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/design-system/secret-reveal.ts"],"names":[],"mappings":";AAAO,IAAM,4BAAA,GACX;AAEK,IAAM,wBAAA,GAA2B;AAEjC,IAAM,wBAAA,GAA2B;AAEjC,IAAM,yBAAA,GACX;AAEF,IAAM,iBAAA,GACJ,oLAAA;AAEF,IAAM,yBAAA,GACJ,oLAAA;AAEF,IAAM,yBAAA,GACJ,gMAAA;AAEK,IAAM,0BAAA,GAA6B;AAAA,EACxC,OAAA,EAAS,0YAA0Y,iBAAiB,CAAA,CAAA;AAAA,EACpa,MAAA,EAAQ,6NAA6N,iBAAiB,CAAA,CAAA;AAAA,EACtP,KAAA,EAAO,iNAAiN,yBAAyB,CAAA,CAAA;AAAA,EACjP,OAAA,EAAS,qYAAqY,yBAAyB,CAAA,CAAA;AAAA,EACva,IAAA,EAAM,sTAAsT,iBAAiB,CAAA,CAAA;AAAA,EAC7U,IAAA,EAAM,kTAAkT,iBAAiB,CAAA,CAAA;AAAA,EACzU,KAAA,EAAO,0TAA0T,iBAAiB,CAAA,CAAA;AAAA,EAClV,IAAA,EAAM,oTAAoT,iBAAiB,CAAA,CAAA;AAAA,EAC3U,OAAA,EAAS,0WAA0W,iBAAiB,CAAA,CAAA;AAAA,EACpY,MAAA,EAAQ,sWAAsW,iBAAiB,CAAA,CAAA;AAAA,EAC/X,MAAA,EAAQ,sWAAsW,iBAAiB,CAAA,CAAA;AAAA,EAC/X,IAAA,EAAM,kVAAkV,iBAAiB,CAAA,CAAA;AAAA,EACzW,IAAA,EAAM,sVAAsV,iBAAiB,CAAA,CAAA;AAAA,EAC7W,GAAA,EAAK,kVAAkV,iBAAiB,CAAA,CAAA;AAAA,EACxW,IAAA,EAAM,uVAAuV,iBAAiB,CAAA,CAAA;AAAA,EAC9W,MAAA,EAAQ,iWAAiW,iBAAiB,CAAA,CAAA;AAAA,EAC1X,MAAA,EAAQ,8VAA8V,iBAAiB,CAAA,CAAA;AAAA,EACvX,GAAA,EAAK,4SAA4S,iBAAiB,CAAA,CAAA;AAAA,EAClU,KAAA,EAAO,0TAA0T,iBAAiB,CAAA,CAAA;AAAA,EAClV,IAAA,EAAM,0VAA0V,iBAAiB,CAAA,CAAA;AAAA,EACjX,IAAA,EAAM,oTAAoT,iBAAiB,CAAA,CAAA;AAAA,EAC3U,eAAA,EAAiB,+cAA+c,yBAAyB,CAAA,CAAA;AAAA,EACzf,gBAAA,EAAkB,+cAA+c,yBAAyB,CAAA,CAAA;AAAA,EAC1f,cAAA,EAAgB,+bAA+b,yBAAyB,CAAA,CAAA;AAAA,EACxe,iBAAA,EAAmB,qdAAqd,yBAAyB,CAAA,CAAA;AAAA,EACjgB,iBAAA,EAAmB,mdAAmd,yBAAyB,CAAA,CAAA;AAAA,EAC/f,eAAA,EAAiB,ucAAuc,yBAAyB,CAAA,CAAA;AAAA,EACjf,iBAAA,EAAmB,2dAA2d,yBAAyB,CAAA,CAAA;AAAA,EACvgB,eAAA,EAAiB,qcAAqc,yBAAyB,CAAA,CAAA;AAAA,EAC/e,iBAAA,EAAmB,+cAA+c,yBAAyB,CAAA;AAC7f;AAEO,IAAM,oBAAA,GAAuB;AAAA,EAClC,EAAA,EAAI,6BAAA;AAAA,EACJ,EAAA,EAAI,yBAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAEO,IAAM,yBAAA,GAA4B;AAAA,EACvC,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAEO,IAAM,yBAAA,GAA4B;AAAA,EACvC,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAEO,IAAM,0BAAA,GAA6B;AAAA,EACxC,EAAA,EAAI,yBAAA;AAAA,EACJ,EAAA,EAAI,uBAAA;AAAA,EACJ,EAAA,EAAI;AACN","file":"chunk-DIAA5VH4.mjs","sourcesContent":["export const zuiSecretRevealContainerBase =\n \"inline-flex items-center gap-2 rounded-xl border px-3 py-2\";\n\nexport const zuiSecretRevealLabelBase = \"font-medium\";\n\nexport const zuiSecretRevealValueBase = \"font-mono tracking-wider select-all\";\n\nexport const zuiSecretRevealToggleBase =\n \"inline-flex items-center justify-center rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-500\";\n\nconst zuiSecretRevealFg =\n \"text-[color:var(--zui-secret-reveal-fg,var(--zui-fg,oklch(20.8%_0.042_265.755)))] dark:text-[color:var(--zui-secret-reveal-fg-dark,var(--zui-fg-dark,oklch(98.4%_0.003_247.858)))]\";\n\nconst zuiSecretRevealInvertedFg =\n \"text-[color:var(--zui-secret-reveal-fg,var(--zui-fg-dark,oklch(98.4%_0.003_247.858)))] dark:text-[color:var(--zui-secret-reveal-fg-dark,var(--zui-fg,oklch(20.8%_0.042_265.755)))]\";\n\nconst zuiSecretRevealGradientFg =\n \"text-[color:var(--zui-secret-reveal-fg,var(--zui-brand-fg,oklch(96.8%_0.007_247.896)))] dark:text-[color:var(--zui-secret-reveal-fg-dark,var(--zui-brand-fg-dark,oklch(98.4%_0.003_247.858)))]\";\n\nexport const zuiSecretRevealAppearances = {\n default: `border-[var(--zui-secret-reveal-default-border,var(--zui-border,oklch(87.5%_0.01_258.338)))] dark:border-[var(--zui-secret-reveal-default-border-dark,var(--zui-border-dark,oklch(27.9%_0.041_260.031)))] bg-[var(--zui-secret-reveal-default-bg,var(--zui-surface,oklch(96.8%_0.003_264.542)))] dark:bg-[var(--zui-secret-reveal-default-bg-dark,var(--zui-surface-dark,oklch(21.6%_0.036_260.031)))] ${zuiSecretRevealFg}`,\n subtle: `border-transparent bg-[var(--zui-secret-reveal-subtle-bg,var(--zui-surface-muted,oklch(92.9%_0.013_255.508)))] dark:bg-[var(--zui-secret-reveal-subtle-bg-dark,var(--zui-surface-muted-dark,oklch(27.9%_0.041_260.031)))] ${zuiSecretRevealFg}`,\n muted: `border-transparent bg-[var(--zui-secret-reveal-muted-bg,var(--zui-fg-muted,oklch(44.6%_0.043_257.281)))] dark:bg-[var(--zui-secret-reveal-muted-bg-dark,var(--zui-fg-muted-dark,oklch(86.9%_0.022_252.894)))] ${zuiSecretRevealInvertedFg}`,\n primary: `border-[var(--zui-secret-reveal-primary-border,var(--zui-brand,oklch(20.8%_0.042_265.755)))] dark:border-[var(--zui-secret-reveal-primary-border-dark,var(--zui-brand-dark,oklch(98.4%_0.003_247.858)))] bg-[var(--zui-secret-reveal-primary-bg,var(--zui-brand,oklch(20.8%_0.042_265.755)))] dark:bg-[var(--zui-secret-reveal-primary-bg-dark,var(--zui-brand-dark,oklch(98.4%_0.003_247.858)))] ${zuiSecretRevealInvertedFg}`,\n blue: `border-[var(--zui-secret-reveal-blue-border,var(--zui-color-blue,#2563eb))] dark:border-[var(--zui-secret-reveal-blue-border-dark,var(--zui-color-blue-dark,#3b82f6))] bg-[var(--zui-secret-reveal-blue-bg,oklch(93.5%_0.055_262.881))] dark:bg-[var(--zui-secret-reveal-blue-bg-dark,oklch(30.6%_0.126_262.881))] ${zuiSecretRevealFg}`,\n cyan: `border-[var(--zui-secret-reveal-cyan-border,var(--zui-color-cyan,#0891b2))] dark:border-[var(--zui-secret-reveal-cyan-border-dark,var(--zui-color-cyan-dark,#22d3ee))] bg-[var(--zui-secret-reveal-cyan-bg,oklch(95%_0.025_236.42))] dark:bg-[var(--zui-secret-reveal-cyan-bg-dark,oklch(31.1%_0.085_231.74))] ${zuiSecretRevealFg}`,\n green: `border-[var(--zui-secret-reveal-green-border,var(--zui-color-green,#16a34a))] dark:border-[var(--zui-secret-reveal-green-border-dark,var(--zui-color-green-dark,#22c55e))] bg-[var(--zui-secret-reveal-green-bg,oklch(94.2%_0.053_146.17))] dark:bg-[var(--zui-secret-reveal-green-bg-dark,oklch(30.8%_0.085_149.21))] ${zuiSecretRevealFg}`,\n lime: `border-[var(--zui-secret-reveal-lime-border,var(--zui-color-lime,#65a30d))] dark:border-[var(--zui-secret-reveal-lime-border-dark,var(--zui-color-lime-dark,#a3e635))] bg-[var(--zui-secret-reveal-lime-bg,oklch(93.9%_0.077_125.02))] dark:bg-[var(--zui-secret-reveal-lime-bg-dark,oklch(33.1%_0.098_131.68))] ${zuiSecretRevealFg}`,\n emerald: `border-[var(--zui-secret-reveal-emerald-border,var(--zui-color-emerald,oklch(69.6%_0.17_162.48)))] dark:border-[var(--zui-secret-reveal-emerald-border-dark,var(--zui-color-emerald-dark,oklch(43.2%_0.095_166.913)))] bg-[var(--zui-secret-reveal-emerald-bg,oklch(93.5%_0.062_163.17))] dark:bg-[var(--zui-secret-reveal-emerald-bg-dark,oklch(25.4%_0.065_166.91))] ${zuiSecretRevealFg}`,\n indigo: `border-[var(--zui-secret-reveal-indigo-border,var(--zui-color-indigo,oklch(39.8%_0.195_277.366)))] dark:border-[var(--zui-secret-reveal-indigo-border-dark,var(--zui-color-indigo-dark,oklch(51.1%_0.262_276.966)))] bg-[var(--zui-secret-reveal-indigo-bg,oklch(92.8%_0.067_276.37))] dark:bg-[var(--zui-secret-reveal-indigo-bg-dark,oklch(27.5%_0.153_276.97))] ${zuiSecretRevealFg}`,\n purple: `border-[var(--zui-secret-reveal-purple-border,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:border-[var(--zui-secret-reveal-purple-border-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] bg-[var(--zui-secret-reveal-purple-bg,oklch(92.4%_0.075_302.32))] dark:bg-[var(--zui-secret-reveal-purple-bg-dark,oklch(27.8%_0.171_302.32))] ${zuiSecretRevealFg}`,\n pink: `border-[var(--zui-secret-reveal-pink-border,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:border-[var(--zui-secret-reveal-pink-border-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] bg-[var(--zui-secret-reveal-pink-bg,oklch(93.5%_0.048_3.82))] dark:bg-[var(--zui-secret-reveal-pink-bg-dark,oklch(29.1%_0.134_0.58))] ${zuiSecretRevealFg}`,\n rose: `border-[var(--zui-secret-reveal-rose-border,var(--zui-color-rose,oklch(64.5%_0.246_16.439)))] dark:border-[var(--zui-secret-reveal-rose-border-dark,var(--zui-color-rose-dark,oklch(51.4%_0.222_16.935)))] bg-[var(--zui-secret-reveal-rose-bg,oklch(93.2%_0.065_16.44))] dark:bg-[var(--zui-secret-reveal-rose-bg-dark,oklch(30.2%_0.157_16.94))] ${zuiSecretRevealFg}`,\n sky: `border-[var(--zui-secret-reveal-sky-border,var(--zui-color-sky,oklch(68.5%_0.169_237.323)))] dark:border-[var(--zui-secret-reveal-sky-border-dark,var(--zui-color-sky-dark,oklch(50%_0.134_242.749)))] bg-[var(--zui-secret-reveal-sky-bg,oklch(94.5%_0.041_237.32))] dark:bg-[var(--zui-secret-reveal-sky-bg-dark,oklch(29.4%_0.108_242.75))] ${zuiSecretRevealFg}`,\n teal: `border-[var(--zui-secret-reveal-teal-border,var(--zui-color-teal,oklch(70.4%_0.14_182.503)))] dark:border-[var(--zui-secret-reveal-teal-border-dark,var(--zui-color-teal-dark,oklch(51.1%_0.096_186.391)))] bg-[var(--zui-secret-reveal-teal-bg,oklch(94.1%_0.046_182.5))] dark:bg-[var(--zui-secret-reveal-teal-bg-dark,oklch(30.2%_0.075_186.4))] ${zuiSecretRevealFg}`,\n yellow: `border-[var(--zui-secret-reveal-yellow-border,var(--zui-color-yellow,oklch(79.5%_0.184_86.047)))] dark:border-[var(--zui-secret-reveal-yellow-border-dark,var(--zui-color-yellow-dark,oklch(47.6%_0.114_61.907)))] bg-[var(--zui-secret-reveal-yellow-bg,oklch(94.1%_0.06_86.05))] dark:bg-[var(--zui-secret-reveal-yellow-bg-dark,oklch(31.5%_0.084_61.91))] ${zuiSecretRevealFg}`,\n orange: `border-[var(--zui-secret-reveal-orange-border,var(--zui-color-orange,oklch(70.5%_0.213_47.604)))] dark:border-[var(--zui-secret-reveal-orange-border-dark,var(--zui-color-orange-dark,oklch(47%_0.157_37.304)))] bg-[var(--zui-secret-reveal-orange-bg,oklch(93.5%_0.076_47.6))] dark:bg-[var(--zui-secret-reveal-orange-bg-dark,oklch(30.1%_0.129_37.3))] ${zuiSecretRevealFg}`,\n red: `border-[var(--zui-secret-reveal-red-border,var(--zui-color-red,#dc2626))] dark:border-[var(--zui-secret-reveal-red-border-dark,var(--zui-color-red-dark,#ef4444))] bg-[var(--zui-secret-reveal-red-bg,oklch(93.9%_0.053_19.85))] dark:bg-[var(--zui-secret-reveal-red-bg-dark,oklch(32.1%_0.111_19.85))] ${zuiSecretRevealFg}`,\n slate: `border-[var(--zui-secret-reveal-slate-border,var(--zui-color-slate,#475569))] dark:border-[var(--zui-secret-reveal-slate-border-dark,var(--zui-color-slate-dark,#64748b))] bg-[var(--zui-secret-reveal-slate-bg,oklch(92.8%_0.011_262.88))] dark:bg-[var(--zui-secret-reveal-slate-bg-dark,oklch(29.6%_0.036_262.88))] ${zuiSecretRevealFg}`,\n gray: `border-[var(--zui-secret-reveal-gray-border,var(--zui-color-gray,oklch(55.1%_0.027_264.364)))] dark:border-[var(--zui-secret-reveal-gray-border-dark,var(--zui-color-gray-dark,oklch(55.1%_0.027_264.364)))] bg-[var(--zui-secret-reveal-gray-bg,oklch(92.8%_0.007_264.36))] dark:bg-[var(--zui-secret-reveal-gray-bg-dark,oklch(29.4%_0.018_264.36))] ${zuiSecretRevealFg}`,\n zinc: `border-[var(--zui-secret-reveal-zinc-border,var(--zui-color-zinc,#52525b))] dark:border-[var(--zui-secret-reveal-zinc-border-dark,var(--zui-color-zinc-dark,#71717a))] bg-[var(--zui-secret-reveal-zinc-bg,oklch(92.9%_0.004_262.88))] dark:bg-[var(--zui-secret-reveal-zinc-bg-dark,oklch(29.4%_0.014_262.88))] ${zuiSecretRevealFg}`,\n \"gradient-blue\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-blue-from,var(--zui-color-blue,oklch(42.4%_0.199_265.638)))] dark:from-[var(--zui-secret-reveal-gradient-blue-from-dark,var(--zui-color-blue-dark,oklch(54.6%_0.245_262.881)))] to-[var(--zui-secret-reveal-gradient-blue-to,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:to-[var(--zui-secret-reveal-gradient-blue-to-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-green\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-green-from,var(--zui-color-green,oklch(44.8%_0.119_151.328)))] dark:from-[var(--zui-secret-reveal-gradient-green-from-dark,var(--zui-color-green-dark,oklch(62.7%_0.194_149.214)))] to-[var(--zui-secret-reveal-gradient-green-to,var(--zui-color-lime,oklch(45.3%_0.124_130.933)))] dark:to-[var(--zui-secret-reveal-gradient-green-to-dark,var(--zui-color-lime-dark,oklch(64.8%_0.2_131.684)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-red\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-red-from,var(--zui-color-red,oklch(44.4%_0.177_26.899)))] dark:from-[var(--zui-secret-reveal-gradient-red-from-dark,var(--zui-color-red-dark,oklch(57.7%_0.245_27.325)))] to-[var(--zui-secret-reveal-gradient-red-to,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:to-[var(--zui-secret-reveal-gradient-red-to-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-yellow\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-yellow-from,var(--zui-color-yellow,oklch(47.6%_0.114_61.907)))] dark:from-[var(--zui-secret-reveal-gradient-yellow-from-dark,var(--zui-color-yellow-dark,oklch(68.1%_0.162_75.834)))] to-[var(--zui-secret-reveal-gradient-yellow-to,var(--zui-color-orange,oklch(47%_0.157_37.304)))] dark:to-[var(--zui-secret-reveal-gradient-yellow-to-dark,var(--zui-color-orange-dark,oklch(64.6%_0.222_41.116)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-purple\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-purple-from,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:from-[var(--zui-secret-reveal-gradient-purple-from-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] to-[var(--zui-secret-reveal-gradient-purple-to,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:to-[var(--zui-secret-reveal-gradient-purple-to-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-teal\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-teal-from,var(--zui-color-teal,oklch(43.7%_0.078_188.216)))] dark:from-[var(--zui-secret-reveal-gradient-teal-from-dark,var(--zui-color-teal-dark,oklch(60%_0.118_184.704)))] to-[var(--zui-secret-reveal-gradient-teal-to,var(--zui-color-cyan,oklch(45%_0.085_224.283)))] dark:to-[var(--zui-secret-reveal-gradient-teal-to-dark,var(--zui-color-cyan-dark,oklch(60.9%_0.126_221.723)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-indigo\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-indigo-from,var(--zui-color-indigo,oklch(39.8%_0.195_277.366)))] dark:from-[var(--zui-secret-reveal-gradient-indigo-from-dark,var(--zui-color-indigo-dark,oklch(51.1%_0.262_276.966)))] to-[var(--zui-secret-reveal-gradient-indigo-to,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:to-[var(--zui-secret-reveal-gradient-indigo-to-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-pink\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-pink-from,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:from-[var(--zui-secret-reveal-gradient-pink-from-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] to-[var(--zui-secret-reveal-gradient-pink-to,var(--zui-color-rose,oklch(45.5%_0.188_13.697)))] dark:to-[var(--zui-secret-reveal-gradient-pink-to-dark,var(--zui-color-rose-dark,oklch(58.6%_0.253_17.585)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-orange\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-orange-from,var(--zui-color-orange,oklch(47%_0.157_37.304)))] dark:from-[var(--zui-secret-reveal-gradient-orange-from-dark,var(--zui-color-orange-dark,oklch(64.6%_0.222_41.116)))] to-[var(--zui-secret-reveal-gradient-orange-to,var(--zui-color-red,oklch(44.4%_0.177_26.899)))] dark:to-[var(--zui-secret-reveal-gradient-orange-to-dark,var(--zui-color-red-dark,oklch(57.7%_0.245_27.325)))] ${zuiSecretRevealGradientFg}`,\n} as const;\n\nexport const zuiSecretRevealSizes = {\n sm: \"gap-1.5 px-2 py-1.5 text-xs\",\n md: \"gap-2 px-3 py-2 text-sm\",\n lg: \"gap-2.5 px-4 py-2.5 text-base\",\n} as const;\n\nexport const zuiSecretRevealLabelSizes = {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n} as const;\n\nexport const zuiSecretRevealValueSizes = {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n} as const;\n\nexport const zuiSecretRevealToggleSizes = {\n sm: \"size-6 [&_svg]:size-3.5\",\n md: \"size-7 [&_svg]:size-4\",\n lg: \"size-8 [&_svg]:size-5\",\n} as const;\n"]}
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkYY7G4NV3_js = require('./chunk-YY7G4NV3.js');
4
- var classVarianceAuthority = require('class-variance-authority');
5
-
6
- var buttonVariants = classVarianceAuthority.cva(chunkYY7G4NV3_js.zuiButtonBase, {
7
- variants: {
8
- appearance: chunkYY7G4NV3_js.zuiButtonAppearances,
9
- size: chunkYY7G4NV3_js.zuiButtonSizes
10
- },
11
- defaultVariants: {
12
- appearance: "default",
13
- size: "md"
14
- }
15
- });
16
-
17
- exports.buttonVariants = buttonVariants;
18
- //# sourceMappingURL=chunk-ENKXB2BA.js.map
19
- //# sourceMappingURL=chunk-ENKXB2BA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/design-system/secret-reveal.ts"],"names":[],"mappings":";;;AAAO,IAAM,4BAAA,GACX;AAEK,IAAM,wBAAA,GAA2B;AAEjC,IAAM,wBAAA,GAA2B;AAEjC,IAAM,yBAAA,GACX;AAEF,IAAM,iBAAA,GACJ,oLAAA;AAEF,IAAM,yBAAA,GACJ,oLAAA;AAEF,IAAM,yBAAA,GACJ,gMAAA;AAEK,IAAM,0BAAA,GAA6B;AAAA,EACxC,OAAA,EAAS,0YAA0Y,iBAAiB,CAAA,CAAA;AAAA,EACpa,MAAA,EAAQ,6NAA6N,iBAAiB,CAAA,CAAA;AAAA,EACtP,KAAA,EAAO,iNAAiN,yBAAyB,CAAA,CAAA;AAAA,EACjP,OAAA,EAAS,qYAAqY,yBAAyB,CAAA,CAAA;AAAA,EACva,IAAA,EAAM,sTAAsT,iBAAiB,CAAA,CAAA;AAAA,EAC7U,IAAA,EAAM,kTAAkT,iBAAiB,CAAA,CAAA;AAAA,EACzU,KAAA,EAAO,0TAA0T,iBAAiB,CAAA,CAAA;AAAA,EAClV,IAAA,EAAM,oTAAoT,iBAAiB,CAAA,CAAA;AAAA,EAC3U,OAAA,EAAS,0WAA0W,iBAAiB,CAAA,CAAA;AAAA,EACpY,MAAA,EAAQ,sWAAsW,iBAAiB,CAAA,CAAA;AAAA,EAC/X,MAAA,EAAQ,sWAAsW,iBAAiB,CAAA,CAAA;AAAA,EAC/X,IAAA,EAAM,kVAAkV,iBAAiB,CAAA,CAAA;AAAA,EACzW,IAAA,EAAM,sVAAsV,iBAAiB,CAAA,CAAA;AAAA,EAC7W,GAAA,EAAK,kVAAkV,iBAAiB,CAAA,CAAA;AAAA,EACxW,IAAA,EAAM,uVAAuV,iBAAiB,CAAA,CAAA;AAAA,EAC9W,MAAA,EAAQ,iWAAiW,iBAAiB,CAAA,CAAA;AAAA,EAC1X,MAAA,EAAQ,8VAA8V,iBAAiB,CAAA,CAAA;AAAA,EACvX,GAAA,EAAK,4SAA4S,iBAAiB,CAAA,CAAA;AAAA,EAClU,KAAA,EAAO,0TAA0T,iBAAiB,CAAA,CAAA;AAAA,EAClV,IAAA,EAAM,0VAA0V,iBAAiB,CAAA,CAAA;AAAA,EACjX,IAAA,EAAM,oTAAoT,iBAAiB,CAAA,CAAA;AAAA,EAC3U,eAAA,EAAiB,+cAA+c,yBAAyB,CAAA,CAAA;AAAA,EACzf,gBAAA,EAAkB,+cAA+c,yBAAyB,CAAA,CAAA;AAAA,EAC1f,cAAA,EAAgB,+bAA+b,yBAAyB,CAAA,CAAA;AAAA,EACxe,iBAAA,EAAmB,qdAAqd,yBAAyB,CAAA,CAAA;AAAA,EACjgB,iBAAA,EAAmB,mdAAmd,yBAAyB,CAAA,CAAA;AAAA,EAC/f,eAAA,EAAiB,ucAAuc,yBAAyB,CAAA,CAAA;AAAA,EACjf,iBAAA,EAAmB,2dAA2d,yBAAyB,CAAA,CAAA;AAAA,EACvgB,eAAA,EAAiB,qcAAqc,yBAAyB,CAAA,CAAA;AAAA,EAC/e,iBAAA,EAAmB,+cAA+c,yBAAyB,CAAA;AAC7f;AAEO,IAAM,oBAAA,GAAuB;AAAA,EAClC,EAAA,EAAI,6BAAA;AAAA,EACJ,EAAA,EAAI,yBAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAEO,IAAM,yBAAA,GAA4B;AAAA,EACvC,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAEO,IAAM,yBAAA,GAA4B;AAAA,EACvC,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAEO,IAAM,0BAAA,GAA6B;AAAA,EACxC,EAAA,EAAI,yBAAA;AAAA,EACJ,EAAA,EAAI,uBAAA;AAAA,EACJ,EAAA,EAAI;AACN","file":"chunk-H3BJOK22.js","sourcesContent":["export const zuiSecretRevealContainerBase =\n \"inline-flex items-center gap-2 rounded-xl border px-3 py-2\";\n\nexport const zuiSecretRevealLabelBase = \"font-medium\";\n\nexport const zuiSecretRevealValueBase = \"font-mono tracking-wider select-all\";\n\nexport const zuiSecretRevealToggleBase =\n \"inline-flex items-center justify-center rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-500\";\n\nconst zuiSecretRevealFg =\n \"text-[color:var(--zui-secret-reveal-fg,var(--zui-fg,oklch(20.8%_0.042_265.755)))] dark:text-[color:var(--zui-secret-reveal-fg-dark,var(--zui-fg-dark,oklch(98.4%_0.003_247.858)))]\";\n\nconst zuiSecretRevealInvertedFg =\n \"text-[color:var(--zui-secret-reveal-fg,var(--zui-fg-dark,oklch(98.4%_0.003_247.858)))] dark:text-[color:var(--zui-secret-reveal-fg-dark,var(--zui-fg,oklch(20.8%_0.042_265.755)))]\";\n\nconst zuiSecretRevealGradientFg =\n \"text-[color:var(--zui-secret-reveal-fg,var(--zui-brand-fg,oklch(96.8%_0.007_247.896)))] dark:text-[color:var(--zui-secret-reveal-fg-dark,var(--zui-brand-fg-dark,oklch(98.4%_0.003_247.858)))]\";\n\nexport const zuiSecretRevealAppearances = {\n default: `border-[var(--zui-secret-reveal-default-border,var(--zui-border,oklch(87.5%_0.01_258.338)))] dark:border-[var(--zui-secret-reveal-default-border-dark,var(--zui-border-dark,oklch(27.9%_0.041_260.031)))] bg-[var(--zui-secret-reveal-default-bg,var(--zui-surface,oklch(96.8%_0.003_264.542)))] dark:bg-[var(--zui-secret-reveal-default-bg-dark,var(--zui-surface-dark,oklch(21.6%_0.036_260.031)))] ${zuiSecretRevealFg}`,\n subtle: `border-transparent bg-[var(--zui-secret-reveal-subtle-bg,var(--zui-surface-muted,oklch(92.9%_0.013_255.508)))] dark:bg-[var(--zui-secret-reveal-subtle-bg-dark,var(--zui-surface-muted-dark,oklch(27.9%_0.041_260.031)))] ${zuiSecretRevealFg}`,\n muted: `border-transparent bg-[var(--zui-secret-reveal-muted-bg,var(--zui-fg-muted,oklch(44.6%_0.043_257.281)))] dark:bg-[var(--zui-secret-reveal-muted-bg-dark,var(--zui-fg-muted-dark,oklch(86.9%_0.022_252.894)))] ${zuiSecretRevealInvertedFg}`,\n primary: `border-[var(--zui-secret-reveal-primary-border,var(--zui-brand,oklch(20.8%_0.042_265.755)))] dark:border-[var(--zui-secret-reveal-primary-border-dark,var(--zui-brand-dark,oklch(98.4%_0.003_247.858)))] bg-[var(--zui-secret-reveal-primary-bg,var(--zui-brand,oklch(20.8%_0.042_265.755)))] dark:bg-[var(--zui-secret-reveal-primary-bg-dark,var(--zui-brand-dark,oklch(98.4%_0.003_247.858)))] ${zuiSecretRevealInvertedFg}`,\n blue: `border-[var(--zui-secret-reveal-blue-border,var(--zui-color-blue,#2563eb))] dark:border-[var(--zui-secret-reveal-blue-border-dark,var(--zui-color-blue-dark,#3b82f6))] bg-[var(--zui-secret-reveal-blue-bg,oklch(93.5%_0.055_262.881))] dark:bg-[var(--zui-secret-reveal-blue-bg-dark,oklch(30.6%_0.126_262.881))] ${zuiSecretRevealFg}`,\n cyan: `border-[var(--zui-secret-reveal-cyan-border,var(--zui-color-cyan,#0891b2))] dark:border-[var(--zui-secret-reveal-cyan-border-dark,var(--zui-color-cyan-dark,#22d3ee))] bg-[var(--zui-secret-reveal-cyan-bg,oklch(95%_0.025_236.42))] dark:bg-[var(--zui-secret-reveal-cyan-bg-dark,oklch(31.1%_0.085_231.74))] ${zuiSecretRevealFg}`,\n green: `border-[var(--zui-secret-reveal-green-border,var(--zui-color-green,#16a34a))] dark:border-[var(--zui-secret-reveal-green-border-dark,var(--zui-color-green-dark,#22c55e))] bg-[var(--zui-secret-reveal-green-bg,oklch(94.2%_0.053_146.17))] dark:bg-[var(--zui-secret-reveal-green-bg-dark,oklch(30.8%_0.085_149.21))] ${zuiSecretRevealFg}`,\n lime: `border-[var(--zui-secret-reveal-lime-border,var(--zui-color-lime,#65a30d))] dark:border-[var(--zui-secret-reveal-lime-border-dark,var(--zui-color-lime-dark,#a3e635))] bg-[var(--zui-secret-reveal-lime-bg,oklch(93.9%_0.077_125.02))] dark:bg-[var(--zui-secret-reveal-lime-bg-dark,oklch(33.1%_0.098_131.68))] ${zuiSecretRevealFg}`,\n emerald: `border-[var(--zui-secret-reveal-emerald-border,var(--zui-color-emerald,oklch(69.6%_0.17_162.48)))] dark:border-[var(--zui-secret-reveal-emerald-border-dark,var(--zui-color-emerald-dark,oklch(43.2%_0.095_166.913)))] bg-[var(--zui-secret-reveal-emerald-bg,oklch(93.5%_0.062_163.17))] dark:bg-[var(--zui-secret-reveal-emerald-bg-dark,oklch(25.4%_0.065_166.91))] ${zuiSecretRevealFg}`,\n indigo: `border-[var(--zui-secret-reveal-indigo-border,var(--zui-color-indigo,oklch(39.8%_0.195_277.366)))] dark:border-[var(--zui-secret-reveal-indigo-border-dark,var(--zui-color-indigo-dark,oklch(51.1%_0.262_276.966)))] bg-[var(--zui-secret-reveal-indigo-bg,oklch(92.8%_0.067_276.37))] dark:bg-[var(--zui-secret-reveal-indigo-bg-dark,oklch(27.5%_0.153_276.97))] ${zuiSecretRevealFg}`,\n purple: `border-[var(--zui-secret-reveal-purple-border,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:border-[var(--zui-secret-reveal-purple-border-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] bg-[var(--zui-secret-reveal-purple-bg,oklch(92.4%_0.075_302.32))] dark:bg-[var(--zui-secret-reveal-purple-bg-dark,oklch(27.8%_0.171_302.32))] ${zuiSecretRevealFg}`,\n pink: `border-[var(--zui-secret-reveal-pink-border,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:border-[var(--zui-secret-reveal-pink-border-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] bg-[var(--zui-secret-reveal-pink-bg,oklch(93.5%_0.048_3.82))] dark:bg-[var(--zui-secret-reveal-pink-bg-dark,oklch(29.1%_0.134_0.58))] ${zuiSecretRevealFg}`,\n rose: `border-[var(--zui-secret-reveal-rose-border,var(--zui-color-rose,oklch(64.5%_0.246_16.439)))] dark:border-[var(--zui-secret-reveal-rose-border-dark,var(--zui-color-rose-dark,oklch(51.4%_0.222_16.935)))] bg-[var(--zui-secret-reveal-rose-bg,oklch(93.2%_0.065_16.44))] dark:bg-[var(--zui-secret-reveal-rose-bg-dark,oklch(30.2%_0.157_16.94))] ${zuiSecretRevealFg}`,\n sky: `border-[var(--zui-secret-reveal-sky-border,var(--zui-color-sky,oklch(68.5%_0.169_237.323)))] dark:border-[var(--zui-secret-reveal-sky-border-dark,var(--zui-color-sky-dark,oklch(50%_0.134_242.749)))] bg-[var(--zui-secret-reveal-sky-bg,oklch(94.5%_0.041_237.32))] dark:bg-[var(--zui-secret-reveal-sky-bg-dark,oklch(29.4%_0.108_242.75))] ${zuiSecretRevealFg}`,\n teal: `border-[var(--zui-secret-reveal-teal-border,var(--zui-color-teal,oklch(70.4%_0.14_182.503)))] dark:border-[var(--zui-secret-reveal-teal-border-dark,var(--zui-color-teal-dark,oklch(51.1%_0.096_186.391)))] bg-[var(--zui-secret-reveal-teal-bg,oklch(94.1%_0.046_182.5))] dark:bg-[var(--zui-secret-reveal-teal-bg-dark,oklch(30.2%_0.075_186.4))] ${zuiSecretRevealFg}`,\n yellow: `border-[var(--zui-secret-reveal-yellow-border,var(--zui-color-yellow,oklch(79.5%_0.184_86.047)))] dark:border-[var(--zui-secret-reveal-yellow-border-dark,var(--zui-color-yellow-dark,oklch(47.6%_0.114_61.907)))] bg-[var(--zui-secret-reveal-yellow-bg,oklch(94.1%_0.06_86.05))] dark:bg-[var(--zui-secret-reveal-yellow-bg-dark,oklch(31.5%_0.084_61.91))] ${zuiSecretRevealFg}`,\n orange: `border-[var(--zui-secret-reveal-orange-border,var(--zui-color-orange,oklch(70.5%_0.213_47.604)))] dark:border-[var(--zui-secret-reveal-orange-border-dark,var(--zui-color-orange-dark,oklch(47%_0.157_37.304)))] bg-[var(--zui-secret-reveal-orange-bg,oklch(93.5%_0.076_47.6))] dark:bg-[var(--zui-secret-reveal-orange-bg-dark,oklch(30.1%_0.129_37.3))] ${zuiSecretRevealFg}`,\n red: `border-[var(--zui-secret-reveal-red-border,var(--zui-color-red,#dc2626))] dark:border-[var(--zui-secret-reveal-red-border-dark,var(--zui-color-red-dark,#ef4444))] bg-[var(--zui-secret-reveal-red-bg,oklch(93.9%_0.053_19.85))] dark:bg-[var(--zui-secret-reveal-red-bg-dark,oklch(32.1%_0.111_19.85))] ${zuiSecretRevealFg}`,\n slate: `border-[var(--zui-secret-reveal-slate-border,var(--zui-color-slate,#475569))] dark:border-[var(--zui-secret-reveal-slate-border-dark,var(--zui-color-slate-dark,#64748b))] bg-[var(--zui-secret-reveal-slate-bg,oklch(92.8%_0.011_262.88))] dark:bg-[var(--zui-secret-reveal-slate-bg-dark,oklch(29.6%_0.036_262.88))] ${zuiSecretRevealFg}`,\n gray: `border-[var(--zui-secret-reveal-gray-border,var(--zui-color-gray,oklch(55.1%_0.027_264.364)))] dark:border-[var(--zui-secret-reveal-gray-border-dark,var(--zui-color-gray-dark,oklch(55.1%_0.027_264.364)))] bg-[var(--zui-secret-reveal-gray-bg,oklch(92.8%_0.007_264.36))] dark:bg-[var(--zui-secret-reveal-gray-bg-dark,oklch(29.4%_0.018_264.36))] ${zuiSecretRevealFg}`,\n zinc: `border-[var(--zui-secret-reveal-zinc-border,var(--zui-color-zinc,#52525b))] dark:border-[var(--zui-secret-reveal-zinc-border-dark,var(--zui-color-zinc-dark,#71717a))] bg-[var(--zui-secret-reveal-zinc-bg,oklch(92.9%_0.004_262.88))] dark:bg-[var(--zui-secret-reveal-zinc-bg-dark,oklch(29.4%_0.014_262.88))] ${zuiSecretRevealFg}`,\n \"gradient-blue\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-blue-from,var(--zui-color-blue,oklch(42.4%_0.199_265.638)))] dark:from-[var(--zui-secret-reveal-gradient-blue-from-dark,var(--zui-color-blue-dark,oklch(54.6%_0.245_262.881)))] to-[var(--zui-secret-reveal-gradient-blue-to,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:to-[var(--zui-secret-reveal-gradient-blue-to-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-green\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-green-from,var(--zui-color-green,oklch(44.8%_0.119_151.328)))] dark:from-[var(--zui-secret-reveal-gradient-green-from-dark,var(--zui-color-green-dark,oklch(62.7%_0.194_149.214)))] to-[var(--zui-secret-reveal-gradient-green-to,var(--zui-color-lime,oklch(45.3%_0.124_130.933)))] dark:to-[var(--zui-secret-reveal-gradient-green-to-dark,var(--zui-color-lime-dark,oklch(64.8%_0.2_131.684)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-red\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-red-from,var(--zui-color-red,oklch(44.4%_0.177_26.899)))] dark:from-[var(--zui-secret-reveal-gradient-red-from-dark,var(--zui-color-red-dark,oklch(57.7%_0.245_27.325)))] to-[var(--zui-secret-reveal-gradient-red-to,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:to-[var(--zui-secret-reveal-gradient-red-to-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-yellow\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-yellow-from,var(--zui-color-yellow,oklch(47.6%_0.114_61.907)))] dark:from-[var(--zui-secret-reveal-gradient-yellow-from-dark,var(--zui-color-yellow-dark,oklch(68.1%_0.162_75.834)))] to-[var(--zui-secret-reveal-gradient-yellow-to,var(--zui-color-orange,oklch(47%_0.157_37.304)))] dark:to-[var(--zui-secret-reveal-gradient-yellow-to-dark,var(--zui-color-orange-dark,oklch(64.6%_0.222_41.116)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-purple\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-purple-from,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:from-[var(--zui-secret-reveal-gradient-purple-from-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] to-[var(--zui-secret-reveal-gradient-purple-to,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:to-[var(--zui-secret-reveal-gradient-purple-to-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-teal\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-teal-from,var(--zui-color-teal,oklch(43.7%_0.078_188.216)))] dark:from-[var(--zui-secret-reveal-gradient-teal-from-dark,var(--zui-color-teal-dark,oklch(60%_0.118_184.704)))] to-[var(--zui-secret-reveal-gradient-teal-to,var(--zui-color-cyan,oklch(45%_0.085_224.283)))] dark:to-[var(--zui-secret-reveal-gradient-teal-to-dark,var(--zui-color-cyan-dark,oklch(60.9%_0.126_221.723)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-indigo\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-indigo-from,var(--zui-color-indigo,oklch(39.8%_0.195_277.366)))] dark:from-[var(--zui-secret-reveal-gradient-indigo-from-dark,var(--zui-color-indigo-dark,oklch(51.1%_0.262_276.966)))] to-[var(--zui-secret-reveal-gradient-indigo-to,var(--zui-color-purple,oklch(43.8%_0.218_303.724)))] dark:to-[var(--zui-secret-reveal-gradient-indigo-to-dark,var(--zui-color-purple-dark,oklch(55.8%_0.288_302.321)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-pink\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-pink-from,var(--zui-color-pink,oklch(45.9%_0.187_3.815)))] dark:from-[var(--zui-secret-reveal-gradient-pink-from-dark,var(--zui-color-pink-dark,oklch(59.2%_0.249_0.584)))] to-[var(--zui-secret-reveal-gradient-pink-to,var(--zui-color-rose,oklch(45.5%_0.188_13.697)))] dark:to-[var(--zui-secret-reveal-gradient-pink-to-dark,var(--zui-color-rose-dark,oklch(58.6%_0.253_17.585)))] ${zuiSecretRevealGradientFg}`,\n \"gradient-orange\": `border-transparent bg-linear-to-r from-[var(--zui-secret-reveal-gradient-orange-from,var(--zui-color-orange,oklch(47%_0.157_37.304)))] dark:from-[var(--zui-secret-reveal-gradient-orange-from-dark,var(--zui-color-orange-dark,oklch(64.6%_0.222_41.116)))] to-[var(--zui-secret-reveal-gradient-orange-to,var(--zui-color-red,oklch(44.4%_0.177_26.899)))] dark:to-[var(--zui-secret-reveal-gradient-orange-to-dark,var(--zui-color-red-dark,oklch(57.7%_0.245_27.325)))] ${zuiSecretRevealGradientFg}`,\n} as const;\n\nexport const zuiSecretRevealSizes = {\n sm: \"gap-1.5 px-2 py-1.5 text-xs\",\n md: \"gap-2 px-3 py-2 text-sm\",\n lg: \"gap-2.5 px-4 py-2.5 text-base\",\n} as const;\n\nexport const zuiSecretRevealLabelSizes = {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n} as const;\n\nexport const zuiSecretRevealValueSizes = {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n} as const;\n\nexport const zuiSecretRevealToggleSizes = {\n sm: \"size-6 [&_svg]:size-3.5\",\n md: \"size-7 [&_svg]:size-4\",\n lg: \"size-8 [&_svg]:size-5\",\n} as const;\n"]}