aidos-ui 3.0.12 → 3.0.13
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/dist/BaseButton.d.ts +1 -0
- package/dist/BaseButton.js +2 -1
- package/dist/BaseButton.js.map +1 -1
- package/dist/BaseLink.d.ts +1 -0
- package/dist/BaseLink.js +2 -1
- package/dist/BaseLink.js.map +1 -1
- package/dist/Button.d.ts +1 -0
- package/dist/Button.js +2 -2
- package/dist/Button.js.map +1 -1
- package/dist/DarkMode.js +1 -1
- package/dist/DarkMode.js.map +1 -1
- package/dist/DesignBook.js +2 -2
- package/dist/DesignBook.js.map +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Dialog.js.map +1 -1
- package/dist/Interactable.d.ts +3 -2
- package/dist/Interactable.js +73 -20
- package/dist/Interactable.js.map +1 -1
- package/dist/Link.d.ts +1 -0
- package/dist/Link.js +2 -2
- package/dist/Link.js.map +1 -1
- package/dist/ListButtonItem.js +2 -2
- package/dist/ListButtonItem.js.map +1 -1
- package/dist/ListLinkItem.js +1 -1
- package/dist/ListLinkItem.js.map +1 -1
- package/dist/Sublist.js +1 -1
- package/dist/Sublist.js.map +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/Tabs.js.map +1 -1
- package/package.json +1 -1
- package/src/BaseButton.tsx +3 -0
- package/src/BaseLink.tsx +3 -0
- package/src/Button.tsx +7 -1
- package/src/DarkMode.tsx +1 -1
- package/src/DesignBook.tsx +10 -10
- package/src/Dialog.tsx +1 -1
- package/src/Interactable.tsx +80 -20
- package/src/Link.tsx +8 -2
- package/src/ListButtonItem.tsx +2 -2
- package/src/ListLinkItem.tsx +1 -1
- package/src/Sublist.tsx +1 -2
- package/src/Tabs.tsx +1 -1
- package/src/docs/searchIndex.ts +1 -1
- package/src/pages/Button.mdx +53 -5
- package/src/pages/Link.mdx +37 -5
package/dist/Sublist.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sublist.js","sourceRoot":"","sources":["../src/Sublist.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Sublist.js","sourceRoot":"","sources":["../src/Sublist.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5B,MAAM,UAAU,OAAO,CAAC,EACtB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,YAAY,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,EACnC,OAAO,EACP,cAAc,GAUf;IACC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzE,OAAO,CACL,8BACE,KAAC,cAAc,IACb,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,SAAS,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EACH,MAAC,GAAG,IAAC,GAAG,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,aAC7B,cAAc,EACf,KAAC,GAAG,IACF,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE;gCACP;oCACE,UAAU,EAAE,yBAAyB;iCACtC;gCACD,CAAC,SAAS,IAAI;oCACZ,SAAS,EAAE,gBAAgB;iCAC5B;6BACF,YAED,KAAC,IAAI,IACH,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,wBAAwB,GAC7B,GACE,IACF,EAER,aAAa,EAAC,KAAK,EACnB,KAAK,EAAC,SAAS,GACf,EACD,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,IAC3B,CACJ,CAAC;AACJ,CAAC"}
|
package/dist/Tabs.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useNavigation } from "./useNavigation";
|
|
|
6
6
|
import { Text } from "./Text";
|
|
7
7
|
export function Tabs({ tabs, gap = "none", padding = "none", tabPadding = "medium", labelSize = "large", jsStyle, tabJSStyle, ["aria-controls"]: ariaControls, ...otherProps }) {
|
|
8
8
|
const root = useNavigation();
|
|
9
|
-
return (_jsx(Row, { role: "tablist", jsStyle: jsStyle, gap: gap, padding: padding, ref: root, ...otherProps, children: tabs.map(({ label, href, onClick, selected, addOn, addOnPosition = "start", }) => (_jsxs(BaseLink, { "aria-controls": ariaControls, role: "tab", "aria-selected": selected ? "true" : undefined, bare: true, color: selected ? "positive" : "
|
|
9
|
+
return (_jsx(Row, { role: "tablist", jsStyle: jsStyle, gap: gap, padding: padding, ref: root, ...otherProps, children: tabs.map(({ label, href, onClick, selected, addOn, addOnPosition = "start", }) => (_jsxs(BaseLink, { "aria-controls": ariaControls, role: "tab", "aria-selected": selected ? "true" : undefined, bare: true, color: selected ? "positive" : "primary", href: href, onClick: onClick, animateInteraction: false, jsStyle: [
|
|
10
10
|
{
|
|
11
11
|
textDecoration: "none",
|
|
12
12
|
borderBottom: selected
|
package/dist/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,Y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BAAoB,EAAE,MAAM,CAAC,mBAAmB,CAAC;qBAClD;oBACD,QAAQ,EAAE;wBACR,eAAe,EAAE,MAAM,CAAC,sBAAsB,CAAC;qBAChD;oBACD,eAAe,EAAE;wBACf,eAAe,EAAE,MAAM,CAAC,sBAAsB,CAAC;qBAChD;iBACF;gBACD,UAAU,CAAC,UAAU,CAAC;gBACtB,UAAU;aACX,aAEA,aAAa,KAAK,OAAO,IAAI,KAAK,EACnC,KAAC,IAAI,IAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,YAC7D,KAAK,GACD,EACN,aAAa,KAAK,KAAK,IAAI,KAAK,KApC5B,KAAK,CAqCD,CACZ,CACF,GACG,CACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/src/BaseButton.tsx
CHANGED
|
@@ -8,6 +8,7 @@ export interface BaseButtonProps
|
|
|
8
8
|
jsStyle?: JSStyle;
|
|
9
9
|
color: InteractableColor;
|
|
10
10
|
bare?: boolean;
|
|
11
|
+
border?: boolean;
|
|
11
12
|
className?: undefined;
|
|
12
13
|
animateInteraction?: boolean;
|
|
13
14
|
padding?: Padding;
|
|
@@ -21,6 +22,7 @@ export const BaseButton = React.forwardRef(
|
|
|
21
22
|
jsStyle,
|
|
22
23
|
color,
|
|
23
24
|
bare = false,
|
|
25
|
+
border = false,
|
|
24
26
|
disabled,
|
|
25
27
|
animateInteraction = true,
|
|
26
28
|
padding,
|
|
@@ -44,6 +46,7 @@ export const BaseButton = React.forwardRef(
|
|
|
44
46
|
...getInteractableJSStyles({
|
|
45
47
|
color,
|
|
46
48
|
bare,
|
|
49
|
+
border,
|
|
47
50
|
disabled,
|
|
48
51
|
animateInteraction,
|
|
49
52
|
padding,
|
package/src/BaseLink.tsx
CHANGED
|
@@ -11,6 +11,7 @@ export interface BaseLinkProps
|
|
|
11
11
|
href: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
bare?: boolean;
|
|
14
|
+
border?: boolean;
|
|
14
15
|
className?: undefined;
|
|
15
16
|
animateInteraction?: boolean;
|
|
16
17
|
padding?: Padding;
|
|
@@ -33,6 +34,7 @@ export const BaseLink = React.forwardRef(
|
|
|
33
34
|
animateInteraction = true,
|
|
34
35
|
padding,
|
|
35
36
|
href,
|
|
37
|
+
border,
|
|
36
38
|
role = "link",
|
|
37
39
|
...otherProps
|
|
38
40
|
}: BaseLinkProps,
|
|
@@ -61,6 +63,7 @@ export const BaseLink = React.forwardRef(
|
|
|
61
63
|
className={jss([
|
|
62
64
|
...getInteractableJSStyles({
|
|
63
65
|
color,
|
|
66
|
+
border,
|
|
64
67
|
bare,
|
|
65
68
|
disabled,
|
|
66
69
|
animateInteraction,
|
package/src/Button.tsx
CHANGED
|
@@ -21,6 +21,7 @@ export interface ButtonProps extends BaseButtonProps {
|
|
|
21
21
|
align?: Align;
|
|
22
22
|
gap?: Gap;
|
|
23
23
|
justify?: Justify;
|
|
24
|
+
bold?: boolean;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export const Button = React.forwardRef(
|
|
@@ -38,6 +39,7 @@ export const Button = React.forwardRef(
|
|
|
38
39
|
justify = "center",
|
|
39
40
|
jsStyle,
|
|
40
41
|
size = "medium",
|
|
42
|
+
bold,
|
|
41
43
|
...otherProps
|
|
42
44
|
}: ButtonProps,
|
|
43
45
|
ref?: React.Ref<HTMLButtonElement>
|
|
@@ -67,7 +69,11 @@ export const Button = React.forwardRef(
|
|
|
67
69
|
color={getGlyphColor(color, disabled, bare)}
|
|
68
70
|
/>
|
|
69
71
|
)}
|
|
70
|
-
<Text
|
|
72
|
+
<Text
|
|
73
|
+
bold={bold}
|
|
74
|
+
size={size}
|
|
75
|
+
color={getGlyphColor(color, disabled, bare)}
|
|
76
|
+
>
|
|
71
77
|
{label}
|
|
72
78
|
</Text>
|
|
73
79
|
{icon && iconPosition === "right" && (
|
package/src/DarkMode.tsx
CHANGED
package/src/DesignBook.tsx
CHANGED
|
@@ -109,7 +109,7 @@ export function DesignBook() {
|
|
|
109
109
|
<Button
|
|
110
110
|
style={{ position: "relative" }}
|
|
111
111
|
label="Secondary button"
|
|
112
|
-
color="
|
|
112
|
+
color="primary"
|
|
113
113
|
onClick={() => {
|
|
114
114
|
toggle(undefined);
|
|
115
115
|
}}
|
|
@@ -192,7 +192,7 @@ export function DesignBook() {
|
|
|
192
192
|
<Button
|
|
193
193
|
bare={true}
|
|
194
194
|
label="Bare secondary button"
|
|
195
|
-
color="
|
|
195
|
+
color="primary"
|
|
196
196
|
onClick={() => {}}
|
|
197
197
|
/>
|
|
198
198
|
</Row>
|
|
@@ -223,7 +223,7 @@ export function DesignBook() {
|
|
|
223
223
|
</Row>
|
|
224
224
|
|
|
225
225
|
<Row gap="medium">
|
|
226
|
-
<Link label="Secondary link" color="
|
|
226
|
+
<Link label="Secondary link" color="primary" href="/" />
|
|
227
227
|
</Row>
|
|
228
228
|
|
|
229
229
|
<Row gap="medium">
|
|
@@ -250,7 +250,7 @@ export function DesignBook() {
|
|
|
250
250
|
<Link
|
|
251
251
|
bare={true}
|
|
252
252
|
label="Bare secondary Link"
|
|
253
|
-
color="
|
|
253
|
+
color="primary"
|
|
254
254
|
href="/"
|
|
255
255
|
/>
|
|
256
256
|
</Row>
|
|
@@ -365,39 +365,39 @@ export function DesignBook() {
|
|
|
365
365
|
<IconButton
|
|
366
366
|
size="large"
|
|
367
367
|
icon="fa-info"
|
|
368
|
-
color="
|
|
368
|
+
color="primary"
|
|
369
369
|
onClick={() => {}}
|
|
370
370
|
/>
|
|
371
371
|
<IconButton
|
|
372
372
|
size="medium"
|
|
373
373
|
icon="fa-info"
|
|
374
|
-
color="
|
|
374
|
+
color="primary"
|
|
375
375
|
onClick={() => {}}
|
|
376
376
|
/>
|
|
377
377
|
<IconButton
|
|
378
378
|
size="small"
|
|
379
379
|
icon="fa-info"
|
|
380
|
-
color="
|
|
380
|
+
color="primary"
|
|
381
381
|
onClick={() => {}}
|
|
382
382
|
/>
|
|
383
383
|
<IconButton
|
|
384
384
|
size="large"
|
|
385
385
|
icon="fa-info"
|
|
386
|
-
color="
|
|
386
|
+
color="primary"
|
|
387
387
|
onClick={() => {}}
|
|
388
388
|
bare={true}
|
|
389
389
|
/>
|
|
390
390
|
<IconButton
|
|
391
391
|
size="medium"
|
|
392
392
|
icon="fa-info"
|
|
393
|
-
color="
|
|
393
|
+
color="primary"
|
|
394
394
|
onClick={() => {}}
|
|
395
395
|
bare={true}
|
|
396
396
|
/>
|
|
397
397
|
<IconButton
|
|
398
398
|
size="small"
|
|
399
399
|
icon="fa-info"
|
|
400
|
-
color="
|
|
400
|
+
color="primary"
|
|
401
401
|
onClick={() => {}}
|
|
402
402
|
bare={true}
|
|
403
403
|
/>
|
package/src/Dialog.tsx
CHANGED
package/src/Interactable.tsx
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { JSStyle, Padding, TextColor, cssVar, getPadding } from "./jss";
|
|
2
2
|
|
|
3
|
-
export type InteractableColor =
|
|
3
|
+
export type InteractableColor =
|
|
4
|
+
| "positive"
|
|
5
|
+
| "primary"
|
|
6
|
+
| "negative"
|
|
7
|
+
| "dark"
|
|
8
|
+
| "light";
|
|
4
9
|
|
|
5
10
|
const jsStyles = {
|
|
6
11
|
root: {
|
|
@@ -8,10 +13,10 @@ const jsStyles = {
|
|
|
8
13
|
display: "inline-flex",
|
|
9
14
|
alignItems: "center",
|
|
10
15
|
transition: "opacity 0.1s ease-in",
|
|
11
|
-
outlineColor: "
|
|
16
|
+
outlineColor: cssVar("--outline"),
|
|
12
17
|
"[aria-disabled=true]": {
|
|
13
|
-
color: "
|
|
14
|
-
backgroundColor: "
|
|
18
|
+
color: cssVar("--secondary-text"),
|
|
19
|
+
backgroundColor: cssVar("--background-button-secondary"),
|
|
15
20
|
},
|
|
16
21
|
":focus-visible": {
|
|
17
22
|
outlineWidth: "2px",
|
|
@@ -19,22 +24,34 @@ const jsStyles = {
|
|
|
19
24
|
outlineOffset: -2,
|
|
20
25
|
},
|
|
21
26
|
},
|
|
27
|
+
dark: {
|
|
28
|
+
backgroundColor: "black",
|
|
29
|
+
"[aria-disabled=true]": {
|
|
30
|
+
backgroundColor: cssVar("--background-button-disabled"),
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
light: {
|
|
34
|
+
backgroundColor: "white",
|
|
35
|
+
"[aria-disabled=true]": {
|
|
36
|
+
backgroundColor: cssVar("--background-button-disabled"),
|
|
37
|
+
},
|
|
38
|
+
},
|
|
22
39
|
positive: {
|
|
23
|
-
backgroundColor: "
|
|
40
|
+
backgroundColor: cssVar("--background-button-positive"),
|
|
24
41
|
"[aria-disabled=true]": {
|
|
25
|
-
backgroundColor: "
|
|
42
|
+
backgroundColor: cssVar("--background-button-disabled"),
|
|
26
43
|
},
|
|
27
44
|
},
|
|
28
|
-
|
|
29
|
-
backgroundColor: "
|
|
45
|
+
primary: {
|
|
46
|
+
backgroundColor: cssVar("--background-button-secondary"),
|
|
30
47
|
"[aria-disabled=true]": {
|
|
31
|
-
backgroundColor: "
|
|
48
|
+
backgroundColor: cssVar("--background-button-disabled"),
|
|
32
49
|
},
|
|
33
50
|
},
|
|
34
51
|
negative: {
|
|
35
|
-
backgroundColor: "
|
|
52
|
+
backgroundColor: cssVar("--background-button-negative"),
|
|
36
53
|
"[aria-disabled=true]": {
|
|
37
|
-
backgroundColor: "
|
|
54
|
+
backgroundColor: cssVar("--background-button-disabled"),
|
|
38
55
|
},
|
|
39
56
|
},
|
|
40
57
|
disabled: {
|
|
@@ -42,7 +59,7 @@ const jsStyles = {
|
|
|
42
59
|
},
|
|
43
60
|
bare: {
|
|
44
61
|
backgroundColor: "inherit",
|
|
45
|
-
outlineColor: "
|
|
62
|
+
outlineColor: cssVar("--outline"),
|
|
46
63
|
"[aria-disabled=true]": {
|
|
47
64
|
backgroundColor: "inherit",
|
|
48
65
|
},
|
|
@@ -50,6 +67,34 @@ const jsStyles = {
|
|
|
50
67
|
backgroundColor: "inherit",
|
|
51
68
|
},
|
|
52
69
|
},
|
|
70
|
+
border: {
|
|
71
|
+
borderTopWidth: "1px",
|
|
72
|
+
borderRightWidth: "1px",
|
|
73
|
+
borderBottomWidth: "1px",
|
|
74
|
+
borderLeftWidth: "1px",
|
|
75
|
+
borderTopStyle: "solid",
|
|
76
|
+
borderRightStyle: "solid",
|
|
77
|
+
borderBottomStyle: "solid",
|
|
78
|
+
borderLeftStyle: "solid",
|
|
79
|
+
},
|
|
80
|
+
borderDark: {
|
|
81
|
+
borderColor: "black",
|
|
82
|
+
},
|
|
83
|
+
borderLight: {
|
|
84
|
+
borderColor: "white",
|
|
85
|
+
},
|
|
86
|
+
borderPositive: {
|
|
87
|
+
borderColor: cssVar("--highlight-text"),
|
|
88
|
+
},
|
|
89
|
+
borderNegative: {
|
|
90
|
+
borderColor: cssVar("--negative-text"),
|
|
91
|
+
},
|
|
92
|
+
borderPrimary: {
|
|
93
|
+
borderColor: cssVar("--primary-text"),
|
|
94
|
+
},
|
|
95
|
+
borderDisabled: {
|
|
96
|
+
borderColor: cssVar("--subtle-text"),
|
|
97
|
+
},
|
|
53
98
|
opacityHover: {
|
|
54
99
|
":hover": {
|
|
55
100
|
opacity: 0.8,
|
|
@@ -67,18 +112,29 @@ export function getInteractableJSStyles({
|
|
|
67
112
|
disabled,
|
|
68
113
|
animateInteraction,
|
|
69
114
|
padding,
|
|
115
|
+
border,
|
|
70
116
|
}: {
|
|
71
117
|
color: InteractableColor;
|
|
72
118
|
bare: boolean;
|
|
73
119
|
disabled: boolean;
|
|
74
120
|
animateInteraction: boolean;
|
|
75
121
|
padding: Padding;
|
|
122
|
+
border: boolean;
|
|
76
123
|
}): Array<JSStyle> {
|
|
77
124
|
return [
|
|
78
125
|
jsStyles.root,
|
|
126
|
+
color === "dark" && jsStyles.dark,
|
|
127
|
+
color === "light" && jsStyles.light,
|
|
79
128
|
color === "positive" && jsStyles.positive,
|
|
80
|
-
color === "
|
|
129
|
+
color === "primary" && jsStyles.primary,
|
|
81
130
|
color === "negative" && jsStyles.negative,
|
|
131
|
+
border && jsStyles.border,
|
|
132
|
+
border && !disabled && color === "positive" && jsStyles.borderPositive,
|
|
133
|
+
border && !disabled && color === "negative" && jsStyles.borderNegative,
|
|
134
|
+
border && !disabled && color === "primary" && jsStyles.borderPrimary,
|
|
135
|
+
border && !disabled && color === "dark" && jsStyles.borderDark,
|
|
136
|
+
border && !disabled && color === "light" && jsStyles.borderLight,
|
|
137
|
+
border && disabled && jsStyles.borderDisabled,
|
|
82
138
|
bare && jsStyles.bare,
|
|
83
139
|
disabled && jsStyles.disabled,
|
|
84
140
|
!bare && jsStyles.opacityHover,
|
|
@@ -112,8 +168,12 @@ export const getGlyphColor = (
|
|
|
112
168
|
return bare ? "highlight" : "light";
|
|
113
169
|
case "negative":
|
|
114
170
|
return bare ? "negative" : "light";
|
|
115
|
-
case "
|
|
171
|
+
case "primary":
|
|
116
172
|
return bare ? "primary" : "secondary";
|
|
173
|
+
case "dark":
|
|
174
|
+
return bare ? "primary" : "light";
|
|
175
|
+
case "light":
|
|
176
|
+
return bare ? "light" : "primary";
|
|
117
177
|
}
|
|
118
178
|
};
|
|
119
179
|
|
|
@@ -131,16 +191,16 @@ export const getInteractableListItemJSStyles = ({
|
|
|
131
191
|
borderRadius: bare ? cssVar("--border-radius-m") : null,
|
|
132
192
|
textDecoration: "none",
|
|
133
193
|
":hover": {
|
|
134
|
-
backgroundColor: "
|
|
194
|
+
backgroundColor: cssVar("--hovered-background"),
|
|
135
195
|
},
|
|
136
196
|
":active:hover": {
|
|
137
|
-
backgroundColor: "
|
|
197
|
+
backgroundColor: cssVar("--pressed-background"),
|
|
138
198
|
},
|
|
139
199
|
"[aria-disabled=true]": {
|
|
140
|
-
backgroundColor: "
|
|
200
|
+
backgroundColor: cssVar("--primary-background"),
|
|
141
201
|
},
|
|
142
202
|
"[aria-disabled=true]:active:hover": {
|
|
143
|
-
backgroundColor: "
|
|
203
|
+
backgroundColor: cssVar("--primary-background"),
|
|
144
204
|
},
|
|
145
205
|
},
|
|
146
206
|
selected && {
|
|
@@ -149,10 +209,10 @@ export const getInteractableListItemJSStyles = ({
|
|
|
149
209
|
: cssVar("--selected-background"),
|
|
150
210
|
boxShadow: bare ? "" : "inset 1px 1px 2px -1px #0000004a",
|
|
151
211
|
":hover": {
|
|
152
|
-
backgroundColor: "
|
|
212
|
+
backgroundColor: cssVar("--hovered-background"),
|
|
153
213
|
},
|
|
154
214
|
":active:hover": {
|
|
155
|
-
backgroundColor: "
|
|
215
|
+
backgroundColor: cssVar("--pressed-background"),
|
|
156
216
|
},
|
|
157
217
|
},
|
|
158
218
|
];
|
package/src/Link.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
2
|
|
|
3
3
|
import { BaseLink, BaseLinkProps } from "./BaseLink";
|
|
4
4
|
import { Text } from "./Text";
|
|
@@ -21,6 +21,7 @@ export interface LinkProps extends BaseLinkProps {
|
|
|
21
21
|
align?: Align;
|
|
22
22
|
gap?: Gap;
|
|
23
23
|
justify?: Justify;
|
|
24
|
+
bold?: boolean;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export const Link = React.forwardRef(
|
|
@@ -38,6 +39,7 @@ export const Link = React.forwardRef(
|
|
|
38
39
|
justify = "center",
|
|
39
40
|
jsStyle,
|
|
40
41
|
size = "medium",
|
|
42
|
+
bold,
|
|
41
43
|
...otherProps
|
|
42
44
|
}: LinkProps,
|
|
43
45
|
ref?: React.Ref<HTMLAnchorElement>
|
|
@@ -69,7 +71,11 @@ export const Link = React.forwardRef(
|
|
|
69
71
|
color={getGlyphColor(color, disabled, bare)}
|
|
70
72
|
/>
|
|
71
73
|
)}
|
|
72
|
-
<Text
|
|
74
|
+
<Text
|
|
75
|
+
bold={bold}
|
|
76
|
+
size={size}
|
|
77
|
+
color={getGlyphColor(color, disabled, bare)}
|
|
78
|
+
>
|
|
73
79
|
{label}
|
|
74
80
|
</Text>
|
|
75
81
|
{icon && iconPosition === "right" && (
|
package/src/ListButtonItem.tsx
CHANGED
|
@@ -24,7 +24,7 @@ export const ListButtonItem = React.forwardRef(
|
|
|
24
24
|
(
|
|
25
25
|
{
|
|
26
26
|
onClick,
|
|
27
|
-
color = "
|
|
27
|
+
color = "primary",
|
|
28
28
|
disabled = false,
|
|
29
29
|
padding = "medium",
|
|
30
30
|
jsStyle,
|
|
@@ -55,7 +55,7 @@ export const ListButtonItem = React.forwardRef(
|
|
|
55
55
|
disabled={disabled}
|
|
56
56
|
animateInteraction={false}
|
|
57
57
|
bare={true}
|
|
58
|
-
color={bare ? "
|
|
58
|
+
color={bare ? "primary" : color}
|
|
59
59
|
ref={ref}
|
|
60
60
|
jsStyle={getInteractableListItemJSStyles({ bare, selected })}
|
|
61
61
|
onClick={onClick}
|
package/src/ListLinkItem.tsx
CHANGED
package/src/Sublist.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import { Icon } from "./Icon";
|
|
|
4
4
|
import { Box } from "./Box";
|
|
5
5
|
import { Row } from "./Row";
|
|
6
6
|
import { JSStyle } from "./jss";
|
|
7
|
-
import { useListContext } from "./List";
|
|
8
7
|
|
|
9
8
|
export function Sublist({
|
|
10
9
|
children,
|
|
@@ -54,7 +53,7 @@ export function Sublist({
|
|
|
54
53
|
</Row>
|
|
55
54
|
}
|
|
56
55
|
addOnPosition="end"
|
|
57
|
-
color="
|
|
56
|
+
color="primary"
|
|
58
57
|
/>
|
|
59
58
|
{collapsed ? null : children}
|
|
60
59
|
</>
|
package/src/Tabs.tsx
CHANGED