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.
Files changed (93) hide show
  1. package/README.md +3 -2
  2. package/dist/components/Button/index.d.ts +1 -1
  3. package/dist/components/Button/index.d.ts.map +1 -1
  4. package/dist/components/Button/index.js +1 -0
  5. package/dist/components/CodeEditor/CodeEditor.js +1 -1
  6. package/dist/components/CodeEditor/{variants.d.ts → CodeEditor.styles.d.ts} +1 -1
  7. package/dist/components/CodeEditor/CodeEditor.styles.d.ts.map +1 -0
  8. package/dist/components/CodeEditor/CodeEditor.types.d.ts +1 -1
  9. package/dist/components/CodeEditor/CodeEditor.types.d.ts.map +1 -1
  10. package/dist/components/CodeEditor/StatusBar.js +1 -1
  11. package/dist/components/CodeEditor/TabBar.js +1 -1
  12. package/dist/components/CodeEditor/Toolbar.js +1 -1
  13. package/dist/components/CookieConsent/index.js +1 -1
  14. package/dist/components/CountdownTimer/CountdownTimer.styles.d.ts +13 -0
  15. package/dist/components/CountdownTimer/CountdownTimer.styles.d.ts.map +1 -0
  16. package/dist/components/CountdownTimer/CountdownTimer.styles.js +69 -0
  17. package/dist/components/CountdownTimer/index.d.ts.map +1 -1
  18. package/dist/components/CountdownTimer/index.js +47 -62
  19. package/dist/components/DateRangePicker/DateRangePicker.styles.d.ts +2 -0
  20. package/dist/components/DateRangePicker/DateRangePicker.styles.d.ts.map +1 -0
  21. package/dist/components/DateRangePicker/DateRangePicker.styles.js +5 -0
  22. package/dist/components/DateRangePicker/index.d.ts.map +1 -1
  23. package/dist/components/DateRangePicker/index.js +17 -14
  24. package/dist/components/DateTimePicker/DateTimePicker.styles.d.ts +11 -0
  25. package/dist/components/DateTimePicker/DateTimePicker.styles.d.ts.map +1 -0
  26. package/dist/components/DateTimePicker/DateTimePicker.styles.js +26 -0
  27. package/dist/components/DateTimePicker/index.d.ts.map +1 -1
  28. package/dist/components/DateTimePicker/index.js +52 -54
  29. package/dist/components/DragDrop/VirtualList.d.ts +1 -18
  30. package/dist/components/DragDrop/VirtualList.d.ts.map +1 -1
  31. package/dist/components/DragDrop/VirtualList.js +16 -15
  32. package/dist/components/GanttChart/GanttChart.styles.d.ts +3 -0
  33. package/dist/components/GanttChart/GanttChart.styles.d.ts.map +1 -0
  34. package/dist/components/GanttChart/GanttChart.styles.js +10 -0
  35. package/dist/components/GanttChart/index.d.ts.map +1 -1
  36. package/dist/components/GanttChart/index.js +41 -40
  37. package/dist/components/ImageGallery/ImageGallery.styles.d.ts +21 -0
  38. package/dist/components/ImageGallery/ImageGallery.styles.d.ts.map +1 -0
  39. package/dist/components/ImageGallery/ImageGallery.styles.js +72 -0
  40. package/dist/components/ImageGallery/index.d.ts.map +1 -1
  41. package/dist/components/ImageGallery/index.js +61 -68
  42. package/dist/components/InfiniteScroll/InfiniteScroll.styles.d.ts +5 -0
  43. package/dist/components/InfiniteScroll/InfiniteScroll.styles.d.ts.map +1 -0
  44. package/dist/components/InfiniteScroll/InfiniteScroll.styles.js +8 -0
  45. package/dist/components/InfiniteScroll/index.d.ts.map +1 -1
  46. package/dist/components/InfiniteScroll/index.js +37 -36
  47. package/dist/components/KanbanBoard/KanbanBoard.styles.d.ts +12 -0
  48. package/dist/components/KanbanBoard/KanbanBoard.styles.d.ts.map +1 -0
  49. package/dist/components/KanbanBoard/KanbanBoard.styles.js +15 -0
  50. package/dist/components/KanbanBoard/index.d.ts.map +1 -1
  51. package/dist/components/KanbanBoard/index.js +63 -65
  52. package/dist/components/MultiSelect/MultiSelect.styles.d.ts +4 -0
  53. package/dist/components/MultiSelect/MultiSelect.styles.d.ts.map +1 -0
  54. package/dist/components/MultiSelect/MultiSelect.styles.js +7 -0
  55. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  56. package/dist/components/MultiSelect/index.js +27 -26
  57. package/dist/components/Notification/Notification.styles.d.ts +7 -0
  58. package/dist/components/Notification/Notification.styles.d.ts.map +1 -0
  59. package/dist/components/Notification/Notification.styles.js +38 -0
  60. package/dist/components/Notification/Notification.types.d.ts +34 -0
  61. package/dist/components/Notification/Notification.types.d.ts.map +1 -0
  62. package/dist/components/Notification/index.d.ts +6 -0
  63. package/dist/components/Notification/index.d.ts.map +1 -0
  64. package/dist/components/Notification/index.js +114 -0
  65. package/dist/components/QRCode/QRCode.styles.d.ts +2 -0
  66. package/dist/components/QRCode/QRCode.styles.d.ts.map +1 -0
  67. package/dist/components/QRCode/QRCode.styles.js +7 -0
  68. package/dist/components/QRCode/index.d.ts.map +1 -1
  69. package/dist/components/QRCode/index.js +29 -28
  70. package/dist/components/SplitButton/SplitButton.styles.d.ts +5 -0
  71. package/dist/components/SplitButton/SplitButton.styles.d.ts.map +1 -0
  72. package/dist/components/SplitButton/SplitButton.styles.js +10 -0
  73. package/dist/components/SplitButton/index.d.ts.map +1 -1
  74. package/dist/components/SplitButton/index.js +59 -61
  75. package/dist/components/ThemeProvider/ThemeProvider.styles.d.ts +2 -0
  76. package/dist/components/ThemeProvider/ThemeProvider.styles.d.ts.map +1 -0
  77. package/dist/components/ThemeProvider/ThemeProvider.styles.js +5 -0
  78. package/dist/components/TickerCarousel/index.d.ts.map +1 -1
  79. package/dist/components/TickerCarousel/index.js +2 -0
  80. package/dist/components/VirtualList/VirtualList.styles.d.ts +2 -0
  81. package/dist/components/VirtualList/VirtualList.styles.d.ts.map +1 -0
  82. package/dist/components/VirtualList/VirtualList.styles.js +5 -0
  83. package/dist/components/VirtualList/VirtualList.types.d.ts +25 -0
  84. package/dist/components/VirtualList/VirtualList.types.d.ts.map +1 -0
  85. package/dist/components/VirtualList/index.d.ts +2 -0
  86. package/dist/components/VirtualList/index.d.ts.map +1 -1
  87. package/dist/components/VirtualList/index.js +5 -3
  88. package/dist/index.d.ts +10 -2
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +935 -915
  91. package/package.json +12 -19
  92. package/dist/components/CodeEditor/variants.d.ts.map +0 -1
  93. /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
