@jobber/components 4.59.0 → 4.59.1-st-spike-w.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/AnimatedSwitcher/index.js +5 -13
- package/dist/{AnimatedSwitcher-d1e1ddcf.js → AnimatedSwitcher-6ffd5003.js} +9 -15
- package/dist/Autocomplete/index.js +57 -68
- package/dist/Avatar/index.js +7 -15
- package/dist/{Avatar-1aa30ee1.js → Avatar-b2e862de.js} +13 -21
- package/dist/Banner/index.js +29 -38
- package/dist/Button/index.js +8 -16
- package/dist/{Button-db6114a6.js → Button-319d8fa0.js} +15 -22
- package/dist/ButtonDismiss/index.js +9 -17
- package/dist/ButtonDismiss-85986110.js +8 -0
- package/dist/Card/index.js +15 -23
- package/dist/{Card-116af709.js → Card-c1970a7c.js} +27 -34
- package/dist/Checkbox/index.js +11 -19
- package/dist/{Checkbox-bc4bc968.js → Checkbox-e4733fb4.js} +30 -37
- package/dist/Chip/index.js +24 -33
- package/dist/{Chip-4f12eec8.js → Chip-12a64c38.js} +94 -106
- package/dist/{Chip-f8b8fd89.js → Chip-40f5214c.js} +29 -37
- package/dist/Chips/index.js +25 -34
- package/dist/Combobox/index.js +94 -105
- package/dist/ConfirmationModal/index.js +22 -30
- package/dist/{ConfirmationModal-285c3cbe.js → ConfirmationModal-86b42ca0.js} +14 -20
- package/dist/Content/index.js +4 -12
- package/dist/{Content-2ca1ffe1.js → Content-3354c281.js} +8 -14
- package/dist/Countdown/index.js +8 -17
- package/dist/DataDump/index.js +24 -32
- package/dist/DataList/index.js +256 -268
- package/dist/DataTable/index.js +92 -123
- package/dist/DatePicker/index.js +12 -20
- package/dist/{DatePicker-49213434.js → DatePicker-9f1e19a5.js} +30 -39
- package/dist/DescriptionList/index.js +9 -17
- package/dist/Disclosure/index.js +21 -29
- package/dist/Divider/index.js +7 -16
- package/dist/Drawer/index.js +24 -34
- package/dist/Emphasis/index.js +5 -13
- package/dist/Emphasis-edd2af9b.js +13 -0
- package/dist/FeatureSwitch/index.js +39 -48
- package/dist/Flex/index.js +6 -15
- package/dist/Form/index.js +11 -19
- package/dist/FormField/index.js +16 -24
- package/dist/{FormField-fa9254dc.js → FormField-99918ed4.js} +58 -65
- package/dist/FormatDate/index.js +2 -11
- package/dist/{FormatDate-70ea5b43.js → FormatDate-720b39cf.js} +3 -10
- package/dist/FormatEmail/index.js +7 -16
- package/dist/FormatFile/index.js +27 -35
- package/dist/{FormatFile-6423c3b5.js → FormatFile-e1498cb9.js} +44 -52
- package/dist/FormatRelativeDateTime/index.js +7 -15
- package/dist/FormatTime/index.js +3 -11
- package/dist/Gallery/index.js +40 -49
- package/dist/Glimmer/index.js +6 -15
- package/dist/{Glimmer-cfa92a88.js → Glimmer-d3be9219.js} +25 -33
- package/dist/Grid/index.js +14 -24
- package/dist/Heading/index.js +5 -13
- package/dist/{Heading-4cde9989.js → Heading-04994667.js} +4 -10
- package/dist/Icon/index.js +3 -11
- package/dist/Icon-22723fe6.js +34 -0
- package/dist/InlineLabel/index.js +5 -13
- package/dist/{InlineLabel-a24706c4.js → InlineLabel-4df86867.js} +9 -16
- package/dist/InputAvatar/index.js +32 -40
- package/dist/InputDate/index.js +26 -35
- package/dist/InputEmail/index.js +18 -27
- package/dist/InputFile/index.js +14 -23
- package/dist/{InputFile-25c3369b.js → InputFile-3bbaa09e.js} +24 -33
- package/dist/InputGroup/index.js +4 -12
- package/dist/{InputGroup-3fdde16b.js → InputGroup-1b4abd36.js} +9 -16
- package/dist/InputNumber/index.js +17 -25
- package/dist/{InputNumber-ea9fcee1.js → InputNumber-fa8132f3.js} +7 -13
- package/dist/InputPassword/index.js +19 -27
- package/dist/InputPhoneNumber/index.js +28 -36
- package/dist/InputText/index.js +17 -25
- package/dist/{InputText-ab237501.js → InputText-6d262128.js} +9 -15
- package/dist/InputTime/index.js +29 -38
- package/dist/InputValidation/index.js +9 -17
- package/dist/InputValidation-b6adff05.js +23 -0
- package/dist/LightBox/index.js +16 -24
- package/dist/LightBox-8c8f30b1.js +109 -0
- package/dist/Link/index.js +3 -11
- package/dist/List/index.js +47 -59
- package/dist/Markdown/index.js +10 -18
- package/dist/Markdown-2ec28e51.js +55 -0
- package/dist/Menu/index.js +13 -21
- package/dist/{Menu-2e64307a.js → Menu-10681184.js} +40 -47
- package/dist/Modal/index.js +16 -24
- package/dist/{Modal-c17cc105.js → Modal-06dc9551.js} +33 -41
- package/dist/MultiSelect/index.js +38 -47
- package/dist/Option-7967170c.js +12 -0
- package/dist/Page/index.js +48 -57
- package/dist/Popover/index.js +12 -20
- package/dist/{Popover-7c966790.js → Popover-a93db92d.js} +15 -21
- package/dist/ProgressBar/index.js +4 -12
- package/dist/{ProgressBar-5dfc1885.js → ProgressBar-04ee007d.js} +8 -15
- package/dist/RadioGroup/index.js +7 -16
- package/dist/{RadioGroup-9bdd8a59.js → RadioGroup-2ccd0678.js} +16 -23
- package/dist/RecurringSelect/index.js +90 -98
- package/dist/Select/index.js +17 -26
- package/dist/Spinner/index.js +4 -12
- package/dist/{Spinner-9d8fc7ff.js → Spinner-5d8359b8.js} +7 -14
- package/dist/StatusLabel/index.js +12 -21
- package/dist/Switch/index.js +5 -13
- package/dist/{Switch-cc9b645c.js → Switch-8bee06df.js} +17 -24
- package/dist/Table/index.js +19 -35
- package/dist/Tabs/index.js +23 -33
- package/dist/Text/index.js +5 -13
- package/dist/{Text-54334431.js → Text-703e2c21.js} +4 -10
- package/dist/Toast/index.js +32 -40
- package/dist/Tooltip/index.js +7 -15
- package/dist/{Tooltip-6b12f1c2.js → Tooltip-c80b9fb7.js} +22 -30
- package/dist/Typography/index.js +4 -12
- package/dist/{Typography-83915c54.js → Typography-09952a2f.js} +15 -22
- package/dist/{style-inject.es-9d2f5f4e.js → style-inject.es-a0e1a0ba.js} +1 -3
- package/dist/{tslib.es6-5b8768b7.js → tslib.es6-5849cd88.js} +1 -4
- package/package.json +3 -3
- package/rollup.config.js +1 -1
- package/dist/ButtonDismiss-1ccb84ec.js +0 -14
- package/dist/Emphasis-e10dde65.js +0 -19
- package/dist/Icon-405a216c.js +0 -40
- package/dist/InputValidation-377d6c62.js +0 -29
- package/dist/LightBox-93ef99b9.js +0 -117
- package/dist/Markdown-d53b01bf.js +0 -62
- package/dist/Option-07a24acd.js +0 -19
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { B as Button } from './Button-319d8fa0.js';
|
|
3
|
+
|
|
4
|
+
function ButtonDismiss({ onClick, ariaLabel }) {
|
|
5
|
+
return (React.createElement(Button, { ariaLabel: ariaLabel, icon: "remove", onClick: onClick, type: "tertiary", variation: "subtle" }));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { ButtonDismiss as B };
|
package/dist/Card/index.js
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
require('uuid');
|
|
17
|
-
require('framer-motion');
|
|
18
|
-
require('@jobber/hooks/useOnKeyDown');
|
|
19
|
-
require('@jobber/hooks/useRefocusOnActivator');
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
exports.Card = Card.Card;
|
|
1
|
+
export { C as Card } from '../Card-c1970a7c.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import '../style-inject.es-a0e1a0ba.js';
|
|
5
|
+
import '../Heading-04994667.js';
|
|
6
|
+
import '../Typography-09952a2f.js';
|
|
7
|
+
import '../Button-319d8fa0.js';
|
|
8
|
+
import 'react-router-dom';
|
|
9
|
+
import '../Icon-22723fe6.js';
|
|
10
|
+
import '@jobber/design';
|
|
11
|
+
import '../Menu-10681184.js';
|
|
12
|
+
import 'uuid';
|
|
13
|
+
import 'framer-motion';
|
|
14
|
+
import '@jobber/hooks/useOnKeyDown';
|
|
15
|
+
import '@jobber/hooks/useRefocusOnActivator';
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var Button = require('./Button-db6114a6.js');
|
|
8
|
-
var Menu = require('./Menu-2e64307a.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);
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
4
|
+
import { H as Heading } from './Heading-04994667.js';
|
|
5
|
+
import { B as Button } from './Button-319d8fa0.js';
|
|
6
|
+
import { M as Menu } from './Menu-10681184.js';
|
|
14
7
|
|
|
15
8
|
var css_248z$1 = ":root {\n --card--accent-color: var(--color-grey);\n --card--base-padding: var(--space-base);\n}\n\n._2wxPdv7kELk- {\n --card--border-color: var(--color-border);\n display: block;\n width: 100%;\n border: calc(16px / 16) solid rgb(225, 225, 225);\n border: var(--border-base) solid var(--card--border-color);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n outline-color: rgb(231, 213, 87);\n outline-color: var(--color-focus);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n/* Adjust `Content` components public padding to match the cards */\n\n._2wxPdv7kELk- > * {\n --public-content--padding: var(--card--base-padding);\n}\n\n/* Remove the nested `Content` components public padding */\n\n._2wxPdv7kELk- > * > * {\n --public-content--padding: 0;\n}\n\n._2wxPdv7kELk-:active {\n outline: 0;\n}\n\n._5LfUFF9DYsk- {\n border-top-width: 0;\n}\n\n._5LfUFF9DYsk-::before {\n content: \" \";\n display: block;\n margin: 0 calc(-1 * (16px / 16));\n margin: 0 calc(-1 * calc(16px / 16));\n margin: 0 calc(-1 * var(--border-base));\n border-top: 0.5rem solid rgb(181, 181, 181);\n border-top: 0.5rem solid var(--card--accent-color);\n border-radius: calc(16px / 8) calc(16px / 8) 0 0;\n border-radius: var(--radius-base) var(--radius-base) 0 0;\n}\n\n.tRfpysqqk8s- {\n --card--border-color: transparent;\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 color: inherit;\n text-decoration: inherit;\n cursor: pointer;\n transition: all 100ms linear;\n transition: all var(--timing-quick) linear;\n}\n\n.tRfpysqqk8s-:hover,\n.tRfpysqqk8s-:focus {\n background-color: rgb(250, 246, 219);\n background-color: var(--color-surface--hover);\n}\n\n.fAPeD1InvAI- {\n display: -ms-flexbox;\n display: flex;\n padding: calc(16px * 1);\n padding: var(--card--base-padding);\n background-color: rgb(244, 244, 244);\n background-color: var(--color-surface--background);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: start;\n align-items: flex-start;\n gap: calc(16px / 2);\n gap: var(--space-small);\n}\n";
|
|
16
9
|
var styles = {"card":"_2wxPdv7kELk-","accent":"_5LfUFF9DYsk-","clickable":"tRfpysqqk8s-","header":"fAPeD1InvAI-"};
|
|
17
|
-
|
|
10
|
+
styleInject(css_248z$1);
|
|
18
11
|
|
|
19
12
|
var css_248z = ".vvT4WQQNm1A- {\n --card--accent-color: var(--color-request);\n}\n\n.ewWSA-AqPBs- {\n --card--accent-color: var(--color-quote);\n}\n\n.ZuQFWmcM-38- {\n --card--accent-color: var(--color-job);\n}\n\n.b9aB-DbfSI8- {\n --card--accent-color: var(--color-invoice);\n}\n\n._6tFyd9Op3QY- {\n --card--accent-color: var(--color-blue);\n}\n\n.uFlsik1sMf8- {\n --card--accent-color: var(--color-blue--light);\n}\n\n._2dO0zCHWU48- {\n --card--accent-color: var(--color-blue--lighter);\n}\n\n.RR-XaNyu23U- {\n --card--accent-color: var(--color-blue--lightest);\n}\n\n.HLricrV5TRM- {\n --card--accent-color: var(--color-blue--dark);\n}\n\n.fvMAXzbYjVo- {\n --card--accent-color: var(--color-green);\n}\n\n.vppB-fszJ7M- {\n --card--accent-color: var(--color-green--light);\n}\n\n.EH4yrRyVrog- {\n --card--accent-color: var(--color-green--lighter);\n}\n\n.jfuIATPvpzw- {\n --card--accent-color: var(--color-green--lightest);\n}\n\n.mDgzdSzCmlw- {\n --card--accent-color: var(--color-green--dark);\n}\n\n.OWeyNXobrek- {\n --card--accent-color: var(--color-lime);\n}\n\n.gBd-jW7hc2A- {\n --card--accent-color: var(--color-lime--light);\n}\n\n.PZ3p2kISQl8- {\n --card--accent-color: var(--color-lime--lighter);\n}\n\n.wk56Avrf5u8- {\n --card--accent-color: var(--color-lime--lightest);\n}\n\n.BpxVs0ESZZQ- {\n --card--accent-color: var(--color-lime--lightest);\n}\n\n.W1Plus-w90s- {\n --card--accent-color: var(--color-yellowGreen);\n}\n\n.MBvezPZf2r0- {\n --card--accent-color: var(--color-yellowGreen--light);\n}\n\n.HpMA-8L7gEQ- {\n --card--accent-color: var(--color-yellowGreen--lighter);\n}\n\n.Z7K3xhC6jU8- {\n --card--accent-color: var(--color-yellowGreen--lightest);\n}\n\n.qYud5BgZVDQ- {\n --card--accent-color: var(--color-yellowGreen--dark);\n}\n\n.UmKFuhj-odE- {\n --card--accent-color: var(--color-yellow);\n}\n\n.urbYXsHvb-o- {\n --card--accent-color: var(--color-yellow--light);\n}\n\n.J5f4ygfEe1M- {\n --card--accent-color: var(--color-yellow--lighter);\n}\n\n.f0YOqNTXr2c- {\n --card--accent-color: var(--color-yellow--lightest);\n}\n\n.zYMhMXskG-o- {\n --card--accent-color: var(--color-yellow--dark);\n}\n\n.xMW5G3bcZ-U- {\n --card--accent-color: var(--color-red);\n}\n\n.-O8T8zi0AkQ- {\n --card--accent-color: var(--color-red--light);\n}\n\n.WNaOw-wPD40- {\n --card--accent-color: var(--color-red--light);\n}\n\n._3jne5angZmM- {\n --card--accent-color: var(--color-red--lightest);\n}\n\n.Ce3FxZAnXks- {\n --card--accent-color: var(--color-red--dark);\n}\n\n.Ubx9QHfbYVg- {\n --card--accent-color: var(--color-grey);\n}\n\n._9orHaOxo3ew- {\n --card--accent-color: var(--color-grey--light);\n}\n\n.gvgk4-Qr7G8- {\n --card--accent-color: var(--color-grey--lighter);\n}\n\n._6dk6hwjKwz8- {\n --card--accent-color: var(--color-grey--lightest);\n}\n\n.LFsxlyhhXWE- {\n --card--accent-color: var(--color-grey--dark);\n}\n\n.MNze-s50Qx0- {\n --card--accent-color: var(--color-greyBlue);\n}\n\n._1O6fbjtLDXE- {\n --card--accent-color: var(--color-greyBlue--light);\n}\n\n._3coHcfDM3VA- {\n --card--accent-color: var(--color-greyBlue--lighter);\n}\n\n._1GwEUK3RMmk- {\n --card--accent-color: var(--color-greyBlue--lightest);\n}\n\n._03qQDU55XhA- {\n --card--accent-color: var(--color-greyBlue--dark);\n}\n\n.XrONNgApzcY- {\n --card--accent-color: var(--color-lightBlue);\n}\n\n.axCpC15OAsQ- {\n --card--accent-color: var(--color-lightBlue--light);\n}\n\n.l7-ZKiT7ECs- {\n --card--accent-color: var(--color-lightBlue--lighter);\n}\n\n.R-d7ifPGd-U- {\n --card--accent-color: var(--color-lightBlue--lightest);\n}\n\n.tjGcvlfZNo0- {\n --card--accent-color: var(--color-lightBlue--dark);\n}\n\n._6yFi1QGzU-0- {\n --card--accent-color: var(--color-purple);\n}\n\n.s5B034ADstg- {\n --card--accent-color: var(--color-purple--light);\n}\n\n.XvHFMKO2QkA- {\n --card--accent-color: var(--color-purple--lighter);\n}\n\n.z1yqV2h-X0o- {\n --card--accent-color: var(--color-purple--lightest);\n}\n\n.ShqfQED9t1k- {\n --card--accent-color: var(--color-purple--dark);\n}\n\n.TSAuQcS9guw- {\n --card--accent-color: var(--color-pink);\n}\n\n.GwUX04DtVTg- {\n --card--accent-color: var(--color-pink--light);\n}\n\n.OOxzzrT-Kyg- {\n --card--accent-color: var(--color-pink--lighter);\n}\n\n._9iIg4vnXMPQ- {\n --card--accent-color: var(--color-pink--lightest);\n}\n\n._3VTCutRlbfQ- {\n --card--accent-color: var(--color-pink--dark);\n}\n\n.fG-k53wCdy8- {\n --card--accent-color: var(--color-teal);\n}\n\n.GMNha2EEVYg- {\n --card--accent-color: var(--color-teal--light);\n}\n\n._8mCqw-pGqc8- {\n --card--accent-color: var(--color-teal--lighter);\n}\n\n.XHd3g6apCv8- {\n --card--accent-color: var(--color-teal--lightest);\n}\n\n.XadpYA5oNNU- {\n --card--accent-color: var(--color-teal--dark);\n}\n\n.yOjNuw4uX2M- {\n --card--accent-color: var(--color-orange);\n}\n\n.CFBZb6YwS8U- {\n --card--accent-color: var(--color-orange--light);\n}\n\n.dj0X5xsNtZA- {\n --card--accent-color: var(--color-orange--lighter);\n}\n\n.bSU2KCid1GE- {\n --card--accent-color: var(--color-orange--lightest);\n}\n\n.dPKWRPFuIko- {\n --card--accent-color: var(--color-orange--dark);\n}\n\n.i90uzcHXLBQ- {\n --card--accent-color: var(--color-brown);\n}\n\n.Q1g5O8oxNQ8- {\n --card--accent-color: var(--color-brown--light);\n}\n\n.UimWc99bIs0- {\n --card--accent-color: var(--color-brown--lighter);\n}\n\n.AUWBtBoPSB4- {\n --card--accent-color: var(--color-brown--lightest);\n}\n\n._7xEA4hCoooA- {\n --card--accent-color: var(--color-brown--dark);\n}\n\n.IqAniikSo1A- {\n --card--accent-color: var(--color-navy);\n}\n\n.NTbn2du5U28- {\n --card--accent-color: var(--color-navy--light);\n}\n\n.RbY7pJetOU0- {\n --card--accent-color: var(--color-navy--lighter);\n}\n\n.TAlHuH8GUaY- {\n --card--accent-color: var(--color-navy--lightest);\n}\n\n.Pm1CuBHrg0Q- {\n --card--accent-color: var(--color-navy--dark);\n}\n\n._-4HRcMjMcTg- {\n --card--accent-color: var(--color-indigo);\n}\n\n.frP-WGi4cig- {\n --card--accent-color: var(--color-indigo--light);\n}\n\n.GzJbf-nczMU- {\n --card--accent-color: var(--color-indigo--lighter);\n}\n\n.LFsNJs2wsGY- {\n --card--accent-color: var(--color-indigo--lightest);\n}\n\n.KRBIaqOA1G4- {\n --card--accent-color: var(--color-indigo--dark);\n}\n\n.OXOOKDn6V-M- {\n --card--accent-color: var(--color-white);\n}\n";
|
|
20
13
|
var colors = {"requestColor":"vvT4WQQNm1A-","quoteColor":"ewWSA-AqPBs-","jobColor":"ZuQFWmcM-38-","invoiceColor":"b9aB-DbfSI8-","blue":"_6tFyd9Op3QY-","blueLight":"uFlsik1sMf8-","blueLighter":"_2dO0zCHWU48-","blueLightest":"RR-XaNyu23U-","blueDark":"HLricrV5TRM-","green":"fvMAXzbYjVo-","greenLight":"vppB-fszJ7M-","greenLighter":"EH4yrRyVrog-","greenLightest":"jfuIATPvpzw-","greenDark":"mDgzdSzCmlw-","lime":"OWeyNXobrek-","limeLight":"gBd-jW7hc2A-","limeLighter":"PZ3p2kISQl8-","limeLightest":"wk56Avrf5u8-","limeDark":"BpxVs0ESZZQ-","yellowGreen":"W1Plus-w90s-","yellowGreenLight":"MBvezPZf2r0-","yellowGreenLighter":"HpMA-8L7gEQ-","yellowGreenLightest":"Z7K3xhC6jU8-","yellowGreenDark":"qYud5BgZVDQ-","yellow":"UmKFuhj-odE-","yellowLight":"urbYXsHvb-o-","yellowLighter":"J5f4ygfEe1M-","yellowLightest":"f0YOqNTXr2c-","yellowDark":"zYMhMXskG-o-","red":"xMW5G3bcZ-U-","redLight":"-O8T8zi0AkQ-","redLighter":"WNaOw-wPD40-","redLightest":"_3jne5angZmM-","redDark":"Ce3FxZAnXks-","grey":"Ubx9QHfbYVg-","greyLight":"_9orHaOxo3ew-","greyLighter":"gvgk4-Qr7G8-","greyLightest":"_6dk6hwjKwz8-","greyDark":"LFsxlyhhXWE-","greyBlue":"MNze-s50Qx0-","greyBlueLight":"_1O6fbjtLDXE-","greyBlueLighter":"_3coHcfDM3VA-","greyBlueLightest":"_1GwEUK3RMmk-","greyBlueDark":"_03qQDU55XhA-","lightBlue":"XrONNgApzcY-","lightBlueLight":"axCpC15OAsQ-","lightBlueLighter":"l7-ZKiT7ECs-","lightBlueLightest":"R-d7ifPGd-U-","lightBlueDark":"tjGcvlfZNo0-","purple":"_6yFi1QGzU-0-","purpleLight":"s5B034ADstg-","purpleLighter":"XvHFMKO2QkA-","purpleLightest":"z1yqV2h-X0o-","purpleDark":"ShqfQED9t1k-","pink":"TSAuQcS9guw-","pinkLight":"GwUX04DtVTg-","pinkLighter":"OOxzzrT-Kyg-","pinkLightest":"_9iIg4vnXMPQ-","pinkDark":"_3VTCutRlbfQ-","teal":"fG-k53wCdy8-","tealLight":"GMNha2EEVYg-","tealLighter":"_8mCqw-pGqc8-","tealLightest":"XHd3g6apCv8-","tealDark":"XadpYA5oNNU-","orange":"yOjNuw4uX2M-","orangeLight":"CFBZb6YwS8U-","orangeLighter":"dj0X5xsNtZA-","orangeLightest":"bSU2KCid1GE-","orangeDark":"dPKWRPFuIko-","brown":"i90uzcHXLBQ-","brownLight":"Q1g5O8oxNQ8-","brownLighter":"UimWc99bIs0-","brownLightest":"AUWBtBoPSB4-","brownDark":"_7xEA4hCoooA-","navy":"IqAniikSo1A-","navyLight":"NTbn2du5U28-","navyLighter":"RbY7pJetOU0-","navyLightest":"TAlHuH8GUaY-","navyDark":"Pm1CuBHrg0Q-","indigo":"_-4HRcMjMcTg-","indigoLight":"frP-WGi4cig-","indigoLighter":"GzJbf-nczMU-","indigoLightest":"LFsNJs2wsGY-","indigoDark":"KRBIaqOA1G4-","white":"OXOOKDn6V-M-"};
|
|
21
|
-
|
|
14
|
+
styleInject(css_248z);
|
|
22
15
|
|
|
23
16
|
const ENTER_KEY = "Enter";
|
|
24
17
|
const SPACEBAR_KEY = " ";
|
|
@@ -27,8 +20,8 @@ const SPACEBAR_KEY = " ";
|
|
|
27
20
|
* Please use `<Card onClick={onClick} />` component instead.
|
|
28
21
|
*/
|
|
29
22
|
function CardClickable({ className, onClick, children, }) {
|
|
30
|
-
const cardRef =
|
|
31
|
-
return (
|
|
23
|
+
const cardRef = useRef();
|
|
24
|
+
return (React.createElement("div", { ref: cardRef, "data-testid": "clickable-card", className: className, onClick: onClick, onKeyUp: handleKeyup, onKeyDown: handleKeyDown, role: "button", tabIndex: 0 }, children));
|
|
32
25
|
function isCardFocused() {
|
|
33
26
|
return document.activeElement === cardRef.current;
|
|
34
27
|
}
|
|
@@ -53,41 +46,41 @@ function CardClickable({ className, onClick, children, }) {
|
|
|
53
46
|
*/
|
|
54
47
|
function CardHeader({ title, header, }) {
|
|
55
48
|
const heading = title || header;
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
49
|
+
if (React.isValidElement(heading))
|
|
50
|
+
return React.createElement(React.Fragment, null, heading);
|
|
58
51
|
if (heading) {
|
|
59
52
|
const titleString = typeof heading === "string" ? heading : heading.title;
|
|
60
|
-
return (
|
|
61
|
-
titleString &&
|
|
53
|
+
return (React.createElement("div", { className: styles.header },
|
|
54
|
+
titleString && React.createElement(Heading, { level: 3 }, titleString),
|
|
62
55
|
typeof heading === "object" && renderHeaderAction(heading === null || heading === void 0 ? void 0 : heading.action)));
|
|
63
56
|
}
|
|
64
|
-
return
|
|
57
|
+
return React.createElement(React.Fragment, null);
|
|
65
58
|
}
|
|
66
59
|
function renderHeaderAction(action) {
|
|
67
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === Button
|
|
60
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === Button) {
|
|
68
61
|
const props = Object.assign(Object.assign({ type: "tertiary" }, action.props), { size: "small" });
|
|
69
|
-
return action &&
|
|
62
|
+
return action && React.createElement(Button, Object.assign({}, props));
|
|
70
63
|
}
|
|
71
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === Menu
|
|
72
|
-
return action &&
|
|
64
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === Menu) {
|
|
65
|
+
return action && React.createElement(Menu, Object.assign({}, action.props));
|
|
73
66
|
}
|
|
74
|
-
return
|
|
67
|
+
return React.createElement(React.Fragment, null);
|
|
75
68
|
}
|
|
76
69
|
|
|
77
70
|
function Card({ accent, header, children, onClick, title, url, external = false, }) {
|
|
78
|
-
const className =
|
|
79
|
-
const cardContent = (
|
|
80
|
-
|
|
71
|
+
const className = classnames(styles.card, accent && styles.accent, (url || onClick) && styles.clickable, accent && colors[accent]);
|
|
72
|
+
const cardContent = (React.createElement(React.Fragment, null,
|
|
73
|
+
React.createElement(CardHeader, { title: title, header: header }),
|
|
81
74
|
children));
|
|
82
75
|
if (onClick) {
|
|
83
|
-
return (
|
|
76
|
+
return (React.createElement(CardClickable, { className: className, onClick: onClick }, cardContent));
|
|
84
77
|
}
|
|
85
78
|
else if (url) {
|
|
86
|
-
return (
|
|
79
|
+
return (React.createElement("a", Object.assign({ className: className, href: url }, (external && { target: "_blank", rel: "noopener noreferrer" })), cardContent));
|
|
87
80
|
}
|
|
88
81
|
else {
|
|
89
|
-
return
|
|
82
|
+
return React.createElement("div", { className: className }, cardContent);
|
|
90
83
|
}
|
|
91
84
|
}
|
|
92
85
|
|
|
93
|
-
|
|
86
|
+
export { Card as C };
|
package/dist/Checkbox/index.js
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
require('../Icon-405a216c.js');
|
|
13
|
-
require('@jobber/design');
|
|
14
|
-
require('../Text-54334431.js');
|
|
15
|
-
require('../Typography-83915c54.js');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
exports.Checkbox = Checkbox.Checkbox;
|
|
1
|
+
export { C as Checkbox } from '../Checkbox-e4733fb4.js';
|
|
2
|
+
import '../tslib.es6-5849cd88.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'uuid';
|
|
5
|
+
import 'classnames';
|
|
6
|
+
import 'react-hook-form';
|
|
7
|
+
import '../style-inject.es-a0e1a0ba.js';
|
|
8
|
+
import '../Icon-22723fe6.js';
|
|
9
|
+
import '@jobber/design';
|
|
10
|
+
import '../Text-703e2c21.js';
|
|
11
|
+
import '../Typography-09952a2f.js';
|
|
@@ -1,58 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var Icon = require('./Icon-405a216c.js');
|
|
10
|
-
var Text = require('./Text-54334431.js');
|
|
11
|
-
|
|
12
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
-
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
-
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
1
|
+
import { _ as __rest } from './tslib.es6-5849cd88.js';
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
|
+
import { v1 } from 'uuid';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { useFormContext, useForm, Controller } from 'react-hook-form';
|
|
6
|
+
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
7
|
+
import { I as Icon } from './Icon-22723fe6.js';
|
|
8
|
+
import { T as Text } from './Text-703e2c21.js';
|
|
16
9
|
|
|
17
10
|
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(125, 176, 14);\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(125, 176, 14);\n border-color: var(--color-interactive);\n background-color: rgb(125, 176, 14);\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
11
|
var styles = {"checkbox":"d-2MyyzKGN0-","wrapper":"OFHQaLxY8zI-","disabled":"HRrf3AZlpHc-","checkHolder":"kMH5B1jwh-Y-","input":"rup0RBe4DNU-","checkBox":"lOQVnJA7zPM-","indeterminate":"Njn2CQDXwVA-","label":"eHENKCs5umc-","description":"fSEH0cAO9cI-"};
|
|
19
|
-
|
|
12
|
+
styleInject(css_248z);
|
|
20
13
|
|
|
21
14
|
function Checkbox({ checked, defaultChecked, disabled, label, name, value, indeterminate = false, description, children, onChange, onFocus, }) {
|
|
22
|
-
const { control, setValue, watch } =
|
|
23
|
-
?
|
|
15
|
+
const { control, setValue, watch } = useFormContext() != undefined
|
|
16
|
+
? useFormContext()
|
|
24
17
|
: // If there isn't a Form Context being provided, get a form for this field.
|
|
25
|
-
|
|
26
|
-
const [identifier] =
|
|
18
|
+
useForm({ mode: "onTouched" });
|
|
19
|
+
const [identifier] = useState(v1());
|
|
27
20
|
/**
|
|
28
21
|
* Generate a name if one is not supplied, this is the name
|
|
29
22
|
* that will be used for react-hook-form and not neccessarily
|
|
30
23
|
* attached to the DOM
|
|
31
24
|
*/
|
|
32
|
-
const [controlledName] =
|
|
33
|
-
|
|
25
|
+
const [controlledName] = useState(name ? name : `generatedName--${identifier}`);
|
|
26
|
+
useEffect(() => {
|
|
34
27
|
if (value != undefined) {
|
|
35
28
|
setValue(controlledName, value);
|
|
36
29
|
}
|
|
37
30
|
}, [value, watch(controlledName)]);
|
|
38
|
-
const wrapperClassName =
|
|
39
|
-
const inputClassName =
|
|
31
|
+
const wrapperClassName = classnames(styles.wrapper, disabled && styles.disabled);
|
|
32
|
+
const inputClassName = classnames(styles.input, {
|
|
40
33
|
[styles.indeterminate]: indeterminate,
|
|
41
34
|
});
|
|
42
35
|
const iconName = indeterminate ? "minus2" : "checkmark";
|
|
43
|
-
const labelText = label ?
|
|
44
|
-
return (
|
|
45
|
-
var _b = _a.field, { onChange: onControllerChange, name: controllerName } = _b, rest =
|
|
36
|
+
const labelText = label ? React.createElement(Text, null, label) : children;
|
|
37
|
+
return (React.createElement(Controller, { control: control, name: controlledName, defaultValue: defaultChecked, render: (_a) => {
|
|
38
|
+
var _b = _a.field, { onChange: onControllerChange, name: controllerName } = _b, rest = __rest(_b, ["onChange", "name"]);
|
|
46
39
|
const fieldProps = Object.assign(Object.assign({}, rest), { id: identifier, className: inputClassName, name: name && controllerName, onChange: handleChange, disabled: disabled });
|
|
47
|
-
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
labelText &&
|
|
54
|
-
description && (
|
|
55
|
-
|
|
40
|
+
return (React.createElement("div", { className: styles.checkbox },
|
|
41
|
+
React.createElement("label", { className: wrapperClassName },
|
|
42
|
+
React.createElement("span", { className: styles.checkHolder },
|
|
43
|
+
React.createElement("input", Object.assign({}, fieldProps, { type: "checkbox", checked: checked, defaultChecked: defaultChecked, "aria-label": label, onChange: handleChange, onFocus: onFocus })),
|
|
44
|
+
React.createElement("span", { className: styles.checkBox },
|
|
45
|
+
React.createElement(Icon, { name: iconName, size: "small", color: "white" }))),
|
|
46
|
+
labelText && React.createElement("span", { className: styles.label }, labelText)),
|
|
47
|
+
description && (React.createElement("div", { className: styles.description },
|
|
48
|
+
React.createElement(Text, { variation: "subdued", size: "small" }, description)))));
|
|
56
49
|
function handleChange(event) {
|
|
57
50
|
const newChecked = event.currentTarget.checked;
|
|
58
51
|
onChange && onChange(newChecked);
|
|
@@ -61,4 +54,4 @@ function Checkbox({ checked, defaultChecked, disabled, label, name, value, indet
|
|
|
61
54
|
} }));
|
|
62
55
|
}
|
|
63
56
|
|
|
64
|
-
|
|
57
|
+
export { Checkbox as C };
|
package/dist/Chip/index.js
CHANGED
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
require('framer-motion');
|
|
18
|
-
require('react-popper');
|
|
19
|
-
require('@jobber/design');
|
|
20
|
-
|
|
21
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
|
-
|
|
23
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
1
|
+
import { C as Chip, s as styles } from '../Chip-40f5214c.js';
|
|
2
|
+
export { C as Chip } from '../Chip-40f5214c.js';
|
|
3
|
+
import { _ as __rest } from '../tslib.es6-5849cd88.js';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { I as Icon } from '../Icon-22723fe6.js';
|
|
6
|
+
import 'classnames';
|
|
7
|
+
import '@jobber/hooks/useInView';
|
|
8
|
+
import '../style-inject.es-a0e1a0ba.js';
|
|
9
|
+
import '../Avatar-b2e862de.js';
|
|
10
|
+
import 'color';
|
|
11
|
+
import '../Typography-09952a2f.js';
|
|
12
|
+
import '../Tooltip-c80b9fb7.js';
|
|
13
|
+
import 'react-dom';
|
|
14
|
+
import 'framer-motion';
|
|
15
|
+
import 'react-popper';
|
|
16
|
+
import '@jobber/design';
|
|
24
17
|
|
|
25
18
|
function ChipSelectable(_a) {
|
|
26
|
-
var { selected } = _a, rest =
|
|
27
|
-
return (
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
var { selected } = _a, rest = __rest(_a, ["selected"]);
|
|
20
|
+
return (React.createElement(Chip, Object.assign({}, rest),
|
|
21
|
+
React.createElement(Chip.Suffix, { className: selected ? styles.selected : "" },
|
|
22
|
+
React.createElement(Icon, { name: selected ? "checkmark" : "add", size: "small", color: selected ? "green" : "blue" }))));
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
function ChipDismissible(props) {
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
return (React.createElement(Chip, Object.assign({}, props),
|
|
27
|
+
React.createElement(Chip.Suffix, null,
|
|
28
|
+
React.createElement(Icon, { name: "cross", size: "small", color: "blue" }))));
|
|
36
29
|
}
|
|
37
30
|
|
|
38
|
-
|
|
39
|
-
exports.ChipDismissible = ChipDismissible;
|
|
40
|
-
exports.ChipSelectable = ChipSelectable;
|
|
31
|
+
export { ChipDismissible, ChipSelectable };
|