@nysds/nys-button 1.19.3 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export * from "./nys-button";
@@ -0,0 +1,309 @@
1
+ import { NysFormControlElement } from "@nysds/internals";
2
+ import "@nysds/nys-icon";
3
+ /**
4
+ * A button for actions like saving, submitting, or navigating. Form-associated with full keyboard support.
5
+ *
6
+ * Use `filled` for primary actions (one per section), `outline` for secondary, `ghost` for tertiary,
7
+ * `text` for inline. Set `href` to render as a navigation link.
8
+ *
9
+ * ARIA belongs on the component's props, not on the `<nys-button>` host. The host has no role,
10
+ * so attributes placed there are not mapped into the accessibility tree and never reach the
11
+ * internal `<button>`. For a disclosure trigger use `ariaExpanded` together with `ariaControls`.
12
+ *
13
+ * @summary Button for actions and CTAs with variants, sizes, and icon support.
14
+ * @element nys-button
15
+ *
16
+ * @slot - Button label text. Use as fallback when `label` prop is not provided.
17
+ * @slot prefix-icon - Icon before label. Not shown for `text` variant.
18
+ * @slot suffix-icon - Icon after label. Not shown for `text` variant.
19
+ * @slot circle-icon - Icon for circle mode. Overrides `icon` prop.
20
+ *
21
+ * @cssprop [--nys-button-color] - Text color of the button label.
22
+ * @cssprop [--nys-button-color--hover] - Text color when hovered.
23
+ * @cssprop [--nys-button-color--active] - Text color when active/pressed.
24
+ * @cssprop [--nys-button-background-color] - Background color of the button.
25
+ * @cssprop [--nys-button-background-color--hover] - Background color when hovered.
26
+ * @cssprop [--nys-button-background-color--active] - Background color when active/pressed.
27
+ * @cssprop [--nys-button-border-color] - Border color of the button.
28
+ * @cssprop [--nys-button-border-color--hover] - Border color when hovered.
29
+ * @cssprop [--nys-button-border-color--active] - Border color when active/pressed.
30
+ *
31
+ * @fires nys-click - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.
32
+ * @fires nys-focus - Fired when the button receives focus.
33
+ * @fires nys-blur - Fired when the button loses focus.
34
+ *
35
+ * @example Basic
36
+ * ```html
37
+ * <nys-button label="Button" variant="filled"></nys-button>
38
+ * ```
39
+ *
40
+ * @example Variant Outline
41
+ * ```html
42
+ * <nys-button label="Button" variant="outline"></nys-button>
43
+ * ```
44
+ *
45
+ * @example Variant Ghost
46
+ * ```html
47
+ * <nys-button label="Button" variant="ghost"></nys-button>
48
+ * ```
49
+ *
50
+ * @example Variant Text
51
+ * ```html
52
+ * <nys-button label="Button" variant="text"></nys-button>
53
+ * ```
54
+ *
55
+ * @example Prefix Icon
56
+ * ```html
57
+ * <nys-button label="Previous" prefixIcon="chevron_left"></nys-button>
58
+ * ```
59
+ *
60
+ * @example Suffix Icon
61
+ * ```html
62
+ * <nys-button label="Next" suffixIcon="chevron_right"></nys-button>
63
+ * ```
64
+ *
65
+ * @example Slotted Icons
66
+ * ```html
67
+ * <nys-button label="Slotted icons">
68
+ * <nys-icon color="#db117d" slot="prefix-icon" name="chevron_left"></nys-icon>
69
+ * <nys-icon color="#db117d" slot="suffix-icon" name="chevron_right"></nys-icon>
70
+ * </nys-button>
71
+ * ```
72
+ *
73
+ * @example Circle icon button
74
+ * ```html
75
+ * <nys-button circle icon="close" label="Close dialog"></nys-button>
76
+ * ```
77
+ *
78
+ * @example Size Small
79
+ * ```html
80
+ * <nys-button label="Small" size="sm"></nys-button>
81
+ * ```
82
+ * @example Size Large
83
+ * ```html
84
+ * <nys-button label="Large" size="lg"></nys-button>
85
+ * ```
86
+ *
87
+ * @example Full width
88
+ * ```html
89
+ * <nys-button label="Full width" fullWidth></nys-button>
90
+ * ```
91
+ *
92
+ * @example Inverted
93
+ * ```html
94
+ * <nys-button label="Inverted" inverted></nys-button>
95
+ * ```
96
+ * @render Inverted
97
+ * ```html
98
+ * <div style="background: #1b1b1b; padding: 1rem;">
99
+ * <nys-button label="Inverted" inverted></nys-button>
100
+ * </div>
101
+ * ```
102
+ *
103
+ * @example Disabled
104
+ * ```html
105
+ * <nys-button label="Disabled" disabled></nys-button>
106
+ * ```
107
+ *
108
+ * @example Href
109
+ * ```html
110
+ * <nys-button label="Visit NY.gov" href="https://www.ny.gov/" target="_blank" suffixIcon="open_in_new"></nys-button>
111
+ * ```
112
+ *
113
+ * @example Type
114
+ * ```html
115
+ * <nys-button type="submit" label="Save Changes" variant="filled"></nys-button>
116
+ * ```
117
+ *
118
+ * @example Disclosure trigger
119
+ * ```html
120
+ * <nys-button
121
+ * label="Here's how you know"
122
+ * ariaExpanded="false"
123
+ * ariaControls="trust-bar"
124
+ * ></nys-button>
125
+ * ```
126
+ */
127
+ export declare class NysButton extends NysFormControlElement {
128
+ static styles: import("lit").CSSResult;
129
+ static shadowRootOptions: {
130
+ delegatesFocus: boolean;
131
+ clonable?: boolean;
132
+ customElementRegistry?: CustomElementRegistry;
133
+ mode: ShadowRootMode;
134
+ serializable?: boolean;
135
+ slotAssignment?: SlotAssignmentMode;
136
+ };
137
+ /**
138
+ * Unique identifier. Auto-generated if not provided.
139
+ */
140
+ id: string;
141
+ /**
142
+ * Name for form submission.
143
+ */
144
+ name: string;
145
+ /**
146
+ * Button height: `sm` (40px) for dense UIs, `md` (48px, default) for standard use, `lg` (56px) for prominent CTAs.
147
+ * @default "md"
148
+ */
149
+ size: "sm" | "md" | "lg";
150
+ /**
151
+ * Expands button to fill container width. Use for mobile layouts or stacked button groups.
152
+ * @default false
153
+ */
154
+ fullWidth: boolean;
155
+ /**
156
+ * Visual style: `filled` for primary (one per section), `outline` for secondary, `ghost` for tertiary, `text` for inline actions. Avoid `text` for navigation.
157
+ * @default "filled"
158
+ */
159
+ variant: "filled" | "outline" | "ghost" | "text";
160
+ /**
161
+ * Adjusts colors for dark backgrounds.
162
+ * @default false
163
+ */
164
+ inverted: boolean;
165
+ /**
166
+ * Visible button text. Use sentence case, action-oriented text (e.g., "Save Draft"). In `circle` mode it is visually hidden but still exposed to assistive tech as the accessible name.
167
+ */
168
+ label: string;
169
+ /**
170
+ * ID of controlled element (e.g., dropdown or modal). Sets `aria-controls`.
171
+ *
172
+ * Set this on `<nys-button>` rather than putting `aria-controls` on the host:
173
+ * the host has no role, so ARIA placed there is not mapped into the
174
+ * accessibility tree and never reaches the internal `<button>`.
175
+ */
176
+ ariaControls: string;
177
+ /**
178
+ * Disclosure state for buttons that show/hide content. Sets `aria-expanded`
179
+ * on the internal `<button>`/`<a>`.
180
+ *
181
+ * Use `"false"` when the controlled content is collapsed and `"true"` when it
182
+ * is expanded, updating it every time the content toggles. Leave unset for
183
+ * buttons that are not disclosure triggers — an `aria-expanded` that never
184
+ * changes is worse than none. Pair with `ariaControls` pointing at the
185
+ * element being shown or hidden.
186
+ *
187
+ * Setting `aria-expanded` directly on the `<nys-button>` host does nothing:
188
+ * a custom element with no role does not map its ARIA attributes into the
189
+ * accessibility tree, and host ARIA does not cross into the shadow root.
190
+ *
191
+ * @example
192
+ * ```html
193
+ * <nys-button
194
+ * label="Here's how you know"
195
+ * ariaExpanded="false"
196
+ * ariaControls="trust-bar"
197
+ * ></nys-button>
198
+ * ```
199
+ */
200
+ ariaExpanded: "true" | "false" | "";
201
+ /**
202
+ * Marks this button as the current item within a set of related controls — the current
203
+ * page of a pagination control, the current step of a wizard. Sets `aria-current` on the
204
+ * internal `<button>`/`<a>`.
205
+ *
206
+ * Use `"page"` inside a pagination landmark, `"step"` inside a step indicator, and
207
+ * `"true"` when no more specific token fits. Only one control in a set is ever current:
208
+ * leave the property unset on all the others rather than setting `"false"`, which the
209
+ * spec reads as "explicitly not current" and adds nothing.
210
+ *
211
+ * Setting `aria-current` directly on the `<nys-button>` host does nothing: a custom
212
+ * element with no role does not map its ARIA attributes into the accessibility tree,
213
+ * and host ARIA does not cross into the shadow root.
214
+ *
215
+ * @example
216
+ * ```html
217
+ * <nys-button label="3" ariaCurrent="page"></nys-button>
218
+ * ```
219
+ */
220
+ ariaCurrent: "page" | "step" | "location" | "date" | "time" | "true" | "false" | "";
221
+ /**
222
+ * Material Symbol icon before label. Not shown for `circle` mode.
223
+ */
224
+ prefixIcon: string;
225
+ /**
226
+ * Material Symbol icon after label. Use `chevron_down` for dropdowns, `open_in_new` for external links. Not shown for `circle` mode.
227
+ */
228
+ suffixIcon: string;
229
+ /**
230
+ * Renders circular icon-only button. Requires `icon` prop. `label` is rendered as visually-hidden text for the accessible name.
231
+ * @default false
232
+ */
233
+ circle: boolean;
234
+ /**
235
+ * Icon for circle mode. Required when `circle` is true. Scales with size (sm=24px, md=32px, lg=40px).
236
+ */
237
+ icon: string;
238
+ /**
239
+ * Prevents interaction. Avoid disabling without explanation—show validation errors instead.
240
+ * @default false
241
+ */
242
+ disabled: boolean;
243
+ /**
244
+ * Form `id` to associate with. Use when button is outside the form element.
245
+ */
246
+ form: string | null;
247
+ /**
248
+ * Value submitted with form data. Only used when `type="submit"`.
249
+ */
250
+ value: string;
251
+ /**
252
+ * ID(s) of element(s) describing this button. Sets `aria-describedby`.
253
+ */
254
+ ariaDescribedBy: string;
255
+ /**
256
+ * Form behavior: `button` (default, no form action), `submit` (submits form), `reset` (resets form). Always set explicitly to avoid unintended submissions.
257
+ * @default "button"
258
+ */
259
+ type: "submit" | "reset" | "button";
260
+ /**
261
+ * Click handler. Use instead of `@click` to ensure keyboard accessibility.
262
+ */
263
+ onClick: ((event: Event) => void) | null;
264
+ /**
265
+ * URL to navigate to. Renders as `<a>` tag. Omit for action buttons.
266
+ */
267
+ href: string;
268
+ /**
269
+ * Link target: `_self` (same tab), `_blank` (new tab—add `suffixIcon="open_in_new"`), `_parent`, `_top`, or frame name.
270
+ * @default "_self"
271
+ */
272
+ target: "_self" | "_blank" | "_parent" | "_top" | "framename";
273
+ private _hasPrefixSlot;
274
+ private _hasSuffixSlot;
275
+ private _hasCircleSlot;
276
+ /**
277
+ * Functions
278
+ * --------------------------------------------------------------------------
279
+ *
280
+ * Form association, ElementInternals, and id generation are provided by
281
+ * NysFormControlElement (@nysds/internals). super.connectedCallback() assigns
282
+ * an id when one is not provided (prefix = the element's localName).
283
+ */
284
+ private _onPrefixSlotChange;
285
+ private _onSuffixSlotChange;
286
+ private _onCircleSlotChange;
287
+ private _manageFormAction;
288
+ /**
289
+ * Event Handlers
290
+ * --------------------------------------------------------------------------
291
+ */
292
+ private _handleFocus;
293
+ private _handleBlur;
294
+ private _handleClick;
295
+ private _handleKeydown;
296
+ private _handleKeyup;
297
+ /**
298
+ * Handles inline onclick attributes for keyboard activation.
299
+ *
300
+ * Native clicks execute inline onclick attributes automatically, but
301
+ * keyboard activation of the custom element does not trigger that native
302
+ * behavior. Dispatching a synthetic click lets the browser's own inline
303
+ * event handler mechanism execute any onclick attribute safely without
304
+ * eval() or new Function().
305
+ */
306
+ private _handleAnyAttributeFunction;
307
+ focus(options?: FocusOptions): void;
308
+ render(): import("lit-html").TemplateResult<1>;
309
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,60 +1,147 @@
1
- import { LitElement as d, unsafeCSS as v, html as s } from "lit";
2
- import { property as n, state as u } from "lit/decorators.js";
3
- import { ifDefined as a } from "lit/directives/if-defined.js";
1
+ import { LitElement as h, unsafeCSS as _, html as a } from "lit";
2
+ import { property as n, state as d } from "lit/decorators.js";
3
+ import { ifDefined as i } from "lit/directives/if-defined.js";
4
+ import "@nysds/nys-icon";
4
5
  /*!
5
6
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
6
7
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
7
8
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
8
9
  *
9
- * Button Component v1.19.3
10
+ * Button Component v1.20.0
10
11
  * Part of the New York State Design System
11
12
  * Repository: https://github.com/its-hcd/nysds
12
13
  * License: MIT
13
14
  */
14
- const h = ':host{--_nys-button-width: fit-content;--_nys-button-height: var(--nys-size-600, 48px);--_nys-button-border-radius: var(--nys-radius-xl, 12px);--_nys-button-padding--y: calc( var(--nys-space-150, 12px) - var(--nys-border-width-md, 2px) );--_nys-button-cursor: pointer;--_nys-button-padding--x: calc( var(--nys-space-250, 20px) - var(--nys-border-width-md, 2px) );--_nys-button-gap: var(--nys-space-100, 8px);--_nys-button-justify-content: center;--_nys-button-border-style: solid;--_nys-button-border-width: var(--nys-border-width-md, 2px);--_nys-button-outline-width: var(--nys-border-width-md, 2px);--_nys-button-outline-offset: var(--nys-space-2px, 2px);--_nys-button-outline-color: var(--nys-color-focus, #004dd1);--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-theme, #154973) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-theme-strong, #0e324f) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-theme-stronger, #081b2b) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00);--_nys-button-font-size: var(--nys-font-size-ui-md, 16px);--_nys-button-font-weight: var(--nys-font-weight-semibold, 600);--_nys-button-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-button-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-button-text-decoration: none;display:inline-flex;width:var(--_nys-button-width);vertical-align:middle}:host([size=sm]){--_nys-button-height: var(--nys-size-500, 40px);--_nys-button-padding--y: calc( var(--nys-space-100, 8px) - var(--nys-border-width-md, 2px) );--_nys-button-padding--x: calc( var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px) )}:host([size=lg]){--_nys-button-height: var(--nys-size-700, 56px);--_nys-button-padding--y: calc( var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px) );--_nys-button-padding--x: calc( var(--nys-space-300, 24px) - var(--nys-border-width-md, 2px) )}:host([fullWidth]){width:100%}:host([fullWidth]) .nys-button__linkwrapper{width:100%}:host([fullWidth]) .nys-button{width:100%}:host([variant=filled]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-theme, #154973) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-theme-strong, #0e324f) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--hover: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-theme-stronger, #081b2b) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1)}:host([variant=outline]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-surface, #ffffff) );--_nys-button-color: var(--nys-button-color, var(--nys-color-theme, #154973));--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-theme, #154973) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-theme-weaker, #eff6fb) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-theme, #154973) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-theme, #154973) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-theme-weak, #cddde9) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-theme, #154973) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-theme, #154973) );--_nys-button-background-color--disabled: var(--nys-color-surface, #ffffff);--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-neutral-100, #d0d0ce)}:host([variant=text]){--_nys-button-height: fit-content;--_nys-button-border-radius: var(--nys-radius-md, 4px);--_nys-button-padding--y: var(--nys-space-2px, 2px);--_nys-button-padding--x: 0;--_nys-button-border-width: 0px;--_nys-button-text-decoration: underline;--_nys-button-text-decoration-thickness: var( --nys-font-decoration-thickness-regular, 7% );--_nys-button-text-decoration-thickness--hover: var( --nys-font-decoration-thickness-strong, 14% );--_nys-button-text-decoration-thickness--active: var( --nys-font-decoration-thickness-strong, 14% );--_nys-button-gap: var(--nys-space-50, 4px);--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var(--nys-button-color, var(--nys-color-link, #004dd1));--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-link-strong, #003ba1) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-link-strongest, #002971) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([variant=ghost]){--_nys-button-gap: var(--nys-space-50, 4px);--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var(--nys-button-color, var(--nys-color-text, #1b1b1b));--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-black-transparent-100, #0000001a) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text, #1b1b1b) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-black-transparent-200, #00000033) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text, #1b1b1b) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([variant=filled][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-surface, #ffffff) );--_nys-button-color: var(--nys-button-color, var(--nys-color-text, #1b1b1b));--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00);--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-neutral-100, #d0d0ce) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text, #1b1b1b) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-neutral-300, #a7a9ab) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text, #1b1b1b) );--_nys-button-background-color--disabled: var(--nys-color-text, #1b1b1b);--_nys-button-color--disabled: var(--nys-color-text-disabled, #62666a)}:host([variant=outline][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-surface-reverse, #1b1b1b) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-ink-reverse, #ffffff) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-surface-reverse, #1b1b1b) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse-weak, #d0d0ce) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-neutral-100, #d0d0ce) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-surface-reverse, #1b1b1b) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse-weaker, #bec0c1) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-neutral-300, #a7a9ab) );--_nys-button-background-color--disabled: var( --nys-color-surface-reverse, #1b1b1b );--_nys-button-color--disabled: var( --nys-color-text-reverse-disabled, #62666a );--_nys-button-border-color--disabled: var(--nys-color-neutral-600, #62666a)}:host([variant=text][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var( --nys-button-color, var(--nys-color-link-reverse, #a7a9ab) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-link-reverse-strong, #ededed) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-reverse-strongest, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var( --nys-color-text-reverse-disabled, #62666a );--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([variant=ghost][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-white-transparent-200, #ffffff33) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-white-transparent-300, #ffffff4d) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #62666a);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([inverted]){--_nys-button-outline-color: var(--nys-color-focus-reverse, #7aa5e7)}:host([circle]){--_nys-button-width: var(--_nys-button-height);--_nys-button-border-radius: var(--nys-radius-round, 1776px);--_nys-button-padding--y: 0;--_nys-button-padding--x: 0}:host([circle]) .nys-button{max-width:var(--_nys-button-height);max-height:var(--_nys-button-height)}.nys-button{width:var(--_nys-button-width);min-height:var(--_nys-button-height);border-radius:var(--_nys-button-border-radius);padding:var(--_nys-button-padding--y) var(--_nys-button-padding--x);display:flex;align-items:center;justify-content:var(--_nys-button-justify-content);gap:var(--_nys-button-gap);font-family:var(--_nys-button-font-family);font-size:var(--_nys-button-font-size);font-weight:var(--_nys-button-font-weight);line-height:var(--_nys-button-line-height);text-decoration:var(--_nys-button-text-decoration);box-sizing:border-box;background-color:var(--_nys-button-background-color);color:var(--_nys-button-color);border-color:var(--_nys-button-border-color);border-style:var(--_nys-button-border-style);border-width:var(--_nys-button-border-width);cursor:var(--_nys-button-cursor)}.nys-button:hover{background-color:var(--_nys-button-background-color--hover);color:var(--_nys-button-color--hover);border-color:var(--_nys-button-border-color--hover);text-decoration-thickness:var(--_nys-button-text-decoration-thickness--hover, auto)}.nys-button:active,.nys-button.active{background-color:var(--_nys-button-background-color--active);color:var(--_nys-button-color--active);border-color:var(--_nys-button-border-color--active);text-decoration-thickness:var(--_nys-button-text-decoration-thickness--active, auto)}.nys-button:disabled,a[disabled]{background-color:var(--_nys-button-background-color--disabled);color:var(--_nys-button-color--disabled);border-color:var(--_nys-button-border-color--disabled);--_nys-button-cursor: not-allowed}a[disabled]{pointer-events:none}.nys-button:focus-visible{outline-offset:var(--_nys-button-outline-offset);outline:solid var(--_nys-button-outline-width) var(--_nys-button-outline-color)}.nys-button__text{display:flex;align-items:center;-webkit-user-select:none;user-select:none}';
15
- var _ = Object.defineProperty, r = (y, o, e, i) => {
16
- for (var c = void 0, b = y.length - 1, f; b >= 0; b--)
17
- (f = y[b]) && (c = f(o, e, c) || c);
18
- return c && _(o, e, c), c;
19
- };
15
+ /*!
16
+ * New York State Design System v1.20.0
17
+ * Description: A design system for New York State's digital products.
18
+ * Repository: https://github.com/its-hcd/nysds
19
+ * License: MIT
20
+ */
20
21
  let p = 0;
21
- const l = class l extends d {
22
- // allows use of elementInternals' API
23
- constructor() {
24
- super(), this.id = "", this.name = "", this.size = "md", this.fullWidth = !1, this.variant = "filled", this.inverted = !1, this.label = "", this.ariaLabel = "", this.ariaControls = "", this.prefixIcon = "", this.suffixIcon = "", this.circle = !1, this.icon = "", this.disabled = !1, this.form = null, this.value = "", this.ariaDescription = "", this.type = "button", this.onClick = null, this.href = "", this.target = "_self", this._hasPrefixSlot = !1, this._hasSuffixSlot = !1, this._hasCircleSlot = !1, this._internals = this.attachInternals();
22
+ function g(c) {
23
+ return `${c}-${Date.now()}-${p++}`;
24
+ }
25
+ const x = (c) => {
26
+ class t extends c {
27
+ get idPrefix() {
28
+ return this.localName || "nys-element";
29
+ }
30
+ ensureId() {
31
+ this.id || (this.id = g(this.idPrefix));
32
+ }
33
+ connectedCallback() {
34
+ super.connectedCallback(), this.ensureId();
35
+ }
25
36
  }
26
- connectedCallback() {
27
- super.connectedCallback(), this.id || (this.id = this._generateUniqueId());
37
+ return t;
38
+ }, k = (c) => {
39
+ class t extends x(c) {
40
+ constructor() {
41
+ super(...arguments), this.__internals = null;
42
+ }
43
+ get internals() {
44
+ if (this.__internals) return this.__internals;
45
+ if (typeof this.attachInternals == "function")
46
+ try {
47
+ this.__internals = this.attachInternals();
48
+ } catch {
49
+ this.__internals = null;
50
+ }
51
+ return this.__internals;
52
+ }
53
+ get defaultRole() {
54
+ return null;
55
+ }
56
+ setHostAria(l, s) {
57
+ const b = this.internals;
58
+ if (b && l in b) {
59
+ b[l] = s;
60
+ return;
61
+ }
62
+ const u = m(l);
63
+ s === null ? this.removeAttribute(u) : this.setAttribute(u, s);
64
+ }
65
+ reflectDefaultSemantics() {
66
+ const l = this.defaultRole;
67
+ l && this.setHostAria("role", l);
68
+ }
69
+ connectedCallback() {
70
+ super.connectedCallback(), this.reflectDefaultSemantics();
71
+ }
72
+ }
73
+ return t;
74
+ };
75
+ function m(c) {
76
+ if (c === "role") return "role";
77
+ const t = c.replace(/^aria/, "");
78
+ return "aria-" + t.charAt(0).toLowerCase() + t.slice(1);
79
+ }
80
+ const $ = (c) => {
81
+ const t = class extends k(c) {
82
+ setFormValue(s) {
83
+ this.internals?.setFormValue(s ?? null);
84
+ }
85
+ setValidityFromState(s, b, u) {
86
+ const f = this.internals;
87
+ if (!f) return;
88
+ const v = Object.values(s).some(Boolean);
89
+ v ? f.setValidity(s, b ?? "Invalid value", u) : f.setValidity({}), this.setHostAria("ariaInvalid", v ? "true" : "false");
90
+ }
91
+ clearValidity() {
92
+ this.internals?.setValidity({}), this.setHostAria("ariaInvalid", "false");
93
+ }
94
+ checkValidity() {
95
+ return this.internals?.checkValidity() ?? !0;
96
+ }
97
+ reportValidity() {
98
+ return this.internals?.reportValidity() ?? !0;
99
+ }
100
+ formResetCallback() {
101
+ this.clearValidity();
102
+ }
103
+ };
104
+ return t.formAssociated = !0, t;
105
+ }, S = /* @__PURE__ */ $(h), w = ':host{--_nys-button-width: fit-content;--_nys-button-height: var(--nys-size-600, 48px);--_nys-button-border-radius: var(--nys-radius-xl, 12px);--_nys-button-padding--y: calc( var(--nys-space-150, 12px) - var(--nys-border-width-md, 2px) );--_nys-button-cursor: pointer;--_nys-button-padding--x: calc( var(--nys-space-250, 20px) - var(--nys-border-width-md, 2px) );--_nys-button-gap: var(--nys-space-100, 8px);--_nys-button-justify-content: center;--_nys-button-border-style: solid;--_nys-button-border-width: var(--nys-border-width-md, 2px);--_nys-button-outline-width: var(--nys-border-width-md, 2px);--_nys-button-outline-offset: var(--nys-space-2px, 2px);--_nys-button-outline-color: var(--nys-color-focus, #004dd1);--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-theme, #154973) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-theme-strong, #0e324f) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-theme-stronger, #081b2b) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00);--_nys-button-font-size: var(--nys-font-size-ui-md, 16px);--_nys-button-font-weight: var(--nys-font-weight-semibold, 600);--_nys-button-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-button-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-button-text-decoration: none;display:inline-flex;width:var(--_nys-button-width);vertical-align:middle}:host([size=sm]){--_nys-button-height: var(--nys-size-500, 40px);--_nys-button-padding--y: calc( var(--nys-space-100, 8px) - var(--nys-border-width-md, 2px) );--_nys-button-padding--x: calc( var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px) )}:host([size=lg]){--_nys-button-height: var(--nys-size-700, 56px);--_nys-button-padding--y: calc( var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px) );--_nys-button-padding--x: calc( var(--nys-space-300, 24px) - var(--nys-border-width-md, 2px) )}:host([fullWidth]){width:100%}:host([fullWidth]) .nys-button__linkwrapper{width:100%}:host([fullWidth]) .nys-button{width:100%}:host([variant=filled]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-theme, #154973) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-theme-strong, #0e324f) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--hover: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-theme-stronger, #081b2b) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1)}:host([variant=outline]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-surface, #ffffff) );--_nys-button-color: var(--nys-button-color, var(--nys-color-theme, #154973));--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-theme, #154973) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-theme-weaker, #eff6fb) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-theme, #154973) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-theme, #154973) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-theme-weak, #cddde9) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-theme, #154973) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-theme, #154973) );--_nys-button-background-color--disabled: var(--nys-color-surface, #ffffff);--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-neutral-100, #d0d0ce)}:host([variant=text]){--_nys-button-height: fit-content;--_nys-button-border-radius: var(--nys-radius-md, 4px);--_nys-button-padding--y: var(--nys-space-2px, 2px);--_nys-button-padding--x: 0;--_nys-button-border-width: 0px;--_nys-button-text-decoration: underline;--_nys-button-text-decoration-thickness: var( --nys-font-decoration-thickness-regular, 7% );--_nys-button-text-decoration-thickness--hover: var( --nys-font-decoration-thickness-strong, 14% );--_nys-button-text-decoration-thickness--active: var( --nys-font-decoration-thickness-strong, 14% );--_nys-button-gap: var(--nys-space-50, 4px);--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var(--nys-button-color, var(--nys-color-link, #004dd1));--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-link-strong, #003ba1) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-link-strongest, #002971) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([variant=ghost]){--_nys-button-gap: var(--nys-space-50, 4px);--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var(--nys-button-color, var(--nys-color-text, #1b1b1b));--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-black-transparent-100, #0000001a) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text, #1b1b1b) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-black-transparent-200, #00000033) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text, #1b1b1b) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([variant=filled][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-surface, #ffffff) );--_nys-button-color: var(--nys-button-color, var(--nys-color-text, #1b1b1b));--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00);--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-neutral-100, #d0d0ce) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text, #1b1b1b) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-neutral-300, #a7a9ab) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text, #1b1b1b) );--_nys-button-background-color--disabled: var(--nys-color-text, #1b1b1b);--_nys-button-color--disabled: var(--nys-color-text-disabled, #62666a)}:host([variant=outline][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-surface-reverse, #1b1b1b) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-ink-reverse, #ffffff) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-surface-reverse, #1b1b1b) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse-weak, #d0d0ce) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-neutral-100, #d0d0ce) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-surface-reverse, #1b1b1b) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse-weaker, #bec0c1) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-neutral-300, #a7a9ab) );--_nys-button-background-color--disabled: var( --nys-color-surface-reverse, #1b1b1b );--_nys-button-color--disabled: var( --nys-color-text-reverse-disabled, #62666a );--_nys-button-border-color--disabled: var(--nys-color-neutral-600, #62666a)}:host([variant=text][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var( --nys-button-color, var(--nys-color-link-reverse, #a7a9ab) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-link-reverse-strong, #ededed) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-reverse-strongest, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var( --nys-color-text-reverse-disabled, #62666a );--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([variant=ghost][inverted]){--_nys-button-background-color: var( --nys-button-background-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-color: var( --nys-button-color, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color: var( --nys-button-border-color, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--hover: var( --nys-button-background-color--hover, var(--nys-color-white-transparent-200, #ffffff33) );--_nys-button-color--hover: var( --nys-button-color--hover, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--hover: var( --nys-button-border-color--hover, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--active: var( --nys-button-background-color--active, var(--nys-color-white-transparent-300, #ffffff4d) );--_nys-button-color--active: var( --nys-button-color--active, var(--nys-color-text-reverse, #ffffff) );--_nys-button-border-color--active: var( --nys-button-border-color--active, var(--nys-color-transparent, #ffffff00) );--_nys-button-background-color--disabled: var( --nys-color-transparent, #ffffff00 );--_nys-button-color--disabled: var(--nys-color-text-disabled, #62666a);--_nys-button-border-color--disabled: var(--nys-color-transparent, #ffffff00)}:host([inverted]){--_nys-button-outline-color: var(--nys-color-focus-reverse, #7aa5e7)}:host([circle]){--_nys-button-width: var(--_nys-button-height);--_nys-button-border-radius: var(--nys-radius-round, 1776px);--_nys-button-padding--y: 0;--_nys-button-padding--x: 0}:host([circle]) .nys-button{max-width:var(--_nys-button-height);max-height:var(--_nys-button-height)}.nys-button{width:var(--_nys-button-width);min-height:var(--_nys-button-height);border-radius:var(--_nys-button-border-radius);padding:var(--_nys-button-padding--y) var(--_nys-button-padding--x);display:flex;align-items:center;justify-content:var(--_nys-button-justify-content);gap:var(--_nys-button-gap);font-family:var(--_nys-button-font-family);font-size:var(--_nys-button-font-size);font-weight:var(--_nys-button-font-weight);line-height:var(--_nys-button-line-height);text-decoration:var(--_nys-button-text-decoration);box-sizing:border-box;background-color:var(--_nys-button-background-color);color:var(--_nys-button-color);border-color:var(--_nys-button-border-color);border-style:var(--_nys-button-border-style);border-width:var(--_nys-button-border-width);cursor:var(--_nys-button-cursor)}.nys-button:hover{background-color:var(--_nys-button-background-color--hover);color:var(--_nys-button-color--hover);border-color:var(--_nys-button-border-color--hover);text-decoration-thickness:var(--_nys-button-text-decoration-thickness--hover, auto)}.nys-button:active,.nys-button.active{background-color:var(--_nys-button-background-color--active);color:var(--_nys-button-color--active);border-color:var(--_nys-button-border-color--active);text-decoration-thickness:var(--_nys-button-text-decoration-thickness--active, auto)}.nys-button:disabled,a[disabled]{background-color:var(--_nys-button-background-color--disabled);color:var(--_nys-button-color--disabled);border-color:var(--_nys-button-border-color--disabled);--_nys-button-cursor: not-allowed}a[disabled]{pointer-events:none}.nys-button:focus-visible,.active-focus{outline-offset:var(--_nys-button-outline-offset);outline:solid var(--_nys-button-outline-width) var(--_nys-button-outline-color)}.nys-button__text{display:flex;align-items:center;-webkit-user-select:none;user-select:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}';
106
+ var C = Object.defineProperty, r = (c, t, e, l) => {
107
+ for (var s = void 0, b = c.length - 1, u; b >= 0; b--)
108
+ (u = c[b]) && (s = u(t, e, s) || s);
109
+ return s && C(t, e, s), s;
110
+ };
111
+ const y = class y extends S {
112
+ constructor() {
113
+ super(...arguments), this.id = "", this.name = "", this.size = "md", this.fullWidth = !1, this.variant = "filled", this.inverted = !1, this.label = "", this.ariaControls = "", this.ariaExpanded = "", this.ariaCurrent = "", this.prefixIcon = "", this.suffixIcon = "", this.circle = !1, this.icon = "", this.disabled = !1, this.form = null, this.value = "", this.ariaDescribedBy = "", this.type = "button", this.onClick = null, this.href = "", this.target = "_self", this._hasPrefixSlot = !1, this._hasSuffixSlot = !1, this._hasCircleSlot = !1;
28
114
  }
29
115
  /**
30
116
  * Functions
31
117
  * --------------------------------------------------------------------------
118
+ *
119
+ * Form association, ElementInternals, and id generation are provided by
120
+ * NysFormControlElement (@nysds/internals). super.connectedCallback() assigns
121
+ * an id when one is not provided (prefix = the element's localName).
32
122
  */
33
- _generateUniqueId() {
34
- return `nys-button-${Date.now()}-${p++}`;
35
- }
36
- _onPrefixSlotChange(o) {
37
- const e = o.target;
123
+ _onPrefixSlotChange(t) {
124
+ const e = t.target;
38
125
  this._hasPrefixSlot = e.assignedElements({ flatten: !0 }).length > 0;
39
126
  }
40
- _onSuffixSlotChange(o) {
41
- const e = o.target;
127
+ _onSuffixSlotChange(t) {
128
+ const e = t.target;
42
129
  this._hasSuffixSlot = e.assignedElements({ flatten: !0 }).length > 0;
43
130
  }
44
- _onCircleSlotChange(o) {
45
- const e = o.target;
131
+ _onCircleSlotChange(t) {
132
+ const e = t.target;
46
133
  this._hasCircleSlot = e.assignedElements({ flatten: !0 }).length > 0;
47
134
  }
48
135
  _manageFormAction() {
49
136
  typeof this.onClick == "function" && this.onClick !== null && this.onClick(new Event("click"));
50
- const o = this._internals.form;
51
- if (o)
137
+ const t = this.internals?.form;
138
+ if (t)
52
139
  switch (this.type) {
53
140
  case "submit":
54
- o.requestSubmit();
141
+ t.requestSubmit();
55
142
  break;
56
143
  case "reset":
57
- o.reset();
144
+ t.reset();
58
145
  break;
59
146
  }
60
147
  }
@@ -72,31 +159,31 @@ const l = class l extends d {
72
159
  new Event("nys-blur", { bubbles: !0, composed: !0 })
73
160
  );
74
161
  }
75
- _handleClick(o) {
162
+ _handleClick(t) {
76
163
  if (this.disabled) {
77
- o.preventDefault();
164
+ t.preventDefault();
78
165
  return;
79
166
  }
80
167
  this._manageFormAction(), this.dispatchEvent(
81
168
  new Event("nys-click", { bubbles: !0, composed: !0 })
82
169
  );
83
170
  }
84
- _handleKeydown(o) {
85
- if (o.code === "Space" || o.code === "Enter" || o.key === " " || o.key === "Enter") {
171
+ _handleKeydown(t) {
172
+ if (t.code === "Space" || t.code === "Enter" || t.key === " " || t.key === "Enter") {
86
173
  if (this.disabled) return;
87
- o.preventDefault();
174
+ t.preventDefault();
88
175
  const e = this.renderRoot.querySelector(".nys-button");
89
176
  if (e?.classList.add("active"), setTimeout(() => e?.classList.remove("active"), 150), this.href) {
90
- const i = this.renderRoot.querySelector(
177
+ const l = this.renderRoot.querySelector(
91
178
  "a.nys-button"
92
179
  );
93
- i && i.click();
180
+ l && l.click();
94
181
  } else
95
- this._handleAnyAttributeFunction(), this._handleClick(o);
182
+ this._handleAnyAttributeFunction(), this._handleClick(t);
96
183
  }
97
184
  }
98
- _handleKeyup(o) {
99
- (o.code === "Space" || o.code === "Enter" || o.key === " " || o.key === "Enter") && this.renderRoot.querySelector(".nys-button")?.classList.remove("active");
185
+ _handleKeyup(t) {
186
+ (t.code === "Space" || t.code === "Enter" || t.key === " " || t.key === "Enter") && this.renderRoot.querySelector(".nys-button")?.classList.remove("active");
100
187
  }
101
188
  /**
102
189
  * Handles inline onclick attributes for keyboard activation.
@@ -110,22 +197,22 @@ const l = class l extends d {
110
197
  _handleAnyAttributeFunction() {
111
198
  this.click();
112
199
  }
113
- focus(o) {
200
+ focus(t) {
114
201
  const e = this.renderRoot.querySelector(
115
202
  this.href ? "a.nys-button" : "button.nys-button"
116
203
  );
117
- e ? e.focus(o) : super.focus(o);
204
+ e ? e.focus(t) : super.focus(t);
118
205
  }
119
206
  render() {
120
- return s`
121
- ${this.href ? s`
207
+ return a`
208
+ ${this.href ? a`
122
209
  <div class="nys-button__linkwrapper">
123
210
  <a
124
211
  class="nys-button"
125
- name=${a(this.name ? this.name : void 0)}
212
+ name=${i(this.name ? this.name : void 0)}
126
213
  ?disabled=${this.disabled}
127
214
  aria-disabled="${this.disabled ? "true" : "false"}"
128
- value=${a(this.value ? this.value : void 0)}
215
+ value=${i(this.value ? this.value : void 0)}
129
216
  href=${this.href}
130
217
  target=${this.target}
131
218
  @click=${this._handleClick}
@@ -133,29 +220,29 @@ const l = class l extends d {
133
220
  @blur="${this._handleBlur}"
134
221
  @keydown="${this._handleKeydown}"
135
222
  @keyup="${this._handleKeyup}"
136
- tabindex="${this.disabled ? -1 : 0}"
137
- aria-label=${a(
138
- this.ariaLabel || this.label || (this.circle ? this.icon : null) || "button"
139
- )}
140
- aria-description=${a(this.ariaDescription || void 0)}
223
+ aria-describedby=${i(this.ariaDescribedBy || void 0)}
224
+ aria-expanded=${i(this.ariaExpanded || void 0)}
225
+ aria-current=${i(this.ariaCurrent || void 0)}
141
226
  >
142
227
  <slot
143
228
  name="prefix-icon"
144
229
  @slotchange=${this._onPrefixSlotChange}
145
230
  ?hidden=${!this.prefixIcon && !this._hasPrefixSlot}
146
231
  >
147
- ${this.prefixIcon ? s`<nys-icon
232
+ ${this.prefixIcon ? a`<nys-icon
148
233
  size="16"
149
234
  name=${this.prefixIcon}
150
235
  ></nys-icon>` : ""}
151
236
  </slot>
152
- ${this.circle ? "" : this.label ? s`<div class="nys-button__text">${this.label}</div>` : s` <slot class="nys-button__default-slot"></slot> `}
237
+ ${this.circle ? a`<div class="nys-button__text sr-only">
238
+ ${this.label}
239
+ </div>` : this.label ? a`<div class="nys-button__text">${this.label}</div>` : a` <slot class="nys-button__default-slot"></slot> `}
153
240
  <slot
154
241
  name="suffix-icon"
155
242
  @slotchange=${this._onSuffixSlotChange}
156
243
  ?hidden=${!this.suffixIcon && !this._hasSuffixSlot}
157
244
  >
158
- ${this.suffixIcon ? s`<nys-icon
245
+ ${this.suffixIcon ? a`<nys-icon
159
246
  size="16"
160
247
  name=${this.suffixIcon}
161
248
  ></nys-icon>` : ""}
@@ -165,52 +252,50 @@ const l = class l extends d {
165
252
  @slotchange=${this._onCircleSlotChange}
166
253
  ?hidden=${!this.circle || !this.icon && !this._hasCircleSlot}
167
254
  >
168
- ${this.icon ? s`<nys-icon
255
+ ${this.icon ? a`<nys-icon
169
256
  size=${this.size === "sm" ? "24" : this.size === "lg" ? "40" : "32"}
170
257
  name=${this.icon}
171
258
  ></nys-icon>` : ""}
172
259
  </slot>
173
260
  </a>
174
261
  </div>
175
- ` : s`
262
+ ` : a`
176
263
  <button
177
264
  class="nys-button"
178
- name=${a(this.name ? this.name : void 0)}
265
+ name=${i(this.name ? this.name : void 0)}
179
266
  ?disabled=${this.disabled}
180
- aria-disabled="${this.disabled ? "true" : "false"}"
181
- form=${a(this.form || void 0)}
182
- value=${a(this.value ? this.value : void 0)}
267
+ form=${i(this.form || void 0)}
268
+ value=${i(this.value ? this.value : void 0)}
183
269
  type=${this.type}
184
- aria-controls=${a(this.ariaControls || void 0)}
270
+ aria-controls=${i(this.ariaControls || void 0)}
185
271
  @click=${this._handleClick}
186
- @focus="${this._handleFocus}"
187
- @blur="${this._handleBlur}"
188
- @keydown="${this._handleKeydown}"
189
- @keyup="${this._handleKeyup}"
190
- tabindex="${this.disabled ? -1 : 0}"
191
- aria-label=${a(
192
- this.ariaLabel || this.label || (this.circle ? this.icon : null) || this.prefixIcon || this.suffixIcon || "button"
193
- )}
194
- aria-description=${a(this.ariaDescription || void 0)}
195
- role="button"
272
+ @focus=${this._handleFocus}
273
+ @blur=${this._handleBlur}
274
+ @keydown=${this._handleKeydown}
275
+ @keyup=${this._handleKeyup}
276
+ aria-describedby=${i(this.ariaDescribedBy || void 0)}
277
+ aria-expanded=${i(this.ariaExpanded || void 0)}
278
+ aria-current=${i(this.ariaCurrent || void 0)}
196
279
  >
197
280
  <slot
198
281
  name="prefix-icon"
199
282
  @slotchange=${this._onPrefixSlotChange}
200
283
  ?hidden=${!this.prefixIcon && !this._hasPrefixSlot}
201
284
  >
202
- ${this.prefixIcon ? s`<nys-icon
285
+ ${this.prefixIcon ? a`<nys-icon
203
286
  size="16"
204
287
  name=${this.prefixIcon}
205
288
  ></nys-icon>` : ""}
206
289
  </slot>
207
- ${this.circle ? "" : this.label ? s`<div class="nys-button__text">${this.label}</div>` : s` <slot class="nys-button__default-slot"></slot> `}
290
+ ${this.circle ? a`<div class="nys-button__text sr-only">
291
+ ${this.label}
292
+ </div>` : this.label ? a`<div class="nys-button__text">${this.label}</div>` : a` <slot class="nys-button__default-slot"></slot> `}
208
293
  <slot
209
294
  name="suffix-icon"
210
295
  @slotchange=${this._onSuffixSlotChange}
211
296
  ?hidden=${!this.suffixIcon && !this._hasSuffixSlot}
212
297
  >
213
- ${this.suffixIcon ? s`<nys-icon
298
+ ${this.suffixIcon ? a`<nys-icon
214
299
  size="16"
215
300
  name=${this.suffixIcon}
216
301
  ></nys-icon>` : ""}
@@ -220,7 +305,7 @@ const l = class l extends d {
220
305
  @slotchange=${this._onCircleSlotChange}
221
306
  ?hidden=${!this.circle || !this.icon && !this._hasCircleSlot}
222
307
  >
223
- ${this.icon ? s`<nys-icon
308
+ ${this.icon ? a`<nys-icon
224
309
  size=${this.size === "sm" ? "24" : this.size === "lg" ? "40" : "32"}
225
310
  name=${this.icon}
226
311
  ></nys-icon>` : ""}
@@ -230,85 +315,88 @@ const l = class l extends d {
230
315
  `;
231
316
  }
232
317
  };
233
- l.styles = v(h), l.shadowRootOptions = {
234
- ...d.shadowRootOptions,
318
+ y.styles = _(w), y.shadowRootOptions = {
319
+ ...h.shadowRootOptions,
235
320
  delegatesFocus: !0
236
- }, l.formAssociated = !0;
237
- let t = l;
321
+ };
322
+ let o = y;
238
323
  r([
239
324
  n({ type: String, reflect: !0 })
240
- ], t.prototype, "id");
325
+ ], o.prototype, "id");
241
326
  r([
242
327
  n({ type: String, reflect: !0 })
243
- ], t.prototype, "name");
328
+ ], o.prototype, "name");
244
329
  r([
245
330
  n({ type: String, reflect: !0 })
246
- ], t.prototype, "size");
331
+ ], o.prototype, "size");
247
332
  r([
248
333
  n({ type: Boolean, reflect: !0 })
249
- ], t.prototype, "fullWidth");
334
+ ], o.prototype, "fullWidth");
250
335
  r([
251
336
  n({ type: String, reflect: !0 })
252
- ], t.prototype, "variant");
337
+ ], o.prototype, "variant");
253
338
  r([
254
339
  n({ type: Boolean, reflect: !0 })
255
- ], t.prototype, "inverted");
340
+ ], o.prototype, "inverted");
341
+ r([
342
+ n({ type: String })
343
+ ], o.prototype, "label");
256
344
  r([
257
345
  n({ type: String })
258
- ], t.prototype, "label");
346
+ ], o.prototype, "ariaControls");
259
347
  r([
260
348
  n({ type: String })
261
- ], t.prototype, "ariaLabel");
349
+ ], o.prototype, "ariaExpanded");
262
350
  r([
263
351
  n({ type: String })
264
- ], t.prototype, "ariaControls");
352
+ ], o.prototype, "ariaCurrent");
265
353
  r([
266
354
  n({ type: String })
267
- ], t.prototype, "prefixIcon");
355
+ ], o.prototype, "prefixIcon");
268
356
  r([
269
357
  n({ type: String })
270
- ], t.prototype, "suffixIcon");
358
+ ], o.prototype, "suffixIcon");
271
359
  r([
272
360
  n({ type: Boolean, reflect: !0 })
273
- ], t.prototype, "circle");
361
+ ], o.prototype, "circle");
274
362
  r([
275
363
  n({ type: String })
276
- ], t.prototype, "icon");
364
+ ], o.prototype, "icon");
277
365
  r([
278
366
  n({ type: Boolean, reflect: !0 })
279
- ], t.prototype, "disabled");
367
+ ], o.prototype, "disabled");
280
368
  r([
281
369
  n({ type: String, reflect: !0 })
282
- ], t.prototype, "form");
370
+ ], o.prototype, "form");
283
371
  r([
284
372
  n({ type: String })
285
- ], t.prototype, "value");
373
+ ], o.prototype, "value");
286
374
  r([
287
375
  n({ type: String })
288
- ], t.prototype, "ariaDescription");
376
+ ], o.prototype, "ariaDescribedBy");
289
377
  r([
290
378
  n({ type: String, reflect: !0 })
291
- ], t.prototype, "type");
379
+ ], o.prototype, "type");
292
380
  r([
293
381
  n({ attribute: !1 })
294
- ], t.prototype, "onClick");
382
+ ], o.prototype, "onClick");
295
383
  r([
296
384
  n({ type: String })
297
- ], t.prototype, "href");
385
+ ], o.prototype, "href");
298
386
  r([
299
387
  n({ type: String, reflect: !0 })
300
- ], t.prototype, "target");
388
+ ], o.prototype, "target");
301
389
  r([
302
- u()
303
- ], t.prototype, "_hasPrefixSlot");
390
+ d()
391
+ ], o.prototype, "_hasPrefixSlot");
304
392
  r([
305
- u()
306
- ], t.prototype, "_hasSuffixSlot");
393
+ d()
394
+ ], o.prototype, "_hasSuffixSlot");
307
395
  r([
308
- u()
309
- ], t.prototype, "_hasCircleSlot");
310
- customElements.get("nys-button") || customElements.define("nys-button", t);
396
+ d()
397
+ ], o.prototype, "_hasCircleSlot");
398
+ customElements.get("nys-button") || customElements.define("nys-button", o);
311
399
  export {
312
- t as NysButton
400
+ o as NysButton
313
401
  };
314
402
  //# sourceMappingURL=nys-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nys-button.js","sources":["../src/nys-button.ts"],"sourcesContent":["import { LitElement, html, unsafeCSS } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-button.scss?inline\";\n\nlet buttonIdCounter = 0;\n\n/**\n * A button for actions like saving, submitting, or navigating. Form-associated with full keyboard support.\n *\n * Use `filled` for primary actions (one per section), `outline` for secondary, `ghost` for tertiary,\n * `text` for inline. Set `href` to render as a navigation link.\n *\n * @summary Button for actions and CTAs with variants, sizes, and icon support.\n * @element nys-button\n *\n * @slot - Button label text. Use as fallback when `label` prop is not provided.\n * @slot prefix-icon - Icon before label. Not shown for `text` variant.\n * @slot suffix-icon - Icon after label. Not shown for `text` variant.\n * @slot circle-icon - Icon for circle mode. Overrides `icon` prop.\n *\n * @cssprop [--nys-button-color] - Text color of the button label.\n * @cssprop [--nys-button-color--hover] - Text color when hovered.\n * @cssprop [--nys-button-color--active] - Text color when active/pressed.\n * @cssprop [--nys-button-background-color] - Background color of the button.\n * @cssprop [--nys-button-background-color--hover] - Background color when hovered.\n * @cssprop [--nys-button-background-color--active] - Background color when active/pressed.\n * @cssprop [--nys-button-border-color] - Border color of the button.\n * @cssprop [--nys-button-border-color--hover] - Border color when hovered.\n * @cssprop [--nys-button-border-color--active] - Border color when active/pressed.\n *\n * @fires nys-click - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.\n * @fires nys-focus - Fired when the button receives focus.\n * @fires nys-blur - Fired when the button loses focus.\n *\n * @example Basic\n * ```html\n * <nys-button label=\"Button\" variant=\"filled\"></nys-button>\n * ```\n *\n * @example Variant Outline\n * ```html\n * <nys-button label=\"Button\" variant=\"outline\"></nys-button>\n * ```\n *\n * @example Variant Ghost\n * ```html\n * <nys-button label=\"Button\" variant=\"ghost\"></nys-button>\n * ```\n *\n * @example Variant Text\n * ```html\n * <nys-button label=\"Button\" variant=\"text\"></nys-button>\n * ```\n *\n * @example Prefix Icon\n * ```html\n * <nys-button label=\"Previous\" prefixIcon=\"chevron_left\"></nys-button>\n * ```\n *\n * @example Suffix Icon\n * ```html\n * <nys-button label=\"Next\" suffixIcon=\"chevron_right\"></nys-button>\n * ```\n *\n * @example Slotted Icons\n * ```html\n * <nys-button label=\"Slotted icons\">\n * <nys-icon color=\"#db117d\" slot=\"prefix-icon\" name=\"chevron_left\"></nys-icon>\n * <nys-icon color=\"#db117d\" slot=\"suffix-icon\" name=\"chevron_right\"></nys-icon>\n * </nys-button>\n * ```\n *\n * @example Circle icon button\n * ```html\n * <nys-button circle icon=\"close\" label=\"Close dialog\"></nys-button>\n * ```\n *\n * @example Size Small\n * ```html\n * <nys-button label=\"Small\" size=\"sm\"></nys-button>\n * ```\n * @example Size Large\n * ```html\n * <nys-button label=\"Large\" size=\"lg\"></nys-button>\n * ```\n *\n * @example Full width\n * ```html\n * <nys-button label=\"Full width\" fullWidth></nys-button>\n * ```\n *\n * @example Inverted\n * ```html\n * <nys-button label=\"Inverted\" inverted></nys-button>\n * ```\n * @render Inverted\n * ```html\n * <div style=\"background: #1b1b1b; padding: 1rem;\">\n * <nys-button label=\"Inverted\" inverted></nys-button>\n * </div>\n * ```\n *\n * @example Disabled\n * ```html\n * <nys-button label=\"Disabled\" disabled></nys-button>\n * ```\n *\n * @example Href\n * ```html\n * <nys-button label=\"Visit NY.gov\" href=\"https://www.ny.gov/\" target=\"_blank\" suffixIcon=\"open_in_new\"></nys-button>\n * ```\n *\n * @example Type\n * ```html\n * <nys-button type=\"submit\" label=\"Save Changes\" variant=\"filled\"></nys-button>\n * ```\n */\n\nexport class NysButton extends LitElement {\n static styles = unsafeCSS(styles);\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Unique identifier. Auto-generated if not provided.\n */\n @property({ type: String, reflect: true }) id = \"\";\n\n /**\n * Name for form submission.\n */\n @property({ type: String, reflect: true }) name = \"\";\n\n /**\n * Button height: `sm` (40px) for dense UIs, `md` (48px, default) for standard use, `lg` (56px) for prominent CTAs.\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\n /**\n * Expands button to fill container width. Use for mobile layouts or stacked button groups.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) fullWidth = false;\n\n /**\n * Visual style: `filled` for primary (one per section), `outline` for secondary, `ghost` for tertiary, `text` for inline actions. Avoid `text` for navigation.\n * @default \"filled\"\n */\n @property({ type: String, reflect: true }) variant:\n | \"filled\"\n | \"outline\"\n | \"ghost\"\n | \"text\" = \"filled\";\n\n /**\n * Adjusts colors for dark backgrounds.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) inverted = false;\n\n /**\n * Visible button text. Use sentence case, action-oriented text (e.g., \"Save Draft\"). Becomes aria-label in `circle` mode.\n */\n @property({ type: String }) label = \"\";\n\n /**\n * Screen reader label. Required for icon-only buttons if `label` is not set.\n */\n @property({ type: String }) ariaLabel = \"\";\n\n /**\n * ID of controlled element (e.g., dropdown or modal). Sets `aria-controls`.\n */\n @property({ type: String }) ariaControls = \"\";\n\n /**\n * Material Symbol icon before label. Not shown for `circle` mode.\n */\n @property({ type: String }) prefixIcon = \"\";\n\n /**\n * Material Symbol icon after label. Use `chevron_down` for dropdowns, `open_in_new` for external links. Not shown for `circle` mode.\n */\n @property({ type: String }) suffixIcon = \"\";\n\n /**\n * Renders circular icon-only button. Requires `icon` prop. `label` becomes aria-label.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) circle = false;\n\n /**\n * Icon for circle mode. Required when `circle` is true. Scales with size (sm=24px, md=32px, lg=40px).\n */\n @property({ type: String }) icon = \"\";\n\n /**\n * Prevents interaction. Avoid disabling without explanation—show validation errors instead.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Form `id` to associate with. Use when button is outside the form element.\n */\n @property({ type: String, reflect: true }) form: string | null = null;\n\n /**\n * Value submitted with form data. Only used when `type=\"submit\"`.\n */\n @property({ type: String }) value = \"\";\n\n /**\n * Additional screen reader description. Sets `aria-description`.\n */\n @property({ type: String }) ariaDescription = \"\";\n\n /**\n * Form behavior: `button` (default, no form action), `submit` (submits form), `reset` (resets form). Always set explicitly to avoid unintended submissions.\n * @default \"button\"\n */\n @property({ type: String, reflect: true }) type:\n | \"submit\"\n | \"reset\"\n | \"button\" = \"button\";\n\n /**\n * Click handler. Use instead of `@click` to ensure keyboard accessibility.\n */\n @property({ attribute: false }) onClick: ((event: Event) => void) | null =\n null;\n\n /**\n * URL to navigate to. Renders as `<a>` tag. Omit for action buttons.\n */\n @property({ type: String }) href = \"\";\n\n /**\n * Link target: `_self` (same tab), `_blank` (new tab—add `suffixIcon=\"open_in_new\"`), `_parent`, `_top`, or frame name.\n * @default \"_self\"\n */\n @property({ type: String, reflect: true }) target:\n | \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | \"framename\" = \"_self\";\n\n private _internals: ElementInternals;\n\n @state() private _hasPrefixSlot = false;\n @state() private _hasSuffixSlot = false;\n @state() private _hasCircleSlot = false;\n\n /**\n * Lifecycle methods\n * --------------------------------------------------------------------------\n */\n\n static formAssociated = true; // allows use of elementInternals' API\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n // Generate a unique ID if not provided\n if (!this.id) {\n this.id = this._generateUniqueId();\n }\n }\n\n /**\n * Functions\n * --------------------------------------------------------------------------\n */\n\n private _generateUniqueId() {\n return `nys-button-${Date.now()}-${buttonIdCounter++}`;\n }\n\n private _onPrefixSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this._hasPrefixSlot = slot.assignedElements({ flatten: true }).length > 0;\n }\n\n private _onSuffixSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this._hasSuffixSlot = slot.assignedElements({ flatten: true }).length > 0;\n }\n\n private _onCircleSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this._hasCircleSlot = slot.assignedElements({ flatten: true }).length > 0;\n }\n\n private _manageFormAction() {\n // If an onClick function is provided, call it\n if (typeof this.onClick === \"function\" && this.onClick !== null) {\n this.onClick(new Event(\"click\")); // Call user-provided onClick function with a fake click event\n }\n\n // If part of a form, perform the corresponding action based on button's \"type\"\n const form = this._internals.form;\n\n if (form) {\n switch (this.type) {\n case \"submit\":\n form.requestSubmit();\n break;\n case \"reset\":\n form.reset();\n break;\n case \"button\":\n }\n }\n }\n\n /**\n * Event Handlers\n * --------------------------------------------------------------------------\n */\n\n private _handleFocus() {\n this.dispatchEvent(\n new Event(\"nys-focus\", { bubbles: true, composed: true }),\n );\n }\n\n private _handleBlur() {\n const button = this.shadowRoot?.querySelector(\".nys-button\");\n button?.classList.remove(\"active-focus\");\n this.dispatchEvent(\n new Event(\"nys-blur\", { bubbles: true, composed: true }),\n );\n }\n\n private _handleClick(event: Event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n this._manageFormAction();\n this.dispatchEvent(\n new Event(\"nys-click\", { bubbles: true, composed: true }),\n );\n }\n\n private _handleKeydown(e: KeyboardEvent) {\n if (\n e.code === \"Space\" ||\n e.code === \"Enter\" ||\n e.key === \" \" ||\n e.key === \"Enter\"\n ) {\n if (this.disabled) return;\n\n e.preventDefault();\n const btn = this.renderRoot.querySelector(\".nys-button\");\n btn?.classList.add(\"active\");\n setTimeout(() => btn?.classList.remove(\"active\"), 150);\n\n if (this.href) {\n // Click the internal <a> so native navigation happens\n const linkEl = this.renderRoot.querySelector(\n \"a.nys-button\",\n ) as HTMLAnchorElement;\n if (linkEl) {\n linkEl.click();\n }\n } else {\n this._handleAnyAttributeFunction();\n this._handleClick(e);\n }\n }\n }\n\n private _handleKeyup(e: KeyboardEvent) {\n if (\n e.code === \"Space\" ||\n e.code === \"Enter\" ||\n e.key === \" \" ||\n e.key === \"Enter\"\n ) {\n this.renderRoot.querySelector(\".nys-button\")?.classList.remove(\"active\");\n }\n }\n\n /**\n * Handles inline onclick attributes for keyboard activation.\n *\n * Native clicks execute inline onclick attributes automatically, but\n * keyboard activation of the custom element does not trigger that native\n * behavior. Dispatching a synthetic click lets the browser's own inline\n * event handler mechanism execute any onclick attribute safely without\n * eval() or new Function().\n */\n private _handleAnyAttributeFunction() {\n this.click();\n }\n\n public focus(options?: FocusOptions) {\n const innerEl = this.renderRoot.querySelector(\n this.href ? \"a.nys-button\" : \"button.nys-button\",\n ) as HTMLElement | null;\n\n if (innerEl) {\n innerEl.focus(options);\n } else {\n // fallback: focus host\n super.focus(options);\n }\n }\n\n render() {\n return html`\n ${this.href\n ? html`\n <div class=\"nys-button__linkwrapper\">\n <a\n class=\"nys-button\"\n name=${ifDefined(this.name ? this.name : undefined)}\n ?disabled=${this.disabled}\n aria-disabled=\"${this.disabled ? \"true\" : \"false\"}\"\n value=${ifDefined(this.value ? this.value : undefined)}\n href=${this.href}\n target=${this.target}\n @click=${this._handleClick}\n @focus=\"${this._handleFocus}\"\n @blur=\"${this._handleBlur}\"\n @keydown=\"${this._handleKeydown}\"\n @keyup=\"${this._handleKeyup}\"\n tabindex=\"${this.disabled ? -1 : 0}\"\n aria-label=${ifDefined(\n this.ariaLabel ||\n this.label ||\n (this.circle ? this.icon : null) ||\n \"button\",\n )}\n aria-description=${ifDefined(this.ariaDescription || undefined)}\n >\n <slot\n name=\"prefix-icon\"\n @slotchange=${this._onPrefixSlotChange}\n ?hidden=${!this.prefixIcon && !this._hasPrefixSlot}\n >\n ${this.prefixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.prefixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n ${!this.circle\n ? this.label\n ? html`<div class=\"nys-button__text\">${this.label}</div>`\n : html` <slot class=\"nys-button__default-slot\"></slot> `\n : \"\"}\n <slot\n name=\"suffix-icon\"\n @slotchange=${this._onSuffixSlotChange}\n ?hidden=${!this.suffixIcon && !this._hasSuffixSlot}\n >\n ${this.suffixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.suffixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n <slot\n name=\"circle-icon\"\n @slotchange=${this._onCircleSlotChange}\n ?hidden=${!this.circle ||\n (!this.icon && !this._hasCircleSlot)}\n >\n ${this.icon\n ? html`<nys-icon\n size=${this.size === \"sm\"\n ? \"24\"\n : this.size === \"lg\"\n ? \"40\"\n : \"32\"}\n name=${this.icon}\n ></nys-icon>`\n : \"\"}\n </slot>\n </a>\n </div>\n `\n : html`\n <button\n class=\"nys-button\"\n name=${ifDefined(this.name ? this.name : undefined)}\n ?disabled=${this.disabled}\n aria-disabled=\"${this.disabled ? \"true\" : \"false\"}\"\n form=${ifDefined(this.form || undefined)}\n value=${ifDefined(this.value ? this.value : undefined)}\n type=${this.type}\n aria-controls=${ifDefined(this.ariaControls || undefined)}\n @click=${this._handleClick}\n @focus=\"${this._handleFocus}\"\n @blur=\"${this._handleBlur}\"\n @keydown=\"${this._handleKeydown}\"\n @keyup=\"${this._handleKeyup}\"\n tabindex=\"${this.disabled ? -1 : 0}\"\n aria-label=${ifDefined(\n this.ariaLabel ||\n this.label ||\n (this.circle ? this.icon : null) ||\n this.prefixIcon ||\n this.suffixIcon ||\n \"button\",\n )}\n aria-description=${ifDefined(this.ariaDescription || undefined)}\n role=\"button\"\n >\n <slot\n name=\"prefix-icon\"\n @slotchange=${this._onPrefixSlotChange}\n ?hidden=${!this.prefixIcon && !this._hasPrefixSlot}\n >\n ${this.prefixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.prefixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n ${!this.circle\n ? this.label\n ? html`<div class=\"nys-button__text\">${this.label}</div>`\n : html` <slot class=\"nys-button__default-slot\"></slot> `\n : \"\"}\n <slot\n name=\"suffix-icon\"\n @slotchange=${this._onSuffixSlotChange}\n ?hidden=${!this.suffixIcon && !this._hasSuffixSlot}\n >\n ${this.suffixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.suffixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n <slot\n name=\"circle-icon\"\n @slotchange=${this._onCircleSlotChange}\n ?hidden=${!this.circle || (!this.icon && !this._hasCircleSlot)}\n >\n ${this.icon\n ? html`<nys-icon\n size=${this.size === \"sm\"\n ? \"24\"\n : this.size === \"lg\"\n ? \"40\"\n : \"32\"}\n name=${this.icon}\n ></nys-icon>`\n : \"\"}\n </slot>\n </button>\n `}\n `;\n }\n}\n\nif (!customElements.get(\"nys-button\")) {\n customElements.define(\"nys-button\", NysButton);\n}\n"],"names":["buttonIdCounter","_NysButton","LitElement","e","slot","form","event","btn","linkEl","options","innerEl","html","ifDefined","unsafeCSS","styles","NysButton","__decorateClass","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAIA,IAAkB;AAkHf,MAAMC,IAAN,MAAMA,UAAkBC,EAAW;AAAA;AAAA,EAkJxC,cAAc;AACZ,UAAA,GAzIyC,KAAA,KAAK,IAKL,KAAA,OAAO,IAMP,KAAA,OAA2B,MAM1B,KAAA,YAAY,IAMb,KAAA,UAI9B,UAM+B,KAAA,WAAW,IAK3B,KAAA,QAAQ,IAKR,KAAA,YAAY,IAKZ,KAAA,eAAe,IAKf,KAAA,aAAa,IAKb,KAAA,aAAa,IAMG,KAAA,SAAS,IAKzB,KAAA,OAAO,IAMS,KAAA,WAAW,IAKZ,KAAA,OAAsB,MAKrC,KAAA,QAAQ,IAKR,KAAA,kBAAkB,IAMH,KAAA,OAG5B,UAKiB,KAAA,UAC9B,MAK0B,KAAA,OAAO,IAMQ,KAAA,SAKzB,SAIT,KAAQ,iBAAiB,IACzB,KAAQ,iBAAiB,IACzB,KAAQ,iBAAiB,IAWhC,KAAK,aAAa,KAAK,gBAAA;AAAA,EACzB;AAAA,EAEA,oBAAoB;AA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WAAA,gBAAA;AACAC,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAzIIH,EAyIM,WAAA,gBAAA;AA+Td,eAAe,IAAI,YAAY,KAClC,eAAe,OAAO,cAAcA,CAAS;"}
1
+ {"version":3,"file":"nys-button.js","sources":["../../internals/dist/index.js","../src/nys-button.ts"],"sourcesContent":["import { LitElement as u } from \"lit\";\n/*!\n * New York State Design System v1.20.0\n * Description: A design system for New York State's digital products.\n * Repository: https://github.com/its-hcd/nysds\n * License: MIT\n */\nlet y = 0;\nfunction f(e) {\n return `${e}-${Date.now()}-${y++}`;\n}\nconst p = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, A = {\n labelledby: \"ariaLabel\",\n describedby: \"ariaDescription\"\n};\nfunction R(e) {\n return \"ariaDescribedByElements\" in e;\n}\nfunction _(e) {\n return e === \"errormessage\" ? \"aria-errormessage\" : `aria-${e}`;\n}\nfunction d(e) {\n return e.filter((t) => !!t);\n}\nfunction E(e) {\n return e.map((t) => (t.id || (t.id = f(\"nys-ref\")), t.id));\n}\nfunction V(e, t, n) {\n const i = d(n), r = _(t);\n i.length ? e.setAttribute(r, E(i).join(\" \")) : e.removeAttribute(r);\n}\nfunction x(e, t, n, i, r) {\n const s = d(i), a = p[n], l = t;\n if (a && R(t)) {\n l[a] = s.length ? s : null;\n return;\n }\n const o = A[n];\n if (!o) return;\n const c = r ?? (s.length ? s.map((m) => m.textContent?.trim() ?? \"\").filter(Boolean).join(\" \") : \"\");\n o in l ? l[o] = c || null : c ? e.setAttribute(\n n === \"labelledby\" ? \"aria-label\" : \"aria-description\",\n c\n ) : e.removeAttribute(\n n === \"labelledby\" ? \"aria-label\" : \"aria-description\"\n );\n}\nconst g = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, C = {\n labelledby: \"aria-label\",\n describedby: \"aria-description\"\n};\nfunction L(e, t, n) {\n const i = d(n), r = g[t], s = C[t], a = e;\n if (r && r in e && (a[r] = i.length ? i : null), !s) return;\n const l = i.map((o) => o.textContent?.trim() ?? \"\").filter(Boolean).join(\" \");\n l ? e.setAttribute(s, l) : e.removeAttribute(s);\n}\nconst b = (e) => {\n class t extends e {\n get idPrefix() {\n return this.localName || \"nys-element\";\n }\n ensureId() {\n this.id || (this.id = f(this.idPrefix));\n }\n connectedCallback() {\n super.connectedCallback(), this.ensureId();\n }\n }\n return t;\n}, P = /* @__PURE__ */ b(u), h = (e) => {\n class t extends b(e) {\n constructor() {\n super(...arguments), this.__internals = null;\n }\n get internals() {\n if (this.__internals) return this.__internals;\n if (typeof this.attachInternals == \"function\")\n try {\n this.__internals = this.attachInternals();\n } catch {\n this.__internals = null;\n }\n return this.__internals;\n }\n get defaultRole() {\n return null;\n }\n setHostAria(i, r) {\n const s = this.internals;\n if (s && i in s) {\n s[i] = r;\n return;\n }\n const a = v(i);\n r === null ? this.removeAttribute(a) : this.setAttribute(a, r);\n }\n reflectDefaultSemantics() {\n const i = this.defaultRole;\n i && this.setHostAria(\"role\", i);\n }\n connectedCallback() {\n super.connectedCallback(), this.reflectDefaultSemantics();\n }\n }\n return t;\n};\nfunction v(e) {\n if (e === \"role\") return \"role\";\n const t = e.replace(/^aria/, \"\");\n return \"aria-\" + t.charAt(0).toLowerCase() + t.slice(1);\n}\nconst T = /* @__PURE__ */ h(u), I = (e) => {\n const n = class n extends h(e) {\n setFormValue(r) {\n this.internals?.setFormValue(r ?? null);\n }\n setValidityFromState(r, s, a) {\n const l = this.internals;\n if (!l) return;\n const o = Object.values(r).some(Boolean);\n o ? l.setValidity(r, s ?? \"Invalid value\", a) : l.setValidity({}), this.setHostAria(\"ariaInvalid\", o ? \"true\" : \"false\");\n }\n clearValidity() {\n this.internals?.setValidity({}), this.setHostAria(\"ariaInvalid\", \"false\");\n }\n checkValidity() {\n return this.internals?.checkValidity() ?? !0;\n }\n reportValidity() {\n return this.internals?.reportValidity() ?? !0;\n }\n formResetCallback() {\n this.clearValidity();\n }\n };\n n.formAssociated = !0;\n let t = n;\n return t;\n}, w = /* @__PURE__ */ I(u);\nfunction O(e) {\n const t = e.tagName.toLowerCase(), n = /* @__PURE__ */ new Set(), i = (r) => {\n r.querySelectorAll(\"*\").forEach((s) => {\n const a = s.tagName.toLowerCase();\n a.startsWith(\"nys-\") && a !== t && !customElements.get(a) && n.add(a), s.shadowRoot && i(s.shadowRoot);\n });\n };\n return e.shadowRoot && i(e.shadowRoot), i(e), [...n].sort();\n}\nexport {\n I as FormControlMixin,\n b as IdentifiedMixin,\n P as NysElement,\n w as NysFormControlElement,\n T as NysReflectsAriaElement,\n h as ReflectsAriaMixin,\n V as associateControl,\n L as associateControlRefs,\n x as associateHost,\n O as findUnregisteredChildren,\n f as generateId,\n R as supportsElementRefs\n};\n//# sourceMappingURL=index.js.map\n","import { LitElement, html, unsafeCSS } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { NysFormControlElement } from \"@nysds/internals\";\n// This element is rendered inside this component's shadow DOM as the default\n// prefix/suffix/circle icon content, so it must be registered whenever\n// nys-button is used. Importing it here (intentional side effect) guarantees\n// it always renders.\nimport \"@nysds/nys-icon\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-button.scss?inline\";\n\n/**\n * A button for actions like saving, submitting, or navigating. Form-associated with full keyboard support.\n *\n * Use `filled` for primary actions (one per section), `outline` for secondary, `ghost` for tertiary,\n * `text` for inline. Set `href` to render as a navigation link.\n *\n * ARIA belongs on the component's props, not on the `<nys-button>` host. The host has no role,\n * so attributes placed there are not mapped into the accessibility tree and never reach the\n * internal `<button>`. For a disclosure trigger use `ariaExpanded` together with `ariaControls`.\n *\n * @summary Button for actions and CTAs with variants, sizes, and icon support.\n * @element nys-button\n *\n * @slot - Button label text. Use as fallback when `label` prop is not provided.\n * @slot prefix-icon - Icon before label. Not shown for `text` variant.\n * @slot suffix-icon - Icon after label. Not shown for `text` variant.\n * @slot circle-icon - Icon for circle mode. Overrides `icon` prop.\n *\n * @cssprop [--nys-button-color] - Text color of the button label.\n * @cssprop [--nys-button-color--hover] - Text color when hovered.\n * @cssprop [--nys-button-color--active] - Text color when active/pressed.\n * @cssprop [--nys-button-background-color] - Background color of the button.\n * @cssprop [--nys-button-background-color--hover] - Background color when hovered.\n * @cssprop [--nys-button-background-color--active] - Background color when active/pressed.\n * @cssprop [--nys-button-border-color] - Border color of the button.\n * @cssprop [--nys-button-border-color--hover] - Border color when hovered.\n * @cssprop [--nys-button-border-color--active] - Border color when active/pressed.\n *\n * @fires nys-click - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.\n * @fires nys-focus - Fired when the button receives focus.\n * @fires nys-blur - Fired when the button loses focus.\n *\n * @example Basic\n * ```html\n * <nys-button label=\"Button\" variant=\"filled\"></nys-button>\n * ```\n *\n * @example Variant Outline\n * ```html\n * <nys-button label=\"Button\" variant=\"outline\"></nys-button>\n * ```\n *\n * @example Variant Ghost\n * ```html\n * <nys-button label=\"Button\" variant=\"ghost\"></nys-button>\n * ```\n *\n * @example Variant Text\n * ```html\n * <nys-button label=\"Button\" variant=\"text\"></nys-button>\n * ```\n *\n * @example Prefix Icon\n * ```html\n * <nys-button label=\"Previous\" prefixIcon=\"chevron_left\"></nys-button>\n * ```\n *\n * @example Suffix Icon\n * ```html\n * <nys-button label=\"Next\" suffixIcon=\"chevron_right\"></nys-button>\n * ```\n *\n * @example Slotted Icons\n * ```html\n * <nys-button label=\"Slotted icons\">\n * <nys-icon color=\"#db117d\" slot=\"prefix-icon\" name=\"chevron_left\"></nys-icon>\n * <nys-icon color=\"#db117d\" slot=\"suffix-icon\" name=\"chevron_right\"></nys-icon>\n * </nys-button>\n * ```\n *\n * @example Circle icon button\n * ```html\n * <nys-button circle icon=\"close\" label=\"Close dialog\"></nys-button>\n * ```\n *\n * @example Size Small\n * ```html\n * <nys-button label=\"Small\" size=\"sm\"></nys-button>\n * ```\n * @example Size Large\n * ```html\n * <nys-button label=\"Large\" size=\"lg\"></nys-button>\n * ```\n *\n * @example Full width\n * ```html\n * <nys-button label=\"Full width\" fullWidth></nys-button>\n * ```\n *\n * @example Inverted\n * ```html\n * <nys-button label=\"Inverted\" inverted></nys-button>\n * ```\n * @render Inverted\n * ```html\n * <div style=\"background: #1b1b1b; padding: 1rem;\">\n * <nys-button label=\"Inverted\" inverted></nys-button>\n * </div>\n * ```\n *\n * @example Disabled\n * ```html\n * <nys-button label=\"Disabled\" disabled></nys-button>\n * ```\n *\n * @example Href\n * ```html\n * <nys-button label=\"Visit NY.gov\" href=\"https://www.ny.gov/\" target=\"_blank\" suffixIcon=\"open_in_new\"></nys-button>\n * ```\n *\n * @example Type\n * ```html\n * <nys-button type=\"submit\" label=\"Save Changes\" variant=\"filled\"></nys-button>\n * ```\n *\n * @example Disclosure trigger\n * ```html\n * <nys-button\n * label=\"Here's how you know\"\n * ariaExpanded=\"false\"\n * ariaControls=\"trust-bar\"\n * ></nys-button>\n * ```\n */\n\nexport class NysButton extends NysFormControlElement {\n static styles = unsafeCSS(styles);\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Unique identifier. Auto-generated if not provided.\n */\n @property({ type: String, reflect: true }) id = \"\";\n\n /**\n * Name for form submission.\n */\n @property({ type: String, reflect: true }) name = \"\";\n\n /**\n * Button height: `sm` (40px) for dense UIs, `md` (48px, default) for standard use, `lg` (56px) for prominent CTAs.\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\n /**\n * Expands button to fill container width. Use for mobile layouts or stacked button groups.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) fullWidth = false;\n\n /**\n * Visual style: `filled` for primary (one per section), `outline` for secondary, `ghost` for tertiary, `text` for inline actions. Avoid `text` for navigation.\n * @default \"filled\"\n */\n @property({ type: String, reflect: true }) variant:\n | \"filled\"\n | \"outline\"\n | \"ghost\"\n | \"text\" = \"filled\";\n\n /**\n * Adjusts colors for dark backgrounds.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) inverted = false;\n\n /**\n * Visible button text. Use sentence case, action-oriented text (e.g., \"Save Draft\"). In `circle` mode it is visually hidden but still exposed to assistive tech as the accessible name.\n */\n @property({ type: String }) label = \"\";\n\n /**\n * ID of controlled element (e.g., dropdown or modal). Sets `aria-controls`.\n *\n * Set this on `<nys-button>` rather than putting `aria-controls` on the host:\n * the host has no role, so ARIA placed there is not mapped into the\n * accessibility tree and never reaches the internal `<button>`.\n */\n @property({ type: String }) ariaControls = \"\";\n\n /**\n * Disclosure state for buttons that show/hide content. Sets `aria-expanded`\n * on the internal `<button>`/`<a>`.\n *\n * Use `\"false\"` when the controlled content is collapsed and `\"true\"` when it\n * is expanded, updating it every time the content toggles. Leave unset for\n * buttons that are not disclosure triggers — an `aria-expanded` that never\n * changes is worse than none. Pair with `ariaControls` pointing at the\n * element being shown or hidden.\n *\n * Setting `aria-expanded` directly on the `<nys-button>` host does nothing:\n * a custom element with no role does not map its ARIA attributes into the\n * accessibility tree, and host ARIA does not cross into the shadow root.\n *\n * @example\n * ```html\n * <nys-button\n * label=\"Here's how you know\"\n * ariaExpanded=\"false\"\n * ariaControls=\"trust-bar\"\n * ></nys-button>\n * ```\n */\n @property({ type: String }) ariaExpanded: \"true\" | \"false\" | \"\" = \"\";\n\n /**\n * Marks this button as the current item within a set of related controls — the current\n * page of a pagination control, the current step of a wizard. Sets `aria-current` on the\n * internal `<button>`/`<a>`.\n *\n * Use `\"page\"` inside a pagination landmark, `\"step\"` inside a step indicator, and\n * `\"true\"` when no more specific token fits. Only one control in a set is ever current:\n * leave the property unset on all the others rather than setting `\"false\"`, which the\n * spec reads as \"explicitly not current\" and adds nothing.\n *\n * Setting `aria-current` directly on the `<nys-button>` host does nothing: a custom\n * element with no role does not map its ARIA attributes into the accessibility tree,\n * and host ARIA does not cross into the shadow root.\n *\n * @example\n * ```html\n * <nys-button label=\"3\" ariaCurrent=\"page\"></nys-button>\n * ```\n */\n @property({ type: String }) ariaCurrent:\n | \"page\"\n | \"step\"\n | \"location\"\n | \"date\"\n | \"time\"\n | \"true\"\n | \"false\"\n | \"\" = \"\";\n\n /**\n * Material Symbol icon before label. Not shown for `circle` mode.\n */\n @property({ type: String }) prefixIcon = \"\";\n\n /**\n * Material Symbol icon after label. Use `chevron_down` for dropdowns, `open_in_new` for external links. Not shown for `circle` mode.\n */\n @property({ type: String }) suffixIcon = \"\";\n\n /**\n * Renders circular icon-only button. Requires `icon` prop. `label` is rendered as visually-hidden text for the accessible name.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) circle = false;\n\n /**\n * Icon for circle mode. Required when `circle` is true. Scales with size (sm=24px, md=32px, lg=40px).\n */\n @property({ type: String }) icon = \"\";\n\n /**\n * Prevents interaction. Avoid disabling without explanation—show validation errors instead.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Form `id` to associate with. Use when button is outside the form element.\n */\n @property({ type: String, reflect: true }) form: string | null = null;\n\n /**\n * Value submitted with form data. Only used when `type=\"submit\"`.\n */\n @property({ type: String }) value = \"\";\n\n /**\n * ID(s) of element(s) describing this button. Sets `aria-describedby`.\n */\n @property({ type: String }) ariaDescribedBy = \"\";\n\n /**\n * Form behavior: `button` (default, no form action), `submit` (submits form), `reset` (resets form). Always set explicitly to avoid unintended submissions.\n * @default \"button\"\n */\n @property({ type: String, reflect: true }) type:\n | \"submit\"\n | \"reset\"\n | \"button\" = \"button\";\n\n /**\n * Click handler. Use instead of `@click` to ensure keyboard accessibility.\n */\n @property({ attribute: false }) onClick: ((event: Event) => void) | null =\n null;\n\n /**\n * URL to navigate to. Renders as `<a>` tag. Omit for action buttons.\n */\n @property({ type: String }) href = \"\";\n\n /**\n * Link target: `_self` (same tab), `_blank` (new tab—add `suffixIcon=\"open_in_new\"`), `_parent`, `_top`, or frame name.\n * @default \"_self\"\n */\n @property({ type: String, reflect: true }) target:\n | \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | \"framename\" = \"_self\";\n\n @state() private _hasPrefixSlot = false;\n @state() private _hasSuffixSlot = false;\n @state() private _hasCircleSlot = false;\n\n /**\n * Functions\n * --------------------------------------------------------------------------\n *\n * Form association, ElementInternals, and id generation are provided by\n * NysFormControlElement (@nysds/internals). super.connectedCallback() assigns\n * an id when one is not provided (prefix = the element's localName).\n */\n\n private _onPrefixSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this._hasPrefixSlot = slot.assignedElements({ flatten: true }).length > 0;\n }\n\n private _onSuffixSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this._hasSuffixSlot = slot.assignedElements({ flatten: true }).length > 0;\n }\n\n private _onCircleSlotChange(e: Event) {\n const slot = e.target as HTMLSlotElement;\n this._hasCircleSlot = slot.assignedElements({ flatten: true }).length > 0;\n }\n\n private _manageFormAction() {\n // If an onClick function is provided, call it\n if (typeof this.onClick === \"function\" && this.onClick !== null) {\n this.onClick(new Event(\"click\")); // Call user-provided onClick function with a fake click event\n }\n\n // If part of a form, perform the corresponding action based on button's \"type\"\n const form = this.internals?.form;\n\n if (form) {\n switch (this.type) {\n case \"submit\":\n form.requestSubmit();\n break;\n case \"reset\":\n form.reset();\n break;\n case \"button\":\n }\n }\n }\n\n /**\n * Event Handlers\n * --------------------------------------------------------------------------\n */\n\n private _handleFocus() {\n this.dispatchEvent(\n new Event(\"nys-focus\", { bubbles: true, composed: true }),\n );\n }\n\n private _handleBlur() {\n const button = this.shadowRoot?.querySelector(\".nys-button\");\n button?.classList.remove(\"active-focus\");\n this.dispatchEvent(\n new Event(\"nys-blur\", { bubbles: true, composed: true }),\n );\n }\n\n private _handleClick(event: Event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n this._manageFormAction();\n this.dispatchEvent(\n new Event(\"nys-click\", { bubbles: true, composed: true }),\n );\n }\n\n private _handleKeydown(e: KeyboardEvent) {\n if (\n e.code === \"Space\" ||\n e.code === \"Enter\" ||\n e.key === \" \" ||\n e.key === \"Enter\"\n ) {\n if (this.disabled) return;\n\n e.preventDefault();\n const btn = this.renderRoot.querySelector(\".nys-button\");\n btn?.classList.add(\"active\");\n setTimeout(() => btn?.classList.remove(\"active\"), 150);\n\n if (this.href) {\n // Click the internal <a> so native navigation happens\n const linkEl = this.renderRoot.querySelector(\n \"a.nys-button\",\n ) as HTMLAnchorElement;\n if (linkEl) {\n linkEl.click();\n }\n } else {\n this._handleAnyAttributeFunction();\n this._handleClick(e);\n }\n }\n }\n\n private _handleKeyup(e: KeyboardEvent) {\n if (\n e.code === \"Space\" ||\n e.code === \"Enter\" ||\n e.key === \" \" ||\n e.key === \"Enter\"\n ) {\n this.renderRoot.querySelector(\".nys-button\")?.classList.remove(\"active\");\n }\n }\n\n /**\n * Handles inline onclick attributes for keyboard activation.\n *\n * Native clicks execute inline onclick attributes automatically, but\n * keyboard activation of the custom element does not trigger that native\n * behavior. Dispatching a synthetic click lets the browser's own inline\n * event handler mechanism execute any onclick attribute safely without\n * eval() or new Function().\n */\n private _handleAnyAttributeFunction() {\n this.click();\n }\n\n public focus(options?: FocusOptions) {\n const innerEl = this.renderRoot.querySelector(\n this.href ? \"a.nys-button\" : \"button.nys-button\",\n ) as HTMLElement | null;\n\n if (innerEl) {\n innerEl.focus(options);\n } else {\n // fallback: focus host\n super.focus(options);\n }\n }\n\n render() {\n return html`\n ${this.href\n ? html`\n <div class=\"nys-button__linkwrapper\">\n <a\n class=\"nys-button\"\n name=${ifDefined(this.name ? this.name : undefined)}\n ?disabled=${this.disabled}\n aria-disabled=\"${this.disabled ? \"true\" : \"false\"}\"\n value=${ifDefined(this.value ? this.value : undefined)}\n href=${this.href}\n target=${this.target}\n @click=${this._handleClick}\n @focus=\"${this._handleFocus}\"\n @blur=\"${this._handleBlur}\"\n @keydown=\"${this._handleKeydown}\"\n @keyup=\"${this._handleKeyup}\"\n aria-describedby=${ifDefined(this.ariaDescribedBy || undefined)}\n aria-expanded=${ifDefined(this.ariaExpanded || undefined)}\n aria-current=${ifDefined(this.ariaCurrent || undefined)}\n >\n <slot\n name=\"prefix-icon\"\n @slotchange=${this._onPrefixSlotChange}\n ?hidden=${!this.prefixIcon && !this._hasPrefixSlot}\n >\n ${this.prefixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.prefixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n ${this.circle\n ? html`<div class=\"nys-button__text sr-only\">\n ${this.label}\n </div>`\n : this.label\n ? html`<div class=\"nys-button__text\">${this.label}</div>`\n : html` <slot class=\"nys-button__default-slot\"></slot> `}\n <slot\n name=\"suffix-icon\"\n @slotchange=${this._onSuffixSlotChange}\n ?hidden=${!this.suffixIcon && !this._hasSuffixSlot}\n >\n ${this.suffixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.suffixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n <slot\n name=\"circle-icon\"\n @slotchange=${this._onCircleSlotChange}\n ?hidden=${!this.circle ||\n (!this.icon && !this._hasCircleSlot)}\n >\n ${this.icon\n ? html`<nys-icon\n size=${this.size === \"sm\"\n ? \"24\"\n : this.size === \"lg\"\n ? \"40\"\n : \"32\"}\n name=${this.icon}\n ></nys-icon>`\n : \"\"}\n </slot>\n </a>\n </div>\n `\n : html`\n <button\n class=\"nys-button\"\n name=${ifDefined(this.name ? this.name : undefined)}\n ?disabled=${this.disabled}\n form=${ifDefined(this.form || undefined)}\n value=${ifDefined(this.value ? this.value : undefined)}\n type=${this.type}\n aria-controls=${ifDefined(this.ariaControls || undefined)}\n @click=${this._handleClick}\n @focus=${this._handleFocus}\n @blur=${this._handleBlur}\n @keydown=${this._handleKeydown}\n @keyup=${this._handleKeyup}\n aria-describedby=${ifDefined(this.ariaDescribedBy || undefined)}\n aria-expanded=${ifDefined(this.ariaExpanded || undefined)}\n aria-current=${ifDefined(this.ariaCurrent || undefined)}\n >\n <slot\n name=\"prefix-icon\"\n @slotchange=${this._onPrefixSlotChange}\n ?hidden=${!this.prefixIcon && !this._hasPrefixSlot}\n >\n ${this.prefixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.prefixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n ${this.circle\n ? html`<div class=\"nys-button__text sr-only\">\n ${this.label}\n </div>`\n : this.label\n ? html`<div class=\"nys-button__text\">${this.label}</div>`\n : html` <slot class=\"nys-button__default-slot\"></slot> `}\n <slot\n name=\"suffix-icon\"\n @slotchange=${this._onSuffixSlotChange}\n ?hidden=${!this.suffixIcon && !this._hasSuffixSlot}\n >\n ${this.suffixIcon\n ? html`<nys-icon\n size=\"16\"\n name=${this.suffixIcon}\n ></nys-icon>`\n : \"\"}\n </slot>\n <slot\n name=\"circle-icon\"\n @slotchange=${this._onCircleSlotChange}\n ?hidden=${!this.circle || (!this.icon && !this._hasCircleSlot)}\n >\n ${this.icon\n ? html`<nys-icon\n size=${this.size === \"sm\"\n ? \"24\"\n : this.size === \"lg\"\n ? \"40\"\n : \"32\"}\n name=${this.icon}\n ></nys-icon>`\n : \"\"}\n </slot>\n </button>\n `}\n `;\n }\n}\n\nif (!customElements.get(\"nys-button\")) {\n customElements.define(\"nys-button\", NysButton);\n}\n"],"names":["LitElement","unsafeCSS","html","property","state","ifDefined","y","f","e","b","h","i","r","s","a","v","I","n","l","o","w","u","_NysButton","NysFormControlElement","slot","form","event","btn","linkEl","options","innerEl","styles","NysButton","__decorateClass"],"mappings":"AACA,SAAA,cAAAA,GAAA,aAAAC,GAAA,QAAAC,SAAA;AAAA,SAAA,YAAAC,GAAA,SAAAC,SAAA;AAAA,SAAA,aAAAC,SAAA;AAAA,OAAA;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,IAAIC,IAAI;AACR,SAASC,EAAEC,GAAG;AACZ,SAAO,GAAGA,CAAC,IAAI,KAAK,KAAK,IAAIF,GAAG;AAClC;AAqDK,MAACG,IAAI,CAACD,MAAM;AAAA,EACf,MAAM,UAAUA,EAAE;AAAA,IAChB,IAAI,WAAW;AACb,aA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A;AAO1BC,EAAA;AAAA,EAAhB7B,EAAA;AAAM,GA1LI4B,EA0LM,WAAA,gBAAA;AACAC,EAAA;AAAA,EAAhB7B,EAAA;AAAM,GA3LI4B,EA2LM,WAAA,gBAAA;AACAC,EAAA;AAAA,EAAhB7B,EAAA;AAAM,GA5LI4B,EA4LM,WAAA,gBAAA;AAgSd,eAAe,IAAI,YAAY,KAClC,eAAe,OAAO,cAAcA,CAAS;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/nys-button",
3
- "version": "1.19.3",
3
+ "version": "1.20.0",
4
4
  "description": "The Button component from the NYS Design System.",
5
5
  "module": "dist/nys-button.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,9 +23,10 @@
23
23
  "lit-analyze": "lit-analyzer '**/*.ts'"
24
24
  },
25
25
  "dependencies": {
26
- "@nysds/nys-icon": "^1.19.3"
26
+ "@nysds/nys-icon": "^1.20.0"
27
27
  },
28
28
  "devDependencies": {
29
+ "@nysds/internals": "^1.20.0",
29
30
  "lit": "^3.3.1",
30
31
  "typescript": "^5.9.3",
31
32
  "vite": "^7.3.1"