@pingux/astro 2.17.0-alpha.0 → 2.17.0-alpha.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.17.0-alpha.0",
3
+ "version": "2.17.0-alpha.1",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,133 +0,0 @@
1
- "use strict";
2
-
3
- var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
4
- var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
5
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
- var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
7
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
8
- _Object$defineProperty(exports, "__esModule", {
9
- value: true
10
- });
11
- exports["default"] = exports.Default = void 0;
12
- var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
13
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
14
- var _react = _interopRequireWildcard(require("react"));
15
- var _CloseIcon = _interopRequireDefault(require("@pingux/mdi-react/CloseIcon"));
16
- var _index = require("../index");
17
- var _react2 = require("@emotion/react");
18
- 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); }
19
- 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; }
20
- var _default = {
21
- title: 'Recipes/Radio Buttons with Links'
22
- };
23
- exports["default"] = _default;
24
- var Default = function Default() {
25
- var roles = [{
26
- name: 'Client Application Developer'
27
- }, {
28
- name: 'Environment Admin',
29
- isDisabled: true
30
- }, {
31
- name: 'Identity Data Admin',
32
- isDisabled: true
33
- }, {
34
- name: 'Organization Admin'
35
- }];
36
- var titleSx = {
37
- fontSize: 'md',
38
- color: 'neutral.20',
39
- fontWeight: 2
40
- };
41
- var subtitleSx = {
42
- fontSize: 'md',
43
- color: 'neutral.10'
44
- };
45
- var RadioFieldWithButton = function RadioFieldWithButton(_ref) {
46
- var fieldName = _ref.fieldName,
47
- isDisabled = _ref.isDisabled;
48
- var _useState = (0, _react.useState)(false),
49
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
50
- isOpen = _useState2[0],
51
- setIsOpen = _useState2[1];
52
- return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
53
- isRow: true,
54
- alignItems: "center"
55
- }, (0, _react2.jsx)(_index.RadioField, {
56
- value: fieldName,
57
- label: fieldName,
58
- isDisabled: isDisabled
59
- }), (0, _react2.jsx)(_index.Button, {
60
- variant: "link",
61
- mb: "xs",
62
- ml: "md",
63
- onPress: function onPress() {
64
- return setIsOpen(function (prev) {
65
- return !prev;
66
- });
67
- },
68
- isDisabled: isDisabled
69
- }, "".concat(isOpen ? 'Hide' : 'Show', " Permissions"))), isOpen && (0, _react2.jsx)(PermissionsList, {
70
- onPress: function onPress() {
71
- return setIsOpen(false);
72
- }
73
- }));
74
- };
75
- var PermissionsList = function PermissionsList(_ref2) {
76
- var onPress = _ref2.onPress;
77
- return (0, _react2.jsx)(_index.Box, {
78
- p: "md",
79
- bg: "neutral.95"
80
- }, (0, _react2.jsx)(_index.Box, {
81
- isRow: true,
82
- justifyContent: "space-between",
83
- mb: "sm"
84
- }, (0, _react2.jsx)(_index.Text, {
85
- sx: {
86
- fontWeight: 2
87
- }
88
- }, "Permissions"), (0, _react2.jsx)(_index.IconButton, {
89
- onPress: onPress,
90
- "aria-label": "close"
91
- }, (0, _react2.jsx)(_index.Icon, {
92
- icon: _CloseIcon["default"],
93
- size: "sm",
94
- title: {
95
- name: 'Close Icon'
96
- }
97
- }))), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
98
- sx: titleSx,
99
- mb: "xs"
100
- }, "Resource"), (0, _react2.jsx)(_index.Text, {
101
- sx: subtitleSx,
102
- mb: "sm"
103
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), (0, _react2.jsx)(_index.Text, {
104
- sx: titleSx,
105
- mb: "xs"
106
- }, "Push Credentials"), (0, _react2.jsx)(_index.Text, {
107
- sx: subtitleSx,
108
- mb: "sm"
109
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod"), (0, _react2.jsx)(_index.Text, {
110
- sx: titleSx,
111
- mb: "xs"
112
- }, "Organization"), (0, _react2.jsx)(_index.Text, {
113
- sx: subtitleSx,
114
- mb: "sm"
115
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco"), (0, _react2.jsx)(_index.Text, {
116
- sx: titleSx,
117
- mb: "xs"
118
- }, "Image"), (0, _react2.jsx)(_index.Text, {
119
- sx: subtitleSx,
120
- mb: "sm"
121
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod")));
122
- };
123
- return (0, _react2.jsx)(_index.RadioGroupField, null, (0, _map["default"])(roles).call(roles, function (_ref3) {
124
- var name = _ref3.name,
125
- isDisabled = _ref3.isDisabled;
126
- return (0, _react2.jsx)(RadioFieldWithButton, {
127
- fieldName: name,
128
- isDisabled: isDisabled,
129
- key: name
130
- });
131
- }));
132
- };
133
- exports.Default = Default;
@@ -1,118 +0,0 @@
1
- import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
2
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
3
- import React, { useState } from 'react';
4
- import CloseIcon from '@pingux/mdi-react/CloseIcon';
5
- import { Box, Button, Icon, IconButton, RadioField, RadioGroupField, Text } from '../index';
6
- import { jsx as ___EmotionJSX } from "@emotion/react";
7
- export default {
8
- title: 'Recipes/Radio Buttons with Links'
9
- };
10
- export var Default = function Default() {
11
- var roles = [{
12
- name: 'Client Application Developer'
13
- }, {
14
- name: 'Environment Admin',
15
- isDisabled: true
16
- }, {
17
- name: 'Identity Data Admin',
18
- isDisabled: true
19
- }, {
20
- name: 'Organization Admin'
21
- }];
22
- var titleSx = {
23
- fontSize: 'md',
24
- color: 'neutral.20',
25
- fontWeight: 2
26
- };
27
- var subtitleSx = {
28
- fontSize: 'md',
29
- color: 'neutral.10'
30
- };
31
- var RadioFieldWithButton = function RadioFieldWithButton(_ref) {
32
- var fieldName = _ref.fieldName,
33
- isDisabled = _ref.isDisabled;
34
- var _useState = useState(false),
35
- _useState2 = _slicedToArray(_useState, 2),
36
- isOpen = _useState2[0],
37
- setIsOpen = _useState2[1];
38
- return ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
39
- isRow: true,
40
- alignItems: "center"
41
- }, ___EmotionJSX(RadioField, {
42
- value: fieldName,
43
- label: fieldName,
44
- isDisabled: isDisabled
45
- }), ___EmotionJSX(Button, {
46
- variant: "link",
47
- mb: "xs",
48
- ml: "md",
49
- onPress: function onPress() {
50
- return setIsOpen(function (prev) {
51
- return !prev;
52
- });
53
- },
54
- isDisabled: isDisabled
55
- }, "".concat(isOpen ? 'Hide' : 'Show', " Permissions"))), isOpen && ___EmotionJSX(PermissionsList, {
56
- onPress: function onPress() {
57
- return setIsOpen(false);
58
- }
59
- }));
60
- };
61
- var PermissionsList = function PermissionsList(_ref2) {
62
- var onPress = _ref2.onPress;
63
- return ___EmotionJSX(Box, {
64
- p: "md",
65
- bg: "neutral.95"
66
- }, ___EmotionJSX(Box, {
67
- isRow: true,
68
- justifyContent: "space-between",
69
- mb: "sm"
70
- }, ___EmotionJSX(Text, {
71
- sx: {
72
- fontWeight: 2
73
- }
74
- }, "Permissions"), ___EmotionJSX(IconButton, {
75
- onPress: onPress,
76
- "aria-label": "close"
77
- }, ___EmotionJSX(Icon, {
78
- icon: CloseIcon,
79
- size: "sm",
80
- title: {
81
- name: 'Close Icon'
82
- }
83
- }))), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
84
- sx: titleSx,
85
- mb: "xs"
86
- }, "Resource"), ___EmotionJSX(Text, {
87
- sx: subtitleSx,
88
- mb: "sm"
89
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), ___EmotionJSX(Text, {
90
- sx: titleSx,
91
- mb: "xs"
92
- }, "Push Credentials"), ___EmotionJSX(Text, {
93
- sx: subtitleSx,
94
- mb: "sm"
95
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod"), ___EmotionJSX(Text, {
96
- sx: titleSx,
97
- mb: "xs"
98
- }, "Organization"), ___EmotionJSX(Text, {
99
- sx: subtitleSx,
100
- mb: "sm"
101
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco"), ___EmotionJSX(Text, {
102
- sx: titleSx,
103
- mb: "xs"
104
- }, "Image"), ___EmotionJSX(Text, {
105
- sx: subtitleSx,
106
- mb: "sm"
107
- }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod")));
108
- };
109
- return ___EmotionJSX(RadioGroupField, null, _mapInstanceProperty(roles).call(roles, function (_ref3) {
110
- var name = _ref3.name,
111
- isDisabled = _ref3.isDisabled;
112
- return ___EmotionJSX(RadioFieldWithButton, {
113
- fieldName: name,
114
- isDisabled: isDisabled,
115
- key: name
116
- });
117
- }));
118
- };