@vritti/quantum-ui 0.2.6 → 0.2.8
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/dist/Avatar.js +219 -0
- package/dist/Avatar.js.map +1 -0
- package/dist/Badge.js +32 -0
- package/dist/Badge.js.map +1 -0
- package/dist/Button2.js +2 -2
- package/dist/Chart.js +19003 -0
- package/dist/Chart.js.map +1 -0
- package/dist/Checkbox.js +6 -26
- package/dist/Checkbox.js.map +1 -1
- package/dist/Combination.js +3868 -0
- package/dist/Combination.js.map +1 -0
- package/dist/DatePicker.js +15 -3877
- package/dist/DatePicker.js.map +1 -1
- package/dist/DropdownMenu.js +1591 -0
- package/dist/DropdownMenu.js.map +1 -0
- package/dist/Form.js +7 -4
- package/dist/Form.js.map +1 -1
- package/dist/Label.js +1 -1
- package/dist/OTPField.js +16 -5
- package/dist/OTPField.js.map +1 -1
- package/dist/PasswordField.js +1 -14
- package/dist/PasswordField.js.map +1 -1
- package/dist/PhoneField.js +14 -6
- package/dist/PhoneField.js.map +1 -1
- package/dist/Progress.js +116 -0
- package/dist/Progress.js.map +1 -0
- package/dist/Separator.js +6 -0
- package/dist/Separator.js.map +1 -0
- package/dist/Sonner.js +1249 -0
- package/dist/Sonner.js.map +1 -0
- package/dist/Spinner.js +2 -21
- package/dist/Spinner.js.map +1 -1
- package/dist/Switch.js +210 -0
- package/dist/Switch.js.map +1 -0
- package/dist/ThemeContext.js +57 -0
- package/dist/ThemeContext.js.map +1 -0
- package/dist/ThemeToggle.js +4 -15
- package/dist/ThemeToggle.js.map +1 -1
- package/dist/Toggle.js +69 -0
- package/dist/Toggle.js.map +1 -0
- package/dist/_commonjsHelpers.js +6 -0
- package/dist/_commonjsHelpers.js.map +1 -0
- package/dist/assets/quantum-ui.css +59 -10
- package/dist/axios.js +61 -3
- package/dist/axios.js.map +1 -1
- package/dist/check.js +15 -0
- package/dist/check.js.map +1 -0
- package/dist/circle-check-big.js +18 -0
- package/dist/circle-check-big.js.map +1 -0
- package/dist/components/Avatar.js +2 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Badge.js +2 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Chart.js +2 -0
- package/dist/components/Chart.js.map +1 -0
- package/dist/components/DropdownMenu.js +2 -0
- package/dist/components/DropdownMenu.js.map +1 -0
- package/dist/components/Progress.js +1 -174
- package/dist/components/Progress.js.map +1 -1
- package/dist/components/Separator.js +2 -0
- package/dist/components/Separator.js.map +1 -0
- package/dist/components/Sonner.js +3 -0
- package/dist/components/Sonner.js.map +1 -0
- package/dist/components/Switch.js +2 -0
- package/dist/components/Switch.js.map +1 -0
- package/dist/components/Toggle.js +2 -0
- package/dist/components/Toggle.js.map +1 -0
- package/dist/context/index.js +2 -0
- package/dist/context/index.js.map +1 -0
- package/dist/field.js +2 -49
- package/dist/field.js.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index10.js +105 -0
- package/dist/index10.js.map +1 -0
- package/dist/index11.js +101 -0
- package/dist/index11.js.map +1 -0
- package/dist/index12.js +205 -0
- package/dist/index12.js.map +1 -0
- package/dist/index13.js +199 -0
- package/dist/index13.js.map +1 -0
- package/dist/index2.js +55 -130
- package/dist/index2.js.map +1 -1
- package/dist/index3.js +10 -42
- package/dist/index3.js.map +1 -1
- package/dist/index4.js +125 -35
- package/dist/index4.js.map +1 -1
- package/dist/index5.js +26 -414
- package/dist/index5.js.map +1 -1
- package/dist/index6.js +8 -0
- package/dist/index6.js.map +1 -0
- package/dist/index7.js +16 -0
- package/dist/index7.js.map +1 -0
- package/dist/index8.js +45 -0
- package/dist/index8.js.map +1 -0
- package/dist/index9.js +41 -0
- package/dist/index9.js.map +1 -0
- package/dist/lib/components/Avatar/Avatar.d.ts +8 -0
- package/dist/lib/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/lib/components/Avatar/index.d.ts +2 -0
- package/dist/lib/components/Avatar/index.d.ts.map +1 -0
- package/dist/lib/components/Badge/Badge.d.ts +5 -0
- package/dist/lib/components/Badge/Badge.d.ts.map +1 -0
- package/dist/lib/components/Badge/index.d.ts +3 -0
- package/dist/lib/components/Badge/index.d.ts.map +1 -0
- package/dist/lib/components/Button/index.d.ts +1 -1
- package/dist/lib/components/Button/index.d.ts.map +1 -1
- package/dist/lib/components/Chart/Chart.d.ts +13 -0
- package/dist/lib/components/Chart/Chart.d.ts.map +1 -0
- package/dist/lib/components/Chart/index.d.ts +3 -0
- package/dist/lib/components/Chart/index.d.ts.map +1 -0
- package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts +28 -0
- package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
- package/dist/lib/components/DropdownMenu/index.d.ts +3 -0
- package/dist/lib/components/DropdownMenu/index.d.ts.map +1 -0
- package/dist/lib/components/DropdownMenu/types.d.ts +72 -0
- package/dist/lib/components/DropdownMenu/types.d.ts.map +1 -0
- package/dist/lib/components/Form/Form.d.ts.map +1 -1
- package/dist/lib/components/OTPField/OTPField.d.ts.map +1 -1
- package/dist/lib/components/PhoneField/PhoneField.d.ts.map +1 -1
- package/dist/lib/components/Separator/Separator.d.ts +3 -0
- package/dist/lib/components/Separator/Separator.d.ts.map +1 -0
- package/dist/lib/components/Separator/index.d.ts +2 -0
- package/dist/lib/components/Separator/index.d.ts.map +1 -0
- package/dist/lib/components/Sonner/Sonner.d.ts +5 -0
- package/dist/lib/components/Sonner/Sonner.d.ts.map +1 -0
- package/dist/lib/components/Sonner/index.d.ts +4 -0
- package/dist/lib/components/Sonner/index.d.ts.map +1 -0
- package/dist/lib/components/Sonner/toast.d.ts +29 -0
- package/dist/lib/components/Sonner/toast.d.ts.map +1 -0
- package/dist/lib/components/Switch/Switch.d.ts +9 -0
- package/dist/lib/components/Switch/Switch.d.ts.map +1 -0
- package/dist/lib/components/Switch/index.d.ts +3 -0
- package/dist/lib/components/Switch/index.d.ts.map +1 -0
- package/dist/lib/components/ThemeToggle/ThemeToggle.d.ts.map +1 -1
- package/dist/lib/components/Toggle/Toggle.d.ts +7 -0
- package/dist/lib/components/Toggle/Toggle.d.ts.map +1 -0
- package/dist/lib/components/Toggle/index.d.ts +2 -0
- package/dist/lib/components/Toggle/index.d.ts.map +1 -0
- package/dist/lib/components/index.d.ts +9 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/context/ThemeContext.d.ts +18 -0
- package/dist/lib/context/ThemeContext.d.ts.map +1 -0
- package/dist/lib/context/index.d.ts +2 -0
- package/dist/lib/context/index.d.ts.map +1 -0
- package/dist/lib/hooks/index.d.ts +2 -0
- package/dist/lib/hooks/index.d.ts.map +1 -0
- package/dist/lib/hooks/useTheme.d.ts +8 -0
- package/dist/lib/hooks/useTheme.d.ts.map +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/theme/index.d.ts +13 -0
- package/dist/lib/theme/index.d.ts.map +1 -0
- package/dist/lib/utils/axios.d.ts +6 -0
- package/dist/lib/utils/axios.d.ts.map +1 -1
- package/dist/lib/utils/formHelpers.d.ts.map +1 -1
- package/dist/loader-circle.js +15 -0
- package/dist/loader-circle.js.map +1 -0
- package/dist/separator2.js +53 -0
- package/dist/separator2.js.map +1 -0
- package/dist/shadcn/index.d.ts +1 -0
- package/dist/shadcn/index.d.ts.map +1 -1
- package/dist/shadcn/shadcnAvatar/Avatar.d.ts +12 -0
- package/dist/shadcn/shadcnAvatar/Avatar.d.ts.map +1 -0
- package/dist/shadcn/shadcnAvatar/index.d.ts +2 -0
- package/dist/shadcn/shadcnAvatar/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnBadge/Badge.d.ts +11 -0
- package/dist/shadcn/shadcnBadge/Badge.d.ts.map +1 -0
- package/dist/shadcn/shadcnBadge/index.d.ts +3 -0
- package/dist/shadcn/shadcnBadge/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnButton/Button.d.ts +1 -1
- package/dist/shadcn/shadcnChart/Chart.d.ts +58 -0
- package/dist/shadcn/shadcnChart/Chart.d.ts.map +1 -0
- package/dist/shadcn/shadcnChart/index.d.ts +3 -0
- package/dist/shadcn/shadcnChart/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnSonner/index.d.ts +2 -0
- package/dist/shadcn/shadcnSonner/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnSonner/sonner.d.ts +4 -0
- package/dist/shadcn/shadcnSonner/sonner.d.ts.map +1 -0
- package/dist/shadcn/shadcnSpinner/Spinner.d.ts.map +1 -1
- package/dist/shadcn/shadcnSwitch/Switch.d.ts +7 -0
- package/dist/shadcn/shadcnSwitch/Switch.d.ts.map +1 -0
- package/dist/shadcn/shadcnSwitch/index.d.ts +2 -0
- package/dist/shadcn/shadcnSwitch/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnToggle/Toggle.d.ts +10 -0
- package/dist/shadcn/shadcnToggle/Toggle.d.ts.map +1 -0
- package/dist/shadcn/shadcnToggle/index.d.ts +2 -0
- package/dist/shadcn/shadcnToggle/index.d.ts.map +1 -0
- package/dist/theme/index.js +11 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/toast.js +72 -0
- package/dist/toast.js.map +1 -0
- package/dist/useTheme.js +15 -0
- package/dist/useTheme.js.map +1 -0
- package/dist/utils/axios.js +1 -0
- package/dist/utils/axios.js.map +1 -1
- package/package.json +55 -5
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { P as Primitive } from './index9.js';
|
|
4
|
+
import { c as cn } from './utils.js';
|
|
5
|
+
|
|
6
|
+
// src/separator.tsx
|
|
7
|
+
var NAME = "Separator";
|
|
8
|
+
var DEFAULT_ORIENTATION = "horizontal";
|
|
9
|
+
var ORIENTATIONS = ["horizontal", "vertical"];
|
|
10
|
+
var Separator$1 = React.forwardRef((props, forwardedRef) => {
|
|
11
|
+
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
|
12
|
+
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
|
13
|
+
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
14
|
+
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
Primitive.div,
|
|
17
|
+
{
|
|
18
|
+
"data-orientation": orientation,
|
|
19
|
+
...semanticProps,
|
|
20
|
+
...domProps,
|
|
21
|
+
ref: forwardedRef
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
Separator$1.displayName = NAME;
|
|
26
|
+
function isValidOrientation(orientation) {
|
|
27
|
+
return ORIENTATIONS.includes(orientation);
|
|
28
|
+
}
|
|
29
|
+
var Root = Separator$1;
|
|
30
|
+
|
|
31
|
+
function Separator({
|
|
32
|
+
className,
|
|
33
|
+
orientation = "horizontal",
|
|
34
|
+
decorative = true,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
Root,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "separator",
|
|
41
|
+
decorative,
|
|
42
|
+
orientation,
|
|
43
|
+
className: cn(
|
|
44
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { Separator as S };
|
|
53
|
+
//# sourceMappingURL=separator2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator2.js","sources":["../node_modules/.pnpm/@radix-ui+react-separator@1.1.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_610c174170e89e4f500bc8cdca6da62a/node_modules/@radix-ui/react-separator/dist/index.mjs","../shadcn/shadcnSeparator/separator.tsx"],"sourcesContent":["// src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n","import * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport type * as React from 'react';\n\nimport { cn } from '../utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"names":["Separator","SeparatorPrimitive.Root"],"mappings":";;;;;AAAA;AAIA,IAAI,IAAI,GAAG,WAAW;AACtB,IAAI,mBAAmB,GAAG,YAAY;AACtC,IAAI,Y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C,GAAG;AAAA;AAAA,GACN;AAEJ;;;;","x_google_ignoreList":[0]}
|
package/dist/shadcn/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './shadcnPopover';
|
|
|
9
9
|
export * from './shadcnSeparator';
|
|
10
10
|
export * from './shadcnSheet';
|
|
11
11
|
export * from './shadcnSkeleton';
|
|
12
|
+
export * from './shadcnSonner';
|
|
12
13
|
export * from './shadcnTable';
|
|
13
14
|
export * from './shadcnTooltip';
|
|
14
15
|
export { cn } from './utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../shadcn/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../shadcn/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
4
|
+
size?: 'default' | 'sm' | 'lg';
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount };
|
|
12
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnAvatar/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;CAChC,2CAYA;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAI/F;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,2CAWrG;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAczE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWxE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7E;AAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnAvatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,WAAW,GACZ,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.ComponentProps<'span'>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function Badge({ className, variant, asChild, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Badge, badgeVariants };
|
|
11
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnBadge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,QAAA,MAAM,aAAa;;8EAkBlB,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAClG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,OAAe,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAMvF;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnBadge/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RechartsPrimitive from 'recharts';
|
|
3
|
+
declare const THEMES: {
|
|
4
|
+
readonly light: "";
|
|
5
|
+
readonly dark: ".dark";
|
|
6
|
+
};
|
|
7
|
+
export type ChartConfig = {
|
|
8
|
+
[k in string]: {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
icon?: React.ComponentType;
|
|
11
|
+
} & ({
|
|
12
|
+
color?: string;
|
|
13
|
+
theme?: never;
|
|
14
|
+
} | {
|
|
15
|
+
color?: never;
|
|
16
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
type ChartContextProps = {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
};
|
|
22
|
+
declare function useChart(): ChartContextProps;
|
|
23
|
+
declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<'div'> & {
|
|
24
|
+
config: ChartConfig;
|
|
25
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare const ChartStyle: ({ id, config }: {
|
|
28
|
+
id: string;
|
|
29
|
+
config: ChartConfig;
|
|
30
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
31
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
32
|
+
type PayloadItem = any;
|
|
33
|
+
interface ChartTooltipContentProps extends React.ComponentProps<'div'> {
|
|
34
|
+
active?: boolean;
|
|
35
|
+
payload?: PayloadItem[];
|
|
36
|
+
label?: string;
|
|
37
|
+
labelFormatter?: (value: unknown, payload: PayloadItem[]) => React.ReactNode;
|
|
38
|
+
formatter?: (value: unknown, name: string, item: PayloadItem, index: number, payload: unknown) => React.ReactNode;
|
|
39
|
+
hideLabel?: boolean;
|
|
40
|
+
hideIndicator?: boolean;
|
|
41
|
+
indicator?: 'line' | 'dot' | 'dashed';
|
|
42
|
+
nameKey?: string;
|
|
43
|
+
labelKey?: string;
|
|
44
|
+
color?: string;
|
|
45
|
+
labelClassName?: string;
|
|
46
|
+
}
|
|
47
|
+
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
48
|
+
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
49
|
+
type LegendPayloadItem = any;
|
|
50
|
+
interface ChartLegendContentProps extends React.ComponentProps<'div'> {
|
|
51
|
+
payload?: LegendPayloadItem[];
|
|
52
|
+
verticalAlign?: 'top' | 'bottom';
|
|
53
|
+
hideIcon?: boolean;
|
|
54
|
+
nameKey?: string;
|
|
55
|
+
}
|
|
56
|
+
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
57
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, useChart };
|
|
58
|
+
//# sourceMappingURL=Chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnChart/Chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAK9C,QAAA,MAAM,MAAM;;;CAAwC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,MAAM,GAAG;QACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC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SAAS,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,QAAQ,GACT,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnSonner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnSonner/sonner.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE9D,QAAA,MAAM,OAAO,GAAI,cAAc,YAAY,4CAsB1C,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnSpinner/Spinner.tsx"],"names":[],"mappings":"AAIA,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnSpinner/Spinner.tsx"],"names":[],"mappings":"AAIA,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAEpE;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Switch({ className, size, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
4
|
+
size?: 'sm' | 'default';
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Switch };
|
|
7
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnSwitch/Switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,2CAmBA;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnSwitch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Toggle, toggleVariants };
|
|
10
|
+
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnToggle/Toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,QAAA,MAAM,cAAc;;;8EAmBnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAIzF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnToggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { T as ThemeToggle$1 } from '../ThemeToggle.js';
|
|
2
|
+
import { T as ThemeContext$1, a as ThemeProvider$1 } from '../ThemeContext.js';
|
|
3
|
+
import { u as useTheme$1 } from '../useTheme.js';
|
|
4
|
+
|
|
5
|
+
const ThemeContext = ThemeContext$1;
|
|
6
|
+
const ThemeProvider = ThemeProvider$1;
|
|
7
|
+
const useTheme = useTheme$1;
|
|
8
|
+
const ThemeToggle = ThemeToggle$1;
|
|
9
|
+
|
|
10
|
+
export { ThemeContext, ThemeProvider, ThemeToggle, useTheme };
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../lib/theme/index.ts"],"sourcesContent":["/**\n * Theme sub-path export for @vritti/quantum-ui\n *\n * This module consolidates all theme-related exports into a single entry point.\n * This is critical for Module Federation - when host and remote microfrontends\n * import theme items from the same sub-path, they share the same context instance.\n *\n * @example\n * ```tsx\n * // Import all theme-related items from a single path\n * import {\n * ThemeProvider,\n * ThemeToggle,\n * useTheme,\n * ThemeContext\n * } from '@vritti/quantum-ui/theme';\n *\n * function App() {\n * return (\n * <ThemeProvider>\n * <YourApp />\n * </ThemeProvider>\n * );\n * }\n * ```\n */\n\nimport type { ThemeToggleProps as ThemeTogglePropsType } from '../components/ThemeToggle/ThemeToggle';\n// Import from components with aliases\nimport { ThemeToggle as ThemeToggleImport } from '../components/ThemeToggle/ThemeToggle';\n// Import from context with aliases (following CLAUDE.md guidelines)\nimport {\n ThemeContext as ThemeContextImport,\n type ThemeContextValue as ThemeContextValueType,\n type ThemeMode as ThemeModeType,\n ThemeProvider as ThemeProviderImport,\n type ThemeProviderProps as ThemeProviderPropsType,\n} from '../context/ThemeContext';\n// Import from hooks with aliases\nimport { type UseThemeReturn as UseThemeReturnType, useTheme as useThemeImport } from '../hooks/useTheme';\n\n// Export components with aliased imports (never direct re-exports)\nexport const ThemeContext = ThemeContextImport;\nexport const ThemeProvider = ThemeProviderImport;\nexport const useTheme = useThemeImport;\nexport const ThemeToggle = ThemeToggleImport;\n\n// Export types\nexport type ThemeContextValue = ThemeContextValueType;\nexport type ThemeMode = ThemeModeType;\nexport type ThemeProviderProps = ThemeProviderPropsType;\nexport type UseThemeReturn = UseThemeReturnType;\nexport type ThemeToggleProps = ThemeTogglePropsType;\n"],"names":["ThemeContextImport","ThemeProviderImport","useThemeImport","ThemeToggleImport"],"mappings":";;;;AA0CO,MAAM,YAAA,GAAeA;AACrB,MAAM,aAAA,GAAgBC;AACtB,MAAM,QAAA,GAAWC;AACjB,MAAM,WAAA,GAAcC;;;;"}
|
package/dist/toast.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const TOAST_EVENT = "quantum:toast";
|
|
2
|
+
let toastIdCounter = 0;
|
|
3
|
+
function generateToastId() {
|
|
4
|
+
return `quantum-toast-${Date.now()}-${++toastIdCounter}`;
|
|
5
|
+
}
|
|
6
|
+
function emitToast(type, message, options) {
|
|
7
|
+
if (typeof window === "undefined") return;
|
|
8
|
+
const event = new CustomEvent(TOAST_EVENT, {
|
|
9
|
+
detail: { type, message, options }
|
|
10
|
+
});
|
|
11
|
+
window.dispatchEvent(event);
|
|
12
|
+
}
|
|
13
|
+
const toast = Object.assign(
|
|
14
|
+
// Default toast (message type)
|
|
15
|
+
(message, options) => emitToast("message", message, options),
|
|
16
|
+
{
|
|
17
|
+
success: (message, options) => emitToast("success", message, options),
|
|
18
|
+
error: (message, options) => emitToast("error", message, options),
|
|
19
|
+
warning: (message, options) => emitToast("warning", message, options),
|
|
20
|
+
info: (message, options) => emitToast("info", message, options),
|
|
21
|
+
message: (message, options) => emitToast("message", message, options),
|
|
22
|
+
/**
|
|
23
|
+
* Show loading toast, returns ID for manual updates
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const id = toast.loading('Uploading...');
|
|
28
|
+
* try {
|
|
29
|
+
* await uploadFile();
|
|
30
|
+
* toast.success('Uploaded!', { id });
|
|
31
|
+
* } catch {
|
|
32
|
+
* toast.error('Failed', { id });
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
loading: (message, options) => {
|
|
37
|
+
const id = options?.id?.toString() ?? generateToastId();
|
|
38
|
+
emitToast("loading", message, { ...options, id });
|
|
39
|
+
return id;
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Auto-handle loading → success/error for a promise
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* toast.promise(fetchData(), {
|
|
47
|
+
* loading: 'Fetching...',
|
|
48
|
+
* success: (data) => `Loaded ${data.count} items`,
|
|
49
|
+
* error: 'Failed to load',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
promise: (promise, options) => {
|
|
54
|
+
const id = generateToastId();
|
|
55
|
+
emitToast("loading", options.loading, { id });
|
|
56
|
+
const p = typeof promise === "function" ? promise() : promise;
|
|
57
|
+
p.then((data) => {
|
|
58
|
+
const message = typeof options.success === "function" ? options.success(data) : options.success;
|
|
59
|
+
emitToast("success", message, { id });
|
|
60
|
+
}).catch((error) => {
|
|
61
|
+
const message = typeof options.error === "function" ? options.error(error) : options.error;
|
|
62
|
+
emitToast("error", message, { id });
|
|
63
|
+
}).finally(() => {
|
|
64
|
+
options.finally?.();
|
|
65
|
+
});
|
|
66
|
+
return p;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
export { TOAST_EVENT as T, generateToastId as g, toast as t };
|
|
72
|
+
//# sourceMappingURL=toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../lib/components/Sonner/toast.ts"],"sourcesContent":["/**\n * Global toast event system for Module Federation compatibility.\n *\n * This module provides a toast API that works across micro-frontends by using\n * custom DOM events instead of direct sonner calls. The Toaster component\n * listens for these events and displays the toasts.\n */\n\nexport const TOAST_EVENT = 'quantum:toast';\n\nexport type ToastType = 'success' | 'error' | 'warning' | 'info' | 'message' | 'loading';\n\nexport interface ToastOptions {\n description?: string;\n duration?: number;\n id?: string | number;\n}\n\nexport interface PromiseToastOptions<T> {\n loading: string;\n success: string | ((data: T) => string);\n error: string | ((error: unknown) => string);\n finally?: () => void;\n}\n\nexport interface ToastEventDetail {\n type: ToastType;\n message: string;\n options?: ToastOptions;\n}\n\n// Generate unique toast ID\nlet toastIdCounter = 0;\nexport function generateToastId(): string {\n return `quantum-toast-${Date.now()}-${++toastIdCounter}`;\n}\n\nfunction emitToast(type: ToastType, message: string, options?: ToastOptions): void {\n if (typeof window === 'undefined') return;\n\n const event = new CustomEvent<ToastEventDetail>(TOAST_EVENT, {\n detail: { type, message, options },\n });\n window.dispatchEvent(event);\n}\n\n/**\n * Toast API that works across Module Federation boundaries.\n *\n * @example\n * ```typescript\n * import { toast } from '@vritti/quantum-ui/Sonner';\n *\n * toast.success('Operation completed!');\n * toast.error('Something went wrong', { description: 'Please try again.' });\n * toast('Hello world'); // Default message toast\n *\n * // Loading toast with manual control\n * const id = toast.loading('Uploading...');\n * toast.success('Done!', { id }); // Updates the loading toast\n *\n * // Auto-handle promise states\n * toast.promise(asyncOperation(), {\n * loading: 'Processing...',\n * success: 'Done!',\n * error: 'Failed',\n * });\n * ```\n */\nexport const toast = Object.assign(\n // Default toast (message type)\n (message: string, options?: ToastOptions) => emitToast('message', message, options),\n {\n success: (message: string, options?: ToastOptions) => emitToast('success', message, options),\n error: (message: string, options?: ToastOptions) => emitToast('error', message, options),\n warning: (message: string, options?: ToastOptions) => emitToast('warning', message, options),\n info: (message: string, options?: ToastOptions) => emitToast('info', message, options),\n message: (message: string, options?: ToastOptions) => emitToast('message', message, options),\n\n /**\n * Show loading toast, returns ID for manual updates\n *\n * @example\n * ```typescript\n * const id = toast.loading('Uploading...');\n * try {\n * await uploadFile();\n * toast.success('Uploaded!', { id });\n * } catch {\n * toast.error('Failed', { id });\n * }\n * ```\n */\n loading: (message: string, options?: ToastOptions): string => {\n const id = options?.id?.toString() ?? generateToastId();\n emitToast('loading', message, { ...options, id });\n return id;\n },\n\n /**\n * Auto-handle loading → success/error for a promise\n *\n * @example\n * ```typescript\n * toast.promise(fetchData(), {\n * loading: 'Fetching...',\n * success: (data) => `Loaded ${data.count} items`,\n * error: 'Failed to load',\n * });\n * ```\n */\n promise: <T>(promise: Promise<T> | (() => Promise<T>), options: PromiseToastOptions<T>): Promise<T> => {\n const id = generateToastId();\n emitToast('loading', options.loading, { id });\n\n const p = typeof promise === 'function' ? promise() : promise;\n\n p.then((data) => {\n const message = typeof options.success === 'function' ? options.success(data) : options.success;\n emitToast('success', message, { id });\n })\n .catch((error) => {\n const message = typeof options.error === 'function' ? options.error(error) : options.error;\n emitToast('error', message, { id });\n })\n .fin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;;"}
|
package/dist/useTheme.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { T as ThemeContext } from './ThemeContext.js';
|
|
3
|
+
|
|
4
|
+
function useTheme() {
|
|
5
|
+
const context = useContext(ThemeContext);
|
|
6
|
+
if (!context) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"useTheme must be used within a ThemeProvider. Wrap your application with <ThemeProvider> to use the useTheme hook."
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
return context;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { useTheme as u };
|
|
15
|
+
//# sourceMappingURL=useTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.js","sources":["../lib/hooks/useTheme.ts"],"sourcesContent":["import { useContext } from 'react';\nimport { ThemeContext } from '../context/ThemeContext';\n\n// Re-export types from context for backward compatibility\nexport type { ThemeMode } from '../context/ThemeContext';\n\n/**\n * Return type for the useTheme hook\n */\nexport interface UseThemeReturn {\n /** Current theme mode ('light' or 'dark') */\n theme: 'light' | 'dark';\n /** Function to toggle between light and dark themes */\n toggleTheme: () => void;\n /** Function to set a specific theme */\n setTheme: (theme: 'light' | 'dark') => void;\n}\n\n/**\n * Hook for accessing theme state from the ThemeProvider context.\n *\n * Features:\n * - Access to centralized theme state\n * - Theme persistence handled by ThemeProvider\n * - System preference detection handled by ThemeProvider\n * - Automatic 'dark' class management on document root\n *\n * @throws Error if used outside of ThemeProvider\n * @returns Object containing current theme and functions to change it\n *\n * @example\n * ```tsx\n * // First, wrap your app with ThemeProvider\n * import { ThemeProvider } from '@vritti/quantum-ui';\n *\n * function App() {\n * return (\n * <ThemeProvider>\n * <MyComponent />\n * </ThemeProvider>\n * );\n * }\n *\n * // Then use the hook in any component\n * function MyComponent() {\n * const { theme, toggleTheme, setTheme } = useTheme();\n *\n * return (\n * <div>\n * <p>Current theme: {theme}</p>\n * <button onClick={toggleTheme}>Toggle theme</button>\n * <button onClick={() => setTheme('dark')}>Set dark</button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useTheme(): UseThemeReturn {\n const context = useContext(ThemeContext);\n\n if (!context) {\n throw new Error(\n 'useTheme must be used within a ThemeProvider. ' +\n 'Wrap your application with <ThemeProvider> to use the useTheme hook.'\n );\n }\n\n return context;\n}\n"],"names":[],"mappings":";;;AAyDO,SAAS,QAAA,GAA2B;AACzC,EAAA,MAAM,OAAA,GAAU,WAAW,YAAY,CAAA;AAEvC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KAEF;AAAA,EACF;AAEA,EAAA,OAAO,OAAA;AACT;;;;"}
|
package/dist/utils/axios.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { a as axios, b as cancelTokenRefresh, e as clearCsrfToken, f as clearToken, a as default, h as getCsrfToken, i as getToken, j as recoverToken, s as scheduleTokenRefresh, k as setCsrfToken, l as setToken } from '../axios.js';
|
|
2
|
+
import '../toast.js';
|
|
2
3
|
//# sourceMappingURL=axios.js.map
|
package/dist/utils/axios.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"axios.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.8",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"repository": {
|
|
@@ -36,6 +36,14 @@
|
|
|
36
36
|
"types": "./dist/lib/index.d.ts",
|
|
37
37
|
"import": "./dist/index.js"
|
|
38
38
|
},
|
|
39
|
+
"./Avatar": {
|
|
40
|
+
"types": "./dist/lib/components/Avatar/index.d.ts",
|
|
41
|
+
"import": "./dist/components/Avatar.js"
|
|
42
|
+
},
|
|
43
|
+
"./Badge": {
|
|
44
|
+
"types": "./dist/lib/components/Badge/index.d.ts",
|
|
45
|
+
"import": "./dist/components/Badge.js"
|
|
46
|
+
},
|
|
39
47
|
"./Button": {
|
|
40
48
|
"types": "./dist/lib/components/Button/index.d.ts",
|
|
41
49
|
"import": "./dist/components/Button.js"
|
|
@@ -44,6 +52,10 @@
|
|
|
44
52
|
"types": "./dist/lib/components/Card/index.d.ts",
|
|
45
53
|
"import": "./dist/components/Card.js"
|
|
46
54
|
},
|
|
55
|
+
"./Chart": {
|
|
56
|
+
"types": "./dist/lib/components/Chart/index.d.ts",
|
|
57
|
+
"import": "./dist/components/Chart.js"
|
|
58
|
+
},
|
|
47
59
|
"./TextField": {
|
|
48
60
|
"types": "./dist/lib/components/TextField/index.d.ts",
|
|
49
61
|
"import": "./dist/components/TextField.js"
|
|
@@ -88,14 +100,34 @@
|
|
|
88
100
|
"types": "./dist/lib/components/DatePicker/index.d.ts",
|
|
89
101
|
"import": "./dist/components/DatePicker.js"
|
|
90
102
|
},
|
|
103
|
+
"./DropdownMenu": {
|
|
104
|
+
"types": "./dist/lib/components/DropdownMenu/index.d.ts",
|
|
105
|
+
"import": "./dist/components/DropdownMenu.js"
|
|
106
|
+
},
|
|
107
|
+
"./Separator": {
|
|
108
|
+
"types": "./dist/lib/components/Separator/index.d.ts",
|
|
109
|
+
"import": "./dist/components/Separator.js"
|
|
110
|
+
},
|
|
91
111
|
"./Skeleton": {
|
|
92
112
|
"types": "./dist/lib/components/Skeleton/index.d.ts",
|
|
93
113
|
"import": "./dist/components/Skeleton.js"
|
|
94
114
|
},
|
|
115
|
+
"./Sonner": {
|
|
116
|
+
"types": "./dist/lib/components/Sonner/index.d.ts",
|
|
117
|
+
"import": "./dist/components/Sonner.js"
|
|
118
|
+
},
|
|
95
119
|
"./Spinner": {
|
|
96
120
|
"types": "./dist/lib/components/Spinner/index.d.ts",
|
|
97
121
|
"import": "./dist/components/Spinner.js"
|
|
98
122
|
},
|
|
123
|
+
"./Switch": {
|
|
124
|
+
"types": "./dist/lib/components/Switch/index.d.ts",
|
|
125
|
+
"import": "./dist/components/Switch.js"
|
|
126
|
+
},
|
|
127
|
+
"./Toggle": {
|
|
128
|
+
"types": "./dist/lib/components/Toggle/index.d.ts",
|
|
129
|
+
"import": "./dist/components/Toggle.js"
|
|
130
|
+
},
|
|
99
131
|
"./Field": {
|
|
100
132
|
"types": "./dist/lib/components/Field/index.d.ts",
|
|
101
133
|
"import": "./dist/shadcn/shadcnField.js"
|
|
@@ -104,6 +136,18 @@
|
|
|
104
136
|
"types": "./dist/lib/utils/axios.d.ts",
|
|
105
137
|
"import": "./dist/utils/axios.js"
|
|
106
138
|
},
|
|
139
|
+
"./hooks": {
|
|
140
|
+
"types": "./dist/lib/hooks/index.d.ts",
|
|
141
|
+
"import": "./dist/hooks/index.js"
|
|
142
|
+
},
|
|
143
|
+
"./context": {
|
|
144
|
+
"types": "./dist/lib/context/index.d.ts",
|
|
145
|
+
"import": "./dist/context/index.js"
|
|
146
|
+
},
|
|
147
|
+
"./theme": {
|
|
148
|
+
"types": "./dist/lib/theme/index.d.ts",
|
|
149
|
+
"import": "./dist/theme/index.js"
|
|
150
|
+
},
|
|
107
151
|
"./index.css": "./dist/assets/quantum-ui.css"
|
|
108
152
|
},
|
|
109
153
|
"files": [
|
|
@@ -122,9 +166,10 @@
|
|
|
122
166
|
},
|
|
123
167
|
"devDependencies": {
|
|
124
168
|
"@biomejs/biome": "2.3.11",
|
|
125
|
-
"@storybook/addon-docs": "10.
|
|
126
|
-
"@storybook/addon-themes": "
|
|
127
|
-
"@storybook/react
|
|
169
|
+
"@storybook/addon-docs": "10.2.0",
|
|
170
|
+
"@storybook/addon-themes": "10.2.0",
|
|
171
|
+
"@storybook/react": "10.2.0",
|
|
172
|
+
"@storybook/react-vite": "10.2.0",
|
|
128
173
|
"@tailwindcss/postcss": "^4.1.18",
|
|
129
174
|
"@tanstack/react-query": "^5.90.19",
|
|
130
175
|
"@types/node": "^25.0.9",
|
|
@@ -136,7 +181,7 @@
|
|
|
136
181
|
"react": "19.2.3",
|
|
137
182
|
"react-dom": "19.2.3",
|
|
138
183
|
"react-router-dom": "^7.12.0",
|
|
139
|
-
"storybook": "10.
|
|
184
|
+
"storybook": "10.2.0",
|
|
140
185
|
"tailwindcss": "^4.1.18",
|
|
141
186
|
"tw-animate-css": "^1.4.0",
|
|
142
187
|
"typescript": "~5.9.3",
|
|
@@ -145,6 +190,7 @@
|
|
|
145
190
|
},
|
|
146
191
|
"dependencies": {
|
|
147
192
|
"@hookform/resolvers": "^5.2.2",
|
|
193
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
148
194
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
149
195
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
150
196
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
@@ -154,6 +200,8 @@
|
|
|
154
200
|
"@radix-ui/react-select": "^2.2.6",
|
|
155
201
|
"@radix-ui/react-separator": "^1.1.8",
|
|
156
202
|
"@radix-ui/react-slot": "^1.2.4",
|
|
203
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
204
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
157
205
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
158
206
|
"@tailwindcss/vite": "^4.1.18",
|
|
159
207
|
"axios": "^1.13.2",
|
|
@@ -164,6 +212,8 @@
|
|
|
164
212
|
"react-day-picker": "^9.13.0",
|
|
165
213
|
"react-hook-form": "^7.71.1",
|
|
166
214
|
"react-phone-number-input": "^3.4.14",
|
|
215
|
+
"recharts": "^3.7.0",
|
|
216
|
+
"sonner": "^2.0.7",
|
|
167
217
|
"tailwind-merge": "^3.4.0",
|
|
168
218
|
"zod": "^4.3.5"
|
|
169
219
|
},
|