aidos-ui 3.0.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/.prettierrc +4 -0
- package/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/Badge.d.ts +7 -0
- package/dist/Badge.js +22 -0
- package/dist/Badge.js.map +1 -0
- package/dist/BaseButton.d.ts +13 -0
- package/dist/BaseButton.js +22 -0
- package/dist/BaseButton.js.map +1 -0
- package/dist/BaseInput.d.ts +15 -0
- package/dist/BaseInput.js +14 -0
- package/dist/BaseInput.js.map +1 -0
- package/dist/BaseLink.d.ts +17 -0
- package/dist/BaseLink.js +28 -0
- package/dist/BaseLink.js.map +1 -0
- package/dist/BaseList.d.ts +6 -0
- package/dist/BaseList.js +14 -0
- package/dist/BaseList.js.map +1 -0
- package/dist/BaseListAddOn.d.ts +5 -0
- package/dist/BaseListAddOn.js +7 -0
- package/dist/BaseListAddOn.js.map +1 -0
- package/dist/BaseListItem.d.ts +27 -0
- package/dist/BaseListItem.js +26 -0
- package/dist/BaseListItem.js.map +1 -0
- package/dist/BaseView.d.ts +12 -0
- package/dist/BaseView.js +26 -0
- package/dist/BaseView.js.map +1 -0
- package/dist/Box.d.ts +5 -0
- package/dist/Box.js +6 -0
- package/dist/Box.js.map +1 -0
- package/dist/Button.d.ts +20 -0
- package/dist/Button.js +20 -0
- package/dist/Button.js.map +1 -0
- package/dist/Calendar.d.ts +18 -0
- package/dist/Calendar.js +57 -0
- package/dist/Calendar.js.map +1 -0
- package/dist/Card.d.ts +4 -0
- package/dist/Card.js +12 -0
- package/dist/Card.js.map +1 -0
- package/dist/Checkbox.d.ts +12 -0
- package/dist/Checkbox.js +32 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/Circle.d.ts +6 -0
- package/dist/Circle.js +12 -0
- package/dist/Circle.js.map +1 -0
- package/dist/Column.d.ts +6 -0
- package/dist/Column.js +7 -0
- package/dist/Column.js.map +1 -0
- package/dist/DarkMode.d.ts +13 -0
- package/dist/DarkMode.js +61 -0
- package/dist/DarkMode.js.map +1 -0
- package/dist/DateInput.d.ts +13 -0
- package/dist/DateInput.js +29 -0
- package/dist/DateInput.js.map +1 -0
- package/dist/DatePicker.d.ts +12 -0
- package/dist/DatePicker.js +34 -0
- package/dist/DatePicker.js.map +1 -0
- package/dist/DatetimeInput.d.ts +13 -0
- package/dist/DatetimeInput.js +31 -0
- package/dist/DatetimeInput.js.map +1 -0
- package/dist/DesignBook.d.ts +2 -0
- package/dist/DesignBook.js +55 -0
- package/dist/DesignBook.js.map +1 -0
- package/dist/Dialog.d.ts +17 -0
- package/dist/Dialog.js +86 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/Dropdown.d.ts +10 -0
- package/dist/Dropdown.js +64 -0
- package/dist/Dropdown.js.map +1 -0
- package/dist/Emitter.d.ts +6 -0
- package/dist/Emitter.js +19 -0
- package/dist/Emitter.js.map +1 -0
- package/dist/FlexLayout.d.ts +11 -0
- package/dist/FlexLayout.js +18 -0
- package/dist/FlexLayout.js.map +1 -0
- package/dist/Icon.d.ts +12 -0
- package/dist/Icon.js +69 -0
- package/dist/Icon.js.map +1 -0
- package/dist/IconButton.d.ts +9 -0
- package/dist/IconButton.js +31 -0
- package/dist/IconButton.js.map +1 -0
- package/dist/IconLink.d.ts +9 -0
- package/dist/IconLink.js +31 -0
- package/dist/IconLink.js.map +1 -0
- package/dist/IconType.d.ts +1 -0
- package/dist/IconType.js +2 -0
- package/dist/IconType.js.map +1 -0
- package/dist/Interactable.d.ts +48 -0
- package/dist/Interactable.js +131 -0
- package/dist/Interactable.js.map +1 -0
- package/dist/Link.d.ts +20 -0
- package/dist/Link.js +22 -0
- package/dist/Link.js.map +1 -0
- package/dist/List.d.ts +11 -0
- package/dist/List.js +17 -0
- package/dist/List.js.map +1 -0
- package/dist/ListButtonItem.d.ts +15 -0
- package/dist/ListButtonItem.js +9 -0
- package/dist/ListButtonItem.js.map +1 -0
- package/dist/ListDivider.d.ts +2 -0
- package/dist/ListDivider.js +12 -0
- package/dist/ListDivider.js.map +1 -0
- package/dist/ListHeaderItem.d.ts +11 -0
- package/dist/ListHeaderItem.js +13 -0
- package/dist/ListHeaderItem.js.map +1 -0
- package/dist/ListItem.d.ts +10 -0
- package/dist/ListItem.js +7 -0
- package/dist/ListItem.js.map +1 -0
- package/dist/ListLinkItem.d.ts +17 -0
- package/dist/ListLinkItem.js +9 -0
- package/dist/ListLinkItem.js.map +1 -0
- package/dist/ListSpacer.d.ts +2 -0
- package/dist/ListSpacer.js +13 -0
- package/dist/ListSpacer.js.map +1 -0
- package/dist/OnVisible.d.ts +5 -0
- package/dist/OnVisible.js +28 -0
- package/dist/OnVisible.js.map +1 -0
- package/dist/Popover.d.ts +21 -0
- package/dist/Popover.js +88 -0
- package/dist/Popover.js.map +1 -0
- package/dist/ProgressBar.d.ts +8 -0
- package/dist/ProgressBar.js +42 -0
- package/dist/ProgressBar.js.map +1 -0
- package/dist/ProgressCircle.d.ts +6 -0
- package/dist/ProgressCircle.js +12 -0
- package/dist/ProgressCircle.js.map +1 -0
- package/dist/Providers.d.ts +9 -0
- package/dist/Providers.js +16 -0
- package/dist/Providers.js.map +1 -0
- package/dist/RangeInput.d.ts +14 -0
- package/dist/RangeInput.js +32 -0
- package/dist/RangeInput.js.map +1 -0
- package/dist/ResultOrError.d.ts +13 -0
- package/dist/ResultOrError.js +7 -0
- package/dist/ResultOrError.js.map +1 -0
- package/dist/RootView.d.ts +5 -0
- package/dist/RootView.js +35 -0
- package/dist/RootView.js.map +1 -0
- package/dist/Router.d.ts +2 -0
- package/dist/Router.js +37 -0
- package/dist/Router.js.map +1 -0
- package/dist/RouterState.d.ts +38 -0
- package/dist/RouterState.js +111 -0
- package/dist/RouterState.js.map +1 -0
- package/dist/Row.d.ts +6 -0
- package/dist/Row.js +7 -0
- package/dist/Row.js.map +1 -0
- package/dist/StackContext.d.ts +8 -0
- package/dist/StackContext.js +25 -0
- package/dist/StackContext.js.map +1 -0
- package/dist/StaticCheckbox.d.ts +17 -0
- package/dist/StaticCheckbox.js +48 -0
- package/dist/StaticCheckbox.js.map +1 -0
- package/dist/Storage.d.ts +12 -0
- package/dist/Storage.js +148 -0
- package/dist/Storage.js.map +1 -0
- package/dist/Stream.d.ts +9 -0
- package/dist/Stream.js +36 -0
- package/dist/Stream.js.map +1 -0
- package/dist/Sublist.d.ts +12 -0
- package/dist/Sublist.js +18 -0
- package/dist/Sublist.js.map +1 -0
- package/dist/SubmitIconInput.d.ts +9 -0
- package/dist/SubmitIconInput.js +25 -0
- package/dist/SubmitIconInput.js.map +1 -0
- package/dist/Tabs.d.ts +20 -0
- package/dist/Tabs.js +35 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Text.d.ts +25 -0
- package/dist/Text.js +50 -0
- package/dist/Text.js.map +1 -0
- package/dist/TextArea.d.ts +10 -0
- package/dist/TextArea.js +22 -0
- package/dist/TextArea.js.map +1 -0
- package/dist/TextInput.d.ts +14 -0
- package/dist/TextInput.js +52 -0
- package/dist/TextInput.js.map +1 -0
- package/dist/TextInputWithState.d.ts +10 -0
- package/dist/TextInputWithState.js +14 -0
- package/dist/TextInputWithState.js.map +1 -0
- package/dist/TextPairing.d.ts +21 -0
- package/dist/TextPairing.js +26 -0
- package/dist/TextPairing.js.map +1 -0
- package/dist/TimeInput.d.ts +15 -0
- package/dist/TimeInput.js +58 -0
- package/dist/TimeInput.js.map +1 -0
- package/dist/Tooltip.d.ts +11 -0
- package/dist/Tooltip.js +72 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/aria.d.ts +8 -0
- package/dist/aria.js +42 -0
- package/dist/aria.js.map +1 -0
- package/dist/guid.d.ts +1 -0
- package/dist/guid.js +7 -0
- package/dist/guid.js.map +1 -0
- package/dist/hash.d.ts +1 -0
- package/dist/hash.js +20 -0
- package/dist/hash.js.map +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/dist/jss.d.ts +110 -0
- package/dist/jss.js +438 -0
- package/dist/jss.js.map +1 -0
- package/dist/numberToBase.d.ts +1 -0
- package/dist/numberToBase.js +44 -0
- package/dist/numberToBase.js.map +1 -0
- package/dist/stateMachineContextFactory.d.ts +36 -0
- package/dist/stateMachineContextFactory.js +48 -0
- package/dist/stateMachineContextFactory.js.map +1 -0
- package/dist/useCookie.d.ts +9 -0
- package/dist/useCookie.js +65 -0
- package/dist/useCookie.js.map +1 -0
- package/dist/useKeyboard.d.ts +8 -0
- package/dist/useKeyboard.js +26 -0
- package/dist/useKeyboard.js.map +1 -0
- package/dist/useNavigation.d.ts +5 -0
- package/dist/useNavigation.js +79 -0
- package/dist/useNavigation.js.map +1 -0
- package/dist/usePromise.d.ts +1 -0
- package/dist/usePromise.js +12 -0
- package/dist/usePromise.js.map +1 -0
- package/dist/useRefEffect.d.ts +1 -0
- package/dist/useRefEffect.js +15 -0
- package/dist/useRefEffect.js.map +1 -0
- package/next-env.d.ts +5 -0
- package/next.config.js +21 -0
- package/package.json +40 -0
- package/scripts/publish.js +27 -0
- package/src/Badge.tsx +36 -0
- package/src/BaseButton.tsx +58 -0
- package/src/BaseInput.tsx +57 -0
- package/src/BaseLink.tsx +77 -0
- package/src/BaseList.tsx +29 -0
- package/src/BaseListAddOn.tsx +10 -0
- package/src/BaseListItem.tsx +117 -0
- package/src/BaseView.tsx +57 -0
- package/src/Box.tsx +20 -0
- package/src/Button.tsx +84 -0
- package/src/Calendar.tsx +125 -0
- package/src/Card.tsx +17 -0
- package/src/Checkbox.tsx +63 -0
- package/src/Circle.tsx +24 -0
- package/src/Column.tsx +12 -0
- package/src/DarkMode.tsx +99 -0
- package/src/DateInput.tsx +63 -0
- package/src/DatePicker.tsx +67 -0
- package/src/DatetimeInput.tsx +71 -0
- package/src/DesignBook.tsx +697 -0
- package/src/Dialog.tsx +144 -0
- package/src/Dropdown.tsx +129 -0
- package/src/Emitter.ts +26 -0
- package/src/FlexLayout.tsx +53 -0
- package/src/Icon.tsx +96 -0
- package/src/IconButton.tsx +66 -0
- package/src/IconLink.tsx +58 -0
- package/src/IconType.ts +787 -0
- package/src/Interactable.tsx +159 -0
- package/src/Link.tsx +86 -0
- package/src/List.tsx +41 -0
- package/src/ListButtonItem.tsx +69 -0
- package/src/ListDivider.tsx +13 -0
- package/src/ListHeaderItem.tsx +45 -0
- package/src/ListItem.tsx +27 -0
- package/src/ListLinkItem.tsx +76 -0
- package/src/ListSpacer.tsx +14 -0
- package/src/OnVisible.tsx +42 -0
- package/src/Popover.tsx +141 -0
- package/src/ProgressBar.tsx +63 -0
- package/src/ProgressCircle.tsx +38 -0
- package/src/Providers.tsx +33 -0
- package/src/RangeInput.tsx +82 -0
- package/src/ResultOrError.ts +15 -0
- package/src/RootView.tsx +55 -0
- package/src/Router.tsx +62 -0
- package/src/RouterState.tsx +154 -0
- package/src/Row.tsx +12 -0
- package/src/StackContext.tsx +52 -0
- package/src/StaticCheckbox.tsx +74 -0
- package/src/Storage.tsx +200 -0
- package/src/Stream.tsx +50 -0
- package/src/Sublist.tsx +62 -0
- package/src/SubmitIconInput.tsx +45 -0
- package/src/Tabs.tsx +103 -0
- package/src/Text.tsx +102 -0
- package/src/TextArea.tsx +45 -0
- package/src/TextInput.tsx +111 -0
- package/src/TextInputWithState.tsx +35 -0
- package/src/TextPairing.tsx +115 -0
- package/src/TimeInput.tsx +109 -0
- package/src/Tooltip.tsx +108 -0
- package/src/aria.ts +72 -0
- package/src/examples/ExampleDialog.tsx +28 -0
- package/src/guid.ts +7 -0
- package/src/hash.ts +21 -0
- package/src/index.ts +65 -0
- package/src/jss.tsx +607 -0
- package/src/numberToBase.ts +52 -0
- package/src/pages/Badge.mdx +30 -0
- package/src/pages/Button.mdx +57 -0
- package/src/pages/Calendar.mdx +60 -0
- package/src/pages/Checkbox.mdx +56 -0
- package/src/pages/Dialog.mdx +32 -0
- package/src/pages/FlexLayout.mdx +77 -0
- package/src/pages/Hashing.mdx +20 -0
- package/src/pages/Icon.mdx +63 -0
- package/src/pages/IconButton.mdx +144 -0
- package/src/pages/Link.mdx +57 -0
- package/src/pages/List.mdx +292 -0
- package/src/pages/ListHeader.mdx +94 -0
- package/src/pages/Popover.mdx +101 -0
- package/src/pages/ProgressBar.mdx +20 -0
- package/src/pages/ProgressCircle.mdx +35 -0
- package/src/pages/RangeInput.mdx +109 -0
- package/src/pages/Tabs.mdx +168 -0
- package/src/pages/Text.mdx +133 -0
- package/src/pages/TextInput.mdx +110 -0
- package/src/pages/TextPairing.mdx +155 -0
- package/src/pages/TimeInput.mdx +73 -0
- package/src/pages/Tooltip.mdx +28 -0
- package/src/pages/_app.tsx +561 -0
- package/src/pages/_document.tsx +30 -0
- package/src/pages/css-in-js.mdx +127 -0
- package/src/pages/index.mdx +58 -0
- package/src/pages/navigation.mdx +56 -0
- package/src/pages/prism.css +3 -0
- package/src/pages/useCookie.mdx +15 -0
- package/src/pages/useKeyboard.mdx +20 -0
- package/src/pages/useNavigation.mdx +30 -0
- package/src/pages/usePromise.mdx +15 -0
- package/src/pages/useRefEffect.mdx +49 -0
- package/src/stateMachineContextFactory.tsx +111 -0
- package/src/useCookie.tsx +89 -0
- package/src/useKeyboard.tsx +43 -0
- package/src/useNavigation.tsx +89 -0
- package/src/usePromise.tsx +18 -0
- package/src/useRefEffect.tsx +18 -0
- package/tsconfig.build.json +23 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { List } from "../List";
|
|
2
|
+
import { ListItem } from "../ListItem";
|
|
3
|
+
import { ListButtonItem } from "../ListButtonItem";
|
|
4
|
+
import { ListLinkItem } from "../ListLinkItem";
|
|
5
|
+
import { Icon } from "../Icon";
|
|
6
|
+
import { Sublist } from "../Sublist";
|
|
7
|
+
|
|
8
|
+
# List
|
|
9
|
+
|
|
10
|
+
The `List` component is used to represent data in a list, it has several components that can be used to create rich experiences within it.
|
|
11
|
+
|
|
12
|
+
## Base list
|
|
13
|
+
|
|
14
|
+
<List ariaLabel="example">
|
|
15
|
+
<ListItem
|
|
16
|
+
headline="Headline"
|
|
17
|
+
body="Body"
|
|
18
|
+
addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
|
|
19
|
+
addOnPosition="start"
|
|
20
|
+
/>
|
|
21
|
+
<ListButtonItem
|
|
22
|
+
color="positive"
|
|
23
|
+
headline="Positive button"
|
|
24
|
+
addOn={<Icon color="highlight" icon="fa-plus" size="medium" />}
|
|
25
|
+
addOnPosition="start"
|
|
26
|
+
onClick={() => {}}
|
|
27
|
+
/>
|
|
28
|
+
<ListButtonItem
|
|
29
|
+
color="secondary"
|
|
30
|
+
headline="Secondary button"
|
|
31
|
+
addOn={<Icon color="primary" icon="fa-bicycle" size="medium" />}
|
|
32
|
+
addOnPosition="start"
|
|
33
|
+
onClick={() => {}}
|
|
34
|
+
/>
|
|
35
|
+
<ListButtonItem
|
|
36
|
+
color="negative"
|
|
37
|
+
headline="Negative button"
|
|
38
|
+
addOn={<Icon color="negative" icon="fa-ban" size="medium" />}
|
|
39
|
+
addOnPosition="start"
|
|
40
|
+
onClick={() => {}}
|
|
41
|
+
/>
|
|
42
|
+
<ListLinkItem
|
|
43
|
+
href="/"
|
|
44
|
+
color="secondary"
|
|
45
|
+
headline="Selected link"
|
|
46
|
+
selected
|
|
47
|
+
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
48
|
+
addOnPosition="start"
|
|
49
|
+
/>
|
|
50
|
+
<ListLinkItem
|
|
51
|
+
href="/"
|
|
52
|
+
color="secondary"
|
|
53
|
+
headline="Link"
|
|
54
|
+
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
55
|
+
addOnPosition="start"
|
|
56
|
+
withDivider={false}
|
|
57
|
+
/>
|
|
58
|
+
</List>
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
<List ariaLabel="example">
|
|
62
|
+
<ListItem
|
|
63
|
+
headline="Headline"
|
|
64
|
+
body="Body"
|
|
65
|
+
addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
|
|
66
|
+
addOnPosition="start"
|
|
67
|
+
/>
|
|
68
|
+
<ListButtonItem
|
|
69
|
+
color="positive"
|
|
70
|
+
headline="Positive button"
|
|
71
|
+
addOn={<Icon color="highlight" icon="fa-plus" size="medium" />}
|
|
72
|
+
addOnPosition="start"
|
|
73
|
+
onClick={() => {}}
|
|
74
|
+
/>
|
|
75
|
+
<ListButtonItem
|
|
76
|
+
color="secondary"
|
|
77
|
+
headline="Secondary button"
|
|
78
|
+
addOn={<Icon color="primary" icon="fa-bicycle" size="medium" />}
|
|
79
|
+
addOnPosition="start"
|
|
80
|
+
onClick={() => {}}
|
|
81
|
+
/>
|
|
82
|
+
<ListButtonItem
|
|
83
|
+
color="negative"
|
|
84
|
+
headline="Negative button"
|
|
85
|
+
addOn={<Icon color="negative" icon="fa-ban" size="medium" />}
|
|
86
|
+
addOnPosition="start"
|
|
87
|
+
onClick={() => {}}
|
|
88
|
+
/>
|
|
89
|
+
<ListLinkItem
|
|
90
|
+
href="/"
|
|
91
|
+
color="secondary"
|
|
92
|
+
headline="Selected link"
|
|
93
|
+
selected
|
|
94
|
+
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
95
|
+
addOnPosition="start"
|
|
96
|
+
/>
|
|
97
|
+
<ListLinkItem
|
|
98
|
+
href="/"
|
|
99
|
+
color="secondary"
|
|
100
|
+
headline="Link"
|
|
101
|
+
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
102
|
+
addOnPosition="start"
|
|
103
|
+
withDivider={false}
|
|
104
|
+
/>
|
|
105
|
+
</List>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Bare list
|
|
111
|
+
|
|
112
|
+
<List bare ariaLabel="example">
|
|
113
|
+
<ListItem
|
|
114
|
+
bare
|
|
115
|
+
headline="Headline"
|
|
116
|
+
body="Body"
|
|
117
|
+
addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
|
|
118
|
+
addOnPosition="start"
|
|
119
|
+
/>
|
|
120
|
+
<ListButtonItem
|
|
121
|
+
bare
|
|
122
|
+
color="positive"
|
|
123
|
+
headline="Positive button"
|
|
124
|
+
addOn={<Icon color="highlight" icon="fa-plus" size="medium" />}
|
|
125
|
+
addOnPosition="start"
|
|
126
|
+
onClick={() => {}}
|
|
127
|
+
/>
|
|
128
|
+
<ListButtonItem
|
|
129
|
+
bare
|
|
130
|
+
color="secondary"
|
|
131
|
+
headline="Secondary button"
|
|
132
|
+
addOn={<Icon color="primary" icon="fa-bicycle" size="medium" />}
|
|
133
|
+
addOnPosition="start"
|
|
134
|
+
onClick={() => {}}
|
|
135
|
+
/>
|
|
136
|
+
<ListButtonItem
|
|
137
|
+
bare
|
|
138
|
+
color="negative"
|
|
139
|
+
headline="Negative button"
|
|
140
|
+
addOn={<Icon color="negative" icon="fa-ban" size="medium" />}
|
|
141
|
+
addOnPosition="start"
|
|
142
|
+
onClick={() => {}}
|
|
143
|
+
/>
|
|
144
|
+
<ListLinkItem
|
|
145
|
+
href="/"
|
|
146
|
+
bare
|
|
147
|
+
color="secondary"
|
|
148
|
+
headline="Selected link"
|
|
149
|
+
selected
|
|
150
|
+
addOn={<Icon color="highlight" icon="fa-renren" size="medium" />}
|
|
151
|
+
addOnPosition="start"
|
|
152
|
+
/>
|
|
153
|
+
<ListLinkItem
|
|
154
|
+
href="/"
|
|
155
|
+
bare
|
|
156
|
+
headline="Link"
|
|
157
|
+
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
158
|
+
addOnPosition="start"
|
|
159
|
+
withDivider={false}
|
|
160
|
+
/>
|
|
161
|
+
</List>
|
|
162
|
+
|
|
163
|
+
```js
|
|
164
|
+
<List bare ariaLabel="example">
|
|
165
|
+
<ListItem
|
|
166
|
+
bare
|
|
167
|
+
headline="Headline"
|
|
168
|
+
body="Body"
|
|
169
|
+
addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
|
|
170
|
+
addOnPosition="start"
|
|
171
|
+
/>
|
|
172
|
+
<ListButtonItem
|
|
173
|
+
bare
|
|
174
|
+
color="positive"
|
|
175
|
+
headline="Positive button"
|
|
176
|
+
addOn={<Icon color="highlight" icon="fa-plus" size="medium" />}
|
|
177
|
+
addOnPosition="start"
|
|
178
|
+
onClick={() => {}}
|
|
179
|
+
/>
|
|
180
|
+
<ListButtonItem
|
|
181
|
+
bare
|
|
182
|
+
color="secondary"
|
|
183
|
+
headline="Secondary button"
|
|
184
|
+
addOn={<Icon color="primary" icon="fa-bicycle" size="medium" />}
|
|
185
|
+
addOnPosition="start"
|
|
186
|
+
onClick={() => {}}
|
|
187
|
+
/>
|
|
188
|
+
<ListButtonItem
|
|
189
|
+
bare
|
|
190
|
+
color="negative"
|
|
191
|
+
headline="Negative button"
|
|
192
|
+
addOn={<Icon color="negative" icon="fa-ban" size="medium" />}
|
|
193
|
+
addOnPosition="start"
|
|
194
|
+
onClick={() => {}}
|
|
195
|
+
/>
|
|
196
|
+
<ListLinkItem
|
|
197
|
+
href="/"
|
|
198
|
+
bare
|
|
199
|
+
color="secondary"
|
|
200
|
+
headline="Selected link"
|
|
201
|
+
selected
|
|
202
|
+
addOn={<Icon color="highlight" icon="fa-renren" size="medium" />}
|
|
203
|
+
addOnPosition="start"
|
|
204
|
+
/>
|
|
205
|
+
<ListLinkItem
|
|
206
|
+
href="/"
|
|
207
|
+
bare
|
|
208
|
+
headline="Link"
|
|
209
|
+
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
210
|
+
addOnPosition="start"
|
|
211
|
+
withDivider={false}
|
|
212
|
+
/>
|
|
213
|
+
</List>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Sublist
|
|
219
|
+
|
|
220
|
+
<List bare ariaLabel="example">
|
|
221
|
+
<Sublist bare label="Sublist">
|
|
222
|
+
<ListItem bare headline="Headline 1" body="Body 1" />
|
|
223
|
+
<ListItem bare headline="Headline 2" body="Body 2" />
|
|
224
|
+
<ListItem bare headline="Headline 3" body="Body 3" />
|
|
225
|
+
</Sublist>
|
|
226
|
+
</List>
|
|
227
|
+
|
|
228
|
+
```js
|
|
229
|
+
<List bare ariaLabel="example">
|
|
230
|
+
<Sublist bare label="Sublist">
|
|
231
|
+
<ListItem bare headline="Headline 1" body="Body 1" />
|
|
232
|
+
<ListItem bare headline="Headline 2" body="Body 2" />
|
|
233
|
+
<ListItem bare headline="Headline 3" body="Body 3" />
|
|
234
|
+
</Sublist>
|
|
235
|
+
</List>
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## navigation
|
|
241
|
+
|
|
242
|
+
Lists support keyboard navigation by default via the `useNavigation` hook. It can be disabled by passing the prop `navigation` and tries to emulate the [grid layout spec](https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/layout-grids/):
|
|
243
|
+
|
|
244
|
+
<List ariaLabel="example" navigation={true}>
|
|
245
|
+
<ListButtonItem color="secondary" headline="Headline 1" onClick={() => {}} />
|
|
246
|
+
<ListButtonItem color="secondary" headline="Headline 2" onClick={() => {}} />
|
|
247
|
+
<ListButtonItem
|
|
248
|
+
withDivider={false}
|
|
249
|
+
color="secondary"
|
|
250
|
+
headline="Headline 3"
|
|
251
|
+
onClick={() => {}}
|
|
252
|
+
/>
|
|
253
|
+
</List>
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
<List ariaLabel="example" navigation={false}>
|
|
258
|
+
<ListButtonItem color="secondary" headline="Headline 1" onClick={() => {}} />
|
|
259
|
+
<ListButtonItem color="secondary" headline="Headline 2" onClick={() => {}} />
|
|
260
|
+
<ListButtonItem
|
|
261
|
+
withDivider={false}
|
|
262
|
+
color="secondary"
|
|
263
|
+
headline="Headline 3"
|
|
264
|
+
onClick={() => {}}
|
|
265
|
+
/>
|
|
266
|
+
</List>
|
|
267
|
+
|
|
268
|
+
```js
|
|
269
|
+
<List ariaLabel="example" navigation={true}>
|
|
270
|
+
<ListButtonItem color="secondary" headline="Headline 1" onClick={() => {}} />
|
|
271
|
+
<ListButtonItem color="secondary" headline="Headline 2" onClick={() => {}} />
|
|
272
|
+
<ListButtonItem
|
|
273
|
+
withDivider={false}
|
|
274
|
+
color="secondary"
|
|
275
|
+
headline="Headline 3"
|
|
276
|
+
onClick={() => {}}
|
|
277
|
+
/>
|
|
278
|
+
</List>
|
|
279
|
+
|
|
280
|
+
<List ariaLabel="example" navigation={false}>
|
|
281
|
+
<ListButtonItem color="secondary" headline="Headline 1" onClick={() => {}} />
|
|
282
|
+
<ListButtonItem color="secondary" headline="Headline 2" onClick={() => {}} />
|
|
283
|
+
<ListButtonItem
|
|
284
|
+
withDivider={false}
|
|
285
|
+
color="secondary"
|
|
286
|
+
headline="Headline 3"
|
|
287
|
+
onClick={() => {}}
|
|
288
|
+
/>
|
|
289
|
+
</List>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { List } from "../List";
|
|
2
|
+
import { Icon } from "../Icon";
|
|
3
|
+
import { ListItem } from "../ListItem";
|
|
4
|
+
import { ListHeaderItem } from "../ListHeaderItem";
|
|
5
|
+
|
|
6
|
+
# List headers
|
|
7
|
+
|
|
8
|
+
`ListHeaders` have a variety of styles and support both regular and bare styling. They can be used to give contextual information about what a list contains or to visually separate a subgroup of elements.
|
|
9
|
+
|
|
10
|
+
<List ariaLabel="example">
|
|
11
|
+
<ListHeaderItem headline="Header" />
|
|
12
|
+
<ListItem headline="Headline 1" body="Body 1" />
|
|
13
|
+
<ListHeaderItem
|
|
14
|
+
headline="Header"
|
|
15
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
|
|
16
|
+
/>
|
|
17
|
+
<ListItem headline="Headline 2" body="Body 2" />
|
|
18
|
+
<ListHeaderItem highlight headline="Header" />
|
|
19
|
+
<ListItem headline="Headline 3" body="Body 3" />
|
|
20
|
+
<ListHeaderItem
|
|
21
|
+
highlight
|
|
22
|
+
headline="Header"
|
|
23
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="light" />}
|
|
24
|
+
/>
|
|
25
|
+
<ListItem withDivider={false} headline="Headline 4" body="Body 3" />
|
|
26
|
+
</List>
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
<List ariaLabel="example">
|
|
30
|
+
<ListHeaderItem headline="Header" />
|
|
31
|
+
<ListItem headline="Headline 1" body="Body 1" />
|
|
32
|
+
<ListHeaderItem
|
|
33
|
+
headline="Header"
|
|
34
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
|
|
35
|
+
/>
|
|
36
|
+
<ListItem headline="Headline 2" body="Body 2" />
|
|
37
|
+
<ListHeaderItem highlight headline="Header" />
|
|
38
|
+
<ListItem headline="Headline 3" body="Body 3" />
|
|
39
|
+
<ListHeaderItem
|
|
40
|
+
highlight
|
|
41
|
+
headline="Header"
|
|
42
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="light" />}
|
|
43
|
+
/>
|
|
44
|
+
<ListItem withDivider={false} headline="Headline 4" body="Body 3" />
|
|
45
|
+
</List>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Bare list headers
|
|
51
|
+
|
|
52
|
+
<List bare ariaLabel="example">
|
|
53
|
+
<ListHeaderItem bare headline="Header" />
|
|
54
|
+
<ListItem bare headline="Headline 1" body="Body 1" />
|
|
55
|
+
<ListHeaderItem
|
|
56
|
+
bare
|
|
57
|
+
headline="Header"
|
|
58
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
|
|
59
|
+
/>
|
|
60
|
+
<ListItem bare headline="Headline 2" body="Body 2" />
|
|
61
|
+
<ListHeaderItem bare highlight headline="Header" />
|
|
62
|
+
<ListItem bare headline="Headline 3" body="Body 3" />
|
|
63
|
+
<ListHeaderItem
|
|
64
|
+
bare
|
|
65
|
+
highlight
|
|
66
|
+
headline="Header"
|
|
67
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="highlight" />}
|
|
68
|
+
/>
|
|
69
|
+
<ListItem bare withDivider={false} headline="Headline 4" body="Body 3" />
|
|
70
|
+
</List>
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
<List bare ariaLabel="example">
|
|
74
|
+
<ListHeaderItem bare headline="Header" />
|
|
75
|
+
<ListItem bare headline="Headline 1" body="Body 1" />
|
|
76
|
+
<ListHeaderItem
|
|
77
|
+
bare
|
|
78
|
+
headline="Header"
|
|
79
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
|
|
80
|
+
/>
|
|
81
|
+
<ListItem bare headline="Headline 2" body="Body 2" />
|
|
82
|
+
<ListHeaderItem bare highlight headline="Header" />
|
|
83
|
+
<ListItem bare headline="Headline 3" body="Body 3" />
|
|
84
|
+
<ListHeaderItem
|
|
85
|
+
bare
|
|
86
|
+
highlight
|
|
87
|
+
headline="Header"
|
|
88
|
+
addOn={<Icon icon="fa-chain-broken" size="medium" color="light" />}
|
|
89
|
+
/>
|
|
90
|
+
<ListItem bare withDivider={false} headline="Headline 4" body="Body 3" />
|
|
91
|
+
</List>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Popover, PopoverTrigger } from "../Popover";
|
|
2
|
+
import { Icon } from "../Icon";
|
|
3
|
+
import { Button } from "../Button";
|
|
4
|
+
import { List } from "../List";
|
|
5
|
+
import { ListButtonItem } from "../ListButtonItem";
|
|
6
|
+
|
|
7
|
+
# Popover
|
|
8
|
+
|
|
9
|
+
The `Popover` component can be used in conjunction with the `PopoverTrigger` component to create modal experiences:
|
|
10
|
+
|
|
11
|
+
<PopoverTrigger
|
|
12
|
+
PopoverComponent={({ close }) => (
|
|
13
|
+
<Popover close={close}>
|
|
14
|
+
<List bare ariaLabel="Popover" autofocus>
|
|
15
|
+
<ListButtonItem
|
|
16
|
+
bare
|
|
17
|
+
headline="Option 1"
|
|
18
|
+
onClick={() => {
|
|
19
|
+
close();
|
|
20
|
+
}}
|
|
21
|
+
color="secondary"
|
|
22
|
+
/>
|
|
23
|
+
<ListButtonItem
|
|
24
|
+
bare
|
|
25
|
+
headline="Option 2"
|
|
26
|
+
onClick={() => {
|
|
27
|
+
close();
|
|
28
|
+
}}
|
|
29
|
+
color="secondary"
|
|
30
|
+
/>
|
|
31
|
+
<ListButtonItem
|
|
32
|
+
bare
|
|
33
|
+
headline="Option 3"
|
|
34
|
+
onClick={() => {
|
|
35
|
+
close();
|
|
36
|
+
}}
|
|
37
|
+
color="secondary"
|
|
38
|
+
withDivider={false}
|
|
39
|
+
/>
|
|
40
|
+
</List>
|
|
41
|
+
</Popover>
|
|
42
|
+
)}
|
|
43
|
+
>
|
|
44
|
+
{({ toggle }) => (
|
|
45
|
+
<Button
|
|
46
|
+
style={{ position: "relative" }}
|
|
47
|
+
label="Popover trigger"
|
|
48
|
+
color="positive"
|
|
49
|
+
onClick={() => {
|
|
50
|
+
toggle(undefined);
|
|
51
|
+
}}
|
|
52
|
+
/>
|
|
53
|
+
)}
|
|
54
|
+
</PopoverTrigger>
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
<PopoverTrigger
|
|
58
|
+
PopoverComponent={({ close }) => (
|
|
59
|
+
<Popover close={close}>
|
|
60
|
+
<List bare ariaLabel="Popover" autofocus>
|
|
61
|
+
<ListButtonItem
|
|
62
|
+
bare
|
|
63
|
+
headline="Option 1"
|
|
64
|
+
onClick={() => {
|
|
65
|
+
close();
|
|
66
|
+
}}
|
|
67
|
+
color="secondary"
|
|
68
|
+
/>
|
|
69
|
+
<ListButtonItem
|
|
70
|
+
bare
|
|
71
|
+
headline="Option 2"
|
|
72
|
+
onClick={() => {
|
|
73
|
+
close();
|
|
74
|
+
}}
|
|
75
|
+
color="secondary"
|
|
76
|
+
/>
|
|
77
|
+
<ListButtonItem
|
|
78
|
+
bare
|
|
79
|
+
headline="Option 3"
|
|
80
|
+
onClick={() => {
|
|
81
|
+
close();
|
|
82
|
+
}}
|
|
83
|
+
color="secondary"
|
|
84
|
+
withDivider={false}
|
|
85
|
+
/>
|
|
86
|
+
</List>
|
|
87
|
+
</Popover>
|
|
88
|
+
)}
|
|
89
|
+
>
|
|
90
|
+
{({ toggle }) => (
|
|
91
|
+
<Button
|
|
92
|
+
style={{ position: "relative" }}
|
|
93
|
+
label="Popover trigger"
|
|
94
|
+
color="positive"
|
|
95
|
+
onClick={() => {
|
|
96
|
+
toggle(undefined);
|
|
97
|
+
}}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
100
|
+
</PopoverTrigger>
|
|
101
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ProgressBar } from "../ProgressBar";
|
|
2
|
+
import { Column } from "../Column";
|
|
3
|
+
|
|
4
|
+
# ProgressBar
|
|
5
|
+
|
|
6
|
+
The `ProgressBar` component can be used to represent percentual progress in a linear way:
|
|
7
|
+
|
|
8
|
+
<Column gap="medium">
|
|
9
|
+
<ProgressBar color="highlight" progress={0.66} size="large" />
|
|
10
|
+
<ProgressBar color="negative" progress={0.66} size="medium" />
|
|
11
|
+
<ProgressBar color="warning" progress={0.66} size="small" />
|
|
12
|
+
</Column>
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
<Column gap="medium">
|
|
16
|
+
<ProgressBar color="highlight" progress={0.66} size="large" />
|
|
17
|
+
<ProgressBar color="negative" progress={0.66} size="medium" />
|
|
18
|
+
<ProgressBar color="warning" progress={0.66} size="small" />
|
|
19
|
+
</Column>
|
|
20
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ProgressCircle } from "../ProgressCircle";
|
|
2
|
+
import { Row } from "../Row";
|
|
3
|
+
import { cssVar } from "../jss";
|
|
4
|
+
|
|
5
|
+
# ProgressCircle
|
|
6
|
+
|
|
7
|
+
The `ProgressCircle` component can be used to represent percentual progress in a circular way:
|
|
8
|
+
|
|
9
|
+
<Row gap="medium" align="center">
|
|
10
|
+
<ProgressCircle progress={0.1} outerRadius={12} />
|
|
11
|
+
<ProgressCircle progress={0.2} outerRadius={12} />
|
|
12
|
+
<ProgressCircle progress={0.3} outerRadius={12} />
|
|
13
|
+
<ProgressCircle progress={0.4} outerRadius={12} />
|
|
14
|
+
<ProgressCircle progress={0.5} outerRadius={12} />
|
|
15
|
+
<ProgressCircle progress={0.6} outerRadius={12} />
|
|
16
|
+
<ProgressCircle progress={0.7} outerRadius={12} />
|
|
17
|
+
<ProgressCircle progress={0.8} outerRadius={12} />
|
|
18
|
+
<ProgressCircle progress={0.9} outerRadius={12} />
|
|
19
|
+
<ProgressCircle progress={1} outerRadius={12} />
|
|
20
|
+
</Row>
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
<Row gap="medium" align="center">
|
|
24
|
+
<ProgressCircle progress={0.1} outerRadius={12} />
|
|
25
|
+
<ProgressCircle progress={0.2} outerRadius={12} />
|
|
26
|
+
<ProgressCircle progress={0.3} outerRadius={12} />
|
|
27
|
+
<ProgressCircle progress={0.4} outerRadius={12} />
|
|
28
|
+
<ProgressCircle progress={0.5} outerRadius={12} />
|
|
29
|
+
<ProgressCircle progress={0.6} outerRadius={12} />
|
|
30
|
+
<ProgressCircle progress={0.7} outerRadius={12} />
|
|
31
|
+
<ProgressCircle progress={0.8} outerRadius={12} />
|
|
32
|
+
<ProgressCircle progress={0.9} outerRadius={12} />
|
|
33
|
+
<ProgressCircle progress={1} outerRadius={12} />
|
|
34
|
+
</Row>
|
|
35
|
+
```
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { RangeInput } from "../RangeInput";
|
|
2
|
+
import { Column } from "../Column";
|
|
3
|
+
import { Icon } from "../Icon";
|
|
4
|
+
|
|
5
|
+
# RangeInput
|
|
6
|
+
|
|
7
|
+
The `RangeInput` item is a thin wrapper over the HTML `<input type="range">` element with some options for adding addOn and customise the label for it.
|
|
8
|
+
|
|
9
|
+
<Column>
|
|
10
|
+
<RangeInput value={12.5} onValueChange={() => {}} />
|
|
11
|
+
<RangeInput value={25} onValueChange={() => {}} label="Right" />
|
|
12
|
+
<RangeInput
|
|
13
|
+
value={37.5}
|
|
14
|
+
onValueChange={() => {}}
|
|
15
|
+
label="Left"
|
|
16
|
+
labelPosition="start"
|
|
17
|
+
/>
|
|
18
|
+
<RangeInput
|
|
19
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
20
|
+
value={50}
|
|
21
|
+
onValueChange={() => {}}
|
|
22
|
+
label="Right"
|
|
23
|
+
/>
|
|
24
|
+
<RangeInput
|
|
25
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
26
|
+
addOnPosition="end"
|
|
27
|
+
value={62.5}
|
|
28
|
+
onValueChange={() => {}}
|
|
29
|
+
label="Left"
|
|
30
|
+
labelPosition="start"
|
|
31
|
+
/>
|
|
32
|
+
<RangeInput
|
|
33
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
34
|
+
value={75}
|
|
35
|
+
onValueChange={() => {}}
|
|
36
|
+
label="Right"
|
|
37
|
+
labelSize="large"
|
|
38
|
+
/>
|
|
39
|
+
<RangeInput
|
|
40
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
41
|
+
value={87.5}
|
|
42
|
+
onValueChange={() => {}}
|
|
43
|
+
label="Right"
|
|
44
|
+
labelSize="large"
|
|
45
|
+
labelColor="highlight"
|
|
46
|
+
/>
|
|
47
|
+
<RangeInput
|
|
48
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
49
|
+
value={100}
|
|
50
|
+
onValueChange={() => {}}
|
|
51
|
+
label="Right"
|
|
52
|
+
labelSize="large"
|
|
53
|
+
labelColor="highlight"
|
|
54
|
+
labelBold
|
|
55
|
+
/>
|
|
56
|
+
</Column>
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
<Column>
|
|
60
|
+
<RangeInput value={12.5} onValueChange={() => {}} />
|
|
61
|
+
<RangeInput value={25} onValueChange={() => {}} label="Right" />
|
|
62
|
+
<RangeInput
|
|
63
|
+
value={37.5}
|
|
64
|
+
onValueChange={() => {}}
|
|
65
|
+
label="Left"
|
|
66
|
+
labelPosition="start"
|
|
67
|
+
/>
|
|
68
|
+
<RangeInput
|
|
69
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
70
|
+
value={50}
|
|
71
|
+
onValueChange={() => {}}
|
|
72
|
+
label="Right"
|
|
73
|
+
/>
|
|
74
|
+
<RangeInput
|
|
75
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
76
|
+
addOnPosition="end"
|
|
77
|
+
value={62.5}
|
|
78
|
+
onValueChange={() => {}}
|
|
79
|
+
label="Left"
|
|
80
|
+
labelPosition="start"
|
|
81
|
+
/>
|
|
82
|
+
<RangeInput
|
|
83
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
84
|
+
value={75}
|
|
85
|
+
onValueChange={() => {}}
|
|
86
|
+
label="Right"
|
|
87
|
+
labelSize="large"
|
|
88
|
+
/>
|
|
89
|
+
<RangeInput
|
|
90
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
91
|
+
value={87.5}
|
|
92
|
+
onValueChange={() => {}}
|
|
93
|
+
label="Right"
|
|
94
|
+
labelSize="large"
|
|
95
|
+
labelColor="highlight"
|
|
96
|
+
/>
|
|
97
|
+
<RangeInput
|
|
98
|
+
addOn={<Icon icon="fa-volume-up" color="primary" size="medium" />}
|
|
99
|
+
value={100}
|
|
100
|
+
onValueChange={() => {}}
|
|
101
|
+
label="Right"
|
|
102
|
+
labelSize="large"
|
|
103
|
+
labelColor="highlight"
|
|
104
|
+
labelBold
|
|
105
|
+
/>
|
|
106
|
+
</Column>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|