@atlaskit/editor-plugin-table 9.4.1 → 9.5.5

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.
@@ -24,6 +24,7 @@ import {
24
24
  SelectionStyle,
25
25
  } from '@atlaskit/editor-shared-styles';
26
26
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
27
+ import { fg } from '@atlaskit/platform-feature-flags';
27
28
  import { N0, N40A, R500 } from '@atlaskit/theme/colors';
28
29
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
29
30
  import { token } from '@atlaskit/tokens';
@@ -195,34 +196,67 @@ const breakoutWidthStyling = () => {
195
196
  };
196
197
 
197
198
  const viewModeSortStyles = () => {
198
- return css`
199
- th {
200
- .${SORTING_ICON_CLASS_NAME} {
201
- + p {
202
- margin-top: 0 !important;
203
- }
204
- }
199
+ return fg('platform_editor_nested_tables_view_mode_sort')
200
+ ? css`
201
+ // new styles
202
+ th {
203
+ .${SORTING_ICON_CLASS_NAME} {
204
+ + p {
205
+ margin-top: 0 !important;
206
+ }
207
+ }
205
208
 
206
- &:has(.is-active) {
207
- .${SORTABLE_COLUMN_ICON_CLASSNAME} {
208
- opacity: 1;
209
- }
210
- }
209
+ &:has(.is-active) {
210
+ .${SORTABLE_COLUMN_ICON_CLASSNAME} {
211
+ opacity: 1;
212
+ }
213
+ }
214
+
215
+ .${SORTABLE_COLUMN_ICON_CLASSNAME} {
216
+ opacity: 0;
217
+ &:focus {
218
+ opacity: 1;
219
+ }
220
+ }
211
221
 
212
- .${SORTABLE_COLUMN_ICON_CLASSNAME} {
213
- opacity: 0;
214
- &:focus {
215
- opacity: 1;
222
+ &:hover:not(:has(.${ClassName.TABLE_CONTAINER}:hover)) {
223
+ > .${SORTING_ICON_CLASS_NAME} {
224
+ .${SORTABLE_COLUMN_ICON_CLASSNAME} {
225
+ opacity: 1;
226
+ }
227
+ }
228
+ }
216
229
  }
217
- }
230
+ `
231
+ : css`
232
+ // old styles
233
+ th {
234
+ .${SORTING_ICON_CLASS_NAME} {
235
+ + p {
236
+ margin-top: 0 !important;
237
+ }
238
+ }
218
239
 
219
- &:hover {
220
- .${SORTABLE_COLUMN_ICON_CLASSNAME} {
221
- opacity: 1;
240
+ &:has(.is-active) {
241
+ .${SORTABLE_COLUMN_ICON_CLASSNAME} {
242
+ opacity: 1;
243
+ }
244
+ }
245
+
246
+ .${SORTABLE_COLUMN_ICON_CLASSNAME} {
247
+ opacity: 0;
248
+ &:focus {
249
+ opacity: 1;
250
+ }
251
+ }
252
+
253
+ &:hover {
254
+ .${SORTABLE_COLUMN_ICON_CLASSNAME} {
255
+ opacity: 1;
256
+ }
257
+ }
222
258
  }
223
- }
224
- }
225
- `;
259
+ `;
226
260
  };
227
261
 
228
262
  const tableBorderStyles = () => {