@jobber/components 4.45.0 → 4.45.1-visual-upd.1
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/Chip.d.ts +1 -0
- package/Chip.js +17 -0
- package/dist/Autocomplete/index.js +7 -7
- package/dist/Banner/index.js +3 -3
- package/dist/Button/index.js +2 -2
- package/dist/{Button-d89f2271.js → Button-db6114a6.js} +1 -1
- package/dist/ButtonDismiss/index.js +3 -3
- package/dist/{ButtonDismiss-250840a4.js → ButtonDismiss-1ccb84ec.js} +1 -1
- package/dist/Card/index.js +5 -5
- package/dist/{Card-69304e99.js → Card-116af709.js} +3 -3
- package/dist/Checkbox/index.js +3 -3
- package/dist/{Checkbox-eac63b7f.js → Checkbox-bc4bc968.js} +1 -1
- package/dist/Chip/Chip.d.ts +8 -0
- package/dist/Chip/components/ChipDismissible/ChipDismissible.d.ts +3 -0
- package/dist/Chip/components/ChipPrefix/Chip.Prefix.d.ts +2 -0
- package/dist/Chip/components/ChipSelectable/ChipSelectable.d.ts +3 -0
- package/dist/Chip/components/ChipSuffix/Chip.Suffix.d.ts +6 -0
- package/dist/Chip/hooks/index.d.ts +1 -0
- package/dist/Chip/hooks/useChildComponent.d.ts +8 -0
- package/dist/Chip/index.d.ts +3 -0
- package/dist/Chip/index.js +85 -0
- package/dist/{Chip-4d8e6370.js → Chip-b603ceaf.js} +5 -5
- package/dist/Chips/index.js +5 -5
- package/dist/Combobox/Combobox.d.ts +6 -0
- package/dist/Combobox/ComboboxProvider.d.ts +2 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +17 -6
- package/dist/Combobox/components/ComboboxContent/ComboboxList.d.ts +9 -8
- package/dist/Combobox/hooks/useComboboxContent.d.ts +7 -3
- package/dist/Combobox/index.js +64 -30
- package/dist/ConfirmationModal/index.js +9 -9
- package/dist/{ConfirmationModal-92f07027.js → ConfirmationModal-285c3cbe.js} +2 -2
- package/dist/DataDump/index.js +6 -6
- package/dist/DataList/DataList.d.ts +1 -1
- package/dist/DataList/DataList.types.d.ts +29 -6
- package/dist/DataList/DataList.utils.d.ts +1 -1
- package/dist/DataList/components/DataListAction/DataListAction.d.ts +2 -3
- package/dist/DataList/components/DataListActions/DataListActions.d.ts +3 -0
- package/dist/DataList/components/DataListActions/index.d.ts +1 -0
- package/dist/DataList/components/DataListHeader/DataListHeader.d.ts +2 -0
- package/dist/DataList/components/DataListHeader/index.d.ts +1 -0
- package/dist/DataList/components/DataListItem/DataListItem.d.ts +2 -2
- package/dist/DataList/components/DataListItemActions/DataListItemActions.d.ts +1 -5
- package/dist/DataList/components/DataListItemActions/index.d.ts +0 -1
- package/dist/DataList/components/DataListItemActionsOverflow/DataListItemActionsOverflow.d.ts +7 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.d.ts +1 -0
- package/dist/DataList/components/DataListItems/DataListItems.d.ts +7 -0
- package/dist/DataList/components/DataListItems/index.d.ts +1 -0
- package/dist/DataList/components/DataListLayout/DataListLayout.d.ts +2 -2
- package/dist/DataList/components/DataListLoadingState/DataListLoadingState.d.ts +2 -9
- package/dist/DataList/components/DataListSearch/DataListSearch.d.ts +1 -1
- package/dist/DataList/context/DataListContext/DataListContext.d.ts +3 -3
- package/dist/DataList/hooks/useActiveLayout.d.ts +4 -0
- package/dist/DataList/index.js +396 -365
- package/dist/DataTable/index.js +6 -6
- package/dist/DatePicker/index.js +3 -3
- package/dist/{DatePicker-39d2dc8b.js → DatePicker-49213434.js} +2 -2
- package/dist/DescriptionList/index.js +1 -1
- package/dist/Disclosure/index.js +1 -1
- package/dist/Drawer/index.js +4 -4
- package/dist/Emphasis/index.js +2 -2
- package/dist/{Emphasis-cc3456ac.js → Emphasis-e10dde65.js} +1 -1
- package/dist/FeatureSwitch/index.js +7 -7
- package/dist/FormField/index.js +5 -5
- package/dist/{FormField-bef41ec9.js → FormField-fa9254dc.js} +3 -3
- package/dist/FormatFile/index.js +10 -10
- package/dist/{FormatFile-a470c0f2.js → FormatFile-6423c3b5.js} +4 -4
- package/dist/Gallery/index.js +11 -11
- package/dist/Heading/index.js +2 -2
- package/dist/{Heading-4562900a.js → Heading-4cde9989.js} +1 -1
- package/dist/InlineLabel/index.js +2 -2
- package/dist/{InlineLabel-3d461632.js → InlineLabel-a24706c4.js} +1 -1
- package/dist/InputAvatar/index.js +3 -3
- package/dist/InputDate/index.js +6 -6
- package/dist/InputEmail/index.js +5 -5
- package/dist/InputFile/index.js +3 -3
- package/dist/{InputFile-d327dee3.js → InputFile-25c3369b.js} +2 -2
- package/dist/InputNumber/index.js +6 -6
- package/dist/{InputNumber-5640fb55.js → InputNumber-ea9fcee1.js} +1 -1
- package/dist/InputPassword/index.js +5 -5
- package/dist/InputPhoneNumber/index.js +5 -5
- package/dist/InputText/index.js +6 -6
- package/dist/{InputText-5ac5cfe0.js → InputText-ab237501.js} +1 -1
- package/dist/InputTime/index.js +5 -5
- package/dist/InputValidation/index.js +3 -3
- package/dist/{InputValidation-4e809bdd.js → InputValidation-377d6c62.js} +1 -1
- package/dist/LightBox/index.js +4 -4
- package/dist/{LightBox-02ca409e.js → LightBox-93ef99b9.js} +2 -2
- package/dist/List/index.js +5 -5
- package/dist/Markdown/index.js +5 -5
- package/dist/{Markdown-b37cf9ec.js → Markdown-d53b01bf.js} +3 -3
- package/dist/Menu/index.js +3 -3
- package/dist/{Menu-cec53b50.js → Menu-2e64307a.js} +2 -2
- package/dist/Modal/index.js +5 -5
- package/dist/{Modal-dcdc0032.js → Modal-c17cc105.js} +3 -3
- package/dist/MultiSelect/index.js +3 -3
- package/dist/{Option-9f4a65da.js → Option-07a24acd.js} +1 -1
- package/dist/Page/index.js +7 -7
- package/dist/Popover/index.js +4 -4
- package/dist/{Popover-d401fb54.js → Popover-7c966790.js} +1 -1
- package/dist/RadioGroup/index.js +3 -3
- package/dist/{RadioGroup-46833fac.js → RadioGroup-9bdd8a59.js} +1 -1
- package/dist/RecurringSelect/index.js +8 -8
- package/dist/Select/index.js +6 -6
- package/dist/StatusLabel/index.js +2 -2
- package/dist/Switch/index.js +2 -2
- package/dist/{Switch-165f01e3.js → Switch-cc9b645c.js} +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Text/index.js +2 -2
- package/dist/{Text-59bde58c.js → Text-54334431.js} +1 -1
- package/dist/Toast/index.js +2 -2
- package/dist/Tooltip/index.js +1 -3
- package/dist/{Tooltip-59dbab5b.js → Tooltip-3f9048ce.js} +5 -6
- package/dist/Typography/index.js +1 -1
- package/dist/{Typography-9bff9c91.js → Typography-83915c54.js} +2 -2
- package/package.json +5 -5
- package/rollup.config.js +2 -5
- package/dist/DataList/components/DataListItemActions/DataListItemActionsOverflow.d.ts +0 -7
- package/dist/DataList/components/DataListLayoutInternal/DataListHeader.d.ts +0 -11
- package/dist/DataList/components/DataListLayoutInternal/DataListItems.d.ts +0 -10
- package/dist/DataList/components/DataListLayoutInternal/DataListLayoutInternal.d.ts +0 -10
- package/dist/DataList/components/DataListLayoutInternal/index.d.ts +0 -3
- package/dist/DataList/hooks/useLayoutMediaQueries.d.ts +0 -1
- /package/dist/DataList/components/{DataListLayoutInternal → DataListHeader}/DataListHeaderCheckbox.d.ts +0 -0
package/dist/Combobox/index.js
CHANGED
|
@@ -8,13 +8,13 @@ var classnames = require('classnames');
|
|
|
8
8
|
var ReactDOM = require('react-dom');
|
|
9
9
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
10
10
|
var Icon = require('../Icon-405a216c.js');
|
|
11
|
-
var Text = require('../Text-
|
|
11
|
+
var Text = require('../Text-54334431.js');
|
|
12
12
|
var useRefocusOnActivator = require('@jobber/hooks/useRefocusOnActivator');
|
|
13
13
|
var useFocusTrap = require('@jobber/hooks/useFocusTrap');
|
|
14
14
|
var reactPopper = require('react-popper');
|
|
15
15
|
var useOnKeyDown = require('@jobber/hooks/useOnKeyDown');
|
|
16
|
-
var Typography = require('../Typography-
|
|
17
|
-
var Button = require('../Button-
|
|
16
|
+
var Typography = require('../Typography-83915c54.js');
|
|
17
|
+
var Button = require('../Button-db6114a6.js');
|
|
18
18
|
require('@jobber/design');
|
|
19
19
|
require('react-router-dom');
|
|
20
20
|
|
|
@@ -24,11 +24,11 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
24
24
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
25
25
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
26
26
|
|
|
27
|
-
var css_248z$5 = ".m1w5vdUZ6rQ- {\n z-index: 1002;\n z-index: var(--elevation-tooltip);\n max-width: var(--popover--width);\n min-width: calc((16px * 4) * 3.75);\n min-width: calc(calc(16px * 4) * 3.75);\n min-width: calc(var(--space-extravagant) * 3.75);\n box-shadow: 0px calc(16px / 16) calc(16px / 4) 0px\n rgba(0, 0, 0, 0.1),\n 0px calc(16px / 4) 12px 0px rgba(0, 0, 0, 0.05);\n box-shadow: var(--shadow-base);\n margin-top: calc(16px / 2);\n margin-top: var(--space-small);\n border: calc(16px / 16) solid rgb(225, 225, 225);\n border: var(--border-base) solid var(--color-border);\n border-radius: calc(16px / 2);\n border-radius: var(--radius-larger);\n overflow: scroll;\n overflow-y: auto;\n background: rgba(255, 255, 255, 1);\n background: var(--color-surface);\n}\n\n/* CAUTION: Tests for content visibility assume this class' presence hides the content\n* so please be careful if you change this class name, or the css rules within.\n*/\n\n.m1w5vdUZ6rQ-.Zlkv2HA096A- {\n display: none;\n visibility: hidden;\n}\n\n.YQry-Rd6zfQ
|
|
27
|
+
var css_248z$5 = ".m1w5vdUZ6rQ- {\n z-index: 1002;\n z-index: var(--elevation-tooltip);\n max-width: var(--popover--width);\n min-width: calc((16px * 4) * 3.75);\n min-width: calc(calc(16px * 4) * 3.75);\n min-width: calc(var(--space-extravagant) * 3.75);\n box-shadow: 0px calc(16px / 16) calc(16px / 4) 0px\n rgba(0, 0, 0, 0.1),\n 0px calc(16px / 4) 12px 0px rgba(0, 0, 0, 0.05);\n box-shadow: var(--shadow-base);\n margin-top: calc(16px / 2);\n margin-top: var(--space-small);\n border: calc(16px / 16) solid rgb(225, 225, 225);\n border: var(--border-base) solid var(--color-border);\n border-radius: calc(16px / 2);\n border-radius: var(--radius-larger);\n overflow: scroll;\n overflow-y: auto;\n background: rgba(255, 255, 255, 1);\n background: var(--color-surface);\n}\n\n/* CAUTION: Tests for content visibility assume this class' presence hides the content\n* so please be careful if you change this class name, or the css rules within.\n*/\n\n.m1w5vdUZ6rQ-.Zlkv2HA096A- {\n display: none;\n visibility: hidden;\n}\n\n.YQry-Rd6zfQ- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n position: sticky;\n gap: calc(16px / 4);\n gap: var(--space-smaller);\n bottom: 0;\n width: 100%;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n.TcpqL34s4lI- {\n padding-bottom: calc(16px / 2);\n padding-bottom: var(--space-small);\n}\n";
|
|
28
28
|
var styles$5 = {"content":"m1w5vdUZ6rQ-","hidden":"Zlkv2HA096A-","actions":"YQry-Rd6zfQ-","actionPadding":"TcpqL34s4lI-"};
|
|
29
29
|
styleInject_es.styleInject(css_248z$5);
|
|
30
30
|
|
|
31
|
-
var css_248z$4 = ".ifwwZOYTf8U- {\n position: relative;\n}\n\n.gIbHknFkZLI- {\n width: 100%;\n padding: calc(16px * 1);\n padding: var(--space-base);\n padding-right: calc((16px * 1.5) * 2.25);\n padding-right: calc(calc(16px * 1.5) * 2.25);\n padding-right: calc(var(--space-large) * 2.25);\n border: none;\n border-bottom: calc(16px / 16) solid rgb(225, 225, 225);\n border-bottom: var(--border-base) solid var(--color-border);\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-size: calc((16px * 1) * 0.875);\n font-size: calc(calc(16px * 1) * 0.875);\n font-size: var(--typography--fontSize-base);\n}\n\n.dZmEG-amk2U- {\n position: absolute;\n top: 50%;\n right: calc(16px * 1);\n right: var(--space-base);\n z-index: 1002;\n z-index: var(--elevation-tooltip);\n width: calc(16px * 1.5);\n width: var(--space-large);\n height: calc(16px * 1.5);\n height: var(--space-large);\n padding: 0;\n border: none;\n border-radius: 100%;\n border-radius: var(--radius-circle);\n background-color: rgb(244, 244, 244);\n background-color: var(--color-surface--background);\n cursor: pointer;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.dZmEG-amk2U-:focus {\n box-shadow: 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n}\n
|
|
31
|
+
var css_248z$4 = ".ifwwZOYTf8U- {\n position: relative;\n}\n\n.gIbHknFkZLI- {\n width: 100%;\n padding: calc(16px * 1);\n padding: var(--space-base);\n padding-right: calc((16px * 1.5) * 2.25);\n padding-right: calc(calc(16px * 1.5) * 2.25);\n padding-right: calc(var(--space-large) * 2.25);\n border: none;\n border-bottom: calc(16px / 16) solid rgb(225, 225, 225);\n border-bottom: var(--border-base) solid var(--color-border);\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-size: calc((16px * 1) * 0.875);\n font-size: calc(calc(16px * 1) * 0.875);\n font-size: var(--typography--fontSize-base);\n}\n\n.dZmEG-amk2U- {\n position: absolute;\n top: 50%;\n right: calc(16px * 1);\n right: var(--space-base);\n z-index: 1002;\n z-index: var(--elevation-tooltip);\n width: calc(16px * 1.5);\n width: var(--space-large);\n height: calc(16px * 1.5);\n height: var(--space-large);\n padding: 0;\n border: none;\n border-radius: 100%;\n border-radius: var(--radius-circle);\n background-color: rgb(244, 244, 244);\n background-color: var(--color-surface--background);\n cursor: pointer;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.dZmEG-amk2U-:focus {\n box-shadow: 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n}\n";
|
|
32
32
|
var styles$4 = {"search":"ifwwZOYTf8U-","searchInput":"gIbHknFkZLI-","clearSearch":"dZmEG-amk2U-"};
|
|
33
33
|
styleInject_es.styleInject(css_248z$4);
|
|
34
34
|
|
|
@@ -44,7 +44,7 @@ function ComboboxSearch(props) {
|
|
|
44
44
|
}, [props.open]);
|
|
45
45
|
return (React__default["default"].createElement("div", { className: styles$4.search },
|
|
46
46
|
React__default["default"].createElement("input", { type: "search", ref: searchRef, className: styles$4.searchInput, placeholder: props.placeholder ? `Search ${props.placeholder}` : "Search", onChange: (event) => handleSearch(event), value: props.searchValue }),
|
|
47
|
-
props.searchValue && (React__default["default"].createElement("button", { className: styles$4.clearSearch, onClick: clearSearch, "data-testid": "ATL-Combobox-Content-Search-Clear", "aria-label": "Clear search" },
|
|
47
|
+
props.searchValue && (React__default["default"].createElement("button", { className: styles$4.clearSearch, onClick: clearSearch, type: "button", "data-testid": "ATL-Combobox-Content-Search-Clear", "aria-label": "Clear search" },
|
|
48
48
|
React__default["default"].createElement(Icon.Icon, { name: "remove", size: "small" })))));
|
|
49
49
|
function clearSearch() {
|
|
50
50
|
var _a;
|
|
@@ -56,22 +56,22 @@ function ComboboxSearch(props) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
var css_248z$3 = "._5n7VvEn39-Y- {\n padding: calc(16px / 2);\n padding: var(--space-small);\n}\n\n.KhX5VfZjAog- {\n display: -ms-flexbox;\n display: flex;\n max-height: calc((16px / 2) * 33.33);\n max-height: calc(calc(16px / 2) * 33.33);\n max-height: calc(var(--space-small) * 33.33);\n margin: 0;\n padding: 0;\n overflow: scroll;\n list-style: none;\n -ms-flex-direction: column;\n flex-direction: column;\n gap: calc(16px / 4);\n gap: var(--space-smaller);\n}\n\n.NNCJVHYx6lc- {\n display: -ms-flexbox;\n display: flex;\n min-height: calc((calc(16px * 3) - calc(16px / 4)));\n min-height: calc((var(--space-largest) - var(--space-smaller)));\n box-sizing: border-box;\n padding: calc(16px / 2);\n padding: var(--space-small);\n border-radius: calc(16px / 4);\n border-radius: var(--radius-large);\n color: rgb(1, 41, 57);\n color: var(--color-heading);\n font-weight: 500;\n cursor: pointer;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: center;\n align-items: center;\n
|
|
60
|
-
var styles$3 = {"container":"_5n7VvEn39-Y-","optionsList":"KhX5VfZjAog-","option":"NNCJVHYx6lc-","
|
|
59
|
+
var css_248z$3 = "._5n7VvEn39-Y- {\n position: relative;\n padding: calc(16px / 2) 0;\n padding: var(--space-small) 0;\n}\n\n.KhX5VfZjAog- {\n display: -ms-flexbox;\n display: flex;\n max-height: calc((16px / 2) * 33.33);\n max-height: calc(calc(16px / 2) * 33.33);\n max-height: calc(var(--space-small) * 33.33);\n margin: 0;\n padding: 0;\n overflow: scroll;\n list-style: none;\n -ms-flex-direction: column;\n flex-direction: column;\n gap: calc(16px / 4);\n gap: var(--space-smaller);\n}\n\n.NNCJVHYx6lc- {\n display: -ms-flexbox;\n display: flex;\n min-height: calc((calc(16px * 3) - calc(16px / 4)));\n min-height: calc((var(--space-largest) - var(--space-smaller)));\n box-sizing: border-box;\n margin: 0 calc(16px / 2);\n margin: 0 var(--space-small);\n padding: calc(16px / 2);\n padding: var(--space-small);\n border-radius: calc(16px / 4);\n border-radius: var(--radius-large);\n color: rgb(1, 41, 57);\n color: var(--color-heading);\n font-weight: 500;\n cursor: pointer;\n transition: all 200ms;\n transition: all var(--timing-base);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.NNCJVHYx6lc-:hover,\n.NNCJVHYx6lc-:focus {\n background-color: rgb(244, 244, 244);\n background-color: var(--color-surface--background);\n}\n\n.NNCJVHYx6lc-:focus {\n box-shadow: 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n}\n\n._2IRm1sf-TUU-,\n.DTuoA8WPNzc- {\n padding: calc(16px / 2) calc(16px * 1);\n padding: var(--space-small) var(--space-base);\n}\n\n._5n7VvEn39-Y-::after {\n content: \"\";\n display: block;\n position: absolute;\n right: 0;\n bottom: calc(16px / 2);\n bottom: var(--space-small);\n left: 0;\n height: calc(16px * 1);\n height: var(--space-base);\n background: linear-gradient(\n 180deg,\n rgba(255, 255, 255, 0) 0%,\n rgb(255, 255, 255) 100%\n );\n}\n\n._5n7VvEn39-Y-::before {\n content: \"\";\n display: block;\n position: absolute;\n top: calc(16px / 2);\n top: var(--space-small);\n right: 0;\n left: 0;\n height: calc(16px * 1);\n height: var(--space-base);\n background: linear-gradient(\n to bottom,\n rgba(255, 255, 255, 1),\n rgba(255, 255, 255, 0)\n );\n}\n";
|
|
60
|
+
var styles$3 = {"container":"_5n7VvEn39-Y-","optionsList":"KhX5VfZjAog-","option":"NNCJVHYx6lc-","filterMessage":"_2IRm1sf-TUU-","emptyStateMessage":"DTuoA8WPNzc-"};
|
|
61
61
|
styleInject_es.styleInject(css_248z$3);
|
|
62
62
|
|
|
63
63
|
function ComboboxList(props) {
|
|
64
|
+
let hasSeenFirstSelected = false;
|
|
64
65
|
return (React__default["default"].createElement("div", { className: styles$3.container },
|
|
65
|
-
!props.showEmptyState && props.options.length > 0 && (React__default["default"].createElement("ul", { className: styles$3.optionsList, role: "listbox", ref: props.optionsListRef }, !props.showEmptyState &&
|
|
66
|
+
!props.showEmptyState && props.options.length > 0 && (React__default["default"].createElement("ul", { className: styles$3.optionsList, role: "listbox", "aria-multiselectable": props.multiselect, ref: props.optionsListRef }, !props.showEmptyState &&
|
|
66
67
|
props.options.map(option => {
|
|
67
|
-
|
|
68
|
-
const isSelected = option.id.toString() === ((_a = props.selected) === null || _a === void 0 ? void 0 : _a.id.toString());
|
|
68
|
+
const isSelected = props.selected.some(selection => selection.id.toString() === option.id.toString());
|
|
69
69
|
return (React__default["default"].createElement("li", { ref: listItem => {
|
|
70
|
-
if (isSelected)
|
|
71
|
-
props.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}) },
|
|
70
|
+
if (isSelected && !hasSeenFirstSelected) {
|
|
71
|
+
props.setFirstSelectedElement(listItem);
|
|
72
|
+
hasSeenFirstSelected = true;
|
|
73
|
+
}
|
|
74
|
+
}, key: option.id, tabIndex: -1, role: "option", "aria-selected": isSelected, onClick: () => props.selectionHandler(option), className: classnames__default["default"](styles$3.option) },
|
|
75
75
|
option.label,
|
|
76
76
|
isSelected && React__default["default"].createElement(Icon.Icon, { name: "checkmark", color: "blue" })));
|
|
77
77
|
}))),
|
|
@@ -95,32 +95,47 @@ styleInject_es.styleInject(css_248z$2);
|
|
|
95
95
|
|
|
96
96
|
const ComboboxContext = React__default["default"].createContext({});
|
|
97
97
|
function ComboboxContextProvider(props) {
|
|
98
|
+
const multiselect = props.multiselect || false;
|
|
98
99
|
const [open, setOpen] = React.useState(false);
|
|
99
100
|
const wrapperRef = React.useRef(null);
|
|
100
|
-
return (React__default["default"].createElement(ComboboxContext.Provider, { value: { open, setOpen, wrapperRef } },
|
|
101
|
+
return (React__default["default"].createElement(ComboboxContext.Provider, { value: { multiselect, open, setOpen, wrapperRef } },
|
|
101
102
|
React__default["default"].createElement("div", { ref: wrapperRef },
|
|
102
103
|
open && (React__default["default"].createElement("div", { className: styles$2.overlay, onClick: () => setOpen(false), "data-testid": "ATL-Combobox-Overlay" })),
|
|
103
104
|
props.children)));
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
function useComboboxContent(options, open) {
|
|
107
|
+
function useComboboxContent(options, open, selected, onClose) {
|
|
107
108
|
const [searchValue, setSearchValue] = React.useState("");
|
|
108
|
-
const [
|
|
109
|
+
const [firstSelectedElement, setFirstSelectedElement] = React.useState(null);
|
|
109
110
|
const optionsListRef = React.useRef(null);
|
|
110
111
|
const filteredOptions = options.filter(option => option.label.toLowerCase().includes(searchValue.toLowerCase()));
|
|
112
|
+
const [internalSelected, setInternalSelected] = React.useState(selected);
|
|
113
|
+
const selectedOptions = onClose ? internalSelected : selected;
|
|
114
|
+
React.useEffect(() => {
|
|
115
|
+
if (!open && onClose) {
|
|
116
|
+
onClose(selectedOptions);
|
|
117
|
+
}
|
|
118
|
+
}, [open, onClose, selectedOptions]);
|
|
111
119
|
React.useEffect(() => {
|
|
112
|
-
if (open &&
|
|
113
|
-
|
|
120
|
+
if (open && firstSelectedElement) {
|
|
121
|
+
firstSelectedElement === null || firstSelectedElement === void 0 ? void 0 : firstSelectedElement.scrollIntoView({
|
|
114
122
|
block: "nearest",
|
|
115
123
|
});
|
|
116
124
|
}
|
|
117
|
-
}, [open,
|
|
125
|
+
}, [open, firstSelectedElement]);
|
|
126
|
+
React.useEffect(() => {
|
|
127
|
+
if (selectedOptions.length === 0) {
|
|
128
|
+
setFirstSelectedElement(null);
|
|
129
|
+
}
|
|
130
|
+
}, [selectedOptions]);
|
|
118
131
|
return {
|
|
119
132
|
searchValue,
|
|
120
133
|
setSearchValue,
|
|
121
|
-
|
|
134
|
+
setFirstSelectedElement,
|
|
122
135
|
filteredOptions,
|
|
123
136
|
optionsListRef,
|
|
137
|
+
selectedOptions,
|
|
138
|
+
setInternalSelected,
|
|
124
139
|
};
|
|
125
140
|
}
|
|
126
141
|
|
|
@@ -201,23 +216,42 @@ function useComboboxAccessibility(selectionCallback, filteredOptions, optionsLis
|
|
|
201
216
|
}
|
|
202
217
|
|
|
203
218
|
function ComboboxContent(props) {
|
|
204
|
-
const { open, setOpen, wrapperRef } = React__default["default"].useContext(ComboboxContext);
|
|
219
|
+
const { open, setOpen, wrapperRef, multiselect } = React__default["default"].useContext(ComboboxContext);
|
|
205
220
|
const optionsExist = props.options.length > 0;
|
|
206
|
-
const { searchValue, setSearchValue,
|
|
221
|
+
const { searchValue, setSearchValue, setFirstSelectedElement, filteredOptions, optionsListRef, selectedOptions, setInternalSelected, } = useComboboxContent(props.options, open, props.selected, props.onClose);
|
|
207
222
|
const { popperRef, popperStyles, attributes } = useComboboxAccessibility(handleSelection, filteredOptions, optionsListRef, open, setOpen, wrapperRef);
|
|
208
223
|
const template = (React__default["default"].createElement("div", Object.assign({ ref: popperRef, id: "ATL-Combobox-Content", "data-testid": "ATL-Combobox-Content", tabIndex: 0, className: classnames__default["default"](styles$5.content, { [styles$5.hidden]: !open }), style: popperStyles.popper }, attributes.popper),
|
|
209
224
|
React__default["default"].createElement(ComboboxSearch, { open: open, placeholder: props.subjectNoun, searchValue: searchValue, setSearchValue: setSearchValue }),
|
|
210
|
-
React__default["default"].createElement(ComboboxList, { showEmptyState: !optionsExist, options: filteredOptions, selected:
|
|
225
|
+
React__default["default"].createElement(ComboboxList, { multiselect: multiselect, showEmptyState: !optionsExist, options: filteredOptions, selected: selectedOptions, optionsListRef: optionsListRef, setFirstSelectedElement: setFirstSelectedElement, selectionHandler: handleSelection, searchValue: searchValue, subjectNoun: props.subjectNoun }),
|
|
211
226
|
props.children && (React__default["default"].createElement("div", { className: styles$5.actions, role: "group" }, React__default["default"].Children.toArray(props.children).map((child, index, childrenArray) => (React__default["default"].createElement("div", { key: index, className: classnames__default["default"]({
|
|
212
227
|
[styles$5.actionPadding]: index === childrenArray.length - 1,
|
|
213
228
|
}) }, child)))))));
|
|
214
229
|
return ReactDOM__default["default"].createPortal(template, document.body);
|
|
215
230
|
function handleSelection(selection) {
|
|
216
|
-
props.onSelect
|
|
231
|
+
const callbackHandler = props.onSelect
|
|
232
|
+
? props.onSelect
|
|
233
|
+
: setInternalSelected;
|
|
234
|
+
if (multiselect) {
|
|
235
|
+
handleMultiSelect(callbackHandler, selectedOptions, selection);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
handleSingleSelect(callbackHandler, selection);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function handleSingleSelect(selectCallback, selection) {
|
|
242
|
+
selectCallback([selection]);
|
|
217
243
|
setSearchValue("");
|
|
218
244
|
setOpen(false);
|
|
219
245
|
}
|
|
220
246
|
}
|
|
247
|
+
function handleMultiSelect(selectCallback, selected, selection) {
|
|
248
|
+
if (selected.some(s => s.id === selection.id)) {
|
|
249
|
+
selectCallback(selected.filter(s => s.id !== selection.id));
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
selectCallback([...selected, selection]);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
221
255
|
|
|
222
256
|
var css_248z$1 = ".Ow9wSNnGP-g- {\n width: 100%;\n box-sizing: border-box;\n padding: 0 calc(16px / 2);\n padding: 0 var(--space-small);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n.ncp0nKHQ7d8- {\n position: relative;\n width: 100%;\n min-height: calc((calc(16px * 3) - calc(16px / 2)));\n min-height: calc((var(--space-largest) - var(--space-small)));\n padding: calc(16px / 2) 0;\n padding: var(--space-small) 0;\n border: none;\n border-radius: calc(16px / 4);\n border-radius: var(--radius-large);\n text-align: left;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n cursor: pointer;\n transition: all 200ms;\n transition: all var(--timing-base);\n}\n\n.ncp0nKHQ7d8-:focus {\n box-shadow: 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n background-color: rgb(244, 244, 244);\n background-color: var(--color-surface--background);\n}\n\n.ncp0nKHQ7d8-:hover {\n background-color: rgb(244, 244, 244);\n background-color: var(--color-surface--background);\n}\n\n.ncp0nKHQ7d8- span {\n margin-left: calc(16px / 2);\n margin-left: var(--space-small);\n}\n";
|
|
223
257
|
var styles$1 = {"actionContainer":"Ow9wSNnGP-g-","actionButton":"ncp0nKHQ7d8-"};
|
|
@@ -225,7 +259,7 @@ styleInject_es.styleInject(css_248z$1);
|
|
|
225
259
|
|
|
226
260
|
function ComboboxAction(props) {
|
|
227
261
|
return (React__default["default"].createElement("div", { className: styles$1.actionContainer },
|
|
228
|
-
React__default["default"].createElement("button", { className: styles$1.actionButton, onClick: props.onClick, "aria-label": props.label },
|
|
262
|
+
React__default["default"].createElement("button", { className: styles$1.actionButton, onClick: props.onClick, type: "button", "aria-label": props.label },
|
|
229
263
|
React__default["default"].createElement(Typography.Typography, { element: "span", size: "base", textColor: "green", fontWeight: "semiBold" }, props.label))));
|
|
230
264
|
}
|
|
231
265
|
|
|
@@ -240,7 +274,7 @@ styleInject_es.styleInject(css_248z);
|
|
|
240
274
|
|
|
241
275
|
function ComboboxTriggerChip(props) {
|
|
242
276
|
const { open, setOpen } = React__default["default"].useContext(ComboboxContext);
|
|
243
|
-
return (React__default["default"].createElement("button", { className: styles.trigger, role: "combobox", "aria-expanded": open, "aria-haspopup": "listbox", "aria-controls": "ATL-Combobox-Content", "aria-autocomplete": "list", onClick: () => {
|
|
277
|
+
return (React__default["default"].createElement("button", { className: styles.trigger, role: "combobox", type: "button", "aria-expanded": open, "aria-haspopup": "listbox", "aria-controls": "ATL-Combobox-Content", "aria-autocomplete": "list", onClick: () => {
|
|
244
278
|
setOpen(!open);
|
|
245
279
|
} },
|
|
246
280
|
React__default["default"].createElement(Typography.Typography, { fontWeight: "semiBold", textColor: "heading" }, props.label),
|
|
@@ -252,7 +286,7 @@ const COMBOBOX_TRIGGER_COUNT_ERROR_MESSAGE = "Combobox can only have one Trigger
|
|
|
252
286
|
const COMBOBOX_REQUIRED_CHILDREN_ERROR_MESSAGE = "Combobox must have a Trigger and Combobox.Content element";
|
|
253
287
|
const Combobox = (props) => {
|
|
254
288
|
const { contentElement, triggerElement } = useComboboxValidation(props.children);
|
|
255
|
-
return (React__default["default"].createElement(ComboboxContextProvider,
|
|
289
|
+
return (React__default["default"].createElement(ComboboxContextProvider, { multiselect: props.multiSelect },
|
|
256
290
|
triggerElement,
|
|
257
291
|
contentElement));
|
|
258
292
|
};
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ConfirmationModal = require('../ConfirmationModal-
|
|
5
|
+
var ConfirmationModal = require('../ConfirmationModal-285c3cbe.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('@jobber/hooks/useOnKeyDown');
|
|
8
|
-
require('../Modal-
|
|
8
|
+
require('../Modal-c17cc105.js');
|
|
9
9
|
require('react-dom');
|
|
10
10
|
require('classnames');
|
|
11
11
|
require('framer-motion');
|
|
12
12
|
require('@jobber/hooks/useRefocusOnActivator');
|
|
13
13
|
require('@jobber/hooks/useFocusTrap');
|
|
14
14
|
require('../style-inject.es-9d2f5f4e.js');
|
|
15
|
-
require('../Heading-
|
|
16
|
-
require('../Typography-
|
|
17
|
-
require('../Button-
|
|
15
|
+
require('../Heading-4cde9989.js');
|
|
16
|
+
require('../Typography-83915c54.js');
|
|
17
|
+
require('../Button-db6114a6.js');
|
|
18
18
|
require('react-router-dom');
|
|
19
19
|
require('../Icon-405a216c.js');
|
|
20
20
|
require('@jobber/design');
|
|
21
|
-
require('../ButtonDismiss-
|
|
21
|
+
require('../ButtonDismiss-1ccb84ec.js');
|
|
22
22
|
require('../Content-2ca1ffe1.js');
|
|
23
|
-
require('../Markdown-
|
|
23
|
+
require('../Markdown-d53b01bf.js');
|
|
24
24
|
require('react-markdown');
|
|
25
|
-
require('../Text-
|
|
26
|
-
require('../Emphasis-
|
|
25
|
+
require('../Text-54334431.js');
|
|
26
|
+
require('../Emphasis-e10dde65.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var useOnKeyDown = require('@jobber/hooks/useOnKeyDown');
|
|
5
|
-
var Modal = require('./Modal-
|
|
5
|
+
var Modal = require('./Modal-c17cc105.js');
|
|
6
6
|
var Content = require('./Content-2ca1ffe1.js');
|
|
7
|
-
var Markdown = require('./Markdown-
|
|
7
|
+
var Markdown = require('./Markdown-d53b01bf.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
package/dist/DataDump/index.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var Card = require('../Card-
|
|
6
|
+
var Card = require('../Card-116af709.js');
|
|
7
7
|
var Content = require('../Content-2ca1ffe1.js');
|
|
8
|
-
var Emphasis = require('../Emphasis-
|
|
8
|
+
var Emphasis = require('../Emphasis-e10dde65.js');
|
|
9
9
|
require('classnames');
|
|
10
10
|
require('../style-inject.es-9d2f5f4e.js');
|
|
11
|
-
require('../Heading-
|
|
12
|
-
require('../Typography-
|
|
13
|
-
require('../Button-
|
|
11
|
+
require('../Heading-4cde9989.js');
|
|
12
|
+
require('../Typography-83915c54.js');
|
|
13
|
+
require('../Button-db6114a6.js');
|
|
14
14
|
require('react-router-dom');
|
|
15
15
|
require('../Icon-405a216c.js');
|
|
16
16
|
require('@jobber/design');
|
|
17
|
-
require('../Menu-
|
|
17
|
+
require('../Menu-2e64307a.js');
|
|
18
18
|
require('uuid');
|
|
19
19
|
require('framer-motion');
|
|
20
20
|
require('@jobber/hooks/useOnKeyDown');
|
|
@@ -8,7 +8,7 @@ import { DataListAction } from "./components/DataListAction";
|
|
|
8
8
|
import { DataListLayoutActions } from "./components/DataListLayoutActions";
|
|
9
9
|
import { DataListBulkActionProps, DataListObject, DataListProps } from "./DataList.types";
|
|
10
10
|
import { DataListBulkActions } from "./components/DataListBulkActions";
|
|
11
|
-
export declare function DataList<T extends DataListObject>({ sorting, ...props }: DataListProps<T>): JSX.Element;
|
|
11
|
+
export declare function DataList<T extends DataListObject>({ selected, sorting, ...props }: DataListProps<T>): JSX.Element;
|
|
12
12
|
export declare namespace DataList {
|
|
13
13
|
var Layout: typeof DataListLayout;
|
|
14
14
|
var LayoutActions: typeof DataListLayoutActions;
|
|
@@ -102,8 +102,9 @@ export interface DataListProps<T extends DataListObject> {
|
|
|
102
102
|
readonly selected?: T["id"][];
|
|
103
103
|
readonly onSelectAll?: () => void;
|
|
104
104
|
}
|
|
105
|
+
export type LayoutRenderer<T extends DataListObject> = (item: DataListItemType<T[]>) => JSX.Element;
|
|
105
106
|
export interface DataListLayoutProps<T extends DataListObject> {
|
|
106
|
-
readonly children:
|
|
107
|
+
readonly children: LayoutRenderer<T>;
|
|
107
108
|
/**
|
|
108
109
|
* The breakpoint at which the layout should be displayed. It will be rendered until a layout with a larger breakpoint is found.
|
|
109
110
|
* @default "xs"
|
|
@@ -116,7 +117,15 @@ export interface DataListSearchProps {
|
|
|
116
117
|
* prepended by "Search" or just falls back to "Search".
|
|
117
118
|
*/
|
|
118
119
|
readonly placeholder?: string;
|
|
119
|
-
|
|
120
|
+
/**
|
|
121
|
+
* The initial value of the search input.
|
|
122
|
+
*
|
|
123
|
+
* Updating this prop after the component has mounted will rerender the
|
|
124
|
+
* component with the new value. Only update the value of this when you
|
|
125
|
+
* absolutely have to.
|
|
126
|
+
*/
|
|
127
|
+
readonly initialValue?: string;
|
|
128
|
+
readonly onSearch: (value: string) => void;
|
|
120
129
|
}
|
|
121
130
|
export interface DataListFiltersProps {
|
|
122
131
|
readonly children: ReactElement | ReactElement[];
|
|
@@ -149,6 +158,12 @@ export interface DataListContextProps<T extends DataListObject> extends DataList
|
|
|
149
158
|
readonly layoutComponents?: ReactElement<DataListLayoutProps<T>>[];
|
|
150
159
|
readonly itemActionComponent?: ReactElement<DataListItemActionsProps<T>>;
|
|
151
160
|
readonly bulkActionsComponent?: ReactElement<DataListItemActionsProps<T>>;
|
|
161
|
+
readonly layoutBreakpoints: Breakpoints[];
|
|
162
|
+
readonly registerLayoutBreakpoints: (breakpoint: Breakpoints) => void;
|
|
163
|
+
readonly layouts: {
|
|
164
|
+
readonly [Breakpoint in Breakpoints]?: LayoutRenderer<T>;
|
|
165
|
+
};
|
|
166
|
+
readonly registerLayout: (size: Breakpoints, layout: LayoutRenderer<T>) => void;
|
|
152
167
|
}
|
|
153
168
|
export interface DataListLayoutContextProps {
|
|
154
169
|
readonly isInLayoutProvider: boolean;
|
|
@@ -215,13 +230,21 @@ export interface DataListActionProps<T extends DataListObject> {
|
|
|
215
230
|
*/
|
|
216
231
|
readonly onClick?: (data: T) => void;
|
|
217
232
|
}
|
|
233
|
+
export interface DataListActionsProps<T extends DataListObject> {
|
|
234
|
+
/**
|
|
235
|
+
* The actions to render for each item in the DataList. This only accepts the
|
|
236
|
+
* DataList.Action component.
|
|
237
|
+
*/
|
|
238
|
+
readonly children?: Fragment<ReactElement<DataListActionProps<T>>>;
|
|
239
|
+
/**
|
|
240
|
+
* The number of items to expose before the "More" button is shown.
|
|
241
|
+
* @default 2
|
|
242
|
+
*/
|
|
243
|
+
readonly itemsToExpose?: number;
|
|
244
|
+
}
|
|
218
245
|
export interface DataListBulkActionProps extends DataListActionProps<DataListObject> {
|
|
219
246
|
/**
|
|
220
247
|
* The callback function when the action is clicked.
|
|
221
248
|
*/
|
|
222
249
|
readonly onClick?: () => void;
|
|
223
250
|
}
|
|
224
|
-
export interface InternalDataListActionProps<T extends DataListObject> extends DataListActionProps<T> {
|
|
225
|
-
readonly item?: T;
|
|
226
|
-
readonly onClick?: ((data: T) => void) | (() => void);
|
|
227
|
-
}
|
|
@@ -17,5 +17,5 @@ export declare function generateListItemElement<T extends DataListObject>(item:
|
|
|
17
17
|
* Generate the header elements with the default styling
|
|
18
18
|
*/
|
|
19
19
|
export declare function generateHeaderElements<T extends DataListObject>(headers: DataListHeader<T>): DataListItemTypeFromHeader<T, DataListHeader<T>> | undefined;
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function sortBreakpoints(sizeProp: Breakpoints[]): ("xs" | "sm" | "md" | "lg" | "xl")[];
|
|
21
21
|
export declare function getExposedActions(childrenArray: ReactElement[], childCount?: number): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DataListActionProps, DataListObject
|
|
3
|
-
export declare function DataListAction<T extends DataListObject>(
|
|
4
|
-
export declare function InternalDataListAction<T extends DataListObject>({ label, icon, destructive, onClick, item, }: InternalDataListActionProps<T>): JSX.Element;
|
|
2
|
+
import { DataListActionProps, DataListObject } from "@jobber/components/DataList/DataList.types";
|
|
3
|
+
export declare function DataListAction<T extends DataListObject>({ label, icon, destructive, onClick, }: DataListActionProps<T>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DataListActions";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DataListHeader";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DataListLayoutProps, DataListObject } from "@jobber/components/DataList/DataList.types";
|
|
3
3
|
interface DataListItem<T extends DataListObject> {
|
|
4
4
|
readonly item: T;
|
|
5
5
|
readonly index: number;
|
|
6
|
-
readonly layout:
|
|
6
|
+
readonly layout: DataListLayoutProps<T>["children"];
|
|
7
7
|
}
|
|
8
8
|
export declare function DataListItem<T extends DataListObject>({ item, layout, }: DataListItem<T>): JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DataListItemActionsProps, DataListObject } from "../../DataList.types";
|
|
3
3
|
export declare function DataListItemActions<T extends DataListObject>(_: DataListItemActionsProps<T>): null;
|
|
4
|
-
|
|
5
|
-
readonly item: T;
|
|
6
|
-
}
|
|
7
|
-
export declare function InternalDataListItemActions<T extends DataListObject>({ item, }: InternalDataListItemActionsProps<T>): JSX.Element | null;
|
|
8
|
-
export {};
|
|
4
|
+
export declare function InternalDataListItemActions(): JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { DataListActionProps, DataListObject } from "../../DataList.types";
|
|
3
|
+
interface DataListItemActionsOverflowProps<T extends DataListObject> {
|
|
4
|
+
readonly actions: ReactElement<DataListActionProps<T>>[];
|
|
5
|
+
}
|
|
6
|
+
export declare function DataListItemActionsOverflow<T extends DataListObject>({ actions, }: DataListItemActionsOverflowProps<T>): JSX.Element | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DataListItemActionsOverflow";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Breakpoints, DataListObject } from "@jobber/components/DataList/DataList.types";
|
|
3
|
+
interface DataListItemsProps {
|
|
4
|
+
readonly size?: Breakpoints;
|
|
5
|
+
}
|
|
6
|
+
export declare function DataListItems<T extends DataListObject>({ size, }: DataListItemsProps): JSX.Element | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DataListItems";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DataListLayoutProps, DataListObject } from "
|
|
3
|
-
export declare function DataListLayout<T extends DataListObject>(
|
|
2
|
+
import { DataListLayoutProps, DataListObject } from "@jobber/components/DataList/DataList.types";
|
|
3
|
+
export declare function DataListLayout<T extends DataListObject>({ children, size, }: DataListLayoutProps<T>): JSX.Element | null;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { Breakpoints, DataListHeader, DataListLayoutProps, DataListObject } from "../../DataList.types";
|
|
3
|
-
interface DataListLoadingStateProps<T extends DataListObject> {
|
|
4
|
-
readonly headers: DataListHeader<T>;
|
|
5
|
-
readonly layouts: React.ReactElement<DataListLayoutProps<T>>[] | undefined;
|
|
6
|
-
readonly mediaMatches?: Record<Breakpoints, boolean>;
|
|
7
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
8
2
|
export declare const LOADING_STATE_LIMIT_ITEMS = 10;
|
|
9
3
|
export declare const DATALIST_LOADINGSTATE_ROW_TEST_ID = "ATL-DataList-LoadingState-Row";
|
|
10
|
-
export declare function DataListLoadingState
|
|
11
|
-
export {};
|
|
4
|
+
export declare function DataListLoadingState(): JSX.Element | null;
|
|
@@ -3,6 +3,6 @@ import { DataListSearchProps } from "../../DataList.types";
|
|
|
3
3
|
export declare const DATA_LIST_SEARCH_TEST_ID = "ATL-DataList-Search-input-wrapper";
|
|
4
4
|
export declare function DataListSearch(_: DataListSearchProps): null;
|
|
5
5
|
/**
|
|
6
|
-
* Renders the DataList.Search component
|
|
6
|
+
* Renders the DataList.Search component.
|
|
7
7
|
*/
|
|
8
8
|
export declare function InternalDataListSearch(): JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { DataListContextProps, DataListObject } from "../../DataList.types";
|
|
3
3
|
export declare const defaultValues: DataListContextProps<DataListObject>;
|
|
4
|
-
export declare const DataListContext:
|
|
5
|
-
export declare function useDataListContext(): DataListContextProps<
|
|
4
|
+
export declare const DataListContext: React.Context<DataListContextProps<DataListObject>>;
|
|
5
|
+
export declare function useDataListContext<T extends DataListObject>(): DataListContextProps<T>;
|