@pingux/astro 2.65.1-alpha.0 → 2.66.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.
@@ -19,6 +19,7 @@ var _react = _interopRequireWildcard(require("react"));
19
19
  var _reactAria = require("react-aria");
20
20
  var _reactStately = require("react-stately");
21
21
  var _interactions = require("@react-aria/interactions");
22
+ var _uuid = require("uuid");
22
23
  var _ = require("../..");
23
24
  var _hooks = require("../../hooks");
24
25
  var _safariAgent = require("../../styles/safariAgent");
@@ -27,15 +28,16 @@ var _excluded = ["align", "arrowCrossOffset", "children", "className", "closeDel
27
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
28
29
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
30
  var HelpIcon = function HelpIcon() {
31
+ var uid = (0, _uuid.v4)();
30
32
  return (0, _react2.jsx)("svg", {
31
33
  width: "7",
32
34
  height: "9",
33
35
  viewBox: "0 0 7 9",
34
36
  fill: "none",
35
37
  xmlns: "http://www.w3.org/2000/svg",
36
- "aria-labelledby": "help-icon-title"
38
+ "aria-labelledby": uid
37
39
  }, (0, _react2.jsx)("title", {
38
- id: "help-icon-title"
40
+ id: uid
39
41
  }, "Help Icon"), (0, _react2.jsx)("path", {
40
42
  d: "M2.56685 7.306V9H4.29385V7.306H2.56685ZM0.795848 3.676H2.41285C2.41285 3.478 2.43485 3.29467 2.47885 3.126C2.52285 2.95 2.58885 2.79967 2.67685 2.675C2.77218 2.543 2.88951 2.44033 3.02885 2.367C3.17551 2.28633 3.34785 2.246 3.54585 2.246C3.83918 2.246 4.06651 2.32667 4.22785 2.488C4.39651 2.64933 4.48085 2.89867 4.48085 3.236C4.48818 3.434 4.45151 3.599 4.37085 3.731C4.29751 3.863 4.19851 3.984 4.07385 4.094C3.94918 4.204 3.81351 4.314 3.66685 4.424C3.52018 4.534 3.38085 4.666 3.24885 4.82C3.11685 4.96667 2.99951 5.14633 2.89685 5.359C2.80151 5.57167 2.74285 5.83567 2.72085 6.151V6.646H4.20585V6.228C4.23518 6.008 4.30485 5.82467 4.41485 5.678C4.53218 5.53133 4.66418 5.403 4.81085 5.293C4.95751 5.17567 5.11151 5.062 5.27285 4.952C5.44151 4.83467 5.59185 4.69533 5.72385 4.534C5.86318 4.37267 5.97685 4.17833 6.06485 3.951C6.16018 3.72367 6.20785 3.434 6.20785 3.082C6.20785 2.86933 6.16018 2.642 6.06485 2.4C5.97685 2.15067 5.82651 1.91967 5.61385 1.707C5.40118 1.49433 5.11885 1.31833 4.76685 1.179C4.42218 1.03233 3.98951 0.959 3.46885 0.959C3.06551 0.959 2.69885 1.02867 2.36885 1.168C2.04618 1.3 1.76751 1.487 1.53285 1.729C1.30551 1.971 1.12585 2.257 0.993848 2.587C0.869181 2.917 0.803181 3.28 0.795848 3.676Z",
41
43
  fill: "#3B4A58"
@@ -100,13 +102,13 @@ var HelpHint = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
100
102
  return function () {
101
103
  clearTimeout(timeout);
102
104
  };
103
- }, [isFocusWithinOverlay, isFocusVisible, isOverlayHovered, isTriggerHovered]);
105
+ }, [isFocusWithinOverlay, isFocusVisible, isOverlayHovered, isTriggerHovered, close, closeDelay, open]);
104
106
  (0, _react.useEffect)(function () {
105
107
  if (isOpen) {
106
108
  return triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current.setAttribute('aria-expanded', 'true');
107
109
  }
108
110
  return triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current.setAttribute('aria-expanded', 'false');
109
- }, [isOpen]);
111
+ }, [isOpen, triggerRef]);
110
112
  var _useOverlayPosition = (0, _reactAria.useOverlayPosition)({
111
113
  targetRef: triggerRef,
112
114
  overlayRef: overlayRef,
@@ -9,20 +9,22 @@ import React, { forwardRef, useEffect, useRef, useState } from 'react';
9
9
  import { FocusScope, mergeProps, useFocusRing, useFocusWithin, useOverlayPosition, useOverlayTrigger } from 'react-aria';
10
10
  import { useOverlayTriggerState } from 'react-stately';
11
11
  import { useHover } from '@react-aria/interactions';
12
+ import { v4 as uuid } from 'uuid';
12
13
  import { Box, Icon, IconButton, PopoverContainer } from '../..';
13
14
  import { useLocalOrForwardRef, useStatusClasses } from '../../hooks';
14
15
  import { isSafari } from '../../styles/safariAgent';
15
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
16
17
  var HelpIcon = function HelpIcon() {
18
+ var uid = uuid();
17
19
  return ___EmotionJSX("svg", {
18
20
  width: "7",
19
21
  height: "9",
20
22
  viewBox: "0 0 7 9",
21
23
  fill: "none",
22
24
  xmlns: "http://www.w3.org/2000/svg",
23
- "aria-labelledby": "help-icon-title"
25
+ "aria-labelledby": uid
24
26
  }, ___EmotionJSX("title", {
25
- id: "help-icon-title"
27
+ id: uid
26
28
  }, "Help Icon"), ___EmotionJSX("path", {
27
29
  d: "M2.56685 7.306V9H4.29385V7.306H2.56685ZM0.795848 3.676H2.41285C2.41285 3.478 2.43485 3.29467 2.47885 3.126C2.52285 2.95 2.58885 2.79967 2.67685 2.675C2.77218 2.543 2.88951 2.44033 3.02885 2.367C3.17551 2.28633 3.34785 2.246 3.54585 2.246C3.83918 2.246 4.06651 2.32667 4.22785 2.488C4.39651 2.64933 4.48085 2.89867 4.48085 3.236C4.48818 3.434 4.45151 3.599 4.37085 3.731C4.29751 3.863 4.19851 3.984 4.07385 4.094C3.94918 4.204 3.81351 4.314 3.66685 4.424C3.52018 4.534 3.38085 4.666 3.24885 4.82C3.11685 4.96667 2.99951 5.14633 2.89685 5.359C2.80151 5.57167 2.74285 5.83567 2.72085 6.151V6.646H4.20585V6.228C4.23518 6.008 4.30485 5.82467 4.41485 5.678C4.53218 5.53133 4.66418 5.403 4.81085 5.293C4.95751 5.17567 5.11151 5.062 5.27285 4.952C5.44151 4.83467 5.59185 4.69533 5.72385 4.534C5.86318 4.37267 5.97685 4.17833 6.06485 3.951C6.16018 3.72367 6.20785 3.434 6.20785 3.082C6.20785 2.86933 6.16018 2.642 6.06485 2.4C5.97685 2.15067 5.82651 1.91967 5.61385 1.707C5.40118 1.49433 5.11885 1.31833 4.76685 1.179C4.42218 1.03233 3.98951 0.959 3.46885 0.959C3.06551 0.959 2.69885 1.02867 2.36885 1.168C2.04618 1.3 1.76751 1.487 1.53285 1.729C1.30551 1.971 1.12585 2.257 0.993848 2.587C0.869181 2.917 0.803181 3.28 0.795848 3.676Z",
28
30
  fill: "#3B4A58"
@@ -87,13 +89,13 @@ var HelpHint = /*#__PURE__*/forwardRef(function (props, ref) {
87
89
  return function () {
88
90
  clearTimeout(timeout);
89
91
  };
90
- }, [isFocusWithinOverlay, isFocusVisible, isOverlayHovered, isTriggerHovered]);
92
+ }, [isFocusWithinOverlay, isFocusVisible, isOverlayHovered, isTriggerHovered, close, closeDelay, open]);
91
93
  useEffect(function () {
92
94
  if (isOpen) {
93
95
  return triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current.setAttribute('aria-expanded', 'true');
94
96
  }
95
97
  return triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current.setAttribute('aria-expanded', 'false');
96
- }, [isOpen]);
98
+ }, [isOpen, triggerRef]);
97
99
  var _useOverlayPosition = useOverlayPosition({
98
100
  targetRef: triggerRef,
99
101
  overlayRef: overlayRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.65.1-alpha.0",
3
+ "version": "2.66.0-alpha.0",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",