@tcn/ui 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/dist/feedback/index.d.ts +1 -0
  2. package/dist/feedback/index.d.ts.map +1 -1
  3. package/dist/feedback/index.js +6 -4
  4. package/dist/feedback/index.js.map +1 -1
  5. package/dist/feedback/progress/progress.d.ts +7 -0
  6. package/dist/feedback/progress/progress.d.ts.map +1 -0
  7. package/dist/feedback/progress/progress.js +38 -0
  8. package/dist/feedback/progress/progress.js.map +1 -0
  9. package/dist/feedback/progress/progress_bar.d.ts +0 -1
  10. package/dist/feedback/progress/progress_bar.d.ts.map +1 -1
  11. package/dist/feedback/progress/progress_bar.js +6 -46
  12. package/dist/feedback/progress/progress_bar.js.map +1 -1
  13. package/dist/form/field/common/status_input/status_input.js +4 -3
  14. package/dist/form/field/common/status_input/status_input.js.map +1 -1
  15. package/dist/form/field/h_field/h_field.d.ts.map +1 -1
  16. package/dist/form/field/h_field/h_field.js +33 -35
  17. package/dist/form/field/h_field/h_field.js.map +1 -1
  18. package/dist/form/field/v_field/v_field.d.ts.map +1 -1
  19. package/dist/form/field/v_field/v_field.js +34 -36
  20. package/dist/form/field/v_field/v_field.js.map +1 -1
  21. package/dist/frame.css +1 -1
  22. package/dist/inputs/color_input/color_input.d.ts.map +1 -1
  23. package/dist/inputs/color_input/color_input.js +47 -46
  24. package/dist/inputs/color_input/color_input.js.map +1 -1
  25. package/dist/inputs/combo_box/combo_box.d.ts.map +1 -1
  26. package/dist/inputs/combo_box/combo_box.js +61 -58
  27. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  28. package/dist/inputs/index.d.ts +1 -0
  29. package/dist/inputs/index.d.ts.map +1 -1
  30. package/dist/inputs/index.js +34 -31
  31. package/dist/inputs/index.js.map +1 -1
  32. package/dist/inputs/input/input.js +9 -9
  33. package/dist/inputs/input/input.js.map +1 -1
  34. package/dist/inputs/input_group/input_group.d.ts +5 -0
  35. package/dist/inputs/input_group/input_group.d.ts.map +1 -0
  36. package/dist/inputs/input_group/input_group.js +20 -0
  37. package/dist/inputs/input_group/input_group.js.map +1 -0
  38. package/dist/inputs/phone_number_input/countries_phone_information.d.ts +2 -2
  39. package/dist/inputs/phone_number_input/countries_phone_information.d.ts.map +1 -1
  40. package/dist/inputs/phone_number_input/countries_phone_information.js +5 -353
  41. package/dist/inputs/phone_number_input/countries_phone_information.js.map +1 -1
  42. package/dist/inputs/phone_number_input/phone_number_context.d.ts +24 -0
  43. package/dist/inputs/phone_number_input/phone_number_context.d.ts.map +1 -0
  44. package/dist/inputs/phone_number_input/phone_number_context.js +23 -0
  45. package/dist/inputs/phone_number_input/phone_number_context.js.map +1 -0
  46. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.d.ts +19 -0
  47. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.d.ts.map +1 -0
  48. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js +77 -0
  49. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js.map +1 -0
  50. package/dist/inputs/phone_number_input/phone_number_input.d.ts +16 -14
  51. package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
  52. package/dist/inputs/phone_number_input/phone_number_input.js +104 -274
  53. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  54. package/dist/inputs/phone_number_input/phone_number_input_adapter.d.ts +6 -0
  55. package/dist/inputs/phone_number_input/phone_number_input_adapter.d.ts.map +1 -0
  56. package/dist/inputs/phone_number_input/phone_number_input_adapter.js +95 -0
  57. package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -0
  58. package/dist/inputs/phone_number_input/sip_input.d.ts +12 -0
  59. package/dist/inputs/phone_number_input/sip_input.d.ts.map +1 -0
  60. package/dist/inputs/phone_number_input/sip_input.js +111 -0
  61. package/dist/inputs/phone_number_input/sip_input.js.map +1 -0
  62. package/dist/inputs/select/select.d.ts.map +1 -1
  63. package/dist/inputs/select/select.js +3 -2
  64. package/dist/inputs/select/select.js.map +1 -1
  65. package/dist/inputs/suggestions/suggestion_list.d.ts +4 -1
  66. package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
  67. package/dist/inputs/suggestions/suggestion_list.js +148 -121
  68. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  69. package/dist/inputs/textarea/textarea.js +8 -8
  70. package/dist/inputs/textarea/textarea.js.map +1 -1
  71. package/dist/inputs/unit_input/unit_input.d.ts.map +1 -1
  72. package/dist/inputs/unit_input/unit_input.js +39 -39
  73. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  74. package/dist/overlay/frame/frame.d.ts +8 -4
  75. package/dist/overlay/frame/frame.d.ts.map +1 -1
  76. package/dist/overlay/frame/frame.js +88 -24
  77. package/dist/overlay/frame/frame.js.map +1 -1
  78. package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -1
  79. package/dist/overlay/popper/legacy/popper.d.ts.map +1 -1
  80. package/dist/overlay/popper/legacy/popper.js +52 -50
  81. package/dist/overlay/popper/legacy/popper.js.map +1 -1
  82. package/dist/phone_number_input.css +1 -1
  83. package/dist/progress_bar-CPP0Jyv-.js +38 -0
  84. package/dist/progress_bar-CPP0Jyv-.js.map +1 -0
  85. package/dist/progress_bar.css +1 -1
  86. package/dist/stacks/box/bottom_resize_handle.d.ts +2 -8
  87. package/dist/stacks/box/bottom_resize_handle.d.ts.map +1 -1
  88. package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
  89. package/dist/stacks/box/box.d.ts +2 -2
  90. package/dist/stacks/box/box.d.ts.map +1 -1
  91. package/dist/stacks/box/box.js.map +1 -1
  92. package/dist/stacks/box/end_resize_handle.d.ts +2 -8
  93. package/dist/stacks/box/end_resize_handle.d.ts.map +1 -1
  94. package/dist/stacks/box/end_resize_handle.js.map +1 -1
  95. package/dist/stacks/box/left_resize_handle.d.ts +2 -8
  96. package/dist/stacks/box/left_resize_handle.d.ts.map +1 -1
  97. package/dist/stacks/box/left_resize_handle.js.map +1 -1
  98. package/dist/stacks/box/resize_handlers.d.ts +3 -2
  99. package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
  100. package/dist/stacks/box/resize_handlers.js +41 -37
  101. package/dist/stacks/box/resize_handlers.js.map +1 -1
  102. package/dist/stacks/box/right_resize_handle.d.ts +2 -8
  103. package/dist/stacks/box/right_resize_handle.d.ts.map +1 -1
  104. package/dist/stacks/box/right_resize_handle.js.map +1 -1
  105. package/dist/stacks/box/start_resize_handle.d.ts +2 -8
  106. package/dist/stacks/box/start_resize_handle.d.ts.map +1 -1
  107. package/dist/stacks/box/start_resize_handle.js +4 -4
  108. package/dist/stacks/box/start_resize_handle.js.map +1 -1
  109. package/dist/stacks/box/top_resize_handle.d.ts +2 -8
  110. package/dist/stacks/box/top_resize_handle.d.ts.map +1 -1
  111. package/dist/stacks/box/top_resize_handle.js +4 -4
  112. package/dist/stacks/box/top_resize_handle.js.map +1 -1
  113. package/dist/stacks/box/types.d.ts +18 -0
  114. package/dist/stacks/box/types.d.ts.map +1 -0
  115. package/dist/stacks/h_collapsible_box.js +25 -25
  116. package/dist/stacks/h_collapsible_box.js.map +1 -1
  117. package/dist/stacks/index.d.ts +1 -0
  118. package/dist/stacks/index.d.ts.map +1 -1
  119. package/dist/stacks/v_collapsible_box.js +25 -25
  120. package/dist/stacks/v_collapsible_box.js.map +1 -1
  121. package/dist/suggestion_list.css +1 -1
  122. package/dist/surfaces/modal/modal.d.ts +3 -4
  123. package/dist/surfaces/modal/modal.d.ts.map +1 -1
  124. package/dist/surfaces/modal/modal.js +10 -8
  125. package/dist/surfaces/modal/modal.js.map +1 -1
  126. package/dist/surfaces/window/window.d.ts +3 -4
  127. package/dist/surfaces/window/window.d.ts.map +1 -1
  128. package/dist/surfaces/window/window.js +26 -14
  129. package/dist/surfaces/window/window.js.map +1 -1
  130. package/dist/themes/stylesheets/reset.css +1 -1
  131. package/dist/themes/stylesheets/reset.js +8 -1
  132. package/dist/themes/stylesheets/reset.js.map +1 -1
  133. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  134. package/dist/themes/themes/ergo/ergo_theme.js +186 -19
  135. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  136. package/dist/typography/body_text/body_text.d.ts.map +1 -1
  137. package/dist/typography/body_text/body_text.js +12 -10
  138. package/dist/typography/body_text/body_text.js.map +1 -1
  139. package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -1
  140. package/dist/utils/dnd/hooks/use_drag_container.js +22 -19
  141. package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -1
  142. package/package.json +4 -2
  143. package/src/feedback/index.ts +1 -0
  144. package/src/feedback/progress/progress.module.css +5 -0
  145. package/src/feedback/progress/progress.stories.tsx +48 -0
  146. package/src/feedback/progress/progress.tsx +39 -0
  147. package/src/feedback/progress/progress_bar.module.css +4 -28
  148. package/src/feedback/progress/progress_bar.stories.tsx +1 -1
  149. package/src/feedback/progress/progress_bar.tsx +14 -26
  150. package/src/form/field/h_field/h_field.tsx +0 -4
  151. package/src/form/field/v_field/v_field.stories.tsx +8 -0
  152. package/src/form/field/v_field/v_field.tsx +1 -4
  153. package/src/form/field_set/field_set.stories.tsx +2 -1
  154. package/src/inputs/__docs__/inputs.mdx +81 -0
  155. package/src/inputs/__docs__/inputs.stories.tsx +268 -0
  156. package/src/inputs/color_input/color_input.tsx +17 -17
  157. package/src/inputs/combo_box/combo_box.tsx +17 -13
  158. package/src/inputs/index.ts +2 -0
  159. package/src/inputs/input/input.tsx +1 -1
  160. package/src/inputs/input_group/input_group.tsx +26 -0
  161. package/src/inputs/phone_number_input/countries_phone_information.ts +6 -353
  162. package/src/inputs/phone_number_input/phone_number_context.tsx +32 -0
  163. package/src/inputs/phone_number_input/phone_number_country_select_adapter.tsx +126 -0
  164. package/src/inputs/phone_number_input/phone_number_input.module.css +5 -63
  165. package/src/inputs/phone_number_input/phone_number_input.stories.tsx +180 -150
  166. package/src/inputs/phone_number_input/phone_number_input.tsx +133 -400
  167. package/src/inputs/phone_number_input/phone_number_input_adapter.tsx +123 -0
  168. package/src/inputs/phone_number_input/sip_input.tsx +147 -0
  169. package/src/inputs/select/select.stories.tsx +23 -2
  170. package/src/inputs/select/select.tsx +13 -14
  171. package/src/inputs/suggestions/suggestion_list.module.css +1 -0
  172. package/src/inputs/suggestions/suggestion_list.stories.tsx +12 -8
  173. package/src/inputs/suggestions/suggestion_list.tsx +82 -42
  174. package/src/inputs/textarea/textarea.tsx +1 -1
  175. package/src/inputs/unit_input/unit_input.tsx +17 -17
  176. package/src/overlay/frame/frame.module.css +2 -4
  177. package/src/overlay/frame/frame.stories.tsx +13 -10
  178. package/src/overlay/frame/frame.tsx +121 -15
  179. package/src/overlay/popper/base/dismissal_decorator.tsx +1 -1
  180. package/src/overlay/popper/legacy/popper.tsx +5 -1
  181. package/src/stacks/box/bottom_resize_handle.tsx +2 -8
  182. package/src/stacks/box/box.tsx +14 -2
  183. package/src/stacks/box/end_resize_handle.tsx +3 -8
  184. package/src/stacks/box/left_resize_handle.tsx +3 -8
  185. package/src/stacks/box/resize_handlers.ts +28 -12
  186. package/src/stacks/box/right_resize_handle.tsx +2 -8
  187. package/src/stacks/box/start_resize_handle.tsx +4 -9
  188. package/src/stacks/box/top_resize_handle.tsx +4 -8
  189. package/src/stacks/box/types.ts +44 -0
  190. package/src/stacks/h_collapsible_box.tsx +2 -2
  191. package/src/stacks/index.ts +1 -0
  192. package/src/stacks/v_collapsible_box.tsx +2 -2
  193. package/src/surfaces/modal/modal.tsx +6 -4
  194. package/src/surfaces/window/window.stories.tsx +9 -1
  195. package/src/surfaces/window/window.tsx +19 -7
  196. package/src/themes/stories/controls_fieldset.tsx +1 -1
  197. package/src/themes/stylesheets/reset.css +8 -1
  198. package/src/themes/themes/ergo/ergo_theme.css +186 -19
  199. package/src/typography/body_text/body_text.tsx +2 -0
  200. package/src/utils/dnd/__stories__/draggable.stories.tsx +14 -8
  201. package/src/utils/dnd/hooks/use_drag_container.ts +13 -3
  202. package/src/inputs/phone_number_input/__tests__/utils.test.ts +0 -52
