@eightshift/frontend-libs-tailwind 1.4.8 → 1.5.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 CHANGED
@@ -6,6 +6,15 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
6
6
 
7
7
  ---
8
8
 
9
+ ## [1.5.0]
10
+
11
+ ### Added
12
+ - Rive-related strings to `FilePicker`.
13
+
14
+ ### Changed
15
+ - Updated dependencies.
16
+ - Updated internal components to use ES UIC 2.x/3.x classnames.
17
+
9
18
  ## [1.4.8]
10
19
 
11
20
  ### Added
@@ -175,6 +184,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
175
184
  - Initial release.
176
185
 
177
186
  [Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
187
+ [1.5.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.8...1.5.0
178
188
  [1.4.8]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.7...1.4.8
179
189
  [1.4.7]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.6...1.4.7
180
190
  [1.4.6]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.5...1.4.6
package/bun.lockb ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightshift/frontend-libs-tailwind",
3
- "version": "1.4.8",
3
+ "version": "1.5.0",
4
4
  "description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
5
5
  "author": {
6
6
  "name": "Eightshift team",
@@ -34,47 +34,47 @@
34
34
  "homepage": "https://github.com/infinum/eightshift-frontend-libs-tailwind#readme",
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "@eightshift/ui-components": "^1.9.1",
38
- "@stylistic/eslint-plugin-js": "^2.12.1",
39
- "@stylistic/stylelint-plugin": "^3.1.1",
40
- "@swc/core": "^1.10.1",
41
- "@wordpress/api-fetch": "^7.14.0",
42
- "@wordpress/block-editor": "^14.9.0",
37
+ "@eightshift/ui-components": "^3.0.0",
38
+ "@stylistic/eslint-plugin-js": "^4.2.0",
39
+ "@stylistic/stylelint-plugin": "^3.1.2",
40
+ "@swc/core": "^1.11.8",
41
+ "@wordpress/api-fetch": "^7.19.0",
42
+ "@wordpress/block-editor": "^14.14.0",
43
43
  "@wordpress/dependency-extraction-webpack-plugin": "^5.9.0",
44
- "@wordpress/dom-ready": "^4.14.0",
45
- "@wordpress/server-side-render": "^5.14.0",
46
- "browserslist": "^4.24.3",
44
+ "@wordpress/dom-ready": "^4.19.0",
45
+ "@wordpress/server-side-render": "^5.19.0",
46
+ "browserslist": "^4.24.4",
47
47
  "css-loader": "^7.1.2",
48
- "css-minimizer-webpack-plugin": "^7.0.0",
49
- "eslint": "^9.17.0",
50
- "eslint-config-prettier": "^9.1.0",
51
- "eslint-plugin-prettier": "^5.2.1",
52
- "globals": "^15.13.0",
48
+ "css-minimizer-webpack-plugin": "^7.0.2",
49
+ "eslint": "^9.22.0",
50
+ "eslint-config-prettier": "^10.1.1",
51
+ "eslint-plugin-prettier": "^5.2.3",
52
+ "globals": "^16.0.0",
53
53
  "husky": "^9.1.7",
54
- "lightningcss": "^1.28.2",
54
+ "lightningcss": "^1.29.2",
55
55
  "mini-css-extract-plugin": "^2.9.2",
56
- "postcss": "^8.4.49",
56
+ "postcss": "^8.5.3",
57
57
  "postcss-loader": "^8.1.1",
58
- "prettier": "^3.4.2",
59
- "prettier-plugin-tailwindcss": "^0.6.9",
60
- "sonner": "^1.7.1",
61
- "stylelint": "^16.12.0",
62
- "stylelint-config-standard": "^36.0.1",
58
+ "prettier": "^3.5.3",
59
+ "prettier-plugin-tailwindcss": "^0.6.11",
60
+ "sonner": "^2.0.1",
61
+ "stylelint": "^16.15.0",
62
+ "stylelint-config-standard": "^37.0.0",
63
63
  "swc-loader": "^0.2.6",
64
- "terser-webpack-plugin": "^5.3.11",
65
- "webpack": "^5.97.1",
66
- "webpack-cli": "^5.1.4",
64
+ "terser-webpack-plugin": "^5.3.14",
65
+ "webpack": "^5.98.0",
66
+ "webpack-cli": "^6.0.1",
67
67
  "webpack-manifest-plugin": "^5.0.0",
68
68
  "webpack-merge": "^6.0.1"
69
69
  },
70
70
  "devDependencies": {
71
- "embla-carousel": "^8.5.1",
71
+ "embla-carousel": "^8.5.2",
72
72
  "fluid-tailwind": "^1.0.4",
73
- "lint-staged": "^15.2.11",
73
+ "lint-staged": "^15.4.3",
74
74
  "micromodal": "^0.4.10",
75
- "ol": "^10.3.1",
76
- "ol-mapbox-style": "^12.4.0",
77
- "tailwindcss": "^3.4.17",
75
+ "ol": "^10.4.0",
76
+ "ol-mapbox-style": "^12.5.0",
77
+ "tailwindcss": "^4.0.12",
78
78
  "tailwindcss-animate": "^1.0.7"
79
79
  },
80
80
  "sideEffects": false,
@@ -72,7 +72,7 @@ export const BlockInserter = (props) => {
72
72
  disabled={disabled}
73
73
  icon={icons.add}
74
74
  size={small ? 'small' : 'default'}
75
- className={clsx(className, 'es-uic-font-sans')}
75
+ className={clsx(className, 'es:font-sans')}
76
76
  >
77
77
  {labelText}
78
78
  </Button>
@@ -123,6 +123,18 @@ export const ManageFileButton = (props) => {
123
123
  replace: __('Select a new Lottie animation', 'eightshift-frontend-libs-tailwind'),
124
124
  },
125
125
  },
126
+ rive: {
127
+ buttonTooltip: {
128
+ browse: __('Select a Rive animation', 'eightshift-frontend-libs-tailwind'),
129
+ upload: __('Upload a Rive animation', 'eightshift-frontend-libs-tailwind'),
130
+ replace: __('Replace Rive animation', 'eightshift-frontend-libs-tailwind'),
131
+ },
132
+ modalTitle: {
133
+ browse: __('Select a Rive animation', 'eightshift-frontend-libs-tailwind'),
134
+ upload: __('Upload a Rive animation', 'eightshift-frontend-libs-tailwind'),
135
+ replace: __('Select a new Rive animation', 'eightshift-frontend-libs-tailwind'),
136
+ },
137
+ },
126
138
  custom: {
127
139
  buttonTooltip: labels?.buttonTooltip,
128
140
  buttonLabel: labels?.buttonLabel,
@@ -174,7 +186,7 @@ export const ManageFileButton = (props) => {
174
186
  *
175
187
  * @returns {JSX.Element} The FileSelector component.
176
188
  *
177
- * @typedef {'file' | 'image' | 'video' | 'subtitle' | 'geoJson' | 'lottie' | 'custom'} FileKind
189
+ * @typedef {'file' | 'image' | 'video' | 'subtitle' | 'geoJson' | 'lottie' | 'rive' | 'custom'} FileKind
178
190
  *
179
191
  * @example
180
192
  * <FileSelector
@@ -202,6 +214,7 @@ export const FileSelector = (props) => {
202
214
  subtitle: __('Remove subtitle file', 'eightshift-frontend-libs-tailwind'),
203
215
  geoJson: __('Remove GeoJSON file', 'eightshift-frontend-libs-tailwind'),
204
216
  lottie: __('Remove Lottie animation', 'eightshift-frontend-libs-tailwind'),
217
+ rive: __('Remove Rive animation', 'eightshift-frontend-libs-tailwind'),
205
218
  custom: labels?.removeTooltip,
206
219
  };
207
220
 
@@ -211,6 +224,7 @@ export const FileSelector = (props) => {
211
224
  subtitle: icons.closedCaptions,
212
225
  geoJson: icons.fileMetadata,
213
226
  lottie: icons.animationFile,
227
+ rive: icons.animationFile,
214
228
  custom: labels?.removeIcon,
215
229
  };
216
230
 
@@ -222,7 +236,7 @@ export const FileSelector = (props) => {
222
236
  >
223
237
  <HStack
224
238
  noWrap
225
- className='es-uic-pl-1'
239
+ className='es:pl-1'
226
240
  >
227
241
  <ManageFileButton {...commonManageFileButtonProps} />
228
242
  {!noUpload && (
@@ -236,7 +250,7 @@ export const FileSelector = (props) => {
236
250
  </FilePlaceholder>
237
251
 
238
252
  <AnimatedVisibility
239
- visible={fileName}
253
+ visible={(fileName ?? '').length > 0}
240
254
  noInitial
241
255
  >
242
256
  <HStack noWrap>
@@ -60,14 +60,14 @@ export const PickerPlaceholder = (props) => {
60
60
  }
61
61
 
62
62
  return (
63
- <div className='es-uic-font-sans es-uic-border-gray-200 es-uic-mx-auto es-uic-grid es-uic-max-w-72 es-uic-grid-cols-2 es-uic-gap-1.5 es-uic-rounded-lg es-uic-border es-uic-p-3 es-uic-text-xs es-uic-shadow-lg'>
63
+ <div className='es:font-sans es:border-gray-200 es:mx-auto es:grid es:max-w-72 es:grid-cols-2 es:gap-1.5 es:rounded-lg es:border es:p-3 es:text-xs es:shadow-lg'>
64
64
  <RichLabel
65
65
  icon={icon}
66
66
  label={title}
67
- className='col-span-2 mb-2 select-none font-medium !text-gray-400'
67
+ className='col-span-2 mb-2 font-medium !text-gray-400 select-none'
68
68
  />
69
69
 
70
- <span className='es-uic-col-span-2 es-uic-select-none es-uic-justify-self-center'>{presetsHeading}</span>
70
+ <span className='es:col-span-2 es:select-none es:justify-self-center'>{presetsHeading}</span>
71
71
 
72
72
  {presets.map(({ name, icon, blocks: blockData, attributes: attrsToSet }, index) => {
73
73
  return (
@@ -92,11 +92,9 @@ export const PickerPlaceholder = (props) => {
92
92
 
93
93
  {inserter && (
94
94
  <>
95
- <span className='es-uic-col-span-2 es-uic-select-none es-uic-justify-self-center'>
96
- {__('or', 'fe-libs-tailwind')}
97
- </span>
95
+ <span className='es:col-span-2 es:select-none es:justify-self-center'>{__('or', 'fe-libs-tailwind')}</span>
98
96
 
99
- <div className='es-uic-col-span-2 es-uic-justify-self-center'>
97
+ <div className='es:col-span-2 es:justify-self-center'>
100
98
  {inserter}
101
99
 
102
100
  {inserter === true && (
@@ -30,7 +30,7 @@ export const ServerSideRender = (props) => {
30
30
  block={block}
31
31
  attributes={attributes}
32
32
  className={clsx(
33
- 'es-uic-pointer-events-none es-uic-rounded-lg es-uic-border es-uic-border-dotted es-uic-border-gray-300 es-uic-p-2 es-uic-flow-root',
33
+ 'es:pointer-events-none es:rounded-lg es:border es:border-dotted es:border-gray-300 es:p-2 es:flow-root',
34
34
  className,
35
35
  )}
36
36
  />
@@ -2,10 +2,9 @@
2
2
 
3
3
  import { Toaster } from 'sonner';
4
4
  import { __ } from '@wordpress/i18n';
5
- import { Button, HStack } from '@eightshift/ui-components';
5
+ import { Button, OptionsPanelHeader } from '@eightshift/ui-components';
6
6
  import { icons } from '@eightshift/ui-components/icons';
7
7
  import { createContext } from '@wordpress/element';
8
- import { clsx } from '@eightshift/ui-components/utilities';
9
8
  import { useThemeOptions } from './use-theme-options';
10
9
 
11
10
  export const EsThemeOptionsContext = createContext(null);
@@ -19,25 +18,27 @@ export const ThemeOptionsPage = ({
19
18
  const { isLoading, saveSettings } = themeOptions;
20
19
 
21
20
  return (
22
- <EsThemeOptionsContext.Provider value={themeOptions}>
23
- <Toaster richColors />
24
- <div className={clsx('es-uic-space-y-4', isLoading && 'es-uic-pointer-events-none es-uic-opacity-60')}>
25
- <HStack className='es-uic-justify-between'>
26
- <h1>{title}</h1>
27
-
28
- <Button
29
- onPress={() => saveSettings()}
30
- disabled={isLoading}
31
- icon={isLoading ? icons.moreH : icons.save}
32
- >
33
- {isLoading
34
- ? __('Saving...', 'eightshift-frontend-libs-tailwind')
35
- : __('Save', 'eightshift-frontend-libs-tailwind')}
36
- </Button>
37
- </HStack>
21
+ <>
22
+ <EsThemeOptionsContext.Provider value={themeOptions}>
23
+ <OptionsPanelHeader
24
+ title={title}
25
+ actions={
26
+ <Button
27
+ onPress={() => saveSettings()}
28
+ disabled={isLoading}
29
+ icon={isLoading ? icons.moreH : icons.save}
30
+ >
31
+ {isLoading
32
+ ? __('Saving...', 'eightshift-frontend-libs-tailwind')
33
+ : __('Save', 'eightshift-frontend-libs-tailwind')}
34
+ </Button>
35
+ }
36
+ />
38
37
 
39
38
  {children}
40
- </div>
41
- </EsThemeOptionsContext.Provider>
39
+ </EsThemeOptionsContext.Provider>
40
+
41
+ <Toaster richColors />
42
+ </>
42
43
  );
43
44
  };