@cryptlex/web-components 6.5.0-alpha01 → 6.5.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 (64) hide show
  1. package/dist/components/alert.d.ts +2 -2
  2. package/dist/components/alert.js.map +1 -1
  3. package/dist/components/breadcrumbs.js +1 -1
  4. package/dist/components/breadcrumbs.js.map +1 -1
  5. package/dist/components/button.js +1 -1
  6. package/dist/components/button.js.map +1 -1
  7. package/dist/components/calendar.js +1 -1
  8. package/dist/components/calendar.js.map +1 -1
  9. package/dist/components/checkbox.js +1 -1
  10. package/dist/components/checkbox.js.map +1 -1
  11. package/dist/components/data-table-commons.d.ts +0 -27
  12. package/dist/components/data-table-commons.js +1 -1
  13. package/dist/components/data-table-commons.js.map +1 -1
  14. package/dist/components/data-table-filter.js +1 -1
  15. package/dist/components/data-table.d.ts +76 -42
  16. package/dist/components/data-table.js +1 -1
  17. package/dist/components/data-table.js.map +1 -1
  18. package/dist/components/date-picker.js +1 -1
  19. package/dist/components/date-picker.js.map +1 -1
  20. package/dist/components/datefield.js +1 -1
  21. package/dist/components/datefield.js.map +1 -1
  22. package/dist/components/dialog.js +1 -1
  23. package/dist/components/dialog.js.map +1 -1
  24. package/dist/components/disclosure.js +1 -1
  25. package/dist/components/disclosure.js.map +1 -1
  26. package/dist/components/field.js +1 -1
  27. package/dist/components/field.js.map +1 -1
  28. package/dist/components/icons.d.ts +38 -0
  29. package/dist/components/icons.js +167 -0
  30. package/dist/components/icons.js.map +1 -0
  31. package/dist/components/id-search.d.ts +3 -2
  32. package/dist/components/id-search.js +1 -1
  33. package/dist/components/id-search.js.map +1 -1
  34. package/dist/components/input-otp.js +1 -1
  35. package/dist/components/input-otp.js.map +1 -1
  36. package/dist/components/key-value-card.js +1 -1
  37. package/dist/components/key-value-card.js.map +1 -1
  38. package/dist/components/list-box.js +1 -1
  39. package/dist/components/list-box.js.map +1 -1
  40. package/dist/components/loader.js +1 -1
  41. package/dist/components/loader.js.map +1 -1
  42. package/dist/components/menu.js +1 -1
  43. package/dist/components/menu.js.map +1 -1
  44. package/dist/components/multi-select.js +1 -1
  45. package/dist/components/multi-select.js.map +1 -1
  46. package/dist/components/numberfield.js +1 -1
  47. package/dist/components/numberfield.js.map +1 -1
  48. package/dist/components/searchfield.js +1 -1
  49. package/dist/components/searchfield.js.map +1 -1
  50. package/dist/components/select.js +1 -1
  51. package/dist/components/select.js.map +1 -1
  52. package/dist/components/sidebar.d.ts +1 -0
  53. package/dist/components/sidebar.js +1 -1
  54. package/dist/components/sidebar.js.map +1 -1
  55. package/dist/components/textfield.js +1 -1
  56. package/dist/components/textfield.js.map +1 -1
  57. package/dist/components/timeline.d.ts +2 -2
  58. package/dist/components/timeline.js.map +1 -1
  59. package/dist/utils/form-hook.js +1 -1
  60. package/dist/utils/form-hook.js.map +1 -1
  61. package/dist/utils/resources.d.ts +2 -0
  62. package/dist/utils/resources.js +2 -0
  63. package/dist/utils/resources.js.map +1 -0
  64. package/package.json +4 -4
@@ -0,0 +1,167 @@
1
+ import{forwardRef as s,createElement as h}from"react";/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const w=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=(...e)=>e.filter((t,o,r)=>!!t&&r.indexOf(t)===o).join(" ");/**
7
+ * @license lucide-react v0.453.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */var M={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
+ * @license lucide-react v0.453.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const C=s(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:d,...i},k)=>h("svg",{ref:k,...M,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:y("lucide",n),...i},[...d.map(([p,v])=>h(p,v)),...Array.isArray(a)?a:[a]]));/**
17
+ * @license lucide-react v0.453.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const c=(e,t)=>{const o=s(({className:r,...n},a)=>h(C,{ref:a,iconNode:t,className:y(`lucide-${w(e)}`,r),...n}));return o.displayName=`${e}`,o};/**
22
+ * @license lucide-react v0.453.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const m=c("ArrowDownNarrowWide",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]]);/**
27
+ * @license lucide-react v0.453.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const f=c("ArrowDownWideNarrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]]);/**
32
+ * @license lucide-react v0.453.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const I=c("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
37
+ * @license lucide-react v0.453.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const u=c("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
42
+ * @license lucide-react v0.453.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const x=c("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
47
+ * @license lucide-react v0.453.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const g=c("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
52
+ * @license lucide-react v0.453.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const A=c("ChevronFirst",[["path",{d:"m17 18-6-6 6-6",key:"1yerx2"}],["path",{d:"M7 6v12",key:"1p53r6"}]]);/**
57
+ * @license lucide-react v0.453.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const D=c("ChevronLast",[["path",{d:"m7 18 6-6-6-6",key:"lwmzdw"}],["path",{d:"M17 6v12",key:"1o0aio"}]]);/**
62
+ * @license lucide-react v0.453.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const j=c("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ * @license lucide-react v0.453.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const L=c("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ * @license lucide-react v0.453.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const V=c("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
77
+ * @license lucide-react v0.453.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const q=c("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
82
+ * @license lucide-react v0.453.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const b=c("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/**
87
+ * @license lucide-react v0.453.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const z=c("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
92
+ * @license lucide-react v0.453.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const l=c("Cross",[["path",{d:"M11 2a2 2 0 0 0-2 2v5H4a2 2 0 0 0-2 2v2c0 1.1.9 2 2 2h5v5c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2v-5h5a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-5V4a2 2 0 0 0-2-2h-2z",key:"1t5g7j"}]]);/**
97
+ * @license lucide-react v0.453.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const N=c("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
102
+ * @license lucide-react v0.453.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const R=c("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
107
+ * @license lucide-react v0.453.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const S=c("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
112
+ * @license lucide-react v0.453.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const E=c("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
117
+ * @license lucide-react v0.453.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const F=c("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
122
+ * @license lucide-react v0.453.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const H=c("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
127
+ * @license lucide-react v0.453.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const U=c("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
132
+ * @license lucide-react v0.453.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const T=c("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
137
+ * @license lucide-react v0.453.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const W=c("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);/**
142
+ * @license lucide-react v0.453.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const P=c("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
147
+ * @license lucide-react v0.453.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const $=c("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
152
+ * @license lucide-react v0.453.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const G=c("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
157
+ * @license lucide-react v0.453.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const O=c("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
162
+ * @license lucide-react v0.453.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const B=c("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),Z=q,J=b,Q=G,X=B,Y=l,_=l,c1=P,e1=O,t1=L,o1=j,r1=V,a1=g,n1=A,h1=D,s1=W,y1=S,l1=R,d1=x,i1=T,k1=N,p1=E,v1=u,w1=m,M1=f,C1=I,m1=z,f1=F,I1=H,u1=$,x1=U;export{d1 as IcCheck,_ as IcClose,m1 as IcColumns,Z as IcCreate,v1 as IcDate,X as IcDelete,k1 as IcDot,a1 as IcDown,s1 as IcError,J as IcExport,p1 as IcFilter,n1 as IcFirst,f1 as IcGrip,I1 as IcInfo,h1 as IcLast,o1 as IcLeft,x1 as IcLoader,i1 as IcMinus,y1 as IcMoreHorizontal,l1 as IcMoreVertical,c1 as IcRefresh,Y as IcRemove,t1 as IcRight,u1 as IcSearch,w1 as IcSortAsc,M1 as IcSortDesc,C1 as IcSortNone,e1 as IcTag,r1 as IcUp,Q as IcUpdate};
167
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.js","sources":["../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/shared/src/utils.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/defaultAttributes.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/arrow-down-narrow-wide.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/arrow-down-wide-narrow.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/calendar.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/check.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-first.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-last.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-left.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/circle-plus.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/cloud-download.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/columns-3.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/cross.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/dot.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/ellipsis.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/filter.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/grip-vertical.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/info.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/minus.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/octagon-alert.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/rotate-cw.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/search.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/square-pen.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/tag.js","../../node_modules/.pnpm/lucide-react@0.453.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/trash.js","../../lib/components/icons.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && array.indexOf(className) === index;\n}).join(\" \");\n\nexport { mergeClasses, toKebabCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => {\n return createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n );\n }\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props\n })\n );\n Component.displayName = `${iconName}`;\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ArrowDownNarrowWide = createLucideIcon(\"ArrowDownNarrowWide\", [\n [\"path\", { d: \"m3 16 4 4 4-4\", key: \"1co6wj\" }],\n [\"path\", { d: \"M7 20V4\", key: \"1yoxec\" }],\n [\"path\", { d: \"M11 4h4\", key: \"6d7r33\" }],\n [\"path\", { d: \"M11 8h7\", key: \"djye34\" }],\n [\"path\", { d: \"M11 12h10\", key: \"1438ji\" }]\n]);\n\nexport { ArrowDownNarrowWide as default };\n//# sourceMappingURL=arrow-down-narrow-wide.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ArrowDownWideNarrow = createLucideIcon(\"ArrowDownWideNarrow\", [\n [\"path\", { d: \"m3 16 4 4 4-4\", key: \"1co6wj\" }],\n [\"path\", { d: \"M7 20V4\", key: \"1yoxec\" }],\n [\"path\", { d: \"M11 4h10\", key: \"1w87gc\" }],\n [\"path\", { d: \"M11 8h7\", key: \"djye34\" }],\n [\"path\", { d: \"M11 12h4\", key: \"q8tih4\" }]\n]);\n\nexport { ArrowDownWideNarrow as default };\n//# sourceMappingURL=arrow-down-wide-narrow.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ArrowUpDown = createLucideIcon(\"ArrowUpDown\", [\n [\"path\", { d: \"m21 16-4 4-4-4\", key: \"f6ql7i\" }],\n [\"path\", { d: \"M17 20V4\", key: \"1ejh1v\" }],\n [\"path\", { d: \"m3 8 4-4 4 4\", key: \"11wl7u\" }],\n [\"path\", { d: \"M7 4v16\", key: \"1glfcx\" }]\n]);\n\nexport { ArrowUpDown as default };\n//# sourceMappingURL=arrow-up-down.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Calendar = createLucideIcon(\"Calendar\", [\n [\"path\", { d: \"M8 2v4\", key: \"1cmpym\" }],\n [\"path\", { d: \"M16 2v4\", key: \"4m81vk\" }],\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"4\", rx: \"2\", key: \"1hopcy\" }],\n [\"path\", { d: \"M3 10h18\", key: \"8toen8\" }]\n]);\n\nexport { Calendar as default };\n//# sourceMappingURL=calendar.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Check = createLucideIcon(\"Check\", [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]]);\n\nexport { Check as default };\n//# sourceMappingURL=check.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronDown = createLucideIcon(\"ChevronDown\", [\n [\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]\n]);\n\nexport { ChevronDown as default };\n//# sourceMappingURL=chevron-down.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronFirst = createLucideIcon(\"ChevronFirst\", [\n [\"path\", { d: \"m17 18-6-6 6-6\", key: \"1yerx2\" }],\n [\"path\", { d: \"M7 6v12\", key: \"1p53r6\" }]\n]);\n\nexport { ChevronFirst as default };\n//# sourceMappingURL=chevron-first.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronLast = createLucideIcon(\"ChevronLast\", [\n [\"path\", { d: \"m7 18 6-6-6-6\", key: \"lwmzdw\" }],\n [\"path\", { d: \"M17 6v12\", key: \"1o0aio\" }]\n]);\n\nexport { ChevronLast as default };\n//# sourceMappingURL=chevron-last.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronLeft = createLucideIcon(\"ChevronLeft\", [\n [\"path\", { d: \"m15 18-6-6 6-6\", key: \"1wnfg3\" }]\n]);\n\nexport { ChevronLeft as default };\n//# sourceMappingURL=chevron-left.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronRight = createLucideIcon(\"ChevronRight\", [\n [\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]\n]);\n\nexport { ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronUp = createLucideIcon(\"ChevronUp\", [[\"path\", { d: \"m18 15-6-6-6 6\", key: \"153udz\" }]]);\n\nexport { ChevronUp as default };\n//# sourceMappingURL=chevron-up.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst CirclePlus = createLucideIcon(\"CirclePlus\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M8 12h8\", key: \"1wcyev\" }],\n [\"path\", { d: \"M12 8v8\", key: \"napkw2\" }]\n]);\n\nexport { CirclePlus as default };\n//# sourceMappingURL=circle-plus.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst CloudDownload = createLucideIcon(\"CloudDownload\", [\n [\"path\", { d: \"M12 13v8l-4-4\", key: \"1f5nwf\" }],\n [\"path\", { d: \"m12 21 4-4\", key: \"1lfcce\" }],\n [\"path\", { d: \"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284\", key: \"ui1hmy\" }]\n]);\n\nexport { CloudDownload as default };\n//# sourceMappingURL=cloud-download.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Columns3 = createLucideIcon(\"Columns3\", [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n [\"path\", { d: \"M15 3v18\", key: \"14nvp0\" }]\n]);\n\nexport { Columns3 as default };\n//# sourceMappingURL=columns-3.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Cross = createLucideIcon(\"Cross\", [\n [\n \"path\",\n {\n d: \"M11 2a2 2 0 0 0-2 2v5H4a2 2 0 0 0-2 2v2c0 1.1.9 2 2 2h5v5c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2v-5h5a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-5V4a2 2 0 0 0-2-2h-2z\",\n key: \"1t5g7j\"\n }\n ]\n]);\n\nexport { Cross as default };\n//# sourceMappingURL=cross.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Dot = createLucideIcon(\"Dot\", [\n [\"circle\", { cx: \"12.1\", cy: \"12.1\", r: \"1\", key: \"18d7e5\" }]\n]);\n\nexport { Dot as default };\n//# sourceMappingURL=dot.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst EllipsisVertical = createLucideIcon(\"EllipsisVertical\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"12\", cy: \"5\", r: \"1\", key: \"gxeob9\" }],\n [\"circle\", { cx: \"12\", cy: \"19\", r: \"1\", key: \"lyex9k\" }]\n]);\n\nexport { EllipsisVertical as default };\n//# sourceMappingURL=ellipsis-vertical.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Ellipsis = createLucideIcon(\"Ellipsis\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }]\n]);\n\nexport { Ellipsis as default };\n//# sourceMappingURL=ellipsis.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Filter = createLucideIcon(\"Filter\", [\n [\"polygon\", { points: \"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3\", key: \"1yg77f\" }]\n]);\n\nexport { Filter as default };\n//# sourceMappingURL=filter.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst GripVertical = createLucideIcon(\"GripVertical\", [\n [\"circle\", { cx: \"9\", cy: \"12\", r: \"1\", key: \"1vctgf\" }],\n [\"circle\", { cx: \"9\", cy: \"5\", r: \"1\", key: \"hp0tcf\" }],\n [\"circle\", { cx: \"9\", cy: \"19\", r: \"1\", key: \"fkjjf6\" }],\n [\"circle\", { cx: \"15\", cy: \"12\", r: \"1\", key: \"1tmaij\" }],\n [\"circle\", { cx: \"15\", cy: \"5\", r: \"1\", key: \"19l28e\" }],\n [\"circle\", { cx: \"15\", cy: \"19\", r: \"1\", key: \"f4zoj3\" }]\n]);\n\nexport { GripVertical as default };\n//# sourceMappingURL=grip-vertical.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Info = createLucideIcon(\"Info\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 16v-4\", key: \"1dtifu\" }],\n [\"path\", { d: \"M12 8h.01\", key: \"e9boi3\" }]\n]);\n\nexport { Info as default };\n//# sourceMappingURL=info.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst LoaderCircle = createLucideIcon(\"LoaderCircle\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]\n]);\n\nexport { LoaderCircle as default };\n//# sourceMappingURL=loader-circle.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Minus = createLucideIcon(\"Minus\", [[\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }]]);\n\nexport { Minus as default };\n//# sourceMappingURL=minus.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst OctagonAlert = createLucideIcon(\"OctagonAlert\", [\n [\"path\", { d: \"M12 16h.01\", key: \"1drbdi\" }],\n [\"path\", { d: \"M12 8v4\", key: \"1got3b\" }],\n [\n \"path\",\n {\n d: \"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z\",\n key: \"1fd625\"\n }\n ]\n]);\n\nexport { OctagonAlert as default };\n//# sourceMappingURL=octagon-alert.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst RotateCw = createLucideIcon(\"RotateCw\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n]);\n\nexport { RotateCw as default };\n//# sourceMappingURL=rotate-cw.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Search = createLucideIcon(\"Search\", [\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n [\"path\", { d: \"m21 21-4.3-4.3\", key: \"1qie3q\" }]\n]);\n\nexport { Search as default };\n//# sourceMappingURL=search.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst SquarePen = createLucideIcon(\"SquarePen\", [\n [\"path\", { d: \"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\", key: \"1m0v6g\" }],\n [\n \"path\",\n {\n d: \"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z\",\n key: \"ohrbg2\"\n }\n ]\n]);\n\nexport { SquarePen as default };\n//# sourceMappingURL=square-pen.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Tag = createLucideIcon(\"Tag\", [\n [\n \"path\",\n {\n d: \"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z\",\n key: \"vktsd0\"\n }\n ],\n [\"circle\", { cx: \"7.5\", cy: \"7.5\", r: \".5\", fill: \"currentColor\", key: \"kqv944\" }]\n]);\n\nexport { Tag as default };\n//# sourceMappingURL=tag.js.map\n","/**\n * @license lucide-react v0.453.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Trash = createLucideIcon(\"Trash\", [\n [\"path\", { d: \"M3 6h18\", key: \"d0wm0j\" }],\n [\"path\", { d: \"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\", key: \"4alrt4\" }],\n [\"path\", { d: \"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\", key: \"v07s0e\" }]\n]);\n\nexport { Trash as default };\n//# sourceMappingURL=trash.js.map\n","import {\n ArrowDownNarrowWide,\n ArrowDownWideNarrow,\n ArrowUpDown,\n Calendar,\n Check,\n ChevronDown,\n ChevronFirst,\n ChevronLast,\n ChevronLeft,\n ChevronRight,\n ChevronUp,\n CloudDownload,\n Columns3,\n Cross,\n Dot,\n Ellipsis,\n EllipsisVertical,\n Filter,\n GripVertical,\n Info,\n LucideLoader2,\n Minus,\n OctagonAlert,\n PlusCircle,\n RotateCw,\n Search,\n SquarePen,\n Tag,\n Trash,\n type LucideIcon,\n} from 'lucide-react';\n\nexport type CtxIcon = LucideIcon;\nexport const IcCreate: CtxIcon = PlusCircle;\nexport const IcExport: CtxIcon = CloudDownload;\nexport const IcUpdate: CtxIcon = SquarePen;\n/** Used to denote permanent deletion */\nexport const IcDelete: CtxIcon = Trash;\n/** Used to denote removal of a property */\nexport const IcRemove: CtxIcon = Cross;\nexport const IcClose: CtxIcon = Cross;\nexport const IcRefresh: CtxIcon = RotateCw;\n\nexport const IcTag: CtxIcon = Tag;\nexport const IcRight: CtxIcon = ChevronRight;\nexport const IcLeft: CtxIcon = ChevronLeft;\nexport const IcUp: CtxIcon = ChevronUp;\nexport const IcDown: CtxIcon = ChevronDown;\n/** Used for pagination button showing first page */\nexport const IcFirst: CtxIcon = ChevronFirst;\n/** Used for pagination button showing last page */\nexport const IcLast: CtxIcon = ChevronLast;\n\nexport const IcError: CtxIcon = OctagonAlert;\n\n/** Used to denote ellipsis in breadcrumbs */\nexport const IcMoreHorizontal: CtxIcon = Ellipsis;\nexport const IcMoreVertical: CtxIcon = EllipsisVertical;\nexport const IcCheck: CtxIcon = Check;\n/** This is used to denote intdeterminate in checkboxes */\nexport const IcMinus: CtxIcon = Minus;\nexport const IcDot: CtxIcon = Dot;\nexport const IcFilter: CtxIcon = Filter;\n\nexport const IcDate: CtxIcon = Calendar;\n\nexport const IcSortAsc: CtxIcon = ArrowDownNarrowWide;\nexport const IcSortDesc: CtxIcon = ArrowDownWideNarrow;\nexport const IcSortNone: CtxIcon = ArrowUpDown;\nexport const IcColumns: CtxIcon = Columns3;\nexport const IcGrip: CtxIcon = GripVertical;\nexport const IcInfo: CtxIcon = Info;\n\nexport const IcSearch: CtxIcon = Search;\n\nexport const IcLoader: CtxIcon = LucideLoader2;\n"],"names":["toKebabCase","string","mergeClasses","classes","className","index","array","defaultAttributes","Icon","forwardRef","color","size","strokeWidth","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","tag","attrs","createLucideIcon","iconName","Component","props","ArrowDownNarrowWide","ArrowDownWideNarrow","ArrowUpDown","Calendar","Check","ChevronDown","ChevronFirst","ChevronLast","ChevronLeft","ChevronRight","ChevronUp","CirclePlus","CloudDownload","Columns3","Cross","Dot","EllipsisVertical","Ellipsis","Filter","GripVertical","Info","LoaderCircle","Minus","OctagonAlert","RotateCw","Search","SquarePen","Tag","Trash","IcCreate","PlusCircle","IcExport","IcUpdate","IcDelete","IcRemove","IcClose","IcRefresh","IcTag","IcRight","IcLeft","IcUp","IcDown","IcFirst","IcLast","IcError","IcMoreHorizontal","IcMoreVertical","IcCheck","IcMinus","IcDot","IcFilter","IcDate","IcSortAsc","IcSortDesc","IcSortNone","IcColumns","IcGrip","IcInfo","IcSearch","IcLoader","LucideLoader2"],"mappings":"sDAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOA,MAAMA,EAAeC,GAAWA,EAAO,QAAQ,qBAAsB,OAAO,EAAE,YAAW,EACnFC,EAAe,IAAIC,IAAYA,EAAQ,OAAO,CAACC,EAAWC,EAAOC,IAC9D,EAAQF,GAAcE,EAAM,QAAQF,CAAS,IAAMC,CAC3D,EAAE,KAAK,GAAG,ECVX;AAAA;AAAA;AAAA;AAAA;AAAA,GAOA,IAAIE,EAAoB,CACtB,MAAO,6BACP,MAAO,GACP,OAAQ,GACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,YAAa,EACb,cAAe,QACf,eAAgB,OAClB,ECjBA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWA,MAAMC,EAAOC,EACX,CAAC,CACC,MAAAC,EAAQ,eACR,KAAAC,EAAO,GACP,YAAAC,EAAc,EACd,oBAAAC,EACA,UAAAT,EAAY,GACZ,SAAAU,EACA,SAAAC,EACA,GAAGC,CACP,EAAKC,IACMC,EACL,MACA,CACE,IAAAD,EACA,GAAGV,EACH,MAAOI,EACP,OAAQA,EACR,OAAQD,EACR,YAAaG,EAAsB,OAAOD,CAAW,EAAI,GAAK,OAAOD,CAAI,EAAIC,EAC7E,UAAWV,EAAa,SAAUE,CAAS,EAC3C,GAAGY,CACX,EACM,CACE,GAAGD,EAAS,IAAI,CAA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ACpBqB,EAAmBrB,EACnBsB,GAAqBZ,EAErBa,GAAiBV,EACjBW,GAAmB7B,EACnB8B,GAAkB/B,EAClBgC,GAAgB9B,EAChB+B,GAAkBpC,EAElBqC,GAAmBpC,EAEnBqC,GAAkBpC,EAElBqC,GAAmBrB,EAGnBsB,GAA4B5B,EAC5B6B,GAA0B9B,EAC1B+B,GAAmB3C,EAEnB4C,GAAmB1B,EACnB2B,GAAiBlC,EACjBmC,GAAoBhC,EAEpBiC,GAAkBhD,EAElBiD,GAAqBpD,EACrBqD,GAAsBpD,EACtBqD,GAAsBpD,EACtBqD,GAAqB1C,EACrB2C,GAAkBrC,EAClBsC,GAAkBrC,EAElBsC,GAAoBjC,EAEpBkC,GAAoBC","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]}
@@ -1,9 +1,10 @@
1
+ import { SelectionMode } from 'react-aria-components';
1
2
  export type SelectState = Set<number | string>;
