@plitzi/sdk-style 0.38.9 → 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.
- package/CHANGELOG.md +189 -0
- 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 +154 -128
- package/dist/components/StyleInspector/categories/Background/Background.mjs +82 -114
- 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/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 +52 -87
- 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 +79 -97
- 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 +32 -49
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +33 -38
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +21 -33
- package/dist/components/StyleInspector/categories/Effects/Effects.mjs +131 -154
- 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 +39 -38
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +29 -29
- package/dist/components/StyleInspector/categories/Others/Others.mjs +66 -88
- 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 +68 -88
- package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +18 -27
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +2 -2
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +4 -3
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +88 -98
- 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 +26 -39
- package/dist/components/StyleInspector/categories/Variables/Variables.mjs +38 -37
- 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/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 +15 -0
- package/dist/components/StyleInspector/cssValues.mjs +27 -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/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 +185 -17
- 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
|
@@ -2,124 +2,116 @@ 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 "../../components/
|
|
7
|
-
import o from "
|
|
8
|
-
import s from "./
|
|
9
|
-
import c from "./
|
|
10
|
-
import l from "./
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import g from "
|
|
14
|
-
import _ from "@plitzi/plitzi-ui/icons/
|
|
15
|
-
import v from "@plitzi/plitzi-ui/icons/
|
|
16
|
-
import y from "@plitzi/plitzi-ui/icons/
|
|
17
|
-
import b from "@plitzi/plitzi-ui/icons/
|
|
5
|
+
import { POSITION_KEYS as i } from "../../categoryKeys.mjs";
|
|
6
|
+
import a from "../../components/CategoryAdvanced/index.mjs";
|
|
7
|
+
import o from "../../components/CategoryContainer/index.mjs";
|
|
8
|
+
import s from "./PositionAdvanced.mjs";
|
|
9
|
+
import c from "./PositionAdvancedButtons.mjs";
|
|
10
|
+
import l from "./PositionClear.mjs";
|
|
11
|
+
import u from "./PositionFloat.mjs";
|
|
12
|
+
import { memo as d, use as f, useCallback as p, useMemo as m } from "react";
|
|
13
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
|
+
import _ from "@plitzi/plitzi-ui/icons/XMark";
|
|
15
|
+
import v from "@plitzi/plitzi-ui/icons/ListNumbers";
|
|
16
|
+
import y from "@plitzi/plitzi-ui/icons/PositionAbsolute";
|
|
17
|
+
import b from "@plitzi/plitzi-ui/icons/PositionFixed";
|
|
18
|
+
import x from "@plitzi/plitzi-ui/icons/PositionRelative";
|
|
18
19
|
//#region src/components/StyleInspector/categories/Position/Position.tsx
|
|
19
|
-
var
|
|
20
|
+
var S = [
|
|
20
21
|
"position",
|
|
21
22
|
"top",
|
|
22
23
|
"bottom",
|
|
23
|
-
"z-index",
|
|
24
|
-
"float",
|
|
25
|
-
"clear",
|
|
26
24
|
"left",
|
|
27
25
|
"right"
|
|
28
|
-
],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"bottom",
|
|
32
|
-
"left",
|
|
33
|
-
"right"
|
|
34
|
-
], C = ["float", "clear"], w = u(({ replaceTokens: u = !1, isCollapsed: w = !0, onCollapse: T }) => {
|
|
35
|
-
let { setValue: E } = d(e), { position: D, top: O, bottom: k, left: A, right: j, float: M, clear: N, "z-index": P } = t({
|
|
36
|
-
keys: x,
|
|
26
|
+
], C = d(({ replaceTokens: d = !1, isCollapsed: C = !0, onCollapse: w }) => {
|
|
27
|
+
let { setValue: T } = f(e), { position: E, top: D, bottom: O, left: k, right: A, float: j, clear: M, "z-index": N } = t({
|
|
28
|
+
keys: i.dot,
|
|
37
29
|
asValue: !0,
|
|
38
|
-
replaceTokens:
|
|
39
|
-
}),
|
|
40
|
-
top:
|
|
41
|
-
bottom:
|
|
42
|
-
left:
|
|
43
|
-
right:
|
|
30
|
+
replaceTokens: d
|
|
31
|
+
}), P = m(() => ({
|
|
32
|
+
top: D,
|
|
33
|
+
bottom: O,
|
|
34
|
+
left: k,
|
|
35
|
+
right: A
|
|
44
36
|
}), [
|
|
37
|
+
D,
|
|
45
38
|
O,
|
|
46
39
|
k,
|
|
47
|
-
A
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, [E]), R = p(() => [
|
|
40
|
+
A
|
|
41
|
+
]), F = p((e) => w?.("position", e), [w]), I = p((e) => (t) => {
|
|
42
|
+
T(e === "position-path" ? void 0 : e, t);
|
|
43
|
+
}, [T]), L = m(() => [
|
|
52
44
|
{
|
|
53
45
|
value: "static",
|
|
54
|
-
icon: /* @__PURE__ */
|
|
46
|
+
icon: /* @__PURE__ */ h(_, {}),
|
|
55
47
|
description: "Static",
|
|
56
|
-
active:
|
|
48
|
+
active: E === "static"
|
|
57
49
|
},
|
|
58
50
|
{
|
|
59
51
|
value: "relative",
|
|
60
|
-
icon: /* @__PURE__ */
|
|
52
|
+
icon: /* @__PURE__ */ h(x, {}),
|
|
61
53
|
description: "Relative",
|
|
62
|
-
active:
|
|
54
|
+
active: E === "relative"
|
|
63
55
|
},
|
|
64
56
|
{
|
|
65
57
|
value: "absolute",
|
|
66
|
-
icon: /* @__PURE__ */
|
|
58
|
+
icon: /* @__PURE__ */ h(y, {}),
|
|
67
59
|
description: "Absolute",
|
|
68
|
-
active:
|
|
60
|
+
active: E === "absolute"
|
|
69
61
|
},
|
|
70
62
|
{
|
|
71
63
|
value: "fixed",
|
|
72
|
-
icon: /* @__PURE__ */
|
|
64
|
+
icon: /* @__PURE__ */ h(b, {}),
|
|
73
65
|
description: "Fixed",
|
|
74
|
-
active:
|
|
66
|
+
active: E === "fixed"
|
|
75
67
|
},
|
|
76
68
|
{
|
|
77
69
|
value: "sticky",
|
|
78
|
-
icon: /* @__PURE__ */
|
|
70
|
+
icon: /* @__PURE__ */ h(v, {}),
|
|
79
71
|
description: "Sticky",
|
|
80
|
-
active:
|
|
72
|
+
active: E === "sticky"
|
|
81
73
|
}
|
|
82
|
-
], [
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
title:
|
|
85
|
-
dotKeys:
|
|
86
|
-
advancedKeys:
|
|
87
|
-
isCollapsed:
|
|
88
|
-
onCollapse:
|
|
89
|
-
children: /* @__PURE__ */
|
|
74
|
+
], [E]);
|
|
75
|
+
return /* @__PURE__ */ h(o, {
|
|
76
|
+
title: i.title,
|
|
77
|
+
dotKeys: i.dot,
|
|
78
|
+
advancedKeys: i.advanced,
|
|
79
|
+
isCollapsed: C,
|
|
80
|
+
onCollapse: F,
|
|
81
|
+
children: /* @__PURE__ */ g("div", {
|
|
90
82
|
className: "flex flex-col gap-2",
|
|
91
83
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ h(r, {
|
|
93
85
|
keys: S,
|
|
94
86
|
label: "Position",
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
onChange:
|
|
87
|
+
children: /* @__PURE__ */ h(n, {
|
|
88
|
+
onChange: I("position"),
|
|
97
89
|
type: "iconGroup",
|
|
98
|
-
items:
|
|
90
|
+
items: L
|
|
99
91
|
})
|
|
100
92
|
}),
|
|
101
|
-
(
|
|
102
|
-
value:
|
|
103
|
-
onChange:
|
|
93
|
+
(E === "fixed" || E === "absolute") && /* @__PURE__ */ h(c, {
|
|
94
|
+
value: P,
|
|
95
|
+
onChange: I("position-path")
|
|
104
96
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
value:
|
|
107
|
-
onChange:
|
|
97
|
+
/* @__PURE__ */ h(s, {
|
|
98
|
+
value: P,
|
|
99
|
+
onChange: I
|
|
108
100
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ g(a, { children: [/* @__PURE__ */ h(u, {
|
|
102
|
+
value: j,
|
|
103
|
+
onChange: I("float")
|
|
104
|
+
}), /* @__PURE__ */ h(l, {
|
|
110
105
|
value: M,
|
|
111
|
-
onChange:
|
|
112
|
-
}), /* @__PURE__ */ m(c, {
|
|
113
|
-
value: N,
|
|
114
|
-
onChange: L("clear")
|
|
106
|
+
onChange: I("clear")
|
|
115
107
|
})] }),
|
|
116
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ h(r, {
|
|
117
109
|
keys: ["z-index"],
|
|
118
110
|
label: "Z-Index",
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
onChange:
|
|
111
|
+
children: /* @__PURE__ */ h(n, {
|
|
112
|
+
onChange: I("z-index"),
|
|
121
113
|
type: "input",
|
|
122
|
-
value:
|
|
114
|
+
value: N
|
|
123
115
|
})
|
|
124
116
|
})
|
|
125
117
|
]
|
|
@@ -127,4 +119,4 @@ var x = [
|
|
|
127
119
|
});
|
|
128
120
|
});
|
|
129
121
|
//#endregion
|
|
130
|
-
export {
|
|
122
|
+
export { C as default };
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { processSelectors as e } from "../../../../helpers/processSelector.mjs";
|
|
2
|
-
import t from "../../
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import a from "
|
|
6
|
-
import o from "@plitzi/
|
|
7
|
-
import s from "
|
|
2
|
+
import { RAW_STYLE_KEYS as t } from "../../categoryKeys.mjs";
|
|
3
|
+
import n from "../../components/CategoryContainer/index.mjs";
|
|
4
|
+
import { useCallback as r, useMemo as i } from "react";
|
|
5
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import o from "@plitzi/plitzi-ui/CodeMirror";
|
|
7
|
+
import s from "@plitzi/sdk-shared/theme/useTheme";
|
|
8
|
+
import c from "clsx";
|
|
8
9
|
//#region src/components/StyleInspector/categories/RawStyle/RawStyle.tsx
|
|
9
|
-
var
|
|
10
|
-
let { resolvedTheme:
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
className:
|
|
13
|
-
classNameContent:
|
|
14
|
-
title:
|
|
15
|
-
isCollapsed:
|
|
16
|
-
onCollapse:
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
-
value:
|
|
10
|
+
var l = ({ selectors: l, isCollapsed: u, onCollapse: d }) => {
|
|
11
|
+
let { resolvedTheme: f } = s(), p = i(() => e(l ?? [], !1).join("\n\n"), [l]), m = r((e) => d?.("rawStyle", e), [d]);
|
|
12
|
+
return /* @__PURE__ */ a(n, {
|
|
13
|
+
className: u ? "" : "grow",
|
|
14
|
+
classNameContent: c("p-0", { grow: !u }),
|
|
15
|
+
title: t.title,
|
|
16
|
+
isCollapsed: u,
|
|
17
|
+
onCollapse: m,
|
|
18
|
+
children: /* @__PURE__ */ a(o, {
|
|
19
|
+
value: p,
|
|
19
20
|
className: "h-full",
|
|
20
|
-
theme:
|
|
21
|
+
theme: f,
|
|
21
22
|
lineWrapping: !0,
|
|
22
23
|
readOnly: !0
|
|
23
24
|
})
|
|
24
25
|
});
|
|
25
26
|
};
|
|
26
27
|
//#endregion
|
|
27
|
-
export {
|
|
28
|
+
export { l as default };
|
|
@@ -2,143 +2,123 @@ 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 "../../components/
|
|
7
|
-
import o from "
|
|
8
|
-
import s from "./
|
|
9
|
-
import c from "./
|
|
10
|
-
import l from "./
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
5
|
+
import { SIZE_KEYS as i } from "../../categoryKeys.mjs";
|
|
6
|
+
import a from "../../components/CategoryAdvanced/index.mjs";
|
|
7
|
+
import o from "../../components/CategoryContainer/index.mjs";
|
|
8
|
+
import s from "./SizeContainer.mjs";
|
|
9
|
+
import c from "./SizeFit.mjs";
|
|
10
|
+
import l from "./SizeOverflow.mjs";
|
|
11
|
+
import u from "./SizePosition.mjs";
|
|
12
|
+
import { memo as d, use as f, useCallback as p } from "react";
|
|
13
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
13
14
|
//#region src/components/StyleInspector/categories/Size/Size.tsx
|
|
14
|
-
var
|
|
15
|
-
"width",
|
|
16
|
-
|
|
17
|
-
"min-width",
|
|
18
|
-
"min-height",
|
|
19
|
-
"max-width",
|
|
20
|
-
"max-height",
|
|
21
|
-
"aspect-ratio",
|
|
22
|
-
"box-sizing",
|
|
23
|
-
"overflow",
|
|
24
|
-
"object-fit",
|
|
25
|
-
"object-position",
|
|
26
|
-
"container-type",
|
|
27
|
-
"container-name"
|
|
28
|
-
], g = [
|
|
29
|
-
"aspect-ratio",
|
|
30
|
-
"box-sizing",
|
|
31
|
-
"object-position",
|
|
32
|
-
"object-fit",
|
|
33
|
-
"container-type",
|
|
34
|
-
"container-name"
|
|
35
|
-
], _ = ["width", "height"], v = ["min-width", "min-height"], y = ["max-width", "max-height"], b = u(({ replaceTokens: u = !1, isCollapsed: b = !0, onCollapse: x }) => {
|
|
36
|
-
let { setValue: S } = d(e), { width: C, height: w, "min-width": T, "min-height": E, "max-width": D, "max-height": O, "aspect-ratio": k, "box-sizing": A, overflow: j, "object-position": M, "object-fit": N, "container-type": P, "container-name": F } = t({
|
|
37
|
-
keys: h,
|
|
15
|
+
var g = ["width", "height"], _ = ["min-width", "min-height"], v = ["max-width", "max-height"], y = d(({ replaceTokens: d = !1, isCollapsed: y = !0, onCollapse: b }) => {
|
|
16
|
+
let { setValue: x } = f(e), { width: S, height: C, "min-width": w, "min-height": T, "max-width": E, "max-height": D, "aspect-ratio": O, "box-sizing": k, overflow: A, "object-position": j, "object-fit": M, "container-type": N, "container-name": P } = t({
|
|
17
|
+
keys: i.dot,
|
|
38
18
|
asValue: !0,
|
|
39
|
-
replaceTokens:
|
|
40
|
-
}),
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
title:
|
|
43
|
-
dotKeys:
|
|
44
|
-
advancedKeys:
|
|
45
|
-
isCollapsed:
|
|
46
|
-
onCollapse:
|
|
19
|
+
replaceTokens: d
|
|
20
|
+
}), F = p((e) => b?.("size", e), [b]), I = p((e) => (t) => x(e, t), [x]);
|
|
21
|
+
return /* @__PURE__ */ h(o, {
|
|
22
|
+
title: i.title,
|
|
23
|
+
dotKeys: i.dot,
|
|
24
|
+
advancedKeys: i.advanced,
|
|
25
|
+
isCollapsed: y,
|
|
26
|
+
onCollapse: F,
|
|
47
27
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ h(r, {
|
|
49
29
|
label: "Size",
|
|
50
|
-
keys:
|
|
51
|
-
children: [/* @__PURE__ */
|
|
30
|
+
keys: g,
|
|
31
|
+
children: [/* @__PURE__ */ m(n, {
|
|
52
32
|
keys: ["width"],
|
|
53
33
|
preffix: "W",
|
|
54
|
-
value:
|
|
55
|
-
onChange:
|
|
34
|
+
value: S,
|
|
35
|
+
onChange: I("width"),
|
|
56
36
|
type: "metric"
|
|
57
|
-
}), /* @__PURE__ */
|
|
37
|
+
}), /* @__PURE__ */ m(n, {
|
|
58
38
|
keys: ["height"],
|
|
59
39
|
preffix: "H",
|
|
60
|
-
value:
|
|
61
|
-
onChange:
|
|
40
|
+
value: C,
|
|
41
|
+
onChange: I("height"),
|
|
62
42
|
type: "metric"
|
|
63
43
|
})]
|
|
64
44
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ h(r, {
|
|
66
46
|
label: "Min Size",
|
|
67
|
-
keys:
|
|
68
|
-
children: [/* @__PURE__ */
|
|
47
|
+
keys: _,
|
|
48
|
+
children: [/* @__PURE__ */ m(n, {
|
|
69
49
|
keys: ["min-width"],
|
|
70
50
|
preffix: "W",
|
|
71
|
-
value:
|
|
72
|
-
onChange:
|
|
51
|
+
value: w,
|
|
52
|
+
onChange: I("min-width"),
|
|
73
53
|
type: "metric"
|
|
74
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ m(n, {
|
|
75
55
|
keys: ["min-height"],
|
|
76
56
|
preffix: "H",
|
|
77
|
-
value:
|
|
78
|
-
onChange:
|
|
57
|
+
value: T,
|
|
58
|
+
onChange: I("min-height"),
|
|
79
59
|
type: "metric"
|
|
80
60
|
})]
|
|
81
61
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ h(r, {
|
|
83
63
|
label: "Max Size",
|
|
84
|
-
keys:
|
|
85
|
-
children: [/* @__PURE__ */
|
|
64
|
+
keys: v,
|
|
65
|
+
children: [/* @__PURE__ */ m(n, {
|
|
86
66
|
keys: ["max-width"],
|
|
87
67
|
preffix: "W",
|
|
88
|
-
value:
|
|
89
|
-
onChange:
|
|
68
|
+
value: E,
|
|
69
|
+
onChange: I("max-width"),
|
|
90
70
|
type: "metric"
|
|
91
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ m(n, {
|
|
92
72
|
keys: ["max-height"],
|
|
93
73
|
preffix: "H",
|
|
94
|
-
value:
|
|
95
|
-
onChange:
|
|
74
|
+
value: D,
|
|
75
|
+
onChange: I("max-height"),
|
|
96
76
|
type: "metric"
|
|
97
77
|
})]
|
|
98
78
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ m(a, { children: /* @__PURE__ */ h(r, {
|
|
100
80
|
label: "",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ m(n, {
|
|
102
82
|
keys: ["aspect-ratio"],
|
|
103
83
|
label: "Ratio",
|
|
104
|
-
value:
|
|
105
|
-
onChange:
|
|
106
|
-
}), /* @__PURE__ */
|
|
84
|
+
value: O,
|
|
85
|
+
onChange: I("aspect-ratio")
|
|
86
|
+
}), /* @__PURE__ */ h(n, {
|
|
107
87
|
keys: ["box-sizing"],
|
|
108
88
|
label: "Box Sizing",
|
|
109
|
-
value:
|
|
110
|
-
onChange:
|
|
89
|
+
value: k,
|
|
90
|
+
onChange: I("box-sizing"),
|
|
111
91
|
type: "select",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ m("option", {
|
|
113
93
|
value: "border-box",
|
|
114
94
|
children: "Border Box"
|
|
115
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ m("option", {
|
|
116
96
|
value: "content-box",
|
|
117
97
|
children: "Content Box"
|
|
118
98
|
})]
|
|
119
99
|
})]
|
|
120
100
|
}) }),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
value:
|
|
123
|
-
onChange:
|
|
101
|
+
/* @__PURE__ */ m(l, {
|
|
102
|
+
value: A,
|
|
103
|
+
onChange: I
|
|
124
104
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
value:
|
|
128
|
-
onChange:
|
|
105
|
+
/* @__PURE__ */ h(a, { children: [
|
|
106
|
+
/* @__PURE__ */ m(u, {
|
|
107
|
+
value: j,
|
|
108
|
+
onChange: I
|
|
129
109
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
value:
|
|
132
|
-
onChange:
|
|
110
|
+
/* @__PURE__ */ m(c, {
|
|
111
|
+
value: M,
|
|
112
|
+
onChange: I
|
|
133
113
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
containerType:
|
|
136
|
-
containerName:
|
|
137
|
-
onChange:
|
|
114
|
+
/* @__PURE__ */ m(s, {
|
|
115
|
+
containerType: N,
|
|
116
|
+
containerName: P,
|
|
117
|
+
onChange: I
|
|
138
118
|
})
|
|
139
119
|
] })
|
|
140
120
|
]
|
|
141
121
|
});
|
|
142
122
|
});
|
|
143
123
|
//#endregion
|
|
144
|
-
export {
|
|
124
|
+
export { y as default };
|
|
@@ -1,26 +1,17 @@
|
|
|
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
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"margin-left",
|
|
13
|
-
"margin-right",
|
|
14
|
-
"padding-top",
|
|
15
|
-
"padding-bottom",
|
|
16
|
-
"padding-left",
|
|
17
|
-
"padding-right"
|
|
18
|
-
], f = a(({ replaceTokens: a = !1, isCollapsed: f = !0, onCollapse: p }) => {
|
|
19
|
-
let [m, h] = c(!1), { setValue: g } = o(e), _ = t({
|
|
20
|
-
keys: d,
|
|
3
|
+
import { SPACING_KEYS as n } from "../../categoryKeys.mjs";
|
|
4
|
+
import r from "../../components/CategoryContainer/index.mjs";
|
|
5
|
+
import i from "./SpacingEditor.mjs";
|
|
6
|
+
import a from "./SpacingMargin.mjs";
|
|
7
|
+
import { memo as o, use as s, useCallback as c, useState as l } from "react";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
var f = o(({ replaceTokens: o = !1, isCollapsed: f = !0, onCollapse: p }) => {
|
|
10
|
+
let [m, h] = l(!1), { setValue: g } = s(e), _ = t({
|
|
11
|
+
keys: n.dot,
|
|
21
12
|
asValue: !0,
|
|
22
|
-
replaceTokens:
|
|
23
|
-
}), [v, y] =
|
|
13
|
+
replaceTokens: o
|
|
14
|
+
}), [v, y] = l(), b = c((e) => p?.("spacing", e), [p]), x = c(() => h((e) => !e), [h]), S = c((e, t) => {
|
|
24
15
|
if (!m) {
|
|
25
16
|
g(e, t);
|
|
26
17
|
return;
|
|
@@ -46,21 +37,21 @@ var d = [
|
|
|
46
37
|
"padding-left": t,
|
|
47
38
|
"padding-right": t
|
|
48
39
|
});
|
|
49
|
-
}, [m, g]), C =
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
title:
|
|
52
|
-
dotKeys:
|
|
40
|
+
}, [m, g]), C = c((e) => y(e), [y]);
|
|
41
|
+
return /* @__PURE__ */ u(r, {
|
|
42
|
+
title: n.title,
|
|
43
|
+
dotKeys: n.dot,
|
|
53
44
|
isCollapsed: f,
|
|
54
45
|
onCollapse: b,
|
|
55
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ d("div", {
|
|
56
47
|
className: "flex flex-col",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ u(a, {
|
|
58
49
|
values: _,
|
|
59
50
|
fragmentSelected: v,
|
|
60
51
|
onSelectFragment: C,
|
|
61
52
|
isLinked: m,
|
|
62
53
|
onLinkSelected: x
|
|
63
|
-
}), v && /* @__PURE__ */
|
|
54
|
+
}), v && /* @__PURE__ */ u(i, {
|
|
64
55
|
fragmentSelected: v,
|
|
65
56
|
onChange: S,
|
|
66
57
|
value: _[v]
|
|
@@ -14,12 +14,12 @@ var o = [
|
|
|
14
14
|
e === s ? d?.(void 0) : d?.(e);
|
|
15
15
|
}, [s, d]), { "margin-top": p, "margin-bottom": m, "margin-left": h, "margin-right": g } = c ?? {};
|
|
16
16
|
return /* @__PURE__ */ a("div", {
|
|
17
|
-
className: "relative flex cursor-pointer flex-col rounded-md border border-gray-300
|
|
17
|
+
className: "relative flex cursor-pointer flex-col rounded-md border border-dashed border-gray-300 select-none dark:border-zinc-600",
|
|
18
18
|
children: [
|
|
19
19
|
/* @__PURE__ */ a("div", {
|
|
20
20
|
className: "flex items-center justify-center py-0.5",
|
|
21
21
|
children: [/* @__PURE__ */ i(e, {
|
|
22
|
-
className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[
|
|
22
|
+
className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[11px]",
|
|
23
23
|
size: "custom",
|
|
24
24
|
keyValue: o,
|
|
25
25
|
children: "MARGIN"
|
|
@@ -13,13 +13,13 @@ var a = [
|
|
|
13
13
|
e === o ? u?.(void 0) : u?.(e);
|
|
14
14
|
}, [u, o]), { "padding-top": f, "padding-bottom": p, "padding-left": m, "padding-right": h } = s ?? {};
|
|
15
15
|
return /* @__PURE__ */ i("div", {
|
|
16
|
-
className: "relative grow rounded-md border border-gray-300 dark:border-zinc-600",
|
|
16
|
+
className: "relative grow rounded-md border border-gray-300 bg-gray-50 dark:border-zinc-600 dark:bg-zinc-800/70",
|
|
17
17
|
children: [
|
|
18
18
|
/* @__PURE__ */ i("div", {
|
|
19
19
|
className: "flex items-center justify-center py-0.5",
|
|
20
20
|
children: [/* @__PURE__ */ r(e, {
|
|
21
21
|
keyValue: a,
|
|
22
|
-
className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[
|
|
22
|
+
className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[11px]",
|
|
23
23
|
size: "custom",
|
|
24
24
|
children: "PADDING"
|
|
25
25
|
}), /* @__PURE__ */ r(t, {
|
|
@@ -40,7 +40,8 @@ var a = [
|
|
|
40
40
|
})
|
|
41
41
|
}),
|
|
42
42
|
/* @__PURE__ */ i("div", {
|
|
43
|
-
className: "flex grow items-center justify-center rounded
|
|
43
|
+
className: "flex grow items-center justify-center rounded border border-gray-300 bg-white py-1 text-zinc-500 hover:text-zinc-900 dark:border-zinc-600 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100",
|
|
44
|
+
title: c ? "Sides linked: a change applies to all four" : "Link the four sides",
|
|
44
45
|
onClick: l,
|
|
45
46
|
children: [c && /* @__PURE__ */ r("i", { className: "fa-solid fa-link text-sm" }), !c && /* @__PURE__ */ r("i", { className: "fa-solid fa-link-slash text-sm" })]
|
|
46
47
|
}),
|