cytur-design-system 0.7.0 → 0.7.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/dist/index.js +31 -30
- package/dist/types/lib.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { forwardRef as e, useEffect as t } from "react";
|
|
2
|
-
import { Alert as n, App as r, AutoComplete as i, Avatar as a, Badge as o, Breadcrumb as s, Button as c, Button as l, Card as u, Card as ee, Checkbox as d, Col as f, ConfigProvider as p, ConfigProvider as m, DatePicker as te, Descriptions as ne, Divider as re, Drawer as ie, Dropdown as ae, Empty as oe,
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import
|
|
2
|
+
import { Alert as n, App as r, AutoComplete as i, Avatar as a, Badge as o, Breadcrumb as s, Button as c, Button as l, Card as u, Card as ee, Checkbox as d, Col as f, ConfigProvider as p, ConfigProvider as m, DatePicker as te, Descriptions as ne, Divider as re, Drawer as ie, Dropdown as ae, Empty as oe, Empty as se, Flex as h, Form as g, Input as ce, InputNumber as le, Layout as ue, List as de, Menu as fe, Modal as pe, Pagination as me, Popconfirm as he, Popover as ge, Progress as _e, Radio as ve, Result as ye, Row as be, Select as xe, Skeleton as _, Skeleton as v, Slider as y, Space as b, Space as x, Spin as S, Spin as C, Statistic as w, Steps as T, Switch as E, Table as D, Table as O, Tabs as k, Tag as A, Tag as j, TimePicker as M, Tooltip as Se, Tree as Ce, Typography as we, Typography as N, Upload as Te, message as Ee, notification as P, theme as De, theme as F } from "antd";
|
|
3
|
+
import { Fragment as Oe, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
4
|
+
import * as ke from "@ant-design/icons";
|
|
5
|
+
import { DownloadOutlined as Ae, NotificationOutlined as je, SettingOutlined as Me } from "@ant-design/icons";
|
|
5
6
|
//#region src/theme/index.ts
|
|
6
7
|
var R = {
|
|
7
8
|
fontFamily: "\"Pretendard\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
@@ -66,7 +67,7 @@ var R = {
|
|
|
66
67
|
colorLinkActive: "#3730a3"
|
|
67
68
|
},
|
|
68
69
|
components: z
|
|
69
|
-
},
|
|
70
|
+
}, Ne = B, U = {
|
|
70
71
|
base: B,
|
|
71
72
|
rm: V,
|
|
72
73
|
csc: H
|
|
@@ -223,7 +224,7 @@ var R = {
|
|
|
223
224
|
"color-gray-900": "#111827",
|
|
224
225
|
"color-yellow-50": "#fffbeb",
|
|
225
226
|
"color-yellow-500": "#f59e0b"
|
|
226
|
-
},
|
|
227
|
+
}, Pe = {
|
|
227
228
|
...W,
|
|
228
229
|
"action-primary": "#3b82f6",
|
|
229
230
|
"action-primary-hover": "#5899f5",
|
|
@@ -260,7 +261,7 @@ var R = {
|
|
|
260
261
|
"color-gray-700": "#e2e6ea",
|
|
261
262
|
"color-gray-800": "#f1f3f5",
|
|
262
263
|
"color-gray-900": "#f8fafb"
|
|
263
|
-
},
|
|
264
|
+
}, Fe = (e, t) => {
|
|
264
265
|
let n = (e) => Object.entries(e).map(([e, t]) => ` --cytur-${e}: ${t};`).join("\n");
|
|
265
266
|
return `
|
|
266
267
|
:root, [data-mode="light"] {
|
|
@@ -270,13 +271,13 @@ ${n(e)}
|
|
|
270
271
|
${n(t)}
|
|
271
272
|
}
|
|
272
273
|
`.trim();
|
|
273
|
-
}, G = "__cytur_tokens__",
|
|
274
|
+
}, G = "__cytur_tokens__", Ie = () => {
|
|
274
275
|
if (typeof document > "u") return;
|
|
275
276
|
let e = document.getElementById(G);
|
|
276
|
-
e || (e = document.createElement("style"), e.id = G, document.head.appendChild(e)), e.innerHTML =
|
|
277
|
+
e || (e = document.createElement("style"), e.id = G, document.head.appendChild(e)), e.innerHTML = Fe(W, Pe);
|
|
277
278
|
}, K = ({ theme: e = "base", mode: n = "light", children: r }) => {
|
|
278
279
|
t(() => {
|
|
279
|
-
|
|
280
|
+
Ie();
|
|
280
281
|
}, []), t(() => {
|
|
281
282
|
typeof document < "u" && (document.documentElement.dataset.mode = n);
|
|
282
283
|
}, [n]);
|
|
@@ -293,7 +294,7 @@ ${n(t)}
|
|
|
293
294
|
theme: {
|
|
294
295
|
...U[e],
|
|
295
296
|
...i,
|
|
296
|
-
algorithm: n === "dark" ?
|
|
297
|
+
algorithm: n === "dark" ? F.darkAlgorithm : F.defaultAlgorithm
|
|
297
298
|
},
|
|
298
299
|
children: r
|
|
299
300
|
});
|
|
@@ -301,7 +302,7 @@ ${n(t)}
|
|
|
301
302
|
K.displayName = "CyturProvider";
|
|
302
303
|
//#endregion
|
|
303
304
|
//#region src/theme/tokens.ts
|
|
304
|
-
var q = (e) => `var(--cytur-${e})`,
|
|
305
|
+
var q = (e) => `var(--cytur-${e})`, Le = {
|
|
305
306
|
label: {
|
|
306
307
|
default: {
|
|
307
308
|
bg: {
|
|
@@ -556,7 +557,7 @@ var q = (e) => `var(--cytur-${e})`, Ne = {
|
|
|
556
557
|
500: q("color-yellow-500")
|
|
557
558
|
}
|
|
558
559
|
}
|
|
559
|
-
},
|
|
560
|
+
}, Re = {
|
|
560
561
|
close: {
|
|
561
562
|
viewBox: "0 0 20 20",
|
|
562
563
|
paths: ["M16 5.20857L14.7914 4L10 8.79143L5.20857 4L4 5.20857L8.79143 10L4 14.7914L5.20857 16L10 11.2086L14.7914 16L16 14.7914L11.2086 10L16 5.20857Z"]
|
|
@@ -645,13 +646,13 @@ var q = (e) => `var(--cytur-${e})`, Ne = {
|
|
|
645
646
|
viewBox: "0 0 20 20",
|
|
646
647
|
paths: ["M10 3L6.5 6.5L7.5 7.5L10 5L12.5 7.5L13.5 6.5L10 3Z", "M10 17L13.5 13.5L12.5 12.5L10 15L7.5 12.5L6.5 13.5L10 17Z"]
|
|
647
648
|
}
|
|
648
|
-
},
|
|
649
|
+
}, ze = {
|
|
649
650
|
xs: 10,
|
|
650
651
|
sm: 16,
|
|
651
652
|
md: 20,
|
|
652
653
|
lg: 24
|
|
653
654
|
}, J = e(({ name: e, size: t = "md", color: n = "currentColor", style: r, ...i }, a) => {
|
|
654
|
-
let o = typeof t == "number" ? t :
|
|
655
|
+
let o = typeof t == "number" ? t : ze[t], s = Re[e];
|
|
655
656
|
return /* @__PURE__ */ I("svg", {
|
|
656
657
|
ref: a,
|
|
657
658
|
width: o,
|
|
@@ -675,16 +676,16 @@ var q = (e) => `var(--cytur-${e})`, Ne = {
|
|
|
675
676
|
J.displayName = "Icon";
|
|
676
677
|
//#endregion
|
|
677
678
|
//#region src/components/icon-button/IconButton.tsx
|
|
678
|
-
var
|
|
679
|
+
var Be = {
|
|
679
680
|
sm: 28,
|
|
680
681
|
md: 32,
|
|
681
682
|
lg: 36
|
|
682
|
-
},
|
|
683
|
+
}, Ve = {
|
|
683
684
|
sm: 16,
|
|
684
685
|
md: 20,
|
|
685
686
|
lg: 24
|
|
686
687
|
}, Y = e(({ size: e = "md", icon: t, style: n, ...r }, i) => {
|
|
687
|
-
let a =
|
|
688
|
+
let a = Be[e], o = Ve[e];
|
|
688
689
|
return /* @__PURE__ */ I(l, {
|
|
689
690
|
ref: i,
|
|
690
691
|
type: "text",
|
|
@@ -709,7 +710,7 @@ var Ie = {
|
|
|
709
710
|
Y.displayName = "IconButton";
|
|
710
711
|
//#endregion
|
|
711
712
|
//#region src/components/alert-feed/AlertFeed.tsx
|
|
712
|
-
var
|
|
713
|
+
var He = {
|
|
713
714
|
emergency: "red",
|
|
714
715
|
alarm: "orange",
|
|
715
716
|
warning: "gold",
|
|
@@ -729,14 +730,14 @@ var Re = {
|
|
|
729
730
|
}, p = a === "all" ? n : n.filter((e) => e.severity === a), m = d ?? (c && /* @__PURE__ */ I(l, {
|
|
730
731
|
type: "text",
|
|
731
732
|
size: "small",
|
|
732
|
-
icon: /* @__PURE__ */ I(
|
|
733
|
+
icon: /* @__PURE__ */ I(Me, {}),
|
|
733
734
|
onClick: c
|
|
734
735
|
}));
|
|
735
736
|
return /* @__PURE__ */ I(ee, {
|
|
736
|
-
title: /* @__PURE__ */ L(
|
|
737
|
+
title: /* @__PURE__ */ L(x, {
|
|
737
738
|
size: 6,
|
|
738
739
|
children: [
|
|
739
|
-
/* @__PURE__ */ I(
|
|
740
|
+
/* @__PURE__ */ I(je, { style: { fontSize: 16 } }),
|
|
740
741
|
/* @__PURE__ */ I("span", {
|
|
741
742
|
style: {
|
|
742
743
|
fontSize: 14,
|
|
@@ -773,13 +774,13 @@ var Re = {
|
|
|
773
774
|
onClick: s,
|
|
774
775
|
children: u
|
|
775
776
|
}, "view-all")] : void 0,
|
|
776
|
-
children: r ? /* @__PURE__ */ I(
|
|
777
|
+
children: r ? /* @__PURE__ */ I(v, {
|
|
777
778
|
active: !0,
|
|
778
779
|
paragraph: { rows: 6 }
|
|
779
|
-
}) : /* @__PURE__ */ L(
|
|
780
|
+
}) : /* @__PURE__ */ L(Oe, { children: [/* @__PURE__ */ I(x, {
|
|
780
781
|
size: 4,
|
|
781
782
|
wrap: !0,
|
|
782
|
-
children: Object.entries(f).map(([e, t]) => /* @__PURE__ */ I(
|
|
783
|
+
children: Object.entries(f).map(([e, t]) => /* @__PURE__ */ I(j.CheckableTag, {
|
|
783
784
|
checked: a === e,
|
|
784
785
|
onChange: () => o?.(e),
|
|
785
786
|
style: { margin: 0 },
|
|
@@ -794,7 +795,7 @@ var Re = {
|
|
|
794
795
|
flexDirection: "column",
|
|
795
796
|
gap: 6
|
|
796
797
|
},
|
|
797
|
-
children: p.length === 0 ? /* @__PURE__ */ I(
|
|
798
|
+
children: p.length === 0 ? /* @__PURE__ */ I(se, {
|
|
798
799
|
description: n.length === 0 ? "No alerts" : "No matching alerts",
|
|
799
800
|
style: { margin: "auto" }
|
|
800
801
|
}) : p.map((e) => /* @__PURE__ */ L("div", {
|
|
@@ -813,8 +814,8 @@ var Re = {
|
|
|
813
814
|
justifyContent: "space-between",
|
|
814
815
|
alignItems: "center"
|
|
815
816
|
},
|
|
816
|
-
children: [/* @__PURE__ */ I(
|
|
817
|
-
color:
|
|
817
|
+
children: [/* @__PURE__ */ I(j, {
|
|
818
|
+
color: He[e.severity],
|
|
818
819
|
style: { margin: 0 },
|
|
819
820
|
children: X[e.severity]
|
|
820
821
|
}), /* @__PURE__ */ I(N.Text, {
|
|
@@ -857,7 +858,7 @@ var Q = ({ state: e = "default", children: t, style: n, ...r }) => {
|
|
|
857
858
|
lineHeight: "18px",
|
|
858
859
|
...n
|
|
859
860
|
},
|
|
860
|
-
children: [i ? /* @__PURE__ */ I(
|
|
861
|
+
children: [i ? /* @__PURE__ */ I(C, { size: "small" }) : /* @__PURE__ */ I(Ae, {}), t]
|
|
861
862
|
});
|
|
862
863
|
};
|
|
863
864
|
Q.displayName = "File";
|
|
@@ -885,7 +886,7 @@ function $({ columns: e, data: t, rowKey: n = "id", pagination: r = !1, pageSize
|
|
|
885
886
|
value: e
|
|
886
887
|
})), u.onFilter = (e, t) => String(t[l] ?? "") === e), u;
|
|
887
888
|
});
|
|
888
|
-
return /* @__PURE__ */ I(
|
|
889
|
+
return /* @__PURE__ */ I(O, {
|
|
889
890
|
...c,
|
|
890
891
|
columns: l,
|
|
891
892
|
dataSource: t,
|
|
@@ -901,4 +902,4 @@ function $({ columns: e, data: t, rowKey: n = "id", pagination: r = !1, pageSize
|
|
|
901
902
|
}
|
|
902
903
|
$.displayName = "DataTable";
|
|
903
904
|
//#endregion
|
|
904
|
-
export { n as Alert, Z as AlertFeed, r as App, i as AutoComplete, a as Avatar, o as Badge, s as Breadcrumb, c as Button, u as Card, d as Checkbox, f as Col, p as ConfigProvider, K as CyturProvider, $ as DataTable, te as DatePicker, ne as Descriptions, re as Divider, ie as Drawer, ae as Dropdown, Q as File,
|
|
905
|
+
export { n as Alert, Z as AlertFeed, r as App, i as AutoComplete, a as Avatar, o as Badge, s as Breadcrumb, c as Button, u as Card, d as Checkbox, f as Col, p as ConfigProvider, K as CyturProvider, $ as DataTable, te as DatePicker, ne as Descriptions, re as Divider, ie as Drawer, ae as Dropdown, oe as Empty, Q as File, h as Flex, g as Form, J as Icon, Y as IconButton, ke as Icons, ce as Input, le as InputNumber, ue as Layout, de as List, fe as Menu, pe as Modal, me as Pagination, he as Popconfirm, ge as Popover, _e as Progress, ve as Radio, ye as Result, be as Row, xe as Select, _ as Skeleton, y as Slider, b as Space, S as Spin, w as Statistic, T as Steps, E as Switch, D as Table, k as Tabs, A as Tag, M as TimePicker, Se as Tooltip, Ce as Tree, we as Typography, Te as Upload, B as baseTheme, H as cscTheme, Ne as defaultTheme, Ee as message, P as notification, V as rmTheme, De as theme, U as themes, Le as tokens };
|
package/dist/types/lib.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export { IconButton, type IconButtonProps, type IconButtonSize } from './compone
|
|
|
6
6
|
export { AlertFeed, type AlertFeedProps, type AlertItem, type AlertSeverity } from './components/alert-feed/AlertFeed';
|
|
7
7
|
export { File, type FileProps, type FileState } from './components/file/File';
|
|
8
8
|
export { DataTable, type DataTableProps, type DataTableColumn } from './components/data-table/DataTable';
|
|
9
|
-
export { Button, Input, InputNumber, Select, AutoComplete, Checkbox, Radio, Switch, Slider, DatePicker, TimePicker, Form, Upload, Table, Tag, Badge, Avatar, Card, Descriptions, List, Tabs, Pagination, Tree, Tooltip, Popover, Popconfirm, Modal, Drawer, Dropdown, Menu, Breadcrumb, Steps, Alert, Progress, Result, Skeleton, Spin, Typography, Space, Divider, Flex, Row, Col, Layout, ConfigProvider, App, message, notification, } from 'antd';
|
|
9
|
+
export { Button, Input, InputNumber, Select, AutoComplete, Checkbox, Radio, Switch, Slider, DatePicker, TimePicker, Form, Upload, Table, Tag, Badge, Avatar, Card, Descriptions, List, Tabs, Pagination, Tree, Tooltip, Popover, Popconfirm, Modal, Drawer, Dropdown, Menu, Breadcrumb, Steps, Alert, Progress, Result, Skeleton, Spin, Typography, Space, Divider, Flex, Row, Col, Layout, ConfigProvider, App, message, notification, Statistic, Empty, theme, } from 'antd';
|
|
10
|
+
export * as Icons from '@ant-design/icons';
|