@wrdagency/blockout 0.0.4 → 0.0.6

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 (55) hide show
  1. package/dist/{2NBKRL7C-DnAMmXv4.js → 2NBKRL7C-raj2vrMY.js} +3 -3
  2. package/dist/{P7GR5CS5-BryEvRCz.js → P7GR5CS5-PkUYC6hd.js} +199 -180
  3. package/dist/{T7VMP3TM--1s529fr.js → T7VMP3TM-BeJUiw28.js} +683 -679
  4. package/dist/{UQQRIHDV-Bfi_RJby.js → UQQRIHDV-xtNCxi0H.js} +115 -115
  5. package/dist/{VIIRIBF3-XWA2y8Hu.js → VIIRIBF3-B3f0V2Nc.js} +1 -1
  6. package/dist/assets/index.css +1 -1
  7. package/dist/assets/index11.css +1 -1
  8. package/dist/assets/index2.css +1 -1
  9. package/dist/assets/index3.css +1 -1
  10. package/dist/assets/index4.css +1 -1
  11. package/dist/assets/index5.css +1 -1
  12. package/dist/assets/index6.css +1 -1
  13. package/dist/assets/index7.css +1 -1
  14. package/dist/assets/index8.css +1 -1
  15. package/dist/assets/style.css +1 -0
  16. package/dist/assets/styles.css +1 -0
  17. package/dist/components/button/index.js +1 -1
  18. package/dist/components/button-group/index.js +1 -1
  19. package/dist/components/controls/base-control/index.d.ts +4 -2
  20. package/dist/components/controls/base-control/index.js +26 -22
  21. package/dist/components/controls/choice-control/choice.d.ts +8 -0
  22. package/dist/components/controls/choice-control/choice.js +54 -0
  23. package/dist/components/controls/choice-control/index.d.ts +9 -0
  24. package/dist/components/controls/choice-control/index.js +31 -0
  25. package/dist/components/controls/index.d.ts +1 -0
  26. package/dist/components/controls/index.js +12 -10
  27. package/dist/components/controls/number-control/index.js +1 -1
  28. package/dist/components/controls/ranked-choice-control/index.d.ts +1 -0
  29. package/dist/components/controls/ranked-choice-control/index.js +1 -0
  30. package/dist/components/controls/select-control/index.d.ts +2 -1
  31. package/dist/components/controls/select-control/index.js +1642 -374
  32. package/dist/components/controls/textarea-control/index.js +1 -1
  33. package/dist/components/controls/toggle-control/index.js +10 -9
  34. package/dist/components/data-table/header.js +9 -8
  35. package/dist/components/index.d.ts +2 -1
  36. package/dist/components/index.js +17 -13
  37. package/dist/components/menu/index.js +4 -4
  38. package/dist/components/menu/item.js +1 -1
  39. package/dist/components/menu/items/action.js +1 -1
  40. package/dist/components/menu/items/spacer.js +2 -2
  41. package/dist/components/menu/items/submenu.js +2 -2
  42. package/dist/components/menu/items/toggle.js +1 -1
  43. package/dist/components/progress/index.d.ts +7 -0
  44. package/dist/components/progress/index.js +28 -0
  45. package/dist/index.js +25 -17
  46. package/dist/{item-CPVd5mKo.js → item-Bcbx6pI-.js} +87 -87
  47. package/dist/primitives/index.d.ts +2 -0
  48. package/dist/primitives/index.js +6 -2
  49. package/dist/primitives/resizable/index.js +7 -6
  50. package/dist/primitives/visually-hidden/index.js +6 -0
  51. package/package.json +2 -1
  52. package/dist/components/visually-hidden/index.js +0 -5
  53. /package/dist/{components → primitives}/visually-hidden/index.d.ts +0 -0
  54. /package/dist/{components/controls/select-control → types}/options.d.ts +0 -0
  55. /package/dist/{components/controls/select-control → types}/options.js +0 -0
@@ -1,16 +1,16 @@
1
1
  import { jsx as y, jsxs as oe } from "react/jsx-runtime";
