@pingux/astro 2.40.1-alpha.1 → 2.41.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.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { LinkProps } from '../../types';
3
+ declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
4
+ export default Link;
@@ -14,7 +14,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-c
14
14
  var _react = _interopRequireWildcard(require("react"));
15
15
  var _reactAria = require("react-aria");
16
16
  var _interactions = require("@react-aria/interactions");
17
- var _propTypes = _interopRequireDefault(require("prop-types"));
18
17
  var _themeUi = require("theme-ui");
19
18
  var _hooks = require("../../hooks");
20
19
  var _react2 = require("@emotion/react");
@@ -27,7 +26,7 @@ var Link = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
27
26
  onPress = props.onPress,
28
27
  isSafariCompatible = props.isSafariCompatible,
29
28
  others = (0, _objectWithoutProperties2["default"])(props, _excluded);
30
- var linkRef = (0, _react.useRef)();
29
+ var linkRef = (0, _react.useRef)(null);
31
30
  (0, _hooks.usePropWarning)(props, 'disabled', 'isDisabled');
32
31
  /* istanbul ignore next */
33
32
  (0, _react.useImperativeHandle)(ref, function () {
@@ -68,26 +67,10 @@ var Link = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
68
67
  role: "link"
69
68
  }, others, (0, _reactAria.mergeProps)(hoverProps, pressProps, linkProps, focusProps)));
70
69
  });
71
- Link.propTypes = {
72
- /** Whether the link is disabled. */
73
- isDisabled: _propTypes["default"].bool,
74
- /** The HTML element used to render the link, e.g. 'a', or 'span'. */
75
- as: _propTypes["default"].string,
76
- /** Handler that is called when the press is released over the target. */
77
- onPress: _propTypes["default"].func,
78
- /** Specifies the location of the URL */
79
- href: _propTypes["default"].string,
80
- /** Specifies the window where the linked page is loaded */
81
- target: _propTypes["default"].string,
82
- /** The styling variation of the link. */
83
- variant: _propTypes["default"].string,
84
- /** Whether the link is clickable inside a popover in safari */
85
- isSafariCompatible: _propTypes["default"].bool
86
- };
87
70
  Link.defaultProps = {
88
71
  isDisabled: false,
89
- as: 'a',
90
- variant: 'app'
72
+ variant: 'app',
73
+ as: 'a'
91
74
  };
92
75
  Link.displayName = 'Link';
93
76
  var _default = Link;
@@ -0,0 +1,5 @@
1
+ import { StoryFn } from '@storybook/react';
2
+ import { LinkProps } from '../../types/link';
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
4
+ export default _default;
5
+ export declare const Default: StoryFn<LinkProps>;
@@ -13,7 +13,7 @@ var _react = _interopRequireDefault(require("react"));
13
13
  var _storybookAddonDesigns = require("storybook-addon-designs");
14
14
  var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
15
15
  var _index = require("../../index");
16
- var _figmaLinks = require("../../utils/designUtils/figmaLinks.ts");
16
+ var _figmaLinks = require("../../utils/designUtils/figmaLinks");
17
17
  var _htmlElements = require("../../utils/devUtils/constants/htmlElements");
18
18
  var _Link = _interopRequireDefault(require("./Link.mdx"));
19
19
  var _Link2 = _interopRequireDefault(require("./Link.styles"));
@@ -0,0 +1,76 @@
1
+ declare const _default: {
2
+ app: {
3
+ color: string;
4
+ fontFamily: string;
5
+ fontSize: string;
6
+ textDecoration: string;
7
+ outline: string;
8
+ '&.is-hovered': {
9
+ textDecoration: string;
10
+ };
11
+ '&.is-focused': {
12
+ boxShadow: string;
13
+ outline: string;
14
+ outlineColor: string;
15
+ outlineOffset: string;
16
+ };
17
+ '&.is-pressed': {
18
+ color: string;
19
+ textDecoration: string;
20
+ };
21
+ '&.is-disabled': {
22
+ pointerEvents: string;
23
+ };
24
+ };
25
+ popover: {
26
+ color: string;
27
+ fontSize: string;
28
+ fontWeight: number;
29
+ textDecoration: string;
30
+ '&.is-hovered': {
31
+ cursor: string;
32
+ };
33
+ fontFamily: string;
34
+ outline: string;
35
+ '&.is-focused': {
36
+ boxShadow: string;
37
+ outline: string;
38
+ outlineColor: string;
39
+ outlineOffset: string;
40
+ };
41
+ '&.is-pressed': {
42
+ color: string;
43
+ textDecoration: string;
44
+ };
45
+ '&.is-disabled': {
46
+ pointerEvents: string;
47
+ };
48
+ };
49
+ web: {
50
+ textDecoration: string;
51
+ '&:visited': {
52
+ color: string;
53
+ };
54
+ '&.is-focused': {
55
+ boxShadow: string;
56
+ outline: string;
57
+ outlineColor: string;
58
+ outlineOffset: string;
59
+ };
60
+ color: string;
61
+ fontFamily: string;
62
+ fontSize: string;
63
+ outline: string;
64
+ '&.is-hovered': {
65
+ textDecoration: string;
66
+ };
67
+ '&.is-pressed': {
68
+ color: string;
69
+ textDecoration: string;
70
+ };
71
+ '&.is-disabled': {
72
+ pointerEvents: string;
73
+ };
74
+ };
75
+ };
76
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './Link';
@@ -3,6 +3,7 @@ export * from './box';
3
3
  export * from './button';
