@ncino/web-components 13.11.2 → 13.12.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.
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import{property as o}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{customElement as c}from"../../utils/decorators/custom-element-decorator.js";import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as d,nothing as u}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{ref as m}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import{generateRandomId as b,getElementId as f}from"../../utils/string-utils.js";import{ifDefined as p}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/if-defined.js";import{NgcInputText as v}from"../input/gator/input-text/input-text.gator.js";import g from"../../packages/web-components/src/components/checkbox/checkbox.gator.scss.js";import{unsafeCSS as x}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var y=Object.defineProperty,$=Object.getOwnPropertyDescriptor,
|
|
1
|
+
import{property as o}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{customElement as c}from"../../utils/decorators/custom-element-decorator.js";import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as d,nothing as u}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{ref as m}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import{generateRandomId as b,getElementId as f}from"../../utils/string-utils.js";import{ifDefined as p}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/if-defined.js";import{NgcInputText as v}from"../input/gator/input-text/input-text.gator.js";import g from"../../packages/web-components/src/components/checkbox/checkbox.gator.scss.js";import{unsafeCSS as x}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var y=Object.defineProperty,$=Object.getOwnPropertyDescriptor,k=Object.getPrototypeOf,_=Reflect.get,s=(e,r,a,l)=>{for(var i=l>1?void 0:l?$(r,a):r,h=e.length-1,n;h>=0;h--)(n=e[h])&&(i=(l?n(r,a,i):n(i))||i);return l&&i&&y(r,a,i),i},T=(e,r,a)=>_(k(e),a,r);let t=class extends v{constructor(){super(...arguments),this.titleText="",this.selected=!1,this.indeterminate=!1,this.hideLabel=!1,this.grouped=!1,this._randomId=b()}updated(e){super.updated(e),e.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate),e.has("errorText")&&this.inputRef.value&&this.inputRef.value.setCustomValidity(this.errorText?"true":"")}render(){const e=this.elementId;return d`
|
|
2
2
|
<div class="gator-form-element">
|
|
3
3
|
<div id="${e}-checkbox" class="gator-checkbox">
|
|
4
|
-
<div class="gator-checkbox-input-
|
|
5
|
-
<input
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
<div class="gator-checkbox-input-align">
|
|
5
|
+
<div class="gator-checkbox-input-wrapper">
|
|
6
|
+
<input
|
|
7
|
+
${m(this.inputRef)}
|
|
8
|
+
id="${e}"
|
|
9
|
+
class="gator-checkbox-input"
|
|
10
|
+
type="checkbox"
|
|
11
|
+
.checked="${this.selected}"
|
|
12
|
+
?disabled="${this.disabled}"
|
|
13
|
+
aria-labelledby="${p(this.hideLabel?void 0:`${e}-checkbox`)}"
|
|
14
|
+
aria-describedby=${this.ariaDescribedby}
|
|
15
|
+
@change="${this.handleChange}"
|
|
16
|
+
aria-label=${p(this.hideLabel?this.titleText:void 0)}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
17
19
|
</div>
|
|
18
20
|
${this.hideLabel?null:d`
|
|
19
21
|
<label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r='.gator-checkbox{display:flex;width:fit-content;flex-direction:row;align-items:
|
|
1
|
+
const r='.gator-checkbox{display:flex;width:fit-content;flex-direction:row;align-items:flex-start;gap:.5rem;margin:var(--ngc-checkbox-margin-y, .5rem) 0;padding:.2rem;cursor:pointer}.gator-checkbox:has(input:disabled){cursor:not-allowed}.gator-checkbox-title{font-family:var(--font-family-body, "Open Sans"),sans-serif;color:var(--ngc-checkbox-title-color-default, var(--color-text-primary, #1F1F1F));font-size:var(--ngc-checkbox-title-font-size, var(--font-size-body-1, 1.0625rem));line-height:var(--ngc-checkbox-title-line-height, var(--line-height-body-1, 1.5rem));cursor:pointer}.gator-checkbox:has(input:disabled) .gator-checkbox-title{cursor:not-allowed}.gator-checkbox-input-wrapper:has(:focus-visible){box-shadow:0 0 0 2px var(--color-surface-primary-white, #FFF),0 0 0 4px var(--ngc-checkbox-color-focus-indicator, var(--color-border-focus, #1F1F1F))}.gator-checkbox-input-wrapper:has(:focus-visible) input:focus-visible{outline:none}input{margin:0;border-radius:var(--border-radius-small, .25rem);accent-color:var(--ngc-checkbox-color-selected, var(--color-feedback-brand, #103656));cursor:pointer}input:disabled{cursor:not-allowed}.gator-checkbox-input-align{display:flex;align-items:center;min-height:var(--ngc-checkbox-title-line-height, var(--line-height-body-1, 1.5rem))}.gator-checkbox-input-wrapper{display:flex;align-items:center;border-radius:2px;outline:1px solid transparent;outline-offset:-1px;transform:scale(1.4)}.gator-checkbox-input-wrapper:has(input:invalid:not(:checked,:indeterminate,:disabled)){outline-color:var(--ngc-checkbox-color-error, var(--color-feedback-error, #D44011))}.gator-checkbox-input-wrapper:has(input:invalid:not(:checked,:indeterminate,:disabled)):hover{outline-color:var(--ngc-checkbox-color-error-hover, var(--color-feedback-error, #D44011));background:var(--color-surface-error, #FAEBE7)}.gator-checkbox-input-wrapper:has(input:not(:checked,:indeterminate,:disabled)){outline-color:var(--ngc-checkbox-color-border-unselected, var(--color-border-primary, #6D6D6D));background:var(--color-surface-primary, #FFFFFF)}.gator-checkbox-input-wrapper:has(input:not(:checked,:indeterminate,:disabled)):hover{outline-color:var(--ngc-checkbox-color-border-hover, var(--color-feedback-brand-secondary, #0D2B45));background:var(--color-surface-brand-secondary, #DAE7F1)}input:not(:checked,:indeterminate,:disabled){opacity:0}input:checked,input:indeterminate,input:disabled{opacity:1}input:invalid{accent-color:var(--ngc-checkbox-color-error, var(--color-feedback-error, #D44011))}';export{r as default};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncino/web-components",
|
|
3
3
|
"author": "nCino",
|
|
4
|
-
"version": "13.
|
|
4
|
+
"version": "13.12.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.0",
|
|
102
102
|
"yaml-eslint-parser": "^2.0.0",
|
|
103
|
-
"@ncino/styles": "13.
|
|
103
|
+
"@ncino/styles": "13.12.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@ncino/styles": "13.
|
|
106
|
+
"@ncino/styles": "13.12.0"
|
|
107
107
|
},
|
|
108
108
|
"bugs": {
|
|
109
109
|
"url": "https://github.com/ncino/force-sdk-web-components/issues"
|
package/web-types.json
CHANGED