@weing-dev/ui-kit-primitive 0.4.6 → 0.5.1
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.
- package/README.md +89 -46
- package/dist/{Icon-DExqF865.js → Icon-DEdvzMs-.js} +1 -1
- package/dist/{color-B71xRiyK.js → baseColor-DYa5_IOB.js} +3 -120
- package/dist/calendar.js +12 -12
- package/dist/chart.css +1 -0
- package/dist/chart.d.ts +7 -2
- package/dist/chart.js +703 -84
- package/dist/color-qJrSCDan.js +155 -0
- package/dist/components/Calendar/Calendar.d.ts +1 -55
- package/dist/components/Calendar/Calendar.type.d.ts +61 -0
- package/dist/components/Cascader/Cascader.d.ts +2 -36
- package/dist/components/Cascader/Cascader.type.d.ts +37 -0
- package/dist/components/Chart/Chart.context.d.ts +9 -0
- package/dist/components/Chart/Chart.gradient.d.ts +10 -0
- package/dist/components/Chart/Chart.hooks.d.ts +4 -0
- package/dist/components/Chart/Chart.options.d.ts +29 -0
- package/dist/components/Chart/Chart.palette.d.ts +20 -0
- package/dist/components/Chart/Chart.preset.d.ts +7 -0
- package/dist/components/Chart/Chart.register.d.ts +1 -0
- package/dist/components/Chart/Chart.style.d.ts +21 -0
- package/dist/components/Chart/Chart.theme.d.ts +9 -0
- package/dist/components/Chart/Chart.type.d.ts +161 -0
- package/dist/components/Chart/ChartFrame.d.ts +14 -0
- package/dist/components/Chart/ChartRenderer.d.ts +11 -0
- package/dist/components/Chart/charts/BarChart.d.ts +3 -0
- package/dist/components/Chart/charts/DoughnutChart.d.ts +3 -0
- package/dist/components/Chart/charts/LineChart.d.ts +3 -0
- package/dist/components/Chart/charts/PieChart.d.ts +3 -0
- package/dist/components/Chart/charts/RadarChart.d.ts +3 -0
- package/dist/components/Form/Dropdown/Dropdown.d.ts +1 -47
- package/dist/components/Form/Dropdown/Dropdown.type.d.ts +48 -0
- package/dist/components/Form/TextArea/TextArea.d.ts +1 -18
- package/dist/components/Form/TextArea/TextArea.type.d.ts +19 -0
- package/dist/components/Form/TextInput/TextInput.d.ts +1 -17
- package/dist/components/Form/TextInput/TextInput.type.d.ts +18 -0
- package/dist/components/TimeInput/TimeInput.d.ts +1 -27
- package/dist/components/TimeInput/TimeInput.type.d.ts +27 -0
- package/dist/display.js +23 -22
- package/dist/entry/chart.d.ts +7 -2
- package/dist/entry/components.d.ts +1 -2
- package/dist/feedback.js +2 -2
- package/dist/form.js +463 -462
- package/dist/icon.js +2 -2
- package/dist/index.js +3806 -3862
- package/dist/index.umd.cjs +24 -24
- package/dist/navigation.js +41 -40
- package/dist/styles/color.d.ts +30 -0
- package/dist/video-player.js +83 -83
- package/docs/subpath-imports.md +80 -0
- package/docs/ui-kit-agent-guide.md +574 -0
- package/package.json +4 -2
- package/dist/components/Chart/Chart.d.ts +0 -19
- /package/dist/components/Cascader/{Cacader.data.d.ts → Cascader.data.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,59 +1,102 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@weing-dev/ui-kit-primitive`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
weing 어드민/서비스 프런트의 **공통 UI 프리미티브** 패키지. 폼·네비게이션·피드백·표시·데이터(차트/테이블/캘린더/에디터/비디오)까지 화면 구성에 필요한 컴포넌트를 한곳에서 제공한다. 대부분 **Compound 컴포넌트 패턴**(`Button.Root` + `Button.Text` …)과 **CSS 변수 토큰 테마**로 만들어져 있다.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **화면/마크업 작업 전 필독 (사람·에이전트 공통)**
|
|
6
|
+
> 새 컴포넌트를 만들기 전에 **[에이전트 UI 가이드 → `docs/ui-kit-agent-guide.md`](./docs/ui-kit-agent-guide.md)** 를 먼저 확인하라.
|
|
7
|
+
> 아래 카탈로그의 40개 컴포넌트가 대부분의 화면 요구를 이미 커버한다. 중복 구현은 피한다.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
- [
|
|
9
|
+
관련 문서:
|
|
10
|
+
- **[에이전트 UI 가이드](./docs/ui-kit-agent-guide.md)** — 목적→컴포넌트 매핑, 전체 API 카탈로그, 합성 예시, 소비 컨벤션, 금지/함정. (마크업 에이전트의 1차 참조 문서)
|
|
11
|
+
- **[서브패스 import 가이드](./docs/subpath-imports.md)** — 번들 분리를 위한 서브패스별 import 규칙.
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
---
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
## 컴포넌트 인덱스
|
|
13
16
|
|
|
14
|
-
-
|
|
17
|
+
import 서브패스는 `@weing-dev/ui-kit-primitive/<서브패스>`. 자세한 props·예시는 [에이전트 UI 가이드](./docs/ui-kit-agent-guide.md) 참조.
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
### Form — `/form`
|
|
20
|
+
| 컴포넌트 | 용도 | 구조 |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| `Button` | 액션 버튼(로딩·아이콘·텍스트 합성) | `Root / Text / Icon` |
|
|
23
|
+
| `TextInput` | 한 줄 텍스트 입력(라벨·지우기·아이콘) | `Root / Label / Input / Erase / HelperText` |
|
|
24
|
+
| `TextArea` | 여러 줄 입력(자동 높이·글자수) | `Root / Label / Input / Erase / HelperText / TextCount` |
|
|
25
|
+
| `Dropdown` | 단일/다중 셀렉트(검색·popper) | `Root / Trigger / Menu / Item` |
|
|
26
|
+
| `CheckBox` | 체크박스(단일/다중) | `Root / Trigger / Label / HelperText` |
|
|
27
|
+
| `Radio` | 라디오(그룹 단일 선택) | `Root / Trigger / Label / HelperText` |
|
|
28
|
+
| `Switch` | on/off 토글 | `Root / Trigger / Label` |
|
|
29
|
+
| `Cascader` | 계층형 다단계 선택 | `Root / Menu / Column / Item` |
|
|
30
|
+
| `OTPInput` | 고정 자리수 코드 입력 | `Root / Input` |
|
|
31
|
+
| `Slider` | 단일/범위 슬라이더 | `Root / Progress / Thumb / Marks` |
|
|
32
|
+
| `Stepper` | 다단계 진행 표시 | `Root / Step` |
|
|
33
|
+
| `TimeInput` | 시작~종료 시간 범위 | `Root / Label / InputWrapper / Input / Colon / Separator / TimeRange / HelperText` |
|
|
34
|
+
| `MobilePicker` | 휠(드럼) 피커 | `Root / Column / Item` |
|
|
35
|
+
| `HelperText` | 입력 하단 상태 안내 문구 | 단일 |
|
|
27
36
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
### Navigation — `/navigation`
|
|
38
|
+
| 컴포넌트 | 용도 | 구조 |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| `Tab` | 탭 + 패널 전환 | `Root / List / Item / Panels / Panel` |
|
|
41
|
+
| `Accordion` | 펼침/접힘 영역 | `Root / Trigger / Item` |
|
|
42
|
+
| `Breadcrumb` | 경로 내비게이션 | `List / Link / Separator / Ellipsis` |
|
|
43
|
+
| `Pagination` | 페이지네이션(offset/limit) | `Root / PageList / PageItem / Prev / Next` |
|
|
44
|
+
| `LNB` | 좌측 글로벌 메뉴(+`makeNavigation`) | `Root / Logo / List / Item` |
|
|
45
|
+
| `List` | 단일 행 리스트 아이템 | 단일 |
|
|
46
|
+
| `ScrollSpy` | 스크롤 위치 추적 훅 | `useScrollSpy` 훅 |
|
|
47
|
+
|
|
48
|
+
### Feedback — `/feedback`
|
|
49
|
+
| 컴포넌트 | 용도 | 구조 |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `Modal` | 포털 딤드 모달 | 단일(`visible/onClose/dimmedColor`) |
|
|
52
|
+
| `Popup` | Popover API 팝업(+`usePopup`) | `Root / Layer / Dimmed / Contents` |
|
|
53
|
+
| `Sheet` | 드래그 가능한 4방향 시트 | `Root / Content / Dimmed` |
|
|
54
|
+
|
|
55
|
+
### Display — `/display`
|
|
56
|
+
| 컴포넌트 | 용도 | 구조 |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| `Label` | 상태/카테고리 라벨(태그) | 단일 |
|
|
59
|
+
| `Chips` | 선택 가능한 칩 | 단일 |
|
|
60
|
+
| `Badge` | 카운트/점 배지 오버레이 | 단일 |
|
|
61
|
+
| `Avatar` | 프로필 이미지(+그룹) | `Item / Group` |
|
|
62
|
+
| `Thumbnail` | 업로드·수정·삭제 썸네일 | `Root / Image / Upload / EmptyImage / RemoveButton / EditButton` |
|
|
63
|
+
| `Comment` | 상태 아이콘 + 보조 메시지 | 단일 |
|
|
64
|
+
| `Divider` | 구분선 | 단일 |
|
|
65
|
+
| `LazyImage` | 지연 로딩 이미지 | 단일 |
|
|
66
|
+
| `QRCode` | QR 코드 | 단일 |
|
|
67
|
+
| `BarCode` | EAN8/EAN13 바코드 | 단일 |
|
|
68
|
+
|
|
69
|
+
### Data / Heavy (전용 서브패스 + 일부 CSS 별도)
|
|
70
|
+
| 컴포넌트 | 서브패스 | 비고 |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| `Table` | `/table` | `@tanstack/react-table`와 조합, 렌더 전용 |
|
|
73
|
+
| `BarChart` `LineChart` `PieChart` `DoughnutChart` | `/chart` | chart.js 기반, `ChartThemeProvider` |
|
|
74
|
+
| `Calendar` `ScrollCalendar` `WeeklyCalendar` | `/calendar` | dayjs 기반 |
|
|
75
|
+
| `Editor` | `/editor` | Quill, **`editor/style.css` 별도 import 필수** |
|
|
76
|
+
| `VideoPlayer` | `/video-player` | Video.js, **`video-player/style.css` 별도 import 필수** |
|
|
77
|
+
| `Icon` `IconProvider` `ICON_NAMES` | `/icon` | 레지스트리 기반, 앱 루트를 `IconProvider`로 감싸야 함 |
|
|
78
|
+
|
|
79
|
+
> **미사용/비공개(쓰지 말 것)**: `Dialog`(빈 스텁), `WisywygEditor`(레거시, 미export — 신규는 `Editor` 사용), `radar` 차트(미export).
|
|
80
|
+
|
|
81
|
+
---
|
|
51
82
|
|
|
52
83
|
## 임포트 시 실제 로드량 확인 방법
|
|
53
84
|
|
|
54
|
-
특정 export
|
|
85
|
+
특정 export만 import 했을 때 실제 로드량을 확인하려면:
|
|
55
86
|
|
|
56
|
-
1.
|
|
57
|
-
2.
|
|
87
|
+
1. 소비 앱에서 production 빌드 후 번들 분석기로 청크 크기 확인
|
|
88
|
+
2. 빌드 산출물을 서빙한 뒤 브라우저 Network 탭에서 JS 파일 크기 비교
|
|
89
|
+
|
|
90
|
+
모노레포에서 이 패키지를 **소스로** 참조하면 번들러가 tree-shaking으로 필요한 부분만 포함한다. 무거운 의존성(차트·에디터·비디오·테이블)은 서브패스가 의도적으로 분리돼 있으니 **루트 배럴 대신 서브패스 import**를 권장한다([근거](./docs/subpath-imports.md)).
|
|
91
|
+
|
|
92
|
+
## 아이콘 추가
|
|
93
|
+
|
|
94
|
+
`public/static/icon`에 SVG를 넣고 `pnpm icons:create` 실행 → svgr이 `src/components/Icons/*.tsx`를 생성하고 `generate-icon-names.cjs`가 `ICON_NAMES`를 재생성한다. `ICON_NAMES`는 수기 작성하지 않는다.
|
|
95
|
+
|
|
96
|
+
## 빌드
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pnpm build # tsc -b && vite build && vite build --config vite.icon.config.ts
|
|
100
|
+
```
|
|
58
101
|
|
|
59
|
-
|
|
102
|
+
메인 라이브러리는 `vite.config.ts`, 서브패스 청크는 `vite.icon.config.ts`(이름은 icon이지만 chart·form 등 전 엔트리 포함).
|
|
@@ -1133,7 +1133,7 @@ const r = (t) => {
|
|
|
1133
1133
|
}))
|
|
1134
1134
|
}));
|
|
1135
1135
|
}, L2 = M2(), _2 = y.createContext(L2), j2 = (t) => {
|
|
1136
|
-
const e = y.
|
|
1136
|
+
const e = y.use(_2);
|
|
1137
1137
|
return g(e, t);
|
|
1138
1138
|
}, b2 = Object.freeze(["Add", "AddOutlined", "AddAPhoto", "ApprovalInactive", "ArrowDown", "ArrowRight", "ArrowUp", "ArrowDropDown", "ArticleOutlined", "AttachFile", "BackButton", "CalendarMonth", "CalendarToday", "CancleFilled", "Cancle", "CartFilled", "Cart", "Category", "CategoryOutlined", "Celebration", "Check", "CheckBadge", "CheckBoxRound", "CheckList", "CheckCircle", "ChevronLeft", "ChromeReaderMode", "Close", "Company", "CreditCard", "CropOriginal", "DensityMediumRound", "DoubleArrowDown", "DoubleArrowUp", "Download", "DragHandle", "Eco", "EditSquare", "EditNoteOutlined", "ErrorFilled", "Error", "ExpandAll", "ExpandLess", "ExpandMore", "Factory", "FeedbackOutlined", "FileUpload", "FilecheckInactive", "FileDownloadDoneFilled", "FileDownloadOutlined", "FullScreen", "FullScreenClose", "GoBefore", "GoNext", "HamburgerMenu", "HandshakeRound", "Home", "ImagecheckPlay", "ImportExport", "InfoFilled", "Inventory", "KakaoTalk", "ListAll", "LocalActivityOutlined", "LocalHospital", "LocalShipping", "Logout", "Menu", "Minus", "MinusOutlined", "ModeEdit", "More", "NaverBlog", "Naver", "Notification", "OrderApprove", "OrderInactive", "OrderPlay", "Outward", "Pause", "PayApprove", "PayInactive", "Payment", "PersonAddAlt", "Personcard", "PersonFilled", "PersonOutline", "PictureQuality", "Pip", "PipExit", "Play", "PlaybackSpeed", "PrintInactive", "PrintPlay", "Product", "ScheduleRound", "Search", "Search2", "SettingFilled", "Settings", "Share", "ShippingDone", "SubtitleFilled", "SubtitleOutlined", "SupportAgent", "SwapVert", "Task", "TrashOutlined", "Upload", "User", "VolumeOff", "VolumeUp", "WarningFilled", "Warning", "WarningAmber"]);
|
|
1139
1139
|
function B2(t) {
|
|
@@ -97,7 +97,7 @@ const e = {
|
|
|
97
97
|
},
|
|
98
98
|
blackBlack: "#000000",
|
|
99
99
|
whiteWhite: "#ffffff"
|
|
100
|
-
},
|
|
100
|
+
}, f = {
|
|
101
101
|
red: {
|
|
102
102
|
Lighter: e.red.Red2,
|
|
103
103
|
Light: e.red.Red4,
|
|
@@ -259,126 +259,9 @@ const e = {
|
|
|
259
259
|
primary32: "#00a76f51",
|
|
260
260
|
primary40: "#00a76f66",
|
|
261
261
|
primary48: "#00a76f7a"
|
|
262
|
-
}, o = {
|
|
263
|
-
light: {
|
|
264
|
-
textPrimary: e.grey.Grey9,
|
|
265
|
-
textSecondary: e.grey.Grey7,
|
|
266
|
-
textTertiary: e.grey.Grey6,
|
|
267
|
-
textDisabled: e.grey.Grey5,
|
|
268
|
-
backgroundDefault: e.whiteWhite,
|
|
269
|
-
backgroundPaper: e.whiteWhite,
|
|
270
|
-
backgroundSecond: r.grey8,
|
|
271
|
-
backgroundNeutral: e.grey.Grey2,
|
|
272
|
-
shadow8: r.grey8,
|
|
273
|
-
shadow12: r.grey12,
|
|
274
|
-
shadow20: r.grey20,
|
|
275
|
-
componentTextfieldFilled: r.grey8,
|
|
276
|
-
componentTextfieldUnderline: r.grey40,
|
|
277
|
-
componentTextfieldOutline: r.grey24,
|
|
278
|
-
actionHover: r.grey16,
|
|
279
|
-
actionDisabled: r.grey40,
|
|
280
|
-
actionDisabledBackground: r.grey16,
|
|
281
|
-
actionSelected: r.grey16,
|
|
282
|
-
actionFocus: r.grey48,
|
|
283
|
-
textError: e.red.Red6,
|
|
284
|
-
textSuccess: e.lightGreen.LightGreen6,
|
|
285
|
-
actionAction: e.grey.Grey6,
|
|
286
|
-
textWarning: e.gold.Gold6,
|
|
287
|
-
textContrast: e.whiteWhite,
|
|
288
|
-
inheritColor: e.whiteWhite,
|
|
289
|
-
inheritBgcolor: e.grey.Grey9,
|
|
290
|
-
inheritHover: e.grey.Grey8,
|
|
291
|
-
swapDarkLightRed: e.red.Red8,
|
|
292
|
-
swapDarkLightLightGreen: e.lightGreen.LightGreen8,
|
|
293
|
-
swapDarkLightDeepGreen: e.deepGreen.DeepGreen8,
|
|
294
|
-
swapDarkLightCyanBlue: e.cyanBlue.CyanBlue8,
|
|
295
|
-
swapDarkLightPurple: e.purple.Purple8,
|
|
296
|
-
swapDarkLightGold: e.gold.Gold8,
|
|
297
|
-
swapDarkLightBlue: e.blue.Blue8,
|
|
298
|
-
swapDarkLightPrimary: e.deepGreen.DeepGreen8
|
|
299
|
-
},
|
|
300
|
-
dark: {
|
|
301
|
-
textPrimary: e.whiteWhite,
|
|
302
|
-
textSecondary: e.grey.Grey5,
|
|
303
|
-
textTertiary: e.grey.Grey6,
|
|
304
|
-
textDisabled: e.grey.Grey7,
|
|
305
|
-
backgroundDefault: e.grey.Grey10,
|
|
306
|
-
backgroundPaper: e.grey.Grey9,
|
|
307
|
-
backgroundSecond: e.grey.Grey8,
|
|
308
|
-
backgroundNeutral: r.grey12,
|
|
309
|
-
shadow8: r.black8,
|
|
310
|
-
shadow12: r.black12,
|
|
311
|
-
shadow20: r.black20,
|
|
312
|
-
componentTextfieldFilled: r.grey8,
|
|
313
|
-
componentTextfieldUnderline: r.grey40,
|
|
314
|
-
componentTextfieldOutline: r.grey24,
|
|
315
|
-
actionHover: r.grey16,
|
|
316
|
-
actionDisabled: r.grey40,
|
|
317
|
-
actionDisabledBackground: r.grey20,
|
|
318
|
-
actionSelected: r.grey16,
|
|
319
|
-
actionFocus: r.grey8,
|
|
320
|
-
textError: e.red.Red6,
|
|
321
|
-
textSuccess: e.lightGreen.LightGreen6,
|
|
322
|
-
actionAction: e.grey.Grey5,
|
|
323
|
-
textWarning: e.gold.Gold6,
|
|
324
|
-
textContrast: e.blackBlack,
|
|
325
|
-
inheritColor: e.grey.Grey9,
|
|
326
|
-
inheritBgcolor: e.whiteWhite,
|
|
327
|
-
inheritHover: e.grey.Grey5,
|
|
328
|
-
swapDarkLightRed: e.red.Red4,
|
|
329
|
-
swapDarkLightLightGreen: e.lightGreen.LightGreen4,
|
|
330
|
-
swapDarkLightDeepGreen: e.deepGreen.DeepGreen4,
|
|
331
|
-
swapDarkLightCyanBlue: e.cyanBlue.CyanBlue4,
|
|
332
|
-
swapDarkLightPurple: e.purple.Purple4,
|
|
333
|
-
swapDarkLightGold: e.gold.Gold4,
|
|
334
|
-
swapDarkLightBlue: e.blue.Blue4,
|
|
335
|
-
swapDarkLightPrimary: e.deepGreen.DeepGreen4
|
|
336
|
-
},
|
|
337
|
-
primary: {
|
|
338
|
-
pLighter: c.deepGreen.Lighter,
|
|
339
|
-
pLight: c.deepGreen.Light,
|
|
340
|
-
pMain: c.deepGreen.Main,
|
|
341
|
-
pDark: c.deepGreen.Dark,
|
|
342
|
-
pDarker: c.deepGreen.Darker,
|
|
343
|
-
p4: r.deepGreen4,
|
|
344
|
-
p8: r.deepGreen8,
|
|
345
|
-
p12: r.deepGreen12,
|
|
346
|
-
p16: r.deepGreen16,
|
|
347
|
-
p20: r.deepGreen20,
|
|
348
|
-
p24: r.deepGreen24,
|
|
349
|
-
p32: r.deepGreen32,
|
|
350
|
-
p40: r.deepGreen40,
|
|
351
|
-
p48: r.deepGreen48,
|
|
352
|
-
pContrastText: c.whiteMain
|
|
353
|
-
}
|
|
354
|
-
}, g = (a) => {
|
|
355
|
-
const l = Object.keys(a), i = (d, f) => Object.keys(d).reduce((n, p) => {
|
|
356
|
-
const t = d[p];
|
|
357
|
-
return typeof t == "object" ? n.concat(i(t, `${f}${p}`)) : n.concat(`--${f}${p}: ${t};
|
|
358
|
-
`);
|
|
359
|
-
}, "");
|
|
360
|
-
return l.reduce((d, f) => {
|
|
361
|
-
const n = a[f];
|
|
362
|
-
return typeof n == "object" ? d.concat(i(n, f)) : d.concat(`--${f.replace(/_/g, "-")}: ${n};
|
|
363
|
-
`);
|
|
364
|
-
}, "");
|
|
365
262
|
};
|
|
366
|
-
g(o.light), g(o.dark), g(o.primary), g(e), g(c), g(r);
|
|
367
|
-
const G = (a) => `var(--${a.replace(/_/g, "-")})`, u = (a, l) => `var(--${a}${l.replace(/_/g, "-")})`, y = (a, l) => `${a.replace(/_/g, "-")}, ${l})`.replace(/(\))(\\,)/, "$2").replace(/(\d.)/g, "-$1"), h = Object.keys(o.light);
|
|
368
|
-
h.reduce((a, l) => {
|
|
369
|
-
const i = o.light[l];
|
|
370
|
-
if (typeof i != "string") {
|
|
371
|
-
const d = Object.keys(i).reduce((f, n) => {
|
|
372
|
-
const p = i[n];
|
|
373
|
-
return f[n] = Array.isArray(p) ? y(u(l, n.replace(/_/g, "-").replace(/^[a-z]/, (t) => `-${t}`).replace(/([A-Z])/g, (t) => `-${t.toLocaleLowerCase()}`).replace(/(\d.)/g, "-$1")), p[1]) : u(l, n.replace(/_/g, "-").replace(/^[a-z]/, (t) => `-${t}`).replace(/([A-Z])/g, (t) => `-${t.toLocaleLowerCase()}`).replace(/(\d.)/g, "-$1")), f;
|
|
374
|
-
}, {});
|
|
375
|
-
return a[l] = d, a;
|
|
376
|
-
}
|
|
377
|
-
return a[l] = G(l), a;
|
|
378
|
-
}, {});
|
|
379
263
|
export {
|
|
380
264
|
e as B,
|
|
381
|
-
|
|
382
|
-
r as T
|
|
383
|
-
o as c
|
|
265
|
+
f as S,
|
|
266
|
+
r as T
|
|
384
267
|
};
|
package/dist/calendar.js
CHANGED
|
@@ -2,7 +2,7 @@ import { c as xe, j as $ } from "./compiler-runtime-BFrE5JtX.js";
|
|
|
2
2
|
import S, { useLayoutEffect as In, useEffect as ee, useRef as J, useCallback as ve, useMemo as ie, useState as _e, createContext as gt, memo as Hn, useReducer as zn, useContext as ht } from "react";
|
|
3
3
|
import { a as pt, g as Yt, c as Ft } from "./bind-D3ZJ5k4I.js";
|
|
4
4
|
import C from "dayjs";
|
|
5
|
-
import { a as dn } from "./Icon-
|
|
5
|
+
import { a as dn } from "./Icon-DEdvzMs-.js";
|
|
6
6
|
import { unstable_batchedUpdates as xt, createPortal as Pn } from "react-dom";
|
|
7
7
|
import { u as Bn } from "./usePopper-DvYrGFkh.js";
|
|
8
8
|
const jn = "_CaledarRoot_1715d_3", Fn = "_CalendarHeaderDate_1715d_9", Wn = "_CalendarDayTextList_1715d_27", Xn = "_CalednarDayTextColumn_1715d_34", Vn = "_sunday_1715d_57", Un = "_saturday_1715d_60", Zn = "_CalendarBody_1715d_63", qn = "_CalendarBodyColumn_1715d_67", Gn = "_selected_1715d_76", Kn = "_between_1715d_79", Jn = "_start_1715d_82", Qn = "_end_1715d_91", er = "_both_1715d_100", tr = "_today_1715d_103", nr = "_CalendarBodyColumnText_1715d_116", rr = {
|
|
@@ -442,7 +442,7 @@ const dr = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "
|
|
|
442
442
|
excludeDates: c,
|
|
443
443
|
minDate: l,
|
|
444
444
|
maxDate: u
|
|
445
|
-
} = S.
|
|
445
|
+
} = S.use(je), {
|
|
446
446
|
currentWeekFirst: d,
|
|
447
447
|
currentMonthFirst: h,
|
|
448
448
|
calendarType: g,
|
|
@@ -450,7 +450,7 @@ const dr = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "
|
|
|
450
450
|
isWeekDay: f,
|
|
451
451
|
isMondayStart: m,
|
|
452
452
|
selectedDate: D
|
|
453
|
-
} = S.
|
|
453
|
+
} = S.use(je);
|
|
454
454
|
let y;
|
|
455
455
|
if (Array.isArray(D)) {
|
|
456
456
|
const x = D[0] || "", T = D[1] || "";
|
|
@@ -554,7 +554,7 @@ const dr = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "
|
|
|
554
554
|
addWeek: c,
|
|
555
555
|
maxDate: l,
|
|
556
556
|
currentMonthFirst: u
|
|
557
|
-
} = S.
|
|
557
|
+
} = S.use(je);
|
|
558
558
|
let d;
|
|
559
559
|
e[0] !== i || e[1] !== c || e[2] !== a || e[3] !== s ? (d = () => {
|
|
560
560
|
a === "month" ? i(s) : c(s);
|
|
@@ -580,7 +580,7 @@ const dr = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "
|
|
|
580
580
|
subtractMonth: c,
|
|
581
581
|
minDate: l,
|
|
582
582
|
currentMonthFirst: u
|
|
583
|
-
} = S.
|
|
583
|
+
} = S.use(je);
|
|
584
584
|
let d;
|
|
585
585
|
e[0] !== a || e[1] !== s || e[2] !== c || e[3] !== i ? (d = () => {
|
|
586
586
|
a === "month" ? c(s) : i(s);
|
|
@@ -606,7 +606,7 @@ const dr = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "
|
|
|
606
606
|
isWeekend: s,
|
|
607
607
|
isMondayStart: a,
|
|
608
608
|
lang: i
|
|
609
|
-
} = S.
|
|
609
|
+
} = S.use(je), c = S.useMemo(() => {
|
|
610
610
|
const l = [];
|
|
611
611
|
if (!o && !s)
|
|
612
612
|
return [];
|
|
@@ -641,7 +641,7 @@ const dr = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "
|
|
|
641
641
|
format: r
|
|
642
642
|
} = t, o = r === void 0 ? "YYYY-MM" : r, {
|
|
643
643
|
currentDate: s
|
|
644
|
-
} = S.
|
|
644
|
+
} = S.use(je);
|
|
645
645
|
let a;
|
|
646
646
|
e[0] !== n ? (a = Ie("CalendarHeaderDate", n), e[0] = n, e[1] = a) : a = e[1];
|
|
647
647
|
let i;
|
|
@@ -3602,7 +3602,7 @@ const he = Ft.bind(so), Hs = (t) => {
|
|
|
3602
3602
|
popperOffset: g,
|
|
3603
3603
|
eventItemAs: p,
|
|
3604
3604
|
eventItemPopperAs: f
|
|
3605
|
-
} = S.
|
|
3605
|
+
} = S.use(rt), {
|
|
3606
3606
|
setNodeRef: m,
|
|
3607
3607
|
listeners: D,
|
|
3608
3608
|
attributes: y,
|
|
@@ -3791,7 +3791,7 @@ const he = Ft.bind(so), Hs = (t) => {
|
|
|
3791
3791
|
enableCreateByDrag: i,
|
|
3792
3792
|
itemHeight: c,
|
|
3793
3793
|
type: l
|
|
3794
|
-
} = S.
|
|
3794
|
+
} = S.use(rt), u = a === void 0 ? [] : a, d = c === void 0 ? 48 : c, h = l === void 0 ? "default" : l, [g, p] = S.useState(null), [f, m] = S.useState(null);
|
|
3795
3795
|
let D;
|
|
3796
3796
|
e[0] !== n ? (D = {
|
|
3797
3797
|
id: n
|
|
@@ -3956,7 +3956,7 @@ ${$t} ~ ${Ke}`, Le = P && i;
|
|
|
3956
3956
|
columnCount: r,
|
|
3957
3957
|
minHour: o,
|
|
3958
3958
|
maxHour: s
|
|
3959
|
-
} = S.
|
|
3959
|
+
} = S.use(rt), a = Array.from({
|
|
3960
3960
|
length: r
|
|
3961
3961
|
}, (l, u) => ({
|
|
3962
3962
|
date: C(n).add(u, "day").format("YYYY-MM-DD"),
|
|
@@ -3972,7 +3972,7 @@ ${$t} ~ ${Ke}`, Le = P && i;
|
|
|
3972
3972
|
const {
|
|
3973
3973
|
currentDate: t = C().format("YYYY-MM-DD"),
|
|
3974
3974
|
columnCount: e
|
|
3975
|
-
} = S.
|
|
3975
|
+
} = S.use(rt), n = Array.from({
|
|
3976
3976
|
length: e
|
|
3977
3977
|
}, (r, o) => ({
|
|
3978
3978
|
realDate: C(t).add(o, "day"),
|
|
@@ -3998,7 +3998,7 @@ ${$t} ~ ${Ke}`, Le = P && i;
|
|
|
3998
3998
|
maxHour: s,
|
|
3999
3999
|
itemHeight: a,
|
|
4000
4000
|
type: i
|
|
4001
|
-
} = S.
|
|
4001
|
+
} = S.use(rt), c = a === void 0 ? 48 : a, l = i === void 0 ? "default" : i, u = s - o;
|
|
4002
4002
|
let d;
|
|
4003
4003
|
if (e[0] !== r || e[1] !== n || e[2] !== u || e[3] !== c || e[4] !== s || e[5] !== o || e[6] !== l) {
|
|
4004
4004
|
const h = Array.from({
|
package/dist/chart.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer Chart{._ChartFrame_1t22s_2{position:relative;width:100%}._ChartState_1t22s_6{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:160px;color:var(--chartLabel, #637381);font:inherit}}
|
package/dist/chart.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export {};
|
|
1
|
+
export { default as BarChart } from '../components/Chart/charts/BarChart';
|
|
2
|
+
export { default as LineChart } from '../components/Chart/charts/LineChart';
|
|
3
|
+
export { default as PieChart } from '../components/Chart/charts/PieChart';
|
|
4
|
+
export { default as DoughnutChart } from '../components/Chart/charts/DoughnutChart';
|
|
5
|
+
export { default as RadarChart } from '../components/Chart/charts/RadarChart';
|
|
6
|
+
export { ChartThemeProvider } from '../components/Chart/Chart.theme';
|
|
7
|
+
export type { BarChartProps, LineChartProps, PieChartProps, DoughnutChartProps, RadarChartProps, ChartBaseProps, AxisConfig, ChartThemeValue, ChartPreset, ChartStyleDefaults, SimpleDatum, ChartSeries, SeriesData, CategoricalData, ProportionData, PaletteInput, } from '../components/Chart/Chart.type';
|