@nysds/components 1.19.1-alpha-1 → 1.19.2
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 +47 -6
- package/dist/.vscode/vscode.html-custom-data.json +10 -0
- package/dist/custom-elements.json +47 -6
- package/dist/icons/filter_alt.svg +1 -1
- package/dist/icons/filter_list.svg +1 -1
- package/dist/icons/location_on.svg +8 -0
- package/dist/icons/manifest.json +2 -0
- package/dist/icons/schedule.svg +8 -0
- package/dist/icons/sort.svg +1 -1
- package/dist/nysds.es.js +2227 -2048
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +212 -205
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-button/src/nys-button.d.ts +6 -7
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +1 -1
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +5 -0
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +7 -1
- package/package.json +8 -4
- package/packages/react/NysDropdownMenu.d.ts +3 -0
- package/packages/react/NysDropdownMenu.js +2 -1
- package/packages/react/NysGlobalFooter.d.ts +3 -0
- package/packages/react/NysGlobalFooter.js +3 -1
- package/packages/react/nysds-jsx.d.ts +4 -0
|
@@ -187,14 +187,13 @@ export declare class NysButton extends LitElement {
|
|
|
187
187
|
private _handleKeydown;
|
|
188
188
|
private _handleKeyup;
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
190
|
+
* Handles inline onclick attributes for keyboard activation.
|
|
191
191
|
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* automatically, but keydown events do not, so we invoke it manually here.
|
|
192
|
+
* Native clicks execute inline onclick attributes automatically, but
|
|
193
|
+
* keyboard activation of the custom element does not trigger that native
|
|
194
|
+
* behavior. Dispatching a synthetic click lets the browser's own inline
|
|
195
|
+
* event handler mechanism execute any onclick attribute safely without
|
|
196
|
+
* eval() or new Function().
|
|
198
197
|
*/
|
|
199
198
|
private _handleAnyAttributeFunction;
|
|
200
199
|
focus(options?: FocusOptions): void;
|
|
@@ -58,7 +58,7 @@ export declare class NysDatepicker extends LitElement {
|
|
|
58
58
|
name: string;
|
|
59
59
|
/**
|
|
60
60
|
* Input width: `md` (200px), `lg` (384px), `full` (100%).
|
|
61
|
-
* @default "
|
|
61
|
+
* @default "full"
|
|
62
62
|
*/
|
|
63
63
|
width: "md" | "lg" | "full";
|
|
64
64
|
/** Hide the "Today" button in calendar popup. */
|
|
@@ -30,6 +30,11 @@ export declare class NysDropdownMenu extends LitElement {
|
|
|
30
30
|
static styles: import("lit").CSSResult;
|
|
31
31
|
for: string;
|
|
32
32
|
showDropdown: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Accessible label for the menu. Used as `aria-label` on the `<ul role="menu">` element.
|
|
35
|
+
* @default ""
|
|
36
|
+
*/
|
|
37
|
+
label: string;
|
|
33
38
|
/**
|
|
34
39
|
* Preferred position relative to trigger.
|
|
35
40
|
* @default "bottom-end"
|
|
@@ -12,7 +12,11 @@ import { LitElement } from "lit";
|
|
|
12
12
|
*
|
|
13
13
|
* @example Simple footer
|
|
14
14
|
* ```html
|
|
15
|
-
* <nys-globalfooter
|
|
15
|
+
* <nys-globalfooter
|
|
16
|
+
* agencyName="Department of Health"
|
|
17
|
+
* homepageLink="/"
|
|
18
|
+
* agencySubheading="Protecting and Promoting the Health of New Yorkers"
|
|
19
|
+
* >
|
|
16
20
|
* <span>123 Main St, Albany NY</span>
|
|
17
21
|
* <span>info@health.ny.gov</span>
|
|
18
22
|
* </nys-globalfooter>
|
|
@@ -22,6 +26,8 @@ export declare class NysGlobalFooter extends LitElement {
|
|
|
22
26
|
static styles: import("lit").CSSResult;
|
|
23
27
|
/** Agency name displayed as the footer heading. */
|
|
24
28
|
agencyName: string;
|
|
29
|
+
/** Optional subheading displayed below the agency name. */
|
|
30
|
+
agencySubheading: string;
|
|
25
31
|
/** URL for the agency name link. If empty, name is not clickable. */
|
|
26
32
|
homepageLink: string;
|
|
27
33
|
private slotHasContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/components",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.2",
|
|
4
4
|
"description": "New York State's design system and code component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
"release:dry-run": "cross-env NODE_ENV=production npm run build:all && cross-env NODE_ENV=production npm run test && npm run cem && node src/scripts/publish-dry-run.js",
|
|
46
46
|
"release:alpha": "npm run build && npm run build:umd && npm publish --tag next",
|
|
47
47
|
"release:zip": "npm run build:all && node src/scripts/create-release-zip.js",
|
|
48
|
-
"
|
|
48
|
+
"pretest": "playwright install",
|
|
49
|
+
"test": "wtr --node-resolve",
|
|
50
|
+
"test:ssr": "node scripts/test-ssr.mjs",
|
|
49
51
|
"test:build": "npm run build:all && npm run test",
|
|
50
52
|
"test:compact": "export NYSDS_TEST_OUTPUT=compact && wtr --node-resolve",
|
|
51
53
|
"test:ai": "export NYSDS_TEST_OUTPUT=ai && wtr --node-resolve",
|
|
@@ -127,10 +129,12 @@
|
|
|
127
129
|
]
|
|
128
130
|
},
|
|
129
131
|
"overrides": {
|
|
130
|
-
"storybook": "$storybook"
|
|
132
|
+
"storybook": "$storybook",
|
|
133
|
+
"playwright": "1.61.0"
|
|
131
134
|
},
|
|
132
135
|
"dependencies": {
|
|
133
136
|
"dompurify": "^3.4.7",
|
|
134
137
|
"wc-datepicker": "^0.10.0"
|
|
135
|
-
}
|
|
138
|
+
},
|
|
139
|
+
"sideEffects": true
|
|
136
140
|
}
|
|
@@ -24,6 +24,9 @@ export interface NysDropdownMenuProps extends Pick<
|
|
|
24
24
|
/** undefined */
|
|
25
25
|
for?: NysDropdownMenuElement["for"];
|
|
26
26
|
|
|
27
|
+
/** Accessible label for the menu. Used as `aria-label` on the `<ul role="menu">` element. */
|
|
28
|
+
label?: NysDropdownMenuElement["label"];
|
|
29
|
+
|
|
27
30
|
/** Preferred position relative to trigger. */
|
|
28
31
|
position?: NysDropdownMenuElement["position"];
|
|
29
32
|
|
|
@@ -2,13 +2,14 @@ import React, { forwardRef } from "react";
|
|
|
2
2
|
import "../../dist/nysds.es.js";
|
|
3
3
|
|
|
4
4
|
export const NysDropdownMenu = forwardRef((props, forwardedRef) => {
|
|
5
|
-
const { showDropdown, position, ...filteredProps } = props;
|
|
5
|
+
const { showDropdown, label, position, ...filteredProps } = props;
|
|
6
6
|
|
|
7
7
|
return React.createElement(
|
|
8
8
|
"nys-dropdownmenu",
|
|
9
9
|
{
|
|
10
10
|
...filteredProps,
|
|
11
11
|
for: props.for,
|
|
12
|
+
label: props.label,
|
|
12
13
|
position: props.position,
|
|
13
14
|
class: props.className,
|
|
14
15
|
exportparts: props.exportparts,
|
|
@@ -21,6 +21,9 @@ export interface NysGlobalFooterProps extends Pick<
|
|
|
21
21
|
/** Agency name displayed as the footer heading. */
|
|
22
22
|
agencyName?: NysGlobalFooterElement["agencyName"];
|
|
23
23
|
|
|
24
|
+
/** Optional subheading displayed below the agency name. */
|
|
25
|
+
agencySubheading?: NysGlobalFooterElement["agencySubheading"];
|
|
26
|
+
|
|
24
27
|
/** URL for the agency name link. If empty, name is not clickable. */
|
|
25
28
|
homepageLink?: NysGlobalFooterElement["homepageLink"];
|
|
26
29
|
|
|
@@ -2,13 +2,15 @@ import React, { forwardRef } from "react";
|
|
|
2
2
|
import "../../dist/nysds.es.js";
|
|
3
3
|
|
|
4
4
|
export const NysGlobalFooter = forwardRef((props, forwardedRef) => {
|
|
5
|
-
const { agencyName, homepageLink, ...filteredProps } =
|
|
5
|
+
const { agencyName, agencySubheading, homepageLink, ...filteredProps } =
|
|
6
|
+
props;
|
|
6
7
|
|
|
7
8
|
return React.createElement(
|
|
8
9
|
"nys-globalfooter",
|
|
9
10
|
{
|
|
10
11
|
...filteredProps,
|
|
11
12
|
agencyName: props.agencyName,
|
|
13
|
+
agencySubheading: props.agencySubheading,
|
|
12
14
|
homepageLink: props.homepageLink,
|
|
13
15
|
class: props.className,
|
|
14
16
|
exportparts: props.exportparts,
|
|
@@ -428,6 +428,8 @@ export type NysDropdownMenuProps = {
|
|
|
428
428
|
for?: string;
|
|
429
429
|
/** */
|
|
430
430
|
showDropdown?: boolean;
|
|
431
|
+
/** Accessible label for the menu. Used as `aria-label` on the `<ul role="menu">` element. */
|
|
432
|
+
label?: string;
|
|
431
433
|
/** Preferred position relative to trigger. */
|
|
432
434
|
position?: Position | null;
|
|
433
435
|
};
|
|
@@ -516,6 +518,8 @@ export type NysFileItemProps = {
|
|
|
516
518
|
export type NysGlobalFooterProps = {
|
|
517
519
|
/** Agency name displayed as the footer heading. */
|
|
518
520
|
agencyName?: string;
|
|
521
|
+
/** Optional subheading displayed below the agency name. */
|
|
522
|
+
agencySubheading?: string;
|
|
519
523
|
/** URL for the agency name link. If empty, name is not clickable. */
|
|
520
524
|
homepageLink?: string;
|
|
521
525
|
};
|