@pingux/astro 1.0.0-alpha.6 → 1.0.1

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 (109) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/README.md +5 -0
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  4. package/lib/cjs/components/AccordionItem/AccordionItem.js +3 -1
  5. package/lib/cjs/components/Button/Button.js +5 -24
  6. package/lib/cjs/components/Button/Button.stories.js +5 -11
  7. package/lib/cjs/components/Button/Button.test.js +0 -24
  8. package/lib/cjs/components/Chip/Chip.js +26 -10
  9. package/lib/cjs/components/Chip/Chip.stories.js +44 -5
  10. package/lib/cjs/components/Chip/Chip.test.js +9 -0
  11. package/lib/cjs/components/{Panel/index.js → Chip/ChipContext.js} +8 -7
  12. package/lib/cjs/components/CopyText/CopyText.js +3 -73
  13. package/lib/cjs/components/IconButton/IconButton.js +17 -7
  14. package/lib/cjs/components/IconButton/IconButton.test.js +0 -1
  15. package/lib/cjs/components/ListItem/ListItem.stories.js +0 -2
  16. package/lib/cjs/components/ListView/ListView.js +4 -3
  17. package/lib/cjs/components/ListViewItem/ListViewItem.js +3 -6
  18. package/lib/cjs/components/Stepper/Stepper.js +1 -0
  19. package/lib/cjs/components/Tab/Tab.js +15 -6
  20. package/lib/cjs/components/Tabs/Tabs.js +7 -1
  21. package/lib/cjs/components/Tabs/Tabs.stories.js +60 -6
  22. package/lib/cjs/components/Tabs/Tabs.test.js +78 -15
  23. package/lib/cjs/components/TextAreaField/TextAreaField.test.js +10 -0
  24. package/lib/cjs/{components/DropdownField → hooks/useCopyToClipboard}/index.js +2 -2
  25. package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +83 -0
  26. package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.test.js +79 -0
  27. package/lib/cjs/index.js +48 -136
  28. package/lib/cjs/layouts/ListLayout.stories.js +2 -1
  29. package/lib/cjs/layouts/SchemaFormLayout.stories.js +2 -21
  30. package/lib/cjs/recipes/ArrayField.stories.js +3 -3
  31. package/lib/cjs/recipes/CopyToClipboard.stories.js +45 -0
  32. package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +146 -0
  33. package/lib/cjs/styles/forms/input.js +4 -0
  34. package/lib/cjs/styles/theme.js +0 -3
  35. package/lib/cjs/styles/variants/accordion.js +7 -9
  36. package/lib/cjs/styles/variants/boxes.js +20 -18
  37. package/lib/cjs/styles/variants/buttons.js +2 -28
  38. package/lib/cjs/styles/variants/tabs.js +1 -0
  39. package/lib/cjs/styles/variants/variants.js +0 -3
  40. package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  41. package/lib/components/AccordionItem/AccordionItem.js +3 -1
  42. package/lib/components/Button/Button.js +7 -24
  43. package/lib/components/Button/Button.stories.js +5 -10
  44. package/lib/components/Button/Button.test.js +0 -20
  45. package/lib/components/Chip/Chip.js +25 -10
  46. package/lib/components/Chip/Chip.stories.js +41 -5
  47. package/lib/components/Chip/Chip.test.js +9 -0
  48. package/lib/components/Chip/ChipContext.js +3 -0
  49. package/lib/components/CopyText/CopyText.js +2 -71
  50. package/lib/components/IconButton/IconButton.js +17 -9
  51. package/lib/components/IconButton/IconButton.test.js +0 -1
  52. package/lib/components/ListItem/ListItem.stories.js +0 -2
  53. package/lib/components/ListView/ListView.js +4 -3
  54. package/lib/components/ListViewItem/ListViewItem.js +3 -5
  55. package/lib/components/Stepper/Stepper.js +1 -0
  56. package/lib/components/Tab/Tab.js +15 -6
  57. package/lib/components/Tabs/Tabs.js +7 -1
  58. package/lib/components/Tabs/Tabs.stories.js +56 -4
  59. package/lib/components/Tabs/Tabs.test.js +78 -15
  60. package/lib/components/TextAreaField/TextAreaField.test.js +8 -0
  61. package/lib/hooks/useCopyToClipboard/index.js +1 -0
  62. package/lib/hooks/useCopyToClipboard/useCopyToClipboard.js +69 -0
  63. package/lib/hooks/useCopyToClipboard/useCopyToClipboard.test.js +64 -0
  64. package/lib/index.js +0 -8
  65. package/lib/layouts/ListLayout.stories.js +2 -1
  66. package/lib/layouts/SchemaFormLayout.stories.js +2 -19
  67. package/lib/recipes/ArrayField.stories.js +3 -3
  68. package/lib/recipes/CopyToClipboard.stories.js +25 -0
  69. package/lib/recipes/RadioButtonsWithLinks.stories.js +120 -0
  70. package/lib/styles/forms/input.js +4 -0
  71. package/lib/styles/theme.js +0 -3
  72. package/lib/styles/variants/accordion.js +7 -9
  73. package/lib/styles/variants/boxes.js +20 -18
  74. package/lib/styles/variants/buttons.js +2 -28
  75. package/lib/styles/variants/tabs.js +1 -0
  76. package/lib/styles/variants/variants.js +0 -2
  77. package/package.json +2 -2
  78. package/lib/cjs/components/Dropdown/Dropdown.js +0 -112
  79. package/lib/cjs/components/Dropdown/Dropdown.test.js +0 -80
  80. package/lib/cjs/components/Dropdown/index.js +0 -18
  81. package/lib/cjs/components/DropdownField/DropdownField.js +0 -187
  82. package/lib/cjs/components/DropdownField/DropdownField.stories.js +0 -278
  83. package/lib/cjs/components/DropdownField/DropdownField.test.js +0 -80
  84. package/lib/cjs/components/Panel/Panel.js +0 -101
  85. package/lib/cjs/components/Panel/Panel.stories.js +0 -57
  86. package/lib/cjs/components/Panel/Panel.test.js +0 -72
  87. package/lib/cjs/components/Popover/Popover.js +0 -87
  88. package/lib/cjs/components/Popover/Popover.stories.js +0 -80
  89. package/lib/cjs/components/Popover/Popover.test.js +0 -91
  90. package/lib/cjs/components/Popover/index.js +0 -18
  91. package/lib/cjs/recipes/InputBoxWithLinkedChip.stories.js +0 -67
  92. package/lib/cjs/styles/variants/popover.js +0 -86
  93. package/lib/components/Dropdown/Dropdown.js +0 -90
  94. package/lib/components/Dropdown/Dropdown.test.js +0 -62
  95. package/lib/components/Dropdown/index.js +0 -1
  96. package/lib/components/DropdownField/DropdownField.js +0 -155
  97. package/lib/components/DropdownField/DropdownField.stories.js +0 -222
  98. package/lib/components/DropdownField/DropdownField.test.js +0 -60
  99. package/lib/components/DropdownField/index.js +0 -1
  100. package/lib/components/Panel/Panel.js +0 -71
  101. package/lib/components/Panel/Panel.stories.js +0 -35
  102. package/lib/components/Panel/Panel.test.js +0 -52
  103. package/lib/components/Panel/index.js +0 -1
  104. package/lib/components/Popover/Popover.js +0 -65
  105. package/lib/components/Popover/Popover.stories.js +0 -52
  106. package/lib/components/Popover/Popover.test.js +0 -75
  107. package/lib/components/Popover/index.js +0 -2
  108. package/lib/recipes/InputBoxWithLinkedChip.stories.js +0 -43
  109. package/lib/styles/variants/popover.js +0 -76
