@procore/core-react 11.25.1 → 11.26.0
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/babel.config.js +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.d.ts +8 -0
- package/dist/Banner/Banner.js +13 -2
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.js +16 -11
- package/dist/Banner/Banner.styles.js.map +1 -1
- package/dist/Banner/Banner.types.d.ts +4 -2
- package/dist/Banner/Banner.types.js.map +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/Banner/index.js.map +1 -1
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +10 -10
- package/dist/DetailPage/DetailPage.styles.js.map +1 -1
- package/dist/DetailPage/examples/TableExample.d.ts +2 -0
- package/dist/DetailPage/examples/TableExample.js +141 -0
- package/dist/DetailPage/examples/TableExample.js.map +1 -0
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +16 -16
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +2 -2
- package/dist/Link/Link.styles.js.map +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +14 -14
- package/dist/PageLayout/PageLayout.styles.js.map +1 -1
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.d.ts +1 -1
- package/dist/Section/Section.styles.js +6 -6
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.d.ts +6 -1
- package/dist/Semantic/Semantic.js +7 -1
- package/dist/Semantic/Semantic.js.map +1 -1
- package/dist/Semantic/Semantic.styles.d.ts +14 -4
- package/dist/Semantic/Semantic.styles.js +20 -10
- package/dist/Semantic/Semantic.styles.js.map +1 -1
- package/dist/Semantic/index.d.ts +1 -1
- package/dist/Semantic/index.js +1 -1
- package/dist/Semantic/index.js.map +1 -1
- package/dist/Sidebar/Sidebar.styles.js +7 -7
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +8 -8
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.js +6 -1
- package/dist/TieredSelect/TieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.d.ts +2 -2
- package/dist/Title/Title.js.map +1 -1
- package/dist/Title/Title.styles.d.ts +2 -1
- package/dist/Title/Title.styles.js +13 -10
- package/dist/Title/Title.styles.js.map +1 -1
- package/dist/Title/Title.types.d.ts +7 -0
- package/dist/Title/Title.types.js.map +1 -1
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/ScrollLock.js +11 -0
- package/dist/_hooks/ScrollLock.js.map +1 -1
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +16 -16
- 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 +9 -9
- 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 +726 -726
- 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 +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +41 -41
- 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 +31 -31
- 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 +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +47 -47
- package/dist/_typedoc/Popover/Popover.types.json +14 -14
- 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 +57 -57
- 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 +97 -97
- package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
- 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 +4 -4
- 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/Title/Title.types.json +23 -0
- 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/dist/_utils/propsTypedoc.d.ts +1 -0
- package/dist/_utils/propsTypedoc.js +1 -0
- package/dist/_utils/propsTypedoc.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +13 -10
- package/tsconfig.prod.json +7 -1
- package/dist/FileSelect/SourceItem/SourceItem.test.js +0 -53
- package/dist/MultiSelect/MultiSelect.test.js +0 -250
- package/dist/OverlayTrigger/OverlayTrigger.test.js +0 -483
- package/dist/SuperSelect/SuperSelect.utils.test.js +0 -717
- package/dist/SuperSelect/useSuperSelect.test.js +0 -1284
- package/dist/_hooks/OverflowObserver/OverflowObserver.test.js +0 -110
- package/dist/_hooks/__tests__/Anchor.test.js +0 -109
- package/dist/_hooks/__tests__/BoundingRect.test.js +0 -85
- package/dist/_hooks/__tests__/Buffer.test.js +0 -76
- package/dist/_hooks/__tests__/DateTime.test.js +0 -136
- package/dist/_hooks/__tests__/DelayedCallback.test.js +0 -119
- package/dist/_hooks/__tests__/DelayedToggle.test.js +0 -50
- package/dist/_hooks/__tests__/Deprecation.test.js +0 -58
- package/dist/_hooks/__tests__/Event.test.js +0 -46
- package/dist/_hooks/__tests__/EventListener.test.js +0 -124
- package/dist/_hooks/__tests__/Hotkey.test.js +0 -18
- package/dist/_hooks/__tests__/InjectedScript.test.js +0 -80
- package/dist/_hooks/__tests__/ListNavigation.test.js +0 -101
- package/dist/_hooks/__tests__/TextEntry.test.js +0 -92
- package/dist/_hooks/__tests__/Timer.test.js +0 -60
- package/dist/_hooks/__tests__/Trigger.test.js +0 -52
- package/dist/_hooks/__tests__/Visibility.test.js +0 -86
- package/dist/_hooks/__tests__/ZIndex.test.js +0 -76
- package/dist/_utils/__tests__/CalendarHelpers.test.js +0 -64
- package/dist/_utils/__tests__/filename.test.js +0 -27
- package/dist/_utils/__tests__/getAnchorPosition.test.js +0 -250
- package/dist/_utils/__tests__/mergeRefs.test.js +0 -58
- package/dist/_utils/__tests__/slotify.test.js +0 -152
|
@@ -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/aae70d7/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/aae70d7/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/aae70d7/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/aae70d7/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/aae70d7/packages/core-react/src/_utils/types.ts#L47"
|
|
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/aae70d7/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/aae70d7/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/aae70d7/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/aae70d7/packages/core-react/src/_utils/types.ts#L52"
|
|
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/aae70d7/packages/core-react/src/Typography/Typography.types.ts#L64"
|
|
84
84
|
}
|
|
85
85
|
],
|
|
86
86
|
"description": ""
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "",
|
|
11
11
|
"descriptionHtml": "",
|
|
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/aae70d7/packages/core-react/src/_utils/types.ts#L42"
|
|
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/aae70d7/packages/core-react/src/_utils/types.ts#L47"
|
|
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/aae70d7/packages/core-react/src/_utils/types.ts#L52"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"description": ""
|
|
@@ -62,6 +62,7 @@ export type { BaseThumbnailProps, PlaceholderProps, ThumbnailProps, } from '../T
|
|
|
62
62
|
export * from '../TieredDropdown/TieredDropdown.types';
|
|
63
63
|
export type { TieredSelectProps } from '../TieredSelect/TieredSelect.types';
|
|
64
64
|
export * from '../Tile/Tile.types';
|
|
65
|
+
export * from '../Title/Title.types';
|
|
65
66
|
export * from '../Toast/Toast.types';
|
|
66
67
|
export * from '../ToggleButton/ToggleButton.types';
|
|
67
68
|
export * from '../Token/Token.types';
|
|
@@ -52,6 +52,7 @@ export * from '../TextEditor/TextEditor.types';
|
|
|
52
52
|
export * from '../TextEditorOutput/TextEditorOutput.types';
|
|
53
53
|
export * from '../TieredDropdown/TieredDropdown.types';
|
|
54
54
|
export * from '../Tile/Tile.types';
|
|
55
|
+
export * from '../Title/Title.types';
|
|
55
56
|
export * from '../Toast/Toast.types';
|
|
56
57
|
export * from '../ToggleButton/ToggleButton.types';
|
|
57
58
|
export * from '../Token/Token.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propsTypedoc.js","names":[],"sources":["../../src/_utils/propsTypedoc.ts"],"sourcesContent":["export * from '../Avatar/Avatar.types'\nexport * from '../AvatarStack/AvatarStack.types'\nexport * from '../Badge/Badge.types'\nexport * from '../Banner/Banner.types'\n/* Layouts */\nexport * from '../Box/Box.types'\nexport * from '../Breadcrumbs/Breadcrumbs.types'\nexport * from '../Button/Button.types'\nexport type {\n BodyProps,\n CalendarContainerProps,\n CalendarProps,\n DayProps,\n NavigationProps,\n NextPrevProps,\n SelectProps as CalendarSelectProps,\n WeekdaysProps,\n WeekProps,\n} from '../Calendar/Calendar.types'\nexport * from '../Card/Card.types'\nexport * from '../Checkbox/Checkbox.types'\nexport * from '../ContactItem/ContactItem.types'\nexport * from '../DateInput/DateInput.types'\nexport * from '../DateSelect/DateSelect.types'\nexport type { DetailPageProps } from '../DetailPage/DetailPage.types'\nexport * from '../Dropdown/Dropdown.types'\nexport * from '../DropdownFlyout/DropdownFlyout.types'\nexport * from '../Dropzone/Dropzone.types'\nexport * from '../EmptyState/EmptyState.types'\nexport * from '../FileList/FileList.types'\nexport type {\n FileSelectProps,\n QaTags as FileSelectQaTags,\n} from '../FileSelect/FileSelect.types'\nexport * from '../FileSelect/GridSource/GridSource.types'\nexport type { LocalSourceProps } from '../FileSelect/LocalSource/LocalSource.types'\nexport * from '../FileSelect/TreeSource/TreeSource.types'\nexport * from '../Flex/Flex.types'\nexport * from '../FlexList/FlexList.types'\nexport * from '../Form/Form.types'\nexport * from '../Grid/Grid.types'\nexport * from '../GroupSelect/GroupSelect.types'\nexport * from '../Input/Input.types'\nexport * from '../Link/Link.types'\nexport * from '../ListPage/ListPage.types'\nexport type {\n MenuFooterProps,\n MenuGroupProps,\n MenuHeaderProps,\n MenuItemProps,\n MenuOptionsProps,\n MenuProps,\n MenuSearchProps,\n} from '../Menu/Menu.types'\nexport * from '../MenuImperative/MenuImperative.types'\nexport * from '../Modal/Modal.types'\nexport type { MultiSelectProps } from '../MultiSelect/MultiSelect.types'\nexport * from '../Notation/Notation.types'\nexport * from '../NumberInput/NumberInput.types'\nexport * from '../OverlayTrigger/OverlayTrigger.types'\nexport * from '../PageLayout/PageLayout.types'\nexport type { PresetPaginationProps } from '../Pagination/Pagination.types'\nexport * from '../Panel/Panel.types'\nexport * from '../Pill/Pill.types'\nexport * from '../PillSelect/PillSelect.types'\nexport * from '../Popover/Popover.types'\nexport * from '../ProgressBar/ProgressBar.types'\nexport * from '../RadioButton/RadioButton.types'\nexport * from '../Required/Required.types'\nexport * from '../Search/Search.types'\nexport * from '../Section/Section.types'\nexport * from '../SegmentedController/SegmentedController.types'\nexport * from '../Select/Select.types'\nexport * from '../Slider/Slider.types'\nexport * from '../Spinner/Spinner.types'\nexport * from '../Switch/Switch.types'\nexport type {\n BodyCellProps,\n BodyRowProps,\n CaratProps,\n CurrencyCellProps,\n DateSelectCellProps,\n GroupProps,\n GroupTitleProps,\n HeaderCellProps,\n IconCellProps,\n InputCellProps,\n LinkCellProps,\n SelectCellProps,\n TableProps,\n TableTextCellProps as TextCellProps,\n TextAreaCellProps,\n} from '../Table/Table.types'\nexport type { BaseTabProps, TabsProps } from '../Tabs/Tabs.types'\nexport * from '../Tearsheet/Tearsheet.types'\nexport * from '../TextArea/TextArea.types'\nexport * from '../TextEditor/TextEditor.types'\nexport * from '../TextEditorOutput/TextEditorOutput.types'\nexport type {\n BaseThumbnailProps,\n PlaceholderProps,\n ThumbnailProps,\n} from '../Thumbnail/Thumbnail.types'\nexport * from '../TieredDropdown/TieredDropdown.types'\nexport type { TieredSelectProps } from '../TieredSelect/TieredSelect.types'\nexport * from '../Tile/Tile.types'\nexport * from '../Toast/Toast.types'\nexport * from '../ToggleButton/ToggleButton.types'\nexport * from '../Token/Token.types'\nexport * from '../ToolHeader/ToolHeader.types'\nexport * from '../Tooltip/Tooltip.types'\nexport * from '../Tree/Tree.types'\nexport * from '../Typeahead/Typeahead.types'\nexport * from '../Typography/Typography.types'\n/* Utilities */\nexport type { Props } from './types'\n\n/* Components without a .types file */\n// export * from '../CurrencyInput/CurrencyInput.types'\n// export * from \"../Semantic/Semantic.types\"\n"],"mappings":"AAAA,cAAc,wBAAwB;AACtC,cAAc,kCAAkC;AAChD,cAAc,sBAAsB;AACpC,cAAc,wBAAwB;AACtC;AACA,cAAc,kBAAkB;AAChC,cAAc,kCAAkC;AAChD,cAAc,wBAAwB;AAYtC,cAAc,oBAAoB;AAClC,cA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avatar.types'\nexport * from '../AvatarStack/AvatarStack.types'\nexport * from '../Badge/Badge.types'\nexport * from '../Banner/Banner.types'\n/* Layouts */\nexport * from '../Box/Box.types'\nexport * from '../Breadcrumbs/Breadcrumbs.types'\nexport * from '../Button/Button.types'\nexport type {\n BodyProps,\n CalendarContainerProps,\n CalendarProps,\n DayProps,\n NavigationProps,\n NextPrevProps,\n SelectProps as CalendarSelectProps,\n WeekdaysProps,\n WeekProps,\n} from '../Calendar/Calendar.types'\nexport * from '../Card/Card.types'\nexport * from '../Checkbox/Checkbox.types'\nexport * from '../ContactItem/ContactItem.types'\nexport * from '../DateInput/DateInput.types'\nexport * from '../DateSelect/DateSelect.types'\nexport type { DetailPageProps } from '../DetailPage/DetailPage.types'\nexport * from '../Dropdown/Dropdown.types'\nexport * from '../DropdownFlyout/DropdownFlyout.types'\nexport * from '../Dropzone/Dropzone.types'\nexport * from '../EmptyState/EmptyState.types'\nexport * from '../FileList/FileList.types'\nexport type {\n FileSelectProps,\n QaTags as FileSelectQaTags,\n} from '../FileSelect/FileSelect.types'\nexport * from '../FileSelect/GridSource/GridSource.types'\nexport type { LocalSourceProps } from '../FileSelect/LocalSource/LocalSource.types'\nexport * from '../FileSelect/TreeSource/TreeSource.types'\nexport * from '../Flex/Flex.types'\nexport * from '../FlexList/FlexList.types'\nexport * from '../Form/Form.types'\nexport * from '../Grid/Grid.types'\nexport * from '../GroupSelect/GroupSelect.types'\nexport * from '../Input/Input.types'\nexport * from '../Link/Link.types'\nexport * from '../ListPage/ListPage.types'\nexport type {\n MenuFooterProps,\n MenuGroupProps,\n MenuHeaderProps,\n MenuItemProps,\n MenuOptionsProps,\n MenuProps,\n MenuSearchProps,\n} from '../Menu/Menu.types'\nexport * from '../MenuImperative/MenuImperative.types'\nexport * from '../Modal/Modal.types'\nexport type { MultiSelectProps } from '../MultiSelect/MultiSelect.types'\nexport * from '../Notation/Notation.types'\nexport * from '../NumberInput/NumberInput.types'\nexport * from '../OverlayTrigger/OverlayTrigger.types'\nexport * from '../PageLayout/PageLayout.types'\nexport type { PresetPaginationProps } from '../Pagination/Pagination.types'\nexport * from '../Panel/Panel.types'\nexport * from '../Pill/Pill.types'\nexport * from '../PillSelect/PillSelect.types'\nexport * from '../Popover/Popover.types'\nexport * from '../ProgressBar/ProgressBar.types'\nexport * from '../RadioButton/RadioButton.types'\nexport * from '../Required/Required.types'\nexport * from '../Search/Search.types'\nexport * from '../Section/Section.types'\nexport * from '../SegmentedController/SegmentedController.types'\nexport * from '../Select/Select.types'\nexport * from '../Slider/Slider.types'\nexport * from '../Spinner/Spinner.types'\nexport * from '../Switch/Switch.types'\nexport type {\n BodyCellProps,\n BodyRowProps,\n CaratProps,\n CurrencyCellProps,\n DateSelectCellProps,\n GroupProps,\n GroupTitleProps,\n HeaderCellProps,\n IconCellProps,\n InputCellProps,\n LinkCellProps,\n SelectCellProps,\n TableProps,\n TableTextCellProps as TextCellProps,\n TextAreaCellProps,\n} from '../Table/Table.types'\nexport type { BaseTabProps, TabsProps } from '../Tabs/Tabs.types'\nexport * from '../Tearsheet/Tearsheet.types'\nexport * from '../TextArea/TextArea.types'\nexport * from '../TextEditor/TextEditor.types'\nexport * from '../TextEditorOutput/TextEditorOutput.types'\nexport type {\n BaseThumbnailProps,\n PlaceholderProps,\n ThumbnailProps,\n} from '../Thumbnail/Thumbnail.types'\nexport * from '../TieredDropdown/TieredDropdown.types'\nexport type { TieredSelectProps } from '../TieredSelect/TieredSelect.types'\nexport * from '../Tile/Tile.types'\nexport * from '../Title/Title.types'\nexport * from '../Toast/Toast.types'\nexport * from '../ToggleButton/ToggleButton.types'\nexport * from '../Token/Token.types'\nexport * from '../ToolHeader/ToolHeader.types'\nexport * from '../Tooltip/Tooltip.types'\nexport * from '../Tree/Tree.types'\nexport * from '../Typeahead/Typeahead.types'\nexport * from '../Typography/Typography.types'\n/* Utilities */\nexport type { Props } from './types'\n\n/* Components without a .types file */\n// export * from '../CurrencyInput/CurrencyInput.types'\n// export * from \"../Semant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c,gCAAgC;AAC9C,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,gCAAgC;AAC9C;;AAGA;AACA;AACA;AAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export * from './_hooks/Timer';
|
|
|
101
101
|
export * from './_hooks/Trigger';
|
|
102
102
|
export * from './_hooks/Visibility';
|
|
103
103
|
export * from './_hooks/ZIndex';
|
|
104
|
+
export { borderRadius, getBorderRadius as UNSAFE_getBorderRadius, } from './_styles/borderRadius';
|
|
104
105
|
export * from './_styles/colors';
|
|
105
106
|
export * from './_styles/spacing';
|
|
106
107
|
export { docsProps as UNSAFE_props } from './_utils/props';
|
package/dist/index.js
CHANGED
|
@@ -112,6 +112,7 @@ export * from './_hooks/Trigger';
|
|
|
112
112
|
export * from './_hooks/Visibility';
|
|
113
113
|
export * from './_hooks/ZIndex';
|
|
114
114
|
// Style Stuff
|
|
115
|
+
export { borderRadius, getBorderRadius as UNSAFE_getBorderRadius } from './_styles/borderRadius';
|
|
115
116
|
export * from './_styles/colors';
|
|
116
117
|
/**
|
|
117
118
|
* @internal
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BETA_makeField","getEllipsis","UNSAFE_getEllipsis","getFocus","UNSAFE_getFocus","getLineClamp","UNSAFE_getLineClamp","addSubcomponents","UNSAFE_addSubcomponents","intlDateTimeFormat","parseFilename","UNSAFE_parseFilename","mergeRefs","UNSAFE_mergeRefs","docsProps","UNSAFE_props"],"sources":["../src/index.ts"],"sourcesContent":["// export const version = process.env.VERSION\nexport * from './Avatar'\nexport * from './AvatarStack'\nexport * from './Badge'\nexport * from './Banner'\nexport * from './Box'\nexport * from './Breadcrumbs'\nexport * from './Button'\nexport * from './Calendar'\nexport * from './Card'\nexport * from './Checkbox'\nexport * from './ClickOutside'\nexport * from './ContactItem'\nexport * from './Content'\nexport * from './DateInput'\nexport * from './DateSelect'\nexport * from './DetailPage'\nexport * from './Dropdown'\nexport * from './DropdownFlyout'\nexport * from './Dropzone'\nexport * from './EmptyState'\nexport * from './FileList'\nexport * from './FileSelect'\nexport * from './FileToken'\nexport * from './FilterToken'\nexport * from './Flex'\nexport * from './FlexList'\nexport * from './Form'\n/**\n * @internal\n * Will require extending types FormFieldProps and FormFieldValueComponentProps\n */\nexport { BETA_makeField } from './Form'\nexport * from './Grid'\nexport * from './GroupSelect'\nexport * from './Input'\nexport * from './Link'\nexport * from './ListPage'\nexport * from './Menu'\nexport * from './MenuImperative'\nexport * from './Modal'\nexport * from './MultiSelect'\nexport * from './Notation'\nexport * from './NumberInput'\nexport * from './Overlay'\nexport * from './OverlayTrigger'\nexport * from './PageLayout'\nexport * from './Pagination'\nexport * from './Panel'\nexport * from './Pill'\nexport * from './PillSelect'\nexport * from './Popover'\nexport * from './Portal'\nexport * from './ProgressBar'\nexport * from './RadioButton'\nexport * from './Required'\nexport * from './Search'\nexport * from './SegmentedController'\nexport * from './Select'\nexport * from './Semantic'\nexport * from './Sidebar'\nexport * from './Slider'\nexport * from './Spinner'\nexport * from './SuperSelect'\nexport * from './Switch'\nexport * from './Table'\nexport * from './TableShelf'\nexport * from './Tabs'\nexport * from './Tearsheet'\nexport * from './TextArea'\nexport * from './TextEditor'\nexport * from './TextEditorOutput'\nexport * from './Thumbnail'\nexport * from './TieredDropdown'\nexport * from './TieredSelect'\nexport * from './Tile'\nexport * from './Title'\nexport * from './Toast'\nexport * from './ToggleButton'\nexport * from './Token'\nexport * from './ToolHeader'\nexport * from './Tooltip'\nexport * from './Tree'\nexport * from './Typeahead'\nexport * from './Typography'\nexport * from './_hooks/Analytics'\nexport * from './_hooks/Anchor'\nexport * from './_hooks/Autofocus'\nexport * from './_hooks/BoundingRect'\nexport * from './_hooks/Buffer'\nexport * from './_hooks/ClickOutside'\nexport * from './_hooks/DateTime'\nexport * from './_hooks/DelayedCallback'\nexport * from './_hooks/DelayedToggle'\nexport * from './_hooks/Deprecation'\nexport * from './_hooks/Event'\nexport * from './_hooks/EventListener'\nexport * from './_hooks/Hotkey'\nexport * from './_hooks/I18n'\nexport * from './_hooks/InjectedScript'\nexport * from './_hooks/ListNavigation'\nexport * from './_hooks/OverflowObserver'\nexport * from './_hooks/Resize'\nexport * from './_hooks/Scroll'\nexport * from './_hooks/TextEntry'\nexport * from './_hooks/Timer'\nexport * from './_hooks/Trigger'\n/**\n * @internal\n */\nexport {\n type UNSAFE_GetEndpoint,\n type UNSAFE_GetPayloadKey,\n type UNSAFE_UploadFile,\n} from './_hooks/useFileUploader'\nexport * from './_hooks/Visibility'\nexport * from './_hooks/ZIndex'\n// Style Stuff\nexport * from './_styles/colors'\n/**\n * @internal\n */\nexport {\n getEllipsis as UNSAFE_getEllipsis,\n getFocus as UNSAFE_getFocus,\n getLineClamp as UNSAFE_getLineClamp,\n} from './_styles/mixins'\nexport * from './_styles/spacing'\n/**\n * @internal\n */\nexport { addSubcomponents as UNSAFE_addSubcomponents } from './_utils/addSubcomponents'\n/**\n * @internal\n */\nexport { intlDateTimeFormat } from './_utils/dateTime'\n/**\n * @internal\n */\nexport { parseFilename as UNSAFE_parseFilename } from './_utils/filename'\n/**\n * @internal\n */\nexport { type IAnalytics } from './_utils/genericAnalyticsClient'\n/**\n * @internal\n */\nexport { mergeRefs as UNSAFE_mergeRefs } from './_utils/mergeRefs'\n// export { getTypographyIntent, typographyWeights } from './Typography'\n// For documentation only\nexport { docsProps as UNSAFE_props } from './_utils/props'\n"],"mappings":"AAAA;AACA,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,OAAO;AACrB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,cAAc;A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AQ;AACtB,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,0BAA0B;AACxC,cAAc,wBAAwB;AACtC,cAAc,sBAAsB;AACpC,cAAc,gBAAgB;AAC9B,cAAc,wBAAwB;AACtC,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,2BAA2B;AACzC,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB;AAC/B,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,cAAc,kBAAkB;AAChC;AACA;AACA;;AAMA,cAAc,qBAAqB;AACnC,cAAc,iBAAiB;AAC/B;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA,SACEC,WAAW,IAAIC,kBAAkB,EACjCC,QAAQ,IAAIC,eAAe,EAC3BC,YAAY,IAAIC,mBAAmB,QAC9B,kBAAkB;AACzB,cAAc,mBAAmB;AACjC;AACA;AACA;AACA,SAASC,gBAAgB,IAAIC,uBAAuB,QAAQ,2BAA2B;AACvF;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,mBAAmB;AACtD;AACA;AACA;AACA,SAASC,aAAa,IAAIC,oBAAoB,QAAQ,mBAAmB;AACzE;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASC,SAAS,IAAIC,gBAAgB,QAAQ,oBAAoB;AAClE;AACA;AACA,SAASC,SAAS,IAAIC,YAAY,QAAQ,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["BETA_makeField","borderRadius","getBorderRadius","UNSAFE_getBorderRadius","getEllipsis","UNSAFE_getEllipsis","getFocus","UNSAFE_getFocus","getLineClamp","UNSAFE_getLineClamp","addSubcomponents","UNSAFE_addSubcomponents","intlDateTimeFormat","parseFilename","UNSAFE_parseFilename","mergeRefs","UNSAFE_mergeRefs","docsProps","UNSAFE_props"],"sources":["../src/index.ts"],"sourcesContent":["// export const version = process.env.VERSION\nexport * from './Avatar'\nexport * from './AvatarStack'\nexport * from './Badge'\nexport * from './Banner'\nexport * from './Box'\nexport * from './Breadcrumbs'\nexport * from './Button'\nexport * from './Calendar'\nexport * from './Card'\nexport * from './Checkbox'\nexport * from './ClickOutside'\nexport * from './ContactItem'\nexport * from './Content'\nexport * from './DateInput'\nexport * from './DateSelect'\nexport * from './DetailPage'\nexport * from './Dropdown'\nexport * from './DropdownFlyout'\nexport * from './Dropzone'\nexport * from './EmptyState'\nexport * from './FileList'\nexport * from './FileSelect'\nexport * from './FileToken'\nexport * from './FilterToken'\nexport * from './Flex'\nexport * from './FlexList'\nexport * from './Form'\n/**\n * @internal\n * Will require extending types FormFieldProps and FormFieldValueComponentProps\n */\nexport { BETA_makeField } from './Form'\nexport * from './Grid'\nexport * from './GroupSelect'\nexport * from './Input'\nexport * from './Link'\nexport * from './ListPage'\nexport * from './Menu'\nexport * from './MenuImperative'\nexport * from './Modal'\nexport * from './MultiSelect'\nexport * from './Notation'\nexport * from './NumberInput'\nexport * from './Overlay'\nexport * from './OverlayTrigger'\nexport * from './PageLayout'\nexport * from './Pagination'\nexport * from './Panel'\nexport * from './Pill'\nexport * from './PillSelect'\nexport * from './Popover'\nexport * from './Portal'\nexport * from './ProgressBar'\nexport * from './RadioButton'\nexport * from './Required'\nexport * from './Search'\nexport * from './SegmentedController'\nexport * from './Select'\nexport * from './Semantic'\nexport * from './Sidebar'\nexport * from './Slider'\nexport * from './Spinner'\nexport * from './SuperSelect'\nexport * from './Switch'\nexport * from './Table'\nexport * from './TableShelf'\nexport * from './Tabs'\nexport * from './Tearsheet'\nexport * from './TextArea'\nexport * from './TextEditor'\nexport * from './TextEditorOutput'\nexport * from './Thumbnail'\nexport * from './TieredDropdown'\nexport * from './TieredSelect'\nexport * from './Tile'\nexport * from './Title'\nexport * from './Toast'\nexport * from './ToggleButton'\nexport * from './Token'\nexport * from './ToolHeader'\nexport * from './Tooltip'\nexport * from './Tree'\nexport * from './Typeahead'\nexport * from './Typography'\nexport * from './_hooks/Analytics'\nexport * from './_hooks/Anchor'\nexport * from './_hooks/Autofocus'\nexport * from './_hooks/BoundingRect'\nexport * from './_hooks/Buffer'\nexport * from './_hooks/ClickOutside'\nexport * from './_hooks/DateTime'\nexport * from './_hooks/DelayedCallback'\nexport * from './_hooks/DelayedToggle'\nexport * from './_hooks/Deprecation'\nexport * from './_hooks/Event'\nexport * from './_hooks/EventListener'\nexport * from './_hooks/Hotkey'\nexport * from './_hooks/I18n'\nexport * from './_hooks/InjectedScript'\nexport * from './_hooks/ListNavigation'\nexport * from './_hooks/OverflowObserver'\nexport * from './_hooks/Resize'\nexport * from './_hooks/Scroll'\nexport * from './_hooks/TextEntry'\nexport * from './_hooks/Timer'\nexport * from './_hooks/Trigger'\n/**\n * @internal\n */\nexport {\n type UNSAFE_GetEndpoint,\n type UNSAFE_GetPayloadKey,\n type UNSAFE_UploadFile,\n} from './_hooks/useFileUploader'\nexport * from './_hooks/Visibility'\nexport * from './_hooks/ZIndex'\n// Style Stuff\nexport {\n borderRadius,\n getBorderRadius as UNSAFE_getBorderRadius,\n} from './_styles/borderRadius'\nexport * from './_styles/colors'\n/**\n * @internal\n */\nexport {\n getEllipsis as UNSAFE_getEllipsis,\n getFocus as UNSAFE_getFocus,\n getLineClamp as UNSAFE_getLineClamp,\n} from './_styles/mixins'\nexport * from './_styles/spacing'\n/**\n * @internal\n */\nexport { addSubcomponents as UNSAFE_addSubcomponents } from './_utils/addSubcomponents'\n/**\n * @internal\n */\nexport { intlDateTimeFormat } from './_utils/dateTime'\n/**\n * @internal\n */\nexport { parseFilename as UNSAFE_parseFilename } from './_utils/filename'\n/**\n * @internal\n */\nexport { type IAnalytics } from './_utils/genericAnalyticsClient'\n/**\n * @internal\n */\nexport { mergeRefs as UNSAFE_mergeRefs } from './_utils/mergeRefs'\n// export { getTypographyIntent, typographyWeights } from './Typography'\n// For documentation only\nexport { docsProps as UNSAFE_props } from './_utils/props'\n"],"mappings":"AAAA;AACA,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,OAAO;AACrB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,kBAAkB;AAChC,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,QAAQ;AACvC,cAAc,QAAQ;AACtB,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,kBAAkB;AAChC,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,kBAAkB;AAChC,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,uBAAuB;AACrC,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,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2BAA2B;AACvF;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,mBAAmB;AACtD;AACA;AACA;AACA,SAASC,aAAa,IAAIC,oBAAoB,QAAQ,mBAAmB;AACzE;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASC,SAAS,IAAIC,gBAAgB,QAAQ,oBAAoB;AAClE;AACA;AACA,SAASC,SAAS,IAAIC,YAAY,QAAQ,gBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/core-react",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.26.0",
|
|
4
4
|
"description": "React library of Procore Design Guidelines",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "yarn run clean && yarn run build:esm & yarn run build:types & yarn run build:typedoc",
|
|
17
|
-
"build:esm": "BUNDLING=true babel src --out-dir dist --extensions '.ts,.tsx,.snap' -s --copy-files --no-copy-ignored",
|
|
17
|
+
"build:esm": "BUNDLING=true babel src --out-dir dist --extensions '.ts,.tsx,.js,.snap' -s --copy-files --no-copy-ignored",
|
|
18
18
|
"build:types": "tsc --declaration --emitDeclarationOnly -p tsconfig.prod.json",
|
|
19
19
|
"build:typedoc": "ts-node typedoc.ts",
|
|
20
20
|
"chromatic": "chromatic --project-token=cf8c48cce207",
|
|
@@ -40,11 +40,14 @@
|
|
|
40
40
|
"@babel/preset-react": "7.18.6",
|
|
41
41
|
"@babel/preset-typescript": "7.18.6",
|
|
42
42
|
"@babel/register": "7.18.9",
|
|
43
|
-
"@procore/storybook-addon": "^
|
|
44
|
-
"@storybook/addon-docs": "^7.
|
|
45
|
-
"@storybook/
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/
|
|
43
|
+
"@procore/storybook-addon": "^4.0.0",
|
|
44
|
+
"@storybook/addon-docs": "^7.5.3",
|
|
45
|
+
"@storybook/addon-interactions": "^7.5.3",
|
|
46
|
+
"@storybook/jest": "^0.2.3",
|
|
47
|
+
"@storybook/manager-api": "^7.5.3",
|
|
48
|
+
"@storybook/react": "^7.5.3",
|
|
49
|
+
"@storybook/react-webpack5": "^7.5.3",
|
|
50
|
+
"@storybook/testing-library": "^0.2.2",
|
|
48
51
|
"@testing-library/dom": "8.20.0",
|
|
49
52
|
"@testing-library/jest-dom": "5.16.4",
|
|
50
53
|
"@testing-library/react": "12.1.4",
|
|
@@ -80,7 +83,7 @@
|
|
|
80
83
|
"babel-jest": "29.1.2",
|
|
81
84
|
"babel-loader": "8.2.5",
|
|
82
85
|
"babel-plugin-styled-components": "2.0.7",
|
|
83
|
-
"chromatic": "
|
|
86
|
+
"chromatic": "9.1.0",
|
|
84
87
|
"enzyme": "3.11.0",
|
|
85
88
|
"enzyme-to-json": "3.6.2",
|
|
86
89
|
"eslint": "8.31.0",
|
|
@@ -95,7 +98,7 @@
|
|
|
95
98
|
"miragejs": "^0.1.47",
|
|
96
99
|
"react": "17.0.2",
|
|
97
100
|
"react-dom": "17.0.2",
|
|
98
|
-
"storybook": "^7.
|
|
101
|
+
"storybook": "^7.5.3",
|
|
99
102
|
"styled-components": "5.3.6",
|
|
100
103
|
"ts-jest": "29.0.5",
|
|
101
104
|
"ts-node": "10.9.1",
|
|
@@ -108,7 +111,7 @@
|
|
|
108
111
|
"@floating-ui/react": "0.25.2",
|
|
109
112
|
"@floating-ui/react-dom": "2.0.2",
|
|
110
113
|
"@procore/core-i18n-js": "10.27.7",
|
|
111
|
-
"@procore/core-icons": "
|
|
114
|
+
"@procore/core-icons": "12.0.0",
|
|
112
115
|
"@procore/globalization-toolkit": "2.0.0",
|
|
113
116
|
"@react-aria/button": "3.6.4",
|
|
114
117
|
"@react-aria/checkbox": "3.6.0",
|
package/tsconfig.prod.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// failure to import matchesSnapshot
|
|
2
|
-
import { Cog } from '@procore/core-icons/dist'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { matchesSnapshot } from '../../__tests__/helpers/snapshots'
|
|
5
|
-
import { SourceItem } from './SourceItem'
|
|
6
|
-
|
|
7
|
-
describe('SourceItem', () => {
|
|
8
|
-
it('default view', () => {
|
|
9
|
-
matchesSnapshot(<SourceItem />)
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
it('DivAttributes', () => {
|
|
13
|
-
matchesSnapshot(<SourceItem className="TEST" tabIndex={100} />)
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
it('error view', () => {
|
|
17
|
-
matchesSnapshot(<SourceItem error />)
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
it('loading view', () => {
|
|
21
|
-
matchesSnapshot(<SourceItem loading />)
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
it('selected view', () => {
|
|
25
|
-
matchesSnapshot(<SourceItem selected />)
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
it('disabled view', () => {
|
|
29
|
-
matchesSnapshot(<SourceItem disabled />)
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
it('icon and label', () => {
|
|
33
|
-
matchesSnapshot(<SourceItem icon={<Cog />}>Label</SourceItem>)
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
describe('count', () => {
|
|
37
|
-
it('equal to 0 should not be rendered', () => {
|
|
38
|
-
matchesSnapshot(<SourceItem count={0} />)
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
it('should be rendered as is in parentheses when larger then 0 and less then 100', () => {
|
|
42
|
-
matchesSnapshot(<SourceItem count={24} />)
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
it('should be rendered truncated in parentheses when larger then 99', () => {
|
|
46
|
-
matchesSnapshot(<SourceItem count={100} />)
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
it('should be rendered truncated in parentheses when equal or larger then custom threshold', () => {
|
|
50
|
-
matchesSnapshot(<SourceItem count={11} countTruncationThreshold={10} />)
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
})
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { configure } from '@testing-library/dom'
|
|
2
|
-
import '@testing-library/jest-dom'
|
|
3
|
-
import {
|
|
4
|
-
render,
|
|
5
|
-
screen,
|
|
6
|
-
waitFor,
|
|
7
|
-
waitForElementToBeRemoved,
|
|
8
|
-
} from '@testing-library/react'
|
|
9
|
-
import userEvent from '@testing-library/user-event'
|
|
10
|
-
import React from 'react'
|
|
11
|
-
import { MultiSelect } from './MultiSelect'
|
|
12
|
-
|
|
13
|
-
configure({ testIdAttribute: 'data-qa' })
|
|
14
|
-
|
|
15
|
-
const options = [
|
|
16
|
-
{
|
|
17
|
-
id: '1',
|
|
18
|
-
label: 'blue bird is a really long item and should overflow',
|
|
19
|
-
groupId: '1',
|
|
20
|
-
},
|
|
21
|
-
{ id: '2', label: 'canary', groupId: '1' },
|
|
22
|
-
{ id: '3', label: 'eagle', groupId: '1' },
|
|
23
|
-
{ id: '4', label: 'falcon', groupId: '1' },
|
|
24
|
-
{ id: '5', label: 'finch', groupId: '1' },
|
|
25
|
-
{ id: '6', label: 'hawk', groupId: '2' },
|
|
26
|
-
{ id: '7', label: 'owl', groupId: '2' },
|
|
27
|
-
{ id: '8', label: 'pigeon', groupId: '2' },
|
|
28
|
-
{ id: '9', label: 'raven', groupId: '2' },
|
|
29
|
-
{ id: '10', label: 'toucan', groupId: '2' },
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
const groups = [
|
|
33
|
-
{ id: '1', label: 'Group 1' },
|
|
34
|
-
{ id: '2', label: 'Group 2' },
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
const qaTags = {
|
|
38
|
-
option: (option) => `option-${option.id}`,
|
|
39
|
-
token: (option) => `token-${option.id}`,
|
|
40
|
-
tokenClear: (option) => `clear-token-${option.id}`,
|
|
41
|
-
}
|
|
42
|
-
const values = [options[0], options[5]]
|
|
43
|
-
const clearIcon = '[data-qa="core-multiselect-clear"]'
|
|
44
|
-
const menuItem = 'option-'
|
|
45
|
-
const menuItems = '[data-qa^="option-"]'
|
|
46
|
-
const menuGroup = '[data-group="true"]'
|
|
47
|
-
const placeholder = 'Select Values'
|
|
48
|
-
const selectArrow = 'multiselect-select-arrow'
|
|
49
|
-
const selectedInput = '[data-qa^="token-"]'
|
|
50
|
-
const selectedMenuItem = '[data-selected="true"]'
|
|
51
|
-
const optRemovalIcon = '[data-qa^="clear-token-"]'
|
|
52
|
-
|
|
53
|
-
const getSelectedItems = (selector) => {
|
|
54
|
-
return getQuerySelectorAll(selector).length
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const elementExists = (selector) => {
|
|
58
|
-
return getQuerySelector(selector).length > 0
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const getOptionText = (id) => {
|
|
62
|
-
return options.find((option) => option.id === id).label
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function BasicProps(props) {
|
|
66
|
-
const [value, setValue] = React.useState(props.values || [])
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<MultiSelect
|
|
70
|
-
onChange={setValue}
|
|
71
|
-
options={options}
|
|
72
|
-
value={value}
|
|
73
|
-
qa={qaTags}
|
|
74
|
-
{...props}
|
|
75
|
-
/>
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function click(element) {
|
|
80
|
-
return userEvent.click(element)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function getByPlaceholderText(text) {
|
|
84
|
-
return screen.getByPlaceholderText(text)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function getByTestId(testId) {
|
|
88
|
-
return screen.getByTestId(testId)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function getByText(text) {
|
|
92
|
-
return screen.getByText(text)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function getQuerySelector(selector) {
|
|
96
|
-
return document.querySelector(selector)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function getQuerySelectorAll(selector) {
|
|
100
|
-
return document.querySelectorAll(selector)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
*
|
|
105
|
-
* To get selected values in the button(input) and to omit options.
|
|
106
|
-
* Clicking on the removal icon toggles open state,
|
|
107
|
-
* so getByText finds two same texts sometimes
|
|
108
|
-
* @param text
|
|
109
|
-
* @returns {ReturnType<GetByText<HTMLElement>>}
|
|
110
|
-
*/
|
|
111
|
-
function getByTextSelectedInput(text) {
|
|
112
|
-
return screen.getByText(text, { selector: `${selectedInput} *` })
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
describe('MultiSelect', () => {
|
|
116
|
-
it('should render with selected options', async () => {
|
|
117
|
-
render(<BasicProps values={values} />)
|
|
118
|
-
|
|
119
|
-
expect(screen.queryByText(placeholder)).not.toBeInTheDocument()
|
|
120
|
-
|
|
121
|
-
await click(getByTestId(selectArrow))
|
|
122
|
-
await waitFor(() => {
|
|
123
|
-
expect(getSelectedItems(selectedInput)).toBe(2)
|
|
124
|
-
expect(Boolean(screen.getAllByText(options[0].label))).toBe(true)
|
|
125
|
-
expect(Boolean(screen.getAllByText(options[5].label))).toBe(true)
|
|
126
|
-
expect(getSelectedItems(selectedMenuItem)).toBe(2)
|
|
127
|
-
})
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
it('should select a single option', async () => {
|
|
131
|
-
const optionId = '2'
|
|
132
|
-
|
|
133
|
-
render(<BasicProps />)
|
|
134
|
-
|
|
135
|
-
await click(getByTestId(selectArrow))
|
|
136
|
-
await waitFor(() => getByTestId(`${menuItem}${optionId}`))
|
|
137
|
-
|
|
138
|
-
await click(getByTestId(`${menuItem}${optionId}`))
|
|
139
|
-
|
|
140
|
-
expect(getSelectedItems(selectedInput)).toBe(1)
|
|
141
|
-
expect(getSelectedItems(selectedMenuItem)).toBe(1)
|
|
142
|
-
expect(screen.getAllByText(getOptionText(optionId)).length).toBe(2)
|
|
143
|
-
})
|
|
144
|
-
|
|
145
|
-
it('should select multiple options and close menu', async () => {
|
|
146
|
-
const ids = ['1', '2', '3']
|
|
147
|
-
|
|
148
|
-
render(<BasicProps />)
|
|
149
|
-
|
|
150
|
-
await click(getByTestId(selectArrow))
|
|
151
|
-
await waitFor(() => elementExists(menuItems))
|
|
152
|
-
|
|
153
|
-
await click(getByTestId(`${menuItem}${ids[0]}`))
|
|
154
|
-
await click(getByTestId(`${menuItem}${ids[1]}`))
|
|
155
|
-
await click(getByTestId(`${menuItem}${ids[2]}`))
|
|
156
|
-
|
|
157
|
-
await click(getByTestId(selectArrow))
|
|
158
|
-
await waitForElementToBeRemoved(getQuerySelector(menuItems))
|
|
159
|
-
|
|
160
|
-
expect(getSelectedItems(selectedInput)).toBe(3)
|
|
161
|
-
expect(Boolean(getOptionText(ids[0]))).toBe(true)
|
|
162
|
-
expect(Boolean(getOptionText(ids[1]))).toBe(true)
|
|
163
|
-
expect(Boolean(getOptionText(ids[2]))).toBe(true)
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
it('should remove a selected option clicking on option removal icon', async () => {
|
|
167
|
-
render(<BasicProps values={values} />)
|
|
168
|
-
|
|
169
|
-
await click(getQuerySelector(optRemovalIcon))
|
|
170
|
-
expect(getSelectedItems(selectedInput)).toBe(1)
|
|
171
|
-
expect(Boolean(getByTextSelectedInput(getOptionText('6')))).toBe(true)
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
it('should clear all selected options', async () => {
|
|
175
|
-
render(<BasicProps values={values} />)
|
|
176
|
-
|
|
177
|
-
await click(getQuerySelector(clearIcon))
|
|
178
|
-
expect(Boolean(getByPlaceholderText(placeholder))).toBe(true)
|
|
179
|
-
})
|
|
180
|
-
|
|
181
|
-
it('should add to initially loaded options', async () => {
|
|
182
|
-
render(<BasicProps values={values} />)
|
|
183
|
-
|
|
184
|
-
await click(getByTestId(selectArrow))
|
|
185
|
-
await waitFor(() => getByTestId(`${menuItem}2`))
|
|
186
|
-
await click(getByTestId(`${menuItem}2`))
|
|
187
|
-
await click(getByTestId(selectArrow))
|
|
188
|
-
await waitForElementToBeRemoved(getQuerySelector(menuItems))
|
|
189
|
-
|
|
190
|
-
expect(getSelectedItems(selectedInput)).toBe(3)
|
|
191
|
-
expect(Boolean(getByText(getOptionText('1')))).toBe(true)
|
|
192
|
-
expect(Boolean(getByText(getOptionText('2')))).toBe(true)
|
|
193
|
-
expect(Boolean(getByText(getOptionText('6')))).toBe(true)
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
it('should remove multiple options', async () => {
|
|
197
|
-
render(<BasicProps values={[options[0], options[1], options[5]]} />)
|
|
198
|
-
await click(getQuerySelector(optRemovalIcon))
|
|
199
|
-
await click(getQuerySelector(optRemovalIcon))
|
|
200
|
-
|
|
201
|
-
expect(getSelectedItems(selectedInput)).toBe(1)
|
|
202
|
-
expect(Boolean(getByTextSelectedInput(getOptionText('6')))).toBe(true)
|
|
203
|
-
})
|
|
204
|
-
|
|
205
|
-
it('should remove all options clicking on option removal icon', async () => {
|
|
206
|
-
render(<BasicProps />)
|
|
207
|
-
|
|
208
|
-
await Array.from(getQuerySelectorAll(optRemovalIcon)).map(async (icon) => {
|
|
209
|
-
await click(icon)
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
expect(getSelectedItems(selectedInput)).toBe(0)
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
it('should remove selection by clicking option in the menu', async () => {
|
|
216
|
-
render(<BasicProps values={values} />)
|
|
217
|
-
|
|
218
|
-
await click(getByTestId(selectArrow))
|
|
219
|
-
await waitFor(() => elementExists(menuItems))
|
|
220
|
-
await click(getQuerySelector(selectedMenuItem))
|
|
221
|
-
|
|
222
|
-
expect(getSelectedItems(selectedMenuItem)).toBe(1)
|
|
223
|
-
})
|
|
224
|
-
|
|
225
|
-
it('should select options from different groups', async () => {
|
|
226
|
-
render(<BasicProps optgroups={groups} />)
|
|
227
|
-
|
|
228
|
-
await click(getByTestId(selectArrow))
|
|
229
|
-
await waitFor(() =>
|
|
230
|
-
expect(getQuerySelectorAll(menuGroup).length).toBe(groups.length)
|
|
231
|
-
)
|
|
232
|
-
|
|
233
|
-
await click(getByText(getOptionText('2')))
|
|
234
|
-
await click(getByText(getOptionText('6')))
|
|
235
|
-
|
|
236
|
-
expect(getSelectedItems(selectedMenuItem)).toBe(2)
|
|
237
|
-
|
|
238
|
-
await click(getByTestId(selectArrow))
|
|
239
|
-
await waitForElementToBeRemoved(getQuerySelector(menuItems))
|
|
240
|
-
|
|
241
|
-
expect(Boolean(getByText(getOptionText('2')))).toBe(true)
|
|
242
|
-
expect(Boolean(getByText(getOptionText('6')))).toBe(true)
|
|
243
|
-
})
|
|
244
|
-
|
|
245
|
-
it('should render footer if defined', async () => {
|
|
246
|
-
render(<BasicProps footer={<b>Footer</b>} />)
|
|
247
|
-
await click(getByTestId(selectArrow))
|
|
248
|
-
await waitFor(() => expect(Boolean(getByText('Footer'))).toBe(true))
|
|
249
|
-
})
|
|
250
|
-
})
|