@acronis-platform/ui-react 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -0
  3. package/dist/components/ui/breadcrumb/breadcrumb.js +116 -0
  4. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -0
  5. package/dist/components/ui/button/button.js +50 -0
  6. package/dist/components/ui/button/button.js.map +1 -0
  7. package/dist/components/ui/button-dropdown/button-dropdown.js +52 -0
  8. package/dist/components/ui/button-dropdown/button-dropdown.js.map +1 -0
  9. package/dist/components/ui/button-icon/button-icon.js +35 -0
  10. package/dist/components/ui/button-icon/button-icon.js.map +1 -0
  11. package/dist/components/ui/checkbox/checkbox.js +68 -0
  12. package/dist/components/ui/checkbox/checkbox.js.map +1 -0
  13. package/dist/components/ui/input/input.js +22 -0
  14. package/dist/components/ui/input/input.js.map +1 -0
  15. package/dist/components/ui/input-text-area/input-text-area.js +21 -0
  16. package/dist/components/ui/input-text-area/input-text-area.js.map +1 -0
  17. package/dist/components/ui/radio/radio.js +44 -0
  18. package/dist/components/ui/radio/radio.js.map +1 -0
  19. package/dist/components/ui/search/search.js +93 -0
  20. package/dist/components/ui/search/search.js.map +1 -0
  21. package/dist/components/ui/select/select.js +105 -0
  22. package/dist/components/ui/select/select.js.map +1 -0
  23. package/dist/components/ui/sidebar-primary/sidebar-primary.js +242 -0
  24. package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +1 -0
  25. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +372 -0
  26. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -0
  27. package/dist/components/ui/switch/switch.js +41 -0
  28. package/dist/components/ui/switch/switch.js.map +1 -0
  29. package/dist/components/ui/tag/tag.js +47 -0
  30. package/dist/components/ui/tag/tag.js.map +1 -0
  31. package/dist/components/ui/tooltip/tooltip.js +49 -0
  32. package/dist/components/ui/tooltip/tooltip.js.map +1 -0
  33. package/dist/index.d.ts +2 -0
  34. package/dist/index.js +79 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/lib/utils.js +9 -0
  37. package/dist/lib/utils.js.map +1 -0
  38. package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +36 -0
  39. package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js.map +1 -0
  40. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
  41. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
  42. package/dist/node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2996 -0
  43. package/dist/node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  44. package/dist/react.d.ts +2 -0
  45. package/dist/react.js +79 -0
  46. package/dist/react.js.map +1 -0
  47. package/dist/src/components/ui/breadcrumb/breadcrumb.d.ts +30 -0
  48. package/dist/src/components/ui/breadcrumb/index.d.ts +1 -0
  49. package/dist/src/components/ui/button/button.d.ts +16 -0
  50. package/dist/src/components/ui/button/index.d.ts +1 -0
  51. package/dist/src/components/ui/button-dropdown/button-dropdown.d.ts +29 -0
  52. package/dist/src/components/ui/button-dropdown/index.d.ts +1 -0
  53. package/dist/src/components/ui/button-icon/button-icon.d.ts +20 -0
  54. package/dist/src/components/ui/button-icon/index.d.ts +1 -0
  55. package/dist/src/components/ui/checkbox/checkbox.d.ts +10 -0
  56. package/dist/src/components/ui/checkbox/index.d.ts +1 -0
  57. package/dist/src/components/ui/input/index.d.ts +1 -0
  58. package/dist/src/components/ui/input/input.d.ts +4 -0
  59. package/dist/src/components/ui/input-text-area/index.d.ts +1 -0
  60. package/dist/src/components/ui/input-text-area/input-text-area.d.ts +4 -0
  61. package/dist/src/components/ui/radio/index.d.ts +1 -0
  62. package/dist/src/components/ui/radio/radio.d.ts +8 -0
  63. package/dist/src/components/ui/search/index.d.ts +1 -0
  64. package/dist/src/components/ui/search/search.d.ts +7 -0
  65. package/dist/src/components/ui/select/index.d.ts +1 -0
  66. package/dist/src/components/ui/select/select.d.ts +14 -0
  67. package/dist/src/components/ui/sidebar-primary/index.d.ts +1 -0
  68. package/dist/src/components/ui/sidebar-primary/sidebar-primary.d.ts +54 -0
  69. package/dist/src/components/ui/sidebar-secondary/index.d.ts +1 -0
  70. package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +85 -0
  71. package/dist/src/components/ui/switch/index.d.ts +1 -0
  72. package/dist/src/components/ui/switch/switch.d.ts +8 -0
  73. package/dist/src/components/ui/tag/index.d.ts +1 -0
  74. package/dist/src/components/ui/tag/tag.d.ts +12 -0
  75. package/dist/src/components/ui/tooltip/index.d.ts +1 -0
  76. package/dist/src/components/ui/tooltip/tooltip.d.ts +13 -0
  77. package/dist/src/index.d.ts +16 -0
  78. package/dist/src/lib/utils.d.ts +2 -0
  79. package/dist/src/react.d.ts +1 -0
  80. package/dist/styles.d.ts +1 -0
  81. package/dist/ui-react.css +1 -0
  82. package/package.json +119 -0
