carbon-react 104.19.0 → 104.21.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.
@@ -30,7 +30,7 @@ const ButtonToggleGroupStyle = _styledComponents.default.div`
30
30
  ${({
31
31
  info
32
32
  }) => info && (0, _styledComponents.css)`
33
- border-color: var(--colorsActionMinor500);
33
+ border-color: var(--colorsSemanticInfo500);
34
34
  `};
35
35
  ${({
36
36
  warning
@@ -200,20 +200,11 @@ const StyledDayPicker = _styledComponents.default.div`
200
200
  z-index: 1000;
201
201
  top: calc(100% + 1px);
202
202
  left: 0;
203
- background-color: ${({
204
- theme
205
- }) => theme.colors.white};
206
- box-shadow: ${({
207
- theme
208
- }) => theme.shadows.depth1};
209
- color: ${({
210
- theme
211
- }) => theme.text.color};
203
+ background-color: var(--colorsUtilityYang100);
204
+ box-shadow: var(--boxShadow100);
212
205
  display: block;
213
- font-size: 14px;
214
- font-weight: 800;
215
206
  overflow: hidden;
216
- padding: 24px;
207
+ padding: var(--spacing300);
217
208
  text-align: center;
218
209
  user-select: none;
219
210
  }
@@ -234,9 +225,7 @@ const StyledDayPicker = _styledComponents.default.div`
234
225
  .DayPicker-wrapper {
235
226
  padding: 0;
236
227
  &:focus {
237
- outline: ${({
238
- theme
239
- }) => `3px solid ${theme.colors.focus}`};
228
+ outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
240
229
  }
241
230
  }
242
231
 
@@ -250,8 +239,10 @@ const StyledDayPicker = _styledComponents.default.div`
250
239
  }
251
240
 
252
241
  .DayPicker-Caption {
253
- line-height: 40px;
254
- height: 40px;
242
+ color: var(--colorsActionMajorYin090);
243
+ line-height: var(--sizing500);
244
+ height: var(--sizing500);
245
+ //font: var(--typographyDatePickerCalendarMonthM); to be implemented
255
246
  font-size: 16px;
256
247
  font-weight: 800;
257
248
 
@@ -262,28 +253,25 @@ const StyledDayPicker = _styledComponents.default.div`
262
253
  }
263
254
 
264
255
  .DayPicker-Day {
265
- min-width: 40px;
266
- background-color: ${({
267
- theme
268
- }) => theme.colors.white};
256
+ min-width: var(--sizing500);
257
+ height: 36px; //var(--sizing450); to be implemented
258
+ padding: 0;
259
+ background-color: var(--colorsUtilityYang100);
269
260
  cursor: pointer;
270
261
  border: none;
271
- font-weight: 800;
272
- padding: 10px 0;
262
+ //font-family: var(--fontFamiliesDefault); token value to be updated
263
+ //font: var(--typographyDatePickerCalendarDateM); to be implemented
264
+ font-weight: var(--fontWeights700);
265
+ font-size: var(--fontSizes100);
266
+ line-height: var(--lineHeights500);
273
267
 
274
268
  &:hover {
275
- background-color: ${({
276
- theme
277
- }) => theme.disabled.input};
278
- color: ${({
279
- theme
280
- }) => theme.text.color};
269
+ background-color: var(--colorsActionMinor050);
270
+ color: var(--colorsActionMajorYin090);
281
271
  }
282
272
 
283
273
  &:focus {
284
- outline: ${({
285
- theme
286
- }) => `3px solid ${theme.colors.focus}`};
274
+ outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
287
275
  }
288
276
 
289
277
  + * {
@@ -297,52 +285,30 @@ const StyledDayPicker = _styledComponents.default.div`
297
285
 
298
286
  .DayPicker-Day--today,
299
287
  .DayPicker-Day--today.DayPicker-Day--outside {
300
- font-weight: 800;
301
- color: ${({
302
- theme
303
- }) => theme.text.color};
304
- background-color: ${({
305
- theme
306
- }) => theme.disabled.border};
288
+ color: var(--colorsActionMajorYin090);
289
+ background-color: var(--colorsActionMinor200);
307
290
  }
308
291
 
309
292
  .DayPicker-Day--outside {
310
- color: ${({
311
- theme
312
- }) => theme.disabled.disabled};
313
- background-color: ${({
314
- theme
315
- }) => theme.colors.white};
293
+ color: var(--colorsActionMajorYin055);
294
+ background-color: var(--colorsUtilityYang100);
316
295
  }
317
296
 
318
297
  .DayPicker-Day--disabled,
319
298
  .DayPicker-Day--disabled:hover {
320
- color: ${({
321
- theme
322
- }) => theme.disabled.disabled};
323
- background-color: ${({
324
- theme
325
- }) => theme.colors.white};
299
+ color: var(colorsActionMajorYin030);
300
+ background-color: var(--colorsUtilityYang100);
326
301
  cursor: default;
327
302
  }
328
303
 
329
304
  .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside) {
330
- background-color: ${({
331
- theme
332
- }) => theme.colors.primary};
333
- color: ${({
334
- theme
335
- }) => theme.colors.white};
336
- font-weight: 800;
305
+ background-color: var(--colorsActionMajor500);
306
+ color: var(--colorsUtilityYang100);
337
307
  }
