@nysds/components 1.12.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +3 -1
  2. package/custom-elements.json +10506 -0
  3. package/dist/.vscode/vscode.css-custom-data.json +47 -1
  4. package/dist/.vscode/vscode.html-custom-data.json +1280 -266
  5. package/dist/custom-elements.json +2183 -332
  6. package/dist/nys-stepper/newsletter.html +4 -0
  7. package/dist/nys-stepper/personal.html +6 -0
  8. package/dist/nys-stepper/survey.html +5 -0
  9. package/dist/nys-stepper/team.html +6 -0
  10. package/dist/nysds.es.js +3325 -1564
  11. package/dist/nysds.es.js.map +1 -1
  12. package/dist/nysds.js +280 -164
  13. package/dist/nysds.js.map +1 -1
  14. package/dist/packages/mcp-server/src/index.d.ts +8 -0
  15. package/dist/packages/mcp-server/src/lib/cem-parser.d.ts +95 -0
  16. package/dist/packages/mcp-server/src/lib/search.d.ts +19 -0
  17. package/dist/packages/mcp-server/src/lib/token-parser.d.ts +139 -0
  18. package/dist/packages/mcp-server/src/prompts/nysds-mode.d.ts +7 -0
  19. package/dist/packages/mcp-server/src/resources/components.d.ts +11 -0
  20. package/dist/packages/mcp-server/src/resources/guides.d.ts +10 -0
  21. package/dist/packages/mcp-server/src/resources/index.d.ts +7 -0
  22. package/dist/packages/mcp-server/src/resources/tokens.d.ts +16 -0
  23. package/dist/packages/mcp-server/src/server.d.ts +10 -0
  24. package/dist/packages/mcp-server/src/tools/component-tools.d.ts +13 -0
  25. package/dist/packages/mcp-server/src/tools/index.d.ts +7 -0
  26. package/dist/packages/mcp-server/src/tools/token-tools.d.ts +16 -0
  27. package/dist/packages/mcp-server/src/tools/validation-tools.d.ts +11 -0
  28. package/dist/packages/nys-accordion/src/nys-accordion.d.ts +37 -3
  29. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +32 -0
  30. package/dist/packages/nys-alert/src/nys-alert.d.ts +62 -1
  31. package/dist/packages/nys-avatar/src/nys-avatar.d.ts +44 -0
  32. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +29 -0
  33. package/dist/packages/nys-badge/src/nys-badge.d.ts +46 -0
  34. package/dist/packages/nys-button/src/nys-button.d.ts +141 -0
  35. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +65 -1
  36. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +50 -0
  37. package/dist/packages/nys-datepicker/src/index.d.ts +1 -0
  38. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +116 -0
  39. package/dist/packages/nys-datepicker/src/nys-datepicker.figma.d.ts +1 -0
  40. package/dist/packages/nys-divider/src/nys-divider.d.ts +22 -0
  41. package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +16 -0
  42. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +59 -0
  43. package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +18 -0
  44. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +29 -0
  45. package/dist/packages/nys-globalheader/src/nys-global.logo.d.ts +2 -0
  46. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +32 -5
  47. package/dist/packages/nys-icon/src/nys-icon.d.ts +33 -0
  48. package/dist/packages/nys-label/src/nys-label.d.ts +17 -0
  49. package/dist/packages/nys-modal/src/nys-modal.d.ts +47 -0
  50. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +33 -0
  51. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +52 -3
  52. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +55 -1
  53. package/dist/packages/nys-select/src/nys-option.d.ts +24 -0
  54. package/dist/packages/nys-select/src/nys-select.d.ts +70 -1
  55. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +26 -0
  56. package/dist/packages/nys-stepper/src/index.d.ts +2 -0
  57. package/dist/packages/nys-stepper/src/nys-step.d.ts +37 -0
  58. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +48 -0
  59. package/dist/packages/nys-stepper/src/nys-stepper.figma.d.ts +1 -0
  60. package/dist/packages/nys-table/src/index.d.ts +1 -0
  61. package/dist/packages/nys-table/src/nys-table.d.ts +39 -0
  62. package/dist/packages/nys-table/src/nys-table.figma.d.ts +1 -0
  63. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +72 -1
  64. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +85 -1
  65. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +52 -0
  66. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +41 -0
  67. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +19 -0
  68. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +38 -2
  69. package/dist/src/index.d.ts +2 -0
  70. package/package.json +22 -17
