@lifesg/react-design-system 1.0.0-alpha.1 → 1.0.0-alpha.3

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 (275) hide show
  1. package/README.md +2 -0
  2. package/{dist/accordion → accordion}/accordion-context.d.ts +0 -0
  3. package/{dist/accordion → accordion}/accordion-item.d.ts +0 -0
  4. package/{dist/accordion → accordion}/accordion-item.style.d.ts +0 -0
  5. package/{dist/accordion → accordion}/accordion.d.ts +0 -0
  6. package/{dist/accordion → accordion}/accordion.style.d.ts +0 -0
  7. package/{dist/accordion → accordion}/index.d.ts +0 -0
  8. package/{dist/accordion → accordion}/index.js +0 -0
  9. package/{dist/accordion → accordion}/index.js.map +0 -0
  10. package/{dist/accordion → accordion}/package.json +0 -0
  11. package/{dist/accordion → accordion}/types.d.ts +0 -0
  12. package/{dist/alert → alert}/alert.d.ts +0 -0
  13. package/{dist/alert → alert}/alert.style.d.ts +0 -0
  14. package/{dist/alert → alert}/index.d.ts +0 -0
  15. package/{dist/alert → alert}/index.js +0 -0
  16. package/{dist/alert → alert}/index.js.map +0 -0
  17. package/{dist/alert → alert}/package.json +0 -0
  18. package/{dist/alert → alert}/types.d.ts +0 -0
  19. package/{dist/animations → animations}/index.d.ts +0 -0
  20. package/{dist/animations → animations}/index.js +0 -0
  21. package/{dist/animations → animations}/index.js.map +0 -0
  22. package/{dist/animations → animations}/loading-dots/loading-dots.d.ts +0 -0
  23. package/{dist/animations → animations}/loading-dots/lottie-animation.d.ts +0 -0
  24. package/{dist/animations → animations}/loading-spinner/loading-spinner.d.ts +0 -0
  25. package/{dist/animations → animations}/loading-spinner/lottie-animation.d.ts +0 -0
  26. package/{dist/animations → animations}/package.json +0 -0
  27. package/{dist/box-container → box-container}/box-container.d.ts +0 -0
  28. package/{dist/box-container → box-container}/box-container.styles.d.ts +0 -0
  29. package/{dist/box-container → box-container}/index.d.ts +0 -0
  30. package/{dist/box-container → box-container}/index.js +0 -0
  31. package/{dist/box-container → box-container}/index.js.map +0 -0
  32. package/{dist/box-container → box-container}/package.json +0 -0
  33. package/{dist/box-container → box-container}/types.d.ts +0 -0
  34. package/{dist/breadcrumb → breadcrumb}/breadcrumb.d.ts +0 -0
  35. package/{dist/breadcrumb → breadcrumb}/breadcrumb.style.d.ts +0 -0
  36. package/{dist/breadcrumb → breadcrumb}/index.d.ts +0 -0
  37. package/{dist/breadcrumb → breadcrumb}/index.js +0 -0
  38. package/{dist/breadcrumb → breadcrumb}/index.js.map +0 -0
  39. package/{dist/breadcrumb → breadcrumb}/package.json +0 -0
  40. package/{dist/breadcrumb → breadcrumb}/types.d.ts +0 -0
  41. package/{dist/button → button}/button.d.ts +0 -0
  42. package/{dist/button → button}/button.style.d.ts +0 -0
  43. package/{dist/button → button}/index.d.ts +0 -0
  44. package/{dist/button → button}/index.js +0 -0
  45. package/{dist/button → button}/index.js.map +0 -0
  46. package/{dist/button → button}/package.json +0 -0
  47. package/{dist/button → button}/types.d.ts +0 -0
  48. package/{dist/checkbox → checkbox}/checkbox.d.ts +0 -0
  49. package/{dist/checkbox → checkbox}/checkbox.style.d.ts +0 -0
  50. package/{dist/checkbox → checkbox}/index.d.ts +0 -0
  51. package/{dist/checkbox → checkbox}/index.js +0 -0
  52. package/{dist/checkbox → checkbox}/index.js.map +0 -0
  53. package/{dist/checkbox → checkbox}/package.json +0 -0
  54. package/{dist/checkbox → checkbox}/types.d.ts +0 -0
  55. package/{dist/cjs → cjs}/index.js +2 -2
  56. package/cjs/index.js.map +1 -0
  57. package/{dist/color → color}/color.d.ts +0 -0
  58. package/{dist/color → color}/index.d.ts +0 -0
  59. package/{dist/color → color}/index.js +0 -0
  60. package/{dist/color → color}/index.js.map +0 -0
  61. package/{dist/color → color}/package.json +0 -0
  62. package/{dist/color → color}/types.d.ts +0 -0
  63. package/{dist/date-input → date-input}/date-input.d.ts +0 -0
  64. package/{dist/date-input → date-input}/date-input.style.d.ts +0 -0
  65. package/{dist/date-input → date-input}/index.d.ts +0 -0
  66. package/{dist/date-input → date-input}/index.js +0 -0
  67. package/{dist/date-input → date-input}/index.js.map +0 -0
  68. package/{dist/date-input → date-input}/package.json +0 -0
  69. package/{dist/date-input → date-input}/types.d.ts +0 -0
  70. package/form/form-custom-field.d.ts +3 -0
  71. package/{dist/form → form}/form-date-input.d.ts +0 -0
  72. package/{dist/form → form}/form-input-group.d.ts +0 -0
  73. package/{dist/form → form}/form-input.d.ts +0 -0
  74. package/{dist/form → form}/form-label-addon.d.ts +0 -0
  75. package/{dist/form → form}/form-label-addon.style.d.ts +0 -0
  76. package/{dist/form → form}/form-label.d.ts +0 -0
  77. package/{dist/form → form}/form-label.style.d.ts +0 -0
  78. package/{dist/form → form}/form-multi-select.d.ts +0 -0
  79. package/{dist/form → form}/form-select.d.ts +0 -0
  80. package/{dist/form → form}/form-textarea.d.ts +0 -0
  81. package/{dist/form → form}/form-textarea.style.d.ts +0 -0
  82. package/{dist/form → form}/form-timepicker.d.ts +0 -0
  83. package/{dist/form → form}/form-wrapper.d.ts +0 -0
  84. package/{dist/form → form}/form-wrapper.style.d.ts +0 -0
  85. package/{dist/form → form}/index.d.ts +1 -0
  86. package/{dist/form → form}/index.js +424 -424
  87. package/form/index.js.map +1 -0
  88. package/{dist/form → form}/package.json +0 -0
  89. package/{dist/form → form}/types.d.ts +2 -0
  90. package/{dist/icon → icon}/arrow-right-icon.d.ts +0 -0
  91. package/{dist/icon → icon}/icon.d.ts +0 -0
  92. package/{dist/icon → icon}/index.d.ts +0 -0
  93. package/{dist/icon → icon}/index.js +0 -0
  94. package/{dist/icon → icon}/index.js.map +0 -0
  95. package/{dist/icon → icon}/info-icon.d.ts +0 -0
  96. package/{dist/icon → icon}/package.json +0 -0
  97. package/{dist/icon → icon}/play-alt-icon.d.ts +0 -0
  98. package/{dist/icon → icon}/search-icon.d.ts +0 -0
  99. package/{dist/icon → icon}/shared.style.d.ts +0 -0
  100. package/{dist/icon → icon}/types.d.ts +0 -0
  101. package/{dist/icon-button → icon-button}/icon-button.d.ts +0 -0
  102. package/{dist/icon-button → icon-button}/icon-button.style.d.ts +0 -0
  103. package/{dist/icon-button → icon-button}/index.d.ts +0 -0
  104. package/{dist/icon-button → icon-button}/index.js +0 -0
  105. package/{dist/icon-button → icon-button}/index.js.map +0 -0
  106. package/{dist/icon-button → icon-button}/package.json +0 -0
  107. package/{dist/icon-button → icon-button}/types.d.ts +0 -0
  108. package/{dist/index.d.ts → index.d.ts} +0 -0
  109. package/{dist/index.js → index.js} +2 -2
  110. package/index.js.map +1 -0
  111. package/{dist/input → input}/index.d.ts +0 -0
  112. package/{dist/input → input}/index.js +0 -0
  113. package/{dist/input → input}/index.js.map +0 -0
  114. package/{dist/input → input}/input.d.ts +0 -0
  115. package/{dist/input → input}/input.style.d.ts +0 -0
  116. package/{dist/input → input}/package.json +0 -0
  117. package/{dist/input → input}/types.d.ts +0 -0
  118. package/{dist/input-group → input-group}/index.d.ts +0 -0
  119. package/{dist/input-group → input-group}/index.js +0 -0
  120. package/{dist/input-group → input-group}/index.js.map +0 -0
  121. package/{dist/input-group → input-group}/input-group-list-addon.d.ts +0 -0
  122. package/{dist/input-group → input-group}/input-group-list-addon.style.d.ts +0 -0
  123. package/{dist/input-group → input-group}/input-group.d.ts +0 -0
  124. package/{dist/input-group → input-group}/input-group.style.d.ts +0 -0
  125. package/{dist/input-group → input-group}/package.json +0 -0
  126. package/{dist/input-group → input-group}/types.d.ts +0 -0
  127. package/{dist/input-select → input-select}/index.d.ts +0 -0
  128. package/{dist/input-select → input-select}/index.js +0 -0
  129. package/{dist/input-select → input-select}/index.js.map +0 -0
  130. package/{dist/input-select → input-select}/input-multi-select.d.ts +0 -0
  131. package/{dist/input-select → input-select}/input-select-wrapper.d.ts +0 -0
  132. package/{dist/input-select → input-select}/input-select.d.ts +0 -0
  133. package/{dist/input-select → input-select}/input-select.styles.d.ts +0 -0
  134. package/{dist/input-select → input-select}/package.json +0 -0
  135. package/{dist/input-select → input-select}/types.d.ts +0 -0
  136. package/{dist/input-textarea → input-textarea}/index.d.ts +0 -0
  137. package/{dist/input-textarea → input-textarea}/index.js +0 -0
  138. package/{dist/input-textarea → input-textarea}/index.js.map +0 -0
  139. package/{dist/input-textarea → input-textarea}/package.json +0 -0
  140. package/{dist/input-textarea → input-textarea}/textara-counter.style.d.ts +0 -0
  141. package/{dist/input-textarea → input-textarea}/textarea-counter.d.ts +0 -0
  142. package/{dist/input-textarea → input-textarea}/textarea.d.ts +0 -0
  143. package/{dist/input-textarea → input-textarea}/textarea.style.d.ts +0 -0
  144. package/{dist/input-textarea → input-textarea}/types.d.ts +0 -0
  145. package/{dist/link-list → link-list}/index.d.ts +0 -0
  146. package/{dist/link-list → link-list}/index.js +0 -0
  147. package/{dist/link-list → link-list}/index.js.map +0 -0
  148. package/{dist/link-list → link-list}/link-list.d.ts +0 -0
  149. package/{dist/link-list → link-list}/link-list.styles.d.ts +0 -0
  150. package/{dist/link-list → link-list}/package.json +0 -0
  151. package/{dist/link-list → link-list}/types.d.ts +0 -0
  152. package/{dist/masonry → masonry}/index.d.ts +0 -0
  153. package/{dist/masonry → masonry}/index.js +0 -0
  154. package/{dist/masonry → masonry}/index.js.map +0 -0
  155. package/{dist/masonry → masonry}/masonry.d.ts +0 -0
  156. package/{dist/masonry → masonry}/masonry.style.d.ts +0 -0
  157. package/{dist/masonry → masonry}/package.json +0 -0
  158. package/{dist/masonry → masonry}/types.d.ts +0 -0
  159. package/{dist/media → media}/index.d.ts +0 -0
  160. package/{dist/media → media}/index.js +0 -0
  161. package/{dist/media → media}/index.js.map +0 -0
  162. package/{dist/media → media}/media.d.ts +0 -0
  163. package/{dist/media → media}/package.json +0 -0
  164. package/{dist/media → media}/types.d.ts +0 -0
  165. package/{dist/modal → modal}/index.d.ts +0 -0
  166. package/{dist/modal → modal}/index.js +0 -0
  167. package/{dist/modal → modal}/index.js.map +0 -0
  168. package/{dist/modal → modal}/modal-box.d.ts +0 -0
  169. package/{dist/modal → modal}/modal-box.styles.d.ts +0 -0
  170. package/{dist/modal → modal}/modal.d.ts +0 -0
  171. package/{dist/modal → modal}/modal.styles.d.ts +0 -0
  172. package/{dist/modal → modal}/package.json +0 -0
  173. package/{dist/modal → modal}/types.d.ts +0 -0
  174. package/{dist/overlay → overlay}/index.d.ts +0 -0
  175. package/{dist/overlay → overlay}/index.js +0 -0
  176. package/{dist/overlay → overlay}/index.js.map +0 -0
  177. package/{dist/overlay → overlay}/overlay.d.ts +0 -0
  178. package/{dist/overlay → overlay}/overlay.styles.d.ts +0 -0
  179. package/{dist/overlay → overlay}/package.json +0 -0
  180. package/{dist/overlay → overlay}/types.d.ts +0 -0
  181. package/package.json +31 -105
  182. package/{dist/popover → popover}/index.d.ts +0 -0
  183. package/{dist/popover → popover}/index.js +0 -0
  184. package/{dist/popover → popover}/index.js.map +0 -0
  185. package/{dist/popover → popover}/package.json +0 -0
  186. package/{dist/popover → popover}/popover-hoc.d.ts +0 -0
  187. package/{dist/popover → popover}/popover.d.ts +0 -0
  188. package/{dist/popover → popover}/popover.styles.d.ts +0 -0
  189. package/{dist/popover → popover}/types.d.ts +0 -0
  190. package/{dist/radio-button → radio-button}/index.d.ts +0 -0
  191. package/{dist/radio-button → radio-button}/index.js +0 -0
  192. package/{dist/radio-button → radio-button}/index.js.map +0 -0
  193. package/{dist/radio-button → radio-button}/package.json +0 -0
  194. package/{dist/radio-button → radio-button}/radio-button.d.ts +0 -0
  195. package/{dist/radio-button → radio-button}/radio-button.styles.d.ts +0 -0
  196. package/{dist/radio-button → radio-button}/types.d.ts +0 -0
  197. package/{dist/shared → shared}/component-loading-spinner/component-loading-spinner.d.ts +0 -0
  198. package/{dist/shared → shared}/component-loading-spinner/component-loading-spinner.style.d.ts +0 -0
  199. package/{dist/shared → shared}/dropdown-list/dropdown-list.d.ts +0 -0
  200. package/{dist/shared → shared}/dropdown-list/dropdown-list.styles.d.ts +0 -0
  201. package/{dist/shared → shared}/dropdown-list/dropdown-search.d.ts +0 -0
  202. package/{dist/shared → shared}/dropdown-list/dropdown-search.styles.d.ts +0 -0
  203. package/{dist/shared → shared}/dropdown-list/types.d.ts +0 -0
  204. package/{dist/spec → spec}/color-spec/base-color-set.d.ts +0 -0
  205. package/{dist/spec → spec}/color-spec/bookingsg-color-set.d.ts +0 -0
  206. package/{dist/spec → spec}/media-spec.d.ts +0 -0
  207. package/{dist/spec → spec}/text-spec/base-text-style-set.d.ts +0 -0
  208. package/{dist/spec → spec}/text-spec/font-spec.d.ts +0 -0
  209. package/{dist/text → text}/helper.d.ts +0 -0
  210. package/{dist/text → text}/index.d.ts +0 -0
  211. package/{dist/text → text}/index.js +0 -0
  212. package/{dist/text → text}/index.js.map +0 -0
  213. package/{dist/text → text}/package.json +0 -0
  214. package/{dist/text → text}/text-style.d.ts +0 -0
  215. package/{dist/text → text}/text.d.ts +0 -0
  216. package/{dist/text → text}/types.d.ts +0 -0
  217. package/{dist/text-list → text-list}/index.d.ts +0 -0
  218. package/{dist/text-list → text-list}/index.js +0 -0
  219. package/{dist/text-list → text-list}/index.js.map +0 -0
  220. package/{dist/text-list → text-list}/ordered-list.d.ts +0 -0
  221. package/{dist/text-list → text-list}/package.json +0 -0
  222. package/{dist/text-list → text-list}/text-list.styles.d.ts +0 -0
  223. package/{dist/text-list → text-list}/types.d.ts +0 -0
  224. package/{dist/text-list → text-list}/unordered-list.d.ts +0 -0
  225. package/{dist/theme → theme}/color-theme-helper.d.ts +0 -0
  226. package/{dist/theme → theme}/helper.d.ts +0 -0
  227. package/{dist/theme → theme}/index.d.ts +0 -0
  228. package/{dist/theme → theme}/index.js +0 -0
  229. package/{dist/theme → theme}/index.js.map +0 -0
  230. package/{dist/theme → theme}/package.json +0 -0
  231. package/{dist/theme → theme}/text-theme-helper.d.ts +0 -0
  232. package/{dist/theme → theme}/types.d.ts +0 -0
  233. package/{dist/timeline → timeline}/index.d.ts +0 -0
  234. package/{dist/timeline → timeline}/index.js +0 -0
  235. package/{dist/timeline → timeline}/index.js.map +0 -0
  236. package/{dist/timeline → timeline}/package.json +0 -0
  237. package/{dist/timeline → timeline}/timeline.d.ts +0 -0
  238. package/{dist/timeline → timeline}/timeline.style.d.ts +0 -0
  239. package/{dist/timeline → timeline}/types.d.ts +0 -0
  240. package/{dist/timepicker → timepicker}/helper.d.ts +0 -0
  241. package/{dist/timepicker → timepicker}/index.d.ts +0 -0
  242. package/{dist/timepicker → timepicker}/index.js +0 -0
  243. package/{dist/timepicker → timepicker}/index.js.map +0 -0
  244. package/{dist/timepicker → timepicker}/package.json +0 -0
  245. package/{dist/timepicker → timepicker}/timepicker-dropdown.d.ts +0 -0
  246. package/{dist/timepicker → timepicker}/timepicker-dropdown.styles.d.ts +0 -0
  247. package/{dist/timepicker → timepicker}/timepicker.d.ts +0 -0
  248. package/{dist/timepicker → timepicker}/timepicker.styles.d.ts +0 -0
  249. package/{dist/timepicker → timepicker}/types.d.ts +0 -0
  250. package/{dist/toggle-button → toggle-button}/index.d.ts +0 -0
  251. package/{dist/toggle-button → toggle-button}/index.js +0 -0
  252. package/{dist/toggle-button → toggle-button}/index.js.map +0 -0
  253. package/{dist/toggle-button → toggle-button}/package.json +0 -0
  254. package/{dist/toggle-button → toggle-button}/toggle-button.d.ts +0 -0
  255. package/{dist/toggle-button → toggle-button}/toggle-button.styles.d.ts +0 -0
  256. package/{dist/toggle-button → toggle-button}/types.d.ts +0 -0
  257. package/{dist/tooltip → tooltip}/index.d.ts +0 -0
  258. package/{dist/tooltip → tooltip}/index.js +0 -0
  259. package/{dist/tooltip → tooltip}/index.js.map +0 -0
  260. package/{dist/tooltip → tooltip}/package.json +0 -0
  261. package/{dist/tooltip → tooltip}/tooltip-hoc.d.ts +0 -0
  262. package/{dist/tooltip → tooltip}/tooltip.d.ts +0 -0
  263. package/{dist/tooltip → tooltip}/tooltip.styles.d.ts +0 -0
  264. package/{dist/tooltip → tooltip}/types.d.ts +0 -0
  265. package/{dist/transition → transition}/index.d.ts +0 -0
  266. package/{dist/transition → transition}/index.js +0 -0
  267. package/{dist/transition → transition}/index.js.map +0 -0
  268. package/{dist/transition → transition}/package.json +0 -0
  269. package/{dist/util → util}/string-helper.d.ts +0 -0
  270. package/CONTRIBUTING.md +0 -175
  271. package/dist/README.md +0 -68
  272. package/dist/cjs/index.js.map +0 -1
  273. package/dist/form/index.js.map +0 -1
  274. package/dist/index.js.map +0 -1
  275. package/dist/package.json +0 -35
