@pingux/astro 1.0.0-alpha.9 → 1.1.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/README.md +5 -0
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  4. package/lib/cjs/components/Button/Button.js +5 -24
  5. package/lib/cjs/components/Button/Button.stories.js +5 -11
  6. package/lib/cjs/components/Button/Button.test.js +0 -24
  7. package/lib/cjs/components/Chip/Chip.js +26 -10
  8. package/lib/cjs/components/Chip/Chip.stories.js +44 -5
  9. package/lib/cjs/components/Chip/Chip.test.js +9 -0
  10. package/lib/cjs/components/{DropdownField/index.js → Chip/ChipContext.js} +8 -7
  11. package/lib/cjs/components/IconButton/IconButton.js +17 -7
  12. package/lib/cjs/components/IconButton/IconButton.stories.js +8 -17
  13. package/lib/cjs/components/IconButton/IconButton.test.js +0 -1
  14. package/lib/cjs/components/ListItem/ListItem.stories.js +0 -2
  15. package/lib/cjs/components/ListView/ListView.js +4 -3
  16. package/lib/cjs/components/ListView/ListView.stories.js +580 -39
  17. package/lib/cjs/components/ListViewItem/ListViewItem.js +3 -6
  18. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +1 -1
  19. package/lib/cjs/components/Stepper/Stepper.js +1 -0
  20. package/lib/cjs/components/Tab/Tab.js +5 -3
  21. package/lib/cjs/components/Tabs/Tabs.js +3 -0
  22. package/lib/cjs/components/Tabs/Tabs.stories.js +3 -4
  23. package/lib/cjs/components/Tabs/Tabs.test.js +44 -15
  24. package/lib/cjs/components/TextAreaField/TextAreaField.test.js +10 -0
  25. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
  26. package/lib/cjs/index.js +48 -136
  27. package/lib/cjs/layouts/ListLayout.stories.js +2 -1
  28. package/lib/cjs/layouts/SchemaFormLayout.stories.js +2 -21
  29. package/lib/cjs/recipes/ArrayField.stories.js +3 -3
  30. package/lib/cjs/styles/forms/input.js +4 -0
  31. package/lib/cjs/styles/theme.js +0 -3
  32. package/lib/cjs/styles/variants/accordion.js +5 -7
  33. package/lib/cjs/styles/variants/boxes.js +22 -19
  34. package/lib/cjs/styles/variants/buttons.js +48 -29
  35. package/lib/cjs/styles/variants/variants.js +0 -3
  36. package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  37. package/lib/components/Button/Button.js +7 -24
  38. package/lib/components/Button/Button.stories.js +5 -10
  39. package/lib/components/Button/Button.test.js +0 -20
  40. package/lib/components/Chip/Chip.js +25 -10
  41. package/lib/components/Chip/Chip.stories.js +41 -5
  42. package/lib/components/Chip/Chip.test.js +9 -0
  43. package/lib/components/Chip/ChipContext.js +3 -0
  44. package/lib/components/IconButton/IconButton.js +17 -9
  45. package/lib/components/IconButton/IconButton.stories.js +7 -13
  46. package/lib/components/IconButton/IconButton.test.js +0 -1
  47. package/lib/components/ListItem/ListItem.stories.js +0 -2
  48. package/lib/components/ListView/ListView.js +4 -3
  49. package/lib/components/ListView/ListView.stories.js +577 -39
  50. package/lib/components/ListViewItem/ListViewItem.js +3 -5
  51. package/lib/components/MultivaluesField/MultivaluesField.js +1 -1
  52. package/lib/components/Stepper/Stepper.js +1 -0
  53. package/lib/components/Tab/Tab.js +5 -3
  54. package/lib/components/Tabs/Tabs.js +3 -0
  55. package/lib/components/Tabs/Tabs.stories.js +3 -4
  56. package/lib/components/Tabs/Tabs.test.js +40 -15
  57. package/lib/components/TextAreaField/TextAreaField.test.js +8 -0
  58. package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
  59. package/lib/index.js +0 -8
  60. package/lib/layouts/ListLayout.stories.js +2 -1
  61. package/lib/layouts/SchemaFormLayout.stories.js +2 -19
  62. package/lib/recipes/ArrayField.stories.js +3 -3
  63. package/lib/styles/forms/input.js +4 -0
  64. package/lib/styles/theme.js +0 -3
  65. package/lib/styles/variants/accordion.js +5 -7
  66. package/lib/styles/variants/boxes.js +21 -19
  67. package/lib/styles/variants/buttons.js +47 -29
  68. package/lib/styles/variants/variants.js +0 -2
  69. package/package.json +1 -1
  70. package/lib/cjs/components/Dropdown/Dropdown.js +0 -112
  71. package/lib/cjs/components/Dropdown/Dropdown.test.js +0 -80
  72. package/lib/cjs/components/Dropdown/index.js +0 -18
  73. package/lib/cjs/components/DropdownField/DropdownField.js +0 -187
  74. package/lib/cjs/components/DropdownField/DropdownField.stories.js +0 -278
  75. package/lib/cjs/components/DropdownField/DropdownField.test.js +0 -80
  76. package/lib/cjs/components/Panel/Panel.js +0 -101
  77. package/lib/cjs/components/Panel/Panel.stories.js +0 -57
  78. package/lib/cjs/components/Panel/Panel.test.js +0 -72
  79. package/lib/cjs/components/Panel/index.js +0 -18
  80. package/lib/cjs/components/Popover/Popover.js +0 -87
  81. package/lib/cjs/components/Popover/Popover.stories.js +0 -80
  82. package/lib/cjs/components/Popover/Popover.test.js +0 -91
  83. package/lib/cjs/components/Popover/index.js +0 -18
  84. package/lib/cjs/recipes/InputBoxWithLinkedChip.stories.js +0 -67
  85. package/lib/cjs/styles/variants/popover.js +0 -86
  86. package/lib/components/Dropdown/Dropdown.js +0 -90
  87. package/lib/components/Dropdown/Dropdown.test.js +0 -62
  88. package/lib/components/Dropdown/index.js +0 -1
  89. package/lib/components/DropdownField/DropdownField.js +0 -155
  90. package/lib/components/DropdownField/DropdownField.stories.js +0 -222
  91. package/lib/components/DropdownField/DropdownField.test.js +0 -60
  92. package/lib/components/DropdownField/index.js +0 -1
  93. package/lib/components/Panel/Panel.js +0 -71
  94. package/lib/components/Panel/Panel.stories.js +0 -35
  95. package/lib/components/Panel/Panel.test.js +0 -52
  96. package/lib/components/Panel/index.js +0 -1
  97. package/lib/components/Popover/Popover.js +0 -65
  98. package/lib/components/Popover/Popover.stories.js +0 -52
  99. package/lib/components/Popover/Popover.test.js +0 -75
  100. package/lib/components/Popover/index.js +0 -2
  101. package/lib/recipes/InputBoxWithLinkedChip.stories.js +0 -43
  102. package/lib/styles/variants/popover.js +0 -76
