@pingux/astro 1.30.0 → 1.31.0-alpha.1
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/lib/cjs/components/LinkSelectField/LinkSelectField.js +3 -1
- package/lib/cjs/components/ListView/ListView.js +2 -0
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +189 -99
- package/lib/cjs/recipes/ListAndPanel.stories.js +32 -1
- package/lib/components/LinkSelectField/LinkSelectField.js +3 -1
- package/lib/components/ListView/ListView.js +2 -0
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +184 -97
- package/lib/recipes/ListAndPanel.stories.js +32 -2
- package/package.json +1 -1
- package/NOTICE.html +0 -4651
@@ -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"
|
@@ -106,6 +106,8 @@ function useListLayout(state) {
|
|
106
106
|
* view, or edit items in this list. This virtualized component supports
|
107
107
|
* asynchronous data in infinitely scrollable lists.
|
108
108
|
*
|
109
|
+
* Can be used as in recipe: https://uilibrary.ping-eng.com/astro/?path=/docs/recipes-list-with-panel--default
|
110
|
+
*
|
109
111
|
* NOTE: be careful with putting focusable elements inside ListView.
|
110
112
|
* It is using a grid (useList hook) with its own event listeners under the hood.
|
111
113
|
* [react-specttrum-github-issue](https://github.com/adobe/react-spectrum/issues/2801)
|
@@ -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
|
27
|
-
var
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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: '
|
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
|
-
}
|
69
|
-
|
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: '
|
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
|
-
}
|
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
|
-
|
146
|
+
var Title = function Title() {
|
147
|
+
return (0, _react2.jsx)(_index.Box, {
|
97
148
|
isRow: true,
|
98
|
-
|
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
|
-
|
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
|
-
}))))
|
115
|
-
|
116
|
-
|
117
|
-
|
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;
|
@@ -34,6 +34,8 @@ var _MoreVertIcon = _interopRequireDefault(require("mdi-react/MoreVertIcon"));
|
|
34
34
|
|
35
35
|
var _PencilIcon = _interopRequireDefault(require("mdi-react/PencilIcon"));
|
36
36
|
|
37
|
+
var _PlusIcon = _interopRequireDefault(require("mdi-react/PlusIcon"));
|
38
|
+
|
37
39
|
var _index = require("../index");
|
38
40
|
|
39
41
|
var _hooks = require("../hooks");
|
@@ -264,6 +266,8 @@ var Default = function Default() {
|
|
264
266
|
onPanelClose = _useOverlayPanelState.onClose;
|
265
267
|
|
266
268
|
var panelTriggerRef = (0, _react.useRef)();
|
269
|
+
var heading = 'Title of the Page';
|
270
|
+
var description = 'The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page.';
|
267
271
|
|
268
272
|
var closePanelHandler = function closePanelHandler() {
|
269
273
|
onPanelClose(panelState, panelTriggerRef);
|
@@ -285,7 +289,34 @@ var Default = function Default() {
|
|
285
289
|
|
286
290
|
return (0, _react2.jsx)(_index.Box, {
|
287
291
|
sx: sx.wrapper
|
288
|
-
}, (0, _react2.jsx)(_index.
|
292
|
+
}, (0, _react2.jsx)(_index.Box, {
|
293
|
+
mb: "md"
|
294
|
+
}, (0, _react2.jsx)(_index.Box, {
|
295
|
+
align: "center",
|
296
|
+
isRow: true,
|
297
|
+
mb: "xs",
|
298
|
+
role: "heading",
|
299
|
+
"aria-level": "1"
|
300
|
+
}, (0, _react2.jsx)(_index.Text, {
|
301
|
+
variant: "title",
|
302
|
+
fontWeight: 3
|
303
|
+
}, heading), (0, _react2.jsx)(_index.IconButton, {
|
304
|
+
"aria-label": "icon button",
|
305
|
+
ml: "sm",
|
306
|
+
mt: "3px",
|
307
|
+
variant: "inverted"
|
308
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
309
|
+
icon: _PlusIcon["default"],
|
310
|
+
color: "white",
|
311
|
+
size: 13
|
312
|
+
}))), (0, _react2.jsx)(_index.Text, {
|
313
|
+
variant: "bodyWeak"
|
314
|
+
}, description, (0, _react2.jsx)(_index.Link, {
|
315
|
+
href: "https://uilibrary.ping-eng.com/",
|
316
|
+
sx: {
|
317
|
+
fontSize: '13px'
|
318
|
+
}
|
319
|
+
}, " Learn more"))), (0, _react2.jsx)(_index.SearchField, {
|
289
320
|
position: "fixed",
|
290
321
|
mb: "sm",
|
291
322
|
width: "400px",
|
@@ -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"
|
@@ -60,6 +60,8 @@ export function useListLayout(state) {
|
|
60
60
|
* view, or edit items in this list. This virtualized component supports
|
61
61
|
* asynchronous data in infinitely scrollable lists.
|
62
62
|
*
|
63
|
+
* Can be used as in recipe: https://uilibrary.ping-eng.com/astro/?path=/docs/recipes-list-with-panel--default
|
64
|
+
*
|
63
65
|
* NOTE: be careful with putting focusable elements inside ListView.
|
64
66
|
* It is using a grid (useList hook) with its own event listeners under the hood.
|
65
67
|
* [react-specttrum-github-issue](https://github.com/adobe/react-spectrum/issues/2801)
|