@pingux/astro 2.18.1-alpha.0 → 2.18.1-alpha.2

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.
@@ -17,67 +17,77 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
17
17
  export default {
18
18
  title: 'Recipes/Condition Filter'
19
19
  };
20
- var customBadgeStyles = {
21
- marginRight: 'sm',
22
- '& > span': {
23
- fontWeight: 1,
24
- textTransform: 'none'
25
- },
26
- ml: '3px',
27
- minWidth: '65px',
28
- height: '20px',
29
- 'z-index': '1'
20
+ var borderBox = {
21
+ borderColor: 'neutral.80',
22
+ borderRadius: '3px 4px 4px 3px',
23
+ borderStyle: 'solid',
24
+ borderWidth: '1px 1px 1px 0px',
25
+ width: '100%',
26
+ '&::after': {
27
+ bg: 'decorative.4',
28
+ width: '2px'
29
+ }
30
30
  };
31
31
  var sx = {
32
- equalBadgeStyles: _objectSpread(_objectSpread({}, customBadgeStyles), {}, {
33
- bg: 'accent.95',
34
- textColor: 'neutral.10',
35
- alignSelf: 'center',
36
- height: '21px',
37
- minWidth: '51px'
38
- }),
39
- borderedBoxStyles: {
40
- '&::after': {
41
- bg: 'decorative.4',
42
- width: '2px',
43
- display: 'block'
32
+ badge: {
33
+ condition: {
34
+ height: '20px',
35
+ minWidth: '65px'
44
36
  },
45
- borderColor: 'neutral.80',
46
- borderRadius: '3px 4px 4px 3px',
47
- borderStyle: 'solid',
48
- borderWidth: '1px 1px 1px 0px',
49
- padding: 'sm',
50
- width: '100%'
37
+ equal: {
38
+ alignSelf: 'center',
39
+ bg: 'accent.95'
40
+ }
51
41
  },
52
- allConditionsBox: {
53
- '&::after': {
54
- bg: 'decorative.4',
55
- width: '2px'
42
+ borderedBoxStyles: _objectSpread(_objectSpread({}, borderBox), {}, {
43
+ padding: 'sm'
44
+ }),
45
+ display: {
46
+ borderBox: _objectSpread(_objectSpread({}, borderBox), {}, {
47
+ ml: '20px',
48
+ mt: 'md',
49
+ p: 'sm',
50
+ pl: 0
51
+ }),
52
+ bracket: {
53
+ position: 'absolute',
54
+ height: '56px'
55
+ },
56
+ container: {
57
+ bg: 'accent.99',
58
+ maxWidth: '318px',
59
+ p: 'sm',
60
+ pl: 0
56
61
  },
57
- alignItems: 'center',
58
- borderRadius: '4px',
59
- marginTop: 'md',
60
- fontWeight: 1
62
+ rowBox: {
63
+ alignItems: 'center',
64
+ bg: 'white',
65
+ borderRadius: '4px',
66
+ fontWeight: 1,
67
+ marginTop: 'md',
68
+ minHeight: '25px',
69
+ ml: '20px',
70
+ pl: '13px'
71
+ }
61
72
  },
62
73
  defaultText: {
63
- textTransform: 'none',
64
74
  color: 'inherit',
65
75
  fontSize: 'sm',
66
76
  fontWeight: '3'
67
- },
68
- textStyles: {
69
- pl: 'md',
70
- pr: 'sm'
71
77
  }
72
78
  };
73
79
  var allConditions = [{
74
80
  field1: 'Family Name',
81
+ field3: 'Smith',
82
+ key: 'familyNameField'
83
+ }, {
84
+ field1: 'Given Name',
75
85
  field3: 'John',
76
- key: 'FamilyNameField'
86
+ key: 'givenNameField'
77
87
  }, {
78
- field1: 'Full Name',
79
- field3: 'Alex Smith',
80
- key: 'FullNameField'
88
+ field1: 'Email',
89
+ field3: 'jsmith@company.com',
90
+ key: 'emailField'
81
91
  }];
82
92
  var anyConditions = [{
83
93
  field1: 'Group',
@@ -97,122 +107,85 @@ var noneConditions = [{
97
107
  field3: 'Banana',
98
108
  key: 'Miscellaneous2'
99
109
  }];
110
+ var ofTheConditionsAreTrueCopy = ' of the conditions are true';
100
111
  export var Display = function Display() {
101
- return ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
102
- bg: "accent.99",
103
- maxWidth: "318px",
104
- p: "sm"
105
- }, ___EmotionJSX(Box, {
106
- isRow: true
107
- }), ___EmotionJSX(Box, {
108
- isRow: true
109
- }, ___EmotionJSX(Badge, {
110
- label: "All",
111
- bg: "decorative.4",
112
- sx: customBadgeStyles
113
- }), ___EmotionJSX(Text, null, " of the conditions are true")), _mapInstanceProperty(allConditions).call(allConditions, function (item) {
114
- return ___EmotionJSX(Box, {
115
- isRow: true,
112
+ return ___EmotionJSX(Box, {
113
+ sx: sx.display.container
114
+ }, ___EmotionJSX(DisplaySectionHeader, null), _mapInstanceProperty(allConditions).call(allConditions, function (item) {
115
+ return ___EmotionJSX(DisplayRow, {
116
+ item: item,
116
117
  key: item.key
117
- }, ___EmotionJSX(Bracket, null), ___EmotionJSX(Box, {
118
- width: "100%"
119
- }, ___EmotionJSX(Box, {
120
- variant: "forms.input.fieldControlWrapper",
121
- bg: "white",
122
- isRow: true,
123
- sx: sx.allConditionsBox
124
- }, ___EmotionJSX(Text, {
125
- sx: sx.textStyles
126
- }, item.field1), ___EmotionJSX(Badge, {
127
- label: "Equals",
128
- sx: sx.equalBadgeStyles,
129
- textColor: "neutral.10"
130
- }), ___EmotionJSX(Text, null, item.field3))));
118
+ });
131
119
  }), ___EmotionJSX(Box, {
132
- isRow: true
133
- }, ___EmotionJSX(Bracket, null), ___EmotionJSX(Box, {
134
- variant: "forms.input.fieldControlWrapper",
135
- mt: "md",
136
- sx: sx.borderedBoxStyles
137
- }, ___EmotionJSX(Box, {
138
- isRow: true
139
- }, ___EmotionJSX(Badge, {
140
- label: "Any",
141
- bg: "decorative.7",
142
- sx: customBadgeStyles,
143
- alignSelf: "center"
144
- }), ___EmotionJSX(Text, null, " of the conditions are true")), ___EmotionJSX(Box, {
120
+ isRow: true,
145
121
  ml: "xs"
146
- }, _mapInstanceProperty(anyConditions).call(anyConditions, function (item, index) {
147
- return ___EmotionJSX(Box, {
148
- isRow: true,
149
- key: item.key
150
- }, ___EmotionJSX(Bracket, {
151
- ml: 0,
152
- isLast: index === anyConditions.length - 1
153
- }), ___EmotionJSX(Box, {
154
- mt: "md",
155
- variant: "forms.input.fieldControlWrapper",
156
- bg: "white",
157
- isRow: true,
158
- width: "100%",
159
- sx: _objectSpread(_objectSpread({}, sx.allConditionsBox), {}, {
160
- '&::after': {
161
- bg: 'decorative.7',
162
- width: '2px'
163
- }
164
- })
165
- }, ___EmotionJSX(Text, {
166
- sx: sx.textStyles
167
- }, item.field1), ___EmotionJSX(Badge, {
168
- label: "Equals",
169
- textColor: "neutral.10",
170
- sx: sx.equalBadgeStyles
171
- }), ___EmotionJSX(Text, null, item.field3)));
172
- })))), ___EmotionJSX(Box, {
173
- isRow: true
174
122
  }, ___EmotionJSX(Bracket, {
123
+ sx: _objectSpread(_objectSpread({}, sx.display.bracket), {}, {
124
+ height: '148px'
125
+ }),
175
126
  isLast: true
176
127
  }), ___EmotionJSX(Box, {
177
- variant: "forms.input.fieldControlWrapper",
178
- mt: "md",
179
- sx: sx.borderedBoxStyles
128
+ sx: sx.display.borderBox,
129
+ variant: "forms.input.fieldControlWrapper"
130
+ }, ___EmotionJSX(DisplaySectionHeader, {
131
+ badgeColor: "decorative.7",
132
+ label: "Any"
133
+ }), _mapInstanceProperty(anyConditions).call(anyConditions, function (item, index) {
134
+ return ___EmotionJSX(DisplayRow, {
135
+ barColor: "decorative.7",
136
+ isLast: index === anyConditions.length - 1,
137
+ item: item,
138
+ key: item.key
139
+ });
140
+ }))));
141
+ };
142
+ export var DisplayRow = function DisplayRow(_ref) {
143
+ var _ref$item = _ref.item,
144
+ item = _ref$item === void 0 ? allConditions[0] : _ref$item,
145
+ _ref$isLast = _ref.isLast,
146
+ isLast = _ref$isLast === void 0 ? false : _ref$isLast,
147
+ _ref$barColor = _ref.barColor,
148
+ barColor = _ref$barColor === void 0 ? 'decorative.4' : _ref$barColor;
149
+ return ___EmotionJSX(Box, {
150
+ isRow: true,
151
+ ml: "xs"
152
+ }, ___EmotionJSX(Bracket, {
153
+ sx: sx.display.bracket,
154
+ isLast: isLast
155
+ }), ___EmotionJSX(Box, {
156
+ width: "100%"
180
157
  }, ___EmotionJSX(Box, {
181
- isRow: true
158
+ gap: "sm",
159
+ isRow: true,
160
+ sx: _objectSpread(_objectSpread({}, sx.display.rowBox), {}, {
161
+ '&::after': {
162
+ bg: barColor,
163
+ width: '2px'
164
+ }
165
+ }),
166
+ variant: "forms.input.fieldControlWrapper"
167
+ }, ___EmotionJSX(Text, null, item.field1), ___EmotionJSX(Badge, {
168
+ label: "Equals",
169
+ sx: sx.badge.equal,
170
+ textColor: "neutral.10"
171
+ }), ___EmotionJSX(Text, null, item.field3))));
172
+ };
173
+ export var DisplaySectionHeader = function DisplaySectionHeader(_ref2) {
174
+ var _ref2$badgeColor = _ref2.badgeColor,
175
+ badgeColor = _ref2$badgeColor === void 0 ? 'decorative.4' : _ref2$badgeColor,
176
+ _ref2$label = _ref2.label,
177
+ label = _ref2$label === void 0 ? 'All' : _ref2$label;
178
+ return ___EmotionJSX(Box, {
179
+ isRow: true,
180
+ ml: "sm"
182
181
  }, ___EmotionJSX(Badge, {
183
- label: "None",
184
- bg: "accent.20",
185
- sx: customBadgeStyles,
182
+ bg: badgeColor,
183
+ label: label,
184
+ sx: sx.badge.condition
185
+ }), ___EmotionJSX(Text, {
186
+ ml: "sm",
186
187
  alignSelf: "center"
187
- }), ___EmotionJSX(Text, null, " of the conditions are true")), ___EmotionJSX(Box, {
188
- ml: "xs"
189
- }, _mapInstanceProperty(noneConditions).call(noneConditions, function (item, index) {
190
- return ___EmotionJSX(Box, {
191
- isRow: true,
192
- key: item.key
193
- }, ___EmotionJSX(Bracket, {
194
- ml: 0,
195
- isLast: index === noneConditions.length - 1
196
- }), ___EmotionJSX(Box, {
197
- mt: "md",
198
- variant: "forms.input.fieldControlWrapper",
199
- bg: "white",
200
- isRow: true,
201
- width: "100%",
202
- sx: _objectSpread(_objectSpread({}, sx.allConditionsBox), {}, {
203
- '&::after': {
204
- bg: 'accent.20',
205
- width: '2px'
206
- }
207
- })
208
- }, ___EmotionJSX(Text, {
209
- sx: sx.textStyles
210
- }, item.field1), ___EmotionJSX(Badge, {
211
- label: "Equals",
212
- textColor: "neutral.10",
213
- sx: sx.equalBadgeStyles
214
- }), ___EmotionJSX(Text, null, item.field3)));
215
- }))))));
188
+ }, ofTheConditionsAreTrueCopy));
216
189
  };
217
190
  export var Edit = function Edit() {
218
191
  var trashButton = ___EmotionJSX(IconButton, {
@@ -268,7 +241,7 @@ export var Edit = function Edit() {
268
241
  }
269
242
  }, ___EmotionJSX(Text, {
270
243
  sx: sx.defaultText
271
- }, "NONE"))), ___EmotionJSX(Text, null, " of the conditions are true"), ___EmotionJSX(Button, {
244
+ }, "NONE"))), ___EmotionJSX(Text, null, ofTheConditionsAreTrueCopy), ___EmotionJSX(Button, {
272
245
  variant: "inline",
273
246
  width: "fit-content",
274
247
  role: "button",
@@ -359,7 +332,7 @@ export var Edit = function Edit() {
359
332
  }
360
333
  }, ___EmotionJSX(Text, {
361
334
  sx: sx.defaultText
362
- }, "NONE"))), ___EmotionJSX(Text, null, " of the conditions are true"), ___EmotionJSX(Button, {
335
+ }, "NONE"))), ___EmotionJSX(Text, null, ofTheConditionsAreTrueCopy), ___EmotionJSX(Button, {
363
336
  variant: "inline",
364
337
  width: "fit-content",
365
338
  role: "button",
@@ -455,7 +428,7 @@ export var Edit = function Edit() {
455
428
  }
456
429
  }, ___EmotionJSX(Text, {
457
430
  sx: sx.defaultText
458
- }, "NONE"))), ___EmotionJSX(Text, null, " of the conditions are true"), ___EmotionJSX(Button, {
431
+ }, "NONE"))), ___EmotionJSX(Text, null, ofTheConditionsAreTrueCopy), ___EmotionJSX(Button, {
459
432
  variant: "inline",
460
433
  width: "fit-content",
461
434
  role: "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.18.1-alpha.0",
3
+ "version": "2.18.1-alpha.2",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",