@plitzi/sdk-style 0.38.10 → 0.38.11

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 (149) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/dist/components/InputEasing/InputEasingButton.mjs +1 -1
  3. package/dist/components/InputEasing/InputEasingList.mjs +5 -5
  4. package/dist/components/Selector/Selector.mjs +2 -1
  5. package/dist/components/Selector/SelectorItem/ItemOptions.mjs +45 -41
  6. package/dist/components/Selector/SelectorItem/SelectorItem.mjs +4 -4
  7. package/dist/components/Selector/SelectorItem/helpers.d.ts +2 -0
  8. package/dist/components/Selector/SelectorItem/helpers.mjs +4 -0
  9. package/dist/components/StyleInspector/Inspector.mjs +185 -171
  10. package/dist/components/StyleInspector/InspectorSearchContext.d.ts +3 -0
  11. package/dist/components/StyleInspector/InspectorSearchContext.mjs +6 -0
  12. package/dist/components/StyleInspector/StyleInspector.mjs +154 -128
  13. package/dist/components/StyleInspector/categories/Background/Background.mjs +82 -114
  14. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.d.ts +8 -0
  15. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.mjs +53 -0
  16. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.d.ts +3 -0
  17. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.mjs +5 -0
  18. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +159 -153
  19. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.d.ts +11 -0
  20. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.mjs +45 -0
  21. package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +26 -23
  22. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +65 -56
  23. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.d.ts +4 -0
  24. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.mjs +8 -0
  25. package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +28 -27
  26. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +4 -2
  27. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +19 -18
  28. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +4 -0
  29. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +48 -80
  30. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +5 -3
  31. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +51 -41
  32. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +5 -1
  33. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +54 -32
  34. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +3 -1
  35. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +14 -13
  36. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.d.ts +8 -0
  37. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.mjs +8 -0
  38. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.d.ts +8 -0
  39. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +11 -0
  40. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.d.ts +3 -0
  41. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs +5 -0
  42. package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.d.ts +21 -7
  43. package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +114 -113
  44. package/dist/components/StyleInspector/categories/Background/helpers/layerValues.d.ts +8 -0
  45. package/dist/components/StyleInspector/categories/Background/helpers/layerValues.mjs +11 -0
  46. package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +52 -87
  47. package/dist/components/StyleInspector/categories/Background/modes/ImageMode.mjs +16 -77
  48. package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +19 -62
  49. package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +79 -97
  50. package/dist/components/StyleInspector/categories/Background/modes/RawMode.d.ts +8 -0
  51. package/dist/components/StyleInspector/categories/Background/modes/RawMode.mjs +22 -0
  52. package/dist/components/StyleInspector/categories/Background/modes/helpers.d.ts +19 -0
  53. package/dist/components/StyleInspector/categories/Background/modes/helpers.mjs +54 -0
  54. package/dist/components/StyleInspector/categories/Border/Border.mjs +26 -43
  55. package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +60 -51
  56. package/dist/components/StyleInspector/categories/Display/Display.mjs +32 -49
  57. package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +33 -38
  58. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +21 -33
  59. package/dist/components/StyleInspector/categories/Effects/Effects.mjs +131 -154
  60. package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +23 -31
  61. package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +9 -5
  62. package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +57 -124
  63. package/dist/components/StyleInspector/categories/Effects/Filters/helpers.d.ts +25 -0
  64. package/dist/components/StyleInspector/categories/Effects/Filters/helpers.mjs +87 -0
  65. package/dist/components/StyleInspector/categories/Effects/Transform/Transform.mjs +18 -28
  66. package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +1 -2
  67. package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +52 -76
  68. package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.d.ts +5 -0
  69. package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.mjs +8 -2
  70. package/dist/components/StyleInspector/categories/Effects/Transition/Transition.mjs +21 -37
  71. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.d.ts +10 -0
  72. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +92 -0
  73. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +4 -4
  74. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +78 -359
  75. package/dist/components/StyleInspector/categories/Effects/Transition/helpers.d.ts +39 -0
  76. package/dist/components/StyleInspector/categories/Effects/Transition/helpers.mjs +268 -0
  77. package/dist/components/StyleInspector/categories/List/List.mjs +39 -38
  78. package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +29 -29
  79. package/dist/components/StyleInspector/categories/Others/Others.mjs +66 -88
  80. package/dist/components/StyleInspector/categories/Position/Position.mjs +67 -75
  81. package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +19 -18
  82. package/dist/components/StyleInspector/categories/Size/Size.mjs +68 -88
  83. package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +18 -27
  84. package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +2 -2
  85. package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +4 -3
  86. package/dist/components/StyleInspector/categories/Typography/Typography.mjs +88 -98
  87. package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +1 -1
  88. package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +1 -1
  89. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +26 -39
  90. package/dist/components/StyleInspector/categories/Variables/Variables.mjs +38 -37
  91. package/dist/components/StyleInspector/categoryKeys.d.ts +45 -0
  92. package/dist/components/StyleInspector/categoryKeys.mjs +220 -0
  93. package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +43 -38
  94. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +2 -1
  95. package/dist/components/StyleInspector/components/CategorySection/CategorySection.mjs +30 -15
  96. package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.d.ts +8 -0
  97. package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.mjs +23 -0
  98. package/dist/components/StyleInspector/components/ColorSwatch/helpers.d.ts +3 -0
  99. package/dist/components/StyleInspector/components/ColorSwatch/helpers.mjs +9 -0
  100. package/dist/components/StyleInspector/components/ColorSwatch/index.d.ts +3 -0
  101. package/dist/components/StyleInspector/components/ColorSwatch/index.mjs +5 -0
  102. package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +1 -0
  103. package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +11 -11
  104. package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.d.ts +11 -0
  105. package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +38 -0
  106. package/dist/components/StyleInspector/components/InspectorFooter/helpers.d.ts +2 -0
  107. package/dist/components/StyleInspector/components/InspectorFooter/helpers.mjs +11 -0
  108. package/dist/components/StyleInspector/components/InspectorFooter/index.d.ts +3 -0
  109. package/dist/components/StyleInspector/components/InspectorFooter/index.mjs +5 -0
  110. package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +34 -31
  111. package/dist/components/StyleInspector/components/InspectorLabel/helpers.d.ts +17 -0
  112. package/dist/components/StyleInspector/components/InspectorLabel/helpers.mjs +16 -0
  113. package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.d.ts +7 -0
  114. package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +24 -0
  115. package/dist/components/StyleInspector/components/InspectorSearch/index.d.ts +3 -0
  116. package/dist/components/StyleInspector/components/InspectorSearch/index.mjs +5 -0
  117. package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.d.ts +9 -0
  118. package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +110 -0
  119. package/dist/components/StyleInspector/components/ShadowItem/index.d.ts +3 -0
  120. package/dist/components/StyleInspector/components/ShadowItem/index.mjs +5 -0
  121. package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.d.ts +7 -0
  122. package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +24 -0
  123. package/dist/components/StyleInspector/components/TargetSummary/index.d.ts +3 -0
  124. package/dist/components/StyleInspector/components/TargetSummary/index.mjs +5 -0
  125. package/dist/components/StyleInspector/components/ValueList/ValueList.d.ts +12 -0
  126. package/dist/components/StyleInspector/components/ValueList/ValueList.mjs +25 -0
  127. package/dist/components/StyleInspector/components/ValueList/index.d.ts +3 -0
  128. package/dist/components/StyleInspector/components/ValueList/index.mjs +5 -0
  129. package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.d.ts +16 -0
  130. package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +71 -0
  131. package/dist/components/StyleInspector/components/ValueListItem/index.d.ts +3 -0
  132. package/dist/components/StyleInspector/components/ValueListItem/index.mjs +5 -0
  133. package/dist/components/StyleInspector/cssValues.d.ts +15 -0
  134. package/dist/components/StyleInspector/cssValues.mjs +27 -0
  135. package/dist/components/StyleInspector/helpers.d.ts +17 -1
  136. package/dist/components/StyleInspector/helpers.mjs +9 -2
  137. package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +42 -45
  138. package/dist/components/StyleInspector/search.d.ts +11 -0
  139. package/dist/components/StyleInspector/search.mjs +14 -0
  140. package/dist/components/StyleInspector/shadowValue.d.ts +20 -0
  141. package/dist/components/StyleInspector/shadowValue.mjs +36 -0
  142. package/dist/components/StyleManager/StyleSelectorTag.mjs +1 -1
  143. package/package.json +185 -17
  144. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +0 -8
  145. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +0 -132
  146. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.d.ts +0 -2
  147. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.mjs +0 -18
  148. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +0 -8
  149. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.mjs +0 -83
