@plitzi/sdk-style 0.33.2 → 0.34.1

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 (58) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/BuilderStyleContextProvider.d.ts +11 -2
  3. package/dist/BuilderStyleContextProvider.mjs +76 -54
  4. package/dist/SdkStyleContextProvider.mjs +4 -4
  5. package/dist/StyleAdvanceEditor.mjs +30 -30
  6. package/dist/StyleMap/StyleMap.d.ts +14 -1
  7. package/dist/StyleMap/StyleMap.mjs +24 -2
  8. package/dist/StyleMap/helpers/isValueValid.mjs +1 -1
  9. package/dist/StyleReducer.d.ts +15 -4
  10. package/dist/StyleReducer.mjs +39 -18
  11. package/dist/components/InputEasing/InputEasing.mjs +21 -21
  12. package/dist/components/InputEasing/InputEasingButton.mjs +5 -5
  13. package/dist/components/InputEasing/InputEasingList.mjs +76 -76
  14. package/dist/components/Selector/Selector.mjs +29 -29
  15. package/dist/components/Selector/SelectorItem/ItemOptions.mjs +16 -16
  16. package/dist/components/Selector/SelectorItem/SelectorItem.mjs +10 -10
  17. package/dist/components/StyleInspector/Inspector.mjs +33 -33
  18. package/dist/components/StyleInspector/StyleInspector.mjs +45 -45
  19. package/dist/components/StyleInspector/StyleInspectorProvider.mjs +14 -14
  20. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +46 -46
  21. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +20 -20
  22. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +11 -11
  23. package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +20 -20
  24. package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.mjs +12 -12
  25. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +22 -21
  26. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +66 -65
  27. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.d.ts +2 -0
  28. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.mjs +18 -0
  29. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +15 -15
  30. package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +16 -16
  31. package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +12 -12
  32. package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.mjs +5 -5
  33. package/dist/components/StyleInspector/categories/Typography/Typography.d.ts +1 -5
  34. package/dist/components/StyleInspector/categories/Typography/Typography.mjs +58 -57
  35. package/dist/components/StyleInspector/categories/Typography/TypographyConstants.d.ts +0 -4
  36. package/dist/components/StyleInspector/categories/Typography/TypographyConstants.mjs +2 -160
  37. package/dist/components/StyleInspector/categories/Typography/TypographyFont.d.ts +1 -4
  38. package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +24 -17
  39. package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +15 -15
  40. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +17 -17
  41. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.mjs +8 -8
  42. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.mjs +4 -4
  43. package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +13 -13
  44. package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +13 -13
  45. package/dist/components/StyleInspector/hooks/useStyleBinding.mjs +12 -12
  46. package/dist/components/StyleInspector/hooks/useStyleInherit.mjs +3 -3
  47. package/dist/components/StyleManager/ManagerSelector.mjs +35 -35
  48. package/dist/components/StyleManager/StyleManager.mjs +12 -12
  49. package/dist/components/StyleManager/StyleSelectorTag.mjs +20 -20
  50. package/dist/helpers/calculateInheriting.mjs +2 -2
  51. package/dist/helpers/generateStyleSelector.mjs +1 -1
  52. package/dist/helpers/processSelectorAttributes.mjs +1 -1
  53. package/dist/hooks/index.d.ts +2 -0
  54. package/dist/hooks/index.mjs +2 -0
  55. package/dist/hooks/useSpaceFonts.d.ts +10 -0
  56. package/dist/hooks/useSpaceFonts.mjs +10 -0
  57. package/dist/index.mjs +16 -16
  58. package/package.json +26 -9
@@ -7,15 +7,17 @@ import a from "../../components/CategoryContainer/index.mjs";
7
7
  import o from "./TypographyAlign.mjs";
8
8
  import s from "./TypographyBreaking.mjs";
9
9
  import c from "./TypographyClamp.mjs";
