@pingux/astro 2.241.0 → 2.242.1-alpha.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.
@@ -143,10 +143,14 @@ const CodeView = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
143
143
  ref: ref,
144
144
  mode: "rightText",
145
145
  textToCopy: textToCopy || children,
146
- iconButtonProps: {
147
- ...iconButtonProps,
148
- variant
149
- }
146
+ iconProps: {
147
+ sx: {
148
+ '&& path': {
149
+ fill: variant === 'light' ? 'black' : 'white'
150
+ }
151
+ }
152
+ },
153
+ iconButtonProps: iconButtonProps
150
154
  })), content);
151
155
  }
152
156
  if (hasNoCopyButton) {
@@ -14,22 +14,17 @@ var _IconButton = _interopRequireDefault(require("../IconButton"));
14
14
  var _react2 = require("@emotion/react");
15
15
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
16
  const CopyButton = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
17
- /* istanbul ignore next */
18
17
  const {
19
18
  iconProps,
20
- variant = 'default',
21
19
  ...others
22
20
  } = props;
23
21
  const {
24
- copyButtonSize,
25
- themeState
22
+ copyButtonSize
26
23
  } = (0, _hooks.useGetTheme)();
27
- /* istanbul ignore next */
28
- const themeVariant = themeState.isOnyx ? `copyButton.${variant}` : 'copyButton';
29
24
  return (0, _react2.jsx)(_IconButton.default, (0, _extends2.default)({
30
25
  ref: ref,
31
26
  "aria-label": "copy to clipboard",
32
- variant: themeVariant
27
+ variant: "copyButton"
33
28
  }, others), (0, _react2.jsx)(_Icon.default, (0, _extends2.default)({
34
29
  icon: _ContentCopyIcon.default,
35
30
  size: copyButtonSize,
@@ -33,6 +33,7 @@ const CopyText = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
33
33
  tooltipProps,
34
34
  wrapperProps,
35
35
  iconButtonProps,
36
+ iconProps,
36
37
  ...others
37
38
  } = props;
38
39
  const value = textToCopy || (mode === 'link' ? children?.props?.href : children.props?.children);
@@ -113,7 +114,9 @@ const CopyText = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
113
114
  role: "presentation"
114
115
  }), content, (0, _react2.jsx)(_CopyButton.default, (0, _extends2.default)({
115
116
  onPress: copyToClipboard
116
- }, focusProps, iconButtonProps))));
117
+ }, focusProps, {
118
+ iconProps: iconProps
119
+ }, iconButtonProps))));
117
120
  }
118
121
  if (mode === 'link') {
119
122
  return (0, _react2.jsx)(_index.Box, (0, _extends2.default)({
@@ -126,7 +129,9 @@ const CopyText = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
126
129
  tooltip: tooltip
127
130
  }, tooltipProps), (0, _react2.jsx)(_CopyButton.default, (0, _extends2.default)({
128
131
  onPress: copyToClipboard
129
- }, (0, _reactAria.mergeProps)(hoverProps, focusProps, iconButtonProps)))));
132
+ }, (0, _reactAria.mergeProps)(hoverProps, focusProps, iconButtonProps), {
133
+ iconProps: iconProps
134
+ }))));
130
135
  }
131
136
  return (0, _react2.jsx)(TooltipWrapper, (0, _extends2.default)({
132
137
  isOpen: isTooltipOpen,
@@ -148,7 +153,9 @@ const CopyText = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
148
153
  gap: "sm"
149
154
  }), mode !== 'rightText' && content, (0, _react2.jsx)(_CopyButton.default, (0, _extends2.default)({
150
155
  onPress: copyToClipboard
151
- }, focusProps, iconButtonProps)), mode === 'rightText' && content)));
156
+ }, focusProps, {
157
+ iconProps: iconProps
158
+ }, iconButtonProps)), mode === 'rightText' && content)));
152
159
  });
