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,168 @@
|
|
|
1
|
+
import { Column } from "../Column";
|
|
2
|
+
import { Tabs } from "../Tabs";
|
|
3
|
+
import { Badge } from "../Badge";
|
|
4
|
+
import { cssVar } from "../jss";
|
|
5
|
+
|
|
6
|
+
# Tabs
|
|
7
|
+
|
|
8
|
+
The `Tabs` component is made of a horizontal container with the role `tablist`, which contains tabs. It can be controlled with the keyboard and it needs to be passed an ID for the content it controls.
|
|
9
|
+
|
|
10
|
+
<Column gap="medium">
|
|
11
|
+
<Tabs
|
|
12
|
+
aria-controls="foo"
|
|
13
|
+
tabs={[
|
|
14
|
+
{
|
|
15
|
+
href: "/Tabs",
|
|
16
|
+
selected: true,
|
|
17
|
+
label: "Tab 1",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
href: "/Tabs",
|
|
21
|
+
selected: false,
|
|
22
|
+
label: "Tab 2",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
href: "/Tabs",
|
|
26
|
+
selected: false,
|
|
27
|
+
label: "Tab 3",
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
<Tabs
|
|
32
|
+
aria-controls="foo"
|
|
33
|
+
tabs={[
|
|
34
|
+
{
|
|
35
|
+
href: "/Tabs",
|
|
36
|
+
selected: false,
|
|
37
|
+
label: "Tab 1",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
href: "/Tabs",
|
|
41
|
+
selected: true,
|
|
42
|
+
label: "Tab 2",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
href: "/Tabs",
|
|
46
|
+
addOn: (
|
|
47
|
+
<Badge
|
|
48
|
+
jsStyle={{ margin: cssVar("--spacing-m") }}
|
|
49
|
+
color="highlight"
|
|
50
|
+
size="medium"
|
|
51
|
+
/>
|
|
52
|
+
),
|
|
53
|
+
selected: false,
|
|
54
|
+
label: "Tab 3",
|
|
55
|
+
},
|
|
56
|
+
]}
|
|
57
|
+
/>
|
|
58
|
+
<Tabs
|
|
59
|
+
aria-controls="foo"
|
|
60
|
+
tabs={[
|
|
61
|
+
{
|
|
62
|
+
href: "/Tabs",
|
|
63
|
+
selected: false,
|
|
64
|
+
label: "Tab 1",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
href: "/Tabs",
|
|
68
|
+
selected: false,
|
|
69
|
+
label: "Tab 2",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
href: "/Tabs",
|
|
73
|
+
addOn: (
|
|
74
|
+
<Badge
|
|
75
|
+
jsStyle={{ margin: cssVar("--spacing-m") }}
|
|
76
|
+
color="highlight"
|
|
77
|
+
size="medium"
|
|
78
|
+
/>
|
|
79
|
+
),
|
|
80
|
+
addOnPosition: "end",
|
|
81
|
+
selected: true,
|
|
82
|
+
label: "Tab 3",
|
|
83
|
+
},
|
|
84
|
+
]}
|
|
85
|
+
/>
|
|
86
|
+
</Column>
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
<Column gap="medium">
|
|
90
|
+
<Tabs
|
|
91
|
+
aria-controls="foo"
|
|
92
|
+
tabs={[
|
|
93
|
+
{
|
|
94
|
+
href: "/Tabs",
|
|
95
|
+
selected: true,
|
|
96
|
+
label: "Tab 1",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
href: "/Tabs",
|
|
100
|
+
selected: false,
|
|
101
|
+
label: "Tab 2",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
href: "/Tabs",
|
|
105
|
+
selected: false,
|
|
106
|
+
label: "Tab 3",
|
|
107
|
+
},
|
|
108
|
+
]}
|
|
109
|
+
/>
|
|
110
|
+
<Tabs
|
|
111
|
+
aria-controls="foo"
|
|
112
|
+
tabs={[
|
|
113
|
+
{
|
|
114
|
+
href: "/Tabs",
|
|
115
|
+
selected: false,
|
|
116
|
+
label: "Tab 1",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
href: "/Tabs",
|
|
120
|
+
selected: true,
|
|
121
|
+
label: "Tab 2",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
href: "/Tabs",
|
|
125
|
+
addOn: (
|
|
126
|
+
<Badge
|
|
127
|
+
jsStyle={{ margin: cssVar("--spacing-m") }}
|
|
128
|
+
color="highlight"
|
|
129
|
+
size="medium"
|
|
130
|
+
/>
|
|
131
|
+
),
|
|
132
|
+
selected: false,
|
|
133
|
+
label: "Tab 3",
|
|
134
|
+
},
|
|
135
|
+
]}
|
|
136
|
+
/>
|
|
137
|
+
<Tabs
|
|
138
|
+
aria-controls="foo"
|
|
139
|
+
tabs={[
|
|
140
|
+
{
|
|
141
|
+
href: "/Tabs",
|
|
142
|
+
selected: false,
|
|
143
|
+
label: "Tab 1",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
href: "/Tabs",
|
|
147
|
+
selected: false,
|
|
148
|
+
label: "Tab 2",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
href: "/Tabs",
|
|
152
|
+
addOn: (
|
|
153
|
+
<Badge
|
|
154
|
+
jsStyle={{ margin: cssVar("--spacing-m") }}
|
|
155
|
+
color="highlight"
|
|
156
|
+
size="medium"
|
|
157
|
+
/>
|
|
158
|
+
),
|
|
159
|
+
addOnPosition: "end",
|
|
160
|
+
selected: true,
|
|
161
|
+
label: "Tab 3",
|
|
162
|
+
},
|
|
163
|
+
]}
|
|
164
|
+
/>
|
|
165
|
+
</Column>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { Column } from "../Column";
|
|
2
|
+
import { Text, Span, P, H1, H2, H3, Li } from "../Text";
|
|
3
|
+
|
|
4
|
+
# Text
|
|
5
|
+
|
|
6
|
+
The `Text` component has mant props and is central to many of the other components, that make use of it to ensure consistent styles accross the desgin system.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Semantic API
|
|
11
|
+
|
|
12
|
+
In general the `Text` component is too flexible for general use, since it has many props that can lead to jarring styling. Instead, there is a higher level API that replicates HTML semantics with consitent stylin. These are really thin wrappers around `Text` that can be custimased to the same level; and one can still use `Text` whenever semantics are not important and there is need for very specific styling.
|
|
13
|
+
|
|
14
|
+
<Column gap="medium">
|
|
15
|
+
<Span>Span</Span>
|
|
16
|
+
<P>P</P>
|
|
17
|
+
<H1 tag="h2">H1</H1>
|
|
18
|
+
<H2>H2</H2>
|
|
19
|
+
<H3>H3</H3>
|
|
20
|
+
<Li>Li</Li>
|
|
21
|
+
</Column>
|
|
22
|
+
|
|
23
|
+
<br />
|
|
24
|
+
\* If you inspect the DOM you will see that in the previous example I override the
|
|
25
|
+
HTML tag for the component `H1` because having more than one H1 is discouraged for
|
|
26
|
+
accessibility.
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
<Column gap="medium">
|
|
30
|
+
<Span>Span</Span>
|
|
31
|
+
<P>P</P>
|
|
32
|
+
<H1>H1</H1>
|
|
33
|
+
<H2>H2</H2>
|
|
34
|
+
<H3>H3</H3>
|
|
35
|
+
<Li>Li</Li>
|
|
36
|
+
</Column>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Size
|
|
42
|
+
|
|
43
|
+
<Column gap="medium">
|
|
44
|
+
<Text size="xsmall">{"xsmall"}</Text>
|
|
45
|
+
<Text size="small">{"small"}</Text>
|
|
46
|
+
<Text size="medium">{"medium"}</Text>
|
|
47
|
+
<Text size="large">{"large"}</Text>
|
|
48
|
+
<Text size="xlarge">{"xlarge"}</Text>
|
|
49
|
+
</Column>
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
<Column gap="medium">
|
|
53
|
+
<Text size="xsmall">xsmall</Text>
|
|
54
|
+
<Text size="small">small</Text>
|
|
55
|
+
<Text size="medium">medium</Text>
|
|
56
|
+
<Text size="large">large</Text>
|
|
57
|
+
<Text size="xlarge">xlarge</Text>
|
|
58
|
+
</Column>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Color
|
|
64
|
+
|
|
65
|
+
<Column gap="medium">
|
|
66
|
+
<Text color="primary">{"primary"}</Text>
|
|
67
|
+
<Text color="secondary">{"secondary"}</Text>
|
|
68
|
+
<Text color="highlight">{"highlight"}</Text>
|
|
69
|
+
<Text color="negative">{"negative"}</Text>
|
|
70
|
+
<Text color="subtle">{"subtle"}</Text>
|
|
71
|
+
<Text color="light">{"light"}</Text>
|
|
72
|
+
<Text color="inherit">{"inherit"}</Text>
|
|
73
|
+
</Column>
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
<Column gap="medium">
|
|
77
|
+
<Text color="primary">{"primary"}</Text>
|
|
78
|
+
<Text color="secondary">{"secondary"}</Text>
|
|
79
|
+
<Text color="highlight">{"highlight"}</Text>
|
|
80
|
+
<Text color="negative">{"negative"}</Text>
|
|
81
|
+
<Text color="subtle">{"subtle"}</Text>
|
|
82
|
+
<Text color="light">{"light"}</Text>
|
|
83
|
+
<Text color="inherit">{"inherit"}</Text>
|
|
84
|
+
</Column>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Bold
|
|
90
|
+
|
|
91
|
+
<Column gap="medium">
|
|
92
|
+
<Text bold>{"bold"}</Text>
|
|
93
|
+
<Text>{"not bold"}</Text>
|
|
94
|
+
</Column>
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
<Column gap="medium">
|
|
98
|
+
<Text bold>{"bold"}</Text>
|
|
99
|
+
<Text>{"not bold"}</Text>
|
|
100
|
+
</Column>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Ellipsis
|
|
106
|
+
|
|
107
|
+
By default ellipsis is enabled in the `Span` element, but can be configured with the `ellipsis` prop.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Span
|
|
112
|
+
|
|
113
|
+
<Column>
|
|
114
|
+
<Span>
|
|
115
|
+
{
|
|
116
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
|
117
|
+
}
|
|
118
|
+
</Span>
|
|
119
|
+
</Column>
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### P
|
|
124
|
+
|
|
125
|
+
<Column>
|
|
126
|
+
<P>
|
|
127
|
+
{
|
|
128
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
|
129
|
+
}
|
|
130
|
+
</P>
|
|
131
|
+
</Column>
|
|
132
|
+
|
|
133
|
+
---
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Column } from "../Column";
|
|
2
|
+
import { Row } from "../Row";
|
|
3
|
+
import { Icon } from "../Icon";
|
|
4
|
+
import { TextInput } from "../TextInput";
|
|
5
|
+
|
|
6
|
+
# TextInput
|
|
7
|
+
|
|
8
|
+
The `TextInput` component is an `HTML` input with some extra markup to support more advanced styles, like icons.
|
|
9
|
+
|
|
10
|
+
## Base TextInput
|
|
11
|
+
|
|
12
|
+
<Column gap="medium">
|
|
13
|
+
<TextInput
|
|
14
|
+
value=""
|
|
15
|
+
placeholder="Placeholder text input"
|
|
16
|
+
onValueChange={() => {}}
|
|
17
|
+
/>
|
|
18
|
+
<TextInput value="Text input" onValueChange={() => {}} />
|
|
19
|
+
<TextInput
|
|
20
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
21
|
+
value="Text input"
|
|
22
|
+
onValueChange={() => {}}
|
|
23
|
+
/>
|
|
24
|
+
<TextInput
|
|
25
|
+
value="Text input"
|
|
26
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
27
|
+
addOnPosition="end"
|
|
28
|
+
placeholder="Placeholder text input"
|
|
29
|
+
onValueChange={() => {}}
|
|
30
|
+
/>
|
|
31
|
+
</Column>
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
<Column gap="medium">
|
|
35
|
+
<TextInput
|
|
36
|
+
value=""
|
|
37
|
+
placeholder="Placeholder text input"
|
|
38
|
+
onValueChange={() => {}}
|
|
39
|
+
/>
|
|
40
|
+
<TextInput value="Text input" onValueChange={() => {}} />
|
|
41
|
+
<TextInput
|
|
42
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
43
|
+
value="Text input"
|
|
44
|
+
onValueChange={() => {}}
|
|
45
|
+
/>
|
|
46
|
+
<TextInput
|
|
47
|
+
value="Text input"
|
|
48
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
49
|
+
addOnPosition="end"
|
|
50
|
+
placeholder="Placeholder text input"
|
|
51
|
+
onValueChange={() => {}}
|
|
52
|
+
/>
|
|
53
|
+
</Column>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Bare TextInput
|
|
59
|
+
|
|
60
|
+
<Column gap="medium">
|
|
61
|
+
<TextInput
|
|
62
|
+
bare
|
|
63
|
+
value=""
|
|
64
|
+
placeholder="Placeholder text input"
|
|
65
|
+
onValueChange={() => {}}
|
|
66
|
+
/>
|
|
67
|
+
<TextInput bare value="Text input" onValueChange={() => {}} />
|
|
68
|
+
<TextInput
|
|
69
|
+
bare
|
|
70
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
71
|
+
value="Text input"
|
|
72
|
+
onValueChange={() => {}}
|
|
73
|
+
/>
|
|
74
|
+
<TextInput
|
|
75
|
+
bare
|
|
76
|
+
value="Text input"
|
|
77
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
78
|
+
addOnPosition="end"
|
|
79
|
+
placeholder="Placeholder text input"
|
|
80
|
+
onValueChange={() => {}}
|
|
81
|
+
/>
|
|
82
|
+
</Column>
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
<Column gap="medium">
|
|
86
|
+
<TextInput
|
|
87
|
+
bare
|
|
88
|
+
value=""
|
|
89
|
+
placeholder="Placeholder text input"
|
|
90
|
+
onValueChange={() => {}}
|
|
91
|
+
/>
|
|
92
|
+
<TextInput bare value="Text input" onValueChange={() => {}} />
|
|
93
|
+
<TextInput
|
|
94
|
+
bare
|
|
95
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
96
|
+
value="Text input"
|
|
97
|
+
onValueChange={() => {}}
|
|
98
|
+
/>
|
|
99
|
+
<TextInput
|
|
100
|
+
bare
|
|
101
|
+
value="Text input"
|
|
102
|
+
addOn={<Icon icon="fa-user" color="primary" size="medium" />}
|
|
103
|
+
addOnPosition="end"
|
|
104
|
+
placeholder="Placeholder text input"
|
|
105
|
+
onValueChange={() => {}}
|
|
106
|
+
/>
|
|
107
|
+
</Column>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { TextPairing } from "../TextPairing";
|
|
2
|
+
import { Column } from "../Column";
|
|
3
|
+
import { ListDivider } from "../ListDivider";
|
|
4
|
+
import { Icon } from "../Icon";
|
|
5
|
+
import { cssVar } from "../jss";
|
|
6
|
+
|
|
7
|
+
# TextPairing
|
|
8
|
+
|
|
9
|
+
The `TextPairing` is a seemingly simple component that can be used to represent multiple visual ideas. Many of the other components use it to create more complex elements.
|
|
10
|
+
|
|
11
|
+
In its simplest form a `TextPairing` is formed of two text elements (headline and body) laid out vertically. However it accepts multiple props to enable much more complex representations.
|
|
12
|
+
|
|
13
|
+
<Column
|
|
14
|
+
jsStyle={{ [" > *"]: { borderBottom: `1px solid ${cssVar("--divider")}` } }}
|
|
15
|
+
>
|
|
16
|
+
<TextPairing headline="Headline" body="Body" />
|
|
17
|
+
<TextPairing headline="Headline" headlineBold body="Body" />
|
|
18
|
+
<TextPairing
|
|
19
|
+
headline="Headline"
|
|
20
|
+
headlineBold
|
|
21
|
+
headlineSize="large"
|
|
22
|
+
body="Body"
|
|
23
|
+
/>
|
|
24
|
+
<TextPairing
|
|
25
|
+
headline="Headline"
|
|
26
|
+
headlineBold
|
|
27
|
+
headlineSize="large"
|
|
28
|
+
body="Body"
|
|
29
|
+
bodyColor="subtle"
|
|
30
|
+
/>
|
|
31
|
+
<TextPairing
|
|
32
|
+
headline="Headline"
|
|
33
|
+
headlineBold
|
|
34
|
+
headlineSize="large"
|
|
35
|
+
body="Body"
|
|
36
|
+
bodyColor="subtle"
|
|
37
|
+
bodySize="small"
|
|
38
|
+
/>
|
|
39
|
+
<TextPairing
|
|
40
|
+
headline="Headline"
|
|
41
|
+
headlineBold
|
|
42
|
+
headlineSize="large"
|
|
43
|
+
body="Body"
|
|
44
|
+
bodyColor="subtle"
|
|
45
|
+
bodySize="small"
|
|
46
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
47
|
+
/>
|
|
48
|
+
<TextPairing
|
|
49
|
+
headline="Headline"
|
|
50
|
+
headlineBold
|
|
51
|
+
headlineSize="large"
|
|
52
|
+
body="Body"
|
|
53
|
+
bodyColor="subtle"
|
|
54
|
+
bodySize="small"
|
|
55
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
56
|
+
gap="medium"
|
|
57
|
+
/>
|
|
58
|
+
<TextPairing
|
|
59
|
+
headline="Headline"
|
|
60
|
+
headlineBold
|
|
61
|
+
headlineSize="large"
|
|
62
|
+
body="Body"
|
|
63
|
+
bodyColor="subtle"
|
|
64
|
+
bodySize="small"
|
|
65
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
66
|
+
gap="medium"
|
|
67
|
+
addOnPosition="end"
|
|
68
|
+
/>
|
|
69
|
+
<TextPairing
|
|
70
|
+
headline="Headline"
|
|
71
|
+
headlineBold
|
|
72
|
+
headlineSize="large"
|
|
73
|
+
body="Body"
|
|
74
|
+
bodyColor="subtle"
|
|
75
|
+
bodySize="small"
|
|
76
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
77
|
+
headlineAddOn={<Icon icon="fa-plus" color="primary" size="small" />}
|
|
78
|
+
gap="medium"
|
|
79
|
+
addOnPosition="end"
|
|
80
|
+
/>
|
|
81
|
+
</Column>
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
<Column
|
|
85
|
+
jsStyle={{ [" > *"]: { borderBottom: `1px solid ${cssVar("--divider")}` } }}
|
|
86
|
+
>
|
|
87
|
+
<TextPairing headline="Headline" body="Body" />
|
|
88
|
+
<TextPairing headline="Headline" headlineBold body="Body" />
|
|
89
|
+
<TextPairing
|
|
90
|
+
headline="Headline"
|
|
91
|
+
headlineBold
|
|
92
|
+
headlineSize="large"
|
|
93
|
+
body="Body"
|
|
94
|
+
/>
|
|
95
|
+
<TextPairing
|
|
96
|
+
headline="Headline"
|
|
97
|
+
headlineBold
|
|
98
|
+
headlineSize="large"
|
|
99
|
+
body="Body"
|
|
100
|
+
bodyColor="subtle"
|
|
101
|
+
/>
|
|
102
|
+
<TextPairing
|
|
103
|
+
headline="Headline"
|
|
104
|
+
headlineBold
|
|
105
|
+
headlineSize="large"
|
|
106
|
+
body="Body"
|
|
107
|
+
bodyColor="subtle"
|
|
108
|
+
bodySize="small"
|
|
109
|
+
/>
|
|
110
|
+
<TextPairing
|
|
111
|
+
headline="Headline"
|
|
112
|
+
headlineBold
|
|
113
|
+
headlineSize="large"
|
|
114
|
+
body="Body"
|
|
115
|
+
bodyColor="subtle"
|
|
116
|
+
bodySize="small"
|
|
117
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
118
|
+
/>
|
|
119
|
+
<TextPairing
|
|
120
|
+
headline="Headline"
|
|
121
|
+
headlineBold
|
|
122
|
+
headlineSize="large"
|
|
123
|
+
body="Body"
|
|
124
|
+
bodyColor="subtle"
|
|
125
|
+
bodySize="small"
|
|
126
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
127
|
+
gap="medium"
|
|
128
|
+
/>
|
|
129
|
+
<TextPairing
|
|
130
|
+
headline="Headline"
|
|
131
|
+
headlineBold
|
|
132
|
+
headlineSize="large"
|
|
133
|
+
body="Body"
|
|
134
|
+
bodyColor="subtle"
|
|
135
|
+
bodySize="small"
|
|
136
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
137
|
+
gap="medium"
|
|
138
|
+
addOnPosition="end"
|
|
139
|
+
/>
|
|
140
|
+
<TextPairing
|
|
141
|
+
headline="Headline"
|
|
142
|
+
headlineBold
|
|
143
|
+
headlineSize="large"
|
|
144
|
+
body="Body"
|
|
145
|
+
bodyColor="subtle"
|
|
146
|
+
bodySize="small"
|
|
147
|
+
addOn={<Icon icon="fa-bicycle" color="primary" size="xxlarge" />}
|
|
148
|
+
headlineAddOn={<Icon icon="fa-plus" color="primary" size="small" />}
|
|
149
|
+
gap="medium"
|
|
150
|
+
addOnPosition="end"
|
|
151
|
+
/>
|
|
152
|
+
</Column>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Column } from "../Column";
|
|
2
|
+
import { TimeInput } from "../TimeInput";
|
|
3
|
+
import { Icon } from "../Icon";
|
|
4
|
+
|
|
5
|
+
# TimeInput
|
|
6
|
+
|
|
7
|
+
The `TimeInput` component can be used to get the time (hour and minute) from the user.
|
|
8
|
+
|
|
9
|
+
<Column gap="medium" jsStyle={{ maxWidth: 150 }}>
|
|
10
|
+
<TimeInput time={new Date()} onTimeChange={() => {}} />
|
|
11
|
+
<TimeInput
|
|
12
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
13
|
+
time={new Date()}
|
|
14
|
+
onTimeChange={() => {}}
|
|
15
|
+
/>
|
|
16
|
+
<TimeInput
|
|
17
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
18
|
+
addOnPosition="end"
|
|
19
|
+
time={new Date()}
|
|
20
|
+
onTimeChange={() => {}}
|
|
21
|
+
/>
|
|
22
|
+
<TimeInput bare time={new Date()} onTimeChange={() => {}} />
|
|
23
|
+
<TimeInput
|
|
24
|
+
bare
|
|
25
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
26
|
+
time={new Date()}
|
|
27
|
+
onTimeChange={() => {}}
|
|
28
|
+
/>
|
|
29
|
+
<TimeInput
|
|
30
|
+
bare
|
|
31
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
32
|
+
addOnPosition="end"
|
|
33
|
+
time={new Date()}
|
|
34
|
+
onTimeChange={() => {}}
|
|
35
|
+
/>
|
|
36
|
+
<TimeInput disabled time={new Date()} onTimeChange={() => {}} />
|
|
37
|
+
<TimeInput bare disabled time={new Date()} onTimeChange={() => {}} />
|
|
38
|
+
</Column>
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
<Column gap="medium" jsStyle={{ maxWidth: 150 }}>
|
|
42
|
+
<TimeInput time={new Date()} onTimeChange={() => {}} />
|
|
43
|
+
<TimeInput
|
|
44
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
45
|
+
time={new Date()}
|
|
46
|
+
onTimeChange={() => {}}
|
|
47
|
+
/>
|
|
48
|
+
<TimeInput
|
|
49
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
50
|
+
addOnPosition="end"
|
|
51
|
+
time={new Date()}
|
|
52
|
+
onTimeChange={() => {}}
|
|
53
|
+
/>
|
|
54
|
+
<TimeInput bare time={new Date()} onTimeChange={() => {}} />
|
|
55
|
+
<TimeInput
|
|
56
|
+
bare
|
|
57
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
58
|
+
time={new Date()}
|
|
59
|
+
onTimeChange={() => {}}
|
|
60
|
+
/>
|
|
61
|
+
<TimeInput
|
|
62
|
+
bare
|
|
63
|
+
addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
|
|
64
|
+
addOnPosition="end"
|
|
65
|
+
time={new Date()}
|
|
66
|
+
onTimeChange={() => {}}
|
|
67
|
+
/>
|
|
68
|
+
<TimeInput disabled time={new Date()} onTimeChange={() => {}} />
|
|
69
|
+
<TimeInput bare disabled time={new Date()} onTimeChange={() => {}} />
|
|
70
|
+
</Column>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Button } from "../Button";
|
|
2
|
+
import { Tooltip } from "../Tooltip";
|
|
3
|
+
|
|
4
|
+
# Tooltip
|
|
5
|
+
|
|
6
|
+
The `Tooltip` component can be used to display light contextual information about an element. The content of a tooltip should not be interactable (to make it accessible interactable elements should be dialgs) so they only accept content of type `string`.
|
|
7
|
+
|
|
8
|
+
<Tooltip content="Tooltip here">
|
|
9
|
+
<Button
|
|
10
|
+
bare
|
|
11
|
+
label="Hover to show tooltip"
|
|
12
|
+
color="positive"
|
|
13
|
+
onClick={() => {}}
|
|
14
|
+
/>
|
|
15
|
+
</Tooltip>
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
<Tooltip content="Tooltip here">
|
|
19
|
+
<Button
|
|
20
|
+
bare
|
|
21
|
+
label="Hover to show tooltip"
|
|
22
|
+
color="positive"
|
|
23
|
+
onClick={() => {}}
|
|
24
|
+
/>
|
|
25
|
+
</Tooltip>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|