@pingux/astro 2.150.0-alpha.1 → 2.150.0-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.
- package/lib/cjs/components/Box/Box.js +5 -3
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.js +4 -2
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +144 -5
- package/lib/cjs/styles/themes/next-gen/stories/OnyxInputPatterns.chromatic.stories.d.ts +11 -0
- package/lib/cjs/styles/themes/next-gen/stories/OnyxInputPatterns.chromatic.stories.js +197 -0
- package/lib/cjs/styles/themes/next-gen/variants/box.d.ts +61 -0
- package/lib/cjs/styles/themes/next-gen/variants/box.js +58 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +106 -5
- package/lib/cjs/styles/themes/next-gen/variants/button.js +40 -4
- package/lib/cjs/styles/themes/next-gen/variants/input.js +21 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +38 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +2 -16
- package/lib/cjs/types/iconButtonToggle.d.ts +2 -0
- package/lib/components/Box/Box.js +5 -3
- package/lib/components/IconButtonToggle/IconButtonToggle.js +4 -2
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/stories/OnyxInputPatterns.chromatic.stories.js +178 -0
- package/lib/styles/themes/next-gen/variants/box.js +49 -0
- package/lib/styles/themes/next-gen/variants/button.js +40 -4
- package/lib/styles/themes/next-gen/variants/input.js +21 -0
- package/lib/styles/themes/next-gen/variants/variants.js +2 -16
- package/package.json +1 -1
|
@@ -139,8 +139,20 @@ declare const buttons: {
|
|
|
139
139
|
backgroundColor: string;
|
|
140
140
|
borderColor: string;
|
|
141
141
|
color: string;
|
|
142
|
+
'&.is-focused': {
|
|
143
|
+
outlineColor: string;
|
|
144
|
+
backgroundColor: string;
|
|
145
|
+
outline: string;
|
|
146
|
+
outlineOffset: string;
|
|
147
|
+
};
|
|
148
|
+
'&.is-pressed': {
|
|
149
|
+
backgroundColor: string;
|
|
150
|
+
color: string;
|
|
151
|
+
};
|
|
142
152
|
'&.is-hovered': {
|
|
143
153
|
boxShadow: string;
|
|
154
|
+
backgroundColor: string;
|
|
155
|
+
color: string;
|
|
144
156
|
};
|
|
145
157
|
alignItems: string;
|
|
146
158
|
justifyContent: string;
|
|
@@ -164,11 +176,6 @@ declare const buttons: {
|
|
|
164
176
|
'&.is-disabled': {
|
|
165
177
|
opacity: number;
|
|
166
178
|
};
|
|
167
|
-
'&.is-focused': {
|
|
168
|
-
outline: string;
|
|
169
|
-
outlineColor: string;
|
|
170
|
-
outlineOffset: string;
|
|
171
|
-
};
|
|
172
179
|
transition: string;
|
|
173
180
|
};
|
|
174
181
|
inverse: {
|
|
@@ -1184,6 +1191,47 @@ declare const buttons: {
|
|
|
1184
1191
|
outlineOffset: string;
|
|
1185
1192
|
};
|
|
1186
1193
|
};
|
|
1194
|
+
passwordVisibilityIcon: {
|
|
1195
|
+
right: number;
|
|
1196
|
+
padding: string;
|
|
1197
|
+
border: string;
|
|
1198
|
+
'&:hover, &.is-pressed': {
|
|
1199
|
+
background: string;
|
|
1200
|
+
boxShadow: string;
|
|
1201
|
+
};
|
|
1202
|
+
'&.is-focused': {
|
|
1203
|
+
outline: string;
|
|
1204
|
+
outlineOffset: string;
|
|
1205
|
+
outlineColor: string;
|
|
1206
|
+
};
|
|
1207
|
+
position: string;
|
|
1208
|
+
top: string;
|
|
1209
|
+
transform: string;
|
|
1210
|
+
height: string;
|
|
1211
|
+
width: string;
|
|
1212
|
+
justifyContent: string;
|
|
1213
|
+
path: {
|
|
1214
|
+
fill: string;
|
|
1215
|
+
};
|
|
1216
|
+
'&.is-hovered': {
|
|
1217
|
+
backgroundColor: string;
|
|
1218
|
+
path: {
|
|
1219
|
+
fill: string;
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1222
|
+
'&.is-pressed': {
|
|
1223
|
+
backgroundColor: string;
|
|
1224
|
+
path: {
|
|
1225
|
+
fill: string;
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
p: string;
|
|
1229
|
+
transition: string;
|
|
1230
|
+
outline: string;
|
|
1231
|
+
borderRadius: string;
|
|
1232
|
+
cursor: string;
|
|
1233
|
+
boxShadow: string;
|
|
1234
|
+
};
|
|
1187
1235
|
};
|
|
1188
1236
|
modalCloseButton: {
|
|
1189
1237
|
position: string;
|
|
@@ -1283,5 +1331,58 @@ declare const buttons: {
|
|
|
1283
1331
|
outline: string;
|
|
1284
1332
|
};
|
|
1285
1333
|
};
|
|
1334
|
+
ButtonInputGroupContentRight: {
|
|
1335
|
+
right: number;
|
|
1336
|
+
padding: string;
|
|
1337
|
+
borderRadius: string;
|
|
1338
|
+
borderWidth: string;
|
|
1339
|
+
borderLeftWidth: string;
|
|
1340
|
+
borderRightWidth: string;
|
|
1341
|
+
borderLeftColor: string;
|
|
1342
|
+
position: string;
|
|
1343
|
+
top: string;
|
|
1344
|
+
transform: string;
|
|
1345
|
+
height: string;
|
|
1346
|
+
width: string;
|
|
1347
|
+
justifyContent: string;
|
|
1348
|
+
backgroundColor: string;
|
|
1349
|
+
borderColor: string;
|
|
1350
|
+
color: string;
|
|
1351
|
+
'&.is-focused': {
|
|
1352
|
+
outlineColor: string;
|
|
1353
|
+
backgroundColor: string;
|
|
1354
|
+
outline: string;
|
|
1355
|
+
outlineOffset: string;
|
|
1356
|
+
};
|
|
1357
|
+
'&.is-pressed': {
|
|
1358
|
+
backgroundColor: string;
|
|
1359
|
+
color: string;
|
|
1360
|
+
};
|
|
1361
|
+
'&.is-hovered': {
|
|
1362
|
+
boxShadow: string;
|
|
1363
|
+
backgroundColor: string;
|
|
1364
|
+
color: string;
|
|
1365
|
+
};
|
|
1366
|
+
alignItems: string;
|
|
1367
|
+
flexShrink: number;
|
|
1368
|
+
minWidth: string;
|
|
1369
|
+
cursor: string;
|
|
1370
|
+
display: string;
|
|
1371
|
+
maxWidth: string;
|
|
1372
|
+
fontFamily: string;
|
|
1373
|
+
fontSize: string;
|
|
1374
|
+
fontWeight: number;
|
|
1375
|
+
textAlign: string;
|
|
1376
|
+
verticalAlign: string;
|
|
1377
|
+
lineHeight: number;
|
|
1378
|
+
border: string;
|
|
1379
|
+
px: string;
|
|
1380
|
+
py: string;
|
|
1381
|
+
maxHeight: string;
|
|
1382
|
+
'&.is-disabled': {
|
|
1383
|
+
opacity: number;
|
|
1384
|
+
};
|
|
1385
|
+
transition: string;
|
|
1386
|
+
};
|
|
1286
1387
|
};
|
|
1287
1388
|
export default buttons;
|
|
@@ -18,6 +18,7 @@ var _chromaJs = _interopRequireDefault(require("chroma-js"));
|
|
|
18
18
|
var _codeView = require("../codeView/codeView");
|
|
19
19
|
var _colors = _interopRequireDefault(require("../colors/colors"));
|
|
20
20
|
var _tShirtSizes = _interopRequireDefault(require("../customProperties/tShirtSizes"));
|
|
21
|
+
var _box = require("./box");
|
|
21
22
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
23
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
24
|
var primaryBlue = _colors["default"].primary,
|
|
@@ -117,8 +118,19 @@ var secondary = _objectSpread(_objectSpread({}, buttonBase), {}, {
|
|
|
117
118
|
var tertiary = _objectSpread(_objectSpread({}, buttonBase), {}, {
|
|
118
119
|
backgroundColor: 'transparent',
|
|
119
120
|
borderColor: 'border.base',
|
|
120
|
-
color: '
|
|
121
|
-
'&.is-
|
|
121
|
+
color: 'font.base',
|
|
122
|
+
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
|
123
|
+
outlineColor: 'gray-700',
|
|
124
|
+
backgroundColor: 'background.secondary'
|
|
125
|
+
}),
|
|
126
|
+
'&.is-pressed': {
|
|
127
|
+
backgroundColor: 'background.secondary',
|
|
128
|
+
color: 'font.base'
|
|
129
|
+
},
|
|
130
|
+
'&.is-hovered': _objectSpread({
|
|
131
|
+
backgroundColor: 'background.secondary',
|
|
132
|
+
color: 'font.base'
|
|
133
|
+
}, boxShadowNone)
|
|
122
134
|
});
|
|
123
135
|
var outlineCritical = _objectSpread(_objectSpread({}, buttonBase), {}, {
|
|
124
136
|
backgroundColor: 'transparent',
|
|
@@ -508,7 +520,21 @@ var iconButtons = {
|
|
|
508
520
|
}
|
|
509
521
|
}
|
|
510
522
|
}),
|
|
511
|
-
hintButton: _objectSpread({}, hintButton)
|
|
523
|
+
hintButton: _objectSpread({}, hintButton),
|
|
524
|
+
passwordVisibilityIcon: _objectSpread(_objectSpread(_objectSpread({}, baseIconButton), _box.commonContentProps), {}, {
|
|
525
|
+
right: 0,
|
|
526
|
+
padding: '12px 20px',
|
|
527
|
+
border: '0px solid !important',
|
|
528
|
+
'&:hover, &.is-pressed': {
|
|
529
|
+
background: 'transparent',
|
|
530
|
+
boxShadow: 'none'
|
|
531
|
+
},
|
|
532
|
+
'&.is-focused': {
|
|
533
|
+
outline: '2px solid',
|
|
534
|
+
outlineOffset: '2px',
|
|
535
|
+
outlineColor: 'gray-700'
|
|
536
|
+
}
|
|
537
|
+
})
|
|
512
538
|
};
|
|
513
539
|
var listBoxLink = {
|
|
514
540
|
color: 'active',
|
|
@@ -537,6 +563,15 @@ var listBoxLink = {
|
|
|
537
563
|
}
|
|
538
564
|
})
|
|
539
565
|
};
|
|
566
|
+
var ButtonInputGroupContentRight = _objectSpread(_objectSpread(_objectSpread({}, tertiary), _box.commonContentProps), {}, {
|
|
567
|
+
right: 0,
|
|
568
|
+
padding: '12px 20px',
|
|
569
|
+
borderRadius: '0px 4px 4px 0px !important',
|
|
570
|
+
borderWidth: '0px !important',
|
|
571
|
+
borderLeftWidth: '1px !important',
|
|
572
|
+
borderRightWidth: '1px !important',
|
|
573
|
+
borderLeftColor: 'gray-500'
|
|
574
|
+
});
|
|
540
575
|
var buttons = {
|
|
541
576
|
neutral: neutral,
|
|
542
577
|
primary: primary,
|
|
@@ -560,7 +595,8 @@ var buttons = {
|
|
|
560
595
|
iconButtons: iconButtons,
|
|
561
596
|
modalCloseButton: modalCloseButton,
|
|
562
597
|
aiChat: aiChat,
|
|
563
|
-
paginationMenu: paginationMenu
|
|
598
|
+
paginationMenu: paginationMenu,
|
|
599
|
+
ButtonInputGroupContentRight: ButtonInputGroupContentRight
|
|
564
600
|
};
|
|
565
601
|
var _default = buttons;
|
|
566
602
|
exports["default"] = _default;
|
|
@@ -201,4 +201,25 @@ input.promptInputAttachmentWrapper = {
|
|
|
201
201
|
overflowY: 'hidden',
|
|
202
202
|
whiteSpace: 'nowrap',
|
|
203
203
|
px: '.75rem'
|
|
204
|
+
};
|
|
205
|
+
input.dropDownContentRight = {
|
|
206
|
+
background: 'inherit',
|
|
207
|
+
'& button': {
|
|
208
|
+
borderRadius: '0px 4px 4px 0px !important',
|
|
209
|
+
'&.is-focused': {
|
|
210
|
+
outline: '2px solid',
|
|
211
|
+
outlineOffset: '2px',
|
|
212
|
+
outlineColor: 'gray-700'
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
input.dropDownContentLeft = {
|
|
217
|
+
'& button': {
|
|
218
|
+
borderRadius: '4px 0px 0px 4px !important',
|
|
219
|
+
'&.is-focused': {
|
|
220
|
+
outline: '2px solid',
|
|
221
|
+
outlineOffset: '2px',
|
|
222
|
+
outlineColor: 'gray-700'
|
|
223
|
+
}
|
|
224
|
+
}
|
|
204
225
|
};
|
|
@@ -168,6 +168,44 @@ declare const _default: {
|
|
|
168
168
|
boxShadow: string;
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
+
inputDropDownContentLeft: {
|
|
172
|
+
left: number;
|
|
173
|
+
position: string;
|
|
174
|
+
top: string;
|
|
175
|
+
transform: string;
|
|
176
|
+
height: string;
|
|
177
|
+
width: string;
|
|
178
|
+
justifyContent: string;
|
|
179
|
+
};
|
|
180
|
+
inputGroupContentLeft: {
|
|
181
|
+
left: number;
|
|
182
|
+
borderRight: string;
|
|
183
|
+
position: string;
|
|
184
|
+
top: string;
|
|
185
|
+
transform: string;
|
|
186
|
+
height: string;
|
|
187
|
+
width: string;
|
|
188
|
+
justifyContent: string;
|
|
189
|
+
};
|
|
190
|
+
inputDropDownContentRight: {
|
|
191
|
+
right: number;
|
|
192
|
+
position: string;
|
|
193
|
+
top: string;
|
|
194
|
+
transform: string;
|
|
195
|
+
height: string;
|
|
196
|
+
width: string;
|
|
197
|
+
justifyContent: string;
|
|
198
|
+
};
|
|
199
|
+
inputGroupContentRight: {
|
|
200
|
+
right: number;
|
|
201
|
+
borderLeft: string;
|
|
202
|
+
position: string;
|
|
203
|
+
top: string;
|
|
204
|
+
transform: string;
|
|
205
|
+
height: string;
|
|
206
|
+
width: string;
|
|
207
|
+
justifyContent: string;
|
|
208
|
+
};
|
|
171
209
|
};
|
|
172
210
|
buttonBar: {
|
|
173
211
|
container: {
|
|
@@ -19,9 +19,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
|
|
|
19
19
|
var _Attachment = _interopRequireDefault(require("../../../../components/AIComponents/Attachment/Attachment.styles"));
|
|
20
20
|
var _Skeleton = _interopRequireDefault(require("../../../../components/Skeleton/Skeleton.styles"));
|
|
21
21
|
var _codeView = _interopRequireDefault(require("../codeView/codeView"));
|
|
22
|
-
var _colors = _interopRequireDefault(require("../colors/colors"));
|
|
23
22
|
var _accordion = _interopRequireDefault(require("./accordion"));
|
|
24
23
|
var _avatar = require("./avatar");
|
|
24
|
+
var _box = require("./box");
|
|
25
25
|
var _button = _interopRequireWildcard(require("./button"));
|
|
26
26
|
var _callout = _interopRequireDefault(require("./callout"));
|
|
27
27
|
var _dataTable = require("./dataTable");
|
|
@@ -394,21 +394,7 @@ var _default = {
|
|
|
394
394
|
attachment: _Attachment["default"],
|
|
395
395
|
avatar: _avatar.avatar,
|
|
396
396
|
breadcrumb: breadcrumb,
|
|
397
|
-
box:
|
|
398
|
-
indeterminateCheckboxIcon: {
|
|
399
|
-
height: '19.25px',
|
|
400
|
-
width: '19.25px',
|
|
401
|
-
'&.is-disabled': {
|
|
402
|
-
'& rect[id="indeterminate-checkbox-icon-wrapper"]': {
|
|
403
|
-
fill: 'gray-500',
|
|
404
|
-
stroke: 'gray-500'
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
'&.is-focused': {
|
|
408
|
-
boxShadow: "inset 0px 0px 0px 1px ".concat(_colors["default"].focus)
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
},
|
|
397
|
+
box: _box.box,
|
|
412
398
|
buttonBar: buttonBar,
|
|
413
399
|
callout: _callout["default"],
|
|
414
400
|
codeView: _codeView["default"],
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
4
4
|
import _styled from "@emotion/styled/base";
|
|
5
|
-
var _excluded = ["as", "flexDirection", "gap", "isRow", "isDisabled", "className", "fontSize", "sx"];
|
|
5
|
+
var _excluded = ["as", "flexDirection", "gap", "isRow", "isDisabled", "className", "fontSize", "sx", "variant"];
|
|
6
6
|
import _Number$isNaN from "@babel/runtime-corejs3/core-js-stable/number/is-nan";
|
|
7
7
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
8
8
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
@@ -25,7 +25,7 @@ var ExtendedBox = /*#__PURE__*/_styled(ThemeUIBox, process.env.NODE_ENV === "pro
|
|
|
25
25
|
} : {
|
|
26
26
|
target: "ejf9h0h0",
|
|
27
27
|
label: "ExtendedBox"
|
|
28
|
-
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
28
|
+
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JveC9Cb3gudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVNvQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9Cb3gvQm94LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyBmb3J3YXJkUmVmLCB1c2VNZW1vIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgdG9OdW1iZXIgfSBmcm9tICdsb2Rhc2gnO1xuaW1wb3J0IHsgZmxleGJveCwgbGF5b3V0LCB0eXBvZ3JhcGh5IH0gZnJvbSAnc3R5bGVkLXN5c3RlbSc7XG5pbXBvcnQgeyBCb3ggYXMgVGhlbWVVSUJveCB9IGZyb20gJ3RoZW1lLXVpJztcblxuaW1wb3J0IHsgdXNlUHJvcFdhcm5pbmcsIHVzZVN0YXR1c0NsYXNzZXMgfSBmcm9tICcuLi8uLi9ob29rcyc7XG5pbXBvcnQgeyBCb3hQcm9wcyB9IGZyb20gJy4uLy4uL3R5cGVzJztcblxuY29uc3QgRXh0ZW5kZWRCb3ggPSBzdHlsZWQoVGhlbWVVSUJveCkoXG4gIGxheW91dCxcbiAgZmxleGJveCxcbiAgdHlwb2dyYXBoeSxcbik7XG5cbmNvbnN0IEJveCA9IGZvcndhcmRSZWY8SFRNTEVsZW1lbnQsIEJveFByb3BzPigocHJvcHMsIHJlZikgPT4ge1xuICBjb25zdCB7XG4gICAgYXMgPSAnZGl2JyxcbiAgICBmbGV4RGlyZWN0aW9uLFxuICAgIGdhcCxcbiAgICBpc1JvdyA9IGZhbHNlLFxuICAgIGlzRGlzYWJsZWQgPSBmYWxzZSxcbiAgICBjbGFzc05hbWUsXG4gICAgZm9udFNpemUsXG4gICAgc3gsXG4gICAgdmFyaWFudCA9ICdib3guYmFzZScsXG4gICAgLi4ub3RoZXJzXG4gIH0gPSBwcm9wcztcbiAgY29uc3QgZmQgPSBmbGV4RGlyZWN0aW9uIHx8IGlzUm93ID8gJ3JvdycgOiAnY29sdW1uJztcbiAgY29uc3QgY3VzdG9tID0geyAuLi5zeCB9O1xuXG4gIGNvbnN0IHsgY2xhc3NOYW1lcyB9ID0gdXNlU3RhdHVzQ2xhc3NlcyhjbGFzc05hbWUsIHsgaXNEaXNhYmxlZCB9KTtcbiAgdXNlUHJvcFdhcm5pbmcocHJvcHMsICdkaXNhYmxlZCcsICdpc0Rpc2FibGVkJyk7XG5cbiAgaWYgKGdhcCkge1xuICAgIGN1c3RvbVsnJiA+ICogKyAqOm5vdCg6Zmlyc3Qtb2YtdHlwZTpub3Qoc3R5bGUpOm5vdCg6Zmlyc3Qtb2YtdHlwZSB+ICopKSddID0ge1xuICAgICAgW2ZkID09PSAncm93JyA/ICdtYXJnaW5MZWZ0JyA6ICdtYXJnaW5Ub3AnXTogZ2FwLFxuICAgIH07XG4gIH1cblxuICBjb25zdCBjdXN0b21Gb250U2l6ZSA9IHVzZU1lbW8oKCkgPT4ge1xuICAgIGNvbnN0IG51bWVyaWNhbEZvbnRTaXplID0gdG9OdW1iZXIoZm9udFNpemUpO1xuICAgIGlmIChOdW1iZXIuaXNOYU4obnVtZXJpY2FsRm9udFNpemUpKSB7XG4gICAgICByZXR1cm4gZm9udFNpemU7XG4gICAgfVxuICAgIHJldHVybiBudW1lcmljYWxGb250U2l6ZTtcbiAgfSwgW2ZvbnRTaXplXSk7XG5cbiAgcmV0dXJuIChcbiAgICA8RXh0ZW5kZWRCb3hcbiAgICAgIGNsYXNzTmFtZT17Y2xhc3NOYW1lc31cbiAgICAgIHJlZj17cmVmfVxuICAgICAgZGlzcGxheT1cImZsZXhcIlxuICAgICAgZmxleERpcmVjdGlvbj17ZmR9XG4gICAgICB2YXJpYW50PXt2YXJpYW50fVxuICAgICAgZm9udFNpemU9e2N1c3RvbUZvbnRTaXplfVxuICAgICAgYXM9e2FzfVxuICAgICAgey4uLm90aGVyc31cbiAgICAgIHN4PXtjdXN0b219XG4gICAgLz5cbiAgKTtcbn0pO1xuXG5Cb3guZGlzcGxheU5hbWUgPSAnQm94JztcblxuZXhwb3J0IGRlZmF1bHQgQm94O1xuIl19 */");
|
|
29
29
|
var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
30
30
|
var _props$as = props.as,
|
|
31
31
|
as = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -38,6 +38,8 @@ var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
38
38
|
className = props.className,
|
|
39
39
|
fontSize = props.fontSize,
|
|
40
40
|
sx = props.sx,
|
|
41
|
+
_props$variant = props.variant,
|
|
42
|
+
variant = _props$variant === void 0 ? 'box.base' : _props$variant,
|
|
41
43
|
others = _objectWithoutProperties(props, _excluded);
|
|
42
44
|
var fd = flexDirection || isRow ? 'row' : 'column';
|
|
43
45
|
var custom = _objectSpread({}, sx);
|
|
@@ -61,7 +63,7 @@ var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
61
63
|
ref: ref,
|
|
62
64
|
display: "flex",
|
|
63
65
|
flexDirection: fd,
|
|
64
|
-
variant:
|
|
66
|
+
variant: variant,
|
|
65
67
|
fontSize: customFontSize,
|
|
66
68
|
as: as
|
|
67
69
|
}, others, {
|
|
@@ -11,7 +11,8 @@ var IconButtonToggle = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
11
11
|
iconProps = props.iconProps,
|
|
12
12
|
isToggled = props.isToggled,
|
|
13
13
|
onToggle = props.onToggle,
|
|
14
|
-
title = props.title
|
|
14
|
+
title = props.title,
|
|
15
|
+
variant = props.variant;
|
|
15
16
|
var conditionalRenderProps = {
|
|
16
17
|
ComponentToRenderIfTrue: toggledIcon,
|
|
17
18
|
ComponentToRenderIfFalse: defaultIcon,
|
|
@@ -24,7 +25,8 @@ var IconButtonToggle = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
24
25
|
return ___EmotionJSX(IconButton, _extends({
|
|
25
26
|
onPress: handleConditionChange,
|
|
26
27
|
ref: ref,
|
|
27
|
-
title: title
|
|
28
|
+
title: title,
|
|
29
|
+
variant: variant
|
|
28
30
|
}, buttonProps), ___EmotionJSX(Icon, _extends({
|
|
29
31
|
icon: RenderedComponent
|
|
30
32
|
}, iconProps)));
|
|
@@ -19,5 +19,5 @@ export var astroBlacklistStory = {
|
|
|
19
19
|
Text: ['Onyx'],
|
|
20
20
|
Loader: ['Circular', 'Custom Circular']
|
|
21
21
|
};
|
|
22
|
-
export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input', 'Footer'];
|
|
22
|
+
export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input', 'Footer', 'Onyx Input Patterns'];
|
|
23
23
|
export default nextGenConvertedComponents;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import EyeOffOutlineIcon from '@pingux/mdi-react/EyeOffOutlineIcon';
|
|
4
|
+
import EyeOutlineIcon from '@pingux/mdi-react/EyeOutlineIcon';
|
|
5
|
+
import { Box, Button, IconButtonToggle, Item, SelectField, Text } from '../../../..';
|
|
6
|
+
import TextField from '../../../../components/TextField';
|
|
7
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Form/Onyx Input Patterns',
|
|
10
|
+
component: TextField
|
|
11
|
+
};
|
|
12
|
+
var items = [{
|
|
13
|
+
name: 'Aardvark',
|
|
14
|
+
id: '1'
|
|
15
|
+
}, {
|
|
16
|
+
name: 'Kangaroo',
|
|
17
|
+
id: '2'
|
|
18
|
+
}, {
|
|
19
|
+
name: 'Snake',
|
|
20
|
+
id: '3'
|
|
21
|
+
}];
|
|
22
|
+
export var Default = function Default() {
|
|
23
|
+
return ___EmotionJSX(TextField, {
|
|
24
|
+
label: "Label",
|
|
25
|
+
helperText: "Help text for this field."
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
export var PasswordInput = function PasswordInput() {
|
|
29
|
+
var _useState = useState(false),
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
isVisible = _useState2[0],
|
|
32
|
+
setIsVisible = _useState2[1];
|
|
33
|
+
var handleVisible = function handleVisible() {
|
|
34
|
+
setIsVisible(!isVisible);
|
|
35
|
+
};
|
|
36
|
+
return ___EmotionJSX(TextField, {
|
|
37
|
+
label: "Password",
|
|
38
|
+
type: "password",
|
|
39
|
+
containerProps: {
|
|
40
|
+
sx: {
|
|
41
|
+
'& input': {
|
|
42
|
+
paddingRight: '60px'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
slots: {
|
|
47
|
+
inContainer: ___EmotionJSX(IconButtonToggle, {
|
|
48
|
+
toggledIcon: EyeOutlineIcon,
|
|
49
|
+
defaultIcon: EyeOffOutlineIcon,
|
|
50
|
+
onToggle: handleVisible,
|
|
51
|
+
isToggled: isVisible,
|
|
52
|
+
variant: "passwordVisibilityIcon",
|
|
53
|
+
buttonProps: {
|
|
54
|
+
'aria-label': 'eye icon'
|
|
55
|
+
},
|
|
56
|
+
iconProps: {
|
|
57
|
+
size: 'xs'
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export var InputGroup = function InputGroup() {
|
|
64
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(TextField, {
|
|
65
|
+
label: "Label",
|
|
66
|
+
helperText: "Help text for this field.",
|
|
67
|
+
containerProps: {
|
|
68
|
+
sx: {
|
|
69
|
+
'& input': {
|
|
70
|
+
paddingLeft: '70px'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
slots: {
|
|
75
|
+
beforeInput: ___EmotionJSX(Box, {
|
|
76
|
+
variant: "box.inputGroupContentLeft",
|
|
77
|
+
p: "12px 20px"
|
|
78
|
+
}, ___EmotionJSX(Text, null, "@"))
|
|
79
|
+
}
|
|
80
|
+
}), ___EmotionJSX(TextField, {
|
|
81
|
+
label: "Label",
|
|
82
|
+
mt: "xl",
|
|
83
|
+
helperText: "Help text for this field.",
|
|
84
|
+
containerProps: {
|
|
85
|
+
sx: {
|
|
86
|
+
'& input': {
|
|
87
|
+
paddingRight: '160px'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
slots: {
|
|
92
|
+
inContainer: ___EmotionJSX(Box, {
|
|
93
|
+
variant: "box.inputGroupContentRight",
|
|
94
|
+
p: "12px 20px"
|
|
95
|
+
}, ___EmotionJSX(Text, null, "@example.com"))
|
|
96
|
+
}
|
|
97
|
+
}));
|
|
98
|
+
};
|
|
99
|
+
export var ButtonInputGroup = function ButtonInputGroup() {
|
|
100
|
+
return ___EmotionJSX(TextField, {
|
|
101
|
+
label: "Label",
|
|
102
|
+
containerProps: {
|
|
103
|
+
sx: {
|
|
104
|
+
'& input': {
|
|
105
|
+
paddingRight: '100px'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
slots: {
|
|
110
|
+
inContainer: ___EmotionJSX(Button, {
|
|
111
|
+
variant: "ButtonInputGroupContentRight"
|
|
112
|
+
}, "Button")
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
export var DropdownInputGroup = function DropdownInputGroup() {
|
|
117
|
+
var _useState3 = useState(items[0].name),
|
|
118
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
119
|
+
selectedKey = _useState4[0],
|
|
120
|
+
setSelectedKey = _useState4[1];
|
|
121
|
+
var handleSelectionChange = function handleSelectionChange(key) {
|
|
122
|
+
return setSelectedKey(key);
|
|
123
|
+
};
|
|
124
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(TextField, {
|
|
125
|
+
label: "Label",
|
|
126
|
+
containerProps: {
|
|
127
|
+
sx: {
|
|
128
|
+
'& > .field-control-wrapper > input': {
|
|
129
|
+
paddingRight: '160px'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
slots: {
|
|
134
|
+
inContainer: ___EmotionJSX(Box, {
|
|
135
|
+
variant: "box.inputDropDownContentRight",
|
|
136
|
+
width: "150px",
|
|
137
|
+
mt: "-2px"
|
|
138
|
+
}, ___EmotionJSX(SelectField, {
|
|
139
|
+
items: items,
|
|
140
|
+
selectedKey: selectedKey,
|
|
141
|
+
onSelectionChange: handleSelectionChange,
|
|
142
|
+
variant: "forms.input.dropDownContentRight"
|
|
143
|
+
}, function (item) {
|
|
144
|
+
return ___EmotionJSX(Item, {
|
|
145
|
+
key: item.name,
|
|
146
|
+
"data-id": item.name
|
|
147
|
+
}, item.name);
|
|
148
|
+
}))
|
|
149
|
+
}
|
|
150
|
+
}), ___EmotionJSX(TextField, {
|
|
151
|
+
label: "Label",
|
|
152
|
+
mt: "xl",
|
|
153
|
+
containerProps: {
|
|
154
|
+
sx: {
|
|
155
|
+
'& > .field-control-wrapper > input': {
|
|
156
|
+
paddingLeft: '160px'
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
slots: {
|
|
161
|
+
beforeInput: ___EmotionJSX(Box, {
|
|
162
|
+
variant: "box.inputDropDownContentLeft",
|
|
163
|
+
width: "150px",
|
|
164
|
+
mt: "-2px"
|
|
165
|
+
}, ___EmotionJSX(SelectField, {
|
|
166
|
+
items: items,
|
|
167
|
+
selectedKey: selectedKey,
|
|
168
|
+
onSelectionChange: handleSelectionChange,
|
|
169
|
+
variant: "forms.input.dropDownContentLeft"
|
|
170
|
+
}, function (item) {
|
|
171
|
+
return ___EmotionJSX(Item, {
|
|
172
|
+
key: item.name,
|
|
173
|
+
"data-id": item.name
|
|
174
|
+
}, item.name);
|
|
175
|
+
}))
|
|
176
|
+
}
|
|
177
|
+
}));
|
|
178
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
+
import colors from '../colors/colors';
|
|
13
|
+
export var commonContentProps = {
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
top: '50%',
|
|
16
|
+
transform: 'translateY(-50%)',
|
|
17
|
+
height: '100%',
|
|
18
|
+
width: 'max-content',
|
|
19
|
+
justifyContent: 'center'
|
|
20
|
+
};
|
|
21
|
+
export var box = {
|
|
22
|
+
indeterminateCheckboxIcon: {
|
|
23
|
+
height: '19.25px',
|
|
24
|
+
width: '19.25px',
|
|
25
|
+
'&.is-disabled': {
|
|
26
|
+
'& rect[id="indeterminate-checkbox-icon-wrapper"]': {
|
|
27
|
+
fill: 'gray-500',
|
|
28
|
+
stroke: 'gray-500'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
'&.is-focused': {
|
|
32
|
+
boxShadow: "inset 0px 0px 0px 1px ".concat(colors.focus)
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
inputDropDownContentLeft: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
36
|
+
left: 0
|
|
37
|
+
}),
|
|
38
|
+
inputGroupContentLeft: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
39
|
+
left: 0,
|
|
40
|
+
borderRight: "1px solid ".concat(colors['gray-500'])
|
|
41
|
+
}),
|
|
42
|
+
inputDropDownContentRight: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
43
|
+
right: 0
|
|
44
|
+
}),
|
|
45
|
+
inputGroupContentRight: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
46
|
+
right: 0,
|
|
47
|
+
borderLeft: "1px solid ".concat(colors['gray-500'])
|
|
48
|
+
})
|
|
49
|
+
};
|