@osdk/react-components 0.2.0-beta.21 → 0.2.0-beta.22

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 (257) hide show
  1. package/AGENTS.md +14 -97
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +1 -1
  4. package/build/browser/action-form/ActionFormApi.js.map +1 -1
  5. package/build/browser/action-form/BaseForm.js +18 -5
  6. package/build/browser/action-form/BaseForm.js.map +1 -1
  7. package/build/browser/action-form/BaseForm.module.css +38 -0
  8. package/build/browser/action-form/BaseForm.module.css.js +8 -0
  9. package/build/browser/action-form/FormField.js +42 -0
  10. package/build/browser/action-form/FormField.js.map +1 -0
  11. package/build/browser/action-form/FormField.module.css +41 -0
  12. package/build/browser/action-form/FormField.module.css.js +10 -0
  13. package/build/browser/action-form/FormFieldApi.js.map +1 -1
  14. package/build/browser/action-form/FormHeader.js +26 -0
  15. package/build/browser/action-form/FormHeader.js.map +1 -0
  16. package/build/browser/action-form/FormHeader.module.css +26 -0
  17. package/build/browser/action-form/FormHeader.module.css.js +6 -0
  18. package/build/browser/action-form/fields/FormFieldRenderer.js +7 -5
  19. package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -1
  20. package/build/browser/action-form/fields/TextInputField.js +2 -0
  21. package/build/browser/action-form/fields/TextInputField.js.map +1 -1
  22. package/build/browser/action-form/fields/TextInputField.module.css +56 -0
  23. package/build/browser/action-form/fields/TextInputField.module.css.js +6 -0
  24. package/build/browser/base-components/checkbox/Checkbox.js +2 -2
  25. package/build/browser/base-components/checkbox/Checkbox.js.map +1 -1
  26. package/build/browser/base-components/checkbox/Checkbox.module.css +0 -4
  27. package/build/browser/base-components/combobox/Combobox.js +3 -8
  28. package/build/browser/base-components/combobox/Combobox.js.map +1 -1
  29. package/build/browser/base-components/combobox/Combobox.module.css +0 -3
  30. package/build/browser/base-components/draggable-list/DraggableList.js +2 -4
  31. package/build/browser/base-components/draggable-list/DraggableList.js.map +1 -1
  32. package/build/browser/base-components/search-bar/SearchBar.module.css +2 -2
  33. package/build/browser/base-components/select/Select.js +1 -3
  34. package/build/browser/base-components/select/Select.js.map +1 -1
  35. package/build/browser/base-components/select/Select.module.css +0 -2
  36. package/build/browser/base-components/switch/Switch.module.css +0 -1
  37. package/build/browser/filter-list/FilterInput.js +14 -5
  38. package/build/browser/filter-list/FilterInput.js.map +1 -1
  39. package/build/browser/filter-list/FilterList.js +13 -5
  40. package/build/browser/filter-list/FilterList.js.map +1 -1
  41. package/build/browser/filter-list/FilterListApi.js.map +1 -1
  42. package/build/browser/filter-list/base/AddFilterPopover.js +4 -3
  43. package/build/browser/filter-list/base/AddFilterPopover.js.map +1 -1
  44. package/build/browser/filter-list/base/BaseFilterListApi.js.map +1 -1
  45. package/build/browser/filter-list/base/ExcludeDropdown.js +61 -0
  46. package/build/browser/filter-list/base/ExcludeDropdown.js.map +1 -0
  47. package/build/browser/filter-list/base/ExcludeDropdown.module.css +94 -0
  48. package/build/browser/filter-list/base/ExcludeDropdown.module.css.js +12 -0
  49. package/build/browser/filter-list/base/FilterIcons.js +0 -39
  50. package/build/browser/filter-list/base/FilterIcons.js.map +1 -1
  51. package/build/browser/filter-list/base/FilterInputExcludeRow.js +55 -0
  52. package/build/browser/filter-list/base/FilterInputExcludeRow.js.map +1 -0
  53. package/build/browser/filter-list/base/FilterListItem.js +72 -23
  54. package/build/browser/filter-list/base/FilterListItem.js.map +1 -1
  55. package/build/browser/filter-list/base/FilterListItem.module.css +96 -20
  56. package/build/browser/filter-list/base/FilterListItem.module.css.js +7 -2
  57. package/build/browser/filter-list/base/inputs/CheckboxListInput.js +2 -2
  58. package/build/browser/filter-list/base/inputs/CheckboxListInput.js.map +1 -1
  59. package/build/browser/filter-list/base/inputs/ContainsTextInput.js +2 -6
  60. package/build/browser/filter-list/base/inputs/ContainsTextInput.js.map +1 -1
  61. package/build/browser/filter-list/base/inputs/ListogramInput.js +2 -2
  62. package/build/browser/filter-list/base/inputs/ListogramInput.js.map +1 -1
  63. package/build/browser/filter-list/base/inputs/RangeInput.js +2 -2
  64. package/build/browser/filter-list/base/inputs/RangeInput.js.map +1 -1
  65. package/build/browser/filter-list/base/inputs/SingleSelectInput.js +1 -3
  66. package/build/browser/filter-list/base/inputs/SingleSelectInput.js.map +1 -1
  67. package/build/browser/filter-list/base/inputs/{useStaleData.js → useStableData.js} +5 -5
  68. package/build/browser/filter-list/base/inputs/useStableData.js.map +1 -0
  69. package/build/browser/filter-list/hooks/usePropertyAggregation.js +3 -2
  70. package/build/browser/filter-list/hooks/usePropertyAggregation.js.map +1 -1
  71. package/build/browser/filter-list/inputs/CheckboxListFilterInput.js +15 -5
  72. package/build/browser/filter-list/inputs/CheckboxListFilterInput.js.map +1 -1
  73. package/build/browser/filter-list/inputs/DateRangeFilterInput.js +10 -6
  74. package/build/browser/filter-list/inputs/DateRangeFilterInput.js.map +1 -1
  75. package/build/browser/filter-list/inputs/LinkedPropertyInput.js +41 -18
  76. package/build/browser/filter-list/inputs/LinkedPropertyInput.js.map +1 -1
  77. package/build/browser/filter-list/inputs/ListogramFilterInput.js +15 -5
  78. package/build/browser/filter-list/inputs/ListogramFilterInput.js.map +1 -1
  79. package/build/browser/filter-list/inputs/MultiSelectFilterInput.js +12 -4
  80. package/build/browser/filter-list/inputs/MultiSelectFilterInput.js.map +1 -1
  81. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js +10 -6
  82. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js.map +1 -1
  83. package/build/browser/filter-list/inputs/PropertyFilterInput.js +36 -10
  84. package/build/browser/filter-list/inputs/PropertyFilterInput.js.map +1 -1
  85. package/build/browser/filter-list/inputs/SingleSelectFilterInput.js +12 -4
  86. package/build/browser/filter-list/inputs/SingleSelectFilterInput.js.map +1 -1
  87. package/build/browser/filter-list/inputs/TextTagsFilterInput.js +12 -4
  88. package/build/browser/filter-list/inputs/TextTagsFilterInput.js.map +1 -1
  89. package/build/browser/filter-list/utils/filterValues.js +29 -1
  90. package/build/browser/filter-list/utils/filterValues.js.map +1 -1
  91. package/build/browser/object-table/LoadingCell.module.css +0 -1
  92. package/build/browser/object-table/MultiColumnSortDialog.js +1 -3
  93. package/build/browser/object-table/MultiColumnSortDialog.js.map +1 -1
  94. package/build/browser/object-table/MultiColumnSortDialog.module.css +0 -1
  95. package/build/browser/object-table/TableCell.module.css +1 -1
  96. package/build/browser/object-table/TableHeader.module.css +2 -2
  97. package/build/browser/object-table/TableHeaderWithPopover.js +2 -4
  98. package/build/browser/object-table/TableHeaderWithPopover.js.map +1 -1
  99. package/build/browser/object-table/TableHeaderWithPopover.module.css +1 -0
  100. package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.module.css +0 -1
  101. package/build/browser/public/experimental.js +2 -0
  102. package/build/browser/public/experimental.js.map +1 -1
  103. package/build/browser/styles.css +372 -38
  104. package/build/cjs/public/experimental.cjs +1882 -1068
  105. package/build/cjs/public/experimental.cjs.map +1 -1
  106. package/build/cjs/public/experimental.css +244 -38
  107. package/build/cjs/public/experimental.css.map +1 -1
  108. package/build/cjs/public/experimental.d.cts +420 -11
  109. package/build/esm/action-form/ActionFormApi.js.map +1 -1
  110. package/build/esm/action-form/BaseForm.js +18 -5
  111. package/build/esm/action-form/BaseForm.js.map +1 -1
  112. package/build/esm/action-form/BaseForm.module.css +38 -0
  113. package/build/esm/action-form/FormField.js +42 -0
  114. package/build/esm/action-form/FormField.js.map +1 -0
  115. package/build/esm/action-form/FormField.module.css +41 -0
  116. package/build/esm/action-form/FormFieldApi.js.map +1 -1
  117. package/build/esm/action-form/FormHeader.js +26 -0
  118. package/build/esm/action-form/FormHeader.js.map +1 -0
  119. package/build/esm/action-form/FormHeader.module.css +26 -0
  120. package/build/esm/action-form/fields/FormFieldRenderer.js +7 -5
  121. package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -1
  122. package/build/esm/action-form/fields/TextInputField.js +2 -0
  123. package/build/esm/action-form/fields/TextInputField.js.map +1 -1
  124. package/build/esm/action-form/fields/TextInputField.module.css +56 -0
  125. package/build/esm/base-components/checkbox/Checkbox.js +2 -2
  126. package/build/esm/base-components/checkbox/Checkbox.js.map +1 -1
  127. package/build/esm/base-components/checkbox/Checkbox.module.css +0 -4
  128. package/build/esm/base-components/combobox/Combobox.js +3 -8
  129. package/build/esm/base-components/combobox/Combobox.js.map +1 -1
  130. package/build/esm/base-components/combobox/Combobox.module.css +0 -3
  131. package/build/esm/base-components/draggable-list/DraggableList.js +2 -4
  132. package/build/esm/base-components/draggable-list/DraggableList.js.map +1 -1
  133. package/build/esm/base-components/search-bar/SearchBar.module.css +2 -2
  134. package/build/esm/base-components/select/Select.js +1 -3
  135. package/build/esm/base-components/select/Select.js.map +1 -1
  136. package/build/esm/base-components/select/Select.module.css +0 -2
  137. package/build/esm/base-components/switch/Switch.module.css +0 -1
  138. package/build/esm/filter-list/FilterInput.js +14 -5
  139. package/build/esm/filter-list/FilterInput.js.map +1 -1
  140. package/build/esm/filter-list/FilterList.js +13 -5
  141. package/build/esm/filter-list/FilterList.js.map +1 -1
  142. package/build/esm/filter-list/FilterListApi.js.map +1 -1
  143. package/build/esm/filter-list/base/AddFilterPopover.js +4 -3
  144. package/build/esm/filter-list/base/AddFilterPopover.js.map +1 -1
  145. package/build/esm/filter-list/base/BaseFilterListApi.js.map +1 -1
  146. package/build/esm/filter-list/base/ExcludeDropdown.js +61 -0
  147. package/build/esm/filter-list/base/ExcludeDropdown.js.map +1 -0
  148. package/build/esm/filter-list/base/ExcludeDropdown.module.css +94 -0
  149. package/build/esm/filter-list/base/FilterIcons.js +0 -39
  150. package/build/esm/filter-list/base/FilterIcons.js.map +1 -1
  151. package/build/esm/filter-list/base/FilterInputExcludeRow.js +55 -0
  152. package/build/esm/filter-list/base/FilterInputExcludeRow.js.map +1 -0
  153. package/build/esm/filter-list/base/FilterListItem.js +72 -23
  154. package/build/esm/filter-list/base/FilterListItem.js.map +1 -1
  155. package/build/esm/filter-list/base/FilterListItem.module.css +96 -20
  156. package/build/esm/filter-list/base/inputs/CheckboxListInput.js +2 -2
  157. package/build/esm/filter-list/base/inputs/CheckboxListInput.js.map +1 -1
  158. package/build/esm/filter-list/base/inputs/ContainsTextInput.js +2 -6
  159. package/build/esm/filter-list/base/inputs/ContainsTextInput.js.map +1 -1
  160. package/build/esm/filter-list/base/inputs/ListogramInput.js +2 -2
  161. package/build/esm/filter-list/base/inputs/ListogramInput.js.map +1 -1
  162. package/build/esm/filter-list/base/inputs/RangeInput.js +2 -2
  163. package/build/esm/filter-list/base/inputs/RangeInput.js.map +1 -1
  164. package/build/esm/filter-list/base/inputs/SingleSelectInput.js +1 -3
  165. package/build/esm/filter-list/base/inputs/SingleSelectInput.js.map +1 -1
  166. package/build/esm/filter-list/base/inputs/{useStaleData.js → useStableData.js} +5 -5
  167. package/build/esm/filter-list/base/inputs/useStableData.js.map +1 -0
  168. package/build/esm/filter-list/hooks/usePropertyAggregation.js +3 -2
  169. package/build/esm/filter-list/hooks/usePropertyAggregation.js.map +1 -1
  170. package/build/esm/filter-list/inputs/CheckboxListFilterInput.js +15 -5
  171. package/build/esm/filter-list/inputs/CheckboxListFilterInput.js.map +1 -1
  172. package/build/esm/filter-list/inputs/DateRangeFilterInput.js +10 -6
  173. package/build/esm/filter-list/inputs/DateRangeFilterInput.js.map +1 -1
  174. package/build/esm/filter-list/inputs/LinkedPropertyInput.js +41 -18
  175. package/build/esm/filter-list/inputs/LinkedPropertyInput.js.map +1 -1
  176. package/build/esm/filter-list/inputs/ListogramFilterInput.js +15 -5
  177. package/build/esm/filter-list/inputs/ListogramFilterInput.js.map +1 -1
  178. package/build/esm/filter-list/inputs/MultiSelectFilterInput.js +12 -4
  179. package/build/esm/filter-list/inputs/MultiSelectFilterInput.js.map +1 -1
  180. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js +10 -6
  181. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js.map +1 -1
  182. package/build/esm/filter-list/inputs/PropertyFilterInput.js +36 -10
  183. package/build/esm/filter-list/inputs/PropertyFilterInput.js.map +1 -1
  184. package/build/esm/filter-list/inputs/SingleSelectFilterInput.js +12 -4
  185. package/build/esm/filter-list/inputs/SingleSelectFilterInput.js.map +1 -1
  186. package/build/esm/filter-list/inputs/TextTagsFilterInput.js +12 -4
  187. package/build/esm/filter-list/inputs/TextTagsFilterInput.js.map +1 -1
  188. package/build/esm/filter-list/utils/filterValues.js +29 -1
  189. package/build/esm/filter-list/utils/filterValues.js.map +1 -1
  190. package/build/esm/object-table/LoadingCell.module.css +0 -1
  191. package/build/esm/object-table/MultiColumnSortDialog.js +1 -3
  192. package/build/esm/object-table/MultiColumnSortDialog.js.map +1 -1
  193. package/build/esm/object-table/MultiColumnSortDialog.module.css +0 -1
  194. package/build/esm/object-table/TableCell.module.css +1 -1
  195. package/build/esm/object-table/TableHeader.module.css +2 -2
  196. package/build/esm/object-table/TableHeaderWithPopover.js +2 -4
  197. package/build/esm/object-table/TableHeaderWithPopover.js.map +1 -1
  198. package/build/esm/object-table/TableHeaderWithPopover.module.css +1 -0
  199. package/build/esm/pdf-viewer/PdfViewerAnnotationLayer.module.css +0 -1
  200. package/build/esm/public/experimental.js +2 -0
  201. package/build/esm/public/experimental.js.map +1 -1
  202. package/build/types/action-form/ActionFormApi.d.ts +1 -0
  203. package/build/types/action-form/ActionFormApi.d.ts.map +1 -1
  204. package/build/types/action-form/BaseForm.d.ts.map +1 -1
  205. package/build/types/action-form/FormField.d.ts +11 -0
  206. package/build/types/action-form/FormField.d.ts.map +1 -0
  207. package/build/types/action-form/FormFieldApi.d.ts +1 -1
  208. package/build/types/action-form/FormHeader.d.ts +6 -0
  209. package/build/types/action-form/FormHeader.d.ts.map +1 -0
  210. package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -1
  211. package/build/types/action-form/fields/TextInputField.d.ts.map +1 -1
  212. package/build/types/filter-list/FilterInput.d.ts +3 -1
  213. package/build/types/filter-list/FilterInput.d.ts.map +1 -1
  214. package/build/types/filter-list/FilterListApi.d.ts +12 -9
  215. package/build/types/filter-list/FilterListApi.d.ts.map +1 -1
  216. package/build/types/filter-list/base/AddFilterPopover.d.ts +2 -1
  217. package/build/types/filter-list/base/AddFilterPopover.d.ts.map +1 -1
  218. package/build/types/filter-list/base/BaseFilterListApi.d.ts +2 -0
  219. package/build/types/filter-list/base/BaseFilterListApi.d.ts.map +1 -1
  220. package/build/types/filter-list/base/ExcludeDropdown.d.ts +8 -0
  221. package/build/types/filter-list/base/ExcludeDropdown.d.ts.map +1 -0
  222. package/build/types/filter-list/base/FilterIcons.d.ts +0 -2
  223. package/build/types/filter-list/base/FilterIcons.d.ts.map +1 -1
  224. package/build/types/filter-list/base/FilterInputExcludeRow.d.ts +12 -0
  225. package/build/types/filter-list/base/FilterInputExcludeRow.d.ts.map +1 -0
  226. package/build/types/filter-list/base/FilterListItem.d.ts.map +1 -1
  227. package/build/types/filter-list/base/inputs/useStableData.d.ts +1 -0
  228. package/build/types/filter-list/base/inputs/useStableData.d.ts.map +1 -0
  229. package/build/types/filter-list/hooks/usePropertyAggregation.d.ts +2 -2
  230. package/build/types/filter-list/hooks/usePropertyAggregation.d.ts.map +1 -1
  231. package/build/types/filter-list/inputs/CheckboxListFilterInput.d.ts +5 -2
  232. package/build/types/filter-list/inputs/CheckboxListFilterInput.d.ts.map +1 -1
  233. package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts +3 -2
  234. package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts.map +1 -1
  235. package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts +2 -1
  236. package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts.map +1 -1
  237. package/build/types/filter-list/inputs/ListogramFilterInput.d.ts +5 -2
  238. package/build/types/filter-list/inputs/ListogramFilterInput.d.ts.map +1 -1
  239. package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts +4 -2
  240. package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts.map +1 -1
  241. package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts +3 -2
  242. package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts.map +1 -1
  243. package/build/types/filter-list/inputs/PropertyFilterInput.d.ts +3 -1
  244. package/build/types/filter-list/inputs/PropertyFilterInput.d.ts.map +1 -1
  245. package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts +4 -2
  246. package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts.map +1 -1
  247. package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts +4 -2
  248. package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts.map +1 -1
  249. package/build/types/filter-list/utils/filterValues.d.ts +2 -0
  250. package/build/types/filter-list/utils/filterValues.d.ts.map +1 -1
  251. package/build/types/public/experimental.d.ts +4 -0
  252. package/build/types/public/experimental.d.ts.map +1 -1
  253. package/package.json +4 -4
  254. package/build/browser/filter-list/base/inputs/useStaleData.js.map +0 -1
  255. package/build/esm/filter-list/base/inputs/useStaleData.js.map +0 -1
  256. package/build/types/filter-list/base/inputs/useStaleData.d.ts +0 -1
  257. package/build/types/filter-list/base/inputs/useStaleData.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormField.js","names":["React","memo","styles","FormField","fieldKey","label","isRequired","helperText","error","children","createElement","className","osdkFormField","osdkFormFieldLabel","htmlFor","osdkFormFieldRequired","osdkFormFieldError","role","osdkFormFieldHelperText"],"sources":["FormField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo } from \"react\";\nimport styles from \"./FormField.module.css\";\n\ninterface FormFieldProps {\n fieldKey: string;\n label?: string;\n isRequired?: boolean;\n helperText?: string;\n error?: string;\n children: React.ReactNode;\n}\n\nexport const FormField: React.FC<FormFieldProps> = memo(\n function FormFieldFn({\n fieldKey,\n label,\n isRequired,\n helperText,\n error,\n children,\n }: FormFieldProps): React.ReactElement {\n return (\n <div className={styles.osdkFormField}>\n {label != null && (\n <label className={styles.osdkFormFieldLabel} htmlFor={fieldKey}>\n {label}\n {isRequired === true && (\n <span\n className={styles.osdkFormFieldRequired}\n aria-label=\"required\"\n >\n {\" \"}*\n </span>\n )}\n </label>\n )}\n {children}\n {error != null && (\n <div className={styles.osdkFormFieldError} role=\"alert\">\n {error}\n </div>\n )}\n {helperText != null && (\n <div className={styles.osdkFormFieldHelperText}>{helperText}</div>\n )}\n </div>\n );\n },\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,OAAOC,MAAM,MAAM,wBAAwB;AAW3C,OAAO,MAAMC,SAAmC,gBAAGF,IAAI,CACrD,UAAqB;EACnBG,QAAQ;EACRC,KAAK;EACLC,UAAU;EACVC,UAAU;EACVC,KAAK;EACLC;AACc,CAAC,EAAsB;EACrC,oBACET,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,MAAM,CAACU;EAAc,GAClCP,KAAK,IAAI,IAAI,iBACZL,KAAA,CAAAU,aAAA;IAAOC,SAAS,EAAET,MAAM,CAACW,kBAAmB;IAACC,OAAO,EAAEV;EAAS,GAC5DC,KAAK,EACLC,UAAU,KAAK,IAAI,iBAClBN,KAAA,CAAAU,aAAA;IACEC,SAAS,EAAET,MAAM,CAACa,qBAAsB;IACxC,cAAW;EAAU,GAEpB,GAAG,EAAC,GACD,CAEH,CACR,EACAN,QAAQ,EACRD,KAAK,IAAI,IAAI,iBACZR,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,MAAM,CAACc,kBAAmB;IAACC,IAAI,EAAC;EAAO,GACpDT,KACE,CACN,EACAD,UAAU,IAAI,IAAI,iBACjBP,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,MAAM,CAACgB;EAAwB,GAAEX,UAAgB,CAEhE,CAAC;AAEV,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ .osdkFormField {
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: var(--osdk-form-label-field-gap);
21
+ }
22
+
23
+ .osdkFormFieldLabel {
24
+ font-size: var(--osdk-form-label-font-size);
25
+ font-weight: var(--osdk-form-label-font-weight);
26
+ color: var(--osdk-form-label-color);
27
+ }
28
+
29
+ .osdkFormFieldRequired {
30
+ color: var(--osdk-form-required-color);
31
+ }
32
+
33
+ .osdkFormFieldError {
34
+ font-size: var(--osdk-form-error-font-size);
35
+ color: var(--osdk-form-error-color);
36
+ }
37
+
38
+ .osdkFormFieldHelperText {
39
+ font-size: var(--osdk-typography-size-body-small);
40
+ color: var(--osdk-typography-color-muted);
41
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldApi.js","names":[],"sources":["FormFieldApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n CompileTimeMetadata,\n DataValueClientToWire,\n ObjectSet,\n ObjectTypeDefinition,\n} from \"@osdk/api\";\nimport type React from \"react\";\n\n/**\n * A form field definition specifies configuration for a single field\n */\nexport interface FormFieldDefinition<\n Q extends ActionDefinition<unknown>,\n K extends FieldKey<Q> = FieldKey<Q>,\n> {\n /**\n * The field's unique key\n */\n fieldKey: K;\n\n /**\n * Display label for the field\n * If not provided, the form field will not show any label.\n */\n label?: string;\n\n /**\n * Default value of the field\n */\n defaultValue?: FieldValueType<Q, K>;\n\n /**\n * The form field component type to render\n */\n fieldComponent: ValidFormFieldForPropertyType<FieldDescriptorType<Q, K>>;\n\n /**\n * Whether the field is required\n */\n isRequired?: boolean;\n\n /**\n * Placeholder text\n */\n placeholder?: string;\n\n /**\n * Additional information to display on this field\n * The placement of helper text depends on the value of helperTextPlacement prop\n */\n helperText?: string;\n\n /**\n * The placement of the helper text either below the field or in a tooltip\n *\n * @default \"tooltip\"\n */\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n\n /**\n * Whether the field is disabled\n */\n isDisabled?: boolean;\n\n /**\n * A callback to return a custom error message if validation failed\n *\n * @param validationRule the validation rule that failed with the error message\n * @returns the error message to display\n */\n onValidationError?: (error: ValidationError) => string;\n\n /**\n * Additional function to validate the field\n *\n * @param value the current field value\n * @returns a boolean promise indicating whether the value is valid\n */\n validate?: (value: FieldValueType<Q, K>) => Promise<boolean>;\n\n /**\n * The component props for the form field\n * Excludes runtime props (key, onChange) which are managed by ActionForm\n */\n fieldComponentProps?: Omit<\n FormFieldPropsByType[\n ValidFormFieldForPropertyType<\n FieldDescriptorType<Q, K>\n >\n ],\n \"key\" | \"onChange\"\n >;\n}\n\ntype ValidationError = { type: ValidationRule; error: string };\n\ntype ValidationRule =\n | \"required\"\n | \"min\"\n | \"max\"\n | \"minLength\"\n | \"maxLength\"\n | \"pattern\"\n | \"validate\";\n\n/**\n * Maps field types to their corresponding props\n */\nexport interface FormFieldPropsByType {\n DATETIME_PICKER: DatetimePickerFieldProps;\n DROPDOWN: DropdownFieldProps<unknown>;\n FILE_PICKER: FilePickerProps;\n NUMBER_INPUT: NumberInputFieldProps;\n OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;\n RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;\n TEXT_AREA: TextAreaFieldProps;\n TEXT_INPUT: TextInputFieldProps;\n CUSTOM: CustomFieldProps<unknown>;\n}\n\n/**\n * Datetime picker field props\n */\nexport interface DatetimePickerFieldProps extends BaseFormFieldProps<Date> {\n /**\n * The earliest date the user can select\n * If provided, this will be added to the field validation\n */\n min?: Date;\n\n /**\n * The latest date the user can select\n * If provided, this will be added to the field validation\n */\n max?: Date;\n\n /**\n * Whether to show time picker\n */\n showTime?: boolean;\n\n /**\n * Function to format the date string\n */\n formatDate?: (date: Date) => string;\n}\n\n/**\n * Dropdown field props with selectable items\n */\nexport interface DropdownFieldProps<V, Multiple extends boolean = false>\n extends BaseFormFieldProps<Multiple extends true ? V[] : V>\n{\n /**\n * Available items for the dropdown\n */\n items: V[];\n\n /**\n * Converts an item to a display string. Defaults to `String()`.\n */\n itemToStringLabel?: (item: V) => string;\n\n /**\n * Returns a unique string key for a list item. Used as the React `key`.\n * Falls back to the item's index when not provided.\n */\n itemToKey?: (item: V) => string;\n\n /**\n * Custom equality check for item values. Defaults to `Object.is`.\n * Required when items are objects to ensure correct selection matching.\n */\n isItemEqual?: (a: V, b: V) => boolean;\n\n /**\n * Whether the dropdown allows searching/filtering.\n * When true, renders a Combobox with a search input.\n * When false (default), renders a Select dropdown.\n */\n isSearchable?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Whether multiple values can be selected\n */\n isMultiple?: Multiple;\n}\n\nexport interface FilePickerProps extends BaseFormFieldProps<File | File[]> {\n /**\n * Whether multiple files can be selected\n */\n isMulti?: boolean;\n\n /**\n * Accepted file types (e.g., \"image/*\", \".pdf\")\n */\n accept?: string | string[];\n\n /**\n * Maximum file size in bytes\n */\n maxSize?: number;\n}\n\n/**\n * Text area field props\n */\nexport interface TextAreaFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n | \"rows\"\n | \"wrap\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{}\n\nexport interface TextInputFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n placeholder?: string;\n}\n\n/**\n * Number input field props\n */\nexport interface NumberInputFieldProps extends\n BaseFormFieldProps<number>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"min\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"max\"\n | \"step\"\n >\n{}\n\n/**\n * Radio buttons field props\n */\nexport interface RadioButtonsFieldProps<V> extends BaseFormFieldProps<V> {\n /**\n * Available options for radio buttons\n */\n options: Option<V>[];\n}\n\n/**\n * Option interface for radio button options\n */\nexport interface Option<V> {\n label: string;\n value: V;\n}\n\n/**\n * Object set field displays the summary of the count of the given object set\n */\nexport interface ObjectSetFieldProps<T extends ObjectTypeDefinition>\n extends BaseFormFieldProps<ObjectSet<T>>\n{}\n\n/**\n * Custom field props for user-defined renderers\n */\nexport interface CustomFieldProps<V> extends BaseFormFieldProps<V> {\n /**\n * Custom renderer function\n */\n customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;\n}\n\nexport interface BaseFormFieldProps<V> {\n /**\n * The value of the form field\n */\n value: V | null;\n /**\n * Called when the field value changes.\n *\n * ActionForm internally wraps this to pass the key to `onFieldValueChange`:\n * ```\n * <DropdownField\n * {...fieldDef}\n * onChange={(value) => onFieldValueChange(fieldDef.key, value)}\n * />\n * ```\n *\n * @param value The new value of the form field\n */\n onChange?: (value: V | null) => void;\n}\n\nexport type FieldKey<Q extends ActionDefinition<unknown>> =\n keyof ActionParameters<Q>;\n\n/**\n * Extracts parameters from an ActionDefinition\n */\nexport type ActionParameters<Q extends ActionDefinition<unknown>> =\n CompileTimeMetadata<Q>[\"parameters\"];\n\n/**\n * Extracts the value type for a specific parameter\n *\n * TODO: Re-use `BaseType`\n */\nexport type FieldValueType<\n Q extends ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"] extends\n ActionMetadata.DataType.Object<infer T> ? ActionParam.ObjectType<T>\n : ActionParameters<Q>[K][\"type\"] extends ActionMetadata.DataType.ObjectSet<\n infer T\n > ? ActionParam.ObjectSetType<T>\n : ActionParameters<Q>[K][\"type\"] extends ActionMetadata.DataType.Struct<\n infer T\n > ? ActionParam.StructType<T>\n : ActionParameters<Q>[K][\"type\"] extends keyof DataValueClientToWire\n ? DataValueClientToWire[ActionParameters<Q>[K][\"type\"]]\n : never;\n\n/**\n * Extracts the parameter type descriptor for a specific action parameter.\n */\nexport type FieldDescriptorType<\n Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"];\n\n/**\n * Available form field component types\n */\nexport type FieldComponent =\n | \"DATETIME_PICKER\"\n | \"DROPDOWN\"\n | \"FILE_PICKER\"\n | \"NUMBER_INPUT\"\n | \"RADIO_BUTTONS\"\n | \"OBJECT_SET\"\n | \"TEXT_AREA\"\n | \"TEXT_INPUT\"\n | \"CUSTOM\";\n\n/**\n * Describes the data type of a form field, independent of OSDK.\n * Mirrors ActionMetadata.DataType to keep the rendering layer OSDK-agnostic.\n */\nexport type FieldType =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\"\n | { type: \"object\"; object: string }\n | { type: \"objectSet\"; objectSet: string }\n | { type: \"interface\"; interface: string }\n | { type: \"struct\"; struct: Record<string, string> };\n\n/**\n * An OSDK-agnostic field definition used by BaseForm and FormFieldRenderer.\n * Contains only the information needed to render a single field — no generics,\n * no compile-time parameter constraints.\n *\n * Implemented as a distributed mapped type: switching on `fieldComponent`\n * narrows `fieldComponentProps` to the correct props type automatically.\n */\nexport type RendererFieldDefinition = {\n [K in FieldComponent]: {\n fieldKey: string;\n fieldComponent: K;\n fieldType?: FieldType;\n label?: string;\n defaultValue?: unknown;\n isRequired?: boolean;\n placeholder?: string;\n helperText?: string;\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n fieldComponentProps?: Omit<FormFieldPropsByType[K], \"value\" | \"onChange\">;\n };\n}[FieldComponent];\n\n/**\n * Gets valid form field types for a given property type\n */\nexport type ValidFormFieldForPropertyType<P extends FieldDescriptorType> =\n P extends \"objectSet\" ? \"OBJECT_SET\"\n : P extends \"object\" ? \"DROPDOWN\"\n : P extends \"mediaReference\" | \"attachment\" ? \"FILE_PICKER\"\n : P extends \"boolean\" ? \"RADIO_BUTTONS\" | \"DROPDOWN\"\n : P extends \"string\" ? \"TEXT_INPUT\" | \"TEXT_AREA\"\n : P extends \"datetime\" | \"timestamp\" ? \"DATETIME_PICKER\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_INPUT\"\n : never;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FormFieldApi.js","names":[],"sources":["FormFieldApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n CompileTimeMetadata,\n DataValueClientToWire,\n ObjectSet,\n ObjectTypeDefinition,\n} from \"@osdk/api\";\nimport type React from \"react\";\n\n/**\n * A form field definition specifies configuration for a single field\n */\nexport interface FormFieldDefinition<\n Q extends ActionDefinition<unknown>,\n K extends FieldKey<Q> = FieldKey<Q>,\n> {\n /**\n * The field's unique key\n */\n fieldKey: K;\n\n /**\n * Display label for the field\n * If not provided, the form field will not show any label.\n */\n label?: string;\n\n /**\n * Default value of the field\n */\n defaultValue?: FieldValueType<Q, K>;\n\n /**\n * The form field component type to render\n */\n fieldComponent: ValidFormFieldForPropertyType<FieldDescriptorType<Q, K>>;\n\n /**\n * Whether the field is required\n */\n isRequired?: boolean;\n\n /**\n * Placeholder text\n */\n placeholder?: string;\n\n /**\n * Additional information to display on this field\n * The placement of helper text depends on the value of helperTextPlacement prop\n */\n helperText?: string;\n\n /**\n * The placement of the helper text either below the field or in a tooltip\n *\n * @default \"tooltip\"\n */\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n\n /**\n * Whether the field is disabled\n */\n isDisabled?: boolean;\n\n /**\n * A callback to return a custom error message if validation failed\n *\n * @param validationRule the validation rule that failed with the error message\n * @returns the error message to display\n */\n onValidationError?: (error: ValidationError) => string;\n\n /**\n * Additional function to validate the field\n *\n * @param value the current field value\n * @returns a boolean promise indicating whether the value is valid\n */\n validate?: (value: FieldValueType<Q, K>) => Promise<boolean>;\n\n /**\n * The component props for the form field\n * Excludes runtime props (key, onChange) which are managed by ActionForm\n */\n fieldComponentProps?: Omit<\n FormFieldPropsByType[\n ValidFormFieldForPropertyType<\n FieldDescriptorType<Q, K>\n >\n ],\n \"key\" | \"onChange\"\n >;\n}\n\ntype ValidationError = { type: ValidationRule; error: string };\n\ntype ValidationRule =\n | \"required\"\n | \"min\"\n | \"max\"\n | \"minLength\"\n | \"maxLength\"\n | \"pattern\"\n | \"validate\";\n\n/**\n * Maps field types to their corresponding props\n */\nexport interface FormFieldPropsByType {\n DATETIME_PICKER: DatetimePickerFieldProps;\n DROPDOWN: DropdownFieldProps<unknown, boolean>;\n FILE_PICKER: FilePickerProps;\n NUMBER_INPUT: NumberInputFieldProps;\n OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;\n RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;\n TEXT_AREA: TextAreaFieldProps;\n TEXT_INPUT: TextInputFieldProps;\n CUSTOM: CustomFieldProps<unknown>;\n}\n\n/**\n * Datetime picker field props\n */\nexport interface DatetimePickerFieldProps extends BaseFormFieldProps<Date> {\n /**\n * The earliest date the user can select\n * If provided, this will be added to the field validation\n */\n min?: Date;\n\n /**\n * The latest date the user can select\n * If provided, this will be added to the field validation\n */\n max?: Date;\n\n /**\n * Whether to show time picker\n */\n showTime?: boolean;\n\n /**\n * Function to format the date string\n */\n formatDate?: (date: Date) => string;\n}\n\n/**\n * Dropdown field props with selectable items\n */\nexport interface DropdownFieldProps<V, Multiple extends boolean = false>\n extends BaseFormFieldProps<Multiple extends true ? V[] : V>\n{\n /**\n * Available items for the dropdown\n */\n items: V[];\n\n /**\n * Converts an item to a display string. Defaults to `String()`.\n */\n itemToStringLabel?: (item: V) => string;\n\n /**\n * Returns a unique string key for a list item. Used as the React `key`.\n * Falls back to the item's index when not provided.\n */\n itemToKey?: (item: V) => string;\n\n /**\n * Custom equality check for item values. Defaults to `Object.is`.\n * Required when items are objects to ensure correct selection matching.\n */\n isItemEqual?: (a: V, b: V) => boolean;\n\n /**\n * Whether the dropdown allows searching/filtering.\n * When true, renders a Combobox with a search input.\n * When false (default), renders a Select dropdown.\n */\n isSearchable?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Whether multiple values can be selected\n */\n isMultiple?: Multiple;\n}\n\nexport interface FilePickerProps extends BaseFormFieldProps<File | File[]> {\n /**\n * Whether multiple files can be selected\n */\n isMulti?: boolean;\n\n /**\n * Accepted file types (e.g., \"image/*\", \".pdf\")\n */\n accept?: string | string[];\n\n /**\n * Maximum file size in bytes\n */\n maxSize?: number;\n}\n\n/**\n * Text area field props\n */\nexport interface TextAreaFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n | \"rows\"\n | \"wrap\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{}\n\nexport interface TextInputFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n placeholder?: string;\n}\n\n/**\n * Number input field props\n */\nexport interface NumberInputFieldProps extends\n BaseFormFieldProps<number>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"min\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"max\"\n | \"step\"\n >\n{}\n\n/**\n * Radio buttons field props\n */\nexport interface RadioButtonsFieldProps<V> extends BaseFormFieldProps<V> {\n /**\n * Available options for radio buttons\n */\n options: Option<V>[];\n}\n\n/**\n * Option interface for radio button options\n */\nexport interface Option<V> {\n label: string;\n value: V;\n}\n\n/**\n * Object set field displays the summary of the count of the given object set\n */\nexport interface ObjectSetFieldProps<T extends ObjectTypeDefinition>\n extends BaseFormFieldProps<ObjectSet<T>>\n{}\n\n/**\n * Custom field props for user-defined renderers\n */\nexport interface CustomFieldProps<V> extends BaseFormFieldProps<V> {\n /**\n * Custom renderer function\n */\n customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;\n}\n\nexport interface BaseFormFieldProps<V> {\n /**\n * The value of the form field\n */\n value: V | null;\n /**\n * Called when the field value changes.\n *\n * ActionForm internally wraps this to pass the key to `onFieldValueChange`:\n * ```\n * <DropdownField\n * {...fieldDef}\n * onChange={(value) => onFieldValueChange(fieldDef.key, value)}\n * />\n * ```\n *\n * @param value The new value of the form field\n */\n onChange?: (value: V | null) => void;\n}\n\nexport type FieldKey<Q extends ActionDefinition<unknown>> =\n keyof ActionParameters<Q>;\n\n/**\n * Extracts parameters from an ActionDefinition\n */\nexport type ActionParameters<Q extends ActionDefinition<unknown>> =\n CompileTimeMetadata<Q>[\"parameters\"];\n\n/**\n * Extracts the value type for a specific parameter\n *\n * TODO: Re-use `BaseType`\n */\nexport type FieldValueType<\n Q extends ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"] extends\n ActionMetadata.DataType.Object<infer T> ? ActionParam.ObjectType<T>\n : ActionParameters<Q>[K][\"type\"] extends ActionMetadata.DataType.ObjectSet<\n infer T\n > ? ActionParam.ObjectSetType<T>\n : ActionParameters<Q>[K][\"type\"] extends ActionMetadata.DataType.Struct<\n infer T\n > ? ActionParam.StructType<T>\n : ActionParameters<Q>[K][\"type\"] extends keyof DataValueClientToWire\n ? DataValueClientToWire[ActionParameters<Q>[K][\"type\"]]\n : never;\n\n/**\n * Extracts the parameter type descriptor for a specific action parameter.\n */\nexport type FieldDescriptorType<\n Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"];\n\n/**\n * Available form field component types\n */\nexport type FieldComponent =\n | \"DATETIME_PICKER\"\n | \"DROPDOWN\"\n | \"FILE_PICKER\"\n | \"NUMBER_INPUT\"\n | \"RADIO_BUTTONS\"\n | \"OBJECT_SET\"\n | \"TEXT_AREA\"\n | \"TEXT_INPUT\"\n | \"CUSTOM\";\n\n/**\n * Describes the data type of a form field, independent of OSDK.\n * Mirrors ActionMetadata.DataType to keep the rendering layer OSDK-agnostic.\n */\nexport type FieldType =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\"\n | { type: \"object\"; object: string }\n | { type: \"objectSet\"; objectSet: string }\n | { type: \"interface\"; interface: string }\n | { type: \"struct\"; struct: Record<string, string> };\n\n/**\n * An OSDK-agnostic field definition used by BaseForm and FormFieldRenderer.\n * Contains only the information needed to render a single field — no generics,\n * no compile-time parameter constraints.\n *\n * Implemented as a distributed mapped type: switching on `fieldComponent`\n * narrows `fieldComponentProps` to the correct props type automatically.\n */\nexport type RendererFieldDefinition = {\n [K in FieldComponent]: {\n fieldKey: string;\n fieldComponent: K;\n fieldType?: FieldType;\n label?: string;\n defaultValue?: unknown;\n isRequired?: boolean;\n placeholder?: string;\n helperText?: string;\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n fieldComponentProps?: Omit<FormFieldPropsByType[K], \"value\" | \"onChange\">;\n };\n}[FieldComponent];\n\n/**\n * Gets valid form field types for a given property type\n */\nexport type ValidFormFieldForPropertyType<P extends FieldDescriptorType> =\n P extends \"objectSet\" ? \"OBJECT_SET\"\n : P extends \"object\" ? \"DROPDOWN\"\n : P extends \"mediaReference\" | \"attachment\" ? \"FILE_PICKER\"\n : P extends \"boolean\" ? \"RADIO_BUTTONS\" | \"DROPDOWN\"\n : P extends \"string\" ? \"TEXT_INPUT\" | \"TEXT_AREA\"\n : P extends \"datetime\" | \"timestamp\" ? \"DATETIME_PICKER\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_INPUT\"\n : never;\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React, { memo } from "react";
18
+ import styles from "./FormHeader.module.css";
19
+ export const FormHeader = /*#__PURE__*/memo(function ({
20
+ title
21
+ }) {
22
+ return /*#__PURE__*/React.createElement("h2", {
23
+ className: styles.osdkFormHeader
24
+ }, title);
25
+ });
26
+ //# sourceMappingURL=FormHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormHeader.js","names":["React","memo","styles","FormHeader","title","createElement","className","osdkFormHeader"],"sources":["FormHeader.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo } from \"react\";\nimport styles from \"./FormHeader.module.css\";\n\ninterface FormHeaderProps {\n title: string;\n}\n\nexport const FormHeader: React.FC<FormHeaderProps> = memo(\n function FormHeaderFn({ title }: FormHeaderProps): React.ReactElement {\n return (\n <h2 className={styles.osdkFormHeader}>\n {title}\n </h2>\n );\n },\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,OAAOC,MAAM,MAAM,yBAAyB;AAM5C,OAAO,MAAMC,UAAqC,gBAAGF,IAAI,CACvD,UAAsB;EAAEG;AAAuB,CAAC,EAAsB;EACpE,oBACEJ,KAAA,CAAAK,aAAA;IAAIC,SAAS,EAAEJ,MAAM,CAACK;EAAe,GAClCH,KACC,CAAC;AAET,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ .osdkFormHeader {
18
+ margin: 0;
19
+ padding-block: var(--osdk-form-header-block-padding);
20
+ padding-inline: var(--osdk-form-header-inline-padding);
21
+ border-bottom: var(--osdk-surface-border-width) solid
22
+ var(--osdk-form-header-border-color);
23
+ font-size: var(--osdk-form-header-font-size);
24
+ font-weight: var(--osdk-form-header-font-weight);
25
+ color: var(--osdk-form-header-color);
26
+ }
@@ -16,6 +16,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
16
16
  */
