@nysds/components 1.5.3 → 1.7.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.
@@ -0,0 +1,2 @@
1
+ export * from "./nys-accordion";
2
+ export * from "./nys-accordionitem";
@@ -0,0 +1,22 @@
1
+ import { LitElement } from "lit";
2
+ import "./nys-accordionitem";
3
+ /**
4
+ * The "nys-accordion" is the wrapper that groups individual accordion items within it.
5
+ * The items within is called "nys-accordionitem"
6
+ */
7
+ export declare class NysAccordion extends LitElement {
8
+ id: string;
9
+ singleSelect: boolean;
10
+ bordered: boolean;
11
+ static styles: import("lit").CSSResult;
12
+ /**************** Lifecycle Methods ****************/
13
+ constructor();
14
+ connectedCallback(): void;
15
+ updated(changedProperties: Map<string, any>): void;
16
+ /******************** Functions ********************/
17
+ private _generateUniqueId;
18
+ private _getAccordions;
19
+ private _onAccordionToggle;
20
+ private _applyBordered;
21
+ render(): import("lit-html").TemplateResult<1>;
22
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { LitElement } from "lit";
2
+ export declare class NysAccordionItem extends LitElement {
3
+ id: string;
4
+ heading: string;
5
+ expanded: boolean;
6
+ bordered: boolean;
7
+ static styles: import("lit").CSSResult;
8
+ /**************** Lifecycle Methods ****************/
9
+ constructor();
10
+ connectedCallback(): void;
11
+ updated(changedProperties: Map<string, any>): void;
12
+ /******************** Functions ********************/
13
+ private _generateUniqueId;
14
+ private _dispatchEvent;
15
+ private _handleExpand;
16
+ private _handleKeydown;
17
+ private _contentContainer;
18
+ private _updateHeight;
19
+ render(): import("lit-html").TemplateResult<1>;
20
+ }
@@ -0,0 +1 @@
1
+ export * from "./nys-badge";
@@ -0,0 +1,26 @@
1
+ import { LitElement } from "lit";
2
+ export declare class NysBadge extends LitElement {
3
+ id: string;
4
+ name: string;
5
+ private static readonly VALID_SIZES;
6
+ private _size;
7
+ get size(): (typeof NysBadge.VALID_SIZES)[number];
8
+ set size(value: string);
9
+ private static readonly VALID_INTENT;
10
+ private _intent;
11
+ get intent(): (typeof NysBadge.VALID_INTENT)[number];
12
+ set intent(value: string);
13
+ prefixLabel: string;
14
+ label: string;
15
+ private _prefixIcon;
16
+ get prefixIcon(): string | boolean;
17
+ set prefixIcon(value: string | boolean);
18
+ private _suffixIcon;
19
+ get suffixIcon(): string | boolean;
20
+ set suffixIcon(value: string | boolean);
21
+ static styles: import("lit").CSSResult;
22
+ connectedCallback(): void;
23
+ private static readonly DEFAULT_ICONS;
24
+ private resolveIcon;
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -9,6 +9,7 @@ export declare class NysCheckboxgroup extends LitElement {
9
9
  label: string;
10
10
  description: string;
11
11
  tile: boolean;
12
+ private _slottedDescriptionText;
12
13
  private static readonly VALID_SIZES;
13
14
  private _size;
14
15
  get size(): (typeof NysCheckboxgroup.VALID_SIZES)[number];
@@ -24,12 +25,14 @@ export declare class NysCheckboxgroup extends LitElement {
24
25
  updated(changedProperties: Map<string | symbol, unknown>): void;
25
26
  /********************** Functions **********************/
26
27
  private _setGroupExist;
27
- private _handleInvalid;
28
28
  private _setupCheckboxRequired;
29
- private _handleCheckboxChange;
30
29
  private _manageCheckboxRequired;
31
- private updateCheckboxSize;
32
- private updateCheckboxTile;
33
- private updateCheckboxShowError;
30
+ private _updateCheckboxSize;
31
+ private _updateCheckboxTile;
32
+ private _updateCheckboxShowError;
33
+ private _getSlotDescriptionForAria;
34
+ private _handleInvalid;
35
+ /******************** Event Handlers ********************/
36
+ private _handleCheckboxChange;
34
37
  render(): import("lit-html").TemplateResult<1>;
35
38
  }
@@ -11,6 +11,7 @@ export declare class NysGlobalHeader extends LitElement {
11
11
  firstUpdated(): void;
12
12
  /******************** Functions ********************/
13
13
  private _handleSlotChange;
14
+ private _normalizePath;
14
15
  private _toggleMobileMenu;
15
16
  render(): import("lit-html").TemplateResult<1>;
16
17
  }
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  export declare class NysLabel extends LitElement {
3
- id: string;
3
+ for: string;
4
4
  label: string;
5
5
  description: string;
6
6
  flag: string;
@@ -20,14 +20,15 @@ export declare class NysRadiobutton extends LitElement {
20
20
  static styles: import("lit").CSSResult;
21
21
  /********************** Lifecycle updates **********************/
22
22
  connectedCallback(): void;
23
+ disconnectedCallback(): void;
23
24
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
24
- /******************** Function ********************/
25
+ /********************** Functions **********************/
25
26
  checkValidity(): boolean;
26
27
  /******************** Event Handlers ********************/
27
28
  private _emitChangeEvent;
28
29
  private _handleChange;
29
30
  private _handleFocus;
30
31
  private _handleBlur;
31
- private _handleKeydown;
32
+ private _callInputHandling;
32
33
  render(): import("lit-html").TemplateResult<1>;
33
34
  }
@@ -8,12 +8,13 @@ export declare class NysRadiogroup extends LitElement {
8
8
  errorMessage: string;
9
9
  label: string;
10
10
  description: string;
11
+ tile: boolean;
11
12
  private selectedValue;
13
+ private _slottedDescriptionText;
12
14
  private static readonly VALID_SIZES;
13
15
  private _size;
14
16
  get size(): (typeof NysRadiogroup.VALID_SIZES)[number];
15
17
  set size(value: string);
16
- tile: boolean;
17
18
  static styles: import("lit").CSSResult;
18
19
  private _internals;
19
20
  /********************** Lifecycle updates **********************/
@@ -21,18 +22,26 @@ export declare class NysRadiogroup extends LitElement {
21
22
  constructor();
22
23
  connectedCallback(): void;
23
24
  disconnectedCallback(): void;
24
- firstUpdated(): void;
25
+ firstUpdated(): Promise<void>;
25
26
  updated(changedProperties: Map<string | symbol, unknown>): void;
26
27
  formResetCallback(): void;
27
28
  /********************** Form Integration **********************/
28
29
  private _setValue;
29
- private setRadioButtonRequire;
30
+ private _setRadioButtonRequire;
30
31
  private _manageRequire;
32
+ checkValidity(): boolean;
31
33
  private _initializeCheckedRadioValue;
34
+ /********************** Core Keyboard & Click Logic **********************/
35
+ private _getAllRadios;
36
+ private _handleKeyDown;
37
+ private _updateGroupTabIndex;
32
38
  /********************** Functions **********************/
39
+ private _initializeChildAttributes;
33
40
  private _updateRadioButtonsSize;
34
41
  private _updateRadioButtonsTile;
35
42
  private _updateRadioButtonsShowError;
43
+ private _getSlotDescriptionForAria;
44
+ /******************** Event Handlers ********************/
36
45
  private _handleRadioButtonChange;
37
46
  private _handleInvalid;
38
47
  render(): import("lit-html").TemplateResult<1>;
@@ -30,6 +30,7 @@ export declare class NysTextinput extends LitElement {
30
30
  private _originalErrorMessage;
31
31
  private _hasUserInteracted;
32
32
  private _internals;
33
+ private _maskPatterns;
33
34
  /********************** Lifecycle updates **********************/
34
35
  static formAssociated: boolean;
35
36
  constructor();
@@ -46,6 +47,8 @@ export declare class NysTextinput extends LitElement {
46
47
  checkValidity(): boolean;
47
48
  private _handleInvalid;
48
49
  private _togglePasswordVisibility;
50
+ private _updateOverlay;
51
+ private _applyMask;
49
52
  /******************** Event Handlers ********************/
50
53
  private _handleInput;
51
54
  private _handleFocus;
@@ -1,7 +1,9 @@
1
+ export * from "../packages/nys-accordion/src/index";
1
2
  export * from "../packages/nys-alert/src/index";
2
3
  export * from "../packages/nys-avatar/src/index";
3
4
  export * from "../packages/nys-backtotop/src/index";
4
5
  export * from "../packages/nys-button/src/index";
6
+ export * from "../packages/nys-badge/src/index";
5
7
  export * from "../packages/nys-checkbox/src/index";
6
8
  export * from "../packages/nys-errormessage/src/index";
7
9
  export * from "../packages/nys-fileinput/src/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.5.3",
3
+ "version": "1.7.0",
4
4
  "description": "New York State's design system and code component library.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -26,12 +26,13 @@
26
26
  "build:umd": "tsc --emitDeclarationOnly && vite build --config vite.config.umd.js",
27
27
  "build:packages": "npm run lint:packages && node src/scripts/build-order.js",
28
28
  "build:all": "npm run clean:dist && npm run build:packages && npm run build && npm run build:umd",
29
+ "build:link": "npm run build:all && npm link",
29
30
  "lint": "eslint src/",
30
31
  "lint:packages": "eslint packages/**/*.{ts,js}",
31
32
  "lint:fix": "eslint src/ --fix",
32
33
  "lint:fix:packages": "eslint packages/**/*.{ts,js} --fix",
33
- "release:dry-run": "npm run build:all && node src/scripts/publish-dry-run.js",
34
- "release": "npm run build:all && npm publish --workspaces --access public && npm publish --access public",
34
+ "release:dry-run": "NODE_ENV=production npm run build:all && NODE_ENV=production npm run test && node src/scripts/publish-dry-run.js",
35
+ "release": "NODE_ENV=production npm run build:all && npm run test && npm publish --workspaces --access public && npm publish --access public",
35
36
  "release:alpha": "npm run build && npm run build:umd && npm publish --tag next",
36
37
  "test": "wtr --node-resolve",
37
38
  "test:build": "npm run build:all && wtr --node-resolve",
@@ -41,7 +42,9 @@
41
42
  "storybook:cibuild": "storybook build",
42
43
  "clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules",
43
44
  "clean:dist": "rm -rf dist && rm -rf packages/*/dist",
44
- "clean:all": "npm run clean:dist && npm run clean:node"
45
+ "clean:all": "npm run clean:dist && npm run clean:node",
46
+ "code-connect": "dotenv -- npx figma connect publish"
47
+
45
48
  },
46
49
  "repository": {
47
50
  "type": "git",
@@ -58,12 +61,12 @@
58
61
  "@floating-ui/dom": "^1.7.1"
59
62
  },
60
63
  "devDependencies": {
61
- "@chromatic-com/storybook": "^4.0.1",
64
+ "@chromatic-com/storybook": "^4.1.0",
62
65
  "@open-wc/testing": "^3.2.2",
63
- "@storybook/addon-a11y": "^9.0.16",
64
- "@storybook/addon-docs": "^9.0.16",
65
- "@storybook/addon-links": "^9.0.16",
66
- "@storybook/web-components-vite": "^9.0.16",
66
+ "@storybook/addon-a11y": "9.1.1",
67
+ "@storybook/addon-docs": "9.1.1",
68
+ "@storybook/addon-links": "9.1.1",
69
+ "@storybook/web-components-vite": "9.1.1",
67
70
  "@types/mocha": "^10.0.9",
68
71
  "@typescript-eslint/eslint-plugin": "^8.5.0",
69
72
  "@typescript-eslint/parser": "^8.5.0",
@@ -71,17 +74,18 @@
71
74
  "@web/test-runner": "^0.19.0",
72
75
  "@web/test-runner-commands": "^0.9.0",
73
76
  "@web/test-runner-playwright": "^0.11.0",
77
+ "dotenv-cli": "^10.0.0",
74
78
  "eslint": "^9.10.0",
75
79
  "eslint-plugin-lit": "^1.15.0",
76
80
  "eslint-plugin-prettier": "^5.2.1",
77
- "eslint-plugin-storybook": "^9.0.16",
81
+ "eslint-plugin-storybook": "9.1.1",
78
82
  "i": "^0.3.7",
79
83
  "lit": "^3.2.1",
80
84
  "npm": "^10.9.0",
81
85
  "plop": "^4.0.1",
82
86
  "rollup-plugin-visualizer": "^5.14.0",
83
87
  "sinon": "^19.0.2",
84
- "storybook": "^9.0.16",
88
+ "storybook": "9.1.1",
85
89
  "tslib": "^2.7.0",
86
90
  "typescript": "^5.7.2",
87
91
  "vite": "^6.3.4"