saha-ui 1.24.0 → 1.25.0
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 +3 -2
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +1 -0
- package/dist/components/CodeEditor/CodeEditor.js +1 -1
- package/dist/components/CodeEditor/{variants.d.ts → CodeEditor.styles.d.ts} +1 -1
- package/dist/components/CodeEditor/CodeEditor.styles.d.ts.map +1 -0
- package/dist/components/CodeEditor/CodeEditor.types.d.ts +1 -1
- package/dist/components/CodeEditor/CodeEditor.types.d.ts.map +1 -1
- package/dist/components/CodeEditor/StatusBar.js +1 -1
- package/dist/components/CodeEditor/TabBar.js +1 -1
- package/dist/components/CodeEditor/Toolbar.js +1 -1
- package/dist/components/CookieConsent/index.js +1 -1
- package/dist/components/CountdownTimer/CountdownTimer.styles.d.ts +13 -0
- package/dist/components/CountdownTimer/CountdownTimer.styles.d.ts.map +1 -0
- package/dist/components/CountdownTimer/CountdownTimer.styles.js +69 -0
- package/dist/components/CountdownTimer/index.d.ts.map +1 -1
- package/dist/components/CountdownTimer/index.js +47 -62
- package/dist/components/DateRangePicker/DateRangePicker.styles.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.styles.d.ts.map +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.styles.js +5 -0
- package/dist/components/DateRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/index.js +17 -14
- package/dist/components/DateTimePicker/DateTimePicker.styles.d.ts +11 -0
- package/dist/components/DateTimePicker/DateTimePicker.styles.d.ts.map +1 -0
- package/dist/components/DateTimePicker/DateTimePicker.styles.js +26 -0
- package/dist/components/DateTimePicker/index.d.ts.map +1 -1
- package/dist/components/DateTimePicker/index.js +52 -54
- package/dist/components/DragDrop/VirtualList.d.ts +1 -18
- package/dist/components/DragDrop/VirtualList.d.ts.map +1 -1
- package/dist/components/DragDrop/VirtualList.js +16 -15
- package/dist/components/GanttChart/GanttChart.styles.d.ts +3 -0
- package/dist/components/GanttChart/GanttChart.styles.d.ts.map +1 -0
- package/dist/components/GanttChart/GanttChart.styles.js +10 -0
- package/dist/components/GanttChart/index.d.ts.map +1 -1
- package/dist/components/GanttChart/index.js +41 -40
- package/dist/components/ImageGallery/ImageGallery.styles.d.ts +21 -0
- package/dist/components/ImageGallery/ImageGallery.styles.d.ts.map +1 -0
- package/dist/components/ImageGallery/ImageGallery.styles.js +72 -0
- package/dist/components/ImageGallery/index.d.ts.map +1 -1
- package/dist/components/ImageGallery/index.js +61 -68
- package/dist/components/InfiniteScroll/InfiniteScroll.styles.d.ts +5 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.styles.d.ts.map +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.styles.js +8 -0
- package/dist/components/InfiniteScroll/index.d.ts.map +1 -1
- package/dist/components/InfiniteScroll/index.js +37 -36
- package/dist/components/KanbanBoard/KanbanBoard.styles.d.ts +12 -0
- package/dist/components/KanbanBoard/KanbanBoard.styles.d.ts.map +1 -0
- package/dist/components/KanbanBoard/KanbanBoard.styles.js +15 -0
- package/dist/components/KanbanBoard/index.d.ts.map +1 -1
- package/dist/components/KanbanBoard/index.js +63 -65
- package/dist/components/MultiSelect/MultiSelect.styles.d.ts +4 -0
- package/dist/components/MultiSelect/MultiSelect.styles.d.ts.map +1 -0
- package/dist/components/MultiSelect/MultiSelect.styles.js +7 -0
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +27 -26
- package/dist/components/Notification/Notification.styles.d.ts +7 -0
- package/dist/components/Notification/Notification.styles.d.ts.map +1 -0
- package/dist/components/Notification/Notification.styles.js +38 -0
- package/dist/components/Notification/Notification.types.d.ts +34 -0
- package/dist/components/Notification/Notification.types.d.ts.map +1 -0
- package/dist/components/Notification/index.d.ts +6 -0
- package/dist/components/Notification/index.d.ts.map +1 -0
- package/dist/components/Notification/index.js +114 -0
- package/dist/components/QRCode/QRCode.styles.d.ts +2 -0
- package/dist/components/QRCode/QRCode.styles.d.ts.map +1 -0
- package/dist/components/QRCode/QRCode.styles.js +7 -0
- package/dist/components/QRCode/index.d.ts.map +1 -1
- package/dist/components/QRCode/index.js +29 -28
- package/dist/components/SplitButton/SplitButton.styles.d.ts +5 -0
- package/dist/components/SplitButton/SplitButton.styles.d.ts.map +1 -0
- package/dist/components/SplitButton/SplitButton.styles.js +10 -0
- package/dist/components/SplitButton/index.d.ts.map +1 -1
- package/dist/components/SplitButton/index.js +59 -61
- package/dist/components/ThemeProvider/ThemeProvider.styles.d.ts +2 -0
- package/dist/components/ThemeProvider/ThemeProvider.styles.d.ts.map +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.styles.js +5 -0
- package/dist/components/TickerCarousel/index.d.ts.map +1 -1
- package/dist/components/TickerCarousel/index.js +2 -0
- package/dist/components/VirtualList/VirtualList.styles.d.ts +2 -0
- package/dist/components/VirtualList/VirtualList.styles.d.ts.map +1 -0
- package/dist/components/VirtualList/VirtualList.styles.js +5 -0
- package/dist/components/VirtualList/VirtualList.types.d.ts +25 -0
- package/dist/components/VirtualList/VirtualList.types.d.ts.map +1 -0
- package/dist/components/VirtualList/index.d.ts +2 -0
- package/dist/components/VirtualList/index.d.ts.map +1 -1
- package/dist/components/VirtualList/index.js +5 -3
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +935 -915
- package/package.json +12 -19
- package/dist/components/CodeEditor/variants.d.ts.map +0 -1
- /package/dist/components/CodeEditor/{variants.js → CodeEditor.styles.js} +0 -0
package/README.md
CHANGED
|
@@ -350,7 +350,7 @@ We welcome contributions from the community! Whether it's:
|
|
|
350
350
|
|
|
351
351
|
<div align="center">
|
|
352
352
|
|
|
353
|
-
**
|
|
353
|
+
**CSL License** ©2026 [Saha UI](https://saha-ui.isubroto.com.bd)
|
|
354
354
|
|
|
355
355
|
Free to use for personal and commercial projects
|
|
356
356
|
|
|
@@ -358,6 +358,7 @@ Free to use for personal and commercial projects
|
|
|
358
358
|
|
|
359
359
|
<sub>Built with ❤️ by the Saha UI Team</sub>
|
|
360
360
|
|
|
361
|
-
**[⭐ Star on GitHub](https://github.com/Xenial-Devil/Saha-ui)**
|
|
361
|
+
**[⭐ Star on GitHub](https://github.com/Xenial-Devil/Saha-ui)**
|
|
362
|
+
<!-- **[⭐ Star on GitHub](https://github.com/Xenial-Devil/Saha-ui)** • **[🐦 Follow on Twitter](https://twitter.com/saha-ui)** • **[💬 Join Discord](https://discord.gg/saha-ui)** -->
|
|
362
363
|
|
|
363
364
|
</div>
|
|
@@ -31,5 +31,5 @@ import { buttonVariants } from './Button.styles';
|
|
|
31
31
|
*/
|
|
32
32
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
33
33
|
export default Button;
|
|
34
|
-
export { buttonVariants };
|
|
34
|
+
export { Button, buttonVariants };
|
|
35
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AA+BlE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,QAAA,MAAM,MAAM,uFAoEX,CAAC;AAIF,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AA+BlE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,QAAA,MAAM,MAAM,uFAoEX,CAAC;AAIF,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as _, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import Se, { useMonaco as Le } from "@monaco-editor/react";
|
|
4
|
-
import { codeEditorVariants as xe } from "./
|
|
4
|
+
import { codeEditorVariants as xe } from "./CodeEditor.styles.js";
|
|
5
5
|
import { Toolbar as Ce } from "./Toolbar.js";
|
|
6
6
|
import { StatusBar as ye } from "./StatusBar.js";
|
|
7
7
|
import { TabBar as Me } from "./TabBar.js";
|
|
@@ -79,4 +79,4 @@ export declare const buttonVariants: (props?: ({
|
|
|
79
79
|
export declare const shimmerVariants: (props?: ({
|
|
80
80
|
variant?: "error" | "primary" | "secondary" | "success" | "warning" | "info" | "glass" | "accent" | "outline" | "ghost" | null | undefined;
|
|
81
81
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
82
|
-
//# sourceMappingURL=
|
|
82
|
+
//# sourceMappingURL=CodeEditor.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeEditor.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/CodeEditor.styles.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,MAAM,GACN,WAAW,GACX,eAAe,GACf,cAAc,CAAC;AAMnB,eAAO,MAAM,kBAAkB;;;;;8EAiF9B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;8EA8BhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;8EAiCjC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;8EAgC7B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;8EA8BnC,CAAC;AAGF,eAAO,MAAM,oBAAoB;;8EAmBhC,CAAC;AAGF,eAAO,MAAM,iBAAiB;;;8EAuD7B,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;;8EA+IjC,CAAC;AAGF,eAAO,MAAM,oBAAoB;;;;;8EAoRhC,CAAC;AAGF,eAAO,MAAM,wBAAwB;;;8EA2BpC,CAAC;AAGF,eAAO,MAAM,oBAAoB;;;8EAuChC,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;8EA4BjC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;8EAgCnC,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;8EA4BjC,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;8EA+BjC,CAAC;AAGF,eAAO,MAAM,0BAA0B;;;8EAsBtC,CAAC;AAGF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAC9C,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,CAAC;AAGZ,eAAO,MAAM,cAAc;;;8EAkC1B,CAAC;AAEF,eAAO,MAAM,eAAe;;8EAsB1B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeEditorVariant, CodeEditorSize, CodeEditorTheme } from './
|
|
1
|
+
import { CodeEditorVariant, CodeEditorSize, CodeEditorTheme } from './CodeEditor.styles';
|
|
2
2
|
export type { CodeEditorVariant, CodeEditorSize, CodeEditorTheme };
|
|
3
3
|
export type LineNumbersSetting = "on" | "off" | "relative" | "interval";
|
|
4
4
|
export type IndentInfo = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeEditor.types.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/CodeEditor.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"CodeEditor.types.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/CodeEditor.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;AAExE,MAAM,MAAM,UAAU,GAAG;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { editorTabVariants as d, editorTabBarVariants as p } from "./
|
|
2
|
+
import { editorTabVariants as d, editorTabBarVariants as p } from "./CodeEditor.styles.js";
|
|
3
3
|
const u = () => /* @__PURE__ */ t(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e, Fragment as s } from "react/jsx-runtime";
|
|
2
2
|
import * as k from "react";
|
|
3
|
-
import { editorSelectVariants as W, editorIconButtonVariants as a, editorActionVariants as j, editorToolbarVariants as B } from "./
|
|
3
|
+
import { editorSelectVariants as W, editorIconButtonVariants as a, editorActionVariants as j, editorToolbarVariants as B } from "./CodeEditor.styles.js";
|
|
4
4
|
const F = () => /* @__PURE__ */ o(
|
|
5
5
|
"svg",
|
|
6
6
|
{
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as k, useState as b, useEffect as y } from "react";
|
|
3
3
|
import { cn as N } from "../../lib/utils.js";
|
|
4
4
|
import { Card as g, CardHeader as A, CardTitle as v, CardDescription as z, CardFooter as j } from "../Card/index.js";
|
|
5
|
-
import r from "../Button/index.js";
|
|
5
|
+
import { Button as r } from "../Button/index.js";
|
|
6
6
|
import { cookieConsentVariants as w } from "./CookieConsent.styles.js";
|
|
7
7
|
const D = k(
|
|
8
8
|
({
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const countdownTimerVariants: (props?: ({
|
|
2
|
+
variant?: "primary" | "secondary" | "default" | "glass" | "outline" | null | undefined;
|
|
3
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
|
+
export declare const countdownDigitVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export declare const countdownLabelVariants: (props?: ({
|
|
8
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
export declare const countdownSeparatorVariants: (props?: ({
|
|
11
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
12
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
13
|
+
//# sourceMappingURL=CountdownTimer.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CountdownTimer.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CountdownTimer/CountdownTimer.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;8EAgBlC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;8EAelC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;8EAelC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;8EAetC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { cva as t } from "class-variance-authority";
|
|
2
|
+
const o = t(
|
|
3
|
+
"inline-flex items-start gap-2",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "text-foreground",
|
|
8
|
+
primary: "text-primary",
|
|
9
|
+
secondary: "text-secondary",
|
|
10
|
+
glass: "bg-white/10 dark:bg-black/10 backdrop-blur-md border border-white/20 p-4 rounded-xl",
|
|
11
|
+
outline: "border-2 border-border p-4 rounded-xl"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "default"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
), a = t(
|
|
19
|
+
"tabular-nums leading-none",
|
|
20
|
+
{
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
sm: "text-xl font-bold font-mono",
|
|
24
|
+
md: "text-3xl font-bold font-mono tracking-tight",
|
|
25
|
+
lg: "text-5xl font-black font-mono tracking-tighter",
|
|
26
|
+
xl: "text-7xl font-black font-mono tracking-tighter"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
size: "md"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
), r = t(
|
|
34
|
+
"uppercase font-semibold text-muted-foreground",
|
|
35
|
+
{
|
|
36
|
+
variants: {
|
|
37
|
+
size: {
|
|
38
|
+
sm: "text-[10px] tracking-wider mt-1",
|
|
39
|
+
md: "text-xs tracking-wider mt-1",
|
|
40
|
+
lg: "text-sm tracking-wider mt-2",
|
|
41
|
+
xl: "text-base tracking-widest mt-3"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
size: "md"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
), e = t(
|
|
49
|
+
"opacity-50 mt-[-2px] sm:mt-[-4px]",
|
|
50
|
+
{
|
|
51
|
+
variants: {
|
|
52
|
+
size: {
|
|
53
|
+
sm: "text-xl font-bold font-mono",
|
|
54
|
+
md: "text-3xl font-bold font-mono tracking-tight",
|
|
55
|
+
lg: "text-5xl font-black font-mono tracking-tighter",
|
|
56
|
+
xl: "text-7xl font-black font-mono tracking-tighter"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
size: "md"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
export {
|
|
65
|
+
a as countdownDigitVariants,
|
|
66
|
+
r as countdownLabelVariants,
|
|
67
|
+
e as countdownSeparatorVariants,
|
|
68
|
+
o as countdownTimerVariants
|
|
69
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CountdownTimer/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CountdownTimer/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAQlE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,gHA2G1B,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -1,86 +1,71 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
1
|
+
import { jsxs as c, Fragment as T, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y, useMemo as D, useState as M, useEffect as N } from "react";
|
|
3
|
+
import { cn as S } from "../../lib/utils.js";
|
|
4
|
+
import { countdownTimerVariants as b, countdownDigitVariants as g, countdownLabelVariants as E, countdownSeparatorVariants as I } from "./CountdownTimer.styles.js";
|
|
5
|
+
const L = y(
|
|
5
6
|
({
|
|
6
|
-
targetDate:
|
|
7
|
-
onComplete:
|
|
8
|
-
showLabels:
|
|
9
|
-
variant:
|
|
10
|
-
size:
|
|
11
|
-
className:
|
|
12
|
-
...
|
|
13
|
-
},
|
|
14
|
-
const
|
|
7
|
+
targetDate: t,
|
|
8
|
+
onComplete: o,
|
|
9
|
+
showLabels: p = !0,
|
|
10
|
+
variant: h = "default",
|
|
11
|
+
size: i = "md",
|
|
12
|
+
className: x,
|
|
13
|
+
...v
|
|
14
|
+
}, w) => {
|
|
15
|
+
const d = D(() => t instanceof Date ? t : new Date(t), [t]), [s, u] = M({
|
|
15
16
|
days: 0,
|
|
16
17
|
hours: 0,
|
|
17
18
|
minutes: 0,
|
|
18
19
|
seconds: 0,
|
|
19
20
|
isExpired: !1
|
|
20
21
|
});
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
days: Math.floor(
|
|
26
|
-
hours: Math.floor(
|
|
27
|
-
minutes: Math.floor(
|
|
28
|
-
seconds: Math.floor(
|
|
22
|
+
N(() => {
|
|
23
|
+
const n = () => {
|
|
24
|
+
const r = d.getTime() - (/* @__PURE__ */ new Date()).getTime();
|
|
25
|
+
return r <= 0 ? (u({ days: 0, hours: 0, minutes: 0, seconds: 0, isExpired: !0 }), !0) : (u({
|
|
26
|
+
days: Math.floor(r / 864e5),
|
|
27
|
+
hours: Math.floor(r / 36e5 % 24),
|
|
28
|
+
minutes: Math.floor(r / 1e3 / 60 % 60),
|
|
29
|
+
seconds: Math.floor(r / 1e3 % 60),
|
|
29
30
|
isExpired: !1
|
|
30
31
|
}), !1);
|
|
31
32
|
};
|
|
32
|
-
if (
|
|
33
|
-
|
|
33
|
+
if (n()) {
|
|
34
|
+
o?.();
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
-
|
|
37
|
+
const m = setInterval(() => {
|
|
38
|
+
n() && (clearInterval(m), o?.());
|
|
38
39
|
}, 1e3);
|
|
39
|
-
return () => clearInterval(
|
|
40
|
-
}, [
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
outline: "border-2 border-border p-4 rounded-xl"
|
|
47
|
-
}[b], f = {
|
|
48
|
-
sm: "text-xl font-bold font-mono",
|
|
49
|
-
md: "text-3xl font-bold font-mono tracking-tight",
|
|
50
|
-
lg: "text-5xl font-black font-mono tracking-tighter",
|
|
51
|
-
xl: "text-7xl font-black font-mono tracking-tighter"
|
|
52
|
-
}[c], v = {
|
|
53
|
-
sm: "text-[10px] uppercase font-semibold text-muted-foreground tracking-wider mt-1",
|
|
54
|
-
md: "text-xs uppercase font-semibold text-muted-foreground tracking-wider mt-1",
|
|
55
|
-
lg: "text-sm uppercase font-semibold text-muted-foreground tracking-wider mt-2",
|
|
56
|
-
xl: "text-base uppercase font-semibold text-muted-foreground tracking-widest mt-3"
|
|
57
|
-
}[c], n = ({ value: o, label: x }) => /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center min-w-[50px]", children: [
|
|
58
|
-
/* @__PURE__ */ e("span", { className: d(f, "tabular-nums leading-none"), children: String(o).padStart(2, "0") }),
|
|
59
|
-
g && /* @__PURE__ */ e("span", { className: v, children: x })
|
|
60
|
-
] }), i = () => /* @__PURE__ */ e("div", { className: d(f, "mt-[-2px] sm:mt-[-4px] opacity-50"), children: ":" });
|
|
61
|
-
return /* @__PURE__ */ l(
|
|
40
|
+
return () => clearInterval(m);
|
|
41
|
+
}, [d, o]);
|
|
42
|
+
const a = ({ value: n, label: f }) => /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center min-w-[50px]", children: [
|
|
43
|
+
/* @__PURE__ */ e("span", { className: g({ size: i }), children: String(n).padStart(2, "0") }),
|
|
44
|
+
p && /* @__PURE__ */ e("span", { className: E({ size: i }), children: f })
|
|
45
|
+
] }), l = () => /* @__PURE__ */ e("div", { className: I({ size: i }), children: ":" });
|
|
46
|
+
return /* @__PURE__ */ c(
|
|
62
47
|
"div",
|
|
63
48
|
{
|
|
64
|
-
ref:
|
|
65
|
-
className:
|
|
66
|
-
...
|
|
49
|
+
ref: w,
|
|
50
|
+
className: S(b({ variant: h }), x),
|
|
51
|
+
...v,
|
|
67
52
|
children: [
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
53
|
+
s.days > 0 && /* @__PURE__ */ c(T, { children: [
|
|
54
|
+
/* @__PURE__ */ e(a, { value: s.days, label: "Days" }),
|
|
55
|
+
/* @__PURE__ */ e(l, {})
|
|
71
56
|
] }),
|
|
72
|
-
/* @__PURE__ */ e(
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
/* @__PURE__ */ e(
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
/* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e(a, { value: s.hours, label: "Hours" }),
|
|
58
|
+
/* @__PURE__ */ e(l, {}),
|
|
59
|
+
/* @__PURE__ */ e(a, { value: s.minutes, label: "Mins" }),
|
|
60
|
+
/* @__PURE__ */ e(l, {}),
|
|
61
|
+
/* @__PURE__ */ e(a, { value: s.seconds, label: "Secs" })
|
|
77
62
|
]
|
|
78
63
|
}
|
|
79
64
|
);
|
|
80
65
|
}
|
|
81
66
|
);
|
|
82
|
-
|
|
67
|
+
L.displayName = "CountdownTimer";
|
|
83
68
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
69
|
+
L as CountdownTimer,
|
|
70
|
+
L as default
|
|
86
71
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangePicker.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/DateRangePicker.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,oFAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAKpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,mHA0B3B,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { DatePicker as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { DatePicker as c } from "../DatePicker/index.js";
|
|
4
|
+
import { dateRangePickerVariants as d } from "./DateRangePicker.styles.js";
|
|
5
|
+
import { cn as f } from "../../lib/utils.js";
|
|
6
|
+
const u = s(
|
|
7
|
+
({ startDate: n = null, endDate: t = null, onRangeChange: r, value: o, onChange: l, ...a }, m) => /* @__PURE__ */ i(
|
|
8
|
+
c,
|
|
7
9
|
{
|
|
8
|
-
ref:
|
|
10
|
+
ref: m,
|
|
9
11
|
useRange: !0,
|
|
10
12
|
asSingle: !1,
|
|
11
13
|
value: o || {
|
|
12
|
-
startDate:
|
|
13
|
-
endDate:
|
|
14
|
+
startDate: n,
|
|
15
|
+
endDate: t
|
|
14
16
|
},
|
|
15
17
|
onChange: (e) => {
|
|
16
|
-
|
|
18
|
+
l?.(e), r?.(e.startDate, e.endDate);
|
|
17
19
|
},
|
|
18
|
-
|
|
20
|
+
className: f(d(), a.className),
|
|
21
|
+
...a
|
|
19
22
|
}
|
|
20
23
|
)
|
|
21
24
|
);
|
|
22
|
-
|
|
25
|
+
u.displayName = "DateRangePicker";
|
|
23
26
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
u as DateRangePicker,
|
|
28
|
+
u as default
|
|
26
29
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const dateTimePickerVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
2
|
+
export declare const dateTimeLabelVariants: (props?: ({
|
|
3
|
+
disabled?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const dateTimeWrapperVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
6
|
+
export declare const dateTimeDateGroupVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
7
|
+
export declare const dateTimeTimeGroupVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
8
|
+
export declare const dateTimeHelperTextVariants: (props?: ({
|
|
9
|
+
error?: boolean | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
//# sourceMappingURL=DateTimePicker.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/DateTimePicker.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,oFAAsC,CAAC;AAE1E,eAAO,MAAM,qBAAqB;;8EAMhC,CAAC;AAEH,eAAO,MAAM,uBAAuB,oFAA0C,CAAC;AAE/E,eAAO,MAAM,yBAAyB,oFAA8B,CAAC;AAErE,eAAO,MAAM,yBAAyB,oFAA4B,CAAC;AAEnE,eAAO,MAAM,0BAA0B;;8EAUrC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
const a = e("flex flex-col gap-1.5 w-full"), r = e("text-sm font-medium", {
|
|
3
|
+
variants: {
|
|
4
|
+
disabled: {
|
|
5
|
+
true: "opacity-50"
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}), i = e("flex items-center gap-2 relative"), s = e("flex-1 min-w-[200px]"), n = e("w-[140px] shrink-0"), o = e("text-xs transition-colors", {
|
|
9
|
+
variants: {
|
|
10
|
+
error: {
|
|
11
|
+
true: "text-destructive",
|
|
12
|
+
false: "text-muted-foreground"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
error: !1
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
s as dateTimeDateGroupVariants,
|
|
21
|
+
o as dateTimeHelperTextVariants,
|
|
22
|
+
r as dateTimeLabelVariants,
|
|
23
|
+
a as dateTimePickerVariants,
|
|
24
|
+
n as dateTimeTimeGroupVariants,
|
|
25
|
+
i as dateTimeWrapperVariants
|
|
26
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAUlE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,gHA8I1B,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -1,109 +1,107 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { DatePicker as
|
|
5
|
-
import { TimePicker as
|
|
6
|
-
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as S, useState as N, useEffect as w } from "react";
|
|
3
|
+
import { cn as C } from "../../lib/utils.js";
|
|
4
|
+
import { DatePicker as P } from "../DatePicker/index.js";
|
|
5
|
+
import { TimePicker as j } from "../TimePicker/index.js";
|
|
6
|
+
import { dateTimeLabelVariants as G, dateTimeDateGroupVariants as M, dateTimeTimeGroupVariants as b, dateTimeWrapperVariants as q, dateTimeHelperTextVariants as E, dateTimePickerVariants as I } from "./DateTimePicker.styles.js";
|
|
7
|
+
const L = S(
|
|
7
8
|
({
|
|
8
9
|
value: t,
|
|
9
10
|
onChange: r,
|
|
10
|
-
useRange:
|
|
11
|
-
datePickerProps:
|
|
12
|
-
timePickerProps:
|
|
13
|
-
variant:
|
|
14
|
-
size:
|
|
15
|
-
label:
|
|
11
|
+
useRange: W = !1,
|
|
12
|
+
datePickerProps: l,
|
|
13
|
+
timePickerProps: V,
|
|
14
|
+
variant: d = "default",
|
|
15
|
+
size: u = "md",
|
|
16
|
+
label: f,
|
|
16
17
|
helperText: D,
|
|
17
|
-
error:
|
|
18
|
+
error: g,
|
|
18
19
|
disabled: o,
|
|
19
|
-
className:
|
|
20
|
+
className: H,
|
|
20
21
|
...R
|
|
21
22
|
}, k) => {
|
|
22
|
-
const [p,
|
|
23
|
+
const [p, n] = N({
|
|
23
24
|
startDate: null,
|
|
24
25
|
endDate: null
|
|
25
|
-
}), [
|
|
26
|
-
|
|
26
|
+
}), [h, i] = N(null);
|
|
27
|
+
w(() => {
|
|
27
28
|
if (t && typeof t != "string" && t instanceof Date && !isNaN(t.getTime()))
|
|
28
|
-
|
|
29
|
+
n({ startDate: t, endDate: t }), i({
|
|
29
30
|
hours: t.getHours(),
|
|
30
31
|
minutes: t.getMinutes(),
|
|
31
32
|
seconds: t.getSeconds()
|
|
32
33
|
});
|
|
33
34
|
else if (typeof t == "string") {
|
|
34
35
|
const e = new Date(t);
|
|
35
|
-
isNaN(e.getTime()) || (
|
|
36
|
+
isNaN(e.getTime()) || (n({ startDate: e, endDate: e }), i({
|
|
36
37
|
hours: e.getHours(),
|
|
37
38
|
minutes: e.getMinutes(),
|
|
38
39
|
seconds: e.getSeconds()
|
|
39
40
|
}));
|
|
40
|
-
} else t || (
|
|
41
|
+
} else t || (n({ startDate: null, endDate: null }), i(null));
|
|
41
42
|
}, [t]);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
},
|
|
43
|
+
const x = (e) => {
|
|
44
|
+
n(e), T(e.startDate, h);
|
|
45
|
+
}, y = (e) => {
|
|
45
46
|
const s = e;
|
|
46
|
-
i(s),
|
|
47
|
-
},
|
|
47
|
+
i(s), T(p.startDate, s);
|
|
48
|
+
}, T = (e, s) => {
|
|
48
49
|
if (!r) return;
|
|
49
50
|
if (!e) {
|
|
50
51
|
r(null);
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
|
-
const
|
|
54
|
-
s ?
|
|
54
|
+
const m = new Date(e);
|
|
55
|
+
s ? m.setHours(s.hours, s.minutes, s.seconds || 0, 0) : m.setHours(0, 0, 0, 0), r(m);
|
|
55
56
|
};
|
|
56
57
|
return /* @__PURE__ */ c(
|
|
57
58
|
"div",
|
|
58
59
|
{
|
|
59
60
|
ref: k,
|
|
60
|
-
className:
|
|
61
|
+
className: C(I(), H),
|
|
61
62
|
...R,
|
|
62
63
|
children: [
|
|
63
|
-
|
|
64
|
+
f && /* @__PURE__ */ c(
|
|
64
65
|
"label",
|
|
65
66
|
{
|
|
66
|
-
className:
|
|
67
|
+
className: G({ disabled: !!o }),
|
|
67
68
|
children: [
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
f,
|
|
70
|
+
l?.required && /* @__PURE__ */ a("span", { className: "text-destructive ml-1", children: "*" })
|
|
70
71
|
]
|
|
71
72
|
}
|
|
72
73
|
),
|
|
73
|
-
/* @__PURE__ */ c("div", { className:
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
74
|
+
/* @__PURE__ */ c("div", { className: q(), children: [
|
|
75
|
+
/* @__PURE__ */ a("div", { className: M(), children: /* @__PURE__ */ a(
|
|
76
|
+
P,
|
|
76
77
|
{
|
|
77
78
|
value: p,
|
|
78
|
-
onChange:
|
|
79
|
+
onChange: x,
|
|
79
80
|
useRange: !1,
|
|
80
81
|
asSingle: !0,
|
|
81
|
-
variant:
|
|
82
|
-
size:
|
|
82
|
+
variant: d,
|
|
83
|
+
size: u,
|
|
83
84
|
disabled: o,
|
|
84
|
-
...
|
|
85
|
+
...l
|
|
85
86
|
}
|
|
86
87
|
) }),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
88
|
+
/* @__PURE__ */ a("div", { className: b(), children: /* @__PURE__ */ a(
|
|
89
|
+
j,
|
|
89
90
|
{
|
|
90
|
-
value:
|
|
91
|
-
onChange:
|
|
92
|
-
variant:
|
|
93
|
-
size:
|
|
91
|
+
value: h,
|
|
92
|
+
onChange: y,
|
|
93
|
+
variant: d,
|
|
94
|
+
size: u,
|
|
94
95
|
disabled: o,
|
|
95
96
|
useRange: !1,
|
|
96
|
-
...
|
|
97
|
+
...V
|
|
97
98
|
}
|
|
98
99
|
) })
|
|
99
100
|
] }),
|
|
100
|
-
(D ||
|
|
101
|
+
(D || g) && /* @__PURE__ */ a(
|
|
101
102
|
"p",
|
|
102
103
|
{
|
|
103
|
-
className:
|
|
104
|
-
"text-xs transition-colors",
|
|
105
|
-
h ? "text-destructive" : "text-muted-foreground"
|
|
106
|
-
),
|
|
104
|
+
className: E({ error: !!g }),
|
|
107
105
|
children: D || "Invalid selection"
|
|
108
106
|
}
|
|
109
107
|
)
|
|
@@ -112,8 +110,8 @@ const P = V(
|
|
|
112
110
|
);
|
|
113
111
|
}
|
|
114
112
|
);
|
|
115
|
-
|
|
113
|
+
L.displayName = "DateTimePicker";
|
|
116
114
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
L as DateTimePicker,
|
|
116
|
+
L as default
|
|
119
117
|
};
|