@nysds/nys-radiobutton 1.18.3 → 1.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +1,109 @@
1
- import { LitElement as v, unsafeCSS as w, html as f } from "lit";
2
- import { property as r, state as g } from "lit/decorators.js";
3
- import { ifDefined as m } from "lit/directives/if-defined.js";
1
+ import { LitElement as g, unsafeCSS as k, html as b } from "lit";
2
+ import { property as i, state as _ } from "lit/decorators.js";
3
+ import { ifDefined as v } from "lit/directives/if-defined.js";
4
4
  /*!
5
5
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
6
6
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
7
7
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
8
8
  *
9
- * Radiobutton Component v1.18.3
9
+ * Radiobutton Component v1.19.1
10
10
  * Part of the New York State Design System
11
11
  * Repository: https://github.com/its-hcd/nysds
12
12
  * License: MIT
13
13
  */
14
- const E = `:host{--_nys-radiobutton-size: var(--nys-size-400, 32px);--_nys-radiobutton-border-radius: var(--nys-radius-md, 4px);--_nys-radiobutton-border-width: var(--nys-border-width-md, 2px);--_nys-radiobutton-outline-color: var(--nys-color-focus, #004dd1);--_nys-radiobutton-outline-width: var(--nys-border-width-md, 2px);--_nys-radiobutton-outline-offset: var(--nys-space-2px, 2px);--_nys-radiobutton-gap: var(--nys-space-150, 12px);--_nys-radiogroup-gap: var(--nys-space-200, 16px);--_nys-radiobutton-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-radiobutton-font-size: var(--nys-font-size-ui-md, 16px);--_nys-radiobutton-font-weight--label: var(--nys-font-weight-regular, 400);--_nys-radiobutton-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-radiobutton-color: var( --nys-color-text, var(--nys-color-neutral-900, #1b1b1b) );--_nys-radiobutton-background-color: var(--nys-color-ink-reverse, #ffffff);--_nys-radiobutton-border-color: var(--nys-color-neutral-600, #62666a);--_nys-radiobutton-background-color--hover: var( --nys-color-neutral-50, #ededed );--_nys-radiobutton-border-color--hover: var(--nys-color-ink, #1b1b1b);--_nys-radiobutton-background-color--active: var( --nys-color-neutral-100, #d0d0ce );--_nys-radiobutton-border-color--active: var(--nys-color-ink, #1b1b1b);--_nys-radiobutton-background-color--checked: var(--nys-color-theme, #154973);--_nys-radiobutton-background-color--disabled: var( --nys-color-ink-reverse, #f0f0f0 );--_nys-radiobutton-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-radiobutton-border-color--disabled: var( --nys-color-neutral-100, #d0d0ce );--_nys-radiobutton-background-color--checked--disabled: var( --nys-color-neutral-100, #d0d0ce );--_nys-radiobutton-border-color--checked--disabled: var( --nys-color-neutral-100, #d0d0ce )}:host([size=sm]){--_nys-radiobutton-size: var(--nys-size-300, 24px);--_nys-radiobutton-border-radius: var(--nys-radius-sm, 2px);--_nys-radiogroup-gap: var(--nys-space-100, 8px);--_nys-radiobutton-gap: var(--nys-space-100, 8px)}:host([size=md]){--_nys-radiobutton-size: var(--nys-size-400, 32px);--_nys-radiobutton-border-radius: var(--nys-radius-md, 4px);--_nys-radiogroup-gap: var(--nys-space-200, 16px);--_nys-radiobutton-gap: var(--nys-space-150, 12px)}:host([tile]){--_nys-radiobutton-font-weight--label: var(--nys-font-weight-semibold, 600);--_nys-radiobutton-border-width--tile: var(--nys-border-width-sm, 1px);--_nys-radiobutton-border-radius--tile: var(--nys-radius-md, 4px);--_nys-radiobutton-border-color--tile: var(--nys-color-neutral-100, #d0d0ce);--_nys-radiobutton-background-color--tile: var(--nys-color-ink-reverse, #ffffff);--_nys-radiobutton-padding--x--tile: var(--nys-space-250, 20px);--_nys-radiobutton-padding--y--tile: var(--nys-space-200, 16px);--_nys-radiobutton-border-color--tile--hover: var( --nys-color-neutral-700, #4a4d4f );--_nys-radiobutton-background-color--tile--hover: var( --nys-color-ink-reverse, #ffffff );--_nys-radiobutton-border-color--tile--active: var( --nys-color-neutral-900, #1b1b1b );--_nys-radiobutton-background-color--tile--active: var( --nys-color-ink-reverse, #ffffff );--_nys-radiobutton-border-color--tile--checked: var( --nys-color-theme-mid, #457aa5 );--_nys-radiobutton-background-color--tile--checked: var( --nys-color-theme-faint, #f7fafd );--_nys-radiobutton-border-color--tile--disabled: var( --nys-color-ink-reverse, #f0f0f0 );--_nys-radiobutton-background-color--tile--disabled: var( --nys-color-neutral-100, #d0d0ce )}:host([tile][size=sm]){--_nys-radiobutton-padding--x--tile: var(--nys-space-200, 16px);--_nys-radiobutton-padding--y--tile: var(--nys-space-150, 12px)}:host([tile][showError]){--_nys-radiobutton-border-color--tile: var(--nys-color-danger, #b52c2c);--_nys-radiobutton-border-color--tile--hover: var( --nys-color-danger, #b52c2c );--_nys-radiobutton-border-color--tile--active: var( --nys-color-danger, #b52c2c );--_nys-radiobutton-border-color--tile--checked: var( --nys-color-danger, #b52c2c )}.nys-radiogroup{display:flex;flex-direction:column;gap:var(--nys-space-200, 16px);font-family:var(--_nys-radiobutton-font-family);font-size:var(--_nys-radiobutton-font-size);line-height:var(--_nys-radiobutton-line-height)}.nys-radiogroup__content{gap:var(--_nys-radiogroup-gap);display:flex;flex-direction:column}.nys-radiobutton{display:flex;flex-direction:column;font-family:var(--_nys-radiobutton-font-family);font-size:var(--_nys-radiobutton-font-size);line-height:var(--_nys-radiobutton-line-height);border-radius:var(--_nys-radiobutton-border-radius--tile);border:var(--_nys-radiobutton-border-width--tile) solid var(--_nys-radiobutton-border-color--tile);background-color:var(--_nys-radiobutton-background-color--tile);padding:var(--_nys-radiobutton-padding--y--tile) var(--_nys-radiobutton-padding--x--tile)}.nys-radiobutton__radio{appearance:none;width:var(--_nys-radiobutton-size);height:var(--_nys-radiobutton-size);min-width:var(--_nys-radiobutton-size);min-height:var(--_nys-radiobutton-size);max-width:var(--_nys-radiobutton-size);max-height:var(--_nys-radiobutton-size);border:solid var(--_nys-radiobutton-border-width) var(--_nys-radiobutton-border-color);background-color:var(--_nys-radiobutton-background-color);border-radius:100%;background-repeat:no-repeat;background-position:center;background-size:contain;outline-offset:var(--_nys-radiobutton-outline-offset);outline:none;margin:0 0 auto;box-sizing:border-box}.nys-radiobutton:hover,.nys-radiobutton:hover *{cursor:pointer}input:not(:disabled):checked+.nys-radiobutton .nys-radiobutton__radio{background-image:url('data:image/svg+xml;utf8,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="11" stroke="white" stroke-width="6"/></svg>');background-color:var(--_nys-radiobutton-background-color--checked)}:host([tile]) .nys-radiobutton:has(input:not(:disabled):checked)+.nys-radiobutton .nys-radiobutton__radio{border-color:var(--_nys-radiobutton-border-color--tile--checked);background-color:var(--_nys-radiobutton-background-color--tile--checked)}:host([tile]) .nys-radiobutton:has(input:not(:disabled):checked:hover)+.nys-radiobutton .nys-radiobutton__radio{cursor:default}input:disabled:checked+.nys-radiobutton .nys-radiobutton__radio{background-image:url('data:image/svg+xml;utf8,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="11" stroke="white" stroke-width="6"/></svg>');border-color:var(--_nys-radiobutton-border-color--checked--disabled);background-color:var(--_nys-radiobutton-background-color--checked--disabled)}:host([tile]) .nys-radiobutton:has(input:disabled:checked)+.nys-radiobutton .nys-radiobutton__radio{border-color:var(--_nys-radiobutton-background-color--tile--disabled);background-color:var(--_nys-radiobutton-border-color--tile--disabled)}input:disabled+.nys-radiobutton,input:disabled+.nys-radiobutton *{cursor:not-allowed}input:disabled+.nys-radiobutton .nys-radiobutton__radio{background-color:var(--_nys-radiobutton-background-color--disabled);border-color:var(--_nys-radiobutton-border-color--disabled);cursor:not-allowed}:host([tile]) .nys-radiobutton:has(input:disabled)+.nys-radiobutton .nys-radiobutton__radio{background-color:var(--_nys-radiobutton-background-color--disabled);border-color:var(--_nys-radiobutton-border-color--disabled);cursor:not-allowed}input:hover:not(:disabled):not(:checked)+.nys-radiobutton .nys-radiobutton__radio,input:not(:disabled):not(:checked)+.nys-radiobutton:hover .nys-radiobutton__radio{border-color:var(--_nys-radiobutton-border-color--hover);background-color:var(--_nys-radiobutton-background-color--hover)}:host([tile]) input:not(:disabled):not(:checked)+.nys-radiobutton:hover{border-color:var(--_nys-radiobutton-border-color--tile--hover);background-color:var(--_nys-radiobutton-background-color--tile--hover);outline:solid var(--_nys-radiobutton-border-width--tile) var(--_nys-radiobutton-border-color--tile--hover)}input:active:not(:disabled):not(:checked)+.nys-radiobutton .nys-radiobutton__radio,input:not(:disabled):not(:checked)+.nys-radiobutton:active .nys-radiobutton__radio{border-color:var(--_nys-radiobutton-border-color--active);background-color:var(--_nys-radiobutton-background-color--active)}:host([tile]) input:not(:disabled):not(:checked)+.nys-radiobutton:active{border-color:var(--_nys-radiobutton-border-color--tile--active);background-color:var(--_nys-radiobutton-background-color--tile--active);outline:solid var(--_nys-radiobutton-border-width--tile) var(--_nys-radiobutton-border-color--tile--active)}:host(:focus-visible){outline:none}:host(:focus-visible) .nys-radiobutton__radio{outline:solid var(--_nys-radiobutton-outline-width) var(--_nys-radiobutton-outline-color)}input:focus-visible+.nys-radiobutton .nys-radiobutton__radio,.nys-radiobutton:has(:focus-visible) .nys-radiobutton__radio{outline:solid var(--_nys-radiobutton-outline-width) var(--_nys-radiobutton-outline-color);outline-offset:var(--_nys-radiobutton-outline-offset)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.nys-radiobutton__main-container{display:flex;align-items:center}.nys-radiobutton__other-container{display:flex;padding-inline-start:calc(var(--_nys-radiobutton-size) + var(--_nys-radiobutton-gap))}.nys-radiobutton__main-container>nys-label{--_nys-label-font-weight: var(--_nys-radiobutton-font-weight--label);display:flex;padding-inline-start:var(--_nys-radiobutton-gap)}:host([tile]) .nys-radiobutton__main-container>nys-label{--_nys-description-font-style: normal}input:disabled+.nys-radiobutton .nys-radiobutton__main-container>nys-label,input:disabled+.nys-radiobutton .nys-radiobutton__main-container>nys-label *{cursor:not-allowed;--_nys-label-cursor: not-allowed;--_nys-label-color: var(--_nys-radiobutton-color--disabled);--_nys-description-color: var(--_nys-radiobutton-color--disabled);color:var(--_nys-radiobutton-color--disabled)}fieldset{all:unset;display:contents}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}`;
15
- var A = Object.defineProperty, l = (b, t, e, o) => {
16
- for (var s = void 0, n = b.length - 1, h; n >= 0; n--)
17
- (h = b[n]) && (s = h(t, e, s) || s);
18
- return s && A(t, e, s), s;
14
+ const w = `:host{--_nys-radiobutton-size: var(--nys-size-400, 32px);--_nys-radiobutton-border-radius: var(--nys-radius-md, 4px);--_nys-radiobutton-border-width: var(--nys-border-width-md, 2px);--_nys-radiobutton-outline-color: var(--nys-color-focus, #004dd1);--_nys-radiobutton-outline-width: var(--nys-border-width-md, 2px);--_nys-radiobutton-outline-offset: var(--nys-space-2px, 2px);--_nys-radiobutton-gap: var(--nys-space-150, 12px);--_nys-radiogroup-gap: var(--nys-space-200, 16px);--_nys-radiobutton-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-radiobutton-font-size: var(--nys-font-size-ui-md, 16px);--_nys-radiobutton-font-weight--label: var(--nys-font-weight-regular, 400);--_nys-radiobutton-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-radiobutton-color: var( --nys-color-text, var(--nys-color-neutral-900, #1b1b1b) );--_nys-radiobutton-background-color: var(--nys-color-ink-reverse, #ffffff);--_nys-radiobutton-border-color: var(--nys-color-neutral-600, #62666a);--_nys-radiobutton-background-color--hover: var( --nys-color-neutral-50, #ededed );--_nys-radiobutton-border-color--hover: var(--nys-color-ink, #1b1b1b);--_nys-radiobutton-background-color--active: var( --nys-color-neutral-100, #d0d0ce );--_nys-radiobutton-border-color--active: var(--nys-color-ink, #1b1b1b);--_nys-radiobutton-background-color--checked: var(--nys-color-theme, #154973);--_nys-radiobutton-background-color--disabled: var( --nys-color-ink-reverse, #f0f0f0 );--_nys-radiobutton-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-radiobutton-border-color--disabled: var( --nys-color-neutral-100, #d0d0ce );--_nys-radiobutton-background-color--checked--disabled: var( --nys-color-neutral-100, #d0d0ce );--_nys-radiobutton-border-color--checked--disabled: var( --nys-color-neutral-100, #d0d0ce )}:host([size=sm]){--_nys-radiobutton-size: var(--nys-size-300, 24px);--_nys-radiobutton-border-radius: var(--nys-radius-sm, 2px);--_nys-radiogroup-gap: var(--nys-space-100, 8px);--_nys-radiobutton-gap: var(--nys-space-100, 8px)}:host([size=md]){--_nys-radiobutton-size: var(--nys-size-400, 32px);--_nys-radiobutton-border-radius: var(--nys-radius-md, 4px);--_nys-radiogroup-gap: var(--nys-space-200, 16px);--_nys-radiobutton-gap: var(--nys-space-150, 12px)}:host([tile]){--_nys-radiobutton-font-weight--label: var(--nys-font-weight-semibold, 600);--_nys-radiobutton-border-width--tile: var(--nys-border-width-sm, 1px);--_nys-radiobutton-border-radius--tile: var(--nys-radius-md, 4px);--_nys-radiobutton-border-color--tile: var(--nys-color-neutral-100, #d0d0ce);--_nys-radiobutton-background-color--tile: var( --nys-color-ink-reverse, #ffffff );--_nys-radiobutton-padding--x--tile: var(--nys-space-250, 20px);--_nys-radiobutton-padding--y--tile: var(--nys-space-200, 16px);--_nys-radiobutton-border-color--tile--hover: var( --nys-color-neutral-700, #4a4d4f );--_nys-radiobutton-background-color--tile--hover: var( --nys-color-ink-reverse, #ffffff );--_nys-radiobutton-border-color--tile--active: var( --nys-color-neutral-900, #1b1b1b );--_nys-radiobutton-background-color--tile--active: var( --nys-color-ink-reverse, #ffffff );--_nys-radiobutton-border-color--tile--checked: var( --nys-color-theme-mid, #457aa5 );--_nys-radiobutton-background-color--tile--checked: var( --nys-color-theme-faint, #f7fafd );--_nys-radiobutton-border-color--tile--disabled: var( --nys-color-neutral-100, #d0d0ce );--_nys-radiobutton-background-color--tile--disabled: var( --nys-color-ink-reverse, #ffffff )}:host([tile][size=sm]){--_nys-radiobutton-padding--x--tile: var(--nys-space-200, 16px);--_nys-radiobutton-padding--y--tile: var(--nys-space-150, 12px)}:host([tile][showError]){--_nys-radiobutton-border-color--tile: var(--nys-color-danger, #b52c2c);--_nys-radiobutton-border-color--tile--hover: var( --nys-color-danger, #b52c2c );--_nys-radiobutton-border-color--tile--active: var( --nys-color-danger, #b52c2c );--_nys-radiobutton-border-color--tile--checked: var( --nys-color-danger, #b52c2c )}.nys-radiogroup{display:flex;flex-direction:column;gap:var(--nys-space-200, 16px);font-family:var(--_nys-radiobutton-font-family);font-size:var(--_nys-radiobutton-font-size);line-height:var(--_nys-radiobutton-line-height)}.nys-radiogroup legend{margin-bottom:var(--nys-space-200, 16px)}.nys-radiogroup__content{gap:var(--_nys-radiogroup-gap);display:flex;flex-direction:column}.nys-radiobutton{display:flex;flex-direction:column;font-family:var(--_nys-radiobutton-font-family);font-size:var(--_nys-radiobutton-font-size);line-height:var(--_nys-radiobutton-line-height);border-radius:var(--_nys-radiobutton-border-radius--tile);border:var(--_nys-radiobutton-border-width--tile) solid var(--_nys-radiobutton-border-color--tile);background-color:var(--_nys-radiobutton-background-color--tile);padding:var(--_nys-radiobutton-padding--y--tile) var(--_nys-radiobutton-padding--x--tile)}.nys-radiobutton__radio{appearance:none;width:var(--_nys-radiobutton-size);height:var(--_nys-radiobutton-size);min-width:var(--_nys-radiobutton-size);min-height:var(--_nys-radiobutton-size);max-width:var(--_nys-radiobutton-size);max-height:var(--_nys-radiobutton-size);border:solid var(--_nys-radiobutton-border-width) var(--_nys-radiobutton-border-color);background-color:var(--_nys-radiobutton-background-color);border-radius:100%;background-repeat:no-repeat;background-position:center;background-size:contain;outline-offset:var(--_nys-radiobutton-outline-offset);outline:none;margin:0 0 auto;box-sizing:border-box}.nys-radiobutton:hover,.nys-radiobutton:hover *{cursor:pointer}.nys-radiobutton__radio:not(:disabled):checked{background-image:url('data:image/svg+xml;utf8,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="11" stroke="white" stroke-width="6"/></svg>');background-color:var(--_nys-radiobutton-background-color--checked)}:host([tile]) .nys-radiobutton:has(.nys-radiobutton__radio:not(:disabled):checked){border-color:var(--_nys-radiobutton-border-color--tile--checked);background-color:var(--_nys-radiobutton-background-color--tile--checked)}:host([tile]) .nys-radiobutton:has(.nys-radiobutton__radio:not(:disabled):checked:hover){cursor:default}.nys-radiobutton__radio:disabled:checked{background-image:url('data:image/svg+xml;utf8,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="11" stroke="white" stroke-width="6"/></svg>');border-color:var(--_nys-radiobutton-border-color--checked--disabled);background-color:var(--_nys-radiobutton-background-color--checked--disabled)}:host([tile]) .nys-radiobutton:has(.nys-radiobutton__radio:disabled){border-color:var(--_nys-radiobutton-border-color--tile--disabled);background-color:var(--_nys-radiobutton-background-color--tile--disabled)}.nys-radiobutton__radio:disabled{background-color:var(--_nys-radiobutton-background-color--disabled);border-color:var(--_nys-radiobutton-border-color--disabled);cursor:not-allowed}.nys-radiobutton__radio:hover:not(:disabled):not(:checked),.nys-radiobutton:hover .nys-radiobutton__radio:not(:disabled):not(:checked){border-color:var(--_nys-radiobutton-border-color--hover);background-color:var(--_nys-radiobutton-background-color--hover)}:host([tile]) .nys-radiobutton:hover:has(.nys-radiobutton__radio:not(:disabled):not(:checked)){border-color:var(--_nys-radiobutton-border-color--tile--hover);background-color:var(--_nys-radiobutton-background-color--tile--hover);outline:solid var(--_nys-radiobutton-border-width--tile) var(--_nys-radiobutton-border-color--tile--hover)}.nys-radiobutton__radio:active:not(:disabled):not(:checked),.nys-radiobutton:active .nys-radiobutton__radio:not(:disabled):not(:checked){border-color:var(--_nys-radiobutton-border-color--active);background-color:var(--_nys-radiobutton-background-color--active)}:host([tile]) .nys-radiobutton:active:has(.nys-radiobutton__radio:not(:disabled):not(:checked)){border-color:var(--_nys-radiobutton-border-color--tile--active);background-color:var(--_nys-radiobutton-background-color--tile--active);outline:solid var(--_nys-radiobutton-border-width--tile) var(--_nys-radiobutton-border-color--tile--active)}:host(:focus-visible){outline:none}:host(:focus-visible) .nys-radiobutton__radio{outline:solid var(--_nys-radiobutton-outline-width) var(--_nys-radiobutton-outline-color)}.nys-radiobutton__radio:focus-visible{outline:solid var(--_nys-radiobutton-outline-width) var(--_nys-radiobutton-outline-color);outline-offset:var(--_nys-radiobutton-outline-offset)}.nys-radiobutton__main-container{display:flex;align-items:center}.nys-radiobutton__other-container{display:flex;padding-inline-start:calc(var(--_nys-radiobutton-size) + var(--_nys-radiobutton-gap))}.nys-radiobutton__main-container>nys-label{--_nys-label-font-weight: var(--_nys-radiobutton-font-weight--label);display:flex;padding-inline-start:var(--_nys-radiobutton-gap)}:host([tile]) .nys-radiobutton__main-container>nys-label{--_nys-description-font-style: normal}.nys-radiobutton:has(.nys-radiobutton__radio:disabled) .nys-radiobutton__main-container>nys-label,.nys-radiobutton:has(.nys-radiobutton__radio:disabled) .nys-radiobutton__main-container>nys-label *{cursor:not-allowed;--_nys-label-cursor: not-allowed;--_nys-label-color: var(--_nys-radiobutton-color--disabled);--_nys-description-color: var(--_nys-radiobutton-color--disabled);color:var(--_nys-radiobutton-color--disabled)}fieldset{all:unset;display:contents}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}`;
15
+ var E = Object.defineProperty, l = (y, t, o, e) => {
16
+ for (var r = void 0, s = y.length - 1, u; s >= 0; s--)
17
+ (u = y[s]) && (r = u(t, o, r) || r);
18
+ return r && E(t, o, r), r;
19
+ };
20
+ let $ = 0;
21
+ const m = class m extends g {
22
+ constructor() {
23
+ super(...arguments), this.checked = !1, this.disabled = !1, this.required = !1, this.label = "", this.description = "", this.id = "", this.name = "", this.value = "", this.form = null, this.size = "md", this.tile = !1, this.other = !1, this.showOtherError = !1;
24
+ }
25
+ /**
26
+ * Lifecycle methods
27
+ * --------------------------------------------------------------------------
28
+ */
29
+ connectedCallback() {
30
+ super.connectedCallback(), this.id || (this.id = `nys-radiobutton-${Date.now()}-${$++}`);
31
+ }
32
+ render() {
33
+ return b``;
34
+ }
35
+ };
36
+ m.styles = k(w);
37
+ let d = m;
38
+ l([
39
+ i({ type: Boolean, reflect: !0 })
40
+ ], d.prototype, "checked");
41
+ l([
42
+ i({ type: Boolean, reflect: !0 })
43
+ ], d.prototype, "disabled");
44
+ l([
45
+ i({ type: Boolean, reflect: !0 })
46
+ ], d.prototype, "required");
47
+ l([
48
+ i({ type: String })
49
+ ], d.prototype, "label");
50
+ l([
51
+ i({ type: String })
52
+ ], d.prototype, "description");
53
+ l([
54
+ i({ type: String, reflect: !0 })
55
+ ], d.prototype, "id");
56
+ l([
57
+ i({ type: String, reflect: !0 })
58
+ ], d.prototype, "name");
59
+ l([
60
+ i({ type: String })
61
+ ], d.prototype, "value");
62
+ l([
63
+ i({ type: String, reflect: !0 })
64
+ ], d.prototype, "form");
65
+ l([
66
+ i({ type: String, reflect: !0 })
67
+ ], d.prototype, "size");
68
+ l([
69
+ i({ type: Boolean, reflect: !0 })
70
+ ], d.prototype, "tile");
71
+ l([
72
+ i({ type: Boolean, reflect: !0 })
73
+ ], d.prototype, "other");
74
+ l([
75
+ i({ type: Boolean })
76
+ ], d.prototype, "showOtherError");
77
+ customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", d);
78
+ var A = Object.defineProperty, a = (y, t, o, e) => {
79
+ for (var r = void 0, s = y.length - 1, u; s >= 0; s--)
80
+ (u = y[s]) && (r = u(t, o, r) || r);
81
+ return r && A(t, o, r), r;
19
82
  };
20
83
  let R = 0;
21
- const p = class p extends v {
84
+ const p = class p extends g {
22
85
  // allows use of elementInternals' API
23
86
  constructor() {
24
- super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this.tooltip = "", this.form = null, this.size = "md", this.selectedValue = null, this._slottedDescriptionText = "", this._internals = this.attachInternals();
87
+ super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this.tooltip = "", this.form = null, this.size = "md", this._showOtherError = !1, this.selectedValue = null, this._slottedDescriptionText = "", this._radios = [], this.isMobile = !1, this._hasUserInteracted = !1, this._handleMobileQuery = () => {
88
+ this.isMobile = this._mobileQuery.matches;
89
+ }, this._handleRadiobtnClick = (t) => {
90
+ t.disabled || this.shadowRoot?.querySelector(`#input-${t.id}`)?.click();
91
+ }, this._internals = this.attachInternals();
25
92
  }
26
93
  // Generate a unique ID if one is not provided
27
94
  connectedCallback() {
28
- super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${R++}`), this.addEventListener("nys-change", this._handleRadioButtonChange), this.addEventListener("invalid", this._handleInvalid), this.addEventListener("nys-error", this._handleChildError), this.addEventListener("nys-error-clear", this._handleChildErrorClear), this.addEventListener("nys-other-input", this._handleOtherInput);
95
+ super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${R++}`), this._mobileQuery = window.matchMedia("(max-width: 479px)"), this.isMobile = this._mobileQuery.matches, this._mobileQuery.addEventListener("change", this._handleMobileQuery), this.addEventListener("invalid", this._handleInvalid), this._childObserver = new MutationObserver(() => {
96
+ this._radios = this._getAllRadios(), this.requestUpdate();
97
+ }), this._childObserver.observe(this, { childList: !0 });
29
98
  }
30
99
  disconnectedCallback() {
31
- super.disconnectedCallback(), this.removeEventListener("nys-change", this._handleRadioButtonChange), this.removeEventListener("invalid", this._handleInvalid), this.removeEventListener("nys-error", this._handleChildError), this.removeEventListener("nys-error-clear", this._handleChildErrorClear), this.removeEventListener("nys-other-input", this._handleOtherInput);
100
+ super.disconnectedCallback(), this.removeEventListener("invalid", this._handleInvalid), this._mobileQuery.removeEventListener("change", this._handleMobileQuery), this._childObserver?.disconnect();
32
101
  }
33
102
  async firstUpdated() {
34
- await this.updateComplete, this._initializeCheckedRadioValue(), this._setValue(), this._setRadioButtonRequire(), this._updateRadioButtonsSize(), this._updateRadioButtonsTile(), this._updateRadioButtonsShowError(), this._getSlotDescriptionForAria(), this._initializeChildAttributes(), this._updateGroupTabIndex();
103
+ await this.updateComplete, this._radios = this._getAllRadios(), this._initializeCheckedRadioValue(), this._setValue(), this._setRadioButtonRequire(), this._updateRadioButtonsSize(), this._getSlotDescriptionForAria(), this._initializeChildAttributes(), this._updateGroupTabIndex();
35
104
  }
36
105
  updated(t) {
37
- (t.has("required") || t.has("selectedValue")) && (this.showError || this._manageRequire()), t.has("size") && this._updateRadioButtonsSize(), t.has("tile") && this._updateRadioButtonsTile(), t.has("showError") && this._updateRadioButtonsShowError(), t.has("form") && this._updateRadioButtonsForm();
106
+ (t.has("required") || t.has("selectedValue")) && (this.showError || this._manageRequire()), t.has("size") && this._updateRadioButtonsSize(), this._updateGroupTabIndex();
38
107
  }
39
108
  /**
40
109
  * Form Integration
@@ -43,25 +112,28 @@ const p = class p extends v {
43
112
  _setValue() {
44
113
  this._internals.setFormValue(this.selectedValue);
45
114
  }
46
- // Updates the "require" attribute of the first radiobutton underneath a radiogroup.
47
- // This will make sure there's a requirement for all radiobutton under the same name/group
48
115
  _setRadioButtonRequire() {
49
- this.querySelectorAll("nys-radiobutton").forEach((e, o) => {
50
- this.required && o === 0 && e.setAttribute("required", "required");
116
+ this.querySelectorAll("nys-radiobutton").forEach((o, e) => {
117
+ this.required && e === 0 && o.setAttribute("required", "required");
51
118
  });
52
119
  }
53
120
  async _manageRequire() {
54
- const t = this.errorMessage || "Please select an option.", o = Array.from(this.querySelectorAll("nys-radiobutton"))[0];
55
- o && (this.required && !this.selectedValue ? this._internals.setValidity(
56
- { valueMissing: !0 },
57
- t,
58
- o
59
- // pass the custom element, not shadow input
60
- ) : (this.showError = !1, this._internals.setValidity({}, "", o)));
121
+ const t = this.errorMessage || "Please select an option.", e = Array.from(this.querySelectorAll("nys-radiobutton"))[0];
122
+ if (e) {
123
+ const r = this.shadowRoot?.querySelector(
124
+ `#input-${e.id}`
125
+ );
126
+ this.required && !this.selectedValue ? this._internals.setValidity(
127
+ { valueMissing: !0 },
128
+ t,
129
+ r ?? e
130
+ // pass the custom element, not shadow input
131
+ ) : (this.showError = !1, this._internals.setValidity({}, "", e));
132
+ }
61
133
  }
62
134
  checkValidity() {
63
135
  const t = Array.from(this.querySelectorAll("nys-radiobutton"));
64
- return !this.required || t.some((o) => o.checked);
136
+ return !this.required || t.some((e) => e.checked);
65
137
  }
66
138
  // Need to account for if radiogroup already have a radiobutton checked at initialization
67
139
  _initializeCheckedRadioValue() {
@@ -86,433 +158,296 @@ const p = class p extends v {
86
158
  ].includes(t.key) || (t.key === "ArrowLeft" || t.key === "ArrowRight") && t.composedPath().some((x) => x.tagName === "NYS-TEXTINPUT"))
87
159
  return;
88
160
  t.preventDefault();
89
- const o = this._getAllRadios().filter((c) => !c.disabled), s = o.find((c) => c === t.target), n = o.find((c) => c.matches(":focus")), h = s || n || o.find((c) => c.checked) || o[0];
90
- let _ = 0;
91
- ["ArrowUp", "ArrowLeft"].includes(t.key) ? _ = -1 : ["ArrowDown", "ArrowRight"].includes(t.key) && (_ = 1);
92
- let y = o.indexOf(h) + _;
93
- y < 0 && (y = o.length - 1), y >= o.length && (y = 0);
94
- const k = o[y];
95
- (await k.getInputElement())?.click(), await this.updateComplete, this._updateGroupTabIndex(), k.focus();
161
+ const e = this._getAllRadios().filter((c) => !c.disabled), r = t.target, s = e.find(
162
+ (c) => this.shadowRoot?.querySelector(`#input-${c.id}`) === r
163
+ ) || e.find((c) => c.checked) || e[0];
164
+ let u = 0;
165
+ ["ArrowUp", "ArrowLeft"].includes(t.key) ? u = -1 : ["ArrowDown", "ArrowRight"].includes(t.key) && (u = 1);
166
+ let h = e.indexOf(s) + u;
167
+ h < 0 && (h = e.length - 1), h >= e.length && (h = 0);
168
+ const f = e[h];
169
+ this._selectRadio(f), await this.updateComplete, this._updateGroupTabIndex(), this.shadowRoot?.querySelector(`#input-${f.id}`)?.focus();
96
170
  }
97
171
  _updateGroupTabIndex() {
98
- const t = this._getAllRadios(), e = t.find((o) => o.checked && !o.disabled) || t.find((o) => !o.disabled);
99
- t.forEach((o) => {
100
- o.tabIndex = o === e && !o.disabled ? 0 : -1;
172
+ const t = this._getAllRadios(), o = t.find((e) => e.checked && !e.disabled) || t.find((e) => !e.disabled);
173
+ t.forEach((e) => {
174
+ const r = this.shadowRoot?.querySelector(
175
+ `#input-${e.id}`
176
+ );
177
+ r && (r.tabIndex = e === o ? 0 : -1);
101
178
  });
102
179
  }
103
180
  // This callback is automatically called when the parent form is reset.
104
181
  formResetCallback() {
105
- this.querySelectorAll("nys-radiobutton").forEach((e) => {
106
- e.formResetUpdate();
107
- }), this.selectedValue = null, this._internals.setFormValue(null), this.showError = !1, this.errorMessage = "", this._internals.setValidity({}), this.requestUpdate();
182
+ this.querySelectorAll("nys-radiobutton").forEach((o) => {
183
+ o.checked = !1;
184
+ }), this.selectedValue = null, this._internals.setFormValue(null), this.showError = !1, this.errorMessage = "", this._internals.setValidity({}), this._hasUserInteracted = !1, this.requestUpdate();
185
+ }
186
+ _handleSlotChange() {
187
+ this._radios = Array.from(this.querySelectorAll("nys-radiobutton")), this.requestUpdate();
108
188
  }
109
- /**
110
- * Functions
111
- * --------------------------------------------------------------------------
112
- */
113
189
  // Apply ARIA & initial tabindex to each child radio
114
190
  _initializeChildAttributes() {
115
- this._getAllRadios().forEach((e) => {
116
- e.setAttribute("tabindex", "-1");
191
+ this._getAllRadios().forEach((o) => {
192
+ o.getAttribute("tabindex") !== "-1" && o.setAttribute("tabindex", "-1");
117
193
  });
118
194
  }
119
- // Updates the size of each radiobutton underneath a radiogroup to ensure size standardization
120
195
  _updateRadioButtonsSize() {
121
- this.querySelectorAll("nys-radiobutton").forEach((e) => {
122
- e.setAttribute("size", this.size);
196
+ this.querySelectorAll("nys-radiobutton").forEach((o) => {
197
+ o.getAttribute("size") !== this.size && o.setAttribute("size", this.size);
123
198
  });
124
199
  }
125
- _updateRadioButtonsTile() {
126
- this.querySelectorAll("nys-radiobutton").forEach((e) => {
127
- this.tile ? e.toggleAttribute("tile", !0) : e.removeAttribute("tile");
128
- });
129
- }
130
- _updateRadioButtonsShowError() {
131
- this.querySelectorAll("nys-radiobutton").forEach((e) => {
132
- this.showError ? e.setAttribute("showError", "") : e.removeAttribute("showError");
133
- });
134
- }
135
- _updateRadioButtonsForm() {
136
- this.querySelectorAll("nys-radiobutton").forEach((e) => {
137
- this.showError && this.form !== null ? e.setAttribute("form", this.form) : e.removeAttribute("form");
138
- });
200
+ _selectRadio(t) {
201
+ if (t.checked || t.disabled) return;
202
+ this._getAllRadios().forEach((e) => {
203
+ e.checked = !1;
204
+ }), t.checked = !0, this._showOtherError = !1, this._hasUserInteracted = !1, this.name = t.name, this.selectedValue = t.value, this._internals.setFormValue(this.selectedValue), this._internals.setValidity({}), this.showError = !1, this._updateGroupTabIndex(), this.requestUpdate(), this.dispatchEvent(
205
+ new CustomEvent("nys-change", {
206
+ detail: {
207
+ id: t.id,
208
+ checked: t.checked,
209
+ name: t.name,
210
+ value: t.value
211
+ },
212
+ bubbles: !0,
213
+ composed: !0
214
+ })
215
+ );
139
216
  }
140
217
  // Get the slotted text contents so native VO can attempt to announce it within the legend in the fieldset
141
218
  _getSlotDescriptionForAria() {
142
- const e = this.shadowRoot?.querySelector(
219
+ const o = this.shadowRoot?.querySelector(
143
220
  'slot[name="description"]'
144
221
  )?.assignedNodes({ flatten: !0 }) || [];
145
- this._slottedDescriptionText = e.map((o) => o.textContent?.trim()).filter(Boolean).join(", ");
222
+ this._slottedDescriptionText = o.map((e) => e.textContent?.trim()).filter(Boolean).join(", ");
146
223
  }
147
224
  /**
148
225
  * Event Handlers
149
226
  * --------------------------------------------------------------------------
150
227
  */
151
- // Keeps radiogroup informed of the name and value of its current selected radiobutton at each change
152
- _handleRadioButtonChange(t) {
153
- const { name: e, value: o } = t.detail;
154
- this.name = e, this.selectedValue = o, this._internals.setFormValue(this.selectedValue), this._internals.setValidity({}), this.showError = !1, this._updateGroupTabIndex();
155
- }
156
228
  async _handleInvalid(t) {
157
- if (t.preventDefault(), this._internals.validity.customError) {
158
- const s = this._getAllRadios().find((n) => n.other && n.checked);
229
+ t.preventDefault();
230
+ const e = this._getAllRadios().find((s) => s.other && s.checked);
231
+ if (e && e.value.trim() === "") {
232
+ this.showError = !0, this._hasUserInteracted = !0, this._validateOtherAndEmitError(e), await this.updateComplete;
233
+ const s = this.shadowRoot?.querySelector("nys-textinput");
159
234
  if (s) {
160
- const n = s.shadowRoot?.querySelector("nys-textinput");
161
- if (s.classList.remove("focused"), n) {
162
- await n.updateComplete, n.focus();
163
- return;
164
- }
235
+ await s.updateComplete, s.focus();
236
+ return;
165
237
  }
166
238
  }
167
239
  this.showError = !0, await this._manageRequire();
168
- const e = this.querySelector("nys-radiobutton");
169
- if (e) {
170
- const o = this._internals.form;
171
- o ? Array.from(o.elements).find(
172
- (h) => typeof h.checkValidity == "function" && !h.checkValidity()
173
- ) === this && e.focus() : e.focus();
174
- }
175
- }
176
- _handleChildError(t) {
177
- t.stopPropagation();
178
- const { message: e, sourceRadio: o } = t.detail;
179
- o && (this.showError = !0, this._internals.setValidity(
180
- { customError: !0 },
181
- e || "Please complete this field.",
182
- o
183
- ));
184
- }
185
- _handleChildErrorClear() {
186
- this._internals.setValidity({}), this.showError = !1;
187
- }
188
- _handleOtherInput(t) {
189
- const { value: e } = t.detail;
190
- this.selectedValue = e, this._internals.setFormValue(e);
191
- }
192
- render() {
193
- return f`<fieldset
194
- aria-label="${this.label}${this._slottedDescriptionText ? ` ${this._slottedDescriptionText}` : this.description ? ` ${this.description}` : ""}"
195
- role="radiogroup"
196
- class="nys-radiogroup"
197
- >
198
- <legend>
199
- <nys-label
200
- label=${this.label}
201
- description=${this.description}
202
- flag=${this.required ? "required" : this.optional ? "optional" : ""}
203
- tooltip=${this.tooltip}
204
- >
205
- <slot name="description" slot="description">${this.description}</slot>
206
- </nys-label>
207
- </legend>
208
- <div class="nys-radiogroup__content" @keydown=${this._handleKeyDown}>
209
- <slot></slot>
210
- </div>
211
- <nys-errormessage
212
- ?showError=${this.showError}
213
- errorMessage=${this._internals.validationMessage || this.errorMessage}
214
- .showDivider=${!this.tile}
215
- ></nys-errormessage>
216
- </fieldset>`;
217
- }
218
- };
219
- p.styles = w(E), p.shadowRootOptions = {
220
- ...v.shadowRootOptions,
221
- delegatesFocus: !0
222
- }, p.formAssociated = !0;
223
- let a = p;
224
- l([
225
- r({ type: String, reflect: !0 })
226
- ], a.prototype, "id");
227
- l([
228
- r({ type: String, reflect: !0 })
229
- ], a.prototype, "name");
230
- l([
231
- r({ type: Boolean, reflect: !0 })
232
- ], a.prototype, "required");
233
- l([
234
- r({ type: Boolean, reflect: !0 })
235
- ], a.prototype, "optional");
236
- l([
237
- r({ type: Boolean, reflect: !0 })
238
- ], a.prototype, "showError");
239
- l([
240
- r({ type: String })
241
- ], a.prototype, "errorMessage");
242
- l([
243
- r({ type: String })
244
- ], a.prototype, "label");
245
- l([
246
- r({ type: String })
247
- ], a.prototype, "description");
248
- l([
249
- r({ type: Boolean, reflect: !0 })
250
- ], a.prototype, "tile");
251
- l([
252
- r({ type: String })
253
- ], a.prototype, "tooltip");
254
- l([
255
- r({ type: String, reflect: !0 })
256
- ], a.prototype, "form");
257
- l([
258
- r({ type: String, reflect: !0 })
259
- ], a.prototype, "size");
260
- l([
261
- g()
262
- ], a.prototype, "selectedValue");
263
- l([
264
- g()
265
- ], a.prototype, "_slottedDescriptionText");
266
- customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", a);
267
- var C = Object.defineProperty, u = (b, t, e, o) => {
268
- for (var s = void 0, n = b.length - 1, h; n >= 0; n--)
269
- (h = b[n]) && (s = h(t, e, s) || s);
270
- return s && C(t, e, s), s;
271
- };
272
- let $ = 0;
273
- var i;
274
- const d = (i = class extends v {
275
- constructor() {
276
- super(...arguments), this.checked = !1, this.disabled = !1, this.required = !1, this.label = "", this.description = "", this.id = "", this.name = "", this.value = "", this.form = null, this.size = "md", this.tile = !1, this.other = !1, this.showOtherError = !1, this.isMobile = window.innerWidth < 480, this._hasUserInteracted = !1, this._handleResize = () => {
277
- this.isMobile = window.innerWidth < 480;
278
- };
279
- }
280
- /**
281
- * Lifecycle methods
282
- * --------------------------------------------------------------------------
283
- */
284
- connectedCallback() {
285
- super.connectedCallback(), this.id || (this.id = `nys-radiobutton-${Date.now()}-${$++}`), this.checked && (i.buttonGroup[this.name] && (i.buttonGroup[this.name].checked = !1, i.buttonGroup[this.name].requestUpdate()), i.buttonGroup[this.name] = this), this.addEventListener("focus", this._handleFocus), this.addEventListener("blur", this._handleBlur), this.addEventListener("click", this._handleChange), window.addEventListener("resize", this._handleResize);
286
- }
287
- disconnectedCallback() {
288
- super.disconnectedCallback(), this.removeEventListener("focus", this._handleFocus), this.removeEventListener("blur", this._handleBlur), window.removeEventListener("resize", this._handleResize);
289
- }
290
- updated(t) {
291
- t.has("checked") && (t.get("checked") && !this.checked && this._clearOtherState(), this.checked && i.buttonGroup[this.name] !== this && (i.buttonGroup[this.name] && (i.buttonGroup[this.name].checked = !1, i.buttonGroup[this.name].requestUpdate()), i.buttonGroup[this.name] = this));
292
- }
293
- /**
294
- * Functions
295
- * --------------------------------------------------------------------------
296
- */
297
- async getInputElement() {
298
- return await this.updateComplete, this.shadowRoot?.querySelector("input") || null;
299
- }
300
- // This callback is automatically called when the parent form is reset.
301
- formResetUpdate() {
302
- this.checked = !1, this._clearOtherState(), i.buttonGroup[this.name] === this && delete i.buttonGroup[this.name], this.requestUpdate();
303
- }
304
- _clearOtherState() {
305
- this.other && (this.showOtherError = !1, this._hasUserInteracted = !1, this._dispatchClearErrorEvent());
306
- }
307
- _dispatchClearErrorEvent() {
308
- this.dispatchEvent(
309
- new CustomEvent("nys-error-clear", {
310
- detail: {
311
- id: this.id,
312
- name: this.name,
313
- type: "other"
314
- },
315
- bubbles: !0,
316
- composed: !0
317
- })
318
- );
319
- }
320
- /**
321
- * Event Handlers
322
- * --------------------------------------------------------------------------
323
- */
324
- _emitChangeEvent() {
325
- this.dispatchEvent(
326
- new CustomEvent("nys-change", {
327
- detail: {
328
- id: this.id,
329
- checked: this.checked,
330
- name: this.name,
331
- value: this.value
332
- },
333
- bubbles: !0,
334
- composed: !0
335
- })
240
+ const r = this._getAllRadios().find(
241
+ (s) => !s.disabled
336
242
  );
243
+ if (r) {
244
+ const s = () => {
245
+ this.shadowRoot?.querySelector(`#input-${r.id}`)?.focus();
246
+ }, u = this._internals.form;
247
+ u ? Array.from(u.elements).find(
248
+ (c) => typeof c.checkValidity == "function" && !c.checkValidity()
249
+ ) === this && s() : s();
250
+ }
337
251
  }
338
- _emitOtherInputEvent() {
339
- this.dispatchEvent(
252
+ _handleTextInput(t, o) {
253
+ const e = o.target;
254
+ t.value = e.value, this.selectedValue = e.value, this._internals.setFormValue(e.value), this._hasUserInteracted && this._validateOtherAndEmitError(t), this.dispatchEvent(
340
255
  new CustomEvent("nys-other-input", {
341
- detail: {
342
- id: this.id,
343
- name: this.name,
344
- value: this.value
345
- },
256
+ detail: { id: t.id, name: t.name, value: t.value },
346
257
  bubbles: !0,
347
258
  composed: !0
348
259
  })
349
260
  );
350
261
  }
351
- // Handle radiobutton change event & un-selection of other radio options in group
352
- async _handleChange() {
353
- this.showOtherError = !1, !this.checked && !this.disabled && (i.buttonGroup[this.name] && (i.buttonGroup[this.name].checked = !1, i.buttonGroup[this.name].requestUpdate()), i.buttonGroup[this.name] = this, this.checked = !0, this._validateOtherAndEmitError(), this._emitChangeEvent());
262
+ _handleTextInputBlur(t) {
263
+ this._hasUserInteracted = !0, this._validateOtherAndEmitError(t);
354
264
  }
355
- // Handle focus event
356
- _handleFocus() {
357
- this.dispatchEvent(
358
- new Event("nys-focus", { bubbles: !0, composed: !0 })
265
+ _validateOtherAndEmitError(t) {
266
+ if (!t.other) return;
267
+ if (!t.checked || !this._hasUserInteracted) {
268
+ this._showOtherError = !1;
269
+ return;
270
+ }
271
+ const o = t.value.trim() === "";
272
+ this._showOtherError = o;
273
+ const e = this.shadowRoot?.querySelector(
274
+ `#input-${t.id}`
359
275
  );
276
+ o ? (this._internals.setValidity(
277
+ {
278
+ customError: !0
279
+ },
280
+ "Please enter a value for this option.",
281
+ e ?? t
282
+ ), this.showError = !0) : (this._internals.setValidity({}), this.showError = !1);
360
283
  }
361
- // Handle blur event
362
- _handleBlur() {
363
- this.dispatchEvent(
364
- new Event("nys-blur", { bubbles: !0, composed: !0 })
365
- ), setTimeout(() => {
366
- this.other && this.checked && (this._hasUserInteracted = !0, this._validateOtherAndEmitError());
367
- }, 50);
284
+ _handleOtherKeydown(t) {
285
+ (t.key == "Space" || t.key === " ") && t.stopPropagation();
368
286
  }
369
- _callInputHandling() {
370
- if (this.disabled) return;
371
- const t = this.shadowRoot?.querySelector(
372
- 'input[type="radio"]'
373
- ), e = this.shadowRoot?.querySelector(
374
- ".nys-radiobutton__radio"
287
+ _handleGroupFocusout(t) {
288
+ const o = t.relatedTarget;
289
+ if (o && this.shadowRoot?.contains(o)) return;
290
+ const e = this._getAllRadios().find(
291
+ (r) => r.other && r.checked
375
292
  );
376
- t && (t.click(), e?.focus());
377
- }
378
- _handleTextInput(t) {
379
- let o = t.target.value;
380
- this.value = o, this._hasUserInteracted && this._validateOtherAndEmitError(), this._emitOtherInputEvent();
381
- }
382
- _handleTextInputBlur() {
383
- this._hasUserInteracted = !0, this._validateOtherAndEmitError();
293
+ e && e.value.trim() === "" && (this._hasUserInteracted = !0, this._validateOtherAndEmitError(e));
384
294
  }
385
- _validateOtherAndEmitError() {
386
- if (!this.other) return;
387
- if (!this.checked || !this._hasUserInteracted) {
388
- this.showOtherError = !1;
389
- return;
390
- }
391
- const t = this.value.trim() === "";
392
- this.showOtherError = t, t ? this.dispatchEvent(
393
- new CustomEvent("nys-error", {
394
- detail: {
395
- id: this.id,
396
- name: this.name,
397
- type: "other",
398
- message: "Please enter a value for this option.",
399
- sourceRadio: this
400
- },
401
- bubbles: !0,
402
- composed: !0
403
- })
404
- ) : this._dispatchClearErrorEvent();
295
+ _handleRadiobtnFocus(t) {
296
+ t.dispatchEvent(
297
+ new CustomEvent("nys-focus", { bubbles: !0, composed: !0 })
298
+ );
405
299
  }
406
- _handleOtherKeydown(t) {
407
- (t.key == "Space" || t.key === " ") && t.stopPropagation();
300
+ _handleRadiobtnBlur(t) {
301
+ t.dispatchEvent(
302
+ new CustomEvent("nys-blur", { bubbles: !0, composed: !0 })
303
+ );
408
304
  }
409
305
  render() {
410
- return f`
411
- <input
412
- type="radio"
413
- name="${m(this.name ? this.name : void 0)}"
414
- .checked=${this.checked}
415
- ?disabled=${this.disabled}
416
- .value=${this.value}
417
- ?required="${this.required}"
418
- form=${m(this.form || void 0)}
419
- @change="${this._handleChange}"
420
- aria-hidden="true"
421
- hidden
422
- class="sr-only"
423
- />
424
- <div class="nys-radiobutton" @click="${this._callInputHandling}">
425
- <div class="nys-radiobutton__main-container">
426
- <span
427
- role="radio"
428
- class="nys-radiobutton__radio"
429
- tabindex="0"
430
- aria-labelledby="${this.id}-label"
431
- aria-checked="${this.checked}"
432
- aria-required="${this.required}"
433
- aria-disabled="${this.disabled}"
434
- title="${this.label}"
435
- ></span>
436
- ${(this.label || this.other) && f`<nys-label
437
- aria-hidden="true"
438
- id="${this.id}-label"
439
- label="${this.label || (this.other ? "Other" : "")}"
440
- description=${m(this.description || void 0)}
306
+ return b` <slot
307
+ style="display:none"
308
+ @slotchange=${this._handleSlotChange}
309
+ ></slot>
310
+ <fieldset
311
+ aria-label="${this.label}${this._slottedDescriptionText ? ` ${this._slottedDescriptionText}` : this.description ? ` ${this.description}` : ""}"
312
+ role="radiogroup"
313
+ aria-required=${this.required ? "true" : "false"}
314
+ class="nys-radiogroup"
315
+ @focusout=${this._handleGroupFocusout}
316
+ >
317
+ <legend>
318
+ <nys-label
319
+ label=${this.label}
320
+ description=${this.description}
321
+ flag=${this.required ? "required" : this.optional ? "optional" : ""}
322
+ tooltip=${this.tooltip}
441
323
  >
442
324
  <slot name="description" slot="description"
443
325
  >${this.description}</slot
444
326
  >
445
- </nys-label> `}
446
- </div>
447
- <div class="nys-radiobutton__other-container">
448
- ${this.other && this.checked ? f`
449
- <nys-textinput
450
- .value=${this.value}
451
- id=${"radiobutton-other-" + this.id}
452
- @nys-input=${this._handleTextInput}
453
- @nys-blur=${this._handleTextInputBlur}
454
- @keydown=${this._handleOtherKeydown}
455
- @nys-focus=${() => this.classList.remove("focused")}
456
- ariaLabel="Other"
457
- aria-invalid=${this.showOtherError ? "true" : "false"}
458
- width=${this.isMobile ? "full" : "md"}
459
- ?disabled=${this.disabled}
460
- ></nys-textinput>
461
- ` : ""}
327
+ </nys-label>
328
+ </legend>
329
+ <div class="nys-radiogroup__content" @keydown=${this._handleKeyDown}>
330
+ ${this._radios.map(
331
+ (t, o) => b`
332
+ <div
333
+ class="nys-radiobutton"
334
+ @click=${() => this._handleRadiobtnClick(t)}
335
+ >
336
+ <div class="nys-radiobutton__main-container">
337
+ <!-- <span class="nys-radiobutton__radio" tabindex="-1"></span> -->
338
+ <input
339
+ id="input-${t.id}"
340
+ type="radio"
341
+ class="nys-radiobutton__radio"
342
+ name="${v(t.name || void 0)}"
343
+ .checked=${t.checked}
344
+ ?disabled=${t.disabled}
345
+ .value=${t.value}
346
+ ?required=${this.required && o === 0}
347
+ form=${v(t.form || void 0)}
348
+ aria-label="${t.label || (t.other ? "Other" : "")}"
349
+ @change=${() => this._selectRadio(t)}
350
+ @focus=${() => this._handleRadiobtnFocus(t)}
351
+ @blur=${() => this._handleRadiobtnBlur(t)}
352
+ />
353
+ ${(t.label || t.other) && b`<nys-label
354
+ aria-hidden="true"
355
+ id="${t.id}-label"
356
+ label="${t.label || (t.other ? "Other" : "")}"
357
+ description=${v(t.description || void 0)}
358
+ >
359
+ <slot name="description" slot="description"
360
+ >${t.description}</slot
361
+ >
362
+ </nys-label> `}
363
+ </div>
364
+ <div class="nys-radiobutton__other-container">
365
+ ${t.other && t.checked ? b`
366
+ <nys-textinput
367
+ .value=${t.value}
368
+ id=${"radiobutton-other-" + t.id}
369
+ @nys-input=${(e) => this._handleTextInput(t, e)}
370
+ @nys-blur=${() => this._handleTextInputBlur(t)}
371
+ @keydown=${this._handleOtherKeydown}
372
+ @nys-focus=${() => t.classList.remove("focused")}
373
+ ariaLabel="Other"
374
+ aria-invalid=${t.showOtherError ? "true" : "false"}
375
+ width=${this.isMobile ? "full" : "md"}
376
+ ?disabled=${t.disabled}
377
+ ></nys-textinput>
378
+ ` : ""}
379
+ </div>
380
+ </div>
381
+ `
382
+ )}
462
383
  </div>
463
- </div>
464
- `;
384
+ <nys-errormessage
385
+ ?showError=${this.showError}
386
+ errorMessage=${this._internals.validationMessage || this.errorMessage}
387
+ .showDivider=${!this.tile}
388
+ ></nys-errormessage>
389
+ </fieldset>`;
465
390
  }
466
- }, i.styles = w(E), i.shadowRootOptions = {
467
- ...v.shadowRootOptions,
391
+ };
392
+ p.styles = k(w), p.shadowRootOptions = {
393
+ ...g.shadowRootOptions,
468
394
  delegatesFocus: !0
469
- }, i.buttonGroup = {}, i);
470
- u([
471
- r({ type: Boolean, reflect: !0 })
472
- ], d.prototype, "checked");
473
- u([
474
- r({ type: Boolean, reflect: !0 })
475
- ], d.prototype, "disabled");
476
- u([
477
- r({ type: Boolean, reflect: !0 })
478
- ], d.prototype, "required");
479
- u([
480
- r({ type: String })
481
- ], d.prototype, "label");
482
- u([
483
- r({ type: String })
484
- ], d.prototype, "description");
485
- u([
486
- r({ type: String, reflect: !0 })
487
- ], d.prototype, "id");
488
- u([
489
- r({ type: String, reflect: !0 })
490
- ], d.prototype, "name");
491
- u([
492
- r({ type: String })
493
- ], d.prototype, "value");
494
- u([
495
- r({ type: String, reflect: !0 })
496
- ], d.prototype, "form");
497
- u([
498
- r({ type: String, reflect: !0 })
499
- ], d.prototype, "size");
500
- u([
501
- r({ type: Boolean, reflect: !0 })
502
- ], d.prototype, "tile");
503
- u([
504
- r({ type: Boolean, reflect: !0 })
505
- ], d.prototype, "other");
506
- u([
507
- r({ type: Boolean })
508
- ], d.prototype, "showOtherError");
509
- u([
510
- g()
511
- ], d.prototype, "isMobile");
512
- let B = d;
513
- customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", B);
395
+ }, p.formAssociated = !0;
396
+ let n = p;
397
+ a([
398
+ i({ type: String, reflect: !0 })
399
+ ], n.prototype, "id");
400
+ a([
401
+ i({ type: String, reflect: !0 })
402
+ ], n.prototype, "name");
403
+ a([
404
+ i({ type: Boolean, reflect: !0 })
405
+ ], n.prototype, "required");
406
+ a([
407
+ i({ type: Boolean, reflect: !0 })
408
+ ], n.prototype, "optional");
409
+ a([
410
+ i({ type: Boolean, reflect: !0 })
411
+ ], n.prototype, "showError");
412
+ a([
413
+ i({ type: String })
414
+ ], n.prototype, "errorMessage");
415
+ a([
416
+ i({ type: String })
417
+ ], n.prototype, "label");
418
+ a([
419
+ i({ type: String })
420
+ ], n.prototype, "description");
421
+ a([
422
+ i({ type: Boolean, reflect: !0 })
423
+ ], n.prototype, "tile");
424
+ a([
425
+ i({ type: String })
426
+ ], n.prototype, "tooltip");
427
+ a([
428
+ i({ type: String, reflect: !0 })
429
+ ], n.prototype, "form");
430
+ a([
431
+ i({ type: String, reflect: !0 })
432
+ ], n.prototype, "size");
433
+ a([
434
+ i({ type: Boolean })
435
+ ], n.prototype, "_showOtherError");
436
+ a([
437
+ _()
438
+ ], n.prototype, "selectedValue");
439
+ a([
440
+ _()
441
+ ], n.prototype, "_slottedDescriptionText");
442
+ a([
443
+ _()
444
+ ], n.prototype, "_radios");
445
+ a([
446
+ _()
447
+ ], n.prototype, "isMobile");
448
+ customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", n);
514
449
  export {
515
- B as NysRadiobutton,
516
- a as NysRadiogroup
450
+ d as NysRadiobutton,
451
+ n as NysRadiogroup
517
452
  };
518
453
  //# sourceMappingURL=nys-radiobutton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nys-radiobutton.js","sources":["../src/nys-radiogroup.ts","../src/nys-radiobutton.ts"],"sourcesContent":["import { LitElement, html, unsafeCSS } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport type { NysRadiobutton } from \"./nys-radiobutton\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-radiobutton.scss?inline\";\n\nlet radiogroupIdCounter = 0;\n\n/**\n * A container for grouping `nys-radiobutton` elements as a single form control with enforced single selection.\n * Handles keyboard navigation (arrow keys), validation, required constraints, and form integration.\n *\n * Use to let users select exactly one option from 2-6 choices. Apply `tile` and `size` to the group\n * and all children inherit these styles automatically. For 7+ options, use `nys-select`.\n *\n * @summary Container for grouping radio buttons as a single form control.\n * @element nys-radiogroup\n *\n * @slot - Default slot for `nys-radiobutton` elements.\n * @slot description - Custom HTML description content.\n *\n * @example Basic radio group\n * ```html\n * <nys-radiogroup label=\"Select borough\" required>\n * <nys-radiobutton name=\"borough\" value=\"bronx\" label=\"The Bronx\"></nys-radiobutton>\n * <nys-radiobutton name=\"borough\" value=\"brooklyn\" label=\"Brooklyn\"></nys-radiobutton>\n * <nys-radiobutton name=\"borough\" value=\"manhattan\" label=\"Manhattan\"></nys-radiobutton>\n * </nys-radiogroup>\n * ```\n */\n\nexport class NysRadiogroup extends LitElement {\n static styles = unsafeCSS(styles);\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** Unique identifier. Auto-generated if not provided. */\n @property({ type: String, reflect: true }) id = \"\";\n\n /** Name for form submission. Auto-populated from child radiobuttons. */\n @property({ type: String, reflect: true }) name = \"\";\n\n /** Requires a selection before form submission. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Shows \"Optional\" flag. */\n @property({ type: Boolean, reflect: true }) optional = false;\n\n /** Shows error message when true. */\n @property({ type: Boolean, reflect: true }) showError = false;\n\n /** Error message text. Shown only when `showError` is true. */\n @property({ type: String }) errorMessage = \"\";\n\n /** Visible label text for the group. */\n @property({ type: String }) label = \"\";\n\n /** Helper text below label. Use slot for custom HTML. */\n @property({ type: String }) description = \"\";\n\n /** Renders all radiobuttons as tiles with larger clickable area. */\n @property({ type: Boolean, reflect: true }) tile = false;\n\n /** Tooltip text shown on hover/focus of info icon. */\n @property({ type: String }) tooltip = \"\";\n\n /** Form `id` to associate with. Applied to all children. */\n @property({ type: String, reflect: true }) form: string | null = null;\n\n /**\n * Radio size for all children: `sm` (24px) or `md` (32px, default).\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" = \"md\";\n\n @state() private selectedValue: string | null = null;\n @state() private _slottedDescriptionText = \"\";\n\n private _internals: ElementInternals;\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 // Generate a unique ID if one is not provided\n connectedCallback() {\n super.connectedCallback();\n if (!this.id) {\n this.id = `nys-radiogroup-${Date.now()}-${radiogroupIdCounter++}`;\n }\n this.addEventListener(\"nys-change\", this._handleRadioButtonChange);\n this.addEventListener(\"invalid\", this._handleInvalid);\n this.addEventListener(\"nys-error\", this._handleChildError);\n this.addEventListener(\"nys-error-clear\", this._handleChildErrorClear);\n this.addEventListener(\"nys-other-input\", this._handleOtherInput);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"nys-change\", this._handleRadioButtonChange);\n this.removeEventListener(\"invalid\", this._handleInvalid);\n this.removeEventListener(\"nys-error\", this._handleChildError);\n this.removeEventListener(\"nys-error-clear\", this._handleChildErrorClear);\n this.removeEventListener(\"nys-other-input\", this._handleOtherInput);\n }\n\n async firstUpdated() {\n await this.updateComplete;\n this._initializeCheckedRadioValue();\n this._setValue(); // This ensures our element always participates in the form\n this._setRadioButtonRequire();\n this._updateRadioButtonsSize();\n this._updateRadioButtonsTile();\n this._updateRadioButtonsShowError();\n this._getSlotDescriptionForAria();\n\n this._initializeChildAttributes();\n this._updateGroupTabIndex();\n }\n\n updated(changedProperties: Map<string | symbol, unknown>) {\n if (\n changedProperties.has(\"required\") ||\n changedProperties.has(\"selectedValue\")\n ) {\n if (!this.showError) {\n this._manageRequire();\n }\n }\n if (changedProperties.has(\"size\")) {\n this._updateRadioButtonsSize();\n }\n if (changedProperties.has(\"tile\")) {\n this._updateRadioButtonsTile();\n }\n if (changedProperties.has(\"showError\")) {\n this._updateRadioButtonsShowError();\n }\n if (changedProperties.has(\"form\")) {\n this._updateRadioButtonsForm();\n }\n }\n\n /**\n * Form Integration\n * --------------------------------------------------------------------------\n */\n\n private _setValue() {\n this._internals.setFormValue(this.selectedValue);\n }\n\n // Updates the \"require\" attribute of the first radiobutton underneath a radiogroup.\n // This will make sure there's a requirement for all radiobutton under the same name/group\n private _setRadioButtonRequire() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton, index) => {\n if (this.required && index === 0) {\n radioButton.setAttribute(\"required\", \"required\");\n }\n });\n }\n\n private async _manageRequire() {\n const message = this.errorMessage || \"Please select an option.\";\n\n const radioButtons = Array.from(this.querySelectorAll(\"nys-radiobutton\"));\n const firstRadio = radioButtons[0] as HTMLElement;\n\n if (firstRadio) {\n if (this.required && !this.selectedValue) {\n this._internals.setValidity(\n { valueMissing: true },\n message,\n firstRadio, // pass the custom element, not shadow input\n );\n } else {\n this.showError = false;\n this._internals.setValidity({}, \"\", firstRadio);\n }\n }\n }\n\n checkValidity() {\n const radioButtons = Array.from(this.querySelectorAll(\"nys-radiobutton\"));\n const valid =\n !this.required ||\n radioButtons.some((radio) => (radio as NysRadiobutton).checked);\n return valid;\n }\n\n // Need to account for if radiogroup already have a radiobutton checked at initialization\n private _initializeCheckedRadioValue() {\n const checkedRadio = this.querySelector(\"nys-radiobutton[checked]\");\n if (checkedRadio) {\n this.selectedValue = checkedRadio.getAttribute(\"value\");\n this._internals.setFormValue(this.selectedValue);\n }\n }\n\n // Core Keyboard & Click Logic\n private _getAllRadios() {\n return Array.from(\n this.querySelectorAll(\"nys-radiobutton\"),\n ) as NysRadiobutton[];\n }\n\n // Arrow / Space / Enter navigation at group level\n private async _handleKeyDown(event: KeyboardEvent) {\n const keys = [\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \" \",\n \"Enter\",\n ];\n\n if (!keys.includes(event.key)) return;\n // Prevent arrow left/right from switching to next radiobutton when focus is within \"other\" textinput\n if (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\") {\n const inTextInput = event\n .composedPath()\n .some((el) => (el as HTMLElement).tagName === \"NYS-TEXTINPUT\");\n if (inTextInput) return;\n }\n\n event.preventDefault();\n\n const radioBtns = this._getAllRadios().filter((radio) => !radio.disabled);\n const fromEvent = radioBtns.find((radio) => radio === event.target); // event.target is the radio VO dispatched black focus outline\n const focusedRadio = radioBtns.find((radio) => radio.matches(\":focus\"));\n\n const currentRadio =\n fromEvent ||\n focusedRadio ||\n radioBtns.find((radio) => radio.checked) ||\n radioBtns[0]; // fallback is checked radio or first radio\n\n let increment = 0;\n if ([\"ArrowUp\", \"ArrowLeft\"].includes(event.key)) {\n increment = -1;\n } else if ([\"ArrowDown\", \"ArrowRight\"].includes(event.key)) {\n increment = 1;\n }\n\n let index = radioBtns.indexOf(currentRadio) + increment;\n\n // Handles the wrap around ends if user is at first or last radiobutton\n if (index < 0) {\n index = radioBtns.length - 1;\n }\n if (index >= radioBtns.length) {\n index = 0;\n }\n\n const target = radioBtns[index];\n const input = await target.getInputElement();\n input?.click();\n\n await this.updateComplete;\n this._updateGroupTabIndex();\n target.focus();\n }\n\n private _updateGroupTabIndex() {\n const radios = this._getAllRadios();\n\n // Pick active: checked first, otherwise first enabled\n const active =\n radios.find((radio) => radio.checked && !radio.disabled) ||\n radios.find((radio) => !radio.disabled);\n\n radios.forEach((radio) => {\n //radio.setAttribute(\"aria-checked\", String(radio.checked));\n\n // Only one radiobutton can be focusable at all times.\n // Due to this, we calculate logic to determine an active radiobutton and call all other as tabindex=\"-1\"\n radio.tabIndex = radio === active && !radio.disabled ? 0 : -1;\n });\n }\n\n // This callback is automatically called when the parent form is reset.\n public formResetCallback() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton) => {\n (radioButton as NysRadiobutton).formResetUpdate();\n });\n\n this.selectedValue = null;\n\n this._internals.setFormValue(null);\n\n // Reset validation UI\n this.showError = false;\n this.errorMessage = \"\";\n this._internals.setValidity({});\n\n // Re-render UI\n this.requestUpdate();\n }\n\n /**\n * Functions\n * --------------------------------------------------------------------------\n */\n\n // Apply ARIA & initial tabindex to each child radio\n private _initializeChildAttributes() {\n const radios = this._getAllRadios();\n radios.forEach((radio) => {\n // radio.setAttribute(\"role\", \"radio\");\n // radio.setAttribute(\"aria-checked\", String(radio.checked));\n // radio.setAttribute(\"aria-required\", String(radio.required));\n // radio.setAttribute(\"aria-disabled\", String(radio.disabled));\n radio.setAttribute(\"tabindex\", \"-1\");\n });\n }\n\n // Updates the size of each radiobutton underneath a radiogroup to ensure size standardization\n private _updateRadioButtonsSize() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton) => {\n radioButton.setAttribute(\"size\", this.size);\n });\n }\n\n private _updateRadioButtonsTile() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton) => {\n if (this.tile) {\n radioButton.toggleAttribute(\"tile\", true);\n } else {\n radioButton.removeAttribute(\"tile\");\n }\n });\n }\n\n private _updateRadioButtonsShowError() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton) => {\n if (this.showError) {\n radioButton.setAttribute(\"showError\", \"\");\n } else {\n radioButton.removeAttribute(\"showError\");\n }\n });\n }\n\n private _updateRadioButtonsForm() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton) => {\n if (this.showError) {\n if (this.form !== null) {\n radioButton.setAttribute(\"form\", this.form);\n } else {\n radioButton.removeAttribute(\"form\");\n }\n } else {\n radioButton.removeAttribute(\"form\");\n }\n });\n }\n\n // Get the slotted text contents so native VO can attempt to announce it within the legend in the fieldset\n private _getSlotDescriptionForAria() {\n const slot = this.shadowRoot?.querySelector(\n 'slot[name=\"description\"]',\n ) as HTMLSlotElement;\n const nodes = slot?.assignedNodes({ flatten: true }) || [];\n\n this._slottedDescriptionText = nodes\n .map((node) => node.textContent?.trim())\n .filter(Boolean)\n .join(\", \");\n }\n\n /**\n * Event Handlers\n * --------------------------------------------------------------------------\n */\n\n // Keeps radiogroup informed of the name and value of its current selected radiobutton at each change\n private _handleRadioButtonChange(event: Event) {\n const { name, value } = (event as CustomEvent).detail;\n\n this.name = name;\n this.selectedValue = value;\n this._internals.setFormValue(this.selectedValue);\n\n // selecting anything clears group required error\n this._internals.setValidity({});\n this.showError = false;\n\n // Accounts for tabindex & ARIA on every click/space select\n this._updateGroupTabIndex();\n }\n\n private async _handleInvalid(event: Event) {\n event.preventDefault();\n\n // Focus \"other\" text input when customError is set\n if (this._internals.validity.customError) {\n const radios = this._getAllRadios();\n const otherRadio = radios.find((radio) => radio.other && radio.checked);\n\n if (otherRadio) {\n const textInput = otherRadio.shadowRoot?.querySelector(\"nys-textinput\");\n otherRadio.classList.remove(\"focused\");\n\n if (textInput) {\n await (textInput as any).updateComplete;\n (textInput as HTMLElement).focus();\n return;\n }\n }\n }\n\n // Check if the radio group is invalid and set `showError` accordingly\n this.showError = true;\n await this._manageRequire(); // Refresh validation message\n\n const firstRadio = this.querySelector(\"nys-radiobutton\") as NysRadiobutton;\n if (firstRadio) {\n // Focus only if this is the first invalid element (top-down approach)\n const form = this._internals.form;\n if (form) {\n const elements = Array.from(form.elements) as Array<\n HTMLElement & { checkValidity?: () => boolean }\n >;\n\n // Find the first element in the form that is invalid\n const firstInvalidElement = elements.find(\n (element) =>\n typeof element.checkValidity === \"function\" &&\n !element.checkValidity(),\n );\n if (firstInvalidElement === this) {\n firstRadio.focus();\n }\n } else {\n // If not part of a form, simply focus.\n firstRadio.focus();\n }\n }\n }\n\n private _handleChildError(event: Event) {\n event.stopPropagation();\n\n const { message, sourceRadio } = (event as CustomEvent).detail;\n if (!sourceRadio) return;\n\n this.showError = true;\n\n this._internals.setValidity(\n { customError: true },\n message || \"Please complete this field.\",\n sourceRadio as HTMLElement,\n );\n }\n\n private _handleChildErrorClear() {\n this._internals.setValidity({});\n this.showError = false;\n }\n\n private _handleOtherInput(event: Event) {\n const { value } = (event as CustomEvent).detail;\n this.selectedValue = value;\n this._internals.setFormValue(value);\n }\n\n render() {\n return html`<fieldset\n aria-label=\"${this.label}${this._slottedDescriptionText\n ? ` ${this._slottedDescriptionText}`\n : this.description\n ? ` ${this.description}`\n : \"\"}\"\n role=\"radiogroup\"\n class=\"nys-radiogroup\"\n >\n <legend>\n <nys-label\n label=${this.label}\n description=${this.description}\n flag=${this.required ? \"required\" : this.optional ? \"optional\" : \"\"}\n tooltip=${this.tooltip}\n >\n <slot name=\"description\" slot=\"description\">${this.description}</slot>\n </nys-label>\n </legend>\n <div class=\"nys-radiogroup__content\" @keydown=${this._handleKeyDown}>\n <slot></slot>\n </div>\n <nys-errormessage\n ?showError=${this.showError}\n errorMessage=${this._internals.validationMessage || this.errorMessage}\n .showDivider=${!this.tile}\n ></nys-errormessage>\n </fieldset>`;\n }\n}\n\nif (!customElements.get(\"nys-radiogroup\")) {\n customElements.define(\"nys-radiogroup\", NysRadiogroup);\n}\n","import { LitElement, html, unsafeCSS } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport \"./nys-radiogroup\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-radiobutton.scss?inline\";\n\nlet radiobuttonIdCounter = 0;\n\n/**\n * A radio button for single selection within a `nys-radiogroup`. Only one radio with the same `name` can be selected.\n *\n * Use within `nys-radiogroup` for 2-6 mutually exclusive options. For 7+ options, use `nys-select`.\n * For multiple selections, use `nys-checkbox`.\n *\n * @summary Radio button for single selection from mutually exclusive options.\n * @element nys-radiobutton\n *\n * @slot description - Custom HTML description content.\n *\n * @fires nys-change - Fired when selection changes. Detail: `{id, checked, name, value}`.\n * @fires nys-focus - Fired when radio gains focus.\n * @fires nys-blur - Fired when radio loses focus.\n * @fires nys-other-input - Fired when \"other\" text input value changes. Detail: `{id, name, value}`.\n *\n * @example Radio group\n * ```html\n * <nys-radiogroup label=\"Select borough\" required>\n * <nys-radiobutton name=\"borough\" value=\"bronx\" label=\"The Bronx\"></nys-radiobutton>\n * <nys-radiobutton name=\"borough\" value=\"brooklyn\" label=\"Brooklyn\"></nys-radiobutton>\n * </nys-radiogroup>\n * ```\n */\n\nexport class NysRadiobutton extends LitElement {\n static styles = unsafeCSS(styles);\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** Whether this radio is selected. Only one per group can be checked. */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** Prevents interaction. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Marks group as required. Set on radiogroup, not individual radios. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Visible label text. Required for accessibility. */\n @property({ type: String }) label = \"\";\n\n /** Helper text below label. Use slot for custom HTML. */\n @property({ type: String }) description = \"\";\n\n /** Unique identifier. Auto-generated if not provided. */\n @property({ type: String, reflect: true }) id = \"\";\n\n /** Group name. Radios with same name are mutually exclusive. */\n @property({ type: String, reflect: true }) name = \"\";\n\n /** Value submitted when this radio is selected. */\n @property({ type: String }) value = \"\";\n\n /** Form `id` to associate with. */\n @property({ type: String, reflect: true }) form: string | null = null;\n\n /**\n * Radio size: `sm` (24px) or `md` (32px, default).\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" = \"md\";\n\n /** Renders as tile with larger clickable area. */\n @property({ type: Boolean, reflect: true }) tile = false;\n @property({ type: Boolean, reflect: true }) other = false;\n @property({ type: Boolean }) showOtherError = false;\n\n @state() private isMobile = window.innerWidth < 480;\n\n private _hasUserInteracted = false; // need this flag for \"eager mode\"\n\n static buttonGroup: Record<string, NysRadiobutton> = {};\n\n /**\n * Lifecycle methods\n * --------------------------------------------------------------------------\n */\n connectedCallback() {\n super.connectedCallback();\n if (!this.id) {\n this.id = `nys-radiobutton-${Date.now()}-${radiobuttonIdCounter++}`;\n }\n\n // If this button is initially checked, set it as the current button in its group\n if (this.checked) {\n if (NysRadiobutton.buttonGroup[this.name]) {\n NysRadiobutton.buttonGroup[this.name].checked = false;\n NysRadiobutton.buttonGroup[this.name].requestUpdate();\n }\n NysRadiobutton.buttonGroup[this.name] = this;\n }\n\n this.addEventListener(\"focus\", this._handleFocus);\n this.addEventListener(\"blur\", this._handleBlur);\n this.addEventListener(\"click\", this._handleChange);\n window.addEventListener(\"resize\", this._handleResize);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"focus\", this._handleFocus);\n this.removeEventListener(\"blur\", this._handleBlur);\n window.removeEventListener(\"resize\", this._handleResize);\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n // When \"checked\" changes, update the internals.\n if (changedProperties.has(\"checked\")) {\n const wasChecked = changedProperties.get(\"checked\") as\n | boolean\n | undefined;\n\n // If this radio was unchecked, clear \"other\" error state\n if (wasChecked && !this.checked) {\n this._clearOtherState();\n }\n\n // Ensure only one radiobutton per group is checked.\n if (this.checked && NysRadiobutton.buttonGroup[this.name] !== this) {\n if (NysRadiobutton.buttonGroup[this.name]) {\n NysRadiobutton.buttonGroup[this.name].checked = false;\n NysRadiobutton.buttonGroup[this.name].requestUpdate();\n }\n NysRadiobutton.buttonGroup[this.name] = this;\n }\n }\n }\n\n /**\n * Functions\n * --------------------------------------------------------------------------\n */\n\n public async getInputElement(): Promise<HTMLInputElement | null> {\n await this.updateComplete; // Wait for the component to finish rendering\n return this.shadowRoot?.querySelector(\"input\") || null;\n }\n\n // This callback is automatically called when the parent form is reset.\n public formResetUpdate() {\n this.checked = false;\n this._clearOtherState();\n\n if (NysRadiobutton.buttonGroup[this.name] === this) {\n delete NysRadiobutton.buttonGroup[this.name];\n }\n\n // Re-render UI\n this.requestUpdate();\n }\n\n private _handleResize = () => {\n this.isMobile = window.innerWidth < 480;\n };\n\n private _clearOtherState() {\n if (!this.other) return;\n\n this.showOtherError = false;\n this._hasUserInteracted = false;\n\n // Optional: clear error at the group level\n this._dispatchClearErrorEvent();\n }\n\n private _dispatchClearErrorEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-error-clear\", {\n detail: {\n id: this.id,\n name: this.name,\n type: \"other\",\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n /**\n * Event Handlers\n * --------------------------------------------------------------------------\n */\n\n private _emitChangeEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-change\", {\n detail: {\n id: this.id,\n checked: this.checked,\n name: this.name,\n value: this.value,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _emitOtherInputEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-other-input\", {\n detail: {\n id: this.id,\n name: this.name,\n value: this.value,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n // Handle radiobutton change event & un-selection of other radio options in group\n private async _handleChange() {\n this.showOtherError = false;\n\n if (!this.checked && !this.disabled) {\n if (NysRadiobutton.buttonGroup[this.name]) {\n NysRadiobutton.buttonGroup[this.name].checked = false;\n NysRadiobutton.buttonGroup[this.name].requestUpdate();\n }\n NysRadiobutton.buttonGroup[this.name] = this;\n\n this.checked = true;\n this._validateOtherAndEmitError();\n this._emitChangeEvent();\n }\n }\n\n // Handle focus event\n private _handleFocus() {\n this.dispatchEvent(\n new Event(\"nys-focus\", { bubbles: true, composed: true }),\n );\n }\n\n // Handle blur event\n private _handleBlur() {\n this.dispatchEvent(\n new Event(\"nys-blur\", { bubbles: true, composed: true }),\n );\n\n setTimeout(() => {\n // Only validate if we're blurring away from the component entirely\n // and this is an \"other\" radio that's checked\n if (this.other && this.checked) {\n this._hasUserInteracted = true;\n this._validateOtherAndEmitError();\n }\n }, 50);\n }\n\n private _callInputHandling() {\n if (this.disabled) return;\n\n // Find the hidden input and trigger a click to toggle selection\n const input = this.shadowRoot?.querySelector(\n 'input[type=\"radio\"]',\n ) as HTMLInputElement;\n const span = this.shadowRoot?.querySelector(\n \".nys-radiobutton__radio\",\n ) as HTMLElement;\n\n if (input) {\n input.click();\n span?.focus();\n }\n }\n\n private _handleTextInput(event: Event) {\n const input = event.target as HTMLInputElement;\n let newValue = input.value;\n this.value = newValue;\n\n if (this._hasUserInteracted) {\n this._validateOtherAndEmitError();\n }\n\n this._emitOtherInputEvent();\n }\n\n private _handleTextInputBlur() {\n this._hasUserInteracted = true;\n this._validateOtherAndEmitError();\n }\n\n private _validateOtherAndEmitError() {\n if (!this.other) return;\n\n if (!this.checked || !this._hasUserInteracted) {\n this.showOtherError = false;\n return;\n }\n\n const isInvalid = this.value.trim() === \"\";\n this.showOtherError = isInvalid;\n\n if (isInvalid) {\n this.dispatchEvent(\n new CustomEvent(\"nys-error\", {\n detail: {\n id: this.id,\n name: this.name,\n type: \"other\",\n message: \"Please enter a value for this option.\",\n sourceRadio: this,\n },\n bubbles: true,\n composed: true,\n }),\n );\n } else {\n this._dispatchClearErrorEvent();\n }\n }\n\n private _handleOtherKeydown(e: KeyboardEvent) {\n if (e.key == \"Space\" || e.key === \" \") {\n e.stopPropagation();\n }\n }\n\n render() {\n return html`\n <input\n type=\"radio\"\n name=\"${ifDefined(this.name ? this.name : undefined)}\"\n .checked=${this.checked}\n ?disabled=${this.disabled}\n .value=${this.value}\n ?required=\"${this.required}\"\n form=${ifDefined(this.form || undefined)}\n @change=\"${this._handleChange}\"\n aria-hidden=\"true\"\n hidden\n class=\"sr-only\"\n />\n <div class=\"nys-radiobutton\" @click=\"${this._callInputHandling}\">\n <div class=\"nys-radiobutton__main-container\">\n <span\n role=\"radio\"\n class=\"nys-radiobutton__radio\"\n tabindex=\"0\"\n aria-labelledby=\"${this.id}-label\"\n aria-checked=\"${this.checked}\"\n aria-required=\"${this.required}\"\n aria-disabled=\"${this.disabled}\"\n title=\"${this.label}\"\n ></span>\n ${(this.label || this.other) &&\n html`<nys-label\n aria-hidden=\"true\"\n id=\"${this.id}-label\"\n label=\"${this.label || (this.other ? \"Other\" : \"\")}\"\n description=${ifDefined(this.description || undefined)}\n >\n <slot name=\"description\" slot=\"description\"\n >${this.description}</slot\n >\n </nys-label> `}\n </div>\n <div class=\"nys-radiobutton__other-container\">\n ${this.other && this.checked\n ? html`\n <nys-textinput\n .value=${this.value}\n id=${\"radiobutton-other-\" + this.id}\n @nys-input=${this._handleTextInput}\n @nys-blur=${this._handleTextInputBlur}\n @keydown=${this._handleOtherKeydown}\n @nys-focus=${() => this.classList.remove(\"focused\")}\n ariaLabel=\"Other\"\n aria-invalid=${this.showOtherError ? \"true\" : \"false\"}\n width=${this.isMobile ? \"full\" : \"md\"}\n ?disabled=${this.disabled}\n ></nys-textinput>\n `\n : \"\"}\n </div>\n </div>\n `;\n }\n}\n\nif (!customElements.get(\"nys-radiobutton\")) {\n customElements.define(\"nys-radiobutton\", NysRadiobutton);\n}\n"],"names":["radiogroupIdCounter","_NysRadiogroup","LitElement","changedProperties","radioButton","index","message","firstRadio","radioButtons","radio","checkedRadio","event","el","radioBtns","fromEvent","focusedRadio","currentRadio","increment","target","radios","active","nodes","node","name","value","otherRadio","textInput","form","element","sourceRadio","html","unsafeCSS","styles","NysRadiogroup","__decorateClass","property","state","radiobuttonIdCounter","_NysRadiobutton","_a","input","span","newValue","isInvalid","e","ifDefined","NysRadiobutton"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAIA,IAAsB;AAyBnB,MAAMC,IAAN,MAAMA,UAAsBC,EAAW;AAAA;AAAA,EA0D5C,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fG,EAiBiB,WAAA,OAAA;AAGAJ,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GApBfG,EAoBiB,WAAA,aAAA;AAGeJ,EAAA;AAAA,EAA1CC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAvB9BG,EAuBgC,WAAA,IAAA;AAGAJ,EAAA;AAAA,EAA1CC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA1B9BG,EA0BgC,WAAA,MAAA;AAGfJ,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA7BfG,EA6BiB,WAAA,OAAA;AAGeJ,EAAA;AAAA,EAA1CC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAhC9BG,EAgCgC,WAAA,MAAA;AAMAJ,EAAA;AAAA,EAA1CC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAtC9BG,EAsCgC,WAAA,MAAA;AAGCJ,EAAA;AAAA,EAA3CC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAzC/BG,EAyCiC,WAAA,MAAA;AACAJ,EAAA;AAAA,EAA3CC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA1C/BG,EA0CiC,WAAA,OAAA;AACfJ,EAAA;AAAA,EAA5BC,EAAS,EAAE,MAAM,QAAA,CAAS;AAAA,GA3ChBG,EA2CkB,WAAA,gBAAA;AAEZJ,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA7CIE,EA6CM,WAAA,UAAA;AA7CZ,IAAMQ,IAANR;AA4WF,eAAe,IAAI,iBAAiB,KACvC,eAAe,OAAO,mBAAmBQ,CAAc;"}
1
+ {"version":3,"file":"nys-radiobutton.js","sources":["../src/nys-radiobutton.ts","../src/nys-radiogroup.ts"],"sourcesContent":["import { LitElement, html, unsafeCSS } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-radiobutton.scss?inline\";\n\nlet radiobuttonIdCounter = 0;\n\n/**\n * A radio button for single selection within a `nys-radiogroup`. Only one radio with the same `name` can be selected.\n *\n * Use within `nys-radiogroup` for 2-6 mutually exclusive options. For 7+ options, use `nys-select`.\n * For multiple selections, use `nys-checkbox`.\n *\n * @summary Radio button for single selection from mutually exclusive options. This is a READONLY data component.\n * @element nys-radiobutton\n *\n * @slot description - Custom HTML description content.\n *\n * @fires nys-change - Fired when selection changes. Detail: `{id, checked, name, value}`.\n * @fires nys-focus - Fired when radio gains focus.\n * @fires nys-blur - Fired when radio loses focus.\n * @fires nys-other-input - Fired when \"other\" text input value changes. Detail: `{id, name, value}`.\n *\n * @example Radio group\n * ```html\n * <nys-radiogroup label=\"Select borough\" required>\n * <nys-radiobutton name=\"borough\" value=\"bronx\" label=\"The Bronx\"></nys-radiobutton>\n * <nys-radiobutton name=\"borough\" value=\"brooklyn\" label=\"Brooklyn\"></nys-radiobutton>\n * </nys-radiogroup>\n * ```\n */\n\nexport class NysRadiobutton extends LitElement {\n static styles = unsafeCSS(styles);\n\n /** Whether this radio is selected. Only one per group can be checked. */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** Prevents interaction. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Marks group as required. Set on radiogroup, not individual radios. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Visible label text. Required for accessibility. */\n @property({ type: String }) label = \"\";\n\n /** Helper text below label. Use slot for custom HTML. */\n @property({ type: String }) description = \"\";\n\n /** Unique identifier. Auto-generated if not provided. */\n @property({ type: String, reflect: true }) id = \"\";\n\n /** Group name. Radios with same name are mutually exclusive. */\n @property({ type: String, reflect: true }) name = \"\";\n\n /** Value submitted when this radio is selected. */\n @property({ type: String }) value = \"\";\n\n /** Form `id` to associate with. */\n @property({ type: String, reflect: true }) form: string | null = null;\n\n /**\n * Radio size: `sm` (24px) or `md` (32px, default).\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" = \"md\";\n\n /** Renders as tile with larger clickable area. */\n @property({ type: Boolean, reflect: true }) tile = false;\n @property({ type: Boolean, reflect: true }) other = false;\n @property({ type: Boolean }) showOtherError = false;\n\n /**\n * Lifecycle methods\n * --------------------------------------------------------------------------\n */\n connectedCallback() {\n super.connectedCallback();\n if (!this.id) {\n this.id = `nys-radiobutton-${Date.now()}-${radiobuttonIdCounter++}`;\n }\n }\n\n render() {\n return html``;\n }\n}\n\nif (!customElements.get(\"nys-radiobutton\")) {\n customElements.define(\"nys-radiobutton\", NysRadiobutton);\n}\n","import { LitElement, html, unsafeCSS } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport type { NysRadiobutton } from \"./nys-radiobutton\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-radiobutton.scss?inline\";\n\nlet radiogroupIdCounter = 0;\n\n/**\n * A container for grouping `nys-radiobutton` elements as a single form control with enforced single selection.\n * Handles keyboard navigation (arrow keys), validation, required constraints, and form integration.\n *\n * Use to let users select exactly one option from 2-6 choices. Apply `tile` and `size` to the group\n * and all children inherit these styles automatically. For 7+ options, use `nys-select`.\n *\n * @summary Container for grouping radio buttons as a single form control.\n * @element nys-radiogroup\n *\n * @slot - Default slot for `nys-radiobutton` elements.\n * @slot description - Custom HTML description content.\n *\n * @example Basic radio group\n * ```html\n * <nys-radiogroup label=\"Select borough\" required>\n * <nys-radiobutton name=\"borough\" value=\"bronx\" label=\"The Bronx\"></nys-radiobutton>\n * <nys-radiobutton name=\"borough\" value=\"brooklyn\" label=\"Brooklyn\"></nys-radiobutton>\n * <nys-radiobutton name=\"borough\" value=\"manhattan\" label=\"Manhattan\"></nys-radiobutton>\n * </nys-radiogroup>\n * ```\n */\n\nexport class NysRadiogroup extends LitElement {\n static styles = unsafeCSS(styles);\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** Unique identifier. Auto-generated if not provided. */\n @property({ type: String, reflect: true }) id = \"\";\n\n /** Name for form submission. Auto-populated from child radiobuttons. */\n @property({ type: String, reflect: true }) name = \"\";\n\n /** Requires a selection before form submission. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Shows \"Optional\" flag. */\n @property({ type: Boolean, reflect: true }) optional = false;\n\n /** Shows error message when true. */\n @property({ type: Boolean, reflect: true }) showError = false;\n\n /** Error message text. Shown only when `showError` is true. */\n @property({ type: String }) errorMessage = \"\";\n\n /** Visible label text for the group. */\n @property({ type: String }) label = \"\";\n\n /** Helper text below label. Use slot for custom HTML. */\n @property({ type: String }) description = \"\";\n\n /** Renders all radiobuttons as tiles with larger clickable area. */\n @property({ type: Boolean, reflect: true }) tile = false;\n\n /** Tooltip text shown on hover/focus of info icon. */\n @property({ type: String }) tooltip = \"\";\n\n /** Form `id` to associate with. Applied to all children. */\n @property({ type: String, reflect: true }) form: string | null = null;\n\n /**\n * Radio size for all children: `sm` (24px) or `md` (32px, default).\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" = \"md\";\n @property({ type: Boolean }) _showOtherError = false;\n\n @state() private selectedValue: string | null = null;\n @state() private _slottedDescriptionText = \"\";\n @state() private _radios: NysRadiobutton[] = [];\n\n private _mobileQuery!: MediaQueryList;\n @state() private isMobile = false;\n\n private _hasUserInteracted = false; // need this flag for \"eager mode\"\n\n private _childObserver?: MutationObserver;\n\n private _internals: ElementInternals;\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 // Generate a unique ID if one is not provided\n connectedCallback() {\n super.connectedCallback();\n if (!this.id) {\n this.id = `nys-radiogroup-${Date.now()}-${radiogroupIdCounter++}`;\n }\n\n this._mobileQuery = window.matchMedia(\"(max-width: 479px)\");\n this.isMobile = this._mobileQuery.matches;\n this._mobileQuery.addEventListener(\"change\", this._handleMobileQuery);\n\n this.addEventListener(\"invalid\", this._handleInvalid);\n\n this._childObserver = new MutationObserver(() => {\n this._radios = this._getAllRadios();\n this.requestUpdate();\n });\n this._childObserver.observe(this, { childList: true });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"invalid\", this._handleInvalid);\n this._mobileQuery.removeEventListener(\"change\", this._handleMobileQuery);\n\n this._childObserver?.disconnect();\n }\n\n async firstUpdated() {\n await this.updateComplete;\n\n this._radios = this._getAllRadios();\n\n this._initializeCheckedRadioValue();\n this._setValue(); // This ensures our element always participates in the form\n this._setRadioButtonRequire();\n this._updateRadioButtonsSize();\n this._getSlotDescriptionForAria();\n this._initializeChildAttributes();\n\n this._updateGroupTabIndex();\n }\n\n updated(changedProperties: Map<string | symbol, unknown>) {\n if (\n changedProperties.has(\"required\") ||\n changedProperties.has(\"selectedValue\")\n ) {\n if (!this.showError) {\n this._manageRequire();\n }\n }\n if (changedProperties.has(\"size\")) {\n this._updateRadioButtonsSize();\n }\n this._updateGroupTabIndex();\n }\n\n /**\n * Form Integration\n * --------------------------------------------------------------------------\n */\n\n private _setValue() {\n this._internals.setFormValue(this.selectedValue);\n }\n\n private _setRadioButtonRequire() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton, index) => {\n if (this.required && index === 0) {\n radioButton.setAttribute(\"required\", \"required\");\n }\n });\n }\n\n private async _manageRequire() {\n const message = this.errorMessage || \"Please select an option.\";\n\n const radioButtons = Array.from(this.querySelectorAll(\"nys-radiobutton\"));\n const firstRadio = radioButtons[0] as HTMLElement;\n\n if (firstRadio) {\n const shadowInput = this.shadowRoot?.querySelector<HTMLElement>(\n `#input-${(firstRadio as NysRadiobutton).id}`,\n );\n if (this.required && !this.selectedValue) {\n this._internals.setValidity(\n { valueMissing: true },\n message,\n shadowInput ?? firstRadio, // pass the custom element, not shadow input\n );\n } else {\n this.showError = false;\n this._internals.setValidity({}, \"\", firstRadio);\n }\n }\n }\n\n checkValidity() {\n const radioButtons = Array.from(this.querySelectorAll(\"nys-radiobutton\"));\n const valid =\n !this.required ||\n radioButtons.some((radio) => (radio as NysRadiobutton).checked);\n return valid;\n }\n\n // Need to account for if radiogroup already have a radiobutton checked at initialization\n private _initializeCheckedRadioValue() {\n const checkedRadio = this.querySelector(\"nys-radiobutton[checked]\");\n if (checkedRadio) {\n this.selectedValue = checkedRadio.getAttribute(\"value\");\n this._internals.setFormValue(this.selectedValue);\n }\n }\n\n // Core Keyboard & Click Logic\n private _getAllRadios() {\n return Array.from(\n this.querySelectorAll(\"nys-radiobutton\"),\n ) as NysRadiobutton[];\n }\n\n // Arrow / Space / Enter navigation at group level\n private async _handleKeyDown(event: KeyboardEvent) {\n const keys = [\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \" \",\n \"Enter\",\n ];\n\n if (!keys.includes(event.key)) return;\n // Prevent arrow left/right from switching to next radiobutton when focus is within \"other\" textinput\n if (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\") {\n const inTextInput = event\n .composedPath()\n .some((el) => (el as HTMLElement).tagName === \"NYS-TEXTINPUT\");\n if (inTextInput) return;\n }\n\n event.preventDefault();\n\n const radioBtns = this._getAllRadios().filter((radio) => !radio.disabled);\n const focusedInput = event.target as HTMLElement;\n const currentRadio =\n radioBtns.find(\n (radio) =>\n this.shadowRoot?.querySelector(`#input-${radio.id}`) === focusedInput,\n ) ||\n radioBtns.find((radio) => radio.checked) ||\n radioBtns[0];\n\n let increment = 0;\n if ([\"ArrowUp\", \"ArrowLeft\"].includes(event.key)) {\n increment = -1;\n } else if ([\"ArrowDown\", \"ArrowRight\"].includes(event.key)) {\n increment = 1;\n }\n\n let index = radioBtns.indexOf(currentRadio) + increment;\n\n // Handles the wrap around ends if user is at first or last radiobutton\n if (index < 0) {\n index = radioBtns.length - 1;\n }\n if (index >= radioBtns.length) {\n index = 0;\n }\n\n const target = radioBtns[index];\n\n this._selectRadio(target);\n await this.updateComplete;\n this._updateGroupTabIndex();\n this.shadowRoot?.querySelector<HTMLElement>(`#input-${target.id}`)?.focus();\n }\n\n private _updateGroupTabIndex() {\n const radios = this._getAllRadios();\n\n // Pick active: look for what's selected first, otherwise choose the first enabled radiobutton\n const active =\n radios.find((radio) => radio.checked && !radio.disabled) ||\n radios.find((radio) => !radio.disabled);\n\n radios.forEach((radio) => {\n const input = this.shadowRoot?.querySelector(\n `#input-${radio.id}`,\n ) as HTMLInputElement;\n\n // Only one radiobutton can be focusable at all times.\n // Due to this, we calculate logic to determine an active radiobutton and call all other as tabindex=\"-1\"\n if (input) {\n input.tabIndex = radio === active ? 0 : -1;\n }\n });\n }\n\n // This callback is automatically called when the parent form is reset.\n public formResetCallback() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radio) => {\n (radio as NysRadiobutton).checked = false;\n });\n\n this.selectedValue = null;\n this._internals.setFormValue(null);\n this.showError = false;\n this.errorMessage = \"\";\n this._internals.setValidity({});\n this._hasUserInteracted = false;\n this.requestUpdate();\n }\n\n /**\n * Functions\n * --------------------------------------------------------------------------\n */\n\n private _handleMobileQuery = () => {\n this.isMobile = this._mobileQuery.matches;\n };\n\n private _handleSlotChange() {\n this._radios = Array.from(this.querySelectorAll(\"nys-radiobutton\"));\n this.requestUpdate();\n }\n\n // Apply ARIA & initial tabindex to each child radio\n private _initializeChildAttributes() {\n const radios = this._getAllRadios();\n radios.forEach((radio) => {\n if (radio.getAttribute(\"tabindex\") !== \"-1\") {\n radio.setAttribute(\"tabindex\", \"-1\");\n }\n });\n }\n\n private _updateRadioButtonsSize() {\n const radioButtons = this.querySelectorAll(\"nys-radiobutton\");\n radioButtons.forEach((radioButton) => {\n if (radioButton.getAttribute(\"size\") !== this.size) {\n radioButton.setAttribute(\"size\", this.size);\n }\n });\n }\n\n private _selectRadio(radiobtn: NysRadiobutton) {\n if (radiobtn.checked || radiobtn.disabled) return;\n\n const radios = this._getAllRadios();\n radios.forEach((radio) => {\n radio.checked = false;\n });\n\n radiobtn.checked = true;\n\n this._showOtherError = false;\n this._hasUserInteracted = false;\n\n this.name = radiobtn.name;\n this.selectedValue = radiobtn.value;\n this._internals.setFormValue(this.selectedValue);\n this._internals.setValidity({});\n this.showError = false;\n\n this._updateGroupTabIndex();\n this.requestUpdate();\n\n this.dispatchEvent(\n new CustomEvent(\"nys-change\", {\n detail: {\n id: radiobtn.id,\n checked: radiobtn.checked,\n name: radiobtn.name,\n value: radiobtn.value,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n // Get the slotted text contents so native VO can attempt to announce it within the legend in the fieldset\n private _getSlotDescriptionForAria() {\n const slot = this.shadowRoot?.querySelector(\n 'slot[name=\"description\"]',\n ) as HTMLSlotElement;\n const nodes = slot?.assignedNodes({ flatten: true }) || [];\n\n this._slottedDescriptionText = nodes\n .map((node) => node.textContent?.trim())\n .filter(Boolean)\n .join(\", \");\n }\n\n /**\n * Event Handlers\n * --------------------------------------------------------------------------\n */\n\n private async _handleInvalid(event: Event) {\n event.preventDefault();\n\n const radios = this._getAllRadios();\n const otherRadio = radios.find((radio) => radio.other && radio.checked);\n\n if (otherRadio && otherRadio.value.trim() === \"\") {\n this.showError = true;\n this._hasUserInteracted = true;\n this._validateOtherAndEmitError(otherRadio);\n\n await this.updateComplete;\n const textInput = this.shadowRoot?.querySelector(\"nys-textinput\");\n\n if (textInput) {\n await (textInput as any).updateComplete;\n (textInput as HTMLElement).focus();\n return;\n }\n }\n\n // Check if the radio group is invalid and set `showError` accordingly\n this.showError = true;\n await this._manageRequire(); // Refresh validation message\n\n const firstEnabledRadio = this._getAllRadios().find(\n (radio) => !radio.disabled,\n );\n if (firstEnabledRadio) {\n const focusFirstInput = () => {\n this.shadowRoot\n ?.querySelector<HTMLElement>(`#input-${firstEnabledRadio.id}`)\n ?.focus();\n };\n\n // Focus only if this is the first invalid element (top-down approach)\n const form = this._internals.form;\n if (form) {\n const elements = Array.from(form.elements) as Array<\n HTMLElement & { checkValidity?: () => boolean }\n >;\n\n // Find the first element in the form that is invalid\n const firstInvalidElement = elements.find(\n (element) =>\n typeof element.checkValidity === \"function\" &&\n !element.checkValidity(),\n );\n if (firstInvalidElement === this) {\n focusFirstInput();\n }\n } else {\n // If not part of a form, simply focus.\n focusFirstInput();\n }\n }\n }\n\n private _handleTextInput(radiobtn: NysRadiobutton, event: Event) {\n const input = event.target as HTMLInputElement;\n radiobtn.value = input.value;\n this.selectedValue = input.value;\n this._internals.setFormValue(input.value);\n\n if (this._hasUserInteracted) {\n this._validateOtherAndEmitError(radiobtn);\n }\n\n this.dispatchEvent(\n new CustomEvent(\"nys-other-input\", {\n detail: { id: radiobtn.id, name: radiobtn.name, value: radiobtn.value },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handleTextInputBlur(radiobtn: NysRadiobutton) {\n this._hasUserInteracted = true;\n this._validateOtherAndEmitError(radiobtn);\n }\n\n private _validateOtherAndEmitError(radiobtn: NysRadiobutton) {\n if (!radiobtn.other) return;\n\n if (!radiobtn.checked || !this._hasUserInteracted) {\n this._showOtherError = false;\n return;\n }\n\n const isInvalid = radiobtn.value.trim() === \"\";\n this._showOtherError = isInvalid;\n const shadowInput = this.shadowRoot?.querySelector<HTMLElement>(\n `#input-${radiobtn.id}`,\n );\n\n if (isInvalid) {\n this._internals.setValidity(\n {\n customError: true,\n },\n \"Please enter a value for this option.\",\n shadowInput ?? (radiobtn as HTMLElement),\n );\n this.showError = true;\n } else {\n this._internals.setValidity({});\n this.showError = false;\n }\n }\n\n private _handleOtherKeydown(e: KeyboardEvent) {\n if (e.key == \"Space\" || e.key === \" \") {\n e.stopPropagation();\n }\n }\n\n private _handleGroupFocusout(event: FocusEvent) {\n const relatedTarget = event.relatedTarget as Node | null;\n if (relatedTarget && this.shadowRoot?.contains(relatedTarget)) return;\n\n const otherRadio = this._getAllRadios().find(\n (radio) => radio.other && radio.checked,\n );\n if (otherRadio && otherRadio.value.trim() === \"\") {\n this._hasUserInteracted = true;\n this._validateOtherAndEmitError(otherRadio);\n }\n }\n\n private _handleRadiobtnClick = (radiobtn: NysRadiobutton) => {\n if (!radiobtn.disabled) {\n this.shadowRoot\n ?.querySelector<HTMLInputElement>(`#input-${radiobtn.id}`)\n ?.click();\n }\n };\n\n private _handleRadiobtnFocus(radiobtn: NysRadiobutton) {\n radiobtn.dispatchEvent(\n new CustomEvent(\"nys-focus\", { bubbles: true, composed: true }),\n );\n }\n\n private _handleRadiobtnBlur(radiobtn: NysRadiobutton) {\n radiobtn.dispatchEvent(\n new CustomEvent(\"nys-blur\", { bubbles: true, composed: true }),\n );\n }\n\n render() {\n return html` <slot\n style=\"display:none\"\n @slotchange=${this._handleSlotChange}\n ></slot>\n <fieldset\n aria-label=\"${this.label}${this._slottedDescriptionText\n ? ` ${this._slottedDescriptionText}`\n : this.description\n ? ` ${this.description}`\n : \"\"}\"\n role=\"radiogroup\"\n aria-required=${this.required ? \"true\" : \"false\"}\n class=\"nys-radiogroup\"\n @focusout=${this._handleGroupFocusout}\n >\n <legend>\n <nys-label\n label=${this.label}\n description=${this.description}\n flag=${this.required ? \"required\" : this.optional ? \"optional\" : \"\"}\n tooltip=${this.tooltip}\n >\n <slot name=\"description\" slot=\"description\"\n >${this.description}</slot\n >\n </nys-label>\n </legend>\n <div class=\"nys-radiogroup__content\" @keydown=${this._handleKeyDown}>\n ${this._radios.map(\n (radiobtn, index) => html`\n <div\n class=\"nys-radiobutton\"\n @click=${() => this._handleRadiobtnClick(radiobtn)}\n >\n <div class=\"nys-radiobutton__main-container\">\n <!-- <span class=\"nys-radiobutton__radio\" tabindex=\"-1\"></span> -->\n <input\n id=\"input-${radiobtn.id}\"\n type=\"radio\"\n class=\"nys-radiobutton__radio\"\n name=\"${ifDefined(radiobtn.name || undefined)}\"\n .checked=${radiobtn.checked}\n ?disabled=${radiobtn.disabled}\n .value=${radiobtn.value}\n ?required=${this.required && index === 0}\n form=${ifDefined(radiobtn.form || undefined)}\n aria-label=\"${radiobtn.label ||\n (radiobtn.other ? \"Other\" : \"\")}\"\n @change=${() => this._selectRadio(radiobtn)}\n @focus=${() => this._handleRadiobtnFocus(radiobtn)}\n @blur=${() => this._handleRadiobtnBlur(radiobtn)}\n />\n ${(radiobtn.label || radiobtn.other) &&\n html`<nys-label\n aria-hidden=\"true\"\n id=\"${radiobtn.id}-label\"\n label=\"${radiobtn.label || (radiobtn.other ? \"Other\" : \"\")}\"\n description=${ifDefined(radiobtn.description || undefined)}\n >\n <slot name=\"description\" slot=\"description\"\n >${radiobtn.description}</slot\n >\n </nys-label> `}\n </div>\n <div class=\"nys-radiobutton__other-container\">\n ${radiobtn.other && radiobtn.checked\n ? html`\n <nys-textinput\n .value=${radiobtn.value}\n id=${\"radiobutton-other-\" + radiobtn.id}\n @nys-input=${(e: Event) =>\n this._handleTextInput(radiobtn, e)}\n @nys-blur=${() => this._handleTextInputBlur(radiobtn)}\n @keydown=${this._handleOtherKeydown}\n @nys-focus=${() =>\n radiobtn.classList.remove(\"focused\")}\n ariaLabel=\"Other\"\n aria-invalid=${radiobtn.showOtherError\n ? \"true\"\n : \"false\"}\n width=${this.isMobile ? \"full\" : \"md\"}\n ?disabled=${radiobtn.disabled}\n ></nys-textinput>\n `\n : \"\"}\n </div>\n </div>\n `,\n )}\n </div>\n <nys-errormessage\n ?showError=${this.showError}\n errorMessage=${this._internals.validationMessage || this.errorMessage}\n .showDivider=${!this.tile}\n ></nys-errormessage>\n </fieldset>`;\n }\n}\n\nif (!customElements.get(\"nys-radiogroup\")) {\n customElements.define(\"nys-radiogroup\", NysRadiogroup);\n}\n"],"names":["radiobuttonIdCounter","_NysRadiobutton","LitElement","html","unsafeCSS","styles","NysRadiobutton","__decorateClass","property","radiogroupIdCounter","_NysRadiogroup","radiobtn","changedProperties","radioButton","index","message","firstRadio","shadowInput","radioButtons","radio","checkedRadio","event","el","radioBtns","focusedInput","currentRadio","increment","target","radios","active","input","nodes","node","otherRadio","textInput","firstEnabledRadio","focusFirstIn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EAgCiC,WAAA,MAAA;AAGhBpC,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAnCfmC,EAmCiB,WAAA,SAAA;AAGepC,EAAA;AAAA,EAA1CC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAtC9BmC,EAsCgC,WAAA,MAAA;AAMApC,EAAA;AAAA,EAA1CC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA5C9BmC,EA4CgC,WAAA,MAAA;AACdpC,EAAA;AAAA,EAA5BC,EAAS,EAAE,MAAM,QAAA,CAAS;AAAA,GA7ChBmC,EA6CkB,WAAA,iBAAA;AAEZpC,EAAA;AAAA,EAAhBqC,EAAA;AAAM,GA/CID,EA+CM,WAAA,eAAA;AACApC,EAAA;AAAA,EAAhBqC,EAAA;AAAM,GAhDID,EAgDM,WAAA,yBAAA;AACApC,EAAA;AAAA,EAAhBqC,EAAA;AAAM,GAjDID,EAiDM,WAAA,SAAA;AAGApC,EAAA;AAAA,EAAhBqC,EAAA;AAAM,GApDID,EAoDM,WAAA,UAAA;AA8jBd,eAAe,IAAI,gBAAgB,KACtC,eAAe,OAAO,kBAAkBA,CAAa;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/nys-radiobutton",
3
- "version": "1.18.3",
3
+ "version": "1.19.1",
4
4
  "description": "The Radiobutton component from the NYS Design System.",
5
5
  "module": "dist/nys-radiobutton.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "lit-analyze": "lit-analyzer '**/*.ts'"
24
24
  },
25
25
  "dependencies": {
26
- "@nysds/nys-label": "^1.18.3",
27
- "@nysds/nys-errormessage": "^1.18.3"
26
+ "@nysds/nys-label": "^1.19.1",
27
+ "@nysds/nys-errormessage": "^1.19.1"
28
28
  },
29
29
  "devDependencies": {
30
30
  "lit": "^3.3.1",