carbon-react 104.28.0 → 104.29.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.
@@ -7,10 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../style/themes/base"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
15
11
 
16
12
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -20,24 +16,20 @@ const FormButtonAnimation = (0, _styledComponents.keyframes)`
20
16
  100% { transform: translateY(0px); }
21
17
  `;
22
18
  const StyledStickyFooter = _styledComponents.default.div`
19
+ padding: var(--spacing200) var(--spacing400);
20
+ box-sizing: border-box;
21
+ width: 100%;
23
22
  ${({
24
- sticky,
25
- theme
26
- }) => (0, _styledComponents.css)`
27
- ${sticky && (0, _styledComponents.css)`
23
+ sticky
24
+ }) => sticky && (0, _styledComponents.css)`
28
25
  animation: ${FormButtonAnimation} 0.25s ease;
29
26
  position: sticky;
30
- width: 100%;
31
27
  bottom: 0;
32
28
  left: 0;
33
- background-color: ${theme.colors.white};
34
- box-shadow: 0 -4px 12px rgba(153, 173, 182, 0.05);
29
+ background-color: var(--colorsComponentsNavigationYang100);
30
+ box-shadow: var(--boxShadow150);
35
31
  z-index: 1000;
36
32
  `}
37
- `}
38
33
  `;
39
- StyledStickyFooter.defaultProps = {
40
- theme: _base.default
41
- };
42
34
  var _default = StyledStickyFooter;
43
35
  exports.default = _default;
@@ -7,8 +7,6 @@ exports.StyledButton = exports.StyledSidebarTitle = exports.StyledDrawerSidebar
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
- var _base = _interopRequireDefault(require("../../style/themes/base"));
11
-
12
10
  var _tabs = _interopRequireDefault(require("../tabs/tabs.style"));
13
11
 
14
12
  var _box = _interopRequireDefault(require("../box"));
@@ -21,6 +19,7 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
21
19
 
22
20
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
21
 
22
+ const defaultExpandedWidth = "var(--sizing500)";
24
23
  const StyledSidebarHeader = _styledComponents.default.div`
