@ncino/web-components 8.0.0-preview.2 → 8.0.0-preview.4

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,6 +1,6 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as b}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as m}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import l from"../../../../packages/web-components/src/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.scss.js";import h from"../../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import d from"../../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import g from"../../../../packages/web-components/src/components/breadcrumbs/gator/breadcrumbs.gator.tokens.scss.js";import{createRef as y,ref as v}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/ref.js";import{TestableLitElement as f}from"../../../../utils/components/testable-lit-element/testable-lit-element.js";import{unsafeCSS as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var O=Object.defineProperty,R=Object.getOwnPropertyDescriptor,t=(c,s,p,o)=>{for(var e=o>1?void 0:o?R(s,p):s,i=c.length-1,u;i>=0;i--)(u=c[i])&&(e=(o?u(s,p,e):u(e))||e);return o&&e&&O(s,p,e),e};let r=class extends f{constructor(){super(...arguments),this.current=!1,this.first=!1,this.label="",this.href="",this.crumbRef=y()}updated(){this.current&&this.crumbRef.value?.setAttribute("aria-current","page")}render(){return b`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as f}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as b}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import l from"../../../../packages/web-components/src/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.scss.js";import h from"../../../../packages/web-components/src/tokens/primitive-new.tokens.scss.js";import d from"../../../../packages/web-components/src/tokens/semantic-new.tokens.scss.js";import{createRef as g,ref as y}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/ref.js";import{TestableLitElement as n}from"../../../../utils/components/testable-lit-element/testable-lit-element.js";import{unsafeCSS as u}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,O=Object.getOwnPropertyDescriptor,e=(c,s,m,a)=>{for(var t=a>1?void 0:a?O(s,m):s,p=c.length-1,i;p>=0;p--)(i=c[p])&&(t=(a?i(s,m,t):i(t))||t);return a&&t&&v(s,m,t),t};let r=class extends n{constructor(){super(...arguments),this.current=!1,this.first=!1,this.label="",this.href="",this.crumbRef=g()}updated(){this.current&&this.crumbRef.value?.setAttribute("aria-current","page")}render(){return f`
2
2
  ${this.breadcrumbSeparator}
3
- <a ${v(this.crumbRef)} class="${this.breadcrumbClass}" .href="${this.href}">
3
+ <a ${y(this.crumbRef)} class="${this.breadcrumbClass}" .href="${this.href}">
4
4
  ${this.label}
5
5
  </a>
6
- `}get breadcrumbClass(){return this.current?"gator-breadcrumb gator-breadcrumb-current":"gator-breadcrumb"}get breadcrumbSeparator(){return this.first?null:b`<span class="gator-breadcrumb-separator">/</span>`}};r.shadowRootOptions={...f.shadowRootOptions,delegatesFocus:!0};r.styles=[a(l),a(h),a(d),a(g)];t([m({type:Boolean})],r.prototype,"current",2);t([m({type:Boolean})],r.prototype,"first",2);t([m()],r.prototype,"label",2);t([m()],r.prototype,"href",2);r=t([n("ngc-breadcrumb")],r);export{r as NgcBreadcrumb};
6
+ `}get breadcrumbClass(){return this.current?"gator-breadcrumb gator-breadcrumb-current":"gator-breadcrumb"}get breadcrumbSeparator(){return this.first?null:f`<span class="gator-breadcrumb-separator">/</span>`}};r.shadowRootOptions={...n.shadowRootOptions,delegatesFocus:!0};r.styles=[u(l),u(h),u(d)];e([o({type:Boolean})],r.prototype,"current",2);e([o({type:Boolean})],r.prototype,"first",2);e([o()],r.prototype,"label",2);e([o()],r.prototype,"href",2);r=e([b("ngc-breadcrumb")],r);export{r as NgcBreadcrumb};
@@ -1,4 +1,4 @@
1
- import{NjcButtonCard as p}from"../button-card.js";import"../../chip/gator/chip.gator.js";import"../../card/gator/base/card.gator.js";import"../../card/gator/header/card-header.gator.js";import"../../card/gator/content/card-content.gator.js";import"../../card/gator/footer/card-footer.gator.js";import"../../text-detail/gator/text-detail.gator.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as l}from"../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import u from"../../../packages/web-components/src/components/button-card/gator/button-card.gator.scss.js";import b from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import g from"../../../packages/web-components/src/components/button-card/button-card.tokens.scss.js";import f from"../../../packages/web-components/src/components/card/card.tokens.scss.js";import{customElement as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{ifDefined as n}from"../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js";import{KEY_CONSTANTS as c}from"../../../consts/key-constants.js";import{unsafeCSS as i}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var v=Object.getOwnPropertyDescriptor,C=(t,a,h,o)=>{for(var e=o>1?void 0:o?v(a,h):a,r=t.length-1,d;r>=0;r--)(d=t[r])&&(e=d(e)||e);return e};let s=class extends p{render(){return l`
1
+ import{NjcButtonCard as m}from"../button-card.js";import"../../chip/gator/chip.gator.js";import"../../card/gator/base/card.gator.js";import"../../card/gator/header/card-header.gator.js";import"../../card/gator/content/card-content.gator.js";import"../../card/gator/footer/card-footer.gator.js";import"../../text-detail/gator/text-detail.gator.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as c}from"../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as u}from"../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import b from"../../../packages/web-components/src/components/button-card/gator/button-card.gator.scss.js";import f from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import g from"../../../packages/web-components/src/components/button-card/button-card.tokens.scss.js";import v from"../../../packages/web-components/src/components/card/card.tokens.scss.js";import{customElement as y}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{ifDefined as n}from"../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js";import{KEY_CONSTANTS as p}from"../../../consts/key-constants.js";import{unsafeCSS as a}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var C=Object.defineProperty,T=Object.getOwnPropertyDescriptor,h=(t,i,o,r)=>{for(var e=r>1?void 0:r?T(i,o):i,d=t.length-1,l;d>=0;d--)(l=t[d])&&(e=(r?l(i,o,e):l(e))||e);return r&&e&&C(i,o,e),e};let s=class extends m{constructor(){super(...arguments),this.chipType=null}render(){return c`
2
2
  <ngc-card
