@pingux/astro 2.174.1-alpha.0 → 2.175.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.
Files changed (38) hide show
  1. package/lib/cjs/components/Link/Link.styles.js +11 -1
  2. package/lib/cjs/components/NavBar/NavBar.styles.js +22 -5
  3. package/lib/cjs/components/NavBar/stories/NavBarNextGenComponent.js +7 -5
  4. package/lib/cjs/components/NavBarSection/NavBarItem.js +3 -3
  5. package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +9 -3
  6. package/lib/cjs/components/NavSideBar/NavSideBarItem.js +5 -4
  7. package/lib/cjs/components/NumberField/NumberField.js +1 -4
  8. package/lib/cjs/components/NumberField/NumberField.test.js +26 -3
  9. package/lib/cjs/libs/astro/src/components/Link/Link.styles.d.ts +8 -0
  10. package/lib/cjs/libs/astro/src/components/NavBar/NavBar.styles.d.ts +55 -6
  11. package/lib/cjs/libs/astro/src/styles/themeOverrides/onyxSideNav.d.ts +33 -0
  12. package/lib/cjs/libs/astro/src/styles/themes/next-gen/next-gen.d.ts +38 -0
  13. package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/links.d.ts +9 -0
  14. package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/navbar.d.ts +29 -0
  15. package/lib/cjs/libs/astro/src/styles/themes/next-gen/variants/variants.d.ts +29 -0
  16. package/lib/cjs/libs/astro/src/types/icon.d.ts +3 -2
  17. package/lib/cjs/libs/astro/tsconfig.lib.tsbuildinfo +1 -1
  18. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/navbar.js +2 -2
  19. package/lib/cjs/styles/themeOverrides/onyxSideNav.js +34 -0
  20. package/lib/cjs/styles/themeOverrides/stories/NumberField.chromatic.stories.js +4 -1
  21. package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +9 -1
  22. package/lib/cjs/styles/themes/next-gen/variants/links.js +8 -0
  23. package/lib/cjs/styles/themes/next-gen/variants/navbar.js +31 -1
  24. package/lib/components/Link/Link.styles.js +11 -1
  25. package/lib/components/NavBar/NavBar.styles.js +22 -5
  26. package/lib/components/NavBar/stories/NavBarNextGenComponent.js +8 -6
  27. package/lib/components/NavBarSection/NavBarItem.js +3 -3
  28. package/lib/components/NavBarSection/NavBarItemHeader.js +9 -3
  29. package/lib/components/NavSideBar/NavSideBarItem.js +5 -4
  30. package/lib/components/NumberField/NumberField.js +1 -4
  31. package/lib/components/NumberField/NumberField.test.js +26 -3
  32. package/lib/styles/themeOverrides/nextGenDarkMode/variants/navbar.js +2 -2
  33. package/lib/styles/themeOverrides/onyxSideNav.js +34 -0
  34. package/lib/styles/themeOverrides/stories/NumberField.chromatic.stories.js +4 -1
  35. package/lib/styles/themeOverrides/uiLibraryOverride.js +9 -1
  36. package/lib/styles/themes/next-gen/variants/links.js +8 -0
  37. package/lib/styles/themes/next-gen/variants/navbar.js +31 -1
  38. package/package.json +1 -1
@@ -14,6 +14,7 @@ _Object$defineProperty(exports, "__esModule", {
14
14
  });
15
15
  exports["default"] = void 0;
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
17
+ var _colors = require("../../styles/colors");
17
18
  var _Buttons = require("../Button/Buttons.styles");
18
19
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -35,6 +36,14 @@ var app = {
35
36
  pointerEvents: 'none'
36
37
  }
37
38
  };