338
308
 
339
309
  .DayPicker-Day--selected.DayPicker-Day--disabled:not(.DayPicker-Day--outside) {
340
- background-color: ${({
341
- theme
342
- }) => theme.colors.primary};
343
- color: ${({
344
- theme
345
- }) => theme.colors.white};
310
+ background-color: var(--colorsActionMajor500);
311
+ color: var(--colorsUtilityYang100);
346
312
  }
347
313
  `;
348
314
  StyledDayPicker.defaultProps = {
@@ -7,30 +7,25 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../../../style/themes/base"));
11
-
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
11
 
14
12
  const StyledButton = _styledComponents.default.button.attrs({
15
13
  type: "button"
16
14
  })`
15
+ justify-content: center;
17
16
  align-items: center;
18
- display: block;
19
- border: none;
17
+ display: flex;
18
+ border: var(--borderWidth200) solid var(--colorsActionMinorTransparent);
20
19
  background: none;
21
20
  box-shadow: none;
22
21
  cursor: pointer;
23
- height: 40px;
24
- width: 40px;
25
- padding: 0;
22
+ height: var(--sizing500);
23
+ width: var(--sizing500);
24
+ padding: var(--spacing150);
25
+ box-sizing: border-box;
26
26
  &:focus {
27
- outline: ${({
28
- theme
29
- }) => `3px solid ${theme.colors.focus}`};
27
+ outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
30
28
  }
31
29
  `;
32
- StyledButton.defaultProps = {
33
- theme: _base.default
34
- };
35
30
  var _default = StyledButton;
36
31
  exports.default = _default;
@@ -7,8 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../../../style/themes/base"));
11
-
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
11
 
14
12
  const StyledNavbar = _styledComponents.default.div`
@@ -17,11 +15,8 @@ const StyledNavbar = _styledComponents.default.div`
17
15
  justify-content: space-between;
18
16
  padding: 0;
19
17
  top: 0;
20
- height: 40px;
18
+ height: var(--sizing500);
21
19
  }
22
20
  `;
23
- StyledNavbar.defaultProps = {
24
- theme: _base.default
25
- };
26
21
  var _default = StyledNavbar;
27
22
  exports.default = _default;
@@ -39,7 +39,12 @@ function isDateValid(date) {
39
39
  return date && date.toString() !== "Invalid Date";
40
40
  }
41
41
 
