@gympass/yoga 7.139.1 → 7.141.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.
@@ -28,7 +28,8 @@ const Checkbox = ({ spacing, colors, borders, radii, fontSizes }) => ({
28
28
  },
29
29
  border: {
30
30
  width: borders.medium,
31
- radius: radii.xsmall
31
+ radius: radii.xsmall,
32
+ color: colors.mediumNew
32
33
  },
33
34
  label: {
34
35
  padding: {
@@ -59,9 +60,14 @@ const Checkbox = ({ spacing, colors, borders, radii, fontSizes }) => ({
59
60
  }
60
61
  },
61
62
  disabled: {
62
- backgroundColor: colors.elements.lineAndBorders,
63
+ backgroundColor: colors.white,
63
64
  border: {
64
- color: colors.elements.lineAndBorders
65
+ color: colors.steady
66
+ },
67
+ label: {
68
+ font: {
69
+ color: colors.steady
70
+ }
65
71
  }
66
72
  }
67
73
  });
@@ -121,12 +121,12 @@ const CheckBackground = import_styled_components.default.View(
121
121
  error,
122
122
  theme: {
123
123
  yoga: {
124
- colors: { primary, feedback, elements, white },
124
+ colors: { primary, feedback, white },
125
125
  components: { checkbox }
126
126
  }
127
127
  }
128
128
  }) => {
129
- let borderColor = primary;
129
+ let borderColor = checkbox.border.color;
130
130
  let bgColor = "transparent";
131
131
  if (error) {
132
132
  [, borderColor] = feedback.attention;
@@ -137,7 +137,6 @@ const CheckBackground = import_styled_components.default.View(
137
137
  borderColor = checkbox.disabled.border.color;
138
138
  if (checked) {
139
139
  bgColor = checkbox.disabled.backgroundColor;
140
- borderColor = elements.lineAndBorders;
141
140
  }
142
141
  } else if (checked) {
143
142
  borderColor = primary;
@@ -97,12 +97,12 @@ const CheckMark = import_styled_components.default.div.attrs(({ checked, disable
97
97
  indeterminate,
98
98
  theme: {
99
99
  yoga: {
100
- colors: { primary, feedback, elements, white },
100
+ colors: { primary, feedback, white },
101
101
  components: { checkbox }
102
102
  }
103
103
  }
104
104
  }) => {
105
- let borderColor = elements.selectionAndIcons;
105
+ let borderColor = checkbox.border.color;
106
106
  let bgColor = "transparent";
107
107
  let checkColor = checkbox.checked.icon.color;
108
108
  if (error) {
@@ -114,7 +114,7 @@ const CheckMark = import_styled_components.default.div.attrs(({ checked, disable
114
114
  borderColor = checkbox.disabled.border.color;
115
115
  if (checked || indeterminate) {
116
116
  bgColor = checkbox.disabled.backgroundColor;
117
- borderColor = elements.lineAndBorders;
117
+ borderColor = checkbox.disabled.border.color;
118
118
  }
119
119
  } else if (checked || indeterminate) {
120
120
  borderColor = primary;
@@ -160,15 +160,22 @@ const Label = import_styled_components.default.label`
160
160
  cursor: pointer;
161
161
 
162
162
  ${({
163
+ disabled,
163
164
  theme: {
164
165
  yoga: {
165
166
  components: { checkbox }
166
167
  }
167
168
  }
168
- }) => `
169
- font-size: ${checkbox.label.font.size}px;
170
- color: ${checkbox.label.font.color};
171
- `}
169
+ }) => {
170
+ let { color } = checkbox.label.font;
171
+ if (disabled && checkbox.disabled.label) {
172
+ color = checkbox.disabled.label.font.color;
173
+ }
174
+ return `
175
+ font-size: ${checkbox.label.font.size}px;
176
+ color: ${color};
177
+ `;
178
+ }}
172
179
  `;
173
180
  const Shadow = import_styled_components.default.span`
174
181
  position: absolute;
@@ -334,7 +341,7 @@ const Checkbox = (_a) => {
334
341
  indeterminate,
335
342
  inverted,
336
343
  disabled,
337
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { id: checkboxLabelId, children: [
344
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { id: checkboxLabelId, disabled, children: [
338
345
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Shadow, {}),
339
346
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
340
347
  CheckMark,
@@ -71,7 +71,7 @@ const Info = (0, import_styled_components.default)(import_Text.default.Caption)(
71
71
  font-family: ${baseFont.family};
72
72
  color: ${input.helper.color.default};
73
73
 
74
- ${disabled ? `color: ${colors.text.disabled};` : ""}
74
+ ${disabled ? `color: ${colors.steady};` : ""}
75
75
  ${focused ? `color: ${input.helper.color.focus};` : ""}
76
76
  ${error ? `color: ${colors.feedback.attention.dark};` : ""}
77
77
  `
@@ -121,8 +121,8 @@ const Field = import_styled_components.default.TextInput(
121
121
  ${error ? `border-color: ${colors.feedback.attention[1]};` : ""}
122
122
 
123
123
  ${disabled ? `
124
- border-color: ${colors.elements.lineAndBorders};
125
- color: ${colors.text.disabled};
124
+ border-color: ${colors.steady};
125
+ color: ${colors.steady};
126
126
  ` : ""}
127
127
  `
128
128
  );
@@ -176,7 +176,7 @@ const Label = (0, import_styled_components.default)(import_react_native.Animated
176
176
  ` : ""}
177
177
 
178
178
  ${error ? `color: ${colors.feedback.attention[1]};` : ""}
179
- ${disabled ? `color: ${colors.text.disabled};` : ""}
179
+ ${disabled ? `color: ${colors.steady};` : ""}
180
180
  `
181
181
  );
182
182
  const CloseIcon = import_styled_components.default.View(
@@ -253,7 +253,7 @@ const Input = import_react.default.forwardRef(
253
253
  }, [value]);
254
254
  const iconColor = () => {
255
255
  if (disabled) {
256
- return colors.elements.backgroundAndDisabled;
256
+ return colors.steady;
257
257
  }
258
258
  if (focused) {
259
259
  return input.font.color.focus;
@@ -123,7 +123,7 @@ const Password = import_react.default.forwardRef(
123
123
  const [focused, setFocused] = (0, import_react.useState)(false);
124
124
  const iconColor = () => {
125
125
  if (disabled) {
126
- return colors.elements.backgroundAndDisabled;
126
+ return colors.steady;
127
127
  }
128
128
  if (focused) {
129
129
  return input.font.color.focus;
@@ -114,8 +114,8 @@ const Field = import_styled_components.default.input`
114
114
 
115
115
  &:disabled {
116
116
  cursor: not-allowed;
117
- color: ${colors.text.disabled};
118
- -webkit-text-fill-color: ${colors.text.disabled};
117
+ color: ${colors.steady};
118
+ -webkit-text-fill-color: ${colors.steady};
119
119
  opacity: 1;
120
120
  }
121
121
 
@@ -63,7 +63,7 @@ const Fieldset = import_styled_components.default.fieldset`
63
63
 
64
64
  ${value && !error ? `border-color: ${input.border.color.typed};` : ""}
65
65
 
66
- ${disabled ? `border-color: ${colors.elements.lineAndBorders};` : ""}
66
+ ${disabled ? `border-color: ${colors.steady};` : ""}
67
67
 
68
68
  &:hover, &:focus-within {
69
69
  &:not(:disabled) {
@@ -70,7 +70,7 @@ const Wrapper = import_styled_components.default.div`
70
70
  margin-top: ${input.helper.margin.top}px;
71
71
 
72
72
  color: ${error ? colors.feedback.attention[1] : input.helper.color.default};
73
- ${disabled ? `color: ${colors.text.disabled};` : ""}
73
+ ${disabled ? `color: ${colors.steady};` : ""}
74
74
  `}
75
75
  `;
76
76
  const Info = (0, import_styled_components.default)(import_Text.default.Caption)`
@@ -116,7 +116,7 @@ const IconWrapper = import_styled_components.default.div`
116
116
  cursor: not-allowed;
117
117
  pointer-events: none;
118
118
  svg {
119
- fill: ${colors.text.disabled};
119
+ fill: ${colors.steady};
120
120
  }
121
121
  ` : ""}
122
122
  `}
@@ -62,7 +62,7 @@ const Label = import_styled_components.default.label`
62
62
  transition-duration: ${transition.duration[1]}ms;
63
63
  transition-timing-function: cubic-bezier(${transition.timing[0].join()});
64
64
 
65
- ${disabled ? `color: ${colors.text.disabled};` : ""}
65
+ ${disabled ? `color: ${colors.steady};` : ""}
66
66
  `}
67
67
  `;
68
68
  var Label_default = Label;
@@ -124,7 +124,7 @@ const IconWrapper = import_styled_components.default.div`
124
124
  fill: ${input.font.color.default};
125
125
 
126
126
  ${disabled ? `
127
- fill: ${colors.elements.backgroundAndDisabled};
127
+ fill: ${colors.steady};
128
128
  pointer-events: none;` : ""}
129
129
  }
130
130
  `}
@@ -101,7 +101,7 @@ const labelStateColors = ({
101
101
  yoga: { colors }
102
102
  }
103
103
  }) => import_styled_components.css`
104
- ${disabled ? `color: ${colors.text.disabled};` : ""}
104
+ ${disabled ? `color: ${colors.steady};` : ""}
105
105
  ${error ? `color: ${colors.feedback.attention[1]};` : ""}
106
106
  `;
107
107
  const Container = import_styled_components.default.div`
@@ -164,7 +164,7 @@ const Container = import_styled_components.default.div`
164
164
  width: 100%;
165
165
  outline: none;
166
166
  grid-area: input;
167
- color: ${disabled ? colors.text.disabled : input.font.color.focus};
167
+ color: ${disabled ? colors.steady : input.font.color.focus};
168
168
  font-family: ${baseFont.family}, sans-serif;
169
169
  font-size: ${input.font.size}px;
170
170
  padding-left: ${spacing.xsmall}px;
@@ -5,7 +5,8 @@ const Checkbox = ({ spacing, colors, borders, radii, fontSizes }) => ({
5
5
  },
6
6
  border: {
7
7
  width: borders.medium,
8
- radius: radii.xsmall
8
+ radius: radii.xsmall,
9
+ color: colors.mediumNew
9
10
  },
10
11
  label: {
11
12
  padding: {
@@ -36,9 +37,14 @@ const Checkbox = ({ spacing, colors, borders, radii, fontSizes }) => ({
36
37
  }
37
38
  },
38
39
  disabled: {
39
- backgroundColor: colors.elements.lineAndBorders,
40
+ backgroundColor: colors.white,
40
41
  border: {
41
- color: colors.elements.lineAndBorders
42
+ color: colors.steady
43
+ },
44
+ label: {
45
+ font: {
46
+ color: colors.steady
47
+ }
42
48
  }
43
49
  }
44
50
  });
@@ -90,12 +90,12 @@ const CheckBackground = styled.View(
90
90
  error,
91
91
  theme: {
92
92
  yoga: {
93
- colors: { primary, feedback, elements, white },
93
+ colors: { primary, feedback, white },
94
94
  components: { checkbox }
95
95
  }
96
96
  }
97
97
  }) => {
98
- let borderColor = primary;
98
+ let borderColor = checkbox.border.color;
99
99
  let bgColor = "transparent";
100
100
  if (error) {
101
101
  [, borderColor] = feedback.attention;
@@ -106,7 +106,6 @@ const CheckBackground = styled.View(
106
106
  borderColor = checkbox.disabled.border.color;
107
107
  if (checked) {
108
108
  bgColor = checkbox.disabled.backgroundColor;
109
- borderColor = elements.lineAndBorders;
110
109
  }
111
110
  } else if (checked) {
112
111
  borderColor = primary;
@@ -66,12 +66,12 @@ const CheckMark = styled.div.attrs(({ checked, disabled }) => ({
66
66
  indeterminate,
67
67
  theme: {
68
68
  yoga: {
69
- colors: { primary, feedback, elements, white },
69
+ colors: { primary, feedback, white },
70
70
  components: { checkbox }
71
71
  }
72
72
  }
73
73
  }) => {
74
- let borderColor = elements.selectionAndIcons;
74
+ let borderColor = checkbox.border.color;
75
75
  let bgColor = "transparent";
76
76
  let checkColor = checkbox.checked.icon.color;
77
77
  if (error) {
@@ -83,7 +83,7 @@ const CheckMark = styled.div.attrs(({ checked, disabled }) => ({
83
83
  borderColor = checkbox.disabled.border.color;
84
84
  if (checked || indeterminate) {
85
85
  bgColor = checkbox.disabled.backgroundColor;
86
- borderColor = elements.lineAndBorders;
86
+ borderColor = checkbox.disabled.border.color;
87
87
  }
88
88
  } else if (checked || indeterminate) {
89
89
  borderColor = primary;
@@ -129,15 +129,22 @@ const Label = styled.label`
129
129
  cursor: pointer;
130
130
 
131
131
  ${({
132
+ disabled,
132
133
  theme: {
133
134
  yoga: {
134
135
  components: { checkbox }
135
136
  }
136
137
  }
137
- }) => `
138
- font-size: ${checkbox.label.font.size}px;
139
- color: ${checkbox.label.font.color};
140
- `}
138
+ }) => {
139
+ let { color } = checkbox.label.font;
140
+ if (disabled && checkbox.disabled.label) {
141
+ color = checkbox.disabled.label.font.color;
142
+ }
143
+ return `
144
+ font-size: ${checkbox.label.font.size}px;
145
+ color: ${color};
146
+ `;
147
+ }}
141
148
  `;
142
149
  const Shadow = styled.span`
143
150
  position: absolute;
@@ -303,7 +310,7 @@ const Checkbox = (_a) => {
303
310
  indeterminate,
304
311
  inverted,
305
312
  disabled,
306
- children: /* @__PURE__ */ jsxs(Label, { id: checkboxLabelId, children: [
313
+ children: /* @__PURE__ */ jsxs(Label, { id: checkboxLabelId, disabled, children: [
307
314
  /* @__PURE__ */ jsx(Shadow, {}),
308
315
  /* @__PURE__ */ jsxs(
309
316
  CheckMark,
@@ -38,7 +38,7 @@ const Info = styled(Text.Caption)(
38
38
  font-family: ${baseFont.family};
39
39
  color: ${input.helper.color.default};
40
40
 
41
- ${disabled ? `color: ${colors.text.disabled};` : ""}
41
+ ${disabled ? `color: ${colors.steady};` : ""}
42
42
  ${focused ? `color: ${input.helper.color.focus};` : ""}
43
43
  ${error ? `color: ${colors.feedback.attention.dark};` : ""}
44
44
  `
@@ -98,8 +98,8 @@ const Field = styled.TextInput(
98
98
  ${error ? `border-color: ${colors.feedback.attention[1]};` : ""}
99
99
 
100
100
  ${disabled ? `
101
- border-color: ${colors.elements.lineAndBorders};
102
- color: ${colors.text.disabled};
101
+ border-color: ${colors.steady};
102
+ color: ${colors.steady};
103
103
  ` : ""}
104
104
  `
105
105
  );
@@ -153,7 +153,7 @@ const Label = styled(Animated.Text)(
153
153
  ` : ""}
154
154
 
155
155
  ${error ? `color: ${colors.feedback.attention[1]};` : ""}
156
- ${disabled ? `color: ${colors.text.disabled};` : ""}
156
+ ${disabled ? `color: ${colors.steady};` : ""}
157
157
  `
158
158
  );
159
159
  const CloseIcon = styled.View(
@@ -230,7 +230,7 @@ const Input = React.forwardRef(
230
230
  }, [value]);
231
231
  const iconColor = () => {
232
232
  if (disabled) {
233
- return colors.elements.backgroundAndDisabled;
233
+ return colors.steady;
234
234
  }
235
235
  if (focused) {
236
236
  return input.font.color.focus;
@@ -92,7 +92,7 @@ const Password = React.forwardRef(
92
92
  const [focused, setFocused] = useState(false);
93
93
  const iconColor = () => {
94
94
  if (disabled) {
95
- return colors.elements.backgroundAndDisabled;
95
+ return colors.steady;
96
96
  }
97
97
  if (focused) {
98
98
  return input.font.color.focus;
@@ -81,8 +81,8 @@ const Field = styled.input`
81
81
 
82
82
  &:disabled {
83
83
  cursor: not-allowed;
84
- color: ${colors.text.disabled};
85
- -webkit-text-fill-color: ${colors.text.disabled};
84
+ color: ${colors.steady};
85
+ -webkit-text-fill-color: ${colors.steady};
86
86
  opacity: 1;
87
87
  }
88
88
 
@@ -30,7 +30,7 @@ const Fieldset = styled.fieldset`
30
30
 
31
31
  ${value && !error ? `border-color: ${input.border.color.typed};` : ""}
32
32
 
33
- ${disabled ? `border-color: ${colors.elements.lineAndBorders};` : ""}
33
+ ${disabled ? `border-color: ${colors.steady};` : ""}
34
34
 
35
35
  &:hover, &:focus-within {
36
36
  &:not(:disabled) {
@@ -38,7 +38,7 @@ const Wrapper = styled.div`
38
38
  margin-top: ${input.helper.margin.top}px;
39
39
 
40
40
  color: ${error ? colors.feedback.attention[1] : input.helper.color.default};
41
- ${disabled ? `color: ${colors.text.disabled};` : ""}
41
+ ${disabled ? `color: ${colors.steady};` : ""}
42
42
  `}
43
43
  `;
44
44
  const Info = styled(Text.Caption)`
@@ -94,7 +94,7 @@ const IconWrapper = styled.div`
94
94
  cursor: not-allowed;
95
95
  pointer-events: none;
96
96
  svg {
97
- fill: ${colors.text.disabled};
97
+ fill: ${colors.steady};
98
98
  }
99
99
  ` : ""}
100
100
  `}
@@ -29,7 +29,7 @@ const Label = styled.label`
29
29
  transition-duration: ${transition.duration[1]}ms;
30
30
  transition-timing-function: cubic-bezier(${transition.timing[0].join()});
31
31
 
32
- ${disabled ? `color: ${colors.text.disabled};` : ""}
32
+ ${disabled ? `color: ${colors.steady};` : ""}
33
33
  `}
34
34
  `;
35
35
  var Label_default = Label;
@@ -93,7 +93,7 @@ const IconWrapper = styled.div`
93
93
  fill: ${input.font.color.default};
94
94
 
95
95
  ${disabled ? `
96
- fill: ${colors.elements.backgroundAndDisabled};
96
+ fill: ${colors.steady};
97
97
  pointer-events: none;` : ""}
98
98
  }
99
99
  `}
@@ -68,7 +68,7 @@ const labelStateColors = ({
68
68
  yoga: { colors }
69
69
  }
70
70
  }) => css`
71
- ${disabled ? `color: ${colors.text.disabled};` : ""}
71
+ ${disabled ? `color: ${colors.steady};` : ""}
72
72
  ${error ? `color: ${colors.feedback.attention[1]};` : ""}
73
73
  `;
74
74
  const Container = styled.div`
@@ -131,7 +131,7 @@ const Container = styled.div`
131
131
  width: 100%;
132
132
  outline: none;
133
133
  grid-area: input;
134
- color: ${disabled ? colors.text.disabled : input.font.color.focus};
134
+ color: ${disabled ? colors.steady : input.font.color.focus};
135
135
  font-family: ${baseFont.family}, sans-serif;
136
136
  font-size: ${input.font.size}px;
137
137
  padding-left: ${spacing.xsmall}px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.139.1",
3
+ "version": "7.141.0",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "types": "./typings/index.d.ts",
@@ -45,7 +45,7 @@
45
45
  "react-phone-input-2": "^2.15.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@gympass/yoga-icons": "^1.42.1",
48
+ "@gympass/yoga-icons": "^1.43.0",
49
49
  "@react-native-community/eslint-config": "^3.0.1",
50
50
  "@types/styled-components": "^5.1.34",
51
51
  "babel-plugin-inline-react-svg": "^1.1.1",
@@ -59,7 +59,7 @@
59
59
  "react-native": "0.72.3",
60
60
  "styled-components": "^4.4.0"
61
61
  },
62
- "gitHead": "576cc3f79bc01334ec5ddfafc4772fdf1214c438",
62
+ "gitHead": "469252db0b93fed37bf5de82866ea0dfd2ad9fc6",
63
63
  "module": "./esm",
64
64
  "private": false,
65
65
  "react-native": "./cjs/index.native.js"
@@ -505,6 +505,7 @@ declare const composeTheme: (tokens: typeof yogaTokens, customTheming?: {}) => {
505
505
  border: {
506
506
  width: any;
507
507
  radius: any;
508
+ color: any;
508
509
  };
509
510
  label: {
510
511
  padding: {
@@ -539,6 +540,11 @@ declare const composeTheme: (tokens: typeof yogaTokens, customTheming?: {}) => {
539
540
  border: {
540
541
  color: any;
541
542
  };
543
+ label: {
544
+ font: {
545
+ color: any;
546
+ };
547
+ };
542
548
  };
543
549
  };
544
550
  checkboxswitch: {