@plitzi/sdk-style 0.38.10 → 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 (173) hide show
  1. package/CHANGELOG.md +289 -0
  2. package/dist/StyleMap/helpers/isValueValid.mjs +5 -4
  3. package/dist/StyleMap/helpers/utils.mjs +13 -12
  4. package/dist/components/InputEasing/InputEasingButton.mjs +1 -1
  5. package/dist/components/InputEasing/InputEasingList.mjs +5 -5
  6. package/dist/components/Selector/Selector.mjs +2 -1
  7. package/dist/components/Selector/SelectorItem/ItemOptions.mjs +45 -41
  8. package/dist/components/Selector/SelectorItem/SelectorItem.mjs +4 -4
  9. package/dist/components/Selector/SelectorItem/helpers.d.ts +2 -0
  10. package/dist/components/Selector/SelectorItem/helpers.mjs +4 -0
  11. package/dist/components/StyleInspector/Inspector.mjs +185 -171
  12. package/dist/components/StyleInspector/InspectorSearchContext.d.ts +3 -0
  13. package/dist/components/StyleInspector/InspectorSearchContext.mjs +6 -0
  14. package/dist/components/StyleInspector/StyleInspector.mjs +213 -187
  15. package/dist/components/StyleInspector/categories/Background/Background.mjs +84 -177
  16. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.d.ts +8 -0
  17. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.mjs +53 -0
  18. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.d.ts +3 -0
  19. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.mjs +5 -0
  20. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +159 -153
  21. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.d.ts +11 -0
  22. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.mjs +45 -0
  23. package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +26 -23
  24. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +65 -56
  25. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.d.ts +4 -0
  26. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.mjs +8 -0
  27. package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +28 -27
  28. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.d.ts +8 -0
  29. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.mjs +28 -0
  30. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.d.ts +3 -0
  31. package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.mjs +5 -0
  32. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +4 -2
  33. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +19 -18
  34. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +4 -0
  35. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +48 -80
  36. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +5 -3
  37. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +51 -41
  38. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +5 -1
  39. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +54 -32
  40. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +3 -1
  41. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +14 -13
  42. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.d.ts +8 -0
  43. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.mjs +8 -0
  44. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.d.ts +8 -0
  45. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +11 -0
  46. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.d.ts +3 -0
  47. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs +5 -0
  48. package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.d.ts +21 -7
  49. package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +114 -113
  50. package/dist/components/StyleInspector/categories/Background/helpers/layerValues.d.ts +8 -0
  51. package/dist/components/StyleInspector/categories/Background/helpers/layerValues.mjs +11 -0
  52. package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +22 -79
  53. package/dist/components/StyleInspector/categories/Background/modes/ImageMode.mjs +16 -77
  54. package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +19 -62
  55. package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +58 -98
  56. package/dist/components/StyleInspector/categories/Background/modes/RawMode.d.ts +8 -0
  57. package/dist/components/StyleInspector/categories/Background/modes/RawMode.mjs +22 -0
  58. package/dist/components/StyleInspector/categories/Background/modes/helpers.d.ts +19 -0
  59. package/dist/components/StyleInspector/categories/Background/modes/helpers.mjs +54 -0
  60. package/dist/components/StyleInspector/categories/Border/Border.mjs +26 -43
  61. package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +60 -51
  62. package/dist/components/StyleInspector/categories/Display/Display.mjs +65 -81
  63. package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +14 -1
  64. package/dist/components/StyleInspector/categories/Display/DisplayGap.mjs +26 -13
  65. package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +33 -38
  66. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +13 -36
  67. package/dist/components/StyleInspector/categories/Effects/Effects.mjs +120 -204
  68. package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +23 -31
  69. package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +9 -5
  70. package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +57 -124
  71. package/dist/components/StyleInspector/categories/Effects/Filters/helpers.d.ts +25 -0
  72. package/dist/components/StyleInspector/categories/Effects/Filters/helpers.mjs +87 -0
  73. package/dist/components/StyleInspector/categories/Effects/Transform/Transform.mjs +18 -28
  74. package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +1 -2
  75. package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +52 -76
  76. package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.d.ts +5 -0
  77. package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.mjs +8 -2
  78. package/dist/components/StyleInspector/categories/Effects/Transition/Transition.mjs +21 -37
  79. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.d.ts +10 -0
  80. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +92 -0
  81. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +4 -4
  82. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +78 -359
  83. package/dist/components/StyleInspector/categories/Effects/Transition/helpers.d.ts +39 -0
  84. package/dist/components/StyleInspector/categories/Effects/Transition/helpers.mjs +268 -0
  85. package/dist/components/StyleInspector/categories/List/List.mjs +21 -70
  86. package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +21 -70
  87. package/dist/components/StyleInspector/categories/Others/Others.mjs +63 -85
  88. package/dist/components/StyleInspector/categories/Position/Position.mjs +67 -75
  89. package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +19 -18
  90. package/dist/components/StyleInspector/categories/Size/Size.mjs +65 -85
  91. package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +18 -27
  92. package/dist/components/StyleInspector/categories/Spacing/SpacingBox.d.ts +15 -0
  93. package/dist/components/StyleInspector/categories/Spacing/SpacingBox.mjs +63 -0
  94. package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +3 -11
  95. package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +18 -70
  96. package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +3 -7
  97. package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +16 -67
  98. package/dist/components/StyleInspector/categories/Typography/Typography.mjs +58 -67
  99. package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +1 -1
  100. package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +1 -1
  101. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +16 -40
  102. package/dist/components/StyleInspector/categories/Variables/Variables.mjs +38 -37
  103. package/dist/components/StyleInspector/categories/blendModes.d.ts +2 -0
  104. package/dist/components/StyleInspector/categories/blendModes.mjs +21 -0
  105. package/dist/components/StyleInspector/categories/listMarkers.d.ts +8 -0
  106. package/dist/components/StyleInspector/categories/listMarkers.mjs +25 -0
  107. package/dist/components/StyleInspector/categoryKeys.d.ts +45 -0
  108. package/dist/components/StyleInspector/categoryKeys.mjs +220 -0
  109. package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +43 -38
  110. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +2 -1
  111. package/dist/components/StyleInspector/components/CategorySection/CategorySection.mjs +30 -15
  112. package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.d.ts +8 -0
  113. package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.mjs +23 -0
  114. package/dist/components/StyleInspector/components/ColorSwatch/helpers.d.ts +3 -0
  115. package/dist/components/StyleInspector/components/ColorSwatch/helpers.mjs +9 -0
  116. package/dist/components/StyleInspector/components/ColorSwatch/index.d.ts +3 -0
  117. package/dist/components/StyleInspector/components/ColorSwatch/index.mjs +5 -0
  118. package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +1 -0
  119. package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +11 -11
  120. package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.d.ts +11 -0
  121. package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +38 -0
  122. package/dist/components/StyleInspector/components/InspectorFooter/helpers.d.ts +2 -0
  123. package/dist/components/StyleInspector/components/InspectorFooter/helpers.mjs +11 -0
  124. package/dist/components/StyleInspector/components/InspectorFooter/index.d.ts +3 -0
  125. package/dist/components/StyleInspector/components/InspectorFooter/index.mjs +5 -0
  126. package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +34 -31
  127. package/dist/components/StyleInspector/components/InspectorLabel/helpers.d.ts +17 -0
  128. package/dist/components/StyleInspector/components/InspectorLabel/helpers.mjs +16 -0
  129. package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.d.ts +7 -0
  130. package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +24 -0
  131. package/dist/components/StyleInspector/components/InspectorSearch/index.d.ts +3 -0
  132. package/dist/components/StyleInspector/components/InspectorSearch/index.mjs +5 -0
  133. package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.d.ts +9 -0
  134. package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +110 -0
  135. package/dist/components/StyleInspector/components/ShadowItem/index.d.ts +3 -0
  136. package/dist/components/StyleInspector/components/ShadowItem/index.mjs +5 -0
  137. package/dist/components/StyleInspector/components/ShadowList/ShadowList.d.ts +15 -0
  138. package/dist/components/StyleInspector/components/ShadowList/ShadowList.mjs +25 -0
  139. package/dist/components/StyleInspector/components/ShadowList/index.d.ts +3 -0
  140. package/dist/components/StyleInspector/components/ShadowList/index.mjs +5 -0
  141. package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.d.ts +7 -0
  142. package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +24 -0
  143. package/dist/components/StyleInspector/components/TargetSummary/index.d.ts +3 -0
  144. package/dist/components/StyleInspector/components/TargetSummary/index.mjs +5 -0
  145. package/dist/components/StyleInspector/components/ValueList/ValueList.d.ts +12 -0
  146. package/dist/components/StyleInspector/components/ValueList/ValueList.mjs +25 -0
  147. package/dist/components/StyleInspector/components/ValueList/index.d.ts +3 -0
  148. package/dist/components/StyleInspector/components/ValueList/index.mjs +5 -0
  149. package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.d.ts +16 -0
  150. package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +71 -0
  151. package/dist/components/StyleInspector/components/ValueListItem/index.d.ts +3 -0
  152. package/dist/components/StyleInspector/components/ValueListItem/index.mjs +5 -0
  153. package/dist/components/StyleInspector/cssValues.d.ts +13 -0
  154. package/dist/components/StyleInspector/cssValues.mjs +23 -0
  155. package/dist/components/StyleInspector/helpers.d.ts +17 -1
  156. package/dist/components/StyleInspector/helpers.mjs +9 -2
  157. package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +42 -45
  158. package/dist/components/StyleInspector/hooks/usePropertyChange.d.ts +6 -0
  159. package/dist/components/StyleInspector/hooks/usePropertyChange.mjs +9 -0
  160. package/dist/components/StyleInspector/search.d.ts +11 -0
  161. package/dist/components/StyleInspector/search.mjs +14 -0
  162. package/dist/components/StyleInspector/shadowValue.d.ts +20 -0
  163. package/dist/components/StyleInspector/shadowValue.mjs +36 -0
  164. package/dist/components/StyleManager/StyleSelectorTag.mjs +1 -1
  165. package/package.json +225 -21
  166. package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +0 -8
  167. package/dist/components/StyleInspector/categories/Display/DisplayGridGap.mjs +0 -27
  168. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +0 -8
  169. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +0 -132
  170. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.d.ts +0 -2
  171. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.mjs +0 -18
  172. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +0 -8
  173. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.mjs +0 -83
