@pingux/astro 1.15.0-alpha.3 → 1.15.0-alpha.6

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.
@@ -133,9 +133,9 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
133
133
  alignItems: 'center'
134
134
  },
135
135
  variant: variant
136
- }, others, (0, _utils.mergeProps)(hoverProps, focusProps, _objectSpread(_objectSpread({}, buttonProps), {}, {
136
+ }, others, (0, _utils.mergeProps)(_objectSpread(_objectSpread({}, buttonProps), {}, {
137
137
  tabIndex: tabIndex
138
- }))), isLoading ? (0, _react2.jsx)("span", {
138
+ }), hoverProps, focusProps)), isLoading ? (0, _react2.jsx)("span", {
139
139
  style: {
140
140
  visibility: 'hidden'
141
141
  }
@@ -127,7 +127,7 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
127
127
  fill: chipBg
128
128
  }
129
129
  }
130
- }, (0, _utils.mergeProps)(hoverProps, focusProps, buttonProps, others)), children);
130
+ }, (0, _utils.mergeProps)(buttonProps, others, hoverProps, focusProps)), children);
131
131
 
132
132
  if (title) {
133
133
  return (0, _react2.jsx)(_TooltipTrigger["default"], {
@@ -18,6 +18,8 @@ var _react = _interopRequireDefault(require("react"));
18
18
 
19
19
  var _index = require("../index");
20
20
 
21
+ var _useModalState = _interopRequireDefault(require("../hooks/useModalState"));
22
+
21
23
  var _react2 = require("@emotion/react");
22
24
 
23
25
  var _default = {
@@ -615,7 +617,7 @@ var realtySVG = function realtySVG(props) {
615
617
  }))));
616
618
  };
617
619
 
