@serendie/ui 2.1.3-dev.202509040333 → 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.
@@ -0,0 +1,215 @@
1
+ import { jsx as i, jsxs as p } from "react/jsx-runtime";
2
+ import { AnimatedArc as h } from "./AnimatedArc.js";
3
+ import { cx as c } from "../../styled-system/css/cx.js";
4
+ import { cva as o } from "../../styled-system/css/cva.js";
5
+ const m = o({
6
+ base: {
7
+ position: "relative",
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ overflow: "hidden"
12
+ },
13
+ variants: {
14
+ type: {
15
+ linear: {
16
+ width: "100%",
17
+ borderRadius: "sd.system.dimension.radius.full"
18
+ },
19
+ circular: {}
20
+ },
21
+ size: {
22
+ small: {},
23
+ medium: {},
24
+ large: {}
25
+ },
26
+ color: {
27
+ primary: {},
28
+ subtle: {}
29
+ }
30
+ },
31
+ compoundVariants: [
32
+ {
33
+ type: "linear",
34
+ size: "small",
35
+ css: {
36
+ height: "2px"
37
+ }
38
+ },
39
+ {
40
+ type: "linear",
41
+ size: "medium",
42
+ css: {
43
+ height: "4px"
44
+ }
45
+ },
46
+ {
47
+ type: "linear",
48
+ size: "large",
49
+ css: {
50
+ height: "8px"
51
+ }
52
+ },
53
+ {
54
+ type: "circular",
55
+ size: "small",
56
+ css: {
57
+ width: "12px",
58
+ height: "12px"
59
+ }
60
+ },
61
+ {
62
+ type: "circular",
63
+ size: "medium",
64
+ css: {
65
+ width: "16px",
66
+ height: "16px"
67
+ }
68
+ },
69
+ {
70
+ type: "circular",
71
+ size: "large",
72
+ css: {
73
+ width: "40px",
74
+ height: "40px"
75
+ }
76
+ }
77
+ ],
78
+ defaultVariants: {
79
+ type: "linear",
80
+ size: "medium",
81
+ color: "primary"
82
+ }
83
+ }), g = o({
84
+ base: {
85
+ position: "absolute",
86
+ backgroundColor: "sd.reference.color.scale.gray.100"
87
+ },
88
+ variants: {
89
+ type: {
90
+ linear: {
91
+ width: "calc(100% - 4px)",
92
+ height: "100%",
93
+ borderRadius: "sd.system.dimension.radius.full"
94
+ },
95
+ circular: {
96
+ width: "100%",
97
+ height: "100%",
98
+ borderRadius: "50%",
99
+ fill: "none"
100
+ }
101
+ },
102
+ size: {
103
+ small: {},
104
+ medium: {},
105
+ large: {}
106
+ }
107
+ },
108
+ compoundVariants: []
109
+ }), u = o({
110
+ base: {
111
+ position: "absolute"
112
+ },
113
+ variants: {
114
+ type: {
115
+ linear: {
116
+ width: "50%",
117
+ height: "100%",
118
+ animation: "progressIndicatorSlide 1.7s cubic-bezier(0.65, 0.05, 0.36, 1) infinite"
119
+ },
120
+ circular: {
121
+ fill: "none",
122
+ strokeLinecap: "butt",
123
+ transformOrigin: "center"
124
+ }
125
+ },
126
+ size: {
127
+ small: {},
128
+ medium: {},
129
+ large: {}
130
+ },
131
+ color: {
132
+ primary: {
133
+ backgroundColor: "sd.system.color.impression.primary",
134
+ stroke: "sd.system.color.impression.primary"
135
+ },
136
+ subtle: {
137
+ backgroundColor: "sd.reference.color.scale.gray.300",
138
+ stroke: "sd.reference.color.scale.gray.300"
139
+ }
140
+ }
141
+ },
142
+ compoundVariants: []
143
+ }), y = (e) => ({
144
+ small: {
145
+ radius: 6,
146
+ strokeWidth: 2
147
+ },
148
+ medium: {
149
+ radius: 8,
150
+ strokeWidth: 6
151
+ },
152
+ large: {
153
+ radius: 20,
154
+ strokeWidth: 8
155
+ }
156
+ })[e], f = ({
157
+ type: e = "linear",
158
+ size: r = "medium",
159
+ color: s = "primary",
160
+ className: l,
161
+ style: n,
162
+ ...d
163
+ }) => {
164
+ if (e === "circular") {
165
+ const { radius: a, strokeWidth: t } = y(r);
166
+ return /* @__PURE__ */ i(
167
+ "div",
168
+ {
169
+ className: c(
170
+ m({ type: e, size: r, color: s }),
171
+ l
172
+ ),
173
+ role: "progressbar",
174
+ "aria-valuetext": "Loading",
175
+ style: n,
176
+ ...d,
177
+ children: /* @__PURE__ */ i(
178
+ "svg",
179
+ {
180
+ viewBox: `0 0 ${a * 2 + t * 2} ${a * 2 + t * 2}`,
181
+ children: /* @__PURE__ */ i(
182
+ h,
183
+ {
184
+ className: u({ type: e, size: r, color: s }),
185
+ radius: a,
186
+ width: t
187
+ }
188
+ )
189
+ }
190
+ )
191
+ }
192
+ );
193
+ }
194
+ return /* @__PURE__ */ p(
195
+ "div",
196
+ {
197
+ className: c(
198
+ m({ type: e, size: r, color: s }),
199
+ l
200
+ ),
201
+ role: "progressbar",
202
+ "aria-valuetext": "Loading",
203
+ style: n,
204
+ ...d,
205
+ children: [
206
+ /* @__PURE__ */ i("div", { className: g({ type: e, size: r }) }),
207
+ /* @__PURE__ */ i("div", { className: u({ type: e, size: r, color: s }) })
208
+ ]
209
+ }
210
+ );
211
+ };
212
+ f.displayName = "ProgressIndicatorIndeterminate";
213
+ export {
214
+ f as ProgressIndicatorIndeterminate
215
+ };
@@ -1 +1,4 @@
1
- export * from './ProgressIndicator.tsx';
1
+ export { ProgressIndicator } from './ProgressIndicator';
2
+ export type { ProgressIndicatorProps } from './ProgressIndicator';
3
+ export { ProgressIndicatorIndeterminate } from './ProgressIndicatorIndeterminate';
4
+ export type { ProgressIndicatorIndeterminateProps } from './ProgressIndicatorIndeterminate';
@@ -1,5 +1,6 @@
1
- import { ProgressIndicator as e, ProgressIndicatorStyle as s } from "./ProgressIndicator.js";
1
+ import { ProgressIndicator as e } from "./ProgressIndicator.js";
2
+ import { ProgressIndicatorIndeterminate as n } from "./ProgressIndicatorIndeterminate.js";
2
3
  export {
3
4
  e as ProgressIndicator,
4
- s as ProgressIndicatorStyle
5
+ n as ProgressIndicatorIndeterminate
5
6
  };
