@nysds/components 1.19.2 → 1.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/custom-elements.json +1184 -195
  2. package/dist/.vscode/vscode.html-custom-data.json +10 -10
  3. package/dist/custom-elements.json +1184 -195
  4. package/dist/nys-icon.library-ChLRj3i-.js +696 -0
  5. package/dist/nys-icon.library-ChLRj3i-.js.map +1 -0
  6. package/dist/nysds.es.js +1811 -1724
  7. package/dist/nysds.es.js.map +1 -1
  8. package/dist/nysds.js +750 -147
  9. package/dist/nysds.js.map +1 -1
  10. package/dist/packages/nys-accordion/src/nys-accordion.d.ts +35 -6
  11. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +8 -3
  12. package/dist/packages/nys-alert/src/nys-alert.d.ts +81 -4
  13. package/dist/packages/nys-avatar/src/nys-avatar.d.ts +44 -4
  14. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +70 -3
  15. package/dist/packages/nys-badge/src/nys-badge.d.ts +54 -4
  16. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +75 -7
  17. package/dist/packages/nys-button/src/nys-button.d.ts +62 -7
  18. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +5 -7
  19. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +78 -1
  20. package/dist/packages/nys-combobox/src/nys-combobox.d.ts +164 -0
  21. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +64 -8
  22. package/dist/packages/nys-divider/src/nys-divider.d.ts +24 -1
  23. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +19 -12
  24. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +0 -10
  25. package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +10 -0
  26. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +94 -4
  27. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +50 -7
  28. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +65 -4
  29. package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -4
  30. package/dist/packages/nys-icon/src/icon-library-registry.d.ts +33 -16
  31. package/dist/packages/nys-icon/src/index.d.ts +2 -2
  32. package/dist/packages/nys-icon/src/nys-icon.d.ts +83 -6
  33. package/dist/packages/nys-label/src/nys-label.d.ts +32 -2
  34. package/dist/packages/nys-modal/src/nys-modal.d.ts +130 -5
  35. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +11 -1
  36. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +4 -3
  37. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +74 -1
  38. package/dist/packages/nys-select/src/nys-option.d.ts +0 -8
  39. package/dist/packages/nys-select/src/nys-select.d.ts +141 -10
  40. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +2 -2
  41. package/dist/packages/nys-stepper/src/nys-step.d.ts +0 -13
  42. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +119 -69
  43. package/dist/packages/nys-tab/src/nys-tab.d.ts +17 -8
  44. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +77 -15
  45. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +0 -17
  46. package/dist/packages/nys-table/src/nys-table.d.ts +71 -0
  47. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +52 -5
  48. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +63 -9
  49. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +40 -4
  50. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +38 -6
  51. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +10 -2
  52. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +54 -8
  53. package/dist/packages/nys-video/src/nys-video.d.ts +65 -3
  54. package/package.json +11 -5
  55. package/packages/react/NysBreadcrumbs.d.ts +1 -1
  56. package/packages/react/NysButton.d.ts +2 -1
  57. package/packages/react/NysDropdownMenu.d.ts +1 -1
  58. package/packages/react/NysFileinput.d.ts +24 -2
  59. package/packages/react/NysFileinput.js +8 -1
  60. package/packages/react/NysGlobalHeader.d.ts +6 -1
  61. package/packages/react/NysLabel.d.ts +4 -1
  62. package/packages/react/NysTextarea.d.ts +1 -1
  63. package/packages/react/NysUnavHeader.d.ts +11 -1
  64. package/packages/react/NysUnavHeader.js +15 -1
  65. package/packages/react/nysds-jsx.d.ts +47 -10
@@ -12,13 +12,87 @@ import { LitElement } from "lit";
12
12
  * @slot - Default slot for `nys-checkbox` elements.
13
13
  * @slot description - Custom HTML description content.
14
14
  *
15
- * @example Basic checkbox group
15
+ * @example Basic
16
16
  * ```html
17
17
  * <nys-checkboxgroup label="Select landmarks" required>
18
18
  * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
19
19
  * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
20
20
  * </nys-checkboxgroup>
21
21
  * ```
