@pingux/astro 2.132.0-alpha.2 → 2.132.0-alpha.3
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/lib/cjs/components/Modal/Modal.js +4 -3
- package/lib/cjs/components/Modal/Modal.stories.js +6 -11
- package/lib/cjs/components/Text/Text.styles.d.ts +1 -0
- package/lib/cjs/components/Text/Text.styles.js +2 -1
- package/lib/cjs/types/Modal.d.ts +1 -0
- package/lib/components/Modal/Modal.js +4 -3
- package/lib/components/Modal/Modal.stories.js +6 -11
- package/lib/components/Text/Text.styles.js +2 -1
- package/package.json +1 -1
@@ -28,7 +28,7 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
28
28
|
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
29
29
|
var _Text = _interopRequireDefault(require("../Text"));
|
30
30
|
var _react2 = require("@emotion/react");
|
31
|
-
var _excluded = ["className", "closeButton", "hasAutoFocus", "hasCloseButton", "id", "isClosedOnBlur", "isDismissable", "isKeyboardDismissDisabled", "isOpen", "role", "size", "state", "title", "onClose", "shouldCloseOnInteractOutside", "children", "contentProps", "containerProps"];
|
31
|
+
var _excluded = ["className", "closeButton", "hasAutoFocus", "hasCloseButton", "id", "isClosedOnBlur", "isDismissable", "isKeyboardDismissDisabled", "isOpen", "role", "size", "state", "title", "onClose", "shouldCloseOnInteractOutside", "children", "contentProps", "containerProps", "headerContainerProps"];
|
32
32
|
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); }
|
33
33
|
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; }
|
34
34
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
@@ -53,6 +53,7 @@ var Modal = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
53
53
|
children = props.children,
|
54
54
|
propsContentProps = props.contentProps,
|
55
55
|
containerProps = props.containerProps,
|
56
|
+
headerContainerProps = props.headerContainerProps,
|
56
57
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
57
58
|
var contentProps = _objectSpread({
|
58
59
|
id: id,
|
@@ -117,9 +118,9 @@ var Modal = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
117
118
|
}, propsContentProps, dialogProps, modalProps, {
|
118
119
|
ref: modalRef,
|
119
120
|
"aria-modal": true
|
120
|
-
}), (0, _react2.jsx)(_Box["default"], {
|
121
|
+
}), (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
|
121
122
|
variant: "modal.headingContainer"
|
122
|
-
}, hasCloseButton && (closeButton !== null && closeButton !== void 0 ? closeButton : (0, _react2.jsx)(_IconButton["default"], {
|
123
|
+
}, headerContainerProps), hasCloseButton && (closeButton !== null && closeButton !== void 0 ? closeButton : (0, _react2.jsx)(_IconButton["default"], {
|
123
124
|
"aria-label": "Close modal window",
|
124
125
|
"data-id": "icon-button__close-modal-window",
|
125
126
|
variant: "modalCloseButton",
|
@@ -120,7 +120,8 @@ var Default = function Default(args) {
|
|
120
120
|
// readers when an overlay opens.
|
121
121
|
(0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
|
122
122
|
onPress: state.open,
|
123
|
-
"aria-label": "Open modal"
|
123
|
+
"aria-label": "Open modal",
|
124
|
+
tabIndex: state.isOpen ? -1 : 0
|
124
125
|
}, "Open Modal"), (state.isOpen || state.isTransitioning) && (0, _react2.jsx)(_index.Modal, (0, _extends2["default"])({}, args, {
|
125
126
|
isOpen: state.isOpen,
|
126
127
|
onClose: state.close,
|
@@ -134,14 +135,6 @@ Default.parameters = {
|
|
134
135
|
design: {
|
135
136
|
type: 'figma',
|
136
137
|
url: _figmaLinks.FIGMA_LINKS.modal["default"]
|
137
|
-
},
|
138
|
-
a11y: {
|
139
|
-
config: {
|
140
|
-
rules: [{
|
141
|
-
id: 'aria-hidden-focus',
|
142
|
-
enabled: false
|
143
|
-
}]
|
144
|
-
}
|
145
138
|
}
|
146
139
|
};
|
147
140
|
var LargeContent = function LargeContent(args) {
|
@@ -151,10 +144,12 @@ var LargeContent = function LargeContent(args) {
|
|
151
144
|
// readers when an overlay opens.
|
152
145
|
(0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
|
153
146
|
onPress: state.open,
|
154
|
-
"aria-label": "Open modal"
|
147
|
+
"aria-label": "Open modal",
|
148
|
+
tabIndex: state.isOpen ? -1 : 0
|
155
149
|
}, "Open Modal"), state.isOpen && (0, _react2.jsx)(_index.Modal, (0, _extends2["default"])({}, args, {
|
156
150
|
isOpen: state.isOpen,
|
157
|
-
onClose: state.close
|
151
|
+
onClose: state.close,
|
152
|
+
title: "Lorem Ipsum"
|
158
153
|
}), (0, _react2.jsx)(_index.Box, {
|
159
154
|
gap: "lg"
|
160
155
|
}, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."), (0, _react2.jsx)(_index.Text, null, "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), (0, _react2.jsx)(_index.Text, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris."), (0, _react2.jsx)(_index.Text, null, "Nisi ut aliquip ex ea commodo consequat."), (0, _react2.jsx)(_index.Text, null, "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore."), (0, _react2.jsx)(_index.Text, null, "Eu fugiat nulla pariatur."), (0, _react2.jsx)(_index.Text, null, "Excepteur sint occaecat cupidatat non proident."), (0, _react2.jsx)(_index.Text, null, "Sunt in culpa qui officia deserunt mollit anim id est laborum."), (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."), (0, _react2.jsx)(_index.Text, null, "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), (0, _react2.jsx)(_index.Text, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris."), (0, _react2.jsx)(_index.Text, null, "Nisi ut aliquip ex ea commodo consequat."), (0, _react2.jsx)(_index.Text, null, "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore."), (0, _react2.jsx)(_index.Text, null, "Eu fugiat nulla pariatur."), (0, _react2.jsx)(_index.Text, null, "Excepteur sint occaecat cupidatat non proident."), (0, _react2.jsx)(_index.Text, null, "Sunt in culpa qui officia deserunt mollit anim id est laborum."), (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."), (0, _react2.jsx)(_index.Text, null, "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), (0, _react2.jsx)(_index.Text, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris."), (0, _react2.jsx)(_index.Text, null, "Nisi ut aliquip ex ea commodo consequat."), (0, _react2.jsx)(_index.Text, null, "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.")), (0, _react2.jsx)(_index.Box, {
|
@@ -220,7 +220,8 @@ var text = _objectSpread(_objectSpread(_objectSpread({
|
|
220
220
|
fontSize: '20px',
|
221
221
|
fontWeight: 2,
|
222
222
|
color: 'text.primary',
|
223
|
-
fontFamily: 'standard'
|
223
|
+
fontFamily: 'standard',
|
224
|
+
width: 'calc(100% - 22px)'
|
224
225
|
}),
|
225
226
|
placeholder: {
|
226
227
|
fontWeight: -1,
|
package/lib/cjs/types/Modal.d.ts
CHANGED
@@ -9,7 +9,7 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
9
9
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
10
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
11
11
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
12
|
-
var _excluded = ["className", "closeButton", "hasAutoFocus", "hasCloseButton", "id", "isClosedOnBlur", "isDismissable", "isKeyboardDismissDisabled", "isOpen", "role", "size", "state", "title", "onClose", "shouldCloseOnInteractOutside", "children", "contentProps", "containerProps"];
|
12
|
+
var _excluded = ["className", "closeButton", "hasAutoFocus", "hasCloseButton", "id", "isClosedOnBlur", "isDismissable", "isKeyboardDismissDisabled", "isOpen", "role", "size", "state", "title", "onClose", "shouldCloseOnInteractOutside", "children", "contentProps", "containerProps", "headerContainerProps"];
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
14
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
15
15
|
import React, { forwardRef } from 'react';
|
@@ -42,6 +42,7 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
42
42
|
children = props.children,
|
43
43
|
propsContentProps = props.contentProps,
|
44
44
|
containerProps = props.containerProps,
|
45
|
+
headerContainerProps = props.headerContainerProps,
|
45
46
|
others = _objectWithoutProperties(props, _excluded);
|
46
47
|
var contentProps = _objectSpread({
|
47
48
|
id: id,
|
@@ -106,9 +107,9 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
106
107
|
}, propsContentProps, dialogProps, modalProps, {
|
107
108
|
ref: modalRef,
|
108
109
|
"aria-modal": true
|
109
|
-
}), ___EmotionJSX(Box, {
|
110
|
+
}), ___EmotionJSX(Box, _extends({
|
110
111
|
variant: "modal.headingContainer"
|
111
|
-
}, hasCloseButton && (closeButton !== null && closeButton !== void 0 ? closeButton : ___EmotionJSX(IconButton, {
|
112
|
+
}, headerContainerProps), hasCloseButton && (closeButton !== null && closeButton !== void 0 ? closeButton : ___EmotionJSX(IconButton, {
|
112
113
|
"aria-label": "Close modal window",
|
113
114
|
"data-id": "icon-button__close-modal-window",
|
114
115
|
variant: "modalCloseButton",
|
@@ -111,7 +111,8 @@ export var Default = function Default(args) {
|
|
111
111
|
// readers when an overlay opens.
|
112
112
|
___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
113
113
|
onPress: state.open,
|
114
|
-
"aria-label": "Open modal"
|
114
|
+
"aria-label": "Open modal",
|
115
|
+
tabIndex: state.isOpen ? -1 : 0
|
115
116
|
}, "Open Modal"), (state.isOpen || state.isTransitioning) && ___EmotionJSX(Modal, _extends({}, args, {
|
116
117
|
isOpen: state.isOpen,
|
117
118
|
onClose: state.close,
|
@@ -124,14 +125,6 @@ Default.parameters = {
|
|
124
125
|
design: {
|
125
126
|
type: 'figma',
|
126
127
|
url: FIGMA_LINKS.modal["default"]
|
127
|
-
},
|
128
|
-
a11y: {
|
129
|
-
config: {
|
130
|
-
rules: [{
|
131
|
-
id: 'aria-hidden-focus',
|
132
|
-
enabled: false
|
133
|
-
}]
|
134
|
-
}
|
135
128
|
}
|
136
129
|
};
|
137
130
|
export var LargeContent = function LargeContent(args) {
|
@@ -141,10 +134,12 @@ export var LargeContent = function LargeContent(args) {
|
|
141
134
|
// readers when an overlay opens.
|
142
135
|
___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
143
136
|
onPress: state.open,
|
144
|
-
"aria-label": "Open modal"
|
137
|
+
"aria-label": "Open modal",
|
138
|
+
tabIndex: state.isOpen ? -1 : 0
|
145
139
|
}, "Open Modal"), state.isOpen && ___EmotionJSX(Modal, _extends({}, args, {
|
146
140
|
isOpen: state.isOpen,
|
147
|
-
onClose: state.close
|
141
|
+
onClose: state.close,
|
142
|
+
title: "Lorem Ipsum"
|
148
143
|
}), ___EmotionJSX(Box, {
|
149
144
|
gap: "lg"
|
150
145
|
}, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."), ___EmotionJSX(Text, null, "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), ___EmotionJSX(Text, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris."), ___EmotionJSX(Text, null, "Nisi ut aliquip ex ea commodo consequat."), ___EmotionJSX(Text, null, "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore."), ___EmotionJSX(Text, null, "Eu fugiat nulla pariatur."), ___EmotionJSX(Text, null, "Excepteur sint occaecat cupidatat non proident."), ___EmotionJSX(Text, null, "Sunt in culpa qui officia deserunt mollit anim id est laborum."), ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."), ___EmotionJSX(Text, null, "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), ___EmotionJSX(Text, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris."), ___EmotionJSX(Text, null, "Nisi ut aliquip ex ea commodo consequat."), ___EmotionJSX(Text, null, "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore."), ___EmotionJSX(Text, null, "Eu fugiat nulla pariatur."), ___EmotionJSX(Text, null, "Excepteur sint occaecat cupidatat non proident."), ___EmotionJSX(Text, null, "Sunt in culpa qui officia deserunt mollit anim id est laborum."), ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."), ___EmotionJSX(Text, null, "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."), ___EmotionJSX(Text, null, "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris."), ___EmotionJSX(Text, null, "Nisi ut aliquip ex ea commodo consequat."), ___EmotionJSX(Text, null, "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.")), ___EmotionJSX(Box, {
|
@@ -211,7 +211,8 @@ export var text = _objectSpread(_objectSpread(_objectSpread({
|
|
211
211
|
fontSize: '20px',
|
212
212
|
fontWeight: 2,
|
213
213
|
color: 'text.primary',
|
214
|
-
fontFamily: 'standard'
|
214
|
+
fontFamily: 'standard',
|
215
|
+
width: 'calc(100% - 22px)'
|
215
216
|
}),
|
216
217
|
placeholder: {
|
217
218
|
fontWeight: -1,
|