@procore/core-react 11.12.0-rc.0 → 11.12.0-rc.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/dist/SuperSelect/SuperSelect.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.js +1 -1
- package/dist/SuperSelect/SuperSelect.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.d.ts +0 -12
- package/dist/SuperSelect/SuperSelect.presets.styles.js +3 -11
- package/dist/SuperSelect/SuperSelect.presets.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.types.d.ts +9 -0
- package/dist/SuperSelect/presets/contactsPreset.d.ts +2 -0
- package/dist/SuperSelect/presets/contactsPreset.js +36 -0
- package/dist/SuperSelect/presets/contactsPreset.js.map +1 -0
- package/dist/SuperSelect/presets/filterPreset.d.ts +2 -0
- package/dist/SuperSelect/presets/filterPreset.js +66 -0
- package/dist/SuperSelect/presets/filterPreset.js.map +1 -0
- package/dist/SuperSelect/presets/index.d.ts +2 -0
- package/dist/SuperSelect/presets/index.js +10 -0
- package/dist/SuperSelect/presets/index.js.map +1 -0
- package/dist/SuperSelect/presets/pillPreset.d.ts +2 -0
- package/dist/SuperSelect/presets/pillPreset.js +37 -0
- package/dist/SuperSelect/presets/pillPreset.js.map +1 -0
- package/dist/SuperSelect/useSuperSelect.d.ts +4 -1
- package/dist/SuperSelect/useSuperSelect.js +2 -1
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Toast/Toast.d.ts +9 -3
- package/dist/Toast/Toast.js +44 -6
- package/dist/Toast/Toast.js.map +1 -1
- package/dist/Toast/Toast.styles.d.ts +5 -1
- package/dist/Toast/Toast.styles.js +11 -3
- package/dist/Toast/Toast.styles.js.map +1 -1
- package/dist/_hooks/I18n.d.ts +5 -0
- package/dist/_locales/en.json +5 -0
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +22 -22
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +11 -11
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +7 -7
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +4 -4
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
- package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +698 -698
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +4 -4
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +71 -71
- package/dist/_typedoc/Modal/Modal.types.json +28 -28
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +38 -38
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +26 -26
- package/dist/_typedoc/PageLayout/PageLayout.types.json +22 -22
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +27 -27
- package/dist/_typedoc/Pill/Pill.types.json +1 -1
- package/dist/_typedoc/PillSelect/PillSelect.types.json +46 -46
- package/dist/_typedoc/Popover/Popover.types.json +10 -10
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +14 -14
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
- package/dist/_typedoc/Select/Select.types.json +32 -32
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +94 -94
- package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +10 -10
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +8 -8
- package/dist/_typedoc/_utils/types.json +3 -3
- package/package.json +2 -2
- package/dist/SuperSelect/SuperSelect.presets.d.ts +0 -2
- package/dist/SuperSelect/SuperSelect.presets.js +0 -120
- package/dist/SuperSelect/SuperSelect.presets.js.map +0 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "",
|
|
11
11
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
12
12
|
"sourceFile": "packages/core-react/src/Typeahead/Typeahead.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typeahead/Typeahead.types.ts#L15"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "onChange",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
22
22
|
"sourceFile": "packages/core-react/src/Typeahead/Typeahead.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typeahead/Typeahead.types.ts#L19"
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
26
|
"description": ""
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "<span>\n Change the HTML tag. This{' '}\n <Link href=\"https://styled-components.com/docs/api#as-polymorphic-prop\">\n prop is from styled-components\n </Link>\n .<em>WARNING</em>: If using TypeScript, it will not switch types and\n some props may error. You can add <Code>// @ts-expect-error</Code>.\n See{' '}\n <Link href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/issues/30117\">\n styled-components issue\n </Link>\n .\n</span>",
|
|
11
11
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<span>\n Change the HTML tag. This{' '}\n <Link href=\"https://styled-components.com/docs/api#as-polymorphic-prop\">\n prop is from styled-components\n </Link>\n .<em>WARNING</em>: If using TypeScript, it will not switch types and\n some props may error. You can add <Code>// @ts-expect-error</Code>.\n See{' '}\n <Link href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/issues/30117\">\n styled-components issue\n </Link>\n .\n</span></div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
12
12
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typography/Typography.types.ts#L35"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "children",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "<span>\n When children are a string or multiple elements, they will be wrapped\n by a <Code>span</Code>. When it is a single element, classnames will\n be added to it instead\n</span>",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<span>\n When children are a string or multiple elements, they will be wrapped\n by a <Code>span</Code>. When it is a single element, classnames will\n be added to it instead\n</span></div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
22
22
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typography/Typography.types.ts#L17"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "className",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"description": "Additional classNames",
|
|
31
31
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
|
|
32
32
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
33
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
33
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/_utils/types.ts#L50"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"name": "color",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"description": "<span>\n Changes font color, can be any of the{' '}\n <Link to=\"/web/style/colors/#hsl-palette\">HSL Palette</Link> css\n strings\n</span>",
|
|
41
41
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<span>\n Changes font color, can be any of the{' '}\n <Link to=\"/web/style/colors/#hsl-palette\">HSL Palette</Link> css\n strings\n</span></div><dl class=\"tsd-comment-tags\"><dt>default</dt><dd><p>'gray15'</p>\n</dd><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
42
42
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
43
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
43
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typography/Typography.types.ts#L46"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"name": "intent",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"description": "Changes the size of the font",
|
|
51
51
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Changes the size of the font</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
52
52
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
53
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
53
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typography/Typography.types.ts#L52"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "italic",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"description": "Applies `font-style: italic` if enabled",
|
|
61
61
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Applies <code>font-style: italic</code> if enabled</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
62
62
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
63
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
63
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typography/Typography.types.ts#L58"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"name": "style",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"description": "Additional CSS styles",
|
|
71
71
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
|
|
72
72
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
73
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
73
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/_utils/types.ts#L55"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"name": "weight",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"description": "Changes font weight if it is supported in the design system",
|
|
81
81
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Changes font weight if it is supported in the design system</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
82
82
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
83
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
83
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/Typography/Typography.types.ts#L64"
|
|
84
84
|
}
|
|
85
85
|
],
|
|
86
86
|
"description": ""
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "Instead of using the default children, you can pass in your own.",
|
|
11
11
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Instead of using the default children, you can pass in your own.</p>\n</div></div>",
|
|
12
12
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/_utils/types.ts#L45"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "className",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Additional classNames",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
|
|
22
22
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/_utils/types.ts#L50"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "style",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"description": "Additional CSS styles",
|
|
31
31
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
|
|
32
32
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
33
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
33
|
+
"sourceUrl": "https://github.com/procore/core/blob/b0c77d96a/packages/core-react/src/_utils/types.ts#L55"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"description": ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/core-react",
|
|
3
|
-
"version": "11.12.0-rc.
|
|
3
|
+
"version": "11.12.0-rc.2",
|
|
4
4
|
"description": "React library of Procore Design Guidelines",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
"react-dom": ">=16.8.0 < 19",
|
|
157
157
|
"styled-components": ">= 5.1.1 < 6"
|
|
158
158
|
},
|
|
159
|
-
"gitHead": "
|
|
159
|
+
"gitHead": "b0c77d96a9458a6ff30476670bdae36935287ae3"
|
|
160
160
|
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { Check } from '@procore/core-icons';
|
|
24
|
-
import React from 'react';
|
|
25
|
-
import { ContactItem } from '../ContactItem';
|
|
26
|
-
import { Pill } from '../Pill/Pill';
|
|
27
|
-
import { PillSelectCheckedContainer } from '../PillSelect/PillSelect.styles';
|
|
28
|
-
import { Popover } from '../Popover';
|
|
29
|
-
import { Tooltip } from '../Tooltip/Tooltip';
|
|
30
|
-
import { Typography } from '../Typography';
|
|
31
|
-
import { OverflowObserver } from '../_hooks/OverflowObserver';
|
|
32
|
-
import { Label } from './SuperSelect.components';
|
|
33
|
-
import { StyledFilterPresetPopoverContent, StyledFilterPresetTrigger, } from './SuperSelect.presets.styles';
|
|
34
|
-
import { PillSelectLabel, PillSelectLabelWrapper, PillSelectOptionWrapper, StyledLabel, } from './SuperSelect.styles';
|
|
35
|
-
import { useSuperSelectContext } from './useSuperSelect';
|
|
36
|
-
var pill = {
|
|
37
|
-
components: {
|
|
38
|
-
Label: React.forwardRef(function (_a, ref) {
|
|
39
|
-
var hoverable = _a.hoverable;
|
|
40
|
-
var ctx = useSuperSelectContext();
|
|
41
|
-
return (React.createElement(StyledLabel, { "$hoverable": hoverable },
|
|
42
|
-
React.createElement(PillSelectLabelWrapper, null,
|
|
43
|
-
React.createElement(OverflowObserver, null, function (_a) {
|
|
44
|
-
var _b;
|
|
45
|
-
var isOverflowing = _a.isOverflowing, ref = _a.ref;
|
|
46
|
-
return (React.createElement(Tooltip, { trigger: isOverflowing ? 'hover' : 'none', overlay: ctx.state.selectedLabel }, ctx.state.isEmpty() ? (React.createElement(Label, { ref: ref, hoverable: hoverable })) : (React.createElement(PillSelectLabel, { ref: ref, color: (_b = ctx.state.selectedOption) === null || _b === void 0 ? void 0 : _b.color }, ctx.state.selectedLabel))));
|
|
47
|
-
}))));
|
|
48
|
-
}),
|
|
49
|
-
OptionLabel: function (_a) {
|
|
50
|
-
var option = _a.option;
|
|
51
|
-
var ctx = useSuperSelectContext();
|
|
52
|
-
return (React.createElement(PillSelectOptionWrapper, null,
|
|
53
|
-
React.createElement(Pill, { color: option.color }, ctx.option.label(option)),
|
|
54
|
-
React.createElement(PillSelectCheckedContainer, null, ctx.option.isSelected(option) && React.createElement(Check, { size: "sm" }))));
|
|
55
|
-
},
|
|
56
|
-
MultiValue: function (_a) {
|
|
57
|
-
var option = _a.option;
|
|
58
|
-
var ctx = useSuperSelectContext();
|
|
59
|
-
return React.createElement(Pill, { color: option.color }, ctx.option.label(option));
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
var filter = {
|
|
64
|
-
multiple: true,
|
|
65
|
-
components: {
|
|
66
|
-
Label: React.forwardRef(function () {
|
|
67
|
-
var ctx = useSuperSelectContext();
|
|
68
|
-
return (React.createElement(StyledLabel, { "$hoverable": false },
|
|
69
|
-
ctx.config.placeholder,
|
|
70
|
-
ctx.state.selectedLabel ? ": ".concat(ctx.state.selectedLabel) : ''));
|
|
71
|
-
}),
|
|
72
|
-
TriggerContainer: React.forwardRef(function (props, ref) {
|
|
73
|
-
var ctx = useSuperSelectContext();
|
|
74
|
-
if (!Array.isArray(ctx.state.value)) {
|
|
75
|
-
return (React.createElement(StyledFilterPresetTrigger, __assign({ "$block": ctx.config.block }, props, { ref: ref })));
|
|
76
|
-
}
|
|
77
|
-
return (React.createElement(Popover, { placement: "top", trigger: ctx.state.value.length > 1 ? 'hover' : 'none', overlay: React.createElement(StyledFilterPresetPopoverContent, null,
|
|
78
|
-
React.createElement(Typography, null, ctx.state.value
|
|
79
|
-
.map(function (v) {
|
|
80
|
-
var option = ctx.state.options.find(function (option) { return ctx.option.value(option) === v; });
|
|
81
|
-
return option ? ctx.option.label(option) : '';
|
|
82
|
-
})
|
|
83
|
-
.join(', '))) },
|
|
84
|
-
React.createElement(StyledFilterPresetTrigger, __assign({ "$block": ctx.config.block }, props, { ref: ref }))));
|
|
85
|
-
}),
|
|
86
|
-
MultiValueContainer: function () {
|
|
87
|
-
var ctx = useSuperSelectContext();
|
|
88
|
-
if (Array.isArray(ctx.state.value)) {
|
|
89
|
-
var label = ctx.state.value.length > 1
|
|
90
|
-
? "(".concat(ctx.state.value.length, ")")
|
|
91
|
-
: ctx.state.value.length === 1
|
|
92
|
-
? "".concat(ctx.state.selectedLabel)
|
|
93
|
-
: '';
|
|
94
|
-
return (React.createElement(StyledLabel, { "$hoverable": false },
|
|
95
|
-
ctx.config.placeholder,
|
|
96
|
-
label ? ": ".concat(label) : ''));
|
|
97
|
-
}
|
|
98
|
-
return React.createElement("div", null, "Value is not an array");
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
selectionStyle: 'highlight',
|
|
102
|
-
};
|
|
103
|
-
var contacts = {
|
|
104
|
-
selectionStyle: 'checkmark',
|
|
105
|
-
components: {
|
|
106
|
-
OptionLabel: function (_a) {
|
|
107
|
-
var option = _a.option, props = __rest(_a, ["option"]);
|
|
108
|
-
return (React.createElement(ContactItem, __assign({}, props, { initials: option.initials, icon: option.icon, disabled: option.disabled }),
|
|
109
|
-
React.createElement(ContactItem.Title, null, option.title),
|
|
110
|
-
React.createElement(ContactItem.Description, null, option.description)));
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
export var presets = {
|
|
115
|
-
'': {},
|
|
116
|
-
contacts: contacts,
|
|
117
|
-
filter: filter,
|
|
118
|
-
pill: pill,
|
|
119
|
-
};
|
|
120
|
-
//# sourceMappingURL=SuperSelect.presets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SuperSelect.presets.js","sourceRoot":"","sources":["../../src/SuperSelect/SuperSelect.presets.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,C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