@vritti/quantum-ui 0.1.23 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button.d.ts +10 -3
- package/dist/Button.js +21 -36
- package/dist/Button.js.map +1 -1
- package/dist/Button2.js +42 -0
- package/dist/Button2.js.map +1 -0
- package/dist/Card.d.ts +8 -8
- package/dist/Card.js.map +1 -1
- package/dist/Checkbox.d.ts +5 -8
- package/dist/Checkbox.js +41 -30
- package/dist/Checkbox.js.map +1 -1
- package/dist/DatePicker.d.ts +4 -4
- package/dist/DatePicker.js +4055 -246
- package/dist/DatePicker.js.map +1 -1
- package/dist/Form.d.ts +70 -88
- package/dist/Form.js +34 -30
- package/dist/Form.js.map +1 -1
- package/dist/Label.js.map +1 -1
- package/dist/OTPField.js +2 -12
- package/dist/OTPField.js.map +1 -1
- package/dist/PasswordField.js.map +1 -1
- package/dist/PhoneField.js +6 -12
- package/dist/PhoneField.js.map +1 -1
- package/dist/Skeleton.d.ts +1 -1
- package/dist/Skeleton.js +2 -11
- package/dist/Skeleton.js.map +1 -1
- package/dist/Spinner.d.ts +14 -0
- package/dist/Spinner.js +31 -0
- package/dist/Spinner.js.map +1 -0
- package/dist/TextArea.js +4 -10
- package/dist/TextArea.js.map +1 -1
- package/dist/TextField.js +18 -2
- package/dist/TextField.js.map +1 -1
- package/dist/ThemeToggle.js.map +1 -1
- package/dist/Typography.js.map +1 -1
- package/dist/assets/quantum-ui.css +47 -31
- package/dist/axios.d.ts +1 -1
- package/dist/axios.js +11 -16
- package/dist/axios.js.map +1 -1
- package/dist/components/Button.js +2 -1
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Form.js +1 -1
- package/dist/components/Progress.js +2 -5
- package/dist/components/Progress.js.map +1 -1
- package/dist/components/{DataTable.d.ts → Spinner.d.ts} +1 -1
- package/dist/components/Spinner.js +2 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/createLucideIcon.js.map +1 -1
- package/dist/field.js +25 -143
- package/dist/field.js.map +1 -1
- package/dist/index.d.ts +107 -134
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index2.js +54 -116
- package/dist/index2.js.map +1 -1
- package/dist/index3.js +103 -1
- package/dist/index3.js.map +1 -1
- package/dist/index4.js +31 -55
- package/dist/index4.js.map +1 -1
- package/dist/index5.js +86 -2
- package/dist/index5.js.map +1 -1
- package/dist/index6.js +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/utils/axios.d.ts +1 -1
- package/dist/utils/axios.js +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +21 -19
- package/dist/Combination.js +0 -3869
- package/dist/Combination.js.map +0 -1
- package/dist/DataTable.d.ts +0 -31
- package/dist/DataTable.js +0 -4989
- package/dist/DataTable.js.map +0 -1
- package/dist/Input.js +0 -22
- package/dist/Input.js.map +0 -1
- package/dist/check.js +0 -15
- package/dist/check.js.map +0 -1
- package/dist/components/DataTable.js +0 -2
- package/dist/components/DataTable.js.map +0 -1
package/dist/Skeleton.d.ts
CHANGED
package/dist/Skeleton.js
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { c as cn } from './utils.js';
|
|
3
3
|
|
|
4
|
-
function Skeleton({
|
|
5
|
-
className,
|
|
6
|
-
...props
|
|
7
|
-
}) {
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
-
"div",
|
|
10
|
-
{
|
|
11
|
-
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
4
|
+
function Skeleton({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
15
6
|
}
|
|
16
7
|
|
|
17
8
|
export { Skeleton as S };
|
package/dist/Skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sources":["../lib/components/Skeleton/Skeleton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../../shadcn/utils';\n\nfunction Skeleton({
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sources":["../lib/components/Skeleton/Skeleton.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { cn } from '../../../shadcn/utils';\n\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"names":[],"mappings":";;;AAGA,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAyC;AAC/E,EAAA,uBAAO,GAAA,CAAC,SAAI,SAAA,EAAW,EAAA,CAAG,qCAAqC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACxF;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const Spinner: typeof Spinner_2;
|
|
2
|
+
|
|
3
|
+
declare function Spinner_2({ className, ...props }: React.ComponentProps<'svg'>) {
|
|
4
|
+
return (
|
|
5
|
+
<Loader2Icon
|
|
6
|
+
role="status"
|
|
7
|
+
aria-label="Loading"
|
|
8
|
+
className={cn('size-4 animate-spin', className)}
|
|
9
|
+
{...props}
|
|
10
|
+
/>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { }
|
package/dist/Spinner.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { c as cn } from './utils.js';
|
|
3
|
+
import { c as createLucideIcon } from './createLucideIcon.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license lucide-react v0.544.0 - ISC
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the ISC license.
|
|
9
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const __iconNode = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
14
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode);
|
|
15
|
+
|
|
16
|
+
function Spinner$1({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
LoaderCircle,
|
|
19
|
+
{
|
|
20
|
+
role: "status",
|
|
21
|
+
"aria-label": "Loading",
|
|
22
|
+
className: cn("size-4 animate-spin", className),
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const Spinner = Spinner$1;
|
|
29
|
+
|
|
30
|
+
export { Spinner as S };
|
|
31
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.js","sources":["../node_modules/.pnpm/lucide-react@0.544.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js","../shadcn/shadcnSpinner/Spinner.tsx","../lib/components/Spinner/Spinner.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]];\nconst LoaderCircle = createLucideIcon(\"loader-circle\", __iconNode);\n\nexport { __iconNode, LoaderCircle as default };\n//# sourceMappingURL=loader-circle.js.map\n","import { Loader2Icon } from 'lucide-react';\n\nimport { cn } from '../utils';\n\nfunction Spinner({ className, ...props }: React.ComponentProps<'svg'>) {\n return (\n <Loader2Icon\n role=\"status\"\n aria-label=\"Loading\"\n className={cn('size-4 animate-spin', className)}\n {...props}\n />\n );\n}\n\nexport { Spinner };\n","// Spinner molecule - wrapper around shadcn Spinner\nimport { Spinner as ShadcnSpinner } from '../../../shadcn/shadcnSpinner';\n\nexport const Spinner = ShadcnSpinner;\n"],"names":["Spinner","Loader2Icon","ShadcnSpinner"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,6BAA6B,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClF,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,EAAE,UAAU,CAAC;;ACNlE,SAASA,SAAA,CAAQ,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACrE,EAAA,uBACE,GAAA;AAAA,IAACC,YAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MACL,YAAA,EAAW,SAAA;AAAA,MACX,SAAA,EAAW,EAAA,CAAG,qBAAA,EAAuB,SAAS,CAAA;AAAA,MAC7C,GAAG;AAAA;AAAA,GACN;AAEJ;;ACVO,MAAM,OAAA,GAAUC;;;;","x_google_ignoreList":[0]}
|
package/dist/TextArea.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { c as cn } from './utils.js';
|
|
4
3
|
import { F as Field, e as FieldLabel, a as FieldContent, b as FieldDescription, c as FieldError } from './field.js';
|
|
4
|
+
import { c as cn } from './utils.js';
|
|
5
5
|
|
|
6
6
|
function Textarea({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(
|
|
@@ -18,15 +18,9 @@ function Textarea({ className, ...props }) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const TextArea = React__default.forwardRef(
|
|
21
|
-
({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
error,
|
|
25
|
-
className,
|
|
26
|
-
id,
|
|
27
|
-
...props
|
|
28
|
-
}, ref) => {
|
|
29
|
-
const fieldId = id || React__default.useId();
|
|
21
|
+
({ label, description, error, className, id, ...props }, ref) => {
|
|
22
|
+
const generatedId = React__default.useId();
|
|
23
|
+
const fieldId = id || generatedId;
|
|
30
24
|
const hasError = !!error;
|
|
31
25
|
return /* @__PURE__ */ jsxs(Field, { children: [
|
|
32
26
|
label && /* @__PURE__ */ jsx(FieldLabel, { htmlFor: fieldId, children: label }),
|
package/dist/TextArea.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sources":["../shadcn/shadcnTextarea/textarea.tsx","../lib/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as React from
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../shadcn/shadcnTextarea/textarea.tsx","../lib/components/TextArea/TextArea.tsx"],"sourcesContent":["import type * as React from 'react';\n\nimport { cn } from '../utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import React from 'react';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '../../../shadcn/shadcnField';\nimport { Textarea } from '../../../shadcn/shadcnTextarea';\nimport { cn } from '../../../shadcn/utils';\n\nexport interface TextAreaProps extends React.ComponentProps<'textarea'> {\n /**\n * Label for the field\n */\n label?: string;\n\n /**\n * Helper text or description to display below the field\n */\n description?: React.ReactNode;\n\n /**\n * Error message to display below the field\n */\n error?: string;\n}\n\n// TextArea molecule - Textarea + Label composition with Field system\nexport const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ label, description, error, className, id, ...props }, ref) => {\n const generatedId = React.useId();\n const fieldId = id || generatedId;\n const hasError = !!error;\n\n return (\n <Field>\n {label && <FieldLabel htmlFor={fieldId}>{label}</FieldLabel>}\n\n <FieldContent>\n <Textarea\n ref={ref}\n id={fieldId}\n className={cn(className)}\n aria-describedby={description || error ? `${fieldId}-description ${fieldId}-error` : undefined}\n aria-invalid={hasError}\n {...props}\n />\n\n {description && <FieldDescription id={`${fieldId}-description`}>{description}</FieldDescription>}\n\n {error && <FieldError id={`${fieldId}-error`}>{error}</FieldError>}\n </FieldContent>\n </Field>\n );\n },\n);\n\nTextArea.displayName = 'TextArea';\n"],"names":["React"],"mappings":";;;;;AAIA,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqC;AAC3E,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,UAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,qcAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;ACQO,MAAM,WAAWA,cAAA,CAAM,UAAA;AAAA,EAC5B,CAAC,EAAE,KAAA,EAAO,WAAA,EAAa,KAAA,EAAO,WAAW,EAAA,EAAI,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAC/D,IAAA,MAAM,WAAA,GAAcA,eAAM,KAAA,EAAM;AAChC,IAAA,MAAM,UAAU,EAAA,IAAM,WAAA;AACtB,IAAA,MAAM,QAAA,GAAW,CAAC,CAAC,KAAA;AAEnB,IAAA,4BACG,KAAA,EAAA,EACE,QAAA,EAAA;AAAA,MAAA,KAAA,oBAAS,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAS,OAAA,EAAU,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,2BAE9C,YAAA,EAAA,EACC,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACC,GAAA;AAAA,YACA,EAAA,EAAI,OAAA;AAAA,YACJ,SAAA,EAAW,GAAG,SAAS,CAAA;AAAA,YACvB,oBAAkB,WAAA,IAAe,KAAA,GAAQ,GAAG,OAAO,CAAA,aAAA,EAAgB,OAAO,CAAA,MAAA,CAAA,GAAW,MAAA;AAAA,YACrF,cAAA,EAAc,QAAA;AAAA,YACb,GAAG;AAAA;AAAA,SACN;AAAA,QAEC,+BAAe,GAAA,CAAC,gBAAA,EAAA,EAAiB,IAAI,CAAA,EAAG,OAAO,gBAAiB,QAAA,EAAA,WAAA,EAAY,CAAA;AAAA,QAE5E,yBAAS,GAAA,CAAC,UAAA,EAAA,EAAW,IAAI,CAAA,EAAG,OAAO,UAAW,QAAA,EAAA,KAAA,EAAM;AAAA,OAAA,EACvD;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;;;;"}
|
package/dist/TextField.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { c as cn } from './utils.js';
|
|
4
4
|
import { F as Field, e as FieldLabel, b as FieldDescription, c as FieldError } from './field.js';
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
function Input({ className, type, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"input",
|
|
9
|
+
{
|
|
10
|
+
type,
|
|
11
|
+
"data-slot": "input",
|
|
12
|
+
className: cn(
|
|
13
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
14
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[1px]",
|
|
15
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
6
22
|
|
|
7
23
|
const TextField = React__default.forwardRef(
|
|
8
24
|
({ label, description, error, className, id, startAdornment, endAdornment, ...props }, ref) => {
|
package/dist/TextField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sources":["../lib/components/TextField/TextField.tsx"],"sourcesContent":["import React from 'react';\nimport { Input } from '../../../shadcn/shadcnInput';\nimport { cn } from '../../../shadcn/utils';\nimport { Field, FieldDescription, FieldError, FieldLabel } from '../Field';\n\nexport interface TextFieldProps extends React.ComponentProps<'input'> {\n /**\n * Label for the field\n */\n label?: string;\n\n /**\n * Helper text to display below the field\n */\n description?: React.ReactNode;\n\n /**\n * Error message to display\n */\n error?: string;\n\n /**\n * Element to display at the start of the input (e.g., icon)\n */\n startAdornment?: React.ReactNode;\n\n /**\n * Element to display at the end of the input (e.g., icon button)\n */\n endAdornment?: React.ReactNode;\n}\n\n// TextField molecule - Input + Label composition using Field system\nexport const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\n ({ label, description, error, className, id, startAdornment, endAdornment, ...props }, ref) => {\n return (\n <Field
|
|
1
|
+
{"version":3,"file":"TextField.js","sources":["../shadcn/shadcnInput/Input.tsx","../lib/components/TextField/TextField.tsx"],"sourcesContent":["import type * as React from 'react';\n\nimport { cn } from '../utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[1px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","import React from 'react';\nimport { Input } from '../../../shadcn/shadcnInput';\nimport { cn } from '../../../shadcn/utils';\nimport { Field, FieldDescription, FieldError, FieldLabel } from '../Field';\n\nexport interface TextFieldProps extends React.ComponentProps<'input'> {\n /**\n * Label for the field\n */\n label?: string;\n\n /**\n * Helper text to display below the field\n */\n description?: React.ReactNode;\n\n /**\n * Error message to display\n */\n error?: string;\n\n /**\n * Element to display at the start of the input (e.g., icon)\n */\n startAdornment?: React.ReactNode;\n\n /**\n * Element to display at the end of the input (e.g., icon button)\n */\n endAdornment?: React.ReactNode;\n}\n\n// TextField molecule - Input + Label composition using Field system\nexport const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\n ({ label, description, error, className, id, startAdornment, endAdornment, ...props }, ref) => {\n return (\n <Field>\n {label && <FieldLabel>{label}</FieldLabel>}\n\n <div className=\"relative\">\n {startAdornment && (\n <div className=\"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none\">{startAdornment}</div>\n )}\n <Input\n aria-invalid={!!error}\n ref={ref}\n className={cn(className, startAdornment && 'pl-10', endAdornment && 'pr-10')}\n id={id}\n {...props}\n />\n {endAdornment && <div className=\"absolute inset-y-0 right-0 flex items-center pr-3\">{endAdornment}</div>}\n </div>\n\n {description && !error && <FieldDescription>{description}</FieldDescription>}\n {error && <FieldError>{error}</FieldError>}\n </Field>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"],"names":["React"],"mappings":";;;;;AAIA,SAAS,MAAM,EAAE,SAAA,EAAW,IAAA,EAAM,GAAG,OAAM,EAAkC;AAC3E,EAAA,uBACE,GAAA;AAAA,I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,QAAA,EAAA,KAAA,EAAM;AAAA,KAAA,EAC/B,CAAA;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;;;"}
|
package/dist/ThemeToggle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeToggle.js","sources":["../node_modules/lucide-react/dist/esm/icons/moon.js","../node_modules/lucide-react/dist/esm/icons/sun.js","../lib/components/ThemeToggle/ThemeToggle.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n key: \"kfwtm\"\n }\n ]\n];\nconst Moon = createLucideIcon(\"moon\", __iconNode);\n\nexport { __iconNode, Moon as default };\n//# sourceMappingURL=moon.js.map\n","/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"path\", { d: \"M12 2v2\", key: \"tus03m\" }],\n [\"path\", { d: \"M12 20v2\", key: \"1lh1kg\" }],\n [\"path\", { d: \"m4.93 4.93 1.41 1.41\", key: \"149t6j\" }],\n [\"path\", { d: \"m17.66 17.66 1.41 1.41\", key: \"ptbguv\" }],\n [\"path\", { d: \"M2 12h2\", key: \"1t8f8n\" }],\n [\"path\", { d: \"M20 12h2\", key: \"1q8mjw\" }],\n [\"path\", { d: \"m6.34 17.66-1.41 1.41\", key: \"1m8zz5\" }],\n [\"path\", { d: \"m19.07 4.93-1.41 1.41\", key: \"1shlcs\" }]\n];\nconst Sun = createLucideIcon(\"sun\", __iconNode);\n\nexport { __iconNode, Sun as default };\n//# sourceMappingURL=sun.js.map\n","import
|
|
1
|
+
{"version":3,"file":"ThemeToggle.js","sources":["../node_modules/.pnpm/lucide-react@0.544.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/moon.js","../node_modules/.pnpm/lucide-react@0.544.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/sun.js","../lib/components/ThemeToggle/ThemeToggle.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n key: \"kfwtm\"\n }\n ]\n];\nconst Moon = createLucideIcon(\"moon\", __iconNode);\n\nexport { __iconNode, Moon as default };\n//# sourceMappingURL=moon.js.map\n","/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"path\", { d: \"M12 2v2\", key: \"tus03m\" }],\n [\"path\", { d: \"M12 20v2\", key: \"1lh1kg\" }],\n [\"path\", { d: \"m4.93 4.93 1.41 1.41\", key: \"149t6j\" }],\n [\"path\", { d: \"m17.66 17.66 1.41 1.41\", key: \"ptbguv\" }],\n [\"path\", { d: \"M2 12h2\", key: \"1t8f8n\" }],\n [\"path\", { d: \"M20 12h2\", key: \"1q8mjw\" }],\n [\"path\", { d: \"m6.34 17.66-1.41 1.41\", key: \"1m8zz5\" }],\n [\"path\", { d: \"m19.07 4.93-1.41 1.41\", key: \"1shlcs\" }]\n];\nconst Sun = createLucideIcon(\"sun\", __iconNode);\n\nexport { __iconNode, Sun as default };\n//# sourceMappingURL=sun.js.map\n","import { Moon, Sun } from 'lucide-react';\nimport type React from 'react';\nimport { useLayoutEffect, useState } from 'react';\nimport { Button } from '../Button/Button';\n\nexport interface ThemeToggleProps {\n /**\n * Custom className for the toggle button\n */\n className?: string;\n\n /**\n * Size of the toggle button\n */\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const ThemeToggle: React.FC<ThemeToggleProps> = ({ className, size = 'md' }) => {\n const [isDarkMode, setIsDarkMode] = useState(false);\n\n useLayoutEffect(() => {\n // Check for saved theme preference or system preference\n const savedTheme = localStorage.getItem('theme');\n const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;\n const shouldUseDark = savedTheme === 'dark' || (!savedTheme && systemPrefersDark);\n\n setIsDarkMode(shouldUseDark);\n document.documentElement.classList.toggle('dark', shouldUseDark);\n }, []);\n\n const toggleTheme = () => {\n const newDarkMode = !isDarkMode;\n setIsDarkMode(newDarkMode);\n\n // Update DOM and localStorage\n document.documentElement.classList.toggle('dark', newDarkMode);\n localStorage.setItem('theme', newDarkMode ? 'dark' : 'light');\n };\n\n return (\n <Button\n variant=\"ghost\"\n size={size === 'md' ? 'default' : size}\n onClick={toggleTheme}\n className={`text-foreground ${className}`}\n aria-label={`Switch to ${isDarkMode ? 'light' : 'dark'} theme`}\n >\n <Sun\n className={`h-4 w-4 transition-all ${isDarkMode ? 'scale-0 -rotate-90' : 'scale-100 rotate-0'}`}\n aria-hidden\n />\n <Moon\n className={`absolute h-4 w-4 transition-all ${isDarkMode ? 'scale-100 rotate-0' : 'scale-0 rotate-90'}`}\n aria-hidden\n />\n </Button>\n );\n};\n"],"names":["__iconNode"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAMA,YAAU,GAAG;AACnB,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,gHAAgH;AACzH,MAAM,GAAG,EAA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AAA,EAAW;AAAA;AAAA,SACb;AAAA,wBACA,GAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAW,CAAA,gCAAA,EAAmC,UAAA,GAAa,oBAAA,GAAuB,mBAAmB,CAAA,CAAA;AAAA,YACrG,aAAA,EAAW;AAAA;AAAA;AACb;AAAA;AAAA,GACF;AAEJ;;;;","x_google_ignoreList":[0,1]}
|
package/dist/Typography.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sources":["../lib/components/Typography/Typography.tsx"],"sourcesContent":["import React from 'react';\nimport { cn } from '../../../shadcn/utils';\n\nexport interface TypographyProps {\n /**\n * The content to render\n */\n children: React.ReactNode;\n\n /**\n * The semantic variant of the typography\n */\n variant?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'body1'\n | 'body2'\n | 'caption'\n | 'overline'\n | 'subtitle1'\n | 'subtitle2'\n | 'button'\n | 'code'\n | 'blockquote';\n\n /**\n * The color intent of the text\n */\n intent?: 'default' | 'primary' | 'secondary' | 'muted' | 'success' | 'warning' | 'error';\n\n /**\n * Whether text should be centered\n */\n align?: 'left' | 'center' | 'right' | 'justify';\n\n /**\n * Custom className\n */\n className?: string;\n}\n\nconst variantMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n body1: 'p',\n body2: 'p',\n caption: 'span',\n overline: 'span',\n subtitle1: 'h6',\n subtitle2: 'h6',\n button: 'span',\n code: 'code',\n blockquote: 'blockquote',\n} as const;\n\nexport const Typography: React.FC<TypographyProps> = ({\n children,\n variant = 'body1',\n intent = 'default',\n align = 'left',\n className,\n ...props\n}) => {\n const Component = variantMap[variant];\n\n const getVariantClasses = () => {\n switch (variant) {\n case 'h1':\n return 'scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl';\n case 'h2':\n return 'scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0';\n case 'h3':\n return 'scroll-m-20 text-2xl font-semibold tracking-tight';\n case 'h4':\n return 'scroll-m-20 text-xl font-semibold tracking-tight';\n case 'h5':\n return 'scroll-m-20 text-lg font-semibold tracking-tight';\n case 'h6':\n return 'scroll-m-20 text-base font-semibold tracking-tight';\n case 'body1':\n return 'leading-7';\n case 'body2':\n return 'text-sm leading-6';\n case 'caption':\n return 'text-xs text-muted-foreground';\n case 'overline':\n return 'text-xs font-medium uppercase tracking-wide text-muted-foreground';\n case 'subtitle1':\n return 'text-lg font-medium';\n case 'subtitle2':\n return 'text-sm font-medium';\n case 'button':\n return 'text-sm font-medium';\n case 'code':\n return 'relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold';\n case 'blockquote':\n return 'mt-6 border-l-2 pl-6 italic';\n default:\n return 'leading-7';\n }\n };\n\n const getIntentClasses = () => {\n switch (intent) {\n case 'primary':\n return 'text-primary';\n case 'secondary':\n return 'text-secondary-foreground';\n case 'muted':\n return 'text-muted-foreground';\n case 'success':\n return 'text-green-600 dark:text-green-400';\n case 'warning':\n return 'text-yellow-600 dark:text-yellow-400';\n case 'error':\n return 'text-destructive';\n default:\n return 'text-foreground';\n }\n };\n\n const getAlignClasses = () => {\n switch (align) {\n case 'center':\n return 'text-center';\n case 'right':\n return 'text-right';\n case 'justify':\n return 'text-justify';\n default:\n return 'text-left';\n }\n };\n\n return (\n <Component className={cn(getVariantClasses(), getIntentClasses(), getAlignClasses(), className)} {...props}>\n {children}\n </Component>\n );\n};\n"],"names":[],"mappings":";;;AA6CA,MAAM,UAAA,GAAa;AAAA,EACjB,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,KAAA,EAAO,GAAA;AAAA,EACP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ACE,QAAA,OAAO,WAAA;AAAA;AACX,EACF,CAAA;AAEA,EAAA,MAAM,mBAAmB,MAAM;AAC7B,IAAA,QAAQ,MAAA;AAAQ,MACd,KAAK,SAAA;AACH,QAAA,OAAO,cAAA;AAAA,MACT,KAAK,WAAA;AACH,QAAA,OAAO,2BAAA;AAAA,MACT,KAAK,OAAA;AACH,QAAA,OAAO,uBAAA;AAAA,MACT,KAAK,SAAA;AACH,QAAA,OAAO,oCAAA;AAAA,MACT,KAAK,SAAA;AACH,QAAA,OAAO,sCAAA;AAAA,MACT,KAAK,OAAA;AACH,QAAA,OAAO,kBAAA;AAAA,MACT;AACE,QAAA,OAAO,iBAAA;AAAA;AACX,EACF,CAAA;AAEA,EAAA,MAAM,kBAAkB,MAAM;AAC5B,IAAA,QAAQ,KAAA;AAAO,MACb,KAAK,QAAA;AACH,QAAA,OAAO,aAAA;AAAA,MACT,KAAK,OAAA;AACH,QAAA,OAAO,YAAA;AAAA,MACT,KAAK,SAAA;AACH,QAAA,OAAO,cAAA;AAAA,MACT;AACE,QAAA,OAAO,WAAA;AAAA;AACX,EACF,CAAA;AAEA,EAAA,uBACE,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,EAAA,CAAG,mBAAkB,EAAG,gBAAA,EAAiB,EAAG,eAAA,EAAgB,EAAG,SAAS,CAAA,EAAI,GAAG,OAClG,QAAA,EACH,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"Typography.js","sources":["../lib/components/Typography/Typography.tsx"],"sourcesContent":["import type React from 'react';\nimport { cn } from '../../../shadcn/utils';\n\nexport interface TypographyProps {\n /**\n * The content to render\n */\n children: React.ReactNode;\n\n /**\n * The semantic variant of the typography\n */\n variant?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'body1'\n | 'body2'\n | 'caption'\n | 'overline'\n | 'subtitle1'\n | 'subtitle2'\n | 'button'\n | 'code'\n | 'blockquote';\n\n /**\n * The color intent of the text\n */\n intent?: 'default' | 'primary' | 'secondary' | 'muted' | 'success' | 'warning' | 'error';\n\n /**\n * Whether text should be centered\n */\n align?: 'left' | 'center' | 'right' | 'justify';\n\n /**\n * Custom className\n */\n className?: string;\n}\n\nconst variantMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n body1: 'p',\n body2: 'p',\n caption: 'span',\n overline: 'span',\n subtitle1: 'h6',\n subtitle2: 'h6',\n button: 'span',\n code: 'code',\n blockquote: 'blockquote',\n} as const;\n\nexport const Typography: React.FC<TypographyProps> = ({\n children,\n variant = 'body1',\n intent = 'default',\n align = 'left',\n className,\n ...props\n}) => {\n const Component = variantMap[variant];\n\n const getVariantClasses = () => {\n switch (variant) {\n case 'h1':\n return 'scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl';\n case 'h2':\n return 'scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0';\n case 'h3':\n return 'scroll-m-20 text-2xl font-semibold tracking-tight';\n case 'h4':\n return 'scroll-m-20 text-xl font-semibold tracking-tight';\n case 'h5':\n return 'scroll-m-20 text-lg font-semibold tracking-tight';\n case 'h6':\n return 'scroll-m-20 text-base font-semibold tracking-tight';\n case 'body1':\n return 'leading-7';\n case 'body2':\n return 'text-sm leading-6';\n case 'caption':\n return 'text-xs text-muted-foreground';\n case 'overline':\n return 'text-xs font-medium uppercase tracking-wide text-muted-foreground';\n case 'subtitle1':\n return 'text-lg font-medium';\n case 'subtitle2':\n return 'text-sm font-medium';\n case 'button':\n return 'text-sm font-medium';\n case 'code':\n return 'relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold';\n case 'blockquote':\n return 'mt-6 border-l-2 pl-6 italic';\n default:\n return 'leading-7';\n }\n };\n\n const getIntentClasses = () => {\n switch (intent) {\n case 'primary':\n return 'text-primary';\n case 'secondary':\n return 'text-secondary-foreground';\n case 'muted':\n return 'text-muted-foreground';\n case 'success':\n return 'text-green-600 dark:text-green-400';\n case 'warning':\n return 'text-yellow-600 dark:text-yellow-400';\n case 'error':\n return 'text-destructive';\n default:\n return 'text-foreground';\n }\n };\n\n const getAlignClasses = () => {\n switch (align) {\n case 'center':\n return 'text-center';\n case 'right':\n return 'text-right';\n case 'justify':\n return 'text-justify';\n default:\n return 'text-left';\n }\n };\n\n return (\n <Component className={cn(getVariantClasses(), getIntentClasses(), getAlignClasses(), className)} {...props}>\n {children}\n </Component>\n );\n};\n"],"names":[],"mappings":";;;AA6CA,MAAM,UAAA,GAAa;AAAA,EACjB,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,KAAA,EAAO,GAAA;AAAA,EACP,KAAA,EAAO,GAAA;AAAA,EACP,OAAA,EAAS,MAAA;AAAA,EACT,QAAA,EAAU,MAAA;AAAA,EACV,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,MAAA;AAAA,EACR,IAAA,EAAM,MAAA;AAAA,EACN,UAAA,EAAY;AACd,CAAA;AAEO,MAAM,aAAwC,CAAC;AAAA,EACpD,QAAA;AAAA,EACA,OAAA,GAAU,OAAA;AAAA,EACV,MAAA,GAAS,SAAA;AAAA,EACT,KAAA,GAAQ,MAAA;AAAA,EACR,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAM;AACJ,EAAA,MAAM,SAAA,GAAY,WAAW,OAAO,CAAA;AAEpC,EAAA,MAAM,oBAAoB,MAAM;AAC9B,IAAA,QAAQ,OAAA;AAAS,MACf,KAAK,IAAA;AACH,QAAA,OAAO,gEAAA;AAAA,MACT,KAAK,IAAA;AACH,QAAA,OAAO,4EAAA;AAAA,MACT,KAAK,IAAA;AACH,QAAA,OAAO,m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QAAA,OAAO,WAAA;AAAA;AACX,EACF,CAAA;AAEA,EAAA,uBACE,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,EAAA,CAAG,mBAAkB,EAAG,gBAAA,EAAiB,EAAG,eAAA,EAAgB,EAAG,SAAS,CAAA,EAAI,GAAG,OAClG,QAAA,EACH,CAAA;AAEJ;;;;"}
|
|
@@ -141,26 +141,26 @@
|
|
|
141
141
|
* @import '@vritti/quantum-ui/index.css';
|
|
142
142
|
*/
|
|
143
143
|
:root {
|
|
144
|
-
--background: oklch(1
|
|
144
|
+
--background: oklch(1 0 0);
|
|
145
145
|
--foreground: oklch(0.2302 0.0547 256.1829);
|
|
146
|
-
--card: oklch(1
|
|
146
|
+
--card: oklch(1 0 0);
|
|
147
147
|
--card-foreground: oklch(0.2302 0.0547 256.1829);
|
|
148
|
-
--popover: oklch(1
|
|
148
|
+
--popover: oklch(1 0 0);
|
|
149
149
|
--popover-foreground: oklch(0.2302 0.0547 256.1829);
|
|
150
150
|
--primary: oklch(0.5789 0.1833 256.2496);
|
|
151
|
-
--primary-foreground: oklch(1
|
|
151
|
+
--primary-foreground: oklch(1 0 0);
|
|
152
152
|
--secondary: oklch(0.9732 0.0131 251.5574);
|
|
153
153
|
--secondary-foreground: oklch(0.5789 0.1833 256.2496);
|
|
154
154
|
--muted: oklch(0.9802 0.0068 247.8944);
|
|
155
155
|
--muted-foreground: oklch(0.5435 0.0511 251.7257);
|
|
156
|
-
--accent: oklch(0.9512 0.0194 252.
|
|
156
|
+
--accent: oklch(0.9512 0.0194 252.879);
|
|
157
157
|
--accent-foreground: oklch(0.5789 0.1833 256.2496);
|
|
158
|
-
--destructive: oklch(0.5771 0.2152 27.
|
|
159
|
-
--destructive-foreground: oklch(1
|
|
160
|
-
--warning: oklch(0.
|
|
158
|
+
--destructive: oklch(0.5771 0.2152 27.325);
|
|
159
|
+
--destructive-foreground: oklch(1 0 0);
|
|
160
|
+
--warning: oklch(0.75 0.15 85);
|
|
161
161
|
--warning-foreground: oklch(0.2302 0.0547 256.1829);
|
|
162
|
-
--success: oklch(0.
|
|
163
|
-
--success-foreground: oklch(1
|
|
162
|
+
--success: oklch(0.65 0.15 145);
|
|
163
|
+
--success-foreground: oklch(1 0 0);
|
|
164
164
|
--border: oklch(0.9467 0.0207 248.0465);
|
|
165
165
|
--input: oklch(0.9467 0.0207 248.0465);
|
|
166
166
|
--ring: oklch(0.5789 0.1833 256.2496);
|
|
@@ -177,24 +177,34 @@
|
|
|
177
177
|
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
178
178
|
--sidebar-border: oklch(0.922 0 0);
|
|
179
179
|
--sidebar-ring: oklch(0.708 0 0);
|
|
180
|
-
--font-sans:
|
|
181
|
-
--font-serif:
|
|
182
|
-
--font-mono:
|
|
180
|
+
--font-sans: "IBM Plex Sans", sans-serif;
|
|
181
|
+
--font-serif: "Playfair Display", serif;
|
|
182
|
+
--font-mono: "JetBrains Mono", monospace;
|
|
183
183
|
--radius: 0.75rem;
|
|
184
184
|
--shadow-x: 0rem;
|
|
185
185
|
--shadow-y: 0.75rem;
|
|
186
186
|
--shadow-blur: 1.5rem;
|
|
187
187
|
--shadow-spread: 0.25rem;
|
|
188
188
|
--shadow-opacity: 0.08;
|
|
189
|
-
--shadow-color: #
|
|
189
|
+
--shadow-color: #0a1d36;
|
|
190
190
|
--shadow-2xs: 0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.04);
|
|
191
191
|
--shadow-xs: 0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.04);
|
|
192
|
-
--shadow-sm:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
--shadow
|
|
196
|
-
|
|
197
|
-
|
|
192
|
+
--shadow-sm:
|
|
193
|
+
0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.08), 0rem 1px 2px -0.75px
|
|
194
|
+
hsl(214.0909 68.7500% 12.5490% / 0.08);
|
|
195
|
+
--shadow:
|
|
196
|
+
0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.08), 0rem 1px 2px -0.75px
|
|
197
|
+
hsl(214.0909 68.7500% 12.5490% / 0.08);
|
|
198
|
+
--shadow-md:
|
|
199
|
+
0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.08), 0rem 2px 4px -0.75px
|
|
200
|
+
hsl(214.0909 68.7500% 12.5490% / 0.08);
|
|
201
|
+
--shadow-lg:
|
|
202
|
+
0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.08), 0rem 4px 6px -0.75px
|
|
203
|
+
hsl(214.0909 68.7500% 12.5490% / 0.08);
|
|
204
|
+
--shadow-xl:
|
|
205
|
+
0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.08), 0rem 8px 10px -0.75px
|
|
206
|
+
hsl(214.0909 68.7500% 12.5490% / 0.08);
|
|
207
|
+
--shadow-2xl: 0rem 0.75rem 1.5rem 0.25rem hsl(214.0909 68.7500% 12.5490% / 0.2);
|
|
198
208
|
--tracking-normal: 0.01em;
|
|
199
209
|
--spacing: 0.25rem;
|
|
200
210
|
}
|
|
@@ -214,10 +224,10 @@
|
|
|
214
224
|
--accent: oklch(0.2645 0 0);
|
|
215
225
|
--accent-foreground: oklch(0.5789 0.1833 256.2496);
|
|
216
226
|
--destructive: oklch(0.6539 0.1926 25.1437);
|
|
217
|
-
--destructive-foreground: oklch(1
|
|
218
|
-
--warning: oklch(0.
|
|
227
|
+
--destructive-foreground: oklch(1 0 0);
|
|
228
|
+
--warning: oklch(0.8 0.16 90);
|
|
219
229
|
--warning-foreground: oklch(0.1591 0 0);
|
|
220
|
-
--success: oklch(0.
|
|
230
|
+
--success: oklch(0.7 0.16 150);
|
|
221
231
|
--success-foreground: oklch(0.1591 0 0);
|
|
222
232
|
--border: oklch(0.2931 0 0);
|
|
223
233
|
--input: oklch(0.2931 0 0);
|
|
@@ -226,7 +236,7 @@
|
|
|
226
236
|
--chart-2: oklch(0.6856 0.1417 256.6754);
|
|
227
237
|
--chart-3: oklch(0.6731 0.1624 144.2083);
|
|
228
238
|
--chart-4: oklch(0.8442 0.1722 84.9338);
|
|
229
|
-
--chart-5: oklch(0.6083 0.
|
|
239
|
+
--chart-5: oklch(0.6083 0.209 27.0276);
|
|
230
240
|
--sidebar: oklch(0.205 0 0);
|
|
231
241
|
--sidebar-foreground: oklch(0.985 0 0);
|
|
232
242
|
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
@@ -235,9 +245,9 @@
|
|
|
235
245
|
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
236
246
|
--sidebar-border: oklch(1 0 0 / 10%);
|
|
237
247
|
--sidebar-ring: oklch(0.439 0 0);
|
|
238
|
-
--font-sans:
|
|
239
|
-
--font-serif:
|
|
240
|
-
--font-mono:
|
|
248
|
+
--font-sans: "IBM Plex Sans", sans-serif;
|
|
249
|
+
--font-serif: "Playfair Display", serif;
|
|
250
|
+
--font-mono: "JetBrains Mono", monospace;
|
|
241
251
|
--radius: 0.75rem;
|
|
242
252
|
--shadow-x: 0rem;
|
|
243
253
|
--shadow-y: 0.5rem;
|
|
@@ -330,7 +340,13 @@ body {
|
|
|
330
340
|
}
|
|
331
341
|
/* Loading animation for skeleton progress bars */
|
|
332
342
|
@keyframes loading {
|
|
333
|
-
0% {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
343
|
+
0% {
|
|
344
|
+
width: 0%;
|
|
345
|
+
}
|
|
346
|
+
50% {
|
|
347
|
+
width: 70%;
|
|
348
|
+
}
|
|
349
|
+
100% {
|
|
350
|
+
width: 100%;
|
|
351
|
+
}
|
|
352
|
+
}
|
package/dist/axios.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const getCsrfToken: () => string | null;
|
|
|
14
14
|
|
|
15
15
|
export declare const getToken: () => string | null;
|
|
16
16
|
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function recoverToken(): Promise<{
|
|
18
18
|
success: boolean;
|
|
19
19
|
expiresIn: number;
|
|
20
20
|
}>;
|
package/dist/axios.js
CHANGED
|
@@ -3916,17 +3916,14 @@ const getCsrfToken = () => csrfToken;
|
|
|
3916
3916
|
const clearCsrfToken = () => {
|
|
3917
3917
|
csrfToken = null;
|
|
3918
3918
|
};
|
|
3919
|
-
async function
|
|
3919
|
+
async function recoverToken() {
|
|
3920
3920
|
const config = getConfig();
|
|
3921
3921
|
try {
|
|
3922
|
-
const response = await axios$1.get(
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
timeout: config.axios.timeout
|
|
3928
|
-
}
|
|
3929
|
-
);
|
|
3922
|
+
const response = await axios$1.get("/auth/token", {
|
|
3923
|
+
baseURL: config.axios.baseURL,
|
|
3924
|
+
withCredentials: true,
|
|
3925
|
+
timeout: config.axios.timeout
|
|
3926
|
+
});
|
|
3930
3927
|
if (response.data.accessToken) {
|
|
3931
3928
|
setToken(response.data.accessToken);
|
|
3932
3929
|
return { success: true, expiresIn: response.data.expiresIn };
|
|
@@ -3937,14 +3934,14 @@ async function recoverSession() {
|
|
|
3937
3934
|
return { success: false, expiresIn: 0 };
|
|
3938
3935
|
}
|
|
3939
3936
|
}
|
|
3940
|
-
async function
|
|
3937
|
+
async function recoverTokenIfNeeded() {
|
|
3941
3938
|
if (accessToken) return true;
|
|
3942
3939
|
if (sessionRecoveryPromise) {
|
|
3943
3940
|
return sessionRecoveryPromise;
|
|
3944
3941
|
}
|
|
3945
3942
|
sessionRecoveryPromise = (async () => {
|
|
3946
3943
|
try {
|
|
3947
|
-
const result = await
|
|
3944
|
+
const result = await recoverToken();
|
|
3948
3945
|
if (result.success) {
|
|
3949
3946
|
scheduleTokenRefresh(result.expiresIn);
|
|
3950
3947
|
return true;
|
|
@@ -4044,7 +4041,7 @@ axios.interceptors.request.use(async (config) => {
|
|
|
4044
4041
|
const quantumConfig = getConfig();
|
|
4045
4042
|
const isPublicRequest = config.public === true;
|
|
4046
4043
|
if (!isPublicRequest) {
|
|
4047
|
-
const hasSession = await
|
|
4044
|
+
const hasSession = await recoverTokenIfNeeded();
|
|
4048
4045
|
if (!hasSession) {
|
|
4049
4046
|
redirectToLogin();
|
|
4050
4047
|
return Promise.reject(new Error("No valid session"));
|
|
@@ -4058,9 +4055,7 @@ axios.interceptors.request.use(async (config) => {
|
|
|
4058
4055
|
if (subdomain) {
|
|
4059
4056
|
config.headers["x-subdomain"] = subdomain;
|
|
4060
4057
|
}
|
|
4061
|
-
const isStateChanging = ["post", "put", "patch", "delete"].includes(
|
|
4062
|
-
config.method?.toLowerCase() || ""
|
|
4063
|
-
);
|
|
4058
|
+
const isStateChanging = ["post", "put", "patch", "delete"].includes(config.method?.toLowerCase() || "");
|
|
4064
4059
|
if (isStateChanging && quantumConfig.csrf.enabled) {
|
|
4065
4060
|
let csrf = getCsrfToken();
|
|
4066
4061
|
if (!csrf) csrf = await fetchCsrfToken();
|
|
@@ -4081,5 +4076,5 @@ axios.interceptors.response.use(
|
|
|
4081
4076
|
}
|
|
4082
4077
|
);
|
|
4083
4078
|
|
|
4084
|
-
export { axios as a,
|
|
4079
|
+
export { axios as a, cancelTokenRefresh as b, configureQuantumUI as c, defineConfig as d, clearCsrfToken as e, clearToken as f, getConfig as g, getCsrfToken as h, getToken as i, recoverToken as j, setCsrfToken as k, setToken as l, resetConfig as r, scheduleTokenRefresh as s };
|
|
4085
4080
|
//# sourceMappingURL=axios.js.map
|