@wrdagency/blockout 1.0.26 → 1.0.29

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 (200) hide show
  1. package/dist/{2NBKRL7C-Cunv252F.js → 2NBKRL7C-DBbnghCe.js} +16 -16
  2. package/dist/{2RSXSRCN-dNqvVCu5.js → 2RSXSRCN-BxQ_v-Je.js} +15 -15
  3. package/dist/{4CMBR7SL-Cf8t3EeF.js → 4CMBR7SL-DezfZPUS.js} +25 -25
  4. package/dist/{5JTVDSTH-zDMMKAyC.js → 5JTVDSTH-CZ7mfyUK.js} +4 -4
  5. package/dist/{5VQZOHHZ-BbettT93.js → 5VQZOHHZ-DLX-ulBK.js} +1 -1
  6. package/dist/{6VRAQV3D-pLV6BqmA.js → 6VRAQV3D-BYmT0QTl.js} +6 -6
  7. package/dist/{A3WPL2ZJ-DEsxy0M-.js → A3WPL2ZJ-24tGIJIQ.js} +2 -2
  8. package/dist/{BM6PGYQY-g6WySwtg.js → BM6PGYQY-DCbkDr5N.js} +4 -4
  9. package/dist/{DG5U6ZEL-9kCi_mGg.js → DG5U6ZEL-DB0iwihy.js} +3 -3
  10. package/dist/{EM5CXX6A-BAj-o9Ka.js → EM5CXX6A-B4ZS4Hs_.js} +2 -2
  11. package/dist/{F5MUBM3I-AbDoeFd8.js → F5MUBM3I-75qY3y0N.js} +17 -17
  12. package/dist/{G7GW6PWC-DeYlSr7f.js → G7GW6PWC-Dk4hVbAk.js} +32 -32
  13. package/dist/{IWEFDH56-DLJvQd6v.js → IWEFDH56-BACkQ6dc.js} +3 -3
  14. package/dist/{J2LQO3EC-Cevd6Bvq.js → J2LQO3EC-BXJIaM2U.js} +2 -2
  15. package/dist/JMHAJKUZ-D5KCN1Aj.js +114 -0
  16. package/dist/{KFH4SEIX-JLk95eQA.js → KFH4SEIX-DaQeP5D_.js} +13 -13
  17. package/dist/{LMDWO4NN-BfJb6my4.js → LMDWO4NN-CpSMaD5G.js} +26 -26
  18. package/dist/MAXQOH4L-BYWBWXpb.js +459 -0
  19. package/dist/{MR26YJYP-CDaPeerB.js → MR26YJYP-CTh6rCwA.js} +66 -66
  20. package/dist/{MTZPJQMC-CraWj4on.js → MTZPJQMC-D2i4-LA_.js} +4 -4
  21. package/dist/{O2PQ2652-BCwdW7qA.js → O2PQ2652-DIoegIkE.js} +3 -3
  22. package/dist/{P7GR5CS5-DbUZzAnv.js → P7GR5CS5-3RsPGPTy.js} +1 -1
  23. package/dist/{PFRGBC2K-DmHoUTiZ.js → PFRGBC2K-BdRJd-gU.js} +36 -36
  24. package/dist/{RS7LB2H4-D1_VRecC.js → RS7LB2H4-COOfOq9w.js} +1 -1
  25. package/dist/{RZ4GPYOB-rG3RP8Xi.js → RZ4GPYOB-CovncfhJ.js} +5 -5
  26. package/dist/{S43UC3DV-bOoyE-xW.js → S43UC3DV-HCi6u_G4.js} +8 -8
  27. package/dist/{T7VMP3TM-DZitNAMz.js → T7VMP3TM-C8D6mVva.js} +19 -19
  28. package/dist/{TIW3GMFC-DPiX149D.js → TIW3GMFC-BF0w2_9R.js} +16 -16
  29. package/dist/{TP7N7UIH-D_nR5wDv.js → TP7N7UIH-C4jXJDlO.js} +2 -2
  30. package/dist/{UQQRIHDV-ULrGYPSq.js → UQQRIHDV-DEGlgATx.js} +10 -10
  31. package/dist/{UYGDZTLQ-CTQQ8oFQ.js → UYGDZTLQ-HiDKLOW5.js} +2 -2
  32. package/dist/{VIIRIBF3-C4pOScX8.js → VIIRIBF3-B-djNAU9.js} +3 -3
  33. package/dist/{WMYDSCNQ-qLZnyPON.js → WMYDSCNQ-pGjWB-Pk.js} +12 -12
  34. package/dist/{WYCIER3C-BJwD0YDE.js → WYCIER3C-CxfgpZG_.js} +2 -2
  35. package/dist/{YORGHBM4-6CReFG7i.js → YORGHBM4-D_fOXG5Y.js} +1 -1
  36. package/dist/{YV4JVR4I-D8_aZ62q.js → YV4JVR4I-CQnJhUSg.js} +26 -26
  37. package/dist/assets/button.css +1 -1
  38. package/dist/assets/index19.css +1 -1
  39. package/dist/assets/index20.css +1 -1
  40. package/dist/assets/index21.css +1 -1
  41. package/dist/assets/index9.css +1 -1
  42. package/dist/assets/static.css +1 -0
  43. package/dist/assets/style.css +1 -1
  44. package/dist/assets/style10.css +1 -1
  45. package/dist/assets/style6.css +1 -1
  46. package/dist/assets/style8.css +1 -1
  47. package/dist/assets/style9.css +1 -1
  48. package/dist/{combobox-group-BCdU5rML.js → combobox-group-hNvv1WJm.js} +3 -3
  49. package/dist/{combobox-popover-D5bLZY4d.js → combobox-popover-BZ_1wNrj.js} +5 -5
  50. package/dist/components/avatar/index.d.ts +2 -2
  51. package/dist/components/avatar/index.js +20 -18
  52. package/dist/components/breadcrumbs/index.js +5 -5
  53. package/dist/components/button/icon.js +1 -1
  54. package/dist/components/button/row.js +4 -4
  55. package/dist/components/command-palette/dialog.d.ts +9 -0
  56. package/dist/components/command-palette/dialog.js +34 -0
  57. package/dist/components/command-palette/index.js +8 -175
  58. package/dist/components/command-palette/presets.d.ts +4 -0
  59. package/dist/components/command-palette/presets.js +10 -0
  60. package/dist/components/command-palette/static.d.ts +19 -0
  61. package/dist/components/command-palette/static.js +76 -0
  62. package/dist/components/controls/base-popover-control/index.js +4 -4
  63. package/dist/components/controls/checkbox-control/index.js +1 -1
  64. package/dist/components/controls/choice-control/choice.js +1 -1
  65. package/dist/components/controls/choice-control/index.js +1 -1
  66. package/dist/components/controls/date-control/index.js +2 -2
  67. package/dist/components/controls/date-control/picker.js +5 -5
  68. package/dist/components/controls/list-control/item.js +1 -1
  69. package/dist/components/controls/recurrence-control/index.js +1 -1
  70. package/dist/components/controls/select-control/control.js +1 -1
  71. package/dist/components/controls/select-control/select.js +33 -32
  72. package/dist/components/controls/tag-control/ariakit-experimental.js +253 -252
  73. package/dist/components/controls/tag-control/index.js +9 -8
  74. package/dist/components/controls/tag-control/props.js +1 -1
  75. package/dist/components/controls/toggle-control/index.js +1 -1
  76. package/dist/components/controls/toggle-group-control/index.js +1 -1
  77. package/dist/components/data-form/status.js +1 -1
  78. package/dist/components/data-form/submit.js +1 -1
  79. package/dist/components/data-view/data/filter.js +2 -2
  80. package/dist/components/data-view/index.js +1 -1
  81. package/dist/components/data-view/layouts/grid/group.js +2 -2
  82. package/dist/components/data-view/layouts/grid/item.js +2 -2
  83. package/dist/components/data-view/layouts/kanban/group.js +2 -2
  84. package/dist/components/data-view/layouts/kanban/item.js +2 -2
  85. package/dist/components/data-view/layouts/kanban/root.js +1 -1
  86. package/dist/components/data-view/layouts/list/group.js +2 -2
  87. package/dist/components/data-view/layouts/list/item.js +2 -2
  88. package/dist/components/data-view/layouts/table/empty.js +2 -2
  89. package/dist/components/data-view/layouts/table/group.js +3 -3
  90. package/dist/components/data-view/layouts/table/item.js +3 -3
  91. package/dist/components/data-view/layouts/table/root.js +2 -2
  92. package/dist/components/data-view/layouts/tile/group.js +2 -2
  93. package/dist/components/data-view/layouts/tile/item.js +2 -2
  94. package/dist/components/data-view/parts/body/empty.js +1 -1
  95. package/dist/components/data-view/parts/body/index.js +4 -4
  96. package/dist/components/data-view/parts/controls/index.js +2 -2
  97. package/dist/components/data-view/parts/controls/search.js +2 -2
  98. package/dist/components/data-view/parts/filters/chip.js +1 -1
  99. package/dist/components/data-view/parts/filters/editor.js +1 -1
  100. package/dist/components/data-view/parts/footer/actions.js +2 -2
  101. package/dist/components/data-view/parts/footer/index.js +2 -2
  102. package/dist/components/data-view/parts/footer/selection.js +2 -2
  103. package/dist/components/data-view/parts/view-control/index.js +2 -2
  104. package/dist/components/data-view/root.js +2 -2
  105. package/dist/components/data-view/slots/group/checkbox.js +3 -3
  106. package/dist/components/data-view/slots/group/context.js +1 -1
  107. package/dist/components/data-view/slots/group/header.js +1 -1
  108. package/dist/components/data-view/slots/group/icon.js +1 -1
  109. package/dist/components/data-view/slots/group/index.js +1 -1
  110. package/dist/components/data-view/slots/group/label.js +1 -1
  111. package/dist/components/data-view/slots/index.js +3 -3
  112. package/dist/components/data-view/slots/item/actions.js +1 -1
  113. package/dist/components/data-view/slots/item/checkbox.js +2 -2
  114. package/dist/components/data-view/slots/item/depth.js +3 -3
  115. package/dist/components/data-view/slots/item/description.js +1 -1
  116. package/dist/components/data-view/slots/item/index.js +1 -1
  117. package/dist/components/data-view/slots/item/properties.js +2 -2
  118. package/dist/components/data-view/slots/item/relations.js +3 -3
  119. package/dist/components/data-view/slots/item/tags.js +1 -1
  120. package/dist/components/data-view/slots/item/thumbnail.js +1 -1
  121. package/dist/components/data-view/slots/item/title.js +1 -1
  122. package/dist/components/data-view/slots/item/util.js +2 -2
  123. package/dist/components/data-view/slots/property/field/editable.js +2 -2
  124. package/dist/components/data-view/slots/property/field/index.js +1 -1
  125. package/dist/components/data-view/slots/property/field/static.js +1 -1
  126. package/dist/components/data-view/slots/property/index.js +1 -1
  127. package/dist/components/data-view/slots/property/label.js +1 -1
  128. package/dist/components/data-view/slots/root/checkbox.js +2 -2
  129. package/dist/components/data-view/slots/root/index.js +1 -1
  130. package/dist/components/dialog/index.js +3 -3
  131. package/dist/components/filesystem/file.js +1 -1
  132. package/dist/components/filesystem/folder.js +5 -5
  133. package/dist/components/filesystem/list.js +1 -1
  134. package/dist/components/filesystem/root.js +1 -1
  135. package/dist/components/index.d.ts +1 -1
  136. package/dist/components/index.js +1 -1
  137. package/dist/components/menu/index.js +2 -2
  138. package/dist/components/menu/item.js +1 -1
  139. package/dist/components/menu/items/action.js +1 -1
  140. package/dist/components/menu/items/spacer.js +1 -1
  141. package/dist/components/menu/items/submenu.js +3 -3
  142. package/dist/components/menu/items/toggle.js +1 -1
  143. package/dist/components/progress/index.js +1 -1
  144. package/dist/components/shell/index.js +14 -12
  145. package/dist/components/shell/navigation-separator.d.ts +6 -0
  146. package/dist/components/shell/navigation-separator.js +14 -0
  147. package/dist/components/shell/pane.js +1 -1
  148. package/dist/components/shell/sidebar-item.d.ts +5 -4
  149. package/dist/components/shell/sidebar-item.js +26 -20
  150. package/dist/components/tabs/list.js +1 -1
  151. package/dist/components/tabs/panel.js +1 -1
  152. package/dist/components/tabs/root.js +1 -1
  153. package/dist/components/tabs/tab.js +1 -1
  154. package/dist/components/tag/tag.js +1 -1
  155. package/dist/components/toolbar/divider.js +1 -1
  156. package/dist/components/toolbar/index.js +1 -1
  157. package/dist/components/toolbar/root.js +1 -1
  158. package/dist/components/window/index.js +2 -2
  159. package/dist/{composite-provider-DFOFHro7.js → composite-provider-BPIeS4Cg.js} +2 -2
  160. package/dist/{disclosure-provider-DIT2ijtk.js → disclosure-provider-cEVysvZT.js} +2 -2
  161. package/dist/{filter-DzrtcAfG.js → filter-DHK0UoZG.js} +1 -1
  162. package/dist/{index-Bp_FFk15.js → index-BLCPauyN.js} +2 -2
  163. package/dist/{index-B5z_GwnD.js → index-BnbjJBS4.js} +3 -3
  164. package/dist/{index-C8OctMj0.js → index-CLl-PPjx.js} +1 -1
  165. package/dist/index.d.ts +1 -0
  166. package/dist/index.js +77 -56
  167. package/dist/{item-CGLYiEST.js → item-CmTk8eHD.js} +2 -2
  168. package/dist/{menu-button-C-h3k7Gh.js → menu-button-GQO5dB3U.js} +33 -33
  169. package/dist/{menu-separator-CuuhJPnR.js → menu-separator-Z6pSHpX5.js} +3 -3
  170. package/dist/{picker-BUCg1BqW.js → picker-DyJogHYh.js} +4 -4
  171. package/dist/{popover-provider-BoZ9PI_r.js → popover-provider-BJEfhgr1.js} +4 -4
  172. package/dist/presets-BDIhXP0C.js +148 -0
  173. package/dist/primitives/icon-label/index.d.ts +2 -0
  174. package/dist/primitives/icon-label/index.js +18 -14
  175. package/dist/primitives/link/index.d.ts +3 -1
  176. package/dist/primitives/link/index.js +26 -25
  177. package/dist/primitives/nav-link/index.d.ts +4 -3
  178. package/dist/primitives/nav-link/index.js +21 -17
  179. package/dist/primitives/popover/root.js +1 -1
  180. package/dist/primitives/popover/target.js +1 -1
  181. package/dist/primitives/popover/window.js +3 -3
  182. package/dist/primitives/scroll-area/index.js +1 -1
  183. package/dist/primitives/tooltip/index.d.ts +2 -0
  184. package/dist/primitives/tooltip/index.js +36 -24
  185. package/dist/{select-popover-DmN0T8PP.js → select-popover-Dheunyb0.js} +53 -53
  186. package/dist/{select-value-DnWKxDD-.js → select-value-B3DYk9eV.js} +2 -2
  187. package/dist/{tab-BXGTM7Se.js → tab-DejwS4C8.js} +4 -4
  188. package/dist/{tab-list-BPSxHllS.js → tab-list-CndMWcVv.js} +3 -3
  189. package/dist/{tab-panel-fbUcLE4f.js → tab-panel-DedzuWUA.js} +7 -7
  190. package/dist/{tab-provider-x586a8l7.js → tab-provider-B0BoLfST.js} +21 -21
  191. package/dist/{tag-remove-BdHvB_5c.js → tag-remove-Dz-sGbyZ.js} +35 -35
  192. package/dist/{toolbar-hQ58P-Nk.js → toolbar-PSaF1mdF.js} +11 -11
  193. package/dist/{toolbar-separator-CN00-jyc.js → toolbar-separator-DJHiHbGj.js} +3 -3
  194. package/dist/{tooltip-arrow-BRJ4m2ZL.js → tooltip-arrow-BVwULA6B.js} +9 -9
  195. package/dist/utils/index.d.ts +8 -0
  196. package/dist/utils/index.js +23 -0
  197. package/package.json +1 -1
  198. package/dist/MAXQOH4L-DB7jDisS.js +0 -564
  199. package/dist/assets/index22.css +0 -1
  200. package/dist/components/command-palette/index.d.ts +0 -28