153
160
  CopyText.defaultProps = {
154
161
  mode: 'text',
@@ -1,21 +1,9 @@
1
1
  export declare const copyButton: {
2
+ mx: string;
2
3
  path: {
3
4
  fill: string;
4
5
  };
5
- default: {
6
- mx: string;
7
- path: {
8
- fill: string;
9
- };
10
- border: string;
11
- };
12
- light: {
13
- mx: string;
14
- path: {
15
- fill: string;
16
- };
17
- border: string;
18
- };
6
+ border: string;
19
7
  };
20
8
  declare const _default: {
21
9
  default: {
@@ -133,23 +121,11 @@ declare const _default: {
133
121
  lineHeight: string;
134
122
  };
135
123
  copyButton: {
124
+ mx: string;
136
125
  path: {
137
126
  fill: string;
138
127
  };
139
- default: {
140
- mx: string;
141
- path: {
142
- fill: string;
143
- };
144
- border: string;
145
- };
146
- light: {
147
- mx: string;
148
- path: {
149
- fill: string;
150
- };
151
- border: string;
152
- };
128
+ border: string;
153
129
  };
154
130
  };
155
131
  light: {
@@ -267,23 +243,11 @@ declare const _default: {
267
243
  backgroundColor: string;
268
244
  };
269
245
  copyButton: {
246
+ mx: string;
270
247
  path: {
271
248
  fill: string;
272
249
  };
273
- default: {
274
- mx: string;
275
- path: {
276
- fill: string;
277
- };
278
- border: string;
279
- };
280
- light: {
281
- mx: string;
282
- path: {
283
- fill: string;
284
- };
285
- border: string;
286
- };
250
+ border: string;
287
251
  };
288
252
  };
289
253
  };
@@ -137,23 +137,11 @@ const lineNo = {
137
137
  backgroundColor: 'transparent'
138
138
  };
139
139
  const copyButton = exports.copyButton = {
140
+ mx: 'sm',
140
141
  path: {
141
142
  fill: 'text.primary'
142
143
  },
143
- default: {
144
- mx: 'sm',
145
- path: {
146
- fill: 'white'
147
- },
148
- border: 'none !important'
149
- },
150
- light: {
151
- mx: 'sm',
152
- path: {
153
- fill: 'black'
154
- },
155
- border: 'none !important'
156
- }
144
+ border: 'none !important'
157
145
  };
158
146
  const codeView = {
159
147
  theme: nextGenCodeViewTheme,
@@ -1476,23 +1476,11 @@ declare const _default: {
1476
1476
  alignSelf: string;
1477
1477
  };
1478
1478
  copyButton: {
1479
+ mx: string;
1479
1480
  path: {
1480
1481
  fill: string;
1481
1482
  };
1482
- default: {
1483
- mx: string;
1484
- path: {
1485
- fill: string;
1486
- };
1487
- border: string;
1488
- };
1489
- light: {
1490
- mx: string;
1491
- path: {
1492
- fill: string;
1493
- };
1494
- border: string;
1495
- };
1483
+ border: string;
1496
1484
  };
1497
1485
  deleteAttachment: {
1498
1486
  backgroundColor: string;
@@ -5761,23 +5749,11 @@ declare const _default: {
5761
5749
  lineHeight: string;
5762
5750
  };
5763
5751
  copyButton: {
5752
+ mx: string;
5764
5753
  path: {
5765
5754
  fill: string;
5766
5755
  };
5767
- default: {
5768
- mx: string;
5769
- path: {
5770
- fill: string;
5771
- };
5772
- border: string;
5773
- };
5774
- light: {
5775
- mx: string;
5776
- path: {
5777
- fill: string;
5778
- };
5779
- border: string;
5780
- };
5756
+ border: string;
5781
5757
  };
5782
5758
  };
5783
5759
  light: {
@@ -5895,23 +5871,11 @@ declare const _default: {
5895
5871
  backgroundColor: string;
5896
5872
  };
5897
5873
  copyButton: {
5874
+ mx: string;
5898
5875
  path: {
5899
5876
  fill: string;
5900
5877
  };
5901
- default: {
5902
- mx: string;
5903
- path: {
5904
- fill: string;
5905
- };
5906
- border: string;
5907
- };
5908
- light: {
5909
- mx: string;
5910
- path: {
5911
- fill: string;
5912
- };
5913
- border: string;
5914
- };
5878
+ border: string;
5915
5879
  };
5916
5880
  };
5917
5881
  };
@@ -7795,23 +7759,11 @@ declare const _default: {
7795
7759
  lineHeight: string;
7796
7760
  };
7797
7761
  copyButton: {
7762
+ mx: string;
7798
7763
  path: {
7799
7764
  fill: string;
7800
7765
  };
7801
- default: {
7802
- mx: string;
7803
- path: {
7804
- fill: string;
7805
- };
7806
- border: string;
7807
- };
7808
- light: {
7809
- mx: string;
7810
- path: {
7811
- fill: string;
7812
- };
7813
- border: string;
7814
- };
7766
+ border: string;
7815
7767
  };
7816
7768
  };
