@nysds/components 1.21.1-alpha-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.
Files changed (193) hide show
  1. package/custom-elements.json +1794 -1170
  2. package/dist/.vscode/vscode.css-custom-data.json +115 -0
  3. package/dist/.vscode/vscode.html-custom-data.json +116 -61
  4. package/dist/custom-elements.json +1791 -1119
  5. package/dist/{nys-icon.library-CwuPZJAc.js → nys-icon.library-BZ3jVyhP.js} +2 -2
  6. package/dist/{nys-icon.library-D_YvOGLH.js.map → nys-icon.library-BZ3jVyhP.js.map} +1 -1
  7. package/dist/{nys-icon.library-Bi_7DKlD-BEL9M8Q4.js → nys-icon.library-DYsQ8Tiv-DYS-TkV2.js} +12 -4
  8. package/dist/nys-icon.library-DYsQ8Tiv-DYS-TkV2.js.map +1 -0
  9. package/dist/nysds.es.js +5422 -4579
  10. package/dist/nysds.es.js.map +1 -1
  11. package/dist/nysds.js +479 -457
  12. package/dist/nysds.js.map +1 -1
  13. package/dist/packages/codegen/src/index.d.ts +16 -0
  14. package/dist/packages/codegen/src/manifest/components.d.ts +5 -0
  15. package/dist/packages/codegen/src/manifest/filters.d.ts +5 -0
  16. package/dist/packages/codegen/src/manifest/form-control.d.ts +5 -0
  17. package/dist/packages/codegen/src/manifest/load.d.ts +10 -0
  18. package/dist/packages/codegen/src/manifest/naming.d.ts +6 -0
  19. package/dist/packages/codegen/src/manifest/packages.d.ts +5 -0
  20. package/dist/packages/codegen/src/manifest/types.d.ts +6 -0
  21. package/dist/packages/codegen/src/transform/index.d.ts +19 -0
  22. package/dist/packages/codegen/src/transform/parse.d.ts +18 -0
  23. package/dist/packages/codegen/src/transform/shared.d.ts +61 -0
  24. package/dist/packages/codegen/src/transform/to-angular.d.ts +6 -0
  25. package/dist/packages/codegen/src/transform/to-jsx.d.ts +6 -0
  26. package/dist/packages/internals/src/form-control-mixin.d.ts +16 -0
  27. package/dist/packages/internals/src/form-events.d.ts +22 -0
  28. package/dist/packages/internals/src/index.d.ts +2 -1
  29. package/dist/packages/internals/src/types.d.ts +6 -0
  30. package/dist/packages/mcp-server/src/lib/cem-parser.d.ts +12 -0
  31. package/dist/packages/mcp-server/src/lib/framework-snippets.d.ts +35 -0
  32. package/dist/packages/mcp-server/src/lib/framework-usage.d.ts +19 -0
  33. package/dist/packages/mcp-server/src/lib/frameworks-data.d.ts +18 -0
  34. package/dist/packages/mcp-server/src/resources/frameworks.d.ts +14 -0
  35. package/dist/packages/nys-accordion/src/nys-accordion.d.ts +12 -0
  36. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +9 -1
  37. package/dist/packages/nys-alert/src/nys-alert.d.ts +39 -1
  38. package/dist/packages/nys-avatar/src/nys-avatar.d.ts +16 -0
  39. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +14 -2
  40. package/dist/packages/nys-badge/src/nys-badge.d.ts +18 -0
  41. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +29 -3
  42. package/dist/packages/nys-button/src/nys-button.d.ts +35 -4
  43. package/dist/packages/nys-card/src/nys-card.d.ts +72 -0
  44. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +77 -7
  45. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +46 -0
  46. package/dist/packages/nys-combobox/src/nys-combobox.d.ts +51 -6
  47. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +44 -2
  48. package/dist/packages/nys-divider/src/nys-divider.d.ts +9 -0
  49. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +17 -0
  50. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +10 -0
  51. package/dist/packages/nys-fileinput/src/index.d.ts +1 -0
  52. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +42 -6
  53. package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +9 -1
  54. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +18 -0
  55. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +36 -55
  56. package/dist/packages/nys-icon/src/nys-icon.d.ts +18 -0
  57. package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +38 -1
  58. package/dist/packages/nys-iconlist/src/nys-iconlistitem.d.ts +6 -0
  59. package/dist/packages/nys-label/src/nys-label.d.ts +3 -1
  60. package/dist/packages/nys-modal/src/nys-modal.d.ts +26 -2
  61. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -2
  62. package/dist/packages/nys-processlist/src/nys-processlist.d.ts +16 -0
  63. package/dist/packages/nys-processlist/src/nys-processlistitem.d.ts +1 -1
  64. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +29 -5
  65. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +66 -4
  66. package/dist/packages/nys-select/src/nys-select.d.ts +22 -4
  67. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +8 -0
  68. package/dist/packages/nys-stepper/src/nys-step.d.ts +8 -1
  69. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +8 -0
  70. package/dist/packages/nys-tab/src/nys-tab.d.ts +22 -3
  71. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +12 -0
  72. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +2 -0
  73. package/dist/packages/nys-table/src/nys-table.d.ts +39 -2
  74. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +47 -4
  75. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +42 -4
  76. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +37 -3
  77. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +13 -0
  78. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +13 -0
  79. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +28 -19
  80. package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +14 -0
  81. package/dist/packages/nys-verticalnav/src/nys-verticalnavgroup.d.ts +11 -0
  82. package/dist/packages/nys-video/src/nys-video.d.ts +14 -1
  83. package/package.json +32 -27
  84. package/dist/nys-icon.library-Bi_7DKlD-BEL9M8Q4.js.map +0 -1
  85. package/dist/nys-icon.library-Bi_7DKlD-YSs5zqZy.js +0 -698
  86. package/dist/nys-icon.library-Bi_7DKlD-YSs5zqZy.js.map +0 -1
  87. package/dist/nys-icon.library-CwuPZJAc.js.map +0 -1
  88. package/dist/nys-icon.library-D_YvOGLH.js +0 -696
  89. package/packages/react/NysAccordion.d.ts +0 -75
  90. package/packages/react/NysAccordion.js +0 -24
  91. package/packages/react/NysAccordionItem.d.ts +0 -82
  92. package/packages/react/NysAccordionItem.js +0 -43
  93. package/packages/react/NysAlert.d.ts +0 -102
  94. package/packages/react/NysAlert.js +0 -61
  95. package/packages/react/NysAvatar.d.ts +0 -88
  96. package/packages/react/NysAvatar.js +0 -40
  97. package/packages/react/NysBacktotop.d.ts +0 -57
  98. package/packages/react/NysBacktotop.js +0 -23
  99. package/packages/react/NysBadge.d.ts +0 -78
  100. package/packages/react/NysBadge.js +0 -42
  101. package/packages/react/NysBreadcrumbItem.d.ts +0 -72
  102. package/packages/react/NysBreadcrumbItem.js +0 -42
  103. package/packages/react/NysBreadcrumbs.d.ts +0 -89
  104. package/packages/react/NysBreadcrumbs.js +0 -50
  105. package/packages/react/NysButton.d.ts +0 -171
  106. package/packages/react/NysButton.js +0 -83
  107. package/packages/react/NysCard.d.ts +0 -110
  108. package/packages/react/NysCard.js +0 -61
  109. package/packages/react/NysCheckbox.d.ts +0 -145
  110. package/packages/react/NysCheckbox.js +0 -78
  111. package/packages/react/NysCheckboxgroup.d.ts +0 -88
  112. package/packages/react/NysCheckboxgroup.js +0 -46
  113. package/packages/react/NysCombobox.d.ts +0 -126
  114. package/packages/react/NysCombobox.js +0 -66
  115. package/packages/react/NysDatepicker.d.ts +0 -128
  116. package/packages/react/NysDatepicker.js +0 -76
  117. package/packages/react/NysDivider.d.ts +0 -54
  118. package/packages/react/NysDivider.js +0 -22
  119. package/packages/react/NysDropdownMenu.d.ts +0 -59
  120. package/packages/react/NysDropdownMenu.js +0 -23
  121. package/packages/react/NysDropdownMenuItem.d.ts +0 -75
  122. package/packages/react/NysDropdownMenuItem.js +0 -47
  123. package/packages/react/NysErrorMessage.d.ts +0 -60
  124. package/packages/react/NysErrorMessage.js +0 -24
  125. package/packages/react/NysFileItem.d.ts +0 -69
  126. package/packages/react/NysFileItem.js +0 -37
  127. package/packages/react/NysFileinput.d.ts +0 -130
  128. package/packages/react/NysFileinput.js +0 -74
  129. package/packages/react/NysGlobalFooter.d.ts +0 -77
  130. package/packages/react/NysGlobalFooter.js +0 -32
  131. package/packages/react/NysGlobalHeader.d.ts +0 -85
  132. package/packages/react/NysGlobalHeader.js +0 -34
  133. package/packages/react/NysIcon.d.ts +0 -75
  134. package/packages/react/NysIcon.js +0 -50
  135. package/packages/react/NysIconlist.d.ts +0 -54
  136. package/packages/react/NysIconlist.js +0 -22
  137. package/packages/react/NysIconlistitem.d.ts +0 -59
  138. package/packages/react/NysIconlistitem.js +0 -22
  139. package/packages/react/NysLabel.d.ts +0 -81
  140. package/packages/react/NysLabel.js +0 -40
  141. package/packages/react/NysModal.d.ts +0 -90
  142. package/packages/react/NysModal.js +0 -50
  143. package/packages/react/NysOption.d.ts +0 -66
  144. package/packages/react/NysOption.js +0 -25
  145. package/packages/react/NysPagination.d.ts +0 -72
  146. package/packages/react/NysPagination.js +0 -45
  147. package/packages/react/NysProcesslist.d.ts +0 -65
  148. package/packages/react/NysProcesslist.js +0 -25
  149. package/packages/react/NysProcesslistitem.d.ts +0 -61
  150. package/packages/react/NysProcesslistitem.js +0 -35
  151. package/packages/react/NysRadiobutton.d.ts +0 -132
  152. package/packages/react/NysRadiobutton.js +0 -72
  153. package/packages/react/NysRadiogroup.d.ts +0 -104
  154. package/packages/react/NysRadiogroup.js +0 -62
  155. package/packages/react/NysSelect.d.ts +0 -119
  156. package/packages/react/NysSelect.js +0 -67
  157. package/packages/react/NysSkipnav.d.ts +0 -54
  158. package/packages/react/NysSkipnav.js +0 -22
  159. package/packages/react/NysStep.d.ts +0 -73
  160. package/packages/react/NysStep.js +0 -40
  161. package/packages/react/NysStepper.d.ts +0 -67
  162. package/packages/react/NysStepper.js +0 -26
  163. package/packages/react/NysTab.d.ts +0 -90
  164. package/packages/react/NysTab.js +0 -39
  165. package/packages/react/NysTabgroup.d.ts +0 -76
  166. package/packages/react/NysTabgroup.js +0 -22
  167. package/packages/react/NysTable.d.ts +0 -80
  168. package/packages/react/NysTable.js +0 -41
  169. package/packages/react/NysTabpanel.d.ts +0 -70
  170. package/packages/react/NysTabpanel.js +0 -21
  171. package/packages/react/NysTextarea.d.ts +0 -141
  172. package/packages/react/NysTextarea.js +0 -79
  173. package/packages/react/NysTextinput.d.ts +0 -144
  174. package/packages/react/NysTextinput.js +0 -83
  175. package/packages/react/NysToggle.d.ts +0 -102
  176. package/packages/react/NysToggle.js +0 -59
  177. package/packages/react/NysTooltip.d.ts +0 -60
  178. package/packages/react/NysTooltip.js +0 -24
  179. package/packages/react/NysUnavFooter.d.ts +0 -61
  180. package/packages/react/NysUnavFooter.js +0 -21
  181. package/packages/react/NysUnavHeader.d.ts +0 -98
  182. package/packages/react/NysUnavHeader.js +0 -56
  183. package/packages/react/NysVerticalnav.d.ts +0 -67
  184. package/packages/react/NysVerticalnav.js +0 -26
  185. package/packages/react/NysVerticalnavGroup.d.ts +0 -76
  186. package/packages/react/NysVerticalnavGroup.js +0 -43
  187. package/packages/react/NysVideo.d.ts +0 -83
  188. package/packages/react/NysVideo.js +0 -53
  189. package/packages/react/README.md +0 -92
  190. package/packages/react/index.d.ts +0 -49
  191. package/packages/react/index.js +0 -49
  192. package/packages/react/nysds-jsx.d.ts +0 -1998
  193. package/packages/react/react-utils.js +0 -40
