@procore/core-react 12.27.0 → 12.28.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 +12 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- 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/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 +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- 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 +7 -7
- 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 +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- 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 +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 +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +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 +11 -11
- 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.styles.js +3 -3
- 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.styles.js +7 -7
- 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 +1 -0
- package/dist/SuperSelect/SuperSelect.components.js +106 -15
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.constants.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.constants.js +1 -0
- package/dist/SuperSelect/SuperSelect.constants.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.js +5 -1
- package/dist/SuperSelect/SuperSelect.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.d.ts +3 -0
- package/dist/SuperSelect/SuperSelect.styles.js +41 -37
- package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.types.d.ts +35 -1
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.utils.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.utils.js +4 -1
- package/dist/SuperSelect/SuperSelect.utils.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
- package/dist/SuperSelect/useSuperSelect.js +111 -24
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- 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 +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.d.ts +1 -1
- package/dist/TextEditor/TextEditor.js +8 -1
- package/dist/TextEditor/TextEditor.js.map +1 -1
- package/dist/TextEditor/TextEditor.styles.js +1 -1
- package/dist/TextEditor/TextEditor.types.d.ts +43 -0
- package/dist/TextEditor/TextEditor.types.js.map +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 +1 -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.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 +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- 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/I18n.d.ts +2 -0
- package/dist/_locales/en.json +2 -1
- package/dist/_locales/pseudo.json +2 -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 +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +13 -13
- 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 +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- 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 +901 -757
- 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 +52 -52
- 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 +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +48 -48
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +32 -32
- package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +30 -30
- 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 +5 -5
- 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 +60 -60
- 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 +101 -101
- package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
- 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 +86 -14
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +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 +7 -7
- 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 +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/package.json +1 -1
|
@@ -47,26 +47,26 @@ var tableCellInputErrorBorder = "1px solid ".concat(colors.red50);
|
|
|
47
47
|
var tableRowBorderBottom = /*#__PURE__*/css(["border-bottom:", ";&:last-child{border-bottom:0;}"], tableBorder);
|
|
48
48
|
export var StyledTableHeaderCellSortableContainer = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledTableHeaderCellSortableContainer",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_28_0__sc-9c7xd-0"
|
|
51
51
|
})([""]);
|
|
52
52
|
export var StyledTableHeaderCellLabel = /*#__PURE__*/styled.div.withConfig({
|
|
53
53
|
displayName: "StyledTableHeaderCellLabel",
|
|
54
|
-
componentId: "core-
|
|
54
|
+
componentId: "core-12_28_0__sc-9c7xd-1"
|
|
55
55
|
})(["display:inline-block;flex:1 1 auto;position:relative;"]);
|
|
56
56
|
export var StyledCheckbox = /*#__PURE__*/styled(Checkbox).withConfig({
|
|
57
57
|
displayName: "StyledCheckbox",
|
|
58
|
-
componentId: "core-
|
|
58
|
+
componentId: "core-12_28_0__sc-9c7xd-2"
|
|
59
59
|
})([""]);
|
|
60
60
|
export var StyledTableBodyCell = /*#__PURE__*/styled.td.withConfig({
|
|
61
61
|
displayName: "StyledTableBodyCell",
|
|
62
|
-
componentId: "core-
|
|
62
|
+
componentId: "core-12_28_0__sc-9c7xd-3"
|
|
63
63
|
})(["position:relative;vertical-align:middle;", ""], function (_ref) {
|
|
64
64
|
var $snugfit = _ref.$snugfit;
|
|
65
65
|
return $snugfit && css(["white-space:nowrap;width:0.1%;"]);
|
|
66
66
|
});
|
|
67
67
|
export var StyledTableHeaderCell = /*#__PURE__*/styled.th.withConfig({
|
|
68
68
|
displayName: "StyledTableHeaderCell",
|
|
69
|
-
componentId: "core-
|
|
69
|
+
componentId: "core-12_28_0__sc-9c7xd-4"
|
|
70
70
|
})(["", " 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;}", "{", "{min-height:14px;}}", " ", " ", " ", " ", ""], getTypographyIntent('small'), tableHeaderFontWeight, tableHeaderBorderRight, tableHeaderFontColor, tableHeaderHeight, tableHeaderPadding, StyledTableHeaderCellSortableContainer, StyledTableHeaderCellSortableContainer, StyledTableHeaderCellLabel, function (_ref2) {
|
|
71
71
|
var $sortable = _ref2.$sortable;
|
|
72
72
|
return $sortable && css(["cursor:pointer;padding:", "px;", ",", "{color:", ";opacity:0;transition:all 0.15s ease-in-out;position:absolute;}::before,::after{font-size:16px;}&:hover{background-color:", ";", "{color:", ";}}"], spacing.lg, StyledTableHeaderCellSortIconAsc, StyledTableHeaderCellSortIconDesc, tableSortFontColor, tableHeaderBgColorHover, StyledTableHeaderCellSortIconAsc, tableSortFontColorHover);
|
|
@@ -85,27 +85,27 @@ export var StyledTableHeaderCell = /*#__PURE__*/styled.th.withConfig({
|
|
|
85
85
|
});
|
|
86
86
|
export var StyledTableHeaderCellIconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
87
87
|
displayName: "StyledTableHeaderCellIconWrapper",
|
|
88
|
-
componentId: "core-
|
|
88
|
+
componentId: "core-12_28_0__sc-9c7xd-5"
|
|
89
89
|
})(["height:20px;line-height:20px;padding:0 ", "px 0 ", "px;width:20px;"], spacing.lg, spacing.sm);
|
|
90
90
|
export var StyledTableHeaderCellSortIconAsc = /*#__PURE__*/styled(CaretUp).withConfig({
|
|
91
91
|
displayName: "StyledTableHeaderCellSortIconAsc",
|
|
92
|
-
componentId: "core-
|
|
92
|
+
componentId: "core-12_28_0__sc-9c7xd-6"
|
|
93
93
|
})(["margin-top:-", "px;"], spacing.sm);
|
|
94
94
|
export var StyledTableHeaderCellSortIconDesc = /*#__PURE__*/styled(CaretDown).withConfig({
|
|
95
95
|
displayName: "StyledTableHeaderCellSortIconDesc",
|
|
96
|
-
componentId: "core-
|
|
96
|
+
componentId: "core-12_28_0__sc-9c7xd-7"
|
|
97
97
|
})([""]);
|
|
98
98
|
export var StyledHead = /*#__PURE__*/styled.thead.withConfig({
|
|
99
99
|
displayName: "StyledHead",
|
|
100
|
-
componentId: "core-
|
|
100
|
+
componentId: "core-12_28_0__sc-9c7xd-8"
|
|
101
101
|
})(["background-color:", ";transition:background-color 0.2s ease-in-out;", " &:hover{", "{", ",", "{&::after,&::before{opacity:1;}}}}"], tableHeaderBgColor, tableRowBorderBottom, StyledTableHeaderCell, StyledTableHeaderCellSortIconAsc, StyledTableHeaderCellSortIconDesc);
|
|
102
102
|
export var StyledCaratWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
103
103
|
displayName: "StyledCaratWrapper",
|
|
104
|
-
componentId: "core-
|
|
104
|
+
componentId: "core-12_28_0__sc-9c7xd-9"
|
|
105
105
|
})(["font-size:16px;color:", ";padding-right:", "px;transition:all 0.2s ease-in-out;& + ", "{margin:0 ", "px;}"], colors.gray70, spacing.xs, StyledCheckbox, spacing.xs);
|
|
106
106
|
export var StyledCarat = /*#__PURE__*/styled(ChevronRight).withConfig({
|
|
107
107
|
displayName: "StyledCarat",
|
|
108
|
-
componentId: "core-
|
|
108
|
+
componentId: "core-12_28_0__sc-9c7xd-10"
|
|
109
109
|
})(["", ""], function (_ref7) {
|
|
110
110
|
var $expanded = _ref7.$expanded;
|
|
111
111
|
return $expanded && css(["transform:rotate(90deg);"]);
|
|
@@ -113,7 +113,7 @@ export var StyledCarat = /*#__PURE__*/styled(ChevronRight).withConfig({
|
|
|
113
113
|
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);
|
|
114
114
|
export var StyledTableCellSelect = /*#__PURE__*/styled(Select).withConfig({
|
|
115
115
|
displayName: "StyledTableCellSelect",
|
|
116
|
-
componentId: "core-
|
|
116
|
+
componentId: "core-12_28_0__sc-9c7xd-11"
|
|
117
117
|
})(["", ";background-color:transparent;border-color:transparent;height:auto;&:hover{background-color:transparent;}&:active:hover{border-color:", ";}&:focus{background-color:", ";cursor:pointer;", " ", "{white-space:nowrap;}", "{opacity:1;pointer-events:all;}", " ", "}", "{white-space:normal;}", ",", "{opacity:0;pointer-events:none;}", " ", ""], cellInputCSS, colors.gray85, colors.white, getFocus(), StyledSelectButtonLabel, StyledSelectArrow, function (_ref8) {
|
|
118
118
|
var $hasClearIcon = _ref8.$hasClearIcon;
|
|
119
119
|
return $hasClearIcon && css(["", "{opacity:1;pointer-events:all;}"], StyledSelectClearIcon);
|
|
@@ -131,25 +131,25 @@ export var StyledTableCellSelect = /*#__PURE__*/styled(Select).withConfig({
|
|
|
131
131
|
});
|
|
132
132
|
export var StyledTableCellInput = /*#__PURE__*/styled(Input).withConfig({
|
|
133
133
|
displayName: "StyledTableCellInput",
|
|
134
|
-
componentId: "core-
|
|
134
|
+
componentId: "core-12_28_0__sc-9c7xd-12"
|
|
135
135
|
})(["", ""], cellInputCSS);
|
|
136
136
|
export var StyledTableCellDateInput = /*#__PURE__*/styled(DateSelect).withConfig({
|
|
137
137
|
displayName: "StyledTableCellDateInput",
|
|
138
|
-
componentId: "core-
|
|
138
|
+
componentId: "core-12_28_0__sc-9c7xd-13"
|
|
139
139
|
})(["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) {
|
|
140
140
|
var error = _ref10.error;
|
|
141
141
|
return error && css(["border-color:", ";"], colors.red50);
|
|
142
142
|
}, StyledDateInputIconContainer, StyledDateInputDelimiter, StyledDateInputSegment, StyledDateInputIconContainer, StyledDateInputDelimiter, StyledDateInputSegment);
|
|
143
143
|
export var StyledTableCellTextArea = /*#__PURE__*/styled(TextArea).withConfig({
|
|
144
144
|
displayName: "StyledTableCellTextArea",
|
|
145
|
-
componentId: "core-
|
|
145
|
+
componentId: "core-12_28_0__sc-9c7xd-14"
|
|
146
146
|
})(["", " &&{height:", "px;min-height:", "px;overflow:hidden;padding-top:", "px;resize:none;width:100%;", "}"], cellInputCSS, spacing.xxl, spacing.xxl, spacing.xs, function (_ref11) {
|
|
147
147
|
var $resizable = _ref11.$resizable;
|
|
148
148
|
return $resizable && css(["&:focus{min-height:64px;overflow:auto;resize:vertical;}"]);
|
|
149
149
|
});
|
|
150
150
|
export var StyledTableCellText = /*#__PURE__*/styled.div.withConfig({
|
|
151
151
|
displayName: "StyledTableCellText",
|
|
152
|
-
componentId: "core-
|
|
152
|
+
componentId: "core-12_28_0__sc-9c7xd-15"
|
|
153
153
|
})(["margin:", "px;display:flex;color:", ";", ""], spacing.lg, tableCellTextColor, function (_ref12) {
|
|
154
154
|
var $percent = _ref12.$percent,
|
|
155
155
|
$currency = _ref12.$currency;
|
|
@@ -157,15 +157,15 @@ export var StyledTableCellText = /*#__PURE__*/styled.div.withConfig({
|
|
|
157
157
|
});
|
|
158
158
|
export var StyledIconCell = /*#__PURE__*/styled.div.withConfig({
|
|
159
159
|
displayName: "StyledIconCell",
|
|
160
|
-
componentId: "core-
|
|
160
|
+
componentId: "core-12_28_0__sc-9c7xd-16"
|
|
161
161
|
})(["display:flex;color:", ";"], tableCellIconColor);
|
|
162
162
|
export var StyledSelectCellWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
163
163
|
displayName: "StyledSelectCellWrapper",
|
|
164
|
-
componentId: "core-
|
|
164
|
+
componentId: "core-12_28_0__sc-9c7xd-17"
|
|
165
165
|
})(["display:flex;flex-direction:column;"]);
|
|
166
166
|
export var StyledTableInlineEditErrorBox = /*#__PURE__*/styled.div.withConfig({
|
|
167
167
|
displayName: "StyledTableInlineEditErrorBox",
|
|
168
|
-
componentId: "core-
|
|
168
|
+
componentId: "core-12_28_0__sc-9c7xd-18"
|
|
169
169
|
})(["", " 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 (_ref13) {
|
|
170
170
|
var $size = _ref13.$size;
|
|
171
171
|
var sizes = {
|
|
@@ -183,7 +183,7 @@ export var StyledTableInlineEditErrorBox = /*#__PURE__*/styled.div.withConfig({
|
|
|
183
183
|
});
|
|
184
184
|
export var StyledTableInlineEditContainer = /*#__PURE__*/styled.div.withConfig({
|
|
185
185
|
displayName: "StyledTableInlineEditContainer",
|
|
186
|
-
componentId: "core-
|
|
186
|
+
componentId: "core-12_28_0__sc-9c7xd-19"
|
|
187
187
|
})(["background-color:", ";margin:", "px ", "px;position:relative;", " ", ""], tableBgColor, spacing.sm, spacing.xs, function (_ref14) {
|
|
188
188
|
var $error = _ref14.$error;
|
|
189
189
|
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);
|
|
@@ -207,26 +207,26 @@ export var StyledTableInlineEditContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
207
207
|
});
|
|
208
208
|
export var StyledTableBodyRow = /*#__PURE__*/styled.tr.withConfig({
|
|
209
209
|
displayName: "StyledTableBodyRow",
|
|
210
|
-
componentId: "core-
|
|
210
|
+
componentId: "core-12_28_0__sc-9c7xd-20"
|
|
211
211
|
})(["", " ", " &: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 (_ref16) {
|
|
212
212
|
var $overdue = _ref16.$overdue;
|
|
213
213
|
return $overdue && css(["", ",", ",", ",", ",", "{color:", ";}"], StyledTableCellText, StyledTableCellSelect, StyledTableCellInput, StyledTableCellDateInput, StyledTableCellTextArea, colors.red50);
|
|
214
214
|
}, StyledTableInlineEditContainer, tableCellInputRowHoverBgColor, StyledTableInlineEditContainer, tableCellInputErrorBgColor, StyledTableInlineEditContainer, tableCellInputRowHoverBgColor, tableCellInputHoverBgColor, StyledTableInlineEditContainer, tableCellInputErrorBgColor, tableCellInputErrorBgColor, StyledTableCellInput, StyledTableCellSelect, StyledTableCellTextArea, tableCellInputErrorBorder, tableCellInputFocusBorder);
|
|
215
215
|
export var StyledTableGroupRowContent = /*#__PURE__*/styled.div.withConfig({
|
|
216
216
|
displayName: "StyledTableGroupRowContent",
|
|
217
|
-
componentId: "core-
|
|
217
|
+
componentId: "core-12_28_0__sc-9c7xd-21"
|
|
218
218
|
})([""]);
|
|
219
219
|
export var StyledTableGroupRowHeader = /*#__PURE__*/styled.div.withConfig({
|
|
220
220
|
displayName: "StyledTableGroupRowHeader",
|
|
221
|
-
componentId: "core-
|
|
221
|
+
componentId: "core-12_28_0__sc-9c7xd-22"
|
|
222
222
|
})([""]);
|
|
223
223
|
export var StyledTableGroupRowTitle = /*#__PURE__*/styled.span.withConfig({
|
|
224
224
|
displayName: "StyledTableGroupRowTitle",
|
|
225
|
-
componentId: "core-
|
|
225
|
+
componentId: "core-12_28_0__sc-9c7xd-23"
|
|
226
226
|
})([""]);
|
|
227
227
|
export var StyledTableGroupRow = /*#__PURE__*/styled.tr.withConfig({
|
|
228
228
|
displayName: "StyledTableGroupRow",
|
|
229
|
-
componentId: "core-
|
|
229
|
+
componentId: "core-12_28_0__sc-9c7xd-24"
|
|
230
230
|
})(["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 (_ref17) {
|
|
231
231
|
var $depth = _ref17.$depth;
|
|
232
232
|
if (typeof $depth !== 'number') {
|
|
@@ -236,7 +236,7 @@ export var StyledTableGroupRow = /*#__PURE__*/styled.tr.withConfig({
|
|
|
236
236
|
});
|
|
237
237
|
export var StyledTableWrapper = /*#__PURE__*/styled(Card).withConfig({
|
|
238
238
|
displayName: "StyledTableWrapper",
|
|
239
|
-
componentId: "core-
|
|
239
|
+
componentId: "core-12_28_0__sc-9c7xd-25"
|
|
240
240
|
})(["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 (_ref18) {
|
|
241
241
|
var $withShelf = _ref18.$withShelf;
|
|
242
242
|
return $withShelf && css(["position:relative;height:100%;"]);
|
|
@@ -245,7 +245,7 @@ var BodyRow = StyledTableBodyRow;
|
|
|
245
245
|
var GroupRow = StyledTableGroupRow;
|
|
246
246
|
export var StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
247
247
|
displayName: "StyledTable",
|
|
248
|
-
componentId: "core-
|
|
248
|
+
componentId: "core-12_28_0__sc-9c7xd-26"
|
|
249
249
|
})(["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 (_ref19) {
|
|
250
250
|
var $fixed = _ref19.$fixed;
|
|
251
251
|
return $fixed && css(["table-layout:fixed;"]);
|
|
@@ -255,6 +255,6 @@ export var StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
|
255
255
|
}, 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);
|
|
256
256
|
export var StyledLoadingContainer = /*#__PURE__*/styled.div.withConfig({
|
|
257
257
|
displayName: "StyledLoadingContainer",
|
|
258
|
-
componentId: "core-
|
|
258
|
+
componentId: "core-12_28_0__sc-9c7xd-27"
|
|
259
259
|
})(["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);
|
|
260
260
|
//# 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_28_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_28_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_28_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_28_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_28_0__sc-a6498a-4"
|
|
24
24
|
})(["padding:", "px;line-height:13px;"], spacing.lg);
|
|
25
25
|
//# sourceMappingURL=TableShelf.styles.js.map
|
package/dist/Tabs/Tabs.styles.js
CHANGED
|
@@ -17,17 +17,17 @@ var borderRadius = /*#__PURE__*/css(["border-radius:", "px ", "px 0 0;"], spacin
|
|
|
17
17
|
*/
|
|
18
18
|
var StyledTabBase = /*#__PURE__*/styled.div.withConfig({
|
|
19
19
|
displayName: "StyledTabBase",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_28_0__sc-17s58xs-0"
|
|
21
21
|
})(["align-items:center;box-sizing:border-box;cursor:pointer;display:inline-flex;flex:0 0 auto;justify-content:center;position:relative;white-space:nowrap;text-decoration:none;background-color:transparent;border:none;font-family:inherit;padding:0;"]);
|
|
22
22
|
var StyledTabInnerBase = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledTabInnerBase",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_28_0__sc-17s58xs-1"
|
|
25
25
|
})(["align-self:baseline;box-sizing:border-box;&,> a{display:flex;text-decoration:none;width:100%;}"]);
|
|
26
26
|
|
|
27
27
|
// This so that it can be visible/hidden via CSS down below
|
|
28
28
|
var StyledDropdownTabBase = /*#__PURE__*/styled(StyledTabBase).withConfig({
|
|
29
29
|
displayName: "StyledDropdownTabBase",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_28_0__sc-17s58xs-2"
|
|
31
31
|
})(["", ""], hiddenTab);
|
|
32
32
|
|
|
33
33
|
//// END BASE LAYOUT COMPONENTS FOR TABS ////
|
|
@@ -50,11 +50,11 @@ function getTabStyle() {
|
|
|
50
50
|
}
|
|
51
51
|
var StyledTab = /*#__PURE__*/styled(StyledTabBase).withConfig({
|
|
52
52
|
displayName: "StyledTab",
|
|
53
|
-
componentId: "core-
|
|
53
|
+
componentId: "core-12_28_0__sc-17s58xs-3"
|
|
54
54
|
})(["", ""], getTabStyle);
|
|
55
55
|
var StyledTabInner = /*#__PURE__*/styled(StyledTabInnerBase).withConfig({
|
|
56
56
|
displayName: "StyledTabInner",
|
|
57
|
-
componentId: "core-
|
|
57
|
+
componentId: "core-12_28_0__sc-17s58xs-4"
|
|
58
58
|
})(["", " padding:0 ", "px;font-weight:", ";&,> a{", ";color:", ";height:23px;}", ""], getTypographyIntent('body'), spacing.xs, function (_ref3) {
|
|
59
59
|
var $selected = _ref3.$selected;
|
|
60
60
|
return $selected ? 600 : 400;
|
|
@@ -67,15 +67,15 @@ var StyledTabInner = /*#__PURE__*/styled(StyledTabInnerBase).withConfig({
|
|
|
67
67
|
});
|
|
68
68
|
var StyledDropdownTab = /*#__PURE__*/styled(StyledDropdownTabBase).withConfig({
|
|
69
69
|
displayName: "StyledDropdownTab",
|
|
70
|
-
componentId: "core-
|
|
70
|
+
componentId: "core-12_28_0__sc-17s58xs-5"
|
|
71
71
|
})(["", ""], getTabStyle);
|
|
72
72
|
var StyledDropdownTabInner = /*#__PURE__*/styled(StyledTabInner).withConfig({
|
|
73
73
|
displayName: "StyledDropdownTabInner",
|
|
74
|
-
componentId: "core-
|
|
74
|
+
componentId: "core-12_28_0__sc-17s58xs-6"
|
|
75
75
|
})(["align-items:center;cursor:pointer;display:inline-flex;"]);
|
|
76
76
|
var StyledLink = /*#__PURE__*/styled.span.withConfig({
|
|
77
77
|
displayName: "StyledLink",
|
|
78
|
-
componentId: "core-
|
|
78
|
+
componentId: "core-12_28_0__sc-17s58xs-7"
|
|
79
79
|
})(["align-items:center;display:flex;height:23px;", ";box-sizing:border-box;"], borderRadius);
|
|
80
80
|
|
|
81
81
|
//// END TRADITIONAL DESIGN SYSTEM TAB STYLES ////
|
|
@@ -92,34 +92,34 @@ function getHelixHeaderTabStyles() {
|
|
|
92
92
|
}
|
|
93
93
|
var StyledGlobalNavigationTab = /*#__PURE__*/styled(StyledTabBase).withConfig({
|
|
94
94
|
displayName: "StyledGlobalNavigationTab",
|
|
95
|
-
componentId: "core-
|
|
95
|
+
componentId: "core-12_28_0__sc-17s58xs-8"
|
|
96
96
|
})(["", ""], getHelixHeaderTabStyles);
|
|
97
97
|
var StyledGlobalNavigationDropdownTab = /*#__PURE__*/styled(StyledDropdownTabBase).withConfig({
|
|
98
98
|
displayName: "StyledGlobalNavigationDropdownTab",
|
|
99
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_28_0__sc-17s58xs-9"
|
|
100
100
|
})(["", ""], getHelixHeaderTabStyles);
|
|
101
101
|
var StyledGlobalNavigationDropdownTabInner = /*#__PURE__*/styled(StyledTabInnerBase).withConfig({
|
|
102
102
|
displayName: "StyledGlobalNavigationDropdownTabInner",
|
|
103
|
-
componentId: "core-
|
|
103
|
+
componentId: "core-12_28_0__sc-17s58xs-10"
|
|
104
104
|
})(["align-items:center;cursor:pointer;display:inline-flex;"]);
|
|
105
105
|
var StyledGlobalNavigationLink = /*#__PURE__*/styled.span.withConfig({
|
|
106
106
|
displayName: "StyledGlobalNavigationLink",
|
|
107
|
-
componentId: "core-
|
|
107
|
+
componentId: "core-12_28_0__sc-17s58xs-11"
|
|
108
108
|
})(["padding-left:6px;padding-right:6px;"]);
|
|
109
109
|
|
|
110
110
|
//// END HELIX GLOBAL NAVIGATION TAB STYLES ////
|
|
111
111
|
|
|
112
112
|
export var StyledOverlay = /*#__PURE__*/styled(Card).withConfig({
|
|
113
113
|
displayName: "StyledOverlay",
|
|
114
|
-
componentId: "core-
|
|
114
|
+
componentId: "core-12_28_0__sc-17s58xs-12"
|
|
115
115
|
})(["max-height:40vh;", "{padding:0;display:flex;justify-content:center;a{margin:unset;padding:unset;}}", "{padding:0;display:flex;}", "{padding:2px 16px 4px 16px;}", ",", "{color:", ";border-radius:0;display:flex;width:100%;background:inherit;font-weight:inherit;font-size:inherit;padding:0;}[data-selected='true']{", ",", "{border-bottom-color:transparent;color:", ";}}"], StyledItem, StyledLink, StyledTabInnerBase, StyledLink, StyledTabBase, colors.gray15, StyledLink, StyledTabBase, colors.blue50);
|
|
116
116
|
export var StyledTabList = /*#__PURE__*/styled.div.withConfig({
|
|
117
117
|
displayName: "StyledTabList",
|
|
118
|
-
componentId: "core-
|
|
118
|
+
componentId: "core-12_28_0__sc-17s58xs-13"
|
|
119
119
|
})(["display:flex;width:100%;"]);
|
|
120
120
|
export var StyledTabs = /*#__PURE__*/styled.nav.withConfig({
|
|
121
121
|
displayName: "StyledTabs",
|
|
122
|
-
componentId: "core-
|
|
122
|
+
componentId: "core-12_28_0__sc-17s58xs-14"
|
|
123
123
|
})(["background-color:", ";display:flex;overflow:hidden;width:100%;", "{&:nth-child(1n + ", "){&:not(", "){", "}}}", ""], function (_ref6) {
|
|
124
124
|
var $dark = _ref6.$dark;
|
|
125
125
|
return $dark && colors.gray15;
|
|
@@ -48,7 +48,7 @@ var getSlideOutAnimation = function getSlideOutAnimation($placement) {
|
|
|
48
48
|
};
|
|
49
49
|
export var StyledTearsheetContent = /*#__PURE__*/styled.div.withConfig({
|
|
50
50
|
displayName: "StyledTearsheetContent",
|
|
51
|
-
componentId: "core-
|
|
51
|
+
componentId: "core-12_28_0__sc-ljrxoq-0"
|
|
52
52
|
})(["display:flex;z-index:2;width:100%;", " ", " ", " ", ""], function (_ref) {
|
|
53
53
|
var $open = _ref.$open,
|
|
54
54
|
$placement = _ref.$placement;
|
|
@@ -68,7 +68,7 @@ export var StyledTearsheetContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
68
68
|
export var minScrimSize = spacing.xxl * 3;
|
|
69
69
|
export var StyledTearsheetBody = /*#__PURE__*/styled.div.withConfig({
|
|
70
70
|
displayName: "StyledTearsheetBody",
|
|
71
|
-
componentId: "core-
|
|
71
|
+
componentId: "core-12_28_0__sc-ljrxoq-1"
|
|
72
72
|
})(["display:flex;overflow-y:auto;flex-direction:column;background-color:", ";&:focus-visible{", "}", " ", "}"], colors.white, getFocusInset(), function (_ref5) {
|
|
73
73
|
var $block = _ref5.$block,
|
|
74
74
|
$placement = _ref5.$placement,
|
|
@@ -89,7 +89,7 @@ var zoomIn = /*#__PURE__*/keyframes(["from{transform:scale(0);}to{transform:scal
|
|
|
89
89
|
var zoomOut = /*#__PURE__*/keyframes(["from{transform:scale(1);}to{transform:scale(0);}"]);
|
|
90
90
|
export var StyledScrimContainer = /*#__PURE__*/styled.div.withConfig({
|
|
91
91
|
displayName: "StyledScrimContainer",
|
|
92
|
-
componentId: "core-
|
|
92
|
+
componentId: "core-12_28_0__sc-ljrxoq-2"
|
|
93
93
|
})(["", ""], function (_ref7) {
|
|
94
94
|
var $placement = _ref7.$placement;
|
|
95
95
|
var minSizeProp = ['top', 'bottom'].includes($placement) ? 'min-height' : 'min-width';
|
|
@@ -97,7 +97,7 @@ export var StyledScrimContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
97
97
|
});
|
|
98
98
|
export var StyledButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
99
99
|
displayName: "StyledButtonContainer",
|
|
100
|
-
componentId: "core-
|
|
100
|
+
componentId: "core-12_28_0__sc-ljrxoq-3"
|
|
101
101
|
})(["", ""], function (_ref8) {
|
|
102
102
|
var $placement = _ref8.$placement;
|
|
103
103
|
switch ($placement) {
|
|
@@ -112,7 +112,7 @@ export var StyledButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
112
112
|
});
|
|
113
113
|
export var StyledButtonCard = /*#__PURE__*/styled(Card).withConfig({
|
|
114
114
|
displayName: "StyledButtonCard",
|
|
115
|
-
componentId: "core-
|
|
115
|
+
componentId: "core-12_28_0__sc-ljrxoq-4"
|
|
116
116
|
})(["display:inline-flex;margin:", "px;", " ", " ", ""], spacing.xl, function (_ref9) {
|
|
117
117
|
var $open = _ref9.$open;
|
|
118
118
|
return $open ? css(["transform:scale(1);"]) : css(["transform:scale(0);"]);
|
|
@@ -3,7 +3,7 @@ import { getInputStyles } from '../Input/Input.styles';
|
|
|
3
3
|
import { spacing } from '../_styles/spacing';
|
|
4
4
|
export var StyledTextArea = /*#__PURE__*/styled.textarea.withConfig({
|
|
5
5
|
displayName: "StyledTextArea",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_28_0__sc-u5mow1-0"
|
|
7
7
|
})(["", ";height:auto;min-height:64px;padding:", "px ", "px;resize:", ";"], getInputStyles, spacing.sm, spacing.md, function (_ref) {
|
|
8
8
|
var _ref$$resize = _ref.$resize,
|
|
9
9
|
$resize = _ref$$resize === void 0 ? 'both' : _ref$$resize;
|
|
@@ -41,4 +41,4 @@ import type { TextEditorProps } from './TextEditor.types';
|
|
|
41
41
|
* }),
|
|
42
42
|
* })
|
|
43
43
|
*/
|
|
44
|
-
export declare function TextEditor({ disabled, error, value, initialValue, onChange, onInit, onBlur, config: externalConfig, plugins: stringPlugins, locale: propLocale, ...restProps }: TextEditorProps): React.JSX.Element | null;
|
|
44
|
+
export declare function TextEditor({ disabled, error, value, initialValue, onChange, onInit, onBlur, config: externalConfig, plugins: stringPlugins, locale: propLocale, onDirty, tinyMCE: _tinyMCE, init: _init, onKeyDown: _onKeyDown, onEditorChange: _onEditorChange, onFocusOut: _onFocusOut, ...restProps }: TextEditorProps): React.JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["disabled", "error", "value", "initialValue", "onChange", "onInit", "onBlur", "config", "plugins", "locale"];
|
|
2
|
+
var _excluded = ["disabled", "error", "value", "initialValue", "onChange", "onInit", "onBlur", "config", "plugins", "locale", "onDirty", "tinyMCE", "init", "onKeyDown", "onEditorChange", "onFocusOut"];
|
|
3
3
|
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); }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -80,6 +80,12 @@ export function TextEditor(_ref) {
|
|
|
80
80
|
externalConfig = _ref.config,
|
|
81
81
|
stringPlugins = _ref.plugins,
|
|
82
82
|
propLocale = _ref.locale,
|
|
83
|
+
onDirty = _ref.onDirty,
|
|
84
|
+
_tinyMCE = _ref.tinyMCE,
|
|
85
|
+
_init = _ref.init,
|
|
86
|
+
_onKeyDown = _ref.onKeyDown,
|
|
87
|
+
_onEditorChange = _ref.onEditorChange,
|
|
88
|
+
_onFocusOut = _ref.onFocusOut,
|
|
83
89
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
84
90
|
var _useCKEditorCss = useCKEditorCss(),
|
|
85
91
|
cssLoading = _useCKEditorCss.isLoading;
|
|
@@ -129,6 +135,7 @@ export function TextEditor(_ref) {
|
|
|
129
135
|
// Call onDirty only on first content modification
|
|
130
136
|
if (isDirty && !isDirtyState) {
|
|
131
137
|
setIsDirtyState(true);
|
|
138
|
+
onDirty === null || onDirty === void 0 ? void 0 : onDirty();
|
|
132
139
|
}
|
|
133
140
|
onChange === null || onChange === void 0 ? void 0 : onChange(data, isDirty);
|
|
134
141
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.js","names":["CKEditor","ClassicEditor","React","useOverridableFocusScope","useI18nContext","useZIndexContext","useStickyToolbar","GlobalEditorStyles","StyledTextEditor","TextEditorContext","TextEditorTheme","useCKEditorCss","useTabAsNavigation","addButtonDataAttributes","addPluginsFromStringArray","getDefaultConfig","TextEditor","_ref","disabled","error","value","initialValue","onChange","onInit","onBlur","externalConfig","config","stringPlugins","plugins","propLocale","locale","restProps","_objectWithoutProperties","_excluded","_useCKEditorCss","cssLoading","isLoading","editorRef","useRef","editorInstanceRef","initialValueRef","_React$useState","useState","_React$useState2","_slicedToArray","isDirtyState","setIsDirtyState","_useI18nContext","contextLocale","useEffect","undefined","current","_useZIndexContext","zIndex","_React$useContext","useContext","features","enableStickyToolbar","stickyToolbar","enableTabAsNavigation","tabAsNavigation","mergedConfig","useMemo","defaultConfig","configWithPlugins","length","externalResult","finalConfig","_objectSpread","focusScope","setProps","contain","handleChange","_event","editor","data","getData","isDirty","handleReady","setData","handleBlur","event","_useStickyToolbar","enabled","stickyConfig","_useTabAsNavigation","editorKey","concat","createElement","ref","key","_extends","onReady"],"sources":["../../src/TextEditor/TextEditor.tsx"],"sourcesContent":["import { CKEditor } from '@ckeditor/ckeditor5-react'\nimport type { EditorConfig } from 'ckeditor5'\nimport { ClassicEditor, type EventInfo } from 'ckeditor5'\nimport React from 'react'\n\nimport { useOverridableFocusScope } from '../_hooks/FocusScopeOverride'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useZIndexContext } from '../_hooks/ZIndex'\nimport { useStickyToolbar } from './StickyToolbar'\nimport { GlobalEditorStyles, StyledTextEditor } from './TextEditor.styles'\nimport type { TextEditorProps } from './TextEditor.types'\nimport { TextEditorContext } from './TextEditorProvider'\nimport { TextEditorTheme } from './textEditorTheming'\nimport { useCKEditorCss } from './useCKEditorCss'\nimport { useTabAsNavigation } from './useTabAsNavigation'\nimport {\n addButtonDataAttributes,\n addPluginsFromStringArray,\n getDefaultConfig,\n} from './utils'\n\n/**\n * To ensure your Jest tests work with the new CKEditor implementation, wrap your Jest configuration with `coreReactJestConfig`:\n *\n * @example\n *\n * // Using Jest config file\n *\n * const { coreReactJestConfig } = require('@procore/core-react/jestConfig')\n *\n * module.exports = coreReactJestConfig({\n * // Your existing Jest config\n * })\n *\n * @example\n *\n * // Using Hammer\n *\n * import { coreReactJestConfig } from '@procore/core-react/jestConfig'\n *\n * export default {\n * testJest: (defaultConfig) =>\n * coreReactJestConfig({\n * ...defaultConfig,\n * // Your existing Jest config\n * }),\n * }\n *\n * @example\n *\n * // Using Core Scripts\n *\n * const { coreReactJestConfig } = require('@procore/core-react/jestConfig')\n *\n * module.exports = () => ({\n * jestOverride: (defaultConfig) =>\n * coreReactJestConfig({\n * ...defaultConfig,\n * // Your existing Jest config\n * }),\n * })\n */\nexport function TextEditor({\n disabled,\n error,\n value,\n initialValue,\n onChange,\n onInit,\n onBlur,\n config: externalConfig,\n plugins: stringPlugins,\n locale: propLocale,\n ...restProps\n}: TextEditorProps) {\n const { isLoading: cssLoading } = useCKEditorCss()\n\n const editorRef = React.useRef<HTMLDivElement>(null)\n const editorInstanceRef = React.useRef<ClassicEditor | null>(null)\n const initialValueRef = React.useRef<string>(value || initialValue || '')\n const [isDirtyState, setIsDirtyState] = React.useState(false)\n const { locale: contextLocale } = useI18nContext()\n const locale = propLocale || contextLocale\n\n React.useEffect(() => {\n if (value !== undefined) {\n initialValueRef.current = value\n }\n }, [value])\n\n const { value: zIndex } = useZIndexContext()\n\n const { features } = React.useContext(TextEditorContext)\n const enableStickyToolbar = !!features?.stickyToolbar\n const enableTabAsNavigation = !!features?.tabAsNavigation\n\n const mergedConfig = React.useMemo(() => {\n const defaultConfig = getDefaultConfig(locale)\n\n // Handle string plugins for backward compatibility\n const configWithPlugins = stringPlugins?.length\n ? addPluginsFromStringArray(defaultConfig, stringPlugins)\n : defaultConfig\n\n // Apply any external CKEditor config overrides provided by the consumer\n const externalResult =\n typeof externalConfig === 'function'\n ? externalConfig(configWithPlugins)\n : undefined\n // Merge default config (with plugins) and consumer overrides\n let finalConfig: EditorConfig = {\n ...configWithPlugins,\n ...(externalResult ?? {}),\n }\n\n return finalConfig\n }, [externalConfig, locale, stringPlugins])\n\n const focusScope = useOverridableFocusScope()\n React.useEffect(() => {\n focusScope.setProps({ contain: false })\n }, [focusScope])\n\n const handleChange = (\n _event: EventInfo<string, unknown>,\n editor: ClassicEditor\n ) => {\n const data = editor.getData()\n const isDirty = data !== initialValueRef.current\n\n // Call onDirty only on first content modification\n if (isDirty && !isDirtyState) {\n setIsDirtyState(true)\n }\n\n onChange?.(data, isDirty)\n }\n\n const handleReady = (editor: ClassicEditor) => {\n addButtonDataAttributes(editor)\n editorInstanceRef.current = editor\n\n if (initialValue) {\n editor.setData(initialValue)\n }\n\n onInit?.(editor)\n }\n\n const handleBlur = (\n event: EventInfo<string, unknown>,\n editor: ClassicEditor\n ) => {\n onBlur?.(event, editor)\n }\n\n const { config: stickyConfig } = useStickyToolbar({\n config: mergedConfig,\n enabled: enableStickyToolbar,\n editor: editorInstanceRef.current,\n editorRef,\n cssLoading,\n })\n\n const { config } = useTabAsNavigation({\n config: stickyConfig,\n enabled: enableTabAsNavigation,\n editor: editorInstanceRef.current,\n })\n\n const editorKey = `${locale}-${enableTabAsNavigation}`\n\n if (cssLoading) {\n return null\n }\n\n return (\n <StyledTextEditor ref={editorRef} key={editorKey} error={error}>\n <GlobalEditorStyles zIndex={zIndex + 1} />\n <TextEditorTheme />\n <CKEditor\n {...restProps}\n editor={ClassicEditor}\n config={config}\n disabled={disabled}\n data={value}\n onChange={handleChange}\n onReady={handleReady}\n onBlur={handleBlur}\n />\n </StyledTextEditor>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAASA,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,aAAa,QAAwB,WAAW;AACzD,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,qBAAqB;AAE1E,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SACEC,uBAAuB,EACvBC,yBAAyB,EACzBC,gBAAgB,QACX,SAAS;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAYN;EAAA,IAXlBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,KAAK,GAAAF,IAAA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AAI5B,qBAAqB,CAAE;EAEtD,IAAIxB,UAAU,EAAE;IACd,OAAO,IAAI;EACb;EAEA,oBACEjC,KAAA,CAAAsF,aAAA,CAAChF,gBAAgB;IAACiF,GAAG,EAAEpD,SAAU;IAACqD,GAAG,EAAEJ,SAAU;IAACnE,KAAK,EAAEA;EAAM,gBAC7DjB,KAAA,CAAAsF,aAAA,CAACjF,kBAAkB;IAAC8C,MAAM,EAAEA,MAAM,GAAG;EAAE,CAAE,CAAC,eAC1CnD,KAAA,CAAAsF,aAAA,CAAC9E,eAAe,MAAE,CAAC,eACnBR,KAAA,CAAAsF,aAAA,CAACxF,QAAQ,EAAA2F,QAAA,KACH5D,SAAS;IACb2C,MAAM,EAAEzE,aAAc;IACtByB,MAAM,EAAEA,MAAO;IACfR,QAAQ,EAAEA,QAAS;IACnByD,IAAI,EAAEvD,KAAM;IACZE,QAAQ,EAAEkD,YAAa;IACvBoB,OAAO,EAAEd,WAAY;IACrBtD,MAAM,EAAEwD;EAAW,EACpB,CACe,CAAC;AAEvB"}
|
|
1
|
+
{"version":3,"file":"TextEditor.js","names":["CKEditor","ClassicEditor","React","useOverridableFocusScope","useI18nContext","useZIndexContext","useStickyToolbar","GlobalEditorStyles","StyledTextEditor","TextEditorContext","TextEditorTheme","useCKEditorCss","useTabAsNavigation","addButtonDataAttributes","addPluginsFromStringArray","getDefaultConfig","TextEditor","_ref","disabled","error","value","initialValue","onChange","onInit","onBlur","externalConfig","config","stringPlugins","plugins","propLocale","locale","onDirty","_tinyMCE","tinyMCE","_init","init","_onKeyDown","onKeyDown","_onEditorChange","onEditorChange","_onFocusOut","onFocusOut","restProps","_objectWithoutProperties","_excluded","_useCKEditorCss","cssLoading","isLoading","editorRef","useRef","editorInstanceRef","initialValueRef","_React$useState","useState","_React$useState2","_slicedToArray","isDirtyState","setIsDirtyState","_useI18nContext","contextLocale","useEffect","undefined","current","_useZIndexContext","zIndex","_React$useContext","useContext","features","enableStickyToolbar","stickyToolbar","enableTabAsNavigation","tabAsNavigation","mergedConfig","useMemo","defaultConfig","configWithPlugins","length","externalResult","finalConfig","_objectSpread","focusScope","setProps","contain","handleChange","_event","editor","data","getData","isDirty","handleReady","setData","handleBlur","event","_useStickyToolbar","enabled","stickyConfig","_useTabAsNavigation","editorKey","concat","createElement","ref","key","_extends","onReady"],"sources":["../../src/TextEditor/TextEditor.tsx"],"sourcesContent":["import { CKEditor } from '@ckeditor/ckeditor5-react'\nimport type { EditorConfig } from 'ckeditor5'\nimport { ClassicEditor, type EventInfo } from 'ckeditor5'\nimport React from 'react'\n\nimport { useOverridableFocusScope } from '../_hooks/FocusScopeOverride'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useZIndexContext } from '../_hooks/ZIndex'\nimport { useStickyToolbar } from './StickyToolbar'\nimport { GlobalEditorStyles, StyledTextEditor } from './TextEditor.styles'\nimport type { TextEditorProps } from './TextEditor.types'\nimport { TextEditorContext } from './TextEditorProvider'\nimport { TextEditorTheme } from './textEditorTheming'\nimport { useCKEditorCss } from './useCKEditorCss'\nimport { useTabAsNavigation } from './useTabAsNavigation'\nimport {\n addButtonDataAttributes,\n addPluginsFromStringArray,\n getDefaultConfig,\n} from './utils'\n\n/**\n * To ensure your Jest tests work with the new CKEditor implementation, wrap your Jest configuration with `coreReactJestConfig`:\n *\n * @example\n *\n * // Using Jest config file\n *\n * const { coreReactJestConfig } = require('@procore/core-react/jestConfig')\n *\n * module.exports = coreReactJestConfig({\n * // Your existing Jest config\n * })\n *\n * @example\n *\n * // Using Hammer\n *\n * import { coreReactJestConfig } from '@procore/core-react/jestConfig'\n *\n * export default {\n * testJest: (defaultConfig) =>\n * coreReactJestConfig({\n * ...defaultConfig,\n * // Your existing Jest config\n * }),\n * }\n *\n * @example\n *\n * // Using Core Scripts\n *\n * const { coreReactJestConfig } = require('@procore/core-react/jestConfig')\n *\n * module.exports = () => ({\n * jestOverride: (defaultConfig) =>\n * coreReactJestConfig({\n * ...defaultConfig,\n * // Your existing Jest config\n * }),\n * })\n */\nexport function TextEditor({\n disabled,\n error,\n value,\n initialValue,\n onChange,\n onInit,\n onBlur,\n config: externalConfig,\n plugins: stringPlugins,\n locale: propLocale,\n onDirty,\n // Deprecated TinyMCE props - no-op for backward compatibility\n tinyMCE: _tinyMCE,\n init: _init,\n onKeyDown: _onKeyDown,\n onEditorChange: _onEditorChange,\n onFocusOut: _onFocusOut,\n ...restProps\n}: TextEditorProps) {\n const { isLoading: cssLoading } = useCKEditorCss()\n\n const editorRef = React.useRef<HTMLDivElement>(null)\n const editorInstanceRef = React.useRef<ClassicEditor | null>(null)\n const initialValueRef = React.useRef<string>(value || initialValue || '')\n const [isDirtyState, setIsDirtyState] = React.useState(false)\n const { locale: contextLocale } = useI18nContext()\n const locale = propLocale || contextLocale\n\n React.useEffect(() => {\n if (value !== undefined) {\n initialValueRef.current = value\n }\n }, [value])\n\n const { value: zIndex } = useZIndexContext()\n\n const { features } = React.useContext(TextEditorContext)\n const enableStickyToolbar = !!features?.stickyToolbar\n const enableTabAsNavigation = !!features?.tabAsNavigation\n\n const mergedConfig = React.useMemo(() => {\n const defaultConfig = getDefaultConfig(locale)\n\n // Handle string plugins for backward compatibility\n const configWithPlugins = stringPlugins?.length\n ? addPluginsFromStringArray(defaultConfig, stringPlugins)\n : defaultConfig\n\n // Apply any external CKEditor config overrides provided by the consumer\n const externalResult =\n typeof externalConfig === 'function'\n ? externalConfig(configWithPlugins)\n : undefined\n // Merge default config (with plugins) and consumer overrides\n let finalConfig: EditorConfig = {\n ...configWithPlugins,\n ...(externalResult ?? {}),\n }\n\n return finalConfig\n }, [externalConfig, locale, stringPlugins])\n\n const focusScope = useOverridableFocusScope()\n React.useEffect(() => {\n focusScope.setProps({ contain: false })\n }, [focusScope])\n\n const handleChange = (\n _event: EventInfo<string, unknown>,\n editor: ClassicEditor\n ) => {\n const data = editor.getData()\n const isDirty = data !== initialValueRef.current\n\n // Call onDirty only on first content modification\n if (isDirty && !isDirtyState) {\n setIsDirtyState(true)\n onDirty?.()\n }\n\n onChange?.(data, isDirty)\n }\n\n const handleReady = (editor: ClassicEditor) => {\n addButtonDataAttributes(editor)\n editorInstanceRef.current = editor\n\n if (initialValue) {\n editor.setData(initialValue)\n }\n\n onInit?.(editor)\n }\n\n const handleBlur = (\n event: EventInfo<string, unknown>,\n editor: ClassicEditor\n ) => {\n onBlur?.(event, editor)\n }\n\n const { config: stickyConfig } = useStickyToolbar({\n config: mergedConfig,\n enabled: enableStickyToolbar,\n editor: editorInstanceRef.current,\n editorRef,\n cssLoading,\n })\n\n const { config } = useTabAsNavigation({\n config: stickyConfig,\n enabled: enableTabAsNavigation,\n editor: editorInstanceRef.current,\n })\n\n const editorKey = `${locale}-${enableTabAsNavigation}`\n\n if (cssLoading) {\n return null\n }\n\n return (\n <StyledTextEditor ref={editorRef} key={editorKey} error={error}>\n <GlobalEditorStyles zIndex={zIndex + 1} />\n <TextEditorTheme />\n <CKEditor\n {...restProps}\n editor={ClassicEditor}\n config={config}\n disabled={disabled}\n data={value}\n onChange={handleChange}\n onReady={handleReady}\n onBlur={handleBlur}\n />\n </StyledTextEditor>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAASA,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,aAAa,QAAwB,WAAW;AACzD,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,qBAAqB;AAE1E,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SACEC,uBAAuB,EACvBC,yBAAyB,EACzBC,gBAAgB,QACX,SAAS;;AAEhB;AACA;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CACe,CAAC;AAEvB"}
|
|
@@ -18,7 +18,7 @@ export var GlobalEditorStyles = /*#__PURE__*/createGlobalStyle([":root{--ck-z-de
|
|
|
18
18
|
});
|
|
19
19
|
export var StyledTextEditor = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledTextEditor",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_28_0__sc-1hpwgdu-0"
|
|
22
22
|
})(["", ""], function (_ref6) {
|
|
23
23
|
var error = _ref6.error;
|
|
24
24
|
return error && "\n .ck-sticky-panel__content {\n border-top-color: ".concat(colors.red50, " !important;\n border-left-color: ").concat(colors.red50, " !important;\n border-right-color: ").concat(colors.red50, " !important;\n }\n\n .ck-editor__editable {\n border-left-color: ").concat(colors.red50, " !important;\n border-right-color: ").concat(colors.red50, " !important;\n border-bottom-color: ").concat(colors.red50, " !important;\n }\n ");
|
|
@@ -97,4 +97,47 @@ export interface TextEditorProps {
|
|
|
97
97
|
* @since 10.19.0
|
|
98
98
|
*/
|
|
99
99
|
onAfterDestroy?: () => void;
|
|
100
|
+
/**
|
|
101
|
+
* Callback fired when the editor becomes dirty (content differs from initial value)
|
|
102
|
+
*
|
|
103
|
+
* @since 12.26.0
|
|
104
|
+
*/
|
|
105
|
+
onDirty?: () => void;
|
|
106
|
+
/**
|
|
107
|
+
* If you experience problems with the new editor implementation, you can use this to **temporarily** switch back to legacy version while you report the issue.
|
|
108
|
+
*
|
|
109
|
+
* @deprecated This property will be removed in a future version. TinyMCE support has been removed.
|
|
110
|
+
* @since 10.19.0
|
|
111
|
+
*/
|
|
112
|
+
tinyMCE?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Config for when the editor is initialized. **Changes after the editor has initialized are ignored.**
|
|
115
|
+
*
|
|
116
|
+
* @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)
|
|
117
|
+
* @unsupported Use at your own risk. DST makes no guarantees about this API,
|
|
118
|
+
* and is subject to removal at any point without warning or deprecation.
|
|
119
|
+
* @deprecated `init` has been deprecated and will be removed in a future version. TinyMCE support has been removed.
|
|
120
|
+
* @since 10.19.0
|
|
121
|
+
*/
|
|
122
|
+
init?: any;
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated `onKeyDown` has been deprecated and will be removed in a future version. TinyMCE support has been removed.
|
|
125
|
+
* @since 10.19.0
|
|
126
|
+
*/
|
|
127
|
+
onKeyDown?: (event: any) => void;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated `onEditorChange` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onChange` instead.
|
|
130
|
+
* @since 10.19.0
|
|
131
|
+
*/
|
|
132
|
+
onEditorChange?: (value: string) => void;
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated `onFocusIn` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onFocus` instead.
|
|
135
|
+
* @since 10.19.0
|
|
136
|
+
*/
|
|
137
|
+
onFocusIn?: (...args: any[]) => void;
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated `onFocusOut` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onBlur` instead.
|
|
140
|
+
* @since 10.19.0
|
|
141
|
+
*/
|
|
142
|
+
onFocusOut?: (...args: any[]) => void;
|
|
100
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.types.js","names":[],"sources":["../../src/TextEditor/TextEditor.types.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5'\nimport type { Locale } from '../_hooks/I18n'\n\nexport interface TextEditorProps {\n /**\n * Unique identifier for the editor\n *\n * @since 10.19.0\n */\n id?: string\n\n /**\n * Initial value of the editor\n *\n * @deprecated `initialValue` has been deprecated and will be removed in a future version.\n * Please use the `value` prop instead\n * @deprecatedSince 10.20.0\n * @since 10.19.0\n */\n initialValue?: string\n\n /**\n * The current value of the editor\n *\n * @since 10.19.0\n */\n value?: string\n\n /**\n * Indicates if the editor is disabled\n *\n * @since 10.19.0\n */\n disabled?: boolean\n\n /**\n * Indicates if the editor is in an error state\n *\n * @since 10.19.0\n */\n error?: boolean\n\n /**\n * Locale which will be used for localization. Can be passed directly or\n * set by wrapping components in I18n provider.\n * @since 10.19.0\n */\n locale?: Locale\n\n /**\n * Array of plugin names to add to the editor in addition to the defaults.\n * This provides backward compatibility with the deprecated TinyMCE version of the editor.\n * Supports plugin names like 'link', 'image', 'table', etc.\n *\n * @since 12.26.0\n */\n plugins?: string[]\n\n /**\n * Configuration function for customizing the editor\n *\n * @param defaultConfig - The default CKEditor configuration\n * @returns Customized configuration object\n * @since 12.26.0\n */\n config?: (defaultConfig: EditorConfig) => EditorConfig\n\n /**\n * Callback fired when the editor content changes\n *\n * @param value - The current content of the editor\n * @param isDirty - Whether the content differs from the initial value\n * @since 10.19.0\n */\n onChange?: (value: string, isDirty?: boolean) => void\n\n /**\n * Callback fired when the editor gains focus\n *\n * @since 10.19.0\n */\n onFocus?: (event: EventInfo, editor: ClassicEditor) => void\n\n /**\n * Callback fired when the editor loses focus\n *\n * @since 10.19.0\n */\n onBlur?: (event: EventInfo, editor: ClassicEditor) => void\n\n /**\n * Callback fired when an error occurs in the editor\n *\n * @since 10.19.0\n */\n onError?: (\n error: Error,\n details: {\n phase: 'initialization' | 'runtime'\n willEditorRestart?: boolean\n }\n ) => void\n\n /**\n * Callback fired when the editor is ready\n *\n * @since 10.19.0\n */\n onInit?: (editor: ClassicEditor) => void\n\n /**\n * Callback fired after the editor instance is destroyed\n *\n * @since 10.19.0\n */\n onAfterDestroy?: () => void\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TextEditor.types.js","names":[],"sources":["../../src/TextEditor/TextEditor.types.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5'\nimport type { Locale } from '../_hooks/I18n'\n\nexport interface TextEditorProps {\n /**\n * Unique identifier for the editor\n *\n * @since 10.19.0\n */\n id?: string\n\n /**\n * Initial value of the editor\n *\n * @deprecated `initialValue` has been deprecated and will be removed in a future version.\n * Please use the `value` prop instead\n * @deprecatedSince 10.20.0\n * @since 10.19.0\n */\n initialValue?: string\n\n /**\n * The current value of the editor\n *\n * @since 10.19.0\n */\n value?: string\n\n /**\n * Indicates if the editor is disabled\n *\n * @since 10.19.0\n */\n disabled?: boolean\n\n /**\n * Indicates if the editor is in an error state\n *\n * @since 10.19.0\n */\n error?: boolean\n\n /**\n * Locale which will be used for localization. Can be passed directly or\n * set by wrapping components in I18n provider.\n * @since 10.19.0\n */\n locale?: Locale\n\n /**\n * Array of plugin names to add to the editor in addition to the defaults.\n * This provides backward compatibility with the deprecated TinyMCE version of the editor.\n * Supports plugin names like 'link', 'image', 'table', etc.\n *\n * @since 12.26.0\n */\n plugins?: string[]\n\n /**\n * Configuration function for customizing the editor\n *\n * @param defaultConfig - The default CKEditor configuration\n * @returns Customized configuration object\n * @since 12.26.0\n */\n config?: (defaultConfig: EditorConfig) => EditorConfig\n\n /**\n * Callback fired when the editor content changes\n *\n * @param value - The current content of the editor\n * @param isDirty - Whether the content differs from the initial value\n * @since 10.19.0\n */\n onChange?: (value: string, isDirty?: boolean) => void\n\n /**\n * Callback fired when the editor gains focus\n *\n * @since 10.19.0\n */\n onFocus?: (event: EventInfo, editor: ClassicEditor) => void\n\n /**\n * Callback fired when the editor loses focus\n *\n * @since 10.19.0\n */\n onBlur?: (event: EventInfo, editor: ClassicEditor) => void\n\n /**\n * Callback fired when an error occurs in the editor\n *\n * @since 10.19.0\n */\n onError?: (\n error: Error,\n details: {\n phase: 'initialization' | 'runtime'\n willEditorRestart?: boolean\n }\n ) => void\n\n /**\n * Callback fired when the editor is ready\n *\n * @since 10.19.0\n */\n onInit?: (editor: ClassicEditor) => void\n\n /**\n * Callback fired after the editor instance is destroyed\n *\n * @since 10.19.0\n */\n onAfterDestroy?: () => void\n\n /**\n * Callback fired when the editor becomes dirty (content differs from initial value)\n *\n * @since 12.26.0\n */\n onDirty?: () => void\n\n //--- Deprecated TinyMCE-specific props\n\n /**\n * If you experience problems with the new editor implementation, you can use this to **temporarily** switch back to legacy version while you report the issue.\n *\n * @deprecated This property will be removed in a future version. TinyMCE support has been removed.\n * @since 10.19.0\n */\n tinyMCE?: boolean\n\n /**\n * Config for when the editor is initialized. **Changes after the editor has initialized are ignored.**\n *\n * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)\n * @unsupported Use at your own risk. DST makes no guarantees about this API,\n * and is subject to removal at any point without warning or deprecation.\n * @deprecated `init` has been deprecated and will be removed in a future version. TinyMCE support has been removed.\n * @since 10.19.0\n */\n init?: any\n\n /**\n * @deprecated `onKeyDown` has been deprecated and will be removed in a future version. TinyMCE support has been removed.\n * @since 10.19.0\n */\n onKeyDown?: (event: any) => void\n\n /**\n * @deprecated `onEditorChange` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onChange` instead.\n * @since 10.19.0\n */\n onEditorChange?: (value: string) => void\n\n /**\n * @deprecated `onFocusIn` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onFocus` instead.\n * @since 10.19.0\n */\n onFocusIn?: (...args: any[]) => void\n\n /**\n * @deprecated `onFocusOut` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onBlur` instead.\n * @since 10.19.0\n */\n onFocusOut?: (...args: any[]) => void\n}\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export var StyledEditor = /*#__PURE__*/styled.div.withConfig({
|
|
3
3
|
displayName: "StyledEditor",
|
|
4
|
-
componentId: "core-
|
|
4
|
+
componentId: "core-12_28_0__sc-1lje1b0-0"
|
|
5
5
|
})([".ck-editor__top{height:0 !important;}.ck-content{border:none !important;padding:0 !important;p{margin:0;}table,img{margin-left:auto;margin-right:auto;}img{display:block;}table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;th{text-align:left;}& > thead,& > tbody{& > tr > td,& > tr > th{border:1px solid #bfbfbf;min-width:2em;padding:0.4em;}& > tr > th{background:rgba(0,0,0,0.05);font-weight:700;}}}}"]);
|
|
6
6
|
//# sourceMappingURL=TextEditorOutput.styles.js.map
|