7817
7769
  light: {
@@ -7929,23 +7881,11 @@ declare const _default: {
7929
7881
  backgroundColor: string;
7930
7882
  };
7931
7883
  copyButton: {
7884
+ mx: string;
7932
7885
  path: {
7933
7886
  fill: string;
7934
7887
  };
7935
- default: {
7936
- mx: string;
7937
- path: {
7938
- fill: string;
7939
- };
7940
- border: string;
7941
- };
7942
- light: {
7943
- mx: string;
7944
- path: {
7945
- fill: string;
7946
- };
7947
- border: string;
7948
- };
7888
+ border: string;
7949
7889
  };
7950
7890
  };
7951
7891
  };
@@ -1155,23 +1155,11 @@ declare const buttons: {
1155
1155
  alignSelf: string;
1156
1156
  };
1157
1157
  copyButton: {
1158
+ mx: string;
1158
1159
  path: {
1159
1160
  fill: string;
1160
1161
  };
1161
- default: {
1162
- mx: string;
1163
- path: {
1164
- fill: string;
1165
- };
1166
- border: string;
1167
- };
1168
- light: {
1169
- mx: string;
1170
- path: {
1171
- fill: string;
1172
- };
1173
- border: string;
1174
- };
1162
+ border: string;
1175
1163
  };
1176
1164
  deleteAttachment: {
1177
1165
  backgroundColor: string;
@@ -493,23 +493,11 @@ declare const _default: {
493
493
  lineHeight: string;
494
494
  };
495
495
  copyButton: {
496
+ mx: string;
496
497
  path: {
497
498
  fill: string;
498
499
  };
499
- default: {
500
- mx: string;
501
- path: {
502
- fill: string;
503
- };
504
- border: string;
505
- };
506
- light: {
507
- mx: string;
508
- path: {
509
- fill: string;
510
- };
511
- border: string;
512
- };
500
+ border: string;
513
501
  };
514
502
  };
515
503
  light: {
@@ -627,23 +615,11 @@ declare const _default: {
627
615
  backgroundColor: string;
628
616
  };
629
617
  copyButton: {
618
+ mx: string;
630
619
  path: {
631
620
  fill: string;
632
621
  };
633
- default: {
634
- mx: string;
635
- path: {
636
- fill: string;
637
- };
638
- border: string;
639
- };
640
- light: {
641
- mx: string;
642
- path: {
643
- fill: string;
644
- };
645
- border: string;
646
- };
622
+ border: string;
647
623
  };
648
624
  };
649
625
  };
@@ -20,6 +20,7 @@ export interface CopyTextProps extends HoverProps, TestingAttributes {
20
20
  tooltipProps?: TooltipTriggerProps;
21
21
  wrapperProps?: TooltipWrapperProps;
22
22
  iconButtonProps?: Omit<IconButtonProps, 'onPress'>;
23
+ iconProps?: IconProps;
23
24
  }
24
25
  export interface CopyButtonProps extends IconButtonProps {
25
26
  iconProps?: IconProps;
@@ -137,10 +137,14 @@ const CodeView = /*#__PURE__*/forwardRef((props, ref) => {
137
137
  ref: ref,
138
138
  mode: "rightText",
139
139
  textToCopy: textToCopy || children,
140
- iconButtonProps: {
141
- ...iconButtonProps,
142
- variant
143
- }
140
+ iconProps: {
141
+ sx: {
142
+ '&& path': {
143
+ fill: variant === 'light' ? 'black' : 'white'
144
+ }
145
+ }
146
+ },
147
+ iconButtonProps: iconButtonProps
144
148
  })), content);
145
149
  }
