@pantoia/ui 0.1.0 → 0.3.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 (68) hide show
  1. package/accordion/AGENTS.md +5 -5
  2. package/accordion/index.tsx +21 -11
  3. package/alert-dialog/AGENTS.md +7 -7
  4. package/alert-dialog/index.tsx +20 -10
  5. package/badge/AGENTS.md +5 -5
  6. package/badge/index.tsx +8 -8
  7. package/button/AGENTS.md +7 -7
  8. package/button/index.tsx +34 -34
  9. package/callout/AGENTS.md +4 -9
  10. package/callout/index.tsx +42 -22
  11. package/checkbox/AGENTS.md +5 -5
  12. package/checkbox/index.tsx +19 -16
  13. package/combobox/AGENTS.md +13 -13
  14. package/combobox/index.tsx +90 -42
  15. package/command-palette/AGENTS.md +3 -6
  16. package/command-palette/index.tsx +7 -3
  17. package/dialog/AGENTS.md +6 -6
  18. package/dialog/index.tsx +11 -5
  19. package/dist/index.js +200 -43
  20. package/drawer/AGENTS.md +5 -5
  21. package/drawer/index.tsx +8 -4
  22. package/dropdown-menu/AGENTS.md +12 -12
  23. package/dropdown-menu/index.tsx +27 -12
  24. package/field/AGENTS.md +8 -12
  25. package/field/index.tsx +39 -13
  26. package/input/AGENTS.md +4 -4
  27. package/input/index.tsx +5 -5
  28. package/kbd/AGENTS.md +1 -1
  29. package/kbd/index.tsx +6 -2
  30. package/label/AGENTS.md +1 -1
  31. package/label/index.tsx +3 -1
  32. package/number-field/AGENTS.md +6 -10
  33. package/number-field/index.tsx +26 -16
  34. package/package.json +13 -15
  35. package/palette.css +114 -0
  36. package/popover/AGENTS.md +4 -4
  37. package/popover/index.tsx +14 -4
  38. package/radio-group/AGENTS.md +8 -8
  39. package/radio-group/index.tsx +20 -16
  40. package/registry.json +9 -71
  41. package/select/AGENTS.md +10 -10
  42. package/select/index.tsx +46 -21
  43. package/switch/AGENTS.md +4 -4
  44. package/switch/index.tsx +13 -13
  45. package/table/AGENTS.md +9 -9
  46. package/table/index.tsx +16 -6
  47. package/tabs/AGENTS.md +5 -4
  48. package/tabs/index.module.css +2 -0
  49. package/tabs/index.tsx +22 -11
  50. package/tailwind.css +3 -0
  51. package/textarea/AGENTS.md +4 -4
  52. package/textarea/index.tsx +5 -5
  53. package/toast/AGENTS.md +5 -13
  54. package/toast/index.tsx +27 -33
  55. package/toggle/AGENTS.md +4 -4
  56. package/toggle/index.tsx +8 -7
  57. package/tokens.css +272 -0
  58. package/tooltip/AGENTS.md +2 -2
  59. package/tooltip/index.tsx +14 -4
  60. package/tv.ts +0 -1
  61. package/utilities.css +119 -0
  62. package/code-block/AGENTS.md +0 -60
  63. package/code-block/index.module.css +0 -46
  64. package/code-block/index.tsx +0 -127
  65. package/copy-button/AGENTS.md +0 -43
  66. package/copy-button/index.tsx +0 -119
  67. package/press.css +0 -37
  68. package/styles.css +0 -347
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add radio-group
5
5
  층 ui
6
- 파일 radio-group/index.tsx · radio-group/AGENTS.md
6
+ 파일 radio-group/index.tsx, radio-group/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -12,8 +12,8 @@
12
12
  |---|---|
13
13
  | `RadioGroup` | `RadioGroupProps` |
14
14
  | `RadioGroupItem` | `RadioGroupItemProps` |
15
- | `RadioGroupItemLabel` | — |
16
- | `RadioGroupItemDescription` | — |
15
+ | `RadioGroupItemLabel` | - |
16
+ | `RadioGroupItemDescription` | - |
17
17
 
18
18
  ### `RadioGroupItemLabel`
19
19
 
@@ -33,7 +33,7 @@
33
33
 
34
34
  ### `RadioColor`