@@ -0,0 +1 @@
1
+ export declare const describeArc: (cx: number, cy: number, radius: number, startAngle: number, endAngle: number) => string;
@@ -0,0 +1,13 @@
1
+ const A = (n, e, t, o, s) => {
2
+ const a = (l, p, $, g) => {
3
+ const M = (g - 90) * Math.PI / 180;
4
+ return {
5
+ x: l + $ * Math.cos(M),
6
+ y: p + $ * Math.sin(M)
7
+ };
8
+ }, c = a(n, e, t, s), r = a(n, e, t, o), h = Math.abs((s - o) % 360) <= 180 ? "0" : "1";
9
+ return `M ${c.x} ${c.y} A ${t} ${t} 0 ${h} 0 ${r.x} ${r.y}`;
10
+ };
11
+ export {
12
+ A as describeArc
13
+ };
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { SerendiePreset as e } from "./preset.js";
2
2
  import { Accordion as a } from "./components/Accordion/Accordion.js";
3
3
  import { AccordionGroup as m } from "./components/Accordion/AccordionGroup.js";
4
4
  import { Avatar as i, AvatarStyle as n } from "./components/Avatar/Avatar.js";
5
- import { Badge as s, BadgeCloseButton as c, BadgeStyle as l } from "./components/Badge/Badge.js";
5
+ import { Badge as s, BadgeCloseButton as c, BadgeStyle as d } from "./components/Badge/Badge.js";
6
6
  import { Banner as h } from "./components/Banner/Banner.js";
