@acronis-platform/shadcn-uikit 0.6.0 → 0.8.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.
@@ -10,7 +10,7 @@ const u = g(
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",
12
12
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80",
13
- outline: "border border-foreground bg-background hover:bg-accent/10 active:bg-accent/20",
13
+ outline: "border border-border bg-background hover:bg-accent/10 active:bg-accent/20",
14
14
  secondary: "border border-primary bg-background text-primary hover:bg-primary/10 active:bg-primary/20",
15
15
  ghost: "hover:bg-accent/10 active:bg-accent/20 text-primary",
16
16
  link: "text-primary underline-offset-4 hover:underline",
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sources":["../../../src/components/ui/button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded text-sm font-semibold leading-6 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80',\n outline: 'border border-foreground bg-background hover:bg-accent/10 active:bg-accent/20',\n secondary:\n 'border border-primary bg-background text-primary hover:bg-primary/10 active:bg-primary/20',\n ghost: 'hover:bg-accent/10 active:bg-accent/20 text-primary',\n link: 'text-primary underline-offset-4 hover:underline',\n translucent:\n 'bg-foreground/20 text-foreground hover:bg-foreground/30 active:bg-foreground/40',\n },\n size: {\n default: 'h-8 px-2 py-1',\n sm: 'h-7 px-2 py-0.5 text-xs',\n lg: 'h-10 px-4 py-2',\n icon: 'h-8 w-8 p-2',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","jsx","Slot","cn"],"mappings":";;;;;AAMA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SAAS;AAAA,QACT,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,QACN,aACE;AAAA,MAAA;AAAA,MAEJ,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAOMC,IAASC,EAAM;AAAA,EACnB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAA,GAASC,MAGtD,gBAAAC,EAFWH,IAAUI,IAAO,UAE3B,EAAK,WAAWC,EAAGZ,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC,GAAG,KAAAK,GAAW,GAAGD,EAAA,CAAO;AAG9F;AACAN,EAAO,cAAc;"}
1
+ {"version":3,"file":"button.js","sources":["../../../src/components/ui/button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded text-sm font-semibold leading-6 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80',\n outline: 'border border-border bg-background hover:bg-accent/10 active:bg-accent/20',\n secondary:\n 'border border-primary bg-background text-primary hover:bg-primary/10 active:bg-primary/20',\n ghost: 'hover:bg-accent/10 active:bg-accent/20 text-primary',\n link: 'text-primary underline-offset-4 hover:underline',\n translucent:\n 'bg-foreground/20 text-foreground hover:bg-foreground/30 active:bg-foreground/40',\n },\n size: {\n default: 'h-8 px-2 py-1',\n sm: 'h-7 px-2 py-0.5 text-xs',\n lg: 'h-10 px-4 py-2',\n icon: 'h-8 w-8 p-2',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","jsx","Slot","cn"],"mappings":";;;;;AAMA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SAAS;AAAA,QACT,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,QACN,aACE;AAAA,MAAA;AAAA,MAEJ,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAOMC,IAASC,EAAM;AAAA,EACnB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAA,GAASC,MAGtD,gBAAAC,EAFWH,IAAUI,IAAO,UAE3B,EAAK,WAAWC,EAAGZ,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC,GAAG,KAAAK,GAAW,GAAGD,EAAA,CAAO;AAG9F;AACAN,EAAO,cAAc;"}
@@ -7,7 +7,7 @@ const d = t.forwardRef(
7
7
  {
8
8
  ref: r,
9
9
  className: l(
10
- "w-full caption-bottom text-sm text-foreground",
10
+ "w-full caption-bottom text-sm text-foreground bg-muted/30 border border-border rounded-2xl",
11
11
  e
12
12
  ),
13
13
  ...a
@@ -20,7 +20,7 @@ const s = t.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ o(
20
20
  {
21
21
  ref: r,
22
22
  className: l(
23
- "bg-card [&_tr]:border-b [&_tr]:border-border/10",
23
+ "[&_tr]:border-b [&_tr]:border-primary/5",
24
24
  e
25
25
  ),
26
26
  ...a
@@ -34,7 +34,7 @@ const m = t.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ o(
34
34
  {
35
35
  ref: r,
36
36
  className: l(
37
- "border-t border-border/10 bg-muted/50 font-medium [&>tr]:last:border-b-0",
37
+ "border-t border-primary/5 font-medium [&>tr]:last:border-b-0",
38
38
  e
39
39
  ),
40
40
  ...a
@@ -47,7 +47,7 @@ const c = t.forwardRef(
47
47
  {
48
48
  ref: r,
49
49
  className: l(
50
- "h-12 border-b border-border/10 transition-colors hover:bg-accent/5 data-[state=selected]:bg-accent/10",
50
+ "h-12 border-b border-primary/5 transition-colors hover:bg-accent/5 data-[state=selected]:bg-accent/10",
51
51
  e
52
52
  ),
53
53
  ...a
@@ -60,7 +60,7 @@ const f = t.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ o(
60
60
  {
61
61
  ref: r,
62
62
  className: l(
63
- "h-12 px-6 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0",
63
+ "h-12 px-6 text-left align-middle font-semibold text-sm text-foreground [&:has([role=checkbox])]:pr-0",
64
64
  e
65
65
  ),
66
66
  ...a
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sources":["../../../src/components/ui/table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\n 'w-full caption-bottom text-sm text-foreground',\n className\n )}\n {...props}\n />\n </div>\n )\n)\nTable.displayName = 'Table'\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead\n ref={ref}\n className={cn(\n 'bg-card [&_tr]:border-b [&_tr]:border-border/10',\n className\n )}\n {...props}\n />\n))\nTableHeader.displayName = 'TableHeader'\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />\n))\nTableBody.displayName = 'TableBody'\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n 'border-t border-border/10 bg-muted/50 font-medium [&>tr]:last:border-b-0',\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = 'TableFooter'\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n 'h-12 border-b border-border/10 transition-colors hover:bg-accent/5 data-[state=selected]:bg-accent/10',\n className\n )}\n {...props}\n />\n )\n)\nTableRow.displayName = 'TableRow'\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n 'h-12 px-6 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0',\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = 'TableHead'\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n 'h-12 px-6 align-middle text-sm text-foreground [&:has([role=checkbox])]:pr-0',\n className\n )}\n {...props}\n />\n))\nTableCell.displayName = 'TableCell'\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />\n))\nTableCaption.displayName = 'TableCaption'\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }\n"],"names":["Table","React","className","props","ref","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":";;;AAIA,MAAMA,IAAQC,EAAM;AAAA,EAClB,CAAC,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AM,WAGtB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAU,cAAc;AAExB,MAAMC,IAAYX,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDS,EAAU,cAAc;AAExB,MAAMC,IAAeZ,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBACzB,WAAA,EAAQ,KAAAA,GAAU,WAAWE,EAAG,sCAAsCJ,CAAS,GAAI,GAAGC,GAAO,CAC/F;AACDU,EAAa,cAAc;"}
1
+ {"version":3,"file":"table.js","sources":["../../../src/components/ui/table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\n 'w-full caption-bottom text-sm text-foreground bg-muted/30 border border-border rounded-2xl',\n className\n )}\n {...props}\n />\n </div>\n )\n)\nTable.displayName = 'Table'\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead\n ref={ref}\n className={cn(\n '[&_tr]:border-b [&_tr]:border-primary/5',\n className\n )}\n {...props}\n />\n))\nTableHeader.displayName = 'TableHeader'\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />\n))\nTableBody.displayName = 'TableBody'\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n 'border-t border-primary/5 font-medium [&>tr]:last:border-b-0',\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = 'TableFooter'\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n 'h-12 border-b border-primary/5 transition-colors hover:bg-accent/5 data-[state=selected]:bg-accent/10',\n className\n )}\n {...props}\n />\n )\n)\nTableRow.displayName = 'TableRow'\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n 'h-12 px-6 text-left align-middle font-semibold text-sm text-foreground [&:has([role=checkbox])]:pr-0',\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = 'TableHead'\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n 'h-12 px-6 align-middle text-sm text-foreground [&:has([role=checkbox])]:pr-0',\n className\n )}\n {...props}\n />\n))\nTableCell.displayName = 'TableCell'\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />\n))\nTableCaption.displayName = 'TableCaption'\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }\n"],"names":["Table","React","className","props","ref","jsx","cn","TableH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,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AACAO,EAAS,cAAc;AAEvB,MAAMC,IAAYV,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAU,cAAc;AAExB,MAAMC,IAAYX,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDS,EAAU,cAAc;AAExB,MAAMC,IAAeZ,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBACzB,WAAA,EAAQ,KAAAA,GAAU,WAAWE,EAAG,sCAAsCJ,CAAS,GAAI,GAAGC,GAAO,CAC/F;AACDU,EAAa,cAAc;"}
@@ -1,4 +1,4 @@
1
- import { __exports as e } from "../../../../../../../../_virtual/cloneDeep2.js";
1
+ import { __exports as e } from "../../../../../../../../_virtual/cloneDeep.js";
2
2
  import { __require as u } from "./cloneDeepWith.js";
3
3
  var o;
4
4
  function c() {
@@ -1,4 +1,4 @@
1
- import { __exports as e } from "../../../../../../../_virtual/cloneDeep.js";
1
+ import { __exports as e } from "../../../../../../../_virtual/cloneDeep2.js";
2
2
  import { __require as u } from "./cloneDeepWith.js";
3
3
  var o;
4
4
  function c() {
@@ -0,0 +1 @@
1
+ :root{--color-brand-primary: 213 65% 46%;--color-brand-secondary: 211 100% 45%;--color-brand-lightest: 213 65% 97%;--color-brand-light: 213 65% 96%;--color-text-inverse: 0 0% 100%;--color-text-primary: 215 26% 20%;--color-text-secondary: 215 26% 46%;--color-text-tertiary: 215 14% 39%;--color-surface-primary: 0 0% 100%;--color-surface-secondary: 210 100% 15%;--color-surface-overlay: 215 26% 20%;--color-surface-elevated: 0 0% 100%;--color-status-success: 73 68% 45%;--color-status-success-light: 84 67% 93%;--color-status-success-dark: 84 98% 21%;--color-status-info: 211 82% 60%;--color-status-info-light: 214 78% 95%;--color-status-info-dark: 214 68% 38%;--color-status-warning: 45 100% 52%;--color-status-warning-light: 45 100% 95%;--color-status-warning-dark: 30 50% 37%;--color-status-danger: 0 77% 57%;--color-status-danger-light: 0 100% 96%;--color-status-danger-dark: 0 72% 45%;--color-status-critical: 25 100% 52%;--color-status-critical-light: 27 95% 92%;--color-status-critical-dark: 11 73% 41%;--color-neutral: 220 11% 62%;--color-neutral-light: 220 11% 92%;--color-neutral-dark: 215 14% 39%;--color-ai: 263deg 77% 57%;--color-ai-light: 273deg 85% 97%;--color-ai-dark: 263deg 77% 57%;--opacity-10: .1;--opacity-20: .2;--opacity-30: .3;--opacity-40: .4;--opacity-50: .5;--opacity-70: .7;--opacity-90: .9}.theme-cyber-chat{--color-brand-primary: 210 100% 50%;--color-brand-secondary: 210 100% 15%;--color-brand-tertiary: 210 100% 65%;--color-surface-primary: 0 0% 100%;--color-surface-secondary: 210 50% 98%;--color-surface-tertiary: 210 40% 96%;--color-surface-quaternary: 210 30% 94%;--color-text-primary: 0 0% 4%;--color-text-secondary: 0 0% 45%;--color-text-tertiary: 0 0% 64%;--color-text-inverse: 0 0% 100%;--color-border-primary: 220 13% 88%;--color-border-secondary: 210 40% 93%;--color-border-accent: 210 100% 50%;--color-status-success: 142 76% 36%;--color-status-warning: 38 92% 50%;--color-status-danger: 0 84% 60%;--color-status-info: 210 100% 50%;--color-chat-message-user: 210 100% 50%;--color-chat-message-bot: 210 40% 96%;--color-chat-online: 142 76% 36%;--color-chat-typing: 210 100% 65%;--av-background: var(--color-surface-primary);--av-foreground: var(--color-text-primary);--av-card: var(--color-surface-secondary);--av-card-foreground: var(--color-text-primary);--av-card-border: var(--color-border-secondary);--av-popover: var(--color-surface-primary);--av-popover-foreground: var(--color-text-primary);--av-primary: var(--color-brand-primary);--av-primary-foreground: var(--color-text-inverse);--av-secondary: var(--color-surface-quaternary);--av-secondary-foreground: var(--color-text-primary);--av-muted: var(--color-surface-tertiary);--av-muted-foreground: var(--color-text-secondary);--av-accent: var(--color-surface-tertiary);--av-accent-foreground: var(--color-text-primary);--av-destructive: var(--color-status-danger);--av-destructive-foreground: var(--color-text-inverse);--av-success: var(--color-status-success);--av-success-foreground: var(--color-text-inverse);--av-warning: var(--color-status-warning);--av-warning-foreground: var(--color-text-inverse);--av-danger: var(--color-status-danger);--av-danger-foreground: var(--color-text-inverse);--av-info: var(--color-status-info);--av-info-foreground: var(--color-text-inverse);--av-border: var(--color-border-primary);--av-border-accent: var(--color-border-accent);--av-input: var(--color-border-primary);--av-input-foreground: var(--color-text-primary);--av-ring: var(--color-brand-primary);--av-sidebar-background: var(--color-surface-primary);--av-sidebar-foreground: var(--color-text-primary);--av-sidebar-primary: var(--color-brand-primary);--av-sidebar-primary-foreground: var(--color-text-inverse);--av-sidebar-accent: var(--color-surface-tertiary);--av-sidebar-accent-foreground: var(--color-text-primary);--av-sidebar-border: var(--color-border-secondary);--av-sidebar-ring: var(--color-brand-primary);--av-chart-1: 210 100% 50%;--av-chart-2: 142 76% 36%;--av-chart-3: 38 92% 50%;--av-chart-4: 280 100% 50%;--av-chart-5: 0 84% 60%;--av-table-background: 210 50% 97%;--av-table-border: 210 40% 93%;--av-table-row-separator: 213 65% 46%}.theme-cyber-chat.dark{--av-background: 210 100% 8%;--av-foreground: 0 0% 98%;--av-card: 210 60% 12%;--av-card-foreground: 0 0% 98%;--av-card-border: 210 40% 20%;--av-popover: 210 60% 12%;--av-popover-foreground: 0 0% 98%;--av-primary: var(--color-brand-primary);--av-primary-foreground: var(--color-text-inverse);--av-secondary: 210 40% 18%;--av-secondary-foreground: 0 0% 98%;--av-muted: 210 40% 16%;--av-muted-foreground: 0 0% 64%;--av-accent: 210 60% 20%;--av-accent-foreground: 0 0% 98%;--av-destructive: 0 84% 60%;--av-destructive-foreground: 0 0% 98%;--av-success: 142 76% 36%;--av-success-foreground: 0 0% 98%;--av-warning: 38 92% 50%;--av-warning-foreground: 0 0% 4%;--av-danger: 0 84% 60%;--av-danger-foreground: 0 0% 98%;--av-info: 210 100% 50%;--av-info-foreground: 0 0% 98%;--av-border: 220 13% 35%;--av-border-accent: var(--color-brand-primary);--av-input: 210 40% 24%;--av-input-foreground: 0 0% 98%;--av-ring: var(--color-brand-primary);--av-sidebar-background: 210 70% 10%;--av-sidebar-foreground: 0 0% 98%;--av-sidebar-primary: var(--color-brand-primary);--av-sidebar-primary-foreground: 0 0% 98%;--av-sidebar-accent: 210 60% 18%;--av-sidebar-accent-foreground: 0 0% 98%;--av-sidebar-border: 210 40% 20%;--av-sidebar-ring: var(--color-brand-primary);--av-table-background: 210 60% 14%;--av-table-border: 210 40% 20%;--av-table-row-separator: 210 100% 50%}
@@ -0,0 +1 @@
1
+ export {}
@@ -5,7 +5,7 @@
5
5
  * Supports both theme switching (e.g., acronis-default, acronis-ocean) and
6
6
  * color mode switching (light/dark).
7
7
  */
8
- export type ThemeName = 'acronis-default' | 'acronis-ocean' | 'custom';
8
+ export type ThemeName = 'acronis-default' | 'acronis-ocean' | 'cyber-chat' | 'custom';
9
9
  export type ColorMode = 'light' | 'dark' | 'system';
10
10
  /**
11
11
  * Apply a theme to the document root element
@@ -1 +1 @@
1
- {"version":3,"file":"theme-switcher.js","sources":["../../src/utils/theme-switcher.ts"],"sourcesContent":["/**\n * Theme Switcher Utility\n * \n * Provides functions to programmatically switch between themes and color modes.\n * Supports both theme switching (e.g., acronis-default, acronis-ocean) and\n * color mode switching (light/dark).\n */\n\nexport type ThemeName = 'acronis-default' | 'acronis-ocean' | 'custom'\nexport type ColorMode = 'light' | 'dark' | 'system'\n\nconst THEME_CLASS_PREFIX = 'theme-'\nconst DARK_CLASS = 'dark'\nconst THEME_STORAGE_KEY = 'av-theme'\nconst COLOR_MODE_STORAGE_KEY = 'av-color-mode'\n\n/**\n * Apply a theme to the document root element\n * \n * @param theme - The theme name to apply\n * @param persist - Whether to persist the theme choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyTheme } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyTheme('acronis-ocean')\n * ```\n */\nexport function applyTheme(theme: ThemeName, persist = true): void {\n const root = document.documentElement\n \n root.classList.forEach((className) => {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n root.classList.remove(className)\n }\n })\n \n const themeClass = `${THEME_CLASS_PREFIX}${theme}`\n root.classList.add(themeClass)\n \n if (persist) {\n try {\n localStorage.setItem(THEME_STORAGE_KEY, theme)\n } catch (error) {\n console.warn('Failed to persist theme to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied theme\n * \n * @returns The current theme name or null if no theme is explicitly set\n */\nexport function getCurrentTheme(): ThemeName | null {\n const root = document.documentElement\n \n for (const className of root.classList) {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n return className.replace(THEME_CLASS_PREFIX, '') as ThemeName\n }\n }\n \n return null\n}\n\n/**\n * Load the persisted theme from localStorage and apply it\n * Call this on application startup to restore the user's theme preference\n * \n * @returns The loaded theme name or null if no theme was persisted\n */\nexport function loadPersistedTheme(): ThemeName | null {\n try {\n const persistedTheme = localStorage.getItem(THEME_STORAGE_KEY) as ThemeName | null\n if (persistedTheme) {\n applyTheme(persistedTheme, false)\n return persistedTheme\n }\n } catch (error) {\n console.warn('Failed to load persisted theme from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Apply a color mode (light/dark/system) to the document root element\n * \n * @param mode - The color mode to apply\n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyColorMode } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyColorMode('dark')\n * applyColorMode('system') // Follows system preference\n * ```\n */\nexport function applyColorMode(mode: ColorMode, persist = true): void {\n const root = document.documentElement\n \n if (mode === 'system') {\n const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n root.classList.toggle(DARK_CLASS, systemPrefersDark)\n } else {\n root.classList.toggle(DARK_CLASS, mode === 'dark')\n }\n \n if (persist) {\n try {\n localStorage.setItem(COLOR_MODE_STORAGE_KEY, mode)\n } catch (error) {\n console.warn('Failed to persist color mode to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied color mode\n * \n * @returns 'light' or 'dark' based on the current state\n */\nexport function getCurrentColorMode(): 'light' | 'dark' {\n return document.documentElement.classList.contains(DARK_CLASS) ? 'dark' : 'light'\n}\n\n/**\n * Load the persisted color mode from localStorage and apply it\n * Call this on application startup to restore the user's color mode preference\n * \n * @returns The loaded color mode or null if no mode was persisted\n */\nexport function loadPersistedColorMode(): ColorMode | null {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY) as ColorMode | null\n if (persistedMode) {\n applyColorMode(persistedMode, false)\n return persistedMode\n }\n } catch (error) {\n console.warn('Failed to load persisted color mode from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Toggle between light and dark mode\n * \n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * @returns The new color mode after toggling\n */\nexport function toggleColorMode(persist = true): 'light' | 'dark' {\n const currentMode = getCurrentColorMode()\n const newMode = currentMode === 'light' ? 'dark' : 'light'\n applyColorMode(newMode, persist)\n return newMode\n}\n\n/**\n * Set up a listener for system color scheme changes\n * Only applies changes if the current mode is set to 'system'\n * \n * @returns A cleanup function to remove the listener\n */\nexport function watchSystemColorScheme(): () => void {\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n \n const handler = (e: MediaQueryListEvent) => {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY)\n if (persistedMode === 'system') {\n document.documentElement.classList.toggle(DARK_CLASS, e.matches)\n }\n } catch (error) {\n console.warn('Failed to check persisted color mode:', error)\n }\n }\n \n mediaQuery.addEventListener('change', handler)\n \n return () => {\n mediaQuery.removeEventListener('change', handler)\n }\n}\n\n/**\n * Initialize the theme system on application startup\n * Loads persisted theme and color mode preferences\n * Sets up system color scheme watcher if mode is 'system'\n * \n * @returns A cleanup function to remove event listeners\n * \n * @example\n * ```typescript\n * import { initializeThemeSystem } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * // In your app initialization\n * const cleanup = initializeThemeSystem()\n * \n * // Call cleanup when unmounting (e.g., in React useEffect)\n * return cleanup\n * ```\n */\nexport function initializeThemeSystem(): () => void {\n loadPersistedTheme()\n loadPersistedColorMode()\n \n const cleanup = watchSystemColorScheme()\n \n return cleanup\n}\n"],"names":["THEME_CLASS_PREFIX","DARK_CLASS","THEME_STORAGE_KEY","COLOR_MODE_STORAGE_KEY","applyTheme","theme","persist","root","className","themeClass","error","getCurrentTheme","loadPersistedTheme","persistedTheme","applyColorMode","mode","systemPrefersDark","getCurrentColorMode","loadPersistedColorMode","persistedMode","toggleColorMode","newMode","watchSystemColorScheme","mediaQuery","handler","e","initializeThemeSystem"],"mappings":"AAWA,MAAMA,IAAqB,UACrBC,IAAa,QACbC,IAAoB,YACpBC,IAAyB;AAexB,SAASC,EAAWC,GAAkBC,IAAU,IAAY;AACjE,QAAMC,IAAO,SAAS;AAEtB,EAAAA,EAAK,UAAU,QAAQ,CAACC,MAAc;AACpC,IAAIA,EAAU,WAAWR,CAAkB,KACzCO,EAAK,UAAU,OAAOC,CAAS;AAAA,EAEnC,CAAC;AAED,QAAMC,IAAa,GAAGT,CAAkB,GAAGK,CAAK;AAGhD,MAFAE,EAAK,UAAU,IAAIE,CAAU,GAEzBH;AACF,QAAI;AACF,mBAAa,QAAQJ,GAAmBG,CAAK;AAAA,IAC/C,SAASK,GAAO;AACd,cAAQ,KAAK,4CAA4CA,CAAK;AAAA,IAChE;AAEJ;AAOO,SAASC,IAAoC;AAClD,QAAMJ,IAAO,SAAS;AAEtB,aAAW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,MADsB,aAAa,QAAQtB,CAAsB,MAC3C,YACpB,SAAS,gBAAgB,UAAU,OAAOF,GAAYwB,EAAE,OAAO;AAAA,IAEnE,SAASf,GAAO;AACd,cAAQ,KAAK,yCAAyCA,CAAK;AAAA,IAC7D;AAAA,EACF;AAEA,SAAAa,EAAW,iBAAiB,UAAUC,CAAO,GAEtC,MAAM;AACX,IAAAD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,EAClD;AACF;AAoBO,SAASE,IAAoC;AAClD,SAAAd,EAAA,GACAM,EAAA,GAEgBI,EAAA;AAGlB;"}
1
+ {"version":3,"file":"theme-switcher.js","sources":["../../src/utils/theme-switcher.ts"],"sourcesContent":["/**\n * Theme Switcher Utility\n * \n * Provides functions to programmatically switch between themes and color modes.\n * Supports both theme switching (e.g., acronis-default, acronis-ocean) and\n * color mode switching (light/dark).\n */\n\nexport type ThemeName = 'acronis-default' | 'acronis-ocean' | 'cyber-chat' | 'custom'\nexport type ColorMode = 'light' | 'dark' | 'system'\n\nconst THEME_CLASS_PREFIX = 'theme-'\nconst DARK_CLASS = 'dark'\nconst THEME_STORAGE_KEY = 'av-theme'\nconst COLOR_MODE_STORAGE_KEY = 'av-color-mode'\n\n/**\n * Apply a theme to the document root element\n * \n * @param theme - The theme name to apply\n * @param persist - Whether to persist the theme choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyTheme } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyTheme('acronis-ocean')\n * ```\n */\nexport function applyTheme(theme: ThemeName, persist = true): void {\n const root = document.documentElement\n \n root.classList.forEach((className) => {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n root.classList.remove(className)\n }\n })\n \n const themeClass = `${THEME_CLASS_PREFIX}${theme}`\n root.classList.add(themeClass)\n \n if (persist) {\n try {\n localStorage.setItem(THEME_STORAGE_KEY, theme)\n } catch (error) {\n console.warn('Failed to persist theme to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied theme\n * \n * @returns The current theme name or null if no theme is explicitly set\n */\nexport function getCurrentTheme(): ThemeName | null {\n const root = document.documentElement\n \n for (const className of root.classList) {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n return className.replace(THEME_CLASS_PREFIX, '') as ThemeName\n }\n }\n \n return null\n}\n\n/**\n * Load the persisted theme from localStorage and apply it\n * Call this on application startup to restore the user's theme preference\n * \n * @returns The loaded theme name or null if no theme was persisted\n */\nexport function loadPersistedTheme(): ThemeName | null {\n try {\n const persistedTheme = localStorage.getItem(THEME_STORAGE_KEY) as ThemeName | null\n if (persistedTheme) {\n applyTheme(persistedTheme, false)\n return persistedTheme\n }\n } catch (error) {\n console.warn('Failed to load persisted theme from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Apply a color mode (light/dark/system) to the document root element\n * \n * @param mode - The color mode to apply\n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyColorMode } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyColorMode('dark')\n * applyColorMode('system') // Follows system preference\n * ```\n */\nexport function applyColorMode(mode: ColorMode, persist = true): void {\n const root = document.documentElement\n \n if (mode === 'system') {\n const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n root.classList.toggle(DARK_CLASS, systemPrefersDark)\n } else {\n root.classList.toggle(DARK_CLASS, mode === 'dark')\n }\n \n if (persist) {\n try {\n localStorage.setItem(COLOR_MODE_STORAGE_KEY, mode)\n } catch (error) {\n console.warn('Failed to persist color mode to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied color mode\n * \n * @returns 'light' or 'dark' based on the current state\n */\nexport function getCurrentColorMode(): 'light' | 'dark' {\n return document.documentElement.classList.contains(DARK_CLASS) ? 'dark' : 'light'\n}\n\n/**\n * Load the persisted color mode from localStorage and apply it\n * Call this on application startup to restore the user's color mode preference\n * \n * @returns The loaded color mode or null if no mode was persisted\n */\nexport function loadPersistedColorMode(): ColorMode | null {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY) as ColorMode | null\n if (persistedMode) {\n applyColorMode(persistedMode, false)\n return persistedMode\n }\n } catch (error) {\n console.warn('Failed to load persisted color mode from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Toggle between light and dark mode\n * \n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * @returns The new color mode after toggling\n */\nexport function toggleColorMode(persist = true): 'light' | 'dark' {\n const currentMode = getCurrentColorMode()\n const newMode = currentMode === 'light' ? 'dark' : 'light'\n applyColorMode(newMode, persist)\n return newMode\n}\n\n/**\n * Set up a listener for system color scheme changes\n * Only applies changes if the current mode is set to 'system'\n * \n * @returns A cleanup function to remove the listener\n */\nexport function watchSystemColorScheme(): () => void {\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n \n const handler = (e: MediaQueryListEvent) => {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY)\n if (persistedMode === 'system') {\n document.documentElement.classList.toggle(DARK_CLASS, e.matches)\n }\n } catch (error) {\n console.warn('Failed to check persisted color mode:', error)\n }\n }\n \n mediaQuery.addEventListener('change', handler)\n \n return () => {\n mediaQuery.removeEventListener('change', handler)\n }\n}\n\n/**\n * Initialize the theme system on application startup\n * Loads persisted theme and color mode preferences\n * Sets up system color scheme watcher if mode is 'system'\n * \n * @returns A cleanup function to remove event listeners\n * \n * @example\n * ```typescript\n * import { initializeThemeSystem } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * // In your app initialization\n * const cleanup = initializeThemeSystem()\n * \n * // Call cleanup when unmounting (e.g., in React useEffect)\n * return cleanup\n * ```\n */\nexport function initializeThemeSystem(): () => void {\n loadPersistedTheme()\n loadPersistedColorMode()\n \n const cleanup = watchSystemColorScheme()\n \n return cleanup\n}\n"],"names":["THEME_CLASS_PREFIX","DARK_CLASS","THEME_STORAGE_KEY","COLOR_MODE_STORAGE_KEY","applyTheme","theme","persist","root","className","themeClass","error","getCurrentTheme","loadPersistedTheme","persistedTheme","applyColorMode","mode","systemPrefersDark","getCurrentColorMode","loadPersistedColorMode","persistedMode","toggleColorMode","newMode","watchSystemColorScheme","mediaQuery","handler","e","initializeThemeSystem"],"mappings":"AAWA,MAAMA,IAAqB,UACrBC,IAAa,QACbC,IAAoB,YACpBC,IAAyB;AAexB,SAASC,EAAWC,GAAkBC,IAAU,IAAY;AACjE,QAAMC,IAAO,SAAS;AAEtB,EAAAA,EAAK,UAAU,QAAQ,CAACC,MAAc;AACpC,IAAIA,EAAU,WAAWR,CAAkB,KACzCO,EAAK,UAAU,OAAOC,CAAS;AAAA,EAEnC,CAAC;AAED,QAAMC,IAAa,GAAGT,CAAkB,GAAGK,CAAK;AAGhD,MAFAE,EAAK,UAAU,IAAIE,CAAU,GAEzBH;AACF,QAAI;AACF,mBAAa,QAAQJ,GAAmBG,CAAK;AAAA,IAC/C,SAASK,GAAO;AACd,cAAQ,KAAK,4CAA4CA,CAAK;AAAA,IAChE;AAEJ;AAOO,SAASC,IAAoC;AAClD,QAAMJ,IAAO,SAAS;AAEtB,aAAWC,KAAaD,EAAK;AAC3B,QAAIC,EAAU,WAAWR,CAAkB;AACzC,aAAOQ,EAAU,QAAQR,GAAoB,EAAE;AAInD,SAAO;AACT;AAQO,SAASY,IAAuC;AACrD,MAAI;AACF,UAAMC,IAAiB,aAAa,QAAQX,CAAiB;AAC7D,QAAIW;AACF,aAAAT,EAAWS,GAAgB,EAAK,GACzBA;AAAA,EAEX,SAASH,GAAO;AACd,YAAQ,KAAK,qDAAqDA,CAAK;AAAA,EACzE;AAEA,SAAO;AACT;AAgBO,SAASI,EAAeC,GAAiBT,IAAU,IAAY;AACpE,QAAMC,IAAO,SAAS;AAEtB,MAAIQ,MAAS,UAAU;AACrB,UAAMC,IAAoB,OAAO,WAAW,8BAA8B,EAAE;AAC5E,IAAAT,EAAK,UAAU,OAAON,GAAYe,CAAiB;AAAA,EACrD;AACE,IAAAT,EAAK,UAAU,OAAON,GAAYc,MAAS,MAAM;AAGnD,MAAIT;AACF,QAAI;AACF,mBAAa,QAAQH,GAAwBY,CAAI;AAAA,IACnD,SAASL,GAAO;AACd,cAAQ,KAAK,iDAAiDA,CAAK;AAAA,IACrE;AAEJ;AAOO,SAASO,IAAwC;AACtD,SAAO,SAAS,gBAAgB,UAAU,SAAShB,CAAU,IAAI,SAAS;AAC5E;AAQO,SAASiB,IAA2C;AACzD,MAAI;AACF,UAAMC,IAAgB,aAAa,QAAQhB,CAAsB;AACjE,QAAIgB;AACF,aAAAL,EAAeK,GAAe,EAAK,GAC5BA;AAAA,EAEX,SAAST,GAAO;AACd,YAAQ,KAAK,0DAA0DA,CAAK;AAAA,EAC9E;AAEA,SAAO;AACT;AAQO,SAASU,EAAgBd,IAAU,IAAwB;AAEhE,QAAMe,IADcJ,EAAA,MACY,UAAU,SAAS;AACnD,SAAAH,EAAeO,GAASf,CAAO,GACxBe;AACT;AAQO,SAASC,IAAqC;AACnD,QAAMC,IAAa,OAAO,WAAW,8BAA8B,GAE7DC,IAAU,CAACC,MAA2B;AAC1C,QAAI;AAEF,MADsB,aAAa,QAAQtB,CAAsB,MAC3C,YACpB,SAAS,gBAAgB,UAAU,OAAOF,GAAYwB,EAAE,OAAO;AAAA,IAEnE,SAASf,GAAO;AACd,cAAQ,KAAK,yCAAyCA,CAAK;AAAA,IAC7D;AAAA,EACF;AAEA,SAAAa,EAAW,iBAAiB,UAAUC,CAAO,GAEtC,MAAM;AACX,IAAAD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,EAClD;AACF;AAoBO,SAASE,IAAoC;AAClD,SAAAd,EAAA,GACAM,EAAA,GAEgBI,EAAA;AAGlB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acronis-platform/shadcn-uikit",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Acronis shadcn UI component library built with TypeScript, following shadcn design principles",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,6 +19,7 @@
19
19
  "./styles/themes": "./dist/themes/acronis-default.css",
20
20
  "./styles/themes/acronis-default": "./dist/themes/acronis-default.css",
21
21
  "./styles/themes/acronis-ocean": "./dist/themes/acronis-ocean.css",
22
+ "./styles/themes/cyber-chat": "./dist/themes/cyber-chat.css",
22
23
  "./components/*": "./dist/components/*"
23
24
  },
24
25
  "files": [