@pingux/astro 1.0.0-alpha.9 → 1.1.0-alpha.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/CHANGELOG.md +147 -0
- package/README.md +5 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
- package/lib/cjs/components/Button/Button.js +5 -24
- package/lib/cjs/components/Button/Button.stories.js +5 -11
- package/lib/cjs/components/Button/Button.test.js +0 -24
- package/lib/cjs/components/Chip/Chip.js +26 -10
- package/lib/cjs/components/Chip/Chip.stories.js +44 -5
- package/lib/cjs/components/Chip/Chip.test.js +9 -0
- package/lib/cjs/components/{DropdownField/index.js → Chip/ChipContext.js} +8 -7
- package/lib/cjs/components/IconButton/IconButton.js +17 -7
- package/lib/cjs/components/IconButton/IconButton.test.js +0 -1
- package/lib/cjs/components/ListItem/ListItem.stories.js +0 -2
- package/lib/cjs/components/ListView/ListView.js +4 -3
- package/lib/cjs/components/ListViewItem/ListViewItem.js +3 -6
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +1 -1
- package/lib/cjs/components/Stepper/Stepper.js +1 -0
- package/lib/cjs/components/Tab/Tab.js +5 -3
- package/lib/cjs/components/Tabs/Tabs.js +3 -0
- package/lib/cjs/components/Tabs/Tabs.stories.js +3 -4
- package/lib/cjs/components/Tabs/Tabs.test.js +44 -15
- package/lib/cjs/components/TextAreaField/TextAreaField.test.js +10 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
- package/lib/cjs/index.js +48 -136
- package/lib/cjs/layouts/ListLayout.stories.js +2 -1
- package/lib/cjs/layouts/SchemaFormLayout.stories.js +2 -21
- package/lib/cjs/recipes/ArrayField.stories.js +3 -3
- package/lib/cjs/styles/forms/input.js +4 -0
- package/lib/cjs/styles/theme.js +0 -3
- package/lib/cjs/styles/variants/accordion.js +5 -7
- package/lib/cjs/styles/variants/boxes.js +22 -19
- package/lib/cjs/styles/variants/buttons.js +38 -29
- package/lib/cjs/styles/variants/variants.js +0 -3
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
- package/lib/components/Button/Button.js +7 -24
- package/lib/components/Button/Button.stories.js +5 -10
- package/lib/components/Button/Button.test.js +0 -20
- package/lib/components/Chip/Chip.js +25 -10
- package/lib/components/Chip/Chip.stories.js +41 -5
- package/lib/components/Chip/Chip.test.js +9 -0
- package/lib/components/Chip/ChipContext.js +3 -0
- package/lib/components/IconButton/IconButton.js +17 -9
- package/lib/components/IconButton/IconButton.test.js +0 -1
- package/lib/components/ListItem/ListItem.stories.js +0 -2
- package/lib/components/ListView/ListView.js +4 -3
- package/lib/components/ListViewItem/ListViewItem.js +3 -5
- package/lib/components/MultivaluesField/MultivaluesField.js +1 -1
- package/lib/components/Stepper/Stepper.js +1 -0
- package/lib/components/Tab/Tab.js +5 -3
- package/lib/components/Tabs/Tabs.js +3 -0
- package/lib/components/Tabs/Tabs.stories.js +3 -4
- package/lib/components/Tabs/Tabs.test.js +40 -15
- package/lib/components/TextAreaField/TextAreaField.test.js +8 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
- package/lib/index.js +0 -8
- package/lib/layouts/ListLayout.stories.js +2 -1
- package/lib/layouts/SchemaFormLayout.stories.js +2 -19
- package/lib/recipes/ArrayField.stories.js +3 -3
- package/lib/styles/forms/input.js +4 -0
- package/lib/styles/theme.js +0 -3
- package/lib/styles/variants/accordion.js +5 -7
- package/lib/styles/variants/boxes.js +21 -19
- package/lib/styles/variants/buttons.js +37 -29
- package/lib/styles/variants/variants.js +0 -2
- package/package.json +1 -1
- package/lib/cjs/components/Dropdown/Dropdown.js +0 -112
- package/lib/cjs/components/Dropdown/Dropdown.test.js +0 -80
- package/lib/cjs/components/Dropdown/index.js +0 -18
- package/lib/cjs/components/DropdownField/DropdownField.js +0 -187
- package/lib/cjs/components/DropdownField/DropdownField.stories.js +0 -278
- package/lib/cjs/components/DropdownField/DropdownField.test.js +0 -80
- package/lib/cjs/components/Panel/Panel.js +0 -101
- package/lib/cjs/components/Panel/Panel.stories.js +0 -57
- package/lib/cjs/components/Panel/Panel.test.js +0 -72
- package/lib/cjs/components/Panel/index.js +0 -18
- package/lib/cjs/components/Popover/Popover.js +0 -87
- package/lib/cjs/components/Popover/Popover.stories.js +0 -80
- package/lib/cjs/components/Popover/Popover.test.js +0 -91
- package/lib/cjs/components/Popover/index.js +0 -18
- package/lib/cjs/recipes/InputBoxWithLinkedChip.stories.js +0 -67
- package/lib/cjs/styles/variants/popover.js +0 -86
- package/lib/components/Dropdown/Dropdown.js +0 -90
- package/lib/components/Dropdown/Dropdown.test.js +0 -62
- package/lib/components/Dropdown/index.js +0 -1
- package/lib/components/DropdownField/DropdownField.js +0 -155
- package/lib/components/DropdownField/DropdownField.stories.js +0 -222
- package/lib/components/DropdownField/DropdownField.test.js +0 -60
- package/lib/components/DropdownField/index.js +0 -1
- package/lib/components/Panel/Panel.js +0 -71
- package/lib/components/Panel/Panel.stories.js +0 -35
- package/lib/components/Panel/Panel.test.js +0 -52
- package/lib/components/Panel/index.js +0 -1
- package/lib/components/Popover/Popover.js +0 -65
- package/lib/components/Popover/Popover.stories.js +0 -52
- package/lib/components/Popover/Popover.test.js +0 -75
- package/lib/components/Popover/index.js +0 -2
- package/lib/recipes/InputBoxWithLinkedChip.stories.js +0 -43
- package/lib/styles/variants/popover.js +0 -76
@@ -37,18 +37,19 @@ export var collectionTypes = {
|
|
37
37
|
PLACEHOLDER: 'placeholder'
|
38
38
|
};
|
39
39
|
export function useListLayout(state) {
|
40
|
+
var ROW_HEIGHT = 81;
|
40
41
|
var collator = useCollator({
|
41
42
|
usage: 'search',
|
42
43
|
sensitivity: 'base'
|
43
44
|
});
|
44
45
|
var layout = useMemo(function () {
|
45
46
|
return new ListLayout({
|
46
|
-
estimatedRowHeight:
|
47
|
+
estimatedRowHeight: ROW_HEIGHT,
|
47
48
|
estimatedHeadingHeight: 26,
|
48
49
|
paddingRight: 4,
|
49
50
|
paddingLeft: 4,
|
50
|
-
loaderHeight:
|
51
|
-
placeholderHeight:
|
51
|
+
loaderHeight: ROW_HEIGHT,
|
52
|
+
placeholderHeight: ROW_HEIGHT,
|
52
53
|
collator: collator
|
53
54
|
});
|
54
55
|
}, [collator]);
|
@@ -8,7 +8,6 @@ import { useGridCell, useGridRow } from '@react-aria/grid';
|
|
8
8
|
import { useHover } from '@react-aria/interactions';
|
9
9
|
import { ListViewContext } from '../ListView/ListViewContext';
|
10
10
|
import Box from '../Box';
|
11
|
-
import Separator from '../Separator';
|
12
11
|
import { useStatusClasses } from '../../hooks';
|
13
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
14
13
|
|
@@ -65,7 +64,8 @@ var ListViewItem = function ListViewItem(props) {
|
|
65
64
|
var _useStatusClasses = useStatusClasses(className, {
|
66
65
|
isHovered: isHovered,
|
67
66
|
isSelected: isSelected,
|
68
|
-
isFocused: isDisabled ? false : isFocusVisible
|
67
|
+
isFocused: isDisabled ? false : isFocusVisible,
|
68
|
+
hasSeparator: hasSeparator
|
69
69
|
}),
|
70
70
|
classNames = _useStatusClasses.classNames;
|
71
71
|
|
@@ -86,9 +86,7 @@ var ListViewItem = function ListViewItem(props) {
|
|
86
86
|
isSelected: isSelected,
|
87
87
|
className: classNames,
|
88
88
|
"data-id": dataId
|
89
|
-
}, listItemProps), item.rendered))
|
90
|
-
m: "0px"
|
91
|
-
}));
|
89
|
+
}, listItemProps), item.rendered)));
|
92
90
|
};
|
93
91
|
|
94
92
|
ListViewItem.propTypes = {
|
@@ -33,10 +33,11 @@ export var CollectionTab = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
33
33
|
tabLabelProps = itemProps.tabLabelProps,
|
34
34
|
tabLineProps = itemProps.tabLineProps,
|
35
35
|
content = itemProps.content,
|
36
|
-
|
36
|
+
titleAttr = itemProps.titleAttr,
|
37
|
+
otherItemProps = _objectWithoutProperties(itemProps, ["icon", "isDisabled", "separator", "tabLabelProps", "tabLineProps", "content", "titleAttr"]);
|
37
38
|
|
38
|
-
var isDisabled = tabsDisabled || tabDisabled;
|
39
39
|
var state = useContext(TabsContext);
|
40
|
+
var isDisabled = tabsDisabled || tabDisabled || state.disabledKeys.has(key);
|
40
41
|
var isSelected = state.selectedKey === key;
|
41
42
|
|
42
43
|
var _useFocusRing = useFocusRing(),
|
@@ -77,7 +78,8 @@ export var CollectionTab = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
77
78
|
className: classNames,
|
78
79
|
variant: "tab"
|
79
80
|
}, mergeProps(focusProps, hoverProps, tabProps), otherItemProps, {
|
80
|
-
ref: tabRef
|
81
|
+
ref: tabRef,
|
82
|
+
title: titleAttr || undefined
|
81
83
|
}), icon, ___EmotionJSX(Text, _extends({
|
82
84
|
variant: "tabLabel"
|
83
85
|
}, tabLabelProps), rendered), isSelected && !isDisabled && ___EmotionJSX(TabLine, tabLineProps)), slots === null || slots === void 0 ? void 0 : slots.afterTab);
|
@@ -90,6 +90,9 @@ Tabs.propTypes = {
|
|
90
90
|
/** The default tab key to be selected. (uncontrolled) */
|
91
91
|
defaultSelectedKey: PropTypes.string,
|
92
92
|
|
93
|
+
/** Array of keys to disable within the tab list. */
|
94
|
+
disabledKeys: PropTypes.arrayOf(PropTypes.string),
|
95
|
+
|
93
96
|
/** The tab key that is currently selected. (controlled) */
|
94
97
|
selectedKey: PropTypes.string,
|
95
98
|
|
@@ -128,13 +128,12 @@ export var Centered = function Centered() {
|
|
128
128
|
};
|
129
129
|
export var DisabledSingleTab = function DisabledSingleTab() {
|
130
130
|
return ___EmotionJSX(Tabs, {
|
131
|
-
|
132
|
-
|
131
|
+
items: tabs,
|
132
|
+
disabledKeys: ['Tab 2']
|
133
133
|
}, function (item) {
|
134
134
|
return ___EmotionJSX(Tab, {
|
135
135
|
key: item.name,
|
136
|
-
title: item.name
|
137
|
-
isDisabled: item.name === 'Tab 1'
|
136
|
+
title: item.name
|
138
137
|
}, item.children);
|
139
138
|
});
|
140
139
|
};
|
@@ -220,6 +220,31 @@ test('disabled all tabs', function () {
|
|
220
220
|
expect(tab1).not.toContainElement(screen.queryByRole('presentation'));
|
221
221
|
testTabPanel(0);
|
222
222
|
});
|
223
|
+
test('disabled tab is not accessible on click or focus', function () {
|
224
|
+
getComponent({
|
225
|
+
disabledKeys: [defaultTabs[1].name]
|
226
|
+
});
|
227
|
+
testTabPanel(0);
|
228
|
+
|
229
|
+
var _getTabs5 = getTabs(),
|
230
|
+
tabs = _getTabs5.tabs,
|
231
|
+
tab0 = _getTabs5.tab0,
|
232
|
+
tab1 = _getTabs5.tab1,
|
233
|
+
tab2 = _getTabs5.tab2; // Ensure that clicking a disabled tab does nothing
|
234
|
+
|
235
|
+
|
236
|
+
userEvent.click(tab1);
|
237
|
+
testTabPanel(0); // Ensure that disabled tab is not accessible via focus
|
238
|
+
|
239
|
+
userEvent.tab();
|
240
|
+
testSingleTab(tabs, tab0, 'toHaveFocus');
|
241
|
+
fireEvent.keyDown(tab0, {
|
242
|
+
key: 'ArrowRight',
|
243
|
+
code: 'ArrowRight'
|
244
|
+
});
|
245
|
+
testSingleTab(tabs, tab2, 'toHaveFocus');
|
246
|
+
testTabPanel(2);
|
247
|
+
});
|
223
248
|
test('controlled tabs', function () {
|
224
249
|
var selectedKey = defaultTabs[1].name;
|
225
250
|
var onSelectionChange = jest.fn();
|
@@ -230,11 +255,11 @@ test('controlled tabs', function () {
|
|
230
255
|
}),
|
231
256
|
rerender = _getComponent.rerender;
|
232
257
|
|
233
|
-
var
|
234
|
-
tabs =
|
235
|
-
tab0 =
|
236
|
-
tab1 =
|
237
|
-
tab2 =
|
258
|
+
var _getTabs6 = getTabs(),
|
259
|
+
tabs = _getTabs6.tabs,
|
260
|
+
tab0 = _getTabs6.tab0,
|
261
|
+
tab1 = _getTabs6.tab1,
|
262
|
+
tab2 = _getTabs6.tab2; // Expect the second tab to be selected
|
238
263
|
|
239
264
|
|
240
265
|
expect(onSelectionChange).not.toHaveBeenCalled();
|
@@ -271,9 +296,9 @@ test('tab line props', function () {
|
|
271
296
|
}),
|
272
297
|
rerender = _getComponent2.rerender;
|
273
298
|
|
274
|
-
var
|
275
|
-
tabs =
|
276
|
-
tab0 =
|
299
|
+
var _getTabs7 = getTabs(),
|
300
|
+
tabs = _getTabs7.tabs,
|
301
|
+
tab0 = _getTabs7.tab0;
|
277
302
|
|
278
303
|
var tabLine = screen.getByRole('presentation'); // Expect the tab line to have a red background
|
279
304
|
|
@@ -302,16 +327,16 @@ test('tab with icon', function () {
|
|
302
327
|
tabs: newTabs
|
303
328
|
});
|
304
329
|
|
305
|
-
var
|
306
|
-
tabs =
|
307
|
-
tab0 =
|
330
|
+
var _getTabs8 = getTabs(),
|
331
|
+
tabs = _getTabs8.tabs,
|
332
|
+
tab0 = _getTabs8.tab0;
|
308
333
|
|
309
334
|
var icon = screen.getByTestId('icon'); // Expect the tab to have the given icon element
|
310
335
|
|
311
336
|
testSingleTab(tabs, tab0, 'toContainElement', [icon]);
|
312
337
|
});
|
313
338
|
test('tooltip renders on tab\'s hover in `tooltip` mode', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
314
|
-
var
|
339
|
+
var _getTabs9, tab0;
|
315
340
|
|
316
341
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
317
342
|
while (1) {
|
@@ -321,7 +346,7 @@ test('tooltip renders on tab\'s hover in `tooltip` mode', /*#__PURE__*/_asyncToG
|
|
321
346
|
mode: 'tooltip'
|
322
347
|
});
|
323
348
|
expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
|
324
|
-
|
349
|
+
_getTabs9 = getTabs(), tab0 = _getTabs9.tab0;
|
325
350
|
fireEvent.mouseMove(tab0);
|
326
351
|
fireEvent.mouseEnter(tab0);
|
327
352
|
|
@@ -345,8 +370,8 @@ test('tabs without selected keys show null tab panel content', function () {
|
|
345
370
|
test('hover tab style', function () {
|
346
371
|
getComponent();
|
347
372
|
|
348
|
-
var
|
349
|
-
tab0 =
|
373
|
+
var _getTabs10 = getTabs(),
|
374
|
+
tab0 = _getTabs10.tab0;
|
350
375
|
|
351
376
|
expect(tab0).not.toHaveClass('is-hovered');
|
352
377
|
userEvent.hover(tab0);
|
@@ -99,6 +99,14 @@ test('form wrapper will have default max label column width when no custom width
|
|
99
99
|
var textAreaContainer = screen.getByTestId(testId);
|
100
100
|
expect(textAreaContainer).toHaveStyle('grid-template-columns: 40% auto');
|
101
101
|
});
|
102
|
+
test('passing read only prop applys the is-read-only class to the textarea', function () {
|
103
|
+
var isReadOnly = true;
|
104
|
+
getComponent({
|
105
|
+
isReadOnly: isReadOnly
|
106
|
+
});
|
107
|
+
var textArea = screen.getByLabelText(defaultProps.label);
|
108
|
+
expect(textArea).toHaveClass('is-read-only');
|
109
|
+
});
|
102
110
|
test('form wrapper will have a max label column width when custom width set', function () {
|
103
111
|
var labelMode = 'left';
|
104
112
|
var containerProps = {
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import Earth from 'mdi-react/EarthIcon';
|
3
|
-
import
|
3
|
+
import PersonIcon from 'mdi-react/PersonIcon';
|
4
|
+
import { Box, Button, Icon, Tooltip, TooltipTrigger } from '../../index';
|
4
5
|
import IconButton from '../IconButton';
|
6
|
+
import Text from '../Text';
|
5
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
8
|
export default {
|
7
9
|
title: 'TooltipTrigger',
|
@@ -44,4 +46,34 @@ Disabled.parameters = {
|
|
44
46
|
story: 'The tooltip can be disabled without disabling the button press events.'
|
45
47
|
}
|
46
48
|
}
|
49
|
+
};
|
50
|
+
export var IconWithTooltip = function IconWithTooltip() {
|
51
|
+
return ___EmotionJSX(Box, {
|
52
|
+
pl: 50
|
53
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(IconButton, {
|
54
|
+
variant: "tooltipIconButton"
|
55
|
+
}, ___EmotionJSX(Icon, {
|
56
|
+
icon: PersonIcon
|
57
|
+
})), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
58
|
+
};
|
59
|
+
export var ChipWithTooltip = function ChipWithTooltip() {
|
60
|
+
return ___EmotionJSX(Box, {
|
61
|
+
pl: 50
|
62
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(Button, {
|
63
|
+
variant: "tooltipChip",
|
64
|
+
bg: "neutral.10"
|
65
|
+
}, ___EmotionJSX(Text, {
|
66
|
+
variant: "label",
|
67
|
+
sx: {
|
68
|
+
textTransform: 'uppercase'
|
69
|
+
},
|
70
|
+
color: "white"
|
71
|
+
}, "Some text")), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
72
|
+
};
|
73
|
+
export var TextWithTooltip = function TextWithTooltip() {
|
74
|
+
return ___EmotionJSX(Box, {
|
75
|
+
pl: 50
|
76
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(Button, {
|
77
|
+
variant: "tooltipInline"
|
78
|
+
}, "Some text"), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
47
79
|
};
|
package/lib/index.js
CHANGED
@@ -30,10 +30,6 @@ export * from './components/Chip';
|
|
30
30
|
export { default as ComboBoxField } from './components/ComboBoxField';
|
31
31
|
export { default as CopyText } from './components/CopyText';
|
32
32
|
export { default as ColorField } from './components/ColorField';
|
33
|
-
export { default as Dropdown } from './components/Dropdown';
|
34
|
-
export * from './components/Dropdown';
|
35
|
-
export { default as DropdownField } from './components/DropdownField';
|
36
|
-
export * from './components/DropdownField';
|
37
33
|
export { default as FieldHelperText } from './components/FieldHelperText';
|
38
34
|
export * from './components/FieldHelperText';
|
39
35
|
export { default as FileInputField } from './components/FileInputField';
|
@@ -77,12 +73,8 @@ export { default as OverlayPanel } from './components/OverlayPanel';
|
|
77
73
|
export * from './components/OverlayPanel';
|
78
74
|
export { default as PageHeader } from './components/PageHeader';
|
79
75
|
export * from './components/PageHeader';
|
80
|
-
export { default as Panel } from './components/Panel';
|
81
|
-
export * from './components/Panel';
|
82
76
|
export { default as PasswordField } from './components/PasswordField';
|
83
77
|
export * from './components/PasswordField';
|
84
|
-
export { default as Popover } from './components/Popover';
|
85
|
-
export * from './components/Popover';
|
86
78
|
export { default as PopoverContainer } from './components/PopoverContainer';
|
87
79
|
export * from './components/PopoverContainer';
|
88
80
|
export { default as PopoverMenu } from './components/PopoverMenu';
|
@@ -274,7 +274,8 @@ export var Default = function Default() {
|
|
274
274
|
}, ___EmotionJSX(Chip, {
|
275
275
|
bg: "success.light",
|
276
276
|
textColor: "success.dark",
|
277
|
-
label: "New"
|
277
|
+
label: "New",
|
278
|
+
isUppercase: true
|
278
279
|
})) : null)), ___EmotionJSX(Box, {
|
279
280
|
isRow: true,
|
280
281
|
alignSelf: "center"
|
@@ -3,14 +3,12 @@ import React from 'react';
|
|
3
3
|
import Earth from 'mdi-react/EarthIcon';
|
4
4
|
import Cog from 'mdi-react/CogOutlineIcon';
|
5
5
|
import Button from '../components/Button/Button';
|
6
|
-
import Panel from '../components/Panel/Panel';
|
7
6
|
import Box from '../components/Box/Box';
|
8
7
|
import Icon from '../components/Icon/Icon';
|
9
8
|
import Text from '../components/Text/Text';
|
10
9
|
import Separator from '../components/Separator/Separator';
|
11
10
|
import TextField from '../components/TextField/TextField';
|
12
11
|
import TextAreaField from '../components/TextAreaField/TextAreaField';
|
13
|
-
import DropdownField from '../components/DropdownField/DropdownField';
|
14
12
|
import RadioGroupField from '../components/RadioGroupField/RadioGroupField';
|
15
13
|
import RadioField from '../components/RadioField/RadioField';
|
16
14
|
import Tabs from '../components/Tabs/Tabs';
|
@@ -96,10 +94,7 @@ export var Default = function Default() {
|
|
96
94
|
}), ___EmotionJSX(TextAreaField, {
|
97
95
|
mb: "lg",
|
98
96
|
label: "Description"
|
99
|
-
}), ___EmotionJSX(
|
100
|
-
label: "Category",
|
101
|
-
mb: "lg"
|
102
|
-
}, ___EmotionJSX("option", null, "Option 1"), ___EmotionJSX("option", null, "Option 2"), ___EmotionJSX("option", null, "Option 3")), ___EmotionJSX(RadioGroupField, {
|
97
|
+
}), ___EmotionJSX(RadioGroupField, {
|
103
98
|
label: "Required Fields",
|
104
99
|
variant: "radioGroupBasic"
|
105
100
|
}, ___EmotionJSX(RadioField, {
|
@@ -108,17 +103,5 @@ export var Default = function Default() {
|
|
108
103
|
}), ___EmotionJSX(RadioField, {
|
109
104
|
value: "B",
|
110
105
|
label: "Option B"
|
111
|
-
}))))
|
112
|
-
isVisible: visible,
|
113
|
-
width: "70%",
|
114
|
-
bg: "accent.99"
|
115
|
-
}, ___EmotionJSX(Box, {
|
116
|
-
p: "lg",
|
117
|
-
onClick: function onClick() {
|
118
|
-
return setVisible(!visible);
|
119
|
-
}
|
120
|
-
}, ___EmotionJSX(Box, {
|
121
|
-
p: "lg",
|
122
|
-
bg: "white"
|
123
|
-
}, ___EmotionJSX(Text, null, "Your content here."))))));
|
106
|
+
}))))));
|
124
107
|
};
|
@@ -82,11 +82,11 @@ export var Default = function Default() {
|
|
82
82
|
sx: {
|
83
83
|
position: 'absolute',
|
84
84
|
right: -30,
|
85
|
-
top: 5
|
85
|
+
top: 5,
|
86
|
+
width: 'auto'
|
86
87
|
},
|
87
88
|
type: "delete",
|
88
|
-
title: "Delete Field"
|
89
|
-
variant: "icon"
|
89
|
+
title: "Delete Field"
|
90
90
|
}, ___EmotionJSX(Icon, {
|
91
91
|
icon: TrashIcon,
|
92
92
|
size: 20,
|
package/lib/styles/theme.js
CHANGED
@@ -28,10 +28,10 @@ var accordionBody = {
|
|
28
28
|
var accordionGridHeader = {
|
29
29
|
cursor: 'pointer',
|
30
30
|
lineHeight: '30px',
|
31
|
-
|
31
|
+
pl: 'sm',
|
32
32
|
outline: 'none',
|
33
33
|
display: 'flex',
|
34
|
-
justifyContent: '
|
34
|
+
justifyContent: 'center',
|
35
35
|
flexShrink: 0,
|
36
36
|
wordBreak: 'inherit',
|
37
37
|
whiteSpace: 'nowrap',
|
@@ -45,12 +45,9 @@ var accordionGridHeader = {
|
|
45
45
|
WebkitBoxShadow: 'focus',
|
46
46
|
MozBoxShadow: 'focus'
|
47
47
|
},
|
48
|
-
|
48
|
+
minHeight: '64px',
|
49
49
|
'&.is-hovered': {
|
50
|
-
|
51
|
-
'& div > div > div > span': {
|
52
|
-
color: 'active'
|
53
|
-
}
|
50
|
+
backgroundColor: 'accent.99'
|
54
51
|
},
|
55
52
|
'&.is-pressed': {
|
56
53
|
color: 'accent.20',
|
@@ -61,6 +58,7 @@ var accordionGridHeader = {
|
|
61
58
|
};
|
62
59
|
var accordionGridBody = {
|
63
60
|
display: 'none !important',
|
61
|
+
pl: 'sm',
|
64
62
|
width: '100%',
|
65
63
|
'&.is-selected': {
|
66
64
|
display: 'flex !important'
|
@@ -16,20 +16,6 @@ import { text } from './text';
|
|
16
16
|
var base = {
|
17
17
|
display: 'flex'
|
18
18
|
};
|
19
|
-
var panel = {
|
20
|
-
outline: 'none',
|
21
|
-
position: 'relative',
|
22
|
-
bg: 'white',
|
23
|
-
borderLeft: 'separator',
|
24
|
-
transition: 'margin 0.25s ease-in',
|
25
|
-
visibility: 'hidden',
|
26
|
-
'&.is-focused': {
|
27
|
-
boxShadow: 'focus'
|
28
|
-
},
|
29
|
-
'&.is-visible': {
|
30
|
-
visibility: 'visible'
|
31
|
-
}
|
32
|
-
};
|
33
19
|
var card = {
|
34
20
|
boxShadow: 'standard',
|
35
21
|
p: 'lg',
|
@@ -85,6 +71,10 @@ var listViewItem = _objectSpread(_objectSpread({}, base), {}, {
|
|
85
71
|
},
|
86
72
|
'&.is-focused': {
|
87
73
|
boxShadow: 'inset 0 0 5px #5873bdbf'
|
74
|
+
},
|
75
|
+
'&.has-separator': {
|
76
|
+
borderBottom: '1px solid',
|
77
|
+
borderBottomColor: 'line.hairline'
|
88
78
|
}
|
89
79
|
});
|
90
80
|
|
@@ -96,16 +86,29 @@ var listBoxSectionTitle = {
|
|
96
86
|
ml: 'sm',
|
97
87
|
justifyContent: 'center'
|
98
88
|
};
|
99
|
-
var chip = {
|
89
|
+
export var chip = {
|
100
90
|
cursor: 'pointer',
|
101
|
-
|
102
|
-
p: '10px',
|
91
|
+
p: '3px 5px 4px 5px',
|
103
92
|
alignItems: 'center',
|
104
93
|
justifyContent: 'center',
|
105
94
|
minWidth: '50px',
|
106
95
|
alignSelf: 'flex-start',
|
107
96
|
display: 'inline-flex !important',
|
108
|
-
borderRadius: '5px'
|
97
|
+
borderRadius: '5px',
|
98
|
+
fontWeight: 1,
|
99
|
+
'& button': {
|
100
|
+
backgroundColor: 'transparent',
|
101
|
+
marginLeft: 'xs',
|
102
|
+
marginTop: '1px',
|
103
|
+
padding: '0',
|
104
|
+
'&.is-hovered': {
|
105
|
+
backgroundColor: 'white'
|
106
|
+
},
|
107
|
+
'& .mdi-icon': {
|
108
|
+
marginLeft: '0',
|
109
|
+
padding: '2px'
|
110
|
+
}
|
111
|
+
}
|
109
112
|
};
|
110
113
|
var inputInContainerSlot = {
|
111
114
|
position: 'absolute',
|
@@ -263,7 +266,6 @@ export default {
|
|
263
266
|
listItem: listItem,
|
264
267
|
listBoxSectionTitle: listBoxSectionTitle,
|
265
268
|
listViewItem: listViewItem,
|
266
|
-
panel: panel,
|
267
269
|
radioCheckedContent: radioCheckedContent,
|
268
270
|
radioContainer: radioContainer,
|
269
271
|
scrollbox: scrollbox,
|
@@ -14,6 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
14
14
|
|
15
15
|
import { text as textVariants } from './text';
|
16
16
|
import { neutral } from '../colors';
|
17
|
+
import { chip } from './boxes';
|
17
18
|
|
18
19
|
var base = _objectSpread({
|
19
20
|
cursor: 'pointer',
|
@@ -158,32 +159,7 @@ var accordionHeader = _objectSpread(_objectSpread({}, base), {}, {
|
|
158
159
|
color: 'accent.20'
|
159
160
|
},
|
160
161
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
161
|
-
});
|
162
|
-
|
163
|
-
|
164
|
-
var icon = {
|
165
|
-
p: '3px',
|
166
|
-
alignSelf: 'flex-start',
|
167
|
-
flexGrow: 0,
|
168
|
-
borderRadius: '100%',
|
169
|
-
cursor: 'pointer',
|
170
|
-
bg: 'transparent',
|
171
|
-
'path': {
|
172
|
-
fill: 'text.secondary'
|
173
|
-
},
|
174
|
-
outline: 'none',
|
175
|
-
color: 'white',
|
176
|
-
'&.is-hovered': {
|
177
|
-
bg: 'accent.90'
|
178
|
-
},
|
179
|
-
'&.is-pressed': {
|
180
|
-
'path': {
|
181
|
-
fill: 'white'
|
182
|
-
},
|
183
|
-
bg: 'active'
|
184
|
-
},
|
185
|
-
'&.is-focused': _objectSpread({}, defaultFocus)
|
186
|
-
};
|
162
|
+
});
|
187
163
|
|
188
164
|
var primary = _objectSpread(_objectSpread({}, base), {}, {
|
189
165
|
display: 'inline-flex',
|
@@ -309,7 +285,7 @@ var inline = _objectSpread(_objectSpread({}, base), {}, {
|
|
309
285
|
bg: 'white',
|
310
286
|
height: '22px',
|
311
287
|
lineHeight: 1,
|
312
|
-
fontSize: '
|
288
|
+
fontSize: 'sm',
|
313
289
|
borderRadius: '15px',
|
314
290
|
border: '1px solid',
|
315
291
|
borderColor: 'active',
|
@@ -471,6 +447,36 @@ var fileInputField = {
|
|
471
447
|
boxShadow: 'focus'
|
472
448
|
}
|
473
449
|
};
|
450
|
+
|
451
|
+
var tooltipChip = _objectSpread(_objectSpread({}, chip), {}, {
|
452
|
+
cursor: 'default',
|
453
|
+
'&.is-hovered, &.is-pressed': {
|
454
|
+
cursor: 'default',
|
455
|
+
outline: 'none'
|
456
|
+
}
|
457
|
+
});
|
458
|
+
|
459
|
+
var tooltipIconButton = _objectSpread(_objectSpread({}, iconButton), {}, {
|
460
|
+
cursor: 'default',
|
461
|
+
'&.is-hovered, &.is-pressed': {
|
462
|
+
backgroundColor: 'inherit',
|
463
|
+
cursor: 'default',
|
464
|
+
path: {
|
465
|
+
fill: 'neutral.20'
|
466
|
+
}
|
467
|
+
}
|
468
|
+
});
|
469
|
+
|
470
|
+
var tooltipInline = _objectSpread(_objectSpread({}, text), {}, {
|
471
|
+
cursor: 'default',
|
472
|
+
alignSelf: 'flex-start',
|
473
|
+
'&.is-hovered, &.is-pressed': {
|
474
|
+
backgroundColor: 'inherit',
|
475
|
+
cursor: 'default',
|
476
|
+
textDecoration: 'inherit'
|
477
|
+
}
|
478
|
+
});
|
479
|
+
|
474
480
|
export default {
|
475
481
|
accordionHeader: accordionHeader,
|
476
482
|
chipDeleteButton: chipDeleteButton,
|
@@ -491,7 +497,6 @@ export default {
|
|
491
497
|
expandableRow: expandableRow,
|
492
498
|
fileInputField: fileInputField,
|
493
499
|
iconButton: iconButton,
|
494
|
-
icon: icon,
|
495
500
|
imageUpload: imageUpload,
|
496
501
|
inline: inline,
|
497
502
|
inverted: inverted,
|
@@ -504,5 +509,8 @@ export default {
|
|
504
509
|
helpHint: helpHint,
|
505
510
|
modalCloseButton: modalCloseButton,
|
506
511
|
applicationPortalPinned: applicationPortalPinned,
|
507
|
-
applicationPortal: applicationPortal
|
512
|
+
applicationPortal: applicationPortal,
|
513
|
+
tooltipChip: tooltipChip,
|
514
|
+
tooltipIconButton: tooltipIconButton,
|
515
|
+
tooltipInline: tooltipInline
|
508
516
|
};
|
@@ -24,7 +24,6 @@ import menu from './menu';
|
|
24
24
|
import menuItem from './menuItem';
|
25
25
|
import messages from './messages';
|
26
26
|
import numberField from './numberField';
|
27
|
-
import popover from './popover';
|
28
27
|
import overlayPanel from './overlayPanel';
|
29
28
|
import popoverMenu from './popoverMenu';
|
30
29
|
import rockerbutton from './rockerbutton';
|
@@ -47,7 +46,6 @@ export default _objectSpread(_objectSpread({
|
|
47
46
|
modal: modal,
|
48
47
|
numberField: numberField,
|
49
48
|
overlayPanel: overlayPanel,
|
50
|
-
popover: popover,
|
51
49
|
popoverMenu: popoverMenu,
|
52
50
|
rockerbutton: rockerbutton,
|
53
51
|
separator: separator,
|