@nysds/components 1.19.3-alpha-1 → 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.
Files changed (65) hide show
  1. package/custom-elements.json +1156 -195
  2. package/dist/.vscode/vscode.html-custom-data.json +10 -10
  3. package/dist/custom-elements.json +1156 -195
  4. package/dist/nys-icon.library-ChLRj3i-.js +696 -0
  5. package/dist/nys-icon.library-ChLRj3i-.js.map +1 -0
  6. package/dist/nysds.es.js +1747 -1676
  7. package/dist/nysds.es.js.map +1 -1
  8. package/dist/nysds.js +750 -147
  9. package/dist/nysds.js.map +1 -1
  10. package/dist/packages/nys-accordion/src/nys-accordion.d.ts +35 -6
  11. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +8 -3
  12. package/dist/packages/nys-alert/src/nys-alert.d.ts +81 -4
  13. package/dist/packages/nys-avatar/src/nys-avatar.d.ts +44 -4
  14. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +70 -3
  15. package/dist/packages/nys-badge/src/nys-badge.d.ts +54 -4
  16. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +75 -7
  17. package/dist/packages/nys-button/src/nys-button.d.ts +62 -7
  18. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +5 -7
  19. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +75 -1
  20. package/dist/packages/nys-combobox/src/nys-combobox.d.ts +164 -0
  21. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +64 -8
  22. package/dist/packages/nys-divider/src/nys-divider.d.ts +24 -1
  23. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +19 -12
  24. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +0 -10
  25. package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +10 -0
  26. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +94 -4
  27. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +50 -7
  28. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +65 -4
  29. package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -4
  30. package/dist/packages/nys-icon/src/icon-library-registry.d.ts +33 -16
  31. package/dist/packages/nys-icon/src/index.d.ts +2 -2
  32. package/dist/packages/nys-icon/src/nys-icon.d.ts +83 -6
  33. package/dist/packages/nys-label/src/nys-label.d.ts +32 -2
  34. package/dist/packages/nys-modal/src/nys-modal.d.ts +130 -5
  35. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +11 -1
  36. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +4 -3
  37. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +74 -1
  38. package/dist/packages/nys-select/src/nys-option.d.ts +0 -8
  39. package/dist/packages/nys-select/src/nys-select.d.ts +141 -10
  40. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +2 -2
  41. package/dist/packages/nys-stepper/src/nys-step.d.ts +0 -13
  42. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +119 -69
  43. package/dist/packages/nys-tab/src/nys-tab.d.ts +17 -8
  44. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +77 -15
  45. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +0 -17
  46. package/dist/packages/nys-table/src/nys-table.d.ts +71 -0
  47. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +52 -5
  48. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +63 -9
  49. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +40 -4
  50. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +38 -6
  51. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +10 -2
  52. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +54 -8
  53. package/dist/packages/nys-video/src/nys-video.d.ts +65 -3
  54. package/package.json +11 -5
  55. package/packages/react/NysBreadcrumbs.d.ts +1 -1
  56. package/packages/react/NysButton.d.ts +2 -1
  57. package/packages/react/NysDropdownMenu.d.ts +1 -1
  58. package/packages/react/NysFileinput.d.ts +24 -2
  59. package/packages/react/NysFileinput.js +8 -1
  60. package/packages/react/NysGlobalHeader.d.ts +6 -1
  61. package/packages/react/NysLabel.d.ts +4 -1
  62. package/packages/react/NysTextarea.d.ts +1 -1
  63. package/packages/react/NysUnavHeader.d.ts +11 -1
  64. package/packages/react/NysUnavHeader.js +15 -1
  65. package/packages/react/nysds-jsx.d.ts +47 -10
@@ -10,17 +10,60 @@ import { LitElement } from "lit";
10
10
  *
11
11
  * @slot - Footer content (links, contact info). Use `<h4>` for column headings.
12
12
  *
