@plitzi/sdk-style 0.39.4 → 0.39.7
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 +30 -0
- package/dist/builder/StyleAdvanceEditor.mjs +4 -3
- package/dist/builder/components/InputEasing/Curve.mjs +1 -1
- package/dist/builder/components/InputEasing/Grid.mjs +3 -3
- package/dist/builder/components/InputEasing/InputEasing.mjs +2 -2
- package/dist/builder/components/InputEasing/InputEasingButton.mjs +1 -1
- package/dist/builder/components/InputEasing/InputEasingList.mjs +4 -4
- package/dist/builder/components/Selector/Selector.mjs +143 -123
- package/dist/builder/components/Selector/SelectorItem/ItemOptions.mjs +4 -3
- package/dist/builder/components/Selector/SelectorItem/SelectorItem.mjs +29 -19
- package/dist/builder/components/Selector/SelectorItem/helpers.d.ts +1 -1
- package/dist/builder/components/Selector/SelectorItem/helpers.mjs +1 -1
- package/dist/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.d.ts +6 -3
- package/dist/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.mjs +56 -18
- package/dist/builder/components/Selector/SelectorSuggestions/helpers.d.ts +8 -0
- package/dist/builder/components/Selector/SelectorSuggestions/helpers.mjs +9 -0
- package/dist/builder/components/Selector/SelectorSuggestions/index.d.ts +1 -0
- package/dist/builder/components/Selector/SelectorSuggestions/index.mjs +3 -2
- package/dist/builder/components/StyleInspector/Inspector.mjs +1 -1
- package/dist/builder/components/StyleInspector/StyleInspector.mjs +2 -2
- package/dist/builder/components/StyleInspector/categories/Background/Background.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +6 -6
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +3 -3
- package/dist/builder/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Background/modes/RawMode.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +4 -4
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Position/PositionAdvanced.mjs +5 -5
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +2 -2
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRuleChip.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRules.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +5 -5
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +3 -3
- package/dist/builder/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +2 -2
- package/dist/builder/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +2 -2
- package/dist/builder/components/StyleInspector/components/ValueList/ValueList.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +6 -6
- package/dist/builder/components/StyleManager/ManagerSelector.mjs +281 -123
- package/dist/builder/components/StyleManager/StyleManager.mjs +75 -35
- package/dist/builder/components/StyleManager/StyleSelectorTag.d.ts +5 -1
- package/dist/builder/components/StyleManager/StyleSelectorTag.mjs +81 -63
- package/dist/builder/hooks/useWindowedList.d.ts +19 -0
- package/dist/builder/hooks/useWindowedList.mjs +38 -0
- package/package.json +8 -8
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsCreator.d.ts +0 -7
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsCreator.mjs +0 -19
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsList.d.ts +0 -7
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsList.mjs +0 -24
|
@@ -1,22 +1,60 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import r from "clsx";
|
|
5
4
|
// src/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.tsx
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var i = "flex w-full cursor-pointer items-center gap-2 rounded px-2 py-1 text-left text-xs text-ui-fg", a = ({ suggestions: a, highlighted: o = -1, onSelect: s, onCreate: c }) => {
|
|
6
|
+
let { creates: l, list: u } = a, d = +!!l, f = e(() => {
|
|
7
|
+
l && c?.({
|
|
8
|
+
name: l,
|
|
9
|
+
type: "class"
|
|
10
|
+
});
|
|
10
11
|
}, [l, c]);
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
className: "flex w-full flex-col gap-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
13
|
+
className: "border-ui-line bg-ui-overlay flex max-h-72 w-full flex-col gap-0.5 overflow-y-auto rounded-md border p-1 shadow-lg",
|
|
14
|
+
role: "listbox",
|
|
15
|
+
"aria-label": "Classes",
|
|
16
|
+
children: [
|
|
17
|
+
l && /* @__PURE__ */ n("button", {
|
|
18
|
+
type: "button",
|
|
19
|
+
role: "option",
|
|
20
|
+
"aria-selected": o === 0,
|
|
21
|
+
className: r(i, {
|
|
22
|
+
"bg-primary-50 dark:bg-primary-400/15": o === 0,
|
|
23
|
+
"hover:bg-ui-hover": o !== 0
|
|
24
|
+
}),
|
|
25
|
+
onMouseDown: f,
|
|
26
|
+
children: [/* @__PURE__ */ t("i", { className: "fa-solid fa-plus text-primary-600 dark:text-primary-300 w-3 text-[10px]" }), /* @__PURE__ */ n("span", { children: ["Create class ", /* @__PURE__ */ n("b", {
|
|
27
|
+
className: "font-mono",
|
|
28
|
+
children: [".", l]
|
|
29
|
+
})] })]
|
|
30
|
+
}),
|
|
31
|
+
u.length > 0 && /* @__PURE__ */ t("span", {
|
|
32
|
+
className: "text-ui-fg-subtle px-2 pt-1 pb-0.5 text-[10px] font-semibold tracking-wider uppercase",
|
|
33
|
+
children: "Classes"
|
|
34
|
+
}),
|
|
35
|
+
u.map((e, a) => /* @__PURE__ */ n("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
role: "option",
|
|
38
|
+
"aria-selected": o === a + d,
|
|
39
|
+
className: r(i, {
|
|
40
|
+
"bg-primary-50 dark:bg-primary-400/15": o === a + d,
|
|
41
|
+
"hover:bg-ui-hover": o !== a + d
|
|
42
|
+
}),
|
|
43
|
+
title: `${e.type}: ${e.name}`,
|
|
44
|
+
onMouseDown: () => s?.(e),
|
|
45
|
+
children: [/* @__PURE__ */ t("span", {
|
|
46
|
+
className: "text-ui-fg-subtle w-3 text-center font-mono font-bold",
|
|
47
|
+
children: "."
|
|
48
|
+
}), /* @__PURE__ */ t("span", {
|
|
49
|
+
className: "truncate font-mono",
|
|
50
|
+
children: e.name
|
|
51
|
+
})]
|
|
52
|
+
}, e.name)),
|
|
53
|
+
!l && u.length === 0 && /* @__PURE__ */ t("span", {
|
|
54
|
+
className: "text-ui-fg-subtle px-2 py-3 text-center text-xs",
|
|
55
|
+
children: "No other class in the space. Type a name to create one."
|
|
56
|
+
})
|
|
57
|
+
]
|
|
20
58
|
});
|
|
21
59
|
};
|
|
22
|
-
export {
|
|
60
|
+
export { a as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectorValue } from '../Selector';
|
|
2
|
+
/** What the list offers for what is typed: a class to create — none when one of that name is offered — and the rest. */
|
|
3
|
+
export type Suggestions = {
|
|
4
|
+
creates?: string;
|
|
5
|
+
list: SelectorValue[];
|
|
6
|
+
};
|
|
7
|
+
/** The classes an element can take for what is typed, the new one first: what the list shows and the keys move through. */
|
|
8
|
+
export declare const suggestionsFor: (typed: string, available: readonly SelectorValue[]) => Suggestions;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/builder/components/Selector/SelectorSuggestions/helpers.ts
|
|
2
|
+
var e = (e, t) => {
|
|
3
|
+
let n = e.trim().toLowerCase(), r = n ? t.filter((e) => e.type === "class" && e.name.toLowerCase().includes(n)) : [...t], i = t.some((t) => t.name === e.trim());
|
|
4
|
+
return {
|
|
5
|
+
creates: n && !i ? e.trim() : void 0,
|
|
6
|
+
list: r
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export { e as suggestionsFor };
|
|
@@ -118,7 +118,7 @@ var T = ({ selectors: T, componentType: E, componentSubType: ue, selector: D, st
|
|
|
118
118
|
onChange: de
|
|
119
119
|
}),
|
|
120
120
|
ge && /* @__PURE__ */ x("p", {
|
|
121
|
-
className: "m-0 px-3 py-4 text-xs
|
|
121
|
+
className: "text-ui-fg-subtle m-0 px-3 py-4 text-xs",
|
|
122
122
|
children: [
|
|
123
123
|
"No property here matches “",
|
|
124
124
|
W.trim(),
|
|
@@ -255,7 +255,7 @@ var h = ({ displayMode: h, selectors: g, value: _, element: v, mode: y = "elemen
|
|
|
255
255
|
w && /* @__PURE__ */ l(ye, {
|
|
256
256
|
className: ve("shrink-0 cursor-pointer rounded-sm p-1 text-xs", {
|
|
257
257
|
"bg-primary-500/15 text-primary-600 dark:text-primary-300": Q,
|
|
258
|
-
"text-
|
|
258
|
+
"text-ui-fg-subtle hover:text-ui-fg": !Q
|
|
259
259
|
}),
|
|
260
260
|
icon: "fa-solid fa-crosshairs",
|
|
261
261
|
title: ie(Z, Q),
|
|
@@ -320,7 +320,7 @@ var h = ({ displayMode: h, selectors: g, value: _, element: v, mode: y = "elemen
|
|
|
320
320
|
})
|
|
321
321
|
]
|
|
322
322
|
}), /* @__PURE__ */ l("div", {
|
|
323
|
-
className: "flex grow basis-0 flex-col overflow-auto border-t
|
|
323
|
+
className: "border-ui-line-strong flex grow basis-0 flex-col overflow-auto border-t",
|
|
324
324
|
children: /* @__PURE__ */ l(ce, {
|
|
325
325
|
selectors: Te,
|
|
326
326
|
componentType: b,
|
|
@@ -83,7 +83,7 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
83
83
|
addLabel: "Add a layer — the first one is drawn on top",
|
|
84
84
|
onAdd: G,
|
|
85
85
|
children: [!L.length && /* @__PURE__ */ C("p", {
|
|
86
|
-
className: "m-0 rounded-md border border-dashed
|
|
86
|
+
className: "border-ui-line-strong text-ui-fg-subtle m-0 rounded-md border border-dashed px-3 py-2.5 text-center text-xs",
|
|
87
87
|
children: "No layers. Add one for a gradient or an image."
|
|
88
88
|
}), L.length > 0 && L.map((e, n) => /* @__PURE__ */ C(t, {
|
|
89
89
|
index: n,
|
|
@@ -51,7 +51,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
51
51
|
className: D("rounded-md border transition-colors duration-150", {
|
|
52
52
|
"border-primary-500 bg-primary-500/5 dark:border-primary-400 dark:bg-primary-400/10": F,
|
|
53
53
|
"border-primary-500/60 dark:border-primary-400/60": A && !F,
|
|
54
|
-
"border-
|
|
54
|
+
"border-ui-line": !A && !F
|
|
55
55
|
}),
|
|
56
56
|
onDragOver: q,
|
|
57
57
|
onDragLeave: J,
|
|
@@ -66,7 +66,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ w("span", {
|
|
68
68
|
draggable: !0,
|
|
69
|
-
className: "flex h-5 w-4 cursor-grab items-center justify-center
|
|
69
|
+
className: "text-ui-fg-subtle hover:text-ui-fg flex h-5 w-4 cursor-grab items-center justify-center active:cursor-grabbing",
|
|
70
70
|
title: "Drag to reorder — the first layer is drawn on top",
|
|
71
71
|
onClick: U,
|
|
72
72
|
onDragStart: G,
|
|
@@ -79,17 +79,17 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
79
79
|
property: "background"
|
|
80
80
|
}),
|
|
81
81
|
/* @__PURE__ */ w("span", {
|
|
82
|
-
className: "min-w-0 grow truncate text-xs
|
|
82
|
+
className: "text-ui-fg min-w-0 grow truncate text-xs",
|
|
83
83
|
title: i(b),
|
|
84
84
|
children: i(b)
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */ w("i", { className: D("fa-solid text-
|
|
86
|
+
/* @__PURE__ */ w("i", { className: D("fa-solid text-ui-fg-subtle text-xs", {
|
|
87
87
|
"fa-angle-up": A,
|
|
88
88
|
"fa-angle-down": !A
|
|
89
89
|
}) }),
|
|
90
90
|
/* @__PURE__ */ w("button", {
|
|
91
91
|
type: "button",
|
|
92
|
-
className: "flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded
|
|
92
|
+
className: "text-ui-fg-subtle flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded hover:bg-red-500/10 hover:text-red-600 dark:hover:text-red-400",
|
|
93
93
|
title: "Remove layer",
|
|
94
94
|
"aria-label": "Remove layer",
|
|
95
95
|
onClick: W,
|
|
@@ -97,7 +97,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
97
97
|
})
|
|
98
98
|
]
|
|
99
99
|
}), A && /* @__PURE__ */ T("div", {
|
|
100
|
-
className: "flex flex-col gap-4 border-t
|
|
100
|
+
className: "border-ui-line flex flex-col gap-4 border-t p-2.5",
|
|
101
101
|
children: [/* @__PURE__ */ T(y, {
|
|
102
102
|
title: X ? "Gradient" : n[b.type],
|
|
103
103
|
children: [
|
|
@@ -21,7 +21,7 @@ var i = [{
|
|
|
21
21
|
className: "flex items-center gap-1.5",
|
|
22
22
|
children: [
|
|
23
23
|
/* @__PURE__ */ e("span", {
|
|
24
|
-
className: "text-
|
|
24
|
+
className: "text-ui-fg-subtle text-xs",
|
|
25
25
|
children: "At"
|
|
26
26
|
}),
|
|
27
27
|
/* @__PURE__ */ e(r, {
|
|
@@ -36,7 +36,7 @@ var i = [{
|
|
|
36
36
|
/* @__PURE__ */ e("span", { className: "grow" }),
|
|
37
37
|
/* @__PURE__ */ e("button", {
|
|
38
38
|
type: "button",
|
|
39
|
-
className: "flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md
|
|
39
|
+
className: "text-ui-fg-subtle hover:bg-ui-hover hover:text-ui-fg flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md",
|
|
40
40
|
title: "Add a stop",
|
|
41
41
|
"aria-label": "Add a stop",
|
|
42
42
|
onClick: l,
|
|
@@ -44,7 +44,7 @@ var i = [{
|
|
|
44
44
|
}),
|
|
45
45
|
/* @__PURE__ */ e("button", {
|
|
46
46
|
type: "button",
|
|
47
|
-
className: "flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md
|
|
47
|
+
className: "text-ui-fg-subtle disabled:hover:text-ui-fg flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md hover:bg-red-500/10 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent dark:hover:text-red-400",
|
|
48
48
|
title: o ? "Remove this stop" : "A gradient needs two stops",
|
|
49
49
|
"aria-label": "Remove this stop",
|
|
50
50
|
disabled: !o,
|
|
@@ -3,7 +3,7 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
3
3
|
var n = ({ title: n, children: r }) => /* @__PURE__ */ t("div", {
|
|
4
4
|
className: "flex flex-col gap-2",
|
|
5
5
|
children: [/* @__PURE__ */ e("span", {
|
|
6
|
-
className: "text-[11px] font-semibold tracking-wide
|
|
6
|
+
className: "text-ui-fg-subtle text-[11px] font-semibold tracking-wide uppercase",
|
|
7
7
|
children: n
|
|
8
8
|
}), r]
|
|
9
9
|
});
|
|
@@ -14,7 +14,7 @@ var o = ({ layer: o, onChange: s }) => {
|
|
|
14
14
|
value: o.raw,
|
|
15
15
|
onChange: c
|
|
16
16
|
}), /* @__PURE__ */ i("p", {
|
|
17
|
-
className: "m-0 text-[11px]
|
|
17
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
18
18
|
children: "Any image CSS accepts: a token such as var(--hero-bg), image-set(…), cross-fade(…)."
|
|
19
19
|
})] });
|
|
20
20
|
};
|
|
@@ -31,7 +31,7 @@ var f = Object.entries(t), p = ({ value: p, title: m, onRemove: h, onChange: g }
|
|
|
31
31
|
value: p,
|
|
32
32
|
onChange: S
|
|
33
33
|
}), /* @__PURE__ */ u("p", {
|
|
34
|
-
className: "m-0 text-[11px]
|
|
34
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
35
35
|
children: "A function the editor has no control for, so it is edited as written."
|
|
36
36
|
})] }), _ && y && /* @__PURE__ */ d("div", {
|
|
37
37
|
className: "grid grid-cols-2 gap-2",
|
package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs
CHANGED
|
@@ -50,7 +50,7 @@ var h = r(a), g = 1600, _ = ({ value: r, onChange: _ }) => {
|
|
|
50
50
|
})
|
|
51
51
|
}), /* @__PURE__ */ p("button", {
|
|
52
52
|
type: "button",
|
|
53
|
-
className: "aria-pressed:border-primary-500 aria-pressed:text-primary-600 dark:aria-pressed:text-primary-300 flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border
|
|
53
|
+
className: "aria-pressed:border-primary-500 aria-pressed:text-primary-600 dark:aria-pressed:text-primary-300 border-ui-line text-ui-fg-subtle hover:text-ui-fg flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border",
|
|
54
54
|
"aria-pressed": v,
|
|
55
55
|
title: v ? "Hide the curve" : "Edit the curve",
|
|
56
56
|
"aria-label": v ? "Hide the curve" : "Edit the curve",
|
|
@@ -59,11 +59,11 @@ var h = r(a), g = 1600, _ = ({ value: r, onChange: _ }) => {
|
|
|
59
59
|
})]
|
|
60
60
|
}),
|
|
61
61
|
v && !w && /* @__PURE__ */ m("p", {
|
|
62
|
-
className: "m-0 text-[11px]
|
|
62
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
63
63
|
children: [r, " is not a curve, so there is nothing to drag. Pick a preset to start from one."]
|
|
64
64
|
}),
|
|
65
65
|
v && w && /* @__PURE__ */ m("div", {
|
|
66
|
-
className: "flex flex-col items-center gap-2 rounded-md border
|
|
66
|
+
className: "border-ui-line flex flex-col items-center gap-2 rounded-md border p-2",
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ p(i, {
|
|
69
69
|
value: w,
|
|
@@ -75,7 +75,7 @@ var h = r(a), g = 1600, _ = ({ value: r, onChange: _ }) => {
|
|
|
75
75
|
}),
|
|
76
76
|
/* @__PURE__ */ m("button", {
|
|
77
77
|
type: "button",
|
|
78
|
-
className: "flex cursor-pointer items-center gap-1.5 text-xs
|
|
78
|
+
className: "text-ui-fg-muted hover:text-ui-fg flex cursor-pointer items-center gap-1.5 text-xs",
|
|
79
79
|
onClick: A,
|
|
80
80
|
children: [/* @__PURE__ */ p("i", { className: b ? "fa-solid fa-pause" : "fa-solid fa-play" }), b ? "Pause preview" : "Preview"]
|
|
81
81
|
}),
|
package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs
CHANGED
|
@@ -34,7 +34,7 @@ var m = [{
|
|
|
34
34
|
value: h,
|
|
35
35
|
onChange: S
|
|
36
36
|
}), /* @__PURE__ */ f("p", {
|
|
37
|
-
className: "m-0 text-[11px]
|
|
37
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
38
38
|
children: "Not a single transition the editor can split into parts (a token, for one), so it is edited as written."
|
|
39
39
|
})] }),
|
|
40
40
|
v && /* @__PURE__ */ p(o, {
|
|
@@ -49,11 +49,11 @@ var i = [{
|
|
|
49
49
|
/* @__PURE__ */ r("div", {
|
|
50
50
|
className: "row-start-2 grid h-24 w-full auto-rows-fr grid-cols-3 place-items-center gap-2",
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */ n("div", { className: "col-start-2 h-full w-0.5
|
|
53
|
-
/* @__PURE__ */ n("div", { className: "row-start-2 h-0.5 w-full
|
|
54
|
-
/* @__PURE__ */ n("div", { className: "row-start-2 h-8 w-8 rounded
|
|
55
|
-
/* @__PURE__ */ n("div", { className: "row-start-2 h-0.5 w-full
|
|
56
|
-
/* @__PURE__ */ n("div", { className: "col-start-2 row-start-3 h-full w-0.5
|
|
52
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong col-start-2 h-full w-0.5" }),
|
|
53
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong row-start-2 h-0.5 w-full" }),
|
|
54
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong row-start-2 h-8 w-8 rounded" }),
|
|
55
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong row-start-2 h-0.5 w-full" }),
|
|
56
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong col-start-2 row-start-3 h-full w-0.5" })
|
|
57
57
|
]
|
|
58
58
|
}),
|
|
59
59
|
/* @__PURE__ */ n("div", {
|
|
@@ -27,7 +27,7 @@ var p = {
|
|
|
27
27
|
s?.(a, e);
|
|
28
28
|
}, u = a.split("-")[0];
|
|
29
29
|
return /* @__PURE__ */ t("div", {
|
|
30
|
-
className: "mt-2 rounded-sm border
|
|
30
|
+
className: "border-ui-line-strong bg-ui-raised mt-2 rounded-sm border select-none",
|
|
31
31
|
children: [/* @__PURE__ */ t("div", {
|
|
32
32
|
className: "grid grid-cols-2 items-center gap-2 px-1 pt-1",
|
|
33
33
|
children: [/* @__PURE__ */ t("div", {
|
|
@@ -4,7 +4,7 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
4
4
|
// src/builder/components/StyleInspector/categories/Spacing/SpacingMargin.tsx
|
|
5
5
|
var r = ({ fragmentSelected: r, values: i, isLinked: a = !1, onLinkSelected: o, onSelectFragment: s }) => /* @__PURE__ */ n(e, {
|
|
6
6
|
property: "margin",
|
|
7
|
-
className: "relative flex cursor-pointer flex-col rounded-md border border-dashed
|
|
7
|
+
className: "border-ui-line-strong relative flex cursor-pointer flex-col rounded-md border border-dashed select-none",
|
|
8
8
|
values: i,
|
|
9
9
|
fragmentSelected: r,
|
|
10
10
|
onSelectFragment: s,
|
|
@@ -3,12 +3,12 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
3
3
|
// src/builder/components/StyleInspector/categories/Spacing/SpacingPadding.tsx
|
|
4
4
|
var r = ({ fragmentSelected: r, values: i, isLinked: a = !1, onLinkSelected: o, onSelectFragment: s }) => /* @__PURE__ */ t(e, {
|
|
5
5
|
property: "padding",
|
|
6
|
-
className: "
|
|
6
|
+
className: "border-ui-line-strong bg-ui-raised relative grow rounded-md border",
|
|
7
7
|
values: i,
|
|
8
8
|
fragmentSelected: r,
|
|
9
9
|
onSelectFragment: s,
|
|
10
10
|
children: /* @__PURE__ */ n("div", {
|
|
11
|
-
className: "
|
|
11
|
+
className: "border-ui-line-strong bg-ui-panel text-ui-fg-subtle hover:text-ui-fg flex grow items-center justify-center rounded border py-1",
|
|
12
12
|
title: a ? "Sides linked: a change applies to all four" : "Link the four sides",
|
|
13
13
|
onClick: o,
|
|
14
14
|
children: [a && /* @__PURE__ */ t("i", { className: "fa-solid fa-link text-sm" }), !a && /* @__PURE__ */ t("i", { className: "fa-solid fa-link-slash text-sm" })]
|
package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRuleChip.mjs
CHANGED
|
@@ -8,7 +8,7 @@ var o = t(({ condition: t, active: o = !1, unused: s = !1, onSelect: c, onRemove
|
|
|
8
8
|
className: a("flex max-w-full items-center overflow-hidden rounded-sm border text-[11px] leading-none", {
|
|
9
9
|
"border-primary-500 bg-primary-500/15 text-primary-700 dark:text-primary-200": o,
|
|
10
10
|
"border-amber-500/70 bg-amber-500/10 text-amber-700 dark:text-amber-300": s && !o,
|
|
11
|
-
"border-
|
|
11
|
+
"border-ui-line-strong bg-ui-raised text-ui-fg-muted": !s && !o
|
|
12
12
|
}),
|
|
13
13
|
children: [/* @__PURE__ */ i("button", {
|
|
14
14
|
type: "button",
|
|
@@ -4,7 +4,7 @@ import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
|
4
4
|
var i = t(({ conditions: t, unused: i, activeAncestor: a, activeState: o, activeVariant: s, onSelect: c, onRemove: l, onRemoveUnused: u }) => /* @__PURE__ */ r("div", {
|
|
5
5
|
className: "flex flex-col gap-1",
|
|
6
6
|
children: [/* @__PURE__ */ r("div", {
|
|
7
|
-
className: "flex items-center justify-between gap-2 text-[11px]
|
|
7
|
+
className: "text-ui-fg-subtle flex items-center justify-between gap-2 text-[11px]",
|
|
8
8
|
children: [/* @__PURE__ */ r("span", { children: [
|
|
9
9
|
/* @__PURE__ */ n("i", { className: "fas fa-sitemap mr-1" }),
|
|
10
10
|
"Ancestor rules (",
|
package/dist/builder/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs
CHANGED
|
@@ -23,11 +23,11 @@ var p = ({ className: p, classNameContent: m, children: h, title: g = "Title", d
|
|
|
23
23
|
onChange: b,
|
|
24
24
|
children: [/* @__PURE__ */ s(f.Header, {
|
|
25
25
|
className: l("h-8 px-2.5", {
|
|
26
|
-
"border-
|
|
27
|
-
"bg-
|
|
26
|
+
"border-ui-line border-b": y,
|
|
27
|
+
"bg-ui-raised": !y
|
|
28
28
|
}),
|
|
29
29
|
title: /* @__PURE__ */ s("span", {
|
|
30
|
-
className: "text-[13px] font-medium
|
|
30
|
+
className: "text-ui-fg text-[13px] font-medium",
|
|
31
31
|
children: g
|
|
32
32
|
}),
|
|
33
33
|
placement: "right",
|
|
@@ -39,7 +39,7 @@ var p = ({ className: p, classNameContent: m, children: h, title: g = "Title", d
|
|
|
39
39
|
className: l("cursor-pointer text-xs", {
|
|
40
40
|
"text-primary-500 dark:text-primary-400": E,
|
|
41
41
|
"text-sky-600 dark:text-sky-400": !E && C,
|
|
42
|
-
"text-
|
|
42
|
+
"text-ui-fg-subtle hover:text-ui-fg": !E && !C
|
|
43
43
|
}),
|
|
44
44
|
icon: "fa-solid fa-sliders",
|
|
45
45
|
title: x ? "Hide advanced properties" : "Show advanced properties",
|
|
@@ -47,7 +47,7 @@ var p = ({ className: p, classNameContent: m, children: h, title: g = "Title", d
|
|
|
47
47
|
})]
|
|
48
48
|
})
|
|
49
49
|
}), /* @__PURE__ */ s(f.Content, {
|
|
50
|
-
className: l("flex flex-col gap-3 px-2.5 py-3", { "border-
|
|
50
|
+
className: l("flex flex-col gap-3 px-2.5 py-3", { "border-ui-line border-b": !y }, m),
|
|
51
51
|
children: /* @__PURE__ */ s(r, {
|
|
52
52
|
value: E,
|
|
53
53
|
children: h
|
|
@@ -12,7 +12,7 @@ var a = ({ items: a = [], onChange: o }) => {
|
|
|
12
12
|
children: s.map((e, t) => /* @__PURE__ */ n(i.Icon, {
|
|
13
13
|
size: e.size,
|
|
14
14
|
className: r("cursor-pointer rounded-sm p-0.5", {
|
|
15
|
-
"bg-
|
|
15
|
+
"bg-ui-raised": e.active,
|
|
16
16
|
"text-xs": typeof e.icon == "string",
|
|
17
17
|
"h-5 w-5": e.size !== "custom",
|
|
18
18
|
"flex-1 justify-center": e.size === "custom"
|
package/dist/builder/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs
CHANGED
|
@@ -4,11 +4,11 @@ import r from "@plitzi/plitzi-ui/Icon";
|
|
|
4
4
|
import i from "@plitzi/plitzi-ui/Switch";
|
|
5
5
|
// src/builder/components/StyleInspector/components/InspectorFooter/InspectorFooter.tsx
|
|
6
6
|
var a = ({ replaceTokens: a, showAllOptions: o, canShowAllOptions: s, onCollapseAll: c, onChangeReplaceTokens: l, onChangeShowAllOptions: u }) => /* @__PURE__ */ n("div", {
|
|
7
|
-
className: "flex items-center justify-between gap-3 border-t
|
|
7
|
+
className: "border-ui-line flex items-center justify-between gap-3 border-t px-2.5 py-1.5",
|
|
8
8
|
children: [/* @__PURE__ */ n("div", {
|
|
9
|
-
className: "flex items-center gap-3
|
|
9
|
+
className: "text-ui-fg-subtle flex items-center gap-3",
|
|
10
10
|
children: [/* @__PURE__ */ t(r, {
|
|
11
|
-
className: "
|
|
11
|
+
className: "hover:text-ui-fg cursor-pointer text-xs",
|
|
12
12
|
icon: "fa-solid fa-angles-up",
|
|
13
13
|
title: "Collapse every category",
|
|
14
14
|
onClick: c
|
|
@@ -26,8 +26,8 @@ var l = i(({ keyValue: i, children: l, className: u = "", size: d = "small", sec
|
|
|
26
26
|
children: /* @__PURE__ */ s("label", {
|
|
27
27
|
className: c("m-0 truncate rounded-sm leading-5 transition-colors duration-150", {
|
|
28
28
|
"px-1": !f,
|
|
29
|
-
"
|
|
30
|
-
"text-
|
|
29
|
+
"border-ui-line-strong bg-ui-active text-ui-fg rounded-b-none border px-2 font-semibold": f,
|
|
30
|
+
"text-ui-fg-muted": !f && _ === "none",
|
|
31
31
|
"bg-sky-500/12 text-sky-700 dark:bg-sky-400/12 dark:text-sky-300": _ === "value",
|
|
32
32
|
"bg-emerald-500/12 text-emerald-700 dark:bg-emerald-400/12 dark:text-emerald-300": _ === "variable",
|
|
33
33
|
"bg-violet-500/12 text-violet-700 dark:bg-violet-400/14 dark:text-violet-300": _ === "binding",
|
package/dist/builder/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs
CHANGED
|
@@ -7,7 +7,7 @@ var r = ({ value: r, onChange: i }) => {
|
|
|
7
7
|
e.key === "Escape" && r && (e.stopPropagation(), i(""));
|
|
8
8
|
}, [i, r]);
|
|
9
9
|
return /* @__PURE__ */ t("div", {
|
|
10
|
-
className: "border-
|
|
10
|
+
className: "border-ui-line border-b px-2 py-1.5",
|
|
11
11
|
children: /* @__PURE__ */ t(n, {
|
|
12
12
|
size: "xs",
|
|
13
13
|
value: r,
|
|
@@ -55,7 +55,7 @@ var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
|
55
55
|
value: o,
|
|
56
56
|
onChange: b
|
|
57
57
|
}), /* @__PURE__ */ d("p", {
|
|
58
|
-
className: "m-0 text-[11px]
|
|
58
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
59
59
|
children: "Not a single shadow the editor can split into parts (a token, for one), so it is edited as written."
|
|
60
60
|
})] }),
|
|
61
61
|
g && p && /* @__PURE__ */ d(r, {
|
|
@@ -5,7 +5,7 @@ var i = e(({ selectorName: e, parts: i, onReset: a }) => /* @__PURE__ */ n("div"
|
|
|
5
5
|
className: "bg-primary-500/10 dark:bg-primary-400/10 flex items-center gap-2 rounded-md px-2 py-1 text-xs",
|
|
6
6
|
children: [
|
|
7
7
|
/* @__PURE__ */ t("span", {
|
|
8
|
-
className: "
|
|
8
|
+
className: "text-ui-fg-subtle shrink-0",
|
|
9
9
|
children: "Editing"
|
|
10
10
|
}),
|
|
11
11
|
/* @__PURE__ */ t("span", {
|
|
@@ -13,7 +13,7 @@ var i = e(({ selectorName: e, parts: i, onReset: a }) => /* @__PURE__ */ n("div"
|
|
|
13
13
|
children: [e, ...i].filter(Boolean).join(" › ")
|
|
14
14
|
}),
|
|
15
15
|
/* @__PURE__ */ t(r, {
|
|
16
|
-
className: "
|
|
16
|
+
className: "text-ui-fg-subtle hover:text-ui-fg shrink-0 cursor-pointer",
|
|
17
17
|
icon: "fa-solid fa-xmark",
|
|
18
18
|
title: "Back to the selector's own rules",
|
|
19
19
|
onClick: a
|
|
@@ -10,7 +10,7 @@ var i = t(({ label: t, keys: i, addLabel: a, onAdd: o, children: s }) => /* @__P
|
|
|
10
10
|
children: t
|
|
11
11
|
}), /* @__PURE__ */ n("button", {
|
|
12
12
|
type: "button",
|
|
13
|
-
className: "focus-visible:outline-primary-500 flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md
|
|
13
|
+
className: "focus-visible:outline-primary-500 text-ui-fg-subtle hover:bg-ui-hover hover:text-ui-fg flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors duration-150 focus-visible:outline-2",
|
|
14
14
|
title: a,
|
|
15
15
|
"aria-label": a,
|
|
16
16
|
onClick: o,
|
|
@@ -21,19 +21,19 @@ var l = e(({ summary: e, preview: l, title: u, removeLabel: d, onRemove: f, chil
|
|
|
21
21
|
children: [/* @__PURE__ */ o(c.Trigger, {
|
|
22
22
|
className: s("group flex h-7 w-full min-w-0 cursor-pointer items-center gap-2 rounded-md border px-2 text-xs transition-colors duration-150 select-none", {
|
|
23
23
|
"border-primary-500/60 bg-primary-500/5 dark:border-primary-400/60 dark:bg-primary-400/10": m,
|
|
24
|
-
"border-
|
|
24
|
+
"border-ui-line bg-ui-raised hover:border-ui-line-strong hover:bg-ui-hover": !m
|
|
25
25
|
}),
|
|
26
26
|
onClick: _,
|
|
27
27
|
children: [
|
|
28
28
|
l,
|
|
29
29
|
/* @__PURE__ */ a("span", {
|
|
30
|
-
className: "min-w-0 grow truncate font-mono text-[11px]
|
|
30
|
+
className: "text-ui-fg min-w-0 grow truncate font-mono text-[11px]",
|
|
31
31
|
title: e,
|
|
32
32
|
children: e
|
|
33
33
|
}),
|
|
34
34
|
/* @__PURE__ */ a("button", {
|
|
35
35
|
type: "button",
|
|
36
|
-
className: "flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded
|
|
36
|
+
className: "text-ui-fg-subtle group-hover:text-ui-fg flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded transition-colors duration-150 hover:bg-red-500/10 hover:text-red-600 dark:hover:text-red-400",
|
|
37
37
|
title: d,
|
|
38
38
|
"aria-label": d,
|
|
39
39
|
onClick: y,
|
|
@@ -47,13 +47,13 @@ var l = e(({ summary: e, preview: l, title: u, removeLabel: d, onRemove: f, chil
|
|
|
47
47
|
className: "flex w-full flex-col outline-none",
|
|
48
48
|
tabIndex: -1,
|
|
49
49
|
children: [/* @__PURE__ */ o("div", {
|
|
50
|
-
className: "flex items-center justify-between gap-2 border-b
|
|
50
|
+
className: "border-ui-line flex items-center justify-between gap-2 border-b px-3 py-2",
|
|
51
51
|
children: [/* @__PURE__ */ a("span", {
|
|
52
|
-
className: "text-
|
|
52
|
+
className: "text-ui-fg text-xs font-semibold",
|
|
53
53
|
children: u
|
|
54
54
|
}), /* @__PURE__ */ a("button", {
|
|
55
55
|
type: "button",
|
|
56
|
-
className: "flex h-5 w-5 cursor-pointer items-center justify-center rounded
|
|
56
|
+
className: "text-ui-fg-subtle hover:bg-ui-hover hover:text-ui-fg flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
57
57
|
title: "Close",
|
|
58
58
|
"aria-label": "Close",
|
|
59
59
|
onClick: v,
|