@@ -1,41 +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";
12
- import d from "./DisplayGridTemplate.mjs";
13
- import { memo as f, use as p, useCallback as m } from "react";
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,
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
+ import d from "./DisplayGridGap.mjs";
13
+ import f from "./DisplayGridTemplate.mjs";
14
+ import { memo as p, use as m, useCallback as h } from "react";
15
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
16
+ var y = p(({ replaceTokens: p = !1, isCollapsed: y = !0, onCollapse: b }) => {
17
+ let { setValue: x } = m(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({
18
+ keys: n.dot,
36
19
  asValue: !0,
37
- replaceTokens: f
38
- }), R = m((e, t) => {
20
+ replaceTokens: p
21
+ }), R = h((e, t) => {
39
22
  e === "display" ? x(void 0, {
40
23
  "flex-direction": void 0,
41
24
  "flex-wrap": void 0,
@@ -54,47 +37,47 @@ var v = [
54
37
  "grid-auto-columns": void 0,
55
38
  display: t
56
39
  }) : 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,
40
+ }, [x]), z = h((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");
41
+ return /* @__PURE__ */ v(r, {
42
+ title: n.title,
43
+ dotKeys: n.dot,
61
44
  isCollapsed: y,
62
45
  onCollapse: z,
63
46
  children: [
64
- /* @__PURE__ */ g(r, {
47
+ /* @__PURE__ */ _(i, {
65
48
  value: S,
66
49
  onChange: R
67
50
  }),
68
- S === "flex" && /* @__PURE__ */ _(h, { children: [
69
- /* @__PURE__ */ g(s, {
51
+ S === "flex" && /* @__PURE__ */ v(g, { children: [
52
+ /* @__PURE__ */ _(c, {
70
53
  value: C,
71
54
  onChange: R,
72
55
  isReverse: B
73
56
  }),
74
- /* @__PURE__ */ g(o, {
57
+ /* @__PURE__ */ _(s, {
75
58
  value: T,
76
59
  onChange: R,
77
60
  isReverse: B,
78
61
  isRow: V
79
62
  }),
80
- /* @__PURE__ */ g(c, {
63
+ /* @__PURE__ */ _(l, {
81
64
  value: E,
82
65
  onChange: R,
83
66
  isReverse: B,
84
67
  isRow: V
85
68
  }),
86
- /* @__PURE__ */ g(i, {
69
+ /* @__PURE__ */ _(a, {
87
70
  value: w,
88
71
  onChange: R,
89
72
  isReverse: H
90
73
  }),
91
- /* @__PURE__ */ g(l, {
74
+ /* @__PURE__ */ _(u, {
92
75
  rowGap: D,
93
76
  columnGap: O,
94
77
  onChange: R
95
78
  })
96
79
  ] }),
97
- S === "grid" && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, {
80
+ S === "grid" && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(f, {
98
81
  templateAreas: k,
99
82
  templateColumns: A,
100
83
  templateRows: j,
@@ -102,12 +85,12 @@ var v = [
102
85
  templateAutoRows: N,
103
86
  templateAutoColumns: P,
104
87
  onChange: R
105
- }), /* @__PURE__ */ g(u, {
88
+ }), /* @__PURE__ */ _(d, {
106
89
  rowGap: F,
107
90
  columnGap: I,
108
91
  onChange: R
109
92
  })] }),
110
- S === "flex" && (w === "wrap" || w === "wrap-reverse") && /* @__PURE__ */ g(a, {
93
+ S === "flex" && (w === "wrap" || w === "wrap-reverse") && /* @__PURE__ */ _(o, {
111
94
  value: L,
112
95
  onChange: R,
113
96
  isReverse: H,
@@ -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,26 @@
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 { splitByCommaOutsideParens as e } from "../../../cssValues.mjs";
2
+ import t from "../../../components/ValueList/index.mjs";
3
+ import { DEFAULT_SHADOW as n, serializeShadow as r } from "../../../shadowValue.mjs";
4
+ import i from "../../../components/ShadowItem/index.mjs";
5
+ import { useCallback as a } from "react";
6
+ import { jsx as o } from "react/jsx-runtime";
7
7
  //#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)
8
+ var s = ["box-shadow"], c = ({ value: c = "", onChange: l }) => {
9
+ let u = typeof c == "string" && c !== "" ? e(c).map((e) => e.trim()) : [], d = a((e) => l?.(e.length > 0 ? e.join(", ") : ""), [l]), f = (e) => () => d(u.filter((t, n) => n !== e)), p = (e) => (t) => {
10
+ t !== u[e] && d(u.map((n, r) => r === e ? t : n));
11
+ };
12
+ return /* @__PURE__ */ o(t, {
13
+ label: "Box Shadow",
14
+ keys: s,
15
+ addLabel: "Add box shadow",
16
+ onAdd: () => d([...u, r(n, { withSpread: !0 })]),
17
+ children: u.length > 0 && u.map((e, t) => /* @__PURE__ */ o(i, {
18
+ value: e,
19
+ withSpread: !0,
20
+ onChange: p(t),
21
+ onRemove: f(t)
34
22
  }, t))
35
- })] });
23
+ });
36
24
  };
37
25
  //#endregion
38
26
  export { c as default };