@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
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-background-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
 
package/table/index.tsx CHANGED
@@ -20,6 +20,8 @@ export interface TableProps {
20
20
  children?: ReactNode
21
21
  }
22
22
 
23
+ const tableFrame = tv({ base: 'frame rounded-panel overflow-hidden' })
24
+
23
25
  export function Table({ label, fixed = false, className, children }: TableProps) {
24
26
  const [box, setBox] = useState<HTMLDivElement | null>(null)
25
27
 
@@ -39,13 +41,13 @@ export function Table({ label, fixed = false, className, children }: TableProps)
39
41
 
40
42
  return (
41
43
  <FixedContext value={fixed}>
42
- <div className={tv({ base: 'rounded-panel border border-line overflow-hidden' })({ className })}>
44
+ <div className={tableFrame({ className })}>
43
45
  <div
44
46
  ref={setBox}
45
47
  tabIndex={overflows ? 0 : undefined}
46
48
  aria-label={overflows ? label : undefined}
47
49
  role={overflows ? 'region' : undefined}
48
- className="overflow-x-auto focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring"
50
+ className="overflow-x-auto focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-line-focus-ring"
49
51
  >
50
52
  <table className={table({ fixed })}>
51
53
  <caption className="sr-only">{label}</caption>
@@ -57,21 +59,25 @@ export function Table({ label, fixed = false, className, children }: TableProps)
57
59
  )
58
60
  }
59
61
 
62
+ const tableHeader = tv({ base: 'bg-background-well border-b border-line' })
63
+
60
64
  export function TableHeader({ className, children }: { className?: string, children?: ReactNode }) {
61
65
  return (
62
66
  <thead>
63
- <tr className={tv({ base: 'bg-well border-b border-line' })({ className })}>
67
+ <tr className={tableHeader({ className })}>
64
68
  {children}
65
69
  </tr>
66
70
  </thead>
67
71
  )
68
72
  }
69
73
 
