aidos-ui 4.0.3 → 4.0.4
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/BaseView.js +4 -4
- package/dist/BaseView.js.map +1 -1
- package/dist/Calendar.js +22 -22
- package/dist/Calendar.js.map +1 -1
- package/dist/DateInput.d.ts +1 -1
- package/dist/DatePicker.js +2 -2
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatetimeInput.js +2 -2
- package/dist/DatetimeInput.js.map +1 -1
- package/dist/Dialog.js +3 -3
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.js +3 -3
- package/dist/Dropdown.js.map +1 -1
- package/dist/Icon.js +9 -9
- package/dist/Icon.js.map +1 -1
- package/dist/IconButton.d.ts +2 -0
- package/dist/IconButton.js +7 -4
- package/dist/IconButton.js.map +1 -1
- package/dist/Interactable.js +10 -10
- package/dist/Interactable.js.map +1 -1
- package/dist/ListDivider.js +2 -2
- package/dist/ListDivider.js.map +1 -1
- package/dist/ListSpacer.js +2 -2
- package/dist/ListSpacer.js.map +1 -1
- package/dist/NextJSRouter.js +3 -3
- package/dist/NextJSRouter.js.map +1 -1
- package/dist/Popover.js +2 -2
- package/dist/Popover.js.map +1 -1
- package/dist/ProgressBar.js +3 -3
- package/dist/ProgressBar.js.map +1 -1
- package/dist/StaticCheckbox.js +2 -2
- package/dist/StaticCheckbox.js.map +1 -1
- package/dist/Tooltip.js +2 -2
- package/dist/Tooltip.js.map +1 -1
- package/dist/vite-plugin-jss-debug.d.ts +9 -5
- package/dist/vite-plugin-jss-debug.js +7 -5
- package/dist/vite-plugin-jss-debug.js.map +1 -1
- package/package.json +1 -1
- package/src/BaseView.tsx +4 -4
- package/src/Calendar.tsx +27 -29
- package/src/DateInput.tsx +1 -1
- package/src/DatePicker.tsx +2 -2
- package/src/DatetimeInput.tsx +3 -3
- package/src/Dialog.tsx +5 -5
- package/src/Dropdown.tsx +4 -4
- package/src/Icon.tsx +9 -9
- package/src/IconButton.tsx +25 -2
- package/src/Interactable.tsx +10 -10
- package/src/ListDivider.tsx +2 -2
- package/src/ListSpacer.tsx +2 -2
- package/src/NextJSRouter.tsx +8 -10
- package/src/Popover.tsx +2 -2
- package/src/ProgressBar.tsx +3 -3
- package/src/StaticCheckbox.tsx +3 -3
- package/src/Tooltip.tsx +2 -2
- package/src/vite-plugin-jss-debug.ts +7 -5
- package/.claude/settings.local.json +0 -22
package/dist/Tooltip.js
CHANGED
|
@@ -4,7 +4,7 @@ import { BaseView } from "./BaseView";
|
|
|
4
4
|
import { useRefEffect } from "./useRefEffect";
|
|
5
5
|
import { Text } from "./Text";
|
|
6
6
|
import { cssVar, toClassnames } from "./jss";
|
|
7
|
-
const
|
|
7
|
+
const styles = {
|
|
8
8
|
tooltip: {
|
|
9
9
|
top: "-100%",
|
|
10
10
|
transform: "translateY(50%)",
|
|
@@ -49,7 +49,7 @@ export function Tooltip({ content, jss, tag, children }) {
|
|
|
49
49
|
setTooltip(_jsx("dialog", { ref: (ref) => {
|
|
50
50
|
dialogRef.current = ref;
|
|
51
51
|
focusTrapRoot(ref);
|
|
52
|
-
}, className: toClassnames(
|
|
52
|
+
}, className: toClassnames(styles.tooltip), onClose: () => {
|
|
53
53
|
setTooltip(null);
|
|
54
54
|
}, onClick: (e) => {
|
|
55
55
|
e.preventDefault();
|
package/dist/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC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AE,CAAC;gBACtB,CAAC,YAED,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,YAClC,OAAO,GACH,GACA,CACV,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,QAAQ,IACP,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,IAAI,EACd,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,GAAG,CAAC,EACvC,YAAY,EAAE,GAAG,EAAE;YACjB,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;gBACpB,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;YACjB,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;gBACpB,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC,aAEA,QAAQ,EACR,OAAO,IACC,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -13,11 +13,15 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export default function jssDebug(): ({
|
|
15
15
|
name: string;
|
|
16
|
-
config(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
config(_config: unknown, { command }: {
|
|
17
|
+
command: string;
|
|
18
|
+
}): {
|
|
19
|
+
oxc: {
|
|
20
|
+
jsx: {
|
|
21
|
+
runtime: string;
|
|
22
|
+
development: boolean;
|
|
23
|
+
importSource: string;
|
|
24
|
+
};
|
|
21
25
|
};
|
|
22
26
|
};
|
|
23
27
|
enforce?: undefined;
|
|
@@ -16,12 +16,14 @@ export default function jssDebug() {
|
|
|
16
16
|
return [
|
|
17
17
|
{
|
|
18
18
|
name: "jss-debug-jsx",
|
|
19
|
-
config() {
|
|
19
|
+
config(_config, { command }) {
|
|
20
20
|
return {
|
|
21
|
-
|
|
22
|
-
jsx:
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
oxc: {
|
|
22
|
+
jsx: {
|
|
23
|
+
runtime: "automatic",
|
|
24
|
+
development: command === "serve",
|
|
25
|
+
importSource: "aidos-ui",
|
|
26
|
+
},
|
|
25
27
|
},
|
|
26
28
|
};
|
|
27
29
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-jss-debug.js","sourceRoot":"","sources":["../src/vite-plugin-jss-debug.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC9B,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,MAAM;
|
|
1
|
+
{"version":3,"file":"vite-plugin-jss-debug.js","sourceRoot":"","sources":["../src/vite-plugin-jss-debug.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC9B,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,MAAM,CAAC,OAAgB,EAAE,EAAE,OAAO,EAAuB;gBACvD,OAAO;oBACL,GAAG,EAAE;wBACH,GAAG,EAAE;4BACH,OAAO,EAAE,WAAW;4BACpB,WAAW,EAAE,OAAO,KAAK,OAAO;4BAChC,YAAY,EAAE,UAAU;yBACzB;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,KAAc;YAEvB,SAAS,CAAC,IAAY,EAAE,EAAU;gBAChC,IAAI,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;oBAAE,OAAO;gBACxC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;oBAAE,OAAO;gBACpC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;oBAAE,OAAO;gBAE5C,MAAM,QAAQ,GA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ACzC,CAAC,GAAG,CAAC,CAAC;gBACR,CAAC;gBAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;YACrC,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/src/BaseView.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { JSS, toClassnames } from "./jss";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const styles: { [key: string]: JSS } = {
|
|
5
5
|
relative: {
|
|
6
6
|
position: "relative",
|
|
7
7
|
},
|
|
@@ -44,9 +44,9 @@ export const BaseView = React.forwardRef(
|
|
|
44
44
|
ref={ref}
|
|
45
45
|
className={toClassnames([
|
|
46
46
|
jss,
|
|
47
|
-
grow &&
|
|
48
|
-
shrink &&
|
|
49
|
-
relative &&
|
|
47
|
+
grow && styles.grow,
|
|
48
|
+
shrink && styles.shrink,
|
|
49
|
+
relative && styles.relative,
|
|
50
50
|
])}
|
|
51
51
|
{...otherProps}
|
|
52
52
|
>
|
package/src/Calendar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
1
|
+
import React, { cloneElement, useMemo } from "react";
|
|
2
2
|
import { BaseView } from "./BaseView";
|
|
3
3
|
import { JSS } from "./jss";
|
|
4
4
|
|
|
@@ -78,18 +78,17 @@ export const Calendar = React.forwardRef(
|
|
|
78
78
|
index + 1 - offset
|
|
79
79
|
);
|
|
80
80
|
|
|
81
|
-
return (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</React.Fragment>
|
|
81
|
+
return cloneElement(
|
|
82
|
+
cell({
|
|
83
|
+
date: dayDate,
|
|
84
|
+
today: false,
|
|
85
|
+
top: true,
|
|
86
|
+
left: index % 7 === 0,
|
|
87
|
+
outOfMonth: true,
|
|
88
|
+
right: false,
|
|
89
|
+
bottom: false,
|
|
90
|
+
}),
|
|
91
|
+
{ key: dayDate.toISOString() }
|
|
93
92
|
);
|
|
94
93
|
})}
|
|
95
94
|
|
|
@@ -101,22 +100,21 @@ export const Calendar = React.forwardRef(
|
|
|
101
100
|
12 // If we do not add this the ISO string would be from the day before at midnight
|
|
102
101
|
);
|
|
103
102
|
|
|
104
|
-
return (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</React.Fragment>
|
|
103
|
+
return cloneElement(
|
|
104
|
+
cell({
|
|
105
|
+
date: dayDate,
|
|
106
|
+
top: index + offset < 7,
|
|
107
|
+
left: (index + offset) % 7 === 0,
|
|
108
|
+
right:
|
|
109
|
+
(index + offset) % 7 === 7 - 1 || index === daysInMonth - 1,
|
|
110
|
+
bottom: index > daysInMonth - 7 - 1,
|
|
111
|
+
outOfMonth: false,
|
|
112
|
+
today:
|
|
113
|
+
dayDate.getDate() == new Date().getDate() &&
|
|
114
|
+
dayDate.getMonth() == new Date().getMonth() &&
|
|
115
|
+
dayDate.getFullYear() == new Date().getFullYear(),
|
|
116
|
+
}),
|
|
117
|
+
{ key: dayDate.toISOString() }
|
|
120
118
|
);
|
|
121
119
|
})}
|
|
122
120
|
</BaseView>
|
package/src/DateInput.tsx
CHANGED
package/src/DatePicker.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useRef } from "react";
|
|
|
2
2
|
import { Text } from "./Text";
|
|
3
3
|
import { TextColor, toClassnames } from "./jss";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const styles = {
|
|
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={toClassnames(
|
|
50
|
+
className={toClassnames(styles.dateInput)}
|
|
51
51
|
type="date"
|
|
52
52
|
id={id}
|
|
53
53
|
value={date.toISOString().substring(0, 10)}
|
package/src/DatetimeInput.tsx
CHANGED
|
@@ -15,7 +15,7 @@ export interface DatetimeInputProps extends BaseInputProps {
|
|
|
15
15
|
jss?: JSS;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const styles = {
|
|
19
19
|
root: {
|
|
20
20
|
backgroundColor: "var(--primary-background)",
|
|
21
21
|
},
|
|
@@ -43,7 +43,7 @@ export const DatetimeInput = React.forwardRef(
|
|
|
43
43
|
ref?: React.Ref<HTMLInputElement>
|
|
44
44
|
) => {
|
|
45
45
|
return (
|
|
46
|
-
<Row jss={
|
|
46
|
+
<Row jss={styles.root}>
|
|
47
47
|
{icon && (
|
|
48
48
|
<Box padding="medium">
|
|
49
49
|
<Icon size="medium" color="secondary" icon={icon} />
|
|
@@ -55,7 +55,7 @@ export const DatetimeInput = React.forwardRef(
|
|
|
55
55
|
ref={ref}
|
|
56
56
|
value={date.toISOString().substring(0, 16)}
|
|
57
57
|
onChange={(e) => onDateChange(new Date(e.target.value))}
|
|
58
|
-
jss={[
|
|
58
|
+
jss={[styles.input, jss]}
|
|
59
59
|
/>
|
|
60
60
|
{addOn}
|
|
61
61
|
</Row>
|
package/src/Dialog.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { Row } from "./Row";
|
|
|
8
8
|
import { IconButton } from "./IconButton";
|
|
9
9
|
import { toClassnames } from "./jss";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const styles = {
|
|
12
12
|
dialog: {
|
|
13
13
|
border: "1px solid var(--divider)",
|
|
14
14
|
borderRadius: "var(--border-radius-l)",
|
|
@@ -50,8 +50,8 @@ export const Dialog = ({
|
|
|
50
50
|
close: () => void;
|
|
51
51
|
}) => {
|
|
52
52
|
return (
|
|
53
|
-
<BaseView jss={
|
|
54
|
-
<Column jss={
|
|
53
|
+
<BaseView jss={styles.root}>
|
|
54
|
+
<Column jss={styles.header}>
|
|
55
55
|
<Row padding="medium" justify="space-between" align="center">
|
|
56
56
|
<Text size="medium" color="secondary">
|
|
57
57
|
{label}
|
|
@@ -67,7 +67,7 @@ export const Dialog = ({
|
|
|
67
67
|
</Row>
|
|
68
68
|
<ListDivider />
|
|
69
69
|
</Column>
|
|
70
|
-
<BaseView jss={
|
|
70
|
+
<BaseView jss={styles.content}>{children}</BaseView>
|
|
71
71
|
</BaseView>
|
|
72
72
|
);
|
|
73
73
|
};
|
|
@@ -113,7 +113,7 @@ export function useDialog<Input>(
|
|
|
113
113
|
dialogRef.current = ref;
|
|
114
114
|
ref && ref.showModal();
|
|
115
115
|
}}
|
|
116
|
-
className={toClassnames(
|
|
116
|
+
className={toClassnames(styles.dialog)}
|
|
117
117
|
onClose={() => {
|
|
118
118
|
closeRef.current();
|
|
119
119
|
}}
|
package/src/Dropdown.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { useNavigation } from "./useNavigation";
|
|
|
7
7
|
import { useRefEffect } from "./useRefEffect";
|
|
8
8
|
import { Gap, JSS, Padding, Size, getBackground } from "./jss";
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const styles: { [key: string]: JSS } = {
|
|
11
11
|
root: {
|
|
12
12
|
position: "relative",
|
|
13
13
|
display: "flex",
|
|
@@ -76,7 +76,7 @@ export function Dropdown<T extends string | number>({
|
|
|
76
76
|
}, [expanded]);
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
|
-
<BaseView ref={rootRef} jss={[
|
|
79
|
+
<BaseView ref={rootRef} jss={[styles.root, jss]}>
|
|
80
80
|
<Button
|
|
81
81
|
size={size}
|
|
82
82
|
padding={padding}
|
|
@@ -87,7 +87,7 @@ export function Dropdown<T extends string | number>({
|
|
|
87
87
|
role="combobox"
|
|
88
88
|
justify="space-between"
|
|
89
89
|
tabIndex={0}
|
|
90
|
-
jss={[
|
|
90
|
+
jss={[styles.button, jssButton]}
|
|
91
91
|
color="positive"
|
|
92
92
|
icon="fa-chevron-down"
|
|
93
93
|
iconPosition="right"
|
|
@@ -101,7 +101,7 @@ export function Dropdown<T extends string | number>({
|
|
|
101
101
|
{expanded && (
|
|
102
102
|
<Column
|
|
103
103
|
gap={gap}
|
|
104
|
-
jss={[
|
|
104
|
+
jss={[styles.dropdown, getBackground("secondary-background")]}
|
|
105
105
|
id={id}
|
|
106
106
|
role="listbox"
|
|
107
107
|
aria-label={label}
|
package/src/Icon.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { BaseView } from "./BaseView";
|
|
|
4
4
|
import { IconType } from "./IconType";
|
|
5
5
|
import { Size, TextColor, getTextColor } from "./jss";
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const styles = {
|
|
8
8
|
root: {
|
|
9
9
|
display: "flex",
|
|
10
10
|
justifyContent: "center",
|
|
@@ -63,14 +63,14 @@ export function Icon({
|
|
|
63
63
|
<BaseView
|
|
64
64
|
aria-label={ariaLabel}
|
|
65
65
|
jss={[
|
|
66
|
-
|
|
67
|
-
size === "xsmall" &&
|
|
68
|
-
size === "small" &&
|
|
69
|
-
size === "medium" &&
|
|
70
|
-
size === "large" &&
|
|
71
|
-
size === "xlarge" &&
|
|
72
|
-
size === "xxlarge" &&
|
|
73
|
-
size === "xxxlarge" &&
|
|
66
|
+
styles.root,
|
|
67
|
+
size === "xsmall" && styles.xsmall,
|
|
68
|
+
size === "small" && styles.small,
|
|
69
|
+
size === "medium" && styles.medium,
|
|
70
|
+
size === "large" && styles.large,
|
|
71
|
+
size === "xlarge" && styles.xlarge,
|
|
72
|
+
size === "xxlarge" && styles.xxlarge,
|
|
73
|
+
size === "xxxlarge" && styles.xxxlarge,
|
|
74
74
|
getTextColor(color),
|
|
75
75
|
]}
|
|
76
76
|
>
|
package/src/IconButton.tsx
CHANGED
|
@@ -4,28 +4,46 @@ import { Icon } from "./Icon";
|
|
|
4
4
|
import { IconType } from "./IconType";
|
|
5
5
|
import { getGlyphColor } from "./Interactable";
|
|
6
6
|
import { Size } from "./jss";
|
|
7
|
+
import { Span } from "./Text";
|
|
7
8
|
|
|
8
|
-
const sizes
|
|
9
|
+
const sizes: {
|
|
10
|
+
[key in Size]: number;
|
|
11
|
+
} = {
|
|
9
12
|
xsmall: 20,
|
|
10
13
|
small: 24,
|
|
11
14
|
medium: 32,
|
|
12
15
|
large: 40,
|
|
13
16
|
xlarge: 48,
|
|
17
|
+
xxlarge: 56,
|
|
18
|
+
xxxlarge: 64,
|
|
14
19
|
};
|
|
15
20
|
|
|
16
21
|
export interface IconButtonProps extends BaseButtonProps {
|
|
17
22
|
icon: IconType;
|
|
18
23
|
size: Size;
|
|
24
|
+
label?: string;
|
|
25
|
+
labelSize?: Size;
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
export const IconButton = React.forwardRef(
|
|
22
29
|
(
|
|
23
|
-
{
|
|
30
|
+
{
|
|
31
|
+
icon,
|
|
32
|
+
size,
|
|
33
|
+
color,
|
|
34
|
+
bare,
|
|
35
|
+
disabled,
|
|
36
|
+
jss,
|
|
37
|
+
label,
|
|
38
|
+
labelSize = "medium",
|
|
39
|
+
...buttonProps
|
|
40
|
+
}: IconButtonProps,
|
|
24
41
|
ref?: React.Ref<HTMLButtonElement>
|
|
25
42
|
) => {
|
|
26
43
|
return (
|
|
27
44
|
<BaseButton
|
|
28
45
|
{...buttonProps}
|
|
46
|
+
aria-label={buttonProps["aria-label"] ?? label}
|
|
29
47
|
bare={bare}
|
|
30
48
|
jss={[
|
|
31
49
|
{
|
|
@@ -52,6 +70,11 @@ export const IconButton = React.forwardRef(
|
|
|
52
70
|
icon={icon}
|
|
53
71
|
color={getGlyphColor(color, disabled, bare)}
|
|
54
72
|
/>
|
|
73
|
+
{label && (
|
|
74
|
+
<Span size={labelSize} color={getGlyphColor(color, disabled, bare)}>
|
|
75
|
+
{label}
|
|
76
|
+
</Span>
|
|
77
|
+
)}
|
|
55
78
|
</BaseButton>
|
|
56
79
|
);
|
|
57
80
|
}
|
package/src/Interactable.tsx
CHANGED
|
@@ -7,7 +7,7 @@ export type InteractableColor =
|
|
|
7
7
|
| "dark"
|
|
8
8
|
| "light";
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const styles = {
|
|
11
11
|
root: {
|
|
12
12
|
cursor: "pointer",
|
|
13
13
|
display: "inline-flex",
|
|
@@ -94,18 +94,18 @@ export function getInteractableJSS({
|
|
|
94
94
|
border: boolean;
|
|
95
95
|
}): Array<JSS> {
|
|
96
96
|
return [
|
|
97
|
-
|
|
98
|
-
color === "dark" &&
|
|
99
|
-
color === "light" &&
|
|
100
|
-
color === "positive" &&
|
|
101
|
-
color === "primary" &&
|
|
102
|
-
color === "negative" &&
|
|
97
|
+
styles.root,
|
|
98
|
+
color === "dark" && styles.dark,
|
|
99
|
+
color === "light" && styles.light,
|
|
100
|
+
color === "positive" && styles.positive,
|
|
101
|
+
color === "primary" && styles.primary,
|
|
102
|
+
color === "negative" && styles.negative,
|
|
103
103
|
border && {
|
|
104
104
|
border: `1px solid ${getCSSColor(color, disabled, bare)}`,
|
|
105
105
|
},
|
|
106
|
-
bare &&
|
|
107
|
-
disabled &&
|
|
108
|
-
!bare &&
|
|
106
|
+
bare && styles.bare,
|
|
107
|
+
disabled && styles.disabled,
|
|
108
|
+
!bare && styles.opacityHover,
|
|
109
109
|
animateInteraction &&
|
|
110
110
|
!disabled && {
|
|
111
111
|
position: "relative",
|
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 styles = {
|
|
5
5
|
root: {
|
|
6
6
|
width: "100%",
|
|
7
7
|
borderBottom: "1px solid var(--divider)",
|
|
@@ -9,5 +9,5 @@ const jsss = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export function ListDivider() {
|
|
12
|
-
return <BaseView jss={
|
|
12
|
+
return <BaseView jss={styles.root} />;
|
|
13
13
|
}
|
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 styles = {
|
|
5
5
|
root: {
|
|
6
6
|
height: "var(--spacing-xl)",
|
|
7
7
|
backgroundColor: "var(--secondary-background)",
|
|
@@ -10,5 +10,5 @@ const jsss = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export function ListSpacer() {
|
|
13
|
-
return <BaseView jss={
|
|
13
|
+
return <BaseView jss={styles.root} />;
|
|
14
14
|
}
|
package/src/NextJSRouter.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { BaseView } from "./BaseView";
|
|
|
7
7
|
import { useRouterState } from "./NextJSRouterState";
|
|
8
8
|
import { JSS } from "./jss";
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const styles: { [key: string]: JSS } = {
|
|
11
11
|
root: {
|
|
12
12
|
display: "flex",
|
|
13
13
|
flexDirection: "column",
|
|
@@ -36,25 +36,23 @@ export function Router() {
|
|
|
36
36
|
} = useRouterState();
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
|
-
<BaseView jss={
|
|
39
|
+
<BaseView jss={styles.root}>
|
|
40
40
|
{navigationStack.map(({ route, routeProps }, index, list) => {
|
|
41
41
|
const isTopOfStack = index === list.length - 1;
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
|
-
<
|
|
44
|
+
<Column
|
|
45
45
|
key={route.title(routeProps)}
|
|
46
|
-
|
|
46
|
+
jss={[styles.route, !isTopOfStack && styles.hidden]}
|
|
47
|
+
aria-hidden={!isTopOfStack}
|
|
47
48
|
>
|
|
48
|
-
<
|
|
49
|
-
jss={[jsss.route, !isTopOfStack && jsss.hidden]}
|
|
50
|
-
aria-hidden={!isTopOfStack}
|
|
51
|
-
>
|
|
49
|
+
<StackContextProvider isTopOfStack={isTopOfStack}>
|
|
52
50
|
<ListDivider />
|
|
53
51
|
<Suspense fallback={null}>
|
|
54
52
|
<route.root {...routeProps} />
|
|
55
53
|
</Suspense>
|
|
56
|
-
</
|
|
57
|
-
</
|
|
54
|
+
</StackContextProvider>
|
|
55
|
+
</Column>
|
|
58
56
|
);
|
|
59
57
|
})}
|
|
60
58
|
</BaseView>
|
package/src/Popover.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { BaseView } from "./BaseView";
|
|
|
5
5
|
import { useRefEffect } from "./useRefEffect";
|
|
6
6
|
import { JSS, toClassnames } from "./jss";
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const styles: { [key: string]: JSS } = {
|
|
9
9
|
popover: {
|
|
10
10
|
padding: 0,
|
|
11
11
|
zIndex: 1,
|
|
@@ -129,7 +129,7 @@ export function PopoverTrigger<Input>({
|
|
|
129
129
|
ref={(ref: null | HTMLDialogElement) => {
|
|
130
130
|
dialogRef.current = ref;
|
|
131
131
|
}}
|
|
132
|
-
className={toClassnames([
|
|
132
|
+
className={toClassnames([styles.popover, jssDialog])}
|
|
133
133
|
onClose={() => {
|
|
134
134
|
setPopover(null);
|
|
135
135
|
}}
|
package/src/ProgressBar.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { BaseView } from "./BaseView";
|
|
3
3
|
import { Color, Size, JSS, getBackground } from "./jss";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const styles: { [key: string]: JSS } = {
|
|
6
6
|
root: {
|
|
7
7
|
width: "100%",
|
|
8
8
|
display: "flex",
|
|
@@ -45,7 +45,7 @@ export function ProgressBar({
|
|
|
45
45
|
return (
|
|
46
46
|
<BaseView
|
|
47
47
|
jss={[
|
|
48
|
-
|
|
48
|
+
styles.root,
|
|
49
49
|
{
|
|
50
50
|
height: sizes[size],
|
|
51
51
|
},
|
|
@@ -53,7 +53,7 @@ export function ProgressBar({
|
|
|
53
53
|
]}
|
|
54
54
|
>
|
|
55
55
|
<BaseView
|
|
56
|
-
jss={[
|
|
56
|
+
jss={[styles.fill, getBackground(color)]}
|
|
57
57
|
style={{
|
|
58
58
|
transform: `scaleX(${progress > 1 ? 1 : progress})`,
|
|
59
59
|
}}
|
package/src/StaticCheckbox.tsx
CHANGED
|
@@ -10,7 +10,7 @@ type StaticCheckboxProps = {
|
|
|
10
10
|
icon?: IconType;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const styles: { [key: string]: JSS } = {
|
|
14
14
|
border: {
|
|
15
15
|
position: "absolute",
|
|
16
16
|
top: "var(--spacing-xs)",
|
|
@@ -61,9 +61,9 @@ export function StaticCheckbox({
|
|
|
61
61
|
width: sizes[size],
|
|
62
62
|
}}
|
|
63
63
|
>
|
|
64
|
-
<BaseView jss={[
|
|
64
|
+
<BaseView jss={[styles.border, checked && styles.borderChecked]} />
|
|
65
65
|
{checked && (
|
|
66
|
-
<BaseView jss={
|
|
66
|
+
<BaseView jss={styles.icon}>
|
|
67
67
|
<Icon size={size} color="light" icon={icon} />
|
|
68
68
|
</BaseView>
|
|
69
69
|
)}
|
package/src/Tooltip.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { useRefEffect } from "./useRefEffect";
|
|
|
5
5
|
import { Text } from "./Text";
|
|
6
6
|
import { JSS, cssVar, toClassnames } from "./jss";
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const styles: { [key: string]: JSS } = {
|
|
9
9
|
tooltip: {
|
|
10
10
|
top: "-100%",
|
|
11
11
|
transform: "translateY(50%)",
|
|
@@ -67,7 +67,7 @@ export function Tooltip({ content, jss, tag, children }: TooltipProps) {
|
|
|
67
67
|
dialogRef.current = ref;
|
|
68
68
|
focusTrapRoot(ref);
|
|
69
69
|
}}
|
|
70
|
-
className={toClassnames(
|
|
70
|
+
className={toClassnames(styles.tooltip)}
|
|
71
71
|
onClose={() => {
|
|
72
72
|
setTooltip(null);
|
|
73
73
|
}}
|
|
@@ -17,12 +17,14 @@ export default function jssDebug() {
|
|
|
17
17
|
return [
|
|
18
18
|
{
|
|
19
19
|
name: "jss-debug-jsx",
|
|
20
|
-
config() {
|
|
20
|
+
config(_config: unknown, { command }: { command: string }) {
|
|
21
21
|
return {
|
|
22
|
-
|
|
23
|
-
jsx:
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
oxc: {
|
|
23
|
+
jsx: {
|
|
24
|
+
runtime: "automatic",
|
|
25
|
+
development: command === "serve",
|
|
26
|
+
importSource: "aidos-ui",
|
|
27
|
+
},
|
|
26
28
|
},
|
|
27
29
|
};
|
|
28
30
|
},
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(npm publish:*)",
|
|
5
|
-
"Bash(npm whoami:*)",
|
|
6
|
-
"Bash(npm run dev:*)",
|
|
7
|
-
"Bash(npx npm-check-updates:*)",
|
|
8
|
-
"Bash(npm install:*)",
|
|
9
|
-
"Bash(npm run build:lib:*)",
|
|
10
|
-
"Bash(npm run build:*)",
|
|
11
|
-
"Bash(npm ls:*)",
|
|
12
|
-
"Bash(npm show:*)",
|
|
13
|
-
"Bash(npm info:*)",
|
|
14
|
-
"WebFetch(domain:iconify.design)",
|
|
15
|
-
"Bash(ls:*)",
|
|
16
|
-
"Bash(xargs basename:*)",
|
|
17
|
-
"Bash(pkill:*)",
|
|
18
|
-
"Bash(npx tsc:*)",
|
|
19
|
-
"WebSearch"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|