@code0-tech/pictor 0.10.1 → 0.10.3
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
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code0-tech/pictor",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"scripts": {
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
97
97
|
"vitest": "^4.1.2",
|
|
98
98
|
"motion": "^12.40.0",
|
|
99
|
-
"zustand": "^
|
|
99
|
+
"zustand": "^4.3.0"
|
|
100
100
|
},
|
|
101
101
|
"main": "dist/index.js",
|
|
102
102
|
"repository": {
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"react-zoom-pan-pinch": "^3.7.0",
|
|
143
143
|
"sonner": "^2.0.7",
|
|
144
144
|
"motion": "^12.40.0",
|
|
145
|
-
"zustand": "
|
|
145
|
+
"zustand": ">=4.3.0 <5.0.0"
|
|
146
146
|
},
|
|
147
147
|
"publishConfig": {
|
|
148
148
|
"access": "public"
|