@@ -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
- otherItemProps = _objectWithoutProperties(itemProps, ["icon", "isDisabled", "separator", "tabLabelProps", "tabLineProps", "content"]);
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
- defaultSelectedKey: "Tab 2",
132
- items: tabs
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 _getTabs5 = getTabs(),
234
- tabs = _getTabs5.tabs,
235
- tab0 = _getTabs5.tab0,
236
- tab1 = _getTabs5.tab1,
237
- tab2 = _getTabs5.tab2; // Expect the second tab to be selected
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 _getTabs6 = getTabs(),
275
- tabs = _getTabs6.tabs,
276
- tab0 = _getTabs6.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 _getTabs7 = getTabs(),
306
- tabs = _getTabs7.tabs,
307
- tab0 = _getTabs7.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 _getTabs8, tab0;
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
- _getTabs8 = getTabs(), tab0 = _getTabs8.tab0;
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 _getTabs9 = getTabs(),
349
- tab0 = _getTabs9.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 { Button, Icon, Tooltip, TooltipTrigger } from '../../index';
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(DropdownField, {
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
- })))), ___EmotionJSX(Panel, {
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,
@@ -128,6 +128,10 @@ input.container = (_input$container = {
128
128
  backgroundColor: 'accent.95',
129
129
  border: 'none'
130
130
  },
131
+ '> textarea': {
132
+ backgroundColor: 'accent.95',
133
+ border: 'none'
134
+ },
131
135
  '&:after': {
132
136
  display: 'none'
133
137
  }
@@ -42,9 +42,6 @@ export default {
42
42
  row: "0 0 9px ".concat(accent[95]),
43
43
  focus: "0 0 5px ".concat(focus)
44
44
  },
45
- transitions: {
46
- panel: 'margin 0.25s'
47
- },
48
45
  forms: forms,
49
46
  text: text,
50
47
  images: images,
@@ -28,10 +28,10 @@ var accordionBody = {
28
28
  var accordionGridHeader = {
29
29
  cursor: 'pointer',
30
30
  lineHeight: '30px',
31
- px: 'md',
31
+ pl: 'sm',
32
32
  outline: 'none',
33
33
  display: 'flex',
34
- justifyContent: 'flex-start',
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
- padding: '0px',
48
+ minHeight: '64px',
49
49
  '&.is-hovered': {
50
- color: 'active',
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
- height: '15px',
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',
@@ -81,6 +82,10 @@ var iconButton = {
81
82
  }
82
83
  };
83
84
 
85
+ var square = _objectSpread(_objectSpread({}, iconButton), {}, {
86
+ borderRadius: '2px'
87
+ });
88
+
84
89
  var modalCloseButton = _objectSpread(_objectSpread({}, iconButton), {}, {
85
90
  position: 'absolute',
86
91
  top: 14,
@@ -158,32 +163,7 @@ var accordionHeader = _objectSpread(_objectSpread({}, base), {}, {
158
163
  color: 'accent.20'
159
164
  },
160
165
  '&.is-focused': _objectSpread({}, defaultFocus)
161
- }); // TODO: Remove this variant in Astro-UI 1.0.0
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
- };
166
+ });
187
167
 
188
168
  var primary = _objectSpread(_objectSpread({}, base), {}, {
189
169
  display: 'inline-flex',
@@ -243,6 +223,10 @@ var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
243
223
  }
244
224
  });
245
225
 
226
+ var invertedSquare = _objectSpread(_objectSpread({}, inverted), {}, {
227
+ borderRadius: '2px'
228
+ });
229
+
246
230
  var applicationPortal = _objectSpread(_objectSpread({}, iconButton), {}, {
247
231
  background: 'transparent',
248
232
  '&.is-focused': _objectSpread({}, defaultFocus),
@@ -309,7 +293,7 @@ var inline = _objectSpread(_objectSpread({}, base), {}, {
309
293
  bg: 'white',
310
294
  height: '22px',
311
295
  lineHeight: 1,
312
- fontSize: '14px',
296
+ fontSize: 'sm',
313
297
  borderRadius: '15px',
314
298
  border: '1px solid',
315
299
  borderColor: 'active',
@@ -471,6 +455,36 @@ var fileInputField = {
471
455
  boxShadow: 'focus'
472
456
  }
473
457
  };
458
+
459
+ var tooltipChip = _objectSpread(_objectSpread({}, chip), {}, {
460
+ cursor: 'default',
461
+ '&.is-hovered, &.is-pressed': {
462
+ cursor: 'default',
463
+ outline: 'none'
464
+ }
465
+ });
466
+
467
+ var tooltipIconButton = _objectSpread(_objectSpread({}, iconButton), {}, {
468
+ cursor: 'default',
469
+ '&.is-hovered, &.is-pressed': {
470
+ backgroundColor: 'inherit',
471
+ cursor: 'default',
472
+ path: {
473
+ fill: 'neutral.20'
474
+ }
475
+ }
476
+ });
477
+
478
+ var tooltipInline = _objectSpread(_objectSpread({}, text), {}, {
479
+ cursor: 'default',
480
+ alignSelf: 'flex-start',
481
+ '&.is-hovered, &.is-pressed': {
482
+ backgroundColor: 'inherit',
483
+ cursor: 'default',
484
+ textDecoration: 'inherit'
485
+ }
486
+ });
487
+
474
488
  export default {
475
489
  accordionHeader: accordionHeader,
476
490
  chipDeleteButton: chipDeleteButton,
@@ -491,7 +505,6 @@ export default {
491
505
  expandableRow: expandableRow,
492
506
  fileInputField: fileInputField,
493
507
  iconButton: iconButton,
494
- icon: icon,
495
508
  imageUpload: imageUpload,
496
509
  inline: inline,
497
510
  inverted: inverted,
@@ -504,5 +517,10 @@ export default {
504
517
  helpHint: helpHint,
505
518
  modalCloseButton: modalCloseButton,
506
519
  applicationPortalPinned: applicationPortalPinned,
507
- applicationPortal: applicationPortal
520
+ applicationPortal: applicationPortal,
521
+ square: square,
522
+ invertedSquare: invertedSquare,
523
+ tooltipChip: tooltipChip,
524
+ tooltipIconButton: tooltipIconButton,
525
+ tooltipInline: tooltipInline
508
526
  };
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.0.0-alpha.9",
3
+ "version": "1.1.0-alpha.2",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "uxdev@pingidentity.com",
6
6
  "license": "Apache-2.0",