@@ -1,42 +1,24 @@
1
1
  import e from "../../StyleInspectorContext.mjs";
2
2
  import t from "../../hooks/useInspectorValues.mjs";
3
- import n from "../../components/CategoryContainer/index.mjs";
4
- import r from "./DisplayElements.mjs";
5
- import i from "./DisplayFlex.mjs";
6
- import a from "./DisplayFlexAlignContent.mjs";
7
- import o from "./DisplayFlexAlignItems.mjs";
8
- import s from "./DisplayFlexDirection.mjs";
9
- import c from "./DisplayFlexJustify.mjs";
10
- import l from "./DisplayGap.mjs";
11
- import u from "./DisplayGridGap.mjs";
3
+ import { DISPLAY_KEYS as n } from "../../categoryKeys.mjs";
4
+ import r from "../../components/CategoryContainer/index.mjs";
5
+ import i from "./DisplayElements.mjs";
6
+ import a from "./DisplayFlex.mjs";
7
+ import o from "./DisplayFlexAlignContent.mjs";
8
+ import s from "./DisplayFlexAlignItems.mjs";
9
+ import c from "./DisplayFlexDirection.mjs";
10
+ import l from "./DisplayFlexJustify.mjs";
11
+ import u from "./DisplayGap.mjs";
12
12
  import d from "./DisplayGridTemplate.mjs";