39
+ var navItem = {
40
+ '&.is-focused': {
41
+ outline: 'none',
42
+ boxShadow: "0 0 0 1px ".concat(_colors.focus),
43
+ WebkitBoxShadow: "0 0 0 1px ".concat(_colors.focus),
44
+ MozBoxShadow: "0 0 0 1px ".concat(_colors.focus)
45
+ }
46
+ };
38
47
  var web = _objectSpread(_objectSpread({}, app), {}, {
39
48
  textDecoration: 'underline',
40
49
  '&:visited': {
@@ -104,5 +113,6 @@ var _default = exports["default"] = {
104
113
  web: web,
105
114
  copyRightLink: copyRightLink,
106
115
  footerLink: footerLink,
107
- footerEALink: footerEALink
116
+ footerEALink: footerEALink,
117
+ navItem: navItem
108
118
  };
@@ -49,6 +49,9 @@ var itemHeaderContainer = {
49
49
  '&.is-selected': {
50
50
  backgroundColor: 'accent.5',
51
51
  boxShadow: 'inset 2px 0 0 0 white'
52
+ },
53
+ '&.is-hovered': {
54
+ bg: 'accent.10'
52
55
  }
53
56
  };
54
57
  var popUpItemHeaderContainer = _objectSpread(_objectSpread({}, itemHeaderContainer), {}, {
@@ -160,13 +163,13 @@ var itemButton = _objectSpread(_objectSpread({
160
163
  outline: '1px solid',
161
164
  outlineColor: 'focus'
162
165
  },
163
- '&.is-hovered': {
164
- bg: 'accent.10'
165
- },
166
166
  '&.is-selected': {
167
167
  bg: 'accent.5',
168
168
  boxShadow: 'inset 2px 0 0 0 white'
169
169
  },
170
+ '&.is-hovered': {
171
+ bg: 'accent.10'
172
+ },
170
173
  '&.is-pressed': {
171
174
  bg: 'accent.5'
172
175
  }
@@ -222,6 +225,9 @@ var popUpHeaderText = _objectSpread(_objectSpread({}, headerText), {}, {
222
225
  color: 'white'
223
226
  }
224
227
  });
228
+ var logoParent = {
229
+ p: 'md'
230
+ };
225
231
  var headerNav = {
226
232
  cursor: 'pointer',
227
233
  minHeight: '40px',
@@ -254,7 +260,13 @@ var item = _objectSpread(_objectSpread({}, headerNav), {}, {
254
260
  px: 'md',
255
261
  '&.is-selected': {
256
262
  backgroundColor: 'accent.5',
257
- boxShadow: 'inset 2px 0 0 0 white'
263
+ boxShadow: 'inset 2px 0 0 0 white',
264
+ '&.is-hovered': {
265
+ backgroundColor: 'accent.10'
266
+ }
267
+ },
268
+ '&.is-hovered': {
269
+ backgroundColor: 'accent.10'
258
270
  }
259
271
  });
260
272
  var popUpItem = _objectSpread(_objectSpread({}, headerNav), {}, {
@@ -271,7 +283,7 @@ var sectionButton = _objectSpread(_objectSpread({}, _Buttons.quiet), {}, {
271
283
  outlineColor: 'focus'
272
284
  },
273
285
  '&.is-hovered': {
274
- backgroundColor: 'accent.10'
286
+ backgroundColor: 'accent.10 '
275
287
  },
276
288
  '&.is-pressed': {
277
289
  backgroundColor: 'accent.5'
@@ -330,6 +342,9 @@ var itemCustomIconSelected = _objectSpread(_objectSpread({}, itemCustomIcon), {}
330
342
  color: 'white',
331
343
  fill: 'white'
332
344
  });
345
+ var sideNavItem = _objectSpread(_objectSpread({}, item), {}, {
346
+ p: 0
347
+ });
333
348
  var _default = exports["default"] = {
334
349
  container: container,
335
350
  popUpContainer: popUpContainer,
@@ -353,6 +368,8 @@ var _default = exports["default"] = {
353
368
  popUpNavBarItemBody: popUpNavBarItemBody,
354
369
  itemLinkButtonColor: itemLinkButtonColor,
355
370
  sectionList: sectionList,
371
+ sideNavItem: sideNavItem,
372
+ logoParent: logoParent,
356
373
  itemIcon: itemIcon,
357
374
  itemIconSelected: itemIconSelected,
358
375
  itemCustomIcon: itemCustomIcon,
@@ -165,13 +165,15 @@ var NavBarNextGenComponent = exports.NavBarNextGenComponent = function NavBarNex
165
165
  id: "GettingStarted",
166
166
  key: "GettingStarted",
167
167
  text: "Getting Started"
168
- }), (0, _react2.jsx)(_.NavBarItem, {
169
- "data-id": "nav-bar-item",
168
+ }), (0, _react2.jsx)(_.NavSideBarItem, {
169
+ key: "Overview",
170
170
  icon: icons.overviewIcon,
171
171
  id: "Overview",
172
- key: "Overview",
173
- text: "Overview"
174
- }), (0, _react2.jsx)(_.NavBarSection, {
172
+ linkProps: {
173
+ href: 'https://www.pingidentity.com',
174
+ target: '_blank'
175
+ }
176
+ }, "Overview"), (0, _react2.jsx)(_.NavBarSection, {
175
177
  items: firstSectionData,
176
178
  "data-id": "nav-bar-section"
177
179
  }), (0, _react2.jsx)(_.Separator, {
@@ -59,10 +59,10 @@ var NavBarItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
59
59
  isPressed = _usePress.isPressed;
60
60
  var mergedProps = (0, _reactAria.mergeProps)(pressProps, hoverProps, focusWithinProps, focusProps, others);
61
61
  var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
62
- isPressed: isPressed,
63
- isHovered: isHovered,
64
62
  isSelected: isSelected,
65
- isFocused: isFocusVisible
63
+ isHovered: isHovered,
64
+ isFocused: isFocusVisible,
65
+ isPressed: isPressed
66
66
  }),
67
67
  classNames = _useStatusClasses.classNames;
68
68
  var color = isSelected ? 'white' : 'neutral.95';
@@ -9,10 +9,12 @@ _Object$defineProperty(exports, "__esModule", {
9
9
  value: true
10
10
  });
11
11
  exports["default"] = void 0;
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
12
13
  var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
13
14
  var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
14
15
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
15
16
  var _react = _interopRequireWildcard(require("react"));
17
+ var _interactions = require("@react-aria/interactions");
16
18
  var _NavBarContext = require("../../context/NavBarContext");
17
19
  var _hooks = require("../../hooks");
18
20
  var _useGetTheme3 = _interopRequireDefault(require("../../hooks/useGetTheme"));
@@ -51,6 +53,9 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
51
53
  return i.key;
52
54
  });
53
55
  var isChildSelected = array && (0, _includes["default"])(array).call(array, navBarState.selectedKey);
56
+ var _useHover = (0, _interactions.useHover)({}),
57
+ hoverProps = _useHover.hoverProps,
58
+ isHovered = _useHover.isHovered;
54
59
  (0, _react.useEffect)(function () {
55
60
  if (isChildSelected && isExpanded === false) {
56
61
  var _context2;
@@ -58,7 +63,8 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
58
63
  }
59
64
  }, [selectedKey]);
60
65
  var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
61
- isSelected: isChildSelected && !isExpanded
66
+ isSelected: isChildSelected && !isExpanded,
67
+ isHovered: isHovered
62
68
  }),
63
69
  classNames = _useStatusClasses.classNames;
64
70
  var getIconColor = function getIconColor() {
@@ -67,12 +73,12 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
67
73
  }
68
74
  return isChildSelected && !isExpanded ? 'white' : 'neutral.95';
69
75
  };
70
- return (0, _react2.jsx)(_index.Box, {
76
+ return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({}, hoverProps, {
71
77
  variant: navStyles.navBarItemHeader,
72
78
  className: classNames,
73
79
  isRow: true,
74
80
  "data-testid": heading
75
- }, icon && (0, _react2.jsx)(_index.Icon, {
81
+ }), icon && (0, _react2.jsx)(_index.Icon, {
76
82
  icon: icon,
77
83
  size: navBarIconSize || 18,
78
84
  sx: {
@@ -23,12 +23,13 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var
23
23
  var NavSideBarItem = function NavSideBarItem(props) {
24
24
  var children = props.children,
25
25
  linkProps = props.linkProps;
26
- console.log(props);
27
26
  if (linkProps && linkProps !== null && linkProps !== void 0 && linkProps.href) {
28
27
  return (0, _react2.jsx)(_index.Link, (0, _extends2["default"])({}, linkProps, {
29
28
  sx: {
30
- textDecoration: 'none !important'
31
- }
29
+ textDecoration: 'none !important',
30
+ outlineOffset: 'unset'
31
+ },
32
+ variant: "navItem"
32
33
  }), (0, _react2.jsx)(ChildWrapper, props, children));
33
34
  }
34
35
  return (0, _react2.jsx)(_index.Button, {
@@ -83,10 +84,10 @@ var ChildWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
83
84
  isFocused: isFocusVisible
84
85
  }),
85
86
  classNames = _useStatusClasses.classNames;
86
- console.log(state.navStyles.navBarItem);
87
87
  return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
88
88
  id: key,
89
89
  variant: state.navStyles.navBarItem,
90
+ mb: "0px",
90
91
  isRow: true,
91
92
  alignItems: "center",
92
93
  className: classNames,
@@ -106,10 +106,7 @@ var NumberField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
106
106
  var helperTextId = (0, _uuid.v4)();
107
107
  var updatedLabelProps = _objectSpread({}, (0, _reactAria.mergeProps)(fieldLabelProps, labelProps));
108
108
  var inputPropsValue = inputProps.value || 0;
109
-
110
- // extract numeric value in case input value use units like '4 inches' or 'USD 45.00'
111
- // aria-valuenow accept only number value type
112
- var inputPropsNumericValue = typeof inputPropsValue === 'string' ? inputPropsValue.match(/[-]{0,1}[\d]*[.]{0,1}[\d]+/g)[0] : inputPropsValue;
109
+ var inputPropsNumericValue = state.numberValue;
113
110
  return (0, _react2.jsx)(_.Box, (0, _extends2["default"])({}, (0, _pendoID.getPendoID)('NumberField'), fieldContainerProps), (0, _react2.jsx)(_.Label, updatedLabelProps), (0, _react2.jsx)(_.Box, (0, _extends2["default"])({
114
111
  variant: "forms.numberField.noDefaultArrows"
115
112
  }, groupProps), (0, _react2.jsx)(_.Box, (0, _extends2["default"])({
@@ -21,7 +21,7 @@ var _testWrapper = require("../../utils/testUtils/testWrapper");
21
21
  var _universalComponentTest = require("../../utils/testUtils/universalComponentTest");
22
22
  var _universalFormSubmitTest = require("../../utils/testUtils/universalFormSubmitTest");
23
23
  var _react3 = require("@emotion/react");
24
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof _Symbol ? _Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return _Object$defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = _Object$create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = _Object$getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(l); function g(t) { var _context8; _forEachInstanceProperty(_context8 = ["next", "throw", "return"]).call(_context8, function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], _forEachInstanceProperty(t).call(t, w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = _Object$create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = _Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { var _context9; if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, _forEachInstanceProperty(_context9 = this.tryEntries).call(_context9, m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+_sliceInstanceProperty(e).call(e, 1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
24
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof _Symbol ? _Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return _Object$defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = _Object$create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = _Object$getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(l); function g(t) { var _context9; _forEachInstanceProperty(_context9 = ["next", "throw", "return"]).call(_context9, function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], _forEachInstanceProperty(t).call(t, w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = _Object$create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = _Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { var _context0; if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, _forEachInstanceProperty(_context0 = this.tryEntries).call(_context0, m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+_sliceInstanceProperty(e).call(e, 1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
25
25
  var testId = 'test-NumberField';
26
26
  var testLabel = 'test-NumberField-label';
27
27
  var testValue = 5;
@@ -281,5 +281,28 @@ test('should extract numeric value from currency format and pass it to aria-valu
281
281
  currencySign: 'accounting'
282
282
  }
283
283
  });
284
- expect(_testWrapper.screen.getByRole('spinbutton')).toHaveAttribute('aria-valuenow', String(numericValue.toFixed(2)));
285
- });
284
+ expect(_testWrapper.screen.getByRole('spinbutton')).toHaveAttribute('aria-valuenow', String(numericValue));
285
+ });
286
+ it('allows typing a negative sign', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
287
+ var numericValue, numberInput;
288
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
289
+ while (1) switch (_context8.prev = _context8.next) {
290
+ case 0:
291
+ numericValue = 45;
292
+ getComponent({
293
+ defaultValue: numericValue
294
+ });
295
+ numberInput = _testWrapper.screen.queryAllByLabelText(testLabel)[1];
296
+ _context8.next = 5;
297
+ return _userEvent["default"].clear(numberInput);
298
+ case 5:
299
+ _context8.next = 7;
300
+ return _userEvent["default"].type(numberInput, '-45');
301
+ case 7:
302
+ expect(numberInput).toHaveValue('-45');
303
+ case 8:
304
+ case "end":
305
+ return _context8.stop();
306
+ }
307
+ }, _callee8);
308
+ })));
@@ -128,5 +128,13 @@ declare const _default: {
128
128
  color: string;
129
129
  };
130
130
  };
131
+ navItem: {
132
+ '&.is-focused': {
133
+ outline: string;
134
+ boxShadow: string;
135
+ WebkitBoxShadow: string;
136
+ MozBoxShadow: string;
137
+ };
138
+ };
131
139
  };
132
140
  export default _default;
@@ -35,6 +35,9 @@ declare const _default: {
35
35
  backgroundColor: string;
36
36
  boxShadow: string;
37
37
  };
38
+ '&.is-hovered': {
39
+ bg: string;
40
+ };
38
41
  };
39
42
  popUpItemHeaderContainer: {
40
43
  minHeight: string;
@@ -49,6 +52,9 @@ declare const _default: {
49
52
  py: string;
50
53
  px: string;
51
54
  cursor: string;
55
+ '&.is-hovered': {
56
+ bg: string;
57
+ };
52
58
  };
53
59
  popUpItemListItem: {
54
60
  borderBottom: string;
@@ -146,13 +152,13 @@ declare const _default: {
146
152
  outline: string;
147
153
  outlineColor: string;
148
154
  };
149
- '&.is-hovered': {
150
- bg: string;
151
- };
152
155
  '&.is-selected': {
153
156
  bg: string;
154
157
  boxShadow: string;
155
158
  };
159
+ '&.is-hovered': {
160
+ bg: string;
161
+ };
156
162
  '&.is-pressed': {
157
163
  bg: string;
158
164
  };
@@ -301,6 +307,12 @@ declare const _default: {
301
307
  '&.is-selected': {
302
308
  backgroundColor: string;
303
309
  boxShadow: string;
310
+ '&.is-hovered': {
311
+ backgroundColor: string;
312
+ };
313
+ };
314
+ '&.is-hovered': {
315
+ backgroundColor: string;
304
316
  };
305
317
  cursor: string;
306
318
  minHeight: string;
@@ -321,9 +333,6 @@ declare const _default: {
321
333
  WebkitBoxShadow: string;
322
334
  MozBoxShadow: string;
323
335
  };
324
- '&.is-hovered': {
325
- backgroundColor: string;
326
- };
327
336
  '&.is-pressed': {
328
337
  backgroundColor: string;
329
338
  };
@@ -383,6 +392,46 @@ declare const _default: {
383
392
  padding: number;
384
393
  listStyle: string;
385
394
  };
395
+ sideNavItem: {
396
+ p: number;
397
+ py: string;
398
+ px: string;
399
+ '&.is-selected': {
400
+ backgroundColor: string;
401
+ boxShadow: string;
402
+ '&.is-hovered': {
403
+ backgroundColor: string;
404
+ };
405
+ };
406
+ '&.is-hovered': {
407
+ backgroundColor: string;
408
+ };
409
+ cursor: string;
410
+ minHeight: string;
411
+ lineHeight: string;
412
+ outline: string;
413
+ display: string;
414
+ justifyContent: string;
415
+ flexShrink: number;
416
+ wordBreak: string;
417
+ whiteSpace: string;
418
+ color: string;
419
+ flexGrow: number;
420
+ fontWeight: number;
421
+ fontSize: string;
422
+ '&.is-focused': {
423
+ outline: string;
424
+ boxShadow: string;
425
+ WebkitBoxShadow: string;
426
+ MozBoxShadow: string;
427
+ };
428
+ '&.is-pressed': {
429
+ backgroundColor: string;
430
+ };
431
+ };
432
+ logoParent: {
433
+ p: string;
434
+ };
386
435
  itemIcon: {
387
436
  mr: string;
388
437
  color: string;
@@ -166,6 +166,10 @@ declare const _default: {
166
166
  '> div > svg': {
167
167
  fill: string;
168
168
  };
169
+ '> div > span': {
170
+ color: string;
171
+ fill: string;
172
+ };
169
173
  '> svg': {
170
174
  fill: string;
171
175
  };
@@ -176,9 +180,19 @@ declare const _default: {
176
180
  '> div > svg': {
177
181
  fill: string;
178
182
  };
183
+ '> div > span': {
184
+ color: string;
185
+ };
186
+ '> span': {
187
+ color: string;
188
+ fill: string;
189
+ };
179
190
  '> svg': {
180
191
  fill: string;
181
192
  };
193
+ '&.is-hovered': {
194
+ backgroundColor: string;
195
+ };
182
196
  backgroundColor: string;
183
197
  boxShadow: string;
184
198
  };
@@ -197,6 +211,9 @@ declare const _default: {
197
211
  px: string;
198
212
  borderRadius: string;
199
213
  py: string;
214
+ '&.is-hovered': {
215
+ backgroundColor: string;
216
+ };
200
217
  '&.is-selected': {
201
218
  '> svg': {
202
219
  fill: string;
@@ -204,6 +221,9 @@ declare const _default: {
204
221
  '> div > svg': {
205
222
  fill: string;
206
223
  };
224
+ '&.is-hovered': {
225
+ backgroundColor: string;
226
+ };
207
227
  backgroundColor: string;
208
228
  boxShadow: string;
209
229
  };
@@ -236,6 +256,19 @@ declare const _default: {
236
256
  };
237
257
  };
238
258
  };
259
+ links: {
260
+ navItem: {
261
+ borderRadius: string;
262
+ '&.is-focused': {
263
+ outline: string;
264
+ outlineColor: string;
265
+ outlineOffset: string;
266
+ boxShadow: string;
267
+ WebkitBoxShadow: string;
268
+ MozBoxShadow: string;
269
+ };
270
+ };
271
+ };
239
272
  icons: {
240
273
  test: string;
241
274
  MenuDown: import("@pingux/mdi-react").MdiReactIconComponentType;
@@ -4172,6 +4172,15 @@ declare const _default: {
4172
4172
  color: string;
4173
4173
  };
4174
4174
  };
4175
+ navItem: {
4176
+ boxShadow: string;
4177
+ '&.is-focused': {
4178
+ borderRadius: string;
4179
+ outlineOffset: string;
4180
+ outline: string;
4181
+ outlineColor: string;
4182
+ };
4183
+ };
4175
4184
  onyx: {
4176
4185
  color: string;
4177
4186
  fontSize: string;
@@ -5717,6 +5726,14 @@ declare const _default: {
5717
5726
  };
5718
5727
  };
5719
5728
  navBar: {
5729
+ itemIcon: {
5730
+ color: string;
5731
+ fill: string;
5732
+ };
5733
+ itemIconSelected: {
5734
+ color: string;
5735
+ fill: string;
5736
+ };
5720
5737
  container: {
5721
5738
  fontFamily: string;
5722
5739
  width: string;
@@ -5803,6 +5820,9 @@ declare const _default: {
5803
5820
  '> div > svg': {
5804
5821
  fill: string;
5805
5822
  };
5823
+ '> div > span': {
5824
+ color: string;
5825
+ };
5806
5826
  '&.is-pressed': {
5807
5827
  backgroundColor: string;
5808
5828
  };
@@ -5810,6 +5830,12 @@ declare const _default: {
5810
5830
  '> div > svg': {
5811
5831
  fill: string;
5812
5832
  };
5833
+ '> div > span': {
5834
+ color: string;
5835
+ };
5836
+ '&.is-hovered': {
5837
+ backgroundColor: string;
5838
+ };
5813
5839
  backgroundColor: string;
5814
5840
  boxShadow: string;
5815
5841
  };
@@ -5828,9 +5854,21 @@ declare const _default: {
5828
5854
  px: string;
5829
5855
  py: string;
5830
5856
  '&.is-selected': {
5857
+ '> svg': {
5858
+ fill: string;
5859
+ };
5860
+ '> div > svg': {
5861
+ fill: string;
5862
+ };
5863
+ '> div > span': {
5864
+ color: string;
5865
+ };
5831
5866
  backgroundColor: string;
5832
5867
  boxShadow: string;
5833
5868
  };
5869
+ '&.is-hovered': {
5870
+ backgroundColor: string;
5871
+ };
5834
5872
  backgroundColor: string;
5835
5873
  '> svg': {
5836
5874
  fill: string;
@@ -43,6 +43,15 @@ declare const _default: {
43
43
  color: string;
44
44
  };
45
45
  };
46
+ navItem: {
47
+ boxShadow: string;
48
+ '&.is-focused': {
49
+ borderRadius: string;
50
+ outlineOffset: string;
51
+ outline: string;
52
+ outlineColor: string;
53
+ };
54
+ };
46
55
  onyx: {
47
56
  color: string;
48
57
  fontSize: string;
@@ -8,6 +8,14 @@ export declare const navBarFocus: {
8
8
  outlineOffset: string;
9
9
  };
10
10
  export declare const navBar: {
11
+ itemIcon: {
12
+ color: string;
13
+ fill: string;
14
+ };
15
+ itemIconSelected: {
16
+ color: string;
17
+ fill: string;
18
+ };
11
19
  container: {
12
20
  fontFamily: string;
13
21
  width: string;
@@ -94,6 +102,9 @@ export declare const navBar: {
94
102
  '> div > svg': {
95
103
  fill: string;
96
104
  };
105
+ '> div > span': {
106
+ color: string;
107
+ };
97
108
  '&.is-pressed': {
98
109
  backgroundColor: string;
99
110
  };
@@ -101,6 +112,12 @@ export declare const navBar: {
101
112
  '> div > svg': {
102
113
  fill: string;
103
114
  };
115
+ '> div > span': {
116
+ color: string;
117
+ };
118
+ '&.is-hovered': {
119
+ backgroundColor: string;
120
+ };
104
121
  backgroundColor: string;
105
122
  boxShadow: string;
106
123
  };
@@ -119,9 +136,21 @@ export declare const navBar: {
119
136
  px: string;
120
137
  py: string;
121
138
  '&.is-selected': {
139
+ '> svg': {
140
+ fill: string;
141
+ };
142
+ '> div > svg': {
143
+ fill: string;
144
+ };
145
+ '> div > span': {
146
+ color: string;
147
+ };
122
148
  backgroundColor: string;
123
149
  boxShadow: string;
124
150
  };
151
+ '&.is-hovered': {
152
+ backgroundColor: string;
153
+ };
125
154
  backgroundColor: string;
126
155
  '> svg': {
127
156
  fill: string;