aidos-ui 3.0.28 → 3.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/.claude/settings.local.json +8 -0
  2. package/dist/Badge.d.ts +2 -2
  3. package/dist/Badge.js +3 -3
  4. package/dist/Badge.js.map +1 -1
  5. package/dist/BaseButton.d.ts +1 -1
  6. package/dist/BaseButton.js +5 -5
  7. package/dist/BaseButton.js.map +1 -1
  8. package/dist/BaseInput.d.ts +1 -1
  9. package/dist/BaseInput.js +4 -4
  10. package/dist/BaseInput.js.map +1 -1
  11. package/dist/BaseLink.d.ts +1 -1
  12. package/dist/BaseLink.js +4 -4
  13. package/dist/BaseLink.js.map +1 -1
  14. package/dist/BaseList.js +3 -3
  15. package/dist/BaseList.js.map +1 -1
  16. package/dist/BaseListItem.d.ts +1 -1
  17. package/dist/BaseListItem.js +4 -4
  18. package/dist/BaseListItem.js.map +1 -1
  19. package/dist/BaseView.d.ts +1 -1
  20. package/dist/BaseView.js +8 -8
  21. package/dist/BaseView.js.map +1 -1
  22. package/dist/Button.js +3 -3
  23. package/dist/Button.js.map +1 -1
  24. package/dist/Calendar.d.ts +1 -1
  25. package/dist/Calendar.js +3 -3
  26. package/dist/Calendar.js.map +1 -1
  27. package/dist/Card.d.ts +1 -1
  28. package/dist/Card.js +3 -3
  29. package/dist/Card.js.map +1 -1
  30. package/dist/Checkbox.js +3 -3
  31. package/dist/Checkbox.js.map +1 -1
  32. package/dist/Circle.d.ts +1 -1
  33. package/dist/Circle.js +3 -3
  34. package/dist/Circle.js.map +1 -1
  35. package/dist/DarkMode.js +1 -1
  36. package/dist/DarkMode.js.map +1 -1
  37. package/dist/DateInput.d.ts +1 -1
  38. package/dist/DateInput.js +4 -4
  39. package/dist/DateInput.js.map +1 -1
  40. package/dist/DatePicker.js +3 -3
  41. package/dist/DatePicker.js.map +1 -1
  42. package/dist/DatetimeInput.d.ts +1 -1
  43. package/dist/DatetimeInput.js +3 -3
  44. package/dist/DatetimeInput.js.map +1 -1
  45. package/dist/DesignBook.js +1 -1
  46. package/dist/DesignBook.js.map +1 -1
  47. package/dist/Dialog.js +4 -4
  48. package/dist/Dialog.js.map +1 -1
  49. package/dist/Dropdown.d.ts +3 -3
  50. package/dist/Dropdown.js +4 -4
  51. package/dist/Dropdown.js.map +1 -1
  52. package/dist/FlexLayout.js +3 -3
  53. package/dist/FlexLayout.js.map +1 -1
  54. package/dist/Icon.js +10 -10
  55. package/dist/Icon.js.map +1 -1
  56. package/dist/IconButton.js +3 -3
  57. package/dist/IconButton.js.map +1 -1
  58. package/dist/IconLink.js +1 -1
  59. package/dist/IconLink.js.map +1 -1
  60. package/dist/Interactable.js +10 -10
  61. package/dist/Interactable.js.map +1 -1
  62. package/dist/Link.js +4 -4
  63. package/dist/Link.js.map +1 -1
  64. package/dist/List.d.ts +1 -1
  65. package/dist/List.js +3 -3
  66. package/dist/List.js.map +1 -1
  67. package/dist/ListButtonItem.js +2 -2
  68. package/dist/ListButtonItem.js.map +1 -1
  69. package/dist/ListDivider.js +2 -2
  70. package/dist/ListDivider.js.map +1 -1
  71. package/dist/ListHeaderItem.js +1 -1
  72. package/dist/ListHeaderItem.js.map +1 -1
  73. package/dist/ListItem.js +1 -1
  74. package/dist/ListItem.js.map +1 -1
  75. package/dist/ListLinkItem.js +2 -2
  76. package/dist/ListLinkItem.js.map +1 -1
  77. package/dist/ListSpacer.js +2 -2
  78. package/dist/ListSpacer.js.map +1 -1
  79. package/dist/MenuIcon.js +6 -6
  80. package/dist/MenuIcon.js.map +1 -1
  81. package/dist/NextJSRouter.js +3 -3
  82. package/dist/NextJSRouter.js.map +1 -1
  83. package/dist/Popover.d.ts +2 -2
  84. package/dist/Popover.js +5 -5
  85. package/dist/Popover.js.map +1 -1
  86. package/dist/ProgressBar.d.ts +2 -2
  87. package/dist/ProgressBar.js +6 -6
  88. package/dist/ProgressBar.js.map +1 -1
  89. package/dist/ProgressCircle.js +2 -2
  90. package/dist/ProgressCircle.js.map +1 -1
  91. package/dist/RangeInput.js +4 -4
  92. package/dist/RangeInput.js.map +1 -1
  93. package/dist/RootView.js +1 -1
  94. package/dist/RootView.js.map +1 -1
  95. package/dist/Select.d.ts +1 -1
  96. package/dist/Select.js +4 -4
  97. package/dist/Select.js.map +1 -1
  98. package/dist/StaticCheckbox.js +3 -3
  99. package/dist/StaticCheckbox.js.map +1 -1
  100. package/dist/Sublist.d.ts +2 -2
  101. package/dist/Sublist.js +2 -2
  102. package/dist/Sublist.js.map +1 -1
  103. package/dist/SubmitIconInput.js +2 -2
  104. package/dist/SubmitIconInput.js.map +1 -1
  105. package/dist/Tabs.d.ts +2 -1
  106. package/dist/Tabs.js +29 -25
  107. package/dist/Tabs.js.map +1 -1
  108. package/dist/Text.d.ts +2 -2
  109. package/dist/Text.js +11 -11
  110. package/dist/Text.js.map +1 -1
  111. package/dist/TextArea.d.ts +1 -1
  112. package/dist/TextArea.js +4 -4
  113. package/dist/TextArea.js.map +1 -1
  114. package/dist/TextInput.js +5 -5
  115. package/dist/TextInput.js.map +1 -1
  116. package/dist/TextPairing.d.ts +2 -2
  117. package/dist/TextPairing.js +6 -6
  118. package/dist/TextPairing.js.map +1 -1
  119. package/dist/TimeInput.js +4 -4
  120. package/dist/TimeInput.js.map +1 -1
  121. package/dist/Tooltip.d.ts +2 -2
  122. package/dist/Tooltip.js +5 -5
  123. package/dist/Tooltip.js.map +1 -1
  124. package/dist/jss.d.ts +5 -5
  125. package/dist/jss.js +31 -31
  126. package/dist/jss.js.map +1 -1
  127. package/package.json +1 -1
  128. package/src/Badge.tsx +4 -4
  129. package/src/BaseButton.tsx +6 -6
  130. package/src/BaseInput.tsx +10 -5
  131. package/src/BaseLink.tsx +5 -5
  132. package/src/BaseList.tsx +3 -6
  133. package/src/BaseListItem.tsx +5 -5
  134. package/src/BaseView.tsx +9 -9
  135. package/src/Button.tsx +3 -3
  136. package/src/Calendar.tsx +4 -4
  137. package/src/Card.tsx +3 -3
  138. package/src/Checkbox.tsx +3 -3
  139. package/src/Circle.tsx +3 -3
  140. package/src/DarkMode.tsx +1 -1
  141. package/src/DateInput.tsx +5 -5
  142. package/src/DatePicker.tsx +3 -3
  143. package/src/DatetimeInput.tsx +5 -12
  144. package/src/DesignBook.tsx +1 -1
  145. package/src/Dialog.tsx +6 -6
  146. package/src/Dropdown.tsx +8 -8
  147. package/src/FlexLayout.tsx +3 -3
  148. package/src/Icon.tsx +10 -10
  149. package/src/IconButton.tsx +3 -11
  150. package/src/IconLink.tsx +1 -1
  151. package/src/Interactable.tsx +10 -10
  152. package/src/Link.tsx +4 -4
  153. package/src/List.tsx +3 -3
  154. package/src/ListButtonItem.tsx +3 -3
  155. package/src/ListDivider.tsx +2 -2
  156. package/src/ListHeaderItem.tsx +1 -1
  157. package/src/ListItem.tsx +1 -6
  158. package/src/ListLinkItem.tsx +3 -3
  159. package/src/ListSpacer.tsx +2 -2
  160. package/src/MenuIcon.tsx +6 -6
  161. package/src/NextJSRouter.tsx +3 -3
  162. package/src/Popover.tsx +6 -6
  163. package/src/ProgressBar.tsx +7 -7
  164. package/src/ProgressCircle.tsx +2 -2
  165. package/src/RangeInput.tsx +4 -4
  166. package/src/RootView.tsx +1 -1
  167. package/src/Select.tsx +5 -5
  168. package/src/StaticCheckbox.tsx +4 -6
  169. package/src/Sublist.tsx +4 -4
  170. package/src/SubmitIconInput.tsx +2 -2
  171. package/src/Tabs.tsx +52 -45
  172. package/src/Text.tsx +19 -12
  173. package/src/TextArea.tsx +5 -5
  174. package/src/TextInput.tsx +6 -6
  175. package/src/TextPairing.tsx +7 -7
  176. package/src/TimeInput.tsx +4 -4
  177. package/src/Tooltip.tsx +6 -6
  178. package/src/docs/mdx.tsx +6 -8
  179. package/src/docs/searchIndex.ts +1 -1
  180. package/src/jss.tsx +31 -31
  181. package/src/pages/Calendar.mdx +4 -4
  182. package/src/pages/Card.mdx +4 -4
  183. package/src/pages/FlexLayout.mdx +6 -6
  184. package/src/pages/Tabs.mdx +202 -4
  185. package/src/pages/TextPairing.mdx +2 -2
  186. package/src/pages/TimeInput.mdx +2 -2
  187. package/src/pages/_app.tsx +6 -6
  188. package/src/pages/css-in-js.mdx +2 -2
