orcs-design-system 3.2.24 → 3.2.26

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.
@@ -14,7 +14,7 @@ const crossTransform2 = keyframes(["0%{transform:translate(0,6px);border-radius:
14
14
  const StyledActionsMenuContainer = styled.div.withConfig({
15
15
  displayName: "ActionsMenu__StyledActionsMenuContainer",
16
16
  componentId: "sc-yvbni2-0"
17
- })(["pointer-events:none;opacity:0;&.visible{opacity:1;pointer-events:auto;}"]);
17
+ })(["pointer-events:none;opacity:0;visibility:hidden;&.visible{visibility:visible;opacity:1;pointer-events:auto;}"]);
18
18
  const Wrapper = styled.div.withConfig({
19
19
  displayName: "ActionsMenu__Wrapper",
20
20
  componentId: "sc-yvbni2-1"
@@ -63,7 +63,7 @@ export const ActionsMenuHeading = styled(props => {
63
63
  componentId: "sc-yvbni2-5"
64
64
  })(["color:", ";padding:8px;width:100%;font-size:", ";font-weight:", ";border-bottom:solid 1px ", ";white-space:nowrap;cursor:", ";"], props => themeGet("colors.white")(props), props => themeGet("fontSizes.1")(props), props => themeGet("fontWeights.1")(props), props => themeGet("colors.greyDarkest")(props), props => props.canClick ? "pointer" : "default");
65
65
  export const ActionsMenuItem = styled(props => {
66
- var _actionMenu$getItemPr, _actionMenu$context, _actionMenu$context2;
66
+ var _actionMenu$getItemPr;
67
67
  const {
68
68
  id,
69
69
  onItemClick,
@@ -97,10 +97,6 @@ export const ActionsMenuItem = styled(props => {
97
97
  ...newProps,
98
98
  onClick: onClick,
99
99
  disabled: disabled
100
- // Hide from document when closed - related to HACK
101
- ,
102
- "aria-hidden": !(actionMenu !== null && actionMenu !== void 0 && (_actionMenu$context = actionMenu.context) !== null && _actionMenu$context !== void 0 && _actionMenu$context.open),
103
- tabIndex: !(actionMenu !== null && actionMenu !== void 0 && (_actionMenu$context2 = actionMenu.context) !== null && _actionMenu$context2 !== void 0 && _actionMenu$context2.open) && "-1"
104
100
  });
105
101
  }).attrs({
106
102
  role: "menuitem"
@@ -194,23 +190,21 @@ export const ActionsMenuBody = _ref => {
194
190
  value: value,
195
191
  children: /*#__PURE__*/_jsxs(Wrapper, {
196
192
  ...props,
197
- children: [triggerComponent, /*#__PURE__*/_jsx(FloatingPortal, {
193
+ children: [triggerComponent, toggleState ? /*#__PURE__*/_jsx(FloatingPortal, {
198
194
  root: getFloatingUiRootElement(actionMenu.refs.reference),
199
- children: toggleState ? /*#__PURE__*/_jsx(FloatingFocusManager, {
195
+ children: /*#__PURE__*/_jsx(FloatingFocusManager, {
200
196
  context: actionMenu.context,
201
- modal: false,
202
- guards: false,
197
+ modal: true,
203
198
  children: ActionMenuContent
204
- }) : (
205
- /*
206
- * HACK: Fixing all the broken tests in teamform-app-ui is too time consuming
207
- * right this moment with a lot of the tests asserting against ActionsMenu items.
208
- * Rendering the markup even when closed but in a hidden state ensures that tests pass.
209
- * Ideally, we would update all the tests in teamform-app-ui to open the ActionsMenu
210
- * before assertion.
211
- **/
212
- ActionMenuContent)
213
- })]
199
+ })
200
+ }) : (
201
+ /* * HACK: Fixing all the broken tests in teamform-app-ui is too
202
+ time consuming * right this moment with a lot of the tests asserting
203
+ against ActionsMenu items. * Rendering the markup even when closed
204
+ but in a hidden state ensures that tests pass. * Ideally, we would
205
+ update all the tests in teamform-app-ui to open the ActionsMenu *
206
+ before assertion. **/
207
+ ActionMenuContent)]
214
208
  })
215
209
  });
216
210
  return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
@@ -3,6 +3,7 @@ import PropTypes from "prop-types";
3
3
  import styled, { keyframes, ThemeProvider } from "styled-components";
4
4
  import { space, layout, typography } from "styled-system";
5
5
  import { themeGet } from "@styled-system/theme-get";
6
+ import { pick } from "lodash";
6
7
 
7
8
  /* Animations */
8
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -85,7 +86,7 @@ export default function Checkbox(_ref) {
85
86
  onClick: onClick,
86
87
  children: /*#__PURE__*/_jsx(Check, {})
87
88
  }), /*#__PURE__*/_jsx(Text, {
88
- ...props,
89
+ ...pick(props, typography.propNames),
89
90
  children: label
90
91
  })]
91
92
  })
