@cds/core 6.9.1 → 6.10.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/button-action/button-action.element.scss.js +1 -1
- package/custom-elements.json +21 -7
- package/file/file.element.d.ts +8 -1
- package/file/file.element.js +1 -1
- package/file/file.element.js.map +1 -1
- package/input/input.element.scss.js +1 -1
- package/internal/utils/global.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css as o}from"lit";var t=o`:host{--icon-width:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--width:var(--icon-width);--height:var(--icon-width);--cursor:pointer;--color:var(--cds-global-typography-color-300, var(--cds-global-color-construction-800, #2d4048));--font-size:var(--cds-global-typography-font-size-3, calc(13 * 1rem / var(--cds-global-base, 20)));--background:transparent;--padding:0;--outline:var(--cds-alias-object-interaction-outline, Highlight solid 2px);--outline-offset:calc(var(--cds-alias-object-interaction-outline-offset, 1px) * -1);pointer-events:none;display:inline-block;outline:0!important}:host([role=button]){pointer-events:initial;cursor:var(--cursor)!important}:host([status=active]){--color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}::slotted([shape=close]),::slotted([shape=info-circle]),::slotted([shape=times]),:host([shape=close]),:host([shape=info-circle]){--icon-width:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)))}:host(:hover){--color:var(--cds-alias-object-interaction-color-hover, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active){--color:var(--cds-alias-object-interaction-color-active, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active) .private-host{transform:translateY(calc(var(--cds-global-space-1,calc(1 * 1rem / var(--cds-global-base,20)))/ 2))}:host([disabled]){--color:var(--cds-alias-object-interaction-color-disabled, var(--cds-global-color-construction-300, #aeb8bc))}.private-host{--icon-color:var(--color);background:var(--background);padding:var(--padding);color:var(--color);font-size:var(--font-size);display:flex;justify-content:center;align-items:center;min-width:var(--width);min-height:var(--height)}::slotted(cds-icon),cds-icon{width:var(--icon-width);height:var(--icon-height);pointer-events:none}::slotted(cds-icon:not([status])),cds-icon{--color:var(--icon-color)}:host([disabled]:active){pointer-events:none!important}.private-host::after{content:"";position:absolute;left:calc(-1*var(--width) - 1);top:calc(-1*var(--height) - 1);width:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)));height:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)))}:host([disabled]) .private-host::after{outline:0!important}:host(:focus) .private-host::after{outline:var(--outline);outline-offset:var(--outline-offset)}@media (-webkit-min-device-pixel-ratio:0){:host(:focus) .private-host::after{outline-color:-webkit-focus-ring-color}}`;export{t as default};
|
|
1
|
+
import{css as o}from"lit";var t=o`:host{--icon-width:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-7, calc(16 * 1rem / var(--cds-global-base, 20)));--width:var(--icon-width);--height:var(--icon-width);--cursor:pointer;--color:var(--cds-global-typography-color-300, var(--cds-global-color-construction-800, #2d4048));--font-size:var(--cds-global-typography-font-size-3, calc(13 * 1rem / var(--cds-global-base, 20)));--background:transparent;--padding:0;--outline:var(--cds-alias-object-interaction-outline, Highlight solid 2px);--outline-offset:calc(var(--cds-alias-object-interaction-outline-offset, 1px) * -1);pointer-events:none;display:inline-block;outline:0!important}:host([role=button]){pointer-events:initial;cursor:var(--cursor)!important}:host([status=active]){--color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}::slotted([shape=close]),::slotted([shape=info-circle]),::slotted([shape=times]),:host([shape=close]),:host([shape=info-circle]){--icon-width:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)));--icon-height:var(--cds-global-space-8, calc(18 * 1rem / var(--cds-global-base, 20)))}:host(:hover){--color:var(--cds-alias-object-interaction-color-hover, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active){--color:var(--cds-alias-object-interaction-color-active, var(--cds-global-color-construction-1000, #1b2b32))}:host(:active) .private-host{transform:translateY(calc(var(--cds-global-space-1,calc(1 * 1rem / var(--cds-global-base,20)))/ 2))}:host([disabled]){--color:var(--cds-alias-object-interaction-color-disabled, var(--cds-global-color-construction-300, #aeb8bc))}.private-host{--icon-color:var(--color);background:var(--background);padding:var(--padding);color:var(--color);font-size:var(--font-size);display:flex;justify-content:center;align-items:center;min-width:var(--width);min-height:var(--height)}::slotted(cds-icon),cds-icon{width:var(--icon-width);height:var(--icon-height);pointer-events:none}::slotted(cds-icon:not([status])),cds-icon{--color:var(--icon-color)}:host([disabled]:active){pointer-events:none!important}.private-host::after{content:"";position:absolute;left:calc(-1*var(--width) - 1);top:calc(-1*var(--height) - 1);width:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)));height:var(--cds-alias-object-interaction-touch-target,calc(36 * 1rem / var(--cds-global-base,20)))}:host([disabled]) .private-host::after{outline:0!important}:host(:focus) .private-host::after{outline:var(--outline);outline-offset:var(--outline-offset)}@media (-webkit-min-device-pixel-ratio:0){:host(:focus) .private-host::after{outline-color:-webkit-focus-ring-color;outline-style:auto}}`;export{t as default};
|
|
2
2
|
//# sourceMappingURL=button-action.element.scss.js.map
|
package/custom-elements.json
CHANGED
|
@@ -7350,6 +7350,15 @@
|
|
|
7350
7350
|
{
|
|
7351
7351
|
"kind": "field",
|
|
7352
7352
|
"name": "buttonLabel",
|
|
7353
|
+
"description": "Set the label of the browse button.",
|
|
7354
|
+
"attribute": "buttonLabel"
|
|
7355
|
+
},
|
|
7356
|
+
{
|
|
7357
|
+
"kind": "field",
|
|
7358
|
+
"name": "buttonLabelForSelection",
|
|
7359
|
+
"type": {
|
|
7360
|
+
"text": "string"
|
|
7361
|
+
},
|
|
7353
7362
|
"privacy": "private"
|
|
7354
7363
|
},
|
|
7355
7364
|
{
|
|
@@ -7901,13 +7910,12 @@
|
|
|
7901
7910
|
}
|
|
7902
7911
|
}
|
|
7903
7912
|
],
|
|
7904
|
-
"superclass": {
|
|
7905
|
-
"name": "CdsControl",
|
|
7906
|
-
"package": "@cds/core/forms"
|
|
7907
|
-
},
|
|
7908
|
-
"tagName": "cds-file",
|
|
7909
|
-
"customElement": true,
|
|
7910
7913
|
"attributes": [
|
|
7914
|
+
{
|
|
7915
|
+
"name": "buttonLabel",
|
|
7916
|
+
"description": "Set the label of the browse button.",
|
|
7917
|
+
"fieldName": "buttonLabel"
|
|
7918
|
+
},
|
|
7911
7919
|
{
|
|
7912
7920
|
"name": "status",
|
|
7913
7921
|
"type": {
|
|
@@ -7975,7 +7983,13 @@
|
|
|
7975
7983
|
"module": "forms/control/control.element.js"
|
|
7976
7984
|
}
|
|
7977
7985
|
}
|
|
7978
|
-
]
|
|
7986
|
+
],
|
|
7987
|
+
"superclass": {
|
|
7988
|
+
"name": "CdsControl",
|
|
7989
|
+
"package": "@cds/core/forms"
|
|
7990
|
+
},
|
|
7991
|
+
"tagName": "cds-file",
|
|
7992
|
+
"customElement": true
|
|
7979
7993
|
}
|
|
7980
7994
|
],
|
|
7981
7995
|
"exports": [
|
package/file/file.element.d.ts
CHANGED
|
@@ -19,11 +19,18 @@ import { CdsControl } from '@cds/core/forms';
|
|
|
19
19
|
*/
|
|
20
20
|
export declare class CdsFile extends CdsControl {
|
|
21
21
|
i18n: {
|
|
22
|
+
/**
|
|
23
|
+
* Set the label of the browse button.
|
|
24
|
+
*/
|
|
22
25
|
browse: string;
|
|
23
26
|
files: string;
|
|
24
27
|
removeFile: string;
|
|
25
28
|
};
|
|
26
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Set the label of the browse button.
|
|
31
|
+
*/
|
|
32
|
+
buttonLabel: string;
|
|
33
|
+
private buttonLabelForSelection;
|
|
27
34
|
protected fixedControlWidth: boolean;
|
|
28
35
|
protected supportsPrefixSuffixActions: boolean;
|
|
29
36
|
static get styles(): import("lit").CSSResultGroup[];
|
package/file/file.element.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as e}from"lit";import{I18nService as i,i18n as s,state as
|
|
1
|
+
import{__decorate as t}from"tslib";import{html as e}from"lit";import{I18nService as i,i18n as o,property as s,state as n}from"@cds/core/internal";import{CdsControl as l}from"@cds/core/forms";import r from"./file.element.scss.js";class a extends l{constructor(){super(...arguments);this.i18n=i.keys.file,this.buttonLabel=this.i18n.browse,this.fixedControlWidth=!0,this.supportsPrefixSuffixActions=!1}static get styles(){return[...super.styles,r]}get inputTemplate(){return e`<div cds-layout="horizontal gap:sm align:vertical-center"><cds-button size="sm" action="outline" @click="${()=>this.label.click()}" ?disabled="${this.disabled}"><cds-icon shape="folder" aria-hidden="true"></cds-icon><span>${this.buttonLabelForSelection||this.buttonLabel}</span></cds-button>${this.clearFilesControlTemplate}</div>`}get clearFilesControlTemplate(){return this.inputControl.files?.length&&!this.disabled?e`<cds-button-action shape="times" @click="${()=>this.clearFiles()}" aria-label="${this.i18n.removeFile}"></cds-button-action>`:e``}firstUpdated(t){super.firstUpdated(t),this.inputControl.addEventListener("change",(t=>{t.isTrusted&&this.updateLabelAndFocus(t.target.files)}))}clearFiles(t=!0){this.buttonLabelForSelection="",this.inputControl.value="",t&&this.inputControl.dispatchEvent&&this.inputControl.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}));const e=this.shadowRoot?.querySelector("cds-button");e&&e.focus()}updateLabelAndFocus(t){t&&t.length?this.buttonLabelForSelection=t.length>1?`${t.length} ${this.i18n.files}`:t[0].name:this.clearFiles(!1)}}t([o()],a.prototype,"i18n",void 0),t([s()],a.prototype,"buttonLabel",void 0),t([n()],a.prototype,"buttonLabelForSelection",void 0),t([n()],a.prototype,"fixedControlWidth",void 0),t([n()],a.prototype,"supportsPrefixSuffixActions",void 0);export{a as CdsFile};
|
|
2
2
|
//# sourceMappingURL=file.element.js.map
|
package/file/file.element.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.element.js","sources":["../../../src/file/file.element.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\nimport { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { state, i18n, I18nService } from '@cds/core/internal';\nimport { CdsControl } from '@cds/core/forms';\nimport styles from './file.element.scss';\n/**\n * Time Input\n *\n * ```typescript\n * import '@cds/core/file/register.js';\n * ```\n *\n * ```html\n * <cds-file>\n * <label>file</label>\n * <input type=\"file\" />\n * </cds-file>\n * ```\n *\n * @element cds-file\n * @slot - For projecting file input and label\n */\nexport class CdsFile extends CdsControl {\n constructor() {\n super(...arguments);\n this.i18n = I18nService.keys.file;\n this.buttonLabel = this.i18n.browse;\n this.fixedControlWidth = true;\n this.supportsPrefixSuffixActions = false;\n }\n static get styles() {\n return [...super.styles, styles];\n }\n get inputTemplate() {\n return html `\n <div cds-layout=\"horizontal gap:sm align:vertical-center\">\n <cds-button size=\"sm\" action=\"outline\" @click=\"${() => this.label.click()}\" ?disabled=${this.disabled}>\n <cds-icon shape=\"folder\" aria-hidden=\"true\"></cds-icon>\n <span>${this.buttonLabel}</span>\n </cds-button>\n ${this.clearFilesControlTemplate}\n </div>\n `;\n }\n get clearFilesControlTemplate() {\n return this.inputControl.files?.length && !this.disabled\n ? html `<cds-button-action\n shape=\"times\"\n @click=${() => this.clearFiles()}\n aria-label=\"${this.i18n.removeFile}\"\n ></cds-button-action>`\n : html ``;\n }\n firstUpdated(props) {\n super.firstUpdated(props);\n this.inputControl.addEventListener('change', e => {\n // NOTE: have to distinguish here being user-caused events and programmatic\n // events (e.isTrusted true/false) so that we don't fire a change event loop\n if (e.isTrusted) {\n this.updateLabelAndFocus(e.target.files);\n }\n });\n }\n /** @private */\n clearFiles(fireEvent = true) {\n this.
|
|
1
|
+
{"version":3,"file":"file.element.js","sources":["../../../src/file/file.element.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\nimport { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { state, i18n, I18nService, property } from '@cds/core/internal';\nimport { CdsControl } from '@cds/core/forms';\nimport styles from './file.element.scss';\n/**\n * Time Input\n *\n * ```typescript\n * import '@cds/core/file/register.js';\n * ```\n *\n * ```html\n * <cds-file>\n * <label>file</label>\n * <input type=\"file\" />\n * </cds-file>\n * ```\n *\n * @element cds-file\n * @slot - For projecting file input and label\n */\nexport class CdsFile extends CdsControl {\n constructor() {\n super(...arguments);\n this.i18n = I18nService.keys.file;\n /**\n * Set the label of the browse button.\n */\n this.buttonLabel = this.i18n.browse;\n this.fixedControlWidth = true;\n this.supportsPrefixSuffixActions = false;\n }\n static get styles() {\n return [...super.styles, styles];\n }\n get inputTemplate() {\n return html `\n <div cds-layout=\"horizontal gap:sm align:vertical-center\">\n <cds-button size=\"sm\" action=\"outline\" @click=\"${() => this.label.click()}\" ?disabled=${this.disabled}>\n <cds-icon shape=\"folder\" aria-hidden=\"true\"></cds-icon>\n <span>${this.buttonLabelForSelection || this.buttonLabel}</span>\n </cds-button>\n ${this.clearFilesControlTemplate}\n </div>\n `;\n }\n get clearFilesControlTemplate() {\n return this.inputControl.files?.length && !this.disabled\n ? html `<cds-button-action\n shape=\"times\"\n @click=${() => this.clearFiles()}\n aria-label=\"${this.i18n.removeFile}\"\n ></cds-button-action>`\n : html ``;\n }\n firstUpdated(props) {\n super.firstUpdated(props);\n this.inputControl.addEventListener('change', e => {\n // NOTE: have to distinguish here being user-caused events and programmatic\n // events (e.isTrusted true/false) so that we don't fire a change event loop\n if (e.isTrusted) {\n this.updateLabelAndFocus(e.target.files);\n }\n });\n }\n /** @private */\n clearFiles(fireEvent = true) {\n this.buttonLabelForSelection = '';\n this.inputControl.value = '';\n // when input is reset like this it isn't registering an onchange event\n // NOTE: tsc + karma is complaining about dispatchEvent being a method on inputControl\n if (fireEvent && this.inputControl.dispatchEvent) {\n this.inputControl.dispatchEvent(new Event('change', { bubbles: true, cancelable: true }));\n }\n const browseButton = this.shadowRoot?.querySelector('cds-button');\n if (browseButton) {\n browseButton.focus();\n }\n }\n /** @private */\n updateLabelAndFocus(files) {\n if (files && files.length) {\n this.buttonLabelForSelection = files.length > 1 ? `${files.length} ${this.i18n.files}` : files[0].name;\n }\n else {\n this.clearFiles(false);\n }\n }\n}\n__decorate([\n i18n()\n], CdsFile.prototype, \"i18n\", void 0);\n__decorate([\n property()\n], CdsFile.prototype, \"buttonLabel\", void 0);\n__decorate([\n state()\n], CdsFile.prototype, \"buttonLabelForSelection\", void 0);\n__decorate([\n state()\n], CdsFile.prototype, \"fixedControlWidth\", void 0);\n__decorate([\n state()\n], CdsFile.prototype, \"supportsPrefixSuffixActions\", void 0);\n"],"names":["CdsFile","CdsControl","constructor","super","this","i18n","I18nService","keys","file","buttonLabel","browse","fixedControlWidth","supportsPrefixSuffixActions","styles","inputTemplate","html","label","click","disabled","buttonLabelForSelection","clearFilesControlTemplate","inputControl","files","length","clearFiles","removeFile","firstUpdated","props","addEventListener","e","isTrusted","updateLabelAndFocus","target","fireEvent","value","dispatchEvent","Event","bubbles","cancelable","browseButton","shadowRoot","querySelector","focus","name","__decorate","prototype","property","state"],"mappings":"qOA2BO,MAAMA,UAAgBC,EACzBC,cACIC,oBACAC,KAAKC,KAAOC,EAAYC,KAAKC,KAI7BJ,KAAKK,YAAcL,KAAKC,KAAKK,OAC7BN,KAAKO,mBAAoB,EACzBP,KAAKQ,6BAA8B,EAE5BC,oBACP,MAAO,IAAIV,MAAMU,OAAQA,GAEzBC,oBACA,OAAOC,CAAK,4GAEqC,IAAMX,KAAKY,MAAMC,uBAAsBb,KAAKc,0EAEnFd,KAAKe,yBAA2Bf,KAAKK,kCAE7CL,KAAKgB,kCAIPA,gCACA,OAAOhB,KAAKiB,aAAaC,OAAOC,SAAWnB,KAAKc,SAC1CH,CAAK,4CAEA,IAAMX,KAAKoB,6BACNpB,KAAKC,KAAKoB,mCAEpBV,CAAK,GAEfW,aAAaC,GACTxB,MAAMuB,aAAaC,GACnBvB,KAAKiB,aAAaO,iBAAiB,UAAUC,IAGrCA,EAAEC,WACF1B,KAAK2B,oBAAoBF,EAAEG,OAAOV,UAK9CE,WAAWS,GAAY,GACnB7B,KAAKe,wBAA0B,GAC/Bf,KAAKiB,aAAaa,MAAQ,GAGtBD,GAAa7B,KAAKiB,aAAac,eAC/B/B,KAAKiB,aAAac,cAAc,IAAIC,MAAM,SAAU,CAAEC,SAAS,EAAMC,YAAY,KAErF,MAAMC,EAAenC,KAAKoC,YAAYC,cAAc,cAChDF,GACAA,EAAaG,QAIrBX,oBAAoBT,GACZA,GAASA,EAAMC,OACfnB,KAAKe,wBAA0BG,EAAMC,OAAS,EAAI,GAAGD,EAAMC,UAAUnB,KAAKC,KAAKiB,QAAUA,EAAM,GAAGqB,KAGlGvC,KAAKoB,YAAW,IAI5BoB,EAAW,CACPvC,KACDL,EAAQ6C,UAAW,YAAQ,GAC9BD,EAAW,CACPE,KACD9C,EAAQ6C,UAAW,mBAAe,GACrCD,EAAW,CACPG,KACD/C,EAAQ6C,UAAW,+BAA2B,GACjDD,EAAW,CACPG,KACD/C,EAAQ6C,UAAW,yBAAqB,GAC3CD,EAAW,CACPG,KACD/C,EAAQ6C,UAAW,mCAA+B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{css as o}from"lit";var r=o`:host{--background-size:0% 100%;--background-color:var(--cds-alias-object-opacity-0, rgba(0, 0, 0, 0));--background:linear-gradient(180deg, var(--background-color) 95%, var(--border-color) 0) no-repeat;--border-color:var(--cds-alias-object-interaction-border-color, var(--cds-global-color-construction-500, #6a7a81));--border:0;--border-bottom:var(--cds-alias-object-border-width-100, calc(1 * 1rem / var(--cds-global-base, 20))) solid var(--border-color);--border-radius:0;--outline:
|
|
1
|
+
import{css as o}from"lit";var r=o`:host{--background-size:0% 100%;--background-color:var(--cds-alias-object-opacity-0, rgba(0, 0, 0, 0));--background:linear-gradient(180deg, var(--background-color) 95%, var(--border-color) 0) no-repeat;--border-color:var(--cds-alias-object-interaction-border-color, var(--cds-global-color-construction-500, #6a7a81));--border:0;--border-bottom:var(--cds-alias-object-border-width-100, calc(1 * 1rem / var(--cds-global-base, 20))) solid var(--border-color);--border-radius:0;--outline:none;--outline-offset:0;--padding:var(--cds-global-space-2, calc(2 * 1rem / var(--cds-global-base, 20))) var(--cds-global-space-4, calc(6 * 1rem / var(--cds-global-base, 20))) 0 var(--cds-global-space-4, calc(6 * 1rem / var(--cds-global-base, 20)));--font-size:var(--cds-global-typography-font-size-3, calc(13 * 1rem / var(--cds-global-base, 20)));--color:var(--cds-global-typography-color-400, var(--cds-global-color-construction-900, #21333b));--line-height:var(--cds-global-space-9, calc(24 * 1rem / var(--cds-global-base, 20)));--transition:background-size var(--cds-global-animation-duration-quick, 0.2s) ease;--text-align:inherit;display:block;width:100%;--icon-color:var(--color)}::slotted([slot=input]:not(select[multiple]):not(select[size])){text-transform:var(--text-transform)!important;border:var(--border)!important;padding:var(--padding);font-size:var(--font-size)!important;color:var(--color)!important;line-height:var(--line-height)!important;height:var(--line-height)!important;border-radius:var(--border-radius)!important;width:100%!important;-webkit-appearance:none!important;background:var(--cds-alias-object-opacity-0,rgba(0,0,0,0))!important;box-shadow:none!important;text-align:var(--text-align)!important}::slotted([slot=input]:not(select[multiple]):not(select[size]))::placeholder{--color:var(--cds-global-typography-color-200, var(--cds-global-color-construction-600, #4f6169))!important}::slotted([slot=input]){margin:0!important}::slotted([cds-button-action]),[cds-button-action]{--color:var(--icon-color)}::slotted([slot=input]:focus){outline:var(--outline)!important;outline-offset:var(--outline-offset)!important}.input-container{transition:var(--transition);background:var(--background);background-size:var(--background-size);border-bottom:var(--border-bottom);border-radius:var(--border-radius)!important;position:relative}.prefix,.suffix{line-height:0;position:absolute;pointer-events:none}.prefix{left:0}.suffix{right:0}.rtl .prefix{left:initial;right:0}.rtl .suffix{right:initial;left:0}.rtl ::slotted([slot=input]){text-align:right}:host([_focused]){--background-size:100% 100%;--border-color:var(--cds-alias-status-info, var(--cds-global-color-blue-700, #0079ad))}:host([_readonly]){--border-bottom:0;--background-size:0% 100%;--background:var(--cds-alias-object-opacity-0, rgba(0, 0, 0, 0))}:host([status=error]),:host([status=error][_focused]){--border-color:var(--cds-alias-status-danger, var(--cds-global-color-red-700, #e02200))}:host([status=success]){--border-color:var(--cds-alias-status-success, var(--cds-global-color-green-700, #42810e))}:host([_disabled]){--border-color:var(--cds-alias-object-border-color-tint, var(--cds-global-color-construction-100, #e3eaed));--color:var(--cds-alias-status-disabled, var(--cds-global-color-construction-300, #aeb8bc))}`;export{r as default};
|
|
2
2
|
//# sourceMappingURL=input.element.scss.js.map
|
package/internal/utils/global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isBrowser as e}from"./environment.js";import{getAngularVersion as n,getAngularJSVersion as o,getReactVersion as t,getVueVersion as i}from"./framework.js";import{browserFeatures as s}from"./supports.js";import{LogService as r}from"../services/log.service.js";function w(){e()&&(window.CDS=window.CDS||{_version:[],_react:{version:void 0},_supports:s.supports,_isStateProxied:!1,_state:{focusTrapItems:[],layerElements:[],i18nRegistry:{},elementRegistry:{},iconRegistry:{},motionRegistry:{}},environment:{production:!1},getDetails:a,logDetails:d},function(){const e="6.
|
|
1
|
+
import{isBrowser as e}from"./environment.js";import{getAngularVersion as n,getAngularJSVersion as o,getReactVersion as t,getVueVersion as i}from"./framework.js";import{browserFeatures as s}from"./supports.js";import{LogService as r}from"../services/log.service.js";function w(){e()&&(window.CDS=window.CDS||{_version:[],_react:{version:void 0},_supports:s.supports,_isStateProxied:!1,_state:{focusTrapItems:[],layerElements:[],i18nRegistry:{},elementRegistry:{},iconRegistry:{},motionRegistry:{}},environment:{production:!1},getDetails:a,logDetails:d},function(){const e="6.10.0";window.CDS._version.indexOf(e)<0&&(window.CDS._version.push(e),document.querySelector("body")?.setAttribute("cds-version",window.CDS._version.join(" "))),window.CDS._version.length>1&&r.warn("Running more than one version of Clarity can cause unexpected issues. Please ensure only one version is loaded.")}(),window.CDS._isStateProxied||(window.CDS._isStateProxied=!0,window.CDS._state=new Proxy(window.CDS._state,{set:(e,n,o)=>{const t={key:n,prev:window.CDS._state[n],current:o};return e[n]=o,document.dispatchEvent(new CustomEvent("CDS_STATE_UPDATE",{detail:t})),!0}})))}function a(){return{versions:window.CDS._version,environment:window.CDS.environment,userAgent:navigator.userAgent,supports:window.CDS._supports,angularVersion:n(!1),angularJSVersion:o(!1),reactVersion:t(!1),vueVersion:i(!1),state:{...window.CDS._state,iconRegistry:Object.keys(window.CDS._state.iconRegistry),motionRegistry:Object.keys(window.CDS._state.motionRegistry),focusTrapRegistry:Object.keys(window.CDS._state.focusTrapItems.map((e=>e.focusTrapId)))}}}function d(){r.log(JSON.stringify(a(),null,2))}export{w as setupCDSGlobal};
|
|
2
2
|
//# sourceMappingURL=global.js.map
|
package/package.json
CHANGED