@x-plat/design-system 0.5.21 → 0.5.23

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.
@@ -0,0 +1,177 @@
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/ChatInput/index.ts
31
+ var ChatInput_exports = {};
32
+ __export(ChatInput_exports, {
33
+ ChatInput: () => ChatInput_default
34
+ });
35
+ module.exports = __toCommonJS(ChatInput_exports);
36
+
37
+ // src/components/ChatInput/ChatInput.tsx
38
+ var import_react = __toESM(require("react"), 1);
39
+
40
+ // src/tokens/svg/communication/BellIcon.tsx
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+
43
+ // src/tokens/svg/communication/BellOffIcon.tsx
44
+ var import_jsx_runtime2 = require("react/jsx-runtime");
45
+
46
+ // src/tokens/svg/communication/InboxIcon.tsx
47
+ var import_jsx_runtime3 = require("react/jsx-runtime");
48
+
49
+ // src/tokens/svg/communication/MessageCircleIcon.tsx
50
+ var import_jsx_runtime4 = require("react/jsx-runtime");
51
+
52
+ // src/tokens/svg/communication/MessageSquareIcon.tsx
53
+ var import_jsx_runtime5 = require("react/jsx-runtime");
54
+
55
+ // src/tokens/svg/communication/PaperclipIcon.tsx
56
+ var import_jsx_runtime6 = require("react/jsx-runtime");
57
+
58
+ // src/tokens/svg/communication/SendIcon.tsx
59
+ var import_jsx_runtime7 = require("react/jsx-runtime");
60
+ var SendIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
61
+ "svg",
62
+ {
63
+ xmlns: "http://www.w3.org/2000/svg",
64
+ width: "1em",
65
+ height: "1em",
66
+ viewBox: "0 0 20 20",
67
+ fill: "none",
68
+ children: [
69
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { clipPath: "url(#send-clip)", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.3558 0.918873C18.3887 0.919879 18.4212 0.9224 18.4535 0.927663C18.4642 0.929393 18.4751 0.930348 18.4857 0.932545C18.527 0.941123 18.5675 0.953269 18.6068 0.968678C18.6178 0.972968 18.6282 0.978499 18.639 0.983327C18.6672 0.995914 18.6945 1.01021 18.7211 1.0263C18.7403 1.03794 18.7594 1.04988 18.7777 1.0634C18.7803 1.06534 18.7829 1.0673 18.7855 1.06926C18.8126 1.08979 18.839 1.11195 18.8637 1.13665C18.8872 1.16018 18.9084 1.18517 18.9281 1.21087C18.9322 1.21625 18.9359 1.22198 18.9398 1.22747C18.9501 1.24168 18.959 1.25667 18.9681 1.27141C18.9866 1.30108 19.0029 1.33154 19.017 1.36321C19.0214 1.37309 19.0267 1.38248 19.0306 1.39251C19.0461 1.43186 19.0581 1.47231 19.0668 1.5136C19.069 1.52426 19.0699 1.5351 19.0717 1.54583C19.077 1.57815 19.0794 1.61062 19.0805 1.64348C19.0808 1.65621 19.0817 1.66884 19.0814 1.68157C19.0799 1.75981 19.0681 1.83872 19.0414 1.91497L13.2074 18.581C13.1058 18.871 12.8377 19.0703 12.5306 19.0829C12.2237 19.0954 11.9398 18.9192 11.8148 18.6386L8.59706 11.4003L1.3617 8.18547C1.08085 8.06057 0.90492 7.77678 0.917368 7.46965C0.929915 7.16252 1.12827 6.89358 1.41834 6.79192L18.0853 0.958913C18.1613 0.932334 18.2398 0.919479 18.3178 0.917897C18.3305 0.91763 18.3431 0.918498 18.3558 0.918873ZM10.0609 10.999L12.4164 16.2997L16.5375 4.52239L10.0609 10.999ZM3.69862 7.58294L9.00038 9.93841L15.4808 3.45794L3.69862 7.58294Z", fill: "currentColor" }) }),
70
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("clipPath", { id: "send-clip", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { width: "20", height: "20", fill: "currentColor" }) }) })
71
+ ]
72
+ }
73
+ );
74
+ var SendIcon_default = SendIcon;
75
+
76
+ // ../../node_modules/clsx/dist/clsx.mjs
77
+ function r(e) {
78
+ var t, f, n = "";
79
+ if ("string" == typeof e || "number" == typeof e) n += e;
80
+ else if ("object" == typeof e) if (Array.isArray(e)) {
81
+ var o = e.length;
82
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
83
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
84
+ return n;
85
+ }
86
+ function clsx() {
87
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
88
+ return n;
89
+ }
90
+ var clsx_default = clsx;
91
+
92
+ // src/components/ChatInput/ChatInput.tsx
93
+ var import_jsx_runtime8 = require("react/jsx-runtime");
94
+ var MAX_HEIGHT = 200;
95
+ var ChatInput = import_react.default.forwardRef(
96
+ (props, ref) => {
97
+ const {
98
+ placeholder,
99
+ value: valueProp,
100
+ disabled = false,
101
+ buttonType = "primary",
102
+ onSubmit,
103
+ onChange
104
+ } = props;
105
+ const isControlled = valueProp !== void 0;
106
+ const [internalValue, setInternalValue] = import_react.default.useState("");
107
+ const value = isControlled ? valueProp : internalValue;
108
+ const hasText = value.trim().length > 0;
109
+ const textareaRef = import_react.default.useRef(null);
110
+ const setRefs = import_react.default.useCallback(
111
+ (el) => {
112
+ textareaRef.current = el;
113
+ if (typeof ref === "function") ref(el);
114
+ else if (ref) ref.current = el;
115
+ },
116
+ [ref]
117
+ );
118
+ const updateHeight = import_react.default.useCallback(() => {
119
+ const el = textareaRef.current;
120
+ if (!el) return;
121
+ el.style.height = "0px";
122
+ el.style.height = `${Math.min(el.scrollHeight, MAX_HEIGHT)}px`;
123
+ }, []);
124
+ const handleChange = (e) => {
125
+ const val = e.target.value;
126
+ if (!isControlled) setInternalValue(val);
127
+ onChange?.(val);
128
+ };
129
+ const handleSubmit = () => {
130
+ if (!hasText || disabled) return;
131
+ onSubmit?.(value);
132
+ if (!isControlled) setInternalValue("");
133
+ requestAnimationFrame(updateHeight);
134
+ };
135
+ const handleKeyDown = (e) => {
136
+ if (e.key === "Enter" && !e.shiftKey) {
137
+ e.preventDefault();
138
+ handleSubmit();
139
+ }
140
+ };
141
+ import_react.default.useEffect(() => {
142
+ updateHeight();
143
+ }, [value, updateHeight]);
144
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
145
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
146
+ "textarea",
147
+ {
148
+ ref: setRefs,
149
+ className: "chat-input-textarea",
150
+ placeholder,
151
+ value,
152
+ disabled,
153
+ rows: 1,
154
+ onChange: handleChange,
155
+ onKeyDown: handleKeyDown
156
+ }
157
+ ),
158
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
159
+ "button",
160
+ {
161
+ type: "button",
162
+ className: clsx_default("chat-input-send", `btn-${buttonType}`),
163
+ disabled: !hasText || disabled,
164
+ onClick: handleSubmit,
165
+ "aria-label": "\uC804\uC1A1",
166
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SendIcon_default, {})
167
+ }
168
+ )
169
+ ] });
170
+ }
171
+ );
172
+ ChatInput.displayName = "ChatInput";
173
+ var ChatInput_default = ChatInput;
174
+ // Annotate the CommonJS export names for ESM import in node:
175
+ 0 && (module.exports = {
176
+ ChatInput
177
+ });
@@ -0,0 +1,87 @@
1
+ /* src/components/ChatInput/chatInput.scss */
2
+ .lib-xplat-chat-input {
3
+ display: flex;
4
+ align-items: flex-end;
5
+ gap: var(--spacing-space-2);
6
+ padding: var(--spacing-space-3);
7
+ border: 1px solid var(--semantic-border-default);
8
+ border-radius: var(--spacing-radius-lg);
9
+ background-color: var(--semantic-surface-neutral-default);
10
+ transition: border-color 0.15s, box-shadow 0.15s;
11
+ }
12
+ .lib-xplat-chat-input:hover:not(.disabled):not(:focus-within) {
13
+ border-color: var(--semantic-border-strong);
14
+ }
15
+ .lib-xplat-chat-input:focus-within {
16
+ border-color: var(--semantic-interaction-focus-ring);
17
+ box-shadow: 0 0 0 2px var(--semantic-interaction-overlay-10);
18
+ }
19
+ .lib-xplat-chat-input.disabled {
20
+ background-color: var(--semantic-surface-neutral-subtle);
21
+ border-color: var(--semantic-border-default);
22
+ cursor: not-allowed;
23
+ }
24
+ .lib-xplat-chat-input .chat-input-textarea {
25
+ flex: 1;
26
+ border: none;
27
+ outline: none;
28
+ resize: none;
29
+ min-height: var(--spacing-control-height-lg);
30
+ max-height: 200px;
31
+ overflow-y: auto;
32
+ padding: 0;
33
+ font-size: 16px;
34
+ line-height: 1.5;
35
+ color: var(--semantic-text-strong);
36
+ background: transparent;
37
+ }
38
+ .lib-xplat-chat-input .chat-input-textarea::placeholder {
39
+ color: var(--semantic-text-disabled);
40
+ }
41
+ .lib-xplat-chat-input .chat-input-textarea:disabled {
42
+ cursor: not-allowed;
43
+ color: var(--semantic-text-disabled);
44
+ }
45
+ .lib-xplat-chat-input .chat-input-send {
46
+ display: inline-flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ flex-shrink: 0;
50
+ width: var(--spacing-control-height-md);
51
+ height: var(--spacing-control-height-md);
52
+ border: none;
53
+ border-radius: var(--spacing-radius-md);
54
+ cursor: pointer;
55
+ font-size: 20px;
56
+ transition: background-color 0.15s, opacity 0.15s;
57
+ }
58
+ .lib-xplat-chat-input .chat-input-send:disabled {
59
+ opacity: 0.4;
60
+ cursor: not-allowed;
61
+ }
62
+ .lib-xplat-chat-input .chat-input-send:focus-visible {
63
+ outline: 2px solid var(--semantic-interaction-focus-ring);
64
+ outline-offset: 2px;
65
+ }
66
+ .lib-xplat-chat-input .chat-input-send.btn-primary {
67
+ background-color: var(--semantic-surface-brand-default);
68
+ color: var(--semantic-text-inverse);
69
+ }
70
+ .lib-xplat-chat-input .chat-input-send.btn-primary:hover:not(:disabled) {
71
+ background-color: var(--semantic-surface-brand-strong);
72
+ }
73
+ .lib-xplat-chat-input .chat-input-send.btn-secondary {
74
+ background-color: var(--semantic-surface-neutral-default);
75
+ color: var(--semantic-surface-brand-default);
76
+ border: 1px solid var(--semantic-border-default);
77
+ }
78
+ .lib-xplat-chat-input .chat-input-send.btn-secondary:hover:not(:disabled) {
79
+ background-color: var(--semantic-surface-neutral-subtle);
80
+ }
81
+ .lib-xplat-chat-input .chat-input-send.btn-text {
82
+ background-color: transparent;
83
+ color: var(--semantic-surface-brand-default);
84
+ }
85
+ .lib-xplat-chat-input .chat-input-send.btn-text:hover:not(:disabled) {
86
+ background-color: var(--semantic-surface-neutral-subtle);
87
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+
3
+ type ButtonType = "primary" | "secondary" | "text";
4
+ interface ChatInputProps {
5
+ placeholder?: string;
6
+ value?: string;
7
+ disabled?: boolean;
8
+ buttonType?: ButtonType;
9
+ onSubmit?: (value: string) => void;
10
+ onChange?: (value: string) => void;
11
+ }
12
+ declare const ChatInput: React.ForwardRefExoticComponent<ChatInputProps & React.RefAttributes<HTMLTextAreaElement>>;
13
+
14
+ export { ChatInput };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+
3
+ type ButtonType = "primary" | "secondary" | "text";
4
+ interface ChatInputProps {
5
+ placeholder?: string;
6
+ value?: string;
7
+ disabled?: boolean;
8
+ buttonType?: ButtonType;
9
+ onSubmit?: (value: string) => void;
10
+ onChange?: (value: string) => void;
11
+ }
12
+ declare const ChatInput: React.ForwardRefExoticComponent<ChatInputProps & React.RefAttributes<HTMLTextAreaElement>>;
13
+
14
+ export { ChatInput };
@@ -0,0 +1,140 @@
1
+ // src/components/ChatInput/ChatInput.tsx
2
+ import React from "react";
3
+
4
+ // src/tokens/svg/communication/BellIcon.tsx
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ // src/tokens/svg/communication/BellOffIcon.tsx
8
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
9
+
10
+ // src/tokens/svg/communication/InboxIcon.tsx
11
+ import { jsx as jsx3 } from "react/jsx-runtime";
12
+
13
+ // src/tokens/svg/communication/MessageCircleIcon.tsx
14
+ import { jsx as jsx4 } from "react/jsx-runtime";
15
+
16
+ // src/tokens/svg/communication/MessageSquareIcon.tsx
17
+ import { jsx as jsx5 } from "react/jsx-runtime";
18
+
19
+ // src/tokens/svg/communication/PaperclipIcon.tsx
20
+ import { jsx as jsx6 } from "react/jsx-runtime";
21
+
22
+ // src/tokens/svg/communication/SendIcon.tsx
23
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
24
+ var SendIcon = () => /* @__PURE__ */ jsxs3(
25
+ "svg",
26
+ {
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ width: "1em",
29
+ height: "1em",
30
+ viewBox: "0 0 20 20",
31
+ fill: "none",
32
+ children: [
33
+ /* @__PURE__ */ jsx7("g", { clipPath: "url(#send-clip)", children: /* @__PURE__ */ jsx7("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.3558 0.918873C18.3887 0.919879 18.4212 0.9224 18.4535 0.927663C18.4642 0.929393 18.4751 0.930348 18.4857 0.932545C18.527 0.941123 18.5675 0.953269 18.6068 0.968678C18.6178 0.972968 18.6282 0.978499 18.639 0.983327C18.6672 0.995914 18.6945 1.01021 18.7211 1.0263C18.7403 1.03794 18.7594 1.04988 18.7777 1.0634C18.7803 1.06534 18.7829 1.0673 18.7855 1.06926C18.8126 1.08979 18.839 1.11195 18.8637 1.13665C18.8872 1.16018 18.9084 1.18517 18.9281 1.21087C18.9322 1.21625 18.9359 1.22198 18.9398 1.22747C18.9501 1.24168 18.959 1.25667 18.9681 1.27141C18.9866 1.30108 19.0029 1.33154 19.017 1.36321C19.0214 1.37309 19.0267 1.38248 19.0306 1.39251C19.0461 1.43186 19.0581 1.47231 19.0668 1.5136C19.069 1.52426 19.0699 1.5351 19.0717 1.54583C19.077 1.57815 19.0794 1.61062 19.0805 1.64348C19.0808 1.65621 19.0817 1.66884 19.0814 1.68157C19.0799 1.75981 19.0681 1.83872 19.0414 1.91497L13.2074 18.581C13.1058 18.871 12.8377 19.0703 12.5306 19.0829C12.2237 19.0954 11.9398 18.9192 11.8148 18.6386L8.59706 11.4003L1.3617 8.18547C1.08085 8.06057 0.90492 7.77678 0.917368 7.46965C0.929915 7.16252 1.12827 6.89358 1.41834 6.79192L18.0853 0.958913C18.1613 0.932334 18.2398 0.919479 18.3178 0.917897C18.3305 0.91763 18.3431 0.918498 18.3558 0.918873ZM10.0609 10.999L12.4164 16.2997L16.5375 4.52239L10.0609 10.999ZM3.69862 7.58294L9.00038 9.93841L15.4808 3.45794L3.69862 7.58294Z", fill: "currentColor" }) }),
34
+ /* @__PURE__ */ jsx7("defs", { children: /* @__PURE__ */ jsx7("clipPath", { id: "send-clip", children: /* @__PURE__ */ jsx7("rect", { width: "20", height: "20", fill: "currentColor" }) }) })
35
+ ]
36
+ }
37
+ );
38
+ var SendIcon_default = SendIcon;
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/ChatInput/ChatInput.tsx
57
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
58
+ var MAX_HEIGHT = 200;
59
+ var ChatInput = React.forwardRef(
60
+ (props, ref) => {
61
+ const {
62
+ placeholder,
63
+ value: valueProp,
64
+ disabled = false,
65
+ buttonType = "primary",
66
+ onSubmit,
67
+ onChange
68
+ } = props;
69
+ const isControlled = valueProp !== void 0;
70
+ const [internalValue, setInternalValue] = React.useState("");
71
+ const value = isControlled ? valueProp : internalValue;
72
+ const hasText = value.trim().length > 0;
73
+ const textareaRef = React.useRef(null);
74
+ const setRefs = React.useCallback(
75
+ (el) => {
76
+ textareaRef.current = el;
77
+ if (typeof ref === "function") ref(el);
78
+ else if (ref) ref.current = el;
79
+ },
80
+ [ref]
81
+ );
82
+ const updateHeight = React.useCallback(() => {
83
+ const el = textareaRef.current;
84
+ if (!el) return;
85
+ el.style.height = "0px";
86
+ el.style.height = `${Math.min(el.scrollHeight, MAX_HEIGHT)}px`;
87
+ }, []);
88
+ const handleChange = (e) => {
89
+ const val = e.target.value;
90
+ if (!isControlled) setInternalValue(val);
91
+ onChange?.(val);
92
+ };
93
+ const handleSubmit = () => {
94
+ if (!hasText || disabled) return;
95
+ onSubmit?.(value);
96
+ if (!isControlled) setInternalValue("");
97
+ requestAnimationFrame(updateHeight);
98
+ };
99
+ const handleKeyDown = (e) => {
100
+ if (e.key === "Enter" && !e.shiftKey) {
101
+ e.preventDefault();
102
+ handleSubmit();
103
+ }
104
+ };
105
+ React.useEffect(() => {
106
+ updateHeight();
107
+ }, [value, updateHeight]);
108
+ return /* @__PURE__ */ jsxs4("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
109
+ /* @__PURE__ */ jsx8(
110
+ "textarea",
111
+ {
112
+ ref: setRefs,
113
+ className: "chat-input-textarea",
114
+ placeholder,
115
+ value,
116
+ disabled,
117
+ rows: 1,
118
+ onChange: handleChange,
119
+ onKeyDown: handleKeyDown
120
+ }
121
+ ),
122
+ /* @__PURE__ */ jsx8(
123
+ "button",
124
+ {
125
+ type: "button",
126
+ className: clsx_default("chat-input-send", `btn-${buttonType}`),
127
+ disabled: !hasText || disabled,
128
+ onClick: handleSubmit,
129
+ "aria-label": "\uC804\uC1A1",
130
+ children: /* @__PURE__ */ jsx8(SendIcon_default, {})
131
+ }
132
+ )
133
+ ] });
134
+ }
135
+ );
136
+ ChatInput.displayName = "ChatInput";
137
+ var ChatInput_default = ChatInput;
138
+ export {
139
+ ChatInput_default as ChatInput
140
+ };
@@ -53,12 +53,13 @@ var import_jsx_runtime = require("react/jsx-runtime");
53
53
  var Table = (props) => {
54
54
  const {
55
55
  children,
56
+ size = "md",
56
57
  rowBorderUse = true,
57
58
  colBorderUse = true,
58
59
  headerSticky = false,
59
60
  stickyShadow = true
60
61
  } = props;
61
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "lib-xplat-table-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `lib-xplat-table-wrapper ${size}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
63
  TableContext_default.Provider,
63
64
  {
64
65
  value: {
@@ -6,6 +6,27 @@
6
6
  position: relative;
7
7
  overflow: auto;
8
8
  }
9
+ .lib-xplat-table-wrapper.sm > .lib-xplat-table > thead > tr > th,
10
+ .lib-xplat-table-wrapper.sm > .lib-xplat-table > thead > tr > td,
11
+ .lib-xplat-table-wrapper.sm > .lib-xplat-table > tbody > tr > th,
12
+ .lib-xplat-table-wrapper.sm > .lib-xplat-table > tbody > tr > td {
13
+ padding: var(--spacing-space-1) var(--spacing-space-2);
14
+ font-size: 12px;
15
+ }
16
+ .lib-xplat-table-wrapper.md > .lib-xplat-table > thead > tr > th,
17
+ .lib-xplat-table-wrapper.md > .lib-xplat-table > thead > tr > td,
18
+ .lib-xplat-table-wrapper.md > .lib-xplat-table > tbody > tr > th,
19
+ .lib-xplat-table-wrapper.md > .lib-xplat-table > tbody > tr > td {
20
+ padding: var(--spacing-space-2) var(--spacing-space-3);
21
+ font-size: 14px;
22
+ }
23
+ .lib-xplat-table-wrapper.lg > .lib-xplat-table > thead > tr > th,
24
+ .lib-xplat-table-wrapper.lg > .lib-xplat-table > thead > tr > td,
25
+ .lib-xplat-table-wrapper.lg > .lib-xplat-table > tbody > tr > th,
26
+ .lib-xplat-table-wrapper.lg > .lib-xplat-table > tbody > tr > td {
27
+ padding: var(--spacing-space-3) var(--spacing-space-4);
28
+ font-size: 16px;
29
+ }
9
30
  .lib-xplat-table-wrapper > .lib-xplat-table {
10
31
  width: 100%;
11
32
  min-width: 600px;
@@ -66,6 +87,102 @@
66
87
  .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary.hover:hover > th {
67
88
  background-color: var(--semantic-surface-neutral-subtle);
68
89
  }
90
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.success,
91
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.success {
92
+ background-color: var(--semantic-surface-success-default);
93
+ }
94
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.success > td,
95
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.success > th,
96
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.success > td,
97
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.success > th {
98
+ color: var(--semantic-text-inverse);
99
+ background-color: var(--semantic-surface-success-default);
100
+ }
101
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.success > td.cell-hover:hover,
102
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.success > th.cell-hover:hover,
103
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.success > td.cell-hover:hover,
104
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.success > th.cell-hover:hover {
105
+ background-color: var(--semantic-surface-success-strong);
106
+ }
107
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.success.hover:hover > td,
108
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.success.hover:hover > th,
109
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.success.hover:hover > td,
110
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.success.hover:hover > th {
111
+ color: var(--semantic-text-inverse);
112
+ background-color: var(--semantic-surface-success-strong);
113
+ }
114
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.error,
115
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.error {
116
+ background-color: var(--semantic-surface-error-default);
117
+ }
118
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.error > td,
119
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.error > th,
120
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.error > td,
121
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.error > th {
122
+ color: var(--semantic-text-inverse);
123
+ background-color: var(--semantic-surface-error-default);
124
+ }
125
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.error > td.cell-hover:hover,
126
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.error > th.cell-hover:hover,
127
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.error > td.cell-hover:hover,
128
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.error > th.cell-hover:hover {
129
+ background-color: var(--semantic-surface-error-strong);
130
+ }
131
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.error.hover:hover > td,
132
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.error.hover:hover > th,
133
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.error.hover:hover > td,
134
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.error.hover:hover > th {
135
+ color: var(--semantic-text-inverse);
136
+ background-color: var(--semantic-surface-error-strong);
137
+ }
138
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.warning,
139
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.warning {
140
+ background-color: var(--semantic-surface-warning-default);
141
+ }
142
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.warning > td,
143
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.warning > th,
144
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.warning > td,
145
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.warning > th {
146
+ color: var(--semantic-text-strong);
147
+ background-color: var(--semantic-surface-warning-default);
148
+ }
149
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.warning > td.cell-hover:hover,
150
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.warning > th.cell-hover:hover,
151
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.warning > td.cell-hover:hover,
152
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.warning > th.cell-hover:hover {
153
+ background-color: var(--semantic-surface-warning-strong);
154
+ }
155
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.warning.hover:hover > td,
156
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.warning.hover:hover > th,
157
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.warning.hover:hover > td,
158
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.warning.hover:hover > th {
159
+ color: var(--semantic-text-strong);
160
+ background-color: var(--semantic-surface-warning-strong);
161
+ }
162
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.info,
163
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.info {
164
+ background-color: var(--semantic-surface-info-default);
165
+ }
166
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.info > td,
167
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.info > th,
168
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.info > td,
169
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.info > th {
170
+ color: var(--semantic-text-inverse);
171
+ background-color: var(--semantic-surface-info-default);
172
+ }
173
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.info > td.cell-hover:hover,
174
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.info > th.cell-hover:hover,
175
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.info > td.cell-hover:hover,
176
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.info > th.cell-hover:hover {
177
+ background-color: var(--semantic-surface-info-strong);
178
+ }
179
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.info.hover:hover > td,
180
+ .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.info.hover:hover > th,
181
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.info.hover:hover > td,
182
+ .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.info.hover:hover > th {
183
+ color: var(--semantic-text-inverse);
184
+ background-color: var(--semantic-surface-info-strong);
185
+ }
69
186
  .lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.clickable,
70
187
  .lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.clickable {
71
188
  cursor: pointer;
@@ -1,8 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React from 'react';
3
3
 
4
+ type TableSize = "sm" | "md" | "lg";
4
5
  interface TableProps {
5
6
  children: React.ReactNode;
7
+ size?: TableSize;
6
8
  rowBorderUse?: boolean;
7
9
  colBorderUse?: boolean;
8
10
  headerSticky?: boolean;
@@ -42,7 +44,7 @@ declare const TableHead: {
42
44
 
43
45
  interface TableRowProps {
44
46
  children: React.ReactNode;
45
- type?: "primary" | "secondary";
47
+ type?: "primary" | "secondary" | "success" | "error" | "warning" | "info";
46
48
  isHover?: boolean;
47
49
  onClick?: (e: React.MouseEvent<HTMLTableRowElement>) => void;
48
50
  }
@@ -1,8 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React from 'react';
3
3
 
4
+ type TableSize = "sm" | "md" | "lg";
4
5
  interface TableProps {
5
6
  children: React.ReactNode;
7
+ size?: TableSize;
6
8
  rowBorderUse?: boolean;
7
9
  colBorderUse?: boolean;
8
10
  headerSticky?: boolean;
@@ -42,7 +44,7 @@ declare const TableHead: {
42
44
 
43
45
  interface TableRowProps {
44
46
  children: React.ReactNode;
45
- type?: "primary" | "secondary";
47
+ type?: "primary" | "secondary" | "success" | "error" | "warning" | "info";
46
48
  isHover?: boolean;
47
49
  onClick?: (e: React.MouseEvent<HTMLTableRowElement>) => void;
48
50
  }
@@ -13,12 +13,13 @@ import { jsx } from "react/jsx-runtime";
13
13
  var Table = (props) => {
14
14
  const {
15
15
  children,
16
+ size = "md",
16
17
  rowBorderUse = true,
17
18
  colBorderUse = true,
18
19
  headerSticky = false,
19
20
  stickyShadow = true
20
21
  } = props;
21
- return /* @__PURE__ */ jsx("div", { className: "lib-xplat-table-wrapper", children: /* @__PURE__ */ jsx(
22
+ return /* @__PURE__ */ jsx("div", { className: `lib-xplat-table-wrapper ${size}`, children: /* @__PURE__ */ jsx(
22
23
  TableContext_default.Provider,
23
24
  {
24
25
  value: {