@x-plat/design-system 0.7.2 → 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.
- package/dist/components/AutoResizeTextArea/index.css +2 -0
- package/dist/components/Button/index.css +2 -1
- package/dist/components/Button/index.d.cts +6 -0
- package/dist/components/Button/index.d.ts +6 -0
- package/dist/components/Chart/index.cjs +8 -1
- package/dist/components/Chart/index.js +8 -1
- package/dist/components/ChatInput/index.css +4 -0
- package/dist/components/DatePicker/index.css +4 -1
- package/dist/components/Input/index.css +2 -0
- package/dist/components/Link/index.cjs +64 -0
- package/dist/components/Link/index.css +25 -0
- package/dist/components/Link/index.d.cts +27 -0
- package/dist/components/Link/index.d.ts +27 -0
- package/dist/components/Link/index.js +37 -0
- package/dist/components/LinkButton/index.cjs +64 -0
- package/dist/components/LinkButton/index.css +106 -0
- package/dist/components/LinkButton/index.d.cts +28 -0
- package/dist/components/LinkButton/index.d.ts +28 -0
- package/dist/components/LinkButton/index.js +37 -0
- package/dist/components/TextArea/index.css +2 -0
- package/dist/components/Tooltip/index.cjs +77 -32
- package/dist/components/Tooltip/index.d.cts +10 -2
- package/dist/components/Tooltip/index.d.ts +10 -2
- package/dist/components/Tooltip/index.js +77 -32
- package/dist/components/index.cjs +247 -153
- package/dist/components/index.css +36 -1
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +222 -130
- package/dist/index.cjs +266 -172
- package/dist/index.css +36 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +239 -147
- package/guidelines/AGENT_PROMPT.md +2 -2
- package/guidelines/Guidelines.md +2 -1
- package/guidelines/components/button.md +54 -0
- package/guidelines/components/card.md +15 -19
- package/guidelines/components/link.md +35 -0
- package/guidelines/components/overlay.md +30 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -216,7 +216,9 @@ __export(index_exports, {
|
|
|
216
216
|
Layout: () => Layout_default,
|
|
217
217
|
LayoutIcon: () => LayoutIcon_default,
|
|
218
218
|
LifeBuoyIcon: () => LifeBuoyIcon_default,
|
|
219
|
+
Link: () => Link_default,
|
|
219
220
|
Link2Icon: () => Link2Icon_default,
|
|
221
|
+
LinkButton: () => LinkButton_default,
|
|
220
222
|
LinkIcon: () => LinkIcon_default,
|
|
221
223
|
LinkedinIcon: () => LinkedinIcon_default,
|
|
222
224
|
ListIcon: () => ListIcon_default,
|
|
@@ -6699,9 +6701,16 @@ var useChartTooltip = (enabled) => {
|
|
|
6699
6701
|
}, []);
|
|
6700
6702
|
return { tooltip, show, hide, move, containerRef };
|
|
6701
6703
|
};
|
|
6704
|
+
var formatTick = (value, maxVal) => {
|
|
6705
|
+
const step = maxVal / 4;
|
|
6706
|
+
if (!Number.isFinite(step) || step <= 0) return "0";
|
|
6707
|
+
const decimals = step >= 1 ? 0 : Math.min(4, Math.ceil(-Math.log10(step)));
|
|
6708
|
+
const fixed = value.toFixed(decimals);
|
|
6709
|
+
return decimals === 0 ? Number(fixed).toLocaleString("en-US") : fixed;
|
|
6710
|
+
};
|
|
6702
6711
|
var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_jsx_runtime305.Fragment, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
6703
6712
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
6704
|
-
const val =
|
|
6713
|
+
const val = formatTick(maxVal * ratio, maxVal);
|
|
6705
6714
|
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
|
|
6706
6715
|
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
6707
6716
|
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
@@ -9312,8 +9321,46 @@ var ImageSelector = (props) => {
|
|
|
9312
9321
|
ImageSelector.displayName = "ImageSelector";
|
|
9313
9322
|
var ImageSelector_default = ImageSelector;
|
|
9314
9323
|
|
|
9315
|
-
// src/components/
|
|
9324
|
+
// src/components/Link/Link.tsx
|
|
9316
9325
|
var import_jsx_runtime329 = require("react/jsx-runtime");
|
|
9326
|
+
var Link = (props) => {
|
|
9327
|
+
const { children, href, underline = "always", target, rel, ...rest } = props;
|
|
9328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
|
|
9329
|
+
"a",
|
|
9330
|
+
{
|
|
9331
|
+
className: clsx_default("lib-xplat-link", `underline-${underline}`),
|
|
9332
|
+
href,
|
|
9333
|
+
target,
|
|
9334
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
9335
|
+
...rest,
|
|
9336
|
+
children
|
|
9337
|
+
}
|
|
9338
|
+
);
|
|
9339
|
+
};
|
|
9340
|
+
Link.displayName = "Link";
|
|
9341
|
+
var Link_default = Link;
|
|
9342
|
+
|
|
9343
|
+
// src/components/LinkButton/LinkButton.tsx
|
|
9344
|
+
var import_jsx_runtime330 = require("react/jsx-runtime");
|
|
9345
|
+
var LinkButton = (props) => {
|
|
9346
|
+
const { children, href, type = "primary", size = "md", target, rel, ...rest } = props;
|
|
9347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
|
|
9348
|
+
"a",
|
|
9349
|
+
{
|
|
9350
|
+
className: clsx_default("lib-xplat-button", type, size),
|
|
9351
|
+
href,
|
|
9352
|
+
target,
|
|
9353
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
9354
|
+
...rest,
|
|
9355
|
+
children
|
|
9356
|
+
}
|
|
9357
|
+
);
|
|
9358
|
+
};
|
|
9359
|
+
LinkButton.displayName = "LinkButton";
|
|
9360
|
+
var LinkButton_default = LinkButton;
|
|
9361
|
+
|
|
9362
|
+
// src/components/NotificationBadge/NotificationBadge.tsx
|
|
9363
|
+
var import_jsx_runtime331 = require("react/jsx-runtime");
|
|
9317
9364
|
var NotificationBadge = (props) => {
|
|
9318
9365
|
const {
|
|
9319
9366
|
children,
|
|
@@ -9325,16 +9372,16 @@ var NotificationBadge = (props) => {
|
|
|
9325
9372
|
} = props;
|
|
9326
9373
|
const showBadge = dot || count !== void 0 && count > 0;
|
|
9327
9374
|
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
9328
|
-
return /* @__PURE__ */ (0,
|
|
9375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
|
|
9329
9376
|
children,
|
|
9330
|
-
showBadge && /* @__PURE__ */ (0,
|
|
9377
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
9331
9378
|
] });
|
|
9332
9379
|
};
|
|
9333
9380
|
NotificationBadge.displayName = "NotificationBadge";
|
|
9334
9381
|
var NotificationBadge_default = NotificationBadge;
|
|
9335
9382
|
|
|
9336
9383
|
// src/components/Pagination/Pagination.tsx
|
|
9337
|
-
var
|
|
9384
|
+
var import_jsx_runtime332 = require("react/jsx-runtime");
|
|
9338
9385
|
var getPageRange = (current, totalPages, siblingCount) => {
|
|
9339
9386
|
const totalNumbers = siblingCount * 2 + 5;
|
|
9340
9387
|
if (totalPages <= totalNumbers) {
|
|
@@ -9377,19 +9424,19 @@ var Pagination = (props) => {
|
|
|
9377
9424
|
onChange?.(page);
|
|
9378
9425
|
}
|
|
9379
9426
|
};
|
|
9380
|
-
return /* @__PURE__ */ (0,
|
|
9381
|
-
/* @__PURE__ */ (0,
|
|
9427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
9428
|
+
/* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
|
|
9382
9429
|
"button",
|
|
9383
9430
|
{
|
|
9384
9431
|
className: "page-btn prev",
|
|
9385
9432
|
disabled: current <= 1,
|
|
9386
9433
|
onClick: () => handleClick(current - 1),
|
|
9387
9434
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
9388
|
-
children: /* @__PURE__ */ (0,
|
|
9435
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(ChevronLeftIcon_default, {})
|
|
9389
9436
|
}
|
|
9390
9437
|
),
|
|
9391
9438
|
pages.map(
|
|
9392
|
-
(page, i) => page === "..." ? /* @__PURE__ */ (0,
|
|
9439
|
+
(page, i) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
|
|
9393
9440
|
"button",
|
|
9394
9441
|
{
|
|
9395
9442
|
className: clsx_default("page-btn", { active: page === current }),
|
|
@@ -9400,14 +9447,14 @@ var Pagination = (props) => {
|
|
|
9400
9447
|
page
|
|
9401
9448
|
)
|
|
9402
9449
|
),
|
|
9403
|
-
/* @__PURE__ */ (0,
|
|
9450
|
+
/* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
|
|
9404
9451
|
"button",
|
|
9405
9452
|
{
|
|
9406
9453
|
className: "page-btn next",
|
|
9407
9454
|
disabled: current >= totalPages,
|
|
9408
9455
|
onClick: () => handleClick(current + 1),
|
|
9409
9456
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
9410
|
-
children: /* @__PURE__ */ (0,
|
|
9457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(ChevronRightIcon_default, {})
|
|
9411
9458
|
}
|
|
9412
9459
|
)
|
|
9413
9460
|
] });
|
|
@@ -9417,7 +9464,7 @@ var Pagination_default = Pagination;
|
|
|
9417
9464
|
|
|
9418
9465
|
// src/components/PopOver/PopOver.tsx
|
|
9419
9466
|
var import_react28 = __toESM(require("react"), 1);
|
|
9420
|
-
var
|
|
9467
|
+
var import_jsx_runtime333 = require("react/jsx-runtime");
|
|
9421
9468
|
var PopOver = (props) => {
|
|
9422
9469
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
9423
9470
|
const popRef = import_react28.default.useRef(null);
|
|
@@ -9439,7 +9486,7 @@ var PopOver = (props) => {
|
|
|
9439
9486
|
}, 200);
|
|
9440
9487
|
}
|
|
9441
9488
|
}, [isOpen]);
|
|
9442
|
-
return /* @__PURE__ */ (0,
|
|
9489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)(
|
|
9443
9490
|
"div",
|
|
9444
9491
|
{
|
|
9445
9492
|
className: "lib-xplat-pop-over",
|
|
@@ -9449,7 +9496,7 @@ var PopOver = (props) => {
|
|
|
9449
9496
|
},
|
|
9450
9497
|
children: [
|
|
9451
9498
|
children,
|
|
9452
|
-
localOpen && /* @__PURE__ */ (0,
|
|
9499
|
+
localOpen && /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
|
|
9453
9500
|
"div",
|
|
9454
9501
|
{
|
|
9455
9502
|
className: clsx_default(
|
|
@@ -9472,7 +9519,7 @@ PopOver.displayName = "PopOver";
|
|
|
9472
9519
|
var PopOver_default = PopOver;
|
|
9473
9520
|
|
|
9474
9521
|
// src/components/Progress/Progress.tsx
|
|
9475
|
-
var
|
|
9522
|
+
var import_jsx_runtime334 = require("react/jsx-runtime");
|
|
9476
9523
|
var Progress = (props) => {
|
|
9477
9524
|
const {
|
|
9478
9525
|
value,
|
|
@@ -9482,8 +9529,8 @@ var Progress = (props) => {
|
|
|
9482
9529
|
showLabel = false
|
|
9483
9530
|
} = props;
|
|
9484
9531
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
9485
|
-
return /* @__PURE__ */ (0,
|
|
9486
|
-
/* @__PURE__ */ (0,
|
|
9532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
|
|
9533
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
9487
9534
|
"div",
|
|
9488
9535
|
{
|
|
9489
9536
|
className: "track",
|
|
@@ -9491,7 +9538,7 @@ var Progress = (props) => {
|
|
|
9491
9538
|
"aria-valuenow": value,
|
|
9492
9539
|
"aria-valuemin": 0,
|
|
9493
9540
|
"aria-valuemax": max,
|
|
9494
|
-
children: /* @__PURE__ */ (0,
|
|
9541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
9495
9542
|
"div",
|
|
9496
9543
|
{
|
|
9497
9544
|
className: "bar",
|
|
@@ -9500,7 +9547,7 @@ var Progress = (props) => {
|
|
|
9500
9547
|
)
|
|
9501
9548
|
}
|
|
9502
9549
|
),
|
|
9503
|
-
showLabel && /* @__PURE__ */ (0,
|
|
9550
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("span", { className: "label", children: [
|
|
9504
9551
|
Math.round(percentage),
|
|
9505
9552
|
"%"
|
|
9506
9553
|
] })
|
|
@@ -9520,7 +9567,7 @@ var useRadioGroupContext = () => {
|
|
|
9520
9567
|
var RadioGroupContext_default = RadioGroupContext;
|
|
9521
9568
|
|
|
9522
9569
|
// src/components/Radio/Radio.tsx
|
|
9523
|
-
var
|
|
9570
|
+
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
9524
9571
|
var Radio = (props) => {
|
|
9525
9572
|
const {
|
|
9526
9573
|
label,
|
|
@@ -9539,7 +9586,7 @@ var Radio = (props) => {
|
|
|
9539
9586
|
value,
|
|
9540
9587
|
onChange: rest.onChange
|
|
9541
9588
|
};
|
|
9542
|
-
return /* @__PURE__ */ (0,
|
|
9589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(
|
|
9543
9590
|
"label",
|
|
9544
9591
|
{
|
|
9545
9592
|
className: clsx_default(
|
|
@@ -9550,18 +9597,18 @@ var Radio = (props) => {
|
|
|
9550
9597
|
className
|
|
9551
9598
|
),
|
|
9552
9599
|
children: [
|
|
9553
|
-
/* @__PURE__ */ (0,
|
|
9554
|
-
/* @__PURE__ */ (0,
|
|
9600
|
+
/* @__PURE__ */ (0, import_jsx_runtime335.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
9601
|
+
/* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
|
|
9555
9602
|
"div",
|
|
9556
9603
|
{
|
|
9557
9604
|
className: clsx_default(
|
|
9558
9605
|
"circle",
|
|
9559
9606
|
localChecked ? "checked" : void 0
|
|
9560
9607
|
),
|
|
9561
|
-
children: localChecked && /* @__PURE__ */ (0,
|
|
9608
|
+
children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "inner-circle" })
|
|
9562
9609
|
}
|
|
9563
9610
|
),
|
|
9564
|
-
label && /* @__PURE__ */ (0,
|
|
9611
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("span", { children: label })
|
|
9565
9612
|
]
|
|
9566
9613
|
}
|
|
9567
9614
|
);
|
|
@@ -9570,10 +9617,10 @@ Radio.displayName = "Radio";
|
|
|
9570
9617
|
var Radio_default = Radio;
|
|
9571
9618
|
|
|
9572
9619
|
// src/components/Radio/RadioGroup.tsx
|
|
9573
|
-
var
|
|
9620
|
+
var import_jsx_runtime336 = require("react/jsx-runtime");
|
|
9574
9621
|
var RadioGroup = (props) => {
|
|
9575
9622
|
const { children, ...rest } = props;
|
|
9576
|
-
return /* @__PURE__ */ (0,
|
|
9623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(import_jsx_runtime336.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
9577
9624
|
};
|
|
9578
9625
|
RadioGroup.displayName = "RadioGroup";
|
|
9579
9626
|
var RadioGroup_default = RadioGroup;
|
|
@@ -9588,7 +9635,7 @@ var context_default = SelectContext;
|
|
|
9588
9635
|
|
|
9589
9636
|
// src/components/Select/SelectItem.tsx
|
|
9590
9637
|
var import_react31 = __toESM(require("react"), 1);
|
|
9591
|
-
var
|
|
9638
|
+
var import_jsx_runtime337 = require("react/jsx-runtime");
|
|
9592
9639
|
var SelectItem = (props) => {
|
|
9593
9640
|
const { children, value, onClick, disabled = false } = props;
|
|
9594
9641
|
const ctx = import_react31.default.useContext(context_default);
|
|
@@ -9601,7 +9648,7 @@ var SelectItem = (props) => {
|
|
|
9601
9648
|
onClick?.();
|
|
9602
9649
|
};
|
|
9603
9650
|
const isSelected = value !== void 0 ? ctx?.selectedValue === value : ctx?.selectedLabel === children;
|
|
9604
|
-
return /* @__PURE__ */ (0,
|
|
9651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
|
|
9605
9652
|
"div",
|
|
9606
9653
|
{
|
|
9607
9654
|
className: clsx_default("select-item", disabled && "disabled", isSelected && "is-selected"),
|
|
@@ -9622,7 +9669,7 @@ SelectItem.displayName = "Select.Item";
|
|
|
9622
9669
|
var SelectItem_default = SelectItem;
|
|
9623
9670
|
|
|
9624
9671
|
// src/components/Select/Select.tsx
|
|
9625
|
-
var
|
|
9672
|
+
var import_jsx_runtime338 = require("react/jsx-runtime");
|
|
9626
9673
|
var ANIMATION_DURATION_MS3 = 200;
|
|
9627
9674
|
var SelectRoot = (props) => {
|
|
9628
9675
|
const {
|
|
@@ -9702,7 +9749,7 @@ var SelectRoot = (props) => {
|
|
|
9702
9749
|
if (disabled) return;
|
|
9703
9750
|
toggle();
|
|
9704
9751
|
};
|
|
9705
|
-
return /* @__PURE__ */ (0,
|
|
9752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(
|
|
9706
9753
|
"div",
|
|
9707
9754
|
{
|
|
9708
9755
|
className: clsx_default(
|
|
@@ -9713,7 +9760,7 @@ var SelectRoot = (props) => {
|
|
|
9713
9760
|
mounted && "is-open"
|
|
9714
9761
|
),
|
|
9715
9762
|
children: [
|
|
9716
|
-
/* @__PURE__ */ (0,
|
|
9763
|
+
/* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(
|
|
9717
9764
|
"div",
|
|
9718
9765
|
{
|
|
9719
9766
|
ref: triggerRef,
|
|
@@ -9737,7 +9784,7 @@ var SelectRoot = (props) => {
|
|
|
9737
9784
|
}
|
|
9738
9785
|
},
|
|
9739
9786
|
children: [
|
|
9740
|
-
/* @__PURE__ */ (0,
|
|
9787
|
+
/* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
|
|
9741
9788
|
"span",
|
|
9742
9789
|
{
|
|
9743
9790
|
className: clsx_default(
|
|
@@ -9747,25 +9794,25 @@ var SelectRoot = (props) => {
|
|
|
9747
9794
|
children: selectedLabel ?? placeholder
|
|
9748
9795
|
}
|
|
9749
9796
|
),
|
|
9750
|
-
/* @__PURE__ */ (0,
|
|
9797
|
+
/* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
|
|
9751
9798
|
"span",
|
|
9752
9799
|
{
|
|
9753
9800
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
9754
9801
|
"aria-hidden": true,
|
|
9755
|
-
children: /* @__PURE__ */ (0,
|
|
9802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(ChevronDownIcon_default, {})
|
|
9756
9803
|
}
|
|
9757
9804
|
)
|
|
9758
9805
|
]
|
|
9759
9806
|
}
|
|
9760
9807
|
),
|
|
9761
|
-
mounted && /* @__PURE__ */ (0,
|
|
9808
|
+
mounted && /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
|
|
9762
9809
|
"div",
|
|
9763
9810
|
{
|
|
9764
9811
|
className: clsx_default("lib-xplat-select-content", size, position.direction, stateClass),
|
|
9765
9812
|
ref: contentRef,
|
|
9766
9813
|
style: { ...position.position, width: triggerRef.current?.offsetWidth },
|
|
9767
9814
|
role: "listbox",
|
|
9768
|
-
children: /* @__PURE__ */ (0,
|
|
9815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(context_default.Provider, { value: ctxValue, children: itemChildren })
|
|
9769
9816
|
}
|
|
9770
9817
|
) })
|
|
9771
9818
|
]
|
|
@@ -9779,7 +9826,7 @@ var Select = Object.assign(SelectRoot, {
|
|
|
9779
9826
|
var Select_default = Select;
|
|
9780
9827
|
|
|
9781
9828
|
// src/components/Skeleton/Skeleton.tsx
|
|
9782
|
-
var
|
|
9829
|
+
var import_jsx_runtime339 = require("react/jsx-runtime");
|
|
9783
9830
|
var SIZE_MAP = {
|
|
9784
9831
|
xs: "var(--spacing-space-1)",
|
|
9785
9832
|
sm: "var(--spacing-space-2)",
|
|
@@ -9795,7 +9842,7 @@ var Skeleton = (props) => {
|
|
|
9795
9842
|
...width != null && { width: SIZE_MAP[width] },
|
|
9796
9843
|
...height != null && { height: SIZE_MAP[height] }
|
|
9797
9844
|
};
|
|
9798
|
-
return /* @__PURE__ */ (0,
|
|
9845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
|
|
9799
9846
|
"div",
|
|
9800
9847
|
{
|
|
9801
9848
|
className: clsx_default("lib-xplat-skeleton", variant),
|
|
@@ -9808,20 +9855,20 @@ Skeleton.displayName = "Skeleton";
|
|
|
9808
9855
|
var Skeleton_default = Skeleton;
|
|
9809
9856
|
|
|
9810
9857
|
// src/components/Spinner/Spinner.tsx
|
|
9811
|
-
var
|
|
9858
|
+
var import_jsx_runtime340 = require("react/jsx-runtime");
|
|
9812
9859
|
var Spinner = (props) => {
|
|
9813
9860
|
const {
|
|
9814
9861
|
size = "md",
|
|
9815
9862
|
type = "brand"
|
|
9816
9863
|
} = props;
|
|
9817
|
-
return /* @__PURE__ */ (0,
|
|
9864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(
|
|
9818
9865
|
"div",
|
|
9819
9866
|
{
|
|
9820
9867
|
className: clsx_default("lib-xplat-spinner", size, type),
|
|
9821
9868
|
role: "status",
|
|
9822
9869
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
9823
|
-
children: /* @__PURE__ */ (0,
|
|
9824
|
-
/* @__PURE__ */ (0,
|
|
9870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime340.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
9871
|
+
/* @__PURE__ */ (0, import_jsx_runtime340.jsx)(
|
|
9825
9872
|
"circle",
|
|
9826
9873
|
{
|
|
9827
9874
|
className: "track",
|
|
@@ -9831,7 +9878,7 @@ var Spinner = (props) => {
|
|
|
9831
9878
|
strokeWidth: "3"
|
|
9832
9879
|
}
|
|
9833
9880
|
),
|
|
9834
|
-
/* @__PURE__ */ (0,
|
|
9881
|
+
/* @__PURE__ */ (0, import_jsx_runtime340.jsx)(
|
|
9835
9882
|
"circle",
|
|
9836
9883
|
{
|
|
9837
9884
|
className: "indicator",
|
|
@@ -9850,20 +9897,20 @@ Spinner.displayName = "Spinner";
|
|
|
9850
9897
|
var Spinner_default = Spinner;
|
|
9851
9898
|
|
|
9852
9899
|
// src/components/Steps/Steps.tsx
|
|
9853
|
-
var
|
|
9900
|
+
var import_jsx_runtime341 = require("react/jsx-runtime");
|
|
9854
9901
|
var Steps = (props) => {
|
|
9855
9902
|
const {
|
|
9856
9903
|
items,
|
|
9857
9904
|
current,
|
|
9858
9905
|
type = "brand"
|
|
9859
9906
|
} = props;
|
|
9860
|
-
return /* @__PURE__ */ (0,
|
|
9907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
|
|
9861
9908
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
9862
|
-
return /* @__PURE__ */ (0,
|
|
9863
|
-
/* @__PURE__ */ (0,
|
|
9864
|
-
/* @__PURE__ */ (0,
|
|
9865
|
-
/* @__PURE__ */ (0,
|
|
9866
|
-
item.description && /* @__PURE__ */ (0,
|
|
9909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime341.jsxs)("div", { className: clsx_default("step-item", status), children: [
|
|
9910
|
+
/* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(CheckIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("span", { children: index + 1 }) }),
|
|
9911
|
+
/* @__PURE__ */ (0, import_jsx_runtime341.jsxs)("div", { className: "step-content", children: [
|
|
9912
|
+
/* @__PURE__ */ (0, import_jsx_runtime341.jsx)("span", { className: "step-title", children: item.title }),
|
|
9913
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("span", { className: "step-description", children: item.description })
|
|
9867
9914
|
] })
|
|
9868
9915
|
] }, index);
|
|
9869
9916
|
}) });
|
|
@@ -9873,7 +9920,7 @@ var Steps_default = Steps;
|
|
|
9873
9920
|
|
|
9874
9921
|
// src/components/Swiper/Swiper.tsx
|
|
9875
9922
|
var import_react33 = __toESM(require("react"), 1);
|
|
9876
|
-
var
|
|
9923
|
+
var import_jsx_runtime342 = require("react/jsx-runtime");
|
|
9877
9924
|
var Swiper = (props) => {
|
|
9878
9925
|
const {
|
|
9879
9926
|
auto = false,
|
|
@@ -10102,7 +10149,7 @@ var Swiper = (props) => {
|
|
|
10102
10149
|
const slideWidthPercent = 100 / viewItemCount;
|
|
10103
10150
|
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
10104
10151
|
const slideElements = import_react33.default.useMemo(
|
|
10105
|
-
() => extendedItems.map((item, idx) => /* @__PURE__ */ (0,
|
|
10152
|
+
() => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
10106
10153
|
"div",
|
|
10107
10154
|
{
|
|
10108
10155
|
className: "lib-xplat-swiper__slide",
|
|
@@ -10121,15 +10168,15 @@ var Swiper = (props) => {
|
|
|
10121
10168
|
Math.floor(realIndex / slideBy),
|
|
10122
10169
|
totalSteps - 1
|
|
10123
10170
|
);
|
|
10124
|
-
return /* @__PURE__ */ (0,
|
|
10125
|
-
/* @__PURE__ */ (0,
|
|
10171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
|
|
10172
|
+
/* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
10126
10173
|
"div",
|
|
10127
10174
|
{
|
|
10128
10175
|
className: "lib-xplat-swiper__viewport",
|
|
10129
10176
|
onMouseDown: handleDragStart,
|
|
10130
10177
|
onTouchStart: handleDragStart,
|
|
10131
10178
|
onDragStart: (e) => e.preventDefault(),
|
|
10132
|
-
children: /* @__PURE__ */ (0,
|
|
10179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
10133
10180
|
"div",
|
|
10134
10181
|
{
|
|
10135
10182
|
className: clsx_default(
|
|
@@ -10147,7 +10194,7 @@ var Swiper = (props) => {
|
|
|
10147
10194
|
)
|
|
10148
10195
|
}
|
|
10149
10196
|
),
|
|
10150
|
-
showProgress && canSlide && /* @__PURE__ */ (0,
|
|
10197
|
+
showProgress && canSlide && /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
10151
10198
|
"span",
|
|
10152
10199
|
{
|
|
10153
10200
|
className: "lib-xplat-swiper__progress-fill",
|
|
@@ -10157,7 +10204,7 @@ var Swiper = (props) => {
|
|
|
10157
10204
|
}
|
|
10158
10205
|
}
|
|
10159
10206
|
) }) }),
|
|
10160
|
-
canSlide && /* @__PURE__ */ (0,
|
|
10207
|
+
canSlide && /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
10161
10208
|
"button",
|
|
10162
10209
|
{
|
|
10163
10210
|
className: clsx_default(
|
|
@@ -10176,7 +10223,7 @@ var Swiper_default = Swiper;
|
|
|
10176
10223
|
|
|
10177
10224
|
// src/components/Switch/Switch.tsx
|
|
10178
10225
|
var import_react34 = __toESM(require("react"), 1);
|
|
10179
|
-
var
|
|
10226
|
+
var import_jsx_runtime343 = require("react/jsx-runtime");
|
|
10180
10227
|
var KNOB_TRANSITION_MS = 250;
|
|
10181
10228
|
var Switch = (props) => {
|
|
10182
10229
|
const {
|
|
@@ -10203,7 +10250,7 @@ var Switch = (props) => {
|
|
|
10203
10250
|
timeoutRef.current = null;
|
|
10204
10251
|
}, KNOB_TRANSITION_MS);
|
|
10205
10252
|
};
|
|
10206
|
-
return /* @__PURE__ */ (0,
|
|
10253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
|
|
10207
10254
|
"div",
|
|
10208
10255
|
{
|
|
10209
10256
|
className: clsx_default(
|
|
@@ -10216,7 +10263,7 @@ var Switch = (props) => {
|
|
|
10216
10263
|
),
|
|
10217
10264
|
onClick: handleClick,
|
|
10218
10265
|
"aria-disabled": disabled || isAnimating,
|
|
10219
|
-
children: /* @__PURE__ */ (0,
|
|
10266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
10220
10267
|
}
|
|
10221
10268
|
);
|
|
10222
10269
|
};
|
|
@@ -10234,7 +10281,7 @@ var useTableContext = () => {
|
|
|
10234
10281
|
var TableContext_default = TableContext;
|
|
10235
10282
|
|
|
10236
10283
|
// src/components/Table/Table.tsx
|
|
10237
|
-
var
|
|
10284
|
+
var import_jsx_runtime344 = require("react/jsx-runtime");
|
|
10238
10285
|
var Table = (props) => {
|
|
10239
10286
|
const {
|
|
10240
10287
|
children,
|
|
@@ -10244,7 +10291,7 @@ var Table = (props) => {
|
|
|
10244
10291
|
headerSticky = false,
|
|
10245
10292
|
stickyShadow = true
|
|
10246
10293
|
} = props;
|
|
10247
|
-
return /* @__PURE__ */ (0,
|
|
10294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("div", { className: `lib-xplat-table-wrapper ${size}`, children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
|
|
10248
10295
|
TableContext_default.Provider,
|
|
10249
10296
|
{
|
|
10250
10297
|
value: {
|
|
@@ -10253,7 +10300,7 @@ var Table = (props) => {
|
|
|
10253
10300
|
headerSticky,
|
|
10254
10301
|
stickyShadow
|
|
10255
10302
|
},
|
|
10256
|
-
children: /* @__PURE__ */ (0,
|
|
10303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("table", { className: "lib-xplat-table", children })
|
|
10257
10304
|
}
|
|
10258
10305
|
) });
|
|
10259
10306
|
};
|
|
@@ -10261,10 +10308,10 @@ Table.displayName = "Table";
|
|
|
10261
10308
|
var Table_default = Table;
|
|
10262
10309
|
|
|
10263
10310
|
// src/components/Table/TableBody.tsx
|
|
10264
|
-
var
|
|
10311
|
+
var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
10265
10312
|
var TableBody = (props) => {
|
|
10266
10313
|
const { children } = props;
|
|
10267
|
-
return /* @__PURE__ */ (0,
|
|
10314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("tbody", { children });
|
|
10268
10315
|
};
|
|
10269
10316
|
TableBody.displayName = "TableBody";
|
|
10270
10317
|
var TableBody_default = TableBody;
|
|
@@ -10294,7 +10341,7 @@ var useTableRowContext = () => {
|
|
|
10294
10341
|
var TableRowContext_default = TableRowContext;
|
|
10295
10342
|
|
|
10296
10343
|
// src/components/Table/TableCell.tsx
|
|
10297
|
-
var
|
|
10344
|
+
var import_jsx_runtime346 = require("react/jsx-runtime");
|
|
10298
10345
|
var TableCell = import_react38.default.memo((props) => {
|
|
10299
10346
|
const {
|
|
10300
10347
|
children,
|
|
@@ -10339,7 +10386,7 @@ var TableCell = import_react38.default.memo((props) => {
|
|
|
10339
10386
|
const CellTag = isHeaderCell ? "th" : "td";
|
|
10340
10387
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
10341
10388
|
const enableHover = headContext && headContext.cellHover;
|
|
10342
|
-
return /* @__PURE__ */ (0,
|
|
10389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
|
|
10343
10390
|
CellTag,
|
|
10344
10391
|
{
|
|
10345
10392
|
ref: cellRef,
|
|
@@ -10366,20 +10413,20 @@ TableCell.displayName = "TableCell";
|
|
|
10366
10413
|
var TableCell_default = TableCell;
|
|
10367
10414
|
|
|
10368
10415
|
// src/components/Table/TableHead.tsx
|
|
10369
|
-
var
|
|
10416
|
+
var import_jsx_runtime347 = require("react/jsx-runtime");
|
|
10370
10417
|
var TableHead = ({
|
|
10371
10418
|
children,
|
|
10372
10419
|
cellHover = false
|
|
10373
10420
|
}) => {
|
|
10374
10421
|
const { headerSticky } = useTableContext();
|
|
10375
|
-
return /* @__PURE__ */ (0,
|
|
10422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null), children }) });
|
|
10376
10423
|
};
|
|
10377
10424
|
TableHead.displayName = "TableHead";
|
|
10378
10425
|
var TableHead_default = TableHead;
|
|
10379
10426
|
|
|
10380
10427
|
// src/components/Table/TableRow.tsx
|
|
10381
10428
|
var import_react39 = __toESM(require("react"), 1);
|
|
10382
|
-
var
|
|
10429
|
+
var import_jsx_runtime348 = require("react/jsx-runtime");
|
|
10383
10430
|
var TableRow = import_react39.default.memo((props) => {
|
|
10384
10431
|
const {
|
|
10385
10432
|
children,
|
|
@@ -10396,7 +10443,7 @@ var TableRow = import_react39.default.memo((props) => {
|
|
|
10396
10443
|
return [...prev, ref];
|
|
10397
10444
|
});
|
|
10398
10445
|
};
|
|
10399
|
-
return /* @__PURE__ */ (0,
|
|
10446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
|
|
10400
10447
|
"tr",
|
|
10401
10448
|
{
|
|
10402
10449
|
className: clsx_default(
|
|
@@ -10420,7 +10467,7 @@ TableRow.displayName = "TableRow";
|
|
|
10420
10467
|
var TableRow_default = TableRow;
|
|
10421
10468
|
|
|
10422
10469
|
// src/components/Tag/Tag.tsx
|
|
10423
|
-
var
|
|
10470
|
+
var import_jsx_runtime349 = require("react/jsx-runtime");
|
|
10424
10471
|
var Tag = (props) => {
|
|
10425
10472
|
const {
|
|
10426
10473
|
children,
|
|
@@ -10430,7 +10477,7 @@ var Tag = (props) => {
|
|
|
10430
10477
|
disabled = false,
|
|
10431
10478
|
colorIndex
|
|
10432
10479
|
} = props;
|
|
10433
|
-
return /* @__PURE__ */ (0,
|
|
10480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(
|
|
10434
10481
|
"span",
|
|
10435
10482
|
{
|
|
10436
10483
|
className: clsx_default(
|
|
@@ -10441,8 +10488,8 @@ var Tag = (props) => {
|
|
|
10441
10488
|
disabled && "disabled"
|
|
10442
10489
|
),
|
|
10443
10490
|
children: [
|
|
10444
|
-
/* @__PURE__ */ (0,
|
|
10445
|
-
onClose && /* @__PURE__ */ (0,
|
|
10491
|
+
/* @__PURE__ */ (0, import_jsx_runtime349.jsx)("span", { className: "tag-label", children }),
|
|
10492
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", disabled, children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(XIcon_default, {}) })
|
|
10446
10493
|
]
|
|
10447
10494
|
}
|
|
10448
10495
|
);
|
|
@@ -10452,7 +10499,7 @@ var Tag_default = Tag;
|
|
|
10452
10499
|
|
|
10453
10500
|
// src/components/TextArea/TextArea.tsx
|
|
10454
10501
|
var import_react40 = __toESM(require("react"), 1);
|
|
10455
|
-
var
|
|
10502
|
+
var import_jsx_runtime350 = require("react/jsx-runtime");
|
|
10456
10503
|
var TextArea = import_react40.default.forwardRef(
|
|
10457
10504
|
(props, ref) => {
|
|
10458
10505
|
const {
|
|
@@ -10463,7 +10510,7 @@ var TextArea = import_react40.default.forwardRef(
|
|
|
10463
10510
|
disabled,
|
|
10464
10511
|
...textareaProps
|
|
10465
10512
|
} = props;
|
|
10466
|
-
return /* @__PURE__ */ (0,
|
|
10513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
|
|
10467
10514
|
"textarea",
|
|
10468
10515
|
{
|
|
10469
10516
|
...textareaProps,
|
|
@@ -10482,7 +10529,7 @@ var TextArea_default = TextArea;
|
|
|
10482
10529
|
// src/components/Toast/Toast.tsx
|
|
10483
10530
|
var import_react41 = __toESM(require("react"), 1);
|
|
10484
10531
|
var import_react_dom4 = require("react-dom");
|
|
10485
|
-
var
|
|
10532
|
+
var import_jsx_runtime351 = require("react/jsx-runtime");
|
|
10486
10533
|
var ToastContext = import_react41.default.createContext(null);
|
|
10487
10534
|
var useToast = () => {
|
|
10488
10535
|
const ctx = import_react41.default.useContext(ToastContext);
|
|
@@ -10498,7 +10545,7 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
10498
10545
|
setHeight(ref.current.offsetHeight);
|
|
10499
10546
|
}
|
|
10500
10547
|
}, [isExiting]);
|
|
10501
|
-
return /* @__PURE__ */ (0,
|
|
10548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
|
|
10502
10549
|
"div",
|
|
10503
10550
|
{
|
|
10504
10551
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -10506,15 +10553,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
10506
10553
|
maxHeight: isExiting ? 0 : height ?? "none",
|
|
10507
10554
|
marginBottom: isExiting ? 0 : void 0
|
|
10508
10555
|
},
|
|
10509
|
-
children: /* @__PURE__ */ (0,
|
|
10556
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime351.jsxs)(
|
|
10510
10557
|
"div",
|
|
10511
10558
|
{
|
|
10512
10559
|
ref,
|
|
10513
10560
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
10514
10561
|
role: "alert",
|
|
10515
10562
|
children: [
|
|
10516
|
-
/* @__PURE__ */ (0,
|
|
10517
|
-
/* @__PURE__ */ (0,
|
|
10563
|
+
/* @__PURE__ */ (0, import_jsx_runtime351.jsx)("span", { className: "message", children: item.message }),
|
|
10564
|
+
/* @__PURE__ */ (0, import_jsx_runtime351.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
10518
10565
|
]
|
|
10519
10566
|
}
|
|
10520
10567
|
)
|
|
@@ -10552,10 +10599,10 @@ var ToastProvider = ({
|
|
|
10552
10599
|
},
|
|
10553
10600
|
[remove]
|
|
10554
10601
|
);
|
|
10555
|
-
return /* @__PURE__ */ (0,
|
|
10602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime351.jsxs)(ToastContext.Provider, { value: { toast }, children: [
|
|
10556
10603
|
children,
|
|
10557
10604
|
mounted && (0, import_react_dom4.createPortal)(
|
|
10558
|
-
/* @__PURE__ */ (0,
|
|
10605
|
+
/* @__PURE__ */ (0, import_jsx_runtime351.jsx)("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
|
|
10559
10606
|
ToastItemComponent,
|
|
10560
10607
|
{
|
|
10561
10608
|
item: t,
|
|
@@ -10572,15 +10619,17 @@ ToastProvider.displayName = "ToastProvider";
|
|
|
10572
10619
|
|
|
10573
10620
|
// src/components/Tooltip/Tooltip.tsx
|
|
10574
10621
|
var import_react42 = __toESM(require("react"), 1);
|
|
10575
|
-
var
|
|
10622
|
+
var import_jsx_runtime352 = require("react/jsx-runtime");
|
|
10576
10623
|
var OFFSET = 12;
|
|
10624
|
+
var GAP = 8;
|
|
10577
10625
|
var SHOW_DELAY = 300;
|
|
10578
10626
|
var Tooltip = (props) => {
|
|
10579
10627
|
const {
|
|
10580
|
-
|
|
10628
|
+
children,
|
|
10581
10629
|
title,
|
|
10582
10630
|
description,
|
|
10583
|
-
|
|
10631
|
+
type = "dark",
|
|
10632
|
+
follow = false,
|
|
10584
10633
|
disabled = false
|
|
10585
10634
|
} = props;
|
|
10586
10635
|
const triggerRef = import_react42.default.useRef(null);
|
|
@@ -10588,51 +10637,93 @@ var Tooltip = (props) => {
|
|
|
10588
10637
|
const [visible, setVisible] = import_react42.default.useState(false);
|
|
10589
10638
|
const [pos, setPos] = import_react42.default.useState({ left: 0, top: 0 });
|
|
10590
10639
|
const delayTimer = import_react42.default.useRef(0);
|
|
10591
|
-
const
|
|
10640
|
+
const rafRef = import_react42.default.useRef(0);
|
|
10641
|
+
const cursor = import_react42.default.useRef(null);
|
|
10642
|
+
const clamp = import_react42.default.useCallback((left, top, w, h) => {
|
|
10643
|
+
const vw = window.innerWidth;
|
|
10644
|
+
const vh = window.innerHeight;
|
|
10645
|
+
return {
|
|
10646
|
+
left: Math.min(Math.max(GAP, left), Math.max(GAP, vw - w - GAP)),
|
|
10647
|
+
top: Math.min(Math.max(GAP, top), Math.max(GAP, vh - h - GAP))
|
|
10648
|
+
};
|
|
10649
|
+
}, []);
|
|
10650
|
+
const placeAtCursor = import_react42.default.useCallback((x, y) => {
|
|
10592
10651
|
const el = tooltipRef.current;
|
|
10593
10652
|
if (!el) return;
|
|
10594
10653
|
const w = el.offsetWidth;
|
|
10595
10654
|
const h = el.offsetHeight;
|
|
10596
|
-
|
|
10597
|
-
let
|
|
10598
|
-
|
|
10599
|
-
if (
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10655
|
+
let left = x + OFFSET;
|
|
10656
|
+
let top = y - h - OFFSET;
|
|
10657
|
+
if (left + w > window.innerWidth - GAP) left = x - w - OFFSET;
|
|
10658
|
+
if (top < GAP) top = y + OFFSET;
|
|
10659
|
+
setPos(clamp(left, top, w, h));
|
|
10660
|
+
}, [clamp]);
|
|
10661
|
+
const placeAtTrigger = import_react42.default.useCallback(() => {
|
|
10662
|
+
const el = tooltipRef.current;
|
|
10663
|
+
const trigger = triggerRef.current;
|
|
10664
|
+
if (!el || !trigger) return;
|
|
10665
|
+
const w = el.offsetWidth;
|
|
10666
|
+
const h = el.offsetHeight;
|
|
10667
|
+
const rect = trigger.getBoundingClientRect();
|
|
10668
|
+
let top = rect.top - h - GAP;
|
|
10669
|
+
if (top < GAP) top = rect.bottom + GAP;
|
|
10670
|
+
const left = rect.left + rect.width / 2 - w / 2;
|
|
10671
|
+
setPos(clamp(left, top, w, h));
|
|
10672
|
+
}, [clamp]);
|
|
10673
|
+
const reposition = import_react42.default.useCallback(() => {
|
|
10674
|
+
if (follow && cursor.current) {
|
|
10675
|
+
placeAtCursor(cursor.current.x, cursor.current.y);
|
|
10676
|
+
} else {
|
|
10677
|
+
placeAtTrigger();
|
|
10678
|
+
}
|
|
10679
|
+
}, [follow, placeAtCursor, placeAtTrigger]);
|
|
10680
|
+
const handleMouseEnter = import_react42.default.useCallback((e) => {
|
|
10605
10681
|
if (disabled) return;
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
}, SHOW_DELAY);
|
|
10682
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
10683
|
+
delayTimer.current = window.setTimeout(() => setVisible(true), SHOW_DELAY);
|
|
10609
10684
|
}, [disabled]);
|
|
10610
10685
|
const handleMouseMove = import_react42.default.useCallback((e) => {
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
}, []);
|
|
10618
|
-
const
|
|
10686
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
10687
|
+
if (!visible || !follow) return;
|
|
10688
|
+
cancelAnimationFrame(rafRef.current);
|
|
10689
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
10690
|
+
if (cursor.current) placeAtCursor(cursor.current.x, cursor.current.y);
|
|
10691
|
+
});
|
|
10692
|
+
}, [visible, follow, placeAtCursor]);
|
|
10693
|
+
const close = import_react42.default.useCallback(() => {
|
|
10619
10694
|
window.clearTimeout(delayTimer.current);
|
|
10695
|
+
cancelAnimationFrame(rafRef.current);
|
|
10620
10696
|
setVisible(false);
|
|
10621
10697
|
}, []);
|
|
10698
|
+
const handleMouseLeave = import_react42.default.useCallback(() => {
|
|
10699
|
+
cursor.current = null;
|
|
10700
|
+
close();
|
|
10701
|
+
}, [close]);
|
|
10622
10702
|
const handleFocus = import_react42.default.useCallback(() => {
|
|
10623
10703
|
if (disabled) return;
|
|
10704
|
+
cursor.current = null;
|
|
10624
10705
|
setVisible(true);
|
|
10625
10706
|
}, [disabled]);
|
|
10626
|
-
const handleBlur = import_react42.default.useCallback(() => {
|
|
10627
|
-
setVisible(false);
|
|
10628
|
-
}, []);
|
|
10629
10707
|
import_react42.default.useLayoutEffect(() => {
|
|
10630
|
-
if (!visible
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10708
|
+
if (!visible) return;
|
|
10709
|
+
reposition();
|
|
10710
|
+
}, [visible, reposition]);
|
|
10711
|
+
import_react42.default.useEffect(() => {
|
|
10712
|
+
if (!visible || follow) return;
|
|
10713
|
+
const onChange = () => placeAtTrigger();
|
|
10714
|
+
window.addEventListener("scroll", onChange, true);
|
|
10715
|
+
window.addEventListener("resize", onChange);
|
|
10716
|
+
return () => {
|
|
10717
|
+
window.removeEventListener("scroll", onChange, true);
|
|
10718
|
+
window.removeEventListener("resize", onChange);
|
|
10719
|
+
};
|
|
10720
|
+
}, [visible, follow, placeAtTrigger]);
|
|
10721
|
+
import_react42.default.useEffect(() => () => {
|
|
10722
|
+
window.clearTimeout(delayTimer.current);
|
|
10723
|
+
cancelAnimationFrame(rafRef.current);
|
|
10724
|
+
}, []);
|
|
10725
|
+
if (!title && !description) return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(import_jsx_runtime352.Fragment, { children });
|
|
10726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(
|
|
10636
10727
|
"div",
|
|
10637
10728
|
{
|
|
10638
10729
|
ref: triggerRef,
|
|
@@ -10640,20 +10731,21 @@ var Tooltip = (props) => {
|
|
|
10640
10731
|
onMouseEnter: handleMouseEnter,
|
|
10641
10732
|
onMouseMove: handleMouseMove,
|
|
10642
10733
|
onMouseLeave: handleMouseLeave,
|
|
10643
|
-
onClick:
|
|
10734
|
+
onClick: close,
|
|
10644
10735
|
onFocus: handleFocus,
|
|
10645
|
-
onBlur:
|
|
10736
|
+
onBlur: close,
|
|
10646
10737
|
children: [
|
|
10647
10738
|
children,
|
|
10648
|
-
visible && /* @__PURE__ */ (0,
|
|
10739
|
+
visible && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(
|
|
10649
10740
|
"div",
|
|
10650
10741
|
{
|
|
10651
10742
|
ref: tooltipRef,
|
|
10743
|
+
role: "tooltip",
|
|
10652
10744
|
className: clsx_default("lib-xplat-tooltip", type),
|
|
10653
10745
|
style: { position: "fixed", left: pos.left, top: pos.top },
|
|
10654
10746
|
children: [
|
|
10655
|
-
title && /* @__PURE__ */ (0,
|
|
10656
|
-
description && /* @__PURE__ */ (0,
|
|
10747
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("div", { className: "tooltip-title", children: title }),
|
|
10748
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("div", { className: "tooltip-desc", children: description })
|
|
10657
10749
|
]
|
|
10658
10750
|
}
|
|
10659
10751
|
) })
|
|
@@ -10666,10 +10758,10 @@ var Tooltip_default = Tooltip;
|
|
|
10666
10758
|
|
|
10667
10759
|
// src/components/Video/Video.tsx
|
|
10668
10760
|
var import_react43 = __toESM(require("react"), 1);
|
|
10669
|
-
var
|
|
10670
|
-
var PipIcon = () => /* @__PURE__ */ (0,
|
|
10671
|
-
/* @__PURE__ */ (0,
|
|
10672
|
-
/* @__PURE__ */ (0,
|
|
10761
|
+
var import_jsx_runtime353 = require("react/jsx-runtime");
|
|
10762
|
+
var PipIcon = () => /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
10763
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
10764
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
|
|
10673
10765
|
] });
|
|
10674
10766
|
var formatTime = (sec) => {
|
|
10675
10767
|
if (!Number.isFinite(sec) || sec < 0) return "0:00";
|
|
@@ -10844,13 +10936,13 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10844
10936
|
const volumePct = (isMuted ? 0 : volume) * 100;
|
|
10845
10937
|
const VolumeGlyph = isMuted || volume === 0 ? VolumeXIcon_default : volume < 0.5 ? VolumeIcon_default : Volume2Icon_default;
|
|
10846
10938
|
const pipSupported = typeof document !== "undefined" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled;
|
|
10847
|
-
return /* @__PURE__ */ (0,
|
|
10939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(
|
|
10848
10940
|
"div",
|
|
10849
10941
|
{
|
|
10850
10942
|
ref: containerRef,
|
|
10851
10943
|
className: clsx_default("lib-xplat-video", showControls && "has-controls"),
|
|
10852
10944
|
children: [
|
|
10853
|
-
/* @__PURE__ */ (0,
|
|
10945
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10854
10946
|
"video",
|
|
10855
10947
|
{
|
|
10856
10948
|
ref: setRefs,
|
|
@@ -10871,7 +10963,7 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10871
10963
|
children
|
|
10872
10964
|
}
|
|
10873
10965
|
),
|
|
10874
|
-
showCenterPlay && /* @__PURE__ */ (0,
|
|
10966
|
+
showCenterPlay && /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10875
10967
|
"button",
|
|
10876
10968
|
{
|
|
10877
10969
|
type: "button",
|
|
@@ -10883,11 +10975,11 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10883
10975
|
onClick: togglePlay,
|
|
10884
10976
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
10885
10977
|
tabIndex: -1,
|
|
10886
|
-
children: /* @__PURE__ */ (0,
|
|
10978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)("span", { className: "center-play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(PlayCircleIcon_default, {}) })
|
|
10887
10979
|
}
|
|
10888
10980
|
),
|
|
10889
|
-
showControls && /* @__PURE__ */ (0,
|
|
10890
|
-
/* @__PURE__ */ (0,
|
|
10981
|
+
showControls && /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
|
|
10982
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10891
10983
|
"input",
|
|
10892
10984
|
{
|
|
10893
10985
|
type: "range",
|
|
@@ -10904,29 +10996,29 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10904
10996
|
}
|
|
10905
10997
|
}
|
|
10906
10998
|
),
|
|
10907
|
-
/* @__PURE__ */ (0,
|
|
10908
|
-
/* @__PURE__ */ (0,
|
|
10999
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: "controls-row", children: [
|
|
11000
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10909
11001
|
"button",
|
|
10910
11002
|
{
|
|
10911
11003
|
type: "button",
|
|
10912
11004
|
className: "control-btn",
|
|
10913
11005
|
onClick: togglePlay,
|
|
10914
11006
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
10915
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
11007
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(PlayIcon_default, {})
|
|
10916
11008
|
}
|
|
10917
11009
|
),
|
|
10918
|
-
/* @__PURE__ */ (0,
|
|
10919
|
-
/* @__PURE__ */ (0,
|
|
11010
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: "volume-group", children: [
|
|
11011
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10920
11012
|
"button",
|
|
10921
11013
|
{
|
|
10922
11014
|
type: "button",
|
|
10923
11015
|
className: "control-btn",
|
|
10924
11016
|
onClick: toggleMute,
|
|
10925
11017
|
"aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
|
|
10926
|
-
children: /* @__PURE__ */ (0,
|
|
11018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(VolumeGlyph, {})
|
|
10927
11019
|
}
|
|
10928
11020
|
),
|
|
10929
|
-
/* @__PURE__ */ (0,
|
|
11021
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10930
11022
|
"input",
|
|
10931
11023
|
{
|
|
10932
11024
|
type: "range",
|
|
@@ -10941,14 +11033,14 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10941
11033
|
}
|
|
10942
11034
|
)
|
|
10943
11035
|
] }),
|
|
10944
|
-
/* @__PURE__ */ (0,
|
|
11036
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("span", { className: "time", children: [
|
|
10945
11037
|
formatTime(currentTime),
|
|
10946
11038
|
" / ",
|
|
10947
11039
|
formatTime(duration)
|
|
10948
11040
|
] }),
|
|
10949
|
-
/* @__PURE__ */ (0,
|
|
10950
|
-
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0,
|
|
10951
|
-
/* @__PURE__ */ (0,
|
|
11041
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)("div", { className: "controls-spacer" }),
|
|
11042
|
+
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
|
|
11043
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(
|
|
10952
11044
|
"button",
|
|
10953
11045
|
{
|
|
10954
11046
|
type: "button",
|
|
@@ -10962,7 +11054,7 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10962
11054
|
]
|
|
10963
11055
|
}
|
|
10964
11056
|
),
|
|
10965
|
-
rateMenuOpen && /* @__PURE__ */ (0,
|
|
11057
|
+
rateMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime353.jsx)("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ (0, import_jsx_runtime353.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(
|
|
10966
11058
|
"button",
|
|
10967
11059
|
{
|
|
10968
11060
|
type: "button",
|
|
@@ -10976,7 +11068,7 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10976
11068
|
}
|
|
10977
11069
|
) }, r2)) })
|
|
10978
11070
|
] }),
|
|
10979
|
-
showCaptions && /* @__PURE__ */ (0,
|
|
11071
|
+
showCaptions && /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10980
11072
|
"button",
|
|
10981
11073
|
{
|
|
10982
11074
|
type: "button",
|
|
@@ -10984,37 +11076,37 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
10984
11076
|
onClick: toggleCaptions,
|
|
10985
11077
|
"aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
|
|
10986
11078
|
"aria-pressed": captionsOn,
|
|
10987
|
-
children: /* @__PURE__ */ (0,
|
|
11079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(TypeIcon_default, {})
|
|
10988
11080
|
}
|
|
10989
11081
|
),
|
|
10990
|
-
showPip && pipSupported && /* @__PURE__ */ (0,
|
|
11082
|
+
showPip && pipSupported && /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
10991
11083
|
"button",
|
|
10992
11084
|
{
|
|
10993
11085
|
type: "button",
|
|
10994
11086
|
className: clsx_default("control-btn", isPip && "is-active"),
|
|
10995
11087
|
onClick: togglePip,
|
|
10996
11088
|
"aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
|
|
10997
|
-
children: /* @__PURE__ */ (0,
|
|
11089
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(PipIcon, {})
|
|
10998
11090
|
}
|
|
10999
11091
|
),
|
|
11000
|
-
showDownload && /* @__PURE__ */ (0,
|
|
11092
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
11001
11093
|
"a",
|
|
11002
11094
|
{
|
|
11003
11095
|
className: "control-btn",
|
|
11004
11096
|
href: src,
|
|
11005
11097
|
download: downloadFileName ?? true,
|
|
11006
11098
|
"aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
|
|
11007
|
-
children: /* @__PURE__ */ (0,
|
|
11099
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(DownloadIcon_default, {})
|
|
11008
11100
|
}
|
|
11009
11101
|
),
|
|
11010
|
-
/* @__PURE__ */ (0,
|
|
11102
|
+
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
11011
11103
|
"button",
|
|
11012
11104
|
{
|
|
11013
11105
|
type: "button",
|
|
11014
11106
|
className: "control-btn",
|
|
11015
11107
|
onClick: toggleFullscreen,
|
|
11016
11108
|
"aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
|
|
11017
|
-
children: isFullscreen ? /* @__PURE__ */ (0,
|
|
11109
|
+
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(MinimizeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(MaximizeIcon_default, {})
|
|
11018
11110
|
}
|
|
11019
11111
|
)
|
|
11020
11112
|
] })
|
|
@@ -11027,7 +11119,7 @@ Video.displayName = "Video";
|
|
|
11027
11119
|
var Video_default = Video;
|
|
11028
11120
|
|
|
11029
11121
|
// src/layout/Grid/FullGrid/FullGrid.tsx
|
|
11030
|
-
var
|
|
11122
|
+
var import_jsx_runtime354 = require("react/jsx-runtime");
|
|
11031
11123
|
var GAP_MAP = {
|
|
11032
11124
|
none: "var(--spacing-space-none)",
|
|
11033
11125
|
xs: "var(--spacing-space-1)",
|
|
@@ -11040,13 +11132,13 @@ var GAP_MAP = {
|
|
|
11040
11132
|
var FullGrid = (props) => {
|
|
11041
11133
|
const { children, gap } = props;
|
|
11042
11134
|
const style = gap != null ? { gap: GAP_MAP[gap] } : void 0;
|
|
11043
|
-
return /* @__PURE__ */ (0,
|
|
11135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)("div", { className: "lib-xplat-full-grid", style, children });
|
|
11044
11136
|
};
|
|
11045
11137
|
FullGrid.displayName = "FullGrid";
|
|
11046
11138
|
var FullGrid_default = FullGrid;
|
|
11047
11139
|
|
|
11048
11140
|
// src/layout/Grid/FullScreen/FullScreen.tsx
|
|
11049
|
-
var
|
|
11141
|
+
var import_jsx_runtime355 = require("react/jsx-runtime");
|
|
11050
11142
|
var GAP_MAP2 = {
|
|
11051
11143
|
none: "var(--spacing-space-none)",
|
|
11052
11144
|
xs: "var(--spacing-space-1)",
|
|
@@ -11059,13 +11151,13 @@ var GAP_MAP2 = {
|
|
|
11059
11151
|
var FullScreen = (props) => {
|
|
11060
11152
|
const { children, gap } = props;
|
|
11061
11153
|
const style = gap != null ? { gap: GAP_MAP2[gap] } : void 0;
|
|
11062
|
-
return /* @__PURE__ */ (0,
|
|
11154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "lib-xplat-full-screen", style, children });
|
|
11063
11155
|
};
|
|
11064
11156
|
FullScreen.displayName = "FullScreen";
|
|
11065
11157
|
var FullScreen_default = FullScreen;
|
|
11066
11158
|
|
|
11067
11159
|
// src/layout/Grid/Item/Item.tsx
|
|
11068
|
-
var
|
|
11160
|
+
var import_jsx_runtime356 = require("react/jsx-runtime");
|
|
11069
11161
|
var calculateSpans = (column) => {
|
|
11070
11162
|
const spans = {};
|
|
11071
11163
|
let inherited = column.default;
|
|
@@ -11082,35 +11174,35 @@ var GridItem = ({ column, children, className }) => {
|
|
|
11082
11174
|
Object.entries(spans).forEach(([key, value]) => {
|
|
11083
11175
|
style[`--column-${key}`] = value;
|
|
11084
11176
|
});
|
|
11085
|
-
return /* @__PURE__ */ (0,
|
|
11177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
|
|
11086
11178
|
};
|
|
11087
11179
|
GridItem.displayName = "GridItem";
|
|
11088
11180
|
var Item_default = GridItem;
|
|
11089
11181
|
|
|
11090
11182
|
// src/layout/Header/Header.tsx
|
|
11091
|
-
var
|
|
11183
|
+
var import_jsx_runtime357 = require("react/jsx-runtime");
|
|
11092
11184
|
var Header = ({
|
|
11093
11185
|
logo,
|
|
11094
11186
|
centerContent,
|
|
11095
11187
|
rightContent
|
|
11096
11188
|
}) => {
|
|
11097
|
-
return /* @__PURE__ */ (0,
|
|
11098
|
-
/* @__PURE__ */ (0,
|
|
11099
|
-
/* @__PURE__ */ (0,
|
|
11100
|
-
/* @__PURE__ */ (0,
|
|
11189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime357.jsxs)("div", { className: "lib-xplat-layout-header", children: [
|
|
11190
|
+
/* @__PURE__ */ (0, import_jsx_runtime357.jsx)("div", { children: logo }),
|
|
11191
|
+
/* @__PURE__ */ (0, import_jsx_runtime357.jsx)("div", { children: centerContent }),
|
|
11192
|
+
/* @__PURE__ */ (0, import_jsx_runtime357.jsx)("div", { children: rightContent })
|
|
11101
11193
|
] });
|
|
11102
11194
|
};
|
|
11103
11195
|
Header.displayName = "Header";
|
|
11104
11196
|
var Header_default = Header;
|
|
11105
11197
|
|
|
11106
11198
|
// src/layout/Layout/Layout.tsx
|
|
11107
|
-
var
|
|
11199
|
+
var import_jsx_runtime358 = require("react/jsx-runtime");
|
|
11108
11200
|
var Layout = (props) => {
|
|
11109
11201
|
const { header, sideBar, children } = props;
|
|
11110
|
-
return /* @__PURE__ */ (0,
|
|
11111
|
-
sideBar && /* @__PURE__ */ (0,
|
|
11112
|
-
/* @__PURE__ */ (0,
|
|
11113
|
-
header && /* @__PURE__ */ (0,
|
|
11202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { className: "lib-xplat-layout-content-wrapper", children: [
|
|
11203
|
+
sideBar && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(import_jsx_runtime358.Fragment, { children: sideBar }),
|
|
11204
|
+
/* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { className: "lib-xplat-layout-content", children: [
|
|
11205
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { className: "lib-xplat-layout-conent-header", children: header }),
|
|
11114
11206
|
children
|
|
11115
11207
|
] })
|
|
11116
11208
|
] }) });
|
|
@@ -11132,18 +11224,18 @@ var useSideBarContext = () => {
|
|
|
11132
11224
|
var SideBarContext_default = SideBarContext;
|
|
11133
11225
|
|
|
11134
11226
|
// src/layout/SideBar/SideBar.tsx
|
|
11135
|
-
var
|
|
11227
|
+
var import_jsx_runtime359 = require("react/jsx-runtime");
|
|
11136
11228
|
var SideBar = (props) => {
|
|
11137
11229
|
const { children, className } = props;
|
|
11138
11230
|
const [isOpen, setIsOpen] = import_react45.default.useState(true);
|
|
11139
11231
|
const handleSwitchSideBar = () => {
|
|
11140
11232
|
setIsOpen((prev) => !prev);
|
|
11141
11233
|
};
|
|
11142
|
-
return /* @__PURE__ */ (0,
|
|
11234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
|
|
11143
11235
|
SideBarContext_default.Provider,
|
|
11144
11236
|
{
|
|
11145
11237
|
value: { isSidebarOpen: isOpen, handleSwitchSideBar },
|
|
11146
|
-
children: /* @__PURE__ */ (0,
|
|
11238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
|
|
11147
11239
|
"div",
|
|
11148
11240
|
{
|
|
11149
11241
|
className: clsx_default(
|
|
@@ -11347,7 +11439,9 @@ var SideBar_default = SideBar;
|
|
|
11347
11439
|
Layout,
|
|
11348
11440
|
LayoutIcon,
|
|
11349
11441
|
LifeBuoyIcon,
|
|
11442
|
+
Link,
|
|
11350
11443
|
Link2Icon,
|
|
11444
|
+
LinkButton,
|
|
11351
11445
|
LinkIcon,
|
|
11352
11446
|
LinkedinIcon,
|
|
11353
11447
|
ListIcon,
|