@wrdagency/blockout 0.0.19 → 0.1.1

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 (166) hide show
  1. package/dist/2NBKRL7C-BAzCMGOw.js +85 -0
  2. package/dist/2RSXSRCN-qt84MtKs.js +61 -0
  3. package/dist/4CMBR7SL-BAGv8IL2.js +308 -0
  4. package/dist/5JTVDSTH-CG1NL6Fw.js +174 -0
  5. package/dist/5VQZOHHZ-CscZGerP.js +59 -0
  6. package/dist/6VRAQV3D-2rb_aClP.js +201 -0
  7. package/dist/7PRQYBBV-91wrWGjk.js +17 -0
  8. package/dist/ArrowRight.es-xyNbtVOa.js +60 -0
  9. package/dist/DG5U6ZEL-CVj-Czp2.js +17 -0
  10. package/dist/F5MUBM3I-87B2_4WK.js +54 -0
  11. package/dist/LMDWO4NN--KEvZePp.js +610 -0
  12. package/dist/MTZPJQMC-DyCWBG18.js +14 -0
  13. package/dist/P7GR5CS5-BoOYUfSQ.js +19 -0
  14. package/dist/PFRGBC2K-BEg8ahbY.js +303 -0
  15. package/dist/RS7LB2H4-D0fWv5qu.js +15 -0
  16. package/dist/RZ4GPYOB-13-5LlEb.js +37 -0
  17. package/dist/S43UC3DV-Dn8EFLaT.js +22 -0
  18. package/dist/Square.es-KJLdY11q.js +72 -0
  19. package/dist/T7VMP3TM-DeRMoW8g.js +77 -0
  20. package/dist/TP7N7UIH-BHb1rEeb.js +34 -0
  21. package/dist/UQQRIHDV-Bu8e1bYU.js +69 -0
  22. package/dist/UYGDZTLQ-DcCmv5SE.js +12 -0
  23. package/dist/VIIRIBF3-D5DmZNtI.js +26 -0
  24. package/dist/WMYDSCNQ-Dy1O-Kdl.js +2405 -0
  25. package/dist/WYCIER3C-DRn904Gy.js +175 -0
  26. package/dist/YV4JVR4I-kvospPUa.js +351 -0
  27. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  28. package/dist/assets/button.css +1 -1
  29. package/dist/assets/index.css +1 -1
  30. package/dist/assets/index10.css +1 -1
  31. package/dist/assets/index11.css +1 -1
  32. package/dist/assets/index12.css +1 -1
  33. package/dist/assets/index13.css +1 -1
  34. package/dist/assets/index14.css +1 -0
  35. package/dist/assets/index15.css +1 -0
  36. package/dist/assets/index16.css +1 -0
  37. package/dist/assets/index17.css +1 -0
  38. package/dist/assets/index18.css +1 -0
  39. package/dist/assets/index2.css +1 -1
  40. package/dist/assets/index3.css +1 -1
  41. package/dist/assets/index4.css +1 -1
  42. package/dist/assets/index5.css +1 -1
  43. package/dist/assets/index6.css +1 -1
  44. package/dist/assets/index7.css +1 -1
  45. package/dist/assets/index8.css +1 -1
  46. package/dist/assets/index9.css +1 -1
  47. package/dist/assets/style.css +1 -1
  48. package/dist/assets/style2.css +1 -0
  49. package/dist/assets/style3.css +1 -0
  50. package/dist/assets/style4.css +1 -0
  51. package/dist/assets/styles.css +1 -1
  52. package/dist/components/block-editor/editor.d.ts +5 -0
  53. package/dist/components/block-editor/editor.js +6 -0
  54. package/dist/components/block-editor/index.d.ts +1 -0
  55. package/dist/components/block-editor/index.js +4 -0
  56. package/dist/components/breadcrumbs/index.js +87 -31
  57. package/dist/components/button/button.d.ts +1 -1
  58. package/dist/components/button/button.js +5 -5
  59. package/dist/components/button/icon.d.ts +1 -2
  60. package/dist/components/button/icon.js +10 -3
  61. package/dist/components/button/index.d.ts +4 -0
  62. package/dist/components/controls/base-control/affix.js +7 -7
  63. package/dist/components/controls/base-control/index.js +11 -11
  64. package/dist/components/controls/base-popover-control/index.d.ts +9 -0
  65. package/dist/components/controls/base-popover-control/index.js +47 -0
  66. package/dist/components/controls/checkbox-control/index.d.ts +8 -0
  67. package/dist/components/controls/checkbox-control/index.js +57 -0
  68. package/dist/components/controls/choice-control/choice.js +13 -11
  69. package/dist/components/controls/choice-control/index.js +1 -1
  70. package/dist/components/controls/index.d.ts +4 -1
  71. package/dist/components/controls/index.js +25 -16
  72. package/dist/components/controls/number-control/index.js +29 -27
  73. package/dist/components/controls/password-control/index.js +1 -1
  74. package/dist/components/controls/recurrence-control/index.d.ts +8 -0
  75. package/dist/components/controls/recurrence-control/index.js +208 -0
  76. package/dist/components/controls/select-control/component.d.ts +12 -0
  77. package/dist/components/controls/select-control/component.js +1879 -0
  78. package/dist/components/controls/select-control/index.d.ts +2 -12
  79. package/dist/components/controls/select-control/index.js +5 -1860
  80. package/dist/components/controls/select-control/options.d.ts +7 -0
  81. package/dist/components/controls/select-control/options.js +9 -0
  82. package/dist/components/controls/textarea-control/index.js +1 -1
  83. package/dist/components/controls/toggle-control/index.js +11 -9
  84. package/dist/components/controls/toggle-group-control/index.d.ts +19 -0
  85. package/dist/components/controls/toggle-group-control/index.js +50 -0
  86. package/dist/components/data-table/column.js +1 -1
  87. package/dist/components/data-table/header.js +120 -171
  88. package/dist/components/data-table/index.js +1 -1
  89. package/dist/components/filesystem/file.d.ts +7 -0
  90. package/dist/components/filesystem/file.js +44 -0
  91. package/dist/components/filesystem/folder.d.ts +6 -0
  92. package/dist/components/filesystem/folder.js +160 -0
  93. package/dist/components/filesystem/icon.d.ts +7 -0
  94. package/dist/components/filesystem/icon.js +908 -0
  95. package/dist/components/filesystem/index.js +14 -0
  96. package/dist/components/filesystem/list.d.ts +4 -0
  97. package/dist/components/filesystem/list.js +18 -0
  98. package/dist/components/filesystem/root.d.ts +3 -0
  99. package/dist/components/filesystem/root.js +7 -0
  100. package/dist/components/form/components/index.js +12 -12
  101. package/dist/components/form/components/pagination.js +23 -16
  102. package/dist/components/form/components/progress.d.ts +3 -2
  103. package/dist/components/index.d.ts +4 -0
  104. package/dist/components/index.js +48 -31
  105. package/dist/components/menu/index.js +24 -23
  106. package/dist/components/menu/item.js +1 -1
  107. package/dist/components/menu/items/action.js +1 -1
  108. package/dist/components/menu/items/spacer.js +14 -42
  109. package/dist/components/menu/items/submenu.js +2 -2
  110. package/dist/components/menu/items/toggle.js +25 -91
  111. package/dist/components/progress/index.d.ts +5 -3
  112. package/dist/components/progress/index.js +44 -27
  113. package/dist/components/tabs/index.js +12 -0
  114. package/dist/components/tabs/list.d.ts +7 -0
  115. package/dist/components/tabs/list.js +42 -0
  116. package/dist/components/tabs/panel.d.ts +8 -0
  117. package/dist/components/tabs/panel.js +132 -0
  118. package/dist/components/tabs/root.d.ts +9 -0
  119. package/dist/components/tabs/root.js +173 -0
  120. package/dist/components/tabs/tab.d.ts +7 -0
  121. package/dist/components/tabs/tab.js +81 -0
  122. package/dist/components/toolbar/index.js +27 -0
  123. package/dist/components/toolbar/root.d.ts +6 -0
  124. package/dist/components/toolbar/root.js +6 -0
  125. package/dist/composite-provider-DNftbE5U.js +10 -0
  126. package/dist/hooks/state.d.ts +4 -0
  127. package/dist/hooks/state.js +7 -0
  128. package/dist/hooks/theme.js +7 -38
  129. package/dist/index-1AjPIqTN.js +73 -0
  130. package/dist/index-Cgx3BqdJ.js +388 -0
  131. package/dist/index.js +61 -40
  132. package/dist/{item-D9r2-3fk.js → item-B1ugJ7YQ.js} +240 -234
  133. package/dist/options-Cfoqhxw2.js +96 -0
  134. package/dist/primitives/index.d.ts +2 -0
  135. package/dist/primitives/index.js +4 -0
  136. package/dist/primitives/resizable/index.js +1 -1
  137. package/dist/primitives/scroll-area/index.d.ts +7 -0
  138. package/dist/primitives/scroll-area/index.js +777 -0
  139. package/dist/primitives/truncate/index.d.ts +7 -0
  140. package/dist/primitives/truncate/index.js +46 -0
  141. package/dist/primitives/visually-hidden/index.d.ts +2 -2
  142. package/dist/primitives/visually-hidden/index.js +13 -3
  143. package/dist/root-CaKPdqzv.js +73 -0
  144. package/dist/types/date.d.ts +39 -0
  145. package/dist/types/date.js +1778 -0
  146. package/dist/types/options.d.ts +8 -6
  147. package/dist/utils/components.d.ts +5 -0
  148. package/dist/utils/components.js +14 -0
  149. package/dist/utils/date.d.ts +1 -0
  150. package/dist/utils/date.js +15 -0
  151. package/dist/utils/string.d.ts +4 -0
  152. package/dist/utils/string.js +18 -0
  153. package/package.json +4 -2
  154. package/dist/2NBKRL7C-D-Q0qGRV.js +0 -81
  155. package/dist/P7GR5CS5-qyeuZVEs.js +0 -640
  156. package/dist/T7VMP3TM-BxgFbvdx.js +0 -2106
  157. package/dist/UQQRIHDV-BGs025hb.js +0 -1046
  158. package/dist/VIIRIBF3-D9clDhln.js +0 -21
  159. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  160. package/dist/components/markdown/formats.d.ts +0 -11
  161. package/dist/components/markdown/formats.js +0 -318
  162. package/dist/components/markdown/index.d.ts +0 -7
  163. package/dist/components/markdown/index.js +0 -25845
  164. package/dist/components/markdown/types/format.d.ts +0 -27
  165. package/dist/components/markdown/types/format.js +0 -4
  166. package/dist/floating-ui.dom-9sqP7IwC.js +0 -1512
