@jobber/components 4.62.0 → 4.63.1-token-test.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/Autocomplete/index.js +7 -7
- package/dist/Banner/index.js +3 -3
- package/dist/Button/index.js +2 -2
- package/dist/Button-e3a81292.js +57 -0
- package/dist/ButtonDismiss/index.js +3 -3
- package/dist/{ButtonDismiss-1ccb84ec.js → ButtonDismiss-cb629205.js} +1 -1
- package/dist/Card/index.js +5 -5
- package/dist/{Card-116af709.js → Card-7672a824.js} +3 -3
- package/dist/Checkbox/index.js +3 -3
- package/dist/{Checkbox-bc4bc968.js → Checkbox-07061c7f.js} +2 -2
- package/dist/Chip/index.js +2 -2
- package/dist/{Chip-a1bdcab2.js → Chip-7d945f64.js} +1 -1
- package/dist/Chips/index.js +3 -3
- package/dist/Combobox/index.js +5 -5
- package/dist/{Combobox-c6ec6d59.js → Combobox-30b9b3fc.js} +4 -4
- package/dist/ConfirmationModal/index.js +9 -9
- package/dist/{ConfirmationModal-467f6d4e.js → ConfirmationModal-24e2ad37.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 +26 -4
- package/dist/DataList/hooks/useBatchSelect.d.ts +13 -0
- package/dist/DataList/index.d.ts +1 -1
- package/dist/DataList/index.js +122 -43
- package/dist/DataTable/index.js +6 -6
- package/dist/DatePicker/index.js +3 -3
- package/dist/{DatePicker-49213434.js → DatePicker-7ad5ad0c.js} +3 -3
- 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-e10dde65.js → Emphasis-e24162df.js} +1 -1
- package/dist/FeatureSwitch/index.js +7 -7
- package/dist/FormField/index.js +5 -5
- package/dist/{FormField-3a4f196c.js → FormField-4f380b2a.js} +3 -3
- package/dist/FormatFile/index.js +11 -11
- package/dist/{FormatFile-bdd09938.js → FormatFile-7909cc0b.js} +5 -5
- package/dist/Gallery/index.js +12 -12
- package/dist/Heading/index.js +2 -2
- package/dist/{Heading-4cde9989.js → Heading-268deaf0.js} +1 -1
- package/dist/InlineLabel/index.js +2 -2
- package/dist/{InlineLabel-a24706c4.js → InlineLabel-a423a528.js} +1 -1
- package/dist/InputAvatar/index.js +4 -4
- package/dist/InputDate/index.js +6 -6
- package/dist/InputEmail/index.js +5 -5
- package/dist/InputFile/index.js +3 -3
- package/dist/{InputFile-cf3d292d.js → InputFile-148f5d7d.js} +2 -2
- package/dist/InputNumber/index.js +6 -6
- package/dist/{InputNumber-50eb0958.js → InputNumber-99e04fbf.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-3ca5c1c8.js → InputText-4fd8efe6.js} +1 -1
- package/dist/InputTime/index.js +5 -5
- package/dist/InputValidation/index.js +3 -3
- package/dist/{InputValidation-377d6c62.js → InputValidation-53d0acc9.js} +1 -1
- package/dist/LightBox/index.js +4 -4
- package/dist/{LightBox-93ef99b9.js → LightBox-52b61970.js} +2 -2
- package/dist/List/index.js +6 -6
- package/dist/Markdown/index.js +5 -5
- package/dist/{Markdown-d53b01bf.js → Markdown-5956f053.js} +3 -3
- package/dist/Menu/index.js +3 -3
- package/dist/{Menu-2e64307a.js → Menu-c2185f0f.js} +2 -2
- package/dist/Modal/index.js +5 -5
- package/dist/{Modal-7daf6831.js → Modal-e055627c.js} +3 -3
- package/dist/MultiSelect/index.js +3 -3
- package/dist/{Option-0abeda54.js → Option-c4ff9f78.js} +1 -1
- package/dist/Page/index.js +7 -7
- package/dist/Popover/index.js +3 -3
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-5dfc1885.js → ProgressBar-706735b7.js} +1 -1
- package/dist/RadioGroup/index.js +3 -3
- package/dist/{RadioGroup-9bdd8a59.js → RadioGroup-6a2722ee.js} +2 -2
- package/dist/RecurringSelect/index.js +9 -9
- package/dist/Select/index.js +6 -6
- package/dist/StatusLabel/index.js +3 -3
- package/dist/Switch/index.js +2 -2
- package/dist/{Switch-cc9b645c.js → Switch-d3286eaa.js} +2 -2
- package/dist/Tabs/index.js +2 -2
- package/dist/Text/index.js +2 -2
- package/dist/{Text-54334431.js → Text-c0e0ae3d.js} +1 -1
- package/dist/Toast/index.js +2 -2
- package/dist/Typography/index.js +1 -1
- package/dist/{Typography-83915c54.js → Typography-9d7b41a4.js} +1 -1
- package/package.json +4 -4
- package/dist/Button-db6114a6.js +0 -57
|
@@ -10,18 +10,18 @@ var classnames = require('classnames');
|
|
|
10
10
|
var ReactDOM = require('react-dom');
|
|
11
11
|
var reactPopper = require('react-popper');
|
|
12
12
|
var useOnKeyDown = require('@jobber/hooks/useOnKeyDown');
|
|
13
|
-
var Text = require('../Text-
|
|
13
|
+
var Text = require('../Text-c0e0ae3d.js');
|
|
14
14
|
var Icon = require('../Icon-405a216c.js');
|
|
15
|
-
var Heading = require('../Heading-
|
|
16
|
-
var InputText = require('../InputText-
|
|
17
|
-
require('../Typography-
|
|
15
|
+
var Heading = require('../Heading-268deaf0.js');
|
|
16
|
+
var InputText = require('../InputText-4fd8efe6.js');
|
|
17
|
+
require('../Typography-9d7b41a4.js');
|
|
18
18
|
require('@jobber/design');
|
|
19
|
-
require('../FormField-
|
|
19
|
+
require('../FormField-4f380b2a.js');
|
|
20
20
|
require('uuid');
|
|
21
21
|
require('react-hook-form');
|
|
22
|
-
require('../Button-
|
|
22
|
+
require('../Button-e3a81292.js');
|
|
23
23
|
require('react-router-dom');
|
|
24
|
-
require('../InputValidation-
|
|
24
|
+
require('../InputValidation-53d0acc9.js');
|
|
25
25
|
require('framer-motion');
|
|
26
26
|
require('../Spinner-9d8fc7ff.js');
|
|
27
27
|
|
package/dist/Banner/index.js
CHANGED
|
@@ -7,10 +7,10 @@ var classnames = require('classnames');
|
|
|
7
7
|
var jobberHooks = require('@jobber/hooks/useResizeObserver');
|
|
8
8
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
9
9
|
var Icon = require('../Icon-405a216c.js');
|
|
10
|
-
var Text = require('../Text-
|
|
11
|
-
var Button = require('../Button-
|
|
10
|
+
var Text = require('../Text-c0e0ae3d.js');
|
|
11
|
+
var Button = require('../Button-e3a81292.js');
|
|
12
12
|
require('@jobber/design');
|
|
13
|
-
require('../Typography-
|
|
13
|
+
require('../Typography-9d7b41a4.js');
|
|
14
14
|
require('react-router-dom');
|
|
15
15
|
|
|
16
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/dist/Button/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Button = require('../Button-
|
|
5
|
+
var Button = require('../Button-e3a81292.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-router-dom');
|
|
9
9
|
require('../style-inject.es-9d2f5f4e.js');
|
|
10
10
|
require('../Icon-405a216c.js');
|
|
11
11
|
require('@jobber/design');
|
|
12
|
-
require('../Typography-
|
|
12
|
+
require('../Typography-9d7b41a4.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
var reactRouterDom = require('react-router-dom');
|
|
6
|
+
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
7
|
+
var Icon = require('./Icon-405a216c.js');
|
|
8
|
+
var Typography = require('./Typography-9d7b41a4.js');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
14
|
+
|
|
15
|
+
var css_248z = ":root {\n --button--color-variation: var(--color-interactive);\n --button--color-variation--hover: var(--color-interactive--hover);\n --button--color-surface: var(--color-surface);\n --button--color-surface--hover: var(--color-surface--background);\n --button--color-primaryLabel: var(--color-white);\n\n --button--duration-loading: var(--timing-loading--extended);\n}\n\n.U9VsquOtk2I- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n min-height: calc(16px * 2.25);\n min-height: calc(var(--base-unit) * 2.25);\n box-sizing: border-box;\n margin: 0;\n border: calc(16px / 16) solid rgb(78, 75, 92);\n border: var(--border-base) solid var(--button--color-variation);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n color: rgb(78, 75, 92);\n color: var(--button--color-variation);\n -webkit-font-smoothing: antialiased;\n letter-spacing: calc(16px / 40);\n letter-spacing: var(--typography--letterSpacing-loose);\n text-align: center;\n -webkit-text-decoration: none;\n text-decoration: none;\n vertical-align: middle;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--button--color-surface);\n cursor: pointer;\n transition: all 200ms;\n transition: all var(--timing-base);\n -webkit-appearance: none;\n appearance: none;\n fill: rgb(78, 75, 92);\n fill: var(--button--color-variation);\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.U9VsquOtk2I- * {\n fill: inherit !important;\n}\n\n.U9VsquOtk2I- * {\n color: inherit;\n /* required to over-ride very specific fill from <Icon> */\n}\n\n.U9VsquOtk2I-:hover,\na.U9VsquOtk2I-:hover,\n.U9VsquOtk2I-:focus,\na.U9VsquOtk2I-:focus,\n.U9VsquOtk2I-:active,\na.U9VsquOtk2I-:active {\n border-color: rgb(81, 114, 9);\n border-color: var(--button--color-variation--hover);\n color: rgb(81, 114, 9);\n color: var(--button--color-variation--hover);\n fill: rgb(81, 114, 9);\n fill: var(--button--color-variation--hover);\n background-color: rgb(244, 244, 244);\n background-color: var(--button--color-surface--hover);\n}\n\n.U9VsquOtk2I-:focus,\na.U9VsquOtk2I-:focus,\n.U9VsquOtk2I-:active,\na.U9VsquOtk2I-:active {\n box-shadow: 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n outline: none;\n}\n\n/* Variation */\n\n.qkFQwI0PKfw- {\n --button--color-variation: var(--color-interactive);\n --button--color-variation--hover: var(--color-interactive--hover);\n}\n\n.jsKQEOBdJ0k- {\n --button--color-variation: var(--color-informative);\n --button--color-variation--hover: var(--color-informative--onSurface);\n}\n\n._4W8X0dxZDK4- {\n --button--color-variation: var(--color-destructive);\n --button--color-variation--hover: var(--color-destructive--hover);\n}\n\n/* Subtle is special because, by default, it's styled as a secondary button */\n\n.vDKO-cmh8vY- {\n --button--color-variation: var(--color-interactive--subtle);\n --button--color-variation--hover: var(--color-interactive--subtle--hover);\n}\n\n/* Type */\n\n.FXqN12jWtPo-:not(.vDKO-cmh8vY-):not(.bg-l22drjd0-),\n.FXqN12jWtPo-:not(.vDKO-cmh8vY-):not(.bg-l22drjd0-):hover,\n.FXqN12jWtPo-:not(.vDKO-cmh8vY-):not(.bg-l22drjd0-):focus {\n color: rgba(255, 255, 255, 1);\n color: var(--button--color-primaryLabel);\n background-color: rgb(78, 75, 92);\n background-color: var(--button--color-variation);\n fill: rgba(255, 255, 255, 1);\n fill: var(--button--color-primaryLabel);\n}\n\n.FXqN12jWtPo-:not(.vDKO-cmh8vY-):not(.bg-l22drjd0-):hover,\n.FXqN12jWtPo-:not(.vDKO-cmh8vY-):not(.bg-l22drjd0-):focus {\n background-color: rgb(81, 114, 9);\n background-color: var(--button--color-variation--hover);\n}\n\n.vDKO-cmh8vY-.FXqN12jWtPo- {\n color: rgb(78, 75, 92);\n color: var(--button--color-variation);\n fill: rgb(78, 75, 92);\n fill: var(--button--color-variation);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--button--color-surface);\n}\n\n.pf6G840lKdA-,\n.vDKO-cmh8vY-.FXqN12jWtPo- {\n border-color: rgb(78, 75, 92);\n border-color: var(--button--color-variation);\n}\n\n.vDKO-cmh8vY-.FXqN12jWtPo-:hover,\n.vDKO-cmh8vY-.FXqN12jWtPo-:focus {\n color: rgb(81, 114, 9);\n color: var(--button--color-variation--hover);\n background-color: rgb(244, 244, 244);\n background-color: var(--button--color-surface--hover);\n fill: rgb(81, 114, 9);\n fill: var(--button--color-variation--hover);\n}\n\n.vDKO-cmh8vY-.pf6G840lKdA- {\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--button--color-surface);\n}\n\n.m7DbwRZWcNk-,\n.vDKO-cmh8vY-.pf6G840lKdA- {\n border-color: transparent;\n}\n\n.vDKO-cmh8vY-.pf6G840lKdA-:hover,\n.vDKO-cmh8vY-.pf6G840lKdA-:focus {\n background-color: rgb(244, 244, 244);\n background-color: var(--button--color-surface--hover);\n}\n\n.m7DbwRZWcNk-:hover,\n.m7DbwRZWcNk-:focus,\na.m7DbwRZWcNk-:hover,\na.m7DbwRZWcNk-:focus,\n.vDKO-cmh8vY-.pf6G840lKdA-:hover,\n.vDKO-cmh8vY-.pf6G840lKdA-:focus,\na.vDKO-cmh8vY-.pf6G840lKdA-:hover,\na.vDKO-cmh8vY-.pf6G840lKdA-:focus {\n border-color: transparent;\n}\n\n.vDKO-cmh8vY-.m7DbwRZWcNk- {\n border-color: transparent;\n background-color: transparent;\n}\n\n.vDKO-cmh8vY-.m7DbwRZWcNk-:hover,\n.vDKO-cmh8vY-.m7DbwRZWcNk-:focus,\na.vDKO-cmh8vY-.m7DbwRZWcNk-:hover,\na.vDKO-cmh8vY-.m7DbwRZWcNk-:focus {\n border-color: transparent;\n color: rgb(66, 78, 86);\n color: var(--color-interactive--subtle--hover);\n fill: rgb(66, 78, 86);\n fill: var(--color-interactive--subtle--hover);\n}\n\n/* Disabled */\n\n.U9VsquOtk2I-.bg-l22drjd0-,\na.U9VsquOtk2I-.bg-l22drjd0-,\n.U9VsquOtk2I-.bg-l22drjd0-:hover,\na.U9VsquOtk2I-.bg-l22drjd0-:hover {\n border-color: rgb(225, 225, 225);\n border-color: var(--color-disabled--secondary);\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-color: rgb(225, 225, 225);\n background-color: var(--color-disabled--secondary);\n fill: rgb(181, 181, 181);\n fill: var(--color-disabled);\n pointer-events: none;\n cursor: not-allowed;\n}\n\n/* Sizes */\n\n.STSDgSRREx4- {\n min-height: calc(16px * 1.5);\n min-height: calc(var(--base-unit) * 1.5);\n padding: 0 calc(16px / 2);\n padding: 0 var(--space-small);\n letter-spacing: 0;\n}\n\n.amIh7vPETfo- {\n min-height: calc(16px * 2.25);\n min-height: calc(var(--base-unit) * 2.25);\n padding: 0 calc((16px * 1) - 4px);\n padding: 0 calc(calc(16px * 1) - 4px);\n padding: 0 calc(var(--space-base) - 4px);\n}\n\n.ON6ezOojFVo- {\n min-height: calc(16px * 3);\n min-height: calc(var(--base-unit) * 3);\n padding: 0 calc(16px * 1);\n padding: 0 var(--space-base);\n}\n\n/* Icon */\n\n.Qq-idRLJTCk- {\n width: calc(16px * 2.25);\n width: calc(var(--base-unit) * 2.25);\n padding: 0;\n}\n\n.Qq-idRLJTCk-.STSDgSRREx4- {\n width: calc((16px / 2) * 3);\n width: calc(calc(16px / 2) * 3);\n width: calc(var(--space-small) * 3);\n}\n\n.Qq-idRLJTCk-.amIh7vPETfo- {\n width: calc((16px * 1) * 2.25);\n width: calc(calc(16px * 1) * 2.25);\n width: calc(var(--space-base) * 2.25);\n}\n\n.Qq-idRLJTCk-.ON6ezOojFVo- {\n width: calc((16px * 1.5) * 2);\n width: calc(calc(16px * 1.5) * 2);\n width: calc(var(--space-large) * 2);\n}\n\n.EWh1gvgPJQg- {\n width: auto;\n}\n\n.EWh1gvgPJQg- > * {\n text-align: left;\n}\n\n.EWh1gvgPJQg- > *:first-child {\n -ms-flex-negative: 0;\n flex-shrink: 0;\n margin-right: calc(16px / 2);\n margin-right: var(--space-small);\n}\n\n.pfzTUMgNb3o- > *:first-child {\n margin-left: calc(16px / 2);\n margin-left: var(--space-small);\n margin-right: 0;\n -ms-flex-order: 1;\n order: 1;\n}\n\n.ZCHqCEyLBw0- {\n width: 100%;\n}\n\n.VVFKEv1ksMA- {\n background-image: linear-gradient(\n 135deg,\n rgba(0, 0, 0, 0.1) 0%,\n rgba(0, 0, 0, 0.1) 25%,\n transparent 25%,\n transparent 50%,\n rgba(0, 0, 0, 0.1) 50%,\n rgba(0, 0, 0, 0.1) 75%,\n transparent 75%,\n transparent 100%\n );\n background-size: calc(16px * 2) calc(16px * 2);\n background-size: var(--space-larger) var(--space-larger);\n pointer-events: none;\n cursor: not-allowed;\n -webkit-animation-duration: 2000ms;\n -webkit-animation-duration: var(--button--duration-loading);\n animation-duration: 2000ms;\n animation-duration: var(--button--duration-loading);\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n -webkit-animation-name: a8Q-0lnKH5M-;\n animation-name: a8Q-0lnKH5M-;\n -webkit-animation-timing-function: linear;\n animation-timing-function: linear;\n}\n\n.FXqN12jWtPo-.VVFKEv1ksMA-:not(.vDKO-cmh8vY-) {\n background-image: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.25) 0%,\n rgba(255, 255, 255, 0.25) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.25) 50%,\n rgba(255, 255, 255, 0.25) 75%,\n transparent 75%,\n transparent 100%\n );\n}\n\n@-webkit-keyframes a8Q-0lnKH5M- {\n 0% {\n background-position: 0 0;\n }\n\n 100% {\n background-position: calc(16px * 2) calc(16px * 2);\n background-position: var(--space-larger) var(--space-larger);\n }\n}\n\n@keyframes a8Q-0lnKH5M- {\n 0% {\n background-position: 0 0;\n }\n\n 100% {\n background-position: calc(16px * 2) calc(16px * 2);\n background-position: var(--space-larger) var(--space-larger);\n }\n}\n";
|
|
16
|
+
var styles = {"button":"U9VsquOtk2I-","work":"qkFQwI0PKfw-","learning":"jsKQEOBdJ0k-","destructive":"_4W8X0dxZDK4-","subtle":"vDKO-cmh8vY-","primary":"FXqN12jWtPo-","disabled":"bg-l22drjd0-","secondary":"pf6G840lKdA-","tertiary":"m7DbwRZWcNk-","small":"STSDgSRREx4-","base":"amIh7vPETfo-","large":"ON6ezOojFVo-","onlyIcon":"Qq-idRLJTCk-","hasIconAndLabel":"EWh1gvgPJQg-","iconOnRight":"pfzTUMgNb3o-","fullWidth":"ZCHqCEyLBw0-","loading":"VVFKEv1ksMA-","animateStripes":"a8Q-0lnKH5M-"};
|
|
17
|
+
styleInject_es.styleInject(css_248z);
|
|
18
|
+
|
|
19
|
+
function Button(props) {
|
|
20
|
+
const { ariaControls, ariaHaspopup, ariaExpanded, ariaLabel, disabled = false, external, fullWidth, icon, label, iconOnRight, id, loading, onClick, onMouseDown, role, size = "base", type = "primary", url, to, variation = "work", submit, } = props;
|
|
21
|
+
const buttonClassNames = classnames__default["default"](styles.button, styles[size], {
|
|
22
|
+
[styles.onlyIcon]: icon && !label,
|
|
23
|
+
[styles.hasIconAndLabel]: icon && label,
|
|
24
|
+
[styles.iconOnRight]: iconOnRight,
|
|
25
|
+
[styles[variation]]: variation,
|
|
26
|
+
[styles[type]]: type,
|
|
27
|
+
[styles.disabled]: disabled,
|
|
28
|
+
[styles.fullWidth]: fullWidth,
|
|
29
|
+
[styles.loading]: loading,
|
|
30
|
+
});
|
|
31
|
+
const buttonType = submit ? "submit" : "button";
|
|
32
|
+
const tagProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ className: buttonClassNames, disabled,
|
|
33
|
+
id }, (!disabled && { href: url })), (!disabled && { onClick: onClick })), (!disabled && { onMouseDown: onMouseDown })), (external && { target: "_blank" })), (url === undefined && to === undefined && { type: buttonType })), { "aria-controls": ariaControls, "aria-haspopup": ariaHaspopup, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, role: role });
|
|
34
|
+
const buttonInternals = React__default["default"].createElement(ButtonInternals, Object.assign({}, props));
|
|
35
|
+
if (to) {
|
|
36
|
+
return (React__default["default"].createElement(reactRouterDom.Link, Object.assign({}, tagProps, { to: to }), buttonInternals));
|
|
37
|
+
}
|
|
38
|
+
const Tag = url ? "a" : "button";
|
|
39
|
+
return React__default["default"].createElement(Tag, Object.assign({}, tagProps), buttonInternals);
|
|
40
|
+
}
|
|
41
|
+
function ButtonInternals({ label, icon, size = "base" }) {
|
|
42
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
43
|
+
icon && React__default["default"].createElement(Icon.Icon, { name: icon, size: size }),
|
|
44
|
+
React__default["default"].createElement(Typography.Typography, { element: "span", fontWeight: "extraBold", fontFamily: "base", size: getTypeSizes(size) }, label)));
|
|
45
|
+
}
|
|
46
|
+
function getTypeSizes(size) {
|
|
47
|
+
switch (size) {
|
|
48
|
+
case "small":
|
|
49
|
+
return "small";
|
|
50
|
+
case "large":
|
|
51
|
+
return "large";
|
|
52
|
+
default:
|
|
53
|
+
return "base";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
exports.Button = Button;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ButtonDismiss = require('../ButtonDismiss-
|
|
5
|
+
var ButtonDismiss = require('../ButtonDismiss-cb629205.js');
|
|
6
6
|
require('react');
|
|
7
|
-
require('../Button-
|
|
7
|
+
require('../Button-e3a81292.js');
|
|
8
8
|
require('classnames');
|
|
9
9
|
require('react-router-dom');
|
|
10
10
|
require('../style-inject.es-9d2f5f4e.js');
|
|
11
11
|
require('../Icon-405a216c.js');
|
|
12
12
|
require('@jobber/design');
|
|
13
|
-
require('../Typography-
|
|
13
|
+
require('../Typography-9d7b41a4.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
package/dist/Card/index.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Card = require('../Card-
|
|
5
|
+
var Card = require('../Card-7672a824.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('../style-inject.es-9d2f5f4e.js');
|
|
9
|
-
require('../Heading-
|
|
10
|
-
require('../Typography-
|
|
11
|
-
require('../Button-
|
|
9
|
+
require('../Heading-268deaf0.js');
|
|
10
|
+
require('../Typography-9d7b41a4.js');
|
|
11
|
+
require('../Button-e3a81292.js');
|
|
12
12
|
require('react-router-dom');
|
|
13
13
|
require('../Icon-405a216c.js');
|
|
14
14
|
require('@jobber/design');
|
|
15
|
-
require('../Menu-
|
|
15
|
+
require('../Menu-c2185f0f.js');
|
|
16
16
|
require('uuid');
|
|
17
17
|
require('framer-motion');
|
|
18
18
|
require('@jobber/hooks/useOnKeyDown');
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var classnames = require('classnames');
|
|
5
5
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
6
|
-
var Heading = require('./Heading-
|
|
7
|
-
var Button = require('./Button-
|
|
8
|
-
var Menu = require('./Menu-
|
|
6
|
+
var Heading = require('./Heading-268deaf0.js');
|
|
7
|
+
var Button = require('./Button-e3a81292.js');
|
|
8
|
+
var Menu = require('./Menu-c2185f0f.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
package/dist/Checkbox/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Checkbox = require('../Checkbox-
|
|
5
|
+
var Checkbox = require('../Checkbox-07061c7f.js');
|
|
6
6
|
require('../tslib.es6-5b8768b7.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('uuid');
|
|
@@ -11,8 +11,8 @@ require('react-hook-form');
|
|
|
11
11
|
require('../style-inject.es-9d2f5f4e.js');
|
|
12
12
|
require('../Icon-405a216c.js');
|
|
13
13
|
require('@jobber/design');
|
|
14
|
-
require('../Text-
|
|
15
|
-
require('../Typography-
|
|
14
|
+
require('../Text-c0e0ae3d.js');
|
|
15
|
+
require('../Typography-9d7b41a4.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -7,14 +7,14 @@ var classnames = require('classnames');
|
|
|
7
7
|
var reactHookForm = require('react-hook-form');
|
|
8
8
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
9
9
|
var Icon = require('./Icon-405a216c.js');
|
|
10
|
-
var Text = require('./Text-
|
|
10
|
+
var Text = require('./Text-c0e0ae3d.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
15
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
16
16
|
|
|
17
|
-
var css_248z = ".d-2MyyzKGN0- {\n display: inline-block;\n}\n\n.OFHQaLxY8zI- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n}\n\n.HRrf3AZlpHc- {\n cursor: not-allowed;\n}\n\n.kMH5B1jwh-Y- {\n position: relative;\n}\n\n.rup0RBe4DNU- {\n /* Hide checkbox on UI but not screen readers and still allow focus state */\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(100%);\n clip-path: inset(100%);\n white-space: nowrap;\n}\n\n.lOQVnJA7zPM- {\n display: -ms-flexbox;\n display: flex;\n width: calc(16px * 1);\n width: var(--space-base);\n height: calc(16px * 1);\n height: var(--space-base);\n box-sizing: border-box;\n border: calc(16px / 8) solid rgb(
|
|
17
|
+
var css_248z = ".d-2MyyzKGN0- {\n display: inline-block;\n}\n\n.OFHQaLxY8zI- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n}\n\n.HRrf3AZlpHc- {\n cursor: not-allowed;\n}\n\n.kMH5B1jwh-Y- {\n position: relative;\n}\n\n.rup0RBe4DNU- {\n /* Hide checkbox on UI but not screen readers and still allow focus state */\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(100%);\n clip-path: inset(100%);\n white-space: nowrap;\n}\n\n.lOQVnJA7zPM- {\n display: -ms-flexbox;\n display: flex;\n width: calc(16px * 1);\n width: var(--space-base);\n height: calc(16px * 1);\n height: var(--space-base);\n box-sizing: border-box;\n border: calc(16px / 8) solid rgb(78, 75, 92);\n border: var(--border-thick) solid var(--color-interactive);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n transition: all 200ms;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.HRrf3AZlpHc- .lOQVnJA7zPM- {\n border-color: rgb(225, 225, 225);\n border-color: var(--color-disabled--secondary);\n}\n\n.HRrf3AZlpHc- p {\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n}\n\n.HRrf3AZlpHc- .lOQVnJA7zPM- > * {\n opacity: 0;\n}\n\n.rup0RBe4DNU-.Njn2CQDXwVA- + .lOQVnJA7zPM-,\n.rup0RBe4DNU-:checked + .lOQVnJA7zPM- {\n border-color: rgb(78, 75, 92);\n border-color: var(--color-interactive);\n background-color: rgb(78, 75, 92);\n background-color: var(--color-interactive);\n}\n\n.rup0RBe4DNU-:focus + .lOQVnJA7zPM- {\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.HRrf3AZlpHc- .rup0RBe4DNU-.Njn2CQDXwVA- + .lOQVnJA7zPM-,\n.HRrf3AZlpHc- .rup0RBe4DNU-:checked + .lOQVnJA7zPM- {\n border-color: rgb(225, 225, 225);\n border-color: var(--color-disabled--secondary);\n background-color: rgb(225, 225, 225);\n background-color: var(--color-disabled--secondary);\n}\n\n.HRrf3AZlpHc- .rup0RBe4DNU-.Njn2CQDXwVA- + .lOQVnJA7zPM- > *,\n.HRrf3AZlpHc- .rup0RBe4DNU-:checked + .lOQVnJA7zPM- > * {\n opacity: 1;\n}\n\n.eHENKCs5umc- {\n margin: 0 calc(16px / 2);\n margin: 0 var(--space-small);\n}\n\n.fSEH0cAO9cI- {\n margin-bottom: calc(16px / 2);\n margin-bottom: var(--space-small);\n padding-left: calc(16px * 1.5);\n padding-left: var(--space-large);\n}\n";
|
|
18
18
|
var styles = {"checkbox":"d-2MyyzKGN0-","wrapper":"OFHQaLxY8zI-","disabled":"HRrf3AZlpHc-","checkHolder":"kMH5B1jwh-Y-","input":"rup0RBe4DNU-","checkBox":"lOQVnJA7zPM-","indeterminate":"Njn2CQDXwVA-","label":"eHENKCs5umc-","description":"fSEH0cAO9cI-"};
|
|
19
19
|
styleInject_es.styleInject(css_248z);
|
|
20
20
|
|
package/dist/Chip/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Chip = require('../Chip-
|
|
5
|
+
var Chip = require('../Chip-7d945f64.js');
|
|
6
6
|
var tslib_es6 = require('../tslib.es6-5b8768b7.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var Icon = require('../Icon-405a216c.js');
|
|
@@ -11,7 +11,7 @@ require('@jobber/hooks/useInView');
|
|
|
11
11
|
require('../style-inject.es-9d2f5f4e.js');
|
|
12
12
|
require('../Avatar-1aa30ee1.js');
|
|
13
13
|
require('color');
|
|
14
|
-
require('../Typography-
|
|
14
|
+
require('../Typography-9d7b41a4.js');
|
|
15
15
|
require('../Tooltip-6b12f1c2.js');
|
|
16
16
|
require('react-dom');
|
|
17
17
|
require('framer-motion');
|
|
@@ -6,7 +6,7 @@ var useInView = require('@jobber/hooks/useInView');
|
|
|
6
6
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
7
7
|
var Avatar = require('./Avatar-1aa30ee1.js');
|
|
8
8
|
var Icon = require('./Icon-405a216c.js');
|
|
9
|
-
var Typography = require('./Typography-
|
|
9
|
+
var Typography = require('./Typography-9d7b41a4.js');
|
|
10
10
|
var Tooltip = require('./Tooltip-6b12f1c2.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/dist/Chips/index.js
CHANGED
|
@@ -8,15 +8,15 @@ var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
|
8
8
|
var useAssert = require('@jobber/hooks/useAssert');
|
|
9
9
|
var Icon = require('../Icon-405a216c.js');
|
|
10
10
|
var Avatar = require('../Avatar-1aa30ee1.js');
|
|
11
|
-
var Typography = require('../Typography-
|
|
11
|
+
var Typography = require('../Typography-9d7b41a4.js');
|
|
12
12
|
var Tooltip = require('../Tooltip-6b12f1c2.js');
|
|
13
13
|
var uuid = require('uuid');
|
|
14
14
|
var sortBy = require('lodash/sortBy');
|
|
15
15
|
var useLiveAnnounce = require('@jobber/hooks/useLiveAnnounce');
|
|
16
16
|
var debounce = require('lodash/debounce');
|
|
17
17
|
var reactPopper = require('react-popper');
|
|
18
|
-
var Text = require('../Text-
|
|
19
|
-
var Button = require('../Button-
|
|
18
|
+
var Text = require('../Text-c0e0ae3d.js');
|
|
19
|
+
var Button = require('../Button-e3a81292.js');
|
|
20
20
|
var Spinner = require('../Spinner-9d8fc7ff.js');
|
|
21
21
|
require('@jobber/design');
|
|
22
22
|
require('color');
|
package/dist/Combobox/index.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Combobox = require('../Combobox-
|
|
5
|
+
var Combobox = require('../Combobox-30b9b3fc.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-dom');
|
|
9
9
|
require('../style-inject.es-9d2f5f4e.js');
|
|
10
10
|
require('../Icon-405a216c.js');
|
|
11
11
|
require('@jobber/design');
|
|
12
|
-
require('../Text-
|
|
13
|
-
require('../Typography-
|
|
14
|
-
require('../Button-
|
|
12
|
+
require('../Text-c0e0ae3d.js');
|
|
13
|
+
require('../Typography-9d7b41a4.js');
|
|
14
|
+
require('../Button-e3a81292.js');
|
|
15
15
|
require('react-router-dom');
|
|
16
16
|
require('@jobber/hooks/useRefocusOnActivator');
|
|
17
17
|
require('@jobber/hooks/useFocusTrap');
|
|
18
18
|
require('react-popper');
|
|
19
19
|
require('@jobber/hooks/useOnKeyDown');
|
|
20
|
-
require('../Chip-
|
|
20
|
+
require('../Chip-7d945f64.js');
|
|
21
21
|
require('@jobber/hooks/useInView');
|
|
22
22
|
require('../Avatar-1aa30ee1.js');
|
|
23
23
|
require('color');
|
|
@@ -5,14 +5,14 @@ var classnames = require('classnames');
|
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
6
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
7
7
|
var Icon = require('./Icon-405a216c.js');
|
|
8
|
-
var Text = require('./Text-
|
|
9
|
-
var Typography = require('./Typography-
|
|
10
|
-
var Button = require('./Button-
|
|
8
|
+
var Text = require('./Text-c0e0ae3d.js');
|
|
9
|
+
var Typography = require('./Typography-9d7b41a4.js');
|
|
10
|
+
var Button = require('./Button-e3a81292.js');
|
|
11
11
|
var useRefocusOnActivator = require('@jobber/hooks/useRefocusOnActivator');
|
|
12
12
|
var useFocusTrap = require('@jobber/hooks/useFocusTrap');
|
|
13
13
|
var reactPopper = require('react-popper');
|
|
14
14
|
var useOnKeyDown = require('@jobber/hooks/useOnKeyDown');
|
|
15
|
-
var Chip = require('./Chip-
|
|
15
|
+
var Chip = require('./Chip-7d945f64.js');
|
|
16
16
|
require('@jobber/design');
|
|
17
17
|
var useAssert = require('@jobber/hooks/useAssert');
|
|
18
18
|
|
|
@@ -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-24e2ad37.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('@jobber/hooks/useOnKeyDown');
|
|
8
|
-
require('../Modal-
|
|
8
|
+
require('../Modal-e055627c.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-268deaf0.js');
|
|
16
|
+
require('../Typography-9d7b41a4.js');
|
|
17
|
+
require('../Button-e3a81292.js');
|
|
18
18
|
require('react-router-dom');
|
|
19
19
|
require('../Icon-405a216c.js');
|
|
20
20
|
require('@jobber/design');
|
|
21
|
-
require('../ButtonDismiss-
|
|
21
|
+
require('../ButtonDismiss-cb629205.js');
|
|
22
22
|
require('../Content-2ca1ffe1.js');
|
|
23
|
-
require('../Markdown-
|
|
23
|
+
require('../Markdown-5956f053.js');
|
|
24
24
|
require('react-markdown');
|
|
25
|
-
require('../Text-
|
|
26
|
-
require('../Emphasis-
|
|
25
|
+
require('../Text-c0e0ae3d.js');
|
|
26
|
+
require('../Emphasis-e24162df.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-e055627c.js');
|
|
6
6
|
var Content = require('./Content-2ca1ffe1.js');
|
|
7
|
-
var Markdown = require('./Markdown-
|
|
7
|
+
var Markdown = require('./Markdown-5956f053.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-7672a824.js');
|
|
7
7
|
var Content = require('../Content-2ca1ffe1.js');
|
|
8
|
-
var Emphasis = require('../Emphasis-
|
|
8
|
+
var Emphasis = require('../Emphasis-e24162df.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-268deaf0.js');
|
|
12
|
+
require('../Typography-9d7b41a4.js');
|
|
13
|
+
require('../Button-e3a81292.js');
|
|
14
14
|
require('react-router-dom');
|
|
15
15
|
require('../Icon-405a216c.js');
|
|
16
16
|
require('@jobber/design');
|
|
17
|
-
require('../Menu-
|
|
17
|
+
require('../Menu-c2185f0f.js');
|
|
18
18
|
require('uuid');
|
|
19
19
|
require('framer-motion');
|
|
20
20
|
require('@jobber/hooks/useOnKeyDown');
|
|
@@ -17,8 +17,8 @@ export declare namespace DataList {
|
|
|
17
17
|
var Filters: typeof DataListFilters;
|
|
18
18
|
var Search: typeof DataListSearch;
|
|
19
19
|
var ItemActions: typeof DataListItemActions;
|
|
20
|
-
var BulkActions: typeof DataListBulkActions;
|
|
21
20
|
var ItemAction: typeof DataListAction;
|
|
21
|
+
var BatchActions: typeof DataListBulkActions;
|
|
22
22
|
var BatchAction: (props: DataListBulkActionProps) => JSX.Element;
|
|
23
23
|
var StatusBar: typeof DataListStatusBar;
|
|
24
24
|
}
|
|
@@ -92,16 +92,38 @@ export interface DataListProps<T extends DataListObject> {
|
|
|
92
92
|
readonly state: DataListSorting | undefined;
|
|
93
93
|
readonly onSort: (sorting?: DataListSorting) => void;
|
|
94
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* The list of Selected Item ids
|
|
97
|
+
*/
|
|
98
|
+
readonly selected?: DataListSelectedType<T["id"]>;
|
|
95
99
|
/**
|
|
96
100
|
* Callback when an item checkbox is clicked.
|
|
97
101
|
*/
|
|
98
|
-
readonly onSelect?: (
|
|
102
|
+
readonly onSelect?: (selected: DataListSelectedType<T["id"]>) => void;
|
|
99
103
|
/**
|
|
100
|
-
*
|
|
104
|
+
* Callback when the select all checkbox is clicked.
|
|
105
|
+
*/
|
|
106
|
+
readonly onSelectAll?: (selected: DataListSelectedType<T["id"]>) => void;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Select all items in the DataList except the ones in the unselected array.
|
|
110
|
+
*
|
|
111
|
+
* This is used in scenarios where we need to select all items in the DataList
|
|
112
|
+
* but couldn't query all the ID's. So instead of feeding all the ID's to the
|
|
113
|
+
* DataList, we set all checkboxes to be checked except for the items that are
|
|
114
|
+
* in the unselected array.
|
|
115
|
+
*/
|
|
116
|
+
export interface DataListSelectedAllType<T extends DataListObject = DataListObject> {
|
|
117
|
+
/**
|
|
118
|
+
* The total number of selected items in the DataList.
|
|
119
|
+
*/
|
|
120
|
+
readonly totalCount: number;
|
|
121
|
+
/**
|
|
122
|
+
* Track the ID's of the unchecked items.
|
|
101
123
|
*/
|
|
102
|
-
readonly
|
|
103
|
-
readonly onSelectAll?: () => void;
|
|
124
|
+
readonly unselected: T["id"][];
|
|
104
125
|
}
|
|
126
|
+
export type DataListSelectedType<T extends string | number = DataListObject["id"]> = T[] | DataListSelectedAllType;
|
|
105
127
|
export type LayoutRenderer<T extends DataListObject> = (item: DataListItemType<T[]>) => JSX.Element;
|
|
106
128
|
export interface DataListLayoutProps<T extends DataListObject> {
|
|
107
129
|
readonly children: LayoutRenderer<T>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DataListSelectedType } from "../DataList.types";
|
|
2
|
+
export declare function useBatchSelect(): {
|
|
3
|
+
canSelect: boolean;
|
|
4
|
+
canSelectAll: boolean;
|
|
5
|
+
hasAtLeastOneSelected: boolean;
|
|
6
|
+
isSelectAll: boolean;
|
|
7
|
+
isSelectSome: boolean;
|
|
8
|
+
selectedCount: number;
|
|
9
|
+
selectedIDs: (string | number)[];
|
|
10
|
+
selected: DataListSelectedType<string | number> | undefined;
|
|
11
|
+
onSelect: ((selected: DataListSelectedType<string | number>) => void) | undefined;
|
|
12
|
+
onSelectAll: ((selected: DataListSelectedType<string | number>) => void) | undefined;
|
|
13
|
+
};
|
package/dist/DataList/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./DataList";
|
|
2
|
-
export { DataListItemType, DataListSorting } from "./DataList.types";
|
|
2
|
+
export { DataListItemType, DataListSorting, DataListSelectedType, DataListSelectedAllType, } from "./DataList.types";
|