@@ -1 +1 @@
1
- {"version":3,"file":"body_text.js","sources":["../../../src/typography/body_text/body_text.tsx"],"sourcesContent":["import React from 'react';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport { clsx } from 'clsx';\nimport styles from './body_text.module.css';\n\nexport interface BodyTextOwnProps {\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n breakWords?: boolean;\n}\n\nexport type BodyTextProps = WithDetailedHTMLProps<BodyTextOwnProps, 'div'>;\n\nexport const BodyText = React.forwardRef<HTMLDivElement, BodyTextProps>(function (\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n breakWords = false,\n }: BodyTextProps,\n ref\n) {\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <div\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['body-text'], className, 'tcn-body-text')}\n style={style}\n data-size={size}\n data-word-break={breakWords}\n >\n {children}\n </div>\n );\n});\n"],"names":["BodyText","React","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","breakWords","ref","jsx","clsx","styles"],"mappings":";;;wDAsBaA,IAAWC,EAAM,WAA0C,SACtE;AAAA,EACE,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AACf,GACAC,GACA;AACA,SAAIH,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAY;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAgBZ;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWI,EAAKC,EAAO,WAAW,GAAGZ,GAAW,eAAe;AAAA,MAC/D,OAAAC;AAAA,MACA,aAAWN;AAAA,MACX,mBAAiBa;AAAA,MAEhB,UAAAT;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"body_text.js","sources":["../../../src/typography/body_text/body_text.tsx"],"sourcesContent":["import React from 'react';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport { clsx } from 'clsx';\nimport styles from './body_text.module.css';\n\nexport interface BodyTextOwnProps {\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n breakWords?: boolean;\n}\n\nexport type BodyTextProps = WithDetailedHTMLProps<BodyTextOwnProps, 'div'>;\n\nexport const BodyText = React.forwardRef<HTMLDivElement, BodyTextProps>(function (\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n breakWords = false,\n ...props\n }: BodyTextProps,\n ref\n) {\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <div\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['body-text'], className, 'tcn-body-text')}\n style={style}\n data-size={size}\n data-word-break={breakWords}\n {...props}\n >\n {children}\n </div>\n );\n});\n"],"names":["BodyText","React","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","breakWords","props","ref","jsx","clsx","styles"],"mappings":";;;wDAsBaA,IAAWC,EAAM,WAA0C,SACtE;AAAA,EACE,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AAAA,EACb,GAAGC;AACL,GACAC,GACA;AACA,SAAIJ,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAa;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAgBb;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWK,EAAKC,EAAO,WAAW,GAAGb,GAAW,eAAe;AAAA,MAC/D,OAAAC;AAAA,MACA,aAAWN;AAAA,MACX,mBAAiBa;AAAA,MAChB,GAAGC;AAAA,MAEH,UAAAV;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"use_drag_container.d.ts","sourceRoot":"","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa,CAiDpF"}
1
+ {"version":3,"file":"use_drag_container.d.ts","sourceRoot":"","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa,CA2DpF"}
@@ -1,44 +1,47 @@
1
- import { useState as s, useRef as b, useCallback as o } from "react";
2
- import { useDraggable as k } from "./use_draggable.js";
3
- function m(g) {
4
- const [u, a] = s([]), n = b(g.initialPosition ?? { x: 0, y: 0 }), [i, c] = s(n.current), [f, l] = s(!1);
5
- k({
6
- handles: u,
1
+ import { useState as s, useRef as y, useCallback as o } from "react";
2
+ import { useDraggable as D } from "./use_draggable.js";
3
+ function C(u) {
4
+ const [l, a] = s([]), n = y(u.initialPosition ?? { x: 0, y: 0 }), [g, i] = s(n.current), [f, c] = s(!1);
5
+ D({
6
+ handles: l,
7
7
  startDragCallback: () => {
8
- l(!0);
8
+ c(!0);
9
9
  },
10
10
  dragCallback: (t, e) => {
11
- c({
11
+ i({
12
12
  x: n.current.x + t,
13
13
  y: n.current.y + e
14
14
  });
15
15
  },
16
- endDragCallback: () => {
17
- l(!1), n.current = i;
16
+ endDragCallback: (t, e) => {
17
+ n.current = {
18
+ x: n.current.x + t,
19
+ y: n.current.y + e
20
+ }, c(!1);
18
21
  }
19
22
  });
20
- const d = o(
23
+ const x = o(
21
24
  (t) => {
22
- c((e) => {
25
+ i((e) => {
23
26
  const r = typeof t == "function" ? t(e) : t;
24
27
  return n.current = r, r;
25
28
  });
26
29
  },
27
30
  []
28
- ), p = o((t) => {
31
+ ), d = o((t) => {
29
32
  a((e) => [...e, t]);
30
- }, []), D = o((t) => {
33
+ }, []), p = o((t) => {
31
34
  a((e) => e.filter((r) => r !== t));
32
35
  }, []);
33
36
  return {
34
- registerHandle: p,
35
- unregisterHandle: D,
36
- position: i,
37
+ registerHandle: d,
38
+ unregisterHandle: p,
39
+ position: g,
37
40
  isDragging: f,
38
- setPosition: d
41
+ setPosition: x
39
42
  };
40
43
  }
41
44
  export {
42
- m as useMakeDragContainer
45
+ C as useMakeDragContainer
43
46
  };
44
47
  //# sourceMappingURL=use_drag_container.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use_drag_container.js","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport { useDraggable } from './use_draggable.js';\nimport type { Position } from '../../index.js';\nimport type { DragContainer } from '../types.js';\n\nexport interface UseDragContainerOptions {\n initialPosition?: Position;\n}\n\nexport function useMakeDragContainer(options: UseDragContainerOptions): DragContainer {\n const [handles, setHandles] = useState<React.RefObject<HTMLElement>[]>([]);\n const positionRef = useRef<Position>(options.initialPosition ?? { x: 0, y: 0 });\n const [position, setPosition] = useState(positionRef.current);\n const [isDragging, setIsDragging] = useState(false);\n\n useDraggable({\n handles: handles,\n startDragCallback: () => {\n setIsDragging(true);\n },\n dragCallback: (deltaX, deltaY) => {\n setPosition({\n x: positionRef.current.x + deltaX,\n y: positionRef.current.y + deltaY,\n });\n },\n endDragCallback: () => {\n setIsDragging(false);\n positionRef.current = position;\n },\n });\n\n const setPositionState = useCallback(\n (value: Position | ((prev: Position) => Position)) => {\n setPosition(prev => {\n const next = typeof value === 'function' ? value(prev) : value;\n positionRef.current = next;\n return next;\n });\n },\n []\n );\n\n const registerHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => [...prev, handle]);\n }, []);\n\n const unregisterHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => prev.filter(h => h !== handle));\n }, []);\n\n return {\n registerHandle,\n unregisterHandle,\n position,\n isDragging,\n setPosition: setPositionState,\n };\n}\n"],"names":["useMakeDragContainer","options","handles","setHandles","useState","positionRef","useRef","position","setPosition","isDragging","setIsDragging","useDraggable","deltaX","deltaY","setPositionState","useCallback","value","prev","next","registerHandle","handle","unregisterHandle","h"],"mappings":";;AASO,SAASA,EAAqBC,GAAiD;AACpF,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAyC,CAAA,CAAE,GACnEC,IAAcC,EAAiBL,EAAQ,mBAAmB,EAAE,GAAG,GAAG,GAAG,GAAG,GACxE,CAACM,GAAUC,CAAW,IAAIJ,EAASC,EAAY,OAAO,GACtD,CAACI,GAAYC,CAAa,IAAIN,EAAS,EAAK;AAElD,EAAAO,EAAa;AAAA,IACX,SAAAT;AAAA,IACA,mBAAmB,MAAM;AACvB,MAAAQ,EAAc,EAAI;AAAA,IACpB;AAAA,IACA,cAAc,CAACE,GAAQC,MAAW;AAChC,MAAAL,EAAY;AAAA,QACV,GAAGH,EAAY,QAAQ,IAAIO;AAAA,QAC3B,GAAGP,EAAY,QAAQ,IAAIQ;AAAA,MAAA,CAC5B;AAAA,IACH;AAAA,IACA,iBAAiB,MAAM;AACrB,MAAAH,EAAc,EAAK,GACnBL,EAAY,UAAUE;AAAA,IACxB;AAAA,EAAA,CACD;AAED,QAAMO,IAAmBC;AAAA,IACvB,CAACC,MAAqD;AACpD,MAAAR,EAAY,CAAAS,MAAQ;AAClB,cAAMC,IAAO,OAAOF,KAAU,aAAaA,EAAMC,CAAI,IAAID;AACzD,eAAAX,EAAY,UAAUa,GACfA;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAA;AAAA,EAAC,GAGGC,IAAiBJ,EAAY,CAACK,MAAyC;AAC3E,IAAAjB,EAAW,CAAAc,MAAQ,CAAC,GAAGA,GAAMG,CAAM,CAAC;AAAA,EACtC,GAAG,CAAA,CAAE,GAECC,IAAmBN,EAAY,CAACK,MAAyC;AAC7E,IAAAjB,EAAW,OAAQc,EAAK,OAAO,CAAAK,MAAKA,MAAMF,CAAM,CAAC;AAAA,EACnD,GAAG,CAAA,CAAE;AAEL,SAAO;AAAA,IACL,gBAAAD;AAAA,IACA,kBAAAE;AAAA,IACA,UAAAd;AAAA,IACA,YAAAE;AAAA,IACA,aAAaK;AAAA,EAAA;AAEjB;"}
1
+ {"version":3,"file":"use_drag_container.js","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport type { Position } from '../../index.js';\nimport type { DragContainer } from '../types.js';\nimport { useDraggable } from './use_draggable.js';\n\nexport interface UseDragContainerOptions {\n initialPosition?: Position;\n}\n\nexport function useMakeDragContainer(options: UseDragContainerOptions): DragContainer {\n const [handles, setHandles] = useState<React.RefObject<HTMLElement>[]>([]);\n const positionRef = useRef<Position>(options.initialPosition ?? { x: 0, y: 0 });\n /**\n * The value that triggers re-renders. It’s updated in dragCallback so the UI\n * moves while dragging, and it’s what the hook returns so the consumer can\n * render the element at that position\n * (e.g. style={{ left: position.x, top: position.y }}).\n */\n const [position, setPosition] = useState(positionRef.current);\n\n const [isDragging, setIsDragging] = useState(false);\n\n useDraggable({\n handles: handles,\n startDragCallback: () => {\n setIsDragging(true);\n },\n dragCallback: (deltaX, deltaY) => {\n setPosition({\n x: positionRef.current.x + deltaX,\n y: positionRef.current.y + deltaY,\n });\n },\n endDragCallback: (deltaX, deltaY) => {\n positionRef.current = {\n x: positionRef.current.x + deltaX,\n y: positionRef.current.y + deltaY,\n };\n setIsDragging(false);\n },\n });\n\n const setPositionState = useCallback(\n (value: Position | ((prev: Position) => Position)) => {\n setPosition(prev => {\n const next = typeof value === 'function' ? value(prev) : value;\n positionRef.current = next;\n return next;\n });\n },\n []\n );\n\n const registerHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => [...prev, handle]);\n }, []);\n\n const unregisterHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => prev.filter(h => h !== handle));\n }, []);\n\n return {\n registerHandle,\n unregisterHandle,\n position,\n isDragging,\n setPosition: setPositionState,\n };\n}\n"],"names":["useMakeDragContainer","options","handles","setHandles","useState","positionRef","useRef","position","setPosition","isDragging","setIsDragging","useDraggable","deltaX","deltaY","setPositionState","useCallback","value","prev","next","registerHandle","handle","unregisterHandle","h"],"mappings":";;AASO,SAASA,EAAqBC,GAAiD;AACpF,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAyC,CAAA,CAAE,GACnEC,IAAcC,EAAiBL,EAAQ,mBAAmB,EAAE,GAAG,GAAG,GAAG,GAAG,GAOxE,CAACM,GAAUC,CAAW,IAAIJ,EAASC,EAAY,OAAO,GAEtD,CAACI,GAAYC,CAAa,IAAIN,EAAS,EAAK;AAElD,EAAAO,EAAa;AAAA,IACX,SAAAT;AAAA,IACA,mBAAmB,MAAM;AACvB,MAAAQ,EAAc,EAAI;AAAA,IACpB;AAAA,IACA,cAAc,CAACE,GAAQC,MAAW;AAChC,MAAAL,EAAY;AAAA,QACV,GAAGH,EAAY,QAAQ,IAAIO;AAAA,QAC3B,GAAGP,EAAY,QAAQ,IAAIQ;AAAA,MAAA,CAC5B;AAAA,IACH;AAAA,IACA,iBAAiB,CAACD,GAAQC,MAAW;AACnC,MAAAR,EAAY,UAAU;AAAA,QACpB,GAAGA,EAAY,QAAQ,IAAIO;AAAA,QAC3B,GAAGP,EAAY,QAAQ,IAAIQ;AAAA,MAAA,GAE7BH,EAAc,EAAK;AAAA,IACrB;AAAA,EAAA,CACD;AAED,QAAMI,IAAmBC;AAAA,IACvB,CAACC,MAAqD;AACpD,MAAAR,EAAY,CAAAS,MAAQ;AAClB,cAAMC,IAAO,OAAOF,KAAU,aAAaA,EAAMC,CAAI,IAAID;AACzD,eAAAX,EAAY,UAAUa,GACfA;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAA;AAAA,EAAC,GAGGC,IAAiBJ,EAAY,CAACK,MAAyC;AAC3E,IAAAjB,EAAW,CAAAc,MAAQ,CAAC,GAAGA,GAAMG,CAAM,CAAC;AAAA,EACtC,GAAG,CAAA,CAAE,GAECC,IAAmBN,EAAY,CAACK,MAAyC;AAC7E,IAAAjB,EAAW,OAAQc,EAAK,OAAO,CAAAK,MAAKA,MAAMF,CAAM,CAAC;AAAA,EACnD,GAAG,CAAA,CAAE;AAEL,SAAO;AAAA,IACL,gBAAAD;AAAA,IACA,kBAAAE;AAAA,IACA,UAAAd;AAAA,IACA,YAAAE;AAAA,IACA,aAAaK;AAAA,EAAA;AAEjB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tcn/ui",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "author": "TCN",
@@ -140,8 +140,10 @@
140
140
  "dependencies": {
141
141
  "@fontsource/lato": "^5.2.7",
142
142
  "clsx": "^2.1.1",
143
+ "libphonenumber-js": "^1.12.38",
143
144
  "react-color": "^2.19.3",
144
- "@tcn/icons": "2.2.1",
145
+ "react-phone-number-input": "^3.4.16",
146
+ "@tcn/icons": "2.3.0",
145
147
  "@tcn/state": "1.2.0"
146
148
  },
147
149
  "scripts": {
@@ -1,3 +1,4 @@
1
1
  export * from './loading/loading.js';
2
2
  export * from './progress/progress_bar.js';
3
+ export * from './progress/progress.js';
3
4
  export * from './lazy/lazy.js';
@@ -0,0 +1,5 @@
1
+ @layer tcn-system {
2
+ :where(.progress) {
3
+ width: 100%;
4
+ }
5
+ }
@@ -0,0 +1,48 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { Progress as Component, ProgressProps } from './progress.js';
3
+ import styles from '../storybook.module.css';
4
+
5
+ export default {
6
+ title: 'Feedback/Progress Bar',
7
+ };
8
+
9
+ function Base(props: Partial<ProgressProps>) {
10
+ const [value, setValue] = useState(props.value ?? 0);
11
+
12
+ useEffect(() => {
13
+ if (value >= 1) return;
14
+
15
+ const timer = window.setTimeout(() => {
16
+ setValue(prevValue => Math.min(prevValue + 0.1, 1));
17
+ }, 1000);
18
+
19
+ return () => window.clearTimeout(timer);
20
+ }, [value]);
21
+
22
+ return <Component {...props} message="Loading..." value={value} />;
23
+ }
24
+
25
+ export function Progress() {
26
+ return (
27
+ <table className={styles['story']}>
28
+ <colgroup>
29
+ <col style={{ width: '1fr' }} />
30
+ <col style={{ width: '200px' }} />
31
+ </colgroup>
32
+ <thead>
33
+ <tr>
34
+ <th>Name</th>
35
+ <th>Component</th>
36
+ </tr>
37
+ </thead>
38
+ <tbody>
39
+ <tr>
40
+ <td>Base</td>
41
+ <td>
42
+ <Base />
43
+ </td>
44
+ </tr>
45
+ </tbody>
46
+ </table>
47
+ );
48
+ }
@@ -0,0 +1,39 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { BodyText } from '../../typography/index.js';
3
+ import { HStack } from '../../stacks/h_stack.js';
4
+ import { Spacer } from '../../stacks/spacer.js';
5
+ import { VStack } from '../../stacks/v_stack.js';
6
+ import clsx from 'clsx';
7
+
8
+ import styles from './progress_bar.module.css';
9
+ import { ProgressBar } from './progress_bar.js';
10
+
11
+ export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
12
+ message: string;
13
+ value: number;
14
+ }
15
+
16
+ export const Progress = React.forwardRef(function Progress(
17
+ { message, value, ...props }: ProgressProps,
18
+ ref: React.Ref<HTMLDivElement>
19
+ ) {
20
+ const progressPercent = `${(value * 100).toFixed(0)}%`;
21
+
22
+ return (
23
+ <VStack
24
+ ref={ref}
25
+ className={clsx(styles['progress-container'], 'tcn-progress-container')}
26
+ {...props}
27
+ >
28
+ <HStack height="auto" vAlign="end">
29
+ <BodyText>{message}</BodyText>
30
+ <Spacer />
31
+ <Spacer width="8px" />
32
+ <BodyText size="sm" style={{ flexShrink: 0 }}>
33
+ {progressPercent}
34
+ </BodyText>
35
+ </HStack>
36
+ <ProgressBar value={value} />
37
+ </VStack>
38
+ );
39
+ });
@@ -1,4 +1,4 @@
1
- @system {
1
+ @layer tcn-system {
2
2
  :root {
3
3
  --progress-bar-color: var(--accent-color); /* Default color for progress bar */
4
4
  --progress-bar-background: #dadada;
@@ -6,6 +6,9 @@
6
6
 
7
7
  :where(.progress-bar-container) {
8
8
  width: 100%;
9
+ height: 8px;
10
+ border-radius: 2px;
11
+ overflow: hidden;
9
12
  }
10
13
 
11
14
  :where(.progress-bar-background) {
@@ -21,7 +24,6 @@
21
24
  appearance: none;
22
25
  background: transparent;
23
26
  user-select: none;
24
- /* box-shadow: 0 1px 0 0 rgba(222, 222, 222, 0.7), inset 0 1px 0 0 rgba(0, 0, 0, 0.3); */
25
27
  overflow: hidden;
26
28
  }
27
29
 
@@ -32,30 +34,4 @@
32
34
  background-color: var(--progress-bar-color);
33
35
  transition: width 200ms ease-out;
34
36
  }
35
-
36
- :where(.progress-bar-fill::before) {
37
- content: "";
38
- position: absolute;
39
- top: 0px;
40
- left: -20px;
41
- height: 100%;
42
- width: calc(100% + 40px);
43
- background-size: 20px 20px;
44
- animation: moveStripes 500ms linear infinite;
45
- }
46
-
47
- :where(.progress-bar-fill[data-finished="true"]::before) {
48
- animation: none;
49
- background-image: none;
50
- }
51
-
52
- /* Animation for moving stripes */
53
- @keyframes moveStripes {
54
- 0% {
55
- transform: translateX(0);
56
- }
57
- 100% {
58
- transform: translateX(20px);
59
- }
60
- }
61
37
  }
@@ -19,7 +19,7 @@ function Base(props: Partial<ProgressBarProps>) {
19
19
  return () => window.clearTimeout(timer);
20
20
  }, [value]);
21
21
 
22
- return <Component message="Progress..." {...props} value={value} />;
22
+ return <Component {...props} value={value} />;
23
23
  }
24
24
 
25
25
  export function ProgressBar() {
@@ -1,48 +1,36 @@
1
1
  import React, { HTMLAttributes } from 'react';
2
- import { BodyText } from '../../typography/index.js';
3
- import { HStack } from '../../stacks/h_stack.js';
4
- import { Spacer } from '../../stacks/spacer.js';
5
- import { VStack } from '../../stacks/v_stack.js';
6
2
  import { ZStack } from '../../stacks/z_stack.js';
7
3
  import clsx from 'clsx';
8
4
 
9
5
  import styles from './progress_bar.module.css';
10
6
 
11
7
  export interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
12
- message: string;
13
8
  value: number;
14
9
  }
15
10
 
16
11
  export const ProgressBar = React.forwardRef(function ProgressBar(
17
- { message, value, ...props }: ProgressBarProps,
12
+ { value, ...props }: ProgressBarProps,
18
13
  ref: React.Ref<HTMLDivElement>
19
14
  ) {
20
15
  const progressPercent = `${(value * 100).toFixed(0)}%`;
21
16
  const styleVariables: any = { '--progress-percentage': progressPercent };
22
17
 
23
18
  return (
24
- <VStack
19
+ <ZStack
25
20
  ref={ref}
26
- className={clsx(styles['progress-bar-container'], 'tcn-progress-bar')}
21
+ hAlign="start"
22
+ className={clsx(styles['progress-bar-container'], 'tcn-progress-bar-container')}
27
23
  {...props}
28
24
  >
29
- <HStack height="auto" vAlign="end">
30
- <BodyText>{message}</BodyText>
31
- <Spacer />
32
- <Spacer width="8px" />
33
- <BodyText size="sm" style={{ flexShrink: 0 }}>
34
- {progressPercent}
35
- </BodyText>
36
- </HStack>
37
- <ZStack height="8px" hAlign="start">
38
- <div className={styles['progress-bar-background']}></div>
39
- <div
40
- data-finished={progressPercent === '100%'}
41
- style={styleVariables}
42
- className={styles['progress-bar-fill']}
43
- />
44
- <div className={styles['progress-bar']}></div>
45
- </ZStack>
46
- </VStack>
25
+ <div
26
+ className={clsx(styles['progress-bar-background'], 'tcn-progress-bar-background')}
27
+ ></div>
28
+ <div
29
+ data-finished={progressPercent === '100%'}
30
+ style={styleVariables}
31
+ className={clsx(styles['progress-bar-fill'], 'tcn-progress-bar-fill')}
32
+ />
33
+ <div className={clsx(styles['progress-bar'], 'tcn-progress-bar')}></div>
34
+ </ZStack>
47
35
  );
48
36
  });
@@ -33,8 +33,6 @@ export const HField = React.forwardRef(function HField(
33
33
  ref: React.Ref<HTMLDivElement>
34
34
  ) {
35
35
  const [finalId] = useState(() => id || `h-field-${idIndex++}`);
36
- const labelId = `${finalId}-label`;
37
- const descriptionId = `${finalId}-description`;
38
36
  const hasError = errorMessage ? true : false;
39
37
  const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';
40
38
 
@@ -42,8 +40,6 @@ export const HField = React.forwardRef(function HField(
42
40
  <HStack
43
41
  ref={ref}
44
42
  as="div"
45
- aria-labelledby={labelId}
46
- aria-describedby={descriptionId}
47
43
  data-locked={locked}
48
44
  data-error={hasError}
49
45
  data-loading={loading}
@@ -94,6 +94,14 @@ export function Baseline() {
94
94
  >
95
95
  <Input defaultValue="Disabled value" />
96
96
  </VField>
97
+ <Divider horizontal />
98
+ <VField
99
+ label="Aria enabled"
100
+ description="This field demonstrates the use of aria-labelledby and aria-describedby."
101
+ id="field-8"
102
+ >
103
+ <Input aria-labelledby="field-8-label" aria-describedby="field-8-description" />
104
+ </VField>
97
105
  </FieldSet>
98
106
  );
99
107
  }
@@ -34,15 +34,12 @@ export const VField = React.forwardRef(function VField(
34
34
  ) {
35
35
  const [finalId] = useState(() => id || `v-field-${idIndex++}`);
36
36
  const hasError = errorMessage ? true : false;
37
- const labelId = `${finalId}-label`;
38
- const descriptionId = `${finalId}-description`;
39
37
  const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';
38
+
40
39
  return (
41
40
  <VStack
42
41
  ref={ref}
43
42
  as="div"
44
- aria-labelledby={labelId}
45
- aria-describedby={descriptionId}
46
43
  data-locked={locked}
47
44
  data-error={hasError}
48
45
  data-loading={loading}
@@ -28,6 +28,7 @@ export default {
28
28
 
29
29
  export function Baseline() {
30
30
  const [multiselectValues, setMultiselectValues] = useState<string[]>([]);
31
+ const [phoneNumberValue, setPhoneNumberValue] = useState<string | undefined>(undefined);
31
32
  const [freeformMultiselectValues, setFreeformMultiselectValues] = useState<string[]>(
32
33
  []
33
34
  );
@@ -47,7 +48,7 @@ export function Baseline() {
47
48
  </HField>
48
49
  <Divider />
49
50
  <HField label="Phone Number" id="field-4">
50
- <PhoneNumberInput />
51
+ <PhoneNumberInput value={phoneNumberValue} onChange={setPhoneNumberValue} />
51
52
  </HField>
52
53
  <Divider />
53
54
  <HField label="Unit" id="field-5">
@@ -0,0 +1,81 @@
1
+ import { Meta } from '@storybook/addon-docs/blocks';
2
+ import * as InputStories from './inputs.stories';
3
+ import { Showcase } from '../../actions/__docs__/components/showcase';
4
+ import { Gallery } from '../../actions/__docs__/components/gallery';
5
+
6
+ <Meta title="Catalog/Inputs" of={InputStories} />
7
+
8
+ # Inputs
9
+
10
+ Form controls and data entry components for user input.
11
+
12
+ - [Inputs](#inputs)
13
+ - [Text](#text)
14
+ - [Standard](#standard)
15
+ - [Specialized](#specialized)
16
+ - [Boolean](#boolean)
17
+ - [Date / Time](#date--time)
18
+ - [Selection](#selection)
19
+ - [Single / Constrained](#single--constrained)
20
+ - [Multiple](#multiple)
21
+
22
+ ## Text
23
+
24
+ Free text entry and structured text input.
25
+
26
+ ### Standard
27
+
28
+ <Gallery minColumnWidth="280px">
29
+ <Showcase title="Input" of={InputStories.InputBaseline} minWidth="240px" />
30
+ <Showcase title="Textarea" of={InputStories.TextareaBaseline} minWidth="280px" />
31
+ <Showcase title="Mask Input" of={InputStories.MaskInputBaseline} minWidth="200px" />
32
+ </Gallery>
33
+
34
+ ### Specialized
35
+
36
+ <Gallery minColumnWidth="280px">
37
+ <Showcase title="Phone Number Input" of={InputStories.PhoneNumberInputBaseline} minWidth="200px" />
38
+ <Showcase title="Color Input" of={InputStories.ColorInputBaseline} minWidth="200px" />
39
+ <Showcase title="Unit Input" of={InputStories.UnitInputBaseline} minWidth="200px" />
40
+ <Showcase title="Slider" of={InputStories.SliderBaseline} minWidth="280px" />
41
+ </Gallery>
42
+
43
+ ## Boolean
44
+
45
+ Toggle controls for on/off or true/false values.
46
+
47
+ <Gallery minColumnWidth="120px">
48
+ <Showcase title="Checkbox" of={InputStories.CheckboxBaseline} minWidth="120px" />
49
+ <Showcase title="Switch" of={InputStories.SwitchBaseline} minWidth="100px" />
50
+ </Gallery>
51
+
52
+ ## Date / Time
53
+
54
+ Date and time selection.
55
+
56
+ <Gallery minColumnWidth="280px">
57
+ <Showcase title="Date Picker" of={InputStories.DatePickerBaseline} minWidth="280px" />
58
+ </Gallery>
59
+
60
+ ## Selection
61
+
62
+ Components for choosing one or more values from options.
63
+
64
+ ### Single / Constrained
65
+
66
+ Pick one value from a list, range, or specialized picker.
67
+
68
+ <Gallery minColumnWidth="320px">
69
+ <Showcase title="Select" of={InputStories.SelectBaseline} minWidth="320px" />
70
+ <Showcase title="Radio" of={InputStories.RadioBaseline} minWidth="320px" />
71
+ <Showcase title="ComboBox" of={InputStories.ComboBoxBaseline} minWidth="320px" />
72
+ </Gallery>
73
+
74
+ ### Multiple
75
+
76
+ Pick multiple values from a list.
77
+
78
+ <Gallery minColumnWidth="220px">
79
+ <Showcase title="Multiselect" of={InputStories.MultiselectBaseline} minWidth="220px" />
80
+ <Showcase title="Multi ComboBox" of={InputStories.MultiComboBoxBaseline} minWidth="220px" />
81
+ </Gallery>