35
35
 
36
- `'control' | 'info' | 'success' | 'warning' | 'danger'`
36
+ `'neutral' | 'info' | 'success' | 'warning' | 'danger'`
37
37
 
38
38
  ### `RadioItemContext`
39
39
 
@@ -64,17 +64,17 @@
64
64
  | `className` | `string` | |
65
65
  | `children` | `ReactNode` | |
66
66
 
67
- ## 변형 — `radioGroupItem`
67
+ ## 변형 - `radioGroupItem`
68
68
 
69
- 슬롯 `root` · `control`
69
+ 슬롯 `root`, `control`
70
70
 
71
71
  | 축 | 값 | 기본 |
72
72
  |---|---|---|
73
- | `color` | `control` · `info` · `success` · `warning` · `danger` | `control` |
73
+ | `color` | `neutral`, `info`, `success`, `warning`, `danger` | `neutral` |
74
74
 
75
75
  ## 함께 받는 것
76
76
 
77
- `label` · `tv`
77
+ `label`, `tv`
78
78
 
79
79
  ## npm 의존
80
80
 
@@ -6,9 +6,9 @@ import { createContext, use, useId, type ReactNode } from 'react'
6
6
  import { Label } from '../label'
7
7
  import { tv } from '../tv'
8
8
 
9
- export type RadioColor = 'control' | 'info' | 'success' | 'warning' | 'danger'
9
+ export type RadioColor = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
10
10
 
11
- const ColorContext = createContext<RadioColor>('control')
11
+ const ColorContext = createContext<RadioColor>('neutral')
12
12
 
13
13
  export interface RadioItemContext {
14
14
  id: string
@@ -25,23 +25,23 @@ export const radioGroupItem = tv({
25
25
  + ' bg-transparent transition-state press press-shrink'
26
26
  + ' inline-flex items-center justify-center'
27
27
  + ' checked:ring-2'
28
- + ' in-invalid:ring-2 in-invalid:ring-danger'
29
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
30
- + ' disabled:ring-line disabled:bg-disabled disabled:cursor-not-allowed'
31
- + ' checked:disabled:bg-control-on-disabled checked:disabled:ring-control-on-disabled',
28
+ + ' in-invalid:ring-2 in-invalid:ring-line-danger'
29
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
30
+ + ' disabled:ring-line disabled:bg-bg-neutral-disabled disabled:cursor-not-allowed'
31
+ + ' checked:disabled:bg-bg-neutral-solid-checked-disabled checked:disabled:ring-transparent',
32
32
  },
33
33
 
34
34
  variants: {
35
35
  color: {
36
- control: { control: 'checked:bg-control-on checked:ring-control-on' },
37
- info: { control: 'checked:bg-info checked:ring-info' },
38
- success: { control: 'checked:bg-success checked:ring-success' },
39
- warning: { control: 'checked:bg-warning checked:ring-warning' },
40
- danger: { control: 'checked:bg-danger checked:ring-danger' },
36
+ neutral: { control: 'checked:bg-bg-neutral-solid checked:ring-line-neutral-solid' },
37
+ info: { control: 'checked:bg-bg-info-solid checked:ring-line-info' },
38
+ success: { control: 'checked:bg-bg-success-solid checked:ring-line-success' },
39
+ warning: { control: 'checked:bg-bg-warning-solid checked:ring-line-warning' },
40
+ danger: { control: 'checked:bg-bg-danger-solid checked:ring-line-danger' },
41
41
  },
42
42
  },
43
43
 
44
- defaultVariants: { color: 'control' },
44
+ defaultVariants: { color: 'neutral' },
45
45
  })
46
46
 