13
13
  import { memo as f, use as p, useCallback as m } from "react";
14
14
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
15
- //#region src/components/StyleInspector/categories/Display/Display.tsx
16
- var v = [
17
- "flex-direction",
18
- "flex-wrap",
19
- "align-items",
20
- "justify-content",
21
- "align-content",
22
- "column-gap",
23
- "row-gap",
24
- "grid-row-gap",
25
- "grid-column-gap",
26
- "grid-template-areas",
27
- "grid-template-columns",
28
- "grid-template-rows",
29
- "grid-auto-flow",
30
- "grid-auto-rows",
31
- "grid-auto-columns",
32
- "display"
33
- ], y = f(({ replaceTokens: f = !1, isCollapsed: y = !0, onCollapse: b }) => {
34
- let { setValue: x } = p(e), { display: S, "flex-direction": C, "flex-wrap": w, "align-items": T, "justify-content": E, "row-gap": D, "column-gap": O, "grid-template-areas": k, "grid-template-columns": A, "grid-template-rows": j, "grid-auto-flow": M, "grid-auto-rows": N, "grid-auto-columns": P, "grid-row-gap": F, "grid-column-gap": I, "align-content": L } = t({
35
- keys: v,
15
+ var v = f(({ replaceTokens: f = !1, isCollapsed: v = !0, onCollapse: y }) => {
16
+ let { setValue: b } = p(e), { display: x, "flex-direction": S, "flex-wrap": C, "align-items": w, "justify-content": T, "row-gap": E, "column-gap": D, "grid-template-areas": O, "grid-template-columns": k, "grid-template-rows": A, "grid-auto-flow": j, "grid-auto-rows": M, "grid-auto-columns": N, "grid-row-gap": P, "grid-column-gap": F, "align-content": I } = t({
17
+ keys: n.dot,
36
18
  asValue: !0,
37
19
  replaceTokens: f
38
- }), R = m((e, t) => {
39
- e === "display" ? x(void 0, {
20
+ }), L = m((e, t) => {
21
+ e === "display" ? b(void 0, {
40
22
  "flex-direction": void 0,
41
23
  "flex-wrap": void 0,
42
24
  "align-items": void 0,
@@ -53,68 +35,70 @@ var v = [
53
35
  "grid-auto-rows": void 0,
54
36
  "grid-auto-columns": void 0,
55
37
  display: t
56
- }) : x(e, t);
57
- }, [x]), z = m((e) => b?.("display", e), [b]), B = typeof C == "string" && C.includes("reverse"), V = typeof C == "string" && C.includes("row"), H = typeof w == "string" && w.includes("reverse");
58
- return /* @__PURE__ */ _(n, {
59
- title: "Layout",
60
- dotKeys: v,
61
- isCollapsed: y,
62
- onCollapse: z,
38
+ }) : b(e, t);
39
+ }, [b]), R = m((e) => y?.("display", e), [y]), z = typeof S == "string" && S.includes("reverse"), B = typeof S == "string" && S.includes("row"), V = typeof C == "string" && C.includes("reverse");
40
+ return /* @__PURE__ */ _(r, {
41
+ title: n.title,
42
+ dotKeys: n.dot,
43
+ isCollapsed: v,
44
+ onCollapse: R,
63
45
  children: [
64
- /* @__PURE__ */ g(r, {
65
- value: S,
66
- onChange: R
46
+ /* @__PURE__ */ g(i, {
47
+ value: x,
48
+ onChange: L
67
49
  }),
68
- S === "flex" && /* @__PURE__ */ _(h, { children: [
69
- /* @__PURE__ */ g(s, {
70
- value: C,
71
- onChange: R,
72
- isReverse: B
73
- }),
74
- /* @__PURE__ */ g(o, {
75
- value: T,
76
- onChange: R,
77
- isReverse: B,
78
- isRow: V
79
- }),
50
+ x === "flex" && /* @__PURE__ */ _(h, { children: [
80
51
  /* @__PURE__ */ g(c, {
81
- value: E,
82
- onChange: R,
83
- isReverse: B,
84
- isRow: V
52
+ value: S,
53
+ onChange: L,
54
+ isReverse: z
85
55
  }),
86
- /* @__PURE__ */ g(i, {
56
+ /* @__PURE__ */ g(s, {
87
57
  value: w,
88
- onChange: R,
89
- isReverse: H
58
+ onChange: L,
59
+ isReverse: z,
60
+ isRow: B
90
61
  }),
91
62
  /* @__PURE__ */ g(l, {
92
- rowGap: D,
93
- columnGap: O,
94
- onChange: R
63
+ value: T,
64
+ onChange: L,
65
+ isReverse: z,
66
+ isRow: B
67
+ }),
68
+ /* @__PURE__ */ g(a, {
69
+ value: C,
70
+ onChange: L,
71
+ isReverse: V
72
+ }),
73
+ /* @__PURE__ */ g(u, {
74
+ layout: "flex",
75
+ rowGap: E,
76
+ columnGap: D,
77
+ onChange: L
95
78
  })
96
79
  ] }),
97
- S === "grid" && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, {
98
- templateAreas: k,
99
- templateColumns: A,
100
- templateRows: j,
101
- templateAutoFlow: M,
102
- templateAutoRows: N,
103
- templateAutoColumns: P,
104
- onChange: R
80
+ x === "grid" && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, {
81
+ templateAreas: O,
82
+ templateColumns: k,
83
+ templateRows: A,
84
+ templateAutoFlow: j,
85
+ templateAutoRows: M,
86
+ templateAutoColumns: N,
87
+ onChange: L
105
88
  }), /* @__PURE__ */ g(u, {
106
- rowGap: F,
107
- columnGap: I,
108
- onChange: R
89
+ layout: "grid",
90
+ rowGap: P,
91
+ columnGap: F,
92
+ onChange: L
109
93
  })] }),
110
- S === "flex" && (w === "wrap" || w === "wrap-reverse") && /* @__PURE__ */ g(a, {
111
- value: L,
112
- onChange: R,
113
- isReverse: H,
114
- isRow: V
94
+ x === "flex" && (C === "wrap" || C === "wrap-reverse") && /* @__PURE__ */ g(o, {
95
+ value: I,
96
+ onChange: L,
97
+ isReverse: V,
98
+ isRow: B
115
99
  })
116
100
  ]
117
101
  });
118
102
  });
119
103
  //#endregion
120
- export { y as default };
104
+ export { v as default };
@@ -1,8 +1,21 @@
1
1
  import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
2
+ /** The two gaps each layout writes. */
3
+ declare const GAPS: {
4
+ readonly flex: {
5
+ readonly row: "row-gap";
6
+ readonly column: "column-gap";
7
+ };
8
+ readonly grid: {
9
+ readonly row: "grid-row-gap";
10
+ readonly column: "grid-column-gap";
11
+ };
12
+ };
2
13
  export type DisplayGapProps = {
14
+ /** Whose gaps: a flex container's, or a grid's. */
15
+ layout: keyof typeof GAPS;
3
16
  rowGap?: StyleValue;
4
17
  columnGap?: StyleValue;
5
18
  onChange?: (type: StyleCategory, value: StyleValue) => void;
6
19
  };
7
- declare const DisplayGap: ({ rowGap, columnGap, onChange }: DisplayGapProps) => import('react').JSX.Element;
20
+ declare const DisplayGap: ({ layout, rowGap, columnGap, onChange }: DisplayGapProps) => import('react').JSX.Element;
8
21
  export default DisplayGap;
@@ -1,27 +1,40 @@
1
1
  import e from "../../components/CategoryOption/index.mjs";
2
2
  import t from "../../components/CategorySection/index.mjs";
3
- import { useCallback as n } from "react";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
+ import { useCallback as n, useMemo as r } from "react";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region src/components/StyleInspector/categories/Display/DisplayGap.tsx
6
- var a = ["row-gap", "column-gap"], o = ["row-gap"], s = ["column-gap"], c = ({ rowGap: c = "0px", columnGap: l = "0px", onChange: u }) => {
7
- let d = n((e) => u?.("row-gap", e), [u]), f = n((e) => u?.("column-gap", e), [u]);
8
- return /* @__PURE__ */ i(t, {
6
+ var o = {
7
+ flex: {
8
+ row: "row-gap",
9
+ column: "column-gap"
10
+ },
11
+ grid: {
12
+ row: "grid-row-gap",
13
+ column: "grid-column-gap"
14
+ }
15
+ }, s = ({ layout: s, rowGap: c = "0px", columnGap: l = "0px", onChange: u }) => {
16
+ let { row: d, column: f } = o[s], p = r(() => ({
17
+ both: [d, f],
18
+ row: [d],
19
+ column: [f]
20
+ }), [f, d]), m = n((e) => u?.(d, e), [u, d]), h = n((e) => u?.(f, e), [f, u]);
21
+ return /* @__PURE__ */ a(t, {
9
22
  label: "Gap",
10
- keys: a,
11
- children: [/* @__PURE__ */ r(e, {
12
- keys: o,
23
+ keys: p.both,
24
+ children: [/* @__PURE__ */ i(e, {
25
+ keys: p.row,
13
26
  label: "Row",
14
27
  value: c,
15
- onChange: d,
28
+ onChange: m,
16
29
  type: "metric"
17
- }), /* @__PURE__ */ r(e, {
18
- keys: s,
30
+ }), /* @__PURE__ */ i(e, {
31
+ keys: p.column,
19
32
  label: "Column",
20
33
  value: l,
21
- onChange: f,
34
+ onChange: h,
22
35
  type: "metric"
23
36
  })]
24
37
  });
25
38
  };
26
39
  //#endregion
27
- export { c as default };
40
+ export { s as default };
@@ -2,39 +2,34 @@ import e from "../../StyleInspectorContext.mjs";
2
2
  import t from "../../hooks/useInspectorValues.mjs";
3
3
  import n from "../../components/CategoryOption/index.mjs";
4
4
  import r from "../../components/CategorySection/index.mjs";
5
- import i from "../../components/CategoryContainer/index.mjs";
6
- import a from "./DisplayAlignSelf.mjs";
7
- import o from "./DisplayOrder.mjs";
8
- import { memo as s, use as c, useCallback as l, useMemo as u } from "react";
9
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
10
- import p from "@plitzi/plitzi-ui/icons/FlexGrowRow";
11
- import m from "@plitzi/plitzi-ui/icons/FlexNoneRow";
12
- import h from "@plitzi/plitzi-ui/icons/FlexShrinkRow";
5
+ import { FLEX_CHILD_KEYS as i } from "../../categoryKeys.mjs";
6
+ import a from "../../components/CategoryContainer/index.mjs";
7
+ import o from "./DisplayAlignSelf.mjs";
8
+ import s from "./DisplayOrder.mjs";
9
+ import { memo as c, use as l, useCallback as u, useMemo as d } from "react";
10
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
+ import m from "@plitzi/plitzi-ui/icons/FlexGrowRow";
12
+ import h from "@plitzi/plitzi-ui/icons/FlexNoneRow";
13
+ import g from "@plitzi/plitzi-ui/icons/FlexShrinkRow";
13
14
  //#region src/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.tsx
14
- var g = [
15
- "align-self",
16
- "order",
15
+ var _ = [
17
16
  "flex-grow",
18
17
  "flex-shrink",
19
18
  "flex-basis"
20
- ], _ = [
21
- "flex-grow",
22
- "flex-shrink",
23
- "flex-basis"
24
- ], v = s(({ replaceTokens: s = !1, isCollapsed: v = !0, isFlexVertical: y = !1, onCollapse: b }) => {
25
- let { setValue: x } = c(e), { "flex-grow": S, "flex-shrink": C, "flex-basis": w, "align-self": T, order: E } = t({
26
- keys: g,
19
+ ], v = c(({ replaceTokens: c = !1, isCollapsed: v = !0, isFlexVertical: y = !1, onCollapse: b }) => {
20
+ let { setValue: x } = l(e), { "flex-grow": S, "flex-shrink": C, "flex-basis": w, "align-self": T, order: E } = t({
21
+ keys: i.dot,
27
22
  asValue: !0,
28
- replaceTokens: s
29
- }), D = l((e) => {
23
+ replaceTokens: c
24
+ }), D = u((e) => {
30
25
  x(void 0, e);
31
- }, [x]), O = l((e) => {
26
+ }, [x]), O = u((e) => {
32
27
  x("flex-grow", e);
33
- }, [x]), k = l((e) => {
28
+ }, [x]), k = u((e) => {
34
29
  x("flex-shrink", e);
35
- }, [x]), A = l((e) => {
30
+ }, [x]), A = u((e) => {
36
31
  x("flex-basis", e);
37
- }, [x]), j = l((e) => b?.("displayFlexChild", e), [b]), M = u(() => {
32
+ }, [x]), j = u((e) => b?.("displayFlexChild", e), [b]), M = d(() => {
38
33
  let e = (S !== "0" || C !== "1" || w !== "auto") && (S !== "1" || C !== "1" || w !== "0%") && (S !== "0" || C !== "0" || w !== "auto");
39
34
  return [
40
35
  {
@@ -43,7 +38,7 @@ var g = [
43
38
  "flex-shrink": "1",
44
39
  "flex-basis": "auto"
45
40
  },
46
- icon: /* @__PURE__ */ d(h, {}),
41
+ icon: /* @__PURE__ */ f(g, {}),
47
42
  description: "Shrink if needed",
48
43
  active: !e && S === "0" && C === "1" && w === "auto"
49
44
  },
@@ -53,7 +48,7 @@ var g = [
53
48
  "flex-shrink": "1",
54
49
  "flex-basis": "0%"
55
50
  },
56
- icon: /* @__PURE__ */ d(p, {}),
51
+ icon: /* @__PURE__ */ f(m, {}),
57
52
  description: "Grow if possible",
58
53
  active: !e && S === "1" && C === "1" && w === "0%"
59
54
  },
@@ -63,7 +58,7 @@ var g = [
63
58
  "flex-shrink": "0",
64
59
  "flex-basis": "auto"
65
60
  },
66
- icon: /* @__PURE__ */ d(m, {}),
61
+ icon: /* @__PURE__ */ f(h, {}),
67
62
  description: "Don't shrink or grow",
68
63
  active: !e && S === "0" && C === "0" && w === "auto"
69
64
  }
@@ -72,36 +67,36 @@ var g = [
72
67
  S,
73
68
  C,
74
69
  w
75
- ]), N = l((e, t) => x(e, t), [x]);
76
- return /* @__PURE__ */ f(i, {
77
- title: "Flex Child",
78
- dotKeys: g,
70
+ ]), N = u((e, t) => x(e, t), [x]);
71
+ return /* @__PURE__ */ p(a, {
72
+ title: i.title,
73
+ dotKeys: i.dot,
79
74
  isCollapsed: v,
80
75
  onCollapse: j,
81
76
  children: [
82
- /* @__PURE__ */ d(n, {
77
+ /* @__PURE__ */ f(n, {
83
78
  keys: _,
84
79
  label: "Sizing",
85
80
  onChange: D,
86
81
  type: "iconGroup",
87
82
  items: M
88
83
  }),
89
- /* @__PURE__ */ f(r, { children: [
90
- /* @__PURE__ */ d(n, {
84
+ /* @__PURE__ */ p(r, { children: [
85
+ /* @__PURE__ */ f(n, {
91
86
  keys: ["flex-grow"],
92
87
  label: "Grow",
93
88
  onChange: O,
94
89
  type: "input",
95
90
  value: S
96
91
  }),
97
- /* @__PURE__ */ d(n, {
92
+ /* @__PURE__ */ f(n, {
98
93
  keys: ["flex-shrink"],
99
94
  label: "Shrink",
100
95
  onChange: k,
101
96
  type: "input",
102
97
  value: C
103
98
  }),
104
- /* @__PURE__ */ d(n, {
99
+ /* @__PURE__ */ f(n, {
105
100
  keys: ["flex-basis"],
106
101
  label: "Basis",
107
102
  onChange: A,
@@ -109,12 +104,12 @@ var g = [
109
104
  value: w
110
105
  })
111
106
  ] }),
112
- /* @__PURE__ */ d(a, {
107
+ /* @__PURE__ */ f(o, {
113
108
  value: T,
114
109
  isFlexVertical: y,
115
110
  onChange: N
116
111
  }),
117
- /* @__PURE__ */ d(o, {
112
+ /* @__PURE__ */ f(s, {
118
113
  value: E,
119
114
  onChange: N
120
115
  })
@@ -1,38 +1,15 @@
1
- import e from "../../../components/InspectorLabel/index.mjs";
2
- import { splitByCommaOutsideParens as t } from "./helpers.mjs";
3
- import n from "./BoxShadowItem.mjs";
4
- import { useCallback as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import s from "@plitzi/plitzi-ui/Icon";
1
+ import { DEFAULT_SHADOW as e, serializeShadow as t } from "../../../shadowValue.mjs";
2
+ import n from "../../../components/ShadowList/index.mjs";
3
+ import { jsx as r } from "react/jsx-runtime";
7
4
  //#region src/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.tsx
8
- var c = ({ value: c = "", onChange: l }) => {
9
- let u = [];
10
- c && c !== "" && (u = t(c));
11
- let d = (e) => (t) => {
12
- t.stopPropagation(), t.preventDefault(), u.splice(e, 1), u.length > 0 ? l?.(u.join(",")) : l?.("");
13
- }, f = (e) => (t) => {
14
- t !== u[e] && (u[e] = t, l?.(u.join(",")));
15
- }, p = r(() => {
16
- c ? l?.(`${c},1px 1px 3px 1px black`) : l?.("1px 1px 3px 1px black");
17
- }, [c, l]);
18
- return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("div", {
19
- className: "flex items-center justify-between",
20
- children: [/* @__PURE__ */ a(e, {
21
- keyValue: ["box-shadow"],
22
- children: "Box Shadow"
23
- }), /* @__PURE__ */ a(s, {
24
- className: "cursor-pointer",
25
- icon: "fas fa-plus",
26
- onClick: p
27
- })]
28
- }), u.length > 0 && /* @__PURE__ */ a("div", {
29
- className: "flex flex-col gap-2",
30
- children: u.map((e, t) => /* @__PURE__ */ a(n, {
31
- value: e.trim(),
32
- onChange: f(t),
33
- onRemove: d(t)
34
- }, t))
35
- })] });
36
- };
5
+ var i = ["box-shadow"], a = t(e, { withSpread: !0 }), o = ({ value: e, onChange: t }) => /* @__PURE__ */ r(n, {
6
+ label: "Box Shadow",
7
+ keys: i,
8
+ addLabel: "Add box shadow",
9
+ withSpread: !0,
10
+ added: a,
11
+ value: e,
12
+ onChange: t
13
+ });
37
14
  //#endregion
38
- export { c as default };
15
+ export { o as default };