@pingux/astro 2.32.0-alpha.0 → 2.32.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +1 -1
- package/lib/cjs/components/Badge/Badge.stories.js +1 -1
- package/lib/cjs/components/Badge/Convenience/ConvenienceBadges.stories.js +1 -1
- package/lib/cjs/components/Bracket/Bracket.stories.js +1 -1
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +1 -1
- package/lib/cjs/components/Button/Button.stories.d.ts +1 -1
- package/lib/cjs/components/Button/Button.stories.js +1 -1
- package/lib/cjs/components/Calendar/Calendar.stories.js +1 -1
- package/lib/cjs/components/Calendar/Calendar.test.js +9 -32
- package/lib/cjs/components/Callout/Callout.stories.js +1 -1
- package/lib/cjs/components/Card/Card.stories.js +1 -1
- package/lib/cjs/components/CodeView/CodeView.stories.js +1 -1
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +1 -1
- package/lib/cjs/components/CopyText/CopyText.stories.js +1 -1
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +1 -1
- package/lib/cjs/components/Icon/Icon.stories.js +1 -1
- package/lib/cjs/components/IconBadge/IconBadge.stories.js +1 -1
- package/lib/cjs/components/IconButton/IconButton.stories.js +1 -1
- package/lib/cjs/components/Label/Label.test.js +10 -7
- package/lib/cjs/components/Link/Link.stories.js +1 -1
- package/lib/cjs/components/Loader/Loader.stories.js +1 -1
- package/lib/cjs/components/Menu/Menu.stories.js +1 -1
- package/lib/cjs/components/Messages/Messages.js +42 -9
- package/lib/cjs/components/Messages/Messages.stories.js +1 -1
- package/lib/cjs/components/Messages/Messages.test.js +7 -4
- package/lib/cjs/components/Modal/Modal.stories.js +1 -1
- package/lib/cjs/components/NavBar/NavBar.stories.js +1 -1
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +3 -17
- package/lib/cjs/components/PanelHeader/PanelHeader.stories.js +1 -1
- package/lib/cjs/components/PanelHeader/PanelHeader.test.js +7 -3
- package/lib/cjs/components/PopoverMenu/PopoverMenu.stories.js +1 -1
- package/lib/cjs/components/RequirementsList/RequirementsList.stories.js +1 -1
- package/lib/cjs/components/ScrollBox/ScrollBox.stories.js +1 -1
- package/lib/cjs/components/Separator/Separator.stories.js +1 -1
- package/lib/cjs/components/Stepper/Stepper.stories.js +1 -1
- package/lib/cjs/hooks/useComponentToggle/index.d.ts +1 -0
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.d.ts +32 -0
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.js +4 -20
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.test.d.ts +1 -0
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.test.js +8 -9
- package/lib/cjs/hooks/useDebounce/index.d.ts +1 -0
- package/lib/cjs/hooks/useDebounce/useDebounce.d.ts +6 -0
- package/lib/cjs/hooks/useDebounce/useDebounce.js +1 -1
- package/lib/cjs/hooks/useFallbackImage/index.d.ts +1 -0
- package/lib/cjs/hooks/useFallbackImage/useFallbackImage.d.ts +10 -0
- package/lib/cjs/hooks/useFallbackImage/useFallbackImage.js +1 -2
- package/lib/cjs/hooks/useFallbackImage/useFallbackImage.test.d.ts +1 -0
- package/lib/cjs/hooks/useFallbackImage/useFallbackImage.test.js +9 -9
- package/lib/cjs/recipes/AttributeMapping.stories.js +1 -1
- package/lib/cjs/recipes/ConditionFilter.stories.js +1 -1
- package/lib/cjs/recipes/MaskedValue.stories.js +1 -1
- package/lib/cjs/recipes/MultipagePopup.stories.js +1 -1
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +1 -1
- package/lib/cjs/recipes/PanelContent.stories.js +1 -1
- package/lib/cjs/recipes/Slider.stories.js +1 -1
- package/lib/cjs/recipes/TrialExperienceIndustryButtons.stories.js +1 -1
- package/lib/cjs/recipes/TrialExperienceStatusBar.stories.js +1 -1
- package/lib/cjs/utils/designUtils/figmaLinks.d.ts +7 -0
- package/lib/cjs/utils/testUtils/setupTests.d.ts +4 -0
- package/lib/cjs/utils/testUtils/testAxe.d.ts +2 -0
- package/lib/cjs/utils/testUtils/testTheme.d.ts +21 -0
- package/lib/cjs/utils/testUtils/testWrapper.d.ts +5 -0
- package/lib/cjs/utils/testUtils/testWrapper.js +3 -2
- package/lib/cjs/utils/testUtils/universalComponentTest.d.ts +5 -0
- package/lib/cjs/utils/testUtils/universalComponentTest.js +86 -0
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +1 -1
- package/lib/components/Badge/Badge.stories.js +1 -1
- package/lib/components/Badge/Convenience/ConvenienceBadges.stories.js +1 -1
- package/lib/components/Bracket/Bracket.stories.js +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +1 -1
- package/lib/components/Button/Button.stories.js +1 -1
- package/lib/components/Calendar/Calendar.stories.js +1 -1
- package/lib/components/Calendar/Calendar.test.js +9 -32
- package/lib/components/Callout/Callout.stories.js +1 -1
- package/lib/components/Card/Card.stories.js +1 -1
- package/lib/components/CodeView/CodeView.stories.js +1 -1
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +1 -1
- package/lib/components/CopyText/CopyText.stories.js +1 -1
- package/lib/components/HelpHint/HelpHint.stories.js +1 -1
- package/lib/components/Icon/Icon.stories.js +1 -1
- package/lib/components/IconBadge/IconBadge.stories.js +1 -1
- package/lib/components/IconButton/IconButton.stories.js +1 -1
- package/lib/components/Label/Label.test.js +8 -5
- package/lib/components/Link/Link.stories.js +1 -1
- package/lib/components/Loader/Loader.stories.js +1 -1
- package/lib/components/Menu/Menu.stories.js +1 -1
- package/lib/components/Messages/Messages.js +47 -15
- package/lib/components/Messages/Messages.stories.js +1 -1
- package/lib/components/Messages/Messages.test.js +7 -4
- package/lib/components/Modal/Modal.stories.js +1 -1
- package/lib/components/NavBar/NavBar.stories.js +1 -1
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +4 -18
- package/lib/components/PanelHeader/PanelHeader.stories.js +1 -1
- package/lib/components/PanelHeader/PanelHeader.test.js +7 -3
- package/lib/components/PopoverMenu/PopoverMenu.stories.js +1 -1
- package/lib/components/RequirementsList/RequirementsList.stories.js +1 -1
- package/lib/components/ScrollBox/ScrollBox.stories.js +1 -1
- package/lib/components/Separator/Separator.stories.js +1 -1
- package/lib/components/Stepper/Stepper.stories.js +1 -1
- package/lib/hooks/useComponentToggle/useComponentToggle.js +4 -21
- package/lib/hooks/useComponentToggle/useComponentToggle.test.js +8 -9
- package/lib/hooks/useDebounce/useDebounce.js +1 -1
- package/lib/hooks/useFallbackImage/useFallbackImage.js +1 -2
- package/lib/hooks/useFallbackImage/useFallbackImage.test.js +6 -6
- package/lib/recipes/AttributeMapping.stories.js +1 -1
- package/lib/recipes/ConditionFilter.stories.js +1 -1
- package/lib/recipes/MaskedValue.stories.js +1 -1
- package/lib/recipes/MultipagePopup.stories.js +1 -1
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +1 -1
- package/lib/recipes/PanelContent.stories.js +1 -1
- package/lib/recipes/Slider.stories.js +1 -1
- package/lib/recipes/TrialExperienceIndustryButtons.stories.js +1 -1
- package/lib/recipes/TrialExperienceStatusBar.stories.js +1 -1
- package/lib/utils/testUtils/testWrapper.js +3 -2
- package/lib/utils/testUtils/universalComponentTest.js +74 -0
- package/package.json +5 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
3
3
|
import { Box, Bracket } from '../../index';
|
4
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
4
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
5
5
|
import BracketReadme from './Bracket.mdx';
|
6
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
7
|
export default {
|
@@ -6,7 +6,7 @@ import { action } from '@storybook/addon-actions';
|
|
6
6
|
import { withDesign } from 'storybook-addon-designs';
|
7
7
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
8
8
|
import { Breadcrumbs } from '../../index';
|
9
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
9
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
10
10
|
import BreadcrumbsReadme from './Breadcrumbs.mdx';
|
11
11
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
12
12
|
export default {
|
@@ -18,7 +18,7 @@ import PlusIcon from '@pingux/mdi-react/PlusIcon';
|
|
18
18
|
import { withDesign } from 'storybook-addon-designs';
|
19
19
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
20
20
|
import { Box, Button, Icon, Text } from '../../index';
|
21
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks
|
21
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
22
22
|
import ButtonReadme from './Button.mdx';
|
23
23
|
import { buttonArgTypes } from './buttonAttributes';
|
24
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -16,7 +16,7 @@ import React, { useState } from 'react';
|
|
16
16
|
import { parseDate } from '@internationalized/date';
|
17
17
|
import { withDesign } from 'storybook-addon-designs';
|
18
18
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
19
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
19
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
20
20
|
import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
|
21
21
|
import Calendar from './Calendar';
|
22
22
|
import CalendarReadme from './Calendar.mdx';
|
@@ -1,23 +1,11 @@
|
|
1
|
-
import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
2
|
-
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
3
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context9; _forEachInstanceProperty(_context9 = ["next", "throw", "return"]).call(_context9, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context10; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context10 = this.tryEntries).call(_context10, resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
4
1
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
5
2
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
6
|
-
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
7
|
-
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
8
|
-
import _Object$create from "@babel/runtime-corejs3/core-js-stable/object/create";
|
9
|
-
import _Object$getPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/get-prototype-of";
|
10
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
11
|
-
import _Object$setPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/set-prototype-of";
|
12
|
-
import _Promise from "@babel/runtime-corejs3/core-js-stable/promise";
|
13
|
-
import _reverseInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reverse";
|
14
|
-
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
15
3
|
import React from 'react';
|
16
4
|
import { getLocalTimeZone, today } from '@internationalized/date';
|
17
5
|
import userEvent from '@testing-library/user-event';
|
18
|
-
import { axe } from 'jest-axe';
|
19
6
|
import { isDateWithinRanges } from '../../utils/devUtils/props/isDateWithinRanges';
|
20
7
|
import { act, fireEvent, render, screen, within } from '../../utils/testUtils/testWrapper';
|
8
|
+
import { universalComponentTests } from '../../utils/testUtils/universalComponentTest';
|
21
9
|
import Calendar from './Calendar';
|
22
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
23
11
|
var unavailableRanges = [['2022-08-01', '2022-08-03'], ['2022-08-15', '2022-08-20']];
|
@@ -32,6 +20,13 @@ var getComponent = function getComponent() {
|
|
32
20
|
renderFn = _ref$renderFn === void 0 ? render : _ref$renderFn;
|
33
21
|
return renderFn(___EmotionJSX(Calendar, props));
|
34
22
|
};
|
23
|
+
|
24
|
+
// Needs to be added to each components test file.
|
25
|
+
universalComponentTests({
|
26
|
+
renderComponent: function renderComponent(props) {
|
27
|
+
return ___EmotionJSX(Calendar, props);
|
28
|
+
}
|
29
|
+
});
|
35
30
|
test('renders calendar component', function () {
|
36
31
|
var _context, _context2;
|
37
32
|
getComponent({
|
@@ -296,22 +291,4 @@ test('should autofocus on current day with hasAutoFocus', function () {
|
|
296
291
|
return cell.getAttribute('aria-disabled') !== 'true';
|
297
292
|
});
|
298
293
|
expect(focusedDay[0]).toHaveTextContent(day);
|
299
|
-
});
|
300
|
-
test('should have no accessibility violations', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
301
|
-
var _getComponent, container, results;
|
302
|
-
return _regeneratorRuntime().wrap(function _callee$(_context8) {
|
303
|
-
while (1) switch (_context8.prev = _context8.next) {
|
304
|
-
case 0:
|
305
|
-
jest.useRealTimers();
|
306
|
-
_getComponent = getComponent(), container = _getComponent.container;
|
307
|
-
_context8.next = 4;
|
308
|
-
return axe(container);
|
309
|
-
case 4:
|
310
|
-
results = _context8.sent;
|
311
|
-
expect(results).toHaveNoViolations();
|
312
|
-
case 6:
|
313
|
-
case "end":
|
314
|
-
return _context8.stop();
|
315
|
-
}
|
316
|
-
}, _callee);
|
317
|
-
})));
|
294
|
+
});
|
@@ -13,7 +13,7 @@ import React from 'react';
|
|
13
13
|
import { withDesign } from 'storybook-addon-designs';
|
14
14
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
15
15
|
import { Callout, Link, Text } from '../../index';
|
16
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
16
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
17
17
|
import statuses from '../../utils/devUtils/constants/statuses';
|
18
18
|
import { statusArgTypes } from '../../utils/docUtils/statusProp';
|
19
19
|
import CalloutReadme from './Callout.mdx';
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
3
3
|
import { withDesign } from 'storybook-addon-designs';
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
5
5
|
import { Box, Button, Card } from '../../index';
|
6
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
6
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
7
7
|
import CardReadme from './Card.mdx';
|
8
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
9
|
export default {
|
@@ -5,7 +5,7 @@ import { withDesign } from 'storybook-addon-designs';
|
|
5
5
|
import 'prismjs/components/prism-powershell';
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
7
|
import { CodeView } from '../../index';
|
8
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
8
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
9
9
|
import CodeViewReadme from './CodeView.mdx';
|
10
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
11
11
|
var code = "{\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad\"\n },\n \"password\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.set\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.reset\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.check\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.recover\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"account.sendVerificationCode\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad\"\n },\n \"linkedAccounts\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/linkedAccounts\"\n }\n },\n \"id\": \"5a5d4c0c-8383-4796-9cdc-16b5a22f45ad\",\n \"environment\": {\n \"id\": \"94e3268d-847d-47aa-a45e-1ef8dd8f4df0\"\n },\n \"account\": {\n \"canAuthenticate\": true,\n \"status\": \"OK\"\n },\n \"createdAt\": \"2021-09-03T15:01:43.555Z\",\n \"email\": \"allegraweldon@pingidentity.com\",\n \"enabled\": true,\n \"identityProvider\": {\n \"type\": \"PING_ONE\"\n },\n \"lifecycle\": {\n \"status\": \"ACCOUNT_OK\"\n },\n \"mfaEnabled\": false,\n \"population\": {\n \"id\": \"c1adbc29-f188-4ea6-a015-49bddd74bc84\"\n },\n \"updatedAt\": \"2021-09-03T15:01:43.555Z\",\n \"username\": \"allegraweldon@pingidentity.com\",\n \"verifyStatus\": \"NOT_INITIATED\"\n}";
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { withDesign } from 'storybook-addon-designs';
|
3
3
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
4
4
|
import { CollapsiblePanel } from '../../index';
|
5
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
5
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
6
6
|
import CollapsiblePanelReadme from './CollapsiblePanel.mdx';
|
7
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
8
|
export default {
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
3
3
|
import { withDesign } from 'storybook-addon-designs';
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
5
5
|
import { Box, CopyText, Link, Text } from '../../index';
|
6
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
6
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
7
7
|
import CopyTextReadme from './CopyText.mdx';
|
8
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
9
|
export default {
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
3
3
|
import { withDesign } from 'storybook-addon-designs';
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
5
5
|
import { Box, HelpHint, Link, Text } from '../../index';
|
6
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
6
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
7
7
|
import HelpHintReadme from './HelpHint.mdx';
|
8
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
9
|
export default {
|
@@ -13,7 +13,7 @@ import { v4 as uuid } from 'uuid';
|
|
13
13
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
14
14
|
import { Box, Icon, Table, TableBody, TableCell, TableHead, TableRow, Text } from '../../index';
|
15
15
|
import { flatColorList } from '../../styles/colors';
|
16
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks
|
16
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
17
17
|
import { tShirtSizes } from '../../utils/devUtils/constants/tShirtSizes';
|
18
18
|
import IconReadme from './Icon.mdx';
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -5,7 +5,7 @@ import ArrowIcon from '@pingux/mdi-react/ArrowTopRightThickIcon';
|
|
5
5
|
import { withDesign } from 'storybook-addon-designs';
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
7
|
import { Box, Icon, IconBadge } from '../../index';
|
8
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
8
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
9
9
|
import IconBadgeReadme from './IconBadge.mdx';
|
10
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
11
11
|
export default {
|
@@ -8,7 +8,7 @@ import PlusIcon from '@pingux/mdi-react/PlusIcon';
|
|
8
8
|
import { withDesign } from 'storybook-addon-designs';
|
9
9
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
10
10
|
import { Box, Icon, IconButton, Table, TableBody, TableCell, TableHead, TableRow, Text } from '../../index';
|
11
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
11
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
12
12
|
import IconButtonReadme from './IconButton.mdx';
|
13
13
|
import { iconButtonArgs, iconButtonArgTypes } from './iconButtonAttributes';
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React from 'react';
|
3
3
|
import { fireEvent, render, screen } from '@testing-library/react';
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import Label from '.';
|
4
|
+
import { Input, Label } from '../..';
|
5
|
+
import { universalComponentTests } from '../../utils/testUtils/universalComponentTest';
|
7
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
7
|
var testId = 'test-label';
|
9
8
|
var defaultProps = {
|
@@ -14,8 +13,12 @@ var getComponent = function getComponent() {
|
|
14
13
|
return render(___EmotionJSX(Label, _extends({}, defaultProps, props)));
|
15
14
|
};
|
16
15
|
|
17
|
-
//
|
18
|
-
|
16
|
+
// Needs to be added to each components test file
|
17
|
+
universalComponentTests({
|
18
|
+
renderComponent: function renderComponent(props) {
|
19
|
+
return ___EmotionJSX(Label, props);
|
20
|
+
}
|
21
|
+
});
|
19
22
|
test('default label', function () {
|
20
23
|
getComponent();
|
21
24
|
var label = screen.getByTestId(testId);
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
5
5
|
import { withDesign } from 'storybook-addon-designs';
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
7
|
import { Link } from '../../index';
|
8
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
8
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
9
9
|
import { htmlElements } from '../../utils/devUtils/constants/htmlElements';
|
10
10
|
import LinkReadme from './Link.mdx';
|
11
11
|
import variants from './Link.styles';
|
@@ -5,7 +5,7 @@ import { withDesign } from 'storybook-addon-designs';
|
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
6
6
|
import { Loader } from '../../index';
|
7
7
|
import { flatColorList } from '../../styles/colors';
|
8
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
8
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
9
9
|
import LoaderReadme from './Loader.mdx';
|
10
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
11
11
|
export default {
|
@@ -5,7 +5,7 @@ import { Item } from 'react-stately';
|
|
5
5
|
import { withDesign } from 'storybook-addon-designs';
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
7
|
import { Menu, Text } from '../../index';
|
8
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
8
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
9
9
|
import MenuReadme from './Menu.mdx';
|
10
10
|
import { menuArgTypes } from './menuAttributes';
|
11
11
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -1,40 +1,72 @@
|
|
1
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
2
|
-
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
3
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
4
|
-
var _excluded = ["items", "onClose"];
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
7
|
-
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
8
|
-
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
9
1
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
10
2
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
11
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
12
3
|
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
13
4
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
14
5
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
15
6
|
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
16
7
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
17
|
-
import
|
18
|
-
import
|
8
|
+
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
11
|
+
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
12
|
+
var _excluded = ["items", "onClose"];
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
15
|
+
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
16
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
17
|
+
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
18
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
19
|
+
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
20
|
+
import { useCollection } from '@react-stately/collections';
|
21
|
+
import { ListCollection } from '@react-stately/list';
|
19
22
|
import PropTypes from 'prop-types';
|
20
23
|
import { statusPropTypes } from '../../utils/docUtils/statusProp';
|
21
24
|
import Box from '../Box';
|
22
25
|
import Message from './Message';
|
23
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
24
27
|
var Messages = /*#__PURE__*/forwardRef(function (props, ref) {
|
25
|
-
var _context;
|
26
28
|
var items = props.items,
|
27
29
|
onClose = props.onClose,
|
28
30
|
others = _objectWithoutProperties(props, _excluded);
|
29
|
-
var
|
31
|
+
var _useState = useState([]),
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
33
|
+
messages = _useState2[0],
|
34
|
+
setMessages = _useState2[1];
|
35
|
+
var factory = useCallback(function (nodes) {
|
36
|
+
return new ListCollection(nodes);
|
37
|
+
}, []);
|
38
|
+
var collection = useCollection(props, factory);
|
39
|
+
useEffect(function () {
|
40
|
+
setMessages(_Array$from(collection));
|
41
|
+
}, [collection]);
|
42
|
+
var removeMessage = function removeMessage(key) {
|
43
|
+
setMessages(_mapInstanceProperty(messages).call(messages, function (item) {
|
44
|
+
return item.key === key ? _objectSpread(_objectSpread({}, item), {}, {
|
45
|
+
props: _objectSpread(_objectSpread({}, item.props), {}, {
|
46
|
+
isHidden: true
|
47
|
+
})
|
48
|
+
}) : item;
|
49
|
+
}));
|
50
|
+
_setTimeout(function () {
|
51
|
+
return setMessages(_filterInstanceProperty(messages).call(messages, function (item) {
|
52
|
+
return item.key !== key;
|
53
|
+
}));
|
54
|
+
}, 200);
|
55
|
+
};
|
56
|
+
var onCloseHandler = function onCloseHandler(key) {
|
57
|
+
if (onClose) {
|
58
|
+
onClose(key);
|
59
|
+
}
|
60
|
+
removeMessage(key);
|
61
|
+
};
|
30
62
|
return ___EmotionJSX(Box, _extends({
|
31
63
|
ref: ref,
|
32
64
|
variant: "message.wrapper"
|
33
|
-
}, others), _mapInstanceProperty(
|
65
|
+
}, others), _mapInstanceProperty(messages).call(messages, function (item) {
|
34
66
|
return ___EmotionJSX(Message, {
|
35
67
|
key: item.key,
|
36
68
|
item: item,
|
37
|
-
onClose:
|
69
|
+
onClose: onCloseHandler
|
38
70
|
});
|
39
71
|
}));
|
40
72
|
});
|
@@ -21,7 +21,7 @@ import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
|
21
21
|
import { withDesign } from 'storybook-addon-designs';
|
22
22
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
23
23
|
import { Box, Button, Messages } from '../../index';
|
24
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
24
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
25
25
|
import statuses from '../../utils/devUtils/constants/statuses';
|
26
26
|
import { messagesReducerStory as messagesReducer, multiMessagesReducerStory as multiMessagesReducer } from './index';
|
27
27
|
import MessagesReadme from './Messages.mdx';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
-
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
3
2
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
4
3
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
5
4
|
import React from 'react';
|
5
|
+
import { act } from 'react-dom/test-utils';
|
6
6
|
import { Item } from 'react-stately';
|
7
7
|
import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
8
8
|
import userEvent from '@testing-library/user-event';
|
@@ -92,14 +92,17 @@ test('`onClose` get as first arg key of message', function () {
|
|
92
92
|
expect(onClose).toHaveBeenCalledWith('message1');
|
93
93
|
});
|
94
94
|
test('click on close button removes message after delay', function () {
|
95
|
+
act(function () {
|
96
|
+
global.setTimeout = jest.fn(function (cb) {
|
97
|
+
return cb();
|
98
|
+
});
|
99
|
+
});
|
95
100
|
getComponent();
|
96
101
|
var messages = screen.getByTestId(testId);
|
97
102
|
expect(messages.childElementCount).toBe(2);
|
98
103
|
var buttons = screen.getAllByRole('button');
|
99
104
|
userEvent.click(buttons[0]);
|
100
|
-
|
101
|
-
expect(messages.childElementCount).toBe(1);
|
102
|
-
}, 200);
|
105
|
+
expect(messages.childElementCount).toBe(1);
|
103
106
|
});
|
104
107
|
test('Item accepts a data-id and the data-id can be found in the DOM', function () {
|
105
108
|
getComponent();
|
@@ -4,7 +4,7 @@ import { withDesign } from 'storybook-addon-designs';
|
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
5
5
|
import { useModalState } from '../../hooks';
|
6
6
|
import { Box, Button, Modal, OverlayProvider, Text } from '../../index';
|
7
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
7
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
8
8
|
import { modalSizes } from '../../utils/devUtils/constants/modalSizes';
|
9
9
|
import ModalReadme from './Modal.mdx';
|
10
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -14,7 +14,7 @@ import ViewGridPlusOutline from '@pingux/mdi-react/ViewGridPlusOutlineIcon';
|
|
14
14
|
import { withDesign } from 'storybook-addon-designs';
|
15
15
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
16
16
|
import { Box, Link, NavBar, NavBarItem, NavBarItemButton, NavBarItemLink, NavBarSection, Separator } from '../../index';
|
17
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
17
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
18
18
|
import NavBarReadme from './NavBar.mdx';
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
20
20
|
export default {
|
@@ -11,7 +11,7 @@ import CloseIcon from '@pingux/mdi-react/CloseIcon';
|
|
11
11
|
import CogIcon from '@pingux/mdi-react/CogIcon';
|
12
12
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
13
13
|
import { useOverlayPanelState } from '../../hooks';
|
14
|
-
import { Avatar, Box, Breadcrumbs, Button, ColorField, IconButton, ListView, ListViewItem, Messages, MultivaluesField, OverlayPanel, OverlayProvider, SwitchField, Tab, Tabs, Text, TextField } from '../../index';
|
14
|
+
import { Avatar, Box, Breadcrumbs, Button, ButtonBar, ColorField, IconButton, ListView, ListViewItem, Messages, MultivaluesField, OverlayPanel, OverlayProvider, SwitchField, Tab, Tabs, Text, TextField } from '../../index';
|
15
15
|
import { pingImg } from '../../utils/devUtils/constants/images';
|
16
16
|
import { panelSizes } from '../../utils/devUtils/constants/panelSizes';
|
17
17
|
import OverlayPanelReadme from './OverlayPanel.mdx';
|
@@ -156,7 +156,7 @@ export var Expandable = function Expandable() {
|
|
156
156
|
fontSize: 'sm',
|
157
157
|
fontWeight: 500,
|
158
158
|
color: 'text.secondary',
|
159
|
-
'> div': {
|
159
|
+
'& > div:first-child': {
|
160
160
|
order: 2
|
161
161
|
}
|
162
162
|
},
|
@@ -168,15 +168,6 @@ export var Expandable = function Expandable() {
|
|
168
168
|
gap: 'md',
|
169
169
|
width: isExpanded ? '100%' : '400px',
|
170
170
|
transition: 'width 500ms'
|
171
|
-
},
|
172
|
-
footer: {
|
173
|
-
marginTop: 'auto',
|
174
|
-
padding: '15px 25px',
|
175
|
-
button: {
|
176
|
-
width: '65px',
|
177
|
-
height: '38px',
|
178
|
-
border: '0 !important'
|
179
|
-
}
|
180
171
|
}
|
181
172
|
};
|
182
173
|
var multivaluesFieldItems = [{
|
@@ -330,17 +321,12 @@ export var Expandable = function Expandable() {
|
|
330
321
|
label: "Log field Description",
|
331
322
|
defaultValue: "The Value of the Text Input"
|
332
323
|
}));
|
333
|
-
var footer = ___EmotionJSX(
|
334
|
-
isRow: true,
|
335
|
-
sx: sx.footer
|
336
|
-
}, ___EmotionJSX(Button, {
|
324
|
+
var footer = ___EmotionJSX(ButtonBar, null, ___EmotionJSX(Button, {
|
337
325
|
onPress: onCloseHandler,
|
338
|
-
sx: sx.footer.button,
|
339
326
|
variant: "primary"
|
340
327
|
}, "Save"), ___EmotionJSX(Button, {
|
341
328
|
onPress: onCloseHandler,
|
342
|
-
|
343
|
-
variant: "text"
|
329
|
+
variant: "link"
|
344
330
|
}, "Cancel"));
|
345
331
|
return (
|
346
332
|
// Application must be wrapped in an OverlayProvider so that it can be hidden from screen
|
@@ -5,7 +5,7 @@ import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
|
5
5
|
import ChevronRightIcon from '@pingux/mdi-react/ChevronRightIcon';
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
7
|
import { Breadcrumbs, Item, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField } from '../../index';
|
8
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
8
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
9
9
|
import { pingImg } from '../../utils/devUtils/constants/images';
|
10
10
|
import { SharedItemArgTypes } from '../ListViewItem/listViewItemAttributes';
|
11
11
|
import PanelHeaderReadMe from './PanelHeader.mdx';
|
@@ -16,8 +16,8 @@ import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
|
16
16
|
import { act } from '@testing-library/react';
|
17
17
|
import { PanelHeader, PanelHeaderSwitchField } from '../../index';
|
18
18
|
import { pingImg } from '../../utils/devUtils/constants/images';
|
19
|
-
import axeTest from '../../utils/testUtils/testAxe';
|
20
19
|
import { render, screen } from '../../utils/testUtils/testWrapper';
|
20
|
+
import { universalComponentTests } from '../../utils/testUtils/universalComponentTest';
|
21
21
|
import { PANEL_HEADER_ICON } from './PanelHeader';
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
23
23
|
var defaultProps = {
|
@@ -44,8 +44,12 @@ jest.mock('../../hooks/useFallbackImage', function () {
|
|
44
44
|
};
|
45
45
|
});
|
46
46
|
|
47
|
-
//
|
48
|
-
|
47
|
+
// Needs to be added to each components test file
|
48
|
+
universalComponentTests({
|
49
|
+
renderComponent: function renderComponent(props) {
|
50
|
+
return ___EmotionJSX(PanelHeader, _extends({}, defaultProps, props));
|
51
|
+
}
|
52
|
+
});
|
49
53
|
describe('PanelHeader', function () {
|
50
54
|
test('renders data', function () {
|
51
55
|
var _context;
|
@@ -4,7 +4,7 @@ import { action } from '@storybook/addon-actions';
|
|
4
4
|
import { withDesign } from 'storybook-addon-designs';
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
6
6
|
import { Button, Item, Menu, OverlayProvider, PopoverMenu, Text } from '../../index';
|
7
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
7
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
8
8
|
import PopoverMenuReadme from './PopoverMenu.mdx';
|
9
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
10
10
|
export default {
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { withDesign } from 'storybook-addon-designs';
|
3
3
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
4
4
|
import { RequirementsList } from '../../index';
|
5
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
5
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
6
6
|
import RequirementsListReadme from './RequirementsList.mdx';
|
7
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
8
|
export default {
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
3
3
|
import { withDesign } from 'storybook-addon-designs';
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
5
5
|
import { Box, ScrollBox } from '../../index';
|
6
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
6
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
7
7
|
import ScrollBoxReadme from './ScrollBox.mdx';
|
8
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
9
|
export default {
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
4
4
|
import { withDesign } from 'storybook-addon-designs';
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
6
6
|
import { Box, Separator } from '../../index';
|
7
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
7
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
8
8
|
import SeparatorReadme from './Separator.mdx';
|
9
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
10
10
|
export default {
|
@@ -4,7 +4,7 @@ import { Item } from 'react-stately';
|
|
4
4
|
import { withDesign } from 'storybook-addon-designs';
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
6
6
|
import { Stepper, Text } from '../../index';
|
7
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.
|
7
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.ts';
|
8
8
|
import StepperReadme from './Stepper.mdx';
|
9
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
10
10
|
export default {
|