@colisweb/rescript-toolkit 2.70.1 → 2.71.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 (170) hide show
  1. package/.yarn/cache/@csstools-cascade-layer-name-parser-npm-1.0.1-3c03e04847-ca85af36ab.zip +0 -0
  2. package/.yarn/cache/@csstools-css-parser-algorithms-npm-2.0.1-d93fd57f45-9f168cfc8f.zip +0 -0
  3. package/.yarn/cache/@csstools-css-tokenizer-npm-2.0.1-844d89aa1a-b52ac9fc19.zip +0 -0
  4. package/.yarn/cache/@csstools-media-query-list-parser-npm-2.0.1-6d8da9a941-f30b2a9e1a.zip +0 -0
  5. package/.yarn/cache/@csstools-postcss-cascade-layers-npm-3.0.1-fcae0e8d19-da39631e23.zip +0 -0
  6. package/.yarn/cache/@csstools-postcss-color-function-npm-2.0.1-34522e4c49-0e6ce71636.zip +0 -0
  7. package/.yarn/cache/@csstools-postcss-font-format-keywords-npm-2.0.1-f30ce2e0ea-b9e2fc83e2.zip +0 -0
  8. package/.yarn/cache/@csstools-postcss-hwb-function-npm-2.0.1-0a198205ed-8134c45bb9.zip +0 -0
  9. package/.yarn/cache/@csstools-postcss-ic-unit-npm-2.0.1-af9dff83ea-18a239451a.zip +0 -0
  10. package/.yarn/cache/@csstools-postcss-is-pseudo-class-npm-3.0.1-eee09c2887-c736b35cfd.zip +0 -0
  11. package/.yarn/cache/@csstools-postcss-logical-float-and-clear-npm-1.0.1-bcc4cd5492-5184cd62a6.zip +0 -0
  12. package/.yarn/cache/@csstools-postcss-logical-resize-npm-1.0.1-f2df14ea6f-b19f340d19.zip +0 -0
  13. package/.yarn/cache/@csstools-postcss-logical-viewport-units-npm-1.0.2-ffddbc4f90-8780dd03c1.zip +0 -0
  14. package/.yarn/cache/@csstools-postcss-media-queries-aspect-ratio-number-values-npm-1.0.1-c7c2022b49-cbcf01db72.zip +0 -0
  15. package/.yarn/cache/@csstools-postcss-nested-calc-npm-2.0.1-6a7c107213-0ab4774879.zip +0 -0
  16. package/.yarn/cache/@csstools-postcss-normalize-display-values-npm-2.0.1-6e35aa6dbe-d67779977b.zip +0 -0
  17. package/.yarn/cache/@csstools-postcss-oklab-function-npm-2.0.1-905b1f47ea-78a677492e.zip +0 -0
  18. package/.yarn/cache/@csstools-postcss-progressive-custom-properties-npm-2.0.1-dbdcdfdf80-4d0d8df31a.zip +0 -0
  19. package/.yarn/cache/@csstools-postcss-scope-pseudo-class-npm-2.0.1-edf946c1fb-e53d520130.zip +0 -0
  20. package/.yarn/cache/@csstools-postcss-stepped-value-functions-npm-2.0.1-fedf469bf1-907f9a30b9.zip +0 -0
  21. package/.yarn/cache/@csstools-postcss-text-decoration-shorthand-npm-2.1.0-17a49e6bd6-760f821ee3.zip +0 -0
  22. package/.yarn/cache/@csstools-postcss-trigonometric-functions-npm-2.0.1-0a04a18052-b2b7aa8d59.zip +0 -0
  23. package/.yarn/cache/@csstools-postcss-unset-value-npm-2.0.1-b5b03d712f-51fe220dad.zip +0 -0
  24. package/.yarn/cache/@csstools-selector-specificity-npm-2.1.1-1d0a01f035-392ab62732.zip +0 -0
  25. package/.yarn/cache/@originjs-vite-plugin-commonjs-npm-1.0.3-75b36e7757-e4cd22a73e.zip +0 -0
  26. package/.yarn/cache/css-blank-pseudo-npm-5.0.1-b30f0dbdbd-d5e94c4bc4.zip +0 -0
  27. package/.yarn/cache/css-has-pseudo-npm-5.0.1-1e21124076-6674393fe7.zip +0 -0
  28. package/.yarn/cache/css-prefers-color-scheme-npm-8.0.1-66ab97dc9a-766ff644d4.zip +0 -0
  29. package/.yarn/cache/cssdb-npm-7.4.1-8827244a56-c58803ce3e.zip +0 -0
  30. package/.yarn/cache/esbuild-linux-64-npm-0.14.54-2cb8070ade-8.zip +0 -0
  31. package/.yarn/cache/esbuild-npm-0.14.54-b3dcd8a41e-49e360b118.zip +0 -0
  32. package/.yarn/cache/postcss-attribute-case-insensitive-npm-6.0.1-53cf4e827e-1feb61c031.zip +0 -0
  33. package/.yarn/cache/postcss-color-functional-notation-npm-5.0.1-3124cba045-1525779b2d.zip +0 -0
  34. package/.yarn/cache/postcss-color-hex-alpha-npm-9.0.1-4de0057ece-3f35134833.zip +0 -0
  35. package/.yarn/cache/postcss-color-rebeccapurple-npm-8.0.1-60be592329-ea141bf9ca.zip +0 -0
  36. package/.yarn/cache/postcss-custom-media-npm-9.1.1-1a3a67cb63-3694c53423.zip +0 -0
  37. package/.yarn/cache/postcss-custom-properties-npm-13.1.1-31267ed000-21af14e82a.zip +0 -0
  38. package/.yarn/cache/postcss-custom-selectors-npm-7.1.1-74894a31ad-df79db6237.zip +0 -0
  39. package/.yarn/cache/postcss-dir-pseudo-class-npm-7.0.1-76e71e42f9-4d1c204e13.zip +0 -0
  40. package/.yarn/cache/postcss-double-position-gradients-npm-4.0.1-53c9bf55aa-8f17f35082.zip +0 -0
  41. package/.yarn/cache/postcss-focus-visible-npm-8.0.1-7126799e89-6d6734ba0a.zip +0 -0
  42. package/.yarn/cache/postcss-focus-within-npm-7.0.1-0434464641-c110a45427.zip +0 -0
  43. package/.yarn/cache/postcss-gap-properties-npm-4.0.1-2b5cdc5f7e-21a5d5525d.zip +0 -0
  44. package/.yarn/cache/postcss-image-set-function-npm-5.0.1-f7dd97337c-bd55be8ee1.zip +0 -0
  45. package/.yarn/cache/postcss-lab-function-npm-5.0.1-7c27612597-bdca34254b.zip +0 -0
  46. package/.yarn/cache/postcss-logical-npm-6.0.1-3465206299-cb1812fb55.zip +0 -0
  47. package/.yarn/cache/postcss-nesting-npm-11.1.0-29caff6110-639392ca69.zip +0 -0
  48. package/.yarn/cache/postcss-opacity-percentage-npm-1.1.3-552e884ed7-54d1b8ca68.zip +0 -0
  49. package/.yarn/cache/postcss-overflow-shorthand-npm-4.0.1-ca060456c3-f0efcea4fb.zip +0 -0
  50. package/.yarn/cache/postcss-place-npm-8.0.1-b45b2668b9-c812c858aa.zip +0 -0
  51. package/.yarn/cache/postcss-preset-env-npm-8.0.1-a400fc01d4-18326a03dd.zip +0 -0
  52. package/.yarn/cache/postcss-pseudo-class-any-link-npm-8.0.1-c80df879bb-f84b0fe4c0.zip +0 -0
  53. package/.yarn/cache/postcss-selector-not-npm-7.0.1-8f1507853b-4dec95f785.zip +0 -0
  54. package/.yarn/install-state.gz +0 -0
  55. package/package.json +3 -2
  56. package/playground/PlaygroundApp.res +45 -9
  57. package/playground/PlaygroundComponents.res +16 -0
  58. package/playground/PlaygroundHooks.res +111 -0
  59. package/playground/PlaygroundRouter.res +19 -0
  60. package/playground/components/Playground_Accordion.res +2 -2
  61. package/playground/components/Playground_Button.res +16 -0
  62. package/playground/components/Playground_Checkbox.res +60 -0
  63. package/playground/components/Playground_Combobox.res +38 -0
  64. package/playground/components/Playground_DropdownList.res +40 -0
  65. package/playground/{stories/Toolkit__UI_FormStory.res → components/Playground_Form.res} +58 -33
  66. package/playground/components/Playground_IconButton.res +65 -0
  67. package/playground/components/Playground_MultiSelect.res +1 -1
  68. package/playground/components/Playground_ProgressBar.res +33 -0
  69. package/playground/components/Playground_Radio.res +23 -0
  70. package/playground/components/Playground_Reference.res +16 -0
  71. package/playground/components/Playground_RichText.res +22 -0
  72. package/playground/components/Playground_Select.res +86 -0
  73. package/playground/components/Playground_Table.res +45 -0
  74. package/playground/components/Playground_Tabs.res +53 -0
  75. package/playground/components/Playground_Tag.res +52 -0
  76. package/playground/components/Playground_TextInput.res +23 -0
  77. package/playground/components/Playground_Tooltip.res +90 -0
  78. package/playground/design/DesignSystem_Colors.mdx +0 -2
  79. package/playground/design/DesignSystem_Fonts.mdx +0 -2
  80. package/playground/design/DesignSystem_MediaQueries.mdx +0 -2
  81. package/playground/design/TailwindConfigBreakpoints.jsx +1 -1
  82. package/playground/design/TailwindConfigColorsPreview.jsx +2 -2
  83. package/playground/design/TailwindConfigFontsPreview.jsx +1 -1
  84. package/playground/hooks/Playground_Clipboard.res +19 -0
  85. package/playground/hooks/Playground_Disclosure.res +24 -0
  86. package/playground/hooks/Playground_LazyLoad.res +31 -0
  87. package/playground/hooks/Playground_MediaQueries.res +11 -0
  88. package/public/_redirects +1 -0
  89. package/src/form/Toolkit__Form.res +2 -2
  90. package/src/router/Toolkit__Router.res +2 -2
  91. package/src/ui/Toolkit__Ui_Alert.res +4 -4
  92. package/src/ui/Toolkit__Ui_Button.res +40 -5
  93. package/src/ui/Toolkit__Ui_Button.resi +3 -2
  94. package/src/ui/Toolkit__Ui_Card.res +4 -4
  95. package/src/ui/Toolkit__Ui_Checkbox.res +1 -1
  96. package/src/ui/Toolkit__Ui_CopyWrapper.res +1 -1
  97. package/src/ui/Toolkit__Ui_Layout.res +11 -6
  98. package/src/ui/Toolkit__Ui_ListboxInput.res +3 -3
  99. package/src/ui/Toolkit__Ui_Modal.res +1 -1
  100. package/src/ui/Toolkit__Ui_MultiSelect.res +1 -1
  101. package/src/ui/Toolkit__Ui_Radio.res +1 -1
  102. package/src/ui/Toolkit__Ui_Reference.res +1 -5
  103. package/src/ui/Toolkit__Ui_Select.res +1 -1
  104. package/src/ui/Toolkit__Ui_Snackbar.res +4 -4
  105. package/src/ui/Toolkit__Ui_Table.res +2 -2
  106. package/src/ui/Toolkit__Ui_WeekDateFilter.res +2 -2
  107. package/src/vendors/{BsReactIcons.res → ReactIcons.res} +14 -0
  108. package/vite.config.js +2 -0
  109. package/.yarn/cache/@csstools-postcss-cascade-layers-npm-1.1.1-4382e19cf0-8ecd6a929e.zip +0 -0
  110. package/.yarn/cache/@csstools-postcss-color-function-npm-1.1.1-7c5a0199ae-087595985e.zip +0 -0
  111. package/.yarn/cache/@csstools-postcss-font-format-keywords-npm-1.0.1-ef1db49912-ed8d9eab97.zip +0 -0
  112. package/.yarn/cache/@csstools-postcss-hwb-function-npm-1.0.2-f3f621e351-352ead754a.zip +0 -0
  113. package/.yarn/cache/@csstools-postcss-ic-unit-npm-1.0.1-111638e451-09c414c9b7.zip +0 -0
  114. package/.yarn/cache/@csstools-postcss-is-pseudo-class-npm-2.0.7-c85939401b-a4494bb8e9.zip +0 -0
  115. package/.yarn/cache/@csstools-postcss-nested-calc-npm-1.0.0-8028506411-53bb783dd6.zip +0 -0
  116. package/.yarn/cache/@csstools-postcss-normalize-display-values-npm-1.0.1-53721ce3eb-75901daec3.zip +0 -0
  117. package/.yarn/cache/@csstools-postcss-oklab-function-npm-1.1.1-2907029cf1-d66b789060.zip +0 -0
  118. package/.yarn/cache/@csstools-postcss-progressive-custom-properties-npm-1.3.0-1e56504855-e281845fde.zip +0 -0
  119. package/.yarn/cache/@csstools-postcss-stepped-value-functions-npm-1.0.1-01aa1138bd-2fc88713a0.zip +0 -0
  120. package/.yarn/cache/@csstools-postcss-text-decoration-shorthand-npm-1.0.0-96f61ef9fe-d27aaf9787.zip +0 -0
  121. package/.yarn/cache/@csstools-postcss-trigonometric-functions-npm-1.0.2-4553514702-f7f5b5f249.zip +0 -0
  122. package/.yarn/cache/@csstools-postcss-unset-value-npm-1.0.2-f57c79bfc4-3facdae154.zip +0 -0
  123. package/.yarn/cache/css-blank-pseudo-npm-3.0.3-af86e84805-9be0a13885.zip +0 -0
  124. package/.yarn/cache/css-has-pseudo-npm-3.0.4-e97bb61896-8f165d68f6.zip +0 -0
  125. package/.yarn/cache/css-prefers-color-scheme-npm-6.0.3-e1c91bc5cd-3a2b02f045.zip +0 -0
  126. package/.yarn/cache/cssdb-npm-7.2.0-ce2edad2c6-a571955eac.zip +0 -0
  127. package/.yarn/cache/postcss-attribute-case-insensitive-npm-5.0.2-6aa24bfafa-c0b8139f37.zip +0 -0
  128. package/.yarn/cache/postcss-color-functional-notation-npm-4.2.4-8f3a9400c3-b763e164fe.zip +0 -0
  129. package/.yarn/cache/postcss-color-hex-alpha-npm-8.0.4-88605e8cec-a2f3173a60.zip +0 -0
  130. package/.yarn/cache/postcss-color-rebeccapurple-npm-7.1.1-b7828c0a0c-03482f9b81.zip +0 -0
  131. package/.yarn/cache/postcss-custom-media-npm-8.0.2-5ad89ea0fe-887bbbacf6.zip +0 -0
  132. package/.yarn/cache/postcss-custom-properties-npm-12.1.11-78be1c709e-421f9d8d6b.zip +0 -0
  133. package/.yarn/cache/postcss-custom-selectors-npm-6.0.3-0a63667536-18080d60a8.zip +0 -0
  134. package/.yarn/cache/postcss-dir-pseudo-class-npm-6.0.5-2555aeb05f-7810c439d8.zip +0 -0
  135. package/.yarn/cache/postcss-double-position-gradients-npm-3.1.2-278f758391-ca09bf2aef.zip +0 -0
  136. package/.yarn/cache/postcss-env-function-npm-4.0.6-2282fa7c63-645b2363cf.zip +0 -0
  137. package/.yarn/cache/postcss-focus-visible-npm-6.0.4-2eb1d7ff31-acd010b9dd.zip +0 -0
  138. package/.yarn/cache/postcss-focus-within-npm-5.0.4-d70f73ac5d-f23d8ab757.zip +0 -0
  139. package/.yarn/cache/postcss-gap-properties-npm-3.0.5-78f268ad64-aed559d6d3.zip +0 -0
  140. package/.yarn/cache/postcss-image-set-function-npm-4.0.7-46769dca3e-7e50933098.zip +0 -0
  141. package/.yarn/cache/postcss-lab-function-npm-4.2.1-1ebd916151-26ac74b430.zip +0 -0
  142. package/.yarn/cache/postcss-logical-npm-5.0.4-cf11b97479-17c71291ed.zip +0 -0
  143. package/.yarn/cache/postcss-nesting-npm-10.2.0-eec5f664e8-25e6e66186.zip +0 -0
  144. package/.yarn/cache/postcss-opacity-percentage-npm-1.1.2-3f7d2b6abb-b582f6d4ef.zip +0 -0
  145. package/.yarn/cache/postcss-overflow-shorthand-npm-3.0.4-b5a0785c77-7400902249.zip +0 -0
  146. package/.yarn/cache/postcss-place-npm-7.0.5-895593f8b4-903fec0c31.zip +0 -0
  147. package/.yarn/cache/postcss-preset-env-npm-7.8.3-242e470fd9-71bfb697ff.zip +0 -0
  148. package/.yarn/cache/postcss-pseudo-class-any-link-npm-7.1.6-1a34600b0e-43aa18ea1e.zip +0 -0
  149. package/.yarn/cache/postcss-selector-not-npm-6.0.1-135f19a20c-fe523a0219.zip +0 -0
  150. package/playground/stories/Storybook.res +0 -178
  151. package/playground/stories/Toolkit__Hooks_ClipboardStory.res +0 -44
  152. package/playground/stories/Toolkit__Hooks_DisclosureStory.res +0 -56
  153. package/playground/stories/Toolkit__Hooks_LazyLoadStory.res +0 -58
  154. package/playground/stories/Toolkit__UI_CheckboxStory.res +0 -150
  155. package/playground/stories/Toolkit__UI_ComboboxStory.res +0 -64
  156. package/playground/stories/Toolkit__UI_DropdownListStory.res +0 -89
  157. package/playground/stories/Toolkit__UI_IconButtonStory.res +0 -140
  158. package/playground/stories/Toolkit__UI_NativeDatePickerStory.res +0 -60
  159. package/playground/stories/Toolkit__UI_PortalDropdownStory.res +0 -40
  160. package/playground/stories/Toolkit__UI_RadioStory.res +0 -128
  161. package/playground/stories/Toolkit__UI_ReferenceStory.res +0 -37
  162. package/playground/stories/Toolkit__UI_RichTextStory.res +0 -40
  163. package/playground/stories/Toolkit__UI_SelectStory.res +0 -153
  164. package/playground/stories/Toolkit__UI_TableStory.res +0 -103
  165. package/playground/stories/Toolkit__UI_TableStory.resi +0 -3
  166. package/playground/stories/Toolkit__UI_TabsStory.res +0 -52
  167. package/playground/stories/Toolkit__UI_TagStory.res +0 -160
  168. package/playground/stories/Toolkit__UI_TextInputStory.res +0 -71
  169. package/playground/stories/Toolkit__UI_TooltipStory.res +0 -136
  170. package/playground/stories/Toolkit__Ui_ProgressBarStory.res +0 -49
