@ncino/web-components 3.4.0-preview.9 → 3.4.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/components/list/gator/list/list.gator.js +2 -2
- package/dist/packages/web-components/src/components/input/input.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/input.gator.tokens.scss.js +1 -1
- package/dist/types/components/list/gator/list/list.gator.d.ts +8 -8
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +2 -2
- package/web-types.json +3 -3
- /package/dist/node_modules/.pnpm/{@vitest_browser@3.1.2_msw@2.7.3_@types_node@22.15.3_typescript@5.8.3__playwright@1.52.0_e155597a4b63c99e959de38fbc15993a → @vitest_browser@3.1.2_msw@2.7.3_@types_node@22.15.3_typescript@5.8.3__playwright@1.52.0_6047d87698e2ef918623a78ce4dcf499}/node_modules/@vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_724caf7e58fde488d6596f4a62438909 → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_7bb50e293f6aaa75c6ba46005f3908a0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_724caf7e58fde488d6596f4a62438909 → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_7bb50e293f6aaa75c6ba46005f3908a0}/node_modules/vitest/dist/chunks/date.CDOsz-HY.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_724caf7e58fde488d6596f4a62438909 → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_7bb50e293f6aaa75c6ba46005f3908a0}/node_modules/vitest/dist/chunks/utils.CgTj3MsC.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_724caf7e58fde488d6596f4a62438909 → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_7bb50e293f6aaa75c6ba46005f3908a0}/node_modules/vitest/dist/chunks/vi.ClIskdbk.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as
|
|
1
|
+
import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as c}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as u}from"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as f}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as m}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import"../list-item/list-item.gator.js";import{NgcDivider as I}from"../../../divider/gator/divider.gator.js";import{KEY_CONSTANTS as h}from"../../../../consts/key-constants.js";import{NgcComponent as p}from"../../../../utils/components/ngc-component.js";var y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,l=(t,e,s,r)=>{for(var o=r>1?void 0:r?b(e,s):e,n=t.length-1,d;n>=0;n--)(d=t[n])&&(o=(r?d(e,s,o):d(o))||o);return r&&o&&y(e,s,o),o};let i=class extends p{constructor(){super(...arguments),this.id="",this.density="default",this.selectable=!1,this.multiselect=!1,this.ariaLabelledBy="",this.ariaLabelledByElements=void 0,this.ariaDescribedByElements=void 0,this.title="",this.fauxFocus=!1,this.hideCheckmarks=!1,this._selectedListItem=null,this._activeIndex=0,this._totalListItems=0,this._listItemsWithEventListeners=new Set}updated(t){var e,s;if(t.has("density")&&this.assignChildNodeDensity(),(this.selectable||this.multiselect)&&this.updateSlottedItems(),t.has("hideCheckmarks")&&this.assignChildNodeHideCheckmark(),t.has("ariaLabelledByElements")&&this.ariaLabelledByElements){const r=(e=this.shadowRoot)==null?void 0:e.getElementById(this.id);r&&(r.ariaLabelledByElements=this.ariaLabelledByElements)}if(t.has("ariaDescribedByElements")&&this.ariaDescribedByElements){const r=(s=this.shadowRoot)==null?void 0:s.getElementById(this.id);r&&(r.ariaDescribedByElements=this.ariaDescribedByElements)}t.has("_activeIndex")&&t.get("_activeIndex")!==this._activeIndex&&this._setFauxFocusToCurrentItem()}render(){return c`
|
|
2
2
|
<div
|
|
3
3
|
class="gator-list"
|
|
4
4
|
title="${this.title}"
|
|
@@ -10,4 +10,4 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
|
|
|
10
10
|
>
|
|
11
11
|
<slot @slotchange="${this.handleSlotChanged}"></slot>
|
|
12
12
|
</div>
|
|
13
|
-
`}get listRole(){return this.selectable?"listbox":"list"}handleSlotChanged(
|
|
13
|
+
`}get listRole(){return this.selectable?"listbox":"list"}handleSlotChanged(){this.updateSlottedItems()}updateSlottedItems(){if(this.listItems){this._totalListItems=0;for(const[t,e]of this.listItems.entries())this._totalListItems++,this.selectable?(e.selectable=!0,e.role="option"):e.role="listitem",this.multiselect&&(e.multiselect=!0),this._listItemsWithEventListeners.has(e)||(e.addEventListener("selected",s=>{this._selectedListItem=s.detail.id,this._activeIndex=t,this.multiselect?(e.selected=!e.selected,e.multiselect=!0):(this.unselectAllListItems(),e.selected=!0)}),this._listItemsWithEventListeners.add(e));this.setCurrentListItem()}}setFalseFocusToValue(t){if(this.listItems){for(const[e,s]of this.listItems.entries())if(s.value==t)return this._activeIndex=e,s}}setCurrentListItem(){if(!this.listItems)return;let t;this._activeIndex===-1&&(this._activeIndex=this._totalListItems-1),this._activeIndex>=this._totalListItems&&(this._activeIndex=0);for(const[e,s]of this.listItems.entries())s.currentListItem=e===this._activeIndex,s.currentListItem&&(t=s);return t}_setFauxFocusToCurrentItem(){var t;(t=this.listItems)==null||t.forEach(e=>{e.currentListItem?this.fauxFocus?e.falseFocus():e.focus():this.fauxFocus&&e.removeFalseFocus()})}falseFocusFirstItem(){return this._activeIndex=0,this.setCurrentListItem()}falseFocusPreviousItem(){return this._activeIndex--,this.setCurrentListItem()}falseFocusNextItem(){return this._activeIndex++,this.setCurrentListItem()}selectFalseFocusedItem(){if(this.listItems)for(const t of this.listItems)t.falseFocusing&&t.selectItem()}unselectAllListItems(){if(this.listItems)for(const t of this.listItems)t.selected=!1}handleKeyUp(t){switch(t.key){case h.UP:this._activeIndex--,this.setCurrentListItem(),t.preventDefault();break;case h.DOWN:this._activeIndex++,this.setCurrentListItem(),t.preventDefault();break}}get nodes(){var t,e;return(e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"))==null?void 0:e.assignedElements()}get listItems(){var t,e;return(e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"))==null?void 0:e.assignedElements().filter(s=>s.nodeName==="NGC-LIST-ITEM")}assignChildNodeDensity(){if(this.nodes)for(const t of this.nodes)(t.nodeName=="NGC-LIST-ITEM"||t.nodeName=="NGC-DIVIDER")&&((t||I).density=this.density)}assignChildNodeHideCheckmark(){if(this.listItems)for(const t of this.listItems)t.hideCheckmark=this.hideCheckmarks}};i.shadowRootOptions={...u.shadowRootOptions,mode:"open"};l([a()],i.prototype,"id",2);l([a()],i.prototype,"density",2);l([a({type:Boolean})],i.prototype,"selectable",2);l([a({type:Boolean})],i.prototype,"multiselect",2);l([a({attribute:"aria-labelledby"})],i.prototype,"ariaLabelledBy",2);l([a({type:Array,attribute:"aria-labelled-by-elements"})],i.prototype,"ariaLabelledByElements",2);l([a({type:Array,attribute:"aria-described-by-elements"})],i.prototype,"ariaDescribedByElements",2);l([a({attribute:"aria-describedby"})],i.prototype,"ariaDescribedby",2);l([a()],i.prototype,"title",2);l([a({type:Boolean,attribute:"faux-focus"})],i.prototype,"fauxFocus",2);l([a({type:Boolean,attribute:"hide-checkmarks"})],i.prototype,"hideCheckmarks",2);l([m()],i.prototype,"_selectedListItem",2);l([m()],i.prototype,"_activeIndex",2);i=l([f("ngc-list")],i);export{i as NgcList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r='input,textarea{border:none}input:focus,textarea:focus{outline:none}input[type=time]::-webkit-calendar-picker-indicator{background:none;display:none}.gator-form-element-control:focus-within:not(.gator-disabled){outline:2px solid var(--ngc-input-outline-color-focused, var(--color-stroke-brand, #11395B))!important}.gator-form-element{display:block;margin-bottom:1rem;max-width:var(--ngc-input-max-width, 200px)}.gator-form-element-control{padding:var(--ngc-input-padding);display:flex;flex-direction:column}.gator-input,.gator-faux-input{display:flex;width:100%;height:100%;font-size:var(--ngc-input-font-size, 1.0625rem);font-family:var(--text-family-sans-serif, "Open Sans", sans-serif);padding:0;line-height:24px}.gator-form-element-control{margin:.5rem 0;border:1px solid var(--ngc-input-border-color, var(--color-stroke-primary, #6D6D6D));border-radius:var(--ngc-input-border-radius, 2px);flex:1}.gator-form-element-control:hover:not(.gator-disabled){border:1px solid var(--ngc-input-border-color-hovered, var(--color-stroke-interactive, #0E304D));outline:none}.gator-has-error{border-color:var(--ngc-input-error-border, var(--color-stroke-error, #AA330E))!important}.gator-disabled{background:var(--color-surface-secondary, #F7F7F7);border:none;cursor:not-allowed}.gator-disabled input,.gator-disabled textarea{background-color:transparent;cursor:not-allowed}.gator-form-element-control-icon-right{display:flex;align-items:center}.gator-input-container{display:flex;align-items:center;position:relative;width:100%}.gator-input-start,.gator-input-end{display:flex;align-items:center;font-family:var(--text-family-sans-serif),sans-serif;font-size:var(--text-size-body-1)}.gator-input-start{margin-right:.5rem}.gator-cursor-pointer{cursor:pointer}';export{r as default};
|
|
1
|
+
const r='input,textarea{border:none;background-color:var(--ngc-input-background-color, var(--color-surface-primary, #FFFFFF))}input:focus,textarea:focus{outline:none}input[type=time]::-webkit-calendar-picker-indicator{background:none;display:none}.gator-form-element-control:focus-within:not(.gator-disabled){outline:2px solid var(--ngc-input-outline-color-focused, var(--color-stroke-brand, #11395B))!important}.gator-form-element{display:block;margin-bottom:1rem;max-width:var(--ngc-input-max-width, 200px)}.gator-form-element-control{padding:var(--ngc-input-padding);display:flex;flex-direction:column}.gator-input,.gator-faux-input{display:flex;width:100%;height:100%;font-size:var(--ngc-input-font-size, 1.0625rem);font-family:var(--text-family-sans-serif, "Open Sans", sans-serif);padding:0;line-height:24px}.gator-form-element-control{margin:.5rem 0;border:1px solid var(--ngc-input-border-color, var(--color-stroke-primary, #6D6D6D));border-radius:var(--ngc-input-border-radius, 2px);flex:1;background-color:var(--ngc-input-background-color, var(--color-surface-primary, #FFFFFF))}.gator-form-element-control:hover:not(.gator-disabled){border:1px solid var(--ngc-input-border-color-hovered, var(--color-stroke-interactive, #0E304D));outline:none}.gator-has-error{border-color:var(--ngc-input-error-border, var(--color-stroke-error, #AA330E))!important}.gator-disabled{background:var(--color-surface-secondary, #F7F7F7);border:none;cursor:not-allowed}.gator-disabled input,.gator-disabled textarea{background-color:transparent;cursor:not-allowed}.gator-form-element-control-icon-right{display:flex;align-items:center}.gator-input-container{display:flex;align-items:center;position:relative;width:100%}.gator-input-start,.gator-input-end{display:flex;align-items:center;font-family:var(--text-family-sans-serif),sans-serif;font-size:var(--text-size-body-1)}.gator-input-start{margin-right:.5rem}.gator-cursor-pointer{cursor:pointer}';export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=":root,:host{--ngc-input-error-border: var(--color-stroke-error, #AA330E);--ngc-input-border-color: var(--color-stroke-primary, #6D6D6D);--ngc-input-border-color-hovered: var(--color-stroke-interactive, #0E304D);--ngc-input-outline-color-focused: var(--color-stroke-brand, #11395B);--ngc-input-min-width: 200px;--ngc-input-padding: var(--spacing-3, .75rem) var(--spacing-4, 1rem);--ngc-input-border-radius: var(--radius-sm, .125rem);--ngc-input-max-width: 100%;--ngc-input-search-max-width: 15.75rem;--ngc-input-font-size: 17px}";export{r as default};
|
|
1
|
+
const r=":root,:host{--ngc-input-error-border: var(--color-stroke-error, #AA330E);--ngc-input-border-color: var(--color-stroke-primary, #6D6D6D);--ngc-input-border-color-hovered: var(--color-stroke-interactive, #0E304D);--ngc-input-outline-color-focused: var(--color-stroke-brand, #11395B);--ngc-input-background-color: var(--color-surface-primary, #FFFFFF);--ngc-input-min-width: 200px;--ngc-input-padding: var(--spacing-3, .75rem) var(--spacing-4, 1rem);--ngc-input-border-radius: var(--radius-sm, .125rem);--ngc-input-max-width: 100%;--ngc-input-search-max-width: 15.75rem;--ngc-input-font-size: 17px}";export{r as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NgcListItem } from '../list-item/list-item.gator.ts';
|
|
1
2
|
import { NgcComponent } from '../../../../utils/components/ngc-component.ts';
|
|
2
3
|
export type LIST_ITEM_DENSITY = 'default' | 'compact' | 'comfortable';
|
|
3
4
|
export declare class NgcList extends NgcComponent {
|
|
@@ -49,20 +50,18 @@ export declare class NgcList extends NgcComponent {
|
|
|
49
50
|
*/
|
|
50
51
|
fauxFocus: boolean;
|
|
51
52
|
hideCheckmarks: boolean;
|
|
52
|
-
_selectedListItem: null;
|
|
53
|
+
_selectedListItem: string | null;
|
|
53
54
|
_activeIndex: number;
|
|
54
55
|
_totalListItems: number;
|
|
55
|
-
|
|
56
|
+
private _listItemsWithEventListeners;
|
|
56
57
|
updated(changedProperties: Map<string, unknown>): void;
|
|
57
58
|
render(): import('lit').TemplateResult<1>;
|
|
58
59
|
get listRole(): string;
|
|
59
|
-
handleSlotChanged(
|
|
60
|
-
updateSlottedItems(
|
|
61
|
-
setFalseFocusToValue(value: string | number | File | File[] | Date):
|
|
60
|
+
handleSlotChanged(): void;
|
|
61
|
+
updateSlottedItems(): void;
|
|
62
|
+
setFalseFocusToValue(value: string | number | File | File[] | Date): NgcListItem | undefined;
|
|
62
63
|
setCurrentListItem(): Element | undefined;
|
|
63
|
-
|
|
64
|
-
private _setFauxFocus;
|
|
65
|
-
private _removeFauxFocus;
|
|
64
|
+
_setFauxFocusToCurrentItem(): void;
|
|
66
65
|
falseFocusFirstItem(): Element | undefined;
|
|
67
66
|
falseFocusPreviousItem(): Element | undefined;
|
|
68
67
|
falseFocusNextItem(): Element | undefined;
|
|
@@ -70,6 +69,7 @@ export declare class NgcList extends NgcComponent {
|
|
|
70
69
|
unselectAllListItems(): void;
|
|
71
70
|
handleKeyUp(e: KeyboardEvent): void;
|
|
72
71
|
get nodes(): Element[] | undefined;
|
|
72
|
+
get listItems(): NgcListItem[] | undefined;
|
|
73
73
|
assignChildNodeDensity(): void;
|
|
74
74
|
assignChildNodeHideCheckmark(): void;
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{page as n}from"../node_modules/.pnpm/@vitest_browser@3.1.2_msw@2.7.3_@types_node@22.15.3_typescript@5.8.3__playwright@1.52.
|
|
1
|
+
import{page as n}from"../node_modules/.pnpm/@vitest_browser@3.1.2_msw@2.7.3_@types_node@22.15.3_typescript@5.8.3__playwright@1.52.0_6047d87698e2ef918623a78ce4dcf499/node_modules/@vitest/browser/context.js";import u from"../_virtual/axe.js";import{a as o}from"../node_modules/.pnpm/vitest@3.1.2_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.2_@vitest_ui@3_7bb50e293f6aaa75c6ba46005f3908a0/node_modules/vitest/dist/chunks/vi.ClIskdbk.js";const h="Supercalifragilisticexpialidocious".repeat(10);async function c(t){return(await u.run(t)).violations}async function x(t){const e=await c(t);o(e).toHaveLength(0)}function w(){return n.viewport(320,256)}function g(t){let e;if(t.scrollWidth!==0?e=t:t.shadowRoot?e=t.shadowRoot.firstElementChild:e=t.firstElementChild,e){const r=e.scrollWidth>e.clientWidth;return o(r).toBe(!1)}return o(!0).toBe(!1)}function m(t,e,r){var l;const s={attribute:e};let i=t.querySelector(":focus-visible");if(i||(i=(l=t.shadowRoot)==null?void 0:l.querySelector(":focus-visible")),i){const a=getComputedStyle(i).getPropertyValue(s.attribute);return o(a).toContain(r)}return o(!0).toBe(!1)}export{m as expectComponentFocusStyle,g as expectComponentNotToHaveHorizontalScrollbar,x as expectNoAxeViolations,w as resizeWindowForReflowTest,c as runAxeAndGetViolations,h as superLongStringForReflowTest};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncino/web-components",
|
|
3
3
|
"author": "nCino",
|
|
4
|
-
"version": "3.4.0
|
|
4
|
+
"version": "3.4.0",
|
|
5
5
|
"license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"playwright": "1.52.0",
|
|
117
117
|
"postcss": "^8.5.3",
|
|
118
118
|
"rimraf": "^6.0.1",
|
|
119
|
-
"sass": "1.
|
|
119
|
+
"sass": "1.87.0",
|
|
120
120
|
"storybook": "^8.6.12",
|
|
121
121
|
"storybook-dark-mode": "^4.0.2",
|
|
122
122
|
"storybook-design-token": "^3.2.0",
|
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": "3.4.0-preview.
|
|
4
|
+
"version": "3.4.0-preview.11",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -3272,12 +3272,12 @@
|
|
|
3272
3272
|
{ "name": "title", "type": "string" },
|
|
3273
3273
|
{ "name": "fauxFocus", "type": "boolean" },
|
|
3274
3274
|
{ "name": "hideCheckmarks", "type": "boolean" },
|
|
3275
|
-
{ "name": "_selectedListItem", "type": "null" },
|
|
3275
|
+
{ "name": "_selectedListItem", "type": "string | null" },
|
|
3276
3276
|
{ "name": "_activeIndex", "type": "number" },
|
|
3277
3277
|
{ "name": "_totalListItems", "type": "number" },
|
|
3278
|
-
{ "name": "_hasIndexChanged", "type": "boolean" },
|
|
3279
3278
|
{ "name": "listRole", "type": "string" },
|
|
3280
3279
|
{ "name": "nodes" },
|
|
3280
|
+
{ "name": "listItems", "type": "NgcListItem[] | undefined" },
|
|
3281
3281
|
{
|
|
3282
3282
|
"name": "shouldApplyAttributeDeletion",
|
|
3283
3283
|
"description": "Determines whether attribute deletion should be applied.\nThis is controlled by the `delegatesARIA` property.",
|