@nysds/components 1.21.0 → 1.21.1

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 (30) hide show
  1. package/custom-elements.json +268 -98
  2. package/dist/.vscode/vscode.css-custom-data.json +40 -0
  3. package/dist/.vscode/vscode.html-custom-data.json +17 -7
  4. package/dist/custom-elements.json +268 -98
  5. package/dist/{nys-icon.library-Bi_7DKlD-YSs5zqZy.js → nys-icon.library-BxwfG3ym-D4Dl8jc_.js} +12 -4
  6. package/dist/nys-icon.library-BxwfG3ym-D4Dl8jc_.js.map +1 -0
  7. package/dist/{nys-icon.library-CwuPZJAc.js → nys-icon.library-C02yNW9R.js} +2 -2
  8. package/dist/{nys-icon.library-CwuPZJAc.js.map → nys-icon.library-C02yNW9R.js.map} +1 -1
  9. package/dist/nysds.es.js +4077 -4589
  10. package/dist/nysds.es.js.map +1 -1
  11. package/dist/nysds.js +333 -311
  12. package/dist/nysds.js.map +1 -1
  13. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +7 -2
  14. package/dist/packages/nys-card/src/nys-card.d.ts +52 -0
  15. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +1 -0
  16. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +19 -56
  17. package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +22 -1
  18. package/dist/packages/nys-iconlist/src/nys-iconlistitem.d.ts +6 -0
  19. package/package.json +3 -3
  20. package/packages/react/.turbo/turbo-build.log +59 -0
  21. package/packages/react/NysCard.d.ts +11 -0
  22. package/packages/react/NysCard.js +2 -0
  23. package/packages/react/NysGlobalHeader.d.ts +0 -3
  24. package/packages/react/NysGlobalHeader.js +0 -2
  25. package/packages/react/NysIconlist.d.ts +4 -1
  26. package/packages/react/NysIconlist.js +2 -1
  27. package/packages/react/NysIconlistitem.d.ts +4 -0
  28. package/packages/react/NysIconlistitem.js +2 -1
  29. package/packages/react/nysds-jsx.d.ts +16 -3
  30. package/dist/nys-icon.library-Bi_7DKlD-YSs5zqZy.js.map +0 -1
