@loja-integrada/admin-components 0.9.8 → 0.12.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/README.md +12 -8
- package/dist/Forms/Checkbox/Checkbox.d.ts +21 -1
- package/dist/Forms/Checkbox/Checkbox.stories.d.ts +1 -0
- package/dist/Forms/Input/Input.d.ts +2 -2
- package/dist/Icons/icons-path/Download.d.ts +2 -0
- package/dist/Icons/icons-path/ExclamationCircle.d.ts +2 -0
- package/dist/Icons/icons-path/Link.d.ts +2 -0
- package/dist/Icons/icons-path/index.d.ts +3 -0
- package/dist/Indicators/Tooltip/Tooltip.d.ts +5 -1
- package/dist/admin-components.cjs.development.js +99 -18
- package/dist/admin-components.cjs.development.js.map +1 -1
- package/dist/admin-components.cjs.production.min.js +1 -1
- package/dist/admin-components.cjs.production.min.js.map +1 -1
- package/dist/admin-components.esm.js +99 -18
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Components/Table/Table.tsx +1 -1
- package/src/Forms/Checkbox/Checkbox.stories.tsx +6 -0
- package/src/Forms/Checkbox/Checkbox.tsx +81 -44
- package/src/Forms/Dropdown/Dropdown.tsx +1 -1
- package/src/Forms/Input/Input.tsx +2 -2
- package/src/Forms/InputMask/utils.ts +2 -2
- package/src/Forms/Toggle/Toggle.tsx +30 -9
- package/src/Icons/icons-path/Download.tsx +9 -0
- package/src/Icons/icons-path/ExclamationCircle.tsx +9 -0
- package/src/Icons/icons-path/Link.tsx +9 -0
- package/src/Icons/icons-path/index.ts +6 -0
- package/src/Indicators/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Indicators/Tooltip/Tooltip.tsx +23 -5
package/README.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Components for Loja Integrada admin.
|
|
4
4
|
[https://lojaintegrada.github.io/admin-components/](https://lojaintegrada.github.io/admin-components/)
|
|
5
5
|
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
yarn add @loja-integrada/admin-components
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import { Button } from '@loja-integrada/admin-components'
|
|
14
|
+
|
|
15
|
+
<Button></Button>
|
|
16
|
+
```
|
|
17
|
+
|
|
6
18
|
## Comamnds
|
|
7
19
|
|
|
8
20
|
### Storybook
|
|
@@ -45,14 +57,6 @@ Deploy to GitHub Pages is automatic after deploy to NPM
|
|
|
45
57
|
This project works with both Jest or Cypress Components.
|
|
46
58
|
Use `.spec.` for Cypress and `.test.` for Jest
|
|
47
59
|
|
|
48
|
-
## Usage
|
|
49
|
-
|
|
50
|
-
```js
|
|
51
|
-
import { Button } from '@loja-integrada/admin-components'
|
|
52
|
-
|
|
53
|
-
<Button></Button>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
60
|
### Bundle analysis
|
|
57
61
|
|
|
58
62
|
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `yarn size` and visulize it with `yarn analyze`.
|
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { InputHelpTextProps } from '../InputHelpText';
|
|
2
3
|
export declare const Checkbox: React.MemoExoticComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>>;
|
|
3
|
-
export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
export interface CheckboxProps extends InputHelpTextProps, React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Custom class name
|
|
7
|
+
* */
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Text label of the checkbox
|
|
11
|
+
* */
|
|
4
12
|
label?: string | React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Checkbox box isn't selected nwither unselected
|
|
15
|
+
* @default false
|
|
16
|
+
* */
|
|
5
17
|
indeterminate?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Item align
|
|
20
|
+
* @default 'center'
|
|
21
|
+
* */
|
|
6
22
|
boxAlign?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
23
|
+
/**
|
|
24
|
+
* Error message to display
|
|
25
|
+
* */
|
|
26
|
+
errorMessage?: string;
|
|
7
27
|
}
|
|
@@ -5,6 +5,7 @@ export default _default;
|
|
|
5
5
|
export declare const Default: Story<CheckboxProps>;
|
|
6
6
|
export declare const Indeterminate: Story<CheckboxProps>;
|
|
7
7
|
export declare const Disabled: Story<CheckboxProps>;
|
|
8
|
+
export declare const Error: Story<CheckboxProps>;
|
|
8
9
|
export declare const DisabledChecked: Story<CheckboxProps>;
|
|
9
10
|
export declare const DisabledIndeterminate: Story<CheckboxProps>;
|
|
10
11
|
export declare const WithOnChange: Story<CheckboxProps>;
|
|
@@ -25,12 +25,12 @@ export interface InputProps extends InputLabelProps, InputHelpTextProps, Omit<Re
|
|
|
25
25
|
sufix?: React.ReactNode | string | null;
|
|
26
26
|
/**
|
|
27
27
|
* Set visibility of input prefix border
|
|
28
|
-
* @default
|
|
28
|
+
* @default true
|
|
29
29
|
* */
|
|
30
30
|
prefixBorder?: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Set visibility of input sufix border
|
|
33
|
-
* @default
|
|
33
|
+
* @default true
|
|
34
34
|
* */
|
|
35
35
|
sufixBorder?: boolean;
|
|
36
36
|
}
|
|
@@ -21,10 +21,12 @@ export declare const icons: {
|
|
|
21
21
|
close: () => JSX.Element;
|
|
22
22
|
checkCircle: () => JSX.Element;
|
|
23
23
|
creditcard: () => JSX.Element;
|
|
24
|
+
download: () => JSX.Element;
|
|
24
25
|
product: () => JSX.Element;
|
|
25
26
|
edit: () => JSX.Element;
|
|
26
27
|
exchange: () => JSX.Element;
|
|
27
28
|
eye: () => JSX.Element;
|
|
29
|
+
exclamationCircle: () => JSX.Element;
|
|
28
30
|
exclamationTriangle: () => JSX.Element;
|
|
29
31
|
externalLink: () => JSX.Element;
|
|
30
32
|
home: () => JSX.Element;
|
|
@@ -37,6 +39,7 @@ export declare const icons: {
|
|
|
37
39
|
plusCircle: () => JSX.Element;
|
|
38
40
|
print: () => JSX.Element;
|
|
39
41
|
infoCircle: () => JSX.Element;
|
|
42
|
+
link: () => JSX.Element;
|
|
40
43
|
loading: () => JSX.Element;
|
|
41
44
|
pix: () => JSX.Element;
|
|
42
45
|
search: () => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
|
3
|
-
export declare const Tooltip: React.MemoExoticComponent<
|
|
3
|
+
export declare const Tooltip: React.MemoExoticComponent<(props: TooltipProps) => JSX.Element>;
|
|
4
4
|
export interface TooltipProps extends TippyProps {
|
|
5
5
|
/** Tooltip append
|
|
6
6
|
* @default 'parent'
|
|
@@ -30,4 +30,8 @@ export interface TooltipProps extends TippyProps {
|
|
|
30
30
|
* @default false
|
|
31
31
|
* */
|
|
32
32
|
interactive?: TippyProps['interactive'];
|
|
33
|
+
/** Tooltip theme
|
|
34
|
+
* @default dark
|
|
35
|
+
* */
|
|
36
|
+
theme?: 'light' | 'dark';
|
|
33
37
|
}
|
|
@@ -218,6 +218,14 @@ var CreditCard = function CreditCard() {
|
|
|
218
218
|
});
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
+
var Download = function Download() {
|
|
222
|
+
return React__default.createElement("path", {
|
|
223
|
+
fillRule: "evenodd",
|
|
224
|
+
d: "M14.667 11.556v2.666c0 .246-.2.445-.445.445H1.778a.445.445 0 0 1-.445-.445v-2.666H0v2.666C0 15.204.796 16 1.778 16h12.444c.982 0 1.778-.796 1.778-1.778v-2.666h-1.333ZM3.109 7.607a.668.668 0 0 1 .893-.992l3.331 3V0h1.334v9.614l3.331-2.999a.668.668 0 0 1 .893.992l-4.445 4a.667.667 0 0 1-.892 0l-4.445-4Z",
|
|
225
|
+
clipRule: "evenodd"
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
|
|
221
229
|
var Product = function Product() {
|
|
222
230
|
return React__default.createElement("path", {
|
|
223
231
|
fillRule: "evenodd",
|
|
@@ -250,6 +258,14 @@ var Eye = function Eye() {
|
|
|
250
258
|
});
|
|
251
259
|
};
|
|
252
260
|
|
|
261
|
+
var ExclamationCircle = function ExclamationCircle() {
|
|
262
|
+
return React__default.createElement("path", {
|
|
263
|
+
fillRule: "evenodd",
|
|
264
|
+
d: "M9 10.5A1.25 1.25 0 1 0 9 13a1.25 1.25 0 0 0 0-2.5Zm-.303-1h.605a.5.5 0 0 0 .497-.445l.328-2.945A1 1 0 0 0 9.132 5h-.266a1 1 0 0 0-.993 1.11L8.2 9.055a.5.5 0 0 0 .497.445Zm.303 7c-4.136 0-7.5-3.364-7.5-7.5S4.864 1.5 9 1.5s7.5 3.364 7.5 7.5-3.364 7.5-7.5 7.5ZM9 0a9 9 0 0 0-9 9 9 9 0 0 0 9 9 9 9 0 0 0 9-9 9 9 0 0 0-9-9Z",
|
|
265
|
+
clipRule: "evenodd"
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
|
|
253
269
|
var ExclamationTriangle = function ExclamationTriangle() {
|
|
254
270
|
return React__default.createElement("path", {
|
|
255
271
|
fillRule: "evenodd",
|
|
@@ -350,6 +366,14 @@ var InfoCircle = function InfoCircle() {
|
|
|
350
366
|
});
|
|
351
367
|
};
|
|
352
368
|
|
|
369
|
+
var Link = function Link() {
|
|
370
|
+
return React__default.createElement("path", {
|
|
371
|
+
fillRule: "evenodd",
|
|
372
|
+
clipRule: "evenodd",
|
|
373
|
+
d: "M10.5645 7.44624c-.301-.301-.78701-.301-1.08701 0-.301.301-.301.787 0 1.088l.74501.747c.34.34.526.79196.526 1.27096-.001.482-.189.933-.53 1.271l-3.82701 3.811c-1.106 1.103-2.91 1.102-4.016 0-.54-.539-.838-1.256-.838-2.02 0-.765.298-1.482.838-2.022l2.038-2.03096c.3-.3.302-.786.002-1.088-.299-.301-.786-.301-1.087-.002l-2.038 2.03196c-.833.83-1.29 1.933-1.29 3.111 0 1.177.457 2.281 1.29 3.112.854.849 1.973 1.274 3.093 1.274 1.12-.001 2.24-.425 3.093-1.273l3.82701-3.812c.632-.63.982-1.468.983-2.361.001-.89096-.346-1.72996-.977-2.36196l-.745-.746Zm6.154.057-2.31 2.314c-.301.30096-.787.30096-1.088 0-.3-.301-.3-.788 0-1.089l2.311-2.313c1.111-1.112 1.111-2.922 0-4.033-1.121-1.122-2.926-1.122-4.038-.01l-3.83001 3.835c-.7.701-.7 1.84 0 2.54l.75.752c.301.3.301.78696 0 1.08796-.149.15-.345.225-.543.225-.197 0-.393-.075-.544-.225l-.75-.75196c-1.299-1.3-1.299-3.416 0-4.716l3.83001-3.835c1.71-1.712 4.493-1.712 6.203 0 1.719 1.722 1.719 4.508.009 6.219Z"
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
|
|
353
377
|
var Loading = function Loading() {
|
|
354
378
|
return React__default.createElement("path", {
|
|
355
379
|
fillRule: "evenodd",
|
|
@@ -511,10 +535,12 @@ var icons = {
|
|
|
511
535
|
close: Close,
|
|
512
536
|
checkCircle: CheckCircle,
|
|
513
537
|
creditcard: CreditCard,
|
|
538
|
+
download: Download,
|
|
514
539
|
product: Product,
|
|
515
540
|
edit: Edit,
|
|
516
541
|
exchange: Exchange,
|
|
517
542
|
eye: Eye,
|
|
543
|
+
exclamationCircle: ExclamationCircle,
|
|
518
544
|
exclamationTriangle: ExclamationTriangle,
|
|
519
545
|
externalLink: ExternalLink,
|
|
520
546
|
home: Home,
|
|
@@ -527,6 +553,7 @@ var icons = {
|
|
|
527
553
|
plusCircle: PlusCircle,
|
|
528
554
|
print: Print,
|
|
529
555
|
infoCircle: InfoCircle,
|
|
556
|
+
link: Link,
|
|
530
557
|
loading: Loading,
|
|
531
558
|
pix: Pix,
|
|
532
559
|
search: Search,
|
|
@@ -964,9 +991,9 @@ var formatValuePatterns = {
|
|
|
964
991
|
},
|
|
965
992
|
onlyText: {
|
|
966
993
|
mask: function mask(rawValue) {
|
|
967
|
-
var onlyText = rawValue.replace(/[^a-zA-ZÀ-ú'
|
|
994
|
+
var onlyText = rawValue.replace(/[^a-zA-ZÀ-ú'˜0-9\sü]/g, '').split('');
|
|
968
995
|
return onlyText.map(function () {
|
|
969
|
-
return /[a-zA-ZÀ-ú'
|
|
996
|
+
return /[a-zA-ZÀ-ú'˜`´^0-9\sü]/g;
|
|
970
997
|
});
|
|
971
998
|
}
|
|
972
999
|
},
|
|
@@ -1322,6 +1349,8 @@ var ToggleComponent = function ToggleComponent(_ref, ref) {
|
|
|
1322
1349
|
isChecked = _React$useState[0],
|
|
1323
1350
|
setIsChecked = _React$useState[1];
|
|
1324
1351
|
|
|
1352
|
+
var toggleStatusText = disabled ? 'disabled' : 'enabled';
|
|
1353
|
+
var toggleCheckText = isChecked ? 'checked' : 'unchecked';
|
|
1325
1354
|
React__default.useEffect(function () {
|
|
1326
1355
|
setIsChecked(!!checked);
|
|
1327
1356
|
}, [checked]);
|
|
@@ -1332,9 +1361,31 @@ var ToggleComponent = function ToggleComponent(_ref, ref) {
|
|
|
1332
1361
|
onChange && onChange(event);
|
|
1333
1362
|
};
|
|
1334
1363
|
|
|
1364
|
+
var toggleClasses = {
|
|
1365
|
+
background: {
|
|
1366
|
+
checked: {
|
|
1367
|
+
enabled: 'bg-primary border-primary',
|
|
1368
|
+
disabled: 'bg-base-3 border-card-stroke'
|
|
1369
|
+
},
|
|
1370
|
+
unchecked: {
|
|
1371
|
+
enabled: 'bg-base-1 border-card-stroke',
|
|
1372
|
+
disabled: 'bg-base-3 border-card-stroke'
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
circle: {
|
|
1376
|
+
checked: {
|
|
1377
|
+
enabled: 'translate-x-full ml-px bg-base-1',
|
|
1378
|
+
disabled: 'translate-x-full ml-px bg-base-1'
|
|
1379
|
+
},
|
|
1380
|
+
unchecked: {
|
|
1381
|
+
enabled: 'translate-x-0 bg-inverted-2',
|
|
1382
|
+
disabled: 'translate-x-0 bg-base-1'
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1335
1386
|
var toggleContainerDisabledClasses = (disabled ? 'pointer-events-none' : '') + " relative";
|
|
1336
|
-
var toggleBackgroundClasses = "block border
|
|
1337
|
-
var toggleCircleClasses = "transform " +
|
|
1387
|
+
var toggleBackgroundClasses = "block border w-[53px] h-8 rounded-full " + toggleClasses.background[toggleCheckText][toggleStatusText] + " transition";
|
|
1388
|
+
var toggleCircleClasses = "transform " + toggleClasses.circle[toggleCheckText][toggleStatusText] + " absolute left-[6px] top-[6px] w-5 h-5 rounded-full transition";
|
|
1338
1389
|
var toggleLabelClasses = "ml-2 text-inverted-1 text-f6 tracking-4 label";
|
|
1339
1390
|
return React__default.createElement("label", {
|
|
1340
1391
|
htmlFor: inputId,
|
|
@@ -1357,8 +1408,8 @@ var ToggleComponent = function ToggleComponent(_ref, ref) {
|
|
|
1357
1408
|
}, label));
|
|
1358
1409
|
};
|
|
1359
1410
|
|
|
1360
|
-
var
|
|
1361
|
-
var Toggle = /*#__PURE__*/React__default.memo(
|
|
1411
|
+
var ToggleWithForwardRef = /*#__PURE__*/React__default.forwardRef(ToggleComponent);
|
|
1412
|
+
var Toggle = /*#__PURE__*/React__default.memo(ToggleWithForwardRef);
|
|
1362
1413
|
|
|
1363
1414
|
var sizeClasses = {
|
|
1364
1415
|
"default": 'h-12',
|
|
@@ -1447,7 +1498,7 @@ var CustomPlaceholder = function CustomPlaceholder(props) {
|
|
|
1447
1498
|
|
|
1448
1499
|
var CustomSingleValue = function CustomSingleValue(props, variant) {
|
|
1449
1500
|
return React__default.createElement(SingleValue, Object.assign({}, props, {
|
|
1450
|
-
className: "text-f6 tracking-4 text-
|
|
1501
|
+
className: "text-f6 tracking-4 text-on-base text-sm truncate " + variantValueClasses[variant]
|
|
1451
1502
|
}));
|
|
1452
1503
|
};
|
|
1453
1504
|
|
|
@@ -1594,16 +1645,23 @@ var DropdownWithFowardRef = /*#__PURE__*/React__default.forwardRef(DropdownCompo
|
|
|
1594
1645
|
var Dropdown = /*#__PURE__*/React__default.memo(DropdownWithFowardRef);
|
|
1595
1646
|
|
|
1596
1647
|
var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
1597
|
-
var
|
|
1648
|
+
var _ref$className = _ref.className,
|
|
1649
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1650
|
+
label = _ref.label,
|
|
1598
1651
|
id = _ref.id,
|
|
1599
1652
|
name = _ref.name,
|
|
1600
1653
|
onChange = _ref.onChange,
|
|
1601
1654
|
checked = _ref.checked,
|
|
1602
1655
|
disabled = _ref.disabled,
|
|
1603
|
-
indeterminate = _ref.indeterminate,
|
|
1656
|
+
_ref$indeterminate = _ref.indeterminate,
|
|
1657
|
+
indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
|
|
1604
1658
|
_ref$boxAlign = _ref.boxAlign,
|
|
1605
1659
|
boxAlign = _ref$boxAlign === void 0 ? 'center' : _ref$boxAlign,
|
|
1606
|
-
|
|
1660
|
+
helpText = _ref.helpText,
|
|
1661
|
+
_ref$hasError = _ref.hasError,
|
|
1662
|
+
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
1663
|
+
errorMessage = _ref.errorMessage,
|
|
1664
|
+
props = _objectWithoutPropertiesLoose(_ref, ["className", "label", "id", "name", "onChange", "checked", "disabled", "indeterminate", "boxAlign", "helpText", "hasError", "errorMessage"]);
|
|
1607
1665
|
|
|
1608
1666
|
var inputRef = React__default.useRef(null);
|
|
1609
1667
|
var inputId = id || name;
|
|
@@ -1617,6 +1675,7 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
|
1617
1675
|
setIsIndeterminate = _React$useState2[1];
|
|
1618
1676
|
|
|
1619
1677
|
var isCenterBoxAlign = boxAlign === 'center';
|
|
1678
|
+
var hasErrorState = hasError || !!errorMessage;
|
|
1620
1679
|
React__default.useEffect(function () {
|
|
1621
1680
|
setIsChecked(!!checked);
|
|
1622
1681
|
if (checked) setIsIndeterminate(false);
|
|
@@ -1636,7 +1695,7 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
|
1636
1695
|
|
|
1637
1696
|
var checkboxIconClasses = "transition duration-200 ease-in-out " + (isChecked || isIndeterminate ? 'scale-100' : 'scale-0');
|
|
1638
1697
|
var checkboxIconContainerClasses = "border border-card-stroke transition duration-200 ease-in-out\n " + (disabled ? 'bg-base-4' : isChecked || isIndeterminate ? 'bg-primary border-primary' : 'bg-base-1') + "\n " + (isCenterBoxAlign ? 'items-center' : '') + "\n rounded w-4 h-4 flex justify-center m-px\n ";
|
|
1639
|
-
var checkboxLabelClasses = "ml-1 input-label text-f6 tracking-4 leading-6 " + (disabled ? 'text-inverted-2' : '');
|
|
1698
|
+
var checkboxLabelClasses = "ml-1 input-label text-f6 tracking-4 leading-6 " + (hasErrorState ? 'text-danger' : disabled ? 'text-inverted-2' : '');
|
|
1640
1699
|
var alignOptions = {
|
|
1641
1700
|
start: 'items-start',
|
|
1642
1701
|
end: 'items-end',
|
|
@@ -1644,7 +1703,14 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
|
1644
1703
|
baseline: 'items-baseline',
|
|
1645
1704
|
stretch: 'items-stretch'
|
|
1646
1705
|
};
|
|
1647
|
-
|
|
1706
|
+
var HelpTextComponent = React__default.createElement(InputHelpText, {
|
|
1707
|
+
helpText: errorMessage || helpText,
|
|
1708
|
+
hasError: hasErrorState,
|
|
1709
|
+
className: "mt-2"
|
|
1710
|
+
});
|
|
1711
|
+
return React__default.createElement("div", {
|
|
1712
|
+
className: "inline-block " + className
|
|
1713
|
+
}, React__default.createElement("label", {
|
|
1648
1714
|
htmlFor: inputId,
|
|
1649
1715
|
className: "inline-flex " + alignOptions[boxAlign] + " cursor-pointer"
|
|
1650
1716
|
}, React__default.createElement("span", {
|
|
@@ -1678,7 +1744,7 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
|
|
|
1678
1744
|
fill: "white"
|
|
1679
1745
|
})))), React__default.createElement("span", {
|
|
1680
1746
|
className: checkboxLabelClasses
|
|
1681
|
-
}, label));
|
|
1747
|
+
}, label)), HelpTextComponent);
|
|
1682
1748
|
};
|
|
1683
1749
|
|
|
1684
1750
|
var CheckboxWithFowardRef = /*#__PURE__*/React__default.forwardRef(CheckboxComponent);
|
|
@@ -1867,7 +1933,7 @@ var TableComponent = function TableComponent(_ref2) {
|
|
|
1867
1933
|
}));
|
|
1868
1934
|
})), React__default.createElement("tbody", Object.assign({}, getTableBodyProps(), {
|
|
1869
1935
|
className: "text-sm text-on-base"
|
|
1870
|
-
}), isLoading ? React__default.createElement("tr", null, Array(columnsLength).fill(0).map(function (key) {
|
|
1936
|
+
}), isLoading ? React__default.createElement("tr", null, Array(columnsLength).fill(0).map(function (_, key) {
|
|
1871
1937
|
return React__default.createElement("td", {
|
|
1872
1938
|
key: key,
|
|
1873
1939
|
className: "" + TdClasses
|
|
@@ -2403,19 +2469,34 @@ var TooltipComponent = function TooltipComponent(props) {
|
|
|
2403
2469
|
computedProps.content = mounted ? props.content : '';
|
|
2404
2470
|
}
|
|
2405
2471
|
|
|
2406
|
-
return React__default.createElement(
|
|
2472
|
+
return React__default.createElement(StyledTooltipComponent, Object.assign({}, computedProps, {
|
|
2407
2473
|
appendTo: (props == null ? void 0 : props.appendTo) || 'parent',
|
|
2408
2474
|
hideOnClick: (props == null ? void 0 : props.hideOnClick) || false,
|
|
2409
2475
|
trigger: (props == null ? void 0 : props.trigger) || 'mouseenter',
|
|
2410
2476
|
touch: (props == null ? void 0 : props.touch) || ['hold', 400],
|
|
2411
2477
|
duration: (props == null ? void 0 : props.duration) || 150,
|
|
2412
2478
|
placement: ((_window = window) == null ? void 0 : _window.innerWidth) < 1024 ? 'top' : (props == null ? void 0 : props.placement) || 'top',
|
|
2413
|
-
interactive: (props == null ? void 0 : props.interactive) || false
|
|
2479
|
+
interactive: (props == null ? void 0 : props.interactive) || false,
|
|
2480
|
+
theme: (props == null ? void 0 : props.theme) || 'dark'
|
|
2414
2481
|
}));
|
|
2415
2482
|
};
|
|
2416
2483
|
|
|
2417
|
-
var
|
|
2418
|
-
|
|
2484
|
+
var theme = {
|
|
2485
|
+
light: {
|
|
2486
|
+
background: '#fff',
|
|
2487
|
+
color: '#371E56'
|
|
2488
|
+
},
|
|
2489
|
+
dark: {
|
|
2490
|
+
background: '#371E56',
|
|
2491
|
+
color: '#fff'
|
|
2492
|
+
}
|
|
2493
|
+
};
|
|
2494
|
+
var StyledTooltipComponent = /*#__PURE__*/styled(Tippy)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n --bg-color: ", ";\n position: relative;\n background-color: var(--bg-color);\n color: ", ";\n border-radius: 3px;\n font-size: 12px;\n letter-spacing: -0.4px;\n line-height: 1.4;\n outline: 0;\n transition-property: transform, visibility, opacity;\n\n &[data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n }\n\n [data-tippy-root] {\n max-width: calc(100vw - 10px);\n }\n\n &[data-placement^='top'] > .tippy-arrow {\n bottom: 0;\n }\n\n &[data-placement^='top'] > .tippy-arrow:before {\n bottom: -7px;\n left: 0;\n border-width: 8px 8px 0;\n border-top-color: initial;\n transform-origin: center top;\n }\n\n &[data-placement^='bottom'] > .tippy-arrow {\n top: 0;\n }\n\n &[data-placement^='bottom'] > .tippy-arrow:before {\n top: -7px;\n left: 0;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n transform-origin: center bottom;\n }\n\n &[data-placement^='left'] > .tippy-arrow {\n right: 0;\n }\n\n &[data-placement^='left'] > .tippy-arrow:before {\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n right: -7px;\n transform-origin: center left;\n }\n\n &[data-placement^='right'] > .tippy-arrow {\n left: 0;\n }\n\n &[data-placement^='right'] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n transform-origin: center right;\n }\n\n &[data-inertia][data-state='visible'] {\n transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);\n }\n\n .tippy-arrow {\n width: 15px;\n height: 15px;\n color: var(--bg-color);\n }\n\n .tippy-arrow:before {\n content: '';\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n\n .tippy-content {\n position: relative;\n padding: 12px 8px;\n z-index: 1;\n }\n"])), function (props) {
|
|
2495
|
+
return theme[props.theme].background;
|
|
2496
|
+
}, function (props) {
|
|
2497
|
+
return theme[props.theme].color;
|
|
2498
|
+
});
|
|
2499
|
+
var Tooltip = /*#__PURE__*/React__default.memo(TooltipComponent);
|
|
2419
2500
|
|
|
2420
2501
|
var SharedContext = /*#__PURE__*/React__default.createContext({
|
|
2421
2502
|
variant: 'default',
|