3
3
  tabindex="${this.disabled?"-1":"0"}"
4
4
  role="button"
@@ -24,12 +24,13 @@ import{NjcButtonCard as p}from"../button-card.js";import"../../chip/gator/chip.g
24
24
  </div>
25
25
  </slot>
26
26
  </ngc-card>
27
- `}get cardLabelMarkup(){return this.chipLabel?l`
27
+ `}get cardLabelMarkup(){return this.chipLabel?c`
28
28
  <ngc-chip
29
29
  ?disabled="${this.disabled}"
30
30
  class="gator-button-card-chip-label"
31
31
  data-testid=${n(this.dataTestid)}-chip
32
+ type="${n(this.chipType||void 0)}"
32
33
  readonly
33
34
  >
34
35
  ${this.chipLabel}
35
- </ngc-chip>`:null}get disabledClass(){return this.disabled?"gator-button-card_disabled":""}handleClick(t){t.preventDefault(),t.stopImmediatePropagation(),!this.disabled&&this.dispatchEvent(new CustomEvent("click",{bubbles:!0}))}click(){this.handleClick(new CustomEvent("click",{bubbles:!0}))}handleKeydown(t){[c.ENTER,c.SPACE].includes(t.key)&&this.handleClick(t)}};s.shadowRootOptions={...m.shadowRootOptions,delegatesFocus:!0};s.styles=[i(u),i(b),i(g),i(f)];s=C([$("ngc-button-card")],s);export{s as NgcButtonCard};
36
+ </ngc-chip>`:null}get disabledClass(){return this.disabled?"gator-button-card_disabled":""}handleClick(t){t.preventDefault(),t.stopImmediatePropagation(),!this.disabled&&this.dispatchEvent(new CustomEvent("click",{bubbles:!0}))}click(){this.handleClick(new CustomEvent("click",{bubbles:!0}))}handleKeydown(t){[p.ENTER,p.SPACE].includes(t.key)&&this.handleClick(t)}};s.shadowRootOptions={...u.shadowRootOptions,delegatesFocus:!0};s.styles=[a(b),a(f),a(g),a(v)];h([$({type:String,attribute:"chip-type"})],s.prototype,"chipType",2);s=h([y("ngc-button-card")],s);export{s as NgcButtonCard};
@@ -1 +1 @@
1
- const r='.gator-breadcrumb{font-family:var(--ngc-font-family, "Open Sans"),sans-serif;display:inline-flex;padding:var(--ngc-breadcrumb-spacing, 2px) 0;color:var(--ngc-breadcrumb-link-color-default, --color-neutral-50);text-underline-offset:var(--ngc-breadcrumb-underline-offset, .25rem)}.gator-breadcrumb:hover,.gator-breadcrumb:focus{color:var(--ngc-breadcrumb-link-color-hover, --color-brand-30)}.gator-breadcrumb:focus{outline:var(--ngc-breadcrumb-focus-outline, 3px solid --color-brand-30)}.gator-breadcrumb-separator{font-family:var(--ngc-font-family, "Open Sans"),sans-serif;display:inline-flex;margin:var(--ngc-breadcrumb-separator-margin, 0 .25rem 0 .5rem)}.gator-breadcrumb-current{color:var(--ngc-breadcrumb-link-color-current, --color-text-primary-base)}';export{r as default};
1
+ const r='.gator-breadcrumb{font-family:var(--ngc-breadcrumb-font-family, var(--font-family-body, "Open Sans")),sans-serif;display:inline-flex;padding:var(--ngc-breadcrumb-spacing, 2px) 0;color:var(--ngc-breadcrumb-link-color-default, var(--color-text-secondary, #6D6D6D));text-underline-offset:var(--ngc-breadcrumb-underline-offset, .25rem)}.gator-breadcrumb:hover,.gator-breadcrumb:focus{color:var(--ngc-breadcrumb-link-color-hover, var(--color-text-brand, #103656))}.gator-breadcrumb:focus{outline:var(--ngc-breadcrumb-focus-outline, 2px solid var(--ngc-breadcrumb-focus-outline-color, var(--color-border-neutral, #1F1F1F)));outline-offset:2px}.gator-breadcrumb-separator{font-family:var(--ngc-breadcrumb-font-family, var(--font-family-body, "Open Sans")),sans-serif;display:inline-flex;margin:var(--ngc-breadcrumb-separator-margin, 0 .25rem 0 .5rem)}.gator-breadcrumb-current{color:var(--ngc-breadcrumb-link-color-current, var(--color-text-primary, #1F1F1F))}';export{r as default};
@@ -1,4 +1,5 @@
1
1
  import { NjcButtonCard } from '../button-card.ts';