2
- import { ActionMenuItem as Ie } from "./components/menu/items/action.js";
3
- import { SeparatorMenuItem as ke } from "./components/menu/items/spacer.js";
2
+ import { ActionMenuItem as Re } from "./components/menu/items/action.js";
3
+ import { SeparatorMenuItem as Le } from "./components/menu/items/spacer.js";
4
4
  import * as S from "react";
5
- import { useRef as U, useState as ue, useEffect as B, useContext as Le, createContext as Ve, useCallback as ge, createRef as Be, useMemo as je } from "react";
5
+ import { useRef as U, useState as ue, useEffect as B, useContext as ke, createContext as Ve, useCallback as ge, createRef as Be, useMemo as je } from "react";
6
6
  import { w as Ke } from "./SSRBase.es-BUXS72ra.js";
7
7
  import { EmptyIcon as Ze } from "./components/menu/icon.js";
8
8
  import { ToggleMenuItem as $e } from "./components/menu/items/toggle.js";
9
- import { b as me, H as Ue, a as qe, c as ae, M as We, d as Ee } from "./VIIRIBF3-XWA2y8Hu.js";
10
- import { u as ze, M as Ge } from "./2NBKRL7C-DnAMmXv4.js";
11
- import { a as Xe, d as Ye, k as Qe, j as Se, c as Je, u as et, e as tt, i as nt, h as ot, g as Pe, R as rt, f as st } from "./T7VMP3TM--1s529fr.js";
12
- import { c as _e, g as re, d as ce, h as se, j as ut, m as at, o as it, p as ct, t as lt, s as pe, f as dt, u as W } from "./UQQRIHDV-Bfi_RJby.js";
13
- import { y as Z, z as L, A as I, b as Q, _ as $, i as J, K as mt, L as Oe, u as le, M as ve, N as X, O as ft, v as pt, E as fe, h as k, s as ee, j as E, Q as ye, e as q, R as de, f as te, d as ne, G as Ae, x as vt, S as ht, B as bt, r as Fe, T as wt, g as Mt, F as gt } from "./P7GR5CS5-BryEvRCz.js";
9
+ import { b as me, H as Ue, a as qe, c as ae, M as We, d as Ee } from "./VIIRIBF3-B3f0V2Nc.js";
10
+ import { u as ze, M as Ge } from "./2NBKRL7C-raj2vrMY.js";
11
+ import { c as Xe, u as Ye, a as Je, b as Se, d as Qe, e as et, f as tt, i as nt, g as ot, h as Pe, R as rt, j as st } from "./T7VMP3TM-BeJUiw28.js";
12
+ import { c as _e, d as re, s as ce, h as se, e as ut, m as at, o as it, p as ct, t as lt, f as pe, g as dt, u as W } from "./UQQRIHDV-xtNCxi0H.js";
13
+ import { x as Z, y as k, z as R, b as J, _ as $, i as Q, A as mt, B as Oe, u as le, D as ve, E as X, F as ft, v as pt, G as fe, h as L, s as ee, j as E, H as ye, e as q, I as de, f as te, d as ne, J as Ae, K as vt, L as ht, M as bt, r as Fe, N as wt, g as Mt, O as gt } from "./P7GR5CS5-PkUYC6hd.js";
14
14
  const Et = /* @__PURE__ */ new Map([
15
15
  [
16
16
  "bold",
@@ -40,19 +40,19 @@ const Et = /* @__PURE__ */ new Map([
40
40
  He.displayName = "CaretRightIcon";
41
41
  function St(n = {}) {
42
42
  var o;
43
- const t = (o = n.store) == null ? void 0 : o.getState(), e = Xe(Z(I({}, n), {
44
- placement: L(
43
+ const t = (o = n.store) == null ? void 0 : o.getState(), e = Xe(Z(R({}, n), {
44
+ placement: k(
45
45
  n.placement,
46
46
  t == null ? void 0 : t.placement,
47
47
  "bottom"
48
48
  )
49
- })), i = L(n.timeout, t == null ? void 0 : t.timeout, 500), u = Z(I({}, e.getState()), {
49
+ })), i = k(n.timeout, t == null ? void 0 : t.timeout, 500), u = Z(R({}, e.getState()), {
50
50
  timeout: i,
51
- showTimeout: L(n.showTimeout, t == null ? void 0 : t.showTimeout),
52
- hideTimeout: L(n.hideTimeout, t == null ? void 0 : t.hideTimeout),
53
- autoFocusOnShow: L(t == null ? void 0 : t.autoFocusOnShow, !1)
51
+ showTimeout: k(n.showTimeout, t == null ? void 0 : t.showTimeout),
52
+ hideTimeout: k(n.hideTimeout, t == null ? void 0 : t.hideTimeout),
53
+ autoFocusOnShow: k(t == null ? void 0 : t.autoFocusOnShow, !1)
54
54
  }), a = _e(u, e, n.store);
55
- return Z(I(I({}, e), a), {
55
+ return Z(R(R({}, e), a), {
56
56
  setAutoFocusOnShow: (s) => a.setState("autoFocusOnShow", s)
57
57
  });
58
58
  }
@@ -110,14 +110,14 @@ function yt(n) {
110
110
  }), r = U(null);
111
111
  return B(() => ce(t, ["anchorElement"], (c) => {
112
112
  r.current = c.anchorElement;
113
- }), []), e = k(E({
113
+ }), []), e = L(E({
114
114
  autoFocusOnHide: i,
115
115
  finalFocus: r
116
116
  }, e), {
117
117
  onFocus: l
118
118
  }), e;
119
119
  }
120
- var we = Ve(null), Ce = Q(
120
+ var we = Ve(null), Ce = J(
121
121
  function(o) {
122
122
  var t = o, {
123
123
  store: e,
@@ -135,7 +135,7 @@ var we = Ve(null), Ce = Q(
135
135
  "disablePointerEventsOnApproach"
136
136
  ]);
137
137
  const c = me();
138
- e = e || c, J(
138
+ e = e || c, Q(
139
139
  e,
140
140
  process.env.NODE_ENV !== "production" && "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
141
141
  );
@@ -155,8 +155,8 @@ var we = Ve(null), Ce = Q(
155
155
  }
156
156
  if (!g.current) {
157
157
  if (Y) {
158
- const K = ie(P), De = be(v, Y);
159
- if (he(K, De)) {
158
+ const K = ie(P), Ie = be(v, Y);
159
+ if (he(K, Ie)) {
160
160
  if (w.current = K, !T(P)) return;
161
161
  P.preventDefault(), P.stopPropagation();
162
162
  return;
@@ -202,14 +202,14 @@ var we = Ve(null), Ce = Q(
202
202
  }, [f, N, H, T]), B(() => {
203
203
  f && (h || e == null || e.setAutoFocusOnShow(!1));
204
204
  }, [e, f, h]);
205
- const R = ft(h);
205
+ const D = ft(h);
206
206
  B(() => {
207
207
  if (f)
208
208
  return () => {
209
- R.current || e == null || e.setAutoFocusOnShow(!1);
209
+ D.current || e == null || e.setAutoFocusOnShow(!1);
210
210
  };
211
211
  }, [e, f]);
212
- const x = Le(we);
212
+ const x = ke(we);
213
213
  pt(() => {
214
214
  if (i || !u || !N || !f) return;
215
215
  const v = b.current;
@@ -232,17 +232,17 @@ var we = Ve(null), Ce = Q(
232
232
  r,
233
233
  (v) => /* @__PURE__ */ y(Ue, { value: e, children: /* @__PURE__ */ y(we.Provider, { value: p, children: v }) }),
234
234
  [e, p]
235
- ), r = k(E({}, r), {
235
+ ), r = L(E({}, r), {
236
236
  ref: ee(b, r.ref)
237
237
  }), r = yt(E({ store: e }, r));
238
- const D = e.useState(
238
+ const I = e.useState(
239
239
  (v) => i || v.autoFocusOnShow
240
240
  );
241
- return r = Qe(k(E({
241
+ return r = Je(L(E({
242
242
  store: e,
243
243
  modal: i,
244
244
  portal: u,
245
- autoFocusOnShow: D
245
+ autoFocusOnShow: I
246
246
  }, r), {
247
247
  portalRef: M,
248
248
  hideOnEscape(v) {
@@ -262,11 +262,11 @@ Se(
262
262
  }),
263
263
  me
264
264
  );
265
- var At = "a", Te = Q(
265
+ var At = "a", Te = J(
266
266
  function(o) {
267
267
  var t = o, { store: e, showOnHover: i = !0 } = t, u = $(t, ["store", "showOnHover"]);
268
268
  const a = me();
269
- e = e || a, J(
269
+ e = e || a, Q(
270
270
  e,
271
271
  process.env.NODE_ENV !== "production" && "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
272
272
  );
@@ -296,7 +296,7 @@ var At = "a", Te = Q(
296
296
  },
297
297
  [e]
298
298
  );
299
- return u = k(E({}, u), {
299
+ return u = L(E({}, u), {
300
300
  ref: ee(w, u.ref),
301
301
  onMouseMove: m,
302
302
  onClick: g
@@ -329,29 +329,29 @@ function Ft(n = {}) {
329
329
  ])
330
330
  );
331
331
  lt(u, s);
332
- const l = s.getState(), r = Je(Z(I({}, u), {
332
+ const l = s.getState(), r = Qe(Z(R({}, u), {
333
333
  store: s,
334
- orientation: L(
334
+ orientation: k(
335
335
  u.orientation,
336
336
  l.orientation,
337
337
  "vertical"
338
338
  )
339
- })), c = St(Z(I({}, u), {
339
+ })), c = St(Z(R({}, u), {
340
340
  store: s,
341
- placement: L(
341
+ placement: k(
342
342
  u.placement,
343
343
  l.placement,
344
344
  "bottom-start"
345
345
  ),
346
- timeout: L(
346
+ timeout: k(
347
347
  u.timeout,
348
348
  l.timeout,
349
349
  a ? 0 : 150
350
350
  ),
351
- hideTimeout: L(u.hideTimeout, l.hideTimeout, 0)
352
- })), b = Z(I(I({}, r.getState()), c.getState()), {
353
- initialFocus: L(l.initialFocus, "container"),
354
- values: L(
351
+ hideTimeout: k(u.hideTimeout, l.hideTimeout, 0)
352
+ })), b = Z(R(R({}, r.getState()), c.getState()), {
353
+ initialFocus: k(l.initialFocus, "container"),
354
+ values: k(
355
355
  u.values,
356
356
  l.values,
357
357
  u.defaultValues,
@@ -371,7 +371,7 @@ function Ft(n = {}) {
371
371
  d.orientation === "vertical" ? "right-start" : "bottom-start"
372
372
  );
373
373
  })
374
- ), Z(I(I(I({}, r), c), m), {
374
+ ), Z(R(R(R({}, r), c), m), {
375
375
  combobox: t,
376
376
  parent: e,
377
377
  menubar: i,
@@ -383,7 +383,7 @@ function Ft(n = {}) {
383
383
  setValue: (d, g) => {
384
384
  d !== "__proto__" && d !== "constructor" && (Array.isArray(d) || m.setState("values", (w) => {
385
385
  const M = w[d], f = ht(g, M);
386
- return f === M ? w : Z(I({}, w), {
386
+ return f === M ? w : Z(R({}, w), {
387
387
  [d]: f !== void 0 && f
388
388
  });
389
389
  }));
@@ -406,7 +406,7 @@ function Ht(n, o, t) {
406
406
  }
407
407
  function Ne(n = {}) {
408
408
  const o = qe(), t = ze(), e = et();
409
- n = k(E({}, n), {
409
+ n = L(E({}, n), {
410
410
  parent: n.parent !== void 0 ? n.parent : o,
411
411
  menubar: n.menubar !== void 0 ? n.menubar : t,
412
412
  combobox: n.combobox !== void 0 ? n.combobox : e
@@ -426,11 +426,11 @@ function Ct(n) {
426
426
  a || c.hasAttribute("aria-label") ? u(void 0) : r.id && u(r.id);
427
427
  }, [a, s, l]), i;
428
428
  }
429
- var Re = Q(
429
+ var De = J(
430
430
  function(o) {
431
431
  var t = o, { store: e, alwaysVisible: i, composite: u } = t, a = $(t, ["store", "alwaysVisible", "composite"]);
432
432
  const s = ae();
433
- e = e || s, J(
433
+ e = e || s, Q(
434
434
  e,
435
435
  process.env.NODE_ENV !== "production" && "MenuList must receive a `store` prop or be wrapped in a MenuProvider component."
436
436
  );
@@ -444,17 +444,17 @@ var Re = Q(
444
444
  ), f = q((h) => {
445
445
  if (m == null || m(h), !h.defaultPrevented) {
446
446
  if (c || r && !w) {
447
- const R = {
447
+ const D = {
448
448
  ArrowRight: () => d === "left" && !w,
449
449
  ArrowLeft: () => d === "right" && !w,
450
450
  ArrowUp: () => d === "bottom" && w,
451
451
  ArrowDown: () => d === "top" && w
452
452
  }[h.key];
453
- if (R != null && R())
453
+ if (D != null && D())
454
454
  return h.stopPropagation(), h.preventDefault(), e == null ? void 0 : e.hide();
455
455
  }
456
456
  if (r) {
457
- const R = {
457
+ const D = {
458
458
  ArrowRight: () => {
459
459
  if (M)
460
460
  return r.next();
@@ -471,7 +471,7 @@ var Re = Q(
471
471
  if (!M)
472
472
  return r.previous();
473
473
  }
474
- }[h.key], x = R == null ? void 0 : R();
474
+ }[h.key], x = D == null ? void 0 : D();
475
475
  x !== void 0 && (h.stopPropagation(), h.preventDefault(), r.move(x));
476
476
  }
477
477
  }
@@ -481,8 +481,8 @@ var Re = Q(
481
481
  (h) => /* @__PURE__ */ y(We, { value: e, children: h }),
482
482
  [e]
483
483
  );
484
- const F = Ct(E({ store: e }, a)), V = e.useState("mounted"), C = nt(V, a.hidden, i), H = C ? k(E({}, a.style), { display: "none" }) : a.style;
485
- a = k(E({
484
+ const F = Ct(E({ store: e }, a)), V = e.useState("mounted"), C = nt(V, a.hidden, i), H = C ? L(E({}, a.style), { display: "none" }) : a.style;
485
+ a = L(E({
486
486
  id: b,
487
487
  "aria-labelledby": F,
488
488
  hidden: C
@@ -499,10 +499,10 @@ var Re = Q(
499
499
  }
500
500
  );
501
501
  te(function(o) {
502
- const t = Re(o);
502
+ const t = De(o);
503
503
  return ne(xt, t);
504
504
  });
505
- var Tt = "div", Nt = Q(function(o) {
505
+ var Tt = "div", Nt = J(function(o) {
506
506
  var t = o, {
507
507
  store: e,
508
508
  modal: i = !1,
@@ -521,20 +521,20 @@ var Tt = "div", Nt = Q(function(o) {
521
521
  "alwaysVisible"
522
522
  ]);
523
523
  const b = ae();
524
- e = e || b, J(
524
+ e = e || b, Q(
525
525
  e,
526
526
  process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
527
527
  );
528
528
  const m = U(null), d = e.parent, g = e.menubar, w = !!d, M = !!g && !w;
529
- c = k(E({}, c), {
529
+ c = L(E({}, c), {
530
530
  ref: ee(m, c.ref)
531
531
  });
532
- const f = Re(E({
532
+ const f = De(E({
533
533
  store: e,
534
534
  alwaysVisible: r
535
535
  }, c)), { "aria-labelledby": F } = f;
536
536
  c = $(f, ["aria-labelledby"]);
537
- const [C, H] = ue(), T = e.useState("autoFocusOnShow"), h = e.useState("initialFocus"), N = e.useState("baseElement"), R = e.useState("renderedItems");
537
+ const [C, H] = ue(), T = e.useState("autoFocusOnShow"), h = e.useState("initialFocus"), N = e.useState("baseElement"), D = e.useState("renderedItems");
538
538
  B(() => {
539
539
  let O = !1;
540
540
  return H((_) => {
@@ -545,10 +545,10 @@ var Tt = "div", Nt = Q(function(o) {
545
545
  switch (h) {
546
546
  // TODO: Refactor
547
547
  case "first":
548
- j.current = ((Y = R.find((K) => !K.disabled && K.element)) == null ? void 0 : Y.element) || null;
548
+ j.current = ((Y = D.find((K) => !K.disabled && K.element)) == null ? void 0 : Y.element) || null;
549
549
  break;
550
550
  case "last":
551
- j.current = ((G = [...R].reverse().find((K) => !K.disabled && K.element)) == null ? void 0 : G.element) || null;
551
+ j.current = ((G = [...D].reverse().find((K) => !K.disabled && K.element)) == null ? void 0 : G.element) || null;
552
552
  break;
553
553
  default:
554
554
  j.current = N;
@@ -557,8 +557,8 @@ var Tt = "div", Nt = Q(function(o) {
557
557
  }), () => {
558
558
  O = !0;
559
559
  };
560
- }, [e, T, h, R, N]);
561
- const x = w ? !1 : i, p = !!s, D = !!C || !!c.initialFocus || !!x, v = W(
560
+ }, [e, T, h, D, N]);
561
+ const x = w ? !1 : i, p = !!s, I = !!C || !!c.initialFocus || !!x, v = W(
562
562
  e.combobox || e,
563
563
  "contentElement"
564
564
  ), A = W(
@@ -572,11 +572,11 @@ var Tt = "div", Nt = Q(function(o) {
572
572
  }, [v, A]);
573
573
  return P !== void 0 && (c = E({
574
574
  preserveTabOrderAnchor: P
575
- }, c)), c = Ce(k(E({
575
+ }, c)), c = Ce(L(E({
576
576
  store: e,
577
577
  alwaysVisible: r,
578
578
  initialFocus: C,
579
- autoFocusOnShow: p ? D && s : T || !!x
579
+ autoFocusOnShow: p ? I && s : T || !!x
580
580
  }, c), {
581
581
  hideOnEscape(O) {
582
582
  return ye(a, O) ? !1 : (e == null || e.hideAll(), !0);
@@ -593,19 +593,19 @@ var Tt = "div", Nt = Q(function(o) {
593
593
  })), c = E({
594
594
  "aria-labelledby": F
595
595
  }, c), c;
596
- }), Rt = Se(
596
+ }), Dt = Se(
597
597
  te(function(o) {
598
598
  const t = Nt(o);
599
599
  return ne(Tt, t);
600
600
  }),
601
601
  ae
602
602
  );
603
- function Dt(n = {}) {
603
+ function It(n = {}) {
604
604
  const o = Ne(n);
605
605
  return /* @__PURE__ */ y(Ee, { value: o, children: n.children });
606
606
  }
607
- var It = "button";
608
- function kt(n, o) {
607
+ var Rt = "button";
608
+ function Lt(n, o) {
609
609
  return {
610
610
  ArrowDown: o === "bottom" || o === "top" ? "first" : !1,
611
611
  ArrowUp: o === "bottom" || o === "top" ? "last" : !1,
@@ -616,7 +616,7 @@ function kt(n, o) {
616
616
  function Me(n, o) {
617
617
  return !!(n != null && n.some((t) => !t.element || t.element === o ? !1 : t.element.getAttribute("aria-expanded") === "true"));
618
618
  }
619
- var Lt = Q(
619
+ var kt = J(
620
620
  function(o) {
621
621
  var t = o, {
622
622
  store: e,
@@ -630,7 +630,7 @@ var Lt = Q(
630
630
  "showOnHover"
631
631
  ]);
632
632
  const l = ae();
633
- e = e || l, J(
633
+ e = e || l, Q(
634
634
  e,
635
635
  process.env.NODE_ENV !== "production" && "MenuButton must receive a `store` prop or be wrapped in a MenuProvider component."
636
636
  );
@@ -639,41 +639,41 @@ var Lt = Q(
639
639
  p && (e == null || e.setDisclosureElement(p), e == null || e.setAnchorElement(p), e == null || e.show());
640
640
  }, M = s.onFocus, f = q((p) => {
641
641
  if (M == null || M(p), g || p.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !b) || !d) return;
642
- const { items: D } = b.getState();
643
- Me(D, p.currentTarget) && w();
642
+ const { items: I } = b.getState();
643
+ Me(I, p.currentTarget) && w();
644
644
  }), F = W(
645
645
  e,
646
646
  (p) => p.placement.split("-")[0]
647
647
  ), V = s.onKeyDown, C = q((p) => {
648
648
  if (V == null || V(p), g || p.defaultPrevented) return;
649
- const D = kt(p, F);
650
- D && (p.preventDefault(), w(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(D));
649
+ const I = Lt(p, F);
650
+ I && (p.preventDefault(), w(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(I));
651
651
  }), H = s.onClick, T = q((p) => {
652
652
  if (H == null || H(p), p.defaultPrevented || !e) return;
653
- const D = !p.detail, { open: v } = e.getState();
654
- (!v || D) && ((!m || D) && e.setAutoFocusOnShow(!0), e.setInitialFocus(D ? "first" : "container")), m && w();
653
+ const I = !p.detail, { open: v } = e.getState();
654
+ (!v || I) && ((!m || I) && e.setAutoFocusOnShow(!0), e.setInitialFocus(I ? "first" : "container")), m && w();
655
655
  });
656
656
  s = fe(
657
657
  s,
658
658
  (p) => /* @__PURE__ */ y(Ee, { value: e, children: p }),
659
659
  [e]
660
- ), m && (s = k(E({}, s), {
660
+ ), m && (s = L(E({}, s), {
661
661
  render: /* @__PURE__ */ y(rt.div, { render: s.render })
662
662
  }));
663
663
  const h = Fe(s.id), N = W(
664
664
  (c == null ? void 0 : c.combobox) || c,
665
665
  "contentElement"
666
- ), R = m || d ? Mt(N, "menuitem") : void 0, x = e.useState("contentElement");
667
- return s = k(E({
666
+ ), D = m || d ? Mt(N, "menuitem") : void 0, x = e.useState("contentElement");
667
+ return s = L(E({
668
668
  id: h,
669
- role: R,
669
+ role: D,
670
670
  "aria-haspopup": gt(x, "menu")
671
671
  }, s), {
672
672
  ref: ee(r, s.ref),
673
673
  onFocus: f,
674
674
  onKeyDown: C,
675
675
  onClick: T
676
- }), s = Te(k(E({
676
+ }), s = Te(L(E({
677
677
  store: e,
678
678
  focusable: i,
679
679
  accessibleWhenDisabled: u
@@ -701,12 +701,12 @@ var Lt = Q(
701
701
  }, s)), s;
702
702
  }
703
703
  ), Vt = te(function(o) {
704
- const t = Lt(o);
705
- return ne(It, t);
704
+ const t = kt(o);
705
+ return ne(Rt, t);
706
706
  });
707
707
  const Bt = ({ item: n }) => {
708
708
  const o = n.icon || Ze, t = Ne();
709
- return /* @__PURE__ */ oe(Dt, { store: t, children: [
709
+ return /* @__PURE__ */ oe(It, { store: t, children: [
710
710
  /* @__PURE__ */ oe(
711
711
  Vt,
712
712
  {
@@ -725,7 +725,7 @@ const Bt = ({ item: n }) => {
725
725
  }
726
726
  ),
727
727
  /* @__PURE__ */ y(
728
- Rt,
728
+ Dt,
729
729
  {
730
730
  gutter: 12,
731
731
  shift: 0,
@@ -740,19 +740,19 @@ const Bt = ({ item: n }) => {
740
740
  }, jt = ({ item: n }) => {
741
741
  switch (n.type) {
742
742
  case "action":
743
- return /* @__PURE__ */ y(Ie, { item: n });
743
+ return /* @__PURE__ */ y(Re, { item: n });
744
744
  case "toggle":
745
745
  return /* @__PURE__ */ y($e, { item: n });
746
746
  case "submenu":
747
747
  return /* @__PURE__ */ y(Bt, { item: n });
748
748
  case "separator":
749
- return /* @__PURE__ */ y(ke, {});
749
+ return /* @__PURE__ */ y(Le, {});
750
750
  }
751
751
  };
752
752
  export {
753
- Dt as M,
753
+ It as M,
754
754
  Bt as S,
755
755
  Vt as a,
756
- Rt as b,
756
+ Dt as b,
757
757
  jt as c
758
758
  };
@@ -1 +1,3 @@
1
1
  export { Draggable } from './draggable';
2
+ export { Resizable } from './resizable';
3
+ export { VisuallyHidden } from './visually-hidden';
@@ -1,4 +1,8 @@
1
- import { Draggable as e } from "./draggable/index.js";
1
+ import { Draggable as o } from "./draggable/index.js";
2
+ import { Resizable as l } from "./resizable/index.js";
3
+ import { VisuallyHidden as i } from "./visually-hidden/index.js";
2
4
  export {
3
- e as Draggable
5
+ o as Draggable,
6
+ l as Resizable,
7
+ i as VisuallyHidden
4
8
  };
@@ -2,14 +2,15 @@ import { jsxs as v, jsx as h } from "react/jsx-runtime";
2
2
  import { cn as g } from "../../utils/css.js";
3
3
  import { useRef as _, useState as z, useEffect as R } from "react";
4
4
  import { Draggable as d } from "../draggable/index.js";
5
- import '../../assets/index.css';const j = ({
5
+ import '../../assets/style.css';/* empty css */
6
+ const B = ({
6
7
  as: c,
7
8
  axis: t = "both",
8
9
  className: m,
9
10
  children: f,
10
11
  ...b
11
12
  }) => {
12
- const u = c || "div", i = _(null), [r, n] = z({
13
+ const p = c || "div", i = _(null), [r, n] = z({
13
14
  x: 0,
14
15
  y: 0,
15
16
  width: 0,
@@ -27,8 +28,8 @@ import '../../assets/index.css';const j = ({
27
28
  }, s = (e) => {
28
29
  t !== "y" && (i.current.style.width = `${r.width + e.delta.x}px`), t !== "x" && (i.current.style.height = `${r.height + e.delta.y}px`);
29
30
  }, l = (e) => {
30
- n(({ x: p, y: x, ...y }) => ({
31
- x: p + e.delta.x,
31
+ n(({ x: u, y: x, ...y }) => ({
32
+ x: u + e.delta.x,
32
33
  y: x + e.delta.y,
33
34
  ...y
34
35
  })), a();
@@ -36,7 +37,7 @@ import '../../assets/index.css';const j = ({
36
37
  return R(() => {
37
38
  a();
38
39
  }, []), /* @__PURE__ */ v(
39
- u,
40
+ p,
40
41
  {
41
42
  className: g("primitive-resizable", m),
42
43
  ref: i,
@@ -72,5 +73,5 @@ import '../../assets/index.css';const j = ({
72
73
  );
73
74
  };
74
75
  export {
75
- j as Resizable
76
+ B as Resizable
76
77
  };
@@ -0,0 +1,6 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import '../../assets/styles.css';/* empty css */
3
+ const r = ({ children: i }) => /* @__PURE__ */ o("div", { className: "component-visually-hidden", children: i });
4
+ export {
5
+ r as VisuallyHidden
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrdagency/blockout",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "A React component library created by WRD.agency",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -56,6 +56,7 @@
56
56
  "dependencies": {
57
57
  "@ariakit/react": "^0.4.17",
58
58
  "@phosphor-icons/react": "^2.1.8",
59
+ "match-sorter": "^8.0.1",
59
60
  "object-hash": "^3.0.0"
60
61
  }
61
62
  }
@@ -1,5 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import '../../assets/index3.css';const o = ({ children: e }) => /* @__PURE__ */ i("div", { className: "component-visually-hidden", children: e });
3
- export {
4
- o as VisuallyHidden
5
- };