@pylerai/design-system 1.2.4 → 2.1.0

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 (262) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +183 -307
  3. package/dist/components/ui/badge.d.ts +2 -1
  4. package/dist/components/ui/badge.js +49 -0
  5. package/dist/components/ui/body.js +52 -0
  6. package/dist/components/ui/button.d.ts +2 -1
  7. package/dist/components/ui/button.js +172 -0
  8. package/dist/components/ui/calendar.js +275 -0
  9. package/dist/components/ui/checkbox.d.ts +7 -0
  10. package/dist/components/ui/checkbox.js +45 -0
  11. package/dist/components/ui/chip.d.ts +4 -3
  12. package/dist/components/ui/chip.js +66 -0
  13. package/dist/components/ui/dropdown.d.ts +8 -2
  14. package/dist/components/ui/dropdown.js +256 -0
  15. package/dist/components/ui/headline.js +50 -0
  16. package/dist/components/ui/input.d.ts +3 -2
  17. package/dist/components/ui/input.js +129 -0
  18. package/dist/components/ui/label.js +43 -0
  19. package/dist/components/ui/loading-bar.d.ts +2 -1
  20. package/dist/components/ui/loading-bar.js +64 -0
  21. package/dist/components/ui/modal.d.ts +3 -2
  22. package/dist/components/ui/modal.js +170 -0
  23. package/dist/components/ui/pagination.js +106 -0
  24. package/dist/components/ui/radio.d.ts +7 -0
  25. package/dist/components/ui/radio.js +42 -0
  26. package/dist/components/ui/search-field.d.ts +3 -2
  27. package/dist/components/ui/search-field.js +98 -0
  28. package/dist/components/ui/table.js +206 -0
  29. package/dist/components/ui/tabs.js +149 -0
  30. package/dist/components/ui/tag.d.ts +2 -1
  31. package/dist/components/ui/tag.js +31 -0
  32. package/dist/components/ui/tips.d.ts +2 -1
  33. package/dist/components/ui/tips.js +25 -0
  34. package/dist/components/ui/toast.js +70 -0
  35. package/dist/components/ui/toggle.d.ts +1 -2
  36. package/dist/components/ui/toggle.js +41 -0
  37. package/dist/components/ui/use-modal.js +94 -0
  38. package/dist/fonts/PretendardJPVariable.subset.0.woff2 +0 -0
  39. package/dist/fonts/PretendardJPVariable.subset.1.woff2 +0 -0
  40. package/dist/fonts/PretendardJPVariable.subset.10.woff2 +0 -0
  41. package/dist/fonts/PretendardJPVariable.subset.100.woff2 +0 -0
  42. package/dist/fonts/PretendardJPVariable.subset.101.woff2 +0 -0
  43. package/dist/fonts/PretendardJPVariable.subset.102.woff2 +0 -0
  44. package/dist/fonts/PretendardJPVariable.subset.103.woff2 +0 -0
  45. package/dist/fonts/PretendardJPVariable.subset.104.woff2 +0 -0
  46. package/dist/fonts/PretendardJPVariable.subset.105.woff2 +0 -0
  47. package/dist/fonts/PretendardJPVariable.subset.106.woff2 +0 -0
  48. package/dist/fonts/PretendardJPVariable.subset.107.woff2 +0 -0
  49. package/dist/fonts/PretendardJPVariable.subset.108.woff2 +0 -0
  50. package/dist/fonts/PretendardJPVariable.subset.109.woff2 +0 -0
  51. package/dist/fonts/PretendardJPVariable.subset.11.woff2 +0 -0
  52. package/dist/fonts/PretendardJPVariable.subset.110.woff2 +0 -0
  53. package/dist/fonts/PretendardJPVariable.subset.111.woff2 +0 -0
  54. package/dist/fonts/PretendardJPVariable.subset.112.woff2 +0 -0
  55. package/dist/fonts/PretendardJPVariable.subset.113.woff2 +0 -0
  56. package/dist/fonts/PretendardJPVariable.subset.114.woff2 +0 -0
  57. package/dist/fonts/PretendardJPVariable.subset.115.woff2 +0 -0
  58. package/dist/fonts/PretendardJPVariable.subset.116.woff2 +0 -0
  59. package/dist/fonts/PretendardJPVariable.subset.117.woff2 +0 -0
  60. package/dist/fonts/PretendardJPVariable.subset.118.woff2 +0 -0
  61. package/dist/fonts/PretendardJPVariable.subset.12.woff2 +0 -0
  62. package/dist/fonts/PretendardJPVariable.subset.13.woff2 +0 -0
  63. package/dist/fonts/PretendardJPVariable.subset.14.woff2 +0 -0
  64. package/dist/fonts/PretendardJPVariable.subset.15.woff2 +0 -0
  65. package/dist/fonts/PretendardJPVariable.subset.16.woff2 +0 -0
  66. package/dist/fonts/PretendardJPVariable.subset.17.woff2 +0 -0
  67. package/dist/fonts/PretendardJPVariable.subset.18.woff2 +0 -0
  68. package/dist/fonts/PretendardJPVariable.subset.19.woff2 +0 -0
  69. package/dist/fonts/PretendardJPVariable.subset.2.woff2 +0 -0
  70. package/dist/fonts/PretendardJPVariable.subset.20.woff2 +0 -0
  71. package/dist/fonts/PretendardJPVariable.subset.21.woff2 +0 -0
  72. package/dist/fonts/PretendardJPVariable.subset.22.woff2 +0 -0
  73. package/dist/fonts/PretendardJPVariable.subset.23.woff2 +0 -0
  74. package/dist/fonts/PretendardJPVariable.subset.24.woff2 +0 -0
  75. package/dist/fonts/PretendardJPVariable.subset.25.woff2 +0 -0
  76. package/dist/fonts/PretendardJPVariable.subset.26.woff2 +0 -0
  77. package/dist/fonts/PretendardJPVariable.subset.27.woff2 +0 -0
  78. package/dist/fonts/PretendardJPVariable.subset.28.woff2 +0 -0
  79. package/dist/fonts/PretendardJPVariable.subset.29.woff2 +0 -0
  80. package/dist/fonts/PretendardJPVariable.subset.3.woff2 +0 -0
  81. package/dist/fonts/PretendardJPVariable.subset.30.woff2 +0 -0
  82. package/dist/fonts/PretendardJPVariable.subset.31.woff2 +0 -0
  83. package/dist/fonts/PretendardJPVariable.subset.32.woff2 +0 -0
  84. package/dist/fonts/PretendardJPVariable.subset.33.woff2 +0 -0
  85. package/dist/fonts/PretendardJPVariable.subset.34.woff2 +0 -0
  86. package/dist/fonts/PretendardJPVariable.subset.35.woff2 +0 -0
  87. package/dist/fonts/PretendardJPVariable.subset.36.woff2 +0 -0
  88. package/dist/fonts/PretendardJPVariable.subset.37.woff2 +0 -0
  89. package/dist/fonts/PretendardJPVariable.subset.38.woff2 +0 -0
  90. package/dist/fonts/PretendardJPVariable.subset.39.woff2 +0 -0
  91. package/dist/fonts/PretendardJPVariable.subset.4.woff2 +0 -0
  92. package/dist/fonts/PretendardJPVariable.subset.40.woff2 +0 -0
  93. package/dist/fonts/PretendardJPVariable.subset.41.woff2 +0 -0
  94. package/dist/fonts/PretendardJPVariable.subset.42.woff2 +0 -0
  95. package/dist/fonts/PretendardJPVariable.subset.43.woff2 +0 -0
  96. package/dist/fonts/PretendardJPVariable.subset.44.woff2 +0 -0
  97. package/dist/fonts/PretendardJPVariable.subset.45.woff2 +0 -0
  98. package/dist/fonts/PretendardJPVariable.subset.46.woff2 +0 -0
  99. package/dist/fonts/PretendardJPVariable.subset.47.woff2 +0 -0
  100. package/dist/fonts/PretendardJPVariable.subset.48.woff2 +0 -0
  101. package/dist/fonts/PretendardJPVariable.subset.49.woff2 +0 -0
  102. package/dist/fonts/PretendardJPVariable.subset.5.woff2 +0 -0
  103. package/dist/fonts/PretendardJPVariable.subset.50.woff2 +0 -0
  104. package/dist/fonts/PretendardJPVariable.subset.51.woff2 +0 -0
  105. package/dist/fonts/PretendardJPVariable.subset.52.woff2 +0 -0
  106. package/dist/fonts/PretendardJPVariable.subset.53.woff2 +0 -0
  107. package/dist/fonts/PretendardJPVariable.subset.54.woff2 +0 -0
  108. package/dist/fonts/PretendardJPVariable.subset.55.woff2 +0 -0
  109. package/dist/fonts/PretendardJPVariable.subset.56.woff2 +0 -0
  110. package/dist/fonts/PretendardJPVariable.subset.57.woff2 +0 -0
  111. package/dist/fonts/PretendardJPVariable.subset.58.woff2 +0 -0
  112. package/dist/fonts/PretendardJPVariable.subset.59.woff2 +0 -0
  113. package/dist/fonts/PretendardJPVariable.subset.6.woff2 +0 -0
  114. package/dist/fonts/PretendardJPVariable.subset.60.woff2 +0 -0
  115. package/dist/fonts/PretendardJPVariable.subset.61.woff2 +0 -0
  116. package/dist/fonts/PretendardJPVariable.subset.62.woff2 +0 -0
  117. package/dist/fonts/PretendardJPVariable.subset.63.woff2 +0 -0
  118. package/dist/fonts/PretendardJPVariable.subset.64.woff2 +0 -0
  119. package/dist/fonts/PretendardJPVariable.subset.65.woff2 +0 -0
  120. package/dist/fonts/PretendardJPVariable.subset.66.woff2 +0 -0
  121. package/dist/fonts/PretendardJPVariable.subset.67.woff2 +0 -0
  122. package/dist/fonts/PretendardJPVariable.subset.68.woff2 +0 -0
  123. package/dist/fonts/PretendardJPVariable.subset.69.woff2 +0 -0
  124. package/dist/fonts/PretendardJPVariable.subset.7.woff2 +0 -0
  125. package/dist/fonts/PretendardJPVariable.subset.70.woff2 +0 -0
  126. package/dist/fonts/PretendardJPVariable.subset.71.woff2 +0 -0
  127. package/dist/fonts/PretendardJPVariable.subset.72.woff2 +0 -0
  128. package/dist/fonts/PretendardJPVariable.subset.73.woff2 +0 -0
  129. package/dist/fonts/PretendardJPVariable.subset.74.woff2 +0 -0
  130. package/dist/fonts/PretendardJPVariable.subset.75.woff2 +0 -0
  131. package/dist/fonts/PretendardJPVariable.subset.76.woff2 +0 -0
  132. package/dist/fonts/PretendardJPVariable.subset.77.woff2 +0 -0
  133. package/dist/fonts/PretendardJPVariable.subset.78.woff2 +0 -0
  134. package/dist/fonts/PretendardJPVariable.subset.79.woff2 +0 -0
  135. package/dist/fonts/PretendardJPVariable.subset.8.woff2 +0 -0
  136. package/dist/fonts/PretendardJPVariable.subset.80.woff2 +0 -0
  137. package/dist/fonts/PretendardJPVariable.subset.81.woff2 +0 -0
  138. package/dist/fonts/PretendardJPVariable.subset.82.woff2 +0 -0
  139. package/dist/fonts/PretendardJPVariable.subset.83.woff2 +0 -0
  140. package/dist/fonts/PretendardJPVariable.subset.84.woff2 +0 -0
  141. package/dist/fonts/PretendardJPVariable.subset.85.woff2 +0 -0
  142. package/dist/fonts/PretendardJPVariable.subset.86.woff2 +0 -0
  143. package/dist/fonts/PretendardJPVariable.subset.87.woff2 +0 -0
  144. package/dist/fonts/PretendardJPVariable.subset.88.woff2 +0 -0
  145. package/dist/fonts/PretendardJPVariable.subset.89.woff2 +0 -0
  146. package/dist/fonts/PretendardJPVariable.subset.9.woff2 +0 -0
  147. package/dist/fonts/PretendardJPVariable.subset.90.woff2 +0 -0
  148. package/dist/fonts/PretendardJPVariable.subset.91.woff2 +0 -0
  149. package/dist/fonts/PretendardJPVariable.subset.92.woff2 +0 -0
  150. package/dist/fonts/PretendardJPVariable.subset.93.woff2 +0 -0
  151. package/dist/fonts/PretendardJPVariable.subset.94.woff2 +0 -0
  152. package/dist/fonts/PretendardJPVariable.subset.95.woff2 +0 -0
  153. package/dist/fonts/PretendardJPVariable.subset.96.woff2 +0 -0
  154. package/dist/fonts/PretendardJPVariable.subset.97.woff2 +0 -0
  155. package/dist/fonts/PretendardJPVariable.subset.98.woff2 +0 -0
  156. package/dist/fonts/PretendardJPVariable.subset.99.woff2 +0 -0
  157. package/dist/fonts/PretendardVariable.subset.0.woff2 +0 -0
  158. package/dist/fonts/PretendardVariable.subset.1.woff2 +0 -0
  159. package/dist/fonts/PretendardVariable.subset.10.woff2 +0 -0
  160. package/dist/fonts/PretendardVariable.subset.11.woff2 +0 -0
  161. package/dist/fonts/PretendardVariable.subset.12.woff2 +0 -0
  162. package/dist/fonts/PretendardVariable.subset.13.woff2 +0 -0
  163. package/dist/fonts/PretendardVariable.subset.14.woff2 +0 -0
  164. package/dist/fonts/PretendardVariable.subset.15.woff2 +0 -0
  165. package/dist/fonts/PretendardVariable.subset.16.woff2 +0 -0
  166. package/dist/fonts/PretendardVariable.subset.17.woff2 +0 -0
  167. package/dist/fonts/PretendardVariable.subset.18.woff2 +0 -0
  168. package/dist/fonts/PretendardVariable.subset.19.woff2 +0 -0
  169. package/dist/fonts/PretendardVariable.subset.2.woff2 +0 -0
  170. package/dist/fonts/PretendardVariable.subset.20.woff2 +0 -0
  171. package/dist/fonts/PretendardVariable.subset.21.woff2 +0 -0
  172. package/dist/fonts/PretendardVariable.subset.22.woff2 +0 -0
  173. package/dist/fonts/PretendardVariable.subset.23.woff2 +0 -0
  174. package/dist/fonts/PretendardVariable.subset.24.woff2 +0 -0
  175. package/dist/fonts/PretendardVariable.subset.25.woff2 +0 -0
  176. package/dist/fonts/PretendardVariable.subset.26.woff2 +0 -0
  177. package/dist/fonts/PretendardVariable.subset.27.woff2 +0 -0
  178. package/dist/fonts/PretendardVariable.subset.28.woff2 +0 -0
  179. package/dist/fonts/PretendardVariable.subset.29.woff2 +0 -0
  180. package/dist/fonts/PretendardVariable.subset.3.woff2 +0 -0
  181. package/dist/fonts/PretendardVariable.subset.30.woff2 +0 -0
  182. package/dist/fonts/PretendardVariable.subset.31.woff2 +0 -0
  183. package/dist/fonts/PretendardVariable.subset.32.woff2 +0 -0
  184. package/dist/fonts/PretendardVariable.subset.33.woff2 +0 -0
  185. package/dist/fonts/PretendardVariable.subset.34.woff2 +0 -0
  186. package/dist/fonts/PretendardVariable.subset.35.woff2 +0 -0
  187. package/dist/fonts/PretendardVariable.subset.36.woff2 +0 -0
  188. package/dist/fonts/PretendardVariable.subset.37.woff2 +0 -0
  189. package/dist/fonts/PretendardVariable.subset.38.woff2 +0 -0
  190. package/dist/fonts/PretendardVariable.subset.39.woff2 +0 -0
  191. package/dist/fonts/PretendardVariable.subset.4.woff2 +0 -0
  192. package/dist/fonts/PretendardVariable.subset.40.woff2 +0 -0
  193. package/dist/fonts/PretendardVariable.subset.41.woff2 +0 -0
  194. package/dist/fonts/PretendardVariable.subset.42.woff2 +0 -0
  195. package/dist/fonts/PretendardVariable.subset.43.woff2 +0 -0
  196. package/dist/fonts/PretendardVariable.subset.44.woff2 +0 -0
  197. package/dist/fonts/PretendardVariable.subset.45.woff2 +0 -0
  198. package/dist/fonts/PretendardVariable.subset.46.woff2 +0 -0
  199. package/dist/fonts/PretendardVariable.subset.47.woff2 +0 -0
  200. package/dist/fonts/PretendardVariable.subset.48.woff2 +0 -0
  201. package/dist/fonts/PretendardVariable.subset.49.woff2 +0 -0
  202. package/dist/fonts/PretendardVariable.subset.5.woff2 +0 -0
  203. package/dist/fonts/PretendardVariable.subset.50.woff2 +0 -0
  204. package/dist/fonts/PretendardVariable.subset.51.woff2 +0 -0
  205. package/dist/fonts/PretendardVariable.subset.52.woff2 +0 -0
  206. package/dist/fonts/PretendardVariable.subset.53.woff2 +0 -0
  207. package/dist/fonts/PretendardVariable.subset.54.woff2 +0 -0
  208. package/dist/fonts/PretendardVariable.subset.55.woff2 +0 -0
  209. package/dist/fonts/PretendardVariable.subset.56.woff2 +0 -0
  210. package/dist/fonts/PretendardVariable.subset.57.woff2 +0 -0
  211. package/dist/fonts/PretendardVariable.subset.58.woff2 +0 -0
  212. package/dist/fonts/PretendardVariable.subset.59.woff2 +0 -0
  213. package/dist/fonts/PretendardVariable.subset.6.woff2 +0 -0
  214. package/dist/fonts/PretendardVariable.subset.60.woff2 +0 -0
  215. package/dist/fonts/PretendardVariable.subset.61.woff2 +0 -0
  216. package/dist/fonts/PretendardVariable.subset.62.woff2 +0 -0
  217. package/dist/fonts/PretendardVariable.subset.63.woff2 +0 -0
  218. package/dist/fonts/PretendardVariable.subset.64.woff2 +0 -0
  219. package/dist/fonts/PretendardVariable.subset.65.woff2 +0 -0
  220. package/dist/fonts/PretendardVariable.subset.66.woff2 +0 -0
  221. package/dist/fonts/PretendardVariable.subset.67.woff2 +0 -0
  222. package/dist/fonts/PretendardVariable.subset.68.woff2 +0 -0
  223. package/dist/fonts/PretendardVariable.subset.69.woff2 +0 -0
  224. package/dist/fonts/PretendardVariable.subset.7.woff2 +0 -0
  225. package/dist/fonts/PretendardVariable.subset.70.woff2 +0 -0
  226. package/dist/fonts/PretendardVariable.subset.71.woff2 +0 -0
  227. package/dist/fonts/PretendardVariable.subset.72.woff2 +0 -0
  228. package/dist/fonts/PretendardVariable.subset.73.woff2 +0 -0
  229. package/dist/fonts/PretendardVariable.subset.74.woff2 +0 -0
  230. package/dist/fonts/PretendardVariable.subset.75.woff2 +0 -0
  231. package/dist/fonts/PretendardVariable.subset.76.woff2 +0 -0
  232. package/dist/fonts/PretendardVariable.subset.77.woff2 +0 -0
  233. package/dist/fonts/PretendardVariable.subset.78.woff2 +0 -0
  234. package/dist/fonts/PretendardVariable.subset.79.woff2 +0 -0
  235. package/dist/fonts/PretendardVariable.subset.8.woff2 +0 -0
  236. package/dist/fonts/PretendardVariable.subset.80.woff2 +0 -0
  237. package/dist/fonts/PretendardVariable.subset.81.woff2 +0 -0
  238. package/dist/fonts/PretendardVariable.subset.82.woff2 +0 -0
  239. package/dist/fonts/PretendardVariable.subset.83.woff2 +0 -0
  240. package/dist/fonts/PretendardVariable.subset.84.woff2 +0 -0
  241. package/dist/fonts/PretendardVariable.subset.85.woff2 +0 -0
  242. package/dist/fonts/PretendardVariable.subset.86.woff2 +0 -0
  243. package/dist/fonts/PretendardVariable.subset.87.woff2 +0 -0
  244. package/dist/fonts/PretendardVariable.subset.88.woff2 +0 -0
  245. package/dist/fonts/PretendardVariable.subset.89.woff2 +0 -0
  246. package/dist/fonts/PretendardVariable.subset.9.woff2 +0 -0
  247. package/dist/fonts/PretendardVariable.subset.90.woff2 +0 -0
  248. package/dist/fonts/PretendardVariable.subset.91.woff2 +0 -0
  249. package/dist/fonts.css +2018 -0
  250. package/dist/index.d.ts +1 -0
  251. package/dist/index.js +75 -5779
  252. package/dist/lib/icons.js +225 -0
  253. package/dist/lib/size.d.ts +8 -0
  254. package/dist/lib/use-dialog-a11y.d.ts +2 -0
  255. package/dist/lib/use-dialog-a11y.js +50 -0
  256. package/dist/lib/utils.js +16 -0
  257. package/dist/style.css +1 -1
  258. package/dist/tokens/pyler-light.js +134 -0
  259. package/dist/tokens/typography.js +84 -0
  260. package/package.json +22 -5
  261. package/pyler-tailwind-colors.cjs +4 -0
  262. package/dist/index.css.d.ts +0 -0
