aidos-ui 3.0.29 → 3.0.31
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 +5 -2
- package/dist/Tabs.js +31 -25
- package/dist/Tabs.js.map +1 -1
- package/dist/Text.d.ts +2 -2
- package/dist/Text.js +4 -4
- 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 +17 -17
- 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 +55 -46
- package/src/Text.tsx +12 -5
- 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 +17 -17
- 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 +261 -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/BaseLink.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useContext } from "react";
|
|
2
2
|
import { InteractableColor, getInteractableJSStyles } from "./Interactable";
|
|
3
|
-
import { JSStyle, Padding,
|
|
3
|
+
import { JSStyle, Padding, toClassnames } from "./jss";
|
|
4
4
|
|
|
5
5
|
export interface BaseLinkProps
|
|
6
6
|
extends React.LinkHTMLAttributes<HTMLAnchorElement> {
|
|
7
7
|
onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
8
8
|
target?: string;
|
|
9
|
-
|
|
9
|
+
jss?: JSStyle;
|
|
10
10
|
color: InteractableColor;
|
|
11
11
|
href: string;
|
|
12
12
|
disabled?: boolean;
|
|
@@ -27,7 +27,7 @@ export const BaseLink = React.forwardRef(
|
|
|
27
27
|
{
|
|
28
28
|
onClick,
|
|
29
29
|
children,
|
|
30
|
-
|
|
30
|
+
jss,
|
|
31
31
|
color,
|
|
32
32
|
bare = false,
|
|
33
33
|
disabled,
|
|
@@ -60,7 +60,7 @@ export const BaseLink = React.forwardRef(
|
|
|
60
60
|
}
|
|
61
61
|
: undefined
|
|
62
62
|
}
|
|
63
|
-
className={
|
|
63
|
+
className={toClassnames([
|
|
64
64
|
...getInteractableJSStyles({
|
|
65
65
|
color,
|
|
66
66
|
border,
|
|
@@ -70,7 +70,7 @@ export const BaseLink = React.forwardRef(
|
|
|
70
70
|
padding,
|
|
71
71
|
}),
|
|
72
72
|
disabled && { pointerEvents: "none" },
|
|
73
|
-
|
|
73
|
+
jss,
|
|
74
74
|
])}
|
|
75
75
|
>
|
|
76
76
|
{children}
|
package/src/BaseList.tsx
CHANGED
|
@@ -6,21 +6,18 @@ export interface BaseListProps extends ColumnProps {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export const BaseList = React.forwardRef(
|
|
9
|
-
(
|
|
10
|
-
{ jsStyle, ...otherProps }: BaseListProps,
|
|
11
|
-
ref?: React.Ref<HTMLDivElement>
|
|
12
|
-
) => {
|
|
9
|
+
({ jss, ...otherProps }: BaseListProps, ref?: React.Ref<HTMLDivElement>) => {
|
|
13
10
|
return (
|
|
14
11
|
<Column
|
|
15
12
|
{...otherProps}
|
|
16
13
|
tag="ul"
|
|
17
|
-
|
|
14
|
+
jss={[
|
|
18
15
|
{
|
|
19
16
|
listStyle: "none",
|
|
20
17
|
margin: 0,
|
|
21
18
|
padding: 0,
|
|
22
19
|
},
|
|
23
|
-
|
|
20
|
+
jss,
|
|
24
21
|
]}
|
|
25
22
|
ref={ref}
|
|
26
23
|
/>
|
package/src/BaseListItem.tsx
CHANGED
|
@@ -11,7 +11,7 @@ import { useListContext } from "./List";
|
|
|
11
11
|
// @ts-ignore
|
|
12
12
|
export interface BaseListItemProps extends RowProps {
|
|
13
13
|
children: (elements: { content: JSX.Element }) => ReactNode;
|
|
14
|
-
|
|
14
|
+
jss?: JSStyle;
|
|
15
15
|
withDivider?: boolean;
|
|
16
16
|
headline: string;
|
|
17
17
|
headlineSize?: Size;
|
|
@@ -34,7 +34,7 @@ export const BaseListItem = React.forwardRef(
|
|
|
34
34
|
(
|
|
35
35
|
{
|
|
36
36
|
children,
|
|
37
|
-
|
|
37
|
+
jss,
|
|
38
38
|
withDivider = true,
|
|
39
39
|
headline,
|
|
40
40
|
headlineSize = "medium",
|
|
@@ -86,7 +86,7 @@ export const BaseListItem = React.forwardRef(
|
|
|
86
86
|
relative
|
|
87
87
|
tag="li"
|
|
88
88
|
role="row"
|
|
89
|
-
|
|
89
|
+
jss={[
|
|
90
90
|
!bare &&
|
|
91
91
|
carded && {
|
|
92
92
|
[":first-child *"]: {
|
|
@@ -98,13 +98,13 @@ export const BaseListItem = React.forwardRef(
|
|
|
98
98
|
borderBottomRightRadius: cssVar("--border-radius-l"),
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
jss,
|
|
102
102
|
]}
|
|
103
103
|
>
|
|
104
104
|
<Row
|
|
105
105
|
grow
|
|
106
106
|
role="gridcell"
|
|
107
|
-
|
|
107
|
+
jss={{
|
|
108
108
|
overflow: "hidden",
|
|
109
109
|
}}
|
|
110
110
|
>
|
package/src/BaseView.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { JSStyle,
|
|
2
|
+
import { JSStyle, toClassnames } from "./jss";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const jsss: { [key: string]: JSStyle } = {
|
|
5
5
|
relative: {
|
|
6
6
|
position: "relative",
|
|
7
7
|
},
|
|
@@ -14,7 +14,7 @@ const jsStyles: { [key: string]: JSStyle } = {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export interface BaseViewProps extends React.HTMLAttributes<HTMLElement> {
|
|
17
|
-
|
|
17
|
+
jss?: JSStyle;
|
|
18
18
|
ref?: React.Ref<HTMLDivElement>;
|
|
19
19
|
className?: undefined;
|
|
20
20
|
grow?: boolean;
|
|
@@ -26,7 +26,7 @@ export interface BaseViewProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
26
26
|
export const BaseView = React.forwardRef(
|
|
27
27
|
(
|
|
28
28
|
{
|
|
29
|
-
|
|
29
|
+
jss,
|
|
30
30
|
children,
|
|
31
31
|
tag,
|
|
32
32
|
grow,
|
|
@@ -42,11 +42,11 @@ export const BaseView = React.forwardRef(
|
|
|
42
42
|
// @ts-ignore
|
|
43
43
|
<Tag
|
|
44
44
|
ref={ref}
|
|
45
|
-
className={
|
|
46
|
-
|
|
47
|
-
grow &&
|
|
48
|
-
shrink &&
|
|
49
|
-
relative &&
|
|
45
|
+
className={toClassnames([
|
|
46
|
+
jss,
|
|
47
|
+
grow && jsss.grow,
|
|
48
|
+
shrink && jsss.shrink,
|
|
49
|
+
relative && jsss.relative,
|
|
50
50
|
])}
|
|
51
51
|
{...otherProps}
|
|
52
52
|
>
|
package/src/Button.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export const Button = React.forwardRef(
|
|
|
36
36
|
align = "center",
|
|
37
37
|
gap = "small",
|
|
38
38
|
justify = "center",
|
|
39
|
-
|
|
39
|
+
jss,
|
|
40
40
|
size = "medium",
|
|
41
41
|
bold,
|
|
42
42
|
padding = "medium",
|
|
@@ -52,13 +52,13 @@ export const Button = React.forwardRef(
|
|
|
52
52
|
color={color}
|
|
53
53
|
disabled={disabled}
|
|
54
54
|
padding={padding}
|
|
55
|
-
|
|
55
|
+
jss={[
|
|
56
56
|
{
|
|
57
57
|
borderRadius: cssVar("--border-radius-m"),
|
|
58
58
|
justifyContent: "center",
|
|
59
59
|
userSelect: "none",
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
jss,
|
|
62
62
|
]}
|
|
63
63
|
>
|
|
64
64
|
<Row grow={true} align={align} gap={gap} justify={justify}>
|
package/src/Calendar.tsx
CHANGED
|
@@ -20,11 +20,11 @@ export const Calendar = React.forwardRef(
|
|
|
20
20
|
date,
|
|
21
21
|
cell,
|
|
22
22
|
header,
|
|
23
|
-
|
|
23
|
+
jss,
|
|
24
24
|
}: {
|
|
25
25
|
date: Date;
|
|
26
26
|
header: (props: { weekday: string }) => JSX.Element;
|
|
27
|
-
|
|
27
|
+
jss?: JSStyle;
|
|
28
28
|
cell: (props: {
|
|
29
29
|
today?: boolean;
|
|
30
30
|
date: Date;
|
|
@@ -61,13 +61,13 @@ export const Calendar = React.forwardRef(
|
|
|
61
61
|
return (
|
|
62
62
|
<BaseView
|
|
63
63
|
ref={ref}
|
|
64
|
-
|
|
64
|
+
jss={[
|
|
65
65
|
{
|
|
66
66
|
display: "grid",
|
|
67
67
|
gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr 1fr",
|
|
68
68
|
gridTemplateRows: "1fr",
|
|
69
69
|
},
|
|
70
|
-
|
|
70
|
+
jss,
|
|
71
71
|
]}
|
|
72
72
|
>
|
|
73
73
|
{headers}
|
package/src/Card.tsx
CHANGED
|
@@ -5,7 +5,7 @@ export interface CardProps extends FlexLayoutProps {}
|
|
|
5
5
|
|
|
6
6
|
export function Card({
|
|
7
7
|
children,
|
|
8
|
-
|
|
8
|
+
jss,
|
|
9
9
|
padding = "large",
|
|
10
10
|
gap = "large",
|
|
11
11
|
...otherProps
|
|
@@ -15,13 +15,13 @@ export function Card({
|
|
|
15
15
|
{...otherProps}
|
|
16
16
|
padding={padding}
|
|
17
17
|
gap={gap}
|
|
18
|
-
|
|
18
|
+
jss={[
|
|
19
19
|
{
|
|
20
20
|
backgroundColor: cssVar("--overlay-background"),
|
|
21
21
|
borderRadius: cssVar("--border-radius-l"),
|
|
22
22
|
boxShadow: "1px 1px 4px 1px #e0e0e0",
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
jss,
|
|
25
25
|
]}
|
|
26
26
|
>
|
|
27
27
|
{children}
|
package/src/Checkbox.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseInput, BaseInputProps } from "./BaseInput";
|
|
3
3
|
import {} from "./BaseView";
|
|
4
|
-
import { Size,
|
|
4
|
+
import { Size, toClassnames } from "./jss";
|
|
5
5
|
import { StaticCheckbox, sizes } from "./StaticCheckbox";
|
|
6
6
|
|
|
7
7
|
// @ts-ignore
|
|
@@ -21,7 +21,7 @@ export function Checkbox({
|
|
|
21
21
|
}: CheckboxProps) {
|
|
22
22
|
return (
|
|
23
23
|
<label
|
|
24
|
-
className={
|
|
24
|
+
className={toClassnames({
|
|
25
25
|
position: "relative",
|
|
26
26
|
display: "flex",
|
|
27
27
|
justifyContent: "center",
|
|
@@ -46,7 +46,7 @@ export function Checkbox({
|
|
|
46
46
|
tabIndex={0}
|
|
47
47
|
checked={checked}
|
|
48
48
|
onChange={onClick}
|
|
49
|
-
|
|
49
|
+
jss={{
|
|
50
50
|
position: "absolute",
|
|
51
51
|
opacity: 0,
|
|
52
52
|
cursor: "pointer",
|
package/src/Circle.tsx
CHANGED
|
@@ -4,19 +4,19 @@ import { Box, BoxProps } from "./Box";
|
|
|
4
4
|
interface CircleProps extends BoxProps {}
|
|
5
5
|
|
|
6
6
|
export function Circle({
|
|
7
|
-
|
|
7
|
+
jss,
|
|
8
8
|
padding = "medium",
|
|
9
9
|
...otherProps
|
|
10
10
|
}: CircleProps) {
|
|
11
11
|
return (
|
|
12
12
|
<Box
|
|
13
13
|
padding={padding}
|
|
14
|
-
|
|
14
|
+
jss={[
|
|
15
15
|
{
|
|
16
16
|
borderRadius: "50%",
|
|
17
17
|
overflow: "hidden",
|
|
18
18
|
},
|
|
19
|
-
|
|
19
|
+
jss,
|
|
20
20
|
]}
|
|
21
21
|
{...otherProps}
|
|
22
22
|
/>
|
package/src/DarkMode.tsx
CHANGED
package/src/DateInput.tsx
CHANGED
|
@@ -12,17 +12,17 @@ export interface DateInputProps extends BaseInputProps {
|
|
|
12
12
|
icon?: IconType;
|
|
13
13
|
addOn?: ReactNode;
|
|
14
14
|
onChange?: undefined;
|
|
15
|
-
|
|
15
|
+
jsss?: JSStyle;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const DateInput = React.forwardRef(
|
|
19
19
|
(
|
|
20
|
-
{ date, onDateChange,
|
|
20
|
+
{ date, onDateChange, jss, icon, addOn, ...inputProps }: DateInputProps,
|
|
21
21
|
ref?: React.Ref<HTMLInputElement>
|
|
22
22
|
) => {
|
|
23
23
|
return (
|
|
24
24
|
<Row
|
|
25
|
-
|
|
25
|
+
jss={{
|
|
26
26
|
backgroundColor: "inherit",
|
|
27
27
|
}}
|
|
28
28
|
>
|
|
@@ -37,7 +37,7 @@ export const DateInput = React.forwardRef(
|
|
|
37
37
|
ref={ref}
|
|
38
38
|
value={date.toISOString().substring(0, 10)}
|
|
39
39
|
onChange={(e) => onDateChange(new Date(e.target.value))}
|
|
40
|
-
|
|
40
|
+
jss={[
|
|
41
41
|
{
|
|
42
42
|
flexGrow: 1,
|
|
43
43
|
backgroundColor: "inherit",
|
|
@@ -53,7 +53,7 @@ export const DateInput = React.forwardRef(
|
|
|
53
53
|
color: "var(--subtle-text);",
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
jss,
|
|
57
57
|
]}
|
|
58
58
|
/>
|
|
59
59
|
{addOn}
|
package/src/DatePicker.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
2
|
import { Text } from "./Text";
|
|
3
|
-
import { TextColor,
|
|
3
|
+
import { TextColor, toClassnames } from "./jss";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const jsss = {
|
|
6
6
|
dateInput: {
|
|
7
7
|
border: "1px solid var(--divider)",
|
|
8
8
|
backgroundColor: "var(--primary-background)",
|
|
@@ -47,7 +47,7 @@ export function DatePicker({
|
|
|
47
47
|
<input
|
|
48
48
|
min={min}
|
|
49
49
|
max={max}
|
|
50
|
-
className={
|
|
50
|
+
className={toClassnames(jsss.dateInput)}
|
|
51
51
|
type="date"
|
|
52
52
|
id={id}
|
|
53
53
|
value={date.toISOString().substring(0, 10)}
|
package/src/DatetimeInput.tsx
CHANGED
|
@@ -12,10 +12,10 @@ export interface DatetimeInputProps extends BaseInputProps {
|
|
|
12
12
|
icon?: IconType;
|
|
13
13
|
addOn?: ReactNode;
|
|
14
14
|
onChange?: undefined;
|
|
15
|
-
|
|
15
|
+
jss?: JSStyle;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const jsss = {
|
|
19
19
|
root: {
|
|
20
20
|
backgroundColor: "var(--primary-background)",
|
|
21
21
|
},
|
|
@@ -39,18 +39,11 @@ const jsStyles = {
|
|
|
39
39
|
|
|
40
40
|
export const DatetimeInput = React.forwardRef(
|
|
41
41
|
(
|
|
42
|
-
{
|
|
43
|
-
date,
|
|
44
|
-
onDateChange,
|
|
45
|
-
jsStyle,
|
|
46
|
-
icon,
|
|
47
|
-
addOn,
|
|
48
|
-
...inputProps
|
|
49
|
-
}: DatetimeInputProps,
|
|
42
|
+
{ date, onDateChange, jss, icon, addOn, ...inputProps }: DatetimeInputProps,
|
|
50
43
|
ref?: React.Ref<HTMLInputElement>
|
|
51
44
|
) => {
|
|
52
45
|
return (
|
|
53
|
-
<Row
|
|
46
|
+
<Row jss={jsss.root}>
|
|
54
47
|
{icon && (
|
|
55
48
|
<Box padding="medium">
|
|
56
49
|
<Icon size="medium" color="secondary" icon={icon} />
|
|
@@ -62,7 +55,7 @@ export const DatetimeInput = React.forwardRef(
|
|
|
62
55
|
ref={ref}
|
|
63
56
|
value={date.toISOString().substring(0, 16)}
|
|
64
57
|
onChange={(e) => onDateChange(new Date(e.target.value))}
|
|
65
|
-
|
|
58
|
+
jss={[jsss.input, jss]}
|
|
66
59
|
/>
|
|
67
60
|
{addOn}
|
|
68
61
|
</Row>
|
package/src/DesignBook.tsx
CHANGED
package/src/Dialog.tsx
CHANGED
|
@@ -6,9 +6,9 @@ import { ListDivider } from "./ListDivider";
|
|
|
6
6
|
import { Column } from "./Column";
|
|
7
7
|
import { Row } from "./Row";
|
|
8
8
|
import { IconButton } from "./IconButton";
|
|
9
|
-
import {
|
|
9
|
+
import { toClassnames } from "./jss";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const jsss = {
|
|
12
12
|
dialog: {
|
|
13
13
|
border: "1px solid var(--divider)",
|
|
14
14
|
borderRadius: "var(--border-radius-m)",
|
|
@@ -44,8 +44,8 @@ export const Dialog = ({
|
|
|
44
44
|
close: () => void;
|
|
45
45
|
}) => {
|
|
46
46
|
return (
|
|
47
|
-
<BaseView
|
|
48
|
-
<Column
|
|
47
|
+
<BaseView jss={jsss.root}>
|
|
48
|
+
<Column jss={jsss.header}>
|
|
49
49
|
<Row padding="medium" justify="space-between" align="center">
|
|
50
50
|
<Text size="medium" color="secondary">
|
|
51
51
|
{label}
|
|
@@ -61,7 +61,7 @@ export const Dialog = ({
|
|
|
61
61
|
</Row>
|
|
62
62
|
<ListDivider />
|
|
63
63
|
</Column>
|
|
64
|
-
<BaseView
|
|
64
|
+
<BaseView jss={jsss.content}>{children}</BaseView>
|
|
65
65
|
</BaseView>
|
|
66
66
|
);
|
|
67
67
|
};
|
|
@@ -107,7 +107,7 @@ export function useDialog<Input>(
|
|
|
107
107
|
dialogRef.current = ref;
|
|
108
108
|
ref && ref.showModal();
|
|
109
109
|
}}
|
|
110
|
-
className={
|
|
110
|
+
className={toClassnames(jsss.dialog)}
|
|
111
111
|
onClose={() => {
|
|
112
112
|
closeRef.current();
|
|
113
113
|
}}
|
package/src/Dropdown.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { useNavigation } from "./useNavigation";
|
|
|
8
8
|
import { useRefEffect } from "./useRefEffect";
|
|
9
9
|
import { Gap, JSStyle, Padding, Size, getBackground } from "./jss";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const jsss: { [key: string]: JSStyle } = {
|
|
12
12
|
root: {
|
|
13
13
|
position: "relative",
|
|
14
14
|
display: "flex",
|
|
@@ -35,8 +35,8 @@ export function Dropdown<T extends string | number>({
|
|
|
35
35
|
options,
|
|
36
36
|
selection,
|
|
37
37
|
setSelection,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
jss,
|
|
39
|
+
jssButton,
|
|
40
40
|
optionLabel,
|
|
41
41
|
padding,
|
|
42
42
|
size,
|
|
@@ -47,8 +47,8 @@ export function Dropdown<T extends string | number>({
|
|
|
47
47
|
options: Set<T>;
|
|
48
48
|
setSelection: (selection: T) => void;
|
|
49
49
|
selection: T;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
jss?: JSStyle;
|
|
51
|
+
jssButton?: JSStyle;
|
|
52
52
|
optionLabel: (option: T) => string;
|
|
53
53
|
padding?: Padding;
|
|
54
54
|
gap?: Gap;
|
|
@@ -75,7 +75,7 @@ export function Dropdown<T extends string | number>({
|
|
|
75
75
|
}, [expanded]);
|
|
76
76
|
|
|
77
77
|
return (
|
|
78
|
-
<BaseView ref={rootRef}
|
|
78
|
+
<BaseView ref={rootRef} jss={[jsss.root, jss]}>
|
|
79
79
|
<Button
|
|
80
80
|
size={size}
|
|
81
81
|
padding={padding}
|
|
@@ -86,7 +86,7 @@ export function Dropdown<T extends string | number>({
|
|
|
86
86
|
role="combobox"
|
|
87
87
|
justify="space-between"
|
|
88
88
|
tabIndex={0}
|
|
89
|
-
|
|
89
|
+
jss={[jsss.button, jssButton]}
|
|
90
90
|
color="positive"
|
|
91
91
|
icon="fa-chevron-down"
|
|
92
92
|
iconPosition="right"
|
|
@@ -100,7 +100,7 @@ export function Dropdown<T extends string | number>({
|
|
|
100
100
|
{expanded && (
|
|
101
101
|
<Column
|
|
102
102
|
gap={gap}
|
|
103
|
-
|
|
103
|
+
jss={[jsss.dropdown, getBackground("secondary-background")]}
|
|
104
104
|
id={id}
|
|
105
105
|
role="listbox"
|
|
106
106
|
aria-label={label}
|
package/src/FlexLayout.tsx
CHANGED
|
@@ -22,7 +22,7 @@ export interface FlexLayoutProps extends BaseViewProps {
|
|
|
22
22
|
export const FlexLayout = React.forwardRef(
|
|
23
23
|
(
|
|
24
24
|
{
|
|
25
|
-
|
|
25
|
+
jss,
|
|
26
26
|
gap = "none",
|
|
27
27
|
justify = "none",
|
|
28
28
|
align = "none",
|
|
@@ -35,7 +35,7 @@ export const FlexLayout = React.forwardRef(
|
|
|
35
35
|
return (
|
|
36
36
|
<BaseView
|
|
37
37
|
ref={ref}
|
|
38
|
-
|
|
38
|
+
jss={[
|
|
39
39
|
{
|
|
40
40
|
display: "flex",
|
|
41
41
|
flexDirection: direction,
|
|
@@ -44,7 +44,7 @@ export const FlexLayout = React.forwardRef(
|
|
|
44
44
|
alignItems: align,
|
|
45
45
|
},
|
|
46
46
|
getPadding(padding),
|
|
47
|
-
|
|
47
|
+
jss,
|
|
48
48
|
]}
|
|
49
49
|
{...otherProps}
|
|
50
50
|
/>
|
package/src/Icon.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { BaseView } from "./BaseView";
|
|
|
3
3
|
import { IconType } from "./IconType";
|
|
4
4
|
import { Size, TextColor, getTextColor } from "./jss";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const jsss = {
|
|
7
7
|
root: {
|
|
8
8
|
display: "flex",
|
|
9
9
|
justifyContent: "center",
|
|
@@ -88,15 +88,15 @@ export function Icon({
|
|
|
88
88
|
<BaseView
|
|
89
89
|
key={icon}
|
|
90
90
|
aria-label={ariaLabel}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
size === "xsmall" &&
|
|
94
|
-
size === "small" &&
|
|
95
|
-
size === "medium" &&
|
|
96
|
-
size === "large" &&
|
|
97
|
-
size === "xlarge" &&
|
|
98
|
-
size === "xxlarge" &&
|
|
99
|
-
size === "xxxlarge" &&
|
|
91
|
+
jss={[
|
|
92
|
+
jsss.root,
|
|
93
|
+
size === "xsmall" && jsss.xsmall,
|
|
94
|
+
size === "small" && jsss.small,
|
|
95
|
+
size === "medium" && jsss.medium,
|
|
96
|
+
size === "large" && jsss.large,
|
|
97
|
+
size === "xlarge" && jsss.xlarge,
|
|
98
|
+
size === "xxlarge" && jsss.xxlarge,
|
|
99
|
+
size === "xxxlarge" && jsss.xxxlarge,
|
|
100
100
|
getTextColor(color),
|
|
101
101
|
]}
|
|
102
102
|
>
|
package/src/IconButton.tsx
CHANGED
|
@@ -20,22 +20,14 @@ export interface IconButtonProps extends BaseButtonProps {
|
|
|
20
20
|
|
|
21
21
|
export const IconButton = React.forwardRef(
|
|
22
22
|
(
|
|
23
|
-
{
|
|
24
|
-
icon,
|
|
25
|
-
size,
|
|
26
|
-
color,
|
|
27
|
-
bare,
|
|
28
|
-
disabled,
|
|
29
|
-
jsStyle,
|
|
30
|
-
...buttonProps
|
|
31
|
-
}: IconButtonProps,
|
|
23
|
+
{ icon, size, color, bare, disabled, jss, ...buttonProps }: IconButtonProps,
|
|
32
24
|
ref?: React.Ref<HTMLButtonElement>
|
|
33
25
|
) => {
|
|
34
26
|
return (
|
|
35
27
|
<BaseButton
|
|
36
28
|
{...buttonProps}
|
|
37
29
|
bare={bare}
|
|
38
|
-
|
|
30
|
+
jss={[
|
|
39
31
|
{
|
|
40
32
|
display: "flex",
|
|
41
33
|
justifyContent: "center",
|
|
@@ -49,7 +41,7 @@ export const IconButton = React.forwardRef(
|
|
|
49
41
|
transform: "scale(0.92)",
|
|
50
42
|
},
|
|
51
43
|
},
|
|
52
|
-
|
|
44
|
+
jss,
|
|
53
45
|
]}
|
|
54
46
|
color={color}
|
|
55
47
|
ref={ref}
|
package/src/IconLink.tsx
CHANGED
package/src/Interactable.tsx
CHANGED
|
@@ -7,7 +7,7 @@ export type InteractableColor =
|
|
|
7
7
|
| "dark"
|
|
8
8
|
| "light";
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const jsss = {
|
|
11
11
|
root: {
|
|
12
12
|
cursor: "pointer",
|
|
13
13
|
display: "inline-flex",
|
|
@@ -94,18 +94,18 @@ export function getInteractableJSStyles({
|
|
|
94
94
|
border: boolean;
|
|
95
95
|
}): Array<JSStyle> {
|
|
96
96
|
return [
|
|
97
|
-
|
|
98
|
-
color === "dark" &&
|
|
99
|
-
color === "light" &&
|
|
100
|
-
color === "positive" &&
|
|
101
|
-
color === "primary" &&
|
|
102
|
-
color === "negative" &&
|
|
97
|
+
jsss.root,
|
|
98
|
+
color === "dark" && jsss.dark,
|
|
99
|
+
color === "light" && jsss.light,
|
|
100
|
+
color === "positive" && jsss.positive,
|
|
101
|
+
color === "primary" && jsss.primary,
|
|
102
|
+
color === "negative" && jsss.negative,
|
|
103
103
|
border && {
|
|
104
104
|
border: `1px solid ${getCSSColor(color, disabled, bare)}`,
|
|
105
105
|
},
|
|
106
|
-
bare &&
|
|
107
|
-
disabled &&
|
|
108
|
-
!bare &&
|
|
106
|
+
bare && jsss.bare,
|
|
107
|
+
disabled && jsss.disabled,
|
|
108
|
+
!bare && jsss.opacityHover,
|
|
109
109
|
animateInteraction &&
|
|
110
110
|
!disabled && {
|
|
111
111
|
position: "relative",
|