47
47
  export interface RadioGroupProps {
@@ -54,11 +54,13 @@ export interface RadioGroupProps {
54
54
  children?: ReactNode
55
55
  }
56
56
 
57
+ const radioGroup = tv({ base: 'flex flex-col gap-3' })
58
+
57
59
  export function RadioGroup({
58
60
  value,
59
61
  defaultValue,
60
62
  onValueChange,
61
- color = 'control',
63
+ color = 'neutral',
62
64
  disabled = false,
63
65
  className,
64
66
  children,
@@ -72,7 +74,7 @@ export function RadioGroup({
72
74
  defaultValue={defaultValue}
73
75
  onValueChange={onValueChange}
74
76
  disabled={disabled}
75
- className={tv({ base: 'flex flex-col gap-3' })({ className })}
77
+ className={radioGroup({ className })}
76
78
  >
77
79
  {children}
78
80
  </RadioGroupPrimitive.Root>
@@ -103,7 +105,7 @@ export function RadioGroupItem({ value, disabled, className, children }: RadioGr
103
105
  aria-describedby={`${id}-description`}
104
106
  className={ui.control()}
105
107
  >
106
- <RadioGroupPrimitive.Indicator className="text-fg-on-control size-2.5 rounded-full bg-current" />
108
+ <RadioGroupPrimitive.Indicator className="text-fg-neutral-solid-contrast size-2.5 rounded-full bg-current" />
107
109
  </RadioGroupPrimitive.Item>
108
110
 
109
111
  <div className="flex min-w-0 flex-col gap-0.5">
@@ -124,6 +126,8 @@ export function RadioGroupItemLabel({ className, children }: { className?: strin
124
126
  )
125
127
  }
126
128
 
129
+ const radioGroupItemDescription = tv({ base: 'text-caption text-fg-subtle' })
130
+
127
131
  export function RadioGroupItemDescription({ className, children }: { className?: string, children?: ReactNode }) {
128
132
  const ctx = use(ItemContext)
129
133
 
@@ -131,7 +135,7 @@ export function RadioGroupItemDescription({ className, children }: { className?:
131
135
  <p
132
136
  id={ctx?.descriptionId}
133
137
  data-description
134
- className={tv({ base: 'text-caption text-fg-subtle' })({ className })}
138
+ className={radioGroupItemDescription({ className })}
135
139
  >
136
140
  {children}
137
141
  </p>
package/registry.json CHANGED
@@ -37,7 +37,6 @@
37
37
  }
38
38
  ],
39
39
  "dependencies": [
40
- "lucide-react",
41
40
  "radix-ui"
42
41
  ],
43
42
  "registryDependencies": [
@@ -133,9 +132,6 @@
133
132
  "target": "callout/AGENTS.md"
134
133
  }
135
134
  ],
136
- "dependencies": [
137
- "lucide-react"
138
- ],
139
135
  "registryDependencies": [
140
136
  "tv"
141
137
  ],
@@ -159,7 +155,6 @@
159
155
  }
160
156
  ],
161
157
  "dependencies": [
162
- "lucide-react",
163
158
  "radix-ui"
164
159
  ],
165
160
  "registryDependencies": [
@@ -169,35 +164,6 @@
169
164
  "layer": "ui"
170
165
  }
171
166
  },
172
- {
173
- "name": "code-block",
174
- "type": "registry:ui",
175
- "title": "CodeBlock",
176
- "files": [
177
- {
178
- "path": "code-block/index.tsx",
179
- "type": "registry:ui"
180
- },
181
- {
182
- "path": "code-block/index.module.css",
183
- "type": "registry:ui"
184
- },
185
- {
186
- "path": "code-block/AGENTS.md",
187
- "type": "registry:file",
188
- "target": "code-block/AGENTS.md"
189
- }
190
- ],
191
- "dependencies": [
192
- "lucide-react"
193
- ],
194
- "registryDependencies": [
195
- "tv"
196
- ],
197
- "meta": {
198
- "layer": "ui"
199
- }
200
- },
201
167
  {
202
168
  "name": "combobox",
203
169
  "type": "registry:ui",
@@ -214,14 +180,14 @@
214
180
  }
215
181
  ],
216
182
  "dependencies": [
217
- "lucide-react",
218
183
  "radix-ui"
219
184
  ],
220
185
  "registryDependencies": [
221
186
  "tv"
222
187
  ],
223
188
  "meta": {
224
- "layer": "ui"
189
+ "layer": "ui",
190
+ "radius": "rounded-r12"
225
191
  }
226
192
  },
227
193
  {
@@ -239,9 +205,6 @@
239
205
  "target": "command-palette/AGENTS.md"
240
206
  }
241
207
  ],
242
- "dependencies": [
243
- "lucide-react"
244
- ],
245
208
  "registryDependencies": [
246
209
  "combobox",
247
210
  "dialog",
@@ -251,28 +214,6 @@
251
214
  "layer": "derived"
252
215
  }
253
216
  },
