@5ive-souls/controls 0.0.2 → 0.0.3
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/5ive-souls-controls-0.0.3.tgz +0 -0
- package/dist/{Section-Br38kDAa.js → Section-Bw_kuHpK.js} +1 -1
- package/dist/components/ClassNames.js +1 -1
- package/dist/components/FlexBox/FlexBox.js +5 -5
- package/dist/components/Grid/Grid.js +30 -30
- package/dist/components/JumpList/JumpList.js +178 -0
- package/dist/components/JumpList/index.js +4 -0
- package/dist/components/Section/Section.js +1 -1
- package/dist/components/Section/SectionUtils.js +7 -7
- package/dist/components/Section/index.js +1 -1
- package/dist/components/Wizard/Wizard.js +1 -1
- package/dist/components/index.js +19 -17
- package/dist/main.d.ts +49 -0
- package/dist/main.js +19 -17
- package/package.json +1 -1
- package/dist/5ive-souls-controls-0.0.2.tgz +0 -0
|
Binary file
|
|
@@ -733,7 +733,7 @@ const at = ge({
|
|
|
733
733
|
const y = xe.buildSectionStyles(e);
|
|
734
734
|
m || (y.height = "fit-content");
|
|
735
735
|
const g = m ? /* @__PURE__ */ x(we, {}) : /* @__PURE__ */ x(Pe, {});
|
|
736
|
-
return /* @__PURE__ */ re(oe, { id: c, className: C, style: y, ref: l, children: [
|
|
736
|
+
return /* @__PURE__ */ re(oe, { id: c, className: C, style: y, ref: l, role: e.role, children: [
|
|
737
737
|
/* @__PURE__ */ x(Y, { className: Q.SectionHeader, children: /* @__PURE__ */ re(oe, { fill: !0, horizontal: !0, alignItems: "center", children: [
|
|
738
738
|
n && /* @__PURE__ */ x(Y, { padding: 8, children: n }),
|
|
739
739
|
/* @__PURE__ */ x(Y, { grow: 1, children: o && o }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const t = class t {
|
|
2
2
|
};
|
|
3
|
-
t.FlexBox = "5s-flex-box", t.FlexBoxItem = "5s-flex-box-item", t.FlexBoxItemResizer = "5s-flex-box-item-resizer", t.Section = "5s-section", t.SectionHeader = "5s-section-header", t.SectionContent = "5s-section-content", t.Wizard = "5s-wizard", t.WizardPanel = "5s-wizard-panel", t.DynamicForm = "5s-dynamic-form", t.FormField = "5s-form-field", t.FormFieldGroup = "5s-form-field-group", t.ThemePicker = "5s-theme-picker", t.RichText = "5s-rich-text", t.Grid = "
|
|
3
|
+
t.FlexBox = "5s-flex-box", t.FlexBoxItem = "5s-flex-box-item", t.FlexBoxItemResizer = "5s-flex-box-item-resizer", t.Section = "5s-section", t.SectionHeader = "5s-section-header", t.SectionContent = "5s-section-content", t.Wizard = "5s-wizard", t.WizardPanel = "5s-wizard-panel", t.DynamicForm = "5s-dynamic-form", t.FormField = "5s-form-field", t.FormFieldGroup = "5s-form-field-group", t.ThemePicker = "5s-theme-picker", t.RichText = "5s-rich-text", t.Grid = "_5s-grid", t.GridCell = "5s-grid-cell", t.GridCellResizer = "5s-grid-cell-resizer", t.JumpList = "5s-jl", t.JumpListMenu = "5s-jlm", t.JumpListHeader = "5s-jlh", t.JumpListItem = "5s-jli";
|
|
4
4
|
let i = t;
|
|
5
5
|
export {
|
|
6
6
|
i as ClassNames
|
|
@@ -41,8 +41,8 @@ const j = g({
|
|
|
41
41
|
flexWrap: "wrap"
|
|
42
42
|
}
|
|
43
43
|
}), C = (a) => {
|
|
44
|
-
const { children: c, horizontal: f, alignItems: s, wrap: m, justifyContent:
|
|
45
|
-
let e = f ? r(o.FlexBox, t.root, n,
|
|
44
|
+
const { children: c, horizontal: f, alignItems: s, wrap: m, justifyContent: l, reverse: i, className: n, ref: x, id: y } = a, t = j(), d = v.buildFlexBoxStyles(a);
|
|
45
|
+
let e = f ? r(o.FlexBox, t.root, n, i ? t.horizontalReverse : t.horizontal) : r(o.FlexBox, t.root, n, i ? t.verticalReverse : t.vertical);
|
|
46
46
|
if (s)
|
|
47
47
|
switch (s) {
|
|
48
48
|
case "start":
|
|
@@ -55,8 +55,8 @@ const j = g({
|
|
|
55
55
|
e = r(e, t.alignEnd);
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
switch (
|
|
58
|
+
if (l)
|
|
59
|
+
switch (l) {
|
|
60
60
|
case "start":
|
|
61
61
|
e = r(e, t.justifyStart);
|
|
62
62
|
break;
|
|
@@ -67,7 +67,7 @@ const j = g({
|
|
|
67
67
|
e = r(e, t.justifyEnd);
|
|
68
68
|
break;
|
|
69
69
|
}
|
|
70
|
-
return m && (e = r(e, t.wrap)), /* @__PURE__ */ u("div", { id: y, className: e, style: d, ref: x, children: c });
|
|
70
|
+
return m && (e = r(e, t.wrap)), /* @__PURE__ */ u("div", { id: y, className: e, style: d, ref: x, role: a.role, children: c });
|
|
71
71
|
};
|
|
72
72
|
C.displayName = "FlexBox";
|
|
73
73
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as c, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { makeStyles as
|
|
4
|
-
import { ClassNames as
|
|
2
|
+
import r, { createElement as T } from "react";
|
|
3
|
+
import { makeStyles as _, mergeClasses as d } from "@fluentui/react-components";
|
|
4
|
+
import { ClassNames as A } from "../ClassNames.js";
|
|
5
5
|
import { ResizableGridCell as z } from "./ResizableGridCell/ResizableGridCell.js";
|
|
6
|
-
import { GridContext as
|
|
7
|
-
const
|
|
6
|
+
import { GridContext as U } from "./GridContext.js";
|
|
7
|
+
const E = _({
|
|
8
8
|
grid: {
|
|
9
9
|
display: "grid",
|
|
10
10
|
boxSizing: "border-box"
|
|
@@ -17,26 +17,24 @@ const U = T({
|
|
|
17
17
|
width: "100%",
|
|
18
18
|
height: "100%"
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const { children: S, fill: x, inline:
|
|
26
|
-
let n = _.Grid;
|
|
27
|
-
const f = a.useMemo(() => [], []), u = a.useMemo(() => [], []);
|
|
20
|
+
}), M = (i) => /* @__PURE__ */ c(k, {});
|
|
21
|
+
M.displayName = "RowDefinition";
|
|
22
|
+
const $ = (i) => /* @__PURE__ */ c(k, {});
|
|
23
|
+
$.displayName = "ColumnDefinition";
|
|
24
|
+
const F = (i) => {
|
|
25
|
+
const { children: S, fill: x, inline: N, ref: D, style: P, defaultUnit: p, defaultUnitSize: g, gap: y, id: R, className: j } = i, u = E(), f = r.useMemo(() => [], []), m = r.useMemo(() => [], []);
|
|
28
26
|
let C = "", h = "";
|
|
29
|
-
const
|
|
27
|
+
const a = [], G = r.useCallback((e) => {
|
|
30
28
|
const t = e.size ?? g;
|
|
31
29
|
if (t == null)
|
|
32
30
|
return " auto";
|
|
33
31
|
const s = e.unit ?? p ?? "pixel";
|
|
34
32
|
return ` ${t}${s == "fraction" ? "fr" : "px"}`;
|
|
35
|
-
}, [p, g]), b =
|
|
33
|
+
}, [p, g]), b = r.useCallback((e, t) => {
|
|
36
34
|
const s = e.props;
|
|
37
|
-
return t ?
|
|
38
|
-
}, [
|
|
39
|
-
|
|
35
|
+
return t ? m.push(s) : f.push(s), G(s);
|
|
36
|
+
}, [m, G, f]);
|
|
37
|
+
r.Children.toArray(S).forEach((e, t) => {
|
|
40
38
|
var w;
|
|
41
39
|
switch (e.type.displayName) {
|
|
42
40
|
case "RowDefinition": {
|
|
@@ -49,7 +47,7 @@ const $ = (i) => {
|
|
|
49
47
|
}
|
|
50
48
|
case "ResizableGridCell": {
|
|
51
49
|
const l = e.props;
|
|
52
|
-
|
|
50
|
+
a.push(
|
|
53
51
|
/* @__PURE__ */ c(
|
|
54
52
|
z,
|
|
55
53
|
{
|
|
@@ -63,8 +61,8 @@ const $ = (i) => {
|
|
|
63
61
|
}
|
|
64
62
|
case "Section": {
|
|
65
63
|
const l = e.props;
|
|
66
|
-
(w = l.cellProps) != null && w.resizable ?
|
|
67
|
-
/* @__PURE__ */
|
|
64
|
+
(w = l.cellProps) != null && w.resizable ? a.push(
|
|
65
|
+
/* @__PURE__ */ T(
|
|
68
66
|
z,
|
|
69
67
|
{
|
|
70
68
|
...l.cellProps,
|
|
@@ -73,25 +71,27 @@ const $ = (i) => {
|
|
|
73
71
|
},
|
|
74
72
|
e
|
|
75
73
|
)
|
|
76
|
-
) :
|
|
74
|
+
) : a.push(e);
|
|
77
75
|
break;
|
|
78
76
|
}
|
|
79
77
|
default:
|
|
80
|
-
|
|
78
|
+
a.push(e);
|
|
81
79
|
break;
|
|
82
80
|
}
|
|
83
|
-
})
|
|
81
|
+
});
|
|
82
|
+
let n = A.Grid;
|
|
83
|
+
x && (n = d(n, u.fill)), N ? n = d(n, u.inlineGrid) : n = d(n, u.grid);
|
|
84
84
|
const o = {
|
|
85
85
|
gridTemplateRows: C,
|
|
86
86
|
gridTemplateColumns: h
|
|
87
87
|
};
|
|
88
88
|
i.gap && (o.gap = i.gap), i.columnGap && (o.columnGap = i.columnGap), i.rowGap && (o.rowGap = i.rowGap), i.padding && (o.padding = i.padding), i.justifyContent && (o.justifyContent = i.justifyContent), i.alignContent && (o.alignContent = i.alignContent);
|
|
89
|
-
const
|
|
90
|
-
return /* @__PURE__ */ c(
|
|
89
|
+
const v = Object.assign({}, P, o);
|
|
90
|
+
return /* @__PURE__ */ c(U.Provider, { value: { rows: f, columns: m }, children: /* @__PURE__ */ c("div", { id: R, className: d(n, j), style: v, ref: D, children: a }) });
|
|
91
91
|
};
|
|
92
|
-
|
|
92
|
+
F.displayName = "Grid";
|
|
93
93
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
$ as ColumnDefinition,
|
|
95
|
+
F as Grid,
|
|
96
|
+
M as RowDefinition
|
|
97
97
|
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as V, tokens as h, mergeClasses as l, Text as w, Button as F, Input as X } from "@fluentui/react-components";
|
|
3
|
+
import i from "react";
|
|
4
|
+
import { FlexBox as v } from "../FlexBox/FlexBox.js";
|
|
5
|
+
import { FlexBoxItem as N } from "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
6
|
+
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
7
|
+
import { Grid as Y, ColumnDefinition as K } from "../Grid/Grid.js";
|
|
8
|
+
import "../Grid/GridCell/GridCell.js";
|
|
9
|
+
import "../Grid/ResizableGridCell/ResizableGridCell.js";
|
|
10
|
+
import "../Grid/GridContext.js";
|
|
11
|
+
import { S as z } from "../../Section-Bw_kuHpK.js";
|
|
12
|
+
import { ClassNames as m } from "../ClassNames.js";
|
|
13
|
+
import { c as G } from "../../createFluentIcon-CwLxkjIW.js";
|
|
14
|
+
const Q = /* @__PURE__ */ G("AppsListRegular", "1em", ["M2 3.5C2 2.67 2.67 2 3.5 2h1C5.33 2 6 2.67 6 3.5v1C6 5.33 5.33 6 4.5 6h-1A1.5 1.5 0 0 1 2 4.5v-1ZM3.5 3a.5.5 0 0 0-.5.5v1c0 .28.22.5.5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1ZM2 9.5C2 8.67 2.67 8 3.5 8h1C5.33 8 6 8.67 6 9.5v1c0 .83-.67 1.5-1.5 1.5h-1A1.5 1.5 0 0 1 2 10.5v-1ZM3.5 9a.5.5 0 0 0-.5.5v1c0 .28.22.5.5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1ZM2 15.5c0-.83.67-1.5 1.5-1.5h1c.83 0 1.5.67 1.5 1.5v1c0 .83-.67 1.5-1.5 1.5h-1A1.5 1.5 0 0 1 2 16.5v-1Zm1.5-.5a.5.5 0 0 0-.5.5v1c0 .28.22.5.5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1ZM8 4.5c0-.28.22-.5.5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5Zm0 6c0-.28.22-.5.5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5Zm0 6c0-.28.22-.5.5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5Z"]), U = /* @__PURE__ */ G("FilterRegular", "1em", ["M7.5 13h5a.5.5 0 0 1 .09 1H7.5a.5.5 0 0 1-.09-1h5.09-5Zm-2-4h9a.5.5 0 0 1 .09 1H5.5a.5.5 0 0 1-.09-1h9.09-9Zm-2-4h13a.5.5 0 0 1 .09 1H3.5a.5.5 0 0 1-.09-1H16.5h-13Z"]), a = 36, ee = V({
|
|
15
|
+
root: {
|
|
16
|
+
position: "relative"
|
|
17
|
+
},
|
|
18
|
+
list: {
|
|
19
|
+
padding: "0px",
|
|
20
|
+
margin: "0px",
|
|
21
|
+
boxSizing: "border-box",
|
|
22
|
+
listStyle: "none"
|
|
23
|
+
},
|
|
24
|
+
listItem: {
|
|
25
|
+
height: a + "px",
|
|
26
|
+
maxHeight: a + "px",
|
|
27
|
+
alignContent: "center",
|
|
28
|
+
":hover": {
|
|
29
|
+
backgroundColor: h.colorBrandBackgroundHover
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
listItemIcon: {
|
|
33
|
+
textAlign: "center",
|
|
34
|
+
alignContent: "center"
|
|
35
|
+
},
|
|
36
|
+
listItemContent: {
|
|
37
|
+
paddingLeft: h.spacingHorizontalS
|
|
38
|
+
},
|
|
39
|
+
selectedListItem: {
|
|
40
|
+
backgroundColor: h.colorBrandBackgroundSelected
|
|
41
|
+
},
|
|
42
|
+
capitalize: {
|
|
43
|
+
textTransform: "capitalize"
|
|
44
|
+
},
|
|
45
|
+
baseSize: {
|
|
46
|
+
minWidth: `${a}px`,
|
|
47
|
+
width: `${a}px`,
|
|
48
|
+
height: `${a}px`,
|
|
49
|
+
minHeight: `${a}px`
|
|
50
|
+
},
|
|
51
|
+
headerButton: {
|
|
52
|
+
width: "100%",
|
|
53
|
+
justifyContent: "left",
|
|
54
|
+
height: `${a}px`
|
|
55
|
+
},
|
|
56
|
+
menuRoot: {
|
|
57
|
+
overflowY: "auto",
|
|
58
|
+
overflowX: "hidden",
|
|
59
|
+
height: "100%",
|
|
60
|
+
width: "100%",
|
|
61
|
+
backgroundColor: h.colorNeutralBackground1,
|
|
62
|
+
position: "absolute",
|
|
63
|
+
inset: "0px"
|
|
64
|
+
},
|
|
65
|
+
hidden: {
|
|
66
|
+
display: "none"
|
|
67
|
+
}
|
|
68
|
+
}), R = ["#", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], pe = (y) => {
|
|
69
|
+
const { style: B, className: k, items: u, headerProp: c, renderItem: L, renderIcon: M, onSelectionChanged: Z, strings: H } = y, s = ee(), [p, J] = i.useState(), [T, $] = i.useState(-1), [f, A] = i.useState(), [x, O] = i.useState(), E = i.useId(), d = i.useId(), W = i.useCallback(() => {
|
|
70
|
+
const e = window.document.getElementById(E);
|
|
71
|
+
console.log("TESTING: Offset width: " + e.offsetWidth);
|
|
72
|
+
const t = Math.min(~~((e.offsetWidth - 24) / (a + 8)), 4), n = {
|
|
73
|
+
columns: []
|
|
74
|
+
};
|
|
75
|
+
for (let r = 0; r < t; r++)
|
|
76
|
+
n.columns.push(/* @__PURE__ */ o(K, {}, `column-${r}`));
|
|
77
|
+
console.log("TESTING: Columns: " + n.columns.length), A(n);
|
|
78
|
+
}, [d]), _ = i.useCallback((e) => {
|
|
79
|
+
A(void 0);
|
|
80
|
+
const t = window.document.getElementById(d), n = t.querySelector("#header-button-" + e);
|
|
81
|
+
t.scrollTo({ top: n.offsetTop, behavior: "smooth" });
|
|
82
|
+
}, [d]), q = i.useCallback((e, t) => {
|
|
83
|
+
const n = e[c], r = t[c];
|
|
84
|
+
return n.localeCompare(r);
|
|
85
|
+
}, [c]);
|
|
86
|
+
if (i.useEffect(() => {
|
|
87
|
+
if (!u || u.length == 0 || !c)
|
|
88
|
+
return;
|
|
89
|
+
const e = {};
|
|
90
|
+
R.forEach((t) => {
|
|
91
|
+
e[t] = new Array();
|
|
92
|
+
}), u.forEach((t) => {
|
|
93
|
+
const n = t[c];
|
|
94
|
+
if (x && !new RegExp(x, "i").test(n))
|
|
95
|
+
return;
|
|
96
|
+
const r = n.charAt(0).toLowerCase();
|
|
97
|
+
(Object.hasOwn(e, r) ? e[r] : e["#"]).push(t);
|
|
98
|
+
}), J(e);
|
|
99
|
+
}, [c, u, x]), !p)
|
|
100
|
+
return /* @__PURE__ */ o(z, { className: l(m.JumpList, s.root, k), style: B, id: d, children: /* @__PURE__ */ g(v, { fill: !0, justifyContent: "center", alignItems: "center", children: [
|
|
101
|
+
/* @__PURE__ */ o(Q, { fontSize: 48 }),
|
|
102
|
+
/* @__PURE__ */ o(w, { children: H ? H.emptyList : "No items." })
|
|
103
|
+
] }) });
|
|
104
|
+
const I = [];
|
|
105
|
+
let C = 0;
|
|
106
|
+
Object.keys(p).forEach((e) => {
|
|
107
|
+
const t = p[e];
|
|
108
|
+
t.length != 0 && (I.push(
|
|
109
|
+
/* @__PURE__ */ o("li", { className: m.JumpListHeader, children: /* @__PURE__ */ o(
|
|
110
|
+
F,
|
|
111
|
+
{
|
|
112
|
+
id: "header-button-" + e,
|
|
113
|
+
className: l(s.headerButton, s.capitalize),
|
|
114
|
+
appearance: "subtle",
|
|
115
|
+
onClick: W,
|
|
116
|
+
children: e
|
|
117
|
+
}
|
|
118
|
+
) }, e)
|
|
119
|
+
), t.sort(q).forEach((n) => {
|
|
120
|
+
const r = C == T, j = n[c], b = C + 0, D = L ? L(n, r) : /* @__PURE__ */ o(w, { children: j });
|
|
121
|
+
let S = l(m.JumpListItem, s.listItem);
|
|
122
|
+
r && (S = l(S, s.selectedListItem)), I.push(
|
|
123
|
+
/* @__PURE__ */ o(
|
|
124
|
+
"li",
|
|
125
|
+
{
|
|
126
|
+
className: S,
|
|
127
|
+
onClick: () => {
|
|
128
|
+
Z && T != b && (Z(n), $(b));
|
|
129
|
+
},
|
|
130
|
+
children: /* @__PURE__ */ g(v, { horizontal: !0, alignItems: "center", children: [
|
|
131
|
+
M && /* @__PURE__ */ o(N, { className: l(s.baseSize, s.listItemIcon), children: M(n, r) }),
|
|
132
|
+
/* @__PURE__ */ o(N, { grow: 1, className: s.listItemContent, children: D })
|
|
133
|
+
] })
|
|
134
|
+
},
|
|
135
|
+
b
|
|
136
|
+
)
|
|
137
|
+
), C++;
|
|
138
|
+
}));
|
|
139
|
+
});
|
|
140
|
+
const P = (e, t) => {
|
|
141
|
+
O(t.value);
|
|
142
|
+
};
|
|
143
|
+
return /* @__PURE__ */ g(v, { className: l(m.JumpList, s.root, k), style: B, id: E, childrenGap: h.spacingVerticalM, children: [
|
|
144
|
+
y.enableFiltering && /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
|
|
145
|
+
X,
|
|
146
|
+
{
|
|
147
|
+
type: "search",
|
|
148
|
+
contentAfter: /* @__PURE__ */ o(U, {}),
|
|
149
|
+
placeholder: "Filter",
|
|
150
|
+
style: { width: "100%" },
|
|
151
|
+
onChange: P
|
|
152
|
+
}
|
|
153
|
+
) }),
|
|
154
|
+
/* @__PURE__ */ o(z, { scrollable: !0, flexBoxItemProps: { grow: 1 }, id: d, children: /* @__PURE__ */ o("ul", { className: s.list, children: I }) }),
|
|
155
|
+
/* @__PURE__ */ o(z, { className: l(m.JumpListMenu, s.menuRoot, !f && s.hidden), scrollable: !0, role: "menu", children: /* @__PURE__ */ g(Y, { gap: h.spacingHorizontalS, justifyContent: "center", alignContent: "center", children: [
|
|
156
|
+
f && f.columns,
|
|
157
|
+
R.map((e) => {
|
|
158
|
+
const t = p[e].length == 0;
|
|
159
|
+
return /* @__PURE__ */ o(
|
|
160
|
+
F,
|
|
161
|
+
{
|
|
162
|
+
appearance: "subtle",
|
|
163
|
+
className: s.baseSize,
|
|
164
|
+
disabled: t,
|
|
165
|
+
onClick: () => {
|
|
166
|
+
_(e);
|
|
167
|
+
},
|
|
168
|
+
children: /* @__PURE__ */ o(w, { weight: "bold", size: 400, className: s.capitalize, children: e })
|
|
169
|
+
},
|
|
170
|
+
e
|
|
171
|
+
);
|
|
172
|
+
})
|
|
173
|
+
] }) })
|
|
174
|
+
] });
|
|
175
|
+
};
|
|
176
|
+
export {
|
|
177
|
+
pe as JumpList
|
|
178
|
+
};
|
|
@@ -6,7 +6,7 @@ import "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
|
6
6
|
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
7
7
|
import "../ClassNames.js";
|
|
8
8
|
import "./SectionUtils.js";
|
|
9
|
-
import { S as f } from "../../Section-
|
|
9
|
+
import { S as f } from "../../Section-Bw_kuHpK.js";
|
|
10
10
|
export {
|
|
11
11
|
f as Section
|
|
12
12
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { tokens as s } from "@fluentui/react-components";
|
|
2
|
-
import { GridUtils as
|
|
3
|
-
import { FlexBoxUtils as
|
|
4
|
-
const
|
|
2
|
+
import { GridUtils as d } from "../Grid/GridUtils.js";
|
|
3
|
+
import { FlexBoxUtils as a } from "../FlexBox/FlexBoxUtils.js";
|
|
4
|
+
const l = class l {
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
const { flexBoxItemProps: e, cellProps: t, scrollable: c } =
|
|
6
|
+
l.buildSectionStyles = (r) => {
|
|
7
|
+
const { flexBoxItemProps: e, cellProps: t, scrollable: c } = r, o = {
|
|
8
8
|
scrollbarColor: s.colorBrandForeground1 + " " + s.colorNeutralBackground2
|
|
9
9
|
};
|
|
10
|
-
return c
|
|
10
|
+
return c ? o.overflow = "auto" : o.overflow = "hidden", t && d.buildGridCellStyles(t, o), e && a.buildFlexBoxItemStyles(e, o), Object.assign({}, r.style, o);
|
|
11
11
|
};
|
|
12
|
-
let i =
|
|
12
|
+
let i = l;
|
|
13
13
|
export {
|
|
14
14
|
i as SectionUtils
|
|
15
15
|
};
|
|
@@ -5,7 +5,7 @@ import { ClassNames as q } from "../ClassNames.js";
|
|
|
5
5
|
import { FlexBox as f } from "../FlexBox/FlexBox.js";
|
|
6
6
|
import { FlexBoxItem as m } from "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
7
7
|
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
8
|
-
import { S as H, C as J, a as K, b as M } from "../../Section-
|
|
8
|
+
import { S as H, C as J, a as K, b as M } from "../../Section-Bw_kuHpK.js";
|
|
9
9
|
const O = A({
|
|
10
10
|
root: {
|
|
11
11
|
height: "100%",
|
package/dist/components/index.js
CHANGED
|
@@ -3,48 +3,50 @@ import { DynamicFormBuilder as m } from "./DynamicForm/Builder/DynamicFormBuilde
|
|
|
3
3
|
import { FieldBuilder as x } from "./DynamicForm/Builder/Field/FieldBuilder.js";
|
|
4
4
|
import { SectionBuilder as l } from "./DynamicForm/Builder/Section/SectionBuilder.js";
|
|
5
5
|
import { Device as c } from "./FiveSoulsProvider/FiveSouls.Types.js";
|
|
6
|
-
import { FiveSoulsProvider as
|
|
6
|
+
import { FiveSoulsProvider as s } from "./FiveSoulsProvider/FiveSoulsProvider.js";
|
|
7
7
|
import { deviceContext as D } from "./FiveSoulsProvider/deviceContext.js";
|
|
8
|
-
import { useDevice as
|
|
8
|
+
import { useDevice as F } from "./FiveSoulsProvider/useDevice.js";
|
|
9
9
|
import { FlexBox as B } from "./FlexBox/FlexBox.js";
|
|
10
10
|
import { FlexBoxItem as v } from "./FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
11
|
-
import { FlexBoxItemResizer as
|
|
12
|
-
import { ColumnDefinition as
|
|
11
|
+
import { FlexBoxItemResizer as L } from "./FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
12
|
+
import { ColumnDefinition as w, Grid as z, RowDefinition as C } from "./Grid/Grid.js";
|
|
13
13
|
import { GridCell as S } from "./Grid/GridCell/GridCell.js";
|
|
14
14
|
import { ResizableGridCell as P } from "./Grid/ResizableGridCell/ResizableGridCell.js";
|
|
15
15
|
import "./Grid/GridContext.js";
|
|
16
16
|
import { RichText as T } from "./RichText/RichText.js";
|
|
17
|
-
import { S as b } from "../Section-
|
|
18
|
-
import { ThemePicker as
|
|
19
|
-
import { cornflower as
|
|
17
|
+
import { S as b } from "../Section-Bw_kuHpK.js";
|
|
18
|
+
import { ThemePicker as j } from "./ThemePicker/ThemePicker.js";
|
|
19
|
+
import { cornflower as A, cornflowerDark as E, cornflowerLight as H } from "./ThemePicker/Themes/Cornflower/Cornflower.js";
|
|
20
20
|
import { crimson as M, crimsonDark as N, crimsonLight as O } from "./ThemePicker/Themes/Crimson/Crimson.js";
|
|
21
21
|
import { forest as U, forestDark as V, forestLight as X } from "./ThemePicker/Themes/Forest/Forest.js";
|
|
22
22
|
import { royal as Z, royalDark as _, royalLight as $ } from "./ThemePicker/Themes/Royal/Royal.js";
|
|
23
23
|
import { Wizard as or } from "./Wizard/Wizard.js";
|
|
24
24
|
import { WizardPanel as tr } from "./Wizard/WizardPanel/WizardPanel.js";
|
|
25
|
+
import { JumpList as mr } from "./JumpList/JumpList.js";
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
+
w as ColumnDefinition,
|
|
27
28
|
c as Device,
|
|
28
29
|
t as DynamicForm,
|
|
29
30
|
m as DynamicFormBuilder,
|
|
30
31
|
x as FieldBuilder,
|
|
31
|
-
|
|
32
|
+
s as FiveSoulsProvider,
|
|
32
33
|
B as FlexBox,
|
|
33
34
|
v as FlexBoxItem,
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
L as FlexBoxItemResizer,
|
|
36
|
+
z as Grid,
|
|
36
37
|
S as GridCell,
|
|
38
|
+
mr as JumpList,
|
|
37
39
|
P as ResizableGridCell,
|
|
38
40
|
T as RichText,
|
|
39
|
-
|
|
41
|
+
C as RowDefinition,
|
|
40
42
|
b as Section,
|
|
41
43
|
l as SectionBuilder,
|
|
42
|
-
|
|
44
|
+
j as ThemePicker,
|
|
43
45
|
or as Wizard,
|
|
44
46
|
tr as WizardPanel,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
A as cornflower,
|
|
48
|
+
E as cornflowerDark,
|
|
49
|
+
H as cornflowerLight,
|
|
48
50
|
M as crimson,
|
|
49
51
|
N as crimsonDark,
|
|
50
52
|
O as crimsonLight,
|
|
@@ -55,5 +57,5 @@ export {
|
|
|
55
57
|
Z as royal,
|
|
56
58
|
_ as royalDark,
|
|
57
59
|
$ as royalLight,
|
|
58
|
-
|
|
60
|
+
F as useDevice
|
|
59
61
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -353,6 +353,44 @@ export declare interface IGridSize {
|
|
|
353
353
|
min?: number;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
+
export declare interface IJumpListProps<T extends object> extends IComponentProps {
|
|
357
|
+
/**
|
|
358
|
+
* Collection of items to be displayed.
|
|
359
|
+
*/
|
|
360
|
+
items?: T[];
|
|
361
|
+
/**
|
|
362
|
+
* Name\Key of the field to be used as the header to be used for grouping and sorting.
|
|
363
|
+
*/
|
|
364
|
+
headerProp: string;
|
|
365
|
+
/**
|
|
366
|
+
* Rendering function for the content of the list item, if not provided the value acquired from the `headerProp` will be used.
|
|
367
|
+
*/
|
|
368
|
+
renderItem?: (item: T, isSelected: boolean) => default_2.ReactNode;
|
|
369
|
+
/**
|
|
370
|
+
* Rendering function for an optional icon slot that appears before the item. Renders into a 36px by 36px area.
|
|
371
|
+
*/
|
|
372
|
+
renderIcon?: (item: T, isSelected: boolean) => default_2.ReactNode;
|
|
373
|
+
/**
|
|
374
|
+
* Callback invoked when the user makes a selection.
|
|
375
|
+
*/
|
|
376
|
+
onSelectionChanged?: (item?: T) => void;
|
|
377
|
+
/**
|
|
378
|
+
* Collection of string that override the default values used by the JumpList
|
|
379
|
+
*/
|
|
380
|
+
strings?: IJumpListStrings;
|
|
381
|
+
/**
|
|
382
|
+
* When enabled render UI to allow the user to filter the list of items.
|
|
383
|
+
*/
|
|
384
|
+
enableFiltering?: boolean;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export declare interface IJumpListStrings {
|
|
388
|
+
/**
|
|
389
|
+
* Message displayed when no items have been provided.
|
|
390
|
+
*/
|
|
391
|
+
emptyList: string;
|
|
392
|
+
}
|
|
393
|
+
|
|
356
394
|
export declare interface IResizableGridCellProps extends IGridCellProps {
|
|
357
395
|
/**
|
|
358
396
|
* If set to true, the cell will allow the column to beresized instead of the row.
|
|
@@ -532,6 +570,17 @@ declare interface IWizardStrings {
|
|
|
532
570
|
submit?: string;
|
|
533
571
|
}
|
|
534
572
|
|
|
573
|
+
/**
|
|
574
|
+
* The `JumpList` component display a collection of items, that will then be grouped by the first letter of their `headerProp`.
|
|
575
|
+
* A button will be displayed between changing characters that when pressed will present the user with a surface that will allow them to jump to another header in the list.
|
|
576
|
+
*
|
|
577
|
+
* > The `JumpList` component supports a generic type argument that defines the type of items expected.
|
|
578
|
+
* > T define the generic type, use the following syntax.
|
|
579
|
+
* >
|
|
580
|
+
* > `<JumpList<TItemType> items={[]} headerProp="name" />`
|
|
581
|
+
*/
|
|
582
|
+
export declare const JumpList: <T extends object>(props: IJumpListProps<T>) => JSX_2.Element;
|
|
583
|
+
|
|
535
584
|
/**
|
|
536
585
|
* The `ResizableGridCell` component can be used in place of the `GridCell` compoent to allow the user to resize the row or column the cell resides it.
|
|
537
586
|
* By default this allows the row to be resized. This can be changed by setting the `horizontal` property to true.
|
package/dist/main.js
CHANGED
|
@@ -3,48 +3,50 @@ import { DynamicFormBuilder as m } from "./components/DynamicForm/Builder/Dynami
|
|
|
3
3
|
import { FieldBuilder as x } from "./components/DynamicForm/Builder/Field/FieldBuilder.js";
|
|
4
4
|
import { SectionBuilder as l } from "./components/DynamicForm/Builder/Section/SectionBuilder.js";
|
|
5
5
|
import { Device as c } from "./components/FiveSoulsProvider/FiveSouls.Types.js";
|
|
6
|
-
import { FiveSoulsProvider as
|
|
6
|
+
import { FiveSoulsProvider as s } from "./components/FiveSoulsProvider/FiveSoulsProvider.js";
|
|
7
7
|
import { deviceContext as D } from "./components/FiveSoulsProvider/deviceContext.js";
|
|
8
|
-
import { useDevice as
|
|
8
|
+
import { useDevice as F } from "./components/FiveSoulsProvider/useDevice.js";
|
|
9
9
|
import { FlexBox as B } from "./components/FlexBox/FlexBox.js";
|
|
10
10
|
import { FlexBoxItem as v } from "./components/FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
11
|
-
import { FlexBoxItemResizer as
|
|
12
|
-
import { ColumnDefinition as
|
|
11
|
+
import { FlexBoxItemResizer as L } from "./components/FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
12
|
+
import { ColumnDefinition as w, Grid as z, RowDefinition as C } from "./components/Grid/Grid.js";
|
|
13
13
|
import { GridCell as S } from "./components/Grid/GridCell/GridCell.js";
|
|
14
14
|
import { ResizableGridCell as P } from "./components/Grid/ResizableGridCell/ResizableGridCell.js";
|
|
15
15
|
import "./components/Grid/GridContext.js";
|
|
16
16
|
import { RichText as T } from "./components/RichText/RichText.js";
|
|
17
|
-
import { S as b } from "./Section-
|
|
18
|
-
import { ThemePicker as
|
|
19
|
-
import { cornflower as
|
|
17
|
+
import { S as b } from "./Section-Bw_kuHpK.js";
|
|
18
|
+
import { ThemePicker as j } from "./components/ThemePicker/ThemePicker.js";
|
|
19
|
+
import { cornflower as A, cornflowerDark as E, cornflowerLight as H } from "./components/ThemePicker/Themes/Cornflower/Cornflower.js";
|
|
20
20
|
import { crimson as M, crimsonDark as N, crimsonLight as O } from "./components/ThemePicker/Themes/Crimson/Crimson.js";
|
|
21
21
|
import { forest as U, forestDark as V, forestLight as X } from "./components/ThemePicker/Themes/Forest/Forest.js";
|
|
22
22
|
import { royal as Z, royalDark as _, royalLight as $ } from "./components/ThemePicker/Themes/Royal/Royal.js";
|
|
23
23
|
import { Wizard as or } from "./components/Wizard/Wizard.js";
|
|
24
24
|
import { WizardPanel as tr } from "./components/Wizard/WizardPanel/WizardPanel.js";
|
|
25
|
+
import { JumpList as mr } from "./components/JumpList/JumpList.js";
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
+
w as ColumnDefinition,
|
|
27
28
|
c as Device,
|
|
28
29
|
t as DynamicForm,
|
|
29
30
|
m as DynamicFormBuilder,
|
|
30
31
|
x as FieldBuilder,
|
|
31
|
-
|
|
32
|
+
s as FiveSoulsProvider,
|
|
32
33
|
B as FlexBox,
|
|
33
34
|
v as FlexBoxItem,
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
L as FlexBoxItemResizer,
|
|
36
|
+
z as Grid,
|
|
36
37
|
S as GridCell,
|
|
38
|
+
mr as JumpList,
|
|
37
39
|
P as ResizableGridCell,
|
|
38
40
|
T as RichText,
|
|
39
|
-
|
|
41
|
+
C as RowDefinition,
|
|
40
42
|
b as Section,
|
|
41
43
|
l as SectionBuilder,
|
|
42
|
-
|
|
44
|
+
j as ThemePicker,
|
|
43
45
|
or as Wizard,
|
|
44
46
|
tr as WizardPanel,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
A as cornflower,
|
|
48
|
+
E as cornflowerDark,
|
|
49
|
+
H as cornflowerLight,
|
|
48
50
|
M as crimson,
|
|
49
51
|
N as crimsonDark,
|
|
50
52
|
O as crimsonLight,
|
|
@@ -55,5 +57,5 @@ export {
|
|
|
55
57
|
Z as royal,
|
|
56
58
|
_ as royalDark,
|
|
57
59
|
$ as royalLight,
|
|
58
|
-
|
|
60
|
+
F as useDevice
|
|
59
61
|
};
|
package/package.json
CHANGED
|
Binary file
|