@pingux/astro 1.42.2-alpha.2 → 1.42.2-alpha.4

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.
@@ -8,7 +8,7 @@ _Object$defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
10
 
11
- exports["default"] = exports.TextIconButton = exports.InlineButton = exports.FilterButton = exports.Disabled = exports.Default = exports.ColorBlockButton = void 0;
11
+ exports["default"] = exports.TextIconButton = exports.Primary = exports.InlineButton = exports.FilterButton = exports.Disabled = exports.Default = exports.Critical = exports.ColorBlockButton = void 0;
12
12
 
13
13
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
14
14
 
@@ -39,7 +39,7 @@ delete variants.ICON;
39
39
  delete variants.ICON_BUTTON;
40
40
  delete variants.INVERTED; // add designer approved variants for devs to use here
41
41
 
42
- var variantOptions = ['critical', 'danger', 'default', 'inline', 'inlinePrimary', 'link', 'primary', 'success', 'text'];
42
+ var variantOptions = ['critical', 'default', 'inline', 'inlinePrimary', 'link', 'primary'];
43
43
  var _default = {
44
44
  title: 'Components/Button',
45
45
  component: _index.Button,
@@ -162,4 +162,20 @@ var FilterButton = function FilterButton() {
162
162
  })));
163
163
  };
164
164
 
165
- exports.FilterButton = FilterButton;
165
+ exports.FilterButton = FilterButton;
166
+
167
+ var Critical = function Critical() {
168
+ return (0, _react2.jsx)(_index.Button, {
169
+ variant: "critical"
170
+ }, "Button Text");
171
+ };
172
+
173
+ exports.Critical = Critical;
174
+
175
+ var Primary = function Primary() {
176
+ return (0, _react2.jsx)(_index.Button, {
177
+ variant: "primary"
178
+ }, "Button Text");
179
+ };
180
+
181
+ exports.Primary = Primary;
@@ -20,8 +20,6 @@ require("prismjs/components/prism-powershell");
20
20
 
21
21
  var _CodeView = _interopRequireDefault(require("./CodeView"));
22
22
 
23
- var _ = require("../..");
24
-
25
23
  var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
26
24
 
27
25
  var _CodeView2 = _interopRequireDefault(require("./CodeView.mdx"));
@@ -69,21 +67,13 @@ var _default = {
69
67
  exports["default"] = _default;
70
68
 
71
69
  var Default = function Default(args) {
72
- return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_.Text, {
73
- sx: {
74
- fontWeight: 2
75
- }
76
- }, "JSON"), (0, _react2.jsx)(_CodeView["default"], args));
70
+ return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_CodeView["default"], args));
77
71
  };
78
72
 
79
73
  exports.Default = Default;
80
74
 
81
75
  var WithLineNumbers = function WithLineNumbers() {
82
- return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_.Text, {
83
- sx: {
84
- fontWeight: 2
85
- }
86
- }, "JSON"), (0, _react2.jsx)(_CodeView["default"], {
76
+ return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_CodeView["default"], {
87
77
  hasLineNumbers: true
88
78
  }, code));
89
79
  };
@@ -43,7 +43,7 @@ var CopyButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
43
43
  variant: "buttons.copy"
44
44
  }, (0, _lodash.omit)(props, 'iconProps')), (0, _react2.jsx)(_Icon["default"], (0, _extends2["default"])({
45
45
  icon: _ContentCopyIcon["default"],
46
- size: 15,
46
+ size: "xs",
47
47
  color: "text.secondary"
48
48
  }, props === null || props === void 0 ? void 0 : props.iconProps)));
49
49
  });
@@ -115,7 +115,7 @@ var SVGIcons = function SVGIcons() {
115
115
  return (0, _react2.jsx)(_index.Icon, {
116
116
  icon: SVGComponent,
117
117
  color: "active",
118
- size: 40
118
+ size: "sm"
119
119
  });
120
120
  };
121
121
 
@@ -34,7 +34,9 @@ exports.active = active;
34
34
  var critical = {
35
35
  bright: '#a31300',
36
36
  dark: '#a31300',
37
- light: '#ffebe7'
37
+ light: '#ffebe7',
38
+ primaryDark: _chromaJs["default"].mix('#a31300', '#000000', 0.2).hex(),
39
+ secondaryDark: _chromaJs["default"].mix('#a31300', '#000000', 0.4).hex()
38
40
  };
39
41
  exports.critical = critical;
