@dmsi/wedgekit-react 0.0.884 → 0.0.886
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/{chunk-E7XBOMT4.js → chunk-ZXP2GIWZ.js} +81 -22
- package/dist/components/CalendarRange.cjs +133 -77
- package/dist/components/CalendarRange.css +0 -3
- package/dist/components/CalendarRange.js +3 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +119 -63
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +0 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +3 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +119 -63
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +0 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +3 -3
- package/dist/components/DataGrid/PinnedColumns.cjs +122 -66
- package/dist/components/DataGrid/PinnedColumns.css +0 -3
- package/dist/components/DataGrid/PinnedColumns.js +3 -3
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +119 -63
- package/dist/components/DataGrid/TableBody/LoadingCell.css +0 -3
- package/dist/components/DataGrid/TableBody/LoadingCell.js +3 -3
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +122 -66
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +0 -3
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +3 -3
- package/dist/components/DataGrid/TableBody/index.cjs +124 -68
- package/dist/components/DataGrid/TableBody/index.css +0 -3
- package/dist/components/DataGrid/TableBody/index.js +3 -3
- package/dist/components/DataGrid/index.cjs +133 -77
- package/dist/components/DataGrid/index.css +0 -3
- package/dist/components/DataGrid/index.js +3 -3
- package/dist/components/DataGrid/utils.cjs +121 -65
- package/dist/components/DataGrid/utils.css +0 -3
- package/dist/components/DataGrid/utils.js +3 -3
- package/dist/components/DateInput.cjs +73 -17
- package/dist/components/DateInput.css +0 -3
- package/dist/components/DateInput.js +3 -3
- package/dist/components/DateRangeInput.cjs +133 -77
- package/dist/components/DateRangeInput.css +0 -3
- package/dist/components/DateRangeInput.js +3 -3
- package/dist/components/MobileDataGrid/ColumnList.css +0 -3
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +119 -63
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +0 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +3 -3
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +116 -60
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +0 -3
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +3 -3
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
- package/dist/components/MobileDataGrid/index.cjs +120 -64
- package/dist/components/MobileDataGrid/index.css +0 -3
- package/dist/components/MobileDataGrid/index.js +3 -3
- package/dist/components/index.cjs +152 -96
- package/dist/components/index.css +0 -3
- package/dist/components/index.js +3 -3
- package/dist/index.css +0 -3
- package/package.json +1 -1
|
@@ -833,7 +833,7 @@ Currency.displayName = "Currency";
|
|
|
833
833
|
Percentage.displayName = "Percentage";
|
|
834
834
|
|
|
835
835
|
// src/components/CalendarRange.tsx
|
|
836
|
-
var
|
|
836
|
+
var import_clsx44 = __toESM(require("clsx"), 1);
|
|
837
837
|
var import_react43 = __toESM(require("react"), 1);
|
|
838
838
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
839
839
|
|
|
@@ -4432,6 +4432,7 @@ Tooltip.displayName = "Tooltip";
|
|
|
4432
4432
|
// src/components/DateInput.tsx
|
|
4433
4433
|
var import_react20 = require("react");
|
|
4434
4434
|
var import_react_dom3 = require("react-dom");
|
|
4435
|
+
var import_clsx20 = __toESM(require("clsx"), 1);
|
|
4435
4436
|
|
|
4436
4437
|
// src/utils/date-patch-dashes.ts
|
|
4437
4438
|
function formatInputValueWithDashes(value, dateInDashes) {
|
|
@@ -4521,10 +4522,12 @@ var DateInput = (_a) => {
|
|
|
4521
4522
|
const popoverRef = (0, import_react20.useRef)(null);
|
|
4522
4523
|
const triggerRef = (0, import_react20.useRef)(null);
|
|
4523
4524
|
const rootRef = (0, import_react20.useRef)(null);
|
|
4525
|
+
const isMobile = useMatchesMobile();
|
|
4524
4526
|
const [calendarPosition, setCalendarPosition] = (0, import_react20.useState)({
|
|
4525
4527
|
top: 0,
|
|
4526
4528
|
left: 0,
|
|
4527
|
-
width: 0
|
|
4529
|
+
width: 0,
|
|
4530
|
+
openAbove: false
|
|
4528
4531
|
});
|
|
4529
4532
|
const [from, to] = [value, ""];
|
|
4530
4533
|
(0, import_react20.useEffect)(() => {
|
|
@@ -4540,11 +4543,28 @@ var DateInput = (_a) => {
|
|
|
4540
4543
|
const updatePosition = () => {
|
|
4541
4544
|
if (rootRef.current) {
|
|
4542
4545
|
const rect = rootRef.current.getBoundingClientRect();
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4546
|
+
const viewportWidth = window.innerWidth;
|
|
4547
|
+
const viewportHeight = window.innerHeight;
|
|
4548
|
+
const calendarWidth = 340;
|
|
4549
|
+
const calendarHeight = 400;
|
|
4550
|
+
let viewportLeft = rect.left;
|
|
4551
|
+
if (viewportLeft + calendarWidth > viewportWidth) {
|
|
4552
|
+
viewportLeft = rect.right - calendarWidth;
|
|
4553
|
+
if (viewportLeft < 0) {
|
|
4554
|
+
viewportLeft = Math.max(0, (viewportWidth - calendarWidth) / 2);
|
|
4555
|
+
}
|
|
4556
|
+
}
|
|
4557
|
+
const left = viewportLeft + window.scrollX;
|
|
4558
|
+
const spaceBelow = viewportHeight - rect.bottom;
|
|
4559
|
+
const spaceAbove = rect.top;
|
|
4560
|
+
const openAbove = spaceBelow < calendarHeight && spaceAbove > spaceBelow;
|
|
4561
|
+
let top;
|
|
4562
|
+
if (openAbove) {
|
|
4563
|
+
top = rect.top + window.scrollY - calendarHeight - 4;
|
|
4564
|
+
} else {
|
|
4565
|
+
top = rect.bottom + window.scrollY + 4;
|
|
4566
|
+
}
|
|
4567
|
+
setCalendarPosition({ top, left, width: rect.width, openAbove });
|
|
4548
4568
|
}
|
|
4549
4569
|
};
|
|
4550
4570
|
(0, import_react20.useEffect)(() => {
|
|
@@ -4627,7 +4647,10 @@ var DateInput = (_a) => {
|
|
|
4627
4647
|
if (cursorPosition > 0 && value2[cursorPosition - 1] === sep) {
|
|
4628
4648
|
event.preventDefault();
|
|
4629
4649
|
const newValue = value2.slice(0, cursorPosition - 2) + value2.slice(cursorPosition);
|
|
4630
|
-
const formattedValue = formatInputValueWithDashes(
|
|
4650
|
+
const formattedValue = formatInputValueWithDashes(
|
|
4651
|
+
newValue,
|
|
4652
|
+
dateInDashes
|
|
4653
|
+
);
|
|
4631
4654
|
setInputValue(formattedValue);
|
|
4632
4655
|
requestAnimationFrame(() => {
|
|
4633
4656
|
if (triggerRef.current) {
|
|
@@ -4678,25 +4701,58 @@ var DateInput = (_a) => {
|
|
|
4678
4701
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4679
4702
|
"div",
|
|
4680
4703
|
{
|
|
4681
|
-
className:
|
|
4704
|
+
className: (0, import_clsx20.default)(
|
|
4705
|
+
"fixed inset-0 z-50",
|
|
4706
|
+
isMobile && "overflow-y-auto bg-neutral-600/50"
|
|
4707
|
+
),
|
|
4682
4708
|
onClick: () => setVisible(false),
|
|
4683
4709
|
onMouseDown: (e) => {
|
|
4684
|
-
|
|
4710
|
+
if (!isMobile) {
|
|
4711
|
+
e.preventDefault();
|
|
4712
|
+
}
|
|
4685
4713
|
},
|
|
4686
4714
|
onWheel: (e) => {
|
|
4687
4715
|
var _a2;
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4716
|
+
if (!isMobile) {
|
|
4717
|
+
const scrollableParent = (_a2 = document.scrollingElement) != null ? _a2 : document.documentElement;
|
|
4718
|
+
scrollableParent.scrollTop += e.deltaY;
|
|
4719
|
+
scrollableParent.scrollLeft += e.deltaX;
|
|
4720
|
+
}
|
|
4691
4721
|
},
|
|
4692
4722
|
onTouchMove: (e) => {
|
|
4693
|
-
|
|
4723
|
+
if (!isMobile) {
|
|
4724
|
+
e.stopPropagation();
|
|
4725
|
+
}
|
|
4694
4726
|
},
|
|
4695
|
-
style: { touchAction: "pan-y pan-x" },
|
|
4696
|
-
"aria-hidden": "true"
|
|
4727
|
+
style: { touchAction: isMobile ? "auto" : "pan-y pan-x" },
|
|
4728
|
+
"aria-hidden": "true",
|
|
4729
|
+
children: isMobile && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "min-h-full flex items-start justify-center py-4 px-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4730
|
+
"div",
|
|
4731
|
+
{
|
|
4732
|
+
ref: (el) => {
|
|
4733
|
+
popoverRef.current = el;
|
|
4734
|
+
},
|
|
4735
|
+
className: "bg-white rounded-base shadow-4 max-w-full",
|
|
4736
|
+
onClick: (e) => e.stopPropagation(),
|
|
4737
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4738
|
+
CalendarRange,
|
|
4739
|
+
{
|
|
4740
|
+
id: id ? `${id}-calendar` : void 0,
|
|
4741
|
+
testid: testid ? `${testid}-calendar` : void 0,
|
|
4742
|
+
from,
|
|
4743
|
+
to: to || from,
|
|
4744
|
+
onChange: handleDateChange,
|
|
4745
|
+
cardStyle: true,
|
|
4746
|
+
mode: "single",
|
|
4747
|
+
disableRange: true,
|
|
4748
|
+
isDateAvailable
|
|
4749
|
+
}
|
|
4750
|
+
)
|
|
4751
|
+
}
|
|
4752
|
+
) })
|
|
4697
4753
|
}
|
|
4698
4754
|
),
|
|
4699
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4755
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4700
4756
|
"div",
|
|
4701
4757
|
{
|
|
4702
4758
|
ref: (el) => {
|
|
@@ -4704,7 +4760,7 @@ var DateInput = (_a) => {
|
|
|
4704
4760
|
},
|
|
4705
4761
|
className: "absolute z-50 bg-white",
|
|
4706
4762
|
style: {
|
|
4707
|
-
top: `${calendarPosition.top
|
|
4763
|
+
top: `${calendarPosition.top}px`,
|
|
4708
4764
|
left: `${calendarPosition.left}px`
|
|
4709
4765
|
},
|
|
4710
4766
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
@@ -4740,21 +4796,21 @@ function formatDisplayValue(from, dateInDashes) {
|
|
|
4740
4796
|
}
|
|
4741
4797
|
|
|
4742
4798
|
// src/components/Accordion.tsx
|
|
4743
|
-
var
|
|
4799
|
+
var import_clsx23 = __toESM(require("clsx"), 1);
|
|
4744
4800
|
|
|
4745
4801
|
// src/components/Card.tsx
|
|
4746
|
-
var
|
|
4802
|
+
var import_clsx21 = __toESM(require("clsx"), 1);
|
|
4747
4803
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4748
4804
|
|
|
4749
4805
|
// src/components/Stack.tsx
|
|
4750
|
-
var
|
|
4806
|
+
var import_clsx22 = __toESM(require("clsx"), 1);
|
|
4751
4807
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4752
4808
|
|
|
4753
4809
|
// src/components/Accordion.tsx
|
|
4754
4810
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4755
4811
|
|
|
4756
4812
|
// src/components/Heading.tsx
|
|
4757
|
-
var
|
|
4813
|
+
var import_clsx24 = __toESM(require("clsx"), 1);
|
|
4758
4814
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4759
4815
|
var Heading = (_a) => {
|
|
4760
4816
|
var _b = _a, {
|
|
@@ -4783,7 +4839,7 @@ var Heading = (_a) => {
|
|
|
4783
4839
|
__spreadProps(__spreadValues({
|
|
4784
4840
|
id,
|
|
4785
4841
|
"data-testid": testid,
|
|
4786
|
-
className: (0,
|
|
4842
|
+
className: (0, import_clsx24.default)(
|
|
4787
4843
|
typography[variant],
|
|
4788
4844
|
className,
|
|
4789
4845
|
align === "left" && "text-left",
|
|
@@ -4830,11 +4886,11 @@ var import_react24 = require("react");
|
|
|
4830
4886
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4831
4887
|
|
|
4832
4888
|
// src/components/Modal.tsx
|
|
4833
|
-
var
|
|
4889
|
+
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
4834
4890
|
var import_react26 = require("react");
|
|
4835
4891
|
|
|
4836
4892
|
// src/components/ModalHeader.tsx
|
|
4837
|
-
var
|
|
4893
|
+
var import_clsx25 = __toESM(require("clsx"), 1);
|
|
4838
4894
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4839
4895
|
var ModalHeader = ({
|
|
4840
4896
|
title,
|
|
@@ -4854,7 +4910,7 @@ var ModalHeader = ({
|
|
|
4854
4910
|
{
|
|
4855
4911
|
id,
|
|
4856
4912
|
"data-testid": testid,
|
|
4857
|
-
className: (0,
|
|
4913
|
+
className: (0, import_clsx25.default)(
|
|
4858
4914
|
"flex justify-between items-center",
|
|
4859
4915
|
headerIconAlign === "center" && "justify-center",
|
|
4860
4916
|
headerIconAlign === "right" && "justify-end",
|
|
@@ -4864,7 +4920,7 @@ var ModalHeader = ({
|
|
|
4864
4920
|
headerClassname
|
|
4865
4921
|
),
|
|
4866
4922
|
children: [
|
|
4867
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0,
|
|
4923
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0, import_clsx25.default)("flex items-center flex-1", layoutGroupGap), children: [
|
|
4868
4924
|
headerIcon,
|
|
4869
4925
|
title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4870
4926
|
Title,
|
|
@@ -4887,7 +4943,7 @@ var ModalHeader = ({
|
|
|
4887
4943
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4888
4944
|
"span",
|
|
4889
4945
|
{
|
|
4890
|
-
className: (0,
|
|
4946
|
+
className: (0, import_clsx25.default)(
|
|
4891
4947
|
"contents",
|
|
4892
4948
|
headerIconClassname != null ? headerIconClassname : "text-icon-primary-normal"
|
|
4893
4949
|
),
|
|
@@ -4903,7 +4959,7 @@ var ModalHeader = ({
|
|
|
4903
4959
|
ModalHeader.displayName = "ModalHeader";
|
|
4904
4960
|
|
|
4905
4961
|
// src/components/ModalContent.tsx
|
|
4906
|
-
var
|
|
4962
|
+
var import_clsx26 = __toESM(require("clsx"), 1);
|
|
4907
4963
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4908
4964
|
function ModalContent({
|
|
4909
4965
|
fixedHeightScrolling,
|
|
@@ -4916,7 +4972,7 @@ function ModalContent({
|
|
|
4916
4972
|
{
|
|
4917
4973
|
id,
|
|
4918
4974
|
"data-testid": testid,
|
|
4919
|
-
className: (0,
|
|
4975
|
+
className: (0, import_clsx26.default)(
|
|
4920
4976
|
"flex-grow desktop:flex-grow-0",
|
|
4921
4977
|
layoutPaddding,
|
|
4922
4978
|
fixedHeightScrolling && "overflow-auto"
|
|
@@ -4928,7 +4984,7 @@ function ModalContent({
|
|
|
4928
4984
|
ModalContent.displayName = "ModalContent";
|
|
4929
4985
|
|
|
4930
4986
|
// src/components/ModalButtons.tsx
|
|
4931
|
-
var
|
|
4987
|
+
var import_clsx27 = __toESM(require("clsx"), 1);
|
|
4932
4988
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4933
4989
|
var ModalButtons = ({
|
|
4934
4990
|
onClose,
|
|
@@ -4943,7 +4999,7 @@ var ModalButtons = ({
|
|
|
4943
4999
|
{
|
|
4944
5000
|
id,
|
|
4945
5001
|
"data-testid": testid,
|
|
4946
|
-
className: (0,
|
|
5002
|
+
className: (0, import_clsx27.default)(
|
|
4947
5003
|
"border-t border-neutral-300 flex justify-end",
|
|
4948
5004
|
mobileButtonStack && "flex-col ",
|
|
4949
5005
|
layoutPaddding,
|
|
@@ -4981,7 +5037,7 @@ var ModalButtons = ({
|
|
|
4981
5037
|
ModalButtons.displayName = "ModalButtons";
|
|
4982
5038
|
|
|
4983
5039
|
// src/components/ModalScrim.tsx
|
|
4984
|
-
var
|
|
5040
|
+
var import_clsx28 = __toESM(require("clsx"), 1);
|
|
4985
5041
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4986
5042
|
var ModalScrim = ({
|
|
4987
5043
|
show = false,
|
|
@@ -4997,7 +5053,7 @@ var ModalScrim = ({
|
|
|
4997
5053
|
{
|
|
4998
5054
|
id,
|
|
4999
5055
|
"data-testid": testid,
|
|
5000
|
-
className: (0,
|
|
5056
|
+
className: (0, import_clsx28.default)(
|
|
5001
5057
|
"overflow-y-auto h-dvh transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center group bg-neutral-600/50 fixed opacity-0",
|
|
5002
5058
|
!show && " pointer-events-none",
|
|
5003
5059
|
size === "small" && "p-4",
|
|
@@ -5218,7 +5274,7 @@ var Modal = ({
|
|
|
5218
5274
|
id,
|
|
5219
5275
|
"data-testid": testid,
|
|
5220
5276
|
ref: modalRef,
|
|
5221
|
-
className: (0,
|
|
5277
|
+
className: (0, import_clsx29.default)(
|
|
5222
5278
|
"shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0",
|
|
5223
5279
|
computedFixedHeightScrolling && size !== "screen" && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
|
|
5224
5280
|
className,
|
|
@@ -5282,10 +5338,10 @@ var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
|
5282
5338
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5283
5339
|
|
|
5284
5340
|
// src/components/MobileDataGrid/ColumnList.tsx
|
|
5285
|
-
var
|
|
5341
|
+
var import_clsx31 = __toESM(require("clsx"), 1);
|
|
5286
5342
|
|
|
5287
5343
|
// src/components/MobileDataGrid/MobileDataGridCard/index.tsx
|
|
5288
|
-
var
|
|
5344
|
+
var import_clsx30 = __toESM(require("clsx"), 1);
|
|
5289
5345
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5290
5346
|
|
|
5291
5347
|
// src/components/MobileDataGrid/ColumnList.tsx
|
|
@@ -5305,7 +5361,7 @@ var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
|
5305
5361
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5306
5362
|
|
|
5307
5363
|
// src/components/Grid.tsx
|
|
5308
|
-
var
|
|
5364
|
+
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
5309
5365
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5310
5366
|
|
|
5311
5367
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
@@ -5316,7 +5372,7 @@ var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
|
5316
5372
|
var import_react30 = require("react");
|
|
5317
5373
|
|
|
5318
5374
|
// src/components/Surface.tsx
|
|
5319
|
-
var
|
|
5375
|
+
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
5320
5376
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5321
5377
|
var Surface = (_a) => {
|
|
5322
5378
|
var _b = _a, {
|
|
@@ -5334,7 +5390,7 @@ var Surface = (_a) => {
|
|
|
5334
5390
|
"div",
|
|
5335
5391
|
__spreadProps(__spreadValues({
|
|
5336
5392
|
id,
|
|
5337
|
-
className: (0,
|
|
5393
|
+
className: (0, import_clsx33.default)(
|
|
5338
5394
|
"rounded-base",
|
|
5339
5395
|
{
|
|
5340
5396
|
"shadow-2": elevation === 2,
|
|
@@ -5354,7 +5410,7 @@ Surface.displayName = "Surface";
|
|
|
5354
5410
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5355
5411
|
|
|
5356
5412
|
// src/components/ProductImagePreview/CarouselPagination.tsx
|
|
5357
|
-
var
|
|
5413
|
+
var import_clsx34 = require("clsx");
|
|
5358
5414
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5359
5415
|
|
|
5360
5416
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
@@ -5369,21 +5425,21 @@ var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
|
5369
5425
|
|
|
5370
5426
|
// src/components/CompactImagesPreview.tsx
|
|
5371
5427
|
var import_react33 = require("react");
|
|
5372
|
-
var
|
|
5428
|
+
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
5373
5429
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5374
5430
|
|
|
5375
5431
|
// src/components/SimpleTable.tsx
|
|
5376
|
-
var
|
|
5432
|
+
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
5377
5433
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5378
5434
|
|
|
5379
5435
|
// src/components/ListGroup.tsx
|
|
5380
5436
|
var import_react34 = require("react");
|
|
5381
|
-
var
|
|
5437
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5382
5438
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5383
5439
|
|
|
5384
5440
|
// src/components/Pagination.tsx
|
|
5385
5441
|
var import_react35 = require("react");
|
|
5386
|
-
var
|
|
5442
|
+
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5387
5443
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5388
5444
|
var Pagination = ({
|
|
5389
5445
|
totalPages,
|
|
@@ -5448,7 +5504,7 @@ var Pagination = ({
|
|
|
5448
5504
|
return tokens;
|
|
5449
5505
|
}, [totalPages, currentPage]);
|
|
5450
5506
|
if (totalPages <= 1) return null;
|
|
5451
|
-
const buttonClass = (0,
|
|
5507
|
+
const buttonClass = (0, import_clsx38.default)(
|
|
5452
5508
|
"cursor-pointer disabled:cursor-default",
|
|
5453
5509
|
paddingUsingComponentGap,
|
|
5454
5510
|
"w-8 h-8",
|
|
@@ -5466,7 +5522,7 @@ var Pagination = ({
|
|
|
5466
5522
|
"data-testid": testid,
|
|
5467
5523
|
"aria-label": "Pagination",
|
|
5468
5524
|
onKeyDown: handleKey,
|
|
5469
|
-
className: (0,
|
|
5525
|
+
className: (0, import_clsx38.default)(
|
|
5470
5526
|
"flex items-center",
|
|
5471
5527
|
"border border-border-primary-normal",
|
|
5472
5528
|
"bg-background-grouped-primary-normal",
|
|
@@ -5480,11 +5536,11 @@ var Pagination = ({
|
|
|
5480
5536
|
disabled: disabled || currentPage <= 1,
|
|
5481
5537
|
"aria-label": "Previous page",
|
|
5482
5538
|
onClick: () => goTo(currentPage - 1),
|
|
5483
|
-
className: (0,
|
|
5539
|
+
className: (0, import_clsx38.default)(buttonClass, "border-r-1 border-border-primary-normal"),
|
|
5484
5540
|
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_left" })
|
|
5485
5541
|
}
|
|
5486
5542
|
),
|
|
5487
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: (0,
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: (0, import_clsx38.default)("flex items-center"), children: pageTokens.map((token, index) => {
|
|
5488
5544
|
if (token === "ellipsis") {
|
|
5489
5545
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5490
5546
|
"li",
|
|
@@ -5503,7 +5559,7 @@ var Pagination = ({
|
|
|
5503
5559
|
"aria-current": selected ? "page" : void 0,
|
|
5504
5560
|
disabled,
|
|
5505
5561
|
onClick: () => goTo(token),
|
|
5506
|
-
className: (0,
|
|
5562
|
+
className: (0, import_clsx38.default)(
|
|
5507
5563
|
buttonClass,
|
|
5508
5564
|
selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
|
|
5509
5565
|
),
|
|
@@ -5517,7 +5573,7 @@ var Pagination = ({
|
|
|
5517
5573
|
disabled: disabled || currentPage >= totalPages,
|
|
5518
5574
|
"aria-label": "Next page",
|
|
5519
5575
|
onClick: () => goTo(currentPage + 1),
|
|
5520
|
-
className: (0,
|
|
5576
|
+
className: (0, import_clsx38.default)(buttonClass, "border-l-1 border-border-primary-normal"),
|
|
5521
5577
|
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_right" })
|
|
5522
5578
|
}
|
|
5523
5579
|
)
|
|
@@ -5538,7 +5594,7 @@ var import_react36 = require("react");
|
|
|
5538
5594
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5539
5595
|
|
|
5540
5596
|
// src/components/Alert.tsx
|
|
5541
|
-
var
|
|
5597
|
+
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
5542
5598
|
var import_react37 = require("react");
|
|
5543
5599
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5544
5600
|
|
|
@@ -5551,10 +5607,10 @@ var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
|
5551
5607
|
var EditingContext = (0, import_react38.createContext)(null);
|
|
5552
5608
|
|
|
5553
5609
|
// src/components/AccessCard.tsx
|
|
5554
|
-
var
|
|
5610
|
+
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
5555
5611
|
|
|
5556
5612
|
// src/components/Radio.tsx
|
|
5557
|
-
var
|
|
5613
|
+
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
5558
5614
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5559
5615
|
var Radio = (_a) => {
|
|
5560
5616
|
var _b = _a, {
|
|
@@ -5578,16 +5634,16 @@ var Radio = (_a) => {
|
|
|
5578
5634
|
]);
|
|
5579
5635
|
const radioId = id;
|
|
5580
5636
|
const paragraphColor = disabled ? "text-primary-disabled" : error ? "text-primary-error" : "text-primary-normal";
|
|
5581
|
-
const defaultClassName = (0,
|
|
5637
|
+
const defaultClassName = (0, import_clsx40.default)(
|
|
5582
5638
|
!error && !disabled && "border-border-primary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-focus:border-border-action-hover peer-focus:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active peer-checked:border-0 peer-checked:bg-background-action-secondary-hover"
|
|
5583
5639
|
);
|
|
5584
|
-
const errorClassName = (0,
|
|
5640
|
+
const errorClassName = (0, import_clsx40.default)(
|
|
5585
5641
|
error && !disabled && "border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-focus:border-border-action-critical-hover peer-focus:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active peer-checked:bg-background-action-critical-secondary-hover peer-checked:border-0 "
|
|
5586
5642
|
);
|
|
5587
|
-
const disabledClassName = (0,
|
|
5643
|
+
const disabledClassName = (0, import_clsx40.default)(
|
|
5588
5644
|
disabled && "peer-disabled:bg-background-action-secondary-disabled peer-disabled:border-border-primary-normal peer-checked:border-0"
|
|
5589
5645
|
);
|
|
5590
|
-
const readonlyClassName = (0,
|
|
5646
|
+
const readonlyClassName = (0, import_clsx40.default)(
|
|
5591
5647
|
readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
|
|
5592
5648
|
);
|
|
5593
5649
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
@@ -5595,7 +5651,7 @@ var Radio = (_a) => {
|
|
|
5595
5651
|
{
|
|
5596
5652
|
htmlFor: radioId,
|
|
5597
5653
|
"data-testid": testid,
|
|
5598
|
-
className: (0,
|
|
5654
|
+
className: (0, import_clsx40.default)(
|
|
5599
5655
|
"flex items-center",
|
|
5600
5656
|
componentGap,
|
|
5601
5657
|
disabled ? "cursor-default" : "cursor-pointer",
|
|
@@ -5618,7 +5674,7 @@ var Radio = (_a) => {
|
|
|
5618
5674
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5619
5675
|
"div",
|
|
5620
5676
|
{
|
|
5621
|
-
className: (0,
|
|
5677
|
+
className: (0, import_clsx40.default)(
|
|
5622
5678
|
"size-6 rounded-full border flex items-center justify-center",
|
|
5623
5679
|
baseTransition,
|
|
5624
5680
|
defaultClassName,
|
|
@@ -5629,7 +5685,7 @@ var Radio = (_a) => {
|
|
|
5629
5685
|
children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5630
5686
|
RadioIcon,
|
|
5631
5687
|
{
|
|
5632
|
-
className: (0,
|
|
5688
|
+
className: (0, import_clsx40.default)(
|
|
5633
5689
|
"transition-colors",
|
|
5634
5690
|
!error && !disabled && "text-icon-on-action-secondary-normal hover:text-icon-on-action-secondary-hover active:text-icon-on-action-secondary-active peer-hover:text-icon-on-action-secondary-hover peer-focus:text-icon-on-action-secondary-hover peer-active:text-icon-on-action-secondary-active",
|
|
5635
5691
|
error && !disabled && "text-icon-action-critical-secondary-normal hover:text-icon-action-critical-secondary-hover active:text-icon-action-critical-secondary-active peer-hover:text-icon-action-critical-secondary-hover peer-focus:text-icon-action-critical-secondary-hover peer-active:text-icon-action-critical-secondary-active",
|
|
@@ -5681,7 +5737,7 @@ RadioIcon.displayName = "RadioIcon";
|
|
|
5681
5737
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5682
5738
|
|
|
5683
5739
|
// src/components/AccessCardGroup.tsx
|
|
5684
|
-
var
|
|
5740
|
+
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
5685
5741
|
var import_react39 = require("react");
|
|
5686
5742
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5687
5743
|
|
|
@@ -5696,9 +5752,9 @@ var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
|
5696
5752
|
var import_react40 = require("react");
|
|
5697
5753
|
|
|
5698
5754
|
// src/components/EmblaCarousel/ArrowButtons.tsx
|
|
5699
|
-
var
|
|
5755
|
+
var import_clsx43 = __toESM(require("clsx"), 1);
|
|
5700
5756
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5701
|
-
var arrowButtonStyles = (0,
|
|
5757
|
+
var arrowButtonStyles = (0, import_clsx43.default)(
|
|
5702
5758
|
"appearance-none bg-transparent border cursor-pointer p-2 flex items-center justify-center size-9 rounded-full transition-colors duration-300 ease-in-out"
|
|
5703
5759
|
);
|
|
5704
5760
|
|
|
@@ -5749,7 +5805,7 @@ function DateCell(_a) {
|
|
|
5749
5805
|
__spreadProps(__spreadValues({}, props), {
|
|
5750
5806
|
id,
|
|
5751
5807
|
"data-testid": testid,
|
|
5752
|
-
className: (0,
|
|
5808
|
+
className: (0, import_clsx44.default)(
|
|
5753
5809
|
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
5754
5810
|
typography.caption,
|
|
5755
5811
|
cellPadding,
|
|
@@ -5905,7 +5961,7 @@ function CalendarRange({
|
|
|
5905
5961
|
{
|
|
5906
5962
|
id,
|
|
5907
5963
|
"data-testid": testid,
|
|
5908
|
-
className: (0,
|
|
5964
|
+
className: (0, import_clsx44.default)(
|
|
5909
5965
|
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
5910
5966
|
layoutPaddding,
|
|
5911
5967
|
layoutGap,
|
|
@@ -5916,7 +5972,7 @@ function CalendarRange({
|
|
|
5916
5972
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5917
5973
|
"div",
|
|
5918
5974
|
{
|
|
5919
|
-
className: (0,
|
|
5975
|
+
className: (0, import_clsx44.default)(
|
|
5920
5976
|
"flex flex-row items-start justify-start bg-background-primary-normal overflow-clip",
|
|
5921
5977
|
layoutGap
|
|
5922
5978
|
),
|
|
@@ -5990,12 +6046,12 @@ function CalendarPane({
|
|
|
5990
6046
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5991
6047
|
"div",
|
|
5992
6048
|
{
|
|
5993
|
-
className: (0,
|
|
6049
|
+
className: (0, import_clsx44.default)("flex flex-col"),
|
|
5994
6050
|
children: [
|
|
5995
6051
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5996
6052
|
"div",
|
|
5997
6053
|
{
|
|
5998
|
-
className: (0,
|
|
6054
|
+
className: (0, import_clsx44.default)(
|
|
5999
6055
|
"flex flex-row items-center justify-between",
|
|
6000
6056
|
typography.label,
|
|
6001
6057
|
"text-text-action-primary-normal"
|
|
@@ -6007,7 +6063,7 @@ function CalendarPane({
|
|
|
6007
6063
|
id: id ? `${id}-prev-month-button` : void 0,
|
|
6008
6064
|
"data-testid": testid ? `${testid}-prev-month-button` : void 0,
|
|
6009
6065
|
type: "button",
|
|
6010
|
-
className: (0,
|
|
6066
|
+
className: (0, import_clsx44.default)(
|
|
6011
6067
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
6012
6068
|
componentPadding
|
|
6013
6069
|
),
|
|
@@ -6015,7 +6071,7 @@ function CalendarPane({
|
|
|
6015
6071
|
onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
|
|
6016
6072
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: "chevron_left", size: 24 })
|
|
6017
6073
|
}
|
|
6018
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: (0,
|
|
6074
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: (0, import_clsx44.default)(componentPadding, "mr-1") }),
|
|
6019
6075
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
|
|
6020
6076
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6021
6077
|
"button",
|
|
@@ -6094,7 +6150,7 @@ function CalendarPane({
|
|
|
6094
6150
|
id: id ? `${id}-next-month-button` : void 0,
|
|
6095
6151
|
"data-testid": testid ? `${testid}-next-month-button` : void 0,
|
|
6096
6152
|
type: "button",
|
|
6097
|
-
className: (0,
|
|
6153
|
+
className: (0, import_clsx44.default)(
|
|
6098
6154
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
6099
6155
|
componentPadding
|
|
6100
6156
|
),
|
|
@@ -6102,14 +6158,14 @@ function CalendarPane({
|
|
|
6102
6158
|
onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
|
|
6103
6159
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: "chevron_right", size: 24 })
|
|
6104
6160
|
}
|
|
6105
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: (0,
|
|
6161
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: (0, import_clsx44.default)(componentPadding, "ml-1") })
|
|
6106
6162
|
]
|
|
6107
6163
|
}
|
|
6108
6164
|
),
|
|
6109
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: (0,
|
|
6165
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: (0, import_clsx44.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6110
6166
|
"span",
|
|
6111
6167
|
{
|
|
6112
|
-
className: (0,
|
|
6168
|
+
className: (0, import_clsx44.default)(
|
|
6113
6169
|
typography.caption,
|
|
6114
6170
|
"text-text-secondary-normal text-center",
|
|
6115
6171
|
"w-10"
|
|
@@ -6118,7 +6174,7 @@ function CalendarPane({
|
|
|
6118
6174
|
},
|
|
6119
6175
|
d
|
|
6120
6176
|
)) }),
|
|
6121
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: (0,
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: (0, import_clsx44.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
|
|
6122
6178
|
const day = i - emptyCells + 1;
|
|
6123
6179
|
const date = month.date.with({ day: 1 }).add({
|
|
6124
6180
|
days: i - emptyCells
|
|
@@ -6160,7 +6216,7 @@ function CalendarPane({
|
|
|
6160
6216
|
mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6161
6217
|
"div",
|
|
6162
6218
|
{
|
|
6163
|
-
className: (0,
|
|
6219
|
+
className: (0, import_clsx44.default)(
|
|
6164
6220
|
"self-stretch bg-border-primary-normal rounded-base",
|
|
6165
6221
|
// 1px width, full height, matches Figma divider
|
|
6166
6222
|
"w-px"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalendarRange
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-ZXP2GIWZ.js";
|
|
4
|
+
import "../chunk-M7INAUAJ.js";
|
|
4
5
|
import "../chunk-4DPSNQCM.js";
|
|
5
6
|
import "../chunk-Q4YDNW7N.js";
|
|
6
|
-
import "../chunk-M7INAUAJ.js";
|
|
7
7
|
import "../chunk-KOKA2IJC.js";
|
|
8
8
|
import "../chunk-MBZ55T2D.js";
|
|
9
9
|
import "../chunk-2IKT6IHB.js";
|
|
@@ -15,8 +15,8 @@ import "../chunk-3N34VVYD.js";
|
|
|
15
15
|
import "../chunk-B4AE3DCA.js";
|
|
16
16
|
import "../chunk-FP3Y5JJN.js";
|
|
17
17
|
import "../chunk-5IFPG6TS.js";
|
|
18
|
-
import "../chunk-6EYMKEJ6.js";
|
|
19
18
|
import "../chunk-AJ5M6MVX.js";
|
|
19
|
+
import "../chunk-6EYMKEJ6.js";
|
|
20
20
|
import "../chunk-YV5FS7NV.js";
|
|
21
21
|
import "../chunk-Z2HPSFEQ.js";
|
|
22
22
|
import "../chunk-AT4AWD6B.js";
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../../chunk-B4AE3DCA.js";
|
|
4
4
|
import "../../chunk-FP3Y5JJN.js";
|
|
5
5
|
import "../../chunk-5IFPG6TS.js";
|
|
6
|
-
import "../../chunk-6EYMKEJ6.js";
|
|
7
6
|
import "../../chunk-AJ5M6MVX.js";
|
|
7
|
+
import "../../chunk-6EYMKEJ6.js";
|
|
8
8
|
import "../../chunk-M7WHWZ2J.js";
|
|
9
9
|
import "../../chunk-VXWSAIB5.js";
|
|
10
10
|
import "../../chunk-MMZTPVYB.js";
|