@@ -1,30 +1,47 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { cn as m } from "../../utils/css.js";
3
- import '../../assets/index8.css';const g = ({
4
- className: s,
5
- style: e,
6
- steps: r = 0,
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { cn as c } from "../../utils/css.js";
3
+ import "react";
4
+ import '../../assets/style4.css';import '../../assets/style3.css';import '../../assets/style2.css';import '../../assets/index11.css';/* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ import { VisuallyHidden as d } from "../../primitives/visually-hidden/index.js";
8
+ const N = ({
9
+ className: p,
10
+ steps: o = 0,
11
+ min: m = 0,
7
12
  max: t = 1,
8
- value: o = void 0,
9
- ...n
10
- }) => /* @__PURE__ */ p(
11
- "progress",
12
- {
13
- className: m(
14
- "component-progress",
15
- r > 0 && "component-progress--with-steps",
16
- s
17
- ),
18
- style: {
19
- "--component-progress__steps": r,
20
- ...e
21
- },
22
- max: t,
23
- value: o,
24
- ...n,
25
- children: o !== void 0 ? o + "%" : "Indeterminate"
26
- }
27
- );
13
+ value: r = void 0
14
+ }) => {
15
+ const n = (r || 0) * o;
16
+ return /* @__PURE__ */ i(
17
+ "div",
18
+ {
19
+ className: c(
20
+ "component-progress",
21
+ o > 0 && "component-progress--with-steps",
22
+ r === void 0 && "component-progress--indeterminate",
23
+ p
24
+ ),
25
+ style: {
26
+ "--component-progress__steps": o,
27
+ "--component-progress__value": r,
28
+ "--component-progress__min": m,
29
+ "--component-progress__max": t
30
+ },
31
+ children: [
32
+ /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s("progress", { max: t, value: r, children: r !== void 0 ? r + "%" : "Indeterminate" }) }),
33
+ Array.from({ length: o || 1 }, (g, e) => /* @__PURE__ */ s(
34
+ "div",
35
+ {
36
+ className: "component-progress__step",
37
+ "data-phase": e === n - 1 ? "present" : e < n - 1 ? "past" : "future"
38
+ },
39
+ e
40
+ ))
41
+ ]
42
+ }
43
+ );
44
+ };
28
45
  export {
29
- g as Progress
46
+ N as Progress
30
47
  };
