@pingux/astro 1.27.0-alpha.6 → 1.27.0-alpha.7

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.
@@ -73,6 +73,40 @@ var _default = {
73
73
  };
74
74
  exports["default"] = _default;
75
75
  var buttonArray = ['Web App', 'Native App', 'Single Page App', 'Non-Interactive', 'Worker', 'Advanced Configuration', 'Built-in admin console for this environment', 'Built-in Application portal'];
76
+ var sx = {
77
+ openButton: {
78
+ height: '30px',
79
+ borderRadius: 'md',
80
+ fontSize: '13px',
81
+ mb: 'sm'
82
+ },
83
+ closeIconButton: {
84
+ position: 'absolute',
85
+ top: '14px',
86
+ right: 'sm'
87
+ },
88
+ buttonsContainer: {
89
+ p: 'lg',
90
+ flexDirection: 'initial !important',
91
+ alignContent: 'space-between',
92
+ flexWrap: 'wrap'
93
+ },
94
+ selectedButton: {
95
+ mb: 'sm',
96
+ mr: '4px',
97
+ height: '30px',
98
+ borderRadius: '15px',
99
+ fontSize: '13px'
100
+ },
101
+ unSelectedButton: {
102
+ mb: 'sm',
103
+ mr: '4px',
104
+ borderColor: 'neutral.80',
105
+ height: '30px',
106
+ borderRadius: '15px',
107
+ fontSize: '13px'
108
+ }
109
+ };
76
110
 
