@dmsi/wedgekit-react 0.0.884 → 0.0.885
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-4MF6JSE7.js} +78 -19
- package/dist/components/CalendarRange.cjs +133 -77
- package/dist/components/CalendarRange.css +0 -3
- package/dist/components/CalendarRange.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/DataGrid/PinnedColumns.cjs +122 -66
- package/dist/components/DataGrid/PinnedColumns.css +0 -3
- package/dist/components/DataGrid/PinnedColumns.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/DataGrid/index.cjs +133 -77
- package/dist/components/DataGrid/index.css +0 -3
- package/dist/components/DataGrid/index.js +1 -1
- package/dist/components/DataGrid/utils.cjs +121 -65
- package/dist/components/DataGrid/utils.css +0 -3
- package/dist/components/DataGrid/utils.js +1 -1
- package/dist/components/DateInput.cjs +73 -17
- package/dist/components/DateInput.css +0 -3
- package/dist/components/DateInput.js +1 -1
- package/dist/components/DateRangeInput.cjs +133 -77
- package/dist/components/DateRangeInput.css +0 -3
- package/dist/components/DateRangeInput.js +1 -1
- package/dist/components/MobileDataGrid/ColumnList.css +0 -3
- 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 +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +116 -60
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +0 -3
- package/dist/components/MobileDataGrid/MobileDataGridHeader.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 +1 -1
- package/dist/components/index.cjs +152 -96
- package/dist/components/index.css +0 -3
- package/dist/components/index.js +1 -1
- package/dist/index.css +0 -3
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ __export(utils_exports, {
|
|
|
62
62
|
getSortIcon: () => getSortIcon
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(utils_exports);
|
|
65
|
-
var
|
|
65
|
+
var import_clsx44 = __toESM(require("clsx"), 1);
|
|
66
66
|
|
|
67
67
|
// src/components/DataGridCell.tsx
|
|
68
68
|
var import_sortable = require("@dnd-kit/sortable");
|
|
@@ -4381,6 +4381,7 @@ Tooltip.displayName = "Tooltip";
|
|
|
4381
4381
|
// src/components/DateInput.tsx
|
|
4382
4382
|
var import_react21 = require("react");
|
|
4383
4383
|
var import_react_dom3 = require("react-dom");
|
|
4384
|
+
var import_clsx20 = __toESM(require("clsx"), 1);
|
|
4384
4385
|
|
|
4385
4386
|
// src/components/CalendarRange.tsx
|
|
4386
4387
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
@@ -4935,10 +4936,12 @@ var DateInput = (_a) => {
|
|
|
4935
4936
|
const popoverRef = (0, import_react21.useRef)(null);
|
|
4936
4937
|
const triggerRef = (0, import_react21.useRef)(null);
|
|
4937
4938
|
const rootRef = (0, import_react21.useRef)(null);
|
|
4939
|
+
const isMobile = useMatchesMobile();
|
|
4938
4940
|
const [calendarPosition, setCalendarPosition] = (0, import_react21.useState)({
|
|
4939
4941
|
top: 0,
|
|
4940
4942
|
left: 0,
|
|
4941
|
-
width: 0
|
|
4943
|
+
width: 0,
|
|
4944
|
+
openAbove: false
|
|
4942
4945
|
});
|
|
4943
4946
|
const [from, to] = [value, ""];
|
|
4944
4947
|
(0, import_react21.useEffect)(() => {
|
|
@@ -4954,11 +4957,28 @@ var DateInput = (_a) => {
|
|
|
4954
4957
|
const updatePosition = () => {
|
|
4955
4958
|
if (rootRef.current) {
|
|
4956
4959
|
const rect = rootRef.current.getBoundingClientRect();
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4960
|
+
const viewportWidth = window.innerWidth;
|
|
4961
|
+
const viewportHeight = window.innerHeight;
|
|
4962
|
+
const calendarWidth = 340;
|
|
4963
|
+
const calendarHeight = 400;
|
|
4964
|
+
let viewportLeft = rect.left;
|
|
4965
|
+
if (viewportLeft + calendarWidth > viewportWidth) {
|
|
4966
|
+
viewportLeft = rect.right - calendarWidth;
|
|
4967
|
+
if (viewportLeft < 0) {
|
|
4968
|
+
viewportLeft = Math.max(0, (viewportWidth - calendarWidth) / 2);
|
|
4969
|
+
}
|
|
4970
|
+
}
|
|
4971
|
+
const left = viewportLeft + window.scrollX;
|
|
4972
|
+
const spaceBelow = viewportHeight - rect.bottom;
|
|
4973
|
+
const spaceAbove = rect.top;
|
|
4974
|
+
const openAbove = spaceBelow < calendarHeight && spaceAbove > spaceBelow;
|
|
4975
|
+
let top;
|
|
4976
|
+
if (openAbove) {
|
|
4977
|
+
top = rect.top + window.scrollY - calendarHeight - 4;
|
|
4978
|
+
} else {
|
|
4979
|
+
top = rect.bottom + window.scrollY + 4;
|
|
4980
|
+
}
|
|
4981
|
+
setCalendarPosition({ top, left, width: rect.width, openAbove });
|
|
4962
4982
|
}
|
|
4963
4983
|
};
|
|
4964
4984
|
(0, import_react21.useEffect)(() => {
|
|
@@ -5041,7 +5061,10 @@ var DateInput = (_a) => {
|
|
|
5041
5061
|
if (cursorPosition > 0 && value2[cursorPosition - 1] === sep) {
|
|
5042
5062
|
event.preventDefault();
|
|
5043
5063
|
const newValue = value2.slice(0, cursorPosition - 2) + value2.slice(cursorPosition);
|
|
5044
|
-
const formattedValue = formatInputValueWithDashes(
|
|
5064
|
+
const formattedValue = formatInputValueWithDashes(
|
|
5065
|
+
newValue,
|
|
5066
|
+
dateInDashes
|
|
5067
|
+
);
|
|
5045
5068
|
setInputValue(formattedValue);
|
|
5046
5069
|
requestAnimationFrame(() => {
|
|
5047
5070
|
if (triggerRef.current) {
|
|
@@ -5092,25 +5115,58 @@ var DateInput = (_a) => {
|
|
|
5092
5115
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5093
5116
|
"div",
|
|
5094
5117
|
{
|
|
5095
|
-
className:
|
|
5118
|
+
className: (0, import_clsx20.default)(
|
|
5119
|
+
"fixed inset-0 z-50",
|
|
5120
|
+
isMobile && "overflow-y-auto bg-neutral-600/50"
|
|
5121
|
+
),
|
|
5096
5122
|
onClick: () => setVisible(false),
|
|
5097
5123
|
onMouseDown: (e) => {
|
|
5098
|
-
|
|
5124
|
+
if (!isMobile) {
|
|
5125
|
+
e.preventDefault();
|
|
5126
|
+
}
|
|
5099
5127
|
},
|
|
5100
5128
|
onWheel: (e) => {
|
|
5101
5129
|
var _a2;
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5130
|
+
if (!isMobile) {
|
|
5131
|
+
const scrollableParent = (_a2 = document.scrollingElement) != null ? _a2 : document.documentElement;
|
|
5132
|
+
scrollableParent.scrollTop += e.deltaY;
|
|
5133
|
+
scrollableParent.scrollLeft += e.deltaX;
|
|
5134
|
+
}
|
|
5105
5135
|
},
|
|
5106
5136
|
onTouchMove: (e) => {
|
|
5107
|
-
|
|
5137
|
+
if (!isMobile) {
|
|
5138
|
+
e.stopPropagation();
|
|
5139
|
+
}
|
|
5108
5140
|
},
|
|
5109
|
-
style: { touchAction: "pan-y pan-x" },
|
|
5110
|
-
"aria-hidden": "true"
|
|
5141
|
+
style: { touchAction: isMobile ? "auto" : "pan-y pan-x" },
|
|
5142
|
+
"aria-hidden": "true",
|
|
5143
|
+
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)(
|
|
5144
|
+
"div",
|
|
5145
|
+
{
|
|
5146
|
+
ref: (el) => {
|
|
5147
|
+
popoverRef.current = el;
|
|
5148
|
+
},
|
|
5149
|
+
className: "bg-white rounded-base shadow-4 max-w-full",
|
|
5150
|
+
onClick: (e) => e.stopPropagation(),
|
|
5151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5152
|
+
CalendarRange,
|
|
5153
|
+
{
|
|
5154
|
+
id: id ? `${id}-calendar` : void 0,
|
|
5155
|
+
testid: testid ? `${testid}-calendar` : void 0,
|
|
5156
|
+
from,
|
|
5157
|
+
to: to || from,
|
|
5158
|
+
onChange: handleDateChange,
|
|
5159
|
+
cardStyle: true,
|
|
5160
|
+
mode: "single",
|
|
5161
|
+
disableRange: true,
|
|
5162
|
+
isDateAvailable
|
|
5163
|
+
}
|
|
5164
|
+
)
|
|
5165
|
+
}
|
|
5166
|
+
) })
|
|
5111
5167
|
}
|
|
5112
5168
|
),
|
|
5113
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5169
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5114
5170
|
"div",
|
|
5115
5171
|
{
|
|
5116
5172
|
ref: (el) => {
|
|
@@ -5118,7 +5174,7 @@ var DateInput = (_a) => {
|
|
|
5118
5174
|
},
|
|
5119
5175
|
className: "absolute z-50 bg-white",
|
|
5120
5176
|
style: {
|
|
5121
|
-
top: `${calendarPosition.top
|
|
5177
|
+
top: `${calendarPosition.top}px`,
|
|
5122
5178
|
left: `${calendarPosition.left}px`
|
|
5123
5179
|
},
|
|
5124
5180
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
@@ -5154,21 +5210,21 @@ function formatDisplayValue(from, dateInDashes) {
|
|
|
5154
5210
|
}
|
|
5155
5211
|
|
|
5156
5212
|
// src/components/Accordion.tsx
|
|
5157
|
-
var
|
|
5213
|
+
var import_clsx23 = __toESM(require("clsx"), 1);
|
|
5158
5214
|
|
|
5159
5215
|
// src/components/Card.tsx
|
|
5160
|
-
var
|
|
5216
|
+
var import_clsx21 = __toESM(require("clsx"), 1);
|
|
5161
5217
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5162
5218
|
|
|
5163
5219
|
// src/components/Stack.tsx
|
|
5164
|
-
var
|
|
5220
|
+
var import_clsx22 = __toESM(require("clsx"), 1);
|
|
5165
5221
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
5166
5222
|
|
|
5167
5223
|
// src/components/Accordion.tsx
|
|
5168
5224
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
5169
5225
|
|
|
5170
5226
|
// src/components/Heading.tsx
|
|
5171
|
-
var
|
|
5227
|
+
var import_clsx24 = __toESM(require("clsx"), 1);
|
|
5172
5228
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5173
5229
|
var Heading = (_a) => {
|
|
5174
5230
|
var _b = _a, {
|
|
@@ -5197,7 +5253,7 @@ var Heading = (_a) => {
|
|
|
5197
5253
|
__spreadProps(__spreadValues({
|
|
5198
5254
|
id,
|
|
5199
5255
|
"data-testid": testid,
|
|
5200
|
-
className: (0,
|
|
5256
|
+
className: (0, import_clsx24.default)(
|
|
5201
5257
|
typography[variant],
|
|
5202
5258
|
className,
|
|
5203
5259
|
align === "left" && "text-left",
|
|
@@ -5244,11 +5300,11 @@ var import_react25 = require("react");
|
|
|
5244
5300
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5245
5301
|
|
|
5246
5302
|
// src/components/Modal.tsx
|
|
5247
|
-
var
|
|
5303
|
+
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
5248
5304
|
var import_react27 = require("react");
|
|
5249
5305
|
|
|
5250
5306
|
// src/components/ModalHeader.tsx
|
|
5251
|
-
var
|
|
5307
|
+
var import_clsx25 = __toESM(require("clsx"), 1);
|
|
5252
5308
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5253
5309
|
var ModalHeader = ({
|
|
5254
5310
|
title,
|
|
@@ -5268,7 +5324,7 @@ var ModalHeader = ({
|
|
|
5268
5324
|
{
|
|
5269
5325
|
id,
|
|
5270
5326
|
"data-testid": testid,
|
|
5271
|
-
className: (0,
|
|
5327
|
+
className: (0, import_clsx25.default)(
|
|
5272
5328
|
"flex justify-between items-center",
|
|
5273
5329
|
headerIconAlign === "center" && "justify-center",
|
|
5274
5330
|
headerIconAlign === "right" && "justify-end",
|
|
@@ -5278,7 +5334,7 @@ var ModalHeader = ({
|
|
|
5278
5334
|
headerClassname
|
|
5279
5335
|
),
|
|
5280
5336
|
children: [
|
|
5281
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0,
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0, import_clsx25.default)("flex items-center flex-1", layoutGroupGap), children: [
|
|
5282
5338
|
headerIcon,
|
|
5283
5339
|
title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5284
5340
|
Title,
|
|
@@ -5301,7 +5357,7 @@ var ModalHeader = ({
|
|
|
5301
5357
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5302
5358
|
"span",
|
|
5303
5359
|
{
|
|
5304
|
-
className: (0,
|
|
5360
|
+
className: (0, import_clsx25.default)(
|
|
5305
5361
|
"contents",
|
|
5306
5362
|
headerIconClassname != null ? headerIconClassname : "text-icon-primary-normal"
|
|
5307
5363
|
),
|
|
@@ -5317,7 +5373,7 @@ var ModalHeader = ({
|
|
|
5317
5373
|
ModalHeader.displayName = "ModalHeader";
|
|
5318
5374
|
|
|
5319
5375
|
// src/components/ModalContent.tsx
|
|
5320
|
-
var
|
|
5376
|
+
var import_clsx26 = __toESM(require("clsx"), 1);
|
|
5321
5377
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5322
5378
|
function ModalContent({
|
|
5323
5379
|
fixedHeightScrolling,
|
|
@@ -5330,7 +5386,7 @@ function ModalContent({
|
|
|
5330
5386
|
{
|
|
5331
5387
|
id,
|
|
5332
5388
|
"data-testid": testid,
|
|
5333
|
-
className: (0,
|
|
5389
|
+
className: (0, import_clsx26.default)(
|
|
5334
5390
|
"flex-grow desktop:flex-grow-0",
|
|
5335
5391
|
layoutPaddding,
|
|
5336
5392
|
fixedHeightScrolling && "overflow-auto"
|
|
@@ -5342,7 +5398,7 @@ function ModalContent({
|
|
|
5342
5398
|
ModalContent.displayName = "ModalContent";
|
|
5343
5399
|
|
|
5344
5400
|
// src/components/ModalButtons.tsx
|
|
5345
|
-
var
|
|
5401
|
+
var import_clsx27 = __toESM(require("clsx"), 1);
|
|
5346
5402
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5347
5403
|
var ModalButtons = ({
|
|
5348
5404
|
onClose,
|
|
@@ -5357,7 +5413,7 @@ var ModalButtons = ({
|
|
|
5357
5413
|
{
|
|
5358
5414
|
id,
|
|
5359
5415
|
"data-testid": testid,
|
|
5360
|
-
className: (0,
|
|
5416
|
+
className: (0, import_clsx27.default)(
|
|
5361
5417
|
"border-t border-neutral-300 flex justify-end",
|
|
5362
5418
|
mobileButtonStack && "flex-col ",
|
|
5363
5419
|
layoutPaddding,
|
|
@@ -5395,7 +5451,7 @@ var ModalButtons = ({
|
|
|
5395
5451
|
ModalButtons.displayName = "ModalButtons";
|
|
5396
5452
|
|
|
5397
5453
|
// src/components/ModalScrim.tsx
|
|
5398
|
-
var
|
|
5454
|
+
var import_clsx28 = __toESM(require("clsx"), 1);
|
|
5399
5455
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5400
5456
|
var ModalScrim = ({
|
|
5401
5457
|
show = false,
|
|
@@ -5411,7 +5467,7 @@ var ModalScrim = ({
|
|
|
5411
5467
|
{
|
|
5412
5468
|
id,
|
|
5413
5469
|
"data-testid": testid,
|
|
5414
|
-
className: (0,
|
|
5470
|
+
className: (0, import_clsx28.default)(
|
|
5415
5471
|
"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",
|
|
5416
5472
|
!show && " pointer-events-none",
|
|
5417
5473
|
size === "small" && "p-4",
|
|
@@ -5632,7 +5688,7 @@ var Modal = ({
|
|
|
5632
5688
|
id,
|
|
5633
5689
|
"data-testid": testid,
|
|
5634
5690
|
ref: modalRef,
|
|
5635
|
-
className: (0,
|
|
5691
|
+
className: (0, import_clsx29.default)(
|
|
5636
5692
|
"shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0",
|
|
5637
5693
|
computedFixedHeightScrolling && size !== "screen" && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
|
|
5638
5694
|
className,
|
|
@@ -5696,10 +5752,10 @@ var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
|
5696
5752
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5697
5753
|
|
|
5698
5754
|
// src/components/MobileDataGrid/ColumnList.tsx
|
|
5699
|
-
var
|
|
5755
|
+
var import_clsx31 = __toESM(require("clsx"), 1);
|
|
5700
5756
|
|
|
5701
5757
|
// src/components/MobileDataGrid/MobileDataGridCard/index.tsx
|
|
5702
|
-
var
|
|
5758
|
+
var import_clsx30 = __toESM(require("clsx"), 1);
|
|
5703
5759
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5704
5760
|
|
|
5705
5761
|
// src/components/MobileDataGrid/ColumnList.tsx
|
|
@@ -5719,7 +5775,7 @@ var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
|
5719
5775
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5720
5776
|
|
|
5721
5777
|
// src/components/Grid.tsx
|
|
5722
|
-
var
|
|
5778
|
+
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
5723
5779
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5724
5780
|
|
|
5725
5781
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
@@ -5730,7 +5786,7 @@ var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
|
5730
5786
|
var import_react31 = require("react");
|
|
5731
5787
|
|
|
5732
5788
|
// src/components/Surface.tsx
|
|
5733
|
-
var
|
|
5789
|
+
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
5734
5790
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5735
5791
|
var Surface = (_a) => {
|
|
5736
5792
|
var _b = _a, {
|
|
@@ -5748,7 +5804,7 @@ var Surface = (_a) => {
|
|
|
5748
5804
|
"div",
|
|
5749
5805
|
__spreadProps(__spreadValues({
|
|
5750
5806
|
id,
|
|
5751
|
-
className: (0,
|
|
5807
|
+
className: (0, import_clsx33.default)(
|
|
5752
5808
|
"rounded-base",
|
|
5753
5809
|
{
|
|
5754
5810
|
"shadow-2": elevation === 2,
|
|
@@ -5768,7 +5824,7 @@ Surface.displayName = "Surface";
|
|
|
5768
5824
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5769
5825
|
|
|
5770
5826
|
// src/components/ProductImagePreview/CarouselPagination.tsx
|
|
5771
|
-
var
|
|
5827
|
+
var import_clsx34 = require("clsx");
|
|
5772
5828
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5773
5829
|
|
|
5774
5830
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
@@ -5783,21 +5839,21 @@ var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
|
5783
5839
|
|
|
5784
5840
|
// src/components/CompactImagesPreview.tsx
|
|
5785
5841
|
var import_react34 = require("react");
|
|
5786
|
-
var
|
|
5842
|
+
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
5787
5843
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5788
5844
|
|
|
5789
5845
|
// src/components/SimpleTable.tsx
|
|
5790
|
-
var
|
|
5846
|
+
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
5791
5847
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5792
5848
|
|
|
5793
5849
|
// src/components/ListGroup.tsx
|
|
5794
5850
|
var import_react35 = require("react");
|
|
5795
|
-
var
|
|
5851
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5796
5852
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5797
5853
|
|
|
5798
5854
|
// src/components/Pagination.tsx
|
|
5799
5855
|
var import_react36 = require("react");
|
|
5800
|
-
var
|
|
5856
|
+
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5801
5857
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5802
5858
|
var Pagination = ({
|
|
5803
5859
|
totalPages,
|
|
@@ -5862,7 +5918,7 @@ var Pagination = ({
|
|
|
5862
5918
|
return tokens;
|
|
5863
5919
|
}, [totalPages, currentPage]);
|
|
5864
5920
|
if (totalPages <= 1) return null;
|
|
5865
|
-
const buttonClass = (0,
|
|
5921
|
+
const buttonClass = (0, import_clsx38.default)(
|
|
5866
5922
|
"cursor-pointer disabled:cursor-default",
|
|
5867
5923
|
paddingUsingComponentGap,
|
|
5868
5924
|
"w-8 h-8",
|
|
@@ -5880,7 +5936,7 @@ var Pagination = ({
|
|
|
5880
5936
|
"data-testid": testid,
|
|
5881
5937
|
"aria-label": "Pagination",
|
|
5882
5938
|
onKeyDown: handleKey,
|
|
5883
|
-
className: (0,
|
|
5939
|
+
className: (0, import_clsx38.default)(
|
|
5884
5940
|
"flex items-center",
|
|
5885
5941
|
"border border-border-primary-normal",
|
|
5886
5942
|
"bg-background-grouped-primary-normal",
|
|
@@ -5894,11 +5950,11 @@ var Pagination = ({
|
|
|
5894
5950
|
disabled: disabled || currentPage <= 1,
|
|
5895
5951
|
"aria-label": "Previous page",
|
|
5896
5952
|
onClick: () => goTo(currentPage - 1),
|
|
5897
|
-
className: (0,
|
|
5953
|
+
className: (0, import_clsx38.default)(buttonClass, "border-r-1 border-border-primary-normal"),
|
|
5898
5954
|
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_left" })
|
|
5899
5955
|
}
|
|
5900
5956
|
),
|
|
5901
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: (0,
|
|
5957
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: (0, import_clsx38.default)("flex items-center"), children: pageTokens.map((token, index) => {
|
|
5902
5958
|
if (token === "ellipsis") {
|
|
5903
5959
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5904
5960
|
"li",
|
|
@@ -5917,7 +5973,7 @@ var Pagination = ({
|
|
|
5917
5973
|
"aria-current": selected ? "page" : void 0,
|
|
5918
5974
|
disabled,
|
|
5919
5975
|
onClick: () => goTo(token),
|
|
5920
|
-
className: (0,
|
|
5976
|
+
className: (0, import_clsx38.default)(
|
|
5921
5977
|
buttonClass,
|
|
5922
5978
|
selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
|
|
5923
5979
|
),
|
|
@@ -5931,7 +5987,7 @@ var Pagination = ({
|
|
|
5931
5987
|
disabled: disabled || currentPage >= totalPages,
|
|
5932
5988
|
"aria-label": "Next page",
|
|
5933
5989
|
onClick: () => goTo(currentPage + 1),
|
|
5934
|
-
className: (0,
|
|
5990
|
+
className: (0, import_clsx38.default)(buttonClass, "border-l-1 border-border-primary-normal"),
|
|
5935
5991
|
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_right" })
|
|
5936
5992
|
}
|
|
5937
5993
|
)
|
|
@@ -5952,7 +6008,7 @@ var import_react37 = require("react");
|
|
|
5952
6008
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5953
6009
|
|
|
5954
6010
|
// src/components/Alert.tsx
|
|
5955
|
-
var
|
|
6011
|
+
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
5956
6012
|
var import_react38 = require("react");
|
|
5957
6013
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5958
6014
|
|
|
@@ -5965,10 +6021,10 @@ var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
|
5965
6021
|
var EditingContext = (0, import_react39.createContext)(null);
|
|
5966
6022
|
|
|
5967
6023
|
// src/components/AccessCard.tsx
|
|
5968
|
-
var
|
|
6024
|
+
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
5969
6025
|
|
|
5970
6026
|
// src/components/Radio.tsx
|
|
5971
|
-
var
|
|
6027
|
+
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
5972
6028
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5973
6029
|
var Radio = (_a) => {
|
|
5974
6030
|
var _b = _a, {
|
|
@@ -5992,16 +6048,16 @@ var Radio = (_a) => {
|
|
|
5992
6048
|
]);
|
|
5993
6049
|
const radioId = id;
|
|
5994
6050
|
const paragraphColor = disabled ? "text-primary-disabled" : error ? "text-primary-error" : "text-primary-normal";
|
|
5995
|
-
const defaultClassName = (0,
|
|
6051
|
+
const defaultClassName = (0, import_clsx40.default)(
|
|
5996
6052
|
!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"
|
|
5997
6053
|
);
|
|
5998
|
-
const errorClassName = (0,
|
|
6054
|
+
const errorClassName = (0, import_clsx40.default)(
|
|
5999
6055
|
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 "
|
|
6000
6056
|
);
|
|
6001
|
-
const disabledClassName = (0,
|
|
6057
|
+
const disabledClassName = (0, import_clsx40.default)(
|
|
6002
6058
|
disabled && "peer-disabled:bg-background-action-secondary-disabled peer-disabled:border-border-primary-normal peer-checked:border-0"
|
|
6003
6059
|
);
|
|
6004
|
-
const readonlyClassName = (0,
|
|
6060
|
+
const readonlyClassName = (0, import_clsx40.default)(
|
|
6005
6061
|
readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
|
|
6006
6062
|
);
|
|
6007
6063
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
@@ -6009,7 +6065,7 @@ var Radio = (_a) => {
|
|
|
6009
6065
|
{
|
|
6010
6066
|
htmlFor: radioId,
|
|
6011
6067
|
"data-testid": testid,
|
|
6012
|
-
className: (0,
|
|
6068
|
+
className: (0, import_clsx40.default)(
|
|
6013
6069
|
"flex items-center",
|
|
6014
6070
|
componentGap,
|
|
6015
6071
|
disabled ? "cursor-default" : "cursor-pointer",
|
|
@@ -6032,7 +6088,7 @@ var Radio = (_a) => {
|
|
|
6032
6088
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
6033
6089
|
"div",
|
|
6034
6090
|
{
|
|
6035
|
-
className: (0,
|
|
6091
|
+
className: (0, import_clsx40.default)(
|
|
6036
6092
|
"size-6 rounded-full border flex items-center justify-center",
|
|
6037
6093
|
baseTransition,
|
|
6038
6094
|
defaultClassName,
|
|
@@ -6043,7 +6099,7 @@ var Radio = (_a) => {
|
|
|
6043
6099
|
children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
6044
6100
|
RadioIcon,
|
|
6045
6101
|
{
|
|
6046
|
-
className: (0,
|
|
6102
|
+
className: (0, import_clsx40.default)(
|
|
6047
6103
|
"transition-colors",
|
|
6048
6104
|
!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",
|
|
6049
6105
|
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",
|
|
@@ -6095,7 +6151,7 @@ RadioIcon.displayName = "RadioIcon";
|
|
|
6095
6151
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
6096
6152
|
|
|
6097
6153
|
// src/components/AccessCardGroup.tsx
|
|
6098
|
-
var
|
|
6154
|
+
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
6099
6155
|
var import_react40 = require("react");
|
|
6100
6156
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6101
6157
|
|
|
@@ -6110,9 +6166,9 @@ var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
|
6110
6166
|
var import_react41 = require("react");
|
|
6111
6167
|
|
|
6112
6168
|
// src/components/EmblaCarousel/ArrowButtons.tsx
|
|
6113
|
-
var
|
|
6169
|
+
var import_clsx43 = __toESM(require("clsx"), 1);
|
|
6114
6170
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
6115
|
-
var arrowButtonStyles = (0,
|
|
6171
|
+
var arrowButtonStyles = (0, import_clsx43.default)(
|
|
6116
6172
|
"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"
|
|
6117
6173
|
);
|
|
6118
6174
|
|
|
@@ -6125,7 +6181,7 @@ var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
|
6125
6181
|
// src/components/DataGrid/utils.tsx
|
|
6126
6182
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
6127
6183
|
function getSortIcon(sort, nextSort = false) {
|
|
6128
|
-
const iconClassName = (0,
|
|
6184
|
+
const iconClassName = (0, import_clsx44.default)(
|
|
6129
6185
|
"text-icon-on-action-primary-normal",
|
|
6130
6186
|
nextSort && "hidden group-hover:block"
|
|
6131
6187
|
);
|
|
@@ -64,6 +64,7 @@ __export(DateInput_exports, {
|
|
|
64
64
|
module.exports = __toCommonJS(DateInput_exports);
|
|
65
65
|
var import_react43 = require("react");
|
|
66
66
|
var import_react_dom4 = require("react-dom");
|
|
67
|
+
var import_clsx44 = __toESM(require("clsx"), 1);
|
|
67
68
|
|
|
68
69
|
// src/components/Input.tsx
|
|
69
70
|
var import_react = require("react");
|
|
@@ -5920,10 +5921,12 @@ var DateInput = (_a) => {
|
|
|
5920
5921
|
const popoverRef = (0, import_react43.useRef)(null);
|
|
5921
5922
|
const triggerRef = (0, import_react43.useRef)(null);
|
|
5922
5923
|
const rootRef = (0, import_react43.useRef)(null);
|
|
5924
|
+
const isMobile = useMatchesMobile();
|
|
5923
5925
|
const [calendarPosition, setCalendarPosition] = (0, import_react43.useState)({
|
|
5924
5926
|
top: 0,
|
|
5925
5927
|
left: 0,
|
|
5926
|
-
width: 0
|
|
5928
|
+
width: 0,
|
|
5929
|
+
openAbove: false
|
|
5927
5930
|
});
|
|
5928
5931
|
const [from, to] = [value, ""];
|
|
5929
5932
|
(0, import_react43.useEffect)(() => {
|
|
@@ -5939,11 +5942,28 @@ var DateInput = (_a) => {
|
|
|
5939
5942
|
const updatePosition = () => {
|
|
5940
5943
|
if (rootRef.current) {
|
|
5941
5944
|
const rect = rootRef.current.getBoundingClientRect();
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5945
|
+
const viewportWidth = window.innerWidth;
|
|
5946
|
+
const viewportHeight = window.innerHeight;
|
|
5947
|
+
const calendarWidth = 340;
|
|
5948
|
+
const calendarHeight = 400;
|
|
5949
|
+
let viewportLeft = rect.left;
|
|
5950
|
+
if (viewportLeft + calendarWidth > viewportWidth) {
|
|
5951
|
+
viewportLeft = rect.right - calendarWidth;
|
|
5952
|
+
if (viewportLeft < 0) {
|
|
5953
|
+
viewportLeft = Math.max(0, (viewportWidth - calendarWidth) / 2);
|
|
5954
|
+
}
|
|
5955
|
+
}
|
|
5956
|
+
const left = viewportLeft + window.scrollX;
|
|
5957
|
+
const spaceBelow = viewportHeight - rect.bottom;
|
|
5958
|
+
const spaceAbove = rect.top;
|
|
5959
|
+
const openAbove = spaceBelow < calendarHeight && spaceAbove > spaceBelow;
|
|
5960
|
+
let top;
|
|
5961
|
+
if (openAbove) {
|
|
5962
|
+
top = rect.top + window.scrollY - calendarHeight - 4;
|
|
5963
|
+
} else {
|
|
5964
|
+
top = rect.bottom + window.scrollY + 4;
|
|
5965
|
+
}
|
|
5966
|
+
setCalendarPosition({ top, left, width: rect.width, openAbove });
|
|
5947
5967
|
}
|
|
5948
5968
|
};
|
|
5949
5969
|
(0, import_react43.useEffect)(() => {
|
|
@@ -6026,7 +6046,10 @@ var DateInput = (_a) => {
|
|
|
6026
6046
|
if (cursorPosition > 0 && value2[cursorPosition - 1] === sep) {
|
|
6027
6047
|
event.preventDefault();
|
|
6028
6048
|
const newValue = value2.slice(0, cursorPosition - 2) + value2.slice(cursorPosition);
|
|
6029
|
-
const formattedValue = formatInputValueWithDashes(
|
|
6049
|
+
const formattedValue = formatInputValueWithDashes(
|
|
6050
|
+
newValue,
|
|
6051
|
+
dateInDashes
|
|
6052
|
+
);
|
|
6030
6053
|
setInputValue(formattedValue);
|
|
6031
6054
|
requestAnimationFrame(() => {
|
|
6032
6055
|
if (triggerRef.current) {
|
|
@@ -6077,25 +6100,58 @@ var DateInput = (_a) => {
|
|
|
6077
6100
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6078
6101
|
"div",
|
|
6079
6102
|
{
|
|
6080
|
-
className:
|
|
6103
|
+
className: (0, import_clsx44.default)(
|
|
6104
|
+
"fixed inset-0 z-50",
|
|
6105
|
+
isMobile && "overflow-y-auto bg-neutral-600/50"
|
|
6106
|
+
),
|
|
6081
6107
|
onClick: () => setVisible(false),
|
|
6082
6108
|
onMouseDown: (e) => {
|
|
6083
|
-
|
|
6109
|
+
if (!isMobile) {
|
|
6110
|
+
e.preventDefault();
|
|
6111
|
+
}
|
|
6084
6112
|
},
|
|
6085
6113
|
onWheel: (e) => {
|
|
6086
6114
|
var _a2;
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6115
|
+
if (!isMobile) {
|
|
6116
|
+
const scrollableParent = (_a2 = document.scrollingElement) != null ? _a2 : document.documentElement;
|
|
6117
|
+
scrollableParent.scrollTop += e.deltaY;
|
|
6118
|
+
scrollableParent.scrollLeft += e.deltaX;
|
|
6119
|
+
}
|
|
6090
6120
|
},
|
|
6091
6121
|
onTouchMove: (e) => {
|
|
6092
|
-
|
|
6122
|
+
if (!isMobile) {
|
|
6123
|
+
e.stopPropagation();
|
|
6124
|
+
}
|
|
6093
6125
|
},
|
|
6094
|
-
style: { touchAction: "pan-y pan-x" },
|
|
6095
|
-
"aria-hidden": "true"
|
|
6126
|
+
style: { touchAction: isMobile ? "auto" : "pan-y pan-x" },
|
|
6127
|
+
"aria-hidden": "true",
|
|
6128
|
+
children: isMobile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "min-h-full flex items-start justify-center py-4 px-2", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6129
|
+
"div",
|
|
6130
|
+
{
|
|
6131
|
+
ref: (el) => {
|
|
6132
|
+
popoverRef.current = el;
|
|
6133
|
+
},
|
|
6134
|
+
className: "bg-white rounded-base shadow-4 max-w-full",
|
|
6135
|
+
onClick: (e) => e.stopPropagation(),
|
|
6136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6137
|
+
CalendarRange,
|
|
6138
|
+
{
|
|
6139
|
+
id: id ? `${id}-calendar` : void 0,
|
|
6140
|
+
testid: testid ? `${testid}-calendar` : void 0,
|
|
6141
|
+
from,
|
|
6142
|
+
to: to || from,
|
|
6143
|
+
onChange: handleDateChange,
|
|
6144
|
+
cardStyle: true,
|
|
6145
|
+
mode: "single",
|
|
6146
|
+
disableRange: true,
|
|
6147
|
+
isDateAvailable
|
|
6148
|
+
}
|
|
6149
|
+
)
|
|
6150
|
+
}
|
|
6151
|
+
) })
|
|
6096
6152
|
}
|
|
6097
6153
|
),
|
|
6098
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6154
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6099
6155
|
"div",
|
|
6100
6156
|
{
|
|
6101
6157
|
ref: (el) => {
|
|
@@ -6103,7 +6159,7 @@ var DateInput = (_a) => {
|
|
|
6103
6159
|
},
|
|
6104
6160
|
className: "absolute z-50 bg-white",
|
|
6105
6161
|
style: {
|
|
6106
|
-
top: `${calendarPosition.top
|
|
6162
|
+
top: `${calendarPosition.top}px`,
|
|
6107
6163
|
left: `${calendarPosition.left}px`
|
|
6108
6164
|
},
|
|
6109
6165
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|