@elementor/editor-global-classes 0.22.2 → 3.32.0-21

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +0 -21
  2. package/dist/index.js +1069 -327
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +1049 -279
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +18 -18
  7. package/src/api.ts +14 -2
  8. package/src/components/class-manager/class-item.tsx +40 -65
  9. package/src/components/class-manager/class-manager-button.tsx +4 -0
  10. package/src/components/class-manager/class-manager-panel.tsx +82 -74
  11. package/src/components/class-manager/delete-confirmation-dialog.tsx +26 -6
  12. package/src/components/class-manager/global-classes-list.tsx +76 -57
  13. package/src/components/class-manager/not-found.tsx +138 -0
  14. package/src/components/convert-local-class-to-global-class.tsx +62 -0
  15. package/src/components/css-class-usage/components/css-class-usage-popover.tsx +169 -0
  16. package/src/components/css-class-usage/components/css-class-usage-trigger.tsx +116 -0
  17. package/src/components/css-class-usage/components/index.ts +2 -0
  18. package/src/components/css-class-usage/types.ts +19 -0
  19. package/src/components/css-class-usage/utils.ts +10 -0
  20. package/src/components/search-and-filter/components/filter/active-filters.tsx +54 -0
  21. package/src/components/search-and-filter/components/filter/clear-icon-button.tsx +31 -0
  22. package/src/components/search-and-filter/components/filter/css-class-filter.tsx +74 -0
  23. package/src/components/search-and-filter/components/filter/filter-list.tsx +77 -0
  24. package/src/components/{class-manager → search-and-filter/components/search}/class-manager-search.tsx +12 -11
  25. package/src/components/search-and-filter/context.tsx +78 -0
  26. package/src/global-classes-styles-provider.ts +13 -8
  27. package/src/hooks/use-css-class-usage-by-id.ts +15 -0
  28. package/src/hooks/use-css-class-usage.ts +13 -0
  29. package/src/hooks/use-empty-css-class.ts +12 -0
  30. package/src/hooks/use-filtered-css-class-usage.tsx +67 -0
  31. package/src/hooks/use-filters.ts +30 -0
  32. package/src/hooks/use-prefetch-css-class-usage.ts +16 -0
  33. package/src/init.ts +11 -1
  34. package/src/store.ts +23 -6
  35. package/src/components/class-manager/class-manager-class-not-found.tsx +0 -56
@@ -1,56 +0,0 @@
1
- import * as React from 'react';
2
- import { Box, Link, Stack, Typography } from '@elementor/ui';
3
- import { __ } from '@wordpress/i18n';
4
-
5
- import { FlippedColorSwatchIcon } from './flipped-color-swatch-icon';
6
-
7
- type CssClassNotFoundedProps = {
8
- searchValue: string;
9
- onClear: () => void;
10
- };
11
-
12
- export const CssClassNotFound = ( { onClear, searchValue }: CssClassNotFoundedProps ) => (
13
- <Stack
14
- color={ 'text.secondary' }
15
- pt={ 5 }
16
- alignItems="center"
17
- gap={ 1 }
18
- overflow={ 'hidden' }
19
- maxWidth={ '170px' }
20
- justifySelf={ 'center' }
21
- >
22
- <FlippedColorSwatchIcon color={ 'inherit' } fontSize="large" />
23
- <Box>
24
- <Typography align="center" variant="subtitle2" color="inherit">
25
- { __( 'Sorry, nothing matched', 'elementor' ) }
26
- </Typography>
27
- <Typography
28
- variant="subtitle2"
29
- color="inherit"
30
- sx={ {
31
- display: 'flex',
32
- width: '100%',
33
- justifyContent: 'center',
34
- } }
35
- >
36
- <span>&ldquo;</span>
37
- <span
38
- style={ {
39
- maxWidth: '80%',
40
- overflow: 'hidden',
41
- textOverflow: 'ellipsis',
42
- } }
43
- >
44
- { searchValue }
45
- </span>
46
- <span>&rdquo;.</span>
47
- </Typography>
48
- </Box>
49
- <Typography align="center" variant="caption" color="inherit">
50
- { __( 'Try something else.', 'elementor' ) }
51
- <Link color="secondary" variant="caption" component="button" onClick={ onClear }>
52
- { __( 'Clear & try again', 'elementor' ) }
53
- </Link>
54
- </Typography>
55
- </Stack>
56
- );