22
+ *
23
+ * @example Tile
24
+ * ```html
25
+ * <nys-checkboxgroup label="Select landmarks" tile>
26
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
27
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
28
+ * </nys-checkboxgroup>
29
+ * ```
30
+ *
31
+ * @example Required
32
+ * ```html
33
+ * <nys-checkboxgroup label="Select landmarks" required>
34
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
35
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
36
+ * </nys-checkboxgroup>
37
+ * ```
38
+ *
39
+ * @example Optional
40
+ * ```html
41
+ * <nys-checkboxgroup label="Select landmarks" optional>
42
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
43
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
44
+ * </nys-checkboxgroup>
45
+ * ```
46
+ *
47
+ * @example Disabled
48
+ * ```html
49
+ * <nys-checkboxgroup label="Select landmarks">
50
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks" disabled></nys-checkbox>
51
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls" disabled></nys-checkbox>
52
+ * </nys-checkboxgroup>
53
+ * ```
54
+ *
55
+ * @example Size Small
56
+ * ```html
57
+ * <nys-checkboxgroup label="Select landmarks" size="sm">
58
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
59
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
60
+ * </nys-checkboxgroup>
61
+ * ```
62
+ *
63
+ * @example Other Option
64
+ * ```html
65
+ * <nys-checkboxgroup label="Select landmarks">
66
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
67
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
68
+ * <nys-checkbox name="landmarks" value="" label="Other" other></nys-checkbox>
69
+ * </nys-checkboxgroup>
70
+ * ```
71
+ *
72
+ * @example Error Message
73
+ * ```html
74
+ * <nys-checkboxgroup label="Select landmarks" showError errorMessage="Please select at least one landmark">
75
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
76
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
77
+ * </nys-checkboxgroup>
78
+ * ```
79
+ *
80
+ * @example Description
81
+ * ```html
82
+ * <nys-checkboxgroup label="Select landmarks" description="Choose wisely, you can only pick one.">
83
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
84
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
85
+ * </nys-checkboxgroup>
86
+ * ```
87
+ *
88
+ * @example Description Slot
89
+ * ```html
90
+ * <nys-checkboxgroup label="Select landmarks">
91
+ * <div slot="description">Your <strong>ABSOLUTE</strong> favorite one.</div>
92
+ * <nys-checkbox name="landmarks" value="adirondacks" label="Adirondacks"></nys-checkbox>
93
+ * <nys-checkbox name="landmarks" value="niagara" label="Niagara Falls"></nys-checkbox>
94
+ * </nys-checkboxgroup>
95
+ * ```
22
96
  */
