@plitzi/sdk-style 0.38.11 → 0.38.12
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 +109 -0
- package/dist/StyleMap/helpers/isValueValid.mjs +5 -4
- package/dist/StyleMap/helpers/utils.mjs +13 -12
- package/dist/components/StyleInspector/StyleInspector.mjs +217 -217
- package/dist/components/StyleInspector/categories/Background/Background.mjs +86 -147
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.mjs +28 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +26 -48
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +45 -67
- package/dist/components/StyleInspector/categories/Display/Display.mjs +59 -58
- package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +14 -1
- package/dist/components/StyleInspector/categories/Display/DisplayGap.mjs +26 -13
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +13 -24
- package/dist/components/StyleInspector/categories/Effects/Effects.mjs +41 -102
- package/dist/components/StyleInspector/categories/List/List.mjs +15 -65
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +15 -64
- package/dist/components/StyleInspector/categories/Others/Others.mjs +60 -60
- package/dist/components/StyleInspector/categories/Size/Size.mjs +67 -67
- package/dist/components/StyleInspector/categories/Spacing/SpacingBox.d.ts +15 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingBox.mjs +63 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +3 -11
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +18 -70
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +3 -7
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +16 -68
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +79 -78
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +17 -28
- package/dist/components/StyleInspector/categories/blendModes.d.ts +2 -0
- package/dist/components/StyleInspector/categories/blendModes.mjs +21 -0
- package/dist/components/StyleInspector/categories/listMarkers.d.ts +8 -0
- package/dist/components/StyleInspector/categories/listMarkers.mjs +25 -0
- package/dist/components/StyleInspector/components/ShadowList/ShadowList.d.ts +15 -0
- package/dist/components/StyleInspector/components/ShadowList/ShadowList.mjs +25 -0
- package/dist/components/StyleInspector/components/ShadowList/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ShadowList/index.mjs +5 -0
- package/dist/components/StyleInspector/cssValues.d.ts +2 -4
- package/dist/components/StyleInspector/cssValues.mjs +12 -16
- package/dist/components/StyleInspector/hooks/usePropertyChange.d.ts +6 -0
- package/dist/components/StyleInspector/hooks/usePropertyChange.mjs +9 -0
- package/package.json +44 -8
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +0 -8
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.mjs +0 -27
|
@@ -4,79 +4,30 @@ import n from "../../components/CategoryOption/index.mjs";
|
|
|
4
4
|
import r from "../../components/CategorySection/index.mjs";
|
|
5
5
|
import { LIST_ITEM_KEYS as i } from "../../categoryKeys.mjs";
|
|
6
6
|
import a from "../../components/CategoryContainer/index.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import d from "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import m from "@plitzi/plitzi-ui/icons/ListLetters";
|
|
13
|
-
import h from "@plitzi/plitzi-ui/icons/ListNumbers";
|
|
14
|
-
import g from "@plitzi/plitzi-ui/icons/ListRoman";
|
|
15
|
-
import _ from "@plitzi/plitzi-ui/icons/ListSquares";
|
|
16
|
-
var v = o(({ replaceTokens: o = !1, isCollapsed: v = !0, onCollapse: y }) => {
|
|
17
|
-
let { setValue: b } = s(e), { "list-style-type": x } = t({
|
|
7
|
+
import { listMarkerItems as o } from "../listMarkers.mjs";
|
|
8
|
+
import { memo as s, use as c, useCallback as l, useMemo as u } from "react";
|
|
9
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
10
|
+
var f = s(({ replaceTokens: s = !1, isCollapsed: f = !0, onCollapse: p }) => {
|
|
11
|
+
let { setValue: m } = c(e), { "list-style-type": h } = t({
|
|
18
12
|
keys: i.dot,
|
|
19
13
|
asValue: !0,
|
|
20
|
-
replaceTokens:
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
value: "none",
|
|
24
|
-
icon: /* @__PURE__ */ u(d, {}),
|
|
25
|
-
description: "",
|
|
26
|
-
active: x === "none"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
value: "disc",
|
|
30
|
-
icon: /* @__PURE__ */ u(p, {}),
|
|
31
|
-
description: "",
|
|
32
|
-
active: x === "disc"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
value: "circle",
|
|
36
|
-
icon: /* @__PURE__ */ u(f, {}),
|
|
37
|
-
description: "",
|
|
38
|
-
active: x === "circle"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
value: "square",
|
|
42
|
-
icon: /* @__PURE__ */ u(_, {}),
|
|
43
|
-
description: "",
|
|
44
|
-
active: x === "square"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
value: "decimal",
|
|
48
|
-
icon: /* @__PURE__ */ u(h, {}),
|
|
49
|
-
description: "",
|
|
50
|
-
active: x === "decimal"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
value: "lower-alpha",
|
|
54
|
-
icon: /* @__PURE__ */ u(m, {}),
|
|
55
|
-
description: "",
|
|
56
|
-
active: x === "lower-alpha"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
value: "lower-roman",
|
|
60
|
-
icon: /* @__PURE__ */ u(g, {}),
|
|
61
|
-
description: "",
|
|
62
|
-
active: x === "lower-roman"
|
|
63
|
-
}
|
|
64
|
-
], [x]);
|
|
65
|
-
return /* @__PURE__ */ u(a, {
|
|
14
|
+
replaceTokens: s
|
|
15
|
+
}), g = l((e) => p?.("listItem", e), [p]), _ = l((e) => m("list-style-type", e), [m]), v = u(() => o(h), [h]);
|
|
16
|
+
return /* @__PURE__ */ d(a, {
|
|
66
17
|
title: i.title,
|
|
67
18
|
dotKeys: i.dot,
|
|
68
|
-
isCollapsed:
|
|
69
|
-
onCollapse:
|
|
70
|
-
children: /* @__PURE__ */
|
|
19
|
+
isCollapsed: f,
|
|
20
|
+
onCollapse: g,
|
|
21
|
+
children: /* @__PURE__ */ d(r, {
|
|
71
22
|
keys: i.dot,
|
|
72
23
|
label: "Style",
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
-
onChange:
|
|
24
|
+
children: /* @__PURE__ */ d(n, {
|
|
25
|
+
onChange: _,
|
|
75
26
|
type: "iconGroup",
|
|
76
|
-
items:
|
|
27
|
+
items: v
|
|
77
28
|
})
|
|
78
29
|
})
|
|
79
30
|
});
|
|
80
31
|
});
|
|
81
32
|
//#endregion
|
|
82
|
-
export {
|
|
33
|
+
export { f as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import t from "../../
|
|
3
|
-
import
|
|
4
|
-
import r from "../../components/
|
|
5
|
-
import i from "../../
|
|
1
|
+
import e from "../../hooks/useInspectorValues.mjs";
|
|
2
|
+
import { OTHERS_KEYS as t } from "../../categoryKeys.mjs";
|
|
3
|
+
import n from "../../components/CategoryAdvanced/index.mjs";
|
|
4
|
+
import r from "../../components/CategoryContainer/index.mjs";
|
|
5
|
+
import i from "../../hooks/usePropertyChange.mjs";
|
|
6
6
|
import a from "./OthersForm.mjs";
|
|
7
7
|
import o from "./OthersInteraction.mjs";
|
|
8
8
|
import s from "./OthersOutline.mjs";
|
|
@@ -10,73 +10,73 @@ import c from "./OthersScrollbar.mjs";
|
|
|
10
10
|
import l from "./OthersScrollSnap.mjs";
|
|
11
11
|
import u from "./OthersSvg.mjs";
|
|
12
12
|
import d from "./OthersTable.mjs";
|
|
13
|
-
import { memo as f,
|
|
14
|
-
import { jsx as
|
|
15
|
-
var
|
|
16
|
-
let {
|
|
17
|
-
keys:
|
|
13
|
+
import { memo as f, useCallback as p } from "react";
|
|
14
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
|
+
var g = f(({ replaceTokens: f = !1, isCollapsed: g = !0, onCollapse: _ }) => {
|
|
16
|
+
let { "pointer-events": v, "user-select": y, "touch-action": b, resize: x, appearance: S, "scroll-behavior": C, "overscroll-behavior": w, "scroll-snap-type": T, "scroll-snap-align": E, "scroll-snap-stop": D, "scroll-padding-top": O, "scroll-margin-top": k, "accent-color": A, "caret-color": j, "color-scheme": M, "scrollbar-width": N, "scrollbar-color": P, "outline-width": F, "outline-style": I, "outline-color": L, "outline-offset": R, "border-collapse": z, "border-spacing": B, "table-layout": V, fill: H, stroke: U, "stroke-width": W } = e({
|
|
17
|
+
keys: t.dot,
|
|
18
18
|
asValue: !0,
|
|
19
19
|
replaceTokens: f
|
|
20
|
-
}),
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
title:
|
|
23
|
-
dotKeys:
|
|
24
|
-
advancedKeys:
|
|
25
|
-
isCollapsed:
|
|
26
|
-
onCollapse:
|
|
20
|
+
}), G = p((e) => _?.("others", e), [_]), K = i();
|
|
21
|
+
return /* @__PURE__ */ h(r, {
|
|
22
|
+
title: t.title,
|
|
23
|
+
dotKeys: t.dot,
|
|
24
|
+
advancedKeys: t.advanced,
|
|
25
|
+
isCollapsed: g,
|
|
26
|
+
onCollapse: G,
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
pointerEvents:
|
|
30
|
-
userSelect:
|
|
31
|
-
touchAction:
|
|
32
|
-
resize:
|
|
33
|
-
appearance:
|
|
34
|
-
scrollBehavior:
|
|
35
|
-
overscrollBehavior:
|
|
36
|
-
onChange:
|
|
28
|
+
/* @__PURE__ */ m(o, {
|
|
29
|
+
pointerEvents: v,
|
|
30
|
+
userSelect: y,
|
|
31
|
+
touchAction: b,
|
|
32
|
+
resize: x,
|
|
33
|
+
appearance: S,
|
|
34
|
+
scrollBehavior: C,
|
|
35
|
+
overscrollBehavior: w,
|
|
36
|
+
onChange: K
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
outlineWidth:
|
|
40
|
-
outlineStyle:
|
|
41
|
-
outlineColor:
|
|
42
|
-
outlineOffset:
|
|
43
|
-
onChange:
|
|
38
|
+
/* @__PURE__ */ m(s, {
|
|
39
|
+
outlineWidth: F,
|
|
40
|
+
outlineStyle: I,
|
|
41
|
+
outlineColor: L,
|
|
42
|
+
outlineOffset: R,
|
|
43
|
+
onChange: K
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
scrollbarWidth:
|
|
48
|
-
scrollbarColor:
|
|
49
|
-
onChange:
|
|
45
|
+
/* @__PURE__ */ h(n, { children: [
|
|
46
|
+
/* @__PURE__ */ m(c, {
|
|
47
|
+
scrollbarWidth: N,
|
|
48
|
+
scrollbarColor: P,
|
|
49
|
+
onChange: K
|
|
50
50
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
scrollSnapType:
|
|
53
|
-
scrollSnapAlign:
|
|
54
|
-
scrollSnapStop:
|
|
55
|
-
scrollPaddingTop:
|
|
56
|
-
scrollMarginTop:
|
|
57
|
-
onChange:
|
|
51
|
+
/* @__PURE__ */ m(l, {
|
|
52
|
+
scrollSnapType: T,
|
|
53
|
+
scrollSnapAlign: E,
|
|
54
|
+
scrollSnapStop: D,
|
|
55
|
+
scrollPaddingTop: O,
|
|
56
|
+
scrollMarginTop: k,
|
|
57
|
+
onChange: K
|
|
58
58
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
accentColor:
|
|
61
|
-
caretColor:
|
|
62
|
-
colorScheme:
|
|
63
|
-
onChange:
|
|
59
|
+
/* @__PURE__ */ m(a, {
|
|
60
|
+
accentColor: A,
|
|
61
|
+
caretColor: j,
|
|
62
|
+
colorScheme: M,
|
|
63
|
+
onChange: K
|
|
64
64
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
borderCollapse:
|
|
67
|
-
borderSpacing:
|
|
68
|
-
tableLayout:
|
|
69
|
-
onChange:
|
|
65
|
+
/* @__PURE__ */ m(d, {
|
|
66
|
+
borderCollapse: z,
|
|
67
|
+
borderSpacing: B,
|
|
68
|
+
tableLayout: V,
|
|
69
|
+
onChange: K
|
|
70
70
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
fill:
|
|
73
|
-
stroke:
|
|
74
|
-
strokeWidth:
|
|
75
|
-
onChange:
|
|
71
|
+
/* @__PURE__ */ m(u, {
|
|
72
|
+
fill: H,
|
|
73
|
+
stroke: U,
|
|
74
|
+
strokeWidth: W,
|
|
75
|
+
onChange: K
|
|
76
76
|
})
|
|
77
77
|
] })
|
|
78
78
|
]
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
//#endregion
|
|
82
|
-
export {
|
|
82
|
+
export { g as default };
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import t from "../../
|
|
3
|
-
import n from "../../components/
|
|
4
|
-
import r from "../../
|
|
5
|
-
import
|
|
6
|
-
import a from "../../components/
|
|
7
|
-
import o from "../../
|
|
1
|
+
import e from "../../hooks/useInspectorValues.mjs";
|
|
2
|
+
import t from "../../components/CategoryOption/index.mjs";
|
|
3
|
+
import n from "../../components/CategorySection/index.mjs";
|
|
4
|
+
import { SIZE_KEYS as r } from "../../categoryKeys.mjs";
|
|
5
|
+
import i from "../../components/CategoryAdvanced/index.mjs";
|
|
6
|
+
import a from "../../components/CategoryContainer/index.mjs";
|
|
7
|
+
import o from "../../hooks/usePropertyChange.mjs";
|
|
8
8
|
import s from "./SizeContainer.mjs";
|
|
9
9
|
import c from "./SizeFit.mjs";
|
|
10
10
|
import l from "./SizeOverflow.mjs";
|
|
11
11
|
import u from "./SizePosition.mjs";
|
|
12
|
-
import { memo as d,
|
|
13
|
-
import { jsx as
|
|
12
|
+
import { memo as d, useCallback as f } from "react";
|
|
13
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/StyleInspector/categories/Size/Size.tsx
|
|
15
|
-
var
|
|
16
|
-
let {
|
|
17
|
-
keys:
|
|
15
|
+
var h = ["width", "height"], g = ["min-width", "min-height"], _ = ["max-width", "max-height"], v = d(({ replaceTokens: d = !1, isCollapsed: v = !0, onCollapse: y }) => {
|
|
16
|
+
let { width: b, height: x, "min-width": S, "min-height": C, "max-width": w, "max-height": T, "aspect-ratio": E, "box-sizing": D, overflow: O, "object-position": k, "object-fit": A, "container-type": j, "container-name": M } = e({
|
|
17
|
+
keys: r.dot,
|
|
18
18
|
asValue: !0,
|
|
19
19
|
replaceTokens: d
|
|
20
|
-
}),
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
title:
|
|
23
|
-
dotKeys:
|
|
24
|
-
advancedKeys:
|
|
25
|
-
isCollapsed:
|
|
26
|
-
onCollapse:
|
|
20
|
+
}), N = f((e) => y?.("size", e), [y]), P = o();
|
|
21
|
+
return /* @__PURE__ */ m(a, {
|
|
22
|
+
title: r.title,
|
|
23
|
+
dotKeys: r.dot,
|
|
24
|
+
advancedKeys: r.advanced,
|
|
25
|
+
isCollapsed: v,
|
|
26
|
+
onCollapse: N,
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ m(n, {
|
|
29
29
|
label: "Size",
|
|
30
|
-
keys:
|
|
31
|
-
children: [/* @__PURE__ */
|
|
30
|
+
keys: h,
|
|
31
|
+
children: [/* @__PURE__ */ p(t, {
|
|
32
32
|
keys: ["width"],
|
|
33
33
|
preffix: "W",
|
|
34
|
-
value:
|
|
35
|
-
onChange:
|
|
34
|
+
value: b,
|
|
35
|
+
onChange: P("width"),
|
|
36
36
|
type: "metric"
|
|
37
|
-
}), /* @__PURE__ */
|
|
37
|
+
}), /* @__PURE__ */ p(t, {
|
|
38
38
|
keys: ["height"],
|
|
39
39
|
preffix: "H",
|
|
40
|
-
value:
|
|
41
|
-
onChange:
|
|
40
|
+
value: x,
|
|
41
|
+
onChange: P("height"),
|
|
42
42
|
type: "metric"
|
|
43
43
|
})]
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ m(n, {
|
|
46
46
|
label: "Min Size",
|
|
47
|
-
keys:
|
|
48
|
-
children: [/* @__PURE__ */
|
|
47
|
+
keys: g,
|
|
48
|
+
children: [/* @__PURE__ */ p(t, {
|
|
49
49
|
keys: ["min-width"],
|
|
50
50
|
preffix: "W",
|
|
51
|
-
value:
|
|
52
|
-
onChange:
|
|
51
|
+
value: S,
|
|
52
|
+
onChange: P("min-width"),
|
|
53
53
|
type: "metric"
|
|
54
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ p(t, {
|
|
55
55
|
keys: ["min-height"],
|
|
56
56
|
preffix: "H",
|
|
57
|
-
value:
|
|
58
|
-
onChange:
|
|
57
|
+
value: C,
|
|
58
|
+
onChange: P("min-height"),
|
|
59
59
|
type: "metric"
|
|
60
60
|
})]
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ m(n, {
|
|
63
63
|
label: "Max Size",
|
|
64
|
-
keys:
|
|
65
|
-
children: [/* @__PURE__ */
|
|
64
|
+
keys: _,
|
|
65
|
+
children: [/* @__PURE__ */ p(t, {
|
|
66
66
|
keys: ["max-width"],
|
|
67
67
|
preffix: "W",
|
|
68
|
-
value:
|
|
69
|
-
onChange:
|
|
68
|
+
value: w,
|
|
69
|
+
onChange: P("max-width"),
|
|
70
70
|
type: "metric"
|
|
71
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ p(t, {
|
|
72
72
|
keys: ["max-height"],
|
|
73
73
|
preffix: "H",
|
|
74
|
-
value:
|
|
75
|
-
onChange:
|
|
74
|
+
value: T,
|
|
75
|
+
onChange: P("max-height"),
|
|
76
76
|
type: "metric"
|
|
77
77
|
})]
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ p(i, { children: /* @__PURE__ */ m(n, {
|
|
80
80
|
label: "",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ p(t, {
|
|
82
82
|
keys: ["aspect-ratio"],
|
|
83
83
|
label: "Ratio",
|
|
84
|
-
value:
|
|
85
|
-
onChange:
|
|
86
|
-
}), /* @__PURE__ */
|
|
84
|
+
value: E,
|
|
85
|
+
onChange: P("aspect-ratio")
|
|
86
|
+
}), /* @__PURE__ */ m(t, {
|
|
87
87
|
keys: ["box-sizing"],
|
|
88
88
|
label: "Box Sizing",
|
|
89
|
-
value:
|
|
90
|
-
onChange:
|
|
89
|
+
value: D,
|
|
90
|
+
onChange: P("box-sizing"),
|
|
91
91
|
type: "select",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ p("option", {
|
|
93
93
|
value: "border-box",
|
|
94
94
|
children: "Border Box"
|
|
95
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ p("option", {
|
|
96
96
|
value: "content-box",
|
|
97
97
|
children: "Content Box"
|
|
98
98
|
})]
|
|
99
99
|
})]
|
|
100
100
|
}) }),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
value:
|
|
103
|
-
onChange:
|
|
101
|
+
/* @__PURE__ */ p(l, {
|
|
102
|
+
value: O,
|
|
103
|
+
onChange: P
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
value:
|
|
108
|
-
onChange:
|
|
105
|
+
/* @__PURE__ */ m(i, { children: [
|
|
106
|
+
/* @__PURE__ */ p(u, {
|
|
107
|
+
value: k,
|
|
108
|
+
onChange: P
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
value:
|
|
112
|
-
onChange:
|
|
110
|
+
/* @__PURE__ */ p(c, {
|
|
111
|
+
value: A,
|
|
112
|
+
onChange: P
|
|
113
113
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
containerType:
|
|
116
|
-
containerName:
|
|
117
|
-
onChange:
|
|
114
|
+
/* @__PURE__ */ p(s, {
|
|
115
|
+
containerType: j,
|
|
116
|
+
containerName: M,
|
|
117
|
+
onChange: P
|
|
118
118
|
})
|
|
119
119
|
] })
|
|
120
120
|
]
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
//#endregion
|
|
124
|
-
export {
|
|
124
|
+
export { v as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type SpacingValues = Partial<Record<`${'margin' | 'padding'}-${'top' | 'bottom' | 'left' | 'right'}`, StyleValue>>;
|
|
4
|
+
export type SpacingBoxProps = {
|
|
5
|
+
property: 'margin' | 'padding';
|
|
6
|
+
className: string;
|
|
7
|
+
values?: SpacingValues;
|
|
8
|
+
fragmentSelected?: StyleCategory;
|
|
9
|
+
onSelectFragment?: (fragment?: StyleCategory) => void;
|
|
10
|
+
/** What the ring goes around: the padding inside the margin, the link inside the padding. */
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
/** One ring of the box model: its four sides around what it holds, each picked to edit — and picked again, let go. */
|
|
14
|
+
declare const SpacingBox: ({ property, className, values, fragmentSelected, onSelectFragment, children }: SpacingBoxProps) => import('react').JSX.Element;
|
|
15
|
+
export default SpacingBox;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import e from "../../components/InspectorLabel/index.mjs";
|
|
2
|
+
import t from "./SpacingNumber.mjs";
|
|
3
|
+
import { useCallback as n } from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/StyleInspector/categories/Spacing/SpacingBox.tsx
|
|
6
|
+
var a = ({ property: a, className: o, values: s, fragmentSelected: c, onSelectFragment: l, children: u }) => {
|
|
7
|
+
let d = `${a}-top`, f = `${a}-left`, p = `${a}-right`, m = `${a}-bottom`, h = n((e) => () => l?.(e === c ? void 0 : e), [c, l]);
|
|
8
|
+
return /* @__PURE__ */ i("div", {
|
|
9
|
+
className: o,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ i("div", {
|
|
12
|
+
className: "flex items-center justify-center py-0.5",
|
|
13
|
+
children: [/* @__PURE__ */ r(e, {
|
|
14
|
+
className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[11px]",
|
|
15
|
+
size: "custom",
|
|
16
|
+
keyValue: [
|
|
17
|
+
d,
|
|
18
|
+
f,
|
|
19
|
+
p,
|
|
20
|
+
m
|
|
21
|
+
],
|
|
22
|
+
children: a.toUpperCase()
|
|
23
|
+
}), /* @__PURE__ */ r(t, {
|
|
24
|
+
value: s?.[d],
|
|
25
|
+
active: c === d,
|
|
26
|
+
onClick: h(d)
|
|
27
|
+
})]
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ i("div", {
|
|
30
|
+
className: "flex items-center justify-center",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ r("div", {
|
|
33
|
+
className: "flex items-center justify-center px-0.5",
|
|
34
|
+
children: /* @__PURE__ */ r(t, {
|
|
35
|
+
value: s?.[f],
|
|
36
|
+
active: c === f,
|
|
37
|
+
onClick: h(f)
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
u,
|
|
41
|
+
/* @__PURE__ */ r("div", {
|
|
42
|
+
className: "flex items-center justify-center px-0.5",
|
|
43
|
+
children: /* @__PURE__ */ r(t, {
|
|
44
|
+
value: s?.[p],
|
|
45
|
+
active: c === p,
|
|
46
|
+
onClick: h(p)
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ r("div", {
|
|
52
|
+
className: "flex items-center justify-center py-0.5",
|
|
53
|
+
children: /* @__PURE__ */ r(t, {
|
|
54
|
+
value: s?.[m],
|
|
55
|
+
active: c === m,
|
|
56
|
+
onClick: h(m)
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { a as default };
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SpacingValues } from './SpacingBox';
|
|
2
|
+
import { StyleCategory } from '@plitzi/sdk-shared';
|
|
2
3
|
export type SpacingMarginProps = {
|
|
3
4
|
fragmentSelected?: StyleCategory;
|
|
4
|
-
values?:
|
|
5
|
-
'margin-top'?: StyleValue;
|
|
6
|
-
'margin-bottom'?: StyleValue;
|
|
7
|
-
'margin-left'?: StyleValue;
|
|
8
|
-
'margin-right'?: StyleValue;
|
|
9
|
-
'padding-top'?: StyleValue;
|
|
10
|
-
'padding-bottom'?: StyleValue;
|
|
11
|
-
'padding-right'?: StyleValue;
|
|
12
|
-
'padding-left'?: StyleValue;
|
|
13
|
-
};
|
|
5
|
+
values?: SpacingValues;
|
|
14
6
|
isLinked?: boolean;
|
|
15
7
|
onLinkSelected?: () => void;
|
|
16
8
|
onSelectFragment?: (fragment?: StyleCategory) => void;
|
|
@@ -1,72 +1,20 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "
|
|
4
|
-
import { useCallback as r } from "react";
|
|
5
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
1
|
+
import e from "./SpacingBox.mjs";
|
|
2
|
+
import t from "./SpacingPadding.mjs";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
4
|
//#region src/components/StyleInspector/categories/Spacing/SpacingMargin.tsx
|
|
7
|
-
var
|
|
8
|
-
"margin
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
children: [/* @__PURE__ */ i(e, {
|
|
22
|
-
className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[11px]",
|
|
23
|
-
size: "custom",
|
|
24
|
-
keyValue: o,
|
|
25
|
-
children: "MARGIN"
|
|
26
|
-
}), /* @__PURE__ */ i(t, {
|
|
27
|
-
value: p,
|
|
28
|
-
active: s === "margin-top",
|
|
29
|
-
onClick: f("margin-top")
|
|
30
|
-
})]
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ a("div", {
|
|
33
|
-
className: "flex items-center justify-center",
|
|
34
|
-
children: [
|
|
35
|
-
/* @__PURE__ */ i("div", {
|
|
36
|
-
className: "flex items-center justify-center px-0.5",
|
|
37
|
-
children: /* @__PURE__ */ i(t, {
|
|
38
|
-
value: h,
|
|
39
|
-
active: s === "margin-left",
|
|
40
|
-
onClick: f("margin-left")
|
|
41
|
-
})
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ i(n, {
|
|
44
|
-
values: c,
|
|
45
|
-
fragmentSelected: s,
|
|
46
|
-
onSelectFragment: d,
|
|
47
|
-
isLinked: l,
|
|
48
|
-
onLinkSelected: u
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ i("div", {
|
|
51
|
-
className: "flex items-center justify-center px-0.5",
|
|
52
|
-
children: /* @__PURE__ */ i(t, {
|
|
53
|
-
value: g,
|
|
54
|
-
active: s === "margin-right",
|
|
55
|
-
onClick: f("margin-right")
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
]
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ i("div", {
|
|
61
|
-
className: "flex items-center justify-center py-0.5",
|
|
62
|
-
children: /* @__PURE__ */ i(t, {
|
|
63
|
-
value: m,
|
|
64
|
-
active: s === "margin-bottom",
|
|
65
|
-
onClick: f("margin-bottom")
|
|
66
|
-
})
|
|
67
|
-
})
|
|
68
|
-
]
|
|
69
|
-
});
|
|
70
|
-
};
|
|
5
|
+
var r = ({ fragmentSelected: r, values: i, isLinked: a = !1, onLinkSelected: o, onSelectFragment: s }) => /* @__PURE__ */ n(e, {
|
|
6
|
+
property: "margin",
|
|
7
|
+
className: "relative flex cursor-pointer flex-col rounded-md border border-dashed border-gray-300 select-none dark:border-zinc-600",
|
|
8
|
+
values: i,
|
|
9
|
+
fragmentSelected: r,
|
|
10
|
+
onSelectFragment: s,
|
|
11
|
+
children: /* @__PURE__ */ n(t, {
|
|
12
|
+
values: i,
|
|
13
|
+
fragmentSelected: r,
|
|
14
|
+
onSelectFragment: s,
|
|
15
|
+
isLinked: a,
|
|
16
|
+
onLinkSelected: o
|
|
17
|
+
})
|
|
18
|
+
});
|
|
71
19
|
//#endregion
|
|
72
|
-
export {
|
|
20
|
+
export { r as default };
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SpacingValues } from './SpacingBox';
|
|
2
|
+
import { StyleCategory } from '@plitzi/sdk-shared';
|
|
2
3
|
export type SpacingPaddingProps = {
|
|
3
4
|
fragmentSelected?: StyleCategory;
|
|
4
|
-
values?:
|
|
5
|
-
'padding-top'?: StyleValue;
|
|
6
|
-
'padding-bottom'?: StyleValue;
|
|
7
|
-
'padding-left'?: StyleValue;
|
|
8
|
-
'padding-right'?: StyleValue;
|
|
9
|
-
};
|
|
5
|
+
values?: SpacingValues;
|
|
10
6
|
isLinked?: boolean;
|
|
11
7
|
onLinkSelected?: () => void;
|
|
12
8
|
onSelectFragment?: (fragment?: StyleCategory) => void;
|