@@ -24,7 +24,7 @@ const TooltipControl = styled.div.withConfig({
24
24
  const StyledPopover = styled.div.withConfig({
25
25
  displayName: "Popover__StyledPopover",
26
26
  componentId: "sc-1bwoak-1"
27
- })(["font-size:", ";line-height:", ";font-weight:", ";text-align:", ";word-break:break-word;color:", ";outline:0;padding:", ";border-radius:", ";width:", ";background:", ";border:1px solid ", ";box-shadow:", ";user-select:", ";pointer-events:none;opacity:0;&.visible{opacity:1;pointer-events:auto;}& a{font-size:", ";}&:before{content:\"\";z-index:2;height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;border-color:transparent;border-right-color:", ";left:-5px;top:50%;margin-top:-6px;position:absolute;}&:after{content:\"\";z-index:1;position:absolute;border-color:transparent;border-right-color:", ";height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;left:-6px;top:50%;margin-top:-6px;}&.top{&:before{left:50%;top:auto;margin-top:0;bottom:-8px;margin-left:-3px;transform:rotate(-90deg);}&:after{left:50%;top:auto;margin-top:0;bottom:-9px;margin-left:-3px;transform:rotate(-90deg);}}&.topRight,&.top-end{&:before{left:1px;top:auto;margin-top:0;bottom:-4px;margin-left:-5px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}&:after{left:1px;top:auto;margin-top:0;bottom:-5px;margin-left:-6px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}}&.bottomRight,&.bottom-end{&:before{left:1px;bottom:auto;margin-top:0;top:-4px;margin-left:-5px;transform:rotate(45deg);border-width:5px 10px 5px 0;}&:after{left:1px;bottom:auto;margin-top:0;top:-5px;margin-left:-6px;transform:rotate(45deg);border-width:5px 10px 5px 0;}}&.bottom{&:before{left:50%;top:-8px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}&:after{left:50%;top:-9px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}}&.bottomLeft,&.bottom-start{&:before{right:1px;left:auto;bottom:auto;margin-top:0;top:-4px;margin-right:-5px;transform:rotate(135deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;bottom:auto;margin-top:0;top:-5px;margin-right:-6px;transform:rotate(135deg);border-width:5px 10px 5px 0;}}&.left{&:before{left:auto;right:-5px;transform:rotate(180deg);}&:after{left:auto;right:-6px;transform:rotate(180deg);top:50%;margin-top:-6px;}}&.topLeft,&.top-start{&:before{right:1px;left:auto;top:auto;margin-top:0;bottom:-4px;margin-right:-5px;transform:rotate(225deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;top:auto;margin-top:0;bottom:-5px;margin-right:-6px;transform:rotate(225deg);border-width:5px 10px 5px 0;}}"], themeGet("fontSizes.0"), themeGet("fontSizes.1"), themeGet("fontWeights.1"), props => props.textAlign ? props.textAlign : "left", themeGet("colors.greyDarkest"), themeGet("space.3"), themeGet("radii.1"), props => props.width ? props.width : "200px", themeGet("colors.white"), themeGet("colors.greyLight"), themeGet("shadows.boxDefault"), props => props.enableSelectAll ? "all" : "auto", themeGet("fontSizes.0"), themeGet("colors.white"), themeGet("colors.grey"));
27
+ })(["font-size:", ";line-height:", ";font-weight:", ";text-align:", ";word-break:break-word;color:", ";outline:0;padding:", ";border-radius:", ";width:", ";background:", ";border:1px solid ", ";box-shadow:", ";user-select:", ";pointer-events:none;opacity:0;visibility:hidden;&.visible{opacity:1;pointer-events:auto;visibility:visible;}& a{font-size:", ";}&:before{content:\"\";z-index:2;height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;border-color:transparent;border-right-color:", ";left:-5px;top:50%;margin-top:-6px;position:absolute;}&:after{content:\"\";z-index:1;position:absolute;border-color:transparent;border-right-color:", ";height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;left:-6px;top:50%;margin-top:-6px;}&.top{&:before{left:50%;top:auto;margin-top:0;bottom:-8px;margin-left:-3px;transform:rotate(-90deg);}&:after{left:50%;top:auto;margin-top:0;bottom:-9px;margin-left:-3px;transform:rotate(-90deg);}}&.topRight,&.top-end{&:before{left:1px;top:auto;margin-top:0;bottom:-4px;margin-left:-5px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}&:after{left:1px;top:auto;margin-top:0;bottom:-5px;margin-left:-6px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}}&.bottomRight,&.bottom-end{&:before{left:1px;bottom:auto;margin-top:0;top:-4px;margin-left:-5px;transform:rotate(45deg);border-width:5px 10px 5px 0;}&:after{left:1px;bottom:auto;margin-top:0;top:-5px;margin-left:-6px;transform:rotate(45deg);border-width:5px 10px 5px 0;}}&.bottom{&:before{left:50%;top:-8px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}&:after{left:50%;top:-9px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}}&.bottomLeft,&.bottom-start{&:before{right:1px;left:auto;bottom:auto;margin-top:0;top:-4px;margin-right:-5px;transform:rotate(135deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;bottom:auto;margin-top:0;top:-5px;margin-right:-6px;transform:rotate(135deg);border-width:5px 10px 5px 0;}}&.left{&:before{left:auto;right:-5px;transform:rotate(180deg);}&:after{left:auto;right:-6px;transform:rotate(180deg);top:50%;margin-top:-6px;}}&.topLeft,&.top-start{&:before{right:1px;left:auto;top:auto;margin-top:0;bottom:-4px;margin-right:-5px;transform:rotate(225deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;top:auto;margin-top:0;bottom:-5px;margin-right:-6px;transform:rotate(225deg);border-width:5px 10px 5px 0;}}"], themeGet("fontSizes.0"), themeGet("fontSizes.1"), themeGet("fontWeights.1"), props => props.textAlign ? props.textAlign : "left", themeGet("colors.greyDarkest"), themeGet("space.3"), themeGet("radii.1"), props => props.width ? props.width : "200px", themeGet("colors.white"), themeGet("colors.greyLight"), themeGet("shadows.boxDefault"), props => props.enableSelectAll ? "all" : "auto", themeGet("fontSizes.0"), themeGet("colors.white"), themeGet("colors.grey"));
28
28
  export default function Popover(_ref) {
29
29
  var _children$type, _context$refs2;
30
30
  let {
@@ -79,8 +79,7 @@ export default function Popover(_ref) {
79
79
  } = useInteractions([hover, focus, dismiss, role]);
80
80
  const triggerProps = {
81
81
  ...getReferenceProps({
82
- ref: refs.setReference,
83
- "aria-describedby": context.floatingId
82
+ ref: refs.setReference
84
83
  })
85
84
  };
86
85
  let triggerComponent = null;
@@ -135,28 +134,28 @@ export default function Popover(_ref) {
135
134
  },
136
135
  ...getFloatingProps(),
137
136
  ariaLabel: ariaLabel,
138
- "aria-hidden": visible ? "false" : "true",
139
137
  children: text
140
138
  });
