@accelint/design-toolkit 2.4.3 → 2.6.0

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 (283) hide show
  1. package/dist/components/accordion/index.d.ts +1 -1
  2. package/dist/components/accordion/index.js +1 -1
  3. package/dist/components/accordion/index.js.map +1 -1
  4. package/dist/components/accordion/styles.d.ts +1 -5
  5. package/dist/components/accordion/styles.js +1 -1
  6. package/dist/components/accordion/styles.js.map +1 -1
  7. package/dist/components/accordion/types.d.ts +9 -10
  8. package/dist/components/avatar/index.d.ts +4 -2
  9. package/dist/components/avatar/index.js +1 -1
  10. package/dist/components/avatar/index.js.map +1 -1
  11. package/dist/components/avatar/styles.d.ts +16 -15
  12. package/dist/components/avatar/styles.js +1 -1
  13. package/dist/components/avatar/styles.js.map +1 -1
  14. package/dist/components/avatar/types.d.ts +7 -7
  15. package/dist/components/badge/index.d.ts +3 -2
  16. package/dist/components/badge/index.js +1 -1
  17. package/dist/components/badge/index.js.map +1 -1
  18. package/dist/components/badge/styles.js +1 -1
  19. package/dist/components/badge/styles.js.map +1 -1
  20. package/dist/components/badge/types.d.ts +3 -4
  21. package/dist/components/box/index.js +1 -1
  22. package/dist/components/box/index.js.map +1 -1
  23. package/dist/components/button/index.d.ts +6 -4
  24. package/dist/components/button/index.js +1 -1
  25. package/dist/components/button/index.js.map +1 -1
  26. package/dist/components/button/styles.d.ts +25 -24
  27. package/dist/components/button/styles.js +1 -1
  28. package/dist/components/button/styles.js.map +1 -1
  29. package/dist/components/button/types.d.ts +3 -5
  30. package/dist/components/checkbox/index.js +1 -1
  31. package/dist/components/checkbox/index.js.map +1 -1
  32. package/dist/components/checkbox/styles.d.ts +19 -18
  33. package/dist/components/checkbox/styles.js +1 -1
  34. package/dist/components/checkbox/styles.js.map +1 -1
  35. package/dist/components/chip/index.d.ts +4 -2
  36. package/dist/components/chip/index.js +1 -1
  37. package/dist/components/chip/index.js.map +1 -1
  38. package/dist/components/chip/styles.d.ts +70 -69
  39. package/dist/components/chip/styles.js +1 -1
  40. package/dist/components/chip/styles.js.map +1 -1
  41. package/dist/components/chip/types.d.ts +5 -5
  42. package/dist/components/classification-badge/index.d.ts +3 -2
  43. package/dist/components/classification-badge/index.js +1 -1
  44. package/dist/components/classification-badge/index.js.map +1 -1
  45. package/dist/components/classification-badge/styles.js +1 -1
  46. package/dist/components/classification-badge/styles.js.map +1 -1
  47. package/dist/components/classification-badge/types.d.ts +3 -4
  48. package/dist/components/classification-banner/index.d.ts +3 -2
  49. package/dist/components/classification-banner/index.js +1 -1
  50. package/dist/components/classification-banner/index.js.map +1 -1
  51. package/dist/components/classification-banner/styles.js +1 -1
  52. package/dist/components/classification-banner/styles.js.map +1 -1
  53. package/dist/components/classification-banner/types.d.ts +3 -4
  54. package/dist/components/color-picker/index.d.ts +45 -15
  55. package/dist/components/color-picker/index.js +1 -1
  56. package/dist/components/color-picker/index.js.map +1 -1
  57. package/dist/components/color-picker/styles.d.ts +42 -0
  58. package/dist/components/color-picker/styles.js +2 -0
  59. package/dist/components/color-picker/styles.js.map +1 -0
  60. package/dist/components/color-picker/types.d.ts +13 -0
  61. package/dist/components/color-picker/types.js +2 -0
  62. package/dist/components/color-picker/types.js.map +1 -0
  63. package/dist/components/combobox-field/index.d.ts +18 -0
  64. package/dist/components/combobox-field/index.js +2 -0
  65. package/dist/components/combobox-field/index.js.map +1 -0
  66. package/dist/components/combobox-field/styles.d.ts +72 -0
  67. package/dist/components/combobox-field/styles.js +2 -0
  68. package/dist/components/combobox-field/styles.js.map +1 -0
  69. package/dist/components/combobox-field/types.d.ts +28 -0
  70. package/dist/components/combobox-field/types.js +2 -0
  71. package/dist/components/combobox-field/types.js.map +1 -0
  72. package/dist/components/date-field/index.d.ts +8 -24
  73. package/dist/components/date-field/index.js +1 -1
  74. package/dist/components/date-field/index.js.map +1 -1
  75. package/dist/components/date-field/styles.d.ts +69 -0
  76. package/dist/components/date-field/styles.js +2 -0
  77. package/dist/components/date-field/styles.js.map +1 -0
  78. package/dist/components/date-field/types.d.ts +29 -0
  79. package/dist/components/date-field/types.js +2 -0
  80. package/dist/components/date-field/types.js.map +1 -0
  81. package/dist/components/details-list/index.d.ts +59 -0
  82. package/dist/components/details-list/index.js +2 -0
  83. package/dist/components/details-list/index.js.map +1 -0
  84. package/dist/components/details-list/styles.d.ts +65 -0
  85. package/dist/components/details-list/styles.js +2 -0
  86. package/dist/components/details-list/styles.js.map +1 -0
  87. package/dist/components/details-list/types.d.ts +16 -0
  88. package/dist/components/details-list/types.js +2 -0
  89. package/dist/components/details-list/types.js.map +1 -0
  90. package/dist/components/dialog/index.d.ts +1 -0
  91. package/dist/components/dialog/index.js +1 -1
  92. package/dist/components/dialog/index.js.map +1 -1
  93. package/dist/components/drawer/context.d.ts +13 -0
  94. package/dist/components/drawer/context.js +2 -0
  95. package/dist/components/drawer/context.js.map +1 -0
  96. package/dist/components/drawer/index.d.ts +48 -0
  97. package/dist/components/drawer/index.js +2 -0
  98. package/dist/components/drawer/index.js.map +1 -0
  99. package/dist/components/drawer/state.d.ts +26 -0
  100. package/dist/components/drawer/state.js +2 -0
  101. package/dist/components/drawer/state.js.map +1 -0
  102. package/dist/components/drawer/styles.d.ts +118 -0
  103. package/dist/components/drawer/styles.js +2 -0
  104. package/dist/components/drawer/styles.js.map +1 -0
  105. package/dist/components/drawer/types.d.ts +279 -0
  106. package/dist/components/drawer/types.js +2 -0
  107. package/dist/components/drawer/types.js.map +1 -0
  108. package/dist/components/hero/index.d.ts +45 -0
  109. package/dist/components/hero/index.js +2 -0
  110. package/dist/components/hero/index.js.map +1 -0
  111. package/dist/components/hero/styles.d.ts +48 -0
  112. package/dist/components/hero/styles.js +2 -0
  113. package/dist/components/hero/styles.js.map +1 -0
  114. package/dist/components/hero/types.d.ts +13 -0
  115. package/dist/components/hero/types.js +2 -0
  116. package/dist/components/hero/types.js.map +1 -0
  117. package/dist/components/hotkey/index.d.ts +25 -0
  118. package/dist/components/hotkey/index.js +2 -0
  119. package/dist/components/hotkey/index.js.map +1 -0
  120. package/dist/components/hotkey/styles.d.ts +53 -0
  121. package/dist/components/hotkey/styles.js +2 -0
  122. package/dist/components/hotkey/styles.js.map +1 -0
  123. package/dist/components/hotkey/types.d.ts +8 -0
  124. package/dist/components/hotkey/types.js +2 -0
  125. package/dist/components/hotkey/types.js.map +1 -0
  126. package/dist/components/icon/index.d.ts +3 -2
  127. package/dist/components/icon/index.js +1 -1
  128. package/dist/components/icon/index.js.map +1 -1
  129. package/dist/components/icon/styles.js +1 -1
  130. package/dist/components/icon/styles.js.map +1 -1
  131. package/dist/components/icon/types.d.ts +4 -5
  132. package/dist/components/input/index.d.ts +1 -0
  133. package/dist/components/input/index.js +1 -1
  134. package/dist/components/input/index.js.map +1 -1
  135. package/dist/components/input/styles.d.ts +2 -24
  136. package/dist/components/input/styles.js +1 -1
  137. package/dist/components/input/styles.js.map +1 -1
  138. package/dist/components/input/types.d.ts +1 -0
  139. package/dist/components/label/index.d.ts +3 -2
  140. package/dist/components/label/index.js +1 -1
  141. package/dist/components/label/index.js.map +1 -1
  142. package/dist/components/label/styles.js +1 -1
  143. package/dist/components/label/styles.js.map +1 -1
  144. package/dist/components/label/types.d.ts +2 -3
  145. package/dist/components/menu/index.d.ts +16 -21
  146. package/dist/components/menu/index.js +1 -1
  147. package/dist/components/menu/index.js.map +1 -1
  148. package/dist/components/menu/styles.d.ts +9 -6
  149. package/dist/components/menu/styles.js +1 -1
  150. package/dist/components/menu/styles.js.map +1 -1
  151. package/dist/components/menu/types.d.ts +9 -2
  152. package/dist/components/options/index.d.ts +28 -22
  153. package/dist/components/options/index.js +1 -1
  154. package/dist/components/options/index.js.map +1 -1
  155. package/dist/components/options/styles.d.ts +72 -0
  156. package/dist/components/options/styles.js +2 -0
  157. package/dist/components/options/styles.js.map +1 -0
  158. package/dist/components/options/types.d.ts +29 -0
  159. package/dist/components/options/types.js +2 -0
  160. package/dist/components/options/types.js.map +1 -0
  161. package/dist/components/popover/index.js +1 -1
  162. package/dist/components/popover/index.js.map +1 -1
  163. package/dist/components/popover/styles.d.ts +16 -15
  164. package/dist/components/popover/styles.js +1 -1
  165. package/dist/components/popover/styles.js.map +1 -1
  166. package/dist/components/query-builder/action-element.js +1 -1
  167. package/dist/components/query-builder/action-element.js.map +1 -1
  168. package/dist/components/query-builder/constants.js +1 -1
  169. package/dist/components/query-builder/constants.js.map +1 -1
  170. package/dist/components/query-builder/group.js +1 -1
  171. package/dist/components/query-builder/group.js.map +1 -1
  172. package/dist/components/query-builder/index.d.ts +5 -20
  173. package/dist/components/query-builder/index.js +1 -1
  174. package/dist/components/query-builder/index.js.map +1 -1
  175. package/dist/components/query-builder/rule.js +1 -1
  176. package/dist/components/query-builder/rule.js.map +1 -1
  177. package/dist/components/query-builder/types.d.ts +22 -0
  178. package/dist/components/query-builder/types.js +2 -0
  179. package/dist/components/query-builder/types.js.map +1 -0
  180. package/dist/components/query-builder/utils.js +1 -1
  181. package/dist/components/query-builder/utils.js.map +1 -1
  182. package/dist/components/query-builder/value-editor.js +1 -1
  183. package/dist/components/query-builder/value-editor.js.map +1 -1
  184. package/dist/components/query-builder/value-selector.js +1 -1
  185. package/dist/components/query-builder/value-selector.js.map +1 -1
  186. package/dist/components/radio/index.js +1 -1
  187. package/dist/components/radio/index.js.map +1 -1
  188. package/dist/components/radio/styles.d.ts +19 -18
  189. package/dist/components/radio/styles.js +1 -1
  190. package/dist/components/radio/styles.js.map +1 -1
  191. package/dist/components/radio/types.d.ts +2 -3
  192. package/dist/components/search-field/index.d.ts +56 -15
  193. package/dist/components/search-field/index.js +1 -1
  194. package/dist/components/search-field/index.js.map +1 -1
  195. package/dist/components/search-field/styles.d.ts +53 -0
  196. package/dist/components/search-field/styles.js +2 -0
  197. package/dist/components/search-field/styles.js.map +1 -0
  198. package/dist/components/search-field/types.d.ts +25 -0
  199. package/dist/components/search-field/types.js +2 -0
  200. package/dist/components/search-field/types.js.map +1 -0
  201. package/dist/components/select-field/index.d.ts +23 -0
  202. package/dist/components/select-field/index.js +2 -0
  203. package/dist/components/select-field/index.js.map +1 -0
  204. package/dist/components/select-field/styles.d.ts +60 -0
  205. package/dist/components/select-field/styles.js +2 -0
  206. package/dist/components/select-field/styles.js.map +1 -0
  207. package/dist/components/select-field/types.d.ts +26 -0
  208. package/dist/components/select-field/types.js +2 -0
  209. package/dist/components/select-field/types.js.map +1 -0
  210. package/dist/components/skeleton/index.d.ts +42 -0
  211. package/dist/components/skeleton/index.js +2 -0
  212. package/dist/components/skeleton/index.js.map +1 -0
  213. package/dist/components/skeleton/styles.d.ts +23 -0
  214. package/dist/components/skeleton/styles.js +2 -0
  215. package/dist/components/skeleton/styles.js.map +1 -0
  216. package/dist/components/skeleton/types.d.ts +8 -0
  217. package/dist/components/skeleton/types.js +2 -0
  218. package/dist/components/skeleton/types.js.map +1 -0
  219. package/dist/components/slider/index.js +1 -1
  220. package/dist/components/slider/index.js.map +1 -1
  221. package/dist/components/switch/index.d.ts +3 -2
  222. package/dist/components/switch/index.js +1 -1
  223. package/dist/components/switch/index.js.map +1 -1
  224. package/dist/components/switch/styles.d.ts +13 -12
  225. package/dist/components/switch/styles.js +1 -1
  226. package/dist/components/switch/styles.js.map +1 -1
  227. package/dist/components/switch/types.d.ts +2 -3
  228. package/dist/components/tabs/index.js +1 -1
  229. package/dist/components/tabs/index.js.map +1 -1
  230. package/dist/components/text-area-field/index.d.ts +4 -3
  231. package/dist/components/text-area-field/index.js +1 -1
  232. package/dist/components/text-area-field/index.js.map +1 -1
  233. package/dist/components/text-area-field/styles.d.ts +19 -18
  234. package/dist/components/text-area-field/styles.js +1 -1
  235. package/dist/components/text-area-field/styles.js.map +1 -1
  236. package/dist/components/text-area-field/types.d.ts +2 -3
  237. package/dist/components/text-field/index.d.ts +4 -2
  238. package/dist/components/text-field/index.js +1 -1
  239. package/dist/components/text-field/index.js.map +1 -1
  240. package/dist/components/text-field/styles.d.ts +19 -18
  241. package/dist/components/text-field/styles.js +1 -1
  242. package/dist/components/text-field/styles.js.map +1 -1
  243. package/dist/components/text-field/types.d.ts +4 -4
  244. package/dist/components/tooltip/index.d.ts +14 -28
  245. package/dist/components/tooltip/index.js +1 -1
  246. package/dist/components/tooltip/index.js.map +1 -1
  247. package/dist/components/tooltip/styles.d.ts +5 -0
  248. package/dist/components/tooltip/styles.js +2 -0
  249. package/dist/components/tooltip/styles.js.map +1 -0
  250. package/dist/components/tooltip/types.d.ts +8 -0
  251. package/dist/components/tooltip/types.js +2 -0
  252. package/dist/components/tooltip/types.js.map +1 -0
  253. package/dist/components/view-stack/index.d.ts +28 -0
  254. package/dist/components/view-stack/index.js +2 -0
  255. package/dist/components/view-stack/index.js.map +1 -0
  256. package/dist/components/view-stack/types.d.ts +58 -0
  257. package/dist/components/view-stack/types.js +2 -0
  258. package/dist/components/view-stack/types.js.map +1 -0
  259. package/dist/icons/catalog.js +1 -1
  260. package/dist/index.css +20 -0
  261. package/dist/index.d.ts +60 -27
  262. package/dist/index.js +1 -1
  263. package/dist/lib/react.d.ts +13 -12
  264. package/dist/lib/react.js +4 -4
  265. package/dist/lib/react.js.map +1 -1
  266. package/dist/lib/types.d.ts +6 -2
  267. package/dist/lib/utils.js +1 -1
  268. package/dist/lib/utils.js.map +1 -1
  269. package/dist/metafile-esm.json +1 -1
  270. package/dist/styles.css +1476 -321
  271. package/dist/tokens/index.js +1 -1
  272. package/dist/tokens/index.js.map +1 -1
  273. package/dist/variants/variants.css +6 -0
  274. package/package.json +84 -56
  275. package/dist/components/combobox/index.d.ts +0 -32
  276. package/dist/components/combobox/index.js +0 -2
  277. package/dist/components/combobox/index.js.map +0 -1
  278. package/dist/components/options-item/index.d.ts +0 -30
  279. package/dist/components/options-item/index.js +0 -2
  280. package/dist/components/options-item/index.js.map +0 -1
  281. package/dist/components/query-builder/example-configuration.d.ts +0 -30
  282. package/dist/components/query-builder/example-configuration.js +0 -2
  283. package/dist/components/query-builder/example-configuration.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import'client-only';import {createContext}from'react';import {ListBox,ListBoxSection,Header,Collection}from'react-aria-components';import {OptionsItem}from'../options-item/index.js';import {jsx,jsxs}from'react/jsx-runtime';var I=createContext({size:"large",type:"default"});function s({children:e,className:o,description:i,errorMessage:f,label:u,placeholder:y,size:n,type:a,...p}){return jsx(I.Provider,{value:{size:n,type:a},children:jsx(ListBox,{className:"max-h-[200px] overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light",...p,children:e})})}s.displayName="Options";s.Item=OptionsItem;function r({children:e,header:o,items:i}){return jsxs(ListBoxSection,{id:o,className:"mt-s border-default-dark border-t first:border-none",children:[jsx(Header,{className:"m-xs my-s text-default-dark text-header-xs",children:o}),jsx(Collection,{items:i,children:e})]})}r.displayName="Options.Section";s.Section=r;export{s as Options,I as OptionsContext,r as OptionsSection};//# sourceMappingURL=index.js.map