@@ -1,14 +1,43 @@
1
1
  import { LitElement } from "lit";
2
+ /**
3
+ * A floating "Back to top" button that appears after scrolling. Smooth-scrolls to page top when clicked.
4
+ *
5
+ * Auto-shows after scrolling 1.5 viewports on pages 4+ screens tall. Set `visible` to force display.
6
+ * Renders as circle button on mobile. Position with `position` prop (`left` or `right`).
7
+ *
8
+ * @summary Floating back-to-top button with auto-show behavior and smooth scroll.
9
+ * @element nys-backtotop
10
+ *
11
+ * @example Auto-appearing button
12
+ * ```html
13
+ * <nys-backtotop></nys-backtotop>
14
+ * ```
15
+ *
16
+ * @example Always visible, left position
17
+ * ```html
18
+ * <nys-backtotop visible position="left"></nys-backtotop>
19
+ * ```
20
+ */
2
21
  export declare class NysBacktotop extends LitElement {
3
22
  static styles: import("lit").CSSResult;
23
+ /** Horizontal position: `left` or `right`. */
4
24
  position: string;
25
+ /** Force button visibility. Overrides auto-show scroll behavior. */
5
26
  visible: boolean;
6
27
  private isMobile;
7
28
  private forceVisible;
8
29
  private mediaQuery;
30
+ /**
31
+ * Lifecycle methods
32
+ * --------------------------------------------------------------------------
33
+ */
9
34
  constructor();
10
35
  connectedCallback(): void;
11
36
  disconnectedCallback(): void;
37
+ /**
38
+ * Functions
39
+ * --------------------------------------------------------------------------
40
+ */
12
41
  private _handleScroll;
13
42
  private _scrollToTop;
14
43
  private _handleResize;
@@ -1,20 +1,66 @@
1
1
  import { LitElement } from "lit";
2
+ /**
3
+ * A compact label for status, counts, or categorization. Supports semantic intents with auto-selected icons.
4
+ *
5
+ * Use badges to highlight metadata like status ("Approved"), counts ("3 new"), or categories.
6
+ * Set `intent` to apply semantic meaning. Add `prefixIcon` or `suffixIcon` as boolean for default icons,
7
+ * or pass icon name strings for custom icons.
8
+ *
9
+ * @summary Compact label for status, counts, or categorization with semantic styling.
10
+ * @element nys-badge
11
+ *
12
+ * @example Status badge
13
+ * ```html
14
+ * <nys-badge intent="success" label="Approved" prefixIcon></nys-badge>
15
+ * ```
16
+ *
17
+ * @example Count badge
18
+ * ```html
19
+ * <nys-badge prefixLabel="Messages" label="12"></nys-badge>
20
+ * ```
21
+ */
2
22
  export declare class NysBadge extends LitElement {
3
23
  static styles: import("lit").CSSResult;
24
+ /** Unique identifier. */
4
25
  id: string;
26
+ /** Name attribute for form association. */
5
27
  name: string;
28
+ /**
29
+ * Badge size: `sm` (smaller text) or `md` (default).
30
+ * @default "md"
31
+ */
6
32
  size: "sm" | "md";
33
+ /**
34
+ * Semantic intent affecting color: `neutral`, `error`, `success`, or `warning`.
35
+ * @default "neutral"
36
+ */
7
37
  intent: "neutral" | "error" | "success" | "warning";
38
+ /** Secondary label displayed before the main label. */
8
39
  prefixLabel: string;
40
+ /** Primary label text displayed in the badge. */
9
41
  label: string;
42
+ variant: "strong" | "";
10
43
  private _prefixIcon;
11
44
  get prefixIcon(): string | boolean;
12
45
  set prefixIcon(value: string | boolean);
13
46
  private _suffixIcon;
14
47
  get suffixIcon(): string | boolean;
15
48
  set suffixIcon(value: string | boolean);
49
+ /**
50
+ * Lifecycle methods
51
+ * --------------------------------------------------------------------------
52
+ */
16
53
  connectedCallback(): void;
54
+ /**
55
+ * Functions
56
+ * --------------------------------------------------------------------------
57
+ */
17
58
  private static readonly DEFAULT_ICONS;
59
+ /**
60
+ * Resolves which icon should be rendered.
61
+ * @param icon The icon property value (string or boolean)
62
+ * @returns Icon name or null if no icon should be rendered
63
+ */
18
64
  private resolveIcon;
19
65
  render(): import("lit-html").TemplateResult<1>;
20
66
  }
@@ -1,34 +1,175 @@
1
1
  import { LitElement } from "lit";
2
+ /**
3
+ * A button for actions like saving, submitting, or navigating. Form-associated with full keyboard support.
4
+ *
5
+ * Use `filled` for primary actions (one per section), `outline` for secondary, `ghost` for tertiary,
6
+ * `text` for inline. Set `href` to render as a navigation link.
7
+ *
8
+ * @summary Button for actions and CTAs with variants, sizes, and icon support.
9
+ * @element nys-button
10
+ *
11
+ * @slot prefix-icon - Icon before label. Not shown for `text` variant.
12
+ * @slot suffix-icon - Icon after label. Not shown for `text` variant.
13
+ * @slot circle-icon - Icon for circle mode. Overrides `icon` prop.
14
+ *
15
+ * @cssprop [--nys-button-color] - Text color of the button label.
16
+ * @cssprop [--nys-button-color--hover] - Text color when hovered.
17
+ * @cssprop [--nys-button-color--active] - Text color when active/pressed.
18
+ * @cssprop [--nys-button-background-color] - Background color of the button.
19
+ * @cssprop [--nys-button-background-color--hover] - Background color when hovered.
20
+ * @cssprop [--nys-button-background-color--active] - Background color when active/pressed.
21
+ * @cssprop [--nys-button-border-color] - Border color of the button.
22
+ * @cssprop [--nys-button-border-color--hover] - Border color when hovered.
23
+ * @cssprop [--nys-button-border-color--active] - Border color when active/pressed.
24
+ *
25
+ * @fires nys-click - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.
26
+ * @fires nys-focus - Fired when the button receives focus.
27
+ * @fires nys-blur - Fired when the button loses focus.
28
+ *
29
+ * @example Basic filled button
30
+ * ```html
31
+ * <nys-button label="Submit" variant="filled"></nys-button>
32
+ * ```
33
+ *
34
+ * @example Secondary outline button
35
+ * ```html
36
+ * <nys-button label="Cancel" variant="outline"></nys-button>
37
+ * ```
38
+ *
39
+ * @example Button with icons
40
+ * ```html
41
+ * <nys-button label="Previous" prefixIcon="chevron_left"></nys-button>
42
+ * <nys-button label="Next" suffixIcon="chevron_right"></nys-button>
43
+ * ```
44
+ *
45
+ * @example Circle icon button
46
+ * ```html
47
+ * <nys-button circle icon="close" label="Close dialog"></nys-button>
48
+ * ```
49
+ *
50
+ * @example Link-style button for navigation
51
+ * ```html
52
+ * <nys-button label="Visit NY.gov" href="https://www.ny.gov/" target="_blank" suffixIcon="open_in_new"></nys-button>
53
+ * ```
54
+ *
55
+ * @example Form submit button
56
+ * ```html
57
+ * <nys-button type="submit" label="Save Changes" variant="filled"></nys-button>
58
+ * ```
59
+ */
2
60
  export declare class NysButton extends LitElement {
3
61
  static styles: import("lit").CSSResult;
62
+ /**
63
+ * Unique identifier. Auto-generated if not provided.
64
+ */
4
65
  id: string;
66
+ /**
67
+ * Name for form submission.
68
+ */
5
69
  name: string;
70
+ /**
71
+ * Button height: `sm` (40px) for dense UIs, `md` (48px, default) for standard use, `lg` (56px) for prominent CTAs.
72
+ * @default "md"
73
+ */
6
74
  size: "sm" | "md" | "lg";
75
+ /**
76
+ * Expands button to fill container width. Use for mobile layouts or stacked button groups.
77
+ * @default false
78
+ */
7
79
  fullWidth: boolean;
80
+ /**
81
+ * Visual style: `filled` for primary (one per section), `outline` for secondary, `ghost` for tertiary, `text` for inline actions. Avoid `text` for navigation.
82
+ * @default "filled"
83
+ */
8
84
  variant: "filled" | "outline" | "ghost" | "text";
85
+ /**
86
+ * Adjusts colors for dark backgrounds.
87
+ * @default false
88
+ */
9
89
  inverted: boolean;
90
+ /**
91
+ * Visible button text. Use sentence case, action-oriented text (e.g., "Save Draft"). Becomes aria-label in `circle` mode.
92
+ */
10
93
  label: string;
94
+ /**
95
+ * Screen reader label. Required for icon-only buttons if `label` is not set.
96
+ */
11
97
  ariaLabel: string;
98
+ /**
99
+ * ID of controlled element (e.g., dropdown or modal). Sets `aria-controls`.
100
+ */
12
101
  ariaControls: string;
102
+ /**
103
+ * Material Symbol icon before label. Not shown for `text` variant or `circle` mode.
104
+ */
13
105
  prefixIcon: string;
106
+ /**
107
+ * Material Symbol icon after label. Use `chevron_down` for dropdowns, `open_in_new` for external links. Not shown for `text` variant or `circle` mode.
108
+ */
14
109
  suffixIcon: string;
110
+ /**
111
+ * Renders circular icon-only button. Requires `icon` prop. `label` becomes aria-label.
112
+ * @default false
113
+ */
15
114
  circle: boolean;
115
+ /**
116
+ * Icon for circle mode. Required when `circle` is true. Scales with size (sm=24px, md=32px, lg=40px).
117
+ */
16
118
  icon: string;
119
+ /**
120
+ * Prevents interaction. Avoid disabling without explanation—show validation errors instead.
121
+ * @default false
122
+ */
17
123
  disabled: boolean;
124
+ /**
125
+ * Form `id` to associate with. Use when button is outside the form element.
126
+ */
18
127
  form: string | null;
128
+ /**
129
+ * Value submitted with form data. Only used when `type="submit"`.
130
+ */
19
131
  value: string;
132
+ /**
133
+ * Additional screen reader description. Sets `aria-description`.
134
+ */
20
135
  ariaDescription: string;
136
+ /**
137
+ * Form behavior: `button` (default, no form action), `submit` (submits form), `reset` (resets form). Always set explicitly to avoid unintended submissions.
138
+ * @default "button"
139
+ */
21
140
  type: "submit" | "reset" | "button";
141
+ /**
142
+ * Click handler. Use instead of `@click` to ensure keyboard accessibility.
143
+ */
22
144
  onClick: ((event: Event) => void) | null;
145
+ /**
146
+ * URL to navigate to. Renders as `<a>` tag. Omit for action buttons.
147
+ */
23
148
  href: string;
149
+ /**
150
+ * Link target: `_self` (same tab), `_blank` (new tab—add `suffixIcon="open_in_new"`), `_parent`, `_top`, or frame name.
151
+ * @default "_self"
152
+ */
24
153
  target: "_self" | "_blank" | "_parent" | "_top" | "framename";
25
154
  getButtonElement(): Promise<HTMLElement | null>;
26
155
  private _internals;
156
+ /**
157
+ * Lifecycle methods
158
+ * --------------------------------------------------------------------------
159
+ */
27
160
  static formAssociated: boolean;
28
161
  constructor();
29
162
  connectedCallback(): void;
163
+ /**
164
+ * Functions
165
+ * --------------------------------------------------------------------------
166
+ */
30
167
  private _generateUniqueId;
31
168
  private _manageFormAction;
169
+ /**
170
+ * Event Handlers
171
+ * --------------------------------------------------------------------------
172
+ */
32
173
  private _handleFocus;
33
174
  private _handleBlur;
34
175
  private _handleClick;
@@ -1,38 +1,102 @@
1
1
  import { LitElement } from "lit";
2
2
  import "./nys-checkboxgroup";
3
+ /**
4
+ * A checkbox input for binary choices or multi-select lists. Can be used standalone or in a `nys-checkboxgroup`.
5
+ * Form-associated with validation via ElementInternals.
6
+ *
7
+ * Use for binary decisions (agree/disagree) or selecting multiple options from a list.
8
+ * For single selection from 2-6 options, use `nys-radiobutton`. For immediate state changes, use `nys-toggle`.
9
+ *
10
+ * @summary Checkbox for binary choices or multi-select options.
11
+ * @element nys-checkbox
12
+ *
13
+ * @slot description - Custom HTML description content.
14
+ *
15
+ * @fires nys-change - Fired when checked state changes. Detail: `{id, checked, name, value}`.
16
+ * @fires nys-focus - Fired when checkbox gains focus.
17
+ * @fires nys-blur - Fired when checkbox loses focus.
18
+ *
19
+ * @example Single checkbox
20
+ * ```html
21
+ * <nys-checkbox label="I agree to the terms" name="terms" required></nys-checkbox>
22
+ * ```
23
+ *
24
+ * @example Checkbox group
25
+ * ```html
26
+ * <nys-checkboxgroup label="Select landmarks">
27
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
28
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
29
+ * </nys-checkboxgroup>
30
+ * ```
31
+ */
3
32
  export declare class NysCheckbox extends LitElement {
4
33
  static styles: import("lit").CSSResult;
34
+ /** Whether checkbox is checked. */
5
35
  checked: boolean;
36
+ /** Prevents interaction. */
6
37
  disabled: boolean;
38
+ /** Marks as required. Validates that checkbox is checked. */
7
39
  required: boolean;
40
+ /** Visible label text. Required for accessibility. */
8
41
  label: string;
42
+ /** Helper text below label. Use slot for custom HTML. */
9
43
  description: string;
44
+ /** Unique identifier. Auto-generated if not provided. */
10
45
  id: string;
46
+ /** Name for form submission. Use same name for grouped checkboxes. */
11
47
  name: string;
48
+ /** Value submitted when checked. */
12
49
  value: string;
50
+ /** Form `id` to associate with when checkbox is outside form element. */
13
51
  form: string | null;
52
+ /** Shows error message when true. */
14
53
  showError: boolean;
54
+ /** Error message text. Shown only when `showError` is true. */
15
55
  errorMessage: string;
56
+ /** Internal: Set by parent checkboxgroup. Do not set manually. */
16
57
  groupExist: boolean;
58
+ /** Renders as tile with larger clickable area. Apply to group for consistency. */
17
59
  tile: boolean;
60
+ /** Adjusts colors for dark backgrounds. */
18
61
  inverted: boolean;
62
+ /** Tooltip text shown on hover/focus of info icon. */
19
63
  tooltip: string;
64
+ /**
65
+ * Checkbox size: `sm` (24px) or `md` (32px, default).
66
+ * @default "md"
67
+ */
20
68
  size: "sm" | "md";
21
69
  getInputElement(): Promise<HTMLInputElement | null>;
22
70
  private _internals;
71
+ /**
72
+ * Lifecycle methods
73
+ * --------------------------------------------------------------------------
74
+ */
23
75
  static formAssociated: boolean;
24
76
  constructor();
25
77
  connectedCallback(): void;
26
78
  disconnectedCallback(): void;
27
79
  firstUpdated(): void;
28
- formResetCallback(): void;
80
+ /**
81
+ * Form Integration
82
+ * --------------------------------------------------------------------------
83
+ */
29
84
  private _setValue;
30
85
  private _manageRequire;
31
86
  private _setValidityMessage;
32
87
  private _validate;
88
+ formResetCallback(): void;
89
+ /**
90
+ * Functions
91
+ * --------------------------------------------------------------------------
92
+ */
33
93
  checkValidity(): boolean;
34
94
  private _handleInvalid;
35
95
  private _manageLabelClick;
96
+ /**
97
+ * Event Handlers
98
+ * --------------------------------------------------------------------------
99
+ */
36
100
  private _emitChangeEvent;
37
101
  private _handleChange;
38
102
  private _handleFocus;
@@ -1,27 +1,72 @@
1
1
  import { LitElement } from "lit";
2
+ /**
3
+ * A container for grouping multiple `nys-checkbox` components as a single form control.
4
+ * Handles validation, required constraints, and submits comma-separated values.
5
+ *
6
+ * Use to allow users to select multiple options from a list. Apply `tile`, `size`, and `inverted` to the group
7
+ * and all children inherit these styles automatically.
8
+ *
9
+ * @summary Container for grouping checkboxes as a single form control.
10
+ * @element nys-checkboxgroup
11
+ *
12
+ * @slot - Default slot for `nys-checkbox` elements.
13
+ * @slot description - Custom HTML description content.
14
+ *
15
+ * @example Basic checkbox group
16
+ * ```html
17
+ * <nys-checkboxgroup label="Select landmarks" required>
18
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
19
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
20
+ * </nys-checkboxgroup>
21
+ * ```
22
+ */
2
23
  export declare class NysCheckboxgroup extends LitElement {
3
24
  static styles: import("lit").CSSResult;
25
+ /** Unique identifier. Auto-generated if not provided. */
4
26
  id: string;
27
+ /** Name for form submission. Set on group, not individual checkboxes. */
5
28
  name: string;
29
+ /** Requires at least one checkbox to be checked. */
6
30
  required: boolean;
31
+ /** Shows "Optional" flag. */
7
32
  optional: boolean;
33
+ /** Shows error message when true. */
8
34
  showError: boolean;
35
+ /** Error message text. Shown only when `showError` is true. */
9
36
  errorMessage: string;
37
+ /** Visible label text for the group. */
10
38
  label: string;
39
+ /** Helper text below label. Use slot for custom HTML. */
11
40
  description: string;
41
+ /** Renders all checkboxes as tiles with larger clickable area. */
12
42
  tile: boolean;
43
+ /** Tooltip text shown on hover/focus of info icon. */
13
44
  tooltip: string;
45
+ /** Adjusts colors for dark backgrounds. Applied to all children. */
14
46
  inverted: boolean;
47
+ /** Form `id` to associate with. Applied to all children. */
15
48
  form: string | null;
49
+ /**
50
+ * Checkbox size for all children: `sm` (24px) or `md` (32px, default).
51
+ * @default "md"
52
+ */
16
53
  size: "sm" | "md";
17
54
  private _slottedDescriptionText;
18
55
  private _internals;
56
+ /**
57
+ * Lifecycle methods
58
+ * --------------------------------------------------------------------------
59
+ */
19
60
  static formAssociated: boolean;
20
61
  constructor();
21
62
  connectedCallback(): void;
22
63
  disconnectedCallback(): void;
23
64
  firstUpdated(): void;
24
65
  updated(changedProperties: Map<string | symbol, unknown>): void;
66
+ /**
67
+ * Functions
68
+ * --------------------------------------------------------------------------
69
+ */
25
70
  private _setGroupExist;
26
71
  private _setupCheckboxRequired;
27
72
  private _manageRequire;
@@ -31,7 +76,12 @@ export declare class NysCheckboxgroup extends LitElement {
31
76
  private _updateCheckboxShowError;
32
77
  private _updateCheckboxForm;
33
78
  private _getSlotDescriptionForAria;
79
+ formResetCallback(): void;
34
80
  private _handleInvalid;
81
+ /**
82
+ * Event Handlers
83
+ * --------------------------------------------------------------------------
84
+ */
35
85
  private _handleCheckboxChange;
36
86
  render(): import("lit-html").TemplateResult<1>;
37
87
  }
@@ -0,0 +1 @@
1
+ export * from "./nys-datepicker";
@@ -0,0 +1,116 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * `<nys-datepicker>` is a form-associated, accessible date picker component.
4
+ * Optionally wraps a `<wc-datepicker>` for custom calendar UI.
5
+ *
6
+ * Events:
7
+ * @fires nys-blur - Dispatched when input or calendar loses focus
8
+ * @fires nys-input - Dispatched when user selects or types a valid date
9
+ *
10
+ * Notes:
11
+ * - Uses native date input on Safari or mobile devices (custom calendar removed for these scenarios)
12
+ */
13
+ export declare class NysDatepicker extends LitElement {
14
+ static styles: import("lit").CSSResult;
15
+ id: string;
16
+ name: string;
17
+ width: "md" | "lg" | "full";
18
+ hideTodayButton: boolean;
19
+ hideClearButton: boolean;
20
+ disabled: boolean;
21
+ required: boolean;
22
+ optional: boolean;
23
+ showError: boolean;
24
+ errorMessage: string;
25
+ form: string | null;
26
+ tooltip: string;
27
+ type: string;
28
+ label: string;
29
+ description: string;
30
+ startDate: string;
31
+ inverted: boolean;
32
+ value: string | Date | undefined;
33
+ private _hasUserInteracted;
34
+ private _internals;
35
+ /**
36
+ * Lifecycle methods
37
+ * --------------------------------------------------------------------------
38
+ */
39
+ static formAssociated: boolean;
40
+ constructor();
41
+ connectedCallback(): void;
42
+ disconnectedCallback(): void;
43
+ firstUpdated(): Promise<void>;
44
+ private _whenWcDatepickerReady;
45
+ /**
46
+ * Form Integration
47
+ * --------------------------------------------------------------------------
48
+ */
49
+ /**
50
+ * Form helper methods:
51
+ * - _setValue: set internal value and trigger validation
52
+ * - _manageRequire: handle required state
53
+ * - _validate: actively validate and show errors
54
+ * - checkValidity: passive boolean check without UI
55
+ * - _setValidityMessage: sync validation message with UI and internals
56
+ * - _handleInvalid: handle form invalid event and focus first invalid field
57
+ */
58
+ private _setValue;
59
+ private _manageRequire;
60
+ /**
61
+ * Actively validates the component:
62
+ * - Updates internal validity state
63
+ * - Updates UI (e.g. showError)
64
+ * - Called on blur/change or form submission
65
+ */
66
+ private _validate;
67
+ /**
68
+ * Passive check of validity:
69
+ * - Returns true/false
70
+ * - Does NOT update UI or show errors
71
+ * - Used in form submission checks
72
+ */
73
+ checkValidity(): boolean;
74
+ private _setValidityMessage;
75
+ private _handleInvalid;
76
+ /**
77
+ * Functions
78
+ * --------------------------------------------------------------------------
79
+ */
80
+ /**
81
+ * Replaces the default wc-datepicker month navigation buttons
82
+ * with NYS icon components for previous and next month.
83
+ */
84
+ private _replaceButtonSVG;
85
+ private _addMonthDropdownIcon;
86
+ private _parseLocalDate;
87
+ /**
88
+ * Event Handlers
89
+ * --------------------------------------------------------------------------
90
+ */
91
+ private _handleInputKeydown;
92
+ private _handleBlur;
93
+ private _onDocumentClick;
94
+ private _toggleDatepicker;
95
+ private _openDatepicker;
96
+ private _handleDateChange;
97
+ private _handleTodayClick;
98
+ private _handleClearClick;
99
+ private _handleInputChange;
100
+ private _getValidDateFromInput;
101
+ private _isSafari;
102
+ /**
103
+ * Determines whether the current device uses a coarse pointer.
104
+ * A coarse pointer usually means touch-based input where precise pointing
105
+ * is not expected, such as fingers on phones and most tablets.
106
+ *
107
+ * Note: This is not a guarantee of a mobile device.
108
+ * Some non-mobile devices may also report a coarse pointer,
109
+ * and some mobile devices may not.
110
+ *
111
+ * @returns `true` if the device reports a coarse pointer, otherwise `false`.
112
+ */
113
+ private _isMobile;
114
+ private _shouldUseNativeDatepicker;
115
+ render(): import("lit-html").TemplateResult<1>;
116
+ }
@@ -1,7 +1,29 @@
1
1
  import { LitElement } from "lit";
2
+ /**
3
+ * A horizontal rule for visual separation between content sections. Renders a semantic `<hr>` element.
4
+ *
5
+ * Use to separate distinct content areas within a page. Set `inverted` for use on dark backgrounds.
6
+ *
7
+ * @summary Horizontal divider for visual separation of content sections.
8
+ * @element nys-divider
9
+ *
10
+ * @example Basic divider
11
+ * ```html
12
+ * <p>Section one content</p>
13
+ * <nys-divider></nys-divider>
14
+ * <p>Section two content</p>
15
+ * ```
16
+ */
2
17
  export declare class NysDivider extends LitElement {
3
18
  static styles: import("lit").CSSResult;
19
+ /** Adjusts colors for dark backgrounds. */
4
20
  inverted: boolean;
5
21
  constructor();
22
+ connectedCallback(): void;
23
+ /**
24
+ * Functions
25
+ * --------------------------------------------------------------------------
26
+ */
27
+ private _generateUniqueId;
6
28
  render(): import("lit-html").TemplateResult<1>;
7
29
  }
@@ -1,10 +1,26 @@
1
1
  import { LitElement } from "lit";
2
+ /**
3
+ * **Internal component.** Displays error messages for form validation with icon and ARIA alert role.
4
+ *
5
+ * Used internally by form components. Not intended for direct use. Shows error icon and message
6
+ * when `showError` is true. Integrates with ElementInternals for native form validation messages.
7
+ *
8
+ * @summary Internal error message display with icon and ARIA alert support.
9
+ * @element nys-errormessage
10
+ */
2
11
  export declare class NysErrorMessage extends LitElement {
3
12
  static styles: import("lit").CSSResult;
13
+ /** Whether to display the error message. */
4
14
  showError: boolean;
15
+ /** Error text to display. Falls back to native validation message if available. */
5
16
  errorMessage: string;
17
+ /** Shows a divider line above the error message. */
6
18
  showDivider: boolean;
7
19
  private _internals;
20
+ /**
21
+ * Lifecycle methods
22
+ * --------------------------------------------------------------------------
23
+ */
8
24
  static formAssociated: boolean;
9
25
  constructor();
10
26
  render(): import("lit-html").TemplateResult<1>;