@nysds/components 1.11.0 → 1.11.1

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.
@@ -19,7 +19,7 @@ export declare class NysAlert extends LitElement {
19
19
  get type(): string;
20
20
  set type(value: string);
21
21
  get ariaAttributes(): {
22
- role: string;
22
+ role: "alert" | "status" | "region";
23
23
  ariaLabel: string;
24
24
  };
25
25
  /**************** Lifecycle Methods ****************/
@@ -27,7 +27,7 @@ export declare class NysButton extends LitElement {
27
27
  private _type;
28
28
  get type(): (typeof NysButton.VALID_TYPES)[number];
29
29
  set type(value: string);
30
- onClick: (event: Event) => void;
30
+ onClick: ((event: Event) => void) | null;
31
31
  href: string;
32
32
  private static readonly VALID_TARGETS;
33
33
  private _target;
@@ -48,6 +48,13 @@ export declare class NysButton extends LitElement {
48
48
  private _handleBlur;
49
49
  private _handleClick;
50
50
  private _handleKeydown;
51
+ /**
52
+ * Vanilla JS & Native HTML keydown solution:
53
+ * The <nys-button onClick="doFunction();"></nys-button> onClick is an attribute here.
54
+ * Thus, we call it here. Otherwise, at this point, this.onClick is null as it isn't props, but a string attribute
55
+ * In vanilla HTML/JS, clicking with execute the attribute function, BUT now with keydown, hence this solution.
56
+ */
57
+ private _handleAnyAttributeFunction;
51
58
  /******************** Public Methods ********************/
52
59
  focus(options?: FocusOptions): void;
53
60
  render(): import("lit-html").TemplateResult<1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "New York State's design system and code component library.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -30,7 +30,7 @@
30
30
  "build:link": "npm run build:all && npm link",
31
31
  "lint": "eslint src/ packages/**/*.{ts,js}",
32
32
  "lint:fix": "eslint src/ packages/**/*.{ts,js} --fix",
33
- "lit-analyze": "lit-analyzer 'packages/**/*.ts'",
33
+ "lit-analyze": "lit-analyzer $(find ./packages -name '*.ts' ! -name '*.figma.*')",
34
34
  "release": "NODE_ENV=production npm run build:all && npm run test && npm publish --workspaces --access public && npm publish --access public",
35
35
  "release:dry-run": "NODE_ENV=production npm run build:all && NODE_ENV=production npm run test && node src/scripts/publish-dry-run.js",
36
36
  "release:alpha": "npm run build && npm run build:umd && npm publish --tag next",