@ncino/web-components 4.0.0-preview.8 → 4.0.0-preview.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as n}from"../../utils/components/testable-lit-element/testable-lit-element.js";var y=Object.defineProperty,r=(p,l,a,d)=>{for(var e=void 0,s=p.length-1,i;s>=0;s--)(i=p[s])&&(e=i(l,a,e)||e);return e&&y(l,a,e),e};class o extends n{constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.type=null,this.size=null}}r([t({type:Boolean})],o.prototype,"disabled");r([t({type:Boolean})],o.prototype,"readonly");r([t()],o.prototype,"type");r([t()],o.prototype,"size");export{o as NjcChip};
1
+ import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as d}from"../../utils/components/testable-lit-element/testable-lit-element.js";var n=Object.defineProperty,r=(p,i,l,y)=>{for(var e=void 0,s=p.length-1,a;s>=0;s--)(a=p[s])&&(e=a(i,l,e)||e);return e&&n(i,l,e),e};class o extends d{constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.type=null,this.size=null,this.hideBorder=!1}}r([t({type:Boolean})],o.prototype,"disabled");r([t({type:Boolean})],o.prototype,"readonly");r([t()],o.prototype,"type");r([t()],o.prototype,"size");r([t({type:Boolean,attribute:"hide-border"})],o.prototype,"hideBorder");export{o as NjcChip};
@@ -1,9 +1,17 @@
1
- import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as d}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import m from"../../../packages/web-components/src/components/chip/chip.tokens.scss.js";import u from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import g from"../../../packages/web-components/src/components/chip/gator/chip.gator.scss.js";import f from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import{NjcChip as c}from"../chip.js";import{classMap as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js";import{unsafeCSS as i}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var b=Object.getOwnPropertyDescriptor,k=(t,o,n,a)=>{for(var s=a>1?void 0:a?b(o,n):o,e=t.length-1,l;e>=0;e--)(l=t[e])&&(s=l(s)||s);return s};let r=class extends c{render(){return this.readonly?this.readonlyChipMarkup:this.chipMarkup}get chipMarkup(){return p`
2
- <button class=${h(this.classes)} ?disabled="${this.disabled}" @click=${this.handleClick}>
1
+ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as n}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import m from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import u from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import g from"../../../packages/web-components/src/components/chip/gator/chip.gator.scss.js";import{NjcChip as c}from"../chip.js";import{classMap as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js";import{unsafeCSS as r}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var b=Object.getOwnPropertyDescriptor,f=(t,o,d,a)=>{for(var s=a>1?void 0:a?b(o,d):o,i=t.length-1,l;i>=0;i--)(l=t[i])&&(s=l(s)||s);return s};let e=class extends c{render(){return this.readonly?this.readonlyChipMarkup:this.chipMarkup}get chipMarkup(){return p`
2
+ <button
3
+ class=${h(this.classes)}
4
+ ?disabled="${this.disabled}"
5
+ @click=${this.handleClick}
6
+ >
3
7
  <slot></slot>
4
8
  </button>
5
9
  `}get readonlyChipMarkup(){return p`
6
- <div class="gator-chip__read-only ${h(this.classes)}" aria-disabled="${this.disabled}" @click=${this.handleClick}>
10
+ <div
11
+ class="gator-chip__read-only ${h(this.classes)}"
12
+ aria-disabled="${this.disabled}"
13
+ @click=${this.handleClick}
14
+ >
7
15
  <slot></slot>
8
16
  </div>
9
- `}handleClick(t){t.stopPropagation(),t.preventDefault(),!(this.disabled||this.readonly)&&this.dispatchEvent(new Event("click",{bubbles:!0}))}get classes(){return{"gator-chip":!0,"gator-chip_small":this.size==="small","gator-chip_disabled":this.disabled,[`gator-chip_${this.type}`]:this.type!==null}}};r.shadowRootOptions={...c.shadowRootOptions,delegatesFocus:!0};r.styles=[i(m),i(g),i(f),i(u)];r=k([d("ngc-chip")],r);export{r as NgcChip};
17
+ `}handleClick(t){t.stopPropagation(),t.preventDefault(),!(this.disabled||this.readonly)&&this.dispatchEvent(new Event("click",{bubbles:!0}))}get classes(){return{"gator-chip":!0,"gator-chip_small":this.size==="small","gator-chip_disabled":this.disabled,"hide-border":this.hideBorder,[`gator-chip_${this.type}`]:this.type!==null}}};e.shadowRootOptions={...c.shadowRootOptions,delegatesFocus:!0};e.styles=[r(g),r(m),r(u)];e=f([n("ngc-chip")],e);export{e as NgcChip};
@@ -1 +1 @@
1
- const r='.gator-chip{background-color:var(--ngc-chip-background-color);border-radius:var(--ngc-chip-border-radius);display:inline-block;padding:var(--ngc-chip-padding);font-family:var(--text-family-body, "Open Sans"),sans-serif;font-size:var(--ngc-chip-font-size);line-height:var(--ngc-chip-line-height);border:var(--ngc-chip-border);color:var(--color-neutral-70);cursor:var(--ngc-chip-cursor, default);border:1px solid var(--color-stroke-tertiary, #E5E5E5)}button:hover{background-color:var(--ngc-chip-hover-background-color);cursor:var(--ngc-chip-cursor, pointer)}button:focus-visible{outline:none;box-shadow:var(--ngc-chip-focus-box-shadow)}button:active{background-color:var(--ngc-chip-active-background-color)}.gator-chip_disabled{cursor:not-allowed!important;color:var(--button-color-default-text-disabled, #6D6D6D);outline:1px solid transparent!important;background:var(--color-surface-disabled, #E5E5E5);border:1px solid transparent!important}.gator-chip_disabled:hover{background:var(--color-surface-disabled, #E5E5E5)!important}.gator-chip__read-only{cursor:var(--ngc-chip-cursor, default !important)}.gator-chip__read-only:active{background-color:var(--ngc-chip-background-color)}.gator-chip_error{background:var(--color-surface-error, #FAEBE7);border:1px solid var(--color-stroke-error-weak, #E99F88)}.gator-chip_error:hover:not(.gator-chip__read-only){background:var(--color-stroke-error-weak, #E99F88)}.gator-chip_warning{background:var(--color-surface-error, #FAEBE7);border:1px solid var(--color-stroke-warning, #F5B77F)}.gator-chip_warning:hover:not(.gator-chip__read-only){background:var(--color-stroke-warning, #F5B77F)}.gator-chip_success{background:var(--color-surface-success, #E9F7F0);border:1px solid var(--color-stroke-success, #90D4B4)}.gator-chip_success:hover:not(.gator-chip__read-only){background:var(--color-stroke-success, #90D4B4)}.gator-chip_info{border:1px solid var(--color-surface-brand-secondary, #C3CDD6);background:var(--color-surface-brand-hover, #E4ECF2)}.gator-chip_info:hover:not(.gator-chip__read-only){background:var(--color-surface-brand-secondary, #C3CDD6)}.gator-chip_small{font-size:var(--text-size-caption);line-height:var(--text-line-height-caption)}';export{r as default};
1
+ const r='.gator-chip{background-color:var(--ngc-chip-background-color, var(--color-background-primary));border-radius:var(--ngc-chip-border-radius, 3rem);display:inline-block;padding:var(--ngc-chip-padding, .25rem .75rem);font-family:var(--text-family-body, "Open Sans"),sans-serif;font-size:var(--ngc-chip-font-size, .9375rem);line-height:var(--ngc-chip-line-height);border:var(--ngc-chip-border, 1px solid var(--color-stroke-tertiary, #E5E5E5));color:var(--color-neutral-70);cursor:var(--ngc-chip-cursor, default)}button:hover{background-color:var(--ngc-chip-hover-background-color, var(--color-neutral-20));cursor:var(--ngc-chip-cursor, pointer)}button:focus-visible{outline:none;box-shadow:var(--ngc-chip-focus-box-shadow, var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-2, 2px) var(--color-focus-gap, #FFF), var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-4, 4px) var(--color-focus-border, #11395B))}button:active{background-color:var(--ngc-chip-active-background-color)}.gator-chip_disabled{cursor:not-allowed!important;color:var(--button-color-default-text-disabled, #6D6D6D);outline:1px solid transparent!important;background:var(--color-surface-disabled, #E5E5E5);border:1px solid transparent!important}.gator-chip_disabled:hover{background:var(--color-surface-disabled, #E5E5E5)!important}.gator-chip__read-only{cursor:var(--ngc-chip-cursor, default !important)}.gator-chip__read-only:active{background-color:var(--ngc-chip-background-color, var(--color-background-primary))}.gator-chip_error{background:var(--color-surface-error, #FAEBE7);border:1px solid var(--color-stroke-error-weak, #E99F88)}.gator-chip_error:hover:not(.gator-chip__read-only){background:var(--color-stroke-error-weak, #E99F88)}.gator-chip_warning{background:var(--color-surface-error, #FAEBE7);border:1px solid var(--color-stroke-warning, #F5B77F)}.gator-chip_warning:hover:not(.gator-chip__read-only){background:var(--color-stroke-warning, #F5B77F)}.gator-chip_success{background:var(--color-surface-success, #E9F7F0);border:1px solid var(--color-stroke-success, #90D4B4)}.gator-chip_success:hover:not(.gator-chip__read-only){background:var(--color-stroke-success, #90D4B4)}.gator-chip_info{border:1px solid var(--color-surface-brand-secondary, #C3CDD6);background:var(--color-surface-brand-hover, #E4ECF2)}.gator-chip_info:hover:not(.gator-chip__read-only){background:var(--color-surface-brand-secondary, #C3CDD6)}.gator-chip_small{font-size:var(--text-size-caption);line-height:var(--text-line-height-caption)}.hide-border{border:none}';export{r as default};
@@ -22,4 +22,9 @@ export declare class NjcChip extends TestableLitElement {
22
22
  @type {NJC_CHIP_SIZES}
23
23
  **/
24
24
  size: NJC_CHIP_SIZES;
25
+ /**
26
+ @property hideBorder - If true, the chip's border will be removed.
27
+ @type {boolean}
28
+ **/
29
+ hideBorder: boolean;
25
30
  }