146
150
  if (hasNoCopyButton) {
@@ -6,22 +6,17 @@ import Icon from '../Icon';
6
6
  import IconButton from '../IconButton';
7
7
  import { jsx as ___EmotionJSX } from "@emotion/react";
8
8
  const CopyButton = /*#__PURE__*/forwardRef((props, ref) => {
9
- /* istanbul ignore next */
10
9
  const {
11
10
  iconProps,
12
- variant = 'default',
13
11
  ...others
14
12
  } = props;
15
13
  const {
16
- copyButtonSize,
17
- themeState
14
+ copyButtonSize
18
15
  } = useGetTheme();
19
- /* istanbul ignore next */
20
- const themeVariant = themeState.isOnyx ? `copyButton.${variant}` : 'copyButton';
21
16
  return ___EmotionJSX(IconButton, _extends({
22
17
  ref: ref,
23
18
  "aria-label": "copy to clipboard",
24
- variant: themeVariant
19
+ variant: "copyButton"
25
20
  }, others), ___EmotionJSX(Icon, _extends({
26
21
  icon: ContentCopy,
27
22
  size: copyButtonSize,
@@ -25,6 +25,7 @@ const CopyText = /*#__PURE__*/forwardRef((props, ref) => {
25
25
  tooltipProps,
26
26
  wrapperProps,
27
27
  iconButtonProps,
28
+ iconProps,
28
29
  ...others
29
30
  } = props;
30
31
  const value = textToCopy || (mode === 'link' ? children?.props?.href : children.props?.children);
@@ -105,7 +106,9 @@ const CopyText = /*#__PURE__*/forwardRef((props, ref) => {
105
106
  role: "presentation"
106
107
  }), content, ___EmotionJSX(CopyButton, _extends({
107
108
  onPress: copyToClipboard
108
- }, focusProps, iconButtonProps))));
109
+ }, focusProps, {
110
+ iconProps: iconProps
111
+ }, iconButtonProps))));
109
112
  }
110
113
  if (mode === 'link') {
111
114
  return ___EmotionJSX(Box, _extends({
@@ -118,7 +121,9 @@ const CopyText = /*#__PURE__*/forwardRef((props, ref) => {
118
121
  tooltip: tooltip
119
122
  }, tooltipProps), ___EmotionJSX(CopyButton, _extends({
120
123
  onPress: copyToClipboard
121
- }, mergeProps(hoverProps, focusProps, iconButtonProps)))));
124
+ }, mergeProps(hoverProps, focusProps, iconButtonProps), {
125
+ iconProps: iconProps
126
+ }))));
122
127
  }
123
128
  return ___EmotionJSX(TooltipWrapper, _extends({
124
129
  isOpen: isTooltipOpen,
@@ -140,7 +145,9 @@ const CopyText = /*#__PURE__*/forwardRef((props, ref) => {
140
145
  gap: "sm"
141
146
  }), mode !== 'rightText' && content, ___EmotionJSX(CopyButton, _extends({
142
147
  onPress: copyToClipboard
143
- }, focusProps, iconButtonProps)), mode === 'rightText' && content)));
148
+ }, focusProps, {
149
+ iconProps: iconProps
150
+ }, iconButtonProps)), mode === 'rightText' && content)));
144
151
  });
145
152
  CopyText.defaultProps = {
146
153
  mode: 'text',
@@ -131,23 +131,11 @@ const lineNo = {
131
131
  backgroundColor: 'transparent'
132
132
  };
133
133
  export const copyButton = {
134
+ mx: 'sm',
134
135
  path: {
135
136
  fill: 'text.primary'
136
137
  },
137
- default: {
138
- mx: 'sm',
139
- path: {
140
- fill: 'white'
141
- },
142
- border: 'none !important'
143
- },
144
- light: {
145
- mx: 'sm',
146
- path: {
147
- fill: 'black'
148
- },
149
- border: 'none !important'
150
- }
138
+ border: 'none !important'
151
139
  };
152
140
  const codeView = {
153
141
  theme: nextGenCodeViewTheme,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.241.0",
3
+ "version": "2.242.1-alpha.0",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",
@@ -99,8 +99,6 @@
99
99
  "@react-aria/utils": "^3.16.0",
100
100
  "@react-aria/virtualizer": "~3.8.0",
101
101
  "@react-aria/visually-hidden": "~3.6.0",
102
- "@react-spectrum/test-utils": "^3.0.0-alpha.1",
103
- "@react-spectrum/utils": "~3.6.1",
104
102
  "@react-stately/calendar": "^3.5.0",
105
103
  "@react-stately/color": "~3.8.1",
106
104
  "@react-stately/data": "^3.13.1",
@@ -261,13 +259,6 @@
261
259
  "eslint-plugin-jest-dom": {
262
260
  "eslint": "^9.35.0"
263
261
  },
264
- "@react-spectrum/test-utils": {
265
- "@testing-library/react": "^15.0.6",
266
- "@testing-library/user-event": "^12.8.3"
267
- },
268
- "@react-spectrum/utils": {
269
- "react": "^18.2.0"
270
- },
271
262
  "theme-ui": {
272
263
  "react": "^18.2.0",
273
264
  "react-dom": "^18.2.0"