@pingux/astro 0.41.0 → 1.0.0-alpha.10
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 +132 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +1 -1
- package/lib/cjs/components/AccordionItem/AccordionItem.js +3 -1
- package/lib/cjs/components/CopyText/CopyText.js +3 -73
- package/lib/cjs/components/FileInputField/FileInputField.js +324 -0
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +250 -0
- package/lib/cjs/components/FileInputField/FileInputField.test.js +227 -0
- package/lib/cjs/components/FileInputField/FileItem.js +125 -0
- package/lib/cjs/components/FileInputField/FileSelect.js +48 -0
- package/lib/cjs/components/FileInputField/index.js +18 -0
- package/lib/cjs/components/ListView/ListView.js +2 -1
- package/lib/cjs/components/ListViewItem/ListViewItem.js +14 -6
- package/lib/cjs/components/NumberField/NumberField.js +4 -2
- package/lib/cjs/components/NumberField/NumberField.test.js +15 -0
- package/lib/cjs/components/Tab/Tab.js +11 -4
- package/lib/cjs/components/Tabs/Tabs.js +7 -1
- package/lib/cjs/components/Tabs/Tabs.stories.js +60 -6
- package/lib/cjs/components/Tabs/Tabs.test.js +78 -15
- package/lib/cjs/hooks/useCopyToClipboard/index.js +18 -0
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +83 -0
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.test.js +79 -0
- package/lib/cjs/index.js +10 -0
- package/lib/cjs/recipes/ApplicationSearchDropdown.stories.js +310 -0
- package/lib/cjs/recipes/CopyToClipboard.stories.js +45 -0
- package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +146 -0
- package/lib/cjs/recipes/RowLineChart.stories.js +6 -1
- package/lib/cjs/recipes/ScrollableListView.stories.js +1 -1
- package/lib/cjs/styles/forms/input.js +11 -0
- package/lib/cjs/styles/variants/accordion.js +2 -2
- package/lib/cjs/styles/variants/boxes.js +23 -0
- package/lib/cjs/styles/variants/buttons.js +56 -1
- package/lib/cjs/styles/variants/tabs.js +1 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.js +1 -1
- package/lib/components/AccordionItem/AccordionItem.js +3 -1
- package/lib/components/CopyText/CopyText.js +2 -71
- package/lib/components/FileInputField/FileInputField.js +280 -0
- package/lib/components/FileInputField/FileInputField.stories.js +206 -0
- package/lib/components/FileInputField/FileInputField.test.js +187 -0
- package/lib/components/FileInputField/FileItem.js +100 -0
- package/lib/components/FileInputField/FileSelect.js +31 -0
- package/lib/components/FileInputField/index.js +1 -0
- package/lib/components/ListView/ListView.js +2 -1
- package/lib/components/ListViewItem/ListViewItem.js +14 -6
- package/lib/components/NumberField/NumberField.js +4 -2
- package/lib/components/NumberField/NumberField.test.js +9 -0
- package/lib/components/Tab/Tab.js +11 -4
- package/lib/components/Tabs/Tabs.js +7 -1
- package/lib/components/Tabs/Tabs.stories.js +56 -4
- package/lib/components/Tabs/Tabs.test.js +78 -15
- package/lib/hooks/useCopyToClipboard/index.js +1 -0
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.js +69 -0
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.test.js +64 -0
- package/lib/index.js +1 -0
- package/lib/recipes/ApplicationSearchDropdown.stories.js +272 -0
- package/lib/recipes/CopyToClipboard.stories.js +25 -0
- package/lib/recipes/RadioButtonsWithLinks.stories.js +120 -0
- package/lib/recipes/RowLineChart.stories.js +6 -1
- package/lib/recipes/ScrollableListView.stories.js +1 -1
- package/lib/styles/forms/input.js +11 -0
- package/lib/styles/variants/accordion.js +2 -2
- package/lib/styles/variants/boxes.js +23 -0
- package/lib/styles/variants/buttons.js +56 -1
- package/lib/styles/variants/tabs.js +1 -0
- package/package.json +3 -2
@@ -0,0 +1,310 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
|
4
|
+
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
6
|
+
|
7
|
+
var _Object$defineProperty2 = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
8
|
+
|
9
|
+
_Object$defineProperty2(exports, "__esModule", {
|
10
|
+
value: true
|
11
|
+
});
|
12
|
+
|
13
|
+
exports.Default = exports["default"] = void 0;
|
14
|
+
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
|
16
|
+
|
17
|
+
var _defineProperties = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-properties"));
|
18
|
+
|
19
|
+
var _getOwnPropertyDescriptors = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors"));
|
20
|
+
|
21
|
+
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
22
|
+
|
23
|
+
var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor"));
|
24
|
+
|
25
|
+
var _getOwnPropertySymbols = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols"));
|
26
|
+
|
27
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
28
|
+
|
29
|
+
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
30
|
+
|
31
|
+
var _startsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/starts-with"));
|
32
|
+
|
33
|
+
var _defineProperty3 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
34
|
+
|
35
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
36
|
+
|
37
|
+
var _react = _interopRequireWildcard(require("react"));
|
38
|
+
|
39
|
+
var _overlays = require("@react-aria/overlays");
|
40
|
+
|
41
|
+
var _utils = require("@react-aria/utils");
|
42
|
+
|
43
|
+
var _SearchIcon = _interopRequireDefault(require("mdi-react/SearchIcon"));
|
44
|
+
|
45
|
+
var _EmailIcon = _interopRequireDefault(require("mdi-react/EmailIcon"));
|
46
|
+
|
47
|
+
var _PinIcon = _interopRequireDefault(require("mdi-react/PinIcon"));
|
48
|
+
|
49
|
+
var _i18n = require("@react-aria/i18n");
|
50
|
+
|
51
|
+
var _focus = require("@react-aria/focus");
|
52
|
+
|
53
|
+
var _index = require("../index");
|
54
|
+
|
55
|
+
var _react2 = require("@emotion/react");
|
56
|
+
|
57
|
+
function ownKeys(object, enumerableOnly) { var keys = (0, _keys["default"])(object); if (_getOwnPropertySymbols["default"]) { var symbols = (0, _getOwnPropertySymbols["default"])(object); if (enumerableOnly) symbols = (0, _filter["default"])(symbols).call(symbols, function (sym) { return (0, _getOwnPropertyDescriptor["default"])(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
58
|
+
|
59
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; (0, _forEach["default"])(_context = ownKeys(Object(source), true)).call(_context, function (key) { (0, _defineProperty3["default"])(target, key, source[key]); }); } else if (_getOwnPropertyDescriptors["default"]) { (0, _defineProperties["default"])(target, (0, _getOwnPropertyDescriptors["default"])(source)); } else { var _context2; (0, _forEach["default"])(_context2 = ownKeys(Object(source))).call(_context2, function (key) { (0, _defineProperty2["default"])(target, key, (0, _getOwnPropertyDescriptor["default"])(source, key)); }); } } return target; }
|
60
|
+
|
61
|
+
var _default = {
|
62
|
+
title: 'Recipes/ApplicationSearchDropdown'
|
63
|
+
};
|
64
|
+
exports["default"] = _default;
|
65
|
+
var items = [{
|
66
|
+
key: 'Gmail',
|
67
|
+
application: 'Gmail',
|
68
|
+
description: 'Googles most finest email app used by bazillions of people',
|
69
|
+
logo: _EmailIcon["default"],
|
70
|
+
id: '1'
|
71
|
+
}, {
|
72
|
+
key: 'GAPG',
|
73
|
+
application: 'Google Apps Password Generator',
|
74
|
+
description: 'Generate passwords for all your Google Apps',
|
75
|
+
logo: _EmailIcon["default"],
|
76
|
+
id: '2'
|
77
|
+
}, {
|
78
|
+
key: 'GCalendar',
|
79
|
+
application: 'Google Calendar',
|
80
|
+
description: 'Get your life organized and never miss an appointment again',
|
81
|
+
logo: _EmailIcon["default"],
|
82
|
+
id: '3'
|
83
|
+
}, {
|
84
|
+
key: 'GDrive',
|
85
|
+
application: 'Google Drive',
|
86
|
+
description: 'Store all of your precious files up in the clouds',
|
87
|
+
logo: _EmailIcon["default"],
|
88
|
+
id: '4'
|
89
|
+
}, {
|
90
|
+
key: 'Gmail2',
|
91
|
+
application: 'Gmail2',
|
92
|
+
description: 'Googles most finest email app used by bazillions of people',
|
93
|
+
logo: _EmailIcon["default"],
|
94
|
+
id: '5'
|
95
|
+
}, {
|
96
|
+
key: 'GAPG2',
|
97
|
+
application: 'Google Apps Password Generator2',
|
98
|
+
description: 'Generate passwords for all your Google Apps',
|
99
|
+
logo: _EmailIcon["default"],
|
100
|
+
id: '6'
|
101
|
+
}, {
|
102
|
+
key: 'GCalendar2',
|
103
|
+
application: 'Google Calendar2',
|
104
|
+
description: 'Get your life organized and never miss an appointment again',
|
105
|
+
logo: _EmailIcon["default"],
|
106
|
+
id: '7'
|
107
|
+
}, {
|
108
|
+
key: 'GDrive2',
|
109
|
+
application: 'Google Drive2',
|
110
|
+
description: 'Store all of your precious files up in the clouds',
|
111
|
+
logo: _EmailIcon["default"],
|
112
|
+
id: '8'
|
113
|
+
}];
|
114
|
+
|
115
|
+
var Default = function Default() {
|
116
|
+
var buttonRef = (0, _react.useRef)();
|
117
|
+
var popoverRef = (0, _react.useRef)();
|
118
|
+
|
119
|
+
var _useState = (0, _react.useState)(false),
|
120
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
121
|
+
isOpen = _useState2[0],
|
122
|
+
setIsOpen = _useState2[1];
|
123
|
+
|
124
|
+
var focusManager = (0, _focus.createFocusManager)(popoverRef);
|
125
|
+
|
126
|
+
var _useOverlayPosition = (0, _overlays.useOverlayPosition)({
|
127
|
+
targetRef: buttonRef,
|
128
|
+
overlayRef: popoverRef,
|
129
|
+
placement: 'bottom left',
|
130
|
+
isOpen: true
|
131
|
+
}),
|
132
|
+
overlayProps = _useOverlayPosition.overlayProps,
|
133
|
+
placement = _useOverlayPosition.placement,
|
134
|
+
updatePosition = _useOverlayPosition.updatePosition;
|
135
|
+
|
136
|
+
(0, _utils.useLayoutEffect)(function () {
|
137
|
+
requestAnimationFrame(function () {
|
138
|
+
updatePosition();
|
139
|
+
});
|
140
|
+
}, [updatePosition]);
|
141
|
+
|
142
|
+
var style = _objectSpread(_objectSpread({}, overlayProps.style), {}, {
|
143
|
+
minWidth: '380px',
|
144
|
+
maxHeight: '320px',
|
145
|
+
// shows 4 options
|
146
|
+
'& > div': {}
|
147
|
+
});
|
148
|
+
|
149
|
+
var _useFilter = (0, _i18n.useFilter)({
|
150
|
+
sensitivity: 'base'
|
151
|
+
}),
|
152
|
+
startsWith = (0, _startsWith["default"])(_useFilter);
|
153
|
+
|
154
|
+
var _useState3 = (0, _react.useState)(''),
|
155
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
156
|
+
filterValue = _useState4[0],
|
157
|
+
setFilterValue = _useState4[1];
|
158
|
+
|
159
|
+
var filteredItems = (0, _react.useMemo)(function () {
|
160
|
+
return (0, _filter["default"])(items).call(items, function (item) {
|
161
|
+
return startsWith(item.application, filterValue);
|
162
|
+
});
|
163
|
+
}, [items, filterValue]);
|
164
|
+
|
165
|
+
var onKeyDown = function onKeyDown(e) {
|
166
|
+
if (e.key === 'ArrowDown') {
|
167
|
+
focusManager.focusNext();
|
168
|
+
}
|
169
|
+
};
|
170
|
+
|
171
|
+
var InnerHtml = function InnerHtml(props) {
|
172
|
+
var _useState5 = (0, _react.useState)(false),
|
173
|
+
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
174
|
+
isPinned = _useState6[0],
|
175
|
+
setIsPinned = _useState6[1];
|
176
|
+
|
177
|
+
var item = props.item;
|
178
|
+
|
179
|
+
var onPinPress = function onPinPress() {
|
180
|
+
setIsPinned(!isPinned);
|
181
|
+
};
|
182
|
+
|
183
|
+
return (0, _react2.jsx)(_index.Box, {
|
184
|
+
isRow: true
|
185
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
186
|
+
icon: item.logo,
|
187
|
+
mr: "md",
|
188
|
+
color: "text.primary",
|
189
|
+
size: 40,
|
190
|
+
alignSelf: "center",
|
191
|
+
ml: "-10px"
|
192
|
+
}), (0, _react2.jsx)(_index.Box, {
|
193
|
+
alignSelf: "center",
|
194
|
+
sx: {
|
195
|
+
maxWidth: '260px'
|
196
|
+
}
|
197
|
+
}, (0, _react2.jsx)(_index.Text, {
|
198
|
+
variant: "itemTitle",
|
199
|
+
alignSelf: "center",
|
200
|
+
mr: "auto",
|
201
|
+
sx: {
|
202
|
+
fontWeight: '700'
|
203
|
+
}
|
204
|
+
}, item.application), (0, _react2.jsx)(_index.Text, {
|
205
|
+
variant: "itemSubtitle",
|
206
|
+
alignSelf: "center",
|
207
|
+
mr: "auto",
|
208
|
+
sx: {
|
209
|
+
fontSize: '15px'
|
210
|
+
}
|
211
|
+
}, item.description)), (0, _react2.jsx)(_index.Box, {
|
212
|
+
alignSelf: "center"
|
213
|
+
}, (0, _react2.jsx)(_index.IconButton, {
|
214
|
+
"aria-label": "Pin ".concat(item.application),
|
215
|
+
ml: "md",
|
216
|
+
alignSelf: "center",
|
217
|
+
onPress: function onPress() {
|
218
|
+
return onPinPress();
|
219
|
+
},
|
220
|
+
sx: {
|
221
|
+
'&.is-hovered': {
|
222
|
+
bg: 'transparent'
|
223
|
+
},
|
224
|
+
'&.is-pressed': {
|
225
|
+
'path': {
|
226
|
+
fill: 'active'
|
227
|
+
}
|
228
|
+
}
|
229
|
+
}
|
230
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
231
|
+
icon: _PinIcon["default"],
|
232
|
+
sx: {
|
233
|
+
transform: 'rotate(45deg)',
|
234
|
+
'& > path': {
|
235
|
+
fill: isPinned ? 'success.bright' : 'neutral.50'
|
236
|
+
}
|
237
|
+
}
|
238
|
+
}))));
|
239
|
+
};
|
240
|
+
|
241
|
+
return (0, _react2.jsx)(_index.Box, {
|
242
|
+
isRow: true
|
243
|
+
}, (0, _react2.jsx)(_focus.FocusScope, null, (0, _react2.jsx)(_index.SearchField, {
|
244
|
+
ref: buttonRef,
|
245
|
+
icon: _SearchIcon["default"],
|
246
|
+
"aria-label": "Search Groups",
|
247
|
+
width: "380px",
|
248
|
+
controlProps: {
|
249
|
+
sx: {
|
250
|
+
borderRadius: '20px'
|
251
|
+
}
|
252
|
+
},
|
253
|
+
inputValue: filterValue,
|
254
|
+
onChange: setFilterValue,
|
255
|
+
onKeyUp: onKeyDown,
|
256
|
+
mr: "lg",
|
257
|
+
onFocus: function onFocus() {
|
258
|
+
return setIsOpen(true);
|
259
|
+
},
|
260
|
+
onBlur: function onBlur() {
|
261
|
+
return setIsOpen(false);
|
262
|
+
}
|
263
|
+
}), (0, _react2.jsx)(_index.PopoverContainer, {
|
264
|
+
isOpen: isOpen && filteredItems.length > 0,
|
265
|
+
hasNoArrow: true,
|
266
|
+
isNonModal: true,
|
267
|
+
isDismissable: false,
|
268
|
+
ref: popoverRef,
|
269
|
+
placement: placement,
|
270
|
+
style: style,
|
271
|
+
type: "grid",
|
272
|
+
onFocus: function onFocus() {
|
273
|
+
return setIsOpen(true);
|
274
|
+
},
|
275
|
+
onBlur: function onBlur() {
|
276
|
+
return setIsOpen(false);
|
277
|
+
}
|
278
|
+
}, (0, _react2.jsx)(_index.ListView, {
|
279
|
+
items: filteredItems,
|
280
|
+
onSelectionChange: function onSelectionChange() {
|
281
|
+
return setIsOpen(!isOpen);
|
282
|
+
},
|
283
|
+
rowProps: {
|
284
|
+
sx: {
|
285
|
+
bg: 'red',
|
286
|
+
padding: '-4px'
|
287
|
+
}
|
288
|
+
},
|
289
|
+
padding: "-4px"
|
290
|
+
}, function (item) {
|
291
|
+
return (0, _react2.jsx)(_index.Item, {
|
292
|
+
key: item.name,
|
293
|
+
textValue: item.name,
|
294
|
+
"data-id": item.key,
|
295
|
+
hasSeparator: false,
|
296
|
+
listItemProps: {
|
297
|
+
sx: {
|
298
|
+
bg: 'white',
|
299
|
+
'&.is-hovered': {
|
300
|
+
bg: 'accent.99'
|
301
|
+
}
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}, (0, _react2.jsx)(InnerHtml, {
|
305
|
+
item: item
|
306
|
+
}));
|
307
|
+
}))));
|
308
|
+
};
|
309
|
+
|
310
|
+
exports.Default = Default;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
|
11
|
+
exports.Default = exports["default"] = void 0;
|
12
|
+
|
13
|
+
var _react = _interopRequireDefault(require("react"));
|
14
|
+
|
15
|
+
var _index = require("../index");
|
16
|
+
|
17
|
+
var _useCopyToClipboard = _interopRequireDefault(require("../hooks/useCopyToClipboard"));
|
18
|
+
|
19
|
+
var _react2 = require("@emotion/react");
|
20
|
+
|
21
|
+
var _default = {
|
22
|
+
title: 'Recipes/CopyToClipboard'
|
23
|
+
};
|
24
|
+
exports["default"] = _default;
|
25
|
+
|
26
|
+
var Default = function Default() {
|
27
|
+
var textToCopy = 'eyJraWQiOiI4YTg5MmY3ZS1iNTk1LTRkYWQtODBlNC0yMzA4ODkyZTczZDQiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodHRwczovL2FwaS5waW5nb25lLmNvbSIsImF1dGhVcmwiOiJodHRwczovL2F1dGgucGluZ29uZS5jb20iLCJjb25zb2xlVXJsIjoiaHR0cHM6Ly9jb25zb2xlLnBpbmdvbmUuY29tIiwiZW52aXJvbm1lbnROYW1lIjoiTW9udGFuYSIsImVudmlyb25tZW50SWQiOiJhYzc2NWQ0Ny1kMDM2LTQ1MGUtODFjMS1mYjQ1NDMxMjM1NjYiLCJvcmdhbml6YXRpb25OYW1lIjoiaW50ZXJuYWxfZXJpa2FhbGRlYm9yZ2hfMjUyMDc1MDMxIiwib3JnYW5pemF0aW9uSWQiOiJkMDYzMmYwZi03YjQ2LTQ5ZjUtYjgyYS1kZWU5MWQ3MDY3ODYiLCJnYXRld2F5TmFtZSI6ImRzZHMiLCJnYXRld2F5SWQiOiJiMDVmNGU5Yy1jMzRiLTRlZTMtYTYyNS01ZGFiNjlkYTE1YTEiLCJnYXRld2F5VHlwZSI6IlBJTkdfRkVERVJBVEUiLCJ0YXJnZXRDbHVzdGVyRW52aXJvbm1lbnQiOiJQUk9EIiwidGFyZ2V0R2VvZ3JhcGh5IjoiTkEiLCJyZWdpb24iOiJOb3J0aCBBbWVyaWNhIiwianRpIjoiMTUwYTQ0OTktZjIyYi00YWVhLWIzY2UtYWM2YWY1NjVjNjk5IiwiaXNzIjoid3NzOi8vZ2F0ZXdheXMucGluZ29uZS5jb20iLCJpYXQiOjE2MjYyODEyMTZ9.JJ9wwqTxQWUwz2vmU0yE54xuYff51xbirzZuEUxd8GDzV45bnpbmx460CY8g9ccdmOjvfVF4RPPsawpKuMZH271tDlLZl67iknxDVWBZSih9K6v0RAmsmNriR4OyOFOkGrULCIz3ISyPWeItp1AVuue_8guWR63KzYg32aPC4SgmOrc2myq9N6XNU2H1KybETbG_s5-VU_cUqaXn7GUzhL2_W6CSVrrlE1cYfjC7pxMKFm4vvIw_KcNYVGO1K6oYgzRZ4A8toQHIdlGB8L-wkCt442LdC93OjoQdkLuGzmXnO8BUohWea-Dn35gGHoH-H1BRQTya_H9AKyWMxCw-vg';
|
28
|
+
var copyToClipboard = (0, _useCopyToClipboard["default"])(textToCopy);
|
29
|
+
return (0, _react2.jsx)(_index.Box, {
|
30
|
+
bg: "accent.99",
|
31
|
+
py: "md",
|
32
|
+
px: "xl"
|
33
|
+
}, (0, _react2.jsx)(_index.Text, {
|
34
|
+
sx: {
|
35
|
+
wordBreak: 'break-all'
|
36
|
+
}
|
37
|
+
}, textToCopy), (0, _react2.jsx)(_index.Button, {
|
38
|
+
variant: "inline",
|
39
|
+
my: "lg",
|
40
|
+
onPress: copyToClipboard,
|
41
|
+
"aria-label": "Copy Text To Clipboard"
|
42
|
+
}, "Copy To Clipboard"));
|
43
|
+
};
|
44
|
+
|
45
|
+
exports.Default = Default;
|
@@ -0,0 +1,146 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
|
4
|
+
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
6
|
+
|
7
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
8
|
+
|
9
|
+
_Object$defineProperty(exports, "__esModule", {
|
10
|
+
value: true
|
11
|
+
});
|
12
|
+
|
13
|
+
exports.Default = exports["default"] = void 0;
|
14
|
+
|
15
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
16
|
+
|
17
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
18
|
+
|
19
|
+
var _react = _interopRequireWildcard(require("react"));
|
20
|
+
|
21
|
+
var _CloseIcon = _interopRequireDefault(require("mdi-react/CloseIcon"));
|
22
|
+
|
23
|
+
var _index = require("../index");
|
24
|
+
|
25
|
+
var _RadioField = _interopRequireDefault(require("../components/RadioField"));
|
26
|
+
|
27
|
+
var _RadioGroupField = _interopRequireDefault(require("../components/RadioGroupField"));
|
28
|
+
|
29
|
+
var _react2 = require("@emotion/react");
|
30
|
+
|
31
|
+
var _default = {
|
32
|
+
title: 'Recipes/RadioButtonsWithLinks'
|
33
|
+
};
|
34
|
+
exports["default"] = _default;
|
35
|
+
|
36
|
+
var Default = function Default() {
|
37
|
+
var roles = [{
|
38
|
+
name: 'Client Application Developer'
|
39
|
+
}, {
|
40
|
+
name: 'Environment Admin',
|
41
|
+
isDisabled: true
|
42
|
+
}, {
|
43
|
+
name: 'Identity Data Admin',
|
44
|
+
isDisabled: true
|
45
|
+
}, {
|
46
|
+
name: 'Organization Admin'
|
47
|
+
}];
|
48
|
+
var titleSx = {
|
49
|
+
fontSize: 'md',
|
50
|
+
color: 'neutral.20',
|
51
|
+
fontWeight: 2
|
52
|
+
};
|
53
|
+
var subtitleSx = {
|
54
|
+
fontSize: 'md',
|
55
|
+
color: 'neutral.10'
|
56
|
+
};
|
57
|
+
|
58
|
+
var RadioFieldWithButton = function RadioFieldWithButton(_ref) {
|
59
|
+
var fieldName = _ref.fieldName,
|
60
|
+
isDisabled = _ref.isDisabled;
|
61
|
+
|
62
|
+
var _useState = (0, _react.useState)(false),
|
63
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
64
|
+
isOpen = _useState2[0],
|
65
|
+
setIsOpen = _useState2[1];
|
66
|
+
|
67
|
+
return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
|
68
|
+
isRow: true,
|
69
|
+
alignItems: "center"
|
70
|
+
}, (0, _react2.jsx)(_RadioField["default"], {
|
71
|
+
value: fieldName,
|
72
|
+
label: fieldName,
|
73
|
+
isDisabled: isDisabled
|
74
|
+
}), (0, _react2.jsx)(_index.Button, {
|
75
|
+
variant: "text",
|
76
|
+
mb: "xs",
|
77
|
+
ml: "md",
|
78
|
+
onPress: function onPress() {
|
79
|
+
return setIsOpen(function (prev) {
|
80
|
+
return !prev;
|
81
|
+
});
|
82
|
+
},
|
83
|
+
isDisabled: isDisabled
|
84
|
+
}, "".concat(isOpen ? 'Hide' : 'Show', " Permissions"))), isOpen && (0, _react2.jsx)(PermissionsList, {
|
85
|
+
onPress: function onPress() {
|
86
|
+
return setIsOpen(false);
|
87
|
+
}
|
88
|
+
}));
|
89
|
+
};
|
90
|
+
|
91
|
+
var PermissionsList = function PermissionsList(_ref2) {
|
92
|
+
var onPress = _ref2.onPress;
|
93
|
+
return (0, _react2.jsx)(_index.Box, {
|
94
|
+
p: "md",
|
95
|
+
bg: "neutral.95"
|
96
|
+
}, (0, _react2.jsx)(_index.Box, {
|
97
|
+
isRow: true,
|
98
|
+
justifyContent: "space-between",
|
99
|
+
mb: "sm"
|
100
|
+
}, (0, _react2.jsx)(_index.Text, {
|
101
|
+
sx: {
|
102
|
+
fontWeight: 2
|
103
|
+
}
|
104
|
+
}, "Permissions"), (0, _react2.jsx)(_index.IconButton, {
|
105
|
+
onPress: onPress
|
106
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
107
|
+
icon: _CloseIcon["default"]
|
108
|
+
}))), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
|
109
|
+
sx: titleSx,
|
110
|
+
mb: "xs"
|
111
|
+
}, "Resource"), (0, _react2.jsx)(_index.Text, {
|
112
|
+
sx: subtitleSx,
|
113
|
+
mb: "sm"
|
114
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), (0, _react2.jsx)(_index.Text, {
|
115
|
+
sx: titleSx,
|
116
|
+
mb: "xs"
|
117
|
+
}, "Push Credentials"), (0, _react2.jsx)(_index.Text, {
|
118
|
+
sx: subtitleSx,
|
119
|
+
mb: "sm"
|
120
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod"), (0, _react2.jsx)(_index.Text, {
|
121
|
+
sx: titleSx,
|
122
|
+
mb: "xs"
|
123
|
+
}, "Organization"), (0, _react2.jsx)(_index.Text, {
|
124
|
+
sx: subtitleSx,
|
125
|
+
mb: "sm"
|
126
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco"), (0, _react2.jsx)(_index.Text, {
|
127
|
+
sx: titleSx,
|
128
|
+
mb: "xs"
|
129
|
+
}, "Image"), (0, _react2.jsx)(_index.Text, {
|
130
|
+
sx: subtitleSx,
|
131
|
+
mb: "sm"
|
132
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod")));
|
133
|
+
};
|
134
|
+
|
135
|
+
return (0, _react2.jsx)(_RadioGroupField["default"], null, (0, _map["default"])(roles).call(roles, function (_ref3) {
|
136
|
+
var name = _ref3.name,
|
137
|
+
isDisabled = _ref3.isDisabled;
|
138
|
+
return (0, _react2.jsx)(RadioFieldWithButton, {
|
139
|
+
fieldName: name,
|
140
|
+
isDisabled: isDisabled,
|
141
|
+
key: name
|
142
|
+
});
|
143
|
+
}));
|
144
|
+
};
|
145
|
+
|
146
|
+
exports.Default = Default;
|
@@ -31,7 +31,12 @@ var _index = require("../index");
|
|
31
31
|
var _react2 = require("@emotion/react");
|
32
32
|
|
33
33
|
var _default = {
|
34
|
-
title: 'Recipes/RowLineChart'
|
34
|
+
title: 'Recipes/RowLineChart',
|
35
|
+
parameters: {
|
36
|
+
chromatic: {
|
37
|
+
diffThreshold: 0.9
|
38
|
+
}
|
39
|
+
}
|
35
40
|
};
|
36
41
|
exports["default"] = _default;
|
37
42
|
var chartData = [{
|
@@ -71,6 +71,17 @@ var input = _objectSpread(_objectSpread({}, _text.text.inputValue), {}, {
|
|
71
71
|
'&::placeholder': _text.text.placeholder,
|
72
72
|
'&::-ms-expand': {
|
73
73
|
display: 'none'
|
74
|
+
},
|
75
|
+
'&::-webkit-contacts-auto-fill-button, &::-webkit-credentials-auto-fill-button': {
|
76
|
+
visibility: 'hidden',
|
77
|
+
display: 'none !important',
|
78
|
+
pointerEvents: 'none',
|
79
|
+
height: 0,
|
80
|
+
width: 0,
|
81
|
+
margin: 0
|
82
|
+
},
|
83
|
+
'&::-ms-reveal, &::-ms-clear': {
|
84
|
+
display: 'none'
|
74
85
|
}
|
75
86
|
}); // Example variant input
|
76
87
|
|
@@ -23,12 +23,12 @@ var accordionTitle = {
|
|
23
23
|
var accordion = {
|
24
24
|
display: 'flex',
|
25
25
|
mt: '5px',
|
26
|
-
mb: '
|
26
|
+
mb: '20px',
|
27
27
|
alignItems: 'flex-start'
|
28
28
|
};
|
29
29
|
var accordionBody = {
|
30
30
|
display: 'none !important',
|
31
|
-
|
31
|
+
pt: 'md',
|
32
32
|
width: '100%',
|
33
33
|
'.is-open &': {
|
34
34
|
display: 'flex !important'
|
@@ -250,6 +250,28 @@ var datePicker = {
|
|
250
250
|
}
|
251
251
|
}
|
252
252
|
};
|
253
|
+
var fileInputFieldWrapper = {
|
254
|
+
display: 'flex',
|
255
|
+
border: '1px dashed',
|
256
|
+
borderColor: 'active',
|
257
|
+
padding: '10px 0',
|
258
|
+
'&.is-drag-active': {
|
259
|
+
backgroundColor: 'accent.95'
|
260
|
+
},
|
261
|
+
'&.is-error': {
|
262
|
+
borderColor: 'critical.dark'
|
263
|
+
},
|
264
|
+
'&.is-success': {
|
265
|
+
borderColor: 'success.dark'
|
266
|
+
},
|
267
|
+
'&.is-warning': {
|
268
|
+
borderColor: 'warning.dark'
|
269
|
+
},
|
270
|
+
'&.is-loading': {
|
271
|
+
justifyContent: 'center',
|
272
|
+
alignItems: 'center'
|
273
|
+
}
|
274
|
+
};
|
253
275
|
var _default = {
|
254
276
|
base: base,
|
255
277
|
card: card,
|
@@ -258,6 +280,7 @@ var _default = {
|
|
258
280
|
datePicker: datePicker,
|
259
281
|
expandableRow: expandableRow,
|
260
282
|
inputInContainerSlot: inputInContainerSlot,
|
283
|
+
fileInputFieldWrapper: fileInputFieldWrapper,
|
261
284
|
listItem: listItem,
|
262
285
|
listBoxSectionTitle: listBoxSectionTitle,
|
263
286
|
listViewItem: listViewItem,
|
@@ -264,6 +264,39 @@ var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
|
|
264
264
|
}
|
265
265
|
});
|
266
266
|
|
267
|
+
var applicationPortal = _objectSpread(_objectSpread({}, iconButton), {}, {
|
268
|
+
background: 'transparent',
|
269
|
+
'&.is-focused': _objectSpread({}, defaultFocus),
|
270
|
+
'&.is-hovered': {
|
271
|
+
'path': {
|
272
|
+
fill: 'active'
|
273
|
+
}
|
274
|
+
},
|
275
|
+
'&.is-pressed': {
|
276
|
+
'path': {
|
277
|
+
fill: 'active'
|
278
|
+
}
|
279
|
+
}
|
280
|
+
});
|
281
|
+
|
282
|
+
var applicationPortalPinned = _objectSpread(_objectSpread({}, iconButton), {}, {
|
283
|
+
'path': {
|
284
|
+
fill: 'success.bright'
|
285
|
+
},
|
286
|
+
background: 'transparent',
|
287
|
+
'&.is-focused': _objectSpread({}, defaultFocus),
|
288
|
+
'&.is-hovered': {
|
289
|
+
'path': {
|
290
|
+
fill: 'active'
|
291
|
+
}
|
292
|
+
},
|
293
|
+
'&.is-pressed': {
|
294
|
+
'path': {
|
295
|
+
fill: 'active'
|
296
|
+
}
|
297
|
+
}
|
298
|
+
});
|
299
|
+
|
267
300
|
var helpHint = _objectSpread(_objectSpread({}, iconButton), {}, {
|
268
301
|
bg: 'neutral.90',
|
269
302
|
borderColor: 'active',
|
@@ -440,6 +473,25 @@ var expandableRow = {
|
|
440
473
|
}
|
441
474
|
}
|
442
475
|
};
|
476
|
+
var fileInputField = {
|
477
|
+
background: 'none',
|
478
|
+
cursor: 'pointer',
|
479
|
+
'& span': {
|
480
|
+
textAlign: 'initial'
|
481
|
+
},
|
482
|
+
'&:focus-visible': {
|
483
|
+
outline: 'none'
|
484
|
+
},
|
485
|
+
'&.is-hovered, &.is-pressed': {
|
486
|
+
cursor: 'pointer',
|
487
|
+
'& span': {
|
488
|
+
textDecoration: 'underline'
|
489
|
+
}
|
490
|
+
},
|
491
|
+
'&.is-focused': {
|
492
|
+
boxShadow: 'focus'
|
493
|
+
}
|
494
|
+
};
|
443
495
|
var _default = {
|
444
496
|
accordionHeader: accordionHeader,
|
445
497
|
chipDeleteButton: chipDeleteButton,
|
@@ -458,6 +510,7 @@ var _default = {
|
|
458
510
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
459
511
|
}),
|
460
512
|
expandableRow: expandableRow,
|
513
|
+
fileInputField: fileInputField,
|
461
514
|
iconButton: iconButton,
|
462
515
|
icon: icon,
|
463
516
|
imageUpload: imageUpload,
|
@@ -470,6 +523,8 @@ var _default = {
|
|
470
523
|
success: success,
|
471
524
|
text: text,
|
472
525
|
helpHint: helpHint,
|
473
|
-
modalCloseButton: modalCloseButton
|
526
|
+
modalCloseButton: modalCloseButton,
|
527
|
+
applicationPortalPinned: applicationPortalPinned,
|
528
|
+
applicationPortal: applicationPortal
|
474
529
|
};
|
475
530
|
exports["default"] = _default;
|