@@ -19,6 +19,7 @@ export declare class NgcChip extends NjcChip {
19
19
  'gator-chip': boolean;
20
20
  'gator-chip_small': boolean;
21
21
  'gator-chip_disabled': boolean;
22
+ 'hide-border': boolean;
22
23
  };
23
24
  }
24
25
  declare global {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "4.0.0-preview.8",
4
+ "version": "4.0.0-preview.9",
5
5
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"
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": "4.0.0-preview.7",
4
+ "version": "4.0.0-preview.8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -124,6 +124,10 @@
124
124
  "name": "size",
125
125
  "value": { "type": " | 'small'", "default": "null" }
126
126
  },
127
+ {
128
+ "name": "hide-border",
129
+ "value": { "type": "boolean", "default": "false" }
130
+ },
127
131
  {
128
132
  "name": "data-testid",
129
133
  "value": { "type": "string | undefined", "default": "undefined" }
@@ -145,6 +149,7 @@
145
149
  "type": " | 'success' | 'warning' | 'error' | 'info'"
146
150
  },
147
151
  { "name": "size", "type": " | 'small'" },
152
+ { "name": "hideBorder", "type": "boolean" },
148
153
  { "name": "dataTestid", "type": "string | undefined" },
149
154
  { "name": "labelDataTestid" },
150
155
  { "name": "helpTextDataTestid" },
@@ -1 +0,0 @@
1
- const o=":host{--ngc-chip-disabled-color: var(--color-neutral-50);--ngc-chip-color: var(--color-neutral-70);--ngc-chip-background-color: var(--color-background-primary);--ngc-chip-hover-background-color: var(--color-neutral-20);--ngc-chip-border-radius: 3rem;--ngc-chip-focus-box-shadow: var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-2, 2px) var(--color-focus-gap, #FFF), var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-4, 4px) var(--color-focus-border, #11395B);--ngc-chip-padding: .25rem .75rem;--ngc-chip-font-size: .9375rem;--ngc-chip-border: none}";export{o as default};