2
3
  type SearchInputProps<T> = {
3
4
  value: SelectState;
4
5
  onChange: (v: SelectState) => void;
5
6
  onBlur?: (v: SelectState) => void;
6
- multiple: boolean;
7
+ selectionMode?: SelectionMode;
7
8
  disabled?: boolean;
8
9
  idLookup?: (ids: string[]) => Promise<string[] | undefined>;
9
10
  searchFn: (q: string) => Promise<T[] | undefined>;
@@ -12,7 +13,7 @@ type SearchInputProps<T> = {
12
13
  export declare function IdSearchInput<T extends {
13
14
  id: string;
14
15
  name: string;
15
- }>({ value, disabled, searchFn, multiple, onChange, onBlur, accessor, idLookup, }: SearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
16
+ }>({ value, disabled, searchFn, selectionMode, onChange, onBlur, accessor, idLookup, }: SearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
16
17
  export declare function TfIdSearchInput<T extends {
17
18
  id: string;
18
19
  name: string;
@@ -1,2 +1,2 @@
1
- import{jsx as r,Fragment as F,jsxs as d}from"react/jsx-runtime";import{useQuery as u}from"@tanstack/react-query";import{useId as I,useState as N}from"react";import{Autocomplete as x}from"react-aria-components";import{Button as C}from"./button.js";import{Loader as B}from"./loader.js";import{Menu as q,MenuItem as j}from"./menu.js";import{PopoverTrigger as K,Popover as M}from"./popover.js";import{SearchField as v}from"./searchfield.js";import{useFieldContext as A}from"../utils/form-context.js";import"class-variance-authority";import"../utils/primitives.js";import"clsx";import"lodash-es";import"lucide-react";import"./list-box.js";import"./select.js";import"./field.js";import"../utils/form-utils.js";import"@tanstack/react-form";function E({value:t,disabled:i=!1,searchFn:o,multiple:n,onChange:l,onBlur:f,accessor:h="id",idLookup:m}){const a=I(),[s,g]=N(""),{data:y,isError:c,isFetching:p,error:S}=u({queryKey:[a,s],queryFn:()=>o(s)}),b=u({queryKey:[a,t],queryFn:()=>m(Array.from(t.keys()).map(e=>e.toString())),enabled:m&&t.size>0});return r(F,{children:d(K,{onOpenChange:e=>{e||f?.(t)},children:[r(C,{className:"min-w-3xs",isDisabled:i,children:b.data?.join(",")}),r(M,{className:"p-2",children:d(x,{inputValue:s,onInputChange:g,children:[r(v,{className:"mb-icon",autoFocus:!0}),p&&r(B,{className:"p-input"}),!p&&!c&&r(q,{selectedKeys:t,selectionMode:n?"multiple":"single",onSelectionChange:e=>{typeof e!="string"&&l(e)},className:"body",items:y,renderEmptyState:()=>"No results found.",children:e=>r(j,{id:e[h],children:e.name},e.id)}),c&&r("div",{className:"text-destructive p-icon",children:S.message})]})})]})})}function ee({disabled:t,...i}){const o=A();return r(E,{...i,disabled:t||o.form.state.isSubmitting,value:o.state.value,onBlur:n=>o.handleBlur(),onChange:n=>o.handleChange(n)})}export{E as IdSearchInput,ee as TfIdSearchInput};
1
+ import{jsx as r,Fragment as N,jsxs as u}from"react/jsx-runtime";import{useQuery as d}from"@tanstack/react-query";import{useId as b,useState as F}from"react";import{Autocomplete as I}from"react-aria-components";import{Button as C}from"./button.js";import{Loader as B}from"./loader.js";import{Menu as q,MenuItem as j}from"./menu.js";import{PopoverTrigger as v,Popover as K}from"./popover.js";import{SearchField as A}from"./searchfield.js";import{useFieldContext as E}from"../utils/form-context.js";import"class-variance-authority";import"../utils/primitives.js";import"clsx";import"lodash-es";import"./icons.js";import"./list-box.js";import"./select.js";import"./field.js";import"../utils/form-utils.js";import"@tanstack/react-form";function L({value:t,disabled:i=!1,searchFn:o,selectionMode:n="multiple",onChange:l,onBlur:h,accessor:f="id",idLookup:s}){const a=b(),[m,g]=F(""),{data:y,isError:c,isFetching:p,error:S}=d({queryKey:[a,m],queryFn:()=>o(m)}),x=d({queryKey:[a,t],queryFn:()=>s(Array.from(t.keys()).map(e=>e.toString())),enabled:s&&t.size>0});return r(N,{children:u(v,{onOpenChange:e=>{e||h?.(t)},children:[r(C,{className:"min-w-3xs",isDisabled:i,children:x.data?.join(",")}),r(K,{className:"p-2",children:u(I,{inputValue:m,onInputChange:g,children:[r(A,{className:"mb-2",autoFocus:!0}),p&&r("div",{className:"p-input",children:r(B,{className:"mx-auto"})}),!p&&!c&&r(q,{selectedKeys:t,selectionMode:n,onSelectionChange:e=>{typeof e!="string"&&l(e)},className:"max-h-48",items:y,renderEmptyState:()=>"No results found.",children:e=>r(j,{id:e[f],children:e.name},e.id)}),c&&r("div",{className:"text-destructive p-icon",children:S.message})]})})]})})}function ee({disabled:t,...i}){const o=E();return r(L,{...i,disabled:t||o.form.state.isSubmitting,value:o.state.value,onBlur:n=>o.handleBlur(),onChange:n=>o.handleChange(n)})}export{L as IdSearchInput,ee as TfIdSearchInput};
2
2
  //# sourceMappingURL=id-search.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"id-search.js","sources":["../../lib/components/id-search.tsx"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { useId, useState } from 'react';\nimport { Autocomplete } from 'react-aria-components';\nimport { Button } from '../components/button';\nimport { Loader } from '../components/loader';\nimport { Menu, MenuItem } from '../components/menu';\nimport { Popover, PopoverTrigger } from '../components/popover';\nimport { SearchField } from '../components/searchfield';\nimport { useFieldContext } from '../utils/form-context';\n\nexport type SelectState = Set<number | string>;\n\ntype SearchInputProps<T> = {\n value: SelectState;\n onChange: (v: SelectState) => void;\n onBlur?: (v: SelectState) => void;\n multiple: boolean;\n disabled?: boolean;\n idLookup?: (ids: string[]) => Promise<string[] | undefined>;\n searchFn: (q: string) => Promise<T[] | undefined>;\n accessor: 'id' | 'name';\n};\nexport function IdSearchInput<T extends { id: string; name: string }>({\n value,\n disabled = false,\n searchFn,\n multiple,\n onChange,\n onBlur,\n accessor = 'id',\n idLookup,\n}: SearchInputProps<T>) {\n const id = useId();\n const [search, _setSearch] = useState('');\n const { data, isError, isFetching, error } = useQuery({\n queryKey: [id, search],\n queryFn: () => searchFn(search),\n });\n\n const namesQuery = useQuery({\n queryKey: [id, value],\n queryFn: () => idLookup!(Array.from(value.keys()).map(id => id.toString())),\n enabled: idLookup && value.size > 0,\n });\n\n const renderButtonLabel = () => {\n return namesQuery.data?.join(',');\n };\n\n return (\n <>\n <PopoverTrigger\n onOpenChange={o => {\n if (!o) {\n // searchInputRef.current?.focus();\n onBlur?.(value);\n }\n }}\n >\n <Button className={'min-w-3xs'} isDisabled={disabled}>\n {renderButtonLabel()}\n </Button>\n <Popover className={'p-2'}>\n <Autocomplete inputValue={search} onInputChange={_setSearch}>\n <SearchField className={'mb-icon'} autoFocus />\n {isFetching && <Loader className=\"p-input\" />}\n {!isFetching && !isError && (\n <Menu\n selectedKeys={value}\n selectionMode={multiple ? 'multiple' : 'single'}\n onSelectionChange={s => {\n if (typeof s === 'string') return;\n onChange(s);\n }}\n className={'body'}\n items={data}\n renderEmptyState={() => 'No results found.'}\n >\n {item => (\n <MenuItem key={item['id']} id={item[accessor]}>\n {item.name}\n </MenuItem>\n )}\n </Menu>\n )}\n {isError && <div className=\"text-destructive p-icon\">{error.message}</div>}\n </Autocomplete>\n </Popover>\n </PopoverTrigger>\n </>\n );\n}\n\nexport function TfIdSearchInput<T extends { id: string; name: string }>({\n disabled,\n ...props\n}: Omit<SearchInputProps<T>, 'value' | 'onChange'>) {\n const field = useFieldContext<SelectState>();\n return (\n <IdSearchInput\n {...props}\n disabled={disabled || field.form.state.isSubmitting}\n value={field.state.value}\n onBlur={_ => field.handleBlur()}\n onChange={e => field.handleChange(e)}\n />\n );\n}\n"],"names":["IdSearchInput","value","disabled","searchFn","multiple","onChange","onBlur","accessor","idLookup","id","useId","search","_setSearch","useState","data","isError","isFetching","error","useQuery","namesQuery","jsx","Fragment","jsxs","PopoverTrigger","o","Button","Popover","Autocomplete","SearchField","Loader","Menu","s","item","MenuItem","TfIdSearchInput","props","field","useFieldContext","_","e"],"mappings":"6tBAsBO,SAASA,EAAsD,CAClE,MAAAC,EACA,SAAAC,EAAW,GACX,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,OAAAC,EACA,SAAAC,EAAW,KACX,SAAAC,CACJ,EAAwB,CACpB,MAAMC,EAAKC,EAAA,EACL,CAACC,EAAQC,CAAU,EAAIC,EAAS,EAAE,EAClC,CAAE,KAAAC,EAAM,QAAAC,EAAS,WAAAC,EAAY,MAAAC,CAAA,EAAUC,EAAS,CAClD,SAAU,CAACT,EAAIE,CAAM,EACrB,QAAS,IAAMR,EAASQ,CAAM,CAAA,CACjC,EAEKQ,EAAaD,EAAS,CACxB,SAAU,CAACT,EAAIR,CAAK,EACpB,QAAS,IAAMO,EAAU,MAAM,KAAKP,EAAM,MAAM,EAAE,IAAIQ,GAAMA,EAAG,SAAA,CAAU,CAAC,EAC1E,QAASD,GAAYP,EAAM,KAAO,CAAA,CACrC,EAMD,OACImB,EAAAC,EAAA,CACI,SAAAC,EAACC,EAAA,CACG,aAAcC,GAAK,CACVA,GAEDlB,IAASL,CAAK,CAEtB,EAEA,SAAA,CAAAmB,EAACK,GAAO,UAAW,YAAa,WAAYvB,EACvC,SAdNiB,EAAW,MAAM,KAAK,GAAG,EAexB,EACAC,EAACM,GAAQ,UAAW,MAChB,WAACC,EAAA,CAAa,WAAYhB,EAAQ,cAAeC,EAC7C,SAAA,CAAAQ,EAACQ,EAAA,CAAY,UAAW,UAAW,UAAS,GAAC,EAC5CZ,GAAcI,EAACS,EAAA,CAAO,UAAU,SAAA,CAAU,EAC1C,CAACb,GAAc,CAACD,GACbK,EAACU,EAAA,CACG,aAAc7B,EACd,cAAeG,EAAW,WAAa,SACvC,kBAAmB2B,GAAK,CAChB,OAAOA,GAAM,UACjB1B,EAAS0B,CAAC,CACd,EACA,UAAW,OACX,MAAOjB,EACP,iBAAkB,IAAM,oBAEvB,SAAAkB,GACGZ,EAACa,EAAA,CAA0B,GAAID,EAAKzB,CAAQ,EACvC,SAAAyB,EAAK,IAAA,EADKA,EAAK,EAEpB,CAAA,CAAA,EAIXjB,GAAWK,EAAC,MAAA,CAAI,UAAU,0BAA2B,WAAM,OAAA,CAAQ,CAAA,CAAA,CACxE,CAAA,CACJ,CAAA,CAAA,CAAA,EAER,CAER,CAEO,SAASc,GAAwD,CACpE,SAAAhC,EACA,GAAGiC,CACP,EAAoD,CAChD,MAAMC,EAAQC,EAAA,EACd,OACIjB,EAACpB,EAAA,CACI,GAAGmC,EACJ,SAAUjC,GAAYkC,EAAM,KAAK,MAAM,aACvC,MAAOA,EAAM,MAAM,MACnB,OAAQE,GAAKF,EAAM,WAAA,EACnB,SAAUG,GAAKH,EAAM,aAAaG,CAAC,CAAA,CAAA,CAG/C"}
1
+ {"version":3,"file":"id-search.js","sources":["../../lib/components/id-search.tsx"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { useId, useState } from 'react';\nimport { Autocomplete, type SelectionMode } from 'react-aria-components';\nimport { Button } from '../components/button';\nimport { Loader } from '../components/loader';\nimport { Menu, MenuItem } from '../components/menu';\nimport { Popover, PopoverTrigger } from '../components/popover';\nimport { SearchField } from '../components/searchfield';\nimport { useFieldContext } from '../utils/form-context';\n\nexport type SelectState = Set<number | string>;\n\ntype SearchInputProps<T> = {\n value: SelectState;\n onChange: (v: SelectState) => void;\n onBlur?: (v: SelectState) => void;\n selectionMode?: SelectionMode;\n disabled?: boolean;\n idLookup?: (ids: string[]) => Promise<string[] | undefined>;\n searchFn: (q: string) => Promise<T[] | undefined>;\n accessor: 'id' | 'name';\n};\nexport function IdSearchInput<T extends { id: string; name: string }>({\n value,\n disabled = false,\n searchFn,\n selectionMode = 'multiple',\n onChange,\n onBlur,\n accessor = 'id',\n idLookup,\n}: SearchInputProps<T>) {\n const id = useId();\n const [search, _setSearch] = useState('');\n const { data, isError, isFetching, error } = useQuery({\n queryKey: [id, search],\n queryFn: () => searchFn(search),\n });\n\n const namesQuery = useQuery({\n queryKey: [id, value],\n queryFn: () => idLookup!(Array.from(value.keys()).map(id => id.toString())),\n enabled: idLookup && value.size > 0,\n });\n\n const renderButtonLabel = () => {\n return namesQuery.data?.join(',');\n };\n\n return (\n <>\n <PopoverTrigger\n onOpenChange={o => {\n if (!o) {\n // searchInputRef.current?.focus();\n onBlur?.(value);\n }\n }}\n >\n <Button className={'min-w-3xs'} isDisabled={disabled}>\n {renderButtonLabel()}\n </Button>\n <Popover className={'p-2'}>\n <Autocomplete inputValue={search} onInputChange={_setSearch}>\n <SearchField className={'mb-2'} autoFocus />\n {isFetching && (\n <div className=\"p-input\">\n <Loader className=\"mx-auto\" />\n </div>\n )}\n {!isFetching && !isError && (\n <Menu\n selectedKeys={value}\n selectionMode={selectionMode}\n onSelectionChange={s => {\n if (typeof s === 'string') return;\n onChange(s);\n }}\n className={'max-h-48'}\n items={data}\n renderEmptyState={() => 'No results found.'}\n >\n {item => (\n <MenuItem key={item['id']} id={item[accessor]}>\n {item.name}\n </MenuItem>\n )}\n </Menu>\n )}\n {isError && <div className=\"text-destructive p-icon\">{error.message}</div>}\n </Autocomplete>\n </Popover>\n </PopoverTrigger>\n </>\n );\n}\n\nexport function TfIdSearchInput<T extends { id: string; name: string }>({\n disabled,\n ...props\n}: Omit<SearchInputProps<T>, 'value' | 'onChange'>) {\n const field = useFieldContext<SelectState>();\n return (\n <IdSearchInput\n {...props}\n disabled={disabled || field.form.state.isSubmitting}\n value={field.state.value}\n onBlur={_ => field.handleBlur()}\n onChange={e => field.handleChange(e)}\n />\n );\n}\n"],"names":["IdSearchInput","value","disabled","searchFn","selectionMode","onChange","onBlur","accessor","idLookup","id","useId","search","_setSearch","useState","data","isError","isFetching","error","useQuery","namesQuery","jsx","Fragment","jsxs","PopoverTrigger","o","Button","Popover","Autocomplete","SearchField","Loader","Menu","s","item","MenuItem","TfIdSearchInput","props","field","useFieldContext","_","e"],"mappings":"2tBAsBO,SAASA,EAAsD,CAClE,MAAAC,EACA,SAAAC,EAAW,GACX,SAAAC,EACA,cAAAC,EAAgB,WAChB,SAAAC,EACA,OAAAC,EACA,SAAAC,EAAW,KACX,SAAAC,CACJ,EAAwB,CACpB,MAAMC,EAAKC,EAAA,EACL,CAACC,EAAQC,CAAU,EAAIC,EAAS,EAAE,EAClC,CAAE,KAAAC,EAAM,QAAAC,EAAS,WAAAC,EAAY,MAAAC,CAAA,EAAUC,EAAS,CAClD,SAAU,CAACT,EAAIE,CAAM,EACrB,QAAS,IAAMR,EAASQ,CAAM,CAAA,CACjC,EAEKQ,EAAaD,EAAS,CACxB,SAAU,CAACT,EAAIR,CAAK,EACpB,QAAS,IAAMO,EAAU,MAAM,KAAKP,EAAM,MAAM,EAAE,IAAIQ,GAAMA,EAAG,SAAA,CAAU,CAAC,EAC1E,QAASD,GAAYP,EAAM,KAAO,CAAA,CACrC,EAMD,OACImB,EAAAC,EAAA,CACI,SAAAC,EAACC,EAAA,CACG,aAAcC,GAAK,CACVA,GAEDlB,IAASL,CAAK,CAEtB,EAEA,SAAA,CAAAmB,EAACK,GAAO,UAAW,YAAa,WAAYvB,EACvC,SAdNiB,EAAW,MAAM,KAAK,GAAG,EAexB,EACAC,EAACM,GAAQ,UAAW,MAChB,WAACC,EAAA,CAAa,WAAYhB,EAAQ,cAAeC,EAC7C,SAAA,CAAAQ,EAACQ,EAAA,CAAY,UAAW,OAAQ,UAAS,GAAC,EACzCZ,KACI,MAAA,CAAI,UAAU,UACX,SAAAI,EAACS,EAAA,CAAO,UAAU,SAAA,CAAU,CAAA,CAChC,EAEH,CAACb,GAAc,CAACD,GACbK,EAACU,EAAA,CACG,aAAc7B,EACd,cAAAG,EACA,kBAAmB2B,GAAK,CAChB,OAAOA,GAAM,UACjB1B,EAAS0B,CAAC,CACd,EACA,UAAW,WACX,MAAOjB,EACP,iBAAkB,IAAM,oBAEvB,SAAAkB,GACGZ,EAACa,EAAA,CAA0B,GAAID,EAAKzB,CAAQ,EACvC,SAAAyB,EAAK,IAAA,EADKA,EAAK,EAEpB,CAAA,CAAA,EAIXjB,GAAWK,EAAC,MAAA,CAAI,UAAU,0BAA2B,WAAM,OAAA,CAAQ,CAAA,CAAA,CACxE,CAAA,CACJ,CAAA,CAAA,CAAA,EAER,CAER,CAEO,SAASc,GAAwD,CACpE,SAAAhC,EACA,GAAGiC,CACP,EAAoD,CAChD,MAAMC,EAAQC,EAAA,EACd,OACIjB,EAACpB,EAAA,CACI,GAAGmC,EACJ,SAAUjC,GAAYkC,EAAM,KAAK,MAAM,aACvC,MAAOA,EAAM,MAAM,MACnB,OAAQE,GAAKF,EAAM,WAAA,EACnB,SAAUG,GAAKH,EAAM,aAAaG,CAAC,CAAA,CAAA,CAG/C"}
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as l}from"react/jsx-runtime";import{OTPInput as m,OTPInputContext as u}from"input-otp";import{Minus as p}from"lucide-react";import{use as d}from"react";import{classNames as n}from"../utils/primitives.js";import"clsx";import"lodash-es";function P({className:e,containerClassName:r,...i}){return t(m,{containerClassName:n("flex items-center gap-2 has-disabled:opacity-50",r),className:n("disabled:cursor-not-allowed",e),...i})}function T({className:e,...r}){return t("div",{className:n("flex items-center",e),...r})}function I({index:e,className:r,...i}){const o=d(u),{char:s,hasFakeCaret:a,isActive:c}=o.slots[e];return l("div",{className:n("relative flex h-input w-9 items-center justify-center border-2 border-input body-sm transition-all",c?"z-10 border-2 border-primary":"",r),...i,children:[s,a&&t("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t("div",{className:"h-icon w-px animate-caret-blink bg-foreground duration-1000"})})]})}function y({...e}){return t("div",{role:"separator",...e,children:t(p,{})})}export{P as InputOTP,T as InputOTPGroup,y as InputOTPSeparator,I as InputOTPSlot};
1
+ import{jsx as t,jsxs as l}from"react/jsx-runtime";import{OTPInput as m,OTPInputContext as u}from"input-otp";import{use as p}from"react";import{classNames as n}from"../utils/primitives.js";import{IcMinus as d}from"./icons.js";import"clsx";import"lodash-es";function O({className:e,containerClassName:r,...i}){return t(m,{containerClassName:n("flex items-center gap-2 has-disabled:opacity-50",r),className:n("disabled:cursor-not-allowed",e),...i})}function P({className:e,...r}){return t("div",{className:n("flex items-center",e),...r})}function T({index:e,className:r,...i}){const o=p(u),{char:s,hasFakeCaret:a,isActive:c}=o.slots[e];return l("div",{className:n("relative flex h-input w-9 items-center justify-center border-2 border-input body-sm transition-all",c?"z-10 border-2 border-primary":"",r),...i,children:[s,a&&t("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t("div",{className:"h-icon w-px animate-caret-blink bg-foreground duration-1000"})})]})}function y({...e}){return t("div",{role:"separator",...e,children:t(d,{})})}export{O as InputOTP,P as InputOTPGroup,y as InputOTPSeparator,T as InputOTPSlot};
2
2
  //# sourceMappingURL=input-otp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.js","sources":["../../lib/components/input-otp.tsx"],"sourcesContent":["import { OTPInput, OTPInputContext } from 'input-otp';\nimport { Minus } from 'lucide-react';\nimport { use } from 'react';\nimport { classNames } from '../utils/primitives';\n\nexport function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput>) {\n return (\n <OTPInput\n containerClassName={classNames('flex items-center gap-2 has-disabled:opacity-50', containerClassName)}\n className={classNames('disabled:cursor-not-allowed', className)}\n {...props}\n />\n );\n}\n\nexport function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div className={classNames('flex items-center', className)} {...props} />;\n}\n\nexport function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & { index: number }) {\n const inputOTPContext = use(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n return (\n <div\n className={classNames(\n 'relative flex h-input w-9 items-center justify-center border-2 border-input body-sm transition-all',\n isActive ? 'z-10 border-2 border-primary' : '',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-icon w-px animate-caret-blink bg-foreground duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\nexport function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div role=\"separator\" {...props}>\n <Minus />\n </div>\n );\n}\n"],"names":["InputOTP","className","containerClassName","props","jsx","OTPInput","classNames","InputOTPGroup","InputOTPSlot","index","inputOTPContext","use","OTPInputContext","char","hasFakeCaret","isActive","jsxs","InputOTPSeparator","Minus"],"mappings":"gQAKO,SAASA,EAAS,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,GAAgD,CACzG,OACIC,EAACC,EAAA,CACG,mBAAoBC,EAAW,kDAAmDJ,CAAkB,EACpG,UAAWI,EAAW,8BAA+BL,CAAS,EAC7D,GAAGE,CAAA,CAAA,CAGhB,CAEO,SAASI,EAAc,CAAE,UAAAN,EAAW,GAAGE,GAAsC,CAChF,OAAOC,EAAC,OAAI,UAAWE,EAAW,oBAAqBL,CAAS,EAAI,GAAGE,EAAO,CAClF,CAEO,SAASK,EAAa,CAAE,MAAAC,EAAO,UAAAR,EAAW,GAAGE,GAA0D,CAC1G,MAAMO,EAAkBC,EAAIC,CAAe,EACrC,CAAE,KAAAC,EAAM,aAAAC,EAAc,SAAAC,GAAaL,EAAgB,MAAMD,CAAK,EAEpE,OACIO,EAAC,MAAA,CACG,UAAWV,EACP,qGACAS,EAAW,gCAAkC,GAC7Cd,CAAA,EAEH,GAAGE,EAEH,SAAA,CAAAU,EACAC,KACI,MAAA,CAAI,UAAU,wEACX,SAAAV,EAAC,MAAA,CAAI,UAAU,6DAAA,CAA8D,CAAA,CACjF,CAAA,CAAA,CAAA,CAIhB,CAEO,SAASa,EAAkB,CAAE,GAAGd,GAAsC,CACzE,OACIC,EAAC,OAAI,KAAK,YAAa,GAAGD,EACtB,SAAAC,EAACc,IAAM,CAAA,CACX,CAER"}
1
+ {"version":3,"file":"input-otp.js","sources":["../../lib/components/input-otp.tsx"],"sourcesContent":["import { OTPInput, OTPInputContext } from 'input-otp';\nimport { use } from 'react';\nimport { classNames } from '../utils/primitives';\nimport { IcMinus } from './icons';\n\nexport function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput>) {\n return (\n <OTPInput\n containerClassName={classNames('flex items-center gap-2 has-disabled:opacity-50', containerClassName)}\n className={classNames('disabled:cursor-not-allowed', className)}\n {...props}\n />\n );\n}\n\nexport function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div className={classNames('flex items-center', className)} {...props} />;\n}\n\nexport function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & { index: number }) {\n const inputOTPContext = use(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n return (\n <div\n className={classNames(\n 'relative flex h-input w-9 items-center justify-center border-2 border-input body-sm transition-all',\n isActive ? 'z-10 border-2 border-primary' : '',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-icon w-px animate-caret-blink bg-foreground duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\nexport function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div role=\"separator\" {...props}>\n <IcMinus />\n </div>\n );\n}\n"],"names":["InputOTP","className","containerClassName","props","jsx","OTPInput","classNames","InputOTPGroup","InputOTPSlot","index","inputOTPContext","use","OTPInputContext","char","hasFakeCaret","isActive","jsxs","InputOTPSeparator","IcMinus"],"mappings":"gQAKO,SAASA,EAAS,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,GAAgD,CACzG,OACIC,EAACC,EAAA,CACG,mBAAoBC,EAAW,kDAAmDJ,CAAkB,EACpG,UAAWI,EAAW,8BAA+BL,CAAS,EAC7D,GAAGE,CAAA,CAAA,CAGhB,CAEO,SAASI,EAAc,CAAE,UAAAN,EAAW,GAAGE,GAAsC,CAChF,OAAOC,EAAC,OAAI,UAAWE,EAAW,oBAAqBL,CAAS,EAAI,GAAGE,EAAO,CAClF,CAEO,SAASK,EAAa,CAAE,MAAAC,EAAO,UAAAR,EAAW,GAAGE,GAA0D,CAC1G,MAAMO,EAAkBC,EAAIC,CAAe,EACrC,CAAE,KAAAC,EAAM,aAAAC,EAAc,SAAAC,GAAaL,EAAgB,MAAMD,CAAK,EAEpE,OACIO,EAAC,MAAA,CACG,UAAWV,EACP,qGACAS,EAAW,gCAAkC,GAC7Cd,CAAA,EAEH,GAAGE,EAEH,SAAA,CAAAU,EACAC,KACI,MAAA,CAAI,UAAU,wEACX,SAAAV,EAAC,MAAA,CAAI,UAAU,6DAAA,CAA8D,CAAA,CACjF,CAAA,CAAA,CAAA,CAIhB,CAEO,SAASa,EAAkB,CAAE,GAAGd,GAAsC,CACzE,OACIC,EAAC,OAAI,KAAK,YAAa,GAAGD,EACtB,SAAAC,EAACc,IAAQ,CAAA,CACb,CAER"}
@@ -1,2 +1,2 @@
1
- import{jsxs as i,jsx as t}from"react/jsx-runtime";import{Badge as c}from"./badge.js";import{Card as m,CardHeader as d,CardTitle as f,CardContent as h}from"./card.js";import{formatDate as u}from"./data-table-commons.js";import{Skeleton as x}from"./skeleton.js";import"../utils/primitives.js";import"clsx";import"lodash-es";import"@tanstack/react-table";import"date-fns";import"./checkbox.js";import"react-aria-components";import"lucide-react";import"./field.js";import"class-variance-authority";import"../utils/form-utils.js";import"react";import"../utils/form-context.js";import"@tanstack/react-form";const z=({data:s,label:l,fields:n})=>{const p=(e,r)=>{if(e.transform)return e.transform(r);if(r==null)return"-";switch(e.type){case"date":return t("span",{children:u(r)});case"yesno":return t("span",{children:r?"Yes":"No"});case"badge":return t("div",{className:"flex flex-wrap gap-1",children:Array.isArray(r)?r.map((o,a)=>t(c,{children:typeof o=="object"?o?.name||o?.id:o},a)):r});case"boolean":return t("span",{children:r.toString()});default:return t("span",{children:r})}};return i(m,{children:[t(d,{children:t(f,{children:l})}),t(h,{children:t("div",{className:"flex flex-col gap-2",children:s?n.map(e=>{const r=e.accessor?e.accessor.split(".").reduce((o,a)=>o&&a in o?o[a]:void 0,s):null;return i("div",{className:"flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0",children:[t("p",{className:"body flex w-full justify-start col-span-1",children:e.display}),t("div",{className:"body flex w-full justify-start text-wrap break-all",children:p(e,r)})]},e.display)}):n.map((e,r)=>t(x,{className:"h-12 w-full"},r))})})]})};export{z as KeyValueCard};
1
+ import{jsxs as o,jsx as e}from"react/jsx-runtime";import{Badge as d}from"./badge.js";import{Card as p,CardHeader as m,CardTitle as f,CardContent as h}from"./card.js";import{formatDate as u}from"./data-table-commons.js";import{Skeleton as x}from"./skeleton.js";import"../utils/primitives.js";import"clsx";import"lodash-es";import"date-fns";const V=({data:n,label:c,fields:l})=>{const i=(t,r)=>{if(t.transform)return t.transform(r);if(r==null)return"-";switch(t.type){case"date":return e("span",{children:u(r)});case"yesno":return e("span",{children:r?"Yes":"No"});case"badge":return e("div",{className:"flex flex-wrap gap-1",children:Array.isArray(r)?r.map((a,s)=>e(d,{children:typeof a=="object"?a?.name||a?.id:a},s)):r});case"boolean":return e("span",{children:r.toString()});default:return e("span",{children:r})}};return o(p,{children:[e(m,{children:e(f,{children:c})}),e(h,{children:e("div",{className:"flex flex-col gap-2",children:n?l.map(t=>{const r=t.accessor?t.accessor.split(".").reduce((a,s)=>a&&s in a?a[s]:void 0,n):null;return o("div",{className:"flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0",children:[e("p",{className:"body flex w-full justify-start col-span-1",children:t.display}),e("div",{className:"body flex w-full justify-start text-wrap break-all",children:i(t,r)})]},t.display)}):l.map((t,r)=>e(x,{className:"h-12 w-full"},r))})})]})};export{V as KeyValueCard};
2
2
  //# sourceMappingURL=key-value-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"key-value-card.js","sources":["../../lib/components/key-value-card.tsx"],"sourcesContent":["import { Badge } from '../components/badge';\nimport { Card, CardContent, CardHeader, CardTitle } from '../components/card';\nimport { formatDate } from '../components/data-table-commons';\nimport { Skeleton } from '../components/skeleton';\n\n// Utility type to handle nested keys (dot notation) in any object\ntype NestedKeyOf<T> = T extends object\n ? {\n [K in keyof T]: K extends string | number ? `${K & string}` | `${K & string}.${NestedKeyOf<T[K]>}` : never;\n }[keyof T]\n : never;\n\n// DisplayField type that works with nested keys\nexport type DisplayField<T> = {\n display: string;\n accessor: NestedKeyOf<T>;\n type?: 'text' | 'badge' | 'boolean' | 'date' | 'yesno' | 'copyButton' | 'link'; // Field types\n transform?: (value: any) => React.ReactNode;\n};\n\nexport interface KeyValueCardProps<T> {\n data: T; // Ensure data is of type T\n label: string;\n fields: DisplayField<T>[];\n className?: string;\n}\n\nexport const KeyValueCard = <T extends {}>({ data, label, fields }: KeyValueCardProps<T>) => {\n const renderValue = (field: DisplayField<T>, value: any) => {\n if (field.transform) {\n return field.transform(value);\n }\n if (value === undefined || value === null) {\n return '-';\n }\n switch (field.type) {\n case 'date':\n return <span>{formatDate(value)}</span>;\n case 'yesno':\n return <span>{value ? 'Yes' : 'No'}</span>;\n case 'badge':\n return (\n <div className=\"flex flex-wrap gap-1\">\n {Array.isArray(value)\n ? value.map((item, index) => (\n <Badge key={index}>{typeof item === 'object' ? item?.name || item?.id : item}</Badge>\n ))\n : value}\n </div>\n );\n\n case 'boolean':\n return <span>{value.toString()}</span>;\n default:\n return <span>{value}</span>;\n }\n };\n\n return (\n <Card>\n <CardHeader>\n <CardTitle>{label}</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"flex flex-col gap-2\">\n {data\n ? fields.map(field => {\n // TODO: improve this\n const value = field.accessor\n ? field.accessor\n .split('.')\n .reduce(\n (obj, key) => (obj && key in obj ? obj[key] : undefined),\n data as Record<string, any>\n )\n : null;\n\n return (\n <div\n key={field.display}\n className=\"flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0\"\n >\n <p className=\"body flex w-full justify-start col-span-1\">{field.display}</p>\n <div className=\"body flex w-full justify-start text-wrap break-all\">\n {renderValue(field, value)}\n </div>\n </div>\n );\n })\n : fields.map((_, index) => <Skeleton key={index} className=\"h-12 w-full\" />)}\n </div>\n </CardContent>\n </Card>\n );\n};\n"],"names":["KeyValueCard","data","label","fields","renderValue","field","value","jsx","formatDate","item","index","Badge","Card","CardHeader","CardTitle","CardContent","obj","key","jsxs","_","Skeleton"],"mappings":"ylBA2BO,MAAMA,EAAe,CAAe,CAAE,KAAAC,EAAM,MAAAC,EAAO,OAAAC,KAAmC,CACzF,MAAMC,EAAc,CAACC,EAAwBC,IAAe,CACxD,GAAID,EAAM,UACN,OAAOA,EAAM,UAAUC,CAAK,EAEhC,GAA2BA,GAAU,KACjC,MAAO,IAEX,OAAQD,EAAM,KAAA,CACV,IAAK,OACD,OAAOE,EAAC,OAAA,CAAM,SAAAC,EAAWF,CAAK,EAAE,EACpC,IAAK,QACD,OAAOC,EAAC,OAAA,CAAM,SAAAD,EAAQ,MAAQ,KAAK,EACvC,IAAK,QACD,OACIC,EAAC,MAAA,CAAI,UAAU,uBACV,SAAA,MAAM,QAAQD,CAAK,EACdA,EAAM,IAAI,CAACG,EAAMC,MACZC,EAAA,CAAmB,SAAA,OAAOF,GAAS,SAAWA,GAAM,MAAQA,GAAM,GAAKA,CAAA,EAA5DC,CAAiE,CAChF,EACDJ,CAAA,CACV,EAGR,IAAK,UACD,OAAOC,EAAC,OAAA,CAAM,SAAAD,EAAM,SAAA,EAAW,EACnC,QACI,OAAOC,EAAC,QAAM,SAAAD,CAAA,CAAM,CAAA,CAEhC,EAEA,SACKM,EAAA,CACG,SAAA,CAAAL,EAACM,EAAA,CACG,SAAAN,EAACO,EAAA,CAAW,SAAAZ,CAAA,CAAM,EACtB,EACAK,EAACQ,GACG,SAAAR,EAAC,MAAA,CAAI,UAAU,sBACV,SAAAN,EACKE,EAAO,IAAIE,GAAS,CAEhB,MAAMC,EAAQD,EAAM,SACdA,EAAM,SACD,MAAM,GAAG,EACT,OACG,CAACW,EAAKC,IAASD,GAAOC,KAAOD,EAAMA,EAAIC,CAAG,EAAI,OAC9ChB,CAAA,EAER,KAEN,OACIiB,EAAC,MAAA,CAEG,UAAU,wEAEV,SAAA,CAAAX,EAAC,IAAA,CAAE,UAAU,4CAA6C,SAAAF,EAAM,QAAQ,IACvE,MAAA,CAAI,UAAU,qDACV,SAAAD,EAAYC,EAAOC,CAAK,CAAA,CAC7B,CAAA,CAAA,EANKD,EAAM,OAAA,CASvB,CAAC,EACDF,EAAO,IAAI,CAACgB,EAAGT,IAAUH,EAACa,EAAA,CAAqB,UAAU,aAAA,EAAjBV,CAA+B,CAAE,EACnF,CAAA,CACJ,CAAA,EACJ,CAER"}
1
+ {"version":3,"file":"key-value-card.js","sources":["../../lib/components/key-value-card.tsx"],"sourcesContent":["import { Badge } from '../components/badge';\nimport { Card, CardContent, CardHeader, CardTitle } from '../components/card';\nimport { formatDate } from '../components/data-table-commons';\nimport { Skeleton } from '../components/skeleton';\n\n// Utility type to handle nested keys (dot notation) in any object\ntype NestedKeyOf<T> = T extends object\n ? {\n [K in keyof T]: K extends string | number ? `${K & string}` | `${K & string}.${NestedKeyOf<T[K]>}` : never;\n }[keyof T]\n : never;\n\n// DisplayField type that works with nested keys\nexport type DisplayField<T> = {\n display: string;\n accessor: NestedKeyOf<T>;\n type?: 'text' | 'badge' | 'boolean' | 'date' | 'yesno' | 'copyButton' | 'link'; // Field types\n transform?: (value: any) => React.ReactNode;\n};\n\nexport interface KeyValueCardProps<T> {\n data: T; // Ensure data is of type T\n label: string;\n fields: DisplayField<T>[];\n className?: string;\n}\n\nexport const KeyValueCard = <T extends {}>({ data, label, fields }: KeyValueCardProps<T>) => {\n const renderValue = (field: DisplayField<T>, value: any) => {\n if (field.transform) {\n return field.transform(value);\n }\n if (value === undefined || value === null) {\n return '-';\n }\n switch (field.type) {\n case 'date':\n return <span>{formatDate(value)}</span>;\n case 'yesno':\n return <span>{value ? 'Yes' : 'No'}</span>;\n case 'badge':\n return (\n <div className=\"flex flex-wrap gap-1\">\n {Array.isArray(value)\n ? value.map((item, index) => (\n <Badge key={index}>{typeof item === 'object' ? item?.name || item?.id : item}</Badge>\n ))\n : value}\n </div>\n );\n\n case 'boolean':\n return <span>{value.toString()}</span>;\n default:\n return <span>{value}</span>;\n }\n };\n\n return (\n <Card>\n <CardHeader>\n <CardTitle>{label}</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"flex flex-col gap-2\">\n {data\n ? fields.map(field => {\n // TODO: improve this\n const value = field.accessor\n ? field.accessor\n .split('.')\n .reduce(\n (obj, key) => (obj && key in obj ? obj[key] : undefined),\n data as Record<string, any>\n )\n : null;\n\n return (\n <div\n key={field.display}\n className=\"flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0\"\n >\n <p className=\"body flex w-full justify-start col-span-1\">{field.display}</p>\n <div className=\"body flex w-full justify-start text-wrap break-all\">\n {renderValue(field, value)}\n </div>\n </div>\n );\n })\n : fields.map((_, index) => <Skeleton key={index} className=\"h-12 w-full\" />)}\n </div>\n </CardContent>\n </Card>\n );\n};\n"],"names":["KeyValueCard","data","label","fields","renderValue","field","value","jsx","formatDate","item","index","Badge","Card","CardHeader","CardTitle","CardContent","obj","key","jsxs","_","Skeleton"],"mappings":"mVA2BO,MAAMA,EAAe,CAAe,CAAE,KAAAC,EAAM,MAAAC,EAAO,OAAAC,KAAmC,CACzF,MAAMC,EAAc,CAACC,EAAwBC,IAAe,CACxD,GAAID,EAAM,UACN,OAAOA,EAAM,UAAUC,CAAK,EAEhC,GAA2BA,GAAU,KAC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+1,2 @@
1
- import{jsx as o,jsxs as c,Fragment as d}from"react/jsx-runtime";import{ListBoxItem as m,composeRenderProps as r,Collection as l,ListBox as p,Header as u}from"react-aria-components";import{Check as f}from"lucide-react";import{classNames as n}from"../utils/primitives.js";import"clsx";import"lodash-es";const v=l;function N({className:t,...e}){return o(p,{className:r(t,s=>n(s,"group overflow-auto border bg-popover p-1 text-popover-foreground shadow-md outline-none","data-[empty]:p-6 data-[empty]:text-center data-[empty]:body-sm")),...e})}function h({className:t,children:e,...s}){return o(m,{textValue:s.textValue||(typeof e=="string"?e:void 0),className:r(t,a=>n("relative flex w-full cursor-default select-none items-center px-2 py-1.5 body-sm outline-none","disabled-muted","data-[focused]:bg-accent data-[focused]:text-accent-foreground","data-[hovered]:bg-accent data-[hovered]:text-accent-foreground","data-[selection-mode]:pl-input",a)),...s,children:r(e,(a,i)=>c(d,{children:[i.isSelected&&o("span",{className:"absolute left-2 flex size-icon items-center justify-center",children:o(f,{className:"size-icon"})}),a]}))})}function j({className:t,...e}){return o(u,{className:n("py-1.5 pl-input pr-2 body font-semibold",t),...e})}export{N as ListBox,v as ListBoxCollection,j as ListBoxHeader,h as ListBoxItem};
1
+ import{jsx as o,jsxs as c,Fragment as d}from"react/jsx-runtime";import{ListBoxItem as m,composeRenderProps as r,Collection as l,ListBox as p,Header as u}from"react-aria-components";import{classNames as n}from"../utils/primitives.js";import{IcCheck as f}from"./icons.js";import"clsx";import"lodash-es";import"react";const N=l;function h({className:t,...e}){return o(p,{className:r(t,s=>n(s,"group overflow-auto border bg-popover p-1 text-popover-foreground shadow-md outline-none","data-[empty]:p-6 data-[empty]:text-center data-[empty]:body-sm")),...e})}function I({className:t,children:e,...s}){return o(m,{textValue:s.textValue||(typeof e=="string"?e:void 0),className:r(t,a=>n("relative flex w-full cursor-default select-none items-center px-2 py-1.5 body-sm outline-none","disabled-muted","data-[focused]:bg-accent data-[focused]:text-accent-foreground","data-[hovered]:bg-accent data-[hovered]:text-accent-foreground","data-[selection-mode]:pl-input",a)),...s,children:r(e,(a,i)=>c(d,{children:[i.isSelected&&o("span",{className:"absolute left-2 flex size-icon items-center justify-center",children:o(f,{className:"size-icon"})}),a]}))})}function j({className:t,...e}){return o(u,{className:n("py-1.5 pl-input pr-2 body font-semibold",t),...e})}export{h as ListBox,N as ListBoxCollection,j as ListBoxHeader,I as ListBoxItem};
2
2
  //# sourceMappingURL=list-box.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-box.js","sources":["../../lib/components/list-box.tsx"],"sourcesContent":["import {\n Collection as AriaCollection,\n Header as AriaHeader,\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxItemProps as AriaListBoxItemProps,\n ListBoxProps as AriaListBoxProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport { Check } from 'lucide-react';\nimport { classNames } from '../utils/primitives';\n\nexport const ListBoxCollection = AriaCollection;\n\nexport function ListBox<T extends object>({ className, ...props }: AriaListBoxProps<T>) {\n return (\n <AriaListBox\n className={composeRenderProps(className, className =>\n classNames(\n className,\n 'group overflow-auto border bg-popover p-1 text-popover-foreground shadow-md outline-none',\n /* Empty */\n 'data-[empty]:p-6 data-[empty]:text-center data-[empty]:body-sm'\n )\n )}\n {...props}\n />\n );\n}\n\nexport function ListBoxItem<T extends object>({ className, children, ...props }: AriaListBoxItemProps<T>) {\n return (\n <AriaListBoxItem\n textValue={props.textValue || (typeof children === 'string' ? children : undefined)}\n className={composeRenderProps(className, className =>\n classNames(\n 'relative flex w-full cursor-default select-none items-center px-2 py-1.5 body-sm outline-none',\n /* Disabled */\n 'disabled-muted',\n /* Focused */\n 'data-[focused]:bg-accent data-[focused]:text-accent-foreground',\n /* Hovered */\n 'data-[hovered]:bg-accent data-[hovered]:text-accent-foreground',\n /* Selection */\n 'data-[selection-mode]:pl-input',\n className\n )\n )}\n {...props}\n >\n {composeRenderProps(children, (children, renderProps) => (\n <>\n {renderProps.isSelected && (\n <span className=\"absolute left-2 flex size-icon items-center justify-center\">\n <Check className=\"size-icon\" />\n </span>\n )}\n {children}\n </>\n ))}\n </AriaListBoxItem>\n );\n}\n\nexport function ListBoxHeader({ className, ...props }: React.ComponentProps<typeof AriaHeader>) {\n return <AriaHeader className={classNames('py-1.5 pl-input pr-2 body font-semibold', className)} {...props} />;\n}\n"],"names":["ListBoxCollection","AriaCollection","ListBox","className","props","jsx","AriaListBox","composeRenderProps","classNames","ListBoxItem","children","AriaListBoxItem","renderProps","jsxs","Fragment","Check","ListBoxHeader","AriaHeader"],"mappings":"6SAaO,MAAMA,EAAoBC,EAE1B,SAASC,EAA0B,CAAE,UAAAC,EAAW,GAAGC,GAA8B,CACpF,OACIC,EAACC,EAAA,CACG,UAAWC,EAAmBJ,EAAWA,GACrCK,EACIL,EACA,2FAEA,gEAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAEO,SAASK,EAA8B,CAAE,UAAAN,EAAW,SAAAO,EAAU,GAAGN,GAAkC,CACtG,OACIC,EAACM,EAAA,CACG,UAAWP,EAAM,YAAc,OAAOM,GAAa,SAAWA,EAAW,QACzE,UAAWH,EAAmBJ,EAAWA,GACrCK,EACI,gGAEA,iBAEA,iEAEA,iEAEA,iCACAL,CAAA,CACJ,EAEH,GAAGC,EAEH,SAAAG,EAAmBG,EAAU,CAACA,EAAUE,IACrCC,EAAAC,EAAA,CACK,SAAA,CAAAF,EAAY,cACR,OAAA,CAAK,UAAU,6DACZ,SAAAP,EAACU,EAAA,CAAM,UAAU,WAAA,CAAY,CAAA,CACjC,EAEHL,CAAA,EACL,CACH,CAAA,CAAA,CAGb,CAEO,SAASM,EAAc,CAAE,UAAAb,EAAW,GAAGC,GAAkD,CAC5F,OAAOC,EAACY,GAAW,UAAWT,EAAW,0CAA2CL,CAAS,EAAI,GAAGC,EAAO,CAC/G"}
1
+ {"version":3,"file":"list-box.js","sources":["../../lib/components/list-box.tsx"],"sourcesContent":["import {\n Collection as AriaCollection,\n Header as AriaHeader,\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxItemProps as AriaListBoxItemProps,\n ListBoxProps as AriaListBoxProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport { classNames } from '../utils/primitives';\nimport { IcCheck } from './icons';\n\nexport const ListBoxCollection = AriaCollection;\n\nexport function ListBox<T extends object>({ className, ...props }: AriaListBoxProps<T>) {\n return (\n <AriaListBox\n className={composeRenderProps(className, className =>\n classNames(\n className,\n 'group overflow-auto border bg-popover p-1 text-popover-foreground shadow-md outline-none',\n /* Empty */\n 'data-[empty]:p-6 data-[empty]:text-center data-[empty]:body-sm'\n )\n )}\n {...props}\n />\n );\n}\n\nexport function ListBoxItem<T extends object>({ className, children, ...props }: AriaListBoxItemProps<T>) {\n return (\n <AriaListBoxItem\n textValue={props.textValue || (typeof children === 'string' ? children : undefined)}\n className={composeRenderProps(className, className =>\n classNames(\n 'relative flex w-full cursor-default select-none items-center px-2 py-1.5 body-sm outline-none',\n /* Disabled */\n 'disabled-muted',\n /* Focused */\n 'data-[focused]:bg-accent data-[focused]:text-accent-foreground',\n /* Hovered */\n 'data-[hovered]:bg-accent data-[hovered]:text-accent-foreground',\n /* Selection */\n 'data-[selection-mode]:pl-input',\n className\n )\n )}\n {...props}\n >\n {composeRenderProps(children, (children, renderProps) => (\n <>\n {renderProps.isSelected && (\n <span className=\"absolute left-2 flex size-icon items-center justify-center\">\n <IcCheck className=\"size-icon\" />\n </span>\n )}\n {children}\n </>\n ))}\n </AriaListBoxItem>\n );\n}\n\nexport function ListBoxHeader({ className, ...props }: React.ComponentProps<typeof AriaHeader>) {\n return <AriaHeader className={classNames('py-1.5 pl-input pr-2 body font-semibold', className)} {...props} />;\n}\n"],"names":["ListBoxCollection","AriaCollection","ListBox","className","props","jsx","AriaListBox","composeRenderProps","classNames","ListBoxItem","children","AriaListBoxItem","renderProps","jsxs","Fragment","IcCheck","ListBoxHeader","AriaHeader"],"mappings":"2TAaO,MAAMA,EAAoBC,EAE1B,SAASC,EAA0B,CAAE,UAAAC,EAAW,GAAGC,GAA8B,CACpF,OACIC,EAACC,EAAA,CACG,UAAWC,EAAmBJ,EAAWA,GACrCK,EACIL,EACA,2FAEA,gEAAA,CACJ,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAEO,SAASK,EAA8B,CAAE,UAAAN,EAAW,SAAAO,EAAU,GAAGN,GAAkC,CACtG,OACIC,EAACM,EAAA,CACG,UAAWP,EAAM,YAAc,OAAOM,GAAa,SAAWA,EAAW,QACzE,UAAWH,EAAmBJ,EAAWA,GACrCK,EACI,gGAEA,iBAEA,iEAEA,iEAEA,iCACAL,CAAA,CACJ,EAEH,GAAGC,EAEH,SAAAG,EAAmBG,EAAU,CAACA,EAAUE,IACrCC,EAAAC,EAAA,CACK,SAAA,CAAAF,EAAY,cACR,OAAA,CAAK,UAAU,6DACZ,SAAAP,EAACU,EAAA,CAAQ,UAAU,WAAA,CAAY,CAAA,CACnC,EAEHL,CAAA,EACL,CACH,CAAA,CAAA,CAGb,CAEO,SAASM,EAAc,CAAE,UAAAb,EAAW,GAAGC,GAAkD,CAC5F,OAAOC,EAACY,GAAW,UAAWT,EAAW,0CAA2CL,CAAS,EAAI,GAAGC,EAAO,CAC/G"}
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Loader2 as m}from"lucide-react";import{classNames as i}from"../utils/primitives.js";import"clsx";import"lodash-es";function n({className:o}){return r(m,{className:i("animate-spin size-icon",o)})}export{n as Loader};
1
+ import{jsx as r}from"react/jsx-runtime";import{classNames as m}from"../utils/primitives.js";import{IcLoader as t}from"./icons.js";import"clsx";import"lodash-es";import"react";function c({className:o}){return r(t,{className:m("animate-spin size-icon text-foreground",o)})}export{c as Loader};
2
2
  //# sourceMappingURL=loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sources":["../../lib/components/loader.tsx"],"sourcesContent":["import { Loader2 } from 'lucide-react';\nimport { classNames } from '../utils/primitives';\n\ninterface LoaderProps {\n className?: string; // Define props interface\n}\n\nexport function Loader({ className }: LoaderProps) {\n return <Loader2 className={classNames(`animate-spin size-icon`, className)} />;\n}\n"],"names":["Loader","className","Loader2","classNames"],"mappings":"kKAOO,SAASA,EAAO,CAAE,UAAAC,GAA0B,CAC/C,SAAQC,EAAA,CAAQ,UAAWC,EAAW,yBAA0BF,CAAS,EAAG,CAChF"}
1
+ {"version":3,"file":"loader.js","sources":["../../lib/components/loader.tsx"],"sourcesContent":["import { classNames } from '../utils/primitives';\nimport { IcLoader } from './icons';\n\ninterface LoaderProps {\n className?: string; // Define props interface\n}\n\nexport function Loader({ className }: LoaderProps) {\n return <IcLoader className={classNames(`animate-spin size-icon text-foreground`, className)} />;\n}\n"],"names":["Loader","className","IcLoader","classNames"],"mappings":"+KAOO,SAASA,EAAO,CAAE,UAAAC,GAA0B,CAC/C,SAAQC,EAAA,CAAS,UAAWC,EAAW,yCAA0CF,CAAS,EAAG,CACjG"}
@@ -1,2 +1,2 @@
1
- import{jsxs as s,jsx as o,Fragment as c}from"react/jsx-runtime";import{MenuTrigger as p,MenuItem as d,composeRenderProps as m,Menu as f,SubmenuTrigger as b,Header as M,Separator as g,Keyboard as h}from"react-aria-components";import{classNames as a}from"../utils/primitives.js";import{Dot as x,Check as y,ChevronRight as N}from"lucide-react";import{Button as v}from"./button.js";import{ListBoxCollection as S}from"./list-box.js";import{SelectPopover as T}from"./select.js";import"clsx";import"lodash-es";import"class-variance-authority";import"./loader.js";import"./field.js";import"../utils/form-utils.js";import"react";import"../utils/form-context.js";import"@tanstack/react-form";import"./popover.js";const _=p,J=b,O=S;function j({className:e,...t}){return o(T,{className:m(e,r=>a(r)),...t})}function z({className:e,...t}){return o(f,{className:a("overflow-auto p-1 outline-0 [clip-path:inset(0_0_0_0_round_calc(var(--radius)-2px))]",e),escapeKeyBehavior:"none",...t})}function P({children:e,className:t,...r}){return o(d,{textValue:r.textValue||(typeof e=="string"?e:void 0),className:m(t,n=>a("btn btn-ghost relative flex justify-start input-dim","data-[selection-mode]:pl-input",n)),...r,children:m(e,(n,i)=>s(c,{children:[o("span",{className:"absolute left-2 flex size-icon items-center justify-center",children:i.isSelected&&s(c,{children:[i.selectionMode=="single"&&o(x,{className:"size-icon fill-current"}),i.selectionMode=="multiple"&&o(y,{className:"size-icon"})]})}),n,i.hasSubmenu&&o(N,{className:"ml-auto size-icon"})]}))})}function Q({className:e,inset:t,separator:r=!0,...n}){return o(M,{className:a("px-3 py-1.5 body font-semibold",t&&"pl-input",r&&"-mx-1 mb-1 border-b border-b-border pb-2.5",e),...n})}function U({className:e,...t}){return o(g,{className:a("-mx-1 my-1 h-px bg-muted",e),...t})}function W({className:e,...t}){return o(h,{className:a("ml-auto body-sm tracking-widest opacity-60",e),...t})}function X({label:e,children:t,variant:r,isDisabled:n,size:i,isNonModal:l,...u}){return s(_,{...u,children:[o(v,{isDisabled:n,type:"button",variant:r,size:i,children:e}),o(j,{isNonModal:l,className:"overflow-auto",children:o(z,{...u,children:t})})]})}export{X as EasyMenu,z as Menu,O as MenuCollection,Q as MenuHeader,P as MenuItem,W as MenuKeyboard,j as MenuPopover,U as MenuSeparator,J as MenuSubTrigger,_ as MenuTrigger};
1
+ import{jsxs as s,jsx as o,Fragment as c}from"react/jsx-runtime";import{MenuTrigger as p,MenuItem as f,composeRenderProps as a,Menu as d,SubmenuTrigger as b,Header as M,Separator as g,Keyboard as y}from"react-aria-components";import{classNames as m}from"../utils/primitives.js";import{Button as x}from"./button.js";import{IcDot as N,IcCheck as h,IcRight as v}from"./icons.js";import{ListBoxCollection as S}from"./list-box.js";import{SelectPopover as I}from"./select.js";import"clsx";import"lodash-es";import"class-variance-authority";import"./loader.js";import"react";import"./field.js";import"../utils/form-utils.js";import"../utils/form-context.js";import"@tanstack/react-form";import"./popover.js";const T=p,O=b,P=S;function j({className:e,...t}){return o(I,{className:a(e,r=>m(r)),...t})}function z({className:e,...t}){return o(d,{className:m("overflow-auto p-1 outline-0 body-base",e),escapeKeyBehavior:"none",...t})}function Q({children:e,className:t,...r}){return o(f,{textValue:r.textValue||(typeof e=="string"?e:void 0),className:a(t,n=>m("btn btn-ghost relative flex justify-start input-dim","data-[selection-mode]:pl-input",n)),...r,children:a(e,(n,i)=>s(c,{children:[o("span",{className:"absolute left-2 flex size-icon items-center justify-center",children:i.isSelected&&s(c,{children:[i.selectionMode=="single"&&o(N,{className:"size-icon fill-current"}),i.selectionMode=="multiple"&&o(h,{className:"size-icon"})]})}),n,i.hasSubmenu&&o(v,{className:"ml-auto size-icon"})]}))})}function U({className:e,inset:t,separator:r=!0,...n}){return o(M,{className:m("px-3 py-1.5 body font-semibold",t&&"pl-input",r&&"-mx-1 mb-1 border-b border-b-border pb-2.5",e),...n})}function W({className:e,...t}){return o(g,{className:m("-mx-1 my-1 h-px bg-muted",e),...t})}function X({className:e,...t}){return o(y,{className:m("ml-auto body-sm tracking-widest opacity-60",e),...t})}function Y({label:e,children:t,variant:r,isDisabled:n,size:i,isNonModal:l,...u}){return s(T,{...u,children:[o(x,{isDisabled:n,type:"button",variant:r,size:i,children:e}),o(j,{isNonModal:l,className:"overflow-auto",children:o(z,{...u,children:t})})]})}export{Y as EasyMenu,z as Menu,P as MenuCollection,U as MenuHeader,Q as MenuItem,X as MenuKeyboard,j as MenuPopover,W as MenuSeparator,O as MenuSubTrigger,T as MenuTrigger};
2
2
  //# sourceMappingURL=menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sources":["../../lib/components/menu.tsx"],"sourcesContent":["import { VariantProps } from 'class-variance-authority';\nimport {\n Header as AriaHeader,\n Keyboard as AriaKeyboard,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuItemProps as AriaMenuItemProps,\n MenuProps as AriaMenuProps,\n MenuTrigger as AriaMenuTrigger,\n MenuTriggerProps as AriaMenuTriggerProps,\n Separator as AriaSeparator,\n SeparatorProps as AriaSeparatorProps,\n SubmenuTrigger as AriaSubmenuTrigger,\n composeRenderProps,\n PopoverProps,\n} from 'react-aria-components';\n\nimport { classNames } from '../utils/primitives';\n\nimport { Check, ChevronRight, Dot } from 'lucide-react';\nimport { Button, buttonVariants } from './button';\nimport { ListBoxCollection } from './list-box';\nimport { SelectPopover } from './select';\n\nexport const MenuTrigger = AriaMenuTrigger;\nexport const MenuSubTrigger = AriaSubmenuTrigger;\nexport const MenuCollection = ListBoxCollection;\n\nexport function MenuPopover({ className, ...props }: PopoverProps) {\n return <SelectPopover className={composeRenderProps(className, className => classNames(className))} {...props} />;\n}\n\nexport function Menu<T extends object>({ className, ...props }: AriaMenuProps<T>) {\n return (\n <AriaMenu\n className={classNames(\n 'overflow-auto p-1 outline-0 [clip-path:inset(0_0_0_0_round_calc(var(--radius)-2px))]',\n className\n )}\n escapeKeyBehavior=\"none\"\n {...props}\n />\n );\n}\n\n// TODO standardize the styles on this component? This is the equivalent to a ghost button\nexport function MenuItem({ children, className, ...props }: AriaMenuItemProps & { ref?: React.Ref<HTMLDivElement> }) {\n return (\n <AriaMenuItem\n textValue={props.textValue || (typeof children === 'string' ? children : undefined)}\n className={composeRenderProps(className, className =>\n classNames(\n 'btn btn-ghost relative flex justify-start input-dim',\n /* Selection Mode */\n 'data-[selection-mode]:pl-input',\n className\n )\n )}\n {...props}\n >\n {composeRenderProps(children, (children, renderProps) => (\n <>\n <span className=\"absolute left-2 flex size-icon items-center justify-center\">\n {renderProps.isSelected && (\n <>\n {renderProps.selectionMode == 'single' && <Dot className=\"size-icon fill-current\" />}\n {renderProps.selectionMode == 'multiple' && <Check className=\"size-icon\" />}\n </>\n )}\n </span>\n\n {children}\n\n {renderProps.hasSubmenu && <ChevronRight className=\"ml-auto size-icon\" />}\n </>\n ))}\n </AriaMenuItem>\n );\n}\n\ninterface MenuHeaderProps extends React.ComponentProps<typeof AriaHeader> {\n inset?: boolean;\n separator?: boolean;\n}\n\nexport function MenuHeader({ className, inset, separator = true, ...props }: MenuHeaderProps) {\n return (\n <AriaHeader\n className={classNames(\n 'px-3 py-1.5 body font-semibold',\n inset && 'pl-input',\n separator && '-mx-1 mb-1 border-b border-b-border pb-2.5',\n className\n )}\n {...props}\n />\n );\n}\n\nexport function MenuSeparator({ className, ...props }: AriaSeparatorProps) {\n return <AriaSeparator className={classNames('-mx-1 my-1 h-px bg-muted', className)} {...props} />;\n}\n\nexport function MenuKeyboard({ className, ...props }: React.ComponentProps<typeof AriaKeyboard>) {\n return <AriaKeyboard className={classNames('ml-auto body-sm tracking-widest opacity-60', className)} {...props} />;\n}\ninterface MenuProps<T>\n extends AriaMenuProps<T>,\n VariantProps<typeof buttonVariants>,\n Omit<AriaMenuTriggerProps, 'children'> {\n label?: React.ReactNode;\n isDisabled?: boolean;\n isNonModal?: boolean;\n}\n// TODO name this better\nexport function EasyMenu<T extends object>({\n label,\n children,\n variant,\n isDisabled,\n size,\n isNonModal,\n ...props\n}: MenuProps<T>) {\n return (\n <MenuTrigger {...props}>\n <Button isDisabled={isDisabled} type=\"button\" variant={variant} size={size}>\n {label}\n </Button>\n <MenuPopover isNonModal={isNonModal} className=\"overflow-auto\">\n <Menu {...props}>{children}</Menu>\n </MenuPopover>\n </MenuTrigger>\n );\n}\n"],"names":["MenuTrigger","AriaMenuTrigger","MenuSubTrigger","AriaSubmenuTrigger","MenuCollection","ListBoxCollection","MenuPopover","className","props","jsx","SelectPopover","composeRenderProps","classNames","Menu","AriaMenu","MenuItem","children","AriaMenuItem","renderProps","jsxs","Fragment","Dot","Check","ChevronRight","MenuHeader","inset","separator","AriaHeader","MenuSeparator","AriaSeparator","MenuKeyboard","AriaKeyboard","EasyMenu","label","variant","isDisabled","size","isNonModal","Button"],"mappings":"+rBAwBO,MAAMA,EAAcC,EACdC,EAAiBC,EACjBC,EAAiBC,EAEvB,SAASC,EAAY,CAAE,UAAAC,EAAW,GAAGC,GAAuB,CAC/D,OAAOC,EAACC,EAAA,CAAc,UAAWC,EAAmBJ,EAAWA,GAAaK,EAAWL,CAAS,CAAC,EAAI,GAAGC,CAAA,CAAO,CACnH,CAEO,SAASK,EAAuB,CAAE,UAAAN,EAAW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SAASwB,EAA2B,CACvC,MAAAC,EACA,SAAAjB,EACA,QAAAkB,EACA,WAAAC,EACA,KAAAC,EACA,WAAAC,EACA,GAAG7B,CACP,EAAiB,CACb,OACIW,EAACnB,EAAA,CAAa,GAAGQ,EACb,SAAA,CAAAC,EAAC6B,GAAO,WAAAH,EAAwB,KAAK,SAAS,QAAAD,EAAkB,KAAAE,EAC3D,SAAAH,EACL,EACAxB,EAACH,EAAA,CAAY,WAAA+B,EAAwB,UAAU,gBAC3C,WAACxB,EAAA,CAAM,GAAGL,EAAQ,SAAAQ,CAAA,CAAS,CAAA,CAC/B,CAAA,EACJ,CAER"}
1
+ {"version":3,"file":"menu.js","sources":["../../lib/components/menu.tsx"],"sourcesContent":["import { VariantProps } from 'class-variance-authority';\nimport {\n Header as AriaHeader,\n Keyboard as AriaKeyboard,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuItemProps as AriaMenuItemProps,\n MenuProps as AriaMenuProps,\n MenuTrigger as AriaMenuTrigger,\n MenuTriggerProps as AriaMenuTriggerProps,\n Separator as AriaSeparator,\n SeparatorProps as AriaSeparatorProps,\n SubmenuTrigger as AriaSubmenuTrigger,\n composeRenderProps,\n PopoverProps,\n} from 'react-aria-components';\n\nimport { classNames } from '../utils/primitives';\n\nimport { Button, buttonVariants } from './button';\nimport { IcCheck, IcDot, IcRight } from './icons';\nimport { ListBoxCollection } from './list-box';\nimport { SelectPopover } from './select';\n\nexport const MenuTrigger = AriaMenuTrigger;\nexport const MenuSubTrigger = AriaSubmenuTrigger;\nexport const MenuCollection = ListBoxCollection;\n\nexport function MenuPopover({ className, ...props }: PopoverProps) {\n return <SelectPopover className={composeRenderProps(className, className => classNames(className))} {...props} />;\n}\n\nexport function Menu<T extends object>({ className, ...props }: AriaMenuProps<T>) {\n return (\n <AriaMenu\n className={classNames('overflow-auto p-1 outline-0 body-base', className)}\n escapeKeyBehavior=\"none\"\n {...props}\n />\n );\n}\n\n// TODO standardize the styles on this component? This is the equivalent to a ghost button\nexport function MenuItem({ children, className, ...props }: AriaMenuItemProps & { ref?: React.Ref<HTMLDivElement> }) {\n return (\n <AriaMenuItem\n textValue={props.textValue || (typeof children === 'string' ? children : undefined)}\n className={composeRenderProps(className, className =>\n classNames(\n 'btn btn-ghost relative flex justify-start input-dim',\n /* Selection Mode */\n 'data-[selection-mode]:pl-input',\n className\n )\n )}\n {...props}\n >\n {composeRenderProps(children, (children, renderProps) => (\n <>\n <span className=\"absolute left-2 flex size-icon items-center justify-center\">\n {renderProps.isSelected && (\n <>\n {renderProps.selectionMode == 'single' && <IcDot className=\"size-icon fill-current\" />}\n {renderProps.selectionMode == 'multiple' && <IcCheck className=\"size-icon\" />}\n </>\n )}\n </span>\n\n {children}\n\n {renderProps.hasSubmenu && <IcRight className=\"ml-auto size-icon\" />}\n </>\n ))}\n </AriaMenuItem>\n );\n}\n\ninterface MenuHeaderProps extends React.ComponentProps<typeof AriaHeader> {\n inset?: boolean;\n separator?: boolean;\n}\n\nexport function MenuHeader({ className, inset, separator = true, ...props }: MenuHeaderProps) {\n return (\n <AriaHeader\n className={classNames(\n 'px-3 py-1.5 body font-semibold',\n inset && 'pl-input',\n separator && '-mx-1 mb-1 border-b border-b-border pb-2.5',\n className\n )}\n {...props}\n />\n );\n}\n\nexport function MenuSeparator({ className, ...props }: AriaSeparatorProps) {\n return <AriaSeparator className={classNames('-mx-1 my-1 h-px bg-muted', className)} {...props} />;\n}\n\nexport function MenuKeyboard({ className, ...props }: React.ComponentProps<typeof AriaKeyboard>) {\n return <AriaKeyboard className={classNames('ml-auto body-sm tracking-widest opacity-60', className)} {...props} />;\n}\ninterface MenuProps<T>\n extends AriaMenuProps<T>,\n VariantProps<typeof buttonVariants>,\n Omit<AriaMenuTriggerProps, 'children'> {\n label?: React.ReactNode;\n isDisabled?: boolean;\n isNonModal?: boolean;\n}\n// TODO name this better\nexport function EasyMenu<T extends object>({\n label,\n children,\n variant,\n isDisabled,\n size,\n isNonModal,\n ...props\n}: MenuProps<T>) {\n return (\n <MenuTrigger {...props}>\n <Button isDisabled={isDisabled} type=\"button\" variant={variant} size={size}>\n {label}\n </Button>\n <MenuPopover isNonModal={isNonModal} className=\"overflow-auto\">\n <Menu {...props}>{children}</Menu>\n </MenuPopover>\n </MenuTrigger>\n );\n}\n"],"names":["MenuTrigger","AriaMenuTrigger","MenuSubTrigger","AriaSubmenuTrigger","MenuCollection","ListBoxCollection","MenuPopover","className","props","jsx","SelectPopover","composeRenderProps","classNames","Menu","AriaMenu","MenuItem","children","AriaMenuItem","renderProps","jsxs","Fragment","IcDot","IcCheck","IcRight","MenuHeader","inset","separator","AriaHeader","MenuSeparator","AriaSeparator","MenuKeyboard","AriaKeyboard","EasyMenu","label","variant","isDisabled","size","isNonModal","Button"],"mappings":"4rBAwBO,MAAMA,EAAcC,EACdC,EAAiBC,EACjBC,EAAiBC,EAEvB,SAASC,EAAY,CAAE,UAAAC,EAAW,GAAGC,GAAuB,CAC/D,OAAOC,EAACC,EAAA,CAAc,UAAWC,EAAmBJ,EAAWA,GAAaK,EAAWL,CAAS,CAAC,EAAI,GAAGC,CAAA,CAAO,CACnH,CAEO,SAASK,EAAuB,CAAE,UAAAN,EAAW,GAAGC,GAA2B,CAC9E,OACIC,EAACK,EAAA,CACG,UAAWF,EAAW,wCAAyCL,CAAS,EACxE,kBAAkB,OACjB,GAAGC,CAAA,CAAA,CAGhB,CAGO,SAASO,EAAS,CAAE,SAAAC,EAAU,UAAAT,EAAW,GAAGC,GAAkE,CACjH,OACIC,EAACQ,EAAA,CACG,UAAWT,EAAM,YAAc,OAAOQ,GAAa,SAAWA,EAAW,QACzE,UAAWL,EAAmBJ,EAAWA,GACrCK,EACI,sDAEA,iCACAL,CAAA,CACJ,EAEH,GAAGC,EAEH,SAAAG,EAAmBK,EAAU,CAACA,EAAUE,IACrCC,EAAAC,EAAA,CACI,SAAA,CAAAX,EAAC,OAAA,CAAK,UAAU,6DACX,SAAAS,EAAY,YACTC,EAAAC,EAAA,CACK,SAAA,CAAAF,EAAY,eAAiB,UAAYT,EAACY,EAAA,CAAM,UAAU,yBAAyB,EACnFH,EAAY,eAAiB,YAAcT,EAACa,EAAA,CAAQ,UAAU,WAAA,CAAY,CAAA,CAAA,CAC/E,CAAA,CAER,EAECN,EAEAE,EAAY,YAAcT,EAACc,EAAA,CAAQ,UAAU,mBAAA,CAAoB,CAAA,EACtE,CACH,CAAA,CAAA,CAGb,CAOO,SAASC,EAAW,CAAE,UAAAjB,EAAW,MAAAkB,EAAO,UAAAC,EAAY,GAAM,GAAGlB,GAA0B,CAC1F,OACIC,EAACkB,EAAA,CACG,UAAWf,EACP,iCACAa,GAAS,WACTC,GAAa,6CACbnB,CAAA,EAEH,GAAGC,CAAA,CAAA,CAGhB,CAEO,SAASoB,EAAc,CAAE,UAAArB,EAAW,GAAGC,GAA6B,CACvE,OAAOC,EAACoB,GAAc,UAAWjB,EAAW,2BAA4BL,CAAS,EAAI,GAAGC,EAAO,CACnG,CAEO,SAASsB,EAAa,CAAE,UAAAvB,EAAW,GAAGC,GAAoD,CAC7F,OAAOC,EAACsB,GAAa,UAAWnB,EAAW,6CAA8CL,CAAS,EAAI,GAAGC,EAAO,CACpH,CAUO,SAASwB,EAA2B,CACvC,MAAAC,EACA,SAAAjB,EACA,QAAAkB,EACA,WAAAC,EACA,KAAAC,EACA,WAAAC,EACA,GAAG7B,CACP,EAAiB,CACb,OACIW,EAACnB,EAAA,CAAa,GAAGQ,EACb,SAAA,CAAAC,EAAC6B,GAAO,WAAAH,EAAwB,KAAK,SAAS,QAAAD,EAAkB,KAAAE,EAC3D,SAAAH,EACL,EACAxB,EAACH,EAAA,CAAY,WAAA+B,EAAwB,UAAU,gBAC3C,WAACxB,EAAA,CAAM,GAAGL,EAAQ,SAAAQ,CAAA,CAAS,CAAA,CAC/B,CAAA,EACJ,CAER"}
@@ -1,2 +1,2 @@
1
- import{jsx as i}from"react/jsx-runtime";import{FormField as d}from"./field.js";import{EasyMenu as p,MenuItem as a}from"./menu.js";import{useTfFieldContext as f}from"../utils/form-utils.js";import{getFieldErrorMessage as u}from"../utils/primitives.js";import"class-variance-authority";import"react-aria-components";import"lucide-react";import"./button.js";import"./loader.js";import"./list-box.js";import"./select.js";import"./popover.js";import"react";import"../utils/form-context.js";import"@tanstack/react-form";import"clsx";import"lodash-es";function c({items:o,value:e,onChange:t,label:l,errorMessage:n,description:m,...s}){return i("div",{className:"group form-field",children:i(d,{label:l,description:m,errorMessage:n,children:i(p,{selectionMode:"multiple",selectedKeys:e,onSelectionChange:r=>{typeof r!="string"&&t(r)},items:o,label:e.size,...s,children:r=>i(a,{id:r.id,isDisabled:r?.disabled,children:r.label},r.id)})})})}function I({...o}){const e=f({disabled:o.isDisabled});return i(c,{value:new Set(e.state.value),onChange:t=>e.setValue(Array.from(t)),onClose:e.handleBlur,errorMessage:u(e),...o})}export{c as MultiSelect,I as TfMultiSelect};
1
+ import{jsx as i}from"react/jsx-runtime";import{FormField as d}from"./field.js";import{EasyMenu as p,MenuItem as a}from"./menu.js";import{useTfFieldContext as f}from"../utils/form-utils.js";import{getFieldErrorMessage as u}from"../utils/primitives.js";import"class-variance-authority";import"react-aria-components";import"./icons.js";import"react";import"./button.js";import"./loader.js";import"./list-box.js";import"./select.js";import"./popover.js";import"../utils/form-context.js";import"@tanstack/react-form";import"clsx";import"lodash-es";function c({items:o,value:e,onChange:t,label:l,errorMessage:n,description:m,...s}){return i("div",{className:"group form-field",children:i(d,{label:l,description:m,errorMessage:n,children:i(p,{selectionMode:"multiple",selectedKeys:e,onSelectionChange:r=>{typeof r!="string"&&t(r)},items:o,label:e.size,...s,children:r=>i(a,{id:r.id,isDisabled:r?.disabled,children:r.label},r.id)})})})}function I({...o}){const e=f({disabled:o.isDisabled});return i(c,{value:new Set(e.state.value),onChange:t=>e.setValue(Array.from(t)),onClose:e.handleBlur,errorMessage:u(e),...o})}export{c as MultiSelect,I as TfMultiSelect};
2
2
  //# sourceMappingURL=multi-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select.js","sources":["../../lib/components/multi-select.tsx"],"sourcesContent":["import React from 'react';\nimport { FormField, type FormFieldProps } from '../components/field';\nimport { EasyMenu, MenuItem } from '../components/menu';\nimport type { SelectOption } from '../components/select-options';\nimport { useTfFieldContext } from '../utils/form-utils';\nimport { getFieldErrorMessage } from '../utils/primitives';\n\ninterface MultipleSelectionProps {\n value: Set<string | number>;\n onChange: (v: Set<string | number>) => void;\n buttonLabel?: React.ReactNode;\n items: SelectOption[];\n}\n\nexport interface MultiSelectProps\n extends MultipleSelectionProps,\n FormFieldProps,\n Omit<React.ComponentProps<typeof EasyMenu>, 'label' | 'items'> {}\n\nexport function MultiSelect({\n items,\n value,\n onChange: setValue,\n label,\n errorMessage,\n description,\n ...props\n}: MultiSelectProps) {\n return (\n <div className=\"group form-field\">\n <FormField {...{ label, description, errorMessage }}>\n <EasyMenu\n selectionMode=\"multiple\"\n selectedKeys={value}\n onSelectionChange={v => {\n if (typeof v === 'string') return;\n setValue(v);\n }}\n items={items}\n label={value.size}\n {...props}\n >\n {item => (\n <MenuItem id={item.id} key={item.id} isDisabled={item?.disabled}>\n {item.label}\n </MenuItem>\n )}\n </EasyMenu>\n </FormField>\n </div>\n );\n}\n\n// TODO implement isDisabled\nexport interface TfMultiSelectProps extends Omit<MultiSelectProps, 'value' | 'onChange'> {}\nexport function TfMultiSelect({ ...props }: TfMultiSelectProps) {\n const field = useTfFieldContext<string[]>({\n disabled: props.isDisabled,\n });\n\n // TODO, perf??\n return (\n <MultiSelect\n value={new Set(field.state.value)}\n // @ts-expect-error\n onChange={e => field.setValue(Array.from(e))}\n onClose={field.handleBlur}\n errorMessage={getFieldErrorMessage(field)}\n {...props}\n />\n );\n}\n"],"names":["MultiSelect","items","value","setValue","label","errorMessage","description","props","jsx","FormField","EasyMenu","v","item","MenuItem","TfMultiSelect","field","useTfFieldContext","e","getFieldErrorMessage"],"mappings":"iiBAmBO,SAASA,EAAY,CACxB,MAAAC,EACA,MAAAC,EACA,SAAUC,EACV,MAAAC,EACA,aAAAC,EACA,YAAAC,EACA,GAAGC,CACP,EAAqB,CACjB,OACIC,EAAC,MAAA,CAAI,UAAU,mBACX,SAAAA,EAACC,EAAA,CAAgB,MAAAL,EAAO,YAAAE,EAAa,aAAAD,EACjC,SAAAG,EAACE,EAAA,CACG,cAAc,WACd,aAAcR,EACd,kBAAmBS,GAAK,CAChB,OAAOA,GAAM,UACjBR,EAASQ,CAAC,CACd,EACA,MAAAV,EACA,MAAOC,EAAM,KACZ,GAAGK,EAEH,SAAAK,GACGJ,EAACK,EAAA,CAAS,GAAID,EAAK,GAAkB,WAAYA,GAAM,SAClD,SAAAA,EAAK,KAAA,EADkBA,EAAK,EAEjC,CAAA,CAAA,EAGZ,CAAA,CACJ,CAER,CAIO,SAASE,EAAc,CAAE,GAAGP,GAA6B,CAC5D,MAAMQ,EAAQC,EAA4B,CACtC,SAAUT,EAAM,UAAA,CACnB,EAGD,OACIC,EAACR,EAAA,CACG,MAAO,IAAI,IAAIe,EAAM,MAAM,KAAK,EAEhC,SAAUE,GAAKF,EAAM,SAAS,MAAM,KAAKE,CAAC,CAAC,EAC3C,QAASF,EAAM,WACf,aAAcG,EAAqBH,CAAK,EACvC,GAAGR,CAAA,CAAA,CAGhB"}
1
+ {"version":3,"file":"multi-select.js","sources":["../../lib/components/multi-select.tsx"],"sourcesContent":["import React from 'react';\nimport { FormField, type FormFieldProps } from '../components/field';\nimport { EasyMenu, MenuItem } from '../components/menu';\nimport type { SelectOption } from '../components/select-options';\nimport { useTfFieldContext } from '../utils/form-utils';\nimport { getFieldErrorMessage } from '../utils/primitives';\n\ninterface MultipleSelectionProps {\n value: Set<string | number>;\n onChange: (v: Set<string | number>) => void;\n buttonLabel?: React.ReactNode;\n items: SelectOption[];\n}\n\nexport interface MultiSelectProps\n extends MultipleSelectionProps,\n FormFieldProps,\n Omit<React.ComponentProps<typeof EasyMenu>, 'label' | 'items'> {}\n\nexport function MultiSelect({\n items,\n value,\n onChange: setValue,\n label,\n errorMessage,\n description,\n ...props\n}: MultiSelectProps) {\n return (\n <div className=\"group form-field\">\n <FormField {...{ label, description, errorMessage }}>\n <EasyMenu\n selectionMode=\"multiple\"\n selectedKeys={value}\n onSelectionChange={v => {\n if (typeof v === 'string') return;\n setValue(v);\n }}\n items={items}\n label={value.size}\n {...props}\n >\n {item => (\n <MenuItem id={item.id} key={item.id} isDisabled={item?.disabled}>\n {item.label}\n </MenuItem>\n )}\n </EasyMenu>\n </FormField>\n </div>\n );\n}\n\n// TODO implement isDisabled\nexport interface TfMultiSelectProps extends Omit<MultiSelectProps, 'value' | 'onChange'> {}\nexport function TfMultiSelect({ ...props }: TfMultiSelectProps) {\n const field = useTfFieldContext<string[]>({\n disabled: props.isDisabled,\n });\n\n // TODO, perf??\n return (\n <MultiSelect\n value={new Set(field.state.value)}\n // @ts-expect-error\n onChange={e => field.setValue(Array.from(e))}\n onClose={field.handleBlur}\n errorMessage={getFieldErrorMessage(field)}\n {...props}\n />\n );\n}\n"],"names":["MultiSelect","items","value","setValue","label","errorMessage","description","props","jsx","FormField","EasyMenu","v","item","MenuItem","TfMultiSelect","field","useTfFieldContext","e","getFieldErrorMessage"],"mappings":"+hBAmBO,SAASA,EAAY,CACxB,MAAAC,EACA,MAAAC,EACA,SAAUC,EACV,MAAAC,EACA,aAAAC,EACA,YAAAC,EACA,GAAGC,CACP,EAAqB,CACjB,OACIC,EAAC,MAAA,CAAI,UAAU,mBACX,SAAAA,EAACC,EAAA,CAAgB,MAAAL,EAAO,YAAAE,EAAa,aAAAD,EACjC,SAAAG,EAACE,EAAA,CACG,cAAc,WACd,aAAcR,EACd,kBAAmBS,GAAK,CAChB,OAAOA,GAAM,UACjBR,EAASQ,CAAC,CACd,EACA,MAAAV,EACA,MAAOC,EAAM,KACZ,GAAGK,EAEH,SAAAK,GACGJ,EAACK,EAAA,CAAS,GAAID,EAAK,GAAkB,WAAYA,GAAM,SAClD,SAAAA,EAAK,KAAA,EADkBA,EAAK,EAEjC,CAAA,CAAA,EAGZ,CAAA,CACJ,CAER,CAIO,SAASE,EAAc,CAAE,GAAGP,GAA6B,CAC5D,MAAMQ,EAAQC,EAA4B,CACtC,SAAUT,EAAM,UAAA,CACnB,EAGD,OACIC,EAACR,EAAA,CACG,MAAO,IAAI,IAAIe,EAAM,MAAM,KAAK,EAEhC,SAAUE,GAAKF,EAAM,SAAS,MAAM,KAAKE,CAAC,CAAC,EAC3C,QAASF,EAAM,WACf,aAAcG,EAAqBH,CAAK,EACvC,GAAGR,CAAA,CAAA,CAGhB"}
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as d}from"react/jsx-runtime";import{NumberField as p,composeRenderProps as n,Input as c}from"react-aria-components";import{ChevronUp as f,ChevronDown as h}from"lucide-react";import{Button as b}from"./button.js";import{useTfFieldContext as N}from"../utils/form-utils.js";import{getFieldErrorMessage as l,classNames as i}from"../utils/primitives.js";import{FormField as g,FieldGroup as F}from"./field.js";import"class-variance-authority";import"./loader.js";import"react";import"../utils/form-context.js";import"@tanstack/react-form";import"clsx";import"lodash-es";const x=p;function v({className:o,...t}){return r(c,{className:n(o,e=>i("w-fit min-w-0 flex-1 border-r border-transparent bg-popover pr-2 outline-0 placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden",e)),...t})}function w({className:o,...t}){return d("div",{className:i("absolute right-0 flex h-full flex-col border-l",o),...t,children:[r(m,{slot:"increment",children:r(f,{"aria-hidden":!0,className:"size-icon"})}),r("div",{className:"border-b"}),r(m,{slot:"decrement",children:r(h,{"aria-hidden":!0,className:"size-icon"})})]})}function m({className:o,...t}){return r(b,{className:n(o,e=>i("w-auto grow h-3 px-0.5 text-muted-foreground",e)),variant:"ghost",size:"none",...t})}function C({label:o,description:t,errorMessage:e,className:s,...a}){return r(x,{className:n(s,u=>i("group form-field",u)),...a,children:r(g,{label:o,description:t,errorMessage:e,children:d(F,{children:[r(v,{}),r(w,{})]})})})}function U({isDisabled:o,...t}){const e=N({disabled:o});return r(C,{isInvalid:!!l(e),isDisabled:o||e.form.state.isSubmitting,value:e.state.value,id:e.name,onChange:e.handleChange,onBlur:e.handleBlur,errorMessage:l(e),...t})}export{C as NumberField,U as TfNumberField};
1
+ import{jsx as r,jsxs as d}from"react/jsx-runtime";import{NumberField as c,composeRenderProps as n,Input as p}from"react-aria-components";import{Button as f}from"./button.js";import{useTfFieldContext as b}from"../utils/form-utils.js";import{getFieldErrorMessage as l,classNames as i}from"../utils/primitives.js";import{FormField as h,FieldGroup as N}from"./field.js";import{IcUp as g,IcDown as F}from"./icons.js";import"class-variance-authority";import"./loader.js";import"react";import"../utils/form-context.js";import"@tanstack/react-form";import"clsx";import"lodash-es";const x=c;function v({className:o,...t}){return r(p,{className:n(o,e=>i("w-fit min-w-0 flex-1 border-r border-transparent bg-popover pr-2 outline-0 placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden",e)),...t})}function w({className:o,...t}){return d("div",{className:i("absolute right-0 flex h-full flex-col border-l",o),...t,children:[r(m,{slot:"increment",children:r(g,{"aria-hidden":!0,className:"size-icon"})}),r("div",{className:"border-b"}),r(m,{slot:"decrement",children:r(F,{"aria-hidden":!0,className:"size-icon"})})]})}function m({className:o,...t}){return r(f,{className:n(o,e=>i("w-auto grow h-3 px-0.5 text-muted-foreground",e)),variant:"ghost",size:"none",...t})}function I({label:o,description:t,errorMessage:e,className:s,...a}){return r(x,{className:n(s,u=>i("group form-field",u)),...a,children:r(h,{label:o,description:t,errorMessage:e,children:d(N,{children:[r(v,{}),r(w,{})]})})})}function U({isDisabled:o,...t}){const e=b({disabled:o});return r(I,{isInvalid:!!l(e),isDisabled:o||e.form.state.isSubmitting,value:e.state.value,id:e.name,onChange:e.handleChange,onBlur:e.handleBlur,errorMessage:l(e),...t})}export{I as NumberField,U as TfNumberField};
2
2
  //# sourceMappingURL=numberfield.js.map