td-stylekit 24.3.0 → 24.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/es/Icon/staticTypes.d.ts +10 -2
- package/dist/es/Icon/types.js +20 -0
- package/dist/es/ThemeProvider/ThemeProvider.d.ts +19 -3
- package/dist/es/ThemeProvider/v4/Toggle.d.ts +19 -3
- package/dist/es/ThemeProvider/v4/Toggle.js +30 -12
- package/dist/es/ThemeProvider/v4/index.d.ts +19 -3
- package/dist/es/Toggle/Toggle.d.ts +2 -0
- package/dist/es/Toggle/Toggle.js +32 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [24.6.1](https://github.com/treasure-data/td-stylekit/compare/v24.6.0...v24.6.1) (2022-01-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **CON-9087:** Prevent adding Toggle props as HTML attributes ([#1210](https://github.com/treasure-data/td-stylekit/issues/1210)) ([67266de](https://github.com/treasure-data/td-stylekit/commit/67266de))
|
|
7
|
+
|
|
8
|
+
# [24.6.0](https://github.com/treasure-data/td-stylekit/compare/v24.5.0...v24.6.0) (2021-12-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **CON-8995:** Added Toggle switch for V4 ([#1208](https://github.com/treasure-data/td-stylekit/issues/1208)) ([7b2da50](https://github.com/treasure-data/td-stylekit/commit/7b2da50))
|
|
14
|
+
|
|
15
|
+
# [24.5.0](https://github.com/treasure-data/td-stylekit/compare/v24.4.0...v24.5.0) (2021-12-16)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **CON-8954:** Added Empty Icon For Columns ([#1203](https://github.com/treasure-data/td-stylekit/issues/1203)) ([4fcead1](https://github.com/treasure-data/td-stylekit/commit/4fcead1))
|
|
21
|
+
|
|
22
|
+
# [24.4.0](https://github.com/treasure-data/td-stylekit/compare/v24.3.0...v24.4.0) (2021-12-10)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **CON-8896:** Add Marketplace icons ([#1204](https://github.com/treasure-data/td-stylekit/issues/1204)) ([cd4fbf8](https://github.com/treasure-data/td-stylekit/commit/cd4fbf8))
|
|
28
|
+
|
|
1
29
|
# [24.3.0](https://github.com/treasure-data/td-stylekit/compare/v24.2.0...v24.3.0) (2021-12-09)
|
|
2
30
|
|
|
3
31
|
|
|
@@ -62,6 +62,8 @@ export declare type IconTypes = {
|
|
|
62
62
|
DurationIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
63
63
|
Edit: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
64
64
|
EditIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
65
|
+
EmptyColumns: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
66
|
+
EmptyColumnsIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
65
67
|
Exclamation: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
66
68
|
ExclamationIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
67
69
|
Exit: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
@@ -326,6 +328,8 @@ export declare type IconTypes = {
|
|
|
326
328
|
SystemSettingCheckIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
327
329
|
SystemToggle: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
328
330
|
SystemToggleIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
331
|
+
Tag: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
332
|
+
TagIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
329
333
|
Toggle: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
330
334
|
ToggleIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
331
335
|
ToolAddFile: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
@@ -448,6 +452,8 @@ export declare type IconTypes = {
|
|
|
448
452
|
DetailNavIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
449
453
|
Document: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
450
454
|
DocumentIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
455
|
+
Download: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
456
|
+
DownloadIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
451
457
|
End: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
452
458
|
EndIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
453
459
|
FilledDownArrow: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
@@ -528,20 +534,22 @@ export declare type IconTypes = {
|
|
|
528
534
|
SettingIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
529
535
|
Share: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
530
536
|
ShareIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
537
|
+
ShoppingBag: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
538
|
+
ShoppingBagIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
531
539
|
Sisense: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
532
540
|
SisenseIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
533
541
|
Source: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
534
542
|
SourceIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
535
543
|
Stage: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
536
544
|
StageIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
545
|
+
Store: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
546
|
+
StoreIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
537
547
|
Summary: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
538
548
|
SummaryIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
539
549
|
SymbolMinus: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
540
550
|
SymbolMinusIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
541
551
|
Table: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
542
552
|
TableIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
543
|
-
Tag: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
544
|
-
TagIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
545
553
|
Train: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
546
554
|
TrainIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
547
555
|
TreeNav: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
package/dist/es/Icon/types.js
CHANGED
|
@@ -115,6 +115,10 @@ React.createElement("path", {
|
|
|
115
115
|
}),Edit: /*#__PURE__*/
|
|
116
116
|
React.createElement("path", {
|
|
117
117
|
d: "M20.817 11.836l1.909-1.91 3.323 3.324-1.909 1.91zM10 26l.5-3.8 9.1-9.1 3.3 3.3-9.1 9.1-3.8.5zm2.4-2.9l-.1.5.5-.1 7.3-7.3-.5-.5-7.2 7.4z"
|
|
118
|
+
}),EmptyColumns: /*#__PURE__*/
|
|
119
|
+
React.createElement("path", {
|
|
120
|
+
d: "M16.5 10.4v-.1-.1h3.1v.2h-3.1zm3.9.7h.3v2.7h-.3v-2.7zm0 3.4h.3v.1h-.3v-.1zm1.1.1v-.1h3.1v.1h-3.1zm-1.1.7h.3v2.8h-.3v-2.8zm0 3.5h.3v.2h-.3v-.2zm1.1.2v-.2h3.1v.2h-3.1zm-1.1.6h.3v2.7h-.3v-2.7zm-.8 3.5h0v.1h-3.1v-.1h3.1zm0-.8h-3.1v-2.7h3.1v2.7zm-4-2.7v2.7h-.1v-2.7h.1zm0-.6h-.1v-.2h.1v.2zm-.8-.2v.2h-3.2v-.2h3.2zm.8-.7h-.1v-2.8h.1v2.8zm0-3.5h-.1v-.1h.1v.1zm-.8-.1v.1h-3.2v-.1h3.2zm.8-.7h-.1v-2.7h.1v2.7zm-.8-3.6v.2h-1.2v-.2h1.2zm-4.2 2c.1-1.1 1-1.9 2.2-2v.2c-1 .1-1.8.8-1.9 1.8h-.3zm0 1.6v-1h.1v1h-.1s0 0 0 0zm0 4.3v-2.8s0 0 0 0h.1v2.8h-.1s0 0 0 0zm4.2 5.1h-1.2v-.1h1.2v.1zm-2-.2v.2c-1.2-.1-2.1-.9-2.2-1.8h.3c.1.8.9 1.5 1.9 1.6zm-2.1-2.3h-.1v-1.1s0 0 0 0h.1v1.1zm5.8-6.1v-.1h3.1v.1h-3.1zm0 4.4v-.2h3.1v.2h-3.1zm4.9 4.2l.1-.1h1.1v.1h-1.2zm4.2-1.8c-.1.9-1.1 1.7-2.2 1.8V23c1-.1 1.8-.8 1.9-1.6h.3zm0-1.8v1.1h-.1v-1.1h.1zm0-4.3v2.8h-.1 0v-2.8h.1zm-4.2-5.1h1.2v.2h-1.1v-.1l-.1-.1zm2 .2v-.2c1.1.1 2.1.9 2.2 2h-.3c-.1-1-.9-1.7-1.9-1.8zm2.1 2.4h.1v1h-.1 0v-1zm-9-1.7h3.1v2.7h-3.1v-2.7zm0 4.2h3.1v2.8h-3.1v-2.8z",
|
|
121
|
+
strokeWidth: ".3"
|
|
118
122
|
}),Exclamation: /*#__PURE__*/
|
|
119
123
|
React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
120
124
|
d: "M18 10c-4.406 0-8 3.594-8 8s3.594 8 8 8 8-3.594 8-8-3.594-8-8-8zm0 2c3.326 0 6 2.674 6 6s-2.674 6-6 6-6-2.674-6-6 2.674-6 6-6z"
|
|
@@ -586,6 +590,10 @@ React.createElement("path", {
|
|
|
586
590
|
}),SystemToggle: /*#__PURE__*/
|
|
587
591
|
React.createElement("path", {
|
|
588
592
|
d: "M21 22h-6v1h6v-1zm-6 0c-2.224 0-4-1.776-4-4h-1c0 2.776 2.224 5 5 5v-1zm-4-4c0-2.224 1.776-4 4-4v-1c-2.776 0-5 2.224-5 5h1zm4-4h6v-1h-6v1zm6 0c2.224 0 4 1.776 4 4h1c0-2.776-2.224-5-5-5v1zm4 4c0 2.224-1.776 4-4 4v1c2.776 0 5-2.224 5-5h-1zm-4 2.7a2.7 2.7 0 002.7-2.7h-1a1.7 1.7 0 01-1.7 1.7v1zm2.7-2.7a2.7 2.7 0 00-2.7-2.7v1a1.7 1.7 0 011.7 1.7h1zM21 15.3a2.7 2.7 0 00-2.7 2.7h1a1.7 1.7 0 011.7-1.7v-1zM18.3 18a2.7 2.7 0 002.7 2.7v-1a1.7 1.7 0 01-1.7-1.7h-1z"
|
|
593
|
+
}),Tag: /*#__PURE__*/
|
|
594
|
+
React.createElement("path", {
|
|
595
|
+
d: "M11.3 11.5c-.6 0-1 .4-1 1v6.9c0 .6.4 1 1 1h9.8c.4 0 .8-.1 1.1-.4h0l3-3.4h0c.4-.3.4-1 0-1.3h0l-3-3.4h0c-.3-.3-.7-.4-1.1-.4h-9.8zm0 .7h9.8c.2 0 .4 0 .6.2l3.1 3.3h0c.1.1.1.4 0 .5h0l-3.1 3.3c-.2.2-.4.2-.6.2h-9.8c-.2 0-.3-.1-.3-.3v-6.9c0-.2.1-.3.3-.3zm10.6 2.5c-.7 0-1.3.6-1.3 1.2 0 .7.6 1.3 1.3 1.3.7 0 1.3-.6 1.3-1.3 0-.6-.6-1.2-1.3-1.2zm0 .6c.4 0 .7.3.7.6 0 .4-.3.7-.7.7-.4 0-.7-.3-.7-.7 0-.3.3-.6.7-.6z",
|
|
596
|
+
strokeWidth: ".3"
|
|
589
597
|
}),Toggle: /*#__PURE__*/
|
|
590
598
|
React.createElement("path", {
|
|
591
599
|
d: "M21 22h-6v1h6v-1zm-6 0c-2.224 0-4-1.776-4-4h-1c0 2.776 2.224 5 5 5v-1zm-4-4c0-2.224 1.776-4 4-4v-1c-2.776 0-5 2.224-5 5h1zm4-4h6v-1h-6v1zm6 0c2.224 0 4 1.776 4 4h1c0-2.776-2.224-5-5-5v1zm4 4c0 2.224-1.776 4-4 4v1c2.776 0 5-2.224 5-5h-1zm-4 2.7a2.7 2.7 0 002.7-2.7h-1a1.7 1.7 0 01-1.7 1.7v1zm2.7-2.7a2.7 2.7 0 00-2.7-2.7v1a1.7 1.7 0 011.7 1.7h1zM21 15.3a2.7 2.7 0 00-2.7 2.7h1a1.7 1.7 0 011.7-1.7v-1zM18.3 18a2.7 2.7 0 002.7 2.7v-1a1.7 1.7 0 01-1.7-1.7h-1z"
|
|
@@ -868,6 +876,10 @@ React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
|
868
876
|
React.createElement("path", {
|
|
869
877
|
d: "M12.879 4H7.5C6.675 4 6 4.675 6 5.5v12c0 .825.675 1.5 1.5 1.5h9c.825 0 1.5-.675 1.5-1.5V9.121a1.5 1.5 0 00-.44-1.06l-3.62-3.622A1.5 1.5 0 0012.879 4zm2.807 4.907a.2.2 0 01-.14.343H12.95a.2.2 0 01-.2-.2V6.506a.2.2 0 01.34-.143l2.596 2.544zm-7.354 3.127a1 1 0 011-1h5.336a1 1 0 010 2H9.332a1 1 0 01-1-1zm1 2.5a1 1 0 000 2h5.336a1 1 0 100-2H9.332z",
|
|
870
878
|
fillRule: "evenodd"
|
|
879
|
+
}),Download: /*#__PURE__*/
|
|
880
|
+
React.createElement("path", {
|
|
881
|
+
d: "M6.531 4a1 1 0 00-.864.496l-1.53 2.625A1 1 0 004 7.625v10.5C4 19.16 4.84 20 5.875 20h12.25C19.16 20 20 19.16 20 18.125v-10.5a1 1 0 00-.136-.504l-1.532-2.625A1 1 0 0017.47 4H6.53zM6 7.895L7.106 6h9.788L18 7.895v.058H6v-.058zm6.566 9.37l2.4-2.4A.8.8 0 0014.4 13.5H13v-3a1 1 0 00-2 0v3H9.6a.8.8 0 00-.565 1.366l2.4 2.4a.8.8 0 001.131 0z",
|
|
882
|
+
fillRule: "evenodd"
|
|
871
883
|
}),End: /*#__PURE__*/
|
|
872
884
|
React.createElement("path", {
|
|
873
885
|
d: "M20 12a8 8 0 11-16 0 8 8 0 0116 0zm-2.5 0a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z",
|
|
@@ -1067,6 +1079,10 @@ React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
|
1067
1079
|
})),Share: /*#__PURE__*/
|
|
1068
1080
|
React.createElement("path", {
|
|
1069
1081
|
d: "M21 5a3 3 0 01-4.905 2.318l-7.12 4.296a3.03 3.03 0 01-.027.948l7.113 4.149a3 3 0 11-1.008 1.727L7.939 14.29a3 3 0 11.128-4.463l6.994-4.22A3 3 0 1121 5z"
|
|
1082
|
+
}),ShoppingBag: /*#__PURE__*/
|
|
1083
|
+
React.createElement("path", {
|
|
1084
|
+
d: "M10 4a2 2 0 00-2 2v2H6a1 1 0 00-1 1v9a2 2 0 002 2h10a2 2 0 002-2V9a1 1 0 00-1-1h-2V6a2 2 0 00-2-2h-4zm4 4V6h-4v2h4zm-5 4a1 1 0 100-2 1 1 0 000 2zm6 0a1 1 0 100-2 1 1 0 000 2z",
|
|
1085
|
+
fillRule: "evenodd"
|
|
1070
1086
|
}),Sisense: /*#__PURE__*/
|
|
1071
1087
|
React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
1072
1088
|
d: "M4.875 3.687a1.187 1.187 0 00-2.375 0v15.517A2.296 2.296 0 004.796 21.5h15.517a1.187 1.187 0 100-2.375H4.875V3.687z"
|
|
@@ -1085,6 +1101,10 @@ React.createElement("path", {
|
|
|
1085
1101
|
}),Stage: /*#__PURE__*/
|
|
1086
1102
|
React.createElement("path", {
|
|
1087
1103
|
d: "M7.327 19a1 1 0 102 0v-6.151l7.063-3.398a.5.5 0 000-.902L9.327 5.151V5a1 1 0 10-2 0v14z"
|
|
1104
|
+
}),Store: /*#__PURE__*/
|
|
1105
|
+
React.createElement("path", {
|
|
1106
|
+
d: "M7 4.75a1 1 0 000 2h10a1 1 0 100-2H7zm-.823 3.5h11.646c.345 0 .65.23.76.574l1.376 4.336c.027.085.041.175.041.265v.704c0 .463-.358.84-.8.84H19v3.281a1 1 0 11-2 0v-3.281h-2v3.281a1 1 0 01-1 1H6a1 1 0 01-1-1v-3.281h-.2c-.442 0-.8-.377-.8-.84v-.704c0-.09.014-.18.04-.265l1.378-4.336a.804.804 0 01.759-.574zM13 14.969H7v2.281h6v-2.281z",
|
|
1107
|
+
fillRule: "evenodd"
|
|
1088
1108
|
}),Summary: /*#__PURE__*/
|
|
1089
1109
|
React.createElement("path", {
|
|
1090
1110
|
d: "M6 5.5a2 2 0 00-2 2v9a2 2 0 002 2h12a2 2 0 002-2v-9a2 2 0 00-2-2H6zm0 3a1 1 0 011-1h3a1 1 0 110 2H7a1 1 0 01-1-1zM6 12a1 1 0 011-1h3a1 1 0 110 2H7a1 1 0 01-1-1zm0 3.5a1 1 0 011-1h3a1 1 0 110 2H7a1 1 0 01-1-1zm7-7a1 1 0 011-1h3a1 1 0 011 1v7a1 1 0 01-1 1h-3a1 1 0 01-1-1v-7z",
|
|
@@ -992,12 +992,13 @@ declare namespace ThemeProvider {
|
|
|
992
992
|
padding: string;
|
|
993
993
|
}) | (() => {
|
|
994
994
|
display: string;
|
|
995
|
-
}) | ((({ theme, on }: {
|
|
995
|
+
}) | ((({ theme, on, color }: {
|
|
996
996
|
theme: any;
|
|
997
997
|
on: any;
|
|
998
|
+
color: any;
|
|
998
999
|
}) => {
|
|
999
1000
|
borderColor: any;
|
|
1000
|
-
background:
|
|
1001
|
+
background: any;
|
|
1001
1002
|
}) | (({ theme, disabled }: {
|
|
1002
1003
|
theme: any;
|
|
1003
1004
|
disabled: any;
|
|
@@ -1012,12 +1013,27 @@ declare namespace ThemeProvider {
|
|
|
1012
1013
|
outlineWidth: number;
|
|
1013
1014
|
outlineStyle: string;
|
|
1014
1015
|
outlineColor: string;
|
|
1015
|
-
})
|
|
1016
|
+
}) | (({ theme, toggleSwitch, color }: {
|
|
1017
|
+
theme: any;
|
|
1018
|
+
toggleSwitch: any;
|
|
1019
|
+
color: any;
|
|
1020
|
+
}) => {
|
|
1021
|
+
background: any;
|
|
1022
|
+
borderColor: any;
|
|
1023
|
+
}))[] | ((({ theme, on, color }: {
|
|
1016
1024
|
theme: any;
|
|
1017
1025
|
on: any;
|
|
1026
|
+
color: any;
|
|
1018
1027
|
}) => {
|
|
1019
1028
|
left: number;
|
|
1020
1029
|
borderColor: any;
|
|
1030
|
+
}) | (({ theme, toggleSwitch, color }: {
|
|
1031
|
+
theme: any;
|
|
1032
|
+
toggleSwitch: any;
|
|
1033
|
+
color: any;
|
|
1034
|
+
}) => {
|
|
1035
|
+
right: number;
|
|
1036
|
+
borderColor: any;
|
|
1021
1037
|
}) | (({ theme, disabled }: {
|
|
1022
1038
|
theme: any;
|
|
1023
1039
|
disabled: any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
[x: string]: ((({ theme, on }: {
|
|
2
|
+
[x: string]: ((({ theme, on, color }: {
|
|
3
3
|
theme: any;
|
|
4
4
|
on: any;
|
|
5
|
+
color: any;
|
|
5
6
|
}) => {
|
|
6
7
|
borderColor: any;
|
|
7
|
-
background:
|
|
8
|
+
background: any;
|
|
8
9
|
}) | (({ theme, disabled }: {
|
|
9
10
|
theme: any;
|
|
10
11
|
disabled: any;
|
|
@@ -19,12 +20,27 @@ declare const _default: {
|
|
|
19
20
|
outlineWidth: number;
|
|
20
21
|
outlineStyle: string;
|
|
21
22
|
outlineColor: string;
|
|
22
|
-
})
|
|
23
|
+
}) | (({ theme, toggleSwitch, color }: {
|
|
24
|
+
theme: any;
|
|
25
|
+
toggleSwitch: any;
|
|
26
|
+
color: any;
|
|
27
|
+
}) => {
|
|
28
|
+
background: any;
|
|
29
|
+
borderColor: any;
|
|
30
|
+
}))[] | ((({ theme, on, color }: {
|
|
23
31
|
theme: any;
|
|
24
32
|
on: any;
|
|
33
|
+
color: any;
|
|
25
34
|
}) => {
|
|
26
35
|
left: number;
|
|
27
36
|
borderColor: any;
|
|
37
|
+
}) | (({ theme, toggleSwitch, color }: {
|
|
38
|
+
theme: any;
|
|
39
|
+
toggleSwitch: any;
|
|
40
|
+
color: any;
|
|
41
|
+
}) => {
|
|
42
|
+
right: number;
|
|
43
|
+
borderColor: any;
|
|
28
44
|
}) | (({ theme, disabled }: {
|
|
29
45
|
theme: any;
|
|
30
46
|
disabled: any;
|
|
@@ -19,10 +19,11 @@ export default (_Root$ToggleKnob = {}, _defineProperty(_Root$ToggleKnob, Root, [
|
|
|
19
19
|
};
|
|
20
20
|
}, function (_ref2) {
|
|
21
21
|
var theme = _ref2.theme,
|
|
22
|
-
on = _ref2.on
|
|
22
|
+
on = _ref2.on,
|
|
23
|
+
color = _ref2.color;
|
|
23
24
|
return on && {
|
|
24
|
-
borderColor: theme.color.DarkHover,
|
|
25
|
-
background: "linear-gradient(to right, ".concat(theme.color.DarkHover, ", ").concat(theme.color.DarkSecondary, ")")
|
|
25
|
+
borderColor: color || theme.color.DarkHover,
|
|
26
|
+
background: color || "linear-gradient(to right, ".concat(theme.color.DarkHover, ", ").concat(theme.color.DarkSecondary, ")")
|
|
26
27
|
};
|
|
27
28
|
}, function (_ref3) {
|
|
28
29
|
var theme = _ref3.theme,
|
|
@@ -40,8 +41,16 @@ export default (_Root$ToggleKnob = {}, _defineProperty(_Root$ToggleKnob, Root, [
|
|
|
40
41
|
outlineStyle: 'solid',
|
|
41
42
|
outlineColor: 'Highlight'
|
|
42
43
|
};
|
|
43
|
-
}
|
|
44
|
-
var theme = _ref5.theme
|
|
44
|
+
}, function (_ref5) {
|
|
45
|
+
var theme = _ref5.theme,
|
|
46
|
+
toggleSwitch = _ref5.toggleSwitch,
|
|
47
|
+
color = _ref5.color;
|
|
48
|
+
return toggleSwitch && {
|
|
49
|
+
background: color || "linear-gradient(to right, ".concat(theme.color.DarkHover, ", ").concat(theme.color.DarkSecondary, ")"),
|
|
50
|
+
borderColor: color || theme.color.DarkHover
|
|
51
|
+
};
|
|
52
|
+
}]), _defineProperty(_Root$ToggleKnob, ToggleKnob, [function (_ref6) {
|
|
53
|
+
var theme = _ref6.theme;
|
|
45
54
|
return {
|
|
46
55
|
border: "".concat(theme.borderWidth[2], " solid transparent"),
|
|
47
56
|
borderColor: theme.color.LightDivider,
|
|
@@ -52,16 +61,25 @@ export default (_Root$ToggleKnob = {}, _defineProperty(_Root$ToggleKnob, Root, [
|
|
|
52
61
|
top: -2,
|
|
53
62
|
backgroundColor: theme.color.PrimaryContrast
|
|
54
63
|
};
|
|
55
|
-
}, function (
|
|
56
|
-
var theme =
|
|
57
|
-
on =
|
|
64
|
+
}, function (_ref7) {
|
|
65
|
+
var theme = _ref7.theme,
|
|
66
|
+
on = _ref7.on,
|
|
67
|
+
color = _ref7.color;
|
|
58
68
|
return on && {
|
|
59
69
|
left: 10,
|
|
60
|
-
borderColor: theme.color.DarkHover
|
|
70
|
+
borderColor: color || theme.color.DarkHover
|
|
61
71
|
};
|
|
62
|
-
}, function (
|
|
63
|
-
var theme =
|
|
64
|
-
|
|
72
|
+
}, function (_ref8) {
|
|
73
|
+
var theme = _ref8.theme,
|
|
74
|
+
toggleSwitch = _ref8.toggleSwitch,
|
|
75
|
+
color = _ref8.color;
|
|
76
|
+
return toggleSwitch && {
|
|
77
|
+
right: 10,
|
|
78
|
+
borderColor: color || theme.color.DarkHover
|
|
79
|
+
};
|
|
80
|
+
}, function (_ref9) {
|
|
81
|
+
var theme = _ref9.theme,
|
|
82
|
+
disabled = _ref9.disabled;
|
|
65
83
|
return disabled && {
|
|
66
84
|
borderColor: theme.color.LightDivider
|
|
67
85
|
};
|
|
@@ -854,12 +854,13 @@ declare const _default: {
|
|
|
854
854
|
padding: string;
|
|
855
855
|
}) | (() => {
|
|
856
856
|
display: string;
|
|
857
|
-
}) | ((({ theme, on }: {
|
|
857
|
+
}) | ((({ theme, on, color }: {
|
|
858
858
|
theme: any;
|
|
859
859
|
on: any;
|
|
860
|
+
color: any;
|
|
860
861
|
}) => {
|
|
861
862
|
borderColor: any;
|
|
862
|
-
background:
|
|
863
|
+
background: any;
|
|
863
864
|
}) | (({ theme, disabled }: {
|
|
864
865
|
theme: any;
|
|
865
866
|
disabled: any;
|
|
@@ -874,12 +875,27 @@ declare const _default: {
|
|
|
874
875
|
outlineWidth: number;
|
|
875
876
|
outlineStyle: string;
|
|
876
877
|
outlineColor: string;
|
|
877
|
-
})
|
|
878
|
+
}) | (({ theme, toggleSwitch, color }: {
|
|
879
|
+
theme: any;
|
|
880
|
+
toggleSwitch: any;
|
|
881
|
+
color: any;
|
|
882
|
+
}) => {
|
|
883
|
+
background: any;
|
|
884
|
+
borderColor: any;
|
|
885
|
+
}))[] | ((({ theme, on, color }: {
|
|
878
886
|
theme: any;
|
|
879
887
|
on: any;
|
|
888
|
+
color: any;
|
|
880
889
|
}) => {
|
|
881
890
|
left: number;
|
|
882
891
|
borderColor: any;
|
|
892
|
+
}) | (({ theme, toggleSwitch, color }: {
|
|
893
|
+
theme: any;
|
|
894
|
+
toggleSwitch: any;
|
|
895
|
+
color: any;
|
|
896
|
+
}) => {
|
|
897
|
+
right: number;
|
|
898
|
+
borderColor: any;
|
|
883
899
|
}) | (({ theme, disabled }: {
|
|
884
900
|
theme: any;
|
|
885
901
|
disabled: any;
|
package/dist/es/Toggle/Toggle.js
CHANGED
|
@@ -14,9 +14,12 @@ import React, { Component } from 'react';
|
|
|
14
14
|
import Box from '../Box';
|
|
15
15
|
import VisuallyHidden from '../VisuallyHidden';
|
|
16
16
|
import { getOverrides, Overridable } from '../ThemeProvider';
|
|
17
|
+
import isPropValid from '../utils/isPropValid';
|
|
17
18
|
export var ToggleBackground = /*#__PURE__*/_styled('div', {
|
|
18
19
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
19
|
-
return
|
|
20
|
+
return isPropValid(prop, {
|
|
21
|
+
exclude: ['on', 'focused']
|
|
22
|
+
});
|
|
20
23
|
},
|
|
21
24
|
target: "e1i9hm8k0"
|
|
22
25
|
})(function (_ref) {
|
|
@@ -33,9 +36,10 @@ export var ToggleBackground = /*#__PURE__*/_styled('div', {
|
|
|
33
36
|
};
|
|
34
37
|
}, function (_ref2) {
|
|
35
38
|
var theme = _ref2.theme,
|
|
36
|
-
on = _ref2.on
|
|
39
|
+
on = _ref2.on,
|
|
40
|
+
color = _ref2.color;
|
|
37
41
|
return on && {
|
|
38
|
-
background: theme.palette.primary[4]
|
|
42
|
+
background: color || theme.palette.primary[4]
|
|
39
43
|
};
|
|
40
44
|
}, function (_ref3) {
|
|
41
45
|
var theme = _ref3.theme,
|
|
@@ -53,7 +57,15 @@ export var ToggleBackground = /*#__PURE__*/_styled('div', {
|
|
|
53
57
|
boxShadow: "0px 0px 0px 3px ".concat(theme.palette.primary[2]),
|
|
54
58
|
outline: 'none'
|
|
55
59
|
};
|
|
56
|
-
},
|
|
60
|
+
}, function (_ref5) {
|
|
61
|
+
var theme = _ref5.theme,
|
|
62
|
+
toggleSwitch = _ref5.toggleSwitch,
|
|
63
|
+
color = _ref5.color;
|
|
64
|
+
return toggleSwitch && {
|
|
65
|
+
background: color || "linear-gradient(to right, ".concat(theme.color.DarkHover, ", ").concat(theme.color.DarkSecondary, ")"),
|
|
66
|
+
borderColor: color || theme.color.DarkHover
|
|
67
|
+
};
|
|
68
|
+
}, getOverrides(Overridable.Toggle.Root), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Ub2dnbGUvVG9nZ2xlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRZ0MiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL1RvZ2dsZS9Ub2dnbGUudHN4Iiwic291cmNlc0NvbnRlbnQiOls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cy5zdGF0ZVxuICAgIHJldHVybiAoXG4gICAgICA8VG9nZ2xlQmFja2dyb3VuZFxuICAgICAgICBvbj17b259XG4gICAgICAgIHRpdGxlPXt0b29sdGlwfVxuICAgICAgICBmb2N1c2VkPXtpc0ZvY3VzZWR9XG4gICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgZGF0YS1pbnN0cnVtZW50YXRpb249e2RhdGFJbnN0cnVtZW50YXRpb259XG4gICAgICAgIG9uQ2xpY2s9e3RoaXMub25DbGlja31cbiAgICAgICAgY29sb3I9e2NvbG9yfVxuICAgICAgICB0b2dnbGVTd2l0Y2g9e3RvZ2dsZVN3aXRjaH1cbiAgICAgID5cbiAgICAgICAgPFRvZ2dsZUtub2JcbiAgICAgICAgICBvbj17b259XG4gICAgICAgICAgZGlzYWJsZWQ9e2Rpc2FibGVkfVxuICAgICAgICAgIGNvbG9yPXtjb2xvcn1cbiAgICAgICAgICB0b2dnbGVTd2l0Y2g9e3RvZ2dsZVN3aXRjaH1cbiAgICAgICAgPlxuICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgPC9Ub2dnbGVLbm9iPlxuICAgICAgICA8VmlzdWFsbHlIaWRkZW4+XG4gICAgICAgICAgPGlucHV0XG4gICAgICAgICAgICBvbkZvY3VzPXt0aGlzLm9uRm9jdXN9XG4gICAgICAgICAgICBvbkJsdXI9e3RoaXMub25CbHVyfVxuICAgICAgICAgICAgY2hlY2tlZD17b259XG4gICAgICAgICAgICB0eXBlPVwiY2hlY2tib3hcIlxuICAgICAgICAgICAgb25DaGFuZ2U9e3RoaXMub25DbGlja31cbiAgICAgICAgICAgIGRhdGEtaW5zdHJ1bWVudGF0aW9uPXtgJHtkYXRhSW5zdHJ1bWVudGF0aW9ufS1zY3JlZW5yZWFkZXJjaGVja2JveGB9XG4gICAgICAgICAgLz5cbiAgICAgICAgPC9WaXN1YWxseUhpZGRlbj5cbiAgICAgIDwvVG9nZ2xlQmFja2dyb3VuZD5cbiAgICApXG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgVG9nZ2xlXG4iXX0= */");
|
|
57
69
|
ToggleBackground.displayName = 'ToggleBackground';
|
|
58
70
|
|
|
59
71
|
var CenteredBox = function CenteredBox(props) {
|
|
@@ -70,8 +82,8 @@ export var ToggleKnob = /*#__PURE__*/_styled(CenteredBox, {
|
|
|
70
82
|
return prop !== 'on';
|
|
71
83
|
},
|
|
72
84
|
target: "e1i9hm8k1"
|
|
73
|
-
})(function (
|
|
74
|
-
var theme =
|
|
85
|
+
})(function (_ref6) {
|
|
86
|
+
var theme = _ref6.theme;
|
|
75
87
|
return {
|
|
76
88
|
width: 10,
|
|
77
89
|
height: 10,
|
|
@@ -85,17 +97,17 @@ export var ToggleKnob = /*#__PURE__*/_styled(CenteredBox, {
|
|
|
85
97
|
position: 'relative',
|
|
86
98
|
transition: 'all .2s ease-in-out'
|
|
87
99
|
};
|
|
88
|
-
}, function (
|
|
89
|
-
var on =
|
|
100
|
+
}, function (_ref7) {
|
|
101
|
+
var on = _ref7.on;
|
|
90
102
|
return on && {
|
|
91
103
|
left: 19
|
|
92
104
|
};
|
|
93
|
-
}, function (
|
|
94
|
-
var disabled =
|
|
105
|
+
}, function (_ref8) {
|
|
106
|
+
var disabled = _ref8.disabled;
|
|
95
107
|
return disabled && {
|
|
96
108
|
boxShadow: 'none'
|
|
97
109
|
};
|
|
98
|
-
}, getOverrides(Overridable.Toggle.ToggleKnob), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
110
|
+
}, getOverrides(Overridable.Toggle.ToggleKnob), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Ub2dnbGUvVG9nZ2xlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RDBCIiwiZmlsZSI6Ii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0YUluc3RydW1lbnRhdGlvbn0tc2NyZWVucmVhZGVyY2hlY2tib3hgfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvVmlzdWFsbHlIaWRkZW4+XG4gICAgICA8L1RvZ2dsZUJhY2tncm91bmQ+XG4gICAgKVxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFRvZ2dsZVxuIl19 */");
|
|
99
111
|
ToggleKnob.displayName = 'ToggleKnob';
|
|
100
112
|
|
|
101
113
|
var Toggle = /*#__PURE__*/function (_Component) {
|
|
@@ -154,7 +166,9 @@ var Toggle = /*#__PURE__*/function (_Component) {
|
|
|
154
166
|
disabled = _this$props2.disabled,
|
|
155
167
|
children = _this$props2.children,
|
|
156
168
|
dataInstrumentation = _this$props2['data-instrumentation'],
|
|
157
|
-
tooltip = _this$props2.tooltip
|
|
169
|
+
tooltip = _this$props2.tooltip,
|
|
170
|
+
color = _this$props2.color,
|
|
171
|
+
toggleSwitch = _this$props2.toggleSwitch;
|
|
158
172
|
var isFocused = this.state.isFocused;
|
|
159
173
|
return ___EmotionJSX(ToggleBackground, {
|
|
160
174
|
"data-gs-c": gsC(tooltip),
|
|
@@ -164,12 +178,16 @@ var Toggle = /*#__PURE__*/function (_Component) {
|
|
|
164
178
|
focused: isFocused,
|
|
165
179
|
disabled: disabled,
|
|
166
180
|
"data-instrumentation": dataInstrumentation,
|
|
167
|
-
onClick: this.onClick
|
|
181
|
+
onClick: this.onClick,
|
|
182
|
+
color: color,
|
|
183
|
+
toggleSwitch: toggleSwitch
|
|
168
184
|
}, ___EmotionJSX(ToggleKnob, {
|
|
169
185
|
"data-gs-c": gsC(children),
|
|
170
186
|
"data-gs": gs("src", "toggle", "toggle.tsx", "toggle-background", "toggle-knob"),
|
|
171
187
|
on: on,
|
|
172
|
-
disabled: disabled
|
|
188
|
+
disabled: disabled,
|
|
189
|
+
color: color,
|
|
190
|
+
toggleSwitch: toggleSwitch
|
|
173
191
|
}, children), ___EmotionJSX(VisuallyHidden, {
|
|
174
192
|
"data-gs": gs("src", "toggle", "toggle.tsx", "toggle-background", "visually-hidden")
|
|
175
193
|
}, ___EmotionJSX("input", {
|