@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.
- package/CHANGELOG.md +289 -0
- package/dist/StyleMap/helpers/isValueValid.mjs +5 -4
- package/dist/StyleMap/helpers/utils.mjs +13 -12
- package/dist/components/InputEasing/InputEasingButton.mjs +1 -1
- package/dist/components/InputEasing/InputEasingList.mjs +5 -5
- package/dist/components/Selector/Selector.mjs +2 -1
- package/dist/components/Selector/SelectorItem/ItemOptions.mjs +45 -41
- package/dist/components/Selector/SelectorItem/SelectorItem.mjs +4 -4
- package/dist/components/Selector/SelectorItem/helpers.d.ts +2 -0
- package/dist/components/Selector/SelectorItem/helpers.mjs +4 -0
- package/dist/components/StyleInspector/Inspector.mjs +185 -171
- package/dist/components/StyleInspector/InspectorSearchContext.d.ts +3 -0
- package/dist/components/StyleInspector/InspectorSearchContext.mjs +6 -0
- package/dist/components/StyleInspector/StyleInspector.mjs +213 -187
- package/dist/components/StyleInspector/categories/Background/Background.mjs +84 -177
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.mjs +53 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +159 -153
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.d.ts +11 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.mjs +45 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +26 -23
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +65 -56
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.d.ts +4 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.mjs +8 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +28 -27
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.mjs +28 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +4 -2
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +19 -18
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +4 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +48 -80
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +5 -3
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +51 -41
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +5 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +54 -32
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +3 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +14 -13
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.mjs +8 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +11 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.d.ts +21 -7
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +114 -113
- package/dist/components/StyleInspector/categories/Background/helpers/layerValues.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/helpers/layerValues.mjs +11 -0
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +22 -79
- package/dist/components/StyleInspector/categories/Background/modes/ImageMode.mjs +16 -77
- package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +19 -62
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +58 -98
- package/dist/components/StyleInspector/categories/Background/modes/RawMode.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/modes/RawMode.mjs +22 -0
- package/dist/components/StyleInspector/categories/Background/modes/helpers.d.ts +19 -0
- package/dist/components/StyleInspector/categories/Background/modes/helpers.mjs +54 -0
- package/dist/components/StyleInspector/categories/Border/Border.mjs +26 -43
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +60 -51
- package/dist/components/StyleInspector/categories/Display/Display.mjs +65 -81
- package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +14 -1
- package/dist/components/StyleInspector/categories/Display/DisplayGap.mjs +26 -13
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +33 -38
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +13 -36
- package/dist/components/StyleInspector/categories/Effects/Effects.mjs +120 -204
- package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +23 -31
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +9 -5
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +57 -124
- package/dist/components/StyleInspector/categories/Effects/Filters/helpers.d.ts +25 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/helpers.mjs +87 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/Transform.mjs +18 -28
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +1 -2
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +52 -76
- package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.d.ts +5 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.mjs +8 -2
- package/dist/components/StyleInspector/categories/Effects/Transition/Transition.mjs +21 -37
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.d.ts +10 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +92 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +4 -4
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +78 -359
- package/dist/components/StyleInspector/categories/Effects/Transition/helpers.d.ts +39 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/helpers.mjs +268 -0
- package/dist/components/StyleInspector/categories/List/List.mjs +21 -70
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +21 -70
- package/dist/components/StyleInspector/categories/Others/Others.mjs +63 -85
- package/dist/components/StyleInspector/categories/Position/Position.mjs +67 -75
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +19 -18
- package/dist/components/StyleInspector/categories/Size/Size.mjs +65 -85
- package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +18 -27
- package/dist/components/StyleInspector/categories/Spacing/SpacingBox.d.ts +15 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingBox.mjs +63 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +3 -11
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +18 -70
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +3 -7
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +16 -67
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +58 -67
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +16 -40
- package/dist/components/StyleInspector/categories/Variables/Variables.mjs +38 -37
- package/dist/components/StyleInspector/categories/blendModes.d.ts +2 -0
- package/dist/components/StyleInspector/categories/blendModes.mjs +21 -0
- package/dist/components/StyleInspector/categories/listMarkers.d.ts +8 -0
- package/dist/components/StyleInspector/categories/listMarkers.mjs +25 -0
- package/dist/components/StyleInspector/categoryKeys.d.ts +45 -0
- package/dist/components/StyleInspector/categoryKeys.mjs +220 -0
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +43 -38
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +2 -1
- package/dist/components/StyleInspector/components/CategorySection/CategorySection.mjs +30 -15
- package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.d.ts +8 -0
- package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.mjs +23 -0
- package/dist/components/StyleInspector/components/ColorSwatch/helpers.d.ts +3 -0
- package/dist/components/StyleInspector/components/ColorSwatch/helpers.mjs +9 -0
- package/dist/components/StyleInspector/components/ColorSwatch/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ColorSwatch/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +1 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +11 -11
- package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.d.ts +11 -0
- package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +38 -0
- package/dist/components/StyleInspector/components/InspectorFooter/helpers.d.ts +2 -0
- package/dist/components/StyleInspector/components/InspectorFooter/helpers.mjs +11 -0
- package/dist/components/StyleInspector/components/InspectorFooter/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorFooter/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +34 -31
- package/dist/components/StyleInspector/components/InspectorLabel/helpers.d.ts +17 -0
- package/dist/components/StyleInspector/components/InspectorLabel/helpers.mjs +16 -0
- package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.d.ts +7 -0
- package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +24 -0
- package/dist/components/StyleInspector/components/InspectorSearch/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorSearch/index.mjs +5 -0
- package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.d.ts +9 -0
- package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +110 -0
- package/dist/components/StyleInspector/components/ShadowItem/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ShadowItem/index.mjs +5 -0
- package/dist/components/StyleInspector/components/ShadowList/ShadowList.d.ts +15 -0
- package/dist/components/StyleInspector/components/ShadowList/ShadowList.mjs +25 -0
- package/dist/components/StyleInspector/components/ShadowList/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ShadowList/index.mjs +5 -0
- package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.d.ts +7 -0
- package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +24 -0
- package/dist/components/StyleInspector/components/TargetSummary/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/TargetSummary/index.mjs +5 -0
- package/dist/components/StyleInspector/components/ValueList/ValueList.d.ts +12 -0
- package/dist/components/StyleInspector/components/ValueList/ValueList.mjs +25 -0
- package/dist/components/StyleInspector/components/ValueList/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ValueList/index.mjs +5 -0
- package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.d.ts +16 -0
- package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +71 -0
- package/dist/components/StyleInspector/components/ValueListItem/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ValueListItem/index.mjs +5 -0
- package/dist/components/StyleInspector/cssValues.d.ts +13 -0
- package/dist/components/StyleInspector/cssValues.mjs +23 -0
- package/dist/components/StyleInspector/helpers.d.ts +17 -1
- package/dist/components/StyleInspector/helpers.mjs +9 -2
- package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +42 -45
- package/dist/components/StyleInspector/hooks/usePropertyChange.d.ts +6 -0
- package/dist/components/StyleInspector/hooks/usePropertyChange.mjs +9 -0
- package/dist/components/StyleInspector/search.d.ts +11 -0
- package/dist/components/StyleInspector/search.mjs +14 -0
- package/dist/components/StyleInspector/shadowValue.d.ts +20 -0
- package/dist/components/StyleInspector/shadowValue.mjs +36 -0
- package/dist/components/StyleManager/StyleSelectorTag.mjs +1 -1
- package/package.json +225 -21
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +0 -8
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.mjs +0 -27
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +0 -8
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +0 -132
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.d.ts +0 -2
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.mjs +0 -18
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +0 -8
- 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 "../../
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "./
|
|
6
|
-
import a from "./
|
|
7
|
-
import o from "./
|
|
8
|
-
import s from "./
|
|
9
|
-
import c from "./
|
|
10
|
-
import l from "./
|
|
11
|
-
import u from "./
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
}),
|
|
39
|
-
e === "display" ?
|
|
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
|
-
}) :
|
|
57
|
-
}, [
|
|
58
|
-
return /* @__PURE__ */ _(
|
|
59
|
-
title:
|
|
60
|
-
dotKeys:
|
|
61
|
-
isCollapsed:
|
|
62
|
-
onCollapse:
|
|
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(
|
|
65
|
-
value:
|
|
66
|
-
onChange:
|
|
46
|
+
/* @__PURE__ */ g(i, {
|
|
47
|
+
value: x,
|
|
48
|
+
onChange: L
|
|
67
49
|
}),
|
|
68
|
-
|
|
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:
|
|
82
|
-
onChange:
|
|
83
|
-
isReverse:
|
|
84
|
-
isRow: V
|
|
52
|
+
value: S,
|
|
53
|
+
onChange: L,
|
|
54
|
+
isReverse: z
|
|
85
55
|
}),
|
|
86
|
-
/* @__PURE__ */ g(
|
|
56
|
+
/* @__PURE__ */ g(s, {
|
|
87
57
|
value: w,
|
|
88
|
-
onChange:
|
|
89
|
-
isReverse:
|
|
58
|
+
onChange: L,
|
|
59
|
+
isReverse: z,
|
|
60
|
+
isRow: B
|
|
90
61
|
}),
|
|
91
62
|
/* @__PURE__ */ g(l, {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
98
|
-
templateAreas:
|
|
99
|
-
templateColumns:
|
|
100
|
-
templateRows:
|
|
101
|
-
templateAutoFlow:
|
|
102
|
-
templateAutoRows:
|
|
103
|
-
templateAutoColumns:
|
|
104
|
-
onChange:
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
layout: "grid",
|
|
90
|
+
rowGap: P,
|
|
91
|
+
columnGap: F,
|
|
92
|
+
onChange: L
|
|
109
93
|
})] }),
|
|
110
|
-
|
|
111
|
-
value:
|
|
112
|
-
onChange:
|
|
113
|
-
isReverse:
|
|
114
|
-
isRow:
|
|
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 {
|
|
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
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
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:
|
|
11
|
-
children: [/* @__PURE__ */
|
|
12
|
-
keys:
|
|
23
|
+
keys: p.both,
|
|
24
|
+
children: [/* @__PURE__ */ i(e, {
|
|
25
|
+
keys: p.row,
|
|
13
26
|
label: "Row",
|
|
14
27
|
value: c,
|
|
15
|
-
onChange:
|
|
28
|
+
onChange: m,
|
|
16
29
|
type: "metric"
|
|
17
|
-
}), /* @__PURE__ */
|
|
18
|
-
keys:
|
|
30
|
+
}), /* @__PURE__ */ i(e, {
|
|
31
|
+
keys: p.column,
|
|
19
32
|
label: "Column",
|
|
20
33
|
value: l,
|
|
21
|
-
onChange:
|
|
34
|
+
onChange: h,
|
|
22
35
|
type: "metric"
|
|
23
36
|
})]
|
|
24
37
|
});
|
|
25
38
|
};
|
|
26
39
|
//#endregion
|
|
27
|
-
export {
|
|
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 "../../
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "./
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import p from "
|
|
11
|
-
import m from "@plitzi/plitzi-ui/icons/
|
|
12
|
-
import h from "@plitzi/plitzi-ui/icons/
|
|
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
|
|
15
|
-
"align-self",
|
|
16
|
-
"order",
|
|
15
|
+
var _ = [
|
|
17
16
|
"flex-grow",
|
|
18
17
|
"flex-shrink",
|
|
19
18
|
"flex-basis"
|
|
20
|
-
],
|
|
21
|
-
"flex-grow",
|
|
22
|
-
|
|
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:
|
|
29
|
-
}), D =
|
|
23
|
+
replaceTokens: c
|
|
24
|
+
}), D = u((e) => {
|
|
30
25
|
x(void 0, e);
|
|
31
|
-
}, [x]), O =
|
|
26
|
+
}, [x]), O = u((e) => {
|
|
32
27
|
x("flex-grow", e);
|
|
33
|
-
}, [x]), k =
|
|
28
|
+
}, [x]), k = u((e) => {
|
|
34
29
|
x("flex-shrink", e);
|
|
35
|
-
}, [x]), A =
|
|
30
|
+
}, [x]), A = u((e) => {
|
|
36
31
|
x("flex-basis", e);
|
|
37
|
-
}, [x]), j =
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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 =
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
title:
|
|
78
|
-
dotKeys:
|
|
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__ */
|
|
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__ */
|
|
90
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
107
|
+
/* @__PURE__ */ f(o, {
|
|
113
108
|
value: T,
|
|
114
109
|
isFlexVertical: y,
|
|
115
110
|
onChange: N
|
|
116
111
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ f(s, {
|
|
118
113
|
value: E,
|
|
119
114
|
onChange: N
|
|
120
115
|
})
|
|
@@ -1,38 +1,15 @@
|
|
|
1
|
-
import e from "../../../
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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 {
|
|
15
|
+
export { o as default };
|