carbon-react 146.5.2 → 146.6.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/esm/components/date/__internal__/date-picker/date-picker.component.js +3 -4
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +3 -3
- package/esm/components/tabs/tab/tab.style.js +5 -0
- package/lib/components/date/__internal__/date-picker/date-picker.component.js +3 -4
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +3 -3
- package/lib/components/tabs/tab/tab.style.js +5 -0
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ import StyledDayPicker from "./day-picker.style";
|
|
|
14
14
|
const popoverMiddleware = [offset(3), flip({
|
|
15
15
|
fallbackStrategy: "initialPlacement"
|
|
16
16
|
})];
|
|
17
|
+
const Nav = Navbar;
|
|
17
18
|
export const DatePicker = ({
|
|
18
19
|
inputElement,
|
|
19
20
|
minDate,
|
|
@@ -157,16 +158,14 @@ export const DatePicker = ({
|
|
|
157
158
|
weekdaysShort
|
|
158
159
|
}
|
|
159
160
|
},
|
|
160
|
-
selected:
|
|
161
|
+
selected: selectedDays,
|
|
161
162
|
month: focusedMonth || /* istanbul ignore next */new Date(),
|
|
162
163
|
onDayClick: (d, _, e) => {
|
|
163
164
|
const date = d;
|
|
164
165
|
handleDayClick(date, e);
|
|
165
166
|
},
|
|
166
167
|
components: {
|
|
167
|
-
Nav
|
|
168
|
-
return /*#__PURE__*/React.createElement(Navbar, props);
|
|
169
|
-
},
|
|
168
|
+
Nav,
|
|
170
169
|
Weekday: props => {
|
|
171
170
|
const fixedDays = {
|
|
172
171
|
Sunday: 0,
|
|
@@ -132,7 +132,7 @@ const StyledNavigationButton = styled.button`
|
|
|
132
132
|
`;
|
|
133
133
|
const StyledContainer = styled.div`
|
|
134
134
|
display: flex;
|
|
135
|
-
padding: 6px
|
|
135
|
+
padding: 6px 4px 0px;
|
|
136
136
|
margin: 0;
|
|
137
137
|
overflow-x: hidden;
|
|
138
138
|
${({
|
|
@@ -146,8 +146,8 @@ const StyledBottomBorder = styled.div`
|
|
|
146
146
|
height: auto;
|
|
147
147
|
border-bottom: 2px solid var(--colorsActionMinor100);
|
|
148
148
|
bottom: 0;
|
|
149
|
-
left:
|
|
150
|
-
right:
|
|
149
|
+
left: 4px;
|
|
150
|
+
right: 4px;
|
|
151
151
|
position: absolute;
|
|
152
152
|
`;
|
|
153
153
|
export { StyledTabsHeaderWrapper, StyledTabsHeaderList, StyledVerticalTabsWrapper, StyledWrapper, StyledNavigationButtonWrapper, StyledNavigationButton, StyledContainer, StyledBottomBorder };
|
|
@@ -10,6 +10,11 @@ const StyledTab = styled.div`
|
|
|
10
10
|
}) => isTabSelected && css`
|
|
11
11
|
display: block;
|
|
12
12
|
|
|
13
|
+
${position === "top" && css`
|
|
14
|
+
margin-left: 4px;
|
|
15
|
+
margin-right: 4px;
|
|
16
|
+
`}
|
|
17
|
+
|
|
13
18
|
${position === "left" && css`
|
|
14
19
|
margin-left: -6px;
|
|
15
20
|
margin-top: var(--spacing075);
|
|
@@ -23,6 +23,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
23
23
|
const popoverMiddleware = [(0, _dom.offset)(3), (0, _dom.flip)({
|
|
24
24
|
fallbackStrategy: "initialPlacement"
|
|
25
25
|
})];
|
|
26
|
+
const Nav = _navbar.default;
|
|
26
27
|
const DatePicker = ({
|
|
27
28
|
inputElement,
|
|
28
29
|
minDate,
|
|
@@ -166,16 +167,14 @@ const DatePicker = ({
|
|
|
166
167
|
weekdaysShort
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
|
-
selected:
|
|
170
|
+
selected: selectedDays,
|
|
170
171
|
month: focusedMonth || /* istanbul ignore next */new Date(),
|
|
171
172
|
onDayClick: (d, _, e) => {
|
|
172
173
|
const date = d;
|
|
173
174
|
handleDayClick(date, e);
|
|
174
175
|
},
|
|
175
176
|
components: {
|
|
176
|
-
Nav
|
|
177
|
-
return /*#__PURE__*/_react.default.createElement(_navbar.default, props);
|
|
178
|
-
},
|
|
177
|
+
Nav,
|
|
179
178
|
Weekday: props => {
|
|
180
179
|
const fixedDays = {
|
|
181
180
|
Sunday: 0,
|
|
@@ -141,7 +141,7 @@ const StyledNavigationButton = exports.StyledNavigationButton = _styledComponent
|
|
|
141
141
|
`;
|
|
142
142
|
const StyledContainer = exports.StyledContainer = _styledComponents.default.div`
|
|
143
143
|
display: flex;
|
|
144
|
-
padding: 6px
|
|
144
|
+
padding: 6px 4px 0px;
|
|
145
145
|
margin: 0;
|
|
146
146
|
overflow-x: hidden;
|
|
147
147
|
${({
|
|
@@ -155,7 +155,7 @@ const StyledBottomBorder = exports.StyledBottomBorder = _styledComponents.defaul
|
|
|
155
155
|
height: auto;
|
|
156
156
|
border-bottom: 2px solid var(--colorsActionMinor100);
|
|
157
157
|
bottom: 0;
|
|
158
|
-
left:
|
|
159
|
-
right:
|
|
158
|
+
left: 4px;
|
|
159
|
+
right: 4px;
|
|
160
160
|
position: absolute;
|
|
161
161
|
`;
|
|
@@ -19,6 +19,11 @@ const StyledTab = _styledComponents.default.div`
|
|
|
19
19
|
}) => isTabSelected && (0, _styledComponents.css)`
|
|
20
20
|
display: block;
|
|
21
21
|
|
|
22
|
+
${position === "top" && (0, _styledComponents.css)`
|
|
23
|
+
margin-left: 4px;
|
|
24
|
+
margin-right: 4px;
|
|
25
|
+
`}
|
|
26
|
+
|
|
22
27
|
${position === "left" && (0, _styledComponents.css)`
|
|
23
28
|
margin-left: -6px;
|
|
24
29
|
margin-top: var(--spacing075);
|