@floegence/floe-webapp-core 0.60.2 → 0.61.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/dist/components/ui/Settings.d.ts +52 -0
- package/dist/components/ui/Settings.js +183 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/full.js +399 -393
- package/dist/styles.css +1 -1
- package/dist/ui.css +86 -0
- package/dist/ui.js +77 -71
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
2
|
+
/** Host-owned routing and state stay outside this responsive settings frame. */
|
|
3
|
+
export declare function SettingsLayout(props: {
|
|
4
|
+
sidebar: JSX.Element;
|
|
5
|
+
mobileNavigation?: JSX.Element;
|
|
6
|
+
children: JSX.Element;
|
|
7
|
+
class?: string;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
export interface SettingsNavigationItem {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
icon?: (props: {
|
|
13
|
+
class?: string;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
attributes?: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
+
}
|
|
17
|
+
export interface SettingsNavigationGroup {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
items: readonly SettingsNavigationItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface SettingsNavigationProps {
|
|
23
|
+
label: string;
|
|
24
|
+
groups: readonly SettingsNavigationGroup[];
|
|
25
|
+
value: string;
|
|
26
|
+
onChange: (id: string) => void;
|
|
27
|
+
search?: JSX.Element;
|
|
28
|
+
empty?: JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export declare function SettingsNavigation(props: SettingsNavigationProps): JSX.Element;
|
|
31
|
+
export interface SettingsSectionProps extends Omit<JSX.HTMLAttributes<HTMLElement>, 'title'> {
|
|
32
|
+
title: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
badge?: JSX.Element;
|
|
35
|
+
actions?: JSX.Element;
|
|
36
|
+
/** A page owns its primary heading; sections are subordinate groups. */
|
|
37
|
+
variant?: 'page' | 'section';
|
|
38
|
+
}
|
|
39
|
+
export declare function SettingsSection(props: SettingsSectionProps): JSX.Element;
|
|
40
|
+
export declare function SettingsList(props: JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
41
|
+
export interface SettingRowProps {
|
|
42
|
+
title: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
icon?: (props: {
|
|
45
|
+
class?: string;
|
|
46
|
+
}) => JSX.Element;
|
|
47
|
+
control?: JSX.Element;
|
|
48
|
+
children?: JSX.Element;
|
|
49
|
+
tone?: 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
50
|
+
class?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare function SettingRow(props: SettingRowProps): JSX.Element;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { insert as n, createComponent as s, effect as v, className as b, setAttribute as h, spread as f, mergeProps as $, template as c } from "solid-js/web";
|
|
2
|
+
import { Show as d, splitProps as w, For as m } from "solid-js";
|
|
3
|
+
import { cn as u } from "../../utils/cn.js";
|
|
4
|
+
var x = /* @__PURE__ */ c("<div><aside class=floe-settings-layout__sidebar></aside><div class=floe-settings-layout__mobile></div><div class=floe-settings-layout__content>"), k = /* @__PURE__ */ c("<div class=floe-settings-navigation__search>"), N = /* @__PURE__ */ c("<nav class=floe-settings-navigation><div class=floe-settings-navigation__groups>"), L = /* @__PURE__ */ c("<div class=floe-settings-navigation__group><div class=floe-settings-navigation__label>"), P = /* @__PURE__ */ c("<button><span>"), A = /* @__PURE__ */ c("<h1>"), C = /* @__PURE__ */ c("<p>"), F = /* @__PURE__ */ c("<div class=floe-settings-section__actions>"), R = /* @__PURE__ */ c("<section><header class=floe-settings-section__header><div class=floe-settings-section__heading><div class=floe-settings-section__title></div></div></header><div class=floe-settings-section__body>"), j = /* @__PURE__ */ c("<h2>"), q = /* @__PURE__ */ c("<div>"), z = /* @__PURE__ */ c("<div class=floe-setting-row__control>"), B = /* @__PURE__ */ c("<div class=floe-setting-row__body>"), D = /* @__PURE__ */ c("<div><div class=floe-setting-row__main><div class=floe-setting-row__label><div><div class=floe-setting-row__title>");
|
|
5
|
+
function I(t) {
|
|
6
|
+
return (() => {
|
|
7
|
+
var e = x(), o = e.firstChild, i = o.nextSibling, a = i.nextSibling;
|
|
8
|
+
return n(o, () => t.sidebar), n(i, () => t.mobileNavigation), n(a, () => t.children), v(() => b(e, u("floe-settings-layout", t.class))), e;
|
|
9
|
+
})();
|
|
10
|
+
}
|
|
11
|
+
function J(t) {
|
|
12
|
+
return (() => {
|
|
13
|
+
var e = N(), o = e.firstChild;
|
|
14
|
+
return n(e, s(d, {
|
|
15
|
+
get when() {
|
|
16
|
+
return t.search;
|
|
17
|
+
},
|
|
18
|
+
get children() {
|
|
19
|
+
var i = k();
|
|
20
|
+
return n(i, () => t.search), i;
|
|
21
|
+
}
|
|
22
|
+
}), o), n(o, s(d, {
|
|
23
|
+
get when() {
|
|
24
|
+
return t.groups.some((i) => i.items.length);
|
|
25
|
+
},
|
|
26
|
+
get fallback() {
|
|
27
|
+
return t.empty;
|
|
28
|
+
},
|
|
29
|
+
get children() {
|
|
30
|
+
return s(m, {
|
|
31
|
+
get each() {
|
|
32
|
+
return t.groups;
|
|
33
|
+
},
|
|
34
|
+
children: (i) => s(d, {
|
|
35
|
+
get when() {
|
|
36
|
+
return i.items.length;
|
|
37
|
+
},
|
|
38
|
+
get children() {
|
|
39
|
+
var a = L(), _ = a.firstChild;
|
|
40
|
+
return n(_, () => i.label), n(a, s(m, {
|
|
41
|
+
get each() {
|
|
42
|
+
return i.items;
|
|
43
|
+
},
|
|
44
|
+
children: (l) => (() => {
|
|
45
|
+
var g = P(), r = g.firstChild;
|
|
46
|
+
return f(g, $(() => l.attributes, {
|
|
47
|
+
type: "button",
|
|
48
|
+
get class() {
|
|
49
|
+
return u("floe-settings-navigation__item", l.attributes?.class);
|
|
50
|
+
},
|
|
51
|
+
get "aria-current"() {
|
|
52
|
+
return t.value === l.id ? "page" : void 0;
|
|
53
|
+
},
|
|
54
|
+
onClick: () => t.onChange(l.id)
|
|
55
|
+
}), !1, !0), n(g, s(d, {
|
|
56
|
+
get when() {
|
|
57
|
+
return l.icon;
|
|
58
|
+
},
|
|
59
|
+
children: (S) => {
|
|
60
|
+
const y = S();
|
|
61
|
+
return s(y, {
|
|
62
|
+
class: "floe-settings-navigation__icon"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}), r), n(r, () => l.label), g;
|
|
66
|
+
})()
|
|
67
|
+
}), null), v(() => h(a, "data-settings-group", i.id)), a;
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
})), v(() => h(e, "aria-label", t.label)), e;
|
|
73
|
+
})();
|
|
74
|
+
}
|
|
75
|
+
function K(t) {
|
|
76
|
+
const [e, o] = w(t, ["title", "description", "badge", "actions", "variant", "class", "children"]);
|
|
77
|
+
return (() => {
|
|
78
|
+
var i = R(), a = i.firstChild, _ = a.firstChild, l = _.firstChild, g = a.nextSibling;
|
|
79
|
+
return f(i, $(o, {
|
|
80
|
+
get class() {
|
|
81
|
+
return u("floe-settings-section", e.class);
|
|
82
|
+
},
|
|
83
|
+
get "data-settings-variant"() {
|
|
84
|
+
return e.variant ?? "section";
|
|
85
|
+
}
|
|
86
|
+
}), !1, !0), n(l, s(d, {
|
|
87
|
+
get when() {
|
|
88
|
+
return e.variant === "page";
|
|
89
|
+
},
|
|
90
|
+
get fallback() {
|
|
91
|
+
return (() => {
|
|
92
|
+
var r = j();
|
|
93
|
+
return n(r, () => e.title), r;
|
|
94
|
+
})();
|
|
95
|
+
},
|
|
96
|
+
get children() {
|
|
97
|
+
var r = A();
|
|
98
|
+
return n(r, () => e.title), r;
|
|
99
|
+
}
|
|
100
|
+
}), null), n(l, () => e.badge, null), n(_, s(d, {
|
|
101
|
+
get when() {
|
|
102
|
+
return e.description;
|
|
103
|
+
},
|
|
104
|
+
get children() {
|
|
105
|
+
var r = C();
|
|
106
|
+
return n(r, () => e.description), r;
|
|
107
|
+
}
|
|
108
|
+
}), null), n(a, s(d, {
|
|
109
|
+
get when() {
|
|
110
|
+
return e.actions;
|
|
111
|
+
},
|
|
112
|
+
get children() {
|
|
113
|
+
var r = F();
|
|
114
|
+
return n(r, () => e.actions), r;
|
|
115
|
+
}
|
|
116
|
+
}), null), n(g, () => e.children), i;
|
|
117
|
+
})();
|
|
118
|
+
}
|
|
119
|
+
function M(t) {
|
|
120
|
+
const [e, o] = w(t, ["class", "children"]);
|
|
121
|
+
return (() => {
|
|
122
|
+
var i = q();
|
|
123
|
+
return f(i, $(o, {
|
|
124
|
+
get class() {
|
|
125
|
+
return u("floe-settings-list", e.class);
|
|
126
|
+
},
|
|
127
|
+
"data-floe-surface": "card"
|
|
128
|
+
}), !1, !0), n(i, () => e.children), i;
|
|
129
|
+
})();
|
|
130
|
+
}
|
|
131
|
+
function O(t) {
|
|
132
|
+
return (() => {
|
|
133
|
+
var e = D(), o = e.firstChild, i = o.firstChild, a = i.firstChild, _ = a.firstChild;
|
|
134
|
+
return n(i, s(d, {
|
|
135
|
+
get when() {
|
|
136
|
+
return t.icon;
|
|
137
|
+
},
|
|
138
|
+
children: (l) => {
|
|
139
|
+
const g = l();
|
|
140
|
+
return s(g, {
|
|
141
|
+
class: "floe-setting-row__icon"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}), a), n(_, () => t.title), n(a, s(d, {
|
|
145
|
+
get when() {
|
|
146
|
+
return t.description;
|
|
147
|
+
},
|
|
148
|
+
get children() {
|
|
149
|
+
var l = C();
|
|
150
|
+
return n(l, () => t.description), l;
|
|
151
|
+
}
|
|
152
|
+
}), null), n(o, s(d, {
|
|
153
|
+
get when() {
|
|
154
|
+
return t.control;
|
|
155
|
+
},
|
|
156
|
+
get children() {
|
|
157
|
+
var l = z();
|
|
158
|
+
return n(l, () => t.control), l;
|
|
159
|
+
}
|
|
160
|
+
}), null), n(e, s(d, {
|
|
161
|
+
get when() {
|
|
162
|
+
return t.children;
|
|
163
|
+
},
|
|
164
|
+
get children() {
|
|
165
|
+
var l = B();
|
|
166
|
+
return n(l, () => t.children), l;
|
|
167
|
+
}
|
|
168
|
+
}), null), v((l) => {
|
|
169
|
+
var g = u("floe-setting-row", t.class), r = t.tone ?? "default";
|
|
170
|
+
return g !== l.e && b(e, l.e = g), r !== l.t && h(e, "data-tone", l.t = r), l;
|
|
171
|
+
}, {
|
|
172
|
+
e: void 0,
|
|
173
|
+
t: void 0
|
|
174
|
+
}), e;
|
|
175
|
+
})();
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
O as SettingRow,
|
|
179
|
+
I as SettingsLayout,
|
|
180
|
+
M as SettingsList,
|
|
181
|
+
J as SettingsNavigation,
|
|
182
|
+
K as SettingsSection
|
|
183
|
+
};
|
|
@@ -42,3 +42,4 @@ export { MobileKeyboard, type MobileKeyboardProps, type MobileKeyboardSuggestion
|
|
|
42
42
|
export { LinearProgress, CircularProgress, SegmentedProgress, StepsProgress, type LinearProgressProps, type CircularProgressProps, type SegmentedProgressProps, type StepsProgressProps, type ProgressSize, type ProgressColor, } from './Progress';
|
|
43
43
|
export { SurfaceAnchoredLayer, type SurfaceAnchoredLayerProps } from './SurfaceAnchoredLayer';
|
|
44
44
|
export { PersistentHorizontalScrollbar, type PersistentHorizontalScrollbarProps } from './PersistentHorizontalScrollbar';
|
|
45
|
+
export { SettingsLayout, SettingsNavigation, SettingsSection, SettingsList, SettingRow, type SettingsNavigationItem, type SettingsNavigationGroup, type SettingsNavigationProps, type SettingsSectionProps, type SettingRowProps, } from './Settings';
|