package/dist/index.js ADDED
@@ -0,0 +1,79 @@
1
+ import { cn as a } from "./lib/utils.js";
2
+ import { Breadcrumb as t, BreadcrumbEllipsis as i, BreadcrumbItem as n, BreadcrumbLink as d, BreadcrumbList as S, BreadcrumbPage as b, BreadcrumbSeparator as m } from "./components/ui/breadcrumb/breadcrumb.js";
3
+ import { Button as u, buttonVariants as p } from "./components/ui/button/button.js";
4
+ import { ButtonDropdown as l, buttonDropdownVariants as x } from "./components/ui/button-dropdown/button-dropdown.js";
5
+ import { Checkbox as s } from "./components/ui/checkbox/checkbox.js";
6
+ import { Radio as I, RadioGroup as M } from "./components/ui/radio/radio.js";
7
+ import { Input as B } from "./components/ui/input/input.js";
8
+ import { InputTextArea as C } from "./components/ui/input-text-area/input-text-area.js";
9
+ import { Search as L } from "./components/ui/search/search.js";
10
+ import { Select as w, SelectContent as E, SelectGroup as G, SelectGroupLabel as k, SelectItem as D, SelectTrigger as F, SelectValue as H } from "./components/ui/select/select.js";
11
+ import { SidebarPrimary as v, SidebarPrimaryCollapseTrigger as A, SidebarPrimaryContent as j, SidebarPrimaryFooter as q, SidebarPrimaryHeader as z, SidebarPrimaryMenu as J, SidebarPrimaryMenuItem as K, SidebarPrimaryMenuItemExtras as N, SidebarPrimarySection as O, sidebarPrimaryMenuItemVariants as Q } from "./components/ui/sidebar-primary/sidebar-primary.js";
12
+ import { SidebarSecondary as W, SidebarSecondaryCollapseTrigger as X, SidebarSecondaryCollapsedBreadcrumb as Y, SidebarSecondaryContent as Z, SidebarSecondaryFooter as _, SidebarSecondaryHeader as $, SidebarSecondaryMenu as rr, SidebarSecondaryMenuItem as er, SidebarSecondaryMenuItemExtras as ar, SidebarSecondaryMenuSub as or, SidebarSecondaryMenuSubContent as tr, SidebarSecondaryMenuSubItem as ir, SidebarSecondaryMenuSubTrigger as nr, SidebarSecondarySection as dr, SidebarSecondarySectionLabel as Sr, sidebarSecondaryMenuItemVariants as br } from "./components/ui/sidebar-secondary/sidebar-secondary.js";
13
+ import { ButtonIcon as cr, buttonIconVariants as ur } from "./components/ui/button-icon/button-icon.js";
14
+ import { Switch as yr } from "./components/ui/switch/switch.js";
15
+ import { Tooltip as xr, TooltipContent as fr, TooltipProvider as sr, TooltipTrigger as gr } from "./components/ui/tooltip/tooltip.js";
16
+ import { Tag as Mr, tagVariants as Pr } from "./components/ui/tag/tag.js";
17
+ export {
18
+ t as Breadcrumb,
19
+ i as BreadcrumbEllipsis,
20
+ n as BreadcrumbItem,
21
+ d as BreadcrumbLink,
22
+ S as BreadcrumbList,
23
+ b as BreadcrumbPage,
24
+ m as BreadcrumbSeparator,
25
+ u as Button,
26
+ l as ButtonDropdown,
27
+ cr as ButtonIcon,
28
+ s as Checkbox,
29
+ B as Input,
30
+ C as InputTextArea,
31
+ I as Radio,
32
+ M as RadioGroup,
33
+ L as Search,
34
+ w as Select,
35
+ E as SelectContent,
36
+ G as SelectGroup,
37
+ k as SelectGroupLabel,
38
+ D as SelectItem,
39
+ F as SelectTrigger,
40
+ H as SelectValue,
41
+ v as SidebarPrimary,
42
+ A as SidebarPrimaryCollapseTrigger,
43
+ j as SidebarPrimaryContent,
44
+ q as SidebarPrimaryFooter,
45
+ z as SidebarPrimaryHeader,
46
+ J as SidebarPrimaryMenu,
47
+ K as SidebarPrimaryMenuItem,
48
+ N as SidebarPrimaryMenuItemExtras,
49
+ O as SidebarPrimarySection,
50
+ W as SidebarSecondary,
51
+ X as SidebarSecondaryCollapseTrigger,
52
+ Y as SidebarSecondaryCollapsedBreadcrumb,
53
+ Z as SidebarSecondaryContent,
54
+ _ as SidebarSecondaryFooter,
55
+ $ as SidebarSecondaryHeader,
56
+ rr as SidebarSecondaryMenu,
57
+ er as SidebarSecondaryMenuItem,
58
+ ar as SidebarSecondaryMenuItemExtras,
59
+ or as SidebarSecondaryMenuSub,
60
+ tr as SidebarSecondaryMenuSubContent,
61
+ ir as SidebarSecondaryMenuSubItem,
62
+ nr as SidebarSecondaryMenuSubTrigger,
63
+ dr as SidebarSecondarySection,
64
+ Sr as SidebarSecondarySectionLabel,
65
+ yr as Switch,
66
+ Mr as Tag,
67
+ xr as Tooltip,
68
+ fr as TooltipContent,
69
+ sr as TooltipProvider,
70
+ gr as TooltipTrigger,
71
+ x as buttonDropdownVariants,
72
+ ur as buttonIconVariants,
73
+ p as buttonVariants,
74
+ a as cn,
75
+ Q as sidebarPrimaryMenuItemVariants,
76
+ br as sidebarSecondaryMenuItemVariants,
77
+ Pr as tagVariants
78
+ };
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ import { clsx as o } from "../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
2
+ import { twMerge as t } from "../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js";
3
+ function n(...r) {
4
+ return t(o(r));
5
+ }
6
+ export {
7
+ n as cn
8
+ };
9
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AAGO,SAASA,KAAMC,GAAsB;AAC1C,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC7B;"}
@@ -0,0 +1,36 @@
1
+ import { clsx as O } from "../../../../clsx@2.1.1/node_modules/clsx/dist/clsx.js";
2
+ const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
+ var s;
4
+ if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
5
+ const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
+ const a = n == null ? void 0 : n[t], u = d == null ? void 0 : d[t];
7
+ if (a === null) return null;
8
+ const i = m(a) || m(u);
9
+ return r[t][i];
10
+ }), v = n && Object.entries(n).reduce((t, a) => {
11
+ let [u, i] = a;
12
+ return i === void 0 || (t[u] = i), t;
13
+ }, {}), N = l == null || (s = l.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((t, a) => {
14
+ let { class: u, className: i, ...f } = a;
15
+ return Object.entries(f).every((C) => {
16
+ let [c, o] = C;
17
+ return Array.isArray(o) ? o.includes({
18
+ ...d,
19
+ ...v
20
+ }[c]) : {
21
+ ...d,
22
+ ...v
23
+ }[c] === o;
24
+ }) ? [
25
+ ...t,
26
+ u,
27
+ i
28
+ ] : t;
29
+ }, []);
30
+ return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
31
+ };
32
+ export {
33
+ j as cva,
34
+ y as cx
35
+ };
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions"],"mappings":";AAeA,MAAMA,IAAgB,CAACC,MAAQ,OAAOA,KAAU,YAAY,GAAGA,CAAK,KAAKA,MAAU,IAAI,MAAMA,GAChFC,IAAKC,GACLC,IAAM,CAACC,GAAMC,MAAS,CAACC,MAAQ;AACpC,MAAIC;AACJ,OAAKF,KAAW,OAA4B,SAASA,EAAO,aAAa,KAAM,QAAOJ,EAAGG,GAAME,KAAU,OAA2B,SAASA,EAAM,OAAOA,KAAU,OAA2B,SAASA,EAAM,SAAS;AACvN,QAAM,EAAE,UAAAE,GAAU,iBAAAC,EAAe,IAAKJ,GAChCK,IAAuB,OAAO,KAAKF,CAAQ,EAAE,IAAI,CAACG,MAAU;AAC9D,UAAMC,IAAcN,KAAU,OAA2B,SAASA,EAAMK,CAAO,GACzEE,IAAqBJ,KAAoB,OAAqC,SAASA,EAAgBE,CAAO;AACpH,QAAIC,MAAgB,KAAM,QAAO;AACjC,UAAME,IAAaf,EAAca,CAAW,KAAKb,EAAcc,CAAkB;AACjF,WAAOL,EAASG,CAAO,EAAEG,CAAU;AAAA,EACvC,CAAC,GACKC,IAAwBT,KAAS,OAAO,QAAQA,CAAK,EAAE,OAAO,CAACU,GAAKC,MAAQ;AAC9E,QAAI,CAACC,GAAKlB,CAAK,IAAIiB;AACnB,WAAIjB,MAAU,WAGdgB,EAAIE,CAAG,IAAIlB,IACJgB;AAAA,EACX,GAAG,CAAA,CAAE,GACCG,IAA+Bd,KAAW,SAAsCE,IAA2BF,EAAO,sBAAsB,QAAQE,MAA6B,SAAvG,SAAyHA,EAAyB,OAAO,CAACS,GAAKC,MAAQ;AAC/O,QAAI,EAAE,OAAOG,GAAS,WAAWC,GAAa,GAAGC,EAAsB,IAAKL;AAC5E,WAAO,OAAO,QAAQK,CAAsB,EAAE,MAAM,CAACL,MAAQ;AACzD,UAAI,CAACC,GAAKlB,CAAK,IAAIiB;AACnB,aAAO,MAAM,QAAQjB,CAAK,IAAIA,EAAM,SAAS;AAAA,QACzC,GAAGS;AAAA,QACH,GAAGM;AAAA,MACvB,EAAkBG,CAAG,CAAC,IAAK;AAAA,QACP,GAAGT;AAAA,QACH,GAAGM;AAAA,MACvB,EAAmBG,CAAG,MAAMlB;AAAA,IAChB,CAAC,IAAI;AAAA,MACD,GAAGgB;AAAA,MACHI;AAAA,MACAC;AAAA,IAChB,IAAgBL;AAAA,EACR,GAAG,CAAA,CAAE;AACL,SAAOf,EAAGG,GAAMM,GAAsBS,GAA8Bb,KAAU,OAA2B,SAASA,EAAM,OAAOA,KAAU,OAA2B,SAASA,EAAM,SAAS;AAChM;","x_google_ignoreList":[0]}
@@ -0,0 +1,17 @@
1
+ function i(r) {
2
+ var f, n, t = "";
3
+ if (typeof r == "string" || typeof r == "number") t += r;
4
+ else if (typeof r == "object") if (Array.isArray(r)) {
5
+ var o = r.length;
6
+ for (f = 0; f < o; f++) r[f] && (n = i(r[f])) && (t && (t += " "), t += n);
7
+ } else for (n in r) r[n] && (t && (t += " "), t += n);
8
+ return t;
9
+ }
10
+ function a() {
11
+ for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = i(r)) && (t && (t += " "), t += f);
12
+ return t;
13
+ }
14
+ export {
15
+ a as clsx
16
+ };
17
+ //# sourceMappingURL=clsx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clsx.js","sources":["../../../../../../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":["r","e","t","f","n","clsx"],"mappings":"AAAA,SAASA,EAAEC,GAAE;AAAC,MAAIC,GAAEC,GAAEC,IAAE;AAAG,MAAa,OAAOH,KAAjB,YAA8B,OAAOA,KAAjB,SAAmB,CAAAG,KAAGH;AAAA,WAAoB,OAAOA,KAAjB,SAAmB,KAAG,MAAM,QAAQA,CAAC,GAAE;AAAC,QAAI,IAAEA,EAAE;AAAO,SAAIC,IAAE,GAAEA,IAAE,GAAEA,IAAI,CAAAD,EAAEC,CAAC,MAAIC,IAAEH,EAAEC,EAAEC,CAAC,CAAC,OAAKE,MAAIA,KAAG,MAAKA,KAAGD;AAAA,EAAE,MAAM,MAAIA,KAAKF,EAAE,CAAAA,EAAEE,CAAC,MAAIC,MAAIA,KAAG,MAAKA,KAAGD;AAAG,SAAOC;AAAC;AAAQ,SAASC,IAAM;AAAC,WAAQJ,GAAEC,GAAEC,IAAE,GAAEC,IAAE,IAAG,IAAE,UAAU,QAAOD,IAAE,GAAEA,IAAI,EAACF,IAAE,UAAUE,CAAC,OAAKD,IAAEF,EAAEC,CAAC,OAAKG,MAAIA,KAAG,MAAKA,KAAGF;AAAG,SAAOE;AAAC;","x_google_ignoreList":[0]}