@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,59 +0,0 @@
1
- import React, { forwardRef, useRef, useEffect } from "react";
2
- import "../../dist/nysds.es.js";
3
- import { useEventListener } from "./react-utils.js";
4
-
5
- export const NysToggle = forwardRef((props, forwardedRef) => {
6
- const ref = useRef(null);
7
- const {
8
- checked,
9
- disabled,
10
- noIcon,
11
- inverted,
12
- id,
13
- name,
14
- value,
15
- label,
16
- description,
17
- form,
18
- size,
19
- ...filteredProps
20
- } = props;
21
-
22
- /** Event listeners - run once */
23
- useEventListener(ref, "nys-change", props.onNysChange);
24
- useEventListener(ref, "nys-focus", props.onNysFocus);
25
- useEventListener(ref, "nys-blur", props.onNysBlur);
26
-
27
- return React.createElement(
28
- "nys-toggle",
29
- {
30
- ref: (node) => {
31
- ref.current = node;
32
- if (typeof forwardedRef === "function") {
33
- forwardedRef(node);
34
- } else if (forwardedRef) {
35
- forwardedRef.current = node;
36
- }
37
- },
38
- ...filteredProps,
39
- id: props.id,
40
- name: props.name,
41
- value: props.value,
42
- label: props.label,
43
- description: props.description,
44
- form: props.form,
45
- size: props.size,
46
- class: props.className,
47
- exportparts: props.exportparts,
48
- for: props.htmlFor,
49
- part: props.part,
50
- tabindex: props.tabIndex,
51
- checked: props.checked ? true : undefined,
52
- disabled: props.disabled ? true : undefined,
53
- noIcon: props.noIcon ? true : undefined,
54
- inverted: props.inverted ? true : undefined,
55
- style: { ...props.style },
56
- },
57
- props.children,
58
- );
59
- });
@@ -1,60 +0,0 @@
1
- import React from "react";
2
- import { NysTooltip as NysTooltipElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysTooltipElement };
5
-
6
- export interface NysTooltipProps 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
- /** Adjusts colors for dark backgrounds. */
22
- inverted?: boolean;
23
-
24
- /** Unique identifier. Auto-generated if not provided. */
25
- id?: NysTooltipElement["id"];
26
-
27
- /** Tooltip content text. Required. */
28
- text?: NysTooltipElement["text"];
29
-
30
- /** ID of the trigger element to attach this tooltip to. Required. */
31
- for?: NysTooltipElement["for"];
32
-
33
- /** Preferred position relative to trigger. Auto-adjusts if space is insufficient. */
34
- position?: NysTooltipElement["position"];
35
-
36
- /** 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()`. */
37
- className?: string;
38
-
39
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
40
- exportparts?: string;
41
-
42
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
43
- key?: number | string;
44
-
45
- /** 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. */
46
- part?: string;
47
-
48
- /** 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. */
49
- ref?: any;
50
-
51
- /** 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. */
52
- tabIndex?: number;
53
- }
54
-
55
- /**
56
- * Contextual tooltip with auto-positioning, keyboard support, and screen reader integration.
57
- * ---
58
- *
59
- */
60
- export const NysTooltip: React.ForwardRefExoticComponent<NysTooltipProps>;
@@ -1,24 +0,0 @@
1
- import React, { forwardRef } from "react";
2
- import "../../dist/nysds.es.js";
3
-
4
- export const NysTooltip = forwardRef((props, forwardedRef) => {
5
- const { inverted, id, text, position, ...filteredProps } = props;
6
-
7
- return React.createElement(
8
- "nys-tooltip",
9
- {
10
- ...filteredProps,
11
- id: props.id,
12
- text: props.text,
13
- for: props.for,
14
- position: props.position,
15
- class: props.className,
16
- exportparts: props.exportparts,
17
- part: props.part,
18
- tabindex: props.tabIndex,
19
- inverted: props.inverted ? true : undefined,
20
- style: { ...props.style },
21
- },
22
- props.children,
23
- );
24
- });
@@ -1,61 +0,0 @@
1
- import React from "react";
2
- import { NysUnavFooter as NysUnavFooterElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysUnavFooterElement };
5
-
6
- export interface NysUnavFooterProps 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
- /** Accessible name for the `contentinfo` landmark this footer renders.
22
- Defaults to `"New York State"`.
23
-
24
- A page pairing this footer with `nys-globalfooter` carries two `contentinfo`
25
- landmarks; distinct names are what keep landmark navigation useful instead of
26
- announcing "content information" twice. Override only when your wording is
27
- clearer for your audience — and keep it distinct from the agency footer's
28
- name, which comes from that footer's visible heading.
29
-
30
- A blank value falls back to the default rather than leaving the landmark
31
- unnamed. */
32
- landmarkLabel?: NysUnavFooterElement["landmarkLabel"];
33
-
34
- /** 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()`. */
35
- className?: string;
36
-
37
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
38
- exportparts?: string;
39
-
40
- /** Used for labels to link them with their inputs (using input id). */
41
- htmlFor?: string;
42
-
43
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
44
- key?: number | string;
45
-
46
- /** 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. */
47
- part?: string;
48
-
49
- /** 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. */
50
- ref?: any;
51
-
52
- /** 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. */
53
- tabIndex?: number;
54
- }
55
-
56
- /**
57
- * Universal NYS footer with logo and statewide links. Required site-wide.
58
- * ---
59
- *
60
- */
61
- export const NysUnavFooter: React.ForwardRefExoticComponent<NysUnavFooterProps>;
@@ -1,21 +0,0 @@
1
- import React, { forwardRef } from "react";
2
- import "../../dist/nysds.es.js";
3
-
4
- export const NysUnavFooter = forwardRef((props, forwardedRef) => {
5
- const { landmarkLabel, ...filteredProps } = props;
6
-
7
- return React.createElement(
8
- "nys-unavfooter",
9
- {
10
- ...filteredProps,
11
- landmarkLabel: props.landmarkLabel,
12
- class: props.className,
13
- exportparts: props.exportparts,
14
- for: props.htmlFor,
15
- part: props.part,
16
- tabindex: props.tabIndex,
17
- style: { ...props.style },
18
- },
19
- props.children,
20
- );
21
- });
@@ -1,98 +0,0 @@
1
- import React from "react";
2
- import { NysUnavHeader as NysUnavHeaderElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysUnavHeaderElement };
5
-
6
- export interface NysUnavHeaderProps 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
- /** Internal: Whether trust bar panel is expanded. */
22
- trustbarVisible?: boolean;
23
-
24
- /** Internal: Whether search dropdown is visible (mobile). */
25
- searchDropdownVisible?: boolean;
26
-
27
- /** Internal: Whether language dropdown is visible. */
28
- languageVisible?: boolean;
29
-
30
- /** Internal: Whether search input is focused. */
31
- isSearchFocused?: boolean;
32
-
33
- /** Hides the translation dropdown. */
34
- hideTranslate?: boolean;
35
-
36
- /** Hides the search functionality. */
37
- hideSearch?: boolean;
38
-
39
- /** The URL endpoint of the search, make sure to include the query param. */
40
- searchUrl?: NysUnavHeaderElement["searchUrl"];
41
-
42
- /** Localize project key. If provided, the component will load and initialize LocalizeJS automatically. */
43
- translateKey?: NysUnavHeaderElement["translateKey"];
44
-
45
- /** Accessible name for the `banner` landmark this header renders.
46
- Defaults to `"New York State"`.
47
-
48
- A page pairing this header with `nys-globalheader` carries two `banner`
49
- landmarks; distinct names are what keep landmark navigation useful instead of
50
- announcing "banner, banner". Override only when your wording is clearer for
51
- your audience — and keep it distinct from the agency header's name, which
52
- comes from that header's visible title.
53
-
54
- A blank value falls back to the default rather than leaving the landmark
55
- unnamed. */
56
- landmarkLabel?: NysUnavHeaderElement["landmarkLabel"];
57
-
58
- /** The list of languages this site can be translated to, default to use Localize */
59
- languages?: NysUnavHeaderElement["languages"];
60
-
61
- /** 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()`. */
62
- className?: string;
63
-
64
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
65
- exportparts?: string;
66
-
67
- /** Used for labels to link them with their inputs (using input id). */
68
- htmlFor?: string;
69
-
70
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
71
- key?: number | string;
72
-
73
- /** 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. */
74
- part?: string;
75
-
76
- /** 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. */
77
- ref?: any;
78
-
79
- /** 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. */
80
- tabIndex?: number;
81
-
82
- /** Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Localize integration. */
83
- onNysLanguageSelect?: (event: CustomEvent) => void;
84
-
85
- /** Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect. */
86
- onNysSearchSubmit?: (event: CustomEvent) => void;
87
- }
88
-
89
- /**
90
- * Universal NYS header with trust bar, search, and translation. Required site-wide.
91
- * ---
92
- *
93
- *
94
- * ### **Events:**
95
- * - **nys-language-select** - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Localize integration.
96
- * - **nys-search-submit** - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
97
- */
98
- export const NysUnavHeader: React.ForwardRefExoticComponent<NysUnavHeaderProps>;
@@ -1,56 +0,0 @@
1
- import React, { forwardRef, useRef, useEffect } from "react";
2
- import "../../dist/nysds.es.js";
3
- import { useEventListener } from "./react-utils.js";
4
-
5
- export const NysUnavHeader = forwardRef((props, forwardedRef) => {
6
- const ref = useRef(null);
7
- const {
8
- trustbarVisible,
9
- searchDropdownVisible,
10
- languageVisible,
11
- isSearchFocused,
12
- hideTranslate,
13
- hideSearch,
14
- searchUrl,
15
- translateKey,
16
- landmarkLabel,
17
- languages,
18
- ...filteredProps
19
- } = props;
20
-
21
- /** Event listeners - run once */
22
- useEventListener(ref, "nys-language-select", props.onNysLanguageSelect);
23
- useEventListener(ref, "nys-search-submit", props.onNysSearchSubmit);
24
-
25
- return React.createElement(
26
- "nys-unavheader",
27
- {
28
- ref: (node) => {
29
- ref.current = node;
30
- if (typeof forwardedRef === "function") {
31
- forwardedRef(node);
32
- } else if (forwardedRef) {
33
- forwardedRef.current = node;
34
- }
35
- },
36
- ...filteredProps,
37
- searchUrl: props.searchUrl,
38
- translateKey: props.translateKey,
39
- landmarkLabel: props.landmarkLabel,
40
- languages: props.languages,
41
- class: props.className,
42
- exportparts: props.exportparts,
43
- for: props.htmlFor,
44
- part: props.part,
45
- tabindex: props.tabIndex,
46
- trustbarVisible: props.trustbarVisible ? true : undefined,
47
- searchDropdownVisible: props.searchDropdownVisible ? true : undefined,
48
- languageVisible: props.languageVisible ? true : undefined,
49
- isSearchFocused: props.isSearchFocused ? true : undefined,
50
- hideTranslate: props.hideTranslate ? true : undefined,
51
- hideSearch: props.hideSearch ? true : undefined,
52
- style: { ...props.style },
53
- },
54
- props.children,
55
- );
56
- });
@@ -1,67 +0,0 @@
1
- import React from "react";
2
- import { NysVerticalnav as NysVerticalnavElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysVerticalnavElement };
5
-
6
- export interface NysVerticalnavProps 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
- /** Hides the visible heading while keeping an accessible label for the navigation. */
22
- hideHeading?: boolean;
23
-
24
- /** Expands or collapses the navigation on mobile. */
25
- expanded?: boolean;
26
-
27
- /** ID for the navigation. Generated automatically if not provided. */
28
- id?: NysVerticalnavElement["id"];
29
-
30
- /** Heading text displayed at the top of the navigation. Defaults to "Page navigation". */
31
- heading?: NysVerticalnavElement["heading"];
32
-
33
- /** Heading level used for the navigation heading (`h1` through `h6`). */
34
- headingLevel?: NysVerticalnavElement["headingLevel"];
35
-
36
- /** 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()`. */
37
- className?: string;
38
-
39
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
40
- exportparts?: string;
41
-
42
- /** Used for labels to link them with their inputs (using input id). */
43
- htmlFor?: string;
44
-
45
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
46
- key?: number | string;
47
-
48
- /** 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. */
49
- part?: string;
50
-
51
- /** 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. */
52
- ref?: any;
53
-
54
- /** 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. */
55
- tabIndex?: number;
56
- }
57
-
58
- /**
59
- * Responsive navigation that becomes an accordion on smaller screens.
60
- * ---
61
- *
62
- *
63
- * ### **Methods:**
64
- * - **open()** - Public API for controlling the mobile accordion from outside the component
65
- * --------------------------------------------------------------------------
66
- */
67
- export const NysVerticalnav: React.ForwardRefExoticComponent<NysVerticalnavProps>;
@@ -1,26 +0,0 @@
1
- import React, { forwardRef } from "react";
2
- import "../../dist/nysds.es.js";
3
-
4
- export const NysVerticalnav = forwardRef((props, forwardedRef) => {
5
- const { hideHeading, expanded, id, heading, headingLevel, ...filteredProps } =
6
- props;
7
-
8
- return React.createElement(
9
- "nys-verticalnav",
10
- {
11
- ...filteredProps,
12
- id: props.id,
13
- heading: props.heading,
14
- headingLevel: props.headingLevel,
15
- class: props.className,
16
- exportparts: props.exportparts,
17
- for: props.htmlFor,
18
- part: props.part,
19
- tabindex: props.tabIndex,
20
- hideHeading: props.hideHeading ? true : undefined,
21
- expanded: props.expanded ? true : undefined,
22
- style: { ...props.style },
23
- },
24
- props.children,
25
- );
26
- });
@@ -1,76 +0,0 @@
1
- import React from "react";
2
- import {
3
- NysVerticalnavGroup as NysVerticalnavGroupElement,
4
- CustomEvent,
5
- } from "../../dist/nysds.es.js";
6
-
7
- export type { NysVerticalnavGroupElement, CustomEvent };
8
-
9
- export interface NysVerticalnavGroupProps extends Pick<
10
- React.AllHTMLAttributes<HTMLElement>,
11
- | "children"
12
- | "dir"
13
- | "hidden"
14
- | "id"
15
- | "lang"
16
- | "slot"
17
- | "style"
18
- | "title"
19
- | "translate"
20
- | "onClick"
21
- | "onFocus"
22
- | "onBlur"
23
- > {
24
- /** undefined */
25
- expanded?: boolean;
26
-
27
- /** undefined */
28
- disabled?: boolean;
29
-
30
- /** undefined */
31
- active?: boolean;
32
-
33
- /** undefined */
34
- id?: NysVerticalnavGroupElement["id"];
35
-
36
- /** undefined */
37
- label?: NysVerticalnavGroupElement["label"];
38
-
39
- /** 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()`. */
40
- className?: string;
41
-
42
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
43
- exportparts?: string;
44
-
45
- /** Used for labels to link them with their inputs (using input id). */
46
- htmlFor?: string;
47
-
48
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
49
- key?: number | string;
50
-
51
- /** 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. */
52
- part?: string;
53
-
54
- /** 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. */
55
- ref?: any;
56
-
57
- /** 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. */
58
- tabIndex?: number;
59
-
60
- /** undefined */
61
- onNysChildResize?: (event: CustomEvent) => void;
62
-
63
- /** undefined */
64
- onNysVerticalnavgroupToggle?: (event: CustomEvent) => void;
65
- }
66
-
67
- /**
68
- * Collapsible link group for use within `<nys-verticalnav>`.
69
- * ---
70
- *
71
- *
72
- * ### **Events:**
73
- * - **nys-child-resize**
74
- * - **nys-verticalnavgroup-toggle**
75
- */
76
- export const NysVerticalnavGroup: React.ForwardRefExoticComponent<NysVerticalnavGroupProps>;
@@ -1,43 +0,0 @@
1
- import React, { forwardRef, useRef, useEffect } from "react";
2
- import "../../dist/nysds.es.js";
3
- import { useEventListener } from "./react-utils.js";
4
-
5
- export const NysVerticalnavGroup = forwardRef((props, forwardedRef) => {
6
- const ref = useRef(null);
7
- const { expanded, disabled, active, id, label, ...filteredProps } = props;
8
-
9
- /** Event listeners - run once */
10
- useEventListener(ref, "nys-child-resize", props.onNysChildResize);
11
- useEventListener(
12
- ref,
13
- "nys-verticalnavgroup-toggle",
14
- props.onNysVerticalnavgroupToggle,
15
- );
16
-
17
- return React.createElement(
18
- "nys-verticalnavgroup",
19
- {
20
- ref: (node) => {
21
- ref.current = node;
22
- if (typeof forwardedRef === "function") {
23
- forwardedRef(node);
24
- } else if (forwardedRef) {
25
- forwardedRef.current = node;
26
- }
27
- },
28
- ...filteredProps,
29
- id: props.id,
30
- label: props.label,
31
- class: props.className,
32
- exportparts: props.exportparts,
33
- for: props.htmlFor,
34
- part: props.part,
35
- tabindex: props.tabIndex,
36
- expanded: props.expanded ? true : undefined,
37
- disabled: props.disabled ? true : undefined,
38
- active: props.active ? true : undefined,
39
- style: { ...props.style },
40
- },
41
- props.children,
42
- );
43
- });
@@ -1,83 +0,0 @@
1
- import React from "react";
2
- import { NysVideo as NysVideoElement } from "../../dist/nysds.es.js";
3
-
4
- export type { NysVideoElement };
5
-
6
- export interface NysVideoProps 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
- /** Triggers autoplay when the iframe loads */
22
- autoplay?: boolean;
23
-
24
- /** Prevents the video from being played */
25
- disabled?: boolean;
26
-
27
- /** Full YouTube URL — required. Component will not render if invalid. */
28
- id?: NysVideoElement["id"];
29
-
30
- /** Title text for the thumbnail of the video */
31
- titleText?: NysVideoElement["titleText"];
32
-
33
- /** Full YouTube URL — required. Component will not render if invalid. */
34
- videourl?: NysVideoElement["videourl"];
35
-
36
- /** Largest size for the video player.
37
- If not set, size is determined automatically by viewport width. */
38
- size?: NysVideoElement["size"];
39
-
40
- /** undefined */
41
- loading?: NysVideoElement["loading"];
42
-
43
- /** Time in seconds where playback begins. * */
44
- starttime?: NysVideoElement["starttime"];
45
-
46
- /** Custom thumbnail image path.
47
- Falls back to YouTube's auto-generated thumbnail if not provided. */
48
- thumbnail?: NysVideoElement["thumbnail"];
49
-
50
- /** 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()`. */
51
- className?: string;
52
-
53
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
54
- exportparts?: string;
55
-
56
- /** Used for labels to link them with their inputs (using input id). */
57
- htmlFor?: string;
58
-
59
- /** Used to help React identify which items have changed, are added, or are removed within a list. */
60
- key?: number | string;
61
-
62
- /** 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. */
63
- part?: string;
64
-
65
- /** 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. */
66
- ref?: any;
67
-
68
- /** 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. */
69
- tabIndex?: number;
70
-
71
- /** Fired when the user clicks the thumbnail to load the player. */
72
- onNysVideoPlay?: (event: CustomEvent) => void;
73
- }
74
-
75
- /**
76
- * YouTube video player with thumbnail preview and accessibility announcements.
77
- * ---
78
- *
79
- *
80
- * ### **Events:**
81
- * - **nys-video-play** - Fired when the user clicks the thumbnail to load the player.
82
- */
83
- export const NysVideo: React.ForwardRefExoticComponent<NysVideoProps>;