package/src/jss.tsx CHANGED
@@ -137,23 +137,23 @@ const getCSS = (key: string, value): [string, string] => {
137
137
  return [cssProp, cssValue];
138
138
  };
139
139
 
140
- const flattenJSStyle = (jsStyle: JSStyle): Styles => {
141
- if (!jsStyle) {
140
+ const flattenJSStyle = (jss: JSStyle): Styles => {
141
+ if (!jss) {
142
142
  return {};
143
- } else if (Array.isArray(jsStyle)) {
143
+ } else if (Array.isArray(jss)) {
144
144
  // @ts-ignore
145
- return jsStyle.reduce((acc: Styles, jsStyle: JSStyle) => {
146
- return { ...acc, ...flattenJSStyle(jsStyle) };
145
+ return jss.reduce((acc: Styles, jss: JSStyle) => {
146
+ return { ...acc, ...flattenJSStyle(jss) };
147
147
  }, {});
148
148
  } else {
149
- return jsStyle;
149
+ return jss;
150
150
  }
151
151
  };
152
152
 
153
- export const jss = (jsStyle: JSStyle): string => {
154
- jsStyle = flattenJSStyle(jsStyle);
153
+ export const toClassnames = (jss: JSStyle): string => {
154
+ jss = flattenJSStyle(jss);
155
155
 
156
- const stylesStack = Object.entries(jsStyle);
156
+ const stylesStack = Object.entries(jss);
157
157
  const classNames = [];
158
158
 
159
159
  while (stylesStack.length) {
@@ -430,13 +430,13 @@ export const lightTheme: Theme = {
430
430
  ["--highlight-text"]: "rgb(0, 122, 255)",
431
431
  ["--negative-text"]: "rgb(255, 59, 48)",
432
432
  ["--light-text"]: "rgb(255, 255, 255)",
433
- ["--font-xsmall"]: "0.50rem",
434
- ["--font-small"]: "0.75rem",
435
- ["--font-medium"]: "1rem",
436
- ["--font-large"]: "1.25rem",
437
- ["--font-xlarge"]: "1.5rem",
438
- ["--font-xxlarge"]: "2rem",
439
- ["--font-xxxlarge"]: "4rem",
433
+ ["--font-xsmall"]: "8px",
434
+ ["--font-small"]: "12px",
435
+ ["--font-medium"]: "14px",
436
+ ["--font-large"]: "18px",
437
+ ["--font-xlarge"]: "22px",
438
+ ["--font-xxlarge"]: "26px",
439
+ ["--font-xxxlarge"]: "34px",
440
440
  /* Buttons */
441
441
  ["--background-button-positive"]: "rgb(0, 122, 255)",
442
442
  ["--background-button-secondary"]: "rgb(218, 218, 223)",
@@ -479,13 +479,13 @@ export const darkTheme: Theme = {
479
479
  ["--highlight-text"]: "#4ca7f8",
480
480
  ["--negative-text"]: "rgb(255, 59, 48)",
481
481
  ["--light-text"]: "rgb(255, 255, 255)",
482
- ["--font-xsmall"]: "0.50rem",
483
- ["--font-small"]: "0.75rem",
484
- ["--font-medium"]: "1rem",
485
- ["--font-large"]: "1.25rem",
486
- ["--font-xlarge"]: "1.5rem",
487
- ["--font-xxlarge"]: "2rem",
488
- ["--font-xxxlarge"]: "4rem",
482
+ ["--font-xsmall"]: "8px",
483
+ ["--font-small"]: "12px",
484
+ ["--font-medium"]: "14px",
485
+ ["--font-large"]: "18px",
486
+ ["--font-xlarge"]: "22px",
487
+ ["--font-xxlarge"]: "26px",
488
+ ["--font-xxxlarge"]: "34px",
489
489
  /* Buttons */
490
490
  ["--background-button-positive"]: "rgb(50, 140, 220)",
491
491
  ["--background-button-secondary"]: "rgb(82, 83, 86)",
@@ -572,27 +572,27 @@ export const TABLET_MEDIA = `@media (min-width: ${MOBILE}px) and (max-width: ${T
572
572
  export const LAPTOP_MEDIA = `@media (min-width: ${TABLET}px) and (max-width: ${LAPTOP}px)`;
573
573
  export const DESKTOP_MEDIA = `@media (min-width: ${LAPTOP}px)`;
574
574
 
575
- export function mobile(jsStyle: JSStyle): { [key: string]: JSStyle } {
575
+ export function mobile(jss: JSStyle): { [key: string]: JSStyle } {
576
576
  return {
577
- [MOBILE_MEDIA]: jsStyle,
577
+ [MOBILE_MEDIA]: jss,
578
578
  };
579
579
  }
580
580
 
581
- export function tablet(jsStyle: JSStyle): { [key: string]: JSStyle } {
581
+ export function tablet(jss: JSStyle): { [key: string]: JSStyle } {
582
582
  return {
583
- [TABLET_MEDIA]: jsStyle,
583
+ [TABLET_MEDIA]: jss,
584
584
  };
585
585
  }
586
586
 
587
- export function laptop(jsStyle: JSStyle): { [key: string]: JSStyle } {
587
+ export function laptop(jss: JSStyle): { [key: string]: JSStyle } {
588
588
  return {
589
- [LAPTOP_MEDIA]: jsStyle,
589
+ [LAPTOP_MEDIA]: jss,
590
590
  };
591
591
  }
592
592
 
593
- export function desktop(jsStyle: JSStyle): { [key: string]: JSStyle } {
593
+ export function desktop(jss: JSStyle): { [key: string]: JSStyle } {
594
594
  return {
595
- [DESKTOP_MEDIA]: jsStyle,
595
+ [DESKTOP_MEDIA]: jss,
596
596
  };
597
597
  }
598
598
 
@@ -15,10 +15,10 @@ The calendar component is can be used to represent months, and is customisable t
15
15
  </Box>
16
16
  )}
17
17
  cell={({ today, date, outOfMonth }) => (
18
- <Box relative={true} jsStyle={{ opacity: outOfMonth ? 0.2 : 1 }}>
18
+ <Box relative={true} jss={{ opacity: outOfMonth ? 0.2 : 1 }}>
19
19
  {today && (
20
20
  <Badge
21
- jsStyle={{
21
+ jss={{
22
22
  position: "absolute",
23
23
  top: "50%",
24
24
  transform: "translateY(-50%) translateX(-75%)",
@@ -40,10 +40,10 @@ The calendar component is can be used to represent months, and is customisable t
40
40
  </Box>
41
41
  )}
42
42
  cell={({ today, date, outOfMonth }) => (
43
- <Box relative={true} jsStyle={{ opacity: outOfMonth ? 0.2 : 1 }}>
43
+ <Box relative={true} jss={{ opacity: outOfMonth ? 0.2 : 1 }}>
44
44
  {today && (
45
45
  <Badge
46
- jsStyle={{
46
+ jss={{
47
47
  position: "absolute",
48
48
  top: "50%",
49
49
  transform: "translateY(-50%) translateX(-75%)",
@@ -20,7 +20,7 @@ Cards can be used to make give cohesion to some UI elements, grouping them visua
20
20
  onValueChange={() => {}}
21
21
  />
22
22
  <TextArea
23
- jsStyle={{
23
+ jss={{
24
24
  resize: "vertical",
25
25
  }}
26
26
  name="message"
@@ -30,7 +30,7 @@ Cards can be used to make give cohesion to some UI elements, grouping them visua
30
30
  onValueChange={() => {}}
31
31
  />
32
32
  <Button
33
- jsStyle={{ animation: "all 1s ease-out" }}
33
+ jss={{ animation: "all 1s ease-out" }}
34
34
  onClick={() => {}}
35
35
  type="submit"
36
36
  label="Subscribe"
@@ -51,7 +51,7 @@ Cards can be used to make give cohesion to some UI elements, grouping them visua
51
51
  onValueChange={() => {}}
52
52
  />
53
53
  <TextArea
54
- jsStyle={{
54
+ jss={{
55
55
  resize: "vertical",
56
56
  }}
57
57
  name="message"
@@ -61,7 +61,7 @@ Cards can be used to make give cohesion to some UI elements, grouping them visua
61
61
  onValueChange={() => {}}
62
62
  />
63
63
  <Button
64
- jsStyle={{ animation: "all 1s ease-out" }}
64
+ jss={{ animation: "all 1s ease-out" }}
65
65
  onClick={() => {}}
66
66
  type="submit"
67
67
  label="Subscribe"
@@ -14,7 +14,7 @@ Because flex is so common there are a `Row` and a `Column` components, with a lo
14
14
 
15
15
  <Column gap="medium">
16
16
  <Row
17
- jsStyle={{ border: `1px solid ${cssVar("--highlight")}` }}
17
+ jss={{ border: `1px solid ${cssVar("--highlight")}` }}
18
18
  justify="space-around"
19
19
  align="center"
20
20
  >
@@ -23,7 +23,7 @@ Because flex is so common there are a `Row` and a `Column` components, with a lo
23
23
  <Badge />
24
24
  </Row>
25
25
  <Row
26
- jsStyle={{ border: `1px solid ${cssVar("--highlight")}` }}
26
+ jss={{ border: `1px solid ${cssVar("--highlight")}` }}
27
27
  justify="space-evenly"
28
28
  align="center"
29
29
  >
@@ -32,7 +32,7 @@ Because flex is so common there are a `Row` and a `Column` components, with a lo
32
32
  <Badge />
33
33
  </Row>
34
34
  <Row
35
- jsStyle={{ border: `1px solid ${cssVar("--highlight")}` }}
35
+ jss={{ border: `1px solid ${cssVar("--highlight")}` }}
36
36
  justify="space-between"
37
37
  align="center"
38
38
  >
@@ -45,7 +45,7 @@ Because flex is so common there are a `Row` and a `Column` components, with a lo
45
45
  ```js
46
46
  <Column gap="medium">
47
47
  <Row
48
- jsStyle={{ border: `1px solid ${cssVar("--highlight")}` }}
48
+ jss={{ border: `1px solid ${cssVar("--highlight")}` }}
49
49
  justify="space-around"
50
50
  align="center"
51
51
  >
@@ -54,7 +54,7 @@ Because flex is so common there are a `Row` and a `Column` components, with a lo
54
54
  <Badge />
55
55
  </Row>
56
56
  <Row
57
- jsStyle={{ border: `1px solid ${cssVar("--highlight")}` }}
57
+ jss={{ border: `1px solid ${cssVar("--highlight")}` }}
58
58
  justify="space-evenly"
59
59
  align="center"
60
60
  >
@@ -63,7 +63,7 @@ Because flex is so common there are a `Row` and a `Column` components, with a lo
63
63
  <Badge />
64
64
  </Row>
65
65
  <Row
66
- jsStyle={{ border: `1px solid ${cssVar("--highlight")}` }}
66
+ jss={{ border: `1px solid ${cssVar("--highlight")}` }}
67
67
  justify="space-between"
68
68
  align="center"
69
69
  >
@@ -45,7 +45,7 @@ The `Tabs` component is made of a horizontal container with the role `tablist`,
45
45
  href: "/Tabs",
46
46
  addOn: (
47
47
  <Badge
48
- jsStyle={{ margin: cssVar("--spacing-m") }}
48
+ jss={{ margin: cssVar("--spacing-m") }}
49
49
  color="highlight"
50
50
  size="medium"
51
51
  />
@@ -72,7 +72,7 @@ The `Tabs` component is made of a horizontal container with the role `tablist`,
72
72
  href: "/Tabs",
73
73
  addOn: (
74
74
  <Badge
75
- jsStyle={{ margin: cssVar("--spacing-m") }}
75
+ jss={{ margin: cssVar("--spacing-m") }}
76
76
  color="highlight"
77
77
  size="medium"
78
78
  />
@@ -124,7 +124,7 @@ The `Tabs` component is made of a horizontal container with the role `tablist`,
124
124
  href: "/Tabs",
125
125
  addOn: (
126
126
  <Badge
127
- jsStyle={{ margin: cssVar("--spacing-m") }}
127
+ jss={{ margin: cssVar("--spacing-m") }}
128
128
  color="highlight"
129
129
  size="medium"
130
130
  />
@@ -151,7 +151,7 @@ The `Tabs` component is made of a horizontal container with the role `tablist`,
151
151
  href: "/Tabs",
152
152
  addOn: (
153
153
  <Badge
154
- jsStyle={{ margin: cssVar("--spacing-m") }}
154
+ jss={{ margin: cssVar("--spacing-m") }}
155
155
  color="highlight"
156
156
  size="medium"
157
157
  />
@@ -166,3 +166,201 @@ The `Tabs` component is made of a horizontal container with the role `tablist`,
166
166
  ```
167
167
 
168
168
  ---
169
+
170
+ ## Tabs as buttons
171
+
172
+ You can also use the `Tabs` component with buttons instead of links by omitting the `href` property in the tabs.
173
+
174
+ <Column gap="medium">
175
+ <Tabs
176
+ aria-controls="foo"
177
+ tabs={[
178
+ {
179
+ selected: true,
180
+ label: "Tab 1",
181
+ },
182
+ {
183
+ selected: false,
184
+ label: "Tab 2",
185
+ },
186
+ {
187
+ selected: false,
188
+ label: "Tab 3",
189
+ },
190
+ ]}
191
+ />
192
+ <Tabs
193
+ aria-controls="foo"
194
+ tabs={[
195
+ {
196
+ selected: false,
197
+ label: "Tab 1",
198
+ },
199
+ {
200
+ selected: true,
201
+ label: "Tab 2",
202
+ },
203
+ {
204
+ addOn: (
205
+ <Badge
206
+ jss={{ margin: cssVar("--spacing-m") }}
207
+ color="highlight"
208
+ size="medium"
209
+ />
210
+ ),
211
+ selected: false,
212
+ label: "Tab 3",
213
+ },
214
+ ]}
215
+ />
216
+ <Tabs
217
+ aria-controls="foo"
218
+ tabs={[
219
+ {
220
+ selected: false,
221
+ label: "Tab 1",
222
+ },
223
+ {
224
+ selected: false,
225
+ label: "Tab 2",
226
+ },
227
+ {
228
+ addOn: (
229
+ <Badge
230
+ jss={{ margin: cssVar("--spacing-m") }}
231
+ color="highlight"
232
+ size="medium"
233
+ />
234
+ ),
235
+ addOnPosition: "end",
236
+ selected: true,
237
+ label: "Tab 3",
238
+ },
239
+ ]}
240
+ />
241
+ </Column>
242
+
243
+ ```js
244
+ <Column gap="medium">
245
+ <Tabs
246
+ aria-controls="foo"
247
+ tabs={[
248
+ {
249
+ selected: true,
250
+ label: "Tab 1",
251
+ },
252
+ {
253
+ selected: false,
254
+ label: "Tab 2",
255
+ },
256
+ {
257
+ selected: false,
258
+ label: "Tab 3",
259
+ },
260
+ ]}
261
+ />
262
+ <Tabs
263
+ aria-controls="foo"
264
+ tabs={[
265
+ {
266
+ selected: false,
267
+ label: "Tab 1",
268
+ },
269
+ {
270
+ selected: true,
271
+ label: "Tab 2",
272
+ },
273
+ {
274
+ addOn: (
275
+ <Badge
276
+ jss={{ margin: cssVar("--spacing-m") }}
277
+ color="highlight"
278
+ size="medium"
279
+ />
280
+ ),
281
+ selected: false,
282
+ label: "Tab 3",
283
+ },
284
+ ]}
285
+ />
286
+ <Tabs
287
+ aria-controls="foo"
288
+ tabs={[
289
+ {
290
+ selected: false,
291
+ label: "Tab 1",
292
+ },
293
+ {
294
+ selected: false,
295
+ label: "Tab 2",
296
+ },
297
+ {
298
+ addOn: (
299
+ <Badge
300
+ jss={{ margin: cssVar("--spacing-m") }}
301
+ color="highlight"
302
+ size="medium"
303
+ />
304
+ ),
305
+ addOnPosition: "end",
306
+ selected: true,
307
+ label: "Tab 3",
308
+ },
309
+ ]}
310
+ />
311
+ </Column>
312
+ ```
313
+
314
+ ## Label pre renderers
315
+
316
+ You can customize how tab labels are rendered by providing a `labelRenderer` function that takes the label value and returns a ReactNode.
317
+
318
+ <Column>
319
+ <Tabs
320
+ aria-controls="foo"
321
+ labelRenderer={(value) => value.split(" ").map((word, index) => index % 2 === 0 ? <strong key={index}>{word} </strong> : word + " ")}
322
+ tabs={[
323
+ {
324
+ href: "/Tabs",
325
+ selected: true,
326
+ label: "Bold Tab 1",
327
+ },
328
+ {
329
+ href: "/Tabs",
330
+ selected: false,
331
+ label: "Bold Tab 2",
332
+ },
333
+ {
334
+ href: "/Tabs",
335
+ selected: false,
336
+ label: "Bold Tab 3",
337
+ },
338
+ ]}
339
+ />
340
+ </Column>
341
+
342
+ ```js
343
+ <Column>
344
+ <Tabs
345
+ aria-controls="foo"
346
+ labelRenderer={(value) => value.split(" ").map((word, index) => index % 2 === 0 ? <strong key={index}>{word} </strong> : word + " ")}
347
+ tabs={[
348
+ {
349
+ href: "/Tabs",
350
+ selected: true,
351
+ label: "Bold Tab 1",
352
+ },
353
+ {
354
+ href: "/Tabs",
355
+ selected: false,
356
+ label: "Bold Tab 2",
357
+ },
358
+ {
359
+ href: "/Tabs",
360
+ selected: false,
361
+ label: "Bold Tab 3",
362
+ },
363
+ ]}
364
+ />
365
+ </Column>
366
+ ```
@@ -11,7 +11,7 @@ The `TextPairing` is a seemingly simple component that can be used to represent
11
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
12
 
13
13
  <Column
14
- jsStyle={{ [" > *"]: { borderBottom: `1px solid ${cssVar("--divider")}` } }}
14
+ jss={{ [" > *"]: { borderBottom: `1px solid ${cssVar("--divider")}` } }}
15
15
  >
16
16
  <TextPairing headline="Headline" body="Body" />
17
17
  <TextPairing headline="Headline" headlineBold body="Body" />
@@ -82,7 +82,7 @@ In its simplest form a `TextPairing` is formed of two text elements (headline an
82
82
 
83
83
  ```js
84
84
  <Column
85
- jsStyle={{ [" > *"]: { borderBottom: `1px solid ${cssVar("--divider")}` } }}
85
+ jss={{ [" > *"]: { borderBottom: `1px solid ${cssVar("--divider")}` } }}
86
86
  >
87
87
  <TextPairing headline="Headline" body="Body" />
88
88
  <TextPairing headline="Headline" headlineBold body="Body" />
@@ -6,7 +6,7 @@ import { Icon } from "../Icon";
6
6
 
7
7
  The `TimeInput` component can be used to get the time (hour and minute) from the user.
8
8
 
9
- <Column gap="medium" jsStyle={{ maxWidth: 150 }}>
9
+ <Column gap="medium" jss={{ maxWidth: 150 }}>
10
10
  <TimeInput time={new Date()} onTimeChange={() => {}} />
11
11
  <TimeInput
12
12
  addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
@@ -38,7 +38,7 @@ The `TimeInput` component can be used to get the time (hour and minute) from the
38
38
  </Column>
39
39
 
40
40
  ```js
41
- <Column gap="medium" jsStyle={{ maxWidth: 150 }}>
41
+ <Column gap="medium" jss={{ maxWidth: 150 }}>
42
42
  <TimeInput time={new Date()} onTimeChange={() => {}} />
43
43
  <TimeInput
44
44
  addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
@@ -241,7 +241,7 @@ export default function App({ Component, pageProps }: AppProps) {
241
241
  <Providers themes={{ light: lightTheme, dark: darkTheme }}>
242
242
  <DocsMDXProvider>
243
243
  <BaseView
244
- jsStyle={[
244
+ jss={[
245
245
  {
246
246
  height: "100%",
247
247
  overflow: "hidden",
@@ -282,7 +282,7 @@ export default function App({ Component, pageProps }: AppProps) {
282
282
  ]}
283
283
  >
284
284
  <Row
285
- jsStyle={{
285
+ jss={{
286
286
  gridArea: "header",
287
287
  borderBottom: `1px solid ${cssVar("--divider")}`,
288
288
  }}
@@ -320,7 +320,7 @@ export default function App({ Component, pageProps }: AppProps) {
320
320
  />
321
321
  <IconButton
322
322
  aria-label={showList ? "Hide list" : "Open list"}
323
- jsStyle={[
323
+ jss={[
324
324
  laptop({ display: "none" }),
325
325
  desktop({ display: "none" }),
326
326
  ]}
@@ -334,7 +334,7 @@ export default function App({ Component, pageProps }: AppProps) {
334
334
  </Row>
335
335
  <ListDivider />
336
336
  <Column
337
- jsStyle={[
337
+ jss={[
338
338
  {
339
339
  gridArea: "list",
340
340
  zIndex: 1,
@@ -364,7 +364,7 @@ export default function App({ Component, pageProps }: AppProps) {
364
364
  bare
365
365
  id="main-list"
366
366
  navigation={true}
367
- jsStyle={[{ overflow: "scroll" }]}
367
+ jss={[{ overflow: "scroll" }]}
368
368
  ariaLabel={"API"}
369
369
  >
370
370
  {(isQuerying ? queriedPages : pages).map((element, index) => {
@@ -424,7 +424,7 @@ export default function App({ Component, pageProps }: AppProps) {
424
424
  </List>
425
425
  </Column>
426
426
  <BaseView
427
- jsStyle={[
427
+ jss={[
428
428
  {
429
429
  borderLeft: `1px solid ${cssVar("--divider")}`,
430
430
  gridArea: "content",
@@ -106,7 +106,7 @@ For example:
106
106
 
107
107
  <Row justify="center">
108
108
  <Button
109
- jsStyle={{ border: `10px solid ${cssVar("--warning")}` }}
109
+ jss={{ border: `10px solid ${cssVar("--warning")}` }}
110
110
  label="Hello"
111
111
  color="positive"
112
112
  onClick={() => {}}
@@ -116,7 +116,7 @@ For example:
116
116
  ```js
117
117
  <Row justify="center">
118
118
  <Button
119
- jsStyle={{ border: `10px solid ${cssVar("--warning")}` }}
119
+ jss={{ border: `10px solid ${cssVar("--warning")}` }}
120
120
  label="Hello"
121
121
  color="positive"
122
122
  onClick={() => {}}