@5ive-souls/controls 0.0.2 → 0.0.4

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.
Files changed (38) hide show
  1. package/dist/5ive-souls-controls-0.0.4.tgz +0 -0
  2. package/dist/Utilities-C0PUcYTL.js +157 -0
  3. package/dist/chunk-3-CMb_cR4A.js +11 -0
  4. package/dist/components/ClassNames.js +1 -1
  5. package/dist/components/EventCalender/Context/EventCalenderContext.js +5 -0
  6. package/dist/components/EventCalender/Context/EventCalenderProvider.js +34 -0
  7. package/dist/components/EventCalender/Context/EventProviderProps.js +0 -0
  8. package/dist/components/EventCalender/Context/index.js +6 -0
  9. package/dist/components/EventCalender/Day.js +12 -0
  10. package/dist/components/EventCalender/EventCalender.js +8 -0
  11. package/dist/components/EventCalender/EventList.js +12 -0
  12. package/dist/components/EventCalender/Month.js +48 -0
  13. package/dist/components/EventCalender/MonthPicker.js +65 -0
  14. package/dist/components/EventCalender/Utilities.js +8 -0
  15. package/dist/components/EventCalender/Week.js +10 -0
  16. package/dist/components/EventCalender/WeekdayLabel.js +32 -0
  17. package/dist/components/EventCalender/YearPicker.js +21 -0
  18. package/dist/components/EventCalender/index.js +4 -0
  19. package/dist/components/EventCalender/interfaces/CalenderItemProps.js +0 -0
  20. package/dist/components/EventCalender/interfaces/Event.js +0 -0
  21. package/dist/components/EventCalender/interfaces/EventCalenderProps.js +0 -0
  22. package/dist/components/EventCalender/interfaces/EventCalenderStrings.js +0 -0
  23. package/dist/components/EventCalender/interfaces/index.js +0 -0
  24. package/dist/components/FlexBox/FlexBox.js +5 -5
  25. package/dist/components/FlexBox/FlexBoxItem/FlexBoxItem.js +3 -3
  26. package/dist/components/Grid/Grid.js +30 -30
  27. package/dist/components/JumpList/JumpList.js +178 -0
  28. package/dist/components/JumpList/index.js +4 -0
  29. package/dist/components/Section/Section.js +750 -9
  30. package/dist/components/Section/SectionUtils.js +8 -5
  31. package/dist/components/Section/index.js +1 -1
  32. package/dist/components/Wizard/Wizard.js +16 -15
  33. package/dist/components/index.js +21 -19
  34. package/dist/main.d.ts +53 -0
  35. package/dist/main.js +21 -19
  36. package/package.json +1 -1
  37. package/dist/5ive-souls-controls-0.0.2.tgz +0 -0
  38. package/dist/Section-Br38kDAa.js +0 -754
@@ -1,13 +1,16 @@
1
1
  import { tokens as s } from "@fluentui/react-components";
2
- import { GridUtils as a } from "../Grid/GridUtils.js";
3
- import { FlexBoxUtils as d } from "../FlexBox/FlexBoxUtils.js";
2
+ import { GridUtils as c } from "../Grid/GridUtils.js";
3
+ import { FlexBoxUtils as n } from "../FlexBox/FlexBoxUtils.js";
4
4
  const r = class r {
5
5
  };