17
17
 
18
18
  import React, { memo } from "react";
19
+ import { FormField } from "../FormField.js";
19
20
  import { DropdownField } from "./DropdownField.js";
20
21
  import { TextInputField } from "./TextInputField.js";
21
22
  const EMPTY_ITEMS = [];
@@ -30,11 +31,12 @@ export const FormFieldRenderer = /*#__PURE__*/memo(function ({
30
31
  helperText,
31
32
  helperTextPlacement
32
33
  } = fieldDefinition;
33
- return /*#__PURE__*/React.createElement("div", null, label != null && /*#__PURE__*/React.createElement("label", {
34
- htmlFor: fieldDefinition.fieldKey
35
- }, label, isRequired === true && /*#__PURE__*/React.createElement("span", {
36
- "aria-label": "required"
37
- }, "*")), renderFieldComponent(fieldDefinition, value, onFieldValueChange), helperText != null && helperTextPlacement !== "tooltip" && /*#__PURE__*/React.createElement("div", null, helperText));
34
+ return /*#__PURE__*/React.createElement(FormField, {
35
+ label: label,
36
+ isRequired: isRequired,
37
+ fieldKey: fieldDefinition.fieldKey,
38
+ helperText: helperTextPlacement !== "tooltip" ? helperText : undefined
39
+ }, renderFieldComponent(fieldDefinition, value, onFieldValueChange));
38
40
  });