618
- var Buttons = [{
620
+ var buttons = [{
619
621
  name: 'Retail',
620
622
  icon: retailSVG
621
623
  }, {
@@ -648,8 +650,13 @@ var Buttons = [{
648
650
  }];
649
651
 
650
652
  var Default = function Default() {
651
- return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Modal, {
652
- isOpen: true,
653
+ var state = (0, _useModalState["default"])();
654
+ return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
655
+ onPress: state.open,
656
+ "aria-label": "Open modal"
657
+ }, "Open Modal"), state.isOpen && (0, _react2.jsx)(_index.Modal, {
658
+ isOpen: state.isOpen,
659
+ onClose: state.close,
653
660
  hasCloseButton: true,
654
661
  contentProps: {
655
662
  maxWidth: '880px',
@@ -666,7 +673,7 @@ var Default = function Default() {
666
673
  }, "To further customize your experience, choose an industry that most resembles your own."), (0, _react2.jsx)(_index.Box, {
667
674
  isRow: true,
668
675
  sx: gridContainerStyles
669
- }, (0, _map["default"])(Buttons).call(Buttons, function (button) {
676
+ }, (0, _map["default"])(buttons).call(buttons, function (button) {
670
677
  return (0, _react2.jsx)(_index.Button, {
671
678
  sx: buttonStyle,
672
679
  key: button.name
@@ -0,0 +1,326 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
6
+
7
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
8
+
9
+ var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
10
+
11
+ var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
12
+
13
+ _Object$defineProperty(exports, "__esModule", {
14
+ value: true
15
+ });
16
+
17
+ exports["default"] = exports.Default = void 0;
18
+
19
+ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
20
+
21
+ var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
22
+
23
+ var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
24
+
25
+ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
26
+
27
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
28
+
29
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
30
+
31
+ var _react = _interopRequireWildcard(require("react"));
32
+
33
+ var _CheckCircleIcon = _interopRequireDefault(require("mdi-react/CheckCircleIcon"));
34
+
35
+ var _index = require("../index");
36
+
37
+ var _react2 = require("@emotion/react");
38
+
39
+ 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); }
40
+
41
+ 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; }
42
+
43
+ var _default = {
44
+ title: 'Recipes/TrialExperienceNav'
45
+ };
46
+ exports["default"] = _default;
47
+
48
+ var ArtIcon = function ArtIcon() {
49
+ return (0, _react2.jsx)("svg", {
50
+ width: "24",
51
+ height: "24",
52
+ viewBox: "0 0 24 24",
53
+ xmlns: "http://www.w3.org/2000/svg"
54
+ }, (0, _react2.jsx)("path", {
55
+ d: "M12 24C10.4241 24 8.86371 23.6896 7.4078 23.0866C5.95189 22.4835 4.62902 21.5996 3.51472 20.4853C1.26428 18.2348 0 15.1826 0 12C0 8.8174 1.26428 5.76516 3.51472 3.51472C5.76516 1.26428 8.8174 0 12 0C18.6 0 24 4.8 24 10.8C24 12.7096 23.2414 14.5409 21.8912 15.8912C20.5409 17.2414 18.7096 18 16.8 18H14.64C14.28 18 14.04 18.24 14.04 18.6C14.04 18.72 14.16 18.84 14.16 18.96C14.64 19.56 14.88 20.28 14.88 21C15 22.68 13.68 24 12 24ZM12 2.4C9.45392 2.4 7.01212 3.41143 5.21178 5.21178C3.41143 7.01212 2.4 9.45392 2.4 12C2.4 14.5461 3.41143 16.9879 5.21178 18.7882C7.01212 20.5886 9.45392 21.6 12 21.6C12.36 21.6 12.6 21.36 12.6 21C12.6 20.76 12.48 20.64 12.48 20.52C12 19.92 11.76 19.32 11.76 18.6C11.76 16.92 13.08 15.6 14.76 15.6H16.8C18.073 15.6 19.2939 15.0943 20.1941 14.1941C21.0943 13.2939 21.6 12.073 21.6 10.8C21.6 6.12 17.28 2.4 12 2.4ZM5.4 9.6C6.36 9.6 7.2 10.44 7.2 11.4C7.2 12.36 6.36 13.2 5.4 13.2C4.44 13.2 3.6 12.36 3.6 11.4C3.6 10.44 4.44 9.6 5.4 9.6ZM9 4.8C9.96 4.8 10.8 5.64 10.8 6.6C10.8 7.56 9.96 8.4 9 8.4C8.04 8.4 7.2 7.56 7.2 6.6C7.2 5.64 8.04 4.8 9 4.8ZM15 4.8C15.96 4.8 16.8 5.64 16.8 6.6C16.8 7.56 15.96 8.4 15 8.4C14.04 8.4 13.2 7.56 13.2 6.6C13.2 5.64 14.04 4.8 15 4.8ZM18.6 9.6C19.56 9.6 20.4 10.44 20.4 11.4C20.4 12.36 19.56 13.2 18.6 13.2C17.64 13.2 16.8 12.36 16.8 11.4C16.8 10.44 17.64 9.6 18.6 9.6Z",
56
+ fill: "#4660A2"
57
+ }));
58
+ };
59
+
60
+ var EarthMagnifyGlassIcon = function EarthMagnifyGlassIcon() {
61
+ return (0, _react2.jsx)("svg", {
62
+ width: "25",
63
+ height: "26",
64
+ viewBox: "0 0 25 26",
65
+ xmlns: "http://www.w3.org/2000/svg"
66
+ }, (0, _react2.jsx)("path", {
67
+ d: "M21.0163 18.992C21.483 18.1461 21.833 17.1795 21.833 16.092C21.833 13.0711 19.4997 10.6545 16.583 10.6545C13.6663 10.6545 11.333 13.0711 11.333 16.092C11.333 19.1128 13.6663 21.5295 16.583 21.5295C17.633 21.5295 18.5663 21.167 19.383 20.6836L23.1163 24.5503L24.7497 22.8586L21.0163 18.992ZM16.583 19.1128C14.9497 19.1128 13.6663 17.7836 13.6663 16.092C13.6663 14.4003 14.9497 13.0711 16.583 13.0711C18.2163 13.0711 19.4997 14.4003 19.4997 16.092C19.4997 17.7836 18.2163 19.1128 16.583 19.1128ZM12.4997 22.7378V25.1545C6.05967 25.1545 0.833008 19.7411 0.833008 13.0711C0.833008 6.40113 6.05967 0.987793 12.4997 0.987793C18.1463 0.987793 22.848 5.14446 23.933 10.6545H21.518C20.7713 7.68196 18.718 5.25321 15.9997 4.11738V4.61279C15.9997 5.94196 14.9497 7.02946 13.6663 7.02946H11.333V9.44613C11.333 10.1107 10.808 10.6545 10.1663 10.6545H7.83301V13.0711H10.1663V16.6961H8.99967L3.41134 10.9082C3.25967 11.609 3.16634 12.322 3.16634 13.0711C3.16634 18.3999 7.35467 22.7378 12.4997 22.7378Z",
68
+ fill: "#4660A2"
69
+ }));
70
+ };
71
+
72
+ var EarthCircleIcon = function EarthCircleIcon() {
73
+ return (0, _react2.jsx)("svg", {
74
+ width: "25",
75
+ height: "19",
76
+ viewBox: "0 0 25 19",
77
+ fill: "none",
78
+ xmlns: "http://www.w3.org/2000/svg"
79
+ }, (0, _react2.jsx)("path", {
80
+ d: "M21.1198 12.8144C21.0965 12.8144 21.0848 12.8144 21.0615 12.8261C20.7698 10.8544 19.0898 9.33773 17.0365 9.33773C15.4031 9.33773 14.0031 10.3061 13.3498 11.6944C11.5065 11.7877 10.0365 13.3044 10.0365 15.1711C10.0365 17.1077 11.5998 18.6711 13.5365 18.6711L21.1198 18.6477C22.7298 18.6477 24.0365 17.3411 24.0365 15.7311C24.0365 14.1211 22.7298 12.8144 21.1198 12.8144ZM7.70312 0.307728V2.74606C4.98479 3.71439 3.03646 6.29273 3.03646 9.33773C3.03646 11.4027 3.94646 13.2344 5.36979 14.5177V11.6711H7.70312V18.6711H0.703125V16.3377H3.88812C1.93979 14.6344 0.703125 12.1377 0.703125 9.33773C0.703125 4.98606 3.67812 1.34606 7.70312 0.307728ZM19.3698 2.33773H16.1848C17.8531 3.80773 18.9965 5.84939 19.2881 8.17106H16.9315C16.6631 6.58439 15.8465 5.19606 14.7031 4.15773V7.00439H12.3698V0.00439453H19.3698V2.33773Z",
81
+ fill: "#4660A2"
82
+ }));
83
+ };
84
+
85
+ var RadioButtonIcon = function RadioButtonIcon(props) {
86
+ return (0, _react2.jsx)("svg", (0, _extends2["default"])({
87
+ "data-name": "Layer 1",
88
+ xmlns: "http://www.w3.org/2000/svg",
89
+ viewBox: "0 0 17.5 17.5"
90
+ }, props), (0, _react2.jsx)("path", {
91
+ className: "cls-1",
92
+ fill: "#B3BEE8",
93
+ d: "M9,18.25A8.75,8.75,0,1,1,17.75,9.5,8.76,8.76,0,0,1,9,18.25ZM9,1.75A7.75,7.75,0,1,0,16.75,9.5,7.76,7.76,0,0,0,9,1.75Z",
94
+ transform: "translate(-0.25 -0.75)"
95
+ }), (0, _react2.jsx)("circle", {
96
+ className: "cls-2",
97
+ cx: "8.75",
98
+ cy: "8.75",
99
+ r: "8.05",
100
+ fill: "white"
101
+ }));
102
+ };
103
+
104
+ var data = [{
105
+ title: 'Design a Solution',
106
+ icon: ArtIcon,
107
+ key: 0,
108
+ links: [{
109
+ title: 'Registration'
110
+ }, {
111
+ title: 'Authentication'
112
+ }, {
113
+ title: 'Profile management'
114
+ }, {
115
+ title: 'Experience your solution'
116
+ }]
117
+ }, {
118
+ title: 'Explore & Customize',
119
+ icon: EarthMagnifyGlassIcon,
120
+ key: 1,
121
+ links: [{
122
+ title: 'Edit a user'
123
+ }, {
124
+ title: 'Update password policies'
125
+ }, {
126
+ title: 'Edit agreements'
127
+ }, {
128
+ title: 'Edit notifications'
129
+ }]
130
+ }, {
131
+ title: 'Orchestrate & Integrate',
132
+ icon: EarthCircleIcon,
133
+ key: 2,
134
+ links: [{
135
+ title: 'Learn about DaVinci'
136
+ }, {
137
+ title: 'View a workflow'
138
+ }]
139
+ }];
140
+
141
+ var Stage = function Stage(props) {
142
+ var title = props.title,
143
+ icon = props.icon,
144
+ links = props.links,
145
+ isLastStage = props.isLastStage;
146
+
147
+ var _useState = (0, _react.useState)([]),
148
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
149
+ selectedLinks = _useState2[0],
150
+ updateSelectedLinks = _useState2[1];
151
+
152
+ var onSelectionChange = function onSelectionChange(thisIndex) {
153
+ var _context2;
154
+
155
+ var newArray = [];
156
+
157
+ if ((0, _includes["default"])(selectedLinks).call(selectedLinks, thisIndex)) {
158
+ newArray = (0, _filter["default"])(selectedLinks).call(selectedLinks, function (link) {
159
+ return link !== thisIndex;
160
+ });
161
+ } else {
162
+ var _context;
163
+
164
+ newArray = (0, _concat["default"])(_context = []).call(_context, selectedLinks, [thisIndex]);
165
+ }
166
+
167
+ updateSelectedLinks((0, _concat["default"])(_context2 = []).call(_context2, newArray));
168
+ };
169
+
170
+ return (0, _react2.jsx)(_index.Box, {
171
+ isRow: true
172
+ }, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
173
+ minWidth: "39.5px",
174
+ minHeight: "39.5px",
175
+ sx: {
176
+ backgroundColor: 'accent.80',
177
+ alignItems: 'center',
178
+ justifyContent: 'center',
179
+ mr: '10px',
180
+ borderRadius: '50%',
181
+ zIndex: 3
182
+ }
183
+ }, (0, _react2.jsx)(_index.Icon, {
184
+ icon: icon,
185
+ color: "accent.40",
186
+ size: "24px",
187
+ sx: {
188
+ zIndex: 3
189
+ }
190
+ })), !isLastStage && (0, _react2.jsx)(_index.Separator, {
191
+ sx: {
192
+ flexGrow: 1,
193
+ backgroundColor: 'accent.80',
194
+ maxHeight: '100%',
195
+ width: '6px !important',
196
+ zIndex: 2,
197
+ m: '0px 5px 0px 17px !important'
198
+ },
199
+ orientation: "vertical"
200
+ })), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
201
+ sx: {
202
+ fontSize: '15px',
203
+ color: 'accent.30',
204
+ lineHeight: '18px',
205
+ fontWeight: '3',
206
+ m: '12px 0px 28px 5px',
207
+ maxWidth: '195px'
208
+ }
209
+ }, title), (0, _react2.jsx)(_index.Box, {
210
+ pl: "0px",
211
+ mb: "25px"
212
+ }, (0, _map["default"])(links).call(links, function (link, index) {
213
+ return (0, _react2.jsx)(LinkRow, (0, _extends2["default"])({}, link, {
214
+ onSelectionChange: onSelectionChange,
215
+ index: index,
216
+ isLinkSelected: selectedLinks.length !== 0,
217
+ isLastLink: index === links.length - 1,
218
+ key: link.title
219
+ }));
220
+ }))));
221
+ };
222
+
223
+ var LinkRow = function LinkRow(props) {
224
+ var title = props.title,
225
+ index = props.index,
226
+ onSelectionChange = props.onSelectionChange,
227
+ isLinkSelected = props.isLinkSelected,
228
+ isLastLink = props.isLastLink;
229
+
230
+ var _useState3 = (0, _react.useState)(false),
231
+ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
232
+ isSelected = _useState4[0],
233
+ handleSelectionChange = _useState4[1];
234
+
235
+ var onIconPress = function onIconPress() {
236
+ handleSelectionChange(!isSelected);
237
+ onSelectionChange(index);
238
+ };
239
+
240
+ return (0, _react2.jsx)(_index.Box, {
241
+ isRow: true
242
+ }, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
243
+ sx: {
244
+ height: '23.5px',
245
+ width: '23.5px'
246
+ }
247
+ }, (0, _react2.jsx)(_index.IconButton, {
248
+ onPress: onIconPress,
249
+ sx: {
250
+ '&.is-pressed': {
251
+ backgroundColor: 'transparent'
252
+ },
253
+ '&.is-pressed > svg > path': {
254
+ fill: 'accent.30'
255
+ },
256
+ '&.is-hovered': {
257
+ backgroundColor: 'transparent'
258
+ }
259
+ },
260
+ "aria-label": "completed step icon indicator"
261
+ }, (0, _react2.jsx)(_index.Icon, {
262
+ icon: isSelected ? _CheckCircleIcon["default"] : RadioButtonIcon,
263
+ size: isSelected ? '20px' : '18px',
264
+ sx: isSelected ? {
265
+ zIndex: 3,
266
+ 'path': {
267
+ fill: 'accent.30'
268
+ }
269
+ } : {
270
+ zIndex: 3,
271
+ 'path': {
272
+ fill: 'accent.80'
273
+ }
274
+ }
275
+ }))), !isLastLink && isLinkSelected && (0, _react2.jsx)(_index.Separator, {
276
+ sx: {
277
+ flexGrow: 1,
278
+ backgroundColor: 'accent.30',
279
+ maxHeight: '100%',
280
+ width: '1px !important',
281
+ zIndex: 2,
282
+ m: '-5px 5px -5px 11.5px !important'
283
+ },
284
+ orientation: "vertical"
285
+ })), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Link, {
286
+ href: "https://www.pingidentity.com",
287
+ target: "_blank",
288
+ sx: {
289
+ fontSize: '15px',
290
+ color: '#163CE3',
291
+ lineHeight: '18px',
292
+ fontWeight: '0',
293
+ m: '3px 0px 20px 10px',
294
+ maxWidth: '140px'
295
+ }
296
+ }, title)));
297
+ };
298
+
299
+ var Default = function Default() {
300
+ // Open the `Story` addons tab to view the source code for full context.
301
+ return (0, _react2.jsx)(_index.Box, {
302
+ as: "nav",
303
+ backgroundColor: "accent.95",
304
+ width: "280px",
305
+ sx: {
306
+ p: '15px 15px 0px 15px',
307
+ width: '280px',
308
+ backgroundColor: 'accent.95',
309
+ borderRadius: '8px',
310
+ zIndex: 1,
311
+ boxShadow: '3px 8px 4px rgba(202, 206, 211, 0.36)'
312
+ }
313
+ }, (0, _react2.jsx)(_index.Box, {
314
+ paddingLeft: "0px"
315
+ }, (0, _map["default"])(data).call(data, function (stage, index) {
316
+ return (0, _react2.jsx)(Stage, {
317
+ title: stage.title,
318
+ icon: stage.icon,
319
+ links: stage.links,
320
+ isLastStage: index === data.length - 1,
321
+ key: stage.title
322
+ });
323
+ })));
324
+ };
325
+
326
+ exports.Default = Default;
@@ -95,9 +95,9 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
95
95
  alignItems: 'center'
