@vritti/quantum-ui 0.2.7 → 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/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/Spinner.js +1 -9
- 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 +18 -0
- package/dist/axios.js.map +1 -1
- package/dist/check.js +15 -0
- package/dist/check.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/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 +10 -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/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 +8 -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 +1 -0
- package/dist/lib/utils/axios.d.ts.map +1 -1
- package/dist/lib/utils/formHelpers.d.ts.map +1 -1
- package/dist/separator2.js +53 -0
- package/dist/separator2.js.map +1 -0
- package/dist/shadcn/index.d.ts +1 -1
- 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/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/useTheme.js +15 -0
- package/dist/useTheme.js.map +1 -0
- package/package.json +45 -1
|
@@ -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":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../shadcn/shadcnChart/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,QAAQ,GACT,MAAM,SAAS,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/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/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,6 +100,14 @@
|
|
|
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"
|
|
@@ -100,6 +120,14 @@
|
|
|
100
120
|
"types": "./dist/lib/components/Spinner/index.d.ts",
|
|
101
121
|
"import": "./dist/components/Spinner.js"
|
|
102
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
|
+
},
|
|
103
131
|
"./Field": {
|
|
104
132
|
"types": "./dist/lib/components/Field/index.d.ts",
|
|
105
133
|
"import": "./dist/shadcn/shadcnField.js"
|
|
@@ -108,6 +136,18 @@
|
|
|
108
136
|
"types": "./dist/lib/utils/axios.d.ts",
|
|
109
137
|
"import": "./dist/utils/axios.js"
|
|
110
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
|
+
},
|
|
111
151
|
"./index.css": "./dist/assets/quantum-ui.css"
|
|
112
152
|
},
|
|
113
153
|
"files": [
|
|
@@ -150,6 +190,7 @@
|
|
|
150
190
|
},
|
|
151
191
|
"dependencies": {
|
|
152
192
|
"@hookform/resolvers": "^5.2.2",
|
|
193
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
153
194
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
154
195
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
155
196
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
@@ -159,6 +200,8 @@
|
|
|
159
200
|
"@radix-ui/react-select": "^2.2.6",
|
|
160
201
|
"@radix-ui/react-separator": "^1.1.8",
|
|
161
202
|
"@radix-ui/react-slot": "^1.2.4",
|
|
203
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
204
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
162
205
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
163
206
|
"@tailwindcss/vite": "^4.1.18",
|
|
164
207
|
"axios": "^1.13.2",
|
|
@@ -169,6 +212,7 @@
|
|
|
169
212
|
"react-day-picker": "^9.13.0",
|
|
170
213
|
"react-hook-form": "^7.71.1",
|
|
171
214
|
"react-phone-number-input": "^3.4.14",
|
|
215
|
+
"recharts": "^3.7.0",
|
|
172
216
|
"sonner": "^2.0.7",
|
|
173
217
|
"tailwind-merge": "^3.4.0",
|
|
174
218
|
"zod": "^4.3.5"
|