141
139
  return /*#__PURE__*/_jsxs(Box, {
142
140
  ...props,
143
- children: [triggerComponent, /*#__PURE__*/_jsx(FloatingPortal, {
141
+ "aria-describedby": context.floatingId,
142
+ children: [text && (visible ? /*#__PURE__*/_jsx(FloatingPortal, {
144
143
  root: getFloatingUiRootElement(context.refs.reference),
145
144
  preserveTabOrder: true,
146
- children: text && (visible ? /*#__PURE__*/_jsx(FloatingFocusManager, {
145
+ children: /*#__PURE__*/_jsx(FloatingFocusManager, {
147
146
  initialFocus: (_context$refs2 = context.refs) === null || _context$refs2 === void 0 ? void 0 : _context$refs2.reference,
148
147
  context: context,
149
148
  modal: false,
150
149
  children: Popover
151
- }) : Popover
152
- /*
153
- * HACK: Fixing all the broken tests in teamform-app-ui is too time consuming
154
- * right this moment with a lot of the tests asserting against Popover items.
155
- * Rendering the markup even when closed but in a hidden state ensures that tests pass.
156
- * Ideally, we would update all the tests in teamform-app-ui to open the Popover
157
- * before assertion.
158
- **/)
159
- })]
150
+ })
151
+ }) : Popover
152
+ /*
153
+ * HACK: Fixing all the broken tests in teamform-app-ui is too time consuming
154
+ * right this moment with a lot of the tests asserting against Popover items.
155
+ * Rendering the markup even when closed but in a hidden state ensures that tests pass.
156
+ * Ideally, we would update all the tests in teamform-app-ui to open the Popover
157
+ * before assertion.
158
+ **/), triggerComponent]
160
159
  });
161
160
  }
162
161
  Popover.propTypes = {
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import PropTypes from "prop-types";
3
+ import { pick } from "lodash";
3
4
  import styled, { ThemeProvider } from "styled-components";
4
5
  import { space, layout, compose, variant, typography } from "styled-system";
5
6
  import { css } from "@styled-system/css";
@@ -187,7 +188,7 @@ export default function RadioButton(_ref) {
187
188
  variant: variant
188
189
  })
189
190
  }), /*#__PURE__*/_jsx(RadioButtonText, {
190
- ...props,
191
+ ...pick(props, typography.propNames),
191
192
  children: label
192
193
  })]
193
194
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.2.24",
3
+ "version": "3.2.26",
4
4
  "engines": {
5
5
  "node": "20.12.2"
6
6
  },