@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.
- 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/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
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
open Storybook.Story
|
|
2
|
-
open Storybook
|
|
3
|
-
|
|
4
|
-
open ReachUi
|
|
5
|
-
|
|
6
|
-
let _module = %raw("module")
|
|
7
|
-
|
|
8
|
-
storiesOf("Components/Tabs", _module)
|
|
9
|
-
->addDecorator(Knobs.withKnobs)
|
|
10
|
-
->add("default", () =>
|
|
11
|
-
<div>
|
|
12
|
-
<Tabs className="flex flex-col">
|
|
13
|
-
<TabList className="cw-Tabs">
|
|
14
|
-
<Tab> {"Tab 1"->React.string} </Tab> <Tab> {"Tab 2"->React.string} </Tab>
|
|
15
|
-
</TabList>
|
|
16
|
-
<TabPanels className="mt-4">
|
|
17
|
-
<TabPanel> {"Panel 1"->React.string} </TabPanel>
|
|
18
|
-
<TabPanel> {"Panel 2"->React.string} </TabPanel>
|
|
19
|
-
</TabPanels>
|
|
20
|
-
</Tabs>
|
|
21
|
-
</div>
|
|
22
|
-
)
|
|
23
|
-
->add("big", () =>
|
|
24
|
-
<div>
|
|
25
|
-
<Tabs className="flex flex-col">
|
|
26
|
-
<TabList className="cw-Tabs cw-Tabs--big">
|
|
27
|
-
<Tab> {"Tab 1"->React.string} </Tab> <Tab> {"Tab 2"->React.string} </Tab>
|
|
28
|
-
</TabList>
|
|
29
|
-
<TabPanels className="mt-4">
|
|
30
|
-
<TabPanel> {"Panel 1"->React.string} </TabPanel>
|
|
31
|
-
<TabPanel> {"Panel 2"->React.string} </TabPanel>
|
|
32
|
-
</TabPanels>
|
|
33
|
-
</Tabs>
|
|
34
|
-
</div>
|
|
35
|
-
)
|
|
36
|
-
->add("with render", () =>
|
|
37
|
-
<div>
|
|
38
|
-
<TabsRender className="flex flex-col">
|
|
39
|
-
{({selectedIndex}) => <>
|
|
40
|
-
{("selected index : " ++ selectedIndex->Int.toString)->React.string}
|
|
41
|
-
<TabList className="cw-Tabs">
|
|
42
|
-
<Tab> {"Tab 1"->React.string} </Tab> <Tab> {"Tab 2"->React.string} </Tab>
|
|
43
|
-
</TabList>
|
|
44
|
-
<TabPanels className="mt-4">
|
|
45
|
-
<TabPanel> {"Panel 1"->React.string} </TabPanel>
|
|
46
|
-
<TabPanel> {"Panel 2"->React.string} </TabPanel>
|
|
47
|
-
</TabPanels>
|
|
48
|
-
</>}
|
|
49
|
-
</TabsRender>
|
|
50
|
-
</div>
|
|
51
|
-
)
|
|
52
|
-
->ignore
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
open Toolkit__Ui
|
|
3
|
-
|
|
4
|
-
@module("!!raw-loader!../../../src/ui/Toolkit__Ui_Tag.resi")
|
|
5
|
-
external source: 'a = "default"
|
|
6
|
-
|
|
7
|
-
let default = CSF.make(~title="Components/Tag", ())
|
|
8
|
-
|
|
9
|
-
let palette = () => {
|
|
10
|
-
let colors = Js.Dict.fromArray([
|
|
11
|
-
("black", #black),
|
|
12
|
-
("white", #white),
|
|
13
|
-
("gray", #gray),
|
|
14
|
-
("primary", #primary),
|
|
15
|
-
("info", #info),
|
|
16
|
-
("danger", #danger),
|
|
17
|
-
("warning", #warning),
|
|
18
|
-
("success", #success),
|
|
19
|
-
("neutral", #neutral),
|
|
20
|
-
])
|
|
21
|
-
|
|
22
|
-
let size = Js.Dict.fromArray([("xs", #xs), ("sm", #sm), ("md", #md), ("lg", #lg)])
|
|
23
|
-
<div className="flex flex-col flex-gap-2 flex-1">
|
|
24
|
-
{colors
|
|
25
|
-
->Js.Dict.entries
|
|
26
|
-
->Array.mapWithIndex((i, (key, color)) =>
|
|
27
|
-
<div key={i->Int.toString ++ key->Obj.magic} className="flex items-center flex-col-gap-2">
|
|
28
|
-
{size
|
|
29
|
-
->Js.Dict.entries
|
|
30
|
-
->Array.mapWithIndex((j, (key, size)) =>
|
|
31
|
-
<div key={(i + j)->Int.toString ++ key->Obj.magic}>
|
|
32
|
-
<Tag color size> {"content"->React.string} </Tag>
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
->React.array}
|
|
36
|
-
</div>
|
|
37
|
-
)
|
|
38
|
-
->React.array}
|
|
39
|
-
</div>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
palette->CSF.addMeta(
|
|
43
|
-
~name="palette",
|
|
44
|
-
~parameters={
|
|
45
|
-
"docs": {
|
|
46
|
-
"page": () => <>
|
|
47
|
-
<CodeBlock> source </CodeBlock>
|
|
48
|
-
<Docs.Source
|
|
49
|
-
language="rescript"
|
|
50
|
-
code=j`
|
|
51
|
-
<Tag color size> "content"->React.string </Tag>
|
|
52
|
-
`
|
|
53
|
-
/>
|
|
54
|
-
<Docs.Story id="components-tag--palette" />
|
|
55
|
-
</>,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
(),
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
let plain = () => <Tag color=#gray size=#md> {"content"->React.string} </Tag>
|
|
62
|
-
|
|
63
|
-
plain->CSF.addMeta(
|
|
64
|
-
~name="plain",
|
|
65
|
-
~parameters={
|
|
66
|
-
"docs": {
|
|
67
|
-
"page": () => <>
|
|
68
|
-
<CodeBlock> source </CodeBlock>
|
|
69
|
-
<Docs.Source
|
|
70
|
-
language="rescript"
|
|
71
|
-
code=j`
|
|
72
|
-
<Tag color=#gray size=#md> "content"->React.string </Tag>;
|
|
73
|
-
`
|
|
74
|
-
/>
|
|
75
|
-
<Docs.Story id="components-tag--plain" />
|
|
76
|
-
</>,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
(),
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
let outline = () => {
|
|
83
|
-
let colors = Js.Dict.fromArray([
|
|
84
|
-
("black", #black),
|
|
85
|
-
("white", #white),
|
|
86
|
-
("gray", #gray),
|
|
87
|
-
("primary", #primary),
|
|
88
|
-
("info", #info),
|
|
89
|
-
("danger", #danger),
|
|
90
|
-
("warning", #warning),
|
|
91
|
-
("success", #success),
|
|
92
|
-
("neutral", #neutral),
|
|
93
|
-
])
|
|
94
|
-
|
|
95
|
-
let size = Js.Dict.fromArray([("xs", #xs), ("sm", #sm), ("md", #md), ("lg", #lg)])
|
|
96
|
-
<div className="flex flex-col flex-gap-2 flex-1">
|
|
97
|
-
{colors
|
|
98
|
-
->Js.Dict.entries
|
|
99
|
-
->Array.mapWithIndex((i, (key, color)) =>
|
|
100
|
-
<div key={i->Int.toString ++ key->Obj.magic} className="flex items-center flex-col-gap-2">
|
|
101
|
-
{size
|
|
102
|
-
->Js.Dict.entries
|
|
103
|
-
->Array.mapWithIndex((j, (key, size)) =>
|
|
104
|
-
<div key={(i + j)->Int.toString ++ key->Obj.magic}>
|
|
105
|
-
<Tag variant=#outline color size> {"content"->React.string} </Tag>
|
|
106
|
-
</div>
|
|
107
|
-
)
|
|
108
|
-
->React.array}
|
|
109
|
-
</div>
|
|
110
|
-
)
|
|
111
|
-
->React.array}
|
|
112
|
-
</div>
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
outline->CSF.addMeta(
|
|
116
|
-
~name="outline",
|
|
117
|
-
~parameters={
|
|
118
|
-
"docs": {
|
|
119
|
-
"page": () => <>
|
|
120
|
-
<CodeBlock> source </CodeBlock>
|
|
121
|
-
<Docs.Source
|
|
122
|
-
language="rescript"
|
|
123
|
-
code=`
|
|
124
|
-
<Tag color=#gray variant=#outline size=#md> {"content"->React.string} </Tag>
|
|
125
|
-
`
|
|
126
|
-
/>
|
|
127
|
-
<Docs.Story id="components-tag--outline" />
|
|
128
|
-
</>,
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
(),
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
let withTooltip = () =>
|
|
135
|
-
<Tag
|
|
136
|
-
color=#gray variant=#outline size=#md tooltipLabel={<span> {"some text"->React.string} </span>}>
|
|
137
|
-
{"content"->React.string}
|
|
138
|
-
</Tag>
|
|
139
|
-
|
|
140
|
-
withTooltip->CSF.addMeta(
|
|
141
|
-
~name="withTooltip",
|
|
142
|
-
~parameters={
|
|
143
|
-
"docs": {
|
|
144
|
-
"page": () => <>
|
|
145
|
-
<CodeBlock> source </CodeBlock>
|
|
146
|
-
<Docs.Source
|
|
147
|
-
language="rescript"
|
|
148
|
-
code=`
|
|
149
|
-
<Tag
|
|
150
|
-
color=#gray variant=#outline size=#md tooltipLabel={<span> {"some text"->React.string} </span>}>
|
|
151
|
-
{"content"->React.string}
|
|
152
|
-
</Tag>
|
|
153
|
-
`
|
|
154
|
-
/>
|
|
155
|
-
<Docs.Story id="components-tag--withTooltip" />
|
|
156
|
-
</>,
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
(),
|
|
160
|
-
)
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
open Toolkit__Ui
|
|
3
|
-
|
|
4
|
-
// [@bs.module "!!raw-loader!../../../src/ui/Toolkit__Ui_Label.resi"]
|
|
5
|
-
// external source: 'a = "default";
|
|
6
|
-
|
|
7
|
-
let default = CSF.make(~title="Form/TextInput", ())
|
|
8
|
-
|
|
9
|
-
let sample = () =>
|
|
10
|
-
<div>
|
|
11
|
-
<Label htmlFor="test" optionalMessage={"Optional"->React.string}>
|
|
12
|
-
{"Label"->React.string}
|
|
13
|
-
</Label>
|
|
14
|
-
<TextInput id="test" placeholder="Test" />
|
|
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
|
-
<Label htmlFor="test" optionalMessage={"Optional"->React.string}>
|
|
28
|
-
"Label"->React.string
|
|
29
|
-
</Label>
|
|
30
|
-
<TextInput id="test" placeholder="Test" />
|
|
31
|
-
</div>
|
|
32
|
-
`
|
|
33
|
-
/>
|
|
34
|
-
<Docs.Story id="form-textinput--sample" />
|
|
35
|
-
</>,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
(),
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
let withError = () =>
|
|
42
|
-
<div>
|
|
43
|
-
<Label htmlFor="test" optionalMessage={"Optional"->React.string}>
|
|
44
|
-
{"Label"->React.string}
|
|
45
|
-
</Label>
|
|
46
|
-
<TextInput id="test" placeholder="Test" isInvalid=true />
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
withError->CSF.addMeta(
|
|
50
|
-
~name="withError",
|
|
51
|
-
~parameters={
|
|
52
|
-
"docs": {
|
|
53
|
-
"page": () => <>
|
|
54
|
-
// <CodeBlock> source </CodeBlock>
|
|
55
|
-
<Docs.Source
|
|
56
|
-
language="rescript"
|
|
57
|
-
code=j`
|
|
58
|
-
<div>
|
|
59
|
-
<Label htmlFor="test" optionalMessage={"Optional"->React.string}>
|
|
60
|
-
"Label"->React.string
|
|
61
|
-
</Label>
|
|
62
|
-
<TextInput id="test" placeholder="Test" isInvalid=true />
|
|
63
|
-
</div>;
|
|
64
|
-
`
|
|
65
|
-
/>
|
|
66
|
-
<Docs.Story id="form-textinput--with-error" />
|
|
67
|
-
</>,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
(),
|
|
71
|
-
)
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
open Toolkit__Ui
|
|
3
|
-
|
|
4
|
-
@module("!!raw-loader!../../../src/ui/Toolkit__Ui_Tooltip.resi")
|
|
5
|
-
external source: 'a = "default"
|
|
6
|
-
|
|
7
|
-
let default = CSF.make(
|
|
8
|
-
~title="Components/Tooltip",
|
|
9
|
-
~parameters={
|
|
10
|
-
"docs": {
|
|
11
|
-
"page": () => <>
|
|
12
|
-
<CodeBlock> source </CodeBlock>
|
|
13
|
-
<Docs.Title />
|
|
14
|
-
<Docs.Source
|
|
15
|
-
language="rescript"
|
|
16
|
-
code=j`
|
|
17
|
-
<span>
|
|
18
|
-
<Tooltip canBeShowed=true label={<span> "Label"->React.string </span>}>
|
|
19
|
-
<div> "Hover me"->React.string </div>
|
|
20
|
-
</Tooltip>
|
|
21
|
-
</span>;
|
|
22
|
-
`
|
|
23
|
-
/>
|
|
24
|
-
<span>
|
|
25
|
-
<Tooltip canBeShowed=true label={<span> {"Label"->React.string} </span>}>
|
|
26
|
-
<div> {"Hover me"->React.string} </div>
|
|
27
|
-
</Tooltip>
|
|
28
|
-
</span>
|
|
29
|
-
<hr className="mt-4" />
|
|
30
|
-
<Docs.Source
|
|
31
|
-
language="rescript"
|
|
32
|
-
code=j`
|
|
33
|
-
<span>
|
|
34
|
-
<Tooltip canBeShowed=false label={<span> "Label"->React.string </span>}>
|
|
35
|
-
<div> "Hover me"->React.string </div>
|
|
36
|
-
</Tooltip>
|
|
37
|
-
</span>;
|
|
38
|
-
`
|
|
39
|
-
/>
|
|
40
|
-
<span>
|
|
41
|
-
<Tooltip canBeShowed=false label={<span> {"Label"->React.string} </span>}>
|
|
42
|
-
<div> {"Hover me but nothing"->React.string} </div>
|
|
43
|
-
</Tooltip>
|
|
44
|
-
</span>
|
|
45
|
-
</>,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
(),
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
let example = () =>
|
|
52
|
-
<span>
|
|
53
|
-
<Tooltip
|
|
54
|
-
canBeShowed=true
|
|
55
|
-
label={<span>
|
|
56
|
-
{"Please consider only if the lift is big enough for the commodity"->React.string}
|
|
57
|
-
</span>}>
|
|
58
|
-
<span className="w-auto"> {"Hover me"->React.string} </span>
|
|
59
|
-
</Tooltip>
|
|
60
|
-
</span>
|
|
61
|
-
|
|
62
|
-
example->CSF.addMeta(~name="example", ())
|
|
63
|
-
|
|
64
|
-
let custom = () =>
|
|
65
|
-
<span>
|
|
66
|
-
<Tooltip
|
|
67
|
-
canBeShowed=true
|
|
68
|
-
tooltipClassName="!bg-info-500"
|
|
69
|
-
triangleClassName="!border-info-500"
|
|
70
|
-
label={<span>
|
|
71
|
-
{"Please consider only if the lift is big enough for the commodity"->React.string}
|
|
72
|
-
</span>}>
|
|
73
|
-
<span className="w-auto"> {"Hover me"->React.string} </span>
|
|
74
|
-
</Tooltip>
|
|
75
|
-
</span>
|
|
76
|
-
|
|
77
|
-
let v2 = () =>
|
|
78
|
-
<div>
|
|
79
|
-
<div className="inline-block relative">
|
|
80
|
-
<Toolkit__Ui_TooltipV2
|
|
81
|
-
tooltipClassName="w-[300px]"
|
|
82
|
-
position=#top
|
|
83
|
-
label={<span>
|
|
84
|
-
{"Please consider only if the lift is big enough for the commodity"->React.string}
|
|
85
|
-
</span>}>
|
|
86
|
-
<span className="w-auto"> {"Should be top but overflow"->React.string} </span>
|
|
87
|
-
</Toolkit__Ui_TooltipV2>
|
|
88
|
-
</div>
|
|
89
|
-
<br />
|
|
90
|
-
<div className="inline-block relative">
|
|
91
|
-
<Toolkit__Ui_TooltipV2
|
|
92
|
-
tooltipClassName="w-[300px]"
|
|
93
|
-
label={<span>
|
|
94
|
-
{"Please consider only if the lift is big enough for the commodity"->React.string}
|
|
95
|
-
</span>}>
|
|
96
|
-
<span className="w-auto"> {"Default as bottom should corrected"->React.string} </span>
|
|
97
|
-
</Toolkit__Ui_TooltipV2>
|
|
98
|
-
</div>
|
|
99
|
-
<br />
|
|
100
|
-
<div className="inline-block relative">
|
|
101
|
-
<Toolkit__Ui_TooltipV2
|
|
102
|
-
position=#right
|
|
103
|
-
tooltipClassName="w-[300px]"
|
|
104
|
-
label={<span>
|
|
105
|
-
{"Please consider only if the lift is big enough for the commodity"->React.string}
|
|
106
|
-
</span>}>
|
|
107
|
-
<span className="w-auto"> {"Tooltip right"->React.string} </span>
|
|
108
|
-
</Toolkit__Ui_TooltipV2>
|
|
109
|
-
</div>
|
|
110
|
-
<br />
|
|
111
|
-
<div className="inline-block relative">
|
|
112
|
-
<Toolkit__Ui_TooltipV2
|
|
113
|
-
position=#top
|
|
114
|
-
tooltipClassName="w-[300px]"
|
|
115
|
-
label={<span>
|
|
116
|
-
{"Please consider only if the lift is big enough for the commodity"->React.string}
|
|
117
|
-
</span>}>
|
|
118
|
-
<span className="w-auto"> {"Tooltip top"->React.string} </span>
|
|
119
|
-
</Toolkit__Ui_TooltipV2>
|
|
120
|
-
</div>
|
|
121
|
-
<br />
|
|
122
|
-
<div className="w-[1800px]">
|
|
123
|
-
<div className="inline-block relative ml-[1000px]">
|
|
124
|
-
<Toolkit__Ui_TooltipV2
|
|
125
|
-
position=#bottom
|
|
126
|
-
tooltipClassName="w-[300px]"
|
|
127
|
-
label={<span>
|
|
128
|
-
{"Please consider only if the lift is big enough for the commodity"->React.string}
|
|
129
|
-
</span>}>
|
|
130
|
-
<span className="w-auto"> {"Hover me"->React.string} </span>
|
|
131
|
-
</Toolkit__Ui_TooltipV2>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
custom->CSF.addMeta(~name="custom", ())
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
open Storybook
|
|
2
|
-
open Toolkit__Ui
|
|
3
|
-
|
|
4
|
-
@module("!!raw-loader!../../../src/ui/Toolkit__Ui_ProgressBar.resi")
|
|
5
|
-
external source: 'a = "default"
|
|
6
|
-
|
|
7
|
-
let default = CSF.make(~title="Components/ProgressBar", ())
|
|
8
|
-
|
|
9
|
-
let defaultPalette = () => {
|
|
10
|
-
let colors = Js.Dict.fromArray([
|
|
11
|
-
("success", #success),
|
|
12
|
-
("warning", #warning),
|
|
13
|
-
("info", #info),
|
|
14
|
-
("danger", #danger),
|
|
15
|
-
])
|
|
16
|
-
|
|
17
|
-
<div>
|
|
18
|
-
{colors
|
|
19
|
-
->Js.Dict.entries
|
|
20
|
-
->Array.mapWithIndex((i, (colorText, color)) =>
|
|
21
|
-
<div
|
|
22
|
-
key={i->Int.toString ++ colorText}
|
|
23
|
-
className="flex flex-row flex-col-gap-4 mb-4 items-center">
|
|
24
|
-
<strong className="w-40"> {colorText->React.string} </strong>
|
|
25
|
-
<div className="w-60"> <ProgressBar color progression=60. /> </div>
|
|
26
|
-
</div>
|
|
27
|
-
)
|
|
28
|
-
->React.array}
|
|
29
|
-
</div>
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
defaultPalette->CSF.addMeta(
|
|
33
|
-
~name="default palette",
|
|
34
|
-
~parameters={
|
|
35
|
-
"docs": {
|
|
36
|
-
"page": () => <>
|
|
37
|
-
<CodeBlock> source </CodeBlock>
|
|
38
|
-
<Docs.Source
|
|
39
|
-
language="rescript"
|
|
40
|
-
code=j`
|
|
41
|
-
<ProgressBar color=#success progression=60. />
|
|
42
|
-
`
|
|
43
|
-
/>
|
|
44
|
-
<ProgressBar color=#success progression=60. />
|
|
45
|
-
</>,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
(),
|
|
49
|
-
)
|