13
- * @example Simple footer
13
+ * @example Basic
14
+ * ```html
15
+ * <nys-globalfooter agencyName="Office of Information Technology Services"></nys-globalfooter>
16
+ * ```
17
+ *
18
+ * @example Homepage Link
14
19
  * ```html
15
20
  * <nys-globalfooter
16
- * agencyName="Department of Health"
17
- * homepageLink="/"
18
- * agencySubheading="Protecting and Promoting the Health of New Yorkers"
19
- * >
20
- * <span>123 Main St, Albany NY</span>
21
- * <span>info@health.ny.gov</span>
21
+ * agencyName="Office of Information Technology Services"
22
+ * homepageLink="https://its.ny.gov"
23
+ * ></nys-globalfooter>
24
+ * ```
25
+ *
26
+ * @example Menu Links
27
+ * ```html
28
+ * <nys-globalfooter agencyName="Office of Information Technology Services">
29
+ * <ul>
30
+ * <li><a href="https://its.ny.gov">ITS Home</a></li>
31
+ * <li><a href="https://its.ny.gov/about-us">About ITS</a></li>
32
+ * </ul>
33
+ * </nys-globalfooter>
34
+ * ```
35
+ *
36
+ * @example Column Links
37
+ * ```html
38
+ * <nys-globalfooter agencyName="Office of Information Technology Services">
39
+ * <ul>
40
+ * <li>
41
+ * <span>About</span>
42
+ * <ul>
43
+ * <li><a href="https://its.ny.gov/about-us">About ITS</a></li>
44
+ * <li><a href="https://its.ny.gov/contact-us">Contact</a></li>
45
+ * <li><a href="https://its.ny.gov/policies">Policies</a></li>
46
+ * </ul>
47
+ * </li>
48
+ * <li>
49
+ * <span>Resources</span>
50
+ * <ul>
51
+ * <li><a href="https://its.ny.gov/resources">Developer Tools</a></li>
52
+ * <li><a href="https://its.ny.gov/accessibility">Accessibility</a></li>
53
+ * <li><a href="https://its.ny.gov/privacy">Privacy</a></li>
54
+ * </ul>
55
+ * </li>
56
+ * </ul>
22
57
  * </nys-globalfooter>
23
58
  * ```
59
+ *
60
+ * @example Subheading
61
+ * ```html
62
+ * <nys-globalfooter
63
+ * agencyName="Office of Information Technology Services"
64
+ * agencySubheading="Innovating Technology for a Better New York"
65
+ * ></nys-globalfooter>
66
+ * ```
24
67
  */