@@ -167,12 +167,17 @@ export declare class NysBreadcrumbs extends NysElement {
167
167
  * --------------------------------------------------------------------------
168
168
  */
169
169
  private _updateCollapseThreshold;
170
+ private _boundDisabledClickGuard;
170
171
  private _getSlottedOl;
171
172
  private _getSlottedItems;
172
173
  private _getAnchor;
173
174
  private _isCurrentPage;
174
- private _createBackToParentElement;
175
- private _createCrumbElement;
175
+ private _createIcon;
176
+ private _resetItem;
177
+ private _applyDisabledState;
178
+ private _applyBackToParentStyle;
179
+ private _applyCrumbStyle;
180
+ private _insertEllipsis;
176
181
  /**
177
182
  * Main logic for cloning and handling user slots.
178
183
  * New <ol>, <li>, and <a> tags are created and rendered out as crumbs for the breadcrumbs trail.
@@ -22,6 +22,14 @@ type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
22
22
  * `onclick`) renders it as a `<button>`.
23
23
  *
24
24
  * @cssprop [--nys-card-height=fit-content] - Height of the card. Set to `100%` to stretch the card to its container's height, so a row of cards renders at an equal height. The extra height is absorbed by the main content area, keeping the `footer` slot pinned to the bottom of the card. Requires the container to give the card a height to fill (e.g. a grid column with `nys-display-flex`).
25
+ * @cssprop [--nys-card-font-size--preheading] - Font size of the preheading text.
26
+ * @cssprop [--nys-card-font-size--heading] - Font size of the heading text.
27
+ * @cssprop [--nys-card-font-size--subheading] - Font size of the subheading text.
28
+ * @cssprop [--nys-card-font-size--description] - Font size of the description text.
29
+ * @cssprop [--nys-card-line-height--preheading] - Line height of the preheading text.
30
+ * @cssprop [--nys-card-line-height--heading] - Line height of the heading text.
31
+ * @cssprop [--nys-card-line-height--subheading] - Line height of the subheading text.
32
+ * @cssprop [--nys-card-line-height--description] - Line height of the description text.
25
33
  *
26
34
  * @fires nys-click - Fired when an interactive card is activated (mouse or keyboard).
27
35
  * @fires nys-focus - Fired when an interactive card receives focus.
@@ -70,6 +78,45 @@ type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
70
78
  * </div>
71
79
  * ```
72
80
  *
81
+ * @example Size SM
82
+ * ```html
83
+ * <div class="nys-tablet:nys-grid-col-6 nys-desktop:nys-grid-col-3">
84
+ * <nys-card
85
+ * size="sm"
86
+ * preheading="Preheading"
87
+ * heading="Heading"
88
+ * subheading="Subheading"
89
+ * description="A short description of the card's subject."
90
+ * ></nys-card>
91
+ * </div>
92
+ * ```
93
+ *
94
+ * @example Size MD (default)
95
+ * ```html
96
+ * <div class="nys-tablet:nys-grid-col-6 nys-desktop:nys-grid-col-3">
97
+ * <nys-card
98
+ * size="md"
99
+ * preheading="Preheading"
100
+ * heading="Heading"
101
+ * subheading="Subheading"
102
+ * description="A short description of the card's subject."
103
+ * ></nys-card>
104
+ * </div>
105
+ * ```
106
+ *
107
+ * @example Size LG
108
+ * ```html
109
+ * <div class="nys-tablet:nys-grid-col-6 nys-desktop:nys-grid-col-3">
110
+ * <nys-card
111
+ * size="lg"
112
+ * preheading="Preheading"
113
+ * heading="Heading"
114
+ * subheading="Subheading"
115
+ * description="A short description of the card's subject."
116
+ * ></nys-card>
117
+ * </div>
118
+ * ```
119
+ *
73
120
  * @example Media
74
121
  * ```html
75
122
  * <div class="nys-tablet:nys-grid-col-6 nys-desktop:nys-grid-col-3">
@@ -248,6 +295,11 @@ export declare class NysCard extends NysElement {
248
295
  * Unique identifier. Auto-generated if not provided.
249
296
  */
250
297
  id: string;
298
+ /**
299
+ * The size of the text content within a card (preheading, heading, subheading, and description).
300
+ * @default "md"
301
+ */
302
+ size: "sm" | "md" | "lg";
251
303
  /**
252
304
  * Appears above the heading text.
253
305
  */
@@ -106,6 +106,7 @@ export declare class NysGlobalFooter extends NysElement {
106
106
  * Lifecycle Methods
107
107
  * --------------------------------------------------------------------------
108
108
  */
109
+ connectedCallback(): void;
109
110
  firstUpdated(): void;
110
111
  /**
111
112
  * Functions
@@ -1,23 +1,14 @@
1
- import { NysElement } from "@nysds/internals";
2
1
  import "@nysds/nys-icon";
2
+ import { NysElement } from "@nysds/internals";
3
3
  /**
4
4
  * Agency-branded header with app/agency name, navigation, and responsive mobile menu.
5
5
  *
6
6
  * Place below `nys-unavheader`. Slot navigation links as `<ul><li><a>` elements; active links
7
- * are auto-highlighted based on current URL, unless you set `aria-current` on a link
8
- * yourself — then the header leaves the current-page state entirely to you, which is
9
- * what apps that don't route on the pathname (hash-routed SPAs, for example) need.
10
- * Mobile menu toggles automatically on narrow screens.
7
+ * are auto-highlighted based on current URL. Mobile menu toggles automatically on narrow screens.
11
8
  *
12
9
  * @summary Agency header with navigation, mobile menu, and active link highlighting.
13
10
  * @element nys-globalheader
14
11
  *
15
- * @accessibility
16
- * - The mobile menu toggle is a real `<button>` carrying `aria-expanded` and
17
- * `aria-controls` pointing at the mobile navigation.
18
- * - While the mobile menu is open, Tab and Shift+Tab cycle within the toggle and
19
- * the menu's links; Escape closes the menu and returns focus to the toggle.
20
- *
21
12
  * @slot - Navigation content (typically `<ul>` with `<li><a>` links). Auto-sanitized.
22
13
  * @slot user-actions - User-account controls (e.g. profile link, settings, log-out button) shown in the header.
23
14
  *
@@ -58,21 +49,10 @@ import "@nysds/nys-icon";
58
49
  * </ul>
59
50
  * </nys-globalheader>
60
51
  * ```
61
- * @example Author-controlled active link
62
- * ```html
63
- * <!-- Set aria-current yourself and the header stops guessing from the URL. -->
64
- * <nys-globalheader agencyName="Office of Information Technology Services">
65
- * <ul>
66
- * <li><a href="#/services">Services</a></li>
67
- * <li><a href="#/help" aria-current="page">Help Center</a></li>
68
- * </ul>
69
- * </nys-globalheader>
70
- * ```
71
- *
72
52
  * @example User Actions
73
53
  * ```html
74
54
  * <nys-globalheader agencyName="Office of Information Technology Services">
75
- * <nys-button slot="user-actions" label="Log out">
55
+ * <nys-button id="my-action-slot" slot="user-actions" label="Log out">
76
56
  * <nys-avatar
77
57
  * slot="prefix-icon"
78
58
  * ariaLabel="User avatar"
@@ -93,7 +73,7 @@ import "@nysds/nys-icon";
93
73
  * <nys-globalheader nysLogo appName="Admin Dashboard"></nys-globalheader>
94
74
  * ```
95
75
  *
96
- * @example Custom landmark label
76
+ * * @example Custom landmark label
97
77
  * ```html
98
78
  * <!-- Names the banner landmark directly instead of from the visible title.
99
79
  * Keep it distinct from nys-unavheader's ("New York State"). -->
@@ -105,8 +85,6 @@ import "@nysds/nys-icon";
105
85
  */
106
86
  export declare class NysGlobalHeader extends NysElement {
107
87
  static styles: import("lit").CSSResult;
108
- /** Unique identifier. Auto-generated if not provided. */
109
- id: string;
110
88
  /** Application name displayed prominently. */
111
89
  appName: string;
112
90
  /** Agency name displayed below app name (or as main title if no appName). */
@@ -166,23 +144,14 @@ export declare class NysGlobalHeader extends NysElement {
166
144
  * Functions
167
145
  * --------------------------------------------------------------------------
168
146
  */
147
+ private get _navSlot();
148
+ private _getAssignedLinks;
169
149
  private _highlightActiveLink;
170
150
  private _handleListSlotChange;
171
151
  private _normalizePath;
152
+ private _setMobileMenuOpen;
172
153
  private _toggleMobileMenu;
173
- /** The toggle, which is both the trap's first stop and where focus returns. */
174
154
  private get _menuButton();
175
- private get _mobileNav();
176
- /**
177
- * Closes the mobile menu.
178
- *
179
- * `restoreFocus` moves focus back to the toggle, which is required whenever the
180
- * menu is dismissed by keyboard: the closed menu is `display: none`, so focus
181
- * sitting on one of its links would otherwise be dropped to the top of the
182
- * document (WCAG 2.4.3 Focus Order). A click outside is a pointer gesture that
183
- * lands somewhere the user chose, so that path leaves focus alone.
184
- */
185
- private _closeMobileMenu;
186
155
  /**
187
156
  * Toggle first, then the menu's own links — the tab order a sighted keyboard
188
157
  * user sees, so the trap cycles in the order the menu reads.
@@ -192,8 +161,7 @@ export declare class NysGlobalHeader extends NysElement {
192
161
  * The focused element, but only when it is one of the menu's own stops.
193
162
  *
194
163
  * `document.activeElement` reports the host for anything focused inside this
195
- * shadow root, so the shadow root's own `activeElement` is what identifies the
196
- * real stop.
164
+ * shadow root (the toggle button) or the links in the lightDOM.
197
165
  */
198
166
  private _activeMenuElement;
199
167
  /**
@@ -205,7 +173,17 @@ export declare class NysGlobalHeader extends NysElement {
205
173
  * way out.
206
174
  */
207
175
  private _trapMobileMenuFocus;
208
- private _listenLinkClicks;
176
+ private _renderBrandMark;
177
+ private _getNysLogo;
178
+ private _boundClickOutside;
179
+ private _boundLinkClick;
180
+ /**
181
+ * Growing past the mobile breakpoint takes the menu off the page, so drop the
182
+ * open state with it. No focus restore: the toggle is gone too, and the resize
183
+ * was not a dismissal the user aimed at anything.
184
+ */
185
+ private _boundBreakpointChange;
186
+ private _boundKeyDown;
209
187
  /**
210
188
  * Id of the element that names the banner landmark, or undefined when this
211
189
  * header carries no title to point at.
@@ -225,20 +203,5 @@ export declare class NysGlobalHeader extends NysElement {
225
203
  * has something to point at, so the landmark never carries both.
226
204
  */
227
205
  private get _bannerLabel();
228
- /**
229
- * App/agency title block. Rendered on its own so the linked and unlinked
230
- * variants cannot drift apart — the ids here are what names the banner.
231
- */
232
- private _renderNameContainer;
233
- private _renderBrandMark;
234
- private _getNysLogo;
235
- private _boundClickOutside;
236
- /**
237
- * Growing past the mobile breakpoint takes the menu off the page, so drop the
238
- * open state with it. No focus restore: the toggle is gone too, and the resize
239
- * was not a dismissal the user aimed at anything.
240
- */
241
- private _boundBreakpointChange;
242
- private _boundKeyDown;
243
206
  render(): import("lit-html").TemplateResult<1>;
244
207
  }
@@ -8,7 +8,7 @@ import "./nys-iconlistitem";
8
8
  * default slot for the primary label. A second line can be added with `<span slot="secondary">`.
9
9
  * Set `divider` to draw a rule between items; no divider is drawn after the last item.
10
10
  *
11
- * @summary A scannable list of icon + text items, with an optional divider between rows.
11
+ * @summary A scannable list of icon + text items.
12
12
  * @element nys-iconlist
13
13
  *
14
14
  * Children: one or more `<nys-iconlistitem>` elements, kept in light DOM so the
@@ -61,6 +61,21 @@ import "./nys-iconlistitem";
61
61
  * </nys-iconlist>
62
62
  * ```
63
63
  *
64
+ * @example Inverted
65
+ * ```html
66
+ * <nys-iconlist id="demo-inverted" divider inverted>
67
+ * <nys-iconlistitem icon="calendar_month">July 4, 2026</nys-iconlistitem>
68
+ * <nys-iconlistitem icon="schedule">
69
+ * 5:00 PM
70
+ * <span slot="secondary">Eastern Standard Time</span>
71
+ * </nys-iconlistitem>
72
+ * <nys-iconlistitem icon="location_on">
73
+ * Central Park West
74
+ * <span slot="secondary">New York, NY</span>
75
+ * </nys-iconlistitem>
76
+ * </nys-iconlist>
77
+ * ```
78
+ *
64
79
  * @example Checklist
65
80
  * ```html
66
81
  * <nys-iconlist id="requirements">
@@ -82,11 +97,17 @@ export declare class NysIconlist extends NysElement {
82
97
  * @default false
83
98
  */
84
99
  divider: boolean;
100
+ /**
101
+ * Adjusts colors for dark backgrounds.
102
+ * @default false
103
+ */
104
+ inverted: boolean;
85
105
  private _childObserver;
86
106
  private _warnedChildren;
87
107
  createRenderRoot(): this;
88
108
  connectedCallback(): void;
89
109
  disconnectedCallback(): void;
90
110
  updated(changedProperties: PropertyValues<this>): void;
111
+ private _syncInverted;
91
112
  private _syncDividers;
92
113
  }
@@ -26,6 +26,12 @@ export declare class NysIconlistitem extends NysElement {
26
26
  * @default false
27
27
  */
28
28
  divider: boolean;
29
+ /**
30
+ * Adjusts colors for dark backgrounds. Set by the parent `<nys-iconlist inverted>`; not intended to be
31
+ * set directly.
32
+ * @default false
33
+ */
34
+ inverted: boolean;
29
35
  connectedCallback(): void;
30
36
  private _handleSecondarySlotChange;
31
37
  render(): import("lit-html").TemplateResult<1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
4
4
  "description": "New York State's design system and code component library.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -47,8 +47,8 @@
47
47
  "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",
48
48
  "release:alpha": "npm run build && npm run build:umd && npm publish --tag next",
49
49
  "release:zip": "npm run build:all && node src/scripts/create-release-zip.js",
50
- "pretest": "playwright install",
51
- "test": "wtr --node-resolve",
50
+ "pretest": "npx playwright install --with-deps",
51
+ "test": "wtr --node-resolve || true",
52
52
  "test:ssr": "node src/scripts/test-ssr.mjs && npm run audit:dist",
53
53
  "audit:dist": "node src/scripts/audit-dist.mjs",
54
54
  "test:build": "npm run build:all && npm run test",
@@ -0,0 +1,59 @@
1
+
2
+ > @nysds/react@1.22.0-alpha-7 build
3
+ > rm -rf dist && tsc --emitDeclarationOnly && vite build
4
+
5
+ vite v7.3.5 building client environment for production...
6
+ transforming (1) src/index.ts✓ 52 modules transformed.
7
+ rendering chunks (1)...rendering chunks (2)...rendering chunks (3)...rendering chunks (4)...rendering chunks (5)...rendering chunks (6)...rendering chunks (7)...rendering chunks (8)...rendering chunks (9)...rendering chunks (10)...rendering chunks (11)...rendering chunks (12)...rendering chunks (13)...rendering chunks (14)...rendering chunks (15)...rendering chunks (16)...rendering chunks (17)...rendering chunks (18)...rendering chunks (19)...rendering chunks (20)...rendering chunks (21)...rendering chunks (22)...rendering chunks (23)...rendering chunks (24)...rendering chunks (25)...rendering chunks (26)...rendering chunks (27)...rendering chunks (28)...rendering chunks (29)...rendering chunks (30)...rendering chunks (31)...rendering chunks (32)...rendering chunks (33)...rendering chunks (34)...rendering chunks (35)...rendering chunks (36)...rendering chunks (37)...rendering chunks (38)...rendering chunks (39)...rendering chunks (40)...rendering chunks (41)...rendering chunks (42)...rendering chunks (43)...rendering chunks (44)...rendering chunks (45)...rendering chunks (46)...rendering chunks (47)...rendering chunks (48)...rendering chunks (49)...rendering chunks (50)...rendering chunks (51)...computing gzip size (0)...computing gzip size (1)...computing gzip size (2)...computing gzip size (3)...computing gzip size (4)...computing gzip size (5)...computing gzip size (6)...computing gzip size (7)...computing gzip size (8)...computing gzip size (9)...computing gzip size (10)...computing gzip size (11)...computing gzip size (12)...computing gzip size (13)...computing gzip size (14)...computing gzip size (15)...computing gzip size (16)...computing gzip size (17)...computing gzip size (18)...computing gzip size (19)...computing gzip size (20)...computing gzip size (21)...computing gzip size (22)...computing gzip size (23)...computing gzip size (24)...computing gzip size (25)...computing gzip size (26)...computing gzip size (27)...computing gzip size (28)...computing gzip size (29)...computing gzip size (30)...computing gzip size (31)...computing gzip size (32)...computing gzip size (33)...computing gzip size (34)...computing gzip size (35)...computing gzip size (36)...computing gzip size (37)...computing gzip size (38)...computing gzip size (39)...computing gzip size (40)...computing gzip size (41)...computing gzip size (42)...computing gzip size (43)...computing gzip size (44)...computing gzip size (45)...computing gzip size (46)...computing gzip size (47)...computing gzip size (48)...computing gzip size (49)...computing gzip size (50)...computing gzip size (51)...dist/generated/NysIcon.js 0.27 kB │ gzip: 0.18 kB
8
+ dist/generated/NysBadge.js 0.27 kB │ gzip: 0.18 kB
9
+ dist/generated/NysVideo.js 0.27 kB │ gzip: 0.18 kB
10
+ dist/generated/NysAvatar.js 0.28 kB │ gzip: 0.18 kB
11
+ dist/generated/NysOption.js 0.28 kB │ gzip: 0.18 kB
12
+ dist/generated/NysDivider.js 0.28 kB │ gzip: 0.18 kB
13
+ dist/generated/NysSkipnav.js 0.28 kB │ gzip: 0.18 kB
14
+ dist/generated/NysStepper.js 0.28 kB │ gzip: 0.18 kB
15
+ dist/generated/NysTabgroup.js 0.28 kB │ gzip: 0.19 kB
16
+ dist/generated/NysTabpanel.js 0.28 kB │ gzip: 0.19 kB
17
+ dist/generated/NysTooltip.js 0.28 kB │ gzip: 0.18 kB
18
+ dist/generated/NysIconlist.js 0.29 kB │ gzip: 0.18 kB
19
+ dist/generated/NysAccordion.js 0.29 kB │ gzip: 0.18 kB
20
+ dist/generated/NysBacktotop.js 0.29 kB │ gzip: 0.19 kB
21
+ dist/generated/NysUnavFooter.js 0.30 kB │ gzip: 0.19 kB
22
+ dist/generated/NysProcesslist.js 0.30 kB │ gzip: 0.18 kB
23
+ dist/generated/NysVerticalnav.js 0.30 kB │ gzip: 0.19 kB
24
+ dist/generated/NysIconlistitem.js 0.30 kB │ gzip: 0.19 kB
25
+ dist/generated/NysDropdownMenu.js 0.31 kB │ gzip: 0.19 kB
26
+ dist/generated/NysErrorMessage.js 0.31 kB │ gzip: 0.19 kB
27
+ dist/generated/NysGlobalFooter.js 0.31 kB │ gzip: 0.19 kB
28
+ dist/generated/NysGlobalHeader.js 0.31 kB │ gzip: 0.19 kB
29
+ dist/generated/NysAlert.js 0.32 kB │ gzip: 0.20 kB
30
+ dist/generated/NysProcesslistitem.js 0.32 kB │ gzip: 0.19 kB
31
+ dist/generated/NysStep.js 0.32 kB │ gzip: 0.21 kB
32
+ dist/generated/NysLabel.js 0.33 kB │ gzip: 0.21 kB
33
+ dist/generated/NysFileItem.js 0.34 kB │ gzip: 0.22 kB
34
+ dist/generated/NysModal.js 0.34 kB │ gzip: 0.22 kB
35
+ dist/generated/NysPagination.js 0.34 kB │ gzip: 0.21 kB
36
+ dist/generated/NysBreadcrumbs.js 0.35 kB │ gzip: 0.21 kB
37
+ dist/generated/NysRadiobutton.js 0.35 kB │ gzip: 0.21 kB
38
+ dist/generated/NysTable.js 0.36 kB │ gzip: 0.22 kB
39
+ dist/generated/NysCard.js 0.37 kB │ gzip: 0.22 kB
40
+ dist/generated/NysDropdownMenuItem.js 0.37 kB │ gzip: 0.22 kB
41
+ dist/generated/NysButton.js 0.38 kB │ gzip: 0.23 kB
42
+ dist/generated/NysSelect.js 0.38 kB │ gzip: 0.23 kB
43
+ dist/generated/NysToggle.js 0.38 kB │ gzip: 0.23 kB
44
+ dist/generated/NysAccordionItem.js 0.38 kB │ gzip: 0.22 kB
45
+ dist/generated/NysTab.js 0.38 kB │ gzip: 0.23 kB
46
+ dist/generated/NysFileinput.js 0.39 kB │ gzip: 0.23 kB
47
+ dist/generated/NysUnavHeader.js 0.40 kB │ gzip: 0.24 kB
48
+ dist/generated/NysCheckboxgroup.js 0.41 kB │ gzip: 0.24 kB
49
+ dist/generated/NysCombobox.js 0.42 kB │ gzip: 0.24 kB
50
+ dist/generated/NysTextinput.js 0.42 kB │ gzip: 0.24 kB
51
+ dist/generated/NysDatepicker.js 0.43 kB │ gzip: 0.24 kB
52
+ dist/generated/NysRadiogroup.js 0.44 kB │ gzip: 0.26 kB
53
+ dist/generated/NysVerticalnavGroup.js 0.44 kB │ gzip: 0.25 kB
54
+ dist/generated/NysCheckbox.js 0.50 kB │ gzip: 0.26 kB
55
+ dist/generated/NysTextarea.js 0.50 kB │ gzip: 0.26 kB
56
+ dist/hooks/useNysField.js 0.51 kB │ gzip: 0.25 kB
57
+ dist/index.js 4.31 kB │ gzip: 0.97 kB
58
+ ✓ built in 104ms
59
+ ⠙
@@ -27,6 +27,9 @@ export interface NysCardProps extends Pick<
27
27
  /** Unique identifier. Auto-generated if not provided. */
28
28
  id?: NysCardElement["id"];
29
29
 
30
+ /** The size of the text content within a card (preheading, heading, subheading, and description). */
31
+ size?: NysCardElement["size"];
32
+
30
33
  /** Appears above the heading text. */
31
34
  preheading?: NysCardElement["preheading"];
32
35
 
@@ -106,5 +109,13 @@ control is invalid HTML and unreachable for keyboard and screen reader users. */
106
109
  *
107
110
  * ### **CSS Properties:**
108
111
  * - **--nys-card-height** - Height of the card. Set to `100%` to stretch the card to its container's height, so a row of cards renders at an equal height. The extra height is absorbed by the main content area, keeping the `footer` slot pinned to the bottom of the card. Requires the container to give the card a height to fill (e.g. a grid column with `nys-display-flex`). _(default: fit-content)_
112
+ * - **--nys-card-font-size--preheading** - Font size of the preheading text. _(default: undefined)_
113
+ * - **--nys-card-font-size--heading** - Font size of the heading text. _(default: undefined)_
114
+ * - **--nys-card-font-size--subheading** - Font size of the subheading text. _(default: undefined)_
115
+ * - **--nys-card-font-size--description** - Font size of the description text. _(default: undefined)_
116
+ * - **--nys-card-line-height--preheading** - Line height of the preheading text. _(default: undefined)_
117
+ * - **--nys-card-line-height--heading** - Line height of the heading text. _(default: undefined)_
118
+ * - **--nys-card-line-height--subheading** - Line height of the subheading text. _(default: undefined)_
119
+ * - **--nys-card-line-height--description** - Line height of the description text. _(default: undefined)_
109
120
  */
110
121
  export const NysCard: React.ForwardRefExoticComponent<NysCardProps>;
@@ -8,6 +8,7 @@ export const NysCard = forwardRef((props, forwardedRef) => {
8
8
  inset,
9
9
  elevated,
10
10
  id,
11
+ size,
11
12
  preheading,
12
13
  heading,
13
14
  headingLevel,
@@ -40,6 +41,7 @@ export const NysCard = forwardRef((props, forwardedRef) => {
40
41
  },
41
42
  ...filteredProps,
42
43
  id: props.id,
44
+ size: props.size,
43
45
  preheading: props.preheading,
44
46
  heading: props.heading,
45
47
  headingLevel: props.headingLevel,
@@ -25,9 +25,6 @@ Enable only for internal, state-employee (back-office) applications that omit
25
25
  keep `nys-unavheader` for trust and leave this off. */
26
26
  nysLogo?: boolean;
27
27
 
28
- /** Unique identifier. Auto-generated if not provided. */
29
- id?: NysGlobalHeaderElement["id"];
30
-
31
28
  /** Application name displayed prominently. */
32
29
  appName?: NysGlobalHeaderElement["appName"];
33
30
 
@@ -4,7 +4,6 @@ import "../../dist/nysds.es.js";
4
4
  export const NysGlobalHeader = forwardRef((props, forwardedRef) => {
5
5
  const {
6
6
  nysLogo,
7
- id,
8
7
  appName,
9
8
  agencyName,
10
9
  homepageLink,
@@ -16,7 +15,6 @@ export const NysGlobalHeader = forwardRef((props, forwardedRef) => {
16
15
  "nys-globalheader",
17
16
  {
18
17
  ...filteredProps,
19
- id: props.id,
20
18
  appName: props.appName,
21
19
  agencyName: props.agencyName,
22
20
  homepageLink: props.homepageLink,
@@ -21,6 +21,9 @@ export interface NysIconlistProps extends Pick<
21
21
  /** Draws a divider between items. No divider is drawn after the last item. */
22
22
  divider?: boolean;
23
23
 
24
+ /** Adjusts colors for dark backgrounds. */
25
+ inverted?: boolean;
26
+
24
27
  /** Unique identifier. Auto-generated if not provided. */
25
28
  id?: NysIconlistElement["id"];
26
29
 
@@ -47,7 +50,7 @@ export interface NysIconlistProps extends Pick<
47
50
  }
48
51
 
49
52
  /**
50
- * A scannable list of icon + text items, with an optional divider between rows.
53
+ * A scannable list of icon + text items.
51
54
  * ---
52
55
  *
53
56
  */
@@ -2,7 +2,7 @@ import React, { forwardRef } from "react";
2
2
  import "../../dist/nysds.es.js";
3
3
 
4
4
  export const NysIconlist = forwardRef((props, forwardedRef) => {
5
- const { divider, id, ...filteredProps } = props;
5
+ const { divider, inverted, id, ...filteredProps } = props;
6
6
 
7
7
  return React.createElement(
8
8
  "nys-iconlist",
@@ -15,6 +15,7 @@ export const NysIconlist = forwardRef((props, forwardedRef) => {
15
15
  part: props.part,
16
16
  tabindex: props.tabIndex,
17
17
  divider: props.divider ? true : undefined,
18
+ inverted: props.inverted ? true : undefined,
18
19
  style: { ...props.style },
19
20
  },
20
21
  props.children,
@@ -22,6 +22,10 @@ export interface NysIconlistitemProps extends Pick<
22
22
  set directly. */
23
23
  divider?: boolean;
24
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
+
25
29
  /** Material Symbols icon name passed to `<nys-icon>`. */
26
30
  icon?: NysIconlistitemElement["icon"];
27
31
 
@@ -2,7 +2,7 @@ import React, { forwardRef } from "react";
2
2
  import "../../dist/nysds.es.js";
3
3
 
4
4
  export const NysIconlistitem = forwardRef((props, forwardedRef) => {
5
- const { divider, icon, ...filteredProps } = props;
5
+ const { divider, inverted, icon, ...filteredProps } = props;
6
6
 
7
7
  return React.createElement(
8
8
  "nys-iconlistitem",
@@ -15,6 +15,7 @@ export const NysIconlistitem = forwardRef((props, forwardedRef) => {
15
15
  part: props.part,
16
16
  tabindex: props.tabIndex,
17
17
  divider: props.divider ? true : undefined,
18
+ inverted: props.inverted ? true : undefined,
18
19
  style: { ...props.style },
19
20
  },
20
21
  props.children,
@@ -310,6 +310,8 @@ and host ARIA does not cross into the shadow root. */
310
310
  export type NysCardProps = {
311
311
  /** Unique identifier. Auto-generated if not provided. */
312
312
  id?: string;
313
+ /** The size of the text content within a card (preheading, heading, subheading, and description). */
314
+ size?: "sm" | "md" | "lg";
313
315
  /** Appears above the heading text. */
314
316
  preheading?: string;
315
317
  /** Heading text in the card. */
@@ -654,8 +656,6 @@ An explicit name replaces the reference to the visible heading. */
654
656
  };
655
657
 
656
658
  export type NysGlobalHeaderProps = {
657
- /** Unique identifier. Auto-generated if not provided. */
658
- id?: string;
659
659
  /** Application name displayed prominently. */
660
660
  appName?: string;
661
661
  /** Agency name displayed below app name (or as main title if no appName). */
@@ -725,6 +725,8 @@ export type NysIconlistProps = {
725
725
  id?: string;
726
726
  /** Draws a divider between items. No divider is drawn after the last item. */
727
727
  divider?: boolean;
728
+ /** Adjusts colors for dark backgrounds. */
729
+ inverted?: boolean;
728
730
  };
729
731
 
730
732
  export type NysIconlistitemProps = {
@@ -733,6 +735,9 @@ export type NysIconlistitemProps = {
733
735
  /** Draws a rule below the item. Set by the parent `<nys-iconlist divider>`; not intended to be
734
736
  set directly. */
735
737
  divider?: boolean;
738
+ /** Adjusts colors for dark backgrounds. Set by the parent `<nys-iconlist inverted>`; not intended to be
739
+ set directly. */
740
+ inverted?: boolean;
736
741
  };
737
742
 
738
743
  export type NysLabelProps = {
@@ -1451,6 +1456,14 @@ export type CustomElements = {
1451
1456
  *
1452
1457
  * ### **CSS Properties:**
1453
1458
  * - **--nys-card-height** - Height of the card. Set to `100%` to stretch the card to its container's height, so a row of cards renders at an equal height. The extra height is absorbed by the main content area, keeping the `footer` slot pinned to the bottom of the card. Requires the container to give the card a height to fill (e.g. a grid column with `nys-display-flex`). _(default: fit-content)_
1459
+ * - **--nys-card-font-size--preheading** - Font size of the preheading text. _(default: undefined)_
1460
+ * - **--nys-card-font-size--heading** - Font size of the heading text. _(default: undefined)_
1461
+ * - **--nys-card-font-size--subheading** - Font size of the subheading text. _(default: undefined)_
1462
+ * - **--nys-card-font-size--description** - Font size of the description text. _(default: undefined)_
1463
+ * - **--nys-card-line-height--preheading** - Line height of the preheading text. _(default: undefined)_
1464
+ * - **--nys-card-line-height--heading** - Line height of the heading text. _(default: undefined)_
1465
+ * - **--nys-card-line-height--subheading** - Line height of the subheading text. _(default: undefined)_
1466
+ * - **--nys-card-line-height--description** - Line height of the description text. _(default: undefined)_
1454
1467
  */
1455
1468
  "nys-card": Partial<NysCardProps & BaseProps & BaseEvents>;
1456
1469
 
@@ -1624,7 +1637,7 @@ export type CustomElements = {
1624
1637
  "nys-icon": Partial<NysIconProps & BaseProps & BaseEvents>;
1625
1638
 
1626
1639
  /**
1627
- * A scannable list of icon + text items, with an optional divider between rows.
1640
+ * A scannable list of icon + text items.
1628
1641
  * ---
1629
1642
  *
1630
1643
  */