96
96
  },
97
97
  variant: variant
98
- }, others, mergeProps(hoverProps, focusProps, _objectSpread(_objectSpread({}, buttonProps), {}, {
98
+ }, others, mergeProps(_objectSpread(_objectSpread({}, buttonProps), {}, {
99
99
  tabIndex: tabIndex
100
- }))), isLoading ? ___EmotionJSX("span", {
100
+ }), hoverProps, focusProps)), isLoading ? ___EmotionJSX("span", {
101
101
  style: {
102
102
  visibility: 'hidden'
103
103
  }
@@ -90,7 +90,7 @@ var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
90
90
  fill: chipBg
91
91
  }
92
92
  }
93
- }, mergeProps(hoverProps, focusProps, buttonProps, others)), children);
93
+ }, mergeProps(buttonProps, others, hoverProps, focusProps)), children);
94
94
 
95
95
  if (title) {
96
96
  return ___EmotionJSX(TooltipTrigger, {
@@ -2,6 +2,7 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance
2
2
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import { Box, Button, HelpHint, Icon, Modal, OverlayProvider, Text } from '../index';
5
+ import useModalState from '../hooks/useModalState';
5
6
  import { jsx as ___EmotionJSX } from "@emotion/react";
6
7
  export default {
7
8
  title: 'Recipes/TrialExperienceButtons'
@@ -597,7 +598,7 @@ var realtySVG = function realtySVG(props) {
597
598
  }))));