2
+ import { NJC_CHIP_TYPES } from '../../chip/chip.ts';
2
3
  export declare class NgcButtonCard extends NjcButtonCard {
3
4
  static shadowRootOptions: {
4
5
  delegatesFocus: boolean;
@@ -9,6 +10,11 @@ export declare class NgcButtonCard extends NjcButtonCard {
9
10
  slotAssignment?: SlotAssignmentMode;
10
11
  };
11
12
  static styles: import('lit').CSSResult[];
13
+ /**
14
+ * @description The type of the chip located at the top of the card
15
+ * @property {NJC_CHIP_TYPES} chipType
16
+ */
17
+ chipType: NJC_CHIP_TYPES;
12
18
  render(): import('lit').TemplateResult<1>;
13
19
  get cardLabelMarkup(): import('lit').TemplateResult<1> | null;
14
20
  get disabledClass(): "" | "gator-button-card_disabled";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "8.0.0-preview.2",
4
+ "version": "8.0.0-preview.4",
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": "8.0.0-preview.1",
4
+ "version": "8.0.0-preview.3",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1804,6 +1804,13 @@
1804
1804
  "description": "\n---\n\n\n### **Events:**\n - **click**",
1805
1805
  "doc-url": "",
1806
1806
  "attributes": [
1807
+ {
1808
+ "name": "chip-type",
1809
+ "value": {
1810
+ "type": " | 'success' | 'warning' | 'error' | 'info'",
1811
+ "default": "null"
1812
+ }
1813
+ },
1807
1814
  {
1808
1815
  "name": "chip-label",
1809
1816
  "value": { "type": "string", "default": "''" }
@@ -1841,6 +1848,10 @@
1841
1848
  "events": [{ "name": "click", "type": "CustomEvent" }],
1842
1849
  "js": {
1843
1850
  "properties": [
1851
+ {
1852
+ "name": "chipType",
1853
+ "type": " | 'success' | 'warning' | 'error' | 'info'"
1854
+ },
1844
1855
  { "name": "cardLabelMarkup" },
1845
1856
  { "name": "disabledClass" },
1846
1857
  { "name": "chipLabel", "type": "string" },
@@ -1 +0,0 @@
1
- const r=":root,:host{--ngc-breadcrumb-link-color-hover: var(--color-brand-30, #11395B);--ngc-breadcrumb-link-color-current: var(--color-text-primary-base, #1F1F1F);--ngc-breadcrumb-link-color-default: var(--color-neutral-50, #6D6D6D);--ngc-breadcrumb-focus-outline: 3px solid var(--color-brand-30, #11395B);--ngc-breadcrumb-spacing: 2px;--ngc-breadcrumb-separator-margin: 0 .25rem 0 .5rem;--ngc-breadcrumb-underline-offset: .25rem}";export{r as default};