@pantoia/ui 0.1.0 → 0.2.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 (63) hide show
  1. package/accordion/AGENTS.md +5 -5
  2. package/accordion/index.tsx +17 -9
  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 +7 -7
  7. package/button/AGENTS.md +7 -7
  8. package/button/index.tsx +36 -36
  9. package/callout/AGENTS.md +4 -5
  10. package/callout/index.tsx +13 -14
  11. package/checkbox/AGENTS.md +5 -5
  12. package/checkbox/index.tsx +15 -13
  13. package/combobox/AGENTS.md +13 -13
  14. package/combobox/index.tsx +82 -38
  15. package/command-palette/AGENTS.md +3 -2
  16. package/command-palette/index.tsx +4 -2
  17. package/dialog/AGENTS.md +6 -6
  18. package/dialog/index.tsx +11 -5
  19. package/dist/index.js +63 -34
  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 +23 -11
  24. package/field/AGENTS.md +8 -8
  25. package/field/index.tsx +27 -9
  26. package/input/AGENTS.md +4 -4
  27. package/input/index.tsx +8 -8
  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 -6
  33. package/number-field/index.tsx +22 -16
  34. package/package.json +3 -6
  35. package/popover/AGENTS.md +4 -4
  36. package/popover/index.tsx +14 -4
  37. package/press.css +7 -7
  38. package/radio-group/AGENTS.md +8 -8
  39. package/radio-group/index.tsx +20 -16
  40. package/registry.json +3 -51
  41. package/select/AGENTS.md +10 -10
  42. package/select/index.tsx +41 -23
  43. package/styles.css +291 -139
  44. package/switch/AGENTS.md +4 -4
  45. package/switch/index.tsx +13 -13
  46. package/table/AGENTS.md +9 -9
  47. package/table/index.tsx +17 -7
  48. package/tabs/AGENTS.md +4 -4
  49. package/tabs/index.module.css +1 -1
  50. package/tabs/index.tsx +17 -9
  51. package/textarea/AGENTS.md +4 -4
  52. package/textarea/index.tsx +8 -8
  53. package/toast/AGENTS.md +5 -13
  54. package/toast/index.tsx +31 -37
  55. package/toggle/AGENTS.md +4 -4
  56. package/toggle/index.tsx +10 -9
  57. package/tooltip/AGENTS.md +2 -2
  58. package/tooltip/index.tsx +14 -4
  59. package/code-block/AGENTS.md +0 -60
  60. package/code-block/index.module.css +0 -46
  61. package/code-block/index.tsx +0 -127
  62. package/copy-button/AGENTS.md +0 -43
  63. package/copy-button/index.tsx +0 -119
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add accordion
5
5
  층 ui
6
- 파일 accordion/index.tsx · accordion/index.module.css · accordion/AGENTS.md
6
+ 파일 accordion/index.tsx, accordion/index.module.css, accordion/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -11,9 +11,9 @@
11
11
  | 이름 | props |
12
12
  |---|---|
13
13
  | `Accordion` | `AccordionProps` |
14
- | `AccordionItem` | — |
15
- | `AccordionTrigger` | — |
16
- | `AccordionContent` | — |
14
+ | `AccordionItem` | - |
15
+ | `AccordionTrigger` | - |
16
+ | `AccordionContent` | - |
17
17
 
18
18
  ### `AccordionItem`
19
19
 
@@ -57,4 +57,4 @@
57
57
 
58
58
  ## npm 의존
59
59
 
60
- `lucide-react` · `radix-ui`
60
+ `lucide-react`, `radix-ui`
@@ -17,9 +17,11 @@ export interface AccordionProps {
17
17
  children?: ReactNode
18
18
  }
19
19
 