42
- function hasMatchedFormat(formatString, valueString) {
42
+ function hasMatchedFormat(formatString, valueString, fullFormat, fullValue) {
43
+ if (formatString.includes("d")) {
44
+ return formatString.length === valueString.length && (0, _fp.isMatch)(fullFormat.join("."), fullValue.join(".")) // need to check day value with month value
45
+ ;
46
+ }
47
+
43
48
  return formatString.length === valueString.length && (0, _fp.isMatch)(formatString, valueString);
44
49
  }
45
50
 
@@ -66,7 +71,7 @@ function makeSeparatedValues(arr, str) {
66
71
  }
67
72
 
68
73
  function checkForCompleteMatch(formatArray, valueArray) {
69
- return formatArray.every((formatString, i) => hasMatchedFormat(formatString, valueArray[i]));
74
+ return formatArray.every((formatString, i) => hasMatchedFormat(formatString, valueArray[i], formatArray, valueArray));
70
75
  }
71
76
 
72
77
  function findMatchWithNoSeparators(valueString, formatString) {
@@ -7,27 +7,23 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../../../style/themes/base"));
11
-
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
11
 
14
12
  const StyledWeekday = _styledComponents.default.div`
15
13
  &,
16
14
  &.DayPicker-Weekday {
17
15
  border: none;
18
- min-width: 40px;
16
+ height: var(--sizing500);
17
+ min-width: var(--sizing500);
19
18
  font-weight: 800;
20
- color: ${({
21
- theme
22
- }) => theme.colors.border};
19
+ color: var(--colorsActionMinor400);
23
20
  text-transform: uppercase;
24
21
  font-size: 12px;
22
+ //font: var(--typographyDatePickerCalendarDayM) to be implemented
25
23
  text-align: center;
26
24
  padding: 20px 0 5px;
25
+ box-sizing: border-box;
27
26
  }
28
27
  `;
29
- StyledWeekday.defaultProps = {
30
- theme: _base.default
31
- };
32
28
  var _default = StyledWeekday;
33
29
  exports.default = _default;
@@ -38,7 +38,7 @@ const StyledLink = _styledComponents.default.span`
38
38
  left: -999em;
39
39
  z-index: ${theme.zIndex.aboveAll};
40
40
  box-shadow: inset 0 0 0 2px var(--colorsActionMajor500);
41
- border: 2px solid var(--colorsYang100);
41
+ border: 2px solid var(--colorsUtilityYang100);
42
42
  }
43
43
 
44
44
  a:focus {
@@ -51,7 +51,7 @@ const StyledLink = _styledComponents.default.span`
51
51
  button {
52
52
  font-size: ${isSkipLink ? "16px" : "14px"};
53
53
  text-decoration: underline;
54
- color: ${isSkipLink ? "var(--colorsYin090)" : "var(--colorsActionMajor500)"};
54
+ color: ${isSkipLink ? "var(--colorsUtilityYin090)" : "var(--colorsActionMajor500)"};
55
55
  display: inline-block;
56
56
  ${_icon.default} {
57
57
  display: inline-block;
@@ -68,21 +68,21 @@ const StyledLink = _styledComponents.default.span`
68
68
 
69
69
  &:hover {
70
70
  cursor: pointer;
71
- color: ${isSkipLink ? "var(--colorsYin090)" : "var(--colorsActionMajor600)"};
71
+ color: ${isSkipLink ? "var(--colorsUtilityYin090)" : "var(--colorsActionMajor600)"};
72
72
  }
73
73
 
74
74
  &:focus {
75
- color: var(--colorsYin090);
76
- background-color: ${isSkipLink ? "var(--colorsYang100)" : "var(--colorsSemanticFocus250)"};
75
+ color: var(--colorsActionMajorYin090);
76
+ background-color: ${isSkipLink ? "var(--colorsUtilityYang100)" : "var(--colorsSemanticFocus250)"};
77
77
  outline: none;
78
78
  }
79
79
 
80
80
  ${disabled && (0, _styledComponents.css)`
81
- color: var(--colorsYin065);
81
+ color: var(--colorsActionMajorYin030);
82
82
  &:hover,
83
83
  &:focus {
84
84
  cursor: not-allowed;
85
- color: var(--colorsYin065);
85
+ color: var(--colorsActionMajorYin030);
86
86
  }
87
87
  `}
88
88
  }
@@ -3,9 +3,8 @@ export const StyledPagerSizeOptions: import("styled-components").StyledComponent
3
3
  export const StyledPagerSizeOptionsInner: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export const StyledPagerNavigation: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export const StyledPagerNavInner: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export const StyledPagerLinkStyles: import("styled-components").StyledComponent<"button", any, {
7
- type: "button";
8
- }, "type">;
6
+ export const StyledPagerLinkStyles: import("styled-components").StyledComponent<typeof Link, any, {}, never>;
9
7
  export const StyledPagerNoSelect: import("styled-components").StyledComponent<"span", any, {}, never>;
10
8
  export const StyledPagerSummary: import("styled-components").StyledComponent<"div", any, {}, never>;
11
9
  export const StyledSelectContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
10
+ import Link from "../link";
@@ -13,10 +13,10 @@ var _inputPresentation = _interopRequireDefault(require("../../__internal__/inpu
13
13
 
14
14
  var _inputIconToggle = _interopRequireDefault(require("../../__internal__/input-icon-toggle/input-icon-toggle.style"));
15
15
 
16
- var _base = _interopRequireDefault(require("../../style/themes/base"));
17
-
18
16
  var _selectText = _interopRequireDefault(require("../select/__internal__/select-text/select-text.style"));
19
17
 
18
+ var _link = _interopRequireDefault(require("../link"));
19
+
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
22
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
@@ -39,62 +39,15 @@ const StyledPagerContainer = _styledComponents.default.div`
39
39
  border-top-width: 0;
40
40
  font-size: 13px;
41
41
  border-top: none;
42
+ color: var(--colorsUtilityYin090);
42
43
 
43
44
  ${({
44
- theme,
45
45
  variant
46
- }) => theme.table && theme.colors && (0, _styledComponents.css)`
46
+ }) => (0, _styledComponents.css)`
47
47
  border-width: 1px 1px 1px 1px;
48
48
  border-style: none solid solid solid;
49
- border-color: ${theme.table.secondary};
50
- background-color: ${variant === "alternate" ? theme.pager.alternate : theme.table.zebra};
51
-
52
- .carbon-input-icon {
53
- border: none;
54
- background: none;
55
-
56
- &:hover {
57
- background: none;
58
- color: ${theme.colors.black};
59
- }
60
- }
61
-
62
- .common-input__field:focus-within {
63
- outline: 3px solid ${theme.colors.focus};
64
- }
65
-
66
- .common-input__input {
67
- border: 1px solid ${theme.colors.border};
68
-
69
- &:active,
70
- &:hover,
71
- &:focus {
72
- border: 1px solid ${theme.colors.border};
73
- }
74
-
75
- &:focus {
76
- border: 1px solid ${theme.colors.border};
77
- color: ${theme.colors.black};
78
- }
79
-
80
- &:focus ~ label .carbon-input-icon,
81
- &:focus ~ label .carbon-input-icon:hover {
82
- border: none;
83
- background: none;
84
- color: ${theme.colors.black};
85
- }
86
-
87
- &:hover ~ label .carbon-input-icon {
88
- border: none;
89
- background: none;
90
- color: ${theme.colors.black};
91
- }
92
-
93
- &:hover ~ label .carbon-input-icon:hover {
94
- border: none;
95
- background: none;
96
- }
97
- }
49
+ border-color: var(--colorsUtilityMajor100);
50
+ background-color: ${variant === "alternate" ? "var(--colorsUtilityMajor040)" : "var(--colorsUtilityMajor010)"};
98
51
  `}
99
52
  `;
100
53
  exports.StyledPagerContainer = StyledPagerContainer;
@@ -158,44 +111,10 @@ const StyledPagerNavInner = _styledComponents.default.div`
158
111
  padding: 0 12px;
159
112
  `;
160
113
  exports.StyledPagerNavInner = StyledPagerNavInner;
161
- const StyledPagerLinkStyles = _styledComponents.default.button.attrs({
162
- type: "button"
163
- })`
114
+ const StyledPagerLinkStyles = (0, _styledComponents.default)(_link.default)`
164
115
  padding: 0 10px;
165
- font-size: 13px;
166
- border-width: 0;
167
- background-color: transparent;
168
- cursor: pointer;
169
116
  margin-left: 7px;
170
117
  margin-right: 7px;
171
-
172
- ${({
173
- theme
174
- }) => theme.pager && (0, _styledComponents.css)`
175
- color: ${theme.pager.active};
176
-
177
- ${({
178
- disabled
179
- }) => !disabled && (0, _styledComponents.css)`
180
- &:hover {
181
- text-decoration: underline;
182
- padding: 5px 10px;
183
- }
184
- `}
185
-
186
- &:focus {
187
- outline: solid 3px ${theme.colors.focus};
188
- padding: 5px 10px;
189
- }
190
- `}
191
-
192
- ${({
193
- disabled,
194
- theme
195
- }) => disabled && theme && (0, _styledComponents.css)`
196
- color: ${theme.pager.disabled};
197
- cursor: not-allowed;
198
- `}
199
118
  `;
200
119
  exports.StyledPagerLinkStyles = StyledPagerLinkStyles;
201
120
  const StyledPagerNoSelect = _styledComponents.default.span`
@@ -208,25 +127,4 @@ const StyledPagerSummary = _styledComponents.default.div`
208
127
  flex: 1 1 30%;
209
128
  justify-content: flex-end;
210
129
  `;
211
- exports.StyledPagerSummary = StyledPagerSummary;
212
- StyledPagerContainer.defaultProps = {
213
- theme: _base.default
214
- };
215
- StyledPagerSizeOptions.defaultProps = {
216
- theme: _base.default
217
- };
218
- StyledPagerSizeOptionsInner.defaultProps = {
219
- theme: _base.default
220
- };
221
- StyledPagerNavigation.defaultProps = {
222
- theme: _base.default
223
- };
224
- StyledPagerNavInner.defaultProps = {
225
- theme: _base.default
226
- };
227
- StyledPagerLinkStyles.defaultProps = {
228
- theme: _base.default
229
- };
230
- StyledPagerSummary.defaultProps = {
231
- theme: _base.default
232
- };
130
+ exports.StyledPagerSummary = StyledPagerSummary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.19.0",
3
+ "version": "104.21.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {