@5ive-souls/controls 0.0.3 → 0.0.5
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.5.tgz +0 -0
- package/dist/Utilities-C0PUcYTL.js +157 -0
- package/dist/chunk-3-CMb_cR4A.js +11 -0
- package/dist/components/ClassNames.js +1 -1
- package/dist/components/EventCalender/Context/EventCalenderContext.js +5 -0
- package/dist/components/EventCalender/Context/EventCalenderProvider.js +34 -0
- package/dist/components/EventCalender/Context/EventProviderProps.js +0 -0
- package/dist/components/EventCalender/Context/index.js +6 -0
- package/dist/components/EventCalender/Day.js +12 -0
- package/dist/components/EventCalender/EventCalender.js +8 -0
- package/dist/components/EventCalender/EventList.js +12 -0
- package/dist/components/EventCalender/Month.js +48 -0
- package/dist/components/EventCalender/MonthPicker.js +65 -0
- package/dist/components/EventCalender/Utilities.js +8 -0
- package/dist/components/EventCalender/Week.js +10 -0
- package/dist/components/EventCalender/WeekdayLabel.js +32 -0
- package/dist/components/EventCalender/YearPicker.js +21 -0
- package/dist/components/EventCalender/index.js +4 -0
- package/dist/components/EventCalender/interfaces/CalenderItemProps.js +0 -0
- package/dist/components/EventCalender/interfaces/Event.js +0 -0
- package/dist/components/EventCalender/interfaces/EventCalenderProps.js +0 -0
- package/dist/components/EventCalender/interfaces/EventCalenderStrings.js +0 -0
- package/dist/components/EventCalender/interfaces/index.js +0 -0
- package/dist/components/FlexBox/FlexBoxItem/FlexBoxItem.js +3 -3
- package/dist/components/JumpList/JumpList.js +1 -1
- package/dist/components/Section/Section.js +750 -9
- package/dist/components/Section/SectionUtils.js +10 -7
- package/dist/components/Section/index.js +1 -1
- package/dist/components/Wizard/Wizard.js +16 -15
- package/dist/components/index.js +7 -7
- package/dist/main.d.ts +4 -0
- package/dist/main.js +7 -7
- package/package.json +1 -1
- package/dist/5ive-souls-controls-0.0.3.tgz +0 -0
- package/dist/Section-Bw_kuHpK.js +0 -754
|
Binary file
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsx as d, jsxs as B, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as z, tokens as l, Text as C, Badge as w, mergeClasses as c } from "@fluentui/react-components";
|
|
3
|
+
import b from "react";
|
|
4
|
+
import { FlexBox as k } from "./components/FlexBox/FlexBox.js";
|
|
5
|
+
import { FlexBoxItem as v } from "./components/FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
6
|
+
import "./components/FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
7
|
+
import { eventCalenderContext as F } from "./components/EventCalender/Context/EventCalenderContext.js";
|
|
8
|
+
import { EventList as I } from "./components/EventCalender/EventList.js";
|
|
9
|
+
const D = (m) => {
|
|
10
|
+
const e = b.useContext(F), { calenderProps: { size: a } } = e, { index: t } = m, n = g.buildDays(t), r = a == "fill" ? 1 : 0;
|
|
11
|
+
return /* @__PURE__ */ d(k, { itemProps: { grow: r }, horizontal: !0, childrenGap: 1, children: n });
|
|
12
|
+
}, P = z({
|
|
13
|
+
root: {
|
|
14
|
+
backgroundColor: l.colorNeutralBackground1,
|
|
15
|
+
borderRadius: l.borderRadiusSmall,
|
|
16
|
+
boxSizing: "border-box",
|
|
17
|
+
padding: l.spacingHorizontalXXS,
|
|
18
|
+
transitionDuration: l.durationFast,
|
|
19
|
+
transitionTimingFunction: "ease",
|
|
20
|
+
transitionProperty: "background-color",
|
|
21
|
+
textAlign: "center",
|
|
22
|
+
alignContent: "center"
|
|
23
|
+
},
|
|
24
|
+
small: {
|
|
25
|
+
width: "35px",
|
|
26
|
+
height: "35px"
|
|
27
|
+
},
|
|
28
|
+
medium: {
|
|
29
|
+
width: "60px",
|
|
30
|
+
height: "60px"
|
|
31
|
+
},
|
|
32
|
+
fill: {
|
|
33
|
+
width: "100%"
|
|
34
|
+
},
|
|
35
|
+
default: {
|
|
36
|
+
":hover": {
|
|
37
|
+
backgroundColor: l.colorNeutralBackground1Hover
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
brand: {
|
|
41
|
+
":hover": {
|
|
42
|
+
backgroundColor: l.colorBrandBackground2Hover
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
disabledDefault: {
|
|
46
|
+
color: l.colorNeutralForegroundDisabled
|
|
47
|
+
},
|
|
48
|
+
disabledBrand: {
|
|
49
|
+
color: l.colorNeutralForegroundDisabled
|
|
50
|
+
},
|
|
51
|
+
selected: {
|
|
52
|
+
backgroundColor: l.colorNeutralBackground1Selected
|
|
53
|
+
},
|
|
54
|
+
selectedBrand: {
|
|
55
|
+
backgroundColor: l.colorBrandBackgroundSelected,
|
|
56
|
+
color: l.colorNeutralForegroundOnBrand
|
|
57
|
+
}
|
|
58
|
+
}), W = (m) => {
|
|
59
|
+
var f;
|
|
60
|
+
const e = b.useContext(F), { parentIndex: a, index: t } = m, n = P(), r = a + "-" + t, s = e.getDateFromIndex(r), i = s.getMonth() == e.month, p = e.calenderProps.size == "fill" ? 1 : 0, N = b.useCallback(() => {
|
|
61
|
+
i && e.setSelectedIndex(r);
|
|
62
|
+
}, []);
|
|
63
|
+
let h = "";
|
|
64
|
+
e.selectedIndex == r && (h = e.calenderProps.appearance === "brand" ? n.selectedBrand : n.selected), h = g.getClassNamesWithDisabled(n, e.calenderProps, !i, h);
|
|
65
|
+
let u = /* @__PURE__ */ d(S, {});
|
|
66
|
+
if (e.calenderProps.size == "fill")
|
|
67
|
+
u = /* @__PURE__ */ B(k, { fill: !0, children: [
|
|
68
|
+
u,
|
|
69
|
+
/* @__PURE__ */ d(C, { children: s.getDate() }),
|
|
70
|
+
/* @__PURE__ */ d(I, { date: s })
|
|
71
|
+
] });
|
|
72
|
+
else {
|
|
73
|
+
const x = [];
|
|
74
|
+
(f = e.calenderProps.events) == null || f.forEach((y) => {
|
|
75
|
+
y.date.toDateString() == s.toDateString() && x.push(y);
|
|
76
|
+
}), x.length == 0 ? u = /* @__PURE__ */ d(C, { children: s.getDate() }) : u = /* @__PURE__ */ d(w, { children: s.getDate() });
|
|
77
|
+
}
|
|
78
|
+
return /* @__PURE__ */ d(v, { grow: p, className: c(n.root, h), onClick: N, children: i && u });
|
|
79
|
+
}, A = {
|
|
80
|
+
0: "January",
|
|
81
|
+
1: "February",
|
|
82
|
+
2: "March",
|
|
83
|
+
3: "April",
|
|
84
|
+
4: "May",
|
|
85
|
+
5: "June",
|
|
86
|
+
6: "July",
|
|
87
|
+
7: "August",
|
|
88
|
+
8: "September",
|
|
89
|
+
9: "October",
|
|
90
|
+
10: "November",
|
|
91
|
+
11: "December"
|
|
92
|
+
}, M = {
|
|
93
|
+
0: "Sunday",
|
|
94
|
+
1: "Monday",
|
|
95
|
+
2: "Tuesday",
|
|
96
|
+
3: "Wednesday",
|
|
97
|
+
4: "Thursday",
|
|
98
|
+
5: "Friday",
|
|
99
|
+
6: "Saturday"
|
|
100
|
+
}, o = class o {
|
|
101
|
+
};
|
|
102
|
+
o.getClassNames = (e, a, t) => {
|
|
103
|
+
const n = o.getAppearanceClass(e, a), r = o.getSizeClass(e, a);
|
|
104
|
+
return c(t, n, r);
|
|
105
|
+
}, o.getClassNamesWithDisabled = (e, a, t, n) => {
|
|
106
|
+
const r = o.getAppearanceWithDisabledClass(e, a, t), s = o.getSizeClass(e, a);
|
|
107
|
+
return c(n, r, s);
|
|
108
|
+
}, o.getAppearanceClass = (e, a, t) => {
|
|
109
|
+
const { appearance: n } = a;
|
|
110
|
+
return c(t, e[n || "default"]);
|
|
111
|
+
}, o.getAppearanceWithDisabledClass = (e, a, t, n) => {
|
|
112
|
+
const { appearance: r } = a;
|
|
113
|
+
let s = "";
|
|
114
|
+
return t ? s = "disabled" + (r === "brand" ? "Brand" : "Default") : s = r === "brand" ? "brand" : "default", c(n, e[s]);
|
|
115
|
+
}, o.getSizeClass = (e, a, t) => {
|
|
116
|
+
const { size: n } = a;
|
|
117
|
+
let r = c(e[n || "fill"]);
|
|
118
|
+
return t && (r = c(r, t)), r;
|
|
119
|
+
}, o.buildWeeks = (e) => {
|
|
120
|
+
const a = [];
|
|
121
|
+
let t = 7 - e.monthFirstDay;
|
|
122
|
+
for (a.push(/* @__PURE__ */ d(D, { index: 0 }, "week-0")); t < e.monthNumDays; )
|
|
123
|
+
a.push(/* @__PURE__ */ d(D, { index: a.length }, "week-" + a.length)), t = t + 7;
|
|
124
|
+
return a;
|
|
125
|
+
}, o.buildDays = (e) => {
|
|
126
|
+
const a = [];
|
|
127
|
+
for (let t = 0; t < 7; t++)
|
|
128
|
+
a.push(
|
|
129
|
+
/* @__PURE__ */ d(
|
|
130
|
+
W,
|
|
131
|
+
{
|
|
132
|
+
parentIndex: e,
|
|
133
|
+
index: t
|
|
134
|
+
},
|
|
135
|
+
e + "-" + t
|
|
136
|
+
)
|
|
137
|
+
);
|
|
138
|
+
return a;
|
|
139
|
+
}, o.getMonthName = (e, a) => {
|
|
140
|
+
let t = A[e];
|
|
141
|
+
return a && a[t] && (t = a[t]), t;
|
|
142
|
+
}, o.getDayName = (e, a) => {
|
|
143
|
+
const { calenderProps: { strings: t, size: n } } = a;
|
|
144
|
+
let r = M[e];
|
|
145
|
+
return t && t[r] && (r = t[r]), n == "medium" || n == "small" ? r.substring(0, 3) : r;
|
|
146
|
+
}, o.getDateFromIndex = (e, a) => {
|
|
147
|
+
const { year: t, month: n, monthFirstDay: r } = a, s = e.split("-"), i = Number(s[0]), p = Number(s[1]);
|
|
148
|
+
return new Date(t, n, i * 7 + p - r + 1);
|
|
149
|
+
};
|
|
150
|
+
let g = o;
|
|
151
|
+
export {
|
|
152
|
+
W as D,
|
|
153
|
+
g as U,
|
|
154
|
+
D as W,
|
|
155
|
+
M as d,
|
|
156
|
+
A as m
|
|
157
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { c as l } from "./createFluentIcon-CwLxkjIW.js";
|
|
2
|
+
const e = /* @__PURE__ */ l("Checkmark32Filled", "32", ["M29.9 5.14c.48.5.46 1.3-.04 1.77l-19 18a1.25 1.25 0 0 1-1.77-.06L2.34 17.6a1.25 1.25 0 0 1 1.82-1.7l5.9 6.33L28.14 5.09c.5-.47 1.3-.45 1.77.05Z"]), o = /* @__PURE__ */ l("ChevronDoubleDown20Regular", "20", ["M15.85 8.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 9.35a.5.5 0 1 1 .7-.7L10 13.8l5.15-5.16c.2-.2.5-.2.7 0Zm0-4c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 5.35a.5.5 0 1 1 .7-.7L10 9.8l5.15-5.16c.2-.2.5-.2.7 0Z"]), n = /* @__PURE__ */ l("ChevronDoubleUp20Regular", "20", ["M4.15 9.65a.5.5 0 0 0 .7.7L10 5.2l5.15 5.16a.5.5 0 1 0 .7-.7L10.4 4.16a.55.55 0 0 0-.78 0L4.15 9.65Zm0 5a.5.5 0 0 0 .7.7L10 10.2l5.15 5.16a.5.5 0 1 0 .7-.7L10.4 9.16a.55.55 0 0 0-.78 0l-5.46 5.49Z"]), c = /* @__PURE__ */ l("ChevronDown16Filled", "16", ["M3.2 5.74a.75.75 0 0 1 1.06-.04L8 9.23l3.74-3.53a.75.75 0 1 1 1.02 1.1l-4.25 4a.75.75 0 0 1-1.02 0l-4.25-4a.75.75 0 0 1-.04-1.06Z"]), r = /* @__PURE__ */ l("ChevronLeft32Filled", "32", ["M20.88 5.37c.5.48.5 1.28 0 1.76L12.02 16l8.86 8.87a1.25 1.25 0 0 1-1.76 1.76l-9.75-9.75a1.25 1.25 0 0 1 0-1.76l9.75-9.75a1.25 1.25 0 0 1 1.76 0Z"]), L = /* @__PURE__ */ l("ChevronRight32Filled", "32", ["M11.12 26.63a1.25 1.25 0 0 1 0-1.76L19.98 16l-8.86-8.87a1.25 1.25 0 0 1 1.76-1.76l9.75 9.75c.5.48.5 1.28 0 1.76l-9.75 9.75c-.48.5-1.28.5-1.76 0Z"]), h = /* @__PURE__ */ l("ChevronUp16Filled", "16", ["M3.2 10.26c.28.3.76.32 1.06.04L8 6.77l3.74 3.53a.75.75 0 1 0 1.02-1.1l-4.25-4a.75.75 0 0 0-1.02 0l-4.25 4a.75.75 0 0 0-.04 1.06Z"]);
|
|
3
|
+
export {
|
|
4
|
+
r as C,
|
|
5
|
+
L as a,
|
|
6
|
+
e as b,
|
|
7
|
+
c,
|
|
8
|
+
h as d,
|
|
9
|
+
n as e,
|
|
10
|
+
o as f
|
|
11
|
+
};
|
|
@@ -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 = "_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";
|
|
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", t.EventCalender = "5s-ec";
|
|
4
4
|
let i = t;
|
|
5
5
|
export {
|
|
6
6
|
i as ClassNames
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import e from "react";
|
|
3
|
+
import { eventCalenderContext as F } from "./EventCalenderContext.js";
|
|
4
|
+
const N = (l) => {
|
|
5
|
+
const { children: h, calenderProps: S } = l, { startingDate: g } = S, [a, u] = e.useState(), [o, m] = e.useState(), [p, D] = e.useState(), [r, i] = e.useState(), [v, x] = e.useState(), [y, f] = e.useState(), c = e.useCallback((n) => {
|
|
6
|
+
const t = n.getMonth(), s = n.getFullYear();
|
|
7
|
+
u(t), i(s), m(new Date(s, t, 1).getDay()), D(new Date(s, t + 1, 0).getDate()), x(void 0);
|
|
8
|
+
}, [u, m, D, i]);
|
|
9
|
+
e.useEffect(() => {
|
|
10
|
+
c(new Date(g ?? Date.now()));
|
|
11
|
+
}, [c]);
|
|
12
|
+
const d = e.useCallback((n) => {
|
|
13
|
+
const t = n.split("-"), s = Number(t[0]), I = Number(t[1]);
|
|
14
|
+
return new Date(r, a, s * 7 + I - o + 1);
|
|
15
|
+
}, [a, o, r]), w = e.useCallback((n) => {
|
|
16
|
+
const t = d(n);
|
|
17
|
+
x(n), f(t);
|
|
18
|
+
}, [d]), C = {
|
|
19
|
+
month: a,
|
|
20
|
+
monthFirstDay: o,
|
|
21
|
+
monthNumDays: p,
|
|
22
|
+
year: r,
|
|
23
|
+
setDate: c,
|
|
24
|
+
calenderProps: l.calenderProps,
|
|
25
|
+
selectedIndex: v,
|
|
26
|
+
setSelectedIndex: w,
|
|
27
|
+
selectedDate: y,
|
|
28
|
+
getDateFromIndex: d
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ b(F.Provider, { value: C, children: h });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
N as EventCalenderProvider
|
|
34
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "@fluentui/react-components";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../FlexBox/FlexBox.js";
|
|
5
|
+
import "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
6
|
+
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
7
|
+
import "./Context/EventCalenderContext.js";
|
|
8
|
+
import "./EventList.js";
|
|
9
|
+
import { D as s } from "../../Utilities-C0PUcYTL.js";
|
|
10
|
+
export {
|
|
11
|
+
s as Day
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "./Context/EventCalenderContext.js";
|
|
3
|
+
import { EventCalenderProvider as o } from "./Context/EventCalenderProvider.js";
|
|
4
|
+
import { Month as t } from "./Month.js";
|
|
5
|
+
const d = (e) => /* @__PURE__ */ r(o, { calenderProps: e, children: /* @__PURE__ */ r(t, {}) });
|
|
6
|
+
export {
|
|
7
|
+
d as EventCalender
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
3
|
+
import { eventCalenderContext as c } from "./Context/EventCalenderContext.js";
|
|
4
|
+
const m = (r) => {
|
|
5
|
+
const n = i.useContext(c), { calenderProps: { events: t } } = n, { date: s } = r, o = [];
|
|
6
|
+
return t == null || t.forEach((e) => {
|
|
7
|
+
e.date.toDateString() == s.toDateString() && o.push(e);
|
|
8
|
+
}), /* @__PURE__ */ a("div", { children: o.length });
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
m as EventList
|
|
12
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as d, tokens as o, mergeClasses as m } from "@fluentui/react-components";
|
|
3
|
+
import c from "react";
|
|
4
|
+
import { ClassNames as p } from "../ClassNames.js";
|
|
5
|
+
import { FlexBox as f } from "../FlexBox/FlexBox.js";
|
|
6
|
+
import "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
7
|
+
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
8
|
+
import { Section as u } from "../Section/Section.js";
|
|
9
|
+
import { eventCalenderContext as g } from "./Context/EventCalenderContext.js";
|
|
10
|
+
import { MonthPicker as h } from "./MonthPicker.js";
|
|
11
|
+
import { U as s } from "../../Utilities-C0PUcYTL.js";
|
|
12
|
+
import { WeekdayLabels as b } from "./WeekdayLabel.js";
|
|
13
|
+
const C = d({
|
|
14
|
+
root: {
|
|
15
|
+
backgroundColor: o.colorNeutralBackground1,
|
|
16
|
+
borderRadius: o.borderRadiusSmall,
|
|
17
|
+
boxSizing: "border-box",
|
|
18
|
+
padding: o.spacingHorizontalXXS
|
|
19
|
+
},
|
|
20
|
+
fill: {
|
|
21
|
+
height: "100%",
|
|
22
|
+
width: "100%"
|
|
23
|
+
},
|
|
24
|
+
medium: {
|
|
25
|
+
height: "fit-content",
|
|
26
|
+
width: "fit-content"
|
|
27
|
+
},
|
|
28
|
+
small: {
|
|
29
|
+
height: "fit-content",
|
|
30
|
+
width: "fit-content"
|
|
31
|
+
},
|
|
32
|
+
default: {
|
|
33
|
+
backgroundColor: o.colorNeutralForeground1
|
|
34
|
+
},
|
|
35
|
+
brand: {
|
|
36
|
+
backgroundColor: o.colorBrandBackground
|
|
37
|
+
}
|
|
38
|
+
}), M = () => {
|
|
39
|
+
const e = c.useContext(g), { calenderProps: n } = e, t = C(), a = s.buildWeeks(e), i = s.getClassNames(t, n);
|
|
40
|
+
return /* @__PURE__ */ r(u, { className: m(p.EventCalender, t.root, i), appearance: "borderless", children: /* @__PURE__ */ l(f, { fill: !0, childrenGap: 1, children: [
|
|
41
|
+
/* @__PURE__ */ r(h, {}),
|
|
42
|
+
/* @__PURE__ */ r(b, {}),
|
|
43
|
+
a
|
|
44
|
+
] }) });
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
M as Month
|
|
48
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as b, tokens as h, Text as p, Popover as f, PopoverTrigger as w, Button as a, PopoverSurface as v, Divider as N } from "@fluentui/react-components";
|
|
3
|
+
import k from "react";
|
|
4
|
+
import { FlexBox as l } from "../FlexBox/FlexBox.js";
|
|
5
|
+
import { FlexBoxItem as d } from "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
6
|
+
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
7
|
+
import { eventCalenderContext as z } from "./Context/EventCalenderContext.js";
|
|
8
|
+
import { U as u, m as C } from "../../Utilities-C0PUcYTL.js";
|
|
9
|
+
import { c as x, d as D } from "../../chunk-3-CMb_cR4A.js";
|
|
10
|
+
const B = b({
|
|
11
|
+
root: {
|
|
12
|
+
backgroundColor: h.colorNeutralBackground1,
|
|
13
|
+
paddingLeft: h.spacingHorizontalS
|
|
14
|
+
},
|
|
15
|
+
month: {
|
|
16
|
+
maxHeight: "40px",
|
|
17
|
+
minHeight: "40px",
|
|
18
|
+
height: "40px",
|
|
19
|
+
maxWidth: "40px",
|
|
20
|
+
minWidth: "40px",
|
|
21
|
+
width: "40px"
|
|
22
|
+
},
|
|
23
|
+
popoverFlexBox: {
|
|
24
|
+
maxWidth: "160px"
|
|
25
|
+
}
|
|
26
|
+
}), W = () => {
|
|
27
|
+
const r = k.useContext(z), { calenderProps: { size: g }, year: t, month: o } = r, { strings: m } = r.calenderProps, s = B(), n = {
|
|
28
|
+
weight: "regular",
|
|
29
|
+
size: 300
|
|
30
|
+
};
|
|
31
|
+
return g == "fill" && (n.weight = "bold", n.size = 600), /* @__PURE__ */ i(l, { horizontal: !0, alignItems: "center", className: s.root, children: [
|
|
32
|
+
/* @__PURE__ */ e(d, { grow: 1, children: /* @__PURE__ */ e(p, { ...n, children: u.getMonthName(o, m) }) }),
|
|
33
|
+
/* @__PURE__ */ e(p, { ...n, children: t }),
|
|
34
|
+
/* @__PURE__ */ i(f, { inline: !0, positioning: "below-end", withArrow: !0, size: "small", children: [
|
|
35
|
+
/* @__PURE__ */ e(w, { disableButtonEnhancement: !0, children: /* @__PURE__ */ e(a, { icon: /* @__PURE__ */ e(x, {}), appearance: "subtle" }) }),
|
|
36
|
+
/* @__PURE__ */ e(v, { tabIndex: -1, children: /* @__PURE__ */ i(l, { className: s.popoverFlexBox, children: [
|
|
37
|
+
/* @__PURE__ */ i(l, { horizontal: !0, children: [
|
|
38
|
+
/* @__PURE__ */ e(d, { grow: 1, children: /* @__PURE__ */ e(p, { children: t }) }),
|
|
39
|
+
/* @__PURE__ */ e(a, { icon: /* @__PURE__ */ e(D, {}), appearance: "subtle", onClick: () => {
|
|
40
|
+
r.setDate(new Date(t + 1, o, 1));
|
|
41
|
+
} }),
|
|
42
|
+
/* @__PURE__ */ e(a, { icon: /* @__PURE__ */ e(x, {}), appearance: "subtle", onClick: () => {
|
|
43
|
+
r.setDate(new Date(t - 1, o, 1));
|
|
44
|
+
} })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ e(N, {}),
|
|
47
|
+
/* @__PURE__ */ e(l, { horizontal: !0, wrap: !0, children: Object.keys(C).map((c) => /* @__PURE__ */ e(
|
|
48
|
+
a,
|
|
49
|
+
{
|
|
50
|
+
appearance: Number(c) == o ? "primary" : "subtle",
|
|
51
|
+
className: s.month,
|
|
52
|
+
size: "small",
|
|
53
|
+
onClick: () => {
|
|
54
|
+
r.setDate(new Date(t, Number(c), 1));
|
|
55
|
+
},
|
|
56
|
+
children: u.getMonthName(Number(c), m).substring(0, 3)
|
|
57
|
+
}
|
|
58
|
+
)) })
|
|
59
|
+
] }) })
|
|
60
|
+
] })
|
|
61
|
+
] });
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
W as MonthPicker
|
|
65
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../FlexBox/FlexBox.js";
|
|
4
|
+
import "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
5
|
+
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
6
|
+
import "./Context/EventCalenderContext.js";
|
|
7
|
+
import { W as a } from "../../Utilities-C0PUcYTL.js";
|
|
8
|
+
export {
|
|
9
|
+
a as Week
|
|
10
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as i, tokens as o, Text as m } from "@fluentui/react-components";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import { FlexBox as d } from "../FlexBox/FlexBox.js";
|
|
5
|
+
import { FlexBoxItem as c } from "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
6
|
+
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
7
|
+
import { eventCalenderContext as p } from "./Context/EventCalenderContext.js";
|
|
8
|
+
import { U as a, d as x } from "../../Utilities-C0PUcYTL.js";
|
|
9
|
+
const u = i({
|
|
10
|
+
small: {
|
|
11
|
+
width: "35px"
|
|
12
|
+
},
|
|
13
|
+
medium: {
|
|
14
|
+
width: "60px"
|
|
15
|
+
},
|
|
16
|
+
fill: {
|
|
17
|
+
flexGrow: 1,
|
|
18
|
+
flexBasis: "0px"
|
|
19
|
+
},
|
|
20
|
+
label: {
|
|
21
|
+
backgroundColor: o.colorNeutralBackground1,
|
|
22
|
+
borderRadius: o.borderRadiusSmall,
|
|
23
|
+
boxSizing: "border-box",
|
|
24
|
+
padding: o.spacingHorizontalXXS
|
|
25
|
+
}
|
|
26
|
+
}), y = () => {
|
|
27
|
+
const r = n.useContext(p), t = u(), l = a.getSizeClass(t, r.calenderProps, t.label);
|
|
28
|
+
return /* @__PURE__ */ e(d, { horizontal: !0, childrenGap: 1, children: Object.keys(x).map((s) => /* @__PURE__ */ e(c, { className: l, children: /* @__PURE__ */ e(m, { children: a.getDayName(s, r) }) }, s)) });
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
y as WeekdayLabels
|
|
32
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { FlexBox as l } from "../FlexBox/FlexBox.js";
|
|
4
|
+
import "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
5
|
+
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
6
|
+
import { eventCalenderContext as p } from "./Context/EventCalenderContext.js";
|
|
7
|
+
import { Button as n, Text as c } from "@fluentui/react-components";
|
|
8
|
+
import { d as m, c as s } from "../../chunk-3-CMb_cR4A.js";
|
|
9
|
+
const v = () => {
|
|
10
|
+
const e = t.useContext(p), r = t.useCallback((a) => {
|
|
11
|
+
e.setDate(new Date(a, e.month, 1));
|
|
12
|
+
}, [e]);
|
|
13
|
+
return /* @__PURE__ */ i(l, { horizontal: !0, children: [
|
|
14
|
+
/* @__PURE__ */ o(n, { appearance: "subtle", icon: /* @__PURE__ */ o(m, {}), onClick: () => r(e.year + 1) }),
|
|
15
|
+
/* @__PURE__ */ o(c, { weight: "bold", size: 300, children: e.year }),
|
|
16
|
+
/* @__PURE__ */ o(n, { appearance: "subtle", icon: /* @__PURE__ */ o(s, {}), onClick: () => r(e.year - 1) })
|
|
17
|
+
] });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
v as YearPicker
|
|
21
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles as i, mergeClasses as x } from "@fluentui/react-components";
|
|
3
3
|
import { ClassNames as c } from "../../ClassNames.js";
|
|
4
4
|
import { FlexBoxUtils as a } from "../FlexBoxUtils.js";
|
|
@@ -7,8 +7,8 @@ const n = i({
|
|
|
7
7
|
boxSizing: "border-box"
|
|
8
8
|
}
|
|
9
9
|
}), b = (e) => {
|
|
10
|
-
const { className: o, ref: s, id: t } = e, l = n(),
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
const { className: o, ref: s, id: t } = e, l = n(), m = a.buildFlexBoxItemStyles(e);
|
|
11
|
+
return /* @__PURE__ */ r("div", { id: t, className: x(c.FlexBoxItem, l.root, o), ...e, ref: s, style: m, children: e.children });
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
14
|
b as FlexBoxItem
|
|
@@ -8,7 +8,7 @@ import { Grid as Y, ColumnDefinition as K } from "../Grid/Grid.js";
|
|
|
8
8
|
import "../Grid/GridCell/GridCell.js";
|
|
9
9
|
import "../Grid/ResizableGridCell/ResizableGridCell.js";
|
|
10
10
|
import "../Grid/GridContext.js";
|
|
11
|
-
import {
|
|
11
|
+
import { Section as z } from "../Section/Section.js";
|
|
12
12
|
import { ClassNames as m } from "../ClassNames.js";
|
|
13
13
|
import { c as G } from "../../createFluentIcon-CwLxkjIW.js";
|
|
14
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({
|