20
+ const accordion = tv({ base: 'frame rounded-panel overflow-hidden divide-y divide-line' })
21
+
20
22
  export function Accordion({ value, defaultValue, onValueChange, multiple, className, children }: AccordionProps) {
21
23
  const shared = {
22
- className: tv({ base: 'rounded-panel border border-line overflow-hidden divide-y divide-line' })({ className }),
24
+ className: accordion({ className }),
23
25
  children,
24
26
  }
25
27
 
@@ -58,21 +60,25 @@ export function AccordionItem({ value, disabled, className, children }: {
58
60
  )
59
61
  }
60
62
 
63
+ const accordionTrigger = tv({
64
+ base: 'text-label text-foreground flex h-11 w-full items-center'
65
+ + ' gap-stack border-b border-transparent px-4 transition-state'
66
+ + ' press open:border-line enabled:hover:bg-bg-neutral-hover'
67
+ + ' disabled:text-foreground-disabled disabled:cursor-not-allowed'
68
+ + ' focus-visible:outline-2 focus-visible:-outline-offset-2'
69
+ + ' focus-visible:outline-line-focus-ring',
70
+ })
71
+
61
72
  export function AccordionTrigger({ className, children }: { className?: string, children?: ReactNode }) {
62
73
  return (
63
74
  <AccordionPrimitive.Header>
64
75
  <AccordionPrimitive.Trigger
65
- className={tv({ base: 'text-label text-fg flex h-11 w-full items-center'
66
- + ' gap-stack border-b border-transparent px-4 transition-state'
67
- + ' press open:border-line enabled:hover:bg-hover'
68
- + ' disabled:text-fg-disabled disabled:cursor-not-allowed'
69
- + ' focus-visible:outline-2 focus-visible:-outline-offset-2'
70
- + ' focus-visible:outline-ring' })({ className })}
76
+ className={accordionTrigger({ className })}
71
77
  >
72
78
  <span className="flex min-w-0 grow items-center gap-tight">{children}</span>
73
79
 
74
80
  <ChevronDown
75
- className="text-fg-subtle size-4 shrink-0 transition-transform open:rotate-180
81
+ className="text-foreground-subtle size-4 shrink-0 transition-transform open:rotate-180
76
82
  motion-reduce:transition-none"
77
83
  />
78
84
  </AccordionPrimitive.Trigger>
@@ -80,10 +86,12 @@ export function AccordionTrigger({ className, children }: { className?: string,
80
86
  )
81
87
  }
82
88
 
89
+ const accordionContent = tv({ base: 'bg-background-well text-caption text-foreground-muted px-4 py-3' })
90
+
83
91
  export function AccordionContent({ className, children }: { className?: string, children?: ReactNode }) {
84
92
  return (
85
93
  <AccordionPrimitive.Content className={s.panel}>
86
- <div className={tv({ base: 'bg-well text-caption text-fg-muted px-4 py-3' })({ className })}>
94
+ <div className={accordionContent({ className })}>
87
95
  {children}
88
96
  </div>
89
97
  </AccordionPrimitive.Content>
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add alert-dialog
5
5
  층 ui
6
- 파일 alert-dialog/index.tsx · alert-dialog/AGENTS.md
6
+ 파일 alert-dialog/index.tsx, alert-dialog/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -11,14 +11,14 @@
11
11
  | 이름 | props |
12
12
  |---|---|
13
13
  | `AlertDialog` | `AlertDialogProps` |
14
- | `AlertDialogTrigger` | — |
14
+ | `AlertDialogTrigger` | - |
15
15
  | `AlertDialogContent` | `ComponentProps<typeof AlertDialogPrimitive.Content>` |
16
16
  | `AlertDialogTitle` | `ComponentProps<typeof AlertDialogPrimitive.Title>` |
17
17
  | `AlertDialogDescription` | `ComponentProps<typeof AlertDialogPrimitive.Description>` |
18
18
  | `AlertDialogHeader` | `AlertDialogHeaderProps` |
19
- | `AlertDialogFooter` | — |
20
- | `AlertDialogAction` | — |
21
- | `AlertDialogCancel` | — |
19
+ | `AlertDialogFooter` | - |
20
+ | `AlertDialogAction` | - |
21
+ | `AlertDialogCancel` | - |
22
22
 
23
23
  ### `AlertDialogTrigger`
24
24
 
@@ -37,7 +37,7 @@
37
37
 
38
38
  | 이름 | 타입 | 필수 |
39
39
  |---|---|---|
40
- | `color` | `'neutral' \| 'primary' \| 'danger'` | |
40
+ | `color` | `'neutral' \| 'brand' \| 'danger'` | |
41
41
  | `onClick` | `() => void` | |
42
42
  | `className` | `string` | |
43
43
  | `children` | `ReactNode` | |
@@ -71,7 +71,7 @@
71
71
 
72
72
  ## 함께 받는 것
73
73
 
74
- `button` · `tv`
74
+ `button`, `tv`
75
75
 
76
76
  ## npm 의존
77
77
 
@@ -25,18 +25,22 @@ export function AlertDialogTrigger({ children }: { children: ReactNode }) {
25
25
  return <AlertDialogPrimitive.Trigger asChild>{children}</AlertDialogPrimitive.Trigger>
26
26
  }
27
27
 
28
+ const alertDialogContent = tv({
29
+ base: 'sheet text-foreground z-overlay fixed left-1/2 top-1/2'
30
+ + ' w-full max-w-112 -translate-x-1/2 -translate-y-1/2'
31
+ + ' rounded-r20 p-6 flex flex-col gap-stack overflow-y-auto'
32
+ + ' open:animate-fade-in closed:animate-fade-out'
33
+ + ' focus-visible:outline-none',
34
+ })
35
+
28
36
  export function AlertDialogContent({ className, children, ...rest }: ComponentProps<typeof AlertDialogPrimitive.Content>) {
29
37
  return (
30
38
  <AlertDialogPrimitive.Portal>
31
- <AlertDialogPrimitive.Overlay className="bg-overlay z-overlay fixed inset-0 open:animate-fade-in closed:animate-fade-out" />
39
+ <AlertDialogPrimitive.Overlay className="bg-background-overlay z-overlay fixed inset-0 open:animate-fade-in closed:animate-fade-out" />
32
40
 
33
41
  <AlertDialogPrimitive.Content
34
42
  {...rest}
35
- className={tv({ base: 'bg-float text-fg z-overlay fixed left-1/2 top-1/2'
36
- + ' w-full max-w-112 -translate-x-1/2 -translate-y-1/2'
37
- + ' rounded-r20 p-6 flex flex-col gap-stack overflow-y-auto'
38
- + ' open:animate-fade-in closed:animate-fade-out'
39
- + ' focus-visible:outline-none' })({ className })}
43
+ className={alertDialogContent({ className })}
40
44
  >
41
45
  {children}
42
46
  </AlertDialogPrimitive.Content>
@@ -44,15 +48,19 @@ export function AlertDialogContent({ className, children, ...rest }: ComponentPr
44
48
  )
45
49
  }
46
50
 
51
+ const alertDialogTitle = tv({ base: 'text-section' })
52
+
47
53
  export function AlertDialogTitle({ className, ...rest }: ComponentProps<typeof AlertDialogPrimitive.Title>) {
48
- return <AlertDialogPrimitive.Title {...rest} className={tv({ base: 'text-section' })({ className })} />
54
+ return <AlertDialogPrimitive.Title {...rest} className={alertDialogTitle({ className })} />
49
55
  }
50
56
 
57
+ const alertDialogDescription = tv({ base: 'text-prose text-foreground-muted' })
58
+
51
59
  export function AlertDialogDescription({ className, ...rest }: ComponentProps<typeof AlertDialogPrimitive.Description>) {
52
60
  return (
53
61
  <AlertDialogPrimitive.Description
54
62
  {...rest}
55
- className={tv({ base: 'text-prose text-fg-muted' })({ className })}
63
+ className={alertDialogDescription({ className })}
56
64
  />
57
65
  )
58
66
  }
@@ -85,16 +93,18 @@ export function AlertDialogHeader({ lead, trail, className, children }: AlertDia
85
93
  )
86
94
  }
87
95
 
96
+ const alertDialogFooter = tv({ base: 'flex justify-end gap-2' })
97
+
88
98
  export function AlertDialogFooter({ className, children }: { className?: string, children?: ReactNode }) {
89
99
  return (
90
- <div className={tv({ base: 'flex justify-end gap-2' })({ className })}>
100
+ <div className={alertDialogFooter({ className })}>
91
101
  {children}
92
102
  </div>
93
103
  )
94
104
  }
95
105
 
96
106
  export function AlertDialogAction({ color = 'neutral', onClick, className, children }: {
97
- color?: 'neutral' | 'primary' | 'danger'
107
+ color?: 'neutral' | 'brand' | 'danger'
98
108
  onClick?: () => void
99
109
  className?: string
100
110
  children?: ReactNode
package/badge/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add badge
5
5
  층 ui
6
- 파일 badge/index.tsx · badge/AGENTS.md
6
+ 파일 badge/index.tsx, badge/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -20,15 +20,15 @@
20
20
 
21
21
  | 이름 | 타입 | 필수 |
22
22
  |---|---|---|
23
- | `color` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | |
23
+ | `color` | `'neutral' \| 'brand' \| 'info' \| 'success' \| 'warning' \| 'danger'` | |
24
24
  | `shape` | `'square' \| 'pill'` | |
25
25
 
26
- ## 변형 — `badge`
26
+ ## 변형 - `badge`
27
27
 
28
28
  | 축 | 값 | 기본 |
29
29
  |---|---|---|
30
- | `color` | `neutral` · `primary` · `info` · `success` · `warning` · `danger` | `neutral` |
31
- | `shape` | `square` · `pill` | `square` |
30
+ | `color` | `neutral`, `brand`, `info`, `success`, `warning`, `danger` | `neutral` |
31
+ | `shape` | `square`, `pill` | `square` |
32
32
 
33
33
  ## 함께 받는 것
34
34
 
package/badge/index.tsx CHANGED
@@ -8,12 +8,12 @@ export const badge = tv({
8
8
 
9
9
  variants: {
10
10
  color: {
11
- neutral: 'bg-well text-fg-muted',
12
- primary: 'bg-primary-weak text-primary-on-weak',
13
- info: 'bg-info-weak text-info-on-weak',
14
- success: 'bg-success-weak text-success-on-weak',
15
- warning: 'bg-warning-weak text-warning-on-weak',
16
- danger: 'bg-danger-weak text-danger-on-weak',
11
+ neutral: 'bg-background-well text-foreground-muted',
12
+ brand: 'bg-bg-brand-weak text-fg-brand-contrast',
13
+ info: 'bg-bg-info-weak text-fg-info-contrast',
14
+ success: 'bg-bg-success-weak text-fg-success-contrast',
15
+ warning: 'bg-bg-warning-weak text-fg-warning-contrast',
16
+ danger: 'bg-bg-danger-weak text-fg-danger-contrast',
17
17
  },
18
18
  shape: {
19
19
  square: 'rounded-mark',
@@ -25,7 +25,7 @@ export const badge = tv({
25
25
  })
26
26
 
27
27
  export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
28
- color?: 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger'
28
+ color?: 'neutral' | 'brand' | 'info' | 'success' | 'warning' | 'danger'
29
29
  shape?: 'square' | 'pill'
30
30
  }
31
31
 
package/button/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add button
5
5
  층 ui
6
- 파일 button/index.tsx · button/AGENTS.md
6
+ 파일 button/index.tsx, button/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -20,19 +20,19 @@
20
20
 
21
21
  | 이름 | 타입 | 필수 |
22
22
  |---|---|---|
23
- | `color` | `'primary' \| 'neutral' \| 'danger'` | 예 |
23
+ | `color` | `'brand' \| 'neutral' \| 'danger'` | 예 |
24
24
  | `emphasis` | `'solid' \| 'weak' \| 'outline' \| 'ghost'` | 예 |
25
25
  | `size` | `'sm' \| 'md' \| 'lg'` | |
26
26
  | `shape` | `'rect' \| 'square' \| 'pill' \| 'circle'` | |
27
27
 
28
- ## 변형 — `button`
28
+ ## 변형 - `button`
29
29
 
30
30
  | 축 | 값 | 기본 |
31
31
  |---|---|---|
32
- | `color` | `primary` · `neutral` · `danger` | — |
33
- | `emphasis` | `solid` · `weak` · `outline` · `ghost` | — |
34
- | `size` | `sm` · `md` · `lg` | `md` |
35
- | `shape` | `rect` · `square` · `pill` · `circle` | `rect` |
32
+ | `color` | `brand`, `neutral`, `danger` | - |
33
+ | `emphasis` | `solid`, `weak`, `outline`, `ghost` | - |
34
+ | `size` | `sm`, `md`, `lg` | `md` |
35
+ | `shape` | `rect`, `square`, `pill`, `circle` | `rect` |
36
36
 
37
37
  ## 함께 받는 것
38
38
 
package/button/index.tsx CHANGED
@@ -6,11 +6,11 @@ export const button = tv({
6
6
  base: 'inline-flex shrink-0 items-center justify-center gap-tight whitespace-nowrap'
7
7
  + ' rounded-r8 text-label'
8
8
  + ' transition-state press press-shrink'
9
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
10
- + ' disabled:text-fg-disabled disabled:cursor-not-allowed',
9
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
10
+ + ' disabled:text-foreground-disabled disabled:cursor-not-allowed',
11
11
 
12
12
  variants: {
13
- color: { primary: '', neutral: '', danger: '' },
13
+ color: { brand: '', neutral: '', danger: '' },
14
14
  emphasis: { solid: '', weak: '', outline: '', ghost: '' },
15
15
  size: {
16
16
  sm: 'h-8 [&_svg]:size-4',
@@ -26,48 +26,48 @@ export const button = tv({
26
26
  },
27
27
 
28
28
  compoundVariants: [
29
- { color: 'primary', emphasis: 'solid',
30
- class: 'bg-primary-solid text-fg-on-solid'
31
- + ' enabled:hover:bg-primary-solid-hover'
32
- + ' disabled:bg-primary-solid/20' },
33
- { color: 'primary', emphasis: 'weak',
34
- class: 'bg-primary-weak text-primary-on-weak disabled:text-primary-on-weak/40'
35
- + ' enabled:hover:bg-primary-solid/10' },
36
- { color: 'primary', emphasis: 'outline',
37
- class: 'text-primary-on-weak disabled:text-primary-on-weak/40'
38
- + ' ring-1 ring-inset ring-primary-stroke disabled:ring-line'
39
- + ' enabled:hover:bg-primary-solid/10' },
40
- { color: 'primary', emphasis: 'ghost',
41
- class: 'text-primary-on-weak disabled:text-primary-on-weak/40'
42
- + ' enabled:hover:bg-primary-solid/10' },
29
+ { color: 'brand', emphasis: 'solid',
30
+ class: 'bg-bg-brand-solid text-fg-brand-solid-contrast'
31
+ + ' enabled:hover:bg-bg-brand-solid-hover'
32
+ + ' disabled:bg-bg-brand-solid/20' },
33
+ { color: 'brand', emphasis: 'weak',
34
+ class: 'bg-bg-brand-weak text-fg-brand-contrast disabled:text-fg-brand-contrast/40'
35
+ + ' enabled:hover:bg-bg-brand-solid/10' },
36
+ { color: 'brand', emphasis: 'outline',
37
+ class: 'text-fg-brand-contrast disabled:text-fg-brand-contrast/40'
38
+ + ' ring-1 ring-inset ring-line-brand-weak disabled:ring-line'
39
+ + ' enabled:hover:bg-bg-brand-solid/10' },
40
+ { color: 'brand', emphasis: 'ghost',
41
+ class: 'text-fg-brand-contrast disabled:text-fg-brand-contrast/40'
42
+ + ' enabled:hover:bg-bg-brand-solid/10' },
43
43
 
44
44
  { color: 'neutral', emphasis: 'solid',
45
- class: 'bg-neutral-solid text-fg-on-control'
46
- + ' enabled:hover:bg-neutral-solid-hover'
47
- + ' disabled:bg-neutral-solid/20' },
45
+ class: 'bg-bg-neutral-solid text-fg-neutral-solid-contrast'
46
+ + ' enabled:hover:bg-bg-neutral-solid-hover'
47
+ + ' disabled:bg-bg-neutral-solid/20' },
48
48
  { color: 'neutral', emphasis: 'weak',
49
- class: 'bg-well text-fg'
50
- + ' enabled:hover:bg-fg-muted/10' },
49
+ class: 'bg-background-well text-foreground'
50
+ + ' enabled:hover:bg-bg-neutral-solid/10' },
51
51
  { color: 'neutral', emphasis: 'outline',
52
- class: 'text-fg ring-1 ring-inset ring-line-strong disabled:ring-line'
53
- + ' enabled:hover:bg-hover' },
52
+ class: 'text-foreground ring-1 ring-inset ring-line-strong disabled:ring-line'
53
+ + ' enabled:hover:bg-bg-neutral-hover' },
54
54
  { color: 'neutral', emphasis: 'ghost',
55
- class: 'text-fg enabled:hover:bg-hover' },
55
+ class: 'text-foreground enabled:hover:bg-bg-neutral-hover' },
56
56
 
57
57
  { color: 'danger', emphasis: 'solid',
58
- class: 'bg-danger-solid text-fg-on-solid'
59
- + ' enabled:hover:bg-danger-solid-hover'
60
- + ' disabled:bg-danger-solid/20' },
58
+ class: 'bg-bg-danger-solid text-white'
59
+ + ' enabled:hover:bg-bg-danger-solid-hover'
60
+ + ' disabled:bg-bg-danger-solid/20' },
61
61
  { color: 'danger', emphasis: 'weak',
62
- class: 'bg-danger-weak text-danger-on-weak disabled:text-danger-on-weak/40'
63
- + ' enabled:hover:bg-danger/10' },
62
+ class: 'bg-bg-danger-weak text-fg-danger-contrast disabled:text-fg-danger-contrast/40'
63
+ + ' enabled:hover:bg-bg-danger-solid/10' },
64
64
  { color: 'danger', emphasis: 'outline',
65
- class: 'text-danger-on-weak disabled:text-danger-on-weak/40'
66
- + ' ring-1 ring-inset ring-danger-stroke disabled:ring-line'
67
- + ' enabled:hover:bg-danger/10' },
65
+ class: 'text-fg-danger-contrast disabled:text-fg-danger-contrast/40'
66
+ + ' ring-1 ring-inset ring-line-danger-weak disabled:ring-line'
67
+ + ' enabled:hover:bg-bg-danger-solid/10' },
68
68
  { color: 'danger', emphasis: 'ghost',
69
- class: 'text-danger-on-weak disabled:text-danger-on-weak/40'
70
- + ' enabled:hover:bg-danger/10' },
69
+ class: 'text-fg-danger-contrast disabled:text-fg-danger-contrast/40'
70
+ + ' enabled:hover:bg-bg-danger-solid/10' },
71
71
 
72
72
  { shape: ['rect', 'pill'], size: 'sm', class: 'px-3' },
73
73
  { shape: ['rect', 'pill'], size: 'md', class: 'px-3.5' },
@@ -81,7 +81,7 @@ export const button = tv({
81
81
  })
82
82
 
83
83
  export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {
84
- color: 'primary' | 'neutral' | 'danger'
84
+ color: 'brand' | 'neutral' | 'danger'
85
85
  emphasis: 'solid' | 'weak' | 'outline' | 'ghost'
86
86
  size?: 'sm' | 'md' | 'lg'
87
87
  shape?: 'rect' | 'square' | 'pill' | 'circle'
package/callout/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add callout
5
5
  층 ui
6
- 파일 callout/index.tsx · callout/AGENTS.md
6
+ 파일 callout/index.tsx, callout/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -19,19 +19,18 @@
19
19
  | 이름 | 타입 | 필수 |
20
20
  |---|---|---|
21
21
  | `color` | `'info' \| 'success' \| 'warning' \| 'danger'` | |
22
- | `live` | `boolean` | |
23
22
  | `icon` | `ReactNode` | |
24
23
  | `title` | `ReactNode` | |
25
24
  | `className` | `string` | |
26
25
  | `children` | `ReactNode` | |
27
26
 
28
- ## 변형 — `callout`
27
+ ## 변형 - `callout`
29
28
 
30
- 슬롯 `root` · `icon` · `title` · `body` · `text`
29
+ 슬롯 `root`, `icon`, `title`, `body`, `text`
31
30
 
32
31
  | 축 | 값 | 기본 |
33
32
  |---|---|---|
34
- | `color` | `info` · `success` · `warning` · `danger` | `info` |
33
+ | `color` | `info`, `success`, `warning`, `danger` | `info` |
35
34
 
36
35
  ## 함께 받는 것
37
36
 
package/callout/index.tsx CHANGED
@@ -8,27 +8,27 @@ export const callout = tv({
8
8
  root: 'flex gap-stack rounded-panel border p-4 text-prose',
9
9
  icon: 'flex shrink-0 mt-0.5 [&_svg]:size-5',
10
10
  title: 'font-bold',
11
- body: 'flex min-w-0 flex-col gap-tight',
12
- text: 'flex flex-col gap-2',
11
+ body: 'flex min-w-0 flex-1 flex-col gap-tight',
12
+ text: 'flex flex-col items-start gap-2',
13
13
  },
14
14
 
15
15
  variants: {
16
16
  color: {
17
17
  info: {
18
- root: 'bg-info-weak text-info-on-weak border-info-stroke',
19
- icon: 'text-info',
18
+ root: 'bg-bg-info-weak text-fg-info-contrast border-line-info-weak',
19
+ icon: 'text-fg-info',
20
20
  },
21
21
  success: {
22
- root: 'bg-success-weak text-success-on-weak border-success-stroke',
23
- icon: 'text-success',
22
+ root: 'bg-bg-success-weak text-fg-success-contrast border-line-success-weak',
23
+ icon: 'text-fg-success',
24
24
  },
25
25
  warning: {
26
- root: 'bg-warning-weak text-warning-on-weak border-warning-stroke',
27
- icon: 'text-warning',
26
+ root: 'bg-bg-warning-weak text-fg-warning-contrast border-line-warning-weak',
27
+ icon: 'text-fg-warning',
28
28
  },
29
29
  danger: {
30
- root: 'bg-danger-weak text-danger-on-weak border-danger-stroke',
31
- icon: 'text-danger',
30
+ root: 'bg-bg-danger-weak text-fg-danger-contrast border-line-danger-weak',
31
+ icon: 'text-fg-danger',
32
32
  },
33
33
  },
34
34
  },
@@ -45,25 +45,24 @@ const ICONS = {
45
45
 
46
46
  export interface CalloutProps {
47
47
  color?: 'info' | 'success' | 'warning' | 'danger'
48
- live?: boolean
49
48
  icon?: ReactNode
50
49
  title?: ReactNode
51
50
  className?: string
52
51
  children?: ReactNode
53
52
  }
54
53
 
55
- export function Callout({ color, live, icon, title, className, children }: CalloutProps) {
54
+ export function Callout({ color, icon, title, className, children }: CalloutProps) {
56
55
  const ui = callout({ color })
57
56
  const Fallback = ICONS[color ?? 'info']
58
57
 
59
58
  return (
60
- <div className={ui.root({ className })} role={live ? 'alert' : 'note'}>
59
+ <div className={ui.root({ className })} role="alert">
61
60
  <span className={ui.icon()}>
62
61
  {icon ?? <Fallback />}
63
62
  </span>
64
63
  <div className={ui.body()}>
65
64
  {title && <span className={ui.title()}>{title}</span>}
66
- <div className={ui.text()}>{children}</div>
65
+ {children && <div className={ui.text()}>{children}</div>}
67
66
  </div>
68
67
  </div>
69
68
  )
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add checkbox
5
5
  층 ui
6
- 파일 checkbox/index.tsx · checkbox/AGENTS.md
6
+ 파일 checkbox/index.tsx, checkbox/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -37,13 +37,13 @@
37
37
  | `onCheckedChange` | `(checked: boolean) => void` | |
38
38
  | `indeterminate` | `boolean` | |
39
39
  | `onIndeterminateChange` | `(indeterminate: boolean) => void` | |
40
- | `color` | `'control' \| 'info' \| 'success' \| 'warning' \| 'danger'` | |
40
+ | `color` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger'` | |
41
41
 
42
- ## 변형 — `checkbox`
42
+ ## 변형 - `checkbox`
43
43
 
44
44
  | 축 | 값 | 기본 |
45
45
  |---|---|---|
46
- | `color` | `control` · `info` · `success` · `warning` · `danger` | `control` |
46
+ | `color` | `neutral`, `info`, `success`, `warning`, `danger` | `neutral` |
47
47
 
48
48
  ## 함께 받는 것
49
49
 
@@ -51,4 +51,4 @@
51
51
 
52
52
  ## npm 의존
53
53
 
54
- `lucide-react` · `radix-ui`
54
+ `lucide-react`, `radix-ui`
@@ -19,22 +19,22 @@ export const checkbox = tv({
19
19
  + ' bg-transparent ring-1 ring-inset ring-line-strong'
20
20
  + ' transition-state press press-shrink'
21
21
  + ' checked:ring-2'
22
- + ' invalid:ring-2 invalid:ring-danger'
23
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
24
- + ' disabled:ring-line disabled:bg-disabled disabled:cursor-not-allowed'
25
- + ' checked:disabled:bg-control-on-disabled checked:disabled:ring-control-on-disabled',
22
+ + ' invalid:ring-2 invalid:ring-line-danger'
23
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
24
+ + ' disabled:ring-line disabled:bg-bg-neutral-disabled disabled:cursor-not-allowed'
25
+ + ' checked:disabled:bg-bg-neutral-solid-checked-disabled checked:disabled:ring-transparent',
26
26
 
27
27
  variants: {
28
28
  color: {
29
- control: 'checked:bg-control-on checked:ring-control-on',
30
- info: 'checked:bg-info checked:ring-info',
31
- success: 'checked:bg-success checked:ring-success',
32
- warning: 'checked:bg-warning checked:ring-warning',
33
- danger: 'checked:bg-danger checked:ring-danger',
29
+ neutral: 'checked:bg-bg-neutral-solid checked:ring-line-neutral-solid',
30
+ info: 'checked:bg-bg-info-solid checked:ring-line-info',
31
+ success: 'checked:bg-bg-success-solid checked:ring-line-success',
32
+ warning: 'checked:bg-bg-warning-solid checked:ring-line-warning',
33
+ danger: 'checked:bg-bg-danger-solid checked:ring-line-danger',
34
34
  },
35
35
  },
36
36
 
37
- defaultVariants: { color: 'control' },
37
+ defaultVariants: { color: 'neutral' },
38
38
  })
39
39
 
40
40
  interface GroupContext {
@@ -56,6 +56,8 @@ export interface CheckboxGroupProps {
56
56
  children?: ReactNode
57
57
  }
58
58
 
59
+ const checkboxGroup = tv({ base: 'flex flex-col gap-3' })
60
+
59
61
  export function CheckboxGroup({
60
62
  value,
61
63
  defaultValue,
@@ -94,7 +96,7 @@ export function CheckboxGroup({
94
96
  ref={root}
95
97
  role="group"
96
98
  onKeyDown={onKeyDown}
97
- className={tv({ base: 'flex flex-col gap-3' })({ className })}
99
+ className={checkboxGroup({ className })}
98
100
  >
99
101
  {children}
100
102
  </div>
@@ -108,7 +110,7 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimit
108
110
  onCheckedChange?: (checked: boolean) => void
109
111
  indeterminate?: boolean
110
112
  onIndeterminateChange?: (indeterminate: boolean) => void
111
- color?: 'control' | 'info' | 'success' | 'warning' | 'danger'
113
+ color?: 'neutral' | 'info' | 'success' | 'warning' | 'danger'
112
114
  }
113
115
 
114
116
  export function Checkbox({
@@ -143,7 +145,7 @@ export function Checkbox({
143
145
  onCheckedChange={change}
144
146
  className={checkbox({ color, className })}
145
147
  >
146
- <CheckboxPrimitive.Indicator className="text-fg-on-control flex">
148
+ <CheckboxPrimitive.Indicator className="text-fg-neutral-solid-contrast flex">
147
149
  {indeterminate ? <Minus className="size-4" /> : <Check className="size-4" />}
148
150
  </CheckboxPrimitive.Indicator>
149
151
  </CheckboxPrimitive.Root>