@elliemae/ds-circular-progress-indicator 2.3.1-rc.2 → 3.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/cjs/DSCircularProgressIndicator.js +246 -0
  2. package/dist/cjs/DSCircularProgressIndicator.js.map +7 -0
  3. package/dist/cjs/index.js +40 -0
  4. package/dist/cjs/index.js.map +7 -0
  5. package/dist/cjs/v2/DSCircularIndeterminateIndicator.js +121 -0
  6. package/dist/cjs/v2/DSCircularIndeterminateIndicator.js.map +7 -0
  7. package/dist/cjs/v2/constants.js +65 -0
  8. package/dist/cjs/v2/constants.js.map +7 -0
  9. package/dist/cjs/v2/index.js +36 -0
  10. package/dist/cjs/v2/index.js.map +7 -0
  11. package/dist/cjs/v2/react-desc-prop-types.js +83 -0
  12. package/dist/cjs/v2/react-desc-prop-types.js.map +7 -0
  13. package/dist/cjs/v2/styled.js +137 -0
  14. package/dist/cjs/v2/styled.js.map +7 -0
  15. package/dist/esm/DSCircularProgressIndicator.js +217 -0
  16. package/dist/esm/DSCircularProgressIndicator.js.map +7 -0
  17. package/dist/esm/index.js +15 -0
  18. package/dist/esm/index.js.map +7 -0
  19. package/dist/esm/v2/DSCircularIndeterminateIndicator.js +97 -0
  20. package/dist/esm/v2/DSCircularIndeterminateIndicator.js.map +7 -0
  21. package/dist/esm/v2/constants.js +36 -0
  22. package/dist/esm/v2/constants.js.map +7 -0
  23. package/dist/esm/v2/index.js +10 -0
  24. package/dist/esm/v2/index.js.map +7 -0
  25. package/dist/esm/v2/react-desc-prop-types.js +56 -0
  26. package/dist/esm/v2/react-desc-prop-types.js.map +7 -0
  27. package/dist/esm/v2/styled.js +108 -0
  28. package/dist/esm/v2/styled.js.map +7 -0
  29. package/package.json +38 -41
  30. package/cjs/DSCircularProgressIndicator.js +0 -268
  31. package/cjs/index.js +0 -14
  32. package/cjs/v2/DSCircularIndeterminateIndicator.js +0 -113
  33. package/cjs/v2/constants.js +0 -37
  34. package/cjs/v2/index.js +0 -10
  35. package/cjs/v2/react-desc-prop-types.js +0 -39
  36. package/cjs/v2/styled.js +0 -51
  37. package/esm/DSCircularProgressIndicator.js +0 -258
  38. package/esm/index.js +0 -2
  39. package/esm/v2/DSCircularIndeterminateIndicator.js +0 -103
  40. package/esm/v2/constants.js +0 -30
  41. package/esm/v2/index.js +0 -1
  42. package/esm/v2/react-desc-prop-types.js +0 -30
  43. package/esm/v2/styled.js +0 -39
  44. package/types/DSCircularProgressIndicator.d.ts +0 -42
  45. package/types/index.d.ts +0 -2
  46. package/types/tests/DSCircularProgressIndicator.test.d.ts +0 -1
  47. package/types/v2/DSCircularIndeterminateIndicator.d.ts +0 -4
  48. package/types/v2/constants.d.ts +0 -28
  49. package/types/v2/index.d.ts +0 -1
  50. package/types/v2/react-desc-prop-types.d.ts +0 -14
  51. package/types/v2/styled.d.ts +0 -12
