@nysds/nys-button 1.22.0 → 1.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,13 +7,13 @@ import "@nysds/nys-icon";
7
7
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
8
8
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
9
9
  *
10
- * Button Component v1.22.0
10
+ * Button Component v1.22.3
11
11
  * Part of the New York State Design System
12
12
  * Repository: https://github.com/its-hcd/nysds
13
13
  * License: MIT
14
14
  */
15
15
  /*!
16
- * New York State Design System v1.22.0
16
+ * New York State Design System v1.22.3
17
17
  * Description: A design system for New York State's digital products.
18
18
  * Repository: https://github.com/its-hcd/nysds
19
19
  * License: MIT
@@ -1 +1 @@
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.22.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}\nfunction N(e, t, s) {\n e.dispatchEvent(\n new CustomEvent(t, { detail: s, bubbles: !0, composed: !0 })\n );\n}\nfunction I(e, t) {\n e.dispatchEvent(\n new Event(`nys-${t}`, { bubbles: !0, composed: !0 })\n );\n}\nconst p = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, g = {\n labelledby: \"ariaLabel\",\n describedby: \"ariaDescription\"\n};\nfunction _(e) {\n return \"ariaDescribedByElements\" in e;\n}\nfunction E(e) {\n return e === \"errormessage\" ? \"aria-errormessage\" : `aria-${e}`;\n}\nfunction d(e) {\n return e.filter((t) => !!t);\n}\nfunction A(e) {\n return e.map((t) => (t.id || (t.id = f(\"nys-ref\")), t.id));\n}\nfunction w(e, t, s) {\n const n = d(s), i = E(t);\n n.length ? e.setAttribute(i, A(n).join(\" \")) : e.removeAttribute(i);\n}\nfunction x(e, t, s, n, i) {\n const r = d(n), a = p[s], l = t;\n if (a && _(t)) {\n l[a] = r.length ? r : null;\n return;\n }\n const o = g[s];\n if (!o) return;\n const c = i ?? (r.length ? r.map((m) => m.textContent?.trim() ?? \"\").filter(Boolean).join(\" \") : \"\");\n o in l ? l[o] = c || null : c ? e.setAttribute(\n s === \"labelledby\" ? \"aria-label\" : \"aria-description\",\n c\n ) : e.removeAttribute(\n s === \"labelledby\" ? \"aria-label\" : \"aria-description\"\n );\n}\nconst R = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, V = {\n labelledby: \"aria-label\",\n describedby: \"aria-description\"\n};\nfunction L(e, t, s) {\n const n = d(s), i = R[t], r = V[t], a = e;\n if (i && i in e && (a[i] = n.length ? n : null), !r) return;\n const l = n.map((o) => o.textContent?.trim() ?? \"\").filter(Boolean).join(\" \");\n l ? e.setAttribute(r, l) : e.removeAttribute(r);\n}\nconst h = (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__ */ h(u), b = (e) => {\n class t extends h(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(n, i) {\n const r = this.internals;\n if (r && n in r) {\n r[n] = i;\n return;\n }\n const a = v(n);\n i === null ? this.removeAttribute(a) : this.setAttribute(a, i);\n }\n reflectDefaultSemantics() {\n const n = this.defaultRole;\n n && this.setHostAria(\"role\", n);\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__ */ b(u), C = (e) => {\n const s = class s extends b(e) {\n constructor() {\n super(...arguments), this.__internalValidationMessage = \"\";\n }\n get internalValidationMessage() {\n return this.__internalValidationMessage;\n }\n set internalValidationMessage(i) {\n i !== this.__internalValidationMessage && (this.__internalValidationMessage = i, this.requestUpdate(\"internalValidationMessage\"));\n }\n resolvedErrorMessage() {\n return this.errorMessage || this.internalValidationMessage;\n }\n setFormValue(i) {\n this.internals?.setFormValue(i ?? null);\n }\n setValidityFromState(i, r, a) {\n const l = this.internals;\n if (!l) return;\n const o = Object.values(i).some(Boolean);\n o ? l.setValidity(i, r ?? \"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.internalValidationMessage = \"\", this.clearValidity();\n }\n };\n s.formAssociated = !0;\n let t = s;\n return t;\n}, O = /* @__PURE__ */ C(u);\nfunction B(e) {\n const t = e.tagName.toLowerCase(), s = /* @__PURE__ */ new Set(), n = (i) => {\n i.querySelectorAll(\"*\").forEach((r) => {\n const a = r.tagName.toLowerCase();\n a.startsWith(\"nys-\") && a !== t && !customElements.get(a) && s.add(a), r.shadowRoot && n(r.shadowRoot);\n });\n };\n return e.shadowRoot && n(e.shadowRoot), n(e), [...s].sort();\n}\nexport {\n C as FormControlMixin,\n h as IdentifiedMixin,\n P as NysElement,\n O as NysFormControlElement,\n T as NysReflectsAriaElement,\n b as ReflectsAriaMixin,\n w as associateControl,\n L as associateControlRefs,\n x as associateHost,\n N as dispatchNysEvent,\n I as dispatchNysFocusBlur,\n B as findUnregisteredChildren,\n f as generateId,\n _ 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 {\n NysFormControlElement,\n dispatchNysEvent,\n dispatchNysFocusBlur,\n} 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 {Event} nys-click - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.\n * @fires {Event} nys-focus - Fired when the button receives focus.\n * @fires {Event} nys-blur - Fired when the button loses focus.\n *\n * @usagedos\n * - Use for the most important actions you want users to take, such as \"Download\", \"Sign up\", or \"Log out\".\n * - Use `variant=\"fill\"` for the primary action on the page. There should be only one primary action per page.\n * - Use `variant=\"outline\"` for secondary actions, placed next to the primary Fill button.\n * - Use `variant=\"ghost\"` buttons for additional actions beyond primary and secondary.\n * - Use `variant=\"text\"` buttons when an action needs to appear within a text block. If clicking takes the user somewhere else, use a Link instead.\n * - Always set the `type` attribute (`submit`, `button`, or `reset`). The default is `button`.\n * - Use sentence case for button labels, only capitalizing the first word.\n * - Place a `chevron_down icon` on the right for buttons that open a dropdown.\n *\n * @usagedonts\n * - Use buttons for navigation. Use an `<a>` element or Text button for links that take users somewhere else.\n * - Use icons in buttons without a text label. Very few icons are universally understood.\n * - Create custom button styles (color, shape, size). Consistency helps users recognize buttons and predict behavior.\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 the form data, mirroring a native submit button.\n *\n * When `type=\"submit\"` and both `name` and `value` are set, the entry\n * `name=value` is included in the form's data only for submissions this\n * button triggers. It is not included when the form is submitted another\n * way (Enter in a text field, another button, `form.requestSubmit()`),\n * and it is not readable from `new FormData(form)` outside a submission,\n * matching native submitter semantics.\n *\n * A form-associated custom element cannot act as a native submitter, so\n * the value is staged through `ElementInternals.setFormValue()` for the\n * duration of the submission and cleared afterward.\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 * @deprecated Listen for the `nys-click` event instead. `nys-click`\n * bubbles, is composed, and fires for both mouse and keyboard activation\n * but never while disabled. This property still works but is excluded\n * from generated framework wrappers and goes away in 2.0.\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 // A form-associated custom element cannot act as a native\n // submitter (requestSubmit() rejects anything that is not a\n // native submit button), so requestSubmit() stays argument-less.\n // To still contribute name=value like a native submit button,\n // stage the value through ElementInternals only for the duration\n // of this submission: the entry list is constructed synchronously\n // inside requestSubmit(), and clearing afterward keeps the value\n // out of submissions this button did not trigger.\n const contributesValue = this.name !== \"\" && this.value !== \"\";\n if (contributesValue) {\n this.setFormValue(this.value);\n }\n try {\n form.requestSubmit();\n } finally {\n if (contributesValue) {\n this.setFormValue(null);\n }\n }\n break;\n }\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 dispatchNysFocusBlur(this, \"focus\");\n }\n\n private _handleBlur() {\n const button = this.shadowRoot?.querySelector(\".nys-button\");\n button?.classList.remove(\"active-focus\");\n dispatchNysFocusBlur(this, \"blur\");\n }\n\n private _handleClick(event: Event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n this._manageFormAction();\n dispatchNysEvent(this, \"nys-click\", undefined);\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","N","s","I","h","b","n","i","r","a","v","C","l","o","O","u","_NysButton","NysFormControlElement","slot","form","contributesValue","dispatchNysFocusBlur","event","dispatchNysEvent","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;AACA,SAASG,EAAED,GAAG,GAAGE,GAAG;AAClB,EAAAF,EAAE;AAAA,IACA,IAAI,YAAY,GAAG,EAAE,QAAQE,GAAG,SAAS,IAAI,UAAU,GAAE,CAAE;AAAA,EAC/D;AACA;AACA,SAASC,EAAEH,GAAG,GAAG;AACf,EAAAA,EAAE;AAAA,IACA,IAAI,MAAM,OAAO,CAAC,IAAI,EAAE,SAAS,IAAI,UAAU,GAAE,CAAE;AAAA,EACvD;AACA;AAqDK,MAACI,IAAI,CAACJ,MAAM;AAAA,EACf,MAAM,UAAUA,EAAE;AAAA,IAChB,IAAI,WAAW;AACb,aAAO,KAAK,aAAa;AAAA,IAC3B;AAAA,IACA,WAAW;AACT,WAAK,OAAO,KAAK,KAAKD,EAAE,KAAK,QAAQ;AAAA,IACvC;AAAA,IACA,oBAAoB;AAClB,YAAM,kBAAiB,GAAI,KAAK,SA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AA,SAAA;AAMJC,EAAA;AAAA,EAA3BnC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA7LfkC,EA6LiB,WAAA,MAAA;AAMeC,EAAA;AAAA,EAA1CnC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAnM9BkC,EAmMgC,WAAA,QAAA;AAO1BC,EAAA;AAAA,EAAhBlC,EAAA;AAAM,GA1MIiC,EA0MM,WAAA,gBAAA;AACAC,EAAA;AAAA,EAAhBlC,EAAA;AAAM,GA3MIiC,EA2MM,WAAA,gBAAA;AACAC,EAAA;AAAA,EAAhBlC,EAAA;AAAM,GA5MIiC,EA4MM,WAAA,gBAAA;AA6Sd,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.22.3\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}\nfunction N(e, t, s) {\n e.dispatchEvent(\n new CustomEvent(t, { detail: s, bubbles: !0, composed: !0 })\n );\n}\nfunction I(e, t) {\n e.dispatchEvent(\n new Event(`nys-${t}`, { bubbles: !0, composed: !0 })\n );\n}\nconst p = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, g = {\n labelledby: \"ariaLabel\",\n describedby: \"ariaDescription\"\n};\nfunction _(e) {\n return \"ariaDescribedByElements\" in e;\n}\nfunction E(e) {\n return e === \"errormessage\" ? \"aria-errormessage\" : `aria-${e}`;\n}\nfunction d(e) {\n return e.filter((t) => !!t);\n}\nfunction A(e) {\n return e.map((t) => (t.id || (t.id = f(\"nys-ref\")), t.id));\n}\nfunction w(e, t, s) {\n const n = d(s), i = E(t);\n n.length ? e.setAttribute(i, A(n).join(\" \")) : e.removeAttribute(i);\n}\nfunction x(e, t, s, n, i) {\n const r = d(n), a = p[s], l = t;\n if (a && _(t)) {\n l[a] = r.length ? r : null;\n return;\n }\n const o = g[s];\n if (!o) return;\n const c = i ?? (r.length ? r.map((m) => m.textContent?.trim() ?? \"\").filter(Boolean).join(\" \") : \"\");\n o in l ? l[o] = c || null : c ? e.setAttribute(\n s === \"labelledby\" ? \"aria-label\" : \"aria-description\",\n c\n ) : e.removeAttribute(\n s === \"labelledby\" ? \"aria-label\" : \"aria-description\"\n );\n}\nconst R = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, V = {\n labelledby: \"aria-label\",\n describedby: \"aria-description\"\n};\nfunction L(e, t, s) {\n const n = d(s), i = R[t], r = V[t], a = e;\n if (i && i in e && (a[i] = n.length ? n : null), !r) return;\n const l = n.map((o) => o.textContent?.trim() ?? \"\").filter(Boolean).join(\" \");\n l ? e.setAttribute(r, l) : e.removeAttribute(r);\n}\nconst h = (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__ */ h(u), b = (e) => {\n class t extends h(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(n, i) {\n const r = this.internals;\n if (r && n in r) {\n r[n] = i;\n return;\n }\n const a = v(n);\n i === null ? this.removeAttribute(a) : this.setAttribute(a, i);\n }\n reflectDefaultSemantics() {\n const n = this.defaultRole;\n n && this.setHostAria(\"role\", n);\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__ */ b(u), C = (e) => {\n const s = class s extends b(e) {\n constructor() {\n super(...arguments), this.__internalValidationMessage = \"\";\n }\n get internalValidationMessage() {\n return this.__internalValidationMessage;\n }\n set internalValidationMessage(i) {\n i !== this.__internalValidationMessage && (this.__internalValidationMessage = i, this.requestUpdate(\"internalValidationMessage\"));\n }\n resolvedErrorMessage() {\n return this.errorMessage || this.internalValidationMessage;\n }\n setFormValue(i) {\n this.internals?.setFormValue(i ?? null);\n }\n setValidityFromState(i, r, a) {\n const l = this.internals;\n if (!l) return;\n const o = Object.values(i).some(Boolean);\n o ? l.setValidity(i, r ?? \"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.internalValidationMessage = \"\", this.clearValidity();\n }\n };\n s.formAssociated = !0;\n let t = s;\n return t;\n}, O = /* @__PURE__ */ C(u);\nfunction B(e) {\n const t = e.tagName.toLowerCase(), s = /* @__PURE__ */ new Set(), n = (i) => {\n i.querySelectorAll(\"*\").forEach((r) => {\n const a = r.tagName.toLowerCase();\n a.startsWith(\"nys-\") && a !== t && !customElements.get(a) && s.add(a), r.shadowRoot && n(r.shadowRoot);\n });\n };\n return e.shadowRoot && n(e.shadowRoot), n(e), [...s].sort();\n}\nexport {\n C as FormControlMixin,\n h as IdentifiedMixin,\n P as NysElement,\n O as NysFormControlElement,\n T as NysReflectsAriaElement,\n b as ReflectsAriaMixin,\n w as associateControl,\n L as associateControlRefs,\n x as associateHost,\n N as dispatchNysEvent,\n I as dispatchNysFocusBlur,\n B as findUnregisteredChildren,\n f as generateId,\n _ 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 {\n NysFormControlElement,\n dispatchNysEvent,\n dispatchNysFocusBlur,\n} 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 {Event} nys-click - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.\n * @fires {Event} nys-focus - Fired when the button receives focus.\n * @fires {Event} nys-blur - Fired when the button loses focus.\n *\n * @usagedos\n * - Use for the most important actions you want users to take, such as \"Download\", \"Sign up\", or \"Log out\".\n * - Use `variant=\"fill\"` for the primary action on the page. There should be only one primary action per page.\n * - Use `variant=\"outline\"` for secondary actions, placed next to the primary Fill button.\n * - Use `variant=\"ghost\"` buttons for additional actions beyond primary and secondary.\n * - Use `variant=\"text\"` buttons when an action needs to appear within a text block. If clicking takes the user somewhere else, use a Link instead.\n * - Always set the `type` attribute (`submit`, `button`, or `reset`). The default is `button`.\n * - Use sentence case for button labels, only capitalizing the first word.\n * - Place a `chevron_down icon` on the right for buttons that open a dropdown.\n *\n * @usagedonts\n * - Use buttons for navigation. Use an `<a>` element or Text button for links that take users somewhere else.\n * - Use icons in buttons without a text label. Very few icons are universally understood.\n * - Create custom button styles (color, shape, size). Consistency helps users recognize buttons and predict behavior.\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 the form data, mirroring a native submit button.\n *\n * When `type=\"submit\"` and both `name` and `value` are set, the entry\n * `name=value` is included in the form's data only for submissions this\n * button triggers. It is not included when the form is submitted another\n * way (Enter in a text field, another button, `form.requestSubmit()`),\n * and it is not readable from `new FormData(form)` outside a submission,\n * matching native submitter semantics.\n *\n * A form-associated custom element cannot act as a native submitter, so\n * the value is staged through `ElementInternals.setFormValue()` for the\n * duration of the submission and cleared afterward.\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 * @deprecated Listen for the `nys-click` event instead. `nys-click`\n * bubbles, is composed, and fires for both mouse and keyboard activation\n * but never while disabled. This property still works but is excluded\n * from generated framework wrappers and goes away in 2.0.\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 // A form-associated custom element cannot act as a native\n // submitter (requestSubmit() rejects anything that is not a\n // native submit button), so requestSubmit() stays argument-less.\n // To still contribute name=value like a native submit button,\n // stage the value through ElementInternals only for the duration\n // of this submission: the entry list is constructed synchronously\n // inside requestSubmit(), and clearing afterward keeps the value\n // out of submissions this button did not trigger.\n const contributesValue = this.name !== \"\" && this.value !== \"\";\n if (contributesValue) {\n this.setFormValue(this.value);\n }\n try {\n form.requestSubmit();\n } finally {\n if (contributesValue) {\n this.setFormValue(null);\n }\n }\n break;\n }\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 dispatchNysFocusBlur(this, \"focus\");\n }\n\n private _handleBlur() {\n const button = this.shadowRoot?.querySelector(\".nys-button\");\n button?.classList.remove(\"active-focus\");\n dispatchNysFocusBlur(this, \"blur\");\n }\n\n private _handleClick(event: Event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n this._manageFormAction();\n dispatchNysEvent(this, \"nys-click\", undefined);\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","N","s","I","h","b","n","i","r","a","v","C","l","o","O","u","_NysButton","NysFormControlElement","slot","form","contributesValue","dispatchNysFocusBlur","event","dispatchNysEvent","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;AACA,SAASG,EAAED,GAAG,GAAGE,GAAG;AAClB,EAAAF,EAAE;AAAA,IACA,IAAI,YAAY,GAAG,EAAE,QAAQE,GAAG,SAAS,IAAI,UAAU,GAAE,CAAE;AAAA,EAC/D;AACA;AACA,SAASC,EAAEH,GAAG,GAAG;AACf,EAAAA,EAAE;AAAA,IACA,IAAI,MAAM,OAAO,CAAC,IAAI,EAAE,SAAS,IAAI,UAAU,GAAE,CAAE;AAAA,EACvD;AACA;AAqDK,MAACI,IAAI,CAACJ,MAAM;AAAA,EACf,MAAM,UAAUA,EAAE;AAAA,IAChB,IAAI,WAAW;AACb,aAAO,KAAK,aAAa;AAAA,IAC3B;AAAA,IACA,WAAW;AACT,WAAK,OAAO,KAAK,KAAKD,EAAE,KAAK,QAAQ;AAAA,IACvC;AAAA,IACA,oBAAoB;AAClB,YAAM,kBAAiB,GAAI,KAAK,SAAQ;AAAA,IAC1C;AAAA,EACJ;AAC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3BnC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA7LfkC,EA6LiB,WAAA,MAAA;AAMeC,EAAA;AAAA,EAA1CnC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAnM9BkC,EAmMgC,WAAA,QAAA;AAO1BC,EAAA;AAAA,EAAhBlC,EAAA;AAAM,GA1MIiC,EA0MM,WAAA,gBAAA;AACAC,EAAA;AAAA,EAAhBlC,EAAA;AAAM,GA3MIiC,EA2MM,WAAA,gBAAA;AACAC,EAAA;AAAA,EAAhBlC,EAAA;AAAM,GA5MIiC,EA4MM,WAAA,gBAAA;AA6Sd,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.22.0",
3
+ "version": "1.22.3",
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,10 +23,10 @@
23
23
  "lit-analyze": "lit-analyzer '**/*.ts'"
24
24
  },
25
25
  "dependencies": {
26
- "@nysds/nys-icon": "^1.22.0"
26
+ "@nysds/nys-icon": "^1.22.3"
27
27
  },
28
28
  "devDependencies": {
29
- "@nysds/internals": "^1.22.0",
29
+ "@nysds/internals": "^1.22.3",
30
30
  "lit": "^3.3.1",
31
31
  "typescript": "^5.9.3",
32
32
  "vite": "^7.3.1"