@@ -0,0 +1,12 @@
1
+ import { List as o } from "./list.js";
2
+ import { Panel as r } from "./panel.js";
3
+ import { Tabs as m } from "./root.js";
4
+ import { Tab as s } from "./tab.js";
5
+ import '../../assets/index2.css';const p = Object.assign(m, {
6
+ Panel: r,
7
+ List: o,
8
+ Tab: s
9
+ });
10
+ export {
11
+ p as Tabs
12
+ };
@@ -0,0 +1,7 @@
1
+ import { CSSProperties, FC, PropsWithChildren } from 'react';
2
+ interface ListProps extends PropsWithChildren {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ }
6
+ export declare const List: FC<ListProps>;
7
+ export {};
@@ -0,0 +1,42 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cn as m } from "../../utils/css.js";
3
+ import { a as u, T as b } from "../../UYGDZTLQ-DcCmv5SE.js";
4
+ import { u as f } from "../../5JTVDSTH-CG1NL6Fw.js";
5
+ import { f as l, a as v, q as d, _ as T, i as _, l as L, o as i } from "../../LMDWO4NN--KEvZePp.js";
6
+ var x = "div", E = v(
7
+ function(r) {
8
+ var e = r, { store: t } = e, o = T(e, ["store"]);
9
+ const p = u();
10
+ t = t || p, _(
11
+ t,
12
+ process.env.NODE_ENV !== "production" && "TabList must receive a `store` prop or be wrapped in a TabProvider component."
13
+ );
14
+ const c = t.useState(
15
+ (a) => a.orientation === "both" ? void 0 : a.orientation
16
+ );
17
+ return o = L(
18
+ o,
19
+ (a) => /* @__PURE__ */ n(b, { value: t, children: a }),
20
+ [t]
21
+ ), t.composite && (o = i({
22
+ focusable: !1
23
+ }, o)), o = i({
24
+ role: "tablist",
25
+ "aria-orientation": c
26
+ }, o), o = f(i({ store: t }, o)), o;
27
+ }
28
+ ), N = l(function(r) {
29
+ const e = E(r);
30
+ return d(x, e);
31
+ });
32
+ const R = ({ className: s, children: r, style: e }) => /* @__PURE__ */ n(
33
+ N,
34
+ {
35
+ className: m("component-tabs__list", s),
36
+ style: e,
37
+ children: r
38
+ }
39
+ );
40
+ export {
41
+ R as List
42
+ };
@@ -0,0 +1,8 @@
1
+ import { CSSProperties, FC, PropsWithChildren } from 'react';
2
+ interface PanelProps extends PropsWithChildren {
3
+ value: string;
4
+ className?: string;
5
+ style?: CSSProperties;
6
+ }
7
+ export declare const Panel: FC<PanelProps>;
8
+ export {};
@@ -0,0 +1,132 @@
1
+ import { jsx as S } from "react/jsx-runtime";
2
+ import { cn as A } from "../../utils/css.js";
3
+ import { a as K, T as O } from "../../UYGDZTLQ-DcCmv5SE.js";
4
+ import { u as j, a as V } from "../../WYCIER3C-DRn904Gy.js";
5
+ import { u as q } from "../../RZ4GPYOB-13-5LlEb.js";
6
+ import { g as F, u as W } from "../../PFRGBC2K-BEg8ahbY.js";
7
+ import { a as T } from "../../YV4JVR4I-kvospPUa.js";
8
+ import { f as z, a as B, q as G, _ as J, i as Q, s as U, e as h, m as _, o as d, l as X, n as Y } from "../../LMDWO4NN--KEvZePp.js";
9
+ import { useRef as w, useEffect as R, useState as Z, useCallback as $ } from "react";
10
+ var ee = "div", te = B(
11
+ function(c) {
12
+ var a = c, {
13
+ store: t,
14
+ unmountOnHide: C,
15
+ tabId: p,
16
+ getItem: b,
17
+ scrollRestoration: v,
18
+ scrollElement: l
19
+ } = a, r = J(a, [
20
+ "store",
21
+ "unmountOnHide",
22
+ "tabId",
23
+ "getItem",
24
+ "scrollRestoration",
25
+ "scrollElement"
26
+ ]);
27
+ const D = K();
28
+ t = t || D, Q(
29
+ t,
30
+ process.env.NODE_ENV !== "production" && "TabPanel must receive a `store` prop or be wrapped in a TabProvider component."
31
+ );
32
+ const I = w(null), m = U(r.id), s = T(
33
+ t.panels,
34
+ () => {
35
+ var e;
36
+ return p || ((e = t == null ? void 0 : t.panels.item(m)) == null ? void 0 : e.tabId);
37
+ }
38
+ ), k = T(
39
+ t,
40
+ (e) => !!s && e.selectedId === s
41
+ ), g = j({ open: k }), P = T(g, "mounted"), E = w(
42
+ /* @__PURE__ */ new Map()
43
+ ), x = h(() => {
44
+ const e = I.current;
45
+ return e ? l ? typeof l == "function" ? l(e) : "current" in l ? l.current : l : e : null;
46
+ });
47
+ R(() => {
48
+ var e, o;
49
+ if (!v || !P) return;
50
+ const n = x();
51
+ if (!n) return;
52
+ if (v === "reset") {
53
+ n.scroll(0, 0);
54
+ return;
55
+ }
56
+ if (!s) return;
57
+ const u = E.current.get(s);
58
+ n.scroll((e = u == null ? void 0 : u.x) != null ? e : 0, (o = u == null ? void 0 : u.y) != null ? o : 0);
59
+ const i = () => {
60
+ E.current.set(s, {
61
+ x: n.scrollLeft,
62
+ y: n.scrollTop
63
+ });
64
+ };
65
+ return n.addEventListener("scroll", i), () => {
66
+ n.removeEventListener("scroll", i);
67
+ };
68
+ }, [v, P, s, x, t]);
69
+ const [H, L] = Z(!1);
70
+ R(() => {
71
+ const e = I.current;
72
+ if (!e) return;
73
+ const o = F(e);
74
+ L(!!o.length);
75
+ }, []);
76
+ const M = $(
77
+ (e) => {
78
+ const o = _(d({}, e), { id: m || e.id, tabId: p });
79
+ return b ? b(o) : o;
80
+ },
81
+ [m, p, b]
82
+ ), y = r.onKeyDown, N = h((e) => {
83
+ if (y == null || y(e), e.defaultPrevented || !(t != null && t.composite)) return;
84
+ const n = {
85
+ ArrowLeft: t.previous,
86
+ ArrowRight: t.next,
87
+ Home: t.first,
88
+ End: t.last
89
+ }[e.key];
90
+ if (!n) return;
91
+ const { selectedId: u } = t.getState(), i = n({ activeId: u });
92
+ i && (e.preventDefault(), t.move(i));
93
+ });
94
+ return r = X(
95
+ r,
96
+ (e) => /* @__PURE__ */ S(O, { value: t, children: e }),
97
+ [t]
98
+ ), r = _(d({
99
+ id: m,
100
+ role: "tabpanel",
101
+ "aria-labelledby": s || void 0
102
+ }, r), {
103
+ children: C && !P ? null : r.children,
104
+ ref: Y(I, r.ref),
105
+ onKeyDown: N
106
+ }), r = W(d({
107
+ // If the tab panel is rendered as part of another composite widget such
108
+ // as combobox, it should not be focusable.
109
+ focusable: !t.composite && !H
110
+ }, r)), r = V(d({ store: g }, r)), r = q(_(d({ store: t.panels }, r), { getItem: M })), r;
111
+ }
112
+ ), re = z(function(c) {
113
+ const a = te(c);
114
+ return G(ee, a);
115
+ });
116
+ const me = ({
117
+ value: f,
118
+ className: c,
119
+ style: a,
120
+ children: t
121
+ }) => /* @__PURE__ */ S(
122
+ re,
123
+ {
124
+ tabId: f,
125
+ className: A("component-tabs__panel", c),
126
+ style: a,
127
+ children: t
128
+ }
129
+ );
130
+ export {
131
+ me as Panel
132
+ };
@@ -0,0 +1,9 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ interface TabsProps extends PropsWithChildren {
3
+ value?: string | null;
4
+ onValueChange?: (value: string | null | undefined) => void;
5
+ defaultValue?: string | null;
6
+ className?: string;
7
+ }
8
+ export declare const Tabs: FC<TabsProps>;
9
+ export {};
@@ -0,0 +1,173 @@
1
+ import { jsx as P } from "react/jsx-runtime";
2
+ import { cn as F } from "../../utils/css.js";
3
+ import { u as U } from "../../DG5U6ZEL-CVj-Czp2.js";
4
+ import { c as k, a as z, b as A } from "../../4CMBR7SL-BAGv8IL2.js";
5
+ import { u as K } from "../../S43UC3DV-Dn8EFLaT.js";
6
+ import { m as N, o as O, c as R, s as f, b as l, g as W, e as y, f as M } from "../../YV4JVR4I-kvospPUa.js";
7
+ import { $ as X, Y as p, X as I, U as S, a0 as T, m as B, o as L, Z as V } from "../../LMDWO4NN--KEvZePp.js";
8
+ import { useMemo as Y } from "react";
9
+ import { b as Z } from "../../UYGDZTLQ-DcCmv5SE.js";
10
+ function q(e = {}) {
11
+ var n = e, {
12
+ composite: o,
13
+ combobox: c
14
+ } = n, d = X(n, [
15
+ "composite",
16
+ "combobox"
17
+ ]);
18
+ const g = [
19
+ "items",
20
+ "renderedItems",
21
+ "moves",
22
+ "orientation",
23
+ "virtualFocus",
24
+ "includesBaseElement",
25
+ "baseElement",
26
+ "focusLoop",
27
+ "focusShift",
28
+ "focusWrap"
29
+ ], v = N(
30
+ d.store,
31
+ O(o, g),
32
+ O(c, g)
33
+ ), r = v == null ? void 0 : v.getState(), b = k(p(S({}, d), {
34
+ store: v,
35
+ // We need to explicitly set the default value of `includesBaseElement` to
36
+ // `false` since we don't want the composite store to default it to `true`
37
+ // when the activeId state is null, which could be the case when rendering
38
+ // combobox with tab.
39
+ includesBaseElement: I(
40
+ d.includesBaseElement,
41
+ r == null ? void 0 : r.includesBaseElement,
42
+ !1
43
+ ),
44
+ orientation: I(
45
+ d.orientation,
46
+ r == null ? void 0 : r.orientation,
47
+ "horizontal"
48
+ ),
49
+ focusLoop: I(d.focusLoop, r == null ? void 0 : r.focusLoop, !0)
50
+ })), x = z(), j = p(S({}, b.getState()), {
51
+ selectedId: I(
52
+ d.selectedId,
53
+ r == null ? void 0 : r.selectedId,
54
+ d.defaultSelectedId
55
+ ),
56
+ selectOnMove: I(
57
+ d.selectOnMove,
58
+ r == null ? void 0 : r.selectOnMove,
59
+ !0
60
+ )
61
+ }), t = R(j, b, v);
62
+ f(
63
+ t,
64
+ () => l(t, ["moves"], () => {
65
+ const { activeId: s, selectOnMove: a } = t.getState();
66
+ if (!a || !s) return;
67
+ const i = b.item(s);
68
+ i && (i.dimmed || i.disabled || t.setState("selectedId", i.id));
69
+ })
70
+ );
71
+ let h = !0;
72
+ f(
73
+ t,
74
+ () => W(t, ["selectedId"], (s, a) => {
75
+ if (!h) {
76
+ h = !0;
77
+ return;
78
+ }
79
+ o && s.selectedId === a.selectedId || t.setState("activeId", s.selectedId);
80
+ })
81
+ ), f(
82
+ t,
83
+ () => l(t, ["selectedId", "renderedItems"], (s) => {
84
+ if (s.selectedId !== void 0) return;
85
+ const { activeId: a, renderedItems: i } = t.getState(), m = b.item(a);
86
+ if (m && !m.disabled && !m.dimmed)
87
+ t.setState("selectedId", m.id);
88
+ else {
89
+ const _ = i.find(
90
+ (u) => !u.disabled && !u.dimmed
91
+ );
92
+ t.setState("selectedId", _ == null ? void 0 : _.id);
93
+ }
94
+ })
95
+ ), f(
96
+ t,
97
+ () => l(t, ["renderedItems"], (s) => {
98
+ const a = s.renderedItems;
99
+ if (a.length)
100
+ return l(x, ["renderedItems"], (i) => {
101
+ const m = i.renderedItems;
102
+ m.some((u) => !u.tabId) && m.forEach((u, $) => {
103
+ if (u.tabId) return;
104
+ const E = a[$];
105
+ E && x.renderItem(p(S({}, u), { tabId: E.id }));
106
+ });
107
+ });
108
+ })
109
+ );
110
+ let C = null;
111
+ return f(t, () => {
112
+ const s = () => {
113
+ C = t.getState().selectedId;
114
+ }, a = () => {
115
+ h = !1, t.setState("selectedId", C);
116
+ };
117
+ if (o && "setSelectElement" in o)
118
+ return T(
119
+ l(o, ["value"], s),
120
+ l(o, ["mounted"], a)
121
+ );
122
+ if (c)
123
+ return T(
124
+ l(c, ["selectedValue"], s),
125
+ l(c, ["mounted"], a)
126
+ );
127
+ }), p(S(S({}, b), t), {
128
+ panels: x,
129
+ setSelectedId: (s) => t.setState("selectedId", s),
130
+ select: (s) => {
131
+ t.setState("selectedId", s), b.move(s);
132
+ }
133
+ });
134
+ }
135
+ function w(e, n, o) {
136
+ V(n, [o.composite, o.combobox]), e = A(e, n, o), M(e, o, "selectedId", "setSelectedId"), M(e, o, "selectOnMove");
137
+ const [c, d] = y(() => e.panels, {});
138
+ return V(d, [e, d]), Object.assign(
139
+ Y(() => B(L({}, e), { panels: c }), [e, c]),
140
+ { composite: o.composite, combobox: o.combobox }
141
+ );
142
+ }
143
+ function D(e = {}) {
144
+ const n = K(), o = U() || n;
145
+ e = B(L({}, e), {
146
+ composite: e.composite !== void 0 ? e.composite : o,
147
+ combobox: e.combobox !== void 0 ? e.combobox : n
148
+ });
149
+ const [c, d] = y(q, e);
150
+ return w(c, d, e);
151
+ }
152
+ function G(e = {}) {
153
+ const n = D(e);
154
+ return /* @__PURE__ */ P(Z, { value: n, children: e.children });
155
+ }
156
+ const ce = ({
157
+ value: e,
158
+ onValueChange: n,
159
+ defaultValue: o,
160
+ className: c,
161
+ children: d
162
+ }) => /* @__PURE__ */ P(
163
+ G,
164
+ {
165
+ selectedId: e,
166
+ setSelectedId: n,
167
+ defaultSelectedId: o,
168
+ children: /* @__PURE__ */ P("div", { className: F("component-tabs", c), children: d })
169
+ }
170
+ );
171
+ export {
172
+ ce as Tabs
173
+ };
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ interface TabProps extends PropsWithChildren {
3
+ value: string;
4
+ className?: string;
5
+ }
6
+ export declare const Tab: FC<TabProps>;
7
+ export {};
@@ -0,0 +1,81 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { cn as N } from "../../utils/css.js";
3
+ import { u as w } from "../../UYGDZTLQ-DcCmv5SE.js";
4
+ import { C, u as E } from "../../6VRAQV3D-2rb_aClP.js";
5
+ import { a as F } from "../../YV4JVR4I-kvospPUa.js";
6
+ import { r as V, f as W, a as D, q as j, _ as A, i as q, s as H, t as L, m as a, o as r, e as O } from "../../LMDWO4NN--KEvZePp.js";
7
+ import { useCallback as $ } from "react";
8
+ var y = "button", z = D(function(i) {
9
+ var n = i, {
10
+ store: e,
11
+ getItem: l
12
+ } = n, t = A(n, [
13
+ "store",
14
+ "getItem"
15
+ ]), p;
16
+ const h = w();
17
+ e = e || h, q(
18
+ e,
19
+ process.env.NODE_ENV !== "production" && "Tab must be wrapped in a TabList component."
20
+ );
21
+ const b = H(), s = t.id || b, I = L(t), x = $(
22
+ (o) => {
23
+ const c = a(r({}, o), { dimmed: I });
24
+ return l ? l(c) : c;
25
+ },
26
+ [I, l]
27
+ ), f = t.onClick, g = O((o) => {
28
+ f == null || f(o), !o.defaultPrevented && (e == null || e.setSelectedId(s));
29
+ }), T = e.panels.useState(
30
+ (o) => {
31
+ var c;
32
+ return (c = o.items.find((k) => k.tabId === s)) == null ? void 0 : c.id;
33
+ }
34
+ ), v = b ? t.shouldRegisterItem : !1, S = e.useState((o) => !!s && o.activeId === s), u = e.useState((o) => !!s && o.selectedId === s), P = e.useState((o) => !!e.item(o.activeId)), R = S || u && !P, _ = u || ((p = t.accessibleWhenDisabled) != null ? p : !0);
35
+ if (F(
36
+ e.combobox || e.composite,
37
+ "virtualFocus"
38
+ ) && (t = a(r({}, t), {
39
+ tabIndex: -1
40
+ })), t = a(r({
41
+ id: s,
42
+ role: "tab",
43
+ "aria-selected": u,
44
+ "aria-controls": T || void 0
45
+ }, t), {
46
+ onClick: g
47
+ }), e.composite) {
48
+ const o = {
49
+ id: s,
50
+ accessibleWhenDisabled: _,
51
+ store: e.composite,
52
+ shouldRegisterItem: R && v,
53
+ rowId: t.rowId,
54
+ render: t.render
55
+ };
56
+ t = a(r({}, t), {
57
+ render: /* @__PURE__ */ m(
58
+ C,
59
+ a(r({}, o), {
60
+ render: e.combobox && e.composite !== e.combobox ? /* @__PURE__ */ m(C, a(r({}, o), { store: e.combobox })) : o.render
61
+ })
62
+ )
63
+ });
64
+ }
65
+ return t = E(a(r({
66
+ store: e
67
+ }, t), {
68
+ accessibleWhenDisabled: _,
69
+ getItem: x,
70
+ shouldRegisterItem: v
71
+ })), t;
72
+ }), B = V(
73
+ W(function(i) {
74
+ const n = z(i);
75
+ return j(y, n);
76
+ })
77
+ );
78
+ const Z = ({ className: d, value: i, children: n }) => /* @__PURE__ */ m(B, { id: i, className: N("component-tabs__tab", d), children: /* @__PURE__ */ m("div", { className: "component-tabs__tab__label", children: n }) });
79
+ export {
80
+ Z as Tab
81
+ };
@@ -0,0 +1,27 @@
1
+ import { createComposite as n } from "../../utils/components.js";
2
+ import { Button as c } from "../button/index.js";
3
+ import { u, R as i } from "../../root-CaKPdqzv.js";
4
+ import { u as l } from "../../6VRAQV3D-2rb_aClP.js";
5
+ import { r as p, f as b, a as f, q as _, _ as I, o as T } from "../../LMDWO4NN--KEvZePp.js";
6
+ import '../../assets/index12.css';var v = "button", R = f(
7
+ function(t) {
8
+ var o = t, { store: e } = o, r = I(o, ["store"]);
9
+ const m = u();
10
+ return e = e || m, r = l(T({ store: e }, r)), r;
11
+ }
12
+ ), a = p(
13
+ b(function(t) {
14
+ const o = R(t);
15
+ return _(v, o);
16
+ })
17
+ );
18
+ const B = Object.assign(i, {
19
+ Generic: a,
20
+ IconButton: n(a, c.Icon, {
21
+ size: "small",
22
+ className: "component-toolbar__icon-button"
23
+ })
24
+ });
25
+ export {
26
+ B as Toolbar
27
+ };
@@ -0,0 +1,6 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ interface RootProps extends PropsWithChildren {
3
+ className?: string;
4
+ }
5
+ export declare const Root: FC<RootProps>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import "react/jsx-runtime";
2
+ import "../../utils/css.js";
3
+ import { R as p } from "../../root-CaKPdqzv.js";
4
+ export {
5
+ p as Root
6
+ };
@@ -0,0 +1,10 @@
1
+ import { u as e } from "./4CMBR7SL-BAGv8IL2.js";
2
+ import { a as t } from "./P7GR5CS5-BoOYUfSQ.js";
3
+ import { jsx as i } from "react/jsx-runtime";
4
+ function a(o = {}) {
5
+ const r = e(o);
6
+ return /* @__PURE__ */ i(t, { value: r, children: o.children });
7
+ }
8
+ export {
9
+ a as C
10
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Fixes a typing bug in @uidotdev/usehooks.
3
+ */
4
+ export declare function useObjectState<T>(initial: T): [T, (arg: Partial<T> | ((state: T) => Partial<T>)) => void];
@@ -0,0 +1,7 @@
1
+ import { b as e } from "../index-1AjPIqTN.js";
2
+ function o(t) {
3
+ return e(t);
4
+ }
5
+ export {
6
+ o as useObjectState
7
+ };
@@ -1,45 +1,14 @@
1
- import * as c from "react";
2
- import { useMemo as g, useEffect as d } from "react";
3
- function u(e, t) {
4
- window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
5
- }
6
- const l = (e, t) => {
7
- const n = JSON.stringify(t);
8
- window.localStorage.setItem(e, n), u(e, n);
9
- }, m = (e) => {
10
- window.localStorage.removeItem(e), u(e, null);
11
- }, i = (e) => window.localStorage.getItem(e), S = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e)), f = () => {
12
- throw Error("useLocalStorage is a client-only hook");
13
- };
14
- function w(e, t) {
15
- const n = () => i(e), r = c.useSyncExternalStore(
16
- S,
17
- n,
18
- f
19
- ), a = c.useCallback(
20
- (o) => {
21
- try {
22
- const s = typeof o == "function" ? o(JSON.parse(r)) : o;
23
- s == null ? m(e) : l(e, s);
24
- } catch (s) {
25
- console.warn(s);
26
- }
27
- },
28
- [e, r]
29
- );
30
- return c.useEffect(() => {
31
- i(e) === null && l(e, t);
32
- }, [e, t]), [r ? JSON.parse(r) : t, a];
33
- }
34
- function p() {
35
- const [e, t] = w("wrd__theme__dark", !1), n = g(() => e ? "dark" : "light", [e]), r = (o) => t(o === "dark"), a = () => t((o) => !o);
36
- return d(() => {
1
+ import { u as a } from "../index-1AjPIqTN.js";
2
+ import { useMemo as c, useEffect as u } from "react";
3
+ function h() {
4
+ const [e, o] = a("wrd__theme__dark", !1), r = c(() => e ? "dark" : "light", [e]), s = (t) => o(t === "dark"), m = () => o((t) => !t);
5
+ return u(() => {
37
6
  document && document.documentElement.setAttribute(
38
7
  "data-colour-scheme",
39
8
  e ? "dark" : "light"
40
9
  );
41
- }, [e]), { isDark: e, theme: n, setTheme: r, toggleDarkTheme: a };
10
+ }, [e]), { isDark: e, theme: r, setTheme: s, toggleDarkTheme: m };
42
11
  }
43
12
  export {
44
- p as useTheme
13
+ h as useTheme
45
14
  };