@eightshift/frontend-libs-tailwind 1.0.0 → 1.1.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.
Files changed (82) hide show
  1. package/.husky/pre-commit +0 -0
  2. package/CHANGELOG.md +15 -1
  3. package/blocks/init/assets/fonts/fraunces-italic-latin-extended.woff2 +0 -0
  4. package/blocks/init/assets/fonts/fraunces-italic-latin.woff2 +0 -0
  5. package/blocks/init/assets/fonts/fraunces-latin-extended.woff2 +0 -0
  6. package/blocks/init/assets/fonts/fraunces-latin.woff2 +0 -0
  7. package/blocks/init/assets/fonts/noto-sans-italic-latin-extended.woff2 +0 -0
  8. package/blocks/init/assets/fonts/noto-sans-italic-latin.woff2 +0 -0
  9. package/blocks/init/assets/fonts/noto-sans-latin-extended.woff2 +0 -0
  10. package/blocks/init/assets/fonts/noto-sans-latin.woff2 +0 -0
  11. package/blocks/init/src/Blocks/assets/scripts/shared.js +1 -3
  12. package/blocks/init/src/Blocks/assets/styles/editor/editor-overrides.css +1 -1
  13. package/blocks/init/src/Blocks/assets/styles/fonts.css +90 -0
  14. package/blocks/init/src/Blocks/assets/styles/tailwind.css +1 -5
  15. package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/pages/parts.js +1 -0
  16. package/blocks/init/src/Blocks/components/button/components/button-editor.js +1 -5
  17. package/blocks/init/src/Blocks/components/button/components/button-options.js +2 -21
  18. package/blocks/init/src/Blocks/components/button/manifest.json +8 -8
  19. package/blocks/init/src/Blocks/components/card/components/card-editor.js +1 -2
  20. package/blocks/init/src/Blocks/components/card/components/card-options.js +0 -1
  21. package/blocks/init/src/Blocks/components/heading/components/heading-editor.js +1 -5
  22. package/blocks/init/src/Blocks/components/image/components/image-editor.js +1 -7
  23. package/blocks/init/src/Blocks/components/image/components/image-options.js +3 -17
  24. package/blocks/init/src/Blocks/components/list/components/list-options.js +1 -3
  25. package/blocks/init/src/Blocks/components/load-more/assets/load-more.js +1 -2
  26. package/blocks/init/src/Blocks/components/load-more/components/load-more-options.js +1 -0
  27. package/blocks/init/src/Blocks/components/modal/assets/index.js +7 -9
  28. package/blocks/init/src/Blocks/components/paragraph/components/paragraph-options.js +1 -3
  29. package/blocks/init/src/Blocks/components/paragraph/manifest.json +14 -16
  30. package/blocks/init/src/Blocks/components/post-header/post-header.php +1 -1
  31. package/blocks/init/src/Blocks/components/share/assets/index.js +1 -5
  32. package/blocks/init/src/Blocks/components/share/components/share-editor.js +7 -4
  33. package/blocks/init/src/Blocks/components/share/components/share-options.js +2 -11
  34. package/blocks/init/src/Blocks/components/video/components/video-editor.js +2 -4
  35. package/blocks/init/src/Blocks/components/video/components/video-options.js +5 -27
  36. package/blocks/init/src/Blocks/custom/accordion/assets/index.js +1 -1
  37. package/blocks/init/src/Blocks/custom/accordion/components/accordion-editor.js +6 -1
  38. package/blocks/init/src/Blocks/custom/carousel/assets/pagination.js +3 -8
  39. package/blocks/init/src/Blocks/custom/column/components/column-editor.js +4 -1
  40. package/blocks/init/src/Blocks/custom/column/components/column-options.js +5 -12
  41. package/blocks/init/src/Blocks/custom/columns/components/columns-editor.js +2 -6
  42. package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-options.js +18 -30
  43. package/blocks/init/src/Blocks/custom/featured-content/partials/cards.php +5 -5
  44. package/blocks/init/src/Blocks/custom/group/components/group-editor.js +1 -3
  45. package/blocks/init/src/Blocks/custom/heading/heading-transforms.js +1 -0
  46. package/blocks/init/src/Blocks/custom/map/assets/map-controller.js +0 -1
  47. package/blocks/init/src/Blocks/custom/map/components/map-components.js +3 -3
  48. package/blocks/init/src/Blocks/custom/map/components/map-editor.js +2 -12
  49. package/blocks/init/src/Blocks/custom/map/components/map-options.js +10 -46
  50. package/blocks/init/src/Blocks/custom/paragraph/paragraph-transforms.js +1 -0
  51. package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-options.js +1 -3
  52. package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-editor.js +1 -1
  53. package/blocks/init/src/Blocks/wrapper/components/wrapper-options.js +4 -19
  54. package/blocks/init/src/Blocks/wrapper/wrapper.js +1 -4
  55. package/linters/base.config.mjs +1 -1
  56. package/linters/eslint.config.mjs +1 -2
  57. package/linters/stylelint.config.js +9 -13
  58. package/package.json +92 -92
  59. package/schemas/block.json +4 -0
  60. package/schemas/component.json +4 -0
  61. package/scripts/components/block-inserter.js +8 -14
  62. package/scripts/components/file-picker.js +42 -39
  63. package/scripts/components/index.js +1 -0
  64. package/scripts/components/link-section-editor.js +6 -2
  65. package/scripts/components/picker-placeholder.js +109 -0
  66. package/scripts/components/server-side-render.js +2 -4
  67. package/scripts/components/settings/settings.js +3 -14
  68. package/scripts/components/settings/use-theme-options.js +2 -2
  69. package/scripts/editor/attributes.js +3 -9
  70. package/scripts/editor/colors.js +43 -41
  71. package/scripts/editor/editor.js +9 -16
  72. package/scripts/editor/fetch.js +26 -19
  73. package/scripts/editor/hooks.js +1 -0
  74. package/scripts/editor/options.js +2 -4
  75. package/scripts/editor/registration.js +51 -128
  76. package/scripts/editor/tailwindcss.js +118 -37
  77. package/scripts/helpers/breakpoints.js +3 -8
  78. package/scripts/helpers/cookies.js +2 -1
  79. package/scripts/helpers/index.js +1 -7
  80. package/scripts/index.js +2 -0
  81. package/scripts/plugins/yoast-seo.js +2 -3
  82. package/linters/ignore-gitignored.mjs +0 -9
