@code0-tech/pictor 0.10.0 → 0.10.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.
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
|
-
import { mergeComponentProps as
|
|
4
|
+
import { mergeComponentProps as a } from "../../utils/component.js";
|
|
5
5
|
import "js-md5";
|
|
6
6
|
import '../../assets/components/breadcrumb/Breadcrumb.style.css';/* empty css */
|
|
7
|
-
import { IconChevronRight as
|
|
8
|
-
const j = (
|
|
7
|
+
import { IconChevronRight as d } from "@tabler/icons-react";
|
|
8
|
+
const j = (i) => {
|
|
9
9
|
const {
|
|
10
|
-
splitter:
|
|
11
|
-
children:
|
|
12
|
-
...
|
|
13
|
-
} =
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
] },
|
|
10
|
+
splitter: m = /* @__PURE__ */ t(d, { size: 16 }),
|
|
11
|
+
children: l,
|
|
12
|
+
...c
|
|
13
|
+
} = i, e = n.Children.toArray(l).filter((r) => r != null), s = e.length;
|
|
14
|
+
return /* @__PURE__ */ t("div", { ...a("breadcrumb", c), children: e.map((r, o) => /* @__PURE__ */ p(n.Fragment, { children: [
|
|
15
|
+
r,
|
|
16
|
+
o < s - 1 ? /* @__PURE__ */ t("span", { className: "breadcrumb__splitter", children: m }) : null
|
|
17
|
+
] }, o)) });
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
20
|
j as Breadcrumb
|
|
@@ -2,7 +2,7 @@ import { default as React, ReactElement } from 'react';
|
|
|
2
2
|
import { ButtonProps } from '../button/Button';
|
|
3
3
|
import { Component, Color } from '../../utils';
|
|
4
4
|
export interface ButtonGroupType extends Component<HTMLDivElement> {
|
|
5
|
-
children: ReactElement<ButtonProps>[];
|
|
5
|
+
children: ReactElement<ButtonProps> | ReactElement<ButtonProps>[];
|
|
6
6
|
color?: Color;
|
|
7
7
|
}
|
|
8
8
|
export declare const ButtonGroup: React.FC<ButtonGroupType>;
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { c as _ } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import b from "react";
|
|
3
4
|
import '../../assets/components/button-group/ButtonGroup.style.css';/* empty css */
|
|
4
5
|
import "../../utils/contextStore.js";
|
|
5
|
-
import "
|
|
6
|
-
import { mergeComponentProps as c } from "../../utils/component.js";
|
|
6
|
+
import { mergeComponentProps as h } from "../../utils/component.js";
|
|
7
7
|
import "js-md5";
|
|
8
|
-
const
|
|
9
|
-
const t =
|
|
8
|
+
const B = (e) => {
|
|
9
|
+
const t = _.c(8);
|
|
10
10
|
let o, r;
|
|
11
|
-
if (t[0] !==
|
|
11
|
+
if (t[0] !== e) {
|
|
12
12
|
const {
|
|
13
|
-
children:
|
|
14
|
-
color:
|
|
15
|
-
...
|
|
16
|
-
} =
|
|
17
|
-
o =
|
|
13
|
+
children: f,
|
|
14
|
+
color: m,
|
|
15
|
+
...a
|
|
16
|
+
} = e, d = m === void 0 ? "secondary" : m, s = b.Children.toArray(f).filter(v), l = s.length;
|
|
17
|
+
o = h(`button-group button-group--${d}`, a);
|
|
18
|
+
let i;
|
|
19
|
+
t[3] !== l ? (i = (g, u) => {
|
|
20
|
+
let c = "button-group__item";
|
|
21
|
+
return u === l - 1 ? c = "button-group__last" : u === 0 && (c = "button-group__first"), /* @__PURE__ */ p("div", { className: c, children: g }, `button-group-${u}`);
|
|
22
|
+
}, t[3] = l, t[4] = i) : i = t[4], r = s.map(i), t[0] = e, t[1] = o, t[2] = r;
|
|
18
23
|
} else
|
|
19
24
|
o = t[1], r = t[2];
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
let n;
|
|
23
|
-
t[5] !== o.length ? (n = (i, l) => /* @__PURE__ */ s("div", { className: `${l == 0 || l == o.length - 1 ? l == 0 ? "button-group__first" : "button-group__last" : "button-group__item"}`, children: i }, i.key ?? `button-group-${l}`), t[5] = o.length, t[6] = n) : n = t[6], e = o.map(n), t[3] = o, t[4] = e;
|
|
24
|
-
} else
|
|
25
|
-
e = t[4];
|
|
26
|
-
let m;
|
|
27
|
-
return t[7] !== r || t[8] !== e ? (m = /* @__PURE__ */ s("div", { ...r, children: e }), t[7] = r, t[8] = e, t[9] = m) : m = t[9], m;
|
|
25
|
+
let n;
|
|
26
|
+
return t[5] !== o || t[6] !== r ? (n = /* @__PURE__ */ p("div", { ...o, children: r }), t[5] = o, t[6] = r, t[7] = n) : n = t[7], n;
|
|
28
27
|
};
|
|
28
|
+
function v(e) {
|
|
29
|
+
return e != null;
|
|
30
|
+
}
|
|
29
31
|
export {
|
|
30
|
-
|
|
32
|
+
B as ButtonGroup
|
|
31
33
|
};
|
|
@@ -23,29 +23,29 @@ const t = n((o) => ({
|
|
|
23
23
|
}, B = (o) => {
|
|
24
24
|
t.getState().addToast({
|
|
25
25
|
icon: /* @__PURE__ */ e(r, { color: "#70ffb2", size: 16 }),
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
...o,
|
|
27
|
+
message: /* @__PURE__ */ e(s, { c: "#70ffb2", children: o.message })
|
|
28
28
|
});
|
|
29
29
|
}, F = (o) => {
|
|
30
30
|
t.getState().addToast({
|
|
31
31
|
icon: /* @__PURE__ */ e(l, { color: "#29BF12", size: 16 }),
|
|
32
|
-
message: /* @__PURE__ */ e(s, { c: "#29BF12", children: o.message }),
|
|
33
32
|
index: 1,
|
|
34
|
-
...o
|
|
33
|
+
...o,
|
|
34
|
+
message: /* @__PURE__ */ e(s, { c: "#29BF12", children: o.message })
|
|
35
35
|
});
|
|
36
36
|
}, S = (o) => {
|
|
37
37
|
t.getState().addToast({
|
|
38
38
|
icon: /* @__PURE__ */ e(m, { color: "#FFBE0B", size: 16 }),
|
|
39
|
-
message: /* @__PURE__ */ e(s, { c: "#FFBE0B", children: o.message }),
|
|
40
39
|
index: 2,
|
|
41
|
-
...o
|
|
40
|
+
...o,
|
|
41
|
+
message: /* @__PURE__ */ e(s, { c: "#FFBE0B", children: o.message })
|
|
42
42
|
});
|
|
43
43
|
}, h = (o) => {
|
|
44
44
|
t.getState().addToast({
|
|
45
45
|
icon: /* @__PURE__ */ e(d, { color: "#D90429", size: 16 }),
|
|
46
|
-
message: /* @__PURE__ */ e(s, { c: "#D90429", children: o.message }),
|
|
47
46
|
index: 3,
|
|
48
|
-
...o
|
|
47
|
+
...o,
|
|
48
|
+
message: /* @__PURE__ */ e(s, { c: "#D90429", children: o.message })
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
51
|
export {
|