1
+ import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,ListBox,composeRenderProps,ListBoxSection,Header,Collection,Text,ListBoxItem}from'react-aria-components';import {Icon}from'../icon/index.js';import {OptionsStyles}from'./styles.js';const {list:S,section:b,header:B,item:v,content:z,icon:H,label:V,description:g}=OptionsStyles(),E=createContext(null);function O({children:t,classNames:e,header:n,items:i}){return jsxs(ListBoxSection,{id:n,className:b({className:e?.section}),children:[jsx(Header,{className:B({className:e?.header}),children:n}),jsx(Collection,{items:i,children:t})]})}O.displayName="Options.Section";function I({className:t,...e}){return jsx("div",{...e,className:z({className:t})})}I.displayName="Options.Item.Content";function r({className:t,...e}){return jsx(Text,{...e,slot:"label",className:V({className:t})})}r.displayName="Options.Item.Label";function x({className:t,...e}){return jsx(Text,{...e,slot:"description",className:g({className:t})})}x.displayName="Options.Item.Description";function p({children:t,classNames:e,color:n="info",textValue:i=typeof t=="string"?t:"",...a}){return jsx(ListBoxItem,{...a,className:composeRenderProps(e?.item,s=>v({className:s})),textValue:i,"data-color":n,children:composeRenderProps(t,s=>jsx(Icon.Provider,{className:H({className:e?.icon}),size:"small",children:typeof s=="string"?jsx(r,{children:s}):s}))})}p.displayName="Options.Item",p.Label=r,p.Content=I,p.Description=x;function l({ref:t,...e}){[e,t]=useContextProps(e,t??null,E);const{children:n,className:i,size:a,...s}=e;return jsx(ListBox,{...s,ref:t,className:composeRenderProps(i,d=>S({className:d})),"data-size":a,children:n})}l.displayName="Options",l.Item=p,l.Section=O;export{l as Options,E as OptionsContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/options/index.tsx"],"names":["OptionsContext","createContext","Options","children","className","description","errorMessage","label","placeholder","size","type","jsx","AriaListBox","props","OptionsItem","OptionsSection","header","items","jsxs","AriaListBoxSection","AriaHeader","AriaListBoxCollection"],"mappings":"+NAwCaA,IAAAA,CAAiBC,CAAAA,aAE5B,CACA,KAAM,CAAA,OACN,CAAA,IAAM,CAAA,SACP,CAAA,EAEM,SAASC,CAAgC,CAC9C,CAAA,QAAAC,CAAAA,CACA,CAAA,SAAAC,CAAAA,CACA,CAAA,WAAAC,CAAAA,CACA,CAAA,YAAAC,CAAAA,CACA,MAAAC,CAAAA,CACA,CAAA,WAAAC,CAAAA,CACA,CAAA,IAAAC,CAAAA,CACA,CAAA,IAAAC,CAAAA,CACA,CAAA,GACF,CAAA,CAAoB,CAClB,CAAA,OACEC,GAACX,CAAAA,CAAe,CAAA,QAAf,CAAwB,MAAO,CAAE,CAAA,IAAAS,CAAAA,CAAM,CAAA,IAAAC,CAAK,CAAA,CAC3C,CAAA,QAAAC,CAAAA,GAACC,CAAAA,OAAA,CACC,CAAA,SAAU,CAAA,uIACT,CAAA,GAAGC,CAEH,CAAA,QAAAV,CAAAA,CACH,CAAA,CACF,CAEJ,CACAD,CAAAA,CAAQ,CAAA,WAAc,CAAA,SAEtBA,CAAAA,CAAQ,CAAA,IAAOY,CAAAA,WAOR,CAAA,SAASC,CAAuC,CACrD,CAAA,QAAAZ,CAAAA,CACA,CAAA,MAAAa,CAAAA,CACA,MAAAC,CACF,CAAA,CAA2B,CACzB,CAAA,OACEC,IAACC,CAAAA,cAAA,CACC,CAAA,EAAIH,CAAAA,CACJ,CAAA,SAAU,CAAA,qDAEV,CAAA,QAAA,CAAAL,CAAAA,GAACS,CAAAA,MAAA,CAAW,CAAA,SAAU,6CACnB,CAAA,QAAAJ,CAAAA,CACH,CAAA,CACAL,CAAAA,GAACU,CAAAA,UAAA,CAAsB,CAAA,KAAOJ,CAAAA,CAAQ,CAAA,QAAAd,CAAAA,CAAS,CAAA,CAAA,CACjD,CAEJ,CACAY,CAAAA,CAAe,CAAA,WAAc,CAAA,iBAC7Bb,EAAQ,CAAA,OAAUa,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n Header as AriaHeader,\n ListBox as AriaListBox,\n Collection as AriaListBoxCollection,\n type ListBoxProps as AriaListBoxProps,\n ListBoxSection as AriaListBoxSection,\n type ListBoxSectionProps as AriaListBoxSectionProps,\n} from 'react-aria-components';\nimport {\n type IOptionsItem,\n OptionsItem,\n type OptionsItemProps,\n} from '../options-item';\n\nexport interface OptionsProps<T extends IOptionsItem>\n extends AriaListBoxProps<T> {\n className?: string;\n description?: string;\n errorMessage?: string;\n label?: string;\n placeholder?: string;\n size?: OptionsItemProps<T>['size'];\n type?: OptionsItemProps<T>['type'];\n}\n\nexport const OptionsContext = createContext<\n Pick<OptionsProps<IOptionsItem>, 'size' | 'type'>\n>({\n size: 'large',\n type: 'default',\n});\n\nexport function Options<T extends IOptionsItem>({\n children,\n className,\n description,\n errorMessage,\n label,\n placeholder,\n size,\n type,\n ...props\n}: OptionsProps<T>) {\n return (\n <OptionsContext.Provider value={{ size, type }}>\n <AriaListBox<T>\n className='max-h-[200px] overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light'\n {...props}\n >\n {children}\n </AriaListBox>\n </OptionsContext.Provider>\n );\n}\nOptions.displayName = 'Options';\n\nOptions.Item = OptionsItem;\n\ninterface OptionsSectionProps<T extends IOptionsItem>\n extends AriaListBoxSectionProps<T> {\n header?: string;\n}\n\nexport function OptionsSection<T extends IOptionsItem>({\n children,\n header,\n items,\n}: OptionsSectionProps<T>) {\n return (\n <AriaListBoxSection\n id={header}\n className='mt-s border-default-dark border-t first:border-none'\n >\n <AriaHeader className='m-xs my-s text-default-dark text-header-xs'>\n {header}\n </AriaHeader>\n <AriaListBoxCollection items={items}>{children}</AriaListBoxCollection>\n </AriaListBoxSection>\n );\n}\nOptionsSection.displayName = 'Options.Section';\nOptions.Section = OptionsSection;\n"]}
1
+ {"version":3,"sources":["../../../src/components/options/index.tsx"],"names":["item","label","description","D","u","classNames","ListBoxSection","M","y","section","jsx","Header","o","headerClassNames","items","N","className","c","T","textValue","color","children","m","OptionsItemLabel","OptionsItemContent","OptionsItem","OptionsItemDescription","props","useContextProps","ref","OptionsContext","C","ListBox","f","composeRenderProps","size","Options","OptionsSection"],"mappings":"4SAsCE,MAAA,CAAA,IACA,CAAA,CAAA,CAAA,OACA,CAAA,CAAA,CAAAA,aAEA,CAAA,CAAA,CAAA,OACA,CAAA,CAAAC,CAAAA,IACA,CAAA,CAAA,CAAA,KAAA,CAAAC,CACF,YAII,CAAA,CACF,EAEFC,aAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IACE,EAAA,SACA,CAAA,CAAA,CAAA,QAAAC,CAAAA,CACA,WACA,CAAA,CA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AA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n Collection,\n type ContextValue,\n Header,\n ListBox,\n ListBoxItem,\n ListBoxSection,\n Text,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { OptionsStyles } from './styles';\nimport type {\n OptionsDataItem,\n OptionsItemProps,\n OptionsItemTextProps,\n OptionsProps,\n OptionsSectionProps,\n} from './types';\n\nconst {\n list,\n section,\n header: headerClassNames,\n item,\n content,\n icon,\n label,\n description,\n} = OptionsStyles();\n\nexport const OptionsContext =\n createContext<ContextValue<OptionsProps<OptionsDataItem>, HTMLDivElement>>(\n null,\n );\n\nfunction OptionsSection<T extends OptionsDataItem>({\n children,\n classNames,\n header,\n items,\n}: OptionsSectionProps<T>) {\n return (\n <ListBoxSection\n id={header}\n className={section({ className: classNames?.section })}\n >\n <Header className={headerClassNames({ className: classNames?.header })}>\n {header}\n </Header>\n <Collection items={items}>{children}</Collection>\n </ListBoxSection>\n );\n}\nOptionsSection.displayName = 'Options.Section';\n\nfunction OptionsItemContent({ className, ...rest }: OptionsItemTextProps) {\n return <div {...rest} className={content({ className })} />;\n}\nOptionsItemContent.displayName = 'Options.Item.Content';\n\nfunction OptionsItemLabel({ className, ...rest }: OptionsItemTextProps) {\n return <Text {...rest} slot='label' className={label({ className })} />;\n}\nOptionsItemLabel.displayName = 'Options.Item.Label';\n\nfunction OptionsItemDescription({ className, ...rest }: OptionsItemTextProps) {\n return (\n <Text {...rest} slot='description' className={description({ className })} />\n );\n}\nOptionsItemDescription.displayName = 'Options.Item.Description';\n\nfunction OptionsItem<T extends OptionsDataItem>({\n children,\n classNames,\n color = 'info',\n textValue = typeof children === 'string' ? children : '',\n ...rest\n}: OptionsItemProps<T>) {\n return (\n <ListBoxItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className }),\n )}\n textValue={textValue}\n data-color={color}\n >\n {composeRenderProps(children, (children) => (\n <Icon.Provider\n className={icon({ className: classNames?.icon })}\n size='small'\n >\n {typeof children === 'string' ? (\n <OptionsItemLabel>{children}</OptionsItemLabel>\n ) : (\n children\n )}\n </Icon.Provider>\n ))}\n </ListBoxItem>\n );\n}\nOptionsItem.displayName = 'Options.Item';\nOptionsItem.Label = OptionsItemLabel;\nOptionsItem.Content = OptionsItemContent;\nOptionsItem.Description = OptionsItemDescription;\n\nexport function Options<T extends OptionsDataItem>({\n ref,\n ...props\n}: OptionsProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, OptionsContext);\n\n const { children, className, size, ...rest } = props;\n\n return (\n <ListBox<T>\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n list({ className }),\n )}\n data-size={size}\n >\n {children}\n </ListBox>\n );\n}\nOptions.displayName = 'Options';\nOptions.Item = OptionsItem;\nOptions.Section = OptionsSection;\n"]}
@@ -0,0 +1,72 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+
4
+ declare const OptionsStyles: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_merge.ClassNameValue | {
7
+ icon?: tailwind_merge.ClassNameValue;
8
+ content?: tailwind_merge.ClassNameValue;
9
+ header?: tailwind_merge.ClassNameValue;
10
+ label?: tailwind_merge.ClassNameValue;
11
+ section?: tailwind_merge.ClassNameValue;
12
+ list?: tailwind_merge.ClassNameValue;
13
+ description?: tailwind_merge.ClassNameValue;
14
+ item?: tailwind_merge.ClassNameValue;
15
+ };
16
+ };
17
+ } | {
18
+ [x: string]: {
19
+ [x: string]: tailwind_merge.ClassNameValue | {
20
+ icon?: tailwind_merge.ClassNameValue;
21
+ content?: tailwind_merge.ClassNameValue;
22
+ header?: tailwind_merge.ClassNameValue;
23
+ label?: tailwind_merge.ClassNameValue;
24
+ section?: tailwind_merge.ClassNameValue;
25
+ list?: tailwind_merge.ClassNameValue;
26
+ description?: tailwind_merge.ClassNameValue;
27
+ item?: tailwind_merge.ClassNameValue;
28
+ };
29
+ };
30
+ } | {}, {
31
+ list: string;
32
+ section: string;
33
+ header: string;
34
+ item: string[];
35
+ content: string;
36
+ icon: string[];
37
+ label: string[];
38
+ description: string[];
39
+ }, undefined, {
40
+ [key: string]: {
41
+ [key: string]: tailwind_merge.ClassNameValue | {
42
+ icon?: tailwind_merge.ClassNameValue;
43
+ content?: tailwind_merge.ClassNameValue;
44
+ header?: tailwind_merge.ClassNameValue;
45
+ label?: tailwind_merge.ClassNameValue;
46
+ section?: tailwind_merge.ClassNameValue;
47
+ list?: tailwind_merge.ClassNameValue;
48
+ description?: tailwind_merge.ClassNameValue;
49
+ item?: tailwind_merge.ClassNameValue;
50
+ };
51
+ };
52
+ } | {}, {
53
+ list: string;
54
+ section: string;
55
+ header: string;
56
+ item: string[];
57
+ content: string;
58
+ icon: string[];
59
+ label: string[];
60
+ description: string[];
61
+ }, tailwind_variants.TVReturnType<unknown, {
62
+ list: string;
63
+ section: string;
64
+ header: string;
65
+ item: string[];
66
+ content: string;
67
+ icon: string[];
68
+ label: string[];
69
+ description: string[];
70
+ }, undefined, unknown, unknown, undefined>>;
71
+
72
+ export { OptionsStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'tailwind-variants';const i=tv({slots:{list:"group/options max-h-[200px] overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light",section:"mt-s",header:"m-xs my-s text-default-dark text-header-xs",item:["group/options-item fg-default-light flex items-center gap-s p-s text-body-s","group-size-small/options:pt-xs group-size-small/options:pb-xs","group-size-large/options:pt-s group-size-large/options:pb-s","enabled:cursor-pointer","enabled:hover:fg-inverse-light","enabled:focus:fg-inverse-light","enabled:focus:color-info:bg-highlight-bold","enabled:hover:color-info:bg-highlight-bold","enabled:hover:color-serious:bg-serious-bold","enabled:focus:color-serious:bg-serious-bold","disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-transparent"],content:"flex min-w-0 flex-auto flex-col gap-xxs",icon:["group-enabled/options-item:group-color-info/options-item:fg-default-light","group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-focus/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-color-serious/options-item:fg-serious","group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-inverse-light","group-enabled/options-item:group-focus/options-item:group-color-serious/options-item:fg-inverse-light"],label:["truncate","group-enabled/options-item:group-color-info/options-item:fg-default-light","group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-focus/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-color-serious/options-item:fg-serious","group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-inverse-light","group-enabled/options-item:group-focus/options-item:group-color-serious/options-item:fg-inverse-light"],description:["group-enabled/options-item:fg-default-dark truncate text-body-xs","group-enabled/options-item:group-hover/options-item:fg-inverse-light","group-enabled/options-item:group-focus/options-item:fg-inverse-light","group-disabled/options-item:fg-disabled"]}});export{i as OptionsStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/options/styles.ts"],"names":["OptionsStyles","tv"],"mappings":"mCAcO,MAAMA,CAAAA,CAAgBC,EAAAA,CAAG,CAC9B,KAAA,CAAO,CACL,IAAA,CAAM,qJAAA,CACN,OAAA,CAAS,MAAA,CACT,MAAA,CAAQ,4CAAA,CACR,IAAA,CAAM,CACJ,6EAAA,CACA,+DAAA,CACA,6DAAA,CACA,wBAAA,CACA,gCAAA,CACA,gCAAA,CACA,4CAAA,CACA,4CAAA,CACA,6CAAA,CACA,6CAAA,CACA,0EACF,CAAA,CACA,QAAS,yCAAA,CACT,IAAA,CAAM,CACJ,2EAAA,CACA,oGAAA,CACA,oGAAA,CACA,wEAAA,CACA,uGAAA,CACA,uGACF,CAAA,CACA,KAAA,CAAO,CACL,UAAA,CACA,2EAAA,CACA,oGAAA,CACA,oGAAA,CACA,wEAAA,CACA,uGAAA,CACA,uGACF,CAAA,CACA,WAAA,CAAa,CACX,kEAAA,CACA,sEAAA,CACA,sEAAA,CACA,yCACF,CACF,CACF,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const OptionsStyles = tv({\n slots: {\n list: 'group/options max-h-[200px] overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light',\n section: 'mt-s',\n header: 'm-xs my-s text-default-dark text-header-xs',\n item: [\n 'group/options-item fg-default-light flex items-center gap-s p-s text-body-s',\n 'group-size-small/options:pt-xs group-size-small/options:pb-xs',\n 'group-size-large/options:pt-s group-size-large/options:pb-s',\n 'enabled:cursor-pointer',\n 'enabled:hover:fg-inverse-light',\n 'enabled:focus:fg-inverse-light',\n 'enabled:focus:color-info:bg-highlight-bold',\n 'enabled:hover:color-info:bg-highlight-bold',\n 'enabled:hover:color-serious:bg-serious-bold',\n 'enabled:focus:color-serious:bg-serious-bold',\n 'disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-transparent',\n ],\n content: 'flex min-w-0 flex-auto flex-col gap-xxs',\n icon: [\n 'group-enabled/options-item:group-color-info/options-item:fg-default-light',\n 'group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-inverse-light',\n 'group-enabled/options-item:group-focus/options-item:group-color-info/options-item:fg-inverse-light',\n 'group-enabled/options-item:group-color-serious/options-item:fg-serious',\n 'group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-inverse-light',\n 'group-enabled/options-item:group-focus/options-item:group-color-serious/options-item:fg-inverse-light',\n ],\n label: [\n 'truncate',\n 'group-enabled/options-item:group-color-info/options-item:fg-default-light',\n 'group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-inverse-light',\n 'group-enabled/options-item:group-focus/options-item:group-color-info/options-item:fg-inverse-light',\n 'group-enabled/options-item:group-color-serious/options-item:fg-serious',\n 'group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-inverse-light',\n 'group-enabled/options-item:group-focus/options-item:group-color-serious/options-item:fg-inverse-light',\n ],\n description: [\n 'group-enabled/options-item:fg-default-dark truncate text-body-xs',\n 'group-enabled/options-item:group-hover/options-item:fg-inverse-light',\n 'group-enabled/options-item:group-focus/options-item:fg-inverse-light',\n 'group-disabled/options-item:fg-disabled',\n ],\n },\n});\n"]}
@@ -0,0 +1,29 @@
1
+ import { RefAttributes } from 'react';
2
+ import { Key, ListBoxProps, ListBoxItemProps, TextProps, ListBoxSectionProps } from 'react-aria-components';
3
+ import { IconProps } from '../icon/types.js';
4
+
5
+ type OptionsDataItem = {
6
+ id: Key;
7
+ name: string;
8
+ children?: OptionsDataItem[];
9
+ };
10
+ type OptionsItemProps<T extends OptionsDataItem> = Omit<ListBoxItemProps<T>, 'className'> & RefAttributes<HTMLDivElement> & {
11
+ classNames?: {
12
+ item?: ListBoxItemProps['className'];
13
+ icon?: IconProps['className'];
14
+ };
15
+ color?: 'info' | 'serious';
16
+ };
17
+ type OptionsProps<T extends OptionsDataItem> = Omit<ListBoxProps<T>, 'orientation' | 'layout'> & RefAttributes<HTMLDivElement> & {
18
+ size?: 'small' | 'large';
19
+ };
20
+ type OptionsSectionProps<T extends OptionsDataItem> = Omit<ListBoxSectionProps<T>, 'className'> & {
21
+ classNames?: {
22
+ section?: ListBoxSectionProps<T>['className'];
23
+ header?: string;
24
+ };
25
+ header?: string;
26
+ };
27
+ type OptionsItemTextProps = TextProps;
28
+
29
+ export type { OptionsDataItem, OptionsItemProps, OptionsItemTextProps, OptionsProps, OptionsSectionProps };
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
@@ -1,2 +1,2 @@
1
- import'client-only';import {DialogTrigger,Pressable,Popover,Dialog,Heading}from'react-aria-components';import {PopoverStyles}from'./styles.js';import {jsx}from'react/jsx-runtime';var {content:c,body:y,title:N,footer:T}=PopoverStyles(),t=({placement:r="bottom",children:o,...p})=>jsx(DialogTrigger,{...p,children:o});t.displayName="Popover";var A=({children:r,...o})=>jsx(Pressable,{...o,children:r});t.displayName="Popover.Trigger";var i=({children:r,className:o,...p})=>jsx(Popover,{className:c({className:o}),...p,children:jsx(Dialog,{children:r})});i.displayName="Popover.Content";var a=({children:r,className:o,...p})=>jsx(Heading,{slot:"title",className:N({className:o}),...p,children:r});a.displayName="Popover.Title";var s=({children:r,className:o})=>jsx("div",{className:y({className:o}),children:r});s.displayName="Popover.Body";var P=({children:r,className:o})=>jsx("div",{className:T({className:o}),children:r});P.displayName="Popover.Footer";t.Title=a;t.Content=i;t.Body=s;t.Footer=P;t.Trigger=A;export{t as Popover,A as PopoverTrigger};//# sourceMappingURL=index.js.map
1
+ import {jsx}from'react/jsx-runtime';import'client-only';import {DialogTrigger,Pressable,Popover,Dialog,Heading}from'react-aria-components';import {PopoverStyles}from'./styles.js';const {content:c,body:y,title:N,footer:T}=PopoverStyles(),e=({placement:r="bottom",children:o,...p})=>jsx(DialogTrigger,{...p,children:o});e.displayName="Popover";const A=({children:r,...o})=>jsx(Pressable,{...o,children:r});e.displayName="Popover.Trigger";const i=({children:r,className:o,...p})=>jsx(Popover,{className:c({className:o}),...p,children:jsx(Dialog,{children:r})});i.displayName="Popover.Content";const a=({children:r,className:o,...p})=>jsx(Heading,{slot:"title",className:N({className:o}),...p,children:r});a.displayName="Popover.Title";const s=({children:r,className:o})=>jsx("div",{className:y({className:o}),children:r});s.displayName="Popover.Body";const P=({children:r,className:o})=>jsx("div",{className:T({className:o}),children:r});P.displayName="Popover.Footer",e.Title=a,e.Content=i,e.Body=s,e.Footer=P,e.Trigger=A;export{e as Popover,A as PopoverTrigger};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/popover/index.tsx"],"names":["content","body","title","footer","PopoverStyles","Popover","placement","children","jsx","AriaDialogTrigger","rest","PopoverTrigger","Pressable","props","PopoverContent","className","AriaPopover","AriaDialog","PopoverTitle","AriaHeading","PopoverBody","PopoverFooter"],"mappings":"mLAiCM,IAAE,CAAA,OAAAA,EAAS,CAAA,IAAAC,CAAAA,CAAM,MAAAC,CAAAA,CAAO,CAAA,MAAAC,CAAO,CAAA,CAAIC,CAAAA,aAAc,EAE1CC,CAAAA,CAAU,CAAC,CACtB,UAAAC,CAAAA,CAAY,CAAA,QACZ,SAAAC,CAAAA,CACA,CAAA,GACF,CAAA,CAAA,GACSC,GAACC,CAAAA,aAAA,CAAmB,CAAA,GAAGC,CAAO,SAAAH,CAAAA,CAAS,CAAA,GAExC,CAAA,WAAc,CAAA,SAEf,CAAMI,IAAAA,CAAiB,CAAC,CAAE,CAAA,QAAAJ,CAAAA,CAAU,IAAS,CAAA,CAAA,MAC1CK,CAAAA,SAAA,CAAW,IAAGC,CAAQ,CAAA,QAAAN,CAAAA,C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AClBT,CAAAA,CAAQ,CAAA,IAAOe,EACff,CAAAA,CAAQ,CAAA,MAASgB,CAAAA,CACjBhB,CAAAA,CAAQ,CAAA,OAAUM,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport type { ReactNode } from 'react';\nimport {\n Dialog as AriaDialog,\n DialogTrigger as AriaDialogTrigger,\n Heading as AriaHeading,\n Popover as AriaPopover,\n Pressable,\n} from 'react-aria-components';\n\nimport type {\n PopoverBodyProps,\n PopoverContentProps,\n PopoverProps,\n PopoverTitleProps,\n PopoverTriggerProps,\n} from './types';\n\nimport { PopoverStyles } from './styles';\n\nconst { content, body, title, footer } = PopoverStyles();\n\nexport const Popover = ({\n placement = 'bottom',\n children,\n ...rest\n}: PopoverProps) => {\n return <AriaDialogTrigger {...rest}>{children}</AriaDialogTrigger>;\n};\nPopover.displayName = 'Popover';\n\nexport const PopoverTrigger = ({ children, ...props }: PopoverTriggerProps) => {\n return <Pressable {...props}>{children}</Pressable>;\n};\nPopover.displayName = 'Popover.Trigger';\n\nconst PopoverContent = ({\n children,\n className,\n ...rest\n}: PopoverContentProps) => {\n return (\n <AriaPopover className={content({ className })} {...rest}>\n {/* @ts-expect-error package version mismatch TODO */}\n <AriaDialog>{children}</AriaDialog>\n </AriaPopover>\n );\n};\nPopoverContent.displayName = 'Popover.Content';\n\nconst PopoverTitle = ({ children, className, ...rest }: PopoverTitleProps) => {\n return (\n <AriaHeading slot='title' className={title({ className })} {...rest}>\n {children}\n </AriaHeading>\n );\n};\n\nPopoverTitle.displayName = 'Popover.Title';\n\nconst PopoverBody = ({ children, className }: PopoverBodyProps) => {\n return <div className={body({ className })}>{children}</div>;\n};\nPopoverBody.displayName = 'Popover.Body';\n\nconst PopoverFooter = ({\n children,\n className,\n}: { children: ReactNode; className?: string }) => {\n return <div className={footer({ className })}>{children}</div>;\n};\nPopoverFooter.displayName = 'Popover.Footer';\n\nPopover.Title = PopoverTitle;\nPopover.Content = PopoverContent;\nPopover.Body = PopoverBody;\nPopover.Footer = PopoverFooter;\nPopover.Trigger = PopoverTrigger;\n"]}
1
+ {"version":3,"sources":["../../../src/components/popover/index.tsx"],"names":["PopoverStyles","Popover","rest","jsx","t","n","props","g","l","PopoverContent","v","PopoverTitle","PopoverBody","PopoverFooter","PopoverTrigger"],"mappings":"mLAiCQ,MAAA,CAAA,OAAS,CAAA,CAAA,CAAA,YAAa,CAAA,CAAA,CAAA,MAAWA,CAAAA,CAAc,CAAA,CAE1CC,aAAAA,EAAW,CACtB,aAAY,CAAA,CAAA,CAAA,iBAEZ,CAAA,CAAGC,CACL,GAAA,CACSC,CAAAA,GAACC,GAAmB,CAAAC,aAAA,CAAGH,CAAAA,aAAgB,CAEhDD,EAAQ,EAAA,CAAA,CAAA,WAAc,CAAA,UAES,MAAE,CAAA,CAAA,CAAA,CAAA,UAAaK,CAAM,GAAA,CAC3CH,IAACC,GAAW,WAAGE,CAAAA,GAAQ,CAAA,CAAA,QAAS,CAEzCL,CAAAA,CAAQ,EAAA,CAAA,CAAA,6BAER,CAAA,MACE,CAAA,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAGC,CACL,GAAA,CAEIC,CAAAA,GAACC,GAAY,CAAAG,OAAA,CAAA,CAAA,SAAqB,CAAA,CAAA,CAAA,CAAA,SAAW,CAAI,CAAA,CAAA,CAAGL,CAAAA,GAElD,CAAA,CAAA,SAACE,GAAY,CAAAI,MAAA,CAAA,CAAA,QAAS,CACxB,CAAA,CAGJC,EAAe,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,wBAEL,CAAA,CAAA,CAAA,CAAA,oBAAqB,CAAA,CAAGP,CAAK,GAAA,CAEjDC,CAAAA,GAACC,GAAY,CAAAM,OAAA,CAAA,CAAA,IAAK,CAAA,iBAA2B,cAAe,CAAA,CAAA,CAAGR,CAAAA,GAC5D,CAAA,CAAA,QACH,CAIJS,CAAAA,CAAa,eAAc,CAAA,eAE3B,CAAA,MAAuB,YAAU,CAAA,CAAA,CAAA,SAAU,CAAA,CAClCR,CAAAA,GAACC,GAAA,CAAA,gBAAsB,cAAe,CAAA,CAAA,CAAA,CAAA,QAAS,CAExDQ,CAAAA,CAAY,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,qBAGxB,CAAA,CAAA,CAAA,CAAA,oBAEF,CAAA,CACST,CAAAA,GAACC,GAAA,CAAA,KAAI,CAAA,CAAA,SAAoB,CAAA,CAAA,CAAA,CAAA,SAAW,CAAI,CAAA,CAAA,CAAA,CAAA,QAAS,CAE1DS,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,gBAEpB,CAAA,CAAA,CAAA,KACRZ,CAAQ,CAAA,CAAA,CAAA,CAAA,OACRA,CAAQ,CAAA,CAAA,CAAA,CAAA,IACRA,CAAQ,CAAA,CAAA,CAAA,CAAA,MACRA,CAAQ,CAAA,CAAA,CAAA,CAAA,OAAUa,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport 'client-only';\nimport type { ReactNode } from 'react';\nimport {\n Dialog as AriaDialog,\n DialogTrigger as AriaDialogTrigger,\n Heading as AriaHeading,\n Popover as AriaPopover,\n Pressable,\n} from 'react-aria-components';\n\nimport type {\n PopoverBodyProps,\n PopoverContentProps,\n PopoverProps,\n PopoverTitleProps,\n PopoverTriggerProps,\n} from './types';\n\nimport { PopoverStyles } from './styles';\n\nconst { content, body, title, footer } = PopoverStyles();\n\nexport const Popover = ({\n placement = 'bottom',\n children,\n ...rest\n}: PopoverProps) => {\n return <AriaDialogTrigger {...rest}>{children}</AriaDialogTrigger>;\n};\nPopover.displayName = 'Popover';\n\nexport const PopoverTrigger = ({ children, ...props }: PopoverTriggerProps) => {\n return <Pressable {...props}>{children}</Pressable>;\n};\nPopover.displayName = 'Popover.Trigger';\n\nconst PopoverContent = ({\n children,\n className,\n ...rest\n}: PopoverContentProps) => {\n return (\n <AriaPopover className={content({ className })} {...rest}>\n {/* @ts-expect-error package version mismatch TODO */}\n <AriaDialog>{children}</AriaDialog>\n </AriaPopover>\n );\n};\nPopoverContent.displayName = 'Popover.Content';\n\nconst PopoverTitle = ({ children, className, ...rest }: PopoverTitleProps) => {\n return (\n <AriaHeading slot='title' className={title({ className })} {...rest}>\n {children}\n </AriaHeading>\n );\n};\n\nPopoverTitle.displayName = 'Popover.Title';\n\nconst PopoverBody = ({ children, className }: PopoverBodyProps) => {\n return <div className={body({ className })}>{children}</div>;\n};\nPopoverBody.displayName = 'Popover.Body';\n\nconst PopoverFooter = ({\n children,\n className,\n}: { children: ReactNode; className?: string }) => {\n return <div className={footer({ className })}>{children}</div>;\n};\nPopoverFooter.displayName = 'Popover.Footer';\n\nPopover.Title = PopoverTitle;\nPopover.Content = PopoverContent;\nPopover.Body = PopoverBody;\nPopover.Footer = PopoverFooter;\nPopover.Trigger = PopoverTrigger;\n"]}
@@ -1,21 +1,22 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
2
3
 
3
4
  declare const PopoverStyles: tailwind_variants.TVReturnType<{
4
5
  [key: string]: {
5
- [key: string]: tailwind_variants.ClassValue | {
6
- content?: tailwind_variants.ClassValue;
7
- title?: tailwind_variants.ClassValue;
8
- body?: tailwind_variants.ClassValue;
9
- footer?: tailwind_variants.ClassValue;
6
+ [key: string]: tailwind_merge.ClassNameValue | {
7
+ content?: tailwind_merge.ClassNameValue;
8
+ body?: tailwind_merge.ClassNameValue;
9
+ footer?: tailwind_merge.ClassNameValue;
10
+ title?: tailwind_merge.ClassNameValue;
10
11
  };
11
12
  };
12
13
  } | {
13
14
  [x: string]: {
14
- [x: string]: tailwind_variants.ClassValue | {
15
- content?: tailwind_variants.ClassValue;
16
- title?: tailwind_variants.ClassValue;
17
- body?: tailwind_variants.ClassValue;
18
- footer?: tailwind_variants.ClassValue;
15
+ [x: string]: tailwind_merge.ClassNameValue | {
16
+ content?: tailwind_merge.ClassNameValue;
17
+ body?: tailwind_merge.ClassNameValue;
18
+ footer?: tailwind_merge.ClassNameValue;
19
+ title?: tailwind_merge.ClassNameValue;
19
20
  };
20
21
  };
21
22
  } | {}, {
@@ -25,11 +26,11 @@ declare const PopoverStyles: tailwind_variants.TVReturnType<{
25
26
  footer: string;
26
27
  }, undefined, {
27
28
  [key: string]: {
28
- [key: string]: tailwind_variants.ClassValue | {
29
- content?: tailwind_variants.ClassValue;
30
- title?: tailwind_variants.ClassValue;
31
- body?: tailwind_variants.ClassValue;
32
- footer?: tailwind_variants.ClassValue;
29
+ [key: string]: tailwind_merge.ClassNameValue | {
30
+ content?: tailwind_merge.ClassNameValue;
31
+ body?: tailwind_merge.ClassNameValue;
32
+ footer?: tailwind_merge.ClassNameValue;
33
+ title?: tailwind_merge.ClassNameValue;
33
34
  };
34
35
  };
35
36
  } | {}, {
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';var o=tv({slots:{content:"max-w-[280px] rounded-medium border border-static-light bg-surface-raised p-s",body:"fg-default-dark text-body-s",title:"fg-default-light mb-s text-header-m",footer:"mt-s flex justify-end gap-s"}});export{o as PopoverStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const o=tv({slots:{content:"max-w-[280px] rounded-medium border border-static-light bg-surface-raised p-s",body:"fg-default-dark text-body-s",title:"fg-default-light mb-s text-header-m",footer:"mt-s flex justify-end gap-s"}});export{o as PopoverStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/popover/styles.ts"],"names":["t"],"mappings":"sCAcE,IAAA,CAAA,CAAAA,EAAA,CAAO,CACL,KAAA,CAAA,CAAA,OACE,CAAA,+EACI,CAAA,IAAA,CAAA,6BACC,4CACP,CAAQ,MAAA,CAAA,6BAEX,CAAA,CAAA","file":"styles.js","sourcesContent":["/* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const PopoverStyles = tv({\n slots: {\n content:\n 'max-w-[280px] rounded-medium border border-static-light bg-surface-raised p-s',\n body: 'fg-default-dark text-body-s',\n title: 'fg-default-light mb-s text-header-m',\n footer: 'mt-s flex justify-end gap-s',\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/popover/styles.ts"],"names":["t"],"mappings":"sCAcE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KACE,CAAA,CAAA,OAAA,CAAA,+EACI,CAAA,IAAA,CAAA,yEAEE,CAAA,MAAA,CAAA,6BAEX,CAAA,CAAA","file":"styles.js","sourcesContent":["/* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const PopoverStyles = tv({\n slots: {\n content:\n 'max-w-[280px] rounded-medium border border-static-light bg-surface-raised p-s',\n body: 'fg-default-dark text-body-s',\n title: 'fg-default-light mb-s text-header-m',\n footer: 'mt-s flex justify-end gap-s',\n },\n});\n"]}
@@ -1,2 +1,2 @@
1
- import {useCallback,useMemo}from'react';import {Button}from'../button/index.js';import {pressToMouseEvent}from'./utils.js';import {jsx}from'react/jsx-runtime';function E({disabled:e,disabledTranslation:t,title:o,handleOnClick:r}){let s=useCallback(p=>r(pressToMouseEvent(p)),[r]),m=useMemo(()=>t?.title&&e?t.title:o,[t?.title,e,o]);return jsx(Button,{isDisabled:e&&!t,onPress:s,size:"small",variant:"outline",children:m})}export{E as ActionElement};//# sourceMappingURL=action-element.js.map
1
+ import {jsx}from'react/jsx-runtime';import'client-only';import {useCallback,useMemo}from'react';import {Button}from'../button/index.js';import {pressToMouseEvent}from'./utils.js';function E({disabled:e,disabledTranslation:t,title:o,handleOnClick:r}){const s=useCallback(p=>r(pressToMouseEvent(p)),[r]),m=useMemo(()=>t?.title&&e?t.title:o,[t?.title,e,o]);return jsx(Button,{isDisabled:e&&!t,onPress:s,size:"small",variant:"outline",children:m})}export{E as ActionElement};//# sourceMappingURL=action-element.js.map
2
2
  //# sourceMappingURL=action-element.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/query-builder/action-element.tsx"],"names":["disabled","disabledTranslation","useCallback","event","handleOnClick","pressToMouseEvent","title","useMemo","n","titleProp","Button","u","handlePress"],"mappings":"+JAmBO,SAAuB,CAC5B,UAAAA,CACA,CAAA,CAAA,mBAAAC,CACA,CAAA,CAAA,MACA,CAAA,CAAA,aACF,CAAA,CAAgB,CAEd,MAAoBC,CAAAA,CACjBC,WAAAA,CAAAA,CAAsBC,EAAcC,EAAkBF,iBAAK,CAAC,CAAA,CAC7D,CAACC,CAAa,CAChB,CAAA,CAEME,CAAAA,CAAQC,EACZC,OAAA,CAAA,IACEP,CAAqB,EAAA,KAASD,EAC1BC,EAAoB,CAAA,CAAA,KACpBQ,CACN,CAACR,CAAAA,CAAAA,CAAqB,OAAOD,CAAUS,CAAS,CAClD,CAAA,CAEA,SACGC,GAAAA,CAAAC,MACC,CAAA,CAAA,YAAwB,EAACV,CACzB,CAAA,CAAA,OAASW,CACT,MAAK,CAAA,OACL,CAAA,OAAQ,CAAA,SAEP,CAAA,SACH,CAEJ,CAAA,CAAA","file":"action-element.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { PressEvent } from '@react-types/shared';\nimport { useCallback, useMemo } from 'react';\nimport type { ActionProps } from 'react-querybuilder';\nimport { Button } from '../button';\nimport { pressToMouseEvent } from './utils';\n\nexport function ActionElement({\n disabled,\n disabledTranslation,\n title: titleProp,\n handleOnClick,\n}: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n const title = useMemo(\n () =>\n disabledTranslation?.title && disabled\n ? disabledTranslation.title\n : titleProp,\n [disabledTranslation?.title, disabled, titleProp],\n );\n\n return (\n <Button\n isDisabled={disabled && !disabledTranslation}\n onPress={handlePress}\n size='small'\n variant='outline'\n >\n {title}\n </Button>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/query-builder/action-element.tsx"],"names":["handleOnClick","useCallback","event","title","useMemo","disabledTranslation","n","disabled","titleProp","jsx","Button","f","handlePress"],"mappings":"mLAsBE,SACA,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,mBAEA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAAA,aAGoBC,CACjBC,CAAAA,CAAAA,CAAsBF,OAAsC,CAC7D,CAACA,WAAa,CAChB,CAAA,EAEMG,CAAQC,kBACZ,CAAA,CAAA,CAAA,CACEC,CAAAA,CAAAA,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAAC,OAAA,CAASC,IACN,CAAA,EAAA,KAE1B,EAACF,CAAAA,CAAqB,OAAOE,CAAUC,CAAS,CAClD,CAAA,CAEA,OACEC,CAAAA,CAACC,CAAAA,CAAA,CACC,CAAA,CAAA,OAAAC,GAAA,CAAYJ,QAAY,UACxB,CAASK,CAAAA,YACJ,CAAA,CACL,CAAA,IAAA,CAAA,OAAQ,CAAA,OAEP,CAAA,SAGP,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA","file":"action-element.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport type { PressEvent } from '@react-types/shared';\nimport { useCallback, useMemo } from 'react';\nimport type { ActionProps } from 'react-querybuilder';\nimport { Button } from '../button';\nimport { pressToMouseEvent } from './utils';\n\nexport function ActionElement({\n disabled,\n disabledTranslation,\n title: titleProp,\n handleOnClick,\n}: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n const title = useMemo(\n () =>\n disabledTranslation?.title && disabled\n ? disabledTranslation.title\n : titleProp,\n [disabledTranslation?.title, disabled, titleProp],\n );\n\n return (\n <Button\n isDisabled={disabled && !disabledTranslation}\n onPress={handlePress}\n size='small'\n variant='outline'\n >\n {title}\n </Button>\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- var e=["between","notBetween","during","overlapped","overlaps"];export{e as multiValueOperators};//# sourceMappingURL=constants.js.map
1
+ const e=["between","notBetween","during","overlapped","overlaps"];export{e as multiValueOperators};//# sourceMappingURL=constants.js.map
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/query-builder/constants.ts"],"names":["multiValueOperators"],"mappings":"AAaO,IAAMA,EAAsB,CACjC,SAAA,CACA,YAAA,CACA,QAAA,CACA,aACA,UACF","file":"constants.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport const multiValueOperators = [\n 'between',\n 'notBetween',\n 'during',\n 'overlapped',\n 'overlaps',\n];\n"]}
1
+ {"version":3,"sources":["../../../src/components/query-builder/constants.ts"],"names":["multiValueOperators"],"mappings":"AAaO,MAAMA,EAAsB,CACjC,SAAA,CACA,YAAA,CACA,QAAA,CACA,aACA,UACF","file":"constants.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport const multiValueOperators = [\n 'between',\n 'notBetween',\n 'during',\n 'overlapped',\n 'overlaps',\n];\n"]}
@@ -1,2 +1,2 @@
1
- import {cn}from'./../../lib/utils.js';import {useMemo}from'react';import {useRuleGroup,useStopEventPropagation,TestID}from'react-querybuilder';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function A(t){let a=useRuleGroup(t),{schema:{controls:{ruleGroupBodyElements:s}}}=a,{schema:{classNames:n}}=t,c=useStopEventPropagation(a.addRule),i=useStopEventPropagation(a.addGroup),d=useStopEventPropagation(a.cloneGroup),m=useStopEventPropagation(a.toggleLockGroup),p=useStopEventPropagation(a.removeGroup),v=useMemo(()=>({...a,addGroup:i,addRule:c,cloneGroup:d,removeGroup:p,toggleLockGroup:m}),[i,c,d,a,p,m]);return jsxs("div",{className:cn(n.ruleGroup),children:[jsx("div",{className:cn(n.header),children:jsx(r,{...v})}),jsx("div",{className:cn(n.body),children:jsx(s,{...v})}),jsx("div",{className:cn(n.header),children:jsx(N,{...v})})]})}function r(t){let a=t.schema.showLockButtons,s=t.path.length>0,n=t.schema.showCloneButtons&&s,{schema:{controls:{combinatorSelector:c,cloneGroupAction:i,lockGroupAction:d,removeGroupAction:m}}}=t;return jsxs(Fragment,{children:[jsx(c,{testID:TestID.combinators,options:t.schema.combinators,value:t.combinator,title:t.translations.combinators.title,className:t.classNames.combinators,handleOnChange:t.onCombinatorChange,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,schema:t.schema},TestID.combinators),n&&jsx("div",{children:jsx(i,{testID:TestID.cloneGroup,label:t.translations.cloneRuleGroup.label,title:t.translations.cloneRuleGroup.title,className:t.classNames.cloneGroup,handleOnClick:t.cloneGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.cloneGroup)}),a&&jsx("div",{children:jsx(d,{testID:TestID.lockGroup,label:t.translations.lockGroup.label,title:t.translations.lockGroup.title,className:t.classNames.lockGroup,handleOnClick:t.toggleLockGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,disabledTranslation:t.parentDisabled?void 0:t.translations.lockGroupDisabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.lockGroup)}),s&&jsx("div",{children:jsx(m,{testID:TestID.removeGroup,label:t.translations.removeGroup.label,title:t.translations.removeGroup.title,className:t.classNames.removeGroup,handleOnClick:t.removeGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.removeGroup)})]})}function N(t){let{schema:{controls:{addGroupAction:a,addRuleAction:s}}}=t;return jsxs(Fragment,{children:[jsx(s,{testID:TestID.addRule,label:t.translations.addRule.label,title:t.translations.addRule.title,className:t.classNames.addRule,handleOnClick:t.addRule,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.addRule),jsx(a,{testID:TestID.addGroup,label:t.translations.addGroup.label,title:t.translations.addGroup.title,className:t.classNames.addGroup,handleOnClick:t.addGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.addGroup)]})}export{A as RuleGroup,N as RuleGroupFooterComponent,r as RuleGroupHeaderComponent};//# sourceMappingURL=group.js.map
1
+ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import'client-only';import {cn}from'./../../lib/utils.js';import {useMemo}from'react';import {useRuleGroup,useStopEventPropagation,TestID}from'react-querybuilder';function O(t){const a=useRuleGroup(t),{schema:{controls:{ruleGroupBodyElements:s}}}=a,{schema:{classNames:n}}=t,c=useStopEventPropagation(a.addRule),i=useStopEventPropagation(a.addGroup),d=useStopEventPropagation(a.cloneGroup),m=useStopEventPropagation(a.toggleLockGroup),p=useStopEventPropagation(a.removeGroup),v=useMemo(()=>({...a,addGroup:i,addRule:c,cloneGroup:d,removeGroup:p,toggleLockGroup:m}),[i,c,d,a,p,m]);return jsxs("div",{className:cn(n.ruleGroup),children:[jsx("div",{className:cn(n.header),children:jsx(C,{...v})}),jsx("div",{className:cn(n.body),children:jsx(s,{...v})}),jsx("div",{className:cn(n.header),children:jsx(N,{...v})})]})}function C(t){const a=t.schema.showLockButtons,s=t.path.length>0,n=t.schema.showCloneButtons&&s,{schema:{controls:{combinatorSelector:c,cloneGroupAction:i,lockGroupAction:d,removeGroupAction:m}}}=t;return jsxs(Fragment,{children:[jsx(c,{testID:TestID.combinators,options:t.schema.combinators,value:t.combinator,title:t.translations.combinators.title,className:t.classNames.combinators,handleOnChange:t.onCombinatorChange,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,schema:t.schema},TestID.combinators),n&&jsx("div",{children:jsx(i,{testID:TestID.cloneGroup,label:t.translations.cloneRuleGroup.label,title:t.translations.cloneRuleGroup.title,className:t.classNames.cloneGroup,handleOnClick:t.cloneGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.cloneGroup)}),a&&jsx("div",{children:jsx(d,{testID:TestID.lockGroup,label:t.translations.lockGroup.label,title:t.translations.lockGroup.title,className:t.classNames.lockGroup,handleOnClick:t.toggleLockGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,disabledTranslation:t.parentDisabled?void 0:t.translations.lockGroupDisabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.lockGroup)}),s&&jsx("div",{children:jsx(m,{testID:TestID.removeGroup,label:t.translations.removeGroup.label,title:t.translations.removeGroup.title,className:t.classNames.removeGroup,handleOnClick:t.removeGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.removeGroup)})]})}function N(t){const{schema:{controls:{addGroupAction:a,addRuleAction:s}}}=t;return jsxs(Fragment,{children:[jsx(s,{testID:TestID.addRule,label:t.translations.addRule.label,title:t.translations.addRule.title,className:t.classNames.addRule,handleOnClick:t.addRule,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.addRule),jsx(a,{testID:TestID.addGroup,label:t.translations.addGroup.label,title:t.translations.addGroup.title,className:t.classNames.addGroup,handleOnClick:t.addGroup,rules:t.ruleGroup.rules,level:t.path.length,path:t.path,disabled:t.disabled,context:t.context,validation:t.validationResult,ruleOrGroup:t.ruleGroup,schema:t.schema},TestID.addGroup)]})}export{O as RuleGroup,N as RuleGroupFooterComponent,C as RuleGroupHeaderComponent};//# sourceMappingURL=group.js.map
2
2
  //# sourceMappingURL=group.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/query-builder/group.tsx"],"names":["group","useRuleGroup","C","addRule","useStopEventPropagation","l","k","addGroup","cloneGroup","removeGroup","toggleLockGroup","jsxs","b","h","e","elementProps","jsx","shouldShowLock","ruleGroup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AA,KAAA,CAAA,SAAqB,CAAA,CAAA,CAAA,UAAW,CAAA,OAChC,CAAA,aAAyB,CAAA,CAAA,CAAA,OAClBA,CAAAA,KAAU,CAAA,CAAA,CAAA,SACjB,CAAA,KAAOA,CAAAA,KAAU,CAAK,CAAA,CAAA,IAAA,CACtB,OAAgB,IAAA,CAChB,CAAA,CAAA,IAAA,CAAA,QAAoB,CAAA,CAAA,CAAA,QACpB,CAAA,OAAmB,CAAA,CAAA,CAAA,OACnB,CAAA,UAAsB,CAAA,CAAA,CAAA,gBACtB,CAAA,WAAuB,CAAA,CAAA,CAAA,SACvB,CAAQA,MAAU,CAAA,CAAA,CAAA,MAbN,CAAA,CAAAG,MAAA,CAcd,OAGE,CAAA,CAAAP,GAAA,CAAA,CAAA,CAAA,CAAQM,MAAO,CAAAC,MAAA,CAAA,QACRH,CAAAA,KAAU,CAAA,CAAA,CAAA,YAAa,CAAA,QAC9B,CAAA,KAAOA,CAAAA,KAAU,CAAA,CAAA,CAAA,YAAa,CAAA,QAC9B,CAAA,KAAA,CAAA,SAAqB,CAAA,CAAA,CAAA,UAAW,CAAA,QAChC,CAAA,aAAyB,CAAA,CAAA,CAAA,QAClBA,MAAU,CAAA,CAAA,CAAA,SACjB,CAAA,KAAOA,CAAAA,KAAU,CAAK,CAAA,CAAA,IAAA,CACtB,MAAMA,CAAU,KAChB,CAAA,CAAA,IAAA,CAAA,QAAoB,CAAA,CAAA,CAAA,QACpB,CAAA,OAAmB,CAAA,CAAA,CAAA,OACnB,CAAA,6BACA,CAAA,WAAuB,CAAA,CAAA,CAAA,SACvB,CAAQA,MAAU,CAAA,CAAA,CAAA,MAbN,CAAA,CAAAG,MAAA,CAAA,QAiBpB,CAAA,CAAA,CAAA,CAAA","file":"group.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { cn } from '@/lib/utils';\nimport { useMemo } from 'react';\nimport {\n type RuleGroupProps,\n TestID,\n useRuleGroup,\n useStopEventPropagation,\n} from 'react-querybuilder';\n\nexport function RuleGroup(props: RuleGroupProps) {\n const group = useRuleGroup(props);\n\n const {\n schema: {\n controls: { ruleGroupBodyElements: RuleGroupBodyElements },\n },\n } = group;\n\n const {\n schema: { classNames },\n } = props;\n\n const addRule = useStopEventPropagation(group.addRule);\n const addGroup = useStopEventPropagation(group.addGroup);\n const cloneGroup = useStopEventPropagation(group.cloneGroup);\n const toggleLockGroup = useStopEventPropagation(group.toggleLockGroup);\n const removeGroup = useStopEventPropagation(group.removeGroup);\n\n const elementProps = useMemo(\n () => ({\n ...group,\n addGroup,\n addRule,\n cloneGroup,\n removeGroup,\n toggleLockGroup,\n }),\n [addGroup, addRule, cloneGroup, group, removeGroup, toggleLockGroup],\n );\n\n return (\n <div className={cn(classNames.ruleGroup)}>\n <div className={cn(classNames.header)}>\n <RuleGroupHeaderComponent {...elementProps} />\n </div>\n <div className={cn(classNames.body)}>\n <RuleGroupBodyElements {...elementProps} />\n </div>\n <div className={cn(classNames.header)}>\n <RuleGroupFooterComponent {...elementProps} />\n </div>\n </div>\n );\n}\n\nexport function RuleGroupHeaderComponent(\n ruleGroup: RuleGroupProps & ReturnType<typeof useRuleGroup>,\n) {\n const shouldShowLock = ruleGroup.schema.showLockButtons;\n const isNotRoot = ruleGroup.path.length > 0;\n const shouldShowClone = ruleGroup.schema.showCloneButtons && isNotRoot;\n\n const {\n schema: {\n controls: {\n combinatorSelector: CombinatorSelectorControlElement,\n cloneGroupAction: CloneGroupActionControlElement,\n lockGroupAction: LockGroupActionControlElement,\n removeGroupAction: RemoveGroupActionControlElement,\n },\n },\n } = ruleGroup;\n\n return (\n <>\n <CombinatorSelectorControlElement\n key={TestID.combinators}\n testID={TestID.combinators}\n options={ruleGroup.schema.combinators}\n value={ruleGroup.combinator}\n title={ruleGroup.translations.combinators.title}\n className={ruleGroup.classNames.combinators}\n handleOnChange={ruleGroup.onCombinatorChange}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n schema={ruleGroup.schema}\n />\n {shouldShowClone && (\n <div>\n <CloneGroupActionControlElement\n key={TestID.cloneGroup}\n testID={TestID.cloneGroup}\n label={ruleGroup.translations.cloneRuleGroup.label}\n title={ruleGroup.translations.cloneRuleGroup.title}\n className={ruleGroup.classNames.cloneGroup}\n handleOnClick={ruleGroup.cloneGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </div>\n )}\n {shouldShowLock && (\n <div>\n <LockGroupActionControlElement\n key={TestID.lockGroup}\n testID={TestID.lockGroup}\n label={ruleGroup.translations.lockGroup.label}\n title={ruleGroup.translations.lockGroup.title}\n className={ruleGroup.classNames.lockGroup}\n handleOnClick={ruleGroup.toggleLockGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n disabledTranslation={\n ruleGroup.parentDisabled\n ? undefined\n : ruleGroup.translations.lockGroupDisabled\n }\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </div>\n )}\n {isNotRoot && (\n <div>\n <RemoveGroupActionControlElement\n key={TestID.removeGroup}\n testID={TestID.removeGroup}\n label={ruleGroup.translations.removeGroup.label}\n title={ruleGroup.translations.removeGroup.title}\n className={ruleGroup.classNames.removeGroup}\n handleOnClick={ruleGroup.removeGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </div>\n )}\n </>\n );\n}\n\nexport function RuleGroupFooterComponent(\n ruleGroup: RuleGroupProps & ReturnType<typeof useRuleGroup>,\n) {\n const {\n schema: {\n controls: {\n addGroupAction: AddGroupActionControlElement,\n addRuleAction: AddRuleActionControlElement,\n },\n },\n } = ruleGroup;\n\n return (\n <>\n <AddRuleActionControlElement\n key={TestID.addRule}\n testID={TestID.addRule}\n label={ruleGroup.translations.addRule.label}\n title={ruleGroup.translations.addRule.title}\n className={ruleGroup.classNames.addRule}\n handleOnClick={ruleGroup.addRule}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n <AddGroupActionControlElement\n key={TestID.addGroup}\n testID={TestID.addGroup}\n label={ruleGroup.translations.addGroup.label}\n title={ruleGroup.translations.addGroup.title}\n className={ruleGroup.classNames.addGroup}\n handleOnClick={ruleGroup.addGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/query-builder/group.tsx"],"names":["RuleGroup","group","useRuleGroup","props","r","useStopEventPropagation","addGroup","l","cloneGroup","addRule","removeGroup","toggleLockGroup","jsxs","b","cn","h","jsx","e","elementProps","RuleGroupHeaderComponent","shouldShowLock","ruleGroup","shouldShowClone","Fragment","R","TestID","o","RuleGroupFooterComponent"],"mappings":"qNAwBgBA,SACd,CAAMC,EAAQC,CAAAA,CAAaC,MAGzB,CAAA,CAAAC,YAAA,CAAA,CAAQ,CACN,CAAA,CAAA,MAAA,CAAU,CAAE,QAAA,CAAA,CAAA,qBAKd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,MAAA,CAAA,CAAA,UAGIC,CAAwBJ,CAAAA,CAAM,6BAAO,CAAA,CAC/CK,CAAAA,OAAyC,CAAA,CAAA,CAAA,CAAAC,uBAAA,CAAQ,CAAA,CACjDC,QAA2C,CAAA,CAAA,CAAA,CAAAD,uBAAA,CAAA,CAAA,CAAU,UACL,CAAA,CAAA,CAAA,CAAAA,uBAAA,CAAA,CAAA,CAAA,eACJ,CAAA,CAAA,CAAA,CAAAA,uBAAA,CAAA,CAAA,CAAA,WAGhD,CAAO,CACL,SAAGN,CAAAA,KACH,CAAA,GAAA,CAAAK,CAAAA,QACA,CAAAG,CAAAA,CACA,OAAA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,WACA,CAAA,CAAA,CAAA,eAEkBD,CAAAA,CAAYP,CAAAA,CAAOS,EAAaC,CAAe,CACrE,CAAA,CAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACEC,CAAAA,CAAC,CAAA,OAAIC,IAAA,CAAA,KAAA,CAAA,CAAWC,SAAc,CAAAC,EAAA,CAAA,CAAS,CAAA,SACrC,CAAA,CAAAC,QAAC,CAAI,CAAAC,GAAA,CAAA,KAAA,CAAA,CAAWH,SAAc,CAAMC,EAAA,CAClC,CAAA,CAAA,MAAA,CAAAC,CAAAA,QAA8BE,CAAcD,IAC9C,CAAA,CACAD,CAAAA,GAAC,CAAA,CAAA,CAAA,CAAA,CAAI,CAAAC,GAAA,CAAA,KAAA,CAAA,CAAWH,SAA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C,CAAA,KAAiB,CAAA,KAAA,CAAA,CAAA,CAAA,YAAqB,CAAA,OACtC,CAAA,KAAA,CAAWL,SAAU,CAAA,CAAA,CAAA,UACrB,CAAA,OAAA,CAAA,aAAyB,CACzB,SAAiB,CAAA,KAAA,CAAA,CAAA,CAAU,SAC3B,CAAA,KAAiB,CAAA,KAAK,CAAA,CAAA,CAAA,IACtB,CAAA,MAAgB,CAAA,IAChB,CAAA,CAAA,CAAA,IAAUA,CAAAA,QAAU,CAAA,CACpB,CAAA,QAASA,CAAU,OAAA,CACnB,CAAA,CAAA,OAAA,CAAA,UAAsB,CAAA,CAAA,CAAA,gBACtB,CAAA,WAAuB,CAAA,CAAA,CACvB,SAAkB,CAAA,MAAA,CAbbI,EAAO,MAAA,CAcd,CAAAC,MACAV,CAAAA,OAEE,CAAA,CAAAC,GAAA,CAAQQ,CAAAA,CAAO,CAAA,MAAA,CAAAC,MACf,SAAiB,CAAA,KAAA,CAAA,CAAA,CAAA,YAAsB,CAAA,QACvC,CAAA,KAAiB,CAAA,KAAA,CAAA,CAAA,CAAA,YAAsB,SACvC,CAAA,KAAA,CAAWL,SAAU,CAAA,CAAA,CAAA,UACrB,CAAA,QAAA,CAAA,aAAyB,CAAA,CACzB,CAAA,QAAiB,CAAA,KAAA,CAAA,CAAA,CAAU,SAC3B,CAAA,KAAiB,CAAA,KAAK,CAAA,CAAA,CAAA,IACtB,CAAA,WACA,CAAA,CAAA,CAAA,IAAUA,CAAAA,QAAU,CAAA,CACpB,CAAA,QAASA,CAAU,OAAA,CACnB,CAAA,CAAA,OAAA,CAAA,6BACA,CAAA,WAAuB,CAAA,CAAA,CACvB,SAAkB,CAAA,MAAA,CAbbI,CAAAA,CAAO,MAAA,CAAA,CAcdC,eAGN,CAAA,CAAA,CAAA,CAAA","file":"group.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { cn } from '@/lib/utils';\nimport { useMemo } from 'react';\nimport {\n type RuleGroupProps,\n TestID,\n useRuleGroup,\n useStopEventPropagation,\n} from 'react-querybuilder';\n\nexport function RuleGroup(props: RuleGroupProps) {\n const group = useRuleGroup(props);\n\n const {\n schema: {\n controls: { ruleGroupBodyElements: RuleGroupBodyElements },\n },\n } = group;\n\n const {\n schema: { classNames },\n } = props;\n\n const addRule = useStopEventPropagation(group.addRule);\n const addGroup = useStopEventPropagation(group.addGroup);\n const cloneGroup = useStopEventPropagation(group.cloneGroup);\n const toggleLockGroup = useStopEventPropagation(group.toggleLockGroup);\n const removeGroup = useStopEventPropagation(group.removeGroup);\n\n const elementProps = useMemo(\n () => ({\n ...group,\n addGroup,\n addRule,\n cloneGroup,\n removeGroup,\n toggleLockGroup,\n }),\n [addGroup, addRule, cloneGroup, group, removeGroup, toggleLockGroup],\n );\n\n return (\n <div className={cn(classNames.ruleGroup)}>\n <div className={cn(classNames.header)}>\n <RuleGroupHeaderComponent {...elementProps} />\n </div>\n <div className={cn(classNames.body)}>\n <RuleGroupBodyElements {...elementProps} />\n </div>\n <div className={cn(classNames.header)}>\n <RuleGroupFooterComponent {...elementProps} />\n </div>\n </div>\n );\n}\n\nexport function RuleGroupHeaderComponent(\n ruleGroup: RuleGroupProps & ReturnType<typeof useRuleGroup>,\n) {\n const shouldShowLock = ruleGroup.schema.showLockButtons;\n const isNotRoot = ruleGroup.path.length > 0;\n const shouldShowClone = ruleGroup.schema.showCloneButtons && isNotRoot;\n\n const {\n schema: {\n controls: {\n combinatorSelector: CombinatorSelectorControlElement,\n cloneGroupAction: CloneGroupActionControlElement,\n lockGroupAction: LockGroupActionControlElement,\n removeGroupAction: RemoveGroupActionControlElement,\n },\n },\n } = ruleGroup;\n\n return (\n <>\n <CombinatorSelectorControlElement\n key={TestID.combinators}\n testID={TestID.combinators}\n options={ruleGroup.schema.combinators}\n value={ruleGroup.combinator}\n title={ruleGroup.translations.combinators.title}\n className={ruleGroup.classNames.combinators}\n handleOnChange={ruleGroup.onCombinatorChange}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n schema={ruleGroup.schema}\n />\n {shouldShowClone && (\n <div>\n <CloneGroupActionControlElement\n key={TestID.cloneGroup}\n testID={TestID.cloneGroup}\n label={ruleGroup.translations.cloneRuleGroup.label}\n title={ruleGroup.translations.cloneRuleGroup.title}\n className={ruleGroup.classNames.cloneGroup}\n handleOnClick={ruleGroup.cloneGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </div>\n )}\n {shouldShowLock && (\n <div>\n <LockGroupActionControlElement\n key={TestID.lockGroup}\n testID={TestID.lockGroup}\n label={ruleGroup.translations.lockGroup.label}\n title={ruleGroup.translations.lockGroup.title}\n className={ruleGroup.classNames.lockGroup}\n handleOnClick={ruleGroup.toggleLockGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n disabledTranslation={\n ruleGroup.parentDisabled\n ? undefined\n : ruleGroup.translations.lockGroupDisabled\n }\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </div>\n )}\n {isNotRoot && (\n <div>\n <RemoveGroupActionControlElement\n key={TestID.removeGroup}\n testID={TestID.removeGroup}\n label={ruleGroup.translations.removeGroup.label}\n title={ruleGroup.translations.removeGroup.title}\n className={ruleGroup.classNames.removeGroup}\n handleOnClick={ruleGroup.removeGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </div>\n )}\n </>\n );\n}\n\nexport function RuleGroupFooterComponent(\n ruleGroup: RuleGroupProps & ReturnType<typeof useRuleGroup>,\n) {\n const {\n schema: {\n controls: {\n addGroupAction: AddGroupActionControlElement,\n addRuleAction: AddRuleActionControlElement,\n },\n },\n } = ruleGroup;\n\n return (\n <>\n <AddRuleActionControlElement\n key={TestID.addRule}\n testID={TestID.addRule}\n label={ruleGroup.translations.addRule.label}\n title={ruleGroup.translations.addRule.title}\n className={ruleGroup.classNames.addRule}\n handleOnClick={ruleGroup.addRule}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n <AddGroupActionControlElement\n key={TestID.addGroup}\n testID={TestID.addGroup}\n label={ruleGroup.translations.addGroup.label}\n title={ruleGroup.translations.addGroup.title}\n className={ruleGroup.classNames.addGroup}\n handleOnClick={ruleGroup.addGroup}\n rules={ruleGroup.ruleGroup.rules}\n level={ruleGroup.path.length}\n path={ruleGroup.path}\n disabled={ruleGroup.disabled}\n context={ruleGroup.context}\n validation={ruleGroup.validationResult}\n ruleOrGroup={ruleGroup.ruleGroup}\n schema={ruleGroup.schema}\n />\n </>\n );\n}\n"]}
@@ -1,30 +1,15 @@
1
1
  import { ValueSelector } from './value-selector.js';
2
2
  import { ValueEditor } from './value-editor.js';
3
3
  import * as react_querybuilder from 'react-querybuilder';
4
- import { QueryBuilderProps as QueryBuilderProps$1, RuleGroupType as RuleGroupType$1, FullField, FullOperator, FullCombinator, CombinatorSelectorProps, ActionProps, Classnames, Field as Field$1, ValueEditorProps } from 'react-querybuilder';
4
+ import { CombinatorSelectorProps, ActionProps } from 'react-querybuilder';
5
5
  import { RuleGroup, RuleGroupHeaderComponent, RuleGroupFooterComponent } from './group.js';
6
6
  import { Rule } from './rule.js';
7
7
  import { ActionElement } from './action-element.js';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
- import { ReactElement } from 'react';
10
- import { LiteralUnion } from 'type-fest';
9
+ import { QueryBuilderProps } from './types.js';
10
+ import 'react';
11
+ import 'type-fest';
11
12
 
12
- type RuleGroupType = RuleGroupType$1;
13
- type Field = Field$1;
14
- type DefaultRQBProps = QueryBuilderProps$1<RuleGroupType, FullField, FullOperator, FullCombinator>;
15
- type QueryBuilderValueEditors = Record<LiteralUnion<Exclude<ValueEditorProps['type'], null | undefined | 'multiselect'>, string>, (props: ValueEditorProps) => ReactElement>;
16
- /**
17
- * Omitted props are currently unsupported functionality
18
- */
19
- type QueryBuilderProps = Partial<Omit<DefaultRQBProps, 'showCombinatorsBetweenRules' | 'independentCombinators' | 'listsAsArrays' | 'enableDragAndDrop' | 'showNotToggle' | 'showShiftActions'> & {
20
- orientation?: 'horizontal' | 'vertical';
21
- showRuleLines?: boolean;
22
- }>;
23
- /**
24
- * Omitted classnames are for unsupported features
25
- */
26
- type ClassNames = Omit<Classnames, 'betweenRules' | 'branches' | 'dndDragging' | 'dndOver' | 'dndCopy' | 'dndGroup' | 'dragHandle' | 'shiftActions' | 'notToggle'>;
27
- type QueryBuilderContextType = Pick<QueryBuilderProps, 'showRuleLines' | 'orientation'>;
28
13
  declare function QueryBuilder({ controlClassnames, controlElements, orientation, showRuleLines, ...rest }: QueryBuilderProps): react_jsx_runtime.JSX.Element;
29
14
  declare namespace QueryBuilder {
30
15
  var CombinatorSelector: ({ options, value, handleOnChange, }: CombinatorSelectorProps) => react_jsx_runtime.JSX.Element;
@@ -41,4 +26,4 @@ declare namespace QueryBuilder {
41
26
  var ValueSelector: typeof ValueSelector;
42
27
  }
43
28
 
44
- export { type ClassNames, type DefaultRQBProps, type Field, QueryBuilder, type QueryBuilderContextType, type QueryBuilderProps, type QueryBuilderValueEditors, type RuleGroupType };
29
+ export { QueryBuilder };
@@ -1,2 +1,2 @@
1
- import {LockFill,Delete,Duplicate}from'@accelint/icons';import'client-only';import {useMemo,createContext,useCallback}from'react';import {QueryBuilder}from'react-querybuilder';import {cn}from'../../lib/utils.js';import {Button}from'../button/index.js';import {Icon}from'../icon/index.js';import {Label}from'../label/index.js';import {Radio}from'../radio/index.js';import {Tooltip}from'../tooltip/index.js';import {ActionElement}from'./action-element.js';import {RuleGroup,RuleGroupHeaderComponent,RuleGroupFooterComponent}from'./group.js';import {Rule}from'./rule.js';import {getValidationResult,pressToMouseEvent}from'./utils.js';import {ValueEditor}from'./value-editor.js';import {ValueSelector}from'./value-selector.js';import {jsx,jsxs}from'react/jsx-runtime';var z={AND:"All rules below must be true for a match",OR:"One of the rules below must be true for a match"};function C({options:r,value:n,handleOnChange:l}){return jsxs(Radio.Group,{value:n,onChange:l,orientation:"horizontal",children:[jsx(Label,{children:"Combinator"}),r.map(o=>jsx(Radio,{value:o.label,children:jsxs(Tooltip,{children:[jsx(Tooltip.Trigger,{children:jsx("span",{children:o.label})}),jsx(Tooltip.Body,{placement:"top",children:z[o.label]})]})},o.label))]})}function x({handleOnClick:r,className:n,...l}){let o=useCallback(i=>r(pressToMouseEvent(i)),[r]);return jsx(Button,{size:"small",variant:"icon",onPress:o,className:n,...l,children:jsx(Icon,{children:jsx(Delete,{})})})}function u({handleOnClick:r,className:n,...l}){let o=useCallback(i=>r(pressToMouseEvent(i)),[r]);return jsx(Button,{size:"small",variant:"icon",onPress:o,className:n,...l,children:jsx(Icon,{children:jsx(LockFill,{})})})}function p({handleOnClick:r,className:n,...l}){let o=useCallback(i=>r(pressToMouseEvent(i)),[r]);return jsx(Button,{size:"small",variant:"icon",onPress:o,className:n,...l,children:jsx(Icon,{children:jsx(Duplicate,{})})})}function t({controlClassnames:r,controlElements:n,orientation:l="horizontal",showRuleLines:o=true,...i}){let G=useMemo(()=>({combinatorSelector:C,cloneGroupAction:p,cloneRuleAction:p,removeRuleAction:x,lockGroupAction:u,lockRuleAction:u,ruleGroup:RuleGroup,rule:Rule,actionElement:ActionElement,valueSelector:ValueSelector,valueEditor:ValueEditor,...n}),[n]),y=useMemo(()=>({queryBuilder:"border border-transparent",ruleGroup:"group col-span-full flex flex-col gap-s p-s border border-info rounded-medium",header:"flex gap-s",body:cn("group grid gap-x-s empty:hidden",o?"grid-cols-[10px_minmax(100px,_1fr)_min-content]":"grid-cols-[minmax(100px,_1fr)_min-content]"),combinators:"my-s",addRule:"",addGroup:"",cloneRule:"fg-interactive hover:fg-interactive-hover",cloneGroup:"fg-interactive hover:fg-interactive-hover",removeGroup:"",rule:cn("flex gap-xs py-s",l==="vertical"?"flex-col":"min-height-[50px] items-start"),fields:"w-full",operators:"",value:"w-full",removeRule:"",valid:"",invalid:"",disabled:"",lockRule:"fg-interactive hover:fg-interactive-hover",lockGroup:"fg-interactive hover:fg-interactive-hover",valueSource:"",valueListItem:""}),[l,o]),Q=useMemo(()=>({...y,...r}),[r,y]),E=createContext({orientation:l,showRuleLines:o});return jsx(QueryBuilder,{showNotToggle:false,showShiftActions:false,enableDragAndDrop:false,controlClassnames:Q,controlElements:G,context:E,listsAsArrays:true,...i})}t.CombinatorSelector=C;t.RemoveRuleAction=x;t.LockAction=u;t.CloneAction=p;t.ActionElement=ActionElement;t.Rule=Rule;t.RuleGroup=RuleGroup;t.RuleGroupHeaderComponent=RuleGroupHeaderComponent;t.RuleGroupFooterComponent=RuleGroupFooterComponent;t.getValidationResult=getValidationResult;t.ValueEditor=ValueEditor;t.ValueSelector=ValueSelector;export{t as QueryBuilder};//# sourceMappingURL=index.js.map
1
+ import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {LockFill,Delete,Duplicate}from'@accelint/icons';import {useMemo,createContext,useCallback}from'react';import {QueryBuilder}from'react-querybuilder';import {cn}from'../../lib/utils.js';import {Button}from'../button/index.js';import {Icon}from'../icon/index.js';import {Label}from'../label/index.js';import {Radio}from'../radio/index.js';import {Tooltip}from'../tooltip/index.js';import {ActionElement}from'./action-element.js';import {RuleGroup,RuleGroupHeaderComponent,RuleGroupFooterComponent}from'./group.js';import {Rule}from'./rule.js';import {getValidationResult,pressToMouseEvent}from'./utils.js';import {ValueEditor}from'./value-editor.js';import {ValueSelector}from'./value-selector.js';const w={AND:"All rules below must be true for a match",OR:"One of the rules below must be true for a match"};function x({options:r,value:n,handleOnChange:l}){return jsxs(Radio.Group,{value:n,onChange:l,orientation:"horizontal",children:[jsx(Label,{children:"Combinator"}),r.map(o=>jsx(Radio,{value:o.label,children:jsxs(Tooltip,{children:[jsx(Tooltip.Trigger,{children:jsx("span",{children:o.label})}),jsx(Tooltip.Body,{placement:"top",children:w[o.label]})]})},o.label))]})}function C({handleOnClick:r,className:n,...l}){const o=useCallback(i=>r(pressToMouseEvent(i)),[r]);return jsx(Button,{size:"small",variant:"icon",onPress:o,className:n,...l,children:jsx(Icon,{children:jsx(Delete,{})})})}function d({handleOnClick:r,className:n,...l}){const o=useCallback(i=>r(pressToMouseEvent(i)),[r]);return jsx(Button,{size:"small",variant:"icon",onPress:o,className:n,...l,children:jsx(Icon,{children:jsx(LockFill,{})})})}function f({handleOnClick:r,className:n,...l}){const o=useCallback(i=>r(pressToMouseEvent(i)),[r]);return jsx(Button,{size:"small",variant:"icon",onPress:o,className:n,...l,children:jsx(Icon,{children:jsx(Duplicate,{})})})}function t({controlClassnames:r,controlElements:n,orientation:l="horizontal",showRuleLines:o=true,...i}){const G=useMemo(()=>({combinatorSelector:x,cloneGroupAction:f,cloneRuleAction:f,removeRuleAction:C,lockGroupAction:d,lockRuleAction:d,ruleGroup:RuleGroup,rule:Rule,actionElement:ActionElement,valueSelector:ValueSelector,valueEditor:ValueEditor,...n}),[n]),v=useMemo(()=>({queryBuilder:"border border-transparent",ruleGroup:"group col-span-full flex flex-col gap-s p-s border border-info rounded-medium",header:"flex gap-s",body:cn("group grid gap-x-s empty:hidden",o?"grid-cols-[10px_minmax(100px,_1fr)_min-content]":"grid-cols-[minmax(100px,_1fr)_min-content]"),combinators:"my-s",addRule:"",addGroup:"",cloneRule:"fg-interactive hover:fg-interactive-hover",cloneGroup:"fg-interactive hover:fg-interactive-hover",removeGroup:"",rule:cn("flex gap-xs py-s",l==="vertical"?"flex-col":"min-height-[50px] items-start"),fields:"w-full",operators:"",value:"w-full",removeRule:"",valid:"",invalid:"",disabled:"",lockRule:"fg-interactive hover:fg-interactive-hover",lockGroup:"fg-interactive hover:fg-interactive-hover",valueSource:"",valueListItem:""}),[l,o]),E=useMemo(()=>({...v,...r}),[r,v]),S=createContext({orientation:l,showRuleLines:o});return jsx(QueryBuilder,{showNotToggle:false,showShiftActions:false,enableDragAndDrop:false,controlClassnames:E,controlElements:G,context:S,listsAsArrays:true,...i})}t.CombinatorSelector=x,t.RemoveRuleAction=C,t.LockAction=d,t.CloneAction=f,t.ActionElement=ActionElement,t.Rule=Rule,t.RuleGroup=RuleGroup,t.RuleGroupHeaderComponent=RuleGroupHeaderComponent,t.RuleGroupFooterComponent=RuleGroupFooterComponent,t.getValidationResult=getValidationResult,t.ValueEditor=ValueEditor,t.ValueSelector=ValueSelector;export{t as QueryBuilder};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/query-builder/index.tsx"],"names":["CombinatorSelector","options","jsxs","Radio","v","g","handleOnChange","jsx","Label","e","V","option","Tooltip","a","RemoveRuleAction","className","handlePress","event","handleOnClick","m","f","Button","c","Icon","Delete","T","LockAction","LockFill","w","CloneAction","Duplicate","F","QueryBuilder","orientation","mergedElements","s","RuleGroup","B","P","b","A","ValueEditor","h","defaultClassnames","useMemo","R","mergedClassnames","QueryBuilderContext","createContext","D","RQBBuilder","S","k","L","N","ValueSelector"],"mappings":"4vBA4GO,IAAA,CAAA,CAAA,CAAA,GAAA,CAAA,0CACD,CAAA,EAAA,CAAA,iDAGGA,CAAmB,CAC1B,SAAAC,CACA,CAAA,CAAA,OACA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,cAGEC,CAAAA,CAACC,CAAAA,CAAM,CAAA,OACLC,IAAA,CAAAC,KAAA,CAAA,KACA,CAAA,CAAA,KAAUC,CAAAA,CACV,CAAA,QAAA,CAAA,CAAA,CAAY,WAAA,CAAA,YAEZC,CAACC,QAAM,CAAA,CAAAC,GAAA,CAAAC,KAAA,CAAA,CAAA,QAAA,CAAA,YAELH,CAAAA,CAACJ,CAAAA,CAAA,CAAyB,GAAA,CAAA,CAAA,EAAOQ,GAAO,CAAAN,KAAA,CAAA,CAAA,KACtC,CAAA,CAAA,CAAA,KAACO,CAAAA,QACC,CAAAR,IAAA,CAAAS,OAAAN,CAAAA,CAACK,QAAQ,CAAA,CAARH,GACC,CAAAI,OAAA,CAAA,OAAAN,CAAC,CAAA,QAAM,CAAAE,GAAA,CAAA,MAAAE,CAAO,CAAA,QAChB,CACAJ,CAAAA,CAACK,KAAQ,CAAA,CAAR,CAAa,CAAA,CAAAH,GAAA,CAAAI,OAAA,CAAA,IAAU,CAAA,CAAA,SACrB,CAAA,KAAqBF,CAAAA,QACxB,CAAA,CAAA,CACF,CAAA,CAAA,KARiB,CAAA,CAAA,CASnB,CACD,CAAA,CAAA,CACH,CAEJ,CAEA,CAAA,KAAA,CAAA,CAAA,CAASG,CAAAA,CAAiB,CAAE,SAAA,CAAA,CAAA,CAAA,aAAe,CAAAC,CAAAA,CAAW,SAEpD,CAAA,CAAMC,CAAAA,GACHC,CAAAA,CAAAA,CAAsBC,CAAAA,IAAqC,CAAC,CAAAC,WAC7D,CAACD,CAAa,EAChB,CAEA,CAAAE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AAS,CAAA,EACT,CAAA,OAAA,CAAU,EAAA,CACV,QAAA,CAAU,EAAA,CAAA,QAAA,CAAA,2CACC,CAAA,SAAA,CAAA,2CACX,CAAa,WACb,CAAA,EAAA,CAAA,aAGJ,CAEMC,EAAmBF,CAAAA,CAAQ,CAAA,CAAA,CAAA,CAAA,CACxB,CACL,CAAA,CAAA,CAAGD,CAAAA,OACH,CAAA,KACF,CACC,GAAoBA,CAAiB,CAAC,GAEnCI,CAAsBC,CAAAA,CAAuC,CACjE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,CAAAhB,WACA,CAAA,CAAA,CAAA,aAIA1B,CAAAA,CAAC2C,CAAAA,CAAA,CACC,OAAAzC,GAAA,CAAA0C,YAAA,CAAA,CAAA,aACA,CAAA,KAAA,CAAA,gBACA,CAAA,KAAA,CAAA,iBACA,CAAA,KAAA,CAAA,iBACA,CAAA,CAAA,CAAA,eACSJ,CACT,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,aAMNf,CAAa,IAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,kBACA,CAAA,CAAA,CAAA,CAAA,CAAA,gBACA,CAAA,CAAA,CAAA,CAAaN,CAAAA,UACb,CAAA,CAAA,CAAA,CAAA,CAAcG,WACd,CAAA,CAAA,CAAA,CAAA,CAAA,aAEbG,CAAAA,aAAa,CAAA,CAAA,CAAA,IAAA,CAAAM,IAAA,CAAYF,CAAAA,CACzBJ,SAAa,CAAAK,SAAA,CAAA,CAAA,CAAA,wBACA,CAAAe,wBAAA,CAAA,CAAA,CAAA,wBACA,CAAAC,wBAAA,CAAA,CAAA,CAAA,mBACA,CAAAC,mBAAA,CAAA,CAAA,CAAcb,WACd,CAAAC,WAAA,CAAA,CAAA,CAAA,aAAgBa,CAAAA,aAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport { Delete, Duplicate, LockFill } from '@accelint/icons';\nimport type { PressEvent } from '@react-types/shared';\nimport 'client-only';\nimport { type ReactElement, createContext, useCallback, useMemo } from 'react';\nimport {\n type ActionProps,\n type Classnames,\n type CombinatorSelectorProps,\n type FullCombinator,\n type FullField,\n type FullOperator,\n QueryBuilder as RQBBuilder,\n type Classnames as RQBClassnames,\n type Field as RQBField,\n type QueryBuilderProps as RQBProps,\n type RuleGroupType as RQBRuleGroupType,\n type ValueEditorProps,\n} from 'react-querybuilder';\nimport type { LiteralUnion } from 'type-fest';\nimport { cn } from '../../lib/utils';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { Radio } from '../radio';\nimport { Tooltip } from '../tooltip';\nimport { ActionElement } from './action-element';\nimport {\n RuleGroup,\n RuleGroupFooterComponent,\n RuleGroupHeaderComponent,\n} from './group';\nimport { Rule } from './rule';\nimport { getValidationResult, pressToMouseEvent } from './utils';\nimport { ValueEditor } from './value-editor';\nimport { ValueSelector } from './value-selector';\n\nexport type RuleGroupType = RQBRuleGroupType;\nexport type Field = RQBField;\n\nexport type DefaultRQBProps = RQBProps<\n RuleGroupType,\n FullField,\n FullOperator,\n FullCombinator\n>;\n\n// TODO: need to add multiselect back in when we have a compatible component\nexport type QueryBuilderValueEditors = Record<\n LiteralUnion<\n Exclude<ValueEditorProps['type'], null | undefined | 'multiselect'>,\n string\n >,\n (props: ValueEditorProps) => ReactElement\n>;\n\n/**\n * Omitted props are currently unsupported functionality\n */\nexport type QueryBuilderProps = Partial<\n Omit<\n DefaultRQBProps,\n | 'showCombinatorsBetweenRules'\n | 'independentCombinators'\n | 'listsAsArrays'\n | 'enableDragAndDrop'\n | 'showNotToggle'\n | 'showShiftActions'\n > & {\n orientation?: 'horizontal' | 'vertical';\n showRuleLines?: boolean;\n }\n>;\n\n/**\n * Omitted classnames are for unsupported features\n */\nexport type ClassNames = Omit<\n RQBClassnames,\n | 'betweenRules'\n | 'branches'\n | 'dndDragging'\n | 'dndOver'\n | 'dndCopy'\n | 'dndGroup'\n | 'dragHandle'\n | 'shiftActions'\n | 'notToggle'\n>;\n\nexport type QueryBuilderContextType = Pick<\n QueryBuilderProps,\n 'showRuleLines' | 'orientation'\n>;\n\nconst operatorDescriptions: Record<string, string> = {\n AND: 'All rules below must be true for a match',\n OR: 'One of the rules below must be true for a match',\n};\n\nfunction CombinatorSelector({\n options,\n value,\n handleOnChange,\n}: CombinatorSelectorProps) {\n return (\n <Radio.Group\n value={value}\n onChange={handleOnChange}\n orientation='horizontal'\n >\n <Label>Combinator</Label>\n {options.map((option) => (\n <Radio key={option.label} value={option.label}>\n <Tooltip>\n <Tooltip.Trigger>\n <span>{option.label}</span>\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {operatorDescriptions[option.label]}\n </Tooltip.Body>\n </Tooltip>\n </Radio>\n ))}\n </Radio.Group>\n );\n}\n\nfunction RemoveRuleAction({ handleOnClick, className, ...rest }: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n return (\n <Button\n size='small'\n variant='icon'\n onPress={handlePress}\n className={className}\n {...rest}\n >\n <Icon>\n <Delete />\n </Icon>\n </Button>\n );\n}\n\nfunction LockAction({ handleOnClick, className, ...rest }: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n return (\n <Button\n size='small'\n variant='icon'\n onPress={handlePress}\n className={className}\n {...rest}\n >\n <Icon>\n <LockFill />\n </Icon>\n </Button>\n );\n}\n\nfunction CloneAction({ handleOnClick, className, ...rest }: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n return (\n <Button\n size='small'\n variant='icon'\n onPress={handlePress}\n className={className}\n {...rest}\n >\n <Icon>\n <Duplicate />\n </Icon>\n </Button>\n );\n}\n\nexport function QueryBuilder({\n controlClassnames,\n controlElements,\n orientation = 'horizontal',\n showRuleLines = true,\n ...rest\n}: QueryBuilderProps) {\n /**\n * Represents the list of available controls that the component can use as a custom\n * component override.Passed in as a map of our custom defaults, but can be\n * overridden by using the controlElements prop\n */\n const mergedElements = useMemo(\n () => ({\n combinatorSelector: CombinatorSelector,\n cloneGroupAction: CloneAction,\n cloneRuleAction: CloneAction,\n removeRuleAction: RemoveRuleAction,\n lockGroupAction: LockAction,\n lockRuleAction: LockAction,\n ruleGroup: RuleGroup,\n rule: Rule,\n actionElement: ActionElement,\n valueSelector: ValueSelector,\n valueEditor: ValueEditor,\n ...controlElements,\n }),\n [controlElements],\n );\n\n /**\n * Represents the list of available classnames that the component will recognize.\n * Passed in as a map as all the default styling, but can be overridden by using the\n * controlClassnames prop\n */\n const defaultClassnames: Partial<Classnames> = useMemo(\n () => ({\n queryBuilder: 'border border-transparent',\n ruleGroup:\n 'group col-span-full flex flex-col gap-s p-s border border-info rounded-medium',\n header: 'flex gap-s',\n body: cn(\n 'group grid gap-x-s empty:hidden',\n showRuleLines\n ? 'grid-cols-[10px_minmax(100px,_1fr)_min-content]'\n : 'grid-cols-[minmax(100px,_1fr)_min-content]',\n ),\n combinators: 'my-s',\n addRule: '',\n addGroup: '',\n cloneRule: 'fg-interactive hover:fg-interactive-hover',\n cloneGroup: 'fg-interactive hover:fg-interactive-hover',\n removeGroup: '',\n rule: cn(\n 'flex gap-xs py-s',\n orientation === 'vertical'\n ? 'flex-col'\n : 'min-height-[50px] items-start',\n ),\n fields: 'w-full',\n operators: '',\n value: 'w-full',\n removeRule: '',\n valid: '',\n invalid: '',\n disabled: '',\n lockRule: 'fg-interactive hover:fg-interactive-hover',\n lockGroup: 'fg-interactive hover:fg-interactive-hover',\n valueSource: '',\n valueListItem: '',\n }),\n [orientation, showRuleLines],\n );\n\n const mergedClassnames = useMemo(() => {\n return {\n ...defaultClassnames,\n ...controlClassnames,\n };\n }, [controlClassnames, defaultClassnames]);\n\n const QueryBuilderContext = createContext<QueryBuilderContextType>({\n orientation,\n showRuleLines,\n });\n\n return (\n <RQBBuilder\n showNotToggle={false}\n showShiftActions={false}\n enableDragAndDrop={false}\n controlClassnames={mergedClassnames}\n controlElements={mergedElements}\n context={QueryBuilderContext}\n listsAsArrays\n {...rest}\n />\n );\n}\n\nQueryBuilder.CombinatorSelector = CombinatorSelector;\nQueryBuilder.RemoveRuleAction = RemoveRuleAction;\nQueryBuilder.LockAction = LockAction;\nQueryBuilder.CloneAction = CloneAction;\nQueryBuilder.ActionElement = ActionElement;\nQueryBuilder.Rule = Rule;\nQueryBuilder.RuleGroup = RuleGroup;\nQueryBuilder.RuleGroupHeaderComponent = RuleGroupHeaderComponent;\nQueryBuilder.RuleGroupFooterComponent = RuleGroupFooterComponent;\nQueryBuilder.getValidationResult = getValidationResult;\nQueryBuilder.ValueEditor = ValueEditor;\nQueryBuilder.ValueSelector = ValueSelector;\n"]}
1
+ {"version":3,"sources":["../../../src/components/query-builder/index.tsx"],"names":["jsx","Label","B","b","options","Radio","jsxs","Tooltip","e","z","m","operatorDescriptions","option","RemoveRuleAction","className","event","handleOnClick","pressToMouseEvent","handlePress","rest","p","Icon","u","LockAction","useCallback","T","CloneAction","k","QueryBuilder","c","Q","mergedElements","CombinatorSelector","s","defaultClassnames","R","A","y","P","h","g","RQBBuilder","D","V","mergedClassnames","Rule","RuleGroupFooterComponent","getValidationResult","N","ValueSelector"],"mappings":"4vBA2CM,MAAA,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CAAA,aACD,CAED,EAAA,CAAA,CAAA,CAAA,CAAA,CACExC,CAAAA,CAACyC,CAAAA,CAAA,CACC,CAAA,CAAAR,OAAA,CAAA,KAAA,CAAA,GAAA,CAAe,CAAA,GACf,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAS,aAAA,CAAA,CAAkB,WAClB,CAAA,CAAA,CAAA,aACA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAAlC,GAAA,CAAAmC,YAAmBC,CAAAA,CACnB,aAAA,CAAA,KAAiBb,CAAAA,gBAEjB,CAAA,KAAA,CAAA,iBAMO,CAAA,KAAA,CAAA,iBACbH,CAAAA,CAAa,CAAA,eAAA,CAAmBf,CAAAA,CAChCe,OAAa,CAAA,CAAA,CAAA,aACA,CAAA,IAAA,CAAA,GAAcF,CAC3BE,CAAAA,CAAa,CAAA,CAAA,CAAA,kBACA,CAAA,CAAOiB,CAAAA,CACpBjB,CAAAA,gBACa,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WACA,CAAA,CAAA,CAAA,CAAA,CAAA,aAAA,CAAAS,aAAA,CAAA,CAA2BS,CAAAA,IAC3B,CAAAV,IAAA,CAAA,CAAA,CAAA,SAAA,CAAAD,SAAA,CAAA,CAAA,CAAsBY,wBAEtB,CAAAC,wBAAA,CAAA,CAAA,CAAA,wBAAgBC,CAAAA,wBAAAA,CAAAA,CAAAA,CAAAA,mBAAAA,CAAAA,mBAAAA,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,WAAAA,CAAAA,CAAAA,CAAAA,aAAAA,CAAAA,aAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Delete, Duplicate, LockFill } from '@accelint/icons';\nimport type { PressEvent } from '@react-types/shared';\nimport { createContext, useCallback, useMemo } from 'react';\nimport {\n type ActionProps,\n type Classnames,\n type CombinatorSelectorProps,\n QueryBuilder as RQBBuilder,\n} from 'react-querybuilder';\nimport { cn } from '../../lib/utils';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { Radio } from '../radio';\nimport { Tooltip } from '../tooltip';\nimport { ActionElement } from './action-element';\nimport {\n RuleGroup,\n RuleGroupFooterComponent,\n RuleGroupHeaderComponent,\n} from './group';\nimport { Rule } from './rule';\nimport type { QueryBuilderContextType, QueryBuilderProps } from './types';\nimport { getValidationResult, pressToMouseEvent } from './utils';\nimport { ValueEditor } from './value-editor';\nimport { ValueSelector } from './value-selector';\n\nconst operatorDescriptions: Record<string, string> = {\n AND: 'All rules below must be true for a match',\n OR: 'One of the rules below must be true for a match',\n};\n\nfunction CombinatorSelector({\n options,\n value,\n handleOnChange,\n}: CombinatorSelectorProps) {\n return (\n <Radio.Group\n value={value}\n onChange={handleOnChange}\n orientation='horizontal'\n >\n <Label>Combinator</Label>\n {options.map((option) => (\n <Radio key={option.label} value={option.label}>\n <Tooltip>\n <Tooltip.Trigger>\n <span>{option.label}</span>\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {operatorDescriptions[option.label]}\n </Tooltip.Body>\n </Tooltip>\n </Radio>\n ))}\n </Radio.Group>\n );\n}\n\nfunction RemoveRuleAction({ handleOnClick, className, ...rest }: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n return (\n <Button\n size='small'\n variant='icon'\n onPress={handlePress}\n className={className}\n {...rest}\n >\n <Icon>\n <Delete />\n </Icon>\n </Button>\n );\n}\n\nfunction LockAction({ handleOnClick, className, ...rest }: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n return (\n <Button\n size='small'\n variant='icon'\n onPress={handlePress}\n className={className}\n {...rest}\n >\n <Icon>\n <LockFill />\n </Icon>\n </Button>\n );\n}\n\nfunction CloneAction({ handleOnClick, className, ...rest }: ActionProps) {\n // TODO: remove pressToMouseEvent when design-system is removed\n const handlePress = useCallback(\n (event: PressEvent) => handleOnClick(pressToMouseEvent(event)),\n [handleOnClick],\n );\n\n return (\n <Button\n size='small'\n variant='icon'\n onPress={handlePress}\n className={className}\n {...rest}\n >\n <Icon>\n <Duplicate />\n </Icon>\n </Button>\n );\n}\n\nexport function QueryBuilder({\n controlClassnames,\n controlElements,\n orientation = 'horizontal',\n showRuleLines = true,\n ...rest\n}: QueryBuilderProps) {\n /**\n * Represents the list of available controls that the component can use as a custom\n * component override.Passed in as a map of our custom defaults, but can be\n * overridden by using the controlElements prop\n */\n const mergedElements = useMemo(\n () => ({\n combinatorSelector: CombinatorSelector,\n cloneGroupAction: CloneAction,\n cloneRuleAction: CloneAction,\n removeRuleAction: RemoveRuleAction,\n lockGroupAction: LockAction,\n lockRuleAction: LockAction,\n ruleGroup: RuleGroup,\n rule: Rule,\n actionElement: ActionElement,\n valueSelector: ValueSelector,\n valueEditor: ValueEditor,\n ...controlElements,\n }),\n [controlElements],\n );\n\n /**\n * Represents the list of available classnames that the component will recognize.\n * Passed in as a map as all the default styling, but can be overridden by using the\n * controlClassnames prop\n */\n const defaultClassnames: Partial<Classnames> = useMemo(\n () => ({\n queryBuilder: 'border border-transparent',\n ruleGroup:\n 'group col-span-full flex flex-col gap-s p-s border border-info rounded-medium',\n header: 'flex gap-s',\n body: cn(\n 'group grid gap-x-s empty:hidden',\n showRuleLines\n ? 'grid-cols-[10px_minmax(100px,_1fr)_min-content]'\n : 'grid-cols-[minmax(100px,_1fr)_min-content]',\n ),\n combinators: 'my-s',\n addRule: '',\n addGroup: '',\n cloneRule: 'fg-interactive hover:fg-interactive-hover',\n cloneGroup: 'fg-interactive hover:fg-interactive-hover',\n removeGroup: '',\n rule: cn(\n 'flex gap-xs py-s',\n orientation === 'vertical'\n ? 'flex-col'\n : 'min-height-[50px] items-start',\n ),\n fields: 'w-full',\n operators: '',\n value: 'w-full',\n removeRule: '',\n valid: '',\n invalid: '',\n disabled: '',\n lockRule: 'fg-interactive hover:fg-interactive-hover',\n lockGroup: 'fg-interactive hover:fg-interactive-hover',\n valueSource: '',\n valueListItem: '',\n }),\n [orientation, showRuleLines],\n );\n\n const mergedClassnames = useMemo(() => {\n return {\n ...defaultClassnames,\n ...controlClassnames,\n };\n }, [controlClassnames, defaultClassnames]);\n\n const QueryBuilderContext = createContext<QueryBuilderContextType>({\n orientation,\n showRuleLines,\n });\n\n return (\n <RQBBuilder\n showNotToggle={false}\n showShiftActions={false}\n enableDragAndDrop={false}\n controlClassnames={mergedClassnames}\n controlElements={mergedElements}\n context={QueryBuilderContext}\n listsAsArrays\n {...rest}\n />\n );\n}\n\nQueryBuilder.CombinatorSelector = CombinatorSelector;\nQueryBuilder.RemoveRuleAction = RemoveRuleAction;\nQueryBuilder.LockAction = LockAction;\nQueryBuilder.CloneAction = CloneAction;\nQueryBuilder.ActionElement = ActionElement;\nQueryBuilder.Rule = Rule;\nQueryBuilder.RuleGroup = RuleGroup;\nQueryBuilder.RuleGroupHeaderComponent = RuleGroupHeaderComponent;\nQueryBuilder.RuleGroupFooterComponent = RuleGroupFooterComponent;\nQueryBuilder.getValidationResult = getValidationResult;\nQueryBuilder.ValueEditor = ValueEditor;\nQueryBuilder.ValueSelector = ValueSelector;\n"]}
@@ -1,2 +1,2 @@
1
- import {useContext}from'react';import {useRule,useStopEventPropagation,TestID}from'react-querybuilder';import {jsxs,Fragment,jsx}from'react/jsx-runtime';function Y(d){let e=useRule(d),v=useContext(d.context),{classNames:r,disabled:C,operators:S,outerClassName:p,rule:{field:u,operator:n,value:f,valueSource:m},schema:{controls:{fieldSelector:N,operatorSelector:g,valueSourceSelector:k,valueEditor:D,cloneRuleAction:O,lockRuleAction:E,removeRuleAction:b},fields:y,listsAsArrays:A,parseNumbers:I,showCloneButtons:T,showLockButtons:x},fieldData:R,generateOnChangeHandler:s,inputType:L,parentDisabled:B,path:h,translations:l,valueEditorType:P,valueEditorSeparator:w,values:G,valueSources:V,valueSourceOptions:H,validationResult:Q}=e,F=useStopEventPropagation(e.cloneRule),q=useStopEventPropagation(e.toggleLockRule),z=useStopEventPropagation(e.removeRule),o={context:v,disabled:C,level:h.length,path:h,schema:e.schema,validation:Q},J=!["null","notNull"].includes(n)&&V.length>1;return jsxs(Fragment,{children:[v.showRuleLines&&jsx("span",{className:"rule-lines relative"}),jsxs("div",{className:p,children:[jsx(N,{testID:TestID.fields,options:y,title:l.fields.title,value:u,operator:n,className:r.fields,handleOnChange:s("field"),rule:e.rule,...o}),jsx(g,{testID:TestID.operators,field:u,fieldData:e.fieldData,title:e.translations.operators.title,options:S,value:n,className:e.classNames.operators,handleOnChange:e.generateOnChangeHandler("operator"),rule:e.rule,...o}),jsx(D,{testID:TestID.valueEditor,field:u,fieldData:R,title:l.value.title,operator:n,value:f,valueSource:m??"value",type:P,inputType:L,values:G,listsAsArrays:A,parseNumbers:I,separator:w,className:r.value,handleOnChange:s("value"),rule:e.rule,...o}),J&&jsx(k,{testID:TestID.valueSourceSelector,field:u,fieldData:R,title:l.valueSourceSelector.title,options:H,value:m??"value",className:r.valueSource,handleOnChange:s("valueSource"),rule:e.rule,...o})]}),jsxs("div",{className:p,children:[jsx(b,{testID:TestID.removeRule,label:l.removeRule.label??"remove",title:l.removeRule.title??"remove",className:r.removeRule,handleOnClick:z,ruleOrGroup:e.rule,...o}),T&&jsx(O,{testID:TestID.cloneRule,label:l.cloneRule.label??"clone",title:l.cloneRule.title??"clone",className:r.cloneRule,handleOnClick:F,ruleOrGroup:e.rule,...o}),x&&jsx(E,{testID:TestID.lockRule,label:l.lockRule.label??"lock",title:l.lockRule.title??"lock",className:r.lockRule,handleOnClick:q,disabledTranslation:B?void 0:l.lockRuleDisabled,ruleOrGroup:e.rule,...o})]})]})}export{Y as Rule};//# sourceMappingURL=rule.js.map
1
+ import {jsxs,Fragment,jsx}from'react/jsx-runtime';import'client-only';import {useContext}from'react';import {useRule,useStopEventPropagation,TestID}from'react-querybuilder';function Z(d){const e=useRule(d),v=useContext(d.context),{classNames:r,disabled:C,operators:S,outerClassName:p,rule:{field:u,operator:n,value:f,valueSource:m},schema:{controls:{fieldSelector:N,operatorSelector:g,valueSourceSelector:k,valueEditor:D,cloneRuleAction:O,lockRuleAction:y,removeRuleAction:E},fields:b,listsAsArrays:A,parseNumbers:I,showCloneButtons:T,showLockButtons:x},fieldData:R,generateOnChangeHandler:s,inputType:L,parentDisabled:B,path:h,translations:l,valueEditorType:P,valueEditorSeparator:w,values:G,valueSources:V,valueSourceOptions:H,validationResult:Q}=e,F=useStopEventPropagation(e.cloneRule),q=useStopEventPropagation(e.toggleLockRule),z=useStopEventPropagation(e.removeRule),o={context:v,disabled:C,level:h.length,path:h,schema:e.schema,validation:Q},J=!["null","notNull"].includes(n)&&V.length>1;return jsxs(Fragment,{children:[v.showRuleLines&&jsx("span",{className:"rule-lines relative"}),jsxs("div",{className:p,children:[jsx(N,{testID:TestID.fields,options:b,title:l.fields.title,value:u,operator:n,className:r.fields,handleOnChange:s("field"),rule:e.rule,...o}),jsx(g,{testID:TestID.operators,field:u,fieldData:e.fieldData,title:e.translations.operators.title,options:S,value:n,className:e.classNames.operators,handleOnChange:e.generateOnChangeHandler("operator"),rule:e.rule,...o}),jsx(D,{testID:TestID.valueEditor,field:u,fieldData:R,title:l.value.title,operator:n,value:f,valueSource:m??"value",type:P,inputType:L,values:G,listsAsArrays:A,parseNumbers:I,separator:w,className:r.value,handleOnChange:s("value"),rule:e.rule,...o}),J&&jsx(k,{testID:TestID.valueSourceSelector,field:u,fieldData:R,title:l.valueSourceSelector.title,options:H,value:m??"value",className:r.valueSource,handleOnChange:s("valueSource"),rule:e.rule,...o})]}),jsxs("div",{className:p,children:[jsx(E,{testID:TestID.removeRule,label:l.removeRule.label??"remove",title:l.removeRule.title??"remove",className:r.removeRule,handleOnClick:z,ruleOrGroup:e.rule,...o}),T&&jsx(O,{testID:TestID.cloneRule,label:l.cloneRule.label??"clone",title:l.cloneRule.title??"clone",className:r.cloneRule,handleOnClick:F,ruleOrGroup:e.rule,...o}),x&&jsx(y,{testID:TestID.lockRule,label:l.lockRule.label??"lock",title:l.lockRule.title??"lock",className:r.lockRule,handleOnClick:q,disabledTranslation:B?void 0:l.lockRuleDisabled,ruleOrGroup:e.rule,...o})]})]})}export{Z as Rule};//# sourceMappingURL=rule.js.map
2
2
  //# sourceMappingURL=rule.js.map