uikit 3.25.23-dev.0ea1d51 → 3.25.23-dev.9ebc131

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 (51) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/scss.js +83 -54
  3. package/dist/css/uikit-core-rtl.css +1 -1
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +1 -1
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +1 -1
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +1 -1
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +4 -4
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +324 -32
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +324 -32
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +1 -1
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +1 -1
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +191 -191
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +1 -1
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +1 -1
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +5 -3
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +100 -85
  38. package/dist/js/uikit-core.min.js +1 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +97 -80
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/api/component.js +12 -8
  45. package/src/js/components/tooltip.js +4 -2
  46. package/src/js/core/accordion.js +11 -7
  47. package/src/js/core/drop.js +10 -32
  48. package/src/js/core/dropnav.js +1 -1
  49. package/src/js/core/overflow-fade.js +6 -5
  50. package/src/js/mixin/event.js +31 -0
  51. package/src/js/mixin/modal.js +26 -34
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## 3.25.22 (September 9, 2026)
4
4
 
5
+ ### Changed
6
+
7
+ - Store private component bookkeeping in WeakMaps instead of `__uikit__` element properties
8
+
5
9
  ### Fixed
6
10
 
7
11
  - Fix accessibility-tree parentage for Drop components reparented in the DOM
package/build/scss.js CHANGED
@@ -13,55 +13,7 @@ await emptyDir('src/scss');
13
13
  for (const file of (await glob('src/less/**/*.less'))
14
14
  .sort()
15
15
  .sort((a, b) => a.endsWith('/inverse.less') - b.endsWith('/inverse.less'))) {
16
- /* replace all Less stuff with SCSS */
17
- let source = (await read(file))
18
- .replace(/\/less\//g, '/scss/') // change less/ dir to scss/ on imports
19
- .replace(/\.less/g, '.scss') // change .less extensions to .scss on imports
20
- .replace(/@(?!property)/g, '$') // convert variables
21
- .replace(
22
- /(:[^'"]*?\([^'"]+?)\s*\/\s*([0-9.-]+)\)/g,
23
- (exp, m1, m2) => `${m1} * ${round(1 / parseFloat(m2), 5)})`,
24
- )
25
- .replace(/--uk-\S+: (\$\S+);/g, (exp, name) => exp.replace(name, `#{${name}}`))
26
- .replace(/\\\$/g, '\\@') // revert classes using the @ symbol
27
- .replace(/ e\(/g, ' unquote(') // convert escape function
28
- .replace(/\.([\w-]*)\s*\((.*)\)\s*{/g, '@mixin $1($2){') // hook -> mixins
29
- .replace(/(\$[\w-]*)\s*:(.*);/g, '$1: $2 !default;') // make variables optional
30
- .replace(/@mixin ([\w-]*)\s*\((.*)\)\s*{\s*}/g, '// @mixin $1($2){}') // comment empty mixins
31
- .replace(/\.(hook[a-zA-Z\-\d]+)(\(\))?;/g, '@if(mixin-exists($1)) {@include $1();}') // hook calls surrounded by a mixin-exists
32
- .replace(/\$(import|supports|media|font-face|page|keyframes|-moz-document)/g, '@$1') // replace valid '@' statements
33
- .replace(/tint\((\$[\w-]+),\s([^)]*)\)/g, 'mix(white, $1, $2)') // replace Less function tint with mix
34
- .replace(/fade\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => {
35
- return `rgba(${p1}, ${p2 / 100})`;
36
- }) // replace Less function fade with rgba
37
- .replace(/spin\((\$[\w-]*), ([0-9]+)\)/g, (match, p1, p2) => {
38
- return `adjust-hue(${p1}, ${p2})`;
39
- }) // replace Less function spin with adjust-hue
40
- .replace(/fade(in|out)\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2, p3) => {
41
- return `fade-${p1}(${p2}, ${p3 / 100})`;
42
- }) // replace Less function fadeout with fade-out
43
- .replace(/\.svg-fill/g, '@include svg-fill') // include svg-fill mixin
44
- .replace(
45
- /(.*):extend\((\.[\w\\@-]*) all\) when \((\$[\w-]*) = (\w+)\) {}/g,
46
- '@if ( $3 == $4 ) { $1 { @extend $2 !optional;} }',
47
- ) // update conditional extend and add !optional to ignore warnings
48
- .replace(
49
- /(\.[\w\\@-]+)\s*when\s*\((\$[\w-]*)\s*=\s*(\w+)\)\s*{\s*@if\(mixin-exists\(([\w-]*)\)\) {@include\s([\w-]*)\(\);\s*}\s*}/g,
50
- '@if ($2 == $3) { $1 { @if (mixin-exists($4)) {@include $4();}}}',
51
- ) // update conditional hook
52
- .replace(
53
- /([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gms,
54
- '@if ($2 == $3) {\n$1 $4\n}',
55
- )
56
- .replace(
57
- /([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s+not\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gs,
58
- '@if ($2 != $3) {\n$1 $4\n}',
59
- ) // replace conditionals
60
- .replace(/\${/g, '#{$') // string literals: from: /~"(.*)"/g, to: '#{"$1"}'
61
- .replace(/[^(](-\$[\w-]*)/g, ' ($1)') // surround negative variables with brackets
62
- .replace(/(--[\w-]+:\s*)~'([^']+)'/g, '$1$2') // string literals in custom properties
63
- .replace(/~('[^']+')/g, 'unquote($1)') // string literals: for real
64
- .replace(/(\w+)&/g, '&:is($1)'); // replace parent selector & when not at beginning of selector
16
+ let source = convertLessToSass(await read(file));
65
17
 
66
18
  /* File name of the current file */
67
19
  const filename = path.basename(file, '.less');
@@ -104,6 +56,85 @@ for (const file of (await glob('src/less/**/*.less'))
104
56
  );
105
57
  }
106
58
  }
59
+ function convertLessToSass(source) {
60
+ source = rewriteImportsAndVariables(source);
61
+ source = rewriteMathAndEscapes(source);
62
+ source = rewriteMixinsAndHooks(source);
63
+ source = rewriteSassFunctions(source);
64
+ source = rewriteConditionals(source);
65
+ return rewriteStringLiterals(source);
66
+ }
67
+
68
+ function rewriteImportsAndVariables(source) {
69
+ return source
70
+ .replace(/\/less\//g, '/scss/')
71
+ .replace(/\.less/g, '.scss')
72
+ .replace(/@(?!property)/g, '$');
73
+ }
74
+
75
+ function rewriteMathAndEscapes(source) {
76
+ return source
77
+ .replace(
78
+ /(:[^'"]*?\([^'"]+?)\s*\/\s*([0-9.-]+)\)/g,
79
+ (exp, m1, m2) => `${m1} * ${round(1 / parseFloat(m2), 5)})`,
80
+ )
81
+ .replace(/--uk-\S+: (\$\S+);/g, (exp, name) => exp.replace(name, `#{${name}}`))
82
+ .replace(/\\\$/g, '\\@')
83
+ .replace(/ e\(/g, ' unquote(');
84
+ }
85
+
86
+ function rewriteMixinsAndHooks(source) {
87
+ return source
88
+ .replace(/\.([\w-]*)\s*\((.*)\)\s*{/g, '@mixin $1($2){')
89
+ .replace(/(\$[\w-]*)\s*:(.*);/g, '$1: $2 !default;')
90
+ .replace(/@mixin ([\w-]*)\s*\((.*)\)\s*{\s*}/g, '// @mixin $1($2){}')
91
+ .replace(/\.(hook[a-zA-Z\-\d]+)(\(\))?;/g, '@if(mixin-exists($1)) {@include $1();}')
92
+ .replace(/\$(import|supports|media|font-face|page|keyframes|-moz-document)/g, '@$1')
93
+ .replace(/\.svg-fill/g, '@include svg-fill');
94
+ }
95
+
96
+ function rewriteSassFunctions(source) {
97
+ return source
98
+ .replace(/tint\((\$[\w-]+),\s([^)]*)\)/g, 'mix(white, $1, $2)')
99
+ .replace(/fade\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => {
100
+ return `rgba(${p1}, ${p2 / 100})`;
101
+ })
102
+ .replace(/spin\((\$[\w-]*), ([0-9]+)\)/g, (match, p1, p2) => {
103
+ return `adjust-hue(${p1}, ${p2})`;
104
+ })
105
+ .replace(/fade(in|out)\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2, p3) => {
106
+ return `fade-${p1}(${p2}, ${p3 / 100})`;
107
+ });
108
+ }
109
+
110
+ function rewriteConditionals(source) {
111
+ return source
112
+ .replace(
113
+ /(.*):extend\((\.[\w\\@-]*) all\) when \((\$[\w-]*) = (\w+)\) {}/g,
114
+ '@if ( $3 == $4 ) { $1 { @extend $2 !optional;} }',
115
+ )
116
+ .replace(
117
+ /(\.[\w\\@-]+)\s*when\s*\((\$[\w-]*)\s*=\s*(\w+)\)\s*{\s*@if\(mixin-exists\(([\w-]*)\)\) {@include\s([\w-]*)\(\);\s*}\s*}/g,
118
+ '@if ($2 == $3) { $1 { @if (mixin-exists($4)) {@include $4();}}}',
119
+ )
120
+ .replace(
121
+ /([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gms,
122
+ '@if ($2 == $3) {\n$1 $4\n}',
123
+ )
124
+ .replace(
125
+ /([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s+not\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gs,
126
+ '@if ($2 != $3) {\n$1 $4\n}',
127
+ );
128
+ }
129
+
130
+ function rewriteStringLiterals(source) {
131
+ return source
132
+ .replace(/\${/g, '#{$')
133
+ .replace(/[^(](-\$[\w-]*)/g, ' ($1)')
134
+ .replace(/(--[\w-]+:\s*)~'([^']+)'/g, '$1$2')
135
+ .replace(/~('[^']+')/g, 'unquote($1)')
136
+ .replace(/(\w+)&/g, '&:is($1)');
137
+ }
107
138
 
108
139
  /* write mixins files */
109
140
  for (const [vars, file] of [
@@ -124,7 +155,7 @@ for (const [vars, file] of [
124
155
  (dependencies, key) => resolveDependencies(vars, key, dependencies),
125
156
  new Set(),
126
157
  );
127
- await write(`src/scss/${file}.scss`, useSassModules(Array.from(variables).join('\n')));
158
+ await write(`src/scss/${file}.scss`, useSassModules([...variables].join('\n')));
128
159
  }
129
160
 
130
161
  /*
@@ -154,9 +185,7 @@ function useSassModules(source) {
154
185
  }
155
186
 
156
187
  return modules.size
157
- ? `${Array.from(modules)
158
- .map((module) => `@use "sass:${module}";`)
159
- .join('\n')}\n\n${source}`
188
+ ? `${[...modules].map((module) => `@use "sass:${module}";`).join('\n')}\n\n${source}`
160
189
  : source;
161
190
  }
162
191
 
@@ -230,7 +259,7 @@ async function getVariablesFromFile(file, source) {
230
259
 
231
260
  /* if it's not an SVG add the variable and search for its dependencies */
232
261
  } else {
233
- dependencies = Array.from(value.matchAll(/\$[\w-]+/g)).map(([value]) => value);
262
+ dependencies = Array.from(value.matchAll(/\$[\w-]+/g), ([value]) => value);
234
263
  }
235
264
 
236
265
  themeVariables[name] = { value: `${value};`, dependencies };
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.23-dev.0ea1d51 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
1
+ /*! UIkit 3.25.23-dev.9ebc131 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
2
2
  /* ========================================================================
3
3
  Component: Base
4
4
  ========================================================================== */