@pingux/astro 2.0.0-alpha.5 → 2.0.0-alpha.7
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/CHANGELOG.md +24 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +51 -20
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +16 -15
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +24 -24
- package/lib/cjs/components/Avatar/Avatar.stories.js +3 -3
- package/lib/cjs/components/Badge/Badge.js +2 -2
- package/lib/cjs/components/Badge/Badge.stories.js +21 -24
- package/lib/cjs/components/Badge/Badge.styles.js +8 -18
- package/lib/cjs/components/Badge/Badge.test.js +3 -3
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +5 -5
- package/lib/cjs/components/Button/Button.stories.js +15 -3
- package/lib/cjs/components/Button/Buttons.styles.js +9 -1
- package/lib/cjs/components/Callout/Callout.stories.js +9 -9
- package/lib/cjs/components/Card/Card.js +1 -1
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +11 -14
- package/lib/cjs/components/CodeView/CodeView.stories.js +10 -19
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +15 -16
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.styles.js +6 -5
- package/lib/cjs/components/ColorField/ColorField.js +1 -0
- package/lib/cjs/components/ColorField/ColorField.stories.js +3 -3
- package/lib/cjs/components/ColorField/ColorField.test.js +15 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +43 -44
- package/lib/cjs/components/CopyText/CopyButton.js +2 -1
- package/lib/cjs/components/CopyText/CopyText.stories.js +9 -11
- package/lib/cjs/components/CopyText/CopyText.styles.js +7 -5
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +12 -13
- package/lib/cjs/components/FieldHelperText/FieldHelperText.stories.js +6 -6
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +10 -11
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +6 -7
- package/lib/cjs/components/HelpHint/HelpHint.styles.js +0 -3
- package/lib/cjs/components/Icon/Icon.stories.js +1 -1
- package/lib/cjs/components/IconBadge/IconBadge.stories.js +2 -3
- package/lib/cjs/components/IconButton/IconButton.js +3 -3
- package/lib/cjs/components/IconButton/IconButton.styles.js +1 -1
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.stories.js +4 -4
- package/lib/cjs/components/Image/Image.stories.js +9 -10
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +9 -9
- package/lib/cjs/components/Input/Input.stories.js +5 -5
- package/lib/cjs/components/Label/Label.stories.js +5 -5
- package/lib/cjs/components/Link/Link.stories.js +3 -3
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +46 -46
- package/lib/cjs/components/ListItem/ListItem.js +30 -15
- package/lib/cjs/components/ListItem/ListItem.stories.js +90 -26
- package/lib/cjs/components/ListItem/ListItem.test.js +46 -11
- package/lib/cjs/components/ListView/ListView.js +7 -1
- package/lib/cjs/components/ListView/ListView.stories.js +24 -25
- package/lib/cjs/components/ListViewItem/ListViewItem.js +4 -2
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +8 -2
- package/lib/cjs/components/Loader/Loader.stories.js +4 -4
- package/lib/cjs/components/Menu/Menu.js +16 -5
- package/lib/cjs/components/Menu/Menu.stories.js +19 -9
- package/lib/cjs/components/Messages/Messages.stories.js +27 -27
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +6 -6
- package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +46 -46
- package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +39 -39
- package/lib/cjs/components/NavBar/NavBar.stories.js +13 -2
- package/lib/cjs/components/NavBar/NavBar.test.js +9 -0
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +64 -2
- package/lib/cjs/components/NavBarSection/NavBarSection.js +20 -2
- package/lib/cjs/components/NumberField/NumberField.stories.js +14 -14
- package/lib/cjs/components/PasswordField/PasswordField.stories.js +15 -15
- package/lib/cjs/components/RadioGroupField/RadioGroupField.stories.js +25 -26
- package/lib/cjs/components/RequirementsList/RequirementsList.stories.js +4 -4
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.stories.js +19 -20
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.test.js +3 -4
- package/lib/cjs/components/ScrollBox/ScrollBox.stories.js +4 -5
- package/lib/cjs/components/SearchField/SearchField.stories.js +8 -8
- package/lib/cjs/components/SelectField/SelectField.stories.js +47 -47
- package/lib/cjs/components/Separator/Separator.stories.js +6 -7
- package/lib/cjs/components/SwitchField/SwitchField.js +4 -2
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +8 -9
- package/lib/cjs/components/Table/Table.stories.js +7 -13
- package/lib/cjs/components/Tabs/Tabs.stories.js +32 -36
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +16 -17
- package/lib/cjs/components/TextField/TextField.stories.js +23 -24
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.stories.js +4 -4
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +3 -5
- package/lib/cjs/{Patterns → patterns}/AttributeMappingDisplayViewPattern.stories.hidden.js +3 -3
- package/lib/cjs/{Patterns → patterns}/AttributeMappingEditViewPattern.stories.hidden.js +3 -3
- package/lib/cjs/recipes/Arrow.stories.js +4 -4
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +2 -2
- package/lib/cjs/recipes/CollapsiblePanel.stories.js +40 -40
- package/lib/cjs/recipes/CountryPicker.stories.js +4 -7
- package/lib/cjs/recipes/DraggableBox.stories.js +5 -7
- package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +1 -2
- package/lib/cjs/recipes/LinkedListView.stories.js +9 -9
- package/lib/cjs/recipes/ListAndPanel.stories.js +71 -21
- package/lib/cjs/recipes/LogoTabs.stories.js +3 -3
- package/lib/cjs/recipes/NeutralInput.stories.js +2 -2
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +6 -7
- package/lib/cjs/recipes/PanelHeader.stories.js +10 -15
- package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +2 -4
- package/lib/cjs/recipes/{SelectedFieldOverlay.story.js → SelectedFieldOverlay.stories.js} +5 -7
- package/lib/cjs/recipes/StatsCircle.stories.js +4 -5
- package/lib/cjs/recipes/TrialExperienceIndustryButtons.stories.js +2 -2
- package/lib/cjs/styles/colors.js +3 -1
- package/lib/cjs/styles/themes/astro-nano/astro-nano.js +17 -17
- package/lib/cjs/utils/devUtils/props/hoverProps.js +54 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +44 -11
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +6 -5
- package/lib/components/ArrayField/ArrayField.stories.js +1 -1
- package/lib/components/Avatar/Avatar.stories.js +1 -1
- package/lib/components/Badge/Badge.js +2 -2
- package/lib/components/Badge/Badge.stories.js +4 -7
- package/lib/components/Badge/Badge.styles.js +7 -16
- package/lib/components/Badge/Badge.test.js +3 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +1 -1
- package/lib/components/Button/Button.stories.js +11 -1
- package/lib/components/Button/Buttons.styles.js +9 -1
- package/lib/components/Callout/Callout.stories.js +1 -1
- package/lib/components/Card/Card.js +1 -1
- package/lib/components/CheckboxField/CheckboxField.stories.js +1 -4
- package/lib/components/CodeView/CodeView.stories.js +5 -14
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +11 -12
- package/lib/components/CollapsiblePanel/CollapsiblePanel.styles.js +6 -5
- package/lib/components/ColorField/ColorField.js +1 -0
- package/lib/components/ColorField/ColorField.stories.js +1 -1
- package/lib/components/ColorField/ColorField.test.js +15 -0
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +1 -2
- package/lib/components/CopyText/CopyButton.js +2 -1
- package/lib/components/CopyText/CopyText.stories.js +1 -3
- package/lib/components/CopyText/CopyText.styles.js +7 -5
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +2 -3
- package/lib/components/FieldHelperText/FieldHelperText.stories.js +1 -1
- package/lib/components/FileInputField/FileInputField.stories.js +1 -2
- package/lib/components/HelpHint/HelpHint.stories.js +1 -2
- package/lib/components/HelpHint/HelpHint.styles.js +0 -3
- package/lib/components/Icon/Icon.stories.js +1 -1
- package/lib/components/IconBadge/IconBadge.stories.js +1 -2
- package/lib/components/IconButton/IconButton.js +3 -3
- package/lib/components/IconButton/IconButton.styles.js +2 -2
- package/lib/components/IconButtonToggle/IconButtonToggle.stories.js +1 -1
- package/lib/components/Image/Image.stories.js +1 -2
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +1 -1
- package/lib/components/Input/Input.stories.js +1 -1
- package/lib/components/Label/Label.stories.js +1 -1
- package/lib/components/Link/Link.stories.js +1 -1
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +1 -1
- package/lib/components/ListItem/ListItem.js +30 -13
- package/lib/components/ListItem/ListItem.stories.js +68 -8
- package/lib/components/ListItem/ListItem.test.js +46 -11
- package/lib/components/ListView/ListView.js +7 -1
- package/lib/components/ListView/ListView.stories.js +1 -2
- package/lib/components/ListViewItem/ListViewItem.js +4 -2
- package/lib/components/ListViewItem/ListViewItem.styles.js +8 -2
- package/lib/components/Loader/Loader.stories.js +1 -1
- package/lib/components/Menu/Menu.js +16 -5
- package/lib/components/Menu/Menu.stories.js +15 -4
- package/lib/components/Messages/Messages.stories.js +1 -1
- package/lib/components/MultivaluesField/MultivaluesField.js +6 -6
- package/lib/components/MultivaluesField/MultivaluesField.stories.js +8 -8
- package/lib/components/MultivaluesField/MultivaluesField.test.js +39 -39
- package/lib/components/NavBar/NavBar.stories.js +13 -2
- package/lib/components/NavBar/NavBar.test.js +9 -0
- package/lib/components/NavBarSection/NavBarItemHeader.js +64 -2
- package/lib/components/NavBarSection/NavBarSection.js +21 -3
- package/lib/components/NumberField/NumberField.stories.js +1 -1
- package/lib/components/PasswordField/PasswordField.stories.js +1 -1
- package/lib/components/RadioGroupField/RadioGroupField.stories.js +1 -2
- package/lib/components/RequirementsList/RequirementsList.stories.js +1 -1
- package/lib/components/RockerButtonGroup/RockerButtonGroup.stories.js +1 -2
- package/lib/components/RockerButtonGroup/RockerButtonGroup.test.js +1 -2
- package/lib/components/ScrollBox/ScrollBox.stories.js +1 -2
- package/lib/components/SearchField/SearchField.stories.js +1 -1
- package/lib/components/SelectField/SelectField.stories.js +1 -1
- package/lib/components/Separator/Separator.stories.js +1 -2
- package/lib/components/SwitchField/SwitchField.js +4 -2
- package/lib/components/SwitchField/SwitchField.stories.js +1 -2
- package/lib/components/Table/Table.stories.js +1 -7
- package/lib/components/Tabs/Tabs.stories.js +1 -5
- package/lib/components/TextAreaField/TextAreaField.stories.js +1 -2
- package/lib/components/TextField/TextField.stories.js +1 -2
- package/lib/components/TimeZonePicker/TimeZonePicker.stories.js +1 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +1 -3
- package/lib/{Patterns → patterns}/AttributeMappingDisplayViewPattern.stories.hidden.js +3 -3
- package/lib/{Patterns → patterns}/AttributeMappingEditViewPattern.stories.hidden.js +3 -3
- package/lib/recipes/Arrow.stories.js +1 -1
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +2 -2
- package/lib/recipes/CollapsiblePanel.stories.js +11 -11
- package/lib/recipes/CountryPicker.stories.js +1 -4
- package/lib/recipes/DraggableBox.stories.js +1 -3
- package/lib/recipes/FlippableCaretMenuButton.stories.js +1 -2
- package/lib/recipes/LinkedListView.stories.js +9 -9
- package/lib/recipes/ListAndPanel.stories.js +72 -22
- package/lib/recipes/LogoTabs.stories.js +1 -1
- package/lib/recipes/NeutralInput.stories.js +1 -1
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +1 -2
- package/lib/recipes/PanelHeader.stories.js +1 -6
- package/lib/recipes/RadioButtonsWithLinks.stories.js +1 -3
- package/lib/recipes/{SelectedFieldOverlay.story.js → SelectedFieldOverlay.stories.js} +1 -3
- package/lib/recipes/StatsCircle.stories.js +1 -2
- package/lib/recipes/TrialExperienceIndustryButtons.stories.js +1 -1
- package/lib/styles/colors.js +3 -1
- package/lib/styles/themes/astro-nano/astro-nano.js +17 -17
- package/lib/utils/devUtils/props/hoverProps.js +44 -0
- package/package.json +2 -2
- package/lib/cjs/components/PageHeader/PageHeader.js +0 -52
- package/lib/cjs/components/PageHeader/PageHeader.stories.js +0 -36
- package/lib/cjs/components/PageHeader/PageHeader.test.js +0 -25
- package/lib/components/PageHeader/PageHeader.js +0 -38
- package/lib/components/PageHeader/PageHeader.stories.js +0 -26
- package/lib/components/PageHeader/PageHeader.test.js +0 -22
- /package/lib/cjs/{Patterns → patterns}/ListAndPanelPattern.stories.hidden.js +0 -0
- /package/lib/cjs/{Patterns → patterns}/MessagesPattern.stories.hidden.js +0 -0
- /package/lib/cjs/{Patterns → patterns}/SaveBarPattern.stories.hidden.js +0 -0
- /package/lib/cjs/{Patterns → patterns}/UnsavedChangesPattern.stories.hidden.js +0 -0
- /package/lib/{Patterns → patterns}/ListAndPanelPattern.stories.hidden.js +0 -0
- /package/lib/{Patterns → patterns}/MessagesPattern.stories.hidden.js +0 -0
- /package/lib/{Patterns → patterns}/SaveBarPattern.stories.hidden.js +0 -0
- /package/lib/{Patterns → patterns}/UnsavedChangesPattern.stories.hidden.js +0 -0
@@ -87,7 +87,15 @@ var critical = _objectSpread(_objectSpread({}, base), {}, {
|
|
87
87
|
border: '1px solid',
|
88
88
|
borderColor: 'critical.bright',
|
89
89
|
color: 'white',
|
90
|
-
'&.is-focused': _objectSpread({}, defaultFocus)
|
90
|
+
'&.is-focused': _objectSpread({}, defaultFocus),
|
91
|
+
'&.is-hovered': {
|
92
|
+
bg: 'critical.primaryDark',
|
93
|
+
borderColor: 'critical.primaryDark'
|
94
|
+
},
|
95
|
+
'&.is-pressed': {
|
96
|
+
bg: 'critical.secondaryDark',
|
97
|
+
borderColor: 'critical.secondaryDark'
|
98
|
+
}
|
91
99
|
});
|
92
100
|
var inline = _objectSpread(_objectSpread({}, base), {}, {
|
93
101
|
display: 'inline-flex',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
2
2
|
import React from 'react';
|
3
3
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
4
|
-
import { Callout, Link, Text } from '
|
4
|
+
import { Callout, Link, Text } from '../../index';
|
5
5
|
import statuses from '../../utils/devUtils/constants/statuses';
|
6
6
|
import CalloutReadme from './Callout.mdx';
|
7
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -50,7 +50,7 @@ var Card = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
50
50
|
var ariaLabel = props['aria-label'];
|
51
51
|
return ___EmotionJSX(Box, _extends({
|
52
52
|
"aria-label": ariaLabel,
|
53
|
-
variant: "
|
53
|
+
variant: "cards.container",
|
54
54
|
className: classNames,
|
55
55
|
ref: ref,
|
56
56
|
isFocused: isFocusVisible
|
@@ -14,13 +14,10 @@ import _everyInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
14
14
|
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; }
|
15
15
|
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; }
|
16
16
|
import React, { useEffect, useState } from 'react';
|
17
|
+
import { Box, CheckboxField, Link, Text } from '../../index';
|
17
18
|
import statuses from '../../utils/devUtils/constants/statuses';
|
18
19
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
19
20
|
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
20
|
-
import Box from '../Box';
|
21
|
-
import Link from '../Link';
|
22
|
-
import Text from '../Text';
|
23
|
-
import CheckboxField from './CheckboxField';
|
24
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
25
22
|
export default {
|
26
23
|
title: 'Form/CheckboxField',
|
@@ -3,8 +3,7 @@ import React from 'react';
|
|
3
3
|
import Prism from 'prismjs';
|
4
4
|
import 'prismjs/components/prism-powershell';
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
6
|
-
import {
|
7
|
-
import CodeView from './CodeView';
|
6
|
+
import { CodeView } from '../../index';
|
8
7
|
import CodeViewReadme from './CodeView.mdx';
|
9
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
10
9
|
var code = "{\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad\"\n },\n \"password\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.set\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.reset\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.check\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"password.recover\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/password\"\n },\n \"account.sendVerificationCode\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad\"\n },\n \"linkedAccounts\": {\n \"href\": \"https://api.pingone.com/v1/environments/94e3268d-847d-47aa-a45e-1ef8dd8f4df0/users/5a5d4c0c-8383-4796-9cdc-16b5a22f45ad/linkedAccounts\"\n }\n },\n \"id\": \"5a5d4c0c-8383-4796-9cdc-16b5a22f45ad\",\n \"environment\": {\n \"id\": \"94e3268d-847d-47aa-a45e-1ef8dd8f4df0\"\n },\n \"account\": {\n \"canAuthenticate\": true,\n \"status\": \"OK\"\n },\n \"createdAt\": \"2021-09-03T15:01:43.555Z\",\n \"email\": \"allegraweldon@pingidentity.com\",\n \"enabled\": true,\n \"identityProvider\": {\n \"type\": \"PING_ONE\"\n },\n \"lifecycle\": {\n \"status\": \"ACCOUNT_OK\"\n },\n \"mfaEnabled\": false,\n \"population\": {\n \"id\": \"c1adbc29-f188-4ea6-a015-49bddd74bc84\"\n },\n \"updatedAt\": \"2021-09-03T15:01:43.555Z\",\n \"username\": \"allegraweldon@pingidentity.com\",\n \"verifyStatus\": \"NOT_INITIATED\"\n}";
|
@@ -46,20 +45,12 @@ export default {
|
|
46
45
|
}
|
47
46
|
};
|
48
47
|
export var Default = function Default(args) {
|
49
|
-
return ___EmotionJSX(
|
50
|
-
sx: {
|
51
|
-
fontWeight: 2
|
52
|
-
}
|
53
|
-
}, "JSON"), ___EmotionJSX(CodeView, args));
|
48
|
+
return ___EmotionJSX(CodeView, args);
|
54
49
|
};
|
55
50
|
export var WithLineNumbers = function WithLineNumbers() {
|
56
|
-
return ___EmotionJSX(
|
57
|
-
sx: {
|
58
|
-
fontWeight: 2
|
59
|
-
}
|
60
|
-
}, "JSON"), ___EmotionJSX(CodeView, {
|
51
|
+
return ___EmotionJSX(CodeView, {
|
61
52
|
hasLineNumbers: true
|
62
|
-
}, code)
|
53
|
+
}, code);
|
63
54
|
};
|
64
55
|
WithLineNumbers.parameters = {
|
65
56
|
docs: {
|
@@ -74,7 +65,7 @@ export var WithCustomSize = function WithCustomSize() {
|
|
74
65
|
height: 300
|
75
66
|
},
|
76
67
|
hasNoCopyButton: true
|
77
|
-
}, "\
|
68
|
+
}, "\nconst BadgeWithIcon = () => (\n <>\n <Badge label=\"Badge with Icon Button\" bg=\"navy\">\n <IconButton aria-label=\"Clear Badge with Icon Button\" variant=\"inverted\">\n <Icon icon={Clear} ml=\"xs\" size=\"14px\" />\n </IconButton>\n </Badge>\n\n <div style={{ padding: '5px' }} />\n\n <Badge label=\"Badge with Icon Button\">\n <IconButton aria-label=\"Clear Badge with Icon Button\" variant=\"inverted\">\n <Icon icon={Earth} ml=\"xs\" size=\"14px\" />\n </IconButton>\n </Badge>\n\n <div style={{ padding: '5px' }} />\n\n <Badge label=\"Badge with Icon\" bg=\"green\">\n <Icon icon={ContentCopy} ml=\"xs\" size=\"14px\" color=\"white\" />\n </Badge>\n </>\n);\n ");
|
78
69
|
};
|
79
70
|
export var WithAdditionalLanguage = function WithAdditionalLanguage() {
|
80
71
|
var _context;
|
@@ -23,8 +23,7 @@ import Clear from 'mdi-react/CloseIcon';
|
|
23
23
|
import SearchIcon from 'mdi-react/SearchIcon';
|
24
24
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
25
25
|
import { useOverlayPanelState } from '../../hooks';
|
26
|
-
import { Badge, Box, Breadcrumbs, Button, CheckboxField, CollapsiblePanelItem, Icon, IconButton, Item, ListView, OverlayPanel, OverlayProvider, SearchField, Text } from '../../index';
|
27
|
-
import CollapsiblePanel from './CollapsiblePanel';
|
26
|
+
import { Badge, Box, Breadcrumbs, Button, CheckboxField, CollapsiblePanel, CollapsiblePanelItem, Icon, IconButton, Item, ListView, OverlayPanel, OverlayProvider, SearchField, Text } from '../../index';
|
28
27
|
import CollapsiblePanelReadme from './CollapsiblePanel.mdx';
|
29
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
30
29
|
export default {
|
@@ -67,7 +66,7 @@ var data = [{
|
|
67
66
|
key: 'Avengers',
|
68
67
|
name: 'Avengers',
|
69
68
|
subtitle: 'Default',
|
70
|
-
|
69
|
+
badgeValue: '25',
|
71
70
|
isDefaultSelected: true
|
72
71
|
}, {
|
73
72
|
id: '2',
|
@@ -75,21 +74,21 @@ var data = [{
|
|
75
74
|
key: 'Credit Cards',
|
76
75
|
name: 'Credit Cards',
|
77
76
|
subtitle: '',
|
78
|
-
|
77
|
+
badgeValue: '123'
|
79
78
|
}, {
|
80
79
|
id: '3',
|
81
80
|
icon: 'Group',
|
82
81
|
key: 'Debit Cards',
|
83
82
|
name: 'Debit Cards',
|
84
83
|
subtitle: '',
|
85
|
-
|
84
|
+
badgeValue: '23'
|
86
85
|
}, {
|
87
86
|
id: '4',
|
88
87
|
icon: 'Group',
|
89
88
|
key: 'Digital Investors',
|
90
89
|
name: 'Digital Investors',
|
91
90
|
subtitle: 'N America',
|
92
|
-
|
91
|
+
badgeValue: '12',
|
93
92
|
isDefaultSelected: true
|
94
93
|
}, {
|
95
94
|
id: '5',
|
@@ -97,35 +96,35 @@ var data = [{
|
|
97
96
|
key: 'Mortgages',
|
98
97
|
name: 'Mortgages',
|
99
98
|
subtitle: 'N America',
|
100
|
-
|
99
|
+
badgeValue: '112'
|
101
100
|
}, {
|
102
101
|
id: '6',
|
103
102
|
icon: 'Group',
|
104
103
|
key: 'Person LOC',
|
105
104
|
name: 'Person LOC',
|
106
105
|
subtitle: '',
|
107
|
-
|
106
|
+
badgeValue: '45'
|
108
107
|
}, {
|
109
108
|
id: '7',
|
110
109
|
icon: 'Group',
|
111
110
|
key: 'Production',
|
112
111
|
name: 'Production',
|
113
112
|
subtitle: '',
|
114
|
-
|
113
|
+
badgeValue: '55'
|
115
114
|
}, {
|
116
115
|
id: '8',
|
117
116
|
icon: 'Group',
|
118
117
|
key: 'UX Team',
|
119
118
|
name: 'UX Team',
|
120
119
|
subtitle: '',
|
121
|
-
|
120
|
+
badgeValue: '61'
|
122
121
|
}, {
|
123
122
|
id: '9',
|
124
123
|
icon: 'Group',
|
125
124
|
key: 'UI Team',
|
126
125
|
name: 'UI Team',
|
127
126
|
subtitle: '',
|
128
|
-
|
127
|
+
badgeValue: '29'
|
129
128
|
}];
|
130
129
|
export var Default = function Default(args) {
|
131
130
|
return ___EmotionJSX(CollapsiblePanel, args);
|
@@ -270,7 +269,7 @@ export var CollapsiblePanelWithBadge = function CollapsiblePanelWithBadge(args)
|
|
270
269
|
mb: "xs",
|
271
270
|
mr: "xs"
|
272
271
|
}, item.name), ___EmotionJSX(Badge, {
|
273
|
-
label: item.
|
272
|
+
label: item.badgeValue,
|
274
273
|
bg: "accent.99",
|
275
274
|
textColor: "text.secondary",
|
276
275
|
sx: {
|
@@ -85,6 +85,7 @@ var item = {
|
|
85
85
|
};
|
86
86
|
export var toggle = _objectSpread(_objectSpread({}, square), {}, {
|
87
87
|
bg: 'accent.99',
|
88
|
+
borderRadius: '2px',
|
88
89
|
height: '40px',
|
89
90
|
minWidth: 'max-content',
|
90
91
|
pl: 'xs',
|
@@ -95,16 +96,16 @@ export var toggle = _objectSpread(_objectSpread({}, square), {}, {
|
|
95
96
|
'&.is-hovered': {
|
96
97
|
backgroundColor: 'accent.99'
|
97
98
|
},
|
98
|
-
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
99
|
-
outlineOffset: '0',
|
100
|
-
zIndex: 1
|
101
|
-
}),
|
102
99
|
'&.is-pressed': {
|
103
100
|
backgroundColor: 'accent.99'
|
104
101
|
},
|
105
102
|
':focus': {
|
106
103
|
outline: 'none'
|
107
|
-
}
|
104
|
+
},
|
105
|
+
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
106
|
+
outlineOffset: '0',
|
107
|
+
zIndex: 1
|
108
|
+
})
|
108
109
|
});
|
109
110
|
var neutralText = _objectSpread(_objectSpread({}, link), {}, {
|
110
111
|
color: 'neutral.10'
|
@@ -13,7 +13,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
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 _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
15
15
|
import React, { useCallback, useState } from 'react';
|
16
|
-
import { ColorField, OverlayProvider } from '
|
16
|
+
import { ColorField, OverlayProvider } from '../../index';
|
17
17
|
import statuses from '../../utils/devUtils/constants/statuses';
|
18
18
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
19
19
|
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
@@ -46,4 +46,19 @@ test('will call onChange with arguments if provided', function () {
|
|
46
46
|
userEvent.clear(hexInput);
|
47
47
|
userEvent.type(hexInput, testColor2);
|
48
48
|
expect(testOnChange).toHaveBeenCalled();
|
49
|
+
});
|
50
|
+
test('clicking within the popover does not close it', function () {
|
51
|
+
var testOnChange = jest.fn();
|
52
|
+
getComponent({
|
53
|
+
onChange: testOnChange,
|
54
|
+
value: testColor1
|
55
|
+
});
|
56
|
+
var button = screen.getByRole('button');
|
57
|
+
userEvent.click(button);
|
58
|
+
// should be open now
|
59
|
+
var hexLabelElement = screen.queryByText(hexLabel);
|
60
|
+
expect(hexLabelElement).toBeInTheDocument();
|
61
|
+
// click the popover container, which has caused closing in regressions
|
62
|
+
userEvent.click(screen.queryByRole('presentation'));
|
63
|
+
expect(screen.queryByRole('presentation')).toBeInTheDocument();
|
49
64
|
});
|
@@ -29,10 +29,9 @@ import React, { useState } from 'react';
|
|
29
29
|
import { useAsyncList } from 'react-stately';
|
30
30
|
import { useFilter } from '@react-aria/i18n';
|
31
31
|
import { action } from '@storybook/addon-actions';
|
32
|
-
import { Item, OverlayProvider, Section } from '
|
32
|
+
import { ComboBoxField, Item, OverlayProvider, Section } from '../../index';
|
33
33
|
import loadingStates from '../../utils/devUtils/constants/loadingStates';
|
34
34
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
35
|
-
import ComboBoxField from './ComboBoxField';
|
36
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
37
36
|
var items = [{
|
38
37
|
name: 'Aardvark',
|
@@ -13,7 +13,8 @@ var CopyButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
13
|
variant: "copyButton"
|
14
14
|
}, omit(props, 'iconProps')), ___EmotionJSX(Icon, _extends({
|
15
15
|
icon: ContentCopy,
|
16
|
-
size:
|
16
|
+
size: "xs",
|
17
|
+
color: "text.secondary"
|
17
18
|
}, props === null || props === void 0 ? void 0 : props.iconProps)));
|
18
19
|
});
|
19
20
|
CopyButton.propTypes = {
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React from 'react';
|
3
3
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
4
|
-
import Link from '
|
5
|
-
import Text from '../Text';
|
6
|
-
import CopyText from './CopyText';
|
4
|
+
import { CopyText, Link, Text } from '../../index';
|
7
5
|
import CopyTextReadme from './CopyText.mdx';
|
8
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
7
|
export default {
|
@@ -25,19 +25,21 @@ var copy = {
|
|
25
25
|
}
|
26
26
|
};
|
27
27
|
export var copyButton = {
|
28
|
-
ml: '
|
28
|
+
ml: 'sm',
|
29
29
|
outline: 'none',
|
30
30
|
height: 'auto',
|
31
31
|
cursor: 'pointer',
|
32
|
+
width: 'auto',
|
32
33
|
path: {
|
33
34
|
fill: 'neutral.10'
|
34
35
|
},
|
35
|
-
'&.is-focused': _objectSpread({
|
36
|
-
boxShadow: 'none'
|
37
|
-
}, defaultFocus),
|
38
36
|
':focus': {
|
39
37
|
outline: 'none'
|
40
|
-
}
|
38
|
+
},
|
39
|
+
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
40
|
+
boxShadow: 'none',
|
41
|
+
outlineOffset: '1px'
|
42
|
+
})
|
41
43
|
};
|
42
44
|
export default {
|
43
45
|
copy: copy,
|
@@ -18,8 +18,7 @@ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/inst
|
|
18
18
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
19
19
|
import React, { useState } from 'react';
|
20
20
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
21
|
-
import { Badge, Box, Item, Section, Text } from '../../index';
|
22
|
-
import EnvironmentBreadcrumb from './EnvironmentBreadcrumb';
|
21
|
+
import { Badge, Box, EnvironmentBreadcrumb, Item, Section, Text } from '../../index';
|
23
22
|
import EnvironmentBreadcrumbReadme from './EnvironmentBreadcrumb.mdx';
|
24
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
25
24
|
export default {
|
@@ -357,7 +356,7 @@ export var ControlledMenu = function ControlledMenu() {
|
|
357
356
|
}) : null);
|
358
357
|
});
|
359
358
|
};
|
360
|
-
export var
|
359
|
+
export var RightAlignedBadges = function RightAlignedBadges(args) {
|
361
360
|
var _useState13 = useState({
|
362
361
|
name: 'Snail',
|
363
362
|
isSandbox: true
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { FieldHelperText } from '../../index';
|
2
3
|
import statuses from '../../utils/devUtils/constants/statuses';
|
3
|
-
import FieldHelperText from '.';
|
4
4
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
5
|
export default {
|
6
6
|
title: 'Form/Base Components/FieldHelperText',
|
@@ -13,11 +13,10 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
13
13
|
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; }
|
14
14
|
import React, { useState } from 'react';
|
15
15
|
import { v4 as uuidv4 } from 'uuid';
|
16
|
-
import { Box } from '
|
16
|
+
import { Box, FileInputField } from '../../index';
|
17
17
|
import statuses from '../../utils/devUtils/constants/statuses';
|
18
18
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
19
19
|
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
20
|
-
import FileInputField from '.';
|
21
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
22
21
|
export default {
|
23
22
|
title: 'Form/FileInputField',
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
3
|
-
import Box from '
|
3
|
+
import { Box, HelpHint } from '../../index';
|
4
4
|
import HelpHintReadme from './HelpHint.mdx';
|
5
|
-
import HelpHint from '.';
|
6
5
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
6
|
export default {
|
8
7
|
title: 'Components/HelpHint',
|
@@ -2,8 +2,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
2
|
import React from 'react';
|
3
3
|
import GroupIcon from 'mdi-react/AccountGroupIcon';
|
4
4
|
import ArrowIcon from 'mdi-react/ArrowTopRightThickIcon';
|
5
|
-
import { Box, Icon } from '../../index';
|
6
|
-
import IconBadge from '.';
|
5
|
+
import { Box, Icon, IconBadge } from '../../index';
|
7
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
7
|
export default {
|
9
8
|
title: 'Components/IconBadge',
|
@@ -51,7 +51,7 @@ var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
51
51
|
buttonProps = _useButton.buttonProps,
|
52
52
|
isPressed = _useButton.isPressed;
|
53
53
|
var _useContext = useContext(BadgeContext),
|
54
|
-
|
54
|
+
badgeBg = _useContext.bg;
|
55
55
|
var _useHover = useHover(props),
|
56
56
|
hoverProps = _useHover.hoverProps,
|
57
57
|
isHovered = _useHover.isHovered;
|
@@ -73,9 +73,9 @@ var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
73
73
|
tabIndex: 0,
|
74
74
|
className: classNames,
|
75
75
|
"aria-label": ariaLabel,
|
76
|
-
sx:
|
76
|
+
sx: badgeBg && isHovered && {
|
77
77
|
'path': {
|
78
|
-
fill:
|
78
|
+
fill: badgeBg
|
79
79
|
}
|
80
80
|
},
|
81
81
|
variant: "iconButtons.".concat(variant),
|
@@ -9,7 +9,7 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
9
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
10
|
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; }
|
11
11
|
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; }
|
12
|
-
import {
|
12
|
+
import { badgeDeleteButton, deleteButton } from '../Badge/Badge.styles';
|
13
13
|
import { defaultFocus } from '../Button/Buttons.styles';
|
14
14
|
import { toggle } from '../CollapsiblePanel/CollapsiblePanel.styles';
|
15
15
|
import { copyButton } from '../CopyText/CopyText.styles';
|
@@ -136,7 +136,7 @@ export default {
|
|
136
136
|
badge: {
|
137
137
|
deleteButton: deleteButton
|
138
138
|
},
|
139
|
-
|
139
|
+
badgeDeleteButton: badgeDeleteButton,
|
140
140
|
copyButton: copyButton,
|
141
141
|
hintButton: _objectSpread(_objectSpread({}, base), hintButton),
|
142
142
|
inverted: inverted,
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
3
3
|
import React, { useState } from 'react';
|
4
4
|
import EyeOffIcon from 'mdi-react/EyeOffOutlineIcon';
|
5
5
|
import EyeIcon from 'mdi-react/EyeOutlineIcon';
|
6
|
-
import IconButtonToggle from '
|
6
|
+
import { IconButtonToggle } from '../../index';
|
7
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
8
|
export default {
|
9
9
|
title: 'Components/IconButtonToggle',
|
@@ -3,10 +3,9 @@ import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/object
|
|
3
3
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
4
4
|
import React, { useState } from 'react';
|
5
5
|
import isChromatic from 'chromatic/isChromatic';
|
6
|
-
import { Box, Button } from '../../index';
|
6
|
+
import { Box, Button, Image } from '../../index';
|
7
7
|
import { htmlElements } from '../../utils/devUtils/constants/htmlElements';
|
8
8
|
import { chiefIdentityChampions, pingImg } from '../../utils/devUtils/constants/images';
|
9
|
-
import Image from '.';
|
10
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
11
10
|
export default {
|
12
11
|
title: 'Components/Image',
|
@@ -22,7 +22,7 @@ import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
|
22
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
23
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
24
24
|
import React, { useRef, useState } from 'react';
|
25
|
-
import { Image, ImageUploadField, OverlayProvider } from '
|
25
|
+
import { Image, ImageUploadField, OverlayProvider } from '../../index';
|
26
26
|
import statuses from '../../utils/devUtils/constants/statuses';
|
27
27
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
28
28
|
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React from 'react';
|
3
|
-
import Input from '
|
3
|
+
import { Input } from '../../index';
|
4
4
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
5
|
export default {
|
6
6
|
title: 'Form/Base Components/Input',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React from 'react';
|
3
|
+
import { Label } from '../../index';
|
3
4
|
import { modes } from './constants';
|
4
|
-
import Label from '.';
|
5
5
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
6
|
export default {
|
7
7
|
title: 'Form/Base Components/Label',
|
@@ -2,9 +2,9 @@ import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/object
|
|
2
2
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
3
3
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
4
4
|
import React from 'react';
|
5
|
+
import { Link } from '../../index';
|
5
6
|
import { htmlElements } from '../../utils/devUtils/constants/htmlElements';
|
6
7
|
import variants from './Link.styles';
|
7
|
-
import Link from '.';
|
8
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
9
|
export default {
|
10
10
|
title: 'Components/Link',
|
@@ -28,7 +28,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
28
28
|
import React, { useState } from 'react';
|
29
29
|
import { OverlayProvider } from 'react-aria';
|
30
30
|
import { useAsyncList } from 'react-stately';
|
31
|
-
import { Box, Item, LinkSelectField, Separator } from '
|
31
|
+
import { Box, Item, LinkSelectField, Separator } from '../../index';
|
32
32
|
import statuses from '../../utils/devUtils/constants/statuses';
|
33
33
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
34
34
|
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
@@ -1,10 +1,22 @@
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
1
10
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
11
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["children", "className", "isSelected"];
|
12
|
+
var _excluded = ["children", "className", "isHovered", "isSelected", "onHoverChange", "onHoverEnd", "onHoverStart"];
|
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
|
+
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; }
|
4
15
|
import React, { forwardRef } from 'react';
|
5
16
|
import { useHover } from '@react-aria/interactions';
|
6
17
|
import PropTypes from 'prop-types';
|
7
18
|
import { useStatusClasses } from '../../hooks';
|
19
|
+
import { onHoverPropTypes } from '../../utils/devUtils/props/hoverProps';
|
8
20
|
import Box from '../Box/Box';
|
9
21
|
|
10
22
|
/**
|
@@ -12,14 +24,21 @@ import Box from '../Box/Box';
|
|
12
24
|
* Accepts most of the styling props from [styled-system](https://styled-system.com/table).
|
13
25
|
*/
|
14
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
15
|
-
var ListItem = /*#__PURE__*/forwardRef(function (
|
16
|
-
var children =
|
17
|
-
className =
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
27
|
+
var ListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
28
|
+
var children = _ref.children,
|
29
|
+
className = _ref.className,
|
30
|
+
isHovered = _ref.isHovered,
|
31
|
+
isSelected = _ref.isSelected,
|
32
|
+
onHoverChange = _ref.onHoverChange,
|
33
|
+
onHoverEnd = _ref.onHoverEnd,
|
34
|
+
onHoverStart = _ref.onHoverStart,
|
35
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
36
|
+
var _useHover = useHover({
|
37
|
+
onHoverChange: onHoverChange,
|
38
|
+
onHoverEnd: onHoverEnd,
|
39
|
+
onHoverStart: onHoverStart
|
40
|
+
}),
|
41
|
+
hoverProps = _useHover.hoverProps;
|
23
42
|
var _useStatusClasses = useStatusClasses(className, {
|
24
43
|
isHovered: isHovered,
|
25
44
|
isSelected: isSelected
|
@@ -27,14 +46,12 @@ var ListItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
27
46
|
classNames = _useStatusClasses.classNames;
|
28
47
|
return ___EmotionJSX(Box, _extends({
|
29
48
|
className: classNames,
|
30
|
-
role: "listitem",
|
31
49
|
ref: ref,
|
32
|
-
as: "li",
|
33
50
|
variant: "listItem.container",
|
34
51
|
isRow: true
|
35
52
|
}, hoverProps, others), children);
|
36
53
|
});
|
37
|
-
ListItem.propTypes = {
|
54
|
+
ListItem.propTypes = _objectSpread({
|
38
55
|
/**
|
39
56
|
* A list of class names to apply to the element
|
40
57
|
*/
|
@@ -43,7 +60,7 @@ ListItem.propTypes = {
|
|
43
60
|
* Sets the selected state of the ListItem
|
44
61
|
*/
|
45
62
|
isSelected: PropTypes.bool
|
46
|
-
};
|
63
|
+
}, onHoverPropTypes);
|
47
64
|
ListItem.defaultProps = {
|
48
65
|
isSelected: false
|
49
66
|
};
|