@@ -1,564 +0,0 @@
1
- import { u as Je } from "./5JTVDSTH-zDMMKAyC.js";
2
- import { a as Qe } from "./WMYDSCNQ-qLZnyPON.js";
3
- import { u as Ye, C as Ge, a as Oe, c as Xe, d as Ze, e as ye, b as et, f as tt } from "./S43UC3DV-bOoyE-xW.js";
4
- import { J as ot, Y as nt, T as k, U as te, V as W, a2 as rt, x as st, a7 as ut, m as N, o as y, W as Ie, f as ae, c as ie, a as ce, _ as de, i as fe, a8 as lt, a9 as at, y as Ve, aa as se, ab as it, e as H, B as ct, b as ue, j as L, H as dt, q as Ee, n as we, S as ft, C as mt, a1 as vt, O as pt, s as bt, P as Ct, Q as St, k as gt, l as Ae, ac as xt, r as Vt } from "./LMDWO4NN-BfJb6my4.js";
5
- import { h as le } from "./PFRGBC2K-DmHoUTiZ.js";
6
- import { m as ht, p as Pt, t as Ot, c as yt, s as G, d as $, g as It, b as Et, f as oe, u as wt } from "./YV4JVR4I-D8_aZ62q.js";
7
- import { createContext as ke, useRef as z, useState as Le, useEffect as X, useMemo as At, useCallback as kt, useContext as Lt } from "react";
8
- import { e as _t, C as Tt } from "./P7GR5CS5-DbUZzAnv.js";
9
- import { c as Kt, a as Dt } from "./O2PQ2652-BCwdW7qA.js";
10
- import { c as Rt, d as Mt, b as Bt } from "./4CMBR7SL-Cf8t3EeF.js";
11
- import { jsx as Z } from "react/jsx-runtime";
12
- import { u as Ft } from "./UQQRIHDV-ULrGYPSq.js";
13
- import { u as Ht } from "./6VRAQV3D-pLV6BqmA.js";
14
- import { i as Nt } from "./KFH4SEIX-JLk95eQA.js";
15
- var xo = ke(null), Vo = ke(
16
- null
17
- ), ne = ot(
18
- [Tt],
19
- [_t]
20
- ), Ut = ne.useContext, ho = ne.useProviderContext, Po = ne.ContextProvider, Oo = ne.ScopedContextProvider, jt = st() && ut();
21
- function qt(o = {}) {
22
- var n = o, {
23
- tag: r
24
- } = n, e = nt(n, [
25
- "tag"
26
- ]);
27
- const c = ht(e.store, Pt(r, ["value", "rtl"]));
28
- Ot(e, c);
29
- const d = r == null ? void 0 : r.getState(), u = c == null ? void 0 : c.getState(), T = k(
30
- e.activeId,
31
- u == null ? void 0 : u.activeId,
32
- e.defaultActiveId,
33
- null
34
- ), w = Rt(te(W({}, e), {
35
- activeId: T,
36
- includesBaseElement: k(
37
- e.includesBaseElement,
38
- u == null ? void 0 : u.includesBaseElement,
39
- !0
40
- ),
41
- orientation: k(
42
- e.orientation,
43
- u == null ? void 0 : u.orientation,
44
- "vertical"
45
- ),
46
- focusLoop: k(e.focusLoop, u == null ? void 0 : u.focusLoop, !0),
47
- focusWrap: k(e.focusWrap, u == null ? void 0 : u.focusWrap, !0),
48
- virtualFocus: k(
49
- e.virtualFocus,
50
- u == null ? void 0 : u.virtualFocus,
51
- !0
52
- )
53
- })), I = Kt(te(W({}, e), {
54
- placement: k(
55
- e.placement,
56
- u == null ? void 0 : u.placement,
57
- "bottom-start"
58
- )
59
- })), K = k(
60
- e.value,
61
- u == null ? void 0 : u.value,
62
- e.defaultValue,
63
- ""
64
- ), O = k(
65
- e.selectedValue,
66
- u == null ? void 0 : u.selectedValue,
67
- d == null ? void 0 : d.values,
68
- e.defaultSelectedValue,
69
- ""
70
- ), f = Array.isArray(O), _ = te(W(W({}, w.getState()), I.getState()), {
71
- value: K,
72
- selectedValue: O,
73
- resetValueOnSelect: k(
74
- e.resetValueOnSelect,
75
- u == null ? void 0 : u.resetValueOnSelect,
76
- f
77
- ),
78
- resetValueOnHide: k(
79
- e.resetValueOnHide,
80
- u == null ? void 0 : u.resetValueOnHide,
81
- f && !r
82
- ),
83
- activeValue: u == null ? void 0 : u.activeValue
84
- }), l = yt(_, w, I, c);
85
- return jt && G(
86
- l,
87
- () => $(l, ["virtualFocus"], () => {
88
- l.setState("virtualFocus", !1);
89
- })
90
- ), G(l, () => {
91
- if (r)
92
- return rt(
93
- $(l, ["selectedValue"], (i) => {
94
- Array.isArray(i.selectedValue) && r.setValues(i.selectedValue);
95
- }),
96
- $(r, ["values"], (i) => {
97
- l.setState("selectedValue", i.values);
98
- })
99
- );
100
- }), G(
101
- l,
102
- () => $(l, ["resetValueOnHide", "mounted"], (i) => {
103
- i.resetValueOnHide && (i.mounted || l.setState("value", K));
104
- })
105
- ), G(
106
- l,
107
- () => $(l, ["open"], (i) => {
108
- i.open || (l.setState("activeId", T), l.setState("moves", 0));
109
- })
110
- ), G(
111
- l,
112
- () => $(l, ["moves", "activeId"], (i, A) => {
113
- i.moves === A.moves && l.setState("activeValue", void 0);
114
- })
115
- ), G(
116
- l,
117
- () => It(l, ["moves", "renderedItems"], (i, A) => {
118
- if (i.moves === A.moves) return;
119
- const { activeId: V } = l.getState(), m = w.item(V);
120
- l.setState("activeValue", m == null ? void 0 : m.value);
121
- })
122
- ), te(W(W(W({}, I), w), l), {
123
- tag: r,
124
- setValue: (i) => l.setState("value", i),
125
- resetValue: () => l.setState("value", _.value),
126
- setSelectedValue: (i) => l.setState("selectedValue", i)
127
- });
128
- }
129
- function Wt(o) {
130
- const n = Ut();
131
- return o = N(y({}, o), {
132
- tag: o.tag !== void 0 ? o.tag : n
133
- }), Mt(o);
134
- }
135
- function $t(o, n, r) {
136
- return Ie(n, [r.tag]), oe(o, r, "value", "setValue"), oe(o, r, "selectedValue", "setSelectedValue"), oe(o, r, "resetValueOnHide"), oe(o, r, "resetValueOnSelect"), Object.assign(
137
- Bt(
138
- Dt(o, n, r),
139
- n,
140
- r
141
- ),
142
- { tag: r.tag }
143
- );
144
- }
145
- function zt(o = {}) {
146
- o = Wt(o);
147
- const [n, r] = Et(qt, o);
148
- return $t(n, r, o);
149
- }
150
- var Jt = "input";
151
- function he(o, n, r) {
152
- if (!r) return !1;
153
- const e = o.find((c) => !c.disabled && c.value);
154
- return (e == null ? void 0 : e.value) === n;
155
- }
156
- function Pe(o, n) {
157
- return !n || o == null ? !1 : (o = pt(o), n.length > o.length && n.toLowerCase().indexOf(o.toLowerCase()) === 0);
158
- }
159
- function Qt(o) {
160
- return o.type === "input";
161
- }
162
- function Yt(o) {
163
- return o === "inline" || o === "list" || o === "both" || o === "none";
164
- }
165
- function Gt(o) {
166
- const n = o.find((r) => {
167
- var e;
168
- return r.disabled ? !1 : ((e = r.element) == null ? void 0 : e.getAttribute("role")) !== "tab";
169
- });
170
- return n == null ? void 0 : n.id;
171
- }
172
- var Xt = ie(
173
- function(n) {
174
- var r = n, {
175
- store: e,
176
- focusable: c = !0,
177
- autoSelect: d = !1,
178
- getAutoSelectId: u,
179
- setValueOnChange: T,
180
- showMinLength: w = 0,
181
- showOnChange: I,
182
- showOnMouseDown: K,
183
- showOnClick: O = K,
184
- showOnKeyDown: f,
185
- showOnKeyPress: _ = f,
186
- blurActiveItemOnClick: l,
187
- setValueOnClick: i = !0,
188
- moveOnKeyPress: A = !0,
189
- autoComplete: V = "list"
190
- } = r, m = de(r, [
191
- "store",
192
- "focusable",
193
- "autoSelect",
194
- "getAutoSelectId",
195
- "setValueOnChange",
196
- "showMinLength",
197
- "showOnChange",
198
- "showOnMouseDown",
199
- "showOnClick",
200
- "showOnKeyDown",
201
- "showOnKeyPress",
202
- "blurActiveItemOnClick",
203
- "setValueOnClick",
204
- "moveOnKeyPress",
205
- "autoComplete"
206
- ]);
207
- const J = Ye();
208
- e = e || J, fe(
209
- e,
210
- process.env.NODE_ENV !== "production" && "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
211
- );
212
- const D = z(null), [Q, h] = lt(), C = z(!1), M = z(!1), P = e.useState(
213
- (t) => t.virtualFocus && d
214
- ), x = V === "inline" || V === "both", [U, Y] = Le(x);
215
- at(() => {
216
- x && Y(!0);
217
- }, [x]);
218
- const s = e.useState("value"), b = z();
219
- X(() => $(e, ["selectedValue", "activeId"], (t, a) => {
220
- b.current = a.selectedValue;
221
- }), []);
222
- const S = e.useState((t) => {
223
- var a;
224
- if (x && U && !(t.activeValue && Array.isArray(t.selectedValue) && (t.selectedValue.includes(t.activeValue) || (a = b.current) != null && a.includes(t.activeValue))))
225
- return t.activeValue;
226
- }), j = e.useState("renderedItems"), B = e.useState("open"), F = e.useState("contentElement"), ee = At(() => {
227
- if (!x || !U) return s;
228
- if (he(
229
- j,
230
- S,
231
- P
232
- )) {
233
- if (Pe(s, S)) {
234
- const a = (S == null ? void 0 : S.slice(s.length)) || "";
235
- return s + a;
236
- }
237
- return s;
238
- }
239
- return S || s;
240
- }, [x, U, j, S, P, s]);
241
- X(() => {
242
- const t = D.current;
243
- if (!t) return;
244
- const a = () => Y(!0);
245
- return t.addEventListener("combobox-item-move", a), () => {
246
- t.removeEventListener("combobox-item-move", a);
247
- };
248
- }, []), X(() => {
249
- if (!x || !U || !S || !he(
250
- j,
251
- S,
252
- P
253
- ) || !Pe(s, S)) return;
254
- let a = it;
255
- return queueMicrotask(() => {
256
- const v = D.current;
257
- if (!v) return;
258
- const { start: p, end: E } = Ve(v), R = s.length, g = S.length;
259
- se(v, R, g), a = () => {
260
- if (!le(v)) return;
261
- const { start: q, end: ze } = Ve(v);
262
- q === R && ze === g && se(v, p, E);
263
- };
264
- }), () => a();
265
- }, [
266
- Q,
267
- x,
268
- U,
269
- S,
270
- j,
271
- P,
272
- s
273
- ]);
274
- const _e = z(null), me = H(u), ve = z(null);
275
- X(() => {
276
- if (!B || !F) return;
277
- const t = ct(F);
278
- if (!t) return;
279
- _e.current = t;
280
- const a = () => {
281
- C.current = !1;
282
- }, v = () => {
283
- if (!e || !C.current) return;
284
- const { activeId: E } = e.getState();
285
- E !== null && E !== ve.current && (C.current = !1);
286
- }, p = { passive: !0, capture: !0 };
287
- return t.addEventListener("wheel", a, p), t.addEventListener("touchmove", a, p), t.addEventListener("scroll", v, p), () => {
288
- t.removeEventListener("wheel", a, !0), t.removeEventListener("touchmove", a, !0), t.removeEventListener("scroll", v, !0);
289
- };
290
- }, [B, F, e]), ue(() => {
291
- s && (M.current || (C.current = !0));
292
- }, [s]), ue(() => {
293
- P !== "always" && B || (C.current = B);
294
- }, [P, B]);
295
- const pe = e.useState("resetValueOnSelect");
296
- Ie(() => {
297
- var t, a;
298
- const v = C.current;
299
- if (!e || !B || !v && !pe) return;
300
- const { baseElement: p, contentElement: E, activeId: R } = e.getState();
301
- if (!(p && !le(p))) {
302
- if (E != null && E.hasAttribute("data-placing")) {
303
- const g = new MutationObserver(h);
304
- return g.observe(E, { attributeFilter: ["data-placing"] }), () => g.disconnect();
305
- }
306
- if (P && v) {
307
- const g = me(j), q = g !== void 0 ? g : (t = Gt(j)) != null ? t : e.first();
308
- ve.current = q, e.move(q ?? null);
309
- } else {
310
- const g = (a = e.item(R || e.first())) == null ? void 0 : a.element;
311
- g && "scrollIntoView" in g && g.scrollIntoView({ block: "nearest", inline: "nearest" });
312
- }
313
- }
314
- }, [
315
- e,
316
- B,
317
- Q,
318
- s,
319
- P,
320
- pe,
321
- me,
322
- j
323
- ]), X(() => {
324
- if (!x) return;
325
- const t = D.current;
326
- if (!t) return;
327
- const a = [t, F].filter(
328
- (p) => !!p
329
- ), v = (p) => {
330
- a.every((E) => vt(p, E)) && (e == null || e.setValue(ee));
331
- };
332
- for (const p of a)
333
- p.addEventListener("focusout", v);
334
- return () => {
335
- for (const p of a)
336
- p.removeEventListener("focusout", v);
337
- };
338
- }, [x, F, e, ee]);
339
- const re = (t) => t.currentTarget.value.length >= w, be = m.onChange, Te = L(I ?? re), Ke = L(
340
- // If the combobox is combined with tags, the value will be set by the tag
341
- // input component.
342
- T ?? !e.tag
343
- ), De = H((t) => {
344
- if (be == null || be(t), t.defaultPrevented || !e) return;
345
- const a = t.currentTarget, { value: v, selectionStart: p, selectionEnd: E } = a, R = t.nativeEvent;
346
- if (C.current = !0, Qt(R) && (R.isComposing && (C.current = !1, M.current = !0), x)) {
347
- const g = R.inputType === "insertText" || R.inputType === "insertCompositionText", q = p === v.length;
348
- Y(g && q);
349
- }
350
- if (Ke(t)) {
351
- const g = v === e.getState().value;
352
- e.setValue(v), queueMicrotask(() => {
353
- se(a, p, E);
354
- }), x && P && g && h();
355
- }
356
- Te(t) && e.show(), (!P || !C.current) && e.setActiveId(null);
357
- }), Ce = m.onCompositionEnd, Re = H((t) => {
358
- C.current = !0, M.current = !1, Ce == null || Ce(t), !t.defaultPrevented && P && h();
359
- }), Se = m.onMouseDown, Me = L(
360
- l ?? (() => !!(e != null && e.getState().includesBaseElement))
361
- ), Be = L(i), Fe = L(O ?? re), He = H((t) => {
362
- Se == null || Se(t), !t.defaultPrevented && (t.button || t.ctrlKey || e && (Me(t) && e.setActiveId(null), Be(t) && e.setValue(ee), Fe(t) && dt(t.currentTarget, "mouseup", e.show)));
363
- }), ge = m.onKeyDown, Ne = L(_ ?? re), Ue = H((t) => {
364
- if (ge == null || ge(t), t.repeat || (C.current = !1), t.defaultPrevented || t.ctrlKey || t.altKey || t.shiftKey || t.metaKey || !e) return;
365
- const { open: a } = e.getState();
366
- a || (t.key === "ArrowUp" || t.key === "ArrowDown") && Ne(t) && (t.preventDefault(), e.show());
367
- }), xe = m.onBlur, je = H((t) => {
368
- C.current = !1, xe == null || xe(t), t.defaultPrevented;
369
- }), qe = Ee(m.id), We = Yt(V) ? V : void 0, $e = e.useState((t) => t.activeId === null);
370
- return m = N(y({
371
- id: qe,
372
- role: "combobox",
373
- "aria-autocomplete": We,
374
- "aria-haspopup": ft(F, "listbox"),
375
- "aria-expanded": B,
376
- "aria-controls": F == null ? void 0 : F.id,
377
- "data-active-item": $e || void 0,
378
- value: ee
379
- }, m), {
380
- ref: we(D, m.ref),
381
- onChange: De,
382
- onCompositionEnd: Re,
383
- onMouseDown: He,
384
- onKeyDown: Ue,
385
- onBlur: je
386
- }), m = Je(N(y({
387
- store: e,
388
- focusable: c
389
- }, m), {
390
- // Enable inline autocomplete when the user moves from the combobox input
391
- // to an item.
392
- moveOnKeyPress: (t) => mt(A, t) ? !1 : (x && Y(!0), !0)
393
- })), m = Qe(y({ store: e }, m)), y({ autoComplete: "off" }, m);
394
- }
395
- ), yo = ae(function(n) {
396
- const r = Xt(n);
397
- return ce(Jt, r);
398
- });
399
- function Io(o = {}) {
400
- const n = zt(o);
401
- return /* @__PURE__ */ Z(Ge, { value: n, children: o.children });
402
- }
403
- var Zt = "div";
404
- function eo(o, n) {
405
- if (n != null)
406
- return o == null ? !1 : Array.isArray(o) ? o.includes(n) : o === n;
407
- }
408
- function to(o) {
409
- var n;
410
- return (n = {
411
- menu: "menuitem",
412
- listbox: "option",
413
- tree: "treeitem"
414
- }[o]) != null ? n : "option";
415
- }
416
- var oo = ie(
417
- function(n) {
418
- var r = n, {
419
- store: e,
420
- value: c,
421
- hideOnClick: d,
422
- setValueOnClick: u,
423
- selectValueOnClick: T = !0,
424
- resetValueOnSelect: w,
425
- focusOnHover: I = !1,
426
- moveOnKeyPress: K = !0,
427
- getItem: O
428
- } = r, f = de(r, [
429
- "store",
430
- "value",
431
- "hideOnClick",
432
- "setValueOnClick",
433
- "selectValueOnClick",
434
- "resetValueOnSelect",
435
- "focusOnHover",
436
- "moveOnKeyPress",
437
- "getItem"
438
- ]), _;
439
- const l = Oe();
440
- e = e || l, fe(
441
- e,
442
- process.env.NODE_ENV !== "production" && "ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component."
443
- );
444
- const { resetValueOnSelectState: i, multiSelectable: A, selected: V } = wt(e, {
445
- resetValueOnSelectState: "resetValueOnSelect",
446
- multiSelectable(s) {
447
- return Array.isArray(s.selectedValue);
448
- },
449
- selected(s) {
450
- return eo(s.selectedValue, c);
451
- }
452
- }), m = kt(
453
- (s) => {
454
- const b = N(y({}, s), { value: c });
455
- return O ? O(b) : b;
456
- },
457
- [c, O]
458
- );
459
- u = u ?? !A, d = d ?? (c != null && !A);
460
- const J = f.onClick, D = L(u), Q = L(T), h = L(
461
- (_ = w ?? i) != null ? _ : A
462
- ), C = L(d), M = H((s) => {
463
- J == null || J(s), !s.defaultPrevented && (Ct(s) || St(s) || (c != null && (Q(s) && (h(s) && (e == null || e.resetValue()), e == null || e.setSelectedValue((b) => Array.isArray(b) ? b.includes(c) ? b.filter((S) => S !== c) : [...b, c] : c)), D(s) && (e == null || e.setValue(c))), C(s) && (e == null || e.hide())));
464
- }), P = f.onKeyDown, x = H((s) => {
465
- if (P == null || P(s), s.defaultPrevented) return;
466
- const b = e == null ? void 0 : e.getState().baseElement;
467
- if (!b || le(b)) return;
468
- (s.key.length === 1 || s.key === "Backspace" || s.key === "Delete") && (queueMicrotask(() => b.focus()), gt(b) && (e == null || e.setValue(b.value)));
469
- });
470
- A && V != null && (f = y({
471
- "aria-selected": V
472
- }, f)), f = Ae(
473
- f,
474
- (s) => /* @__PURE__ */ Z(Xe.Provider, { value: c, children: /* @__PURE__ */ Z(Ze.Provider, { value: V ?? !1, children: s }) }),
475
- [c, V]
476
- );
477
- const U = Lt(ye);
478
- f = N(y({
479
- role: to(U),
480
- children: c
481
- }, f), {
482
- onClick: M,
483
- onKeyDown: x
484
- });
485
- const Y = L(K);
486
- return f = Ht(N(y({
487
- store: e
488
- }, f), {
489
- getItem: m,
490
- // Dispatch a custom event on the combobox input when moving to an item
491
- // with the keyboard so the Combobox component can enable inline
492
- // autocompletion.
493
- moveOnKeyPress: (s) => {
494
- if (!Y(s)) return !1;
495
- const b = new Event("combobox-item-move"), S = e == null ? void 0 : e.getState().baseElement;
496
- return S == null || S.dispatchEvent(b), !0;
497
- }
498
- })), f = Ft(y({ store: e, focusOnHover: I }, f)), f;
499
- }
500
- ), Eo = bt(
501
- ae(function(n) {
502
- const r = oo(n);
503
- return ce(Zt, r);
504
- })
505
- ), no = "div", ro = ie(
506
- function(n) {
507
- var r = n, { store: e, alwaysVisible: c } = r, d = de(r, ["store", "alwaysVisible"]);
508
- const u = Oe(!0), T = et();
509
- e = e || T;
510
- const w = !!e && e === u;
511
- fe(
512
- e,
513
- process.env.NODE_ENV !== "production" && "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
514
- );
515
- const I = z(null), K = Ee(d.id), O = e.useState("mounted"), f = Nt(O, d.hidden, c), _ = f ? N(y({}, d.style), { display: "none" }) : d.style, l = e.useState(
516
- (h) => Array.isArray(h.selectedValue)
517
- ), i = xt(I, "role", d.role), V = (i === "listbox" || i === "tree" || i === "grid") && l || void 0, [m, J] = Le(!1), D = e.useState("contentElement");
518
- ue(() => {
519
- if (!O) return;
520
- const h = I.current;
521
- if (!h || D !== h) return;
522
- const C = () => {
523
- J(!!h.querySelector("[role='listbox']"));
524
- }, M = new MutationObserver(C);
525
- return M.observe(h, {
526
- subtree: !0,
527
- childList: !0,
528
- attributeFilter: ["role"]
529
- }), C(), () => M.disconnect();
530
- }, [O, D]), m || (d = y({
531
- role: "listbox",
532
- "aria-multiselectable": V
533
- }, d)), d = Ae(
534
- d,
535
- (h) => /* @__PURE__ */ Z(tt, { value: e, children: /* @__PURE__ */ Z(ye.Provider, { value: i, children: h }) }),
536
- [e, i]
537
- );
538
- const Q = K && (!u || !w) ? e.setContentElement : null;
539
- return d = N(y({
540
- id: K,
541
- hidden: f
542
- }, d), {
543
- ref: we(Q, I, d.ref),
544
- style: _
545
- }), Vt(d);
546
- }
547
- ), wo = ae(function(n) {
548
- const r = ro(n);
549
- return ce(no, r);
550
- });
551
- export {
552
- Io as C,
553
- xo as T,
554
- yo as a,
555
- wo as b,
556
- Eo as c,
557
- Ut as d,
558
- Vo as e,
559
- ho as f,
560
- Oo as g,
561
- Po as h,
562
- zt as i,
563
- ro as u
564
- };
@@ -1 +0,0 @@
1
- .primitive-scroll-area,.primitive-scroll-area__viewport{width:100%;height:100%}.primitive-scroll-area__viewport>div{display:block!important;min-width:initial!important}.primitive-scroll-area__bar{display:flex;-webkit-user-select:none;user-select:none;touch-action:none;padding:.25rem;transition:background .16s ease-out;z-index:200}.primitive-scroll-area__bar[data-orientation=vertical]{width:.75rem}.primitive-scroll-area__bar[data-orientation=horizontal]{flex-direction:column;height:.75rem}.primitive-scroll-area__thumb{flex:1;background:var(--blockout__colours__surface--300);border-radius:.75rem;position:relative}.primitive-scroll-area__bar[data-orientation=vertical] .primitive-scroll-area__thumb{width:100%}.primitive-scroll-area__bar[data-orientation=horizontal] .primitive-scroll-area__thumb{height:100%}.primitive-scroll-area__thumb:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:44px;min-height:44px}.primitive-scroll-area__thumb:hover{background:var(--blockout__colours__surface--950)}
@@ -1,28 +0,0 @@
1
- import { FC } from 'react';
2
- import { Command } from './types';
3
- import * as Ariakit from "@ariakit/react";
4
- interface CommandPaletteItemProps {
5
- command: Command;
6
- className?: string;
7
- }
8
- interface CommandPaletteProps {
9
- className?: string;
10
- open?: boolean;
11
- onOpenChange?: (open: boolean) => void;
12
- search?: string;
13
- onSearchChange?: (query: string) => void;
14
- hotkey?: string;
15
- placeholder?: string;
16
- commands: Command[];
17
- suggestions?: Command[];
18
- render?: {
19
- item: FC<CommandPaletteItemProps>;
20
- group: FC<CommandPaletteItemProps>;
21
- };
22
- }
23
- export declare const CommandPalette: FC<CommandPaletteProps>;
24
- export declare const CommandItem: FC<CommandPaletteItemProps & {
25
- render?: Ariakit.ComboboxItemProps["render"];
26
- }>;
27
- export declare const CommandGroup: FC<CommandPaletteItemProps>;
28
- export type { Command };