40
42
  var success = {
@@ -293,7 +293,15 @@ var critical = _objectSpread(_objectSpread({}, base), {}, {
293
293
  border: '1px solid',
294
294
  borderColor: 'critical.bright',
295
295
  color: 'white',
296
- '&.is-focused': _objectSpread({}, defaultFocus)
296
+ '&.is-focused': _objectSpread({}, defaultFocus),
297
+ '&.is-hovered': {
298
+ bg: 'critical.primaryDark',
299
+ borderColor: 'critical.primaryDark'
300
+ },
301
+ '&.is-pressed': {
302
+ bg: 'critical.secondaryDark',
303
+ borderColor: 'critical.secondaryDark'
304
+ }
297
305
  });
298
306
 
299
307
  var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
@@ -16,7 +16,7 @@ delete variants.ICON;
16
16
  delete variants.ICON_BUTTON;
17
17
  delete variants.INVERTED; // add designer approved variants for devs to use here
18
18
 
19
- var variantOptions = ['critical', 'danger', 'default', 'inline', 'inlinePrimary', 'link', 'primary', 'success', 'text'];
19
+ var variantOptions = ['critical', 'default', 'inline', 'inlinePrimary', 'link', 'primary'];
20
20
  export default {
21
21
  title: 'Components/Button',
22
22
  component: Button,
@@ -121,4 +121,14 @@ export var FilterButton = function FilterButton() {
121
121
  }, ___EmotionJSX(Icon, {
122
122
  icon: FilterIcon
123
123
  })));
124
+ };
125
+ export var Critical = function Critical() {
126
+ return ___EmotionJSX(Button, {
127
+ variant: "critical"
128
+ }, "Button Text");
129
+ };
130
+ export var Primary = function Primary() {
131
+ return ___EmotionJSX(Button, {
132
+ variant: "primary"
133
+ }, "Button Text");
124
134
  };
@@ -3,7 +3,6 @@ import React from 'react';
3
3
  import Prism from 'prismjs';
4
4
  import 'prismjs/components/prism-powershell';
5
5
  import CodeView from './CodeView';
6
- import { Text } from '../..';
7
6
  import DocsLayout from '../../../.storybook/storybookDocsLayout';
8
7
  import CodeViewReadme from './CodeView.mdx';
9
8
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -46,18 +45,10 @@ export default {
46
45
  }
47
46
  };
48
47
  export var Default = function Default(args) {
49
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
50
- sx: {
51
- fontWeight: 2
52
- }
53
- }, "JSON"), ___EmotionJSX(CodeView, args));
48
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(CodeView, args));
54
49
  };
55
50
  export var WithLineNumbers = function WithLineNumbers() {
56
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
57
- sx: {
58
- fontWeight: 2
59
- }
60
- }, "JSON"), ___EmotionJSX(CodeView, {
51
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(CodeView, {
61
52
  hasLineNumbers: true
62
53
  }, code));
63
54
  };
@@ -13,7 +13,7 @@ var CopyButton = /*#__PURE__*/forwardRef(function (props, ref) {
13
13
  variant: "buttons.copy"
14
14
  }, omit(props, 'iconProps')), ___EmotionJSX(Icon, _extends({
15
15
  icon: ContentCopy,
16
- size: 15,
16
+ size: "xs",
17
17
  color: "text.secondary"
18
18
  }, props === null || props === void 0 ? void 0 : props.iconProps)));
19
19
  });
@@ -81,7 +81,7 @@ export var SVGIcons = function SVGIcons() {
81
81
  return ___EmotionJSX(Icon, {
82
82
  icon: SVGComponent,
83
83
  color: "active",
84
- size: 40
84
+ size: "sm"
85
85
  });
86
86
  };
87
87
  var rowHeadings = ['SVG Size', 'Code Example', 'Icon Example'];
@@ -14,7 +14,9 @@ export var active = '#4462ED';
14
14
  export var critical = {
15
15
  bright: '#a31300',
16
16
  dark: '#a31300',
17
- light: '#ffebe7'
17
+ light: '#ffebe7',
18
+ primaryDark: chroma.mix('#a31300', '#000000', 0.2).hex(),
19
+ secondaryDark: chroma.mix('#a31300', '#000000', 0.4).hex()
18
20
  };
19
21
  export var success = {
20
22
  bright: '#00af18',
@@ -271,7 +271,15 @@ var critical = _objectSpread(_objectSpread({}, base), {}, {
271
271
  border: '1px solid',
272
272
  borderColor: 'critical.bright',
273
273
  color: 'white',
274
- '&.is-focused': _objectSpread({}, defaultFocus)
274
+ '&.is-focused': _objectSpread({}, defaultFocus),
275
+ '&.is-hovered': {
276
+ bg: 'critical.primaryDark',
277
+ borderColor: 'critical.primaryDark'
278
+ },
279
+ '&.is-pressed': {
280
+ bg: 'critical.secondaryDark',
281
+ borderColor: 'critical.secondaryDark'
282
+ }
275
283
  });
276
284
 
277
285
  var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.42.2-alpha.2",
3
+ "version": "1.42.2-alpha.4",
4
4
  "description": "PingUX themeable React component library",
5
5
  "repository": {
6
6
  "type": "git",