@@ -20,8 +20,6 @@ var _CogOutlineIcon = _interopRequireDefault(require("mdi-react/CogOutlineIcon")
20
20
 
21
21
  var _Button = _interopRequireDefault(require("../components/Button/Button"));
22
22
 
23
- var _Panel = _interopRequireDefault(require("../components/Panel/Panel"));
24
-
25
23
  var _Box = _interopRequireDefault(require("../components/Box/Box"));
26
24
 
27
25
  var _Icon = _interopRequireDefault(require("../components/Icon/Icon"));
@@ -34,8 +32,6 @@ var _TextField = _interopRequireDefault(require("../components/TextField/TextFie
34
32
 
35
33
  var _TextAreaField = _interopRequireDefault(require("../components/TextAreaField/TextAreaField"));
36
34
 
37
- var _DropdownField = _interopRequireDefault(require("../components/DropdownField/DropdownField"));
38
-
39
35
  var _RadioGroupField = _interopRequireDefault(require("../components/RadioGroupField/RadioGroupField"));
40
36
 
41
37
  var _RadioField = _interopRequireDefault(require("../components/RadioField/RadioField"));
@@ -128,10 +124,7 @@ var Default = function Default() {
128
124
  }), (0, _react2.jsx)(_TextAreaField["default"], {
129
125
  mb: "lg",
130
126
  label: "Description"
131
- }), (0, _react2.jsx)(_DropdownField["default"], {
132
- label: "Category",
133
- mb: "lg"
134
- }, (0, _react2.jsx)("option", null, "Option 1"), (0, _react2.jsx)("option", null, "Option 2"), (0, _react2.jsx)("option", null, "Option 3")), (0, _react2.jsx)(_RadioGroupField["default"], {
127
+ }), (0, _react2.jsx)(_RadioGroupField["default"], {
135
128
  label: "Required Fields",
136
129
  variant: "radioGroupBasic"
137
130
  }, (0, _react2.jsx)(_RadioField["default"], {
@@ -140,19 +133,7 @@ var Default = function Default() {
140
133
  }), (0, _react2.jsx)(_RadioField["default"], {
141
134
  value: "B",
142
135
  label: "Option B"
143
- })))), (0, _react2.jsx)(_Panel["default"], {
144
- isVisible: visible,
145
- width: "70%",
146
- bg: "accent.99"
147
- }, (0, _react2.jsx)(_Box["default"], {
148
- p: "lg",
149
- onClick: function onClick() {
150
- return setVisible(!visible);
151
- }
152
- }, (0, _react2.jsx)(_Box["default"], {
153
- p: "lg",
154
- bg: "white"
155
- }, (0, _react2.jsx)(_Text["default"], null, "Your content here."))))));
136
+ }))))));
156
137
  };