7
7
  import { BottomNavigation as S } from "./components/BottomNavigation/BottomNavigation.js";
8
8
  import { BottomNavigationItem as g, BottomNavigationItemStyle as y } from "./components/BottomNavigation/BottomNavigationItem.js";
@@ -24,21 +24,22 @@ import { ModalDialog as Co } from "./components/ModalDialog/ModalDialog.js";
24
24
  import { NotificationBadge as Bo } from "./components/NotificationBadge/NotificationBadge.js";
25
25
  import { Pagination as yo, PaginationStyle as uo } from "./components/Pagination/Pagination.js";
26
26
  import { PasswordField as To } from "./components/PasswordField/PasswordField.js";
27
- import { ProgressIndicator as Do, ProgressIndicatorStyle as bo } from "./components/ProgressIndicator/ProgressIndicator.js";
28
- import { RadioButton as vo, RadioButtonStyle as Mo, radioCheckedIconCss as wo, radioIconCss as Ao, radioUncheckedIconCss as Lo } from "./components/RadioButton/RadioButton.js";
29
- import { RadioGroup as Ro } from "./components/RadioButton/RadioGroup.js";
30
- import { Search as Go, SearchStyle as Uo } from "./components/Search/Search.js";
31
- import { Select as jo, SelectStyle as qo } from "./components/Select/Select.js";
32
- import { Switch as Eo, SwitchStyle as Ho } from "./components/Switch/Switch.js";
33
- import { Tabs as Ko, TabsStyle as Oo } from "./components/Tabs/Tabs.js";
34
- import { TabItem as Vo, TabItemStyle as Xo } from "./components/Tabs/TabItem.js";
35
- import { TextArea as Zo } from "./components/TextArea/TextArea.js";
36
- import { TextField as $o } from "./components/TextField/TextField.js";
37
- import { Toast as rr, ToastStyle as er, toaster as tr } from "./components/Toast/Toast.js";
38
- import { Tooltip as pr } from "./components/Tooltip/Tooltip.js";
39
- import { TopAppBar as xr } from "./components/TopAppBar/TopAppBar.js";
40
- import { DataTableComponent as nr } from "./components/DataTable/DataTableComponent.js";
41
- import { parse as sr } from "./node_modules/@zag-js/date-picker/dist/index.js";
27
+ import { ProgressIndicator as Do } from "./components/ProgressIndicator/ProgressIndicator.js";
28
+ import { ProgressIndicatorIndeterminate as ko } from "./components/ProgressIndicator/ProgressIndicatorIndeterminate.js";
29
+ import { RadioButton as Mo, RadioButtonStyle as wo, radioCheckedIconCss as Ao, radioIconCss as Lo, radioUncheckedIconCss as No } from "./components/RadioButton/RadioButton.js";
30
+ import { RadioGroup as Fo } from "./components/RadioButton/RadioGroup.js";
31
+ import { Search as Uo, SearchStyle as Wo } from "./components/Search/Search.js";
32
+ import { Select as qo, SelectStyle as zo } from "./components/Select/Select.js";
33
+ import { Switch as Ho, SwitchStyle as Jo } from "./components/Switch/Switch.js";
34
+ import { Tabs as Oo, TabsStyle as Qo } from "./components/Tabs/Tabs.js";
35
+ import { TabItem as Xo, TabItemStyle as Yo } from "./components/Tabs/TabItem.js";
36
+ import { TextArea as _o } from "./components/TextArea/TextArea.js";
37
+ import { TextField as or } from "./components/TextField/TextField.js";
38
+ import { Toast as er, ToastStyle as tr, toaster as ar } from "./components/Toast/Toast.js";
39
+ import { Tooltip as mr } from "./components/Tooltip/Tooltip.js";
40
+ import { TopAppBar as ir } from "./components/TopAppBar/TopAppBar.js";
41
+ import { DataTableComponent as fr } from "./components/DataTable/DataTableComponent.js";
42
+ import { parse as cr } from "./node_modules/@zag-js/date-picker/dist/index.js";
42
43
  export {
43
44
  a as Accordion,
44
45
  m as AccordionGroup,
@@ -46,7 +47,7 @@ export {
46
47
  n as AvatarStyle,
47
48
  s as Badge,
48
49
  c as BadgeCloseButton,
49
- l as BadgeStyle,
50
+ d as BadgeStyle,
50
51
  h as Banner,
51
52
  S as BottomNavigation,
52
53
  g as BottomNavigationItem,
@@ -59,7 +60,7 @@ export {
59
60
  K as ChoiceBoxStyle,
60
61
  Q as DashboardWidget,
61
62
  X as DataTable,
62
- nr as DataTableComponent,
63
+ fr as DataTableComponent,
63
64
  Z as DatePicker,
64
65
  $ as Divider,
65
66
  oo as DividerStyle,
@@ -77,28 +78,28 @@ export {
77
78
  uo as PaginationStyle,
78
79
  To as PasswordField,
79
80
  Do as ProgressIndicator,
80
- bo as ProgressIndicatorStyle,
81
- vo as RadioButton,
82
- Mo as RadioButtonStyle,
83
- Ro as RadioGroup,
84
- Go as Search,
85
- Uo as SearchStyle,
86
- jo as Select,
87
- qo as SelectStyle,
81
+ ko as ProgressIndicatorIndeterminate,
82
+ Mo as RadioButton,
83
+ wo as RadioButtonStyle,
84
+ Fo as RadioGroup,
85
+ Uo as Search,
86
+ Wo as SearchStyle,
87
+ qo as Select,
88
+ zo as SelectStyle,
88
89
  D as SerendieChartTheme,
89
90
  e as SerendiePreset,
90
- Eo as Switch,
91
- Ho as SwitchStyle,
92
- Vo as TabItem,
93
- Xo as TabItemStyle,
94
- Ko as Tabs,
95
- Oo as TabsStyle,
96
- Zo as TextArea,
97
- $o as TextField,
98
- rr as Toast,
99
- er as ToastStyle,
100
- pr as Tooltip,
101
- xr as TopAppBar,
91
+ Ho as Switch,
92
+ Jo as SwitchStyle,
93
+ Xo as TabItem,
94
+ Yo as TabItemStyle,
95
+ Oo as Tabs,
96
+ Qo as TabsStyle,
97
+ _o as TextArea,
98
+ or as TextField,
99
+ er as Toast,
100
+ tr as ToastStyle,
101
+ mr as Tooltip,
102
+ ir as TopAppBar,
102
103
  q as checkboxCheckedIconCss,
103
104
  z as checkboxIconCss,
104
105
  E as checkboxUncheckedIconCss,
@@ -107,12 +108,12 @@ export {
107
108
  M as getChartColor,
108
109
  w as getChartColors,
109
110
  A as legendChartMargin,
110
- sr as parseDate,
111
- wo as radioCheckedIconCss,
112
- Ao as radioIconCss,
113
- Lo as radioUncheckedIconCss,
111
+ cr as parseDate,
112
+ Ao as radioCheckedIconCss,
113
+ Lo as radioIconCss,
114
+ No as radioUncheckedIconCss,
114
115
  L as spaciousChartMargin,
115
- tr as toaster,
116
+ ar as toaster,
116
117
  N as useBarChartProps,
117
118
  R as useChartProps,
118
119
  F as useLineChartProps,
package/dist/preset.d.ts CHANGED
@@ -2663,6 +2663,14 @@ export declare const SerendiePreset: {
2663
2663
  transform: string;
2664
2664
  };
2665
2665
  };
2666
+ progressIndicatorSlide: {
2667
+ from: {
2668
+ transform: string;
2669
+ };
2670
+ to: {
2671
+ transform: string;
2672
+ };
2673
+ };
2666
2674
  };
2667
2675
  };
2668
2676
  };