@colisweb/rescript-toolkit 2.70.1 → 2.71.1
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.
- package/.yarn/cache/@csstools-cascade-layer-name-parser-npm-1.0.1-3c03e04847-ca85af36ab.zip +0 -0
- package/.yarn/cache/@csstools-css-parser-algorithms-npm-2.0.1-d93fd57f45-9f168cfc8f.zip +0 -0
- package/.yarn/cache/@csstools-css-tokenizer-npm-2.0.1-844d89aa1a-b52ac9fc19.zip +0 -0
- package/.yarn/cache/@csstools-media-query-list-parser-npm-2.0.1-6d8da9a941-f30b2a9e1a.zip +0 -0
- package/.yarn/cache/@csstools-postcss-cascade-layers-npm-3.0.1-fcae0e8d19-da39631e23.zip +0 -0
- package/.yarn/cache/@csstools-postcss-color-function-npm-2.0.1-34522e4c49-0e6ce71636.zip +0 -0
- package/.yarn/cache/@csstools-postcss-font-format-keywords-npm-2.0.1-f30ce2e0ea-b9e2fc83e2.zip +0 -0
- package/.yarn/cache/@csstools-postcss-hwb-function-npm-2.0.1-0a198205ed-8134c45bb9.zip +0 -0
- package/.yarn/cache/@csstools-postcss-ic-unit-npm-2.0.1-af9dff83ea-18a239451a.zip +0 -0
- package/.yarn/cache/@csstools-postcss-is-pseudo-class-npm-3.0.1-eee09c2887-c736b35cfd.zip +0 -0
- package/.yarn/cache/@csstools-postcss-logical-float-and-clear-npm-1.0.1-bcc4cd5492-5184cd62a6.zip +0 -0
- package/.yarn/cache/@csstools-postcss-logical-resize-npm-1.0.1-f2df14ea6f-b19f340d19.zip +0 -0
- package/.yarn/cache/@csstools-postcss-logical-viewport-units-npm-1.0.2-ffddbc4f90-8780dd03c1.zip +0 -0
- package/.yarn/cache/@csstools-postcss-media-queries-aspect-ratio-number-values-npm-1.0.1-c7c2022b49-cbcf01db72.zip +0 -0
- package/.yarn/cache/@csstools-postcss-nested-calc-npm-2.0.1-6a7c107213-0ab4774879.zip +0 -0
- package/.yarn/cache/@csstools-postcss-normalize-display-values-npm-2.0.1-6e35aa6dbe-d67779977b.zip +0 -0
- package/.yarn/cache/@csstools-postcss-oklab-function-npm-2.0.1-905b1f47ea-78a677492e.zip +0 -0
- package/.yarn/cache/@csstools-postcss-progressive-custom-properties-npm-2.0.1-dbdcdfdf80-4d0d8df31a.zip +0 -0
- package/.yarn/cache/@csstools-postcss-scope-pseudo-class-npm-2.0.1-edf946c1fb-e53d520130.zip +0 -0
- package/.yarn/cache/@csstools-postcss-stepped-value-functions-npm-2.0.1-fedf469bf1-907f9a30b9.zip +0 -0
- package/.yarn/cache/@csstools-postcss-text-decoration-shorthand-npm-2.1.0-17a49e6bd6-760f821ee3.zip +0 -0
- package/.yarn/cache/@csstools-postcss-trigonometric-functions-npm-2.0.1-0a04a18052-b2b7aa8d59.zip +0 -0
- package/.yarn/cache/@csstools-postcss-unset-value-npm-2.0.1-b5b03d712f-51fe220dad.zip +0 -0
- package/.yarn/cache/@csstools-selector-specificity-npm-2.1.1-1d0a01f035-392ab62732.zip +0 -0
- package/.yarn/cache/@originjs-vite-plugin-commonjs-npm-1.0.3-75b36e7757-e4cd22a73e.zip +0 -0
- package/.yarn/cache/css-blank-pseudo-npm-5.0.1-b30f0dbdbd-d5e94c4bc4.zip +0 -0
- package/.yarn/cache/css-has-pseudo-npm-5.0.1-1e21124076-6674393fe7.zip +0 -0
- package/.yarn/cache/css-prefers-color-scheme-npm-8.0.1-66ab97dc9a-766ff644d4.zip +0 -0
- package/.yarn/cache/cssdb-npm-7.4.1-8827244a56-c58803ce3e.zip +0 -0
- package/.yarn/cache/esbuild-linux-64-npm-0.14.54-2cb8070ade-8.zip +0 -0
- package/.yarn/cache/esbuild-npm-0.14.54-b3dcd8a41e-49e360b118.zip +0 -0
- package/.yarn/cache/postcss-attribute-case-insensitive-npm-6.0.1-53cf4e827e-1feb61c031.zip +0 -0
- package/.yarn/cache/postcss-color-functional-notation-npm-5.0.1-3124cba045-1525779b2d.zip +0 -0
- package/.yarn/cache/postcss-color-hex-alpha-npm-9.0.1-4de0057ece-3f35134833.zip +0 -0
- package/.yarn/cache/postcss-color-rebeccapurple-npm-8.0.1-60be592329-ea141bf9ca.zip +0 -0
- package/.yarn/cache/postcss-custom-media-npm-9.1.1-1a3a67cb63-3694c53423.zip +0 -0
- package/.yarn/cache/postcss-custom-properties-npm-13.1.1-31267ed000-21af14e82a.zip +0 -0
- package/.yarn/cache/postcss-custom-selectors-npm-7.1.1-74894a31ad-df79db6237.zip +0 -0
- package/.yarn/cache/postcss-dir-pseudo-class-npm-7.0.1-76e71e42f9-4d1c204e13.zip +0 -0
- package/.yarn/cache/postcss-double-position-gradients-npm-4.0.1-53c9bf55aa-8f17f35082.zip +0 -0
- package/.yarn/cache/postcss-focus-visible-npm-8.0.1-7126799e89-6d6734ba0a.zip +0 -0
- package/.yarn/cache/postcss-focus-within-npm-7.0.1-0434464641-c110a45427.zip +0 -0
- package/.yarn/cache/postcss-gap-properties-npm-4.0.1-2b5cdc5f7e-21a5d5525d.zip +0 -0
- package/.yarn/cache/postcss-image-set-function-npm-5.0.1-f7dd97337c-bd55be8ee1.zip +0 -0
- package/.yarn/cache/postcss-lab-function-npm-5.0.1-7c27612597-bdca34254b.zip +0 -0
- package/.yarn/cache/postcss-logical-npm-6.0.1-3465206299-cb1812fb55.zip +0 -0
- package/.yarn/cache/postcss-nesting-npm-11.1.0-29caff6110-639392ca69.zip +0 -0
- package/.yarn/cache/postcss-opacity-percentage-npm-1.1.3-552e884ed7-54d1b8ca68.zip +0 -0
- package/.yarn/cache/postcss-overflow-shorthand-npm-4.0.1-ca060456c3-f0efcea4fb.zip +0 -0
- package/.yarn/cache/postcss-place-npm-8.0.1-b45b2668b9-c812c858aa.zip +0 -0
- package/.yarn/cache/postcss-preset-env-npm-8.0.1-a400fc01d4-18326a03dd.zip +0 -0
- package/.yarn/cache/postcss-pseudo-class-any-link-npm-8.0.1-c80df879bb-f84b0fe4c0.zip +0 -0
- package/.yarn/cache/postcss-selector-not-npm-7.0.1-8f1507853b-4dec95f785.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/package.json +3 -2
- package/playground/PlaygroundApp.res +45 -9
- package/playground/PlaygroundComponents.res +16 -0
- package/playground/PlaygroundHooks.res +111 -0
- package/playground/PlaygroundRouter.res +19 -0
- package/playground/components/Playground_Accordion.res +2 -2
- package/playground/components/Playground_Button.res +16 -0
- package/playground/components/Playground_Checkbox.res +60 -0
- package/playground/components/Playground_Combobox.res +38 -0
- package/playground/components/Playground_DropdownList.res +40 -0
- package/playground/{stories/Toolkit__UI_FormStory.res → components/Playground_Form.res} +58 -33
- package/playground/components/Playground_IconButton.res +65 -0
- package/playground/components/Playground_MultiSelect.res +1 -1
- package/playground/components/Playground_ProgressBar.res +33 -0
- package/playground/components/Playground_Radio.res +23 -0
- package/playground/components/Playground_Reference.res +16 -0
- package/playground/components/Playground_RichText.res +22 -0
- package/playground/components/Playground_Select.res +86 -0
- package/playground/components/Playground_Table.res +45 -0
- package/playground/components/Playground_Tabs.res +53 -0
- package/playground/components/Playground_Tag.res +52 -0
- package/playground/components/Playground_TextInput.res +23 -0
- package/playground/components/Playground_Tooltip.res +90 -0
- package/playground/design/DesignSystem_Colors.mdx +0 -2
- package/playground/design/DesignSystem_Fonts.mdx +0 -2
- package/playground/design/DesignSystem_MediaQueries.mdx +0 -2
- package/playground/design/TailwindConfigBreakpoints.jsx +1 -1
- package/playground/design/TailwindConfigColorsPreview.jsx +2 -2
- package/playground/design/TailwindConfigFontsPreview.jsx +1 -1
- package/playground/hooks/Playground_Clipboard.res +19 -0
- package/playground/hooks/Playground_Disclosure.res +24 -0
- package/playground/hooks/Playground_LazyLoad.res +31 -0
- package/playground/hooks/Playground_MediaQueries.res +11 -0
- package/public/_redirects +1 -0
- package/src/form/Toolkit__Form.res +2 -2
- package/src/form/Toolkit__FormValidationFunctions.res +13 -0
- package/src/router/Toolkit__Router.res +2 -2
- package/src/ui/Toolkit__Ui_Alert.res +4 -4
- package/src/ui/Toolkit__Ui_Button.res +40 -5
- package/src/ui/Toolkit__Ui_Button.resi +3 -2
- package/src/ui/Toolkit__Ui_Card.res +4 -4
- package/src/ui/Toolkit__Ui_Checkbox.res +1 -1
- package/src/ui/Toolkit__Ui_CopyWrapper.res +1 -1
- package/src/ui/Toolkit__Ui_Layout.res +11 -6
- package/src/ui/Toolkit__Ui_ListboxInput.res +3 -3
- package/src/ui/Toolkit__Ui_Modal.res +1 -1
- package/src/ui/Toolkit__Ui_MultiSelect.res +1 -1
- package/src/ui/Toolkit__Ui_Radio.res +1 -1
- package/src/ui/Toolkit__Ui_Reference.res +1 -5
- package/src/ui/Toolkit__Ui_Select.res +1 -1
- package/src/ui/Toolkit__Ui_Snackbar.res +4 -4
- package/src/ui/Toolkit__Ui_Table.res +2 -2
- package/src/ui/Toolkit__Ui_WeekDateFilter.res +2 -2
- package/src/vendors/{BsReactIcons.res → ReactIcons.res} +14 -0
- package/vite.config.js +2 -0
- package/.yarn/cache/@csstools-postcss-cascade-layers-npm-1.1.1-4382e19cf0-8ecd6a929e.zip +0 -0
- package/.yarn/cache/@csstools-postcss-color-function-npm-1.1.1-7c5a0199ae-087595985e.zip +0 -0
- package/.yarn/cache/@csstools-postcss-font-format-keywords-npm-1.0.1-ef1db49912-ed8d9eab97.zip +0 -0
- package/.yarn/cache/@csstools-postcss-hwb-function-npm-1.0.2-f3f621e351-352ead754a.zip +0 -0
- package/.yarn/cache/@csstools-postcss-ic-unit-npm-1.0.1-111638e451-09c414c9b7.zip +0 -0
- package/.yarn/cache/@csstools-postcss-is-pseudo-class-npm-2.0.7-c85939401b-a4494bb8e9.zip +0 -0
- package/.yarn/cache/@csstools-postcss-nested-calc-npm-1.0.0-8028506411-53bb783dd6.zip +0 -0
- package/.yarn/cache/@csstools-postcss-normalize-display-values-npm-1.0.1-53721ce3eb-75901daec3.zip +0 -0
- package/.yarn/cache/@csstools-postcss-oklab-function-npm-1.1.1-2907029cf1-d66b789060.zip +0 -0
- package/.yarn/cache/@csstools-postcss-progressive-custom-properties-npm-1.3.0-1e56504855-e281845fde.zip +0 -0
- package/.yarn/cache/@csstools-postcss-stepped-value-functions-npm-1.0.1-01aa1138bd-2fc88713a0.zip +0 -0
- package/.yarn/cache/@csstools-postcss-text-decoration-shorthand-npm-1.0.0-96f61ef9fe-d27aaf9787.zip +0 -0
- package/.yarn/cache/@csstools-postcss-trigonometric-functions-npm-1.0.2-4553514702-f7f5b5f249.zip +0 -0
- package/.yarn/cache/@csstools-postcss-unset-value-npm-1.0.2-f57c79bfc4-3facdae154.zip +0 -0
- package/.yarn/cache/css-blank-pseudo-npm-3.0.3-af86e84805-9be0a13885.zip +0 -0
- package/.yarn/cache/css-has-pseudo-npm-3.0.4-e97bb61896-8f165d68f6.zip +0 -0
- package/.yarn/cache/css-prefers-color-scheme-npm-6.0.3-e1c91bc5cd-3a2b02f045.zip +0 -0
- package/.yarn/cache/cssdb-npm-7.2.0-ce2edad2c6-a571955eac.zip +0 -0
- package/.yarn/cache/postcss-attribute-case-insensitive-npm-5.0.2-6aa24bfafa-c0b8139f37.zip +0 -0
- package/.yarn/cache/postcss-color-functional-notation-npm-4.2.4-8f3a9400c3-b763e164fe.zip +0 -0
- package/.yarn/cache/postcss-color-hex-alpha-npm-8.0.4-88605e8cec-a2f3173a60.zip +0 -0
- package/.yarn/cache/postcss-color-rebeccapurple-npm-7.1.1-b7828c0a0c-03482f9b81.zip +0 -0
- package/.yarn/cache/postcss-custom-media-npm-8.0.2-5ad89ea0fe-887bbbacf6.zip +0 -0
- package/.yarn/cache/postcss-custom-properties-npm-12.1.11-78be1c709e-421f9d8d6b.zip +0 -0
- package/.yarn/cache/postcss-custom-selectors-npm-6.0.3-0a63667536-18080d60a8.zip +0 -0
- package/.yarn/cache/postcss-dir-pseudo-class-npm-6.0.5-2555aeb05f-7810c439d8.zip +0 -0
- package/.yarn/cache/postcss-double-position-gradients-npm-3.1.2-278f758391-ca09bf2aef.zip +0 -0
- package/.yarn/cache/postcss-env-function-npm-4.0.6-2282fa7c63-645b2363cf.zip +0 -0
- package/.yarn/cache/postcss-focus-visible-npm-6.0.4-2eb1d7ff31-acd010b9dd.zip +0 -0
- package/.yarn/cache/postcss-focus-within-npm-5.0.4-d70f73ac5d-f23d8ab757.zip +0 -0
- package/.yarn/cache/postcss-gap-properties-npm-3.0.5-78f268ad64-aed559d6d3.zip +0 -0
- package/.yarn/cache/postcss-image-set-function-npm-4.0.7-46769dca3e-7e50933098.zip +0 -0
- package/.yarn/cache/postcss-lab-function-npm-4.2.1-1ebd916151-26ac74b430.zip +0 -0
- package/.yarn/cache/postcss-logical-npm-5.0.4-cf11b97479-17c71291ed.zip +0 -0
- package/.yarn/cache/postcss-nesting-npm-10.2.0-eec5f664e8-25e6e66186.zip +0 -0
- package/.yarn/cache/postcss-opacity-percentage-npm-1.1.2-3f7d2b6abb-b582f6d4ef.zip +0 -0
- package/.yarn/cache/postcss-overflow-shorthand-npm-3.0.4-b5a0785c77-7400902249.zip +0 -0
- package/.yarn/cache/postcss-place-npm-7.0.5-895593f8b4-903fec0c31.zip +0 -0
- package/.yarn/cache/postcss-preset-env-npm-7.8.3-242e470fd9-71bfb697ff.zip +0 -0
- package/.yarn/cache/postcss-pseudo-class-any-link-npm-7.1.6-1a34600b0e-43aa18ea1e.zip +0 -0
- package/.yarn/cache/postcss-selector-not-npm-6.0.1-135f19a20c-fe523a0219.zip +0 -0
- package/playground/stories/Storybook.res +0 -178
- package/playground/stories/Toolkit__Hooks_ClipboardStory.res +0 -44
- package/playground/stories/Toolkit__Hooks_DisclosureStory.res +0 -56
- package/playground/stories/Toolkit__Hooks_LazyLoadStory.res +0 -58
- package/playground/stories/Toolkit__UI_CheckboxStory.res +0 -150
- package/playground/stories/Toolkit__UI_ComboboxStory.res +0 -64
- package/playground/stories/Toolkit__UI_DropdownListStory.res +0 -89
- package/playground/stories/Toolkit__UI_IconButtonStory.res +0 -140
- package/playground/stories/Toolkit__UI_NativeDatePickerStory.res +0 -60
- package/playground/stories/Toolkit__UI_PortalDropdownStory.res +0 -40
- package/playground/stories/Toolkit__UI_RadioStory.res +0 -128
- package/playground/stories/Toolkit__UI_ReferenceStory.res +0 -37
- package/playground/stories/Toolkit__UI_RichTextStory.res +0 -40
- package/playground/stories/Toolkit__UI_SelectStory.res +0 -153
- package/playground/stories/Toolkit__UI_TableStory.res +0 -103
- package/playground/stories/Toolkit__UI_TableStory.resi +0 -3
- package/playground/stories/Toolkit__UI_TabsStory.res +0 -52
- package/playground/stories/Toolkit__UI_TagStory.res +0 -160
- package/playground/stories/Toolkit__UI_TextInputStory.res +0 -71
- package/playground/stories/Toolkit__UI_TooltipStory.res +0 -136
- package/playground/stories/Toolkit__Ui_ProgressBarStory.res +0 -49
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
type \"export" = {title: string}
|
|
2
|
-
|
|
3
|
-
module Main = {
|
|
4
|
-
type chapter = unit => React.element
|
|
5
|
-
|
|
6
|
-
type section
|
|
7
|
-
|
|
8
|
-
@val @module("@storybook/react")
|
|
9
|
-
external storiesOf: (string, 'a) => section = "storiesOf"
|
|
10
|
-
|
|
11
|
-
@send external extAdd: (section, string, chapter) => unit = "add"
|
|
12
|
-
|
|
13
|
-
type decorator = chapter => React.element
|
|
14
|
-
|
|
15
|
-
@send external addDecorator: (section, decorator) => unit = "addDecorator"
|
|
16
|
-
|
|
17
|
-
type webpackModule
|
|
18
|
-
|
|
19
|
-
type chapterAdd = (string, chapter) => unit
|
|
20
|
-
|
|
21
|
-
type story = {add: chapterAdd}
|
|
22
|
-
|
|
23
|
-
let createStory = (
|
|
24
|
-
~title: string,
|
|
25
|
-
~decorators: list<decorator>,
|
|
26
|
-
~_module: webpackModule,
|
|
27
|
-
(),
|
|
28
|
-
): story => {
|
|
29
|
-
let story = storiesOf(title, _module)
|
|
30
|
-
decorators->List.forEach(dec => addDecorator(story, dec))
|
|
31
|
-
{add: (name: string, c: chapter) => extAdd(story, name, c)}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
module Story = {
|
|
36
|
-
type section
|
|
37
|
-
|
|
38
|
-
type webpackModule
|
|
39
|
-
|
|
40
|
-
type chapter = unit => React.element
|
|
41
|
-
|
|
42
|
-
type decorator = chapter => React.element
|
|
43
|
-
|
|
44
|
-
@val @module("@storybook/react")
|
|
45
|
-
external storiesOf: (string, webpackModule) => section = "storiesOf"
|
|
46
|
-
|
|
47
|
-
@send external add: (section, string, chapter) => section = "add"
|
|
48
|
-
|
|
49
|
-
@send external addDecorator: (section, decorator) => section = "addDecorator"
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
module CSF = {
|
|
53
|
-
type csfStory = unit => React.element
|
|
54
|
-
type decorator = csfStory => React.element
|
|
55
|
-
|
|
56
|
-
type csfMetadata<'params> = {
|
|
57
|
-
title: string,
|
|
58
|
-
component: Js.Nullable.t<unit => React.element>,
|
|
59
|
-
decorators: Js.Nullable.t<array<decorator>>,
|
|
60
|
-
parameters: Js.Nullable.t<'params>,
|
|
61
|
-
includeStories: Js.Nullable.t<array<string>>,
|
|
62
|
-
excludeStories: Js.Nullable.t<array<string>>,
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
type storyMetadata<'params> = {
|
|
66
|
-
name: Js.Nullable.t<string>,
|
|
67
|
-
decorators: Js.Nullable.t<array<decorator>>,
|
|
68
|
-
parameters: Js.Nullable.t<'params>,
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@ocaml.doc("
|
|
72
|
-
* Bucklescript renames a variables called `default` to `$$default` and exports that as well.
|
|
73
|
-
")
|
|
74
|
-
let bsExports = ["$$default"]
|
|
75
|
-
|
|
76
|
-
@set
|
|
77
|
-
external story: (csfStory, storyMetadata<'params>) => unit = "story"
|
|
78
|
-
|
|
79
|
-
let make = (
|
|
80
|
-
~title,
|
|
81
|
-
~component=?,
|
|
82
|
-
~decorators=?,
|
|
83
|
-
~parameters=?,
|
|
84
|
-
~includeStories=?,
|
|
85
|
-
~excludeStories=?,
|
|
86
|
-
(),
|
|
87
|
-
) => {
|
|
88
|
-
title: title,
|
|
89
|
-
component: component->Js.Nullable.fromOption,
|
|
90
|
-
decorators: decorators->Js.Nullable.fromOption,
|
|
91
|
-
parameters: parameters->Js.Nullable.fromOption,
|
|
92
|
-
includeStories: includeStories->Js.Nullable.fromOption,
|
|
93
|
-
excludeStories: excludeStories
|
|
94
|
-
->Belt.Option.mapWithDefault(bsExports, es => es->Js.Array2.concat(bsExports))
|
|
95
|
-
->Js.Nullable.return,
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
let addMeta = (csfStory, ~name=?, ~decorators=?, ~parameters=?, ()) =>
|
|
99
|
-
csfStory->story({
|
|
100
|
-
name: name->Js.Nullable.fromOption,
|
|
101
|
-
decorators: decorators->Js.Nullable.fromOption,
|
|
102
|
-
parameters: parameters->Js.Nullable.fromOption,
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
module Knobs = {
|
|
107
|
-
@module("@storybook/addon-knobs")
|
|
108
|
-
external withKnobs: Main.decorator = "withKnobs"
|
|
109
|
-
|
|
110
|
-
@module("@storybook/addon-knobs")
|
|
111
|
-
external boolean: (string, bool) => bool = "boolean"
|
|
112
|
-
|
|
113
|
-
@module("@storybook/addon-knobs")
|
|
114
|
-
external select: (string, Js.Dict.t<'a>, 'a) => 'a = "select"
|
|
115
|
-
|
|
116
|
-
@module("@storybook/addon-knobs")
|
|
117
|
-
external array: (string, array<'a>, 'a) => string = "array"
|
|
118
|
-
|
|
119
|
-
@module("@storybook/addon-knobs")
|
|
120
|
-
external text: (string, string) => string = "text"
|
|
121
|
-
|
|
122
|
-
@module("@storybook/addon-knobs")
|
|
123
|
-
external int: (string, int) => int = "number"
|
|
124
|
-
|
|
125
|
-
@module("@storybook/addon-knobs")
|
|
126
|
-
external float: (string, float) => string = "number"
|
|
127
|
-
|
|
128
|
-
type range<'v> = {
|
|
129
|
-
range: bool,
|
|
130
|
-
min: 'v,
|
|
131
|
-
max: 'v,
|
|
132
|
-
step: int,
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@module("@storybook/addon-knobs")
|
|
136
|
-
external intRange: (string, int, range<int>) => string = "number"
|
|
137
|
-
|
|
138
|
-
@module("@storybook/addon-knobs")
|
|
139
|
-
external floatRange: (string, float, range<float>) => string = "number"
|
|
140
|
-
|
|
141
|
-
@module("@storybook/addon-knobs")
|
|
142
|
-
external date: (string, Js.Date.t) => string = "date"
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
module Docs = {
|
|
146
|
-
module Title = {
|
|
147
|
-
@module("@storybook/addon-docs/blocks") @react.component
|
|
148
|
-
external make: unit => React.element = "Title"
|
|
149
|
-
}
|
|
150
|
-
module Subtitle = {
|
|
151
|
-
@module("@storybook/addon-docs/blocks") @react.component
|
|
152
|
-
external make: unit => React.element = "Subtitle"
|
|
153
|
-
}
|
|
154
|
-
module Description = {
|
|
155
|
-
@module("@storybook/addon-docs/blocks") @react.component
|
|
156
|
-
external make: unit => React.element = "Description"
|
|
157
|
-
}
|
|
158
|
-
module Story = {
|
|
159
|
-
@module("@storybook/addon-docs/blocks") @react.component
|
|
160
|
-
external make: (~id: string) => React.element = "Story"
|
|
161
|
-
}
|
|
162
|
-
module Source = {
|
|
163
|
-
@module("@storybook/addon-docs/blocks") @react.component
|
|
164
|
-
external make: (~language: string, ~code: string) => React.element = "Source"
|
|
165
|
-
}
|
|
166
|
-
module Link = {
|
|
167
|
-
@react.component
|
|
168
|
-
let make = (~href: string, ~children) =>
|
|
169
|
-
<a href className="text-info-500 underline hover:text-info-400" target="_blank">
|
|
170
|
-
{children}
|
|
171
|
-
</a>
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
module CodeBlock = {
|
|
176
|
-
@module("../../../.storybook/CodeBlock.js") @react.component
|
|
177
|
-
external make: (~children: React.element) => React.element = "default"
|
|
178
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
|
|
3
|
-
let default = CSF.make(~title="Hooks/useClipboard", ())
|
|
4
|
-
|
|
5
|
-
let useClipboard = () => {
|
|
6
|
-
let clipboard = Toolkit.Hooks.useClipboard(
|
|
7
|
-
~onCopyNotificationMessage="Copied !",
|
|
8
|
-
"copied content",
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
<>
|
|
12
|
-
<Toolkit.Ui.Snackbar.Provider />
|
|
13
|
-
<Toolkit.Ui.Button onClick={_ => clipboard.copy()}> {"Copy"->React.string} </Toolkit.Ui.Button>
|
|
14
|
-
</>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
useClipboard->CSF.addMeta(
|
|
18
|
-
~name="example",
|
|
19
|
-
~parameters={
|
|
20
|
-
"docs": {
|
|
21
|
-
"page": () => <>
|
|
22
|
-
<Docs.Source
|
|
23
|
-
language="rescript"
|
|
24
|
-
code=j`
|
|
25
|
-
let clipboard =
|
|
26
|
-
Toolkit.Hooks.useClipboard(
|
|
27
|
-
~onCopyNotificationMessage="Copied !",
|
|
28
|
-
"copied content",
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
<>
|
|
32
|
-
<Toolkit.Ui.Snackbar.Provider />
|
|
33
|
-
<Toolkit.Ui.Button onClick={_ => clipboard.copy()}>
|
|
34
|
-
"Copy"->React.string
|
|
35
|
-
</Toolkit.Ui.Button>
|
|
36
|
-
</>;
|
|
37
|
-
`
|
|
38
|
-
/>
|
|
39
|
-
<Docs.Story id="hooks-useclipboard--use-clipboard" />
|
|
40
|
-
</>,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
(),
|
|
44
|
-
)
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
|
|
3
|
-
let default = CSF.make(~title="Hooks/useDisclosure", ())
|
|
4
|
-
|
|
5
|
-
let useDisclosure = () => {
|
|
6
|
-
let disclosure = Toolkit.Hooks.useDisclosure()
|
|
7
|
-
|
|
8
|
-
<div className="grid grid-cols-2 gap-4 w-64">
|
|
9
|
-
<div className="grid grid-rows-3 gap-4">
|
|
10
|
-
<Toolkit.Ui.Button onClick={_ => disclosure.toggle()}>
|
|
11
|
-
{"Toggle"->React.string}
|
|
12
|
-
</Toolkit.Ui.Button>
|
|
13
|
-
<Toolkit.Ui.Button onClick={_ => disclosure.show()}>
|
|
14
|
-
{"Show"->React.string}
|
|
15
|
-
</Toolkit.Ui.Button>
|
|
16
|
-
<Toolkit.Ui.Button onClick={_ => disclosure.hide()}>
|
|
17
|
-
{"Hide"->React.string}
|
|
18
|
-
</Toolkit.Ui.Button>
|
|
19
|
-
</div>
|
|
20
|
-
<p> {(disclosure.isOpen ? "Visible" : "hidden")->React.string} </p>
|
|
21
|
-
</div>
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
useDisclosure->CSF.addMeta(
|
|
25
|
-
~name="example",
|
|
26
|
-
~parameters={
|
|
27
|
-
"docs": {
|
|
28
|
-
"page": () => <>
|
|
29
|
-
// <CodeBlock> source </CodeBlock>
|
|
30
|
-
<Docs.Source
|
|
31
|
-
language="rescript"
|
|
32
|
-
code=j`
|
|
33
|
-
let disclosure = Toolkit.Hooks.useDisclosure();
|
|
34
|
-
|
|
35
|
-
<div className="grid grid-cols-2 gap-4 w-64">
|
|
36
|
-
<div className="grid grid-rows-3 gap-4">
|
|
37
|
-
<Toolkit.Ui.Button onClick={_ => disclosure.toggle()}>
|
|
38
|
-
"Toggle"->React.string
|
|
39
|
-
</Toolkit.Ui.Button>
|
|
40
|
-
<Toolkit.Ui.Button onClick={_ => disclosure.show()}>
|
|
41
|
-
"Show"->React.string
|
|
42
|
-
</Toolkit.Ui.Button>
|
|
43
|
-
<Toolkit.Ui.Button onClick={_ => disclosure.hide()}>
|
|
44
|
-
"Hide"->React.string
|
|
45
|
-
</Toolkit.Ui.Button>
|
|
46
|
-
</div>
|
|
47
|
-
<p> (disclosure.isOpen ? "Visible" : "hidden")->React.string </p>
|
|
48
|
-
</div>;
|
|
49
|
-
`
|
|
50
|
-
/>
|
|
51
|
-
<Docs.Story id="hooks-usedisclosure--use-disclosure" />
|
|
52
|
-
</>,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
(),
|
|
56
|
-
)
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
|
|
3
|
-
let default = CSF.make(~title="Hooks/useLazyLoad", ())
|
|
4
|
-
|
|
5
|
-
let useLazyLoad = () => {
|
|
6
|
-
let ref = React.useRef(Js.Nullable.null)
|
|
7
|
-
let intersection = ReactUse.useIntersection(
|
|
8
|
-
ref,
|
|
9
|
-
{
|
|
10
|
-
root: Js.Nullable.null,
|
|
11
|
-
rootMargin: "0px",
|
|
12
|
-
threshold: 1.,
|
|
13
|
-
},
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
<div
|
|
17
|
-
className={cx([
|
|
18
|
-
"h-[600px] w-64 overflow-scroll border",
|
|
19
|
-
switch intersection->Js.Nullable.toOption {
|
|
20
|
-
| Some({intersectionRatio}) if intersectionRatio < 1. => ""
|
|
21
|
-
| _ => "bg-info-100"
|
|
22
|
-
},
|
|
23
|
-
])}>
|
|
24
|
-
<p className="h-[500px]">
|
|
25
|
-
{"The background will change when the text at the end will be visible in the viewport."->React.string}
|
|
26
|
-
</p>
|
|
27
|
-
<p ref={ReactDOM.Ref.domRef(ref)}> {"not visible"->React.string} </p>
|
|
28
|
-
</div>
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
useLazyLoad->CSF.addMeta(
|
|
32
|
-
~name="example",
|
|
33
|
-
~parameters={
|
|
34
|
-
"docs": {
|
|
35
|
-
"page": () => <>
|
|
36
|
-
<Docs.Source
|
|
37
|
-
language="rescript"
|
|
38
|
-
code=j`
|
|
39
|
-
let clipboard =
|
|
40
|
-
Toolkit.Hooks.useClipboard(
|
|
41
|
-
~onCopyNotificationMessage="Copied !",
|
|
42
|
-
"copied content",
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
<>
|
|
46
|
-
<Toolkit.Ui.Snackbar.Provider />
|
|
47
|
-
<Toolkit.Ui.Button onClick={_ => clipboard.copy()}>
|
|
48
|
-
"Copy"->React.string
|
|
49
|
-
</Toolkit.Ui.Button>
|
|
50
|
-
</>;
|
|
51
|
-
`
|
|
52
|
-
/>
|
|
53
|
-
<Docs.Story id="hooks-useclipboard--use-clipboard" />
|
|
54
|
-
</>,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
(),
|
|
58
|
-
)
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
open Toolkit__Ui
|
|
3
|
-
|
|
4
|
-
@module("!!raw-loader!../../../src/ui/Toolkit__Ui_Checkbox.resi")
|
|
5
|
-
external source: 'a = "default"
|
|
6
|
-
|
|
7
|
-
let default = CSF.make(~title="Form/Checkbox", ())
|
|
8
|
-
|
|
9
|
-
let sample = () => {
|
|
10
|
-
let (checked, setChecked) = React.useState(() => true)
|
|
11
|
-
|
|
12
|
-
<div>
|
|
13
|
-
<Checkbox name="test" value="test"> {"children"->React.string} </Checkbox>
|
|
14
|
-
<Checkbox
|
|
15
|
-
name="test2" value="test" inverseLabel={true} checkedClassname="border border-success-500">
|
|
16
|
-
{"children"->React.string}
|
|
17
|
-
</Checkbox>
|
|
18
|
-
<br />
|
|
19
|
-
<Checkbox
|
|
20
|
-
name="test2"
|
|
21
|
-
value="test"
|
|
22
|
-
inverseLabel={true}
|
|
23
|
-
checkedClassname="border border-success-500"
|
|
24
|
-
hideLabel={true}>
|
|
25
|
-
{"children"->React.string}
|
|
26
|
-
</Checkbox>
|
|
27
|
-
<br />
|
|
28
|
-
<div className="w-64">
|
|
29
|
-
<p> {"controlled"->React.string} </p>
|
|
30
|
-
<Checkbox
|
|
31
|
-
name="test2"
|
|
32
|
-
value="test"
|
|
33
|
-
checked
|
|
34
|
-
onChange={(checked, _) => setChecked(_ => checked)}
|
|
35
|
-
checkedClassname="border border-success-500"
|
|
36
|
-
hideLabel={true}>
|
|
37
|
-
{"children"->React.string}
|
|
38
|
-
</Checkbox>
|
|
39
|
-
<button onClick={_ => setChecked(c => !c)}> {"toggle"->React.string} </button>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
sample->CSF.addMeta(
|
|
45
|
-
~name="sample",
|
|
46
|
-
~parameters={
|
|
47
|
-
"docs": {
|
|
48
|
-
"page": () => <>
|
|
49
|
-
<CodeBlock> source </CodeBlock>
|
|
50
|
-
<Docs.Source
|
|
51
|
-
language="rescript"
|
|
52
|
-
code=j`
|
|
53
|
-
<Checkbox name="test" value="test"> "children"->React.string </Checkbox>
|
|
54
|
-
`
|
|
55
|
-
/>
|
|
56
|
-
<Docs.Story id="form-checkbox--sample" />
|
|
57
|
-
</>,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
(),
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
let checked = () =>
|
|
64
|
-
<Checkbox checked=true name="test" value="test"> {"children"->React.string} </Checkbox>
|
|
65
|
-
|
|
66
|
-
checked->CSF.addMeta(
|
|
67
|
-
~name="checked",
|
|
68
|
-
~parameters={
|
|
69
|
-
"docs": {
|
|
70
|
-
"page": () => <>
|
|
71
|
-
<CodeBlock> source </CodeBlock>
|
|
72
|
-
<Docs.Source
|
|
73
|
-
language="rescript"
|
|
74
|
-
code=j`
|
|
75
|
-
<Checkbox name="test" checked=true value="test"> "children"->React.string </Checkbox>
|
|
76
|
-
`
|
|
77
|
-
/>
|
|
78
|
-
<Docs.Story id="form-checkbox--checked" />
|
|
79
|
-
</>,
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
(),
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
let sizes = () => <>
|
|
86
|
-
<Checkbox checked=true name="test" value="test" size=#xs className="mb-4">
|
|
87
|
-
{"xs"->React.string}
|
|
88
|
-
</Checkbox>
|
|
89
|
-
<Checkbox checked=true name="test" value="test" size=#sm className="mb-4">
|
|
90
|
-
{"sm"->React.string}
|
|
91
|
-
</Checkbox>
|
|
92
|
-
<Checkbox checked=true name="test" value="test" size=#md className="mb-4">
|
|
93
|
-
{"md"->React.string}
|
|
94
|
-
</Checkbox>
|
|
95
|
-
<Checkbox checked=true name="test" value="test" size=#lg className="mb-4">
|
|
96
|
-
{"lg"->React.string}
|
|
97
|
-
</Checkbox>
|
|
98
|
-
</>
|
|
99
|
-
|
|
100
|
-
sizes->CSF.addMeta(
|
|
101
|
-
~name="sizes",
|
|
102
|
-
~parameters={
|
|
103
|
-
"docs": {
|
|
104
|
-
"page": () => <>
|
|
105
|
-
<CodeBlock> source </CodeBlock>
|
|
106
|
-
<Docs.Source
|
|
107
|
-
language="rescript"
|
|
108
|
-
code=j`
|
|
109
|
-
<>
|
|
110
|
-
<Checkbox
|
|
111
|
-
checked=true
|
|
112
|
-
name="test"
|
|
113
|
-
value="test"
|
|
114
|
-
size=#xs
|
|
115
|
-
className="mb-4">
|
|
116
|
-
"xs"->React.string
|
|
117
|
-
</Checkbox>
|
|
118
|
-
<Checkbox
|
|
119
|
-
checked=true
|
|
120
|
-
name="test"
|
|
121
|
-
value="test"
|
|
122
|
-
size=#sm
|
|
123
|
-
className="mb-4">
|
|
124
|
-
"sm"->React.string
|
|
125
|
-
</Checkbox>
|
|
126
|
-
<Checkbox
|
|
127
|
-
checked=true
|
|
128
|
-
name="test"
|
|
129
|
-
value="test"
|
|
130
|
-
size=#md
|
|
131
|
-
className="mb-4">
|
|
132
|
-
"md"->React.string
|
|
133
|
-
</Checkbox>
|
|
134
|
-
<Checkbox
|
|
135
|
-
checked=true
|
|
136
|
-
name="test"
|
|
137
|
-
value="test"
|
|
138
|
-
size=#lg
|
|
139
|
-
className="mb-4">
|
|
140
|
-
"lg"->React.string
|
|
141
|
-
</Checkbox>
|
|
142
|
-
</>
|
|
143
|
-
`
|
|
144
|
-
/>
|
|
145
|
-
<Docs.Story id="form-checkbox--sizes" />
|
|
146
|
-
</>,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
(),
|
|
150
|
-
)
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
open ReachUi.Combobox
|
|
3
|
-
|
|
4
|
-
let default = CSF.make(~title="Components/Combobox", ())
|
|
5
|
-
|
|
6
|
-
let example = () =>
|
|
7
|
-
<div className="w-60">
|
|
8
|
-
<Combobox onSelect={value => Js.log(value)}>
|
|
9
|
-
<ComboboxInput
|
|
10
|
-
onChange={event => ReactEvent.Form.target(event)["value"]->Js.log} selectOnClick=true
|
|
11
|
-
/>
|
|
12
|
-
<ComboboxPopover>
|
|
13
|
-
<ComboboxList>
|
|
14
|
-
<ComboboxOption value="test"> <ComboboxOptionText /> </ComboboxOption>
|
|
15
|
-
<ComboboxOption value="test2"> <ComboboxOptionText /> </ComboboxOption>
|
|
16
|
-
<ComboboxOption value="test4"> <ComboboxOptionText /> </ComboboxOption>
|
|
17
|
-
<ComboboxOption value="really big return value example an address from google maps">
|
|
18
|
-
<ComboboxOptionText />
|
|
19
|
-
</ComboboxOption>
|
|
20
|
-
<ComboboxOption value="toto"> <ComboboxOptionText /> </ComboboxOption>
|
|
21
|
-
<ComboboxOption value="aaa"> <ComboboxOptionText /> </ComboboxOption>
|
|
22
|
-
</ComboboxList>
|
|
23
|
-
</ComboboxPopover>
|
|
24
|
-
</Combobox>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
example->CSF.addMeta(
|
|
28
|
-
~name="example",
|
|
29
|
-
~parameters={
|
|
30
|
-
"docs": {
|
|
31
|
-
"page": () => <>
|
|
32
|
-
<p className="mb-4">
|
|
33
|
-
{"We use "->React.string}
|
|
34
|
-
<Docs.Link href="https://reach.tech/combobox">
|
|
35
|
-
{"@reach/combobox"->React.string}
|
|
36
|
-
</Docs.Link>
|
|
37
|
-
{" plugin"->React.string}
|
|
38
|
-
</p>
|
|
39
|
-
<CodeBlock>
|
|
40
|
-
{j`
|
|
41
|
-
<Combobox onSelect={value => Js.log(value)}>
|
|
42
|
-
<ComboboxInput
|
|
43
|
-
onChange={event => ReactEvent.Form.target(event)["value"]->Js.log} selectOnClick=true
|
|
44
|
-
/>
|
|
45
|
-
<ComboboxPopover>
|
|
46
|
-
<ComboboxList>
|
|
47
|
-
<ComboboxOption value="test"> <ComboboxOptionText /> </ComboboxOption>
|
|
48
|
-
<ComboboxOption value="test2"> <ComboboxOptionText /> </ComboboxOption>
|
|
49
|
-
<ComboboxOption value="test4"> <ComboboxOptionText /> </ComboboxOption>
|
|
50
|
-
<ComboboxOption value="really big return value example an address from google maps">
|
|
51
|
-
<ComboboxOptionText />
|
|
52
|
-
</ComboboxOption>
|
|
53
|
-
<ComboboxOption value="toto"> <ComboboxOptionText /> </ComboboxOption>
|
|
54
|
-
<ComboboxOption value="aaa"> <ComboboxOptionText /> </ComboboxOption>
|
|
55
|
-
</ComboboxList>
|
|
56
|
-
</ComboboxPopover>
|
|
57
|
-
</Combobox>`->React.string}
|
|
58
|
-
</CodeBlock>
|
|
59
|
-
<Docs.Story id="components-combobox--example" />
|
|
60
|
-
</>,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
(),
|
|
64
|
-
)
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
|
|
3
|
-
@module("!!raw-loader!../../../src/ui/Toolkit__Ui_DropdownList.resi")
|
|
4
|
-
external source: 'a = "default"
|
|
5
|
-
|
|
6
|
-
let default = CSF.make(~title="Components/DropdownList", ())
|
|
7
|
-
|
|
8
|
-
let example = () => {
|
|
9
|
-
let items: array<Toolkit__Ui_DropdownList.item> = [
|
|
10
|
-
{
|
|
11
|
-
icon: <BsReactIcons.MdKeyboardArrowRight size={22} />,
|
|
12
|
-
label: "Test"->React.string,
|
|
13
|
-
onClick: () => Js.log("test"),
|
|
14
|
-
className: "",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
icon: <BsReactIcons.MdKeyboardArrowRight size={22} />,
|
|
18
|
-
label: "Test 2"->React.string,
|
|
19
|
-
onClick: () => Js.log("test 2"),
|
|
20
|
-
className: "",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
icon: <BsReactIcons.MdKeyboardArrowRight size={22} />,
|
|
24
|
-
label: "Test 3"->React.string,
|
|
25
|
-
onClick: () => Js.log("test 3"),
|
|
26
|
-
className: "",
|
|
27
|
-
},
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
<div className="flex flex-row gap-8">
|
|
31
|
-
<Toolkit__Ui_DropdownList label={"default bottom"->React.string} items />
|
|
32
|
-
<Toolkit__Ui_DropdownList label={"top"->React.string} position=#top items />
|
|
33
|
-
<div className="absolute top-20 left-40">
|
|
34
|
-
<Toolkit__Ui_DropdownList label={"test"->React.string} items />
|
|
35
|
-
</div>
|
|
36
|
-
<div className="absolute top-20 right-0">
|
|
37
|
-
<Toolkit__Ui_DropdownList label={"test 2"->React.string} defaultIsOpen={true} items />
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
example->CSF.addMeta(
|
|
43
|
-
~name="example",
|
|
44
|
-
~parameters={
|
|
45
|
-
"docs": {
|
|
46
|
-
"page": () => <>
|
|
47
|
-
<CodeBlock> source </CodeBlock>
|
|
48
|
-
<Docs.Source
|
|
49
|
-
language="rescript"
|
|
50
|
-
code=j`
|
|
51
|
-
let items: array<Toolkit__Ui_DropdownList.item> = [
|
|
52
|
-
{
|
|
53
|
-
icon: <BsReactIcons.MdKeyboardArrowRight size={22} />,
|
|
54
|
-
label: "Test"->React.string,
|
|
55
|
-
onClick: () => Js.log("test"),
|
|
56
|
-
className: ""
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
icon: <BsReactIcons.MdKeyboardArrowRight size={22} />,
|
|
60
|
-
label: "Test 2"->React.string,
|
|
61
|
-
onClick: () => Js.log("test 2"),
|
|
62
|
-
className: ""
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
icon: <BsReactIcons.MdKeyboardArrowRight size={22} />,
|
|
66
|
-
label: "Test 3"->React.string,
|
|
67
|
-
onClick: () => Js.log("test 3"),
|
|
68
|
-
className: ""
|
|
69
|
-
},
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
<div className="flex flex-row gap-8">
|
|
73
|
-
<Toolkit__Ui_DropdownList label={"default bottom"->React.string} items />
|
|
74
|
-
<Toolkit__Ui_DropdownList label={"top"->React.string} position=#top items />
|
|
75
|
-
<div className="absolute top-20 left-40">
|
|
76
|
-
<Toolkit__Ui_DropdownList label={"test"->React.string} items />
|
|
77
|
-
</div>
|
|
78
|
-
<div className="absolute top-20 right-0">
|
|
79
|
-
<Toolkit__Ui_DropdownList label={"test 2"->React.string} defaultIsOpen={true} items />
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
`
|
|
83
|
-
/>
|
|
84
|
-
<Docs.Story id="components-dropdown--example" />
|
|
85
|
-
</>,
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
(),
|
|
89
|
-
)
|