39
41
  function renderFieldComponent(fieldDefinition, value, onChange) {
40
42
  switch (fieldDefinition.fieldComponent) {
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldRenderer.js","names":["React","memo","DropdownField","TextInputField","EMPTY_ITEMS","FormFieldRenderer","fieldDefinition","value","onFieldValueChange","label","isRequired","helperText","helperTextPlacement","createElement","htmlFor","fieldKey","renderFieldComponent","onChange","fieldComponent","id","String","placeholder","items","dropdownProps","fieldComponentProps","_extends","assertUnreachableFieldComponent","Error"],"sources":["FormFieldRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo } from \"react\";\nimport type { RendererFieldDefinition } from \"../FormFieldApi.js\";\nimport { DropdownField } from \"./DropdownField.js\";\nimport { TextInputField } from \"./TextInputField.js\";\n\nconst EMPTY_ITEMS: unknown[] = [];\n\nexport interface FormFieldRendererProps {\n fieldDefinition: RendererFieldDefinition;\n value: unknown;\n onFieldValueChange: (value: unknown) => void;\n}\n\nexport const FormFieldRenderer: React.FC<FormFieldRendererProps> = memo(\n function FormFieldRendererFn({\n fieldDefinition,\n value,\n onFieldValueChange,\n }: FormFieldRendererProps): React.ReactElement {\n const { label, isRequired, helperText, helperTextPlacement } =\n fieldDefinition;\n\n return (\n <div>\n {label != null && (\n <label htmlFor={fieldDefinition.fieldKey}>\n {label}\n {isRequired === true && <span aria-label=\"required\">*</span>}\n </label>\n )}\n {renderFieldComponent(fieldDefinition, value, onFieldValueChange)}\n {helperText != null && helperTextPlacement !== \"tooltip\" && (\n <div>{helperText}</div>\n )}\n </div>\n );\n },\n);\n\nfunction renderFieldComponent(\n fieldDefinition: RendererFieldDefinition,\n value: unknown,\n onChange: (value: unknown) => void,\n): React.ReactElement {\n switch (fieldDefinition.fieldComponent) {\n case \"TEXT_INPUT\":\n // TODO: Render a <textarea> for TEXT_AREA instead of falling through\n case \"TEXT_AREA\":\n return (\n <TextInputField\n id={fieldDefinition.fieldKey}\n // TODO: Use coerceFieldValue\n value={value != null ? String(value) : \"\"}\n onChange={onChange}\n placeholder={fieldDefinition.placeholder}\n />\n );\n case \"DROPDOWN\": {\n const { items = EMPTY_ITEMS, ...dropdownProps } =\n fieldDefinition.fieldComponentProps ?? {};\n return (\n <DropdownField\n value={value}\n onChange={onChange}\n items={items}\n placeholder={fieldDefinition.placeholder}\n {...dropdownProps}\n />\n );\n }\n case \"NUMBER_INPUT\":\n case \"RADIO_BUTTONS\":\n case \"DATETIME_PICKER\":\n case \"FILE_PICKER\":\n case \"OBJECT_SET\":\n case \"CUSTOM\":\n return (\n <div>\n Unsupported field type: {fieldDefinition.fieldComponent}\n </div>\n );\n default:\n return assertUnreachableFieldComponent(fieldDefinition);\n }\n}\n\nfunction assertUnreachableFieldComponent(value: never): never {\n throw new Error(`Unhandled field component: ${String(value)}`);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AAEnC,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,cAAc,QAAQ,qBAAqB;AAEpD,MAAMC,WAAsB,GAAG,EAAE;AAQjC,OAAO,MAAMC,iBAAmD,gBAAGJ,IAAI,CACrE,UAA6B;EAC3BK,eAAe;EACfC,KAAK;EACLC;AACsB,CAAC,EAAsB;EAC7C,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAoB,CAAC,GAC1DN,eAAe;EAEjB,oBACEN,KAAA,CAAAa,aAAA,cACGJ,KAAK,IAAI,IAAI,iBACZT,KAAA,CAAAa,aAAA;IAAOC,OAAO,EAAER,eAAe,CAACS;EAAS,GACtCN,KAAK,EACLC,UAAU,KAAK,IAAI,iBAAIV,KAAA,CAAAa,aAAA;IAAM,cAAW;EAAU,GAAC,GAAO,CACtD,CACR,EACAG,oBAAoB,CAACV,eAAe,EAAEC,KAAK,EAAEC,kBAAkB,CAAC,EAChEG,UAAU,IAAI,IAAI,IAAIC,mBAAmB,KAAK,SAAS,iBACtDZ,KAAA,CAAAa,aAAA,cAAMF,UAAgB,CAErB,CAAC;AAEV,CACF,CAAC;AAED,SAASK,oBAAoBA,CAC3BV,eAAwC,EACxCC,KAAc,EACdU,QAAkC,EACd;EACpB,QAAQX,eAAe,CAACY,cAAc;IACpC,KAAK,YAAY;IACjB;IACA,KAAK,WAAW;MACd,oBACElB,KAAA,CAAAa,aAAA,CAACV,cAAc;QACbgB,EAAE,EAAEb,eAAe,CAACS;QACpB;QAAA;QACAR,KAAK,EAAEA,KAAK,IAAI,IAAI,GAAGa,MAAM,CAACb,KAAK,CAAC,GAAG,EAAG;QAC1CU,QAAQ,EAAEA,QAAS;QACnBI,WAAW,EAAEf,eAAe,CAACe;MAAY,CAC1C,CAAC;IAEN,KAAK,UAAU;MAAE;QACf,MAAM;UAAEC,KAAK,GAAGlB,WAAW;UAAE,GAAGmB;QAAc,CAAC,GAC7CjB,eAAe,CAACkB,mBAAmB,IAAI,CAAC,CAAC;QAC3C,oBACExB,KAAA,CAAAa,aAAA,CAACX,aAAa,EAAAuB,QAAA;UACZlB,KAAK,EAAEA,KAAM;UACbU,QAAQ,EAAEA,QAAS;UACnBK,KAAK,EAAEA,KAAM;UACbD,WAAW,EAAEf,eAAe,CAACe;QAAY,GACrCE,aAAa,CAClB,CAAC;MAEN;IACA,KAAK,cAAc;IACnB,KAAK,eAAe;IACpB,KAAK,iBAAiB;IACtB,KAAK,aAAa;IAClB,KAAK,YAAY;IACjB,KAAK,QAAQ;MACX,oBACEvB,KAAA,CAAAa,aAAA,cAAK,0BACqB,EAACP,eAAe,CAACY,cACtC,CAAC;IAEV;MACE,OAAOQ,+BAA+B,CAACpB,eAAe,CAAC;EAC3D;AACF;AAEA,SAASoB,+BAA+BA,CAACnB,KAAY,EAAS;EAC5D,MAAM,IAAIoB,KAAK,CAAC,8BAA8BP,MAAM,CAACb,KAAK,CAAC,EAAE,CAAC;AAChE","ignoreList":[]}
1
+ {"version":3,"file":"FormFieldRenderer.js","names":["React","memo","FormField","DropdownField","TextInputField","EMPTY_ITEMS","FormFieldRenderer","fieldDefinition","value","onFieldValueChange","label","isRequired","helperText","helperTextPlacement","createElement","fieldKey","undefined","renderFieldComponent","onChange","fieldComponent","id","String","placeholder","items","dropdownProps","fieldComponentProps","_extends","assertUnreachableFieldComponent","Error"],"sources":["FormFieldRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo } from \"react\";\nimport { FormField } from \"../FormField.js\";\nimport type { RendererFieldDefinition } from \"../FormFieldApi.js\";\nimport { DropdownField } from \"./DropdownField.js\";\nimport { TextInputField } from \"./TextInputField.js\";\n\nconst EMPTY_ITEMS: unknown[] = [];\n\nexport interface FormFieldRendererProps {\n fieldDefinition: RendererFieldDefinition;\n value: unknown;\n onFieldValueChange: (value: unknown) => void;\n}\n\nexport const FormFieldRenderer: React.FC<FormFieldRendererProps> = memo(\n function FormFieldRendererFn({\n fieldDefinition,\n value,\n onFieldValueChange,\n }: FormFieldRendererProps): React.ReactElement {\n const { label, isRequired, helperText, helperTextPlacement } =\n fieldDefinition;\n\n return (\n <FormField\n label={label}\n isRequired={isRequired}\n fieldKey={fieldDefinition.fieldKey}\n helperText={helperTextPlacement !== \"tooltip\" ? helperText : undefined}\n >\n {renderFieldComponent(fieldDefinition, value, onFieldValueChange)}\n </FormField>\n );\n },\n);\n\nfunction renderFieldComponent(\n fieldDefinition: RendererFieldDefinition,\n value: unknown,\n onChange: (value: unknown) => void,\n): React.ReactElement {\n switch (fieldDefinition.fieldComponent) {\n case \"TEXT_INPUT\":\n // TODO: Render a <textarea> for TEXT_AREA instead of falling through\n case \"TEXT_AREA\":\n return (\n <TextInputField\n id={fieldDefinition.fieldKey}\n // TODO: Use coerceFieldValue\n value={value != null ? String(value) : \"\"}\n onChange={onChange}\n placeholder={fieldDefinition.placeholder}\n />\n );\n case \"DROPDOWN\": {\n const { items = EMPTY_ITEMS, ...dropdownProps } =\n fieldDefinition.fieldComponentProps ?? {};\n return (\n <DropdownField\n value={value}\n onChange={onChange}\n items={items}\n placeholder={fieldDefinition.placeholder}\n {...dropdownProps}\n />\n );\n }\n case \"NUMBER_INPUT\":\n case \"RADIO_BUTTONS\":\n case \"DATETIME_PICKER\":\n case \"FILE_PICKER\":\n case \"OBJECT_SET\":\n case \"CUSTOM\":\n return <div>Unsupported field type: {fieldDefinition.fieldComponent}\n </div>;\n default:\n return assertUnreachableFieldComponent(fieldDefinition);\n }\n}\n\nfunction assertUnreachableFieldComponent(value: never): never {\n throw new Error(`Unhandled field component: ${String(value)}`);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,cAAc,QAAQ,qBAAqB;AAEpD,MAAMC,WAAsB,GAAG,EAAE;AAQjC,OAAO,MAAMC,iBAAmD,gBAAGL,IAAI,CACrE,UAA6B;EAC3BM,eAAe;EACfC,KAAK;EACLC;AACsB,CAAC,EAAsB;EAC7C,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAoB,CAAC,GAC1DN,eAAe;EAEjB,oBACEP,KAAA,CAAAc,aAAA,CAACZ,SAAS;IACRQ,KAAK,EAAEA,KAAM;IACbC,UAAU,EAAEA,UAAW;IACvBI,QAAQ,EAAER,eAAe,CAACQ,QAAS;IACnCH,UAAU,EAAEC,mBAAmB,KAAK,SAAS,GAAGD,UAAU,GAAGI;EAAU,GAEtEC,oBAAoB,CAACV,eAAe,EAAEC,KAAK,EAAEC,kBAAkB,CACvD,CAAC;AAEhB,CACF,CAAC;AAED,SAASQ,oBAAoBA,CAC3BV,eAAwC,EACxCC,KAAc,EACdU,QAAkC,EACd;EACpB,QAAQX,eAAe,CAACY,cAAc;IACpC,KAAK,YAAY;IACjB;IACA,KAAK,WAAW;MACd,oBACEnB,KAAA,CAAAc,aAAA,CAACV,cAAc;QACbgB,EAAE,EAAEb,eAAe,CAACQ;QACpB;QAAA;QACAP,KAAK,EAAEA,KAAK,IAAI,IAAI,GAAGa,MAAM,CAACb,KAAK,CAAC,GAAG,EAAG;QAC1CU,QAAQ,EAAEA,QAAS;QACnBI,WAAW,EAAEf,eAAe,CAACe;MAAY,CAC1C,CAAC;IAEN,KAAK,UAAU;MAAE;QACf,MAAM;UAAEC,KAAK,GAAGlB,WAAW;UAAE,GAAGmB;QAAc,CAAC,GAC7CjB,eAAe,CAACkB,mBAAmB,IAAI,CAAC,CAAC;QAC3C,oBACEzB,KAAA,CAAAc,aAAA,CAACX,aAAa,EAAAuB,QAAA;UACZlB,KAAK,EAAEA,KAAM;UACbU,QAAQ,EAAEA,QAAS;UACnBK,KAAK,EAAEA,KAAM;UACbD,WAAW,EAAEf,eAAe,CAACe;QAAY,GACrCE,aAAa,CAClB,CAAC;MAEN;IACA,KAAK,cAAc;IACnB,KAAK,eAAe;IACpB,KAAK,iBAAiB;IACtB,KAAK,aAAa;IAClB,KAAK,YAAY;IACjB,KAAK,QAAQ;MACX,oBAAOxB,KAAA,CAAAc,aAAA,cAAK,0BAAwB,EAACP,eAAe,CAACY,cAChD,CAAC;IACR;MACE,OAAOQ,+BAA+B,CAACpB,eAAe,CAAC;EAC3D;AACF;AAEA,SAASoB,+BAA+BA,CAACnB,KAAY,EAAS;EAC5D,MAAM,IAAIoB,KAAK,CAAC,8BAA8BP,MAAM,CAACb,KAAK,CAAC,EAAE,CAAC;AAChE","ignoreList":[]}
@@ -16,6 +16,7 @@
16
16
 
17
17
  import { Input } from "@base-ui/react/input";
18
18
  import React from "react";
19
+ import styles from "./TextInputField.module.css";
19
20
  export function TextInputField({
20
21
  id,
21
22
  value,
@@ -26,6 +27,7 @@ export function TextInputField({
26
27
  }) {
27
28
  return /*#__PURE__*/React.createElement(Input, {
28
29
  id: id,
30
+ className: styles.osdkTextInput,
29
31
  type: "text",
30
32
  value: value ?? "",
31
33
  onValueChange: onChange,
@@ -1 +1 @@
1
- {"version":3,"file":"TextInputField.js","names":["Input","React","TextInputField","id","value","onChange","placeholder","minLength","maxLength","createElement","type","onValueChange"],"sources":["TextInputField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Input } from \"@base-ui/react/input\";\nimport React from \"react\";\nimport type { TextInputFieldProps } from \"../FormFieldApi.js\";\n\nexport function TextInputField({\n id,\n value,\n onChange,\n placeholder,\n minLength,\n maxLength,\n}: TextInputFieldProps & { id?: string }): React.ReactElement {\n return (\n <Input\n id={id}\n type=\"text\"\n value={value ?? \"\"}\n onValueChange={onChange}\n placeholder={placeholder}\n minLength={minLength}\n maxLength={maxLength}\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,sBAAsB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AAGzB,OAAO,SAASC,cAAcA,CAAC;EAC7BC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,WAAW;EACXC,SAAS;EACTC;AACqC,CAAC,EAAsB;EAC5D,oBACEP,KAAA,CAAAQ,aAAA,CAACT,KAAK;IACJG,EAAE,EAAEA,EAAG;IACPO,IAAI,EAAC,MAAM;IACXN,KAAK,EAAEA,KAAK,IAAI,EAAG;IACnBO,aAAa,EAAEN,QAAS;IACxBC,WAAW,EAAEA,WAAY;IACzBC,SAAS,EAAEA,SAAU;IACrBC,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN","ignoreList":[]}
1
+ {"version":3,"file":"TextInputField.js","names":["Input","React","styles","TextInputField","id","value","onChange","placeholder","minLength","maxLength","createElement","className","osdkTextInput","type","onValueChange"],"sources":["TextInputField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Input } from \"@base-ui/react/input\";\nimport React from \"react\";\nimport type { TextInputFieldProps } from \"../FormFieldApi.js\";\nimport styles from \"./TextInputField.module.css\";\n\nexport function TextInputField({\n id,\n value,\n onChange,\n placeholder,\n minLength,\n maxLength,\n}: TextInputFieldProps & { id?: string }): React.ReactElement {\n return (\n <Input\n id={id}\n className={styles.osdkTextInput}\n type=\"text\"\n value={value ?? \"\"}\n onValueChange={onChange}\n placeholder={placeholder}\n minLength={minLength}\n maxLength={maxLength}\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,sBAAsB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,6BAA6B;AAEhD,OAAO,SAASC,cAAcA,CAAC;EAC7BC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,WAAW;EACXC,SAAS;EACTC;AACqC,CAAC,EAAsB;EAC5D,oBACER,KAAA,CAAAS,aAAA,CAACV,KAAK;IACJI,EAAE,EAAEA,EAAG;IACPO,SAAS,EAAET,MAAM,CAACU,aAAc;IAChCC,IAAI,EAAC,MAAM;IACXR,KAAK,EAAEA,KAAK,IAAI,EAAG;IACnBS,aAAa,EAAER,QAAS;IACxBC,WAAW,EAAEA,WAAY;IACzBC,SAAS,EAAEA,SAAU;IACrBC,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ .osdkTextInput {
18
+ display: block;
19
+ width: 100%;
20
+ min-height: var(--osdk-input-min-height);
21
+ padding: var(--osdk-input-padding);
22
+ border-radius: var(--osdk-input-border-radius);
23
+ border: var(--osdk-input-border-width) solid var(--osdk-input-border-color);
24
+ background-color: var(--osdk-input-bg);
25
+ color: var(--osdk-input-color);
26
+ font-family: var(--osdk-input-font-family);
27
+ font-size: var(--osdk-input-font-size);
28
+ line-height: var(
29
+ --osdk-input-line-height,
30
+ var(--osdk-typography-line-height-default)
31
+ );
32
+ transition:
33
+ background-color var(--osdk-input-transition-duration)
34
+ var(--osdk-input-transition-ease),
35
+ border-color var(--osdk-input-transition-duration)
36
+ var(--osdk-input-transition-ease);
37
+
38
+ &::placeholder {
39
+ color: var(--osdk-input-placeholder-color);
40
+ }
41
+
42
+ &:hover {
43
+ background-color: var(--osdk-input-bg-hover);
44
+ }
45
+
46
+ &:focus-visible {
47
+ outline: var(--osdk-input-focus-width) solid var(--osdk-input-focus-color);
48
+ outline-offset: var(--osdk-input-focus-offset);
49
+ border-color: var(--osdk-input-border-color-focus);
50
+ }
51
+
52
+ &:disabled {
53
+ cursor: not-allowed;
54
+ opacity: var(--osdk-input-disabled-opacity);
55
+ }
56
+ }
@@ -32,9 +32,9 @@ export function Checkbox({
32
32
  }, rest), /*#__PURE__*/React.createElement(BaseUICheckbox.Indicator, _extends({}, indicatorProps, {
33
33
  className: classnames(styles.osdkCheckboxIndicator, indicatorProps?.className)
34
34
  }), indeterminate ? /*#__PURE__*/React.createElement(Minus, {
35
- color: "currentColor"
35
+ size: 16
36
36
  }) : /*#__PURE__*/React.createElement(Tick, {
37
- color: "currentColor"
37
+ size: 16
38
38
  })));
39
39
  }
40
40
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["Checkbox","BaseUICheckbox","Minus","Tick","classnames","React","styles","indeterminate","className","indicatorProps","rest","createElement","Root","_extends","osdkCheckboxRoot","Indicator","osdkCheckboxIndicator","color"],"sources":["Checkbox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Checkbox as BaseUICheckbox,\n type CheckboxIndicatorProps,\n type CheckboxRootProps,\n} from \"@base-ui/react/checkbox\";\nimport { Minus, Tick } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Checkbox.module.css\";\n\ninterface CheckboxProps extends Omit<CheckboxRootProps, \"className\"> {\n className?: string;\n indicatorProps?: Omit<CheckboxIndicatorProps, \"className\"> & {\n className?: string;\n };\n}\n\nexport function Checkbox(\n {\n indeterminate,\n className,\n indicatorProps,\n ...rest\n }: CheckboxProps,\n): React.ReactElement {\n return (\n <BaseUICheckbox.Root\n className={classnames(styles.osdkCheckboxRoot, className)}\n indeterminate={indeterminate}\n {...rest}\n >\n <BaseUICheckbox.Indicator\n {...indicatorProps}\n className={classnames(\n styles.osdkCheckboxIndicator,\n indicatorProps?.className,\n )}\n >\n {/* Color is used as the \"fill\" attribute on the svg */}\n {indeterminate\n ? (\n <Minus\n color={\"currentColor\"}\n />\n )\n : <Tick color={\"currentColor\"} />}\n </BaseUICheckbox.Indicator>\n </BaseUICheckbox.Root>\n );\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,QAAQ,IAAIC,cAAc,QAGrB,yBAAyB;AAChC,SAASC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAChD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,uBAAuB;AAS1C,OAAO,SAASN,QAAQA,CACtB;EACEO,aAAa;EACbC,SAAS;EACTC,cAAc;EACd,GAAGC;AACU,CAAC,EACI;EACpB,oBACEL,KAAA,CAAAM,aAAA,CAACV,cAAc,CAACW,IAAI,EAAAC,QAAA;IAClBL,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACQ,gBAAgB,EAAEN,SAAS,CAAE;IAC1DD,aAAa,EAAEA;EAAc,GACzBG,IAAI,gBAERL,KAAA,CAAAM,aAAA,CAACV,cAAc,CAACc,SAAS,EAAAF,QAAA,KACnBJ,cAAc;IAClBD,SAAS,EAAEJ,UAAU,CACnBE,MAAM,CAACU,qBAAqB,EAC5BP,cAAc,EAAED,SAClB;EAAE,IAGDD,aAAa,gBAEVF,KAAA,CAAAM,aAAA,CAACT,KAAK;IACJe,KAAK,EAAE;EAAe,CACvB,CAAC,gBAEFZ,KAAA,CAAAM,aAAA,CAACR,IAAI;IAACc,KAAK,EAAE;EAAe,CAAE,CACV,CACP,CAAC;AAE1B","ignoreList":[]}
1
+ {"version":3,"file":"Checkbox.js","names":["Checkbox","BaseUICheckbox","Minus","Tick","classnames","React","styles","indeterminate","className","indicatorProps","rest","createElement","Root","_extends","osdkCheckboxRoot","Indicator","osdkCheckboxIndicator","size"],"sources":["Checkbox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Checkbox as BaseUICheckbox,\n type CheckboxIndicatorProps,\n type CheckboxRootProps,\n} from \"@base-ui/react/checkbox\";\nimport { Minus, Tick } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Checkbox.module.css\";\n\ninterface CheckboxProps extends Omit<CheckboxRootProps, \"className\"> {\n className?: string;\n indicatorProps?: Omit<CheckboxIndicatorProps, \"className\"> & {\n className?: string;\n };\n}\n\nexport function Checkbox(\n {\n indeterminate,\n className,\n indicatorProps,\n ...rest\n }: CheckboxProps,\n): React.ReactElement {\n return (\n <BaseUICheckbox.Root\n className={classnames(styles.osdkCheckboxRoot, className)}\n indeterminate={indeterminate}\n {...rest}\n >\n <BaseUICheckbox.Indicator\n {...indicatorProps}\n className={classnames(\n styles.osdkCheckboxIndicator,\n indicatorProps?.className,\n )}\n >\n {/* Color is used as the \"fill\" attribute on the svg */}\n {indeterminate\n ? (\n <Minus\n size={16}\n />\n )\n : <Tick size={16} />}\n </BaseUICheckbox.Indicator>\n </BaseUICheckbox.Root>\n );\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,QAAQ,IAAIC,cAAc,QAGrB,yBAAyB;AAChC,SAASC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAChD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,uBAAuB;AAS1C,OAAO,SAASN,QAAQA,CACtB;EACEO,aAAa;EACbC,SAAS;EACTC,cAAc;EACd,GAAGC;AACU,CAAC,EACI;EACpB,oBACEL,KAAA,CAAAM,aAAA,CAACV,cAAc,CAACW,IAAI,EAAAC,QAAA;IAClBL,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACQ,gBAAgB,EAAEN,SAAS,CAAE;IAC1DD,aAAa,EAAEA;EAAc,GACzBG,IAAI,gBAERL,KAAA,CAAAM,aAAA,CAACV,cAAc,CAACc,SAAS,EAAAF,QAAA,KACnBJ,cAAc;IAClBD,SAAS,EAAEJ,UAAU,CACnBE,MAAM,CAACU,qBAAqB,EAC5BP,cAAc,EAAED,SAClB;EAAE,IAGDD,aAAa,gBAEVF,KAAA,CAAAM,aAAA,CAACT,KAAK;IACJe,IAAI,EAAE;EAAG,CACV,CAAC,gBAEFZ,KAAA,CAAAM,aAAA,CAACR,IAAI;IAACc,IAAI,EAAE;EAAG,CAAE,CACG,CACP,CAAC;AAE1B","ignoreList":[]}
@@ -25,7 +25,6 @@
25
25
  var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2
26
26
  );
27
27
  padding: var(--osdk-checkbox-padding);
28
- box-sizing: border-box;
29
28
  cursor: pointer;
30
29
  border-radius: var(--osdk-surface-border-radius);
31
30
  border: var(--osdk-checkbox-border);
@@ -62,9 +61,6 @@
62
61
  }
63
62
 
64
63
  .osdkCheckboxIndicator {
65
- display: flex;
66
- justify-content: center;
67
- align-items: center;
68
64
  color: var(--osdk-checkbox-checked-foreground);
69
65
  width: var(--osdk-checkbox-icon-size);
70
66
  height: var(--osdk-checkbox-icon-size);
@@ -27,8 +27,7 @@ function ComboboxSearchInput({
27
27
  return /*#__PURE__*/React.createElement("div", {
28
28
  className: classnames(styles.osdkComboboxInputWrapper, className)
29
29
  }, /*#__PURE__*/React.createElement(Search, {
30
- className: styles.osdkComboboxSearchIcon,
31
- color: "currentColor"
30
+ className: styles.osdkComboboxSearchIcon
32
31
  }), /*#__PURE__*/React.createElement(BaseUICombobox.Input, _extends({
33
32
  className: styles.osdkComboboxInput
34
33
  }, rest)));
@@ -95,9 +94,7 @@ function ComboboxChipRemove({
95
94
  return /*#__PURE__*/React.createElement(BaseUICombobox.ChipRemove, _extends({
96
95
  className: classnames(styles.osdkComboboxChipRemove, className),
97
96
  "aria-label": "Remove"
98
- }, rest), /*#__PURE__*/React.createElement(Cross, {
99
- color: "currentColor"
100
- }));
97
+ }, rest), /*#__PURE__*/React.createElement(Cross, null));
101
98
  }
102
99
  function ComboboxClear({
103
100
  className,
@@ -106,9 +103,7 @@ function ComboboxClear({
106
103
  return /*#__PURE__*/React.createElement(BaseUICombobox.Clear, _extends({
107
104
  className: classnames(styles.osdkComboboxClear, className),
108
105
  "aria-label": "Clear all"
109
- }, rest), /*#__PURE__*/React.createElement(Cross, {
110
- color: "currentColor"
111
- }));
106
+ }, rest), /*#__PURE__*/React.createElement(Cross, null));
112
107
  }
113
108
  function ComboboxEmpty({
114
109
  children,
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","names":["Combobox","BaseUICombobox","Cross","Search","classnames","React","styles","ComboboxSearchInput","className","rest","createElement","osdkComboboxInputWrapper","osdkComboboxSearchIcon","color","Input","_extends","osdkComboboxInput","ComboboxInput","ComboboxPositioner","children","Positioner","osdkComboboxPositioner","sideOffset","ComboboxPopup","Popup","osdkComboboxPopup","ComboboxItem","Item","osdkComboboxItem","ComboboxChips","Chips","render","props","ComboboxChip","Chip","osdkComboboxChip","ComboboxChipRemove","ChipRemove","osdkComboboxChipRemove","ComboboxClear","Clear","osdkComboboxClear","ComboboxEmpty","Empty","osdkComboboxEmpty","ComboboxList","List","osdkComboboxList","Root","SearchInput","Portal","Value"],"sources":["Combobox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Combobox as BaseUICombobox,\n type ComboboxChipProps,\n type ComboboxChipRemoveProps,\n type ComboboxClearProps,\n type ComboboxInputProps,\n type ComboboxItemProps,\n type ComboboxListProps,\n type ComboboxPopupProps,\n type ComboboxPositionerProps,\n} from \"@base-ui/react/combobox\";\nimport { Cross, Search } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Combobox.module.css\";\n\ninterface ComboboxInputComponentProps\n extends Omit<ComboboxInputProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxSearchInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <div className={classnames(styles.osdkComboboxInputWrapper, className)}>\n <Search className={styles.osdkComboboxSearchIcon} color=\"currentColor\" />\n <BaseUICombobox.Input className={styles.osdkComboboxInput} {...rest} />\n </div>\n );\n}\n\nfunction ComboboxInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Input\n className={classnames(styles.osdkComboboxInput, className)}\n {...rest}\n />\n );\n}\n\ninterface ComboboxPositionerComponentProps\n extends Omit<ComboboxPositionerProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPositioner({\n className,\n children,\n ...rest\n}: ComboboxPositionerComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Positioner\n className={classnames(styles.osdkComboboxPositioner, className)}\n sideOffset={4}\n {...rest}\n >\n {children}\n </BaseUICombobox.Positioner>\n );\n}\n\ninterface ComboboxPopupComponentProps\n extends Omit<ComboboxPopupProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPopup({\n className,\n children,\n ...rest\n}: ComboboxPopupComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Popup\n className={classnames(styles.osdkComboboxPopup, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Popup>\n );\n}\n\ninterface ComboboxItemComponentProps\n extends Omit<ComboboxItemProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...rest\n}: ComboboxItemComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Item\n className={classnames(styles.osdkComboboxItem, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Item>\n );\n}\n\nfunction ComboboxChips({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Chips\n render={(props) => (\n <div\n {...props}\n className={classnames(styles.osdkComboboxInputWrapper, className)}\n >\n {props.children}\n </div>\n )}\n >\n {children}\n </BaseUICombobox.Chips>\n );\n}\n\ninterface ComboboxChipComponentProps\n extends Omit<ComboboxChipProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChip({\n className,\n children,\n ...rest\n}: ComboboxChipComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Chip\n className={classnames(styles.osdkComboboxChip, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Chip>\n );\n}\n\ninterface ComboboxChipRemoveComponentProps\n extends Omit<ComboboxChipRemoveProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChipRemove({\n className,\n ...rest\n}: ComboboxChipRemoveComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ChipRemove\n className={classnames(styles.osdkComboboxChipRemove, className)}\n aria-label=\"Remove\"\n {...rest}\n >\n <Cross color=\"currentColor\" />\n </BaseUICombobox.ChipRemove>\n );\n}\n\ninterface ComboboxClearComponentProps\n extends Omit<ComboboxClearProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxClear({\n className,\n ...rest\n}: ComboboxClearComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Clear\n className={classnames(styles.osdkComboboxClear, className)}\n aria-label=\"Clear all\"\n {...rest}\n >\n <Cross color=\"currentColor\" />\n </BaseUICombobox.Clear>\n );\n}\n\nfunction ComboboxEmpty({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Empty\n className={classnames(styles.osdkComboboxEmpty, className)}\n >\n {children}\n </BaseUICombobox.Empty>\n );\n}\n\ninterface ComboboxListComponentProps\n extends Omit<ComboboxListProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxList({\n className,\n children,\n ...rest\n}: ComboboxListComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.List\n className={classnames(styles.osdkComboboxList, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.List>\n );\n}\n\nexport const Combobox: {\n Root: typeof BaseUICombobox.Root;\n SearchInput: typeof ComboboxSearchInput;\n Input: typeof ComboboxInput;\n Portal: typeof BaseUICombobox.Portal;\n Positioner: typeof ComboboxPositioner;\n Popup: typeof ComboboxPopup;\n List: typeof ComboboxList;\n Item: typeof ComboboxItem;\n Chips: typeof ComboboxChips;\n Chip: typeof ComboboxChip;\n ChipRemove: typeof ComboboxChipRemove;\n Clear: typeof ComboboxClear;\n Empty: typeof ComboboxEmpty;\n Value: typeof BaseUICombobox.Value;\n} = {\n Root: BaseUICombobox.Root,\n SearchInput: ComboboxSearchInput,\n Input: ComboboxInput,\n Portal: BaseUICombobox.Portal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n Chips: ComboboxChips,\n Chip: ComboboxChip,\n ChipRemove: ComboboxChipRemove,\n Clear: ComboboxClear,\n Empty: ComboboxEmpty,\n Value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+C,IAAI;EACzBC,WAAW,EAAE1C,mBAAmB;EAChCO,KAAK,EAAEG,aAAa;EACpBiC,MAAM,EAAEjD,cAAc,CAACiD,MAAM;EAC7B9B,UAAU,EAAEF,kBAAkB;EAC9BM,KAAK,EAAED,aAAa;EACpBuB,IAAI,EAAED,YAAY;EAClBlB,IAAI,EAAED,YAAY;EAClBI,KAAK,EAAED,aAAa;EACpBK,IAAI,EAAED,YAAY;EAClBI,UAAU,EAAED,kBAAkB;EAC9BI,KAAK,EAAED,aAAa;EACpBI,KAAK,EAAED,aAAa;EACpBS,KAAK,EAAElD,cAAc,CAACkD;AACxB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Combobox.js","names":["Combobox","BaseUICombobox","Cross","Search","classnames","React","styles","ComboboxSearchInput","className","rest","createElement","osdkComboboxInputWrapper","osdkComboboxSearchIcon","Input","_extends","osdkComboboxInput","ComboboxInput","ComboboxPositioner","children","Positioner","osdkComboboxPositioner","sideOffset","ComboboxPopup","Popup","osdkComboboxPopup","ComboboxItem","Item","osdkComboboxItem","ComboboxChips","Chips","render","props","ComboboxChip","Chip","osdkComboboxChip","ComboboxChipRemove","ChipRemove","osdkComboboxChipRemove","ComboboxClear","Clear","osdkComboboxClear","ComboboxEmpty","Empty","osdkComboboxEmpty","ComboboxList","List","osdkComboboxList","Root","SearchInput","Portal","Value"],"sources":["Combobox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Combobox as BaseUICombobox,\n type ComboboxChipProps,\n type ComboboxChipRemoveProps,\n type ComboboxClearProps,\n type ComboboxInputProps,\n type ComboboxItemProps,\n type ComboboxListProps,\n type ComboboxPopupProps,\n type ComboboxPositionerProps,\n} from \"@base-ui/react/combobox\";\nimport { Cross, Search } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Combobox.module.css\";\n\ninterface ComboboxInputComponentProps\n extends Omit<ComboboxInputProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxSearchInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <div className={classnames(styles.osdkComboboxInputWrapper, className)}>\n <Search className={styles.osdkComboboxSearchIcon} />\n <BaseUICombobox.Input className={styles.osdkComboboxInput} {...rest} />\n </div>\n );\n}\n\nfunction ComboboxInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Input\n className={classnames(styles.osdkComboboxInput, className)}\n {...rest}\n />\n );\n}\n\ninterface ComboboxPositionerComponentProps\n extends Omit<ComboboxPositionerProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPositioner({\n className,\n children,\n ...rest\n}: ComboboxPositionerComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Positioner\n className={classnames(styles.osdkComboboxPositioner, className)}\n sideOffset={4}\n {...rest}\n >\n {children}\n </BaseUICombobox.Positioner>\n );\n}\n\ninterface ComboboxPopupComponentProps\n extends Omit<ComboboxPopupProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPopup({\n className,\n children,\n ...rest\n}: ComboboxPopupComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Popup\n className={classnames(styles.osdkComboboxPopup, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Popup>\n );\n}\n\ninterface ComboboxItemComponentProps\n extends Omit<ComboboxItemProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...rest\n}: ComboboxItemComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Item\n className={classnames(styles.osdkComboboxItem, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Item>\n );\n}\n\nfunction ComboboxChips({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Chips\n render={(props) => (\n <div\n {...props}\n className={classnames(styles.osdkComboboxInputWrapper, className)}\n >\n {props.children}\n </div>\n )}\n >\n {children}\n </BaseUICombobox.Chips>\n );\n}\n\ninterface ComboboxChipComponentProps\n extends Omit<ComboboxChipProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChip({\n className,\n children,\n ...rest\n}: ComboboxChipComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Chip\n className={classnames(styles.osdkComboboxChip, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Chip>\n );\n}\n\ninterface ComboboxChipRemoveComponentProps\n extends Omit<ComboboxChipRemoveProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChipRemove({\n className,\n ...rest\n}: ComboboxChipRemoveComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ChipRemove\n className={classnames(styles.osdkComboboxChipRemove, className)}\n aria-label=\"Remove\"\n {...rest}\n >\n <Cross />\n </BaseUICombobox.ChipRemove>\n );\n}\n\ninterface ComboboxClearComponentProps\n extends Omit<ComboboxClearProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxClear({\n className,\n ...rest\n}: ComboboxClearComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Clear\n className={classnames(styles.osdkComboboxClear, className)}\n aria-label=\"Clear all\"\n {...rest}\n >\n <Cross />\n </BaseUICombobox.Clear>\n );\n}\n\nfunction ComboboxEmpty({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Empty\n className={classnames(styles.osdkComboboxEmpty, className)}\n >\n {children}\n </BaseUICombobox.Empty>\n );\n}\n\ninterface ComboboxListComponentProps\n extends Omit<ComboboxListProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxList({\n className,\n children,\n ...rest\n}: ComboboxListComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.List\n className={classnames(styles.osdkComboboxList, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.List>\n );\n}\n\nexport const Combobox: {\n Root: typeof BaseUICombobox.Root;\n SearchInput: typeof ComboboxSearchInput;\n Input: typeof ComboboxInput;\n Portal: typeof BaseUICombobox.Portal;\n Positioner: typeof ComboboxPositioner;\n Popup: typeof ComboboxPopup;\n List: typeof ComboboxList;\n Item: typeof ComboboxItem;\n Chips: typeof ComboboxChips;\n Chip: typeof ComboboxChip;\n ChipRemove: typeof ComboboxChipRemove;\n Clear: typeof ComboboxClear;\n Empty: typeof ComboboxEmpty;\n Value: typeof BaseUICombobox.Value;\n} = {\n Root: BaseUICombobox.Root,\n SearchInput: ComboboxSearchInput,\n Input: ComboboxInput,\n Portal: BaseUICombobox.Portal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n Chips: ComboboxChips,\n Chip: ComboboxChip,\n ChipRemove: ComboboxChipRemove,\n Clear: ComboboxClear,\n Empty: ComboboxEmpty,\n Value: BaseUICombobox.Value,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,QAAQ,IAAIC,cAAc,QASrB,yBAAyB;AAChC,SAASC,KAAK,EAAEC,MAAM,QAAQ,oBAAoB;AAClD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,uBAAuB;AAQ1C,SAASC,mBAAmBA,CAAC;EAC3BC,SAAS;EACT,GAAGC;AACwB,CAAC,EAAsB;EAClD,oBACEJ,KAAA,CAAAK,aAAA;IAAKF,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACK,wBAAwB,EAAEH,SAAS;EAAE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,SAAS,CAAE;IAC3D,cAAW;EAAW,GAClBC,IAAI,gBAERJ,KAAA,CAAAK,aAAA,CAACR,KAAK,MAAE,CACY,CAAC;AAE3B;AAEA,SAASuC,aAAaA,CAAC;EACrBvB,QAAQ;EACRV;AAIF,CAAC,EAAsB;EACrB,oBACEH,KAAA,CAAAK,aAAA,CAACT,cAAc,CAACyC,KAAK;IACnBlC,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACqC,iBAAiB,EAAEnC,SAAS;EAAE,GAE1DU,QACmB,CAAC;AAE3B;AAQA,SAAS0B,YAAYA,CAAC;EACpBpC,SAAS;EACTU,QAAQ;EACR,GAAGT;AACuB,CAAC,EAAsB;EACjD,oBACEJ,KAAA,CAAAK,aAAA,CAACT,cAAc,CAAC4C,IAAI,EAAA/B,QAAA;IAClBN,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACwC,gBAAgB,EAAEtC,SAAS;EAAE,GACtDC,IAAI,GAEPS,QACkB,CAAC;AAE1B;AAEA,OAAO,MAAMlB,QAeZ,GAAG;EACF+C,IAAI,EAAE9C,cAAc,CAAC8C,IAAI;EACzBC,WAAW,EAAEzC,mBAAmB;EAChCM,KAAK,EAAEG,aAAa;EACpBiC,MAAM,EAAEhD,cAAc,CAACgD,MAAM;EAC7B9B,UAAU,EAAEF,kBAAkB;EAC9BM,KAAK,EAAED,aAAa;EACpBuB,IAAI,EAAED,YAAY;EAClBlB,IAAI,EAAED,YAAY;EAClBI,KAAK,EAAED,aAAa;EACpBK,IAAI,EAAED,YAAY;EAClBI,UAAU,EAAED,kBAAkB;EAC9BI,KAAK,EAAED,aAAa;EACpBI,KAAK,EAAED,aAAa;EACpBS,KAAK,EAAEjD,cAAc,CAACiD;AACxB,CAAC","ignoreList":[]}
@@ -23,7 +23,6 @@
23
23
  min-height: var(--osdk-combobox-min-height, 30px);
24
24
  padding: calc(var(--osdk-combobox-spacing, var(--osdk-surface-spacing)) * 1.5)
25
25
  calc(var(--osdk-combobox-spacing, var(--osdk-surface-spacing)) * 2);
26
- box-sizing: border-box;
27
26
  border-radius: var(
28
27
  --osdk-combobox-border-radius,
29
28
  var(--osdk-surface-border-radius)
@@ -65,7 +64,6 @@
65
64
  flex: 1;
66
65
  min-width: 0;
67
66
  width: 100%;
68
- box-sizing: border-box;
69
67
  padding: calc(var(--osdk-combobox-spacing, var(--osdk-surface-spacing)) * 1.5)
70
68
  calc(var(--osdk-combobox-spacing, var(--osdk-surface-spacing)) * 2);
71
69
  border-radius: var(
@@ -150,7 +148,6 @@
150
148
  padding: calc(
151
149
  var(--osdk-combobox-spacing, var(--osdk-surface-spacing)) * 1.5
152
150
  );
153
- box-sizing: border-box;
154
151
  border-radius: var(
155
152
  --osdk-combobox-border-radius,
156
153
  var(--osdk-surface-border-radius)
@@ -56,8 +56,7 @@ function DraggableListItem({
56
56
  className: styles.dragHandle,
57
57
  "aria-label": `Reorder ${item.label}`
58
58
  }, attributes, listeners), /*#__PURE__*/React.createElement(DragHandleVertical, {
59
- className: styles.icon,
60
- color: "currentColor"
59
+ className: styles.icon
61
60
  })), /*#__PURE__*/React.createElement("div", {
62
61
  className: styles.itemContent
63
62
  }, renderContent ? renderContent(item) : item.label), onRemove && /*#__PURE__*/React.createElement(Button, {
@@ -65,8 +64,7 @@ function DraggableListItem({
65
64
  onClick: handleRemove,
66
65
  "aria-label": `Remove ${item.label}`
67
66
  }, /*#__PURE__*/React.createElement(RemoveIcon, {
68
- className: styles.icon,
69
- color: "currentColor"
67
+ className: styles.icon
70
68
  })));
71
69
  }
72
70
  export function DraggableList({
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableList.js","names":["Button","DragHandleVertical","SmallCross","Trash","closestCenter","DndContext","BaseDndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","SortableContext","sortableKeyboardCoordinates","useSortable","verticalListSortingStrategy","CSS","classNames","React","useCallback","useEffect","useMemo","useRef","styles","DraggableListItem","item","onRemove","removeIconVariant","renderContent","attributes","listeners","setNodeRef","transform","transition","isDragging","id","style","Transform","toString","handleRemove","RemoveIcon","createElement","ref","className","draggableItem","_extends","dragHandle","label","icon","color","itemContent","removeButton","onClick","DraggableList","items","onReorder","emptyMessage","itemIds","map","sensors","activationConstraint","distance","coordinateGetter","handleDragEnd","event","active","over","oldIndex","findIndex","newIndex","containerRef","useKeyboardEvents","draggableListContainer","collisionDetection","onDragEnd","strategy","key","length","emptyState","el","current","ARROW_KEYS","Set","handleCapture","has","querySelector","stopPropagation","document","dispatchEvent","KeyboardEvent","code","bubbles","addEventListener","removeEventListener"],"sources":["DraggableList.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button } from \"@base-ui/react/button\";\nimport { DragHandleVertical, SmallCross, Trash } from \"@blueprintjs/icons\";\nimport {\n closestCenter,\n DndContext as BaseDndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport type { RefObject } from \"react\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport styles from \"./DraggableList.module.css\";\n\nexport interface DraggableItem {\n id: string;\n label: string;\n}\n\ntype RemoveIconVariant = \"trash\" | \"cross\";\n\ninterface DraggableListItemProps<T extends DraggableItem> {\n item: T;\n onRemove?: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n}\n\nfunction DraggableListItem<T extends DraggableItem>({\n item,\n onRemove,\n removeIconVariant = \"trash\",\n renderContent,\n}: DraggableListItemProps<T>): React.ReactElement {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: item.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const handleRemove = useCallback(() => {\n onRemove?.(item.id);\n }, [item.id, onRemove]);\n\n const RemoveIcon = removeIconVariant === \"trash\" ? Trash : SmallCross;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={styles.draggableItem}\n data-dragging={isDragging}\n >\n <div\n className={styles.dragHandle}\n aria-label={`Reorder ${item.label}`}\n {...attributes}\n {...listeners}\n >\n <DragHandleVertical className={styles.icon} color={\"currentColor\"} />\n </div>\n <div className={styles.itemContent}>\n {renderContent ? renderContent(item) : item.label}\n </div>\n {onRemove && (\n <Button\n className={styles.removeButton}\n onClick={handleRemove}\n aria-label={`Remove ${item.label}`}\n >\n <RemoveIcon className={styles.icon} color={\"currentColor\"} />\n </Button>\n )}\n </div>\n );\n}\n\nexport interface DraggableListProps<T extends DraggableItem> {\n items: T[];\n onReorder: (fromIndex: number, toIndex: number) => void;\n onRemove: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n emptyMessage?: string;\n className?: string;\n}\n\nexport function DraggableList<T extends DraggableItem>({\n items,\n onReorder,\n onRemove,\n removeIconVariant = \"cross\",\n renderContent,\n emptyMessage,\n className,\n}: DraggableListProps<T>): React.ReactElement {\n const itemIds = useMemo(() => items.map((item) => item.id), [items]);\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (over && active.id !== over.id) {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over.id);\n onReorder(oldIndex, newIndex);\n }\n },\n [items, onReorder],\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n useKeyboardEvents(containerRef);\n\n // TODO: Revert when @types/react is fixed\n const DndContext = BaseDndContext as any;\n\n return (\n <div\n ref={containerRef}\n className={classNames(styles.draggableListContainer, className)}\n >\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={itemIds}\n strategy={verticalListSortingStrategy}\n >\n {items.map((item) => (\n <DraggableListItem<T>\n key={item.id}\n item={item}\n onRemove={onRemove}\n removeIconVariant={removeIconVariant}\n renderContent={renderContent}\n />\n ))}\n </SortableContext>\n </DndContext>\n {items.length === 0 && emptyMessage && (\n <div className={styles.emptyState}>{emptyMessage}</div>\n )}\n </div>\n );\n}\n\nconst useKeyboardEvents = (containerRef: RefObject<HTMLDivElement>) => {\n // Base UI's DialogPopup calls stopPropagation on arrow key events, which\n // prevents them from reaching @dnd-kit's document-level KeyboardSensor\n // listener. We use a native capture-phase listener to intercept arrow keys\n // before the dialog can swallow them, and re-dispatch them on the document\n // so @dnd-kit can process keyboard-driven reordering.\n useEffect(() => {\n const el = containerRef.current;\n if (el == null) {\n return;\n }\n\n const ARROW_KEYS = new Set([\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n ]);\n\n function handleCapture(event: KeyboardEvent) {\n if (!ARROW_KEYS.has(event.key)) {\n return;\n }\n\n // Only intercept when a drag is active (an item has [data-dragging=\"true\"])\n if (el!.querySelector(\"[data-dragging=\\\"true\\\"]\") == null) {\n return;\n }\n\n event.stopPropagation();\n\n document.dispatchEvent(\n new KeyboardEvent(\"keydown\", {\n key: event.key,\n code: event.code,\n bubbles: true,\n }),\n );\n }\n\n el.addEventListener(\"keydown\", handleCapture, true);\n return () => el.removeEventListener(\"keydown\", handleCapture, true);\n }, [contain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,YAAY,CAAC,CAAC;AACpB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"DraggableList.js","names":["Button","DragHandleVertical","SmallCross","Trash","closestCenter","DndContext","BaseDndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","SortableContext","sortableKeyboardCoordinates","useSortable","verticalListSortingStrategy","CSS","classNames","React","useCallback","useEffect","useMemo","useRef","styles","DraggableListItem","item","onRemove","removeIconVariant","renderContent","attributes","listeners","setNodeRef","transform","transition","isDragging","id","style","Transform","toString","handleRemove","RemoveIcon","createElement","ref","className","draggableItem","_extends","dragHandle","label","icon","itemContent","removeButton","onClick","DraggableList","items","onReorder","emptyMessage","itemIds","map","sensors","activationConstraint","distance","coordinateGetter","handleDragEnd","event","active","over","oldIndex","findIndex","newIndex","containerRef","useKeyboardEvents","draggableListContainer","collisionDetection","onDragEnd","strategy","key","length","emptyState","el","current","ARROW_KEYS","Set","handleCapture","has","querySelector","stopPropagation","document","dispatchEvent","KeyboardEvent","code","bubbles","addEventListener","removeEventListener"],"sources":["DraggableList.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button } from \"@base-ui/react/button\";\nimport { DragHandleVertical, SmallCross, Trash } from \"@blueprintjs/icons\";\nimport {\n closestCenter,\n DndContext as BaseDndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport type { RefObject } from \"react\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport styles from \"./DraggableList.module.css\";\n\nexport interface DraggableItem {\n id: string;\n label: string;\n}\n\ntype RemoveIconVariant = \"trash\" | \"cross\";\n\ninterface DraggableListItemProps<T extends DraggableItem> {\n item: T;\n onRemove?: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n}\n\nfunction DraggableListItem<T extends DraggableItem>({\n item,\n onRemove,\n removeIconVariant = \"trash\",\n renderContent,\n}: DraggableListItemProps<T>): React.ReactElement {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: item.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const handleRemove = useCallback(() => {\n onRemove?.(item.id);\n }, [item.id, onRemove]);\n\n const RemoveIcon = removeIconVariant === \"trash\" ? Trash : SmallCross;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={styles.draggableItem}\n data-dragging={isDragging}\n >\n <div\n className={styles.dragHandle}\n aria-label={`Reorder ${item.label}`}\n {...attributes}\n {...listeners}\n >\n <DragHandleVertical className={styles.icon} />\n </div>\n <div className={styles.itemContent}>\n {renderContent ? renderContent(item) : item.label}\n </div>\n {onRemove && (\n <Button\n className={styles.removeButton}\n onClick={handleRemove}\n aria-label={`Remove ${item.label}`}\n >\n <RemoveIcon className={styles.icon} />\n </Button>\n )}\n </div>\n );\n}\n\nexport interface DraggableListProps<T extends DraggableItem> {\n items: T[];\n onReorder: (fromIndex: number, toIndex: number) => void;\n onRemove: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n emptyMessage?: string;\n className?: string;\n}\n\nexport function DraggableList<T extends DraggableItem>({\n items,\n onReorder,\n onRemove,\n removeIconVariant = \"cross\",\n renderContent,\n emptyMessage,\n className,\n}: DraggableListProps<T>): React.ReactElement {\n const itemIds = useMemo(() => items.map((item) => item.id), [items]);\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (over && active.id !== over.id) {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over.id);\n onReorder(oldIndex, newIndex);\n }\n },\n [items, onReorder],\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n useKeyboardEvents(containerRef);\n\n // TODO: Revert when @types/react is fixed\n const DndContext = BaseDndContext as any;\n\n return (\n <div\n ref={containerRef}\n className={classNames(styles.draggableListContainer, className)}\n >\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={itemIds}\n strategy={verticalListSortingStrategy}\n >\n {items.map((item) => (\n <DraggableListItem<T>\n key={item.id}\n item={item}\n onRemove={onRemove}\n removeIconVariant={removeIconVariant}\n renderContent={renderContent}\n />\n ))}\n </SortableContext>\n </DndContext>\n {items.length === 0 && emptyMessage && (\n <div className={styles.emptyState}>{emptyMessage}</div>\n )}\n </div>\n );\n}\n\nconst useKeyboardEvents = (containerRef: RefObject<HTMLDivElement>) => {\n // Base UI's DialogPopup calls stopPropagation on arrow key events, which\n // prevents them from reaching @dnd-kit's document-level KeyboardSensor\n // listener. We use a native capture-phase listener to intercept arrow keys\n // before the dialog can swallow them, and re-dispatch them on the document\n // so @dnd-kit can process keyboard-driven reordering.\n useEffect(() => {\n const el = containerRef.current;\n if (el == null) {\n return;\n }\n\n const ARROW_KEYS = new Set([\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n ]);\n\n function handleCapture(event: KeyboardEvent) {\n if (!ARROW_KEYS.has(event.key)) {\n return;\n }\n\n // Only intercept when a drag is active (an item has [data-dragging=\"true\"])\n if (el!.querySelector(\"[data-dragging=\\\"true\\\"]\") == null) {\n return;\n }\n\n event.stopPropagation();\n\n document.dispatchEvent(\n new KeyboardEvent(\"keydown\", {\n key: event.key,\n code: event.code,\n bubbles: true,\n }),\n );\n }\n\n el.addEventListener(\"keydown\", handleCapture, true);\n return () => el.removeEventListener(\"keydown\", handleCapture, true);\n }, [containerRef]);\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,kBAAkB,EAAEC,UAAU,EAAEC,KAAK,QAAQ,oBAAoB;AAC1E,SACEC,aAAa,EACbC,UAAU,IAAIC,cAAc,EAE5BC,cAAc,EACdC,aAAa,EACbC,SAAS,EACTC,UAAU,QACL,eAAe;AACtB,SACEC,eAAe,EACfC,2BAA2B,EAC3BC,WAAW,EACXC,2BAA2B,QACtB,mBAAmB;AAC1B,SAASC,GAAG,QAAQ,oBAAoB;AACxC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACtE,OAAOC,MAAM,MAAM,4BAA4B;AAgB/C,SAASC,iBAAiBA,CAA0B;EAClDC,IAAI;EACJC,QAAQ;EACRC,iBAAiB,GAAG,OAAO;EAC3BC;AACyB,CAAC,EAAsB;EAChD,MAAM;IACJC,UAAU;IACVC,SAAS;IACTC,UAAU;IACVC,SAAS;IACTC,UAAU;IACVC;EACF,CAAC,GAAGpB,WAAW,CAAC;IAAEqB,EAAE,EAAEV,IAAI,CAACU;EAAG,CAAC,CAAC;EAEhC,MAAMC,KAAK,GAAG;IACZJ,SAAS,EAAEhB,GAAG,CAACqB,SAAS,CAACC,QAAQ,CAACN,SAAS,CAAC;IAC5CC;EACF,CAAC;EAED,MAAMM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AChBC,OAAO,EAAE;MACX,CAAC,CACH,CAAC;IACH;IAEAZ,EAAE,CAACa,gBAAgB,CAAC,SAAS,EAAET,aAAa,EAAE,IAAI,CAAC;IACnD,OAAO,MAAMJ,EAAE,CAACc,mBAAmB,CAAC,SAAS,EAAEV,aAAa,EAAE,IAAI,CAAC;EACrE,CAAC,EAAE,CAACb,YAAY,CAAC,CAAC;AACpB,CAAC","ignoreList":[]}
@@ -17,8 +17,8 @@
17
17
  .searchBar {
18
18
  display: flex;
19
19
  align-items: center;
20
- gap: var(--osdk-surface-spacing);
21
- padding: var(--osdk-surface-spacing) calc(var(--osdk-surface-spacing) * 1.5);
20
+ gap: calc(var(--osdk-surface-spacing) * 3);
21
+ padding: var(--osdk-surface-spacing) calc(var(--osdk-surface-spacing) * 3);
22
22
  border: var(--osdk-surface-border);
23
23
  border-radius: var(--osdk-surface-border-radius);
24
24
 
@@ -42,9 +42,7 @@ function SelectTrigger({
42
42
  className: styles.osdkSelectPlaceholder
43
43
  }, placeholder)), /*#__PURE__*/React.createElement(BaseUISelect.Icon, {
44
44
  className: styles.osdkSelectIcon
45
- }, /*#__PURE__*/React.createElement(CaretDown, {
46
- color: "currentColor"
47
- }))));
45
+ }, /*#__PURE__*/React.createElement(CaretDown, null))));
48
46
  }
49
47
  function SelectValue(props) {
50
48
  const {