@nysds/components 1.19.2 → 1.19.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 +1184 -195
- package/dist/.vscode/vscode.html-custom-data.json +10 -10
- package/dist/custom-elements.json +1184 -195
- package/dist/nys-icon.library-ChLRj3i-.js +696 -0
- package/dist/nys-icon.library-ChLRj3i-.js.map +1 -0
- package/dist/nysds.es.js +1811 -1724
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +750 -147
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +35 -6
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +8 -3
- package/dist/packages/nys-alert/src/nys-alert.d.ts +81 -4
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +44 -4
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +70 -3
- package/dist/packages/nys-badge/src/nys-badge.d.ts +54 -4
- package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +75 -7
- package/dist/packages/nys-button/src/nys-button.d.ts +62 -7
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +5 -7
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +78 -1
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +164 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +64 -8
- package/dist/packages/nys-divider/src/nys-divider.d.ts +24 -1
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +19 -12
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +0 -10
- package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +10 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +94 -4
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +50 -7
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +65 -4
- package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -4
- package/dist/packages/nys-icon/src/icon-library-registry.d.ts +33 -16
- package/dist/packages/nys-icon/src/index.d.ts +2 -2
- package/dist/packages/nys-icon/src/nys-icon.d.ts +83 -6
- package/dist/packages/nys-label/src/nys-label.d.ts +32 -2
- package/dist/packages/nys-modal/src/nys-modal.d.ts +130 -5
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +11 -1
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +4 -3
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +74 -1
- package/dist/packages/nys-select/src/nys-option.d.ts +0 -8
- package/dist/packages/nys-select/src/nys-select.d.ts +141 -10
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +2 -2
- package/dist/packages/nys-stepper/src/nys-step.d.ts +0 -13
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +119 -69
- package/dist/packages/nys-tab/src/nys-tab.d.ts +17 -8
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +77 -15
- package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +0 -17
- package/dist/packages/nys-table/src/nys-table.d.ts +71 -0
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +52 -5
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +63 -9
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +40 -4
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +38 -6
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +10 -2
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +54 -8
- package/dist/packages/nys-video/src/nys-video.d.ts +65 -3
- package/package.json +11 -5
- package/packages/react/NysBreadcrumbs.d.ts +1 -1
- package/packages/react/NysButton.d.ts +2 -1
- package/packages/react/NysDropdownMenu.d.ts +1 -1
- package/packages/react/NysFileinput.d.ts +24 -2
- package/packages/react/NysFileinput.js +8 -1
- package/packages/react/NysGlobalHeader.d.ts +6 -1
- package/packages/react/NysLabel.d.ts +4 -1
- package/packages/react/NysTextarea.d.ts +1 -1
- package/packages/react/NysUnavHeader.d.ts +11 -1
- package/packages/react/NysUnavHeader.js +15 -1
- package/packages/react/nysds-jsx.d.ts +47 -10
|
@@ -15,21 +15,50 @@ import "./nys-accordionitem";
|
|
|
15
15
|
* @cssprop [--nys-accordion-background-color--header--hover] - Background hover color of the accordion header.
|
|
16
16
|
* @cssprop [--nys-accordion-content-max-width] - Maximum readable width of accordion content. Defaults to a character-based width (80ch) for readability.
|
|
17
17
|
*
|
|
18
|
-
* @example Basic
|
|
18
|
+
* @example Basic
|
|
19
19
|
* ```html
|
|
20
20
|
* <nys-accordion>
|
|
21
|
-
* <nys-accordionitem
|
|
22
|
-
*
|
|
21
|
+
* <nys-accordionitem id="accordionId1" heading="How do I renew my passport or apply for a new one?">
|
|
22
|
+
* <p>
|
|
23
|
+
* You can apply for or renew a U.S. passport through the U.S. Department
|
|
24
|
+
* of State. Some renewals can be done by mail.
|
|
25
|
+
* </p>
|
|
26
|
+
* <div style="display: flex; gap: 0.5rem; font-size: 1rem;">
|
|
27
|
+
* <a href="https://www.ny.gov" target="_blank">Check your registration</a>
|
|
28
|
+
* <a href="https://www.ny.gov" target="_blank">Fill out application</a>
|
|
29
|
+
* </div>
|
|
30
|
+
* </nys-accordionitem>
|
|
31
|
+
* <nys-accordionitem id="accordionId2" heading="How can I find out if I’m registered to vote?">
|
|
32
|
+
* <p>You can check your registration status, update your information, or find out how to register through the National Association of Secretaries of State.</p>
|
|
33
|
+
* </nys-accordionitem>
|
|
23
34
|
* </nys-accordion>
|
|
24
35
|
* ```
|
|
25
36
|
*
|
|
26
|
-
* @example Single
|
|
37
|
+
* @example Single Select
|
|
27
38
|
* ```html
|
|
28
|
-
* <nys-accordion singleSelect
|
|
29
|
-
* <nys-accordionitem heading="FAQ 1"
|
|
39
|
+
* <nys-accordion singleSelect>
|
|
40
|
+
* <nys-accordionitem heading="FAQ 1">Answer 1</nys-accordionitem>
|
|
30
41
|
* <nys-accordionitem heading="FAQ 2">Answer 2</nys-accordionitem>
|
|
31
42
|
* </nys-accordion>
|
|
32
43
|
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example Bordered
|
|
46
|
+
* ```html
|
|
47
|
+
*
|
|
48
|
+
* <nys-accordion bordered>
|
|
49
|
+
* <nys-accordionitem heading="We are a group of accordions">
|
|
50
|
+
* <p>Stronger together! Learn more at
|
|
51
|
+
* <a href="https://www.ny.gov" target="_blank">ny.gov</a>
|
|
52
|
+
* </p>
|
|
53
|
+
* </nys-accordionitem>
|
|
54
|
+
* <nys-accordionitem heading="Liberty Ipsum: Bridges & Boroughs">
|
|
55
|
+
* <p>Empire ipsum dolor sit amet, across the Brooklyn Bridge to Central Park, consectetur adipiscing elit.</p>
|
|
56
|
+
* </nys-accordionitem>
|
|
57
|
+
* <nys-accordionitem heading="Hudson Ipsum: Riverfront Stories">
|
|
58
|
+
* <p>From the banks of the Hudson to the peaks of the Adirondacks, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
|
59
|
+
* </nys-accordionitem>
|
|
60
|
+
* </nys-accordion>
|
|
61
|
+
* ```
|
|
33
62
|
*/
|
|
34
63
|
export declare class NysAccordion extends LitElement {
|
|
35
64
|
static styles: import("lit").CSSResult;
|
|
@@ -14,9 +14,14 @@ import { LitElement } from "lit";
|
|
|
14
14
|
*
|
|
15
15
|
* @example Expanded item
|
|
16
16
|
* ```html
|
|
17
|
-
* <nys-
|
|
18
|
-
* <
|
|
19
|
-
*
|
|
17
|
+
* <nys-accordion>
|
|
18
|
+
* <nys-accordionitem heading="How do I apply?" expanded>
|
|
19
|
+
* <p>Visit ny.gov and complete the online application.</p>
|
|
20
|
+
* </nys-accordionitem>
|
|
21
|
+
* <nys-accordionitem heading="What documents do I need?">
|
|
22
|
+
* <p>You will need a valid ID and proof of residency.</p>
|
|
23
|
+
* </nys-accordionitem>
|
|
24
|
+
* </nys-accordion>
|
|
20
25
|
* ```
|
|
21
26
|
*/
|
|
22
27
|
export declare class NysAccordionItem extends LitElement {
|
|
@@ -12,15 +12,92 @@ import { LitElement } from "lit";
|
|
|
12
12
|
*
|
|
13
13
|
* @fires nys-close - Fired when alert is dismissed. Detail: `{id, type, label}`.
|
|
14
14
|
*
|
|
15
|
-
* @example
|
|
15
|
+
* @example Basic
|
|
16
16
|
* ```html
|
|
17
|
-
* <nys-alert
|
|
17
|
+
* <nys-alert heading="This is a heading"></nys-alert>
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
* @example
|
|
20
|
+
* @example Text
|
|
21
21
|
* ```html
|
|
22
|
-
* <nys-alert
|
|
22
|
+
* <nys-alert
|
|
23
|
+
* heading="This is a heading"
|
|
24
|
+
* text="This is additional information passed in through the text property"
|
|
25
|
+
* ></nys-alert>
|
|
23
26
|
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example Rich Text
|
|
29
|
+
* ```html
|
|
30
|
+
* <nys-alert heading="Rich Text">
|
|
31
|
+
* <p>This is a custom alert with <strong>HTML content</strong> passed in through the slot.</p>
|
|
32
|
+
* <a href="https://www.ny.gov/" target="_blank">Learn more about our accessibility services</a>
|
|
33
|
+
* </nys-alert>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example Info Type
|
|
37
|
+
* ```html
|
|
38
|
+
* <nys-alert type="info" heading="Info alert type"></nys-alert>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example Success Type
|
|
42
|
+
* ```html
|
|
43
|
+
* <nys-alert type="success" heading="Success alert type"></nys-alert>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example Warning Type
|
|
47
|
+
* ```html
|
|
48
|
+
* <nys-alert type="warning" heading="Warning alert type"></nys-alert>
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @example Danger Type
|
|
52
|
+
* ```html
|
|
53
|
+
* <nys-alert type="danger" heading="Danger alert type"></nys-alert>
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example Emergency Type
|
|
57
|
+
* ```html
|
|
58
|
+
* <nys-alert type="emergency" heading="Emergency alert type"></nys-alert>
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @example Dismissible
|
|
62
|
+
* ```html
|
|
63
|
+
* <nys-alert heading="This alert is dismisable" text="Close it by clicking on the X in the corner." dismissible>
|
|
64
|
+
* </nys-alert>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @example Duration
|
|
68
|
+
* ```html
|
|
69
|
+
* <nys-alert heading="Disappearing alert" text="This alert will disappear after 3 seconds." duration="3000"></nys-alert>
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @render Duration
|
|
73
|
+
* ```html
|
|
74
|
+
* <nys-button
|
|
75
|
+
* class="nys-margin-b-100"
|
|
76
|
+
* label="Show alert"
|
|
77
|
+
* onclick="document.body.appendChild(Object.assign(document.createElement('nys-alert'), {heading: 'Disappearing alert', text: 'This alert will disappear after 3 seconds.', duration: 3000}))"
|
|
78
|
+
* ></nys-button>
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @example Custom Icon
|
|
82
|
+
* ```html
|
|
83
|
+
* <nys-alert
|
|
84
|
+
* type="emergency"
|
|
85
|
+
* heading="Winter storm warning: Dec 10th, 2024."
|
|
86
|
+
* text="A major snowfall is expected across the state of New York for the weekend of Dec 7th. Stay home if possible and use extreme caution when driving."
|
|
87
|
+
* icon="ac_unit">
|
|
88
|
+
* </nys-alert>
|
|
89
|
+
*```
|
|
90
|
+
|
|
91
|
+
* @example Action Links
|
|
92
|
+
* ```html
|
|
93
|
+
* <nys-alert
|
|
94
|
+
* heading="Alert with links"
|
|
95
|
+
* primaryLabel="{primaryAction}"
|
|
96
|
+
* secondaryLabel="{secondaryAction}"
|
|
97
|
+
* primaryAction="https://www.ny.gov/"
|
|
98
|
+
* secondaryAction="https://www.ny.gov/"
|
|
99
|
+
* ></nys-alert>
|
|
100
|
+
*```
|
|
24
101
|
*/
|
|
25
102
|
export declare class NysAlert extends LitElement {
|
|
26
103
|
static styles: import("lit").CSSResult;
|
|
@@ -10,14 +10,54 @@ import { LitElement } from "lit";
|
|
|
10
10
|
*
|
|
11
11
|
* @slot - Custom icon content. Overrides default icon when no image or initials.
|
|
12
12
|
*
|
|
13
|
-
* @example
|
|
13
|
+
* @example Basic
|
|
14
14
|
* ```html
|
|
15
|
-
* <nys-avatar
|
|
15
|
+
* <nys-avatar ariaLabel="User avatar"></nys-avatar>
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
|
-
* @example
|
|
18
|
+
* @example Image
|
|
19
19
|
* ```html
|
|
20
|
-
* <nys-avatar
|
|
20
|
+
* <nys-avatar
|
|
21
|
+
* image="path/to/img.png"
|
|
22
|
+
* ariaLabel="Jane Smith"
|
|
23
|
+
* ></nys-avatar>
|
|
24
|
+
* ```
|
|
25
|
+
* @render Image
|
|
26
|
+
* ```html
|
|
27
|
+
* <nys-avatar
|
|
28
|
+
* image="https://images.unsplash.com/photo-1523712999610-f77fbcfc3843?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
|
|
29
|
+
* ariaLabel="Jane Smith"
|
|
30
|
+
* ></nys-avatar>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @example Initials
|
|
34
|
+
* ```html
|
|
35
|
+
* <nys-avatar initials="JS" ariaLabel="Jane Smith"></nys-avatar>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example Icon
|
|
39
|
+
* ```html
|
|
40
|
+
* <nys-avatar icon="account_circle"></nys-avatar>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example Interactive
|
|
44
|
+
* ```html
|
|
45
|
+
* <nys-avatar interactive></nys-avatar>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example Disabled
|
|
49
|
+
* ```html
|
|
50
|
+
* <nys-avatar disabled></nys-avatar>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example Custom Background Color
|
|
54
|
+
* ```html
|
|
55
|
+
* <nys-avatar color="var(--nys-color-red-500)" interactive></nys-avatar>
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @example Lazy Loading
|
|
59
|
+
* ```html
|
|
60
|
+
* <nys-avatar lazy></nys-avatar>
|
|
21
61
|
* ```
|
|
22
62
|
*/
|
|
23
63
|
export declare class NysAvatar extends LitElement {
|
|
@@ -16,7 +16,7 @@ import { LitElement } from "lit";
|
|
|
16
16
|
* @summary Floating back-to-top button with auto-show behavior, smooth scroll, and focus management.
|
|
17
17
|
* @element nys-backtotop
|
|
18
18
|
*
|
|
19
|
-
* @example
|
|
19
|
+
* @example Basic
|
|
20
20
|
* ```html
|
|
21
21
|
* <footer>
|
|
22
22
|
* <nys-backtotop></nys-backtotop>
|
|
@@ -24,9 +24,76 @@ import { LitElement } from "lit";
|
|
|
24
24
|
* </footer>
|
|
25
25
|
* ```
|
|
26
26
|
*
|
|
27
|
-
* @
|
|
27
|
+
* @render Basic
|
|
28
28
|
* ```html
|
|
29
|
-
* <
|
|
29
|
+
* <style>
|
|
30
|
+
* code {
|
|
31
|
+
* white-space: nowrap;
|
|
32
|
+
* padding: var(--nys-space-1px) var(--nys-space-2px);
|
|
33
|
+
* border-radius: var(--nys-radius-md);
|
|
34
|
+
* color: var(--nys-color-red-600);
|
|
35
|
+
* background: var(--nys-color-neutral-10);
|
|
36
|
+
* font-size: var(--nys-font-size-sm);
|
|
37
|
+
* }
|
|
38
|
+
* </style>
|
|
39
|
+
* <nys-unavheader hideTranslate hideSearch></nys-unavheader>
|
|
40
|
+
* <nys-globalheader appName="Back to Top Example"></nys-globalheader>
|
|
41
|
+
* <main style="padding: 0 2rem">
|
|
42
|
+
* <h1>Sample Content on page</h1>
|
|
43
|
+
* <p>
|
|
44
|
+
* This is a sample content area used to demonstrate the functionality of
|
|
45
|
+
* the Back to Top button. In an actual application,
|
|
46
|
+
* <code>nys-backtotop</code> would not be visible until the user scrolls
|
|
47
|
+
* down the page.
|
|
48
|
+
* </p>
|
|
49
|
+
* </main>
|
|
50
|
+
* <footer>
|
|
51
|
+
* <nys-backtotop visible></nys-backtotop>
|
|
52
|
+
* <nys-unavfooter></nys-unavfooter>
|
|
53
|
+
* </footer>
|
|
54
|
+
* ```
|
|
55
|
+
* @example Left
|
|
56
|
+
* ```html
|
|
57
|
+
* <footer>
|
|
58
|
+
* <nys-backtotop position="left"></nys-backtotop>
|
|
59
|
+
* <!-- Other footer content -->
|
|
60
|
+
* </footer>
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @render Left
|
|
64
|
+
* ```html
|
|
65
|
+
* <style>
|
|
66
|
+
* code {
|
|
67
|
+
* white-space: nowrap;
|
|
68
|
+
* padding: var(--nys-space-1px) var(--nys-space-2px);
|
|
69
|
+
* border-radius: var(--nys-radius-md);
|
|
70
|
+
* color: var(--nys-color-red-600);
|
|
71
|
+
* background: var(--nys-color-neutral-10);
|
|
72
|
+
* font-size: var(--nys-font-size-sm);
|
|
73
|
+
* }
|
|
74
|
+
* nys-button {
|
|
75
|
+
* position: fixed;
|
|
76
|
+
* bottom: 1rem;
|
|
77
|
+
* right: 1rem;
|
|
78
|
+
* --_nys-button-border-radius: var(--nys-radius-round);
|
|
79
|
+
* }
|
|
80
|
+
* </style>
|
|
81
|
+
* <nys-unavheader hideTranslate hideSearch></nys-unavheader>
|
|
82
|
+
* <nys-globalheader appName="Back to Top Example"></nys-globalheader>
|
|
83
|
+
* <main style="padding: 0 2rem">
|
|
84
|
+
* <h1>Sample Content on page</h1>
|
|
85
|
+
* <p>
|
|
86
|
+
* This is a sample content area used to demonstrate the functionality of
|
|
87
|
+
* the Back to Top button. In an actual application,
|
|
88
|
+
* <code>nys-backtotop</code> would not be visible until the user scrolls
|
|
89
|
+
* down the page.
|
|
90
|
+
* </p>
|
|
91
|
+
* </main>
|
|
92
|
+
* <footer>
|
|
93
|
+
* <nys-backtotop visible position="left"></nys-backtotop>
|
|
94
|
+
* <nys-button prefixIcon="sms" variant="outline" label="Chat with us" size="sm"></nys-button>
|
|
95
|
+
* <nys-unavfooter></nys-unavfooter>
|
|
96
|
+
* </footer>
|
|
30
97
|
* ```
|
|
31
98
|
*/
|
|
32
99
|
export declare class NysBacktotop extends LitElement {
|
|
@@ -9,14 +9,64 @@ import { LitElement } from "lit";
|
|
|
9
9
|
* @summary Compact label for status, counts, or categorization with semantic styling.
|
|
10
10
|
* @element nys-badge
|
|
11
11
|
*
|
|
12
|
-
* @example
|
|
12
|
+
* @example Basic
|
|
13
13
|
* ```html
|
|
14
|
-
* <nys-badge
|
|
14
|
+
* <nys-badge label="Basic badge"></nys-badge>
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
-
* @example
|
|
17
|
+
* @example Error Intent
|
|
18
18
|
* ```html
|
|
19
|
-
* <nys-badge
|
|
19
|
+
* <nys-badge label="Error" intent="error" prefixIcon></nys-badge>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example Warning Intent
|
|
23
|
+
* ```html
|
|
24
|
+
* <nys-badge label="Warning" intent="warning" prefixIcon></nys-badge>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example Success Intent
|
|
28
|
+
* ```html
|
|
29
|
+
* <nys-badge label="Success" intent="success" prefixIcon></nys-badge>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example Strong Neutral
|
|
33
|
+
* ```html
|
|
34
|
+
* <nys-badge variant="strong" label="Neutral" prefixIcon></nys-badge>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example Strong Error
|
|
38
|
+
* ```html
|
|
39
|
+
* <nys-badge variant="strong" label="Error" intent="error" prefixIcon></nys-badge>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example Strong Warning
|
|
43
|
+
* ```html
|
|
44
|
+
* <nys-badge variant="strong" label="Warning" intent="warning" prefixIcon></nys-badge>
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example Strong Success
|
|
48
|
+
* ```html
|
|
49
|
+
* <nys-badge variant="strong" label="Success" intent="success" prefixIcon></nys-badge>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example Custom Prefix Icon
|
|
53
|
+
* ```html
|
|
54
|
+
* <nys-badge label="Custom prefixIcon" prefixIcon="check"></nys-badge>
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @example Custom Suffix Icon
|
|
58
|
+
* ```html
|
|
59
|
+
* <nys-badge label="Custom suffixIcon" suffixIcon="check"></nys-badge>
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @example Size Small
|
|
63
|
+
* ```html
|
|
64
|
+
* <nys-badge label="Small" size="sm"></nys-badge>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @example Screen reader text
|
|
68
|
+
* ```html
|
|
69
|
+
* <nys-badge intent="warning" label="Caution" prefixIcon srText="concern"></nys-badge>
|
|
20
70
|
* ```
|
|
21
71
|
*/
|
|
22
72
|
export declare class NysBadge extends LitElement {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
|
-
* A breadcrumb navigation trail composed of `
|
|
3
|
+
* A breadcrumb navigation trail composed of `li` elements.
|
|
4
4
|
* Collapses when the trail exceeds 5 items on desktop or 3 items on mobile,
|
|
5
5
|
* showing the first, last, and item before the current page, with an ellipsis to expand.
|
|
6
6
|
* A single item renders as a back-to-parent link instead of a trail.
|
|
@@ -8,32 +8,32 @@ import { LitElement } from "lit";
|
|
|
8
8
|
* @summary Breadcrumb navigation trail with responsive collapse support.
|
|
9
9
|
* @element nys-breadcrumbs
|
|
10
10
|
*
|
|
11
|
-
* @slot - One or more `
|
|
11
|
+
* @slot - One or more `li` elements defining the trail.
|
|
12
12
|
*
|
|
13
13
|
* @fires nys-breadcrumbs-expand - Fired when the user clicks the ellipsis to expand the trail.
|
|
14
14
|
*
|
|
15
|
-
* @example
|
|
15
|
+
* @example Basic
|
|
16
16
|
* ```html
|
|
17
17
|
* <nys-breadcrumbs>
|
|
18
18
|
* <ol>
|
|
19
19
|
* <li><a href="/">Home</a></li>
|
|
20
20
|
* <li><a href="/services">Services</a></li>
|
|
21
|
-
* <li>Current Page</li>
|
|
22
21
|
* </ol>
|
|
23
22
|
* </nys-breadcrumbs>
|
|
24
23
|
* ```
|
|
25
24
|
*
|
|
26
|
-
* @example
|
|
25
|
+
* @example Current page
|
|
27
26
|
* ```html
|
|
28
27
|
* <nys-breadcrumbs>
|
|
29
28
|
* <ol>
|
|
30
29
|
* <li><a href="/">Home</a></li>
|
|
31
30
|
* <li><a href="/services">Services</a></li>
|
|
31
|
+
* <li>Current Page</li>
|
|
32
32
|
* </ol>
|
|
33
33
|
* </nys-breadcrumbs>
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
|
-
* @example Single item
|
|
36
|
+
* @example Single item list
|
|
37
37
|
* ```html
|
|
38
38
|
* <nys-breadcrumbs>
|
|
39
39
|
* <ol>
|
|
@@ -41,6 +41,74 @@ import { LitElement } from "lit";
|
|
|
41
41
|
* </ol>
|
|
42
42
|
* </nys-breadcrumbs>
|
|
43
43
|
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example Long list
|
|
46
|
+
* ```html
|
|
47
|
+
* <nys-breadcrumbs>
|
|
48
|
+
* <ol>
|
|
49
|
+
* <li><a href="/">Home</a></li>
|
|
50
|
+
* <li><a href="/government">Government</a></li>
|
|
51
|
+
* <li><a href="/government/agencies">Agencies</a></li>
|
|
52
|
+
* <li><a href="/government/agencies/parks">Parks & Recreation</a></li>
|
|
53
|
+
* <li><a href="/parks/state-parks">State Parks</a></li>
|
|
54
|
+
* <li><a href="/parks/state-parks/delaware">Delaware Region</a></li>
|
|
55
|
+
* <li><a href="/parks/state-parks/delaware/water-gap">Delaware Water Gap</a></li>
|
|
56
|
+
* <li>Trail Conditions</li>
|
|
57
|
+
* </ol>
|
|
58
|
+
* </nys-breadcrumbs>
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @example Size small
|
|
62
|
+
* ```html
|
|
63
|
+
* <nys-breadcrumbs size="sm">
|
|
64
|
+
* <ol>
|
|
65
|
+
* <li><a href="/">Home</a></li>
|
|
66
|
+
* <li><a href="/government">Government</a></li>
|
|
67
|
+
* <li><a href="/government/agencies">Agencies</a></li>
|
|
68
|
+
* <li>Parks & Recreation</li>
|
|
69
|
+
* </ol>
|
|
70
|
+
* </nys-breadcrumbs>
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @example Back to parent (mobile)
|
|
74
|
+
* ```html
|
|
75
|
+
* <nys-breadcrumbs backToParent>
|
|
76
|
+
* <ol>
|
|
77
|
+
* <li><a href="/">Home</a></li>
|
|
78
|
+
* <li><a href="/government">Government</a></li>
|
|
79
|
+
* <li><a href="/government/agencies">Agencies</a></li>
|
|
80
|
+
* <li><a href="/government/agencies/parks">Parks & Recreation</a></li>
|
|
81
|
+
* <li><a href="/parks/state-parks">State Parks</a></li>
|
|
82
|
+
* <li><a href="/parks/state-parks/delaware">Delaware Region</a></li>
|
|
83
|
+
* <li><a href="/parks/state-parks/delaware/water-gap">Delaware Water Gap</a></li>
|
|
84
|
+
* <li>Trail Conditions</li>
|
|
85
|
+
* </ol>
|
|
86
|
+
* </nys-breadcrumbs>
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @example Background bar
|
|
90
|
+
* ```html
|
|
91
|
+
* <nys-breadcrumbs backgroundBar>
|
|
92
|
+
* <ol>
|
|
93
|
+
* <li><a href="/">Home</a></li>
|
|
94
|
+
* <li><a href="/services">Services</a></li>
|
|
95
|
+
* <li><a href="/tickets">Ticket System</a></li>
|
|
96
|
+
* <li>Del Water Gap</li>
|
|
97
|
+
* </ol>
|
|
98
|
+
* </nys-breadcrumbs>
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @example Disabled
|
|
102
|
+
* ```html
|
|
103
|
+
* <nys-breadcrumbs disabled>
|
|
104
|
+
* <ol>
|
|
105
|
+
* <li><a href="/">Home</a></li>
|
|
106
|
+
* <li><a href="/services">Services</a></li>
|
|
107
|
+
* <li><a href="/tickets">Ticket System</a></li>
|
|
108
|
+
* <li>Del Water Gap</li>
|
|
109
|
+
* </ol>
|
|
110
|
+
* </nys-breadcrumbs>
|
|
111
|
+
* ```
|
|
44
112
|
*/
|
|
45
113
|
export declare class NysBreadcrumbs extends LitElement {
|
|
46
114
|
static styles: import("lit").CSSResult;
|
|
@@ -57,7 +125,7 @@ export declare class NysBreadcrumbs extends LitElement {
|
|
|
57
125
|
* Controls the visual size of the breadcrumb text and spacing: `sm` for dense layouts, `md` (default) for standard use.
|
|
58
126
|
* @default "md"
|
|
59
127
|
*/
|
|
60
|
-
size: "sm" | "md"
|
|
128
|
+
size: "sm" | "md";
|
|
61
129
|
/**
|
|
62
130
|
* On mobile, renders the trail as a single back-to-parent link pointing to the item before the current page.
|
|
63
131
|
* Has no effect on desktop or when only one item is present (which always renders as a back link).
|
|
@@ -8,6 +8,7 @@ import { LitElement } from "lit";
|
|
|
8
8
|
* @summary Button for actions and CTAs with variants, sizes, and icon support.
|
|
9
9
|
* @element nys-button
|
|
10
10
|
*
|
|
11
|
+
* @slot - Button label text. Use as fallback when `label` prop is not provided.
|
|
11
12
|
* @slot prefix-icon - Icon before label. Not shown for `text` variant.
|
|
12
13
|
* @slot suffix-icon - Icon after label. Not shown for `text` variant.
|
|
13
14
|
* @slot circle-icon - Icon for circle mode. Overrides `icon` prop.
|
|
@@ -26,33 +27,85 @@ import { LitElement } from "lit";
|
|
|
26
27
|
* @fires nys-focus - Fired when the button receives focus.
|
|
27
28
|
* @fires nys-blur - Fired when the button loses focus.
|
|
28
29
|
*
|
|
29
|
-
* @example Basic
|
|
30
|
+
* @example Basic
|
|
30
31
|
* ```html
|
|
31
|
-
* <nys-button label="
|
|
32
|
+
* <nys-button label="Button" variant="filled"></nys-button>
|
|
32
33
|
* ```
|
|
33
34
|
*
|
|
34
|
-
* @example
|
|
35
|
+
* @example Variant Outline
|
|
35
36
|
* ```html
|
|
36
|
-
* <nys-button label="
|
|
37
|
+
* <nys-button label="Button" variant="outline"></nys-button>
|
|
37
38
|
* ```
|
|
38
39
|
*
|
|
39
|
-
* @example
|
|
40
|
+
* @example Variant Ghost
|
|
41
|
+
* ```html
|
|
42
|
+
* <nys-button label="Button" variant="ghost"></nys-button>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example Variant Text
|
|
46
|
+
* ```html
|
|
47
|
+
* <nys-button label="Button" variant="text"></nys-button>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @example Prefix Icon
|
|
40
51
|
* ```html
|
|
41
52
|
* <nys-button label="Previous" prefixIcon="chevron_left"></nys-button>
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example Suffix Icon
|
|
56
|
+
* ```html
|
|
42
57
|
* <nys-button label="Next" suffixIcon="chevron_right"></nys-button>
|
|
43
58
|
* ```
|
|
44
59
|
*
|
|
60
|
+
* @example Slotted Icons
|
|
61
|
+
* ```html
|
|
62
|
+
* <nys-button label="Slotted icons">
|
|
63
|
+
* <nys-icon color="#db117d" slot="prefix-icon" name="chevron_left"></nys-icon>
|
|
64
|
+
* <nys-icon color="#db117d" slot="suffix-icon" name="chevron_right"></nys-icon>
|
|
65
|
+
* </nys-button>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
45
68
|
* @example Circle icon button
|
|
46
69
|
* ```html
|
|
47
70
|
* <nys-button circle icon="close" label="Close dialog"></nys-button>
|
|
48
71
|
* ```
|
|
49
72
|
*
|
|
50
|
-
* @example
|
|
73
|
+
* @example Size Small
|
|
74
|
+
* ```html
|
|
75
|
+
* <nys-button label="Small" size="sm"></nys-button>
|
|
76
|
+
* ```
|
|
77
|
+
* @example Size Large
|
|
78
|
+
* ```html
|
|
79
|
+
* <nys-button label="Large" size="lg"></nys-button>
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @example Full width
|
|
83
|
+
* ```html
|
|
84
|
+
* <nys-button label="Full width" fullWidth></nys-button>
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @example Inverted
|
|
88
|
+
* ```html
|
|
89
|
+
* <nys-button label="Inverted" inverted></nys-button>
|
|
90
|
+
* ```
|
|
91
|
+
* @render Inverted
|
|
92
|
+
* ```html
|
|
93
|
+
* <div style="background: #1b1b1b; padding: 1rem;">
|
|
94
|
+
* <nys-button label="Inverted" inverted></nys-button>
|
|
95
|
+
* </div>
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* @example Disabled
|
|
99
|
+
* ```html
|
|
100
|
+
* <nys-button label="Disabled" disabled></nys-button>
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @example Href
|
|
51
104
|
* ```html
|
|
52
105
|
* <nys-button label="Visit NY.gov" href="https://www.ny.gov/" target="_blank" suffixIcon="open_in_new"></nys-button>
|
|
53
106
|
* ```
|
|
54
107
|
*
|
|
55
|
-
* @example
|
|
108
|
+
* @example Type
|
|
56
109
|
* ```html
|
|
57
110
|
* <nys-button type="submit" label="Save Changes" variant="filled"></nys-button>
|
|
58
111
|
* ```
|
|
@@ -162,6 +215,7 @@ export declare class NysButton extends LitElement {
|
|
|
162
215
|
private _internals;
|
|
163
216
|
private _hasPrefixSlot;
|
|
164
217
|
private _hasSuffixSlot;
|
|
218
|
+
private _hasCircleSlot;
|
|
165
219
|
/**
|
|
166
220
|
* Lifecycle methods
|
|
167
221
|
* --------------------------------------------------------------------------
|
|
@@ -176,6 +230,7 @@ export declare class NysButton extends LitElement {
|
|
|
176
230
|
private _generateUniqueId;
|
|
177
231
|
private _onPrefixSlotChange;
|
|
178
232
|
private _onSuffixSlotChange;
|
|
233
|
+
private _onCircleSlotChange;
|
|
179
234
|
private _manageFormAction;
|
|
180
235
|
/**
|
|
181
236
|
* Event Handlers
|
|
@@ -17,17 +17,14 @@ import "./nys-checkboxgroup";
|
|
|
17
17
|
* @fires nys-blur - Fired when checkbox loses focus.
|
|
18
18
|
* @fires nys-other-input - Fired when "other" text input value changes. Detail: `{id, name, value}`.
|
|
19
19
|
*
|
|
20
|
-
* @example Single
|
|
20
|
+
* @example Single
|
|
21
21
|
* ```html
|
|
22
|
-
* <nys-checkbox label="I agree to the terms" name="terms"
|
|
22
|
+
* <nys-checkbox label="I agree to the terms" name="terms"></nys-checkbox>
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
|
-
* @example
|
|
25
|
+
* @example Preselected
|
|
26
26
|
* ```html
|
|
27
|
-
* <nys-
|
|
28
|
-
* <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
|
|
29
|
-
* <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
|
|
30
|
-
* </nys-checkboxgroup>
|
|
27
|
+
* <nys-checkbox label="I agree to the terms" name="terms" checked></nys-checkbox>
|
|
31
28
|
* ```
|
|
32
29
|
*/
|
|
33
30
|
export declare class NysCheckbox extends LitElement {
|
|
@@ -106,6 +103,7 @@ export declare class NysCheckbox extends LitElement {
|
|
|
106
103
|
private _handleInvalid;
|
|
107
104
|
private _manageLabelClick;
|
|
108
105
|
get _hasDescription(): boolean;
|
|
106
|
+
get _isStandalone(): boolean;
|
|
109
107
|
/**
|
|
110
108
|
* Event Handlers
|
|
111
109
|
* --------------------------------------------------------------------------
|