@plitzi/sdk-style 0.33.1 → 0.34.0
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 +25 -0
- package/dist/BuilderStyleContextProvider.d.ts +11 -2
- package/dist/BuilderStyleContextProvider.mjs +76 -54
- package/dist/SdkStyleContextProvider.mjs +4 -4
- package/dist/StyleAdvanceEditor.mjs +30 -30
- package/dist/StyleMap/StyleMap.d.ts +14 -1
- package/dist/StyleMap/StyleMap.mjs +24 -2
- package/dist/StyleMap/helpers/isValueValid.mjs +1 -1
- package/dist/StyleReducer.d.ts +15 -4
- package/dist/StyleReducer.mjs +39 -18
- package/dist/components/InputEasing/InputEasing.mjs +21 -21
- package/dist/components/InputEasing/InputEasingButton.mjs +5 -5
- package/dist/components/InputEasing/InputEasingList.mjs +76 -76
- package/dist/components/Selector/Selector.mjs +29 -29
- package/dist/components/Selector/SelectorItem/ItemOptions.mjs +16 -16
- package/dist/components/Selector/SelectorItem/SelectorItem.mjs +10 -10
- package/dist/components/StyleInspector/Inspector.mjs +33 -33
- package/dist/components/StyleInspector/StyleInspector.mjs +45 -45
- package/dist/components/StyleInspector/StyleInspectorProvider.mjs +14 -14
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +46 -46
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +20 -20
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +11 -11
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +20 -20
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.mjs +12 -12
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +22 -21
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +66 -65
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.d.ts +2 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.mjs +18 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +15 -15
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +16 -16
- package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +12 -12
- package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.mjs +5 -5
- package/dist/components/StyleInspector/categories/Typography/Typography.d.ts +1 -5
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +58 -57
- package/dist/components/StyleInspector/categories/Typography/TypographyConstants.d.ts +0 -4
- package/dist/components/StyleInspector/categories/Typography/TypographyConstants.mjs +2 -160
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.d.ts +1 -4
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +24 -17
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +15 -15
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +17 -17
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.mjs +8 -8
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.mjs +4 -4
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +13 -13
- package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +13 -13
- package/dist/components/StyleInspector/hooks/useStyleBinding.mjs +12 -12
- package/dist/components/StyleInspector/hooks/useStyleInherit.mjs +3 -3
- package/dist/components/StyleManager/ManagerSelector.mjs +35 -35
- package/dist/components/StyleManager/StyleManager.mjs +12 -12
- package/dist/components/StyleManager/StyleSelectorTag.mjs +20 -20
- package/dist/helpers/calculateInheriting.mjs +2 -2
- package/dist/helpers/generateStyleSelector.mjs +1 -1
- package/dist/helpers/processSelectorAttributes.mjs +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.mjs +2 -0
- package/dist/hooks/useSpaceFonts.d.ts +10 -0
- package/dist/hooks/useSpaceFonts.mjs +10 -0
- package/dist/index.mjs +16 -16
- package/dist/models/SelectorForm/SelectorForm.mjs +1 -1
- package/package.json +26 -9
|
@@ -1,124 +1,125 @@
|
|
|
1
1
|
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
2
|
import t from "../../../components/CategorySection/index.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import s from "
|
|
6
|
-
import c from "@plitzi/plitzi-ui/
|
|
3
|
+
import { splitBySpaceOutsideParens as n } from "./helpers.mjs";
|
|
4
|
+
import { useCallback as r, useMemo as i, useRef as a } from "react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import c from "@plitzi/plitzi-ui/ContainerFloating";
|
|
7
|
+
import l from "@plitzi/plitzi-ui/Icon";
|
|
7
8
|
//#region src/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
type:
|
|
13
|
-
posX:
|
|
14
|
-
posY:
|
|
15
|
-
blur:
|
|
16
|
-
size:
|
|
17
|
-
color:
|
|
9
|
+
var u = ({ value: u = "1px 1px 3px 1px black", onChange: d, onRemove: f }) => {
|
|
10
|
+
let p = n(u), { type: m = "", posX: h = "1px", posY: g = "1px", blur: _ = "3px", size: v = "1px", color: y = "black" } = {};
|
|
11
|
+
p.length === 6 ? [m, h, g, _, v, y] = p : p.length === 5 && (m = "", [h, g, _, v, y] = p);
|
|
12
|
+
let b = a({
|
|
13
|
+
type: m,
|
|
14
|
+
posX: h,
|
|
15
|
+
posY: g,
|
|
16
|
+
blur: _,
|
|
17
|
+
size: v,
|
|
18
|
+
color: y
|
|
18
19
|
});
|
|
19
|
-
|
|
20
|
-
type:
|
|
21
|
-
posX:
|
|
22
|
-
posY:
|
|
23
|
-
blur:
|
|
24
|
-
size:
|
|
25
|
-
color:
|
|
20
|
+
b.current = {
|
|
21
|
+
type: m,
|
|
22
|
+
posX: h,
|
|
23
|
+
posY: g,
|
|
24
|
+
blur: _,
|
|
25
|
+
size: v,
|
|
26
|
+
color: y
|
|
26
27
|
};
|
|
27
|
-
let
|
|
28
|
-
let n = { ...
|
|
28
|
+
let x = r((e) => (t) => {
|
|
29
|
+
let n = { ...b.current };
|
|
29
30
|
n[e] = t;
|
|
30
31
|
let { type: r, posX: i, posY: a, blur: o, size: s, color: c } = n;
|
|
31
|
-
r ?
|
|
32
|
-
}, [
|
|
32
|
+
r ? d?.(`${r} ${i} ${a} ${o} ${s} ${c}`) : d?.(`${i} ${a} ${o} ${s} ${c}`);
|
|
33
|
+
}, [d]), S = i(() => [{
|
|
33
34
|
value: "",
|
|
34
|
-
icon: /* @__PURE__ */
|
|
35
|
+
icon: /* @__PURE__ */ o("div", {
|
|
35
36
|
className: "px-1 text-xs select-none",
|
|
36
37
|
children: "Outside"
|
|
37
38
|
}),
|
|
38
39
|
description: "",
|
|
39
|
-
active:
|
|
40
|
+
active: m === "",
|
|
40
41
|
size: "custom"
|
|
41
42
|
}, {
|
|
42
43
|
value: "inset",
|
|
43
|
-
icon: /* @__PURE__ */
|
|
44
|
+
icon: /* @__PURE__ */ o("div", {
|
|
44
45
|
className: "px-1 text-xs select-none",
|
|
45
46
|
children: "Inside"
|
|
46
47
|
}),
|
|
47
48
|
description: "",
|
|
48
|
-
active:
|
|
49
|
+
active: m === "inset",
|
|
49
50
|
size: "custom"
|
|
50
|
-
}], [
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
}], [m]);
|
|
52
|
+
return /* @__PURE__ */ s(c, {
|
|
52
53
|
className: "w-full",
|
|
53
54
|
closeOnClick: !1,
|
|
54
55
|
containerTopOffset: 5,
|
|
55
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ s(c.Trigger, {
|
|
56
57
|
className: "flex w-full cursor-pointer items-center justify-between rounded-sm border border-gray-300 bg-white px-2 py-0.5 select-none hover:bg-gray-100 dark:border-zinc-600 dark:bg-zinc-800 dark:hover:bg-zinc-700/60",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ s("div", {
|
|
58
59
|
className: "flex items-center",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ o("div", {
|
|
60
61
|
className: "mr-1 h-5 w-5 rounded-sm",
|
|
61
|
-
style: { backgroundColor:
|
|
62
|
-
}), /* @__PURE__ */
|
|
62
|
+
style: { backgroundColor: y }
|
|
63
|
+
}), /* @__PURE__ */ o("div", {
|
|
63
64
|
className: "flex",
|
|
64
|
-
children:
|
|
65
|
+
children: u
|
|
65
66
|
})]
|
|
66
|
-
}), /* @__PURE__ */
|
|
67
|
+
}), /* @__PURE__ */ o("div", {
|
|
67
68
|
className: "flex",
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ o(l, {
|
|
69
70
|
size: "xs",
|
|
70
71
|
icon: "fas fa-trash-alt",
|
|
71
|
-
onClick:
|
|
72
|
+
onClick: f,
|
|
72
73
|
intent: "danger",
|
|
73
74
|
title: "Remove"
|
|
74
75
|
})
|
|
75
76
|
})]
|
|
76
|
-
}), /* @__PURE__ */
|
|
77
|
+
}), /* @__PURE__ */ o(c.Content, {
|
|
77
78
|
className: "w-[260px]",
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ s("div", {
|
|
79
80
|
className: "flex w-full flex-col gap-2 p-2",
|
|
80
81
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ o(t, {
|
|
82
83
|
label: "Type",
|
|
83
|
-
children: /* @__PURE__ */
|
|
84
|
-
onChange:
|
|
84
|
+
children: /* @__PURE__ */ o(e, {
|
|
85
|
+
onChange: x("type"),
|
|
85
86
|
type: "iconGroup",
|
|
86
|
-
items:
|
|
87
|
+
items: S
|
|
87
88
|
})
|
|
88
89
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ s(t, {
|
|
90
91
|
label: "Position",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ o(e, {
|
|
92
93
|
label: "Pos X",
|
|
93
|
-
value:
|
|
94
|
-
onChange:
|
|
94
|
+
value: h,
|
|
95
|
+
onChange: x("posX"),
|
|
95
96
|
type: "metric"
|
|
96
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ o(e, {
|
|
97
98
|
label: "Pos Y",
|
|
98
|
-
value:
|
|
99
|
-
onChange:
|
|
99
|
+
value: g,
|
|
100
|
+
onChange: x("posY"),
|
|
100
101
|
type: "metric"
|
|
101
102
|
})]
|
|
102
103
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ s(t, {
|
|
104
105
|
label: "Style",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ o(e, {
|
|
106
107
|
label: "Blur",
|
|
107
|
-
value:
|
|
108
|
-
onChange:
|
|
108
|
+
value: _,
|
|
109
|
+
onChange: x("blur"),
|
|
109
110
|
type: "metric"
|
|
110
|
-
}), /* @__PURE__ */
|
|
111
|
+
}), /* @__PURE__ */ o(e, {
|
|
111
112
|
label: "Size",
|
|
112
|
-
value:
|
|
113
|
-
onChange:
|
|
113
|
+
value: v,
|
|
114
|
+
onChange: x("size"),
|
|
114
115
|
type: "metric"
|
|
115
116
|
})]
|
|
116
117
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ o(t, {
|
|
118
119
|
label: "Color",
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
value:
|
|
121
|
-
onChange:
|
|
120
|
+
children: /* @__PURE__ */ o(e, {
|
|
121
|
+
value: y,
|
|
122
|
+
onChange: x("color"),
|
|
122
123
|
type: "color"
|
|
123
124
|
})
|
|
124
125
|
})
|
|
@@ -128,4 +129,4 @@ var l = ({ value: l = "1px 1px 3px 1px black", onChange: u, onRemove: d }) => {
|
|
|
128
129
|
});
|
|
129
130
|
};
|
|
130
131
|
//#endregion
|
|
131
|
-
export {
|
|
132
|
+
export { u as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/components/StyleInspector/categories/Effects/BoxShadow/helpers.ts
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
let t = [], n = "", r = 0;
|
|
4
|
+
for (let i = 0; i < e.length; i++) {
|
|
5
|
+
let a = e[i];
|
|
6
|
+
a === "(" ? (r++, n += a) : a === ")" ? (r--, n += a) : a === "," && r === 0 ? (t.push(n), n = "") : n += a;
|
|
7
|
+
}
|
|
8
|
+
return n && t.push(n), t;
|
|
9
|
+
}, t = (e) => {
|
|
10
|
+
let t = [], n = "", r = 0;
|
|
11
|
+
for (let i = 0; i < e.length; i++) {
|
|
12
|
+
let a = e[i];
|
|
13
|
+
a === "(" ? (r++, n += a) : a === ")" ? (r--, n += a) : a === " " && r === 0 ? (n && t.push(n), n = "") : n += a;
|
|
14
|
+
}
|
|
15
|
+
return n && t.push(n), t;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as splitByCommaOutsideParens, t as splitBySpaceOutsideParens };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import e from "../../../../InputEasing/
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "../../../components/
|
|
5
|
-
import
|
|
6
|
-
import a from "
|
|
1
|
+
import { easingGenerics as e } from "../../../../InputEasing/InputEasingHelper.mjs";
|
|
2
|
+
import t from "../../../../InputEasing/InputEasingList.mjs";
|
|
3
|
+
import n from "../../../../InputEasing/index.mjs";
|
|
4
|
+
import r from "../../../components/InspectorLabel/index.mjs";
|
|
5
|
+
import i from "../../../components/CategoryOption/index.mjs";
|
|
6
|
+
import a from "../../../components/CategorySection/index.mjs";
|
|
7
7
|
import { useCallback as o, useRef as s, useState as c } from "react";
|
|
8
8
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
9
|
import d from "@plitzi/plitzi-ui/ContainerFloating";
|
|
@@ -43,7 +43,7 @@ var h = ({ value: h = "", onRemove: g, onChange: _ }) => {
|
|
|
43
43
|
let { duration: r, delay: i, property: a, easing: o } = n;
|
|
44
44
|
console.log("called", e, o, t), _?.(`${a} ${r} ${o} ${i}`);
|
|
45
45
|
}, [_]), A = o((e) => k("easing")(e), [k]), j = [];
|
|
46
|
-
return j = E in
|
|
46
|
+
return j = E in e ? e[E] : E.match(/[0-9.]+/gim), /* @__PURE__ */ u(d, {
|
|
47
47
|
className: "w-full",
|
|
48
48
|
closeOnClick: !1,
|
|
49
49
|
containerTopOffset: 5,
|
|
@@ -67,9 +67,9 @@ var h = ({ value: h = "", onRemove: g, onChange: _ }) => {
|
|
|
67
67
|
children: /* @__PURE__ */ u("div", {
|
|
68
68
|
className: "flex w-full flex-col gap-2 p-2",
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */ l(
|
|
70
|
+
/* @__PURE__ */ l(a, {
|
|
71
71
|
label: "Property",
|
|
72
|
-
children: /* @__PURE__ */ u(
|
|
72
|
+
children: /* @__PURE__ */ u(i, {
|
|
73
73
|
onChange: k("property"),
|
|
74
74
|
type: "select",
|
|
75
75
|
value: w,
|
|
@@ -297,7 +297,7 @@ var h = ({ value: h = "", onRemove: g, onChange: _ }) => {
|
|
|
297
297
|
]
|
|
298
298
|
})
|
|
299
299
|
}),
|
|
300
|
-
/* @__PURE__ */ u(
|
|
300
|
+
/* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(i, {
|
|
301
301
|
label: "Duration",
|
|
302
302
|
value: T,
|
|
303
303
|
onChange: k("duration"),
|
|
@@ -307,7 +307,7 @@ var h = ({ value: h = "", onRemove: g, onChange: _ }) => {
|
|
|
307
307
|
value: "ms"
|
|
308
308
|
}],
|
|
309
309
|
min: 0
|
|
310
|
-
}), /* @__PURE__ */ l(
|
|
310
|
+
}), /* @__PURE__ */ l(i, {
|
|
311
311
|
label: "Delay",
|
|
312
312
|
value: D,
|
|
313
313
|
onChange: k("delay"),
|
|
@@ -318,7 +318,7 @@ var h = ({ value: h = "", onRemove: g, onChange: _ }) => {
|
|
|
318
318
|
}],
|
|
319
319
|
min: 0
|
|
320
320
|
})] }),
|
|
321
|
-
/* @__PURE__ */ u(
|
|
321
|
+
/* @__PURE__ */ u(a, {
|
|
322
322
|
label: "Easing",
|
|
323
323
|
children: [/* @__PURE__ */ u(d, {
|
|
324
324
|
containerLeftOffset: -92,
|
|
@@ -330,7 +330,7 @@ var h = ({ value: h = "", onRemove: g, onChange: _ }) => {
|
|
|
330
330
|
children: /* @__PURE__ */ l(m, {})
|
|
331
331
|
}) }), /* @__PURE__ */ u(d.Content, {
|
|
332
332
|
className: "flex h-[456px] w-[260px] flex-col items-center overflow-y-auto",
|
|
333
|
-
children: [/* @__PURE__ */ l(
|
|
333
|
+
children: [/* @__PURE__ */ l(t, {
|
|
334
334
|
className: "w-[260px]",
|
|
335
335
|
onChange: k("easing")
|
|
336
336
|
}), /* @__PURE__ */ u("div", {
|
|
@@ -338,8 +338,8 @@ var h = ({ value: h = "", onRemove: g, onChange: _ }) => {
|
|
|
338
338
|
children: [/* @__PURE__ */ u("div", {
|
|
339
339
|
className: "flex",
|
|
340
340
|
onClick: S,
|
|
341
|
-
children: [/* @__PURE__ */ l(f, { icon: b ? "fas fa-pause" : "fas fa-play" }), /* @__PURE__ */ l(
|
|
342
|
-
}), /* @__PURE__ */ l(
|
|
341
|
+
children: [/* @__PURE__ */ l(f, { icon: b ? "fas fa-pause" : "fas fa-play" }), /* @__PURE__ */ l(r, { children: b ? "Pause" : "Play" })]
|
|
342
|
+
}), /* @__PURE__ */ l(n, {
|
|
343
343
|
value: j,
|
|
344
344
|
progress: v,
|
|
345
345
|
height: 200,
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { processSelectors as e } from "../../../../helpers/processSelector.mjs";
|
|
2
2
|
import t from "../../components/CategoryContainer/index.mjs";
|
|
3
|
-
import n from "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { useCallback as n, useMemo as r } from "react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
import a from "@plitzi/plitzi-ui/CodeMirror";
|
|
6
|
+
import o from "@plitzi/sdk-shared/theme/useTheme";
|
|
7
|
+
import s from "clsx";
|
|
8
8
|
//#region src/components/StyleInspector/categories/RawStyle/RawStyle.tsx
|
|
9
|
-
var
|
|
10
|
-
let {
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
className:
|
|
13
|
-
classNameContent:
|
|
9
|
+
var c = ({ selectors: c, isCollapsed: l, onCollapse: u }) => {
|
|
10
|
+
let { resolvedTheme: d } = o(), f = r(() => e(c ?? [], !1).join("\n\n"), [c]), p = n((e) => u?.("rawStyle", e), [u]);
|
|
11
|
+
return /* @__PURE__ */ i(t, {
|
|
12
|
+
className: l ? "" : "grow",
|
|
13
|
+
classNameContent: s("p-0", { grow: !l }),
|
|
14
14
|
title: "Raw Style",
|
|
15
|
-
isCollapsed:
|
|
16
|
-
onCollapse:
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
-
value:
|
|
15
|
+
isCollapsed: l,
|
|
16
|
+
onCollapse: p,
|
|
17
|
+
children: /* @__PURE__ */ i(a, {
|
|
18
|
+
value: f,
|
|
19
19
|
className: "h-full",
|
|
20
|
-
theme:
|
|
20
|
+
theme: d,
|
|
21
21
|
lineWrapping: !0,
|
|
22
22
|
readOnly: !0
|
|
23
23
|
})
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
//#endregion
|
|
27
|
-
export {
|
|
27
|
+
export { c as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import n from "@plitzi/plitzi-ui/
|
|
3
|
-
import r from "@plitzi/plitzi-ui/
|
|
2
|
+
import n from "@plitzi/plitzi-ui/Button";
|
|
3
|
+
import r from "@plitzi/plitzi-ui/Icon";
|
|
4
4
|
import i from "@plitzi/plitzi-ui/MetricInput";
|
|
5
5
|
import a from "@plitzi/plitzi-ui/icons/MarginBottom";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/icons/MarginLeft";
|
|
@@ -32,7 +32,7 @@ var p = {
|
|
|
32
32
|
className: "grid grid-cols-2 items-center gap-2 px-1 pt-1",
|
|
33
33
|
children: [/* @__PURE__ */ t("div", {
|
|
34
34
|
className: "mr-1 flex items-center capitalize",
|
|
35
|
-
children: [/* @__PURE__ */ e(
|
|
35
|
+
children: [/* @__PURE__ */ e(r, {
|
|
36
36
|
className: "mr-1",
|
|
37
37
|
children: p[a]
|
|
38
38
|
}), /* @__PURE__ */ e("div", {
|
|
@@ -89,7 +89,7 @@ var p = {
|
|
|
89
89
|
})]
|
|
90
90
|
}), /* @__PURE__ */ t("div", {
|
|
91
91
|
className: "flex",
|
|
92
|
-
children: [u === "margin" && /* @__PURE__ */ e(
|
|
92
|
+
children: [u === "margin" && /* @__PURE__ */ e(n, {
|
|
93
93
|
intent: "secondary",
|
|
94
94
|
size: "xs",
|
|
95
95
|
className: "m-1 w-14 grow",
|
|
@@ -98,49 +98,49 @@ var p = {
|
|
|
98
98
|
}), /* @__PURE__ */ t("div", {
|
|
99
99
|
className: "m-1 grid w-full grid-cols-4 grid-rows-2 gap-2",
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ e(n, {
|
|
102
102
|
intent: "secondary",
|
|
103
103
|
size: "xs",
|
|
104
104
|
onClick: c("0px"),
|
|
105
105
|
children: "0"
|
|
106
106
|
}),
|
|
107
|
-
/* @__PURE__ */ e(
|
|
107
|
+
/* @__PURE__ */ e(n, {
|
|
108
108
|
intent: "secondary",
|
|
109
109
|
size: "xs",
|
|
110
110
|
onClick: c("10px"),
|
|
111
111
|
children: "10"
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */ e(
|
|
113
|
+
/* @__PURE__ */ e(n, {
|
|
114
114
|
intent: "secondary",
|
|
115
115
|
size: "xs",
|
|
116
116
|
onClick: c("20px"),
|
|
117
117
|
children: "20"
|
|
118
118
|
}),
|
|
119
|
-
/* @__PURE__ */ e(
|
|
119
|
+
/* @__PURE__ */ e(n, {
|
|
120
120
|
intent: "secondary",
|
|
121
121
|
size: "xs",
|
|
122
122
|
onClick: c("40px"),
|
|
123
123
|
children: "40"
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */ e(
|
|
125
|
+
/* @__PURE__ */ e(n, {
|
|
126
126
|
intent: "secondary",
|
|
127
127
|
size: "xs",
|
|
128
128
|
onClick: c("60px"),
|
|
129
129
|
children: "60"
|
|
130
130
|
}),
|
|
131
|
-
/* @__PURE__ */ e(
|
|
131
|
+
/* @__PURE__ */ e(n, {
|
|
132
132
|
intent: "secondary",
|
|
133
133
|
size: "xs",
|
|
134
134
|
onClick: c("100px"),
|
|
135
135
|
children: "100"
|
|
136
136
|
}),
|
|
137
|
-
/* @__PURE__ */ e(
|
|
137
|
+
/* @__PURE__ */ e(n, {
|
|
138
138
|
intent: "secondary",
|
|
139
139
|
size: "xs",
|
|
140
140
|
onClick: c("140px"),
|
|
141
141
|
children: "140"
|
|
142
142
|
}),
|
|
143
|
-
/* @__PURE__ */ e(
|
|
143
|
+
/* @__PURE__ */ e(n, {
|
|
144
144
|
intent: "secondary",
|
|
145
145
|
size: "xs",
|
|
146
146
|
onClick: c("220px"),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import t from "clsx";
|
|
3
3
|
//#region src/components/StyleInspector/categories/Spacing/SpacingNumber.tsx
|
|
4
|
-
var n = ({ value: n = "", active: r = !1, onClick: i }) => /* @__PURE__ */
|
|
5
|
-
className:
|
|
4
|
+
var n = ({ value: n = "", active: r = !1, onClick: i }) => /* @__PURE__ */ e("div", {
|
|
5
|
+
className: t("mx-0.5 flex w-[30px] items-center justify-center rounded-md border px-0.5 text-xs", {
|
|
6
6
|
"border-transparent hover:border-blue-300 hover:bg-blue-100 hover:text-blue-400 dark:hover:bg-blue-900/50 dark:hover:text-blue-400": !r,
|
|
7
7
|
"border-blue-300 bg-blue-100 text-blue-400 dark:bg-blue-900/50": r
|
|
8
8
|
}),
|
|
9
9
|
title: n,
|
|
10
10
|
onClick: i,
|
|
11
|
-
children: /* @__PURE__ */
|
|
11
|
+
children: /* @__PURE__ */ e("div", {
|
|
12
12
|
className: "truncate",
|
|
13
13
|
children: n.replace("px", "")
|
|
14
14
|
})
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
export type TypographyProps = {
|
|
2
2
|
replaceTokens?: boolean;
|
|
3
3
|
isCollapsed?: boolean;
|
|
4
|
-
fonts?: {
|
|
5
|
-
name: string;
|
|
6
|
-
weights: string[];
|
|
7
|
-
}[];
|
|
8
4
|
onCollapse?: (category: string, isCollapsed: boolean) => void;
|
|
9
5
|
};
|
|
10
|
-
declare const _default: import('react').MemoExoticComponent<({ replaceTokens, isCollapsed,
|
|
6
|
+
declare const _default: import('react').MemoExoticComponent<({ replaceTokens, isCollapsed, onCollapse }: TypographyProps) => import("react").JSX.Element>;
|
|
11
7
|
export default _default;
|