@nysds/components 1.10.1 → 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>;
@@ -14,7 +14,7 @@ export declare class NysCheckbox extends LitElement {
14
14
  errorMessage: string;
15
15
  groupExist: boolean;
16
16
  tile: boolean;
17
- invert: boolean;
17
+ inverted: boolean;
18
18
  private static readonly VALID_SIZES;
19
19
  private _size;
20
20
  get size(): (typeof NysCheckbox.VALID_SIZES)[number];
@@ -10,7 +10,7 @@ export declare class NysCheckboxgroup extends LitElement {
10
10
  description: string;
11
11
  tile: boolean;
12
12
  _tooltip: string;
13
- invert: boolean;
13
+ inverted: boolean;
14
14
  form: string | null;
15
15
  private _slottedDescriptionText;
16
16
  private static readonly VALID_SIZES;
@@ -16,7 +16,7 @@ export declare class NysFileinput extends LitElement {
16
16
  errorMessage: string;
17
17
  dropzone: boolean;
18
18
  width: "lg" | "full";
19
- invert: boolean;
19
+ inverted: boolean;
20
20
  static styles: import("lit").CSSResult;
21
21
  private _selectedFiles;
22
22
  private _dragActive;
@@ -4,7 +4,7 @@ export declare class NysLabel extends LitElement {
4
4
  label: string;
5
5
  description: string;
6
6
  flag: string;
7
- invert: boolean;
7
+ inverted: boolean;
8
8
  get tooltip(): string;
9
9
  set tooltip(value: string);
10
10
  private _tooltip;
@@ -9,7 +9,7 @@ export declare class NysRadiobutton extends LitElement {
9
9
  id: string;
10
10
  name: string;
11
11
  value: string;
12
- invert: boolean;
12
+ inverted: boolean;
13
13
  form: string | null;
14
14
  private static readonly VALID_SIZES;
15
15
  private _size;
@@ -10,7 +10,7 @@ export declare class NysRadiogroup extends LitElement {
10
10
  description: string;
11
11
  tile: boolean;
12
12
  _tooltip: string;
13
- invert: boolean;
13
+ inverted: boolean;
14
14
  form: string | null;
15
15
  private selectedValue;
16
16
  private _slottedDescriptionText;
@@ -10,7 +10,7 @@ export declare class NysSelect extends LitElement {
10
10
  optional: boolean;
11
11
  _tooltip: string;
12
12
  form: string | null;
13
- invert: boolean;
13
+ inverted: boolean;
14
14
  showError: boolean;
15
15
  errorMessage: string;
16
16
  private static readonly VALID_WIDTHS;
@@ -11,9 +11,9 @@ export declare class NysTextarea extends LitElement {
11
11
  required: boolean;
12
12
  optional: boolean;
13
13
  _tooltip: string;
14
- invert: boolean;
14
+ inverted: boolean;
15
15
  form: string | null;
16
- maxlength: null;
16
+ maxlength: number | null;
17
17
  private static readonly VALID_WIDTHS;
18
18
  width: (typeof NysTextarea.VALID_WIDTHS)[number];
19
19
  rows: number;
@@ -23,7 +23,7 @@ export declare class NysTextinput extends LitElement {
23
23
  step: number | null;
24
24
  min: number | null;
25
25
  max: number | null;
26
- invert: boolean;
26
+ inverted: boolean;
27
27
  showError: boolean;
28
28
  errorMessage: string;
29
29
  private showPassword;
@@ -10,7 +10,7 @@ export declare class NysToggle extends LitElement {
10
10
  checked: boolean;
11
11
  disabled: boolean;
12
12
  noIcon: boolean;
13
- invert: boolean;
13
+ inverted: boolean;
14
14
  private static readonly VALID_SIZES;
15
15
  private _size;
16
16
  get size(): (typeof NysToggle.VALID_SIZES)[number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.10.1",
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": [
@@ -26,18 +26,18 @@
26
26
  "build": "npm run lint && tsc --emitDeclarationOnly && vite build",
27
27
  "build:umd": "tsc --emitDeclarationOnly && vite build --config vite.config.umd.js",
28
28
  "build:packages": "npm run lint && node src/scripts/build-order.js",
29
- "build:all": "npm run clean:dist && npm run build:packages && npm run build && npm run build:umd",
29
+ "build:all": "npm run clean:dist && NODE_ENV=production npm run build:packages && NODE_ENV=production npm run build && NODE_ENV=production npm run build:umd",
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",
37
- "test": "wtr --node-resolve",
38
- "test:build": "npm run build:all && wtr --node-resolve",
39
- "storybook": "storybook dev -p 6006",
40
- "storybook:build:all": "npm run build:all && storybook dev -p 6006",
37
+ "test": "npx playwright install && wtr --node-resolve",
38
+ "test:build": "npm run build:all && npm run test",
39
+ "storybook": "NODE_ENV=production storybook dev -p 6006",
40
+ "storybook:build:all": "NODE_ENV=production npm run build:all && npm run storybook",
41
41
  "build-storybook": "npm run build:packages && storybook build",
42
42
  "storybook:cibuild": "storybook build",
43
43
  "clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules",
@@ -55,43 +55,37 @@
55
55
  "url": "https://github.com/ITS-HCD/nysds/issues"
56
56
  },
57
57
  "homepage": "https://github.com/ITS-HCD/nysds/blob/main/README.md",
58
- "dependencies": {
59
- "@figma/code-connect": "^1.3.1",
60
- "@floating-ui/dom": "^1.7.1",
61
- "lit-analyzer": "^2.0.3"
62
- },
63
58
  "devDependencies": {
64
59
  "@chromatic-com/storybook": "^4.1.1",
65
- "@open-wc/testing": "^3.2.2",
66
- "@storybook/addon-a11y": "9.1.10",
67
- "@storybook/addon-docs": "9.1.10",
68
- "@storybook/addon-links": "9.1.10",
69
- "@storybook/web-components-vite": "9.1.10",
70
- "@types/mocha": "^10.0.9",
71
- "@typescript-eslint/eslint-plugin": "^8.5.0",
72
- "@typescript-eslint/parser": "^8.5.0",
73
- "@web/dev-server-esbuild": "^1.0.2",
74
- "@web/test-runner": "^0.19.0",
60
+ "@figma/code-connect": "^1.3.7",
61
+ "@floating-ui/dom": "^1.7.4",
62
+ "@storybook/addon-a11y": "10.0.0",
63
+ "@storybook/addon-docs": "10.0.0",
64
+ "@storybook/addon-links": "10.0.0",
65
+ "@storybook/web-components-vite": "10.0.0",
66
+ "@open-wc/testing": "^4.0.0",
67
+ "@types/mocha": "^10.0.10",
68
+ "@typescript-eslint/eslint-plugin": "^8.46.2",
69
+ "@typescript-eslint/parser": "^8.46.2",
70
+ "@web/dev-server-esbuild": "^1.0.4",
71
+ "@web/test-runner": "^0.20.2",
75
72
  "@web/test-runner-commands": "^0.9.0",
76
- "@web/test-runner-playwright": "^0.11.0",
73
+ "@web/test-runner-playwright": "^0.11.1",
77
74
  "dotenv-cli": "^10.0.0",
78
- "eslint": "^9.10.0",
79
- "eslint-plugin-lit": "^1.15.0",
80
- "eslint-plugin-prettier": "^5.2.1",
81
- "eslint-plugin-storybook": "9.1.10",
75
+ "eslint-plugin-storybook": "10.0.0",
76
+ "eslint": "^9.38.0",
77
+ "eslint-plugin-lit": "^2.1.1",
78
+ "eslint-plugin-prettier": "^5.5.4",
82
79
  "i": "^0.3.7",
83
- "lit": "^3.2.1",
84
- "npm": "^10.9.0",
85
- "plop": "^4.0.2",
86
- "rollup-plugin-visualizer": "^5.14.0",
87
- "sinon": "^19.0.2",
88
- "storybook": "9.1.10",
89
- "tslib": "^2.7.0",
90
- "typescript": "^5.7.2",
91
- "vite": "^6.3.6"
92
- },
93
- "peerDependencies": {
94
- "lit": "^3.2.1"
80
+ "storybook": "10.0.0",
81
+ "lit": "^3.3.1",
82
+ "lit-analyzer": "^2.0.3",
83
+ "plop": "^4.0.4",
84
+ "rollup-plugin-visualizer": "^6.0.5",
85
+ "sinon": "^21.0.0",
86
+ "tslib": "^2.8.1",
87
+ "typescript": "^5.9.3",
88
+ "vite": "^7.1.2"
95
89
  },
96
90
  "eslintConfig": {
97
91
  "extends": [