@epam/uui 6.2.0-alpha.2 → 6.3.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/components/buttons/LinkButton.d.ts +2 -2
- package/components/buttons/LinkButton.d.ts.map +1 -1
- package/components/buttons/TabButton.d.ts +2 -2
- package/components/buttons/TabButton.d.ts.map +1 -1
- package/components/buttons/VerticalTabButton.d.ts +61 -4
- package/components/buttons/VerticalTabButton.d.ts.map +1 -1
- package/components/fileUpload/FileCard.d.ts.map +1 -1
- package/components/filters/FilterPickerBody.d.ts.map +1 -1
- package/components/filters/PresetPanel/Preset.d.ts +1 -0
- package/components/filters/PresetPanel/Preset.d.ts.map +1 -1
- package/components/filters/PresetPanel/PresetActionsDropdown.d.ts +1 -0
- package/components/filters/PresetPanel/PresetActionsDropdown.d.ts.map +1 -1
- package/components/filters/PresetPanel/PresetsPanel.d.ts +2 -0
- package/components/filters/PresetPanel/PresetsPanel.d.ts.map +1 -1
- package/components/inputs/timePicker/TimePickerBody.d.ts.map +1 -1
- package/components/layout/ScrollBars.d.ts +80 -3
- package/components/layout/ScrollBars.d.ts.map +1 -1
- package/components/layout/Tabs.d.ts +19 -0
- package/components/layout/Tabs.d.ts.map +1 -0
- package/components/layout/Tree.d.ts +41 -0
- package/components/layout/Tree.d.ts.map +1 -0
- package/components/layout/VirtualList.d.ts +3 -10
- package/components/layout/VirtualList.d.ts.map +1 -1
- package/components/layout/index.d.ts +2 -0
- package/components/layout/index.d.ts.map +1 -1
- package/components/navigation/MainMenu/Burger/BurgerButton.d.ts +5 -5
- package/components/navigation/MainMenu/Burger/BurgerButton.d.ts.map +1 -1
- package/components/navigation/MainMenu/MainMenuButton.d.ts +3 -3
- package/components/navigation/MainMenu/MainMenuButton.d.ts.map +1 -1
- package/components/navigation/MainMenu/MainMenuDropdown.d.ts +2 -4
- package/components/navigation/MainMenu/MainMenuDropdown.d.ts.map +1 -1
- package/components/navigation/index.d.ts +1 -0
- package/components/navigation/index.d.ts.map +1 -1
- package/components/overlays/DropdownMenu.d.ts.map +1 -1
- package/components/pickers/DataPickerBody.d.ts.map +1 -1
- package/components/pickers/PickerItem.d.ts.map +1 -1
- package/components/tables/DataTable.d.ts.map +1 -1
- package/components/tables/columnsConfigurationModal/ColumnRow.d.ts.map +1 -1
- package/components/tables/columnsConfigurationModal/ColumnsConfigurationModal.d.ts +2 -1
- package/components/tables/columnsConfigurationModal/ColumnsConfigurationModal.d.ts.map +1 -1
- package/components/tables/columnsConfigurationModal/PinIconButton.d.ts.map +1 -1
- package/components/typography/Text.d.ts +11 -5
- package/components/typography/Text.d.ts.map +1 -1
- package/index.esm.js +733 -464
- package/index.esm.js.map +1 -1
- package/index.js +738 -459
- package/index.js.map +1 -1
- package/package.json +7 -5
- package/settings.d.ts +16 -1
- package/settings.d.ts.map +1 -1
- package/stats.html +19 -1
- package/styles.css +3131 -2952
- package/styles.css.map +1 -1
package/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as uuiComponents from '@epam/uui-components';
|
|
2
|
-
import { Spinner as Spinner$1, Blocker as Blocker$1, Clickable, IconContainer, RadioInput as RadioInput$1, TextInput as TextInput$1, ControlGroup as ControlGroup$1, NumericInput as NumericInput$1, TextArea as TextArea$1, Dropdown as Dropdown$1, InputAddon as InputAddon$1, Slider as Slider$1, Anchor as Anchor$1, FlexSpacer, Text as Text$1, FlexCell as FlexCell$1, VPanel,
|
|
3
|
-
export { Avatar, DataTableCellContainer, FlexSpacer, IconContainer } from '@epam/uui-components';
|
|
4
|
-
import { withMods, devLogger, uuiElement, cx as cx$1, uuiMarkers, IEditableDebouncer, isFocusReceiverInsideFocusLock, UuiContext,
|
|
2
|
+
import { Spinner as Spinner$1, Blocker as Blocker$1, Clickable, IconContainer, AvatarStack as AvatarStack$1, Paginator as Paginator$1, RadioInput as RadioInput$1, TextInput as TextInput$1, ControlGroup as ControlGroup$1, NumericInput as NumericInput$1, TextArea as TextArea$1, Dropdown as Dropdown$1, InputAddon as InputAddon$1, Slider as Slider$1, DragHandle, Anchor as Anchor$1, FlexSpacer, Text as Text$1, FlexCell as FlexCell$1, VPanel, ModalBlocker as ModalBlocker$1, ModalWindow as ModalWindow$1, Snackbar as Snackbar$1, Calendar as Calendar$1, YearSelection, MonthSelection, Day, uuiDaySelection, Avatar, usePickerModal, handleDataSourceKeyboard, PickerToggler as PickerToggler$1, usePickerInput, usePickerList, DataTableCell as DataTableCell$1, DataTableRow as DataTableRow$1, DataTableCellContainer, DataTableHeaderCell as DataTableHeaderCell$1, DataTableHeaderRow as DataTableHeaderRow$1, useColumnsConfiguration, Accordion as Accordion$1, DataTableSelectionProvider, DataTableFocusProvider, useShowSelected, usePickerApi, AdaptivePanel, Burger as Burger$1, Button as Button$1, DropSpot as DropSpot$1, UploadFileToggler, ErrorCatch } from '@epam/uui-components';
|
|
3
|
+
export { Avatar, DataTableCellContainer, FlexSpacer, IconContainer, MainMenuCustomElement, MainMenuLogo } from '@epam/uui-components';
|
|
4
|
+
import { withMods, devLogger, uuiElement, useIsActive, uuiMod, cx as cx$1, uuiMarkers, IEditableDebouncer, isFocusReceiverInsideFocusLock, UuiContext, getDir, isEventTargetInsideClickable, directionMode, useScrollShadows, useVirtualList, isMobile, i18n as i18n$1, useUuiContext, useLayoutEffectSafeForSsr, usePrevious, mobilePositioning, uuiDataTableHeaderCell, uuiDataTableHeaderGroupCell, DndActor, uuiDndState, useColumnsConfig, uuiScrollShadows, useForceUpdate, getSeparatedValue, useArrayDataSource, orderBy, getOrderBetween, Form as Form$1, useForm as useForm$1, formatBytes, useUuiError } from '@epam/uui-core';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import React__default, { forwardRef, useState, useEffect, useContext, useRef,
|
|
6
|
+
import React__default, { forwardRef, useState, useEffect, useContext, useRef, useImperativeHandle, useMemo, useReducer, useCallback, Fragment } from 'react';
|
|
7
7
|
import cx from 'classnames';
|
|
8
8
|
import { offset } from '@floating-ui/react';
|
|
9
9
|
import dayjs from 'dayjs';
|
|
@@ -15,6 +15,8 @@ import updateLocale from 'dayjs/plugin/updateLocale.js';
|
|
|
15
15
|
import objectSupport from 'dayjs/plugin/objectSupport';
|
|
16
16
|
import customParseFormat from 'dayjs/plugin/customParseFormat.js';
|
|
17
17
|
import isoWeek from 'dayjs/plugin/isoWeek.js';
|
|
18
|
+
import { useOverlayScrollbars } from 'overlayscrollbars-react';
|
|
19
|
+
import 'overlayscrollbars/styles/overlayscrollbars.css';
|
|
18
20
|
import isEqual from 'react-fast-compare';
|
|
19
21
|
import FocusLock, { MoveFocusInside } from 'react-focus-lock';
|
|
20
22
|
|
|
@@ -120,7 +122,9 @@ var SvgNotificationInfoOutline = function SvgNotificationInfoOutline(props, ref)
|
|
|
120
122
|
viewBox: "0 0 24 24",
|
|
121
123
|
ref: ref
|
|
122
124
|
}, props), _path$K || (_path$K = /*#__PURE__*/React.createElement("path", {
|
|
123
|
-
|
|
125
|
+
fillRule: "evenodd",
|
|
126
|
+
d: "M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z",
|
|
127
|
+
clipRule: "evenodd"
|
|
124
128
|
})));
|
|
125
129
|
};
|
|
126
130
|
var ForwardRef$K = /*#__PURE__*/forwardRef(SvgNotificationInfoOutline);
|
|
@@ -135,7 +139,9 @@ var SvgNotificationInfoFill = function SvgNotificationInfoFill(props, ref) {
|
|
|
135
139
|
viewBox: "0 0 24 24",
|
|
136
140
|
ref: ref
|
|
137
141
|
}, props), _path$J || (_path$J = /*#__PURE__*/React.createElement("path", {
|
|
138
|
-
|
|
142
|
+
fillRule: "evenodd",
|
|
143
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z",
|
|
144
|
+
clipRule: "evenodd"
|
|
139
145
|
})));
|
|
140
146
|
};
|
|
141
147
|
var ForwardRef$J = /*#__PURE__*/forwardRef(SvgNotificationInfoFill);
|
|
@@ -151,7 +157,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
151
157
|
xmlns: "http://www.w3.org/2000/svg",
|
|
152
158
|
ref: ref
|
|
153
159
|
}, props), /*#__PURE__*/React.createElement("g", {
|
|
154
|
-
clipPath: "url(#
|
|
160
|
+
clipPath: "url(#0smlushu6n1uhrbtq_a)"
|
|
155
161
|
}, _path$I || (_path$I = /*#__PURE__*/React.createElement("path", {
|
|
156
162
|
d: "M150.585 1.535C49.483-11.495 27.481 61.805 45.725 97.481c10.581 20.69-39.64 70.792 17.744 81.468 27.538 5.123 36-13.341 62.433-10.655 35.4 3.6 148.167-4.73 88.349-78.915-31.713-39.335 1.026-79.506-63.666-87.844Z",
|
|
157
163
|
fill: "#F5F6FA"
|
|
@@ -172,7 +178,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
172
178
|
d: "M86.786 22.982c-2.55 0-4.965 2.07-4.965 4.552V120.6c0 2.484 2.4 4.572 4.965 4.572h88.101c2.582 0 4.986-2.089 4.986-4.572V27.534c0-2.464-2.418-4.552-4.986-4.552h-88.1Zm-5.793 4.552c0-3.022 2.874-5.38 5.793-5.38h88.101c2.935 0 5.814 2.374 5.814 5.38V120.6c0 3.021-2.86 5.4-5.814 5.4h-88.1c-2.94 0-5.794-2.381-5.794-5.4V27.534Z",
|
|
173
179
|
fill: "#1D1E26"
|
|
174
180
|
})), /*#__PURE__*/React.createElement("mask", {
|
|
175
|
-
id: "
|
|
181
|
+
id: "0smlusms3cqehnlrc_b",
|
|
176
182
|
style: {
|
|
177
183
|
maskType: "alpha"
|
|
178
184
|
},
|
|
@@ -185,7 +191,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
185
191
|
d: "M174.887 125.586h-88.1c-2.752 0-5.38-2.234-5.38-4.986V27.534c0-2.752 2.644-4.966 5.38-4.966h88.1c2.752 0 5.4 2.23 5.4 4.966V120.6c0 2.752-2.632 4.986-5.4 4.986Z",
|
|
186
192
|
fill: "#9BDEFF"
|
|
187
193
|
}))), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
188
|
-
mask: "url(#
|
|
194
|
+
mask: "url(#0smlusms3cqehnlrc_b)",
|
|
189
195
|
fillRule: "evenodd",
|
|
190
196
|
clipRule: "evenodd"
|
|
191
197
|
}, /*#__PURE__*/React.createElement("path", {
|
|
@@ -271,7 +277,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
271
277
|
d: "M24.73 96.184a.414.414 0 0 1 .581.06l48.646 59.751a.413.413 0 1 1-.642.523L24.67 96.766a.414.414 0 0 1 .06-.582Z",
|
|
272
278
|
fill: "#fff"
|
|
273
279
|
}))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
274
|
-
id: "
|
|
280
|
+
id: "0smlushu6n1uhrbtq_a"
|
|
275
281
|
}, /*#__PURE__*/React.createElement("path", {
|
|
276
282
|
fill: "#fff",
|
|
277
283
|
transform: "translate(.552)",
|
|
@@ -759,7 +765,7 @@ var SvgFileFileExcelFill = function SvgFileFileExcelFill(props, ref) {
|
|
|
759
765
|
ref: ref
|
|
760
766
|
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
761
767
|
fillRule: "evenodd",
|
|
762
|
-
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-
|
|
768
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm2 16-1.5 1.5L12 17l-2.5 2.5L8 18l2.5-2.5L8 13l1.5-1.5L12 14l2.5-2.5L16 13l-2.5 2.5L16 18zm-3-9V3.5L18.5 9H13z",
|
|
763
769
|
clipRule: "evenodd"
|
|
764
770
|
})));
|
|
765
771
|
};
|
|
@@ -809,10 +815,10 @@ var SvgFileFileVideoFill = function SvgFileFileVideoFill(props, ref) {
|
|
|
809
815
|
viewBox: "0 0 24 24",
|
|
810
816
|
ref: ref
|
|
811
817
|
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
812
|
-
d: "
|
|
818
|
+
d: "m14 15-5 3v-6l5 3z"
|
|
813
819
|
})), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
|
|
814
820
|
fillRule: "evenodd",
|
|
815
|
-
d: "M4 4c0-1.11.89-2 2-2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4zm9-.5V9h5.5L13 3.5zM8
|
|
821
|
+
d: "M4 4c0-1.11.89-2 2-2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4zm9-.5V9h5.5L13 3.5zM8 10v10l8-5-8-5z",
|
|
816
822
|
clipRule: "evenodd"
|
|
817
823
|
})));
|
|
818
824
|
};
|
|
@@ -829,7 +835,7 @@ var SvgFileFileTableFill = function SvgFileFileTableFill(props, ref) {
|
|
|
829
835
|
ref: ref
|
|
830
836
|
}, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
|
|
831
837
|
fillRule: "evenodd",
|
|
832
|
-
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-
|
|
838
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zM9 19H6v-2h3v2zm0-3H6v-2h3v2zm0-3H6v-2h3v2zm4 6h-3v-2h3v2zm0-3h-3v-2h3v2zm0-3h-3v-2h3v2zm0-4V3.5L18.5 9H13z",
|
|
833
839
|
clipRule: "evenodd"
|
|
834
840
|
})));
|
|
835
841
|
};
|
|
@@ -922,14 +928,14 @@ var SvgSearchWithBackground = function SvgSearchWithBackground(props, ref) {
|
|
|
922
928
|
};
|
|
923
929
|
var ForwardRef$4 = /*#__PURE__*/forwardRef(SvgSearchWithBackground);
|
|
924
930
|
|
|
925
|
-
var css$1w = {"root":"
|
|
931
|
+
var css$1w = {"root":"K-RXLg","uui-spinner":"lgr1QK","uuiSpinner":"lgr1QK"};
|
|
926
932
|
|
|
927
933
|
function applySpinnerMods() {
|
|
928
934
|
return [css$1w.root, 'uui-spinner'];
|
|
929
935
|
}
|
|
930
936
|
const Spinner = /* @__PURE__ */withMods(Spinner$1, applySpinnerMods);
|
|
931
937
|
|
|
932
|
-
var css$1v = {"root":"
|
|
938
|
+
var css$1v = {"root":"_4rwDuz","loading-word":"edKoQm","loadingWord":"edKoQm","animated-loading":"cJ2aht","animatedLoading":"cJ2aht","skeleton_loading":"i1s8WI","skeletonLoading":"i1s8WI"};
|
|
933
939
|
|
|
934
940
|
const TextPlaceholder = (props) => {
|
|
935
941
|
const pattern = ' ';
|
|
@@ -946,7 +952,7 @@ const TextPlaceholder = (props) => {
|
|
|
946
952
|
]), dangerouslySetInnerHTML: { __html: it } })))));
|
|
947
953
|
};
|
|
948
954
|
|
|
949
|
-
var css$1u = {"root":"-
|
|
955
|
+
var css$1u = {"root":"TKV-RQ","line-height":"p0-b-4","lineHeight":"p0-b-4","font-size":"O36flr","fontSize":"O36flr"};
|
|
950
956
|
|
|
951
957
|
function applyTextMods(mods) {
|
|
952
958
|
return [
|
|
@@ -973,7 +979,7 @@ const Text = /* @__PURE__ */withMods(uuiComponents.Text, applyTextMods, (props)
|
|
|
973
979
|
};
|
|
974
980
|
});
|
|
975
981
|
|
|
976
|
-
var css$1t = {"root":"
|
|
982
|
+
var css$1t = {"root":"_7GVMYK"};
|
|
977
983
|
|
|
978
984
|
const Blocker = /* @__PURE__ */withMods(Blocker$1, () => [css$1t.root], () => ({ renderSpinner: settings.blocker.renderSpinner }));
|
|
979
985
|
|
|
@@ -1384,6 +1390,22 @@ const tabButtonSettings = {
|
|
|
1384
1390
|
},
|
|
1385
1391
|
},
|
|
1386
1392
|
};
|
|
1393
|
+
const verticalTabButtonSettings = {
|
|
1394
|
+
icons: {
|
|
1395
|
+
clearIcon: ForwardRef$Q,
|
|
1396
|
+
foldingIcon: ForwardRef$P,
|
|
1397
|
+
dropdownIcon: ForwardRef$P,
|
|
1398
|
+
},
|
|
1399
|
+
sizes: {
|
|
1400
|
+
default: '48',
|
|
1401
|
+
countIndicatorMap: {
|
|
1402
|
+
30: '18',
|
|
1403
|
+
36: '18',
|
|
1404
|
+
48: '18',
|
|
1405
|
+
},
|
|
1406
|
+
},
|
|
1407
|
+
weight: 'semibold',
|
|
1408
|
+
};
|
|
1387
1409
|
const tagSettings = {
|
|
1388
1410
|
icons: {
|
|
1389
1411
|
clearIcon: ForwardRef$Q,
|
|
@@ -1455,13 +1477,14 @@ const settings = {
|
|
|
1455
1477
|
statusIndicator: statusIndicatorSettings,
|
|
1456
1478
|
switch: switchSettings,
|
|
1457
1479
|
tabButton: tabButtonSettings,
|
|
1480
|
+
verticalTabButton: verticalTabButtonSettings,
|
|
1458
1481
|
tag: tagSettings,
|
|
1459
1482
|
text: textSettings,
|
|
1460
1483
|
textArea: textAreaSettings,
|
|
1461
1484
|
textInput: textInputSettings,
|
|
1462
1485
|
};
|
|
1463
1486
|
|
|
1464
|
-
var css$1s = {"root":"
|
|
1487
|
+
var css$1s = {"root":"_4vzV11"};
|
|
1465
1488
|
|
|
1466
1489
|
function applyButtonMods(mods) {
|
|
1467
1490
|
return [
|
|
@@ -1479,7 +1502,7 @@ const Button = /* @__PURE__ */withMods(uuiComponents.Button, applyButtonMods, ()
|
|
|
1479
1502
|
};
|
|
1480
1503
|
});
|
|
1481
1504
|
|
|
1482
|
-
var css$1r = {"root":"
|
|
1505
|
+
var css$1r = {"root":"v0XflL"};
|
|
1483
1506
|
|
|
1484
1507
|
function applyIconButtonMods(props) {
|
|
1485
1508
|
return ['uui-icon_button', `uui-color-${props.color || 'neutral'}`, css$1r.root];
|
|
@@ -1516,7 +1539,7 @@ function getIconClass(props) {
|
|
|
1516
1539
|
return [classList['has-left-icon'] ? 'uui-has-left-icon' : 'uui-no-left-icon', classList['has-right-icon'] ? 'uui-has-right-icon' : 'uui-no-right-icon'];
|
|
1517
1540
|
}
|
|
1518
1541
|
|
|
1519
|
-
var css$1q = {"root":"
|
|
1542
|
+
var css$1q = {"root":"_-2astL"};
|
|
1520
1543
|
|
|
1521
1544
|
const DEFAULT_COLOR = 'primary';
|
|
1522
1545
|
const LinkButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
@@ -1546,7 +1569,7 @@ const LinkButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
1546
1569
|
props.isDropdown && (React.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
1547
1570
|
});
|
|
1548
1571
|
|
|
1549
|
-
var css$1p = {"root":"
|
|
1572
|
+
var css$1p = {"root":"gaW5AH"};
|
|
1550
1573
|
|
|
1551
1574
|
const CountIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
1552
1575
|
return (React__default.createElement("div", { ref: ref, className: cx([
|
|
@@ -1558,10 +1581,18 @@ const CountIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
|
1558
1581
|
]) }, props.caption));
|
|
1559
1582
|
});
|
|
1560
1583
|
|
|
1561
|
-
var css$1o = {"root":"
|
|
1584
|
+
var css$1o = {"root":"tdsef-","withNotify":"leQOnM"};
|
|
1562
1585
|
|
|
1563
|
-
const TabButton = /* @__PURE__ */React__default.forwardRef((props,
|
|
1586
|
+
const TabButton = /* @__PURE__ */React__default.forwardRef((props, refExternal) => {
|
|
1587
|
+
const refLocal = React__default.useRef(null);
|
|
1588
|
+
const ref = refExternal ?? refLocal;
|
|
1589
|
+
const { isActive } = useIsActive({
|
|
1590
|
+
isLinkActive: props.isLinkActive,
|
|
1591
|
+
link: props.link,
|
|
1592
|
+
isActive: props.isActive,
|
|
1593
|
+
});
|
|
1564
1594
|
const styles = [
|
|
1595
|
+
isActive && uuiMod.active,
|
|
1565
1596
|
css$1o.root,
|
|
1566
1597
|
'uui-tab-button',
|
|
1567
1598
|
`uui-size-${props.size || settings.tabButton.sizes.default}`,
|
|
@@ -1570,11 +1601,22 @@ const TabButton = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
|
1570
1601
|
];
|
|
1571
1602
|
const DropdownIcon = props.dropdownIcon ? props.dropdownIcon : settings.tabButton.icons.dropdownIcon;
|
|
1572
1603
|
const ClearIcon = props.clearIcon ? props.clearIcon : settings.tabButton.icons.clearIcon;
|
|
1604
|
+
const handleOnKeyDown = (event) => {
|
|
1605
|
+
props.rawProps?.onKeyDown?.(event);
|
|
1606
|
+
const isLink = (props.link !== undefined
|
|
1607
|
+
|| props.href !== undefined);
|
|
1608
|
+
if (isLink
|
|
1609
|
+
&& event.code === 'Space'
|
|
1610
|
+
&& typeof ref != 'function') {
|
|
1611
|
+
ref.current?.click();
|
|
1612
|
+
}
|
|
1613
|
+
};
|
|
1573
1614
|
return (React__default.createElement(Clickable, { ...props, rawProps: {
|
|
1574
1615
|
role: 'tab',
|
|
1575
1616
|
'aria-haspopup': props.isDropdown,
|
|
1576
1617
|
'aria-expanded': props.isOpen,
|
|
1577
1618
|
...props.rawProps,
|
|
1619
|
+
onKeyDown: handleOnKeyDown,
|
|
1578
1620
|
}, cx: styles, ref: ref },
|
|
1579
1621
|
props.icon && props.iconPosition !== 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1580
1622
|
(props.caption || props.withNotify) && (React__default.createElement("div", { className: cx$1(uuiElement.caption) },
|
|
@@ -1586,18 +1628,134 @@ const TabButton = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
|
1586
1628
|
props.onClear && !props.isDisabled && (React__default.createElement(IconContainer, { cx: uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
1587
1629
|
});
|
|
1588
1630
|
|
|
1589
|
-
var css$1n = {"root":"
|
|
1631
|
+
var css$1n = {"root":"_8OICE6","noLeftPadding":"_8PKs0G","foldingArea":"_78wvG5","onlyFoldable":"LNaxgt","captionWrapper":"GWojew","withNotify":"mzjjIs"};
|
|
1632
|
+
|
|
1633
|
+
var css$1m = {"root":"_-5F5VL"};
|
|
1590
1634
|
|
|
1591
|
-
|
|
1592
|
-
|
|
1635
|
+
const AvatarStack = /* @__PURE__ */withMods(AvatarStack$1, () => [css$1m.root]);
|
|
1636
|
+
|
|
1637
|
+
var css$1l = {"root":"ZynZU0"};
|
|
1638
|
+
|
|
1639
|
+
const DEFAULT_FILL = 'solid';
|
|
1640
|
+
function applyBadgeMods(mods) {
|
|
1641
|
+
return [
|
|
1642
|
+
'uui-badge',
|
|
1643
|
+
css$1l.root,
|
|
1644
|
+
`uui-size-${mods.size || settings.badge.sizes.default}`,
|
|
1645
|
+
`uui-fill-${mods.fill || DEFAULT_FILL}`,
|
|
1646
|
+
`uui-color-${mods.color || 'info'}`,
|
|
1647
|
+
];
|
|
1593
1648
|
}
|
|
1594
|
-
const
|
|
1649
|
+
const Badge = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
1650
|
+
const styles = [applyBadgeMods(props), props.cx];
|
|
1651
|
+
const DropdownIcon = props.dropdownIcon ? props.dropdownIcon : settings.badge.icons.dropdownIcon;
|
|
1652
|
+
return (React__default.createElement(Clickable, { ...props, rawProps: {
|
|
1653
|
+
'aria-haspopup': props.isDropdown,
|
|
1654
|
+
'aria-expanded': props.isOpen,
|
|
1655
|
+
...props.rawProps,
|
|
1656
|
+
}, cx: styles, ref: ref },
|
|
1657
|
+
(props.indicator && props.fill === 'outline') && (React__default.createElement("div", { className: "uui-indicator" })),
|
|
1658
|
+
props.icon && props.iconPosition !== 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1659
|
+
props.caption && (React__default.createElement("div", { className: uuiElement.caption }, props.caption)),
|
|
1660
|
+
props.count !== undefined && props.count !== null && (React__default.createElement(CountIndicator, { key: "count-indicator", color: null, size: settings.badge.sizes.countIndicatorMap[props.size || settings.badge.sizes.default], caption: props.count })),
|
|
1661
|
+
props.icon && props.iconPosition === 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1662
|
+
props.isDropdown && (React__default.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
1663
|
+
});
|
|
1595
1664
|
|
|
1596
|
-
var css$
|
|
1665
|
+
var css$1k = {"root":"ADBnKS"};
|
|
1666
|
+
|
|
1667
|
+
function applyTagMods(props) {
|
|
1668
|
+
return [
|
|
1669
|
+
css$1k.root,
|
|
1670
|
+
`uui-size-${props.size || settings.tag.sizes.default}`,
|
|
1671
|
+
`uui-color-${props.color || 'neutral'}`,
|
|
1672
|
+
`uui-fill-${props.fill || 'solid'}`,
|
|
1673
|
+
'uui-tag',
|
|
1674
|
+
];
|
|
1675
|
+
}
|
|
1676
|
+
const Tag = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
1677
|
+
const styles = [applyTagMods(props), props.cx];
|
|
1678
|
+
const ClearIcon = props.clearIcon ? props.clearIcon : settings.tag.icons.clearIcon;
|
|
1679
|
+
const DropdownIcon = props.dropdownIcon ? props.dropdownIcon : settings.tag.icons.dropdownIcon;
|
|
1680
|
+
return (React__default.createElement(Clickable, { ...props, rawProps: {
|
|
1681
|
+
'aria-haspopup': props.isDropdown,
|
|
1682
|
+
'aria-expanded': props.isOpen,
|
|
1683
|
+
...props.rawProps,
|
|
1684
|
+
}, cx: styles, ref: ref },
|
|
1685
|
+
props.icon && props.iconPosition !== 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1686
|
+
props.caption && (React__default.createElement("div", { className: uuiElement.caption }, props.caption)),
|
|
1687
|
+
props.count !== undefined && props.count !== null && (React__default.createElement(CountIndicator, { color: (!props.color || props.color === 'neutral') ? 'white' : props.color, size: settings.tag.sizes.countIndicatorMap[(props.size || settings.tag.sizes.default)], caption: props.count })),
|
|
1688
|
+
props.icon && props.iconPosition === 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1689
|
+
props.isDropdown && (React__default.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen })),
|
|
1690
|
+
props.onClear && !props.isDisabled && (React__default.createElement(IconContainer, { cx: uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
1691
|
+
});
|
|
1692
|
+
|
|
1693
|
+
var css$1j = {"root":"R3lgQz","page":"GavL40","spacer":"XKiV-t","mode-ghost":"Y9cxeS","modeGhost":"Y9cxeS"};
|
|
1694
|
+
|
|
1695
|
+
function Paginator(props) {
|
|
1696
|
+
const renderPaginator = (params) => (React__default.createElement("nav", { role: "navigation", className: cx(css$1j.root, 'uui-paginator', `uui-size-${props.size || settings.paginator.sizes.default}`), ...params.rawProps },
|
|
1697
|
+
React__default.createElement(Button, { size: props.size || settings.paginator.sizes.default, icon: settings.paginator.icons.leftArrowIcon, onClick: params.goToPrev, isDisabled: params.isFirst || props.isDisabled, fill: "outline", color: "secondary" }),
|
|
1698
|
+
params.pages.map((page, index) => {
|
|
1699
|
+
if (page.type === 'spacer') {
|
|
1700
|
+
return (React__default.createElement(Button, { cx: cx(css$1j.spacer, css$1j.page), size: props.size || settings.paginator.sizes.default, key: `${index}_spacer`, caption: "...", fill: "ghost", color: "secondary", tabIndex: -1, isDisabled: props.isDisabled }));
|
|
1701
|
+
}
|
|
1702
|
+
else {
|
|
1703
|
+
return (React__default.createElement(Button, { cx: cx(css$1j[`mode-${!page.isActive && 'ghost'}`], css$1j.page), size: props.size || settings.paginator.sizes.default, key: page.pageNumber, caption: page.pageNumber, onClick: () => page.onClick?.(), rawProps: { 'aria-current': page.isActive }, fill: (page.isActive && 'outline') || 'ghost', color: "primary", isDisabled: props.isDisabled }));
|
|
1704
|
+
}
|
|
1705
|
+
}),
|
|
1706
|
+
React__default.createElement(Button, { size: props.size || settings.paginator.sizes.default, icon: settings.paginator.icons.rightArrowIcon, onClick: params.goToNext, isDisabled: params.isLast || props.isDisabled, fill: "outline", color: "secondary" })));
|
|
1707
|
+
return React__default.createElement(Paginator$1, { ...props, render: renderPaginator });
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
var css$1i = {"root":"kXKWWk","progress-bar":"oQtg3Z","progressBar":"oQtg3Z","progressBar-indeterminate":"gteY2b","progressBarIndeterminate":"gteY2b","size-12":"F2scht","size12":"F2scht","size-18":"_6kAsZW","size18":"_6kAsZW","size-24":"O6EcRI","size24":"O6EcRI"};
|
|
1711
|
+
|
|
1712
|
+
const IndeterminateBar = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
1713
|
+
return (React.createElement("div", { ref: ref, className: cx('uui-indeterminate_bar', props.cx, css$1i.root, css$1i[`size-${props.size || 12}`]) },
|
|
1714
|
+
React.createElement("div", { className: cx(css$1i.progressBar) })));
|
|
1715
|
+
});
|
|
1716
|
+
|
|
1717
|
+
var css$1h = {"root":"UKvE7P","striped":"VbxMEC","animate-stripes":"AVth0h","animateStripes":"AVth0h","size-12":"AIiYu8","size12":"AIiYu8","size-18":"RAgKy4","size18":"RAgKy4","size-24":"bdwz8S","size24":"bdwz8S"};
|
|
1718
|
+
|
|
1719
|
+
const DEFAULT_SIZE = '12';
|
|
1720
|
+
function applyProgressBarMods(mods) {
|
|
1721
|
+
const size = mods.size || DEFAULT_SIZE;
|
|
1722
|
+
return [
|
|
1723
|
+
css$1h.root,
|
|
1724
|
+
css$1h[`size-${size}`],
|
|
1725
|
+
mods.striped && css$1h.striped,
|
|
1726
|
+
];
|
|
1727
|
+
}
|
|
1728
|
+
const ProgressBar = /* @__PURE__ */withMods(uuiComponents.ProgressBar, applyProgressBarMods, (props) => ({
|
|
1729
|
+
hideLabel: props.hideLabel || props.striped,
|
|
1730
|
+
}));
|
|
1731
|
+
|
|
1732
|
+
var css$1g = {"root":"wAZFgx"};
|
|
1733
|
+
|
|
1734
|
+
const IndicatorBar = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
1735
|
+
const { progress } = props;
|
|
1736
|
+
return progress || progress === 0 ? (React.createElement(ProgressBar, { ref: ref, progress: progress, cx: cx(css$1g.root, props.cx), hideLabel: true })) : (React.createElement(IndeterminateBar, { ref: ref, cx: cx(css$1g.root, props.cx) }));
|
|
1737
|
+
});
|
|
1738
|
+
|
|
1739
|
+
var css$1f = {"root":"_3rssqT"};
|
|
1740
|
+
|
|
1741
|
+
const StatusIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
1742
|
+
return (React__default.createElement("div", { ref: ref, className: cx([
|
|
1743
|
+
css$1f.root,
|
|
1744
|
+
`uui-size-${props.size || settings.statusIndicator.sizes.default}`,
|
|
1745
|
+
'uui-status_indicator',
|
|
1746
|
+
`uui-color-${props.color || 'neutral'}`,
|
|
1747
|
+
`uui-fill-${props.fill || 'solid'}`,
|
|
1748
|
+
props.cx,
|
|
1749
|
+
]) },
|
|
1750
|
+
React__default.createElement("div", { className: "uui-status_indicator-dot" }),
|
|
1751
|
+
React__default.createElement("p", { className: "uui-status_indicator-caption" }, props.caption)));
|
|
1752
|
+
});
|
|
1753
|
+
|
|
1754
|
+
var css$1e = {"root":"gaSdU1"};
|
|
1597
1755
|
|
|
1598
1756
|
function applyCheckboxMods(mods) {
|
|
1599
1757
|
return [
|
|
1600
|
-
css$
|
|
1758
|
+
css$1e.root,
|
|
1601
1759
|
`uui-size-${mods.size || settings.checkbox.sizes.default}`,
|
|
1602
1760
|
'uui-control-mode-' + (mods.mode || 'form'),
|
|
1603
1761
|
'uui-color-primary',
|
|
@@ -1611,11 +1769,11 @@ const applyUUICheckboxProps = (props) => {
|
|
|
1611
1769
|
};
|
|
1612
1770
|
const Checkbox = /* @__PURE__ */withMods(uuiComponents.Checkbox, applyCheckboxMods, applyUUICheckboxProps);
|
|
1613
1771
|
|
|
1614
|
-
var css$
|
|
1772
|
+
var css$1d = {"root":"M28xhG"};
|
|
1615
1773
|
|
|
1616
1774
|
function applyRadioInputMods(mods) {
|
|
1617
1775
|
return [
|
|
1618
|
-
css$
|
|
1776
|
+
css$1d.root,
|
|
1619
1777
|
`uui-size-${mods.size || settings.radioInput.sizes.default}`,
|
|
1620
1778
|
'uui-radio-input-container',
|
|
1621
1779
|
'uui-color-primary',
|
|
@@ -1623,11 +1781,11 @@ function applyRadioInputMods(mods) {
|
|
|
1623
1781
|
}
|
|
1624
1782
|
const RadioInput = /* @__PURE__ */withMods(RadioInput$1, applyRadioInputMods, (props) => ({ icon: props.icon ? props.icon : settings.radioInput.icons.dotIcon }));
|
|
1625
1783
|
|
|
1626
|
-
var css$
|
|
1784
|
+
var css$1c = {"root":"tBweim"};
|
|
1627
1785
|
|
|
1628
1786
|
function applySwitchMods(mods) {
|
|
1629
1787
|
return [
|
|
1630
|
-
css$
|
|
1788
|
+
css$1c.root,
|
|
1631
1789
|
`uui-size-${mods.size || settings.switch.sizes.default}`,
|
|
1632
1790
|
'uui-color-primary',
|
|
1633
1791
|
];
|
|
@@ -1647,7 +1805,7 @@ var EditMode;
|
|
|
1647
1805
|
EditMode["INLINE"] = "inline";
|
|
1648
1806
|
})(EditMode || (EditMode = {}));
|
|
1649
1807
|
|
|
1650
|
-
var textInputCss = {"root":"
|
|
1808
|
+
var textInputCss = {"root":"_9pM85m"};
|
|
1651
1809
|
|
|
1652
1810
|
const DEFAULT_MODE$3 = EditMode.FORM;
|
|
1653
1811
|
function applyTextInputMods(mods) {
|
|
@@ -1672,9 +1830,9 @@ const SearchInput = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
|
1672
1830
|
} }));
|
|
1673
1831
|
});
|
|
1674
1832
|
|
|
1675
|
-
var css$
|
|
1833
|
+
var css$1b = {"root":"BO21Fj"};
|
|
1676
1834
|
|
|
1677
|
-
const ControlGroup = /* @__PURE__ */withMods(ControlGroup$1, () => [css$
|
|
1835
|
+
const ControlGroup = /* @__PURE__ */withMods(ControlGroup$1, () => [css$1b.root, 'uui-control-group']);
|
|
1678
1836
|
|
|
1679
1837
|
function MultiSwitchComponent(props, ref) {
|
|
1680
1838
|
return (React.createElement(ControlGroup, { ref: ref, rawProps: {
|
|
@@ -1688,13 +1846,13 @@ function MultiSwitchComponent(props, ref) {
|
|
|
1688
1846
|
}
|
|
1689
1847
|
const MultiSwitch = /* @__PURE__ */React.forwardRef(MultiSwitchComponent);
|
|
1690
1848
|
|
|
1691
|
-
var css$
|
|
1849
|
+
var css$1a = {"root":"PgOwFa"};
|
|
1692
1850
|
|
|
1693
1851
|
const DEFAULT_MODE$2 = EditMode.FORM;
|
|
1694
1852
|
function applyNumericInputMods(mods) {
|
|
1695
1853
|
return [
|
|
1696
1854
|
textInputCss.root,
|
|
1697
|
-
css$
|
|
1855
|
+
css$1a.root,
|
|
1698
1856
|
`uui-size-${mods.size || settings.numericInput.sizes.default}`,
|
|
1699
1857
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$2),
|
|
1700
1858
|
];
|
|
@@ -1708,12 +1866,12 @@ const NumericInput = /* @__PURE__ */withMods(NumericInput$1, applyNumericInputMo
|
|
|
1708
1866
|
};
|
|
1709
1867
|
});
|
|
1710
1868
|
|
|
1711
|
-
var css$
|
|
1869
|
+
var css$19 = {"root":"LzQnoU"};
|
|
1712
1870
|
|
|
1713
1871
|
const DEFAULT_MODE$1 = EditMode.FORM;
|
|
1714
1872
|
function applyTextAreaMods(mods) {
|
|
1715
1873
|
return [
|
|
1716
|
-
css$
|
|
1874
|
+
css$19.root,
|
|
1717
1875
|
'uui-textarea',
|
|
1718
1876
|
'uui-size-' + (mods.size || settings.textArea.sizes.default),
|
|
1719
1877
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$1),
|
|
@@ -1749,18 +1907,18 @@ function TREE_SHAKEABLE_INIT$1() {
|
|
|
1749
1907
|
};
|
|
1750
1908
|
}
|
|
1751
1909
|
|
|
1752
|
-
var css$
|
|
1910
|
+
var css$18 = {"root":"oQ2OvB"};
|
|
1753
1911
|
|
|
1754
1912
|
function applyDropdownContainerMods(mods) {
|
|
1755
1913
|
return [
|
|
1756
|
-
css$
|
|
1914
|
+
css$18.root,
|
|
1757
1915
|
mods.vPadding && `vPadding-${mods.vPadding}`,
|
|
1758
1916
|
mods.padding && `padding-${mods.padding}`,
|
|
1759
1917
|
];
|
|
1760
1918
|
}
|
|
1761
1919
|
const DropdownContainer = /* @__PURE__ */withMods(uuiComponents.DropdownContainer, applyDropdownContainerMods);
|
|
1762
1920
|
|
|
1763
|
-
var css$
|
|
1921
|
+
var css$17 = {"root":"iQONol","timepicker-input":"BnXlx8","timepickerInput":"BnXlx8","ltr-always":"UQJvrt","ltrAlways":"UQJvrt"};
|
|
1764
1922
|
|
|
1765
1923
|
const uuiTimePicker = {
|
|
1766
1924
|
container: 'uui-timepicker-container',
|
|
@@ -1799,17 +1957,17 @@ function TimePickerBody(props) {
|
|
|
1799
1957
|
const minutesToSubtract = value.minute() % minutesStep === 0 ? minutesStep : value.minute() % minutesStep;
|
|
1800
1958
|
onMinutesChange(value.subtract(minutesToSubtract, 'm').minute());
|
|
1801
1959
|
};
|
|
1802
|
-
return (React.createElement("div", { className: cx$1(css$
|
|
1803
|
-
React.createElement("div", { className: css$
|
|
1960
|
+
return (React.createElement("div", { className: cx$1(css$17.root, uuiTimePicker.container, props.cx), ref: props.forwardedRef, ...props.rawProps },
|
|
1961
|
+
React.createElement("div", { className: css$17.ltrAlways },
|
|
1804
1962
|
React.createElement("div", { className: uuiTimePicker.elementContainer },
|
|
1805
1963
|
React.createElement(IconContainer, { size: 18, rawProps: { 'aria-label': 'Increment hours' }, cx: uuiTimePicker.iconUp, icon: ForwardRef$P, onClick: () => onHoursChange(uuiDayjs.dayjs().set(props.value).add(1, 'h').hour()) }),
|
|
1806
1964
|
React.createElement(NumericInput$1, { cx: uuiTimePicker.input, onValueChange: onHoursChange, value: +(uuiDayjs.dayjs()
|
|
1807
1965
|
.set(props.value)
|
|
1808
|
-
.format(MAX_HOURS === FORMAT_12H ? 'hh' : 'HH')), min: MIN_HOURS, max: MAX_HOURS }),
|
|
1966
|
+
.format(MAX_HOURS === FORMAT_12H ? 'hh' : 'HH')), isReadonly: true, min: MIN_HOURS, max: MAX_HOURS }),
|
|
1809
1967
|
React.createElement(IconContainer, { size: 18, rawProps: { 'aria-label': 'Decrement hours' }, cx: uuiTimePicker.iconDown, icon: ForwardRef$P, onClick: () => onHoursChange(uuiDayjs.dayjs().set(props.value).subtract(1, 'h').hour()) })),
|
|
1810
1968
|
React.createElement("div", { className: uuiTimePicker.elementContainer },
|
|
1811
1969
|
React.createElement(IconContainer, { size: 18, rawProps: { 'aria-label': 'Increment minutes' }, cx: uuiTimePicker.iconUp, icon: ForwardRef$P, onClick: handleMinutesUpClick }),
|
|
1812
|
-
React.createElement(NumericInput$1, { cx: uuiTimePicker.input, onValueChange: onMinutesChange, value: +uuiDayjs.dayjs().set(props.value).format('m'), min: MIN_MINUTES, max: MAX_MINUTES }),
|
|
1970
|
+
React.createElement(NumericInput$1, { cx: uuiTimePicker.input, onValueChange: onMinutesChange, value: +uuiDayjs.dayjs().set(props.value).format('m'), isReadonly: true, min: MIN_MINUTES, max: MAX_MINUTES }),
|
|
1813
1971
|
React.createElement(IconContainer, { size: 18, rawProps: { 'aria-label': 'Decrement minutes' }, cx: uuiTimePicker.iconDown, icon: ForwardRef$P, onClick: handleMinutesDownClick }))),
|
|
1814
1972
|
MAX_HOURS === FORMAT_12H && (React.createElement("div", { className: uuiTimePicker.elementContainer },
|
|
1815
1973
|
React.createElement(IconContainer, { size: 18, cx: uuiTimePicker.iconUp, icon: ForwardRef$P, onClick: onTimeTypeChange }),
|
|
@@ -1943,7 +2101,7 @@ function TimePickerComponent(props, ref) {
|
|
|
1943
2101
|
state.value && state.inputValue && saveTime(state.value);
|
|
1944
2102
|
};
|
|
1945
2103
|
const renderInput = (inputProps) => {
|
|
1946
|
-
return (React__default.createElement(TextInput, { ...inputProps, onClick: null, size: props.size, isDisabled: props.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, cx: [css$
|
|
2104
|
+
return (React__default.createElement(TextInput, { ...inputProps, onClick: null, size: props.size, isDisabled: props.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, cx: [css$17.root, css$17.timepickerInput, props.inputCx], value: state.inputValue, onValueChange: handleInputChange, onCancel: !props.disableClear && onClear, onFocus: handleFocus, onBlur: handleBlur, isDropdown: false, placeholder: props.placeholder ? props.placeholder : getFormat(), mode: props.mode || DEFAULT_MODE, rawProps: props.rawProps?.input }));
|
|
1947
2105
|
};
|
|
1948
2106
|
const renderBody = (bodyProps) => {
|
|
1949
2107
|
const { forwardedRef, onValueChange, ...timePickerBodyProps } = props;
|
|
@@ -1954,37 +2112,37 @@ function TimePickerComponent(props, ref) {
|
|
|
1954
2112
|
}
|
|
1955
2113
|
const TimePicker = /* @__PURE__ */React__default.forwardRef(TimePickerComponent);
|
|
1956
2114
|
|
|
1957
|
-
var css$
|
|
2115
|
+
var css$16 = {"root":"y9iBid"};
|
|
1958
2116
|
|
|
1959
2117
|
function applyInputAddonMods() {
|
|
1960
2118
|
return [
|
|
1961
|
-
css$
|
|
2119
|
+
css$16.root,
|
|
1962
2120
|
];
|
|
1963
2121
|
}
|
|
1964
2122
|
const InputAddon = /* @__PURE__ */withMods(InputAddon$1, applyInputAddonMods);
|
|
1965
2123
|
|
|
1966
|
-
var css$
|
|
2124
|
+
var css$15 = {"root":"iyMhGP"};
|
|
1967
2125
|
|
|
1968
2126
|
function applySliderMods() {
|
|
1969
|
-
return [css$
|
|
2127
|
+
return [css$15.root, 'uui-color-neutral'];
|
|
1970
2128
|
}
|
|
1971
2129
|
const Slider = /* @__PURE__ */withMods(Slider$1, applySliderMods);
|
|
1972
2130
|
|
|
1973
|
-
var css$
|
|
2131
|
+
var css$14 = {"root":"kJkPM0"};
|
|
1974
2132
|
|
|
1975
2133
|
function applyTooltipMods(mods) {
|
|
1976
2134
|
return [
|
|
1977
|
-
css$
|
|
2135
|
+
css$14.root,
|
|
1978
2136
|
`uui-color-${mods.color || 'inverted'}`,
|
|
1979
2137
|
];
|
|
1980
2138
|
}
|
|
1981
2139
|
const Tooltip = /* @__PURE__ */withMods(uuiComponents.Tooltip, applyTooltipMods);
|
|
1982
2140
|
|
|
1983
|
-
var css$
|
|
2141
|
+
var css$13 = {"root":"gnsYhI","tooltip":"fjucPA"};
|
|
1984
2142
|
|
|
1985
2143
|
function applyRatingMods(mods) {
|
|
1986
2144
|
return [
|
|
1987
|
-
css$
|
|
2145
|
+
css$13.root,
|
|
1988
2146
|
`uui-size-${mods.size || settings.rating.sizes.default}`,
|
|
1989
2147
|
];
|
|
1990
2148
|
}
|
|
@@ -1994,17 +2152,94 @@ const Rating = /* @__PURE__ */withMods(uuiComponents.Rating, applyRatingMods, (p
|
|
|
1994
2152
|
Tooltip,
|
|
1995
2153
|
}));
|
|
1996
2154
|
|
|
1997
|
-
var css$
|
|
2155
|
+
var css$12 = {"drag-handle-wrapper":"Wu725P","dragHandleWrapper":"Wu725P","with-indent":"fPa6fV","withIndent":"fPa6fV","drag-handle":"z1C-Pm","dragHandle":"z1C-Pm","icon-container":"_98if5G","iconContainer":"_98if5G"};
|
|
2156
|
+
|
|
2157
|
+
function DataRowAddons(props) {
|
|
2158
|
+
const row = props.rowProps;
|
|
2159
|
+
const getIndent = () => {
|
|
2160
|
+
return (row.indent - 1) * settings.dataTable.sizes.body.indentUnitMap[props.size || settings.dataTable.sizes.body.row];
|
|
2161
|
+
};
|
|
2162
|
+
const getWidth = () => {
|
|
2163
|
+
return settings.dataTable.sizes.body.indentWidthMap[props.size || settings.dataTable.sizes.body.row];
|
|
2164
|
+
};
|
|
2165
|
+
const renderDragHandle = () => {
|
|
2166
|
+
if (props.renderDragHandle) {
|
|
2167
|
+
return props.renderDragHandle({ rowProps: props.rowProps, eventHandlers: props.eventHandlers });
|
|
2168
|
+
}
|
|
2169
|
+
return (React__default.createElement("div", { key: "dh", className: cx(css$12.dragHandleWrapper, row.indent > 0 && css$12.withIndent), style: { width: row.indent > 0 ? (getIndent() + getWidth()) : 0 }, ...props.eventHandlers },
|
|
2170
|
+
React__default.createElement(DragHandle, { cx: css$12.dragHandle })));
|
|
2171
|
+
};
|
|
2172
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
2173
|
+
row.dnd?.srcData && renderDragHandle(),
|
|
2174
|
+
row?.checkbox?.isVisible && (React__default.createElement(Checkbox, { key: "cb", cx: "uui-dr_addons-checkbox", tabIndex: props.tabIndex, size: settings.dataTable.sizes.body.checkboxMap[props.size], value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => row.onCheck?.(row), isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid })),
|
|
2175
|
+
row.indent > 0 && (React__default.createElement("div", { key: "fold", className: cx('uui-dr_addons-indent', `uui-size-${props.size || settings.dataTable.sizes.body.row}`), style: { marginInlineStart: getIndent(), width: getWidth() } }, row.isFoldable && (React__default.createElement(IconContainer, { rawProps: {
|
|
2176
|
+
'aria-label': row.isFolded ? 'Unfold' : 'Fold',
|
|
2177
|
+
role: 'button',
|
|
2178
|
+
}, key: "icon", icon: settings.dataTable.icons.body.foldingIcon, cx: [
|
|
2179
|
+
uuiElement.foldingArrow, uuiMarkers.clickable, css$12.iconContainer,
|
|
2180
|
+
], rotate: row.isFolded ? '90ccw' : '0', onClick: () => row.onFold(row), size: settings.dataTable.sizes.body.iconMap[props.size || settings.dataTable.sizes.body.row] }))))));
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
function VerticalTabButtonComponent(props, ref) {
|
|
2184
|
+
const { isActive } = useIsActive({
|
|
2185
|
+
isLinkActive: props.isLinkActive,
|
|
2186
|
+
link: props.link,
|
|
2187
|
+
isActive: props.isActive,
|
|
2188
|
+
});
|
|
2189
|
+
const styles = [
|
|
2190
|
+
css$1n.root,
|
|
2191
|
+
'uui-vertical-tab-button',
|
|
2192
|
+
`uui-size-${props.size || settings.verticalTabButton.sizes.default}`,
|
|
2193
|
+
isActive && uuiMod.active,
|
|
2194
|
+
props.indent > 0 && css$1n.noLeftPadding,
|
|
2195
|
+
!props.onClick && props.onFold && css$1n.onlyFoldable,
|
|
2196
|
+
...getIconClass(props),
|
|
2197
|
+
props.cx,
|
|
2198
|
+
];
|
|
2199
|
+
if (props.count !== undefined && props.count !== null) {
|
|
2200
|
+
devLogger.warn('VerticalTabButton: count prop is deprecated. Use renderAddons prop instead.');
|
|
2201
|
+
}
|
|
2202
|
+
if (props.onClear !== undefined && props.onClear !== null) {
|
|
2203
|
+
devLogger.warn('VerticalTabButton: onClear prop is deprecated. Use renderAddons prop instead.');
|
|
2204
|
+
}
|
|
2205
|
+
if (props.clearIcon !== undefined && props.clearIcon !== null) {
|
|
2206
|
+
devLogger.warn('VerticalTabButton: clearIcon prop is deprecated. Use renderAddons prop instead.');
|
|
2207
|
+
}
|
|
2208
|
+
const DropdownIcon = props.dropdownIcon ? props.dropdownIcon : settings.verticalTabButton.icons.dropdownIcon;
|
|
2209
|
+
const ClearIcon = props.clearIcon ? props.clearIcon : settings.verticalTabButton.icons.clearIcon;
|
|
2210
|
+
return (React__default.createElement(Clickable, { ...props, onClick: props.onClick || props.onFold, rawProps: {
|
|
2211
|
+
role: 'tab',
|
|
2212
|
+
...props.rawProps,
|
|
2213
|
+
}, cx: styles, ref: ref },
|
|
2214
|
+
props.indent > 0 && (React__default.createElement("div", { key: "fold", className: cx$1(css$1n.foldingArea, props.onFold && uuiMarkers.clickable), style: { '--uui-folding-indent': `${props.indent - 1}` }, onClick: props.onFold }, props.isFoldable && (React__default.createElement(IconContainer, { rawProps: {
|
|
2215
|
+
'aria-label': props.isFolded ? 'Unfold' : 'Fold',
|
|
2216
|
+
role: 'button',
|
|
2217
|
+
}, key: "icon", icon: settings.verticalTabButton.icons.foldingIcon, cx: [
|
|
2218
|
+
uuiElement.foldingArrow, css$1n.iconContainer,
|
|
2219
|
+
], rotate: props.isFolded ? '90ccw' : '0', size: settings.dataTable.sizes.body.iconMap[props.size || settings.dataTable.sizes.body.row] })))),
|
|
2220
|
+
props.icon && props.iconPosition !== 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
2221
|
+
(props.caption || props.withNotify) && (React__default.createElement("div", { className: css$1n.captionWrapper },
|
|
2222
|
+
props.caption && React__default.createElement("div", { className: cx$1(uuiElement.caption, `uui-vertical-tab-button-weight-${props.weight || settings.verticalTabButton.weight}`) }, props.caption),
|
|
2223
|
+
props.withNotify && React__default.createElement("div", { className: css$1n.withNotify }))),
|
|
2224
|
+
props.icon && props.iconPosition === 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
2225
|
+
props.count !== undefined && props.count !== null && (React__default.createElement(CountIndicator, { color: "neutral", size: settings.verticalTabButton.sizes.countIndicatorMap[props.size || settings.verticalTabButton.sizes.default], caption: props.count })),
|
|
2226
|
+
props.isDropdown && (React__default.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen })),
|
|
2227
|
+
props.onClear && !props.isDisabled && (React__default.createElement(IconContainer, { cx: uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear })),
|
|
2228
|
+
props.renderAddons && props.renderAddons()));
|
|
2229
|
+
}
|
|
2230
|
+
const VerticalTabButton = /* @__PURE__ */React__default.forwardRef(VerticalTabButtonComponent);
|
|
2231
|
+
|
|
2232
|
+
var css$11 = {"root":"y-aBPX","main-path":"ZeqG-n","mainPath":"ZeqG-n","content-wrapper":"_8-VGbx","contentWrapper":"_8-VGbx","content":"f1Bo97","action-wrapper":"yHHIyH","actionWrapper":"yHHIyH","icon-wrapper":"_-3xjG7","iconWrapper":"_-3xjG7","icon":"py2Lun","close-icon":"UW5usS","closeIcon":"UW5usS"};
|
|
1998
2233
|
|
|
1999
|
-
const Alert = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("div", { role: "alert", ref: ref, className: cx('uui-alert', css$
|
|
2000
|
-
React.createElement("div", { className: css$
|
|
2001
|
-
React.createElement("div", { className: css$
|
|
2002
|
-
props.icon && (React.createElement("div", { className: css$
|
|
2003
|
-
React.createElement(IconContainer, { icon: props.icon, cx: css$
|
|
2004
|
-
React.createElement("div", { className: css$
|
|
2234
|
+
const Alert = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("div", { role: "alert", ref: ref, className: cx('uui-alert', css$11.root, props.color && `uui-color-${props.color}`, props.cx, `uui-size-${props.size || settings.alert.sizes.default}`), ...props.rawProps },
|
|
2235
|
+
React.createElement("div", { className: css$11.mainPath },
|
|
2236
|
+
React.createElement("div", { className: css$11.contentWrapper },
|
|
2237
|
+
props.icon && (React.createElement("div", { className: css$11.iconWrapper },
|
|
2238
|
+
React.createElement(IconContainer, { icon: props.icon, cx: css$11.icon }))),
|
|
2239
|
+
React.createElement("div", { className: css$11.content },
|
|
2005
2240
|
props.children,
|
|
2006
|
-
props.actions && (React.createElement("div", { className: css$
|
|
2007
|
-
props.onClose && React.createElement(IconButton, { icon: settings.alert.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css$
|
|
2241
|
+
props.actions && (React.createElement("div", { className: css$11.actionWrapper }, props.actions.map((action) => (React.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$11.actionLink, size: settings.alert.sizes.actionMap[props.size || settings.alert.sizes.default] }))))))),
|
|
2242
|
+
props.onClose && React.createElement(IconButton, { icon: settings.alert.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css$11.closeIcon })))));
|
|
2008
2243
|
const WarningAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createElement(Alert, { icon: settings.alert.icons.warningIcon, color: "warning", ref: ref, ...props }));
|
|
2009
2244
|
const SuccessAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createElement(Alert, { icon: settings.alert.icons.successIcon, color: "success", ref: ref, ...props }));
|
|
2010
2245
|
const HintAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createElement(Alert, { icon: settings.alert.icons.infoIcon, color: "info", ref: ref, ...props }));
|
|
@@ -2012,7 +2247,7 @@ const ErrorAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createE
|
|
|
2012
2247
|
|
|
2013
2248
|
const Dropdown = /* @__PURE__ */withMods(Dropdown$1);
|
|
2014
2249
|
|
|
2015
|
-
var css$
|
|
2250
|
+
var css$10 = {"submenu-root-item-rtl":"kt6hNc","submenuRootItemRtl":"kt6hNc","icon-after":"cvuxMu","iconAfter":"cvuxMu","submenu-root-item":"jSfVoe","submenuRootItem":"jSfVoe","icon-check":"_772w3N","iconCheck":"_772w3N","splitter-root":"RanNVV","splitterRoot":"RanNVV","splitter":"tZAbt0","header-root":"HG1K4L","headerRoot":"HG1K4L","item-root":"_1sqOxa","itemRoot":"_1sqOxa","icon":"MunWuB","link":"u02ZhT","indent":"TvnwQu","selected-mark":"_3xfn0R","selectedMark":"_3xfn0R"};
|
|
2016
2251
|
|
|
2017
2252
|
var IDropdownControlKeys;
|
|
2018
2253
|
(function (IDropdownControlKeys) {
|
|
@@ -2026,25 +2261,34 @@ var IDropdownControlKeys;
|
|
|
2026
2261
|
function DropdownMenuContainer(props) {
|
|
2027
2262
|
const menuRef = useRef(null);
|
|
2028
2263
|
const [currentlyFocused, setFocused] = useState(0);
|
|
2029
|
-
const
|
|
2264
|
+
const getMenuItems = () => {
|
|
2265
|
+
if (!menuRef.current)
|
|
2266
|
+
return [];
|
|
2267
|
+
return Array.from(menuRef.current.querySelectorAll(`[role="menuitem"]:not(.${uuiMod.disabled})`));
|
|
2268
|
+
};
|
|
2030
2269
|
const changeFocus = (nextFocusedIndex) => {
|
|
2031
|
-
|
|
2270
|
+
const menuItems = getMenuItems();
|
|
2271
|
+
if (menuItems.length > 0 && nextFocusedIndex >= 0 && nextFocusedIndex < menuItems.length) {
|
|
2032
2272
|
setFocused(nextFocusedIndex);
|
|
2033
|
-
menuItems[nextFocusedIndex]
|
|
2273
|
+
const targetItem = menuItems[nextFocusedIndex];
|
|
2274
|
+
targetItem.focus();
|
|
2034
2275
|
}
|
|
2035
2276
|
};
|
|
2036
2277
|
const handleArrowKeys = (e) => {
|
|
2278
|
+
const menuItems = getMenuItems();
|
|
2037
2279
|
const lastMenuItemsIndex = menuItems.length - 1;
|
|
2038
2280
|
if (e.key === IDropdownControlKeys.UP_ARROW) {
|
|
2039
2281
|
changeFocus(currentlyFocused > 0 ? currentlyFocused - 1 : lastMenuItemsIndex);
|
|
2282
|
+
e.stopPropagation(); // TODO: need improvement to track event only for current overlay
|
|
2040
2283
|
e.preventDefault();
|
|
2041
2284
|
}
|
|
2042
2285
|
else if (e.key === IDropdownControlKeys.DOWN_ARROW) {
|
|
2043
2286
|
changeFocus(currentlyFocused < lastMenuItemsIndex ? currentlyFocused + 1 : 0);
|
|
2287
|
+
e.stopPropagation(); // TODO: need improvement to track event only for current overlay
|
|
2044
2288
|
e.preventDefault();
|
|
2045
2289
|
}
|
|
2046
2290
|
else if (e.key === props.closeOnKey && props.onClose) {
|
|
2047
|
-
e.stopPropagation();
|
|
2291
|
+
e.stopPropagation(); // TODO: need improvement to track event only for current overlay
|
|
2048
2292
|
props.onClose();
|
|
2049
2293
|
}
|
|
2050
2294
|
};
|
|
@@ -2077,29 +2321,29 @@ const DropdownMenuButton = /* @__PURE__ */React__default.forwardRef((props, ref)
|
|
|
2077
2321
|
const getMenuButtonContent = () => {
|
|
2078
2322
|
const isIconBefore = Boolean(icon && iconPosition !== 'right');
|
|
2079
2323
|
const isIconAfter = Boolean(icon && iconPosition === 'right');
|
|
2080
|
-
const iconElement = (React__default.createElement(IconButton, { icon: icon, color: isActive ? 'primary' : 'neutral', onClick: onIconClick, isDisabled: isDisabled, cx: cx$1(css$
|
|
2324
|
+
const iconElement = (React__default.createElement(IconButton, { icon: icon, color: isActive ? 'primary' : 'neutral', onClick: onIconClick, isDisabled: isDisabled, cx: cx$1(css$10.icon, iconPosition === 'right' ? css$10.iconAfter : css$10.iconBefore) }));
|
|
2081
2325
|
return (React__default.createElement(React__default.Fragment, null,
|
|
2082
2326
|
isIconBefore && iconElement,
|
|
2083
|
-
React__default.createElement(Text$1, { cx: props.indent && css$
|
|
2327
|
+
React__default.createElement(Text$1, { cx: props.indent && css$10.indent }, caption),
|
|
2084
2328
|
isIconAfter && (React__default.createElement(React__default.Fragment, null,
|
|
2085
2329
|
React__default.createElement(FlexSpacer, null),
|
|
2086
2330
|
iconElement))));
|
|
2087
2331
|
};
|
|
2088
2332
|
const isAnchor = Boolean(link || href);
|
|
2089
|
-
const itemClassNames = cx$1(props.cx, css$
|
|
2090
|
-
return isAnchor ? (React__default.createElement(Anchor$1, { cx: cx$1(css$
|
|
2333
|
+
const itemClassNames = cx$1(props.cx, css$10.itemRoot, isDisabled && uuiMod.disabled, isActive && uuiMod.active, isOpen && uuiMod.opened, (!isDisabled && onClick) && uuiMarkers.clickable);
|
|
2334
|
+
return isAnchor ? (React__default.createElement(Anchor$1, { cx: cx$1(css$10.link, itemClassNames), link: link, href: href, rawProps: { role: 'menuitem', tabIndex: isDisabled ? -1 : 0 }, onClick: handleClick, isDisabled: isDisabled, target: target }, getMenuButtonContent())) : (React__default.createElement("div", { tabIndex: isDisabled ? -1 : 0, role: "menuitem", onKeyDown: isDisabled ? null : handleOpenDropdown, className: itemClassNames, onClick: handleClick, ref: ref },
|
|
2091
2335
|
getMenuButtonContent(),
|
|
2092
2336
|
isSelected && (React__default.createElement(React__default.Fragment, null,
|
|
2093
2337
|
React__default.createElement(FlexSpacer, null),
|
|
2094
|
-
React__default.createElement(IconContainer, { icon: settings.dropdownMenu.icons.acceptIcon, cx: css$
|
|
2338
|
+
React__default.createElement(IconContainer, { icon: settings.dropdownMenu.icons.acceptIcon, cx: css$10.selectedMark })))));
|
|
2095
2339
|
});
|
|
2096
2340
|
function DropdownMenuSplitter(props) {
|
|
2097
|
-
return (React__default.createElement("div", { className: cx$1(props.cx, css$
|
|
2098
|
-
React__default.createElement("hr", { className: css$
|
|
2341
|
+
return (React__default.createElement("div", { className: cx$1(props.cx, css$10.splitterRoot) },
|
|
2342
|
+
React__default.createElement("hr", { className: css$10.splitter })));
|
|
2099
2343
|
}
|
|
2100
2344
|
function DropdownMenuHeader(props) {
|
|
2101
|
-
return (React__default.createElement("div", { className: cx$1('uui-dropdown-menu-header', props.cx, css$
|
|
2102
|
-
React__default.createElement("span", { className: css$
|
|
2345
|
+
return (React__default.createElement("div", { className: cx$1('uui-dropdown-menu-header', props.cx, css$10.headerRoot) },
|
|
2346
|
+
React__default.createElement("span", { className: css$10.header }, props.caption)));
|
|
2103
2347
|
}
|
|
2104
2348
|
function DropdownSubMenu(props) {
|
|
2105
2349
|
const subMenuMiddleware = [
|
|
@@ -2114,7 +2358,7 @@ function DropdownSubMenu(props) {
|
|
|
2114
2358
|
}),
|
|
2115
2359
|
];
|
|
2116
2360
|
const isRtl = getDir() === 'rtl';
|
|
2117
|
-
return (React__default.createElement(Dropdown$1, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", openDelay: 400, closeDelay: 400, placement: isRtl ? 'left-start' : 'right-start', middleware: subMenuMiddleware, renderBody: (dropdownProps) => !props.isDisabled && (React__default.createElement(DropdownMenuBody, { closeOnKey: IDropdownControlKeys.LEFT_ARROW, ...props, ...dropdownProps })), renderTarget: ({ toggleDropdownOpening, ...targetProps }) => (React__default.createElement(DropdownMenuButton, { cx: cx$1(isRtl ? css$
|
|
2361
|
+
return (React__default.createElement(Dropdown$1, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", openDelay: 400, closeDelay: 400, placement: isRtl ? 'left-start' : 'right-start', middleware: subMenuMiddleware, renderBody: (dropdownProps) => !props.isDisabled && (React__default.createElement(DropdownMenuBody, { closeOnKey: IDropdownControlKeys.LEFT_ARROW, ...props, ...dropdownProps })), renderTarget: ({ toggleDropdownOpening, ...targetProps }) => (React__default.createElement(DropdownMenuButton, { cx: cx$1(isRtl ? css$10.submenuRootItemRtl : css$10.submenuRootItem), icon: settings.dropdownMenu.icons.dropdownIcon, iconPosition: "right", isDropdown: true, toggleDropdownOpening: toggleDropdownOpening, ...props, ...targetProps })) }));
|
|
2118
2362
|
}
|
|
2119
2363
|
function DropdownMenuSwitchButton(props) {
|
|
2120
2364
|
const context = useContext(UuiContext);
|
|
@@ -2130,29 +2374,29 @@ function DropdownMenuSwitchButton(props) {
|
|
|
2130
2374
|
onHandleValueChange(!isSelected);
|
|
2131
2375
|
}
|
|
2132
2376
|
};
|
|
2133
|
-
return (React__default.createElement("div", { className: cx$1(props.cx, css$
|
|
2134
|
-
icon && React__default.createElement(IconContainer, { icon: icon, cx: css$
|
|
2377
|
+
return (React__default.createElement("div", { className: cx$1(props.cx, css$10.itemRoot, isDisabled && uuiMod.disabled, (!isDisabled || onValueChange) && uuiMarkers.clickable), onClick: () => onHandleValueChange(!isSelected), role: "menuitem", onKeyDown: handleKeySelect, tabIndex: isDisabled ? -1 : 0 },
|
|
2378
|
+
icon && React__default.createElement(IconContainer, { icon: icon, cx: css$10.iconBefore }),
|
|
2135
2379
|
React__default.createElement(Text$1, null, caption),
|
|
2136
2380
|
React__default.createElement(FlexSpacer, null),
|
|
2137
2381
|
React__default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
|
|
2138
2382
|
}
|
|
2139
2383
|
|
|
2140
|
-
var css
|
|
2384
|
+
var css$$ = {"root":"_9Q8qyL","mode-block":"b-q2--","modeBlock":"b-q2--","mode-inline":"DUGgXF","modeInline":"DUGgXF","padding-0":"ha8phR","padding0":"ha8phR","padding-6":"bb3J-V","padding6":"bb3J-V","padding-12":"yZwuXj","padding12":"yZwuXj","padding-18":"MSxLsx","padding18":"MSxLsx"};
|
|
2141
2385
|
|
|
2142
2386
|
function applyAccordionMods(mods) {
|
|
2143
2387
|
return [
|
|
2144
|
-
css
|
|
2145
|
-
css
|
|
2146
|
-
mods.padding && css
|
|
2388
|
+
css$$.root,
|
|
2389
|
+
css$$[`mode-${mods.mode || 'block'}`],
|
|
2390
|
+
mods.padding && css$$['padding-' + mods.padding],
|
|
2147
2391
|
];
|
|
2148
2392
|
}
|
|
2149
2393
|
const Accordion = /* @__PURE__ */withMods(uuiComponents.Accordion, applyAccordionMods, (mods) => ({
|
|
2150
2394
|
dropdownIcon: mods.dropdownIcon !== null && settings.accordion.icons.dropdownIcon,
|
|
2151
2395
|
}));
|
|
2152
2396
|
|
|
2153
|
-
var css$
|
|
2397
|
+
var css$_ = {"root":"g8kTts","align-items":"_4mcqOz","alignItems":"_4mcqOz","justify-content":"eR4yds","justifyContent":"eR4yds","border-top":"_1NoDBx","borderTop":"_1NoDBx","border-bottom":"jY6yPS","borderBottom":"jY6yPS","top-shadow":"CJfy2S","topShadow":"CJfy2S","padding":"ehk42B","margin":"w4BZ8M","vPadding":"_4x13-2","column-gap":"GQiae9","columnGap":"GQiae9","row-gap":"AElaKQ","rowGap":"AElaKQ","spacing":"kxVjhK"};
|
|
2154
2398
|
|
|
2155
|
-
const FlexCell = /* @__PURE__ */withMods(FlexCell$1, () => [css$
|
|
2399
|
+
const FlexCell = /* @__PURE__ */withMods(FlexCell$1, () => [css$_.flexCell]);
|
|
2156
2400
|
|
|
2157
2401
|
const FlexRow = /* @__PURE__ */forwardRef((props, ref) => {
|
|
2158
2402
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2161,22 +2405,22 @@ const FlexRow = /* @__PURE__ */forwardRef((props, ref) => {
|
|
|
2161
2405
|
}
|
|
2162
2406
|
}
|
|
2163
2407
|
const classNames = cx$1([
|
|
2164
|
-
css$
|
|
2408
|
+
css$_.root,
|
|
2165
2409
|
'uui-flex-row',
|
|
2166
2410
|
props.onClick && uuiMarkers.clickable,
|
|
2167
2411
|
props.cx,
|
|
2168
2412
|
props.size !== null && 'uui-size-' + (props.size || settings.flexRow.sizes.default),
|
|
2169
|
-
props.alignItems && css$
|
|
2170
|
-
props.justifyContent && css$
|
|
2171
|
-
props.padding && css$
|
|
2172
|
-
props.vPadding && css$
|
|
2173
|
-
props.margin && css$
|
|
2174
|
-
props.topShadow && css$
|
|
2175
|
-
props.borderBottom && css$
|
|
2176
|
-
props.borderTop && css$
|
|
2177
|
-
props.columnGap && css$
|
|
2178
|
-
props.rowGap && css$
|
|
2179
|
-
props.spacing && css$
|
|
2413
|
+
props.alignItems && css$_.alignItems,
|
|
2414
|
+
props.justifyContent && css$_.justifyContent,
|
|
2415
|
+
props.padding && css$_.padding,
|
|
2416
|
+
props.vPadding && css$_.vPadding,
|
|
2417
|
+
props.margin && css$_.margin,
|
|
2418
|
+
props.topShadow && css$_.topShadow,
|
|
2419
|
+
props.borderBottom && css$_.borderBottom,
|
|
2420
|
+
props.borderTop && css$_.borderTop,
|
|
2421
|
+
props.columnGap && css$_.columnGap,
|
|
2422
|
+
props.rowGap && css$_.rowGap,
|
|
2423
|
+
props.spacing && css$_.spacing,
|
|
2180
2424
|
props.background && `uui-flex-row-bg-${props.background}`,
|
|
2181
2425
|
]);
|
|
2182
2426
|
let alignItemsValue = props.alignItems;
|
|
@@ -2202,22 +2446,22 @@ const FlexRow = /* @__PURE__ */forwardRef((props, ref) => {
|
|
|
2202
2446
|
} }, props.children));
|
|
2203
2447
|
});
|
|
2204
2448
|
|
|
2205
|
-
var css$
|
|
2449
|
+
var css$Z = {"root":"GlIDeG","margin-24":"nLBcez","margin24":"nLBcez","padding-12":"vYUQl6","padding12":"vYUQl6","padding-24":"BQ0pCZ","padding24":"BQ0pCZ","shadow":"Yl-WgY","uui-surface-main":"nI0dBJ","uuiSurfaceMain":"nI0dBJ"};
|
|
2206
2450
|
|
|
2207
2451
|
const Panel = /* @__PURE__ */withMods(VPanel, (props) => [
|
|
2208
2452
|
'uui-panel',
|
|
2209
|
-
css$
|
|
2210
|
-
props.shadow && css$
|
|
2211
|
-
props.margin && css$
|
|
2212
|
-
props.background && css$
|
|
2453
|
+
css$Z.root,
|
|
2454
|
+
props.shadow && css$Z.shadow,
|
|
2455
|
+
props.margin && css$Z['margin-' + props.margin],
|
|
2456
|
+
props.background && css$Z[`uui-${props.background}`],
|
|
2213
2457
|
]);
|
|
2214
2458
|
|
|
2215
|
-
var css$
|
|
2459
|
+
var css$Y = {"root":"Xdx8Hf"};
|
|
2216
2460
|
|
|
2217
2461
|
function applyLabeledInputMods(mods) {
|
|
2218
2462
|
return [
|
|
2219
2463
|
'uui-labeled-input',
|
|
2220
|
-
css$
|
|
2464
|
+
css$Y.root,
|
|
2221
2465
|
'uui-size-' + (mods.size || settings.labeledInput.sizes.default),
|
|
2222
2466
|
];
|
|
2223
2467
|
}
|
|
@@ -2229,7 +2473,7 @@ function applyLabeledInputProps(props) {
|
|
|
2229
2473
|
}
|
|
2230
2474
|
const LabeledInput = /* @__PURE__ */withMods(uuiComponents.LabeledInput, applyLabeledInputMods, applyLabeledInputProps);
|
|
2231
2475
|
|
|
2232
|
-
var css$
|
|
2476
|
+
var css$X = {"root":"FALrI9"};
|
|
2233
2477
|
|
|
2234
2478
|
function RadioGroup(props) {
|
|
2235
2479
|
const direction = props.direction || 'vertical';
|
|
@@ -2238,24 +2482,85 @@ function RadioGroup(props) {
|
|
|
2238
2482
|
props.onValueChange(newVal);
|
|
2239
2483
|
}
|
|
2240
2484
|
};
|
|
2241
|
-
return (React.createElement("fieldset", { ref: props.forwardedRef, className: cx$1(css$
|
|
2485
|
+
return (React.createElement("fieldset", { ref: props.forwardedRef, className: cx$1(css$X.root, directionMode[direction], props.cx), onFocus: props.onFocus, onBlur: props.onBlur, ...props.rawProps }, props.items.map((i) => {
|
|
2242
2486
|
const { id, name, renderName, ...restItemProps } = i;
|
|
2243
2487
|
return (React.createElement(RadioInput, { name: props.name, renderLabel: i.renderName ? i.renderName : () => i.name, value: props.value === i.id, onValueChange: () => handleChange(i.id), isDisabled: props.isDisabled || i.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, isRequired: props.isRequired, key: i.id.toString(), size: props.size || i.size, ...restItemProps }));
|
|
2244
2488
|
})));
|
|
2245
2489
|
}
|
|
2246
2490
|
|
|
2247
|
-
var css$
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
];
|
|
2253
|
-
|
|
2254
|
-
|
|
2491
|
+
var css$W = {"root":"c7Scrj","viewport":"NCvV-L"};
|
|
2492
|
+
|
|
2493
|
+
var uuiScrollbars;
|
|
2494
|
+
(function (uuiScrollbars) {
|
|
2495
|
+
uuiScrollbars["uuiShadowTop"] = "uui-shadow-top";
|
|
2496
|
+
uuiScrollbars["uuiShadowBottom"] = "uui-shadow-bottom";
|
|
2497
|
+
uuiScrollbars["uuiLineTop"] = "uui-line-top";
|
|
2498
|
+
uuiScrollbars["uuiLineBottom"] = "uui-line-bottom";
|
|
2499
|
+
})(uuiScrollbars || (uuiScrollbars = {}));
|
|
2500
|
+
const ScrollBars = /* @__PURE__ */forwardRef((props, ref) => {
|
|
2501
|
+
const { cx: outerCx, children, overflowTopEffect = 'none', overflowBottomEffect = 'none', onScroll, autoHide = 'never', autoHideDelay, rawProps, ...rest } = props;
|
|
2502
|
+
const [shadowElements, setShadowElements] = useState({
|
|
2503
|
+
host: null,
|
|
2504
|
+
viewport: null,
|
|
2505
|
+
});
|
|
2506
|
+
const hostRef = useRef(null);
|
|
2507
|
+
const viewportRef = useRef(null);
|
|
2508
|
+
const containerRef = useRef(null);
|
|
2509
|
+
const [initialize, osInstance] = useOverlayScrollbars({
|
|
2510
|
+
options: {
|
|
2511
|
+
scrollbars: {
|
|
2512
|
+
theme: 'uui-scroll-bars',
|
|
2513
|
+
autoHide: autoHide,
|
|
2514
|
+
autoHideDelay: typeof autoHideDelay === 'number' ? autoHideDelay : undefined,
|
|
2515
|
+
},
|
|
2516
|
+
},
|
|
2517
|
+
events: {
|
|
2518
|
+
scroll: (_inst, ev) => {
|
|
2519
|
+
onScroll?.(ev);
|
|
2520
|
+
},
|
|
2521
|
+
},
|
|
2522
|
+
});
|
|
2523
|
+
useEffect(() => {
|
|
2524
|
+
const host = hostRef.current;
|
|
2525
|
+
const vp = viewportRef.current;
|
|
2526
|
+
if (!host || !vp)
|
|
2527
|
+
return;
|
|
2528
|
+
initialize({
|
|
2529
|
+
target: host,
|
|
2530
|
+
elements: {
|
|
2531
|
+
viewport: vp,
|
|
2532
|
+
content: vp,
|
|
2533
|
+
},
|
|
2534
|
+
});
|
|
2535
|
+
return () => {
|
|
2536
|
+
osInstance()?.destroy();
|
|
2537
|
+
};
|
|
2538
|
+
}, [initialize, osInstance]);
|
|
2539
|
+
useEffect(() => {
|
|
2540
|
+
const instance = osInstance();
|
|
2541
|
+
if (!instance)
|
|
2542
|
+
return;
|
|
2543
|
+
const elements = instance.elements();
|
|
2544
|
+
setShadowElements({
|
|
2545
|
+
host: elements.host,
|
|
2546
|
+
viewport: elements.viewport,
|
|
2547
|
+
});
|
|
2548
|
+
}, [osInstance]);
|
|
2549
|
+
useScrollShadows(shadowElements.host, shadowElements.viewport);
|
|
2550
|
+
useImperativeHandle(ref, () => {
|
|
2551
|
+
return {
|
|
2552
|
+
container: containerRef.current,
|
|
2553
|
+
view: viewportRef.current,
|
|
2554
|
+
};
|
|
2555
|
+
}, []);
|
|
2556
|
+
return (React__default.createElement("div", { ref: hostRef, className: cx(css$W.root, outerCx, 'uui-scroll-bars', overflowTopEffect === 'shadow' && uuiScrollbars.uuiShadowTop, overflowBottomEffect === 'shadow' && uuiScrollbars.uuiShadowBottom, overflowTopEffect === 'line' && uuiScrollbars.uuiLineTop, overflowBottomEffect === 'line' && uuiScrollbars.uuiLineBottom), ...rest, "data-overlayscrollbars-initialize": "" },
|
|
2557
|
+
React__default.createElement("div", { className: css$W.viewport, "data-overlayscrollbars-contents": "", ref: (node) => { viewportRef.current = node; }, ...rawProps }, children)));
|
|
2558
|
+
});
|
|
2559
|
+
ScrollBars.displayName = 'ScrollBars';
|
|
2255
2560
|
|
|
2256
|
-
var css$
|
|
2561
|
+
var css$V = {"scroll-container":"T6hPfH","scrollContainer":"T6hPfH","list-container":"ZPmhUI","listContainer":"ZPmhUI"};
|
|
2257
2562
|
|
|
2258
|
-
const VirtualList = /* @__PURE__ */
|
|
2563
|
+
const VirtualList = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
2259
2564
|
const { listContainerRef, offsetY, handleScroll, estimatedHeight, scrollContainerRef, } = useVirtualList({
|
|
2260
2565
|
value: props.value,
|
|
2261
2566
|
onValueChange: props.onValueChange,
|
|
@@ -2263,41 +2568,50 @@ const VirtualList = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2263
2568
|
rowsCount: props.rowsCount,
|
|
2264
2569
|
rowsSelector: props.rowsSelector,
|
|
2265
2570
|
});
|
|
2266
|
-
|
|
2267
|
-
const scrollShadows = useScrollShadows({ root: scrollContainerRef.current });
|
|
2571
|
+
React__default.useImperativeHandle(ref, () => scrollContainerRef.current, [scrollContainerRef.current]);
|
|
2268
2572
|
const renderRows = () => props.renderRows?.({
|
|
2269
|
-
listContainerRef, estimatedHeight, offsetY,
|
|
2270
|
-
}) || (
|
|
2271
|
-
|
|
2272
|
-
const
|
|
2273
|
-
|
|
2274
|
-
if (!scrollbars?.container?.firstChild)
|
|
2573
|
+
listContainerRef, estimatedHeight, offsetY,
|
|
2574
|
+
}) || (React__default.createElement("div", { className: css$V.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
2575
|
+
React__default.createElement("div", { ref: listContainerRef, role: props.role, style: { marginTop: offsetY } }, props.rows)));
|
|
2576
|
+
const scrollBarsRef = React__default.useCallback((scrollbars) => {
|
|
2577
|
+
if (!scrollbars?.view)
|
|
2275
2578
|
return;
|
|
2276
|
-
scrollContainerRef.current = scrollbars.
|
|
2579
|
+
scrollContainerRef.current = scrollbars.view;
|
|
2277
2580
|
}, []);
|
|
2278
|
-
return (
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
[uuiMarkers.scrolledTop]: scrollShadows.verticalTop,
|
|
2282
|
-
[uuiMarkers.scrolledBottom]: scrollShadows.verticalBottom,
|
|
2283
|
-
}), onScroll: handleScroll, renderView: renderView, ref: scrollBarsRef }, renderRows()));
|
|
2284
|
-
});
|
|
2285
|
-
const VirtualListView = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
2286
|
-
return (React.createElement(React.Fragment, null,
|
|
2287
|
-
React.createElement("div", { ...props.rawProps, style: {
|
|
2288
|
-
...props.style,
|
|
2289
|
-
position: 'relative',
|
|
2290
|
-
flex: '1 1 auto',
|
|
2291
|
-
display: 'flex',
|
|
2292
|
-
flexDirection: 'column',
|
|
2293
|
-
overflow: props.isLoading ? 'hidden' : 'scroll',
|
|
2294
|
-
marginRight: props.isLoading ? 0 : props.style.marginRight,
|
|
2295
|
-
marginBottom: props.isLoading ? 0 : props.style.marginBottom,
|
|
2296
|
-
}, ref: ref }, props.children),
|
|
2297
|
-
props.renderBlocker ? props.renderBlocker({ isLoading: props.isLoading }) : React.createElement(Blocker, { isEnabled: props.isLoading })));
|
|
2581
|
+
return (React__default.createElement(ScrollBars, { cx: cx$1(css$V.scrollContainer, props.cx), onScroll: handleScroll, ref: scrollBarsRef, rawProps: props.rawProps, overflowTopEffect: props.overflowTopEffect, overflowBottomEffect: props.overflowBottomEffect },
|
|
2582
|
+
renderRows(),
|
|
2583
|
+
React__default.createElement(Blocker, { isEnabled: props.isLoading })));
|
|
2298
2584
|
});
|
|
2299
2585
|
|
|
2300
|
-
|
|
2586
|
+
const RichTextView = /* @__PURE__ */withMods(uuiComponents.RichTextView, (mods) => ['uui-typography', `uui-typography-size-${mods.size || settings.richTextView.sizes.default}`]);
|
|
2587
|
+
|
|
2588
|
+
function TreeRowRenderer(props) {
|
|
2589
|
+
const { row, size } = props;
|
|
2590
|
+
const handleClick = React.useCallback(() => {
|
|
2591
|
+
const cb = row.onClick || row.onSelect;
|
|
2592
|
+
if (cb && !row.isDisabled) {
|
|
2593
|
+
cb(row);
|
|
2594
|
+
}
|
|
2595
|
+
}, [row]);
|
|
2596
|
+
const handleFold = React.useCallback(() => row.onFold && row.onFold(row), [row]);
|
|
2597
|
+
const renderAddons = React.useCallback(() => props.renderAddons && props.renderAddons(row), [props.renderAddons, row]);
|
|
2598
|
+
const isActive = row.isSelected;
|
|
2599
|
+
const getCaption = React.useCallback((value) => {
|
|
2600
|
+
return props.getCaption(value);
|
|
2601
|
+
}, [props.getCaption]);
|
|
2602
|
+
return (React.createElement(VerticalTabButton, { ...row, isActive: isActive, caption: row.isLoading ? React.createElement(TextPlaceholder, null) : getCaption(row.value), size: size, onClick: (row.onClick || row.onSelect) ? handleClick : undefined, link: row.link, onFold: row.onFold ? handleFold : undefined, weight: (row.isChildrenSelected || row.isSelected || isActive) ? 'semibold' : 'regular', renderAddons: renderAddons }));
|
|
2603
|
+
}
|
|
2604
|
+
const MemoizedTreeRowRenderer = /* @__PURE__ */React.memo(TreeRowRenderer);
|
|
2605
|
+
function Tree(props) {
|
|
2606
|
+
const { view, renderRow, size = '36', cx: propsCx, value, onValueChange, } = props;
|
|
2607
|
+
const rows = view.getVisibleRows();
|
|
2608
|
+
const rowsCount = view.getListProps().rowsCount ?? rows.length;
|
|
2609
|
+
const renderRowFunction = renderRow || (({ key, ...row }) => (React.createElement(MemoizedTreeRowRenderer, { key: key, row: row, size: size, getCaption: props.getCaption, renderAddons: props.renderAddons })));
|
|
2610
|
+
const renderedRows = useMemo(() => rows.map((row) => renderRowFunction(row)), [rows, renderRowFunction, size]);
|
|
2611
|
+
return (React.createElement(VirtualList, { value: value, onValueChange: onValueChange, rowsCount: rowsCount, rows: renderedRows, cx: cx$1(propsCx), role: "tree" }));
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
var css$U = {"root":"U6Epqp"};
|
|
2301
2615
|
|
|
2302
2616
|
function CheckboxGroup(props) {
|
|
2303
2617
|
const currentValue = props.value || [];
|
|
@@ -2313,16 +2627,96 @@ function CheckboxGroup(props) {
|
|
|
2313
2627
|
}
|
|
2314
2628
|
props.onValueChange(newSelection);
|
|
2315
2629
|
};
|
|
2316
|
-
return (React.createElement("fieldset", { ref: props.forwardedRef, className: cx$1(css$
|
|
2630
|
+
return (React.createElement("fieldset", { ref: props.forwardedRef, className: cx$1(css$U.root, directionMode[direction], props.cx), ...props.rawProps }, props.items.map((i) => {
|
|
2317
2631
|
const { id, name, renderName, ...restItemProps } = i;
|
|
2318
2632
|
return (React.createElement(Checkbox, { renderLabel: i.renderName ? i.renderName : () => i.name, value: currentValue.indexOf(i.id) !== -1, onValueChange: (selected) => handleChange(selected, i.id), isDisabled: props.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, isRequired: props.isRequired, key: i.id.toString(), size: props.size || i.size, ...restItemProps }));
|
|
2319
2633
|
})));
|
|
2320
2634
|
}
|
|
2321
2635
|
|
|
2322
|
-
|
|
2636
|
+
const Tabs = /* @__PURE__ */forwardRef((props, ref) => {
|
|
2637
|
+
const { items, value, onValueChange, borderBottom = true, rawProps, ...otherProps } = props;
|
|
2638
|
+
if (items.length === 0) {
|
|
2639
|
+
return null;
|
|
2640
|
+
}
|
|
2641
|
+
const tabLastIndex = items.length - 1;
|
|
2642
|
+
const getTabCurrentIndex = (tabIdCurrent) => {
|
|
2643
|
+
return items.findIndex((tabProps) => {
|
|
2644
|
+
return tabProps.id === tabIdCurrent;
|
|
2645
|
+
});
|
|
2646
|
+
};
|
|
2647
|
+
const moveToTabWithIndex = (tabIndex) => {
|
|
2648
|
+
/*
|
|
2649
|
+
`id`-s provided in `items` are assigned to the tabs.
|
|
2650
|
+
Unless users manually broke this connection,
|
|
2651
|
+
the index calculation will be correct,
|
|
2652
|
+
and the tab element will be present in the DOM.
|
|
2653
|
+
*/
|
|
2654
|
+
const tab = items.at(tabIndex);
|
|
2655
|
+
const tabElement = document.getElementById(tab.id);
|
|
2656
|
+
tabElement.focus();
|
|
2657
|
+
};
|
|
2658
|
+
const moveToPreviousTab = (tabIdCurrent) => {
|
|
2659
|
+
const tabCurrentIndex = getTabCurrentIndex(tabIdCurrent);
|
|
2660
|
+
const tabIndexNext = tabCurrentIndex === 0 ? tabLastIndex : tabCurrentIndex - 1;
|
|
2661
|
+
moveToTabWithIndex(tabIndexNext);
|
|
2662
|
+
};
|
|
2663
|
+
const moveToNextTab = (tabIdCurrent) => {
|
|
2664
|
+
const tabCurrentIndex = getTabCurrentIndex(tabIdCurrent);
|
|
2665
|
+
const tabIndexNext = tabCurrentIndex === tabLastIndex ? 0 : tabCurrentIndex + 1;
|
|
2666
|
+
moveToTabWithIndex(tabIndexNext);
|
|
2667
|
+
};
|
|
2668
|
+
const onKeyDown = (event) => {
|
|
2669
|
+
const focusedTabIdCurrent = event.target.id;
|
|
2670
|
+
// https://www.w3.org/WAI/ARIA/apg/patterns/tabs/#keyboardinteraction
|
|
2671
|
+
switch (event.code) {
|
|
2672
|
+
case 'ArrowLeft': {
|
|
2673
|
+
moveToPreviousTab(focusedTabIdCurrent);
|
|
2674
|
+
break;
|
|
2675
|
+
}
|
|
2676
|
+
case 'ArrowRight': {
|
|
2677
|
+
moveToNextTab(focusedTabIdCurrent);
|
|
2678
|
+
break;
|
|
2679
|
+
}
|
|
2680
|
+
case 'Home': {
|
|
2681
|
+
moveToTabWithIndex(0);
|
|
2682
|
+
break;
|
|
2683
|
+
}
|
|
2684
|
+
case 'End': {
|
|
2685
|
+
moveToTabWithIndex(tabLastIndex);
|
|
2686
|
+
break;
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
};
|
|
2690
|
+
return (React__default.createElement(FlexRow, { ref: ref, borderBottom: borderBottom, rawProps: {
|
|
2691
|
+
role: 'tablist',
|
|
2692
|
+
'aria-orientation': 'horizontal',
|
|
2693
|
+
...rawProps,
|
|
2694
|
+
}, ...otherProps }, items.map((tabProps) => {
|
|
2695
|
+
const { id } = tabProps;
|
|
2696
|
+
const handleOnClick = () => {
|
|
2697
|
+
onValueChange(id);
|
|
2698
|
+
tabProps.onClick?.();
|
|
2699
|
+
};
|
|
2700
|
+
const handleOnKeyDown = (event) => {
|
|
2701
|
+
onKeyDown(event);
|
|
2702
|
+
tabProps.rawProps?.onKeyDown?.(event);
|
|
2703
|
+
};
|
|
2704
|
+
const isActive = id === value;
|
|
2705
|
+
const tabIndex = isActive ? undefined : -1;
|
|
2706
|
+
return (React__default.createElement(TabButton, { key: id, isActive: isActive, tabIndex: tabIndex, ...tabProps, onClick: handleOnClick, rawProps: {
|
|
2707
|
+
id,
|
|
2708
|
+
'aria-selected': isActive,
|
|
2709
|
+
...tabProps.rawProps,
|
|
2710
|
+
onKeyDown: handleOnKeyDown,
|
|
2711
|
+
} }));
|
|
2712
|
+
})));
|
|
2713
|
+
});
|
|
2714
|
+
Tabs.displayName = 'Tabs';
|
|
2323
2715
|
|
|
2324
|
-
|
|
2325
|
-
|
|
2716
|
+
var css$T = {"root":"U78jff","modal-blocker":"rLHfoX","modalBlocker":"rLHfoX","animateModalBlocker":"N6T2OU","modal":"nQ1ZUh","modal-footer":"eDVe9r","modalFooter":"eDVe9r","border-top":"FXWMEf","borderTop":"FXWMEf","modal-header":"tb7hiH","modalHeader":"tb7hiH","border-bottom":"_3cGnEZ","borderBottom":"_3cGnEZ"};
|
|
2717
|
+
|
|
2718
|
+
const ModalBlocker = /* @__PURE__ */withMods(ModalBlocker$1, () => [css$T.modalBlocker]);
|
|
2719
|
+
const ModalWindow = /* @__PURE__ */withMods(ModalWindow$1, () => [css$T.root, css$T.modal], (props) => {
|
|
2326
2720
|
const width = props.width;
|
|
2327
2721
|
const height = props.height || 'auto';
|
|
2328
2722
|
const maxHeight = isMobile() ? 'var(--uui-modals-mobile-max-height)' : (props.maxHeight || 'var(--uui-modals-max-height)');
|
|
@@ -2336,7 +2730,7 @@ const ModalWindow = /* @__PURE__ */withMods(ModalWindow$1, () => [css$10.root, c
|
|
|
2336
2730
|
};
|
|
2337
2731
|
});
|
|
2338
2732
|
function ModalHeader(props) {
|
|
2339
|
-
return (React__default.createElement("div", { className: cx(css$
|
|
2733
|
+
return (React__default.createElement("div", { className: cx(css$T.root, css$T.modalHeader, 'uui-modal-header', props.borderBottom && css$T.borderBottom, props.cx), ...props.rawProps, style: {
|
|
2340
2734
|
...props.rawProps?.style,
|
|
2341
2735
|
} },
|
|
2342
2736
|
props.title && (React__default.createElement("div", { className: cx('uui-modal-title', 'uui-typography') }, props.title)),
|
|
@@ -2346,7 +2740,7 @@ function ModalHeader(props) {
|
|
|
2346
2740
|
React__default.createElement(IconButton, { rawProps: { 'aria-label': 'Close modal' }, icon: settings.modal.icons.closeIcon, onClick: props.onClose })))));
|
|
2347
2741
|
}
|
|
2348
2742
|
function ModalFooter(props) {
|
|
2349
|
-
return (React__default.createElement("div", { className: cx(css$
|
|
2743
|
+
return (React__default.createElement("div", { className: cx(css$T.root, css$T.modalFooter, 'uui-modal-footer', props.borderTop && css$T.borderTop, props.cx), ...props.rawProps, style: {
|
|
2350
2744
|
...props.rawProps?.style,
|
|
2351
2745
|
} }, props.children));
|
|
2352
2746
|
}
|
|
@@ -2511,7 +2905,7 @@ const TREE_SHAKEABLE_INIT = () => ({
|
|
|
2511
2905
|
});
|
|
2512
2906
|
const i18n = /* @__PURE__ */TREE_SHAKEABLE_INIT();
|
|
2513
2907
|
|
|
2514
|
-
var css
|
|
2908
|
+
var css$S = {"root":"wD5M43","icon-wrapper":"ytSieg","iconWrapper":"ytSieg","action-wrapper":"jUW4oa","actionWrapper":"jUW4oa","close-icon":"Y9JY19","closeIcon":"Y9JY19","main-path":"ZGabYW","mainPath":"ZGabYW","content":"vkuP49","close-wrapper":"JQicTB","closeWrapper":"JQicTB","clear-notifications":"QjUgBA","clearNotifications":"QjUgBA"};
|
|
2515
2909
|
|
|
2516
2910
|
const NotificationCard = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
2517
2911
|
const notificationCardNode = React__default.useRef(null);
|
|
@@ -2524,15 +2918,15 @@ const NotificationCard = /* @__PURE__ */React__default.forwardRef((props, ref) =
|
|
|
2524
2918
|
notificationCardNode.current?.removeEventListener('mouseleave', props.refreshTimer);
|
|
2525
2919
|
};
|
|
2526
2920
|
}, []);
|
|
2527
|
-
return (React__default.createElement("div", { role: "alert", className: cx('uui-notification_card', props.color && `uui-color-${props.color}`, css
|
|
2528
|
-
React__default.createElement("div", { className: css
|
|
2529
|
-
props.icon && (React__default.createElement("div", { className: css
|
|
2921
|
+
return (React__default.createElement("div", { role: "alert", className: cx('uui-notification_card', props.color && `uui-color-${props.color}`, css$S.root, props.cx), ref: notificationCardNode, ...props.rawProps },
|
|
2922
|
+
React__default.createElement("div", { className: css$S.mainPath },
|
|
2923
|
+
props.icon && (React__default.createElement("div", { className: css$S.iconWrapper },
|
|
2530
2924
|
React__default.createElement(IconContainer, { size: settings.notificationCard.sizes.icon, icon: props.icon }))),
|
|
2531
|
-
React__default.createElement("div", { className: css
|
|
2925
|
+
React__default.createElement("div", { className: css$S.content },
|
|
2532
2926
|
props.children,
|
|
2533
|
-
props.actions && (React__default.createElement("div", { className: css
|
|
2534
|
-
props.onClose && (React__default.createElement("div", { className: cx(css
|
|
2535
|
-
React__default.createElement(IconButton, { icon: settings.notificationCard.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css
|
|
2927
|
+
props.actions && (React__default.createElement("div", { className: css$S.actionWrapper }, props.actions.map((action) => (React__default.createElement(LinkButton, { key: action.name, caption: action.name, onClick: action.action, cx: css$S.actionLink, size: settings.notificationCard.sizes.action, rawProps: action.rawProps })))))),
|
|
2928
|
+
props.onClose && (React__default.createElement("div", { className: cx(css$S.closeWrapper, 'uui-notification_card-close_icon') },
|
|
2929
|
+
React__default.createElement(IconButton, { icon: settings.notificationCard.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css$S.closeIcon }))))));
|
|
2536
2930
|
});
|
|
2537
2931
|
const WarningNotification = /* @__PURE__ */React__default.forwardRef((props, ref) => (React__default.createElement(NotificationCard, { icon: settings.notificationCard.icons.warningIcon, color: "warning", ...props, ref: ref, cx: props.cx })));
|
|
2538
2932
|
const SuccessNotification = /* @__PURE__ */React__default.forwardRef((props, ref) => (React__default.createElement(NotificationCard, { icon: settings.notificationCard.icons.successIcon, color: "success", ...props, ref: ref, cx: props.cx })));
|
|
@@ -2540,11 +2934,11 @@ const HintNotification = /* @__PURE__ */React__default.forwardRef((props, ref) =
|
|
|
2540
2934
|
const ErrorNotification = /* @__PURE__ */React__default.forwardRef((props, ref) => (React__default.createElement(NotificationCard, { icon: settings.notificationCard.icons.errorIcon, color: "error", ...props, ref: ref, cx: props.cx })));
|
|
2541
2935
|
function ClearNotification() {
|
|
2542
2936
|
const uuiCtx = useUuiContext();
|
|
2543
|
-
return (React__default.createElement("div", { className: cx(css
|
|
2937
|
+
return (React__default.createElement("div", { className: cx(css$S.clearNotifications, 'uui-clear-notifications') },
|
|
2544
2938
|
React__default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => uuiCtx.uuiNotifications.clearAll() })));
|
|
2545
2939
|
}
|
|
2546
2940
|
|
|
2547
|
-
var css$
|
|
2941
|
+
var css$R = {"footer":"lZut3N"};
|
|
2548
2942
|
|
|
2549
2943
|
class ConfirmationModal extends React.Component {
|
|
2550
2944
|
render() {
|
|
@@ -2556,7 +2950,7 @@ class ConfirmationModal extends React.Component {
|
|
|
2556
2950
|
React.createElement(ModalWindow, { width: 420 },
|
|
2557
2951
|
React.createElement(ModalHeader, { borderBottom: true, title: this.props.caption, onClose: () => this.props.abort() }),
|
|
2558
2952
|
React.createElement(ScrollBars, null, bodyContent),
|
|
2559
|
-
React.createElement(ModalFooter, { cx: css$
|
|
2953
|
+
React.createElement(ModalFooter, { cx: css$R.footer },
|
|
2560
2954
|
this.props.hideCancelButton || (React.createElement(Button, { caption: i18n.form.modals.discardButton, onClick: () => this.props.success(false), fill: "outline", color: "secondary" })),
|
|
2561
2955
|
React.createElement(Button, { caption: i18n.form.modals.saveButton, onClick: () => this.props.success(true), color: "primary" })))));
|
|
2562
2956
|
}
|
|
@@ -2586,7 +2980,7 @@ function useReliableForceUpdate() {
|
|
|
2586
2980
|
return red[1];
|
|
2587
2981
|
}
|
|
2588
2982
|
|
|
2589
|
-
var css$
|
|
2983
|
+
var css$Q = {"root":"jmhVru","container":"tWIJrl"};
|
|
2590
2984
|
|
|
2591
2985
|
const defaultFormat = 'MMM D, YYYY';
|
|
2592
2986
|
const valueFormat = 'YYYY-MM-DD';
|
|
@@ -2797,21 +3191,21 @@ function DatePickerHeader({ navIconLeft, navIconRight, value: { month, view }, o
|
|
|
2797
3191
|
}, [view, month]);
|
|
2798
3192
|
const disablePrev = view === 'YEAR_SELECTION' && !isYearWithinSoberRange(getPrevYearsList(month));
|
|
2799
3193
|
const disableNext = view === 'YEAR_SELECTION' && !isYearWithinSoberRange(getNextYearsList(month));
|
|
2800
|
-
return (React.createElement("div", { className: cx(css$
|
|
3194
|
+
return (React.createElement("div", { className: cx(css$Q.root, uuiHeader.container, cx) },
|
|
2801
3195
|
React.createElement("header", { className: uuiHeader.headerNav },
|
|
2802
3196
|
React.createElement(Button, { icon: navIconLeft || settings.datePicker.icons.body.prevIcon, color: "secondary", fill: "ghost", cx: uuiHeader.navIconLeft, onClick: !isDisabled && (() => onLeftNavigationArrow()), isDisabled: disablePrev }),
|
|
2803
3197
|
React.createElement(Button, { caption: title, fill: "ghost", cx: uuiHeader.navTitle, onClick: !isDisabled && (() => onCaptionClick(view)) }),
|
|
2804
3198
|
React.createElement(Button, { icon: navIconRight || settings.datePicker.icons.body.nextIcon, color: "secondary", fill: "ghost", cx: uuiHeader.navIconRight, onClick: !isDisabled && (() => onRightNavigationArrow()), isDisabled: disableNext }))));
|
|
2805
3199
|
}
|
|
2806
3200
|
|
|
2807
|
-
var css$
|
|
3201
|
+
var css$P = {"root":"_0q9Ttf"};
|
|
2808
3202
|
|
|
2809
3203
|
function applyDateSelectionMods() {
|
|
2810
|
-
return [css$
|
|
3204
|
+
return [css$P.root, `uui-size-${settings.datePicker.sizes.body}`];
|
|
2811
3205
|
}
|
|
2812
3206
|
const Calendar = /* @__PURE__ */withMods(Calendar$1, applyDateSelectionMods);
|
|
2813
3207
|
|
|
2814
|
-
var css$
|
|
3208
|
+
var css$O = {"root":"-PXc4J"};
|
|
2815
3209
|
|
|
2816
3210
|
const uuiDatePickerBody = {
|
|
2817
3211
|
wrapper: 'uui-datepicker-body-wrapper',
|
|
@@ -2855,7 +3249,7 @@ function StatelessDatePickerBodyComp({ renderDay, isHoliday, cx: classes, filter
|
|
|
2855
3249
|
}
|
|
2856
3250
|
};
|
|
2857
3251
|
return (React__default.createElement("div", { ref: ref, className: cx$1(uuiDatePickerBodyBase.container, `uui-size-${settings.datePicker.sizes.body}`, classes), ...rawProps },
|
|
2858
|
-
React__default.createElement("div", { className: cx$1(css$
|
|
3252
|
+
React__default.createElement("div", { className: cx$1(css$O.root, uuiDatePickerBody.wrapper) },
|
|
2859
3253
|
React__default.createElement(DatePickerHeader, { value: {
|
|
2860
3254
|
view,
|
|
2861
3255
|
month,
|
|
@@ -2932,7 +3326,7 @@ function DatePickerComponent(props, ref) {
|
|
|
2932
3326
|
}
|
|
2933
3327
|
const DatePicker = /* @__PURE__ */React__default.forwardRef(DatePickerComponent);
|
|
2934
3328
|
|
|
2935
|
-
var css$
|
|
3329
|
+
var css$N = {"date-input":"_4SswK5","dateInput":"_4SswK5","root":"M8dEUC","separator":"tXEJ4C"};
|
|
2936
3330
|
|
|
2937
3331
|
const RangeDatePickerInput = /* @__PURE__ */forwardRef(({ isDisabled, isInvalid, isReadonly, size, disableClear, rawProps, value, inFocus, format, onValueChange, onFocusInput, onBlurInput, onClick, getPlaceholder, filter, onKeyDown, preventEmptyFromDate, preventEmptyToDate, id, cx: classes, }, ref) => {
|
|
2938
3332
|
const [inputValue, setInputValue] = useState(toCustomDateRangeFormat(value, format));
|
|
@@ -2997,13 +3391,13 @@ const RangeDatePickerInput = /* @__PURE__ */forwardRef(({ isDisabled, isInvalid,
|
|
|
2997
3391
|
const clearAllowed = !disableClear && !(preventEmptyFromDate && preventEmptyToDate) && inputValue.from && inputValue.to;
|
|
2998
3392
|
return (
|
|
2999
3393
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
3000
|
-
React__default.createElement("div", { ref: ref, className: cx$1(`uui-size-${size || settings.rangeDatePicker.sizes.default}`, 'uui-range-date-picker', classes, css$
|
|
3001
|
-
React__default.createElement(TextInput, { icon: settings.rangeDatePicker.icons.input.calendarIcon, cx: cx$1(css$
|
|
3002
|
-
React__default.createElement("div", { className: css$
|
|
3003
|
-
React__default.createElement(TextInput, { cx: cx$1(css$
|
|
3394
|
+
React__default.createElement("div", { ref: ref, className: cx$1(`uui-size-${size || settings.rangeDatePicker.sizes.default}`, 'uui-range-date-picker', classes, css$N.root, isDisabled && uuiMod.disabled, isReadonly && uuiMod.readonly, isInvalid && uuiMod.invalid, inFocus && uuiMod.focus), onKeyDown: onKeyDown },
|
|
3395
|
+
React__default.createElement(TextInput, { icon: settings.rangeDatePicker.icons.input.calendarIcon, cx: cx$1(css$N.dateInput, inFocus === 'from' && uuiMod.focus), size: size || settings.rangeDatePicker.sizes.default, placeholder: getPlaceholder ? getPlaceholder('from') : i18n.rangeDatePicker.pickerPlaceholderFrom, value: inputValue.from || undefined, onValueChange: (v) => onInputChange(v || '', 'from'), onFocus: (event) => handleFocus(event, 'from'), onBlur: (event) => handleBlur(event, 'from'), isInvalid: isInvalid, isDisabled: isDisabled, isReadonly: isReadonly, isDropdown: false, rawProps: rawProps?.from, onClick: onClick, onKeyDown: onInputKeyDown, id: id }),
|
|
3396
|
+
React__default.createElement("div", { className: css$N.separator }),
|
|
3397
|
+
React__default.createElement(TextInput, { cx: cx$1(css$N.dateInput, inFocus === 'to' && uuiMod.focus), placeholder: getPlaceholder ? getPlaceholder('to') : i18n.rangeDatePicker.pickerPlaceholderTo, size: size || settings.rangeDatePicker.sizes.default, value: inputValue.to || undefined, onCancel: clearAllowed ? onClear : undefined, onValueChange: (v) => onInputChange(v || '', 'to'), onFocus: (e) => handleFocus(e, 'to'), onBlur: (e) => handleBlur(e, 'to'), isInvalid: isInvalid, isDisabled: isDisabled, isReadonly: isReadonly, isDropdown: false, rawProps: rawProps?.to, onClick: onClick, onKeyDown: onInputKeyDown })));
|
|
3004
3398
|
});
|
|
3005
3399
|
|
|
3006
|
-
var css$
|
|
3400
|
+
var css$M = {"root":"ctWOZN"};
|
|
3007
3401
|
|
|
3008
3402
|
const uuiPresets = {
|
|
3009
3403
|
container: 'uui-presets-container',
|
|
@@ -3018,12 +3412,12 @@ const getPresets = (presets) => {
|
|
|
3018
3412
|
})).sort((a, b) => a.order - b.order);
|
|
3019
3413
|
};
|
|
3020
3414
|
function CalendarPresets(props) {
|
|
3021
|
-
return (React.createElement("div", { ref: props.forwardedRef, className: cx$1(uuiPresets.container, css$
|
|
3415
|
+
return (React.createElement("div", { ref: props.forwardedRef, className: cx$1(uuiPresets.container, css$M.root, props.cx), ...props.rawProps },
|
|
3022
3416
|
React.createElement("div", { className: uuiPresets.header }, "Presets"),
|
|
3023
3417
|
getPresets(props.presets).map((item) => (React.createElement(LinkButton, { key: item.key, caption: item.name, onClick: () => props.onPresetSet(item), size: settings.rangeDatePicker.sizes.preset })))));
|
|
3024
3418
|
}
|
|
3025
3419
|
|
|
3026
|
-
var css$
|
|
3420
|
+
var css$L = {"root":"ad8s-W","container":"uHvbmV","day-selection":"J9FAqZ","daySelection":"J9FAqZ","from-picker":"ncvxX5","fromPicker":"ncvxX5","to-picker":"OcG7s4","toPicker":"OcG7s4","bodes-wrapper":"zzbJ9q","bodesWrapper":"zzbJ9q","blocker":"yfsvJ5"};
|
|
3027
3421
|
|
|
3028
3422
|
const uuiRangeDatePickerBody = {
|
|
3029
3423
|
inRange: 'uui-range-datepicker-in-range',
|
|
@@ -3036,7 +3430,7 @@ const rangeDatePickerPresets = {
|
|
|
3036
3430
|
name: 'Today',
|
|
3037
3431
|
getRange: () => ({
|
|
3038
3432
|
from: uuiDayjs.dayjs().toString(),
|
|
3039
|
-
to:
|
|
3433
|
+
to: uuiDayjs.dayjs().toString(),
|
|
3040
3434
|
order: 1,
|
|
3041
3435
|
}),
|
|
3042
3436
|
},
|
|
@@ -3077,7 +3471,7 @@ const rangeDatePickerPresets = {
|
|
|
3077
3471
|
getRange: () => ({
|
|
3078
3472
|
from: uuiDayjs.dayjs().startOf('month').subtract(3, 'month').toString(),
|
|
3079
3473
|
to: uuiDayjs.dayjs().subtract(1, 'month').endOf('month').toString(),
|
|
3080
|
-
order:
|
|
3474
|
+
order: 6,
|
|
3081
3475
|
}),
|
|
3082
3476
|
},
|
|
3083
3477
|
thisYear: {
|
|
@@ -3162,8 +3556,8 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3162
3556
|
props.onValueChange({
|
|
3163
3557
|
inFocus: props.value.inFocus,
|
|
3164
3558
|
selectedDate: {
|
|
3165
|
-
from: uuiDayjs.dayjs(presetVal.from).format(valueFormat),
|
|
3166
|
-
to: uuiDayjs.dayjs(presetVal.to).format(valueFormat),
|
|
3559
|
+
from: presetVal.from ? uuiDayjs.dayjs(presetVal.from).format(valueFormat) : undefined,
|
|
3560
|
+
to: presetVal.to ? uuiDayjs.dayjs(presetVal.to).format(valueFormat) : undefined,
|
|
3167
3561
|
},
|
|
3168
3562
|
});
|
|
3169
3563
|
}, presets: presets })));
|
|
@@ -3176,18 +3570,18 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3176
3570
|
setMonth(monthToSet);
|
|
3177
3571
|
}
|
|
3178
3572
|
}, [selectedDate]);
|
|
3179
|
-
return (React__default.createElement("div", { ref: ref, className: cx(css$
|
|
3180
|
-
React__default.createElement(FlexRow, { cx: [view === 'DAY_SELECTION' && css$
|
|
3573
|
+
return (React__default.createElement("div", { ref: ref, className: cx(css$L.root, uuiDatePickerBodyBase.container, props.cx), ...props.rawProps, "aria-multiselectable": "true" },
|
|
3574
|
+
React__default.createElement(FlexRow, { cx: [view === 'DAY_SELECTION' && css$L.daySelection, css$L.container], alignItems: "top" },
|
|
3181
3575
|
React__default.createElement(FlexCell, { width: "auto" },
|
|
3182
3576
|
React__default.createElement(FlexRow, null,
|
|
3183
|
-
React__default.createElement(FlexRow, { cx: css$
|
|
3184
|
-
React__default.createElement(StatelessDatePickerBody, { key: "date-picker-body-left", cx: cx(css$
|
|
3577
|
+
React__default.createElement(FlexRow, { cx: css$L.bodesWrapper, alignItems: "top" },
|
|
3578
|
+
React__default.createElement(StatelessDatePickerBody, { key: "date-picker-body-left", cx: cx(css$L.fromPicker), ...from, onValueChange: (v) => onBodyValueChange(v), onMonthChange: (m) => {
|
|
3185
3579
|
setMonth(m);
|
|
3186
3580
|
}, onViewChange: (v) => {
|
|
3187
3581
|
setView(v);
|
|
3188
3582
|
setDisabledPanel(v !== 'DAY_SELECTION' ? 'right' : null);
|
|
3189
3583
|
}, filter: props.filter, isHoliday: props.isHoliday, renderDay: props.renderDay || renderDay, isDisabled: disabledPanel === 'left' }),
|
|
3190
|
-
React__default.createElement(StatelessDatePickerBody, { key: "date-picker-body-right", cx: cx(css$
|
|
3584
|
+
React__default.createElement(StatelessDatePickerBody, { key: "date-picker-body-right", cx: cx(css$L.toPicker), ...to, onValueChange: (v) => onBodyValueChange(v), onMonthChange: (m) => {
|
|
3191
3585
|
setMonth(m.subtract(1, 'month'));
|
|
3192
3586
|
}, onViewChange: (v) => {
|
|
3193
3587
|
setView(v);
|
|
@@ -3196,7 +3590,7 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3196
3590
|
view !== 'DAY_SELECTION' && (React__default.createElement("div", { style: {
|
|
3197
3591
|
left: disabledPanel === 'right' ? '50%' : undefined,
|
|
3198
3592
|
right: disabledPanel === 'left' ? '50%' : undefined,
|
|
3199
|
-
}, className: css$
|
|
3593
|
+
}, className: css$L.blocker }))),
|
|
3200
3594
|
props.presets && renderPresets(props.presets)),
|
|
3201
3595
|
props.renderFooter && props.renderFooter()))));
|
|
3202
3596
|
}
|
|
@@ -3225,7 +3619,7 @@ const getDayState = (day, selectedDate) => {
|
|
|
3225
3619
|
};
|
|
3226
3620
|
};
|
|
3227
3621
|
|
|
3228
|
-
var css$
|
|
3622
|
+
var css$K = {"dropdown-container":"mRcXPu","dropdownContainer":"mRcXPu"};
|
|
3229
3623
|
|
|
3230
3624
|
function RangeDatePickerComponent(props, ref) {
|
|
3231
3625
|
const { value: _value, format = defaultFormat, size = settings.rangeDatePicker.sizes.default } = props;
|
|
@@ -3269,7 +3663,7 @@ function RangeDatePickerComponent(props, ref) {
|
|
|
3269
3663
|
}
|
|
3270
3664
|
};
|
|
3271
3665
|
const renderBody = (renderProps) => {
|
|
3272
|
-
return (React__default.createElement(DropdownContainer, { ...renderProps, cx: cx(css$
|
|
3666
|
+
return (React__default.createElement(DropdownContainer, { ...renderProps, cx: cx(css$K.dropdownContainer), shards: [targetRef], returnFocus: true },
|
|
3273
3667
|
React__default.createElement(FlexRow, null,
|
|
3274
3668
|
React__default.createElement(RangeDatePickerBody, { cx: cx(props.bodyCx), value: {
|
|
3275
3669
|
selectedDate: _value,
|
|
@@ -3293,175 +3687,24 @@ function RangeDatePickerComponent(props, ref) {
|
|
|
3293
3687
|
}
|
|
3294
3688
|
const RangeDatePicker = /* @__PURE__ */React__default.forwardRef(RangeDatePickerComponent);
|
|
3295
3689
|
|
|
3296
|
-
var css$
|
|
3690
|
+
var css$J = {"root":"WSj09H","blocker":"_0iNUa9","marker":"_0CRQIv","top":"lB62dD","bottom":"HKii4S","left":"w8wOC3","right":"wcwV-y","inside":"aYGwmC"};
|
|
3297
3691
|
|
|
3298
3692
|
function DropMarker(props) {
|
|
3299
3693
|
return props.isDndInProgress
|
|
3300
3694
|
? (React.createElement(React.Fragment, null,
|
|
3301
|
-
props.enableBlocker && React.createElement("div", { className: css$
|
|
3695
|
+
props.enableBlocker && React.createElement("div", { className: css$J.blocker }),
|
|
3302
3696
|
React.createElement("div", { className: cx([
|
|
3303
|
-
css$
|
|
3304
|
-
css$
|
|
3305
|
-
css$
|
|
3697
|
+
css$J.root,
|
|
3698
|
+
css$J.marker,
|
|
3699
|
+
css$J[props.position],
|
|
3306
3700
|
props?.cx,
|
|
3307
3701
|
]) })))
|
|
3308
3702
|
: null;
|
|
3309
3703
|
}
|
|
3310
3704
|
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
var css$R = {"search-wrapper":"cV-MZn","searchWrapper":"cV-MZn","no-data":"Y5kqHg","noData":"Y5kqHg"};
|
|
3314
|
-
|
|
3315
|
-
var css$Q = {"picker-row":"_1xhV55","pickerRow":"_1xhV55","align-widgets-top":"p5XSxH","alignWidgetsTop":"p5XSxH","row-content":"dlHw-8","rowContent":"dlHw-8","align-widgets-center":"OyAt2X","alignWidgetsCenter":"OyAt2X","icon-container":"_08h-iq","iconContainer":"_08h-iq","content-wrapper":"fVienB","contentWrapper":"fVienB","icon-wrapper":"_94m5Ka","iconWrapper":"_94m5Ka","icon-default":"VfnBoS","iconDefault":"VfnBoS","selected-mark":"jDp6J-","selectedMark":"jDp6J-"};
|
|
3316
|
-
|
|
3317
|
-
var css$P = {"root":"_86NRQl"};
|
|
3705
|
+
var css$I = {"search-wrapper":"LI6Ne8","searchWrapper":"LI6Ne8","no-data":"GZfFGS","noData":"GZfFGS"};
|
|
3318
3706
|
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
var css$O = {"root":"_4qT-dg"};
|
|
3322
|
-
|
|
3323
|
-
const DEFAULT_FILL = 'solid';
|
|
3324
|
-
function applyBadgeMods(mods) {
|
|
3325
|
-
return [
|
|
3326
|
-
'uui-badge',
|
|
3327
|
-
css$O.root,
|
|
3328
|
-
`uui-size-${mods.size || settings.badge.sizes.default}`,
|
|
3329
|
-
`uui-fill-${mods.fill || DEFAULT_FILL}`,
|
|
3330
|
-
`uui-color-${mods.color || 'info'}`,
|
|
3331
|
-
];
|
|
3332
|
-
}
|
|
3333
|
-
const Badge = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
3334
|
-
const styles = [applyBadgeMods(props), props.cx];
|
|
3335
|
-
const DropdownIcon = props.dropdownIcon ? props.dropdownIcon : settings.badge.icons.dropdownIcon;
|
|
3336
|
-
return (React__default.createElement(Clickable, { ...props, rawProps: {
|
|
3337
|
-
'aria-haspopup': props.isDropdown,
|
|
3338
|
-
'aria-expanded': props.isOpen,
|
|
3339
|
-
...props.rawProps,
|
|
3340
|
-
}, cx: styles, ref: ref },
|
|
3341
|
-
(props.indicator && props.fill === 'outline') && (React__default.createElement("div", { className: "uui-indicator" })),
|
|
3342
|
-
props.icon && props.iconPosition !== 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
3343
|
-
props.caption && (React__default.createElement("div", { className: uuiElement.caption }, props.caption)),
|
|
3344
|
-
props.count !== undefined && props.count !== null && (React__default.createElement(CountIndicator, { key: "count-indicator", color: null, size: settings.badge.sizes.countIndicatorMap[props.size || settings.badge.sizes.default], caption: props.count })),
|
|
3345
|
-
props.icon && props.iconPosition === 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
3346
|
-
props.isDropdown && (React__default.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
3347
|
-
});
|
|
3348
|
-
|
|
3349
|
-
var css$N = {"root":"LNHyR-"};
|
|
3350
|
-
|
|
3351
|
-
function applyTagMods(props) {
|
|
3352
|
-
return [
|
|
3353
|
-
css$N.root,
|
|
3354
|
-
`uui-size-${props.size || settings.tag.sizes.default}`,
|
|
3355
|
-
`uui-color-${props.color || 'neutral'}`,
|
|
3356
|
-
`uui-fill-${props.fill || 'solid'}`,
|
|
3357
|
-
'uui-tag',
|
|
3358
|
-
];
|
|
3359
|
-
}
|
|
3360
|
-
const Tag = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
3361
|
-
const styles = [applyTagMods(props), props.cx];
|
|
3362
|
-
const ClearIcon = props.clearIcon ? props.clearIcon : settings.tag.icons.clearIcon;
|
|
3363
|
-
const DropdownIcon = props.dropdownIcon ? props.dropdownIcon : settings.tag.icons.dropdownIcon;
|
|
3364
|
-
return (React__default.createElement(Clickable, { ...props, rawProps: {
|
|
3365
|
-
'aria-haspopup': props.isDropdown,
|
|
3366
|
-
'aria-expanded': props.isOpen,
|
|
3367
|
-
...props.rawProps,
|
|
3368
|
-
}, cx: styles, ref: ref },
|
|
3369
|
-
props.icon && props.iconPosition !== 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
3370
|
-
props.caption && (React__default.createElement("div", { className: uuiElement.caption }, props.caption)),
|
|
3371
|
-
props.count !== undefined && props.count !== null && (React__default.createElement(CountIndicator, { color: (!props.color || props.color === 'neutral') ? 'white' : props.color, size: settings.tag.sizes.countIndicatorMap[(props.size || settings.tag.sizes.default)], caption: props.count })),
|
|
3372
|
-
props.icon && props.iconPosition === 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
3373
|
-
props.isDropdown && (React__default.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen })),
|
|
3374
|
-
props.onClear && !props.isDisabled && (React__default.createElement(IconContainer, { cx: uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
3375
|
-
});
|
|
3376
|
-
|
|
3377
|
-
var css$M = {"root":"FKoLYk","page":"-Ra7SI","spacer":"Oi9A1x","mode-ghost":"TpZYzP","modeGhost":"TpZYzP"};
|
|
3378
|
-
|
|
3379
|
-
function Paginator(props) {
|
|
3380
|
-
const renderPaginator = (params) => (React__default.createElement("nav", { role: "navigation", className: cx(css$M.root, 'uui-paginator', `uui-size-${props.size || settings.paginator.sizes.default}`), ...params.rawProps },
|
|
3381
|
-
React__default.createElement(Button, { size: props.size || settings.paginator.sizes.default, icon: settings.paginator.icons.leftArrowIcon, onClick: params.goToPrev, isDisabled: params.isFirst || props.isDisabled, fill: "outline", color: "secondary" }),
|
|
3382
|
-
params.pages.map((page, index) => {
|
|
3383
|
-
if (page.type === 'spacer') {
|
|
3384
|
-
return (React__default.createElement(Button, { cx: cx(css$M.spacer, css$M.page), size: props.size || settings.paginator.sizes.default, key: `${index}_spacer`, caption: "...", fill: "ghost", color: "secondary", tabIndex: -1, isDisabled: props.isDisabled }));
|
|
3385
|
-
}
|
|
3386
|
-
else {
|
|
3387
|
-
return (React__default.createElement(Button, { cx: cx(css$M[`mode-${!page.isActive && 'ghost'}`], css$M.page), size: props.size || settings.paginator.sizes.default, key: page.pageNumber, caption: page.pageNumber, onClick: () => page.onClick?.(), rawProps: { 'aria-current': page.isActive }, fill: (page.isActive && 'outline') || 'ghost', color: "primary", isDisabled: props.isDisabled }));
|
|
3388
|
-
}
|
|
3389
|
-
}),
|
|
3390
|
-
React__default.createElement(Button, { size: props.size || settings.paginator.sizes.default, icon: settings.paginator.icons.rightArrowIcon, onClick: params.goToNext, isDisabled: params.isLast || props.isDisabled, fill: "outline", color: "secondary" })));
|
|
3391
|
-
return React__default.createElement(Paginator$1, { ...props, render: renderPaginator });
|
|
3392
|
-
}
|
|
3393
|
-
|
|
3394
|
-
var css$L = {"root":"O49G0H","progress-bar":"oX3pvS","progressBar":"oX3pvS","progressBar-indeterminate":"QKuEjD","progressBarIndeterminate":"QKuEjD","size-12":"S-U8PS","size12":"S-U8PS","size-18":"QqQq--","size18":"QqQq--","size-24":"QZ9aGj","size24":"QZ9aGj"};
|
|
3395
|
-
|
|
3396
|
-
const IndeterminateBar = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3397
|
-
return (React.createElement("div", { ref: ref, className: cx('uui-indeterminate_bar', props.cx, css$L.root, css$L[`size-${props.size || 12}`]) },
|
|
3398
|
-
React.createElement("div", { className: cx(css$L.progressBar) })));
|
|
3399
|
-
});
|
|
3400
|
-
|
|
3401
|
-
var css$K = {"root":"REaQX3","striped":"W0h6gP","animate-stripes":"_5I3FMZ","animateStripes":"_5I3FMZ","size-12":"qEKAxJ","size12":"qEKAxJ","size-18":"n5uxU0","size18":"n5uxU0","size-24":"rHeOEd","size24":"rHeOEd"};
|
|
3402
|
-
|
|
3403
|
-
const DEFAULT_SIZE = '12';
|
|
3404
|
-
function applyProgressBarMods(mods) {
|
|
3405
|
-
const size = mods.size || DEFAULT_SIZE;
|
|
3406
|
-
return [
|
|
3407
|
-
css$K.root,
|
|
3408
|
-
css$K[`size-${size}`],
|
|
3409
|
-
mods.striped && css$K.striped,
|
|
3410
|
-
];
|
|
3411
|
-
}
|
|
3412
|
-
const ProgressBar = /* @__PURE__ */withMods(uuiComponents.ProgressBar, applyProgressBarMods, (props) => ({
|
|
3413
|
-
hideLabel: props.hideLabel || props.striped,
|
|
3414
|
-
}));
|
|
3415
|
-
|
|
3416
|
-
var css$J = {"root":"_0sp5PJ"};
|
|
3417
|
-
|
|
3418
|
-
const IndicatorBar = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3419
|
-
const { progress } = props;
|
|
3420
|
-
return progress || progress === 0 ? (React.createElement(ProgressBar, { ref: ref, progress: progress, cx: cx(css$J.root, props.cx), hideLabel: true })) : (React.createElement(IndeterminateBar, { ref: ref, cx: cx(css$J.root, props.cx) }));
|
|
3421
|
-
});
|
|
3422
|
-
|
|
3423
|
-
var css$I = {"root":"_9sFjB5"};
|
|
3424
|
-
|
|
3425
|
-
const StatusIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
3426
|
-
return (React__default.createElement("div", { ref: ref, className: cx([
|
|
3427
|
-
css$I.root,
|
|
3428
|
-
`uui-size-${props.size || settings.statusIndicator.sizes.default}`,
|
|
3429
|
-
'uui-status_indicator',
|
|
3430
|
-
`uui-color-${props.color || 'neutral'}`,
|
|
3431
|
-
`uui-fill-${props.fill || 'solid'}`,
|
|
3432
|
-
props.cx,
|
|
3433
|
-
]) },
|
|
3434
|
-
React__default.createElement("div", { className: "uui-status_indicator-dot" }),
|
|
3435
|
-
React__default.createElement("p", { className: "uui-status_indicator-caption" }, props.caption)));
|
|
3436
|
-
});
|
|
3437
|
-
|
|
3438
|
-
var css$H = {"drag-handle-wrapper":"m60Juc","dragHandleWrapper":"m60Juc","with-indent":"INTgRy","withIndent":"INTgRy","drag-handle":"waOWlA","dragHandle":"waOWlA","icon-container":"J0-rxs","iconContainer":"J0-rxs"};
|
|
3439
|
-
|
|
3440
|
-
function DataRowAddons(props) {
|
|
3441
|
-
const row = props.rowProps;
|
|
3442
|
-
const getIndent = () => {
|
|
3443
|
-
return (row.indent - 1) * settings.dataTable.sizes.body.indentUnitMap[props.size || settings.dataTable.sizes.body.row];
|
|
3444
|
-
};
|
|
3445
|
-
const getWidth = () => {
|
|
3446
|
-
return settings.dataTable.sizes.body.indentWidthMap[props.size || settings.dataTable.sizes.body.row];
|
|
3447
|
-
};
|
|
3448
|
-
const renderDragHandle = () => {
|
|
3449
|
-
if (props.renderDragHandle) {
|
|
3450
|
-
return props.renderDragHandle({ rowProps: props.rowProps, eventHandlers: props.eventHandlers });
|
|
3451
|
-
}
|
|
3452
|
-
return (React__default.createElement("div", { key: "dh", className: cx(css$H.dragHandleWrapper, row.indent > 0 && css$H.withIndent), style: { width: row.indent > 0 ? (getIndent() + getWidth()) : 0 }, ...props.eventHandlers },
|
|
3453
|
-
React__default.createElement(DragHandle, { cx: css$H.dragHandle })));
|
|
3454
|
-
};
|
|
3455
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
3456
|
-
row.dnd?.srcData && renderDragHandle(),
|
|
3457
|
-
row?.checkbox?.isVisible && (React__default.createElement(Checkbox, { key: "cb", cx: "uui-dr_addons-checkbox", tabIndex: props.tabIndex, size: settings.dataTable.sizes.body.checkboxMap[props.size], value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => row.onCheck?.(row), isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid })),
|
|
3458
|
-
row.indent > 0 && (React__default.createElement("div", { key: "fold", className: cx('uui-dr_addons-indent', `uui-size-${props.size || settings.dataTable.sizes.body.row}`), style: { marginInlineStart: getIndent(), width: getWidth() } }, row.isFoldable && (React__default.createElement(IconContainer, { rawProps: {
|
|
3459
|
-
'aria-label': row.isFolded ? 'Unfold' : 'Fold',
|
|
3460
|
-
role: 'button',
|
|
3461
|
-
}, key: "icon", icon: settings.dataTable.icons.body.foldingIcon, cx: [
|
|
3462
|
-
uuiElement.foldingArrow, uuiMarkers.clickable, css$H.iconContainer,
|
|
3463
|
-
], rotate: row.isFolded ? '90ccw' : '0', onClick: () => row.onFold(row), size: settings.dataTable.sizes.body.iconMap[props.size || settings.dataTable.sizes.body.row] }))))));
|
|
3464
|
-
}
|
|
3707
|
+
var css$H = {"picker-row":"_6cp1MK","pickerRow":"_6cp1MK","align-widgets-top":"faIUYo","alignWidgetsTop":"faIUYo","row-content":"zctZK0","rowContent":"zctZK0","align-widgets-center":"_1Kvir6","alignWidgetsCenter":"_1Kvir6","icon-container":"zs82EY","iconContainer":"zs82EY","content-wrapper":"FwKXt3","contentWrapper":"FwKXt3","icon-wrapper":"_3I1JBQ","iconWrapper":"_3I1JBQ","icon-default":"_2-bWe-","iconDefault":"_2-bWe-","selected-mark":"ybARsV","selectedMark":"ybARsV"};
|
|
3465
3708
|
|
|
3466
3709
|
const mergeHighlightRanges = (ranges) => {
|
|
3467
3710
|
const mergedRanges = [];
|
|
@@ -3528,7 +3771,7 @@ const getHighlightedSearchMatches = (str, search) => {
|
|
|
3528
3771
|
return getDecoratedText(str, ranges);
|
|
3529
3772
|
};
|
|
3530
3773
|
|
|
3531
|
-
var css$G = {"root":"
|
|
3774
|
+
var css$G = {"root":"H7CF2p","column-gap":"_36BmDK","columnGap":"_36BmDK","title":"eWUnIT","subtitle":"Gz0osj","disabled":"IxLjh4","multiline":"rEm-xY"};
|
|
3532
3775
|
|
|
3533
3776
|
function PickerItem(props) {
|
|
3534
3777
|
const { highlightSearchMatches = true, size, avatarUrl, isLoading, isDisabled, icon, } = props;
|
|
@@ -3536,14 +3779,13 @@ function PickerItem(props) {
|
|
|
3536
3779
|
const isMultiline = !!(props.title && props.subtitle);
|
|
3537
3780
|
const { search } = props.dataSourceState ?? {};
|
|
3538
3781
|
const title = highlightSearchMatches ? getHighlightedSearchMatches(props.title, search) : props.title;
|
|
3539
|
-
const subtitle = highlightSearchMatches ? getHighlightedSearchMatches(props.subtitle, search) : props.subtitle;
|
|
3540
3782
|
return (React.createElement(FlexCell, { width: "auto", cx: [css$G.root, 'uui-picker_input-item', 'uui-typography', props.cx] },
|
|
3541
3783
|
React.createElement(FlexRow, { size: itemSize, cx: [isMultiline && css$G.multiline, css$G.columnGap], rawProps: { style: { '--uui-picker_item-vertical-padding': `${settings.pickerInput.sizes.body.itemVerticalPaddingMap[itemSize]}px` } } },
|
|
3542
3784
|
avatarUrl && (React.createElement(Avatar, { isLoading: isLoading, img: avatarUrl, size: getAvatarSize(itemSize, isMultiline) })),
|
|
3543
3785
|
icon && React.createElement(IconContainer, { icon: icon }),
|
|
3544
3786
|
React.createElement(FlexCell, { width: "auto" },
|
|
3545
3787
|
title && (React.createElement("div", { className: cx(css$G.title, isDisabled && css$G.disabled, `uui-size-${itemSize}`) }, title)),
|
|
3546
|
-
subtitle && (React.createElement("div", { className: cx(css$G.subtitle, isDisabled && css$G.disabled, `uui-size-${itemSize}`) }, subtitle))))));
|
|
3788
|
+
props.subtitle && (React.createElement("div", { className: cx(css$G.subtitle, isDisabled && css$G.disabled, `uui-size-${itemSize}`) }, props.subtitle))))));
|
|
3547
3789
|
}
|
|
3548
3790
|
function getAvatarSize(size, isMultiline) {
|
|
3549
3791
|
return settings.pickerInput.sizes.body[isMultiline ? 'itemAvatarMultilineMap' : 'itemAvatarMap'][size];
|
|
@@ -3591,19 +3833,19 @@ function DataPickerRow(props) {
|
|
|
3591
3833
|
content = (React.createElement(React.Fragment, null,
|
|
3592
3834
|
renderRowItem(props.value, props),
|
|
3593
3835
|
React.createElement(FlexSpacer, null),
|
|
3594
|
-
(props.isChildrenSelected || props.isSelected) && (React.createElement("div", { className: cx$1(css$
|
|
3595
|
-
React.createElement(IconContainer, { size: settings.pickerInput.sizes.body.selectIconMap[props.size], icon: SelectIcon, cx: props.isChildrenSelected ? css$
|
|
3836
|
+
(props.isChildrenSelected || props.isSelected) && (React.createElement("div", { className: cx$1(css$H.iconWrapper, 'uui-picker_input-row-select_icon', uuiMod.selected) },
|
|
3837
|
+
React.createElement(IconContainer, { size: settings.pickerInput.sizes.body.selectIconMap[props.size], icon: SelectIcon, cx: props.isChildrenSelected ? css$H.iconDefault : css$H.selectedMark, rawProps: { 'aria-label': props.isChildrenSelected
|
|
3596
3838
|
? 'Child is selected'
|
|
3597
3839
|
: 'Selected' } })))));
|
|
3598
3840
|
}
|
|
3599
|
-
return (React.createElement(FlexCell, { grow: 1, width: 0, minWidth: 0, cx: css$
|
|
3841
|
+
return (React.createElement(FlexCell, { grow: 1, width: 0, minWidth: 0, cx: css$H.rowContent },
|
|
3600
3842
|
React.createElement(DataRowAddons, { size: props.size, rowProps: props, tabIndex: -1 }),
|
|
3601
|
-
React.createElement("div", { className: css$
|
|
3843
|
+
React.createElement("div", { className: css$H.contentWrapper }, content)));
|
|
3602
3844
|
};
|
|
3603
3845
|
const clickHandler = props.onClick || props.onSelect || props.onFold || props.onCheck;
|
|
3604
3846
|
return (
|
|
3605
3847
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
3606
|
-
React.createElement("div", { onClick: clickHandler && ((e) => !isEventTargetInsideClickable(e) && clickHandler(props)), role: "option", "aria-busy": props.isLoading, "aria-posinset": props.index + 1, "aria-checked": props.checkbox?.isVisible ? props.isChecked : null, "aria-selected": props.isSelectable ? props.isSelected : null, ref: rowNode, className: cx$1(css$
|
|
3848
|
+
React.createElement("div", { onClick: clickHandler && ((e) => !isEventTargetInsideClickable(e) && clickHandler(props)), role: "option", "aria-busy": props.isLoading, "aria-posinset": props.index + 1, "aria-checked": props.checkbox?.isVisible ? props.isChecked : null, "aria-selected": props.isSelectable ? props.isSelected : null, ref: rowNode, className: cx$1(css$H.pickerRow, 'uui-picker_input-row', `uui-size-${props.size || settings.pickerInput.sizes.body.row}`, css$H[`align-widgets-${props.alignActions || 'top'}`], clickHandler && props.isFocused && uuiMod.focus, clickHandler && uuiMarkers.clickable, props.cx), style: props.padding && {
|
|
3607
3849
|
'--uui-data_picker-horizontal-padding': `${props.padding}px`,
|
|
3608
3850
|
}, ...props.rawProps }, renderContent()));
|
|
3609
3851
|
}
|
|
@@ -3631,7 +3873,7 @@ function DataPickerBody({ highlightSearchMatches = true, ...props }) {
|
|
|
3631
3873
|
});
|
|
3632
3874
|
}
|
|
3633
3875
|
if (props.minCharsToSearch && search.length < props.minCharsToSearch) {
|
|
3634
|
-
return (React__default.createElement(FlexCell$1, { cx: css$
|
|
3876
|
+
return (React__default.createElement(FlexCell$1, { cx: css$I.noData, grow: 1, textAlign: "center" },
|
|
3635
3877
|
React__default.createElement(Text, { size: props.searchSize }, i18n.dataPickerBody.typeSearchToLoadMessage)));
|
|
3636
3878
|
}
|
|
3637
3879
|
if (props.rows.length === 0) {
|
|
@@ -3644,7 +3886,7 @@ function DataPickerBody({ highlightSearchMatches = true, ...props }) {
|
|
|
3644
3886
|
search: search,
|
|
3645
3887
|
});
|
|
3646
3888
|
}
|
|
3647
|
-
return (React__default.createElement(FlexCell$1, { cx: css$
|
|
3889
|
+
return (React__default.createElement(FlexCell$1, { cx: css$I.noData, grow: 1, textAlign: "center" },
|
|
3648
3890
|
React__default.createElement(Text, { size: props.searchSize }, i18n.dataPickerBody.noRecordsMessage)));
|
|
3649
3891
|
}
|
|
3650
3892
|
};
|
|
@@ -3663,7 +3905,7 @@ function DataPickerBody({ highlightSearchMatches = true, ...props }) {
|
|
|
3663
3905
|
: settings.pickerInput.sizes.body.getSearchSize({ pickerSize: props.searchSize });
|
|
3664
3906
|
const renderedDataRows = useMemo(() => props.rows.map((row) => renderRow(row, props.value)), [props.rows, props.value]);
|
|
3665
3907
|
return (React__default.createElement(React__default.Fragment, null,
|
|
3666
|
-
showSearch && (React__default.createElement("div", { key: "search", className: cx$1(css$
|
|
3908
|
+
showSearch && (React__default.createElement("div", { key: "search", className: cx$1(css$I.searchWrapper, 'uui-picker_input-body-search') },
|
|
3667
3909
|
React__default.createElement(FlexCell$1, { grow: 1 },
|
|
3668
3910
|
React__default.createElement(MoveFocusInside, null,
|
|
3669
3911
|
React__default.createElement(SearchInput, { placeholder: i18n.dataPickerBody.searchPlaceholder, value: props.value.search, onValueChange: (newVal) => props.onValueChange({ ...props.value, search: newVal }), onKeyDown: searchKeyDown, size: searchSize, debounceDelay: props.searchDebounceDelay, rawProps: { dir: 'auto' } }))))),
|
|
@@ -3675,7 +3917,7 @@ function DataPickerBody({ highlightSearchMatches = true, ...props }) {
|
|
|
3675
3917
|
'aria-orientation': 'vertical',
|
|
3676
3918
|
tabIndex: -1,
|
|
3677
3919
|
...props.rawProps,
|
|
3678
|
-
}, rowsCount: props.rowsCount, isLoading: props.isReloading, renderBlocker: settings.pickerInput.renderBlocker })))));
|
|
3920
|
+
}, rowsCount: props.rowsCount, isLoading: props.isReloading, renderBlocker: settings.pickerInput.renderBlocker, overflowTopEffect: showSearch ? 'line' : 'none', overflowBottomEffect: "line" })))));
|
|
3679
3921
|
}
|
|
3680
3922
|
|
|
3681
3923
|
function DataPickerFooterImpl(props) {
|
|
@@ -3702,7 +3944,7 @@ function DataPickerFooterImpl(props) {
|
|
|
3702
3944
|
}
|
|
3703
3945
|
const DataPickerFooter = /* @__PURE__ */React__default.memo(DataPickerFooterImpl);
|
|
3704
3946
|
|
|
3705
|
-
var css$F = {"header":"
|
|
3947
|
+
var css$F = {"header":"SS-3Uh","title":"jIxoPH","close":"CTpj87"};
|
|
3706
3948
|
|
|
3707
3949
|
const DataPickerMobileHeaderImpl = (props) => {
|
|
3708
3950
|
const title = props.title && typeof props.title === 'string' ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
|
|
@@ -3712,7 +3954,7 @@ const DataPickerMobileHeaderImpl = (props) => {
|
|
|
3712
3954
|
};
|
|
3713
3955
|
const DataPickerMobileHeader = /* @__PURE__ */React__default.memo(DataPickerMobileHeaderImpl);
|
|
3714
3956
|
|
|
3715
|
-
var css$E = {"done":"
|
|
3957
|
+
var css$E = {"done":"ozLT3k","container":"ghCR8W"};
|
|
3716
3958
|
|
|
3717
3959
|
const PickerBodyMobileView = (props) => {
|
|
3718
3960
|
const isMobileView = isMobile();
|
|
@@ -3724,7 +3966,7 @@ const PickerBodyMobileView = (props) => {
|
|
|
3724
3966
|
isMobileView && (React__default.createElement(LinkButton, { caption: i18n.pickerInput.doneButton, onClick: () => props.onClose?.(), cx: css$E.done, size: settings.pickerInput.sizes.body.mobileFooterLinkButton }))));
|
|
3725
3967
|
};
|
|
3726
3968
|
|
|
3727
|
-
var css$D = {"sub-header-wrapper":"
|
|
3969
|
+
var css$D = {"sub-header-wrapper":"q7O-lH","subHeaderWrapper":"q7O-lH","switch":"oc7wMg","no-found-modal-container":"gQCW-D","noFoundModalContainer":"gQCW-D","no-found-modal-container-icon":"Yd-1du","noFoundModalContainerIcon":"Yd-1du","no-found-modal-container-text":"GcZVa2","noFoundModalContainerText":"GcZVa2","body":"dzqHRB"};
|
|
3728
3970
|
|
|
3729
3971
|
function PickerModal(props) {
|
|
3730
3972
|
const { view, selection, dataSourceStateLens, dataSourceState, getName, clearSelection, getRows, getListProps, getFooterProps, isSingleSelect, handleDataSourceValueChange, } = usePickerModal(props);
|
|
@@ -3770,7 +4012,7 @@ function PickerModal(props) {
|
|
|
3770
4012
|
React__default.createElement(ModalFooter, null, props.renderFooter ? props.renderFooter(getFooterProps()) : renderFooter()))));
|
|
3771
4013
|
}
|
|
3772
4014
|
|
|
3773
|
-
var css$C = {"tooltip":"
|
|
4015
|
+
var css$C = {"tooltip":"MF9jqp"};
|
|
3774
4016
|
|
|
3775
4017
|
const PickerTogglerTag = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3776
4018
|
const tagProps = {
|
|
@@ -3789,7 +4031,7 @@ const PickerTogglerTag = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
3789
4031
|
}
|
|
3790
4032
|
});
|
|
3791
4033
|
|
|
3792
|
-
var css$B = {"root":"
|
|
4034
|
+
var css$B = {"root":"uRM0DJ"};
|
|
3793
4035
|
|
|
3794
4036
|
const defaultMode = EditMode.FORM;
|
|
3795
4037
|
function applyPickerTogglerMods(mods) {
|
|
@@ -3871,7 +4113,7 @@ function PickerInputComponent(props, ref) {
|
|
|
3871
4113
|
}
|
|
3872
4114
|
const PickerInput = /* @__PURE__ */React__default.forwardRef(PickerInputComponent);
|
|
3873
4115
|
|
|
3874
|
-
var css$A = {"row":"
|
|
4116
|
+
var css$A = {"row":"_2u3Ayo"};
|
|
3875
4117
|
|
|
3876
4118
|
function PickerListRow(props) {
|
|
3877
4119
|
let label;
|
|
@@ -3891,7 +4133,7 @@ function PickerListRow(props) {
|
|
|
3891
4133
|
return (React__default.createElement("div", { role: "option", "aria-selected": props.isSelectable ? props.isSelected : undefined, "aria-busy": props.isLoading, "aria-posinset": props.index + 1, ...(props.checkbox?.isVisible && { 'aria-checked': props.isChecked }), className: css$A.row }, component));
|
|
3892
4134
|
}
|
|
3893
4135
|
|
|
3894
|
-
var css$z = {"root":"
|
|
4136
|
+
var css$z = {"root":"oktYdH"};
|
|
3895
4137
|
|
|
3896
4138
|
function PickerList(props) {
|
|
3897
4139
|
const { context, view, onlySelectedView, getName, getEntityName, appendLastSelected, getSelectedIdsArray, buildRowsList, getMaxDefaultItems, getModalTogglerCaption, } = usePickerList(props);
|
|
@@ -3926,7 +4168,7 @@ function PickerList(props) {
|
|
|
3926
4168
|
}, selectedRows)));
|
|
3927
4169
|
}
|
|
3928
4170
|
|
|
3929
|
-
var css$y = {"root":"
|
|
4171
|
+
var css$y = {"root":"NGjEfX","wrapper":"WmJNRA","align-widgets-top":"_2Nav-w","alignWidgetsTop":"_2Nav-w","align-widgets-center":"IqMJZ7","alignWidgetsCenter":"IqMJZ7"};
|
|
3930
4172
|
|
|
3931
4173
|
function DataTableCell(initialProps) {
|
|
3932
4174
|
const props = { ...initialProps };
|
|
@@ -3976,7 +4218,7 @@ function DataTableCell(initialProps) {
|
|
|
3976
4218
|
return React.createElement(DataTableCell$1, { ...props });
|
|
3977
4219
|
}
|
|
3978
4220
|
|
|
3979
|
-
var css$x = {"root":"
|
|
4221
|
+
var css$x = {"root":"_3B0xu-"};
|
|
3980
4222
|
|
|
3981
4223
|
// Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
|
|
3982
4224
|
// As we need our mods to style the cell properly, we extract them from DataTableCellProps.rowProps, which is a hack, but it's reliable enough.
|
|
@@ -3992,7 +4234,7 @@ const DataTableRow = /* @__PURE__ */withMods(DataTableRow$1, ({ borderBottom = t
|
|
|
3992
4234
|
];
|
|
3993
4235
|
}, () => propsMods);
|
|
3994
4236
|
|
|
3995
|
-
var css$w = {"sorting-panel-container":"
|
|
4237
|
+
var css$w = {"sorting-panel-container":"Wk4TKo","sortingPanelContainer":"Wk4TKo"};
|
|
3996
4238
|
|
|
3997
4239
|
const SortingPanelImpl = ({ sortDirection, onSort }) => {
|
|
3998
4240
|
const sortAsc = useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
|
|
@@ -4012,7 +4254,7 @@ const ColumnHeaderDropdownImpl = (props) => {
|
|
|
4012
4254
|
};
|
|
4013
4255
|
const ColumnHeaderDropdown = /* @__PURE__ */React__default.memo(ColumnHeaderDropdownImpl);
|
|
4014
4256
|
|
|
4015
|
-
var css$v = {"root":"
|
|
4257
|
+
var css$v = {"root":"pbCilY","caption-wrapper":"kKrvyf","captionWrapper":"kKrvyf","sort-icon":"_0HCjfB","sortIcon":"_0HCjfB","dropdown-icon":"_1xdL9q","dropdownIcon":"_1xdL9q","infoIcon":"_529USl","align-right":"b53Phw","alignRight":"b53Phw","align-center":"cFihLb","alignCenter":"cFihLb","caption":"YXQOCU","truncate":"jg83S5","upper-case":"_0Rhbef","upperCase":"_0Rhbef","checkbox":"h5VwzM","icon":"Y6tqhg","fold-all-icon":"tCfaP0","foldAllIcon":"tCfaP0","cell-tooltip":"LnPuCz","cellTooltip":"LnPuCz","resizing-marker":"zJ848M","resizingMarker":"zJ848M","pinned-right":"oOPyKQ","pinnedRight":"oOPyKQ","draggable":"XyGdEU","ghost":"Y2mK0K","is-dragged-out":"s3pOC2","isDraggedOut":"s3pOC2","dnd-marker-left":"VQ7F9l","dndMarkerLeft":"VQ7F9l","dnd-marker-right":"_4czKk1","dndMarkerRight":"_4czKk1","cell-tooltip-wrapper":"G672hm","cellTooltipWrapper":"G672hm","cell-tooltip-text":"t9G04e","cellTooltipText":"t9G04e","tooltip-caption":"Z2xriK","tooltipCaption":"Z2xriK","tooltip-info":"-uPuyj","tooltipInfo":"-uPuyj"};
|
|
4016
4258
|
|
|
4017
4259
|
class DataTableHeaderCell extends React.Component {
|
|
4018
4260
|
constructor() {
|
|
@@ -4106,7 +4348,7 @@ class DataTableHeaderCell extends React.Component {
|
|
|
4106
4348
|
}
|
|
4107
4349
|
}
|
|
4108
4350
|
|
|
4109
|
-
var css$u = {"root":"
|
|
4351
|
+
var css$u = {"root":"GJA-jl","caption-wrapper":"JeQsdh","captionWrapper":"JeQsdh","align-center":"-AI1-m","alignCenter":"-AI1-m","caption":"_7p-MQZ","truncate":"NbBQc6","upper-case":"sBGMS-","upperCase":"sBGMS-","group-cell-tooltip":"Y9xwZN","groupCellTooltip":"Y9xwZN","group-cell-tooltip-wrapper":"y62P49","groupCellTooltipWrapper":"y62P49","group-cell-tooltip-text":"KV5V7M","groupCellTooltipText":"KV5V7M","tooltip-caption":"Cc9PMG","tooltipCaption":"Cc9PMG","tooltip-info":"pmBFBy","tooltipInfo":"pmBFBy"};
|
|
4110
4352
|
|
|
4111
4353
|
class DataTableHeaderGroupCell extends React.Component {
|
|
4112
4354
|
constructor() {
|
|
@@ -4146,7 +4388,7 @@ class DataTableHeaderGroupCell extends React.Component {
|
|
|
4146
4388
|
}
|
|
4147
4389
|
}
|
|
4148
4390
|
|
|
4149
|
-
var css$t = {"root":"
|
|
4391
|
+
var css$t = {"root":"bELrvr"};
|
|
4150
4392
|
|
|
4151
4393
|
const DataTableHeaderRow = /* @__PURE__ */withMods(DataTableHeaderRow$1, () => [css$t.root, 'uui-dt-vars'], (mods) => ({
|
|
4152
4394
|
renderCell: (props) => (React.createElement(DataTableHeaderCell, { ...props, size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key, columnsGap: mods.columnsGap })),
|
|
@@ -4242,7 +4484,7 @@ const UUI_FILTERS_PANEL_ITEM_TOGGLER_SELECTION = 'uui-filters-panel-item-toggler
|
|
|
4242
4484
|
const UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX = 'uui-filters-panel-item-toggler-postfix';
|
|
4243
4485
|
const UUI_FILTERS_PANEL_BODY_FOOTER = 'uui-filters-panel-item-footer';
|
|
4244
4486
|
|
|
4245
|
-
var css$s = {"body":"
|
|
4487
|
+
var css$s = {"body":"YjsM2k","header":"ZBEDAy","title":"LinM-7","removeButton":"S7llfQ","with-search":"_5DFEet","withSearch":"_5DFEet"};
|
|
4246
4488
|
|
|
4247
4489
|
function FilterColumnBody(props) {
|
|
4248
4490
|
const [predicate, setPredicate] = useState(getDefaultPredicate(props.predicates, props.value));
|
|
@@ -4303,7 +4545,7 @@ const useColumnsWithFilters = (initialColumns, filters) => {
|
|
|
4303
4545
|
return columns;
|
|
4304
4546
|
};
|
|
4305
4547
|
|
|
4306
|
-
var css$r = {"unpin-icon":"
|
|
4548
|
+
var css$r = {"unpin-icon":"YQzsHo","unpinIcon":"YQzsHo","pin-toggler-icon":"AH6-nx","pinTogglerIcon":"AH6-nx"};
|
|
4307
4549
|
|
|
4308
4550
|
function PinIconButton(props) {
|
|
4309
4551
|
const i18nLocal = i18n.tables.columnsConfigurationModal;
|
|
@@ -4316,14 +4558,23 @@ function PinIconButton(props) {
|
|
|
4316
4558
|
const iconTooltip = isPinnedAlways ? i18nLocal.lockedColumnPinButton : i18nLocal.unPinColumnButton;
|
|
4317
4559
|
const unpinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(undefined);
|
|
4318
4560
|
pinUnpinNode = (React.createElement(Tooltip, { content: iconTooltip, placement: "bottom", color: "inverted" },
|
|
4319
|
-
React.createElement(IconButton, { cx: cx$1(!isPinnedAlways && css$r.unpinIcon, css$r.pinTogglerIcon), icon: unpinIcon, onClick: unpinClickHandler, isDisabled: isPinnedAlways, color: "primary"
|
|
4561
|
+
React.createElement(IconButton, { cx: cx$1(!isPinnedAlways && css$r.unpinIcon, css$r.pinTogglerIcon), icon: unpinIcon, onClick: unpinClickHandler, isDisabled: isPinnedAlways, color: "primary", rawProps: {
|
|
4562
|
+
'aria-description': iconTooltip,
|
|
4563
|
+
'aria-label': 'Unpin Button',
|
|
4564
|
+
} })));
|
|
4320
4565
|
}
|
|
4321
4566
|
else {
|
|
4322
4567
|
pinUnpinNode = (React.createElement(React.Fragment, null,
|
|
4323
4568
|
React.createElement(Tooltip, { content: i18nLocal.pinColumnToTheLeftButton, placement: "bottom", color: "inverted" },
|
|
4324
|
-
React.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon, onClick: () => onTogglePin('left'), isDisabled: isPinnedAlways
|
|
4569
|
+
React.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon, onClick: () => onTogglePin('left'), isDisabled: isPinnedAlways, rawProps: {
|
|
4570
|
+
'aria-description': i18nLocal.pinColumnToTheLeftButton,
|
|
4571
|
+
'aria-label': 'Pin left button',
|
|
4572
|
+
} })),
|
|
4325
4573
|
React.createElement(Tooltip, { content: i18nLocal.pinColumnToTheRightButton, placement: "bottom", color: "inverted" },
|
|
4326
|
-
React.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinRightIcon, onClick: () => onTogglePin('right'), isDisabled: isPinnedAlways
|
|
4574
|
+
React.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinRightIcon, onClick: () => onTogglePin('right'), isDisabled: isPinnedAlways, rawProps: {
|
|
4575
|
+
'aria-description': i18nLocal.pinColumnToTheRightButton,
|
|
4576
|
+
'aria-label': 'Pin right button',
|
|
4577
|
+
} }))));
|
|
4327
4578
|
}
|
|
4328
4579
|
return pinUnpinNode;
|
|
4329
4580
|
}
|
|
@@ -4345,22 +4596,33 @@ function getUnpinIcon(params) {
|
|
|
4345
4596
|
}
|
|
4346
4597
|
}
|
|
4347
4598
|
|
|
4348
|
-
var css$q = {"row-wrapper":"
|
|
4599
|
+
var css$q = {"row-wrapper":"zJslkk","rowWrapper":"zJslkk","pin-icon-button":"iwmnEY","pinIconButton":"iwmnEY","not-pinned":"_-5k19-","notPinned":"_-5k19-","checkbox":"QRyN6c","drag-handle":"Syw6Ub","dragHandle":"Syw6Ub","dnd-disabled":"qhrR-D","dndDisabled":"qhrR-D"};
|
|
4349
4600
|
|
|
4350
4601
|
const ColumnRow = /* @__PURE__ */React.memo(function ColumnRow(props) {
|
|
4351
4602
|
const { column } = props;
|
|
4352
|
-
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways, } = column;
|
|
4603
|
+
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways, columnGroup, } = column;
|
|
4353
4604
|
const { isVisible, fix } = columnConfig;
|
|
4354
4605
|
const pinPosition = fix || (isPinnedAlways ? 'left' : undefined);
|
|
4355
4606
|
const isPinned = !!pinPosition;
|
|
4356
4607
|
const data = { column, columnConfig };
|
|
4608
|
+
const getColumnCaption = () => {
|
|
4609
|
+
if (props.renderItem) {
|
|
4610
|
+
return props.renderItem(props.column);
|
|
4611
|
+
}
|
|
4612
|
+
if (column.group) {
|
|
4613
|
+
return `${column.caption}/${columnGroup.caption}`;
|
|
4614
|
+
}
|
|
4615
|
+
else {
|
|
4616
|
+
return column.caption;
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4357
4619
|
const renderContent = (dndActorParams) => {
|
|
4358
4620
|
const wrapperClasses = cx$1(css$q.rowWrapper, !isPinned && css$q.notPinned, dndActorParams.isDragGhost && uuiDndState.dragGhost, 'uui-dt-columns-config-row');
|
|
4359
4621
|
const { onTouchStart, onPointerDown, ...restEventHandlers } = dndActorParams.eventHandlers;
|
|
4360
4622
|
const { ref, ...dndActorPropsWithoutRef } = dndActorParams;
|
|
4361
4623
|
return (React.createElement(FlexRow, { size: settings.dataTable.sizes.columnsConfigurationModal.columnRow, cx: wrapperClasses, ref: dndActorParams.ref, rawProps: { ...restEventHandlers }, alignItems: "top" },
|
|
4362
4624
|
React.createElement(DragHandle, { dragHandleIcon: settings.dataTable.icons.columnsConfigurationModal.dragIndicator, rawProps: { onTouchStart, onPointerDown }, isDisabled: !isDndAllowed, cx: cx$1(css$q.dragHandle, !isDndAllowed && css$q.dndDisabled) }),
|
|
4363
|
-
React.createElement(Checkbox, { key: column.key, label:
|
|
4625
|
+
React.createElement(Checkbox, { key: column.key, label: getColumnCaption(), value: isVisible, onValueChange: toggleVisibility, isReadonly: column.isAlwaysVisible || column.isLocked, cx: css$q.checkbox }),
|
|
4364
4626
|
React.createElement(FlexRow, { size: null, cx: css$q.pinIconButton },
|
|
4365
4627
|
React.createElement(PinIconButton, { pinPosition: pinPosition, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
|
|
4366
4628
|
React.createElement(DropMarker, { ...dndActorPropsWithoutRef })));
|
|
@@ -4368,7 +4630,7 @@ const ColumnRow = /* @__PURE__ */React.memo(function ColumnRow(props) {
|
|
|
4368
4630
|
return (React.createElement(DndActor, { key: column.key, srcData: isDndAllowed && data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
|
|
4369
4631
|
});
|
|
4370
4632
|
|
|
4371
|
-
var css$p = {"root":"
|
|
4633
|
+
var css$p = {"root":"s0VYId","main-panel":"FWKGJW","mainPanel":"FWKGJW","group":"z9ehud","group-title":"ETOdas","groupTitle":"ETOdas","group-items":"rMfxth","groupItems":"rMfxth","no-data":"Gc6okj","noData":"Gc6okj","no-data-title":"i-WLSZ","noDataTitle":"i-WLSZ","no-data-sub-title":"cn2Twl","noDataSubTitle":"cn2Twl","h-divider":"aqcTmP","hDivider":"aqcTmP","search-area":"pupJ7S","searchArea":"pupJ7S","subgroup-accordion":"lnVqMP","subgroupAccordion":"lnVqMP","subgroup":"SDPOOg","subgroup-title":"cABfd-","subgroupTitle":"cABfd-"};
|
|
4372
4634
|
|
|
4373
4635
|
const renderGroupTitle = (title, amount) => (React.createElement(FlexRow, { cx: css$p.group },
|
|
4374
4636
|
React.createElement(Text, { size: "none", cx: css$p.groupTitle }, title),
|
|
@@ -4382,6 +4644,7 @@ function ColumnsConfigurationModal(props) {
|
|
|
4382
4644
|
columns,
|
|
4383
4645
|
defaultConfig,
|
|
4384
4646
|
getSearchFields: props.getSearchFields,
|
|
4647
|
+
columnGroups: props.columnGroups,
|
|
4385
4648
|
});
|
|
4386
4649
|
const apply = useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
|
|
4387
4650
|
const close = useCallback(() => modalProps.abort(), [modalProps]);
|
|
@@ -4470,7 +4733,7 @@ const getChildrenAndRest = (row, rows) => {
|
|
|
4470
4733
|
return [children, rest];
|
|
4471
4734
|
};
|
|
4472
4735
|
|
|
4473
|
-
var css$o = {"listContainer":"
|
|
4736
|
+
var css$o = {"listContainer":"SP3tYM","header":"mnh-cy","group":"mlBqW2","stickyHeader":"_84AjX2"};
|
|
4474
4737
|
|
|
4475
4738
|
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
4476
4739
|
const rowRef = useRef(undefined);
|
|
@@ -4510,7 +4773,7 @@ function DataRowsContainer({ estimatedHeight, listContainerRef, offsetY, rows, r
|
|
|
4510
4773
|
React__default.createElement(DataRowsGroups, { rows: rows, renderRow: renderRow, top: headerRef?.current?.clientHeight }))));
|
|
4511
4774
|
}
|
|
4512
4775
|
|
|
4513
|
-
var css$n = {"root":"
|
|
4776
|
+
var css$n = {"root":"BpqeXM","sticky-header":"MTHa5T","stickyHeader":"MTHa5T","no-results":"fJzFwb","noResults":"fJzFwb","icon":"_5d-97G","title":"lP2BFV"};
|
|
4514
4777
|
|
|
4515
4778
|
function DataTable(props) {
|
|
4516
4779
|
const { uuiModals } = useUuiContext();
|
|
@@ -4534,7 +4797,7 @@ function DataTable(props) {
|
|
|
4534
4797
|
.show((modalProps) => {
|
|
4535
4798
|
return (props.renderColumnsConfigurationModal
|
|
4536
4799
|
? props.renderColumnsConfigurationModal({ ...configProps, ...modalProps })
|
|
4537
|
-
: (React.createElement(ColumnsConfigurationModal, { ...modalProps, columns: props.columns, columnsConfig: config, defaultConfig: defaultConfig })));
|
|
4800
|
+
: (React.createElement(ColumnsConfigurationModal, { ...modalProps, columns: props.columns, columnGroups: props.columnGroups, columnsConfig: config, defaultConfig: defaultConfig })));
|
|
4538
4801
|
})
|
|
4539
4802
|
.then((columnsConfig) => props.onValueChange({ ...props.value, columnsConfig }))
|
|
4540
4803
|
.catch(() => null);
|
|
@@ -4543,11 +4806,8 @@ function DataTable(props) {
|
|
|
4543
4806
|
]);
|
|
4544
4807
|
const renderTableBody = React.useCallback((params) => (React.createElement(React.Fragment, null,
|
|
4545
4808
|
React.createElement("div", { className: cx$1(css$n.stickyHeader, 'uui-dt-sticky_header'), ref: headerRef },
|
|
4546
|
-
React.createElement(DataTableHeaderRow, { columns: columns, columnGroups: props.columnGroups, onConfigButtonClick: props.showColumnsConfig && onConfigurationButtonClick, selectAll: props.selectAll, size: props.headerSize || settings.dataTable.sizes.header.row, textCase: props.headerTextCase, allowColumnsReordering: props.allowColumnsReordering, allowColumnsResizing: props.allowColumnsResizing, showFoldAll: props.showFoldAll, value: { ...props.value, columnsConfig: config }, onValueChange: props.onValueChange, columnsGap: props.columnsGap }),
|
|
4547
|
-
|
|
4548
|
-
[uuiScrollShadows.topVisible]: params?.scrollShadows?.verticalTop,
|
|
4549
|
-
}) })),
|
|
4550
|
-
props.exactRowsCount !== 0 ? (React.createElement(DataRowsContainer, { headerRef: headerRef, listContainerRef: params?.listContainerRef, estimatedHeight: params?.estimatedHeight, offsetY: params?.offsetY, scrollShadows: params?.scrollShadows, renderRow: renderRow, rows: rows })) : (renderNoResultsBlock?.()))), [
|
|
4809
|
+
React.createElement(DataTableHeaderRow, { columns: columns, columnGroups: props.columnGroups, onConfigButtonClick: props.showColumnsConfig && onConfigurationButtonClick, selectAll: props.selectAll, size: props.headerSize || settings.dataTable.sizes.header.row, textCase: props.headerTextCase, allowColumnsReordering: props.allowColumnsReordering, allowColumnsResizing: props.allowColumnsResizing, showFoldAll: props.showFoldAll, value: { ...props.value, columnsConfig: config }, onValueChange: props.onValueChange, columnsGap: props.columnsGap, cx: uuiScrollShadows.top })),
|
|
4810
|
+
props.exactRowsCount !== 0 ? (React.createElement(DataRowsContainer, { headerRef: headerRef, listContainerRef: params?.listContainerRef, estimatedHeight: params?.estimatedHeight, offsetY: params?.offsetY, renderRow: renderRow, rows: rows })) : (renderNoResultsBlock?.()))), [
|
|
4551
4811
|
props, columns, rows, renderNoResultsBlock, onConfigurationButtonClick,
|
|
4552
4812
|
]);
|
|
4553
4813
|
const classes = cx$1(css$n.root, props.cx, 'uui-dt-vars', 'uui-data_table');
|
|
@@ -4562,7 +4822,7 @@ function DataTable(props) {
|
|
|
4562
4822
|
: (React.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rowsCount: props.rowsCount, renderRows: renderTableBody, cx: classes, isLoading: props.isReloading, rowsSelector: "[role=row]", rawProps: rawProps })))));
|
|
4563
4823
|
}
|
|
4564
4824
|
|
|
4565
|
-
var css$m = {"root":"
|
|
4825
|
+
var css$m = {"root":"Ahu0CP","title-wrapper":"_6ZWgQL","titleWrapper":"_6ZWgQL","title":"_4VrmKX","text-wrapper":"z8ZI0b","textWrapper":"z8ZI0b","selection":"aLbA9r","postfix":"i3vFJn","selected":"_3edSVh"};
|
|
4566
4826
|
|
|
4567
4827
|
const FilterPanelItemToggler = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
4568
4828
|
const togglerPickerOpened = (e) => {
|
|
@@ -4643,6 +4903,7 @@ function FilterPickerBody({ highlightSearchMatches = true, ...restProps }) {
|
|
|
4643
4903
|
selectionMode: props.selectionMode,
|
|
4644
4904
|
selection: props.value,
|
|
4645
4905
|
search: dataSourceState.search,
|
|
4906
|
+
disableClear: props.disableClear,
|
|
4646
4907
|
};
|
|
4647
4908
|
return props.renderFooter
|
|
4648
4909
|
? props.renderFooter(footerProps)
|
|
@@ -4786,7 +5047,7 @@ function FilterRangeDatePickerBody(props) {
|
|
|
4786
5047
|
renderFooter()));
|
|
4787
5048
|
}
|
|
4788
5049
|
|
|
4789
|
-
var css$l = {"container":"
|
|
5050
|
+
var css$l = {"container":"_-1Uhqp"};
|
|
4790
5051
|
|
|
4791
5052
|
function FilterNumericBody(props) {
|
|
4792
5053
|
const isInRangePredicate = props?.selectedPredicate === 'inRange' || props?.selectedPredicate === 'notInRange';
|
|
@@ -5097,14 +5358,24 @@ function FiltersToolbarImpl(props) {
|
|
|
5097
5358
|
}
|
|
5098
5359
|
const FiltersPanel = /* @__PURE__ */React__default.memo(FiltersToolbarImpl);
|
|
5099
5360
|
|
|
5100
|
-
var css$k = {"delete-button":"
|
|
5361
|
+
var css$k = {"delete-button":"TkUdma","deleteButton":"TkUdma","tab-button":"V1sZHz","tabButton":"V1sZHz","targetOpen":"_0-IIaY"};
|
|
5101
5362
|
|
|
5102
5363
|
function PresetActionsDropdown(props) {
|
|
5103
5364
|
const { uuiNotifications } = useUuiContext();
|
|
5365
|
+
const successNotificationHandler = useCallback((text) => {
|
|
5366
|
+
uuiNotifications
|
|
5367
|
+
.show((props) => (React__default.createElement(SuccessNotification, { ...props },
|
|
5368
|
+
React__default.createElement("div", { className: "uui-presets-panel-notification-text" }, text))), { duration: 3 })
|
|
5369
|
+
.catch(() => null);
|
|
5370
|
+
}, []);
|
|
5104
5371
|
const copyUrlToClipboard = useCallback(async () => {
|
|
5105
|
-
|
|
5372
|
+
const isPresetChanged = props.activePresetId === props.preset.id && props.hasPresetChanged(props.preset);
|
|
5373
|
+
const preset = isPresetChanged ? { ...props.preset, ...props.tableState } : props.preset;
|
|
5374
|
+
const link = props.getPresetLink(preset);
|
|
5375
|
+
await navigator.clipboard.writeText(link);
|
|
5106
5376
|
successNotificationHandler('Link copied!');
|
|
5107
|
-
}, []);
|
|
5377
|
+
}, [props.activePresetId, props.preset, props.hasPresetChanged, props.getPresetLink, props.tableState]);
|
|
5378
|
+
const onCopyLink = props.onCopyLink ? props.onCopyLink : copyUrlToClipboard;
|
|
5108
5379
|
const saveInCurrent = useCallback(async (preset) => {
|
|
5109
5380
|
const newPreset = {
|
|
5110
5381
|
...preset,
|
|
@@ -5119,12 +5390,6 @@ function PresetActionsDropdown(props) {
|
|
|
5119
5390
|
}, [
|
|
5120
5391
|
props.tableState.filter, props.tableState.columnsConfig, props.tableState.filtersConfig,
|
|
5121
5392
|
]);
|
|
5122
|
-
const successNotificationHandler = useCallback((text) => {
|
|
5123
|
-
uuiNotifications
|
|
5124
|
-
.show((props) => (React__default.createElement(SuccessNotification, { ...props },
|
|
5125
|
-
React__default.createElement("div", { className: "uui-presets-panel-notification-text" }, text))), { duration: 3 })
|
|
5126
|
-
.catch(() => null);
|
|
5127
|
-
}, []);
|
|
5128
5393
|
const saveInCurrentHandler = useCallback(() => {
|
|
5129
5394
|
saveInCurrent(props.preset);
|
|
5130
5395
|
}, [props.preset]);
|
|
@@ -5152,8 +5417,8 @@ function PresetActionsDropdown(props) {
|
|
|
5152
5417
|
React__default.createElement(DropdownMenuButton, { key: `${props.preset.id}-discard`, icon: settings.presetsPanel.icons.discardChangesIcon, caption: "Discard all changes", onClick: () => { dropdownProps.onClose(); discardAllChangesHandler(); } }),
|
|
5153
5418
|
React__default.createElement(DropdownMenuSplitter, { key: "discard-splitter" }))),
|
|
5154
5419
|
isRenameAvailable && (React__default.createElement(DropdownMenuButton, { key: `${props.preset.id}-rename`, icon: settings.presetsPanel.icons.renameIcon, caption: "Rename", onClick: props.renamePreset })),
|
|
5155
|
-
React__default.createElement(DropdownMenuButton, { key: `${props.preset.id}-duplicate`, icon: settings.presetsPanel.icons.copyIcon, caption: "Duplicate", onClick: () => { dropdownProps.onClose(); duplicateHandler(); } }),
|
|
5156
|
-
React__default.createElement(DropdownMenuButton, { key: `${props.preset.id}-copyLink`, icon: settings.presetsPanel.icons.copyLinkIcon, caption: "Copy Link", onClick:
|
|
5420
|
+
!isPresetChanged && (React__default.createElement(DropdownMenuButton, { key: `${props.preset.id}-duplicate`, icon: settings.presetsPanel.icons.copyIcon, caption: "Duplicate", onClick: () => { dropdownProps.onClose(); duplicateHandler(); } })),
|
|
5421
|
+
props.onCopyLink !== null && (React__default.createElement(DropdownMenuButton, { key: `${props.preset.id}-copyLink`, icon: settings.presetsPanel.icons.copyLinkIcon, caption: "Copy Link", onClick: onCopyLink })),
|
|
5157
5422
|
!isReadonlyPreset && (React__default.createElement(React__default.Fragment, null,
|
|
5158
5423
|
React__default.createElement(DropdownMenuSplitter, { key: "delete-splitter" }),
|
|
5159
5424
|
React__default.createElement(DropdownMenuButton, { icon: settings.presetsPanel.icons.deleteIcon, caption: "Delete", cx: css$k.deleteButton, onClick: deleteHandler })))));
|
|
@@ -5169,7 +5434,7 @@ const UUI_PRESETS_PANEL_MORE_BUTTON = 'uui-presets-panel-more-button';
|
|
|
5169
5434
|
const UUI_PRESETS_PANEL_INPUT = 'uui-presets-panel-input';
|
|
5170
5435
|
const UUI_PRESETS_PANEL_PRESET = 'uui-presets-panel-preset';
|
|
5171
5436
|
|
|
5172
|
-
var css$j = {"preset-input-cell":"
|
|
5437
|
+
var css$j = {"preset-input-cell":"xCehzP","presetInputCell":"xCehzP","preset-input":"tt5F9a","presetInput":"tt5F9a"};
|
|
5173
5438
|
|
|
5174
5439
|
function PresetInput(props) {
|
|
5175
5440
|
const [presetCaption, setPresetCaption] = useState(props.preset?.name || '');
|
|
@@ -5196,7 +5461,7 @@ function PresetInput(props) {
|
|
|
5196
5461
|
React__default.createElement(TextInput, { cx: css$j.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true, maxLength: 50, isReadonly: readonly })));
|
|
5197
5462
|
}
|
|
5198
5463
|
|
|
5199
|
-
var css$i = {"preset":"
|
|
5464
|
+
var css$i = {"preset":"J1q077","activePreset":"C7QNjX"};
|
|
5200
5465
|
|
|
5201
5466
|
function Preset(props) {
|
|
5202
5467
|
const [isRenamePreset, setIsRenamePreset] = useState(false);
|
|
@@ -5218,10 +5483,10 @@ function Preset(props) {
|
|
|
5218
5483
|
}, [props.preset]);
|
|
5219
5484
|
const isPresetActive = props.activePresetId === props.preset.id;
|
|
5220
5485
|
const PresetActionsDropdownComponent = useCallback(() => React__default.createElement(PresetActionsDropdown, { renamePreset: setPresetForRename, ...props }), [props.preset, props.tableState, props.activePresetId]);
|
|
5221
|
-
return (React__default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$i.preset, isPresetActive && css$i.activePreset, UUI_PRESETS_PANEL_PRESET], size: settings.presetsPanel.sizes.tabButton, withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: PresetActionsDropdownComponent, iconPosition: "right",
|
|
5486
|
+
return (React__default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$i.preset, isPresetActive && css$i.activePreset, UUI_PRESETS_PANEL_PRESET], size: settings.presetsPanel.sizes.tabButton, withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: PresetActionsDropdownComponent, iconPosition: "right", isActive: isPresetActive }))));
|
|
5222
5487
|
}
|
|
5223
5488
|
|
|
5224
|
-
var css$h = {"divider":"
|
|
5489
|
+
var css$h = {"divider":"vekOdI","dropdownDeleteIcon":"i7naC6","presetsWrapper":"lkHUKJ","addPresetContainer":"_485nR3","dropContainer":"qIMA-g"};
|
|
5225
5490
|
|
|
5226
5491
|
function PresetsPanel(props) {
|
|
5227
5492
|
const [isAddingPreset, setIsAddingPreset] = useState(false);
|
|
@@ -5270,9 +5535,9 @@ function PresetsPanel(props) {
|
|
|
5270
5535
|
React__default.createElement(AdaptivePanel, { items: getPanelItems() }))));
|
|
5271
5536
|
}
|
|
5272
5537
|
|
|
5273
|
-
var css$g = {"root":"
|
|
5538
|
+
var css$g = {"root":"_5KnibK"};
|
|
5274
5539
|
|
|
5275
|
-
var css$f = {"root":"
|
|
5540
|
+
var css$f = {"root":"m1kbC6","burger-content":"S1Y8ec","burgerContent":"S1Y8ec"};
|
|
5276
5541
|
|
|
5277
5542
|
var _path$3;
|
|
5278
5543
|
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
@@ -5315,24 +5580,38 @@ var SvgNavigationArrowDownOutline = function SvgNavigationArrowDownOutline(props
|
|
|
5315
5580
|
};
|
|
5316
5581
|
var ForwardRef$2 = /*#__PURE__*/forwardRef(SvgNavigationArrowDownOutline);
|
|
5317
5582
|
|
|
5318
|
-
var css$e = {"root":"
|
|
5583
|
+
var css$e = {"root":"dtUWWh","button-primary":"-Mis7-","buttonPrimary":"-Mis7-","button-secondary":"ylTyFw","buttonSecondary":"ylTyFw","hasIcon":"LOevly","dropdown":"_9xeNwU"};
|
|
5319
5584
|
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5585
|
+
function applyBurgerButtonMods(props) {
|
|
5586
|
+
return [
|
|
5587
|
+
css$e.root,
|
|
5588
|
+
'uui-main_menu-burger-button',
|
|
5589
|
+
css$e['button-' + (props.type || 'primary')],
|
|
5590
|
+
css$e['indent-' + (props.indentLevel || 0)],
|
|
5591
|
+
props.isActive && uuiMod.active,
|
|
5592
|
+
props.isDropdown && css$e.dropdown,
|
|
5593
|
+
props.icon && css$e.hasIcon,
|
|
5594
|
+
];
|
|
5595
|
+
}
|
|
5596
|
+
const BurgerButton = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
5597
|
+
const { isActive } = useIsActive({
|
|
5598
|
+
isLinkActive: props.isLinkActive,
|
|
5599
|
+
link: props.link,
|
|
5600
|
+
isActive: props.isActive,
|
|
5601
|
+
});
|
|
5602
|
+
return (React__default.createElement(Button$1, { ...props, ref: ref, cx: applyBurgerButtonMods({ ...props, isActive }), rawProps: {
|
|
5603
|
+
...props.rawProps,
|
|
5604
|
+
role: 'menuitem',
|
|
5605
|
+
}, dropdownIcon: ForwardRef$2 }));
|
|
5606
|
+
});
|
|
5328
5607
|
|
|
5329
|
-
var css$d = {"search-input":"
|
|
5608
|
+
var css$d = {"search-input":"vYVtSz","searchInput":"vYVtSz"};
|
|
5330
5609
|
|
|
5331
5610
|
function BurgerSearch(props) {
|
|
5332
5611
|
return (React.createElement(TextInput$1, { cx: cx(css$d.searchInput, 'uui-main_menu-burger-search'), iconPosition: "left", icon: ForwardRef$M, placeholder: props.placeholder, value: props.value, onValueChange: props.onValueChange, onCancel: props.onCancel, cancelIcon: props.value && ForwardRef$Q }));
|
|
5333
5612
|
}
|
|
5334
5613
|
|
|
5335
|
-
var css$c = {"root":"
|
|
5614
|
+
var css$c = {"root":"KuPp6c","group-header":"uJKceF","groupHeader":"uJKceF","group-name":"jgiWdd","groupName":"jgiWdd","line":"vu919g"};
|
|
5336
5615
|
|
|
5337
5616
|
function BurgerGroupHeader(props) {
|
|
5338
5617
|
return (React.createElement("div", { className: cx(css$c.root, css$c.groupHeader, 'uui-burger-group-header') },
|
|
@@ -5340,19 +5619,25 @@ function BurgerGroupHeader(props) {
|
|
|
5340
5619
|
React.createElement("span", { className: css$c.groupName }, props.caption)));
|
|
5341
5620
|
}
|
|
5342
5621
|
|
|
5343
|
-
var css$b = {"root":"
|
|
5622
|
+
var css$b = {"root":"PLtwlE","type-primary":"xVnypL","typePrimary":"xVnypL","type-secondary":"-YJtZ8","typeSecondary":"-YJtZ8"};
|
|
5344
5623
|
|
|
5345
5624
|
const MainMenuButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
5346
5625
|
const { type, ...clickableProps } = props;
|
|
5626
|
+
const { isActive } = useIsActive({
|
|
5627
|
+
isLinkActive: props.isLinkActive,
|
|
5628
|
+
link: props.link,
|
|
5629
|
+
isActive: props.isActive,
|
|
5630
|
+
});
|
|
5347
5631
|
return (React.createElement(Clickable, { ...clickableProps, rawProps: {
|
|
5348
5632
|
'aria-expanded': props.isOpen,
|
|
5349
|
-
'aria-current':
|
|
5633
|
+
'aria-current': isActive
|
|
5350
5634
|
? 'page'
|
|
5351
5635
|
: undefined,
|
|
5352
5636
|
...props.rawProps,
|
|
5353
5637
|
}, cx: [
|
|
5354
5638
|
css$b.root,
|
|
5355
5639
|
css$b['type-' + (type || 'primary')],
|
|
5640
|
+
isActive && uuiMod.active,
|
|
5356
5641
|
props.cx,
|
|
5357
5642
|
], ref: ref },
|
|
5358
5643
|
props.icon && props.iconPosition !== 'right' && (React.createElement(IconContainer, { icon: props.icon, onClick: props.onIconClick })),
|
|
@@ -5362,34 +5647,18 @@ const MainMenuButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
5362
5647
|
props.isDropdown && (React.createElement(IconContainer, { icon: ForwardRef$P, flipY: props.isOpen }))));
|
|
5363
5648
|
});
|
|
5364
5649
|
|
|
5365
|
-
var css$a = {"dropdown-body":"
|
|
5650
|
+
var css$a = {"dropdown-body":"pI0ItD","dropdownBody":"pI0ItD"};
|
|
5366
5651
|
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
? this.props.renderBody({ ...props })
|
|
5378
|
-
: React.Children.map(this.props.children, (item) => {
|
|
5379
|
-
if (!item)
|
|
5380
|
-
return item;
|
|
5381
|
-
return React.createElement(item.type, {
|
|
5382
|
-
...item.props,
|
|
5383
|
-
onClick: item.props.onClick
|
|
5384
|
-
? () => {
|
|
5385
|
-
item.props.onClick();
|
|
5386
|
-
props.onClose();
|
|
5387
|
-
}
|
|
5388
|
-
: null,
|
|
5389
|
-
});
|
|
5390
|
-
}))));
|
|
5391
|
-
}, placement: "bottom-start" }));
|
|
5392
|
-
}
|
|
5652
|
+
function MainMenuDropdown(props) {
|
|
5653
|
+
const handleEscape = (e, onClose, isOpen) => {
|
|
5654
|
+
if (e.key === 'Escape' && isOpen) {
|
|
5655
|
+
onClose();
|
|
5656
|
+
}
|
|
5657
|
+
};
|
|
5658
|
+
return (React__default.createElement(Dropdown$1, { renderTarget: (dropdownProps) => (React__default.createElement(MainMenuButton, { caption: props.caption, ...dropdownProps, rawProps: props.rawProps, isActive: props.isActive, isDropdown: true })), renderBody: (dropdownBodyProps) => (React__default.createElement(FocusLock, { returnFocus: true, persistentFocus: true, lockProps: {
|
|
5659
|
+
onKeyDown: (e) => handleEscape(e, dropdownBodyProps.onClose, dropdownBodyProps.isOpen),
|
|
5660
|
+
} },
|
|
5661
|
+
React__default.createElement("div", { className: cx(css$a.dropdownBody, 'uui-main_menu-dropdown', props.cx) }, props.renderBody({ ...dropdownBodyProps })))), placement: "bottom-start" }));
|
|
5393
5662
|
}
|
|
5394
5663
|
|
|
5395
5664
|
function applyMainMenuMods() {
|
|
@@ -5421,12 +5690,12 @@ var SvgNavigationGlobalMenuOutlineOutline = function SvgNavigationGlobalMenuOutl
|
|
|
5421
5690
|
};
|
|
5422
5691
|
var ForwardRef$1 = /*#__PURE__*/forwardRef(SvgNavigationGlobalMenuOutlineOutline);
|
|
5423
5692
|
|
|
5424
|
-
var css$9 = {"global-menu-btn":"
|
|
5693
|
+
var css$9 = {"global-menu-btn":"Rcf6o8","globalMenuBtn":"Rcf6o8","global-menu-icon":"-KObp5","globalMenuIcon":"-KObp5"};
|
|
5425
5694
|
|
|
5426
5695
|
const GlobalMenu = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("button", { ref: ref, id: "global_menu_toggle", className: cx(css$9.globalMenuBtn, props.cx), ...props.rawProps },
|
|
5427
5696
|
React.createElement(IconContainer, { size: 36, icon: ForwardRef$1, cx: css$9.globalMenuIcon }))));
|
|
5428
5697
|
|
|
5429
|
-
var css$8 = {"container":"
|
|
5698
|
+
var css$8 = {"container":"w9ZVai","open":"u8-Udc","folding-arrow":"_7iFuL1","foldingArrow":"_7iFuL1"};
|
|
5430
5699
|
|
|
5431
5700
|
const MainMenuAvatar = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("button", { ref: ref, className: cx(css$8.container, props.isDropdown && css$8.dropdown, props.isOpen && css$8.open, props.onClick && uuiMarkers.clickable, props.cx), onClick: props.onClick, ...props.rawProps },
|
|
5432
5701
|
React.createElement(Avatar, { size: "36", img: props.avatarUrl }),
|
|
@@ -5434,15 +5703,15 @@ const MainMenuAvatar = /* @__PURE__ */React.forwardRef((props, ref) => (React.cr
|
|
|
5434
5703
|
props.isDropdown && (React.createElement("div", null,
|
|
5435
5704
|
React.createElement(IconContainer, { size: 18, icon: ForwardRef$P, flipY: props.isOpen, cx: css$8.foldingArrow }))))));
|
|
5436
5705
|
|
|
5437
|
-
var css$7 = {"search-input":"
|
|
5706
|
+
var css$7 = {"search-input":"_2vTcli","searchInput":"_2vTcli"};
|
|
5438
5707
|
|
|
5439
5708
|
const MainMenuSearch = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement(IEditableDebouncer, { ...props, render: (iEditable) => (React.createElement(TextInput$1, { iconPosition: "left", icon: ForwardRef$M, cancelIcon: props.value?.length > 0 && ForwardRef$Q, ...props, ...iEditable, ref: ref, cx: cx$1(css$7.searchInput, props.cx), ...props.rawProps })) })));
|
|
5440
5709
|
|
|
5441
|
-
var css$6 = {"container":"
|
|
5710
|
+
var css$6 = {"container":"wsFTHn"};
|
|
5442
5711
|
|
|
5443
5712
|
const MainMenuIcon = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement(IconButton, { ref: ref, icon: props.icon, cx: cx$1(props.cx, css$6.container), ...props })));
|
|
5444
5713
|
|
|
5445
|
-
var css$5 = {"root":"
|
|
5714
|
+
var css$5 = {"root":"pn9hTw"};
|
|
5446
5715
|
|
|
5447
5716
|
const Anchor = /* @__PURE__ */withMods(Anchor$1, () => [css$5.root]);
|
|
5448
5717
|
|
|
@@ -5500,7 +5769,7 @@ var SvgFileCloudUploadFill = function SvgFileCloudUploadFill(props, ref) {
|
|
|
5500
5769
|
};
|
|
5501
5770
|
var ForwardRef = /*#__PURE__*/forwardRef(SvgFileCloudUploadFill);
|
|
5502
5771
|
|
|
5503
|
-
var css$4 = {"root":"
|
|
5772
|
+
var css$4 = {"root":"_9KpK9K","drop-start":"c4tGeC","dropStart":"c4tGeC","drop-over":"xQ6lFt","dropOver":"xQ6lFt","link":"vMDLUG","drop-area":"YOmTpi","dropArea":"YOmTpi","drop-caption":"tGfwB3","dropCaption":"tGfwB3","icon-blue":"zD4Egz","iconBlue":"zD4Egz"};
|
|
5504
5773
|
|
|
5505
5774
|
function DropSpot(props) {
|
|
5506
5775
|
const getInfoText = typeof props.infoText === 'string'
|
|
@@ -5518,7 +5787,7 @@ function DropSpot(props) {
|
|
|
5518
5787
|
return React.createElement(DropSpot$1, { render: renderAttachmentArea, onFilesDropped: props.onUploadFiles });
|
|
5519
5788
|
}
|
|
5520
5789
|
|
|
5521
|
-
var css$3 = {"root":"
|
|
5790
|
+
var css$3 = {"root":"huTrTa"};
|
|
5522
5791
|
|
|
5523
5792
|
const SvgCircleProgress = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
5524
5793
|
const outsetRadius = props.size / 2 - 1;
|
|
@@ -5529,7 +5798,7 @@ const SvgCircleProgress = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
5529
5798
|
React.createElement("circle", { strokeWidth: 1, fill: "transparent", r: outsetRadius, cx: props.size / 2, cy: props.size / 2 })));
|
|
5530
5799
|
});
|
|
5531
5800
|
|
|
5532
|
-
var css$2 = {"root":"
|
|
5801
|
+
var css$2 = {"root":"pafLq4","file-name":"_80Ljt2","fileName":"_80Ljt2","default-color":"zJLWmG","defaultColor":"zJLWmG","doc-color":"-XBxir","docColor":"-XBxir","xls-color":"F2M9WF","xlsColor":"F2M9WF","pdf-color":"h64wle","pdfColor":"h64wle","movie-color":"PWzEHg","movieColor":"PWzEHg","img-color":"_8oFOIz","imgColor":"_8oFOIz","mov-color":"Kg0e4J","movColor":"Kg0e4J","error-block":"IKpfhS","errorBlock":"IKpfhS","icons-block":"_6oidLn","iconsBlock":"_6oidLn"};
|
|
5533
5802
|
|
|
5534
5803
|
const FileCard = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
5535
5804
|
const [isLoadingShow, setIsLoadingShow] = React.useState(true);
|
|
@@ -5584,7 +5853,7 @@ const FileCard = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
5584
5853
|
setIsLoadingShow(() => false);
|
|
5585
5854
|
};
|
|
5586
5855
|
const renderErrorContent = () => (React.createElement(Tooltip, { content: file.error.message, placement: "bottom-start" },
|
|
5587
|
-
React.createElement("div", { className: css$2.errorBlock },
|
|
5856
|
+
React.createElement("div", { className: css$2.errorBlock, "aria-description": file.error.message, "aria-label": "File Upload Error" },
|
|
5588
5857
|
React.createElement(IconContainer, { icon: settings.fileCard.icons.errorIcon, size: 12 }),
|
|
5589
5858
|
i18n.fileCard.failedUploadErrorMessage)));
|
|
5590
5859
|
const renderSuccessfulContent = () => (React.createElement(Text, { size: "none", fontSize: "14", lineHeight: "18", color: "tertiary" },
|
|
@@ -5648,7 +5917,7 @@ const getErrorPageConfig = () => ({
|
|
|
5648
5917
|
},
|
|
5649
5918
|
});
|
|
5650
5919
|
|
|
5651
|
-
var css$1 = {"container":"
|
|
5920
|
+
var css$1 = {"container":"R-B39Y"};
|
|
5652
5921
|
|
|
5653
5922
|
const ErrorPage = (props) => {
|
|
5654
5923
|
const isMobileScreen = isMobile();
|
|
@@ -5660,7 +5929,7 @@ const ErrorPage = (props) => {
|
|
|
5660
5929
|
props?.supportLink && React__default.createElement("div", { className: "uui-error-support-link" }, props?.supportLink))));
|
|
5661
5930
|
};
|
|
5662
5931
|
|
|
5663
|
-
var css = {"recovery-spinner":"
|
|
5932
|
+
var css = {"recovery-spinner":"_4uFmj3","recoverySpinner":"_4uFmj3","recovery-message":"QQYg-5","recoveryMessage":"QQYg-5","modal-blocker":"_8uCqcK","modalBlocker":"_8uCqcK","modalFadeIn":"nSSJ-5"};
|
|
5664
5933
|
|
|
5665
5934
|
function ErrorHandler(props) {
|
|
5666
5935
|
const { uuiNotifications, uuiModals, uuiApi } = useUuiContext();
|
|
@@ -5711,5 +5980,5 @@ function ErrorHandler(props) {
|
|
|
5711
5980
|
errorType === 'recovery' && renderRecoveryBlocker(errorInfo)));
|
|
5712
5981
|
}
|
|
5713
5982
|
|
|
5714
|
-
export { Accordion, Alert, Anchor, AvatarStack, Badge, Blocker, Burger, BurgerButton, BurgerGroupHeader, BurgerSearch, Button, Calendar, Checkbox, CheckboxGroup, ClearNotification, ColumnHeaderDropdown, ColumnsConfigurationModal, ConfirmationModal, ControlGroup, CountIndicator, DataPickerBody, DataPickerFooter, DataPickerMobileHeader, DataPickerRow, DataRowAddons, DataRowsContainer, DataTable, DataTableCell, DataTableHeaderCell, DataTableHeaderRow, DataTableRow, DatePicker, DatePickerBody, DatePickerComponent, DropMarker, DropSpot, Dropdown, DropdownContainer, DropdownMenuBody, DropdownMenuButton, DropdownMenuHeader, DropdownMenuSplitter, DropdownMenuSwitchButton, DropdownSubMenu, ErrorAlert, ErrorHandler, ErrorNotification, ErrorPage, FileCard, FilterDatePickerBodyFooter, FilterItemBody, FilterPickerBody, FilterRangeDatePickerBodyFooter, FiltersPanel, FlexCell, FlexRow, Form, GlobalMenu, HintAlert, HintNotification, IDropdownControlKeys, IconButton, IndeterminateBar, IndicatorBar, InputAddon, LabeledInput, LinkButton, MainMenu, MainMenuAvatar, MainMenuButton, MainMenuDropdown, MainMenuIcon, MainMenuSearch, ModalBlocker, ModalFooter, ModalHeader, ModalWindow, MultiSwitch, NotificationCard, NumericInput, Paginator, Panel, PickerBodyMobileView, PickerInput, PickerItem, PickerList, PickerListRow, PickerModal, PickerToggler, PickerTogglerTag, PresetsPanel, ProgressBar, RadioGroup, RadioInput, RangeDatePicker, RangeDatePickerBody, RangeDatePickerInput, Rating, RichTextView, ScrollBars, SearchInput, Slider, Snackbar, Spinner, StatusIndicator, SuccessAlert, SuccessNotification, SvgCircleProgress, Switch, TabButton, Tag, Text, TextArea, TextInput, TextPlaceholder, TimePicker, TimePickerBody, TimePickerComponent, Tooltip, VerticalTabButton, VirtualList, WarningAlert, WarningNotification, applyDateSelectionMods, defaultPredicates, getDefaultPredicate, getErrorPageConfig, getHighlightRanges, getHighlightedSearchMatches, getRecoveryMessageConfig, i18n, propsMods, rangeDatePickerPresets, renderCell, renderDropMarkers, settings, useColumnsWithFilters, useForm, uuiDatePickerBody, uuiRangeDatePickerBody, uuiTimePicker };
|
|
5983
|
+
export { Accordion, Alert, Anchor, AvatarStack, Badge, Blocker, Burger, BurgerButton, BurgerGroupHeader, BurgerSearch, Button, Calendar, Checkbox, CheckboxGroup, ClearNotification, ColumnHeaderDropdown, ColumnsConfigurationModal, ConfirmationModal, ControlGroup, CountIndicator, DataPickerBody, DataPickerFooter, DataPickerMobileHeader, DataPickerRow, DataRowAddons, DataRowsContainer, DataTable, DataTableCell, DataTableHeaderCell, DataTableHeaderRow, DataTableRow, DatePicker, DatePickerBody, DatePickerComponent, DropMarker, DropSpot, Dropdown, DropdownContainer, DropdownMenuBody, DropdownMenuButton, DropdownMenuHeader, DropdownMenuSplitter, DropdownMenuSwitchButton, DropdownSubMenu, ErrorAlert, ErrorHandler, ErrorNotification, ErrorPage, FileCard, FilterDatePickerBodyFooter, FilterItemBody, FilterPickerBody, FilterRangeDatePickerBodyFooter, FiltersPanel, FlexCell, FlexRow, Form, GlobalMenu, HintAlert, HintNotification, IDropdownControlKeys, IconButton, IndeterminateBar, IndicatorBar, InputAddon, LabeledInput, LinkButton, MainMenu, MainMenuAvatar, MainMenuButton, MainMenuDropdown, MainMenuIcon, MainMenuSearch, ModalBlocker, ModalFooter, ModalHeader, ModalWindow, MultiSwitch, NotificationCard, NumericInput, Paginator, Panel, PickerBodyMobileView, PickerInput, PickerItem, PickerList, PickerListRow, PickerModal, PickerToggler, PickerTogglerTag, PresetsPanel, ProgressBar, RadioGroup, RadioInput, RangeDatePicker, RangeDatePickerBody, RangeDatePickerInput, Rating, RichTextView, ScrollBars, SearchInput, Slider, Snackbar, Spinner, StatusIndicator, SuccessAlert, SuccessNotification, SvgCircleProgress, Switch, TabButton, Tabs, Tag, Text, TextArea, TextInput, TextPlaceholder, TimePicker, TimePickerBody, TimePickerComponent, Tooltip, Tree, VerticalTabButton, VirtualList, WarningAlert, WarningNotification, applyDateSelectionMods, defaultPredicates, getDefaultPredicate, getErrorPageConfig, getHighlightRanges, getHighlightedSearchMatches, getRecoveryMessageConfig, i18n, propsMods, rangeDatePickerPresets, renderCell, renderDropMarkers, settings, useColumnsWithFilters, useForm, uuiDatePickerBody, uuiRangeDatePickerBody, uuiTimePicker };
|
|
5715
5984
|
//# sourceMappingURL=index.esm.js.map
|