157
138
 
158
139
  exports.Default = Default;
@@ -116,11 +116,11 @@ var Default = function Default() {
116
116
  sx: {
117
117
  position: 'absolute',
118
118
  right: -30,
119
- top: 5
119
+ top: 5,
120
+ width: 'auto'
120
121
  },
121
122
  type: "delete",
122
- title: "Delete Field",
123
- variant: "icon"
123
+ title: "Delete Field"
124
124
  }, (0, _react2.jsx)(_index.Icon, {
125
125
  icon: _TrashIcon["default"],
126
126
  size: 20,
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
+
7
+ _Object$defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+
11
+ exports.Default = exports["default"] = void 0;
12
+
13
+ var _react = _interopRequireDefault(require("react"));
14
+
15
+ var _index = require("../index");
16
+
17
+ var _useCopyToClipboard = _interopRequireDefault(require("../hooks/useCopyToClipboard"));
18
+
19
+ var _react2 = require("@emotion/react");
20
+
21
+ var _default = {
22
+ title: 'Recipes/CopyToClipboard'
23
+ };
24
+ exports["default"] = _default;
25
+
26
+ var Default = function Default() {
27
+ var textToCopy = 'eyJraWQiOiI4YTg5MmY3ZS1iNTk1LTRkYWQtODBlNC0yMzA4ODkyZTczZDQiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodHRwczovL2FwaS5waW5nb25lLmNvbSIsImF1dGhVcmwiOiJodHRwczovL2F1dGgucGluZ29uZS5jb20iLCJjb25zb2xlVXJsIjoiaHR0cHM6Ly9jb25zb2xlLnBpbmdvbmUuY29tIiwiZW52aXJvbm1lbnROYW1lIjoiTW9udGFuYSIsImVudmlyb25tZW50SWQiOiJhYzc2NWQ0Ny1kMDM2LTQ1MGUtODFjMS1mYjQ1NDMxMjM1NjYiLCJvcmdhbml6YXRpb25OYW1lIjoiaW50ZXJuYWxfZXJpa2FhbGRlYm9yZ2hfMjUyMDc1MDMxIiwib3JnYW5pemF0aW9uSWQiOiJkMDYzMmYwZi03YjQ2LTQ5ZjUtYjgyYS1kZWU5MWQ3MDY3ODYiLCJnYXRld2F5TmFtZSI6ImRzZHMiLCJnYXRld2F5SWQiOiJiMDVmNGU5Yy1jMzRiLTRlZTMtYTYyNS01ZGFiNjlkYTE1YTEiLCJnYXRld2F5VHlwZSI6IlBJTkdfRkVERVJBVEUiLCJ0YXJnZXRDbHVzdGVyRW52aXJvbm1lbnQiOiJQUk9EIiwidGFyZ2V0R2VvZ3JhcGh5IjoiTkEiLCJyZWdpb24iOiJOb3J0aCBBbWVyaWNhIiwianRpIjoiMTUwYTQ0OTktZjIyYi00YWVhLWIzY2UtYWM2YWY1NjVjNjk5IiwiaXNzIjoid3NzOi8vZ2F0ZXdheXMucGluZ29uZS5jb20iLCJpYXQiOjE2MjYyODEyMTZ9.JJ9wwqTxQWUwz2vmU0yE54xuYff51xbirzZuEUxd8GDzV45bnpbmx460CY8g9ccdmOjvfVF4RPPsawpKuMZH271tDlLZl67iknxDVWBZSih9K6v0RAmsmNriR4OyOFOkGrULCIz3ISyPWeItp1AVuue_8guWR63KzYg32aPC4SgmOrc2myq9N6XNU2H1KybETbG_s5-VU_cUqaXn7GUzhL2_W6CSVrrlE1cYfjC7pxMKFm4vvIw_KcNYVGO1K6oYgzRZ4A8toQHIdlGB8L-wkCt442LdC93OjoQdkLuGzmXnO8BUohWea-Dn35gGHoH-H1BRQTya_H9AKyWMxCw-vg';
28
+ var copyToClipboard = (0, _useCopyToClipboard["default"])(textToCopy);
29
+ return (0, _react2.jsx)(_index.Box, {
30
+ bg: "accent.99",
31
+ py: "md",
32
+ px: "xl"
33
+ }, (0, _react2.jsx)(_index.Text, {
34
+ sx: {
35
+ wordBreak: 'break-all'
36
+ }
37
+ }, textToCopy), (0, _react2.jsx)(_index.Button, {
38
+ variant: "inline",
39
+ my: "lg",
40
+ onPress: copyToClipboard,
41
+ "aria-label": "Copy Text To Clipboard"
42
+ }, "Copy To Clipboard"));
43
+ };
44
+
45
+ exports.Default = Default;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
+
7
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
8
+
9
+ _Object$defineProperty(exports, "__esModule", {
10
+ value: true
11
+ });
12
+
13
+ exports.Default = exports["default"] = void 0;
14
+
15
+ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
16
+
17
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
18
+
19
+ var _react = _interopRequireWildcard(require("react"));
20
+
21
+ var _CloseIcon = _interopRequireDefault(require("mdi-react/CloseIcon"));
22
+
23
+ var _index = require("../index");
24
+
25
+ var _RadioField = _interopRequireDefault(require("../components/RadioField"));
26
+
27
+ var _RadioGroupField = _interopRequireDefault(require("../components/RadioGroupField"));
28
+
29
+ var _react2 = require("@emotion/react");
30
+
31
+ var _default = {
32
+ title: 'Recipes/RadioButtonsWithLinks'
33
+ };
34
+ exports["default"] = _default;
35
+
36
+ var Default = function Default() {
37
+ var roles = [{
38
+ name: 'Client Application Developer'
39
+ }, {
40
+ name: 'Environment Admin',
41
+ isDisabled: true
42
+ }, {
43
+ name: 'Identity Data Admin',
44
+ isDisabled: true
45
+ }, {
46
+ name: 'Organization Admin'
47
+ }];
48
+ var titleSx = {
49
+ fontSize: 'md',
50
+ color: 'neutral.20',
51
+ fontWeight: 2
52
+ };
53
+ var subtitleSx = {
54
+ fontSize: 'md',
55
+ color: 'neutral.10'
56
+ };
57
+
58
+ var RadioFieldWithButton = function RadioFieldWithButton(_ref) {
59
+ var fieldName = _ref.fieldName,
60
+ isDisabled = _ref.isDisabled;
61
+
62
+ var _useState = (0, _react.useState)(false),
63
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
64
+ isOpen = _useState2[0],
65
+ setIsOpen = _useState2[1];
66
+
67
+ return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
68
+ isRow: true,
69
+ alignItems: "center"
70
+ }, (0, _react2.jsx)(_RadioField["default"], {
71
+ value: fieldName,
72
+ label: fieldName,
73
+ isDisabled: isDisabled
74
+ }), (0, _react2.jsx)(_index.Button, {
75
+ variant: "text",
76
+ mb: "xs",
77
+ ml: "md",
78
+ onPress: function onPress() {
79
+ return setIsOpen(function (prev) {
80
+ return !prev;
81
+ });
82
+ },
83
+ isDisabled: isDisabled
84
+ }, "".concat(isOpen ? 'Hide' : 'Show', " Permissions"))), isOpen && (0, _react2.jsx)(PermissionsList, {
85
+ onPress: function onPress() {
86
+ return setIsOpen(false);
87
+ }
88
+ }));
89
+ };
90
+
91
+ var PermissionsList = function PermissionsList(_ref2) {
92
+ var onPress = _ref2.onPress;
93
+ return (0, _react2.jsx)(_index.Box, {
94
+ p: "md",
95
+ bg: "neutral.95"
96
+ }, (0, _react2.jsx)(_index.Box, {
97
+ isRow: true,
98
+ justifyContent: "space-between",
99
+ mb: "sm"
100
+ }, (0, _react2.jsx)(_index.Text, {
101
+ sx: {
102
+ fontWeight: 2
103
+ }
104
+ }, "Permissions"), (0, _react2.jsx)(_index.IconButton, {
105
+ onPress: onPress
106
+ }, (0, _react2.jsx)(_index.Icon, {
107
+ icon: _CloseIcon["default"]
108
+ }))), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
109
+ sx: titleSx,
110
+ mb: "xs"
111
+ }, "Resource"), (0, _react2.jsx)(_index.Text, {
112
+ sx: subtitleSx,
113
+ mb: "sm"
114
+ }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), (0, _react2.jsx)(_index.Text, {
115
+ sx: titleSx,
116
+ mb: "xs"
117
+ }, "Push Credentials"), (0, _react2.jsx)(_index.Text, {
118
+ sx: subtitleSx,
119
+ mb: "sm"
120
+ }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod"), (0, _react2.jsx)(_index.Text, {
121
+ sx: titleSx,
122
+ mb: "xs"
123
+ }, "Organization"), (0, _react2.jsx)(_index.Text, {
124
+ sx: subtitleSx,
125
+ mb: "sm"
126
+ }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco"), (0, _react2.jsx)(_index.Text, {
127
+ sx: titleSx,
128
+ mb: "xs"
129
+ }, "Image"), (0, _react2.jsx)(_index.Text, {
130
+ sx: subtitleSx,
131
+ mb: "sm"
132
+ }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod")));
133
+ };
134
+
135
+ return (0, _react2.jsx)(_RadioGroupField["default"], null, (0, _map["default"])(roles).call(roles, function (_ref3) {
136
+ var name = _ref3.name,
137
+ isDisabled = _ref3.isDisabled;
138
+ return (0, _react2.jsx)(RadioFieldWithButton, {
139
+ fieldName: name,
140
+ isDisabled: isDisabled,
141
+ key: name
142
+ });
143
+ }));
144
+ };
145
+
146
+ exports.Default = Default;
@@ -152,6 +152,10 @@ input.container = (_input$container = {
152
152
  backgroundColor: 'accent.95',
153
153
  border: 'none'
154
154
  },
155
+ '> textarea': {
156
+ backgroundColor: 'accent.95',
157
+ border: 'none'
158
+ },
155
159
  '&:after': {
156
160
  display: 'none'
157
161
  }
@@ -70,9 +70,6 @@ var _default = {
70
70
  row: "0 0 9px ".concat(_colors.accent[95]),
71
71
  focus: "0 0 5px ".concat(_colors.focus)
72
72
  },
73
- transitions: {
74
- panel: 'margin 0.25s'
75
- },
76
73
  forms: _forms["default"],
77
74
  text: _variants.text,
78
75
  images: _variants.images,
@@ -23,12 +23,12 @@ var accordionTitle = {
23
23
  var accordion = {
24
24
  display: 'flex',
25
25
  mt: '5px',
26
- mb: '5px',
26
+ mb: '20px',
27
27
  alignItems: 'flex-start'
28
28
  };
29
29
  var accordionBody = {
30
30
  display: 'none !important',
31
- p: 'md',
31
+ pt: 'md',
32
32
  width: '100%',
33
33
  '.is-open &': {
34
34
  display: 'flex !important'
@@ -37,10 +37,10 @@ var accordionBody = {
37
37
  var accordionGridHeader = {
38
38
  cursor: 'pointer',
39
39
  lineHeight: '30px',
40
- px: 'md',
40
+ pl: 'sm',
41
41
  outline: 'none',
42
42
  display: 'flex',
43
- justifyContent: 'flex-start',
43
+ justifyContent: 'center',
44
44
  flexShrink: 0,
45
45
  wordBreak: 'inherit',
46
46
  whiteSpace: 'nowrap',
@@ -54,12 +54,9 @@ var accordionGridHeader = {
54
54
  WebkitBoxShadow: 'focus',
55
55
  MozBoxShadow: 'focus'
56
56
  },
57
- padding: '0px',
57
+ minHeight: '64px',
58
58
  '&.is-hovered': {
59
- color: 'active',
60
- '& div > div > div > span': {
61
- color: 'active'
62
- }
59
+ backgroundColor: 'accent.99'
63
60
  },
64
61
  '&.is-pressed': {
65
62
  color: 'accent.20',
@@ -70,6 +67,7 @@ var accordionGridHeader = {
70
67
  };
71
68
  var accordionGridBody = {
72
69
  display: 'none !important',
70
+ pl: 'sm',
73
71
  width: '100%',
74
72
  '&.is-selected': {
75
73
  display: 'flex !important'
@@ -37,20 +37,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
37
37
  var base = {
38
38
  display: 'flex'
39
39
  };
40
- var panel = {
41
- outline: 'none',
42
- position: 'relative',
43
- bg: 'white',
44
- borderLeft: 'separator',
45
- transition: 'margin 0.25s ease-in',
46
- visibility: 'hidden',
47
- '&.is-focused': {
48
- boxShadow: 'focus'
49
- },
50
- '&.is-visible': {
51
- visibility: 'visible'
52
- }
53
- };
54
40
  var card = {
55
41
  boxShadow: 'standard',
56
42
  p: 'lg',
@@ -106,6 +92,10 @@ var listViewItem = _objectSpread(_objectSpread({}, base), {}, {
106
92
  },
107
93
  '&.is-focused': {
108
94
  boxShadow: 'inset 0 0 5px #5873bdbf'
95
+ },
96
+ '&.has-separator': {
97
+ borderBottom: '1px solid',
98
+ borderBottomColor: 'line.hairline'
109
99
  }
110
100
  });
111
101
 
@@ -119,14 +109,27 @@ var listBoxSectionTitle = {
119
109
  };
120
110
  var chip = {
121
111
  cursor: 'pointer',
122
- height: '15px',
123
- p: '10px',
112
+ p: '3px 5px 4px 5px',
124
113
  alignItems: 'center',
125
114
  justifyContent: 'center',
126
115
  minWidth: '50px',
127
116
  alignSelf: 'flex-start',
128
117
  display: 'inline-flex !important',
129
- borderRadius: '5px'
118
+ borderRadius: '5px',
119
+ fontWeight: 1,
120
+ '& button': {
121
+ backgroundColor: 'transparent',
122
+ marginLeft: 'xs',
123
+ marginTop: '1px',
124
+ padding: '0',
125
+ '&.is-hovered': {
126
+ backgroundColor: 'white'
127
+ },
128
+ '& .mdi-icon': {
129
+ marginLeft: '0',
130
+ padding: '2px'
131
+ }
132
+ }
130
133
  };
131
134
  var inputInContainerSlot = {
132
135
  position: 'absolute',
@@ -284,7 +287,6 @@ var _default = {
284
287
  listItem: listItem,
285
288
  listBoxSectionTitle: listBoxSectionTitle,
286
289
  listViewItem: listViewItem,
287
- panel: panel,
288
290
  radioCheckedContent: radioCheckedContent,
289
291
  radioContainer: radioContainer,
290
292
  scrollbox: scrollbox,
@@ -179,32 +179,7 @@ var accordionHeader = _objectSpread(_objectSpread({}, base), {}, {
179
179
  color: 'accent.20'
180
180
  },
181
181
  '&.is-focused': _objectSpread({}, defaultFocus)
182
- }); // TODO: Remove this variant in Astro-UI 1.0.0
183
-
184
-
185
- var icon = {
186
- p: '3px',
187
- alignSelf: 'flex-start',
188
- flexGrow: 0,
189
- borderRadius: '100%',
190
- cursor: 'pointer',
191
- bg: 'transparent',
192
- 'path': {
193
- fill: 'text.secondary'
194
- },
195
- outline: 'none',
196
- color: 'white',
197
- '&.is-hovered': {
198
- bg: 'accent.90'
199
- },
200
- '&.is-pressed': {
201
- 'path': {
202
- fill: 'white'
203
- },
204
- bg: 'active'
205
- },
206
- '&.is-focused': _objectSpread({}, defaultFocus)
207
- };
182
+ });
208
183
 
209
184
  var primary = _objectSpread(_objectSpread({}, base), {}, {
210
185
  display: 'inline-flex',
@@ -330,7 +305,7 @@ var inline = _objectSpread(_objectSpread({}, base), {}, {
330
305
  bg: 'white',
331
306
  height: '22px',
332
307
  lineHeight: 1,
333
- fontSize: '14px',
308
+ fontSize: 'sm',
334
309
  borderRadius: '15px',
335
310
  border: '1px solid',
336
311
  borderColor: 'active',
@@ -512,7 +487,6 @@ var _default = {
512
487
  expandableRow: expandableRow,
513
488
  fileInputField: fileInputField,
514
489
  iconButton: iconButton,
515
- icon: icon,
516
490
  imageUpload: imageUpload,
517
491
  inline: inline,
518
492
  inverted: inverted,
@@ -14,6 +14,7 @@ var tab = {
14
14
  display: 'inline-flex',
15
15
  outline: 'none',
16
16
  transform: 'translateY(1px)',
17
+ width: '100%',
17
18
  '&.is-focused': {
18
19
  boxShadow: 'focus'
19
20
  },
@@ -54,8 +54,6 @@ var _messages = _interopRequireDefault(require("./messages"));
54
54
 
55
55
  var _numberField = _interopRequireDefault(require("./numberField"));
56
56
 
57
- var _popover = _interopRequireDefault(require("./popover"));
58
-
59
57
  var _overlayPanel = _interopRequireDefault(require("./overlayPanel"));
60
58
 
61
59
  var _popoverMenu = _interopRequireDefault(require("./popoverMenu"));
@@ -90,7 +88,6 @@ var _default = _objectSpread(_objectSpread({
90
88
  modal: _modal["default"],
91
89
  numberField: _numberField["default"],
92
90
  overlayPanel: _overlayPanel["default"],
93
- popover: _popover["default"],
94
91
  popoverMenu: _popoverMenu["default"],
95
92
  rockerbutton: _rockerbutton["default"],
96
93
  separator: _separator["default"],
@@ -83,8 +83,6 @@ export var Default = function Default() {
83
83
  return ___EmotionJSX(Box, {
84
84
  isRow: true,
85
85
  sx: {
86
- pt: '12px',
87
- pb: '12px',
88
86
  flexGrow: 1
89
87
  }
90
88
  }, ___EmotionJSX(Box, {
@@ -129,20 +127,14 @@ export var Default = function Default() {
129
127
  sx: {
130
128
  mr: '4px',
131
129
  height: '26px',
132
- width: '26px',
133
- 'path': {
134
- fill: 'active'
135
- }
130
+ width: '26px'
136
131
  }
137
132
  }, ___EmotionJSX(CreateIcon, null)), ___EmotionJSX(IconButton, {
138
133
  "aria-label": "vertical-lines-icon",
139
134
  sx: {
140
135
  mr: '4px',
141
136
  height: '26px',
142
- width: '26px',
143
- 'path': {
144
- fill: 'active'
145
- }
137
+ width: '26px'
146
138
  }
147
139
  }, ___EmotionJSX(MoreVertIcon, null)))));
148
140
  };
@@ -285,7 +277,8 @@ export var Default = function Default() {
285
277
  item: item
286
278
  }), item.key !== 'Organization' ? ___EmotionJSX(Separator, {
287
279
  sx: {
288
- m: 0
280
+ m: 0,
281
+ bg: 'neutral.90'
289
282
  }
290
283
  }) : null);
291
284
  }))
@@ -80,7 +80,9 @@ var AccordionItem = /*#__PURE__*/forwardRef(function (props, ref) {
80
80
  "aria-label": ariaLabel || 'Accordion',
81
81
  ref: buttonRef,
82
82
  sx: {
83
- display: 'flex'
83
+ display: 'flex',
84
+ px: '0',
85
+ height: 'unset'
84
86
  },
85
87
  variant: "accordionHeader",
86
88
  className: buttonClasses
@@ -14,17 +14,15 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
14
14
 
15
15
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; _forEachInstanceProperty(_context = ownKeys(Object(source), true)).call(_context, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context2; _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
16
16
 
17
- import React, { forwardRef, useRef, useImperativeHandle, useMemo } from 'react';
17
+ import React, { forwardRef, useRef, useImperativeHandle } from 'react';
18
18
  import PropTypes from 'prop-types';
19
19
  import { Button as ThemeUIButton } from 'theme-ui';
20
20
  import { useButton } from '@react-aria/button';
21
21
  import { useHover } from '@react-aria/interactions';
22
22
  import { useFocusRing } from '@react-aria/focus';
23
23
  import { mergeProps } from '@react-aria/utils';
24
- import { modes } from './constants';
25
- import { useAriaLabelWarning, useStatusClasses, useDeprecationWarning, usePropWarning } from '../../hooks';
24
+ import { useAriaLabelWarning, useStatusClasses, usePropWarning } from '../../hooks';
26
25
  import Loader from '../Loader';
27
- import Box from '../Box';
28
26
  import { jsx as ___EmotionJSX } from "@emotion/react";
29
27
  var Button = /*#__PURE__*/forwardRef(function (props, ref) {
30
28
  var className = props.className,
@@ -39,8 +37,7 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
39
37
  onPressChange = props.onPressChange,
40
38
  onPressUp = props.onPressUp,
41
39
  children = props.children,
42
- mode = props.mode,
43
- others = _objectWithoutProperties(props, ["className", "isDisabled", "isLoading", "onHoverStart", "onHoverChange", "onHoverEnd", "onPress", "onPressStart", "onPressEnd", "onPressChange", "onPressUp", "children", "mode"]);
40
+ others = _objectWithoutProperties(props, ["className", "isDisabled", "isLoading", "onHoverStart", "onHoverChange", "onHoverEnd", "onPress", "onPressStart", "onPressEnd", "onPressChange", "onPressUp", "children"]);
44
41
 
45
42
  var buttonRef = useRef();
46
43
  usePropWarning(props, 'disabled', 'isDisabled');
@@ -49,20 +46,13 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
49
46
  useImperativeHandle(ref, function () {
50
47
  return buttonRef.current;
51
48
  });
52
- var ButtonBase = useMemo(function () {
53
- return mode === modes.ICON ? Box : ThemeUIButton;
54
- }, [mode]);
55
- var elementType = useMemo(function () {
56
- if (mode === modes.ICON) return 'div';
57
- return 'button';
58
- }, [mode]);
59
49
 
60
50
  var _useFocusRing = useFocusRing(),
61
51
  isFocusVisible = _useFocusRing.isFocusVisible,
62
52
  focusProps = _useFocusRing.focusProps;
63
53
 
64
54
  var _useButton = useButton(_objectSpread({
65
- elementType: elementType
55
+ elementType: 'button'
66
56
  }, props), buttonRef),
67
57
  buttonProps = _useButton.buttonProps,
68
58
  isPressed = _useButton.isPressed;
@@ -79,12 +69,9 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
79
69
  }),
80
70
  classNames = _useStatusClasses.classNames;
81
71
 
82
- useDeprecationWarning('The "icon" variant for `Button` will be deprecated in Astro-UI 1.0.0, use the `IconButton` component instead.', {
83
- isActive: props.variant === 'icon'
84
- });
85
72
  var ariaLabel = props['aria-label'];
86
73
  useAriaLabelWarning('Button', ariaLabel);
87
- return ___EmotionJSX(ButtonBase, _extends({
74
+ return ___EmotionJSX(ThemeUIButton, _extends({
88
75
  "aria-label": ariaLabel || 'Button',
89
76
  ref: buttonRef,
90
77
  className: classNames,
@@ -167,15 +154,11 @@ Button.propTypes = {
167
154
  onPressUp: PropTypes.func,
168
155
 
169
156
  /** The styling variation of the button. */
170
- variant: PropTypes.string,
171
-
172
- /** The behavioral pattern to apply to the button. */
173
- mode: PropTypes.oneOf(['default', 'icon'])
157
+ variant: PropTypes.string
174
158
  };
175
159
  Button.defaultProps = {
176
160
  isDisabled: false,
177
- variant: 'default',
178
- mode: 'default'
161
+ variant: 'default'
179
162
  };
180
163
  Button.displayName = 'Button';
181
164
  export default Button;
@@ -1,8 +1,3 @@
1
- import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
2
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
3
-
4
- var _context;
5
-
6
1
  import React from 'react';
7
2
  import AddCircleIcon from 'mdi-react/AddCircleIcon';
8
3
  import Box from '../Box';
@@ -15,7 +10,9 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
15
10
  var variants = buttonVariants;
16
11
  delete variants.ICON;
17
12
  delete variants.ICON_BUTTON;
18
- delete variants.INVERTED;
13
+ delete variants.INVERTED; // add designer approved variants for devs to use here
14
+
15
+ var variantOptions = ['critical', 'danger', 'default', 'inline', 'link', 'primary', 'success', 'text'];
19
16
  export default {
20
17
  title: 'Button',
21
18
  component: Button,
@@ -23,11 +20,9 @@ export default {
23
20
  variant: {
24
21
  control: {
25
22
  type: 'select',
26
- options: _Object$values(variants)
23
+ options: variantOptions
27
24
  },
28
- defaultValue: _findInstanceProperty(_context = _Object$values(variants)).call(_context, function (value) {
29
- return value === 'default';
30
- })
25
+ defaultValue: 'default'
31
26
  },
32
27
  children: {
33
28
  description: 'Button text.',