@@ -1,130 +0,0 @@
1
- import React from "react";
2
- import {
3
- NysFileinput as NysFileinputElement,
4
- Event,
5
- CustomEvent,
6
- } from "../../dist/nysds.es.js";
7
-
8
- export type { NysFileinputElement, Event, CustomEvent };
9
-
10
- export interface NysFileinputProps extends Pick<
11
- React.AllHTMLAttributes<HTMLElement>,
12
- | "children"
13
- | "dir"
14
- | "hidden"
15
- | "id"
16
- | "lang"
17
- | "slot"
18
- | "style"
19
- | "title"
20
- | "translate"
21
- | "onClick"
22
- | "onFocus"
23
- | "onBlur"
24
- > {
25
- /** Allows selecting multiple files. */
26
- multiple?: boolean;
27
-
28
- /** Prevents interaction. */
29
- disabled?: boolean;
30
-
31
- /** Requires at least one file to be uploaded. */
32
- required?: boolean;
33
-
34
- /** Shows "Optional" flag. */
35
- optional?: boolean;
36
-
37
- /** Shows error message when true. */
38
- showError?: boolean;
39
-
40
- /** Enables drag-and-drop zone UI. */
41
- dropzone?: boolean;
42
-
43
- /** Adjusts colors for dark backgrounds. */
44
- inverted?: boolean;
45
-
46
- /** Unique identifier. Auto-generated if not provided. */
47
- id?: NysFileinputElement["id"];
48
-
49
- /** Name for form submission. */
50
- name?: NysFileinputElement["name"];
51
-
52
- /** Visible label text. */
53
- label?: NysFileinputElement["label"];
54
-
55
- /** Helper text below label. Use slot for custom HTML. */
56
- description?: NysFileinputElement["description"];
57
-
58
- /** Form `id` to associate with. */
59
- form?: NysFileinputElement["form"];
60
-
61
- /** Tooltip text shown on hover/focus of info icon. */
62
- tooltip?: NysFileinputElement["tooltip"];
63
-
64
- /** Accepted file types. Use MIME types (`image/*`) or extensions (`.pdf`). Validated via magic bytes. */
65
- accept?: NysFileinputElement["accept"];
66
-
67
- /** Error message text. Shown only when `showError` is true. */
68
- errorMessage?: NysFileinputElement["errorMessage"];
69
-
70
- /** Component width: `lg` (384px) or `full` (100%, default). */
71
- width?: NysFileinputElement["width"];
72
-
73
- /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
74
- className?: string;
75
-
76
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
77
- exportparts?: string;
78
-
79
- /** Used for labels to link them with their inputs (using input id). */
80
- htmlFor?: string;
81
-
82
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
83
- key?: number | string;
84
-
85
- /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
86
- part?: string;
87
-
88
- /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
89
- ref?: any;
90
-
91
- /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
92
- tabIndex?: number;
93
-
94
- /** The currently selected files. Read to get the current selection; set to
95
- replace it (e.g. rehydrating state after navigation, or binding from a
96
- framework form model). Property-only — a `File[]` cannot round-trip through
97
- an HTML attribute. Setting this is silent (does not emit `nys-change`),
98
- matching native input behavior and avoiding feedback loops in two-way bindings. */
99
- files?: NysFileinputElement["files"];
100
-
101
- /** Single-file convenience accessor (parity with `nys-textinput`'s `value`).
102
- Reads the first selected file (or `null`); setting replaces the selection. */
103
- value?: NysFileinputElement["value"];
104
-
105
- /** Fired when focus leaves the component. Triggers validation. */
106
- onNysBlur?: (event: CustomEvent) => void;
107
-
108
- /** Fired once per user action (file selection, drop, or removal). Detail: `{id, files, changedFiles}`. The `files` is the full current selection Whereas `changedFiles` is the entries this action added or removed. Both `changedFiles` and each entry in `files` are `{ file: File, progress: number, status: "pending" | "processing" | "done" | "error", errorMsg?: string }`. */
109
- onNysChange?: (event: CustomEvent) => void;
110
- }
111
-
112
- /**
113
- * File input with drag-and-drop, validation, and progress tracking.
114
- * ---
115
- *
116
- *
117
- * ### **Events:**
118
- * - **nys-blur** - Fired when focus leaves the component. Triggers validation.
119
- * - **nys-change** - Fired once per user action (file selection, drop, or removal). Detail: `{id, files, changedFiles}`. The `files` is the full current selection Whereas `changedFiles` is the entries this action added or removed. Both `changedFiles` and each entry in `files` are `{ file: File, progress: number, status: "pending" | "processing" | "done" | "error", errorMsg?: string }`.
120
- *
121
- * ### **Methods:**
122
- * - **setFiles(incoming: _File[]_): _Promise<void>_** - Programmatically set the selection and await async validation/processing.
123
- * Same as assigning `files`, but resolves once every file has finished its
124
- * magic-byte validation and read — use when you need to read `checkValidity()`
125
- * or the settled selection immediately after.
126
- *
127
- * ### **Slots:**
128
- * - **description** - Custom HTML description content.
129
- */
130
- export const NysFileinput: React.ForwardRefExoticComponent<NysFileinputProps>;
@@ -1,74 +0,0 @@
1
- import React, { forwardRef, useRef, useEffect } from "react";
2
- import "../../dist/nysds.es.js";
3
- import { useEventListener, useProperties } from "./react-utils.js";
4
-
5
- export const NysFileinput = forwardRef((props, forwardedRef) => {
6
- const ref = useRef(null);
7
- const {
8
- multiple,
9
- disabled,
10
- required,
11
- optional,
12
- showError,
13
- dropzone,
14
- inverted,
15
- id,
16
- name,
17
- label,
18
- description,
19
- form,
20
- tooltip,
21
- accept,
22
- errorMessage,
23
- width,
24
- files,
25
- value,
26
- ...filteredProps
27
- } = props;
28
-
29
- /** Event listeners - run once */
30
- useEventListener(ref, "nys-blur", props.onNysBlur);
31
- useEventListener(ref, "nys-change", props.onNysChange);
32
-
33
- /** Properties - run whenever a property has changed */
34
- useProperties(ref, "files", props.files);
35
- useProperties(ref, "value", props.value);
36
-
37
- return React.createElement(
38
- "nys-fileinput",
39
- {
40
- ref: (node) => {
41
- ref.current = node;
42
- if (typeof forwardedRef === "function") {
43
- forwardedRef(node);
44
- } else if (forwardedRef) {
45
- forwardedRef.current = node;
46
- }
47
- },
48
- ...filteredProps,
49
- id: props.id,
50
- name: props.name,
51
- label: props.label,
52
- description: props.description,
53
- form: props.form,
54
- tooltip: props.tooltip,
55
- accept: props.accept,
56
- errorMessage: props.errorMessage,
57
- width: props.width,
58
- class: props.className,
59
- exportparts: props.exportparts,
60
- for: props.htmlFor,
61
- part: props.part,
62
- tabindex: props.tabIndex,
63
- multiple: props.multiple ? true : undefined,
64
- disabled: props.disabled ? true : undefined,
65
- required: props.required ? true : undefined,
66
- optional: props.optional ? true : undefined,
67
- showError: props.showError ? true : undefined,
68
- dropzone: props.dropzone ? true : undefined,
69
- inverted: props.inverted ? true : undefined,
70
- style: { ...props.style },
71
- },
72
- props.children,
73
- );
74
- });
@@ -1,77 +0,0 @@
1
- import React from "react";
2
- import { NysGlobalFooter as NysGlobalFooterElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysGlobalFooterElement };
5
-
6
- export interface NysGlobalFooterProps extends Pick<
7
- React.AllHTMLAttributes<HTMLElement>,
8
- | "children"
9
- | "dir"
10
- | "hidden"
11
- | "id"
12
- | "lang"
13
- | "slot"
14
- | "style"
15
- | "title"
16
- | "translate"
17
- | "onClick"
18
- | "onFocus"
19
- | "onBlur"
20
- > {
21
- /** Unique identifier. Auto-generated if not provided. */
22
- id?: NysGlobalFooterElement["id"];
23
-
24
- /** Agency name displayed as the footer heading. */
25
- agencyName?: NysGlobalFooterElement["agencyName"];
26
-
27
- /** Optional subheading displayed below the agency name. */
28
- agencySubheading?: NysGlobalFooterElement["agencySubheading"];
29
-
30
- /** URL for the agency name link. If empty, name is not clickable. */
31
- homepageLink?: NysGlobalFooterElement["homepageLink"];
32
-
33
- /** Accessible name for the `contentinfo` landmark this footer renders.
34
-
35
- Leave it unset and the landmark is named after the visible `agencyName`
36
- heading, which cannot drift out of sync and is translated with the rest of
37
- the page. Falls back to `"Site"` when there is no agency name to reference.
38
-
39
- Set this only when the agency name is not right for your audience. A page
40
- pairing this with `nys-unavfooter` carries two `contentinfo` landmarks, so
41
- the name must stay distinct from that footer's (`"New York State"` by
42
- default) or landmark navigation stops distinguishing them.
43
-
44
- An explicit name replaces the reference to the visible heading. */
45
- landmarkLabel?: NysGlobalFooterElement["landmarkLabel"];
46
-
47
- /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
48
- className?: string;
49
-
50
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
51
- exportparts?: string;
52
-
53
- /** Used for labels to link them with their inputs (using input id). */
54
- htmlFor?: string;
55
-
56
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
57
- key?: number | string;
58
-
59
- /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
60
- part?: string;
61
-
62
- /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
63
- ref?: any;
64
-
65
- /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
66
- tabIndex?: number;
67
- }
68
-
69
- /**
70
- * Agency footer with auto-layout for contact info and link sections.
71
- * ---
72
- *
73
- *
74
- * ### **Slots:**
75
- * - _default_ - Footer content (links, contact info). Use `<h4>` for column headings.
76
- */
77
- export const NysGlobalFooter: React.ForwardRefExoticComponent<NysGlobalFooterProps>;
@@ -1,32 +0,0 @@
1
- import React, { forwardRef } from "react";
2
- import "../../dist/nysds.es.js";
3
-
4
- export const NysGlobalFooter = forwardRef((props, forwardedRef) => {
5
- const {
6
- id,
7
- agencyName,
8
- agencySubheading,
9
- homepageLink,
10
- landmarkLabel,
11
- ...filteredProps
12
- } = props;
13
-
14
- return React.createElement(
15
- "nys-globalfooter",
16
- {
17
- ...filteredProps,
18
- id: props.id,
19
- agencyName: props.agencyName,
20
- agencySubheading: props.agencySubheading,
21
- homepageLink: props.homepageLink,
22
- landmarkLabel: props.landmarkLabel,
23
- class: props.className,
24
- exportparts: props.exportparts,
25
- for: props.htmlFor,
26
- part: props.part,
27
- tabindex: props.tabIndex,
28
- style: { ...props.style },
29
- },
30
- props.children,
31
- );
32
- });
@@ -1,85 +0,0 @@
1
- import React from "react";
2
- import { NysGlobalHeader as NysGlobalHeaderElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysGlobalHeaderElement };
5
-
6
- export interface NysGlobalHeaderProps extends Pick<
7
- React.AllHTMLAttributes<HTMLElement>,
8
- | "children"
9
- | "dir"
10
- | "hidden"
11
- | "id"
12
- | "lang"
13
- | "slot"
14
- | "style"
15
- | "title"
16
- | "translate"
17
- | "onClick"
18
- | "onFocus"
19
- | "onBlur"
20
- > {
21
- /** Displays the NYS brand mark in the header. Off by default.
22
-
23
- Enable only for internal, state-employee (back-office) applications that omit
24
- `nys-unavheader`. Any resident-facing app — even one requiring login — should
25
- keep `nys-unavheader` for trust and leave this off. */
26
- nysLogo?: boolean;
27
-
28
- /** Unique identifier. Auto-generated if not provided. */
29
- id?: NysGlobalHeaderElement["id"];
30
-
31
- /** Application name displayed prominently. */
32
- appName?: NysGlobalHeaderElement["appName"];
33
-
34
- /** Agency name displayed below app name (or as main title if no appName). */
35
- agencyName?: NysGlobalHeaderElement["agencyName"];
36
-
37
- /** URL for the header title link. If empty, title is not clickable. */
38
- homepageLink?: NysGlobalHeaderElement["homepageLink"];
39
-
40
- /** Accessible name for the `banner` landmark this header renders.
41
-
42
- Leave it unset and the banner is named after the visible `appName` or
43
- `agencyName`, which cannot drift out of sync and is translated with the rest
44
- of the page. Falls back to `"Site"` when there is no title to reference.
45
-
46
- Set this only when neither is right for your audience. A page pairing this
47
- with `nys-unavheader` carries two `banner` landmarks, so the name must stay
48
- distinct from that header's (`"New York State"` by default) or landmark
49
- navigation stops distinguishing them.
50
-
51
- An explicit name replaces the reference to the visible title. */
52
- landmarkLabel?: NysGlobalHeaderElement["landmarkLabel"];
53
-
54
- /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
55
- className?: string;
56
-
57
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
58
- exportparts?: string;
59
-
60
- /** Used for labels to link them with their inputs (using input id). */
61
- htmlFor?: string;
62
-
63
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
64
- key?: number | string;
65
-
66
- /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
67
- part?: string;
68
-
69
- /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
70
- ref?: any;
71
-
72
- /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
73
- tabIndex?: number;
74
- }
75
-
76
- /**
77
- * Agency header with navigation, mobile menu, and active link highlighting.
78
- * ---
79
- *
80
- *
81
- * ### **Slots:**
82
- * - _default_ - Navigation content (typically `<ul>` with `<li><a>` links). Auto-sanitized.
83
- * - **user-actions** - User-account controls (e.g. profile link, settings, log-out button) shown in the header.
84
- */
85
- export const NysGlobalHeader: React.ForwardRefExoticComponent<NysGlobalHeaderProps>;
@@ -1,34 +0,0 @@
1
- import React, { forwardRef } from "react";
2
- import "../../dist/nysds.es.js";
3
-
4
- export const NysGlobalHeader = forwardRef((props, forwardedRef) => {
5
- const {
6
- nysLogo,
7
- id,
8
- appName,
9
- agencyName,
10
- homepageLink,
11
- landmarkLabel,
12
- ...filteredProps
13
- } = props;
14
-
15
- return React.createElement(
16
- "nys-globalheader",
17
- {
18
- ...filteredProps,
19
- id: props.id,
20
- appName: props.appName,
21
- agencyName: props.agencyName,
22
- homepageLink: props.homepageLink,
23
- landmarkLabel: props.landmarkLabel,
24
- class: props.className,
25
- exportparts: props.exportparts,
26
- for: props.htmlFor,
27
- part: props.part,
28
- tabindex: props.tabIndex,
29
- nysLogo: props.nysLogo ? true : undefined,
30
- style: { ...props.style },
31
- },
32
- props.children,
33
- );
34
- });
@@ -1,75 +0,0 @@
1
- import React from "react";
2
- import { NysIcon as NysIconElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysIconElement };
5
-
6
- export interface NysIconProps extends Pick<
7
- React.AllHTMLAttributes<HTMLElement>,
8
- | "children"
9
- | "dir"
10
- | "hidden"
11
- | "id"
12
- | "lang"
13
- | "slot"
14
- | "style"
15
- | "title"
16
- | "translate"
17
- | "onClick"
18
- | "onFocus"
19
- | "onBlur"
20
- > {
21
- /** Icon name to resolve from the selected library. Required. */
22
- name?: NysIconElement["name"];
23
-
24
- /** Which registered icon library to use. Defaults to the built-in NYSDS library. */
25
- library?: NysIconElement["library"];
26
-
27
- /** Accessible label. When set, removes `aria-hidden` and adds `aria-label` to the SVG. */
28
- ariaLabel?: NysIconElement["ariaLabel"];
29
-
30
- /** Rotation in degrees. Applied via CSS `rotate`. */
31
- rotate?: NysIconElement["rotate"];
32
-
33
- /** Flip direction: `horizontal`, `vertical`, or empty for none. */
34
- flip?: NysIconElement["flip"];
35
-
36
- /** Icon color. Accepts any CSS color value. Defaults to `currentcolor`. */
37
- color?: NysIconElement["color"];
38
-
39
- /** Icon size. Semantic sizes: `xs`-`5xl`. Pixel sizes: `12`-`50`. */
40
- size?: NysIconElement["size"];
41
-
42
- /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
43
- className?: string;
44
-
45
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
46
- exportparts?: string;
47
-
48
- /** Used for labels to link them with their inputs (using input id). */
49
- htmlFor?: string;
50
-
51
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
52
- key?: number | string;
53
-
54
- /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
55
- part?: string;
56
-
57
- /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
58
- ref?: any;
59
-
60
- /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
61
- tabIndex?: number;
62
-
63
- /** Resolves when the current icon load (if any) is complete. */
64
- updateComplete?: NysIconElement["updateComplete"];
65
- }
66
-
67
- /**
68
- * SVG icon with swappable library support, size, rotation, and color options.
69
- * ---
70
- *
71
- *
72
- * ### **Methods:**
73
- * - **redraw()** - Called by the icon library registry when the current library changes.
74
- */
75
- export const NysIcon: React.ForwardRefExoticComponent<NysIconProps>;
@@ -1,50 +0,0 @@
1
- import React, { forwardRef, useRef, useEffect } from "react";
2
- import "../../dist/nysds.es.js";
3
- import { useProperties } from "./react-utils.js";
4
-
5
- export const NysIcon = forwardRef((props, forwardedRef) => {
6
- const ref = useRef(null);
7
- const {
8
- name,
9
- library,
10
- ariaLabel,
11
- rotate,
12
- flip,
13
- color,
14
- size,
15
- updateComplete,
16
- ...filteredProps
17
- } = props;
18
-
19
- /** Properties - run whenever a property has changed */
20
- useProperties(ref, "updateComplete", props.updateComplete);
21
-
22
- return React.createElement(
23
- "nys-icon",
24
- {
25
- ref: (node) => {
26
- ref.current = node;
27
- if (typeof forwardedRef === "function") {
28
- forwardedRef(node);
29
- } else if (forwardedRef) {
30
- forwardedRef.current = node;
31
- }
32
- },
33
- ...filteredProps,
34
- name: props.name,
35
- library: props.library,
36
- ariaLabel: props.ariaLabel,
37
- rotate: props.rotate,
38
- flip: props.flip,
39
- color: props.color,
40
- size: props.size,
41
- class: props.className,
42
- exportparts: props.exportparts,
43
- for: props.htmlFor,
44
- part: props.part,
45
- tabindex: props.tabIndex,
46
- style: { ...props.style },
47
- },
48
- props.children,
49
- );
50
- });
@@ -1,54 +0,0 @@
1
- import React from "react";
2
- import { NysIconlist as NysIconlistElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysIconlistElement };
5
-
6
- export interface NysIconlistProps extends Pick<
7
- React.AllHTMLAttributes<HTMLElement>,
8
- | "children"
9
- | "dir"
10
- | "hidden"
11
- | "id"
12
- | "lang"
13
- | "slot"
14
- | "style"
15
- | "title"
16
- | "translate"
17
- | "onClick"
18
- | "onFocus"
19
- | "onBlur"
20
- > {
21
- /** Draws a divider between items. No divider is drawn after the last item. */
22
- divider?: boolean;
23
-
24
- /** Unique identifier. Auto-generated if not provided. */
25
- id?: NysIconlistElement["id"];
26
-
27
- /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
28
- className?: string;
29
-
30
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
31
- exportparts?: string;
32
-
33
- /** Used for labels to link them with their inputs (using input id). */
34
- htmlFor?: string;
35
-
36
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
37
- key?: number | string;
38
-
39
- /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
40
- part?: string;
41
-
42
- /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
43
- ref?: any;
44
-
45
- /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
46
- tabIndex?: number;
47
- }
48
-
49
- /**
50
- * A scannable list of icon + text items, with an optional divider between rows.
51
- * ---
52
- *
53
- */
54
- export const NysIconlist: React.ForwardRefExoticComponent<NysIconlistProps>;
@@ -1,22 +0,0 @@
1
- import React, { forwardRef } from "react";
2
- import "../../dist/nysds.es.js";
3
-
4
- export const NysIconlist = forwardRef((props, forwardedRef) => {
5
- const { divider, id, ...filteredProps } = props;
6
-
7
- return React.createElement(
8
- "nys-iconlist",
9
- {
10
- ...filteredProps,
11
- id: props.id,
12
- class: props.className,
13
- exportparts: props.exportparts,
14
- for: props.htmlFor,
15
- part: props.part,
16
- tabindex: props.tabIndex,
17
- divider: props.divider ? true : undefined,
18
- style: { ...props.style },
19
- },
20
- props.children,
21
- );
22
- });