@@ -1,30 +0,0 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';
8
-
9
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
-
11
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
- const CircularIndeterminateIndicatorPropTypes = _objectSpread(_objectSpread({}, globalAttributesPropTypes), {}, {
13
- size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl']).description('Size of the indicator').defaultValue('m'),
14
- color: PropTypes.oneOf(['light', 'dark']).description('Color mode for the indicator').defaultValue('dark'),
15
- text: PropTypes.string.description('Optional text to show under the indicator').defaultValue(''),
16
- showText: PropTypes.bool.description('Whether to show the optional text or not').defaultValue(true),
17
- withTooltip: PropTypes.bool.description('Whether to include a tooltip that shows the optional text on hover').defaultValue(false),
18
- tooltipStartPlacementPreference: PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preference for the tooltip').defaultValue('center')
19
- });
20
- const defaultProps = {
21
- size: 'm',
22
- color: 'dark',
23
- text: '',
24
- showText: true,
25
- withTooltip: false,
26
- tooltipStartPlacementPreference: 'bottom',
27
- __duration: 4
28
- };
29
-
30
- export { CircularIndeterminateIndicatorPropTypes, defaultProps };
package/esm/v2/styled.js DELETED
@@ -1,39 +0,0 @@
1
- import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
2
- import styled from 'styled-components';
3
- import { kfrm } from '@elliemae/ds-system';
4
-
5
- var _templateObject, _templateObject2, _templateObject3;
6
- const {
7
- PI
8
- } = Math;
9
-
10
- const getArcLength = (percentage, radius) => 2 * PI * radius / 100 * percentage;
11
-
12
- const strokeTailAnimation = r => {
13
- const miniDash = "".concat(getArcLength(0, r), " ").concat(getArcLength(100, r));
14
- const fullDash = "".concat(getArcLength(75, r), " ").concat(getArcLength(25, r));
15
- return kfrm(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n stroke-dasharray: ", ";\n }\n 50% {\n stroke-dasharray: ", ";\n }\n 100% {\n stroke-dasharray: ", ";\n }\n"])), miniDash, fullDash, miniDash);
16
- };
17
-
18
- const rotateAnimation = kfrm(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0%, 12.5% {\n transform: rotate(0);\n }\n 25%, 37.5% {\n transform: rotate(270deg);\n }\n 50%, 62.5% {\n transform: rotate(540deg);\n }\n 75%, 87.5% {\n transform: rotate(810deg);\n }\n 100% {\n transform: rotate(1080deg);\n }\n"])));
19
-
20
- const dashAnimation = r => {
21
- const miniDash = "".concat(getArcLength(0, r), " ").concat(getArcLength(100, r));
22
- const fullDash = "".concat(getArcLength(75, r), " ").concat(getArcLength(25, r));
23
- return kfrm(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n stroke-dasharray: ", ";\n stroke-dashoffset: 0;\n }\n 12.5% {\n stroke-dasharray: ", ";\n stroke-dashoffset: 0;\n }\n 25% {\n stroke-dasharray: ", ";\n stroke-dashoffset: ", ";\n }\n 37.5% {\n stroke-dasharray: ", ";\n stroke-dashoffset: ", ";\n }\n 50% {\n stroke-dasharray: ", ";\n stroke-dashoffset: ", ";\n }\n 62.5% {\n stroke-dasharray: ", ";\n stroke-dashoffset: ", ";\n }\n 75% {\n stroke-dasharray: ", ";\n stroke-dashoffset: ", ";\n }\n 87.5% {\n stroke-dasharray: ", ";\n stroke-dashoffset: ", ";\n }\n 100% {\n stroke-dasharray: ", ";\n stroke-dashoffset: ", ";\n }\n"])), miniDash, fullDash, miniDash, getArcLength(-75, r), fullDash, getArcLength(-75, r), miniDash, getArcLength(-150, r), fullDash, getArcLength(-150, r), miniDash, getArcLength(-225, r), fullDash, getArcLength(-225, r), miniDash, getArcLength(-300, r));
24
- };
25
-
26
- const StyledSvg = /*#__PURE__*/styled.svg.withConfig({
27
- componentId: "sc-bvvh5i-0"
28
- })(["display:block;margin:auto;transform-origin:center center;transform:rotate(-90deg);"]);
29
- const StyledPath = /*#__PURE__*/styled.path.withConfig({
30
- componentId: "sc-bvvh5i-1"
31
- })(["transform-origin:center center;animation:", " ", "s linear infinite,", " ", "s linear infinite;"], rotateAnimation, props => props.__duration, props => strokeTailAnimation(props.r), props => props.__duration / 4);
32
- const StyledRect = /*#__PURE__*/styled.rect.withConfig({
33
- componentId: "sc-bvvh5i-2"
34
- })(["transform-origin:center center;animation:", " ", "s linear infinite;"], rotateAnimation, props => props.__duration);
35
- const StyledCircle = /*#__PURE__*/styled.circle.withConfig({
36
- componentId: "sc-bvvh5i-3"
37
- })(["stroke-dashoffset:0;fill:none;animation:", " ", "s linear infinite;clip-path:", ";-webkit-clip-path:", ";"], props => dashAnimation(props.r), props => props.__duration, props => props.clipPath, props => props.clipPath);
38
-
39
- export { StyledCircle, StyledPath, StyledRect, StyledSvg };
@@ -1,42 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- declare const CircularProgressIndicator: {
4
- ({ size, showLabel, showTooltip, waiting, loading }: {
5
- size: any;
6
- showLabel: any;
7
- showTooltip: any;
8
- waiting: any;
9
- loading: any;
10
- }): JSX.Element;
11
- defaultProps: {
12
- size: string;
13
- showLabel: boolean;
14
- showTooltip: boolean;
15
- waiting: boolean;
16
- loading: boolean;
17
- };
18
- propTypes: {
19
- size: {
20
- deprecated: import("react-desc").PropTypesDescValidator;
21
- };
22
- showLabel: {
23
- deprecated: import("react-desc").PropTypesDescValidator;
24
- };
25
- showTooltip: {
26
- deprecated: import("react-desc").PropTypesDescValidator;
27
- };
28
- waiting: {
29
- deprecated: import("react-desc").PropTypesDescValidator;
30
- };
31
- loading: {
32
- deprecated: import("react-desc").PropTypesDescValidator;
33
- };
34
- };
35
- };
36
- declare const CircularProgressIndicatorWithSchema: {
37
- (props?: unknown): JSX.Element;
38
- propTypes: unknown;
39
- toTypescript: () => import("react-desc").TypescriptSchema;
40
- };
41
- export { CircularProgressIndicatorWithSchema };
42
- export default CircularProgressIndicator;
package/types/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { default, default as DSCircularProgressIndicator, CircularProgressIndicatorWithSchema, } from './DSCircularProgressIndicator';
2
- export * from './v2';
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { DSCircularIndeterminateIndicatorT } from './react-desc-prop-types';
3
- export declare const DSCircularIndeterminateIndicator: React.ComponentType<DSCircularIndeterminateIndicatorT.Props>;
4
- export declare const DSCircularIndeterminateIndicatorWithSchema: import("@elliemae/ds-props-helpers/types/propTypes/types").DocumentedReactComponent<DSCircularIndeterminateIndicatorT.Props>;
@@ -1,28 +0,0 @@
1
- export declare const sizeToPx: {
2
- xs: number;
3
- s: number;
4
- m: number;
5
- l: number;
6
- xl: number;
7
- xxl: number;
8
- };
9
- export declare const sizeToWeight: {
10
- xs: string;
11
- s: string;
12
- m: string;
13
- l: string;
14
- xl: string;
15
- xxl: string;
16
- };
17
- export declare const colorToHex: {
18
- light: string;
19
- dark: string;
20
- };
21
- export declare const sizeToTextSize: {
22
- xs: string;
23
- s: string;
24
- m: string;
25
- l: string;
26
- xl: string;
27
- xxl: string;
28
- };
@@ -1 +0,0 @@
1
- export * from './DSCircularIndeterminateIndicator';
@@ -1,14 +0,0 @@
1
- import { WeakValidationMap } from 'react';
2
- export declare namespace DSCircularIndeterminateIndicatorT {
3
- interface Props {
4
- size?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
5
- color?: 'light' | 'dark';
6
- text?: string;
7
- showText?: boolean;
8
- withTooltip: boolean;
9
- tooltipStartPlacementPreference?: 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
10
- __duration: number;
11
- }
12
- }
13
- export declare const CircularIndeterminateIndicatorPropTypes: WeakValidationMap<unknown>;
14
- export declare const defaultProps: DSCircularIndeterminateIndicatorT.Props;
@@ -1,12 +0,0 @@
1
- export declare const StyledSvg: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
2
- export declare const StyledPath: import("styled-components").StyledComponent<"path", import("styled-components").DefaultTheme, {
3
- __duration: number;
4
- r: number;
5
- }, never>;
6
- export declare const StyledRect: import("styled-components").StyledComponent<"rect", import("styled-components").DefaultTheme, {
7
- __duration: number;
8
- }, never>;
9
- export declare const StyledCircle: import("styled-components").StyledComponent<"circle", import("styled-components").DefaultTheme, {
10
- r: number;
11
- __duration: number;
12
- }, never>;