@pingux/astro 2.150.0-alpha.2 → 2.150.0
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 +3 -5
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.js +2 -4
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +5 -144
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +5 -106
- package/lib/cjs/styles/themes/next-gen/variants/button.js +4 -40
- package/lib/cjs/styles/themes/next-gen/variants/input.js +0 -21
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +0 -38
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +16 -2
- package/lib/cjs/types/iconButtonToggle.d.ts +0 -2
- package/lib/components/Box/Box.js +3 -5
- package/lib/components/IconButtonToggle/IconButtonToggle.js +2 -4
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/variants/button.js +4 -40
- package/lib/styles/themes/next-gen/variants/input.js +0 -21
- package/lib/styles/themes/next-gen/variants/variants.js +16 -2
- package/package.json +1 -1
- package/lib/cjs/styles/themes/next-gen/stories/OnyxInputPatterns.chromatic.stories.d.ts +0 -11
- package/lib/cjs/styles/themes/next-gen/stories/OnyxInputPatterns.chromatic.stories.js +0 -197
- package/lib/cjs/styles/themes/next-gen/variants/box.d.ts +0 -61
- package/lib/cjs/styles/themes/next-gen/variants/box.js +0 -58
- package/lib/styles/themes/next-gen/stories/OnyxInputPatterns.chromatic.stories.js +0 -178
- package/lib/styles/themes/next-gen/variants/box.js +0 -49
|
@@ -13,7 +13,6 @@ import chroma from 'chroma-js';
|
|
|
13
13
|
import { copyButton } from '../codeView/codeView';
|
|
14
14
|
import colors from '../colors/colors';
|
|
15
15
|
import tShirtSizes from '../customProperties/tShirtSizes';
|
|
16
|
-
import { commonContentProps } from './box';
|
|
17
16
|
var primaryBlue = colors.primary,
|
|
18
17
|
primaryBlueHover = colors.active_hover,
|
|
19
18
|
primaryBluePress = colors.active_pressed,
|
|
@@ -110,19 +109,8 @@ var secondary = _objectSpread(_objectSpread({}, buttonBase), {}, {
|
|
|
110
109
|
var tertiary = _objectSpread(_objectSpread({}, buttonBase), {}, {
|
|
111
110
|
backgroundColor: 'transparent',
|
|
112
111
|
borderColor: 'border.base',
|
|
113
|
-
color: '
|
|
114
|
-
'&.is-
|
|
115
|
-
outlineColor: 'gray-700',
|
|
116
|
-
backgroundColor: 'background.secondary'
|
|
117
|
-
}),
|
|
118
|
-
'&.is-pressed': {
|
|
119
|
-
backgroundColor: 'background.secondary',
|
|
120
|
-
color: 'font.base'
|
|
121
|
-
},
|
|
122
|
-
'&.is-hovered': _objectSpread({
|
|
123
|
-
backgroundColor: 'background.secondary',
|
|
124
|
-
color: 'font.base'
|
|
125
|
-
}, boxShadowNone)
|
|
112
|
+
color: 'text.secondary',
|
|
113
|
+
'&.is-hovered': _objectSpread({}, boxShadowNone)
|
|
126
114
|
});
|
|
127
115
|
var outlineCritical = _objectSpread(_objectSpread({}, buttonBase), {}, {
|
|
128
116
|
backgroundColor: 'transparent',
|
|
@@ -512,21 +500,7 @@ var iconButtons = {
|
|
|
512
500
|
}
|
|
513
501
|
}
|
|
514
502
|
}),
|
|
515
|
-
hintButton: _objectSpread({}, hintButton)
|
|
516
|
-
passwordVisibilityIcon: _objectSpread(_objectSpread(_objectSpread({}, baseIconButton), commonContentProps), {}, {
|
|
517
|
-
right: 0,
|
|
518
|
-
padding: '12px 20px',
|
|
519
|
-
border: '0px solid !important',
|
|
520
|
-
'&:hover, &.is-pressed': {
|
|
521
|
-
background: 'transparent',
|
|
522
|
-
boxShadow: 'none'
|
|
523
|
-
},
|
|
524
|
-
'&.is-focused': {
|
|
525
|
-
outline: '2px solid',
|
|
526
|
-
outlineOffset: '2px',
|
|
527
|
-
outlineColor: 'gray-700'
|
|
528
|
-
}
|
|
529
|
-
})
|
|
503
|
+
hintButton: _objectSpread({}, hintButton)
|
|
530
504
|
};
|
|
531
505
|
var listBoxLink = {
|
|
532
506
|
color: 'active',
|
|
@@ -555,15 +529,6 @@ var listBoxLink = {
|
|
|
555
529
|
}
|
|
556
530
|
})
|
|
557
531
|
};
|
|
558
|
-
var ButtonInputGroupContentRight = _objectSpread(_objectSpread(_objectSpread({}, tertiary), commonContentProps), {}, {
|
|
559
|
-
right: 0,
|
|
560
|
-
padding: '12px 20px',
|
|
561
|
-
borderRadius: '0px 4px 4px 0px !important',
|
|
562
|
-
borderWidth: '0px !important',
|
|
563
|
-
borderLeftWidth: '1px !important',
|
|
564
|
-
borderRightWidth: '1px !important',
|
|
565
|
-
borderLeftColor: 'gray-500'
|
|
566
|
-
});
|
|
567
532
|
var buttons = {
|
|
568
533
|
neutral: neutral,
|
|
569
534
|
primary: primary,
|
|
@@ -587,7 +552,6 @@ var buttons = {
|
|
|
587
552
|
iconButtons: iconButtons,
|
|
588
553
|
modalCloseButton: modalCloseButton,
|
|
589
554
|
aiChat: aiChat,
|
|
590
|
-
paginationMenu: paginationMenu
|
|
591
|
-
ButtonInputGroupContentRight: ButtonInputGroupContentRight
|
|
555
|
+
paginationMenu: paginationMenu
|
|
592
556
|
};
|
|
593
557
|
export default buttons;
|
|
@@ -192,25 +192,4 @@ input.promptInputAttachmentWrapper = {
|
|
|
192
192
|
overflowY: 'hidden',
|
|
193
193
|
whiteSpace: 'nowrap',
|
|
194
194
|
px: '.75rem'
|
|
195
|
-
};
|
|
196
|
-
input.dropDownContentRight = {
|
|
197
|
-
background: 'inherit',
|
|
198
|
-
'& button': {
|
|
199
|
-
borderRadius: '0px 4px 4px 0px !important',
|
|
200
|
-
'&.is-focused': {
|
|
201
|
-
outline: '2px solid',
|
|
202
|
-
outlineOffset: '2px',
|
|
203
|
-
outlineColor: 'gray-700'
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
input.dropDownContentLeft = {
|
|
208
|
-
'& button': {
|
|
209
|
-
borderRadius: '4px 0px 0px 4px !important',
|
|
210
|
-
'&.is-focused': {
|
|
211
|
-
outline: '2px solid',
|
|
212
|
-
outlineOffset: '2px',
|
|
213
|
-
outlineColor: 'gray-700'
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
195
|
};
|
|
@@ -12,9 +12,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
import attachment from '../../../../components/AIComponents/Attachment/Attachment.styles';
|
|
13
13
|
import skeleton from '../../../../components/Skeleton/Skeleton.styles';
|
|
14
14
|
import codeView from '../codeView/codeView';
|
|
15
|
+
import colors from '../colors/colors';
|
|
15
16
|
import accordion from './accordion';
|
|
16
17
|
import { avatar } from './avatar';
|
|
17
|
-
import { box } from './box';
|
|
18
18
|
import button, { defaultFocus } from './button';
|
|
19
19
|
import callout from './callout';
|
|
20
20
|
import { dataTable } from './dataTable';
|
|
@@ -382,7 +382,21 @@ export default {
|
|
|
382
382
|
attachment: attachment,
|
|
383
383
|
avatar: avatar,
|
|
384
384
|
breadcrumb: breadcrumb,
|
|
385
|
-
box:
|
|
385
|
+
box: {
|
|
386
|
+
indeterminateCheckboxIcon: {
|
|
387
|
+
height: '19.25px',
|
|
388
|
+
width: '19.25px',
|
|
389
|
+
'&.is-disabled': {
|
|
390
|
+
'& rect[id="indeterminate-checkbox-icon-wrapper"]': {
|
|
391
|
+
fill: 'gray-500',
|
|
392
|
+
stroke: 'gray-500'
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
'&.is-focused': {
|
|
396
|
+
boxShadow: "inset 0px 0px 0px 1px ".concat(colors.focus)
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
386
400
|
buttonBar: buttonBar,
|
|
387
401
|
callout: callout,
|
|
388
402
|
codeView: codeView,
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("../../../..").TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
|
-
export declare const Default: () => React.JSX.Element;
|
|
8
|
-
export declare const PasswordInput: () => React.JSX.Element;
|
|
9
|
-
export declare const InputGroup: () => React.JSX.Element;
|
|
10
|
-
export declare const ButtonInputGroup: () => React.JSX.Element;
|
|
11
|
-
export declare const DropdownInputGroup: () => React.JSX.Element;
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
5
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
6
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
7
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
8
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
9
|
-
value: true
|
|
10
|
-
});
|
|
11
|
-
exports["default"] = exports.PasswordInput = exports.InputGroup = exports.DropdownInputGroup = exports.Default = exports.ButtonInputGroup = void 0;
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
13
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _EyeOffOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/EyeOffOutlineIcon"));
|
|
15
|
-
var _EyeOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/EyeOutlineIcon"));
|
|
16
|
-
var _ = require("../../../..");
|
|
17
|
-
var _TextField = _interopRequireDefault(require("../../../../components/TextField"));
|
|
18
|
-
var _react2 = require("@emotion/react");
|
|
19
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
var _default = {
|
|
22
|
-
title: 'Form/Onyx Input Patterns',
|
|
23
|
-
component: _TextField["default"]
|
|
24
|
-
};
|
|
25
|
-
exports["default"] = _default;
|
|
26
|
-
var items = [{
|
|
27
|
-
name: 'Aardvark',
|
|
28
|
-
id: '1'
|
|
29
|
-
}, {
|
|
30
|
-
name: 'Kangaroo',
|
|
31
|
-
id: '2'
|
|
32
|
-
}, {
|
|
33
|
-
name: 'Snake',
|
|
34
|
-
id: '3'
|
|
35
|
-
}];
|
|
36
|
-
var Default = function Default() {
|
|
37
|
-
return (0, _react2.jsx)(_TextField["default"], {
|
|
38
|
-
label: "Label",
|
|
39
|
-
helperText: "Help text for this field."
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
exports.Default = Default;
|
|
43
|
-
var PasswordInput = function PasswordInput() {
|
|
44
|
-
var _useState = (0, _react.useState)(false),
|
|
45
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
46
|
-
isVisible = _useState2[0],
|
|
47
|
-
setIsVisible = _useState2[1];
|
|
48
|
-
var handleVisible = function handleVisible() {
|
|
49
|
-
setIsVisible(!isVisible);
|
|
50
|
-
};
|
|
51
|
-
return (0, _react2.jsx)(_TextField["default"], {
|
|
52
|
-
label: "Password",
|
|
53
|
-
type: "password",
|
|
54
|
-
containerProps: {
|
|
55
|
-
sx: {
|
|
56
|
-
'& input': {
|
|
57
|
-
paddingRight: '60px'
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
slots: {
|
|
62
|
-
inContainer: (0, _react2.jsx)(_.IconButtonToggle, {
|
|
63
|
-
toggledIcon: _EyeOutlineIcon["default"],
|
|
64
|
-
defaultIcon: _EyeOffOutlineIcon["default"],
|
|
65
|
-
onToggle: handleVisible,
|
|
66
|
-
isToggled: isVisible,
|
|
67
|
-
variant: "passwordVisibilityIcon",
|
|
68
|
-
buttonProps: {
|
|
69
|
-
'aria-label': 'eye icon'
|
|
70
|
-
},
|
|
71
|
-
iconProps: {
|
|
72
|
-
size: 'xs'
|
|
73
|
-
}
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
exports.PasswordInput = PasswordInput;
|
|
79
|
-
var InputGroup = function InputGroup() {
|
|
80
|
-
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_TextField["default"], {
|
|
81
|
-
label: "Label",
|
|
82
|
-
helperText: "Help text for this field.",
|
|
83
|
-
containerProps: {
|
|
84
|
-
sx: {
|
|
85
|
-
'& input': {
|
|
86
|
-
paddingLeft: '70px'
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
slots: {
|
|
91
|
-
beforeInput: (0, _react2.jsx)(_.Box, {
|
|
92
|
-
variant: "box.inputGroupContentLeft",
|
|
93
|
-
p: "12px 20px"
|
|
94
|
-
}, (0, _react2.jsx)(_.Text, null, "@"))
|
|
95
|
-
}
|
|
96
|
-
}), (0, _react2.jsx)(_TextField["default"], {
|
|
97
|
-
label: "Label",
|
|
98
|
-
mt: "xl",
|
|
99
|
-
helperText: "Help text for this field.",
|
|
100
|
-
containerProps: {
|
|
101
|
-
sx: {
|
|
102
|
-
'& input': {
|
|
103
|
-
paddingRight: '160px'
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
slots: {
|
|
108
|
-
inContainer: (0, _react2.jsx)(_.Box, {
|
|
109
|
-
variant: "box.inputGroupContentRight",
|
|
110
|
-
p: "12px 20px"
|
|
111
|
-
}, (0, _react2.jsx)(_.Text, null, "@example.com"))
|
|
112
|
-
}
|
|
113
|
-
}));
|
|
114
|
-
};
|
|
115
|
-
exports.InputGroup = InputGroup;
|
|
116
|
-
var ButtonInputGroup = function ButtonInputGroup() {
|
|
117
|
-
return (0, _react2.jsx)(_TextField["default"], {
|
|
118
|
-
label: "Label",
|
|
119
|
-
containerProps: {
|
|
120
|
-
sx: {
|
|
121
|
-
'& input': {
|
|
122
|
-
paddingRight: '100px'
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
slots: {
|
|
127
|
-
inContainer: (0, _react2.jsx)(_.Button, {
|
|
128
|
-
variant: "ButtonInputGroupContentRight"
|
|
129
|
-
}, "Button")
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
exports.ButtonInputGroup = ButtonInputGroup;
|
|
134
|
-
var DropdownInputGroup = function DropdownInputGroup() {
|
|
135
|
-
var _useState3 = (0, _react.useState)(items[0].name),
|
|
136
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
137
|
-
selectedKey = _useState4[0],
|
|
138
|
-
setSelectedKey = _useState4[1];
|
|
139
|
-
var handleSelectionChange = function handleSelectionChange(key) {
|
|
140
|
-
return setSelectedKey(key);
|
|
141
|
-
};
|
|
142
|
-
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_TextField["default"], {
|
|
143
|
-
label: "Label",
|
|
144
|
-
containerProps: {
|
|
145
|
-
sx: {
|
|
146
|
-
'& > .field-control-wrapper > input': {
|
|
147
|
-
paddingRight: '160px'
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
slots: {
|
|
152
|
-
inContainer: (0, _react2.jsx)(_.Box, {
|
|
153
|
-
variant: "box.inputDropDownContentRight",
|
|
154
|
-
width: "150px",
|
|
155
|
-
mt: "-2px"
|
|
156
|
-
}, (0, _react2.jsx)(_.SelectField, {
|
|
157
|
-
items: items,
|
|
158
|
-
selectedKey: selectedKey,
|
|
159
|
-
onSelectionChange: handleSelectionChange,
|
|
160
|
-
variant: "forms.input.dropDownContentRight"
|
|
161
|
-
}, function (item) {
|
|
162
|
-
return (0, _react2.jsx)(_.Item, {
|
|
163
|
-
key: item.name,
|
|
164
|
-
"data-id": item.name
|
|
165
|
-
}, item.name);
|
|
166
|
-
}))
|
|
167
|
-
}
|
|
168
|
-
}), (0, _react2.jsx)(_TextField["default"], {
|
|
169
|
-
label: "Label",
|
|
170
|
-
mt: "xl",
|
|
171
|
-
containerProps: {
|
|
172
|
-
sx: {
|
|
173
|
-
'& > .field-control-wrapper > input': {
|
|
174
|
-
paddingLeft: '160px'
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
slots: {
|
|
179
|
-
beforeInput: (0, _react2.jsx)(_.Box, {
|
|
180
|
-
variant: "box.inputDropDownContentLeft",
|
|
181
|
-
width: "150px",
|
|
182
|
-
mt: "-2px"
|
|
183
|
-
}, (0, _react2.jsx)(_.SelectField, {
|
|
184
|
-
items: items,
|
|
185
|
-
selectedKey: selectedKey,
|
|
186
|
-
onSelectionChange: handleSelectionChange,
|
|
187
|
-
variant: "forms.input.dropDownContentLeft"
|
|
188
|
-
}, function (item) {
|
|
189
|
-
return (0, _react2.jsx)(_.Item, {
|
|
190
|
-
key: item.name,
|
|
191
|
-
"data-id": item.name
|
|
192
|
-
}, item.name);
|
|
193
|
-
}))
|
|
194
|
-
}
|
|
195
|
-
}));
|
|
196
|
-
};
|
|
197
|
-
exports.DropdownInputGroup = DropdownInputGroup;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export declare const commonContentProps: {
|
|
2
|
-
position: string;
|
|
3
|
-
top: string;
|
|
4
|
-
transform: string;
|
|
5
|
-
height: string;
|
|
6
|
-
width: string;
|
|
7
|
-
justifyContent: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const box: {
|
|
10
|
-
indeterminateCheckboxIcon: {
|
|
11
|
-
height: string;
|
|
12
|
-
width: string;
|
|
13
|
-
'&.is-disabled': {
|
|
14
|
-
'& rect[id="indeterminate-checkbox-icon-wrapper"]': {
|
|
15
|
-
fill: string;
|
|
16
|
-
stroke: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
'&.is-focused': {
|
|
20
|
-
boxShadow: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
inputDropDownContentLeft: {
|
|
24
|
-
left: number;
|
|
25
|
-
position: string;
|
|
26
|
-
top: string;
|
|
27
|
-
transform: string;
|
|
28
|
-
height: string;
|
|
29
|
-
width: string;
|
|
30
|
-
justifyContent: string;
|
|
31
|
-
};
|
|
32
|
-
inputGroupContentLeft: {
|
|
33
|
-
left: number;
|
|
34
|
-
borderRight: string;
|
|
35
|
-
position: string;
|
|
36
|
-
top: string;
|
|
37
|
-
transform: string;
|
|
38
|
-
height: string;
|
|
39
|
-
width: string;
|
|
40
|
-
justifyContent: string;
|
|
41
|
-
};
|
|
42
|
-
inputDropDownContentRight: {
|
|
43
|
-
right: number;
|
|
44
|
-
position: string;
|
|
45
|
-
top: string;
|
|
46
|
-
transform: string;
|
|
47
|
-
height: string;
|
|
48
|
-
width: string;
|
|
49
|
-
justifyContent: string;
|
|
50
|
-
};
|
|
51
|
-
inputGroupContentRight: {
|
|
52
|
-
right: number;
|
|
53
|
-
borderLeft: string;
|
|
54
|
-
position: string;
|
|
55
|
-
top: string;
|
|
56
|
-
transform: string;
|
|
57
|
-
height: string;
|
|
58
|
-
width: string;
|
|
59
|
-
justifyContent: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
4
|
-
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
5
|
-
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
6
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
7
|
-
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
8
|
-
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
9
|
-
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
10
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
11
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
12
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
exports.commonContentProps = exports.box = void 0;
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
17
|
-
var _colors = _interopRequireDefault(require("../colors/colors"));
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
var commonContentProps = {
|
|
21
|
-
position: 'absolute',
|
|
22
|
-
top: '50%',
|
|
23
|
-
transform: 'translateY(-50%)',
|
|
24
|
-
height: '100%',
|
|
25
|
-
width: 'max-content',
|
|
26
|
-
justifyContent: 'center'
|
|
27
|
-
};
|
|
28
|
-
exports.commonContentProps = commonContentProps;
|
|
29
|
-
var box = {
|
|
30
|
-
indeterminateCheckboxIcon: {
|
|
31
|
-
height: '19.25px',
|
|
32
|
-
width: '19.25px',
|
|
33
|
-
'&.is-disabled': {
|
|
34
|
-
'& rect[id="indeterminate-checkbox-icon-wrapper"]': {
|
|
35
|
-
fill: 'gray-500',
|
|
36
|
-
stroke: 'gray-500'
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
'&.is-focused': {
|
|
40
|
-
boxShadow: "inset 0px 0px 0px 1px ".concat(_colors["default"].focus)
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
inputDropDownContentLeft: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
44
|
-
left: 0
|
|
45
|
-
}),
|
|
46
|
-
inputGroupContentLeft: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
47
|
-
left: 0,
|
|
48
|
-
borderRight: "1px solid ".concat(_colors["default"]['gray-500'])
|
|
49
|
-
}),
|
|
50
|
-
inputDropDownContentRight: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
51
|
-
right: 0
|
|
52
|
-
}),
|
|
53
|
-
inputGroupContentRight: _objectSpread(_objectSpread({}, commonContentProps), {}, {
|
|
54
|
-
right: 0,
|
|
55
|
-
borderLeft: "1px solid ".concat(_colors["default"]['gray-500'])
|
|
56
|
-
})
|
|
57
|
-
};
|
|
58
|
-
exports.box = box;
|
|
@@ -1,178 +0,0 @@
|
|
|
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
|
-
};
|