@x-plat/design-system 0.1.1

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 (165) hide show
  1. package/README.md +123 -0
  2. package/dist/attributes-DJIWir_0.d.cts +7 -0
  3. package/dist/attributes-DJIWir_0.d.ts +7 -0
  4. package/dist/breakpoints-DsXkJgdl.d.cts +35 -0
  5. package/dist/breakpoints-DsXkJgdl.d.ts +35 -0
  6. package/dist/colors-BG91q_uV.d.cts +133 -0
  7. package/dist/colors-BG91q_uV.d.ts +133 -0
  8. package/dist/components/Button/index.cjs +203 -0
  9. package/dist/components/Button/index.css +1231 -0
  10. package/dist/components/Button/index.d.cts +132 -0
  11. package/dist/components/Button/index.d.ts +132 -0
  12. package/dist/components/Button/index.js +176 -0
  13. package/dist/components/Card/index.cjs +56 -0
  14. package/dist/components/Card/index.css +27 -0
  15. package/dist/components/Card/index.d.cts +13 -0
  16. package/dist/components/Card/index.d.ts +13 -0
  17. package/dist/components/Card/index.js +29 -0
  18. package/dist/components/Chart/index.cjs +393 -0
  19. package/dist/components/Chart/index.css +4 -0
  20. package/dist/components/Chart/index.d.cts +10 -0
  21. package/dist/components/Chart/index.d.ts +10 -0
  22. package/dist/components/Chart/index.js +367 -0
  23. package/dist/components/CheckBox/index.cjs +1116 -0
  24. package/dist/components/CheckBox/index.css +598 -0
  25. package/dist/components/CheckBox/index.d.cts +132 -0
  26. package/dist/components/CheckBox/index.d.ts +132 -0
  27. package/dist/components/CheckBox/index.js +1089 -0
  28. package/dist/components/Chip/index.cjs +193 -0
  29. package/dist/components/Chip/index.css +1227 -0
  30. package/dist/components/Chip/index.d.cts +132 -0
  31. package/dist/components/Chip/index.d.ts +132 -0
  32. package/dist/components/Chip/index.js +166 -0
  33. package/dist/components/DatePicker/index.cjs +1653 -0
  34. package/dist/components/DatePicker/index.css +1417 -0
  35. package/dist/components/DatePicker/index.d.cts +56 -0
  36. package/dist/components/DatePicker/index.d.ts +56 -0
  37. package/dist/components/DatePicker/index.js +1613 -0
  38. package/dist/components/HtmlTypeWriter/index.cjs +172 -0
  39. package/dist/components/HtmlTypeWriter/index.css +23 -0
  40. package/dist/components/HtmlTypeWriter/index.d.cts +14 -0
  41. package/dist/components/HtmlTypeWriter/index.d.ts +14 -0
  42. package/dist/components/HtmlTypeWriter/index.js +135 -0
  43. package/dist/components/ImageSelector/index.cjs +1063 -0
  44. package/dist/components/ImageSelector/index.css +85 -0
  45. package/dist/components/ImageSelector/index.d.cts +10 -0
  46. package/dist/components/ImageSelector/index.d.ts +10 -0
  47. package/dist/components/ImageSelector/index.js +1026 -0
  48. package/dist/components/Input/index.cjs +410 -0
  49. package/dist/components/Input/index.css +74 -0
  50. package/dist/components/Input/index.d.cts +23 -0
  51. package/dist/components/Input/index.d.ts +23 -0
  52. package/dist/components/Input/index.js +372 -0
  53. package/dist/components/Modal/index.cjs +101 -0
  54. package/dist/components/Modal/index.css +39 -0
  55. package/dist/components/Modal/index.d.cts +16 -0
  56. package/dist/components/Modal/index.d.ts +16 -0
  57. package/dist/components/Modal/index.js +64 -0
  58. package/dist/components/PopOver/index.cjs +176 -0
  59. package/dist/components/PopOver/index.css +27 -0
  60. package/dist/components/PopOver/index.d.cts +15 -0
  61. package/dist/components/PopOver/index.d.ts +15 -0
  62. package/dist/components/PopOver/index.js +139 -0
  63. package/dist/components/Radio/index.cjs +257 -0
  64. package/dist/components/Radio/index.css +777 -0
  65. package/dist/components/Radio/index.d.cts +154 -0
  66. package/dist/components/Radio/index.d.ts +154 -0
  67. package/dist/components/Radio/index.js +219 -0
  68. package/dist/components/Select/index.cjs +1203 -0
  69. package/dist/components/Select/index.css +136 -0
  70. package/dist/components/Select/index.d.cts +44 -0
  71. package/dist/components/Select/index.d.ts +44 -0
  72. package/dist/components/Select/index.js +1165 -0
  73. package/dist/components/Swiper/index.cjs +144 -0
  74. package/dist/components/Swiper/index.d.cts +24 -0
  75. package/dist/components/Swiper/index.d.ts +24 -0
  76. package/dist/components/Swiper/index.js +128 -0
  77. package/dist/components/Switch/index.cjs +240 -0
  78. package/dist/components/Switch/index.css +780 -0
  79. package/dist/components/Switch/index.d.cts +131 -0
  80. package/dist/components/Switch/index.d.ts +131 -0
  81. package/dist/components/Switch/index.js +203 -0
  82. package/dist/components/Tab/index.cjs +122 -0
  83. package/dist/components/Tab/index.css +59 -0
  84. package/dist/components/Tab/index.d.cts +18 -0
  85. package/dist/components/Tab/index.d.ts +18 -0
  86. package/dist/components/Tab/index.js +85 -0
  87. package/dist/components/Table/index.cjs +384 -0
  88. package/dist/components/Table/index.css +4093 -0
  89. package/dist/components/Table/index.d.cts +174 -0
  90. package/dist/components/Table/index.d.ts +174 -0
  91. package/dist/components/Table/index.js +343 -0
  92. package/dist/components/TextArea/index.cjs +114 -0
  93. package/dist/components/TextArea/index.css +34 -0
  94. package/dist/components/TextArea/index.d.cts +6 -0
  95. package/dist/components/TextArea/index.d.ts +6 -0
  96. package/dist/components/TextArea/index.js +77 -0
  97. package/dist/components/Tooltip/index.cjs +210 -0
  98. package/dist/components/Tooltip/index.css +599 -0
  99. package/dist/components/Tooltip/index.d.cts +134 -0
  100. package/dist/components/Tooltip/index.d.ts +134 -0
  101. package/dist/components/Tooltip/index.js +173 -0
  102. package/dist/components/Video/index.cjs +269 -0
  103. package/dist/components/Video/index.css +71 -0
  104. package/dist/components/Video/index.d.cts +15 -0
  105. package/dist/components/Video/index.d.ts +15 -0
  106. package/dist/components/Video/index.js +232 -0
  107. package/dist/components/index.cjs +3221 -0
  108. package/dist/components/index.css +9972 -0
  109. package/dist/components/index.d.cts +23 -0
  110. package/dist/components/index.d.ts +23 -0
  111. package/dist/components/index.js +3167 -0
  112. package/dist/index.cjs +8216 -0
  113. package/dist/index.css +10087 -0
  114. package/dist/index.d.cts +31 -0
  115. package/dist/index.d.ts +31 -0
  116. package/dist/index.js +7855 -0
  117. package/dist/layout/Grid/FullGrid/index.cjs +54 -0
  118. package/dist/layout/Grid/FullGrid/index.css +21 -0
  119. package/dist/layout/Grid/FullGrid/index.d.cts +9 -0
  120. package/dist/layout/Grid/FullGrid/index.d.ts +9 -0
  121. package/dist/layout/Grid/FullGrid/index.js +27 -0
  122. package/dist/layout/Grid/FullScreen/index.cjs +54 -0
  123. package/dist/layout/Grid/FullScreen/index.css +23 -0
  124. package/dist/layout/Grid/FullScreen/index.d.cts +9 -0
  125. package/dist/layout/Grid/FullScreen/index.d.ts +9 -0
  126. package/dist/layout/Grid/FullScreen/index.js +27 -0
  127. package/dist/layout/Grid/GapGrid/index.cjs +32 -0
  128. package/dist/layout/Grid/GapGrid/index.d.cts +12 -0
  129. package/dist/layout/Grid/GapGrid/index.d.ts +12 -0
  130. package/dist/layout/Grid/GapGrid/index.js +11 -0
  131. package/dist/layout/Grid/Item/index.cjs +71 -0
  132. package/dist/layout/Grid/Item/index.css +19 -0
  133. package/dist/layout/Grid/Item/index.d.cts +20 -0
  134. package/dist/layout/Grid/Item/index.d.ts +20 -0
  135. package/dist/layout/Grid/Item/index.js +44 -0
  136. package/dist/layout/Grid/index.cjs +95 -0
  137. package/dist/layout/Grid/index.css +65 -0
  138. package/dist/layout/Grid/index.d.cts +5 -0
  139. package/dist/layout/Grid/index.d.ts +5 -0
  140. package/dist/layout/Grid/index.js +65 -0
  141. package/dist/layout/Header/index.cjs +45 -0
  142. package/dist/layout/Header/index.css +11 -0
  143. package/dist/layout/Header/index.d.cts +10 -0
  144. package/dist/layout/Header/index.d.ts +10 -0
  145. package/dist/layout/Header/index.js +18 -0
  146. package/dist/layout/Layout/index.cjs +44 -0
  147. package/dist/layout/Layout/index.css +23 -0
  148. package/dist/layout/Layout/index.d.cts +15 -0
  149. package/dist/layout/Layout/index.d.ts +15 -0
  150. package/dist/layout/Layout/index.js +17 -0
  151. package/dist/layout/SideBar/index.cjs +101 -0
  152. package/dist/layout/SideBar/index.css +10 -0
  153. package/dist/layout/SideBar/index.d.cts +16 -0
  154. package/dist/layout/SideBar/index.d.ts +16 -0
  155. package/dist/layout/SideBar/index.js +62 -0
  156. package/dist/layout/index.cjs +188 -0
  157. package/dist/layout/index.css +112 -0
  158. package/dist/layout/index.d.cts +8 -0
  159. package/dist/layout/index.d.ts +8 -0
  160. package/dist/layout/index.js +143 -0
  161. package/dist/tokens/index.cjs +6225 -0
  162. package/dist/tokens/index.d.cts +593 -0
  163. package/dist/tokens/index.d.ts +593 -0
  164. package/dist/tokens/index.js +5900 -0
  165. package/package.json +86 -0
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/TextArea/index.ts
31
+ var TextArea_exports = {};
32
+ __export(TextArea_exports, {
33
+ TextArea: () => TextArea_default
34
+ });
35
+ module.exports = __toCommonJS(TextArea_exports);
36
+
37
+ // src/components/TextArea/TextArea.tsx
38
+ var import_react = __toESM(require("react"), 1);
39
+
40
+ // node_modules/clsx/dist/clsx.mjs
41
+ function r(e) {
42
+ var t, f, n = "";
43
+ if ("string" == typeof e || "number" == typeof e) n += e;
44
+ else if ("object" == typeof e) if (Array.isArray(e)) {
45
+ var o = e.length;
46
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
47
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
48
+ return n;
49
+ }
50
+ function clsx() {
51
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
52
+ return n;
53
+ }
54
+ var clsx_default = clsx;
55
+
56
+ // src/components/TextArea/TextArea.tsx
57
+ var import_jsx_runtime = require("react/jsx-runtime");
58
+ var TextArea = import_react.default.forwardRef(
59
+ (props, ref) => {
60
+ const { value, onChange, className, disabled, ...textareaProps } = props;
61
+ const localRef = import_react.default.useRef(null);
62
+ const setRefs = (el) => {
63
+ localRef.current = el;
64
+ if (!ref) return;
65
+ if (typeof ref === "function") {
66
+ ref(el);
67
+ } else if (ref && typeof ref === "object" && "current" in ref) {
68
+ ref.current = el;
69
+ }
70
+ };
71
+ const handleOnChange = (e) => {
72
+ const val = e.target.value;
73
+ if (onChange) {
74
+ const event = {
75
+ ...e,
76
+ target: { value: val }
77
+ };
78
+ onChange(event);
79
+ }
80
+ };
81
+ import_react.default.useEffect(() => {
82
+ const el = localRef.current;
83
+ if (!el) return;
84
+ el.style.height = "0px";
85
+ const nextHeight = Math.min(el.scrollHeight, 400);
86
+ el.style.height = `${nextHeight}px`;
87
+ }, [value]);
88
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
+ "div",
90
+ {
91
+ className: clsx_default(
92
+ "lib-xplat-textarea",
93
+ disabled ? "disabled" : void 0
94
+ ),
95
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
+ "textarea",
97
+ {
98
+ ...textareaProps,
99
+ ref: setRefs,
100
+ disabled,
101
+ value,
102
+ onChange: handleOnChange
103
+ }
104
+ )
105
+ }
106
+ ) });
107
+ }
108
+ );
109
+ TextArea.displayName = "TextArea";
110
+ var TextArea_default = TextArea;
111
+ // Annotate the CommonJS export names for ESM import in node:
112
+ 0 && (module.exports = {
113
+ TextArea
114
+ });
@@ -0,0 +1,34 @@
1
+ /* src/components/TextArea/textArea.scss */
2
+ .lib-xplat-textarea-wrapper {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 0.5rem;
6
+ }
7
+ .lib-xplat-textarea-wrapper .lib-xplat-textarea {
8
+ display: flex;
9
+ align-items: center;
10
+ border: 1px solid #D4D4D4;
11
+ border-radius: 0.5rem;
12
+ min-height: 2.5rem;
13
+ overflow: hidden;
14
+ background-color: #FFFFFF;
15
+ width: 100%;
16
+ }
17
+ .lib-xplat-textarea-wrapper .lib-xplat-textarea.disabled {
18
+ background-color: #F5F5F5;
19
+ cursor: not-allowed;
20
+ }
21
+ .lib-xplat-textarea-wrapper .lib-xplat-textarea > textarea {
22
+ border: none;
23
+ outline: none;
24
+ flex: 1;
25
+ padding-left: 1rem;
26
+ padding-right: 1rem;
27
+ width: 100%;
28
+ color: #404040;
29
+ resize: none;
30
+ height: 1.5em;
31
+ }
32
+ .lib-xplat-textarea-wrapper .lib-xplat-textarea > textarea:disabled {
33
+ cursor: not-allowed;
34
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { T as TextareaAttributes } from '../../attributes-DJIWir_0.cjs';
3
+
4
+ declare const TextArea: React.ForwardRefExoticComponent<TextareaAttributes & React.RefAttributes<HTMLTextAreaElement>>;
5
+
6
+ export { TextArea };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { T as TextareaAttributes } from '../../attributes-DJIWir_0.js';
3
+
4
+ declare const TextArea: React.ForwardRefExoticComponent<TextareaAttributes & React.RefAttributes<HTMLTextAreaElement>>;
5
+
6
+ export { TextArea };
@@ -0,0 +1,77 @@
1
+ // src/components/TextArea/TextArea.tsx
2
+ import React from "react";
3
+
4
+ // node_modules/clsx/dist/clsx.mjs
5
+ function r(e) {
6
+ var t, f, n = "";
7
+ if ("string" == typeof e || "number" == typeof e) n += e;
8
+ else if ("object" == typeof e) if (Array.isArray(e)) {
9
+ var o = e.length;
10
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
11
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
12
+ return n;
13
+ }
14
+ function clsx() {
15
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
16
+ return n;
17
+ }
18
+ var clsx_default = clsx;
19
+
20
+ // src/components/TextArea/TextArea.tsx
21
+ import { jsx } from "react/jsx-runtime";
22
+ var TextArea = React.forwardRef(
23
+ (props, ref) => {
24
+ const { value, onChange, className, disabled, ...textareaProps } = props;
25
+ const localRef = React.useRef(null);
26
+ const setRefs = (el) => {
27
+ localRef.current = el;
28
+ if (!ref) return;
29
+ if (typeof ref === "function") {
30
+ ref(el);
31
+ } else if (ref && typeof ref === "object" && "current" in ref) {
32
+ ref.current = el;
33
+ }
34
+ };
35
+ const handleOnChange = (e) => {
36
+ const val = e.target.value;
37
+ if (onChange) {
38
+ const event = {
39
+ ...e,
40
+ target: { value: val }
41
+ };
42
+ onChange(event);
43
+ }
44
+ };
45
+ React.useEffect(() => {
46
+ const el = localRef.current;
47
+ if (!el) return;
48
+ el.style.height = "0px";
49
+ const nextHeight = Math.min(el.scrollHeight, 400);
50
+ el.style.height = `${nextHeight}px`;
51
+ }, [value]);
52
+ return /* @__PURE__ */ jsx("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ jsx(
53
+ "div",
54
+ {
55
+ className: clsx_default(
56
+ "lib-xplat-textarea",
57
+ disabled ? "disabled" : void 0
58
+ ),
59
+ children: /* @__PURE__ */ jsx(
60
+ "textarea",
61
+ {
62
+ ...textareaProps,
63
+ ref: setRefs,
64
+ disabled,
65
+ value,
66
+ onChange: handleOnChange
67
+ }
68
+ )
69
+ }
70
+ ) });
71
+ }
72
+ );
73
+ TextArea.displayName = "TextArea";
74
+ var TextArea_default = TextArea;
75
+ export {
76
+ TextArea_default as TextArea
77
+ };
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/Tooltip/index.ts
31
+ var Tooltip_exports = {};
32
+ __export(Tooltip_exports, {
33
+ Tooltip: () => Tooltip_default
34
+ });
35
+ module.exports = __toCommonJS(Tooltip_exports);
36
+
37
+ // src/components/Tooltip/Tooltip.tsx
38
+ var import_react = __toESM(require("react"), 1);
39
+
40
+ // src/tokens/colors.ts
41
+ var colors = {
42
+ xplat: {
43
+ red: {
44
+ 50: "#FFF0F0",
45
+ 100: "#FFDDDE",
46
+ 200: "#FFC1C2",
47
+ 300: "#FF9698",
48
+ 400: "#FF5A5D",
49
+ 500: "#FF272B",
50
+ 600: "#F80409",
51
+ 700: "#D40105",
52
+ 800: "#AE0609",
53
+ 900: "#900C0F"
54
+ },
55
+ green: {
56
+ 50: "#E5F6EA",
57
+ 100: "#C1E7CC",
58
+ 200: "#98D8AC",
59
+ 300: "#6CCA8B",
60
+ 400: "#47BE72",
61
+ 500: "#10B259",
62
+ 600: "#00A34F",
63
+ 700: "#009143",
64
+ 800: "#007F38",
65
+ 900: "#006024"
66
+ },
67
+ orange: {
68
+ 50: "#FFF8EC",
69
+ 100: "#FFF0D3",
70
+ 200: "#FFDDA5",
71
+ 300: "#FFC46D",
72
+ 400: "#FF9F32",
73
+ 500: "#FF820A",
74
+ 600: "#FF6900",
75
+ 700: "#CC4B02",
76
+ 800: "#A13A0B",
77
+ 900: "#82320C"
78
+ },
79
+ yellow: {
80
+ 50: "#FFFDE7",
81
+ 100: "#FFFAC1",
82
+ 200: "#FFF186",
83
+ 300: "#FFE041",
84
+ 400: "#FFCC0D",
85
+ 500: "#F0B100",
86
+ 600: "#D18800",
87
+ 700: "#A66002",
88
+ 800: "#894B0A",
89
+ 900: "#743D0F"
90
+ },
91
+ blue: {
92
+ 50: "#F1F4FD",
93
+ 100: "#DFE7FA",
94
+ 200: "#C5D4F8",
95
+ 300: "#9EB8F2",
96
+ 400: "#7093EA",
97
+ 500: "#4D6DE3",
98
+ 600: "#3950D7",
99
+ 700: "#303EC5",
100
+ 800: "#2D35A0",
101
+ 900: "#29317F"
102
+ },
103
+ lightblue: {
104
+ 50: "#EEFAFF",
105
+ 100: "#D9F4FF",
106
+ 200: "#BBEDFF",
107
+ 300: "#8DE3FF",
108
+ 400: "#57D0FF",
109
+ 500: "#30B6FF",
110
+ 600: "#1999F7",
111
+ 700: "#1280E3",
112
+ 800: "#1566B8",
113
+ 900: "#175791"
114
+ },
115
+ purple: {
116
+ 50: "#FBF6FE",
117
+ 100: "#F5EAFD",
118
+ 200: "#EDD8FC",
119
+ 300: "#E0BAF8",
120
+ 400: "#CD8DF3",
121
+ 500: "#B961EB",
122
+ 600: "#A541DC",
123
+ 700: "#9230C5",
124
+ 800: "#782B9E",
125
+ 900: "#62247F"
126
+ },
127
+ pink: {
128
+ 50: "#FFF4FE",
129
+ 100: "#FFE7FD",
130
+ 200: "#FFCFFA",
131
+ 300: "#FEA9F1",
132
+ 400: "#FD75E7",
133
+ 500: "#F553DA",
134
+ 600: "#D821B6",
135
+ 700: "#B31892",
136
+ 800: "#921676",
137
+ 900: "#781761"
138
+ },
139
+ neutral: {
140
+ 50: "#FAFAFA",
141
+ 100: "#F5F5F5",
142
+ 200: "#E5E5E5",
143
+ 300: "#D4D4D4",
144
+ 400: "#A1A1A1",
145
+ 500: "#737373",
146
+ 600: "#525252",
147
+ 700: "#404040",
148
+ 800: "#262626",
149
+ 900: "#171717"
150
+ },
151
+ black: "#000000",
152
+ white: "#FFFFFF"
153
+ },
154
+ test: {
155
+ default: "#ffffff"
156
+ }
157
+ };
158
+
159
+ // src/util/getColor.ts
160
+ var getColorClass = (namespace, palette, shade) => {
161
+ const namespaceMap = colors[namespace];
162
+ const paletteMap = namespaceMap[palette];
163
+ const hasShade = paletteMap && typeof paletteMap === "object" && shade !== void 0 && shade in paletteMap;
164
+ return `${String(namespace)}-${String(palette)}${hasShade ? `-${String(shade)}` : ""}`;
165
+ };
166
+
167
+ // node_modules/clsx/dist/clsx.mjs
168
+ function r(e) {
169
+ var t, f, n = "";
170
+ if ("string" == typeof e || "number" == typeof e) n += e;
171
+ else if ("object" == typeof e) if (Array.isArray(e)) {
172
+ var o = e.length;
173
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
174
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
175
+ return n;
176
+ }
177
+ function clsx() {
178
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
179
+ return n;
180
+ }
181
+ var clsx_default = clsx;
182
+
183
+ // src/components/Tooltip/Tooltip.tsx
184
+ var import_jsx_runtime = require("react/jsx-runtime");
185
+ var Tooltip = (props) => {
186
+ const {
187
+ type = "primary",
188
+ colorNamespace = "xplat",
189
+ color = "blue",
190
+ colorDepth,
191
+ description,
192
+ children
193
+ } = props;
194
+ const iconRef = import_react.default.useRef(null);
195
+ const colorClass = getColorClass(
196
+ colorNamespace,
197
+ color,
198
+ colorDepth ?? 500
199
+ );
200
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "lib-xplat-tooltip", children: [
201
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
202
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
203
+ ] });
204
+ };
205
+ Tooltip.displayName = "Tooltip";
206
+ var Tooltip_default = Tooltip;
207
+ // Annotate the CommonJS export names for ESM import in node:
208
+ 0 && (module.exports = {
209
+ Tooltip
210
+ });