@nysds/components 1.1.0 → 1.1.2

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.
@@ -1 +1,2 @@
1
1
  export * from "./nys-checkbox";
2
+ export * from "./nys-checkboxgroup";
@@ -12,11 +12,12 @@ export declare class NysCheckbox extends LitElement {
12
12
  value: string;
13
13
  showError: boolean;
14
14
  errorMessage: string;
15
+ groupExist: boolean;
15
16
  private static readonly VALID_SIZES;
16
17
  private _size;
17
18
  get size(): (typeof NysCheckbox.VALID_SIZES)[number];
18
19
  set size(value: string);
19
- getInputElement(): Promise<HTMLInputElement | null | undefined>;
20
+ getInputElement(): Promise<HTMLInputElement | null>;
20
21
  static styles: import("lit").CSSResult;
21
22
  private _internals;
22
23
  /********************** Lifecycle updates **********************/
@@ -32,6 +33,7 @@ export declare class NysCheckbox extends LitElement {
32
33
  private _setValidityMessage;
33
34
  private _validate;
34
35
  /********************** Functions **********************/
36
+ checkValidity(): boolean;
35
37
  private _handleInvalid;
36
38
  /******************** Event Handlers ********************/
37
39
  private _handleChange;
@@ -5,6 +5,7 @@ export declare class NysCheckboxgroup extends LitElement {
5
5
  id: string;
6
6
  name: string;
7
7
  required: boolean;
8
+ optional: boolean;
8
9
  showError: boolean;
9
10
  errorMessage: string;
10
11
  label: string;
@@ -20,10 +21,13 @@ export declare class NysCheckboxgroup extends LitElement {
20
21
  constructor();
21
22
  connectedCallback(): void;
22
23
  disconnectedCallback(): void;
24
+ firstUpdated(): void;
23
25
  updated(changedProperties: Map<string | symbol, unknown>): void;
24
26
  /********************** Functions **********************/
27
+ private _setGroupExist;
25
28
  private _handleInvalid;
26
- private setupCheckboxRequired;
29
+ private _setupCheckboxRequired;
30
+ private _handleCheckboxChange;
27
31
  private _manageCheckboxRequired;
28
32
  private updateCheckboxSize;
29
33
  render(): import("lit-html").TemplateResult<1>;
@@ -1 +1,2 @@
1
1
  export * from "./nys-radiobutton";
2
+ export * from "./nys-radiogroup";
@@ -20,6 +20,8 @@ export declare class NysRadiobutton extends LitElement {
20
20
  /********************** Lifecycle updates **********************/
21
21
  connectedCallback(): void;
22
22
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
23
+ /******************** Function ********************/
24
+ checkValidity(): boolean;
23
25
  /******************** Event Handlers ********************/
24
26
  private _handleChange;
25
27
  private _handleFocus;
@@ -5,6 +5,7 @@ export declare class NysRadiogroup extends LitElement {
5
5
  id: string;
6
6
  name: string;
7
7
  required: boolean;
8
+ optional: boolean;
8
9
  showError: boolean;
9
10
  errorMessage: string;
10
11
  label: string;
@@ -28,8 +29,9 @@ export declare class NysRadiogroup extends LitElement {
28
29
  private _setValue;
29
30
  private setRadioButtonRequire;
30
31
  private _manageRequire;
31
- private _initializeCheckedState;
32
- private updateRadioButtonsSize;
32
+ private _initializeCheckedRadioValue;
33
+ /********************** Functions **********************/
34
+ private _updateRadioButtonsSize;
33
35
  private _handleRadioButtonChange;
34
36
  private _handleInvalid;
35
37
  render(): import("lit-html").TemplateResult<1>;
@@ -1 +1,2 @@
1
1
  export * from "./nys-select";
2
+ export * from "./nys-option";
@@ -10,6 +10,7 @@ export declare class NysSelect extends LitElement {
10
10
  value: string;
11
11
  disabled: boolean;
12
12
  required: boolean;
13
+ optional: boolean;
13
14
  form: string;
14
15
  showError: boolean;
15
16
  errorMessage: string;
@@ -34,6 +35,7 @@ export declare class NysSelect extends LitElement {
34
35
  private _setValidityMessage;
35
36
  private _validate;
36
37
  /********************** Functions **********************/
38
+ checkValidity(): boolean;
37
39
  private _handleInvalid;
38
40
  /******************** Event Handlers ********************/
39
41
  private _handleChange;
@@ -12,6 +12,7 @@ export declare class NysTextarea extends LitElement {
12
12
  disabled: boolean;
13
13
  readonly: boolean;
14
14
  required: boolean;
15
+ optional: boolean;
15
16
  form: string;
16
17
  maxlength: null;
17
18
  private static readonly VALID_WIDTHS;
@@ -40,6 +41,7 @@ export declare class NysTextarea extends LitElement {
40
41
  private _setValidityMessage;
41
42
  private _validate;
42
43
  /********************** Functions **********************/
44
+ checkValidity(): boolean;
43
45
  private _handleInvalid;
44
46
  /******************** Event Handlers ********************/
45
47
  private _handleInput;
@@ -16,6 +16,7 @@ export declare class NysTextinput extends LitElement {
16
16
  disabled: boolean;
17
17
  readonly: boolean;
18
18
  required: boolean;
19
+ optional: boolean;
19
20
  form: string;
20
21
  pattern: string;
21
22
  maxlength: null;
@@ -27,7 +28,9 @@ export declare class NysTextinput extends LitElement {
27
28
  max: null;
28
29
  showError: boolean;
29
30
  errorMessage: string;
31
+ private showPassword;
30
32
  static styles: import("lit").CSSResult;
33
+ private _originalErrorMessage;
31
34
  private _hasUserInteracted;
32
35
  private _internals;
33
36
  /********************** Lifecycle updates **********************/
@@ -43,7 +46,9 @@ export declare class NysTextinput extends LitElement {
43
46
  private _setValidityMessage;
44
47
  private _validate;
45
48
  /********************** Functions **********************/
49
+ checkValidity(): boolean;
46
50
  private _handleInvalid;
51
+ private _togglePasswordVisibility;
47
52
  /******************** Event Handlers ********************/
48
53
  private _handleInput;
49
54
  private _handleFocus;
@@ -1,7 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import "@nysds/nys-icon";
3
3
  export declare class NysToggle extends LitElement {
4
- static styles: import("lit").CSSResult;
5
4
  /********************** Properties **********************/
6
5
  id: string;
7
6
  name: string;
@@ -16,8 +15,15 @@ export declare class NysToggle extends LitElement {
16
15
  get size(): (typeof NysToggle.VALID_SIZES)[number];
17
16
  set size(value: string);
18
17
  form: string;
19
- /******************** Functions ********************/
18
+ static styles: import("lit").CSSResult;
19
+ private _internals;
20
+ /********************** Lifecycle updates **********************/
21
+ static formAssociated: boolean;
22
+ constructor();
20
23
  connectedCallback(): void;
24
+ /********************** Form Integration **********************/
25
+ updated(changedProperties: Map<string, any>): void;
26
+ /********************** Functions **********************/
21
27
  private _handleFocus;
22
28
  private _handleBlur;
23
29
  private _handleChange;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "New York State's design system and code component library.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "scripts": {
23
23
  "dev": "vite",
24
+ "gen": "plop",
24
25
  "build": "npm run lint && tsc --emitDeclarationOnly && vite build",
25
26
  "build:umd": "tsc --emitDeclarationOnly && vite build --config vite.config.umd.js",
26
27
  "build:packages": "npm run lint:packages && node src/scripts/build-order.js",
@@ -51,10 +52,28 @@
51
52
  "url": "https://github.com/ITS-HCD/nysds/issues"
52
53
  },
53
54
  "homepage": "https://github.com/ITS-HCD/nysds/blob/main/README.md",
55
+ "dependencies": {
56
+ "@figma/code-connect": "^1.3.1",
57
+ "@nysds/nys-alert": "workspace:*",
58
+ "@nysds/nys-avatar": "workspace:*",
59
+ "@nysds/nys-button": "workspace:*",
60
+ "@nysds/nys-checkbox": "workspace:*",
61
+ "@nysds/nys-errormessage": "workspace:*",
62
+ "@nysds/nys-icon": "workspace:*",
63
+ "@nysds/nys-label": "workspace:*",
64
+ "@nysds/nys-radiobutton": "workspace:*",
65
+ "@nysds/nys-select": "workspace:*",
66
+ "@nysds/nys-textarea": "workspace:*",
67
+ "@nysds/nys-textinput": "workspace:*",
68
+ "@nysds/nys-toggle": "workspace:*",
69
+ "@nysds/nys-unavheader": "workspace:*",
70
+ "@nysds/nys-globalheader": "workspace:*",
71
+ "@nysds/nys-globalfooter": "workspace:*",
72
+ "@nysds/nys-unavfooter": "workspace:*"
73
+ },
54
74
  "devDependencies": {
55
75
  "@chromatic-com/storybook": "^3.2.4",
56
76
  "@open-wc/testing": "^3.2.2",
57
- "@rollup/plugin-node-resolve": "^15.3.0",
58
77
  "@storybook/addon-a11y": "^8.6.0",
59
78
  "@storybook/addon-essentials": "^8.6.0",
60
79
  "@storybook/addon-links": "^8.6.0",
@@ -79,11 +98,13 @@
79
98
  "i": "^0.3.7",
80
99
  "lit": "^3.2.1",
81
100
  "npm": "^10.9.0",
101
+ "plop": "^4.0.1",
102
+ "rollup-plugin-visualizer": "^5.14.0",
82
103
  "sinon": "^19.0.2",
83
104
  "storybook": "^8.6.0",
84
105
  "tslib": "^2.7.0",
85
106
  "typescript": "^5.7.2",
86
- "vite": "^6.0.11"
107
+ "vite": "^6.2.4"
87
108
  },
88
109
  "peerDependencies": {
89
110
  "lit": "^3.2.1"
@@ -92,8 +113,5 @@
92
113
  "extends": [
93
114
  "plugin:storybook/recommended"
94
115
  ]
95
- },
96
- "dependencies": {
97
- "@figma/code-connect": "^1.3.1"
98
116
  }
99
117
  }