@fkui/vue 6.0.1 → 6.2.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.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.49.2"
8
+ "packageVersion": "7.50.1"
9
9
  }
10
10
  ]
11
11
  }
@@ -430,6 +430,15 @@ module.exports = defineMetadata({
430
430
  inherit: "f-label#description",
431
431
  },
432
432
 
433
+ "f-page-layout": {
434
+ flow: true,
435
+ attributes: {
436
+ layout: {
437
+ required: true,
438
+ },
439
+ },
440
+ },
441
+
433
442
  "f-progressbar": {
434
443
  flow: true,
435
444
  requiredAttributes: ["aria-label"],
@@ -1,31 +1,54 @@
1
- const { Rule } = require("html-validate");
1
+ const { Rule, DOMTokenList } = require("html-validate");
2
2
  const { getDocumentationUrl } = require("./common");
3
3
 
4
+ const deprecatedClasses = [
5
+ {
6
+ name: "navbar",
7
+ description:
8
+ "`.navbar` and related classes are deprecated and should be replaced with Vue components `FPageHeader` and `FNavigationMenu` or their HTML and style.",
9
+ url: "/components/page-layout/fpageheader.html",
10
+ },
11
+ {
12
+ name: "button--text",
13
+ description:
14
+ "`.button--text` class is deprecated and should be replaced with `button--discrete`",
15
+ url: "/components/button.html",
16
+ },
17
+ ];
18
+
4
19
  class ClassDeprecated extends Rule {
5
- documentation() {
20
+ documentation({ description, url }) {
6
21
  return {
7
- description:
8
- "The class button--text is deprecated and should be replaced with button--discrete",
9
- url: getDocumentationUrl("/components/button.html"),
22
+ description,
23
+ url: getDocumentationUrl(url),
10
24
  };
11
25
  }
12
26
 
13
27
  setup() {
14
- /* listen on dom ready event */
15
- this.on("dom:ready", (event) => {
16
- this.reportDeprecatedClass(event);
17
- });
18
- }
28
+ this.on("attr", (event) => {
29
+ const { key, value, valueLocation } = event;
30
+ const hasClassValue = key === "class" && typeof value === "string";
31
+ if (!hasClassValue) {
32
+ return;
33
+ }
19
34
 
20
- reportDeprecatedClass(event) {
21
- const buttons = event.document.querySelectorAll(".button--text");
35
+ const tokens = new DOMTokenList(event.value, valueLocation);
22
36
 
23
- for (const button of buttons) {
24
- this.report(
25
- button,
26
- "['button--text'] is deprecated, please use ['button--discrete'] instead",
27
- );
28
- }
37
+ for (const { item, location } of tokens.iterator()) {
38
+ for (const deprecatedClass of deprecatedClasses) {
39
+ if (deprecatedClass.name !== item) {
40
+ continue;
41
+ }
42
+
43
+ this.report({
44
+ node: event.target,
45
+ location,
46
+ message: "`.{{ name }}` class is deprecated.",
47
+ context: deprecatedClass,
48
+ });
49
+ }
50
+ }
51
+ });
29
52
  }
30
53
  }
31
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fkui/vue",
3
- "version": "6.0.1",
3
+ "version": "6.2.0",
4
4
  "description": "Vue implementation of FKUI components",
5
5
  "keywords": [
6
6
  "fkui",
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "./cypress": {
26
26
  "types": "./dist/types/cypress.d.ts",
27
- "default": "./dist/cjs/cypress.js"
27
+ "require": "./dist/cjs/cypress.cjs.js",
28
+ "import": "./dist/esm/cypress.esm.js"
28
29
  },
29
30
  "./htmlvalidate": "./htmlvalidate/index.cjs",
30
31
  "./htmlvalidate/cypress": "./htmlvalidate/cypress.js",
@@ -48,7 +49,7 @@
48
49
  "build:api": "fk-api-extractor --patch-augmentations api-extractor.*.json",
49
50
  "build:dts": "vue-tsc -b",
50
51
  "build:lib": "fk-build-vue-lib",
51
- "build:pageobjects": "esbuild --bundle --platform=node --target=node12.0 --sourcemap --outfile=dist/cjs/cypress.js ./src/cypress/index.ts",
52
+ "build:pageobjects": "node build-pageobjects.mjs",
52
53
  "clean": "rimraf -g .jest-cache *.tsbuildinfo coverage dist public temp test-results",
53
54
  "prepack": "release-prepack --bundle --retain-scripts",
54
55
  "postpack": "release-postpack",
@@ -59,9 +60,9 @@
59
60
  "unit:watch": "jest --watch"
60
61
  },
61
62
  "peerDependencies": {
62
- "@fkui/date": "^6.0.1",
63
- "@fkui/design": "^6.0.1",
64
- "@fkui/logic": "^6.0.1",
63
+ "@fkui/date": "^6.2.0",
64
+ "@fkui/design": "^6.2.0",
65
+ "@fkui/logic": "^6.2.0",
65
66
  "fk-icons": "^4.30.1",
66
67
  "html-validate": ">= 7.9.0",
67
68
  "vue": "^3.5.0"
@@ -78,5 +79,5 @@
78
79
  "node": ">= 20",
79
80
  "npm": ">= 7"
80
81
  },
81
- "gitHead": "57374ff76f56c2587a9290facb0894c89bbe7ea6"
82
+ "gitHead": "b75730a2c2bee0c0fe8243d2de511b77c88dcbee"
82
83
  }