10
- import { defaultFonts as l, weights as u } from "./TypographyConstants.mjs";
10
+ import { weights as l } from "./TypographyConstants.mjs";
11
+ import u from "../../../../hooks/useSpaceFonts.mjs";
11
12
  import d from "./TypographyFont.mjs";
12
13
  import f from "./TypographyStyle.mjs";
13
14
  import p from "./TypographyTextShadow.mjs";
14
15
  import m from "./TypographyTransform.mjs";
15
16
  import { memo as h, use as g, useCallback as _ } from "react";
16
17
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
18
+ import { primaryFamily as b } from "@plitzi/sdk-shared/style";
17
19
  //#region src/components/StyleInspector/categories/Typography/Typography.tsx
18
- var b = [
20
+ var x = [
19
21
  "font-family",
20
22
  "font-weight",
21
23
  "font-size",
@@ -40,7 +42,7 @@ var b = [
40
42
  "vertical-align",
41
43
  "text-overflow",
42
44
  "line-clamp"
43
- ], x = [
45
+ ], S = [
44
46
  "text-decoration-thickness",
45
47
  "text-underline-offset",
46
48
  "word-break",
@@ -48,51 +50,50 @@ var b = [
48
50
  "hyphens",
49
51
  "vertical-align",
50
52
  "text-shadow"
51
- ], S = [
53
+ ], C = [
52
54
  "letter-spacing",
53
55
  "word-spacing",
54
56
  "text-indent"
55
- ], C = h(({ replaceTokens: h = !1, isCollapsed: C = !0, fonts: w, onCollapse: T }) => {
56
- let { setValue: E } = g(e), { "font-family": D, "font-weight": O, "font-size": k, "font-style": A, "text-align": j, "text-decoration": M, "text-decoration-thickness": N, "text-underline-offset": ee, "text-indent": P, "text-transform": F, "text-shadow": I, "white-space": L, "text-wrap": R, "word-break": z, "overflow-wrap": B, hyphens: V, "vertical-align": H, "text-overflow": U, "line-clamp": W, "line-height": G, color: K, "letter-spacing": q, "word-spacing": J, direction: Y } = t({
57
- keys: b,
57
+ ], w = h(({ replaceTokens: h = !1, isCollapsed: w = !0, onCollapse: T }) => {
58
+ let E = u(), { setValue: D } = g(e), { "font-family": O, "font-weight": k, "font-size": A, "font-style": j, "text-align": M, "text-decoration": N, "text-decoration-thickness": P, "text-underline-offset": F, "text-indent": ee, "text-transform": I, "text-shadow": L, "white-space": R, "text-wrap": z, "word-break": B, "overflow-wrap": V, hyphens: H, "vertical-align": U, "text-overflow": W, "line-clamp": G, "line-height": K, color: q, "letter-spacing": J, "word-spacing": Y, direction: X } = t({
59
+ keys: x,
58
60
  asValue: !0,
59
61
  replaceTokens: h
60
- }), X = _((e) => T?.("typography", e), [T]), Z = [...w ?? [], ...l].find((e) => e.name === D), Q = _((e) => (t) => E(e, t), [E]), $ = _((e) => E(void 0, e), [E]);
62
+ }), Z = _((e) => T?.("typography", e), [T]), Q = E.find((e) => e.family === b(typeof O == "string" ? O : "")), $ = _((e) => (t) => D(e, t), [D]), te = _((e) => D(void 0, e), [D]);
61
63
  return /* @__PURE__ */ y(a, {
62
64
  title: "Typography",
63
- dotKeys: b,
64
- advancedKeys: x,
65
- isCollapsed: C,
66
- onCollapse: X,
65
+ dotKeys: x,
66
+ advancedKeys: S,
67
+ isCollapsed: w,
68
+ onCollapse: Z,
67
69
  children: [
68
70
  /* @__PURE__ */ v(o, {
69
- partialValue: j,
70
- onChange: Q("text-align")
71
+ partialValue: M,
72
+ onChange: $("text-align")
71
73
  }),
72
74
  /* @__PURE__ */ v(d, {
73
- partialValue: D,
74
- fonts: w,
75
- onChange: Q("font-family")
75
+ partialValue: O,
76
+ onChange: $("font-family")
76
77
  }),
77
78
  /* @__PURE__ */ y(r, {
78
79
  label: "",
79
80
  children: [/* @__PURE__ */ v(n, {
80
81
  keys: ["font-weight"],
81
82
  label: "Weight",
82
- value: O,
83
- onChange: Q("font-weight"),
83
+ value: k,
84
+ onChange: $("font-weight"),
84
85
  type: "select",
85
- children: Object.keys(u).map((e) => /* @__PURE__ */ v("option", {
86
+ children: Object.keys(l).map((e) => /* @__PURE__ */ v("option", {
86
87
  value: e,
87
- disabled: !Z || !Z.weights.includes(e),
88
- children: u[Number(e)]
88
+ disabled: !Q?.weights.includes(Number(e)),
89
+ children: l[Number(e)]
89
90
  }, e))
90
91
  }), /* @__PURE__ */ v(n, {
91
92
  keys: ["color"],
92
93
  label: "Color",
93
94
  type: "color",
94
- value: K,
95
- onChange: Q("color")
95
+ value: q,
96
+ onChange: $("color")
96
97
  })]
97
98
  }),
98
99
  /* @__PURE__ */ y(r, {
@@ -100,72 +101,72 @@ var b = [
100
101
  children: [/* @__PURE__ */ v(n, {
101
102
  keys: ["font-size"],
102
103
  label: "Size",
103
- value: k,
104
- onChange: Q("font-size"),
104
+ value: A,
105
+ onChange: $("font-size"),
105
106
  type: "metric"
106
107
  }), /* @__PURE__ */ v(n, {
107
108
  keys: ["line-height"],
108
109
  label: "Line Height",
109
- value: G,
110
- onChange: Q("line-height"),
110
+ value: K,
111
+ onChange: $("line-height"),
111
112
  type: "metric"
112
113
  })]
113
114
  }),
114
115
  /* @__PURE__ */ v(f, {
115
- fontStyle: A,
116
- textDecoration: M,
117
- textDecorationThickness: N,
118
- textUnderlineOffset: ee,
119
- onChange: Q
116
+ fontStyle: j,
117
+ textDecoration: N,
118
+ textDecorationThickness: P,
119
+ textUnderlineOffset: F,
120
+ onChange: $
120
121
  }),
121
122
  /* @__PURE__ */ y(r, {
122
123
  label: "Letter",
123
- keys: S,
124
+ keys: C,
124
125
  children: [
125
126
  /* @__PURE__ */ v(n, {
126
127
  keys: ["letter-spacing"],
127
128
  label: "Spacing",
128
- value: q,
129
- onChange: Q("letter-spacing"),
129
+ value: J,
130
+ onChange: $("letter-spacing"),
130
131
  type: "metric"
131
132
  }),
132
133
  /* @__PURE__ */ v(n, {
133
134
  keys: ["word-spacing"],
134
135
  label: "Word",
135
- value: J,
136
- onChange: Q("word-spacing"),
136
+ value: Y,
137
+ onChange: $("word-spacing"),
137
138
  type: "metric"
138
139
  }),
139
140
  /* @__PURE__ */ v(n, {
140
141
  keys: ["text-indent"],
141
142
  label: "Indent",
142
- value: P,
143
- onChange: Q("text-indent"),
143
+ value: ee,
144
+ onChange: $("text-indent"),
144
145
  type: "metric"
145
146
  })
146
147
  ]
147
148
  }),
148
149
  /* @__PURE__ */ v(m, {
149
- textTransform: F,
150
- direction: Y,
151
- onChange: Q
150
+ textTransform: I,
151
+ direction: X,
152
+ onChange: $
152
153
  }),
153
154
  /* @__PURE__ */ v(s, {
154
- whiteSpace: L,
155
- textWrap: R,
156
- wordBreak: z,
157
- overflowWrap: B,
158
- hyphens: V,
159
- verticalAlign: H,
160
- onChange: Q
155
+ whiteSpace: R,
156
+ textWrap: z,
157
+ wordBreak: B,
158
+ overflowWrap: V,
159
+ hyphens: H,
160
+ verticalAlign: U,
161
+ onChange: $
161
162
  }),
162
163
  /* @__PURE__ */ y(r, {
163
164
  label: "",
164
165
  children: [/* @__PURE__ */ y(n, {
165
166
  keys: ["text-overflow"],
166
167
  label: "Overflow",
167
- value: U,
168
- onChange: Q("text-overflow"),
168
+ value: W,
169
+ onChange: $("text-overflow"),
169
170
  type: "select",
170
171
  children: [
171
172
  /* @__PURE__ */ v("option", {
@@ -190,16 +191,16 @@ var b = [
190
191
  })
191
192
  ]
192
193
  }), /* @__PURE__ */ v(c, {
193
- value: W,
194
- onChange: $
194
+ value: G,
195
+ onChange: te
195
196
  })]
196
197
  }),
197
198
  /* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(p, {
198
- value: I,
199
- onChange: Q("text-shadow")
199
+ value: L,
200
+ onChange: $("text-shadow")
200
201
  }) })
201
202
  ]
202
203
  });
203
204
  });
204
205
  //#endregion
205
- export { C as default };
206
+ export { w as default };
@@ -1,5 +1 @@
1
- export declare const defaultFonts: {
2
- name: string;
3
- weights: string[];
4
- }[];
5
1
  export declare const weights: Record<number, string>;
@@ -1,163 +1,5 @@
1
1
  //#region src/components/StyleInspector/categories/Typography/TypographyConstants.ts
2
- var e = [
3
- {
4
- name: "Arial",
5
- weights: ["400", "700"]
6
- },
7
- {
8
- name: "Bitter",
9
- weights: ["400", "700"]
10
- },
11
- {
12
- name: "Changa One",
13
- weights: ["400"]
14
- },
15
- {
16
- name: "Droid Sans",
17
- weights: ["400", "700"]
18
- },
19
- {
20
- name: "Droid Serif",
21
- weights: ["400", "700"]
22
- },
23
- {
24
- name: "Exo",
25
- weights: [
26
- "100",
27
- "200",
28
- "300",
29
- "400",
30
- "500",
31
- "600",
32
- "700"
33
- ]
34
- },
35
- {
36
- name: "Georgia",
37
- weights: ["400", "700"]
38
- },
39
- {
40
- name: "Great Vibes",
41
- weights: ["400"]
42
- },
43
- {
44
- name: "Impact",
45
- weights: ["700"]
46
- },
47
- {
48
- name: "Inconsolata",
49
- weights: ["400", "700"]
50
- },
51
- {
52
- name: "Lato",
53
- weights: [
54
- "100",
55
- "300",
56
- "400",
57
- "700",
58
- "900"
59
- ]
60
- },
61
- {
62
- name: "Merriweather",
63
- weights: [
64
- "300",
65
- "400",
66
- "700",
67
- "900"
68
- ]
69
- },
70
- {
71
- name: "Montserrat",
72
- weights: [
73
- "100",
74
- "200",
75
- "300",
76
- "400",
77
- "500",
78
- "600",
79
- "700"
80
- ]
81
- },
82
- {
83
- name: "Open Sans",
84
- weights: [
85
- "300",
86
- "400",
87
- "600",
88
- "700",
89
- "800"
90
- ]
91
- },
92
- {
93
- name: "Oswald",
94
- weights: [
95
- "200",
96
- "300",
97
- "400",
98
- "500",
99
- "600",
100
- "700"
101
- ]
102
- },
103
- {
104
- name: "PT Sans",
105
- weights: ["400", "700"]
106
- },
107
- {
108
- name: "Palatino Linotype",
109
- weights: ["400", "700"]
110
- },
111
- {
112
- name: "Tahoma",
113
- weights: ["400", "700"]
114
- },
115
- {
116
- name: "Times New Roman",
117
- weights: ["400", "700"]
118
- },
119
- {
120
- name: "Trebuchet MS",
121
- weights: ["400", "700"]
122
- },
123
- {
124
- name: "Ubuntu",
125
- weights: [
126
- "300",
127
- "400",
128
- "500",
129
- "700"
130
- ]
131
- },
132
- {
133
- name: "Varela",
134
- weights: ["400"]
135
- },
136
- {
137
- name: "Varela Round",
138
- weights: ["400"]
139
- },
140
- {
141
- name: "Verdana",
142
- weights: ["400", "700"]
143
- },
144
- {
145
- name: "Vollkorn",
146
- weights: ["400", "700"]
147
- },
148
- {
149
- name: "system-ui",
150
- weights: [
151
- "100",
152
- "200",
153
- "300",
154
- "400",
155
- "500",
156
- "600",
157
- "700"
158
- ]
159
- }
160
- ], t = {
2
+ var e = {
161
3
  100: "Thin",
162
4
  200: "Extra Light",
163
5
  300: "Light",
@@ -169,4 +11,4 @@ var e = [
169
11
  900: "Black"
170
12
  };
171
13
  //#endregion
172
- export { e as defaultFonts, t as weights };
14
+ export { e as weights };
@@ -1,10 +1,7 @@
1
1
  import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
2
2
  export type TypographyFontProps = {
3
3
  partialValue?: StyleValue;
4
- fonts?: {
5
- name: string;
6
- }[];
7
4
  onChange?: (value: StyleValue | Record<StyleCategory, StyleValue> | boolean) => void;
8
5
  };
9
- declare const TypographyFont: ({ partialValue, fonts, onChange }: TypographyFontProps) => import("react").JSX.Element;
6
+ declare const TypographyFont: ({ partialValue, onChange }: TypographyFontProps) => import("react").JSX.Element;
10
7
  export default TypographyFont;
@@ -1,22 +1,29 @@
1
1
  import e from "../../components/CategoryOption/index.mjs";
2
2
  import t from "../../components/CategorySection/index.mjs";
3
- import { defaultFonts as n } from "./TypographyConstants.mjs";
4
- import { useMemo as r } from "react";
3
+ import n from "../../../../hooks/useSpaceFonts.mjs";
4
+ import { useCallback as r } from "react";
5
5
  import { jsx as i } from "react/jsx-runtime";
6
+ import { fontFamilyStack as a, primaryFamily as o } from "@plitzi/sdk-shared/style";
6
7
  //#region src/components/StyleInspector/categories/Typography/TypographyFont.tsx
7
- var a = ({ partialValue: a, fonts: o, onChange: s }) => (o = r(() => [...o ?? [], ...n], [o]), /* @__PURE__ */ i(t, {
8
- label: "F. Family",
9
- keys: ["font-family"],
10
- children: /* @__PURE__ */ i(e, {
11
- value: a,
12
- onChange: s,
13
- type: "select",
14
- children: o.map((e) => /* @__PURE__ */ i("option", {
15
- style: { fontFamily: e.name },
16
- value: e.name,
17
- children: e.name
18
- }, e.name))
19
- })
20
- }));
8
+ var s = ({ partialValue: s, onChange: c }) => {
9
+ let l = n(), u = typeof s == "string" ? o(s) : "", d = r((e) => {
10
+ let t = l.find((t) => t.family === e);
11
+ c?.(t ? a(t) : e);
12
+ }, [l, c]);
13
+ return /* @__PURE__ */ i(t, {
14
+ label: "F. Family",
15
+ keys: ["font-family"],
16
+ children: /* @__PURE__ */ i(e, {
17
+ value: u,
18
+ onChange: d,
19
+ type: "select",
20
+ children: l.map((e) => /* @__PURE__ */ i("option", {
21
+ style: { fontFamily: a(e) },
22
+ value: e.family,
23
+ children: e.family
24
+ }, e.family))
25
+ })
26
+ });
27
+ };
21
28
  //#endregion
22
- export { a as default };
29
+ export { s as default };
@@ -1,9 +1,9 @@
1
1
  import e from "../../hooks/useInspectorValues.mjs";
2
2
  import t from "../CategoryAdvanced/CategoryAdvancedContext.mjs";
3
3
  import n from "../InspectorDots/index.mjs";
4
- import r from "clsx";
5
- import { useCallback as i } from "react";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ import { useCallback as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import o from "clsx";
7
7
  import s from "@plitzi/plitzi-ui/Icon";
8
8
  import c from "@plitzi/plitzi-ui/hooks/useStorage";
9
9
  import l from "@plitzi/plitzi-ui/ContainerCollapsable";
@@ -12,26 +12,26 @@ var u = ({ className: u, classNameContent: d, children: f, title: p = "Title", d
12
12
  let [v, y] = c(`builder-state.styleInspector.advanced.${p}`, !1), { hasValues: b } = e({
13
13
  keys: h,
14
14
  asValue: !1
15
- }), x = i((e) => {
15
+ }), x = r((e) => {
16
16
  e.stopPropagation(), y((e) => !e);
17
17
  }, [y]);
18
- return /* @__PURE__ */ o(l, {
18
+ return /* @__PURE__ */ a(l, {
19
19
  className: u,
20
20
  collapsed: g,
21
21
  onChange: _,
22
- children: [/* @__PURE__ */ a(l.Header, {
23
- className: r("h-8", {
22
+ children: [/* @__PURE__ */ i(l.Header, {
23
+ className: o("h-8", {
24
24
  "border-b border-gray-200 hover:bg-slate-100 dark:border-zinc-700 dark:hover:bg-zinc-700/50": g,
25
25
  "bg-slate-100 dark:bg-zinc-700/50": !g
26
26
  }),
27
27
  title: p,
28
28
  placement: "right",
29
- iconCollapsed: /* @__PURE__ */ a(s, { icon: "fa-solid fa-angle-down" }),
30
- iconExpanded: /* @__PURE__ */ a(s, { icon: "fa-solid fa-angle-up" }),
31
- children: /* @__PURE__ */ o("div", {
29
+ iconCollapsed: /* @__PURE__ */ i(s, { icon: "fa-solid fa-angle-down" }),
30
+ iconExpanded: /* @__PURE__ */ i(s, { icon: "fa-solid fa-angle-up" }),
31
+ children: /* @__PURE__ */ a("div", {
32
32
  className: "flex items-center gap-2",
33
- children: [/* @__PURE__ */ a(n, { styleKeys: m }), !!h?.length && !g && /* @__PURE__ */ a(s, {
34
- className: r("cursor-pointer text-xs", {
33
+ children: [/* @__PURE__ */ i(n, { styleKeys: m }), !!h?.length && !g && /* @__PURE__ */ i(s, {
34
+ className: o("cursor-pointer text-xs", {
35
35
  "text-blue-500": v,
36
36
  "text-orange-500": !v && b,
37
37
  "text-gray-400 hover:text-gray-600 dark:text-zinc-500 dark:hover:text-zinc-300": !v && !b
@@ -41,9 +41,9 @@ var u = ({ className: u, classNameContent: d, children: f, title: p = "Title", d
41
41
  onClick: x
42
42
  })]
43
43
  })
44
- }), /* @__PURE__ */ a(l.Content, {
45
- className: r("flex flex-col gap-3 p-2", { "border-b border-gray-200 dark:border-zinc-700": !g }, d),
46
- children: /* @__PURE__ */ a(t, {
44
+ }), /* @__PURE__ */ i(l.Content, {
45
+ className: o("flex flex-col gap-3 p-2", { "border-b border-gray-200 dark:border-zinc-700": !g }, d),
46
+ children: /* @__PURE__ */ i(t, {
47
47
  value: v,
48
48
  children: f
49
49
  })
@@ -1,27 +1,27 @@
1
- import e from "clsx";
2
- import { useCallback as t, useMemo as n } from "react";
3
- import { jsx as r } from "react/jsx-runtime";
1
+ import { useCallback as e, useMemo as t } from "react";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import r from "clsx";
4
4
  import i from "@plitzi/plitzi-ui/IconGroup";
5
5
  //#region src/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.tsx
6
6
  var a = ({ items: a = [], onChange: o }) => {
7
- let s = n(() => a.filter((e) => typeof e.isVisible != "boolean" || e.isVisible), [a]), c = t((e) => () => o?.(e), [o]);
8
- return /* @__PURE__ */ r(i, {
7
+ let s = t(() => a.filter((e) => typeof e.isVisible != "boolean" || e.isVisible), [a]), c = e((e) => () => o?.(e), [o]);
8
+ return /* @__PURE__ */ n(i, {
9
9
  className: "w-full px-1.5 py-1",
10
10
  gap: 1,
11
11
  size: "md",
12
- children: s.map((t, n) => /* @__PURE__ */ r(i.Icon, {
13
- size: t.size,
14
- className: e("cursor-pointer rounded-sm p-0.5", {
15
- "bg-zinc-300 dark:bg-zinc-800": t.active,
16
- "text-xs": typeof t.icon == "string",
17
- "h-5 w-5": t.size !== "custom"
12
+ children: s.map((e, t) => /* @__PURE__ */ n(i.Icon, {
13
+ size: e.size,
14
+ className: r("cursor-pointer rounded-sm p-0.5", {
15
+ "bg-zinc-300 dark:bg-zinc-800": e.active,
16
+ "text-xs": typeof e.icon == "string",
17
+ "h-5 w-5": e.size !== "custom"
18
18
  }),
19
- active: t.active,
20
- onClick: c(t.value),
21
- icon: typeof t.icon == "string" ? t.icon : void 0,
22
- title: t.description,
23
- children: typeof t.icon != "string" && t.icon
24
- }, n))
19
+ active: e.active,
20
+ onClick: c(e.value),
21
+ icon: typeof e.icon == "string" ? e.icon : void 0,
22
+ title: e.description,
23
+ children: typeof e.icon != "string" && e.icon
24
+ }, t))
25
25
  });
26
26
  };
27
27
  //#endregion
@@ -1,6 +1,6 @@
1
- import e from "clsx";
2
- import { useCallback as t } from "react";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
+ import { useCallback as e } from "react";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import r from "clsx";
4
4
  import i from "@plitzi/plitzi-ui/MetricInput";
5
5
  //#region src/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.tsx
6
6
  var a = ({ value: a, className: o, preffix: s = "", min: c, max: l, step: u, units: d = [
@@ -45,13 +45,13 @@ var a = ({ value: a, className: o, preffix: s = "", min: c, max: l, step: u, uni
45
45
  value: "lvw"
46
46
  }
47
47
  ], allowedWords: f = ["auto", "none"], allowVariables: p = !0, onChange: m }) => {
48
- let h = t((e) => m?.(e), [m]);
49
- return /* @__PURE__ */ r("div", {
48
+ let h = e((e) => m?.(e), [m]);
49
+ return /* @__PURE__ */ n("div", {
50
50
  className: "flex items-center gap-1",
51
- children: [s && /* @__PURE__ */ r("span", {
51
+ children: [s && /* @__PURE__ */ n("span", {
52
52
  className: "text-xs",
53
53
  children: [s, ":"]
54
- }), /* @__PURE__ */ n(i, {
54
+ }), /* @__PURE__ */ t(i, {
55
55
  size: "xs",
56
56
  value: a,
57
57
  min: c,
@@ -61,7 +61,7 @@ var a = ({ value: a, className: o, preffix: s = "", min: c, max: l, step: u, uni
61
61
  allowedWords: f,
62
62
  allowVariables: p,
63
63
  onChange: h,
64
- className: e("w-full min-w-0", o)
64
+ className: r("w-full min-w-0", o)
65
65
  })]
66
66
  });
67
67
  };
@@ -1,12 +1,12 @@
1
- import e from "clsx";
2
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import t from "clsx";
3
3
  import n from "@plitzi/plitzi-ui/Select";
4
4
  //#region src/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.tsx
5
- var r = ({ children: r, className: i, value: a, onChange: o }) => /* @__PURE__ */ t(n, {
5
+ var r = ({ children: r, className: i, value: a, onChange: o }) => /* @__PURE__ */ e(n, {
6
6
  size: "xs",
7
7
  value: a,
8
8
  onChange: o,
9
- className: e("w-full min-w-0", i),
9
+ className: t("w-full min-w-0", i),
10
10
  children: r
11
11
  });
12
12
  //#endregion
@@ -1,29 +1,29 @@
1
1
  import e from "../../StyleInspectorContext.mjs";
2
2
  import t from "../../hooks/useInspectorValues.mjs";
3
- import n from "clsx";
4
- import { memo as r, use as i, useCallback as a } from "react";
5
- import { jsx as o } from "react/jsx-runtime";
6
- var s = r(({ keyValue: r, children: s, className: c = "", size: l = "small", sectionTitle: u = !1 }) => {
7
- let { resetValue: d } = i(e), { hasValues: f, hasInherit: p, hasBinding: m, hasVariables: h } = t({
8
- keys: r,
3
+ import { memo as n, use as r, useCallback as i } from "react";
4
+ import { jsx as a } from "react/jsx-runtime";
5
+ import o from "clsx";
6
+ var s = n(({ keyValue: n, children: s, className: c = "", size: l = "small", sectionTitle: u = !1 }) => {
7
+ let { resetValue: d } = r(e), { hasValues: f, hasInherit: p, hasBinding: m, hasVariables: h } = t({
8
+ keys: n,
9
9
  asValue: !1
10
- }), g = a(() => {
11
- !f || !r || d(r);
10
+ }), g = i(() => {
11
+ f && n && d(n);
12
12
  }, [
13
13
  d,
14
14
  f,
15
- r
15
+ n
16
16
  ]);
17
- return /* @__PURE__ */ o("div", {
18
- className: n("inspector__label flex min-w-[50px] shrink-0 items-center select-none", c, {
17
+ return /* @__PURE__ */ a("div", {
18
+ className: o("inspector__label flex min-w-[50px] shrink-0 items-center select-none", c, {
19
19
  "text-xs": l === "small",
20
20
  "text-sm": l === "medium",
21
21
  "text-base": l === "normal",
22
22
  "mb-[-1px] p-0": u
23
23
  }),
24
24
  title: typeof s == "string" ? s : void 0,
25
- children: /* @__PURE__ */ o("label", {
26
- className: n("m-0 truncate", {
25
+ children: /* @__PURE__ */ a("label", {
26
+ className: o("m-0 truncate", {
27
27
  "px-1": !u,
28
28
  "rounded-tl rounded-tr border border-gray-300 bg-gray-100 px-2 font-bold text-zinc-700 dark:border-zinc-600 dark:bg-zinc-700 dark:text-zinc-200": u,
29
29
  "cursor-pointer bg-blue-200 text-blue-600 dark:bg-blue-900/50 dark:text-blue-400": f && !m && !h,