@ncino/web-components 15.5.0 → 15.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index3.js +1 -1
- package/dist/_virtual/index5.js +1 -1
- package/dist/components/guided-nav/gator/guided-nav-step/guided-nav-step.gator.js +3 -3
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +42 -35
- package/dist/components/input-rich-text/input-rich-text.slds.js +1 -1
- package/dist/components/list/gator/list/list.gator.js +1 -1
- package/dist/components/menu/base/gator/menu.gator.js +3 -3
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +10 -4
- package/dist/components/menu/menu-item/menu-item.js +1 -1
- package/dist/components/table/gator/table-cells/table-cell-icon-button.gator.js +11 -8
- package/dist/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/index.js +1 -1
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/dropdown/input-dropdown.gator.scss.js +1 -1
- package/dist/types/src/components/input/gator/dropdown/input-dropdown.gator.d.ts +56 -1
- package/dist/types/src/components/menu/base/gator/menu.gator.d.ts +4 -0
- package/dist/types/src/components/menu/menu-item/gator/menu-item.gator.d.ts +10 -1
- package/dist/types/src/components/menu/menu-item/menu-item.d.ts +14 -2
- package/dist/types/src/components/table/table-cell-config.d.ts +6 -0
- package/package.json +3 -3
- package/web-types.json +70 -21
|
@@ -1,12 +1,34 @@
|
|
|
1
|
-
import { nothing } from 'lit';
|
|
1
|
+
import { nothing, PropertyValues } from 'lit';
|
|
2
2
|
import { Ref } from 'lit/directives/ref.js';
|
|
3
3
|
import { NgcInputBase } from '../../base/input-base.gator.ts';
|
|
4
4
|
import { NgcList } from '../../../list/gator/list/list.gator.ts';
|
|
5
|
+
import { NgcListItem } from '../../../list/gator/list-item/list-item.gator.ts';
|
|
5
6
|
export type NgcDropdownType = {
|
|
6
7
|
label: string;
|
|
7
8
|
value: string | number;
|
|
9
|
+
/** Icon name; host stamps `<ngc-icon slot="start">` when rendering */
|
|
10
|
+
startIcon?: string;
|
|
11
|
+
/** Icon name; host stamps `<ngc-icon slot="end">` when rendering */
|
|
12
|
+
endIcon?: string;
|
|
13
|
+
/** Secondary text under the option label */
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
/** When true, option is non-interactive and skipped by keyboard navigation */
|
|
16
|
+
disabled?: boolean;
|
|
8
17
|
};
|
|
9
18
|
export type NgcDropdownDataType = 'country' | 'state' | 'naics' | 'phoneCodes';
|
|
19
|
+
/** Internal list-item value for the Select All row — avoid using this as an option value. */
|
|
20
|
+
export declare const NGC_DROPDOWN_SELECT_ALL_VALUE = "__ngc_select_all__";
|
|
21
|
+
/**
|
|
22
|
+
* Dropdown / combobox. Options come from either:
|
|
23
|
+
* - the `options` / `data-type` props (data-driven), or
|
|
24
|
+
* - light-DOM `ngc-list-item` children (slotted). If any list-item children are present,
|
|
25
|
+
* they win and `options` / `data-type` are ignored.
|
|
26
|
+
*
|
|
27
|
+
* Slotted items must be direct children of `ngc-input-dropdown` (not wrapped in other elements).
|
|
28
|
+
*
|
|
29
|
+
* @slot label - Optional custom label
|
|
30
|
+
* @slot - Optional `ngc-list-item` children used as the listbox options (avatars, custom start/end, etc.)
|
|
31
|
+
*/
|
|
10
32
|
export declare class NgcInputDropdown extends NgcInputBase {
|
|
11
33
|
static shadowRootOptions: {
|
|
12
34
|
delegatesFocus: boolean;
|
|
@@ -86,6 +108,11 @@ export declare class NgcInputDropdown extends NgcInputBase {
|
|
|
86
108
|
private _visibleChipCount;
|
|
87
109
|
private _showOverflowChip;
|
|
88
110
|
private _truncateChips;
|
|
111
|
+
/**
|
|
112
|
+
* True when light-DOM `ngc-list-item` children are projected into the listbox.
|
|
113
|
+
* When true, `options` / `data-type` are ignored (either/or).
|
|
114
|
+
*/
|
|
115
|
+
private _hasSlottedListItems;
|
|
89
116
|
private _resizeObserver;
|
|
90
117
|
private _calculationPending;
|
|
91
118
|
listboxRef: Ref<HTMLDivElement>;
|
|
@@ -94,6 +121,11 @@ export declare class NgcInputDropdown extends NgcInputBase {
|
|
|
94
121
|
listboxMessageRef: Ref<HTMLElement>;
|
|
95
122
|
protected multiselectValueDelimiter: string;
|
|
96
123
|
disconnectedCallback(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Detect direct light-DOM list items before paint so we don't briefly render
|
|
126
|
+
* `options` alongside slotted children while waiting for slotchange.
|
|
127
|
+
*/
|
|
128
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
|
97
129
|
render(): import('lit').TemplateResult<1>;
|
|
98
130
|
get controlClasses(): {
|
|
99
131
|
'gator-cursor-pointer': boolean;
|
|
@@ -140,6 +172,29 @@ export declare class NgcInputDropdown extends NgcInputBase {
|
|
|
140
172
|
private get autocompleteEditorValue();
|
|
141
173
|
get showPlaceholder(): boolean | "";
|
|
142
174
|
get listboxMarkup(): import('lit').TemplateResult<1>;
|
|
175
|
+
/**
|
|
176
|
+
* Direct light-DOM `ngc-list-item` children (default slot). Used when composing rich
|
|
177
|
+
* options (avatars, custom start/end) instead of the `options` array. Nested/wrapped
|
|
178
|
+
* list items are not supported — place them as direct children of the dropdown.
|
|
179
|
+
*/
|
|
180
|
+
get slottedListItems(): NgcListItem[];
|
|
181
|
+
private refreshSlottedMode;
|
|
182
|
+
private handleDefaultSlotChange;
|
|
183
|
+
/** Consistent value matching for selection / labels (strict equality). */
|
|
184
|
+
private isSameOptionValue;
|
|
185
|
+
/**
|
|
186
|
+
* Keeps slotted list items in sync with dropdown state (selection, faux-focus, autocomplete filter).
|
|
187
|
+
* Applies the same maxAutocompleteResults cap as the data-driven options path when autocomplete is on.
|
|
188
|
+
*/
|
|
189
|
+
private syncSlottedListItems;
|
|
190
|
+
private get visibleSlottedListItemCount();
|
|
191
|
+
/** Visible options in the listbox — data-driven or slotted. */
|
|
192
|
+
private get hasVisibleListOptions();
|
|
193
|
+
/**
|
|
194
|
+
* Values that Select All should consider: currently displayed/visible and not disabled.
|
|
195
|
+
* Matches data-driven `displayedOptions` filtering for autocomplete.
|
|
196
|
+
*/
|
|
197
|
+
private get selectableOptionValues();
|
|
143
198
|
get selectAllIcon(): "checkbox-selected" | "checkbox" | "checkbox-indeterminate";
|
|
144
199
|
get allSelected(): boolean;
|
|
145
200
|
selectAllOptions(): void;
|
|
@@ -17,9 +17,13 @@ export declare class NgcMenu extends NjcMenu {
|
|
|
17
17
|
private _hidePopover;
|
|
18
18
|
handleTriggerSlotChange(e: Event): void;
|
|
19
19
|
private focusMenuItem;
|
|
20
|
+
private isNavigableMenuItem;
|
|
21
|
+
private getNavigableMenuItems;
|
|
20
22
|
focusFirstMenuItem(): void;
|
|
21
23
|
focusTriggerButton(): void;
|
|
22
24
|
handleItemSlotChange(e: Event): void;
|
|
25
|
+
private handleMenuItemDisabledChange;
|
|
26
|
+
private syncMenuItemTabIndexes;
|
|
23
27
|
handleMenuKeydown(e: KeyboardEvent): void;
|
|
24
28
|
handleArrowDown(e: KeyboardEvent): void;
|
|
25
29
|
handleArrowUp(e: KeyboardEvent): void;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { NjcMenuItem } from '../menu-item.ts';
|
|
2
|
+
/**
|
|
3
|
+
* @slot start - Leading content (e.g. ngc-icon or ngc-avatar). Preferred over deprecated `start-icon`.
|
|
4
|
+
* @slot end - Trailing content (e.g. ngc-icon or badge). Preferred over deprecated `end-icon`.
|
|
5
|
+
*/
|
|
2
6
|
export declare class NgcMenuItem extends NjcMenuItem {
|
|
7
|
+
private _startIconWarned;
|
|
8
|
+
private _endIconWarned;
|
|
3
9
|
constructor();
|
|
4
10
|
connectedCallback(): void;
|
|
11
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
12
|
+
private syncAriaDisabled;
|
|
13
|
+
private warnDeprecatedIconProps;
|
|
5
14
|
render(): import('lit').TemplateResult<1>;
|
|
6
15
|
focus(options?: FocusOptions): void;
|
|
7
16
|
click(): void;
|
|
8
|
-
handleKeydown(e: KeyboardEvent)
|
|
17
|
+
handleKeydown: (e: KeyboardEvent) => void;
|
|
9
18
|
}
|
|
10
19
|
declare global {
|
|
11
20
|
interface HTMLElementTagNameMap {
|
|
@@ -6,12 +6,24 @@ export declare class NjcMenuItem extends LitElement {
|
|
|
6
6
|
*/
|
|
7
7
|
value: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Optional secondary text below the label (forwarded to ngc-list-item)
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
subtitle: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* When true, the menu item is non-interactive and styled as disabled
|
|
15
|
+
* @type {boolean}
|
|
16
|
+
*/
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use the `start` slot instead, e.g. `<ngc-icon slot="start" name="…">`.
|
|
20
|
+
* Declarative hosts (e.g. table `menuItems[].startIcon`) should stamp slot content when rendering.
|
|
10
21
|
* @type {string}
|
|
11
22
|
*/
|
|
12
23
|
startIcon: string;
|
|
13
24
|
/**
|
|
14
|
-
*
|
|
25
|
+
* @deprecated Use the `end` slot instead, e.g. `<ngc-icon slot="end" name="…">`.
|
|
26
|
+
* Declarative hosts (e.g. table `menuItems[].endIcon`) should stamp slot content when rendering.
|
|
15
27
|
* @type {string}
|
|
16
28
|
*/
|
|
17
29
|
endIcon: string;
|
|
@@ -37,6 +37,8 @@ export type TableIconButtonMenuItem = {
|
|
|
37
37
|
value?: string;
|
|
38
38
|
startIcon?: string;
|
|
39
39
|
endIcon?: string;
|
|
40
|
+
subtitle?: string;
|
|
41
|
+
disabled?: boolean;
|
|
40
42
|
};
|
|
41
43
|
export interface TableIconButtonCellConfig extends TableCellConfigBase {
|
|
42
44
|
iconName: string;
|
|
@@ -48,6 +50,10 @@ export interface TableIconButtonCellConfig extends TableCellConfigBase {
|
|
|
48
50
|
export type TableDropdownOption = {
|
|
49
51
|
label: string;
|
|
50
52
|
value: string | number;
|
|
53
|
+
startIcon?: string;
|
|
54
|
+
endIcon?: string;
|
|
55
|
+
subtitle?: string;
|
|
56
|
+
disabled?: boolean;
|
|
51
57
|
};
|
|
52
58
|
export interface TableInputDropdownCellConfig extends TableCellConfigBase {
|
|
53
59
|
options?: TableDropdownOption[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncino/web-components",
|
|
3
3
|
"author": "nCino",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.6.0",
|
|
5
5
|
"license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"vite-plugin-static-copy": "^3.3.0",
|
|
101
101
|
"vitest": "^4.1.10",
|
|
102
102
|
"yaml-eslint-parser": "^2.1.0",
|
|
103
|
-
"@ncino/styles": "15.
|
|
103
|
+
"@ncino/styles": "15.6.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@ncino/styles": "15.
|
|
106
|
+
"@ncino/styles": "15.6.0"
|
|
107
107
|
},
|
|
108
108
|
"bugs": {
|
|
109
109
|
"url": "https://github.com/ncino/force-sdk-web-components/issues"
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@ncino/web-components",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.5.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -2254,7 +2254,7 @@
|
|
|
2254
2254
|
},
|
|
2255
2255
|
{
|
|
2256
2256
|
"name": "ngc-menu-item",
|
|
2257
|
-
"description": "\n---\n\n\n### **Events:**\n - **menuitemclick**",
|
|
2257
|
+
"description": "\n---\n\n\n### **Events:**\n - **menuitemdisabledchange**\n- **menuitemclick**\n\n### **Slots:**\n - **start** - Leading content (e.g. ngc-icon or ngc-avatar). Preferred over deprecated `start-icon`.\n- **end** - Trailing content (e.g. ngc-icon or badge). Preferred over deprecated `end-icon`.",
|
|
2258
2258
|
"doc-url": "",
|
|
2259
2259
|
"attributes": [
|
|
2260
2260
|
{
|
|
@@ -2262,37 +2262,64 @@
|
|
|
2262
2262
|
"description": "The value and text displayed of the menu item",
|
|
2263
2263
|
"value": { "type": "string", "default": "''" }
|
|
2264
2264
|
},
|
|
2265
|
+
{
|
|
2266
|
+
"name": "subtitle",
|
|
2267
|
+
"description": "Optional secondary text below the label (forwarded to ngc-list-item)",
|
|
2268
|
+
"value": { "type": "string", "default": "null" }
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
"name": "disabled",
|
|
2272
|
+
"description": "When true, the menu item is non-interactive and styled as disabled",
|
|
2273
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2274
|
+
},
|
|
2265
2275
|
{
|
|
2266
2276
|
"name": "start-icon",
|
|
2267
|
-
"description": "An icon displayed before the value text",
|
|
2268
2277
|
"value": { "type": "string", "default": "''" }
|
|
2269
2278
|
},
|
|
2270
2279
|
{
|
|
2271
2280
|
"name": "end-icon",
|
|
2272
|
-
"description": "An icon displayed after the value text",
|
|
2273
2281
|
"value": { "type": "string", "default": "''" }
|
|
2274
2282
|
}
|
|
2275
2283
|
],
|
|
2276
|
-
"
|
|
2284
|
+
"slots": [
|
|
2285
|
+
{
|
|
2286
|
+
"name": "start",
|
|
2287
|
+
"description": "Leading content (e.g. ngc-icon or ngc-avatar). Preferred over deprecated `start-icon`."
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
"name": "end",
|
|
2291
|
+
"description": "Trailing content (e.g. ngc-icon or badge). Preferred over deprecated `end-icon`."
|
|
2292
|
+
}
|
|
2293
|
+
],
|
|
2294
|
+
"events": [
|
|
2295
|
+
{ "name": "menuitemdisabledchange", "type": "CustomEvent" },
|
|
2296
|
+
{ "name": "menuitemclick", "type": "CustomEvent" }
|
|
2297
|
+
],
|
|
2277
2298
|
"js": {
|
|
2278
2299
|
"properties": [
|
|
2300
|
+
{ "name": "handleKeydown" },
|
|
2279
2301
|
{
|
|
2280
2302
|
"name": "value",
|
|
2281
2303
|
"description": "The value and text displayed of the menu item",
|
|
2282
2304
|
"type": "string"
|
|
2283
2305
|
},
|
|
2284
2306
|
{
|
|
2285
|
-
"name": "
|
|
2286
|
-
"description": "
|
|
2307
|
+
"name": "subtitle",
|
|
2308
|
+
"description": "Optional secondary text below the label (forwarded to ngc-list-item)",
|
|
2287
2309
|
"type": "string"
|
|
2288
2310
|
},
|
|
2289
2311
|
{
|
|
2290
|
-
"name": "
|
|
2291
|
-
"description": "
|
|
2292
|
-
"type": "
|
|
2293
|
-
}
|
|
2312
|
+
"name": "disabled",
|
|
2313
|
+
"description": "When true, the menu item is non-interactive and styled as disabled",
|
|
2314
|
+
"type": "boolean"
|
|
2315
|
+
},
|
|
2316
|
+
{ "name": "startIcon", "type": "string" },
|
|
2317
|
+
{ "name": "endIcon", "type": "string" }
|
|
2294
2318
|
],
|
|
2295
|
-
"events": [
|
|
2319
|
+
"events": [
|
|
2320
|
+
{ "name": "menuitemdisabledchange", "type": "CustomEvent" },
|
|
2321
|
+
{ "name": "menuitemclick", "type": "CustomEvent" }
|
|
2322
|
+
]
|
|
2296
2323
|
}
|
|
2297
2324
|
},
|
|
2298
2325
|
{
|
|
@@ -4973,7 +5000,7 @@
|
|
|
4973
5000
|
},
|
|
4974
5001
|
{
|
|
4975
5002
|
"name": "ngc-input-dropdown",
|
|
4976
|
-
"description": "\n---\n\n\n### **Events:**\n - **input**\n- **change**",
|
|
5003
|
+
"description": "Dropdown / combobox. Options come from either:\n- the `options` / `data-type` props (data-driven), or\n- light-DOM `ngc-list-item` children (slotted). If any list-item children are present,\n they win and `options` / `data-type` are ignored.\n\nSlotted items must be direct children of `ngc-input-dropdown` (not wrapped in other elements).\n---\n\n\n### **Events:**\n - **input**\n- **change**\n\n### **Slots:**\n - **label** - Optional custom label\n- _default_ - Optional `ngc-list-item` children used as the listbox options (avatars, custom start/end, etc.)",
|
|
4977
5004
|
"doc-url": "",
|
|
4978
5005
|
"attributes": [
|
|
4979
5006
|
{
|
|
@@ -5108,6 +5135,13 @@
|
|
|
5108
5135
|
"value": { "type": "string | undefined", "default": "undefined" }
|
|
5109
5136
|
}
|
|
5110
5137
|
],
|
|
5138
|
+
"slots": [
|
|
5139
|
+
{ "name": "label", "description": "Optional custom label" },
|
|
5140
|
+
{
|
|
5141
|
+
"name": "",
|
|
5142
|
+
"description": "Optional `ngc-list-item` children used as the listbox options (avatars, custom start/end, etc.)"
|
|
5143
|
+
}
|
|
5144
|
+
],
|
|
5111
5145
|
"events": [
|
|
5112
5146
|
{ "name": "input", "type": "CustomEvent" },
|
|
5113
5147
|
{ "name": "change", "type": "CustomEvent" }
|
|
@@ -5152,6 +5186,11 @@
|
|
|
5152
5186
|
{ "name": "displayedValue" },
|
|
5153
5187
|
{ "name": "showPlaceholder" },
|
|
5154
5188
|
{ "name": "listboxMarkup" },
|
|
5189
|
+
{
|
|
5190
|
+
"name": "slottedListItems",
|
|
5191
|
+
"description": "Direct light-DOM `ngc-list-item` children (default slot). Used when composing rich\noptions (avatars, custom start/end) instead of the `options` array. Nested/wrapped\nlist items are not supported — place them as direct children of the dropdown.",
|
|
5192
|
+
"type": "NgcListItem[]"
|
|
5193
|
+
},
|
|
5155
5194
|
{ "name": "selectAllIcon" },
|
|
5156
5195
|
{ "name": "allSelected" },
|
|
5157
5196
|
{ "name": "listboxMessageMarkup" },
|
|
@@ -6347,14 +6386,22 @@
|
|
|
6347
6386
|
"description": "The value and text displayed of the menu item",
|
|
6348
6387
|
"value": { "type": "string", "default": "''" }
|
|
6349
6388
|
},
|
|
6389
|
+
{
|
|
6390
|
+
"name": "subtitle",
|
|
6391
|
+
"description": "Optional secondary text below the label (forwarded to ngc-list-item)",
|
|
6392
|
+
"value": { "type": "string", "default": "null" }
|
|
6393
|
+
},
|
|
6394
|
+
{
|
|
6395
|
+
"name": "disabled",
|
|
6396
|
+
"description": "When true, the menu item is non-interactive and styled as disabled",
|
|
6397
|
+
"value": { "type": "boolean", "default": "false" }
|
|
6398
|
+
},
|
|
6350
6399
|
{
|
|
6351
6400
|
"name": "start-icon",
|
|
6352
|
-
"description": "An icon displayed before the value text",
|
|
6353
6401
|
"value": { "type": "string", "default": "''" }
|
|
6354
6402
|
},
|
|
6355
6403
|
{
|
|
6356
6404
|
"name": "end-icon",
|
|
6357
|
-
"description": "An icon displayed after the value text",
|
|
6358
6405
|
"value": { "type": "string", "default": "''" }
|
|
6359
6406
|
}
|
|
6360
6407
|
],
|
|
@@ -6368,15 +6415,17 @@
|
|
|
6368
6415
|
"type": "string"
|
|
6369
6416
|
},
|
|
6370
6417
|
{
|
|
6371
|
-
"name": "
|
|
6372
|
-
"description": "
|
|
6418
|
+
"name": "subtitle",
|
|
6419
|
+
"description": "Optional secondary text below the label (forwarded to ngc-list-item)",
|
|
6373
6420
|
"type": "string"
|
|
6374
6421
|
},
|
|
6375
6422
|
{
|
|
6376
|
-
"name": "
|
|
6377
|
-
"description": "
|
|
6378
|
-
"type": "
|
|
6379
|
-
}
|
|
6423
|
+
"name": "disabled",
|
|
6424
|
+
"description": "When true, the menu item is non-interactive and styled as disabled",
|
|
6425
|
+
"type": "boolean"
|
|
6426
|
+
},
|
|
6427
|
+
{ "name": "startIcon", "type": "string" },
|
|
6428
|
+
{ "name": "endIcon", "type": "string" }
|
|
6380
6429
|
],
|
|
6381
6430
|
"events": [{ "name": "menuitemclick", "type": "CustomEvent" }]
|
|
6382
6431
|
}
|