254
- {
255
- "name": "copy-button",
256
- "type": "registry:ui",
257
- "title": "CopyButton",
258
- "files": [
259
- {
260
- "path": "copy-button/index.tsx",
261
- "type": "registry:ui"
262
- },
263
- {
264
- "path": "copy-button/AGENTS.md",
265
- "type": "registry:file",
266
- "target": "copy-button/AGENTS.md"
267
- }
268
- ],
269
- "registryDependencies": [
270
- "button"
271
- ],
272
- "meta": {
273
- "layer": "derived"
274
- }
275
- },
276
217
  {
277
218
  "name": "dialog",
278
219
  "type": "registry:ui",
@@ -344,14 +285,14 @@
344
285
  }
345
286
  ],
346
287
  "dependencies": [
347
- "lucide-react",
348
288
  "radix-ui"
349
289
  ],
350
290
  "registryDependencies": [
351
291
  "tv"
352
292
  ],
353
293
  "meta": {
354
- "layer": "ui"
294
+ "layer": "ui",
295
+ "radius": "rounded-r12"
355
296
  }
356
297
  },
357
298
  {
@@ -369,9 +310,6 @@
369
310
  "target": "field/AGENTS.md"
370
311
  }
371
312
  ],
372
- "dependencies": [
373
- "lucide-react"
374
- ],
375
313
  "registryDependencies": [
376
314
  "label",
377
315
  "tv"
@@ -464,9 +402,6 @@
464
402
  "target": "number-field/AGENTS.md"
465
403
  }
466
404
  ],
467
- "dependencies": [
468
- "lucide-react"
469
- ],
470
405
  "registryDependencies": [
471
406
  "tv"
472
407
  ],
@@ -541,14 +476,14 @@
541
476
  }
542
477
  ],
543
478
  "dependencies": [
544
- "lucide-react",
545
479
  "radix-ui"
546
480
  ],
547
481
  "registryDependencies": [
548
482
  "tv"
549
483
  ],
550
484
  "meta": {
551
- "layer": "ui"
485
+ "layer": "ui",
486
+ "radius": "rounded-r12"
552
487
  }
553
488
  },
