vunor 0.5.2 → 0.5.4

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
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.4
4
+
5
+ ### Fixed
6
+
7
+ - **The published package declares its licence.** `package.json` now carries `"license": "MIT"` (plus `author`, `repository` and `homepage`) and the package ships a `LICENSE` file; npm showed 0.5.3 and earlier as unlicensed.
8
+
9
+ ## 0.5.3
10
+
11
+ ### Fixed
12
+
13
+ - **A stacked state class wins over its base regardless of CSS order.** `class="c8-flat c8-flat-selected"` (and `c8-chrome c8-chrome-selected`, also on a shortcut that composes the base) now looks exactly like `class="c8-flat" aria-pressed="true"`, pressed and disabled included. Base and state class were one class each, so the order of their rules decided, and with an app's own shortcuts composing `c8-flat` the base's dark rule could come last: a selected item lost its scope colour in dark mode (white text and icon instead of `scope-color-400`). The attribute-driven states do not change. Each shortcut that composes `c8-flat` or `c8-chrome` adds two selectors to the CSS.
14
+
3
15
  ## 0.5.2
4
16
 
5
17
  ### Fixed
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Artem Maltsev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/theme.mjs CHANGED
@@ -281,6 +281,7 @@ const btn = defineShortcuts({
281
281
  });
282
282
  //#endregion
283
283
  //#region src/theme/shortcuts/c8.ts
284
+ const whenStacked = (stateClass) => `[&.${stateClass.replace("-", "\\-")}]:`;
284
285
  const c8 = defineShortcuts({
285
286
  "c8-filled": {
286
287
  "": "current-bg-scope-color-600 rounded-r1 current-text-white current-icon-white icon-current/100 bg-current text-current",
@@ -308,7 +309,8 @@ const c8 = defineShortcuts({
308
309
  "data-[selected=true]:": "c8-flat-selected",
309
310
  "data-[on=true]:": "c8-flat-selected",
310
311
  "aria-[selected=true]:": "c8-flat-selected",
311
- "aria-[pressed=true]:": "c8-flat-selected"
312
+ "aria-[pressed=true]:": "c8-flat-selected",
313
+ [whenStacked("c8-flat-selected")]: "c8-flat-selected"
312
314
  },
313
315
  "c8-flat-hover": "bg-current/10",
314
316
  "c8-flat-active": "bg-current/15",
@@ -341,7 +343,8 @@ const c8 = defineShortcuts({
341
343
  "data-[selected=true]:": "c8-chrome-selected",
342
344
  "data-[on=true]:": "c8-chrome-selected",
343
345
  "aria-[selected=true]:": "c8-chrome-selected",
344
- "aria-[pressed=true]:": "c8-chrome-selected"
346
+ "aria-[pressed=true]:": "c8-chrome-selected",
347
+ [whenStacked("c8-chrome-selected")]: "c8-chrome-selected"
345
348
  },
346
349
  "c8-chrome-hover": {
347
350
  "": "current-bg-layer-light-1 bg-current",
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "vunor",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
+ "license": "MIT",
5
+ "author": "Artem Maltsev",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/mav-rik/vunor.git",
9
+ "directory": "packages/vunor"
10
+ },
11
+ "homepage": "https://github.com/mav-rik/vunor#readme",
4
12
  "files": [
5
13
  "dist",
6
14
  "CHANGELOG.md"