@serendie/ui 2.1.3-dev.202509030422 → 2.1.3-dev.202509170003
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/client.js +60 -57
- package/dist/components/Button/Button.js +22 -21
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.js +4 -2
- package/dist/components/DatePicker/parseDate.d.ts +1 -0
- package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
- package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
- package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
- package/dist/components/ProgressIndicator/index.d.ts +4 -1
- package/dist/components/ProgressIndicator/index.js +3 -2
- package/dist/components/ProgressIndicator/util.d.ts +1 -0
- package/dist/components/ProgressIndicator/util.js +13 -0
- package/dist/index.js +56 -53
- package/dist/node_modules/@internationalized/date/dist/conversion.js +9 -9
- package/dist/node_modules/@internationalized/date/dist/string.js +30 -16
- package/dist/node_modules/@zag-js/date-picker/dist/index.js +333 -327
- package/dist/preset.d.ts +8 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/keyframes/index.d.ts +8 -0
- package/dist/tokens/keyframes/index.js +6 -2
- package/package.json +1 -1
- package/styled-system/types/prop-type.d.ts +1 -1
package/dist/client.js
CHANGED
|
@@ -3,13 +3,13 @@ import { SerendiePreset as e } from "./preset.js";
|
|
|
3
3
|
import { Accordion as a } from "./components/Accordion/Accordion.js";
|
|
4
4
|
import { AccordionGroup as m } from "./components/Accordion/AccordionGroup.js";
|
|
5
5
|
import { Avatar as x, AvatarStyle as n } from "./components/Avatar/Avatar.js";
|
|
6
|
-
import { Badge as
|
|
6
|
+
import { Badge as s, BadgeCloseButton as c, BadgeStyle as d } from "./components/Badge/Badge.js";
|
|
7
7
|
import { Banner as h } from "./components/Banner/Banner.js";
|
|
8
8
|
import { BottomNavigation as S } from "./components/BottomNavigation/BottomNavigation.js";
|
|
9
|
-
import { BottomNavigationItem as g, BottomNavigationItemStyle as
|
|
9
|
+
import { BottomNavigationItem as g, BottomNavigationItemStyle as u } from "./components/BottomNavigation/BottomNavigationItem.js";
|
|
10
10
|
import { Button as I, ButtonStyle as T } from "./components/Button/Button.js";
|
|
11
|
-
import { SerendieChartTheme as
|
|
12
|
-
import { compactChartMargin as
|
|
11
|
+
import { SerendieChartTheme as D } from "./components/Chart/SerendieChartTheme.js";
|
|
12
|
+
import { compactChartMargin as k, defaultChartMargin as v, getChartColor as M, getChartColors as w, legendChartMargin as A, spaciousChartMargin as L, useBarChartProps as N, useChartProps as R, useLineChartProps as F, usePieChartProps as G } from "./components/Chart/SerendieChartProps.js";
|
|
13
13
|
import { CheckBox as W, CheckBoxStyle as j, checkboxCheckedIconCss as q, checkboxIconCss as z, checkboxUncheckedIconCss as E } from "./components/CheckBox/CheckBox.js";
|
|
14
14
|
import { ChoiceBox as J, ChoiceBoxStyle as K } from "./components/ChoiceBox/ChoiceBox.js";
|
|
15
15
|
import { DashboardWidget as Q } from "./components/DashboardWidget/DashboardWidget.js";
|
|
@@ -19,38 +19,40 @@ import { Divider as $, DividerStyle as oo } from "./components/Divider/Divider.j
|
|
|
19
19
|
import { Drawer as eo } from "./components/Drawer/Drawer.js";
|
|
20
20
|
import { DropdownMenu as ao, DropdownMenuStyle as po } from "./components/DropdownMenu/DropdownMenu.js";
|
|
21
21
|
import { IconButton as io, IconButtonStyle as xo } from "./components/IconButton/IconButton.js";
|
|
22
|
-
import { List as
|
|
23
|
-
import { ListItem as
|
|
22
|
+
import { List as fo } from "./components/List/List.js";
|
|
23
|
+
import { ListItem as co, ListItemStyle as lo } from "./components/List/ListItem.js";
|
|
24
24
|
import { ModalDialog as Co } from "./components/ModalDialog/ModalDialog.js";
|
|
25
25
|
import { NotificationBadge as Bo } from "./components/NotificationBadge/NotificationBadge.js";
|
|
26
|
-
import { Pagination as
|
|
26
|
+
import { Pagination as uo, PaginationStyle as yo } from "./components/Pagination/Pagination.js";
|
|
27
27
|
import { PasswordField as To } from "./components/PasswordField/PasswordField.js";
|
|
28
|
-
import { ProgressIndicator as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
28
|
+
import { ProgressIndicator as Do } from "./components/ProgressIndicator/ProgressIndicator.js";
|
|
29
|
+
import { ProgressIndicatorIndeterminate as ko } from "./components/ProgressIndicator/ProgressIndicatorIndeterminate.js";
|
|
30
|
+
import { RadioButton as Mo, RadioButtonStyle as wo, radioCheckedIconCss as Ao, radioIconCss as Lo, radioUncheckedIconCss as No } from "./components/RadioButton/RadioButton.js";
|
|
31
|
+
import { RadioGroup as Fo } from "./components/RadioButton/RadioGroup.js";
|
|
32
|
+
import { Search as Uo, SearchStyle as Wo } from "./components/Search/Search.js";
|
|
33
|
+
import { Select as qo, SelectStyle as zo } from "./components/Select/Select.js";
|
|
34
|
+
import { Switch as Ho, SwitchStyle as Jo } from "./components/Switch/Switch.js";
|
|
35
|
+
import { Tabs as Oo, TabsStyle as Qo } from "./components/Tabs/Tabs.js";
|
|
36
|
+
import { TabItem as Xo, TabItemStyle as Yo } from "./components/Tabs/TabItem.js";
|
|
37
|
+
import { TextArea as _o } from "./components/TextArea/TextArea.js";
|
|
38
|
+
import { TextField as or } from "./components/TextField/TextField.js";
|
|
39
|
+
import { Toast as er, ToastStyle as tr, toaster as ar } from "./components/Toast/Toast.js";
|
|
40
|
+
import { Tooltip as mr } from "./components/Tooltip/Tooltip.js";
|
|
41
|
+
import { TopAppBar as xr } from "./components/TopAppBar/TopAppBar.js";
|
|
42
|
+
import { DataTableComponent as fr } from "./components/DataTable/DataTableComponent.js";
|
|
43
|
+
import { parse as cr } from "./node_modules/@zag-js/date-picker/dist/index.js";
|
|
42
44
|
export {
|
|
43
45
|
a as Accordion,
|
|
44
46
|
m as AccordionGroup,
|
|
45
47
|
x as Avatar,
|
|
46
48
|
n as AvatarStyle,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
s as Badge,
|
|
50
|
+
c as BadgeCloseButton,
|
|
51
|
+
d as BadgeStyle,
|
|
50
52
|
h as Banner,
|
|
51
53
|
S as BottomNavigation,
|
|
52
54
|
g as BottomNavigationItem,
|
|
53
|
-
|
|
55
|
+
u as BottomNavigationItemStyle,
|
|
54
56
|
I as Button,
|
|
55
57
|
T as ButtonStyle,
|
|
56
58
|
W as CheckBox,
|
|
@@ -59,7 +61,7 @@ export {
|
|
|
59
61
|
K as ChoiceBoxStyle,
|
|
60
62
|
Q as DashboardWidget,
|
|
61
63
|
X as DataTable,
|
|
62
|
-
|
|
64
|
+
fr as DataTableComponent,
|
|
63
65
|
Z as DatePicker,
|
|
64
66
|
$ as Divider,
|
|
65
67
|
oo as DividerStyle,
|
|
@@ -68,50 +70,51 @@ export {
|
|
|
68
70
|
po as DropdownMenuStyle,
|
|
69
71
|
io as IconButton,
|
|
70
72
|
xo as IconButtonStyle,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
fo as List,
|
|
74
|
+
co as ListItem,
|
|
73
75
|
lo as ListItemStyle,
|
|
74
76
|
Co as ModalDialog,
|
|
75
77
|
Bo as NotificationBadge,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
uo as Pagination,
|
|
79
|
+
yo as PaginationStyle,
|
|
78
80
|
To as PasswordField,
|
|
79
|
-
|
|
80
|
-
ko as
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
Do as ProgressIndicator,
|
|
82
|
+
ko as ProgressIndicatorIndeterminate,
|
|
83
|
+
Mo as RadioButton,
|
|
84
|
+
wo as RadioButtonStyle,
|
|
85
|
+
Fo as RadioGroup,
|
|
86
|
+
Uo as Search,
|
|
87
|
+
Wo as SearchStyle,
|
|
88
|
+
qo as Select,
|
|
89
|
+
zo as SelectStyle,
|
|
90
|
+
D as SerendieChartTheme,
|
|
89
91
|
e as SerendiePreset,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
92
|
+
Ho as Switch,
|
|
93
|
+
Jo as SwitchStyle,
|
|
94
|
+
Xo as TabItem,
|
|
95
|
+
Yo as TabItemStyle,
|
|
96
|
+
Oo as Tabs,
|
|
97
|
+
Qo as TabsStyle,
|
|
98
|
+
_o as TextArea,
|
|
99
|
+
or as TextField,
|
|
100
|
+
er as Toast,
|
|
101
|
+
tr as ToastStyle,
|
|
102
|
+
mr as Tooltip,
|
|
103
|
+
xr as TopAppBar,
|
|
102
104
|
q as checkboxCheckedIconCss,
|
|
103
105
|
z as checkboxIconCss,
|
|
104
106
|
E as checkboxUncheckedIconCss,
|
|
105
|
-
|
|
107
|
+
k as compactChartMargin,
|
|
106
108
|
v as defaultChartMargin,
|
|
107
109
|
M as getChartColor,
|
|
108
110
|
w as getChartColors,
|
|
109
111
|
A as legendChartMargin,
|
|
110
|
-
|
|
111
|
-
Ao as
|
|
112
|
-
Lo as
|
|
112
|
+
cr as parseDate,
|
|
113
|
+
Ao as radioCheckedIconCss,
|
|
114
|
+
Lo as radioIconCss,
|
|
115
|
+
No as radioUncheckedIconCss,
|
|
113
116
|
L as spaciousChartMargin,
|
|
114
|
-
|
|
117
|
+
ar as toaster,
|
|
115
118
|
N as useBarChartProps,
|
|
116
119
|
R as useChartProps,
|
|
117
120
|
F as useLineChartProps,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
1
|
+
import { jsxs as g, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import b from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { ProgressIndicatorIndeterminate as f } from "../ProgressIndicator/ProgressIndicatorIndeterminate.js";
|
|
4
4
|
import { cva as h } from "../../styled-system/css/cva.js";
|
|
5
5
|
import { css as x } from "../../styled-system/css/css.js";
|
|
6
6
|
import { cx as _ } from "../../styled-system/css/cx.js";
|
|
7
7
|
import { styled as v } from "../../styled-system/jsx/factory.js";
|
|
8
|
-
const
|
|
8
|
+
const d = {
|
|
9
9
|
color: "sd.system.color.component.onSurface",
|
|
10
10
|
outlineWidth: "sd.system.dimension.border.medium",
|
|
11
11
|
outlineStyle: "solid",
|
|
@@ -25,7 +25,7 @@ const r = {
|
|
|
25
25
|
color: "sd.system.color.interaction.disabledOnSurface",
|
|
26
26
|
outline: "none"
|
|
27
27
|
}
|
|
28
|
-
},
|
|
28
|
+
}, a = h({
|
|
29
29
|
base: {
|
|
30
30
|
borderRadius: "sd.system.dimension.radius.full",
|
|
31
31
|
position: "relative",
|
|
@@ -87,9 +87,9 @@ const r = {
|
|
|
87
87
|
color: "sd.system.color.interaction.disabledOnSurface"
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
-
outlined:
|
|
90
|
+
outlined: d,
|
|
91
91
|
rectangle: {
|
|
92
|
-
...
|
|
92
|
+
...d,
|
|
93
93
|
borderRadius: "sd.system.dimension.radius.medium"
|
|
94
94
|
}
|
|
95
95
|
},
|
|
@@ -118,18 +118,18 @@ const r = {
|
|
|
118
118
|
styleType: "filled",
|
|
119
119
|
size: "medium"
|
|
120
120
|
}
|
|
121
|
-
}),
|
|
121
|
+
}), i = v("span", {
|
|
122
122
|
base: {
|
|
123
123
|
position: "relative",
|
|
124
124
|
zIndex: "sd.system.elevation.zIndex.base"
|
|
125
125
|
}
|
|
126
|
-
}),
|
|
127
|
-
(
|
|
126
|
+
}), R = b.forwardRef(
|
|
127
|
+
(n, l) => {
|
|
128
128
|
const [
|
|
129
|
-
|
|
129
|
+
r,
|
|
130
130
|
{ children: m, leftIcon: e, rightIcon: s, isLoading: t, className: c, ...y }
|
|
131
|
-
] =
|
|
132
|
-
e || s ?
|
|
131
|
+
] = a.splitVariantProps(n), p = a(r), u = x(
|
|
132
|
+
e || s ? n.size === "medium" ? {
|
|
133
133
|
//アイコンがある側 `spacing.medium`、無い側は`spacing.extraLarge`
|
|
134
134
|
paddingLeft: e ? "sd.system.dimension.spacing.medium" : "sd.system.dimension.spacing.extraLarge",
|
|
135
135
|
paddingRight: s ? "sd.system.dimension.spacing.medium" : "sd.system.dimension.spacing.extraLarge"
|
|
@@ -142,26 +142,27 @@ const r = {
|
|
|
142
142
|
return /* @__PURE__ */ g(
|
|
143
143
|
"button",
|
|
144
144
|
{
|
|
145
|
-
ref:
|
|
145
|
+
ref: l,
|
|
146
146
|
className: _(p, u, c),
|
|
147
147
|
...y,
|
|
148
148
|
children: [
|
|
149
|
-
t && /* @__PURE__ */
|
|
149
|
+
t && /* @__PURE__ */ o(
|
|
150
150
|
f,
|
|
151
151
|
{
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
type: "circular",
|
|
153
|
+
size: r.size || "medium",
|
|
154
|
+
color: "subtle"
|
|
154
155
|
}
|
|
155
156
|
),
|
|
156
|
-
!t && e && /* @__PURE__ */ i
|
|
157
|
-
/* @__PURE__ */ i
|
|
158
|
-
!t && s && /* @__PURE__ */ i
|
|
157
|
+
!t && e && /* @__PURE__ */ o(i, { p: "2px", children: e }),
|
|
158
|
+
/* @__PURE__ */ o(i, { children: m }),
|
|
159
|
+
!t && s && /* @__PURE__ */ o(i, { p: "2px", children: s })
|
|
159
160
|
]
|
|
160
161
|
}
|
|
161
162
|
);
|
|
162
163
|
}
|
|
163
164
|
);
|
|
164
165
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
R as Button,
|
|
167
|
+
a as ButtonStyle
|
|
167
168
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parseDate } from '@ark-ui/react/date-picker';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { describeArc as R } from "./util.js";
|
|
4
|
+
const h = 2.5, S = ({ className: f, radius: o, width: c }) => {
|
|
5
|
+
const [t, i] = n.useState(0), s = n.useRef(null), a = n.useRef(null);
|
|
6
|
+
n.useEffect(() => {
|
|
7
|
+
const e = (r) => {
|
|
8
|
+
s.current == null && (s.current = r);
|
|
9
|
+
const u = (r - s.current) / 1e3;
|
|
10
|
+
s.current = r;
|
|
11
|
+
const m = u / h;
|
|
12
|
+
i((p) => (p + m) % 1), a.current = requestAnimationFrame(e);
|
|
13
|
+
};
|
|
14
|
+
return a.current = requestAnimationFrame(e), () => {
|
|
15
|
+
a.current != null && cancelAnimationFrame(a.current);
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
const { d: l, rotationDeg: d } = n.useMemo(() => {
|
|
19
|
+
const e = t * Math.PI * 2, r = 180 + 40 * Math.sin(-e) + 40, u = 90 * Math.sin(e) + 90;
|
|
20
|
+
return { d: R(
|
|
21
|
+
o + c,
|
|
22
|
+
// cx
|
|
23
|
+
o + c,
|
|
24
|
+
// cy
|
|
25
|
+
o,
|
|
26
|
+
// r
|
|
27
|
+
t * 360 + u,
|
|
28
|
+
t * 360 + r
|
|
29
|
+
), rotationDeg: t * 360 };
|
|
30
|
+
}, [t, o, c]);
|
|
31
|
+
return /* @__PURE__ */ A(
|
|
32
|
+
"path",
|
|
33
|
+
{
|
|
34
|
+
d: l,
|
|
35
|
+
transform: `rotate(${d})`,
|
|
36
|
+
strokeLinecap: "butt",
|
|
37
|
+
stroke: "currentColor",
|
|
38
|
+
strokeWidth: c,
|
|
39
|
+
fill: "none",
|
|
40
|
+
className: f
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
S as AnimatedArc
|
|
46
|
+
};
|
|
@@ -1,29 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
size
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
large: {
|
|
14
|
-
width: "96px";
|
|
15
|
-
height: "96px";
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
color: {
|
|
19
|
-
gray: {
|
|
20
|
-
stroke: "sd.reference.color.scale.gray.400";
|
|
21
|
-
};
|
|
22
|
-
white: {
|
|
23
|
-
stroke: "sd.reference.color.scale.white.1000";
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}>;
|
|
27
|
-
type ProgressIndicatorProps = ComponentProps<"svg"> & RecipeVariantProps<typeof ProgressIndicatorStyle>;
|
|
28
|
-
export declare const ProgressIndicator: ({ className, ...props }: ProgressIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export {};
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ProgressIndicatorProps extends React.ComponentProps<"div"> {
|
|
3
|
+
type?: "linear" | "circular";
|
|
4
|
+
size?: "small" | "medium" | "large";
|
|
5
|
+
value?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const ProgressIndicator: {
|
|
9
|
+
({ value, max, type, size, className, style, ...props }: ProgressIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -1,65 +1,223 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as v } from "react";
|
|
3
|
+
import { describeArc as b } from "./util.js";
|
|
4
|
+
import { cx as h } from "../../styled-system/css/cx.js";
|
|
5
|
+
import { cva as c } from "../../styled-system/css/cva.js";
|
|
6
|
+
const u = c({
|
|
5
7
|
base: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
position: "relative",
|
|
9
|
+
display: "flex",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
justifyContent: "center"
|
|
8
12
|
},
|
|
9
13
|
variants: {
|
|
14
|
+
type: {
|
|
15
|
+
linear: {
|
|
16
|
+
width: "100%"
|
|
17
|
+
},
|
|
18
|
+
circular: {}
|
|
19
|
+
},
|
|
10
20
|
size: {
|
|
11
|
-
small: {
|
|
21
|
+
small: {},
|
|
22
|
+
medium: {},
|
|
23
|
+
large: {}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
compoundVariants: [
|
|
27
|
+
{
|
|
28
|
+
type: "linear",
|
|
29
|
+
size: "small",
|
|
30
|
+
css: {
|
|
31
|
+
height: "4px"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "linear",
|
|
36
|
+
size: "medium",
|
|
37
|
+
css: {
|
|
38
|
+
height: "4px"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: "linear",
|
|
43
|
+
size: "large",
|
|
44
|
+
css: {
|
|
45
|
+
height: "8px"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: "circular",
|
|
50
|
+
size: "small",
|
|
51
|
+
css: {
|
|
52
|
+
width: "12px",
|
|
53
|
+
height: "12px"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "circular",
|
|
58
|
+
size: "medium",
|
|
59
|
+
css: {
|
|
12
60
|
width: "16px",
|
|
13
61
|
height: "16px"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "circular",
|
|
66
|
+
size: "large",
|
|
67
|
+
css: {
|
|
68
|
+
width: "40px",
|
|
69
|
+
height: "40px"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
type: "linear",
|
|
75
|
+
size: "medium"
|
|
76
|
+
}
|
|
77
|
+
}), p = c({
|
|
78
|
+
base: {
|
|
79
|
+
position: "absolute",
|
|
80
|
+
backgroundColor: "sd.reference.color.scale.gray.100",
|
|
81
|
+
overflow: "hidden"
|
|
82
|
+
},
|
|
83
|
+
variants: {
|
|
84
|
+
type: {
|
|
85
|
+
linear: {
|
|
86
|
+
width: "calc(100% - 4px)",
|
|
87
|
+
height: "100%",
|
|
88
|
+
borderRadius: "sd.system.dimension.radius.full"
|
|
14
89
|
},
|
|
15
|
-
|
|
16
|
-
width: "
|
|
17
|
-
height: "
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
width: "96px",
|
|
21
|
-
height: "96px"
|
|
90
|
+
circular: {
|
|
91
|
+
width: "100%",
|
|
92
|
+
height: "100%",
|
|
93
|
+
borderRadius: "50%",
|
|
94
|
+
fill: "none"
|
|
22
95
|
}
|
|
23
96
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
97
|
+
size: {
|
|
98
|
+
small: {},
|
|
99
|
+
medium: {},
|
|
100
|
+
large: {}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
compoundVariants: []
|
|
104
|
+
}), g = c({
|
|
105
|
+
base: {
|
|
106
|
+
position: "absolute",
|
|
107
|
+
backgroundColor: "sd.system.color.impression.primary"
|
|
108
|
+
},
|
|
109
|
+
variants: {
|
|
110
|
+
type: {
|
|
111
|
+
linear: {
|
|
112
|
+
left: "0px",
|
|
113
|
+
height: "100%",
|
|
114
|
+
borderRadius: "0"
|
|
27
115
|
},
|
|
28
|
-
|
|
29
|
-
|
|
116
|
+
circular: {
|
|
117
|
+
width: "100%",
|
|
118
|
+
height: "100%",
|
|
119
|
+
fill: "none",
|
|
120
|
+
stroke: "sd.system.color.impression.primary",
|
|
121
|
+
strokeLinecap: "butt",
|
|
122
|
+
transformOrigin: "center"
|
|
30
123
|
}
|
|
124
|
+
},
|
|
125
|
+
size: {
|
|
126
|
+
small: {},
|
|
127
|
+
medium: {},
|
|
128
|
+
large: {}
|
|
31
129
|
}
|
|
32
130
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
131
|
+
compoundVariants: []
|
|
132
|
+
}), w = (t) => ({
|
|
133
|
+
small: { radius: 8, strokeWidth: 2 },
|
|
134
|
+
medium: { radius: 12, strokeWidth: 4 },
|
|
135
|
+
large: { radius: 24, strokeWidth: 4 }
|
|
136
|
+
})[t], k = ({
|
|
137
|
+
value: t = 0,
|
|
138
|
+
max: o = 1,
|
|
139
|
+
type: i = "linear",
|
|
140
|
+
size: s = "medium",
|
|
141
|
+
className: n,
|
|
142
|
+
style: d,
|
|
143
|
+
...m
|
|
40
144
|
}) => {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
145
|
+
const l = Math.min(Math.max(t / o * 100, 0), 100);
|
|
146
|
+
if (i === "circular") {
|
|
147
|
+
const { radius: r, strokeWidth: e } = w(s), x = v(() => {
|
|
148
|
+
const y = l / 100 * 360 - 1e-5;
|
|
149
|
+
return b(
|
|
150
|
+
r + e,
|
|
151
|
+
r + e,
|
|
152
|
+
r,
|
|
153
|
+
0,
|
|
154
|
+
y
|
|
155
|
+
);
|
|
156
|
+
}, [l, r, e]);
|
|
157
|
+
return /* @__PURE__ */ a(
|
|
158
|
+
"div",
|
|
159
|
+
{
|
|
160
|
+
className: h(u({ type: i, size: s }), n),
|
|
161
|
+
role: "progressbar",
|
|
162
|
+
"aria-valuenow": t,
|
|
163
|
+
"aria-valuemin": 0,
|
|
164
|
+
"aria-valuemax": o,
|
|
165
|
+
style: d,
|
|
166
|
+
...m,
|
|
167
|
+
children: /* @__PURE__ */ f(
|
|
168
|
+
"svg",
|
|
169
|
+
{
|
|
170
|
+
viewBox: `0 0 ${r * 2 + e * 2} ${r * 2 + e * 2}`,
|
|
171
|
+
style: { width: "100%", height: "100%" },
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ a(
|
|
174
|
+
"circle",
|
|
175
|
+
{
|
|
176
|
+
cx: r + e,
|
|
177
|
+
cy: r + e,
|
|
178
|
+
r,
|
|
179
|
+
className: p({ type: i, size: s }),
|
|
180
|
+
stroke: "var(--colors-sd-reference-color-scale-gray-100)",
|
|
181
|
+
strokeWidth: e
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
l > 0 && /* @__PURE__ */ a(
|
|
185
|
+
"path",
|
|
186
|
+
{
|
|
187
|
+
d: x,
|
|
188
|
+
className: g({ type: i, size: s }),
|
|
189
|
+
strokeWidth: e * 2
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
return /* @__PURE__ */ a(
|
|
199
|
+
"div",
|
|
44
200
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
...
|
|
52
|
-
children: /* @__PURE__ */
|
|
53
|
-
"
|
|
201
|
+
className: h(u({ type: i, size: s }), n),
|
|
202
|
+
role: "progressbar",
|
|
203
|
+
"aria-valuenow": t,
|
|
204
|
+
"aria-valuemin": 0,
|
|
205
|
+
"aria-valuemax": o,
|
|
206
|
+
style: d,
|
|
207
|
+
...m,
|
|
208
|
+
children: /* @__PURE__ */ a("div", { className: p({ type: i, size: s }), children: /* @__PURE__ */ a(
|
|
209
|
+
"div",
|
|
54
210
|
{
|
|
55
|
-
|
|
56
|
-
|
|
211
|
+
className: g({ type: i, size: s }),
|
|
212
|
+
style: {
|
|
213
|
+
width: `${l}%`
|
|
214
|
+
}
|
|
57
215
|
}
|
|
58
|
-
)
|
|
216
|
+
) })
|
|
59
217
|
}
|
|
60
218
|
);
|
|
61
219
|
};
|
|
220
|
+
k.displayName = "ProgressIndicator";
|
|
62
221
|
export {
|
|
63
|
-
|
|
64
|
-
r as ProgressIndicatorStyle
|
|
222
|
+
k as ProgressIndicator
|
|
65
223
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ProgressIndicatorIndeterminateProps extends React.ComponentProps<"div"> {
|
|
3
|
+
type?: "linear" | "circular";
|
|
4
|
+
size?: "small" | "medium" | "large";
|
|
5
|
+
color?: "primary" | "subtle";
|
|
6
|
+
}
|
|
7
|
+
export declare const ProgressIndicatorIndeterminate: {
|
|
8
|
+
({ type, size, color, className, style, ...props }: ProgressIndicatorIndeterminateProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|