@gympass/yoga 7.127.3 → 7.127.4
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/cjs/Accordion/web/Accordion.js +4 -12
- package/cjs/Accordion/web/Small.js +0 -1
- package/cjs/ActionRequirement/web/ActionRequirement.js +1 -8
- package/cjs/AutoComplete/web/AutoComplete.js +11 -25
- package/cjs/Avatar/web/Avatar.js +15 -14
- package/cjs/Avatar/web/AvatarCircle.js +0 -1
- package/cjs/Banner/web/Banner.js +13 -7
- package/cjs/Button/web/Button.js +10 -22
- package/cjs/Button/web/Icon.js +9 -11
- package/cjs/Button/web/Link.js +10 -8
- package/cjs/Button/web/Text.js +1 -5
- package/cjs/Card/web/Card/Card.js +15 -17
- package/cjs/Card/web/PlanCard/Content.js +9 -20
- package/cjs/Card/web/PlanCard/List.js +3 -9
- package/cjs/Card/web/PlanCard/PlanCard.js +1 -6
- package/cjs/Checkbox/web/Checkbox.js +4 -17
- package/cjs/Checkbox/web/Switch.js +13 -9
- package/cjs/Chips/web/Chips.js +6 -14
- package/cjs/Datepicker/web/Calendar.js +4 -14
- package/cjs/Datepicker/web/Datepicker.js +5 -22
- package/cjs/Dialog/web/Dialog.js +3 -12
- package/cjs/Divider/web/Divider.js +6 -8
- package/cjs/Drawer/web/Drawer.js +16 -4
- package/cjs/Dropdown/web/Dropdown.js +20 -11
- package/cjs/Feedback/web/Feedback.js +13 -6
- package/cjs/Grid/web/Col.js +0 -19
- package/cjs/Grid/web/Hide.js +19 -1
- package/cjs/Header/web/Header.js +1 -6
- package/cjs/Header/web/Logo.js +1 -4
- package/cjs/Heading/web/Heading.js +1 -6
- package/cjs/Icon/Icon.js +1 -11
- package/cjs/Input/web/Helper.js +0 -9
- package/cjs/Input/web/Input.js +12 -36
- package/cjs/Input/web/Password.js +2 -10
- package/cjs/Input/web/Phone.js +15 -25
- package/cjs/List/web/List.js +6 -8
- package/cjs/Menu/web/Menu.js +1 -4
- package/cjs/Menu/web/MenuItem.js +2 -10
- package/cjs/Menu/web/MenuList.js +8 -8
- package/cjs/Popover/web/Popover.js +5 -14
- package/cjs/Progress/web/Progress.js +6 -15
- package/cjs/RadioGroup/web/Button/RadioButton.js +4 -7
- package/cjs/RadioGroup/web/Radio/Radio.js +12 -17
- package/cjs/RadioGroup/web/RadioGroup.js +10 -17
- package/cjs/Rating/web/Rating.js +16 -25
- package/cjs/Skeleton/web/Skeleton.js +18 -7
- package/cjs/Slider/web/Marker.js +14 -9
- package/cjs/Slider/web/Slider.js +7 -14
- package/cjs/Slider/web/Tooltip.js +5 -10
- package/cjs/Snackbar/web/Snackbar.js +11 -22
- package/cjs/Spinner/web/Spinner.js +24 -26
- package/cjs/Stepper/web/Dots.js +2 -6
- package/cjs/Stepper/web/Line.js +0 -4
- package/cjs/Stepper/web/Stepper.js +1 -6
- package/cjs/Tag/web/Informative.js +3 -9
- package/cjs/Tag/web/Tag.js +11 -6
- package/cjs/Text/web/Text.js +37 -10
- package/cjs/TextArea/web/TextArea.js +11 -21
- package/cjs/Theme/Provider/Provider.js +1 -4
- package/esm/Accordion/web/Accordion.js +4 -12
- package/esm/Accordion/web/Small.js +0 -1
- package/esm/ActionRequirement/web/ActionRequirement.js +1 -8
- package/esm/AutoComplete/web/AutoComplete.js +11 -25
- package/esm/Avatar/web/Avatar.js +15 -14
- package/esm/Avatar/web/AvatarCircle.js +0 -1
- package/esm/Banner/web/Banner.js +13 -7
- package/esm/Button/web/Button.js +10 -22
- package/esm/Button/web/Icon.js +9 -11
- package/esm/Button/web/Link.js +10 -8
- package/esm/Button/web/Text.js +1 -5
- package/esm/Card/web/Card/Card.js +15 -17
- package/esm/Card/web/PlanCard/Content.js +9 -20
- package/esm/Card/web/PlanCard/List.js +3 -9
- package/esm/Card/web/PlanCard/PlanCard.js +1 -6
- package/esm/Checkbox/web/Checkbox.js +4 -17
- package/esm/Checkbox/web/Switch.js +13 -9
- package/esm/Chips/web/Chips.js +6 -14
- package/esm/Datepicker/web/Calendar.js +4 -14
- package/esm/Datepicker/web/Datepicker.js +5 -22
- package/esm/Dialog/web/Dialog.js +3 -12
- package/esm/Divider/web/Divider.js +6 -8
- package/esm/Drawer/web/Drawer.js +16 -4
- package/esm/Dropdown/web/Dropdown.js +20 -11
- package/esm/Feedback/web/Feedback.js +13 -6
- package/esm/Grid/web/Col.js +0 -19
- package/esm/Grid/web/Hide.js +19 -1
- package/esm/Header/web/Header.js +1 -6
- package/esm/Header/web/Logo.js +1 -4
- package/esm/Heading/web/Heading.js +1 -6
- package/esm/Icon/Icon.js +1 -11
- package/esm/Input/web/Helper.js +0 -9
- package/esm/Input/web/Input.js +12 -36
- package/esm/Input/web/Password.js +2 -10
- package/esm/Input/web/Phone.js +15 -25
- package/esm/List/web/List.js +6 -8
- package/esm/Menu/web/Menu.js +1 -4
- package/esm/Menu/web/MenuItem.js +2 -10
- package/esm/Menu/web/MenuList.js +8 -8
- package/esm/Popover/web/Popover.js +5 -14
- package/esm/Progress/web/Progress.js +6 -15
- package/esm/RadioGroup/web/Button/RadioButton.js +4 -7
- package/esm/RadioGroup/web/Radio/Radio.js +12 -17
- package/esm/RadioGroup/web/RadioGroup.js +10 -17
- package/esm/Rating/web/Rating.js +16 -25
- package/esm/Skeleton/web/Skeleton.js +18 -7
- package/esm/Slider/web/Marker.js +14 -9
- package/esm/Slider/web/Slider.js +7 -14
- package/esm/Slider/web/Tooltip.js +5 -10
- package/esm/Snackbar/web/Snackbar.js +11 -22
- package/esm/Spinner/web/Spinner.js +24 -26
- package/esm/Stepper/web/Dots.js +2 -6
- package/esm/Stepper/web/Line.js +0 -4
- package/esm/Stepper/web/Stepper.js +1 -6
- package/esm/Tag/web/Informative.js +3 -9
- package/esm/Tag/web/Tag.js +11 -6
- package/esm/Text/web/Text.js +37 -10
- package/esm/TextArea/web/TextArea.js +11 -21
- package/esm/Theme/Provider/Provider.js +1 -4
- package/package.json +2 -2
- package/typings/NavigationMenu/web/Item/styles.d.ts +3 -8
- package/typings/index.d.ts +40 -138
package/esm/Input/web/Phone.js
CHANGED
|
@@ -52,19 +52,22 @@ const phoneBaseSettings = {
|
|
|
52
52
|
"ca"
|
|
53
53
|
]
|
|
54
54
|
};
|
|
55
|
+
const noop = () => {
|
|
56
|
+
};
|
|
55
57
|
const Phone = React.forwardRef(
|
|
56
58
|
(_a, forwardedRef) => {
|
|
57
59
|
var _b = _a, {
|
|
58
|
-
defaultCountry,
|
|
59
|
-
disabled,
|
|
60
|
-
readOnly,
|
|
60
|
+
defaultCountry = "br",
|
|
61
|
+
disabled = false,
|
|
62
|
+
readOnly = false,
|
|
61
63
|
error,
|
|
62
|
-
full,
|
|
64
|
+
full = false,
|
|
63
65
|
helper,
|
|
64
|
-
label,
|
|
65
|
-
placeholder,
|
|
66
|
-
value,
|
|
67
|
-
onChange
|
|
66
|
+
label = "",
|
|
67
|
+
placeholder = "+55 (11) 999999999",
|
|
68
|
+
value = "",
|
|
69
|
+
onChange = noop,
|
|
70
|
+
cleanable = true
|
|
68
71
|
} = _b, rest = __objRest(_b, [
|
|
69
72
|
"defaultCountry",
|
|
70
73
|
"disabled",
|
|
@@ -75,7 +78,8 @@ const Phone = React.forwardRef(
|
|
|
75
78
|
"label",
|
|
76
79
|
"placeholder",
|
|
77
80
|
"value",
|
|
78
|
-
"onChange"
|
|
81
|
+
"onChange",
|
|
82
|
+
"cleanable"
|
|
79
83
|
]);
|
|
80
84
|
const inputRef = useCombinedRefs(forwardedRef);
|
|
81
85
|
const currentCountry = useRef(defaultCountry);
|
|
@@ -93,7 +97,8 @@ const Phone = React.forwardRef(
|
|
|
93
97
|
error,
|
|
94
98
|
full,
|
|
95
99
|
helper,
|
|
96
|
-
value
|
|
100
|
+
value,
|
|
101
|
+
cleanable
|
|
97
102
|
}, rest)), {
|
|
98
103
|
ref: inputRef,
|
|
99
104
|
label: "",
|
|
@@ -146,21 +151,6 @@ Phone.propTypes = {
|
|
|
146
151
|
/** placeholder to show when the input is cleared */
|
|
147
152
|
placeholder: string
|
|
148
153
|
};
|
|
149
|
-
Phone.defaultProps = {
|
|
150
|
-
className: void 0,
|
|
151
|
-
cleanable: true,
|
|
152
|
-
defaultCountry: "br",
|
|
153
|
-
disabled: false,
|
|
154
|
-
error: void 0,
|
|
155
|
-
full: false,
|
|
156
|
-
helper: void 0,
|
|
157
|
-
label: "",
|
|
158
|
-
readOnly: false,
|
|
159
|
-
value: "",
|
|
160
|
-
onChange: () => {
|
|
161
|
-
},
|
|
162
|
-
placeholder: "+55 (11) 999999999"
|
|
163
|
-
};
|
|
164
154
|
var Phone_default = Phone;
|
|
165
155
|
export {
|
|
166
156
|
Phone_default as default
|
package/esm/List/web/List.js
CHANGED
|
@@ -60,18 +60,16 @@ const StyledList = styled.ul`
|
|
|
60
60
|
}
|
|
61
61
|
`}
|
|
62
62
|
`;
|
|
63
|
-
const List = React.forwardRef(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
63
|
+
const List = React.forwardRef(
|
|
64
|
+
(_a, ref) => {
|
|
65
|
+
var _b = _a, { horizontal = false, divided = true } = _b, rest = __objRest(_b, ["horizontal", "divided"]);
|
|
66
|
+
return /* @__PURE__ */ jsx(StyledList, __spreadValues({ horizontal, divided, ref }, rest));
|
|
67
|
+
}
|
|
68
|
+
);
|
|
67
69
|
List.propTypes = {
|
|
68
70
|
horizontal: PropTypes.bool,
|
|
69
71
|
divided: PropTypes.bool
|
|
70
72
|
};
|
|
71
|
-
List.defaultProps = {
|
|
72
|
-
horizontal: false,
|
|
73
|
-
divided: true
|
|
74
|
-
};
|
|
75
73
|
List.displayName = "List";
|
|
76
74
|
var List_default = List;
|
|
77
75
|
export {
|
package/esm/Menu/web/Menu.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Root as MenuRoot } from "@radix-ui/react-dropdown-menu";
|
|
4
4
|
import { bool, node } from "prop-types";
|
|
5
|
-
const Menu = ({ children, onMouseHover }) => {
|
|
5
|
+
const Menu = ({ children, onMouseHover = true }) => {
|
|
6
6
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
7
7
|
function handleOpenMenu() {
|
|
8
8
|
setIsOpen(!isOpen);
|
|
@@ -17,9 +17,6 @@ Menu.propTypes = {
|
|
|
17
17
|
/** when mouse hover menu open as default is true */
|
|
18
18
|
onMouseHover: bool
|
|
19
19
|
};
|
|
20
|
-
Menu.defaultProps = {
|
|
21
|
-
onMouseHover: true
|
|
22
|
-
};
|
|
23
20
|
Menu.displayName = "Menu";
|
|
24
21
|
var Menu_default = Menu;
|
|
25
22
|
export {
|
package/esm/Menu/web/MenuItem.js
CHANGED
|
@@ -98,8 +98,8 @@ const MenuItem = forwardRef(
|
|
|
98
98
|
var _b = _a, {
|
|
99
99
|
icon: Icon,
|
|
100
100
|
href,
|
|
101
|
-
active,
|
|
102
|
-
disabled,
|
|
101
|
+
active = false,
|
|
102
|
+
disabled = false,
|
|
103
103
|
iconColor,
|
|
104
104
|
iconSize,
|
|
105
105
|
children,
|
|
@@ -146,14 +146,6 @@ MenuItem.propTypes = {
|
|
|
146
146
|
iconColor: string,
|
|
147
147
|
iconSize: string
|
|
148
148
|
};
|
|
149
|
-
MenuItem.defaultProps = {
|
|
150
|
-
icon: void 0,
|
|
151
|
-
href: void 0,
|
|
152
|
-
disabled: false,
|
|
153
|
-
active: false,
|
|
154
|
-
iconColor: void 0,
|
|
155
|
-
iconSize: void 0
|
|
156
|
-
};
|
|
157
149
|
MenuItem.displayName = "Menu.Item";
|
|
158
150
|
var MenuItem_default = withTheme(MenuItem);
|
|
159
151
|
export {
|
package/esm/Menu/web/MenuList.js
CHANGED
|
@@ -30,7 +30,14 @@ const StyledMenuList = styled(MenuListRoot)`
|
|
|
30
30
|
}}
|
|
31
31
|
`;
|
|
32
32
|
const MenuList = forwardRef(
|
|
33
|
-
({
|
|
33
|
+
({
|
|
34
|
+
children,
|
|
35
|
+
align = "start",
|
|
36
|
+
alignOffset = 0,
|
|
37
|
+
side = "bottom",
|
|
38
|
+
sideOffset = 4,
|
|
39
|
+
zIndex = "auto"
|
|
40
|
+
}, ref) => {
|
|
34
41
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
|
|
35
42
|
StyledMenuList,
|
|
36
43
|
{
|
|
@@ -59,13 +66,6 @@ MenuList.propTypes = {
|
|
|
59
66
|
/** Add z-index value to Menu.List. Set to 'auto' by default */
|
|
60
67
|
zIndex: string || number
|
|
61
68
|
};
|
|
62
|
-
MenuList.defaultProps = {
|
|
63
|
-
align: "start",
|
|
64
|
-
alignOffset: 0,
|
|
65
|
-
side: "bottom",
|
|
66
|
-
sideOffset: 4,
|
|
67
|
-
zIndex: "auto"
|
|
68
|
-
};
|
|
69
69
|
MenuList.displayName = "Menu.List";
|
|
70
70
|
var MenuList_default = MenuList;
|
|
71
71
|
export {
|
|
@@ -41,12 +41,12 @@ const Popover = React.forwardRef(
|
|
|
41
41
|
children,
|
|
42
42
|
title,
|
|
43
43
|
description,
|
|
44
|
-
position,
|
|
45
|
-
width,
|
|
46
|
-
height,
|
|
47
|
-
zIndex,
|
|
44
|
+
position = "bottom-center",
|
|
45
|
+
width = 265,
|
|
46
|
+
height = 200,
|
|
47
|
+
zIndex = 1,
|
|
48
48
|
a11yId,
|
|
49
|
-
hover
|
|
49
|
+
hover = false
|
|
50
50
|
} = _b, props = __objRest(_b, [
|
|
51
51
|
"children",
|
|
52
52
|
"title",
|
|
@@ -134,15 +134,6 @@ Popover.propTypes = {
|
|
|
134
134
|
zIndex: number,
|
|
135
135
|
hover: bool
|
|
136
136
|
};
|
|
137
|
-
Popover.defaultProps = {
|
|
138
|
-
a11yId: void 0,
|
|
139
|
-
title: void 0,
|
|
140
|
-
position: "bottom-center",
|
|
141
|
-
width: 265,
|
|
142
|
-
height: 200,
|
|
143
|
-
zIndex: 1,
|
|
144
|
-
hover: false
|
|
145
|
-
};
|
|
146
137
|
var Popover_default = Popover;
|
|
147
138
|
export {
|
|
148
139
|
Popover_default as default
|
|
@@ -108,8 +108,8 @@ const Wrapper = styled.div`
|
|
|
108
108
|
width: 100%;
|
|
109
109
|
|
|
110
110
|
${({
|
|
111
|
-
isNumber,
|
|
112
|
-
align,
|
|
111
|
+
isNumber = false,
|
|
112
|
+
align = "left",
|
|
113
113
|
theme: {
|
|
114
114
|
yoga: { spacing }
|
|
115
115
|
}
|
|
@@ -149,13 +149,13 @@ Wrapper.propTypes = {
|
|
|
149
149
|
align: oneOf(["left", "right"]),
|
|
150
150
|
isNumber: bool
|
|
151
151
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
const defaultLabel = {
|
|
153
|
+
value: void 0,
|
|
154
|
+
placement: "left"
|
|
155
155
|
};
|
|
156
156
|
const Progress = React.forwardRef(
|
|
157
157
|
(_a, ref) => {
|
|
158
|
-
var _b = _a, { label, max, value, variant } = _b, props = __objRest(_b, ["label", "max", "value", "variant"]);
|
|
158
|
+
var _b = _a, { label = defaultLabel, max = 1, value, variant = "verve" } = _b, props = __objRest(_b, ["label", "max", "value", "variant"]);
|
|
159
159
|
const isNumber = !/[a-zA-Z]/g.test(label.value);
|
|
160
160
|
return /* @__PURE__ */ jsxs(Wrapper, __spreadProps(__spreadValues({ isNumber, align: label.placement, ref }, props), { children: [
|
|
161
161
|
/* @__PURE__ */ jsx(ProgressBar, { max, value, variant }),
|
|
@@ -203,15 +203,6 @@ Progress.propTypes = {
|
|
|
203
203
|
"white"
|
|
204
204
|
])
|
|
205
205
|
};
|
|
206
|
-
Progress.defaultProps = {
|
|
207
|
-
label: {
|
|
208
|
-
value: void 0,
|
|
209
|
-
placement: "left"
|
|
210
|
-
},
|
|
211
|
-
max: 1,
|
|
212
|
-
value: void 0,
|
|
213
|
-
variant: "verve"
|
|
214
|
-
};
|
|
215
206
|
var Progress_default = Progress;
|
|
216
207
|
export {
|
|
217
208
|
Progress_default as default
|
|
@@ -91,10 +91,10 @@ const ButtonWrapper = styled.div`
|
|
|
91
91
|
border-color: ${radiogroup.button.border.color};
|
|
92
92
|
border-top-width: ${radiogroup.button.border.width}px;
|
|
93
93
|
border-bottom-width: ${radiogroup.button.border.width}px;
|
|
94
|
-
|
|
94
|
+
|
|
95
95
|
border-left: none;
|
|
96
96
|
border-right: none;
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
&:first-child {
|
|
99
99
|
border-right-width: 0;
|
|
100
100
|
border-left-width: ${radiogroup.button.border.width}px;
|
|
@@ -104,7 +104,7 @@ const ButtonWrapper = styled.div`
|
|
|
104
104
|
border-top-left-radius: ${radiogroup.button.border.radius}px;
|
|
105
105
|
border-bottom-left-radius: ${radiogroup.button.border.radius}px;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
|
|
108
108
|
&:last-child {
|
|
109
109
|
border-left-width: 0;
|
|
110
110
|
|
|
@@ -119,7 +119,7 @@ const ButtonWrapper = styled.div`
|
|
|
119
119
|
`;
|
|
120
120
|
const RadioGroupButton = React.forwardRef(
|
|
121
121
|
(_a, ref) => {
|
|
122
|
-
var _b = _a, { children, value } = _b, rest = __objRest(_b, ["children", "value"]);
|
|
122
|
+
var _b = _a, { children, value = "" } = _b, rest = __objRest(_b, ["children", "value"]);
|
|
123
123
|
const _a2 = useContext(RadioGroupContext), { name, onChange, small, selectedValue } = _a2, context = __objRest(_a2, ["name", "onChange", "small", "selectedValue"]);
|
|
124
124
|
const inputValue = value || children;
|
|
125
125
|
const checked = inputValue === selectedValue;
|
|
@@ -144,9 +144,6 @@ RadioGroupButton.propTypes = {
|
|
|
144
144
|
children: oneOfType([string, number]).isRequired,
|
|
145
145
|
value: oneOfType([string, number])
|
|
146
146
|
};
|
|
147
|
-
RadioGroupButton.defaultProps = {
|
|
148
|
-
value: ""
|
|
149
|
-
};
|
|
150
147
|
var RadioButton_default = RadioGroupButton;
|
|
151
148
|
export {
|
|
152
149
|
RadioButton_default as default
|
|
@@ -54,7 +54,7 @@ const Radio = styled.span`
|
|
|
54
54
|
width: ${radio.size}px;
|
|
55
55
|
height: ${radio.size}px;
|
|
56
56
|
|
|
57
|
-
border-width: ${radio.size * 0.1}px;
|
|
57
|
+
border-width: ${radio.size * 0.1}px;
|
|
58
58
|
border-style: solid;
|
|
59
59
|
border-color: ${radio.backgroundColor};
|
|
60
60
|
border-radius: ${radio.border.radius}px;
|
|
@@ -107,28 +107,28 @@ const Wrapper = styled.div`
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
${checked ? `
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
&:hover {
|
|
112
112
|
${Radio} {
|
|
113
113
|
background-color: ${stateColors.hover};
|
|
114
|
-
box-shadow: 0 0 0 ${radiogroup.radio.size * 0.4}px
|
|
114
|
+
box-shadow: 0 0 0 ${radiogroup.radio.size * 0.4}px
|
|
115
115
|
${stateColors.hover};
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
&:focus-within {
|
|
120
120
|
${Radio} {
|
|
121
121
|
z-index: 1;
|
|
122
122
|
background-color: ${stateColors.focusWithin};
|
|
123
|
-
box-shadow: 0 0 0 ${radiogroup.radio.size * 0.4}px
|
|
123
|
+
box-shadow: 0 0 0 ${radiogroup.radio.size * 0.4}px
|
|
124
124
|
${stateColors.focusWithin};
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
|
|
128
128
|
&:active {
|
|
129
129
|
${Radio} {
|
|
130
130
|
background-color: ${stateColors.active};
|
|
131
|
-
box-shadow: 0 0 0 ${radiogroup.radio.size * 0.4}px
|
|
131
|
+
box-shadow: 0 0 0 ${radiogroup.radio.size * 0.4}px
|
|
132
132
|
${stateColors.active};
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -143,12 +143,12 @@ const Wrapper = styled.div`
|
|
|
143
143
|
|
|
144
144
|
width: ${radiogroup.radio.size * 0.5}px;
|
|
145
145
|
height: ${radiogroup.radio.size * 0.5}px;
|
|
146
|
-
|
|
146
|
+
|
|
147
147
|
border-radius: 100%;
|
|
148
148
|
background-color: ${radiogroup.checked.backgroundColor};
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
transform: translate(-50%, -50%);
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
content: '';
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -177,9 +177,10 @@ const Wrapper = styled.div`
|
|
|
177
177
|
`;
|
|
178
178
|
}}
|
|
179
179
|
`;
|
|
180
|
+
const emptyObj = {};
|
|
180
181
|
const RadioGroupRadio = React.forwardRef(
|
|
181
182
|
(_a, ref) => {
|
|
182
|
-
var _b = _a, { value, disabled, style, className } = _b, rest = __objRest(_b, ["value", "disabled", "style", "className"]);
|
|
183
|
+
var _b = _a, { value = "", disabled = false, style = emptyObj, className } = _b, rest = __objRest(_b, ["value", "disabled", "style", "className"]);
|
|
183
184
|
const _a2 = useContext(RadioGroupContext), { name, onChange, selectedValue } = _a2, context = __objRest(_a2, ["name", "onChange", "selectedValue"]);
|
|
184
185
|
const inputValue = value;
|
|
185
186
|
const checked = inputValue === selectedValue;
|
|
@@ -219,12 +220,6 @@ RadioGroupRadio.propTypes = {
|
|
|
219
220
|
style: shape({}),
|
|
220
221
|
value: oneOfType([string, number])
|
|
221
222
|
};
|
|
222
|
-
RadioGroupRadio.defaultProps = {
|
|
223
|
-
className: void 0,
|
|
224
|
-
disabled: false,
|
|
225
|
-
style: {},
|
|
226
|
-
value: ""
|
|
227
|
-
};
|
|
228
223
|
var Radio_default = RadioGroupRadio;
|
|
229
224
|
export {
|
|
230
225
|
Radio_default as default
|
|
@@ -45,15 +45,18 @@ const Group = styled.div.attrs({
|
|
|
45
45
|
${full ? `width: 100%;` : ``}
|
|
46
46
|
`}
|
|
47
47
|
`;
|
|
48
|
+
const noop = () => {
|
|
49
|
+
};
|
|
50
|
+
const emptyObj = {};
|
|
48
51
|
const RadioGroup = (_a) => {
|
|
49
52
|
var _b = _a, {
|
|
50
|
-
name,
|
|
51
|
-
onChange,
|
|
52
|
-
selectedValue,
|
|
53
|
-
small,
|
|
54
|
-
full,
|
|
55
|
-
children,
|
|
56
|
-
style
|
|
53
|
+
name = "",
|
|
54
|
+
onChange = noop,
|
|
55
|
+
selectedValue = "",
|
|
56
|
+
small = false,
|
|
57
|
+
full = false,
|
|
58
|
+
children = null,
|
|
59
|
+
style = emptyObj
|
|
57
60
|
} = _b, rest = __objRest(_b, [
|
|
58
61
|
"name",
|
|
59
62
|
"onChange",
|
|
@@ -85,16 +88,6 @@ RadioGroup.propTypes = {
|
|
|
85
88
|
children: node,
|
|
86
89
|
style: shape({})
|
|
87
90
|
};
|
|
88
|
-
RadioGroup.defaultProps = {
|
|
89
|
-
name: "",
|
|
90
|
-
onChange: () => {
|
|
91
|
-
},
|
|
92
|
-
selectedValue: "",
|
|
93
|
-
small: false,
|
|
94
|
-
full: false,
|
|
95
|
-
children: null,
|
|
96
|
-
style: {}
|
|
97
|
-
};
|
|
98
91
|
var RadioGroup_default = RadioGroup;
|
|
99
92
|
export {
|
|
100
93
|
RadioGroup_default as default
|
package/esm/Rating/web/Rating.js
CHANGED
|
@@ -53,22 +53,31 @@ const RatingWrapper = styled.div`
|
|
|
53
53
|
${readOnly ? "pointer-events: none;" : ""}
|
|
54
54
|
`}
|
|
55
55
|
`;
|
|
56
|
+
const noop = () => {
|
|
57
|
+
};
|
|
58
|
+
const defaultIcon = {
|
|
59
|
+
type: StarFilled,
|
|
60
|
+
size: 12
|
|
61
|
+
};
|
|
56
62
|
const Rating = (_a) => {
|
|
57
63
|
var _b = _a, {
|
|
58
64
|
value,
|
|
59
|
-
max,
|
|
60
|
-
readOnly,
|
|
61
|
-
onRate,
|
|
62
|
-
onMouseOver,
|
|
63
|
-
onMouseMove,
|
|
64
|
-
onMouseLeave,
|
|
65
|
+
max = 5,
|
|
66
|
+
readOnly = true,
|
|
67
|
+
onRate = noop,
|
|
68
|
+
onMouseOver = noop,
|
|
69
|
+
onMouseMove = noop,
|
|
70
|
+
onMouseLeave = noop,
|
|
65
71
|
theme: {
|
|
66
72
|
yoga: {
|
|
67
73
|
colors,
|
|
68
74
|
components: { rating }
|
|
69
75
|
}
|
|
70
76
|
},
|
|
71
|
-
icon: {
|
|
77
|
+
icon: {
|
|
78
|
+
type: Icon = StarFilled,
|
|
79
|
+
size: iconSize = rating.icon.size
|
|
80
|
+
} = defaultIcon
|
|
72
81
|
} = _b, rest = __objRest(_b, [
|
|
73
82
|
"value",
|
|
74
83
|
"max",
|
|
@@ -184,24 +193,6 @@ Rating.propTypes = {
|
|
|
184
193
|
onMouseMove: func,
|
|
185
194
|
onMouseLeave: func
|
|
186
195
|
};
|
|
187
|
-
Rating.defaultProps = {
|
|
188
|
-
value: void 0,
|
|
189
|
-
icon: {
|
|
190
|
-
type: StarFilled,
|
|
191
|
-
size: 12
|
|
192
|
-
},
|
|
193
|
-
max: 5,
|
|
194
|
-
readOnly: true,
|
|
195
|
-
onRate: (rating) => {
|
|
196
|
-
},
|
|
197
|
-
// eslint-disable-line no-unused-vars
|
|
198
|
-
onMouseOver: () => {
|
|
199
|
-
},
|
|
200
|
-
onMouseMove: () => {
|
|
201
|
-
},
|
|
202
|
-
onMouseLeave: () => {
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
196
|
var Rating_default = withTheme(Rating);
|
|
206
197
|
export {
|
|
207
198
|
Rating_default as default
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,19 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
17
32
|
import { jsx } from "react/jsx-runtime";
|
|
18
33
|
import React from "react";
|
|
19
34
|
import { checkPropTypes, oneOf } from "prop-types";
|
|
@@ -65,8 +80,9 @@ const StyledSkeleton = styled.div`
|
|
|
65
80
|
}
|
|
66
81
|
`}
|
|
67
82
|
`;
|
|
68
|
-
function Skeleton(
|
|
69
|
-
|
|
83
|
+
function Skeleton(_a) {
|
|
84
|
+
var _b = _a, { animation = "pulse", color = "primary" } = _b, rest = __objRest(_b, ["animation", "color"]);
|
|
85
|
+
return /* @__PURE__ */ jsx(StyledSkeleton, __spreadProps(__spreadValues({}, rest), { animation, color }));
|
|
70
86
|
}
|
|
71
87
|
Skeleton.propTypes = {
|
|
72
88
|
/**
|
|
@@ -117,11 +133,6 @@ Skeleton.propTypes = {
|
|
|
117
133
|
*/
|
|
118
134
|
animation: oneOf(["pulse", false])
|
|
119
135
|
};
|
|
120
|
-
Skeleton.defaultProps = {
|
|
121
|
-
variant: void 0,
|
|
122
|
-
animation: "pulse",
|
|
123
|
-
color: "primary"
|
|
124
|
-
};
|
|
125
136
|
var Skeleton_default = Skeleton;
|
|
126
137
|
export {
|
|
127
138
|
Skeleton_default as default
|
package/esm/Slider/web/Marker.js
CHANGED
|
@@ -59,8 +59,19 @@ const Circle = styled(RCHandle)`
|
|
|
59
59
|
0 0 0 8px ${hexToRgb(slider.marker.backgroundColor, 0.2)}` : slider.marker.shadow};
|
|
60
60
|
`}
|
|
61
61
|
`;
|
|
62
|
-
const
|
|
63
|
-
|
|
62
|
+
const defaultValues = [0];
|
|
63
|
+
function Marker(_a) {
|
|
64
|
+
var _b = _a, {
|
|
65
|
+
values = defaultValues,
|
|
66
|
+
dragging = false,
|
|
67
|
+
index = 0,
|
|
68
|
+
tooltip
|
|
69
|
+
} = _b, props = __objRest(_b, [
|
|
70
|
+
"values",
|
|
71
|
+
"dragging",
|
|
72
|
+
"index",
|
|
73
|
+
"tooltip"
|
|
74
|
+
]);
|
|
64
75
|
const renderTooltip = () => {
|
|
65
76
|
if (!dragging) {
|
|
66
77
|
return false;
|
|
@@ -73,7 +84,7 @@ const Marker = (_a) => {
|
|
|
73
84
|
})[0];
|
|
74
85
|
};
|
|
75
86
|
return /* @__PURE__ */ jsx(Circle, __spreadProps(__spreadValues({ "data-dragging": Boolean(dragging) }, props), { children: dragging && /* @__PURE__ */ jsx(Tooltip, { data: renderTooltip() }) }));
|
|
76
|
-
}
|
|
87
|
+
}
|
|
77
88
|
Marker.propTypes = {
|
|
78
89
|
values: arrayOf(number),
|
|
79
90
|
dragging: bool,
|
|
@@ -88,12 +99,6 @@ Marker.propTypes = {
|
|
|
88
99
|
})
|
|
89
100
|
)
|
|
90
101
|
};
|
|
91
|
-
Marker.defaultProps = {
|
|
92
|
-
values: [0],
|
|
93
|
-
dragging: false,
|
|
94
|
-
index: 0,
|
|
95
|
-
tooltip: void 0
|
|
96
|
-
};
|
|
97
102
|
var Marker_default = Marker;
|
|
98
103
|
export {
|
|
99
104
|
Marker_default as default
|
package/esm/Slider/web/Slider.js
CHANGED
|
@@ -60,14 +60,16 @@ const StyledRange = styled(RCRange)`
|
|
|
60
60
|
box-sizing: border-box;
|
|
61
61
|
}
|
|
62
62
|
`;
|
|
63
|
+
const emptyArr = [];
|
|
64
|
+
const defaultValues = [0];
|
|
63
65
|
const Slider = (_a) => {
|
|
64
66
|
var _b = _a, {
|
|
65
|
-
snapped,
|
|
66
|
-
tooltip,
|
|
67
|
-
values,
|
|
68
|
-
max,
|
|
67
|
+
snapped = false,
|
|
68
|
+
tooltip = emptyArr,
|
|
69
|
+
values = defaultValues,
|
|
70
|
+
max = 10,
|
|
69
71
|
maxLabel,
|
|
70
|
-
min,
|
|
72
|
+
min = 0,
|
|
71
73
|
minLabel,
|
|
72
74
|
theme: {
|
|
73
75
|
yoga: {
|
|
@@ -214,15 +216,6 @@ Slider.propTypes = {
|
|
|
214
216
|
/** an array that accepts one or two numbers, this determines how many markers will be displayed */
|
|
215
217
|
values: arrayOf(number)
|
|
216
218
|
};
|
|
217
|
-
Slider.defaultProps = {
|
|
218
|
-
max: 10,
|
|
219
|
-
maxLabel: void 0,
|
|
220
|
-
min: 0,
|
|
221
|
-
minLabel: void 0,
|
|
222
|
-
snapped: false,
|
|
223
|
-
tooltip: [],
|
|
224
|
-
values: [0]
|
|
225
|
-
};
|
|
226
219
|
Slider.displayName = "Slider";
|
|
227
220
|
var Slider_default = withTheme(Slider);
|
|
228
221
|
export {
|
|
@@ -43,7 +43,7 @@ const Wrapper = styled.div`
|
|
|
43
43
|
transform: translateX(-50%);
|
|
44
44
|
|
|
45
45
|
${({
|
|
46
|
-
hasRibbon,
|
|
46
|
+
hasRibbon = false,
|
|
47
47
|
theme: {
|
|
48
48
|
yoga: {
|
|
49
49
|
components: { slider }
|
|
@@ -58,9 +58,6 @@ const Wrapper = styled.div`
|
|
|
58
58
|
Wrapper.propTypes = {
|
|
59
59
|
hasRibbon: bool
|
|
60
60
|
};
|
|
61
|
-
Wrapper.defaultProps = {
|
|
62
|
-
hasRibbon: false
|
|
63
|
-
};
|
|
64
61
|
const Tip = styled.div`
|
|
65
62
|
position: relative;
|
|
66
63
|
z-index: 3;
|
|
@@ -158,8 +155,9 @@ const Description = styled(Text.Body2)`
|
|
|
158
155
|
font-weight: ${slider.tooltip.font.description.weight};
|
|
159
156
|
`}
|
|
160
157
|
`;
|
|
161
|
-
const
|
|
162
|
-
|
|
158
|
+
const emptyObj = {};
|
|
159
|
+
function Tooltip(_a) {
|
|
160
|
+
var _b = _a, { data = emptyObj } = _b, props = __objRest(_b, ["data"]);
|
|
163
161
|
return Object.keys(data).length ? /* @__PURE__ */ jsxs(Wrapper, __spreadProps(__spreadValues({ hasRibbon: Boolean(data.ribbon) }, props), { children: [
|
|
164
162
|
data.ribbon && /* @__PURE__ */ jsx(Ribbon, { as: "span", children: data.ribbon }),
|
|
165
163
|
(data.title || data.description) && /* @__PURE__ */ jsxs(Tip, { children: [
|
|
@@ -168,7 +166,7 @@ const Tooltip = (_a) => {
|
|
|
168
166
|
] }),
|
|
169
167
|
/* @__PURE__ */ jsx(Arrow, {})
|
|
170
168
|
] })) : null;
|
|
171
|
-
}
|
|
169
|
+
}
|
|
172
170
|
Tooltip.propTypes = {
|
|
173
171
|
data: shape({
|
|
174
172
|
ribbon: string,
|
|
@@ -176,9 +174,6 @@ Tooltip.propTypes = {
|
|
|
176
174
|
description: string
|
|
177
175
|
})
|
|
178
176
|
};
|
|
179
|
-
Tooltip.defaultProps = {
|
|
180
|
-
data: {}
|
|
181
|
-
};
|
|
182
177
|
var Tooltip_default = Tooltip;
|
|
183
178
|
export {
|
|
184
179
|
Tooltip_default as default
|