4
4
  export * from './icon';
5
5
  export * from './item';
6
+ export * from './link';
6
7
  export * from './loader';
7
8
  export * from './popoverContainer';
8
9
  export * from './shared';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
3
+ var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11;
4
4
  var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
5
5
  var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
6
6
  var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
@@ -62,8 +62,19 @@ _forEachInstanceProperty(_context5 = _Object$keys(_item)).call(_context5, functi
62
62
  }
63
63
  });
64
64
  });
65
+ var _link = require("./link");
66
+ _forEachInstanceProperty(_context6 = _Object$keys(_link)).call(_context6, function (key) {
67
+ if (key === "default" || key === "__esModule") return;
68
+ if (key in exports && exports[key] === _link[key]) return;
69
+ _Object$defineProperty(exports, key, {
70
+ enumerable: true,
71
+ get: function get() {
72
+ return _link[key];
73
+ }
74
+ });
75
+ });
65
76
  var _loader = require("./loader");
66
- _forEachInstanceProperty(_context6 = _Object$keys(_loader)).call(_context6, function (key) {
77
+ _forEachInstanceProperty(_context7 = _Object$keys(_loader)).call(_context7, function (key) {
67
78
  if (key === "default" || key === "__esModule") return;
68
79
  if (key in exports && exports[key] === _loader[key]) return;
69
80
  _Object$defineProperty(exports, key, {
@@ -74,7 +85,7 @@ _forEachInstanceProperty(_context6 = _Object$keys(_loader)).call(_context6, func
74
85
  });
75
86
  });
76
87
  var _popoverContainer = require("./popoverContainer");
77
- _forEachInstanceProperty(_context7 = _Object$keys(_popoverContainer)).call(_context7, function (key) {
88
+ _forEachInstanceProperty(_context8 = _Object$keys(_popoverContainer)).call(_context8, function (key) {
78
89
  if (key === "default" || key === "__esModule") return;
79
90
  if (key in exports && exports[key] === _popoverContainer[key]) return;
80
91
  _Object$defineProperty(exports, key, {
@@ -85,7 +96,7 @@ _forEachInstanceProperty(_context7 = _Object$keys(_popoverContainer)).call(_cont
85
96
  });
86
97
  });
87
98
  var _shared = require("./shared");
88
- _forEachInstanceProperty(_context8 = _Object$keys(_shared)).call(_context8, function (key) {
99
+ _forEachInstanceProperty(_context9 = _Object$keys(_shared)).call(_context9, function (key) {
89
100
  if (key === "default" || key === "__esModule") return;
90
101
  if (key in exports && exports[key] === _shared[key]) return;
91
102
  _Object$defineProperty(exports, key, {
@@ -96,7 +107,7 @@ _forEachInstanceProperty(_context8 = _Object$keys(_shared)).call(_context8, func
96
107
  });
97
108
  });
98
109
  var _tableCell = require("./tableCell");
99
- _forEachInstanceProperty(_context9 = _Object$keys(_tableCell)).call(_context9, function (key) {
110
+ _forEachInstanceProperty(_context10 = _Object$keys(_tableCell)).call(_context10, function (key) {
100
111
  if (key === "default" || key === "__esModule") return;
101
112
  if (key in exports && exports[key] === _tableCell[key]) return;
102
113
  _Object$defineProperty(exports, key, {
@@ -107,7 +118,7 @@ _forEachInstanceProperty(_context9 = _Object$keys(_tableCell)).call(_context9, f
107
118
  });
108
119
  });
109
120
  var _text = require("./text");
110
- _forEachInstanceProperty(_context10 = _Object$keys(_text)).call(_context10, function (key) {
121
+ _forEachInstanceProperty(_context11 = _Object$keys(_text)).call(_context11, function (key) {
111
122
  if (key === "default" || key === "__esModule") return;
112
123
  if (key in exports && exports[key] === _text[key]) return;
113
124
  _Object$defineProperty(exports, key, {
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { TestingAttributes } from './shared/test';
3
+ type AS = Extract<keyof JSX.IntrinsicElements, 'a' | 'span'> | undefined;
4
+ export interface LinkProps extends TestingAttributes {
5
+ /** Whether the link is disabled. */
6
+ isDisabled?: boolean;
7
+ /** Handler that is called when the press is released over the target. */
8
+ onPress?: () => void;
9
+ /** Specifies the HTML Element */
10
+ as?: AS;
11
+ /** Specifies the location of the URL */
12
+ href?: string;
13
+ /** Specifies the window where the linked page is loaded */
14
+ target?: string;
15
+ /** The styling variation of the link. */
16
+ variant?: string;
17
+ /** Whether the link is clickable inside a popover in safari */
18
+ isSafariCompatible?: boolean;
19
+ className?: string;
20
+ children?: React.ReactNode;
21
+ }
22
+ export {};
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
@@ -4,7 +4,6 @@ var _excluded = ["className", "isDisabled", "onPress", "isSafariCompatible"];
4
4
  import React, { forwardRef, useImperativeHandle, useRef } from 'react';
5
5
  import { mergeProps, useFocusRing, useLink } from 'react-aria';
6
6
  import { useHover, usePress } from '@react-aria/interactions';
7
- import PropTypes from 'prop-types';
8
7
  import { Link as ThemeUILink } from 'theme-ui';
9
8
  import { usePropWarning, useStatusClasses } from '../../hooks';
10
9
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -14,7 +13,7 @@ var Link = /*#__PURE__*/forwardRef(function (props, ref) {
14
13
  onPress = props.onPress,
15
14
  isSafariCompatible = props.isSafariCompatible,
16
15
  others = _objectWithoutProperties(props, _excluded);
17
- var linkRef = useRef();
16
+ var linkRef = useRef(null);
18
17
  usePropWarning(props, 'disabled', 'isDisabled');
19
18
  /* istanbul ignore next */
20
19
  useImperativeHandle(ref, function () {
@@ -55,26 +54,10 @@ var Link = /*#__PURE__*/forwardRef(function (props, ref) {
55
54
  role: "link"
56
55
  }, others, mergeProps(hoverProps, pressProps, linkProps, focusProps)));
57
56
  });
58
- Link.propTypes = {
59
- /** Whether the link is disabled. */
60
- isDisabled: PropTypes.bool,
61
- /** The HTML element used to render the link, e.g. 'a', or 'span'. */
62
- as: PropTypes.string,
63
- /** Handler that is called when the press is released over the target. */
64
- onPress: PropTypes.func,
65
- /** Specifies the location of the URL */
66
- href: PropTypes.string,
67
- /** Specifies the window where the linked page is loaded */
68
- target: PropTypes.string,
69
- /** The styling variation of the link. */
70
- variant: PropTypes.string,
71
- /** Whether the link is clickable inside a popover in safari */
72
- isSafariCompatible: PropTypes.bool
73
- };
74
57
  Link.defaultProps = {
75
58
  isDisabled: false,
76
- as: 'a',
77
- variant: 'app'
59
+ variant: 'app',
60
+ as: 'a'
78
61
  };
79
62
  Link.displayName = 'Link';
80
63
  export default Link;
@@ -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.ts';
8
+ import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
9
9
  import { htmlElements } from '../../utils/devUtils/constants/htmlElements';
10
10
  import LinkReadme from './Link.mdx';
11
11
  import variants from './Link.styles';
@@ -3,6 +3,7 @@ export * from './box';
3
3
  export * from './button';
4
4
  export * from './icon';
5
5
  export * from './item';
6
+ export * from './link';
6
7
  export * from './loader';
7
8
  export * from './popoverContainer';
8
9
  export * from './shared';
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.40.1-alpha.1",
3
+ "version": "2.41.0-alpha.0",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",