@jobber/components 4.7.1 → 4.7.2-improving-.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 +8 -8
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-1aa30ee1.js → Avatar-0e0768ed.js} +1 -1
- package/dist/Banner/index.js +4 -4
- package/dist/Button/index.js +2 -2
- package/dist/Button-d65241db.js +57 -0
- package/dist/ButtonDismiss/index.js +3 -3
- package/dist/{ButtonDismiss-7d9deeab.js → ButtonDismiss-130fe96b.js} +1 -1
- package/dist/Card/index.js +5 -5
- package/dist/{Card-459a48b7.js → Card-15ac570a.js} +4 -4
- package/dist/Checkbox/index.js +3 -3
- package/dist/{Checkbox-36f63689.js → Checkbox-ceb898f6.js} +2 -2
- package/dist/Chips/index.js +7 -7
- package/dist/ConfirmationModal/index.js +9 -9
- package/dist/{ConfirmationModal-3f9a3524.js → ConfirmationModal-4b779af8.js} +2 -2
- package/dist/DataDump/index.js +6 -6
- package/dist/DataTable/index.js +7 -7
- package/dist/DatePicker/index.js +3 -3
- package/dist/{DatePicker-b704c15b.js → DatePicker-33649ed3.js} +3 -3
- package/dist/DescriptionList/index.js +1 -1
- package/dist/Disclosure/index.js +1 -1
- package/dist/Drawer/index.js +5 -5
- package/dist/Emphasis/index.js +2 -2
- package/dist/{Emphasis-76a10790.js → Emphasis-9d83158a.js} +1 -1
- package/dist/FeatureSwitch/index.js +7 -7
- package/dist/FormField/index.js +5 -5
- package/dist/{FormField-76853659.js → FormField-49e2b0e1.js} +5 -5
- package/dist/FormatFile/index.js +11 -11
- package/dist/{FormatFile-d2c30cbc.js → FormatFile-84185e63.js} +6 -6
- package/dist/Gallery/index.js +12 -12
- package/dist/Heading/index.js +2 -2
- package/dist/{Heading-a1191b15.js → Heading-81a89ec6.js} +1 -1
- package/dist/InlineLabel/index.js +1 -1
- package/dist/InputAvatar/index.js +5 -5
- package/dist/InputDate/index.js +6 -6
- package/dist/InputEmail/index.js +5 -5
- package/dist/InputFile/index.js +3 -3
- package/dist/{InputFile-a7c0fbbc.js → InputFile-b7fb9fc9.js} +2 -2
- package/dist/InputNumber/index.js +5 -5
- package/dist/InputPassword/index.js +5 -5
- package/dist/InputText/index.js +6 -6
- package/dist/{InputText-73113193.js → InputText-c5420b60.js} +1 -1
- package/dist/InputTime/index.js +5 -5
- package/dist/InputValidation/index.js +3 -3
- package/dist/{InputValidation-bf743417.js → InputValidation-60a4c078.js} +1 -1
- package/dist/LightBox/index.js +4 -4
- package/dist/{LightBox-c637c684.js → LightBox-67d1c87c.js} +2 -2
- package/dist/List/index.js +6 -6
- package/dist/Markdown/index.js +5 -5
- package/dist/{Markdown-53a0bfda.js → Markdown-6c4f9489.js} +3 -3
- package/dist/Menu/index.js +3 -3
- package/dist/{Menu-aa9c73d2.js → Menu-daed9f58.js} +3 -3
- package/dist/Modal/index.js +5 -5
- package/dist/{Modal-c5f9040f.js → Modal-a835ceda.js} +4 -4
- package/dist/MultiSelect/index.js +4 -4
- package/dist/{Option-26e09990.js → Option-7d1d006d.js} +1 -1
- package/dist/Page/index.js +7 -7
- package/dist/Popover/index.js +4 -4
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-5dfc1885.js → ProgressBar-b9541fcc.js} +1 -1
- package/dist/RadioGroup/index.js +3 -3
- package/dist/Select/index.js +6 -6
- package/dist/StatusLabel/index.js +2 -2
- package/dist/Switch/index.js +2 -2
- package/dist/{Switch-e75145cc.js → Switch-d1dbb39c.js} +2 -2
- package/dist/Tabs/index.js +2 -2
- package/dist/Text/index.js +2 -2
- package/dist/{Text-e7ed0974.js → Text-c0104702.js} +1 -1
- package/dist/Toast/index.js +2 -2
- package/dist/Tooltip/index.js +3 -3
- package/dist/{Tooltip-bf67fe6e.js → Tooltip-2e0316d2.js} +1 -1
- package/dist/Typography/index.js +1 -1
- package/dist/{Typography-fd6f932a.js → Typography-0d6e9bc1.js} +4 -4
- package/package.json +5 -5
- package/dist/Button-69409e46.js +0 -57
package/dist/Switch/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Switch = require('../Switch-
|
|
5
|
+
var Switch = require('../Switch-d1dbb39c.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('../style-inject.es-9d2f5f4e.js');
|
|
9
|
-
require('../Typography-
|
|
9
|
+
require('../Typography-0d6e9bc1.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -3,14 +3,14 @@
|
|
|
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 Typography = require('./Typography-
|
|
6
|
+
var Typography = require('./Typography-0d6e9bc1.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
12
12
|
|
|
13
|
-
var css_248z = ":root {\n --switch--pipSize: calc(var(--space-base) * 1.875);\n --switch--labelWidth: calc(var(--switch--pipSize) * 1.3);\n --switch--borderOffset: calc(var(--border-base) * 2);\n}\n\n.NaSI2jsLI0c-,\n.NaSI2jsLI0c- * {\n box-sizing: border-box;\n transition: all 200ms;\n transition: all var(--timing-base);\n}\n\n.NaSI2jsLI0c- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n width: calc((((16px * 1) * 1.875) * 1.3) + ((16px * 1) * 1.875));\n width: calc(calc(calc(calc(16px * 1) * 1.875) * 1.3) + calc(calc(16px * 1) * 1.875));\n width: calc(var(--switch--labelWidth) + var(--switch--pipSize));\n padding: 0;\n border: calc(16px / 16) solid rgb(225, 225, 225);\n border: var(--border-base) solid var(--color-border);\n border-radius: calc((16px * 1) * 1.875);\n border-radius: calc(calc(16px * 1) * 1.875);\n border-radius: var(--switch--pipSize);\n overflow: hidden;\n line-height: normal;\n background-color: rgb(
|
|
13
|
+
var css_248z = ":root {\n --switch--pipSize: calc(var(--space-base) * 1.875);\n --switch--labelWidth: calc(var(--switch--pipSize) * 1.3);\n --switch--borderOffset: calc(var(--border-base) * 2);\n}\n\n.NaSI2jsLI0c-,\n.NaSI2jsLI0c- * {\n box-sizing: border-box;\n transition: all 200ms;\n transition: all var(--timing-base);\n}\n\n.NaSI2jsLI0c- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n width: calc((((16px * 1) * 1.875) * 1.3) + ((16px * 1) * 1.875));\n width: calc(calc(calc(calc(16px * 1) * 1.875) * 1.3) + calc(calc(16px * 1) * 1.875));\n width: calc(var(--switch--labelWidth) + var(--switch--pipSize));\n padding: 0;\n border: calc(16px / 16) solid rgb(225, 225, 225);\n border: var(--border-base) solid var(--color-border);\n border-radius: calc((16px * 1) * 1.875);\n border-radius: calc(calc(16px * 1) * 1.875);\n border-radius: var(--switch--pipSize);\n overflow: hidden;\n line-height: normal;\n background-color: rgb(250, 17, 242);\n background-color: var(--color-surface--background);\n cursor: pointer;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.NaSI2jsLI0c-:focus {\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.HbAoDMJhkwY- {\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.cc259FtdxeE- {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n margin-left: calc(-1 * (((16px * 1) * 1.875) * 1.3));\n margin-left: calc(-1 * calc(calc(calc(16px * 1) * 1.875) * 1.3));\n margin-left: calc(-1 * var(--switch--labelWidth));\n pointer-events: none;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.HbAoDMJhkwY- .cc259FtdxeE- {\n margin-left: calc(-1 * ((16px / 16) * 2));\n margin-left: calc(-1 * calc(calc(16px / 16) * 2));\n margin-left: calc(-1 * var(--switch--borderOffset));\n}\n\n.YZ-HIehHOBA- {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-width: calc(((16px * 1) * 1.875) * 1.3);\n min-width: calc(calc(calc(16px * 1) * 1.875) * 1.3);\n min-width: var(--switch--labelWidth);\n margin-top: calc(16px / 16);\n margin-top: var(--space-minuscule);\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n pointer-events: none;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.YZ-HIehHOBA-:first-of-type {\n padding-left: calc(16px / 2);\n padding-left: var(--space-small);\n}\n\n.YZ-HIehHOBA-:last-of-type {\n padding-right: calc(16px / 2);\n padding-right: var(--space-small);\n}\n\n._2hxova2FHpM- {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n width: calc((16px * 1) * 1.875);\n width: calc(calc(16px * 1) * 1.875);\n width: var(--switch--pipSize);\n height: calc((16px * 1) * 1.875);\n height: calc(calc(16px * 1) * 1.875);\n height: var(--switch--pipSize);\n border: calc(16px / 16) solid rgb(225, 225, 225);\n border: var(--border-base) solid var(--color-border);\n border-radius: 100%;\n border-radius: var(--radius-circle);\n background-color: rgb(227, 28, 121);\n background-color: var(--color-surface);\n}\n\n.HbAoDMJhkwY- ._2hxova2FHpM- {\n border-color: rgb(125, 176, 14);\n border-color: var(--color-green);\n}\n\n._6hWvJHjyLlk- {\n border-color: rgb(225, 225, 225);\n border-color: var(--color-disabled--secondary);\n background-color: rgb(250, 17, 242);\n background-color: var(--color-surface--background);\n cursor: not-allowed;\n}\n\n._6hWvJHjyLlk- ._2hxova2FHpM- {\n border-color: rgb(225, 225, 225);\n border-color: var(--color-disabled--secondary);\n}\n";
|
|
14
14
|
var styles = {"track":"NaSI2jsLI0c-","isChecked":"HbAoDMJhkwY-","toggle":"cc259FtdxeE-","label":"YZ-HIehHOBA-","pip":"_2hxova2FHpM-","disabled":"_6hWvJHjyLlk-"};
|
|
15
15
|
styleInject_es.styleInject(css_248z);
|
|
16
16
|
|
package/dist/Tabs/index.js
CHANGED
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var classnames = require('classnames');
|
|
7
7
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
8
|
-
var Typography = require('../Typography-
|
|
8
|
+
var Typography = require('../Typography-0d6e9bc1.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
14
14
|
|
|
15
|
-
var css_248z = ":root {\n --tab--height: calc(var(--space-larger) + var(--space-small));\n --tab--inset: var(--space-base);\n --public-tab--inset: var(--tab--inset);\n}\n\n.-kxlqXO5UN0- {\n display: block;\n width: 100%;\n}\n\n.qI4lWMSNH40- {\n position: relative;\n border-bottom: solid calc(16px / 16) rgb(225, 225, 225);\n border-bottom: solid var(--border-base) var(--color-border);\n}\n\n.xohIah5wcoE-:after,\n.qnY4S9sz-8g-:before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n width: 24px;\n}\n\n.xohIah5wcoE-:after {\n right: 0;\n box-shadow: inset -16px 0 16px -16px rgb(1, 41, 57);\n box-shadow: inset -16px 0 16px -16px var(--color-blue);\n}\n\n.qnY4S9sz-8g-:before {\n left: 0;\n box-shadow: inset 16px 0 16px -16px rgb(1, 41, 57);\n box-shadow: inset 16px 0 16px -16px var(--color-blue);\n}\n\n.wdW31G8Trag- {\n display: -ms-flexbox;\n display: flex;\n margin-bottom: calc(-1 * (16px / 16));\n margin-bottom: calc(-1 * calc(16px / 16));\n margin-bottom: calc(-1 * var(--border-base));\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n}\n\nul.wdW31G8Trag- {\n -webkit-padding-start: 0;\n padding-left: 0;\n}\n\n.wdW31G8Trag- li {\n list-style: none;\n}\n\n.MO7CXQ8xJXo- {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n height: calc((16px * 2) + (16px / 2));\n height: calc(calc(16px * 2) + calc(16px / 2));\n height: var(--tab--height);\n margin: 0;\n padding-left: calc(16px * 1);\n padding-left: var(--public-tab--inset);\n padding-right: calc(16px * 1);\n padding-right: var(--public-tab--inset);\n border: solid calc(16px / 16) rgb(225, 225, 225);\n border: solid var(--border-base) var(--color-border);\n border-left-width: 0;\n outline: none;\n background:
|
|
15
|
+
var css_248z = ":root {\n --tab--height: calc(var(--space-larger) + var(--space-small));\n --tab--inset: var(--space-base);\n --public-tab--inset: var(--tab--inset);\n}\n\n.-kxlqXO5UN0- {\n display: block;\n width: 100%;\n}\n\n.qI4lWMSNH40- {\n position: relative;\n border-bottom: solid calc(16px / 16) rgb(225, 225, 225);\n border-bottom: solid var(--border-base) var(--color-border);\n}\n\n.xohIah5wcoE-:after,\n.qnY4S9sz-8g-:before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n width: 24px;\n}\n\n.xohIah5wcoE-:after {\n right: 0;\n box-shadow: inset -16px 0 16px -16px rgb(1, 41, 57);\n box-shadow: inset -16px 0 16px -16px var(--color-blue);\n}\n\n.qnY4S9sz-8g-:before {\n left: 0;\n box-shadow: inset 16px 0 16px -16px rgb(1, 41, 57);\n box-shadow: inset 16px 0 16px -16px var(--color-blue);\n}\n\n.wdW31G8Trag- {\n display: -ms-flexbox;\n display: flex;\n margin-bottom: calc(-1 * (16px / 16));\n margin-bottom: calc(-1 * calc(16px / 16));\n margin-bottom: calc(-1 * var(--border-base));\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n}\n\nul.wdW31G8Trag- {\n -webkit-padding-start: 0;\n padding-left: 0;\n}\n\n.wdW31G8Trag- li {\n list-style: none;\n}\n\n.MO7CXQ8xJXo- {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n height: calc((16px * 2) + (16px / 2));\n height: calc(calc(16px * 2) + calc(16px / 2));\n height: var(--tab--height);\n margin: 0;\n padding-left: calc(16px * 1);\n padding-left: var(--public-tab--inset);\n padding-right: calc(16px * 1);\n padding-right: var(--public-tab--inset);\n border: solid calc(16px / 16) rgb(225, 225, 225);\n border: solid var(--border-base) var(--color-border);\n border-left-width: 0;\n outline: none;\n background: rgb(227, 28, 121);\n background: var(--color-surface);\n cursor: pointer;\n transition: all 200ms;\n transition: all var(--timing-base);\n}\n\n.MO7CXQ8xJXo-:hover,\n.MO7CXQ8xJXo-:focus {\n background-color: rgb(250, 246, 219);\n background-color: var(--color-surface--hover);\n}\n\n.MO7CXQ8xJXo-:focus span {\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.kqof65gyv7g- {\n border-top-color: rgb(125, 176, 14);\n border-top-color: var(--color-interactive);\n border-bottom-color: rgb(227, 28, 121);\n border-bottom-color: var(--color-surface);\n}\n\n.kqof65gyv7g-:focus {\n background-color: transparent;\n}\n\n.AimQioztR1U- {\n padding-top: calc(16px * 1);\n padding-top: var(--tab--inset);\n padding-bottom: calc(16px * 1);\n padding-bottom: var(--tab--inset);\n padding-left: calc(16px * 1);\n padding-left: var(--public-tab--inset);\n padding-right: calc(16px * 1);\n padding-right: var(--public-tab--inset);\n}\n";
|
|
16
16
|
var styles = {"tabs":"-kxlqXO5UN0-","overflow":"qI4lWMSNH40-","overflowRight":"xohIah5wcoE-","overflowLeft":"qnY4S9sz-8g-","tabRow":"wdW31G8Trag-","tab":"MO7CXQ8xJXo-","selected":"kqof65gyv7g-","tabContent":"AimQioztR1U-"};
|
|
17
17
|
styleInject_es.styleInject(css_248z);
|
|
18
18
|
|
package/dist/Text/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Text = require('../Text-
|
|
5
|
+
var Text = require('../Text-c0104702.js');
|
|
6
6
|
require('react');
|
|
7
|
-
require('../Typography-
|
|
7
|
+
require('../Typography-0d6e9bc1.js');
|
|
8
8
|
require('classnames');
|
|
9
9
|
require('../style-inject.es-9d2f5f4e.js');
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var Typography = require('./Typography-
|
|
4
|
+
var Typography = require('./Typography-0d6e9bc1.js');
|
|
5
5
|
|
|
6
6
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
7
|
|
package/dist/Toast/index.js
CHANGED
|
@@ -7,8 +7,8 @@ var client = require('react-dom/client');
|
|
|
7
7
|
var framerMotion = require('framer-motion');
|
|
8
8
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
9
9
|
var Icon = require('../Icon-405a216c.js');
|
|
10
|
-
var Button = require('../Button-
|
|
11
|
-
var Typography = require('../Typography-
|
|
10
|
+
var Button = require('../Button-d65241db.js');
|
|
11
|
+
var Typography = require('../Typography-0d6e9bc1.js');
|
|
12
12
|
require('@jobber/design');
|
|
13
13
|
require('classnames');
|
|
14
14
|
require('react-router-dom');
|
package/dist/Tooltip/index.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Tooltip = require('../Tooltip-
|
|
5
|
+
var Tooltip = require('../Tooltip-2e0316d2.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-dom');
|
|
9
9
|
require('framer-motion');
|
|
10
10
|
require('../style-inject.es-9d2f5f4e.js');
|
|
11
11
|
require('react-popper');
|
|
12
|
-
require('../Text-
|
|
13
|
-
require('../Typography-
|
|
12
|
+
require('../Text-c0104702.js');
|
|
13
|
+
require('../Typography-0d6e9bc1.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -6,7 +6,7 @@ var ReactDOM = require('react-dom');
|
|
|
6
6
|
var framerMotion = require('framer-motion');
|
|
7
7
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
8
8
|
var reactPopper = require('react-popper');
|
|
9
|
-
var Text = require('./Text-
|
|
9
|
+
var Text = require('./Text-c0104702.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
12
|
|
package/dist/Typography/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Typography = require('../Typography-
|
|
5
|
+
var Typography = require('../Typography-0d6e9bc1.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('../style-inject.es-9d2f5f4e.js');
|
|
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
11
11
|
|
|
12
|
-
var css_248z$8 = ".asDB9Ra2UpA- {\n margin: 0;\n padding: 0;\n font-family: \"Inter\", Helvetica, Arial
|
|
12
|
+
var css_248z$8 = ".asDB9Ra2UpA- {\n margin: 0;\n padding: 0;\n font-family: \"Comic Neue\", \"Inter\", Helvetica, Arial,\n sans-serif;\n font-family: var(--typography--fontFamily-normal);\n /* Wrap really long words or URL's */\n word-wrap: break-word;\n overflow-wrap: break-word;\n word-wrap: break-word;\n}\n";
|
|
13
13
|
var styles = {"base":"asDB9Ra2UpA-"};
|
|
14
14
|
styleInject_es.styleInject(css_248z$8);
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@ var css_248z$7 = "._7C4Ck1izBPs- {\n font-size: calc(\n (16px * 1) * 3\n );
|
|
|
17
17
|
var fontSizes = {"extravagant":"_7C4Ck1izBPs-","jumbo":"_8X-fSrUTxV8-","largest":"n-SPJXPXLSA-","larger":"vCrvF55YQ9o-","large":"FBoaHWotSik-","base":"V6yPPLHLeuY-","small":"T5XC4DgJlxk-","smaller":"sycqXMMO-wc-"};
|
|
18
18
|
styleInject_es.styleInject(css_248z$7);
|
|
19
19
|
|
|
20
|
-
var css_248z$6 = ".lziyWzzvuno- {\n font-family: \"Inter\", Helvetica, Arial
|
|
20
|
+
var css_248z$6 = ".lziyWzzvuno- {\n font-family: \"Comic Neue\", \"Inter\", Helvetica, Arial,\n sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-weight: 400;\n}\n\n.EEwS0f07RqQ- {\n font-family: \"Comic Neue\", \"Inter\", Helvetica, Arial,\n sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-weight: 700;\n}\n\n.kA3NtPPWbP0- {\n font-family: \"Comic Neue\", \"Jobber Pro\", \"Poppins\",\n Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-display);\n font-weight: 800;\n}\n\n._3M58OLqp0JM- {\n font-family: \"Comic Neue\", \"Jobber Pro\", \"Poppins\",\n Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-display);\n font-weight: 900;\n}\n";
|
|
21
21
|
var fontWeights = {"regular":"lziyWzzvuno-","bold":"EEwS0f07RqQ-","extraBold":"kA3NtPPWbP0-","black":"_3M58OLqp0JM-"};
|
|
22
22
|
styleInject_es.styleInject(css_248z$6);
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ var css_248z$5 = ".xE6cC62h5G0- {\n text-transform: uppercase;\n}\n\n.HlqJJ3Cl7
|
|
|
25
25
|
var textCases = {"uppercase":"xE6cC62h5G0-","lowercase":"HlqJJ3Cl7dE-","capitalize":"Loe26JnDfco-"};
|
|
26
26
|
styleInject_es.styleInject(css_248z$5);
|
|
27
27
|
|
|
28
|
-
var css_248z$4 = ".pkqoq2KXY9w- {\n color: rgb(1, 41, 57);\n color: var(--color-blue);\n}\n\n.ftVHRSii3ro- {\n color: rgb(181, 181, 181);\n color: var(--color-grey);\n}\n\n.FQbGABZWVzA- {\n color: rgb(66, 78, 86);\n color: var(--color-greyBlue--dark);\n}\n\n.zQaB9J0-vrs- {\n color: rgba(101, 120, 132, 1);\n color: var(--color-greyBlue);\n}\n\n._4-xdzcqT-Us- {\n color: rgb(125, 176, 14);\n color: var(--color-green);\n}\n\n.Zp9E7ELPjPA- {\n color: rgb(201, 66, 33);\n color: var(--color-red);\n}\n\n.v-Fo4PwPxDI- {\n color: rgb(221, 195, 15);\n color: var(--color-yellow);\n}\n\n.YrGUIChAZC0- {\n color: rgb(144, 127, 10);\n color: var(--color-yellow--dark);\n}\n\n.r7JcIVoDcTY- {\n color: rgb(60, 162, 224);\n color: var(--color-lightBlue);\n}\n\n._6RXTyd198iM- {\n color: rgba(255, 255, 255, 1);\n color: var(--color-white);\n}\n\n.fLix4jA-RkU- {\n color: rgb(
|
|
28
|
+
var css_248z$4 = ".pkqoq2KXY9w- {\n color: rgb(1, 41, 57);\n color: var(--color-blue);\n}\n\n.ftVHRSii3ro- {\n color: rgb(181, 181, 181);\n color: var(--color-grey);\n}\n\n.FQbGABZWVzA- {\n color: rgb(66, 78, 86);\n color: var(--color-greyBlue--dark);\n}\n\n.zQaB9J0-vrs- {\n color: rgba(101, 120, 132, 1);\n color: var(--color-greyBlue);\n}\n\n._4-xdzcqT-Us- {\n color: rgb(125, 176, 14);\n color: var(--color-green);\n}\n\n.Zp9E7ELPjPA- {\n color: rgb(201, 66, 33);\n color: var(--color-red);\n}\n\n.v-Fo4PwPxDI- {\n color: rgb(221, 195, 15);\n color: var(--color-yellow);\n}\n\n.YrGUIChAZC0- {\n color: rgb(144, 127, 10);\n color: var(--color-yellow--dark);\n}\n\n.r7JcIVoDcTY- {\n color: rgb(60, 162, 224);\n color: var(--color-lightBlue);\n}\n\n._6RXTyd198iM- {\n color: rgba(255, 255, 255, 1);\n color: var(--color-white);\n}\n\n.fLix4jA-RkU- {\n color: rgb(166, 227, 39);\n color: var(--color-heading);\n}\n\n._1g0uMAwFAsk- {\n color: rgb(16, 227, 139);\n color: var(--color-text);\n}\n\n.oXqFAHwT6y4- {\n color: rgba(101, 120, 132, 1);\n color: var(--color-text--secondary);\n}\n\n.rWkzi9HFNDU- {\n color: rgb(201, 66, 33);\n color: var(--color-critical);\n}\n\n.PQLYQKGCmPI- {\n color: rgb(144, 127, 10);\n color: var(--color-warning--onSurface);\n}\n\n.L6bBDJrx-m0- {\n color: rgb(39, 105, 146);\n color: var(--color-informative--onSurface);\n}\n\n.bJDJJKvmT90- {\n color: rgb(81, 114, 9);\n color: var(--color-success--onSurface);\n}\n\n._3g4iYm8XwkM- {\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n}\n";
|
|
29
29
|
var textColors = {"blue":"pkqoq2KXY9w-","grey":"ftVHRSii3ro-","greyBlueDark":"FQbGABZWVzA-","greyBlue":"zQaB9J0-vrs-","green":"_4-xdzcqT-Us-","red":"Zp9E7ELPjPA-","yellow":"v-Fo4PwPxDI-","yellowDark":"YrGUIChAZC0-","lightBlue":"r7JcIVoDcTY-","white":"_6RXTyd198iM-","heading":"fLix4jA-RkU-","text":"_1g0uMAwFAsk-","textSecondary":"oXqFAHwT6y4-","critical":"rWkzi9HFNDU-","warning":"PQLYQKGCmPI-","informative":"L6bBDJrx-m0-","success":"bJDJJKvmT90-","disabled":"_3g4iYm8XwkM-"};
|
|
30
30
|
styleInject_es.styleInject(css_248z$4);
|
|
31
31
|
|
|
@@ -41,7 +41,7 @@ var css_248z$1 = ".eDMsbRCP0kg- {\n text-align: left;\n}\n\n.j34R9yIG--c- {\n
|
|
|
41
41
|
var alignment = {"start":"eDMsbRCP0kg-","center":"j34R9yIG--c-","end":"CeI75T5sHwM-"};
|
|
42
42
|
styleInject_es.styleInject(css_248z$1);
|
|
43
43
|
|
|
44
|
-
var css_248z = ".mRpfVoMiIMM- {\n font-family: \"Inter\", Helvetica, Arial
|
|
44
|
+
var css_248z = ".mRpfVoMiIMM- {\n font-family: \"Comic Neue\", \"Inter\", Helvetica, Arial,\n sans-serif;\n font-family: var(--typography--fontFamily-normal);\n}\n\n.TPtuWMdOsfw- {\n font-family: \"Comic Neue\", \"Jobber Pro\", \"Poppins\",\n Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-display);\n}\n";
|
|
45
45
|
var fontFamilies = {"base":"mRpfVoMiIMM-","display":"TPtuWMdOsfw-"};
|
|
46
46
|
styleInject_es.styleInject(css_248z);
|
|
47
47
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.2-improving-.0+1d2abba6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"dist/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@jobber/design": "^0.32.
|
|
21
|
-
"@jobber/formatters": "
|
|
22
|
-
"@jobber/hooks": "
|
|
20
|
+
"@jobber/design": "^0.32.1-improving-.7+1d2abba6",
|
|
21
|
+
"@jobber/formatters": "^0.2.2",
|
|
22
|
+
"@jobber/hooks": "^2.0.2",
|
|
23
23
|
"@popperjs/core": "^2.0.6",
|
|
24
24
|
"@std-proposal/temporal": "0.0.1",
|
|
25
25
|
"@tanstack/react-table": "8.5.13",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"> 1%",
|
|
83
83
|
"IE 10"
|
|
84
84
|
],
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "1d2abba680e6b1e4fde28100a13c083a5918da7f"
|
|
86
86
|
}
|
package/dist/Button-69409e46.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
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-fd6f932a.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: 2s;\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(125, 176, 14);\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(125, 176, 14);\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(125, 176, 14);\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(125, 176, 14);\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(125, 176, 14);\n color: var(--button--color-variation);\n fill: rgb(125, 176, 14);\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(125, 176, 14);\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: 2s;\n -webkit-animation-duration: var(--button--duration-loading);\n animation-duration: 2s;\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, 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 });
|
|
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;
|