@vinyasa/feedback 1.0.21 → 1.0.23

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.
Files changed (61) hide show
  1. package/dist/cjs/alert.cjs +72 -32
  2. package/dist/cjs/banner.cjs +31 -14
  3. package/dist/cjs/circular-progress.cjs +74 -37
  4. package/dist/cjs/empty-state.cjs +47 -23
  5. package/dist/cjs/error-boundary.cjs +72 -32
  6. package/dist/cjs/index.cjs +593 -269
  7. package/dist/cjs/index.css +54 -32
  8. package/dist/cjs/inline-message.cjs +32 -15
  9. package/dist/cjs/loading-overlay.cjs +41 -17
  10. package/dist/cjs/progress-bar.cjs +143 -48
  11. package/dist/cjs/progress-bar.css +7 -2
  12. package/dist/cjs/toaster.cjs +202 -87
  13. package/dist/cjs/toaster.css +47 -30
  14. package/dist/esm/147.css +47 -30
  15. package/dist/esm/147.js +103 -89
  16. package/dist/esm/158.js +31 -19
  17. package/dist/esm/266.js +67 -37
  18. package/dist/esm/277.js +5 -1
  19. package/dist/esm/288.js +25 -20
  20. package/dist/esm/516.js +24 -17
  21. package/dist/esm/872.css +4 -2
  22. package/dist/esm/872.js +54 -19
  23. package/dist/esm/880.js +32 -13
  24. package/dist/esm/903.js +41 -31
  25. package/dist/esm/989.js +23 -16
  26. package/dist/esm/alert.js +1 -1
  27. package/dist/esm/banner.js +1 -1
  28. package/dist/esm/circular-progress.js +1 -1
  29. package/dist/esm/components/alert/Alert.d.ts +23 -7
  30. package/dist/esm/components/alert/index.d.ts +1 -1
  31. package/dist/esm/components/banner/Banner.d.ts +8 -5
  32. package/dist/esm/components/banner/index.d.ts +1 -1
  33. package/dist/esm/components/circular-progress/CircularProgress.d.ts +11 -3
  34. package/dist/esm/components/circular-progress/index.d.ts +1 -1
  35. package/dist/esm/components/empty-state/EmptyState.d.ts +24 -13
  36. package/dist/esm/components/empty-state/index.d.ts +1 -1
  37. package/dist/esm/components/error-boundary/ErrorBoundary.d.ts +16 -9
  38. package/dist/esm/components/error-boundary/index.d.ts +1 -1
  39. package/dist/esm/components/inline-message/InlineMessage.d.ts +5 -0
  40. package/dist/esm/components/inline-message/index.d.ts +1 -1
  41. package/dist/esm/components/loading-overlay/LoadingOverlay.d.ts +11 -1
  42. package/dist/esm/components/loading-overlay/index.d.ts +1 -1
  43. package/dist/esm/components/progress-bar/ProgressBar.d.ts +11 -4
  44. package/dist/esm/components/progress-bar/index.d.ts +1 -1
  45. package/dist/esm/components/spinner/Spinner.d.ts +1 -1
  46. package/dist/esm/components/toaster/Toaster.css.d.ts +2 -5
  47. package/dist/esm/components/toaster/Toaster.d.ts +3 -0
  48. package/dist/esm/components/toaster/ToasterItem.d.ts +18 -0
  49. package/dist/esm/components/toaster/index.d.ts +1 -1
  50. package/dist/esm/components/toaster/toastStore.d.ts +2 -2
  51. package/dist/esm/empty-state.js +1 -1
  52. package/dist/esm/error-boundary.js +1 -1
  53. package/dist/esm/index.d.ts +9 -9
  54. package/dist/esm/index.js +9 -9
  55. package/dist/esm/inline-message.js +1 -1
  56. package/dist/esm/loading-overlay.js +1 -1
  57. package/dist/esm/progress-bar.js +1 -1
  58. package/dist/esm/status.d.ts +3 -1
  59. package/dist/esm/toaster.js +1 -1
  60. package/package.json +15 -11
  61. package/dist/esm/components/toaster/ToastItemView.d.ts +0 -7
