@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
@@ -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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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: '
|
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
|
-
}
|
51
|
-
|
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: '
|
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
|
-
}
|
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
|
-
|
128
|
+
var Title = function Title() {
|
129
|
+
return ___EmotionJSX(Box, {
|
79
130
|
isRow: true,
|
80
|
-
|
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
|
-
|
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
|
-
}))))
|
97
|
-
|
98
|
-
|
99
|
-
|
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
|
};
|
@@ -7,7 +7,8 @@ import AccountIcon from 'mdi-react/AccountIcon';
|
|
7
7
|
import CloseIcon from 'mdi-react/CloseIcon';
|
8
8
|
import MoreVertIcon from 'mdi-react/MoreVertIcon';
|
9
9
|
import PencilIcon from 'mdi-react/PencilIcon';
|
10
|
-
import
|
10
|
+
import PlusIcon from 'mdi-react/PlusIcon';
|
11
|
+
import { Avatar, Box, Icon, IconButton, Link, ListView, Menu, OverlayPanel, PopoverMenu, SearchField, Separator, SwitchField, Tab, Tabs, Text } from '../index';
|
11
12
|
import { useOverlayPanelState } from '../hooks';
|
12
13
|
import { pingImg } from '../utils/devUtils/constants/images';
|
13
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -228,6 +229,8 @@ export var Default = function Default() {
|
|
228
229
|
onPanelClose = _useOverlayPanelState.onClose;
|
229
230
|
|
230
231
|
var panelTriggerRef = useRef();
|
232
|
+
var heading = 'Title of the Page';
|
233
|
+
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.';
|
231
234
|
|
232
235
|
var closePanelHandler = function closePanelHandler() {
|
233
236
|
onPanelClose(panelState, panelTriggerRef);
|
@@ -249,7 +252,34 @@ export var Default = function Default() {
|
|
249
252
|
|
250
253
|
return ___EmotionJSX(Box, {
|
251
254
|
sx: sx.wrapper
|
252
|
-
}, ___EmotionJSX(
|
255
|
+
}, ___EmotionJSX(Box, {
|
256
|
+
mb: "md"
|
257
|
+
}, ___EmotionJSX(Box, {
|
258
|
+
align: "center",
|
259
|
+
isRow: true,
|
260
|
+
mb: "xs",
|
261
|
+
role: "heading",
|
262
|
+
"aria-level": "1"
|
263
|
+
}, ___EmotionJSX(Text, {
|
264
|
+
variant: "title",
|
265
|
+
fontWeight: 3
|
266
|
+
}, heading), ___EmotionJSX(IconButton, {
|
267
|
+
"aria-label": "icon button",
|
268
|
+
ml: "sm",
|
269
|
+
mt: "3px",
|
270
|
+
variant: "inverted"
|
271
|
+
}, ___EmotionJSX(Icon, {
|
272
|
+
icon: PlusIcon,
|
273
|
+
color: "white",
|
274
|
+
size: 13
|
275
|
+
}))), ___EmotionJSX(Text, {
|
276
|
+
variant: "bodyWeak"
|
277
|
+
}, description, ___EmotionJSX(Link, {
|
278
|
+
href: "https://uilibrary.ping-eng.com/",
|
279
|
+
sx: {
|
280
|
+
fontSize: '13px'
|
281
|
+
}
|
282
|
+
}, " Learn more"))), ___EmotionJSX(SearchField, {
|
253
283
|
position: "fixed",
|
254
284
|
mb: "sm",
|
255
285
|
width: "400px",
|