@plitzi/sdk-style 0.38.10 → 0.38.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +180 -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
|
@@ -1,76 +1,33 @@
|
|
|
1
|
-
import e from "../../../
|
|
2
|
-
import t from "../../../components/
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "../components/BackgroundTile/index.mjs";
|
|
1
|
+
import { asText as e } from "../../../cssValues.mjs";
|
|
2
|
+
import t from "../../../components/CategoryOption/index.mjs";
|
|
3
|
+
import n from "../../../components/CategorySection/index.mjs";
|
|
4
|
+
import { ANGLE_UNITS as r, LINEAR_DIRECTIONS as i } from "./helpers.mjs";
|
|
6
5
|
import a from "../components/GradientStopBar/index.mjs";
|
|
7
6
|
import { useCallback as o } from "react";
|
|
8
7
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
8
|
//#region src/components/StyleInspector/categories/Background/modes/LinearGradientMode.tsx
|
|
10
9
|
var u = ({ layer: u, onChange: d }) => {
|
|
11
|
-
let f = o((
|
|
10
|
+
let f = o((t) => d?.({
|
|
12
11
|
...u,
|
|
13
|
-
angle:
|
|
12
|
+
angle: e(t)
|
|
14
13
|
}), [u, d]), p = o((e) => d?.({
|
|
15
14
|
...u,
|
|
16
15
|
stops: e
|
|
17
16
|
}), [u, d]);
|
|
18
|
-
return /* @__PURE__ */ l(s, { children: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
value: "deg"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
label: "rad",
|
|
31
|
-
value: "rad"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: "turn",
|
|
35
|
-
value: "turn"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
allowedWords: [
|
|
39
|
-
"to top",
|
|
40
|
-
"to right",
|
|
41
|
-
"to bottom",
|
|
42
|
-
"to left",
|
|
43
|
-
"to top right",
|
|
44
|
-
"to bottom right",
|
|
45
|
-
"to bottom left",
|
|
46
|
-
"to top left"
|
|
47
|
-
],
|
|
48
|
-
min: 0,
|
|
49
|
-
max: 360,
|
|
50
|
-
onChange: f
|
|
51
|
-
})
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ c(t, {
|
|
54
|
-
label: "Gradient",
|
|
55
|
-
direction: "column",
|
|
56
|
-
children: /* @__PURE__ */ c(a, {
|
|
57
|
-
stops: u.stops,
|
|
58
|
-
onChange: p
|
|
59
|
-
})
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ c(r, {
|
|
62
|
-
layer: u,
|
|
63
|
-
onChange: d
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ c(n, {
|
|
66
|
-
layer: u,
|
|
67
|
-
onChange: d
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ c(i, {
|
|
70
|
-
layer: u,
|
|
71
|
-
onChange: d
|
|
17
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(n, {
|
|
18
|
+
label: "Direction",
|
|
19
|
+
children: /* @__PURE__ */ c(t, {
|
|
20
|
+
type: "metric",
|
|
21
|
+
value: u.angle || "to bottom",
|
|
22
|
+
units: r,
|
|
23
|
+
allowedWords: i,
|
|
24
|
+
min: -Infinity,
|
|
25
|
+
onChange: f
|
|
72
26
|
})
|
|
73
|
-
|
|
27
|
+
}), /* @__PURE__ */ c(a, {
|
|
28
|
+
stops: u.stops,
|
|
29
|
+
onChange: p
|
|
30
|
+
})] });
|
|
74
31
|
};
|
|
75
32
|
//#endregion
|
|
76
33
|
export { u as default };
|
|
@@ -1,120 +1,102 @@
|
|
|
1
|
-
import e from "../../../
|
|
2
|
-
import t from "../../../components/
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
1
|
+
import { asText as e } from "../../../cssValues.mjs";
|
|
2
|
+
import t from "../../../components/CategoryOption/index.mjs";
|
|
3
|
+
import n from "../../../components/CategorySection/index.mjs";
|
|
4
|
+
import { CENTER_X_WORDS as r, CENTER_Y_WORDS as i, RADIAL_EXTENTS as a, centerParts as o, customExtentFor as s, isExtentKeyword as c, joinCenter as l } from "./helpers.mjs";
|
|
5
|
+
import u from "../components/GradientStopBar/index.mjs";
|
|
6
|
+
import { useCallback as d } from "react";
|
|
7
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
8
|
//#region src/components/StyleInspector/categories/Background/modes/RadialGradientMode.tsx
|
|
10
|
-
var
|
|
11
|
-
let
|
|
12
|
-
...
|
|
13
|
-
radialShape: e
|
|
14
|
-
}), [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
d?.({
|
|
20
|
-
...u,
|
|
21
|
-
radialPosition: `${String(e)} ${t[1] ?? "50%"}`
|
|
9
|
+
var h = "custom", g = ({ layer: g, onChange: _ }) => {
|
|
10
|
+
let [v, y] = o(g.radialPosition), b = !c(g.radialExtent), x = d((t) => _?.({
|
|
11
|
+
...g,
|
|
12
|
+
radialShape: e(t) === "circle" ? "circle" : "ellipse"
|
|
13
|
+
}), [g, _]), S = d((t) => {
|
|
14
|
+
let n = e(t);
|
|
15
|
+
_?.({
|
|
16
|
+
...g,
|
|
17
|
+
radialExtent: n === h ? s(g.radialShape) : n
|
|
22
18
|
});
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
|
|
19
|
+
}, [g, _]), C = d((t) => _?.({
|
|
20
|
+
...g,
|
|
21
|
+
radialExtent: e(t)
|
|
22
|
+
}), [g, _]), w = d((t) => _?.({
|
|
23
|
+
...g,
|
|
24
|
+
radialPosition: l(e(t), y)
|
|
25
|
+
}), [
|
|
26
|
+
y,
|
|
27
|
+
g,
|
|
28
|
+
_
|
|
29
|
+
]), T = d((t) => _?.({
|
|
30
|
+
...g,
|
|
31
|
+
radialPosition: l(v, e(t))
|
|
32
|
+
}), [
|
|
33
|
+
v,
|
|
34
|
+
g,
|
|
35
|
+
_
|
|
36
|
+
]), E = d((e) => _?.({
|
|
37
|
+
...g,
|
|
31
38
|
stops: e
|
|
32
|
-
}), [
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
39
|
+
}), [g, _]);
|
|
40
|
+
return /* @__PURE__ */ m(f, { children: [
|
|
41
|
+
/* @__PURE__ */ p(n, {
|
|
35
42
|
label: "Shape",
|
|
36
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ m(t, {
|
|
37
44
|
type: "select",
|
|
38
|
-
value:
|
|
39
|
-
onChange:
|
|
40
|
-
children: [/* @__PURE__ */
|
|
45
|
+
value: g.radialShape,
|
|
46
|
+
onChange: x,
|
|
47
|
+
children: [/* @__PURE__ */ p("option", {
|
|
41
48
|
value: "ellipse",
|
|
42
49
|
children: "Ellipse"
|
|
43
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ p("option", {
|
|
44
51
|
value: "circle",
|
|
45
52
|
children: "Circle"
|
|
46
53
|
})]
|
|
47
54
|
})
|
|
48
55
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
label: "
|
|
51
|
-
children: /* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ p(n, {
|
|
57
|
+
label: "Extent",
|
|
58
|
+
children: /* @__PURE__ */ m(t, {
|
|
52
59
|
type: "select",
|
|
53
|
-
value:
|
|
54
|
-
onChange:
|
|
55
|
-
children: [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
children: "Closest Side"
|
|
71
|
-
})
|
|
72
|
-
]
|
|
60
|
+
value: b ? h : g.radialExtent,
|
|
61
|
+
onChange: S,
|
|
62
|
+
children: [a.map((e) => /* @__PURE__ */ p("option", {
|
|
63
|
+
value: e.value,
|
|
64
|
+
children: e.label
|
|
65
|
+
}, e.value)), /* @__PURE__ */ p("option", {
|
|
66
|
+
value: h,
|
|
67
|
+
children: "Custom size"
|
|
68
|
+
})]
|
|
69
|
+
})
|
|
70
|
+
}),
|
|
71
|
+
b && /* @__PURE__ */ p(n, {
|
|
72
|
+
label: "Radius",
|
|
73
|
+
children: /* @__PURE__ */ p(t, {
|
|
74
|
+
type: "input",
|
|
75
|
+
value: g.radialExtent,
|
|
76
|
+
onChange: C
|
|
73
77
|
})
|
|
74
78
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
label: "
|
|
77
|
-
children: [/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ m(n, {
|
|
80
|
+
label: "Center",
|
|
81
|
+
children: [/* @__PURE__ */ p(t, {
|
|
78
82
|
type: "metric",
|
|
79
|
-
value:
|
|
80
|
-
allowedWords:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
],
|
|
85
|
-
onChange: m
|
|
86
|
-
}), /* @__PURE__ */ c(e, {
|
|
83
|
+
value: v,
|
|
84
|
+
allowedWords: r,
|
|
85
|
+
min: -Infinity,
|
|
86
|
+
onChange: w
|
|
87
|
+
}), /* @__PURE__ */ p(t, {
|
|
87
88
|
type: "metric",
|
|
88
|
-
value:
|
|
89
|
-
allowedWords:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"bottom"
|
|
93
|
-
],
|
|
94
|
-
onChange: h
|
|
89
|
+
value: y,
|
|
90
|
+
allowedWords: i,
|
|
91
|
+
min: -Infinity,
|
|
92
|
+
onChange: T
|
|
95
93
|
})]
|
|
96
94
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
children: /* @__PURE__ */ c(a, {
|
|
101
|
-
stops: u.stops,
|
|
102
|
-
onChange: g
|
|
103
|
-
})
|
|
104
|
-
}),
|
|
105
|
-
/* @__PURE__ */ c(r, {
|
|
106
|
-
layer: u,
|
|
107
|
-
onChange: d
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ c(n, {
|
|
110
|
-
layer: u,
|
|
111
|
-
onChange: d
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ c(i, {
|
|
114
|
-
layer: u,
|
|
115
|
-
onChange: d
|
|
95
|
+
/* @__PURE__ */ p(u, {
|
|
96
|
+
stops: g.stops,
|
|
97
|
+
onChange: E
|
|
116
98
|
})
|
|
117
99
|
] });
|
|
118
100
|
};
|
|
119
101
|
//#endregion
|
|
120
|
-
export {
|
|
102
|
+
export { g as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BackgroundLayer } from '../helpers/backgroundParser';
|
|
2
|
+
export type RawModeProps = {
|
|
3
|
+
layer: BackgroundLayer;
|
|
4
|
+
onChange?: (layer: BackgroundLayer) => void;
|
|
5
|
+
};
|
|
6
|
+
/** A layer the editor has no controls for — a token, `image-set()` — written as the CSS it is. */
|
|
7
|
+
declare const RawMode: ({ layer, onChange }: RawModeProps) => import('react').JSX.Element;
|
|
8
|
+
export default RawMode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { asText as e } from "../../../cssValues.mjs";
|
|
2
|
+
import t from "../../../components/CategoryOption/index.mjs";
|
|
3
|
+
import { useCallback as n } from "react";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/StyleInspector/categories/Background/modes/RawMode.tsx
|
|
6
|
+
var o = ({ layer: o, onChange: s }) => {
|
|
7
|
+
let c = n((t) => s?.({
|
|
8
|
+
...o,
|
|
9
|
+
raw: e(t)
|
|
10
|
+
}), [o, s]);
|
|
11
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(t, {
|
|
12
|
+
label: "CSS",
|
|
13
|
+
type: "input",
|
|
14
|
+
value: o.raw,
|
|
15
|
+
onChange: c
|
|
16
|
+
}), /* @__PURE__ */ i("p", {
|
|
17
|
+
className: "m-0 text-[11px] text-zinc-500 dark:text-zinc-400",
|
|
18
|
+
children: "Any image CSS accepts: a token such as var(--hero-bg), image-set(…), cross-fade(…)."
|
|
19
|
+
})] });
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { o as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const ANGLE_UNITS: {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const LINEAR_DIRECTIONS: string[];
|
|
6
|
+
export declare const CENTER_X_WORDS: string[];
|
|
7
|
+
export declare const CENTER_Y_WORDS: string[];
|
|
8
|
+
/** The keywords a radial gradient's size can be; anything else is a size of its own (`100px`, `40% 20%`). */
|
|
9
|
+
export declare const RADIAL_EXTENTS: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare const isExtentKeyword: (extent: string) => boolean;
|
|
14
|
+
/** A size a circle takes as one length; an ellipse needs two. */
|
|
15
|
+
export declare const customExtentFor: (shape: "circle" | "ellipse") => string;
|
|
16
|
+
/** A gradient's center as its two axes — CSS's default (the middle) when it names none. */
|
|
17
|
+
export declare const centerParts: (position: string) => [string, string];
|
|
18
|
+
/** Back to the one value, left out when it is the default — so a gradient that never named a center still names none. */
|
|
19
|
+
export declare const joinCenter: (x: string, y: string) => string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/components/StyleInspector/categories/Background/modes/helpers.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
label: "DEG",
|
|
5
|
+
value: "deg"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
label: "TURN",
|
|
9
|
+
value: "turn"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: "RAD",
|
|
13
|
+
value: "rad"
|
|
14
|
+
}
|
|
15
|
+
], t = [
|
|
16
|
+
"to top",
|
|
17
|
+
"to right",
|
|
18
|
+
"to bottom",
|
|
19
|
+
"to left",
|
|
20
|
+
"to top right",
|
|
21
|
+
"to bottom right",
|
|
22
|
+
"to bottom left",
|
|
23
|
+
"to top left"
|
|
24
|
+
], n = [
|
|
25
|
+
"center",
|
|
26
|
+
"left",
|
|
27
|
+
"right"
|
|
28
|
+
], r = [
|
|
29
|
+
"center",
|
|
30
|
+
"top",
|
|
31
|
+
"bottom"
|
|
32
|
+
], i = [
|
|
33
|
+
{
|
|
34
|
+
value: "farthest-corner",
|
|
35
|
+
label: "Farthest corner"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: "farthest-side",
|
|
39
|
+
label: "Farthest side"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
value: "closest-corner",
|
|
43
|
+
label: "Closest corner"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: "closest-side",
|
|
47
|
+
label: "Closest side"
|
|
48
|
+
}
|
|
49
|
+
], a = (e) => i.some((t) => t.value === e), o = (e) => e === "circle" ? "100px" : "50% 50%", s = (e) => {
|
|
50
|
+
let [t = "center", n = "center"] = e.split(" ").filter(Boolean);
|
|
51
|
+
return [t, n];
|
|
52
|
+
}, c = (e, t) => e === "center" && t === "center" ? "" : `${e} ${t}`;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { e as ANGLE_UNITS, n as CENTER_X_WORDS, r as CENTER_Y_WORDS, t as LINEAR_DIRECTIONS, i as RADIAL_EXTENTS, s as centerParts, o as customExtentFor, a as isExtentKeyword, c as joinCenter };
|
|
@@ -1,37 +1,20 @@
|
|
|
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
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"border-top-color",
|
|
16
|
-
"border-bottom-style",
|
|
17
|
-
"border-bottom-width",
|
|
18
|
-
"border-bottom-color",
|
|
19
|
-
"border-left-style",
|
|
20
|
-
"border-left-width",
|
|
21
|
-
"border-left-color",
|
|
22
|
-
"border-right-style",
|
|
23
|
-
"border-right-width",
|
|
24
|
-
"border-right-color",
|
|
25
|
-
"border-top-left-radius",
|
|
26
|
-
"border-top-right-radius",
|
|
27
|
-
"border-bottom-left-radius",
|
|
28
|
-
"border-bottom-right-radius"
|
|
29
|
-
], h = c(({ replaceTokens: c = !1, isCollapsed: h = !0, onCollapse: g }) => {
|
|
30
|
-
let [_, v] = d("all"), { setValue: y } = l(e), b = t({
|
|
31
|
-
keys: m,
|
|
3
|
+
import { BORDER_KEYS as n } from "../../categoryKeys.mjs";
|
|
4
|
+
import r from "../../components/CategoryContainer/index.mjs";
|
|
5
|
+
import i from "./BorderColor.mjs";
|
|
6
|
+
import a from "./BorderPlacements.mjs";
|
|
7
|
+
import o from "./BorderRadius.mjs";
|
|
8
|
+
import s from "./BorderStyle.mjs";
|
|
9
|
+
import c from "./BorderWidth.mjs";
|
|
10
|
+
import { memo as l, use as u, useCallback as d, useState as f } from "react";
|
|
11
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
|
+
var h = l(({ replaceTokens: l = !1, isCollapsed: h = !0, onCollapse: g }) => {
|
|
13
|
+
let [_, v] = f("all"), { setValue: y } = u(e), b = t({
|
|
14
|
+
keys: n.dot,
|
|
32
15
|
asValue: !0,
|
|
33
|
-
replaceTokens:
|
|
34
|
-
}), x =
|
|
16
|
+
replaceTokens: l
|
|
17
|
+
}), x = d((e) => (t) => {
|
|
35
18
|
switch (e) {
|
|
36
19
|
case "radius":
|
|
37
20
|
y(void 0, {
|
|
@@ -80,37 +63,37 @@ var m = [
|
|
|
80
63
|
_,
|
|
81
64
|
b,
|
|
82
65
|
y
|
|
83
|
-
]), S =
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
title:
|
|
86
|
-
dotKeys:
|
|
66
|
+
]), S = d((e) => g?.("border", e), [g]);
|
|
67
|
+
return /* @__PURE__ */ p(r, {
|
|
68
|
+
title: n.title,
|
|
69
|
+
dotKeys: n.dot,
|
|
87
70
|
isCollapsed: h,
|
|
88
71
|
onCollapse: S,
|
|
89
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ m("div", {
|
|
90
73
|
className: "flex flex-col gap-2",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ p(o, {
|
|
92
75
|
values: b,
|
|
93
76
|
onChange: x("radius"),
|
|
94
77
|
onChangeSegment: x
|
|
95
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ m("div", {
|
|
96
79
|
className: "flex w-full flex-col gap-2",
|
|
97
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ p(a, {
|
|
98
81
|
currentPlacement: _,
|
|
99
82
|
setCurrentPlacement: v
|
|
100
|
-
}), /* @__PURE__ */
|
|
83
|
+
}), /* @__PURE__ */ m("div", {
|
|
101
84
|
className: "flex w-full flex-col gap-2",
|
|
102
85
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ p(s, {
|
|
104
87
|
values: b,
|
|
105
88
|
currentPlacement: _,
|
|
106
89
|
onChange: x("style")
|
|
107
90
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ p(c, {
|
|
109
92
|
values: b,
|
|
110
93
|
currentPlacement: _,
|
|
111
94
|
onChange: x("width")
|
|
112
95
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ p(i, {
|
|
114
97
|
values: b,
|
|
115
98
|
currentPlacement: _,
|
|
116
99
|
onChange: x("color")
|
|
@@ -1,55 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import r from "
|
|
4
|
-
import i from "
|
|
5
|
-
import a from "@plitzi/plitzi-ui/
|
|
6
|
-
import o from "@plitzi/plitzi-ui/icons/
|
|
7
|
-
import s from "@plitzi/plitzi-ui/icons/
|
|
8
|
-
import c from "@plitzi/plitzi-ui/icons/
|
|
9
|
-
import l from "@plitzi/plitzi-ui/icons/
|
|
1
|
+
import e from "../../components/CategorySection/index.mjs";
|
|
2
|
+
import { useCallback as t } from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import i from "clsx";
|
|
5
|
+
import a from "@plitzi/plitzi-ui/Icon";
|
|
6
|
+
import o from "@plitzi/plitzi-ui/icons/BorderPlacementBottom";
|
|
7
|
+
import s from "@plitzi/plitzi-ui/icons/BorderPlacementCenter";
|
|
8
|
+
import c from "@plitzi/plitzi-ui/icons/BorderPlacementLeft";
|
|
9
|
+
import l from "@plitzi/plitzi-ui/icons/BorderPlacementRight";
|
|
10
|
+
import u from "@plitzi/plitzi-ui/icons/BorderPlacementTop";
|
|
10
11
|
//#region src/components/StyleInspector/categories/Border/BorderPlacements.tsx
|
|
11
|
-
var
|
|
12
|
-
let
|
|
13
|
-
return /* @__PURE__ */ n(
|
|
14
|
-
|
|
15
|
-
children:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
12
|
+
var d = ({ currentPlacement: d, setCurrentPlacement: f }) => {
|
|
13
|
+
let p = t((e) => () => f(e), [f]);
|
|
14
|
+
return /* @__PURE__ */ n(e, {
|
|
15
|
+
label: "Side",
|
|
16
|
+
children: /* @__PURE__ */ r("div", {
|
|
17
|
+
className: "mx-auto grid grid-cols-3 grid-rows-3 place-items-center gap-1.5",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ n(a, {
|
|
20
|
+
size: "2xl",
|
|
21
|
+
className: i("col-start-2 cursor-pointer rounded p-0.5", { "bg-primary-500/15 dark:bg-primary-400/20": d === "top" }),
|
|
22
|
+
title: "Top border",
|
|
23
|
+
onClick: p("top"),
|
|
24
|
+
active: d === "top",
|
|
25
|
+
children: /* @__PURE__ */ n(u, {})
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ n(a, {
|
|
28
|
+
size: "2xl",
|
|
29
|
+
className: i("row-start-2 cursor-pointer rounded p-0.5", { "bg-primary-500/15 dark:bg-primary-400/20": d === "left" }),
|
|
30
|
+
title: "Left border",
|
|
31
|
+
onClick: p("left"),
|
|
32
|
+
active: d === "left",
|
|
33
|
+
children: /* @__PURE__ */ n(c, {})
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ n(a, {
|
|
36
|
+
size: "2xl",
|
|
37
|
+
className: i("row-start-2 grid cursor-pointer grid-cols-3 rounded p-0.5", { "bg-primary-500/15 dark:bg-primary-400/20": d === "all" }),
|
|
38
|
+
title: "All four sides",
|
|
39
|
+
onClick: p("all"),
|
|
40
|
+
active: d === "all",
|
|
41
|
+
children: /* @__PURE__ */ n(s, {})
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ n(a, {
|
|
44
|
+
size: "2xl",
|
|
45
|
+
className: i("row-start-2 cursor-pointer rounded p-0.5", { "bg-primary-500/15 dark:bg-primary-400/20": d === "right" }),
|
|
46
|
+
title: "Right border",
|
|
47
|
+
onClick: p("right"),
|
|
48
|
+
active: d === "right",
|
|
49
|
+
children: /* @__PURE__ */ n(l, {})
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ n(a, {
|
|
52
|
+
size: "2xl",
|
|
53
|
+
className: i("col-start-2 row-start-3 cursor-pointer rounded p-0.5", { "bg-primary-500/15 dark:bg-primary-400/20": d === "bottom" }),
|
|
54
|
+
title: "Bottom border",
|
|
55
|
+
onClick: p("bottom"),
|
|
56
|
+
active: d === "bottom",
|
|
57
|
+
children: /* @__PURE__ */ n(o, {})
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
})
|
|
52
61
|
});
|
|
53
62
|
};
|
|
54
63
|
//#endregion
|
|
55
|
-
export {
|
|
64
|
+
export { d as default };
|