@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,189 +2,179 @@ 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
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import l from "./
|
|
12
|
-
import u from "
|
|
13
|
-
import d from "
|
|
14
|
-
import f from "./
|
|
15
|
-
import p from "./
|
|
16
|
-
import m from "./
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
5
|
+
import { TYPOGRAPHY_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 "./TypographyAlign.mjs";
|
|
9
|
+
import c from "./TypographyBreaking.mjs";
|
|
10
|
+
import ee from "./TypographyClamp.mjs";
|
|
11
|
+
import { weights as l } from "./TypographyConstants.mjs";
|
|
12
|
+
import u from "./TypographyFigures.mjs";
|
|
13
|
+
import d from "../../../../hooks/useSpaceFonts.mjs";
|
|
14
|
+
import f from "./TypographyFont.mjs";
|
|
15
|
+
import p from "./TypographyStyle.mjs";
|
|
16
|
+
import m from "./TypographyTextShadow.mjs";
|
|
17
|
+
import h from "./TypographyTransform.mjs";
|
|
18
|
+
import { memo as g, use as _, useCallback as v } from "react";
|
|
19
|
+
import { primaryFamily as y } from "@plitzi/sdk-shared/style";
|
|
20
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
20
21
|
//#region src/components/StyleInspector/categories/Typography/Typography.tsx
|
|
21
|
-
var
|
|
22
|
-
"text-decoration-thickness",
|
|
23
|
-
"text-underline-offset",
|
|
24
|
-
"word-break",
|
|
25
|
-
"overflow-wrap",
|
|
26
|
-
"hyphens",
|
|
27
|
-
"vertical-align",
|
|
28
|
-
"text-shadow",
|
|
29
|
-
"font-variant-numeric",
|
|
30
|
-
"font-feature-settings",
|
|
31
|
-
"-webkit-text-fill-color"
|
|
32
|
-
], C = [
|
|
22
|
+
var S = [
|
|
33
23
|
"letter-spacing",
|
|
34
24
|
"word-spacing",
|
|
35
25
|
"text-indent"
|
|
36
|
-
],
|
|
37
|
-
let
|
|
38
|
-
keys:
|
|
26
|
+
], C = g(({ replaceTokens: g = !1, isCollapsed: C = !0, onCollapse: w }) => {
|
|
27
|
+
let T = d(), { setValue: E } = _(e), { "font-family": D, "font-weight": O, "font-size": k, "font-style": A, "text-align": j, "text-decoration": M, "text-decoration-thickness": N, "text-underline-offset": P, "text-indent": te, "text-transform": F, "text-shadow": I, "white-space": L, "text-wrap": R, "word-break": z, "overflow-wrap": B, hyphens: V, "vertical-align": H, "text-overflow": U, "line-clamp": W, "line-height": G, color: K, "letter-spacing": q, "word-spacing": J, direction: Y, "font-variant-numeric": X, "font-feature-settings": Z, "-webkit-text-fill-color": Q } = t({
|
|
28
|
+
keys: i.dot,
|
|
39
29
|
asValue: !0,
|
|
40
|
-
replaceTokens:
|
|
41
|
-
}),
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
title:
|
|
44
|
-
dotKeys:
|
|
45
|
-
advancedKeys:
|
|
46
|
-
isCollapsed:
|
|
47
|
-
onCollapse:
|
|
30
|
+
replaceTokens: g
|
|
31
|
+
}), ne = v((e) => w?.("typography", e), [w]), re = T.find((e) => e.family === y(typeof D == "string" ? D : "")), $ = v((e) => (t) => E(e, t), [E]), ie = v((e) => E(void 0, e), [E]);
|
|
32
|
+
return /* @__PURE__ */ x(o, {
|
|
33
|
+
title: i.title,
|
|
34
|
+
dotKeys: i.dot,
|
|
35
|
+
advancedKeys: i.advanced,
|
|
36
|
+
isCollapsed: C,
|
|
37
|
+
onCollapse: ne,
|
|
48
38
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
partialValue:
|
|
39
|
+
/* @__PURE__ */ b(s, {
|
|
40
|
+
partialValue: j,
|
|
51
41
|
onChange: $("text-align")
|
|
52
42
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
partialValue:
|
|
43
|
+
/* @__PURE__ */ b(f, {
|
|
44
|
+
partialValue: D,
|
|
55
45
|
onChange: $("font-family")
|
|
56
46
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ x(r, {
|
|
58
48
|
label: "",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ b(n, {
|
|
60
50
|
keys: ["font-weight"],
|
|
61
51
|
label: "Weight",
|
|
62
|
-
value:
|
|
52
|
+
value: O,
|
|
63
53
|
onChange: $("font-weight"),
|
|
64
54
|
type: "select",
|
|
65
|
-
children: Object.keys(
|
|
55
|
+
children: Object.keys(l).map((e) => /* @__PURE__ */ b("option", {
|
|
66
56
|
value: e,
|
|
67
|
-
disabled: !
|
|
68
|
-
children:
|
|
57
|
+
disabled: !re?.weights.includes(Number(e)),
|
|
58
|
+
children: l[Number(e)]
|
|
69
59
|
}, e))
|
|
70
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ b(n, {
|
|
71
61
|
keys: ["color"],
|
|
72
62
|
label: "Color",
|
|
73
63
|
type: "color",
|
|
74
|
-
value:
|
|
64
|
+
value: K,
|
|
75
65
|
onChange: $("color")
|
|
76
66
|
})]
|
|
77
67
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ x(r, {
|
|
79
69
|
label: "",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ b(n, {
|
|
81
71
|
keys: ["font-size"],
|
|
82
72
|
label: "Size",
|
|
83
|
-
value:
|
|
73
|
+
value: k,
|
|
84
74
|
onChange: $("font-size"),
|
|
85
75
|
type: "metric"
|
|
86
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ b(n, {
|
|
87
77
|
keys: ["line-height"],
|
|
88
78
|
label: "Line Height",
|
|
89
|
-
value:
|
|
79
|
+
value: G,
|
|
90
80
|
onChange: $("line-height"),
|
|
91
81
|
type: "metric"
|
|
92
82
|
})]
|
|
93
83
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
fontStyle:
|
|
96
|
-
textDecoration:
|
|
97
|
-
textDecorationThickness:
|
|
98
|
-
textUnderlineOffset:
|
|
84
|
+
/* @__PURE__ */ b(p, {
|
|
85
|
+
fontStyle: A,
|
|
86
|
+
textDecoration: M,
|
|
87
|
+
textDecorationThickness: N,
|
|
88
|
+
textUnderlineOffset: P,
|
|
99
89
|
onChange: $
|
|
100
90
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
label: "
|
|
103
|
-
keys:
|
|
91
|
+
/* @__PURE__ */ x(r, {
|
|
92
|
+
label: "Spacing",
|
|
93
|
+
keys: S,
|
|
104
94
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ b(n, {
|
|
106
96
|
keys: ["letter-spacing"],
|
|
107
|
-
label: "
|
|
108
|
-
value:
|
|
97
|
+
label: "Letter",
|
|
98
|
+
value: q,
|
|
109
99
|
onChange: $("letter-spacing"),
|
|
110
100
|
type: "metric"
|
|
111
101
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ b(n, {
|
|
113
103
|
keys: ["word-spacing"],
|
|
114
104
|
label: "Word",
|
|
115
|
-
value:
|
|
105
|
+
value: J,
|
|
116
106
|
onChange: $("word-spacing"),
|
|
117
107
|
type: "metric"
|
|
118
108
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ b(n, {
|
|
120
110
|
keys: ["text-indent"],
|
|
121
111
|
label: "Indent",
|
|
122
|
-
value:
|
|
112
|
+
value: te,
|
|
123
113
|
onChange: $("text-indent"),
|
|
124
114
|
type: "metric"
|
|
125
115
|
})
|
|
126
116
|
]
|
|
127
117
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
textTransform:
|
|
130
|
-
direction:
|
|
118
|
+
/* @__PURE__ */ b(h, {
|
|
119
|
+
textTransform: F,
|
|
120
|
+
direction: Y,
|
|
131
121
|
onChange: $
|
|
132
122
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
whiteSpace:
|
|
135
|
-
textWrap:
|
|
136
|
-
wordBreak:
|
|
137
|
-
overflowWrap:
|
|
138
|
-
hyphens:
|
|
139
|
-
verticalAlign:
|
|
123
|
+
/* @__PURE__ */ b(c, {
|
|
124
|
+
whiteSpace: L,
|
|
125
|
+
textWrap: R,
|
|
126
|
+
wordBreak: z,
|
|
127
|
+
overflowWrap: B,
|
|
128
|
+
hyphens: V,
|
|
129
|
+
verticalAlign: H,
|
|
140
130
|
onChange: $
|
|
141
131
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ x(r, {
|
|
143
133
|
label: "",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ x(n, {
|
|
145
135
|
keys: ["text-overflow"],
|
|
146
136
|
label: "Overflow",
|
|
147
|
-
value:
|
|
137
|
+
value: U,
|
|
148
138
|
onChange: $("text-overflow"),
|
|
149
139
|
type: "select",
|
|
150
140
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ b("option", {
|
|
152
142
|
value: "clip",
|
|
153
143
|
children: "Clip"
|
|
154
144
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ b("option", {
|
|
156
146
|
value: "ellipsis",
|
|
157
147
|
children: "Ellipsis"
|
|
158
148
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ b("option", {
|
|
160
150
|
value: "string",
|
|
161
151
|
children: "String"
|
|
162
152
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ b("option", {
|
|
164
154
|
value: "initial",
|
|
165
155
|
children: "Initial"
|
|
166
156
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ b("option", {
|
|
168
158
|
value: "inherit",
|
|
169
159
|
children: "Inherit"
|
|
170
160
|
})
|
|
171
161
|
]
|
|
172
|
-
}), /* @__PURE__ */
|
|
173
|
-
value:
|
|
174
|
-
onChange:
|
|
162
|
+
}), /* @__PURE__ */ b(ee, {
|
|
163
|
+
value: W,
|
|
164
|
+
onChange: ie
|
|
175
165
|
})]
|
|
176
166
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
value:
|
|
167
|
+
/* @__PURE__ */ x(a, { children: [/* @__PURE__ */ b(m, {
|
|
168
|
+
value: I,
|
|
179
169
|
onChange: $("text-shadow")
|
|
180
|
-
}), /* @__PURE__ */
|
|
181
|
-
fontVariantNumeric:
|
|
182
|
-
fontFeatureSettings:
|
|
183
|
-
textFillColor:
|
|
170
|
+
}), /* @__PURE__ */ b(u, {
|
|
171
|
+
fontVariantNumeric: X,
|
|
172
|
+
fontFeatureSettings: Z,
|
|
173
|
+
textFillColor: Q,
|
|
184
174
|
onChange: $
|
|
185
175
|
})] })
|
|
186
176
|
]
|
|
187
177
|
});
|
|
188
178
|
});
|
|
189
179
|
//#endregion
|
|
190
|
-
export {
|
|
180
|
+
export { C as default };
|
|
@@ -47,7 +47,7 @@ var l = ({ fontStyle: l, textDecoration: u, textDecorationThickness: d, textUnde
|
|
|
47
47
|
label: "",
|
|
48
48
|
children: [/* @__PURE__ */ a(e, {
|
|
49
49
|
keys: ["font-style"],
|
|
50
|
-
label: "
|
|
50
|
+
label: "Style",
|
|
51
51
|
onChange: p?.("font-style"),
|
|
52
52
|
type: "iconGroup",
|
|
53
53
|
items: m
|
|
@@ -1,43 +1,30 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import t from "../../components/
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
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";
|
|
6
7
|
//#region src/components/StyleInspector/categories/Typography/TypographyTextShadow.tsx
|
|
7
|
-
var
|
|
8
|
-
let c =
|
|
9
|
-
t.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}), /* @__PURE__ */ i("button", {
|
|
27
|
-
className: "cursor-pointer",
|
|
28
|
-
type: "button",
|
|
29
|
-
onClick: u,
|
|
30
|
-
children: /* @__PURE__ */ i("i", { className: "fas fa-plus" })
|
|
31
|
-
})]
|
|
32
|
-
}), d.length > 0 && /* @__PURE__ */ i("div", {
|
|
33
|
-
className: "mt-1",
|
|
34
|
-
children: d.map((e, t) => /* @__PURE__ */ i(n, {
|
|
35
|
-
value: e,
|
|
36
|
-
onChange: l(t),
|
|
37
|
-
onRemove: c(t)
|
|
38
|
-
}, t))
|
|
39
|
-
})]
|
|
8
|
+
var s = ["text-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: "Text Shadow",
|
|
14
|
+
keys: s,
|
|
15
|
+
addLabel: "Add text shadow",
|
|
16
|
+
onAdd: () => d([...u, r({
|
|
17
|
+
...n,
|
|
18
|
+
y: "1px",
|
|
19
|
+
blur: "2px"
|
|
20
|
+
}, { withSpread: !1 })]),
|
|
21
|
+
children: u.length > 0 && u.map((e, t) => /* @__PURE__ */ o(i, {
|
|
22
|
+
value: e,
|
|
23
|
+
withSpread: !1,
|
|
24
|
+
onChange: p(t),
|
|
25
|
+
onRemove: f(t)
|
|
26
|
+
}, t))
|
|
40
27
|
});
|
|
41
28
|
};
|
|
42
29
|
//#endregion
|
|
43
|
-
export {
|
|
30
|
+
export { c as default };
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import e from "../../StyleInspectorContext.mjs";
|
|
2
|
-
import t from "../../
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import c from "@plitzi/
|
|
7
|
-
import
|
|
8
|
-
import u from "@plitzi/
|
|
2
|
+
import { VARIABLES_KEYS as t } from "../../categoryKeys.mjs";
|
|
3
|
+
import n from "../../components/CategoryContainer/index.mjs";
|
|
4
|
+
import { use as r, useCallback as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import s, { useModal as c } from "@plitzi/plitzi-ui/Modal";
|
|
7
|
+
import l from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
|
|
8
|
+
import { useToast as u } from "@plitzi/plitzi-ui/Toast";
|
|
9
|
+
import d from "@plitzi/sdk-variables/components/StyleVariables";
|
|
9
10
|
//#region src/components/StyleInspector/categories/Variables/Variables.tsx
|
|
10
|
-
var
|
|
11
|
-
let { displayMode:
|
|
12
|
-
if (!
|
|
11
|
+
var f = ({ isCollapsed: f, onCollapse: p }) => {
|
|
12
|
+
let { displayMode: m, selector: h } = r(e), { builderHandler: g } = r(l), { showDialog: _ } = c(), { addToast: v } = u(), y = i((e) => p?.("variables", e), [p]), b = i((e) => {
|
|
13
|
+
if (!h) return;
|
|
13
14
|
let { name: t, category: n, value: r } = e;
|
|
14
|
-
|
|
15
|
+
h.variables?.[n]?.[t] ? v(/* @__PURE__ */ o("span", { children: [
|
|
15
16
|
"Variable with the name ",
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ a("b", { children: t }),
|
|
17
18
|
" already exists"
|
|
18
19
|
] }), {
|
|
19
20
|
appeareance: "warning",
|
|
20
21
|
autoDismiss: !0,
|
|
21
22
|
placement: "top-right"
|
|
22
|
-
}) :
|
|
23
|
+
}) : g("styleAddSelectorVariable", m, h.name, n, t, r);
|
|
23
24
|
}, [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
]),
|
|
29
|
-
|
|
25
|
+
v,
|
|
26
|
+
g,
|
|
27
|
+
m,
|
|
28
|
+
h
|
|
29
|
+
]), x = i((e) => {
|
|
30
|
+
h && g("styleUpdateSelectorVariable", m, h.name, e.category, e.name, e.value);
|
|
30
31
|
}, [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
]),
|
|
35
|
-
|
|
32
|
+
g,
|
|
33
|
+
m,
|
|
34
|
+
h
|
|
35
|
+
]), S = i(async (e, t) => {
|
|
36
|
+
h && await _(/* @__PURE__ */ a(s.Header, { children: /* @__PURE__ */ a("h4", { children: "Remove Style Variable" }) }), /* @__PURE__ */ a(s.Body, { children: /* @__PURE__ */ a("h4", { children: "Do you want to remove this item ?" }) }), void 0, { size: "sm" }, t) && g("styleRemoveSelectorVariable", m, h.name, e, t);
|
|
36
37
|
}, [
|
|
37
|
-
|
|
38
|
-
p,
|
|
38
|
+
g,
|
|
39
39
|
m,
|
|
40
|
-
|
|
40
|
+
h,
|
|
41
|
+
_
|
|
41
42
|
]);
|
|
42
|
-
if (
|
|
43
|
-
title:
|
|
44
|
-
isCollapsed:
|
|
45
|
-
onCollapse:
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
variables:
|
|
48
|
-
onAdd:
|
|
49
|
-
onUpdate:
|
|
50
|
-
onRemove:
|
|
43
|
+
if (h) return /* @__PURE__ */ a(n, {
|
|
44
|
+
title: t.title,
|
|
45
|
+
isCollapsed: f,
|
|
46
|
+
onCollapse: y,
|
|
47
|
+
children: /* @__PURE__ */ a(d, {
|
|
48
|
+
variables: h.variables,
|
|
49
|
+
onAdd: b,
|
|
50
|
+
onUpdate: x,
|
|
51
|
+
onRemove: S
|
|
51
52
|
})
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
55
|
//#endregion
|
|
55
|
-
export {
|
|
56
|
+
export { f as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StyleCategory } from '@plitzi/sdk-shared';
|
|
2
|
+
/**
|
|
3
|
+
* The properties each category of the inspector edits, in one place: the category reads them to tell what is set (the
|
|
4
|
+
* dots in its header, the hint on its advanced toggle), and the inspector's search reads them to find which category
|
|
5
|
+
* holds the property a person typed. `advanced` are the ones behind the category's sliders toggle.
|
|
6
|
+
*/
|
|
7
|
+
export type CategoryKeys = {
|
|
8
|
+
title: string;
|
|
9
|
+
dot: StyleCategory[];
|
|
10
|
+
advanced: StyleCategory[];
|
|
11
|
+
};
|
|
12
|
+
export declare const LIST_KEYS: CategoryKeys;
|
|
13
|
+
export declare const LIST_ITEM_KEYS: CategoryKeys;
|
|
14
|
+
export declare const DISPLAY_KEYS: CategoryKeys;
|
|
15
|
+
export declare const FLEX_CHILD_KEYS: CategoryKeys;
|
|
16
|
+
export declare const SPACING_KEYS: CategoryKeys;
|
|
17
|
+
export declare const SIZE_KEYS: CategoryKeys;
|
|
18
|
+
export declare const POSITION_KEYS: CategoryKeys;
|
|
19
|
+
export declare const TYPOGRAPHY_KEYS: CategoryKeys;
|
|
20
|
+
export declare const BACKGROUND_KEYS: CategoryKeys;
|
|
21
|
+
export declare const BORDER_KEYS: CategoryKeys;
|
|
22
|
+
export declare const EFFECTS_KEYS: CategoryKeys;
|
|
23
|
+
export declare const OTHERS_KEYS: CategoryKeys;
|
|
24
|
+
/** The categories with no properties of their own to search by — found by their title alone. */
|
|
25
|
+
export declare const VARIABLES_KEYS: CategoryKeys;
|
|
26
|
+
export declare const RAW_STYLE_KEYS: CategoryKeys;
|
|
27
|
+
/** Every category, by the id its collapsed state is stored under, in the order the inspector draws them. */
|
|
28
|
+
export declare const CATEGORY_KEYS: {
|
|
29
|
+
readonly list: CategoryKeys;
|
|
30
|
+
readonly listItem: CategoryKeys;
|
|
31
|
+
readonly display: CategoryKeys;
|
|
32
|
+
readonly displayFlexChild: CategoryKeys;
|
|
33
|
+
readonly spacing: CategoryKeys;
|
|
34
|
+
readonly size: CategoryKeys;
|
|
35
|
+
readonly position: CategoryKeys;
|
|
36
|
+
readonly typography: CategoryKeys;
|
|
37
|
+
readonly background: CategoryKeys;
|
|
38
|
+
readonly border: CategoryKeys;
|
|
39
|
+
readonly effects: CategoryKeys;
|
|
40
|
+
readonly others: CategoryKeys;
|
|
41
|
+
readonly variables: CategoryKeys;
|
|
42
|
+
readonly rawStyle: CategoryKeys;
|
|
43
|
+
};
|
|
44
|
+
export type CategoryId = keyof typeof CATEGORY_KEYS;
|
|
45
|
+
export declare const CATEGORY_IDS: CategoryId[];
|