@procore/core-react 12.49.0 → 12.50.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/CHANGELOG.md +18 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +4 -4
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +8 -8
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.styles.js +10 -10
- 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 +10 -10
- package/dist/Calendar/Calendar.styles.js.map +1 -1
- 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.d.ts +2 -1
- package/dist/DetailPage/DetailPage.js +11 -10
- package/dist/DetailPage/DetailPage.js.map +1 -1
- package/dist/DetailPage/DetailPage.styles.js +9 -8
- package/dist/DetailPage/DetailPage.styles.js.map +1 -1
- package/dist/DetailPage/DetailPage.types.d.ts +5 -5
- package/dist/DetailPage/DetailPage.types.js.map +1 -1
- package/dist/DetailPageTemplate/DetailPageTemplate.types.d.ts +7 -1
- package/dist/DetailPageTemplate/DetailPageTemplate.types.js.map +1 -1
- 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 +3 -3
- 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.d.ts +7 -0
- package/dist/FileSelect/SourceItem/SourceItem.js.map +1 -1
- 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 +6 -6
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +13 -13
- package/dist/Form/StyledFormikForm.styles.d.ts +2 -2
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- 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 +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +11 -11
- package/dist/Modal/Modal.styles.js +26 -33
- package/dist/Modal/Modal.styles.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.d.ts +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +8 -8
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextTile/NextTile.styles.js +5 -5
- 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.js +8 -5
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.js +18 -17
- package/dist/PageLayout/PageLayout.styles.js.map +1 -1
- package/dist/PageLayout/PageLayout.types.d.ts +7 -0
- package/dist/PageLayout/PageLayout.types.js.map +1 -1
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.types.d.ts +5 -0
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.types.js.map +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +14 -13
- package/dist/Panel/Panel.styles.js.map +1 -1
- package/dist/Pill/Pill.styles.js +3 -3
- 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.js +1 -0
- package/dist/Required/Required.js.map +1 -1
- package/dist/Required/Required.styles.js +5 -5
- package/dist/Required/Required.styles.js.map +1 -1
- package/dist/Required/Required.types.d.ts +2 -0
- package/dist/Required/Required.types.js.map +1 -1
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +4 -3
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +8 -8
- package/dist/Select/Select.types.d.ts +0 -1
- package/dist/Select/Select.types.js.map +1 -1
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.d.ts +3 -0
- package/dist/SuperSelect/SuperSelect.components.js +18 -1
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.js +11 -2
- package/dist/SuperSelect/SuperSelect.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +40 -40
- package/dist/SuperSelect/SuperSelect.types.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.js +15 -1
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +29 -29
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tablist.d.ts +11 -0
- package/dist/Tabs/Tablist.js +45 -0
- package/dist/Tabs/Tablist.js.map +1 -0
- package/dist/Tabs/Tablist.types.d.ts +58 -0
- package/dist/Tabs/Tablist.types.js +2 -0
- package/dist/Tabs/Tablist.types.js.map +1 -0
- package/dist/Tabs/Tabs.js +60 -8
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.js +16 -16
- package/dist/Tabs/Tabs.types.d.ts +25 -10
- package/dist/Tabs/Tabs.types.js.map +1 -1
- package/dist/Tabs/index.d.ts +2 -0
- package/dist/Tabs/index.js +1 -0
- package/dist/Tabs/index.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/Tearsheet/storybook/PageLayoutDemo.js +3 -1
- package/dist/Tearsheet/storybook/PageLayoutDemo.js.map +1 -1
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +14 -14
- package/dist/Thumbnail/Thumbnail.styles.js +21 -21
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +5 -5
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +3 -3
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/Tree.styles.js +10 -10
- package/dist/Typeahead/Typeahead.styles.js +4 -4
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_locales/en.json +1 -1
- package/dist/_locales/pseudo.json +1 -1
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +4 -4
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +25 -25
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +15 -15
- 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 +14 -14
- 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 +8 -8
- 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 +14 -14
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +38 -38
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +31 -31
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +18 -18
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- 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 +770 -770
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +54 -54
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +1 -1
- 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 +84 -84
- package/dist/_typedoc/Modal/Modal.types.json +48 -48
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +33 -33
- package/dist/_typedoc/NextTile/NextTile.types.json +33 -33
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +52 -52
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +33 -33
- package/dist/_typedoc/PageLayout/PageLayout.types.json +48 -38
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +28 -28
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +8 -6
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +67 -72
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
- package/dist/_typedoc/Table/Table.types.json +105 -105
- package/dist/_typedoc/Tabs/Tablist.types.json +17 -0
- package/dist/_typedoc/Tabs/Tabs.types.json +46 -25
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
- 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 +43 -43
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
- package/dist/_typedoc/Tile/Tile.types.json +8 -8
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +7 -7
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +8 -8
- package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
- package/dist/_typedoc/Tree/Tree.types.json +88 -88
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/a11y-tips.json +1 -1
- package/dist/_typedoc/deprecations.json +1 -1
- package/dist/_utils/propsTypedoc.d.ts +1 -0
- package/dist/_utils/propsTypedoc.js +1 -0
- package/dist/_utils/propsTypedoc.js.map +1 -1
- package/package.json +1 -1
|
@@ -48,38 +48,38 @@ var tableCellInputErrorBorder = "1px solid ".concat(colors.red50);
|
|
|
48
48
|
var tableRowBorderBottom = /*#__PURE__*/css(["border-bottom:", ";&:last-child{border-bottom:0;}"], tableBorder);
|
|
49
49
|
export var StyledTableHeaderCellSortableContainer = /*#__PURE__*/styled.div.withConfig({
|
|
50
50
|
displayName: "StyledTableHeaderCellSortableContainer",
|
|
51
|
-
componentId: "core-
|
|
51
|
+
componentId: "core-12_50_0__sc-9c7xd-0"
|
|
52
52
|
})([""]);
|
|
53
53
|
export var StyledTableHeaderCellLabel = /*#__PURE__*/styled.span.withConfig({
|
|
54
54
|
displayName: "StyledTableHeaderCellLabel",
|
|
55
|
-
componentId: "core-
|
|
55
|
+
componentId: "core-12_50_0__sc-9c7xd-1"
|
|
56
56
|
})(["display:inline-block;flex:1 1 auto;position:relative;"]);
|
|
57
57
|
export var StyledTableHeaderCellIconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
58
58
|
displayName: "StyledTableHeaderCellIconWrapper",
|
|
59
|
-
componentId: "core-
|
|
59
|
+
componentId: "core-12_50_0__sc-9c7xd-2"
|
|
60
60
|
})(["height:20px;line-height:20px;padding:0 ", "px 0 ", "px;width:20px;"], spacing.lg, spacing.sm);
|
|
61
61
|
export var StyledTableHeaderCellSortIcon = /*#__PURE__*/styled(ArrowUp).withConfig({
|
|
62
62
|
displayName: "StyledTableHeaderCellSortIcon",
|
|
63
|
-
componentId: "core-
|
|
63
|
+
componentId: "core-12_50_0__sc-9c7xd-3"
|
|
64
64
|
})(["height:16px;width:16px;"]);
|
|
65
65
|
export var StyledTableHeaderCellSortButton = /*#__PURE__*/styled.button.withConfig({
|
|
66
66
|
displayName: "StyledTableHeaderCellSortButton",
|
|
67
|
-
componentId: "core-
|
|
67
|
+
componentId: "core-12_50_0__sc-9c7xd-4"
|
|
68
68
|
})(["background:transparent;border:none;color:inherit;display:flex;align-items:center;font:inherit;margin:0;min-height:", "px;padding:", "px;text-align:left;width:100%;&:focus-visible{", " outline-offset:-1px;}", "{min-height:14px;}", "{color:", ";opacity:0;transition:all 0.15s ease-in-out;position:absolute;}::before,::after{font-size:16px;}"], tableHeaderHeight, spacing.lg, getGapOutlineFocus('inside'), StyledTableHeaderCellLabel, StyledTableHeaderCellSortIcon, tableSortFontColor);
|
|
69
69
|
export var StyledCheckbox = /*#__PURE__*/styled(Checkbox).withConfig({
|
|
70
70
|
displayName: "StyledCheckbox",
|
|
71
|
-
componentId: "core-
|
|
71
|
+
componentId: "core-12_50_0__sc-9c7xd-5"
|
|
72
72
|
})([""]);
|
|
73
73
|
export var StyledTableBodyCell = /*#__PURE__*/styled.td.withConfig({
|
|
74
74
|
displayName: "StyledTableBodyCell",
|
|
75
|
-
componentId: "core-
|
|
75
|
+
componentId: "core-12_50_0__sc-9c7xd-6"
|
|
76
76
|
})(["position:relative;vertical-align:middle;", ""], function (_ref) {
|
|
77
77
|
var $snugfit = _ref.$snugfit;
|
|
78
78
|
return $snugfit && css(["white-space:nowrap;width:0.1%;"]);
|
|
79
79
|
});
|
|
80
80
|
export var StyledTableHeaderCell = /*#__PURE__*/styled.th.withConfig({
|
|
81
81
|
displayName: "StyledTableHeaderCell",
|
|
82
|
-
componentId: "core-
|
|
82
|
+
componentId: "core-12_50_0__sc-9c7xd-7"
|
|
83
83
|
})(["", " font-weight:", ";border-right:", ";color:", ";height:", "px;padding:", "px;position:relative;text-align:left;transition:background-color 0.2s ease-in-out;&:last-child{border-right:0;}", "{display:flex;align-items:center;}", " ", " ", " ", ""], getTypographyIntent('small'), tableHeaderFontWeight, tableHeaderBorderRight, tableHeaderFontColor, tableHeaderHeight, tableHeaderPadding, StyledTableHeaderCellSortableContainer, function (_ref2) {
|
|
84
84
|
var $sortable = _ref2.$sortable;
|
|
85
85
|
return $sortable && css(["padding:0;&:hover{background-color:", ";}"], tableHeaderBgColorHover);
|
|
@@ -95,15 +95,15 @@ export var StyledTableHeaderCell = /*#__PURE__*/styled.th.withConfig({
|
|
|
95
95
|
});
|
|
96
96
|
export var StyledHead = /*#__PURE__*/styled.thead.withConfig({
|
|
97
97
|
displayName: "StyledHead",
|
|
98
|
-
componentId: "core-
|
|
98
|
+
componentId: "core-12_50_0__sc-9c7xd-8"
|
|
99
99
|
})(["background-color:", ";transition:background-color 0.2s ease-in-out;", ""], tableHeaderBgColor, tableRowBorderBottom);
|
|
100
100
|
export var StyledCaratWrapper = /*#__PURE__*/styled(Button).withConfig({
|
|
101
101
|
displayName: "StyledCaratWrapper",
|
|
102
|
-
componentId: "core-
|
|
102
|
+
componentId: "core-12_50_0__sc-9c7xd-9"
|
|
103
103
|
})([""]);
|
|
104
104
|
export var StyledCarat = /*#__PURE__*/styled(ChevronRight).withConfig({
|
|
105
105
|
displayName: "StyledCarat",
|
|
106
|
-
componentId: "core-
|
|
106
|
+
componentId: "core-12_50_0__sc-9c7xd-10"
|
|
107
107
|
})(["", ""], function (_ref6) {
|
|
108
108
|
var $expanded = _ref6.$expanded;
|
|
109
109
|
return $expanded && css(["transform:rotate(90deg);"]);
|
|
@@ -111,7 +111,7 @@ export var StyledCarat = /*#__PURE__*/styled(ChevronRight).withConfig({
|
|
|
111
111
|
var cellInputCSS = /*#__PURE__*/css(["background-color:rgba(255,255,255,0);&&&{border:", ";border-radius:4px;width:100%;&::placeholder{color:", ";}&::-ms-clear{display:none;}&:hover{border-color:transparent;}&:focus{background-color:", ";border-style:solid;border-width:1px;border-color:", ";box-shadow:0 0 0 1px ", ";outline:none;}&:disabled{border:", ";color:", ";}}"], tableCellInputBorder, tableCellInputPlaceholderColor, colors.white, colors.blue40, colors.blue40, tableCellInputBorder, colors.gray70);
|
|
112
112
|
export var StyledTableCellSelect = /*#__PURE__*/styled(Select).withConfig({
|
|
113
113
|
displayName: "StyledTableCellSelect",
|
|
114
|
-
componentId: "core-
|
|
114
|
+
componentId: "core-12_50_0__sc-9c7xd-11"
|
|
115
115
|
})(["", ";background-color:transparent;border-color:transparent;height:auto;&:hover{background-color:transparent;}&:active:hover{border-color:", ";}&:focus,", ":focus-within &{background-color:", ";cursor:pointer;", " ", "{white-space:nowrap;}", "{opacity:1;pointer-events:all;}", " ", "}", " ", "{white-space:normal;}", ",& + ", "{opacity:0;pointer-events:none;}", " ", ""], cellInputCSS, colors.gray85, StyledSelectButtonWrapper, colors.white, getFocus(), StyledSelectButtonLabel, StyledSelectArrow, function (_ref7) {
|
|
116
116
|
var $hasClearIcon = _ref7.$hasClearIcon;
|
|
117
117
|
return $hasClearIcon && css(["& + ", "{opacity:1;pointer-events:all;}"], StyledSelectClearIcon);
|
|
@@ -132,25 +132,25 @@ export var StyledTableCellSelect = /*#__PURE__*/styled(Select).withConfig({
|
|
|
132
132
|
});
|
|
133
133
|
export var StyledTableCellInput = /*#__PURE__*/styled(Input).withConfig({
|
|
134
134
|
displayName: "StyledTableCellInput",
|
|
135
|
-
componentId: "core-
|
|
135
|
+
componentId: "core-12_50_0__sc-9c7xd-12"
|
|
136
136
|
})(["", ""], cellInputCSS);
|
|
137
137
|
export var StyledTableCellDateInput = /*#__PURE__*/styled(DateSelect).withConfig({
|
|
138
138
|
displayName: "StyledTableCellDateInput",
|
|
139
|
-
componentId: "core-
|
|
139
|
+
componentId: "core-12_50_0__sc-9c7xd-13"
|
|
140
140
|
})(["background-color:transparent;border-color:transparent;&:active:hover{border-color:", ";}&&&:focus-within{", ";background-color:", ";}", " ", "{opacity:0;}", "{&[data-qa-table-visible='false']{opacity:0;}}", "{&[data-placeholder='true']{opacity:0;}}&:focus-within{", "{opacity:1;}", "{&[data-qa-table-visible='false']{opacity:1;}}", "{&[data-placeholder='true']{opacity:1;}}}"], colors.gray45, getFocus(), colors.white, function (_ref10) {
|
|
141
141
|
var error = _ref10.error;
|
|
142
142
|
return error && css(["border-color:", ";"], colors.red50);
|
|
143
143
|
}, StyledDateInputIconContainer, StyledDateInputDelimiter, StyledDateInputSegment, StyledDateInputIconContainer, StyledDateInputDelimiter, StyledDateInputSegment);
|
|
144
144
|
export var StyledTableCellTextArea = /*#__PURE__*/styled(TextArea).withConfig({
|
|
145
145
|
displayName: "StyledTableCellTextArea",
|
|
146
|
-
componentId: "core-
|
|
146
|
+
componentId: "core-12_50_0__sc-9c7xd-14"
|
|
147
147
|
})(["", " &&{height:", "px;min-height:", "px;overflow:hidden;padding-top:", "px;resize:none;width:100%;", "}"], cellInputCSS, spacing.xxl, spacing.xxl, spacing.xs, function (_ref11) {
|
|
148
148
|
var $resizable = _ref11.$resizable;
|
|
149
149
|
return $resizable && css(["&:focus{min-height:64px;overflow:auto;resize:vertical;}"]);
|
|
150
150
|
});
|
|
151
151
|
export var StyledTableCellText = /*#__PURE__*/styled.div.withConfig({
|
|
152
152
|
displayName: "StyledTableCellText",
|
|
153
|
-
componentId: "core-
|
|
153
|
+
componentId: "core-12_50_0__sc-9c7xd-15"
|
|
154
154
|
})(["margin:", "px;display:flex;color:", ";", ""], spacing.lg, tableCellTextColor, function (_ref12) {
|
|
155
155
|
var $percent = _ref12.$percent,
|
|
156
156
|
$currency = _ref12.$currency;
|
|
@@ -158,22 +158,22 @@ export var StyledTableCellText = /*#__PURE__*/styled.div.withConfig({
|
|
|
158
158
|
});
|
|
159
159
|
export var StyledIconCell = /*#__PURE__*/styled.div.withConfig({
|
|
160
160
|
displayName: "StyledIconCell",
|
|
161
|
-
componentId: "core-
|
|
161
|
+
componentId: "core-12_50_0__sc-9c7xd-16"
|
|
162
162
|
})(["display:flex;color:", ";"], tableCellIconColor);
|
|
163
163
|
export var StyledOverdueIcon = /*#__PURE__*/styled(Error).withConfig({
|
|
164
164
|
displayName: "StyledOverdueIcon",
|
|
165
|
-
componentId: "core-
|
|
165
|
+
componentId: "core-12_50_0__sc-9c7xd-17"
|
|
166
166
|
})(["color:", ";flex-shrink:0;align-self:center;", ""], colors.red50, function (_ref13) {
|
|
167
167
|
var $rightAligned = _ref13.$rightAligned;
|
|
168
168
|
return $rightAligned ? css(["margin-right:", "px;"], spacing.sm) : css(["margin-left:", "px;"], spacing.sm);
|
|
169
169
|
});
|
|
170
170
|
export var StyledSelectCellWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
171
171
|
displayName: "StyledSelectCellWrapper",
|
|
172
|
-
componentId: "core-
|
|
172
|
+
componentId: "core-12_50_0__sc-9c7xd-18"
|
|
173
173
|
})(["display:flex;flex-direction:column;"]);
|
|
174
174
|
export var StyledTableInlineEditErrorBox = /*#__PURE__*/styled.div.withConfig({
|
|
175
175
|
displayName: "StyledTableInlineEditErrorBox",
|
|
176
|
-
componentId: "core-
|
|
176
|
+
componentId: "core-12_50_0__sc-9c7xd-19"
|
|
177
177
|
})(["", " color:", ";font-style:italic;background:", ";border-radius:0 2px 2px 2px;box-shadow:0 1px 2px rgba(0,0,0,0.2),0 1px 3px rgba(0,0,0,0.1);padding:6px ", "px;position:absolute;max-width:160px;z-index:1;", ""], getTypographyIntent('small'), colors.white, colors.red50, spacing.md, function (_ref14) {
|
|
178
178
|
var $size = _ref14.$size;
|
|
179
179
|
var sizes = {
|
|
@@ -191,7 +191,7 @@ export var StyledTableInlineEditErrorBox = /*#__PURE__*/styled.div.withConfig({
|
|
|
191
191
|
});
|
|
192
192
|
export var StyledTableInlineEditContainer = /*#__PURE__*/styled.div.withConfig({
|
|
193
193
|
displayName: "StyledTableInlineEditContainer",
|
|
194
|
-
componentId: "core-
|
|
194
|
+
componentId: "core-12_50_0__sc-9c7xd-20"
|
|
195
195
|
})(["background-color:", ";margin:", "px ", "px;position:relative;", " ", ""], tableBgColor, spacing.sm, spacing.xs, function (_ref15) {
|
|
196
196
|
var $error = _ref15.$error;
|
|
197
197
|
return $error && css(["position:static;background-color:", ";", ",", ",", ",", "{border:", ";border-radius:4px 4px 0 0;border-bottom:none;&:hover{border-bottom:none;}&:focus{background-color:", ";border:", ";border-bottom:none;}}"], tableCellInputErrorBgColor, StyledTableCellDateInput, StyledTableCellInput, StyledTableCellSelect, StyledTableCellTextArea, tableCellInputErrorBorder, tableCellInputFocusBgColor, tableCellInputFocusBorder);
|
|
@@ -215,26 +215,26 @@ export var StyledTableInlineEditContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
215
215
|
});
|
|
216
216
|
export var StyledTableBodyRow = /*#__PURE__*/styled.tr.withConfig({
|
|
217
217
|
displayName: "StyledTableBodyRow",
|
|
218
|
-
componentId: "core-
|
|
218
|
+
componentId: "core-12_50_0__sc-9c7xd-21"
|
|
219
219
|
})(["", " ", " &:focus-within{", "{background-color:", ";&.disabled{background-color:transparent;}}", ".error{background-color:", ";}}&:hover{", "{background-color:", ";cursor:pointer;&:hover{background-color:", ";}&.disabled{&,&:hover{background-color:transparent;cursor:default;}}}", ".error{background-color:", ";&:hover{background-color:", ";}", ",", ",", "{border:", ";border-bottom:none;&:hover{border-bottom:none;}&:focus{border:", ";border-bottom:none;}}}}"], tableRowBorderBottom, function (_ref17) {
|
|
220
220
|
var $overdue = _ref17.$overdue;
|
|
221
221
|
return $overdue && css(["", ",", ",", ",", ",", "{color:", ";}"], StyledTableCellText, StyledTableCellSelect, StyledTableCellInput, StyledTableCellDateInput, StyledTableCellTextArea, colors.red50);
|
|
222
222
|
}, StyledTableInlineEditContainer, tableCellInputRowHoverBgColor, StyledTableInlineEditContainer, tableCellInputErrorBgColor, StyledTableInlineEditContainer, tableCellInputRowHoverBgColor, tableCellInputHoverBgColor, StyledTableInlineEditContainer, tableCellInputErrorBgColor, tableCellInputErrorBgColor, StyledTableCellInput, StyledTableCellSelect, StyledTableCellTextArea, tableCellInputErrorBorder, tableCellInputFocusBorder);
|
|
223
223
|
export var StyledTableGroupRowContent = /*#__PURE__*/styled.div.withConfig({
|
|
224
224
|
displayName: "StyledTableGroupRowContent",
|
|
225
|
-
componentId: "core-
|
|
225
|
+
componentId: "core-12_50_0__sc-9c7xd-22"
|
|
226
226
|
})([""]);
|
|
227
227
|
export var StyledTableGroupRowHeader = /*#__PURE__*/styled.div.withConfig({
|
|
228
228
|
displayName: "StyledTableGroupRowHeader",
|
|
229
|
-
componentId: "core-
|
|
229
|
+
componentId: "core-12_50_0__sc-9c7xd-23"
|
|
230
230
|
})([""]);
|
|
231
231
|
export var StyledTableGroupRowTitle = /*#__PURE__*/styled.span.withConfig({
|
|
232
232
|
displayName: "StyledTableGroupRowTitle",
|
|
233
|
-
componentId: "core-
|
|
233
|
+
componentId: "core-12_50_0__sc-9c7xd-24"
|
|
234
234
|
})([""]);
|
|
235
235
|
export var StyledTableGroupRow = /*#__PURE__*/styled.tr.withConfig({
|
|
236
236
|
displayName: "StyledTableGroupRow",
|
|
237
|
-
componentId: "core-
|
|
237
|
+
componentId: "core-12_50_0__sc-9c7xd-25"
|
|
238
238
|
})(["background-color:", ";", " ", "{margin-left:", "px;padding:", "px 0;display:flex;flex-direction:row;}", "{display:flex;align-items:center;}", "{font-weight:", ";padding-left:", "px;}", ""], tableGroupRowBgColor, tableRowBorderBottom, StyledTableGroupRowContent, spacing.lg, spacing.lg, StyledTableGroupRowHeader, StyledTableGroupRowTitle, tableHeaderFontWeight, spacing.lg, function (_ref18) {
|
|
239
239
|
var $depth = _ref18.$depth;
|
|
240
240
|
if (typeof $depth !== 'number') {
|
|
@@ -244,7 +244,7 @@ export var StyledTableGroupRow = /*#__PURE__*/styled.tr.withConfig({
|
|
|
244
244
|
});
|
|
245
245
|
export var StyledTableWrapper = /*#__PURE__*/styled(Card).withConfig({
|
|
246
246
|
displayName: "StyledTableWrapper",
|
|
247
|
-
componentId: "core-
|
|
247
|
+
componentId: "core-12_50_0__sc-9c7xd-26"
|
|
248
248
|
})(["border-radius:", "px;border:", ";", ",tbody{&:first-child{tr:first-child{", ",td{&:first-child{border-top-left-radius:", "px;}&:last-child{border-top-right-radius:", "px;}}}}&:last-child{tr:last-child{", ",td{&:first-child{border-bottom-left-radius:", "px;}&:last-child{border-bottom-right-radius:", "px;}}}}}", ""], tableBorderRadius, tableBorder, StyledHead, StyledTableHeaderCell, tableBorderRadius, tableBorderRadius, StyledTableHeaderCell, tableBorderRadius, tableBorderRadius, function (_ref19) {
|
|
249
249
|
var $withShelf = _ref19.$withShelf;
|
|
250
250
|
return $withShelf && css(["position:relative;height:100%;"]);
|
|
@@ -253,7 +253,7 @@ var BodyRow = StyledTableBodyRow;
|
|
|
253
253
|
var GroupRow = StyledTableGroupRow;
|
|
254
254
|
export var StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
255
255
|
displayName: "StyledTable",
|
|
256
|
-
componentId: "core-
|
|
256
|
+
componentId: "core-12_50_0__sc-9c7xd-27"
|
|
257
257
|
})(["background-color:", ";border-collapse:collapse;border-radius:", "px;", " width:100%;td:first-child ", "{padding-left:", "px;}", " ", " + ", "{margin-left:", "px;padding-left:0;}", " ", " ", " + ", " > td{padding-left:", "px;}", " + ", " + ", " > td{padding-left:", "px;}", " + ", " + ", " + ", " > td{padding-left:", "px;}", " + ", " + ", " + ", " + ", " > td{padding-left:", "px;}", " ~ ", "{", "{padding-left:0;margin:0 ", "px;}& > td:first-child{padding-left:", "px;}}", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}", " + ", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}", " + ", " + ", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}", " + ", " + ", " + ", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}"], tableBgColor, tableBorderRadius, getTypographyIntent('body'), StyledCheckbox, spacing.lg, StyledTableGroupRow, StyledCaratWrapper, StyledCheckbox, spacing.xs, function (_ref20) {
|
|
258
258
|
var $fixed = _ref20.$fixed;
|
|
259
259
|
return $fixed && css(["table-layout:fixed;"]);
|
|
@@ -263,6 +263,6 @@ export var StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
|
263
263
|
}, GroupRow, GroupRow, tableGroupHeaderRowIndentation, GroupRow, GroupRow, GroupRow, 2 * tableGroupHeaderRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, 3 * tableGroupHeaderRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, GroupRow, 4 * tableGroupHeaderRowIndentation, GroupRow, BodyRow, StyledCheckbox, spacing.xs, tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, BodyRow, 2 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, GroupRow, BodyRow, 3 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, BodyRow, 4 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, GroupRow, BodyRow, 5 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation);
|
|
264
264
|
export var StyledLoadingContainer = /*#__PURE__*/styled.div.withConfig({
|
|
265
265
|
displayName: "StyledLoadingContainer",
|
|
266
|
-
componentId: "core-
|
|
266
|
+
componentId: "core-12_50_0__sc-9c7xd-28"
|
|
267
267
|
})(["cursor:default;align-items:center;background:", ";display:flex;height:100%;justify-content:center;opacity:0.9;position:absolute;width:100%;z-index:2;"], colors.gray96);
|
|
268
268
|
//# sourceMappingURL=Table.styles.js.map
|
|
@@ -4,22 +4,22 @@ import { spacing } from '../_styles/spacing';
|
|
|
4
4
|
var tableShelfShadow = '-4px 0px 5px 0px rgba(112, 112, 112, 0.1)';
|
|
5
5
|
export var StyledShelf = /*#__PURE__*/styled.div.withConfig({
|
|
6
6
|
displayName: "StyledShelf",
|
|
7
|
-
componentId: "core-
|
|
7
|
+
componentId: "core-12_50_0__sc-a6498a-0"
|
|
8
8
|
})(["position:absolute;right:0;top:0;bottom:0;box-shadow:", ";background-color:", ";"], tableShelfShadow, colors.white);
|
|
9
9
|
export var StyledHead = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "StyledHead",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_50_0__sc-a6498a-1"
|
|
12
12
|
})(["background-color:", ";transition:background-color 0.2s ease-in-out;"], colors.gray96);
|
|
13
13
|
export var StyledBodyRow = /*#__PURE__*/styled.div.withConfig({
|
|
14
14
|
displayName: "StyledBodyRow",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_50_0__sc-a6498a-2"
|
|
16
16
|
})(["border-top:1px solid ", ";transition:background-color 0.2s ease-in-out;"], colors.gray85);
|
|
17
17
|
export var StyledHeadCell = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
displayName: "StyledHeadCell",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_50_0__sc-a6498a-3"
|
|
20
20
|
})(["text-align:left;padding:", "px;line-height:13px;"], spacing.lg);
|
|
21
21
|
export var StyledBodyCell = /*#__PURE__*/styled.div.withConfig({
|
|
22
22
|
displayName: "StyledBodyCell",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_50_0__sc-a6498a-4"
|
|
24
24
|
})(["padding:", "px;line-height:13px;"], spacing.lg);
|
|
25
25
|
//# sourceMappingURL=TableShelf.styles.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TabListProps, TabListTabProps, TabPanelProps } from './Tablist.types';
|
|
3
|
+
declare function TabListTab(props: TabListTabProps): React.JSX.Element;
|
|
4
|
+
declare namespace TabListTab {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const TabPanel: React.ForwardRefExoticComponent<TabPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const TabList: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>> & {
|
|
9
|
+
Tab: typeof TabListTab;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var _excluded = ["children", "idPanel"],
|
|
2
|
+
_excluded2 = ["idPanel", "selected", "children"];
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { addSubcomponents } from '../_utils/addSubcomponents';
|
|
8
|
+
import { Tabs } from './Tabs';
|
|
9
|
+
var TabList_ = /*#__PURE__*/React.forwardRef(function TabList(props, ref) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(Tabs, _extends({
|
|
11
|
+
ref: ref,
|
|
12
|
+
role: "tablist"
|
|
13
|
+
}, props));
|
|
14
|
+
});
|
|
15
|
+
function TabListTab(props) {
|
|
16
|
+
var children = props.children,
|
|
17
|
+
idPanel = props.idPanel,
|
|
18
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
19
|
+
return /*#__PURE__*/React.createElement(Tabs.Tab, _extends({
|
|
20
|
+
role: "tab",
|
|
21
|
+
"aria-controls": "panel__".concat(idPanel),
|
|
22
|
+
id: "tab__".concat(idPanel)
|
|
23
|
+
}, rest), /*#__PURE__*/React.createElement(Tabs.Link, null, children));
|
|
24
|
+
}
|
|
25
|
+
export var TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(_ref, ref) {
|
|
26
|
+
var idPanel = _ref.idPanel,
|
|
27
|
+
_ref$selected = _ref.selected,
|
|
28
|
+
selected = _ref$selected === void 0 ? false : _ref$selected,
|
|
29
|
+
children = _ref.children,
|
|
30
|
+
props = _objectWithoutProperties(_ref, _excluded2);
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
32
|
+
role: "tabpanel",
|
|
33
|
+
"aria-labelledby": "tab__".concat(idPanel),
|
|
34
|
+
hidden: !selected,
|
|
35
|
+
id: "panel__".concat(idPanel),
|
|
36
|
+
ref: ref
|
|
37
|
+
}, props), children);
|
|
38
|
+
});
|
|
39
|
+
TabListTab.displayName = 'TabList.Tab';
|
|
40
|
+
TabPanel.displayName = 'TabPanel';
|
|
41
|
+
export var TabList = addSubcomponents({
|
|
42
|
+
Tab: TabListTab
|
|
43
|
+
}, TabList_);
|
|
44
|
+
TabList.displayName = 'TabList';
|
|
45
|
+
//# sourceMappingURL=Tablist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tablist.js","names":["React","addSubcomponents","Tabs","TabList_","forwardRef","TabList","props","ref","createElement","_extends","role","TabListTab","children","idPanel","rest","_objectWithoutProperties","_excluded","Tab","concat","id","Link","TabPanel","_ref","_ref$selected","selected","_excluded2","hidden","displayName"],"sources":["../../src/Tabs/Tablist.tsx"],"sourcesContent":["import React from 'react'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport type {\n TabListProps,\n TabListTabProps,\n TabPanelProps,\n} from './Tablist.types'\nimport { Tabs } from './Tabs'\n\nconst TabList_ = React.forwardRef<HTMLDivElement, TabListProps>(\n function TabList(props, ref) {\n return <Tabs ref={ref} role=\"tablist\" {...props} />\n }\n)\n\nfunction TabListTab(props: TabListTabProps) {\n const { children, idPanel, ...rest } = props\n\n return (\n <Tabs.Tab\n role=\"tab\"\n aria-controls={`panel__${idPanel}`}\n id={`tab__${idPanel}`}\n {...rest}\n >\n <Tabs.Link>{children}</Tabs.Link>\n </Tabs.Tab>\n )\n}\n\nexport const TabPanel = React.forwardRef<HTMLDivElement, TabPanelProps>(\n function TabPanel(\n {\n // @ts-expect-error TabPanelProps is typed for this automatic prop, or a set of aria props to replace it\n idPanel,\n selected = false,\n children,\n ...props\n },\n ref\n ) {\n return (\n <div\n role=\"tabpanel\"\n aria-labelledby={`tab__${idPanel}`}\n hidden={!selected}\n id={`panel__${idPanel}`}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n )\n }\n)\n\nTabListTab.displayName = 'TabList.Tab'\nTabPanel.displayName = 'TabPanel'\n\nexport const TabList = addSubcomponents(\n {\n Tab: TabListTab,\n },\n TabList_\n)\n\nTabList.displayName = 'TabList'\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAM7D,SAASC,IAAI,QAAQ,QAAQ;AAE7B,IAAMC,QAAQ,gBAAGH,KAAK,CAACI,UAAU,CAC/B,SAASC,OAAOA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAC3B,oBAAOP,KAAA,CAAAQ,aAAA,CAACN,IAAI,EAAAO,QAAA;IAACF,GAAG,EAAEA,GAAI;IAACG,IAAI,EAAC;EAAS,GAAKJ,KAAK,CAAG,CAAC;AACrD,CACF,CAAC;AAED,SAASK,UAAUA,CAACL,KAAsB,EAAE;EAC1C,IAAQM,QAAQ,GAAuBN,KAAK,CAApCM,QAAQ;IAAEC,OAAO,GAAcP,KAAK,CAA1BO,OAAO;IAAKC,IAAI,GAAAC,wBAAA,CAAKT,KAAK,EAAAU,SAAA;EAE5C,oBACEhB,KAAA,CAAAQ,aAAA,CAACN,IAAI,CAACe,GAAG,EAAAR,QAAA;IACPC,IAAI,EAAC,KAAK;IACV,2BAAAQ,MAAA,CAAyBL,OAAO,CAAG;IACnCM,EAAE,UAAAD,MAAA,CAAUL,OAAO;EAAG,GAClBC,IAAI,gBAERd,KAAA,CAAAQ,aAAA,CAACN,IAAI,CAACkB,IAAI,QAAER,QAAoB,CACxB,CAAC;AAEf;AAEA,OAAO,IAAMS,QAAQ,gBAAGrB,KAAK,CAACI,UAAU,CACtC,SAASiB,QAAQA,CAAAC,IAAA,EAQff,GAAG,EACH;EAAA,IANEM,OAAO,GAAAS,IAAA,CAAPT,OAAO;IAAAU,aAAA,GAAAD,IAAA,CACPE,QAAQ;IAARA,QAAQ,GAAAD,aAAA,cAAG,KAAK,GAAAA,aAAA;IAChBX,QAAQ,GAAAU,IAAA,CAARV,QAAQ;IACLN,KAAK,GAAAS,wBAAA,CAAAO,IAAA,EAAAG,UAAA;EAIV,oBACEzB,KAAA,CAAAQ,aAAA,QAAAC,QAAA;IACEC,IAAI,EAAC,UAAU;IACf,2BAAAQ,MAAA,CAAyBL,OAAO,CAAG;IACnCa,MAAM,EAAE,CAACF,QAAS;IAClBL,EAAE,YAAAD,MAAA,CAAYL,OAAO,CAAG;IACxBN,GAAG,EAAEA;EAAI,GACLD,KAAK,GAERM,QACE,CAAC;AAEV,CACF,CAAC;AAEDD,UAAU,CAACgB,WAAW,GAAG,aAAa;AACtCN,QAAQ,CAACM,WAAW,GAAG,UAAU;AAEjC,OAAO,IAAMtB,OAAO,GAAGJ,gBAAgB,CACrC;EACEgB,GAAG,EAAEN;AACP,CAAC,EACDR,QACF,CAAC;AAEDE,OAAO,CAACsB,WAAW,GAAG,SAAS"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { TabProps } from './Tabs.types';
|
|
3
|
+
export declare type TabListProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Accessible name for the tablist when no visible label element is referenced.
|
|
6
|
+
* Provide this OR `aria-labelledby`.
|
|
7
|
+
*/
|
|
8
|
+
'aria-label': string;
|
|
9
|
+
'aria-labelledby'?: never;
|
|
10
|
+
/**
|
|
11
|
+
* One or more `TabList.Tab` children that make up the tablist.
|
|
12
|
+
*/
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
} | {
|
|
15
|
+
'aria-label'?: never;
|
|
16
|
+
/**
|
|
17
|
+
* @a11y Required - Id reference to visible labeling text for the tablist.
|
|
18
|
+
*/
|
|
19
|
+
'aria-labelledby': string;
|
|
20
|
+
/**
|
|
21
|
+
* One or more `TabList.Tab` children that make up the tablist.
|
|
22
|
+
*/
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export declare type TabListTabProps = Pick<TabProps<'tab'>, 'selected' | 'as' | 'href' | 'onPress' | 'onClick'> & {
|
|
26
|
+
/**
|
|
27
|
+
* Visible tab label content.
|
|
28
|
+
*/
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* @a11y Required shared id used to match this tab to its `TabPanel`.
|
|
32
|
+
* This becomes the tab `aria-controls` property.
|
|
33
|
+
*/
|
|
34
|
+
idPanel: string;
|
|
35
|
+
};
|
|
36
|
+
export declare type TabPanelProps = {
|
|
37
|
+
/**
|
|
38
|
+
* Panel content for the associated tab.
|
|
39
|
+
*/
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* @a11y Required shared id that must match the controlling `TabList.Tab idPanel`.
|
|
43
|
+
* Used to derive panel id/label relationships in the tab pattern.
|
|
44
|
+
*/
|
|
45
|
+
idPanel: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether this panel is visible. Keep this synchronized with the selected tab state.
|
|
48
|
+
*/
|
|
49
|
+
selected?: boolean;
|
|
50
|
+
} | {
|
|
51
|
+
children?: React.ReactNode;
|
|
52
|
+
id: string;
|
|
53
|
+
'aria-labelledby': string;
|
|
54
|
+
/**
|
|
55
|
+
* Whether this panel is visible. Keep this synchronized with the selected tab state.
|
|
56
|
+
*/
|
|
57
|
+
selected?: boolean;
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tablist.types.js","names":[],"sources":["../../src/Tabs/Tablist.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { TabProps } from './Tabs.types'\n\nexport type TabListProps =\n | {\n /**\n * Accessible name for the tablist when no visible label element is referenced.\n * Provide this OR `aria-labelledby`.\n */\n 'aria-label': string\n 'aria-labelledby'?: never\n /**\n * One or more `TabList.Tab` children that make up the tablist.\n */\n children: React.ReactNode\n }\n | {\n 'aria-label'?: never\n /**\n * @a11y Required - Id reference to visible labeling text for the tablist.\n */\n 'aria-labelledby': string\n /**\n * One or more `TabList.Tab` children that make up the tablist.\n */\n children: React.ReactNode\n }\n\nexport type TabListTabProps = Pick<\n TabProps<'tab'>,\n 'selected' | 'as' | 'href' | 'onPress' | 'onClick'\n> & {\n /**\n * Visible tab label content.\n */\n children: React.ReactNode\n /**\n * @a11y Required shared id used to match this tab to its `TabPanel`.\n * This becomes the tab `aria-controls` property.\n */\n idPanel: string\n}\n\nexport type TabPanelProps =\n | {\n /**\n * Panel content for the associated tab.\n */\n children?: React.ReactNode\n /**\n * @a11y Required shared id that must match the controlling `TabList.Tab idPanel`.\n * Used to derive panel id/label relationships in the tab pattern.\n */\n idPanel: string\n /**\n * Whether this panel is visible. Keep this synchronized with the selected tab state.\n */\n selected?: boolean\n }\n | {\n children?: React.ReactNode\n id: string\n 'aria-labelledby': string\n /**\n * Whether this panel is visible. Keep this synchronized with the selected tab state.\n */\n selected?: boolean\n }\n"],"mappings":""}
|
package/dist/Tabs/Tabs.js
CHANGED
|
@@ -36,6 +36,33 @@ import { getStyledComponents, StyledOverlay, StyledTabList, StyledTabs } from '.
|
|
|
36
36
|
var ExtraTabSpacing = spacing.xxl;
|
|
37
37
|
var HelixHeaderExtraTabSpacing = spacing.sm;
|
|
38
38
|
function noop() {}
|
|
39
|
+
var ROVING_TAB_KEYS = ['ArrowRight', 'ArrowLeft', 'Home', 'End'];
|
|
40
|
+
function moveRovingFocusWithinTablist(event) {
|
|
41
|
+
var key = event.key;
|
|
42
|
+
if (!ROVING_TAB_KEYS.includes(key)) return false;
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
var current = event.currentTarget;
|
|
45
|
+
var tablist = current.closest('[role="tablist"]');
|
|
46
|
+
if (!tablist) return;
|
|
47
|
+
var tabs = Array.from(tablist.querySelectorAll('[role="tab"], button')).filter(function (tab) {
|
|
48
|
+
if (tab.hasAttribute('disabled')) return false;
|
|
49
|
+
var styles = window.getComputedStyle(tab);
|
|
50
|
+
var isHidden = styles.visibility === 'hidden' || styles.pointerEvents === 'none';
|
|
51
|
+
return !isHidden;
|
|
52
|
+
});
|
|
53
|
+
if (!tabs.length) return;
|
|
54
|
+
var currentIndex = tabs.indexOf(current);
|
|
55
|
+
if (currentIndex < 0) return;
|
|
56
|
+
var nextIndex = currentIndex;
|
|
57
|
+
if (key === 'ArrowRight') nextIndex = (currentIndex + 1) % tabs.length;
|
|
58
|
+
if (key === 'ArrowLeft') nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;
|
|
59
|
+
if (key === 'Home') nextIndex = 0;
|
|
60
|
+
if (key === 'End') nextIndex = tabs.length - 1;
|
|
61
|
+
var nextTab = tabs[nextIndex];
|
|
62
|
+
current.tabIndex = -1;
|
|
63
|
+
nextTab.tabIndex = 0;
|
|
64
|
+
nextTab.focus();
|
|
65
|
+
}
|
|
39
66
|
export var Link = /*#__PURE__*/React.forwardRef(function Link(_ref, ref) {
|
|
40
67
|
var children = _ref.children,
|
|
41
68
|
_ref$UNSAFE_helixHead = _ref.UNSAFE_helixHeader,
|
|
@@ -91,6 +118,16 @@ function TabInternal(_ref2, ref) {
|
|
|
91
118
|
// The no role check addition allows overrides / opt-out, for like
|
|
92
119
|
// role = presentation or role = link having click handlers for some reason.
|
|
93
120
|
var shouldDefaultToButton = !role && onPress || !role && onClick;
|
|
121
|
+
function onTablistTabKeyDown(event) {
|
|
122
|
+
// props.onKeyDown?.(event)
|
|
123
|
+
if (event.defaultPrevented) return;
|
|
124
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
event.currentTarget.click();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
moveRovingFocusWithinTablist(event);
|
|
130
|
+
}
|
|
94
131
|
var a11yProps = role === 'button' || shouldDefaultToButton ? _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
95
132
|
role: 'button',
|
|
96
133
|
'aria-current': selected || active,
|
|
@@ -102,10 +139,16 @@ function TabInternal(_ref2, ref) {
|
|
|
102
139
|
as: as || 'a',
|
|
103
140
|
$clickable: !disabled
|
|
104
141
|
}) : role === 'tab' ? {
|
|
105
|
-
as: as,
|
|
106
142
|
role: 'tab',
|
|
143
|
+
id: props.id,
|
|
144
|
+
'aria-controls': props['aria-controls'],
|
|
145
|
+
'aria-selected': selected || active ? true : false,
|
|
146
|
+
tabIndex: selected || active ? 0 : -1,
|
|
107
147
|
onBlur: onBlur,
|
|
108
|
-
onFocus: onFocus
|
|
148
|
+
onFocus: onFocus,
|
|
149
|
+
onClick: onClick || onPress,
|
|
150
|
+
onKeyDown: onTablistTabKeyDown,
|
|
151
|
+
as: as ? as : props.href ? 'a' : 'button'
|
|
109
152
|
} : {
|
|
110
153
|
as: as,
|
|
111
154
|
role: role,
|
|
@@ -123,7 +166,7 @@ function TabInternal(_ref2, ref) {
|
|
|
123
166
|
|
|
124
167
|
// For button/link roles, spread buttonPropsBase to preserve useButton's onClick
|
|
125
168
|
// For other roles, spread all props
|
|
126
|
-
var roleSpecificProps = role === 'button' || role === 'link' || shouldDefaultToButton ? buttonPropsBase : props;
|
|
169
|
+
var roleSpecificProps = role === 'button' || role === 'link' || shouldDefaultToButton ? buttonPropsBase : role === 'tab' ? props : props;
|
|
127
170
|
return /*#__PURE__*/React.createElement(Styled.Tab, _extends({
|
|
128
171
|
$selected: tabSelected,
|
|
129
172
|
$dark: props.dark,
|
|
@@ -175,7 +218,9 @@ export var MoreMenu = /*#__PURE__*/React.forwardRef(function MoreMenu(_ref4, ref
|
|
|
175
218
|
key: i,
|
|
176
219
|
selected: child.props.selected || child.props.active
|
|
177
220
|
}, /*#__PURE__*/React.cloneElement(child, {
|
|
178
|
-
ref: null
|
|
221
|
+
ref: null,
|
|
222
|
+
tabIndex: 0,
|
|
223
|
+
role: child.props.role === 'tab' ? undefined : child.props.role
|
|
179
224
|
}));
|
|
180
225
|
}
|
|
181
226
|
}))));
|
|
@@ -237,6 +282,13 @@ var Tabs_ = /*#__PURE__*/React.forwardRef(function Tabs(_ref5, ref) {
|
|
|
237
282
|
return /*#__PURE__*/React.isValidElement(child) && (child.props.active || child.props.selected);
|
|
238
283
|
});
|
|
239
284
|
var Styled = getStyledComponents(UNSAFE_helixHeader);
|
|
285
|
+
var moreButtonProps = props.role === 'tablist' ? {
|
|
286
|
+
role: 'tab',
|
|
287
|
+
tabIndex: -1,
|
|
288
|
+
onKeyDown: function onMoreKeyDown(event) {
|
|
289
|
+
moveRovingFocusWithinTablist(event);
|
|
290
|
+
}
|
|
291
|
+
} : {};
|
|
240
292
|
var moreDropdownTrigger = cutoffIndex >= 1 ? /*#__PURE__*/React.createElement(OverlayTrigger, {
|
|
241
293
|
"aria-label": i18n.t('core.tabs.more'),
|
|
242
294
|
beforeShow: function beforeShow() {
|
|
@@ -250,12 +302,12 @@ var Tabs_ = /*#__PURE__*/React.forwardRef(function Tabs(_ref5, ref) {
|
|
|
250
302
|
overlay: /*#__PURE__*/React.createElement(MoreMenu, null, overflowing),
|
|
251
303
|
ref: ref,
|
|
252
304
|
role: "dialog"
|
|
253
|
-
}, /*#__PURE__*/React.createElement(Styled.DropdownTab, {
|
|
305
|
+
}, /*#__PURE__*/React.createElement(Styled.DropdownTab, _extends({
|
|
254
306
|
$selected: isOverflowingSelected,
|
|
255
307
|
$dark: dark,
|
|
256
308
|
"aria-hidden": !overflowing.length,
|
|
257
309
|
as: "button"
|
|
258
|
-
}, /*#__PURE__*/React.createElement(Styled.DropdownTabInner, {
|
|
310
|
+
}, moreButtonProps), /*#__PURE__*/React.createElement(Styled.DropdownTabInner, {
|
|
259
311
|
$selected: isOverflowingSelected,
|
|
260
312
|
$dark: dark
|
|
261
313
|
}, /*#__PURE__*/React.createElement(Styled.Link, {
|
|
@@ -267,7 +319,7 @@ var Tabs_ = /*#__PURE__*/React.forwardRef(function Tabs(_ref5, ref) {
|
|
|
267
319
|
})))) : null;
|
|
268
320
|
return /*#__PURE__*/React.createElement(StyledTabs, _extends({
|
|
269
321
|
ref: ref,
|
|
270
|
-
role:
|
|
322
|
+
role: props.role || 'group',
|
|
271
323
|
$dark: dark,
|
|
272
324
|
$index: cutoffIndex
|
|
273
325
|
}, props), /*#__PURE__*/React.createElement(StyledTabList, {
|
|
@@ -275,7 +327,7 @@ var Tabs_ = /*#__PURE__*/React.forwardRef(function Tabs(_ref5, ref) {
|
|
|
275
327
|
ref: containerRef
|
|
276
328
|
}, filtered.map(function (child, i) {
|
|
277
329
|
if ( /*#__PURE__*/React.isValidElement(child)) return /*#__PURE__*/React.cloneElement(child, {
|
|
278
|
-
as: props.role === 'navigation' ? 'li' :
|
|
330
|
+
as: props.role === 'navigation' ? 'li' : child.props.as,
|
|
279
331
|
dark: dark,
|
|
280
332
|
onMount: function onMount(el) {
|
|
281
333
|
setTabElements(function (elements) {
|