@serendie/ui 3.3.0-dev.202605191319 → 3.3.0-dev.202605200751
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/README.md +5 -1
- package/dist/client.js +35 -32
- package/dist/components/Steps/Steps.d.ts +128 -0
- package/dist/components/Steps/Steps.js +335 -0
- package/dist/components/Steps/index.d.ts +2 -0
- package/dist/components/Steps/index.js +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +43 -40
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-completed-content.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-content.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-context.js +9 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-item-context.js +6 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-item.js +25 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-list.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-next-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-prev-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-progress.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-root-provider.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-root.js +34 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-separator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps-trigger.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/steps.js +34 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/use-steps-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/use-steps-item-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/use-steps-item-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/steps/use-steps.js +19 -0
- package/dist/node_modules/@zag-js/steps/dist/steps.anatomy.js +17 -0
- package/dist/node_modules/@zag-js/steps/dist/steps.connect.js +173 -0
- package/dist/node_modules/@zag-js/steps/dist/steps.dom.js +19 -0
- package/dist/node_modules/@zag-js/steps/dist/steps.machine.js +119 -0
- package/dist/node_modules/@zag-js/utils/dist/array.js +24 -23
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,7 +114,11 @@ SSR環境(Next.jsなど)では、ページ読み込み時にテーマが一
|
|
|
114
114
|
// Next.js App Router: app/layout.tsx
|
|
115
115
|
import { SerendieProvider, ColorSchemeScript } from "@serendie/ui";
|
|
116
116
|
|
|
117
|
-
export default function RootLayout({
|
|
117
|
+
export default function RootLayout({
|
|
118
|
+
children,
|
|
119
|
+
}: {
|
|
120
|
+
children: React.ReactNode;
|
|
121
|
+
}) {
|
|
118
122
|
return (
|
|
119
123
|
<SerendieProvider lang="ja" colorTheme="konjo" colorMode="system">
|
|
120
124
|
<html suppressHydrationWarning>
|
package/dist/client.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ColorSchemeScript as s, getColorSchemeScript as f } from "./theme/initC
|
|
|
6
6
|
import { formatDateByLang as l, getTranslations as d, useTranslations as S } from "./i18n/index.js";
|
|
7
7
|
import { Accordion as C } from "./components/Accordion/Accordion.js";
|
|
8
8
|
import { AccordionGroup as u } from "./components/Accordion/AccordionGroup.js";
|
|
9
|
-
import { Avatar as
|
|
9
|
+
import { Avatar as B, AvatarStyle as T } from "./components/Avatar/Avatar.js";
|
|
10
10
|
import { Badge as P, BadgeCloseButton as D, BadgeStyle as b } from "./components/Badge/Badge.js";
|
|
11
11
|
import { Banner as v } from "./components/Banner/Banner.js";
|
|
12
12
|
import { BottomNavigation as w } from "./components/BottomNavigation/BottomNavigation.js";
|
|
@@ -22,7 +22,7 @@ import { DatePicker as so } from "./components/DatePicker/DatePicker.js";
|
|
|
22
22
|
import { Divider as co, DividerStyle as lo } from "./components/Divider/Divider.js";
|
|
23
23
|
import { Drawer as ho } from "./components/Drawer/Drawer.js";
|
|
24
24
|
import { DropdownMenu as go, DropdownMenuStyle as uo } from "./components/DropdownMenu/DropdownMenu.js";
|
|
25
|
-
import { IconButton as
|
|
25
|
+
import { IconButton as Bo, IconButtonStyle as To } from "./components/IconButton/IconButton.js";
|
|
26
26
|
import { List as Po } from "./components/List/List.js";
|
|
27
27
|
import { ListItem as bo, ListItemStyle as ko } from "./components/List/ListItem.js";
|
|
28
28
|
import { ModalDialog as Mo } from "./components/ModalDialog/ModalDialog.js";
|
|
@@ -36,21 +36,22 @@ import { RadioGroup as Vo } from "./components/RadioButton/RadioGroup.js";
|
|
|
36
36
|
import { Search as Yo, SearchStyle as Zo } from "./components/Search/Search.js";
|
|
37
37
|
import { Select as $o, SelectStyle as oe } from "./components/Select/Select.js";
|
|
38
38
|
import { Slider as re, SliderStyle as te } from "./components/Slider/Slider.js";
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
39
|
+
import { Steps as me, stepsStyles as pe } from "./components/Steps/Steps.js";
|
|
40
|
+
import { Switch as xe, SwitchStyle as ne } from "./components/Switch/Switch.js";
|
|
41
|
+
import { Tabs as fe, TabsStyle as ce } from "./components/Tabs/Tabs.js";
|
|
42
|
+
import { TabItem as de, TabItemStyle as Se } from "./components/Tabs/TabItem.js";
|
|
43
|
+
import { TextArea as Ce } from "./components/TextArea/TextArea.js";
|
|
44
|
+
import { TextField as ue } from "./components/TextField/TextField.js";
|
|
45
|
+
import { Toast as Be, ToastStyle as Te, toaster as Ie } from "./components/Toast/Toast.js";
|
|
46
|
+
import { Tooltip as De } from "./components/Tooltip/Tooltip.js";
|
|
47
|
+
import { TopAppBar as ke } from "./components/TopAppBar/TopAppBar.js";
|
|
48
|
+
import { DataTableComponent as Me } from "./components/DataTable/DataTableComponent.js";
|
|
49
|
+
import { LanguageProvider as Ae, SerendieProvider as Le } from "./i18n/provider.js";
|
|
50
|
+
import { parse as Re } from "./node_modules/@zag-js/date-picker/dist/date-picker.parse.js";
|
|
50
51
|
export {
|
|
51
52
|
C as Accordion,
|
|
52
53
|
u as AccordionGroup,
|
|
53
|
-
|
|
54
|
+
B as Avatar,
|
|
54
55
|
T as AvatarStyle,
|
|
55
56
|
P as Badge,
|
|
56
57
|
D as BadgeCloseButton,
|
|
@@ -68,16 +69,16 @@ export {
|
|
|
68
69
|
s as ColorSchemeScript,
|
|
69
70
|
po as DashboardWidget,
|
|
70
71
|
xo as DataTable,
|
|
71
|
-
|
|
72
|
+
Me as DataTableComponent,
|
|
72
73
|
so as DatePicker,
|
|
73
74
|
co as Divider,
|
|
74
75
|
lo as DividerStyle,
|
|
75
76
|
ho as Drawer,
|
|
76
77
|
go as DropdownMenu,
|
|
77
78
|
uo as DropdownMenuStyle,
|
|
78
|
-
|
|
79
|
+
Bo as IconButton,
|
|
79
80
|
To as IconButtonStyle,
|
|
80
|
-
|
|
81
|
+
Ae as LanguageProvider,
|
|
81
82
|
Po as List,
|
|
82
83
|
bo as ListItem,
|
|
83
84
|
ko as ListItemStyle,
|
|
@@ -97,22 +98,23 @@ export {
|
|
|
97
98
|
oe as SelectStyle,
|
|
98
99
|
W as SerendieChartTheme,
|
|
99
100
|
r as SerendiePreset,
|
|
100
|
-
|
|
101
|
+
Le as SerendieProvider,
|
|
101
102
|
re as Slider,
|
|
102
103
|
te as SliderStyle,
|
|
103
|
-
me as
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
me as Steps,
|
|
105
|
+
xe as Switch,
|
|
106
|
+
ne as SwitchStyle,
|
|
107
|
+
de as TabItem,
|
|
108
|
+
Se as TabItemStyle,
|
|
109
|
+
fe as Tabs,
|
|
110
|
+
ce as TabsStyle,
|
|
111
|
+
Ce as TextArea,
|
|
112
|
+
ue as TextField,
|
|
111
113
|
a as ThemeContext,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
Be as Toast,
|
|
115
|
+
Te as ToastStyle,
|
|
116
|
+
De as Tooltip,
|
|
117
|
+
ke as TopAppBar,
|
|
116
118
|
$ as checkboxCheckedIconCss,
|
|
117
119
|
oo as checkboxIconCss,
|
|
118
120
|
eo as checkboxUncheckedIconCss,
|
|
@@ -124,13 +126,14 @@ export {
|
|
|
124
126
|
f as getColorSchemeScript,
|
|
125
127
|
d as getTranslations,
|
|
126
128
|
J as legendChartMargin,
|
|
127
|
-
|
|
129
|
+
Re as parseDate,
|
|
128
130
|
Jo as radioCheckedIconCss,
|
|
129
131
|
Ko as radioIconCss,
|
|
130
132
|
Oo as radioUncheckedIconCss,
|
|
131
133
|
m as resolveTheme,
|
|
132
134
|
K as spaciousChartMargin,
|
|
133
|
-
|
|
135
|
+
pe as stepsStyles,
|
|
136
|
+
Ie as toaster,
|
|
134
137
|
O as useBarChartProps,
|
|
135
138
|
Q as useChartProps,
|
|
136
139
|
V as useLineChartProps,
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StepsRootProps } from '@ark-ui/react/steps';
|
|
3
|
+
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
4
|
+
export declare const stepsStyles: import('../../../styled-system/types').SlotRecipeRuntimeFn<"number" | "item" | "title" | "description" | "list" | "separator" | "root" | "trigger" | "indicator" | "indicatorInner" | "checkIcon" | "textContent", {
|
|
5
|
+
orientation: {
|
|
6
|
+
horizontal: {
|
|
7
|
+
root: {
|
|
8
|
+
flexDirection: "row";
|
|
9
|
+
};
|
|
10
|
+
list: {
|
|
11
|
+
flexDirection: "row";
|
|
12
|
+
width: "100%";
|
|
13
|
+
};
|
|
14
|
+
separator: {
|
|
15
|
+
height: "sd.reference.dimension.scale.1";
|
|
16
|
+
};
|
|
17
|
+
item: {
|
|
18
|
+
flexDirection: "column";
|
|
19
|
+
alignItems: "center";
|
|
20
|
+
};
|
|
21
|
+
trigger: {
|
|
22
|
+
flexDirection: "column";
|
|
23
|
+
};
|
|
24
|
+
title: {
|
|
25
|
+
textAlign: "center";
|
|
26
|
+
};
|
|
27
|
+
description: {
|
|
28
|
+
textStyle: "sd.system.typography.label.small_compact";
|
|
29
|
+
textAlign: "center";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
vertical: {
|
|
33
|
+
root: {
|
|
34
|
+
flexDirection: "column";
|
|
35
|
+
};
|
|
36
|
+
list: {
|
|
37
|
+
flexDirection: "column";
|
|
38
|
+
};
|
|
39
|
+
separator: {
|
|
40
|
+
width: "sd.reference.dimension.scale.1";
|
|
41
|
+
};
|
|
42
|
+
item: {
|
|
43
|
+
flexDirection: "column";
|
|
44
|
+
};
|
|
45
|
+
trigger: {
|
|
46
|
+
flexDirection: "row";
|
|
47
|
+
};
|
|
48
|
+
textContent: {
|
|
49
|
+
alignItems: "flex-start";
|
|
50
|
+
};
|
|
51
|
+
title: {
|
|
52
|
+
textStyle: "sd.system.typography.label.large_compact";
|
|
53
|
+
textAlign: "left";
|
|
54
|
+
};
|
|
55
|
+
description: {
|
|
56
|
+
textStyle: "sd.system.typography.label.small_compact";
|
|
57
|
+
textAlign: "left";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
size: {
|
|
62
|
+
large: {
|
|
63
|
+
indicator: {
|
|
64
|
+
width: "sd.system.dimension.spacing.extraLarge";
|
|
65
|
+
height: "sd.system.dimension.spacing.extraLarge";
|
|
66
|
+
};
|
|
67
|
+
number: {
|
|
68
|
+
textStyle: "sd.system.typography.label.medium_compact";
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
small: {
|
|
72
|
+
indicator: {
|
|
73
|
+
width: "sd.system.dimension.spacing.small";
|
|
74
|
+
height: "sd.system.dimension.spacing.small";
|
|
75
|
+
};
|
|
76
|
+
number: {
|
|
77
|
+
textStyle: "sd.system.typography.label.small_compact";
|
|
78
|
+
};
|
|
79
|
+
title: {
|
|
80
|
+
textStyle: "sd.system.typography.label.medium_compact";
|
|
81
|
+
};
|
|
82
|
+
description: {
|
|
83
|
+
textStyle: "sd.system.typography.label.small_compact";
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
type: {
|
|
88
|
+
default: {
|
|
89
|
+
indicator: {
|
|
90
|
+
backgroundColor: "sd.system.color.interaction.disabled";
|
|
91
|
+
color: "sd.system.color.interaction.disabledOnSurface";
|
|
92
|
+
"&[data-complete]": {
|
|
93
|
+
backgroundColor: "sd.system.color.impression.secondary";
|
|
94
|
+
color: "sd.system.color.impression.onSecondary";
|
|
95
|
+
};
|
|
96
|
+
"&[data-current]": {
|
|
97
|
+
backgroundColor: "sd.system.color.impression.primary";
|
|
98
|
+
color: "sd.system.color.impression.onPrimary";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
subtle: {
|
|
103
|
+
indicator: {
|
|
104
|
+
backgroundColor: "sd.system.color.interaction.disabledOnSurface";
|
|
105
|
+
"&[data-complete]": {
|
|
106
|
+
backgroundColor: "sd.system.color.impression.primary";
|
|
107
|
+
};
|
|
108
|
+
"&[data-current]": {
|
|
109
|
+
backgroundColor: "sd.system.color.component.surface";
|
|
110
|
+
borderWidth: "sd.system.dimension.border.thick";
|
|
111
|
+
borderStyle: "solid";
|
|
112
|
+
borderColor: "sd.system.color.impression.primary";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
}>;
|
|
118
|
+
export interface StepsItemProps {
|
|
119
|
+
title: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
}
|
|
122
|
+
type StepsStyleProps = RecipeVariantProps<typeof stepsStyles>;
|
|
123
|
+
export interface StepsProps extends Omit<StepsRootProps, "orientation">, Omit<NonNullable<StepsStyleProps>, "orientation" | "size"> {
|
|
124
|
+
items: StepsItemProps[];
|
|
125
|
+
direction?: "horizontal" | "vertical";
|
|
126
|
+
}
|
|
127
|
+
export declare const Steps: React.ForwardRefExoticComponent<StepsProps & React.RefAttributes<HTMLDivElement>>;
|
|
128
|
+
export {};
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { jsx as s, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import { steps_exports as t } from "../../node_modules/@ark-ui/react/dist/components/steps/steps.js";
|
|
4
|
+
import { SerendieSymbolCheck as u } from "@serendie/symbols";
|
|
5
|
+
import { cx as h } from "../../styled-system/css/cx.js";
|
|
6
|
+
import { sva as b } from "../../styled-system/css/sva.js";
|
|
7
|
+
const S = b({
|
|
8
|
+
slots: [
|
|
9
|
+
"root",
|
|
10
|
+
"list",
|
|
11
|
+
"item",
|
|
12
|
+
"trigger",
|
|
13
|
+
"indicator",
|
|
14
|
+
"indicatorInner",
|
|
15
|
+
"checkIcon",
|
|
16
|
+
"number",
|
|
17
|
+
"separator",
|
|
18
|
+
"textContent",
|
|
19
|
+
"title",
|
|
20
|
+
"description"
|
|
21
|
+
],
|
|
22
|
+
base: {
|
|
23
|
+
root: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
gap: "sd.system.dimension.spacing.none"
|
|
26
|
+
},
|
|
27
|
+
list: {
|
|
28
|
+
display: "flex",
|
|
29
|
+
gap: "sd.system.dimension.spacing.none"
|
|
30
|
+
},
|
|
31
|
+
separator: {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
backgroundColor: "sd.system.color.component.outlineDim",
|
|
34
|
+
zIndex: 1,
|
|
35
|
+
"&[data-complete]": {
|
|
36
|
+
backgroundColor: "sd.system.color.impression.primary"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
item: {
|
|
40
|
+
display: "flex",
|
|
41
|
+
position: "relative",
|
|
42
|
+
flex: "1"
|
|
43
|
+
},
|
|
44
|
+
trigger: {
|
|
45
|
+
display: "flex",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
gap: "sd.system.dimension.spacing.small",
|
|
48
|
+
background: "none",
|
|
49
|
+
border: "none",
|
|
50
|
+
cursor: "default",
|
|
51
|
+
padding: "sd.system.dimension.spacing.none",
|
|
52
|
+
position: "relative",
|
|
53
|
+
zIndex: 2
|
|
54
|
+
},
|
|
55
|
+
indicator: {
|
|
56
|
+
display: "flex",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
borderRadius: "sd.system.dimension.radius.full",
|
|
60
|
+
flexShrink: 0,
|
|
61
|
+
position: "relative",
|
|
62
|
+
zIndex: 3,
|
|
63
|
+
backgroundColor: "sd.system.color.component.surface"
|
|
64
|
+
},
|
|
65
|
+
indicatorInner: {
|
|
66
|
+
display: "flex",
|
|
67
|
+
alignItems: "center",
|
|
68
|
+
justifyContent: "center",
|
|
69
|
+
width: "100%",
|
|
70
|
+
height: "100%",
|
|
71
|
+
borderRadius: "sd.system.dimension.radius.full",
|
|
72
|
+
color: "inherit"
|
|
73
|
+
},
|
|
74
|
+
checkIcon: {
|
|
75
|
+
width: "sd.system.dimension.spacing.medium",
|
|
76
|
+
height: "sd.system.dimension.spacing.medium"
|
|
77
|
+
},
|
|
78
|
+
number: {
|
|
79
|
+
fontWeight: "500"
|
|
80
|
+
},
|
|
81
|
+
textContent: {
|
|
82
|
+
display: "flex",
|
|
83
|
+
flexDirection: "column",
|
|
84
|
+
gap: "sd.system.dimension.spacing.extraSmall",
|
|
85
|
+
zIndex: 1
|
|
86
|
+
},
|
|
87
|
+
title: {
|
|
88
|
+
textStyle: "sd.system.typography.label.large_compact",
|
|
89
|
+
color: "sd.system.color.component.onSurface",
|
|
90
|
+
"[data-incomplete] &": {
|
|
91
|
+
color: "sd.system.color.interaction.disabledOnSurface"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
description: {
|
|
95
|
+
textStyle: "sd.system.typography.label.small_compact",
|
|
96
|
+
color: "sd.system.color.component.onSurfaceVariant",
|
|
97
|
+
"[data-incomplete] &": {
|
|
98
|
+
color: "sd.system.color.interaction.disabledOnSurface"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
variants: {
|
|
103
|
+
orientation: {
|
|
104
|
+
horizontal: {
|
|
105
|
+
root: {
|
|
106
|
+
flexDirection: "row"
|
|
107
|
+
},
|
|
108
|
+
list: {
|
|
109
|
+
flexDirection: "row",
|
|
110
|
+
width: "100%"
|
|
111
|
+
},
|
|
112
|
+
separator: {
|
|
113
|
+
height: "sd.reference.dimension.scale.1"
|
|
114
|
+
},
|
|
115
|
+
item: {
|
|
116
|
+
flexDirection: "column",
|
|
117
|
+
alignItems: "center"
|
|
118
|
+
},
|
|
119
|
+
trigger: {
|
|
120
|
+
flexDirection: "column"
|
|
121
|
+
},
|
|
122
|
+
title: {
|
|
123
|
+
textAlign: "center"
|
|
124
|
+
},
|
|
125
|
+
description: {
|
|
126
|
+
textStyle: "sd.system.typography.label.small_compact",
|
|
127
|
+
textAlign: "center"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
vertical: {
|
|
131
|
+
root: {
|
|
132
|
+
flexDirection: "column"
|
|
133
|
+
},
|
|
134
|
+
list: {
|
|
135
|
+
flexDirection: "column"
|
|
136
|
+
},
|
|
137
|
+
separator: {
|
|
138
|
+
width: "sd.reference.dimension.scale.1"
|
|
139
|
+
},
|
|
140
|
+
item: {
|
|
141
|
+
flexDirection: "column"
|
|
142
|
+
},
|
|
143
|
+
trigger: {
|
|
144
|
+
flexDirection: "row"
|
|
145
|
+
},
|
|
146
|
+
textContent: {
|
|
147
|
+
alignItems: "flex-start"
|
|
148
|
+
},
|
|
149
|
+
title: {
|
|
150
|
+
textStyle: "sd.system.typography.label.large_compact",
|
|
151
|
+
textAlign: "left"
|
|
152
|
+
},
|
|
153
|
+
description: {
|
|
154
|
+
textStyle: "sd.system.typography.label.small_compact",
|
|
155
|
+
textAlign: "left"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
size: {
|
|
160
|
+
large: {
|
|
161
|
+
indicator: {
|
|
162
|
+
width: "sd.system.dimension.spacing.extraLarge",
|
|
163
|
+
height: "sd.system.dimension.spacing.extraLarge"
|
|
164
|
+
},
|
|
165
|
+
number: {
|
|
166
|
+
textStyle: "sd.system.typography.label.medium_compact"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
small: {
|
|
170
|
+
indicator: {
|
|
171
|
+
width: "sd.system.dimension.spacing.small",
|
|
172
|
+
height: "sd.system.dimension.spacing.small"
|
|
173
|
+
},
|
|
174
|
+
number: {
|
|
175
|
+
textStyle: "sd.system.typography.label.small_compact"
|
|
176
|
+
},
|
|
177
|
+
title: {
|
|
178
|
+
textStyle: "sd.system.typography.label.medium_compact"
|
|
179
|
+
},
|
|
180
|
+
description: {
|
|
181
|
+
textStyle: "sd.system.typography.label.small_compact"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
type: {
|
|
186
|
+
default: {
|
|
187
|
+
indicator: {
|
|
188
|
+
backgroundColor: "sd.system.color.interaction.disabled",
|
|
189
|
+
color: "sd.system.color.interaction.disabledOnSurface",
|
|
190
|
+
"&[data-complete]": {
|
|
191
|
+
backgroundColor: "sd.system.color.impression.secondary",
|
|
192
|
+
color: "sd.system.color.impression.onSecondary"
|
|
193
|
+
},
|
|
194
|
+
"&[data-current]": {
|
|
195
|
+
backgroundColor: "sd.system.color.impression.primary",
|
|
196
|
+
color: "sd.system.color.impression.onPrimary"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
subtle: {
|
|
201
|
+
indicator: {
|
|
202
|
+
backgroundColor: "sd.system.color.interaction.disabledOnSurface",
|
|
203
|
+
"&[data-complete]": {
|
|
204
|
+
backgroundColor: "sd.system.color.impression.primary"
|
|
205
|
+
},
|
|
206
|
+
"&[data-current]": {
|
|
207
|
+
backgroundColor: "sd.system.color.component.surface",
|
|
208
|
+
borderWidth: "sd.system.dimension.border.thick",
|
|
209
|
+
borderStyle: "solid",
|
|
210
|
+
borderColor: "sd.system.color.impression.primary"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
compoundVariants: [
|
|
217
|
+
{
|
|
218
|
+
orientation: "horizontal",
|
|
219
|
+
size: "large",
|
|
220
|
+
css: {
|
|
221
|
+
separator: {
|
|
222
|
+
top: "sd.system.dimension.spacing.small",
|
|
223
|
+
left: "calc(50% + var(--spacing-sd-system-dimension-spacing-small))",
|
|
224
|
+
right: "calc(-50% + var(--spacing-sd-system-dimension-spacing-small))"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
orientation: "horizontal",
|
|
230
|
+
size: "small",
|
|
231
|
+
css: {
|
|
232
|
+
separator: {
|
|
233
|
+
top: "calc(var(--spacing-sd-system-dimension-spacing-small) / 2 - var(--spacing-sd-reference-dimension-scale-1))",
|
|
234
|
+
left: "calc(50% + var(--spacing-sd-system-dimension-spacing-small) / 2)",
|
|
235
|
+
right: "calc(-50% + var(--spacing-sd-system-dimension-spacing-small) / 2)"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
orientation: "vertical",
|
|
241
|
+
size: "large",
|
|
242
|
+
css: {
|
|
243
|
+
item: {
|
|
244
|
+
paddingBottom: "sd.system.dimension.spacing.twoExtraLarge"
|
|
245
|
+
},
|
|
246
|
+
trigger: {
|
|
247
|
+
alignItems: "flex-start",
|
|
248
|
+
gap: "sd.system.dimension.spacing.extraSmall"
|
|
249
|
+
},
|
|
250
|
+
textContent: {
|
|
251
|
+
paddingTop: "sd.system.dimension.spacing.twoExtraSmall"
|
|
252
|
+
},
|
|
253
|
+
separator: {
|
|
254
|
+
left: "calc(var(--spacing-sd-system-dimension-spacing-small) - 0.5px)",
|
|
255
|
+
top: "sd.system.dimension.spacing.small",
|
|
256
|
+
bottom: "-sd.system.dimension.spacing.large"
|
|
257
|
+
},
|
|
258
|
+
title: {
|
|
259
|
+
textStyle: "sd.system.typography.label.large_compact"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
orientation: "vertical",
|
|
265
|
+
size: "small",
|
|
266
|
+
css: {
|
|
267
|
+
item: {
|
|
268
|
+
paddingBottom: "sd.system.dimension.spacing.extraLarge",
|
|
269
|
+
"--steps-indicator-size": "var(--spacing-sd-system-dimension-spacing-small)",
|
|
270
|
+
"--steps-indicator-offset": "var(--spacing-sd-system-dimension-spacing-large)"
|
|
271
|
+
},
|
|
272
|
+
trigger: {
|
|
273
|
+
alignItems: "flex-start",
|
|
274
|
+
gap: "sd.system.dimension.spacing.large"
|
|
275
|
+
},
|
|
276
|
+
indicator: {
|
|
277
|
+
marginTop: "var(--steps-indicator-offset)"
|
|
278
|
+
},
|
|
279
|
+
textContent: {
|
|
280
|
+
marginTop: "calc(var(--spacing-sd-system-dimension-spacing-large) + var(--spacing-sd-reference-dimension-scale-2))"
|
|
281
|
+
},
|
|
282
|
+
separator: {
|
|
283
|
+
left: "calc(var(--steps-indicator-size) / 2 - 0.5px)",
|
|
284
|
+
top: "calc(var(--steps-indicator-offset) + var(--steps-indicator-size) + var(--spacing-sd-system-dimension-spacing-twoExtraSmall))",
|
|
285
|
+
bottom: "calc(-1 * var(--steps-indicator-offset) + var(--spacing-sd-system-dimension-spacing-twoExtraSmall))"
|
|
286
|
+
},
|
|
287
|
+
title: {
|
|
288
|
+
textStyle: "sd.system.typography.label.large_compact"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
defaultVariants: {
|
|
294
|
+
orientation: "horizontal",
|
|
295
|
+
type: "default",
|
|
296
|
+
size: "large"
|
|
297
|
+
}
|
|
298
|
+
}), v = x.forwardRef(
|
|
299
|
+
({ items: o, direction: c = "horizontal", type: a = "default", className: d, ...m }, p) => {
|
|
300
|
+
const g = a === "subtle" ? "small" : "large", l = c, e = S({ orientation: l, size: g, type: a });
|
|
301
|
+
return /* @__PURE__ */ s(
|
|
302
|
+
t.Root,
|
|
303
|
+
{
|
|
304
|
+
ref: p,
|
|
305
|
+
...m,
|
|
306
|
+
count: o.length,
|
|
307
|
+
orientation: l,
|
|
308
|
+
className: h(e.root, d),
|
|
309
|
+
children: /* @__PURE__ */ s(t.List, { className: e.list, children: o.map((n, i) => {
|
|
310
|
+
const y = i === o.length - 1;
|
|
311
|
+
return /* @__PURE__ */ r(t.Item, { index: i, className: e.item, children: [
|
|
312
|
+
/* @__PURE__ */ r(t.Trigger, { className: e.trigger, children: [
|
|
313
|
+
/* @__PURE__ */ s(t.Indicator, { className: e.indicator, children: /* @__PURE__ */ s("div", { className: e.indicatorInner, children: a !== "subtle" && /* @__PURE__ */ s(t.ItemContext, { children: (f) => f.completed ? /* @__PURE__ */ s(
|
|
314
|
+
u,
|
|
315
|
+
{
|
|
316
|
+
className: e.checkIcon
|
|
317
|
+
}
|
|
318
|
+
) : /* @__PURE__ */ s("span", { className: e.number, children: i + 1 }) }) }) }),
|
|
319
|
+
/* @__PURE__ */ r("div", { className: e.textContent, children: [
|
|
320
|
+
/* @__PURE__ */ s("div", { className: e.title, children: n.title }),
|
|
321
|
+
n.description && /* @__PURE__ */ s("div", { className: e.description, children: n.description })
|
|
322
|
+
] })
|
|
323
|
+
] }),
|
|
324
|
+
!y && /* @__PURE__ */ s(t.Separator, { className: e.separator })
|
|
325
|
+
] }, i);
|
|
326
|
+
}) })
|
|
327
|
+
}
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
v.displayName = "Steps";
|
|
332
|
+
export {
|
|
333
|
+
v as Steps,
|
|
334
|
+
S as stepsStyles
|
|
335
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from './components/RadioButton/index.ts';
|
|
|
27
27
|
export * from './components/Search/index.ts';
|
|
28
28
|
export * from './components/Select/index.ts';
|
|
29
29
|
export * from './components/Slider/index.ts';
|
|
30
|
+
export * from './components/Steps/index.ts';
|
|
30
31
|
export * from './components/Switch/index.ts';
|
|
31
32
|
export * from './components/Tabs/index.ts';
|
|
32
33
|
export * from './components/TextArea/index.ts';
|