@yourdash/uikit 1.0.33 → 1.0.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/dist/assets/box.css +4 -0
  2. package/dist/assets/button.css +4 -0
  3. package/dist/assets/buttonCombo.css +4 -0
  4. package/dist/assets/buttonLink.css +4 -0
  5. package/dist/assets/buttonWithIcon.css +4 -0
  6. package/dist/assets/card.css +4 -0
  7. package/dist/assets/carousel.css +4 -0
  8. package/dist/assets/container.css +4 -0
  9. package/dist/assets/contextMenuRoot.css +4 -0
  10. package/dist/assets/dialog.css +4 -0
  11. package/dist/assets/flex.css +4 -0
  12. package/dist/assets/header.css +7 -0
  13. package/dist/assets/heading.css +4 -0
  14. package/dist/assets/icon.css +4 -0
  15. package/dist/assets/iconButton.css +4 -0
  16. package/dist/assets/image.css +4 -0
  17. package/dist/assets/infiniteScroll.css +7 -0
  18. package/dist/assets/level.css +4 -0
  19. package/dist/assets/link.css +4 -0
  20. package/dist/assets/navBar.css +4 -0
  21. package/dist/assets/navImage.css +4 -0
  22. package/dist/assets/onBoarding.css +4 -0
  23. package/dist/assets/separator.css +4 -0
  24. package/dist/assets/sidebar.css +4 -0
  25. package/dist/assets/sidebarContainer.css +4 -0
  26. package/dist/assets/spinner.css +4 -0
  27. package/dist/assets/subtext.css +4 -0
  28. package/dist/assets/tag.css +4 -0
  29. package/dist/assets/textButton.css +4 -0
  30. package/dist/assets/textInput.css +4 -0
  31. package/dist/assets/toasts.css +4 -0
  32. package/dist/clippy-B98VypDQ.js +20 -0
  33. package/dist/components/box/box.js +13 -0
  34. package/dist/components/button/button.js +18 -0
  35. package/dist/components/buttonCombo/buttonCombo.js +8 -0
  36. package/dist/components/buttonLink/buttonLink.js +21 -0
  37. package/dist/components/buttonWithIcon/buttonWithIcon.js +29 -0
  38. package/dist/components/card/card.js +42 -0
  39. package/dist/components/container/container.js +13 -0
  40. package/dist/components/contextMenu/contextMenu.js +27 -0
  41. package/dist/components/contextMenu/contextMenuRoot.js +60 -0
  42. package/dist/components/contextMenu/contextMenuRootContext.js +11 -0
  43. package/dist/components/flex/flex.js +26 -0
  44. package/dist/components/heading/heading.js +29 -0
  45. package/dist/components/icon/icon.js +28 -0
  46. package/dist/components/icon/iconDictionary.js +287 -0
  47. package/dist/components/iconButton/iconButton.js +24 -0
  48. package/dist/components/image/image.js +56 -0
  49. package/dist/components/index.d.ts +2 -0
  50. package/dist/components/index.js +48 -0
  51. package/dist/components/link/link.js +26 -0
  52. package/dist/components/progressBar/progressBar.js +20 -0
  53. package/dist/components/redirect/redirect.js +11 -0
  54. package/dist/components/separator/separator.js +11 -0
  55. package/dist/components/spinner/spinner.js +30 -0
  56. package/dist/components/subtext/subtext.js +9 -0
  57. package/dist/components/tag/tag.js +15 -0
  58. package/dist/components/text/text.js +8 -0
  59. package/dist/components/textButton/textButton.js +16 -0
  60. package/dist/components/textInput/textInput.js +43 -0
  61. package/dist/core/decrementLevel.js +6 -0
  62. package/dist/core/incrementLevel.js +6 -0
  63. package/dist/core/index.js +10 -0
  64. package/dist/core/level.js +7 -0
  65. package/dist/core/remToPx.js +6 -0
  66. package/dist/core/root.js +19 -0
  67. package/dist/core/toasts/toast.js +1 -0
  68. package/dist/core/toasts/toastAction.js +1 -0
  69. package/dist/core/toasts/toastContext.js +9 -0
  70. package/dist/core/toasts/toasts.js +93 -0
  71. package/dist/core/toasts/useToast.js +13 -0
  72. package/dist/index-BJy4nmTN.js +52 -0
  73. package/dist/index-BoiKlAEs.js +30 -0
  74. package/dist/index-C9QO6nHU.js +10 -0
  75. package/dist/index-D4kASGu5.js +240 -0
  76. package/dist/index-Dj6g5px3.js +14 -0
  77. package/dist/level-o2-EzyQS.js +28 -0
  78. package/dist/server-error-lFyIkIwC.js +4 -0
  79. package/dist/uikit.js +8 -3717
  80. package/dist/utilityComponent/hasBeenShown/hasBeenShown.js +23 -0
  81. package/dist/utilityComponent/index.js +6 -0
  82. package/dist/utilityComponent/onInView/onInView.js +54 -0
  83. package/dist/views/carousel/carousel.js +102 -0
  84. package/dist/views/dialog/dialog.js +18 -0
  85. package/dist/views/header/header.js +21 -0
  86. package/dist/views/index.js +26 -0
  87. package/dist/views/infiniteScroll/infiniteScroll.js +62 -0
  88. package/dist/views/navBar/components/navImage/navImage.js +15 -0
  89. package/dist/views/navBar/components/navTitle/navTitle.js +12 -0
  90. package/dist/views/navBar/navBar.js +36 -0
  91. package/dist/views/onBoarding/onBoarding.js +125 -0
  92. package/dist/views/panAndZoom/panAndZoom.js +74 -0
  93. package/dist/views/sidebar/sidebar.js +24 -0
  94. package/dist/views/sidebar/sidebarContainer.js +34 -0
  95. package/dist/views/sidebar/sidebarContext.js +13 -0
  96. package/dist/views/sidebar/sidebarToggleButton.js +21 -0
  97. package/package.json +39 -29
  98. package/dist/defaultTheme.module.scss +0 -361
  99. package/dist/style.css +0 -10
  100. package/dist/themeValues.scss +0 -49
