@pingux/astro 2.2.0-alpha.3 → 2.2.0-alpha.5
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/ArrayField/ArrayField.js +4 -6
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +1 -1
- package/lib/cjs/components/Callout/Callout.js +12 -9
- package/lib/cjs/components/Callout/Callout.stories.js +12 -9
- package/lib/cjs/components/CheckboxField/CheckboxField.js +5 -8
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +5 -13
- package/lib/cjs/components/ColorField/ColorField.js +5 -8
- package/lib/cjs/components/ColorField/ColorField.stories.js +5 -12
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +4 -5
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +4 -5
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +1 -1
- package/lib/cjs/components/DataTable/DataTable.stories.js +1 -1
- package/lib/cjs/components/FieldHelperText/FieldHelperText.js +14 -11
- package/lib/cjs/components/FieldHelperText/FieldHelperText.stories.js +12 -10
- package/lib/cjs/components/FileInputField/FileInputField.js +14 -19
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +5 -11
- package/lib/cjs/components/FileInputField/FileItem.js +14 -6
- package/lib/cjs/components/FileInputField/FileSelect.js +1 -1
- package/lib/cjs/components/Icon/NoticeIcon.js +11 -5
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +6 -9
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +5 -12
- package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +7 -5
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +7 -10
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +5 -12
- package/lib/cjs/components/ListItem/ListItem.js +1 -1
- package/lib/cjs/components/ListItem/ListItem.stories.js +1 -1
- package/lib/cjs/components/Menu/Menu.js +1 -1
- package/lib/cjs/components/Menu/Menu.stories.js +1 -1
- package/lib/cjs/components/Messages/Message.js +13 -7
- package/lib/cjs/components/Messages/Messages.js +14 -7
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +9 -13
- package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +5 -12
- package/lib/cjs/components/NumberField/NumberField.js +5 -8
- package/lib/cjs/components/NumberField/NumberField.stories.js +5 -12
- package/lib/cjs/components/PasswordField/PasswordField.js +10 -14
- package/lib/cjs/components/PasswordField/PasswordField.stories.js +5 -11
- package/lib/cjs/components/RadioField/RadioField.js +4 -7
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +5 -8
- package/lib/cjs/components/RadioGroupField/RadioGroupField.stories.js +4 -11
- package/lib/cjs/components/RequirementsList/RequirementsList.js +15 -6
- package/lib/cjs/components/SearchField/SearchField.js +2 -2
- package/lib/cjs/components/SearchField/SearchField.stories.js +2 -2
- package/lib/cjs/components/SelectField/SelectField.js +7 -11
- package/lib/cjs/components/SelectField/SelectField.stories.js +5 -12
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +4 -6
- package/lib/cjs/components/SwitchField/SwitchField.js +8 -12
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +5 -12
- package/lib/cjs/components/TextAreaField/TextAreaField.js +8 -12
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +5 -12
- package/lib/cjs/components/TextField/TextField.js +8 -12
- package/lib/cjs/components/TextField/TextField.stories.js +5 -12
- package/lib/cjs/hooks/useField/useField.js +1 -1
- package/lib/cjs/utils/docUtils/statusProp.js +55 -0
- package/lib/components/ArrayField/ArrayField.js +4 -6
- package/lib/components/ArrayField/ArrayField.stories.js +1 -1
- package/lib/components/Callout/Callout.js +13 -9
- package/lib/components/Callout/Callout.stories.js +13 -9
- package/lib/components/CheckboxField/CheckboxField.js +5 -8
- package/lib/components/CheckboxField/CheckboxField.stories.js +5 -13
- package/lib/components/ColorField/ColorField.js +5 -8
- package/lib/components/ColorField/ColorField.stories.js +5 -12
- package/lib/components/ComboBox/ComboBoxInput.js +4 -5
- package/lib/components/ComboBoxField/ComboBoxField.js +4 -5
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +1 -1
- package/lib/components/DataTable/DataTable.stories.js +1 -1
- package/lib/components/FieldHelperText/FieldHelperText.js +14 -9
- package/lib/components/FieldHelperText/FieldHelperText.stories.js +13 -10
- package/lib/components/FileInputField/FileInputField.js +14 -19
- package/lib/components/FileInputField/FileInputField.stories.js +5 -11
- package/lib/components/FileInputField/FileItem.js +14 -4
- package/lib/components/FileInputField/FileSelect.js +1 -1
- package/lib/components/Icon/NoticeIcon.js +12 -5
- package/lib/components/ImageUploadField/ImageUploadField.js +6 -9
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +5 -12
- package/lib/components/ImageUploadField/ImageUploadFieldBase.js +7 -5
- package/lib/components/LinkSelectField/LinkSelectField.js +7 -10
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +5 -12
- package/lib/components/ListItem/ListItem.js +1 -1
- package/lib/components/ListItem/ListItem.stories.js +1 -1
- package/lib/components/Menu/Menu.js +1 -1
- package/lib/components/Menu/Menu.stories.js +1 -1
- package/lib/components/Messages/Message.js +13 -5
- package/lib/components/Messages/Messages.js +14 -5
- package/lib/components/MultivaluesField/MultivaluesField.js +9 -13
- package/lib/components/MultivaluesField/MultivaluesField.stories.js +5 -12
- package/lib/components/NumberField/NumberField.js +5 -8
- package/lib/components/NumberField/NumberField.stories.js +5 -12
- package/lib/components/PasswordField/PasswordField.js +10 -14
- package/lib/components/PasswordField/PasswordField.stories.js +5 -11
- package/lib/components/RadioField/RadioField.js +4 -7
- package/lib/components/RadioGroupField/RadioGroupField.js +5 -8
- package/lib/components/RadioGroupField/RadioGroupField.stories.js +4 -11
- package/lib/components/RequirementsList/RequirementsList.js +15 -4
- package/lib/components/SearchField/SearchField.js +2 -2
- package/lib/components/SearchField/SearchField.stories.js +2 -2
- package/lib/components/SelectField/SelectField.js +7 -11
- package/lib/components/SelectField/SelectField.stories.js +5 -12
- package/lib/components/SelectFieldBase/SelectFieldBase.js +4 -6
- package/lib/components/SwitchField/SwitchField.js +8 -12
- package/lib/components/SwitchField/SwitchField.stories.js +5 -12
- package/lib/components/TextAreaField/TextAreaField.js +8 -12
- package/lib/components/TextAreaField/TextAreaField.stories.js +5 -12
- package/lib/components/TextField/TextField.js +8 -12
- package/lib/components/TextField/TextField.stories.js +5 -12
- package/lib/hooks/useField/useField.js +1 -1
- package/lib/utils/docUtils/statusProp.js +44 -0
- package/package.json +1 -1
- package/lib/cjs/recipes/PanelHeader.stories.js +0 -80
- package/lib/recipes/PanelHeader.stories.js +0 -70
- /package/lib/cjs/utils/{devUtils/props → docUtils}/ariaAttributes.js +0 -0
- /package/lib/cjs/utils/{devUtils/props → docUtils}/ariaAttributes.test.js +0 -0
- /package/lib/cjs/utils/{devUtils/props → docUtils}/fieldAttributes.js +0 -0
- /package/lib/cjs/utils/{devUtils/props → docUtils}/hoverProps.js +0 -0
- /package/lib/utils/{devUtils/props → docUtils}/ariaAttributes.js +0 -0
- /package/lib/utils/{devUtils/props → docUtils}/ariaAttributes.test.js +0 -0
- /package/lib/utils/{devUtils/props → docUtils}/fieldAttributes.js +0 -0
- /package/lib/utils/{devUtils/props → docUtils}/hoverProps.js +0 -0
@@ -18,9 +18,9 @@ import React, { useState } from 'react';
|
|
18
18
|
import isEmpty from 'lodash/isEmpty';
|
19
19
|
import useCopyToClipboard from '../../hooks/useCopyToClipboard';
|
20
20
|
import { Box, TextField } from '../../index';
|
21
|
-
import
|
22
|
-
import {
|
23
|
-
import {
|
21
|
+
import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
|
22
|
+
import { inputFieldAttributeBaseArgTypes } from '../../utils/docUtils/fieldAttributes';
|
23
|
+
import { statusArgTypes } from '../../utils/docUtils/statusProp';
|
24
24
|
import CopyButton from '../CopyText/CopyButton';
|
25
25
|
import { modes as labelModes } from '../Label/constants';
|
26
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -34,7 +34,7 @@ export default {
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
},
|
37
|
-
argTypes: _objectSpread(_objectSpread({
|
37
|
+
argTypes: _objectSpread(_objectSpread(_objectSpread({
|
38
38
|
labelMode: {
|
39
39
|
control: {
|
40
40
|
type: 'select',
|
@@ -46,15 +46,8 @@ export default {
|
|
46
46
|
control: {
|
47
47
|
type: 'text'
|
48
48
|
}
|
49
|
-
},
|
50
|
-
status: {
|
51
|
-
control: {
|
52
|
-
type: 'select',
|
53
|
-
options: statuses
|
54
|
-
},
|
55
|
-
defaultValue: statuses.DEFAULT
|
56
49
|
}
|
57
|
-
}, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
|
50
|
+
}, statusArgTypes), ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
|
58
51
|
};
|
59
52
|
export var Default = function Default(_ref) {
|
60
53
|
var variant = _ref.variant,
|
@@ -19,7 +19,7 @@ import noop from 'lodash/noop';
|
|
19
19
|
import omit from 'lodash/omit';
|
20
20
|
import { modes as labelModes } from '../../components/Label/constants';
|
21
21
|
import statuses from '../../utils/devUtils/constants/statuses';
|
22
|
-
import { getAriaAttributeProps } from '../../utils/
|
22
|
+
import { getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
23
23
|
import { useStatusClasses } from '..';
|
24
24
|
|
25
25
|
/**
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
2
|
+
var _context;
|
3
|
+
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; }
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
5
|
+
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
6
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
7
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
8
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
9
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
10
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
11
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
12
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
13
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
14
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
15
|
+
import PropTypes from 'prop-types';
|
16
|
+
import statuses from '../devUtils/constants/statuses';
|
17
|
+
var descriptions = {
|
18
|
+
status: 'Determines any status related styling.'
|
19
|
+
};
|
20
|
+
export var statusBaseDocSettings = {
|
21
|
+
control: {
|
22
|
+
type: 'radio',
|
23
|
+
options: _Object$values(statuses)
|
24
|
+
},
|
25
|
+
defaultValue: statuses.DEFAULT,
|
26
|
+
table: {
|
27
|
+
type: {
|
28
|
+
summary: _mapInstanceProperty(_context = _Object$values(statuses)).call(_context, function (status) {
|
29
|
+
return "'".concat(status, "'");
|
30
|
+
}).join('|')
|
31
|
+
}
|
32
|
+
}
|
33
|
+
};
|
34
|
+
export var statusArgTypes = {
|
35
|
+
'status': _objectSpread({
|
36
|
+
description: descriptions.status
|
37
|
+
}, statusBaseDocSettings)
|
38
|
+
};
|
39
|
+
export var statusPropTypes = {
|
40
|
+
status: PropTypes.oneOf(_Object$values(statuses))
|
41
|
+
};
|
42
|
+
export var statusDefaultProp = {
|
43
|
+
status: statuses.DEFAULT
|
44
|
+
};
|
package/package.json
CHANGED
@@ -1,80 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports["default"] = exports.Default = void 0;
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
10
|
-
var _AccountIcon = _interopRequireDefault(require("mdi-react/AccountIcon"));
|
11
|
-
var _CloseIcon = _interopRequireDefault(require("mdi-react/CloseIcon"));
|
12
|
-
var _DotsVerticalIcon = _interopRequireDefault(require("mdi-react/DotsVerticalIcon"));
|
13
|
-
var _index = require("../index");
|
14
|
-
var _react2 = require("@emotion/react");
|
15
|
-
var _default = {
|
16
|
-
title: 'Recipes/Panel Header'
|
17
|
-
};
|
18
|
-
exports["default"] = _default;
|
19
|
-
var sx = {
|
20
|
-
wrapper: {
|
21
|
-
width: 'fit-content',
|
22
|
-
alignItems: 'center',
|
23
|
-
bg: 'accent.99',
|
24
|
-
py: 'sm',
|
25
|
-
pl: 'md'
|
26
|
-
},
|
27
|
-
title: {
|
28
|
-
fontSize: 'md',
|
29
|
-
lineHeight: '18px'
|
30
|
-
},
|
31
|
-
subtitle: {
|
32
|
-
fontSize: 'sm',
|
33
|
-
my: '1px',
|
34
|
-
lineHeight: '16px'
|
35
|
-
}
|
36
|
-
};
|
37
|
-
var Default = function Default() {
|
38
|
-
return (0, _react2.jsx)(_index.Box, {
|
39
|
-
isRow: true,
|
40
|
-
sx: sx.wrapper
|
41
|
-
}, (0, _react2.jsx)(_index.Icon, {
|
42
|
-
icon: _AccountIcon["default"],
|
43
|
-
size: 25,
|
44
|
-
color: "accent.40"
|
45
|
-
}), (0, _react2.jsx)(_index.Box, {
|
46
|
-
ml: "sm",
|
47
|
-
mr: "xx"
|
48
|
-
}, (0, _react2.jsx)(_index.Text, {
|
49
|
-
sx: sx.title,
|
50
|
-
variant: "bodyStrong"
|
51
|
-
}, "Fons Vernall"), (0, _react2.jsx)(_index.Text, {
|
52
|
-
sx: sx.subtitle,
|
53
|
-
variant: "subtitle"
|
54
|
-
}, "fvernall0@google.it")), (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.PopoverMenu, null, (0, _react2.jsx)(_index.IconButton, {
|
55
|
-
"aria-label": "Menu Button"
|
56
|
-
}, (0, _react2.jsx)(_index.Icon, {
|
57
|
-
icon: _DotsVerticalIcon["default"],
|
58
|
-
size: "xs",
|
59
|
-
color: "Neutral.40",
|
60
|
-
m: "0.61px"
|
61
|
-
})), (0, _react2.jsx)(_index.Menu, null, (0, _react2.jsx)(_index.Item, {
|
62
|
-
key: "edit"
|
63
|
-
}, "Edit"), (0, _react2.jsx)(_index.Item, {
|
64
|
-
key: "duplicate"
|
65
|
-
}, "Duplicate"), (0, _react2.jsx)(_index.Item, {
|
66
|
-
key: "delete",
|
67
|
-
textValue: "delete"
|
68
|
-
}, (0, _react2.jsx)(_index.Text, {
|
69
|
-
color: "critical.bright"
|
70
|
-
}, "Delete"))))), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.IconButton, {
|
71
|
-
"aria-label": "Close Button",
|
72
|
-
mx: "10px"
|
73
|
-
}, (0, _react2.jsx)(_index.Icon, {
|
74
|
-
icon: _CloseIcon["default"],
|
75
|
-
size: "xs",
|
76
|
-
color: "Neutral.40",
|
77
|
-
m: "0.61px"
|
78
|
-
}))));
|
79
|
-
};
|
80
|
-
exports.Default = Default;
|
@@ -1,70 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import AccountIcon from 'mdi-react/AccountIcon';
|
3
|
-
import CloseIcon from 'mdi-react/CloseIcon';
|
4
|
-
import DotsVerticalIcon from 'mdi-react/DotsVerticalIcon';
|
5
|
-
import { Box, Icon, IconButton, Item, Menu, OverlayProvider, PopoverMenu, Text } from '../index';
|
6
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
|
-
export default {
|
8
|
-
title: 'Recipes/Panel Header'
|
9
|
-
};
|
10
|
-
var sx = {
|
11
|
-
wrapper: {
|
12
|
-
width: 'fit-content',
|
13
|
-
alignItems: 'center',
|
14
|
-
bg: 'accent.99',
|
15
|
-
py: 'sm',
|
16
|
-
pl: 'md'
|
17
|
-
},
|
18
|
-
title: {
|
19
|
-
fontSize: 'md',
|
20
|
-
lineHeight: '18px'
|
21
|
-
},
|
22
|
-
subtitle: {
|
23
|
-
fontSize: 'sm',
|
24
|
-
my: '1px',
|
25
|
-
lineHeight: '16px'
|
26
|
-
}
|
27
|
-
};
|
28
|
-
export var Default = function Default() {
|
29
|
-
return ___EmotionJSX(Box, {
|
30
|
-
isRow: true,
|
31
|
-
sx: sx.wrapper
|
32
|
-
}, ___EmotionJSX(Icon, {
|
33
|
-
icon: AccountIcon,
|
34
|
-
size: 25,
|
35
|
-
color: "accent.40"
|
36
|
-
}), ___EmotionJSX(Box, {
|
37
|
-
ml: "sm",
|
38
|
-
mr: "xx"
|
39
|
-
}, ___EmotionJSX(Text, {
|
40
|
-
sx: sx.title,
|
41
|
-
variant: "bodyStrong"
|
42
|
-
}, "Fons Vernall"), ___EmotionJSX(Text, {
|
43
|
-
sx: sx.subtitle,
|
44
|
-
variant: "subtitle"
|
45
|
-
}, "fvernall0@google.it")), ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(PopoverMenu, null, ___EmotionJSX(IconButton, {
|
46
|
-
"aria-label": "Menu Button"
|
47
|
-
}, ___EmotionJSX(Icon, {
|
48
|
-
icon: DotsVerticalIcon,
|
49
|
-
size: "xs",
|
50
|
-
color: "Neutral.40",
|
51
|
-
m: "0.61px"
|
52
|
-
})), ___EmotionJSX(Menu, null, ___EmotionJSX(Item, {
|
53
|
-
key: "edit"
|
54
|
-
}, "Edit"), ___EmotionJSX(Item, {
|
55
|
-
key: "duplicate"
|
56
|
-
}, "Duplicate"), ___EmotionJSX(Item, {
|
57
|
-
key: "delete",
|
58
|
-
textValue: "delete"
|
59
|
-
}, ___EmotionJSX(Text, {
|
60
|
-
color: "critical.bright"
|
61
|
-
}, "Delete"))))), ___EmotionJSX(Box, null, ___EmotionJSX(IconButton, {
|
62
|
-
"aria-label": "Close Button",
|
63
|
-
mx: "10px"
|
64
|
-
}, ___EmotionJSX(Icon, {
|
65
|
-
icon: CloseIcon,
|
66
|
-
size: "xs",
|
67
|
-
color: "Neutral.40",
|
68
|
-
m: "0.61px"
|
69
|
-
}))));
|
70
|
-
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|