@jobber/components 4.60.1-JOB-76584.2 → 4.60.2-fix-data-l.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/dist/Autocomplete/index.js +10 -11
- package/dist/Combobox/index.js +1 -1
- package/dist/DataList/index.js +2 -2
- package/package.json +4 -3
- package/rollup.config.js +1 -0
|
@@ -7,6 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var debounce = require('lodash/debounce');
|
|
8
8
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
9
9
|
var classnames = require('classnames');
|
|
10
|
+
var useEventListener = require('@use-it/event-listener');
|
|
10
11
|
var ReactDOM = require('react-dom');
|
|
11
12
|
var reactPopper = require('react-popper');
|
|
12
13
|
var Text = require('../Text-54334431.js');
|
|
@@ -29,6 +30,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
29
30
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
30
31
|
var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
|
|
31
32
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
33
|
+
var useEventListener__default = /*#__PURE__*/_interopDefaultLegacy(useEventListener);
|
|
32
34
|
|
|
33
35
|
var css_248z = ".v0Cys9vQ-NE- {\n position: relative;\n width: 100%;\n}\n\n.CX-N-e0e6og- {\n display: none;\n position: absolute;\n z-index: calc(6 + 1001);\n z-index: calc(var(--elevation-menu) + var(--elevation-modal));\n width: 100%;\n /* Unfortunately this is how we define our line item picker height in jobber online.\n This is a concession to maintain visual parity. */\n max-height: 300px;\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 box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: calc(16px / 16) solid var(--color-color-border);\n border: var(--border-base) solid var(--color-color-border);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n overflow: auto;\n scroll-behavior: smooth;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n.CX-N-e0e6og- h5 {\n padding: calc(16px / 2) 0 calc(16px / 4) calc(16px / 2);\n padding: var(--space-small) 0 var(--space-smaller) var(--space-small);\n border-bottom: calc(16px / 16) solid rgb(1, 41, 57);\n border-bottom: var(--border-base) solid var(--color-border--section);\n}\n\n.CX-N-e0e6og-._4PlUaegVpkk- {\n display: block;\n}\n\n.CX-N-e0e6og-._4PlUaegVpkk-:empty {\n display: none;\n}\n\n.ucQtG0iwqbo- {\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -ms-flex-align: center;\n align-items: center;\n padding: calc(16px / 2);\n padding: var(--space-small);\n border: none;\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n text-align: left;\n list-style: none;\n background-color: transparent;\n cursor: pointer;\n transition: all 200ms;\n transition: all var(--timing-base);\n}\n\n.ucQtG0iwqbo-:hover,\n.ucQtG0iwqbo-:focus,\n.ucQtG0iwqbo-.r8HS-ma79QE- {\n background-color: rgb(250, 246, 219);\n background-color: var(--color-surface--hover);\n outline-color: rgb(231, 213, 87);\n outline-color: var(--color-focus);\n}\n\n.ucQtG0iwqbo-.ydwLX44YFZc-:not(:last-child) {\n border-bottom: calc(16px / 16) solid rgb(225, 225, 225);\n border-bottom: var(--border-base) solid var(--color-border);\n}\n\n.CX-N-e0e6og-:hover .ucQtG0iwqbo-.r8HS-ma79QE-:not(:hover) {\n background-color: transparent;\n outline-color: transparent;\n}\n\n.v0Cys9vQ-NE- .PvUgNoAUG7A-:not(:first-child) {\n padding-top: calc(16px / 2);\n padding-top: var(--space-small);\n}\n\n.ucQtG0iwqbo- .DAOOFUZ1BRM- {\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n -ms-flex-item-align: auto;\n align-self: auto;\n width: calc(16px * 1.5);\n width: var(--space-large);\n}\n\n.ucQtG0iwqbo- .cjKJFup6hGY- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex: 1 100%;\n flex: 1 100%;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n\n.ucQtG0iwqbo- .hG5zNBuI2wA- {\n -ms-flex: 2;\n flex: 2;\n}\n\n.ucQtG0iwqbo- ._3CwjFCbhqi4- {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-item-align: end;\n align-self: flex-end;\n text-align: right;\n}\n";
|
|
34
36
|
var styles = {"autocomplete":"v0Cys9vQ-NE-","options":"CX-N-e0e6og-","visible":"_4PlUaegVpkk-","option":"ucQtG0iwqbo-","active":"r8HS-ma79QE-","separator":"ydwLX44YFZc-","heading":"PvUgNoAUG7A-","icon":"DAOOFUZ1BRM-","text":"cjKJFup6hGY-","label":"hG5zNBuI2wA-","details":"_3CwjFCbhqi4-"};
|
|
@@ -112,17 +114,14 @@ function isOptionSelected(selectedOption, option) {
|
|
|
112
114
|
}
|
|
113
115
|
// Split this out into a hooks package.
|
|
114
116
|
function useOnKeyDown(keyName, handler) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
window.removeEventListener('keydown', handler);
|
|
124
|
-
};
|
|
125
|
-
}, []);
|
|
117
|
+
// Pending: https://github.com/donavon/use-event-listener/pull/12
|
|
118
|
+
// The types in useEventListener mistakenly require a SyntheticEvent for the passed generic.
|
|
119
|
+
useEventListener__default["default"]("keydown", event => {
|
|
120
|
+
const newEvent = event;
|
|
121
|
+
if (newEvent.key === keyName) {
|
|
122
|
+
handler(newEvent);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
126
125
|
}
|
|
127
126
|
function isGroup(option) {
|
|
128
127
|
if (option.options)
|
package/dist/Combobox/index.js
CHANGED
|
@@ -62,7 +62,7 @@ function ComboboxContentSearch(props) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
var css_248z$4 = ".SgMzjOcdE-E- {\n position: relative;\n padding: calc(16px / 2) 0;\n padding: var(--space-small) 0;\n}\n\n.TwoTCjgcssc- {\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._8T5M7MGwCRE-,\n._4y5NXkNeIQM- {\n padding: calc(16px / 2) calc(16px * 1);\n padding: var(--space-small) var(--space-base);\n}\n\n.SgMzjOcdE-E-::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.SgMzjOcdE-E-::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";
|
|
65
|
+
var css_248z$4 = ".SgMzjOcdE-E- {\n position: relative;\n padding: calc(16px / 2) 0;\n padding: var(--space-small) 0;\n}\n\n.TwoTCjgcssc- {\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._8T5M7MGwCRE-,\n._4y5NXkNeIQM- {\n padding: calc(16px / 2) calc(16px * 1);\n padding: var(--space-small) var(--space-base);\n}\n\n.SgMzjOcdE-E-::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 pointer-events: none;\n}\n\n.SgMzjOcdE-E-::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 pointer-events: none;\n}\n";
|
|
66
66
|
var styles$4 = {"container":"SgMzjOcdE-E-","optionsList":"TwoTCjgcssc-","filterMessage":"_8T5M7MGwCRE-","emptyStateMessage":"_4y5NXkNeIQM-"};
|
|
67
67
|
styleInject_es.styleInject(css_248z$4);
|
|
68
68
|
|
package/dist/DataList/index.js
CHANGED
|
@@ -276,7 +276,7 @@ var css_248z$9 = ".fLmJZJJqMcE- {\n display: -ms-flexbox;\n display: flex;\n
|
|
|
276
276
|
var styles$9 = {"headerLabel":"fLmJZJJqMcE-","sortable":"UG8cHUT3Hds-"};
|
|
277
277
|
styleInject_es.styleInject(css_248z$9);
|
|
278
278
|
|
|
279
|
-
var css_248z$8 = ".AN5egORYy-0- {\n
|
|
279
|
+
var css_248z$8 = ".AN5egORYy-0- {\n width: calc(16px * 1.5);\n width: var(--space-large);\n height: calc(16px * 1.5);\n height: var(--space-large);\n margin-right: calc(16px / 2);\n margin-right: var(--space-small);\n}\n\n.AN5egORYy-0- path {\n fill: rgba(101, 120, 132, 1);\n fill: var(--color-greyBlue);\n transition: all 200ms ease;\n transition: all var(--timing-base) ease;\n}\n\n.AN5egORYy-0- path.F1uTDCK0Sb0- {\n fill: rgb(1, 41, 57);\n fill: var(--color-blue);\n}\n\n.AN5egORYy-0- path._6KYeQXWXLQ8- {\n fill: rgb(193, 201, 206);\n fill: var(--color-greyBlue--lighter);\n}\n";
|
|
280
280
|
var styles$8 = {"sortIcon":"AN5egORYy-0-","active":"F1uTDCK0Sb0-","inactive":"_6KYeQXWXLQ8-"};
|
|
281
281
|
styleInject_es.styleInject(css_248z$8);
|
|
282
282
|
|
|
@@ -302,7 +302,7 @@ function DataListHeaderTile({ headers, headerKey, }) {
|
|
|
302
302
|
React__default["default"].createElement(Text.Text, { maxLines: "single" }, headers[headerKey]),
|
|
303
303
|
(sortingState === null || sortingState === void 0 ? void 0 : sortingState.key) === headerKey && (React__default["default"].createElement(DataListSortingArrows, { order: sortingState.order }))));
|
|
304
304
|
function toggleSorting(sortingKey) {
|
|
305
|
-
if ((sortingState === null || sortingState === void 0 ? void 0 : sortingState.order) === "desc") {
|
|
305
|
+
if (sortingKey === (sortingState === null || sortingState === void 0 ? void 0 : sortingState.key) && (sortingState === null || sortingState === void 0 ? void 0 : sortingState.order) === "desc") {
|
|
306
306
|
sorting === null || sorting === void 0 ? void 0 : sorting.onSort(undefined);
|
|
307
307
|
return;
|
|
308
308
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "4.60.
|
|
3
|
+
"version": "4.60.2-fix-data-l.1+ede14e74",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@jobber/design": "^0.47.0",
|
|
23
23
|
"@jobber/formatters": "^0.2.2",
|
|
24
|
-
"@jobber/hooks": "^2.7.
|
|
24
|
+
"@jobber/hooks": "^2.7.0",
|
|
25
25
|
"@popperjs/core": "^2.0.6",
|
|
26
26
|
"@std-proposal/temporal": "0.0.1",
|
|
27
27
|
"@tanstack/react-table": "8.5.13",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@types/react-router": "5.1.7",
|
|
32
32
|
"@types/react-router-dom": "^5.3.3",
|
|
33
33
|
"@types/uuid": "^8.3.3",
|
|
34
|
+
"@use-it/event-listener": "^0.1.3",
|
|
34
35
|
"axios": "^0.21.2",
|
|
35
36
|
"classnames": "^2.3.2",
|
|
36
37
|
"color": "^3.1.2",
|
|
@@ -83,5 +84,5 @@
|
|
|
83
84
|
"> 1%",
|
|
84
85
|
"IE 10"
|
|
85
86
|
],
|
|
86
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "ede14e74634661d7664e1789ff8508937cb12668"
|
|
87
88
|
}
|