@pingux/astro 1.30.0-alpha.6 → 1.31.0-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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.30.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.29.0...@pingux/astro@1.30.0) (2022-10-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * [UIP-5379] NavBar a11y issues ([bed33a1](https://gitlab.corp.pingidentity.com/ux/pingux/commit/bed33a16f1474cbf7c1853b302d43d61009392df))
12
+ * [UIP-5694] Correct line spacing for CodeView ([a34459a](https://gitlab.corp.pingidentity.com/ux/pingux/commit/a34459a1c119834e5d924c7337127e249e686782))
13
+ * handle image error status codes ([56f535e](https://gitlab.corp.pingidentity.com/ux/pingux/commit/56f535ea21130a29bce52f45079f2bba852943db))
14
+
15
+
16
+ ### Features
17
+
18
+ * [UIP-5514] Icon badge component ([ffa21c4](https://gitlab.corp.pingidentity.com/ux/pingux/commit/ffa21c44ef29a5c84ce551a85361bd93b8360be9))
19
+
20
+
21
+
22
+
23
+
6
24
  # [1.29.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.28.1...@pingux/astro@1.29.0) (2022-09-29)
7
25
 
8
26
 
@@ -93,8 +93,8 @@ var Image = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
93
93
 
94
94
  var _useState5 = (0, _react.useState)(false),
95
95
  _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
96
- hasTimedOut = _useState6[0],
97
- setHasTimedOut = _useState6[1]; // we need to use useRef here with useState so it will be updated in setTimeout and onload
96
+ shouldShowFallback = _useState6[0],
97
+ setShouldShowFallback = _useState6[1]; // we need to use useRef here with useState so it will be updated in setTimeout and onload
98
98
  // https://github.com/facebook/react/issues/14010#issuecomment-433788147
99
99
 
100
100
 
@@ -106,7 +106,7 @@ var Image = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
106
106
  };
107
107
 
108
108
  var setImgSrc = function setImgSrc() {
109
- if (!loadedSuccessfully && !(isLoadingRef !== null && isLoadingRef !== void 0 && isLoadingRef.current) || hasTimedOut) {
109
+ if (!loadedSuccessfully && !(isLoadingRef !== null && isLoadingRef !== void 0 && isLoadingRef.current) || shouldShowFallback) {
110
110
  return fallbackImage;
111
111
  }
112
112
 
@@ -115,7 +115,7 @@ var Image = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
115
115
 
116
116
  var imgSrc = (0, _react.useMemo)(function () {
117
117
  return setImgSrc();
118
- }, [src, isLoading, hasTimedOut]);
118
+ }, [src, isLoading, shouldShowFallback]);
119
119
  var imgRef = (0, _react.useRef)();
120
120
  /* istanbul ignore next */
121
121
 
@@ -146,12 +146,13 @@ var Image = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
146
146
 
147
147
  var onImageError = function onImageError() {
148
148
  setIsLoadingWithRef(false);
149
+ setShouldShowFallback(true);
149
150
  };
150
151
 
151
152
  var onFallbackTimeout = function onFallbackTimeout() {
152
153
  if (isLoadingRef !== null && isLoadingRef !== void 0 && isLoadingRef.current) {
153
154
  setIsLoadingWithRef(false);
154
- setHasTimedOut(true);
155
+ setShouldShowFallback(true);
155
156
  }
156
157
  };
157
158
 
@@ -179,9 +180,9 @@ var Image = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
179
180
  };
180
181
 
181
182
  var themeUiImage = (0, _react2.jsx)(_themeUi.Image, (0, _extends2["default"])({
183
+ alt: alt,
182
184
  className: classNames,
183
185
  ref: imgRef,
184
- alt: alt,
185
186
  role: "img",
186
187
  src: imgSrc,
187
188
  sx: sx
@@ -69,6 +69,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
69
69
  */
70
70
  var LinkSelectField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
71
71
  var placeholder = props.placeholder,
72
+ isDisabled = props.isDisabled,
72
73
  status = props.status;
73
74
 
74
75
  var _getAriaAttributeProp = (0, _ariaAttributes.getAriaAttributeProps)(props),
@@ -94,7 +95,8 @@ var LinkSelectField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
94
95
  var trigger = (0, _react2.jsx)(_.Button, (0, _extends2["default"])({
95
96
  className: fieldControlProps.className,
96
97
  ref: triggerRef,
97
- variant: "link"
98
+ variant: "link",
99
+ tabIndex: isDisabled ? -1 : 0
98
100
  }, triggerProps, ariaProps), (0, _react2.jsx)(_.Text, {
99
101
  variant: "label",
100
102
  color: "active"
@@ -8,12 +8,14 @@ _Object$defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
10
 
11
- exports["default"] = exports.Default = void 0;
11
+ exports["default"] = exports.WithError = exports.Default = void 0;
12
12
 
13
13
  var _react = _interopRequireDefault(require("react"));
14
14
 
15
15
  var _CreateIcon = _interopRequireDefault(require("mdi-react/CreateIcon"));
16
16
 
17
+ var _AlertCircleIcon = _interopRequireDefault(require("mdi-react/AlertCircleIcon"));
18
+
17
19
  var _index = require("../index");
18
20
 
19
21
  var _react2 = require("@emotion/react");
@@ -22,126 +24,157 @@ var _default = {
22
24
  title: 'Recipes/Attribute Mapping Read Only Field'
23
25
  };
24
26
  exports["default"] = _default;
27
+ var sx = {
28
+ alertCircleIcon: {
29
+ position: 'absolute',
30
+ right: '4px',
31
+ top: '4px',
32
+ fill: '#A31300'
33
+ },
34
+ attributeMappingTitle: {
35
+ fontSize: 'lg',
36
+ lineHeight: '21px',
37
+ fontWeight: 3,
38
+ color: 'text.primary'
39
+ },
40
+ attributeMappingTitleWrapper: {
41
+ marginBottom: 'md',
42
+ alignItems: 'center'
43
+ },
44
+ chip: {
45
+ width: 'xx',
46
+ height: '22px',
47
+ alignSelf: 'center',
48
+ minWidth: 'fit-content',
49
+ border: '1px solid',
50
+ borderColor: 'neutral.80',
51
+ backgroundColor: 'white !important',
52
+ marginLeft: 8,
53
+ '& span': {
54
+ fontSize: 'sm',
55
+ lineHeight: 1,
56
+ color: '#253746'
57
+ }
58
+ },
59
+ createIconButton: {
60
+ marginLeft: 'xs'
61
+ },
62
+ defaultFieldsWrapperBox: {
63
+ padding: '10px 10px 24px 10px',
64
+ width: '450px',
65
+ backgroundColor: 'accent.99'
66
+ },
67
+ fieldColumnTitle: {
68
+ fontWeight: 3,
69
+ fontSize: 'md',
70
+ lineHeight: '18px',
71
+ marginBottom: 'xs'
72
+ },
73
+ fieldColumnTitleWrapper: {
74
+ width: 'calc(50% - 22px)'
75
+ },
76
+ fieldRowWrapper: {
77
+ alignItems: 'center',
78
+ marginTop: 'sm'
79
+ },
80
+ separator: {
81
+ width: '21px',
82
+ margin: '0 2px'
83
+ },
84
+ tooltipBox: {
85
+ marginLeft: 'xs',
86
+ height: 'md',
87
+ width: 'md'
88
+ }
89
+ };
25
90
 
26
- var Default = function Default() {
27
- var Row = function Row(props) {
28
- var withChip = props.withChip,
29
- withTooltip = props.withTooltip,
30
- leftValue = props.leftValue,
31
- rightValue = props.rightValue;
32
- return (0, _react2.jsx)(_index.Box, {
33
- isRow: true,
34
- alignItems: "center",
35
- mt: "10px"
36
- }, (0, _react2.jsx)(_index.TextField, {
37
- isReadOnly: true,
38
- value: leftValue,
39
- labelProps: {
40
- mb: 0
41
- },
42
- controlProps: {
43
- variant: 'input.small',
44
- 'aria-label': "input ".concat(leftValue),
45
- sx: {
46
- width: '165px'
47
- }
48
- }
49
- }), (0, _react2.jsx)(_index.Separator, {
91
+ var Row = function Row(props) {
92
+ var withChip = props.withChip,
93
+ withTooltip = props.withTooltip,
94
+ withError = props.withError,
95
+ leftValue = props.leftValue,
96
+ rightValue = props.rightValue;
97
+ return (0, _react2.jsx)(_index.Box, {
98
+ isRow: true,
99
+ sx: sx.fieldRowWrapper
100
+ }, (0, _react2.jsx)(_index.TextField, {
101
+ isReadOnly: true,
102
+ value: leftValue,
103
+ labelProps: {
104
+ mb: 0
105
+ },
106
+ controlProps: {
107
+ variant: 'input.small',
108
+ 'aria-label': "input ".concat(leftValue),
50
109
  sx: {
51
- width: '21px',
52
- ml: '2px',
53
- mr: '2px'
54
- }
55
- }), (0, _react2.jsx)(_index.TextField, {
56
- isReadOnly: true,
57
- value: rightValue,
58
- labelProps: {
59
- mb: 0
60
- },
61
- controlProps: {
62
- variant: 'input.small',
63
- 'aria-label': "input ".concat(rightValue),
64
- sx: {
65
- width: '165px'
66
- }
110
+ width: '165px'
67
111
  }
68
- }), withChip && (0, _react2.jsx)(_index.Chip, {
69
- label: "Required",
112
+ },
113
+ slots: withError && {
114
+ inContainer: (0, _react2.jsx)(_index.Icon, {
115
+ icon: _AlertCircleIcon["default"],
116
+ sx: sx.alertCircleIcon
117
+ })
118
+ }
119
+ }), (0, _react2.jsx)(_index.Separator, {
120
+ sx: sx.separator
121
+ }), (0, _react2.jsx)(_index.TextField, {
122
+ isReadOnly: true,
123
+ value: rightValue,
124
+ labelProps: {
125
+ mb: 0
126
+ },
127
+ controlProps: {
128
+ variant: 'input.small',
129
+ 'aria-label': "input ".concat(rightValue),
70
130
  sx: {
71
- width: '65px',
72
- height: '22px',
73
- alignSelf: 'center',
74
- minWidth: 'fit-content',
75
- border: '1px solid',
76
- borderColor: 'neutral.80',
77
- backgroundColor: 'white !important',
78
- ml: 8,
79
- '& span': {
80
- fontSize: 'sm',
81
- lineHeight: 1,
82
- color: '#253746'
83
- }
84
- }
85
- }), withTooltip && (0, _react2.jsx)(_index.Box, {
86
- ml: "5px",
87
- height: "15px",
88
- width: "15px"
89
- }, (0, _react2.jsx)(_index.HelpHint, {
90
- tooltipProps: {
91
- direction: 'bottom'
131
+ width: '165px'
92
132
  }
93
- }, "Population set to default")));
94
- };
133
+ }
134
+ }), withChip && (0, _react2.jsx)(_index.Chip, {
135
+ label: "Required",
136
+ sx: sx.chip
137
+ }), withTooltip && (0, _react2.jsx)(_index.Box, {
138
+ sx: sx.tooltipBox
139
+ }, (0, _react2.jsx)(_index.HelpHint, {
140
+ tooltipProps: {
141
+ direction: 'bottom'
142
+ }
143
+ }, "Population set to default")));
144
+ };
95
145
 
96
- return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
146
+ var Title = function Title() {
147
+ return (0, _react2.jsx)(_index.Box, {
97
148
  isRow: true,
98
- alignItems: "center",
99
- mb: "15px"
149
+ sx: sx.attributeMappingTitleWrapper
100
150
  }, (0, _react2.jsx)(_index.Text, {
101
- sx: {
102
- fontSize: 'lg',
103
- lineHeight: '21px',
104
- fontWeight: 3,
105
- color: 'text.primary'
106
- }
151
+ sx: sx.attributeMappingTitle
107
152
  }, "Attribute Mapping"), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.IconButton, {
108
- ml: "5px",
153
+ sx: sx.createIconButton,
109
154
  variant: "inverted",
110
155
  "aria-label": "edit header button"
111
156
  }, (0, _react2.jsx)(_index.Icon, {
112
157
  icon: _CreateIcon["default"],
113
158
  size: 18
114
- })))), (0, _react2.jsx)(_index.Box, {
115
- backgroundColor: "accent.99",
116
- width: "450px",
117
- padding: "10px 10px 25px 10px"
159
+ }))));
160
+ };
161
+
162
+ var Default = function Default() {
163
+ return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(Title, null), (0, _react2.jsx)(_index.Box, {
164
+ sx: sx.defaultFieldsWrapperBox
118
165
  }, (0, _react2.jsx)(_index.Box, {
119
166
  isRow: true,
120
167
  sx: {
121
168
  width: '100%'
122
169
  }
123
170
  }, (0, _react2.jsx)(_index.Box, {
124
- sx: {
125
- width: 'calc(50% - 22px)'
126
- }
171
+ sx: sx.fieldColumnTitleWrapper
127
172
  }, (0, _react2.jsx)(_index.Text, {
128
- sx: {
129
- fontWeight: 3,
130
- fontSize: 'md',
131
- lineHeight: '18px',
132
- mb: '5px'
133
- }
173
+ sx: sx.fieldColumnTitle
134
174
  }, "PingOne")), (0, _react2.jsx)(_index.Box, {
135
- sx: {
136
- width: 'calc(50% - 22px)'
137
- }
175
+ sx: sx.fieldColumnTitleWrapper
138
176
  }, (0, _react2.jsx)(_index.Text, {
139
- sx: {
140
- fontWeight: 3,
141
- fontSize: 'md',
142
- lineHeight: '18px',
143
- mb: '5px'
144
- }
177
+ sx: sx.fieldColumnTitle
145
178
  }, "Google Suites"))), (0, _react2.jsx)(_index.Separator, null), (0, _react2.jsx)(Row, {
146
179
  withChip: true,
147
180
  leftValue: "UserId",
@@ -162,4 +195,61 @@ var Default = function Default() {
162
195
  })));
163
196
  };
164
197
 
165
- exports.Default = Default;
198
+ exports.Default = Default;
199
+
200
+ var WithError = function WithError() {
201
+ var withError = true;
202
+ var withErrorSx = {
203
+ errorBox: {
204
+ flexDirection: 'row !important',
205
+ alignItems: 'center',
206
+ padding: '13px 12px 13px 15px',
207
+ gap: 'md',
208
+ border: '1px solid #A31300',
209
+ width: '450px',
210
+ marginBottom: 'xs'
211
+ },
212
+ text: {
213
+ fontSize: 'sm',
214
+ lineHeight: '15px'
215
+ }
216
+ };
217
+ return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(Title, null), withError && (0, _react2.jsx)(_index.Box, {
218
+ sx: withErrorSx.errorBox
219
+ }, (0, _react2.jsx)(_index.Icon, {
220
+ size: 24,
221
+ icon: _AlertCircleIcon["default"],
222
+ color: "#A31300"
223
+ }), (0, _react2.jsx)(_index.Text, {
224
+ sx: withErrorSx.text
225
+ }, "This attribute is unavailable. Please map the attribute again or re-map to a different attribute.")), (0, _react2.jsx)(_index.Box, {
226
+ sx: sx.defaultFieldsWrapperBox
227
+ }, (0, _react2.jsx)(_index.Box, {
228
+ isRow: true,
229
+ sx: {
230
+ width: '100%'
231
+ }
232
+ }, (0, _react2.jsx)(_index.Box, {
233
+ sx: sx.fieldColumnTitleWrapper
234
+ }, (0, _react2.jsx)(_index.Text, {
235
+ sx: sx.fieldColumnTitle
236
+ }, "PingOne")), (0, _react2.jsx)(_index.Box, {
237
+ sx: sx.fieldColumnTitleWrapper
238
+ }, (0, _react2.jsx)(_index.Text, {
239
+ sx: sx.fieldColumnTitle
240
+ }, "Google Suites"))), (0, _react2.jsx)(_index.Separator, null), (0, _react2.jsx)(Row, {
241
+ withChip: true,
242
+ leftValue: "UserId",
243
+ rightValue: "mdorey"
244
+ }), (0, _react2.jsx)(Row, {
245
+ withError: withError,
246
+ leftValue: "givenName",
247
+ rightValue: "firstName"
248
+ }), (0, _react2.jsx)(Row, {
249
+ withError: withError,
250
+ leftValue: "familyName",
251
+ rightValue: "lastName"
252
+ })));
253
+ };
254
+
255
+ exports.WithError = WithError;
@@ -57,8 +57,8 @@ var Image = /*#__PURE__*/forwardRef(function (props, ref) {
57
57
 
58
58
  var _useState5 = useState(false),
59
59
  _useState6 = _slicedToArray(_useState5, 2),
60
- hasTimedOut = _useState6[0],
61
- setHasTimedOut = _useState6[1]; // we need to use useRef here with useState so it will be updated in setTimeout and onload
60
+ shouldShowFallback = _useState6[0],
61
+ setShouldShowFallback = _useState6[1]; // we need to use useRef here with useState so it will be updated in setTimeout and onload
62
62
  // https://github.com/facebook/react/issues/14010#issuecomment-433788147
63
63
 
64
64
 
@@ -70,7 +70,7 @@ var Image = /*#__PURE__*/forwardRef(function (props, ref) {
70
70
  };
71
71
 
72
72
  var setImgSrc = function setImgSrc() {
73
- if (!loadedSuccessfully && !(isLoadingRef !== null && isLoadingRef !== void 0 && isLoadingRef.current) || hasTimedOut) {
73
+ if (!loadedSuccessfully && !(isLoadingRef !== null && isLoadingRef !== void 0 && isLoadingRef.current) || shouldShowFallback) {
74
74
  return fallbackImage;
75
75
  }
76
76
 
@@ -79,7 +79,7 @@ var Image = /*#__PURE__*/forwardRef(function (props, ref) {
79
79
 
80
80
  var imgSrc = useMemo(function () {
81
81
  return setImgSrc();
82
- }, [src, isLoading, hasTimedOut]);
82
+ }, [src, isLoading, shouldShowFallback]);
83
83
  var imgRef = useRef();
84
84
  /* istanbul ignore next */
85
85
 
@@ -110,12 +110,13 @@ var Image = /*#__PURE__*/forwardRef(function (props, ref) {
110
110
 
111
111
  var onImageError = function onImageError() {
112
112
  setIsLoadingWithRef(false);
113
+ setShouldShowFallback(true);
113
114
  };
114
115
 
115
116
  var onFallbackTimeout = function onFallbackTimeout() {
116
117
  if (isLoadingRef !== null && isLoadingRef !== void 0 && isLoadingRef.current) {
117
118
  setIsLoadingWithRef(false);
118
- setHasTimedOut(true);
119
+ setShouldShowFallback(true);
119
120
  }
120
121
  };
121
122
 
@@ -143,9 +144,9 @@ var Image = /*#__PURE__*/forwardRef(function (props, ref) {
143
144
  };
144
145
 
145
146
  var themeUiImage = ___EmotionJSX(ThemeUIImage, _extends({
147
+ alt: alt,
146
148
  className: classNames,
147
149
  ref: imgRef,
148
- alt: alt,
149
150
  role: "img",
150
151
  src: imgSrc,
151
152
  sx: sx
@@ -33,6 +33,7 @@ import statuses from '../../utils/devUtils/constants/statuses';
33
33
  import { jsx as ___EmotionJSX } from "@emotion/react";
34
34
  var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
35
35
  var placeholder = props.placeholder,
36
+ isDisabled = props.isDisabled,
36
37
  status = props.status;
37
38
 
38
39
  var _getAriaAttributeProp = getAriaAttributeProps(props),
@@ -59,7 +60,8 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
59
60
  var trigger = ___EmotionJSX(Button, _extends({
60
61
  className: fieldControlProps.className,
61
62
  ref: triggerRef,
62
- variant: "link"
63
+ variant: "link",
64
+ tabIndex: isDisabled ? -1 : 0
63
65
  }, triggerProps, ariaProps), ___EmotionJSX(Text, {
64
66
  variant: "label",
65
67
  color: "active"
@@ -1,129 +1,162 @@
1
1
  import React from 'react';
2
2
  import CreateIcon from 'mdi-react/CreateIcon';
3
+ import AlertCircleIcon from 'mdi-react/AlertCircleIcon';
3
4
  import { Box, Chip, IconButton, Text, Icon, Separator, TextField, HelpHint } from '../index';
4
5
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
6
  export default {
6
7
  title: 'Recipes/Attribute Mapping Read Only Field'
7
8
  };
8
- export var Default = function Default() {
9
- var Row = function Row(props) {
10
- var withChip = props.withChip,
11
- withTooltip = props.withTooltip,
12
- leftValue = props.leftValue,
13
- rightValue = props.rightValue;
14
- return ___EmotionJSX(Box, {
15
- isRow: true,
16
- alignItems: "center",
17
- mt: "10px"
18
- }, ___EmotionJSX(TextField, {
19
- isReadOnly: true,
20
- value: leftValue,
21
- labelProps: {
22
- mb: 0
23
- },
24
- controlProps: {
25
- variant: 'input.small',
26
- 'aria-label': "input ".concat(leftValue),
27
- sx: {
28
- width: '165px'
29
- }
30
- }
31
- }), ___EmotionJSX(Separator, {
9
+ var sx = {
10
+ alertCircleIcon: {
11
+ position: 'absolute',
12
+ right: '4px',
13
+ top: '4px',
14
+ fill: '#A31300'
15
+ },
16
+ attributeMappingTitle: {
17
+ fontSize: 'lg',
18
+ lineHeight: '21px',
19
+ fontWeight: 3,
20
+ color: 'text.primary'
21
+ },
22
+ attributeMappingTitleWrapper: {
23
+ marginBottom: 'md',
24
+ alignItems: 'center'
25
+ },
26
+ chip: {
27
+ width: 'xx',
28
+ height: '22px',
29
+ alignSelf: 'center',
30
+ minWidth: 'fit-content',
31
+ border: '1px solid',
32
+ borderColor: 'neutral.80',
33
+ backgroundColor: 'white !important',
34
+ marginLeft: 8,
35
+ '& span': {
36
+ fontSize: 'sm',
37
+ lineHeight: 1,
38
+ color: '#253746'
39
+ }
40
+ },
41
+ createIconButton: {
42
+ marginLeft: 'xs'
43
+ },
44
+ defaultFieldsWrapperBox: {
45
+ padding: '10px 10px 24px 10px',
46
+ width: '450px',
47
+ backgroundColor: 'accent.99'
48
+ },
49
+ fieldColumnTitle: {
50
+ fontWeight: 3,
51
+ fontSize: 'md',
52
+ lineHeight: '18px',
53
+ marginBottom: 'xs'
54
+ },
55
+ fieldColumnTitleWrapper: {
56
+ width: 'calc(50% - 22px)'
57
+ },
58
+ fieldRowWrapper: {
59
+ alignItems: 'center',
60
+ marginTop: 'sm'
61
+ },
62
+ separator: {
63
+ width: '21px',
64
+ margin: '0 2px'
65
+ },
66
+ tooltipBox: {
67
+ marginLeft: 'xs',
68
+ height: 'md',
69
+ width: 'md'
70
+ }
71
+ };
72
+
73
+ var Row = function Row(props) {
74
+ var withChip = props.withChip,
75
+ withTooltip = props.withTooltip,
76
+ withError = props.withError,
77
+ leftValue = props.leftValue,
78
+ rightValue = props.rightValue;
79
+ return ___EmotionJSX(Box, {
80
+ isRow: true,
81
+ sx: sx.fieldRowWrapper
82
+ }, ___EmotionJSX(TextField, {
83
+ isReadOnly: true,
84
+ value: leftValue,
85
+ labelProps: {
86
+ mb: 0
87
+ },
88
+ controlProps: {
89
+ variant: 'input.small',
90
+ 'aria-label': "input ".concat(leftValue),
32
91
  sx: {
33
- width: '21px',
34
- ml: '2px',
35
- mr: '2px'
36
- }
37
- }), ___EmotionJSX(TextField, {
38
- isReadOnly: true,
39
- value: rightValue,
40
- labelProps: {
41
- mb: 0
42
- },
43
- controlProps: {
44
- variant: 'input.small',
45
- 'aria-label': "input ".concat(rightValue),
46
- sx: {
47
- width: '165px'
48
- }
92
+ width: '165px'
49
93
  }
50
- }), withChip && ___EmotionJSX(Chip, {
51
- label: "Required",
94
+ },
95
+ slots: withError && {
96
+ inContainer: ___EmotionJSX(Icon, {
97
+ icon: AlertCircleIcon,
98
+ sx: sx.alertCircleIcon
99
+ })
100
+ }
101
+ }), ___EmotionJSX(Separator, {
102
+ sx: sx.separator
103
+ }), ___EmotionJSX(TextField, {
104
+ isReadOnly: true,
105
+ value: rightValue,
106
+ labelProps: {
107
+ mb: 0
108
+ },
109
+ controlProps: {
110
+ variant: 'input.small',
111
+ 'aria-label': "input ".concat(rightValue),
52
112
  sx: {
53
- width: '65px',
54
- height: '22px',
55
- alignSelf: 'center',
56
- minWidth: 'fit-content',
57
- border: '1px solid',
58
- borderColor: 'neutral.80',
59
- backgroundColor: 'white !important',
60
- ml: 8,
61
- '& span': {
62
- fontSize: 'sm',
63
- lineHeight: 1,
64
- color: '#253746'
65
- }
66
- }
67
- }), withTooltip && ___EmotionJSX(Box, {
68
- ml: "5px",
69
- height: "15px",
70
- width: "15px"
71
- }, ___EmotionJSX(HelpHint, {
72
- tooltipProps: {
73
- direction: 'bottom'
113
+ width: '165px'
74
114
  }
75
- }, "Population set to default")));
76
- };
115
+ }
116
+ }), withChip && ___EmotionJSX(Chip, {
117
+ label: "Required",
118
+ sx: sx.chip
119
+ }), withTooltip && ___EmotionJSX(Box, {
120
+ sx: sx.tooltipBox
121
+ }, ___EmotionJSX(HelpHint, {
122
+ tooltipProps: {
123
+ direction: 'bottom'
124
+ }
125
+ }, "Population set to default")));
126
+ };
77
127
 
78
- return ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
128
+ var Title = function Title() {
129
+ return ___EmotionJSX(Box, {
79
130
  isRow: true,
80
- alignItems: "center",
81
- mb: "15px"
131
+ sx: sx.attributeMappingTitleWrapper
82
132
  }, ___EmotionJSX(Text, {
83
- sx: {
84
- fontSize: 'lg',
85
- lineHeight: '21px',
86
- fontWeight: 3,
87
- color: 'text.primary'
88
- }
133
+ sx: sx.attributeMappingTitle
89
134
  }, "Attribute Mapping"), ___EmotionJSX(Box, null, ___EmotionJSX(IconButton, {
90
- ml: "5px",
135
+ sx: sx.createIconButton,
91
136
  variant: "inverted",
92
137
  "aria-label": "edit header button"
93
138
  }, ___EmotionJSX(Icon, {
94
139
  icon: CreateIcon,
95
140
  size: 18
96
- })))), ___EmotionJSX(Box, {
97
- backgroundColor: "accent.99",
98
- width: "450px",
99
- padding: "10px 10px 25px 10px"
141
+ }))));
142
+ };
143
+
144
+ export var Default = function Default() {
145
+ return ___EmotionJSX(Box, null, ___EmotionJSX(Title, null), ___EmotionJSX(Box, {
146
+ sx: sx.defaultFieldsWrapperBox
100
147
  }, ___EmotionJSX(Box, {
101
148
  isRow: true,
102
149
  sx: {
103
150
  width: '100%'
104
151
  }
105
152
  }, ___EmotionJSX(Box, {
106
- sx: {
107
- width: 'calc(50% - 22px)'
108
- }
153
+ sx: sx.fieldColumnTitleWrapper
109
154
  }, ___EmotionJSX(Text, {
110
- sx: {
111
- fontWeight: 3,
112
- fontSize: 'md',
113
- lineHeight: '18px',
114
- mb: '5px'
115
- }
155
+ sx: sx.fieldColumnTitle
116
156
  }, "PingOne")), ___EmotionJSX(Box, {
117
- sx: {
118
- width: 'calc(50% - 22px)'
119
- }
157
+ sx: sx.fieldColumnTitleWrapper
120
158
  }, ___EmotionJSX(Text, {
121
- sx: {
122
- fontWeight: 3,
123
- fontSize: 'md',
124
- lineHeight: '18px',
125
- mb: '5px'
126
- }
159
+ sx: sx.fieldColumnTitle
127
160
  }, "Google Suites"))), ___EmotionJSX(Separator, null), ___EmotionJSX(Row, {
128
161
  withChip: true,
129
162
  leftValue: "UserId",
@@ -142,4 +175,58 @@ export var Default = function Default() {
142
175
  leftValue: "password",
143
176
  rightValue: "password"
144
177
  })));
178
+ };
179
+ export var WithError = function WithError() {
180
+ var withError = true;
181
+ var withErrorSx = {
182
+ errorBox: {
183
+ flexDirection: 'row !important',
184
+ alignItems: 'center',
185
+ padding: '13px 12px 13px 15px',
186
+ gap: 'md',
187
+ border: '1px solid #A31300',
188
+ width: '450px',
189
+ marginBottom: 'xs'
190
+ },
191
+ text: {
192
+ fontSize: 'sm',
193
+ lineHeight: '15px'
194
+ }
195
+ };
196
+ return ___EmotionJSX(Box, null, ___EmotionJSX(Title, null), withError && ___EmotionJSX(Box, {
197
+ sx: withErrorSx.errorBox
198
+ }, ___EmotionJSX(Icon, {
199
+ size: 24,
200
+ icon: AlertCircleIcon,
201
+ color: "#A31300"
202
+ }), ___EmotionJSX(Text, {
203
+ sx: withErrorSx.text
204
+ }, "This attribute is unavailable. Please map the attribute again or re-map to a different attribute.")), ___EmotionJSX(Box, {
205
+ sx: sx.defaultFieldsWrapperBox
206
+ }, ___EmotionJSX(Box, {
207
+ isRow: true,
208
+ sx: {
209
+ width: '100%'
210
+ }
211
+ }, ___EmotionJSX(Box, {
212
+ sx: sx.fieldColumnTitleWrapper
213
+ }, ___EmotionJSX(Text, {
214
+ sx: sx.fieldColumnTitle
215
+ }, "PingOne")), ___EmotionJSX(Box, {
216
+ sx: sx.fieldColumnTitleWrapper
217
+ }, ___EmotionJSX(Text, {
218
+ sx: sx.fieldColumnTitle
219
+ }, "Google Suites"))), ___EmotionJSX(Separator, null), ___EmotionJSX(Row, {
220
+ withChip: true,
221
+ leftValue: "UserId",
222
+ rightValue: "mdorey"
223
+ }), ___EmotionJSX(Row, {
224
+ withError: withError,
225
+ leftValue: "givenName",
226
+ rightValue: "firstName"
227
+ }), ___EmotionJSX(Row, {
228
+ withError: withError,
229
+ leftValue: "familyName",
230
+ rightValue: "lastName"
231
+ })));
145
232
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.30.0-alpha.6",
3
+ "version": "1.31.0-alpha.0",
4
4
  "description": "PingUX themeable React component library",
5
5
  "repository": {
6
6
  "type": "git",