@pantoia/ui 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -202,7 +202,7 @@ function Calendar({ value, min, max, today, onPick }: CalendarProps) {
202
202
  <div className={ui.root()}>
203
203
  <div className={ui.head()}>
204
204
  <NavButton label="이전 달" direction="left" onClick={() => showMonth(view.year, view.month - 1)} />
205
- <button type="button" aria-label="연월 고르기" className={ui.titleButton()} onClick={() => setMode('months')}>
205
+ <button type="button" aria-label="연월 선택" className={ui.titleButton()} onClick={() => setMode('months')}>
206
206
  {view.year}년 {view.month + 1}월
207
207
  </button>
208
208
  <NavButton label="다음 달" direction="right" onClick={() => showMonth(view.year, view.month + 1)} />
@@ -347,8 +347,8 @@ export function DatePicker({
347
347
  min,
348
348
  max,
349
349
  today,
350
- title = '날짜 고르기',
351
- placeholder = '날짜를 고르세요',
350
+ title = '날짜 선택',
351
+ placeholder = '날짜를 선택하세요',
352
352
  format = fullDate,
353
353
  ...trigger
354
354
  }: DatePickerProps) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pantoia/ui",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "description": "Pantoia Design System",
5
5
  "homepage": "https://design.pantoia.com",
6
6
  "repository": {
@@ -5,7 +5,7 @@ description: PANTOIA Design System(@pantoia/ui)으로 화면을 만들거나 고
5
5
 
6
6
  # @pantoia/ui
7
7
 
8
- 사람이 보는 문서는 https://design.pantoia.com 에 있다.
8
+ 사람이 보는 문서는 `https://design.pantoia.com`에 있다.
9
9
 
10
10
  ## 설치
11
11
 
@@ -78,8 +78,8 @@ Select와 RadioGroup의 state는 `useState<string | null>`로 둔다.
78
78
  ```
79
79
  frame 배경과 선. 페이지 안의 영역
80
80
  card 배경과 그림자. 목록의 항목
81
- float 배경과 선과 그림자. 페이지나 overlay 위에 뜨는 것
82
- well bg-bg-well. 파인 면
81
+ float 배경, 선, 그림자. 페이지나 overlay 위에 뜨는 것
82
+ well bg-bg-well
83
83
  ```
84
84
 
85
85
  ### 간격, 둥글기, 글자, 그림자
@@ -92,7 +92,7 @@ well bg-bg-well. 파인 면
92
92
  크기만 text-t10부터 text-t64까지
93
93
  그림자 shadow-s1, shadow-s2, shadow-s3
94
94
  전환 transition-state, animate-enter, animate-exit
95
- 층 z-sticky 10, z-overlay 50, z-toast 60
95
+ z-index z-sticky 10, z-overlay 50, z-toast 60
96
96
  ```
97
97
 
98
98
  ### 쓰지 않는 것
@@ -252,7 +252,7 @@ import { TooltipProvider } from '@/components/ui/tooltip'
252
252
  </TooltipProvider>
253
253
  ```
254
254
 
255
- 알림은 일어난 일에 맞는 함수로 띄운다. 예시는 https://design.pantoia.com/toast/ 에 있다.
255
+ 알림은 일어난 일에 맞는 함수로 띄운다. 예시는 `https://design.pantoia.com/toast/`에 있다.
256
256
 
257
257
  ```
258
258
  toast.success 요청한 작업을 끝냈다
@@ -134,7 +134,7 @@ export interface SwatchPickerCustomProps {
134
134
  disabled?: boolean
135
135
  }
136
136
 
137
- export function SwatchPickerCustom({ label = '직접 고르기', disabled }: SwatchPickerCustomProps) {
137
+ export function SwatchPickerCustom({ label = '직접 선택', disabled }: SwatchPickerCustomProps) {
138
138
  const { size, value, choose, known } = use(Context)
139
139
  const ui = swatchPicker({ size })
140
140
  const input = useRef<HTMLInputElement>(null)
@@ -103,8 +103,8 @@ export function TimePicker({
103
103
  defaultValue = null,
104
104
  onValueChange,
105
105
  step = 1,
106
- title = '시각 고르기',
107
- placeholder = '시각을 고르세요',
106
+ title = '시각 선택',
107
+ placeholder = '시각을 선택하세요',
108
108
  ...trigger
109
109
  }: TimePickerProps) {
110
110
  const [open, setOpen] = useState(false)
package/toast/index.tsx CHANGED
@@ -55,7 +55,17 @@ const toastRoot = tv({
55
55
  + ' data-multiline:rounded-r20 data-multiline:w-full data-multiline:items-start data-multiline:px-4 data-multiline:py-3',
56
56
  })
57
57
 
58
- const toastIcon = tv({ base: 'shrink-0 in-data-multiline:pt-px' })
58
+ const toastIcon = tv({
59
+ base: 'shrink-0 in-data-multiline:pt-px',
60
+ variants: {
61
+ kind: {
62
+ success: 'text-fg-success',
63
+ error: 'text-fg-danger',
64
+ warning: 'text-fg-warning',
65
+ info: 'text-fg-info',
66
+ },
67
+ },
68
+ })
59
69
 
60
70
  const toastContent = tv({ base: 'min-w-0 flex-1' })
61
71
 
@@ -137,7 +147,7 @@ function ToastItem({ item, front, swipe }: { item: Item, front: boolean, swipe:
137
147
  data-multiline={multiline ? '' : undefined}
138
148
  className={toastRoot({ className: s.toast })}
139
149
  >
140
- {icon && <div className={toastIcon()}>{icon}</div>}
150
+ {icon && <div className={toastIcon({ kind: item.type as Kind })}>{icon}</div>}
141
151
  <ToastPrimitive.Content className={toastContent()}>
142
152
  <ToastPrimitive.Title ref={title} className={toastTitle()} />
143
153
  <ToastPrimitive.Description className={toastDescription()} />