6
- r.buildSectionStyles = (l) => {
7
- const { flexBoxItemProps: e, cellProps: t, scrollable: c } = l, o = {
6
+ r.buildSectionStyles = (e) => {
7
+ const { flexBoxItemProps: t, cellProps: o } = e, l = {};
8
+ return o && c.buildGridCellStyles(o, l), t && n.buildFlexBoxItemStyles(t, l), Object.assign({}, e.style, l);
9
+ }, r.buildSectionContentStyles = (e) => {
10
+ const { scrollable: t } = e, o = {
8
11
  scrollbarColor: s.colorBrandForeground1 + " " + s.colorNeutralBackground2
9
12
  };
10
- return c && (o.overflow = "auto"), t && a.buildGridCellStyles(t, o), e && d.buildFlexBoxItemStyles(e, o), Object.assign({}, l.style, o);
13
+ return t ? o.overflow = "auto" : o.overflow = "hidden", Object.assign({}, e.style, o);
11
14
  };
12
15
  let i = r;
13
16
  export {
@@ -1,4 +1,4 @@
1
- import { S as r } from "../../Section-Br38kDAa.js";
1
+ import { Section as r } from "./Section.js";
2
2
  export {
3
3
  r as Section
4
4
  };
@@ -5,7 +5,8 @@ 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-Br38kDAa.js";
8
+ import { Section as H } from "../Section/Section.js";
9
+ import { C as J, a as K, b as M } from "../../chunk-3-CMb_cR4A.js";
9
10
  const O = A({
10
11
  root: {
11
12
  height: "100%",
@@ -15,31 +16,31 @@ const O = A({
15
16
  currentBreadCrumb: {
16
17
  color: h.colorBrandForeground1
17
18
  }
18
- }), te = (x) => {
19
- const { children: g, onNavigatePanel: o, onSubmit: v, readonly: B, className: S, ref: k, asForm: N, strings: t, id: y } = x, s = O(), c = C.Children.toArray(g), [i, l] = C.useState(0), I = (r) => {
20
- o && !o(i, r) || l(r);
19
+ }), ie = (x) => {
20
+ const { children: g, onNavigatePanel: n, onSubmit: v, readonly: B, className: S, ref: k, asForm: N, strings: t, id: y } = x, s = O(), c = C.Children.toArray(g), [i, l] = C.useState(0), I = (r) => {
21
+ n && !n(i, r) || l(r);
21
22
  }, a = [];
22
- c.forEach((r, n) => {
23
+ c.forEach((r, o) => {
23
24
  const z = r.props;
24
- n > 0 && a.push(/* @__PURE__ */ e(L, {}, "Breadcrumb-divider-" + n)), a.push(/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
25
+ o > 0 && a.push(/* @__PURE__ */ e(L, {}, "Breadcrumb-divider-" + o)), a.push(/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
25
26
  R,
26
27
  {
27
28
  type: "button",
28
29
  onClick: () => {
29
- I(n);
30
+ I(o);
30
31
  },
31
- current: i === n,
32
- className: i === n ? s.currentBreadCrumb : "",
32
+ current: i === o,
33
+ className: i === o ? s.currentBreadCrumb : "",
33
34
  children: z.title
34
35
  }
35
- ) }, "Breadcrumb-" + n));
36
+ ) }, "Breadcrumb-" + o));
36
37
  });
37
38
  const P = i === 0, F = () => {
38
39
  const r = i - 1;
39
- o && !o(i, r) || l(r);
40
+ n && !n(i, r) || l(r);
40
41
  }, b = i === c.length - 1, w = () => {
41
42
  const r = i + 1;
42
- o && !o(i, r) || l(r);
43
+ n && !n(i, r) || l(r);
43
44
  };
44
45
  return /* @__PURE__ */ e("div", { id: y, className: V(q.Wizard, s.root, S), ref: k, children: /* @__PURE__ */ e(H, { className: s.root, children: /* @__PURE__ */ d(f, { fill: !0, children: [
45
46
  c.length > 1 && /* @__PURE__ */ d(m, { children: [
@@ -53,8 +54,8 @@ const O = A({
53
54
  activeIndex: i,
54
55
  whitespace: !0,
55
56
  align: "center",
56
- onActiveIndexChange: (r, n) => l(n.index),
57
- children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(W, { children: c.map((r, n) => /* @__PURE__ */ e(G, { children: r }, n)) }) })
57
+ onActiveIndexChange: (r, o) => l(o.index),
58
+ children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(W, { children: c.map((r, o) => /* @__PURE__ */ e(G, { children: r }, o)) }) })
58
59
  }
59
60
  ) }),
60
61
  /* @__PURE__ */ e(m, { children: /* @__PURE__ */ d(f, { horizontal: !0, childrenGap: h.spacingVerticalS, itemProps: { padding: h.spacingVerticalS }, children: [
@@ -95,5 +96,5 @@ const O = A({
95
96
  ] }) }) });
96
97
  };
97
98
  export {
98
- te as Wizard
99
+ ie as Wizard
99
100
  };
@@ -5,25 +5,26 @@ import { SectionBuilder as l } from "./DynamicForm/Builder/Section/SectionBuilde
5
5
  import { Device as c } from "./FiveSoulsProvider/FiveSouls.Types.js";
6
6
  import { FiveSoulsProvider as d } from "./FiveSoulsProvider/FiveSoulsProvider.js";
7
7
  import { deviceContext as D } from "./FiveSoulsProvider/deviceContext.js";
8
- import { useDevice as h } from "./FiveSoulsProvider/useDevice.js";
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 g } from "./FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
12
- import { ColumnDefinition as z, Grid as C, RowDefinition as L } from "./Grid/Grid.js";
13
- import { GridCell as S } from "./Grid/GridCell/GridCell.js";
14
- import { ResizableGridCell as P } from "./Grid/ResizableGridCell/ResizableGridCell.js";
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
+ import { GridCell as G } from "./Grid/GridCell/GridCell.js";
14
+ import { ResizableGridCell as S } 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-Br38kDAa.js";
18
- import { ThemePicker as q } from "./ThemePicker/ThemePicker.js";
19
- import { cornflower as E, cornflowerDark as H, cornflowerLight as J } from "./ThemePicker/Themes/Cornflower/Cornflower.js";
17
+ import { Section as b } from "./Section/Section.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
- z as ColumnDefinition,
27
+ w as ColumnDefinition,
27
28
  c as Device,
28
29
  t as DynamicForm,
29
30
  m as DynamicFormBuilder,
@@ -31,20 +32,21 @@ export {
31
32
  d as FiveSoulsProvider,
32
33
  B as FlexBox,
33
34
  v as FlexBoxItem,
34
- g as FlexBoxItemResizer,
35
- C as Grid,
36
- S as GridCell,
37
- P as ResizableGridCell,
35
+ L as FlexBoxItemResizer,
36
+ z as Grid,
37
+ G as GridCell,
38
+ mr as JumpList,
39
+ S as ResizableGridCell,
38
40
  T as RichText,
39
- L as RowDefinition,
41
+ C as RowDefinition,
40
42
  b as Section,
41
43
  l as SectionBuilder,
42
- q as ThemePicker,
44
+ j as ThemePicker,
43
45
  or as Wizard,
44
46
  tr as WizardPanel,
45
- E as cornflower,
46
- H as cornflowerDark,
47
- J as cornflowerLight,
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
- h as useDevice
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.
@@ -427,6 +465,10 @@ export declare interface ISectionProps extends IComponentProps {
427
465
  * Collection of properties to be used when this section is rendered as a child of the `FlexBox` component.
428
466
  */
429
467
  flexBoxItemProps?: IFlexBoxItemProps;
468
+ /**
469
+ *
470
+ */
471
+ appearance?: "default" | "borderless";
430
472
  }
431
473
 
432
474
  export declare interface IThemePickerProps extends IComponentProps {
@@ -532,6 +574,17 @@ declare interface IWizardStrings {
532
574
  submit?: string;
533
575
  }
534
576
 
577
+ /**
578
+ * The `JumpList` component display a collection of items, that will then be grouped by the first letter of their `headerProp`.
579
+ * 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.
580
+ *
581
+ * > The `JumpList` component supports a generic type argument that defines the type of items expected.
582
+ * > T define the generic type, use the following syntax.
583
+ * >
584
+ * > `<JumpList<TItemType> items={[]} headerProp="name" />`
585
+ */
586
+ export declare const JumpList: <T extends object>(props: IJumpListProps<T>) => JSX_2.Element;
587
+
535
588
  /**
536
589
  * 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
590
  * 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
@@ -5,25 +5,26 @@ import { SectionBuilder as l } from "./components/DynamicForm/Builder/Section/Se
5
5
  import { Device as c } from "./components/FiveSoulsProvider/FiveSouls.Types.js";
6
6
  import { FiveSoulsProvider as d } from "./components/FiveSoulsProvider/FiveSoulsProvider.js";
7
7
  import { deviceContext as D } from "./components/FiveSoulsProvider/deviceContext.js";
8
- import { useDevice as h } from "./components/FiveSoulsProvider/useDevice.js";
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 g } from "./components/FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
12
- import { ColumnDefinition as z, Grid as C, RowDefinition as L } from "./components/Grid/Grid.js";
13
- import { GridCell as S } from "./components/Grid/GridCell/GridCell.js";
14
- import { ResizableGridCell as P } from "./components/Grid/ResizableGridCell/ResizableGridCell.js";
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
+ import { GridCell as G } from "./components/Grid/GridCell/GridCell.js";
14
+ import { ResizableGridCell as S } 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-Br38kDAa.js";
18
- import { ThemePicker as q } from "./components/ThemePicker/ThemePicker.js";
19
- import { cornflower as E, cornflowerDark as H, cornflowerLight as J } from "./components/ThemePicker/Themes/Cornflower/Cornflower.js";
17
+ import { Section as b } from "./components/Section/Section.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
- z as ColumnDefinition,
27
+ w as ColumnDefinition,
27
28
  c as Device,
28
29
  t as DynamicForm,
29
30
  m as DynamicFormBuilder,
@@ -31,20 +32,21 @@ export {
31
32
  d as FiveSoulsProvider,
32
33
  B as FlexBox,
33
34
  v as FlexBoxItem,
34
- g as FlexBoxItemResizer,
35
- C as Grid,
36
- S as GridCell,
37
- P as ResizableGridCell,
35
+ L as FlexBoxItemResizer,
36
+ z as Grid,
37
+ G as GridCell,
38
+ mr as JumpList,
39
+ S as ResizableGridCell,
38
40
  T as RichText,
39
- L as RowDefinition,
41
+ C as RowDefinition,
40
42
  b as Section,
41
43
  l as SectionBuilder,
42
- q as ThemePicker,
44
+ j as ThemePicker,
43
45
  or as Wizard,
44
46
  tr as WizardPanel,
45
- E as cornflower,
46
- H as cornflowerDark,
47
- J as cornflowerLight,
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
- h as useDevice
60
+ F as useDevice
59
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5ive-souls/controls",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Collection of react components built on the Fluent UI framework.",
5
5
  "keywords": [
6
6
  "react",
Binary file