@x-plat/design-system 0.2.4 → 0.3.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.
- package/dist/{colors-cxE7RsuF.d.cts → colors-BgzpjYfN.d.cts} +3 -6
- package/dist/{colors-cxE7RsuF.d.ts → colors-BgzpjYfN.d.ts} +3 -6
- package/dist/components/Avatar/index.cjs +2 -14
- package/dist/components/Avatar/index.d.cts +3 -235
- package/dist/components/Avatar/index.d.ts +3 -235
- package/dist/components/Avatar/index.js +2 -14
- package/dist/components/Badge/index.cjs +2 -14
- package/dist/components/Badge/index.d.cts +3 -235
- package/dist/components/Badge/index.d.ts +3 -235
- package/dist/components/Badge/index.js +2 -14
- package/dist/components/Button/index.cjs +2 -14
- package/dist/components/Button/index.d.cts +3 -235
- package/dist/components/Button/index.d.ts +3 -235
- package/dist/components/Button/index.js +2 -14
- package/dist/components/CheckBox/index.cjs +2 -14
- package/dist/components/CheckBox/index.d.cts +3 -235
- package/dist/components/CheckBox/index.d.ts +3 -235
- package/dist/components/CheckBox/index.js +2 -14
- package/dist/components/Chip/index.cjs +2 -14
- package/dist/components/Chip/index.d.cts +3 -235
- package/dist/components/Chip/index.d.ts +3 -235
- package/dist/components/Chip/index.js +2 -14
- package/dist/components/DatePicker/index.cjs +9 -161
- package/dist/components/DatePicker/index.d.cts +5 -469
- package/dist/components/DatePicker/index.d.ts +5 -469
- package/dist/components/DatePicker/index.js +9 -161
- package/dist/components/Pagination/index.cjs +2 -14
- package/dist/components/Pagination/index.d.cts +3 -235
- package/dist/components/Pagination/index.d.ts +3 -235
- package/dist/components/Pagination/index.js +2 -14
- package/dist/components/Progress/index.cjs +2 -14
- package/dist/components/Progress/index.d.cts +3 -235
- package/dist/components/Progress/index.d.ts +3 -235
- package/dist/components/Progress/index.js +2 -14
- package/dist/components/Radio/index.cjs +2 -14
- package/dist/components/Radio/index.d.cts +3 -235
- package/dist/components/Radio/index.d.ts +3 -235
- package/dist/components/Radio/index.js +2 -14
- package/dist/components/Spinner/index.cjs +2 -14
- package/dist/components/Spinner/index.d.cts +3 -235
- package/dist/components/Spinner/index.d.ts +3 -235
- package/dist/components/Spinner/index.js +2 -14
- package/dist/components/Steps/index.cjs +2 -14
- package/dist/components/Steps/index.d.cts +3 -235
- package/dist/components/Steps/index.d.ts +3 -235
- package/dist/components/Steps/index.js +2 -14
- package/dist/components/Swiper/index.cjs +257 -5939
- package/dist/components/Swiper/index.css +52 -211
- package/dist/components/Swiper/index.d.cts +35 -16
- package/dist/components/Swiper/index.d.ts +35 -16
- package/dist/components/Swiper/index.js +251 -5944
- package/dist/components/Switch/index.cjs +2 -14
- package/dist/components/Switch/index.d.cts +3 -235
- package/dist/components/Switch/index.d.ts +3 -235
- package/dist/components/Switch/index.js +2 -14
- package/dist/components/Table/index.cjs +2 -16
- package/dist/components/Table/index.d.cts +3 -235
- package/dist/components/Table/index.d.ts +3 -235
- package/dist/components/Table/index.js +2 -16
- package/dist/components/Tag/index.cjs +2 -14
- package/dist/components/Tag/index.d.cts +3 -235
- package/dist/components/Tag/index.d.ts +3 -235
- package/dist/components/Tag/index.js +2 -14
- package/dist/components/Tooltip/index.cjs +2 -14
- package/dist/components/Tooltip/index.d.cts +3 -238
- package/dist/components/Tooltip/index.d.ts +3 -238
- package/dist/components/Tooltip/index.js +2 -14
- package/dist/components/index.cjs +390 -251
- package/dist/components/index.css +71 -0
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +390 -252
- package/dist/index.cjs +414 -275
- package/dist/index.css +71 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +414 -276
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/package.json +3 -9
|
@@ -12047,11 +12047,6 @@ var InputDatePicker_default = InputDatePicker;
|
|
|
12047
12047
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
12048
12048
|
var import_react10 = __toESM(require("react"), 1);
|
|
12049
12049
|
|
|
12050
|
-
// src/util/getColor.ts
|
|
12051
|
-
var getColorClass = (namespace, palette, shade) => {
|
|
12052
|
-
return `${String(namespace)}-${String(palette)}${shade !== void 0 ? `-${String(shade)}` : ""}`;
|
|
12053
|
-
};
|
|
12054
|
-
|
|
12055
12050
|
// src/components/Button/Button.tsx
|
|
12056
12051
|
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
12057
12052
|
var Button = (props) => {
|
|
@@ -12059,19 +12054,12 @@ var Button = (props) => {
|
|
|
12059
12054
|
children,
|
|
12060
12055
|
type = "primary",
|
|
12061
12056
|
size: size4 = "md",
|
|
12062
|
-
|
|
12063
|
-
color = "black",
|
|
12064
|
-
colorDepth,
|
|
12065
|
-
colorToken,
|
|
12057
|
+
color = "xplat-black",
|
|
12066
12058
|
disabled,
|
|
12067
12059
|
className,
|
|
12068
12060
|
...rest
|
|
12069
12061
|
} = props;
|
|
12070
|
-
const colorClass =
|
|
12071
|
-
colorNamespace,
|
|
12072
|
-
color,
|
|
12073
|
-
colorDepth ?? 500
|
|
12074
|
-
);
|
|
12062
|
+
const colorClass = color;
|
|
12075
12063
|
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
12076
12064
|
"button",
|
|
12077
12065
|
{
|
|
@@ -12131,140 +12119,13 @@ var Modal = (props) => {
|
|
|
12131
12119
|
Modal.displayName = "Modal";
|
|
12132
12120
|
var Modal_default = Modal;
|
|
12133
12121
|
|
|
12134
|
-
// src/tokens/colors.ts
|
|
12135
|
-
var colors = {
|
|
12136
|
-
xplat: {
|
|
12137
|
-
red: {
|
|
12138
|
-
50: "#FFF0F0",
|
|
12139
|
-
100: "#FFDDDE",
|
|
12140
|
-
200: "#FFC1C2",
|
|
12141
|
-
300: "#FF9698",
|
|
12142
|
-
400: "#FF5A5D",
|
|
12143
|
-
500: "#FF272B",
|
|
12144
|
-
600: "#F80409",
|
|
12145
|
-
700: "#D40105",
|
|
12146
|
-
800: "#AE0609",
|
|
12147
|
-
900: "#900C0F"
|
|
12148
|
-
},
|
|
12149
|
-
green: {
|
|
12150
|
-
50: "#E5F6EA",
|
|
12151
|
-
100: "#C1E7CC",
|
|
12152
|
-
200: "#98D8AC",
|
|
12153
|
-
300: "#6CCA8B",
|
|
12154
|
-
400: "#47BE72",
|
|
12155
|
-
500: "#10B259",
|
|
12156
|
-
600: "#00A34F",
|
|
12157
|
-
700: "#009143",
|
|
12158
|
-
800: "#007F38",
|
|
12159
|
-
900: "#006024"
|
|
12160
|
-
},
|
|
12161
|
-
orange: {
|
|
12162
|
-
50: "#FFF8EC",
|
|
12163
|
-
100: "#FFF0D3",
|
|
12164
|
-
200: "#FFDDA5",
|
|
12165
|
-
300: "#FFC46D",
|
|
12166
|
-
400: "#FF9F32",
|
|
12167
|
-
500: "#FF820A",
|
|
12168
|
-
600: "#FF6900",
|
|
12169
|
-
700: "#CC4B02",
|
|
12170
|
-
800: "#A13A0B",
|
|
12171
|
-
900: "#82320C"
|
|
12172
|
-
},
|
|
12173
|
-
yellow: {
|
|
12174
|
-
50: "#FFFDE7",
|
|
12175
|
-
100: "#FFFAC1",
|
|
12176
|
-
200: "#FFF186",
|
|
12177
|
-
300: "#FFE041",
|
|
12178
|
-
400: "#FFCC0D",
|
|
12179
|
-
500: "#F0B100",
|
|
12180
|
-
600: "#D18800",
|
|
12181
|
-
700: "#A66002",
|
|
12182
|
-
800: "#894B0A",
|
|
12183
|
-
900: "#743D0F"
|
|
12184
|
-
},
|
|
12185
|
-
blue: {
|
|
12186
|
-
50: "#F1F4FD",
|
|
12187
|
-
100: "#DFE7FA",
|
|
12188
|
-
200: "#C5D4F8",
|
|
12189
|
-
300: "#9EB8F2",
|
|
12190
|
-
400: "#7093EA",
|
|
12191
|
-
500: "#4D6DE3",
|
|
12192
|
-
600: "#3950D7",
|
|
12193
|
-
700: "#303EC5",
|
|
12194
|
-
800: "#2D35A0",
|
|
12195
|
-
900: "#29317F"
|
|
12196
|
-
},
|
|
12197
|
-
lightblue: {
|
|
12198
|
-
50: "#EEFAFF",
|
|
12199
|
-
100: "#D9F4FF",
|
|
12200
|
-
200: "#BBEDFF",
|
|
12201
|
-
300: "#8DE3FF",
|
|
12202
|
-
400: "#57D0FF",
|
|
12203
|
-
500: "#30B6FF",
|
|
12204
|
-
600: "#1999F7",
|
|
12205
|
-
700: "#1280E3",
|
|
12206
|
-
800: "#1566B8",
|
|
12207
|
-
900: "#175791"
|
|
12208
|
-
},
|
|
12209
|
-
purple: {
|
|
12210
|
-
50: "#FBF6FE",
|
|
12211
|
-
100: "#F5EAFD",
|
|
12212
|
-
200: "#EDD8FC",
|
|
12213
|
-
300: "#E0BAF8",
|
|
12214
|
-
400: "#CD8DF3",
|
|
12215
|
-
500: "#B961EB",
|
|
12216
|
-
600: "#A541DC",
|
|
12217
|
-
700: "#9230C5",
|
|
12218
|
-
800: "#782B9E",
|
|
12219
|
-
900: "#62247F"
|
|
12220
|
-
},
|
|
12221
|
-
pink: {
|
|
12222
|
-
50: "#FFF4FE",
|
|
12223
|
-
100: "#FFE7FD",
|
|
12224
|
-
200: "#FFCFFA",
|
|
12225
|
-
300: "#FEA9F1",
|
|
12226
|
-
400: "#FD75E7",
|
|
12227
|
-
500: "#F553DA",
|
|
12228
|
-
600: "#D821B6",
|
|
12229
|
-
700: "#B31892",
|
|
12230
|
-
800: "#921676",
|
|
12231
|
-
900: "#781761"
|
|
12232
|
-
},
|
|
12233
|
-
neutral: {
|
|
12234
|
-
50: "#FAFAFA",
|
|
12235
|
-
100: "#F5F5F5",
|
|
12236
|
-
200: "#E5E5E5",
|
|
12237
|
-
300: "#D4D4D4",
|
|
12238
|
-
400: "#A1A1A1",
|
|
12239
|
-
500: "#737373",
|
|
12240
|
-
600: "#525252",
|
|
12241
|
-
700: "#404040",
|
|
12242
|
-
800: "#262626",
|
|
12243
|
-
900: "#171717"
|
|
12244
|
-
},
|
|
12245
|
-
black: "#000000",
|
|
12246
|
-
white: "#FFFFFF"
|
|
12247
|
-
},
|
|
12248
|
-
test: {
|
|
12249
|
-
default: "#ffffff"
|
|
12250
|
-
}
|
|
12251
|
-
};
|
|
12252
|
-
|
|
12253
12122
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
12254
12123
|
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
12255
|
-
function getColorValue(ns, color, depth) {
|
|
12256
|
-
const nsColors = colors[ns];
|
|
12257
|
-
const colorEntry = nsColors[color];
|
|
12258
|
-
if (typeof colorEntry === "string") return colorEntry;
|
|
12259
|
-
return colorEntry[String(depth)] ?? "";
|
|
12260
|
-
}
|
|
12261
12124
|
var SingleDatePicker = (props) => {
|
|
12262
12125
|
const {
|
|
12263
12126
|
value,
|
|
12264
12127
|
onChange,
|
|
12265
|
-
|
|
12266
|
-
color = "blue",
|
|
12267
|
-
colorDepth,
|
|
12128
|
+
color = "xplat-blue-500",
|
|
12268
12129
|
highlightDates,
|
|
12269
12130
|
...rest
|
|
12270
12131
|
} = props;
|
|
@@ -12272,16 +12133,11 @@ var SingleDatePicker = (props) => {
|
|
|
12272
12133
|
if (Array.isArray(date)) return;
|
|
12273
12134
|
onChange?.(date);
|
|
12274
12135
|
};
|
|
12275
|
-
const activeColor = getColorValue(
|
|
12276
|
-
colorNamespace,
|
|
12277
|
-
color,
|
|
12278
|
-
colorDepth ?? 500
|
|
12279
|
-
);
|
|
12280
12136
|
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
12281
12137
|
"div",
|
|
12282
12138
|
{
|
|
12283
12139
|
className: "lib-xplat-datepicker",
|
|
12284
|
-
style: { "--datepicker-active-color":
|
|
12140
|
+
style: { "--datepicker-active-color": `var(--${color})` },
|
|
12285
12141
|
children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
12286
12142
|
DatePicker,
|
|
12287
12143
|
{
|
|
@@ -12339,13 +12195,12 @@ var PopupPicker = (props) => {
|
|
|
12339
12195
|
Button_default,
|
|
12340
12196
|
{
|
|
12341
12197
|
type: "secondary",
|
|
12342
|
-
color: "neutral",
|
|
12343
|
-
colorDepth: 400,
|
|
12198
|
+
color: "xplat-neutral-400",
|
|
12344
12199
|
onClick: handleClose,
|
|
12345
12200
|
children: "\uCDE8\uC18C"
|
|
12346
12201
|
}
|
|
12347
12202
|
),
|
|
12348
|
-
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Button_default, { type: "primary", color: "blue", onClick: handleClose, children: "\uC801\uC6A9" })
|
|
12203
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Button_default, { type: "primary", color: "xplat-blue-500", onClick: handleClose, children: "\uC801\uC6A9" })
|
|
12349
12204
|
] })
|
|
12350
12205
|
] }) })
|
|
12351
12206
|
] });
|
|
@@ -12375,19 +12230,12 @@ var RangePicker = (props) => {
|
|
|
12375
12230
|
onChange,
|
|
12376
12231
|
minDate,
|
|
12377
12232
|
maxDate,
|
|
12378
|
-
|
|
12379
|
-
color,
|
|
12380
|
-
colorDepth
|
|
12233
|
+
color
|
|
12381
12234
|
} = props;
|
|
12382
12235
|
const rangeDates = import_react11.default.useMemo(
|
|
12383
12236
|
() => getDatesBetween(startDate, endDate),
|
|
12384
12237
|
[startDate, endDate]
|
|
12385
12238
|
);
|
|
12386
|
-
const colorProps = {
|
|
12387
|
-
...colorNamespace !== void 0 && { colorNamespace },
|
|
12388
|
-
...color !== void 0 && { color },
|
|
12389
|
-
...colorDepth !== void 0 && { colorDepth }
|
|
12390
|
-
};
|
|
12391
12239
|
return /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: "lib-xplat-range-datepicker", children: [
|
|
12392
12240
|
/* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: "lib-xplat-range-datepicker-from", children: [
|
|
12393
12241
|
/* @__PURE__ */ (0, import_jsx_runtime304.jsx)("span", { className: "lib-xplat-range-datepicker-label", children: "\uC2DC\uC791" }),
|
|
@@ -12399,7 +12247,7 @@ var RangePicker = (props) => {
|
|
|
12399
12247
|
minDate,
|
|
12400
12248
|
maxDate: endDate,
|
|
12401
12249
|
highlightDates: rangeDates,
|
|
12402
|
-
|
|
12250
|
+
color
|
|
12403
12251
|
}
|
|
12404
12252
|
)
|
|
12405
12253
|
] }),
|
|
@@ -12413,7 +12261,7 @@ var RangePicker = (props) => {
|
|
|
12413
12261
|
minDate: startDate,
|
|
12414
12262
|
maxDate,
|
|
12415
12263
|
highlightDates: rangeDates,
|
|
12416
|
-
|
|
12264
|
+
color
|
|
12417
12265
|
}
|
|
12418
12266
|
)
|
|
12419
12267
|
] })
|