@equinor/eds-core-react 1.0.0-beta.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eds-core-react.cjs +806 -536
- package/dist/esm/components/Accordion/AccordionHeader.js +2 -2
- package/dist/esm/components/Accordion/AccordionItem.js +5 -4
- package/dist/esm/components/Accordion/index.js +1 -1
- package/dist/esm/components/Autocomplete/AddNewOption.js +54 -0
- package/dist/esm/components/Autocomplete/Autocomplete.js +103 -28
- package/dist/esm/components/Autocomplete/Autocomplete.tokens.js +1 -1
- package/dist/esm/components/Autocomplete/Option.js +5 -5
- package/dist/esm/components/Banner/Banner.js +3 -3
- package/dist/esm/components/Banner/BannerMessage.js +1 -1
- package/dist/esm/components/Banner/index.js +1 -1
- package/dist/esm/components/Breadcrumbs/Breadcrumb.js +8 -3
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/components/Breadcrumbs/index.js +1 -1
- package/dist/esm/components/Button/Button.js +20 -11
- package/dist/esm/components/Button/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/esm/components/Button/ButtonGroup/ButtonGroup.tokens.js +0 -1
- package/dist/esm/components/Button/ToggleButton/ToggleButton.js +2 -3
- package/dist/esm/components/Button/index.js +1 -1
- package/dist/esm/components/Button/tokens/contained.js +1 -1
- package/dist/esm/components/Button/tokens/contained_icon.js +1 -1
- package/dist/esm/components/Button/tokens/ghost.js +1 -1
- package/dist/esm/components/Button/tokens/icon.js +1 -1
- package/dist/esm/components/Button/tokens/index.js +12 -12
- package/dist/esm/components/Button/tokens/outlined.js +1 -1
- package/dist/esm/components/Card/CardActions.js +1 -1
- package/dist/esm/components/Card/index.js +1 -1
- package/dist/esm/components/Checkbox/Input.js +1 -1
- package/dist/esm/components/Datepicker/DatePicker.js +50 -47
- package/dist/esm/components/Datepicker/DateRangePicker.js +48 -43
- package/dist/esm/components/Datepicker/calendars/Calendar.js +7 -2
- package/dist/esm/components/Datepicker/calendars/CalendarCell.js +7 -3
- package/dist/esm/components/Datepicker/calendars/CalendarGrid.js +8 -1
- package/dist/esm/components/Datepicker/calendars/CalendarHeader.js +11 -5
- package/dist/esm/components/Datepicker/calendars/RangeCalendar.js +7 -2
- package/dist/esm/components/Datepicker/calendars/YearGrid.js +51 -8
- package/dist/esm/components/Datepicker/fields/DateField.js +2 -1
- package/dist/esm/components/Datepicker/fields/DateFieldSegments.js +4 -6
- package/dist/esm/components/Datepicker/fields/DateRangeField.js +5 -3
- package/dist/esm/components/Datepicker/fields/FieldWrapper.js +0 -1
- package/dist/esm/components/Datepicker/fields/Toggle.js +5 -2
- package/dist/esm/components/Datepicker/utils/get-calendar-date.js +1 -1
- package/dist/esm/components/Datepicker/utils/getPageYears.js +10 -0
- package/dist/esm/components/Datepicker/utils/useGetLocale.js +15 -0
- package/dist/esm/components/Dialog/Dialog.js +3 -3
- package/dist/esm/components/Dialog/index.js +1 -1
- package/dist/esm/components/EdsProvider/eds.context.js +4 -2
- package/dist/esm/components/Icon/Icon.js +6 -19
- package/dist/esm/components/Icon/library.js +1 -6
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/esm/components/Input/Input.tokens.js +1 -1
- package/dist/esm/components/InputWrapper/HelperText/HelperText.token.js +2 -6
- package/dist/esm/components/InputWrapper/InputWrapper.js +1 -1
- package/dist/esm/components/InputWrapper/InputWrapper.tokens.js +1 -1
- package/dist/esm/components/Label/Label.js +10 -14
- package/dist/esm/components/Label/Label.tokens.js +1 -4
- package/dist/esm/components/List/index.js +1 -1
- package/dist/esm/components/Menu/Menu.context.js +1 -1
- package/dist/esm/components/Menu/Menu.js +30 -28
- package/dist/esm/components/Menu/MenuItem.js +5 -4
- package/dist/esm/components/Menu/MenuList.js +2 -2
- package/dist/esm/components/Menu/MenuSection.js +2 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Pagination/Pagination.js +2 -2
- package/dist/esm/components/Paper/Paper.js +1 -1
- package/dist/esm/components/Popover/Popover.js +51 -41
- package/dist/esm/components/Popover/index.js +1 -1
- package/dist/esm/components/Progress/Circular/CircularProgress.js +1 -1
- package/dist/esm/components/Progress/Star/StarProgress.js +1 -1
- package/dist/esm/components/Radio/Radio.js +1 -1
- package/dist/esm/components/Scrim/Scrim.js +2 -2
- package/dist/esm/components/Search/Search.js +1 -1
- package/dist/esm/components/Select/NativeSelect.js +4 -4
- package/dist/esm/components/SideBar/SideBar.context.js +6 -2
- package/dist/esm/components/SideBar/SideBar.js +3 -8
- package/dist/esm/components/SideBar/SideBarAccordion/index.js +3 -4
- package/dist/esm/components/SideBar/SideBarAccordionItem/index.js +1 -1
- package/dist/esm/components/SideBar/SidebarLink/index.js +1 -1
- package/dist/esm/components/SideBar/index.js +1 -1
- package/dist/esm/components/SideSheet/SideSheet.js +2 -2
- package/dist/esm/components/Slider/Slider.js +10 -9
- package/dist/esm/components/Slider/Slider.tokens.js +2 -6
- package/dist/esm/components/Slider/SliderInput.js +3 -3
- package/dist/esm/components/Snackbar/Snackbar.js +33 -17
- package/dist/esm/components/Snackbar/index.js +1 -1
- package/dist/esm/components/Switch/Switch.js +2 -2
- package/dist/esm/components/Switch/SwitchDefault.js +1 -1
- package/dist/esm/components/Switch/SwitchSmall.js +1 -1
- package/dist/esm/components/Table/Cell.js +7 -0
- package/dist/esm/components/Table/DataCell/DataCell.js +2 -2
- package/dist/esm/components/Table/DataCell/DataCell.tokens.js +1 -1
- package/dist/esm/components/Table/Foot/Foot.js +30 -0
- package/dist/esm/components/Table/Foot/Foot.tokens.js +30 -0
- package/dist/esm/components/Table/FooterCell/FooterCell.js +55 -0
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +11 -5
- package/dist/esm/components/Table/Inner.context.js +2 -2
- package/dist/esm/components/Table/index.js +4 -1
- package/dist/esm/components/TableOfContents/TableOfContents.js +3 -3
- package/dist/esm/components/TableOfContents/index.js +1 -1
- package/dist/esm/components/Tabs/TabList.js +10 -6
- package/dist/esm/components/Tabs/TabPanels.js +2 -2
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/TextField/TextField.js +4 -4
- package/dist/esm/components/Tooltip/Tooltip.js +25 -15
- package/dist/esm/components/Tooltip/Tooltip.tokens.js +1 -11
- package/dist/esm/components/TopBar/TopBar.js +3 -3
- package/dist/esm/components/TopBar/index.js +1 -1
- package/dist/esm/components/Typography/{TypographyDeprecated/Typography.js → Typography.js} +2 -2
- package/dist/esm/index.js +51 -4
- package/dist/esm/node_modules/.pnpm/ramda@0.31.3/node_modules/ramda/es/internal/_isPlaceholder.js +5 -0
- package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/mergeDeepRight.js +1 -1
- package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/mergeWith.js +1 -1
- package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/mergeWithKey.js +1 -1
- package/dist/types/components/Accordion/index.d.ts +1 -1
- package/dist/types/components/Autocomplete/AddNewOption.d.ts +13 -0
- package/dist/types/components/Autocomplete/Autocomplete.d.ts +15 -94
- package/dist/types/components/Autocomplete/Option.d.ts +9 -0
- package/dist/types/components/Banner/BannerMessage.d.ts +6 -6
- package/dist/types/components/Banner/index.d.ts +1 -1
- package/dist/types/components/Breadcrumbs/Breadcrumb.d.ts +1 -1
- package/dist/types/components/Breadcrumbs/index.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/Chip/Icon.d.ts +16 -3
- package/dist/types/components/Datepicker/DatePicker.d.ts +4 -4
- package/dist/types/components/Datepicker/DateRangePicker.d.ts +7 -8
- package/dist/types/components/Datepicker/calendars/CalendarGrid.d.ts +4 -1
- package/dist/types/components/Datepicker/calendars/CalendarHeader.d.ts +4 -1
- package/dist/types/components/Datepicker/calendars/CalendarWrapper.d.ts +0 -1
- package/dist/types/components/Datepicker/calendars/YearGrid.d.ts +4 -1
- package/dist/types/components/Datepicker/fields/DateField.d.ts +1 -1
- package/dist/types/components/Datepicker/fields/DateFieldSegments.d.ts +0 -1
- package/dist/types/components/Datepicker/fields/DateRangeField.d.ts +1 -1
- package/dist/types/components/Datepicker/fields/FieldWrapper.d.ts +2 -2
- package/dist/types/components/Datepicker/props.d.ts +5 -0
- package/dist/types/components/Datepicker/utils/getPageYears.d.ts +1 -0
- package/dist/types/components/Datepicker/utils/useGetLocale.d.ts +1 -0
- package/dist/types/components/Dialog/DialogActions.d.ts +0 -1
- package/dist/types/components/Dialog/DialogTitle.d.ts +0 -1
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/Divider/Divider.d.ts +3 -3
- package/dist/types/components/EdsProvider/eds.context.d.ts +2 -0
- package/dist/types/components/Icon/Icon.d.ts +49 -4
- package/dist/types/components/Icon/Icon.types.d.ts +1 -5
- package/dist/types/components/Icon/library.d.ts +2 -2
- package/dist/types/components/List/List.d.ts +1 -1
- package/dist/types/components/List/ListItem.d.ts +0 -1
- package/dist/types/components/List/index.d.ts +1 -1
- package/dist/types/components/Menu/Menu.context.d.ts +1 -1
- package/dist/types/components/Menu/index.d.ts +1 -1
- package/dist/types/components/Paper/Paper.d.ts +0 -1
- package/dist/types/components/Popover/Popover.d.ts +6 -2
- package/dist/types/components/Popover/index.d.ts +1 -1
- package/dist/types/components/Progress/Linear/LinearProgress.d.ts +1 -1
- package/dist/types/components/SideBar/SideBar.context.d.ts +2 -1
- package/dist/types/components/SideBar/SideBarButton/index.d.ts +1 -2
- package/dist/types/components/SideBar/index.d.ts +1 -1
- package/dist/types/components/SideSheet/SideSheet.d.ts +1 -1
- package/dist/types/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/types/components/Snackbar/index.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Switch/Switch.styles.d.ts +1 -4
- package/dist/types/components/Table/Foot/Foot.d.ts +9 -0
- package/dist/types/components/Table/Foot/Foot.tokens.d.ts +2 -0
- package/dist/types/components/Table/Foot/index.d.ts +1 -0
- package/dist/types/components/Table/FooterCell/FooterCell.d.ts +4 -0
- package/dist/types/components/Table/FooterCell/index.d.ts +1 -0
- package/dist/types/components/Table/HeaderCell/HeaderCell.d.ts +1 -1
- package/dist/types/components/Table/Inner.context.d.ts +1 -2
- package/dist/types/components/Table/Row/Row.d.ts +0 -1
- package/dist/types/components/Table/index.d.ts +14 -12
- package/dist/types/components/TableOfContents/index.d.ts +3 -3
- package/dist/types/components/Tabs/TabList.d.ts +2 -2
- package/dist/types/components/Tabs/Tabs.context.d.ts +1 -2
- package/dist/types/components/Tabs/Tabs.d.ts +2 -2
- package/dist/types/components/Tabs/index.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +3 -3
- package/dist/types/components/Tooltip/Tooltip.d.ts +19 -7
- package/dist/types/components/TopBar/index.d.ts +7 -7
- package/dist/types/components/Typography/index.d.ts +1 -4
- package/package.json +43 -47
- package/dist/esm/components/Typography/BodyText/BodyText.js +0 -31
- package/dist/esm/components/Typography/Heading/Heading.js +0 -31
- package/dist/esm/components/Typography/UIText/UIText.js +0 -31
- package/dist/esm/components/Typography/_components/Typography.js +0 -18
- package/dist/esm/node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/internal/_isPlaceholder.js +0 -7
- package/dist/esm/node_modules/.pnpm/ramda@0.30.0/node_modules/ramda/es/internal/_placeholder.js +0 -5
- package/dist/types/components/Datepicker/DatePicker.spec.d.ts +0 -1
- package/dist/types/components/Datepicker/DateRangePicker.spec.d.ts +0 -1
- package/dist/types/components/Typography/BodyText/BodyText.d.ts +0 -4
- package/dist/types/components/Typography/Heading/Heading.d.ts +0 -8
- package/dist/types/components/Typography/TypographyDeprecated/index.d.ts +0 -1
- package/dist/types/components/Typography/UIText/UIText.d.ts +0 -9
- package/dist/types/components/Typography/_components/Typography.d.ts +0 -14
- package/dist/types/components/Typography/typography.types.d.ts +0 -13
- /package/dist/esm/components/Typography/{TypographyDeprecated/Typography.tokens.js → Typography.tokens.js} +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/internal/_curry1.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/internal/_curry2.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/internal/_curry3.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/internal/_has.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/internal/_isObject.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/mergeDeepWithKey.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.30.0 → ramda@0.31.3}/node_modules/ramda/es/pickBy.js +0 -0
- /package/dist/types/components/Typography/{TypographyDeprecated/Typography.d.ts → Typography.d.ts} +0 -0
- /package/dist/types/components/Typography/{TypographyDeprecated/Typography.tokens.d.ts → Typography.tokens.d.ts} +0 -0
package/dist/eds-core-react.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var react = require('react');
|
|
@@ -5,9 +6,9 @@ var styled = require('styled-components');
|
|
|
5
6
|
var edsTokens = require('@equinor/eds-tokens');
|
|
6
7
|
var edsUtils = require('@equinor/eds-utils');
|
|
7
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var reactDom = require('react-dom');
|
|
8
10
|
var react$1 = require('@floating-ui/react');
|
|
9
11
|
var edsIcons = require('@equinor/eds-icons');
|
|
10
|
-
var ReactDom = require('react-dom');
|
|
11
12
|
var downshift = require('downshift');
|
|
12
13
|
var reactVirtual = require('@tanstack/react-virtual');
|
|
13
14
|
var reactAria = require('react-aria');
|
|
@@ -18,26 +19,7 @@ var utils = require('@react-aria/utils');
|
|
|
18
19
|
|
|
19
20
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
21
|
|
|
21
|
-
function _interopNamespace(e) {
|
|
22
|
-
if (e && e.__esModule) return e;
|
|
23
|
-
var n = Object.create(null);
|
|
24
|
-
if (e) {
|
|
25
|
-
Object.keys(e).forEach(function (k) {
|
|
26
|
-
if (k !== 'default') {
|
|
27
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
28
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () { return e[k]; }
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
n.default = e;
|
|
36
|
-
return Object.freeze(n);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
22
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
40
|
-
var ReactDom__namespace = /*#__PURE__*/_interopNamespace(ReactDom);
|
|
41
23
|
|
|
42
24
|
const {
|
|
43
25
|
typography: {
|
|
@@ -172,12 +154,8 @@ const button = {
|
|
|
172
154
|
}
|
|
173
155
|
};
|
|
174
156
|
|
|
175
|
-
var _placeholder = {
|
|
176
|
-
'@@functional/placeholder': true
|
|
177
|
-
};
|
|
178
|
-
|
|
179
157
|
function _isPlaceholder(a) {
|
|
180
|
-
return a ===
|
|
158
|
+
return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
|
|
181
159
|
}
|
|
182
160
|
|
|
183
161
|
/**
|
|
@@ -291,7 +269,7 @@ function _isObject(x) {
|
|
|
291
269
|
* @param {Object} l
|
|
292
270
|
* @param {Object} r
|
|
293
271
|
* @return {Object}
|
|
294
|
-
* @see R.mergeDeepWithKey, R.
|
|
272
|
+
* @see R.mergeDeepWithKey, R.mergeWith
|
|
295
273
|
* @example
|
|
296
274
|
*
|
|
297
275
|
* let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r
|
|
@@ -371,7 +349,7 @@ var mergeDeepWithKey = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj,
|
|
|
371
349
|
* @param {Object} lObj
|
|
372
350
|
* @param {Object} rObj
|
|
373
351
|
* @return {Object}
|
|
374
|
-
* @see R.
|
|
352
|
+
* @see R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey
|
|
375
353
|
* @example
|
|
376
354
|
*
|
|
377
355
|
* R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},
|
|
@@ -399,7 +377,7 @@ var mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {
|
|
|
399
377
|
* @param {Object} l
|
|
400
378
|
* @param {Object} r
|
|
401
379
|
* @return {Object}
|
|
402
|
-
* @see R.mergeDeepWith, R.
|
|
380
|
+
* @see R.mergeDeepWith, R.mergeWithKey
|
|
403
381
|
* @example
|
|
404
382
|
*
|
|
405
383
|
* R.mergeWith(R.concat,
|
|
@@ -883,7 +861,7 @@ const primary$6 = mergeDeepRight(primary$a, contained_icon);
|
|
|
883
861
|
const secondary$1 = mergeDeepRight(secondary$5, contained_icon);
|
|
884
862
|
const danger$2 = mergeDeepRight(danger$6, contained_icon);
|
|
885
863
|
|
|
886
|
-
const token$
|
|
864
|
+
const token$6 = {
|
|
887
865
|
primary: {
|
|
888
866
|
contained: primary$a,
|
|
889
867
|
outlined: primary$9,
|
|
@@ -928,17 +906,18 @@ const InnerFullWidth = /*#__PURE__*/react.forwardRef(function InnerFullWidth({
|
|
|
928
906
|
});
|
|
929
907
|
});
|
|
930
908
|
|
|
931
|
-
const initalState$
|
|
909
|
+
const initalState$2 = {
|
|
932
910
|
/** Density for all components inside `EdsProvider` */
|
|
933
911
|
density: 'comfortable'
|
|
934
912
|
};
|
|
935
|
-
const EdsContext = /*#__PURE__*/react.createContext(initalState$
|
|
913
|
+
const EdsContext = /*#__PURE__*/react.createContext(initalState$2);
|
|
936
914
|
const EdsProvider = ({
|
|
937
915
|
children,
|
|
938
|
-
density
|
|
916
|
+
density,
|
|
917
|
+
rootElement
|
|
939
918
|
}) => {
|
|
940
919
|
const [state, setState] = react.useState({
|
|
941
|
-
...initalState$
|
|
920
|
+
...initalState$2,
|
|
942
921
|
density: density || 'comfortable'
|
|
943
922
|
});
|
|
944
923
|
const setDensity = density => setState(prevState => ({
|
|
@@ -952,6 +931,7 @@ const EdsProvider = ({
|
|
|
952
931
|
}, [density, state.density]);
|
|
953
932
|
const value = {
|
|
954
933
|
density: state.density,
|
|
934
|
+
rootElement,
|
|
955
935
|
setDensity
|
|
956
936
|
};
|
|
957
937
|
return /*#__PURE__*/jsxRuntime.jsx(EdsContext.Provider, {
|
|
@@ -979,12 +959,12 @@ const getVariant$1 = (tokenSet, variant) => {
|
|
|
979
959
|
const getToken$1 = (variant, color) => {
|
|
980
960
|
switch (color) {
|
|
981
961
|
case 'danger':
|
|
982
|
-
return getVariant$1(token$
|
|
962
|
+
return getVariant$1(token$6.danger, variant);
|
|
983
963
|
case 'secondary':
|
|
984
|
-
return getVariant$1(token$
|
|
964
|
+
return getVariant$1(token$6.secondary, variant);
|
|
985
965
|
case 'primary':
|
|
986
966
|
default:
|
|
987
|
-
return getVariant$1(token$
|
|
967
|
+
return getVariant$1(token$6.primary, variant);
|
|
988
968
|
}
|
|
989
969
|
};
|
|
990
970
|
const Inner = styled__default.default.span.withConfig({
|
|
@@ -1008,6 +988,16 @@ const ButtonBase = styled__default.default.button.withConfig({
|
|
|
1008
988
|
} = states;
|
|
1009
989
|
return styled.css(["box-sizing:border-box;margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:", ";color:", ";", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}&:disabled,&[aria-disabled='true']{cursor:not-allowed;background:", ";", ";", ";@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}}"], theme.background, theme.height, theme.width, edsUtils.spacingsTemplate(theme.spacings), edsUtils.bordersTemplate(theme.border), edsUtils.typographyTemplate(theme.typography), clickbound?.offset?.top, clickbound?.offset?.left, clickbound?.width, clickbound?.height, hover.background, hover.typography?.color, edsUtils.bordersTemplate(hover?.border), edsUtils.outlineTemplate(focus.outline), edsUtils.outlineTemplate(focus.outline), disabled.background, edsUtils.bordersTemplate(disabled.border), edsUtils.typographyTemplate(disabled.typography), disabled.background);
|
|
1010
990
|
});
|
|
991
|
+
const getElementType$1 = (disabled, customType, href) => {
|
|
992
|
+
if (disabled) return 'button';
|
|
993
|
+
if (customType) return customType;
|
|
994
|
+
if (href) return 'a';
|
|
995
|
+
return 'button';
|
|
996
|
+
};
|
|
997
|
+
const getButtonType = (href, customElementType) => {
|
|
998
|
+
if (href || customElementType) return undefined;
|
|
999
|
+
return 'button';
|
|
1000
|
+
};
|
|
1011
1001
|
const Button$2 = /*#__PURE__*/react.forwardRef(function Button({
|
|
1012
1002
|
color = 'primary',
|
|
1013
1003
|
variant = 'contained',
|
|
@@ -1024,25 +1014,24 @@ const Button$2 = /*#__PURE__*/react.forwardRef(function Button({
|
|
|
1024
1014
|
const token = edsUtils.useToken({
|
|
1025
1015
|
density
|
|
1026
1016
|
}, getToken$1(variant, color));
|
|
1027
|
-
const as =
|
|
1028
|
-
const type = href
|
|
1029
|
-
|
|
1017
|
+
const as = getElementType$1(disabled, other.as, href);
|
|
1018
|
+
const type = getButtonType(href, other.as);
|
|
1019
|
+
const adjustedTabIndex = disabled ? -1 : tabIndex;
|
|
1030
1020
|
const buttonProps = {
|
|
1031
1021
|
ref,
|
|
1032
|
-
as,
|
|
1033
1022
|
href,
|
|
1034
1023
|
type,
|
|
1035
1024
|
disabled,
|
|
1036
|
-
tabIndex,
|
|
1037
|
-
...other
|
|
1025
|
+
tabIndex: adjustedTabIndex,
|
|
1026
|
+
...other,
|
|
1027
|
+
as
|
|
1038
1028
|
};
|
|
1029
|
+
const Container = fullWidth ? InnerFullWidth : Inner;
|
|
1039
1030
|
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
1040
1031
|
theme: token,
|
|
1041
1032
|
children: /*#__PURE__*/jsxRuntime.jsx(ButtonBase, {
|
|
1042
1033
|
...buttonProps,
|
|
1043
|
-
children:
|
|
1044
|
-
children: children
|
|
1045
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(Inner, {
|
|
1034
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Container, {
|
|
1046
1035
|
children: children
|
|
1047
1036
|
})
|
|
1048
1037
|
})
|
|
@@ -1058,7 +1047,6 @@ const {
|
|
|
1058
1047
|
} = edsTokens.tokens;
|
|
1059
1048
|
const group = {
|
|
1060
1049
|
border: {
|
|
1061
|
-
type: 'border',
|
|
1062
1050
|
radius: borderRadius$8
|
|
1063
1051
|
}
|
|
1064
1052
|
};
|
|
@@ -1066,7 +1054,7 @@ const group = {
|
|
|
1066
1054
|
const {
|
|
1067
1055
|
border: border$5
|
|
1068
1056
|
} = group;
|
|
1069
|
-
const radius$1 = border$5.
|
|
1057
|
+
const radius$1 = border$5.radius;
|
|
1070
1058
|
const ButtonGroupBase = styled__default.default.div.withConfig({
|
|
1071
1059
|
displayName: "ButtonGroup__ButtonGroupBase",
|
|
1072
1060
|
componentId: "sc-1fn8jon-0"
|
|
@@ -1129,19 +1117,9 @@ const tooltip = {
|
|
|
1129
1117
|
radius: borderRadius$7
|
|
1130
1118
|
},
|
|
1131
1119
|
entities: {
|
|
1132
|
-
tooltip: {
|
|
1133
|
-
height: spacingXlarge
|
|
1134
|
-
},
|
|
1135
1120
|
arrow: {
|
|
1136
1121
|
width: '6px',
|
|
1137
|
-
height: spacingSmall$4
|
|
1138
|
-
spacings: {
|
|
1139
|
-
bottom: '-6px',
|
|
1140
|
-
top: '-6px',
|
|
1141
|
-
left: '-6px',
|
|
1142
|
-
right: '-6px'
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1122
|
+
height: spacingSmall$4}
|
|
1145
1123
|
},
|
|
1146
1124
|
spacings: {
|
|
1147
1125
|
left: spacingSmall$4,
|
|
@@ -1151,10 +1129,12 @@ const tooltip = {
|
|
|
1151
1129
|
}
|
|
1152
1130
|
};
|
|
1153
1131
|
|
|
1154
|
-
const StyledTooltip = styled__default.default
|
|
1132
|
+
const StyledTooltip = styled__default.default('div').withConfig({
|
|
1133
|
+
shouldForwardProp: () => true //workaround to avoid warning until popover gets added to react types
|
|
1134
|
+
}).withConfig({
|
|
1155
1135
|
displayName: "Tooltip__StyledTooltip",
|
|
1156
1136
|
componentId: "sc-m2im2p-0"
|
|
1157
|
-
})(["", " ", " ", " background:", ";
|
|
1137
|
+
})(["inset:unset;border:0;overflow:visible;", " ", " ", " background:", ";white-space:nowrap;&::before{content:'; Has tooltip: ';clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;}&::backdrop{background-color:transparent;}"], edsUtils.typographyTemplate(tooltip.typography), edsUtils.spacingsTemplate(tooltip.spacings), edsUtils.bordersTemplate(tooltip.border), tooltip.background);
|
|
1158
1138
|
const ArrowWrapper$1 = styled__default.default.div.withConfig({
|
|
1159
1139
|
displayName: "Tooltip__ArrowWrapper",
|
|
1160
1140
|
componentId: "sc-m2im2p-1"
|
|
@@ -1169,11 +1149,16 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
|
|
|
1169
1149
|
children,
|
|
1170
1150
|
style,
|
|
1171
1151
|
enterDelay = 100,
|
|
1152
|
+
disabled = false,
|
|
1153
|
+
portalContainer,
|
|
1172
1154
|
...rest
|
|
1173
1155
|
}, ref) {
|
|
1174
1156
|
const arrowRef = react.useRef(null);
|
|
1175
1157
|
const [open, setOpen] = react.useState(false);
|
|
1176
|
-
const
|
|
1158
|
+
const {
|
|
1159
|
+
rootElement
|
|
1160
|
+
} = useEds();
|
|
1161
|
+
const shouldOpen = Boolean(title) && typeof document !== 'undefined';
|
|
1177
1162
|
const {
|
|
1178
1163
|
x,
|
|
1179
1164
|
y,
|
|
@@ -1186,7 +1171,8 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
|
|
|
1186
1171
|
y: arrowY
|
|
1187
1172
|
} = {}
|
|
1188
1173
|
},
|
|
1189
|
-
placement: finalPlacement
|
|
1174
|
+
placement: finalPlacement,
|
|
1175
|
+
elements
|
|
1190
1176
|
} = react$1.useFloating({
|
|
1191
1177
|
placement,
|
|
1192
1178
|
open,
|
|
@@ -1249,13 +1235,18 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
|
|
|
1249
1235
|
...children.props
|
|
1250
1236
|
})
|
|
1251
1237
|
});
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1238
|
+
react.useEffect(() => {
|
|
1239
|
+
if (!elements.floating) return;
|
|
1240
|
+
if (elements.floating.isConnected && shouldOpen && open) {
|
|
1241
|
+
elements.floating.showPopover();
|
|
1242
|
+
}
|
|
1243
|
+
}, [open, shouldOpen, elements.floating]);
|
|
1255
1244
|
const TooltipEl = /*#__PURE__*/jsxRuntime.jsxs(StyledTooltip, {
|
|
1245
|
+
popover: "manual",
|
|
1256
1246
|
...rest,
|
|
1257
1247
|
...getFloatingProps({
|
|
1258
1248
|
ref: tooltipRef,
|
|
1249
|
+
className: `eds-tooltip ${rest.className ?? ''}`,
|
|
1259
1250
|
style: {
|
|
1260
1251
|
...style,
|
|
1261
1252
|
position: strategy,
|
|
@@ -1274,12 +1265,7 @@ const Tooltip$2 = /*#__PURE__*/react.forwardRef(function Tooltip({
|
|
|
1274
1265
|
})]
|
|
1275
1266
|
});
|
|
1276
1267
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1277
|
-
children: [
|
|
1278
|
-
children: shouldOpen && open && TooltipEl
|
|
1279
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingPortal, {
|
|
1280
|
-
id: "eds-tooltip-container",
|
|
1281
|
-
children: shouldOpen && open && TooltipEl
|
|
1282
|
-
}), updatedChildren]
|
|
1268
|
+
children: [shouldOpen && open && !disabled && /*#__PURE__*/reactDom.createPortal(TooltipEl, portalContainer ?? rootElement ?? document.body), updatedChildren]
|
|
1283
1269
|
});
|
|
1284
1270
|
});
|
|
1285
1271
|
|
|
@@ -1298,7 +1284,7 @@ const ToggleButton = /*#__PURE__*/react.forwardRef(function ToggleButton({
|
|
|
1298
1284
|
}, [selectedIndexes]);
|
|
1299
1285
|
function updateProps(child, isSelected, index) {
|
|
1300
1286
|
const childElement = child;
|
|
1301
|
-
if (
|
|
1287
|
+
if (/*#__PURE__*/react.isValidElement(child)) {
|
|
1302
1288
|
const buttonProps = {
|
|
1303
1289
|
'aria-pressed': isSelected ? true : undefined,
|
|
1304
1290
|
variant: isSelected ? 'contained' : 'outlined',
|
|
@@ -1320,7 +1306,7 @@ const ToggleButton = /*#__PURE__*/react.forwardRef(function ToggleButton({
|
|
|
1320
1306
|
const updatedChildren = react.Children.map(children, (child, index) => {
|
|
1321
1307
|
const isSelected = pickedIndexes.includes(index);
|
|
1322
1308
|
const childElement = child;
|
|
1323
|
-
if (
|
|
1309
|
+
if (/*#__PURE__*/react.isValidElement(child) && child.type === Tooltip$2) {
|
|
1324
1310
|
const updatedGrandChildren = react.Children.map(childElement.props.children, grandChild => {
|
|
1325
1311
|
return updateProps(grandChild, isSelected, index);
|
|
1326
1312
|
});
|
|
@@ -1442,7 +1428,7 @@ const findColor = (inputColor = null) => typeof colors$5[inputColor] === 'undefi
|
|
|
1442
1428
|
const toVariantName = (variant, bold = false, italic = false, link = false) => `${variant}${bold ? '_bold' : ''}${italic ? '_italic' : ''}${link ? '_link' : ''}`;
|
|
1443
1429
|
const StyledTypography$1 = styled__default.default.p.withConfig({
|
|
1444
1430
|
displayName: "Typography__StyledTypography",
|
|
1445
|
-
componentId: "sc-
|
|
1431
|
+
componentId: "sc-179guof-0"
|
|
1446
1432
|
})(["", " ", " ", " ", ""], ({
|
|
1447
1433
|
$typography,
|
|
1448
1434
|
$link
|
|
@@ -1455,7 +1441,7 @@ const StyledTypography$1 = styled__default.default.p.withConfig({
|
|
|
1455
1441
|
}) => $lines && styled.css(["display:-webkit-box;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;"], $lines), ({
|
|
1456
1442
|
$link
|
|
1457
1443
|
}) => $link && styled.css(["&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}"], edsUtils.outlineTemplate(link.states.focus.outline), edsUtils.outlineTemplate(link.states.focus.outline)));
|
|
1458
|
-
const Typography
|
|
1444
|
+
const Typography = /*#__PURE__*/react.forwardRef(function Typography({
|
|
1459
1445
|
variant = 'body_short',
|
|
1460
1446
|
children,
|
|
1461
1447
|
bold,
|
|
@@ -1491,99 +1477,6 @@ const Typography$1 = /*#__PURE__*/react.forwardRef(function Typography({
|
|
|
1491
1477
|
|
|
1492
1478
|
// Typography.displayName = 'EdsTypography'
|
|
1493
1479
|
|
|
1494
|
-
const Typography = styled__default.default.p.withConfig({
|
|
1495
|
-
displayName: "Typography",
|
|
1496
|
-
componentId: "sc-xl9v17-0"
|
|
1497
|
-
})(["margin:0;", ""], ({
|
|
1498
|
-
$type,
|
|
1499
|
-
$size,
|
|
1500
|
-
$lineHeight,
|
|
1501
|
-
$fontWeight,
|
|
1502
|
-
$letterSpacing,
|
|
1503
|
-
$offset = 0,
|
|
1504
|
-
$onGrid = true,
|
|
1505
|
-
$color,
|
|
1506
|
-
$lines
|
|
1507
|
-
}) => styled.css(["", " --_text-preset-color:", ";font-family:", ";font-size:", ";line-height:", ";font-weight:", ";letter-spacing:", ";color:var(--_text-preset-color,inherit);--_offset:calc(", " * 1em);--_grid-base:4px;@supports (height:round(up,10px,1px)){--_rest-top:", ";--_rest-bottom:", ";}--_trim-top:calc(((((1lh - 1cap) / 2) - var(--_offset)) * -1));--_trim-bottom:calc(((((1lh - 1cap) / 2) + var(--_offset)) * -1));&::before{margin-bottom:calc(var(--_trim-top) + var(--_rest-top,0cap));}&::after{margin-top:calc(var(--_trim-bottom) + var(--_rest-bottom,0cap));}&::before,&::after{display:table;content:'';}"], $lines && styled.css(["display:-webkit-box;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;"], $lines), $color, `var(--eds-typography-${$type}-font-family)`, `var(--eds-typography-${$type}-${$size}-font-size)`, `var(--eds-typography-${$type}-${$size}-lineheight-${$lineHeight})`, `var(--eds-typography-${$type}-${$size}-font-weight-${$fontWeight})`, `var(--eds-typography-${$type}-${$size}-tracking-${$letterSpacing})`, $offset, $onGrid ? 'calc(round(nearest, 1cap, var(--_grid-base)) - 1cap)' : 'calc((round(nearest, 1cap, var(--_grid-base)) - 1cap) / 2)', $onGrid ? '0cap' : 'calc((round(nearest, 1cap, var(--_grid-base)) - 1cap) / 2)'));
|
|
1508
|
-
|
|
1509
|
-
const INTER_VERTICAL_OFFSET = 0.002;
|
|
1510
|
-
const BodyText = /*#__PURE__*/react.forwardRef(function BodyText({
|
|
1511
|
-
size = 'lg',
|
|
1512
|
-
lineHeight = 'default',
|
|
1513
|
-
fontWeight = 'normal',
|
|
1514
|
-
letterSpacing = 'normal',
|
|
1515
|
-
as = 'p',
|
|
1516
|
-
lines,
|
|
1517
|
-
children,
|
|
1518
|
-
...rest
|
|
1519
|
-
}, ref) {
|
|
1520
|
-
return /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1521
|
-
ref: ref,
|
|
1522
|
-
as: as,
|
|
1523
|
-
$type: 'ui-body',
|
|
1524
|
-
$offset: INTER_VERTICAL_OFFSET,
|
|
1525
|
-
$size: size,
|
|
1526
|
-
$lineHeight: lineHeight,
|
|
1527
|
-
$lines: lines,
|
|
1528
|
-
$fontWeight: fontWeight,
|
|
1529
|
-
$letterSpacing: letterSpacing,
|
|
1530
|
-
...rest,
|
|
1531
|
-
children: children
|
|
1532
|
-
});
|
|
1533
|
-
});
|
|
1534
|
-
|
|
1535
|
-
const UIText = /*#__PURE__*/react.forwardRef(function UIText({
|
|
1536
|
-
size = 'lg',
|
|
1537
|
-
lineHeight = 'default',
|
|
1538
|
-
fontWeight = 'normal',
|
|
1539
|
-
letterSpacing = 'normal',
|
|
1540
|
-
lines,
|
|
1541
|
-
as = 'p',
|
|
1542
|
-
onGrid = false,
|
|
1543
|
-
children,
|
|
1544
|
-
...rest
|
|
1545
|
-
}, ref) {
|
|
1546
|
-
return /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1547
|
-
ref: ref,
|
|
1548
|
-
as: as,
|
|
1549
|
-
$type: 'ui-body',
|
|
1550
|
-
$size: size,
|
|
1551
|
-
$lineHeight: lineHeight,
|
|
1552
|
-
$lines: lines,
|
|
1553
|
-
$fontWeight: fontWeight,
|
|
1554
|
-
$letterSpacing: letterSpacing,
|
|
1555
|
-
$onGrid: onGrid,
|
|
1556
|
-
...rest,
|
|
1557
|
-
children: children
|
|
1558
|
-
});
|
|
1559
|
-
});
|
|
1560
|
-
|
|
1561
|
-
const EQUINOR_VERTICAL_OFFSET = 0.06;
|
|
1562
|
-
const Heading = /*#__PURE__*/react.forwardRef(function Heading({
|
|
1563
|
-
size = 'lg',
|
|
1564
|
-
lineHeight = 'default',
|
|
1565
|
-
fontWeight = 'normal',
|
|
1566
|
-
letterSpacing = 'normal',
|
|
1567
|
-
lines,
|
|
1568
|
-
as,
|
|
1569
|
-
children,
|
|
1570
|
-
...rest
|
|
1571
|
-
}, ref) {
|
|
1572
|
-
return /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1573
|
-
ref: ref,
|
|
1574
|
-
$lineHeight: lineHeight,
|
|
1575
|
-
$lines: lines,
|
|
1576
|
-
$type: 'header',
|
|
1577
|
-
$size: size,
|
|
1578
|
-
$offset: EQUINOR_VERTICAL_OFFSET,
|
|
1579
|
-
$fontWeight: fontWeight,
|
|
1580
|
-
$letterSpacing: letterSpacing,
|
|
1581
|
-
as: as,
|
|
1582
|
-
...rest,
|
|
1583
|
-
children: children
|
|
1584
|
-
});
|
|
1585
|
-
});
|
|
1586
|
-
|
|
1587
1480
|
const {
|
|
1588
1481
|
typography: {
|
|
1589
1482
|
table: {
|
|
@@ -1602,12 +1495,12 @@ const {
|
|
|
1602
1495
|
},
|
|
1603
1496
|
ui: {
|
|
1604
1497
|
background__medium: {
|
|
1605
|
-
rgba: borderColor$
|
|
1498
|
+
rgba: borderColor$5
|
|
1606
1499
|
}
|
|
1607
1500
|
},
|
|
1608
1501
|
interactive: {
|
|
1609
1502
|
table__cell__fill_resting: {
|
|
1610
|
-
rgba: backgroundColor$
|
|
1503
|
+
rgba: backgroundColor$6
|
|
1611
1504
|
},
|
|
1612
1505
|
table__cell__fill_hover: {
|
|
1613
1506
|
rgba: hoverBackgroundColor$3
|
|
@@ -1640,14 +1533,14 @@ const {
|
|
|
1640
1533
|
} = edsTokens.tokens;
|
|
1641
1534
|
const tableCell = {
|
|
1642
1535
|
height: 'var(--eds_table__cell__height, 48px)',
|
|
1643
|
-
background: backgroundColor$
|
|
1536
|
+
background: backgroundColor$6,
|
|
1644
1537
|
align: {
|
|
1645
1538
|
vertical: 'var(--eds_table__cell__vertical_align, inherit)'
|
|
1646
1539
|
},
|
|
1647
1540
|
border: {
|
|
1648
1541
|
type: 'bordergroup',
|
|
1649
1542
|
bottom: {
|
|
1650
|
-
color: borderColor$
|
|
1543
|
+
color: borderColor$5,
|
|
1651
1544
|
width: '1px',
|
|
1652
1545
|
style: 'solid'
|
|
1653
1546
|
}
|
|
@@ -1763,10 +1656,10 @@ const Table$1 = /*#__PURE__*/react.forwardRef(function Table({
|
|
|
1763
1656
|
|
|
1764
1657
|
// Table.displayName = 'EdsTable'
|
|
1765
1658
|
|
|
1766
|
-
const
|
|
1659
|
+
const initialState = {
|
|
1767
1660
|
variant: 'body'
|
|
1768
1661
|
};
|
|
1769
|
-
const InnerContext = /*#__PURE__*/react.createContext(
|
|
1662
|
+
const InnerContext = /*#__PURE__*/react.createContext(initialState);
|
|
1770
1663
|
|
|
1771
1664
|
const TableBase = styled__default.default.tbody.withConfig({
|
|
1772
1665
|
displayName: "Body__TableBase",
|
|
@@ -1788,7 +1681,7 @@ const Body = /*#__PURE__*/react.forwardRef(function Body({
|
|
|
1788
1681
|
});
|
|
1789
1682
|
});
|
|
1790
1683
|
|
|
1791
|
-
const StyledTableCell$
|
|
1684
|
+
const StyledTableCell$2 = styled__default.default.td.withConfig({
|
|
1792
1685
|
displayName: "DataCell__StyledTableCell",
|
|
1793
1686
|
componentId: "sc-15tuitc-0"
|
|
1794
1687
|
})(({
|
|
@@ -1819,7 +1712,7 @@ const TableDataCell = /*#__PURE__*/react.forwardRef(function TableDataCell({
|
|
|
1819
1712
|
}, applyVariant(variant, tableCell));
|
|
1820
1713
|
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
1821
1714
|
theme: token,
|
|
1822
|
-
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableCell$
|
|
1715
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableCell$2, {
|
|
1823
1716
|
...rest,
|
|
1824
1717
|
ref: ref,
|
|
1825
1718
|
children: children
|
|
@@ -1844,12 +1737,12 @@ const {
|
|
|
1844
1737
|
},
|
|
1845
1738
|
ui: {
|
|
1846
1739
|
background__medium: {
|
|
1847
|
-
rgba: borderColor$
|
|
1740
|
+
rgba: borderColor$4
|
|
1848
1741
|
}
|
|
1849
1742
|
},
|
|
1850
1743
|
interactive: {
|
|
1851
1744
|
table__header__fill_resting: {
|
|
1852
|
-
rgba: backgroundColor$
|
|
1745
|
+
rgba: backgroundColor$5
|
|
1853
1746
|
},
|
|
1854
1747
|
table__header__fill_hover: {
|
|
1855
1748
|
rgba: hoverBackgroundColor$2
|
|
@@ -1877,9 +1770,9 @@ const {
|
|
|
1877
1770
|
}
|
|
1878
1771
|
}
|
|
1879
1772
|
} = edsTokens.tokens;
|
|
1880
|
-
const token$
|
|
1773
|
+
const token$5 = {
|
|
1881
1774
|
height: 'var(--eds_table__cell__height, 48px)',
|
|
1882
|
-
background: backgroundColor$
|
|
1775
|
+
background: backgroundColor$5,
|
|
1883
1776
|
align: {
|
|
1884
1777
|
vertical: 'var(--eds_table__cell__vertical_align, inherit)'
|
|
1885
1778
|
},
|
|
@@ -1893,7 +1786,7 @@ const token$4 = {
|
|
|
1893
1786
|
bottom: {
|
|
1894
1787
|
type: 'border',
|
|
1895
1788
|
width: '2px',
|
|
1896
|
-
color: borderColor$
|
|
1789
|
+
color: borderColor$4,
|
|
1897
1790
|
style: 'solid'
|
|
1898
1791
|
}
|
|
1899
1792
|
},
|
|
@@ -1955,13 +1848,14 @@ const token$4 = {
|
|
|
1955
1848
|
}
|
|
1956
1849
|
};
|
|
1957
1850
|
|
|
1958
|
-
const StyledTableCell = styled__default.default.th.withConfig({
|
|
1851
|
+
const StyledTableCell$1 = styled__default.default.th.withConfig({
|
|
1959
1852
|
displayName: "HeaderCell__StyledTableCell",
|
|
1960
1853
|
componentId: "sc-18w2o3a-0"
|
|
1961
1854
|
})(props => {
|
|
1962
1855
|
const {
|
|
1963
1856
|
theme,
|
|
1964
|
-
$sticky
|
|
1857
|
+
$sticky,
|
|
1858
|
+
$density
|
|
1965
1859
|
} = props;
|
|
1966
1860
|
const {
|
|
1967
1861
|
background,
|
|
@@ -1979,12 +1873,16 @@ const StyledTableCell = styled__default.default.th.withConfig({
|
|
|
1979
1873
|
if (ariaSort && ariaSort !== 'none') {
|
|
1980
1874
|
sortStylingActive = styled.css(["", ";background:", ";color:", ";"], activeToken.border.type === 'bordergroup' ? styled.css(["border-color:", ";"], activeToken.border.bottom.color) : '', activeToken.background, activeToken.typography.color);
|
|
1981
1875
|
}
|
|
1982
|
-
|
|
1876
|
+
|
|
1877
|
+
// Firefox specific workaround (bug in v142.0) - see issue #3910
|
|
1878
|
+
// Hardcoded padding values compensate for Firefox's incorrect table cell height calculation
|
|
1879
|
+
const firefoxFix = edsUtils.isFirefox() ? styled.css(["vertical-align:top;height:auto;min-height:", ";> div{padding:", " 0;}"], height, $density === 'compact' ? '7px' : '13px') : styled.css([""]);
|
|
1880
|
+
return styled.css(["min-height:", ";height:", ";background:", ";box-sizing:border-box;", " ", " ", " ", " ", " ", " ", ""], height, height, background, edsUtils.spacingsTemplate(spacings), edsUtils.typographyTemplate(typography), edsUtils.bordersTemplate(theme.border), sortStylingHover, sortStylingActive, firefoxFix, $sticky ? styled.css(["position:sticky;top:0;z-index:1;"]) : '');
|
|
1983
1881
|
});
|
|
1984
|
-
const CellInner = styled__default.default.div.withConfig({
|
|
1882
|
+
const CellInner$1 = styled__default.default.div.withConfig({
|
|
1985
1883
|
displayName: "HeaderCell__CellInner",
|
|
1986
1884
|
componentId: "sc-18w2o3a-1"
|
|
1987
|
-
})(["display:flex;align-items:center;"]);
|
|
1885
|
+
})(["display:flex;align-items:center;height:100%;"]);
|
|
1988
1886
|
const TableHeaderCell = /*#__PURE__*/react.forwardRef(function TableHeaderCell({
|
|
1989
1887
|
children,
|
|
1990
1888
|
sort,
|
|
@@ -1996,16 +1894,64 @@ const TableHeaderCell = /*#__PURE__*/react.forwardRef(function TableHeaderCell({
|
|
|
1996
1894
|
} = useEds();
|
|
1997
1895
|
const token = edsUtils.useToken({
|
|
1998
1896
|
density
|
|
1999
|
-
}, token$
|
|
1897
|
+
}, token$5);
|
|
2000
1898
|
const props = {
|
|
2001
1899
|
ref,
|
|
2002
1900
|
$sticky: sticky,
|
|
1901
|
+
$density: density,
|
|
2003
1902
|
...rest
|
|
2004
1903
|
};
|
|
2005
1904
|
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
2006
1905
|
theme: token,
|
|
2007
|
-
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableCell, {
|
|
1906
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableCell$1, {
|
|
2008
1907
|
"aria-sort": sort,
|
|
1908
|
+
...props,
|
|
1909
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CellInner$1, {
|
|
1910
|
+
children: children
|
|
1911
|
+
})
|
|
1912
|
+
})
|
|
1913
|
+
});
|
|
1914
|
+
});
|
|
1915
|
+
|
|
1916
|
+
const StyledTableCell = styled__default.default.th.withConfig({
|
|
1917
|
+
displayName: "FooterCell__StyledTableCell",
|
|
1918
|
+
componentId: "sc-1xq9z77-0"
|
|
1919
|
+
})(props => {
|
|
1920
|
+
const {
|
|
1921
|
+
theme,
|
|
1922
|
+
$sticky
|
|
1923
|
+
} = props;
|
|
1924
|
+
const {
|
|
1925
|
+
background,
|
|
1926
|
+
height,
|
|
1927
|
+
typography,
|
|
1928
|
+
spacings
|
|
1929
|
+
} = theme;
|
|
1930
|
+
return styled.css(["min-height:", ";height:", ";background:", ";box-sizing:border-box;", " ", " ", " ", ""], height, height, background, edsUtils.spacingsTemplate(spacings), edsUtils.typographyTemplate(typography), edsUtils.bordersTemplate(theme.border), $sticky ? styled.css(["position:sticky;bottom:0;z-index:2;"]) : '');
|
|
1931
|
+
});
|
|
1932
|
+
const CellInner = styled__default.default.div.withConfig({
|
|
1933
|
+
displayName: "FooterCell__CellInner",
|
|
1934
|
+
componentId: "sc-1xq9z77-1"
|
|
1935
|
+
})(["display:flex;align-items:center;"]);
|
|
1936
|
+
const TableFooterCell = /*#__PURE__*/react.forwardRef(function TableFooterCell({
|
|
1937
|
+
children,
|
|
1938
|
+
sticky,
|
|
1939
|
+
...rest
|
|
1940
|
+
}, ref) {
|
|
1941
|
+
const {
|
|
1942
|
+
density
|
|
1943
|
+
} = useEds();
|
|
1944
|
+
const token = edsUtils.useToken({
|
|
1945
|
+
density
|
|
1946
|
+
}, token$5);
|
|
1947
|
+
const props = {
|
|
1948
|
+
ref,
|
|
1949
|
+
$sticky: sticky,
|
|
1950
|
+
...rest
|
|
1951
|
+
};
|
|
1952
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
1953
|
+
theme: token,
|
|
1954
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableCell, {
|
|
2009
1955
|
...props,
|
|
2010
1956
|
children: /*#__PURE__*/jsxRuntime.jsx(CellInner, {
|
|
2011
1957
|
children: children
|
|
@@ -2029,6 +1975,12 @@ const Cell = /*#__PURE__*/react.forwardRef(function Cell({
|
|
|
2029
1975
|
sticky: sticky,
|
|
2030
1976
|
...rest
|
|
2031
1977
|
});
|
|
1978
|
+
case 'foot':
|
|
1979
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableFooterCell, {
|
|
1980
|
+
ref: ref,
|
|
1981
|
+
sticky: sticky,
|
|
1982
|
+
...rest
|
|
1983
|
+
});
|
|
2032
1984
|
default:
|
|
2033
1985
|
case 'body':
|
|
2034
1986
|
return /*#__PURE__*/jsxRuntime.jsx(TableDataCell, {
|
|
@@ -2044,24 +1996,24 @@ const {
|
|
|
2044
1996
|
colors: {
|
|
2045
1997
|
ui: {
|
|
2046
1998
|
background__medium: {
|
|
2047
|
-
rgba: borderColor$
|
|
1999
|
+
rgba: borderColor$3
|
|
2048
2000
|
}
|
|
2049
2001
|
},
|
|
2050
2002
|
interactive: {
|
|
2051
2003
|
table__header__fill_resting: {
|
|
2052
|
-
rgba: backgroundColor$
|
|
2004
|
+
rgba: backgroundColor$4
|
|
2053
2005
|
}
|
|
2054
2006
|
}
|
|
2055
2007
|
}
|
|
2056
2008
|
} = edsTokens.tokens;
|
|
2057
|
-
const token$
|
|
2058
|
-
background: backgroundColor$
|
|
2009
|
+
const token$4 = {
|
|
2010
|
+
background: backgroundColor$4,
|
|
2059
2011
|
border: {
|
|
2060
2012
|
type: 'bordergroup',
|
|
2061
2013
|
bottom: {
|
|
2062
2014
|
type: 'border',
|
|
2063
2015
|
width: '2px',
|
|
2064
|
-
color: borderColor$
|
|
2016
|
+
color: borderColor$3,
|
|
2065
2017
|
style: 'solid'
|
|
2066
2018
|
}
|
|
2067
2019
|
}
|
|
@@ -2070,7 +2022,7 @@ const token$3 = {
|
|
|
2070
2022
|
const StyledTableHead = styled__default.default.thead.withConfig({
|
|
2071
2023
|
displayName: "Head__StyledTableHead",
|
|
2072
2024
|
componentId: "sc-g9tch7-0"
|
|
2073
|
-
})(["", " background:", ";"], edsUtils.bordersTemplate(token$
|
|
2025
|
+
})(["", " background:", ";"], edsUtils.bordersTemplate(token$4.border), token$4.background);
|
|
2074
2026
|
const Head = /*#__PURE__*/react.forwardRef(function Head({
|
|
2075
2027
|
children,
|
|
2076
2028
|
sticky,
|
|
@@ -2089,6 +2041,55 @@ const Head = /*#__PURE__*/react.forwardRef(function Head({
|
|
|
2089
2041
|
});
|
|
2090
2042
|
});
|
|
2091
2043
|
|
|
2044
|
+
const {
|
|
2045
|
+
colors: {
|
|
2046
|
+
ui: {
|
|
2047
|
+
background__medium: {
|
|
2048
|
+
rgba: borderColor$2
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
interactive: {
|
|
2052
|
+
table__header__fill_resting: {
|
|
2053
|
+
rgba: backgroundColor$3
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
} = edsTokens.tokens;
|
|
2058
|
+
const token$3 = {
|
|
2059
|
+
background: backgroundColor$3,
|
|
2060
|
+
border: {
|
|
2061
|
+
type: 'bordergroup',
|
|
2062
|
+
bottom: {
|
|
2063
|
+
type: 'border',
|
|
2064
|
+
width: '2px',
|
|
2065
|
+
color: borderColor$2,
|
|
2066
|
+
style: 'solid'
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
const StyledTableFoot = styled__default.default.tfoot.withConfig({
|
|
2072
|
+
displayName: "Foot__StyledTableFoot",
|
|
2073
|
+
componentId: "sc-3w9vih-0"
|
|
2074
|
+
})(["", " background:", ";"], edsUtils.bordersTemplate(token$3.border), token$3.background);
|
|
2075
|
+
const Foot = /*#__PURE__*/react.forwardRef(function Foot({
|
|
2076
|
+
children,
|
|
2077
|
+
sticky,
|
|
2078
|
+
...props
|
|
2079
|
+
}, ref) {
|
|
2080
|
+
return /*#__PURE__*/jsxRuntime.jsx(InnerContext.Provider, {
|
|
2081
|
+
value: {
|
|
2082
|
+
variant: 'foot',
|
|
2083
|
+
sticky
|
|
2084
|
+
},
|
|
2085
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableFoot, {
|
|
2086
|
+
...props,
|
|
2087
|
+
ref: ref,
|
|
2088
|
+
children: children
|
|
2089
|
+
})
|
|
2090
|
+
});
|
|
2091
|
+
});
|
|
2092
|
+
|
|
2092
2093
|
const {
|
|
2093
2094
|
colors: {
|
|
2094
2095
|
interactive: {
|
|
@@ -2154,11 +2155,13 @@ const Table = Table$1;
|
|
|
2154
2155
|
Table.Body = Body;
|
|
2155
2156
|
Table.Cell = Cell;
|
|
2156
2157
|
Table.Head = Head;
|
|
2158
|
+
Table.Foot = Foot;
|
|
2157
2159
|
Table.Row = Row;
|
|
2158
2160
|
Table.Caption = Caption;
|
|
2159
2161
|
Table.Body.displayName = 'Table.Body';
|
|
2160
2162
|
Table.Cell.displayName = 'Table.Cell';
|
|
2161
2163
|
Table.Head.displayName = 'Table.Head';
|
|
2164
|
+
Table.Foot.displayName = 'Table.Foot';
|
|
2162
2165
|
Table.Row.displayName = 'Table.Row';
|
|
2163
2166
|
Table.Caption.displayName = 'Table.Caption';
|
|
2164
2167
|
|
|
@@ -2263,10 +2266,7 @@ const label = {
|
|
|
2263
2266
|
},
|
|
2264
2267
|
spacings: {
|
|
2265
2268
|
left: comfortable$5.small,
|
|
2266
|
-
right: comfortable$5.small,
|
|
2267
|
-
top: '6px',
|
|
2268
|
-
bottom: '6px'
|
|
2269
|
-
},
|
|
2269
|
+
right: comfortable$5.small},
|
|
2270
2270
|
states: {
|
|
2271
2271
|
disabled: {
|
|
2272
2272
|
typography: {
|
|
@@ -2286,27 +2286,23 @@ const Text$3 = styled__default.default.span.withConfig({
|
|
|
2286
2286
|
displayName: "Label__Text",
|
|
2287
2287
|
componentId: "sc-1gi2bcn-1"
|
|
2288
2288
|
})(["margin:0;"]);
|
|
2289
|
-
const Label$
|
|
2289
|
+
const Label$2 = /*#__PURE__*/react.forwardRef(function Label(props, ref) {
|
|
2290
2290
|
const {
|
|
2291
2291
|
label = '',
|
|
2292
2292
|
meta,
|
|
2293
2293
|
disabled = false,
|
|
2294
2294
|
...other
|
|
2295
2295
|
} = props;
|
|
2296
|
-
return (
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
children:
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
children: meta
|
|
2307
|
-
})]
|
|
2308
|
-
})
|
|
2309
|
-
);
|
|
2296
|
+
return /*#__PURE__*/ /* @TODO: Other props spread has to be at the end for downshift to create the for attribute */jsxRuntime.jsxs(LabelBase, {
|
|
2297
|
+
ref: ref,
|
|
2298
|
+
$disabledText: disabled,
|
|
2299
|
+
...other,
|
|
2300
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Text$3, {
|
|
2301
|
+
children: label
|
|
2302
|
+
}), meta && /*#__PURE__*/jsxRuntime.jsx(Text$3, {
|
|
2303
|
+
children: meta
|
|
2304
|
+
})]
|
|
2305
|
+
});
|
|
2310
2306
|
});
|
|
2311
2307
|
|
|
2312
2308
|
// Label.displayName = 'eds-text-field-label'
|
|
@@ -2328,15 +2324,11 @@ const helperText = {
|
|
|
2328
2324
|
comfortable: {
|
|
2329
2325
|
left: comfortable$4.small,
|
|
2330
2326
|
right: comfortable$4.small,
|
|
2331
|
-
top: comfortable$4.small,
|
|
2332
|
-
bottom: '6px'
|
|
2333
|
-
},
|
|
2327
|
+
top: comfortable$4.small},
|
|
2334
2328
|
compact: {
|
|
2335
2329
|
left: comfortable$4.small,
|
|
2336
2330
|
right: comfortable$4.small,
|
|
2337
|
-
top: comfortable$4.xx_small
|
|
2338
|
-
bottom: '6px'
|
|
2339
|
-
}
|
|
2331
|
+
top: comfortable$4.xx_small}
|
|
2340
2332
|
}
|
|
2341
2333
|
};
|
|
2342
2334
|
|
|
@@ -2560,7 +2552,7 @@ const HelperText$1 = styled__default.default(TextfieldHelperText).withConfig({
|
|
|
2560
2552
|
displayName: "InputWrapper__HelperText",
|
|
2561
2553
|
componentId: "sc-v6o9z1-1"
|
|
2562
2554
|
})(["margin-top:8px;margin-left:8px;"]);
|
|
2563
|
-
const Label$
|
|
2555
|
+
const Label$1 = styled__default.default(Label$2).withConfig({
|
|
2564
2556
|
displayName: "InputWrapper__Label",
|
|
2565
2557
|
componentId: "sc-v6o9z1-2"
|
|
2566
2558
|
})(["margin-left:8px;margin-right:8px;"]);
|
|
@@ -2595,7 +2587,7 @@ const InputWrapper$2 = /*#__PURE__*/react.forwardRef(function InputWrapper({
|
|
|
2595
2587
|
children: /*#__PURE__*/jsxRuntime.jsxs(Container$5, {
|
|
2596
2588
|
...other,
|
|
2597
2589
|
ref: ref,
|
|
2598
|
-
children: [hasLabel && /*#__PURE__*/jsxRuntime.jsx(Label$
|
|
2590
|
+
children: [hasLabel && /*#__PURE__*/jsxRuntime.jsx(Label$1, {
|
|
2599
2591
|
label,
|
|
2600
2592
|
...labelProps
|
|
2601
2593
|
}), children, hasHelperText && /*#__PURE__*/jsxRuntime.jsx(HelperText$1, {
|
|
@@ -3018,7 +3010,7 @@ const Field = /*#__PURE__*/react.forwardRef(function Field(props, ref) {
|
|
|
3018
3010
|
});
|
|
3019
3011
|
});
|
|
3020
3012
|
const TextField = /*#__PURE__*/react.forwardRef(function TextField({
|
|
3021
|
-
id,
|
|
3013
|
+
id: _id,
|
|
3022
3014
|
label,
|
|
3023
3015
|
meta,
|
|
3024
3016
|
unit,
|
|
@@ -3036,6 +3028,7 @@ const TextField = /*#__PURE__*/react.forwardRef(function TextField({
|
|
|
3036
3028
|
inputRef,
|
|
3037
3029
|
...other
|
|
3038
3030
|
}, ref) {
|
|
3031
|
+
const id = edsUtils.useId(_id, 'input');
|
|
3039
3032
|
const helperTextId = edsUtils.useId(null, 'helpertext');
|
|
3040
3033
|
const hasRightAdornments = Boolean(unit || inputIcon);
|
|
3041
3034
|
let fieldProps = {
|
|
@@ -3050,7 +3043,7 @@ const TextField = /*#__PURE__*/react.forwardRef(function TextField({
|
|
|
3050
3043
|
})]
|
|
3051
3044
|
}),
|
|
3052
3045
|
rowsMax,
|
|
3053
|
-
ref: inputRef || textareaRef,
|
|
3046
|
+
ref: ref || inputRef || textareaRef,
|
|
3054
3047
|
$multiline: multiline,
|
|
3055
3048
|
...other
|
|
3056
3049
|
};
|
|
@@ -3061,7 +3054,6 @@ const TextField = /*#__PURE__*/react.forwardRef(function TextField({
|
|
|
3061
3054
|
disabled
|
|
3062
3055
|
};
|
|
3063
3056
|
const containerProps = {
|
|
3064
|
-
ref,
|
|
3065
3057
|
className,
|
|
3066
3058
|
style: {
|
|
3067
3059
|
width: '100%',
|
|
@@ -3096,7 +3088,6 @@ const TextField = /*#__PURE__*/react.forwardRef(function TextField({
|
|
|
3096
3088
|
});
|
|
3097
3089
|
|
|
3098
3090
|
let _icons = {};
|
|
3099
|
-
let count = 0;
|
|
3100
3091
|
/** Add icons to library to be used for rendering using name.
|
|
3101
3092
|
This needs to be done lonly once */
|
|
3102
3093
|
const add = icons => {
|
|
@@ -3106,11 +3097,7 @@ const add = icons => {
|
|
|
3106
3097
|
};
|
|
3107
3098
|
};
|
|
3108
3099
|
const get = name => {
|
|
3109
|
-
|
|
3110
|
-
return {
|
|
3111
|
-
icon: _icons[name],
|
|
3112
|
-
count
|
|
3113
|
-
};
|
|
3100
|
+
return _icons[name];
|
|
3114
3101
|
};
|
|
3115
3102
|
|
|
3116
3103
|
const StyledSvg = styled__default.default.svg.attrs(({
|
|
@@ -3141,24 +3128,14 @@ const StyledPath$2 = styled__default.default.path.attrs(({
|
|
|
3141
3128
|
displayName: "Icon__StyledPath",
|
|
3142
3129
|
componentId: "sc-6evbi1-1"
|
|
3143
3130
|
})([""]);
|
|
3144
|
-
const customIcon = icon => ({
|
|
3145
|
-
icon,
|
|
3146
|
-
count: Math.floor(Math.random() * 1000)
|
|
3147
|
-
});
|
|
3148
3131
|
const findIcon = (name, data, size) => {
|
|
3149
3132
|
// eslint-disable-next-line prefer-const
|
|
3150
|
-
|
|
3151
|
-
icon,
|
|
3152
|
-
count
|
|
3153
|
-
} = data ? customIcon(data) : get(name);
|
|
3133
|
+
const icon = data ?? get(name);
|
|
3154
3134
|
if (size < 24) {
|
|
3155
3135
|
// fallback to normal icon if small is not made yet
|
|
3156
|
-
|
|
3136
|
+
return icon.sizes?.small || icon;
|
|
3157
3137
|
}
|
|
3158
|
-
return
|
|
3159
|
-
icon,
|
|
3160
|
-
count
|
|
3161
|
-
};
|
|
3138
|
+
return icon;
|
|
3162
3139
|
};
|
|
3163
3140
|
const Icon$2 = /*#__PURE__*/react.forwardRef(function Icon({
|
|
3164
3141
|
size,
|
|
@@ -3170,10 +3147,7 @@ const Icon$2 = /*#__PURE__*/react.forwardRef(function Icon({
|
|
|
3170
3147
|
...rest
|
|
3171
3148
|
}, ref) {
|
|
3172
3149
|
// eslint-disable-next-line prefer-const
|
|
3173
|
-
const
|
|
3174
|
-
icon,
|
|
3175
|
-
count
|
|
3176
|
-
} = findIcon(name, data, size);
|
|
3150
|
+
const icon = findIcon(name, data, size);
|
|
3177
3151
|
if (typeof icon === 'undefined') {
|
|
3178
3152
|
throw Error(`Icon "${name}" not found. Have you added it using Icon.add() or using data props?`);
|
|
3179
3153
|
}
|
|
@@ -3194,9 +3168,8 @@ const Icon$2 = /*#__PURE__*/react.forwardRef(function Icon({
|
|
|
3194
3168
|
};
|
|
3195
3169
|
|
|
3196
3170
|
// Accessibility
|
|
3197
|
-
|
|
3171
|
+
const titleId = edsUtils.useId(null, `${icon.prefix}-${icon.name}`);
|
|
3198
3172
|
if (title) {
|
|
3199
|
-
titleId = `${icon.prefix}-${icon.name}-${count}`;
|
|
3200
3173
|
svgProps = {
|
|
3201
3174
|
...svgProps,
|
|
3202
3175
|
title,
|
|
@@ -3449,16 +3422,17 @@ const AccordionItem = /*#__PURE__*/react.forwardRef(function AccordionItem({
|
|
|
3449
3422
|
...props
|
|
3450
3423
|
}, ref) {
|
|
3451
3424
|
const [expanded, setExpanded] = react.useState(isExpanded);
|
|
3452
|
-
const controlled = onExpandedChange
|
|
3425
|
+
const controlled = onExpandedChange !== undefined;
|
|
3453
3426
|
const activeExpandedState = controlled ? isExpanded : expanded;
|
|
3454
3427
|
const toggleExpanded = () => {
|
|
3428
|
+
if (disabled) return;
|
|
3455
3429
|
if (controlled) {
|
|
3456
|
-
onExpandedChange(!isExpanded);
|
|
3430
|
+
onExpandedChange?.(!isExpanded);
|
|
3457
3431
|
} else {
|
|
3458
3432
|
setExpanded(!expanded);
|
|
3459
3433
|
}
|
|
3460
3434
|
};
|
|
3461
|
-
const
|
|
3435
|
+
const processedChildren = react.Children.map(children, (child, childIndex) => {
|
|
3462
3436
|
const headerId = `${accordionId}-header-${index + 1}`;
|
|
3463
3437
|
const panelId = `${accordionId}-panel-${index + 1}`;
|
|
3464
3438
|
return childIndex === 0 ? /*#__PURE__*/react.cloneElement(child, {
|
|
@@ -3484,7 +3458,7 @@ const AccordionItem = /*#__PURE__*/react.forwardRef(function AccordionItem({
|
|
|
3484
3458
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3485
3459
|
...props,
|
|
3486
3460
|
ref: ref,
|
|
3487
|
-
children:
|
|
3461
|
+
children: processedChildren
|
|
3488
3462
|
});
|
|
3489
3463
|
});
|
|
3490
3464
|
|
|
@@ -3669,7 +3643,7 @@ const AccordionHeader$1 = /*#__PURE__*/react.forwardRef(function AccordionHeader
|
|
|
3669
3643
|
children: child
|
|
3670
3644
|
});
|
|
3671
3645
|
}
|
|
3672
|
-
if (
|
|
3646
|
+
if (/*#__PURE__*/react.isValidElement(child) && child.type === AccordionHeaderTitle) {
|
|
3673
3647
|
return /*#__PURE__*/react.cloneElement(child, {
|
|
3674
3648
|
isExpanded,
|
|
3675
3649
|
disabled
|
|
@@ -3681,7 +3655,7 @@ const AccordionHeader$1 = /*#__PURE__*/react.forwardRef(function AccordionHeader
|
|
|
3681
3655
|
return child;
|
|
3682
3656
|
});
|
|
3683
3657
|
const headerActions = react.Children.map(children, child => {
|
|
3684
|
-
if (
|
|
3658
|
+
if (/*#__PURE__*/react.isValidElement(child) && child.type === AccordionHeaderActions) {
|
|
3685
3659
|
return /*#__PURE__*/react.cloneElement(child, {
|
|
3686
3660
|
isExpanded,
|
|
3687
3661
|
disabled
|
|
@@ -4006,7 +3980,7 @@ const StyledTabList = styled__default.default.div.attrs(() => ({
|
|
|
4006
3980
|
})).withConfig({
|
|
4007
3981
|
displayName: "TabList__StyledTabList",
|
|
4008
3982
|
componentId: "sc-1g1p5i1-0"
|
|
4009
|
-
})(["display:grid;grid-auto-flow:column;grid-auto-columns:", ";overflow-x:", ";scroll-snap-type:x mandatory;overscroll-behavior-x:contain;@media (prefers-reduced-motion:no-preference){scroll-behavior:smooth;}@media (hover:none){overflow-x:scroll;-webkit-overflow-scrolling:touch;scrollbar-width:
|
|
3983
|
+
})(["display:grid;grid-auto-flow:column;grid-auto-columns:", ";overflow-x:", ";scroll-snap-type:x mandatory;overscroll-behavior-x:contain;@media (prefers-reduced-motion:no-preference){scroll-behavior:smooth;}@media (hover:none){overflow-x:scroll;-webkit-overflow-scrolling:touch;scrollbar-width:none;& ::-webkit-scrollbar{width:0;height:0;}}"], ({
|
|
4010
3984
|
$variant
|
|
4011
3985
|
}) => variants$1[$variant], ({
|
|
4012
3986
|
$scrollable
|
|
@@ -4023,7 +3997,7 @@ const TabList = /*#__PURE__*/react.forwardRef(function TabsList({
|
|
|
4023
3997
|
scrollable = false,
|
|
4024
3998
|
tabsFocused
|
|
4025
3999
|
} = react.useContext(TabsContext);
|
|
4026
|
-
const currentTab = react.useRef();
|
|
4000
|
+
const currentTab = react.useRef(0);
|
|
4027
4001
|
const [arrowNavigating, setArrowNavigating] = react.useState(false);
|
|
4028
4002
|
const selectedTabRef = react.useCallback(node => {
|
|
4029
4003
|
if (node !== null && tabsFocused || node !== null && arrowNavigating) {
|
|
@@ -4032,20 +4006,24 @@ const TabList = /*#__PURE__*/react.forwardRef(function TabsList({
|
|
|
4032
4006
|
}
|
|
4033
4007
|
}, [arrowNavigating, tabsFocused]);
|
|
4034
4008
|
const Tabs = react.Children.map(children, (child, $index) => {
|
|
4009
|
+
if (! /*#__PURE__*/react.isValidElement(child)) {
|
|
4010
|
+
return null;
|
|
4011
|
+
}
|
|
4035
4012
|
const childProps = child.props;
|
|
4036
4013
|
const controlledActive = childProps.value;
|
|
4037
4014
|
const isActive = controlledActive ? controlledActive === activeTab : $index === activeTab;
|
|
4038
|
-
const
|
|
4015
|
+
const childRef = childProps?.ref || null;
|
|
4016
|
+
const tabRef = isActive && childRef ? edsUtils.mergeRefs(childRef, selectedTabRef) : isActive ? selectedTabRef : childRef;
|
|
4039
4017
|
if (isActive) currentTab.current = $index;
|
|
4040
4018
|
return /*#__PURE__*/react.cloneElement(child, {
|
|
4041
4019
|
id: `${tabsId}-tab-${$index + 1}`,
|
|
4042
4020
|
'aria-controls': `${tabsId}-panel-${$index + 1}`,
|
|
4043
4021
|
active: isActive,
|
|
4044
4022
|
$index,
|
|
4045
|
-
onClick: () => handleChange($index),
|
|
4023
|
+
onClick: () => handleChange(controlledActive !== undefined ? controlledActive : $index),
|
|
4046
4024
|
ref: tabRef
|
|
4047
4025
|
});
|
|
4048
|
-
});
|
|
4026
|
+
}) ?? [];
|
|
4049
4027
|
const focusableChildren = Tabs.filter(child => {
|
|
4050
4028
|
const childProps = child.props;
|
|
4051
4029
|
return !childProps.disabled;
|
|
@@ -4132,7 +4110,7 @@ const TabPanels = /*#__PURE__*/react.forwardRef(function TabPanels({
|
|
|
4132
4110
|
tabsId
|
|
4133
4111
|
} = react.useContext(TabsContext);
|
|
4134
4112
|
const Panels = react.Children.map(children, (child, $index) => {
|
|
4135
|
-
if (conditionalRender && activeTab !== $index) return null;
|
|
4113
|
+
if (! /*#__PURE__*/react.isValidElement(child) || conditionalRender && activeTab !== $index) return null;
|
|
4136
4114
|
return /*#__PURE__*/react.cloneElement(child, {
|
|
4137
4115
|
id: `${tabsId}-panel-${$index + 1}`,
|
|
4138
4116
|
'aria-labelledby': `${tabsId}-tab-${$index + 1}`,
|
|
@@ -4327,7 +4305,7 @@ const CardActions = /*#__PURE__*/react.forwardRef(function CardActions({
|
|
|
4327
4305
|
};
|
|
4328
4306
|
return /*#__PURE__*/jsxRuntime.jsxs(StyledCardActions, {
|
|
4329
4307
|
...props,
|
|
4330
|
-
children: [children, meta !== '' && /*#__PURE__*/jsxRuntime.jsx(Typography
|
|
4308
|
+
children: [children, meta !== '' && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
4331
4309
|
variant: "caption",
|
|
4332
4310
|
children: meta
|
|
4333
4311
|
})]
|
|
@@ -4860,6 +4838,7 @@ const Scrim = /*#__PURE__*/react.forwardRef(function Scrim({
|
|
|
4860
4838
|
...rest
|
|
4861
4839
|
}, ref) {
|
|
4862
4840
|
const scrimRef = react.useRef(null);
|
|
4841
|
+
edsUtils.useHideBodyScroll(open);
|
|
4863
4842
|
const combinedScrimRef = react.useMemo(() => edsUtils.mergeRefs(scrimRef, ref), [scrimRef, ref]);
|
|
4864
4843
|
edsUtils.useGlobalKeyPress('Escape', () => {
|
|
4865
4844
|
if (isDismissable && onClose && open) {
|
|
@@ -4877,7 +4856,6 @@ const Scrim = /*#__PURE__*/react.forwardRef(function Scrim({
|
|
|
4877
4856
|
return null;
|
|
4878
4857
|
}
|
|
4879
4858
|
return /*#__PURE__*/jsxRuntime.jsx(StyledScrim, {
|
|
4880
|
-
lockScroll: true,
|
|
4881
4859
|
onMouseDown: handleMouseClose,
|
|
4882
4860
|
ref: combinedScrimRef,
|
|
4883
4861
|
...rest,
|
|
@@ -5006,7 +4984,7 @@ const TocList = styled__default.default(List$1).withConfig({
|
|
|
5006
4984
|
displayName: "TableOfContents__TocList",
|
|
5007
4985
|
componentId: "sc-q23s6y-1"
|
|
5008
4986
|
})(["margin:0;padding:0;"]);
|
|
5009
|
-
const TocLabel = styled__default.default(Typography
|
|
4987
|
+
const TocLabel = styled__default.default(Typography).withConfig({
|
|
5010
4988
|
displayName: "TableOfContents__TocLabel",
|
|
5011
4989
|
componentId: "sc-q23s6y-2"
|
|
5012
4990
|
})(({
|
|
@@ -5130,7 +5108,7 @@ const StyledSideSheet = styled__default.default.div.withConfig({
|
|
|
5130
5108
|
const Header$1 = styled__default.default.div.withConfig({
|
|
5131
5109
|
displayName: "SideSheet__Header",
|
|
5132
5110
|
componentId: "sc-wkzlnn-1"
|
|
5133
|
-
})(["display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;padding-bottom:24px;padding-right:10px;& > button{margin-left:auto;}"]);
|
|
5111
|
+
})(["display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;padding-bottom:24px;padding-right:10px;& > button{margin-left:auto;flex-shrink:0;}"]);
|
|
5134
5112
|
const SideSheet = /*#__PURE__*/react.forwardRef(function SideSheet({
|
|
5135
5113
|
variant = 'medium',
|
|
5136
5114
|
width,
|
|
@@ -5148,7 +5126,7 @@ const SideSheet = /*#__PURE__*/react.forwardRef(function SideSheet({
|
|
|
5148
5126
|
return open && /*#__PURE__*/jsxRuntime.jsxs(StyledSideSheet, {
|
|
5149
5127
|
...props,
|
|
5150
5128
|
children: [(title || onClose) && /*#__PURE__*/jsxRuntime.jsxs(Header$1, {
|
|
5151
|
-
children: [title && /*#__PURE__*/jsxRuntime.jsx(Typography
|
|
5129
|
+
children: [title && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
5152
5130
|
variant: "h2",
|
|
5153
5131
|
children: title
|
|
5154
5132
|
}), onClose && /*#__PURE__*/jsxRuntime.jsx(Button$1, {
|
|
@@ -5637,11 +5615,9 @@ const slider = {
|
|
|
5637
5615
|
background: indicatorColor,
|
|
5638
5616
|
states: {
|
|
5639
5617
|
hover: {
|
|
5640
|
-
|
|
5641
|
-
},
|
|
5618
|
+
},
|
|
5642
5619
|
disabled: {
|
|
5643
|
-
|
|
5644
|
-
}
|
|
5620
|
+
}
|
|
5645
5621
|
}
|
|
5646
5622
|
}
|
|
5647
5623
|
},
|
|
@@ -5693,7 +5669,6 @@ const slider = {
|
|
|
5693
5669
|
hover: {
|
|
5694
5670
|
background: primaryHoverAlt$3,
|
|
5695
5671
|
border: {
|
|
5696
|
-
type: 'border',
|
|
5697
5672
|
color: primaryHover$1
|
|
5698
5673
|
}
|
|
5699
5674
|
}
|
|
@@ -5718,7 +5693,6 @@ const slider = {
|
|
|
5718
5693
|
disabled: {
|
|
5719
5694
|
background: backgroundColorDisabled,
|
|
5720
5695
|
border: {
|
|
5721
|
-
type: 'border',
|
|
5722
5696
|
color: backgroundColorMedium$1
|
|
5723
5697
|
}
|
|
5724
5698
|
}
|
|
@@ -5778,9 +5752,9 @@ const {
|
|
|
5778
5752
|
} = slider;
|
|
5779
5753
|
const track$1 = styled.css(["width:100%;height:100%;cursor:pointer;background:none;"]);
|
|
5780
5754
|
const thumb = styled.css(["", " height:", ";width:", ";background:", ";cursor:pointer;position:relative;z-index:1;"], edsUtils.bordersTemplate(handle$1.border), handle$1.height, handle$1.width, handle$1.background);
|
|
5781
|
-
const thumbHover = styled.css(["@media (hover:hover) and (pointer:fine){box-shadow:0px 0px 0px 6px ", ";border-color:", ";}"], handle$1.states.hover.background, handle$1.states.hover.border.
|
|
5755
|
+
const thumbHover = styled.css(["@media (hover:hover) and (pointer:fine){box-shadow:0px 0px 0px 6px ", ";border-color:", ";}"], handle$1.states.hover.background, handle$1.states.hover.border.color);
|
|
5782
5756
|
const thumbHoverAndDisabled = styled.css(["@media (hover:hover) and (pointer:fine){cursor:not-allowed;box-shadow:none;}"]);
|
|
5783
|
-
const thumbDisabled = styled.css(["background-color:", ";border-color:", ";"], _disabled.background, _disabled.border.
|
|
5757
|
+
const thumbDisabled = styled.css(["background-color:", ";border-color:", ";"], _disabled.background, _disabled.border.color);
|
|
5784
5758
|
const StyledSliderInput = styled__default.default.input.attrs(() => ({
|
|
5785
5759
|
type: 'range'
|
|
5786
5760
|
})).withConfig({
|
|
@@ -5829,10 +5803,9 @@ const {
|
|
|
5829
5803
|
output
|
|
5830
5804
|
}
|
|
5831
5805
|
} = slider;
|
|
5832
|
-
const
|
|
5833
|
-
const
|
|
5834
|
-
|
|
5835
|
-
});
|
|
5806
|
+
const encodedTrackColor = encodeURIComponent(track.background);
|
|
5807
|
+
const encodedHoverColor = encodeURIComponent(track.states.hover.background);
|
|
5808
|
+
const fakeTrackBg = styled.css(["background-image:url(\"data:image/svg+xml,<svg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'><rect x='0' y='11' fill='", "' width='100%' height='4' rx='2' /></svg>\");background-size:cover;background-repeat:no-repeat;"], encodedTrackColor);
|
|
5836
5809
|
const trackFill = styled.css(["grid-column:1 / span 2;grid-row:2;height:", ";margin-bottom:", ";align-self:end;content:'';"], track.height, track.spacings.bottom);
|
|
5837
5810
|
const wrapperGrid = styled.css(["display:grid;grid-template-rows:max-content 24px;grid-template-columns:1fr 1fr;width:100%;position:relative;"]);
|
|
5838
5811
|
const RangeWrapper = styled__default.default.div.attrs(({
|
|
@@ -5853,13 +5826,14 @@ const RangeWrapper = styled__default.default.div.attrs(({
|
|
|
5853
5826
|
'--max': $max,
|
|
5854
5827
|
'--showTooltip': $labelAlwaysOn ? 1 : 0,
|
|
5855
5828
|
'--background': $disabled ? track.entities.indicator.states.disabled.background : $hideActiveTrack ? 'transparent' : track.entities.indicator.background,
|
|
5856
|
-
'--background-hover': $hideActiveTrack ? 'transparent' : track.entities.indicator.states.hover.background,
|
|
5857
5829
|
...style
|
|
5858
5830
|
}
|
|
5859
5831
|
})).withConfig({
|
|
5860
5832
|
displayName: "Slider__RangeWrapper",
|
|
5861
5833
|
componentId: "sc-n1grrg-0"
|
|
5862
|
-
})(["--dif:calc(var(--max) - var(--min));--realWidth:calc(100% - 12px);", " ", " &::before,&::after{", ";background:var(--background);}&::before{margin-left:calc( calc(", " / 2) + (var(--a) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--b) - var(--a)) / var(--dif) * var(--realWidth));}&::after{margin-left:calc( calc(", " / 2) + (var(--b) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--a) - var(--b)) / var(--dif) * var(--realWidth));}&:has(:focus-visible),&:hover{& > output{--showTooltip:1;--tooltip-background:", ";}}@media (hover:hover) and (pointer:fine){&:hover:not([data-disabled]){", "
|
|
5834
|
+
})(["--dif:calc(var(--max) - var(--min));--realWidth:calc(100% - 12px);", " ", " &::before,&::after{", ";background:var(--background);}&::before{margin-left:calc( calc(", " / 2) + (var(--a) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--b) - var(--a)) / var(--dif) * var(--realWidth));}&::after{margin-left:calc( calc(", " / 2) + (var(--b) - var(--min)) / var(--dif) * var(--realWidth) );width:calc((var(--a) - var(--b)) / var(--dif) * var(--realWidth));}&:has(:focus-visible),&:hover{& > output{--showTooltip:1;--tooltip-background:", ";}}@media (hover:hover) and (pointer:fine){&:hover:not([data-disabled]){background-image:url(\"data:image/svg+xml,<svg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'><rect x='0' y='11' fill='", "' width='100%' height='4' rx='2' /></svg>\");&::before,&::after{background:", ";}}}", ";", ";"], wrapperGrid, fakeTrackBg, trackFill, handle.width, handle.width, output.states.hover.background, encodedHoverColor, ({
|
|
5835
|
+
$hideActiveTrack
|
|
5836
|
+
}) => $hideActiveTrack ? 'transparent' : track.entities.indicator.states.hover.background, ({
|
|
5863
5837
|
$touchNavigation
|
|
5864
5838
|
}) => $touchNavigation && styled.css(["& > input[type='range']{pointer-events:none;}& > input[type='range']::-webkit-slider-thumb{pointer-events:auto;}& > input[type='range']::-moz-range-thumb{pointer-events:auto;}"]), ({
|
|
5865
5839
|
$labelBelow
|
|
@@ -5880,13 +5854,14 @@ const Wrapper = styled__default.default.div.attrs(({
|
|
|
5880
5854
|
'--value': value,
|
|
5881
5855
|
'--showTooltip': $labelAlwaysOn ? 1 : 0,
|
|
5882
5856
|
'--background': $disabled ? track.entities.indicator.states.disabled.background : $hideActiveTrack ? 'transparent' : track.entities.indicator.background,
|
|
5883
|
-
'--background-hover': $hideActiveTrack ? 'transparent' : track.entities.indicator.states.hover.background,
|
|
5884
5857
|
...style
|
|
5885
5858
|
}
|
|
5886
5859
|
})).withConfig({
|
|
5887
5860
|
displayName: "Slider__Wrapper",
|
|
5888
5861
|
componentId: "sc-n1grrg-1"
|
|
5889
|
-
})(["--dif:calc(var(--max) - var(--min));--realWidth:calc(100% - 12px);", " ", " &::after{", " background:var(--background)}&::after{margin-right:calc( (var(--max) - var(--value)) / var(--dif) * var(--realWidth) );margin-left:3px;}&:has(:focus-visible),&:hover{& > output{--showTooltip:1;--tooltip-background:", ";}}@media (hover:hover) and (pointer:fine){&:hover:not([data-disabled]){", "
|
|
5862
|
+
})(["--dif:calc(var(--max) - var(--min));--realWidth:calc(100% - 12px);", " ", " &::after{", " background:var(--background)}&::after{margin-right:calc( (var(--max) - var(--value)) / var(--dif) * var(--realWidth) );margin-left:3px;}&:has(:focus-visible),&:hover{& > output{--showTooltip:1;--tooltip-background:", ";}}@media (hover:hover) and (pointer:fine){&:hover:not([data-disabled]){background-image:url(\"data:image/svg+xml,<svg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'><rect x='0' y='11' fill='", "' width='100%' height='4' rx='2' /></svg>\");&::after{background:", ";}}", ";}"], wrapperGrid, fakeTrackBg, trackFill, output.states.hover.background, encodedHoverColor, ({
|
|
5863
|
+
$hideActiveTrack
|
|
5864
|
+
}) => $hideActiveTrack ? 'transparent' : track.entities.indicator.states.hover.background, ({
|
|
5890
5865
|
$labelBelow
|
|
5891
5866
|
}) => $labelBelow && styled.css(["& > output{top:calc(100% + 1px);bottom:unset;}"]));
|
|
5892
5867
|
const WrapperGroupLabel = styled__default.default.div.withConfig({
|
|
@@ -6264,20 +6239,30 @@ const snackbar = {
|
|
|
6264
6239
|
}
|
|
6265
6240
|
};
|
|
6266
6241
|
|
|
6267
|
-
const
|
|
6268
|
-
|
|
6242
|
+
const PopoverDiv = styled__default.default('div').withConfig({
|
|
6243
|
+
shouldForwardProp: () => true //workaround to avoid warning until popover gets added to react types
|
|
6244
|
+
,
|
|
6245
|
+
displayName: "Snackbar__PopoverDiv",
|
|
6269
6246
|
componentId: "sc-ac6no8-0"
|
|
6270
6247
|
})(({
|
|
6271
6248
|
theme,
|
|
6272
6249
|
$placement
|
|
6273
6250
|
}) => {
|
|
6274
|
-
return styled.css(["
|
|
6251
|
+
return styled.css(["inset:unset;border:0;overflow:visible;position:fixed;padding:0;background-color:transparent;", " &::backdrop{background-color:transparent;}"], {
|
|
6275
6252
|
top: $placement.includes('top') ? theme.spacings.top : $placement === 'left' || $placement === 'right' ? '50%' : undefined,
|
|
6276
6253
|
bottom: $placement.includes('bottom') ? theme.spacings.bottom : undefined,
|
|
6277
6254
|
right: $placement.includes('right') ? theme.spacings.right : undefined,
|
|
6278
6255
|
left: $placement.includes('left') ? theme.spacings.left : $placement === 'top' || $placement === 'bottom' ? '50%' : undefined,
|
|
6279
6256
|
transform: $placement === 'left' || $placement === 'right' ? 'translateY(-50%)' : $placement === 'top' || $placement === 'bottom' ? 'translateX(-50%)' : undefined
|
|
6280
|
-
}
|
|
6257
|
+
});
|
|
6258
|
+
});
|
|
6259
|
+
const StyledSnackbar = styled__default.default(Paper).withConfig({
|
|
6260
|
+
displayName: "Snackbar__StyledSnackbar",
|
|
6261
|
+
componentId: "sc-ac6no8-1"
|
|
6262
|
+
})(({
|
|
6263
|
+
theme
|
|
6264
|
+
}) => {
|
|
6265
|
+
return styled.css(["background-color:", ";", " ", " ", " min-height:", ";box-sizing:border-box;a,button{color:", ";}"], theme.background, edsUtils.spacingsTemplate(theme.spacings), edsUtils.bordersTemplate(theme.border), edsUtils.typographyTemplate(theme.typography), theme.minHeight, theme.entities.button.typography.color);
|
|
6281
6266
|
});
|
|
6282
6267
|
const Snackbar$1 = /*#__PURE__*/react.forwardRef(function Snackbar({
|
|
6283
6268
|
open = false,
|
|
@@ -6288,7 +6273,7 @@ const Snackbar$1 = /*#__PURE__*/react.forwardRef(function Snackbar({
|
|
|
6288
6273
|
...rest
|
|
6289
6274
|
}, ref) {
|
|
6290
6275
|
const [visible, setVisible] = react.useState(open);
|
|
6291
|
-
const timer = react.useRef();
|
|
6276
|
+
const timer = react.useRef(null);
|
|
6292
6277
|
react.useEffect(() => {
|
|
6293
6278
|
setVisible(open);
|
|
6294
6279
|
if (open) {
|
|
@@ -6300,10 +6285,10 @@ const Snackbar$1 = /*#__PURE__*/react.forwardRef(function Snackbar({
|
|
|
6300
6285
|
}, autoHideDuration);
|
|
6301
6286
|
}
|
|
6302
6287
|
return () => clearTimeout(timer.current);
|
|
6303
|
-
|
|
6288
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6289
|
+
}, [open, autoHideDuration]);
|
|
6304
6290
|
const props = {
|
|
6305
6291
|
ref,
|
|
6306
|
-
$placement: placement,
|
|
6307
6292
|
...rest
|
|
6308
6293
|
};
|
|
6309
6294
|
const {
|
|
@@ -6314,12 +6299,19 @@ const Snackbar$1 = /*#__PURE__*/react.forwardRef(function Snackbar({
|
|
|
6314
6299
|
}, snackbar);
|
|
6315
6300
|
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
6316
6301
|
theme: token,
|
|
6317
|
-
children: visible && /*#__PURE__*/
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6302
|
+
children: visible && /*#__PURE__*/jsxRuntime.jsx(PopoverDiv, {
|
|
6303
|
+
popover: "manual",
|
|
6304
|
+
$placement: placement,
|
|
6305
|
+
ref: el => {
|
|
6306
|
+
el?.showPopover();
|
|
6307
|
+
},
|
|
6308
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledSnackbar, {
|
|
6309
|
+
role: "alert",
|
|
6310
|
+
elevation: "overlay",
|
|
6311
|
+
...props,
|
|
6312
|
+
children: children
|
|
6313
|
+
})
|
|
6314
|
+
})
|
|
6323
6315
|
});
|
|
6324
6316
|
});
|
|
6325
6317
|
|
|
@@ -6422,19 +6414,25 @@ const PopoverPaper = styled__default.default(Paper).withConfig({
|
|
|
6422
6414
|
paper
|
|
6423
6415
|
}
|
|
6424
6416
|
} = theme;
|
|
6425
|
-
return styled.css(["", " background:", ";", "
|
|
6417
|
+
return styled.css(["position:relative;", " background:", ";", " &:focus-visible{", "}"], edsUtils.typographyTemplate(theme.typography), theme.background, edsUtils.bordersTemplate(theme.border), edsUtils.outlineTemplate(paper.states.focus.outline));
|
|
6426
6418
|
});
|
|
6419
|
+
const StyledPopover$2 = styled__default.default('div').withConfig({
|
|
6420
|
+
shouldForwardProp: () => true //workaround to avoid warning until popover gets added to react types
|
|
6421
|
+
}).withConfig({
|
|
6422
|
+
displayName: "Popover__StyledPopover",
|
|
6423
|
+
componentId: "sc-b7p1is-1"
|
|
6424
|
+
})(["inset:unset;border:0;padding:0;margin:0;overflow:visible;background-color:transparent;&::backdrop{background-color:transparent;}"]);
|
|
6427
6425
|
const ArrowWrapper = styled__default.default.div.withConfig({
|
|
6428
6426
|
displayName: "Popover__ArrowWrapper",
|
|
6429
|
-
componentId: "sc-b7p1is-
|
|
6427
|
+
componentId: "sc-b7p1is-2"
|
|
6430
6428
|
})(({
|
|
6431
6429
|
theme
|
|
6432
6430
|
}) => {
|
|
6433
|
-
return styled.css(["position:absolute;width:", ";height:", ";
|
|
6431
|
+
return styled.css(["position:absolute;width:", ";height:", ";"], theme.entities.arrow.width, theme.entities.arrow.height);
|
|
6434
6432
|
});
|
|
6435
6433
|
const InnerWrapper = styled__default.default.div.withConfig({
|
|
6436
6434
|
displayName: "Popover__InnerWrapper",
|
|
6437
|
-
componentId: "sc-b7p1is-
|
|
6435
|
+
componentId: "sc-b7p1is-3"
|
|
6438
6436
|
})(({
|
|
6439
6437
|
theme
|
|
6440
6438
|
}) => {
|
|
@@ -6442,7 +6440,7 @@ const InnerWrapper = styled__default.default.div.withConfig({
|
|
|
6442
6440
|
});
|
|
6443
6441
|
const PopoverArrow = styled__default.default.svg.withConfig({
|
|
6444
6442
|
displayName: "Popover__PopoverArrow",
|
|
6445
|
-
componentId: "sc-b7p1is-
|
|
6443
|
+
componentId: "sc-b7p1is-4"
|
|
6446
6444
|
})(({
|
|
6447
6445
|
theme
|
|
6448
6446
|
}) => {
|
|
@@ -6459,6 +6457,9 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
|
|
|
6459
6457
|
trapFocus,
|
|
6460
6458
|
...rest
|
|
6461
6459
|
}, ref) {
|
|
6460
|
+
if (withinPortal) {
|
|
6461
|
+
console.warn('Popover "withinPortal" prop has been deprecated. Popover now uses the native popover api');
|
|
6462
|
+
}
|
|
6462
6463
|
const arrowRef = react.useRef(null);
|
|
6463
6464
|
const {
|
|
6464
6465
|
x,
|
|
@@ -6466,6 +6467,7 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
|
|
|
6466
6467
|
refs,
|
|
6467
6468
|
strategy,
|
|
6468
6469
|
context,
|
|
6470
|
+
elements,
|
|
6469
6471
|
middlewareData: {
|
|
6470
6472
|
arrow: {
|
|
6471
6473
|
x: arrowX,
|
|
@@ -6491,6 +6493,16 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
|
|
|
6491
6493
|
const {
|
|
6492
6494
|
getFloatingProps
|
|
6493
6495
|
} = react$1.useInteractions([react$1.useDismiss(context)]);
|
|
6496
|
+
react.useEffect(() => {
|
|
6497
|
+
if (!elements.floating) return;
|
|
6498
|
+
if (open) {
|
|
6499
|
+
if (elements.floating.isConnected) {
|
|
6500
|
+
elements.floating.showPopover();
|
|
6501
|
+
}
|
|
6502
|
+
} else {
|
|
6503
|
+
elements.floating.hidePopover();
|
|
6504
|
+
}
|
|
6505
|
+
}, [open, elements.floating]);
|
|
6494
6506
|
react.useEffect(() => {
|
|
6495
6507
|
if (arrowRef.current) {
|
|
6496
6508
|
const staticSide = {
|
|
@@ -6526,7 +6538,6 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
|
|
|
6526
6538
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6527
6539
|
}, [arrowRef.current, arrowX, arrowY, finalPlacement]);
|
|
6528
6540
|
const props = {
|
|
6529
|
-
open,
|
|
6530
6541
|
...rest
|
|
6531
6542
|
};
|
|
6532
6543
|
const {
|
|
@@ -6535,14 +6546,10 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
|
|
|
6535
6546
|
const token = edsUtils.useToken({
|
|
6536
6547
|
density
|
|
6537
6548
|
}, popover);
|
|
6538
|
-
|
|
6539
|
-
//temporary fix when inside dialog. Should be replaced by popover api when it is ready
|
|
6540
|
-
const inDialog = edsUtils.useIsInDialog(anchorEl);
|
|
6541
6549
|
const popover$1 = /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
6542
6550
|
theme: token,
|
|
6543
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
6544
|
-
|
|
6545
|
-
...props,
|
|
6551
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledPopover$2, {
|
|
6552
|
+
popover: "manual",
|
|
6546
6553
|
...getFloatingProps({
|
|
6547
6554
|
ref: popoverRef,
|
|
6548
6555
|
style: {
|
|
@@ -6552,35 +6559,30 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
|
|
|
6552
6559
|
left: x || 0
|
|
6553
6560
|
}
|
|
6554
6561
|
}),
|
|
6555
|
-
children:
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(PopoverPaper, {
|
|
6563
|
+
elevation: "overlay",
|
|
6564
|
+
...props,
|
|
6565
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ArrowWrapper, {
|
|
6566
|
+
ref: arrowRef,
|
|
6567
|
+
className: "arrow",
|
|
6568
|
+
children: /*#__PURE__*/jsxRuntime.jsx(PopoverArrow, {
|
|
6569
|
+
className: "arrowSvg",
|
|
6570
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
6571
|
+
d: "M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"
|
|
6572
|
+
})
|
|
6562
6573
|
})
|
|
6563
|
-
})
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
})
|
|
6574
|
+
}), /*#__PURE__*/jsxRuntime.jsx(InnerWrapper, {
|
|
6575
|
+
children: children
|
|
6576
|
+
})]
|
|
6577
|
+
})
|
|
6567
6578
|
})
|
|
6568
6579
|
});
|
|
6569
6580
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
6570
|
-
children:
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
children: popover$1
|
|
6576
|
-
}) : open && popover$1
|
|
6577
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
6578
|
-
children: trapFocus ? open && /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingFocusManager, {
|
|
6579
|
-
context: context,
|
|
6580
|
-
modal: true,
|
|
6581
|
-
children: popover$1
|
|
6582
|
-
}) : open && popover$1
|
|
6583
|
-
})
|
|
6581
|
+
children: trapFocus ? open && /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingFocusManager, {
|
|
6582
|
+
context: context,
|
|
6583
|
+
modal: true,
|
|
6584
|
+
children: popover$1
|
|
6585
|
+
}) : open && popover$1
|
|
6584
6586
|
});
|
|
6585
6587
|
});
|
|
6586
6588
|
|
|
@@ -6877,7 +6879,7 @@ const Banner$1 = /*#__PURE__*/react.forwardRef(function Banner({
|
|
|
6877
6879
|
});
|
|
6878
6880
|
});
|
|
6879
6881
|
|
|
6880
|
-
const StyledBannerMessage = styled__default.default(Typography
|
|
6882
|
+
const StyledBannerMessage = styled__default.default(Typography).withConfig({
|
|
6881
6883
|
displayName: "BannerMessage__StyledBannerMessage",
|
|
6882
6884
|
componentId: "sc-1lfqos1-0"
|
|
6883
6885
|
})([""]);
|
|
@@ -7383,11 +7385,11 @@ const ListItem$1 = styled__default.default.li.withConfig({
|
|
|
7383
7385
|
displayName: "Breadcrumbs__ListItem",
|
|
7384
7386
|
componentId: "sc-12awlbz-1"
|
|
7385
7387
|
})(["display:block;min-width:30px;"]);
|
|
7386
|
-
const Separator = styled__default.default(Typography
|
|
7388
|
+
const Separator = styled__default.default(Typography).withConfig({
|
|
7387
7389
|
displayName: "Breadcrumbs__Separator",
|
|
7388
7390
|
componentId: "sc-12awlbz-2"
|
|
7389
7391
|
})(["color:", ";", " display:block;line-height:1;display:flex;& > svg{margin-inline:-9px;}"], typography$5.color, edsUtils.spacingsTemplate(spacings));
|
|
7390
|
-
const Collapsed = styled__default.default(Typography
|
|
7392
|
+
const Collapsed = styled__default.default(Typography).withConfig({
|
|
7391
7393
|
displayName: "Breadcrumbs__Collapsed",
|
|
7392
7394
|
componentId: "sc-12awlbz-3"
|
|
7393
7395
|
})(["@media (hover:hover) and (pointer:fine){&:hover{text-decoration:underline;color:", ";}}color:", ";text-decoration:none;"], states$1.hover.typography.color, typography$5.color);
|
|
@@ -7469,7 +7471,7 @@ const {
|
|
|
7469
7471
|
states,
|
|
7470
7472
|
typography: typography$4
|
|
7471
7473
|
} = breadcrumbs;
|
|
7472
|
-
const StyledTypography = styled__default.default(Typography
|
|
7474
|
+
const StyledTypography = styled__default.default(Typography).withConfig({
|
|
7473
7475
|
displayName: "Breadcrumb__StyledTypography",
|
|
7474
7476
|
componentId: "sc-10nvwte-0"
|
|
7475
7477
|
})(["@media (hover:hover) and (pointer:fine){&:hover{text-decoration:underline;color:", ";cursor:pointer;}}white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:1;text-decoration:none;color:", ";width:100%;", ""], states.hover.typography.color, typography$4.color, ({
|
|
@@ -7490,7 +7492,7 @@ const Breadcrumb = /*#__PURE__*/react.forwardRef(function Breadcrumb({
|
|
|
7490
7492
|
href,
|
|
7491
7493
|
ref
|
|
7492
7494
|
};
|
|
7493
|
-
const showTooltip = maxWidth > 0 || forceTooltip;
|
|
7495
|
+
const showTooltip = maxWidth !== undefined && maxWidth > 0 || forceTooltip === true;
|
|
7494
7496
|
const isHrefDefined = href !== undefined;
|
|
7495
7497
|
const forwardedAs = react.useMemo(() => as ? as : isHrefDefined ? 'a' : 'span', [as, isHrefDefined]);
|
|
7496
7498
|
const crumb = /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
|
|
@@ -7504,7 +7506,12 @@ const Breadcrumb = /*#__PURE__*/react.forwardRef(function Breadcrumb({
|
|
|
7504
7506
|
return showTooltip ? /*#__PURE__*/jsxRuntime.jsx(Tooltip$2, {
|
|
7505
7507
|
title: children,
|
|
7506
7508
|
placement: "top",
|
|
7507
|
-
children:
|
|
7509
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7510
|
+
style: {
|
|
7511
|
+
display: 'inline-block'
|
|
7512
|
+
},
|
|
7513
|
+
children: crumb
|
|
7514
|
+
})
|
|
7508
7515
|
}) : crumb;
|
|
7509
7516
|
});
|
|
7510
7517
|
|
|
@@ -7760,6 +7767,7 @@ const MenuItem$1 = /*#__PURE__*/react.forwardRef(function MenuItem({
|
|
|
7760
7767
|
return /*#__PURE__*/jsxRuntime.jsx(Item, {
|
|
7761
7768
|
...props,
|
|
7762
7769
|
$active: active,
|
|
7770
|
+
type: "button",
|
|
7763
7771
|
ref: edsUtils.mergeRefs(ref, el => {
|
|
7764
7772
|
if (isFocused) {
|
|
7765
7773
|
requestAnimationFrame(() => {
|
|
@@ -7771,9 +7779,9 @@ const MenuItem$1 = /*#__PURE__*/react.forwardRef(function MenuItem({
|
|
|
7771
7779
|
onClick: e => {
|
|
7772
7780
|
if (onClick) {
|
|
7773
7781
|
onClick(e);
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7782
|
+
}
|
|
7783
|
+
if (onClose !== null && closeMenuOnClick) {
|
|
7784
|
+
onClose(e);
|
|
7777
7785
|
}
|
|
7778
7786
|
},
|
|
7779
7787
|
children: /*#__PURE__*/jsxRuntime.jsx(Content, {
|
|
@@ -7801,7 +7809,8 @@ const MenuSection = /*#__PURE__*/react.memo(function MenuSection(props) {
|
|
|
7801
7809
|
variant: "small"
|
|
7802
7810
|
})
|
|
7803
7811
|
}), title && /*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
7804
|
-
|
|
7812
|
+
role: "group",
|
|
7813
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
7805
7814
|
group: "navigation",
|
|
7806
7815
|
variant: "label",
|
|
7807
7816
|
children: title
|
|
@@ -7817,11 +7826,11 @@ const List = styled__default.default.div.withConfig({
|
|
|
7817
7826
|
componentId: "sc-104rzof-0"
|
|
7818
7827
|
})(["position:relative;list-style:none;display:flex;flex-direction:column;margin:0;", " li:first-child{z-index:3;}"], edsUtils.spacingsTemplate(menu.spacings));
|
|
7819
7828
|
function isIndexable(item) {
|
|
7820
|
-
if (
|
|
7829
|
+
if (/*#__PURE__*/react.isValidElement(item) && !item.props.disabled && item.type === MenuItem$1) return true;
|
|
7821
7830
|
return false;
|
|
7822
7831
|
}
|
|
7823
7832
|
function closeMenuOnClick(item) {
|
|
7824
|
-
if (
|
|
7833
|
+
if (/*#__PURE__*/react.isValidElement(item) && item.type === MenuItem$1 && item.props.closeMenuOnClick !== false) return true;
|
|
7825
7834
|
return false;
|
|
7826
7835
|
}
|
|
7827
7836
|
const MenuList = /*#__PURE__*/react.forwardRef(function MenuList({
|
|
@@ -7911,11 +7920,13 @@ const {
|
|
|
7911
7920
|
const MenuPaper = styled__default.default(Paper).withConfig({
|
|
7912
7921
|
displayName: "Menu__MenuPaper",
|
|
7913
7922
|
componentId: "sc-1vlnqcj-0"
|
|
7914
|
-
})(["
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7923
|
+
})(["width:100%;min-width:fit-content;", ";"], edsUtils.bordersTemplate(border$1));
|
|
7924
|
+
const StyledPopover$1 = styled__default.default('div').withConfig({
|
|
7925
|
+
shouldForwardProp: () => true //workaround to avoid warning until popover gets added to react types
|
|
7926
|
+
}).withConfig({
|
|
7927
|
+
displayName: "Menu__StyledPopover",
|
|
7928
|
+
componentId: "sc-1vlnqcj-1"
|
|
7929
|
+
})(["inset:unset;border:0;padding:0;margin:0;overflow:visible;background-color:transparent;&::backdrop{background-color:transparent;}"]);
|
|
7919
7930
|
const MenuContainer = /*#__PURE__*/react.forwardRef(function MenuContainer({
|
|
7920
7931
|
children,
|
|
7921
7932
|
anchorEl,
|
|
@@ -8044,13 +8055,19 @@ const Menu$1 = /*#__PURE__*/react.forwardRef(function Menu({
|
|
|
8044
8055
|
return react$1.autoUpdate(refs.reference.current, refs.floating.current, update);
|
|
8045
8056
|
}
|
|
8046
8057
|
}, [refs.reference, refs.floating, update, open]);
|
|
8058
|
+
edsUtils.useIsomorphicLayoutEffect(() => {
|
|
8059
|
+
if (open) {
|
|
8060
|
+
refs.floating.current?.showPopover();
|
|
8061
|
+
} else {
|
|
8062
|
+
refs.floating.current?.hidePopover();
|
|
8063
|
+
}
|
|
8064
|
+
}, [open, refs.floating]);
|
|
8047
8065
|
const {
|
|
8048
8066
|
getFloatingProps
|
|
8049
8067
|
} = react$1.useInteractions([react$1.useDismiss(context, {
|
|
8050
8068
|
escapeKey: false
|
|
8051
8069
|
})]);
|
|
8052
8070
|
const props = {
|
|
8053
|
-
open,
|
|
8054
8071
|
className
|
|
8055
8072
|
};
|
|
8056
8073
|
const menuProps = {
|
|
@@ -8059,14 +8076,10 @@ const Menu$1 = /*#__PURE__*/react.forwardRef(function Menu({
|
|
|
8059
8076
|
anchorEl,
|
|
8060
8077
|
open
|
|
8061
8078
|
};
|
|
8062
|
-
|
|
8063
|
-
//temporary fix when inside dialog. Should be replaced by popover api when it is ready
|
|
8064
|
-
const inDialog = edsUtils.useIsInDialog(anchorEl);
|
|
8065
|
-
const menuElement = /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
8079
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
8066
8080
|
theme: token,
|
|
8067
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
8068
|
-
|
|
8069
|
-
...props,
|
|
8081
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledPopover$1, {
|
|
8082
|
+
popover: "manual",
|
|
8070
8083
|
...getFloatingProps({
|
|
8071
8084
|
ref: popoverRef,
|
|
8072
8085
|
style: {
|
|
@@ -8076,20 +8089,18 @@ const Menu$1 = /*#__PURE__*/react.forwardRef(function Menu({
|
|
|
8076
8089
|
left: x || 0
|
|
8077
8090
|
}
|
|
8078
8091
|
}),
|
|
8079
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8092
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuPaper, {
|
|
8093
|
+
elevation: "raised",
|
|
8094
|
+
...props,
|
|
8095
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuProvider, {
|
|
8096
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuContainer, {
|
|
8097
|
+
...menuProps,
|
|
8098
|
+
ref: ref
|
|
8099
|
+
})
|
|
8083
8100
|
})
|
|
8084
8101
|
})
|
|
8085
8102
|
})
|
|
8086
8103
|
});
|
|
8087
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
8088
|
-
children: inDialog ? menuElement : /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingPortal, {
|
|
8089
|
-
id: "eds-menu-container",
|
|
8090
|
-
children: menuElement
|
|
8091
|
-
})
|
|
8092
|
-
});
|
|
8093
8104
|
});
|
|
8094
8105
|
|
|
8095
8106
|
const Menu = Menu$1;
|
|
@@ -8224,7 +8235,7 @@ const FlexContainer = styled__default.default.div.withConfig({
|
|
|
8224
8235
|
displayName: "Pagination__FlexContainer",
|
|
8225
8236
|
componentId: "sc-13cpp3o-4"
|
|
8226
8237
|
})(["display:flex;justify-content:space-between;flex-wrap:nowrap;align-items:center;"]);
|
|
8227
|
-
const Text$1 = styled__default.default(Typography
|
|
8238
|
+
const Text$1 = styled__default.default(Typography).withConfig({
|
|
8228
8239
|
displayName: "Pagination__Text",
|
|
8229
8240
|
componentId: "sc-13cpp3o-5"
|
|
8230
8241
|
})(["white-space:nowrap;"]);
|
|
@@ -8405,9 +8416,9 @@ const Container$3 = styled__default.default.div.withConfig({
|
|
|
8405
8416
|
const StyledSelect = styled__default.default.select.withConfig({
|
|
8406
8417
|
displayName: "NativeSelect__StyledSelect",
|
|
8407
8418
|
componentId: "sc-82vb16-1"
|
|
8408
|
-
})(["border:none;border-radius:0;box-shadow:", ";", " ", " padding-right:calc(", " *2 + ", ");display:block;margin:0;appearance:none;background-image:
|
|
8419
|
+
})(["border:none;border-radius:0;box-shadow:", ";", " ", " padding-right:calc(", " *2 + ", ");display:block;margin:0;appearance:none;background-image:", " linear-gradient( to bottom,", " 0%,", " 100% );background-repeat:no-repeat,repeat;background-position:right ", " top 50%;width:100%;&:active,&:focus{box-shadow:none;", "}&:disabled{color:", ";background-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23bebebe' d='M7 9.5l5 5 5-5H7z'/%3E%3C/svg%3E\"),linear-gradient( to bottom,", " 0%,", " 100% );cursor:not-allowed;box-shadow:none;outline:none;.arrow-icon{fill:red;}&:focus,&:active{outline:none;}}"], nativeselect.boxShadow, edsUtils.typographyTemplate(nativeselect.typography), ({
|
|
8409
8420
|
theme
|
|
8410
|
-
}) => styled.css(["height:", ";", ""], theme.minHeight, edsUtils.spacingsTemplate(theme.entities.input.spacings)), nativeselect.entities.input.spacings.right, nativeselect.entities.icon.width, nativeselect.background, nativeselect.background, nativeselect.entities.input.spacings.right, edsUtils.outlineTemplate(nativeselect.states.focus.outline), nativeselect.states.disabled.typography.color, nativeselect.background, nativeselect.background);
|
|
8421
|
+
}) => styled.css(["height:", ";", ""], theme.minHeight, edsUtils.spacingsTemplate(theme.entities.input.spacings)), nativeselect.entities.input.spacings.right, nativeselect.entities.icon.width, props => props.multiple ? `` : `url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%236f6f6f' d='M7 9.5l5 5 5-5H7z'/%3E%3C/svg%3E"),`, nativeselect.background, nativeselect.background, nativeselect.entities.input.spacings.right, edsUtils.outlineTemplate(nativeselect.states.focus.outline), nativeselect.states.disabled.typography.color, nativeselect.background, nativeselect.background);
|
|
8411
8422
|
const NativeSelect = /*#__PURE__*/react.forwardRef(function NativeSelect({
|
|
8412
8423
|
label,
|
|
8413
8424
|
children,
|
|
@@ -8449,7 +8460,7 @@ const NativeSelect = /*#__PURE__*/react.forwardRef(function NativeSelect({
|
|
|
8449
8460
|
theme: token,
|
|
8450
8461
|
children: /*#__PURE__*/jsxRuntime.jsxs(Container$3, {
|
|
8451
8462
|
...containerProps,
|
|
8452
|
-
children: [showLabel && /*#__PURE__*/jsxRuntime.jsx(Label$
|
|
8463
|
+
children: [showLabel && /*#__PURE__*/jsxRuntime.jsx(Label$2, {
|
|
8453
8464
|
...labelProps
|
|
8454
8465
|
}), /*#__PURE__*/jsxRuntime.jsx(StyledSelect, {
|
|
8455
8466
|
...selectProps,
|
|
@@ -9246,7 +9257,7 @@ const StyledLabel = styled__default.default.label.withConfig({
|
|
|
9246
9257
|
}) => $isDisabled ? 'not-allowed' : 'pointer', ({
|
|
9247
9258
|
$size
|
|
9248
9259
|
}) => $size === 'small' ? '12px' : '8px');
|
|
9249
|
-
const Label
|
|
9260
|
+
const Label = styled__default.default.span.withConfig({
|
|
9250
9261
|
displayName: "Switch__Label",
|
|
9251
9262
|
componentId: "sc-sdaahx-1"
|
|
9252
9263
|
})(({
|
|
@@ -9283,7 +9294,7 @@ const Switch = /*#__PURE__*/react.forwardRef(function Switch({
|
|
|
9283
9294
|
disabled: disabled,
|
|
9284
9295
|
...rest,
|
|
9285
9296
|
ref: ref
|
|
9286
|
-
}), label && /*#__PURE__*/jsxRuntime.jsx(Label
|
|
9297
|
+
}), label && /*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
9287
9298
|
children: label
|
|
9288
9299
|
})]
|
|
9289
9300
|
}) : size === 'small' ? /*#__PURE__*/jsxRuntime.jsx(SwitchSmall, {
|
|
@@ -9454,10 +9465,10 @@ const StyledListItem = styled__default.default.li.withConfig({
|
|
|
9454
9465
|
$isdisabled
|
|
9455
9466
|
}) => {
|
|
9456
9467
|
const backgroundColor = $highlighted === 'true' ? theme.states.hover.background : $active === 'true' ? theme.states.active.background : theme.background;
|
|
9457
|
-
return styled.css(["display:flex;grid-area:1 / -1;align-items:center;align-self:start;margin:0;list-style:none;background-color:", ";user-select:none;overflow:hidden;touch-action:manipulation;cursor:", ";", " ", " ", ""], backgroundColor, $highlighted === 'true' ? 'pointer' : 'default', edsUtils.typographyTemplate(theme.typography), edsUtils.spacingsTemplate(theme.spacings), $isdisabled === 'true' ? styled.css(["color:", ";"], theme.states.disabled.typography.color) : '');
|
|
9468
|
+
return styled.css(["display:flex;grid-area:1 / -1;align-items:center;align-self:start;margin:0;list-style:none;background-color:", ";user-select:none;overflow:hidden;touch-action:manipulation;z-index:3;cursor:", ";", " ", " ", ""], backgroundColor, $highlighted === 'true' ? 'pointer' : 'default', edsUtils.typographyTemplate(theme.typography), edsUtils.spacingsTemplate(theme.spacings), $isdisabled === 'true' ? styled.css(["color:", ";"], theme.states.disabled.typography.color) : '');
|
|
9458
9469
|
});
|
|
9459
|
-
const
|
|
9460
|
-
displayName: "
|
|
9470
|
+
const AutocompleteOptionLabel = styled__default.default.span.withConfig({
|
|
9471
|
+
displayName: "Option__AutocompleteOptionLabel",
|
|
9461
9472
|
componentId: "sc-1ly11zu-1"
|
|
9462
9473
|
})(({
|
|
9463
9474
|
theme,
|
|
@@ -9500,7 +9511,7 @@ function AutocompleteOptionInner(props, ref) {
|
|
|
9500
9511
|
}
|
|
9501
9512
|
}), optionComponent ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
9502
9513
|
children: optionComponent
|
|
9503
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(
|
|
9514
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(AutocompleteOptionLabel, {
|
|
9504
9515
|
$multiline: multiline,
|
|
9505
9516
|
children: value
|
|
9506
9517
|
})]
|
|
@@ -9508,11 +9519,57 @@ function AutocompleteOptionInner(props, ref) {
|
|
|
9508
9519
|
}
|
|
9509
9520
|
const AutocompleteOption = /*#__PURE__*/react.forwardRef(AutocompleteOptionInner);
|
|
9510
9521
|
|
|
9522
|
+
const StyledAddItemIcon = styled__default.default(Icon$1).withConfig({
|
|
9523
|
+
displayName: "AddNewOption__StyledAddItemIcon",
|
|
9524
|
+
componentId: "sc-8xtrxx-0"
|
|
9525
|
+
})(({
|
|
9526
|
+
multiple
|
|
9527
|
+
}) => {
|
|
9528
|
+
return styled.css(["padding:", ";color:", ";"], multiple ? '0.75rem' : '0 0.75rem 0 0', edsTokens.tokens.colors.interactive.primary__resting.hex);
|
|
9529
|
+
});
|
|
9530
|
+
const StyledPlaceholder = styled__default.default.span.withConfig({
|
|
9531
|
+
displayName: "AddNewOption__StyledPlaceholder",
|
|
9532
|
+
componentId: "sc-8xtrxx-1"
|
|
9533
|
+
})(["color:", ";"], input$1.entities.placeholder.typography.color);
|
|
9534
|
+
function AddNewOptionInner(props, ref) {
|
|
9535
|
+
const {
|
|
9536
|
+
value,
|
|
9537
|
+
multiline,
|
|
9538
|
+
multiple,
|
|
9539
|
+
highlighted,
|
|
9540
|
+
onClick,
|
|
9541
|
+
...other
|
|
9542
|
+
} = props;
|
|
9543
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledListItem, {
|
|
9544
|
+
ref: ref,
|
|
9545
|
+
$highlighted: highlighted,
|
|
9546
|
+
onClick: e => {
|
|
9547
|
+
onClick(e);
|
|
9548
|
+
},
|
|
9549
|
+
...other,
|
|
9550
|
+
"aria-label": `Add new option: ${value}`,
|
|
9551
|
+
"aria-live": "polite",
|
|
9552
|
+
"aria-selected": false,
|
|
9553
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StyledAddItemIcon, {
|
|
9554
|
+
multiple: multiple,
|
|
9555
|
+
data: edsIcons.add_box
|
|
9556
|
+
}), /*#__PURE__*/jsxRuntime.jsx(AutocompleteOptionLabel, {
|
|
9557
|
+
$multiline: multiline,
|
|
9558
|
+
children: value ? value : /*#__PURE__*/jsxRuntime.jsx(StyledPlaceholder, {
|
|
9559
|
+
children: "Type to add new options"
|
|
9560
|
+
})
|
|
9561
|
+
})]
|
|
9562
|
+
});
|
|
9563
|
+
}
|
|
9564
|
+
const AddNewOption = /*#__PURE__*/react.forwardRef(AddNewOptionInner);
|
|
9565
|
+
|
|
9511
9566
|
const Container$2 = styled__default.default.div.withConfig({
|
|
9512
9567
|
displayName: "Autocomplete__Container",
|
|
9513
9568
|
componentId: "sc-yvif0e-0"
|
|
9514
9569
|
})(["position:relative;"]);
|
|
9515
9570
|
const AllSymbol = Symbol('Select all');
|
|
9571
|
+
const AddSymbol = Symbol('Add new');
|
|
9572
|
+
|
|
9516
9573
|
// MARK: styled components
|
|
9517
9574
|
const StyledList = styled__default.default(List$1).withConfig({
|
|
9518
9575
|
displayName: "Autocomplete__StyledList",
|
|
@@ -9558,7 +9615,7 @@ const findIndex = ({
|
|
|
9558
9615
|
availableItems
|
|
9559
9616
|
}) => {
|
|
9560
9617
|
const nextItem = availableItems[index];
|
|
9561
|
-
if (optionDisabled(nextItem)) {
|
|
9618
|
+
if (optionDisabled(nextItem) && index >= 0 && index < availableItems.length) {
|
|
9562
9619
|
const nextIndex = calc(index);
|
|
9563
9620
|
return findIndex({
|
|
9564
9621
|
calc,
|
|
@@ -9646,6 +9703,7 @@ const defaultOptionDisabled = () => false;
|
|
|
9646
9703
|
function AutocompleteInner(props, ref) {
|
|
9647
9704
|
const {
|
|
9648
9705
|
options = [],
|
|
9706
|
+
totalOptions,
|
|
9649
9707
|
label,
|
|
9650
9708
|
meta,
|
|
9651
9709
|
className,
|
|
@@ -9655,13 +9713,14 @@ function AutocompleteInner(props, ref) {
|
|
|
9655
9713
|
loading = false,
|
|
9656
9714
|
hideClearButton = false,
|
|
9657
9715
|
onOptionsChange,
|
|
9716
|
+
onAddNewOption,
|
|
9658
9717
|
onInputChange,
|
|
9659
9718
|
selectedOptions: _selectedOptions,
|
|
9660
9719
|
multiple,
|
|
9661
|
-
|
|
9720
|
+
itemToKey: _itemToKey,
|
|
9721
|
+
itemCompare: _itemCompare,
|
|
9662
9722
|
allowSelectAll,
|
|
9663
9723
|
initialSelectedOptions: _initialSelectedOptions = [],
|
|
9664
|
-
disablePortal,
|
|
9665
9724
|
optionDisabled = defaultOptionDisabled,
|
|
9666
9725
|
optionsFilter,
|
|
9667
9726
|
autoWidth,
|
|
@@ -9675,20 +9734,32 @@ function AutocompleteInner(props, ref) {
|
|
|
9675
9734
|
helperIcon,
|
|
9676
9735
|
noOptionsText = 'No options',
|
|
9677
9736
|
variant,
|
|
9737
|
+
onClear,
|
|
9678
9738
|
...other
|
|
9679
9739
|
} = props;
|
|
9740
|
+
const itemCompare = react.useMemo(() => {
|
|
9741
|
+
if (_itemCompare && _itemToKey) {
|
|
9742
|
+
console.error('Error: Specifying both itemCompare and itemToKey. itemCompare is deprecated, while itemToKey should be used instead of it. Please only use one.');
|
|
9743
|
+
return _itemCompare;
|
|
9744
|
+
}
|
|
9745
|
+
if (_itemToKey) {
|
|
9746
|
+
return (o1, o2) => _itemToKey(o1) === _itemToKey(o2);
|
|
9747
|
+
}
|
|
9748
|
+
return _itemCompare;
|
|
9749
|
+
}, [_itemCompare, _itemToKey]);
|
|
9750
|
+
const itemToKey = react.useCallback(item => {
|
|
9751
|
+
return _itemToKey ? _itemToKey(item) : item;
|
|
9752
|
+
}, [_itemToKey]);
|
|
9680
9753
|
|
|
9681
9754
|
// MARK: initializing data/setup
|
|
9682
9755
|
const selectedOptions = _selectedOptions ? itemCompare ? options.filter(item => _selectedOptions.some(compare => itemCompare(item, compare))) : _selectedOptions : undefined;
|
|
9683
9756
|
const initialSelectedOptions = _initialSelectedOptions ? itemCompare ? options.filter(item => _initialSelectedOptions.some(compare => itemCompare(item, compare))) : _initialSelectedOptions : undefined;
|
|
9684
|
-
if (disablePortal) {
|
|
9685
|
-
console.warn('Autocomplete "disablePortal" prop has been deprecated. Autocomplete now uses the native popover api');
|
|
9686
|
-
}
|
|
9687
9757
|
const isControlled = Boolean(selectedOptions);
|
|
9688
9758
|
const [inputOptions, setInputOptions] = react.useState(options);
|
|
9689
9759
|
const [_availableItems, setAvailableItems] = react.useState(inputOptions);
|
|
9690
9760
|
const [typedInputValue, setTypedInputValue] = react.useState('');
|
|
9691
9761
|
const inputRef = react.useRef(null);
|
|
9762
|
+
react.useImperativeHandle(ref, () => inputRef.current);
|
|
9692
9763
|
const showSelectAll = react.useMemo(() => {
|
|
9693
9764
|
if (!multiple && allowSelectAll) {
|
|
9694
9765
|
throw new Error(`allowSelectAll can only be used with multiple`);
|
|
@@ -9696,9 +9767,11 @@ function AutocompleteInner(props, ref) {
|
|
|
9696
9767
|
return allowSelectAll && !typedInputValue;
|
|
9697
9768
|
}, [allowSelectAll, multiple, typedInputValue]);
|
|
9698
9769
|
const availableItems = react.useMemo(() => {
|
|
9770
|
+
if (showSelectAll && onAddNewOption) return [AddSymbol, AllSymbol, ..._availableItems];
|
|
9699
9771
|
if (showSelectAll) return [AllSymbol, ..._availableItems];
|
|
9772
|
+
if (onAddNewOption) return [AddSymbol, ..._availableItems];
|
|
9700
9773
|
return _availableItems;
|
|
9701
|
-
}, [_availableItems, showSelectAll]);
|
|
9774
|
+
}, [_availableItems, showSelectAll, onAddNewOption]);
|
|
9702
9775
|
|
|
9703
9776
|
//issue 2304, update dataset when options are added dynamically
|
|
9704
9777
|
react.useEffect(() => {
|
|
@@ -9720,6 +9793,7 @@ function AutocompleteInner(props, ref) {
|
|
|
9720
9793
|
const tokens = token();
|
|
9721
9794
|
let placeholderText = placeholder;
|
|
9722
9795
|
let multipleSelectionProps = {
|
|
9796
|
+
itemToKey,
|
|
9723
9797
|
initialSelectedItems: multiple ? initialSelectedOptions : initialSelectedOptions[0] ? [initialSelectedOptions[0]] : []
|
|
9724
9798
|
};
|
|
9725
9799
|
if (multiple) {
|
|
@@ -9727,7 +9801,7 @@ function AutocompleteInner(props, ref) {
|
|
|
9727
9801
|
...multipleSelectionProps,
|
|
9728
9802
|
onSelectedItemsChange: changes => {
|
|
9729
9803
|
if (onOptionsChange) {
|
|
9730
|
-
let selectedItems = changes.selectedItems.filter(item => item !== AllSymbol);
|
|
9804
|
+
let selectedItems = changes.selectedItems.filter(item => item !== AllSymbol || item !== AddSymbol);
|
|
9731
9805
|
if (itemCompare) {
|
|
9732
9806
|
selectedItems = inputOptions.filter(item => selectedItems.some(compare => itemCompare(item, compare)));
|
|
9733
9807
|
}
|
|
@@ -9758,7 +9832,7 @@ function AutocompleteInner(props, ref) {
|
|
|
9758
9832
|
return inputOptions.filter(x => !disabledItemsSet.has(x));
|
|
9759
9833
|
}, [inputOptions, optionDisabled]);
|
|
9760
9834
|
const allDisabled = enabledItems.length === 0;
|
|
9761
|
-
const selectedDisabledItemsSet = react.useMemo(() => new Set(selectedItems.filter(optionDisabled)), [selectedItems, optionDisabled]);
|
|
9835
|
+
const selectedDisabledItemsSet = react.useMemo(() => new Set(selectedItems.filter(x => x !== null && optionDisabled(x))), [selectedItems, optionDisabled]);
|
|
9762
9836
|
const selectedEnabledItems = react.useMemo(() => selectedItems.filter(x => !selectedDisabledItemsSet.has(x)), [selectedItems, selectedDisabledItemsSet]);
|
|
9763
9837
|
const allSelectedState = react.useMemo(() => {
|
|
9764
9838
|
if (!enabledItems || !selectedEnabledItems) return 'NONE';
|
|
@@ -9780,12 +9854,10 @@ function AutocompleteInner(props, ref) {
|
|
|
9780
9854
|
if (item == null) {
|
|
9781
9855
|
return '';
|
|
9782
9856
|
}
|
|
9783
|
-
if (
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
throw new Error('Missing label. When using objects for options make sure to define the `optionLabel` property');
|
|
9788
|
-
}
|
|
9857
|
+
if (optionLabel) {
|
|
9858
|
+
return optionLabel(item);
|
|
9859
|
+
} else if (typeof item === 'object') {
|
|
9860
|
+
throw new Error('Missing label. When using objects for options make sure to define the `optionLabel` property');
|
|
9789
9861
|
}
|
|
9790
9862
|
if (typeof item === 'string') {
|
|
9791
9863
|
return item;
|
|
@@ -9793,7 +9865,7 @@ function AutocompleteInner(props, ref) {
|
|
|
9793
9865
|
try {
|
|
9794
9866
|
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
9795
9867
|
return item?.toString();
|
|
9796
|
-
} catch
|
|
9868
|
+
} catch {
|
|
9797
9869
|
throw new Error('Unable to find label, make sure your are using options as documented');
|
|
9798
9870
|
}
|
|
9799
9871
|
}, [optionLabel]);
|
|
@@ -9820,8 +9892,10 @@ function AutocompleteInner(props, ref) {
|
|
|
9820
9892
|
//can not pass readonly type to downshift so we cast it to regular T[]
|
|
9821
9893
|
initialSelectedItem: initialSelectedOptions[0],
|
|
9822
9894
|
isItemDisabled(item) {
|
|
9895
|
+
if (item === AddSymbol) return !typedInputValue.trim();
|
|
9823
9896
|
return optionDisabled(item);
|
|
9824
9897
|
},
|
|
9898
|
+
itemToKey,
|
|
9825
9899
|
itemToString: getLabel,
|
|
9826
9900
|
onInputValueChange: ({
|
|
9827
9901
|
inputValue
|
|
@@ -9872,8 +9946,15 @@ function AutocompleteInner(props, ref) {
|
|
|
9872
9946
|
if (selectedItem != null && !optionDisabled(selectedItem)) {
|
|
9873
9947
|
if (selectedItem === AllSymbol) {
|
|
9874
9948
|
toggleAllSelected();
|
|
9949
|
+
} else if (selectedItem === AddSymbol && typedInputValue.trim()) {
|
|
9950
|
+
onAddNewOption?.(typedInputValue);
|
|
9875
9951
|
} else if (multiple) {
|
|
9876
|
-
selectedItems.
|
|
9952
|
+
const shouldRemove = itemCompare ? selectedItems.some(i => itemCompare(selectedItem, i)) : selectedItems.includes(selectedItem);
|
|
9953
|
+
if (shouldRemove) {
|
|
9954
|
+
removeSelectedItem(selectedItem);
|
|
9955
|
+
} else {
|
|
9956
|
+
addSelectedItem(selectedItem);
|
|
9957
|
+
}
|
|
9877
9958
|
} else {
|
|
9878
9959
|
setSelectedItems([selectedItem]);
|
|
9879
9960
|
}
|
|
@@ -9887,6 +9968,7 @@ function AutocompleteInner(props, ref) {
|
|
|
9887
9968
|
comboBoxProps = {
|
|
9888
9969
|
...comboBoxProps,
|
|
9889
9970
|
onSelectedItemChange: changes => {
|
|
9971
|
+
if (changes.selectedItem === AddSymbol) return;
|
|
9890
9972
|
if (onOptionsChange) {
|
|
9891
9973
|
let {
|
|
9892
9974
|
selectedItem
|
|
@@ -9910,11 +9992,27 @@ function AutocompleteInner(props, ref) {
|
|
|
9910
9992
|
...changes,
|
|
9911
9993
|
isOpen: !(disabled || readOnly)
|
|
9912
9994
|
};
|
|
9995
|
+
case downshift.useCombobox.stateChangeTypes.InputKeyDownEnter:
|
|
9996
|
+
case downshift.useCombobox.stateChangeTypes.ItemClick:
|
|
9997
|
+
if (changes.selectedItem === AddSymbol) {
|
|
9998
|
+
return {
|
|
9999
|
+
...changes,
|
|
10000
|
+
inputValue: ''
|
|
10001
|
+
};
|
|
10002
|
+
}
|
|
10003
|
+
return {
|
|
10004
|
+
...changes
|
|
10005
|
+
};
|
|
9913
10006
|
case downshift.useCombobox.stateChangeTypes.InputBlur:
|
|
9914
10007
|
return {
|
|
9915
10008
|
...changes,
|
|
9916
10009
|
inputValue: changes.selectedItem ? getLabel(changes.selectedItem) : ''
|
|
9917
10010
|
};
|
|
10011
|
+
case downshift.useCombobox.stateChangeTypes.InputChange:
|
|
10012
|
+
setTypedInputValue(changes.inputValue);
|
|
10013
|
+
return {
|
|
10014
|
+
...changes
|
|
10015
|
+
};
|
|
9918
10016
|
case downshift.useCombobox.stateChangeTypes.InputKeyDownArrowDown:
|
|
9919
10017
|
case downshift.useCombobox.stateChangeTypes.InputKeyDownHome:
|
|
9920
10018
|
if (readOnly) {
|
|
@@ -9949,6 +10047,11 @@ function AutocompleteInner(props, ref) {
|
|
|
9949
10047
|
allDisabled
|
|
9950
10048
|
})
|
|
9951
10049
|
};
|
|
10050
|
+
case downshift.useCombobox.stateChangeTypes.ControlledPropUpdatedSelectedItem:
|
|
10051
|
+
setSelectedItems([changes.selectedItem]);
|
|
10052
|
+
return {
|
|
10053
|
+
...changes
|
|
10054
|
+
};
|
|
9952
10055
|
default:
|
|
9953
10056
|
return changes;
|
|
9954
10057
|
}
|
|
@@ -9963,7 +10066,9 @@ function AutocompleteInner(props, ref) {
|
|
|
9963
10066
|
}
|
|
9964
10067
|
// MARK: multiselect specific
|
|
9965
10068
|
if (multiple) {
|
|
9966
|
-
|
|
10069
|
+
const showPlaceholder = placeholderText && selectedItems.length === 0;
|
|
10070
|
+
const optionCount = totalOptions || inputOptions.length;
|
|
10071
|
+
placeholderText = showPlaceholder ? placeholderText : `${selectedItems.length}/${optionCount} selected`;
|
|
9967
10072
|
comboBoxProps = {
|
|
9968
10073
|
...comboBoxProps,
|
|
9969
10074
|
selectedItem: null,
|
|
@@ -10068,7 +10173,7 @@ function AutocompleteInner(props, ref) {
|
|
|
10068
10173
|
} = react$1.useFloating({
|
|
10069
10174
|
placement: 'bottom-start',
|
|
10070
10175
|
middleware: [react$1.offset(4), react$1.flip({
|
|
10071
|
-
boundary: document?.body
|
|
10176
|
+
boundary: typeof document === 'undefined' ? undefined : document?.body
|
|
10072
10177
|
}), react$1.size({
|
|
10073
10178
|
apply({
|
|
10074
10179
|
rects,
|
|
@@ -10094,12 +10199,13 @@ function AutocompleteInner(props, ref) {
|
|
|
10094
10199
|
// MARK: popover toggle
|
|
10095
10200
|
edsUtils.useIsomorphicLayoutEffect(() => {
|
|
10096
10201
|
if (isOpen) {
|
|
10097
|
-
refs.floating.current
|
|
10202
|
+
refs.floating.current?.showPopover();
|
|
10098
10203
|
} else {
|
|
10099
|
-
refs.floating.current
|
|
10204
|
+
refs.floating.current?.hidePopover();
|
|
10100
10205
|
}
|
|
10101
10206
|
}, [isOpen, refs.floating]);
|
|
10102
10207
|
const clear = () => {
|
|
10208
|
+
if (onClear) onClear();
|
|
10103
10209
|
resetCombobox();
|
|
10104
10210
|
//dont clear items if they are selected and disabled
|
|
10105
10211
|
setSelectedItems([...selectedDisabledItemsSet]);
|
|
@@ -10179,6 +10285,30 @@ function AutocompleteInner(props, ref) {
|
|
|
10179
10285
|
})
|
|
10180
10286
|
}, 'select-all');
|
|
10181
10287
|
}
|
|
10288
|
+
if (item === AddSymbol && onAddNewOption) {
|
|
10289
|
+
const isDisabled = !typedInputValue.trim();
|
|
10290
|
+
return /*#__PURE__*/jsxRuntime.jsx(AddNewOption, {
|
|
10291
|
+
"data-index": 0,
|
|
10292
|
+
"data-testid": 'add-item',
|
|
10293
|
+
"aria-setsize": availableItems.length,
|
|
10294
|
+
multiple: multiple,
|
|
10295
|
+
highlighted: highlightedIndex === index && !isDisabled ? 'true' : 'false',
|
|
10296
|
+
multiline: multiline,
|
|
10297
|
+
style: {
|
|
10298
|
+
position: 'sticky',
|
|
10299
|
+
top: 0,
|
|
10300
|
+
zIndex: 99
|
|
10301
|
+
},
|
|
10302
|
+
...getItemProps({
|
|
10303
|
+
...(multiline && {
|
|
10304
|
+
ref: rowVirtualizer.measureElement
|
|
10305
|
+
}),
|
|
10306
|
+
item,
|
|
10307
|
+
index: index
|
|
10308
|
+
}),
|
|
10309
|
+
value: typedInputValue.trim()
|
|
10310
|
+
}, 'add-item');
|
|
10311
|
+
}
|
|
10182
10312
|
return /*#__PURE__*/jsxRuntime.jsx(AutocompleteOption, {
|
|
10183
10313
|
"data-index": index,
|
|
10184
10314
|
"aria-setsize": availableItems.length,
|
|
@@ -10220,8 +10350,7 @@ function AutocompleteInner(props, ref) {
|
|
|
10220
10350
|
children: /*#__PURE__*/jsxRuntime.jsxs(Container$2, {
|
|
10221
10351
|
className: className,
|
|
10222
10352
|
style: style,
|
|
10223
|
-
|
|
10224
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Label$3, {
|
|
10353
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label$2, {
|
|
10225
10354
|
...getLabelProps(),
|
|
10226
10355
|
label: label,
|
|
10227
10356
|
meta: meta,
|
|
@@ -10415,9 +10544,13 @@ const initalState = {
|
|
|
10415
10544
|
};
|
|
10416
10545
|
const SideBarContext = /*#__PURE__*/react.createContext(initalState);
|
|
10417
10546
|
const SideBarProvider = ({
|
|
10418
|
-
children
|
|
10547
|
+
children,
|
|
10548
|
+
isOpen: isOpenProp = false
|
|
10419
10549
|
}) => {
|
|
10420
|
-
const [state, setState] = react.useState(
|
|
10550
|
+
const [state, setState] = react.useState({
|
|
10551
|
+
onToggle: null,
|
|
10552
|
+
isOpen: isOpenProp
|
|
10553
|
+
});
|
|
10421
10554
|
const {
|
|
10422
10555
|
isOpen,
|
|
10423
10556
|
onToggle
|
|
@@ -10450,13 +10583,11 @@ const useSideBar = () => react.useContext(SideBarContext);
|
|
|
10450
10583
|
|
|
10451
10584
|
const SideBarContainer = /*#__PURE__*/react.forwardRef(function SideBarContainer({
|
|
10452
10585
|
onToggle: onToggleCallback,
|
|
10453
|
-
open = false,
|
|
10454
10586
|
children,
|
|
10455
10587
|
...rest
|
|
10456
10588
|
}, ref) {
|
|
10457
10589
|
const {
|
|
10458
10590
|
isOpen,
|
|
10459
|
-
setIsOpen,
|
|
10460
10591
|
onToggle,
|
|
10461
10592
|
setOnToggle
|
|
10462
10593
|
} = useSideBar();
|
|
@@ -10465,10 +10596,6 @@ const SideBarContainer = /*#__PURE__*/react.forwardRef(function SideBarContainer
|
|
|
10465
10596
|
setOnToggle(onToggleCallback);
|
|
10466
10597
|
}
|
|
10467
10598
|
}, [onToggle, onToggleCallback, setOnToggle]);
|
|
10468
|
-
react.useEffect(() => {
|
|
10469
|
-
setIsOpen(open);
|
|
10470
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10471
|
-
}, [open]);
|
|
10472
10599
|
return /*#__PURE__*/jsxRuntime.jsx(GridContainer, {
|
|
10473
10600
|
...rest,
|
|
10474
10601
|
open: isOpen,
|
|
@@ -10506,6 +10633,7 @@ const SideBar$1 = /*#__PURE__*/react.forwardRef(({
|
|
|
10506
10633
|
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
10507
10634
|
theme: token,
|
|
10508
10635
|
children: /*#__PURE__*/jsxRuntime.jsx(SideBarProvider, {
|
|
10636
|
+
isOpen: open,
|
|
10509
10637
|
children: /*#__PURE__*/jsxRuntime.jsx(SideBarContainer, {
|
|
10510
10638
|
...props,
|
|
10511
10639
|
ref: ref
|
|
@@ -10564,7 +10692,7 @@ const Container$1 = styled__default.default.a.withConfig({
|
|
|
10564
10692
|
} = theme;
|
|
10565
10693
|
return styled.css(["background-color:", ";display:grid;grid-template-columns:", " 1fr;width:100%;padding:0;place-items:center;border:0;", " text-decoration:none;min-height:", ";&:hover{cursor:pointer;background-color:", ";}&:disabled{background-color:", ";color:", ";cursor:not-allowed;& > p{color:", ";}& > svg{fill:", ";}}&:focus-visible{", ";}"], $active ? menuActiveBackground : 'transparent', minWidth, edsUtils.bordersTemplate(border), minHeight, $active ? menuActiveBackground : menuHoverBackground, menuDisabledBackground, menuDisabledText, menuDisabledText, menuDisabledText, edsUtils.outlineTemplate(focus.outline));
|
|
10566
10694
|
});
|
|
10567
|
-
const ItemText$1 = styled__default.default(Typography
|
|
10695
|
+
const ItemText$1 = styled__default.default(Typography).withConfig({
|
|
10568
10696
|
displayName: "SidebarLink__ItemText",
|
|
10569
10697
|
componentId: "sc-gbehcj-1"
|
|
10570
10698
|
})(({
|
|
@@ -10901,7 +11029,7 @@ const Panel = styled__default.default.div.withConfig({
|
|
|
10901
11029
|
displayName: "SideBarAccordion__Panel",
|
|
10902
11030
|
componentId: "sc-1ekwnbi-6"
|
|
10903
11031
|
})(["width:100%;", ""], edsUtils.bordersTemplate(border));
|
|
10904
|
-
const ItemText = styled__default.default(Typography
|
|
11032
|
+
const ItemText = styled__default.default(Typography).withConfig({
|
|
10905
11033
|
displayName: "SideBarAccordion__ItemText",
|
|
10906
11034
|
componentId: "sc-1ekwnbi-7"
|
|
10907
11035
|
})(({
|
|
@@ -11043,10 +11171,9 @@ const SideBarAccordion = /*#__PURE__*/react.forwardRef(function SideBarAccordion
|
|
|
11043
11171
|
onClose: closeMenu,
|
|
11044
11172
|
anchorEl: anchorEl,
|
|
11045
11173
|
children: react.Children.map(children, child => {
|
|
11046
|
-
const item = child;
|
|
11047
11174
|
return /*#__PURE__*/jsxRuntime.jsx(Menu.Item, {
|
|
11048
11175
|
...child.props,
|
|
11049
|
-
children:
|
|
11176
|
+
children: child.props.label
|
|
11050
11177
|
});
|
|
11051
11178
|
})
|
|
11052
11179
|
})]
|
|
@@ -11089,7 +11216,7 @@ const TextWrapper = styled__default.default.div.withConfig({
|
|
|
11089
11216
|
displayName: "SideBarAccordionItem__TextWrapper",
|
|
11090
11217
|
componentId: "sc-1aeo1e1-1"
|
|
11091
11218
|
})(["min-height:", ";grid-column:2;justify-self:start;display:flex;align-items:center;width:100%;"], minHeight);
|
|
11092
|
-
const Text = styled__default.default(Typography
|
|
11219
|
+
const Text = styled__default.default(Typography).withConfig({
|
|
11093
11220
|
displayName: "SideBarAccordionItem__Text",
|
|
11094
11221
|
componentId: "sc-1aeo1e1-2"
|
|
11095
11222
|
})(({
|
|
@@ -11145,10 +11272,12 @@ SideBar.Button.displayName = 'SideBar.Button';
|
|
|
11145
11272
|
SideBar.Accordion.displayName = 'SideBar.Accordion';
|
|
11146
11273
|
SideBar.AccordionItem.displayName = 'SideBar.AccordionItem';
|
|
11147
11274
|
|
|
11148
|
-
const StyledCell = styled__default.default(Typography
|
|
11275
|
+
const StyledCell = styled__default.default(Typography).withConfig({
|
|
11149
11276
|
displayName: "CalendarCell__StyledCell",
|
|
11150
11277
|
componentId: "sc-y5ycmg-0"
|
|
11151
|
-
})(["display:flex;justify-content:center;align-items:center;cursor:pointer;&:hover{background-color:", ";}
|
|
11278
|
+
})(["display:flex;justify-content:center;align-items:center;cursor:pointer;&:hover{background-color:", ";}", " ", " ", " ", " ", " ", " ", ""], edsTokens.tokens.colors.interactive.table__cell__fill_hover.rgba, ({
|
|
11279
|
+
$focused
|
|
11280
|
+
}) => $focused && `outline: 2px dashed rgba(0, 112, 121, 1);`, ({
|
|
11152
11281
|
$selected
|
|
11153
11282
|
}) => $selected && `background-color: ${edsTokens.tokens.colors.interactive.primary__selected_highlight.rgba};`, ({
|
|
11154
11283
|
$hidden
|
|
@@ -11227,7 +11356,8 @@ function CalendarCell({
|
|
|
11227
11356
|
isOutsideVisibleRange,
|
|
11228
11357
|
isDisabled,
|
|
11229
11358
|
isUnavailable,
|
|
11230
|
-
formattedDate
|
|
11359
|
+
formattedDate,
|
|
11360
|
+
isFocused
|
|
11231
11361
|
} = reactAria.useCalendarCell({
|
|
11232
11362
|
date
|
|
11233
11363
|
}, state, ref);
|
|
@@ -11275,11 +11405,21 @@ function CalendarCell({
|
|
|
11275
11405
|
$highlight: isHighlight,
|
|
11276
11406
|
$disabled: isDisabled || isUnavailable,
|
|
11277
11407
|
$density: density,
|
|
11408
|
+
$focused: isFocused,
|
|
11278
11409
|
children: formattedDate
|
|
11279
11410
|
})
|
|
11280
11411
|
});
|
|
11281
11412
|
}
|
|
11282
11413
|
|
|
11414
|
+
const TOTAL_VISIBLE_YEARS = 36;
|
|
11415
|
+
const RANGE_OFFSET = 30 / 2;
|
|
11416
|
+
const getPageYears = (selectedYear, yearPickerPage = 0) => {
|
|
11417
|
+
const page = yearPickerPage * TOTAL_VISIBLE_YEARS;
|
|
11418
|
+
return Array.from({
|
|
11419
|
+
length: TOTAL_VISIBLE_YEARS
|
|
11420
|
+
}, (_, i) => i + (selectedYear + page - RANGE_OFFSET));
|
|
11421
|
+
};
|
|
11422
|
+
|
|
11283
11423
|
// Disable no-autofocus - it's not the native autofocus attribute, but react-aria's autoFocus prop
|
|
11284
11424
|
/* eslint-disable jsx-a11y/no-autofocus */
|
|
11285
11425
|
const Grid = styled__default.default.div.withConfig({
|
|
@@ -11294,21 +11434,51 @@ const GridColumn = styled__default.default.button.withConfig({
|
|
|
11294
11434
|
}) => $active ? `background-color: ${edsTokens.tokens.colors.interactive.primary__selected_highlight.rgba}` : '', edsTokens.tokens.colors.interactive.primary__resting.rgba);
|
|
11295
11435
|
const GridFocusManager = ({
|
|
11296
11436
|
year: selectedYear,
|
|
11297
|
-
setFocusedYear
|
|
11437
|
+
setFocusedYear,
|
|
11438
|
+
yearPickerPage,
|
|
11439
|
+
setYearPickerPage
|
|
11298
11440
|
}) => {
|
|
11299
11441
|
const focusManager = reactAria.useFocusManager();
|
|
11300
|
-
const
|
|
11442
|
+
const prevYear = react.useRef(null);
|
|
11443
|
+
const navByKeyboard = react.useRef(false);
|
|
11444
|
+
const years = getPageYears(selectedYear, yearPickerPage);
|
|
11445
|
+
react.useEffect(() => {
|
|
11446
|
+
if (prevYear.current === undefined) {
|
|
11447
|
+
prevYear.current = yearPickerPage;
|
|
11448
|
+
return;
|
|
11449
|
+
}
|
|
11450
|
+
if (!navByKeyboard.current) {
|
|
11451
|
+
focusManager.focusFirst();
|
|
11452
|
+
return;
|
|
11453
|
+
}
|
|
11454
|
+
navByKeyboard.current = false;
|
|
11455
|
+
yearPickerPage > prevYear.current ? focusManager.focusFirst() : focusManager.focusLast();
|
|
11456
|
+
prevYear.current = yearPickerPage;
|
|
11457
|
+
}, [yearPickerPage, focusManager]);
|
|
11458
|
+
const onKeyDown = year => e => {
|
|
11301
11459
|
const target = e.currentTarget;
|
|
11302
11460
|
const parent = target.parentElement;
|
|
11461
|
+
const isFirstYear = years.at(0) === year;
|
|
11462
|
+
const isLastYear = years.at(-1) === year;
|
|
11303
11463
|
switch (e.key) {
|
|
11304
11464
|
case 'ArrowRight':
|
|
11305
11465
|
e.preventDefault();
|
|
11466
|
+
if (isLastYear) {
|
|
11467
|
+
navByKeyboard.current = true;
|
|
11468
|
+
setYearPickerPage(page => page + 1);
|
|
11469
|
+
break;
|
|
11470
|
+
}
|
|
11306
11471
|
focusManager.focusNext({
|
|
11307
11472
|
wrap: true
|
|
11308
11473
|
});
|
|
11309
11474
|
break;
|
|
11310
11475
|
case 'ArrowLeft':
|
|
11311
11476
|
e.preventDefault();
|
|
11477
|
+
if (isFirstYear) {
|
|
11478
|
+
navByKeyboard.current = true;
|
|
11479
|
+
setYearPickerPage(page => page - 1);
|
|
11480
|
+
break;
|
|
11481
|
+
}
|
|
11312
11482
|
focusManager.focusPrevious({
|
|
11313
11483
|
wrap: true
|
|
11314
11484
|
});
|
|
@@ -11316,6 +11486,11 @@ const GridFocusManager = ({
|
|
|
11316
11486
|
case 'ArrowDown':
|
|
11317
11487
|
{
|
|
11318
11488
|
e.preventDefault();
|
|
11489
|
+
if (isLastYear) {
|
|
11490
|
+
navByKeyboard.current = true;
|
|
11491
|
+
setYearPickerPage(page => page + 1);
|
|
11492
|
+
break;
|
|
11493
|
+
}
|
|
11319
11494
|
const selfIndex = Array.from(parent.children).indexOf(target);
|
|
11320
11495
|
const focusElement = Array.from(parent.children).at(selfIndex + 5);
|
|
11321
11496
|
focusManager.focusNext({
|
|
@@ -11326,6 +11501,11 @@ const GridFocusManager = ({
|
|
|
11326
11501
|
case 'ArrowUp':
|
|
11327
11502
|
{
|
|
11328
11503
|
e.preventDefault();
|
|
11504
|
+
if (isFirstYear) {
|
|
11505
|
+
navByKeyboard.current = true;
|
|
11506
|
+
setYearPickerPage(page => page - 1);
|
|
11507
|
+
break;
|
|
11508
|
+
}
|
|
11329
11509
|
const selfIndex = Array.from(parent.children).indexOf(target);
|
|
11330
11510
|
const focusElement = Array.from(parent.children).at(selfIndex - 5);
|
|
11331
11511
|
focusManager.focusPrevious({
|
|
@@ -11335,12 +11515,9 @@ const GridFocusManager = ({
|
|
|
11335
11515
|
}
|
|
11336
11516
|
}
|
|
11337
11517
|
};
|
|
11338
|
-
const years = Array.from({
|
|
11339
|
-
length: 36
|
|
11340
|
-
}, (_, i) => i + (selectedYear - 30 / 2));
|
|
11341
11518
|
return years.map(year => /*#__PURE__*/jsxRuntime.jsx(GridColumn, {
|
|
11342
11519
|
$active: selectedYear === year,
|
|
11343
|
-
onKeyDown: onKeyDown,
|
|
11520
|
+
onKeyDown: onKeyDown(year),
|
|
11344
11521
|
onClick: () => setFocusedYear(year),
|
|
11345
11522
|
"aria-label": `Set year to ${year}`,
|
|
11346
11523
|
tabIndex: 0,
|
|
@@ -11349,7 +11526,9 @@ const GridFocusManager = ({
|
|
|
11349
11526
|
};
|
|
11350
11527
|
const YearGrid = ({
|
|
11351
11528
|
setFocusedYear,
|
|
11352
|
-
year: selectedYear
|
|
11529
|
+
year: selectedYear,
|
|
11530
|
+
yearPickerPage,
|
|
11531
|
+
setYearPickerPage
|
|
11353
11532
|
}) => {
|
|
11354
11533
|
return /*#__PURE__*/jsxRuntime.jsx(Grid, {
|
|
11355
11534
|
children: /*#__PURE__*/jsxRuntime.jsx(reactAria.FocusScope, {
|
|
@@ -11358,7 +11537,9 @@ const YearGrid = ({
|
|
|
11358
11537
|
autoFocus: true,
|
|
11359
11538
|
children: /*#__PURE__*/jsxRuntime.jsx(GridFocusManager, {
|
|
11360
11539
|
year: selectedYear,
|
|
11361
|
-
setFocusedYear: setFocusedYear
|
|
11540
|
+
setFocusedYear: setFocusedYear,
|
|
11541
|
+
yearPickerPage: yearPickerPage,
|
|
11542
|
+
setYearPickerPage: setYearPickerPage
|
|
11362
11543
|
})
|
|
11363
11544
|
})
|
|
11364
11545
|
});
|
|
@@ -11366,10 +11547,15 @@ const YearGrid = ({
|
|
|
11366
11547
|
|
|
11367
11548
|
/* eslint-disable react/no-array-index-key */
|
|
11368
11549
|
|
|
11550
|
+
/**
|
|
11551
|
+
* The grid laying out the cells for the calendars in {link Calendar} and {link RangeCalendar}
|
|
11552
|
+
*/
|
|
11369
11553
|
function CalendarGrid({
|
|
11370
11554
|
state,
|
|
11371
11555
|
showYearPicker,
|
|
11372
11556
|
setShowYearPicker,
|
|
11557
|
+
yearPickerPage,
|
|
11558
|
+
setYearPickerPage,
|
|
11373
11559
|
...props
|
|
11374
11560
|
}) {
|
|
11375
11561
|
const {
|
|
@@ -11394,7 +11580,9 @@ function CalendarGrid({
|
|
|
11394
11580
|
year
|
|
11395
11581
|
}));
|
|
11396
11582
|
setShowYearPicker(false);
|
|
11397
|
-
}
|
|
11583
|
+
},
|
|
11584
|
+
yearPickerPage: yearPickerPage,
|
|
11585
|
+
setYearPickerPage: setYearPickerPage
|
|
11398
11586
|
}) : /*#__PURE__*/jsxRuntime.jsxs("table", {
|
|
11399
11587
|
...gridProps,
|
|
11400
11588
|
style: {
|
|
@@ -11455,15 +11643,20 @@ function CalendarHeader({
|
|
|
11455
11643
|
previousMonthDisabled,
|
|
11456
11644
|
nextMonthDisabled,
|
|
11457
11645
|
showYearPicker,
|
|
11458
|
-
setShowYearPicker
|
|
11646
|
+
setShowYearPicker,
|
|
11647
|
+
setYearPickerPage,
|
|
11648
|
+
yearPickerPage
|
|
11459
11649
|
}) {
|
|
11650
|
+
const years = getPageYears(state.focusedDate.year, yearPickerPage);
|
|
11651
|
+
const backButtonDisabled = showYearPicker && state.minValue ? years[0] < state.minValue.year : previousMonthDisabled;
|
|
11652
|
+
const nextButtonDisabled = showYearPicker && state.maxValue ? years[years.length - 1] > state.maxValue.year : nextMonthDisabled;
|
|
11460
11653
|
return /*#__PURE__*/jsxRuntime.jsx(HeaderWrapper, {
|
|
11461
11654
|
children: /*#__PURE__*/jsxRuntime.jsxs(HeaderActions, {
|
|
11462
11655
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button$1, {
|
|
11463
11656
|
variant: 'ghost_icon',
|
|
11464
11657
|
"aria-label": 'Previous month',
|
|
11465
|
-
disabled:
|
|
11466
|
-
onClick: () => state.focusPreviousPage(),
|
|
11658
|
+
disabled: backButtonDisabled,
|
|
11659
|
+
onClick: () => showYearPicker ? setYearPickerPage(page => page - 1) : state.focusPreviousPage(),
|
|
11467
11660
|
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
11468
11661
|
data: edsIcons.chevron_left
|
|
11469
11662
|
})
|
|
@@ -11492,8 +11685,8 @@ function CalendarHeader({
|
|
|
11492
11685
|
}
|
|
11493
11686
|
}), /*#__PURE__*/jsxRuntime.jsx(Button$1, {
|
|
11494
11687
|
variant: 'ghost_icon',
|
|
11495
|
-
onClick: () => state.focusNextPage(),
|
|
11496
|
-
disabled:
|
|
11688
|
+
onClick: () => showYearPicker ? setYearPickerPage(page => page + 1) : state.focusNextPage(),
|
|
11689
|
+
disabled: nextButtonDisabled,
|
|
11497
11690
|
"aria-label": 'Next month',
|
|
11498
11691
|
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
11499
11692
|
data: edsIcons.chevron_right
|
|
@@ -11514,6 +11707,7 @@ const Calendar = /*#__PURE__*/react.forwardRef(({
|
|
|
11514
11707
|
...props
|
|
11515
11708
|
}, ref) => {
|
|
11516
11709
|
const [showYearPicker, setShowYearPicker] = react.useState(false);
|
|
11710
|
+
const [yearPickerPage, setYearPickerPage] = react.useState(0);
|
|
11517
11711
|
const {
|
|
11518
11712
|
locale
|
|
11519
11713
|
} = reactAria.useLocale();
|
|
@@ -11551,7 +11745,9 @@ const Calendar = /*#__PURE__*/react.forwardRef(({
|
|
|
11551
11745
|
previousMonthDisabled: prevButtonProps.isDisabled,
|
|
11552
11746
|
nextMonthDisabled: nextButtonProps.isDisabled,
|
|
11553
11747
|
setShowYearPicker: setShowYearPicker,
|
|
11554
|
-
showYearPicker: showYearPicker
|
|
11748
|
+
showYearPicker: showYearPicker,
|
|
11749
|
+
yearPickerPage: yearPickerPage,
|
|
11750
|
+
setYearPickerPage: setYearPickerPage
|
|
11555
11751
|
})
|
|
11556
11752
|
}), /*#__PURE__*/jsxRuntime.jsx(Popover.Content, {
|
|
11557
11753
|
className: "calendar",
|
|
@@ -11561,7 +11757,9 @@ const Calendar = /*#__PURE__*/react.forwardRef(({
|
|
|
11561
11757
|
children: /*#__PURE__*/jsxRuntime.jsx(CalendarGrid, {
|
|
11562
11758
|
state: calendarState,
|
|
11563
11759
|
setShowYearPicker: setShowYearPicker,
|
|
11564
|
-
showYearPicker: showYearPicker
|
|
11760
|
+
showYearPicker: showYearPicker,
|
|
11761
|
+
yearPickerPage: yearPickerPage,
|
|
11762
|
+
setYearPickerPage: setYearPickerPage
|
|
11565
11763
|
})
|
|
11566
11764
|
}), Footer && /*#__PURE__*/jsxRuntime.jsx(Popover.Actions, {
|
|
11567
11765
|
children: /*#__PURE__*/jsxRuntime.jsx(Footer, {
|
|
@@ -11698,7 +11896,6 @@ const FieldWrapper = /*#__PURE__*/react.forwardRef(({
|
|
|
11698
11896
|
onClose: () => setIsOpen(false),
|
|
11699
11897
|
anchorEl: ref.current,
|
|
11700
11898
|
placement: 'bottom-start',
|
|
11701
|
-
withinPortal: true,
|
|
11702
11899
|
children: calendar
|
|
11703
11900
|
})]
|
|
11704
11901
|
});
|
|
@@ -11796,12 +11993,9 @@ function DateSegment({
|
|
|
11796
11993
|
* A field that wraps segments for inputting a date / date-time
|
|
11797
11994
|
*/
|
|
11798
11995
|
const DateFieldSegments = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
11799
|
-
const {
|
|
11800
|
-
locale
|
|
11801
|
-
} = reactAria.useLocale();
|
|
11802
11996
|
const state = datepicker.useDateFieldState({
|
|
11803
11997
|
...props,
|
|
11804
|
-
locale,
|
|
11998
|
+
locale: props.locale,
|
|
11805
11999
|
createCalendar: date.createCalendar
|
|
11806
12000
|
});
|
|
11807
12001
|
const {
|
|
@@ -11814,7 +12008,8 @@ const DateFieldSegments = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
11814
12008
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
11815
12009
|
...fieldProps,
|
|
11816
12010
|
style: {
|
|
11817
|
-
display: 'flex'
|
|
12011
|
+
display: 'flex',
|
|
12012
|
+
fontFamily: 'Equinor, Arial, sans-serif'
|
|
11818
12013
|
},
|
|
11819
12014
|
ref: ref,
|
|
11820
12015
|
children: state.segments.map((segment, i) => /*#__PURE__*/jsxRuntime.jsx(DateSegment, {
|
|
@@ -11826,7 +12021,7 @@ const DateFieldSegments = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
11826
12021
|
DateFieldSegments.displayName = 'SingleDateField';
|
|
11827
12022
|
|
|
11828
12023
|
/**
|
|
11829
|
-
*
|
|
12024
|
+
* DateField is the input field used in {@link DatePicker} to type in a single date.
|
|
11830
12025
|
* Encapsulates styling / functionality for typing a date
|
|
11831
12026
|
*/
|
|
11832
12027
|
const DateField = /*#__PURE__*/react.forwardRef(function ({
|
|
@@ -11848,6 +12043,7 @@ const DateField = /*#__PURE__*/react.forwardRef(function ({
|
|
|
11848
12043
|
children: [/*#__PURE__*/jsxRuntime.jsx(DateFieldSegments, {
|
|
11849
12044
|
...state,
|
|
11850
12045
|
...fieldProps,
|
|
12046
|
+
locale: dateCreateProps.locale,
|
|
11851
12047
|
ref: inputRef
|
|
11852
12048
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
11853
12049
|
style: {
|
|
@@ -11893,7 +12089,10 @@ const Toggle = ({
|
|
|
11893
12089
|
showClearButton,
|
|
11894
12090
|
readonly
|
|
11895
12091
|
}) => {
|
|
11896
|
-
return
|
|
12092
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
12093
|
+
style: {
|
|
12094
|
+
visibility: readonly || disabled ? 'hidden' : 'visible'
|
|
12095
|
+
},
|
|
11897
12096
|
children: [showClearButton && /*#__PURE__*/jsxRuntime.jsx(StyledButton, {
|
|
11898
12097
|
disabled: disabled,
|
|
11899
12098
|
variant: 'ghost_icon',
|
|
@@ -11933,6 +12132,18 @@ const getCalendarDate = (value, timezone, showTimeInput = false) => {
|
|
|
11933
12132
|
return showTimeInput ? date.toCalendarDateTime(date.fromDate(value, timezone)) : date.toCalendarDate(date.fromDate(value, timezone));
|
|
11934
12133
|
};
|
|
11935
12134
|
|
|
12135
|
+
const useGetLocale = locale => {
|
|
12136
|
+
const {
|
|
12137
|
+
locale: currentLocale
|
|
12138
|
+
} = reactAria.useLocale();
|
|
12139
|
+
// Priority:
|
|
12140
|
+
// 1. Explicitly passed locale prop
|
|
12141
|
+
// 2. Locale from I18nProvider
|
|
12142
|
+
// 3. Fallback to browser's default
|
|
12143
|
+
const browserLocale = new Intl.DateTimeFormat().resolvedOptions().locale;
|
|
12144
|
+
return locale ?? currentLocale ?? browserLocale;
|
|
12145
|
+
};
|
|
12146
|
+
|
|
11936
12147
|
const DatePicker = /*#__PURE__*/react.forwardRef(({
|
|
11937
12148
|
onChange,
|
|
11938
12149
|
label,
|
|
@@ -11943,6 +12154,7 @@ const DatePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
11943
12154
|
Footer,
|
|
11944
12155
|
Header,
|
|
11945
12156
|
timezone,
|
|
12157
|
+
locale: propLocale,
|
|
11946
12158
|
defaultValue,
|
|
11947
12159
|
showTimeInput,
|
|
11948
12160
|
granularity,
|
|
@@ -12002,16 +12214,14 @@ const DatePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
12002
12214
|
}
|
|
12003
12215
|
}, [onChange, isOpen, showTimeInput, timezone]);
|
|
12004
12216
|
const _value = getCalendarDate(value, timezone, showTimeInput) ?? innerValue;
|
|
12005
|
-
const
|
|
12006
|
-
locale
|
|
12007
|
-
} = reactAria.useLocale();
|
|
12217
|
+
const locale = useGetLocale(propLocale);
|
|
12008
12218
|
const dateCreateProps = {
|
|
12009
12219
|
helperProps,
|
|
12010
12220
|
variant,
|
|
12011
12221
|
isDisabled,
|
|
12012
12222
|
value: _value,
|
|
12013
12223
|
hideTimeZone: true,
|
|
12014
|
-
locale,
|
|
12224
|
+
locale: locale,
|
|
12015
12225
|
createCalendar: date.createCalendar,
|
|
12016
12226
|
onChange: _onChange,
|
|
12017
12227
|
minValue: _minValue,
|
|
@@ -12042,49 +12252,52 @@ const DatePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
12042
12252
|
react.useEffect(() => {
|
|
12043
12253
|
if (!defaultValue && !value) setInnerValue(null);
|
|
12044
12254
|
}, [defaultValue, value]);
|
|
12045
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
label: label,
|
|
12056
|
-
calendar: /*#__PURE__*/jsxRuntime.jsx(Calendar, {
|
|
12057
|
-
ref: pickerRef,
|
|
12058
|
-
Footer: Footer,
|
|
12059
|
-
Header: Header,
|
|
12060
|
-
...calendarProps
|
|
12061
|
-
}),
|
|
12062
|
-
disabled: isDisabled,
|
|
12063
|
-
readOnly: isReadOnly,
|
|
12064
|
-
color: pickerState.isInvalid ? 'warning' : variant,
|
|
12065
|
-
helperProps: helperPropsInvalid ?? helperProps,
|
|
12066
|
-
children: /*#__PURE__*/jsxRuntime.jsx(DateField, {
|
|
12067
|
-
fieldProps: fieldProps,
|
|
12068
|
-
groupProps: groupProps,
|
|
12069
|
-
dateCreateProps: dateCreateProps,
|
|
12255
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactAria.I18nProvider, {
|
|
12256
|
+
locale: locale,
|
|
12257
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DatePickerProvider, {
|
|
12258
|
+
timezone: timezone,
|
|
12259
|
+
formatOptions: formatOptions,
|
|
12260
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FieldWrapper, {
|
|
12261
|
+
...props,
|
|
12262
|
+
isOpen: isOpen,
|
|
12263
|
+
readonly: fieldProps.isReadOnly,
|
|
12264
|
+
pickerRef: pickerRef,
|
|
12070
12265
|
ref: ref,
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
readonly: isReadOnly,
|
|
12079
|
-
reset: () => _onChange(null),
|
|
12080
|
-
buttonProps: buttonProps,
|
|
12081
|
-
valueString: pickerState.formatValue(locale, {
|
|
12082
|
-
year: 'numeric',
|
|
12083
|
-
month: 'short',
|
|
12084
|
-
day: '2-digit'
|
|
12085
|
-
})
|
|
12266
|
+
setIsOpen: setIsOpen,
|
|
12267
|
+
label: label,
|
|
12268
|
+
calendar: /*#__PURE__*/jsxRuntime.jsx(Calendar, {
|
|
12269
|
+
ref: pickerRef,
|
|
12270
|
+
Footer: Footer,
|
|
12271
|
+
Header: Header,
|
|
12272
|
+
...calendarProps
|
|
12086
12273
|
}),
|
|
12087
|
-
|
|
12274
|
+
disabled: isDisabled,
|
|
12275
|
+
readOnly: isReadOnly,
|
|
12276
|
+
color: pickerState.isInvalid ? 'warning' : variant,
|
|
12277
|
+
helperProps: helperPropsInvalid ?? helperProps,
|
|
12278
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DateField, {
|
|
12279
|
+
fieldProps: fieldProps,
|
|
12280
|
+
groupProps: groupProps,
|
|
12281
|
+
dateCreateProps: dateCreateProps,
|
|
12282
|
+
ref: ref,
|
|
12283
|
+
onChange: _onChange,
|
|
12284
|
+
rightAdornments: /*#__PURE__*/jsxRuntime.jsx(Toggle, {
|
|
12285
|
+
showClearButton: showClearButton,
|
|
12286
|
+
setOpen: setIsOpen,
|
|
12287
|
+
open: isOpen,
|
|
12288
|
+
icon: edsIcons.calendar,
|
|
12289
|
+
disabled: isDisabled,
|
|
12290
|
+
readonly: isReadOnly,
|
|
12291
|
+
reset: () => _onChange(null),
|
|
12292
|
+
buttonProps: buttonProps,
|
|
12293
|
+
valueString: pickerState.formatValue(locale, {
|
|
12294
|
+
year: 'numeric',
|
|
12295
|
+
month: 'short',
|
|
12296
|
+
day: '2-digit'
|
|
12297
|
+
})
|
|
12298
|
+
}),
|
|
12299
|
+
variant: variant
|
|
12300
|
+
})
|
|
12088
12301
|
})
|
|
12089
12302
|
})
|
|
12090
12303
|
});
|
|
@@ -12097,6 +12310,7 @@ const RangeCalendar = /*#__PURE__*/react.forwardRef(({
|
|
|
12097
12310
|
...props
|
|
12098
12311
|
}, ref) => {
|
|
12099
12312
|
const [showYearPicker, setShowYearPicker] = react.useState(false);
|
|
12313
|
+
const [yearPickerPage, setYearPickerPage] = react.useState(0);
|
|
12100
12314
|
const {
|
|
12101
12315
|
locale
|
|
12102
12316
|
} = reactAria.useLocale();
|
|
@@ -12127,13 +12341,17 @@ const RangeCalendar = /*#__PURE__*/react.forwardRef(({
|
|
|
12127
12341
|
state: state,
|
|
12128
12342
|
title: title,
|
|
12129
12343
|
setShowYearPicker: setShowYearPicker,
|
|
12130
|
-
showYearPicker: showYearPicker
|
|
12344
|
+
showYearPicker: showYearPicker,
|
|
12345
|
+
setYearPickerPage: setYearPickerPage,
|
|
12346
|
+
yearPickerPage: yearPickerPage
|
|
12131
12347
|
})
|
|
12132
12348
|
}), /*#__PURE__*/jsxRuntime.jsx(Popover.Content, {
|
|
12133
12349
|
children: /*#__PURE__*/jsxRuntime.jsx(CalendarGrid, {
|
|
12134
12350
|
state: state,
|
|
12135
12351
|
setShowYearPicker: setShowYearPicker,
|
|
12136
|
-
showYearPicker: showYearPicker
|
|
12352
|
+
showYearPicker: showYearPicker,
|
|
12353
|
+
yearPickerPage: yearPickerPage,
|
|
12354
|
+
setYearPickerPage: setYearPickerPage
|
|
12137
12355
|
})
|
|
12138
12356
|
}), Footer && /*#__PURE__*/jsxRuntime.jsx(Popover.Actions, {
|
|
12139
12357
|
children: /*#__PURE__*/jsxRuntime.jsx(Footer, {
|
|
@@ -12167,8 +12385,9 @@ const DateRangeField = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
12167
12385
|
...props.groupProps,
|
|
12168
12386
|
children: [/*#__PURE__*/jsxRuntime.jsx(DateFieldSegments, {
|
|
12169
12387
|
...props.startFieldProps,
|
|
12170
|
-
ref: fromRef
|
|
12171
|
-
|
|
12388
|
+
ref: fromRef,
|
|
12389
|
+
locale: props.locale
|
|
12390
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
12172
12391
|
as: 'span',
|
|
12173
12392
|
variant: 'text',
|
|
12174
12393
|
group: 'input',
|
|
@@ -12178,7 +12397,8 @@ const DateRangeField = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
12178
12397
|
children: "\u2014"
|
|
12179
12398
|
}), /*#__PURE__*/jsxRuntime.jsx(DateFieldSegments, {
|
|
12180
12399
|
...props.endFieldProps,
|
|
12181
|
-
ref: toRef
|
|
12400
|
+
ref: toRef,
|
|
12401
|
+
locale: props.locale
|
|
12182
12402
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
12183
12403
|
style: {
|
|
12184
12404
|
flex: '1 1 auto'
|
|
@@ -12199,6 +12419,7 @@ const DateRangePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
12199
12419
|
Header,
|
|
12200
12420
|
timezone,
|
|
12201
12421
|
defaultValue,
|
|
12422
|
+
locale: propLocale,
|
|
12202
12423
|
formatOptions,
|
|
12203
12424
|
hideClearButton,
|
|
12204
12425
|
disabled: isDisabled,
|
|
@@ -12224,9 +12445,7 @@ const DateRangePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
12224
12445
|
const inputRef = react.useRef(null);
|
|
12225
12446
|
const pickerRef = react.useRef(null);
|
|
12226
12447
|
const ref = forwardedRef || inputRef;
|
|
12227
|
-
const
|
|
12228
|
-
locale
|
|
12229
|
-
} = reactAria.useLocale();
|
|
12448
|
+
const locale = useGetLocale(propLocale);
|
|
12230
12449
|
const {
|
|
12231
12450
|
_minValue,
|
|
12232
12451
|
_maxValue,
|
|
@@ -12292,46 +12511,51 @@ const DateRangePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
12292
12511
|
if (!defaultValue && !value) setInnerValue(null);
|
|
12293
12512
|
if (!val?.from && !val?.to) setInnerValue(null);
|
|
12294
12513
|
}, [defaultValue, value]);
|
|
12295
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
label: label,
|
|
12307
|
-
calendar: /*#__PURE__*/jsxRuntime.jsx(RangeCalendar, {
|
|
12308
|
-
ref: pickerRef,
|
|
12309
|
-
maxValue: _maxValue,
|
|
12310
|
-
minValue: _minValue,
|
|
12311
|
-
isDateUnavailable: _isDateUnavailable,
|
|
12312
|
-
Footer: Footer,
|
|
12313
|
-
Header: Header,
|
|
12314
|
-
...calendarProps
|
|
12315
|
-
}),
|
|
12316
|
-
children: /*#__PURE__*/jsxRuntime.jsx(DateRangeField, {
|
|
12317
|
-
startFieldProps: startFieldProps,
|
|
12318
|
-
endFieldProps: endFieldProps,
|
|
12319
|
-
groupProps: groupProps,
|
|
12514
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactAria.I18nProvider, {
|
|
12515
|
+
locale: locale,
|
|
12516
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DatePickerProvider, {
|
|
12517
|
+
timezone: timezone,
|
|
12518
|
+
formatOptions: formatOptions,
|
|
12519
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FieldWrapper, {
|
|
12520
|
+
...props,
|
|
12521
|
+
isOpen: isOpen,
|
|
12522
|
+
color: state.isInvalid ? 'warning' : props.variant,
|
|
12523
|
+
helperProps: helperProps ?? props.helperProps,
|
|
12524
|
+
readonly: startFieldProps.isReadOnly,
|
|
12320
12525
|
ref: ref,
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
|
|
12325
|
-
|
|
12526
|
+
pickerRef: pickerRef,
|
|
12527
|
+
setIsOpen: setIsOpen,
|
|
12528
|
+
label: label,
|
|
12529
|
+
calendar: /*#__PURE__*/jsxRuntime.jsx(RangeCalendar, {
|
|
12530
|
+
ref: pickerRef,
|
|
12531
|
+
maxValue: _maxValue,
|
|
12532
|
+
minValue: _minValue,
|
|
12533
|
+
isDateUnavailable: _isDateUnavailable,
|
|
12534
|
+
Footer: Footer,
|
|
12535
|
+
Header: Header,
|
|
12536
|
+
...calendarProps
|
|
12537
|
+
}),
|
|
12538
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DateRangeField, {
|
|
12539
|
+
startFieldProps: startFieldProps,
|
|
12540
|
+
endFieldProps: endFieldProps,
|
|
12541
|
+
groupProps: groupProps,
|
|
12542
|
+
ref: ref,
|
|
12543
|
+
variant: props.variant,
|
|
12326
12544
|
disabled: isDisabled,
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12545
|
+
locale: locale,
|
|
12546
|
+
rightAdornments: /*#__PURE__*/jsxRuntime.jsx(Toggle, {
|
|
12547
|
+
showClearButton: showClearButton,
|
|
12548
|
+
buttonProps: buttonProps,
|
|
12549
|
+
disabled: isDisabled,
|
|
12550
|
+
readonly: isReadOnly,
|
|
12551
|
+
reset: () => {
|
|
12552
|
+
_onChange(null);
|
|
12553
|
+
},
|
|
12554
|
+
setOpen: setIsOpen,
|
|
12555
|
+
open: isOpen,
|
|
12556
|
+
icon: edsIcons.calendar_date_range,
|
|
12557
|
+
valueString: valueString
|
|
12558
|
+
})
|
|
12335
12559
|
})
|
|
12336
12560
|
})
|
|
12337
12561
|
})
|
|
@@ -12340,51 +12564,97 @@ const DateRangePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
12340
12564
|
DateRangePicker.displayName = 'DateRangePicker';
|
|
12341
12565
|
|
|
12342
12566
|
exports.Accordion = Accordion;
|
|
12567
|
+
exports.AccordionHeader = AccordionHeader$1;
|
|
12568
|
+
exports.AccordionHeaderActions = AccordionHeaderActions;
|
|
12569
|
+
exports.AccordionHeaderTitle = AccordionHeaderTitle;
|
|
12570
|
+
exports.AccordionItem = AccordionItem;
|
|
12571
|
+
exports.AccordionPanel = AccordionPanel;
|
|
12343
12572
|
exports.Autocomplete = Autocomplete;
|
|
12344
12573
|
exports.Avatar = Avatar;
|
|
12345
12574
|
exports.Banner = Banner;
|
|
12346
|
-
exports.
|
|
12575
|
+
exports.BannerActions = BannerActions;
|
|
12576
|
+
exports.BannerIcon = BannerIcon;
|
|
12577
|
+
exports.BannerMessage = BannerMessage;
|
|
12578
|
+
exports.Breadcrumb = Breadcrumb;
|
|
12347
12579
|
exports.Breadcrumbs = Breadcrumbs;
|
|
12348
12580
|
exports.Button = Button$1;
|
|
12581
|
+
exports.ButtonGroup = ButtonGroup;
|
|
12349
12582
|
exports.Card = Card;
|
|
12583
|
+
exports.CardActions = CardActions;
|
|
12584
|
+
exports.CardContent = CardContent;
|
|
12585
|
+
exports.CardHeader = CardHeader;
|
|
12586
|
+
exports.CardHeaderTitle = CardHeaderTitle;
|
|
12587
|
+
exports.CardMedia = CardMedia;
|
|
12350
12588
|
exports.Checkbox = Checkbox;
|
|
12351
12589
|
exports.Chip = Chip;
|
|
12352
12590
|
exports.CircularProgress = CircularProgress;
|
|
12353
12591
|
exports.DatePicker = DatePicker;
|
|
12354
12592
|
exports.DateRangePicker = DateRangePicker;
|
|
12355
12593
|
exports.Dialog = Dialog;
|
|
12594
|
+
exports.DialogActions = DialogActions;
|
|
12595
|
+
exports.DialogContent = DialogContent;
|
|
12596
|
+
exports.DialogHeader = DialogHeader;
|
|
12597
|
+
exports.DialogTitle = DialogTitle;
|
|
12356
12598
|
exports.Divider = Divider;
|
|
12357
12599
|
exports.DotProgress = DotProgress;
|
|
12358
12600
|
exports.EdsProvider = EdsProvider;
|
|
12359
|
-
exports.Heading = Heading;
|
|
12360
12601
|
exports.Icon = Icon$1;
|
|
12361
12602
|
exports.Input = Input$4;
|
|
12362
12603
|
exports.InputWrapper = InputWrapper$2;
|
|
12363
|
-
exports.Label = Label$
|
|
12604
|
+
exports.Label = Label$2;
|
|
12364
12605
|
exports.LinearProgress = LinearProgress;
|
|
12365
12606
|
exports.List = List$1;
|
|
12607
|
+
exports.ListItem = ListItem$2;
|
|
12366
12608
|
exports.Menu = Menu;
|
|
12609
|
+
exports.MenuItem = MenuItem$1;
|
|
12610
|
+
exports.MenuSection = MenuSection;
|
|
12367
12611
|
exports.NativeSelect = NativeSelect;
|
|
12368
12612
|
exports.Pagination = Pagination;
|
|
12369
12613
|
exports.Paper = Paper;
|
|
12370
12614
|
exports.Popover = Popover;
|
|
12615
|
+
exports.PopoverActions = PopoverActions;
|
|
12616
|
+
exports.PopoverContent = PopoverContent;
|
|
12617
|
+
exports.PopoverHeader = PopoverHeader;
|
|
12618
|
+
exports.PopoverTitle = PopoverTitle;
|
|
12371
12619
|
exports.Progress = Progress;
|
|
12372
12620
|
exports.Radio = Radio;
|
|
12373
12621
|
exports.Scrim = Scrim;
|
|
12374
12622
|
exports.Search = Search;
|
|
12375
12623
|
exports.SideBar = SideBar;
|
|
12624
|
+
exports.SideBarAccordion = SideBarAccordion;
|
|
12625
|
+
exports.SideBarAccordionItem = SideBarAccordionItem;
|
|
12626
|
+
exports.SideBarButton = SideBarButton;
|
|
12627
|
+
exports.SideBarContent = SideBarContent;
|
|
12628
|
+
exports.SideBarFooter = SideBarFooter;
|
|
12629
|
+
exports.SideBarToggle = SideBarToggle;
|
|
12376
12630
|
exports.SideSheet = SideSheet;
|
|
12631
|
+
exports.SidebarLink = SidebarLink;
|
|
12377
12632
|
exports.Slider = Slider;
|
|
12378
12633
|
exports.Snackbar = Snackbar;
|
|
12634
|
+
exports.SnackbarAction = SnackbarAction;
|
|
12379
12635
|
exports.StarProgress = StarProgress;
|
|
12380
12636
|
exports.Switch = Switch;
|
|
12637
|
+
exports.Tab = Tab;
|
|
12638
|
+
exports.TabList = TabList;
|
|
12639
|
+
exports.TabPanel = TabPanel;
|
|
12640
|
+
exports.TabPanels = TabPanels;
|
|
12381
12641
|
exports.Table = Table;
|
|
12642
|
+
exports.TableBody = Body;
|
|
12643
|
+
exports.TableCaption = Caption;
|
|
12644
|
+
exports.TableCell = Cell;
|
|
12645
|
+
exports.TableFoot = Foot;
|
|
12646
|
+
exports.TableHead = Head;
|
|
12382
12647
|
exports.TableOfContents = TableOfContents;
|
|
12648
|
+
exports.TableOfContentsLinkItem = LinkItem;
|
|
12649
|
+
exports.TableRow = Row;
|
|
12383
12650
|
exports.Tabs = Tabs;
|
|
12384
12651
|
exports.TextField = TextField;
|
|
12652
|
+
exports.ToggleButton = ToggleButton;
|
|
12385
12653
|
exports.Tooltip = Tooltip$2;
|
|
12386
12654
|
exports.TopBar = TopBar;
|
|
12387
|
-
exports.
|
|
12388
|
-
exports.
|
|
12655
|
+
exports.TopbarActions = Actions;
|
|
12656
|
+
exports.TopbarCustomContent = CustomContent;
|
|
12657
|
+
exports.TopbarHeader = Header$2;
|
|
12658
|
+
exports.Typography = Typography;
|
|
12389
12659
|
exports.useEds = useEds;
|
|
12390
12660
|
exports.useSideBar = useSideBar;
|