23
97
  export declare class NysCheckboxgroup extends LitElement {
24
98
  static styles: import("lit").CSSResult;
@@ -60,6 +134,7 @@ export declare class NysCheckboxgroup extends LitElement {
60
134
  private _slottedDescriptionText;
61
135
  private _hasOtherError;
62
136
  private _otherErrorCheckbox;
137
+ private _hasSharedNames;
63
138
  private _internals;
64
139
  /**
65
140
  * Lifecycle methods
@@ -96,5 +171,7 @@ export declare class NysCheckboxgroup extends LitElement {
96
171
  private _handleChildErrorClear;
97
172
  private _handleOtherInput;
98
173
  private _checkOtherInputs;
174
+ /** Drupal-like naming support **/
175
+ private _checkSharedNames;
99
176
  render(): import("lit-html").TemplateResult<1>;
100
177
  }
@@ -19,6 +19,170 @@ import { LitElement } from "lit";
19
19
  * @fires nys-input - Fired on input change. Detail: `{ id, value }`.
20
20
  * @fires nys-focus - Fired when combobox receives focus.
21
21
  * @fires nys-blur - Fired when combobox loses focus.
22
+ *
23
+ *
24
+ * @example Basic
25
+ * ```html
26
+ * <nys-combobox label="Select your favorite fruit">
27
+ * <option value="apple">Apple</option>
28
+ * <option value="banana">Banana</option>
29
+ * <option value="cherry">Cherry</option>
30
+ * <option value="date">Date</option>
31
+ * <option value="elderberry">Elderberry</option>
32
+ * <option value="fig">Fig</option>
33
+ * <option value="grape">Grape</option>
34
+ * <option value="honeydew">Honeydew</option>
35
+ * <option value="kiwi">Kiwi</option>
36
+ * <option value="lemon">Lemon</option>
37
+ * <option value="mango">Mango</option>
38
+ * <option value="nectarine">Nectarine</option>
39
+ * <option value="orange">Orange</option>
40
+ * <option value="papaya">Papaya</option>
41
+ * <option value="quince">Quince</option>
42
+ * <option value="raspberry">Raspberry</option>
43
+ * <option value="strawberry">Strawberry</option>
44
+ * <option value="tangerine">Tangerine</option>
45
+ * <option value="watermelon">Watermelon</option>
46
+ * </nys-combobox>
47
+ * ```
48
+ *
49
+ * @example Default Value
50
+ * ```html
51
+ * <nys-combobox label="Select your favorite fruit" value="mango">
52
+ * <option value="apple">Apple</option>
53
+ * <option value="banana">Banana</option>
54
+ * <option value="mango" selected>Mango</option>
55
+ * <option value="orange">Orange</option>
56
+ * <option value="strawberry">Strawberry</option>
57
+ * </nys-combobox>
58
+ * ```
59
+ *
60
+ * @example Option Group
61
+ * ```html
62
+ * <nys-combobox label="Select a fruit" description="Fruits organized by category">
63
+ * <optgroup label="Citrus">
64
+ * <option value="lemon">Lemon</option>
65
+ * <option value="lime">Lime</option>
66
+ * <option value="orange">Orange</option>
67
+ * <option value="grapefruit">Grapefruit</option>
68
+ * <option value="tangerine">Tangerine</option>
69
+ * </optgroup>
70
+ * <optgroup label="Berries">
71
+ * <option value="strawberry">Strawberry</option>
72
+ * <option value="blueberry">Blueberry</option>
73
+ * <option value="raspberry">Raspberry</option>
74
+ * <option value="blackberry">Blackberry</option>
75
+ * <option value="cranberry">Cranberry</option>
76
+ * </optgroup>
77
+ * <optgroup label="Tropical">
78
+ * <option value="mango">Mango</option>
79
+ * <option value="pineapple">Pineapple</option>
80
+ * <option value="papaya">Papaya</option>
81
+ * <option value="coconut">Coconut</option>
82
+ * <option value="passionfruit">Passionfruit</option>
83
+ * </optgroup>
84
+ * <optgroup label="Stone Fruits">
85
+ * <option value="peach">Peach</option>
86
+ * <option value="plum">Plum</option>
87
+ * <option value="cherry">Cherry</option>
88
+ * <option value="apricot">Apricot</option>
89
+ * <option value="nectarine">Nectarine</option>
90
+ * </optgroup>
91
+ * </nys-combobox>
92
+ * ```
93
+ *
94
+ * @example Disabled
95
+ * ```html
96
+ * <nys-combobox label="Select your favorite fruit" disabled>
97
+ * <option value="apple">Apple</option>
98
+ * <option value="banana">Banana</option>
99
+ * <option value="orange">Orange</option>
100
+ * <option value="strawberry">Strawberry</option>
101
+ * </nys-combobox>
102
+ * ```
103
+ *
104
+ * @example Required
105
+ * ```html
106
+ * <nys-combobox label="Select your favorite fruit" required>
107
+ * <option value="apple">Apple</option>
108
+ * <option value="banana">Banana</option>
109
+ * <option value="orange">Orange</option>
110
+ * <option value="strawberry">Strawberry</option>
111
+ * </nys-combobox>
112
+ * ```
113
+ *
114
+ * @example Optional
115
+ * ```html
116
+ * <nys-combobox label="Select your favorite fruit" optional>
117
+ * <option value="apple">Apple</option>
118
+ * <option value="banana">Banana</option>
119
+ * <option value="orange">Orange</option>
120
+ * <option value="strawberry">Strawberry</option>
121
+ * </nys-combobox>
122
+ * ```
123
+ *
124
+ * @example Width Medium
125
+ * ```html
126
+ * <nys-combobox label="Select your favorite fruit" width="md">
127
+ * <option value="apple">Apple</option>
128
+ * <option value="banana">Banana</option>
129
+ * <option value="orange">Orange</option>
130
+ * <option value="strawberry">Strawberry</option>
131
+ * </nys-combobox>
132
+ * ```
133
+ *
134
+ * @example Width Large
135
+ * ```html
136
+ * <nys-combobox label="Select your favorite fruit" width="lg">
137
+ * <option value="apple">Apple</option>
138
+ * <option value="banana">Banana</option>
139
+ * <option value="orange">Orange</option>
140
+ * <option value="strawberry">Strawberry</option>
141
+ * </nys-combobox>
142
+ * ```
143
+ *
144
+ * @example Description
145
+ * ```html
146
+ * <nys-combobox label="Select your favorite fruit" description="Choose from the list of available fruits.">
147
+ * <option value="apple">Apple</option>
148
+ * <option value="banana">Banana</option>
149
+ * <option value="orange">Orange</option>
150
+ * <option value="strawberry">Strawberry</option>
151
+ * </nys-combobox>
152
+ * ```d
153
+ *
154
+ * @example Description Slot
155
+ * ```html
156
+ * <nys-combobox label="Select your favorite fruit">
157
+ * <label slot="description">This is a description slot</label>
158
+ * <option value="apple">Apple</option>
159
+ * <option value="banana">Banana</option>
160
+ * <option value="orange">Orange</option>
161
+ * <option value="strawberry">Strawberry</option>
162
+ * </nys-combobox>
163
+ * ```
164
+ *
165
+ * @example Error Message
166
+ * ```html
167
+ * <nys-combobox label="Select your favorite fruit" showError errorMessage="Please select a fruit">
168
+ * <option value="apple">Apple</option>
169
+ * <option value="banana">Banana</option>
170
+ * <option value="orange">Orange</option>
171
+ * <option value="strawberry">Strawberry</option>
172
+ * </nys-combobox>
173
+ * ```
174
+ *
175
+ * @example Disabled Options
176
+ * ```html
177
+ * <nys-combobox label="Select your favorite fruit" description="Some fruits are out of season">
178
+ * <option value="apple">Apple</option>
179
+ * <option value="banana">Banana</option>
180
+ * <option value="cherry" disabled>Cherry (Out of season)</option>
181
+ * <option value="mango">Mango</option>
182
+ * <option value="strawberry" disabled>Strawberry (Out of season)</option>
183
+ * <option value="orange">Orange</option>
184
+ * </nys-combobox>
185
+ * ```
22
186
  */
23
187
  export declare class NysCombobox extends LitElement {
24
188
  static styles: import("lit").CSSResult;
@@ -9,12 +9,17 @@ import { LitElement } from "lit";
9
9
  * @fires nys-blur - Fired when input or calendar loses focus. Triggers validation.
10
10
  * @fires nys-input - Fired on date selection. Detail: `{id, value}`.
11
11
  *
12
- * @example Basic date picker
12
+ * @example Basic
13
13
  * ```html
14
- * <nys-datepicker label="Birth Date" required></nys-datepicker>
14
+ * <nys-datepicker
15
+ * id="my-datepicker"
16
+ * name="my-datepicker"
17
+ * label="Schedule an appointment"
18
+ * description="Enter in MM/DD/YYYY format"
19
+ * ></nys-datepicker>
15
20
  * ```
16
21
  *
17
- * @example With width and description
22
+ * @example Width Large
18
23
  * ```html
19
24
  * <nys-datepicker
20
25
  * label="Event Date"
@@ -23,24 +28,75 @@ import { LitElement } from "lit";
23
28
  * </nys-datepicker>
24
29
  * ```
25
30
  *
26
- * @example Hide buttons, set start date
31
+ * @example Width Full
32
+ * ```html
33
+ * <nys-datepicker
34
+ * label="Event Date"
35
+ * description="Select the date of your event"
36
+ * width="full">
37
+ * </nys-datepicker>
38
+ * ```
39
+ *
40
+ * @example Custom Start Date
27
41
  * ```html
28
42
  * <nys-datepicker
29
43
  * label="Appointment"
30
- * hideTodayButton
31
- * hideClearButton
32
44
  * startDate="2024-01-01">
33
45
  * </nys-datepicker>
34
46
  * ```
35
47
  *
36
- * @example With validation error message
48
+ * @example Without Buttons
49
+ * ```html
50
+ * <nys-datepicker
51
+ * label="Appointment"
52
+ * hideTodayButton
53
+ * hideClearButton>
54
+ * </nys-datepicker>
55
+ * ```
56
+ *
57
+ * @example Error Message
37
58
  * ```html
38
59
  * <nys-datepicker
39
60
  * label="Start Date"
40
- * required
61
+ * showError
41
62
  * errorMessage="Please select a valid start date">
42
63
  * </nys-datepicker>
43
64
  * ```
65
+ *
66
+ * @example Date Range
67
+ * ```html
68
+ * <nys-datepicker
69
+ * label="Select a date"
70
+ * description="Only dates within April 4/5/2026 - 7/15/2026 are selectable"
71
+ * minDate="2026-04-05"
72
+ * maxDate="2026-07-15">
73
+ * </nys-datepicker>
74
+ * ```
75
+ *
76
+ * @example Disabled
77
+ * ```html
78
+ * <nys-datepicker
79
+ * label="Disabled datepicker"
80
+ * disabled
81
+ * value="2025-01-15">
82
+ * </nys-datepicker>
83
+ * ```
84
+ *
85
+ * @example Required
86
+ * ```html
87
+ * <nys-datepicker
88
+ * label="Start Date"
89
+ * required>
90
+ * </nys-datepicker>
91
+ * ```
92
+ *
93
+ * @example Optional
94
+ * ```html
95
+ * <nys-datepicker
96
+ * label="Start Date"
97
+ * optional>
98
+ * </nys-datepicker>
99
+ * ```
44
100
  */
45
101
  export declare class NysDatepicker extends LitElement {
46
102
  static styles: import("lit").CSSResult;
@@ -7,12 +7,35 @@ import { LitElement } from "lit";
7
7
  * @summary Horizontal divider for visual separation of content sections.
8
8
  * @element nys-divider
9
9
  *
10
- * @example Basic divider
10
+ * @example Basic
11
11
  * ```html
12
12
  * <p>Section one content</p>
13
13
  * <nys-divider></nys-divider>
14
14
  * <p>Section two content</p>
15
15
  * ```
16
+ *
17
+ * @example Inverted
18
+ * ```html
19
+ * <p>Section one content</p>
20
+ * <nys-divider inverted></nys-divider>
21
+ * <p>Section two content</p>
22
+ * ```
23
+ *
24
+ * @render Inverted
25
+ * ```html
26
+ * <div style="display: flex; flex-direction: column; background-color: var(--nys-color-ink, #1b1b1b); color: var(--nys-color-ink-reverse, #fff); padding: var(--nys-space-200, 16px);">
27
+ * <p>Section one content</p>
28
+ * <nys-divider inverted></nys-divider>
29
+ * <p>Section two content</p>
30
+ * </div>
31
+ * ```
32
+ *
33
+ * @example Subtle
34
+ * ```html
35
+ * <p>Section one content</p>
36
+ * <nys-divider subtle></nys-divider>
37
+ * <p>Section two content</p>
38
+ * ```
16
39
  */
17
40
  export declare class NysDivider extends LitElement {
18
41
  static styles: import("lit").CSSResult;
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import "./nys-dropdownmenuitem";
3
+ type Position = "bottom-start" | "bottom-end" | "top-start" | "top-end";
3
4
  /**
4
5
  * Dropdown menus enable users to select an action from a list of options.
5
6
  * They’re commonly used to save space by grouping related actions, or to provide actions in a confined space.
@@ -7,25 +8,31 @@ import "./nys-dropdownmenuitem";
7
8
  * @summary Action menu with auto-positioning, keyboard support, and screen reader integration.
8
9
  * @element nys-dropdownmenu
9
10
  *
10
- * @example Basic dropdown
11
+ * @example Basic
11
12
  * ```html
12
- * <button id="my-trigger">Actions</button>
13
- * <nys-dropdownmenu for="my-trigger">
14
- * <nys-dropdownmenuitem label="Edit" link="/edit"></nys-dropdownmenuitem>
15
- * <nys-dropdownmenuitem label="Delete" link="/delete"></nys-dropdownmenuitem>
13
+ * <nys-button id="my-trigger-id" label="Open Menu"></nys-button>
14
+ * <nys-dropdownmenu id="my-dropdownmenu" for="my-trigger-id">
15
+ * <nys-dropdownmenuitem label="Profile" href="/profile"></nys-dropdownmenuitem>
16
+ * <nys-dropdownmenuitem label="Repositories & Github Pages" href="/repos"></nys-dropdownmenuitem>
17
+ * <nys-dropdownmenuitem label="Organizations" href="/organizations"></nys-dropdownmenuitem>
18
+ * <nys-dropdownmenuitem label="Sign out" href="/logout"></nys-dropdownmenuitem>
16
19
  * </nys-dropdownmenu>
20
+ * </div>
17
21
  * ```
18
22
  *
19
- * @example Positioned dropdown
23
+ * @render Basic
20
24
  * ```html
21
- * <button id="settings-btn">Settings</button>
22
- * <nys-dropdownmenu for="settings-btn" position="top-start">
23
- * <nys-dropdownmenuitem label="Profile" link="/profile"></nys-dropdownmenuitem>
24
- * <nys-dropdownmenuitem label="Logout" link="/logout"></nys-dropdownmenuitem>
25
- * </nys-dropdownmenu>
25
+ * <div style="margin: 200px; display: flex; justify-content: center; align-items: center;">
26
+ * <nys-button id="my-trigger-id" label="Open Menu"></nys-button>
27
+ * <nys-dropdownmenu id="my-dropdownmenu" for="my-trigger-id">
28
+ * <nys-dropdownmenuitem label="Profile" href="/profile"></nys-dropdownmenuitem>
29
+ * <nys-dropdownmenuitem label="Repositories & Github Pages" href="/repos"></nys-dropdownmenuitem>
30
+ * <nys-dropdownmenuitem label="Organizations" href="/organizations"></nys-dropdownmenuitem>
31
+ * <nys-dropdownmenuitem label="Sign out" href="/logout"></nys-dropdownmenuitem>
32
+ * </nys-dropdownmenu>
33
+ * </div>
26
34
  * ```
27
35
  */
28
- type Position = "bottom-start" | "bottom-end" | "top-start" | "top-end";
29
36
  export declare class NysDropdownMenu extends LitElement {
30
37
  static styles: import("lit").CSSResult;
31
38
  for: string;
@@ -7,16 +7,6 @@ import { LitElement } from "lit";
7
7
  *
8
8
  * @summary Dropdown item to display label and provide href link.
9
9
  * @element nys-dropdownmenuitem
10
- *
11
- * @example Basic item
12
- * ```html
13
- * <nys-dropdownmenuitem label="Edit" link="/edit"></nys-dropdownmenuitem>
14
- * ```
15
- *
16
- * @example Disabled item
17
- * ```html
18
- * <nys-dropdownmenuitem label="Delete" link="/delete" disabled></nys-dropdownmenuitem>
19
- * ```
20
10
  */
21
11
  export declare class NysDropdownMenuItem extends LitElement {
22
12
  static styles: import("lit").CSSResult;
@@ -7,6 +7,16 @@ import { LitElement } from "lit";
7
7
  *
8
8
  * @summary Internal error message display with icon and ARIA alert support.
9
9
  * @element nys-errormessage
10
+ *
11
+ * @example Basic
12
+ * ```html
13
+ * <nys-errormessage showError errorMessage="This is an error message"></nys-errormessage>
14
+ * ```
15
+ *
16
+ * @example Divider
17
+ * ```html
18
+ * <nys-errormessage showError errorMessage="This is an error message" showDivider></nys-errormessage>
19
+ * ```
10
20
  */
11
21
  export declare class NysErrorMessage extends LitElement {
12
22
  static styles: import("lit").CSSResult;
@@ -6,21 +6,88 @@ import "./nys-fileitem";
6
6
  *
7
7
  * Use for document uploads, image uploads, or any file submission. Enable `dropzone` for drag-and-drop UI.
8
8
  *
9
+ * Read or write the current selection via the `files` (`File[]`) and `value` (`File | null`)
10
+ * properties — useful for rehydrating state or binding from a framework form model.
11
+ * Setting them is silent (does not emit `nys-change`).
12
+ *
9
13
  * @summary File input with drag-and-drop, validation, and progress tracking.
10
14
  * @element nys-fileinput
11
15
  *
12
16
  * @slot description - Custom HTML description content.
13
17
  *
14
18
  * @fires nys-change - Fired when files are added or removed. Detail: `{id, files}`.
19
+ * @fires nys-blur - Fired when focus leaves the component. Triggers validation.
20
+ *
21
+ * @example Basic
22
+ * ```html
23
+ * <nys-fileinput
24
+ * label="Upload a file"
25
+ * ></nys-fileinput>
26
+ * ```
27
+ *
28
+ * @example Dropzone
29
+ * ```html
30
+ * <nys-fileinput
31
+ * label="Upload a file"
32
+ * dropzone
33
+ * ></nys-fileinput>
34
+ * ```
35
+ *
36
+ * @example Multiple
37
+ * ```html
38
+ * <nys-fileinput
39
+ * label="Upload a file"
40
+ * multiple
41
+ * ></nys-fileinput>
42
+ * ```
43
+ *
44
+ * @example Accepted Filetypes
45
+ * ```html
46
+ * <nys-fileinput
47
+ * label="Upload a file"
48
+ * description="Accepted file types: .jpg, .png, .pdf"
49
+ * accept="image/png, image/jpeg, .pdf"
50
+ * ></nys-fileinput>
51
+ * ```
52
+ *
53
+ * @example Width Large
54
+ * ```html
55
+ * <nys-fileinput
56
+ * label="Upload a file"
57
+ * width="lg"
58
+ * ></nys-fileinput>
59
+ * ```
60
+ *
61
+ * @example Width Large Dropzone
62
+ * ```html
63
+ * <nys-fileinput
64
+ * label="Upload a file"
65
+ * width="lg"
66
+ * dropzone
67
+ * ></nys-fileinput>
68
+ * ```
69
+ *
70
+ * @example Disabled
71
+ * ```html
72
+ * <nys-fileinput
73
+ * label="Upload a file"
74
+ * disabled
75
+ * ></nys-fileinput>
76
+ * ```
15
77
  *
16
- * @example Single file upload
78
+ * @example Description
17
79
  * ```html
18
- * <nys-fileinput label="Upload document" accept=".pdf,.doc" required></nys-fileinput>
80
+ * <nys-fileinput
81
+ * label="Upload a file"
82
+ * description="Make sure the file is not blurry and readable"
83
+ * ></nys-fileinput>
19
84
  * ```
20
85
  *
21
- * @example Multiple files with dropzone
86
+ * @example Description Slot
22
87
  * ```html
23
- * <nys-fileinput label="Upload images" accept="image/*" multiple dropzone></nys-fileinput>
88
+ * <nys-fileinput label="Upload a file">
89
+ * <div slot="description">Make sure the file is <strong>legible</strong></div>
90
+ * </nys-fileinput>
24
91
  * ```
25
92
  */
26
93
  export declare class NysFileinput extends LitElement {
@@ -69,6 +136,28 @@ export declare class NysFileinput extends LitElement {
69
136
  /** Adjusts colors for dark backgrounds. */
70
137
  inverted: boolean;
71
138
  private _selectedFiles;
139
+ /**
140
+ * The currently selected files. Read to get the current selection; set to
141
+ * replace it (e.g. rehydrating state after navigation, or binding from a
142
+ * framework form model). Property-only — a `File[]` cannot round-trip through
143
+ * an HTML attribute. Setting this is silent (does not emit `nys-change`),
144
+ * matching native input behavior and avoiding feedback loops in two-way bindings.
145
+ */
146
+ get files(): File[];
147
+ set files(incoming: File[]);
148
+ /**
149
+ * Single-file convenience accessor (parity with `nys-textinput`'s `value`).
150
+ * Reads the first selected file (or `null`); setting replaces the selection.
151
+ */
152
+ get value(): File | null;
153
+ set value(file: File | null);
154
+ /**
155
+ * Programmatically set the selection and await async validation/processing.
156
+ * Same as assigning `files`, but resolves once every file has finished its
157
+ * magic-byte validation and read — use when you need to read `checkValidity()`
158
+ * or the settled selection immediately after.
159
+ */
160
+ setFiles(incoming: File[]): Promise<void>;
72
161
  private _dragActive;
73
162
  private get _isDropDisabled();
74
163
  private get _buttonAriaLabel();
@@ -101,6 +190,7 @@ export declare class NysFileinput extends LitElement {
101
190
  */
102
191
  private _saveSelectedFiles;
103
192
  private _processFile;
193
+ private _handleBlur;
104
194
  private _dispatchChangeEvent;
105
195
  private _openFileDialog;
106
196
  private _handlePostFileSelectionFocus;