25
24
  ${({
26
25
  isExpanded
@@ -29,14 +28,14 @@ const StyledSidebarHeader = _styledComponents.default.div`
29
28
  top: 0;
30
29
 
31
30
  ${isExpanded && (0, _styledComponents.css)`
32
- border-bottom: 1px solid #ccd6db;
31
+ border-bottom: var(--sizing010) solid #ccd6db;
33
32
  `}
34
33
  `}
35
34
  `;
36
35
  exports.StyledSidebarHeader = StyledSidebarHeader;
37
36
  const StyledSidebarTitle = _styledComponents.default.div`
38
37
  white-space: nowrap;
39
- padding: 24px 36px 24px 40px;
38
+ padding: var(--spacing300) var(--spacing500);
40
39
  `;
41
40
  exports.StyledSidebarTitle = StyledSidebarTitle;
42
41
  const StyledDrawerChildren = _styledComponents.default.div`
@@ -90,9 +89,9 @@ const sidebarHidden = () => (0, _styledComponents.keyframes)`
90
89
 
91
90
  const drawerOpen = expandedWidth => (0, _styledComponents.keyframes)`
92
91
  0% {
93
- width: 40px;
92
+ width: ${defaultExpandedWidth};
94
93
  overflow: hidden;
95
- min-width: 40px;
94
+ min-width: ${defaultExpandedWidth};
96
95
  }
97
96
  100% {
98
97
  width: ${expandedWidth};
@@ -102,7 +101,7 @@ const drawerOpen = expandedWidth => (0, _styledComponents.keyframes)`
102
101
 
103
102
  const drawerClose = expandedWidth => (0, _styledComponents.keyframes)`
104
103
  0% {width: ${expandedWidth};}
105
- 100% {width: 40px;}
104
+ 100% {width: ${defaultExpandedWidth};}
106
105
  `;
107
106
 
108
107
  const buttonOpen = () => (0, _styledComponents.keyframes)`
@@ -119,19 +118,19 @@ const buttonClose = () => (0, _styledComponents.keyframes)`
119
118
  const StyledDrawerContent = _styledComponents.default.div`
120
119
  display: flex;
121
120
  flex-direction: column;
122
- min-width: 40px;
123
- width: 40px;
121
+ min-width: ${defaultExpandedWidth};
122
+ width: ${defaultExpandedWidth};
124
123
  min-height: 40px;
125
124
  height: auto;
126
125
  position: relative;
127
126
  overflow: auto;
128
- border-right: 1px solid ${({
129
- theme
130
- }) => theme.drawer.divider};
131
- background-color: ${({
132
- backgroundColor,
133
- theme
134
- }) => backgroundColor || theme.drawer.background}};
127
+
128
+ ${({
129
+ backgroundColor
130
+ }) => (0, _styledComponents.css)`
131
+ background-color: ${backgroundColor || "var(--colorsUtilityMajor040)"};
132
+ border-right: 1px solid ${backgroundColor || "var(--colorsUtilityMajor075)"};
133
+ `};
135
134
 
136
135
  &.open {
137
136
  min-width: 52px;
@@ -150,11 +149,13 @@ const StyledDrawerContent = _styledComponents.default.div`
150
149
  animationDuration,
151
150
  expandedWidth
152
151
  }) => (0, _styledComponents.css)`
153
- ${drawerOpen(expandedWidth)} ${animationDuration}
154
- `} ease-in-out;
152
+ ${drawerOpen(expandedWidth)} ${animationDuration}
153
+ `}
154
+ ease-in-out;
155
155
 
156
156
  ${StyledDrawerSidebar}, ${StyledSidebarTitle} {
157
- animation: ${sidebarVisible} ${({
157
+ animation: ${sidebarVisible}
158
+ ${({
158
159
  animationDuration
159
160
  }) => animationDuration} ease-in-out;
160
161
  }
@@ -173,11 +174,13 @@ const StyledDrawerContent = _styledComponents.default.div`
173
174
  animationDuration,
174
175
  expandedWidth
175
176
  }) => (0, _styledComponents.css)`
176
- ${drawerClose(expandedWidth)} ${animationDuration}
177
- `} ease-in-out;
177
+ ${drawerClose(expandedWidth)} ${animationDuration}
178
+ `}
179
+ ease-in-out;
178
180
 
179
181
  ${StyledDrawerSidebar}, ${StyledSidebarTitle}, ${_stickyFooter.default} {
180
- animation: ${sidebarHidden} ${({
182
+ animation: ${sidebarHidden}
183
+ ${({
181
184
  animationDuration
182
185
  }) => animationDuration} ease-in-out;
183
186
  }
@@ -189,15 +192,17 @@ const StyledButton = _styledComponents.default.button.attrs({
189
192
  })`
190
193
  ${({
191
194
  animationDuration,
192
- isExpanded,
193
- theme
195
+ isExpanded
194
196
  }) => (0, _styledComponents.css)`
195
197
  position: absolute;
196
- top: 24px;
198
+ top: var(--spacing300);
197
199
  right: 8px;
198
- padding: 0;
199
- width: 24px;
200
- height: 24px;
200
+ padding: var(--spacing100);
201
+ width: var(--spacing300);
202
+ height: var(--spacing300);
203
+ display: flex;
204
+ justify-content: center;
205
+ align-items: center;
201
206
  transition: margin-right ${animationDuration} ease-in-out;
202
207
  background-color: transparent;
203
208
  border: none;
@@ -205,7 +210,7 @@ const StyledButton = _styledComponents.default.button.attrs({
205
210
  animation: ${buttonClose} ${animationDuration} ease-in-out;
206
211
 
207
212
  &:focus {
208
- outline: 3px solid ${theme.colors.focus};
213
+ outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
209
214
  }
210
215
 
211
216
  &:hover {
@@ -225,10 +230,4 @@ const StyledDrawerWrapper = _styledComponents.default.div`
225
230
  height
226
231
  }) => height};
227
232
  `;
228
- exports.StyledDrawerWrapper = StyledDrawerWrapper;
229
- StyledDrawerContent.defaultProps = {
230
- theme: _base.default
231
- };
232
- StyledButton.defaultProps = {
233
- theme: _base.default
234
- };
233
+ exports.StyledDrawerWrapper = StyledDrawerWrapper;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.28.0",
3
+ "version": "104.29.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {