@devalok/shilp-sutra 0.2.1 → 0.3.1
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 +239 -0
- package/dist/composed/content-card.d.ts +2 -2
- package/dist/composed/error-boundary.js +1 -1
- package/dist/shell/notification-preferences.js +14 -14
- package/dist/tailwind/index.cjs +15 -10
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +15 -10
- package/dist/tokens/index.css +1 -0
- package/dist/tokens/semantic.css +3 -3
- package/dist/tokens/typography.css +7 -7
- package/dist/ui/alert.d.ts +8 -8
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +10 -10
- package/dist/ui/autocomplete.d.ts +3 -3
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +1 -1
- package/dist/ui/badge.d.ts +10 -7
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +82 -30
- package/dist/ui/banner.d.ts +6 -6
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +17 -17
- package/dist/ui/button-group.d.ts +8 -5
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +17 -17
- package/dist/ui/button.d.ts +10 -8
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +65 -47
- package/dist/ui/chip.d.ts +5 -5
- package/dist/ui/chip.js +10 -10
- package/dist/ui/combobox.d.ts +6 -7
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +32 -31
- package/dist/ui/dialog.d.ts +5 -11
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +53 -53
- package/dist/ui/file-upload.js +34 -34
- package/dist/ui/form.d.ts +31 -28
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +34 -32
- package/dist/ui/icon-button.d.ts +4 -4
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +69 -69
- package/dist/ui/number-input.d.ts +8 -10
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +48 -47
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/search-input.js +8 -8
- package/dist/ui/sheet.d.ts +6 -12
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +49 -49
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/slider.d.ts +1 -0
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/spinner.js +7 -7
- package/dist/ui/switch.d.ts +4 -1
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +13 -12
- package/dist/ui/toast.d.ts +3 -3
- package/dist/ui/toast.js +22 -22
- package/dist/ui/toaster.d.ts +3 -3
- package/dist/ui/toggle-group.d.ts +2 -2
- package/dist/ui/toggle.d.ts +2 -2
- package/fonts/Inter-Italic-Variable.woff2 +0 -0
- package/fonts/Inter-Variable.woff2 +0 -0
- package/fonts/Ranade-Variable.woff2 +0 -0
- package/fonts/Ranade-VariableItalic.woff2 +0 -0
- package/package.json +208 -160
- package/fonts/GoogleSans-Italic-Variable.ttf +0 -0
- package/fonts/GoogleSans-Variable.ttf +0 -0
- package/fonts/Ranade-Variable.ttf +0 -0
- package/fonts/Ranade-VariableItalic.ttf +0 -0
package/dist/ui/sheet.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as d, jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
4
|
import { Root as b, Close as i, Portal as x, Trigger as y, Content as l, Description as n, Overlay as m, Title as c } from "../primitives/react-dialog.js";
|
|
5
5
|
import { cva as u } from "class-variance-authority";
|
|
6
6
|
import { IconX as N } from "@tabler/icons-react";
|
|
7
|
-
import { cn as
|
|
8
|
-
const O = b, P = y, V = i, g = x, f =
|
|
7
|
+
import { cn as r } from "./lib/utils.js";
|
|
8
|
+
const O = b, P = y, V = i, g = x, f = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
9
9
|
m,
|
|
10
10
|
{
|
|
11
|
-
className:
|
|
11
|
+
className: r(
|
|
12
12
|
"fixed inset-0 z-modal bg-overlay duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
13
13
|
e
|
|
14
14
|
),
|
|
15
15
|
...t,
|
|
16
|
-
ref:
|
|
16
|
+
ref: a
|
|
17
17
|
}
|
|
18
18
|
));
|
|
19
19
|
f.displayName = m.displayName;
|
|
@@ -32,78 +32,78 @@ const v = u(
|
|
|
32
32
|
side: "right"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
),
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
), w = s.forwardRef(({ side: e = "right", className: t, children: a, ...p }, h) => /* @__PURE__ */ d(g, { children: [
|
|
36
|
+
/* @__PURE__ */ o(f, {}),
|
|
37
37
|
/* @__PURE__ */ d(
|
|
38
38
|
l,
|
|
39
39
|
{
|
|
40
40
|
ref: h,
|
|
41
|
-
className:
|
|
41
|
+
className: r(v({ side: e }), t),
|
|
42
42
|
...p,
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */ d(i, { className: "absolute right-ds-05 top-ds-05 rounded-ds-sm text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:pointer-events-none", children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ d(i, { className: "absolute right-ds-05 top-ds-05 min-h-6 min-w-6 flex items-center justify-center rounded-ds-sm text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:pointer-events-none", children: [
|
|
45
|
+
/* @__PURE__ */ o(N, { className: "h-ico-sm w-ico-sm" }),
|
|
46
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
47
47
|
] }),
|
|
48
|
-
|
|
48
|
+
a
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
)
|
|
52
52
|
] }));
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
className: e,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
w.displayName = l.displayName;
|
|
54
|
+
const S = s.forwardRef(
|
|
55
|
+
({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
ref: a,
|
|
59
|
+
className: r(
|
|
60
|
+
"flex flex-col space-y-ds-03 text-center sm:text-left",
|
|
61
|
+
e
|
|
62
|
+
),
|
|
63
|
+
...t
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
66
|
);
|
|
67
|
-
|
|
68
|
-
const R = (
|
|
69
|
-
className: e,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
67
|
+
S.displayName = "SheetHeader";
|
|
68
|
+
const R = s.forwardRef(
|
|
69
|
+
({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
ref: a,
|
|
73
|
+
className: r(
|
|
74
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-ds-03",
|
|
75
|
+
e
|
|
76
|
+
),
|
|
77
|
+
...t
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
80
|
);
|
|
81
81
|
R.displayName = "SheetFooter";
|
|
82
|
-
const C =
|
|
82
|
+
const C = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
83
83
|
c,
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
86
|
-
className:
|
|
85
|
+
ref: a,
|
|
86
|
+
className: r("text-ds-lg font-semibold text-text-primary", e),
|
|
87
87
|
...t
|
|
88
88
|
}
|
|
89
89
|
));
|
|
90
90
|
C.displayName = c.displayName;
|
|
91
|
-
const
|
|
91
|
+
const j = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
92
92
|
n,
|
|
93
93
|
{
|
|
94
|
-
ref:
|
|
95
|
-
className:
|
|
94
|
+
ref: a,
|
|
95
|
+
className: r("text-ds-md text-text-secondary", e),
|
|
96
96
|
...t
|
|
97
97
|
}
|
|
98
98
|
));
|
|
99
|
-
|
|
99
|
+
j.displayName = n.displayName;
|
|
100
100
|
export {
|
|
101
101
|
O as Sheet,
|
|
102
102
|
V as SheetClose,
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
w as SheetContent,
|
|
104
|
+
j as SheetDescription,
|
|
105
105
|
R as SheetFooter,
|
|
106
|
-
|
|
106
|
+
S as SheetHeader,
|
|
107
107
|
f as SheetOverlay,
|
|
108
108
|
g as SheetPortal,
|
|
109
109
|
C as SheetTitle,
|
package/dist/ui/sidebar.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare const SidebarMenuButton: import('react').ForwardRefExoticComponent<Omit<
|
|
|
46
46
|
isActive?: boolean;
|
|
47
47
|
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
48
48
|
} & VariantProps<(props?: ({
|
|
49
|
-
variant?: "
|
|
49
|
+
variant?: "outline" | "default" | null | undefined;
|
|
50
50
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
51
51
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
52
52
|
declare const SidebarMenuAction: import('react').ForwardRefExoticComponent<Omit<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
package/dist/ui/slider.d.ts
CHANGED
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as SliderPrimitive from '../primitives/react-slider';
|
|
4
4
|
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
export type SliderProps = React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>;
|
|
5
6
|
export { Slider };
|
|
6
7
|
//# sourceMappingURL=slider.d.ts.map
|
package/dist/ui/slider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/ui/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAI3D,QAAA,MAAM,MAAM,yJAoBV,CAAA;AAGF,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/ui/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAI3D,QAAA,MAAM,MAAM,yJAoBV,CAAA;AAGF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAA;AAErF,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/dist/ui/spinner.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as a from "react";
|
|
3
3
|
import { cn as c } from "./lib/utils.js";
|
|
4
|
-
const
|
|
4
|
+
const l = {
|
|
5
5
|
sm: "h-ico-sm w-ico-sm",
|
|
6
6
|
md: "h-ico-md w-ico-md",
|
|
7
7
|
lg: "h-ico-lg w-ico-lg"
|
|
8
|
-
}, t =
|
|
9
|
-
({ size:
|
|
8
|
+
}, t = a.forwardRef(
|
|
9
|
+
({ size: e = "md", className: s, ...i }, n) => /* @__PURE__ */ r("span", { role: "status", children: [
|
|
10
10
|
/* @__PURE__ */ r(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
13
|
-
ref:
|
|
14
|
-
className: c("animate-spin",
|
|
13
|
+
ref: n,
|
|
14
|
+
className: c("animate-spin motion-reduce:animate-none", l[e], s),
|
|
15
15
|
viewBox: "0 0 24 24",
|
|
16
16
|
fill: "none",
|
|
17
17
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
-
...
|
|
18
|
+
...i,
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ o(
|
|
21
21
|
"circle",
|
package/dist/ui/switch.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as SwitchPrimitives from "../primitives/react-switch";
|
|
4
|
-
|
|
4
|
+
export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
|
5
|
+
error?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
8
|
export { Switch };
|
|
6
9
|
//# sourceMappingURL=switch.d.ts.map
|
package/dist/ui/switch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/ui/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAA;AAI5D,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/ui/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAA;AAI5D,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC;IAC/F,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,MAAM,uFAmBV,CAAA;AAGF,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/dist/ui/switch.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { Root as
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
7
|
-
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { Root as o, Thumb as d } from "../primitives/react-switch.js";
|
|
5
|
+
import { cn as r } from "./lib/utils.js";
|
|
6
|
+
const c = n.forwardRef(({ className: t, error: a, ...s }, i) => /* @__PURE__ */ e(
|
|
7
|
+
o,
|
|
8
8
|
{
|
|
9
|
-
className:
|
|
9
|
+
className: r(
|
|
10
10
|
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-transparent shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-[0.38] data-[state=checked]:bg-interactive data-[state=unchecked]:bg-border-strong",
|
|
11
|
-
|
|
11
|
+
a && "border-border-error data-[state=checked]:bg-error",
|
|
12
|
+
t
|
|
12
13
|
),
|
|
13
14
|
...s,
|
|
14
|
-
ref:
|
|
15
|
+
ref: i,
|
|
15
16
|
children: /* @__PURE__ */ e(
|
|
16
|
-
|
|
17
|
+
d,
|
|
17
18
|
{
|
|
18
|
-
className:
|
|
19
|
+
className: r(
|
|
19
20
|
"pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-text-on-color shadow-02 ring-0 transition-transform duration-fast-01 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
20
21
|
)
|
|
21
22
|
}
|
|
22
23
|
)
|
|
23
24
|
}
|
|
24
25
|
));
|
|
25
|
-
|
|
26
|
+
c.displayName = o.displayName;
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
c as Switch
|
|
28
29
|
};
|
package/dist/ui/toast.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as ToastPrimitives from '../primitives/react-toast';
|
|
|
5
5
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
6
6
|
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
7
7
|
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
8
|
-
|
|
8
|
+
color?: "default" | "error" | "warning" | "success" | "info" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
10
10
|
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -18,10 +18,10 @@ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimit
|
|
|
18
18
|
* @example
|
|
19
19
|
* // Imperative approach (recommended for user-triggered notifications):
|
|
20
20
|
* const { toast } = useToast()
|
|
21
|
-
* toast({ title: 'Saved!',
|
|
21
|
+
* toast({ title: 'Saved!', color: 'success' })
|
|
22
22
|
*
|
|
23
23
|
* // Declarative (for tests/Storybook only):
|
|
24
|
-
* <Toast open
|
|
24
|
+
* <Toast open color="error">
|
|
25
25
|
* <ToastTitle>Error</ToastTitle>
|
|
26
26
|
* <ToastDescription>Something went wrong.</ToastDescription>
|
|
27
27
|
* <ToastClose />
|
package/dist/ui/toast.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import { Provider as p, Root as i, Action as d, Close as n, Description as l, Title as c, Viewport as m } from "../primitives/react-toast.js";
|
|
5
5
|
import { cva as u } from "class-variance-authority";
|
|
6
6
|
import { IconX as b } from "@tabler/icons-react";
|
|
7
7
|
import { cn as a } from "./lib/utils.js";
|
|
8
|
-
const C = p, x = r.forwardRef(({ className: e, ...t },
|
|
8
|
+
const C = p, x = r.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ s(
|
|
9
9
|
m,
|
|
10
10
|
{
|
|
11
|
-
ref:
|
|
11
|
+
ref: o,
|
|
12
12
|
className: a(
|
|
13
13
|
"fixed top-0 z-toast flex max-h-screen w-full flex-col-reverse p-ds-05 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
14
14
|
e
|
|
@@ -21,7 +21,7 @@ const v = u(
|
|
|
21
21
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-ds-03 overflow-hidden rounded-ds-md border p-ds-05 pr-ds-06 shadow-03 transition-all duration-moderate-02 data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
22
22
|
{
|
|
23
23
|
variants: {
|
|
24
|
-
|
|
24
|
+
color: {
|
|
25
25
|
default: "border-border bg-layer-01 text-text-primary",
|
|
26
26
|
success: "border-success-border bg-success-surface text-success-text",
|
|
27
27
|
warning: "border-warning-border bg-warning-surface text-warning-text",
|
|
@@ -30,24 +30,24 @@ const v = u(
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
defaultVariants: {
|
|
33
|
-
|
|
33
|
+
color: "default"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
), w = r.forwardRef(({ className: e,
|
|
36
|
+
), w = r.forwardRef(({ className: e, color: t, ...o }, f) => /* @__PURE__ */ s(
|
|
37
37
|
i,
|
|
38
38
|
{
|
|
39
39
|
ref: f,
|
|
40
40
|
role: "status",
|
|
41
41
|
"aria-live": "polite",
|
|
42
|
-
className: a(v({
|
|
43
|
-
...
|
|
42
|
+
className: a(v({ color: t }), e),
|
|
43
|
+
...o
|
|
44
44
|
}
|
|
45
45
|
));
|
|
46
46
|
w.displayName = i.displayName;
|
|
47
|
-
const
|
|
47
|
+
const y = r.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ s(
|
|
48
48
|
d,
|
|
49
49
|
{
|
|
50
|
-
ref:
|
|
50
|
+
ref: o,
|
|
51
51
|
className: a(
|
|
52
52
|
"inline-flex h-ds-sm shrink-0 items-center justify-center rounded-ds-md border border-border bg-transparent px-ds-04 text-ds-md font-medium transition-colors hover:bg-layer-02 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-[0.38] group-[.destructive]:border-border-error group-[.destructive]:hover:bg-error-surface",
|
|
53
53
|
e
|
|
@@ -55,34 +55,34 @@ const g = r.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
|
|
|
55
55
|
...t
|
|
56
56
|
}
|
|
57
57
|
));
|
|
58
|
-
|
|
59
|
-
const
|
|
58
|
+
y.displayName = d.displayName;
|
|
59
|
+
const g = r.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ s(
|
|
60
60
|
n,
|
|
61
61
|
{
|
|
62
|
-
ref:
|
|
62
|
+
ref: o,
|
|
63
63
|
className: a(
|
|
64
|
-
"absolute right-ds-02 top-ds-02 rounded-ds-md p-ds-02 text-text-secondary opacity-
|
|
64
|
+
"absolute right-ds-02 top-ds-02 min-h-6 min-w-6 flex items-center justify-center rounded-ds-md p-ds-02 text-text-secondary opacity-70 transition-opacity hover:text-text-primary hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",
|
|
65
65
|
e
|
|
66
66
|
),
|
|
67
67
|
"toast-close": "",
|
|
68
68
|
...t,
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ s(b, { className: "h-ico-sm w-ico-sm" })
|
|
70
70
|
}
|
|
71
71
|
));
|
|
72
|
-
|
|
73
|
-
const N = r.forwardRef(({ className: e, ...t },
|
|
72
|
+
g.displayName = n.displayName;
|
|
73
|
+
const N = r.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ s(
|
|
74
74
|
c,
|
|
75
75
|
{
|
|
76
|
-
ref:
|
|
76
|
+
ref: o,
|
|
77
77
|
className: a("text-ds-md font-semibold [&+div]:text-ds-sm", e),
|
|
78
78
|
...t
|
|
79
79
|
}
|
|
80
80
|
));
|
|
81
81
|
N.displayName = c.displayName;
|
|
82
|
-
const h = r.forwardRef(({ className: e, ...t },
|
|
82
|
+
const h = r.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ s(
|
|
83
83
|
l,
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
85
|
+
ref: o,
|
|
86
86
|
className: a("text-ds-md opacity-[0.9]", e),
|
|
87
87
|
...t
|
|
88
88
|
}
|
|
@@ -90,8 +90,8 @@ const h = r.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
|
|
|
90
90
|
h.displayName = l.displayName;
|
|
91
91
|
export {
|
|
92
92
|
w as Toast,
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
y as ToastAction,
|
|
94
|
+
g as ToastClose,
|
|
95
95
|
h as ToastDescription,
|
|
96
96
|
C as ToastProvider,
|
|
97
97
|
N as ToastTitle,
|
package/dist/ui/toaster.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* function SaveButton() {
|
|
25
25
|
* const { toast } = useToast()
|
|
26
26
|
* return (
|
|
27
|
-
* <button onClick={() => toast({ title: 'Saved!', description: 'Changes saved.',
|
|
27
|
+
* <button onClick={() => toast({ title: 'Saved!', description: 'Changes saved.', color: 'success' })}>
|
|
28
28
|
* Save
|
|
29
29
|
* </button>
|
|
30
30
|
* )
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
*
|
|
33
33
|
* // Or use the imperative function directly (no hook needed):
|
|
34
34
|
* import { toast } from '@devalok/shilp-sutra'
|
|
35
|
-
* toast({ title: 'Deleted',
|
|
35
|
+
* toast({ title: 'Deleted', color: 'error' })
|
|
36
36
|
*
|
|
37
|
-
* // Valid
|
|
37
|
+
* // Valid colors: 'default' | 'success' | 'warning' | 'error' | 'info'
|
|
38
38
|
*/
|
|
39
39
|
export declare function Toaster(): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
export declare namespace Toaster {
|
|
@@ -3,11 +3,11 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ToggleGroupPrimitive from '../primitives/react-toggle-group';
|
|
5
5
|
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "outline" | "default" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "outline" | "default" | null | undefined;
|
|
11
11
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
export { ToggleGroup, ToggleGroupItem };
|
package/dist/ui/toggle.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as TogglePrimitive from '../primitives/react-toggle';
|
|
5
5
|
declare const toggleVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "outline" | "default" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "outline" | "default" | null | undefined;
|
|
11
11
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
export { Toggle, toggleVariants };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|