@synerise/ds-button 1.5.17 → 1.5.18

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Button.d.ts +11 -13
  3. package/dist/Button.figma.js +39 -49
  4. package/dist/Button.js +72 -96
  5. package/dist/Button.styles.d.ts +14 -14
  6. package/dist/Button.styles.js +56 -105
  7. package/dist/Button.types.d.ts +7 -7
  8. package/dist/Button.types.js +11 -10
  9. package/dist/ButtonToggle/ButtonToggle.d.ts +2 -2
  10. package/dist/ButtonToggle/ButtonToggle.js +21 -25
  11. package/dist/ButtonToggle/ButtonToggle.styles.d.ts +2 -2
  12. package/dist/ButtonToggle/ButtonToggle.styles.js +14 -14
  13. package/dist/ButtonToggle/ButtonToggle.types.d.ts +1 -1
  14. package/dist/ButtonToggle/ButtonToggle.types.js +1 -1
  15. package/dist/Checkbox/Checkbox.d.ts +2 -2
  16. package/dist/Checkbox/Checkbox.js +43 -55
  17. package/dist/Checkbox/Checkbox.styles.d.ts +4 -4
  18. package/dist/Checkbox/Checkbox.styles.js +37 -33
  19. package/dist/Checkbox/Checkbox.types.d.ts +1 -1
  20. package/dist/Checkbox/Checkbox.types.js +1 -1
  21. package/dist/Creator/Creator.d.ts +2 -2
  22. package/dist/Creator/Creator.js +25 -41
  23. package/dist/Creator/Creator.styles.d.ts +3 -25
  24. package/dist/Creator/Creator.styles.js +37 -81
  25. package/dist/Creator/Creator.types.d.ts +2 -2
  26. package/dist/Creator/Creator.types.js +9 -6
  27. package/dist/Expander/Expander.d.ts +2 -2
  28. package/dist/Expander/Expander.js +16 -22
  29. package/dist/Expander/Expander.styles.d.ts +4 -4
  30. package/dist/Expander/Expander.styles.js +19 -38
  31. package/dist/Expander/Expander.types.js +8 -5
  32. package/dist/Star/Star.d.ts +2 -2
  33. package/dist/Star/Star.js +17 -29
  34. package/dist/Star/Star.styles.d.ts +2 -2
  35. package/dist/Star/Star.styles.js +25 -24
  36. package/dist/Star/Star.types.d.ts +1 -1
  37. package/dist/Star/Star.types.js +1 -1
  38. package/dist/assets/style/index-tn0RQdqM.css +0 -0
  39. package/dist/index.d.ts +22 -22
  40. package/dist/index.js +34 -24
  41. package/dist/modules.d.js +1 -1
  42. package/dist/modules.d.ts +0 -0
  43. package/package.json +8 -8
