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/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",
|
package/src/Link.tsx
CHANGED
|
@@ -39,7 +39,7 @@ export const Link = React.forwardRef(
|
|
|
39
39
|
align = "center",
|
|
40
40
|
gap = "small",
|
|
41
41
|
justify = "center",
|
|
42
|
-
|
|
42
|
+
jss,
|
|
43
43
|
size = "medium",
|
|
44
44
|
padding = "medium",
|
|
45
45
|
inline = true,
|
|
@@ -56,7 +56,7 @@ export const Link = React.forwardRef(
|
|
|
56
56
|
color={color}
|
|
57
57
|
disabled={disabled}
|
|
58
58
|
padding={padding}
|
|
59
|
-
|
|
59
|
+
jss={[
|
|
60
60
|
{
|
|
61
61
|
borderRadius: cssVar("--border-radius-m"),
|
|
62
62
|
justifyContent: "center",
|
|
@@ -70,11 +70,11 @@ export const Link = React.forwardRef(
|
|
|
70
70
|
textUnderlineOffset: "2px",
|
|
71
71
|
textDecorationColor: getCSSColor(color, disabled, bare),
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
jss,
|
|
74
74
|
]}
|
|
75
75
|
>
|
|
76
76
|
<Row
|
|
77
|
-
|
|
77
|
+
jss={{
|
|
78
78
|
display: inline ? "inline-flex" : "flex",
|
|
79
79
|
}}
|
|
80
80
|
grow={true}
|
package/src/List.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const ListContext = React.createContext({ bare: false, carded: true });
|
|
|
16
16
|
|
|
17
17
|
export function List({
|
|
18
18
|
ariaLabel,
|
|
19
|
-
|
|
19
|
+
jss,
|
|
20
20
|
autofocus = false,
|
|
21
21
|
navigation = true,
|
|
22
22
|
bare,
|
|
@@ -32,7 +32,7 @@ export function List({
|
|
|
32
32
|
role="grid"
|
|
33
33
|
aria-label={ariaLabel}
|
|
34
34
|
ref={rootRef}
|
|
35
|
-
|
|
35
|
+
jss={[
|
|
36
36
|
{ overflow: "hidden" },
|
|
37
37
|
!bare && {
|
|
38
38
|
backgroundColor: cssVar("--overlay-background"),
|
|
@@ -47,7 +47,7 @@ export function List({
|
|
|
47
47
|
border: `1px solid ${cssVar("--divider")}`,
|
|
48
48
|
borderRadius: cssVar("--border-radius-l"),
|
|
49
49
|
},
|
|
50
|
-
|
|
50
|
+
jss,
|
|
51
51
|
]}
|
|
52
52
|
{...otherProps}
|
|
53
53
|
/>
|
package/src/ListButtonItem.tsx
CHANGED
|
@@ -27,7 +27,7 @@ export const ListButtonItem = React.forwardRef(
|
|
|
27
27
|
color = "primary",
|
|
28
28
|
disabled = false,
|
|
29
29
|
padding = "medium",
|
|
30
|
-
|
|
30
|
+
jss,
|
|
31
31
|
gap,
|
|
32
32
|
selected,
|
|
33
33
|
...otherProps
|
|
@@ -47,7 +47,7 @@ export const ListButtonItem = React.forwardRef(
|
|
|
47
47
|
selected={selected}
|
|
48
48
|
aria-selected={selected}
|
|
49
49
|
{...otherProps}
|
|
50
|
-
|
|
50
|
+
jss={jss}
|
|
51
51
|
>
|
|
52
52
|
{({ content }) => (
|
|
53
53
|
<BaseButton
|
|
@@ -57,7 +57,7 @@ export const ListButtonItem = React.forwardRef(
|
|
|
57
57
|
bare={true}
|
|
58
58
|
color={bare ? "primary" : color}
|
|
59
59
|
ref={ref}
|
|
60
|
-
|
|
60
|
+
jss={getInteractableListItemJSStyles({ bare, selected })}
|
|
61
61
|
onClick={onClick}
|
|
62
62
|
>
|
|
63
63
|
{content}
|
package/src/ListDivider.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseView } from "./BaseView";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const jsss = {
|
|
5
5
|
root: {
|
|
6
6
|
width: "100%",
|
|
7
7
|
borderBottom: "1px solid var(--divider)",
|
|
@@ -9,5 +9,5 @@ const jsStyles = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export function ListDivider() {
|
|
12
|
-
return <BaseView
|
|
12
|
+
return <BaseView jss={jsss.root} />;
|
|
13
13
|
}
|
package/src/ListHeaderItem.tsx
CHANGED
package/src/ListItem.tsx
CHANGED
|
@@ -16,12 +16,7 @@ export const ListItem = React.forwardRef(
|
|
|
16
16
|
const { bare } = useListContext();
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<BaseListItem
|
|
20
|
-
withDivider={!bare}
|
|
21
|
-
{...props}
|
|
22
|
-
jsStyle={props.jsStyle}
|
|
23
|
-
ref={ref}
|
|
24
|
-
>
|
|
19
|
+
<BaseListItem withDivider={!bare} {...props} jss={props.jss} ref={ref}>
|
|
25
20
|
{({ content }) => content}
|
|
26
21
|
</BaseListItem>
|
|
27
22
|
);
|
package/src/ListLinkItem.tsx
CHANGED
|
@@ -29,7 +29,7 @@ export const ListLinkItem = React.forwardRef(
|
|
|
29
29
|
href,
|
|
30
30
|
disabled = false,
|
|
31
31
|
padding = "medium",
|
|
32
|
-
|
|
32
|
+
jss,
|
|
33
33
|
gap,
|
|
34
34
|
selected,
|
|
35
35
|
color = "primary",
|
|
@@ -51,7 +51,7 @@ export const ListLinkItem = React.forwardRef(
|
|
|
51
51
|
bodyColor={getGlyphColor(color, disabled, true)}
|
|
52
52
|
selected={selected}
|
|
53
53
|
{...otherProps}
|
|
54
|
-
|
|
54
|
+
jss={jss}
|
|
55
55
|
>
|
|
56
56
|
{({ content }) => (
|
|
57
57
|
<BaseLink
|
|
@@ -64,7 +64,7 @@ export const ListLinkItem = React.forwardRef(
|
|
|
64
64
|
color={color}
|
|
65
65
|
href={href}
|
|
66
66
|
ref={ref}
|
|
67
|
-
|
|
67
|
+
jss={getInteractableListItemJSStyles({ bare, selected })}
|
|
68
68
|
onClick={onClick}
|
|
69
69
|
>
|
|
70
70
|
{content}
|
package/src/ListSpacer.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseView } from "./BaseView";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const jsss = {
|
|
5
5
|
root: {
|
|
6
6
|
height: "var(--spacing-xl)",
|
|
7
7
|
backgroundColor: "var(--secondary-background)",
|
|
@@ -10,5 +10,5 @@ const jsStyles = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export function ListSpacer() {
|
|
13
|
-
return <BaseView
|
|
13
|
+
return <BaseView jss={jsss.root} />;
|
|
14
14
|
}
|
package/src/MenuIcon.tsx
CHANGED
|
@@ -7,7 +7,7 @@ export function MenuIcon({ open, color }: { open: boolean; color: Color }) {
|
|
|
7
7
|
<Column gap="small">
|
|
8
8
|
<Bar
|
|
9
9
|
color={color}
|
|
10
|
-
|
|
10
|
+
jss={{
|
|
11
11
|
transform: open ? "rotateZ(135deg)" : "",
|
|
12
12
|
transformOrigin: "center",
|
|
13
13
|
top: open ? 8 : 0,
|
|
@@ -15,13 +15,13 @@ export function MenuIcon({ open, color }: { open: boolean; color: Color }) {
|
|
|
15
15
|
/>
|
|
16
16
|
<Bar
|
|
17
17
|
color={color}
|
|
18
|
-
|
|
18
|
+
jss={{
|
|
19
19
|
opacity: open ? 0 : 1,
|
|
20
20
|
}}
|
|
21
21
|
/>
|
|
22
22
|
<Bar
|
|
23
23
|
color={color}
|
|
24
|
-
|
|
24
|
+
jss={{
|
|
25
25
|
transform: open ? "rotateZ(-135deg)" : "",
|
|
26
26
|
transformOrigin: "center",
|
|
27
27
|
top: open ? -8 : 0,
|
|
@@ -31,10 +31,10 @@ export function MenuIcon({ open, color }: { open: boolean; color: Color }) {
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function Bar({
|
|
34
|
+
function Bar({ jss, color }: { jss: JSStyle; color: Color }) {
|
|
35
35
|
return (
|
|
36
36
|
<BaseView
|
|
37
|
-
|
|
37
|
+
jss={[
|
|
38
38
|
{
|
|
39
39
|
position: "relative",
|
|
40
40
|
width: 24,
|
|
@@ -43,7 +43,7 @@ function Bar({ jsStyle, color }: { jsStyle: JSStyle; color: Color }) {
|
|
|
43
43
|
transition: "all 200ms ease-out",
|
|
44
44
|
},
|
|
45
45
|
getBackground(color),
|
|
46
|
-
|
|
46
|
+
jss,
|
|
47
47
|
]}
|
|
48
48
|
/>
|
|
49
49
|
);
|
package/src/NextJSRouter.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { BaseView } from "./BaseView";
|
|
|
7
7
|
import { useRouterState } from "./NextJSRouterState";
|
|
8
8
|
import { JSStyle } from "./jss";
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const jsss: { [key: string]: JSStyle } = {
|
|
11
11
|
root: {
|
|
12
12
|
display: "flex",
|
|
13
13
|
flexDirection: "column",
|
|
@@ -36,7 +36,7 @@ export function Router() {
|
|
|
36
36
|
} = useRouterState();
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
|
-
<BaseView
|
|
39
|
+
<BaseView jss={jsss.root}>
|
|
40
40
|
{navigationStack.map(({ route, routeProps }, index, list) => {
|
|
41
41
|
const isTopOfStack = index === list.length - 1;
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ export function Router() {
|
|
|
46
46
|
isTopOfStack={isTopOfStack}
|
|
47
47
|
>
|
|
48
48
|
<Column
|
|
49
|
-
|
|
49
|
+
jss={[jsss.route, !isTopOfStack && jsss.hidden]}
|
|
50
50
|
aria-hidden={!isTopOfStack}
|
|
51
51
|
>
|
|
52
52
|
<ListDivider />
|
package/src/Popover.tsx
CHANGED
|
@@ -3,9 +3,9 @@ import { queryFocusables } from "./aria";
|
|
|
3
3
|
|
|
4
4
|
import { BaseView } from "./BaseView";
|
|
5
5
|
import { useRefEffect } from "./useRefEffect";
|
|
6
|
-
import { JSStyle,
|
|
6
|
+
import { JSStyle, toClassnames } from "./jss";
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const jsss: { [key: string]: JSStyle } = {
|
|
9
9
|
popover: {
|
|
10
10
|
padding: 0,
|
|
11
11
|
zIndex: 1,
|
|
@@ -77,7 +77,7 @@ export function Popover({ children, close }) {
|
|
|
77
77
|
|
|
78
78
|
interface PopoverTriggerProps<Input> {
|
|
79
79
|
PopoverComponent: (props: { close: () => void } & Input) => JSX.Element;
|
|
80
|
-
|
|
80
|
+
jss?: JSStyle;
|
|
81
81
|
dialogJSStyle?: JSStyle;
|
|
82
82
|
className?: undefined;
|
|
83
83
|
grow?: boolean;
|
|
@@ -88,7 +88,7 @@ interface PopoverTriggerProps<Input> {
|
|
|
88
88
|
|
|
89
89
|
export function PopoverTrigger<Input>({
|
|
90
90
|
PopoverComponent,
|
|
91
|
-
|
|
91
|
+
jss,
|
|
92
92
|
dialogJSStyle,
|
|
93
93
|
grow,
|
|
94
94
|
shrink,
|
|
@@ -120,14 +120,14 @@ export function PopoverTrigger<Input>({
|
|
|
120
120
|
shrink={shrink}
|
|
121
121
|
tag={tag}
|
|
122
122
|
relative={true}
|
|
123
|
-
|
|
123
|
+
jss={[jss, { position: "relative", display: "inline-block" }]}
|
|
124
124
|
>
|
|
125
125
|
{children({ toggle })}
|
|
126
126
|
<dialog
|
|
127
127
|
ref={(ref: null | HTMLDialogElement) => {
|
|
128
128
|
dialogRef.current = ref;
|
|
129
129
|
}}
|
|
130
|
-
className={
|
|
130
|
+
className={toClassnames([jsss.popover, dialogJSStyle])}
|
|
131
131
|
onClose={() => {
|
|
132
132
|
setPopover(null);
|
|
133
133
|
}}
|
package/src/ProgressBar.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { BaseView } from "./BaseView";
|
|
3
3
|
import { Color, Size, JSStyle, getBackground } from "./jss";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const jsss: { [key: string]: JSStyle } = {
|
|
6
6
|
root: {
|
|
7
7
|
width: "100%",
|
|
8
8
|
display: "flex",
|
|
@@ -35,25 +35,25 @@ export function ProgressBar({
|
|
|
35
35
|
color,
|
|
36
36
|
progress,
|
|
37
37
|
size,
|
|
38
|
-
|
|
38
|
+
jss,
|
|
39
39
|
}: {
|
|
40
40
|
progress: number;
|
|
41
41
|
color: Color;
|
|
42
42
|
size: Size;
|
|
43
|
-
|
|
43
|
+
jss?: JSStyle;
|
|
44
44
|
}) {
|
|
45
45
|
return (
|
|
46
46
|
<BaseView
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
jss={[
|
|
48
|
+
jsss.root,
|
|
49
49
|
{
|
|
50
50
|
height: sizes[size],
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
jss,
|
|
53
53
|
]}
|
|
54
54
|
>
|
|
55
55
|
<BaseView
|
|
56
|
-
|
|
56
|
+
jss={[jsss.fill, getBackground(color)]}
|
|
57
57
|
style={{
|
|
58
58
|
transform: `scaleX(${progress > 1 ? 1 : progress})`,
|
|
59
59
|
}}
|
package/src/ProgressCircle.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { cssVar,
|
|
2
|
+
import { cssVar, toClassnames } from "./jss";
|
|
3
3
|
|
|
4
4
|
export function ProgressCircle({
|
|
5
5
|
progress,
|
|
@@ -15,7 +15,7 @@ export function ProgressCircle({
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<svg
|
|
18
|
-
className={
|
|
18
|
+
className={toClassnames({
|
|
19
19
|
backgroundColor: cssVar("--secondary-background"),
|
|
20
20
|
transform: "rotate(-90deg)",
|
|
21
21
|
borderRadius: "50%",
|
package/src/RangeInput.tsx
CHANGED
|
@@ -20,7 +20,7 @@ export const RangeInput = React.forwardRef(
|
|
|
20
20
|
value,
|
|
21
21
|
onValueChange,
|
|
22
22
|
rootJSStyle,
|
|
23
|
-
|
|
23
|
+
jss,
|
|
24
24
|
gap = "medium",
|
|
25
25
|
padding = "none",
|
|
26
26
|
min = 0,
|
|
@@ -38,7 +38,7 @@ export const RangeInput = React.forwardRef(
|
|
|
38
38
|
gap={gap}
|
|
39
39
|
padding={padding}
|
|
40
40
|
align="center"
|
|
41
|
-
|
|
41
|
+
jss={[
|
|
42
42
|
{
|
|
43
43
|
":has(:focus-visible)": {
|
|
44
44
|
borderRadius: cssVar("--border-radius-m"),
|
|
@@ -60,7 +60,7 @@ export const RangeInput = React.forwardRef(
|
|
|
60
60
|
onChange={(e) => {
|
|
61
61
|
onValueChange(parseFloat(e.target.value));
|
|
62
62
|
}}
|
|
63
|
-
|
|
63
|
+
jss={[
|
|
64
64
|
{
|
|
65
65
|
backgroundColor: cssVar("--primary-background"),
|
|
66
66
|
flexGrow: 1,
|
|
@@ -72,7 +72,7 @@ export const RangeInput = React.forwardRef(
|
|
|
72
72
|
color: cssVar("--subtle-text"),
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
jss,
|
|
76
76
|
]}
|
|
77
77
|
/>
|
|
78
78
|
{addOnPosition === "end" && addOn}
|
package/src/RootView.tsx
CHANGED
package/src/Select.tsx
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { forwardRef } from "react";
|
|
2
|
-
import { JSStyle, cssVar,
|
|
2
|
+
import { JSStyle, cssVar, toClassnames } from "./jss";
|
|
3
3
|
|
|
4
4
|
export interface SelectProps extends React.HTMLAttributes<HTMLSelectElement> {
|
|
5
5
|
value: string;
|
|
6
6
|
onValueChange: (value: string) => void;
|
|
7
|
-
|
|
7
|
+
jss?: JSStyle;
|
|
8
8
|
ref?: React.Ref<HTMLSelectElement>;
|
|
9
9
|
className?: undefined;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const Select = forwardRef(
|
|
13
13
|
(
|
|
14
|
-
{
|
|
14
|
+
{ jss, children, onValueChange, value, ...otherProps }: SelectProps,
|
|
15
15
|
ref?: React.Ref<HTMLSelectElement>
|
|
16
16
|
) => {
|
|
17
17
|
return (
|
|
18
18
|
<select
|
|
19
19
|
ref={ref}
|
|
20
|
-
className={
|
|
20
|
+
className={toClassnames([
|
|
21
21
|
{
|
|
22
22
|
fontSize: 20,
|
|
23
23
|
border: `1px solid ${cssVar("--divider")}`,
|
|
24
24
|
backgroundColor: cssVar("--overlay-background"),
|
|
25
25
|
borderRadius: cssVar("--border-radius-m"),
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
jss,
|
|
28
28
|
])}
|
|
29
29
|
value={value}
|
|
30
30
|
onChange={(e) => {
|
package/src/StaticCheckbox.tsx
CHANGED
|
@@ -10,7 +10,7 @@ type StaticCheckboxProps = {
|
|
|
10
10
|
icon?: IconType;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const jsss: { [key: string]: JSStyle } = {
|
|
14
14
|
border: {
|
|
15
15
|
position: "absolute",
|
|
16
16
|
top: "var(--spacing-xs)",
|
|
@@ -51,7 +51,7 @@ export function StaticCheckbox({
|
|
|
51
51
|
}: StaticCheckboxProps) {
|
|
52
52
|
return (
|
|
53
53
|
<BaseView
|
|
54
|
-
|
|
54
|
+
jss={{
|
|
55
55
|
position: "relative",
|
|
56
56
|
backgroundColor: cssVar("--primary-background"),
|
|
57
57
|
overflow: "hidden",
|
|
@@ -61,11 +61,9 @@ export function StaticCheckbox({
|
|
|
61
61
|
width: sizes[size],
|
|
62
62
|
}}
|
|
63
63
|
>
|
|
64
|
-
<BaseView
|
|
65
|
-
jsStyle={[jsStyles.border, checked && jsStyles.borderChecked]}
|
|
66
|
-
/>
|
|
64
|
+
<BaseView jss={[jsss.border, checked && jsss.borderChecked]} />
|
|
67
65
|
{checked && (
|
|
68
|
-
<BaseView
|
|
66
|
+
<BaseView jss={jsss.icon}>
|
|
69
67
|
<Icon size={size} color="light" icon={icon} />
|
|
70
68
|
</BaseView>
|
|
71
69
|
)}
|
package/src/Sublist.tsx
CHANGED
|
@@ -10,7 +10,7 @@ export function Sublist({
|
|
|
10
10
|
label,
|
|
11
11
|
labelBold,
|
|
12
12
|
initialState = { collapsed: false },
|
|
13
|
-
|
|
13
|
+
jss,
|
|
14
14
|
secondaryAddOn,
|
|
15
15
|
}: {
|
|
16
16
|
children: React.ReactNode;
|
|
@@ -19,7 +19,7 @@ export function Sublist({
|
|
|
19
19
|
initialState?: {
|
|
20
20
|
collapsed: boolean;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
jss?: JSStyle;
|
|
23
23
|
secondaryAddOn?: ReactNode;
|
|
24
24
|
}) {
|
|
25
25
|
const [collapsed, setCollapsed] = React.useState(initialState.collapsed);
|
|
@@ -29,13 +29,13 @@ export function Sublist({
|
|
|
29
29
|
headline={label}
|
|
30
30
|
headlineBold={labelBold}
|
|
31
31
|
onClick={() => setCollapsed((x) => !x)}
|
|
32
|
-
|
|
32
|
+
jss={jss}
|
|
33
33
|
addOn={
|
|
34
34
|
<Row gap="medium" align="center">
|
|
35
35
|
{secondaryAddOn}
|
|
36
36
|
<Box
|
|
37
37
|
padding="medium"
|
|
38
|
-
|
|
38
|
+
jss={[
|
|
39
39
|
{
|
|
40
40
|
transition: "transform 0.15s ease-in",
|
|
41
41
|
},
|
package/src/SubmitIconInput.tsx
CHANGED
|
@@ -14,7 +14,7 @@ export function SubmitIconInput({ icon, ...otherProps }: SubmitIconInputProps) {
|
|
|
14
14
|
<BaseInput
|
|
15
15
|
label={
|
|
16
16
|
<Box
|
|
17
|
-
|
|
17
|
+
jss={{
|
|
18
18
|
cursor: "pointer",
|
|
19
19
|
display: "flex",
|
|
20
20
|
justifyContent: "center",
|
|
@@ -36,7 +36,7 @@ export function SubmitIconInput({ icon, ...otherProps }: SubmitIconInputProps) {
|
|
|
36
36
|
}
|
|
37
37
|
{...otherProps}
|
|
38
38
|
type="submit"
|
|
39
|
-
|
|
39
|
+
jss={{
|
|
40
40
|
visibility: "hidden",
|
|
41
41
|
}}
|
|
42
42
|
value=""
|