@ncino/web-components 8.0.0-preview.3 → 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,4 +1,4 @@
|
|
|
1
|
-
import{NjcButtonCard as
|
|
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?
|
|
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){[
|
|
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,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
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.
|
|
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" },
|