@@ -0,0 +1,149 @@
1
+ "use client";
2
+ import { jsx as h } from "react/jsx-runtime";
3
+ import { cn as T } from "../../lib/utils.js";
4
+ import * as o from "react";
5
+ const A = o.createContext(null);
6
+ function I() {
7
+ const e = o.useContext(A);
8
+ if (!e) throw new Error("TabsTrigger must be used within Tabs");
9
+ return e;
10
+ }
11
+ const R = o.forwardRef(
12
+ ({
13
+ value: e,
14
+ defaultValue: t = "",
15
+ onValueChange: d,
16
+ variant: l = "underline",
17
+ children: i,
18
+ className: c
19
+ }, f) => {
20
+ const [x, p] = o.useState(t), g = e !== void 0, b = g ? e : x, m = o.useId(), [w, s] = o.useState(() => /* @__PURE__ */ new Set()), y = o.useCallback((u) => (s((a) => {
21
+ if (a.has(u)) return a;
22
+ const r = new Set(a);
23
+ return r.add(u), r;
24
+ }), () => s((a) => {
25
+ if (!a.has(u)) return a;
26
+ const r = new Set(a);
27
+ return r.delete(u), r;
28
+ })), []), k = (u) => {
29
+ g || p(u), d == null || d(u);
30
+ }, n = o.useMemo(
31
+ () => ({ value: b, onValueChange: k, variant: l, baseId: m, panels: w, registerPanel: y }),
32
+ // handleChange 는 렌더마다 새로 만들어지지만 참조하는 값이 아래 의존성에 모두 들어 있다
33
+ // eslint-disable-next-line react-hooks/exhaustive-deps
34
+ [b, g, d, l, m, w, y]
35
+ );
36
+ return /* @__PURE__ */ h(A.Provider, { value: n, children: /* @__PURE__ */ h("div", { ref: f, className: T("flex flex-col", c), children: i }) });
37
+ }
38
+ );
39
+ R.displayName = "Tabs";
40
+ const P = o.forwardRef(
41
+ ({ children: e, className: t }, d) => {
42
+ const { variant: l } = I();
43
+ return /* @__PURE__ */ h(
44
+ "div",
45
+ {
46
+ ref: d,
47
+ role: "tablist",
48
+ className: T(
49
+ "flex items-center",
50
+ l === "underline" && "gap-5",
51
+ l === "outline" && "gap-1",
52
+ l === "round" && "bg-ds-surface-strong p-1 rounded-lg",
53
+ t
54
+ ),
55
+ children: e
56
+ }
57
+ );
58
+ }
59
+ );
60
+ P.displayName = "TabsList";
61
+ const S = o.forwardRef(
62
+ ({ value: e, disabled: t, children: d, className: l, onClick: i, onKeyDown: c, ...f }, x) => {
63
+ const { value: p, onValueChange: g, variant: b, baseId: m, panels: w } = I(), s = p === e, y = w.has(e), k = (n) => {
64
+ if (c == null || c(n), n.defaultPrevented || !["ArrowRight", "ArrowLeft", "Home", "End"].includes(n.key)) return;
65
+ const a = n.currentTarget.closest('[role="tablist"]'), r = Array.from(
66
+ (a == null ? void 0 : a.querySelectorAll('[role="tab"]:not([disabled])')) ?? []
67
+ );
68
+ if (r.length === 0) return;
69
+ n.preventDefault();
70
+ const N = r.indexOf(n.currentTarget), $ = n.key === "Home" ? 0 : n.key === "End" ? r.length - 1 : n.key === "ArrowRight" ? (N + 1 + r.length) % r.length : (N - 1 + r.length) % r.length;
71
+ r[$].focus(), r[$].click();
72
+ };
73
+ return /* @__PURE__ */ h(
74
+ "button",
75
+ {
76
+ ref: x,
77
+ role: "tab",
78
+ type: "button",
79
+ id: `${m}-tab-${e}`,
80
+ "aria-selected": s,
81
+ "aria-controls": y ? `${m}-panel-${e}` : void 0,
82
+ tabIndex: s ? 0 : -1,
83
+ disabled: t,
84
+ onClick: (n) => {
85
+ t || g(e), i == null || i(n);
86
+ },
87
+ onKeyDown: k,
88
+ className: T(
89
+ "inline-flex items-center justify-center whitespace-nowrap shrink-0 transition-colors focus-visible:outline-none",
90
+ b === "underline" && [
91
+ "h-11 text-body-2-sb",
92
+ s && !t && "border-b-2 border-ds-text-strong text-ds-text-strong",
93
+ !s && !t && "text-ds-text-normal",
94
+ t && "text-ds-text-disabled cursor-not-allowed"
95
+ ],
96
+ b === "box" && [
97
+ "h-10 px-3 rounded-lg text-body-3-m",
98
+ s && !t && "bg-ds-surface-normal text-ds-text-strong",
99
+ !s && !t && "bg-ds-background-default text-ds-text-normal",
100
+ t && "bg-ds-background-default text-ds-text-disabled cursor-not-allowed"
101
+ ],
102
+ b === "outline" && [
103
+ "h-8 px-3 rounded-full text-body-4-m",
104
+ s && !t && "bg-ds-surface-normal text-ds-text-strong",
105
+ !s && !t && "bg-ds-background-default border border-ds-line-normal text-ds-text-normal",
106
+ t && "bg-ds-background-default border border-ds-line-normal text-ds-text-disabled cursor-not-allowed"
107
+ ],
108
+ b === "round" && [
109
+ "h-7 px-2.5 rounded text-body-4-r",
110
+ s && !t && "bg-ds-surface-alternative text-ds-text-strong",
111
+ !s && !t && "bg-ds-surface-strong text-ds-text-normal",
112
+ t && "bg-ds-surface-strong text-ds-text-disabled cursor-not-allowed"
113
+ ],
114
+ l
115
+ ),
116
+ ...f,
117
+ children: d
118
+ }
119
+ );
120
+ }
121
+ );
122
+ S.displayName = "TabsTrigger";
123
+ const E = o.forwardRef(
124
+ ({ value: e, children: t, className: d }, l) => {
125
+ const { value: i, baseId: c, registerPanel: f } = I(), x = i === e;
126
+ return o.useEffect(() => {
127
+ if (x)
128
+ return f(e);
129
+ }, [x, e, f]), x ? /* @__PURE__ */ h(
130
+ "div",
131
+ {
132
+ ref: l,
133
+ role: "tabpanel",
134
+ id: `${c}-panel-${e}`,
135
+ "aria-labelledby": `${c}-tab-${e}`,
136
+ tabIndex: 0,
137
+ className: T("mt-4", d),
138
+ children: t
139
+ }
140
+ ) : null;
141
+ }
142
+ );
143
+ E.displayName = "TabsContent";
144
+ export {
145
+ R as Tabs,
146
+ E as TabsContent,
147
+ P as TabsList,
148
+ S as TabsTrigger
149
+ };
@@ -1,5 +1,6 @@
1
+ import { DsSize } from '../../lib/size';
1
2
  import * as React from "react";