@@ -1,140 +0,0 @@
1
- open Storybook
2
-
3
- let default = CSF.make(~title="Components/IconButton", ())
4
-
5
- let defaultPalette = () => {
6
- let colors = Js.Dict.fromArray([
7
- ("primary", #primary),
8
- ("black", #black),
9
- ("white", #white),
10
- ("gray", #gray),
11
- ("success", #success),
12
- ("info", #info),
13
- ("danger", #danger),
14
- ("warning", #warning),
15
- ("neutral", #neutral),
16
- ("neutralLight", #neutralLight),
17
- ])
18
-
19
- let sizes = Js.Dict.fromArray([("xs", #xs), ("sm", #sm), ("md", #md), ("lg", #lg)])
20
-
21
- <div>
22
- {colors
23
- ->Js.Dict.entries
24
- ->Array.mapWithIndex((i, (colorText, color)) =>
25
- <div
26
- key={i->Int.toString ++ colorText}
27
- className="flex flex-row flex-col-gap-4 mb-4 items-center">
28
- <strong className="w-40"> {colorText->React.string} </strong>
29
- <div className="flex flex-col">
30
- {[false, true]
31
- ->Array.mapWithIndex((j, disabled) =>
32
- <div className="flex items-center flex-col-gap-1 mb-2">
33
- {sizes
34
- ->Js.Dict.entries
35
- ->Array.mapWithIndex((k, (sizeText, size)) =>
36
- <div key={(i + j + k)->Int.toString ++ (colorText ++ sizeText)}>
37
- <Toolkit__Ui_IconButton color size disabled icon={<BsReactIcons.MdHome />} />
38
- </div>
39
- )
40
- ->React.array}
41
- </div>
42
- )
43
- ->React.array}
44
- </div>
45
- </div>
46
- )
47
- ->React.array}
48
- </div>
49
- }
50
-
51
- defaultPalette->CSF.addMeta(
52
- ~name="default palette",
53
- ~parameters={
54
- "docs": {
55
- "page": () => <>
56
- <Docs.Title />
57
- <Docs.Source
58
- language="rescript"
59
- code=j`
60
- <IconButton
61
- color=#primary
62
- icon={<BsReactIcons.MdHome />}
63
- />
64
- `
65
- />
66
- <Toolkit__Ui_IconButton color=#primary icon={<BsReactIcons.MdHome />} />
67
- </>,
68
- },
69
- },
70
- (),
71
- )
72
-
73
- let outlinePalette = () => {
74
- let colors = Js.Dict.fromArray([
75
- ("primary", #primary),
76
- ("black", #black),
77
- ("white", #white),
78
- ("gray", #gray),
79
- ("success", #success),
80
- ("info", #info),
81
- ("danger", #danger),
82
- ("warning", #warning),
83
- ("neutral", #neutral),
84
- ("neutralLight", #neutralLight),
85
- ])
86
-
87
- let sizes = Js.Dict.fromArray([("xs", #xs), ("sm", #sm), ("md", #md), ("lg", #lg)])
88
-
89
- <div>
90
- {colors
91
- ->Js.Dict.entries
92
- ->Array.mapWithIndex((i, (colorText, color)) =>
93
- <div
94
- key={i->Int.toString ++ colorText}
95
- className="flex flex-row flex-col-gap-4 mb-4 items-center">
96
- <strong className="w-40"> {colorText->React.string} </strong>
97
- <div className="flex flex-col">
98
- {[false, true]
99
- ->Array.mapWithIndex((j, disabled) =>
100
- <div className="flex items-center flex-col-gap-1 mb-2">
101
- {sizes
102
- ->Js.Dict.entries
103
- ->Array.mapWithIndex((k, (sizeText, size)) =>
104
- <div key={(i + j + k)->Int.toString ++ (colorText ++ sizeText)}>
105
- <Toolkit__Ui_IconButton color size disabled icon={<BsReactIcons.MdHome />} />
106
- </div>
107
- )
108
- ->React.array}
109
- </div>
110
- )
111
- ->React.array}
112
- </div>
113
- </div>
114
- )
115
- ->React.array}
116
- </div>
117
- }
118
-
119
- outlinePalette->CSF.addMeta(
120
- ~name="outline palette",
121
- ~parameters={
122
- "docs": {
123
- "page": () => <>
124
- <Docs.Title />
125
- <Docs.Source
126
- language="rescript"
127
- code=j`
128
- <IconButton
129
- color=#primary
130
- variant=#outline
131
- icon={<BsReactIcons.MdHome />}
132
- />
133
- `
134
- />
135
- <Toolkit__Ui_IconButton color=#primary variant=#outline icon={<BsReactIcons.MdHome />} />
136
- </>,
137
- },
138
- },
139
- (),
140
- )
@@ -1,60 +0,0 @@
1
- open Storybook
2
-
3
- @module("!!raw-loader!../../../src/ui/Toolkit__Ui_NativeDatePicker.resi")
4
- external source: 'a = "default"
5
-
6
- let default = CSF.make(~title="Form/NativeDatePicker", ())
7
-
8
- let exemple = () => {
9
- <div className="grid grid-cols-2 grid-flow-row auto-rows-auto gap-x-3 gap-y-3">
10
- <p> {"base"->React.string} </p>
11
- <Toolkit.Ui.NativeDatePicker
12
- onChange={date => {
13
- ()
14
- }}
15
- />
16
- <p> {"invalid"->React.string} </p>
17
- <Toolkit.Ui.NativeDatePicker
18
- onChange={date => {
19
- ()
20
- }}
21
- isInvalid=true
22
- />
23
- <p> {"disabled"->React.string} </p>
24
- <Toolkit.Ui.NativeDatePicker
25
- onChange={date => {
26
- ()
27
- }}
28
- disabled=true
29
- />
30
- </div>
31
- }
32
-
33
- exemple->CSF.addMeta(
34
- ~name="exemple",
35
- ~parameters={
36
- "docs": {
37
- "page": () => <>
38
- <CodeBlock> source </CodeBlock>
39
- <Docs.Source
40
- language="rescript"
41
- code=j`
42
- let (date,setDate) = React.useEffect(None);
43
-
44
- <Toolkit.Ui.NativeDatePicker
45
- onChange={date => {
46
- setDate(_ => date)
47
- }}
48
- />
49
- `
50
- />
51
- <Toolkit.Ui.NativeDatePicker
52
- onChange={date => {
53
- ()
54
- }}
55
- />
56
- </>,
57
- },
58
- },
59
- (),
60
- )
@@ -1,40 +0,0 @@
1
- open Storybook
2
-
3
- @module("!!raw-loader!../../../src/ui/Toolkit__Ui_Dropdown.resi")
4
- external source: 'a = "default"
5
-
6
- let default = CSF.make(~title="Components/PortalDropdown", ())
7
-
8
- let example = () =>
9
- <div>
10
- <Toolkit__Ui_PortalDropdown dropdownClassName="w-60" label={"overflow"->React.string}>
11
- {_ => <div> {"Dropdown content !"->React.string} </div>}
12
- </Toolkit__Ui_PortalDropdown>
13
- <div className="text-right">
14
- <Toolkit__Ui_PortalDropdown
15
- dropdownClassName="w-[400px] mt-4" label={"overflow"->React.string}>
16
- {_ => <div> {"Dropdown content !"->React.string} </div>}
17
- </Toolkit__Ui_PortalDropdown>
18
- </div>
19
- </div>
20
-
21
- example->CSF.addMeta(
22
- ~name="example",
23
- ~parameters={
24
- "docs": {
25
- "page": () => <>
26
- <CodeBlock> source </CodeBlock>
27
- <Docs.Source
28
- language="rescript"
29
- code={j`
30
- <Toolkit__Ui_PortalDropdown dropdownClassName="w-60" label={"overflow"->React.string}>
31
- {_ => <div> {"Dropdown content !"->React.string} </div>}
32
- </Toolkit__Ui_PortalDropdown>
33
- `}
34
- />
35
- <Docs.Story id="components-dropdown--portal" />
36
- </>,
37
- },
38
- },
39
- (),
40
- )
@@ -1,128 +0,0 @@
1
- open Storybook
2
- open Toolkit__Ui
3
-
4
- @module("!!raw-loader!../../../src/ui/Toolkit__Ui_Radio.resi")
5
- external source: 'a = "default"
6
-
7
- let default = CSF.make(~title="Form/Radio", ())
8
-
9
- let sample = () =>
10
- <div>
11
- <input />
12
- <Radio name="test" value="test1"> {"test1"->React.string} </Radio>
13
- <Radio name="test" value="test2"> {"test2"->React.string} </Radio>
14
- <Radio name="test" value="test3"> {"test3"->React.string} </Radio>
15
- </div>
16
-
17
- sample->CSF.addMeta(
18
- ~name="sample",
19
- ~parameters={
20
- "docs": {
21
- "page": () => <>
22
- <CodeBlock> source </CodeBlock>
23
- <Docs.Source
24
- language="rescript"
25
- code=j`
26
- <div>
27
- <Radio name="test" value="test1"> {"test1"->React.string} </Radio>
28
- <Radio name="test" value="test2"> {"test2"->React.string} </Radio>
29
- <Radio name="test" value="test3"> {"test3"->React.string} </Radio>
30
- </div>
31
- `
32
- />
33
- <Docs.Story id="form-radio--sample" />
34
- </>,
35
- },
36
- },
37
- (),
38
- )
39
-
40
- let checked = () =>
41
- <Radio checked=true name="test" value="test"> {"children"->React.string} </Radio>
42
-
43
- checked->CSF.addMeta(
44
- ~name="checked",
45
- ~parameters={
46
- "docs": {
47
- "page": () => <>
48
- <CodeBlock> source </CodeBlock>
49
- <Docs.Source
50
- language="rescript"
51
- code=j`
52
- <Radio name="test" checked=true value="test"> "children"->React.string </Radio>
53
- `
54
- />
55
- <Docs.Story id="form-radio--checked" />
56
- </>,
57
- },
58
- },
59
- (),
60
- )
61
-
62
- let sizes = () =>
63
- <div>
64
- <Radio checked=true name="test" value="test" size=#xs className="mb-4">
65
- {"xs"->React.string}
66
- </Radio>
67
- <Radio checked=true name="test" value="test" size=#sm className="mb-4">
68
- {"sm"->React.string}
69
- </Radio>
70
- <Radio checked=true name="test" value="test" size=#md className="mb-4">
71
- {"md"->React.string}
72
- </Radio>
73
- <Radio checked=true name="test" value="test" size=#lg className="mb-4">
74
- {"lg"->React.string}
75
- </Radio>
76
- </div>
77
-
78
- sizes->CSF.addMeta(
79
- ~name="sizes",
80
- ~parameters={
81
- "docs": {
82
- "page": () => <>
83
- <CodeBlock> source </CodeBlock>
84
- <Docs.Source
85
- language="rescript"
86
- code=j`
87
- <>
88
- <Radio
89
- checked=true
90
- name="test"
91
- value="test"
92
- size=#xs
93
- className="mb-4">
94
- "xs"->React.string
95
- </Radio>
96
- <Radio
97
- checked=true
98
- name="test"
99
- value="test"
100
- size=#sm
101
- className="mb-4">
102
- "sm"->React.string
103
- </Radio>
104
- <Radio
105
- checked=true
106
- name="test"
107
- value="test"
108
- size=#md
109
- className="mb-4">
110
- "md"->React.string
111
- </Radio>
112
- <Radio
113
- checked=true
114
- name="test"
115
- value="test"
116
- size=#lg
117
- className="mb-4">
118
- "lg"->React.string
119
- </Radio>
120
- </>
121
- `
122
- />
123
- <Docs.Story id="form-radio--sizes" />
124
- </>,
125
- },
126
- },
127
- (),
128
- )
@@ -1,37 +0,0 @@
1
- open Storybook
2
- open Toolkit__Ui
3
-
4
- @module("!!raw-loader!../../../src/ui/Toolkit__Ui_Reference.resi")
5
- external source: 'a = "default"
6
-
7
- let default = CSF.make(~title="Components/Reference", ())
8
-
9
- let defaultExample = () =>
10
- <div>
11
- <Reference reference="07868-9897687-0898" />
12
- <div className="w-48 mt-4"> <Reference reference="07868-9897687-0898" /> </div>
13
- </div>
14
-
15
- defaultExample->CSF.addMeta(
16
- ~name="default",
17
- ~parameters={
18
- "docs": {
19
- "page": () => <>
20
- <CodeBlock> source </CodeBlock>
21
- <Docs.Source
22
- language="rescript"
23
- code=j`
24
- <div>
25
- <Reference reference="07868-9897687-0898" />
26
- <div className="w-48 mt-4">
27
- <Reference reference="07868-9897687-0898" />
28
- </div>
29
- </div>;
30
- `
31
- />
32
- <Docs.Story id="components-reference--default-example" />
33
- </>,
34
- },
35
- },
36
- (),
37
- )
@@ -1,40 +0,0 @@
1
- open Storybook
2
- open Toolkit__Ui
3
-
4
- @module("!!raw-loader!../../../src/ui/Toolkit__Ui_RichText.resi")
5
- external source: 'a = "default"
6
-
7
- let default = CSF.make(~title="Components/RichText", ())
8
-
9
- let sample = () => {
10
- let html = `
11
- <h1>
12
- test 2
13
- </h1>
14
- `
15
- let link = "https://www.colisweb.com"
16
- <div className="flex flex-col gap-4">
17
- <RichText text="test" /> <RichText text=html /> <RichText text=link />
18
- </div>
19
- }
20
-
21
- sample->CSF.addMeta(
22
- ~name="sample",
23
- ~parameters={
24
- "docs": {
25
- "page": () => <>
26
- <CodeBlock> source </CodeBlock>
27
- <Docs.Source
28
- language="rescript"
29
- code=j`
30
- <div>
31
- <RichText text="test" />
32
- </div>
33
- `
34
- />
35
- <Docs.Story id="form-label--sample" />
36
- </>,
37
- },
38
- },
39
- (),
40
- )
@@ -1,153 +0,0 @@
1
- open Storybook
2
- open Toolkit__Ui
3
-
4
- @module("!!raw-loader!../../../src/ui/Toolkit__Ui_Select.resi")
5
- external source: 'a = "default"
6
-
7
- let default = CSF.make(~title="Form/Select", ())
8
-
9
- let native = () =>
10
- <div>
11
- <Label htmlFor="test" optionalMessage={"Optional"->React.string}>
12
- {"Label"->React.string}
13
- </Label>
14
- <Select
15
- onChange={_ => ()}
16
- id="test"
17
- placeholder="This is a placeholder"
18
- options=[
19
- ("label", "value", true),
20
- ("label2", "value2", true),
21
- ("label disabled", "value3", false),
22
- ]
23
- />
24
- </div>
25
-
26
- native->CSF.addMeta(
27
- ~name="native",
28
- ~parameters={
29
- "docs": {
30
- "page": () => <>
31
- <CodeBlock> source </CodeBlock>
32
- <Docs.Source
33
- language="rescript"
34
- code=j`
35
- <div>
36
- <Label htmlFor="test" optionalMessage={"Optional"->React.string}>
37
- "Label"->React.string
38
- </Label>
39
- <Select
40
- onChange={_ => ()}
41
- id="test"
42
- placeholder="This is a placeholder"
43
- options=[|
44
- ("label", "value", true),
45
- ("label2"->React.string, "value2", true),
46
- ("label disabled"->React.string, "value3", false),
47
- |]
48
- />
49
- </div>
50
- `
51
- />
52
- <Docs.Story id="form-select--native" />
53
- </>,
54
- },
55
- },
56
- (),
57
- )
58
-
59
- let reactSelect = () => {
60
- open BsReactSelect
61
- let options = [
62
- {label: "Label", value: "value"},
63
- {label: "Label2", value: "value2"},
64
- {label: "Label3", value: "value3"},
65
- ]
66
-
67
- let isDisabled = Knobs.boolean("isDisabled", false)
68
- let isInvalid = Knobs.boolean("isInvalid", false)
69
-
70
- <div>
71
- <Label htmlFor="test" optionalMessage={"Optional"->React.string}>
72
- {"Label"->React.string}
73
- </Label>
74
- <ReactSelect
75
- name="test"
76
- isDisabled
77
- classNamePrefix="react-select"
78
- className={cx([isInvalid ? "errored" : ""])}
79
- placeholder="Placeholder"
80
- onChange={v => Js.log(v)}
81
- options
82
- />
83
- <div className="h-10" />
84
- <Label htmlFor="test2" optionalMessage={"Optional"->React.string}>
85
- {"Searchable select with multiple value"->React.string}
86
- </Label>
87
- <ReactSelectMultiple
88
- name="test2"
89
- isDisabled
90
- defaultValue=[]
91
- classNamePrefix="react-select"
92
- className={cx([isInvalid ? "errored" : ""])}
93
- placeholder="Placeholder"
94
- onChange={v => Js.log(v)}
95
- options
96
- />
97
- </div>
98
- }
99
-
100
- reactSelect->CSF.addMeta(
101
- ~name="react-select",
102
- ~parameters={
103
- "docs": {
104
- "page": () => <>
105
- <Docs.Source
106
- language="rescript"
107
- code=j`
108
- open BsReactSelect;
109
- let options = [|
110
- {label: "Label", value: "value"},
111
- {label: "Label2", value: "value2"},
112
- {label: "Label3", value: "value3"},
113
- |];
114
-
115
- let isDisabled = Knobs.boolean("isDisabled", false);
116
- let isInvalid = Knobs.boolean("isInvalid", false);
117
-
118
- <div>
119
- <Label htmlFor="test" optionalMessage={"Optional"->React.string}>
120
- "Label"->React.string
121
- </Label>
122
- <ReactSelect
123
- name="test"
124
- isDisabled
125
- classNamePrefix="react-select"
126
- className={cx([isInvalid ? "errored" : ""])}
127
- placeholder="Placeholder"
128
- onChange={v => Js.log(v)}
129
- options
130
- />
131
- <div className="h-10" />
132
- <Label htmlFor="test2" optionalMessage={"Optional"->React.string}>
133
- "Searchable select with multiple value"->React.string
134
- </Label>
135
- <ReactSelectMultiple
136
- name="test2"
137
- isDisabled
138
- defaultValue=[||]
139
- classNamePrefix="react-select"
140
- className={cx([isInvalid ? "errored" : ""])}
141
- placeholder="Placeholder"
142
- onChange={v => Js.log(v)}
143
- options
144
- />
145
- </div>;
146
- `
147
- />
148
- <Docs.Story id="form-select--react-select" />
149
- </>,
150
- },
151
- },
152
- (),
153
- )
@@ -1,103 +0,0 @@
1
- open Storybook
2
-
3
- @module("!!raw-loader!../../../src/ui/Toolkit__Ui_Table.resi")
4
- external source: 'a = "default"
5
-
6
- let default = CSF.make(~title="Components/Table", ())
7
-
8
- type rec data = array<(test, toto)>
9
- and test = {
10
- name: string,
11
- age: int,
12
- }
13
- and toto = Js.Dict.t<string>
14
-
15
- module Test = {
16
- let data: data = Array.make(100, ({name: "toto", age: 2}, Js.Dict.empty()))
17
-
18
- @react.component
19
- let make = () => {
20
- let columns = React.useMemo0(() => [
21
- ReactTable.makeColumn(
22
- ~accessor=((value, _dict)) => value.name,
23
- ~id="test",
24
- ~header="Name"->React.string,
25
- ~filterRender=_ => React.null,
26
- ~cell=cell => <p> {cell.cell.value->React.string} </p>,
27
- (),
28
- ),
29
- ])
30
-
31
- let table = {
32
- open ReactTable
33
- useTable5(
34
- make(~columns, ~data, ()),
35
- useFilters,
36
- useSortBy,
37
- usePagination,
38
- useFlexLayout,
39
- useResizeColumns,
40
- )
41
- }
42
-
43
- <div>
44
- <Toolkit__Ui_Table.Pagination table />
45
- <Toolkit__Ui_Table.Core table emptyMessage="No items" />
46
- </div>
47
- }
48
- }
49
-
50
- let example = () => <Test />
51
-
52
- example->CSF.addMeta(
53
- ~name="example",
54
- ~parameters={
55
- "docs": {
56
- "page": () => <>
57
- <CodeBlock> source </CodeBlock>
58
- <Docs.Source
59
- language="rescript"
60
- code=j`
61
- let data: data =
62
- Array.make(100, ({name: "toto", age: 2}, Js.Dict.empty()));
63
-
64
- [@react.component]
65
- let make = () => {
66
- let columns =
67
- React.useMemo0(() => {
68
- [|
69
- ReactTable.makeColumn(
70
- ~accessor=((value, _dict)) => value.name,
71
- ~id="test",
72
- ~header="Name"->React.string,
73
- ~filterRender=_ => React.null,
74
- ~cell=cell => {<p> cell.cell.value->React.string </p>},
75
- (),
76
- ),
77
- |]
78
- });
79
-
80
- let table =
81
- ReactTable.(
82
- useTable5(
83
- make(~columns, ~data, ()),
84
- useFilters,
85
- useSortBy,
86
- usePagination,
87
- useAbsoluteLayout,
88
- useResizeColumns,
89
- )
90
- );
91
-
92
- <div>
93
- <Toolkit__Ui_Table.Pagination table />
94
- <Toolkit__Ui_Table.Core table emptyMessage="No items" />
95
- </
96
- `
97
- />
98
- <Docs.Story id="components-table--example" />
99
- </>,
100
- },
101
- },
102
- (),
103
- )