@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,57 +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
|
-
/** Adjusts colors for dark backgrounds. */
|
|
25
|
-
inverted?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Unique identifier. Auto-generated if not provided. */
|
|
28
|
-
id?: NysIconlistElement["id"];
|
|
29
|
-
|
|
30
|
-
/** 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()`. */
|
|
31
|
-
className?: string;
|
|
32
|
-
|
|
33
|
-
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
34
|
-
exportparts?: string;
|
|
35
|
-
|
|
36
|
-
/** Used for labels to link them with their inputs (using input id). */
|
|
37
|
-
htmlFor?: string;
|
|
38
|
-
|
|
39
|
-
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
40
|
-
key?: number | string;
|
|
41
|
-
|
|
42
|
-
/** 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. */
|
|
43
|
-
part?: string;
|
|
44
|
-
|
|
45
|
-
/** 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. */
|
|
46
|
-
ref?: any;
|
|
47
|
-
|
|
48
|
-
/** 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. */
|
|
49
|
-
tabIndex?: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* A scannable list of icon + text items.
|
|
54
|
-
* ---
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
export const NysIconlist: React.ForwardRefExoticComponent<NysIconlistProps>;
|
|
@@ -1,23 +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, inverted, 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
|
-
inverted: props.inverted ? true : undefined,
|
|
19
|
-
style: { ...props.style },
|
|
20
|
-
},
|
|
21
|
-
props.children,
|
|
22
|
-
);
|
|
23
|
-
});
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { NysIconlistitem as NysIconlistitemElement } from "../../dist/nysds.es.js";
|
|
3
|
-
|
|
4
|
-
export type { NysIconlistitemElement };
|
|
5
|
-
|
|
6
|
-
export interface NysIconlistitemProps 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 rule below the item. Set by the parent `<nys-iconlist divider>`; not intended to be
|
|
22
|
-
set directly. */
|
|
23
|
-
divider?: boolean;
|
|
24
|
-
|
|
25
|
-
/** Adjusts colors for dark backgrounds. Set by the parent `<nys-iconlist inverted>`; not intended to be
|
|
26
|
-
set directly. */
|
|
27
|
-
inverted?: boolean;
|
|
28
|
-
|
|
29
|
-
/** Material Symbols icon name passed to `<nys-icon>`. */
|
|
30
|
-
icon?: NysIconlistitemElement["icon"];
|
|
31
|
-
|
|
32
|
-
/** 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()`. */
|
|
33
|
-
className?: string;
|
|
34
|
-
|
|
35
|
-
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
36
|
-
exportparts?: string;
|
|
37
|
-
|
|
38
|
-
/** Used for labels to link them with their inputs (using input id). */
|
|
39
|
-
htmlFor?: string;
|
|
40
|
-
|
|
41
|
-
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
42
|
-
key?: number | string;
|
|
43
|
-
|
|
44
|
-
/** 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. */
|
|
45
|
-
part?: string;
|
|
46
|
-
|
|
47
|
-
/** 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. */
|
|
48
|
-
ref?: any;
|
|
49
|
-
|
|
50
|
-
/** 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. */
|
|
51
|
-
tabIndex?: number;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* An icon-paired list item for use inside `<nys-iconlist>`.
|
|
56
|
-
* ---
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* ### **Slots:**
|
|
60
|
-
* - _default_ - Primary label text.
|
|
61
|
-
* - **secondary** - Optional second line of text rendered below the primary label.
|
|
62
|
-
*/
|
|
63
|
-
export const NysIconlistitem: React.ForwardRefExoticComponent<NysIconlistitemProps>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
2
|
-
import "../../dist/nysds.es.js";
|
|
3
|
-
|
|
4
|
-
export const NysIconlistitem = forwardRef((props, forwardedRef) => {
|
|
5
|
-
const { divider, inverted, icon, ...filteredProps } = props;
|
|
6
|
-
|
|
7
|
-
return React.createElement(
|
|
8
|
-
"nys-iconlistitem",
|
|
9
|
-
{
|
|
10
|
-
...filteredProps,
|
|
11
|
-
icon: props.icon,
|
|
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
|
-
inverted: props.inverted ? true : undefined,
|
|
19
|
-
style: { ...props.style },
|
|
20
|
-
},
|
|
21
|
-
props.children,
|
|
22
|
-
);
|
|
23
|
-
});
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
NysLabel as NysLabelElement,
|
|
4
|
-
CustomEvent,
|
|
5
|
-
} from "../../dist/nysds.es.js";
|
|
6
|
-
|
|
7
|
-
export type { NysLabelElement, CustomEvent };
|
|
8
|
-
|
|
9
|
-
export interface NysLabelProps 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
|
-
/** Adjusts colors for dark backgrounds. */
|
|
25
|
-
inverted?: boolean;
|
|
26
|
-
|
|
27
|
-
/** The ID of the label. */
|
|
28
|
-
id?: NysLabelElement["id"];
|
|
29
|
-
|
|
30
|
-
/** Label text displayed above the form field. */
|
|
31
|
-
label?: NysLabelElement["label"];
|
|
32
|
-
|
|
33
|
-
/** Helper text displayed below the label. */
|
|
34
|
-
description?: NysLabelElement["description"];
|
|
35
|
-
|
|
36
|
-
/** Flag type: `required` shows asterisk, `optional` shows "(Optional)". */
|
|
37
|
-
flag?: NysLabelElement["flag"];
|
|
38
|
-
|
|
39
|
-
/** Tooltip text shown on hover/focus of info icon next to label. */
|
|
40
|
-
tooltip?: NysLabelElement["tooltip"];
|
|
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
|
-
/** undefined */
|
|
64
|
-
onNysLabelClick?: (event: CustomEvent) => void;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* **Internal component.** Renders form labels with description, required/optional flag, and tooltip.
|
|
69
|
-
*
|
|
70
|
-
* Used internally by form components (textinput, select, checkbox, etc.). Not intended for direct use.
|
|
71
|
-
* Handles label association via `for`, displays asterisk for required fields, and integrates tooltips.
|
|
72
|
-
* ---
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* ### **Events:**
|
|
76
|
-
* - **nys-label-click**
|
|
77
|
-
*
|
|
78
|
-
* ### **Slots:**
|
|
79
|
-
* - **description** - Custom HTML description content below the label.
|
|
80
|
-
*/
|
|
81
|
-
export const NysLabel: React.ForwardRefExoticComponent<NysLabelProps>;
|
|
@@ -1,40 +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 NysLabel = forwardRef((props, forwardedRef) => {
|
|
6
|
-
const ref = useRef(null);
|
|
7
|
-
const { inverted, id, label, description, flag, tooltip, ...filteredProps } =
|
|
8
|
-
props;
|
|
9
|
-
|
|
10
|
-
/** Event listeners - run once */
|
|
11
|
-
useEventListener(ref, "nys-label-click", props.onNysLabelClick);
|
|
12
|
-
|
|
13
|
-
return React.createElement(
|
|
14
|
-
"nys-label",
|
|
15
|
-
{
|
|
16
|
-
ref: (node) => {
|
|
17
|
-
ref.current = node;
|
|
18
|
-
if (typeof forwardedRef === "function") {
|
|
19
|
-
forwardedRef(node);
|
|
20
|
-
} else if (forwardedRef) {
|
|
21
|
-
forwardedRef.current = node;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
...filteredProps,
|
|
25
|
-
id: props.id,
|
|
26
|
-
label: props.label,
|
|
27
|
-
description: props.description,
|
|
28
|
-
flag: props.flag,
|
|
29
|
-
tooltip: props.tooltip,
|
|
30
|
-
class: props.className,
|
|
31
|
-
exportparts: props.exportparts,
|
|
32
|
-
for: props.htmlFor,
|
|
33
|
-
part: props.part,
|
|
34
|
-
tabindex: props.tabIndex,
|
|
35
|
-
inverted: props.inverted ? true : undefined,
|
|
36
|
-
style: { ...props.style },
|
|
37
|
-
},
|
|
38
|
-
props.children,
|
|
39
|
-
);
|
|
40
|
-
});
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
NysModal as NysModalElement,
|
|
4
|
-
CustomEvent,
|
|
5
|
-
} from "../../dist/nysds.es.js";
|
|
6
|
-
|
|
7
|
-
export type { NysModalElement, CustomEvent };
|
|
8
|
-
|
|
9
|
-
export interface NysModalProps 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
|
-
/** Controls modal visibility. Set to `true` to show. */
|
|
25
|
-
open?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Prevents dismissal via close button or Escape key. User must take an action. */
|
|
28
|
-
mandatory?: boolean;
|
|
29
|
-
|
|
30
|
-
/** Unique identifier. Auto-generated if not provided. */
|
|
31
|
-
id?: NysModalElement["id"];
|
|
32
|
-
|
|
33
|
-
/** Modal heading text. Required for accessibility — it becomes the dialog's
|
|
34
|
-
accessible name via `aria-labelledby`. */
|
|
35
|
-
heading?: NysModalElement["heading"];
|
|
36
|
-
|
|
37
|
-
/** Accessible name for the dialog, used only when no `heading` is set.
|
|
38
|
-
Prefer a visible `heading`: a visible label satisfies WCAG 2.5.3 (Label in
|
|
39
|
-
Name) and gives sighted users the same information. Use `ariaLabel` for the
|
|
40
|
-
rare headless dialog so it still exposes a name (WCAG 4.1.2). */
|
|
41
|
-
ariaLabel?: NysModalElement["ariaLabel"];
|
|
42
|
-
|
|
43
|
-
/** Secondary heading below the main heading. */
|
|
44
|
-
subheading?: NysModalElement["subheading"];
|
|
45
|
-
|
|
46
|
-
/** Modal width: `sm` (400px), `md` (600px), or `lg` (800px). */
|
|
47
|
-
width?: NysModalElement["width"];
|
|
48
|
-
|
|
49
|
-
/** 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()`. */
|
|
50
|
-
className?: string;
|
|
51
|
-
|
|
52
|
-
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
53
|
-
exportparts?: string;
|
|
54
|
-
|
|
55
|
-
/** Used for labels to link them with their inputs (using input id). */
|
|
56
|
-
htmlFor?: string;
|
|
57
|
-
|
|
58
|
-
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
59
|
-
key?: number | string;
|
|
60
|
-
|
|
61
|
-
/** 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. */
|
|
62
|
-
part?: string;
|
|
63
|
-
|
|
64
|
-
/** 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. */
|
|
65
|
-
ref?: any;
|
|
66
|
-
|
|
67
|
-
/** 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. */
|
|
68
|
-
tabIndex?: number;
|
|
69
|
-
|
|
70
|
-
/** Fired when modal opens. Detail: `{id}`. */
|
|
71
|
-
onNysOpen?: (event: CustomEvent) => void;
|
|
72
|
-
|
|
73
|
-
/** Fired when modal closes. Detail: `{id}`. */
|
|
74
|
-
onNysClose?: (event: CustomEvent) => void;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Accessible modal dialog with focus trap, keyboard support, and action slots.
|
|
79
|
-
* ---
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* ### **Events:**
|
|
83
|
-
* - **nys-open** - Fired when modal opens. Detail: `{id}`.
|
|
84
|
-
* - **nys-close** - Fired when modal closes. Detail: `{id}`.
|
|
85
|
-
*
|
|
86
|
-
* ### **Slots:**
|
|
87
|
-
* - _default_ - Default slot for body content.
|
|
88
|
-
* - **actions** - Action buttons displayed in footer. Buttons auto-resize on mobile.
|
|
89
|
-
*/
|
|
90
|
-
export const NysModal: React.ForwardRefExoticComponent<NysModalProps>;
|
|
@@ -1,50 +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 NysModal = forwardRef((props, forwardedRef) => {
|
|
6
|
-
const ref = useRef(null);
|
|
7
|
-
const {
|
|
8
|
-
open,
|
|
9
|
-
mandatory,
|
|
10
|
-
id,
|
|
11
|
-
heading,
|
|
12
|
-
ariaLabel,
|
|
13
|
-
subheading,
|
|
14
|
-
width,
|
|
15
|
-
...filteredProps
|
|
16
|
-
} = props;
|
|
17
|
-
|
|
18
|
-
/** Event listeners - run once */
|
|
19
|
-
useEventListener(ref, "nys-open", props.onNysOpen);
|
|
20
|
-
useEventListener(ref, "nys-close", props.onNysClose);
|
|
21
|
-
|
|
22
|
-
return React.createElement(
|
|
23
|
-
"nys-modal",
|
|
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
|
-
id: props.id,
|
|
35
|
-
heading: props.heading,
|
|
36
|
-
ariaLabel: props.ariaLabel,
|
|
37
|
-
subheading: props.subheading,
|
|
38
|
-
width: props.width,
|
|
39
|
-
class: props.className,
|
|
40
|
-
exportparts: props.exportparts,
|
|
41
|
-
for: props.htmlFor,
|
|
42
|
-
part: props.part,
|
|
43
|
-
tabindex: props.tabIndex,
|
|
44
|
-
open: props.open ? true : undefined,
|
|
45
|
-
mandatory: props.mandatory ? true : undefined,
|
|
46
|
-
style: { ...props.style },
|
|
47
|
-
},
|
|
48
|
-
props.children,
|
|
49
|
-
);
|
|
50
|
-
});
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { NysOption as NysOptionElement } from "../../dist/nysds.es.js";
|
|
3
|
-
|
|
4
|
-
export type { NysOptionElement };
|
|
5
|
-
|
|
6
|
-
export interface NysOptionProps 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
|
-
/** Prevents selection of this option. */
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
|
|
24
|
-
/** Pre-selects this option. */
|
|
25
|
-
selected?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Hides the option from the dropdown list. */
|
|
28
|
-
hidden?: boolean;
|
|
29
|
-
|
|
30
|
-
/** Value submitted when this option is selected. */
|
|
31
|
-
value?: NysOptionElement["value"];
|
|
32
|
-
|
|
33
|
-
/** Display text for the option. Auto-populated from slot content if not set. */
|
|
34
|
-
label?: NysOptionElement["label"];
|
|
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
|
-
* Option item for nys-select dropdown.
|
|
60
|
-
* ---
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* ### **Slots:**
|
|
64
|
-
* - _default_ - Option label text. Auto-populates the `label` prop if provided.
|
|
65
|
-
*/
|
|
66
|
-
export const NysOption: React.ForwardRefExoticComponent<NysOptionProps>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
2
|
-
import "../../dist/nysds.es.js";
|
|
3
|
-
|
|
4
|
-
export const NysOption = forwardRef((props, forwardedRef) => {
|
|
5
|
-
const { disabled, selected, hidden, value, label, ...filteredProps } = props;
|
|
6
|
-
|
|
7
|
-
return React.createElement(
|
|
8
|
-
"nys-option",
|
|
9
|
-
{
|
|
10
|
-
...filteredProps,
|
|
11
|
-
value: props.value,
|
|
12
|
-
label: props.label,
|
|
13
|
-
class: props.className,
|
|
14
|
-
exportparts: props.exportparts,
|
|
15
|
-
for: props.htmlFor,
|
|
16
|
-
part: props.part,
|
|
17
|
-
tabindex: props.tabIndex,
|
|
18
|
-
disabled: props.disabled ? true : undefined,
|
|
19
|
-
selected: props.selected ? true : undefined,
|
|
20
|
-
hidden: props.hidden ? true : undefined,
|
|
21
|
-
style: { ...props.style },
|
|
22
|
-
},
|
|
23
|
-
props.children,
|
|
24
|
-
);
|
|
25
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
NysPagination as NysPaginationElement,
|
|
4
|
-
CustomEvent,
|
|
5
|
-
} from "../../dist/nysds.es.js";
|
|
6
|
-
|
|
7
|
-
export type { NysPaginationElement, CustomEvent };
|
|
8
|
-
|
|
9
|
-
export interface NysPaginationProps 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
|
-
/** Internal state for layout adjustments near the end. */
|
|
25
|
-
_twoBeforeLast?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Unique identifier. Auto-generated if not provided. */
|
|
28
|
-
id?: NysPaginationElement["id"];
|
|
29
|
-
|
|
30
|
-
/** Name attribute for form association. */
|
|
31
|
-
name?: NysPaginationElement["name"];
|
|
32
|
-
|
|
33
|
-
/** Currently active page (1-indexed). Clamped to valid range. */
|
|
34
|
-
currentPage?: NysPaginationElement["currentPage"];
|
|
35
|
-
|
|
36
|
-
/** Total number of pages. Must be at least 1. */
|
|
37
|
-
totalPages?: NysPaginationElement["totalPages"];
|
|
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
|
-
/** Fired when page changes. Detail: `{page}`. */
|
|
61
|
-
onNysChange?: (event: CustomEvent) => void;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Page navigation with numbered links, prev/next buttons, and responsive layout.
|
|
66
|
-
* ---
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* ### **Events:**
|
|
70
|
-
* - **nys-change** - Fired when page changes. Detail: `{page}`.
|
|
71
|
-
*/
|
|
72
|
-
export const NysPagination: React.ForwardRefExoticComponent<NysPaginationProps>;
|
|
@@ -1,45 +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 NysPagination = forwardRef((props, forwardedRef) => {
|
|
6
|
-
const ref = useRef(null);
|
|
7
|
-
const {
|
|
8
|
-
_twoBeforeLast,
|
|
9
|
-
id,
|
|
10
|
-
name,
|
|
11
|
-
currentPage,
|
|
12
|
-
totalPages,
|
|
13
|
-
...filteredProps
|
|
14
|
-
} = props;
|
|
15
|
-
|
|
16
|
-
/** Event listeners - run once */
|
|
17
|
-
useEventListener(ref, "nys-change", props.onNysChange);
|
|
18
|
-
|
|
19
|
-
return React.createElement(
|
|
20
|
-
"nys-pagination",
|
|
21
|
-
{
|
|
22
|
-
ref: (node) => {
|
|
23
|
-
ref.current = node;
|
|
24
|
-
if (typeof forwardedRef === "function") {
|
|
25
|
-
forwardedRef(node);
|
|
26
|
-
} else if (forwardedRef) {
|
|
27
|
-
forwardedRef.current = node;
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
...filteredProps,
|
|
31
|
-
id: props.id,
|
|
32
|
-
name: props.name,
|
|
33
|
-
currentPage: props.currentPage,
|
|
34
|
-
totalPages: props.totalPages,
|
|
35
|
-
class: props.className,
|
|
36
|
-
exportparts: props.exportparts,
|
|
37
|
-
for: props.htmlFor,
|
|
38
|
-
part: props.part,
|
|
39
|
-
tabindex: props.tabIndex,
|
|
40
|
-
_twoBeforeLast: props._twoBeforeLast ? true : undefined,
|
|
41
|
-
style: { ...props.style },
|
|
42
|
-
},
|
|
43
|
-
props.children,
|
|
44
|
-
);
|
|
45
|
-
});
|