@nysds/components 1.19.3 → 1.20.0-alpha-3
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 +180 -1055
- package/dist/.vscode/vscode.html-custom-data.json +7 -7
- package/dist/custom-elements.json +180 -1055
- package/dist/nysds.es.js +724 -731
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +136 -730
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +6 -35
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +3 -8
- package/dist/packages/nys-alert/src/nys-alert.d.ts +4 -81
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +4 -44
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +3 -70
- package/dist/packages/nys-badge/src/nys-badge.d.ts +4 -54
- package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +7 -75
- package/dist/packages/nys-button/src/nys-button.d.ts +7 -60
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +7 -4
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +1 -75
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +0 -164
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +8 -64
- package/dist/packages/nys-divider/src/nys-divider.d.ts +1 -24
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +12 -19
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +10 -0
- package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +0 -10
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +4 -66
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +7 -50
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +3 -57
- package/dist/packages/nys-icon/src/icon-cache.d.ts +4 -11
- package/dist/packages/nys-icon/src/icon-library-registry.d.ts +16 -33
- package/dist/packages/nys-icon/src/index.d.ts +2 -2
- package/dist/packages/nys-icon/src/nys-icon.d.ts +6 -83
- package/dist/packages/nys-label/src/nys-label.d.ts +2 -32
- package/dist/packages/nys-modal/src/nys-modal.d.ts +5 -130
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +1 -11
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +3 -4
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +1 -74
- package/dist/packages/nys-select/src/nys-option.d.ts +8 -0
- package/dist/packages/nys-select/src/nys-select.d.ts +10 -141
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +2 -2
- package/dist/packages/nys-stepper/src/nys-step.d.ts +13 -0
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +69 -119
- package/dist/packages/nys-tab/src/nys-tab.d.ts +8 -17
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +15 -77
- package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +17 -0
- package/dist/packages/nys-table/src/nys-table.d.ts +0 -71
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +5 -52
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +9 -63
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +4 -40
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +6 -38
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +2 -10
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +9 -51
- package/dist/packages/nys-video/src/nys-video.d.ts +3 -65
- package/package.json +4 -7
- package/packages/react/NysBreadcrumbs.d.ts +1 -1
- package/packages/react/NysButton.d.ts +1 -2
- package/packages/react/NysDropdownMenu.d.ts +1 -1
- package/packages/react/NysLabel.d.ts +1 -4
- package/packages/react/NysTextarea.d.ts +1 -1
- package/packages/react/NysUnavHeader.d.ts +1 -11
- package/packages/react/NysUnavHeader.js +1 -15
- package/packages/react/nysds-jsx.d.ts +7 -20
- package/dist/nys-icon.library-ChLRj3i-.js +0 -696
- package/dist/nys-icon.library-ChLRj3i-.js.map +0 -1
|
@@ -62,21 +62,11 @@ export interface NysUnavHeaderProps extends Pick<
|
|
|
62
62
|
|
|
63
63
|
/** 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. */
|
|
64
64
|
tabIndex?: number;
|
|
65
|
-
|
|
66
|
-
/** Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect. */
|
|
67
|
-
onNysLanguageSelect?: (event: CustomEvent) => void;
|
|
68
|
-
|
|
69
|
-
/** Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect. */
|
|
70
|
-
onNysSearchSubmit?: (event: CustomEvent) => void;
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
/**
|
|
74
|
-
* Universal NYS header with trust bar, search, and translation. Required site-wide.
|
|
75
|
-
* ---
|
|
76
68
|
*
|
|
69
|
+
* ---
|
|
77
70
|
*
|
|
78
|
-
* ### **Events:**
|
|
79
|
-
* - **nys-language-select** - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect.
|
|
80
|
-
* - **nys-search-submit** - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
|
|
81
71
|
*/
|
|
82
72
|
export const NysUnavHeader: React.ForwardRefExoticComponent<NysUnavHeaderProps>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../../dist/nysds.es.js";
|
|
3
|
-
import { useEventListener } from "./react-utils.js";
|
|
4
3
|
|
|
5
4
|
export const NysUnavHeader = forwardRef((props, forwardedRef) => {
|
|
6
|
-
const ref = useRef(null);
|
|
7
5
|
const {
|
|
8
6
|
trustbarVisible,
|
|
9
7
|
searchDropdownVisible,
|
|
@@ -16,21 +14,9 @@ export const NysUnavHeader = forwardRef((props, forwardedRef) => {
|
|
|
16
14
|
...filteredProps
|
|
17
15
|
} = props;
|
|
18
16
|
|
|
19
|
-
/** Event listeners - run once */
|
|
20
|
-
useEventListener(ref, "nys-language-select", props.onNysLanguageSelect);
|
|
21
|
-
useEventListener(ref, "nys-search-submit", props.onNysSearchSubmit);
|
|
22
|
-
|
|
23
17
|
return React.createElement(
|
|
24
18
|
"nys-unavheader",
|
|
25
19
|
{
|
|
26
|
-
ref: (node) => {
|
|
27
|
-
ref.current = node;
|
|
28
|
-
if (typeof forwardedRef === "function") {
|
|
29
|
-
forwardedRef(node);
|
|
30
|
-
} else if (forwardedRef) {
|
|
31
|
-
forwardedRef.current = node;
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
20
|
...filteredProps,
|
|
35
21
|
searchUrl: props.searchUrl,
|
|
36
22
|
languages: props.languages,
|
|
@@ -180,7 +180,7 @@ export type NysBreadcrumbsProps = {
|
|
|
180
180
|
Override when multiple crumbs exist on the same page. */
|
|
181
181
|
ariaLabel?: string;
|
|
182
182
|
/** Controls the visual size of the breadcrumb text and spacing: `sm` for dense layouts, `md` (default) for standard use. */
|
|
183
|
-
size?: "sm" | "md";
|
|
183
|
+
size?: "sm" | "md" | "";
|
|
184
184
|
/** On mobile, renders the trail as a single back-to-parent link pointing to the item before the current page.
|
|
185
185
|
Has no effect on desktop or when only one item is present (which always renders as a back link). */
|
|
186
186
|
backToParent?: boolean;
|
|
@@ -878,7 +878,7 @@ export type NysTextareaProps = {
|
|
|
878
878
|
value?: string;
|
|
879
879
|
/** Prevents interaction. */
|
|
880
880
|
disabled?: boolean;
|
|
881
|
-
/** Makes textarea
|
|
881
|
+
/** Makes textarea read-only but focusable. */
|
|
882
882
|
readonly?: boolean;
|
|
883
883
|
/** Marks as required. Shows "Required" flag and validates on blur. */
|
|
884
884
|
required?: boolean;
|
|
@@ -1035,11 +1035,6 @@ export type NysUnavHeaderProps = {
|
|
|
1035
1035
|
searchUrl?: string;
|
|
1036
1036
|
/** The list of languages this site can be translated to, default to use Smartling */
|
|
1037
1037
|
languages?: Language[];
|
|
1038
|
-
|
|
1039
|
-
/** Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect. */
|
|
1040
|
-
"onnys-language-select"?: (e: CustomEvent<never>) => void;
|
|
1041
|
-
/** Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect. */
|
|
1042
|
-
"onnys-search-submit"?: (e: CustomEvent<never>) => void;
|
|
1043
1038
|
};
|
|
1044
1039
|
|
|
1045
1040
|
export type NysVideoProps = {
|
|
@@ -1144,7 +1139,7 @@ export type CustomElements = {
|
|
|
1144
1139
|
* - **nys-breadcrumbs-expand** - Fired when the user clicks the ellipsis to expand the trail.
|
|
1145
1140
|
*
|
|
1146
1141
|
* ### **Slots:**
|
|
1147
|
-
* - _default_ - One or more `
|
|
1142
|
+
* - _default_ - One or more `nys-breadcrumbitem` elements defining the trail.
|
|
1148
1143
|
*/
|
|
1149
1144
|
"nys-breadcrumbs": Partial<NysBreadcrumbsProps & BaseProps & BaseEvents>;
|
|
1150
1145
|
|
|
@@ -1159,8 +1154,7 @@ export type CustomElements = {
|
|
|
1159
1154
|
* - **nys-click** - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.
|
|
1160
1155
|
*
|
|
1161
1156
|
* ### **Slots:**
|
|
1162
|
-
* -
|
|
1163
|
-
* - **prefix-icon** - Icon before label. Not shown for `text` variant.
|
|
1157
|
+
* - **prefix-icon** - Icon before label. Not shown for `text` variant.
|
|
1164
1158
|
* - **suffix-icon** - Icon after label. Not shown for `text` variant.
|
|
1165
1159
|
* - **circle-icon** - Icon for circle mode. Overrides `icon` prop.
|
|
1166
1160
|
*
|
|
@@ -1262,7 +1256,7 @@ export type CustomElements = {
|
|
|
1262
1256
|
"nys-divider": Partial<NysDividerProps & BaseProps & BaseEvents>;
|
|
1263
1257
|
|
|
1264
1258
|
/**
|
|
1265
|
-
*
|
|
1259
|
+
*
|
|
1266
1260
|
* ---
|
|
1267
1261
|
*
|
|
1268
1262
|
*/
|
|
@@ -1347,10 +1341,7 @@ export type CustomElements = {
|
|
|
1347
1341
|
"nys-icon": Partial<NysIconProps & BaseProps & BaseEvents>;
|
|
1348
1342
|
|
|
1349
1343
|
/**
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1352
|
-
* Used internally by form components (textinput, select, checkbox, etc.). Not intended for direct use.
|
|
1353
|
-
* Handles label association via `for`, displays asterisk for required fields, and integrates tooltips.
|
|
1344
|
+
* Internal label component for form fields with flag and tooltip support.
|
|
1354
1345
|
* ---
|
|
1355
1346
|
*
|
|
1356
1347
|
*
|
|
@@ -1629,13 +1620,9 @@ export type CustomElements = {
|
|
|
1629
1620
|
"nys-unavfooter": Partial<NysUnavFooterProps & BaseProps & BaseEvents>;
|
|
1630
1621
|
|
|
1631
1622
|
/**
|
|
1632
|
-
* Universal NYS header with trust bar, search, and translation. Required site-wide.
|
|
1633
|
-
* ---
|
|
1634
1623
|
*
|
|
1624
|
+
* ---
|
|
1635
1625
|
*
|
|
1636
|
-
* ### **Events:**
|
|
1637
|
-
* - **nys-language-select** - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect.
|
|
1638
|
-
* - **nys-search-submit** - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
|
|
1639
1626
|
*/
|
|
1640
1627
|
"nys-unavheader": Partial<NysUnavHeaderProps & BaseProps & BaseEvents>;
|
|
1641
1628
|
|