@@ -8,20 +8,15 @@ export const getBreakpointNames = () => {
8
8
 
9
9
  return Object.entries(breakpoints)
10
10
  .toSorted((a, b) => b[1] - a[1])
11
- .map(([name]) => name).toReversed();
11
+ .map(([name]) => name)
12
+ .toReversed();
12
13
  };
13
14
 
14
15
  export const getBreakpointData = (convertToPx = false) => {
15
16
  const breakpoints = select(STORE_NAME)?.getSettings()?.globalVariables?.breakpoints;
16
17
 
17
18
  if (convertToPx) {
18
- return Object.fromEntries(
19
- Object.entries(breakpoints)
20
- .map(([name, value]) => [
21
- name,
22
- value * 16,
23
- ])
24
- );
19
+ return Object.fromEntries(Object.entries(breakpoints).map(([name, value]) => [name, value * 16]));
25
20
  }
26
21
 
27
22
  return breakpoints;
@@ -21,7 +21,7 @@ export const cookies = {
21
21
  */
22
22
  setCookie(key, value, time, path) {
23
23
  const expires = new Date();
24
- expires.setTime(expires.getTime() + (time));
24
+ expires.setTime(expires.getTime() + time);
25
25
  let pathValue = '';
26
26
 
27
27
  if (typeof path !== 'undefined') {
@@ -45,6 +45,7 @@ export const cookies = {
45
45
  */
46
46
  getCookie(key) {
47
47
  const keyValue = document.cookie.match(`(^|;) ?${key}=([^;]*)(;|$)`);
48
+
48
49
  return keyValue ? keyValue[2] : null;
49
50
  },
50
51
  setHalfDay() {
@@ -1,11 +1,5 @@
1
1
  // All exports are sorted in alphabetical order.
2
2
 
3
- export {
4
- getBreakpointData,
5
- getBreakpointNames,
6
- getGlobalManifest,
7
- getBreakpointUiData,
8
- getResponsiveData,
9
- } from './breakpoints';
3
+ export { getBreakpointData, getBreakpointNames, getGlobalManifest, getBreakpointUiData, getResponsiveData } from './breakpoints';
10
4
  export { cookies } from './cookies';
11
5
  export { dynamicImport } from './dynamic-import';
package/scripts/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  // Components.
2
2
  export { BlockInserter } from './components/block-inserter';
3
+ export { LinkSectionEditor } from './components/link-section-editor';
3
4
  export { ManageFileButton, FileSelector } from './components/file-picker';
4
5
  export { MediaPicker } from './components/media-picker';
5
6
  export { ServerSideRender } from './components/server-side-render';
7
+ export { PickerPlaceholder } from './components/picker-placeholder';
6
8
  export { ThemeOptionsPage, EsThemeOptionsContext } from './components/settings/settings';
7
9
 
8
10
  // Editor.
@@ -63,8 +63,7 @@ export const yoastSeo = () => {
63
63
  // Refreshing Yoast input.
64
64
  YoastSEO.app.pluggable.refresh();
65
65
  });
66
- }, 50)
66
+ }, 50),
67
67
  );
68
- }
69
- );
68
+ });
70
69
  };
@@ -1,9 +0,0 @@
1
- import path from 'node:path';
2
- import { includeIgnoreFile } from '@eslint/compat';
3
- import { fileURLToPath } from 'node:url';
4
-
5
- const filename = fileURLToPath(import.meta.url);
6
- const dirname = path.dirname(filename);
7
- const gitignorePath = path.resolve(dirname, '.gitignore');
8
-
9
- export default [includeIgnoreFile(gitignorePath)];