598
599
  };
599
600
 
600
- var Buttons = [{
601
+ var buttons = [{
601
602
  name: 'Retail',
602
603
  icon: retailSVG
603
604
  }, {
@@ -629,8 +630,13 @@ var Buttons = [{
629
630
  icon: hotelSVG
630
631
  }];
631
632
  export var Default = function Default() {
632
- return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Modal, {
633
- isOpen: true,
633
+ var state = useModalState();
634
+ return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
635
+ onPress: state.open,
636
+ "aria-label": "Open modal"
637
+ }, "Open Modal"), state.isOpen && ___EmotionJSX(Modal, {
638
+ isOpen: state.isOpen,
639
+ onClose: state.close,
634
640
  hasCloseButton: true,
635
641
  contentProps: {
636
642
  maxWidth: '880px',
@@ -647,7 +653,7 @@ export var Default = function Default() {
647
653
  }, "To further customize your experience, choose an industry that most resembles your own."), ___EmotionJSX(Box, {
648
654
  isRow: true,
649
655
  sx: gridContainerStyles
650
- }, _mapInstanceProperty(Buttons).call(Buttons, function (button) {
656
+ }, _mapInstanceProperty(buttons).call(buttons, function (button) {
651
657
  return ___EmotionJSX(Button, {
652
658
  sx: buttonStyle,
653
659
  key: button.name
@@ -0,0 +1,291 @@
1
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
2
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
3
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
+ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
5
+ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
6
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
7
+ import React, { useState } from 'react';
8
+ import CheckCircleIcon from 'mdi-react/CheckCircleIcon';
9
+ import { IconButton, Link, Box, Icon, Text, Separator } from '../index';
10
+ import { jsx as ___EmotionJSX } from "@emotion/react";
11
+ export default {
12
+ title: 'Recipes/TrialExperienceNav'
13
+ };
14
+
15
+ var ArtIcon = function ArtIcon() {
16
+ return ___EmotionJSX("svg", {
17
+ width: "24",
18
+ height: "24",
19
+ viewBox: "0 0 24 24",
20
+ xmlns: "http://www.w3.org/2000/svg"
21
+ }, ___EmotionJSX("path", {
22
+ d: "M12 24C10.4241 24 8.86371 23.6896 7.4078 23.0866C5.95189 22.4835 4.62902 21.5996 3.51472 20.4853C1.26428 18.2348 0 15.1826 0 12C0 8.8174 1.26428 5.76516 3.51472 3.51472C5.76516 1.26428 8.8174 0 12 0C18.6 0 24 4.8 24 10.8C24 12.7096 23.2414 14.5409 21.8912 15.8912C20.5409 17.2414 18.7096 18 16.8 18H14.64C14.28 18 14.04 18.24 14.04 18.6C14.04 18.72 14.16 18.84 14.16 18.96C14.64 19.56 14.88 20.28 14.88 21C15 22.68 13.68 24 12 24ZM12 2.4C9.45392 2.4 7.01212 3.41143 5.21178 5.21178C3.41143 7.01212 2.4 9.45392 2.4 12C2.4 14.5461 3.41143 16.9879 5.21178 18.7882C7.01212 20.5886 9.45392 21.6 12 21.6C12.36 21.6 12.6 21.36 12.6 21C12.6 20.76 12.48 20.64 12.48 20.52C12 19.92 11.76 19.32 11.76 18.6C11.76 16.92 13.08 15.6 14.76 15.6H16.8C18.073 15.6 19.2939 15.0943 20.1941 14.1941C21.0943 13.2939 21.6 12.073 21.6 10.8C21.6 6.12 17.28 2.4 12 2.4ZM5.4 9.6C6.36 9.6 7.2 10.44 7.2 11.4C7.2 12.36 6.36 13.2 5.4 13.2C4.44 13.2 3.6 12.36 3.6 11.4C3.6 10.44 4.44 9.6 5.4 9.6ZM9 4.8C9.96 4.8 10.8 5.64 10.8 6.6C10.8 7.56 9.96 8.4 9 8.4C8.04 8.4 7.2 7.56 7.2 6.6C7.2 5.64 8.04 4.8 9 4.8ZM15 4.8C15.96 4.8 16.8 5.64 16.8 6.6C16.8 7.56 15.96 8.4 15 8.4C14.04 8.4 13.2 7.56 13.2 6.6C13.2 5.64 14.04 4.8 15 4.8ZM18.6 9.6C19.56 9.6 20.4 10.44 20.4 11.4C20.4 12.36 19.56 13.2 18.6 13.2C17.64 13.2 16.8 12.36 16.8 11.4C16.8 10.44 17.64 9.6 18.6 9.6Z",
23
+ fill: "#4660A2"
24
+ }));
25
+ };
26
+
27
+ var EarthMagnifyGlassIcon = function EarthMagnifyGlassIcon() {
28
+ return ___EmotionJSX("svg", {
29
+ width: "25",
30
+ height: "26",
31
+ viewBox: "0 0 25 26",
32
+ xmlns: "http://www.w3.org/2000/svg"
33
+ }, ___EmotionJSX("path", {
34
+ d: "M21.0163 18.992C21.483 18.1461 21.833 17.1795 21.833 16.092C21.833 13.0711 19.4997 10.6545 16.583 10.6545C13.6663 10.6545 11.333 13.0711 11.333 16.092C11.333 19.1128 13.6663 21.5295 16.583 21.5295C17.633 21.5295 18.5663 21.167 19.383 20.6836L23.1163 24.5503L24.7497 22.8586L21.0163 18.992ZM16.583 19.1128C14.9497 19.1128 13.6663 17.7836 13.6663 16.092C13.6663 14.4003 14.9497 13.0711 16.583 13.0711C18.2163 13.0711 19.4997 14.4003 19.4997 16.092C19.4997 17.7836 18.2163 19.1128 16.583 19.1128ZM12.4997 22.7378V25.1545C6.05967 25.1545 0.833008 19.7411 0.833008 13.0711C0.833008 6.40113 6.05967 0.987793 12.4997 0.987793C18.1463 0.987793 22.848 5.14446 23.933 10.6545H21.518C20.7713 7.68196 18.718 5.25321 15.9997 4.11738V4.61279C15.9997 5.94196 14.9497 7.02946 13.6663 7.02946H11.333V9.44613C11.333 10.1107 10.808 10.6545 10.1663 10.6545H7.83301V13.0711H10.1663V16.6961H8.99967L3.41134 10.9082C3.25967 11.609 3.16634 12.322 3.16634 13.0711C3.16634 18.3999 7.35467 22.7378 12.4997 22.7378Z",
35
+ fill: "#4660A2"
36
+ }));
37
+ };
38
+
39
+ var EarthCircleIcon = function EarthCircleIcon() {
40
+ return ___EmotionJSX("svg", {
41
+ width: "25",
42
+ height: "19",
43
+ viewBox: "0 0 25 19",
44
+ fill: "none",
45
+ xmlns: "http://www.w3.org/2000/svg"
46
+ }, ___EmotionJSX("path", {
47
+ d: "M21.1198 12.8144C21.0965 12.8144 21.0848 12.8144 21.0615 12.8261C20.7698 10.8544 19.0898 9.33773 17.0365 9.33773C15.4031 9.33773 14.0031 10.3061 13.3498 11.6944C11.5065 11.7877 10.0365 13.3044 10.0365 15.1711C10.0365 17.1077 11.5998 18.6711 13.5365 18.6711L21.1198 18.6477C22.7298 18.6477 24.0365 17.3411 24.0365 15.7311C24.0365 14.1211 22.7298 12.8144 21.1198 12.8144ZM7.70312 0.307728V2.74606C4.98479 3.71439 3.03646 6.29273 3.03646 9.33773C3.03646 11.4027 3.94646 13.2344 5.36979 14.5177V11.6711H7.70312V18.6711H0.703125V16.3377H3.88812C1.93979 14.6344 0.703125 12.1377 0.703125 9.33773C0.703125 4.98606 3.67812 1.34606 7.70312 0.307728ZM19.3698 2.33773H16.1848C17.8531 3.80773 18.9965 5.84939 19.2881 8.17106H16.9315C16.6631 6.58439 15.8465 5.19606 14.7031 4.15773V7.00439H12.3698V0.00439453H19.3698V2.33773Z",
48
+ fill: "#4660A2"
49
+ }));
50
+ };
51
+
52
+ var RadioButtonIcon = function RadioButtonIcon(props) {
53
+ return ___EmotionJSX("svg", _extends({
54
+ "data-name": "Layer 1",
55
+ xmlns: "http://www.w3.org/2000/svg",
56
+ viewBox: "0 0 17.5 17.5"
57
+ }, props), ___EmotionJSX("path", {
58
+ className: "cls-1",
59
+ fill: "#B3BEE8",
60
+ d: "M9,18.25A8.75,8.75,0,1,1,17.75,9.5,8.76,8.76,0,0,1,9,18.25ZM9,1.75A7.75,7.75,0,1,0,16.75,9.5,7.76,7.76,0,0,0,9,1.75Z",
61
+ transform: "translate(-0.25 -0.75)"
62
+ }), ___EmotionJSX("circle", {
63
+ className: "cls-2",
64
+ cx: "8.75",
65
+ cy: "8.75",
66
+ r: "8.05",
67
+ fill: "white"
68
+ }));
69
+ };
70
+
71
+ var data = [{
72
+ title: 'Design a Solution',
73
+ icon: ArtIcon,
74
+ key: 0,
75
+ links: [{
76
+ title: 'Registration'
77
+ }, {
78
+ title: 'Authentication'
79
+ }, {
80
+ title: 'Profile management'
81
+ }, {
82
+ title: 'Experience your solution'
83
+ }]
84
+ }, {
85
+ title: 'Explore & Customize',
86
+ icon: EarthMagnifyGlassIcon,
87
+ key: 1,
88
+ links: [{
89
+ title: 'Edit a user'
90
+ }, {
91
+ title: 'Update password policies'
92
+ }, {
93
+ title: 'Edit agreements'
94
+ }, {
95
+ title: 'Edit notifications'
96
+ }]
97
+ }, {
98
+ title: 'Orchestrate & Integrate',
99
+ icon: EarthCircleIcon,
100
+ key: 2,
101
+ links: [{
102
+ title: 'Learn about DaVinci'
103
+ }, {
104
+ title: 'View a workflow'
105
+ }]
106
+ }];
107
+
108
+ var Stage = function Stage(props) {
109
+ var title = props.title,
110
+ icon = props.icon,
111
+ links = props.links,
112
+ isLastStage = props.isLastStage;
113
+
114
+ var _useState = useState([]),
115
+ _useState2 = _slicedToArray(_useState, 2),
116
+ selectedLinks = _useState2[0],
117
+ updateSelectedLinks = _useState2[1];
118
+
119
+ var onSelectionChange = function onSelectionChange(thisIndex) {
120
+ var _context2;
121
+
122
+ var newArray = [];
123
+
124
+ if (_includesInstanceProperty(selectedLinks).call(selectedLinks, thisIndex)) {
125
+ newArray = _filterInstanceProperty(selectedLinks).call(selectedLinks, function (link) {
126
+ return link !== thisIndex;
127
+ });
128
+ } else {
129
+ var _context;
130
+
131
+ newArray = _concatInstanceProperty(_context = []).call(_context, selectedLinks, [thisIndex]);
132
+ }
133
+
134
+ updateSelectedLinks(_concatInstanceProperty(_context2 = []).call(_context2, newArray));
135
+ };
136
+
137
+ return ___EmotionJSX(Box, {
138
+ isRow: true
139
+ }, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
140
+ minWidth: "39.5px",
141
+ minHeight: "39.5px",
142
+ sx: {
143
+ backgroundColor: 'accent.80',
144
+ alignItems: 'center',
145
+ justifyContent: 'center',
146
+ mr: '10px',
147
+ borderRadius: '50%',
148
+ zIndex: 3
149
+ }
150
+ }, ___EmotionJSX(Icon, {
151
+ icon: icon,
152
+ color: "accent.40",
153
+ size: "24px",
154
+ sx: {
155
+ zIndex: 3
156
+ }
157
+ })), !isLastStage && ___EmotionJSX(Separator, {
158
+ sx: {
159
+ flexGrow: 1,
160
+ backgroundColor: 'accent.80',
161
+ maxHeight: '100%',
162
+ width: '6px !important',
163
+ zIndex: 2,
164
+ m: '0px 5px 0px 17px !important'
165
+ },
166
+ orientation: "vertical"
167
+ })), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
168
+ sx: {
169
+ fontSize: '15px',
170
+ color: 'accent.30',
171
+ lineHeight: '18px',
172
+ fontWeight: '3',
173
+ m: '12px 0px 28px 5px',
174
+ maxWidth: '195px'
175
+ }
176
+ }, title), ___EmotionJSX(Box, {
177
+ pl: "0px",
178
+ mb: "25px"
179
+ }, _mapInstanceProperty(links).call(links, function (link, index) {
180
+ return ___EmotionJSX(LinkRow, _extends({}, link, {
181
+ onSelectionChange: onSelectionChange,
182
+ index: index,
183
+ isLinkSelected: selectedLinks.length !== 0,
184
+ isLastLink: index === links.length - 1,
185
+ key: link.title
186
+ }));
187
+ }))));
188
+ };
189
+
190
+ var LinkRow = function LinkRow(props) {
191
+ var title = props.title,
192
+ index = props.index,
193
+ onSelectionChange = props.onSelectionChange,
194
+ isLinkSelected = props.isLinkSelected,
195
+ isLastLink = props.isLastLink;
196
+
197
+ var _useState3 = useState(false),
198
+ _useState4 = _slicedToArray(_useState3, 2),
199
+ isSelected = _useState4[0],
200
+ handleSelectionChange = _useState4[1];
201
+
202
+ var onIconPress = function onIconPress() {
203
+ handleSelectionChange(!isSelected);
204
+ onSelectionChange(index);
205
+ };
206
+
207
+ return ___EmotionJSX(Box, {
208
+ isRow: true
209
+ }, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
210
+ sx: {
211
+ height: '23.5px',
212
+ width: '23.5px'
213
+ }
214
+ }, ___EmotionJSX(IconButton, {
215
+ onPress: onIconPress,
216
+ sx: {
217
+ '&.is-pressed': {
218
+ backgroundColor: 'transparent'
219
+ },
220
+ '&.is-pressed > svg > path': {
221
+ fill: 'accent.30'
222
+ },
223
+ '&.is-hovered': {
224
+ backgroundColor: 'transparent'
225
+ }
226
+ },
227
+ "aria-label": "completed step icon indicator"
228
+ }, ___EmotionJSX(Icon, {
229
+ icon: isSelected ? CheckCircleIcon : RadioButtonIcon,
230
+ size: isSelected ? '20px' : '18px',
231
+ sx: isSelected ? {
232
+ zIndex: 3,
233
+ 'path': {
234
+ fill: 'accent.30'
235
+ }
236
+ } : {
237
+ zIndex: 3,
238
+ 'path': {
239
+ fill: 'accent.80'
240
+ }
241
+ }
242
+ }))), !isLastLink && isLinkSelected && ___EmotionJSX(Separator, {
243
+ sx: {
244
+ flexGrow: 1,
245
+ backgroundColor: 'accent.30',
246
+ maxHeight: '100%',
247
+ width: '1px !important',
248
+ zIndex: 2,
249
+ m: '-5px 5px -5px 11.5px !important'
250
+ },
251
+ orientation: "vertical"
252
+ })), ___EmotionJSX(Box, null, ___EmotionJSX(Link, {
253
+ href: "https://www.pingidentity.com",
254
+ target: "_blank",
255
+ sx: {
256
+ fontSize: '15px',
257
+ color: '#163CE3',
258
+ lineHeight: '18px',
259
+ fontWeight: '0',
260
+ m: '3px 0px 20px 10px',
261
+ maxWidth: '140px'
262
+ }
263
+ }, title)));
264
+ };
265
+
266
+ export var Default = function Default() {
267
+ // Open the `Story` addons tab to view the source code for full context.
268
+ return ___EmotionJSX(Box, {
269
+ as: "nav",
270
+ backgroundColor: "accent.95",
271
+ width: "280px",
272
+ sx: {
273
+ p: '15px 15px 0px 15px',
274
+ width: '280px',
275
+ backgroundColor: 'accent.95',
276
+ borderRadius: '8px',
277
+ zIndex: 1,
278
+ boxShadow: '3px 8px 4px rgba(202, 206, 211, 0.36)'
279
+ }
280
+ }, ___EmotionJSX(Box, {
281
+ paddingLeft: "0px"
282
+ }, _mapInstanceProperty(data).call(data, function (stage, index) {
283
+ return ___EmotionJSX(Stage, {
284
+ title: stage.title,
285
+ icon: stage.icon,
286
+ links: stage.links,
287
+ isLastStage: index === data.length - 1,
288
+ key: stage.title
289
+ });
290
+ })));
291
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.15.0-alpha.3",
3
+ "version": "1.15.0-alpha.6",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",