@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.
Files changed (43) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/dist/StyleMap/helpers/isValueValid.mjs +5 -4
  3. package/dist/StyleMap/helpers/utils.mjs +13 -12
  4. package/dist/components/StyleInspector/StyleInspector.mjs +217 -217
  5. package/dist/components/StyleInspector/categories/Background/Background.mjs +86 -147
  6. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.d.ts +8 -0
  7. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.mjs +28 -0
  8. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.d.ts +3 -0
  9. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.mjs +5 -0
  10. package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +26 -48
  11. package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +45 -67
  12. package/dist/components/StyleInspector/categories/Display/Display.mjs +59 -58
  13. package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +14 -1
  14. package/dist/components/StyleInspector/categories/Display/DisplayGap.mjs +26 -13
  15. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +13 -24
  16. package/dist/components/StyleInspector/categories/Effects/Effects.mjs +41 -102
  17. package/dist/components/StyleInspector/categories/List/List.mjs +15 -65
  18. package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +15 -64
  19. package/dist/components/StyleInspector/categories/Others/Others.mjs +60 -60
  20. package/dist/components/StyleInspector/categories/Size/Size.mjs +67 -67
  21. package/dist/components/StyleInspector/categories/Spacing/SpacingBox.d.ts +15 -0
  22. package/dist/components/StyleInspector/categories/Spacing/SpacingBox.mjs +63 -0
  23. package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +3 -11
  24. package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +18 -70
  25. package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +3 -7
  26. package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +16 -68
  27. package/dist/components/StyleInspector/categories/Typography/Typography.mjs +79 -78
  28. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +17 -28
  29. package/dist/components/StyleInspector/categories/blendModes.d.ts +2 -0
  30. package/dist/components/StyleInspector/categories/blendModes.mjs +21 -0
  31. package/dist/components/StyleInspector/categories/listMarkers.d.ts +8 -0
  32. package/dist/components/StyleInspector/categories/listMarkers.mjs +25 -0
  33. package/dist/components/StyleInspector/components/ShadowList/ShadowList.d.ts +15 -0
  34. package/dist/components/StyleInspector/components/ShadowList/ShadowList.mjs +25 -0
  35. package/dist/components/StyleInspector/components/ShadowList/index.d.ts +3 -0
  36. package/dist/components/StyleInspector/components/ShadowList/index.mjs +5 -0
  37. package/dist/components/StyleInspector/cssValues.d.ts +2 -4
  38. package/dist/components/StyleInspector/cssValues.mjs +12 -16
  39. package/dist/components/StyleInspector/hooks/usePropertyChange.d.ts +6 -0
  40. package/dist/components/StyleInspector/hooks/usePropertyChange.mjs +9 -0
  41. package/package.json +44 -8
  42. package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +0 -8
  43. 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 { memo as o, use as s, useCallback as c, useMemo as l } from "react";