- **MIT License** ©2025 [Saha UI](https://saha-ui.isubroto.com.bd)
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)** • **[🐦 Follow on Twitter](https://twitter.com/saha-ui)** • **[💬 Join Discord](https://discord.gg/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"}
@@ -85,6 +85,7 @@ const j = () => /* @__PURE__ */ t(
85
85
  );
86
86
  k.displayName = "Button";
87
87
  export {
88
+ k as Button,
88
89
  z as buttonVariants,
89
90
  k as default
90
91
  };
@@ -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 "./variants.js";
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=variants.d.ts.map
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 './variants';
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,YAAY,CAAC;AAEpB,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
+ {"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 i, jsx as e, Fragment as r } from "react/jsx-runtime";
2
- import { editorStatusBarVariants as t } from "./variants.js";
2
+ import { editorStatusBarVariants as t } from "./CodeEditor.styles.js";
3
3
  const l = () => /* @__PURE__ */ i(
4
4
  "svg",
5
5
  {
@@ -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 "./variants.js";
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 "./variants.js";
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;AAElE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,gHAkI1B,CAAC;AAIF,eAAe,cAAc,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 l, Fragment as T, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as M, useMemo as N, useState as D, useEffect as S } from "react";
3
- import { cn as d } from "../../lib/utils.js";
4
- const E = M(
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: s,
7
- onComplete: a,
8
- showLabels: g = !0,
9
- variant: b = "default",
10
- size: c = "md",
11
- className: h,
12
- ...w
13
- }, y) => {
14
- const m = N(() => s instanceof Date ? s : new Date(s), [s]), [r, u] = D({
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
- S(() => {
22
- const o = () => {
23
- const t = m.getTime() - (/* @__PURE__ */ new Date()).getTime();
24
- return t <= 0 ? (u({ days: 0, hours: 0, minutes: 0, seconds: 0, isExpired: !0 }), !0) : (u({
25
- days: Math.floor(t / 864e5),
26
- hours: Math.floor(t / 36e5 % 24),
27
- minutes: Math.floor(t / 1e3 / 60 % 60),
28
- seconds: Math.floor(t / 1e3 % 60),
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 (o()) {
33
- a?.();
33
+ if (n()) {
34
+ o?.();
34
35
  return;
35
36
  }
36
- const p = setInterval(() => {
37
- o() && (clearInterval(p), a?.());
37
+ const m = setInterval(() => {
38
+ n() && (clearInterval(m), o?.());
38
39
  }, 1e3);
39
- return () => clearInterval(p);
40
- }, [m, a]);
41
- const k = {
42
- default: "text-foreground",
43
- primary: "text-primary",
44
- secondary: "text-secondary",
45
- glass: "bg-white/10 dark:bg-black/10 backdrop-blur-md border border-white/20 p-4 rounded-xl",
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: y,
65
- className: d("inline-flex items-start gap-2", k, h),
66
- ...w,
49
+ ref: w,
50
+ className: S(b({ variant: h }), x),
51
+ ...v,
67
52
  children: [
68
- r.days > 0 && /* @__PURE__ */ l(T, { children: [
69
- /* @__PURE__ */ e(n, { value: r.days, label: "Days" }),
70
- /* @__PURE__ */ e(i, {})
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(n, { value: r.hours, label: "Hours" }),
73
- /* @__PURE__ */ e(i, {}),
74
- /* @__PURE__ */ e(n, { value: r.minutes, label: "Mins" }),
75
- /* @__PURE__ */ e(i, {}),
76
- /* @__PURE__ */ e(n, { value: r.seconds, label: "Secs" })
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
- E.displayName = "CountdownTimer";
67
+ L.displayName = "CountdownTimer";
83
68
  export {
84
- E as CountdownTimer,
85
- E as default
69
+ L as CountdownTimer,
70
+ L as default
86
71
  };
@@ -0,0 +1,2 @@
1
+ export declare const dateRangePickerVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
2
+ //# sourceMappingURL=DateRangePicker.styles.d.ts.map
@@ -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"}
@@ -0,0 +1,5 @@
1
+ import { cva as a } from "class-variance-authority";
2
+ const r = a("w-full relative");
3
+ export {
4
+ r as dateRangePickerVariants
5
+ };
@@ -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;AAGpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,mHAyB3B,CAAC;AAIF,eAAe,eAAe,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 s } from "react/jsx-runtime";
2
- import { forwardRef as m } from "react";
3
- import { DatePicker as u } from "../DatePicker/index.js";
4
- const c = m(
5
- ({ startDate: a = null, endDate: n = null, onRangeChange: t, value: o, onChange: r, ...l }, i) => /* @__PURE__ */ s(
6
- u,
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: i,
10
+ ref: m,
9
11
  useRange: !0,
10
12
  asSingle: !1,
11
13
  value: o || {
12
- startDate: a,
13
- endDate: n
14
+ startDate: n,
15
+ endDate: t
14
16
  },
15
17
  onChange: (e) => {
16
- r?.(e), t?.(e.startDate, e.endDate);
18
+ l?.(e), r?.(e.startDate, e.endDate);
17
19
  },
18
- ...l
20
+ className: f(d(), a.className),
21
+ ...a
19
22
  }
20
23
  )
21
24
  );
22
- c.displayName = "DateRangePicker";
25
+ u.displayName = "DateRangePicker";
23
26
  export {
24
- c as DateRangePicker,
25
- c as default
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;AAElE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,gHAiJ1B,CAAC;AAIF,eAAe,cAAc,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 n } from "react/jsx-runtime";
2
- import { forwardRef as V, useState as w, useEffect as C } from "react";
3
- import { cn as m } from "../../lib/utils.js";
4
- import { DatePicker as j } from "../DatePicker/index.js";
5
- import { TimePicker as M } from "../TimePicker/index.js";
6
- const P = V(
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: q = !1,
11
- datePickerProps: f,
12
- timePickerProps: T,
13
- variant: u = "default",
14
- size: d = "md",
15
- label: g,
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: h,
18
+ error: g,
18
19
  disabled: o,
19
- className: y,
20
+ className: H,
20
21
  ...R
21
22
  }, k) => {
22
- const [p, a] = w({
23
+ const [p, n] = N({
23
24
  startDate: null,
24
25
  endDate: null
25
- }), [x, i] = w(null);
26
- C(() => {
26
+ }), [h, i] = N(null);
27
+ w(() => {
27
28
  if (t && typeof t != "string" && t instanceof Date && !isNaN(t.getTime()))
28
- a({ startDate: t, endDate: t }), i({
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()) || (a({ startDate: e, endDate: e }), i({
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 || (a({ startDate: null, endDate: null }), i(null));
41
+ } else t || (n({ startDate: null, endDate: null }), i(null));
41
42
  }, [t]);
42
- const H = (e) => {
43
- a(e), N(e.startDate, x);
44
- }, S = (e) => {
43
+ const x = (e) => {
44
+ n(e), T(e.startDate, h);
45
+ }, y = (e) => {
45
46
  const s = e;
46
- i(s), N(p.startDate, s);
47
- }, N = (e, s) => {
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 l = new Date(e);
54
- s ? l.setHours(s.hours, s.minutes, s.seconds || 0, 0) : l.setHours(0, 0, 0, 0), r(l);
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: m("flex flex-col gap-1.5 w-full", y),
61
+ className: C(I(), H),
61
62
  ...R,
62
63
  children: [
63
- g && /* @__PURE__ */ c(
64
+ f && /* @__PURE__ */ c(
64
65
  "label",
65
66
  {
66
- className: m("text-sm font-medium", o && "opacity-50"),
67
+ className: G({ disabled: !!o }),
67
68
  children: [
68
- g,
69
- f?.required && /* @__PURE__ */ n("span", { className: "text-destructive ml-1", children: "*" })
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: "flex items-center gap-2 relative", children: [
74
- /* @__PURE__ */ n("div", { className: "flex-1 min-w-[200px]", children: /* @__PURE__ */ n(
75
- j,
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: H,
79
+ onChange: x,
79
80
  useRange: !1,
80
81
  asSingle: !0,
81
- variant: u,
82
- size: d,
82
+ variant: d,
83
+ size: u,
83
84
  disabled: o,
84
- ...f
85
+ ...l
85
86
  }
86
87
  ) }),
87
- /* @__PURE__ */ n("div", { className: "w-[140px] shrink-0", children: /* @__PURE__ */ n(
88
- M,
88
+ /* @__PURE__ */ a("div", { className: b(), children: /* @__PURE__ */ a(
89
+ j,
89
90
  {
90
- value: x,
91
- onChange: S,
92
- variant: u,
93
- size: d,
91
+ value: h,
92
+ onChange: y,
93
+ variant: d,
94
+ size: u,
94
95
  disabled: o,
95
96
  useRange: !1,
96
- ...T
97
+ ...V
97
98
  }
98
99
  ) })
99
100
  ] }),
100
- (D || h) && /* @__PURE__ */ n(
101
+ (D || g) && /* @__PURE__ */ a(
101
102
  "p",
102
103
  {
103
- className: m(
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
- P.displayName = "DateTimePicker";
113
+ L.displayName = "DateTimePicker";
116
114
  export {
117
- P as DateTimePicker,
118
- P as default
115
+ L as DateTimePicker,
116
+ L as default
119
117
  };