@gympass/yoga 7.127.3 → 7.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +24 -27
- package/cjs/Input/web/Phone.test.js +15 -0
- 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 +24 -27
- package/esm/Input/web/Phone.test.js +15 -0
- 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/Input.js
CHANGED
|
@@ -111,28 +111,30 @@ const LeftElementWrapper = styled.div`
|
|
|
111
111
|
transform: translateY(-50%);
|
|
112
112
|
`}
|
|
113
113
|
`;
|
|
114
|
+
const noop = () => {
|
|
115
|
+
};
|
|
114
116
|
const Input = React.forwardRef(
|
|
115
117
|
(_a, ref) => {
|
|
116
118
|
var _b = _a, {
|
|
117
|
-
cleanable,
|
|
119
|
+
cleanable = true,
|
|
118
120
|
children,
|
|
119
|
-
disabled,
|
|
121
|
+
disabled = false,
|
|
120
122
|
error,
|
|
121
|
-
full,
|
|
123
|
+
full = false,
|
|
122
124
|
helper,
|
|
123
125
|
label,
|
|
124
126
|
ariaLabel,
|
|
125
127
|
maxLength,
|
|
126
|
-
readOnly,
|
|
128
|
+
readOnly = false,
|
|
127
129
|
style,
|
|
128
|
-
value,
|
|
129
|
-
onChange,
|
|
130
|
-
onClean,
|
|
131
|
-
hideMaxLength,
|
|
130
|
+
value = "",
|
|
131
|
+
onChange = noop,
|
|
132
|
+
onClean = noop,
|
|
133
|
+
hideMaxLength = false,
|
|
132
134
|
rightIcon,
|
|
133
135
|
a11yId,
|
|
134
|
-
closeAriaLabel,
|
|
135
|
-
includeAriaAttributes,
|
|
136
|
+
closeAriaLabel = "Clear",
|
|
137
|
+
includeAriaAttributes = true,
|
|
136
138
|
leftElement
|
|
137
139
|
} = _b, props = __objRest(_b, [
|
|
138
140
|
"cleanable",
|
|
@@ -299,32 +301,6 @@ Input.propTypes = {
|
|
|
299
301
|
/** element on the left */
|
|
300
302
|
leftElement: node
|
|
301
303
|
};
|
|
302
|
-
Input.defaultProps = {
|
|
303
|
-
className: void 0,
|
|
304
|
-
children: void 0,
|
|
305
|
-
cleanable: true,
|
|
306
|
-
disabled: false,
|
|
307
|
-
error: void 0,
|
|
308
|
-
full: false,
|
|
309
|
-
helper: void 0,
|
|
310
|
-
label: void 0,
|
|
311
|
-
ariaLabel: void 0,
|
|
312
|
-
maxLength: void 0,
|
|
313
|
-
readOnly: false,
|
|
314
|
-
style: void 0,
|
|
315
|
-
value: "",
|
|
316
|
-
onChange: () => {
|
|
317
|
-
},
|
|
318
|
-
onClean: () => {
|
|
319
|
-
},
|
|
320
|
-
hideMaxLength: false,
|
|
321
|
-
placeholder: void 0,
|
|
322
|
-
rightIcon: void 0,
|
|
323
|
-
a11yId: void 0,
|
|
324
|
-
closeAriaLabel: "Clear",
|
|
325
|
-
includeAriaAttributes: true,
|
|
326
|
-
leftElement: void 0
|
|
327
|
-
};
|
|
328
304
|
var Input_default = Input;
|
|
329
305
|
export {
|
|
330
306
|
Input_default as default
|
|
@@ -100,10 +100,10 @@ const IconWrapper = styled.div`
|
|
|
100
100
|
`;
|
|
101
101
|
const Password = (_a) => {
|
|
102
102
|
var _b = _a, {
|
|
103
|
-
disabled,
|
|
103
|
+
disabled = false,
|
|
104
104
|
style,
|
|
105
105
|
className,
|
|
106
|
-
full,
|
|
106
|
+
full = false,
|
|
107
107
|
showPasswordAriaLabel,
|
|
108
108
|
hidePasswordAriaLabel
|
|
109
109
|
} = _b, props = __objRest(_b, [
|
|
@@ -164,14 +164,6 @@ Password.propTypes = {
|
|
|
164
164
|
hidePasswordAriaLabel: string,
|
|
165
165
|
style: shape({})
|
|
166
166
|
};
|
|
167
|
-
Password.defaultProps = {
|
|
168
|
-
className: void 0,
|
|
169
|
-
disabled: false,
|
|
170
|
-
full: false,
|
|
171
|
-
style: void 0,
|
|
172
|
-
showPasswordAriaLabel: void 0,
|
|
173
|
-
hidePasswordAriaLabel: void 0
|
|
174
|
-
};
|
|
175
167
|
var Password_default = Password;
|
|
176
168
|
export {
|
|
177
169
|
Password_default as default
|
package/esm/Input/web/Phone.js
CHANGED
|
@@ -52,19 +52,23 @@ 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
|
-
|
|
66
|
+
label = "",
|
|
67
|
+
placeholder = "+55 (11) 999999999",
|
|
68
|
+
value = "",
|
|
69
|
+
countries = phoneBaseSettings.onlyCountries,
|
|
70
|
+
onChange = noop,
|
|
71
|
+
cleanable = true
|
|
68
72
|
} = _b, rest = __objRest(_b, [
|
|
69
73
|
"defaultCountry",
|
|
70
74
|
"disabled",
|
|
@@ -75,7 +79,9 @@ const Phone = React.forwardRef(
|
|
|
75
79
|
"label",
|
|
76
80
|
"placeholder",
|
|
77
81
|
"value",
|
|
78
|
-
"
|
|
82
|
+
"countries",
|
|
83
|
+
"onChange",
|
|
84
|
+
"cleanable"
|
|
79
85
|
]);
|
|
80
86
|
const inputRef = useCombinedRefs(forwardedRef);
|
|
81
87
|
const currentCountry = useRef(defaultCountry);
|
|
@@ -85,6 +91,9 @@ const Phone = React.forwardRef(
|
|
|
85
91
|
currentCountry.current = countryCode;
|
|
86
92
|
}
|
|
87
93
|
}, []);
|
|
94
|
+
const availableCountries = {
|
|
95
|
+
onlyCountries: (countries == null ? void 0 : countries.length) > 0 ? countries : phoneBaseSettings.onlyCountries
|
|
96
|
+
};
|
|
88
97
|
return /* @__PURE__ */ jsx(
|
|
89
98
|
Input,
|
|
90
99
|
__spreadProps(__spreadValues({}, __spreadValues({
|
|
@@ -93,14 +102,15 @@ const Phone = React.forwardRef(
|
|
|
93
102
|
error,
|
|
94
103
|
full,
|
|
95
104
|
helper,
|
|
96
|
-
value
|
|
105
|
+
value,
|
|
106
|
+
cleanable
|
|
97
107
|
}, rest)), {
|
|
98
108
|
ref: inputRef,
|
|
99
109
|
label: "",
|
|
100
110
|
onClean: (phoneNumber) => onChange(phoneNumber),
|
|
101
111
|
children: /* @__PURE__ */ jsx(S.Container, { error, disabled, full, children: /* @__PURE__ */ jsx(
|
|
102
112
|
BasePhoneInput,
|
|
103
|
-
__spreadProps(__spreadValues({},
|
|
113
|
+
__spreadProps(__spreadValues({}, availableCountries), {
|
|
104
114
|
ref: (phoneRef) => {
|
|
105
115
|
inputRef.current = phoneRef == null ? void 0 : phoneRef.numberInputRef;
|
|
106
116
|
},
|
|
@@ -144,22 +154,9 @@ Phone.propTypes = {
|
|
|
144
154
|
/** callback invoked when value changes, either by typing of selecting a country */
|
|
145
155
|
onChange: func,
|
|
146
156
|
/** placeholder to show when the input is cleared */
|
|
147
|
-
placeholder: string
|
|
148
|
-
|
|
149
|
-
|
|
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"
|
|
157
|
+
placeholder: string,
|
|
158
|
+
/** countries for mask field and dropdown, make sure to use ISO 3166-1 alpha-2 lowercase */
|
|
159
|
+
countries: PropTypes.arrayOf(string)
|
|
163
160
|
};
|
|
164
161
|
var Phone_default = Phone;
|
|
165
162
|
export {
|
|
@@ -81,6 +81,21 @@ var require_Phone_test = __commonJS({
|
|
|
81
81
|
expect(getByDisplayValue(spec.expected)).toBeInTheDocument();
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
|
+
it(`Should only format and show countries numbers when props is given`, () => {
|
|
85
|
+
const USPhone = numbersFormats[1];
|
|
86
|
+
const { queryByDisplayValue } = render(
|
|
87
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Input.Phone, { countries: ["br", "pt"], value: USPhone.base }) })
|
|
88
|
+
);
|
|
89
|
+
expect(queryByDisplayValue(USPhone.expected)).not.toBeInTheDocument();
|
|
90
|
+
});
|
|
91
|
+
it(`Should return all countries validation if countries equals to empty array`, () => {
|
|
92
|
+
const USPhone = numbersFormats[1];
|
|
93
|
+
const { getAllByRole } = render(
|
|
94
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Input.Phone, { countries: [], value: USPhone.base }) })
|
|
95
|
+
);
|
|
96
|
+
fireEvent.click(getAllByRole("button")[0]);
|
|
97
|
+
expect(getAllByRole("option").length).toBe(12);
|
|
98
|
+
});
|
|
84
99
|
it("should prefix the phone number with newly selected country dial code", () => __async(exports, null, function* () {
|
|
85
100
|
const { getByRole, getByText, getByDisplayValue } = render(
|
|
86
101
|
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Input.Phone, { defaultCountry: "us" }) })
|
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
|