@weing-dev/ui-kit-primitive 0.4.6 → 0.5.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 (50) hide show
  1. package/README.md +6 -0
  2. package/dist/{Icon-DExqF865.js → Icon-DEdvzMs-.js} +1 -1
  3. package/dist/{color-B71xRiyK.js → baseColor-DYa5_IOB.js} +3 -120
  4. package/dist/calendar.js +12 -12
  5. package/dist/chart.css +1 -0
  6. package/dist/chart.d.ts +6 -2
  7. package/dist/chart.js +532 -85
  8. package/dist/color-qJrSCDan.js +155 -0
  9. package/dist/components/Calendar/Calendar.d.ts +1 -55
  10. package/dist/components/Calendar/Calendar.type.d.ts +61 -0
  11. package/dist/components/Cascader/Cascader.d.ts +2 -36
  12. package/dist/components/Cascader/Cascader.type.d.ts +37 -0
  13. package/dist/components/Chart/Chart.context.d.ts +9 -0
  14. package/dist/components/Chart/Chart.hooks.d.ts +4 -0
  15. package/dist/components/Chart/Chart.options.d.ts +24 -0
  16. package/dist/components/Chart/Chart.palette.d.ts +20 -0
  17. package/dist/components/Chart/Chart.preset.d.ts +7 -0
  18. package/dist/components/Chart/Chart.register.d.ts +1 -0
  19. package/dist/components/Chart/Chart.style.d.ts +21 -0
  20. package/dist/components/Chart/Chart.theme.d.ts +9 -0
  21. package/dist/components/Chart/Chart.type.d.ts +114 -0
  22. package/dist/components/Chart/ChartFrame.d.ts +14 -0
  23. package/dist/components/Chart/ChartRenderer.d.ts +11 -0
  24. package/dist/components/Chart/charts/BarChart.d.ts +3 -0
  25. package/dist/components/Chart/charts/DoughnutChart.d.ts +3 -0
  26. package/dist/components/Chart/charts/LineChart.d.ts +3 -0
  27. package/dist/components/Chart/charts/PieChart.d.ts +3 -0
  28. package/dist/components/Form/Dropdown/Dropdown.d.ts +1 -47
  29. package/dist/components/Form/Dropdown/Dropdown.type.d.ts +48 -0
  30. package/dist/components/Form/TextArea/TextArea.d.ts +1 -18
  31. package/dist/components/Form/TextArea/TextArea.type.d.ts +19 -0
  32. package/dist/components/Form/TextInput/TextInput.d.ts +1 -17
  33. package/dist/components/Form/TextInput/TextInput.type.d.ts +18 -0
  34. package/dist/components/TimeInput/TimeInput.d.ts +1 -27
  35. package/dist/components/TimeInput/TimeInput.type.d.ts +27 -0
  36. package/dist/display.js +23 -22
  37. package/dist/entry/chart.d.ts +6 -2
  38. package/dist/entry/components.d.ts +1 -2
  39. package/dist/feedback.js +2 -2
  40. package/dist/form.js +463 -462
  41. package/dist/icon.js +2 -2
  42. package/dist/index.js +3806 -3862
  43. package/dist/index.umd.cjs +24 -24
  44. package/dist/navigation.js +41 -40
  45. package/dist/styles/color.d.ts +30 -0
  46. package/dist/video-player.js +83 -83
  47. package/docs/subpath-imports.md +80 -0
  48. package/package.json +3 -2
  49. package/dist/components/Chart/Chart.d.ts +0 -19
  50. /package/dist/components/Cascader/{Cacader.data.d.ts → Cascader.data.d.ts} +0 -0
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ # `@weing-dev/ui-kit-primitive`
2
+
3
+ 외부 프로젝트에서 **패키지 서브패스별로 무엇을 import 할지** 정리한 문서: [서브패스 import 가이드](./docs/subpath-imports.md).
4
+
5
+ ---
6
+
1
7
  # React + TypeScript + Vite
2
8
 
3
9
  This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
@@ -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.useContext(_2);
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
- }, c = {
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
- c as S,
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-DExqF865.js";
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.useContext(je), {
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.useContext(je);
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.useContext(je);
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.useContext(je);
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.useContext(je), c = S.useMemo(() => {
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.useContext(je);
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.useContext(rt), {
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.useContext(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);
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.useContext(rt), a = Array.from({
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.useContext(rt), n = Array.from({
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.useContext(rt), c = a === void 0 ? 48 : a, l = i === void 0 ? "default" : i, u = s - o;
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,6 @@
1
- export { default as Chart } from '../components/Chart/Chart';
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 { ChartThemeProvider } from '../components/Chart/Chart.theme';
6
+ export type { BarChartProps, LineChartProps, PieChartProps, DoughnutChartProps, ChartBaseProps, ChartThemeValue, ChartPreset, ChartStyleDefaults, SimpleDatum, ChartSeries, SeriesData, CategoricalData, ProportionData, PaletteInput, } from '../components/Chart/Chart.type';