77
111
  var Default = function Default() {
78
112
  var buttonRef = (0, _react.useRef)();
@@ -131,14 +165,9 @@ var Default = function Default() {
131
165
 
132
166
  return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.Button, {
133
167
  ref: buttonRef,
134
- mb: "sm",
135
168
  variant: "inline",
136
169
  onPress: onChange,
137
- sx: {
138
- height: '30px',
139
- borderRadius: '15px',
140
- fontSize: '13px'
141
- }
170
+ sx: sx.openButton
142
171
  }, (0, _react2.jsx)(_index.Box, {
143
172
  isRow: true,
144
173
  alignItems: "center"
@@ -161,36 +190,15 @@ var Default = function Default() {
161
190
  onPress: function onPress() {
162
191
  return setIsOpen(false);
163
192
  },
164
- sx: {
165
- position: 'absolute',
166
- top: 14,
167
- right: 10
168
- }
193
+ sx: sx.closeIconButton
169
194
  }, (0, _react2.jsx)(_index.Icon, {
170
195
  icon: _CloseIcon["default"]
171
196
  })), (0, _react2.jsx)(_index.Box, {
172
- sx: {
173
- p: 'lg',
174
- flexDirection: 'initial !important',
175
- alignContent: 'space-between',
176
- flexWrap: 'wrap'
177
- }
197
+ sx: sx.buttonsContainer
178
198
  }, (0, _map["default"])(buttonArray).call(buttonArray, function (item) {
179
199
  return (0, _react2.jsx)(_index.Button, {
180
- mb: "sm",
181
200
  variant: "inline",
182
- sx: (0, _includes["default"])(selectedButtons).call(selectedButtons, item) ? {
183
- mr: '4px',
184
- height: '30px',
185
- borderRadius: '15px',
186
- fontSize: '13px'
187
- } : {
188
- mr: '4px',
189
- borderColor: 'neutral.80',
190
- height: '30px',
191
- borderRadius: '15px',
192
- fontSize: '13px'
193
- },
201
+ sx: (0, _includes["default"])(selectedButtons).call(selectedButtons, item) ? sx.selectedButton : sx.unSelectedButton,
194
202
  key: item,
195
203
  onPress: function onPress() {
196
204
  return toggleButton(item);
@@ -54,6 +54,13 @@ var _default = {
54
54
  }
55
55
  };
56
56
  exports["default"] = _default;
57
+ var sx = {
58
+ showHideButton: {
59
+ width: 'fit-content',
60
+ marginLeft: 'sm',
61
+ alignSelf: 'auto'
62
+ }
63
+ };
57
64
 
58
65
  var Default = function Default(_ref) {
59
66
  var _context;
@@ -84,11 +91,7 @@ var Default = function Default(_ref) {
84
91
  onPress: function onPress() {
85
92
  return setIsMasked(!isMasked);
86
93
  },
87
- sx: {
88
- width: 'fit-content',
89
- marginLeft: 10,
90
- alignSelf: 'auto'
91
- }
94
+ sx: sx.showHideButton
92
95
  }, (0, _react2.jsx)(_index.Icon, {
93
96
  icon: isMasked ? _EyeOffOutlineIcon["default"] : _EyeOutlineIcon["default"]
94
97
  }))));
@@ -20,12 +20,15 @@ var _default = {
20
20
  title: 'Recipes/NeutralCheckboxField'
21
21
  };
22
22
  exports["default"] = _default;
23
+ var sx = {
24
+ checkboxColor: {
25
+ color: 'neutral.10'
26
+ }
27
+ };
23
28
 
24
29
  var Default = function Default() {
25
30
  return (0, _react2.jsx)(_CheckboxField["default"], {
26
- controlProps: {
27
- color: 'neutral.10'
28
- }
31
+ sx: sx.checkboxColor
29
32
  }, "Click me");
30
33
  };
31
34
 
@@ -31,6 +31,40 @@ export default {
31
31
  title: 'Recipes/FlippableCaretMenuButton'
32
32
  };
33
33
  var buttonArray = ['Web App', 'Native App', 'Single Page App', 'Non-Interactive', 'Worker', 'Advanced Configuration', 'Built-in admin console for this environment', 'Built-in Application portal'];
34
+ var sx = {
35
+ openButton: {
36
+ height: '30px',
37
+ borderRadius: 'md',
38
+ fontSize: '13px',
39
+ mb: 'sm'
40
+ },
41
+ closeIconButton: {
42
+ position: 'absolute',
43
+ top: '14px',
44
+ right: 'sm'
45
+ },
46
+ buttonsContainer: {
47
+ p: 'lg',
48
+ flexDirection: 'initial !important',
49
+ alignContent: 'space-between',
50
+ flexWrap: 'wrap'
51
+ },
52
+ selectedButton: {
53
+ mb: 'sm',
54
+ mr: '4px',
55
+ height: '30px',
56
+ borderRadius: '15px',
57
+ fontSize: '13px'
58
+ },
59
+ unSelectedButton: {
60
+ mb: 'sm',
61
+ mr: '4px',
62
+ borderColor: 'neutral.80',
63
+ height: '30px',
64
+ borderRadius: '15px',
65
+ fontSize: '13px'
66
+ }
67
+ };
34
68
  export var Default = function Default() {
35
69
  var buttonRef = useRef();
36
70
  var popoverRef = useRef();
@@ -89,14 +123,9 @@ export var Default = function Default() {
89
123
 
90
124
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Button, {
91
125
  ref: buttonRef,
92
- mb: "sm",
93
126
  variant: "inline",
94
127
  onPress: onChange,
95
- sx: {
96
- height: '30px',
97
- borderRadius: '15px',
98
- fontSize: '13px'
99
- }
128
+ sx: sx.openButton
100
129
  }, ___EmotionJSX(Box, {
101
130
  isRow: true,
102
131
  alignItems: "center"
@@ -119,36 +148,15 @@ export var Default = function Default() {
119
148
  onPress: function onPress() {
120
149
  return setIsOpen(false);
121
150
  },
122
- sx: {
123
- position: 'absolute',
124
- top: 14,
125
- right: 10
126
- }
151
+ sx: sx.closeIconButton
127
152
  }, ___EmotionJSX(Icon, {
128
153
  icon: CloseIcon
129
154
  })), ___EmotionJSX(Box, {
130
- sx: {
131
- p: 'lg',
132
- flexDirection: 'initial !important',
133
- alignContent: 'space-between',
134
- flexWrap: 'wrap'
135
- }
155
+ sx: sx.buttonsContainer
136
156
  }, _mapInstanceProperty(buttonArray).call(buttonArray, function (item) {
137
157
  return ___EmotionJSX(Button, {
138
- mb: "sm",
139
158
  variant: "inline",
140
- sx: _includesInstanceProperty(selectedButtons).call(selectedButtons, item) ? {
141
- mr: '4px',
142
- height: '30px',
143
- borderRadius: '15px',
144
- fontSize: '13px'
145
- } : {
146
- mr: '4px',
147
- borderColor: 'neutral.80',
148
- height: '30px',
149
- borderRadius: '15px',
150
- fontSize: '13px'
151
- },
159
+ sx: _includesInstanceProperty(selectedButtons).call(selectedButtons, item) ? sx.selectedButton : sx.unSelectedButton,
152
160
  key: item,
153
161
  onPress: function onPress() {
154
162
  return toggleButton(item);
@@ -23,6 +23,13 @@ export default {
23
23
  }
24
24
  }
25
25
  };
26
+ var sx = {
27
+ showHideButton: {
28
+ width: 'fit-content',
29
+ marginLeft: 'sm',
30
+ alignSelf: 'auto'
31
+ }
32
+ };
26
33
  export var Default = function Default(_ref) {
27
34
  var _context;
28
35
 
@@ -52,11 +59,7 @@ export var Default = function Default(_ref) {
52
59
  onPress: function onPress() {
53
60
  return setIsMasked(!isMasked);
54
61
  },
55
- sx: {
56
- width: 'fit-content',
57
- marginLeft: 10,
58
- alignSelf: 'auto'
59
- }
62
+ sx: sx.showHideButton
60
63
  }, ___EmotionJSX(Icon, {
61
64
  icon: isMasked ? EyeOffIcon : EyeIcon
62
65
  }))));
@@ -4,10 +4,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
4
4
  export default {
5
5
  title: 'Recipes/NeutralCheckboxField'
6
6
  };
7
+ var sx = {
8
+ checkboxColor: {
9
+ color: 'neutral.10'
10
+ }
11
+ };
7
12
  export var Default = function Default() {
8
13
  return ___EmotionJSX(CheckboxField, {
9
- controlProps: {
10
- color: 'neutral.10'
11
- }
14
+ sx: sx.checkboxColor
12
15
  }, "Click me");
13
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.27.0-alpha.6",
3
+ "version": "1.27.0-alpha.7",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",