orcs-design-system 3.3.35 → 3.3.37
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.
|
@@ -363,28 +363,41 @@ const HeaderAvatarShape = styled("div").withConfig({
|
|
|
363
363
|
const HeaderAvatarAction = styled("button").withConfig({
|
|
364
364
|
displayName: "Avatar__HeaderAvatarAction",
|
|
365
365
|
componentId: "sc-1wtet2j-11"
|
|
366
|
-
})(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
366
|
+
})(_ref6 => {
|
|
367
|
+
let {
|
|
368
|
+
$shape
|
|
369
|
+
} = _ref6;
|
|
370
|
+
return {
|
|
371
|
+
cursor: "pointer",
|
|
372
|
+
padding: "0",
|
|
373
|
+
background: "none",
|
|
374
|
+
border: "none",
|
|
375
|
+
outline: "none",
|
|
376
|
+
appearance: "none",
|
|
377
|
+
position: "relative",
|
|
378
|
+
zIndex: "5",
|
|
379
|
+
borderRadius: $shape === "circle" || !$shape ? "50%" : "6px",
|
|
380
|
+
...($shape === "hexagon" && {
|
|
381
|
+
clipPath: "polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%)"
|
|
382
|
+
}),
|
|
383
|
+
...($shape === "tag" && {
|
|
384
|
+
clipPath: "polygon(6% 0, 95% 0, 95% 65%, 50% 100%, 6% 65%)"
|
|
385
|
+
}),
|
|
386
|
+
"&:hover, &:focus": {
|
|
387
|
+
"& > .icon-container": {
|
|
388
|
+
opacity: "1"
|
|
389
|
+
}
|
|
377
390
|
}
|
|
378
|
-
}
|
|
379
|
-
})
|
|
391
|
+
};
|
|
392
|
+
});
|
|
380
393
|
const IconContainer = styled("div").withConfig({
|
|
381
394
|
displayName: "Avatar__IconContainer",
|
|
382
395
|
componentId: "sc-1wtet2j-12"
|
|
383
|
-
})(
|
|
396
|
+
})(_ref7 => {
|
|
384
397
|
let {
|
|
385
398
|
$shape,
|
|
386
399
|
$sizing
|
|
387
|
-
} =
|
|
400
|
+
} = _ref7;
|
|
388
401
|
return {
|
|
389
402
|
opacity: "0",
|
|
390
403
|
transition: "opacity 0.2s ease-in-out",
|
|
@@ -392,7 +405,7 @@ const IconContainer = styled("div").withConfig({
|
|
|
392
405
|
top: $sizing === "large" ? "6px" : "4px",
|
|
393
406
|
left: $sizing === "large" ? "6px" : "4px",
|
|
394
407
|
width: $sizing === "large" ? "calc(100% - 12px)" : "calc(100% - 8px)",
|
|
395
|
-
height: $sizing === "large" ? "calc(100% -
|
|
408
|
+
height: $sizing === "large" ? "calc(100% - 17px)" : "calc(100% - 12px)",
|
|
396
409
|
display: "flex",
|
|
397
410
|
alignItems: "center",
|
|
398
411
|
justifyContent: "center",
|
|
@@ -407,7 +420,7 @@ const IconContainer = styled("div").withConfig({
|
|
|
407
420
|
})
|
|
408
421
|
};
|
|
409
422
|
});
|
|
410
|
-
const Avatar =
|
|
423
|
+
const Avatar = _ref8 => {
|
|
411
424
|
let {
|
|
412
425
|
sizing,
|
|
413
426
|
image,
|
|
@@ -426,7 +439,7 @@ const Avatar = _ref7 => {
|
|
|
426
439
|
headerAvatar = false,
|
|
427
440
|
onClick,
|
|
428
441
|
...props
|
|
429
|
-
} =
|
|
442
|
+
} = _ref8;
|
|
430
443
|
const hasTitle = !!title;
|
|
431
444
|
const hasSubtitle = !!subtitle;
|
|
432
445
|
const hasSubtitleContent = !!subtitleContent;
|
|
@@ -485,9 +498,12 @@ const Avatar = _ref7 => {
|
|
|
485
498
|
$shape: shape,
|
|
486
499
|
text: shape === "circle" ? "Upload profile picture" : "Change image",
|
|
487
500
|
headerAvatarSizing: sizing,
|
|
501
|
+
tabIndex: "-1",
|
|
488
502
|
children: /*#__PURE__*/_jsxs(HeaderAvatarAction, {
|
|
489
503
|
onClick: onClick,
|
|
490
504
|
"aria-label": "Edit avatar",
|
|
505
|
+
$shape: shape,
|
|
506
|
+
$sizing: sizing,
|
|
491
507
|
children: [/*#__PURE__*/_jsx(IconContainer, {
|
|
492
508
|
$shape: shape,
|
|
493
509
|
$sizing: sizing,
|
|
@@ -89,29 +89,29 @@ export const PanelBarDivider = styled.div.withConfig({
|
|
|
89
89
|
export const IconButton = styled.button.withConfig({
|
|
90
90
|
displayName: "FloatingPanelsstyles__IconButton",
|
|
91
91
|
componentId: "sc-1by914f-8"
|
|
92
|
-
})(["font-family:", ";appearance:none;background-color:", ";border:none;width:36px;cursor:pointer;height:36px;display:flex;border-radius:", ";align-items:center;justify-content:center;transition:", ";&:hover{background-color:", ";}"], themeGet("fonts.main"),
|
|
92
|
+
})(["font-family:", ";appearance:none;background-color:", ";border:none;width:36px;cursor:pointer;height:36px;display:flex;border-radius:", ";align-items:center;justify-content:center;transition:", ";&:hover{background-color:", ";}"], themeGet("fonts.main"), _ref0 => {
|
|
93
93
|
let {
|
|
94
94
|
isExpanded,
|
|
95
95
|
forceHighlight
|
|
96
|
-
} =
|
|
96
|
+
} = _ref0;
|
|
97
97
|
return isExpanded || forceHighlight ? themeGet("colors.primaryLightest") : themeGet("colors.white");
|
|
98
98
|
}, themeGet("radii.2"), themeGet("transition.transitionDefault"), themeGet("colors.primaryLightest"));
|
|
99
99
|
export const PanelContent = styled.div.withConfig({
|
|
100
100
|
displayName: "FloatingPanelsstyles__PanelContent",
|
|
101
101
|
componentId: "sc-1by914f-9"
|
|
102
|
-
})(["padding:8px;width:inerhit;display:", ";height:", ";opacity:", ";"],
|
|
102
|
+
})(["padding:8px;width:inerhit;display:", ";height:", ";opacity:", ";"], _ref1 => {
|
|
103
103
|
let {
|
|
104
104
|
isExpanded
|
|
105
|
-
} =
|
|
105
|
+
} = _ref1;
|
|
106
106
|
return isExpanded ? "block" : "none";
|
|
107
|
-
},
|
|
107
|
+
}, _ref10 => {
|
|
108
108
|
let {
|
|
109
109
|
isExpanded
|
|
110
|
-
} =
|
|
110
|
+
} = _ref10;
|
|
111
111
|
return isExpanded ? "100%" : "0";
|
|
112
|
-
},
|
|
112
|
+
}, _ref11 => {
|
|
113
113
|
let {
|
|
114
114
|
isExpanded
|
|
115
|
-
} =
|
|
115
|
+
} = _ref11;
|
|
116
116
|
return isExpanded ? "1" : "0";
|
|
117
117
|
});
|
|
@@ -149,8 +149,8 @@ export default function Popover(_ref) {
|
|
|
149
149
|
...getReferenceProps({
|
|
150
150
|
ref: refs.setReference
|
|
151
151
|
}),
|
|
152
|
-
tabIndex: "0"
|
|
153
|
-
}), [getReferenceProps, refs.setReference]);
|
|
152
|
+
tabIndex: props.tabIndex !== undefined ? props.tabIndex : "0"
|
|
153
|
+
}), [getReferenceProps, refs.setReference, props.tabIndex]);
|
|
154
154
|
const directionClass = useMemo(() => context.placement === DIRECTIONS_MAP[direction] ? direction : context.placement, [context.placement, direction]);
|
|
155
155
|
const style = useMemo(() => {
|
|
156
156
|
const baseStyle = {
|
|
@@ -256,7 +256,7 @@ Popover.propTypes = {
|
|
|
256
256
|
/** Provide an aria-label if text is not a string */
|
|
257
257
|
ariaLabel: PropTypes.string,
|
|
258
258
|
/** Provide a tab index for accessibilty, defaults to 0 */
|
|
259
|
-
tabIndex: PropTypes.number,
|
|
259
|
+
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
260
260
|
className: PropTypes.string,
|
|
261
261
|
/** Render tooltip with focus control when there is link inside, defaults to true */
|
|
262
262
|
withFocusControl: PropTypes.bool,
|
|
@@ -379,7 +379,12 @@ Popover.__docgenInfo = {
|
|
|
379
379
|
"tabIndex": {
|
|
380
380
|
"description": "Provide a tab index for accessibilty, defaults to 0",
|
|
381
381
|
"type": {
|
|
382
|
-
"name": "
|
|
382
|
+
"name": "union",
|
|
383
|
+
"value": [{
|
|
384
|
+
"name": "number"
|
|
385
|
+
}, {
|
|
386
|
+
"name": "string"
|
|
387
|
+
}]
|
|
383
388
|
},
|
|
384
389
|
"required": false
|
|
385
390
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orcs-design-system",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.37",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "20.12.2"
|
|
6
6
|
},
|
|
@@ -172,7 +172,8 @@
|
|
|
172
172
|
},
|
|
173
173
|
"@rollup/plugin-replace": {
|
|
174
174
|
"rollup": ">=3.29.5"
|
|
175
|
-
}
|
|
175
|
+
},
|
|
176
|
+
"webpack-dev-server": "5.2.2"
|
|
176
177
|
},
|
|
177
178
|
"browserslist": [
|
|
178
179
|
">0.2%",
|