File without changes
@@ -39,6 +39,8 @@ export interface FormInputGroupProps<T, V> extends InputGroupPartialProps<T, V>,
39
39
  }
40
40
  export interface FormTextareaProps extends TextareaPartialProps, BaseFormElementProps {
41
41
  }
42
+ export interface FormCustomFieldProps extends FormWrapperProps, BaseFormElementProps {
43
+ }
42
44
  export interface FormInputSelectProps<T, V> extends InputSelectPartialProps<T, V>, BaseFormElementProps {
43
45
  }
44
46
  export interface FormMultiSelectProps<T, V> extends InputMultiSelectPartialProps<T, V>, BaseFormElementProps {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -941,7 +941,7 @@ var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.pr
941
941
  &:not(:last-child) {
942
942
  margin-bottom: 1rem;
943
943
  }
944
- `,FormWrapper=({label:e,errorMessage:t,id:r,disabled:a,children:i,"data-error-testid":n})=>jsxs(Container$7,{children:[e&&jsx(FormLabel,"string"==typeof e?{htmlFor:`${r}-base`,"data-testid":r?`${r}-label`:"form-label",disabled:a,children:e}:{htmlFor:`${r}-base`,"data-testid":r?`${r}-label`:"form-label",disabled:a,...e}),i,t&&jsx(ErrorMessage,{weight:"semibold","data-testid":n||(r?`${r}-error-message`:"error-message"),children:t})]}),FormDateInput=({label:e,errorMessage:t,id:r="form-date-input","data-error-testid":a,"data-testid":i,...n})=>jsx(FormWrapper,{id:r,label:e,errorMessage:t,"data-error-testid":a,disabled:n.disabled,children:jsx(DateInput,{id:`${r}-base`,"data-testid":i||r,error:!!t,...n})}),InputElement=styled.input`
944
+ `,FormWrapper=({label:e,errorMessage:t,id:r,disabled:a,children:i,"data-error-testid":n})=>jsxs(Container$7,{children:[e&&jsx(FormLabel,"string"==typeof e?{htmlFor:`${r}-base`,"data-testid":r?`${r}-label`:"form-label",disabled:a,children:e}:{htmlFor:`${r}-base`,"data-testid":r?`${r}-label`:"form-label",disabled:a,...e}),i,t&&jsx(ErrorMessage,{weight:"semibold","data-testid":n||(r?`${r}-error-message`:"error-message"),children:t})]}),FormCustomField=({id:e="form-custom-field","data-error-testid":t,children:r,...a})=>jsx(FormWrapper,{id:e,"data-error-testid":t,...a,children:r}),FormDateInput=({label:e,errorMessage:t,id:r="form-date-input","data-error-testid":a,"data-testid":i,...n})=>jsx(FormWrapper,{id:r,label:e,errorMessage:t,"data-error-testid":a,disabled:n.disabled,children:jsx(DateInput,{id:`${r}-base`,"data-testid":i||r,error:!!t,...n})}),InputElement=styled.input`
945
945
  ${TextStyleHelper.getTextStyle("Body","regular")}
946
946
  border: 1px solid ${Color.Neutral[5]};
947
947
  border-radius: 4px;
@@ -1704,7 +1704,7 @@ var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.pr
1704
1704
  border: 1px solid ${Color.Accent.Light[1]};
1705
1705
  box-shadow: inset 0 0 5px 1px rgba(87, 169, 255, 0.5);
1706
1706
  `:void 0}
1707
- `,Timepicker=({id:e,disabled:t=!1,error:r,value:a,defaultValue:i,placeholder:n,format:s="24hr",onChange:o,onBlur:l,onSelectionCancel:h,...p})=>{const[c,d]=useState(!1),u=useRef();useEffect((()=>(document.addEventListener("mousedown",f),document.addEventListener("keyup",y),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keyup",y)})),[c]);const m=useCallback((()=>{t||c||d(!0)}),[c]),f=e=>{t||g(e)},y=e=>{if("Tab"===e.code)g(e)},g=e=>{u&&!u.current.contains(e.target)&&c&&(d(!1),l&&l())},v=useCallback((()=>"12hr"===s?"HH:MMam":"HH:MM"),[s,n]);return jsxs(Wrapper,{ref:u,id:e,...p,children:[jsx(InputSelectorElement,{onFocus:m,focused:c,readOnly:!0,placeholder:n||v(),value:TimepickerHelper.formatValue(a,s),defaultValue:i,disabled:t,error:r,"data-testid":e?`${e}-timepicker-selector`:"timepicker-selector"}),jsx(TimepickerDropdown,{id:e,show:c,value:a||i,format:s,onCancel:()=>{d(!1),h&&h()},onChange:e=>{d(!1),o&&o(e)}})]})},FormTimepicker=({label:e,errorMessage:t,id:r="form-timepicker","data-error-testid":a,"data-testid":i,...n})=>jsx(FormWrapper,{id:r,label:e,errorMessage:t,disabled:n.disabled,"data-error-testid":a,children:jsx(Timepicker,{id:`${r}-base`,"data-testid":i||r,error:!!t,...n})}),Form={DateInput:FormDateInput,Input:FormInput,InputGroup:FormInputGroup,Label:FormLabel,MultiSelect:FormMultiSelect,Select:FormSelect,Textarea:FormTextarea,Timepicker:FormTimepicker},Container$1=styled.div`
1707
+ `,Timepicker=({id:e,disabled:t=!1,error:r,value:a,defaultValue:i,placeholder:n,format:s="24hr",onChange:o,onBlur:l,onSelectionCancel:h,...p})=>{const[c,d]=useState(!1),u=useRef();useEffect((()=>(document.addEventListener("mousedown",f),document.addEventListener("keyup",y),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keyup",y)})),[c]);const m=useCallback((()=>{t||c||d(!0)}),[c]),f=e=>{t||g(e)},y=e=>{if("Tab"===e.code)g(e)},g=e=>{u&&!u.current.contains(e.target)&&c&&(d(!1),l&&l())},v=useCallback((()=>"12hr"===s?"HH:MMam":"HH:MM"),[s,n]);return jsxs(Wrapper,{ref:u,id:e,...p,children:[jsx(InputSelectorElement,{onFocus:m,focused:c,readOnly:!0,placeholder:n||v(),value:TimepickerHelper.formatValue(a,s),defaultValue:i,disabled:t,error:r,"data-testid":e?`${e}-timepicker-selector`:"timepicker-selector"}),jsx(TimepickerDropdown,{id:e,show:c,value:a||i,format:s,onCancel:()=>{d(!1),h&&h()},onChange:e=>{d(!1),o&&o(e)}})]})},FormTimepicker=({label:e,errorMessage:t,id:r="form-timepicker","data-error-testid":a,"data-testid":i,...n})=>jsx(FormWrapper,{id:r,label:e,errorMessage:t,disabled:n.disabled,"data-error-testid":a,children:jsx(Timepicker,{id:`${r}-base`,"data-testid":i||r,error:!!t,...n})}),Form={DateInput:FormDateInput,Input:FormInput,InputGroup:FormInputGroup,Label:FormLabel,MultiSelect:FormMultiSelect,Select:FormSelect,Textarea:FormTextarea,Timepicker:FormTimepicker,CustomField:FormCustomField},Container$1=styled.div`
1708
1708
  border-top: 1px solid ${Color.Neutral[5]};
1709
1709
  border-bottom: 1px solid ${Color.Neutral[5]};
1710
1710
  `,ItemTitleDefault=styled(Text.H3)`