2
- export type TagSize = "medium" | "small" | "xsmall";
3
+ export type TagSize = Extract<DsSize, "md" | "sm" | "xs">;
3
4
  export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
4
5
  size?: TagSize;
5
6
  }
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { cn as p } from "../../lib/utils.js";
4
+ import * as i from "react";
5
+ const x = {
6
+ md: { padding: "px-2 py-1", text: "text-body-3-r" },
7
+ sm: { padding: "px-2 py-0.5", text: "text-body-4-r" },
8
+ xs: { padding: "px-2 py-0.5", text: "text-label-1-r" }
9
+ }, l = i.forwardRef(
10
+ ({ size: t = "md", className: e, children: r, ...s }, d) => {
11
+ const { padding: n, text: a } = x[t];
12
+ return /* @__PURE__ */ o(
13
+ "span",
14
+ {
15
+ ref: d,
16
+ className: p(
17
+ "inline-flex items-center justify-center border border-ds-line-strong rounded-full bg-ds-background-default text-ds-text-strong whitespace-nowrap",
18
+ n,
19
+ a,
20
+ e
21
+ ),
22
+ ...s,
23
+ children: r
24
+ }
25
+ );
26
+ }
27
+ );
28
+ l.displayName = "Tag";
29
+ export {
30
+ l as Tag
31
+ };
@@ -1,6 +1,7 @@
1
+ import { DsSize } from '../../lib/size';
1
2
  import * as React from "react";