8
- import { jsx as u } from "react/jsx-runtime";
9
- import d from "@plitzi/plitzi-ui/icons/XMark";
10
- import f from "@plitzi/plitzi-ui/icons/ListCircles";
11
- import p from "@plitzi/plitzi-ui/icons/ListDots";
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: o
21
- }), S = c((e) => y?.("listItem", e), [y]), C = c((e) => b("list-style-type", e), [b]), w = l(() => [
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: v,
69
- onCollapse: S,
70
- children: /* @__PURE__ */ u(r, {
19
+ isCollapsed: f,
20
+ onCollapse: g,
21
+ children: /* @__PURE__ */ d(r, {
71
22
  keys: i.dot,
72
23
  label: "Style",
73
- children: /* @__PURE__ */ u(n, {
74
- onChange: C,
24
+ children: /* @__PURE__ */ d(n, {
25
+ onChange: _,
75
26
  type: "iconGroup",
76
- items: w
27
+ items: v
77
28
  })
78
29
  })
79
30
  });
80
31
  });
81
32
  //#endregion
82
- export { v as default };
33
+ export { f as default };
@@ -1,8 +1,8 @@
1
- import e from "../../StyleInspectorContext.mjs";
2
- import t from "../../hooks/useInspectorValues.mjs";
3
- import { OTHERS_KEYS as n } from "../../categoryKeys.mjs";
4
- import r from "../../components/CategoryAdvanced/index.mjs";
5
- import i from "../../components/CategoryContainer/index.mjs";
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, use as p, useCallback as m } from "react";
14
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
15
- var _ = f(({ replaceTokens: f = !1, isCollapsed: _ = !0, onCollapse: v }) => {
16
- let { setValue: y } = p(e), { "pointer-events": b, "user-select": x, "touch-action": S, resize: C, appearance: w, "scroll-behavior": T, "overscroll-behavior": E, "scroll-snap-type": D, "scroll-snap-align": O, "scroll-snap-stop": k, "scroll-padding-top": A, "scroll-margin-top": j, "accent-color": M, "caret-color": N, "color-scheme": P, "scrollbar-width": F, "scrollbar-color": I, "outline-width": L, "outline-style": R, "outline-color": z, "outline-offset": B, "border-collapse": V, "border-spacing": H, "table-layout": U, fill: W, stroke: G, "stroke-width": K } = t({
17
- keys: n.dot,
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
- }), q = m((e) => v?.("others", e), [v]), J = m((e) => (t) => y(e, t), [y]);
21
- return /* @__PURE__ */ g(i, {
22
- title: n.title,
23
- dotKeys: n.dot,
24
- advancedKeys: n.advanced,
25
- isCollapsed: _,
26
- onCollapse: q,
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__ */ h(o, {
29
- pointerEvents: b,
30
- userSelect: x,
31
- touchAction: S,
32
- resize: C,
33
- appearance: w,
34
- scrollBehavior: T,
35
- overscrollBehavior: E,
36
- onChange: J
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__ */ h(s, {
39
- outlineWidth: L,
40
- outlineStyle: R,
41
- outlineColor: z,
42
- outlineOffset: B,
43
- onChange: J
38
+ /* @__PURE__ */ m(s, {
39
+ outlineWidth: F,
40
+ outlineStyle: I,
41
+ outlineColor: L,
42
+ outlineOffset: R,
43
+ onChange: K
44
44
  }),
45
- /* @__PURE__ */ g(r, { children: [
46
- /* @__PURE__ */ h(c, {
47
- scrollbarWidth: F,
48
- scrollbarColor: I,
49
- onChange: J
45
+ /* @__PURE__ */ h(n, { children: [
46
+ /* @__PURE__ */ m(c, {
47
+ scrollbarWidth: N,
48
+ scrollbarColor: P,
49
+ onChange: K
50
50
  }),
51
- /* @__PURE__ */ h(l, {
52
- scrollSnapType: D,
53
- scrollSnapAlign: O,
54
- scrollSnapStop: k,
55
- scrollPaddingTop: A,
56
- scrollMarginTop: j,
57
- onChange: J
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__ */ h(a, {
60
- accentColor: M,
61
- caretColor: N,
62
- colorScheme: P,
63
- onChange: J
59
+ /* @__PURE__ */ m(a, {
60
+ accentColor: A,
61
+ caretColor: j,
62
+ colorScheme: M,
63
+ onChange: K
64
64
  }),
65
- /* @__PURE__ */ h(d, {
66
- borderCollapse: V,
67
- borderSpacing: H,
68
- tableLayout: U,
69
- onChange: J
65
+ /* @__PURE__ */ m(d, {
66
+ borderCollapse: z,
67
+ borderSpacing: B,
68
+ tableLayout: V,
69
+ onChange: K
70
70
  }),
71
- /* @__PURE__ */ h(u, {
72
- fill: W,
73
- stroke: G,
74
- strokeWidth: K,
75
- onChange: J
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 { _ as default };
82
+ export { g as default };
@@ -1,124 +1,124 @@
1
- import e from "../../StyleInspectorContext.mjs";
2
- import t from "../../hooks/useInspectorValues.mjs";
3
- import n from "../../components/CategoryOption/index.mjs";
4
- import r from "../../components/CategorySection/index.mjs";
5
- import { SIZE_KEYS as i } from "../../categoryKeys.mjs";
6
- import a from "../../components/CategoryAdvanced/index.mjs";
7
- import o from "../../components/CategoryContainer/index.mjs";
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, use as f, useCallback as p } from "react";
13
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
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 g = ["width", "height"], _ = ["min-width", "min-height"], v = ["max-width", "max-height"], y = d(({ replaceTokens: d = !1, isCollapsed: y = !0, onCollapse: b }) => {
16
- let { setValue: x } = f(e), { width: S, height: C, "min-width": w, "min-height": T, "max-width": E, "max-height": D, "aspect-ratio": O, "box-sizing": k, overflow: A, "object-position": j, "object-fit": M, "container-type": N, "container-name": P } = t({
17
- keys: i.dot,
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
- }), F = p((e) => b?.("size", e), [b]), I = p((e) => (t) => x(e, t), [x]);
21
- return /* @__PURE__ */ h(o, {
22
- title: i.title,
23
- dotKeys: i.dot,
24
- advancedKeys: i.advanced,
25
- isCollapsed: y,
26
- onCollapse: F,
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__ */ h(r, {
28
+ /* @__PURE__ */ m(n, {
29
29
  label: "Size",
30
- keys: g,
31
- children: [/* @__PURE__ */ m(n, {
30
+ keys: h,
31
+ children: [/* @__PURE__ */ p(t, {
32
32
  keys: ["width"],
33
33
  preffix: "W",
34
- value: S,
35
- onChange: I("width"),
34
+ value: b,
35
+ onChange: P("width"),
36
36
  type: "metric"
37
- }), /* @__PURE__ */ m(n, {
37
+ }), /* @__PURE__ */ p(t, {
38
38
  keys: ["height"],
39
39
  preffix: "H",
40
- value: C,
41
- onChange: I("height"),
40
+ value: x,
41
+ onChange: P("height"),
42
42
  type: "metric"
43
43
  })]
44
44
  }),
45
- /* @__PURE__ */ h(r, {
45
+ /* @__PURE__ */ m(n, {
46
46
  label: "Min Size",
47
- keys: _,
48
- children: [/* @__PURE__ */ m(n, {
47
+ keys: g,
48
+ children: [/* @__PURE__ */ p(t, {
49
49
  keys: ["min-width"],
50
50
  preffix: "W",
51
- value: w,
52
- onChange: I("min-width"),
51
+ value: S,
52
+ onChange: P("min-width"),
53
53
  type: "metric"
54
- }), /* @__PURE__ */ m(n, {
54
+ }), /* @__PURE__ */ p(t, {
55
55
  keys: ["min-height"],
56
56
  preffix: "H",
57
- value: T,
58
- onChange: I("min-height"),
57
+ value: C,
58
+ onChange: P("min-height"),
59
59
  type: "metric"
60
60
  })]
61
61
  }),
62
- /* @__PURE__ */ h(r, {
62
+ /* @__PURE__ */ m(n, {
63
63
  label: "Max Size",
64
- keys: v,
65
- children: [/* @__PURE__ */ m(n, {
64
+ keys: _,
65
+ children: [/* @__PURE__ */ p(t, {
66
66
  keys: ["max-width"],
67
67
  preffix: "W",
68
- value: E,
69
- onChange: I("max-width"),
68
+ value: w,
69
+ onChange: P("max-width"),
70
70
  type: "metric"
71
- }), /* @__PURE__ */ m(n, {
71
+ }), /* @__PURE__ */ p(t, {
72
72
  keys: ["max-height"],
73
73
  preffix: "H",
74
- value: D,
75
- onChange: I("max-height"),
74
+ value: T,
75
+ onChange: P("max-height"),
76
76
  type: "metric"
77
77
  })]
78
78
  }),
79
- /* @__PURE__ */ m(a, { children: /* @__PURE__ */ h(r, {
79
+ /* @__PURE__ */ p(i, { children: /* @__PURE__ */ m(n, {
80
80
  label: "",
81
- children: [/* @__PURE__ */ m(n, {
81
+ children: [/* @__PURE__ */ p(t, {
82
82
  keys: ["aspect-ratio"],
83
83
  label: "Ratio",
84
- value: O,
85
- onChange: I("aspect-ratio")
86
- }), /* @__PURE__ */ h(n, {
84
+ value: E,
85
+ onChange: P("aspect-ratio")
86
+ }), /* @__PURE__ */ m(t, {
87
87
  keys: ["box-sizing"],
88
88
  label: "Box Sizing",
89
- value: k,
90
- onChange: I("box-sizing"),
89
+ value: D,
90
+ onChange: P("box-sizing"),
91
91
  type: "select",
92
- children: [/* @__PURE__ */ m("option", {
92
+ children: [/* @__PURE__ */ p("option", {
93
93
  value: "border-box",
94
94
  children: "Border Box"
95
- }), /* @__PURE__ */ m("option", {
95
+ }), /* @__PURE__ */ p("option", {
96
96
  value: "content-box",
97
97
  children: "Content Box"
98
98
  })]
99
99
  })]
100
100
  }) }),
101
- /* @__PURE__ */ m(l, {
102
- value: A,
103
- onChange: I
101
+ /* @__PURE__ */ p(l, {
102
+ value: O,
103
+ onChange: P
104
104
  }),
105
- /* @__PURE__ */ h(a, { children: [
106
- /* @__PURE__ */ m(u, {
107
- value: j,
108
- onChange: I
105
+ /* @__PURE__ */ m(i, { children: [
106
+ /* @__PURE__ */ p(u, {
107
+ value: k,
108
+ onChange: P
109
109
  }),
110
- /* @__PURE__ */ m(c, {
111
- value: M,
112
- onChange: I
110
+ /* @__PURE__ */ p(c, {
111
+ value: A,
112
+ onChange: P
113
113
  }),
114
- /* @__PURE__ */ m(s, {
115
- containerType: N,
116
- containerName: P,
117
- onChange: I
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 { y as default };
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 { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
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 "../../components/InspectorLabel/index.mjs";
2
- import t from "./SpacingNumber.mjs";
3
- import n from "./SpacingPadding.mjs";
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 o = [
8
- "margin-top",
9
- "margin-left",
10
- "margin-right",
11
- "margin-bottom"
12
- ], s = ({ fragmentSelected: s, values: c, isLinked: l = !1, onLinkSelected: u, onSelectFragment: d }) => {
13
- let f = r((e) => () => {
14
- e === s ? d?.(void 0) : d?.(e);
15
- }, [s, d]), { "margin-top": p, "margin-bottom": m, "margin-left": h, "margin-right": g } = c ?? {};
16
- return /* @__PURE__ */ a("div", {
17
- className: "relative flex cursor-pointer flex-col rounded-md border border-dashed border-gray-300 select-none dark:border-zinc-600",
18
- children: [
19
- /* @__PURE__ */ a("div", {
20
- className: "flex items-center justify-center py-0.5",
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 { s as default };
20
+ export { r as default };
@@ -1,12 +1,8 @@
1
- import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
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;