package/dist/esm/147.js CHANGED
@@ -1,18 +1,32 @@
1
1
  import "./147.css";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useEffect, useSyncExternalStore } from "react";
3
+ import { forwardRef, useSyncExternalStore } from "react";
4
4
  import { XIcon } from "@vinyasa/icons";
5
5
  import { createRuntimeFn } from "./953.js";
6
6
  import { statusIcons } from "./277.js";
7
- var body = '_1xil9gel';
8
- var closeButton = '_1xil9geo';
9
- var description = '_1xil9gen';
10
- var enterFromBottom = '_1xil9geh';
11
- var enterFromTop = '_1xil9geg';
12
- var exitToBottom = '_1xil9gej';
13
- var exitToTop = '_1xil9gei';
14
- var icon = '_1xil9gek';
15
- var stack = createRuntimeFn({
7
+ import * as __rspack_external__radix_ui_react_toast_5fd51b0f from "@radix-ui/react-toast";
8
+ var action = '_1xil9gel';
9
+ var body = '_1xil9geh';
10
+ var closeButton = '_1xil9gek';
11
+ var description = '_1xil9gej';
12
+ var icon = '_1xil9geg';
13
+ var title = '_1xil9gei';
14
+ var toastCard = createRuntimeFn({
15
+ defaultClassName: '_1xil9geb',
16
+ variantClassNames: {
17
+ status: {
18
+ info: '_1xil9gec',
19
+ success: '_1xil9ged',
20
+ warning: '_1xil9gee',
21
+ error: '_1xil9gef'
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ status: 'info'
26
+ },
27
+ compoundVariants: []
28
+ });
29
+ var viewport = createRuntimeFn({
16
30
  defaultClassName: '_1xil9ge0',
17
31
  variantClassNames: {
18
32
  position: {
@@ -29,22 +43,65 @@ var stack = createRuntimeFn({
29
43
  },
30
44
  compoundVariants: []
31
45
  });
32
- var title = '_1xil9gem';
33
- var toastCard = createRuntimeFn({
34
- defaultClassName: '_1xil9ge7',
35
- variantClassNames: {
36
- status: {
37
- info: '_1xil9ge8',
38
- success: '_1xil9ge9',
39
- warning: '_1xil9gea',
40
- error: '_1xil9geb'
41
- }
42
- },
43
- defaultVariants: {
44
- status: 'info'
45
- },
46
- compoundVariants: []
47
- });
46
+ const ToastTitle = /*#__PURE__*/ forwardRef(({ className, ...rest }, ref)=>/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_toast_5fd51b0f.Title, {
47
+ ref: ref,
48
+ className: className ? `${title} ${className}` : title,
49
+ ...rest
50
+ }));
51
+ ToastTitle.displayName = 'ToastTitle';
52
+ const ToastDescription = /*#__PURE__*/ forwardRef(({ className, ...rest }, ref)=>/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_toast_5fd51b0f.Description, {
53
+ ref: ref,
54
+ className: className ? `${description} ${className}` : description,
55
+ ...rest
56
+ }));
57
+ ToastDescription.displayName = "ToastDescription";
58
+ const ToastAction = /*#__PURE__*/ forwardRef(({ className, ...rest }, ref)=>/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_toast_5fd51b0f.Action, {
59
+ ref: ref,
60
+ className: className ? `${action} ${className}` : action,
61
+ ...rest
62
+ }));
63
+ ToastAction.displayName = 'ToastAction';
64
+ const ToastClose = /*#__PURE__*/ forwardRef(({ className, ...rest }, ref)=>/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_toast_5fd51b0f.Close, {
65
+ ref: ref,
66
+ className: className ? `${closeButton} ${className}` : closeButton,
67
+ ...rest
68
+ }));
69
+ ToastClose.displayName = 'ToastClose';
70
+ const ToasterItem = ({ status, title: itemTitle, description: itemDescription, duration, open, edge, onOpenChange })=>{
71
+ const Icon = statusIcons[status];
72
+ return /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_toast_5fd51b0f.Root, {
73
+ className: toastCard({
74
+ status
75
+ }),
76
+ "data-edge": edge,
77
+ open: open,
78
+ duration: 0 === duration ? 1 / 0 : duration,
79
+ onOpenChange: onOpenChange,
80
+ forceMount: true,
81
+ children: [
82
+ /*#__PURE__*/ jsx(Icon, {
83
+ className: icon,
84
+ "aria-hidden": "true"
85
+ }),
86
+ /*#__PURE__*/ jsxs("div", {
87
+ className: body,
88
+ children: [
89
+ /*#__PURE__*/ jsx(ToastTitle, {
90
+ children: itemTitle
91
+ }),
92
+ itemDescription ? /*#__PURE__*/ jsx(ToastDescription, {
93
+ children: itemDescription
94
+ }) : null
95
+ ]
96
+ }),
97
+ /*#__PURE__*/ jsx(ToastClose, {
98
+ "aria-label": "Dismiss",
99
+ children: /*#__PURE__*/ jsx(XIcon, {})
100
+ })
101
+ ]
102
+ });
103
+ };
104
+ const toaster_ToasterItem = ToasterItem;
48
105
  const TOAST_EXIT_DURATION_MS = 150;
49
106
  let toasts = [];
50
107
  const listeners = new Set();
@@ -68,7 +125,7 @@ const show = (options)=>{
68
125
  title: options.title,
69
126
  description: options.description,
70
127
  duration: options.duration ?? 4000,
71
- exiting: false
128
+ open: true
72
129
  };
73
130
  toasts = [
74
131
  ...toasts,
@@ -79,10 +136,10 @@ const show = (options)=>{
79
136
  };
80
137
  const dismiss = (id)=>{
81
138
  const target = toasts.find((item)=>item.id === id);
82
- if (!target || target.exiting) return;
139
+ if (!target?.open) return;
83
140
  toasts = toasts.map((item)=>item.id === id ? {
84
141
  ...item,
85
- exiting: true
142
+ open: false
86
143
  } : item);
87
144
  notify();
88
145
  setTimeout(()=>{
@@ -94,71 +151,28 @@ const toast = {
94
151
  show: show,
95
152
  dismiss: dismiss
96
153
  };
97
- const ToastItemView = ({ id, status, title: itemTitle, description: itemDescription, duration, exiting, edge })=>{
98
- useEffect(()=>{
99
- if (duration <= 0) return;
100
- const timer = setTimeout(()=>{
101
- dismiss(id);
102
- }, duration);
103
- return ()=>{
104
- clearTimeout(timer);
105
- };
106
- }, [
107
- id,
108
- duration
109
- ]);
110
- const Icon = statusIcons[status];
111
- const animationClass = exiting ? 'top' === edge ? exitToTop : exitToBottom : 'top' === edge ? enterFromTop : enterFromBottom;
112
- return /*#__PURE__*/ jsxs("div", {
113
- className: `${toastCard({
114
- status
115
- })} ${animationClass}`,
116
- role: "status",
117
- children: [
118
- /*#__PURE__*/ jsx(Icon, {
119
- className: icon,
120
- "aria-hidden": "true"
121
- }),
122
- /*#__PURE__*/ jsxs("div", {
123
- className: body,
124
- children: [
125
- /*#__PURE__*/ jsx("p", {
126
- className: title,
127
- children: itemTitle
128
- }),
129
- itemDescription ? /*#__PURE__*/ jsx("p", {
130
- className: description,
131
- children: itemDescription
132
- }) : null
133
- ]
134
- }),
135
- /*#__PURE__*/ jsx("button", {
136
- type: "button",
137
- className: closeButton,
138
- onClick: ()=>{
139
- dismiss(id);
140
- },
141
- "aria-label": "Dismiss",
142
- children: /*#__PURE__*/ jsx(XIcon, {})
143
- })
144
- ]
145
- });
146
- };
147
- const toaster_ToastItemView = ToastItemView;
148
154
  const emptySnapshot = [];
149
155
  const Toaster = ({ position = 'bottom-right' })=>{
150
156
  const items = useSyncExternalStore(subscribe, getSnapshot, ()=>emptySnapshot);
151
157
  const edge = position.startsWith('top') ? 'top' : 'bottom';
152
- return /*#__PURE__*/ jsx("div", {
153
- className: stack({
154
- position
155
- }),
156
- children: items.map((item)=>/*#__PURE__*/ jsx(toaster_ToastItemView, {
157
- ...item,
158
- edge: edge
159
- }, item.id))
158
+ return /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_toast_5fd51b0f.Provider, {
159
+ duration: 4000,
160
+ children: [
161
+ items.map((item)=>/*#__PURE__*/ jsx(toaster_ToasterItem, {
162
+ ...item,
163
+ edge: edge,
164
+ onOpenChange: (open)=>{
165
+ if (!open) dismiss(item.id);
166
+ }
167
+ }, item.id)),
168
+ /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_toast_5fd51b0f.Viewport, {
169
+ className: viewport({
170
+ position
171
+ })
172
+ })
173
+ ]
160
174
  });
161
175
  };
162
176
  Toaster.displayName = 'Toaster';
163
177
  const toaster_Toaster = Toaster;
164
- export { toast, toaster_Toaster as Toaster };
178
+ export { ToastAction, ToastClose, ToastDescription, ToastTitle, toast, toaster_Toaster as Toaster };
package/dist/esm/158.js CHANGED
@@ -1,31 +1,43 @@
1
1
  import "./158.css";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import box from "@vinyasa/layout/box";
4
- import { forwardRef } from "react";
4
+ import { createContext, forwardRef, useContext } from "react";
5
5
  import { Spinner as spinner_Spinner } from "./703.js";
6
6
  var backdrop = '_1vw410a2';
7
7
  var overlay = '_1vw410a1';
8
8
  var wrapper = '_1vw410a0';
9
+ const LoadingOverlayContext = /*#__PURE__*/ createContext(false);
9
10
  const LoadingOverlay = /*#__PURE__*/ forwardRef(({ visible, className, children, ...rest }, ref)=>{
10
11
  const classes = className ? `${wrapper} ${className}` : wrapper;
11
- return /*#__PURE__*/ jsxs(box, {
12
- ref: ref,
13
- className: classes,
14
- ...rest,
15
- children: [
16
- children,
17
- visible ? /*#__PURE__*/ jsxs("div", {
18
- className: overlay,
19
- children: [
20
- /*#__PURE__*/ jsx("div", {
21
- className: backdrop
22
- }),
23
- /*#__PURE__*/ jsx(spinner_Spinner, {})
24
- ]
25
- }) : null
26
- ]
12
+ return /*#__PURE__*/ jsx(LoadingOverlayContext.Provider, {
13
+ value: visible,
14
+ children: /*#__PURE__*/ jsx(box, {
15
+ ref: ref,
16
+ className: classes,
17
+ ...rest,
18
+ children: children
19
+ })
27
20
  });
28
21
  });
29
22
  LoadingOverlay.displayName = 'LoadingOverlay';
30
23
  const loading_overlay_LoadingOverlay = LoadingOverlay;
31
- export { loading_overlay_LoadingOverlay as LoadingOverlay };
24
+ const LoadingOverlayBackdrop = ({ className, ...rest })=>{
25
+ const visible = useContext(LoadingOverlayContext);
26
+ if (!visible) return null;
27
+ return /*#__PURE__*/ jsx("div", {
28
+ className: className ? `${backdrop} ${className}` : backdrop,
29
+ ...rest
30
+ });
31
+ };
32
+ LoadingOverlayBackdrop.displayName = 'LoadingOverlayBackdrop';
33
+ const LoadingOverlayContent = ({ className, children, ...rest })=>{
34
+ const visible = useContext(LoadingOverlayContext);
35
+ if (!visible) return null;
36
+ return /*#__PURE__*/ jsx("div", {
37
+ className: className ? `${overlay} ${className}` : overlay,
38
+ ...rest,
39
+ children: children ?? /*#__PURE__*/ jsx(spinner_Spinner, {})
40
+ });
41
+ };
42
+ LoadingOverlayContent.displayName = 'LoadingOverlayContent';
43
+ export { LoadingOverlayBackdrop, LoadingOverlayContent, loading_overlay_LoadingOverlay as LoadingOverlay };
package/dist/esm/266.js CHANGED
@@ -1,17 +1,20 @@
1
1
  import "./266.css";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
3
+ import { createContext, forwardRef, useContext } from "react";
4
4
  import { resolveSpacingStyle } from "./474.js";
5
+ import * as __rspack_external__radix_ui_react_progress_84970133 from "@radix-ui/react-progress";
5
6
  var fill = '_1af39sp4';
6
7
  var indeterminate = '_1af39sp2';
7
8
  var svg = '_1af39sp1';
8
9
  var track = '_1af39sp3';
9
- const CircularProgress = /*#__PURE__*/ forwardRef(({ value, max = 100, size = 32, strokeWidth = 4, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, ...rest }, ref)=>{
10
- const radius = (size - strokeWidth) / 2;
11
- const circumference = 2 * Math.PI * radius;
10
+ const CircularProgressContext = /*#__PURE__*/ createContext({
11
+ value: null,
12
+ max: 100,
13
+ size: 32,
14
+ strokeWidth: 4
15
+ });
16
+ const CircularProgress = /*#__PURE__*/ forwardRef(({ value, max = 100, size = 32, strokeWidth = 4, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children, ...rest }, ref)=>{
12
17
  const isIndeterminate = void 0 === value;
13
- const percent = isIndeterminate ? 25 : Math.min(100, Math.max(0, value / max * 100));
14
- const dashOffset = circumference - percent / 100 * circumference;
15
18
  const computedStyle = {
16
19
  ...resolveSpacingStyle({
17
20
  m,
@@ -37,39 +40,66 @@ const CircularProgress = /*#__PURE__*/ forwardRef(({ value, max = 100, size = 32
37
40
  className
38
41
  ].filter(Boolean).join(' ');
39
42
  const center = size / 2;
40
- return /*#__PURE__*/ jsxs("svg", {
41
- ref: ref,
42
- role: "progressbar",
43
- "aria-valuenow": isIndeterminate ? void 0 : value,
44
- "aria-valuemin": 0,
45
- "aria-valuemax": max,
46
- width: size,
47
- height: size,
48
- viewBox: `0 0 ${String(size)} ${String(size)}`,
49
- className: classes,
50
- style: computedStyle,
51
- ...rest,
52
- children: [
53
- /*#__PURE__*/ jsx("circle", {
54
- className: track,
55
- cx: center,
56
- cy: center,
57
- r: radius,
58
- strokeWidth: strokeWidth
59
- }),
60
- /*#__PURE__*/ jsx("circle", {
61
- className: fill,
62
- cx: center,
63
- cy: center,
64
- r: radius,
65
- strokeWidth: strokeWidth,
66
- strokeDasharray: circumference,
67
- strokeDashoffset: dashOffset,
68
- transform: `rotate(-90 ${String(center)} ${String(center)})`
43
+ const radius = (size - strokeWidth) / 2;
44
+ return /*#__PURE__*/ jsx(CircularProgressContext.Provider, {
45
+ value: {
46
+ value: isIndeterminate ? null : value,
47
+ max,
48
+ size,
49
+ strokeWidth
50
+ },
51
+ children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_progress_84970133.Root, {
52
+ value: isIndeterminate ? null : value,
53
+ max: max,
54
+ ...rest,
55
+ asChild: true,
56
+ children: /*#__PURE__*/ jsxs("svg", {
57
+ ref: ref,
58
+ width: size,
59
+ height: size,
60
+ viewBox: `0 0 ${String(size)} ${String(size)}`,
61
+ className: classes,
62
+ style: computedStyle,
63
+ children: [
64
+ /*#__PURE__*/ jsx("circle", {
65
+ className: track,
66
+ cx: center,
67
+ cy: center,
68
+ r: radius,
69
+ strokeWidth: strokeWidth
70
+ }),
71
+ children
72
+ ]
69
73
  })
70
- ]
74
+ })
71
75
  });
72
76
  });
73
77
  CircularProgress.displayName = 'CircularProgress';
74
78
  const circular_progress_CircularProgress = CircularProgress;
75
- export { circular_progress_CircularProgress as CircularProgress };
79
+ const CircularProgressIndicator = ({ className, style, ...rest })=>{
80
+ const { value, max, size, strokeWidth } = useContext(CircularProgressContext);
81
+ const isIndeterminate = null === value;
82
+ const radius = (size - strokeWidth) / 2;
83
+ const circumference = 2 * Math.PI * radius;
84
+ const percent = isIndeterminate ? 25 : Math.min(100, Math.max(0, value / max * 100));
85
+ const dashOffset = circumference - percent / 100 * circumference;
86
+ const center = size / 2;
87
+ const classes = className ? `${fill} ${className}` : fill;
88
+ return /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_progress_84970133.Indicator, {
89
+ asChild: true,
90
+ children: /*#__PURE__*/ jsx("circle", {
91
+ className: classes,
92
+ cx: center,
93
+ cy: center,
94
+ r: radius,
95
+ strokeWidth: strokeWidth,
96
+ strokeDasharray: circumference,
97
+ strokeDashoffset: dashOffset,
98
+ transform: `rotate(-90 ${String(center)} ${String(center)})`,
99
+ style: style,
100
+ ...rest
101
+ })
102
+ });
103
+ };
104
+ CircularProgressIndicator.displayName = 'CircularProgressIndicator';
105
+ export { CircularProgressIndicator, circular_progress_CircularProgress as CircularProgress };
package/dist/esm/277.js CHANGED
@@ -1,8 +1,12 @@
1
1
  import { AlertTriangleIcon, CheckCircleIcon, InfoIcon, XIcon } from "@vinyasa/icons";
2
+ import { createContext, useContext } from "react";
2
3
  const statusIcons = {
3
4
  info: InfoIcon,
4
5
  success: CheckCircleIcon,
5
6
  warning: AlertTriangleIcon,
6
7
  error: XIcon
7
8
  };
8
- export { statusIcons };
9
+ const StatusContext = createContext('info');
10
+ const StatusProvider = StatusContext.Provider;
11
+ const useStatusContext = ()=>useContext(StatusContext);
12
+ export { StatusProvider, statusIcons, useStatusContext };
package/dist/esm/288.js CHANGED
@@ -1,38 +1,43 @@
1
1
  import "./288.css";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import { Center, Stack } from "@vinyasa/layout";
4
4
  import { Heading, Paragraph } from "@vinyasa/typography";
5
5
  import { forwardRef } from "react";
6
6
  var iconWrapper = 'dmnndp0';
7
- const EmptyState = /*#__PURE__*/ forwardRef(({ icon, title, description, action, p = 6, ...rest }, ref)=>/*#__PURE__*/ jsx(Center, {
7
+ const EmptyState = /*#__PURE__*/ forwardRef(({ p = 6, children, ...rest }, ref)=>/*#__PURE__*/ jsx(Center, {
8
8
  ref: ref,
9
9
  p: p,
10
10
  ...rest,
11
- children: /*#__PURE__*/ jsxs(Stack, {
11
+ children: /*#__PURE__*/ jsx(Stack, {
12
12
  gap: 2,
13
13
  align: "center",
14
14
  style: {
15
15
  textAlign: 'center',
16
16
  maxWidth: '24rem'
17
17
  },
18
- children: [
19
- icon ? /*#__PURE__*/ jsx("span", {
20
- className: iconWrapper,
21
- children: icon
22
- }) : null,
23
- /*#__PURE__*/ jsx(Heading, {
24
- as: "h3",
25
- size: "lg",
26
- children: title
27
- }),
28
- description ? /*#__PURE__*/ jsx(Paragraph, {
29
- color: "muted",
30
- children: description
31
- }) : null,
32
- action
33
- ]
18
+ children: children
34
19
  })
35
20
  }));
36
21
  EmptyState.displayName = 'EmptyState';
37
22
  const empty_state_EmptyState = EmptyState;
38
- export { empty_state_EmptyState as EmptyState };
23
+ const EmptyStateIcon = ({ className, ...rest })=>/*#__PURE__*/ jsx("span", {
24
+ className: className ? `${iconWrapper} ${className}` : iconWrapper,
25
+ ...rest
26
+ });
27
+ EmptyStateIcon.displayName = 'EmptyStateIcon';
28
+ const EmptyStateTitle = ({ size = 'lg', ...rest })=>/*#__PURE__*/ jsx(Heading, {
29
+ as: "h3",
30
+ size: size,
31
+ ...rest
32
+ });
33
+ EmptyStateTitle.displayName = 'EmptyStateTitle';
34
+ const EmptyStateDescription = ({ color = 'muted', ...rest })=>/*#__PURE__*/ jsx(Paragraph, {
35
+ color: color,
36
+ ...rest
37
+ });
38
+ EmptyStateDescription.displayName = "EmptyStateDescription";
39
+ const EmptyStateAction = (props)=>/*#__PURE__*/ jsx("div", {
40
+ ...props
41
+ });
42
+ EmptyStateAction.displayName = 'EmptyStateAction';
43
+ export { EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, empty_state_EmptyState as EmptyState };
package/dist/esm/516.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./516.css";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import { forwardRef } from "react";
4
4
  import { createRuntimeFn } from "./953.js";
5
- import { statusIcons } from "./277.js";
6
5
  import { resolveSpacingStyle } from "./474.js";
6
+ import { StatusProvider, useStatusContext, statusIcons } from "./277.js";
7
7
  var icon = '_14g63aj5';
8
8
  var inlineMessage = createRuntimeFn({
9
9
  defaultClassName: '_14g63aj0',
@@ -21,7 +21,6 @@ var inlineMessage = createRuntimeFn({
21
21
  compoundVariants: []
22
22
  });
23
23
  const InlineMessage = /*#__PURE__*/ forwardRef(({ status = 'info', m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children, ...rest }, ref)=>{
24
- const Icon = statusIcons[status];
25
24
  const classes = className ? `${inlineMessage({
26
25
  status
27
26
  })} ${className}` : inlineMessage({
@@ -46,21 +45,29 @@ const InlineMessage = /*#__PURE__*/ forwardRef(({ status = 'info', m, mt, mr, mb
46
45
  }),
47
46
  ...style
48
47
  };
49
- return /*#__PURE__*/ jsxs("span", {
50
- ref: ref,
51
- role: "alert",
52
- className: classes,
53
- style: computedStyle,
54
- ...rest,
55
- children: [
56
- /*#__PURE__*/ jsx(Icon, {
57
- className: icon,
58
- "aria-hidden": "true"
59
- }),
60
- children
61
- ]
48
+ return /*#__PURE__*/ jsx(StatusProvider, {
49
+ value: status,
50
+ children: /*#__PURE__*/ jsx("span", {
51
+ ref: ref,
52
+ role: "alert",
53
+ className: classes,
54
+ style: computedStyle,
55
+ ...rest,
56
+ children: children
57
+ })
62
58
  });
63
59
  });
64
60
  InlineMessage.displayName = 'InlineMessage';
65
61
  const inline_message_InlineMessage = InlineMessage;
66
- export { inline_message_InlineMessage as InlineMessage };
62
+ const InlineMessageIcon = ({ className, children, ...rest })=>{
63
+ const status = useStatusContext();
64
+ const StatusIcon = statusIcons[status];
65
+ return /*#__PURE__*/ jsx("span", {
66
+ className: className ? `${icon} ${className}` : icon,
67
+ "aria-hidden": "true",
68
+ ...rest,
69
+ children: children ?? /*#__PURE__*/ jsx(StatusIcon, {})
70
+ });
71
+ };
72
+ InlineMessageIcon.displayName = 'InlineMessageIcon';
73
+ export { InlineMessageIcon, inline_message_InlineMessage as InlineMessage };
package/dist/esm/872.css CHANGED
@@ -3,13 +3,15 @@
3
3
  border-radius: var(--vinyasa-radius-full);
4
4
  width: 100%;
5
5
  height: .5rem;
6
+ position: relative;
6
7
  overflow: hidden;
7
8
  }
8
9
 
9
10
  ._1ie0lek1 {
10
11
  background-color: var(--vinyasa-primary);
11
12
  border-radius: var(--vinyasa-radius-full);
12
- height: 100%;
13
- transition: width var(--vinyasa-motion-duration-normal) var(--vinyasa-motion-easing-standard);
13
+ transition: transform var(--vinyasa-motion-duration-normal) var(--vinyasa-motion-easing-standard);
14
+ position: absolute;
15
+ inset: 0;
14
16
  }
15
17
 
package/dist/esm/872.js CHANGED
@@ -1,29 +1,64 @@
1
1
  import "./872.css";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import box from "@vinyasa/layout/box";
4
- import { forwardRef } from "react";
3
+ import { createContext, forwardRef, useContext } from "react";
4
+ import { resolveSpacingStyle } from "./474.js";
5
+ import * as __rspack_external__radix_ui_react_progress_84970133 from "@radix-ui/react-progress";
5
6
  var fill = '_1ie0lek1';
6
7
  var track = '_1ie0lek0';
7
- const ProgressBar = /*#__PURE__*/ forwardRef(({ value, max = 100, className, style, ...rest }, ref)=>{
8
+ const ProgressBarContext = /*#__PURE__*/ createContext({
9
+ value: 0,
10
+ max: 100
11
+ });
12
+ const ProgressBar = /*#__PURE__*/ forwardRef(({ value, max = 100, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, ...rest }, ref)=>{
13
+ const computedStyle = {
14
+ ...resolveSpacingStyle({
15
+ m,
16
+ mt,
17
+ mr,
18
+ mb,
19
+ ml,
20
+ mx,
21
+ my,
22
+ p,
23
+ pt,
24
+ pr,
25
+ pb,
26
+ pl,
27
+ px,
28
+ py
29
+ }),
30
+ ...style
31
+ };
8
32
  const classes = className ? `${track} ${className}` : track;
9
- const percent = Math.min(100, Math.max(0, value / max * 100));
10
- return /*#__PURE__*/ jsx(box, {
11
- ref: ref,
12
- role: "progressbar",
13
- "aria-valuenow": value,
14
- "aria-valuemin": 0,
15
- "aria-valuemax": max,
16
- className: classes,
17
- style: style,
18
- ...rest,
19
- children: /*#__PURE__*/ jsx("div", {
20
- className: fill,
21
- style: {
22
- width: `${String(percent)}%`
23
- }
33
+ return /*#__PURE__*/ jsx(ProgressBarContext.Provider, {
34
+ value: {
35
+ value,
36
+ max
37
+ },
38
+ children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_progress_84970133.Root, {
39
+ ref: ref,
40
+ value: value,
41
+ max: max,
42
+ className: classes,
43
+ style: computedStyle,
44
+ ...rest
24
45
  })
25
46
  });
26
47
  });
27
48
  ProgressBar.displayName = 'ProgressBar';
28
49
  const progress_bar_ProgressBar = ProgressBar;
29
- export { progress_bar_ProgressBar as ProgressBar };
50
+ const ProgressBarIndicator = ({ className, style, ...rest })=>{
51
+ const { value, max } = useContext(ProgressBarContext);
52
+ const percent = Math.min(100, Math.max(0, value / max * 100));
53
+ const classes = className ? `${fill} ${className}` : fill;
54
+ return /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_progress_84970133.Indicator, {
55
+ className: classes,
56
+ style: {
57
+ transform: `translateX(-${String(100 - percent)}%)`,
58
+ ...style
59
+ },
60
+ ...rest
61
+ });
62
+ };
63
+ ProgressBarIndicator.displayName = 'ProgressBarIndicator';
64
+ export { ProgressBarIndicator, progress_bar_ProgressBar as ProgressBar };