@nysds/components 1.21.1 → 1.22.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.
- package/custom-elements.json +1524 -1022
- package/dist/.vscode/vscode.css-custom-data.json +75 -0
- package/dist/.vscode/vscode.html-custom-data.json +99 -54
- package/dist/custom-elements.json +1524 -1022
- package/dist/{nys-icon.library-C02yNW9R.js → nys-icon.library-BZ3jVyhP.js} +2 -2
- package/dist/{nys-icon.library-C02yNW9R.js.map → nys-icon.library-BZ3jVyhP.js.map} +1 -1
- package/dist/{nys-icon.library-BxwfG3ym-D4Dl8jc_.js → nys-icon.library-DYsQ8Tiv-DYS-TkV2.js} +3 -3
- package/dist/{nys-icon.library-BxwfG3ym-D4Dl8jc_.js.map → nys-icon.library-DYsQ8Tiv-DYS-TkV2.js.map} +1 -1
- package/dist/nysds.es.js +5059 -3637
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +248 -244
- package/dist/nysds.js.map +1 -1
- package/dist/packages/codegen/src/index.d.ts +16 -0
- package/dist/packages/codegen/src/manifest/components.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/filters.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/form-control.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/load.d.ts +10 -0
- package/dist/packages/codegen/src/manifest/naming.d.ts +6 -0
- package/dist/packages/codegen/src/manifest/packages.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/types.d.ts +6 -0
- package/dist/packages/codegen/src/transform/index.d.ts +19 -0
- package/dist/packages/codegen/src/transform/parse.d.ts +18 -0
- package/dist/packages/codegen/src/transform/shared.d.ts +61 -0
- package/dist/packages/codegen/src/transform/to-angular.d.ts +6 -0
- package/dist/packages/codegen/src/transform/to-jsx.d.ts +6 -0
- package/dist/packages/internals/src/form-control-mixin.d.ts +16 -0
- package/dist/packages/internals/src/form-events.d.ts +22 -0
- package/dist/packages/internals/src/index.d.ts +2 -1
- package/dist/packages/internals/src/types.d.ts +6 -0
- package/dist/packages/mcp-server/src/lib/cem-parser.d.ts +12 -0
- package/dist/packages/mcp-server/src/lib/framework-snippets.d.ts +35 -0
- package/dist/packages/mcp-server/src/lib/framework-usage.d.ts +19 -0
- package/dist/packages/mcp-server/src/lib/frameworks-data.d.ts +18 -0
- package/dist/packages/mcp-server/src/resources/frameworks.d.ts +14 -0
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +12 -0
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +9 -1
- package/dist/packages/nys-alert/src/nys-alert.d.ts +39 -1
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +16 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +12 -0
- package/dist/packages/nys-badge/src/nys-badge.d.ts +18 -0
- package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +22 -1
- package/dist/packages/nys-button/src/nys-button.d.ts +35 -4
- package/dist/packages/nys-card/src/nys-card.d.ts +20 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +77 -7
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +46 -0
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +51 -6
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +44 -2
- package/dist/packages/nys-divider/src/nys-divider.d.ts +9 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +17 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +10 -0
- package/dist/packages/nys-fileinput/src/index.d.ts +1 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +42 -6
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +9 -1
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +17 -0
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +18 -0
- package/dist/packages/nys-icon/src/nys-icon.d.ts +18 -0
- package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +16 -0
- package/dist/packages/nys-label/src/nys-label.d.ts +3 -1
- package/dist/packages/nys-modal/src/nys-modal.d.ts +26 -2
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -2
- package/dist/packages/nys-processlist/src/nys-processlist.d.ts +16 -0
- package/dist/packages/nys-processlist/src/nys-processlistitem.d.ts +1 -1
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +29 -5
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +66 -4
- package/dist/packages/nys-select/src/nys-select.d.ts +22 -4
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +8 -0
- package/dist/packages/nys-stepper/src/nys-step.d.ts +8 -1
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +8 -0
- package/dist/packages/nys-tab/src/nys-tab.d.ts +22 -3
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +12 -0
- package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +2 -0
- package/dist/packages/nys-table/src/nys-table.d.ts +39 -2
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +47 -4
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +42 -4
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +37 -3
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +13 -0
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +13 -0
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +26 -4
- package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +14 -0
- package/dist/packages/nys-verticalnav/src/nys-verticalnavgroup.d.ts +11 -0
- package/dist/packages/nys-video/src/nys-video.d.ts +14 -1
- package/package.json +30 -25
- package/packages/react/.turbo/turbo-build.log +0 -59
- package/packages/react/NysAccordion.d.ts +0 -75
- package/packages/react/NysAccordion.js +0 -24
- package/packages/react/NysAccordionItem.d.ts +0 -82
- package/packages/react/NysAccordionItem.js +0 -43
- package/packages/react/NysAlert.d.ts +0 -102
- package/packages/react/NysAlert.js +0 -61
- package/packages/react/NysAvatar.d.ts +0 -88
- package/packages/react/NysAvatar.js +0 -40
- package/packages/react/NysBacktotop.d.ts +0 -57
- package/packages/react/NysBacktotop.js +0 -23
- package/packages/react/NysBadge.d.ts +0 -78
- package/packages/react/NysBadge.js +0 -42
- package/packages/react/NysBreadcrumbItem.d.ts +0 -72
- package/packages/react/NysBreadcrumbItem.js +0 -42
- package/packages/react/NysBreadcrumbs.d.ts +0 -89
- package/packages/react/NysBreadcrumbs.js +0 -50
- package/packages/react/NysButton.d.ts +0 -171
- package/packages/react/NysButton.js +0 -83
- package/packages/react/NysCard.d.ts +0 -121
- package/packages/react/NysCard.js +0 -63
- package/packages/react/NysCheckbox.d.ts +0 -145
- package/packages/react/NysCheckbox.js +0 -78
- package/packages/react/NysCheckboxgroup.d.ts +0 -88
- package/packages/react/NysCheckboxgroup.js +0 -46
- package/packages/react/NysCombobox.d.ts +0 -126
- package/packages/react/NysCombobox.js +0 -66
- package/packages/react/NysDatepicker.d.ts +0 -128
- package/packages/react/NysDatepicker.js +0 -76
- package/packages/react/NysDivider.d.ts +0 -54
- package/packages/react/NysDivider.js +0 -22
- package/packages/react/NysDropdownMenu.d.ts +0 -59
- package/packages/react/NysDropdownMenu.js +0 -23
- package/packages/react/NysDropdownMenuItem.d.ts +0 -75
- package/packages/react/NysDropdownMenuItem.js +0 -47
- package/packages/react/NysErrorMessage.d.ts +0 -60
- package/packages/react/NysErrorMessage.js +0 -24
- package/packages/react/NysFileItem.d.ts +0 -69
- package/packages/react/NysFileItem.js +0 -37
- package/packages/react/NysFileinput.d.ts +0 -130
- package/packages/react/NysFileinput.js +0 -74
- package/packages/react/NysGlobalFooter.d.ts +0 -77
- package/packages/react/NysGlobalFooter.js +0 -32
- package/packages/react/NysGlobalHeader.d.ts +0 -82
- package/packages/react/NysGlobalHeader.js +0 -32
- package/packages/react/NysIcon.d.ts +0 -75
- package/packages/react/NysIcon.js +0 -50
- package/packages/react/NysIconlist.d.ts +0 -57
- package/packages/react/NysIconlist.js +0 -23
- package/packages/react/NysIconlistitem.d.ts +0 -63
- package/packages/react/NysIconlistitem.js +0 -23
- package/packages/react/NysLabel.d.ts +0 -81
- package/packages/react/NysLabel.js +0 -40
- package/packages/react/NysModal.d.ts +0 -90
- package/packages/react/NysModal.js +0 -50
- package/packages/react/NysOption.d.ts +0 -66
- package/packages/react/NysOption.js +0 -25
- package/packages/react/NysPagination.d.ts +0 -72
- package/packages/react/NysPagination.js +0 -45
- package/packages/react/NysProcesslist.d.ts +0 -65
- package/packages/react/NysProcesslist.js +0 -25
- package/packages/react/NysProcesslistitem.d.ts +0 -61
- package/packages/react/NysProcesslistitem.js +0 -35
- package/packages/react/NysRadiobutton.d.ts +0 -132
- package/packages/react/NysRadiobutton.js +0 -72
- package/packages/react/NysRadiogroup.d.ts +0 -104
- package/packages/react/NysRadiogroup.js +0 -62
- package/packages/react/NysSelect.d.ts +0 -119
- package/packages/react/NysSelect.js +0 -67
- package/packages/react/NysSkipnav.d.ts +0 -54
- package/packages/react/NysSkipnav.js +0 -22
- package/packages/react/NysStep.d.ts +0 -73
- package/packages/react/NysStep.js +0 -40
- package/packages/react/NysStepper.d.ts +0 -67
- package/packages/react/NysStepper.js +0 -26
- package/packages/react/NysTab.d.ts +0 -90
- package/packages/react/NysTab.js +0 -39
- package/packages/react/NysTabgroup.d.ts +0 -76
- package/packages/react/NysTabgroup.js +0 -22
- package/packages/react/NysTable.d.ts +0 -80
- package/packages/react/NysTable.js +0 -41
- package/packages/react/NysTabpanel.d.ts +0 -70
- package/packages/react/NysTabpanel.js +0 -21
- package/packages/react/NysTextarea.d.ts +0 -141
- package/packages/react/NysTextarea.js +0 -79
- package/packages/react/NysTextinput.d.ts +0 -144
- package/packages/react/NysTextinput.js +0 -83
- package/packages/react/NysToggle.d.ts +0 -102
- package/packages/react/NysToggle.js +0 -59
- package/packages/react/NysTooltip.d.ts +0 -60
- package/packages/react/NysTooltip.js +0 -24
- package/packages/react/NysUnavFooter.d.ts +0 -61
- package/packages/react/NysUnavFooter.js +0 -21
- package/packages/react/NysUnavHeader.d.ts +0 -95
- package/packages/react/NysUnavHeader.js +0 -54
- package/packages/react/NysVerticalnav.d.ts +0 -67
- package/packages/react/NysVerticalnav.js +0 -26
- package/packages/react/NysVerticalnavGroup.d.ts +0 -76
- package/packages/react/NysVerticalnavGroup.js +0 -43
- package/packages/react/NysVideo.d.ts +0 -83
- package/packages/react/NysVideo.js +0 -53
- package/packages/react/README.md +0 -92
- package/packages/react/index.d.ts +0 -49
- package/packages/react/index.js +0 -49
- package/packages/react/nysds-jsx.d.ts +0 -2009
- package/packages/react/react-utils.js +0 -40
|
@@ -1,22 +1,43 @@
|
|
|
1
1
|
import { NysElement } from "@nysds/internals";
|
|
2
2
|
import "@nysds/nys-icon";
|
|
3
3
|
import "@nysds/nys-button";
|
|
4
|
+
/** Detail payload for the `nys-column-sort` event fired by `nys-table`. */
|
|
5
|
+
export interface NysTableColumnSortDetail {
|
|
6
|
+
columnIndex: number;
|
|
7
|
+
columnLabel: string;
|
|
8
|
+
sortDirection: "asc" | "desc" | "none";
|
|
9
|
+
}
|
|
10
|
+
/** The `nys-column-sort` event fired by `nys-table`. */
|
|
11
|
+
export type NysTableColumnSortEvent = CustomEvent<NysTableColumnSortDetail>;
|
|
4
12
|
/**
|
|
5
13
|
* `<nys-table>` is a responsive table component that can display native HTML tables,
|
|
6
14
|
* supports striped and bordered styling, sortable columns, and CSV download.
|
|
7
15
|
*
|
|
16
|
+
* @element nys-table
|
|
17
|
+
*
|
|
18
|
+
* @cssprop [--nys-table-padding--cell--y] - Vertical padding for table cells
|
|
19
|
+
*
|
|
8
20
|
* @slot - Accepts a `<table>` element. Only the first table is used. The table
|
|
9
21
|
* is enhanced in place and stays in the light DOM (projected through a slot,
|
|
10
22
|
* never cloned), so embedded components remain interactive and reachable by
|
|
11
23
|
* consumer CSS/JS. Its cell styling is applied from `nys-table.light.scss`,
|
|
12
24
|
* adopted once onto `document.adoptedStyleSheets`.
|
|
13
25
|
*
|
|
14
|
-
* @fires nys-click - Fired when the download button or sortable headers are clicked.
|
|
15
|
-
* @fires nys-column-sort - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior.
|
|
26
|
+
* @fires {Event} nys-click - Fired when the download button or sortable headers are clicked.
|
|
27
|
+
* @fires {NysTableColumnSortEvent} nys-column-sort - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior.
|
|
16
28
|
* Detail: { columnIndex: number, columnLabel: string, sortDirection: "asc" | "desc" | "none" }
|
|
17
29
|
*
|
|
18
30
|
* @method downloadFile - Triggers download of the CSV file if `download` is set.
|
|
19
31
|
*
|
|
32
|
+
* @usagedos
|
|
33
|
+
* - Use to display tabular data such as statistical information or directories of locations and resources with consistent structure.
|
|
34
|
+
*
|
|
35
|
+
* @usagedonts
|
|
36
|
+
* - Use in place of a layout grid. Table content should follow a consistent structure using headers and logical columns and rows.
|
|
37
|
+
* - Use for non-tabular content. Consider definition lists or hierarchical lists instead.
|
|
38
|
+
* - Use when cell content is long-form; table cells should be brief and scannable. If you need multiple bullet points or paragraphs in a cell, consider page headers or an accordion instead.
|
|
39
|
+
* - Add `rowspan` or `colspan` with the `sortable` property.
|
|
40
|
+
*
|
|
20
41
|
* @example Basic
|
|
21
42
|
* ```html
|
|
22
43
|
* <nys-table id="table1" name="table1">
|
|
@@ -87,6 +108,22 @@ import "@nysds/nys-button";
|
|
|
87
108
|
* </table>
|
|
88
109
|
* </nys-table>
|
|
89
110
|
* ```
|
|
111
|
+
*
|
|
112
|
+
* @example Sortable Numbers
|
|
113
|
+
* ```html
|
|
114
|
+
* <nys-table id="numb-sort-test" name="numb-sort-test" sortable>
|
|
115
|
+
* <table>
|
|
116
|
+
* <caption>Testing Sorting Number Logic</caption>
|
|
117
|
+
* <tr><th>Number</th><th>Word Form</th></tr>
|
|
118
|
+
* <tr><td>1</td><td>One</td></tr>
|
|
119
|
+
* <tr><td>100</td><td>One Hundred</td></tr>
|
|
120
|
+
* <tr><td>1,000</td><td>One Thousand</td></tr>
|
|
121
|
+
* <tr><td>11</td><td>Eleven</td></tr>
|
|
122
|
+
* <tr><td>40</td><td>Forty</td></tr>
|
|
123
|
+
* <tr><td>5</td><td>Five</td></tr>
|
|
124
|
+
* </table>
|
|
125
|
+
* </nys-table>
|
|
126
|
+
* ```
|
|
90
127
|
*/
|
|
91
128
|
export declare class NysTable extends NysElement {
|
|
92
129
|
static styles: import("lit").CSSResult;
|
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
import { NysFormControlElement } from "@nysds/internals";
|
|
2
2
|
import "@nysds/nys-label";
|
|
3
3
|
import "@nysds/nys-errormessage";
|
|
4
|
+
/** Detail payload for the `nys-input` event. */
|
|
5
|
+
export interface NysTextareaInputDetail {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
/** The `nys-input` event, fired on each keystroke. */
|
|
11
|
+
export type NysTextareaInputEvent = CustomEvent<NysTextareaInputDetail>;
|
|
12
|
+
/** Detail payload for the `nys-change` event. */
|
|
13
|
+
export interface NysTextareaChangeDetail {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
/** The `nys-change` event, fired when the value is committed. */
|
|
19
|
+
export type NysTextareaChangeEvent = CustomEvent<NysTextareaChangeDetail>;
|
|
20
|
+
/** Detail payload for the `nys-select` event. */
|
|
21
|
+
export interface NysTextareaSelectDetail {
|
|
22
|
+
id: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
/** The `nys-select` event, fired when the user selects text. */
|
|
26
|
+
export type NysTextareaSelectEvent = CustomEvent<NysTextareaSelectDetail>;
|
|
27
|
+
/** Detail payload for the `nys-selectionchange` event. */
|
|
28
|
+
export interface NysTextareaSelectionchangeDetail {
|
|
29
|
+
id: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}
|
|
32
|
+
/** The `nys-selectionchange` event, fired when the text selection changes. */
|
|
33
|
+
export type NysTextareaSelectionchangeEvent = CustomEvent<NysTextareaSelectionchangeDetail>;
|
|
4
34
|
/**
|
|
5
35
|
* A multi-line text input for collecting longer responses like comments, descriptions, or feedback.
|
|
6
36
|
* Form-associated with validation support via ElementInternals.
|
|
@@ -13,10 +43,21 @@ import "@nysds/nys-errormessage";
|
|
|
13
43
|
*
|
|
14
44
|
* @slot description - Custom HTML description content below the label.
|
|
15
45
|
*
|
|
16
|
-
* @
|
|
17
|
-
*
|
|
18
|
-
* @fires nys-
|
|
19
|
-
* @fires nys-
|
|
46
|
+
* @formControl value nys-change nys-input
|
|
47
|
+
*
|
|
48
|
+
* @fires {NysTextareaInputEvent} nys-input - Fired on each input. Detail: `{id, name, value}`.
|
|
49
|
+
* @fires {NysTextareaChangeEvent} nys-change - Fired when the value is committed (native `change`). Detail: `{id, name, value}`.
|
|
50
|
+
* @fires {Event} nys-focus - Fired when the textarea gains focus.
|
|
51
|
+
* @fires {Event} nys-blur - Fired when the textarea loses focus. Triggers validation.
|
|
52
|
+
* @fires {NysTextareaSelectEvent} nys-select - Fired when the user selects text. Detail: `{id, value}`.
|
|
53
|
+
* @fires {NysTextareaSelectionchangeEvent} nys-selectionchange - Fired when the text selection changes. Detail: `{id, value}`.
|
|
54
|
+
*
|
|
55
|
+
* @usagedos
|
|
56
|
+
* - Use to collect multiple lines of open-ended text input (e.g., comments, descriptions, feedback).
|
|
57
|
+
*
|
|
58
|
+
* @usagedonts
|
|
59
|
+
* - Use for short or single-line input. Use `<nys-textinput>` instead.
|
|
60
|
+
* - Use when input should be selected from predefined options. Use `<nys-select>`, `<nys-radiobutton>`, or `<nys-checkbox>` instead.
|
|
20
61
|
*
|
|
21
62
|
* @example Basic
|
|
22
63
|
* ```html
|
|
@@ -144,6 +185,7 @@ export declare class NysTextarea extends NysFormControlElement {
|
|
|
144
185
|
connectedCallback(): void;
|
|
145
186
|
disconnectedCallback(): void;
|
|
146
187
|
firstUpdated(): void;
|
|
188
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
147
189
|
updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
|
|
148
190
|
/**
|
|
149
191
|
* Form Integration
|
|
@@ -165,6 +207,7 @@ export declare class NysTextarea extends NysFormControlElement {
|
|
|
165
207
|
* --------------------------------------------------------------------------
|
|
166
208
|
*/
|
|
167
209
|
private _handleInput;
|
|
210
|
+
private _handleChange;
|
|
168
211
|
private _handleFocus;
|
|
169
212
|
private _handleBlur;
|
|
170
213
|
private _handleSelect;
|
|
@@ -3,6 +3,28 @@ import "@nysds/nys-label";
|
|
|
3
3
|
import "@nysds/nys-errormessage";
|
|
4
4
|
import "@nysds/nys-button";
|
|
5
5
|
import "@nysds/nys-icon";
|
|
6
|
+
/** Detail for the `nys-input` event. */
|
|
7
|
+
export interface NysTextinputInputDetail {
|
|
8
|
+
/** The component's `id`. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The component's `name`. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** The current value. */
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
/** Fired once per user input. */
|
|
16
|
+
export type NysTextinputInputEvent = CustomEvent<NysTextinputInputDetail>;
|
|
17
|
+
/** Detail for the `nys-change` event. */
|
|
18
|
+
export interface NysTextinputChangeDetail {
|
|
19
|
+
/** The component's `id`. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** The component's `name`. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** The committed value. */
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
/** Fired when the value is committed, on blur or Enter. */
|
|
27
|
+
export type NysTextinputChangeEvent = CustomEvent<NysTextinputChangeDetail>;
|
|
6
28
|
/**
|
|
7
29
|
* A text input for collecting short, single-line data. Supports validation, input masking (tel),
|
|
8
30
|
* password visibility toggle, and live error messaging. Form-associated via ElementInternals.
|
|
@@ -17,9 +39,24 @@ import "@nysds/nys-icon";
|
|
|
17
39
|
* @slot startButton - Button at input start. Use single `nys-button` only.
|
|
18
40
|
* @slot endButton - Button at input end. Use single `nys-button` only.
|
|
19
41
|
*
|
|
20
|
-
* @
|
|
21
|
-
*
|
|
22
|
-
* @fires nys-
|
|
42
|
+
* @formControl value nys-change nys-input
|
|
43
|
+
*
|
|
44
|
+
* @fires {NysTextinputInputEvent} nys-input - Fired once per user input. Detail: `{id, name, value}`.
|
|
45
|
+
* @fires {NysTextinputChangeEvent} nys-change - Fired when the value is committed, on blur or Enter. Detail: `{id, name, value}`.
|
|
46
|
+
* @fires {Event} nys-focus - Fired when the input gains focus.
|
|
47
|
+
* @fires {Event} nys-blur - Fired when the input loses focus. Triggers validation.
|
|
48
|
+
*
|
|
49
|
+
* @usagedos
|
|
50
|
+
* - Use to collect short, single-line, open-ended text input (e.g., names, email addresses, or short descriptions).
|
|
51
|
+
* - Use clear, concise labels that describe the expected input.
|
|
52
|
+
* - Add helper text with the `description` property for context.
|
|
53
|
+
* - Validate input live to catch errors early (e.g., invalid email formats).
|
|
54
|
+
*
|
|
55
|
+
* @usagedonts
|
|
56
|
+
* - Use for long or multi-line responses. Use `<nys-textarea>` instead.
|
|
57
|
+
* - Use when input can be chosen from predefined options. Use `<nys-select>`, `<nys-radiobutton>`, or `<nys-checkbox>` instead.
|
|
58
|
+
* - Overwhelm users with too many fields. Group related inputs.
|
|
59
|
+
* - Use placeholders as labels.
|
|
23
60
|
*
|
|
24
61
|
* @example Basic
|
|
25
62
|
* ```html
|
|
@@ -166,7 +203,6 @@ export declare class NysTextinput extends NysFormControlElement {
|
|
|
166
203
|
errorMessage: string;
|
|
167
204
|
private _inputEl;
|
|
168
205
|
private showPassword;
|
|
169
|
-
private _originalErrorMessage;
|
|
170
206
|
private _hasUserInteracted;
|
|
171
207
|
private _maskPatterns;
|
|
172
208
|
/**
|
|
@@ -203,6 +239,8 @@ export declare class NysTextinput extends NysFormControlElement {
|
|
|
203
239
|
* --------------------------------------------------------------------------
|
|
204
240
|
*/
|
|
205
241
|
private _handleInput;
|
|
242
|
+
private _emitInput;
|
|
243
|
+
private _handleChange;
|
|
206
244
|
private _handleFocus;
|
|
207
245
|
private _handleBlur;
|
|
208
246
|
private _validateButtonSlot;
|
|
@@ -1,20 +1,54 @@
|
|
|
1
1
|
import { NysFormControlElement } from "@nysds/internals";
|
|
2
2
|
import "@nysds/nys-label";
|
|
3
3
|
import "@nysds/nys-icon";
|
|
4
|
+
/** Detail for the `nys-change` event. */
|
|
5
|
+
export interface NysToggleChangeDetail {
|
|
6
|
+
/** The component's `id`. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** The component's `name`. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Whether the toggle is on. */
|
|
11
|
+
checked: boolean;
|
|
12
|
+
/** The component's `value` (submitted when the toggle is on). */
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
/** Fired when the user toggles the switch. */
|
|
16
|
+
export type NysToggleChangeEvent = CustomEvent<NysToggleChangeDetail>;
|
|
4
17
|
/**
|
|
5
18
|
* A toggle switch for binary settings with immediate effect. Form-associated via ElementInternals.
|
|
6
19
|
*
|
|
7
20
|
* Use when changing a setting takes effect immediately (e.g., dark mode, notifications).
|
|
8
21
|
* For binary choices in forms that submit later, use `nys-checkbox` instead.
|
|
9
22
|
*
|
|
23
|
+
* A toggle has no validation surface: it exposes no `required`, `showError`,
|
|
24
|
+
* or `errorMessage` and never reports invalid state. Framework adapters (for
|
|
25
|
+
* example an Angular ControlValueAccessor) must not try to sync errors to it.
|
|
26
|
+
*
|
|
27
|
+
* Setting `checked` programmatically updates the form value but does not fire
|
|
28
|
+
* `nys-change`; the event fires only on user interaction.
|
|
29
|
+
*
|
|
10
30
|
* @summary Toggle switch for binary settings with immediate effect.
|
|
11
31
|
* @element nys-toggle
|
|
12
32
|
*
|
|
33
|
+
* @formControl checked nys-change
|
|
34
|
+
*
|
|
13
35
|
* @slot description - Custom HTML description content.
|
|
14
36
|
*
|
|
15
|
-
* @fires nys-change
|
|
16
|
-
* @fires nys-focus
|
|
17
|
-
* @fires nys-blur
|
|
37
|
+
* @fires {NysToggleChangeEvent} nys-change Fired when the user toggles the switch. Detail: `{id, name, checked, value}`.
|
|
38
|
+
* @fires {Event} nys-focus Fired when toggle gains focus.
|
|
39
|
+
* @fires {Event} nys-blur Fired when toggle loses focus.
|
|
40
|
+
*
|
|
41
|
+
* @usagedos
|
|
42
|
+
* - Provide a clear label and optional description to explain what the toggle controls.
|
|
43
|
+
* - Ensure the page clearly reflects the toggle's on/off state through visible changes.
|
|
44
|
+
* - Use when the state change will be implemented immediately.
|
|
45
|
+
*
|
|
46
|
+
* @usagedonts
|
|
47
|
+
* - Use for forms where immediate action isn't expected. Use `<nys-checkbox>` instead.
|
|
48
|
+
* - Use for selecting one or more options from a list. Use `<nys-checkbox>` or `<nys-radiobutton>` instead.
|
|
49
|
+
* - Use for complex or multi-state choices.
|
|
50
|
+
* - Overuse for minor settings that don't affect the user experience.
|
|
51
|
+
* - Hide labels unless an accessible alternative is in place.
|
|
18
52
|
*
|
|
19
53
|
* @example Basic
|
|
20
54
|
* ```html
|
|
@@ -16,6 +16,19 @@ import { NysElement } from "@nysds/internals";
|
|
|
16
16
|
* @summary Contextual tooltip with auto-positioning, keyboard support, and screen reader integration.
|
|
17
17
|
* @element nys-tooltip
|
|
18
18
|
*
|
|
19
|
+
* @usagedos
|
|
20
|
+
* - Use to provide supplemental hints on form fields (e.g., explaining what "FEIN" means) or on icon buttons that need additional context.
|
|
21
|
+
* - Use on NYSDS form components (`<nys-textinput>`, `<nys-select>`, `<nys-checkbox>`, etc.) where the tooltip automatically renders as a hint icon next to the label.
|
|
22
|
+
* - Keep tooltip content brief and helpful.
|
|
23
|
+
* - Position tooltips so they don't block related content.
|
|
24
|
+
*
|
|
25
|
+
* @usagedonts
|
|
26
|
+
* - Use for information critical to task completion. Use inline description text instead, as tooltips are easy to miss.
|
|
27
|
+
* - Use when content is long or includes links, actions, or structured content.
|
|
28
|
+
* - Use interactive elements such as links or buttons inside a tooltip.
|
|
29
|
+
* - Rely on tooltips when you have room to provide inline explanation.
|
|
30
|
+
* - Use when mobile users are a primary audience. Tooltips rely on hover, which is unavailable on touch devices.
|
|
31
|
+
*
|
|
19
32
|
* @example Basic
|
|
20
33
|
* ```html
|
|
21
34
|
* <div style="display: flex; justify-content: center; gap: 5px; padding: 40px;">
|
|
@@ -17,6 +17,19 @@ import { NysElement } from "@nysds/internals";
|
|
|
17
17
|
* @summary Universal NYS footer with logo and statewide links. Required site-wide.
|
|
18
18
|
* @element nys-unavfooter
|
|
19
19
|
*
|
|
20
|
+
* @cssprop [--nys-max-width--content] - Overrides the inner content max width across the grid, header, footer, and breadcrumb. Set at a higher level like `:root` to apply to all instances. Takes priority over the size-specific variable.
|
|
21
|
+
*
|
|
22
|
+
* @usagedos
|
|
23
|
+
* - Place the `<nys-unavfooter>` as the last element on every public-facing page, immediately after `<nys-globalfooter>`.
|
|
24
|
+
* - Use on every page of every NYS site and application. This component is required per NYS web policy, including on error pages, login screens, and landing pages.
|
|
25
|
+
* - Place as the very last element on the page, immediately after `<nys-globalfooter>`.
|
|
26
|
+
* - Use as-is with no configuration. The component handles its own content and styling.
|
|
27
|
+
*
|
|
28
|
+
* @usagedonts
|
|
29
|
+
* - Don't use on back office applications or internal sites that are not public-facing.
|
|
30
|
+
* - Place anywhere other than the absolute bottom of the page.
|
|
31
|
+
* - Customize, restyle, or override the component's content or appearance. Consistency across all state sites is the purpose of this component.
|
|
32
|
+
*
|
|
20
33
|
* @example Basic
|
|
21
34
|
* ```html
|
|
22
35
|
* <nys-unavfooter></nys-unavfooter>
|
|
@@ -4,11 +4,23 @@ import "@nysds/nys-button";
|
|
|
4
4
|
import "@nysds/nys-icon";
|
|
5
5
|
import "@nysds/nys-textinput";
|
|
6
6
|
import "@nysds/nys-alert";
|
|
7
|
-
interface Language {
|
|
7
|
+
export interface Language {
|
|
8
8
|
code: string;
|
|
9
9
|
label: string;
|
|
10
10
|
url?: string;
|
|
11
11
|
}
|
|
12
|
+
/** Detail payload for the `nys-language-select` event fired by `nys-unavheader`. */
|
|
13
|
+
export interface NysUnavheaderLanguageSelectDetail {
|
|
14
|
+
language: Language;
|
|
15
|
+
}
|
|
16
|
+
/** The `nys-language-select` event fired by `nys-unavheader`. */
|
|
17
|
+
export type NysUnavheaderLanguageSelectEvent = CustomEvent<NysUnavheaderLanguageSelectDetail>;
|
|
18
|
+
/** Detail payload for the `nys-search-submit` event fired by `nys-unavheader`. */
|
|
19
|
+
export interface NysUnavheaderSearchSubmitDetail {
|
|
20
|
+
query: string;
|
|
21
|
+
}
|
|
22
|
+
/** The `nys-search-submit` event fired by `nys-unavheader`. */
|
|
23
|
+
export type NysUnavheaderSearchSubmitEvent = CustomEvent<NysUnavheaderSearchSubmitDetail>;
|
|
12
24
|
/**
|
|
13
25
|
* Statewide alert endpoint, read once per page load. Sites don't opt in or out and
|
|
14
26
|
* never author the content, so an alert reads identically everywhere it appears.
|
|
@@ -51,8 +63,19 @@ export declare const NYS_ALERT_URL = "https://alerts-cta.static-assets.ny.gov/al
|
|
|
51
63
|
* reaches every NYS site with no per-site work. If the endpoint is unreachable or nothing
|
|
52
64
|
* is published, the header renders normally. It takes no children.
|
|
53
65
|
*
|
|
54
|
-
* @
|
|
55
|
-
* @fires nys-
|
|
66
|
+
* @cssprop [--nys-max-width--content] - Overrides the inner content max width across the grid, header, footer, and breadcrumb. Set at a higher level like `:root` to apply to all instances. Takes priority over the size-specific variable.
|
|
67
|
+
* @fires {NysUnavheaderLanguageSelectEvent} nys-language-select - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect.
|
|
68
|
+
* @fires {NysUnavheaderSearchSubmitEvent} nys-search-submit - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
|
|
69
|
+
*
|
|
70
|
+
* @usagedos
|
|
71
|
+
* - Place at the top of every public-facing page.
|
|
72
|
+
* - Toggle search (`hideSearch`) and translate (`hideTranslate`) on/off depending on your needs.
|
|
73
|
+
* - Design your page so content below the header can shift down, since a statewide alert can appear at any time and adds height to the header.
|
|
74
|
+
*
|
|
75
|
+
* @usagedonts
|
|
76
|
+
* - Use on back office applications or internal sites that are not public-facing, instead use the `<nys-globalheader>` with the `nysLogo` property applied.
|
|
77
|
+
* - Place anywhere other than the top of the page.
|
|
78
|
+
* - Modify the universal header.
|
|
56
79
|
*
|
|
57
80
|
* @example Basic
|
|
58
81
|
* ```html
|
|
@@ -274,4 +297,3 @@ export declare class NysUnavHeader extends NysElement {
|
|
|
274
297
|
private get _landmarkLabel();
|
|
275
298
|
render(): import("lit-html").TemplateResult<1>;
|
|
276
299
|
}
|
|
277
|
-
export {};
|
|
@@ -15,6 +15,20 @@ type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
|
15
15
|
* @summary Responsive navigation that becomes an accordion on smaller screens.
|
|
16
16
|
* @element nys-verticalnav
|
|
17
17
|
*
|
|
18
|
+
* @usagedos
|
|
19
|
+
* - Use for navigation where every item links to a different page.
|
|
20
|
+
* - Use for section-level navigation within a site.
|
|
21
|
+
* - Support up to two levels of navigation: top-level links and one level of nested links.
|
|
22
|
+
* - Set `aria-current="page"` on the active link so the component can apply active styles and expand the current group.
|
|
23
|
+
* - Avoid excessive use of icons, colors, or badges in navigation items.
|
|
24
|
+
*
|
|
25
|
+
* @usagedonts
|
|
26
|
+
* - Use for in-page navigation, such as scrolling to sections on the same page.
|
|
27
|
+
* - Use for linear task flows, such as multi-step forms or wizards.
|
|
28
|
+
* - Use for filtering, tab switching, or other in-page interactions.
|
|
29
|
+
* - Nest more than one level of sub-items.
|
|
30
|
+
* - Overload with excessive use of icons, colors, or badges in navigation items.
|
|
31
|
+
*
|
|
18
32
|
* @example Basic
|
|
19
33
|
* ```html
|
|
20
34
|
* <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { NysElement } from "@nysds/internals";
|
|
2
2
|
import "@nysds/nys-icon";
|
|
3
|
+
/** Detail payload for the `nys-verticalnavgroup-toggle` event fired by `nys-verticalnavgroup`. */
|
|
4
|
+
export interface NysVerticalnavgroupToggleDetail {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** The `nys-verticalnavgroup-toggle` event fired by `nys-verticalnavgroup`. */
|
|
10
|
+
export type NysVerticalnavgroupToggleEvent = CustomEvent<NysVerticalnavgroupToggleDetail>;
|
|
3
11
|
/**
|
|
4
12
|
* Collapsible dropdown group for use inside `<nys-verticalnav>`.
|
|
5
13
|
*
|
|
@@ -11,6 +19,9 @@ import "@nysds/nys-icon";
|
|
|
11
19
|
*
|
|
12
20
|
* @summary Collapsible link group for use within `<nys-verticalnav>`.
|
|
13
21
|
* @element nys-verticalnavgroup
|
|
22
|
+
*
|
|
23
|
+
* @fires {Event} nys-child-resize - Fired when the group toggles so ancestor containers (for example nys-accordionitem) can resize. No detail. Bubbles and composed.
|
|
24
|
+
* @fires {NysVerticalnavgroupToggleEvent} nys-verticalnavgroup-toggle - Fired when the group is expanded or collapsed. Detail: `{id, label, expanded}`. Bubbles and composed.
|
|
14
25
|
* */
|
|
15
26
|
export declare class NysVerticalnavGroup extends NysElement {
|
|
16
27
|
static styles: import("lit").CSSResult;
|
|
@@ -24,7 +24,20 @@ declare global {
|
|
|
24
24
|
* @summary YouTube video player with thumbnail preview and accessibility announcements.
|
|
25
25
|
* @element nys-video
|
|
26
26
|
*
|
|
27
|
-
* @fires nys-video-play - Fired when the user clicks the thumbnail to load the player.
|
|
27
|
+
* @fires {Event} nys-video-play - Fired when the user clicks the thumbnail to load the player.
|
|
28
|
+
*
|
|
29
|
+
* @usagedos
|
|
30
|
+
* - Use when motion or audio communicates something better than text or images alone.
|
|
31
|
+
* - Keep `titleText` to 50–60 characters.
|
|
32
|
+
* - Use a clear, high-quality thumbnail so users recognize it as a video.
|
|
33
|
+
* - Maintain the default `lazy` loading for better page performance.
|
|
34
|
+
* - Reserve space for the 16:9 ratio box to prevent layout shift.
|
|
35
|
+
* - Let users choose to start the video; avoid `autoplay` unless necessary.
|
|
36
|
+
*
|
|
37
|
+
* @usagedonts
|
|
38
|
+
* - Use video if the same message can be delivered clearly with text or a static image.
|
|
39
|
+
* - Rely on video alone to convey critical information. Always provide a text alternative.
|
|
40
|
+
* - Set `autoplay` without understanding that the video will be muted. `nys-video` enforces this automatically to protect users from unexpected noise.
|
|
28
41
|
*
|
|
29
42
|
* @example Basic
|
|
30
43
|
* ```html
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "New York State's design system and code component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
7
|
-
"packages/*"
|
|
7
|
+
"packages/*",
|
|
8
|
+
"framework-examples/*"
|
|
8
9
|
],
|
|
9
10
|
"files": [
|
|
10
11
|
"dist/",
|
|
11
|
-
"custom-elements.json"
|
|
12
|
-
"packages/react/"
|
|
12
|
+
"custom-elements.json"
|
|
13
13
|
],
|
|
14
14
|
"main": "dist/nysds.js",
|
|
15
15
|
"module": "dist/nysds.es.js",
|
|
@@ -20,53 +20,54 @@
|
|
|
20
20
|
"import": "./dist/nysds.es.js",
|
|
21
21
|
"require": "./dist/nysds.js"
|
|
22
22
|
},
|
|
23
|
-
"./
|
|
24
|
-
"import": "./packages/react/index.js",
|
|
25
|
-
"types": "./packages/react/index.d.ts"
|
|
26
|
-
}
|
|
23
|
+
"./custom-elements.json": "./dist/custom-elements.json"
|
|
27
24
|
},
|
|
28
25
|
"customElements": "custom-elements.json",
|
|
29
26
|
"scripts": {
|
|
30
27
|
"dev": "vite",
|
|
31
28
|
"gen": "plop",
|
|
32
|
-
"gen-stories": "
|
|
33
|
-
"gen-stories:component": "
|
|
29
|
+
"gen-stories": "node src/scripts/generate-stories.mjs",
|
|
30
|
+
"gen-stories:component": "sh -c 'node src/scripts/generate-stories.mjs \"$@\" && npm run lint:fix' --",
|
|
34
31
|
"build": "tsc --emitDeclarationOnly && vite build",
|
|
35
32
|
"build:umd": "cross-env BUILD_FORMAT=umd vite build",
|
|
36
33
|
"tsc:packages": "tsc -b tsconfig.build.json",
|
|
37
|
-
"build:packages": "npm run tsc:packages && turbo run build --filter='./packages/*' --log-order=grouped",
|
|
34
|
+
"build:packages": "npm run tsc:packages && turbo run build --filter='./packages/*' --filter='!@nysds/codegen' --filter='!@nysds/react' --filter='!@nysds/angular' --filter='!@nysds/vue' --log-order=grouped",
|
|
38
35
|
"build:root": "cross-env NODE_ENV=production npm run build && cross-env NODE_ENV=production npm run build:umd",
|
|
39
|
-
"build:all": "npm run clean:dist && npm run lit-analyze || true && cross-env NODE_ENV=production npm run build:packages && npm run build:root && npm run cem && npm run gen-stories && npm run build:mcp && npm run lint:fix",
|
|
40
|
-
"build:
|
|
36
|
+
"build:all": "npm run clean:dist && npm run lit-analyze || true && cross-env NODE_ENV=production npm run build:packages && npm run build:root && npm run cem && npm run build:frameworks && npm run gen-stories && npm run build:mcp && npm run lint:fix",
|
|
37
|
+
"build:frameworks": "cross-env NODE_ENV=production turbo run build --filter=@nysds/codegen --filter=@nysds/react --filter=@nysds/angular --filter=@nysds/vue --only",
|
|
38
|
+
"build:examples": "npm run build -w framework-examples/react-vite -w framework-examples/vue-vite -w framework-examples/next-app -w framework-examples/angular-app -w framework-examples/angular-ngmodule",
|
|
39
|
+
"build:mcp": "cross-env NODE_ENV=production npm run build -w @nysds/mcp-server",
|
|
41
40
|
"build:link": "npm run build:all && npm link && cd packages/styles && npm link",
|
|
42
41
|
"lint": "eslint --cache --cache-strategy=content --cache-location node_modules/.cache/eslint && (stylelint \"**/*.scss\" || true)",
|
|
43
42
|
"lint:fix": "bash src/scripts/lint-fix.sh",
|
|
44
43
|
"lit-analyze": "find ./packages/nys-*/ -name '*.ts' ! -name '*.figma.*' | xargs lit-analyzer {}",
|
|
45
|
-
"playwright:install": "
|
|
44
|
+
"playwright:install": "node node_modules/playwright/cli.js install --with-deps",
|
|
46
45
|
"release": "cross-env NODE_ENV=production npm run build:all && cross-env NODE_ENV=production npm run test && npm run cem && cross-env NODE_ENV=production npm publish --workspaces --access public && cross-env NODE_ENV=production npm publish --access public",
|
|
47
46
|
"release:dry-run": "cross-env NODE_ENV=production npm run build:all && cross-env NODE_ENV=production npm run test && npm run cem && node src/scripts/publish-dry-run.js",
|
|
48
47
|
"release:alpha": "npm run build && npm run build:umd && npm publish --tag next",
|
|
49
48
|
"release:zip": "npm run build:all && node src/scripts/create-release-zip.js",
|
|
50
|
-
"pretest": "
|
|
49
|
+
"pretest": "node node_modules/playwright/cli.js install",
|
|
51
50
|
"test": "wtr --node-resolve || true",
|
|
52
51
|
"test:ssr": "node src/scripts/test-ssr.mjs && npm run audit:dist",
|
|
53
52
|
"audit:dist": "node src/scripts/audit-dist.mjs",
|
|
54
|
-
"test:build": "npm run build:all && npm run test",
|
|
53
|
+
"test:build": "npm run build:all && npm run test && npm run build:examples && npm run test:examples",
|
|
54
|
+
"test:examples": "npm run test -w framework-examples/react-vite -w framework-examples/vue-vite -w framework-examples/next-app -w framework-examples/angular-app -w framework-examples/angular-ngmodule && npm run test:zoneless -w framework-examples/angular-app",
|
|
55
55
|
"test:report": "wtr --node-resolve || true && open coverage/lcov-report/index.html",
|
|
56
56
|
"test:compact": "export NYSDS_TEST_OUTPUT=compact && wtr --node-resolve",
|
|
57
57
|
"test:ai": "export NYSDS_TEST_OUTPUT=ai && wtr --node-resolve",
|
|
58
|
+
"test:all": "npm run test && npm run test:examples",
|
|
58
59
|
"storybook": "cross-env NODE_ENV=production storybook dev -p 6006",
|
|
59
60
|
"storybook:build:all": "cross-env NODE_ENV=production npm run build:all && npm run storybook",
|
|
60
61
|
"build-storybook": "npm run build:packages && storybook build",
|
|
61
62
|
"storybook:cibuild": "storybook build",
|
|
62
|
-
"mcp-server:build": "turbo run build --filter=@nysds/mcp-server",
|
|
63
|
+
"mcp-server:build": "cross-env NODE_ENV=production turbo run build --filter=@nysds/mcp-server",
|
|
63
64
|
"clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules && rm -rf packages/**/*/node_modules",
|
|
64
|
-
"clean:dist": "rm -rf storybook-static && rm -rf coverage && rm -rf packages/*/coverage && rm -rf dist && find packages -type d -name dist ! -path '*/mcp-server/dist' -exec rm -rf {} + 2>/dev/null && find packages -name '*.tsbuildinfo' ! -path '*/mcp-server/*' -delete 2>/dev/null && rm -f ./*.tsbuildinfo 2>/dev/null || true",
|
|
65
|
+
"clean:dist": "rm -rf packages/angular/.ngbuild && rm -rf storybook-static && rm -rf coverage && rm -rf packages/*/coverage && rm -rf dist && find packages -type d -name dist ! -path '*/mcp-server/dist' -exec rm -rf {} + 2>/dev/null && find packages -name '*.tsbuildinfo' ! -path '*/mcp-server/*' -delete 2>/dev/null && rm -f ./*.tsbuildinfo 2>/dev/null || true && rm -rf release && rm NYSDS-*.zip 2>/dev/null || true",
|
|
65
66
|
"clean:turbo": "find packages -type d -name '.turbo' -exec rm -rf {} + && rm -rf .turbo",
|
|
66
67
|
"clean:cache": "rm -rf node_modules/.cache",
|
|
67
68
|
"clean:all": "npm run clean:dist && npm run clean:node && npm run clean:cache && find packages -name '*.tsbuildinfo' -delete 2>/dev/null || true && npm run clean:turbo",
|
|
68
69
|
"code-connect": "dotenv -- npx figma connect publish",
|
|
69
|
-
"cem": "npx cem analyze --config src/scripts/custom-elements-manifest.config.mjs && cp ./custom-elements.json dist/
|
|
70
|
+
"cem": "npx cem analyze --config src/scripts/custom-elements-manifest.config.mjs && node src/scripts/verify-form-contract.mjs && mkdir -p dist && cp ./custom-elements.json dist/",
|
|
70
71
|
"verify:a11y-names": "node src/scripts/verify-a11y-names.mjs",
|
|
71
72
|
"verify:utility-docs": "npm run build:mcp && node src/scripts/verify-utility-docs.mjs"
|
|
72
73
|
},
|
|
@@ -80,12 +81,13 @@
|
|
|
80
81
|
"url": "https://github.com/ITS-HCD/nysds/issues"
|
|
81
82
|
},
|
|
82
83
|
"homepage": "https://designsystem.ny.gov/",
|
|
83
|
-
"packageManager": "npm@
|
|
84
|
+
"packageManager": "npm@12.1.0",
|
|
84
85
|
"devDependencies": {
|
|
85
86
|
"@chromatic-com/storybook": "^5.1.2",
|
|
86
87
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
87
88
|
"@figma/code-connect": "^1.4.0",
|
|
88
89
|
"@floating-ui/dom": "^1.7.4",
|
|
90
|
+
"@nysds/cem-plugin-examples": "^1.1.0",
|
|
89
91
|
"@open-wc/testing": "^4.0.0",
|
|
90
92
|
"@storybook/addon-a11y": "10.3.5",
|
|
91
93
|
"@storybook/addon-docs": "10.3.5",
|
|
@@ -99,10 +101,7 @@
|
|
|
99
101
|
"@web/test-runner": "^1.0.0",
|
|
100
102
|
"@web/test-runner-commands": "^1.0.1",
|
|
101
103
|
"@web/test-runner-playwright": "^1.0.0",
|
|
102
|
-
"cem-plugin-examples": "github:its-hcd/cem-plugin-examples",
|
|
103
104
|
"cross-env": "^10.1.0",
|
|
104
|
-
"custom-element-jsx-integration": "^1.6.0",
|
|
105
|
-
"custom-element-react-wrappers": "^1.7.3",
|
|
106
105
|
"custom-element-vs-code-integration": "^1.5.0",
|
|
107
106
|
"dotenv-cli": "^10.0.0",
|
|
108
107
|
"eslint": "^10.0.0",
|
|
@@ -135,8 +134,7 @@
|
|
|
135
134
|
]
|
|
136
135
|
},
|
|
137
136
|
"overrides": {
|
|
138
|
-
"storybook": "$storybook"
|
|
139
|
-
"playwright": "1.61.0"
|
|
137
|
+
"storybook": "$storybook"
|
|
140
138
|
},
|
|
141
139
|
"dependencies": {
|
|
142
140
|
"dompurify": "^3.4.7",
|
|
@@ -145,5 +143,12 @@
|
|
|
145
143
|
"sideEffects": true,
|
|
146
144
|
"peerDependencies": {
|
|
147
145
|
"lit": "^3.3.1"
|
|
146
|
+
},
|
|
147
|
+
"allowScripts": {
|
|
148
|
+
"esbuild": true,
|
|
149
|
+
"@parcel/watcher": true,
|
|
150
|
+
"lmdb@3.4.2": true,
|
|
151
|
+
"msgpackr-extract@3.0.4": true,
|
|
152
|
+
"rs-module-lexer": true
|
|
148
153
|
}
|
|
149
154
|
}
|