@plitzi/sdk-style 0.32.14 → 0.32.16
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/CHANGELOG.md +20 -0
- package/dist/StyleAdvanceEditor.mjs +5 -5
- package/dist/StyleMap/StyleMap.mjs +1 -1
- package/dist/StyleMap/helpers/utils.mjs +10 -4
- package/dist/components/InputEasing/Curve.mjs +2 -2
- package/dist/components/InputEasing/Progress.mjs +2 -2
- package/dist/components/Selector/Selector.mjs +1 -5
- package/dist/components/StyleInspector/StyleInspectorProvider.mjs +30 -30
- package/dist/components/StyleInspector/categories/Background/Background.mjs +2 -2
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +33 -33
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +39 -36
- package/dist/components/StyleInspector/categories/Border/Border.mjs +2 -3
- package/dist/components/StyleInspector/categories/Border/BorderColor.mjs +7 -7
- package/dist/components/StyleInspector/categories/Border/BorderRadius.mjs +12 -12
- package/dist/components/StyleInspector/categories/Border/BorderStyle.mjs +7 -7
- package/dist/components/StyleInspector/categories/Border/BorderWidth.mjs +7 -7
- package/dist/components/StyleInspector/categories/Display/DisplayElements.mjs +49 -46
- package/dist/components/StyleInspector/categories/Display/DisplayFlex.mjs +41 -38
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignContent.mjs +44 -44
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignItems.mjs +38 -38
- package/dist/components/StyleInspector/categories/Display/DisplayFlexDirection.mjs +41 -38
- package/dist/components/StyleInspector/categories/Display/DisplayFlexJustify.mjs +38 -38
- package/dist/components/StyleInspector/categories/Display/DisplayGridTemplate.mjs +20 -20
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.mjs +49 -46
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +1 -1
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.mjs +29 -29
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +1 -1
- package/dist/components/StyleInspector/categories/List/List.mjs +47 -47
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +47 -47
- package/dist/components/StyleInspector/categories/Position/PositionAdvancedButtons.mjs +107 -107
- package/dist/components/StyleInspector/categories/Position/PositionClear.mjs +37 -34
- package/dist/components/StyleInspector/categories/Position/PositionFloat.mjs +31 -28
- package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +2 -2
- package/dist/components/StyleInspector/categories/Typography/TypographyAlign.mjs +37 -34
- package/dist/components/StyleManager/ManagerSelector.mjs +57 -57
- package/dist/helpers/processSelectorName.mjs +1 -4
- package/dist/models/SelectorForm/SelectorForm.mjs +2 -2
- package/package.json +5 -5
|
@@ -3,39 +3,42 @@ import t from "../../components/CategorySection/index.mjs";
|
|
|
3
3
|
import { useMemo as n } from "react";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/StyleInspector/categories/Typography/TypographyAlign.tsx
|
|
6
|
-
var i = ({ partialValue: i, onChange: a }) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
6
|
+
var i = ({ partialValue: i, onChange: a }) => {
|
|
7
|
+
let o = n(() => [
|
|
8
|
+
{
|
|
9
|
+
value: "left",
|
|
10
|
+
icon: "fa-solid fa-align-left",
|
|
11
|
+
description: "Left",
|
|
12
|
+
active: i === "left"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: "center",
|
|
16
|
+
icon: "fa-solid fa-align-center",
|
|
17
|
+
description: "Center",
|
|
18
|
+
active: i === "center"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: "right",
|
|
22
|
+
icon: "fa-solid fa-align-right",
|
|
23
|
+
description: "Right",
|
|
24
|
+
active: i === "right"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
value: "justify",
|
|
28
|
+
icon: "fa-solid fa-align-justify",
|
|
29
|
+
description: "Justify",
|
|
30
|
+
active: i === "justify"
|
|
31
|
+
}
|
|
32
|
+
], [i]);
|
|
33
|
+
return /* @__PURE__ */ r(t, {
|
|
34
|
+
label: "Align",
|
|
35
|
+
keys: ["text-align"],
|
|
36
|
+
children: /* @__PURE__ */ r(e, {
|
|
37
|
+
onChange: a,
|
|
38
|
+
type: "iconGroup",
|
|
39
|
+
items: o
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
};
|
|
40
43
|
//#endregion
|
|
41
44
|
export { i as default };
|
|
@@ -17,50 +17,50 @@ var y = n(({ displayMode: n, flatList: y, selectors: b, selected: x, onSelect: S
|
|
|
17
17
|
let n = Number(e.type === "element"), r = Number(t.type === "element");
|
|
18
18
|
return n === r ? e.name.localeCompare(t.name) : r - n;
|
|
19
19
|
});
|
|
20
|
-
}, [C, w]), M = i((e) => T(e), [T]),
|
|
20
|
+
}, [C, w]), M = i((e) => T(e), [T]), N = i((e, t) => {
|
|
21
|
+
if (t) if (t.mode === "default") {
|
|
22
|
+
let { name: e } = t;
|
|
23
|
+
O("styleAddSelector", n, e, "class", void 0, void 0, {
|
|
24
|
+
styleSelector: void 0,
|
|
25
|
+
componentType: void 0
|
|
26
|
+
});
|
|
27
|
+
} else {
|
|
28
|
+
let { componentType: e } = t;
|
|
29
|
+
O("styleAddSelector", n, e, "element", void 0, void 0, {
|
|
30
|
+
styleSelector: void 0,
|
|
31
|
+
componentType: e
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}, [O, n]), [P, F, I, L] = h({
|
|
21
35
|
id: "add-selector",
|
|
22
|
-
onClose:
|
|
23
|
-
|
|
24
|
-
let { name: e } = t;
|
|
25
|
-
O("styleAddSelector", n, e, "class", void 0, void 0, {
|
|
26
|
-
styleSelector: void 0,
|
|
27
|
-
componentType: void 0
|
|
28
|
-
});
|
|
29
|
-
} else {
|
|
30
|
-
let { componentType: e } = t;
|
|
31
|
-
O("styleAddSelector", n, e, "element", void 0, void 0, {
|
|
32
|
-
styleSelector: void 0,
|
|
33
|
-
componentType: e
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}, [O, n])
|
|
37
|
-
}), L = i((e) => {
|
|
36
|
+
onClose: N
|
|
37
|
+
}), R = i((e) => {
|
|
38
38
|
S?.((t) => t?.name === e ? void 0 : C.find((t) => t.name === e));
|
|
39
|
-
}, [S, C]),
|
|
39
|
+
}, [S, C]), z = i((e, t) => t ? Object.values(f(e, "definition.styleSelectors", {})).find((e) => (t.includes(":") && (t = f(t.split(":"), "0", t)), e && t && e.split(" ").includes(t))) : [], []), B = i((e, t, r) => {
|
|
40
|
+
if (!t || !r || r.length === 0) return;
|
|
41
|
+
let i = new Set(r), a = y.filter((e) => r.some((t) => z(e, t))).map((e) => _(e, (t) => {
|
|
42
|
+
Object.keys(e.definition.styleSelectors).forEach((e) => {
|
|
43
|
+
i.has(f(t, `definition.styleSelectors.${e}`, "")) && m(t, `definition.styleSelectors.${e}`, "");
|
|
44
|
+
});
|
|
45
|
+
}));
|
|
46
|
+
a.length > 0 && O("schemaUpdateElements", a), O("styleRemoveSelectors", n, r), D((e) => e.filter((e) => !i.has(e))), S?.((e) => e && i.has(e.name) ? void 0 : e);
|
|
47
|
+
}, [
|
|
48
|
+
O,
|
|
49
|
+
n,
|
|
50
|
+
z,
|
|
51
|
+
y,
|
|
52
|
+
S
|
|
53
|
+
]), [V, H, U, W, , G] = h({
|
|
40
54
|
id: "delete-selector",
|
|
41
|
-
onClose:
|
|
42
|
-
|
|
43
|
-
let i = new Set(r), a = y.filter((e) => r.some((t) => R(e, t))).map((e) => _(e, (t) => {
|
|
44
|
-
Object.keys(e.definition.styleSelectors).forEach((e) => {
|
|
45
|
-
i.has(f(t, `definition.styleSelectors.${e}`, "")) && m(t, `definition.styleSelectors.${e}`, "");
|
|
46
|
-
});
|
|
47
|
-
}));
|
|
48
|
-
a.length > 0 && O("schemaUpdateElements", a), O("styleRemoveSelectors", n, r), D((e) => e.filter((e) => !i.has(e))), S?.((e) => e && i.has(e.name) ? void 0 : e);
|
|
49
|
-
}, [
|
|
50
|
-
O,
|
|
51
|
-
n,
|
|
52
|
-
R,
|
|
53
|
-
y,
|
|
54
|
-
S
|
|
55
|
-
])
|
|
56
|
-
}), W = i((e) => V(void 0, [e]), [V]), G = i((e) => D((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), []), K = i(() => D([]), []), q = i(() => V(void 0, E), [V, E]), J = Array.isArray(U) ? U.length : 0, Y = a(() => j.reduce((e, t) => ({
|
|
55
|
+
onClose: B
|
|
56
|
+
}), K = i((e) => U(void 0, [e]), [U]), q = i((e) => D((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), []), J = i(() => D([]), []), Y = i(() => U(void 0, E), [U, E]), X = Array.isArray(G) ? G.length : 0, Z = a(() => j.reduce((e, t) => ({
|
|
57
57
|
...e,
|
|
58
|
-
[t.name]: y.filter((e) =>
|
|
58
|
+
[t.name]: y.filter((e) => z(e, t.name)).length
|
|
59
59
|
}), {}), [
|
|
60
60
|
j,
|
|
61
61
|
y,
|
|
62
|
-
|
|
63
|
-
]),
|
|
62
|
+
z
|
|
63
|
+
]), Q = i(() => void W(void 0, !1), [W]), $ = i(() => void W(void 0, !0), [W]);
|
|
64
64
|
return /* @__PURE__ */ c("div", {
|
|
65
65
|
className: "flex max-w-[350px] grow basis-0 flex-col gap-2 overflow-auto border-r border-gray-300 pt-2 pr-2 dark:border-zinc-700",
|
|
66
66
|
children: [
|
|
@@ -69,7 +69,7 @@ var y = n(({ displayMode: n, flatList: y, selectors: b, selected: x, onSelect: S
|
|
|
69
69
|
size: "sm",
|
|
70
70
|
className: "w-full",
|
|
71
71
|
iconPlacement: "before",
|
|
72
|
-
onClick:
|
|
72
|
+
onClick: I,
|
|
73
73
|
children: [/* @__PURE__ */ s(u.Icon, {
|
|
74
74
|
icon: "fas fa-tint",
|
|
75
75
|
size: "md",
|
|
@@ -91,13 +91,13 @@ var y = n(({ displayMode: n, flatList: y, selectors: b, selected: x, onSelect: S
|
|
|
91
91
|
className: "flex gap-1",
|
|
92
92
|
children: [/* @__PURE__ */ s(u, {
|
|
93
93
|
size: "xs",
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: J,
|
|
95
95
|
children: "Clear"
|
|
96
96
|
}), /* @__PURE__ */ c(u, {
|
|
97
97
|
intent: "danger",
|
|
98
98
|
size: "xs",
|
|
99
99
|
iconPlacement: "before",
|
|
100
|
-
onClick:
|
|
100
|
+
onClick: Y,
|
|
101
101
|
children: [/* @__PURE__ */ s(u.Icon, { icon: "fas fa-trash" }), "Delete"]
|
|
102
102
|
})]
|
|
103
103
|
})]
|
|
@@ -112,44 +112,44 @@ var y = n(({ displayMode: n, flatList: y, selectors: b, selected: x, onSelect: S
|
|
|
112
112
|
checked: E.includes(n),
|
|
113
113
|
label: n,
|
|
114
114
|
type: r,
|
|
115
|
-
elementsCount:
|
|
116
|
-
onSelect:
|
|
117
|
-
onDelete:
|
|
118
|
-
onToggleCheck:
|
|
115
|
+
elementsCount: Z[n],
|
|
116
|
+
onSelect: R,
|
|
117
|
+
onDelete: K,
|
|
118
|
+
onToggleCheck: q
|
|
119
119
|
}, n);
|
|
120
120
|
})
|
|
121
121
|
}),
|
|
122
122
|
/* @__PURE__ */ c(l, {
|
|
123
|
-
id:
|
|
124
|
-
open:
|
|
125
|
-
onClose:
|
|
123
|
+
id: P,
|
|
124
|
+
open: F,
|
|
125
|
+
onClose: L,
|
|
126
126
|
size: "sm",
|
|
127
127
|
children: [/* @__PURE__ */ s(l.Header, { children: /* @__PURE__ */ s("h4", { children: "Add Selector" }) }), /* @__PURE__ */ s(l.Body, { children: /* @__PURE__ */ s(t, {
|
|
128
128
|
componentsNotAvailables: A,
|
|
129
129
|
components: k.current,
|
|
130
|
-
onSubmit:
|
|
131
|
-
onClose:
|
|
130
|
+
onSubmit: L,
|
|
131
|
+
onClose: L
|
|
132
132
|
}) })]
|
|
133
133
|
}),
|
|
134
134
|
/* @__PURE__ */ c(l, {
|
|
135
|
-
id:
|
|
136
|
-
open:
|
|
137
|
-
onClose:
|
|
135
|
+
id: V,
|
|
136
|
+
open: H,
|
|
137
|
+
onClose: W,
|
|
138
138
|
children: [
|
|
139
139
|
/* @__PURE__ */ s(l.Header, { children: /* @__PURE__ */ s("h4", { children: "Remove Selector" }) }),
|
|
140
|
-
/* @__PURE__ */ c(l.Body, { children: [
|
|
140
|
+
/* @__PURE__ */ c(l.Body, { children: [X > 1 && /* @__PURE__ */ c("h4", { children: [
|
|
141
141
|
"Do you want to remove these ",
|
|
142
|
-
|
|
142
|
+
X,
|
|
143
143
|
" items ?"
|
|
144
|
-
] }),
|
|
144
|
+
] }), X <= 1 && /* @__PURE__ */ s("h4", { children: "Do you want to remove this item ?" })] }),
|
|
145
145
|
/* @__PURE__ */ c(l.Footer, {
|
|
146
146
|
justify: "end",
|
|
147
147
|
children: [/* @__PURE__ */ s(u, {
|
|
148
|
-
onClick:
|
|
148
|
+
onClick: Q,
|
|
149
149
|
size: "sm",
|
|
150
150
|
children: "Cancel"
|
|
151
151
|
}), /* @__PURE__ */ s(u, {
|
|
152
|
-
onClick:
|
|
152
|
+
onClick: $,
|
|
153
153
|
size: "sm",
|
|
154
154
|
children: "Submit"
|
|
155
155
|
})]
|
|
@@ -25,10 +25,10 @@ var u = l.discriminatedUnion("mode", [l.object({
|
|
|
25
25
|
children: a(e.replace(/([a-z0-9])([A-Z])/g, "$1 $2"))
|
|
26
26
|
}, e)), [p, m]), b = e((e) => {
|
|
27
27
|
e === "element" ? _.formMethods.setValue("componentType", Object.keys(p)[0]) : _.formMethods.setValue("componentType", "");
|
|
28
|
-
}, [p, _.formMethods]);
|
|
28
|
+
}, [p, _.formMethods]), x = e((e) => g?.(void 0, e), [g]);
|
|
29
29
|
return /* @__PURE__ */ r(o, {
|
|
30
30
|
form: _,
|
|
31
|
-
onSubmit:
|
|
31
|
+
onSubmit: x,
|
|
32
32
|
className: "gap-4",
|
|
33
33
|
children: [/* @__PURE__ */ r(o.Body, { children: [
|
|
34
34
|
/* @__PURE__ */ r(o.Select, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-style",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.16",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -836,9 +836,9 @@
|
|
|
836
836
|
},
|
|
837
837
|
"dependencies": {
|
|
838
838
|
"@plitzi/plitzi-ui": "^1.6.18",
|
|
839
|
-
"@plitzi/sdk-plugins": "0.32.
|
|
840
|
-
"@plitzi/sdk-shared": "0.32.
|
|
841
|
-
"@plitzi/sdk-variables": "0.32.
|
|
839
|
+
"@plitzi/sdk-plugins": "0.32.16",
|
|
840
|
+
"@plitzi/sdk-shared": "0.32.16",
|
|
841
|
+
"@plitzi/sdk-variables": "0.32.16",
|
|
842
842
|
"clsx": "^2.1.1",
|
|
843
843
|
"immer": "^11.1.15",
|
|
844
844
|
"prop-types": "^15.8.1",
|
|
@@ -847,7 +847,7 @@
|
|
|
847
847
|
"devDependencies": {
|
|
848
848
|
"eslint": "^9.39.5",
|
|
849
849
|
"typescript": "^6.0.3",
|
|
850
|
-
"vite": "^8.
|
|
850
|
+
"vite": "^8.2.0",
|
|
851
851
|
"vitest": "^4.1.10"
|
|
852
852
|
}
|
|
853
853
|
}
|