25
68
  export declare class NysGlobalFooter extends LitElement {
26
69
  static styles: import("lit").CSSResult;
@@ -9,12 +9,67 @@ import { LitElement } from "lit";
9
9
  * @element nys-globalheader
10
10
  *
11
11
  * @slot - Navigation content (typically `<ul>` with `<li><a>` links). Auto-sanitized.
12
+ * @slot user-actions - User-account controls (e.g. profile link, settings, log-out button) shown in the header.
12
13
  *
13
- * @example Basic header
14
+ *
15
+ * @example Basic
16
+ * ```html
17
+ * <nys-globalheader appName="User Registration Form" agencyName="Office of Information Technology Services"></nys-globalheader>
18
+ * ```
19
+ *
20
+ * @example Homepage Link
14
21
  * ```html
15
- * <nys-globalheader appName="My App" agencyName="Department of Health" homepageLink="/">
16
- * <ul><li><a href="/about">About</a></li><li><a href="/contact">Contact</a></li></ul>
22
+ * <nys-globalheader
23
+ * agencyName="Office of Information Technology Services"
24
+ * homepageLink="https://its.ny.gov"
25
+ * ></nys-globalheader>
26
+ * ```
27
+ *
28
+ * @example Only Agency Name
29
+ * ```html
30
+ * <nys-globalheader agencyName="Office of Information Technology Services"></nys-globalheader>
31
+ * ```
32
+ *
33
+ * @example Only App Name
34
+ * ```html
35
+ * <nys-globalheader appName="User Registration Form"></nys-globalheader>
36
+ * ```
37
+ *
38
+ * @example With Links
39
+ * ```html
40
+ * <nys-globalheader agencyName="Office of Information Technology Services">
41
+ * <ul>
42
+ * <li><a href="https://its.ny.gov/services">Services</a></li>
43
+ * <li><a href="https://its.ny.gov/get-help">Help Center</a></li>
44
+ * <li><a href="https://its.ny.gov/cybersecurity">Cybersecurity</a></li>
45
+ * <li><a href="https://its.ny.gov/policies">Policies and Laws</a></li>
46
+ * <li><a href="https://its.ny.gov/procurement">Procurement</a></li>
47
+ * <li><a href="https://its.ny.gov/about-us">About Us</a></li>
48
+ * </ul>
49
+ * </nys-globalheader>
50
+ * ```
51
+ * @example User Actions
52
+ * ```html
53
+ * <nys-globalheader agencyName="Office of Information Technology Services">
54
+ * <nys-button slot="user-actions" label="Log out">
55
+ * <nys-avatar
56
+ * slot="prefix-icon"
57
+ * ariaLabel="User avatar"
58
+ * initials="NY"
59
+ * ></nys-avatar>
60
+ * </nys-button>
17
61
  * </nys-globalheader>
62
+ * <nys-dropdownmenu id="dropdownmenu" for="my-action-slot">
63
+ * <nys-dropdownmenuitem label="Profile" href="/profile"></nys-dropdownmenuitem>
64
+ * <nys-dropdownmenuitem label="Repositories & Github Pages" href="/repos"></nys-dropdownmenuitem>
65
+ * <nys-dropdownmenuitem label="Organizations" href="/organizations" disabled></nys-dropdownmenuitem>
66
+ * <nys-dropdownmenuitem label="Sign out" href="/logout"></nys-dropdownmenuitem>
67
+ * </nys-dropdownmenu>
68
+ * ```
69
+ *
70
+ * @example With NYS Logo
71
+ * ```html
72
+ * <nys-globalheader nysLogo appName="Admin Dashboard"></nys-globalheader>
18
73
  * ```
19
74
  */
20
75
  export declare class NysGlobalHeader extends LitElement {
@@ -25,7 +80,13 @@ export declare class NysGlobalHeader extends LitElement {
25
80
  agencyName: string;
26
81
  /** URL for the header title link. If empty, title is not clickable. */
27
82
  homepageLink: string;
28
- /** Toggles the NYS brand mark */
83
+ /**
84
+ * Displays the NYS brand mark in the header. Off by default.
85
+ *
86
+ * Enable only for internal, state-employee (back-office) applications that omit
87
+ * `nys-unavheader`. Any resident-facing app — even one requiring login — should
88
+ * keep `nys-unavheader` for trust and leave this off.
89
+ */
29
90
  nysLogo: boolean;
30
91
  /** Internal state to track mobile menu open/closed status. */
31
92
  private _isMobileMenuOpen;
@@ -1,11 +1,18 @@
1
1
  /**
2
2
  * Icon Cache
3
3
  *
4
- * Shared SVG fetch and parse cache. Deduplicates concurrent requests
5
- * for the same icon URL. Each consumer gets a cloned SVGElement via
6
- * `cloneNode(true)` so DOM nodes are never shared.
4
+ * Shared SVG sanitize/parse pipeline and caches. URL-based icons (custom
5
+ * libraries) are fetched once per URL; inline SVG sources (the built-in
6
+ * NYSDS set) are parsed once per source string. Each consumer gets a
7
+ * cloned SVGElement via `cloneNode(true)` so DOM nodes are never shared.
7
8
  */
8
9
  /** Fetch and parse an SVG from a URL. Returns a cloned SVGElement (safe for multiple consumers). */
9
10
  export declare function fetchIcon(url: string): Promise<SVGElement>;
10
- /** Clear one or all entries from the cache. */
11
+ /**
12
+ * Parse an inline SVG source string. Results are cached by source content,
13
+ * so repeated renders of the same icon sanitize/parse once. Returns a
14
+ * cloned SVGElement (safe for multiple consumers).
15
+ */
16
+ export declare function parseIcon(source: string): SVGElement;
17
+ /** Clear one URL entry, or all cached icons (URL and inline) when no URL is given. */
11
18
  export declare function clearIconCache(url?: string): void;
@@ -1,33 +1,51 @@
1
1
  /**
2
2
  * Icon Library Registry
3
3
  *
4
- * Global registry for icon libraries. The "default" library resolves
5
- * NYSDS icons from colocated SVG files extracted at build time.
6
- * Custom libraries (Font Awesome, Material Icons, etc.) can be
7
- * registered at runtime via `registerIconLibrary()`.
4
+ * Global registry for icon libraries. The "default" library resolves the
5
+ * standard NYSDS icon set from an inline SVG map shipped as JavaScript
6
+ * (`nys-icon.library.ts`), loaded lazily as a separate chunk no base-URL
7
+ * discovery, no per-icon fetch, no browser globals. Custom libraries
8
+ * (Font Awesome, Material Icons, etc.) register at runtime via
9
+ * `registerIconLibrary()` and typically resolve to URLs.
8
10
  *
9
- * The registry and watcher maps are stored on `window` so that even
11
+ * The registry and watcher maps are stored on `globalThis` so that even
10
12
  * when bundlers (Storybook Vite, etc.) create duplicate module
11
- * instances, every copy shares a single source of truth.
13
+ * instances, every copy shares a single source of truth. `globalThis`
14
+ * (rather than `window`) keeps module import side-effect-safe in
15
+ * Node/SSR environments, where `window` does not exist.
12
16
  */
17
+ /**
18
+ * How a resolver locates an icon: a URL string (legacy shorthand for
19
+ * `{ type: "url" }`), an explicit URL, or inline SVG source. Resolvers may
20
+ * return synchronously or via a Promise.
21
+ */
22
+ export type IconResolution = string | {
23
+ type: "url";
24
+ href: string;
25
+ } | {
26
+ type: "svg";
27
+ content: string;
28
+ };
13
29
  export interface IconLibrary {
14
- /** Given an icon name, return the URL to its SVG file. Return undefined if not found. */
15
- resolver: (name: string) => string | undefined;
16
- /** Optional post-fetch transform applied to the parsed SVGElement. */
30
+ /** Given an icon name, return where/what its SVG is. Return undefined if not found. */
31
+ resolver: (name: string) => IconResolution | undefined | Promise<IconResolution | undefined>;
32
+ /** Optional post-parse transform applied to the SVGElement. */
17
33
  mutator?: (svg: SVGElement) => void;
18
34
  }
19
35
  export interface NysIconWatcher {
20
36
  redraw(): void;
21
37
  }
22
- interface NysIconGlobals {
23
- __nysIconRegistry: Map<string, IconLibrary>;
24
- __nysIconWatchers: Map<string, Set<NysIconWatcher>>;
25
- }
26
38
  declare global {
27
- interface Window extends NysIconGlobals {
28
- }
39
+ var __nysIconRegistry: Map<string, IconLibrary> | undefined;
40
+ var __nysIconWatchers: Map<string, Set<NysIconWatcher>> | undefined;
41
+ var __nysIconDefaultRegistered: boolean | undefined;
29
42
  }
30
43
  /** Register or replace a named icon library. All watching icons using this library will redraw.
44
+ *
45
+ * Intended for custom/external libraries — the standard NYSDS set is
46
+ * built in and needs no registration. Registering under `"default"`
47
+ * replaces the built-in set (escape hatch).
48
+ *
31
49
  * @example Register a Font Awesome library with a custom resolver:
32
50
  * ```ts
33
51
  * registerIconLibrary("fa", {
@@ -44,4 +62,3 @@ export declare function getIconLibrary(name: string): IconLibrary | undefined;
44
62
  export declare function watchIconLibrary(name: string, watcher: NysIconWatcher): void;
45
63
  /** Unsubscribe an icon instance from library change notifications. */
46
64
  export declare function unwatchIconLibrary(name: string, watcher: NysIconWatcher): void;
47
- export {};
@@ -1,4 +1,4 @@
1
1
  export * from "./nys-icon";
2
- export { registerIconLibrary, unregisterIconLibrary, } from "./icon-library-registry";
3
- export type { IconLibrary } from "./icon-library-registry";
2
+ export { registerIconLibrary, unregisterIconLibrary, getIconLibrary, } from "./icon-library-registry";
3
+ export type { IconLibrary, IconResolution } from "./icon-library-registry";
4
4
  export { clearIconCache } from "./icon-cache";
@@ -13,19 +13,96 @@ import { NysIconWatcher } from "./icon-library-registry";
13
13
  * @summary SVG icon with swappable library support, size, rotation, and color options.
14
14
  * @element nys-icon
15
15
  *
16
- * @example Basic icon (default NYSDS library)
16
+ * @example Basic
17
17
  * ```html
18
- * <nys-icon name="check_circle" size="lg"></nys-icon>
18
+ * <nys-icon name="check_circle"></nys-icon>
19
19
  * ```
20
20
  *
21
- * @example Font Awesome icon
21
+ * @example ARIA Label
22
22
  * ```html
23
- * <nys-icon name="house" library="fa" size="lg"></nys-icon>
23
+ * <nys-icon
24
+ * name="edit_square"
25
+ * ariaLabel="Edit content"
26
+ * ></nys-icon>
24
27
  * ```
25
28
  *
26
- * @example Accessible icon with label
29
+ * @example Size relative
27
30
  * ```html
28
- * <nys-icon name="warning" ariaLabel="Warning" color="var(--nys-color-warning)"></nys-icon>
31
+ * <nys-icon
32
+ * name="edit_square"
33
+ * size="4xl"
34
+ * ></nys-icon>
35
+ * ```
36
+ *
37
+ * @example Size literal
38
+ * ```html
39
+ * <nys-icon
40
+ * name="edit_square"
41
+ * size="24"
42
+ * ></nys-icon>
43
+ * ```
44
+ *
45
+ * @example Color
46
+ * ```html
47
+ * <nys-icon
48
+ * name="edit_square"
49
+ * color="#db117d"
50
+ * ></nys-icon>
51
+ * ```
52
+ *
53
+ * @example Rotate
54
+ * ```html
55
+ * <nys-icon
56
+ * name="edit_square"
57
+ * rotate="20"
58
+ * ></nys-icon>
59
+ * ```
60
+ *
61
+ * @example Flip
62
+ * ```html
63
+ * <nys-icon
64
+ * name="edit_square"
65
+ * flip="vertical"
66
+ * ></nys-icon>
67
+ * ```
68
+ *
69
+ * @example External Library - Font Awesome
70
+ * ```html
71
+ * <nys-icon name="heart" library="fa"></nys-icon>
72
+ * ```
73
+ *
74
+ * @render External Library - Font Awesome
75
+ * ```html
76
+ * <nys-icon name="heart" library="fa"></nys-icon>
77
+ * <script data-scope="module">
78
+ * registerIconLibrary("fa", {
79
+ * resolver: (name) =>
80
+ * `https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/svgs/solid/${name}.svg`,
81
+ * mutator: (svg) => {
82
+ * svg.setAttribute("fill", "currentColor");
83
+ * },
84
+ * });
85
+ * </script>
86
+ * ```
87
+ *
88
+ * @example External Library - Material
89
+ * ```html
90
+ * <nys-icon name="favorite" library="material"></nys-icon>
91
+ * ```
92
+ *
93
+ *
94
+ * @render External Library - Material
95
+ * ```html
96
+ * <nys-icon name="favorite" library="material"></nys-icon>
97
+ * <script data-scope="module">
98
+ * registerIconLibrary("material", {
99
+ * resolver: (name) =>
100
+ * `https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/${name}/default/24px.svg`,
101
+ * mutator: (svg) => {
102
+ * svg.setAttribute("fill", "currentColor");
103
+ * },
104
+ * });
105
+ * </script>
29
106
  * ```
30
107
  */
31
108
  export declare class NysIcon extends LitElement implements NysIconWatcher {
@@ -5,8 +5,38 @@ import { LitElement } from "lit";
5
5
  * Used internally by form components (textinput, select, checkbox, etc.). Not intended for direct use.
6
6
  * Handles label association via `for`, displays asterisk for required fields, and integrates tooltips.
7
7
  *
8
- * @summary Internal label component for form fields with flag and tooltip support.
9
- * @element nys-label
8
+ * @example Basic
9
+ * ```html
10
+ * <nys-label label="This is a basic nys-label"></nys-label>
11
+ * ```
12
+ *
13
+ * @example Required
14
+ * ```html
15
+ * <nys-label label="This form is required" flag="required"></nys-label>
16
+ * ```
17
+ *
18
+ * @example Optional
19
+ * ```html
20
+ * <nys-label label="This form is required" flag="optional"></nys-label>
21
+ * ```
22
+ *
23
+ * @example Description
24
+ * ```html
25
+ * <nys-label label="Label Text" description="Description text"></nys-label>
26
+ * ```
27
+ *
28
+ * @example Description Slot
29
+ * ```html
30
+ * <nys-label label="Label Text">
31
+ * <p slot="description">Rich text description passed in <strong>HERE</strong></p>
32
+ * </nys-label>
33
+ * ```
34
+ *
35
+ * @example With Tooltip
36
+ * ```html
37
+ * <nys-label id="label-id" label="This label has a tooltip"></nys-label>
38
+ * <nys-tooltip for="label-id" text="Tooltip text in here"></nys-tooltip>
39
+ * ```
10
40
  *
11
41
  * @slot description - Custom HTML description content below the label.
12
42
  */
@@ -14,16 +14,141 @@ import { LitElement } from "lit";
14
14
  * @fires nys-open - Fired when modal opens. Detail: `{id}`.
15
15
  * @fires nys-close - Fired when modal closes. Detail: `{id}`.
16
16
  *
17
- * @example Basic modal
17
+ * @example Basic
18
18
  * ```html
19
- * <nys-modal id="confirm-modal" heading="Confirm action" open>
20
- * <p>Are you sure you want to proceed?</p>
19
+ * <nys-modal
20
+ * id="modal1"
21
+ * heading="Update Available"
22
+ * >
23
+ * <p>
24
+ * Would you like to install the latest version? Albany ipsum dolor sit
25
+ * Empire, Hudson consectetur Adirondack elit, sed do MetroCard tempor
26
+ * incididunt ut Capitol et Broadway magna Niagara. Ut enim ad Erie
27
+ * veniam, quis nostrud Catskill ullamco Bronx nisi ut LongIsland ex ea
28
+ * Cuomo consequat.
29
+ * </p>
30
+ * </nys-modal>
31
+ * ```
32
+ *
33
+ * @render Basic
34
+ * ```html
35
+ * <div id="modal-wrapper1">
36
+ * <nys-button label="Open Modal" onclick="document.querySelector('.modal1').open = true; document.getElementById('modal-wrapper1').style.padding = '100px 0'"></nys-button>
37
+ * <nys-modal
38
+ * class="modal1"
39
+ * id="modal1"
40
+ * heading="Update Available"
41
+ * >
42
+ * <p>
43
+ * Would you like to install the latest version? Albany ipsum dolor sit
44
+ * Empire, Hudson consectetur Adirondack elit, sed do MetroCard tempor
45
+ * incididunt ut Capitol et Broadway magna Niagara. Ut enim ad Erie
46
+ * veniam, quis nostrud Catskill ullamco Bronx nisi ut LongIsland ex ea
47
+ * Cuomo consequat.
48
+ * </p>
49
+ * </nys-modal>
50
+ * </div>
51
+ * ```
52
+ *
53
+
54
+ * @example Subheading
55
+ * ```html
56
+ * <nys-modal
57
+ * id="modal-subheading"
58
+ * heading="Before you continue"
59
+ * subheading="Your progress has been saved automatically."
60
+ * >
61
+ * <p>You can safely leave this page and return later to pick up where you left off.</p>
62
+ * </nys-modal>
63
+ * ```
64
+ *
65
+ * @render Subheading
66
+ * ```html
67
+ * <div id="modal-wrapper-subheading">
68
+ * <nys-button label="Open Modal" onclick="document.querySelector('.modal-subheading').open = true; document.getElementById('modal-wrapper-subheading').style.padding = '100px 0'"></nys-button>
69
+ * <nys-modal
70
+ * class="modal-subheading"
71
+ * id="modal-subheading"
72
+ * heading="Before you continue"
73
+ * subheading="Your progress has been saved automatically."
74
+ * >
75
+ * <p>You can safely leave this page and return later to pick up where you left off.</p>
76
+ * </nys-modal>
77
+ * </div>
78
+ * ```
79
+ *
80
+ * @example Actions Slot
81
+ * ```html
82
+ * <nys-modal id="modal3" heading="Update password?">
83
+ * <p>
84
+ * Would you like to install the latest version? Albany ipsum dolor sit
85
+ * Empire, Hudson consectetur Adirondack elit, sed do MetroCard tempor
86
+ * incididunt ut Capitol et Broadway magna Niagara. Ut enim ad Erie
87
+ * veniam, quis nostrud Catskill ullamco Bronx nisi ut LongIsland ex ea
88
+ * Cuomo consequat.
89
+ * </p>
21
90
  * <div slot="actions">
22
- * <nys-button label="Cancel" variant="outline"></nys-button>
23
- * <nys-button label="Confirm" variant="filled"></nys-button>
91
+ * <nys-button label="Not now" variant="outline"></nys-button>
92
+ * <nys-button label="Update"></nys-button>
24
93
  * </div>
25
94
  * </nys-modal>
26
95
  * ```
96
+ *
97
+ * @render Actions Slot
98
+ * ```html
99
+ * <div id="modal-wrapper3">
100
+ * <nys-button label="Open Modal" onclick="document.querySelector('.modal3').open = true; document.getElementById('modal-wrapper3').style.padding = '100px 0'"></nys-button>
101
+ * <nys-modal
102
+ * class="modal3"
103
+ * id="modal3"
104
+ * heading="Update password?"
105
+ * >
106
+ * <p>
107
+ * Would you like to install the latest version? Albany ipsum dolor sit
108
+ * Empire, Hudson consectetur Adirondack elit, sed do MetroCard tempor
109
+ * incididunt ut Capitol et Broadway magna Niagara. Ut enim ad Erie
110
+ * veniam, quis nostrud Catskill ullamco Bronx nisi ut LongIsland ex ea
111
+ * Cuomo consequat.
112
+ * </p>
113
+ * <div slot="actions">
114
+ * <nys-button label="Not now" variant="outline" onclick="document.querySelector('.modal3').open = false; document.getElementById('modal-wrapper3').style.padding = '0'"></nys-button>
115
+ * <nys-button label="Update" onclick="alert('Mock Alert: Changes saved!'); document.querySelector('.modal3').open = false; document.getElementById('modal-wrapper3').style.padding = '0'"></nys-button>
116
+ * </div>
117
+ * </nys-modal>
118
+ * </div>
119
+ * ```
120
+ *
121
+ * @example Mandatory Action
122
+ * ```html
123
+ * <nys-modal
124
+ * id="modal4"
125
+ * heading="There is no way to X out of here"
126
+ * subheading="Don't use this prop unless you add in the actions slot so the user does not get stuck in here."
127
+ * mandatory
128
+ * >
129
+ * <div slot="actions">
130
+ * <nys-button label="Get me out"></nys-button>
131
+ * </div>
132
+ * </nys-modal>
133
+ * ```
134
+ *
135
+ * @render Mandatory Action
136
+ * ```html
137
+ * <div id="modal-wrapper4">
138
+ * <nys-button label="Open Modal" onclick="document.querySelector('.modal4').open = true; document.getElementById('modal-wrapper4').style.padding = '100px 0'"></nys-button>
139
+ * <nys-modal
140
+ * class="modal4"
141
+ * id="modal4"
142
+ * heading="There is no way to X out of here"
143
+ * subheading="Don't use this prop unless you add in the actions slot so the user does not get stuck in here."
144
+ * mandatory
145
+ * >
146
+ * <div slot="actions">
147
+ * <nys-button label="Get me out" onclick="alert('Ok, ok. You can go now.'); document.querySelector('.modal4').open = false; document.getElementById('modal-wrapper4').style.padding = '0'"></nys-button>
148
+ * </div>
149
+ * </nys-modal>
150
+ * </div>
151
+ * ```
27
152
  */
28
153
  export declare class NysModal extends LitElement {
29
154
  static styles: import("lit").CSSResult;
@@ -10,10 +10,20 @@ import { LitElement, TemplateResult } from "lit";
10
10
  *
11
11
  * @fires nys-change - Fired when page changes. Detail: `{page}`.
12
12
  *
13
- * @example Basic pagination
13
+ * @example Basic
14
+ * ```html
15
+ * <nys-pagination currentPage="5" totalPages="10"></nys-pagination>
16
+ * ```
17
+ *
18
+ * @example First Page
14
19
  * ```html
15
20
  * <nys-pagination currentPage="1" totalPages="10"></nys-pagination>
16
21
  * ```
22
+ *
23
+ * @example Last Page
24
+ * ```html
25
+ * <nys-pagination currentPage="10" totalPages="10"></nys-pagination>
26
+ * ```
17
27
  */
18
28
  export declare class NysPagination extends LitElement {
19
29
  static styles: import("lit").CSSResult;
@@ -15,10 +15,11 @@ import { LitElement } from "lit";
15
15
  * @fires nys-blur - Fired when radio loses focus.
16
16
  * @fires nys-other-input - Fired when "other" text input value changes. Detail: `{id, name, value}`.
17
17
  *
18
- * @example Radio group
18
+ *
19
+ * @example Pre-selected
19
20
  * ```html
20
- * <nys-radiogroup label="Select borough" required>
21
- * <nys-radiobutton name="borough" value="bronx" label="The Bronx"></nys-radiobutton>
21
+ * <nys-radiogroup label="Select borough">
22
+ * <nys-radiobutton name="borough" value="bronx" label="The Bronx" checked></nys-radiobutton>
22
23
  * <nys-radiobutton name="borough" value="brooklyn" label="Brooklyn"></nys-radiobutton>
23
24
  * </nys-radiogroup>
24
25
  * ```