@pingux/astro 2.2.0-alpha.5 → 2.2.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.
- package/lib/cjs/components/ArrayField/ArrayField.js +6 -4
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +1 -1
- package/lib/cjs/components/Callout/Callout.js +9 -12
- package/lib/cjs/components/Callout/Callout.stories.js +9 -12
- package/lib/cjs/components/CheckboxField/CheckboxField.js +8 -5
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +13 -5
- package/lib/cjs/components/ColorField/ColorField.js +8 -5
- package/lib/cjs/components/ColorField/ColorField.stories.js +12 -5
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +5 -4
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +5 -4
- 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 +11 -14
- package/lib/cjs/components/FieldHelperText/FieldHelperText.stories.js +10 -12
- package/lib/cjs/components/FileInputField/FileInputField.js +19 -14
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +11 -5
- package/lib/cjs/components/FileInputField/FileItem.js +6 -14
- package/lib/cjs/components/FileInputField/FileSelect.js +1 -1
- package/lib/cjs/components/Icon/NoticeIcon.js +5 -11
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +9 -6
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +12 -5
- package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +5 -4
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +10 -7
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +12 -5
- 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 +7 -13
- package/lib/cjs/components/Messages/Messages.js +7 -14
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +13 -9
- package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +12 -5
- package/lib/cjs/components/NumberField/NumberField.js +8 -5
- package/lib/cjs/components/NumberField/NumberField.stories.js +12 -5
- package/lib/cjs/components/PasswordField/PasswordField.js +14 -10
- package/lib/cjs/components/PasswordField/PasswordField.stories.js +11 -5
- package/lib/cjs/components/RadioField/RadioField.js +7 -4
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +8 -5
- package/lib/cjs/components/RadioGroupField/RadioGroupField.stories.js +11 -4
- package/lib/cjs/components/RequirementsList/RequirementsList.js +6 -15
- 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 +11 -7
- package/lib/cjs/components/SelectField/SelectField.stories.js +12 -5
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +6 -4
- package/lib/cjs/components/SwitchField/SwitchField.js +12 -8
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +12 -5
- package/lib/cjs/components/TextAreaField/TextAreaField.js +12 -8
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +12 -5
- package/lib/cjs/components/TextField/TextField.js +12 -8
- package/lib/cjs/components/TextField/TextField.stories.js +12 -5
- package/lib/cjs/hooks/useField/useField.js +1 -1
- package/lib/cjs/recipes/PanelHeader.stories.js +80 -0
- package/lib/components/ArrayField/ArrayField.js +6 -4
- package/lib/components/ArrayField/ArrayField.stories.js +1 -1
- package/lib/components/Callout/Callout.js +9 -13
- package/lib/components/Callout/Callout.stories.js +9 -13
- package/lib/components/CheckboxField/CheckboxField.js +8 -5
- package/lib/components/CheckboxField/CheckboxField.stories.js +13 -5
- package/lib/components/ColorField/ColorField.js +8 -5
- package/lib/components/ColorField/ColorField.stories.js +12 -5
- package/lib/components/ComboBox/ComboBoxInput.js +5 -4
- package/lib/components/ComboBoxField/ComboBoxField.js +5 -4
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +1 -1
- package/lib/components/DataTable/DataTable.stories.js +1 -1
- package/lib/components/FieldHelperText/FieldHelperText.js +9 -14
- package/lib/components/FieldHelperText/FieldHelperText.stories.js +10 -13
- package/lib/components/FileInputField/FileInputField.js +19 -14
- package/lib/components/FileInputField/FileInputField.stories.js +11 -5
- package/lib/components/FileInputField/FileItem.js +4 -14
- package/lib/components/FileInputField/FileSelect.js +1 -1
- package/lib/components/Icon/NoticeIcon.js +5 -12
- package/lib/components/ImageUploadField/ImageUploadField.js +9 -6
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +12 -5
- package/lib/components/ImageUploadField/ImageUploadFieldBase.js +5 -4
- package/lib/components/LinkSelectField/LinkSelectField.js +10 -7
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +12 -5
- 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 +5 -13
- package/lib/components/Messages/Messages.js +5 -14
- package/lib/components/MultivaluesField/MultivaluesField.js +13 -9
- package/lib/components/MultivaluesField/MultivaluesField.stories.js +12 -5
- package/lib/components/NumberField/NumberField.js +8 -5
- package/lib/components/NumberField/NumberField.stories.js +12 -5
- package/lib/components/PasswordField/PasswordField.js +14 -10
- package/lib/components/PasswordField/PasswordField.stories.js +11 -5
- package/lib/components/RadioField/RadioField.js +7 -4
- package/lib/components/RadioGroupField/RadioGroupField.js +8 -5
- package/lib/components/RadioGroupField/RadioGroupField.stories.js +11 -4
- package/lib/components/RequirementsList/RequirementsList.js +4 -15
- package/lib/components/SearchField/SearchField.js +2 -2
- package/lib/components/SearchField/SearchField.stories.js +2 -2
- package/lib/components/SelectField/SelectField.js +11 -7
- package/lib/components/SelectField/SelectField.stories.js +12 -5
- package/lib/components/SelectFieldBase/SelectFieldBase.js +6 -4
- package/lib/components/SwitchField/SwitchField.js +12 -8
- package/lib/components/SwitchField/SwitchField.stories.js +12 -5
- package/lib/components/TextAreaField/TextAreaField.js +12 -8
- package/lib/components/TextAreaField/TextAreaField.stories.js +12 -5
- package/lib/components/TextField/TextField.js +12 -8
- package/lib/components/TextField/TextField.stories.js +12 -5
- package/lib/hooks/useField/useField.js +1 -1
- package/lib/recipes/PanelHeader.stories.js +70 -0
- package/package.json +1 -1
- package/lib/cjs/utils/docUtils/statusProp.js +0 -55
- package/lib/utils/docUtils/statusProp.js +0 -44
- /package/lib/cjs/utils/{docUtils → devUtils/props}/ariaAttributes.js +0 -0
- /package/lib/cjs/utils/{docUtils → devUtils/props}/ariaAttributes.test.js +0 -0
- /package/lib/cjs/utils/{docUtils → devUtils/props}/fieldAttributes.js +0 -0
- /package/lib/cjs/utils/{docUtils → devUtils/props}/hoverProps.js +0 -0
- /package/lib/utils/{docUtils → devUtils/props}/ariaAttributes.js +0 -0
- /package/lib/utils/{docUtils → devUtils/props}/ariaAttributes.test.js +0 -0
- /package/lib/utils/{docUtils → devUtils/props}/fieldAttributes.js +0 -0
- /package/lib/utils/{docUtils → devUtils/props}/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 statuses from '../../utils/devUtils/constants/statuses.js';
|
22
|
+
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
23
|
+
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
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({
|
38
38
|
labelMode: {
|
39
39
|
control: {
|
40
40
|
type: 'select',
|
@@ -46,8 +46,15 @@ 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
|
49
56
|
}
|
50
|
-
},
|
57
|
+
}, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
|
51
58
|
};
|
52
59
|
export var Default = function Default(_ref) {
|
53
60
|
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/devUtils/props/ariaAttributes';
|
23
23
|
import { useStatusClasses } from '..';
|
24
24
|
|
25
25
|
/**
|
@@ -0,0 +1,70 @@
|
|
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
|
+
};
|
package/package.json
CHANGED
@@ -1,55 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
4
|
-
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
5
|
-
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
6
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
7
|
-
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
8
|
-
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
9
|
-
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
10
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
11
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
12
|
-
_Object$defineProperty(exports, "__esModule", {
|
13
|
-
value: true
|
14
|
-
});
|
15
|
-
exports.statusPropTypes = exports.statusDefaultProp = exports.statusBaseDocSettings = exports.statusArgTypes = void 0;
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
17
|
-
var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/values"));
|
18
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
19
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
20
|
-
var _statuses = _interopRequireDefault(require("../devUtils/constants/statuses"));
|
21
|
-
var _context;
|
22
|
-
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; }
|
23
|
-
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) { (0, _defineProperty2["default"])(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; }
|
24
|
-
var descriptions = {
|
25
|
-
status: 'Determines any status related styling.'
|
26
|
-
};
|
27
|
-
var statusBaseDocSettings = {
|
28
|
-
control: {
|
29
|
-
type: 'radio',
|
30
|
-
options: (0, _values["default"])(_statuses["default"])
|
31
|
-
},
|
32
|
-
defaultValue: _statuses["default"].DEFAULT,
|
33
|
-
table: {
|
34
|
-
type: {
|
35
|
-
summary: (0, _map["default"])(_context = (0, _values["default"])(_statuses["default"])).call(_context, function (status) {
|
36
|
-
return "'".concat(status, "'");
|
37
|
-
}).join('|')
|
38
|
-
}
|
39
|
-
}
|
40
|
-
};
|
41
|
-
exports.statusBaseDocSettings = statusBaseDocSettings;
|
42
|
-
var statusArgTypes = {
|
43
|
-
'status': _objectSpread({
|
44
|
-
description: descriptions.status
|
45
|
-
}, statusBaseDocSettings)
|
46
|
-
};
|
47
|
-
exports.statusArgTypes = statusArgTypes;
|
48
|
-
var statusPropTypes = {
|
49
|
-
status: _propTypes["default"].oneOf((0, _values["default"])(_statuses["default"]))
|
50
|
-
};
|
51
|
-
exports.statusPropTypes = statusPropTypes;
|
52
|
-
var statusDefaultProp = {
|
53
|
-
status: _statuses["default"].DEFAULT
|
54
|
-
};
|
55
|
-
exports.statusDefaultProp = statusDefaultProp;
|
@@ -1,44 +0,0 @@
|
|
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
|
-
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|