554
489
  {
@@ -667,6 +602,9 @@
667
602
  "dependencies": [
668
603
  "sonner"
669
604
  ],
605
+ "registryDependencies": [
606
+ "tv"
607
+ ],
670
608
  "meta": {
671
609
  "layer": "ui"
672
610
  }
package/select/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add select
5
5
  층 ui
6
- 파일 select/index.tsx · select/AGENTS.md
6
+ 파일 select/index.tsx, select/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -11,11 +11,11 @@
11
11
  | 이름 | props |
12
12
  |---|---|
13
13
  | `Select` | `SelectProps` |
14
- | `SelectGroup` | — |
15
- | `SelectItem` | — |
16
- | `SelectItemText` | — |
17
- | `SelectItemDescription` | — |
18
- | `SelectSeparator` | — |
14
+ | `SelectGroup` | - |
15
+ | `SelectItem` | - |
16
+ | `SelectItemText` | - |
17
+ | `SelectItemDescription` | - |
18
+ | `SelectSeparator` | - |
19
19
 
20
20
  ### `SelectGroup`
21
21
 
@@ -74,12 +74,12 @@
74
74
  | `arrow` | `boolean` | |
75
75
  | `children` | `ReactNode` | |
76
76
 
77
- ## 변형 — `selectTrigger`
77
+ ## 변형 - `selectTrigger`
78
78
 
79
79
  | 축 | 값 | 기본 |
80
80
  |---|---|---|
81
- | `surface` | `bare` · `well` | `bare` |
82
- | `size` | `sm` · `md` · `lg` | `md` |
81
+ | `surface` | `bare`, `well` | `bare` |
82
+ | `size` | `sm`, `md`, `lg` | `md` |
83
83
 
84
84
  ## 함께 받는 것
85
85
 
@@ -87,4 +87,4 @@
87
87
 
88
88
  ## npm 의존
89
89
 
90
- `lucide-react` · `radix-ui`
90
+ `radix-ui`
package/select/index.tsx CHANGED
@@ -1,6 +1,5 @@
1
1
  'use client'
2
2
 
3
- import { Check, ChevronDown, ChevronUp } from 'lucide-react'
4
3
  import { Select as SelectPrimitive } from 'radix-ui'
5
4
  import type { ComponentProps, ReactNode } from 'react'
6
5
 
@@ -10,15 +9,15 @@ export const selectTrigger = tv({
10
9
  base: 'flex w-full items-center justify-between gap-tight rounded-r8'
11
10
  + ' text-value text-fg'
12
11
  + ' transition-state'
13
- + ' invalid:ring-2 invalid:ring-danger'
14
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
15
- + ' disabled:bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed'
12
+ + ' invalid:ring-2 invalid:ring-line-danger'
13
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
14
+ + ' disabled:bg-bg-neutral-disabled disabled:text-fg-disabled disabled:cursor-not-allowed'
16
15
  + ' unset:text-fg-placeholder',
17
16
 
18
17
  variants: {
19
18
  surface: {
20
19
  bare: 'bg-transparent ring-1 ring-inset ring-line-strong',
21
- well: 'bg-well',
20
+ well: 'bg-bg-well',
22
21
  },
23
22
  size: {
24
23
  sm: 'h-8 px-3',
@@ -73,45 +72,59 @@ export function Select({
73
72
  <SelectPrimitive.Value placeholder={placeholder} />
74
73
  </span>
75
74
  <SelectPrimitive.Icon className="text-fg-subtle">
76
- <ChevronDown className="size-4" />
75
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
76
+ <path d="m6 9 6 6 6-6" />
77
+ </svg>
77
78
  </SelectPrimitive.Icon>
78
79
  </SelectPrimitive.Trigger>
79
80
 
80
81
  <SelectPrimitive.Portal>
81
82
  <SelectPrimitive.Content
82
- className="bg-float text-fg rounded-float shadow-s3 z-overlay
83
- min-w-(--radix-select-trigger-width) p-1
83
+ className="float text-fg rounded-r12 z-overlay
84
+ min-w-(--radix-select-trigger-width) py-1
84
85
  open:animate-enter closed:animate-exit"
85
86
  position="popper"
86
87
  sideOffset={8}
87
88
  arrowPadding={16}
88
89
  >
89
90
  <SelectPrimitive.ScrollUpButton className="text-fg-subtle flex h-6 cursor-default items-center justify-center">
90
- <ChevronUp className="size-4" />
91
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
92
+ <path d="m18 15-6-6-6 6" />
93
+ </svg>
91
94
  </SelectPrimitive.ScrollUpButton>
92
95
 
93
- <SelectPrimitive.Viewport className="flex flex-col gap-px">
96
+ <SelectPrimitive.Viewport className="flex flex-col gap-px px-1">
94
97
  {children}
95
98
  </SelectPrimitive.Viewport>
96
99
 
97
100
  <SelectPrimitive.ScrollDownButton className="text-fg-subtle flex h-6 cursor-default items-center justify-center">
98
- <ChevronDown className="size-4" />
101
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
102
+ <path d="m6 9 6 6 6-6" />
103
+ </svg>
99
104
  </SelectPrimitive.ScrollDownButton>
100
105
 
101
- {arrow && <SelectPrimitive.Arrow className="fill-float" width={12} height={6} />}
106
+ {arrow && (
107
+ <SelectPrimitive.Arrow asChild width={12} height={6}>
108
+ <svg viewBox="0 0 12 6" preserveAspectRatio="none" className="fill-bg-panel -translate-y-px">
109
+ <path d="M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0" className="stroke-line stroke-1" />
110
+ </svg>
111
+ </SelectPrimitive.Arrow>
112
+ )}
102
113
  </SelectPrimitive.Content>
103
114
  </SelectPrimitive.Portal>
104
115
  </SelectPrimitive.Root>
105
116
  )
106
117
  }
107
118
 
119
+ const selectGroup = tv({ base: 'flex flex-col gap-px' })
120
+
108
121
  export function SelectGroup({ label, className, children }: {
109
122
  label?: string
110
123
  className?: string
111
124
  children?: ReactNode
112
125
  }) {
113
126
  return (
114
- <SelectPrimitive.Group className={tv({ base: 'flex flex-col gap-px' })({ className })}>
127
+ <SelectPrimitive.Group className={selectGroup({ className })}>
115
128
  {label && (
116
129
  <SelectPrimitive.Label className="text-caption text-fg-subtle px-2 pb-1 pt-2">
117
130
  {label}
@@ -122,6 +135,13 @@ export function SelectGroup({ label, className, children }: {
122
135
  )
123
136
  }
124
137
 
138
+ const selectItem = tv({
139
+ base: 'flex min-h-9 cursor-default items-center justify-between gap-stack'
140
+ + ' rounded-r8 px-2 py-1 transition-state'
141
+ + ' data-highlighted:bg-bg-neutral-hover data-highlighted:outline-none'
142
+ + ' data-disabled:text-fg-disabled data-disabled:pointer-events-none',
143
+ })
144
+
125
145
  export function SelectItem({ value, disabled, className, children }: {
126
146
  value: string
127
147
  disabled?: boolean
@@ -132,38 +152,43 @@ export function SelectItem({ value, disabled, className, children }: {
132
152
  <SelectPrimitive.Item
133
153
  value={value}
134
154
  disabled={disabled}
135
- className={tv({ base: 'flex min-h-9 cursor-default items-center justify-between gap-stack'
136
- + ' rounded-r8 px-2 py-1 transition-state'
137
- + ' data-highlighted:bg-hover data-highlighted:outline-none'
138
- + ' data-disabled:text-fg-disabled data-disabled:pointer-events-none' })({ className })}
155
+ className={selectItem({ className })}
139
156
  >
140
157
  <span className="flex min-w-0 flex-col">
141
158
  {children}
142
159
  </span>
143
160
 
144
161
  <SelectPrimitive.ItemIndicator className="text-fg-muted flex shrink-0">
145
- <Check className="size-4" />
162
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
163
+ <path d="M20 6 9 17l-5-5" />
164
+ </svg>
146
165
  </SelectPrimitive.ItemIndicator>
147
166
  </SelectPrimitive.Item>
148
167
  )
149
168
  }
150
169
 
170
+ const selectItemText = tv({ base: 'text-label text-fg' })
171
+
151
172
  export function SelectItemText({ className, children }: { className?: string, children?: ReactNode }) {
152
173
  return (
153
- <SelectPrimitive.ItemText className={tv({ base: 'text-label text-fg' })({ className })}>
174
+ <SelectPrimitive.ItemText className={selectItemText({ className })}>
154
175
  {children}
155
176
  </SelectPrimitive.ItemText>
156
177
  )
157
178
  }
158
179
 
180
+ const selectItemDescription = tv({ base: 'text-caption text-fg-subtle' })
181
+
159
182
  export function SelectItemDescription({ className, children }: { className?: string, children?: ReactNode }) {
160
183
  return (
161
- <span className={tv({ base: 'text-caption text-fg-subtle' })({ className })}>
184
+ <span className={selectItemDescription({ className })}>
162
185
  {children}
163
186
  </span>
164
187
  )
165
188
  }
166
189
 
190
+ const selectSeparator = tv({ base: 'bg-line -mx-1 my-1 h-px' })
191
+
167
192
  export function SelectSeparator({ className }: { className?: string }) {
168
- return <SelectPrimitive.Separator className={tv({ base: 'bg-line -mx-1 my-1 h-px' })({ className })} />
193
+ return <SelectPrimitive.Separator className={selectSeparator({ className })} />
169
194
  }
package/switch/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add switch
5
5
  층 ui
6
- 파일 switch/index.tsx · switch/AGENTS.md
6
+ 파일 switch/index.tsx, switch/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -20,13 +20,13 @@
20
20
 
21
21
  | 이름 | 타입 | 필수 |
22
22
  |---|---|---|
23
- | `color` | `'control' \| 'info' \| 'success' \| 'warning' \| 'danger'` | |
23
+ | `color` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger'` | |
24
24
 
25
- ## 변형 — `uiSwitch`
25
+ ## 변형 - `uiSwitch`
26
26
 
27
27
  | 축 | 값 | 기본 |
28
28
  |---|---|---|
29
- | `color` | `control` · `info` · `success` · `warning` · `danger` | `control` |
29
+ | `color` | `neutral`, `info`, `success`, `warning`, `danger` | `neutral` |
30
30
 
31
31
  ## 함께 받는 것
32
32
 
package/switch/index.tsx CHANGED
@@ -7,34 +7,34 @@ import { tv } from '../tv'
7
7
 
8
8
  export const uiSwitch = tv({
9
9
  base: 'h-6 w-10 shrink-0 rounded-full p-0.5 transition-state press press-shrink'
10
- + ' bg-well ring-1 ring-inset ring-line-strong'
11
- + ' invalid:ring-2 invalid:ring-danger'
12
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
13
- + ' disabled:bg-disabled disabled:cursor-not-allowed'
14
- + ' checked:disabled:bg-control-on-disabled checked:disabled:ring-control-on-disabled',
10
+ + ' bg-bg-well ring-1 ring-inset ring-line-strong'
11
+ + ' invalid:ring-2 invalid:ring-line-danger'
12
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
13
+ + ' disabled:bg-bg-neutral-disabled disabled:cursor-not-allowed'
14
+ + ' checked:disabled:bg-bg-neutral-solid-checked-disabled checked:disabled:ring-transparent',
15
15
 
16
16
  variants: {
17
17
  color: {
18
- control: 'checked:bg-control-on checked:ring-control-on',
19
- info: 'checked:bg-info checked:ring-info',
20
- success: 'checked:bg-success checked:ring-success',
21
- warning: 'checked:bg-warning checked:ring-warning',
22
- danger: 'checked:bg-danger checked:ring-danger',
18
+ neutral: 'checked:bg-bg-neutral-solid checked:ring-line-neutral-solid',
19
+ info: 'checked:bg-bg-info-solid checked:ring-line-info',
20
+ success: 'checked:bg-bg-success-solid checked:ring-line-success',
21
+ warning: 'checked:bg-bg-warning-solid checked:ring-line-warning',
22
+ danger: 'checked:bg-bg-danger-solid checked:ring-line-danger',
23
23
  },
24
24
  },
25
25
 
26
- defaultVariants: { color: 'control' },
26
+ defaultVariants: { color: 'neutral' },
27
27
  })
28
28
 
29
29
  export interface SwitchProps extends ComponentProps<typeof SwitchPrimitive.Root> {
30
- color?: 'control' | 'info' | 'success' | 'warning' | 'danger'
30
+ color?: 'neutral' | 'info' | 'success' | 'warning' | 'danger'
31
31
  }
32
32
 
33
33
  export function Switch({ color, className, ...rest }: SwitchProps) {
34
34
  return (
35
35
  <SwitchPrimitive.Root {...rest} className={uiSwitch({ color, className })}>
36
36
  <SwitchPrimitive.Thumb
37
- className="bg-float block size-5 rounded-full checked:translate-x-4
37
+ className="bg-bg-neutral-knob block size-5 rounded-full checked:translate-x-4
38
38
  transition-transform ease-state motion-reduce:transition-none"
39
39
  />
40
40
  </SwitchPrimitive.Root>
package/table/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add table
5
5
  층 ui
6
- 파일 table/index.tsx · table/AGENTS.md
6
+ 파일 table/index.tsx, table/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -11,10 +11,10 @@
11
11
  | 이름 | props |
12
12
  |---|---|
13
13
  | `Table` | `TableProps` |
14
- | `TableHeader` | — |
15
- | `TableHeadCell` | — |
16
- | `TableBody` | — |
17
- | `TableRow` | — |
14
+ | `TableHeader` | - |
15
+ | `TableHeadCell` | - |
16
+ | `TableBody` | - |
17
+ | `TableRow` | - |
18
18
  | `TableCell` | `TableCellProps` |
19
19
 
20
20
  ### `TableHeader`
@@ -65,17 +65,17 @@
65
65
  | `mono` | `boolean` | |
66
66
  | `clamp` | `boolean` | |
67
67
 
68
- ## 변형 — `table`
68
+ ## 변형 - `table`
69
69
 
70
70
  | 축 | 값 | 기본 |
71
71
  |---|---|---|
72
- | `fixed` | `true` | — |
72
+ | `fixed` | `true` | - |
73
73
 
74
- ## 변형 — `tableCell`
74
+ ## 변형 - `tableCell`
75
75
 
76
76
  | 축 | 값 | 기본 |
77
77
  |---|---|---|
78
- | `mono` | `true` · `false` | `false` |
78
+ | `mono` | `true`, `false` | `false` |
79
79
 
80
80
  ## 함께 받는 것
81
81