@kaizen/components 2.0.0 → 2.0.2
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/alpha/README.md +28 -0
- package/alpha/package.json +5 -0
- package/dist/cjs/alpha.cjs +1 -0
- package/dist/cjs/src/Notification/InlineNotification/InlineNotification.cjs +1 -1
- package/dist/cjs/src/__alpha__/SingleSelect/SingleSelect.cjs +35 -74
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.cjs +105 -0
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.module.css.cjs +11 -0
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.cjs +112 -0
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.module.css.cjs +16 -0
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/List/List.cjs +35 -10
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.cjs +61 -8
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.module.css.cjs +10 -1
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.cjs +38 -9
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.module.css.cjs +4 -1
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Popover/Popover.cjs +60 -30
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Popover/Popover.module.css.cjs +2 -1
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Popover/utils/usePopoverPositioning.cjs +2 -1
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Popover/utils/usePositioningStyles.cjs +4 -2
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Select/Select.cjs +87 -0
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Select/Select.module.css.cjs +11 -0
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.cjs +52 -0
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.module.css.cjs +13 -0
- package/dist/esm/alpha.mjs +1 -1
- package/dist/esm/src/Notification/InlineNotification/InlineNotification.mjs +1 -1
- package/dist/esm/src/__alpha__/SingleSelect/SingleSelect.mjs +39 -73
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.mjs +96 -0
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.module.css.mjs +9 -0
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.mjs +103 -0
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.module.css.mjs +14 -0
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/List/List.mjs +37 -14
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.mjs +63 -13
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.module.css.mjs +10 -1
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.mjs +41 -15
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.module.css.mjs +4 -1
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Popover/Popover.mjs +69 -43
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Popover/Popover.module.css.mjs +2 -1
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Popover/utils/usePopoverPositioning.mjs +2 -1
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Popover/utils/usePositioningStyles.mjs +4 -2
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Select/Select.mjs +78 -0
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Select/Select.module.css.mjs +9 -0
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.mjs +43 -0
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.module.css.mjs +11 -0
- package/dist/styles.css +443 -79
- package/dist/types/__alpha__/SingleSelect/SingleSelect.d.ts +14 -19
- package/dist/types/__alpha__/SingleSelect/_docs/mockData.d.ts +3 -0
- package/dist/types/__alpha__/SingleSelect/context/SingleSelectContext.d.ts +15 -7
- package/dist/types/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.d.ts +2 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/ComboBox/index.d.ts +1 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.d.ts +2 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/index.d.ts +1 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/List/List.d.ts +2 -7
- package/dist/types/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.d.ts +2 -7
- package/dist/types/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.d.ts +2 -9
- package/dist/types/__alpha__/SingleSelect/subcomponents/Popover/Popover.d.ts +3 -6
- package/dist/types/__alpha__/SingleSelect/subcomponents/Popover/utils/index.d.ts +1 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/Popover/utils/usePopoverPositioning.d.ts +1 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/Popover/utils/usePositioningStyles.d.ts +1 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/Select/Select.d.ts +2 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/Select/index.d.ts +1 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.d.ts +2 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/SelectTrigger/index.d.ts +1 -0
- package/dist/types/__alpha__/SingleSelect/subcomponents/index.d.ts +4 -1
- package/dist/types/__alpha__/SingleSelect/types.d.ts +68 -11
- package/locales/en.json +9 -1
- package/package.json +9 -2
- package/src/Notification/InlineNotification/InlineNotification.tsx +1 -1
- package/src/__alpha__/SingleSelect/SingleSelect.tsx +35 -88
- package/src/__alpha__/SingleSelect/_docs/SingleSelect.mdx +96 -6
- package/src/__alpha__/SingleSelect/_docs/SingleSelect.spec.stories.tsx +22 -24
- package/src/__alpha__/SingleSelect/_docs/SingleSelect.stickersheet.stories.tsx +389 -33
- package/src/__alpha__/SingleSelect/_docs/SingleSelect.stories.tsx +41 -22
- package/src/__alpha__/SingleSelect/_docs/mockData.ts +20 -14
- package/src/__alpha__/SingleSelect/context/SingleSelectContext.tsx +18 -7
- package/src/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.module.css +35 -0
- package/src/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.tsx +106 -0
- package/src/__alpha__/SingleSelect/subcomponents/ComboBox/index.ts +1 -0
- package/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.module.css +130 -0
- package/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.tsx +121 -0
- package/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/index.ts +1 -0
- package/src/__alpha__/SingleSelect/subcomponents/List/List.module.css +5 -0
- package/src/__alpha__/SingleSelect/subcomponents/List/List.tsx +36 -13
- package/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.module.css +84 -3
- package/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.tsx +67 -11
- package/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.module.css +20 -5
- package/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.tsx +46 -19
- package/src/__alpha__/SingleSelect/subcomponents/Popover/Popover.module.css +7 -5
- package/src/__alpha__/SingleSelect/subcomponents/Popover/Popover.tsx +90 -37
- package/src/__alpha__/SingleSelect/subcomponents/Popover/utils/index.ts +1 -0
- package/src/__alpha__/SingleSelect/subcomponents/Popover/utils/usePopoverPositioning.ts +2 -2
- package/src/__alpha__/SingleSelect/subcomponents/Popover/utils/usePositioningStyles.ts +9 -8
- package/src/__alpha__/SingleSelect/subcomponents/Select/Select.module.css +35 -0
- package/src/__alpha__/SingleSelect/subcomponents/Select/Select.tsx +84 -0
- package/src/__alpha__/SingleSelect/subcomponents/Select/index.ts +1 -0
- package/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.module.css +77 -0
- package/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.tsx +52 -0
- package/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/index.ts +1 -0
- package/src/__alpha__/SingleSelect/subcomponents/index.ts +4 -1
- package/src/__alpha__/SingleSelect/types.ts +94 -14
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.cjs +0 -57
- package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.module.css.cjs +0 -6
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.mjs +0 -49
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.module.css.mjs +0 -4
- package/dist/types/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.d.ts +0 -2
- package/dist/types/__alpha__/SingleSelect/subcomponents/Trigger/index.d.ts +0 -1
- package/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.module.css +0 -19
- package/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.tsx +0 -35
- package/src/__alpha__/SingleSelect/subcomponents/Trigger/index.ts +0 -1
package/alpha/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Entrypoint: alpha
|
|
2
|
+
|
|
3
|
+
This directory is here to redirect any imports from `@kaizen/components/alpha` to the correct distribution of compiled code to allow for treeshaking of alpha components.
|
|
4
|
+
|
|
5
|
+
More details: [https://github.com/theKashey/multiple-entry-points-example](https://github.com/theKashey/multiple-entry-points-example)
|
|
6
|
+
|
|
7
|
+
## Contribution
|
|
8
|
+
|
|
9
|
+
All "alpha" components are to be added to the `src/__alpha__` directory.
|
|
10
|
+
|
|
11
|
+
### What is an "alpha" component?
|
|
12
|
+
|
|
13
|
+
These components are in development phase and not yet ready for use. Imports from this entry point should not be used in production.
|
|
14
|
+
|
|
15
|
+
eg. `SingleSelect` will be built in `alpha`, you can test it and try it out here, but it won't be ready for consumers to adopt until it moved to `next` or root import.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
// How to test an alpha component
|
|
19
|
+
import { SingleSelect } from "@kaizen/components/alpha"
|
|
20
|
+
|
|
21
|
+
// Consumers can only adopt it when it moves to next or the root
|
|
22
|
+
import { SingleSelect } from "@kaizen/components/next"
|
|
23
|
+
import { SingleSelect } from "@kaizen/components"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Eventually, all alpha components are moved to either `next` or root import.
|
|
27
|
+
|
|
28
|
+
More details [Kaizen tech vision & strategy](https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/4630021426/2.+Create+a+predictable+release+and+deprecation+cycle#Solutions)
|
package/dist/cjs/alpha.cjs
CHANGED
|
@@ -27,7 +27,7 @@ var InlineNotification = React.forwardRef(function (_a, ref) {
|
|
|
27
27
|
otherProps = tslib.__rest(_a, ["isSubtle", "hideCloseIcon", "persistent", "classNameOverride"]);
|
|
28
28
|
return React__default.default.createElement(GenericNotification.GenericNotification, tslib.__assign({
|
|
29
29
|
style: "inline",
|
|
30
|
-
persistent: persistent
|
|
30
|
+
persistent: persistent || hideCloseIcon,
|
|
31
31
|
classNameOverride: classnames__default.default(classNameOverride, [isSubtle && GenericNotification_module.subtle]),
|
|
32
32
|
ref: ref
|
|
33
33
|
}, otherProps));
|
|
@@ -2,84 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
var collections = require('@react-stately/collections');
|
|
6
|
+
require('react-aria');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('../../Radio/Radio/Radio.cjs');
|
|
9
|
+
require('../../Radio/RadioField/RadioField.cjs');
|
|
10
|
+
require('../../Radio/RadioGroup/RadioGroup.cjs');
|
|
11
|
+
require('../../Divider/Divider.cjs');
|
|
12
|
+
require('../../Text/Text.cjs');
|
|
13
|
+
require('./context/SingleSelectContext.cjs');
|
|
14
|
+
require('@cultureamp/i18n-react-intl');
|
|
15
|
+
require('../../VisuallyHidden/VisuallyHidden.cjs');
|
|
16
|
+
require('@react-aria/i18n');
|
|
17
|
+
var Select = require('./subcomponents/Select/Select.cjs');
|
|
18
|
+
var ComboBox = require('./subcomponents/ComboBox/ComboBox.cjs');
|
|
13
19
|
function _interopDefault(e) {
|
|
14
20
|
return e && e.__esModule ? e : {
|
|
15
21
|
default: e
|
|
16
22
|
};
|
|
17
23
|
}
|
|
18
24
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
onSelectionChange(key);
|
|
41
|
-
}
|
|
42
|
-
}, [state, onSelectionChange]);
|
|
43
|
-
// Cloning children here to allow users to pass in a custom ListItem or ListSection
|
|
44
|
-
// and still have the SingleSelect handle selection state
|
|
45
|
-
var injectedChildren = React.useMemo(function () {
|
|
46
|
-
if (!React.isValidElement(children)) return null;
|
|
47
|
-
var selectedKeys = state.selectedKey ? new Set([state.selectedKey]) : new Set();
|
|
48
|
-
return React.cloneElement(children, {
|
|
49
|
-
selectionMode: 'single',
|
|
50
|
-
selectedKeys: selectedKeys,
|
|
51
|
-
onSelectionChange: handleOnSelectionChange,
|
|
52
|
-
autoFocus: 'first'
|
|
53
|
-
});
|
|
54
|
-
}, [children, handleOnSelectionChange, state.selectedKey]);
|
|
55
|
-
return React__default.default.createElement(SingleSelectContext.SingleSelectContext.Provider, {
|
|
56
|
-
value: {
|
|
57
|
-
isOpen: state.isOpen,
|
|
58
|
-
setOpen: state.setOpen,
|
|
59
|
-
selectedKey: state.selectedKey,
|
|
60
|
-
items: items,
|
|
61
|
-
anchorName: anchorName
|
|
62
|
-
}
|
|
63
|
-
}, React__default.default.createElement(reactAriaComponents.Select
|
|
64
|
-
// TODO: allow user to pass in label
|
|
65
|
-
, tslib.__assign({
|
|
66
|
-
"aria-label": 'single-select',
|
|
67
|
-
onSelectionChange: function (key) {
|
|
68
|
-
return handleOnSelectionChange(key != null ? new Set([key]) : new Set());
|
|
69
|
-
},
|
|
70
|
-
placeholder: ""
|
|
71
|
-
}, restProps), React__default.default.createElement(Trigger.Trigger, {
|
|
72
|
-
buttonRef: buttonRef
|
|
73
|
-
}), state.isOpen && React__default.default.createElement(Popover.Popover, {
|
|
74
|
-
buttonRef: buttonRef,
|
|
75
|
-
popoverRef: popoverRef,
|
|
76
|
-
racPopoverRef: racPopoverRef
|
|
77
|
-
}, injectedChildren)));
|
|
78
|
-
};
|
|
79
|
-
SingleSelect.displayName = 'SingleSelect';
|
|
80
|
-
SingleSelect.List = List.List;
|
|
81
|
-
SingleSelect.ListItem = ListItem.ListItem;
|
|
82
|
-
SingleSelect.ListSection = ListSection.ListSection;
|
|
83
|
-
return SingleSelect;
|
|
84
|
-
}();
|
|
25
|
+
var SingleSelect = function (props) {
|
|
26
|
+
var isComboBox = props.isComboBox,
|
|
27
|
+
children = props.children,
|
|
28
|
+
rest = tslib.__rest(props, ["isComboBox", "children"]);
|
|
29
|
+
if (isComboBox) {
|
|
30
|
+
return React__default.default.createElement(ComboBox.ComboBox, tslib.__assign({}, rest), children);
|
|
31
|
+
}
|
|
32
|
+
return React__default.default.createElement(Select.Select, tslib.__assign({}, rest), children);
|
|
33
|
+
};
|
|
34
|
+
var Item = React__default.default.forwardRef(function (props, ref) {
|
|
35
|
+
// @ts-expect-error: StatelyItem doesn't know about our internal item props
|
|
36
|
+
return React__default.default.createElement(collections.Item, tslib.__assign({}, props, {
|
|
37
|
+
ref: ref
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
40
|
+
// @ts-expect-error: doesn't know that the Item can have this static property
|
|
41
|
+
Item.getCollectionNode = collections.Item.getCollectionNode;
|
|
42
|
+
Item.displayName = 'SingleSelectItem';
|
|
43
|
+
SingleSelect.Item = Item;
|
|
44
|
+
SingleSelect.Section = collections.Section;
|
|
45
|
+
exports.Item = Item;
|
|
85
46
|
exports.SingleSelect = SingleSelect;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var combobox = require('@react-stately/combobox');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var reactAria = require('react-aria');
|
|
8
|
+
var FieldMessage = require('../../../../FieldMessage/FieldMessage.cjs');
|
|
9
|
+
var Label = require('../../../../Label/Label.cjs');
|
|
10
|
+
var SingleSelectContext = require('../../context/SingleSelectContext.cjs');
|
|
11
|
+
var ComboBoxTrigger = require('../ComboBoxTrigger/ComboBoxTrigger.cjs');
|
|
12
|
+
var List = require('../List/List.cjs');
|
|
13
|
+
var Popover = require('../Popover/Popover.cjs');
|
|
14
|
+
var ComboBox_module = require('./ComboBox.module.css.cjs');
|
|
15
|
+
function _interopDefault(e) {
|
|
16
|
+
return e && e.__esModule ? e : {
|
|
17
|
+
default: e
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
21
|
+
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
22
|
+
var ComboBox = function (props) {
|
|
23
|
+
var _a;
|
|
24
|
+
var items = props.items,
|
|
25
|
+
children = props.children,
|
|
26
|
+
label = props.label,
|
|
27
|
+
description = props.description,
|
|
28
|
+
labelHidden = props.labelHidden,
|
|
29
|
+
_b = props.labelPosition,
|
|
30
|
+
labelPosition = _b === void 0 ? 'top' : _b,
|
|
31
|
+
isReadOnly = props.isReadOnly,
|
|
32
|
+
isDisabled = props.isDisabled,
|
|
33
|
+
_c = props.size,
|
|
34
|
+
size = _c === void 0 ? 'medium' : _c,
|
|
35
|
+
_d = props.variant,
|
|
36
|
+
variant = _d === void 0 ? 'primary' : _d;
|
|
37
|
+
var contains = reactAria.useFilter({
|
|
38
|
+
sensitivity: 'base'
|
|
39
|
+
}).contains;
|
|
40
|
+
var state = combobox.useComboBoxState(tslib.__assign(tslib.__assign({}, props), {
|
|
41
|
+
items: items,
|
|
42
|
+
defaultFilter: contains,
|
|
43
|
+
children: children,
|
|
44
|
+
menuTrigger: 'focus'
|
|
45
|
+
}));
|
|
46
|
+
var inputRef = React.useRef(null);
|
|
47
|
+
var popoverRef = React.useRef(null);
|
|
48
|
+
var listBoxRef = React.useRef(null);
|
|
49
|
+
var buttonRef = React.useRef(null);
|
|
50
|
+
var clearButtonRef = React.useRef(null);
|
|
51
|
+
var triggerWrapperRef = React.useRef(null);
|
|
52
|
+
var _e = reactAria.useComboBox(tslib.__assign(tslib.__assign({}, props), {
|
|
53
|
+
'aria-label': labelHidden ? label : undefined,
|
|
54
|
+
inputRef: inputRef,
|
|
55
|
+
buttonRef: buttonRef,
|
|
56
|
+
popoverRef: popoverRef,
|
|
57
|
+
listBoxRef: listBoxRef
|
|
58
|
+
}), state),
|
|
59
|
+
labelProps = _e.labelProps,
|
|
60
|
+
descriptionProps = _e.descriptionProps,
|
|
61
|
+
inputProps = _e.inputProps,
|
|
62
|
+
listBoxProps = _e.listBoxProps,
|
|
63
|
+
buttonProps = _e.buttonProps;
|
|
64
|
+
var uniqueId = React.useId();
|
|
65
|
+
var anchorName = "--trigger-".concat(uniqueId);
|
|
66
|
+
return React__default.default.createElement(SingleSelectContext.SingleSelectContext.Provider, {
|
|
67
|
+
value: {
|
|
68
|
+
anchorName: anchorName,
|
|
69
|
+
state: state,
|
|
70
|
+
isComboBox: true,
|
|
71
|
+
isDisabled: isDisabled !== null && isDisabled !== void 0 ? isDisabled : false,
|
|
72
|
+
isReadOnly: isReadOnly !== null && isReadOnly !== void 0 ? isReadOnly : false,
|
|
73
|
+
secondary: variant === 'secondary',
|
|
74
|
+
size: size,
|
|
75
|
+
fieldLabel: label
|
|
76
|
+
}
|
|
77
|
+
}, React__default.default.createElement("div", {
|
|
78
|
+
className: labelPosition === 'top' ? ComboBox_module.topLabel : ComboBox_module.sideLabel
|
|
79
|
+
}, !labelHidden && React__default.default.createElement("div", {
|
|
80
|
+
className: classnames__default.default(ComboBox_module.label, (_a = {}, _a[ComboBox_module.labelTop] = labelPosition === 'top', _a))
|
|
81
|
+
}, React__default.default.createElement(Label.Label, tslib.__assign({}, labelProps), label)), React__default.default.createElement("div", {
|
|
82
|
+
className: ComboBox_module.comboBoxTrigger
|
|
83
|
+
}, React__default.default.createElement(ComboBoxTrigger.ComboBoxTrigger, {
|
|
84
|
+
inputProps: inputProps,
|
|
85
|
+
inputRef: inputRef,
|
|
86
|
+
buttonRef: buttonRef,
|
|
87
|
+
buttonProps: buttonProps,
|
|
88
|
+
clearButtonRef: clearButtonRef,
|
|
89
|
+
triggerWrapperRef: triggerWrapperRef
|
|
90
|
+
})), description && React__default.default.createElement("div", {
|
|
91
|
+
className: ComboBox_module.description
|
|
92
|
+
}, React__default.default.createElement(FieldMessage.FieldMessage, tslib.__assign({
|
|
93
|
+
message: description
|
|
94
|
+
}, descriptionProps)))), React__default.default.createElement(Popover.Popover, {
|
|
95
|
+
state: state,
|
|
96
|
+
triggerRef: triggerWrapperRef,
|
|
97
|
+
popoverRef: popoverRef,
|
|
98
|
+
clearButtonRef: clearButtonRef
|
|
99
|
+
}, React__default.default.createElement(List.List, {
|
|
100
|
+
listBoxOptions: listBoxProps,
|
|
101
|
+
state: state,
|
|
102
|
+
listBoxRef: listBoxRef
|
|
103
|
+
})));
|
|
104
|
+
};
|
|
105
|
+
exports.ComboBox = ComboBox;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styles = {
|
|
4
|
+
"topLabel": "ComboBox-module_topLabel__a2t80",
|
|
5
|
+
"sideLabel": "ComboBox-module_sideLabel__B-jX4",
|
|
6
|
+
"label": "ComboBox-module_label__eTnD9",
|
|
7
|
+
"labelTop": "ComboBox-module_labelTop__h6r-z",
|
|
8
|
+
"comboBoxTrigger": "ComboBox-module_comboBoxTrigger__yvqGb",
|
|
9
|
+
"description": "ComboBox-module_description__MDKJ7"
|
|
10
|
+
};
|
|
11
|
+
module.exports = styles;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var i18nReactIntl = require('@cultureamp/i18n-react-intl');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var reactAria = require('react-aria');
|
|
8
|
+
var Icon = require('../../../../Icon/Icon.cjs');
|
|
9
|
+
var VisuallyHidden = require('../../../../VisuallyHidden/VisuallyHidden.cjs');
|
|
10
|
+
var SingleSelectContext = require('../../context/SingleSelectContext.cjs');
|
|
11
|
+
var ComboBoxTrigger_module = require('./ComboBoxTrigger.module.css.cjs');
|
|
12
|
+
function _interopDefault(e) {
|
|
13
|
+
return e && e.__esModule ? e : {
|
|
14
|
+
default: e
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
18
|
+
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
19
|
+
var ClearButton = function (_a) {
|
|
20
|
+
var _b;
|
|
21
|
+
var clearButtonRef = _a.clearButtonRef,
|
|
22
|
+
inputRef = _a.inputRef;
|
|
23
|
+
var _c = SingleSelectContext.useSingleSelectContext(),
|
|
24
|
+
state = _c.state,
|
|
25
|
+
isComboBox = _c.isComboBox,
|
|
26
|
+
fieldLabel = _c.fieldLabel;
|
|
27
|
+
var formatMessage = i18nReactIntl.useIntl().formatMessage;
|
|
28
|
+
var clearButtonAlt = formatMessage({
|
|
29
|
+
id: 'singleSelect.clearButtonAlt',
|
|
30
|
+
defaultMessage: 'Clear {field} selection',
|
|
31
|
+
description: 'Alt text for the clear selection button'
|
|
32
|
+
}, {
|
|
33
|
+
field: fieldLabel
|
|
34
|
+
});
|
|
35
|
+
var buttonProps = reactAria.useButton({
|
|
36
|
+
onPress: function () {
|
|
37
|
+
var _a;
|
|
38
|
+
if (isComboBox) {
|
|
39
|
+
state.setSelectedKey(null);
|
|
40
|
+
}
|
|
41
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
42
|
+
}
|
|
43
|
+
}, clearButtonRef).buttonProps;
|
|
44
|
+
return React__default.default.createElement("button", tslib.__assign({}, buttonProps, {
|
|
45
|
+
ref: clearButtonRef,
|
|
46
|
+
type: "button",
|
|
47
|
+
className: classnames__default.default(ComboBoxTrigger_module.clearButton, (_b = {}, _b[ComboBoxTrigger_module.hidden] = !state.selectedKey, _b)),
|
|
48
|
+
tabIndex: 0
|
|
49
|
+
}), React__default.default.createElement(Icon.Icon, {
|
|
50
|
+
name: "cancel",
|
|
51
|
+
isPresentational: true,
|
|
52
|
+
isFilled: true
|
|
53
|
+
}), React__default.default.createElement(VisuallyHidden.VisuallyHidden, null, clearButtonAlt));
|
|
54
|
+
};
|
|
55
|
+
var ChevronButton = function (props) {
|
|
56
|
+
var _a = SingleSelectContext.useSingleSelectContext(),
|
|
57
|
+
state = _a.state,
|
|
58
|
+
fieldLabel = _a.fieldLabel;
|
|
59
|
+
var formatMessage = i18nReactIntl.useIntl().formatMessage;
|
|
60
|
+
var chevronButton = formatMessage({
|
|
61
|
+
id: 'singleSelect.chevronButton',
|
|
62
|
+
defaultMessage: 'Show suggestions for {field}',
|
|
63
|
+
description: 'Aria label text for the SingleSelect button to open and close suggestions list'
|
|
64
|
+
}, {
|
|
65
|
+
field: fieldLabel
|
|
66
|
+
});
|
|
67
|
+
var buttonProps = reactAria.useButton(tslib.__assign(tslib.__assign({}, props), {
|
|
68
|
+
'aria-label': String(chevronButton),
|
|
69
|
+
'aria-labelledby': undefined
|
|
70
|
+
}), props.buttonRef).buttonProps;
|
|
71
|
+
return React__default.default.createElement("button", tslib.__assign({
|
|
72
|
+
type: "button"
|
|
73
|
+
}, buttonProps, {
|
|
74
|
+
ref: props.buttonRef,
|
|
75
|
+
className: ComboBoxTrigger_module.chevronButton,
|
|
76
|
+
tabIndex: -1
|
|
77
|
+
}), React__default.default.createElement(Icon.Icon, {
|
|
78
|
+
isPresentational: true,
|
|
79
|
+
name: state.isOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down'
|
|
80
|
+
}));
|
|
81
|
+
};
|
|
82
|
+
var ComboBoxTrigger = function (_a) {
|
|
83
|
+
var _b, _c;
|
|
84
|
+
var inputProps = _a.inputProps,
|
|
85
|
+
inputRef = _a.inputRef,
|
|
86
|
+
buttonProps = _a.buttonProps,
|
|
87
|
+
buttonRef = _a.buttonRef,
|
|
88
|
+
triggerWrapperRef = _a.triggerWrapperRef,
|
|
89
|
+
clearButtonRef = _a.clearButtonRef;
|
|
90
|
+
var _d = SingleSelectContext.useSingleSelectContext(),
|
|
91
|
+
anchorName = _d.anchorName,
|
|
92
|
+
isDisabled = _d.isDisabled,
|
|
93
|
+
isReadOnly = _d.isReadOnly,
|
|
94
|
+
secondary = _d.secondary,
|
|
95
|
+
size = _d.size;
|
|
96
|
+
return React__default.default.createElement(React__default.default.Fragment, null, React__default.default.createElement("div", {
|
|
97
|
+
style: {
|
|
98
|
+
'--anchor-name': anchorName
|
|
99
|
+
},
|
|
100
|
+
ref: triggerWrapperRef,
|
|
101
|
+
className: classnames__default.default(ComboBoxTrigger_module.trigger, (_b = {}, _b[ComboBoxTrigger_module.disabled] = isDisabled, _b[ComboBoxTrigger_module.readOnly] = isReadOnly, _b[ComboBoxTrigger_module.secondary] = secondary, _b[ComboBoxTrigger_module.small] = size === 'small', _b[ComboBoxTrigger_module.large] = size === 'large', _b))
|
|
102
|
+
}, React__default.default.createElement("input", tslib.__assign({}, inputProps, {
|
|
103
|
+
ref: inputRef,
|
|
104
|
+
className: classnames__default.default(ComboBoxTrigger_module.input, (_c = {}, _c[ComboBoxTrigger_module.smallText] = size === 'small', _c))
|
|
105
|
+
})), !isDisabled && !isReadOnly && React__default.default.createElement(ClearButton, {
|
|
106
|
+
clearButtonRef: clearButtonRef,
|
|
107
|
+
inputRef: inputRef
|
|
108
|
+
}), !isReadOnly && React__default.default.createElement(ChevronButton, tslib.__assign({}, buttonProps, {
|
|
109
|
+
buttonRef: buttonRef
|
|
110
|
+
}))));
|
|
111
|
+
};
|
|
112
|
+
exports.ComboBoxTrigger = ComboBoxTrigger;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styles = {
|
|
4
|
+
"trigger": "ComboBoxTrigger-module_trigger__p6pcn",
|
|
5
|
+
"smallText": "ComboBoxTrigger-module_smallText__Vj2Ya",
|
|
6
|
+
"secondary": "ComboBoxTrigger-module_secondary__TvNTK",
|
|
7
|
+
"disabled": "ComboBoxTrigger-module_disabled__BkFJy",
|
|
8
|
+
"readOnly": "ComboBoxTrigger-module_readOnly__g6-fB",
|
|
9
|
+
"input": "ComboBoxTrigger-module_input__TkoLg",
|
|
10
|
+
"small": "ComboBoxTrigger-module_small__-225Z",
|
|
11
|
+
"large": "ComboBoxTrigger-module_large__kj1vw",
|
|
12
|
+
"clearButton": "ComboBoxTrigger-module_clearButton__PlsuZ",
|
|
13
|
+
"chevronButton": "ComboBoxTrigger-module_chevronButton__rzv2v",
|
|
14
|
+
"hidden": "ComboBoxTrigger-module_hidden__zC13w"
|
|
15
|
+
};
|
|
16
|
+
module.exports = styles;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var reactAria = require('react-aria');
|
|
6
|
+
var ListItem = require('../ListItem/ListItem.cjs');
|
|
7
|
+
var ListSection = require('../ListSection/ListSection.cjs');
|
|
7
8
|
var List_module = require('./List.module.css.cjs');
|
|
8
9
|
function _interopDefault(e) {
|
|
9
10
|
return e && e.__esModule ? e : {
|
|
@@ -11,14 +12,38 @@ function _interopDefault(e) {
|
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
14
|
-
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
15
15
|
var List = function (_a) {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
16
|
+
var state = _a.state,
|
|
17
|
+
listBoxOptions = _a.listBoxOptions,
|
|
18
|
+
listBoxRef = _a.listBoxRef;
|
|
19
|
+
var listBoxProps = reactAria.useListBox(tslib.__assign(tslib.__assign({}, listBoxOptions), {
|
|
20
|
+
autoFocus: 'first'
|
|
21
|
+
}), state, listBoxRef).listBoxProps;
|
|
22
|
+
var renderNode = function (node) {
|
|
23
|
+
if (node.type === 'section') {
|
|
24
|
+
return node.rendered ? React__default.default.createElement(ListSection.ListSection, {
|
|
25
|
+
key: String(node.key),
|
|
26
|
+
section: node,
|
|
27
|
+
state: state
|
|
28
|
+
}) : null;
|
|
29
|
+
} else {
|
|
30
|
+
var _a = node.props,
|
|
31
|
+
selectedIcon = _a.selectedIcon,
|
|
32
|
+
selectedPosition = _a.selectedPosition,
|
|
33
|
+
className = _a.className;
|
|
34
|
+
return React__default.default.createElement(ListItem.ListItem, {
|
|
35
|
+
key: String(node.key),
|
|
36
|
+
item: node,
|
|
37
|
+
state: state,
|
|
38
|
+
selectedIcon: selectedIcon,
|
|
39
|
+
selectedPosition: selectedPosition,
|
|
40
|
+
className: className
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return React__default.default.createElement("ul", tslib.__assign({}, listBoxProps, {
|
|
45
|
+
ref: listBoxRef,
|
|
46
|
+
className: List_module.list
|
|
47
|
+
}), Array.from(state.collection).map(renderNode));
|
|
22
48
|
};
|
|
23
|
-
List.displayName = 'SingleSelect.List';
|
|
24
49
|
exports.List = List;
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var classnames = require('classnames');
|
|
6
|
-
var
|
|
6
|
+
var reactAria = require('react-aria');
|
|
7
|
+
var Icon = require('../../../../Icon/Icon.cjs');
|
|
8
|
+
var Radio = require('../../../../Radio/Radio/Radio.cjs');
|
|
9
|
+
require('../../../../Radio/RadioField/RadioField.cjs');
|
|
10
|
+
require('../../../../Radio/RadioGroup/RadioGroup.cjs');
|
|
7
11
|
var ListItem_module = require('./ListItem.module.css.cjs');
|
|
8
12
|
function _interopDefault(e) {
|
|
9
13
|
return e && e.__esModule ? e : {
|
|
@@ -13,12 +17,61 @@ function _interopDefault(e) {
|
|
|
13
17
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
14
18
|
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
15
19
|
var ListItem = function (_a) {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
var _b;
|
|
21
|
+
var item = _a.item,
|
|
22
|
+
state = _a.state,
|
|
23
|
+
_c = _a.selectedIcon,
|
|
24
|
+
selectedIcon = _c === void 0 ? 'check' : _c,
|
|
25
|
+
_d = _a.selectedPosition,
|
|
26
|
+
selectedPosition = _d === void 0 ? 'end' : _d,
|
|
27
|
+
className = _a.className;
|
|
28
|
+
var ref = React__default.default.useRef(null);
|
|
29
|
+
var _e = reactAria.useOption({
|
|
30
|
+
key: item.key
|
|
31
|
+
}, state, ref),
|
|
32
|
+
optionProps = _e.optionProps,
|
|
33
|
+
isSelected = _e.isSelected,
|
|
34
|
+
isDisabled = _e.isDisabled,
|
|
35
|
+
isFocused = _e.isFocused;
|
|
36
|
+
var isStart = selectedPosition === 'start';
|
|
37
|
+
var isEnd = selectedPosition === 'end';
|
|
38
|
+
var isCheck = selectedIcon === 'check';
|
|
39
|
+
var isRadio = selectedIcon === 'radio';
|
|
40
|
+
var renderSelectionIcon = function () {
|
|
41
|
+
if (isCheck) {
|
|
42
|
+
if (isSelected) {
|
|
43
|
+
return React__default.default.createElement("div", {
|
|
44
|
+
className: ListItem_module.selectedIconWrapper
|
|
45
|
+
}, React__default.default.createElement(Icon.Icon, {
|
|
46
|
+
name: "check",
|
|
47
|
+
isPresentational: true,
|
|
48
|
+
className: ListItem_module.iconChecked
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
return isStart ? React__default.default.createElement("div", {
|
|
52
|
+
className: ListItem_module.emptySpacer
|
|
53
|
+
}) : null;
|
|
54
|
+
}
|
|
55
|
+
if (isRadio) {
|
|
56
|
+
return React__default.default.createElement("div", {
|
|
57
|
+
className: ListItem_module.selectedIconWrapper
|
|
58
|
+
}, React__default.default.createElement(Radio.Radio, {
|
|
59
|
+
id: item.textValue,
|
|
60
|
+
name: item.textValue,
|
|
61
|
+
selectedStatus: isSelected
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
};
|
|
66
|
+
return React__default.default.createElement("li", tslib.__assign({
|
|
67
|
+
key: item.key
|
|
68
|
+
}, optionProps, {
|
|
69
|
+
ref: ref,
|
|
70
|
+
className: classnames__default.default(ListItem_module.listItem, (_b = {}, _b[ListItem_module.focused] = isFocused, _b[ListItem_module.disabled] = isDisabled, _b[ListItem_module.selected] = isSelected, _b[ListItem_module.selectedStartPosition] = isStart, _b))
|
|
71
|
+
}), isStart && renderSelectionIcon(), typeof item.rendered === 'string' ? React__default.default.createElement("span", {
|
|
72
|
+
className: classnames__default.default(ListItem_module.itemText, className)
|
|
73
|
+
}, item.rendered) : React__default.default.createElement("span", {
|
|
74
|
+
className: classnames__default.default(ListItem_module.itemContent, className)
|
|
75
|
+
}, item.rendered), isEnd && renderSelectionIcon());
|
|
22
76
|
};
|
|
23
|
-
ListItem.displayName = 'SingleSelect.ListItem';
|
|
24
77
|
exports.ListItem = ListItem;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var styles = {
|
|
4
|
-
"listItem": "ListItem-module_listItem__xGr6A"
|
|
4
|
+
"listItem": "ListItem-module_listItem__xGr6A",
|
|
5
|
+
"focused": "ListItem-module_focused__au3J5",
|
|
6
|
+
"selected": "ListItem-module_selected__IV3-p",
|
|
7
|
+
"disabled": "ListItem-module_disabled__A2QFo",
|
|
8
|
+
"iconChecked": "ListItem-module_iconChecked__co4xD",
|
|
9
|
+
"itemContent": "ListItem-module_itemContent__x4h7q",
|
|
10
|
+
"itemText": "ListItem-module_itemText__O4Ddg",
|
|
11
|
+
"selectedStartPosition": "ListItem-module_selectedStartPosition__2N3bw",
|
|
12
|
+
"selectedIconWrapper": "ListItem-module_selectedIconWrapper__w-ECd",
|
|
13
|
+
"emptySpacer": "ListItem-module_emptySpacer__qeRpQ"
|
|
5
14
|
};
|
|
6
15
|
module.exports = styles;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var classnames = require('classnames');
|
|
6
|
-
var
|
|
6
|
+
var reactAria = require('react-aria');
|
|
7
|
+
var Divider = require('../../../../Divider/Divider.cjs');
|
|
8
|
+
var ListItem = require('../ListItem/ListItem.cjs');
|
|
7
9
|
var ListSection_module = require('./ListSection.module.css.cjs');
|
|
8
10
|
function _interopDefault(e) {
|
|
9
11
|
return e && e.__esModule ? e : {
|
|
@@ -13,13 +15,40 @@ function _interopDefault(e) {
|
|
|
13
15
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
14
16
|
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
15
17
|
var ListSection = function (_a) {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
var _b;
|
|
19
|
+
var section = _a.section,
|
|
20
|
+
state = _a.state;
|
|
21
|
+
var _c = reactAria.useListBoxSection({
|
|
22
|
+
'heading': section.rendered,
|
|
23
|
+
'aria-label': section['aria-label']
|
|
24
|
+
}),
|
|
25
|
+
headingProps = _c.headingProps,
|
|
26
|
+
itemProps = _c.itemProps,
|
|
27
|
+
groupProps = _c.groupProps;
|
|
28
|
+
var firstSectionHeader = section.key === state.collection.getFirstKey();
|
|
29
|
+
return React__default.default.createElement(React__default.default.Fragment, {
|
|
30
|
+
key: section.key
|
|
31
|
+
}, !firstSectionHeader && React__default.default.createElement("li", {
|
|
32
|
+
role: "presentation",
|
|
33
|
+
"aria-hidden": true
|
|
34
|
+
}), !firstSectionHeader && React__default.default.createElement(Divider.Divider, {
|
|
35
|
+
variant: "content"
|
|
36
|
+
}), React__default.default.createElement("li", tslib.__assign({}, itemProps, {
|
|
37
|
+
className: classnames__default.default(ListSection_module.sectionWrapper, (_b = {}, _b[ListSection_module.firstSectionHeader] = firstSectionHeader, _b))
|
|
38
|
+
}), section.rendered && React__default.default.createElement("span", tslib.__assign({}, headingProps, {
|
|
39
|
+
role: "presentation",
|
|
40
|
+
"aria-hidden": true,
|
|
41
|
+
className: ListSection_module.listSectionHeader
|
|
42
|
+
}), section.rendered), React__default.default.createElement("ul", tslib.__assign({
|
|
43
|
+
key: "".concat(section.key, "-group-contents")
|
|
44
|
+
}, groupProps, {
|
|
45
|
+
className: ListSection_module.listSectionGroup
|
|
46
|
+
}), Array.from(section.childNodes).map(function (node) {
|
|
47
|
+
return React__default.default.createElement(ListItem.ListItem, {
|
|
48
|
+
key: node.key,
|
|
49
|
+
item: node,
|
|
50
|
+
state: state
|
|
51
|
+
});
|
|
52
|
+
}))));
|
|
23
53
|
};
|
|
24
|
-
ListSection.displayName = 'SingleSelect.ListSection';
|
|
25
54
|
exports.ListSection = ListSection;
|
package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.module.css.cjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var styles = {
|
|
4
|
-
"
|
|
4
|
+
"sectionWrapper": "ListSection-module_sectionWrapper__gxh41",
|
|
5
|
+
"firstSectionHeader": "ListSection-module_firstSectionHeader__zPUIZ",
|
|
6
|
+
"listSectionHeader": "ListSection-module_listSectionHeader__bptHg",
|
|
7
|
+
"listSectionGroup": "ListSection-module_listSectionGroup__PoUPf"
|
|
5
8
|
};
|
|
6
9
|
module.exports = styles;
|