74
+ const tableHeadCell = tv({ base: 'text-caption text-foreground-muted h-9 px-4 text-left whitespace-nowrap' })
75
+
70
76
  export function TableHeadCell({ className, children }: { className?: string, children?: ReactNode }) {
71
77
  return (
72
78
  <th
73
79
  scope="col"
74
- className={tv({ base: 'text-caption text-fg-muted h-9 px-4 text-left whitespace-nowrap' })({ className })}
80
+ className={tableHeadCell({ className })}
75
81
  >
76
82
  {children}
77
83
  </th>
@@ -82,11 +88,15 @@ export function TableBody({ className, children }: { className?: string, childre
82
88
  return <tbody className={className}>{children}</tbody>
83
89
  }
84
90
 
91
+ const tableRow = tv({
92
+ base: 'border-b border-line last:border-b-0 transition-state'
93
+ + ' hover:bg-bg-neutral-hover',
94
+ })
95
+
85
96
  export function TableRow({ className, children }: { className?: string, children?: ReactNode }) {
86
97
  return (
87
98
  <tr
88
- className={tv({ base: 'border-b border-line last:border-b-0 transition-state'
89
- + ' hover:bg-hover' })({ className })}
99
+ className={tableRow({ className })}
90
100
  >
91
101
  {children}
92
102
  </tr>
@@ -94,7 +104,7 @@ export function TableRow({ className, children }: { className?: string, children
94
104
  }
95
105
 
96
106
  export const tableCell = tv({
97
- base: 'text-label text-fg h-11 px-4',
107
+ base: 'text-label text-foreground h-11 px-4',
98
108
 
99
109
  variants: {
100
110
  mono: { true: 'font-mono', false: '' },
package/tabs/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add tabs
5
5
  층 ui
6
- 파일 tabs/index.tsx · tabs/index.module.css · tabs/AGENTS.md
6
+ 파일 tabs/index.tsx, tabs/index.module.css, tabs/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -11,9 +11,9 @@
11
11
  | 이름 | props |
12
12
  |---|---|
13
13
  | `Tabs` | `TabsProps` |
14
- | `TabsList` | — |
15
- | `TabsTrigger` | — |
16
- | `TabsContent` | — |
14
+ | `TabsList` | - |
15
+ | `TabsTrigger` | - |
16
+ | `TabsContent` | - |
17
17
 
18
18
  ### `TabsList`
19
19
 
@@ -2,7 +2,7 @@
2
2
  position: absolute;
3
3
  bottom: 0;
4
4
  height: 2px;
5
- background: var(--color-fg);
5
+ background: var(--color-foreground);
6
6
  width: var(--tabs-indicator-size);
7
7
  translate: var(--tabs-indicator-position) 0;
8
8
  transition: translate var(--dur-state) var(--ease-state),
package/tabs/index.tsx CHANGED
@@ -17,19 +17,23 @@ export interface TabsProps {
17
17
  children?: ReactNode
18
18
  }
19
19
 
20
+ const tabs = tv({ base: 'flex flex-col gap-stack' })
21
+
20
22
  export function Tabs({ value, defaultValue, onValueChange, className, children }: TabsProps) {
21
23
  return (
22
24
  <TabsPrimitive.Root
23
25
  value={value}
24
26
  defaultValue={defaultValue}
25
27
  onValueChange={onValueChange}
26
- className={tv({ base: 'flex flex-col gap-stack' })({ className })}
28
+ className={tabs({ className })}
27
29
  >
28
30
  {children}
29
31
  </TabsPrimitive.Root>
30
32
  )
31
33
  }
32
34
 
35
+ const tabsList = tv({ base: 'border-line scrollbar-thin scrollbar-thumb-line-strong scrollbar-track-transparent overflow-x-auto border-b' })
36
+
33
37
  export function TabsList({ className, children }: { className?: string, children?: ReactNode }) {
34
38
  const list = useRef<HTMLDivElement>(null)
35
39
  const bar = useRef<HTMLSpanElement>(null)
@@ -58,7 +62,7 @@ export function TabsList({ className, children }: { className?: string, children
58
62
 
59
63
  return (
60
64
  <div
61
- className={tv({ base: 'border-line scroll-slim overflow-x-auto border-b' })({ className })}
65
+ className={tabsList({ className })}
62
66
  >
63
67
  <TabsPrimitive.List ref={list} className="relative flex w-max min-w-full">
64
68
  {children}
@@ -69,6 +73,16 @@ export function TabsList({ className, children }: { className?: string, children
69
73
  )
70
74
  }
71
75
 
76
+ const tabsTrigger = tv({
77
+ base: 'text-label text-foreground-muted inline-flex h-9 items-center gap-tight px-3 transition-state'
78
+ + ' [&_svg]:size-4'
79
+ + ' press-shrink enabled:hover:text-foreground'
80
+ + ' disabled:text-foreground-disabled disabled:cursor-not-allowed'
81
+ + ' aria-selected:text-foreground'
82
+ + ' focus-visible:outline-2 focus-visible:-outline-offset-2'
83
+ + ' focus-visible:outline-line-focus-ring',
84
+ })
85
+
72
86
  export function TabsTrigger({ value, disabled, className, children }: {
73
87
  value: string
74
88
  disabled?: boolean
@@ -79,13 +93,7 @@ export function TabsTrigger({ value, disabled, className, children }: {
79
93
  <TabsPrimitive.Trigger
80
94
  value={value}
81
95
  disabled={disabled}
82
- className={tv({ base: 'text-label text-fg-muted inline-flex h-9 items-center gap-tight px-3 transition-state'
83
- + ' [&_svg]:size-4'
84
- + ' press-shrink enabled:hover:text-fg'
85
- + ' disabled:text-fg-disabled disabled:cursor-not-allowed'
86
- + ' aria-selected:text-fg'
87
- + ' focus-visible:outline-2 focus-visible:-outline-offset-2'
88
- + ' focus-visible:outline-ring' })({ className })}
96
+ className={tabsTrigger({ className })}
89
97
  >
90
98
  {children}
91
99
  </TabsPrimitive.Trigger>
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add textarea
5
5
  층 ui
6
- 파일 textarea/index.tsx · textarea/AGENTS.md
6
+ 파일 textarea/index.tsx, textarea/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -23,12 +23,12 @@
23
23
  | `surface` | `'bare' \| 'well'` | |
24
24
  | `size` | `'sm' \| 'md' \| 'lg'` | |
25
25
 
26
- ## 변형 — `textarea`
26
+ ## 변형 - `textarea`
27
27
 
28
28
  | 축 | 값 | 기본 |
29
29
  |---|---|---|
30
- | `surface` | `bare` · `well` | `bare` |
31
- | `size` | `sm` · `md` · `lg` | `md` |
30
+ | `surface` | `bare`, `well` | `bare` |
31
+ | `size` | `sm`, `md`, `lg` | `md` |
32
32
 
33
33
  ## 함께 받는 것
34
34
 
@@ -3,19 +3,19 @@ import type { TextareaHTMLAttributes } from 'react'
3
3
  import { tv } from '../tv'
4
4
 
5
5
  export const textarea = tv({
6
- base: 'w-full rounded-r8 text-value text-fg'
7
- + ' placeholder:text-fg-placeholder'
8
- + ' invalid:ring-2 invalid:ring-danger'
9
- + ' read-only:text-fg-muted'
6
+ base: 'w-full rounded-r8 text-value text-foreground'
7
+ + ' placeholder:text-foreground-placeholder'
8
+ + ' invalid:ring-2 invalid:ring-line-danger'
9
+ + ' read-only:text-foreground-muted'
10
10
  + ' resize-y'
11
11
  + ' transition-state'
12
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
13
- + ' disabled:bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed',
12
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
13
+ + ' disabled:bg-bg-neutral-disabled disabled:text-foreground-disabled disabled:cursor-not-allowed',
14
14
 
15
15
  variants: {
16
16
  surface: {
17
- bare: 'bg-transparent ring-1 ring-inset ring-line-strong read-only:bg-well',
18
- well: 'bg-well',
17
+ bare: 'bg-transparent ring-1 ring-inset ring-line-strong read-only:bg-background-well',
18
+ well: 'bg-background-well',
19
19
  },
20
20
  size: {
21
21
  sm: 'p-2',
package/toast/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add toast
5
5
  층 ui
6
- 파일 toast/index.tsx · toast/AGENTS.md
6
+ 파일 toast/index.tsx, toast/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -14,18 +14,6 @@
14
14
 
15
15
  ## props
16
16
 
17
- ### `ToastTone`
18
-
19
- `'neutral' | 'success' | 'warning' | 'danger' | 'info'`
20
-
21
- ### `ToastOptions`
22
-
23
- | 이름 | 타입 | 필수 |
24
- |---|---|---|
25
- | `description` | `string` | |
26
- | `action` | `{ label: string, onClick: () => void }` | |
27
- | `toasterId` | `string` | |
28
-
29
17
  ### `ToastProps`
30
18
 
31
19
  `Omit<ComponentProps<typeof SonnerToaster>, 'id' | 'position' | 'duration' | 'expand'>` 를 확장한다.
@@ -37,6 +25,10 @@
37
25
  | `duration` | `number` | |
38
26
  | `expand` | `boolean` | |
39
27
 
28
+ ## 함께 받는 것
29
+
30
+ `tv`
31
+
40
32
  ## npm 의존
41
33
 
42
34
  `sonner`
package/toast/index.tsx CHANGED
@@ -1,31 +1,13 @@
1
1
  'use client'
2
2
 
3
3
  import type { ComponentProps } from 'react'
4
- import { toast as sonner, Toaster as SonnerToaster } from 'sonner'
4
+ import { Toaster as SonnerToaster } from 'sonner'
5
5
 
6
- export type ToastTone = 'neutral' | 'success' | 'warning' | 'danger' | 'info'
6
+ import { tv } from '../tv'
7
7
 
8
- export type ToastOptions = {
9
- description?: string
10
- action?: { label: string, onClick: () => void }
11
- toasterId?: string
12
- }
8
+ const toaster = tv({ base: 'z-toast' })
13
9
 
14
- const show = (tone: ToastTone, message: string, options?: ToastOptions) => {
15
- if (tone === 'neutral') return sonner(message, options)
16
- if (tone === 'danger') return sonner.error(message, options)
17
- return sonner[tone](message, options)
18
- }
19
-
20
- export const toast = {
21
- show,
22
- neutral: (m: string, o?: ToastOptions) => show('neutral', m, o),
23
- success: (m: string, o?: ToastOptions) => show('success', m, o),
24
- warning: (m: string, o?: ToastOptions) => show('warning', m, o),
25
- danger: (m: string, o?: ToastOptions) => show('danger', m, o),
26
- info: (m: string, o?: ToastOptions) => show('info', m, o),
27
- dismiss: (id?: string | number) => sonner.dismiss(id),
28
- }
10
+ export { toast } from 'sonner'
29
11
 
30
12
  export interface ToastProps
31
13
  extends Omit<ComponentProps<typeof SonnerToaster>, 'id' | 'position' | 'duration' | 'expand'> {
@@ -36,7 +18,17 @@ export interface ToastProps
36
18
  expand?: boolean
37
19
  }
38
20
 
39
- export function Toast({ toasterId, position = 'bottom-center', duration = 4000, expand = false, ...rest }: ToastProps) {
21
+ export function Toast({
22
+ toasterId,
23
+ position = 'bottom-center',
24
+ duration = 4000,
25
+ expand = false,
26
+ offset = 16,
27
+ gap = 8,
28
+ className,
29
+ toastOptions,
30
+ ...rest
31
+ }: ToastProps) {
40
32
  return (
41
33
  <SonnerToaster
42
34
  {...rest}
@@ -44,26 +36,28 @@ export function Toast({ toasterId, position = 'bottom-center', duration = 4000,
44
36
  position={position}
45
37
  duration={duration}
46
38
  expand={expand}
47
- offset={16}
48
- gap={8}
49
- className="z-toast"
39
+ offset={offset}
40
+ gap={gap}
41
+ className={toaster({ className })}
50
42
  toastOptions={{
51
43
  unstyled: true,
44
+ ...toastOptions,
52
45
  classNames: {
53
- toast: 'bg-float border border-line rounded-r8 shadow-s3'
46
+ toast: 'float rounded-r8'
54
47
  + ' flex w-full items-center gap-stack p-4',
55
48
  content: 'min-w-0 flex-1',
56
- title: 'text-label text-fg',
57
- description: 'text-caption text-fg-muted',
49
+ title: 'text-label text-foreground',
50
+ description: 'text-caption text-foreground-muted',
58
51
  icon: 'shrink-0',
59
- actionButton: 'text-label text-fg shrink-0 rounded-r8 px-3 h-8'
60
- + ' bg-well transition-state press press-shrink enabled:hover:bg-fg-muted/10'
61
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
62
- + ' disabled:text-fg-disabled disabled:cursor-not-allowed',
63
- success: 'text-success',
64
- error: 'text-danger',
65
- warning: 'text-warning',
66
- info: 'text-info',
52
+ actionButton: 'text-label text-foreground shrink-0 rounded-r8 px-3 h-8'
53
+ + ' bg-background-well transition-state press press-shrink enabled:hover:bg-bg-neutral-solid/10'
54
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
55
+ + ' disabled:text-foreground-disabled disabled:cursor-not-allowed',
56
+ success: 'text-fg-success',
57
+ error: 'text-fg-danger',
58
+ warning: 'text-fg-warning',
59
+ info: 'text-fg-info',
60
+ ...toastOptions?.classNames,
67
61
  },
68
62
  }}
69
63
  />
package/toggle/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add toggle
5
5
  층 ui
6
- 파일 toggle/index.tsx · toggle/AGENTS.md
6
+ 파일 toggle/index.tsx, toggle/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -20,13 +20,13 @@
20
20
 
21
21
  | 이름 | 타입 | 필수 |
22
22
  |---|---|---|
23
- | `surface` | `'bare' \| 'canvas'` | |
23
+ | `surface` | `'bare' \| 'well' \| 'panel'` | |
24
24
 
25
- ## 변형 — `toggle`
25
+ ## 변형 - `toggle`
26
26
 
27
27
  | 축 | 값 | 기본 |
28
28
  |---|---|---|
29
- | `surface` | `bare` · `canvas` | `bare` |
29
+ | `surface` | `bare`, `well`, `panel` | `bare` |
30
30
 
31
31
  ## 함께 받는 것
32
32
 
package/toggle/index.tsx CHANGED
@@ -9,18 +9,19 @@ export const toggle = tv({
9
9
  base: 'text-label rounded-full inline-flex h-8 items-center gap-tight px-3'
10
10
  + ' [&_svg]:size-4'
11
11
  + ' ring-1 ring-inset ring-line-strong transition-state press press-shrink'
12
- + ' text-fg-muted'
13
- + ' enabled:hover:bg-hover'
14
- + ' on:bg-control-on on:ring-control-on on:enabled:text-fg-on-control'
15
- + ' on:enabled:hover:bg-control-on-hover'
16
- + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring'
17
- + ' disabled:text-fg-disabled disabled:ring-line disabled:cursor-not-allowed'
18
- + ' on:disabled:bg-control-on-disabled on:disabled:ring-control-on-disabled on:disabled:text-fg-on-control',
12
+ + ' text-foreground-muted'
13
+ + ' enabled:hover:bg-bg-neutral-hover'
14
+ + ' on:bg-bg-neutral-solid on:ring-line-neutral-solid on:enabled:text-fg-neutral-solid-contrast'
15
+ + ' on:enabled:hover:bg-bg-neutral-solid-hover'
16
+ + ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
17
+ + ' disabled:text-foreground-disabled disabled:ring-line disabled:cursor-not-allowed'
18
+ + ' on:disabled:bg-bg-neutral-solid-checked-disabled on:disabled:ring-transparent on:disabled:text-fg-neutral-solid-contrast',
19
19
 
20
20
  variants: {
21
21
  surface: {
22
22
  bare: '',
23
- canvas: 'bg-canvas',
23
+ well: 'bg-background-well',
24
+ panel: 'bg-background-panel',
24
25
  },
25
26
  },
26
27
 
@@ -28,7 +29,7 @@ export const toggle = tv({
28
29
  })
29
30
 
30
31
  export interface ToggleProps extends ComponentProps<typeof TogglePrimitive.Root> {
31
- surface?: 'bare' | 'canvas'
32
+ surface?: 'bare' | 'well' | 'panel'
32
33
  }
33
34
 
34
35
  export function Toggle({ surface, className, ...rest }: ToggleProps) {
package/tooltip/AGENTS.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  받기 npx @pantoia/ui add tooltip
5
5
  층 ui
6
- 파일 tooltip/index.tsx · tooltip/AGENTS.md
6
+ 파일 tooltip/index.tsx, tooltip/AGENTS.md
7
7
  ```
8
8
 
9
9
  ## 부위
@@ -11,7 +11,7 @@
11
11
  | 이름 | props |
12
12
  |---|---|
13
13
  | `Tooltip` | `TooltipProps` |
14
- | `TooltipTrigger` | — |
14
+ | `TooltipTrigger` | - |
15
15
  | `TooltipContent` | `TooltipContentProps` |
16
16
 
17
17
  ### `TooltipTrigger`
package/tooltip/index.tsx CHANGED
@@ -32,6 +32,12 @@ export interface TooltipContentProps extends Omit<ComponentProps<typeof TooltipP
32
32
  arrow?: boolean
33
33
  }
34
34
 
35
+ const tooltipContent = tv({
36
+ base: 'float text-foreground rounded-r12 z-overlay'
37
+ + ' text-caption max-w-64 px-3 py-1'
38
+ + ' open:animate-enter closed:animate-exit',
39
+ })
40
+
35
41
  export function TooltipContent({
36
42
  side = 'top',
37
43
  arrow = true,
@@ -45,12 +51,16 @@ export function TooltipContent({
45
51
  {...rest}
46
52
  side={side}
47
53
  sideOffset={6}
48
- className={tv({ base: 'bg-float text-fg rounded-r12 shadow-s3 z-overlay'
49
- + ' text-caption max-w-64 px-3 py-1'
50
- + ' open:animate-enter closed:animate-exit' })({ className })}
54
+ className={tooltipContent({ className })}
51
55
  >
52
56
  {children}
53
- {arrow && <TooltipPrimitive.Arrow className="fill-float" width={10} height={5} />}
57
+ {arrow && (
58
+ <TooltipPrimitive.Arrow asChild width={10} height={5}>
59
+ <svg viewBox="0 0 12 6" preserveAspectRatio="none" className="fill-background-panel -translate-y-px">
60
+ <path d="M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0" className="stroke-line stroke-1" />
61
+ </svg>
62
+ </TooltipPrimitive.Arrow>
63
+ )}
54
64
  </TooltipPrimitive.Content>
55
65
  </TooltipPrimitive.Portal>
56
66
  )
@@ -1,60 +0,0 @@
1
- # CodeBlock
2
-
3
- ```
4
- 받기 npx @pantoia/ui add code-block
5
- 층 ui
6
- 파일 code-block/index.tsx · code-block/index.module.css · code-block/AGENTS.md
7
- ```
8
-
9
- ## 부위
10
-
11
- | 이름 | props |
12
- |---|---|
13
- | `CodeBlock` | `CodeBlockProps` |
14
- | `CodeBlockHeader` | — |
15
-
16
- ### `CodeBlockHeader`
17
-
18
- | 이름 | 타입 | 필수 |
19
- |---|---|---|
20
- | `className` | `string` | |
21
- | `children` | `ReactNode` | |
22
-
23
- ## props
24
-
25
- ### `CodeBlockFold`
26
-
27
- | 이름 | 타입 | 필수 |
28
- |---|---|---|
29
- | `maxLines` | `number` | 예 |
30
- | `more` | `string` | 예 |
31
- | `moreCount` | `string` | 예 |
32
- | `less` | `string` | 예 |
33
-
34
- ### `CodeBlockProps`
35
-
36
- | 이름 | 타입 | 필수 |
37
- |---|---|---|
38
- | `code` | `string` | 예 |
39
- | `wrap` | `boolean` | |
40
- | `numbers` | `boolean` | |
41
- | `fold` | `CodeBlockFold` | |
42
- | `className` | `string` | |
43
- | `header` | `ReactNode` | |
44
- | `line` | `(line: string, index: number) => ReactNode` | |
45
-
46
- ## 변형 — `codeBlock`
47
-
48
- 슬롯 `root` · `viewport` · `pre` · `chevron`
49
-
50
- | 축 | 값 | 기본 |
51
- |---|---|---|
52
- | `folded` | `false` | — |
53
-
54
- ## 함께 받는 것
55
-
56
- `tv`
57
-
58
- ## npm 의존
59
-
60
- `lucide-react`