@jobber/components 6.26.0 → 6.26.2
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/AnimatedPresence-es.js +4 -4
- package/dist/AnimatedSwitcher-es.js +4 -4
- package/dist/AtlantisThemeContext-es.js +6 -6
- package/dist/Autocomplete-es.js +27 -27
- package/dist/Avatar-es.js +4 -4
- package/dist/Banner-es.js +13 -13
- package/dist/BannerIcon-es.js +3 -3
- package/dist/Body-es.js +12 -12
- package/dist/Box-es.js +2 -2
- package/dist/Button-es.js +13 -13
- package/dist/ButtonDismiss-es.js +2 -2
- package/dist/Card-es.js +15 -15
- package/dist/Checkbox/index.mjs +24 -24
- package/dist/Chip-es.js +17 -17
- package/dist/ChipDismissible-es.js +7 -7
- package/dist/Chips/index.mjs +3 -3
- package/dist/Chips-es.js +13 -13
- package/dist/Combobox/components/ComboboxContent/index.cjs +0 -2
- package/dist/Combobox/components/ComboboxContent/index.mjs +0 -2
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +3 -8
- package/dist/Combobox/index.cjs +1 -2
- package/dist/Combobox/index.mjs +1 -2
- package/dist/Combobox-es.js +6 -6
- package/dist/ComboboxAction-es.js +4 -4
- package/dist/ComboboxActivator-es.js +3 -3
- package/dist/ComboboxContent-cjs.js +3745 -39
- package/dist/ComboboxContent-es.js +3715 -27
- package/dist/ComboboxContentHeader-es.js +4 -4
- package/dist/ComboboxContentList-es.js +13 -13
- package/dist/ComboboxContentSearch-es.js +5 -5
- package/dist/ComboboxLoadMore-es.js +2 -2
- package/dist/ComboboxOption-es.js +6 -6
- package/dist/ComboboxProvider-es.js +3 -3
- package/dist/ComboboxTrigger-es.js +4 -4
- package/dist/ConfirmationModal-es.js +4 -4
- package/dist/Countdown-es.js +3 -3
- package/dist/DataDump-es.js +7 -7
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +1 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +1 -2
- package/dist/DataList/components/DataListFilters/index.cjs +2 -2
- package/dist/DataList/components/DataListFilters/index.mjs +2 -2
- package/dist/DataList-es.js +21 -21
- package/dist/DataList.utils-es.js +7 -7
- package/dist/DataListAction-es.js +9 -9
- package/dist/DataListActions-es.js +6 -6
- package/dist/DataListActionsMenu-es.js +4 -4
- package/dist/DataListBulkActions-es.js +3 -3
- package/dist/DataListContext-es.js +6 -6
- package/dist/DataListEmptyState-es.js +3 -3
- package/dist/DataListFilters-es.js +3 -3
- package/dist/DataListHeader-es.js +12 -12
- package/dist/DataListHeaderTile-es.js +9 -9
- package/dist/DataListItem-es.js +10 -10
- package/dist/DataListItemActions-es.js +3 -3
- package/dist/DataListItemActionsOverflow-es.js +5 -5
- package/dist/DataListItemClickable-es.js +8 -8
- package/dist/DataListItems-es.js +3 -3
- package/dist/DataListLayout-es.js +2 -2
- package/dist/DataListLayoutActions-es.js +6 -6
- package/dist/DataListLoadMore-es.js +8 -8
- package/dist/DataListLoadingState-es.js +4 -4
- package/dist/DataListOverflowFade-es.js +6 -6
- package/dist/DataListSearch-es.js +6 -6
- package/dist/DataListSort-es.js +6 -6
- package/dist/DataListSortingOptions-es.js +3 -3
- package/dist/DataListStatusBar-es.js +2 -2
- package/dist/DataListStickyHeader-es.js +2 -2
- package/dist/DataListTags-es.js +7 -7
- package/dist/DataListTotalCount-es.js +6 -6
- package/dist/DataTable-es.js +45 -45
- package/dist/DatePicker-es.js +12 -12
- package/dist/DayOfMonthSelect-es.js +18 -18
- package/dist/DescriptionList-es.js +4 -4
- package/dist/Disclosure-es.js +10 -10
- package/dist/Divider-es.js +2 -2
- package/dist/DrawerGrid-es.js +11 -11
- package/dist/Emphasis-es.js +2 -2
- package/dist/FeatureSwitch-es.js +17 -17
- package/dist/Flex-es.js +2 -2
- package/dist/Form-es.js +3 -3
- package/dist/FormField/FormFieldTypes.d.ts +6 -0
- package/dist/FormField/hooks/useAtlantisFormField.d.ts +2 -2
- package/dist/FormField-cjs.js +12 -4
- package/dist/FormField-es.js +50 -42
- package/dist/FormatDate-es.js +2 -2
- package/dist/FormatEmail-es.js +2 -2
- package/dist/FormatFile-es.js +23 -23
- package/dist/FormatRelativeDateTime-es.js +6 -6
- package/dist/FormatTime-es.js +2 -2
- package/dist/Gallery-es.js +8 -8
- package/dist/Glimmer-es.js +11 -11
- package/dist/Grid-es.js +2 -2
- package/dist/GridCell-es.js +2 -2
- package/dist/Heading-es.js +2 -2
- package/dist/Icon-es.js +9 -9
- package/dist/InlineLabel-es.js +3 -3
- package/dist/InputAvatar-es.js +11 -11
- package/dist/InputDate/index.cjs +1 -1
- package/dist/InputDate/index.mjs +10 -10
- package/dist/InputEmail-cjs.js +1 -1
- package/dist/InputEmail-es.js +3 -3
- package/dist/InputFile-es.js +20 -20
- package/dist/InputGroup-es.js +4 -4
- package/dist/InputNumber-cjs.js +1 -1
- package/dist/InputNumber-es.js +3 -3
- package/dist/InputPassword-cjs.js +1 -1
- package/dist/InputPassword-es.js +3 -3
- package/dist/InputPhoneNumber-cjs.js +2 -2
- package/dist/InputPhoneNumber-es.js +7 -7
- package/dist/InputText/index.cjs +1 -1
- package/dist/InputText/index.mjs +13 -13
- package/dist/InputTime-cjs.js +1 -1
- package/dist/InputTime-es.js +3 -3
- package/dist/InputValidation-es.js +5 -5
- package/dist/InternalChipDismissible-es.js +19 -19
- package/dist/LightBox-es.js +31 -31
- package/dist/Link-es.js +2 -2
- package/dist/List-es.js +29 -29
- package/dist/Markdown-es.js +15 -15
- package/dist/Menu-es.js +21 -21
- package/dist/Modal-es.js +18 -18
- package/dist/MultiSelect-es.js +9 -9
- package/dist/Option-cjs.js +1 -1
- package/dist/Option-es.js +4 -4
- package/dist/Page-es.js +23 -23
- package/dist/Popover-es.js +7 -7
- package/dist/ProgressBar-es.js +5 -5
- package/dist/RadioGroup-es.js +9 -9
- package/dist/RecurringSelect-es.js +19 -19
- package/dist/SegmentedControl-es.js +9 -9
- package/dist/Select/Select.d.ts +1 -1
- package/dist/SideDrawer-es.js +22 -22
- package/dist/Spinner-es.js +2 -2
- package/dist/StatusIndicator-es.js +2 -2
- package/dist/StatusLabel-es.js +5 -5
- package/dist/Switch-es.js +10 -10
- package/dist/Tabs-es.js +14 -14
- package/dist/Text-es.js +2 -2
- package/dist/Tooltip-es.js +9 -9
- package/dist/Typography-es.js +2 -2
- package/dist/showToast-es.js +11 -11
- package/dist/styles.css +5 -2
- package/dist/useChildComponent-es.js +2 -2
- package/dist/useFocusTrap-es.js +2 -2
- package/dist/useInView-es.js +2 -2
- package/dist/useIsMounted-es.js +2 -2
- package/dist/useOnKeyDown-es.js +2 -2
- package/dist/useRefocusOnActivator-es.js +2 -2
- package/dist/useResizeObserver-es.js +3 -3
- package/dist/useSafeLayoutEffect-es.js +2 -2
- package/dist/useScrollToActive-es.js +3 -3
- package/package.json +3 -2
package/dist/InputNumber-cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var FormField = require('./FormField-cjs.js');
|
|
5
|
+
require('classnames');
|
|
5
6
|
require('./tslib.es6-cjs.js');
|
|
6
7
|
require('react-hook-form');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
function InputNumberInternal(props, ref) {
|
package/dist/InputNumber-es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { forwardRef, createRef, useImperativeHandle } from 'react';
|
|
2
2
|
import { k as FormField } from './FormField-es.js';
|
|
3
|
+
import 'classnames';
|
|
3
4
|
import './tslib.es6-es.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
function InputNumberInternal(props, ref) {
|
|
@@ -24,7 +24,7 @@ function InputNumberInternal(props, ref) {
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
}));
|
|
27
|
-
return (
|
|
27
|
+
return (React__default.createElement(FormField, Object.assign({}, props, { type: "number", inputRef: inputRef, onChange: handleChange, validations: Object.assign(Object.assign({}, props.validations), { validate: customValidators((_a = props.validations) === null || _a === void 0 ? void 0 : _a.validate) }) })));
|
|
28
28
|
function customValidators(validators) {
|
|
29
29
|
if (validators == null) {
|
|
30
30
|
return getOverLimitMessage;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var FormField = require('./FormField-cjs.js');
|
|
5
|
+
require('classnames');
|
|
5
6
|
require('./tslib.es6-cjs.js');
|
|
6
7
|
require('react-hook-form');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
function InputPassword(props) {
|
package/dist/InputPassword-es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState } from 'react';
|
|
2
2
|
import { k as FormField } from './FormField-es.js';
|
|
3
|
+
import 'classnames';
|
|
3
4
|
import './tslib.es6-es.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
function InputPassword(props) {
|
|
11
11
|
const { hasVisibility = false } = props;
|
|
12
12
|
const [visible, setVisibility] = useState(false);
|
|
13
|
-
return (
|
|
13
|
+
return (React__default.createElement(FormField, Object.assign({}, props, (hasVisibility && {
|
|
14
14
|
suffix: {
|
|
15
15
|
ariaLabel: visible ? "Hide password" : "Show password",
|
|
16
16
|
icon: visible ? "eye" : "eyeCrossed",
|
|
@@ -4,9 +4,9 @@ var tslib_es6 = require('./tslib.es6-cjs.js');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactHookForm = require('react-hook-form');
|
|
6
6
|
var FormField = require('./FormField-cjs.js');
|
|
7
|
+
require('classnames');
|
|
7
8
|
require('framer-motion');
|
|
8
9
|
require('@jobber/design');
|
|
9
|
-
require('classnames');
|
|
10
10
|
require('./Button-cjs.js');
|
|
11
11
|
|
|
12
12
|
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","spinning":"T3VvmDmzs-4-"};
|
|
@@ -73,7 +73,7 @@ function InputPhoneNumber(_a) {
|
|
|
73
73
|
: // If there isn't a Form Context being provided, get a form for this field.
|
|
74
74
|
reactHookForm.useForm({ mode: "onTouched" });
|
|
75
75
|
return (React.createElement(InputMask, { pattern: pattern, strict: false },
|
|
76
|
-
React.createElement(FormField.FormField, Object.assign({}, props, { type: "tel", validations: Object.assign(Object.assign({ required: {
|
|
76
|
+
React.createElement(FormField.FormField, Object.assign({}, props, { type: "tel", pattern: pattern, validations: Object.assign(Object.assign({ required: {
|
|
77
77
|
value: Boolean(required),
|
|
78
78
|
message: `${errorSubject} is required`,
|
|
79
79
|
} }, validations), { validate: getPhoneNumberValidation }) }))));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _ as __rest } from './tslib.es6-es.js';
|
|
2
|
-
import
|
|
2
|
+
import React__default, { useState, cloneElement } from 'react';
|
|
3
3
|
import { useFormContext, useForm } from 'react-hook-form';
|
|
4
4
|
import { k as FormField } from './FormField-es.js';
|
|
5
|
+
import 'classnames';
|
|
5
6
|
import 'framer-motion';
|
|
6
7
|
import '@jobber/design';
|
|
7
|
-
import 'classnames';
|
|
8
8
|
import './Button-es.js';
|
|
9
9
|
|
|
10
10
|
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","spinning":"T3VvmDmzs-4-"};
|
|
@@ -16,9 +16,9 @@ function InputMask({ children, delimiter = "*", pattern, strict = true, }) {
|
|
|
16
16
|
const placeholderValue = pattern
|
|
17
17
|
.replace(new RegExp(`\\${delimiter}`, "g"), "_")
|
|
18
18
|
.slice(stringifiedValue.length);
|
|
19
|
-
const inputMask = (
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const inputMask = (React__default.createElement("div", { className: styles.mask, "aria-hidden": "true" },
|
|
20
|
+
React__default.createElement("span", { className: styles.hiddenValue }, stringifiedValue),
|
|
21
|
+
React__default.createElement("span", null, placeholderValue)));
|
|
22
22
|
return cloneElement(children, {
|
|
23
23
|
onChange: handleChange,
|
|
24
24
|
children: isMasking && inputMask,
|
|
@@ -70,8 +70,8 @@ function InputPhoneNumber(_a) {
|
|
|
70
70
|
? useFormContext()
|
|
71
71
|
: // If there isn't a Form Context being provided, get a form for this field.
|
|
72
72
|
useForm({ mode: "onTouched" });
|
|
73
|
-
return (
|
|
74
|
-
|
|
73
|
+
return (React__default.createElement(InputMask, { pattern: pattern, strict: false },
|
|
74
|
+
React__default.createElement(FormField, Object.assign({}, props, { type: "tel", pattern: pattern, validations: Object.assign(Object.assign({ required: {
|
|
75
75
|
value: Boolean(required),
|
|
76
76
|
message: `${errorSubject} is required`,
|
|
77
77
|
} }, validations), { validate: getPhoneNumberValidation }) }))));
|
package/dist/InputText/index.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var useSafeLayoutEffect = require('../useSafeLayoutEffect-cjs.js');
|
|
5
5
|
var FormField = require('../FormField-cjs.js');
|
|
6
|
+
require('classnames');
|
|
6
7
|
var tslib_es6 = require('../tslib.es6-cjs.js');
|
|
7
8
|
require('react-hook-form');
|
|
8
9
|
require('framer-motion');
|
|
9
10
|
require('@jobber/design');
|
|
10
|
-
require('classnames');
|
|
11
11
|
require('../Button-cjs.js');
|
|
12
12
|
var omit = require('../omit-cjs.js');
|
|
13
13
|
require('../Icon-cjs.js');
|
package/dist/InputText/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { forwardRef, useRef, useImperativeHandle, useId } from 'react';
|
|
2
2
|
import { u as useSafeLayoutEffect_1 } from '../useSafeLayoutEffect-es.js';
|
|
3
3
|
import { k as FormField, s as styles, j as useFormFieldWrapperStyles, b as useAtlantisFormFieldName, f as FormFieldWrapper, l as FormFieldPostFix, m as mergeRefs } from '../FormField-es.js';
|
|
4
|
+
import 'classnames';
|
|
4
5
|
import { _ as __rest } from '../tslib.es6-es.js';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
import 'framer-motion';
|
|
7
8
|
import '@jobber/design';
|
|
8
|
-
import 'classnames';
|
|
9
9
|
import '../Button-es.js';
|
|
10
10
|
import { o as omit } from '../omit-es.js';
|
|
11
11
|
import '../Icon-es.js';
|
|
@@ -125,7 +125,7 @@ function InputTextInternal(props, ref) {
|
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
}));
|
|
128
|
-
return (
|
|
128
|
+
return (React__default.createElement(FormField, Object.assign({}, props, { type: props.multiline ? "textarea" : "text", inputRef: inputRef, actionsRef: actionsRef, wrapperRef: wrapperRef, onChange: handleChange, rows: rowRange.min })));
|
|
129
129
|
function handleChange(newValue) {
|
|
130
130
|
props.onChange && props.onChange(newValue);
|
|
131
131
|
resize();
|
|
@@ -208,8 +208,8 @@ function useInputTextFormField(_a) {
|
|
|
208
208
|
|
|
209
209
|
const InputTextSPAR = forwardRef(function InputTextInternal(props, inputRefs) {
|
|
210
210
|
var _a, _b, _c;
|
|
211
|
-
const inputTextRef =
|
|
212
|
-
const wrapperRef =
|
|
211
|
+
const inputTextRef = React__default.useRef(null);
|
|
212
|
+
const wrapperRef = React__default.useRef(null);
|
|
213
213
|
const legacyPropHelper = Object.assign(Object.assign({}, props), { version: 1 });
|
|
214
214
|
const id = useInputTextId(props);
|
|
215
215
|
const { rowRange } = useTextAreaResize({
|
|
@@ -250,10 +250,10 @@ const InputTextSPAR = forwardRef(function InputTextInternal(props, inputRefs) {
|
|
|
250
250
|
handleBlur,
|
|
251
251
|
handleFocus,
|
|
252
252
|
handleKeyDown }));
|
|
253
|
-
return (
|
|
254
|
-
|
|
255
|
-
type === "textarea" ? (
|
|
256
|
-
|
|
253
|
+
return (React__default.createElement(FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, autofocus: props.autoFocus, name: name, wrapperRef: wrapperRef, error: (_a = props.error) !== null && _a !== void 0 ? _a : "", invalid: Boolean(props.error || props.invalid), identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, clearable: (_b = props.clearable) !== null && _b !== void 0 ? _b : "never", onClear: handleClear, type: props.multiline ? "textarea" : "text", placeholder: props.placeholder, value: props.value, prefix: props.prefix, suffix: props.suffix, rows: rowRange.min, toolbar: props.toolbar, toolbarVisibility: props.toolbarVisibility },
|
|
254
|
+
React__default.createElement(React__default.Fragment, null,
|
|
255
|
+
type === "textarea" ? (React__default.createElement(TextArea, { fieldProps: fieldProps, rowRange: rowRange, inputRefs: [inputRefs, inputTextRef], value: props.value, inputStyle: inputStyle })) : (React__default.createElement(TextInput, { fieldProps: fieldProps, inputRefs: [inputRefs, inputTextRef], value: props.value, inputStyle: inputStyle })),
|
|
256
|
+
React__default.createElement(FormFieldPostFix, { variation: "spinner", visible: (_c = props.loading) !== null && _c !== void 0 ? _c : false }),
|
|
257
257
|
props.children)));
|
|
258
258
|
});
|
|
259
259
|
function useInputTextId(props) {
|
|
@@ -261,10 +261,10 @@ function useInputTextId(props) {
|
|
|
261
261
|
return props.id || generatedId;
|
|
262
262
|
}
|
|
263
263
|
function TextArea({ fieldProps, rowRange, inputRefs, value, inputStyle, }) {
|
|
264
|
-
return (
|
|
264
|
+
return (React__default.createElement("textarea", Object.assign({}, fieldProps, { rows: rowRange.min, ref: mergeRefs(inputRefs), className: inputStyle, value: value })));
|
|
265
265
|
}
|
|
266
266
|
function TextInput({ fieldProps, inputRefs, value, inputStyle, }) {
|
|
267
|
-
return (
|
|
267
|
+
return (React__default.createElement("input", Object.assign({}, fieldProps, { ref: mergeRefs(inputRefs), className: inputStyle, value: value })));
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
function isNewInputTextProps(props) {
|
|
@@ -272,10 +272,10 @@ function isNewInputTextProps(props) {
|
|
|
272
272
|
}
|
|
273
273
|
const InputText = forwardRef(function InputTextShim(props, ref) {
|
|
274
274
|
if (isNewInputTextProps(props)) {
|
|
275
|
-
return (
|
|
275
|
+
return (React__default.createElement(InputTextSPAR, Object.assign({}, props, { ref: ref })));
|
|
276
276
|
}
|
|
277
277
|
else {
|
|
278
|
-
return (
|
|
278
|
+
return (React__default.createElement(InputText$1, Object.assign({}, props, { ref: ref })));
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
|
package/dist/InputTime-cjs.js
CHANGED
|
@@ -4,10 +4,10 @@ var tslib_es6 = require('./tslib.es6-cjs.js');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var debounce = require('./debounce-cjs.js');
|
|
6
6
|
var FormField = require('./FormField-cjs.js');
|
|
7
|
+
require('classnames');
|
|
7
8
|
require('react-hook-form');
|
|
8
9
|
require('framer-motion');
|
|
9
10
|
require('@jobber/design');
|
|
10
|
-
require('classnames');
|
|
11
11
|
require('./Button-cjs.js');
|
|
12
12
|
|
|
13
13
|
const DEBOUNCE_TIME = 300;
|
package/dist/InputTime-es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { _ as __rest } from './tslib.es6-es.js';
|
|
2
|
-
import
|
|
2
|
+
import React__default, { useState, useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { d as debounce } from './debounce-es.js';
|
|
4
4
|
import { k as FormField } from './FormField-es.js';
|
|
5
|
+
import 'classnames';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
import 'framer-motion';
|
|
7
8
|
import '@jobber/design';
|
|
8
|
-
import 'classnames';
|
|
9
9
|
import './Button-es.js';
|
|
10
10
|
|
|
11
11
|
const DEBOUNCE_TIME = 300;
|
|
@@ -154,7 +154,7 @@ function InputTime(_a) {
|
|
|
154
154
|
const ref = useRef(null);
|
|
155
155
|
const { setTypedTime } = useTimePredict({ value, handleChange });
|
|
156
156
|
const fieldProps = Object.assign(Object.assign(Object.assign({ onChange: handleChange }, (defaultValue && { defaultValue: dateToTimeString(defaultValue) })), (!defaultValue && { value: dateToTimeString(value) })), params);
|
|
157
|
-
return (
|
|
157
|
+
return (React__default.createElement(FormField, Object.assign({ inputRef: ref, type: "time" }, fieldProps, { onBlur: handleBlur, onKeyUp: e => {
|
|
158
158
|
var _a;
|
|
159
159
|
(_a = fieldProps.onKeyUp) === null || _a === void 0 ? void 0 : _a.call(fieldProps, e);
|
|
160
160
|
!isNaN(parseInt(e.key, 10)) && setTypedTime(prev => prev + e.key);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
3
3
|
import { T as Text } from './Text-es.js';
|
|
4
4
|
import { I as Icon } from './Icon-es.js';
|
|
@@ -13,10 +13,10 @@ function InputValidation({ message, visible = true, }) {
|
|
|
13
13
|
};
|
|
14
14
|
if (!visible)
|
|
15
15
|
return null;
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
return (React__default.createElement(React__default.Fragment, null, messages && messages.length > 0 && (React__default.createElement(AnimatePresence, { mode: "wait" }, messages.map(msg => (React__default.createElement(motion.div, { key: `validation-${msg}`, variants: variants, initial: "slideOut", animate: "slideIn", exit: "slideOut", transition: { duration: 0.2 } },
|
|
17
|
+
React__default.createElement("div", { className: styles.message, "aria-live": "assertive", role: "alert", tabIndex: 0 },
|
|
18
|
+
React__default.createElement(Icon, { name: "alert", size: "small", color: "critical" }),
|
|
19
|
+
React__default.createElement(Text, { size: "small", variation: "error" }, msg)))))))));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export { InputValidation as I };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useEffect } from 'react';
|
|
2
2
|
import { a as useInternalChipDismissibleInput, d as useScrollToActive, b as useInView, c as useRepositionMenu, u as useInternalChipDismissible } from './useScrollToActive-es.js';
|
|
3
3
|
import './isObjectLike-es.js';
|
|
4
4
|
import '@jobber/design';
|
|
@@ -13,15 +13,15 @@ import { C as Chip, I as InternalChipButton } from './Chip-es.js';
|
|
|
13
13
|
import './tslib.es6-es.js';
|
|
14
14
|
|
|
15
15
|
function InternalChip({ label, active = false, disabled = false, invalid = false, prefix, suffix, tabIndex, ariaLabel, onClick, onKeyDown, }) {
|
|
16
|
-
return (
|
|
17
|
-
prefix &&
|
|
18
|
-
suffix &&
|
|
16
|
+
return (React__default.createElement(Chip, { disabled: disabled, invalid: invalid, onKeyDown: onKeyDown, testID: "ATL-InternalChip", ariaLabel: ariaLabel, tabIndex: tabIndex, variation: active ? "base" : "subtle", role: tabIndex !== undefined ? "option" : undefined, onClick: onClick ? (_, ev) => onClick(ev) : undefined, label: label },
|
|
17
|
+
prefix && React__default.createElement(Chip.Prefix, null, prefix),
|
|
18
|
+
suffix && React__default.createElement(Chip.Suffix, null, suffix)));
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuList":"J8USVG1tjPs-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-","spinning":"hDJGLX6kE-U-"};
|
|
22
22
|
|
|
23
23
|
function InternalChipDismissibleInput(props) {
|
|
24
|
-
const { activator =
|
|
24
|
+
const { activator = React__default.createElement(Button, { icon: "add", type: "secondary", ariaLabel: "Add" }), attachTo, isLoadingMore = false, onLoadMore, options, } = props;
|
|
25
25
|
const { activeIndex, allOptions, hasAvailableOptions, inputRef, menuId, menuOpen, searchValue, generateDescendantId, handleBlur, handleOpenMenu, handleSearchChange, handleCancelBlur, handleEnableBlur, handleSetActiveOnMouseOver, handleKeyDown, handleSelectOption, handleDebouncedSearch, } = useInternalChipDismissibleInput(props);
|
|
26
26
|
const menuRef = useScrollToActive(activeIndex);
|
|
27
27
|
const { ref: visibleChildRef, isInView } = useInView();
|
|
@@ -37,27 +37,27 @@ function InternalChipDismissibleInput(props) {
|
|
|
37
37
|
isInView && onLoadMore && onLoadMore(searchValue);
|
|
38
38
|
}, [isInView]);
|
|
39
39
|
if (!menuOpen) {
|
|
40
|
-
return
|
|
40
|
+
return React__default.cloneElement(activator, { onClick: handleOpenMenu });
|
|
41
41
|
}
|
|
42
|
-
return (
|
|
43
|
-
|
|
44
|
-
(hasAvailableOptions || isLoadingMore) && (
|
|
45
|
-
|
|
46
|
-
allOptions.map((option, i) => (
|
|
42
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
43
|
+
React__default.createElement("input", { ref: inputRef, className: styles.input, type: "text", role: "combobox", "aria-label": "Press up and down arrow to cycle through the options or type to narrow down the results", "aria-autocomplete": "list", "aria-owns": menuId, "aria-expanded": hasAvailableOptions, "aria-activedescendant": generateDescendantId(activeIndex), value: searchValue, onChange: handleSearchChange, onKeyDown: handleKeyDown, onBlur: debounce(handleBlur, 200), onFocus: handleOpenMenu, autoFocus: true }),
|
|
44
|
+
(hasAvailableOptions || isLoadingMore) && (React__default.createElement("div", Object.assign({ ref: setPositionedElementRef, className: styles.menu, style: popperStyles.popper }, attributes.popper),
|
|
45
|
+
React__default.createElement("div", { ref: menuRef, role: "listbox", id: menuId, className: styles.menuList, "data-testid": "chip-menu" },
|
|
46
|
+
allOptions.map((option, i) => (React__default.createElement("button", { key: option.value, role: "option", type: "button", id: generateDescendantId(i), className: classnames(styles.menuListOption, {
|
|
47
47
|
[styles.activeOption]: activeIndex === i,
|
|
48
48
|
}), onClick: () => handleSelectOption(option), onMouseEnter: handleSetActiveOnMouseOver(i), onMouseDown: handleCancelBlur, onMouseUp: handleEnableBlur },
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
isLoadingMore && (
|
|
53
|
-
|
|
49
|
+
React__default.createElement("span", { "aria-hidden": true }, option.prefix),
|
|
50
|
+
React__default.createElement(Text, null, option.label)))),
|
|
51
|
+
React__default.createElement("div", { ref: visibleChildRef }),
|
|
52
|
+
isLoadingMore && (React__default.createElement("div", { className: styles.loadingIndicator },
|
|
53
|
+
React__default.createElement(Spinner, { size: "small", inline: true }))))))));
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
function InternalChipDismissible(props) {
|
|
57
57
|
const { availableChipOptions, ref: wrapperRef, sortedVisibleChipOptions, handleChipAdd, handleChipClick, handleChipKeyDown, handleChipRemove, handleCustomAdd, handleWrapperKeyDown, } = useInternalChipDismissible(props);
|
|
58
|
-
return (
|
|
59
|
-
sortedVisibleChipOptions.map(chip => (
|
|
60
|
-
|
|
58
|
+
return (React__default.createElement("div", { ref: wrapperRef, className: styles.wrapper, "data-testid": "dismissible-chips", onKeyDown: handleWrapperKeyDown, role: "listbox" },
|
|
59
|
+
sortedVisibleChipOptions.map(chip => (React__default.createElement(InternalChip, Object.assign({ key: chip.value }, chip, { onKeyDown: handleChipKeyDown(chip.value), onClick: handleChipClick(chip.value), ariaLabel: `${chip.label}. Press delete or backspace to remove ${chip.label}`, tabIndex: 0, suffix: React__default.createElement(InternalChipButton, { icon: "remove", invalid: chip.invalid, disabled: chip.disabled, label: chip.label, onClick: handleChipRemove(chip.value) }) })))),
|
|
60
|
+
React__default.createElement(InternalChipDismissibleInput, { activator: props.activator, attachTo: wrapperRef, isLoadingMore: props.isLoadingMore, options: availableChipOptions, onOptionSelect: handleChipAdd, onCustomOptionSelect: handleCustomAdd, onSearch: props.onSearch, onLoadMore: props.onLoadMore })));
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export { InternalChipDismissible as I, InternalChip as a };
|
package/dist/LightBox-es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
2
2
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
3
|
-
import
|
|
3
|
+
import ReactDOM__default from 'react-dom';
|
|
4
4
|
import { u as useRefocusOnActivator_2 } from './useRefocusOnActivator-es.js';
|
|
5
5
|
import { u as useOnKeyDown_2 } from './useOnKeyDown-es.js';
|
|
6
6
|
import { u as useFocusTrap_2 } from './useFocusTrap-es.js';
|
|
@@ -21,7 +21,7 @@ var useMediaQuery = {};
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.mediaQueryStore = void 0;
|
|
23
23
|
exports.useMediaQuery = useMediaQuery;
|
|
24
|
-
const react_1 =
|
|
24
|
+
const react_1 = React__default;
|
|
25
25
|
exports.mediaQueryStore = {
|
|
26
26
|
subscribe(onChange, query) {
|
|
27
27
|
const matchMedia = window.matchMedia(query);
|
|
@@ -137,44 +137,44 @@ function LightBox({ boxSizing = "content-box", open, images, imageIndex = 0, onR
|
|
|
137
137
|
inline: "center",
|
|
138
138
|
});
|
|
139
139
|
}, [currentImageIndex]);
|
|
140
|
-
const template = (
|
|
140
|
+
const template = (React__default.createElement(React__default.Fragment, null, open && (React__default.createElement("div", { className: styles.lightboxWrapper, tabIndex: 0, "aria-label": "Lightbox", key: "Lightbox", ref: lightboxRef, onMouseMove: () => {
|
|
141
141
|
if (mouseIsStationary) {
|
|
142
142
|
setMouseIsStationary(false);
|
|
143
143
|
}
|
|
144
144
|
handleMouseMovement();
|
|
145
145
|
} },
|
|
146
|
-
|
|
146
|
+
React__default.createElement("div", { className: styles.backgroundImage, style: {
|
|
147
147
|
backgroundImage: `url("${images[currentImageIndex].url}")`,
|
|
148
148
|
} }),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
React__default.createElement("div", { className: styles.blurOverlay, onClick: handleRequestClose }),
|
|
150
|
+
React__default.createElement(AtlantisThemeContextProvider, { dangerouslyOverrideTheme: "dark" },
|
|
151
|
+
React__default.createElement("div", { className: styles.toolbar },
|
|
152
|
+
React__default.createElement("div", { className: styles.slideNumber },
|
|
153
|
+
React__default.createElement(Text, null, `${currentImageIndex + 1}/${images.length}`)),
|
|
154
|
+
React__default.createElement("div", { className: styles.closeButton },
|
|
155
|
+
React__default.createElement(ButtonDismiss, { ariaLabel: "Close", onClick: handleRequestClose })))),
|
|
156
|
+
React__default.createElement("div", { className: styles.imageArea },
|
|
157
|
+
React__default.createElement(AnimatePresence, { initial: false },
|
|
158
|
+
React__default.createElement(motion.img, { key: currentImageIndex, variants: variants, src: images[currentImageIndex].url, custom: direction, className: styles.image, initial: "enter", alt: images[currentImageIndex].alt ||
|
|
159
159
|
images[currentImageIndex].title ||
|
|
160
160
|
"", animate: "center", exit: "exit", transition: imageTransition, drag: "x", dragConstraints: { left: 0, right: 0 }, dragElastic: 1, onDragEnd: handleOnDragEnd }))),
|
|
161
|
-
images.length > 1 && (
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
images.length > 1 && (React__default.createElement(React__default.Fragment, null,
|
|
162
|
+
React__default.createElement(PreviousButton, { onClick: debouncedHandlePrevious, hideButton: mouseIsStationary }),
|
|
163
|
+
React__default.createElement(NextButton, { onClick: debouncedHandleNext, hideButton: mouseIsStationary }))),
|
|
164
164
|
(images[currentImageIndex].title ||
|
|
165
|
-
images[currentImageIndex].caption) && (
|
|
166
|
-
|
|
167
|
-
images[currentImageIndex].title && (
|
|
168
|
-
|
|
169
|
-
images[currentImageIndex].caption && (
|
|
170
|
-
images.length > 1 && (
|
|
165
|
+
images[currentImageIndex].caption) && (React__default.createElement("div", { className: styles.captionWrapper },
|
|
166
|
+
React__default.createElement(AtlantisThemeContextProvider, { dangerouslyOverrideTheme: "dark" },
|
|
167
|
+
images[currentImageIndex].title && (React__default.createElement("div", { className: styles.title },
|
|
168
|
+
React__default.createElement(Heading, { level: 4 }, images[currentImageIndex].title))),
|
|
169
|
+
images[currentImageIndex].caption && (React__default.createElement(Text, { size: "large" }, images[currentImageIndex].caption))))),
|
|
170
|
+
images.length > 1 && (React__default.createElement("div", { className: styles.thumbnailBar, style: {
|
|
171
171
|
"--lightbox--box-sizing": boxSizing,
|
|
172
|
-
}, "data-testid": "ATL-Thumbnail-Bar" }, images.map((image, index) => (
|
|
172
|
+
}, "data-testid": "ATL-Thumbnail-Bar" }, images.map((image, index) => (React__default.createElement("div", { key: index, className: classnames(styles.thumbnail, {
|
|
173
173
|
[styles.selected]: index === currentImageIndex,
|
|
174
174
|
}), onClick: () => handleThumbnailClick(index), ref: index === currentImageIndex ? selectedThumbnailRef : null },
|
|
175
|
-
|
|
175
|
+
React__default.createElement("img", { key: index, src: image.url, alt: image.alt || image.title || "", className: styles.thumbnailImage }))))))))));
|
|
176
176
|
return mounted.current
|
|
177
|
-
?
|
|
177
|
+
? ReactDOM__default.createPortal(template, document.body)
|
|
178
178
|
: template;
|
|
179
179
|
function handleMovePrevious() {
|
|
180
180
|
setDirection(-1);
|
|
@@ -208,13 +208,13 @@ function LightBox({ boxSizing = "content-box", open, images, imageIndex = 0, onR
|
|
|
208
208
|
}
|
|
209
209
|
function PreviousButton({ onClick, hideButton }) {
|
|
210
210
|
const { mediumAndUp } = useBreakpoints.useBreakpoints();
|
|
211
|
-
return (
|
|
212
|
-
|
|
211
|
+
return (React__default.createElement("div", { className: `${styles.prev} ${hideButton ? styles.buttonHidden : styles.buttonVisible}` },
|
|
212
|
+
React__default.createElement(Button, { size: mediumAndUp ? "large" : "small", variation: "subtle", type: "secondary", icon: "arrowLeft", ariaLabel: "Previous image", onClick: onClick })));
|
|
213
213
|
}
|
|
214
214
|
function NextButton({ onClick, hideButton }) {
|
|
215
215
|
const { mediumAndUp } = useBreakpoints.useBreakpoints();
|
|
216
|
-
return (
|
|
217
|
-
|
|
216
|
+
return (React__default.createElement("div", { className: `${styles.next} ${hideButton ? styles.buttonHidden : styles.buttonVisible}` },
|
|
217
|
+
React__default.createElement(Button, { size: mediumAndUp ? "large" : "small", variation: "subtle", type: "secondary", icon: "arrowRight", ariaLabel: "Next image", onClick: onClick })));
|
|
218
218
|
}
|
|
219
219
|
function togglePrintStyles(open) {
|
|
220
220
|
try {
|
package/dist/Link-es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var styles = {"link":"_8oxipSwiMJQ-","spinning":"iU2hXJfEJ-E-"};
|
|
4
4
|
|
|
5
5
|
function Link({ url, children, ariaLabel, ariaExpanded, external = false, }) {
|
|
6
|
-
return (
|
|
6
|
+
return (React__default.createElement("a", Object.assign({ href: url }, (external && { target: "_blank" }), (ariaLabel && { "aria-label": ariaLabel }), (ariaExpanded && { "aria-expanded": ariaExpanded }), { className: styles.link }), children));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { Link as L };
|
package/dist/List-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { _ as _baseEach, a as _baseIteratee, g as get } from './_baseEach-es.js';
|
|
4
4
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
|
|
@@ -131,31 +131,31 @@ function ListItem(props) {
|
|
|
131
131
|
const actionClasses = classnames(styles$1.action, props.isActive && styles$1.isActive, (props.onClick || props.url) && styles$1.hoverable, props.customRenderItem && !props.customItemStyles && styles$1.customItem);
|
|
132
132
|
const Wrapper = props.url ? "a" : "button";
|
|
133
133
|
const buttonProps = Object.assign({}, (Wrapper === "button" && { role: "button", type: "button" }));
|
|
134
|
-
return (
|
|
134
|
+
return (React__default.createElement(Wrapper, Object.assign({ id: props.id.toString(), className: actionClasses, href: props.url, onClick: props.onClick }, buttonProps), props.customRenderItem ? (props.customRenderItem(props)) : (React__default.createElement(DefaultRenderItem, Object.assign({}, props)))));
|
|
135
135
|
}
|
|
136
136
|
function DefaultRenderItem(props) {
|
|
137
|
-
return (
|
|
138
|
-
props.icon && (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
props.title &&
|
|
142
|
-
props.content &&
|
|
143
|
-
props.caption && (
|
|
144
|
-
|
|
145
|
-
props.value && (
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
return (React__default.createElement("div", { className: styles$1.defaultContent },
|
|
138
|
+
props.icon && (React__default.createElement("div", { className: styles$1.icon },
|
|
139
|
+
React__default.createElement(Icon, { name: props.icon, color: props.iconColor }))),
|
|
140
|
+
React__default.createElement("div", { className: styles$1.info },
|
|
141
|
+
props.title && React__default.createElement(Heading, { level: 5 }, props.title),
|
|
142
|
+
props.content && React__default.createElement(Description, { content: props.content }),
|
|
143
|
+
props.caption && (React__default.createElement(Text, { variation: "subdued" },
|
|
144
|
+
React__default.createElement(Typography, { element: "span", size: "small", emphasisType: "italic" }, props.caption)))),
|
|
145
|
+
props.value && (React__default.createElement("div", { className: styles$1.amount },
|
|
146
|
+
React__default.createElement(Text, null,
|
|
147
|
+
React__default.createElement(Emphasis, { variation: "bold" }, props.value))))));
|
|
148
148
|
}
|
|
149
149
|
function Description({ content }) {
|
|
150
150
|
if (content instanceof Array) {
|
|
151
|
-
return (
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
return (React__default.createElement(React__default.Fragment, null, content.map((item, i) => (React__default.createElement(Text, { key: i },
|
|
152
|
+
React__default.createElement("span", { className: styles$1.truncate },
|
|
153
|
+
React__default.createElement(Markdown, { content: item, basicUsage: true })))))));
|
|
154
154
|
}
|
|
155
155
|
else {
|
|
156
|
-
return (
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
return (React__default.createElement(Text, null,
|
|
157
|
+
React__default.createElement("span", { className: styles$1.truncate },
|
|
158
|
+
React__default.createElement(Markdown, { content: content, basicUsage: true }))));
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -166,17 +166,17 @@ var styles = {"list":"sFlecO8-wnY-","item":"dbZy6dviEis-","section":"vz43PAcPYt0
|
|
|
166
166
|
function List({ items, customRenderItem, customItemStyles, customRenderSection, customSectionStyles, defaultSectionHeader = "Other", labelledBy, }) {
|
|
167
167
|
const isSectioned = items.some(item => "section" in item && item.section);
|
|
168
168
|
if (isSectioned) {
|
|
169
|
-
return (
|
|
169
|
+
return (React__default.createElement(SectionedList, { items: items, customRenderItem: customRenderItem, customItemStyles: customItemStyles, customRenderSection: customRenderSection, customSectionStyles: customSectionStyles, defaultSectionHeader: defaultSectionHeader, labelledBy: labelledBy }));
|
|
170
170
|
}
|
|
171
171
|
else {
|
|
172
|
-
return (
|
|
172
|
+
return (React__default.createElement(DisplayList, { items: items, customRenderItem: customRenderItem, customItemStyles: customItemStyles, labelledBy: labelledBy }));
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
function DisplayList({ items, customRenderItem, customItemStyles, labelledBy, }) {
|
|
176
176
|
const omitDefaultStyles = customRenderItem && customItemStyles;
|
|
177
177
|
const itemClassNames = classnames(!omitDefaultStyles && styles.item);
|
|
178
|
-
return (
|
|
179
|
-
|
|
178
|
+
return (React__default.createElement("ul", { className: styles.list, "aria-labelledby": labelledBy }, items.map(item => (React__default.createElement("li", { key: item.id, className: itemClassNames },
|
|
179
|
+
React__default.createElement(ListItem, Object.assign({}, item, { customRenderItem: customRenderItem, customItemStyles: customItemStyles })))))));
|
|
180
180
|
}
|
|
181
181
|
function SectionedList({ items, customRenderItem, customItemStyles, customRenderSection, customSectionStyles, defaultSectionHeader, labelledBy, }) {
|
|
182
182
|
const sectionedItems = groupBy$1(items, item => get(item, "section", defaultSectionHeader));
|
|
@@ -184,16 +184,16 @@ function SectionedList({ items, customRenderItem, customItemStyles, customRender
|
|
|
184
184
|
const omitDefaultSectionStyles = customRenderSection && customSectionStyles;
|
|
185
185
|
const itemClassNames = classnames(!omitDefaultStyles && styles.item);
|
|
186
186
|
const sectionHeaderClassNames = classnames(!omitDefaultSectionStyles && sectionStyles.sectionHeader);
|
|
187
|
-
return (
|
|
188
|
-
return (
|
|
187
|
+
return (React__default.createElement("ul", { className: styles.list, "aria-labelledby": labelledBy }, Object.keys(sectionedItems).map(sectionName => {
|
|
188
|
+
return (React__default.createElement("li", { key: sectionName, className: classnames(!omitDefaultSectionStyles && styles.section) },
|
|
189
189
|
getSectionHeader(sectionName, sectionHeaderClassNames, customRenderSection),
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
React__default.createElement("ul", { className: styles.list }, sectionedItems[sectionName].map(item => (React__default.createElement("li", { key: item.id, className: itemClassNames },
|
|
191
|
+
React__default.createElement(ListItem, Object.assign({}, item, { customRenderItem: customRenderItem, customItemStyles: customItemStyles }))))))));
|
|
192
192
|
})));
|
|
193
193
|
}
|
|
194
194
|
function getSectionHeader(sectionName, sectionHeaderClassNames, customRenderSection) {
|
|
195
|
-
const sectionHeader = customRenderSection ? (customRenderSection(sectionName)) : (
|
|
196
|
-
return
|
|
195
|
+
const sectionHeader = customRenderSection ? (customRenderSection(sectionName)) : (React__default.createElement(Typography, { element: "h4", fontWeight: "bold", size: "large" }, sectionName));
|
|
196
|
+
return React__default.createElement("div", { className: sectionHeaderClassNames }, sectionHeader);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
export { List as L, ListItem as a };
|