@@ -1,122 +1,73 @@
1
- var _excluded = ["mode", "type", "loading", "justifyContent", "groupVariant", "customColor", "pressed", "size", "iconColor", "error"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import Button from 'antd/lib/button';
5
- import React, { forwardRef } from 'react';
6
- import styled, { css, keyframes } from 'styled-components';
7
- import { IconContainer } from '@synerise/ds-icon';
8
- import DSTag from '@synerise/ds-tag';
9
- export var RIPPLE_ANIMATION_TIME = 500;
10
- var leftIcon = '0 4px 0 8px';
11
- var rightIcon = '0 8px 0 4px';
12
- var rippleInitialSize = 20;
13
- var buttonTypes = ['secondary', 'tertiary', 'ghost'];
14
- var splitTypes = ['secondary', 'tertiary'];
15
- var pressedStyles = function pressedStyles(props) {
16
- return css(["color:", ";background:", ";&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px ", ";}", " > .ds-icon:before{background-color:", ";}"], props.theme.palette['blue-600'], props.theme.palette['blue-100'], props.theme.palette['blue-300'], ButtonLabel, props.theme.palette['blue-200']);
17
- };
18
- var spinnerAnimation = keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
19
- var rippleAnimation = keyframes(["from{opacity:1;transform:scale(1);}to{opacity:0;transform:scale(20);}"]);
20
- export var Spinner = styled.div.withConfig({
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Button from "antd/lib/button";
3
+ import { forwardRef } from "react";
4
+ import styled, { css, keyframes } from "styled-components";
5
+ import { IconContainer } from "@synerise/ds-icon";
6
+ import DSTag from "@synerise/ds-tag";
7
+ const RIPPLE_ANIMATION_TIME = 500;
8
+ const leftIcon = "0 4px 0 8px";
9
+ const rightIcon = "0 8px 0 4px";
10
+ const rippleInitialSize = 20;
11
+ const buttonTypes = ["secondary", "tertiary", "ghost"];
12
+ const splitTypes = ["secondary", "tertiary"];
13
+ const pressedStyles = (props) => css(["color:", ";background:", ";&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px ", ";}", " > .ds-icon:before{background-color:", ";}"], props.theme.palette["blue-600"], props.theme.palette["blue-100"], props.theme.palette["blue-300"], ButtonLabel, props.theme.palette["blue-200"]);
14
+ const spinnerAnimation = /* @__PURE__ */ keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
15
+ const rippleAnimation = /* @__PURE__ */ keyframes(["from{opacity:1;transform:scale(1);}to{opacity:0;transform:scale(20);}"]);
16
+ const Spinner = /* @__PURE__ */ styled.div.withConfig({
21
17
  displayName: "Buttonstyles__Spinner",
22
18
  componentId: "sc-3lgta1-0"
23
19
  })(["position:absolute !important;top:0;left:0;width:100%;height:100%;margin:0;background-color:transparent;border-radius:inherit;display:flex;align-items:center;justify-content:center;", "{animation:", " 1s forwards linear infinite;}"], IconContainer, spinnerAnimation);
24
- export var RippleEffect = styled.span.withConfig({
20
+ const RippleEffect = /* @__PURE__ */ styled.span.withConfig({
25
21
  displayName: "Buttonstyles__RippleEffect",
26
22
  componentId: "sc-3lgta1-1"
27
23
  })(["&&{display:flex;width:", "px;height:", "px;top:50%;left:50%;position:absolute !important;border-radius:50%;padding:0 !important;margin:-", "px 0 0 -", "px !important;z-index:0;opacity:0;visibility:visible !important;&.animate{opacity:1;animation:", " ", "ms ease-in;animation-iteration-count:1;}&::after{display:none;}}"], rippleInitialSize, rippleInitialSize, rippleInitialSize / 2, rippleInitialSize / 2, rippleAnimation, RIPPLE_ANIMATION_TIME);
28
- export var ButtonFocus = styled.div.withConfig({
24
+ const ButtonFocus = /* @__PURE__ */ styled.div.withConfig({
29
25
  displayName: "Buttonstyles__ButtonFocus",
30
26
  componentId: "sc-3lgta1-2"
31
27
  })(["content:'';display:flex;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;transition:box-shadow 0.3s ease;border-radius:inherit;z-index:99;box-shadow:inset 0 0 0 0 transparent;"]);
32
- export var Tag = styled(DSTag).withConfig({
28
+ const Tag = /* @__PURE__ */ styled(DSTag).withConfig({
33
29
  displayName: "Buttonstyles__Tag",
34
30
  componentId: "sc-3lgta1-3"
35
31
  })(["margin:0 0 0 8px;flex:0 0 auto;"]);
36
- export var ButtonLabel = styled.div.withConfig({
32
+ const ButtonLabel = /* @__PURE__ */ styled.div.withConfig({
37
33
  displayName: "Buttonstyles__ButtonLabel",
38
34
  componentId: "sc-3lgta1-4"
39
- })(["display:flex;align-items:center;flex-grow:1;min-width:0;justify-content:center;", ""], function (props) {
40
- return props.withTooltip && "\n && {\n pointer-events: all;\n }";
41
- });
42
- export var AntdButton = styled(/*#__PURE__*/forwardRef(function (_ref, ref) {
43
- var mode = _ref.mode,
44
- type = _ref.type,
45
- loading = _ref.loading,
46
- justifyContent = _ref.justifyContent,
47
- groupVariant = _ref.groupVariant,
48
- customColor = _ref.customColor,
49
- pressed = _ref.pressed,
50
- size = _ref.size,
51
- iconColor = _ref.iconColor,
52
- error = _ref.error,
53
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
54
- return /*#__PURE__*/React.createElement(Button, _extends({
55
- ref: ref
56
- // @ts-expect-error type type mismatch
57
- ,
58
- type: type === 'custom-color-ghost' ? 'ghost-primary' : type,
59
- size: size
60
- }, rest));
35
+ })(["display:flex;align-items:center;flex-grow:1;min-width:0;justify-content:center;", ""], (props) => props.withTooltip && `
36
+ && {
37
+ pointer-events: all;
38
+ }`);
39
+ const AntdButton = /* @__PURE__ */ styled(forwardRef(({
40
+ mode,
41
+ type,
42
+ loading,
43
+ justifyContent,
44
+ groupVariant,
45
+ customColor,
46
+ pressed,
47
+ size,
48
+ iconColor,
49
+ error,
50
+ ...rest
51
+ }, ref) => {
52
+ return /* @__PURE__ */ jsx(
53
+ Button,
54
+ {
55
+ ref,
56
+ type: type === "custom-color-ghost" ? "ghost-primary" : type,
57
+ size,
58
+ ...rest
59
+ }
60
+ );
61
61
  })).withConfig({
62
62
  displayName: "Buttonstyles__AntdButton",
63
63
  componentId: "sc-3lgta1-5"
64
- })([" &&{-webkit-mask-image:-webkit-radial-gradient(white,black);display:inline-flex;align-items:center;padding:0 12px;position:relative;overflow:hidden;justify-content:", ";", ";&:not(:disabled):not(:focus){", " span{color:inherit;}}", " > *:not(.btn-focus){position:relative;}", " > .ds-icon,> .ds-icon{display:flex;align-items:center;justify-content:center;margin:0;width:24px;height:24px;svg{transition:all .3s cubic-bezier(.645,.045,.355,1);}}", " &&.ant-btn-default:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]),&&.ant-btn-secondary:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]){&:active{", "}&:focus:not(:active){color:", ";svg{fill:currentColor;}background:", ";}&:hover:not(:disabled):not(:focus){background-color:", ";&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px ", ";}", " > .ds-icon:before{background-color:", ";}}&:active{color:", ";svg{fill:", ";!important;}}}", " ", ";", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " &:hover:not(:disabled):not(:focus){", " span{color:", ";cursor:inherit;}}}"], function (props) {
65
- return props.justifyContent;
66
- }, function (props) {
67
- return props.shape && props.shape === 'circle' && css(["border-radius:50%;"]);
68
- }, ButtonLabel, ButtonLabel, ButtonLabel, function (props) {
69
- return props.mode !== 'single-icon' && css(["&.ant-btn:not(.ds-expander):not(.ds-button-creator):not( .btn-search ):not(.btn-search-open){min-width:54px;}"]);
70
- }, function (props) {
71
- return pressedStyles(props);
72
- }, function (props) {
73
- return props.error ? props.theme.palette['red-600'] : props.theme.palette['grey-600'];
74
- }, function (props) {
75
- return props.theme.palette['grey-050'];
76
- }, function (props) {
77
- return props.theme.palette['blue-050'];
78
- }, function (props) {
79
- return props.theme.palette['blue-300'];
80
- }, ButtonLabel, function (props) {
81
- return props.theme.palette['blue-200'];
82
- }, function (props) {
83
- return props.theme.palette['blue-600'];
84
- }, function (props) {
85
- return props.theme.palette['blue-600'];
86
- }, function (props) {
87
- return props.readOnly && props.type !== 'custom-color-ghost' && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-secondary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 1px ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-primary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 1px ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-tertiary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-tertiary-white{&:hover,&:focus{background:rgba(219,224,227,0.15);.btn-focus{box-shadow:inset 0 0 0 0 rgba(219,224,227,0.15);}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-ghost-primary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-ghost{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-ghost-white{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}"], props.theme.palette['grey-050'], props.theme.palette['grey-300'], ButtonLabel, props.theme.palette['grey-700'], props.theme.palette['grey-700'], props.theme.palette['blue-600'], props.theme.palette['blue-600'], ButtonLabel, props.theme.palette['grey-050'], props.theme.palette['grey-050'], props.theme.palette['grey-100'], props.theme.palette['grey-100'], ButtonLabel, props.theme.palette['grey-700'], props.theme.palette['grey-700'], ButtonLabel, props.theme.palette['grey-050'], props.theme.palette['grey-050'], props.theme.palette.white, props.theme.palette.white, ButtonLabel, props.theme.palette['blue-600'], props.theme.palette['blue-600'], props.theme.palette.white, props.theme.palette.white, ButtonLabel, props.theme.palette['grey-600'], props.theme.palette['grey-600'], props.theme.palette['grey-600'], props.theme.palette['grey-600'], ButtonLabel, props.theme.palette['grey-050'], props.theme.palette['grey-050']);
88
- }, function (props) {
89
- return props.loading && css(["> *:not(.btn-focus){opacity:0;visibility:hidden;}", "{opacity:1;visibility:visible;}"], Spinner);
90
- }, function (props) {
91
- return buttonTypes.includes(props.type) && !props.error && css(["&.ant-btn{&:not(:disabled){svg{fill:", ";}&:hover{svg{fill:currentColor;}}}}"], props.iconColor ? props.theme.palette[props.iconColor + "-600"] : 'currentColor');
92
- }, function (props) {
93
- return props.mode === 'split' && css(["&.ant-btn{padding-right:0;transition:0s;", "{position:relative;}", " > .ds-icon{margin:0 4px 0 15px;position:relative;&:before{content:'';background-color:", ";top:", ";height:", ";width:1px;left:-4px;position:absolute;transition:all 0.3s ease;}}}"], ButtonLabel, ButtonLabel, !splitTypes.includes(props.type) ? "rgba(255, 255, 255, 0.15);" : props.theme.palette['grey-300'], props.size === 'large' ? '-12px' : '-4px', props.size === 'large' ? '48px' : '32px');
94
- }, function (props) {
95
- return props.mode === 'two-icons' && css(["&.ant-btn{padding:0;transition:0s;", " > ", ":first-of-type,", " > .ds-icon:first-of-type,& > ", ":first-of-type,& > .ds-icon:first-of-type{margin:", ";}", " > ", ":nth-of-type(2),", " > .ds-icon:nth-of-type(2),& > ", ":nth-of-type(2),& > .ds-icon:nth-of-type(2){margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon, ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag);
96
- }, function (props) {
97
- return props.mode === 'label-icon' && css(["&.ant-btn{padding-right:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag);
98
- }, function (props) {
99
- return props.mode === 'icon-label' && css(["&.ant-btn{padding-left:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon);
100
- }, function (props) {
101
- return props.mode === 'single-icon' && css(["&.ant-btn:not(.ds-expander){display:flex;align-items:center;justify-content:center;padding:0;transition:0s;width:32px;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:0 4px 0 4px;}}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer);
102
- }, function (props) {
103
- return props.mode === 'single-icon' && props.size === 'large' && css(["&.ant-btn{width:48px;}"]);
104
- }, function (props) {
105
- return props.groupVariant === 'squared' && css(["&.ant-btn{border-radius:0;}"]);
106
- }, function (props) {
107
- return props.groupVariant === 'left-rounded' && css(["&.ant-btn{border-radius:3px 0 0 3px;}"]);
108
- }, function (props) {
109
- return props.groupVariant === 'right-rounded' && css(["&.ant-btn{border-radius:0 3px 3px 0;}"]);
110
- }, function (props) {
111
- return props.error && css(["&.ant-btn{background-color:", ";box-shadow:inset 0 0 0 1px ", ";", "{color:", ";}svg{fill:", ";}.btn-focus{box-shadow:none;}&&&:hover:not(:disabled):not(:focus){background-color:", ";box-shadow:inset 0 0 0 1px ", ";", "{color:", ";}svg{fill:", " !important;}}&:active{background-color:", ";box-shadow:none;", "{color:", ";}svg{fill:", ";}}&&&:focus:not(:active){border:none !important;background-color:", ";", "{color:", ";}.btn-focus{box-shadow:inset 0 0 0 2px ", ";}}svg{fill:", ";}}", "{background-color:", ";}"], props.theme.palette["red-100"], props.theme.palette['red-600'], ButtonLabel, props.theme.palette["red-600"], props.theme.palette["red-600"], props.theme.palette["red-200"], props.theme.palette['red-600'], ButtonLabel, props.theme.palette["red-600"], props.theme.palette["red-600"], props.theme.palette["red-700"], ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette["red-100"], ButtonLabel, props.theme.palette["red-600"], props.theme.palette['blue-600'], props.theme.palette["red-600"], RippleEffect, props.theme.palette["red-700"]);
112
- }, function (props) {
113
- return props.error && props.type === 'secondary' && css(["&&&.ant-btn{", "{color:", ";}svg{fill:", ";}.btn-focus{box-shadow:none;}&&&:hover{background-color:", ";.btn-focus{box-shadow:none;}}&&&:focus:not(:active){.btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&&&:active{background-color:", ";", "{color:", ";}svg{fill:", ";}}", "{background-color:", ";}}"], ButtonLabel, props.theme.palette["red-600"], props.theme.palette["red-600"], props.theme.palette["red-200"], props.theme.palette['blue-600'], props.theme.palette["red-700"], ButtonLabel, props.theme.palette.white, props.theme.palette.white, RippleEffect, props.theme.palette["red-700"]);
114
- }, function (props) {
115
- return props.type === 'custom-color' && !props.error && css(["&.ant-btn{background-color:", ";border:0 solid transparent;color:", ";", "{color:", ";}svg{color:", ";fill:", ";}", "{box-shadow:inset 0 0 0 0px transparent;}", "{background-color:", ";}&:focus:not(.read-only){", "{box-shadow:inset 0 0 0 2px ", ";}}&:hover:not(:disabled):not(:focus){background-color:", ";", "{color:", ";}svg{color:", " !important;fill:", " !important;}}&:disabled{opacity:0.4;background-color:", ";", "{color:", ";}svg{color:", " !important;fill:", " !important;}}}"], props.theme.palette[props.customColor + "-600"], props.theme.palette.white, ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette.white, ButtonFocus, RippleEffect, props.theme.palette[props.customColor + "-700"], ButtonFocus, props.theme.palette['blue-600'], props.theme.palette[props.readOnly ? props.customColor + "-600" : props.customColor + "-500"], ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette.white, props.theme.palette[props.customColor + "-600"], ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette.white);
116
- }, function (props) {
117
- return props.type === 'custom-color-ghost' && !props.error && css(["&&&{color:", ";.ds-icon > svg{fill:", ";}&:disabled{opacity:0.4;color:", ";.ds-icon > svg{fill:", " !important;}}}"], props.theme.palette[props.customColor + "-600"], props.theme.palette[props.customColor + "-600"], props.theme.palette[props.customColor + "-600"], props.theme.palette[props.customColor + "-600"]);
118
- }, function (props) {
119
- return props.readOnly && props.type === 'custom-color-ghost' && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-ghost-primary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", ";!important;}}}"], props.theme.palette.white, props.theme.palette.white, ButtonLabel, props.theme.palette[props.customColor + "-600"], props.theme.palette[props.customColor + "-600"]);
120
- }, Tag, function (props) {
121
- return props.theme.palette.white;
122
- });
64
+ })([" &&{-webkit-mask-image:-webkit-radial-gradient(white,black);display:inline-flex;align-items:center;padding:0 12px;position:relative;overflow:hidden;justify-content:", ";", ";&:not(:disabled):not(:focus){", " span{color:inherit;}}", " > *:not(.btn-focus){position:relative;}", " > .ds-icon,> .ds-icon{display:flex;align-items:center;justify-content:center;margin:0;width:24px;height:24px;svg{transition:all .3s cubic-bezier(.645,.045,.355,1);}}", " &&.ant-btn-default:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]),&&.ant-btn-secondary:not(.ds-expander):not(.ds-button-creator):not(.read-only):not([disabled]){&:active{", "}&:focus:not(:active){color:", ";svg{fill:currentColor;}background:", ";}&:hover:not(:disabled):not(:focus){background-color:", ";&.ant-btn .btn-focus{box-shadow:inset 0 0 0 1px ", ";}", " > .ds-icon:before{background-color:", ";}}&:active{color:", ";svg{fill:", ";!important;}}}", " ", ";", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " &:hover:not(:disabled):not(:focus){", " span{color:", ";cursor:inherit;}}}"], (props) => props.justifyContent, (props) => props.shape && props.shape === "circle" && css(["border-radius:50%;"]), ButtonLabel, ButtonLabel, ButtonLabel, (props) => props.mode !== "single-icon" && css(["&.ant-btn:not(.ds-expander):not(.ds-button-creator):not( .btn-search ):not(.btn-search-open){min-width:54px;}"]), (props) => pressedStyles(props), (props) => props.error ? props.theme.palette["red-600"] : props.theme.palette["grey-600"], (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["blue-050"], (props) => props.theme.palette["blue-300"], ButtonLabel, (props) => props.theme.palette["blue-200"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"], (props) => props.readOnly && props.type !== "custom-color-ghost" && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-secondary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 1px ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-primary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 1px ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-tertiary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-tertiary-white{&:hover,&:focus{background:rgba(219,224,227,0.15);.btn-focus{box-shadow:inset 0 0 0 0 rgba(219,224,227,0.15);}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-ghost-primary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-ghost{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}&&.ant-btn-ghost-white{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", " !important;}}}"], props.theme.palette["grey-050"], props.theme.palette["grey-300"], ButtonLabel, props.theme.palette["grey-700"], props.theme.palette["grey-700"], props.theme.palette["blue-600"], props.theme.palette["blue-600"], ButtonLabel, props.theme.palette["grey-050"], props.theme.palette["grey-050"], props.theme.palette["grey-100"], props.theme.palette["grey-100"], ButtonLabel, props.theme.palette["grey-700"], props.theme.palette["grey-700"], ButtonLabel, props.theme.palette["grey-050"], props.theme.palette["grey-050"], props.theme.palette.white, props.theme.palette.white, ButtonLabel, props.theme.palette["blue-600"], props.theme.palette["blue-600"], props.theme.palette.white, props.theme.palette.white, ButtonLabel, props.theme.palette["grey-600"], props.theme.palette["grey-600"], props.theme.palette["grey-600"], props.theme.palette["grey-600"], ButtonLabel, props.theme.palette["grey-050"], props.theme.palette["grey-050"]), (props) => props.loading && css(["> *:not(.btn-focus){opacity:0;visibility:hidden;}", "{opacity:1;visibility:visible;}"], Spinner), (props) => buttonTypes.includes(props.type) && !props.error && css(["&.ant-btn{&:not(:disabled){svg{fill:", ";}&:hover{svg{fill:currentColor;}}}}"], props.iconColor ? props.theme.palette[`${props.iconColor}-600`] : "currentColor"), (props) => props.mode === "split" && css(["&.ant-btn{padding-right:0;transition:0s;", "{position:relative;}", " > .ds-icon{margin:0 4px 0 15px;position:relative;&:before{content:'';background-color:", ";top:", ";height:", ";width:1px;left:-4px;position:absolute;transition:all 0.3s ease;}}}"], ButtonLabel, ButtonLabel, !splitTypes.includes(props.type) ? `rgba(255, 255, 255, 0.15);` : props.theme.palette["grey-300"], props.size === "large" ? "-12px" : "-4px", props.size === "large" ? "48px" : "32px"), (props) => props.mode === "two-icons" && css(["&.ant-btn{padding:0;transition:0s;", " > ", ":first-of-type,", " > .ds-icon:first-of-type,& > ", ":first-of-type,& > .ds-icon:first-of-type{margin:", ";}", " > ", ":nth-of-type(2),", " > .ds-icon:nth-of-type(2),& > ", ":nth-of-type(2),& > .ds-icon:nth-of-type(2){margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon, ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag), (props) => props.mode === "label-icon" && css(["&.ant-btn{padding-right:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}", "{margin:0 12px 0 0;}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, rightIcon, Tag), (props) => props.mode === "icon-label" && css(["&.ant-btn{padding-left:0;transition:0s;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:", ";}}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer, leftIcon), (props) => props.mode === "single-icon" && css(["&.ant-btn:not(.ds-expander){display:flex;align-items:center;justify-content:center;padding:0;transition:0s;width:32px;", " > ", ",", " > .ds-icon,& > ", ",& > .ds-icon{margin:0 4px 0 4px;}}"], ButtonLabel, IconContainer, ButtonLabel, IconContainer), (props) => props.mode === "single-icon" && props.size === "large" && css(["&.ant-btn{width:48px;}"]), (props) => props.groupVariant === "squared" && css(["&.ant-btn{border-radius:0;}"]), (props) => props.groupVariant === "left-rounded" && css(["&.ant-btn{border-radius:3px 0 0 3px;}"]), (props) => props.groupVariant === "right-rounded" && css(["&.ant-btn{border-radius:0 3px 3px 0;}"]), (props) => props.error && css(["&.ant-btn{background-color:", ";box-shadow:inset 0 0 0 1px ", ";", "{color:", ";}svg{fill:", ";}.btn-focus{box-shadow:none;}&&&:hover:not(:disabled):not(:focus){background-color:", ";box-shadow:inset 0 0 0 1px ", ";", "{color:", ";}svg{fill:", " !important;}}&:active{background-color:", ";box-shadow:none;", "{color:", ";}svg{fill:", ";}}&&&:focus:not(:active){border:none !important;background-color:", ";", "{color:", ";}.btn-focus{box-shadow:inset 0 0 0 2px ", ";}}svg{fill:", ";}}", "{background-color:", ";}"], props.theme.palette[`red-100`], props.theme.palette["red-600"], ButtonLabel, props.theme.palette[`red-600`], props.theme.palette[`red-600`], props.theme.palette[`red-200`], props.theme.palette["red-600"], ButtonLabel, props.theme.palette[`red-600`], props.theme.palette[`red-600`], props.theme.palette[`red-700`], ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette[`red-100`], ButtonLabel, props.theme.palette[`red-600`], props.theme.palette["blue-600"], props.theme.palette[`red-600`], RippleEffect, props.theme.palette[`red-700`]), (props) => props.error && props.type === "secondary" && css(["&&&.ant-btn{", "{color:", ";}svg{fill:", ";}.btn-focus{box-shadow:none;}&&&:hover{background-color:", ";.btn-focus{box-shadow:none;}}&&&:focus:not(:active){.btn-focus{box-shadow:inset 0 0 0 2px ", ";}}&&&:active{background-color:", ";", "{color:", ";}svg{fill:", ";}}", "{background-color:", ";}}"], ButtonLabel, props.theme.palette[`red-600`], props.theme.palette[`red-600`], props.theme.palette[`red-200`], props.theme.palette["blue-600"], props.theme.palette[`red-700`], ButtonLabel, props.theme.palette.white, props.theme.palette.white, RippleEffect, props.theme.palette[`red-700`]), (props) => props.type === "custom-color" && !props.error && css(["&.ant-btn{background-color:", ";border:0 solid transparent;color:", ";", "{color:", ";}svg{color:", ";fill:", ";}", "{box-shadow:inset 0 0 0 0px transparent;}", "{background-color:", ";}&:focus:not(.read-only){", "{box-shadow:inset 0 0 0 2px ", ";}}&:hover:not(:disabled):not(:focus){background-color:", ";", "{color:", ";}svg{color:", " !important;fill:", " !important;}}&:disabled{opacity:0.4;background-color:", ";", "{color:", ";}svg{color:", " !important;fill:", " !important;}}}"], props.theme.palette[`${props.customColor}-600`], props.theme.palette.white, ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette.white, ButtonFocus, RippleEffect, props.theme.palette[`${props.customColor}-700`], ButtonFocus, props.theme.palette["blue-600"], props.theme.palette[props.readOnly ? `${props.customColor}-600` : `${props.customColor}-500`], ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette.white, props.theme.palette[`${props.customColor}-600`], ButtonLabel, props.theme.palette.white, props.theme.palette.white, props.theme.palette.white), (props) => props.type === "custom-color-ghost" && !props.error && css(["&&&{color:", ";.ds-icon > svg{fill:", ";}&:disabled{opacity:0.4;color:", ";.ds-icon > svg{fill:", " !important;}}}"], props.theme.palette[`${props.customColor}-600`], props.theme.palette[`${props.customColor}-600`], props.theme.palette[`${props.customColor}-600`], props.theme.palette[`${props.customColor}-600`]), (props) => props.readOnly && props.type === "custom-color-ghost" && css(["&&.ant-btn{cursor:default;transition:none;}&&.ant-btn-ghost-primary{&:hover,&:focus{background:", ";.btn-focus{box-shadow:inset 0 0 0 0 ", ";}", ",svg{color:", ";}svg{fill:", ";!important;}}}"], props.theme.palette.white, props.theme.palette.white, ButtonLabel, props.theme.palette[`${props.customColor}-600`], props.theme.palette[`${props.customColor}-600`]), Tag, (props) => props.theme.palette.white);
65
+ export {
66
+ AntdButton,
67
+ ButtonFocus,
68
+ ButtonLabel,
69
+ RIPPLE_ANIMATION_TIME,
70
+ RippleEffect,
71
+ Spinner,
72
+ Tag
73
+ };
@@ -1,10 +1,10 @@
1
- import type { ButtonProps as AntdButtonProps } from 'antd/lib/button';
2
- import type { JustifyContentProperty } from 'csstype';
3
- import type { ForwardRefExoticComponent, MouseEvent, RefAttributes } from 'react';
4
- import { type StyledComponent } from 'styled-components';
5
- import type { TagProps } from '@synerise/ds-tag';
6
- import type { TooltipProps } from '@synerise/ds-tooltip';
7
- import type { LiteralStringUnion } from '@synerise/ds-utils';
1
+ import { ButtonProps as AntdButtonProps } from 'antd/lib/button';
2
+ import { JustifyContentProperty } from 'csstype';
3
+ import { ForwardRefExoticComponent, MouseEvent, RefAttributes } from 'react';
4
+ import { StyledComponent } from 'styled-components';
5
+ import { TagProps } from '@synerise/ds-tag';
6
+ import { TooltipProps } from '@synerise/ds-tooltip';
7
+ import { LiteralStringUnion } from '@synerise/ds-utils';
8
8
  export declare enum ButtonMode {
9
9
  SINGLE_ICON = "single-icon",
10
10
  SPLIT = "split",
@@ -1,10 +1,11 @@
1
- export var ButtonMode = /*#__PURE__*/function (ButtonMode) {
2
- ButtonMode["SINGLE_ICON"] = "single-icon";
3
- ButtonMode["SPLIT"] = "split";
4
- ButtonMode["TWO_ICONS"] = "two-icons";
5
- ButtonMode["LABEL_ICON"] = "label-icon";
6
- ButtonMode["ICON_LABEL"] = "icon-label";
7
- return ButtonMode;
8
- }({});
9
-
10
- /** @deprecated - use ButtonProps instead */
1
+ var ButtonMode = /* @__PURE__ */ ((ButtonMode2) => {
2
+ ButtonMode2["SINGLE_ICON"] = "single-icon";
3
+ ButtonMode2["SPLIT"] = "split";
4
+ ButtonMode2["TWO_ICONS"] = "two-icons";
5
+ ButtonMode2["LABEL_ICON"] = "label-icon";
6
+ ButtonMode2["ICON_LABEL"] = "icon-label";
7
+ return ButtonMode2;
8
+ })(ButtonMode || {});
9
+ export {
10
+ ButtonMode
11
+ };
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import type { ButtonToggleProps } from './ButtonToggle.types';
1
+ import { default as React } from 'react';
2
+ import { ButtonToggleProps } from './ButtonToggle.types';
3
3
  declare const ButtonToggle: ({ activated, type, ...buttonProps }: ButtonToggleProps) => React.JSX.Element;
4
4
  export default ButtonToggle;
@@ -1,33 +1,29 @@
1
- var _excluded = ["activated", "type"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import React, { useMemo } from 'react';
5
- import * as S from './ButtonToggle.styles';
6
- var ButtonToggle = function ButtonToggle(_ref) {
7
- var activated = _ref.activated,
8
- type = _ref.type,
9
- buttonProps = _objectWithoutPropertiesLoose(_ref, _excluded);
10
- var mappedButtonType = useMemo(function () {
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { ButtonToggle as ButtonToggle$1 } from "./ButtonToggle.styles.js";
4
+ const ButtonToggle = ({
5
+ activated,
6
+ type,
7
+ ...buttonProps
8
+ }) => {
9
+ const mappedButtonType = useMemo(() => {
11
10
  switch (type) {
12
- case 'ghost':
13
- return activated ? 'ghost' : 'ghost';
14
- case 'solid':
11
+ case "ghost":
12
+ return activated ? "ghost" : "ghost";
13
+ case "solid":
15
14
  default:
16
- return activated ? 'primary' : 'secondary';
15
+ return activated ? "primary" : "secondary";
17
16
  }
18
17
  }, [activated, type]);
19
- var handlePointerUp = function handlePointerUp(event) {
20
- var button = event.currentTarget;
21
- buttonProps.onPointerUp == null || buttonProps.onPointerUp(event);
22
- setTimeout(function () {
18
+ const handlePointerUp = (event) => {
19
+ const button = event.currentTarget;
20
+ buttonProps.onPointerUp?.(event);
21
+ setTimeout(() => {
23
22
  button && button.blur();
24
23
  }, 200);
25
24
  };
26
- return /*#__PURE__*/React.createElement(S.ButtonToggle, _extends({}, buttonProps, {
27
- toggleType: type,
28
- activated: activated,
29
- onPointerUp: handlePointerUp,
30
- type: mappedButtonType
31
- }));
25
+ return /* @__PURE__ */ jsx(ButtonToggle$1, { ...buttonProps, toggleType: type, activated, onPointerUp: handlePointerUp, type: mappedButtonType });
26
+ };
27
+ export {
28
+ ButtonToggle as default
32
29
  };
33
- export default ButtonToggle;
@@ -1,2 +1,2 @@
1
- import React from 'react';
2
- export declare const ButtonToggle: import("styled-components").StyledComponent<({ toggleType, activated, ...rest }: any) => React.JSX.Element, any, {}, never>;
1
+ import { default as React } from 'react';
2
+ export declare const ButtonToggle: import('styled-components').StyledComponent<({ toggleType, activated, ...rest }: any) => React.JSX.Element, any, {}, never>;
@@ -1,17 +1,17 @@
1
- var _excluded = ["toggleType", "activated"];
2
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
- import React from 'react';
4
- import styled, { css } from 'styled-components';
5
- import Button from '../Button';
6
- import { ButtonFocus } from '../Button.styles';
7
- export var ButtonToggle = styled(function (_ref) {
8
- var toggleType = _ref.toggleType,
9
- activated = _ref.activated,
10
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
11
- return /*#__PURE__*/React.createElement(Button, rest);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import styled, { css } from "styled-components";
3
+ import Button from "../Button.js";
4
+ import { ButtonFocus } from "../Button.styles.js";
5
+ const ButtonToggle = /* @__PURE__ */ styled(({
6
+ toggleType,
7
+ activated,
8
+ ...rest
9
+ }) => {
10
+ return /* @__PURE__ */ jsx(Button, { ...rest });
12
11
  }).withConfig({
13
12
  displayName: "ButtonTogglestyles__ButtonToggle",
14
13
  componentId: "sc-1m60zt6-0"
15
- })(["", ""], function (props) {
16
- return props.toggleType === 'ghost' && css(["&:hover:not(:disabled):not(:focus){color:", ";}", ""], props.theme.palette['grey-600'], !props.activated ? css(["&:hover:not(:disabled):not(:focus){color:", ";svg{fill:currentColor;}}"], props.theme.palette['grey-600']) : css(["", ""], !props.disabled && css(["&&{background:", ";color:", ";svg{fill:currentColor;}", "{box-shadow:none;}}}"], props.theme.palette['blue-050'], props.theme.palette['blue-600'], ButtonFocus)));
17
- });
14
+ })(["", ""], (props) => props.toggleType === "ghost" && css(["&:hover:not(:disabled):not(:focus){color:", ";}", ""], props.theme.palette["grey-600"], !props.activated ? css(["&:hover:not(:disabled):not(:focus){color:", ";svg{fill:currentColor;}}"], props.theme.palette["grey-600"]) : css(["", ""], !props.disabled && css(["&&{background:", ";color:", ";svg{fill:currentColor;}", "{box-shadow:none;}}}"], props.theme.palette["blue-050"], props.theme.palette["blue-600"], ButtonFocus))));
15
+ export {
16
+ ButtonToggle
17
+ };
@@ -1,4 +1,4 @@
1
- import type { ButtonProps } from '../Button.types';
1
+ import { ButtonProps } from '../Button.types';
2
2
  export type ButtonToggleProps = Omit<ButtonProps, 'type' | 'danger' | 'ghost' | 'color'> & {
3
3
  type?: 'solid' | 'ghost';
4
4
  activated?: boolean;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type CheckboxButtonProps } from './Checkbox.types';
1
+ import { default as React } from 'react';
2
+ import { CheckboxButtonProps } from './Checkbox.types';
3
3
  declare const CheckboxButton: (props: CheckboxButtonProps) => React.ReactElement;
4
4
  export default CheckboxButton;
@@ -1,75 +1,63 @@
1
- var _excluded = ["checked", "defaultChecked", "hasError", "indeterminate", "onChange", "onClick"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import React from 'react';
5
- import Icon, { CheckboxIndeterminateM, CheckboxSelectedFillM } from '@synerise/ds-icon';
6
- import Button from '../Button';
7
- import * as S from './Checkbox.styles';
8
- var CheckboxButtonIcon = function CheckboxButtonIcon(_ref) {
9
- var checked = _ref.checked,
10
- indeterminate = _ref.indeterminate;
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import Icon, { CheckboxIndeterminateM, CheckboxSelectedFillM } from "@synerise/ds-icon";
4
+ import Button from "../Button.js";
5
+ import { IconWrapper, DefaultIcon, HoverIcon } from "./Checkbox.styles.js";
6
+ const CheckboxButtonIcon = ({
7
+ checked,
8
+ indeterminate
9
+ }) => {
11
10
  if (indeterminate) {
12
- return /*#__PURE__*/React.createElement(CheckboxIndeterminateM, null);
11
+ return /* @__PURE__ */ jsx(CheckboxIndeterminateM, {});
13
12
  }
14
13
  if (checked) {
15
- return /*#__PURE__*/React.createElement(CheckboxSelectedFillM, null);
14
+ return /* @__PURE__ */ jsx(CheckboxSelectedFillM, {});
16
15
  }
17
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.DefaultIcon, null), /*#__PURE__*/React.createElement(S.HoverIcon, null));
16
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
17
+ /* @__PURE__ */ jsx(DefaultIcon, {}),
18
+ /* @__PURE__ */ jsx(HoverIcon, {})
19
+ ] });
18
20
  };
19
- var getNextCheckedState = function getNextCheckedState(prevState, _ref2) {
20
- var checked = _ref2.checked,
21
- indeterminate = _ref2.indeterminate;
21
+ const getNextCheckedState = (prevState, {
22
+ checked,
23
+ indeterminate
24
+ }) => {
22
25
  if (indeterminate === true) {
23
26
  return true;
24
27
  }
25
- if (checked === undefined) {
28
+ if (checked === void 0) {
26
29
  return !prevState;
27
30
  }
28
31
  return !checked;
29
32
  };
30
- var CheckboxButton = function CheckboxButton(props) {
31
- var checked = props.checked,
32
- _props$defaultChecked = props.defaultChecked,
33
- defaultChecked = _props$defaultChecked === void 0 ? false : _props$defaultChecked,
34
- hasError = props.hasError,
35
- indeterminate = props.indeterminate,
36
- onChange = props.onChange,
37
- onClick = props.onClick,
38
- restProps = _objectWithoutPropertiesLoose(props, _excluded);
39
- var _React$useState = React.useState(defaultChecked),
40
- isCheckedState = _React$useState[0],
41
- setIsCheckedState = _React$useState[1];
42
- var handleButtonClick = function handleButtonClick(e) {
43
- if (typeof onClick === 'function') {
33
+ const CheckboxButton = (props) => {
34
+ const {
35
+ checked,
36
+ defaultChecked = false,
37
+ hasError,
38
+ indeterminate,
39
+ onChange,
40
+ onClick,
41
+ ...restProps
42
+ } = props;
43
+ const [isCheckedState, setIsCheckedState] = React.useState(defaultChecked);
44
+ const handleButtonClick = (e) => {
45
+ if (typeof onClick === "function") {
44
46
  onClick(e);
45
47
  }
46
- setIsCheckedState(function (prevState) {
47
- var nextState = getNextCheckedState(prevState, props);
48
- if (typeof onChange === 'function') {
48
+ setIsCheckedState((prevState) => {
49
+ const nextState = getNextCheckedState(prevState, props);
50
+ if (typeof onChange === "function") {
49
51
  onChange(nextState);
50
52
  }
51
53
  return nextState;
52
54
  });
53
55
  };
54
- var isChecked = checked !== undefined ? checked : isCheckedState;
55
- return /*#__PURE__*/React.createElement(Button, _extends({
56
- "aria-checked": indeterminate ? 'mixed' : isChecked,
57
- mode: "single-icon",
58
- role: "checkbox",
59
- style: {
60
- transition: 'none'
61
- },
62
- tabIndex: 0,
63
- type: "ghost-primary",
64
- onClick: handleButtonClick
65
- }, restProps), /*#__PURE__*/React.createElement(S.IconWrapper, {
66
- active: indeterminate || isChecked,
67
- error: hasError
68
- }, /*#__PURE__*/React.createElement(Icon, {
69
- component: /*#__PURE__*/React.createElement(CheckboxButtonIcon, {
70
- checked: isChecked,
71
- indeterminate: indeterminate
72
- })
73
- })));
56
+ const isChecked = checked !== void 0 ? checked : isCheckedState;
57
+ return /* @__PURE__ */ jsx(Button, { "aria-checked": indeterminate ? "mixed" : isChecked, mode: "single-icon", role: "checkbox", style: {
58
+ transition: "none"
59
+ }, tabIndex: 0, type: "ghost-primary", onClick: handleButtonClick, ...restProps, children: /* @__PURE__ */ jsx(IconWrapper, { active: indeterminate || isChecked, error: hasError, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CheckboxButtonIcon, { checked: isChecked, indeterminate }) }) }) });
60
+ };
61
+ export {
62
+ CheckboxButton as default
74
63
  };
75
- export default CheckboxButton;
@@ -1,11 +1,11 @@
1
- export declare const IconWrapper: import("styled-components").StyledComponent<"span", any, {
1
+ export declare const IconWrapper: import('styled-components').StyledComponent<"span", any, {
2
2
  active?: boolean;
3
3
  error?: boolean;
4
4
  }, never>;
5
- export declare const DefaultIcon: import("styled-components").StyledComponent<(props: React.SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
6
- export declare const HoverIcon: import("styled-components").StyledComponent<(props: React.SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
5
+ export declare const DefaultIcon: import('styled-components').StyledComponent<(props: React.SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
6
+ export declare const HoverIcon: import('styled-components').StyledComponent<(props: React.SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
7
7
  declare const _default: {
8
- IconWrapper: import("styled-components").StyledComponent<"span", any, {
8
+ IconWrapper: import('styled-components').StyledComponent<"span", any, {
9
9
  active?: boolean;
10
10
  error?: boolean;
11
11
  }, never>;