@@ -0,0 +1,23 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { useState as i, useRef as a, useEffect as l } from "react";
3
+ const v = ({ className: r, onSeen: t }) => {
4
+ const [s, o] = i(!1), e = a(null);
5
+ return l(() => {
6
+ if (!e.current) return;
7
+ const c = e.current, n = new IntersectionObserver((u) => {
8
+ u[0].isIntersecting && (t(), n.disconnect(), o(!0));
9
+ });
10
+ return n.observe(c), () => {
11
+ n.disconnect();
12
+ };
13
+ }, []), s ? null : /* @__PURE__ */ f(
14
+ "div",
15
+ {
16
+ ref: e,
17
+ className: r
18
+ }
19
+ );
20
+ };
21
+ export {
22
+ v as default
23
+ };
@@ -0,0 +1,6 @@
1
+ import { default as o } from "./hasBeenShown/hasBeenShown.js";
2
+ import { default as n } from "./onInView/onInView.js";
3
+ export {
4
+ o as HasBeenShown,
5
+ n as OnInView
6
+ };
@@ -0,0 +1,54 @@
1
+ import { jsx as I } from "react/jsx-runtime";
2
+ import { useRef as p, useEffect as x } from "react";
3
+ const R = ({ className: m, onEnterView: r, onLeaveView: t }) => {
4
+ const u = p(!1), s = p(null);
5
+ return x(() => {
6
+ if (!s.current) return;
7
+ const c = s.current, b = () => {
8
+ const { top: l, bottom: d, left: h, right: g } = c.getBoundingClientRect();
9
+ if (!u.current) {
10
+ if (l < 0) {
11
+ r == null || r("up"), u.current = !0;
12
+ return;
13
+ } else if (d > window.innerHeight) {
14
+ r == null || r("down"), u.current = !0;
15
+ return;
16
+ } else if (h < 0) {
17
+ r == null || r("left"), u.current = !0;
18
+ return;
19
+ } else if (g > window.innerWidth) {
20
+ r == null || r("right"), u.current = !0;
21
+ return;
22
+ }
23
+ }
24
+ if (l > window.innerHeight) {
25
+ t == null || t("down"), u.current = !1;
26
+ return;
27
+ } else if (d < 0) {
28
+ t == null || t("up"), u.current = !1;
29
+ return;
30
+ } else if (h > window.innerWidth) {
31
+ t == null || t("right"), u.current = !1;
32
+ return;
33
+ } else if (g < 0) {
34
+ t == null || t("left"), u.current = !1;
35
+ return;
36
+ }
37
+ }, f = new IntersectionObserver(() => {
38
+ b();
39
+ });
40
+ return f.observe(c), () => {
41
+ f.disconnect();
42
+ };
43
+ }, []), /* @__PURE__ */ I(
44
+ "div",
45
+ {
46
+ ref: s,
47
+ style: { height: 1, width: 1 },
48
+ className: m
49
+ }
50
+ );
51
+ };
52
+ export {
53
+ R as default
54
+ };
@@ -0,0 +1,102 @@
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as h, useState as _, useEffect as C } from "react";
3
+ import v from "../../components/card/card.js";
4
+ import b from "../../components/container/container.js";
5
+ import { UKIcon as m } from "../../components/icon/iconDictionary.js";
6
+ import u from "../../components/iconButton/iconButton.js";
7
+ import { c as d } from "../../clippy-B98VypDQ.js";
8
+ import '../../assets/carousel.css';const I = "_containerComponent_sue6z_6", E = "_component_sue6z_16", N = "_page_sue6z_34", R = "_controls_sue6z_48", w = "_indicator_sue6z_58", z = "_pageIndicator_sue6z_65", T = "_selected_sue6z_72", o = {
9
+ containerComponent: I,
10
+ component: E,
11
+ page: N,
12
+ controls: R,
13
+ indicator: w,
14
+ pageIndicator: z,
15
+ selected: T
16
+ }, j = ({ items: i, className: g }) => {
17
+ const c = h(null), [l, p] = _(0);
18
+ return C(() => {
19
+ const e = c.current;
20
+ if (!e) return;
21
+ console.log(Array.from(e.children));
22
+ let t, n = () => {
23
+ clearTimeout(t), t = setTimeout(function() {
24
+ Array.from(e.children).forEach((s, f) => {
25
+ if (Math.abs(
26
+ s.getBoundingClientRect().left + s.getBoundingClientRect().width / 2 - (e.getBoundingClientRect().left + e.getBoundingClientRect().width / 2)
27
+ ) < s.getBoundingClientRect().width / 2) {
28
+ p(f);
29
+ return;
30
+ }
31
+ });
32
+ }, 25);
33
+ };
34
+ return e.addEventListener("scroll", n), () => {
35
+ e.removeEventListener("scroll", n), clearTimeout(t);
36
+ };
37
+ }, []), /* @__PURE__ */ a(b, { className: d(o.containerComponent, g), children: [
38
+ /* @__PURE__ */ r(
39
+ "div",
40
+ {
41
+ className: o.component,
42
+ ref: c,
43
+ children: i.map((e) => /* @__PURE__ */ r(
44
+ "div",
45
+ {
46
+ className: o.page,
47
+ children: e.element
48
+ },
49
+ e.id
50
+ ))
51
+ }
52
+ ),
53
+ /* @__PURE__ */ a("div", { className: o.controls, children: [
54
+ /* @__PURE__ */ r(
55
+ u,
56
+ {
57
+ accessibleLabel: "previous page",
58
+ icon: m.ChevronLeft,
59
+ className: o.pageControl,
60
+ onClick: () => {
61
+ const e = c.current;
62
+ if (!e)
63
+ return;
64
+ const t = e.children[l - 1];
65
+ t && t.scrollIntoView({ behavior: "smooth" });
66
+ }
67
+ }
68
+ ),
69
+ /* @__PURE__ */ r(v, { className: o.indicator, children: i.map((e, t) => /* @__PURE__ */ r(
70
+ "button",
71
+ {
72
+ className: d(o.pageIndicator, t === l && o.selected),
73
+ onClick: () => {
74
+ const n = c.current;
75
+ if (!n)
76
+ return;
77
+ n.scrollIntoView({ behavior: "smooth" }), n.children[t].scrollIntoView({ behavior: "smooth" });
78
+ }
79
+ },
80
+ e.id
81
+ )) }),
82
+ /* @__PURE__ */ r(
83
+ u,
84
+ {
85
+ accessibleLabel: "next page",
86
+ icon: m.ChevronRight,
87
+ className: o.pageControl,
88
+ onClick: () => {
89
+ const e = c.current;
90
+ if (!e)
91
+ return;
92
+ const t = e.children[l + 1];
93
+ t && t.scrollIntoView({ behavior: "smooth" });
94
+ }
95
+ }
96
+ )
97
+ ] })
98
+ ] });
99
+ };
100
+ export {
101
+ j as default
102
+ };
@@ -0,0 +1,18 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import e from "../../components/card/card.js";
3
+ import '../../assets/dialog.css';const s = "_background_t6st2_26", d = "_backgroundFadeIn_t6st2_1", r = "_view_t6st2_39", c = "_fadeIn_t6st2_1", a = {
4
+ background: s,
5
+ backgroundFadeIn: d,
6
+ view: r,
7
+ fadeIn: c
8
+ }, u = ({ children: t, className: o }) => /* @__PURE__ */ n("div", { className: a.background, children: /* @__PURE__ */ n(
9
+ e,
10
+ {
11
+ containerClassName: a.view,
12
+ className: o,
13
+ children: t
14
+ }
15
+ ) });
16
+ export {
17
+ u as default
18
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as e, Fragment as a } from "react/jsx-runtime";
2
+ import i from "../../components/heading/heading.js";
3
+ import '../../assets/header.css';const n = "_view_1q1ur_10", s = {
4
+ view: n
5
+ }, o = ({ backgroundImage: r, heading: t }) => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
6
+ "div",
7
+ {
8
+ className: s.view,
9
+ style: r ? { backgroundImage: r } : { backgroundImage: "linear-gradient(-45deg, #ff8093aa, #ffd264aa)" },
10
+ children: /* @__PURE__ */ e(
11
+ i,
12
+ {
13
+ level: 1,
14
+ text: t
15
+ }
16
+ )
17
+ }
18
+ ) });
19
+ export {
20
+ o as default
21
+ };
@@ -0,0 +1,26 @@
1
+ import { default as o } from "./carousel/carousel.js";
2
+ import { default as t } from "./dialog/dialog.js";
3
+ import { default as d } from "./header/header.js";
4
+ import { default as m } from "./infiniteScroll/infiniteScroll.js";
5
+ import { default as s } from "./navBar/navBar.js";
6
+ import { default as x } from "./navBar/components/navImage/navImage.js";
7
+ import { default as n } from "./navBar/components/navTitle/navTitle.js";
8
+ import { default as S } from "./onBoarding/onBoarding.js";
9
+ import { default as v } from "./panAndZoom/panAndZoom.js";
10
+ import { default as N } from "./sidebar/sidebar.js";
11
+ import { default as I } from "./sidebar/sidebarContainer.js";
12
+ import { default as c } from "./sidebar/sidebarToggleButton.js";
13
+ export {
14
+ o as Carousel,
15
+ t as Dialog,
16
+ d as Header,
17
+ m as InfiniteScroll,
18
+ s as NavBar,
19
+ x as NavImage,
20
+ n as NavTitle,
21
+ S as OnBoarding,
22
+ v as PanAndZoom,
23
+ N as Sidebar,
24
+ I as SidebarContainer,
25
+ c as SidebarToggleButton
26
+ };
@@ -0,0 +1,62 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { c as u } from "../../clippy-B98VypDQ.js";
3
+ import d, { useState as p, useEffect as g } from "react";
4
+ import h from "../../components/heading/heading.js";
5
+ import I from "../../components/separator/separator.js";
6
+ import i from "../../components/text/text.js";
7
+ import '../../assets/infiniteScroll.css';const L = "_component_tlgec_10", P = "_items_tlgec_19", R = "_endOfItems_tlgec_23", s = {
8
+ component: L,
9
+ items: P,
10
+ endOfItems: R
11
+ }, E = ({ children: t, fetchNextPage: _, containerClassName: v, className: x, resetState: b }) => {
12
+ const o = d.useRef(null), n = d.useRef(-1), [m, r] = p(!1), [N, l] = p(!1);
13
+ g(() => {
14
+ n.current = -1, r(!1), l(!1), f();
15
+ }, [b]);
16
+ async function f() {
17
+ if (m) return;
18
+ r(!0);
19
+ const { hasAnotherPage: c } = await _(n.current + 1);
20
+ n.current++, r(!1), l(c || !1);
21
+ }
22
+ return g(() => {
23
+ if (!o.current) return;
24
+ const c = o.current;
25
+ new IntersectionObserver((O) => {
26
+ console.log("observer update"), O[0].isIntersecting && f();
27
+ }).observe(c);
28
+ }, []), /* @__PURE__ */ a("div", { className: u(v, s.component), children: [
29
+ (t == null ? void 0 : t.length) > 0 ? /* @__PURE__ */ e("div", { className: u(x, s.items), children: t }) : /* @__PURE__ */ a("div", { className: "text-center", children: [
30
+ /* @__PURE__ */ e(
31
+ h,
32
+ {
33
+ level: 1,
34
+ text: "Whoops."
35
+ }
36
+ ),
37
+ /* @__PURE__ */ e(I, { direction: "column" }),
38
+ /* @__PURE__ */ e(i, { text: "It looks like nothing could be found..." })
39
+ ] }),
40
+ /* @__PURE__ */ a(
41
+ "div",
42
+ {
43
+ ref: o,
44
+ className: s.endOfItems,
45
+ children: [
46
+ m && /* @__PURE__ */ e(i, { text: "Loading more content" }),
47
+ /* @__PURE__ */ e(I, { direction: "column" }),
48
+ N && /* @__PURE__ */ e(
49
+ i,
50
+ {
51
+ text: "No more items to load",
52
+ className: s.endOfItems
53
+ }
54
+ )
55
+ ]
56
+ }
57
+ )
58
+ ] });
59
+ };
60
+ export {
61
+ E as default
62
+ };
@@ -0,0 +1,15 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import t from "../../../../components/image/image.js";
3
+ import '../../../../assets/navImage.css';const n = "_component_q2khg_6", m = {
4
+ component: n
5
+ }, a = ({ src: o }) => /* @__PURE__ */ e(
6
+ t,
7
+ {
8
+ accessibleLabel: "",
9
+ src: o,
10
+ className: m.component
11
+ }
12
+ );
13
+ export {
14
+ a as default
15
+ };
@@ -0,0 +1,12 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import r from "../../../../components/heading/heading.js";
3
+ const i = ({ title: t }) => /* @__PURE__ */ e(
4
+ r,
5
+ {
6
+ text: t,
7
+ level: 2
8
+ }
9
+ );
10
+ export {
11
+ i as default
12
+ };
@@ -0,0 +1,36 @@
1
+ import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
+ import i from "../../components/box/box.js";
3
+ import n from "../../components/flex/flex.js";
4
+ import { c as a } from "../../clippy-B98VypDQ.js";
5
+ import '../../assets/navBar.css';const l = "_component_178hu_6", p = "_segment_178hu_20", e = {
6
+ component: l,
7
+ segment: p
8
+ }, f = ({ leftSection: s, centerSection: t, rightSection: m, className: r }) => /* @__PURE__ */ c(i, { className: a(e.component, r), children: [
9
+ /* @__PURE__ */ o(
10
+ n,
11
+ {
12
+ className: e.segment,
13
+ direction: "row",
14
+ children: s
15
+ }
16
+ ),
17
+ /* @__PURE__ */ o(
18
+ n,
19
+ {
20
+ className: e.segment,
21
+ direction: "row",
22
+ children: t
23
+ }
24
+ ),
25
+ /* @__PURE__ */ o(
26
+ n,
27
+ {
28
+ className: e.segment,
29
+ direction: "row",
30
+ children: m
31
+ }
32
+ )
33
+ ] });
34
+ export {
35
+ f as default
36
+ };
@@ -0,0 +1,125 @@
1
+ import { jsx as t, jsxs as d, Fragment as m } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import g from "../../components/card/card.js";
4
+ import { UKIcon as _ } from "../../components/icon/iconDictionary.js";
5
+ import f from "../../components/iconButton/iconButton.js";
6
+ import h from "../../components/image/image.js";
7
+ import p from "../../components/heading/heading.js";
8
+ import u from "../../components/text/text.js";
9
+ import b from "../../components/buttonWithIcon/buttonWithIcon.js";
10
+ import k from "../../components/button/button.js";
11
+ import { O as I } from "../../index-D4kASGu5.js";
12
+ import B from "../../components/flex/flex.js";
13
+ import { c as i } from "../../clippy-B98VypDQ.js";
14
+ import '../../assets/onBoarding.css';const C = "_page_107gf_6", x = "_fadeIn_107gf_1", N = "_card_107gf_40", y = "_cardContainer_107gf_51", v = "_goBackButton_107gf_55", w = "_headerImage_107gf_61", T = "_header_107gf_61", L = "_body_107gf_70", a = {
15
+ page: C,
16
+ fadeIn: x,
17
+ card: N,
18
+ cardContainer: y,
19
+ goBackButton: v,
20
+ headerImage: w,
21
+ header: T,
22
+ body: L
23
+ }, R = ({ pages: c, meta: s }) => {
24
+ const [o, r] = l.useState(0), n = c[o];
25
+ return localStorage.getItem(`yourdash-application-visited-${s.id}`) || o > c.length - 1 ? (localStorage.setItem(`yourdash-application-visited-${s.id}`, "true"), /* @__PURE__ */ t(I, {})) : /* @__PURE__ */ t("div", { className: a.page, children: /* @__PURE__ */ d(
26
+ g,
27
+ {
28
+ className: a.card,
29
+ containerClassName: a.cardContainer,
30
+ children: [
31
+ n.allowGoBack && /* @__PURE__ */ t(
32
+ f,
33
+ {
34
+ className: i(a.goBackButton, "animate__animated animate__fadeInDown"),
35
+ accessibleLabel: "Go back to the last page",
36
+ icon: _.ChevronLeft,
37
+ onClick: () => {
38
+ r(o - 1);
39
+ }
40
+ }
41
+ ),
42
+ /* @__PURE__ */ t(
43
+ h,
44
+ {
45
+ className: a.headerImage,
46
+ src: n.headerImage,
47
+ accessibleLabel: ""
48
+ }
49
+ ),
50
+ /* @__PURE__ */ t(
51
+ p,
52
+ {
53
+ className: a.header,
54
+ text: n.header
55
+ }
56
+ ),
57
+ /* @__PURE__ */ t(
58
+ u,
59
+ {
60
+ className: a.body,
61
+ text: n.body
62
+ }
63
+ ),
64
+ /* @__PURE__ */ t(
65
+ B,
66
+ {
67
+ className: a.actions,
68
+ direction: "row",
69
+ children: n.actions.map((e) => e.icon ? /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(
70
+ b,
71
+ {
72
+ className: i(a.action, a.actionWithIcon, "animate__animated animate__fadeInUp"),
73
+ text: e.label,
74
+ icon: e.icon,
75
+ onClick: () => {
76
+ if (e.onClick(), e.changeTo)
77
+ switch (e.changeTo) {
78
+ case "next":
79
+ r(o + 1);
80
+ break;
81
+ case "previous":
82
+ o > 0 && r(o - 1);
83
+ break;
84
+ case "remain":
85
+ break;
86
+ case "completed":
87
+ r(c.length + 1);
88
+ break;
89
+ }
90
+ }
91
+ },
92
+ e.label
93
+ ) }) : /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(
94
+ k,
95
+ {
96
+ className: i(a.action, a.actionWithoutIcon, "animate__animated animate__fadeInUp"),
97
+ text: e.label,
98
+ onClick: () => {
99
+ if (e.onClick(), e.changeTo)
100
+ switch (e.changeTo) {
101
+ case "next":
102
+ r(o + 1);
103
+ break;
104
+ case "previous":
105
+ o > 0 && r(o - 1);
106
+ break;
107
+ case "remain":
108
+ break;
109
+ case "completed":
110
+ r(c.length + 1);
111
+ break;
112
+ }
113
+ }
114
+ },
115
+ e.icon
116
+ ) }))
117
+ }
118
+ )
119
+ ]
120
+ }
121
+ ) });
122
+ };
123
+ export {
124
+ R as default
125
+ };
@@ -0,0 +1,74 @@
1
+ import { jsx as T } from "react/jsx-runtime";
2
+ import { useRef as P, useState as m, useEffect as x } from "react";
3
+ const W = ({
4
+ children: g,
5
+ minZoom: Y,
6
+ maxZoom: E,
7
+ onScaleChange: p
8
+ }) => {
9
+ const X = P(null), [l, f] = m(0), [d, v] = m(0), [c, M] = m(1);
10
+ return p && x(() => {
11
+ p(c);
12
+ }, [c]), /* @__PURE__ */ T(
13
+ "div",
14
+ {
15
+ ref: X,
16
+ style: {
17
+ width: "100%",
18
+ height: "100%",
19
+ overflow: "hidden",
20
+ display: "flex",
21
+ alignItems: "center",
22
+ justifyContent: "center"
23
+ },
24
+ onWheel: (t) => {
25
+ t.stopPropagation();
26
+ const e = t.deltaY, n = c + e / 1e3;
27
+ M(Math.min(Math.max(n, Y ?? 0.1), E ?? 10));
28
+ },
29
+ onMouseDown: (t) => {
30
+ t.stopPropagation();
31
+ const e = t.clientX, n = t.clientY, i = l, r = d, s = (o) => {
32
+ o.stopPropagation();
33
+ const u = o.clientX - e, h = o.clientY - n;
34
+ f(i + u), v(r + h);
35
+ }, a = () => {
36
+ t.stopPropagation(), document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", a);
37
+ };
38
+ document.addEventListener("mousemove", s), document.addEventListener("mouseup", a);
39
+ },
40
+ onTouchStart: (t) => {
41
+ t.stopPropagation();
42
+ const e = t.touches, n = l, i = d, r = (a) => {
43
+ a.stopPropagation();
44
+ const o = a.touches, u = o[0].clientX - e[0].clientX, h = o[0].clientY - e[0].clientY;
45
+ f(n + u), v(i + h);
46
+ }, s = () => {
47
+ t.stopPropagation(), document.removeEventListener("touchmove", r), document.removeEventListener("touchend", s);
48
+ };
49
+ document.addEventListener("touchmove", r), document.addEventListener("touchend", s);
50
+ },
51
+ onDragStart: (t) => {
52
+ t.stopPropagation(), t.preventDefault();
53
+ },
54
+ onContextMenu: (t) => {
55
+ t.preventDefault(), t.stopPropagation();
56
+ },
57
+ children: /* @__PURE__ */ T(
58
+ "div",
59
+ {
60
+ style: {
61
+ transform: `translate(${l}px, ${d}px) scale(${c})`,
62
+ transformOrigin: "center center",
63
+ maxWidth: "max-content",
64
+ pointerEvents: "none"
65
+ },
66
+ children: g
67
+ }
68
+ )
69
+ }
70
+ );
71
+ };
72
+ export {
73
+ W as default
74
+ };
@@ -0,0 +1,24 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c as s } from "../../clippy-B98VypDQ.js";
3
+ import m from "../../components/flex/flex.js";
4
+ import p from "../../core/incrementLevel.js";
5
+ import { u as c, a as i } from "../../level-o2-EzyQS.js";
6
+ import l from "./sidebarContext.js";
7
+ import { useContext as a } from "react";
8
+ import '../../assets/sidebar.css';const d = "_component_kdw27_10", f = "_open_kdw27_40", e = {
9
+ component: d,
10
+ open: f
11
+ }, k = ({ children: t }) => {
12
+ const n = a(l), r = c();
13
+ return /* @__PURE__ */ o(p, { children: /* @__PURE__ */ o(
14
+ m,
15
+ {
16
+ direction: "column",
17
+ className: s(e.component, n.isOpen && e.open, i(r + 1)),
18
+ children: t
19
+ }
20
+ ) });
21
+ };
22
+ export {
23
+ k as default
24
+ };
@@ -0,0 +1,34 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useState as s } from "react";
3
+ import a from "./sidebarContext.js";
4
+ import { c } from "../../clippy-B98VypDQ.js";
5
+ import '../../assets/sidebarContainer.css';const m = "_component_3jgyq_10", p = {
6
+ component: m
7
+ }, f = ({
8
+ children: r,
9
+ showSidebarByDefault: n,
10
+ className: i
11
+ }) => {
12
+ const [o, e] = s(n || !0);
13
+ return /* @__PURE__ */ t(
14
+ a.Provider,
15
+ {
16
+ value: {
17
+ closeSidebar: () => {
18
+ e(!1);
19
+ },
20
+ toggleSidebar: () => {
21
+ e(!o);
22
+ },
23
+ openSidebar: () => {
24
+ e(!0);
25
+ },
26
+ isOpen: o
27
+ },
28
+ children: /* @__PURE__ */ t("div", { className: c(p.component, i), children: r })
29
+ }
30
+ );
31
+ };
32
+ export {
33
+ f as default
34
+ };
@@ -0,0 +1,13 @@
1
+ import { createContext as e } from "react";
2
+ const o = e({
3
+ openSidebar: () => {
4
+ },
5
+ closeSidebar: () => {
6
+ },
7
+ toggleSidebar: () => {
8
+ },
9
+ isOpen: !0
10
+ });
11
+ export {
12
+ o as default
13
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useContext as t } from "react";
3
+ import { UKIcon as e } from "../../components/icon/iconDictionary.js";
4
+ import i from "./sidebarContext.js";
5
+ import a from "../../components/iconButton/iconButton.js";
6
+ const l = () => {
7
+ const o = t(i);
8
+ return /* @__PURE__ */ r(
9
+ a,
10
+ {
11
+ accessibleLabel: o.isOpen ? "Collapse Sidebar" : "Expand Sidebar",
12
+ icon: o.isOpen ? e.SidebarCollapse : e.SidebarExpand,
13
+ onClick: () => {
14
+ o.toggleSidebar();
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ l as default
21
+ };