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.
- package/.claude/settings.local.json +8 -0
- package/dist/Badge.d.ts +2 -2
- package/dist/Badge.js +3 -3
- package/dist/Badge.js.map +1 -1
- package/dist/BaseButton.d.ts +1 -1
- package/dist/BaseButton.js +5 -5
- package/dist/BaseButton.js.map +1 -1
- package/dist/BaseInput.d.ts +1 -1
- package/dist/BaseInput.js +4 -4
- package/dist/BaseInput.js.map +1 -1
- package/dist/BaseLink.d.ts +1 -1
- package/dist/BaseLink.js +4 -4
- package/dist/BaseLink.js.map +1 -1
- package/dist/BaseList.js +3 -3
- package/dist/BaseList.js.map +1 -1
- package/dist/BaseListItem.d.ts +1 -1
- package/dist/BaseListItem.js +4 -4
- package/dist/BaseListItem.js.map +1 -1
- package/dist/BaseView.d.ts +1 -1
- package/dist/BaseView.js +8 -8
- package/dist/BaseView.js.map +1 -1
- package/dist/Button.js +3 -3
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +1 -1
- package/dist/Calendar.js +3 -3
- package/dist/Calendar.js.map +1 -1
- package/dist/Card.d.ts +1 -1
- package/dist/Card.js +3 -3
- package/dist/Card.js.map +1 -1
- package/dist/Checkbox.js +3 -3
- package/dist/Checkbox.js.map +1 -1
- package/dist/Circle.d.ts +1 -1
- package/dist/Circle.js +3 -3
- package/dist/Circle.js.map +1 -1
- package/dist/DarkMode.js +1 -1
- package/dist/DarkMode.js.map +1 -1
- package/dist/DateInput.d.ts +1 -1
- package/dist/DateInput.js +4 -4
- package/dist/DateInput.js.map +1 -1
- package/dist/DatePicker.js +3 -3
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatetimeInput.d.ts +1 -1
- package/dist/DatetimeInput.js +3 -3
- package/dist/DatetimeInput.js.map +1 -1
- package/dist/DesignBook.js +1 -1
- package/dist/DesignBook.js.map +1 -1
- package/dist/Dialog.js +4 -4
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.d.ts +3 -3
- package/dist/Dropdown.js +4 -4
- package/dist/Dropdown.js.map +1 -1
- package/dist/FlexLayout.js +3 -3
- package/dist/FlexLayout.js.map +1 -1
- package/dist/Icon.js +10 -10
- package/dist/Icon.js.map +1 -1
- package/dist/IconButton.js +3 -3
- package/dist/IconButton.js.map +1 -1
- package/dist/IconLink.js +1 -1
- package/dist/IconLink.js.map +1 -1
- package/dist/Interactable.js +10 -10
- package/dist/Interactable.js.map +1 -1
- package/dist/Link.js +4 -4
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +1 -1
- package/dist/List.js +3 -3
- package/dist/List.js.map +1 -1
- package/dist/ListButtonItem.js +2 -2
- package/dist/ListButtonItem.js.map +1 -1
- package/dist/ListDivider.js +2 -2
- package/dist/ListDivider.js.map +1 -1
- package/dist/ListHeaderItem.js +1 -1
- package/dist/ListHeaderItem.js.map +1 -1
- package/dist/ListItem.js +1 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ListLinkItem.js +2 -2
- package/dist/ListLinkItem.js.map +1 -1
- package/dist/ListSpacer.js +2 -2
- package/dist/ListSpacer.js.map +1 -1
- package/dist/MenuIcon.js +6 -6
- package/dist/MenuIcon.js.map +1 -1
- package/dist/NextJSRouter.js +3 -3
- package/dist/NextJSRouter.js.map +1 -1
- package/dist/Popover.d.ts +2 -2
- package/dist/Popover.js +5 -5
- package/dist/Popover.js.map +1 -1
- package/dist/ProgressBar.d.ts +2 -2
- package/dist/ProgressBar.js +6 -6
- package/dist/ProgressBar.js.map +1 -1
- package/dist/ProgressCircle.js +2 -2
- package/dist/ProgressCircle.js.map +1 -1
- package/dist/RangeInput.js +4 -4
- package/dist/RangeInput.js.map +1 -1
- package/dist/RootView.js +1 -1
- package/dist/RootView.js.map +1 -1
- package/dist/Select.d.ts +1 -1
- package/dist/Select.js +4 -4
- package/dist/Select.js.map +1 -1
- package/dist/StaticCheckbox.js +3 -3
- package/dist/StaticCheckbox.js.map +1 -1
- package/dist/Sublist.d.ts +2 -2
- package/dist/Sublist.js +2 -2
- package/dist/Sublist.js.map +1 -1
- package/dist/SubmitIconInput.js +2 -2
- package/dist/SubmitIconInput.js.map +1 -1
- package/dist/Tabs.d.ts +2 -1
- package/dist/Tabs.js +29 -25
- package/dist/Tabs.js.map +1 -1
- package/dist/Text.d.ts +2 -2
- package/dist/Text.js +11 -11
- package/dist/Text.js.map +1 -1
- package/dist/TextArea.d.ts +1 -1
- package/dist/TextArea.js +4 -4
- package/dist/TextArea.js.map +1 -1
- package/dist/TextInput.js +5 -5
- package/dist/TextInput.js.map +1 -1
- package/dist/TextPairing.d.ts +2 -2
- package/dist/TextPairing.js +6 -6
- package/dist/TextPairing.js.map +1 -1
- package/dist/TimeInput.js +4 -4
- package/dist/TimeInput.js.map +1 -1
- package/dist/Tooltip.d.ts +2 -2
- package/dist/Tooltip.js +5 -5
- package/dist/Tooltip.js.map +1 -1
- package/dist/jss.d.ts +5 -5
- package/dist/jss.js +31 -31
- package/dist/jss.js.map +1 -1
- package/package.json +1 -1
- package/src/Badge.tsx +4 -4
- package/src/BaseButton.tsx +6 -6
- package/src/BaseInput.tsx +10 -5
- package/src/BaseLink.tsx +5 -5
- package/src/BaseList.tsx +3 -6
- package/src/BaseListItem.tsx +5 -5
- package/src/BaseView.tsx +9 -9
- package/src/Button.tsx +3 -3
- package/src/Calendar.tsx +4 -4
- package/src/Card.tsx +3 -3
- package/src/Checkbox.tsx +3 -3
- package/src/Circle.tsx +3 -3
- package/src/DarkMode.tsx +1 -1
- package/src/DateInput.tsx +5 -5
- package/src/DatePicker.tsx +3 -3
- package/src/DatetimeInput.tsx +5 -12
- package/src/DesignBook.tsx +1 -1
- package/src/Dialog.tsx +6 -6
- package/src/Dropdown.tsx +8 -8
- package/src/FlexLayout.tsx +3 -3
- package/src/Icon.tsx +10 -10
- package/src/IconButton.tsx +3 -11
- package/src/IconLink.tsx +1 -1
- package/src/Interactable.tsx +10 -10
- package/src/Link.tsx +4 -4
- package/src/List.tsx +3 -3
- package/src/ListButtonItem.tsx +3 -3
- package/src/ListDivider.tsx +2 -2
- package/src/ListHeaderItem.tsx +1 -1
- package/src/ListItem.tsx +1 -6
- package/src/ListLinkItem.tsx +3 -3
- package/src/ListSpacer.tsx +2 -2
- package/src/MenuIcon.tsx +6 -6
- package/src/NextJSRouter.tsx +3 -3
- package/src/Popover.tsx +6 -6
- package/src/ProgressBar.tsx +7 -7
- package/src/ProgressCircle.tsx +2 -2
- package/src/RangeInput.tsx +4 -4
- package/src/RootView.tsx +1 -1
- package/src/Select.tsx +5 -5
- package/src/StaticCheckbox.tsx +4 -6
- package/src/Sublist.tsx +4 -4
- package/src/SubmitIconInput.tsx +2 -2
- package/src/Tabs.tsx +52 -45
- package/src/Text.tsx +19 -12
- package/src/TextArea.tsx +5 -5
- package/src/TextInput.tsx +6 -6
- package/src/TextPairing.tsx +7 -7
- package/src/TimeInput.tsx +4 -4
- package/src/Tooltip.tsx +6 -6
- package/src/docs/mdx.tsx +6 -8
- package/src/docs/searchIndex.ts +1 -1
- package/src/jss.tsx +31 -31
- package/src/pages/Calendar.mdx +4 -4
- package/src/pages/Card.mdx +4 -4
- package/src/pages/FlexLayout.mdx +6 -6
- package/src/pages/Tabs.mdx +202 -4
- package/src/pages/TextPairing.mdx +2 -2
- package/src/pages/TimeInput.mdx +2 -2
- package/src/pages/_app.tsx +6 -6
- package/src/pages/css-in-js.mdx +2 -2
package/src/Tabs.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { JSStyle, Padding, Size, cssVar, getPadding } from "./jss";
|
|
|
4
4
|
import { useNavigation } from "./useNavigation";
|
|
5
5
|
import { Text } from "./Text";
|
|
6
6
|
import { ReactNode } from "react";
|
|
7
|
+
import { BaseButton } from "./BaseButton";
|
|
7
8
|
|
|
8
9
|
export type Tab = {
|
|
9
10
|
label: string;
|
|
@@ -21,6 +22,7 @@ export interface TabsProps extends RowProps {
|
|
|
21
22
|
bare?: boolean;
|
|
22
23
|
tabPadding?: Padding;
|
|
23
24
|
tabJSStyle?: JSStyle;
|
|
25
|
+
labelRenderer?: (label: string) => ReactNode;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export function Tabs({
|
|
@@ -29,8 +31,9 @@ export function Tabs({
|
|
|
29
31
|
padding = "none",
|
|
30
32
|
tabPadding = "medium",
|
|
31
33
|
labelSize = "large",
|
|
32
|
-
|
|
34
|
+
jss,
|
|
33
35
|
tabJSStyle,
|
|
36
|
+
labelRenderer,
|
|
34
37
|
["aria-controls"]: ariaControls,
|
|
35
38
|
...otherProps
|
|
36
39
|
}: TabsProps) {
|
|
@@ -39,7 +42,7 @@ export function Tabs({
|
|
|
39
42
|
return (
|
|
40
43
|
<Row
|
|
41
44
|
role="tablist"
|
|
42
|
-
|
|
45
|
+
jss={jss}
|
|
43
46
|
gap={gap}
|
|
44
47
|
padding={padding}
|
|
45
48
|
ref={root}
|
|
@@ -53,50 +56,54 @@ export function Tabs({
|
|
|
53
56
|
selected,
|
|
54
57
|
addOn,
|
|
55
58
|
addOnPosition = "start",
|
|
56
|
-
}) =>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
59
|
+
}) => {
|
|
60
|
+
const BaseComponent = href != null ? BaseLink : BaseButton;
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<BaseComponent
|
|
64
|
+
aria-controls={ariaControls}
|
|
65
|
+
role="tab"
|
|
66
|
+
aria-selected={selected ? "true" : undefined}
|
|
67
|
+
key={label}
|
|
68
|
+
bare
|
|
69
|
+
color={selected ? "positive" : "primary"}
|
|
70
|
+
href={href}
|
|
71
|
+
onClick={onClick}
|
|
72
|
+
animateInteraction={false}
|
|
73
|
+
jss={[
|
|
74
|
+
{
|
|
75
|
+
textDecoration: "none",
|
|
76
|
+
borderBottom: selected
|
|
77
|
+
? `3px solid ${cssVar("--highlight")}`
|
|
78
|
+
: `3px solid transparent`,
|
|
79
|
+
":active span": {
|
|
80
|
+
transform: "scale(0.97)",
|
|
81
|
+
},
|
|
82
|
+
":first-child": {
|
|
83
|
+
borderTopLeftRadius: cssVar("--border-radius-m"),
|
|
84
|
+
},
|
|
85
|
+
":last-child": {
|
|
86
|
+
borderTopRightRadius: cssVar("--border-radius-m"),
|
|
87
|
+
},
|
|
88
|
+
":hover": {
|
|
89
|
+
backgroundColor: cssVar("--hovered-background"),
|
|
90
|
+
},
|
|
91
|
+
":active:hover": {
|
|
92
|
+
backgroundColor: cssVar("--pressed-background"),
|
|
93
|
+
},
|
|
87
94
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
getPadding(tabPadding),
|
|
96
|
+
tabJSStyle,
|
|
97
|
+
]}
|
|
98
|
+
>
|
|
99
|
+
{addOnPosition === "start" && addOn}
|
|
100
|
+
<Text size={labelSize} color={selected ? "primary" : "secondary"}>
|
|
101
|
+
{labelRenderer ? labelRenderer(label) : label}
|
|
102
|
+
</Text>
|
|
103
|
+
{addOnPosition === "end" && addOn}
|
|
104
|
+
</BaseComponent>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
100
107
|
)}
|
|
101
108
|
</Row>
|
|
102
109
|
);
|
package/src/Text.tsx
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
JSStyle,
|
|
4
|
+
Size,
|
|
5
|
+
TextColor,
|
|
6
|
+
cssVar,
|
|
7
|
+
getTextColor,
|
|
8
|
+
toClassnames,
|
|
9
|
+
} from "./jss";
|
|
3
10
|
|
|
4
11
|
const fontSize = {
|
|
5
12
|
xsmall: cssVar("--font-xsmall"),
|
|
@@ -22,7 +29,7 @@ export interface TextProps {
|
|
|
22
29
|
align?: "center" | "none";
|
|
23
30
|
type?: TextType;
|
|
24
31
|
grow?: boolean;
|
|
25
|
-
|
|
32
|
+
jss?: JSStyle;
|
|
26
33
|
id?: string;
|
|
27
34
|
htmlFor?: string;
|
|
28
35
|
}
|
|
@@ -46,7 +53,7 @@ export function Text({
|
|
|
46
53
|
ellipsis = "default",
|
|
47
54
|
grow,
|
|
48
55
|
type: Type = "span",
|
|
49
|
-
|
|
56
|
+
jss,
|
|
50
57
|
id,
|
|
51
58
|
htmlFor,
|
|
52
59
|
}: TextProps) {
|
|
@@ -54,7 +61,7 @@ export function Text({
|
|
|
54
61
|
ellipsis = Type === "span" || Type === "label";
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
const className =
|
|
64
|
+
const className = toClassnames([
|
|
58
65
|
getTextColor(color),
|
|
59
66
|
{ fontSize: fontSize[size], padding: 0, margin: 0 },
|
|
60
67
|
bold && { fontWeight: "bold" },
|
|
@@ -65,7 +72,7 @@ export function Text({
|
|
|
65
72
|
whiteSpace: "nowrap",
|
|
66
73
|
},
|
|
67
74
|
grow && { flexGrow: 1 },
|
|
68
|
-
|
|
75
|
+
jss,
|
|
69
76
|
]);
|
|
70
77
|
|
|
71
78
|
return (
|
|
@@ -75,30 +82,30 @@ export function Text({
|
|
|
75
82
|
);
|
|
76
83
|
}
|
|
77
84
|
|
|
78
|
-
export function Label({ size = "
|
|
85
|
+
export function Label({ size = "medium", type = "label", ...rest }: TextProps) {
|
|
79
86
|
return <Text size={size} type={type} {...rest} />;
|
|
80
87
|
}
|
|
81
88
|
|
|
82
|
-
export function Span({ size = "
|
|
89
|
+
export function Span({ size = "medium", type = "span", ...rest }: TextProps) {
|
|
83
90
|
return <Text size={size} type={type} {...rest} />;
|
|
84
91
|
}
|
|
85
92
|
|
|
86
|
-
export function P({ size = "
|
|
93
|
+
export function P({ size = "medium", type = "p", ...rest }: TextProps) {
|
|
87
94
|
return <Text size={size} type={type} {...rest} />;
|
|
88
95
|
}
|
|
89
96
|
|
|
90
|
-
export function H1({ size = "
|
|
97
|
+
export function H1({ size = "xxlarge", type = "h1", ...rest }: TextProps) {
|
|
91
98
|
return <Text size={size} type={type} {...rest} />;
|
|
92
99
|
}
|
|
93
100
|
|
|
94
|
-
export function H2({ size = "
|
|
101
|
+
export function H2({ size = "xlarge", type = "h2", ...rest }: TextProps) {
|
|
95
102
|
return <Text size={size} type={type} {...rest} />;
|
|
96
103
|
}
|
|
97
104
|
|
|
98
|
-
export function H3({ size = "
|
|
105
|
+
export function H3({ size = "large", type = "h3", ...rest }: TextProps) {
|
|
99
106
|
return <Text size={size} type={type} {...rest} />;
|
|
100
107
|
}
|
|
101
108
|
|
|
102
|
-
export function Li({ size = "
|
|
109
|
+
export function Li({ size = "medium", type = "li", ...rest }: TextProps) {
|
|
103
110
|
return <Text size={size} type={type} {...rest} />;
|
|
104
111
|
}
|
package/src/TextArea.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { JSStyle, Padding, cssVar, getPadding,
|
|
2
|
+
import { JSStyle, Padding, cssVar, getPadding, toClassnames } from "./jss";
|
|
3
3
|
|
|
4
4
|
export interface TextAreaProps
|
|
5
5
|
extends React.InputHTMLAttributes<HTMLTextAreaElement> {
|
|
6
|
-
|
|
6
|
+
jss?: JSStyle;
|
|
7
7
|
onValueChange?: (value: string) => void;
|
|
8
8
|
value?: string;
|
|
9
9
|
className?: undefined;
|
|
@@ -14,7 +14,7 @@ export interface TextAreaProps
|
|
|
14
14
|
export const TextArea = React.forwardRef(
|
|
15
15
|
(
|
|
16
16
|
{
|
|
17
|
-
|
|
17
|
+
jss,
|
|
18
18
|
onValueChange,
|
|
19
19
|
value,
|
|
20
20
|
onChange,
|
|
@@ -27,7 +27,7 @@ export const TextArea = React.forwardRef(
|
|
|
27
27
|
<textarea
|
|
28
28
|
{...otherProps}
|
|
29
29
|
ref={ref}
|
|
30
|
-
className={
|
|
30
|
+
className={toClassnames([
|
|
31
31
|
{
|
|
32
32
|
flexGrow: 1,
|
|
33
33
|
color: cssVar("--primary-text"),
|
|
@@ -46,7 +46,7 @@ export const TextArea = React.forwardRef(
|
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
getPadding(padding),
|
|
49
|
-
|
|
49
|
+
jss,
|
|
50
50
|
])}
|
|
51
51
|
value={value}
|
|
52
52
|
onChange={
|
package/src/TextInput.tsx
CHANGED
|
@@ -21,7 +21,7 @@ export const TextInput = React.forwardRef(
|
|
|
21
21
|
value,
|
|
22
22
|
onValueChange,
|
|
23
23
|
rootJSStyle,
|
|
24
|
-
|
|
24
|
+
jss,
|
|
25
25
|
addOn,
|
|
26
26
|
gap = "small",
|
|
27
27
|
addOnPosition = "start",
|
|
@@ -34,7 +34,7 @@ export const TextInput = React.forwardRef(
|
|
|
34
34
|
return (
|
|
35
35
|
<Row
|
|
36
36
|
gap={gap}
|
|
37
|
-
|
|
37
|
+
jss={[
|
|
38
38
|
{
|
|
39
39
|
borderRadius: cssVar("--border-radius-m"),
|
|
40
40
|
overflow: "hidden",
|
|
@@ -61,7 +61,7 @@ export const TextInput = React.forwardRef(
|
|
|
61
61
|
<Column
|
|
62
62
|
justify="center"
|
|
63
63
|
align="center"
|
|
64
|
-
|
|
64
|
+
jss={[getPadding(padding), { paddingRight: 0 }]}
|
|
65
65
|
>
|
|
66
66
|
{addOn}
|
|
67
67
|
</Column>
|
|
@@ -73,7 +73,7 @@ export const TextInput = React.forwardRef(
|
|
|
73
73
|
onChange={
|
|
74
74
|
onValueChange ? (e) => onValueChange(e.target.value) : undefined
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
jss={[
|
|
77
77
|
{
|
|
78
78
|
minWidth: 0,
|
|
79
79
|
flexGrow: 1,
|
|
@@ -93,14 +93,14 @@ export const TextInput = React.forwardRef(
|
|
|
93
93
|
getPadding(padding),
|
|
94
94
|
addOn && addOnPosition === "start" ? { paddingLeft: 0 } : null,
|
|
95
95
|
addOn && addOnPosition === "end" ? { paddingRight: 0 } : null,
|
|
96
|
-
|
|
96
|
+
jss,
|
|
97
97
|
]}
|
|
98
98
|
/>
|
|
99
99
|
{addOnPosition === "end" && addOn && (
|
|
100
100
|
<Column
|
|
101
101
|
justify="center"
|
|
102
102
|
align="center"
|
|
103
|
-
|
|
103
|
+
jss={[getPadding(padding), { paddingLeft: 0 }]}
|
|
104
104
|
>
|
|
105
105
|
{addOn}
|
|
106
106
|
</Column>
|
package/src/TextPairing.tsx
CHANGED
|
@@ -31,7 +31,7 @@ export interface TextPairingProps {
|
|
|
31
31
|
grow?: boolean;
|
|
32
32
|
shrink?: boolean;
|
|
33
33
|
headlineBold?: boolean;
|
|
34
|
-
|
|
34
|
+
jss?: JSStyle;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function TextPairing({
|
|
@@ -50,7 +50,7 @@ export function TextPairing({
|
|
|
50
50
|
shrink,
|
|
51
51
|
headlineBold,
|
|
52
52
|
padding,
|
|
53
|
-
|
|
53
|
+
jss,
|
|
54
54
|
}: TextPairingProps) {
|
|
55
55
|
const textElement = (
|
|
56
56
|
<Column
|
|
@@ -58,16 +58,16 @@ export function TextPairing({
|
|
|
58
58
|
shrink={shrink}
|
|
59
59
|
padding={addOn ? undefined : padding}
|
|
60
60
|
align={align}
|
|
61
|
-
|
|
61
|
+
jss={[
|
|
62
62
|
{
|
|
63
63
|
overflow: "hidden",
|
|
64
64
|
},
|
|
65
|
-
|
|
65
|
+
jss,
|
|
66
66
|
]}
|
|
67
67
|
>
|
|
68
68
|
<Row
|
|
69
69
|
align="center"
|
|
70
|
-
|
|
70
|
+
jss={{
|
|
71
71
|
textAlign: "start",
|
|
72
72
|
}}
|
|
73
73
|
>
|
|
@@ -79,7 +79,7 @@ export function TextPairing({
|
|
|
79
79
|
{body && (
|
|
80
80
|
<Row
|
|
81
81
|
align="center"
|
|
82
|
-
|
|
82
|
+
jss={{
|
|
83
83
|
marginTop: cssVar("--spacing-xs"),
|
|
84
84
|
textAlign: "start",
|
|
85
85
|
}}
|
|
@@ -100,7 +100,7 @@ export function TextPairing({
|
|
|
100
100
|
gap={gap}
|
|
101
101
|
align="center"
|
|
102
102
|
padding={padding}
|
|
103
|
-
|
|
103
|
+
jss={{
|
|
104
104
|
overflow: "hidden",
|
|
105
105
|
}}
|
|
106
106
|
>
|
package/src/TimeInput.tsx
CHANGED
|
@@ -23,7 +23,7 @@ function TimeInputInternal(
|
|
|
23
23
|
{
|
|
24
24
|
time: date,
|
|
25
25
|
onTimeChange: onDateChange,
|
|
26
|
-
|
|
26
|
+
jss,
|
|
27
27
|
addOn,
|
|
28
28
|
padding = "small",
|
|
29
29
|
gap = "none",
|
|
@@ -38,7 +38,7 @@ function TimeInputInternal(
|
|
|
38
38
|
padding={padding}
|
|
39
39
|
gap={gap}
|
|
40
40
|
align="center"
|
|
41
|
-
|
|
41
|
+
jss={[
|
|
42
42
|
{
|
|
43
43
|
borderRadius: cssVar("--border-radius-m"),
|
|
44
44
|
overflow: "hidden",
|
|
@@ -79,7 +79,7 @@ function TimeInputInternal(
|
|
|
79
79
|
)
|
|
80
80
|
);
|
|
81
81
|
}}
|
|
82
|
-
|
|
82
|
+
jss={[
|
|
83
83
|
{
|
|
84
84
|
flexGrow: 1,
|
|
85
85
|
backgroundColor: "inherit",
|
|
@@ -98,7 +98,7 @@ function TimeInputInternal(
|
|
|
98
98
|
backgroundColor: "none",
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
jss,
|
|
102
102
|
]}
|
|
103
103
|
/>
|
|
104
104
|
{addOnPosition === "end" && addOn}
|
package/src/Tooltip.tsx
CHANGED
|
@@ -3,9 +3,9 @@ import React, { useRef, useState } from "react";
|
|
|
3
3
|
import { BaseView } from "./BaseView";
|
|
4
4
|
import { useRefEffect } from "./useRefEffect";
|
|
5
5
|
import { Text } from "./Text";
|
|
6
|
-
import { JSStyle, cssVar,
|
|
6
|
+
import { JSStyle, cssVar, toClassnames } from "./jss";
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const jsss: { [key: string]: JSStyle } = {
|
|
9
9
|
tooltip: {
|
|
10
10
|
top: "-100%",
|
|
11
11
|
transform: "translateY(50%)",
|
|
@@ -20,13 +20,13 @@ const jsStyles: { [key: string]: JSStyle } = {
|
|
|
20
20
|
|
|
21
21
|
interface TooltipProps {
|
|
22
22
|
content: string;
|
|
23
|
-
|
|
23
|
+
jss?: JSStyle;
|
|
24
24
|
className?: undefined;
|
|
25
25
|
tag?: keyof HTMLElementTagNameMap;
|
|
26
26
|
children: JSX.Element;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export function Tooltip({ content,
|
|
29
|
+
export function Tooltip({ content, jss, tag, children }: TooltipProps) {
|
|
30
30
|
const [tooltip, setTooltip] = useState<JSX.Element>(null);
|
|
31
31
|
const dialogRef = useRef(null);
|
|
32
32
|
const focusTrapRoot = useRefEffect((root: HTMLDialogElement) => {
|
|
@@ -66,7 +66,7 @@ export function Tooltip({ content, jsStyle, tag, children }: TooltipProps) {
|
|
|
66
66
|
dialogRef.current = ref;
|
|
67
67
|
focusTrapRoot(ref);
|
|
68
68
|
}}
|
|
69
|
-
className={
|
|
69
|
+
className={toClassnames(jsss.tooltip)}
|
|
70
70
|
onClose={() => {
|
|
71
71
|
setTooltip(null);
|
|
72
72
|
}}
|
|
@@ -89,7 +89,7 @@ export function Tooltip({ content, jsStyle, tag, children }: TooltipProps) {
|
|
|
89
89
|
<BaseView
|
|
90
90
|
tag={tag}
|
|
91
91
|
relative={true}
|
|
92
|
-
|
|
92
|
+
jss={[{ display: "inline-block" }, jss]}
|
|
93
93
|
onMouseEnter={() => {
|
|
94
94
|
if (tooltip == null) {
|
|
95
95
|
toggle();
|
package/src/docs/mdx.tsx
CHANGED
|
@@ -12,31 +12,29 @@ const monospace = Roboto({ weight: "400", subsets: ["latin"] });
|
|
|
12
12
|
|
|
13
13
|
const components: any = {
|
|
14
14
|
h1: (props) => (
|
|
15
|
-
<H1
|
|
15
|
+
<H1 jss={{ marginBottom: cssVar("--spacing-xl") }} {...props} />
|
|
16
16
|
),
|
|
17
17
|
h2: (props) => (
|
|
18
18
|
<H2
|
|
19
19
|
id={labelToID(props.children)}
|
|
20
|
-
|
|
20
|
+
jss={{ marginBottom: cssVar("--spacing-l") }}
|
|
21
21
|
{...props}
|
|
22
22
|
/>
|
|
23
23
|
),
|
|
24
24
|
h3: (props) => {
|
|
25
25
|
return <H3 id={labelToID(props.children)} {...props} />;
|
|
26
26
|
},
|
|
27
|
-
p: (props) => (
|
|
28
|
-
<P jsStyle={{ marginBottom: cssVar("--spacing-m") }} {...props} />
|
|
29
|
-
),
|
|
27
|
+
p: (props) => <P jss={{ marginBottom: cssVar("--spacing-m") }} {...props} />,
|
|
30
28
|
span: (props) => <Span {...props} />,
|
|
31
29
|
li: (props) => (
|
|
32
|
-
<Li
|
|
30
|
+
<Li jss={{ marginBottom: cssVar("--spacing-s") }} {...props} />
|
|
33
31
|
),
|
|
34
32
|
a: (props) => {
|
|
35
33
|
return (
|
|
36
34
|
<BaseLink
|
|
37
35
|
bare
|
|
38
36
|
color="positive"
|
|
39
|
-
|
|
37
|
+
jss={{
|
|
40
38
|
display: "inline-block",
|
|
41
39
|
paddingBottom: cssVar("--spacing-s"),
|
|
42
40
|
paddingTop: cssVar("--spacing-s"),
|
|
@@ -49,7 +47,7 @@ const components: any = {
|
|
|
49
47
|
},
|
|
50
48
|
hr: () => (
|
|
51
49
|
<BaseView
|
|
52
|
-
|
|
50
|
+
jss={{
|
|
53
51
|
marginBottom: cssVar("--spacing-xxl"),
|
|
54
52
|
marginTop: cssVar("--spacing-xxl"),
|
|
55
53
|
}}
|