2
3
  export type TipsColor = "white" | "black";
3
- export type TipsSize = "medium" | "small";
4
+ export type TipsSize = Extract<DsSize, "md" | "sm">;
4
5
  export interface TipsProps extends React.HTMLAttributes<HTMLDivElement> {
5
6
  color?: TipsColor;
6
7
  size?: TipsSize;
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { jsx as p } from "react/jsx-runtime";
3
+ import { cn as s } from "../../lib/utils.js";
4
+ import * as a from "react";
5
+ const x = a.forwardRef(
6
+ ({ color: e = "white", size: t = "md", className: r, children: d, ...o }, i) => /* @__PURE__ */ p(
7
+ "div",
8
+ {
9
+ ref: i,
10
+ className: s(
11
+ "inline-flex flex-col items-start justify-center rounded-[8px] shadow-[0px_5px_16px_0px_rgba(0,0,0,0.05)]",
12
+ t === "md" ? "px-2.5 py-2" : "px-2 py-1.5",
13
+ e === "black" ? "bg-ds-primitive-black text-white" : "bg-ds-background-default border border-ds-line-normal text-ds-text-strong",
14
+ t === "md" ? "text-body-4-r" : "text-label-1-r",
15
+ r
16
+ ),
17
+ ...o,
18
+ children: d
19
+ }
20
+ )
21
+ );
22
+ x.displayName = "Tips";
23
+ export {
24
+ x as Tips
25
+ };
@@ -0,0 +1,70 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
3
+ import { CautionIcon as a, NegativeIcon as m, PositiveIcon as l, ChevronRightIcon as p } from "../../lib/icons.js";
4
+ import { cn as u } from "../../lib/utils.js";
5
+ import { toast as s, Toaster as x } from "sonner";
6
+ function r({ icon: t, message: o }) {
7
+ return /* @__PURE__ */ i("div", { className: "bg-ds-primitive-black flex items-center gap-1.5 p-3 rounded-lg w-[336px]", children: [
8
+ t,
9
+ /* @__PURE__ */ e("p", { className: "text-white text-body-2-r flex-1 min-w-0", children: o })
10
+ ] });
11
+ }
12
+ function f({ position: t = "bottom-center" }) {
13
+ return /* @__PURE__ */ e(
14
+ x,
15
+ {
16
+ position: t,
17
+ toastOptions: { unstyled: !0, classNames: { toast: "!p-0 !bg-transparent !shadow-none !border-none" } }
18
+ }
19
+ );
20
+ }
21
+ const g = {
22
+ success: (t, o) => s.custom(() => /* @__PURE__ */ e(r, { icon: /* @__PURE__ */ e(l, {}), message: t }), o),
23
+ error: (t, o) => s.custom(() => /* @__PURE__ */ e(r, { icon: /* @__PURE__ */ e(m, {}), message: t }), o),
24
+ caution: (t, o) => s.custom(() => /* @__PURE__ */ e(r, { icon: /* @__PURE__ */ e(a, {}), message: t }), o)
25
+ };
26
+ function c({
27
+ icon: t,
28
+ message: o,
29
+ action: n
30
+ }) {
31
+ return /* @__PURE__ */ i("div", { className: "bg-ds-primitive-black flex items-center gap-1.5 px-3 py-4 rounded-lg w-[336px] shadow-[0px_5px_16px_0px_rgba(0,0,0,0.05)]", children: [
32
+ t,
33
+ /* @__PURE__ */ e("p", { className: "text-white text-body-2-r flex-1 min-w-0", children: o }),
34
+ n && /* @__PURE__ */ i(
35
+ "button",
36
+ {
37
+ type: "button",
38
+ onClick: n.onClick,
39
+ className: u(
40
+ "inline-flex items-center shrink-0 text-white text-body-3-m whitespace-nowrap",
41
+ n.withIcon ? "gap-0.5" : ""
42
+ ),
43
+ children: [
44
+ n.label,
45
+ n.withIcon && /* @__PURE__ */ e(p, {})
46
+ ]
47
+ }
48
+ )
49
+ ] });
50
+ }
51
+ const k = {
52
+ success: (t, o, n) => s.custom(
53
+ () => /* @__PURE__ */ e(c, { icon: /* @__PURE__ */ e(l, {}), message: t, action: o }),
54
+ n
55
+ ),
56
+ error: (t, o, n) => s.custom(
57
+ () => /* @__PURE__ */ e(c, { icon: /* @__PURE__ */ e(m, {}), message: t, action: o }),
58
+ n
59
+ ),
60
+ caution: (t, o, n) => s.custom(
61
+ () => /* @__PURE__ */ e(c, { icon: /* @__PURE__ */ e(a, {}), message: t, action: o }),
62
+ n
63
+ )
64
+ };
65
+ export {
66
+ c as SnackbarContent,
67
+ f as Toaster,
68
+ k as snackbar,
69
+ g as toast
70
+ };
@@ -1,10 +1,9 @@
1
1
  import * as React from "react";
2
- export interface ToggleProps {
2
+ export interface ToggleProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "type"> {
3
3
  checked?: boolean;
4
4
  neutral?: boolean;
5
5
  disabled?: boolean;
6
6
  onChange?: (checked: boolean) => void;
7
- className?: string;
8
7
  }
9
8
  declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLButtonElement>>;
10
9
  export { Toggle };
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { cn as s } from "../../lib/utils.js";
4
+ import * as p from "react";
5
+ const b = p.forwardRef(
6
+ ({ checked: r, neutral: l, disabled: o, onChange: t, className: i, ...a }, e) => {
7
+ const m = l ? "left-[11px]" : r ? "left-[17px]" : "left-[3px]", u = o ? r ? "bg-ds-primary-blue-disabled" : "bg-ds-line-normal" : r ? "bg-ds-primary-blue-normal" : "bg-ds-line-normal";
8
+ return /* @__PURE__ */ n(
9
+ "button",
10
+ {
11
+ ref: e,
12
+ type: "button",
13
+ role: "switch",
14
+ "aria-checked": l ? "mixed" : r,
15
+ disabled: o,
16
+ onClick: () => !o && (t == null ? void 0 : t(!r)),
17
+ className: s(
18
+ "relative inline-flex h-6 w-10 shrink-0 rounded-full border border-ds-line-normal transition-colors",
19
+ o && !r ? "bg-ds-surface-normal" : "bg-ds-background-default",
20
+ o ? "cursor-not-allowed" : "cursor-pointer",
21
+ i
22
+ ),
23
+ ...a,
24
+ children: /* @__PURE__ */ n(
25
+ "span",
26
+ {
27
+ className: s(
28
+ "absolute top-1/2 -translate-y-1/2 h-[18px] w-[18px] rounded-full transition-all duration-200",
29
+ m,
30
+ u
31
+ )
32
+ }
33
+ )
34
+ }
35
+ );
36
+ }
37
+ );
38
+ b.displayName = "Toggle";
39
+ export {
40
+ b as Toggle
41
+ };
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import { jsxs as a, jsx as f } from "react/jsx-runtime";
3
+ import * as c from "react";
4
+ import { InformationModal as x, ActionModal as w, ContentModal as P } from "./modal.js";
5
+ const p = c.createContext(null);
6
+ let h = 0;
7
+ function C() {
8
+ return `modal-${++h}`;
9
+ }
10
+ function y({ children: o }) {
11
+ const [b, s] = c.useState([]), i = c.useCallback((e, n) => {
12
+ s((r) => {
13
+ const t = r.find((u) => u.id === e);
14
+ return t == null || t.resolve(n), r.filter((u) => u.id !== e);
15
+ });
16
+ }, []), l = c.useCallback((e) => new Promise((n) => {
17
+ const r = C();
18
+ s((t) => [...t, { ...e, id: r, type: "information", resolve: n }]);
19
+ }), []), M = c.useCallback((e) => new Promise((n) => {
20
+ const r = C();
21
+ s((t) => [...t, { ...e, id: r, type: "action", resolve: n }]);
22
+ }), []), L = c.useCallback((e) => new Promise((n) => {
23
+ const r = C();
24
+ s((t) => [...t, { ...e, id: r, type: "content", resolve: n }]);
25
+ }), []);
26
+ return /* @__PURE__ */ a(p.Provider, { value: { openInformationModal: l, openActionModal: M, openContentModal: L }, children: [
27
+ o,
28
+ b.map((e) => e.type === "information" ? /* @__PURE__ */ f(
29
+ x,
30
+ {
31
+ open: !0,
32
+ title: e.title,
33
+ description: e.description,
34
+ confirmLabel: e.confirmLabel,
35
+ onConfirm: () => {
36
+ var n;
37
+ (n = e.onConfirm) == null || n.call(e), i(e.id, !0);
38
+ },
39
+ onClose: () => i(e.id, !1)
40
+ },
41
+ e.id
42
+ ) : e.type === "action" ? /* @__PURE__ */ f(
43
+ w,
44
+ {
45
+ open: !0,
46
+ title: e.title,
47
+ description: e.description,
48
+ cancelLabel: e.cancelLabel,
49
+ confirmLabel: e.confirmLabel,
50
+ onCancel: () => {
51
+ var n;
52
+ (n = e.onCancel) == null || n.call(e), i(e.id, !1);
53
+ },
54
+ onConfirm: () => {
55
+ var n;
56
+ (n = e.onConfirm) == null || n.call(e), i(e.id, !0);
57
+ },
58
+ onClose: () => i(e.id, !1)
59
+ },
60
+ e.id
61
+ ) : /* @__PURE__ */ f(
62
+ P,
63
+ {
64
+ open: !0,
65
+ title: e.title,
66
+ description: e.description,
67
+ size: e.size,
68
+ cancelLabel: e.cancelLabel,
69
+ confirmLabel: e.confirmLabel,
70
+ onCancel: () => {
71
+ var n;
72
+ (n = e.onCancel) == null || n.call(e), i(e.id, !1);
73
+ },
74
+ onConfirm: () => {
75
+ var n;
76
+ (n = e.onConfirm) == null || n.call(e), i(e.id, !0);
77
+ },
78
+ onClose: () => i(e.id, !1),
79
+ children: e.content
80
+ },
81
+ e.id
82
+ ))
83
+ ] });
84
+ }
85
+ function I() {
86
+ const o = c.useContext(p);
87
+ if (!o)
88
+ throw new Error("useModal must be used within a ModalProvider");
89
+ return o;
90
+ }
91
+ export {
92
+ y as ModalProvider,
93
+ I as useModal
94
+ };