@ukic/web-components 2.1.0-beta.4 → 2.1.0-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +2 -0
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -2
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +1 -1
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card/ic-card.js +1 -1
- package/dist/collection/components/ic-card/ic-card.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.js +20 -1
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +1 -2
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.css +4 -0
- package/dist/collection/components/ic-text-field/ic-text-field.css +1 -0
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-chip.js +3 -1
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -2
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-select.js +1 -1
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-text-field2.js +1 -1
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-a5948fc3.entry.js → p-01e8bd4a.entry.js} +2 -2
- package/dist/core/p-01e8bd4a.entry.js.map +1 -0
- package/dist/core/p-204f6315.entry.js +2 -0
- package/dist/core/p-204f6315.entry.js.map +1 -0
- package/dist/core/p-3efa7f8b.entry.js +2 -0
- package/dist/core/p-3efa7f8b.entry.js.map +1 -0
- package/dist/core/{p-2ca96f69.entry.js → p-6cb276c6.entry.js} +2 -2
- package/dist/core/p-6cb276c6.entry.js.map +1 -0
- package/dist/core/p-d599cf4f.entry.js.map +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +2 -0
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -2
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +1 -1
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +1 -1
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card/ic-card.d.ts +1 -1
- package/dist/types/components/ic-chip/ic-chip.d.ts +5 -1
- package/dist/types/components.d.ts +7 -3
- package/hydrate/index.js +6 -5
- package/package.json +3 -3
- package/dist/core/p-2ca96f69.entry.js.map +0 -1
- package/dist/core/p-789e197b.entry.js +0 -2
- package/dist/core/p-789e197b.entry.js.map +0 -1
- package/dist/core/p-a5948fc3.entry.js.map +0 -1
- package/dist/core/p-f5b045a5.entry.js +0 -2
- package/dist/core/p-f5b045a5.entry.js.map +0 -1
@@ -6,7 +6,7 @@ const index = require('./index-3ef30d9d.js');
|
|
6
6
|
const types = require('./types-3eb02246.js');
|
7
7
|
const helpers = require('./helpers-81484ceb.js');
|
8
8
|
|
9
|
-
const icTextFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}::-moz-placeholder{color:var(--ic-color-tertiary-text);opacity:1}::placeholder{color:var(--ic-color-tertiary-text);opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs)}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:6px}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(--ic-architectural-200)}input.readonly,textarea.readonly{color:var(--ic-color-primary-text)}.fullwidth{position:relative;width:100%}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=\"number\"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.maxlengthtext{color:var(--ic-color-secondary-text)}.exceeded{color:var(--ic-status-error)}.disabled{color:var(--ic-architectural-200)}.no-left-pad{padding-left:0}::slotted([slot=\"icon\"]){fill:var(--ic-color-tertiary-text)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-color-primary-text)}.charcount{margin-right:calc(-1 * var(--ic-space-xxxs))}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration,input[type=\"search\"]::-webkit-search-results-button,input[type=\"search\"]::-webkit-search-results-decoration{display:none}input[type=\"search\"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
|
9
|
+
const icTextFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;width:100%}::-moz-placeholder{color:var(--ic-color-tertiary-text);opacity:1}::placeholder{color:var(--ic-color-tertiary-text);opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs)}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:6px}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(--ic-architectural-200)}input.readonly,textarea.readonly{color:var(--ic-color-primary-text)}.fullwidth{position:relative;width:100%}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=\"number\"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.maxlengthtext{color:var(--ic-color-secondary-text)}.exceeded{color:var(--ic-status-error)}.disabled{color:var(--ic-architectural-200)}.no-left-pad{padding-left:0}::slotted([slot=\"icon\"]){fill:var(--ic-color-tertiary-text)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-color-primary-text)}.charcount{margin-right:calc(-1 * var(--ic-space-xxxs))}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration,input[type=\"search\"]::-webkit-search-results-button,input[type=\"search\"]::-webkit-search-results-decoration{display:none}input[type=\"search\"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
|
10
10
|
|
11
11
|
let inputIds = 0;
|
12
12
|
const TextField = class {
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-text-field.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,ugIAAugI;;ACsC9hI,IAAI,QAAQ,GAAG,CAAC,CAAC;MAUJ,SAAS;;;;;;;;IAIZ,wBAAmB,GAA6B,EAAE,CAAC;IAuHnD,iBAAY,GAAY,IAAI,CAAC,eAAe,EAAE,CAAC;IA8G/C,YAAO,GAAG,CAAC,EAAS;MAC1B,IAAI,CAAC,KAAK,GAAI,EAAE,CAAC,MAA2B,CAAC,KAAK,CAAC;MACnD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE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AAW,GAAG,CAAC,MACfF,iCACE,MAAM,EACJ,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,KAAK;SACtC,aAAa,KAAKT,yBAAmB,CAAC,OAAO;UAC5C,gBAAgB,CAAC;UACf,EAAE;UACF,aAAa,EAEnB,OAAO,EAAE,cAAc,GAAG,qBAAqB,GAAG,EAAE,EACpD,YAAY,EAAE,eAAe,EAC7B,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,SAAS,IAEnB,CAAC,QAAQ,IAAI,WAAW,GAAG,CAAC,KAC3BS,iBAAK,IAAI,EAAC,8BAA8B,IACtCA,2BACE,OAAO,EAAC,SAAS,EACjB,KAAK,EAAE;QACL,CAAC,eAAe,GAAG,IAAI;QACvB,CAAC,UAAU,GAAG,iBAAiB;QAC/B,CAAC,UAAU,GAAG,YAAY;OAC3B,IAEDA,+BACY,QAAQ,EAClB,EAAE,EAAE,GAAG,OAAO,YAAY,EAC1B,KAAK,EAAC,WAAW,IAEhB,QAAQ,OAAG,WAAW,CAClB,EACPA,kBAAM,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACO,CACZ,CACP,CACmB,CACvB,CACkB,CAChB,EACP;GACH;;;;;;;;;;;","names":["IcInformationStatus","debounceEvent","inheritAttributes","IC_INHERITED_ARIA","addFormResetListener","onComponentRequiredPropUndefined","removeFormResetListener","getInputDescribedByText","renderHiddenInput","h","Host","isEmptyString"],"sources":["./src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","./src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field \n */\n display: block;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 6px;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n.fullwidth {\n position: relative;\n width: 100%;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n}\n\n.exceeded {\n color: var(--ic-status-error);\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n} from \"@stencil/core\";\n\nimport {\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n} from \"../../interface\";\nimport { IcInformationStatus } from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n @Element() el: HTMLIcTextFieldElement;\n\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * If `true`, the small styling will be applied to the text field.\n */\n @Prop({ reflect: true }) small: boolean = false;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n\n /**\n * The maximum number of characters that can be entered in the field.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n private showLeftIcon: boolean = this.hasLeftIconSlot();\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n @State() numChars: number = 0;\n @State() maxLengthExceeded: boolean = false;\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n if (this.maxLength > 0) {\n this.numChars = newValue.length;\n if (newValue.length > this.maxLength) {\n this.maxLengthExceeded = true;\n } else {\n this.maxLengthExceeded = false;\n }\n }\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * Sets focus on the native `input`\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.inputEl) {\n this.inputEl.focus();\n }\n }\n\n //stop keydown event bubbling up to storybook\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n ev.cancelBubble = true;\n }\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icBlur.emit({ value: value });\n };\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n private onFocus = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icFocus.emit({ value: value });\n };\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n private isTextArea = (): boolean => {\n return this.rows > 1;\n };\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n if (iconEl != null) {\n return true;\n }\n return false;\n }\n\n private hasStatus = (status: IcInformationStatusOrEmpty): boolean => {\n return status !== \"\" && !this.disabled;\n };\n\n private showStatusText = (status: IcInformationStatusOrEmpty): boolean => {\n if (\n this.hasStatus(status) &&\n !(status == IcInformationStatus.Success && this.validationInline)\n ) {\n return true;\n }\n return false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n componentWillLoad(): void {\n this.watchValueHandler(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n \"aria-autocomplete\",\n \"aria-haspopup\",\n ]);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n validationStatus,\n validationText,\n validationInline,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : disabled;\n\n const placeholderText = disabled ? \"\" : placeholder;\n\n const currentStatus = maxLengthExceeded\n ? IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? \"Maximum length exceeded\"\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n\n const messageAriaLive =\n maxLengthExceeded ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText = this.showStatusText(currentStatus);\n const multiline = this.isTextArea();\n const hiddenCharCountDescId =\n maxLength > 0 ? inputId + \"-charcount-desc\" : \"\";\n const describedBy = (\n hiddenCharCountDescId +\n \" \" +\n getInputDescribedByText(inputId, helperText !== \"\", showStatusText)\n ).trim();\n\n if (this.showLeftIcon) {\n if (!readonly && disabledMode) {\n this.showLeftIcon = false;\n }\n }\n\n const invalid =\n currentStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n const disabledText = disabledMode && !readonly;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n small={small}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {this.showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline && (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n value={value}\n class={{\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholderText}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n {...this.inheritedAttributes}\n ></input>\n )}\n {multiline && (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholderText}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n <slot name=\"clear-button\"></slot>\n <slot name=\"search-submit-button\"></slot>\n </ic-input-component-container>\n <slot name=\"menu\"></slot>\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0) && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline)\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"exceeded\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-text-field.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,khIAAkhI;;ACsCziI,IAAI,QAAQ,GAAG,CAAC,CAAC;MAUJ,SAAS;;;;;;;;IAIZ,wBAAmB,GAA6B,EAAE,CAAC;IAuHnD,iBAAY,GAAY,IAAI,CAAC,eAAe,EAAE,CAAC;IA8G/C,YAAO,GAAG,CAAC,EAAS;MAC1B,IAAI,CAAC,KAAK,GAAI,EAAE,CAAC,MAA2B,CAAC,KAAK,CAAC;MACnD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;KAC1C,CAAC;IAMM,WAAM,GAAG,CAAC,EAAS;MACzB,MAAM,KAAK,GAAI,EAAE,CAAC,MAA2B,CAAC,KAAK,CAAC;MACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;KACpC,CAAC;IAMM,YAAO,GAAG,CAAC,EAAS;MAC1B,MAAM,KAAK,GAAI,EAAE,CAAC,MAA2B,CAAC,KAAK,CAAC;MACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;KACrC,CAAC;IAOM,eAAU,GAAG;MACnB,OAAO,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;KACtB,CAAC;IAUM,cAAS,GAAG,CAAC,MAAkC;MACrD,OAAO,MA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E,GAAG,OAAO,YAAY,EAC1B,KAAK,EAAC,WAAW,IAEhB,QAAQ,OAAG,WAAW,CAClB,EACPA,kBAAM,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACO,CACZ,CACP,CACmB,CACvB,CACkB,CAChB,EACP;GACH;;;;;;;;;;;","names":["IcInformationStatus","debounceEvent","inheritAttributes","IC_INHERITED_ARIA","addFormResetListener","onComponentRequiredPropUndefined","removeFormResetListener","getInputDescribedByText","renderHiddenInput","h","Host","isEmptyString"],"sources":["./src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","./src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field \n */\n display: block;\n width: 100%;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 6px;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n.fullwidth {\n position: relative;\n width: 100%;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n}\n\n.exceeded {\n color: var(--ic-status-error);\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n} from \"@stencil/core\";\n\nimport {\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n} from \"../../interface\";\nimport { IcInformationStatus } from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n @Element() el: HTMLIcTextFieldElement;\n\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * If `true`, the small styling will be applied to the text field.\n */\n @Prop({ reflect: true }) small: boolean = false;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n\n /**\n * The maximum number of characters that can be entered in the field.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n private showLeftIcon: boolean = this.hasLeftIconSlot();\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n @State() numChars: number = 0;\n @State() maxLengthExceeded: boolean = false;\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n if (this.maxLength > 0) {\n this.numChars = newValue.length;\n if (newValue.length > this.maxLength) {\n this.maxLengthExceeded = true;\n } else {\n this.maxLengthExceeded = false;\n }\n }\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * Sets focus on the native `input`\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.inputEl) {\n this.inputEl.focus();\n }\n }\n\n //stop keydown event bubbling up to storybook\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n ev.cancelBubble = true;\n }\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icBlur.emit({ value: value });\n };\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n private onFocus = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icFocus.emit({ value: value });\n };\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n private isTextArea = (): boolean => {\n return this.rows > 1;\n };\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n if (iconEl != null) {\n return true;\n }\n return false;\n }\n\n private hasStatus = (status: IcInformationStatusOrEmpty): boolean => {\n return status !== \"\" && !this.disabled;\n };\n\n private showStatusText = (status: IcInformationStatusOrEmpty): boolean => {\n if (\n this.hasStatus(status) &&\n !(status == IcInformationStatus.Success && this.validationInline)\n ) {\n return true;\n }\n return false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n componentWillLoad(): void {\n this.watchValueHandler(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n \"aria-autocomplete\",\n \"aria-haspopup\",\n ]);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n validationStatus,\n validationText,\n validationInline,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : disabled;\n\n const placeholderText = disabled ? \"\" : placeholder;\n\n const currentStatus = maxLengthExceeded\n ? IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? \"Maximum length exceeded\"\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n\n const messageAriaLive =\n maxLengthExceeded ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText = this.showStatusText(currentStatus);\n const multiline = this.isTextArea();\n const hiddenCharCountDescId =\n maxLength > 0 ? inputId + \"-charcount-desc\" : \"\";\n const describedBy = (\n hiddenCharCountDescId +\n \" \" +\n getInputDescribedByText(inputId, helperText !== \"\", showStatusText)\n ).trim();\n\n if (this.showLeftIcon) {\n if (!readonly && disabledMode) {\n this.showLeftIcon = false;\n }\n }\n\n const invalid =\n currentStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n const disabledText = disabledMode && !readonly;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n small={small}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {this.showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline && (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n value={value}\n class={{\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholderText}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n {...this.inheritedAttributes}\n ></input>\n )}\n {multiline && (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholderText}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n <slot name=\"clear-button\"></slot>\n <slot name=\"search-submit-button\"></slot>\n </ic-input-component-container>\n <slot name=\"menu\"></slot>\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0) && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline)\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"exceeded\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
16
16
|
return patchEsm().then(() => {
|
17
|
-
return index.bootstrapLazy(JSON.parse("[[\"ic-typography.cjs\",[[1,\"ic-typography\",{\"variant\":[1],\"applyVerticalMargins\":[4,\"apply-vertical-margins\"]}]]],[\"ic-search-bar.cjs\",[[1,\"ic-search-bar\",{\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"disableFilter\":[4,\"disable-filter\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"value\":[1537],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[2],\"name\":[1],\"spellcheck\":[4],\"options\":[16],\"focusOnLoad\":[4,\"focus-on-load\"],\"hintText\":[1,\"hint-text\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"charactersUntilSuggestion\":[2,\"characters-until-suggestion\"],\"open\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"showClearButton\":[32],\"clearButtonFocused\":[32],\"searchSubmitFocused\":[32],\"prevNoOption\":[32],\"highlightedValue\":[32],\"setFocus\":[64]},[[0,\"icKeydown\",\"handleKeyDown\"],[0,\"keyup\",\"handleKeyUp\"],[0,\"icMenuStateChange\",\"onMenuClose\"],[0,\"menuOptionId\",\"onMenuOptionHighlighted\"]]]]],[\"ic-select.cjs\",[[1,\"ic-select\",{\"label\":[1],\"options\":[16],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[516],\"readonly\":[4],\"placeholder\":[1],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"fullWidth\":[4,\"full-width\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"value\":[1025],\"name\":[1],\"showClearButton\":[4,\"show-clear-button\"],\"searchable\":[4],\"includeDescriptionsInSearch\":[4,\"include-descriptions-in-search\"],\"includeGroupTitlesInSearch\":[4,\"include-group-titles-in-search\"],\"searchMatchPosition\":[1,\"search-match-position\"],\"charactersUntilSuggestions\":[2,\"characters-until-suggestions\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"open\":[32],\"clearButtonFocused\":[32],\"searchableSelectInputValue\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"noOptions\":[32],\"initialValue\":[32],\"setFocus\":[64]}]]],[\"ic-top-navigation.cjs\",[[1,\"ic-top-navigation\",{\"appTitle\":[1,\"app-title\"],\"href\":[1],\"version\":[1],\"status\":[1],\"contentAligned\":[1,\"content-aligned\"],\"inline\":[4],\"menuOpen\":[32],\"deviceSize\":[32],\"mobileSearchBarVisible\":[32],\"navMenuVisible\":[32],\"searchValue\":[32],\"mobileSearchHiddenOnBlur\":[32],\"searchButtonClick\":[32],\"foregroundColor\":[32],\"hasFullWidthSearchBar\":[32]},[[0,\"icNavigationMenuClose\",\"navBarMenuCloseHandler\"],[0,\"icSearchBarBlur\",\"searchInputBlurHandler\"],[0,\"icChange\",\"searchValueChangeHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-side-navigation.cjs\",[[1,\"ic-side-navigation\",{\"appTitle\":[1,\"app-title\"],\"status\":[1],\"version\":[1],\"expanded\":[4],\"href\":[1],\"static\":[4],\"collapsedIconLabels\":[4,\"collapsed-icon-labels\"],\"inline\":[4],\"disableAutoParentStyling\":[4,\"disable-auto-parent-styling\"],\"foregroundColor\":[32],\"menuOpen\":[32],\"menuExpanded\":[32],\"deviceSize\":[32],\"deviceSizeAppTitle\":[32],\"hasSecondaryNavigation\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-alert.cjs\",[[1,\"ic-alert\",{\"variant\":[1],\"heading\":[1],\"message\":[1],\"titleAbove\":[4,\"title-above\"],\"dismissible\":[4],\"announced\":[4],\"visible\":[32],\"alertTitleWrap\":[32]},[[2,\"icDismiss\",\"handleClick\"]]]]],[\"ic-card.cjs\",[[1,\"ic-card\",{\"clickable\":[1028],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"heading\":[1],\"subheading\":[1],\"message\":[1],\"disabled\":[4],\"fullWidth\":[4,\"full-width\"],\"expandable\":[4],\"parentIsAnchorTag\":[32],\"isFocussed\":[32],\"parentEl\":[32],\"appearance\":[32],\"areaExpanded\":[32]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-navigation-button.cjs\",[[1,\"ic-navigation-button\",{\"label\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"mode\":[32],\"initialAppearance\":[32],\"setFocus\":[64]},[[4,\"icNavigationMenuOpened\",\"navBarMenuOpenHandler\"],[4,\"icNavigationMenuClosed\",\"navBarMenuCloseHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-checkbox-group.cjs\",[[1,\"ic-checkbox-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedOptions\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-radio-group.cjs\",[[1,\"ic-radio-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedValue\":[32],\"selectedChild\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-breadcrumb-group.cjs\",[[1,\"ic-breadcrumb-group\",{\"backBreadcrumbOnly\":[4,\"back-breadcrumb-only\"],\"collapsed\":[4],\"deviceSize\":[32],\"expandedBreadcrumbs\":[32]}]]],[\"ic-chip.cjs\",[[1,\"ic-chip\",{\"label\":[1],\"appearance\":[1],\"size\":[1],\"dismissible\":[4],\"disabled\":[4],\"visible\":[32],\"isHovered\":[32]},[[2,\"dismiss\",\"handleClick\"]]]]],[\"ic-footer.cjs\",[[1,\"ic-footer\",{\"description\":[1],\"aligned\":[1],\"breakpoint\":[1],\"groupLinks\":[4,\"group-links\"],\"caption\":[1],\"copyright\":[4],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-footer-link-group.cjs\",[[1,\"ic-footer-link-group\",{\"groupTitle\":[1,\"group-title\"],\"small\":[32],\"expanded\":[32],\"dropdownIconStyle\":[32],\"deviceSize\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-hero.cjs\",[[1,\"ic-hero\",{\"heading\":[1],\"subheading\":[1],\"secondaryHeading\":[1,\"secondary-heading\"],\"secondarySubheading\":[1,\"secondary-subheading\"],\"backgroundImage\":[1,\"background-image\"],\"disableBackgroundParallax\":[4,\"disable-background-parallax\"],\"aligned\":[1],\"contentAligned\":[1,\"content-aligned\"],\"small\":[4],\"rightContent\":[32],\"scrollFactor\":[32],\"leftContentFullWidth\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"],[5,\"scroll\",\"doScroll\"]]]]],[\"ic-navigation-item.cjs\",[[1,\"ic-navigation-item\",{\"label\":[1],\"href\":[1],\"selected\":[4],\"expandable\":[4],\"displayNavigationTooltip\":[4,\"display-navigation-tooltip\"],\"collapsedIconLabel\":[4,\"collapsed-icon-label\"],\"isTopNavChild\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"sideNavExpanded\":[32],\"isSideNavMobile\":[32],\"setFocus\":[64]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-page-header.cjs\",[[1,\"ic-page-header\",{\"heading\":[1],\"subheading\":[1],\"aligned\":[1],\"small\":[4],\"border\":[4],\"sticky\":[4],\"stickyDesktopOnly\":[4,\"sticky-desktop-only\"],\"reverseOrder\":[4,\"reverse-order\"],\"deviceSize\":[32],\"areButtonsReversed\":[32],\"actionContent\":[32]}]]],[\"ic-step.cjs\",[[1,\"ic-step\",{\"variant\":[1],\"stepTitle\":[1,\"step-title\"],\"stepSubtitle\":[1,\"step-subtitle\"],\"stepStatus\":[1,\"step-status\"],\"stepType\":[1,\"step-type\"],\"current\":[1028],\"compactStepStyling\":[1,\"compact-step-styling\"],\"stepNum\":[2,\"step-num\"],\"lastStep\":[4,\"last-step\"],\"lastStepNum\":[2,\"last-step-num\"],\"nextStepTitle\":[1,\"next-step-title\"],\"progress\":[2]}]]],[\"ic-switch.cjs\",[[1,\"ic-switch\",{\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"checked\":[4],\"small\":[4],\"disabled\":[4],\"name\":[1],\"showState\":[4,\"show-state\"],\"value\":[1],\"checkedState\":[32],\"initiallyChecked\":[32]}]]],[\"ic-tab-group.cjs\",[[1,\"ic-tab-group\",{\"contextId\":[513,\"context-id\"],\"inline\":[516],\"label\":[1],\"appearance\":[1],\"firstTabVisible\":[32],\"lastTabVisible\":[32],\"tabOverflow\":[32],\"scrollTabIntoView\":[64]},[[0,\"tabFocus\",\"tabFocusHandler\"]]]]],[\"ic-back-to-top.cjs\",[[1,\"ic-back-to-top\",{\"target\":[1],\"bannerOffset\":[32],\"targetElVisible\":[32],\"footerVisible\":[32]}]]],[\"ic-checkbox.cjs\",[[1,\"ic-checkbox\",{\"checked\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"indeterminate\":[4],\"initiallyChecked\":[32]}]]],[\"ic-classification-banner.cjs\",[[1,\"ic-classification-banner\",{\"additionalSelectors\":[1,\"additional-selectors\"],\"classification\":[1],\"country\":[1],\"inline\":[4],\"upTo\":[4,\"up-to\"]}]]],[\"ic-data-entity.cjs\",[[1,\"ic-data-entity\",{\"heading\":[1],\"small\":[4]}]]],[\"ic-data-row.cjs\",[[1,\"ic-data-row\",{\"label\":[1],\"value\":[1],\"small\":[4],\"deviceSize\":[32],\"entitySize\":[32]}]]],[\"ic-navigation-group.cjs\",[[1,\"ic-navigation-group\",{\"label\":[1],\"expandable\":[4],\"dropdownOpen\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"expanded\":[32],\"setFocus\":[64]},[[0,\"childBlur\",\"childBlurHandler\"],[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-radio-option.cjs\",[[1,\"ic-radio-option\",{\"selected\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1025],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"initiallySelected\":[32]},[[0,\"icChange\",\"textfieldValueHandler\"]]]]],[\"ic-status-tag.cjs\",[[1,\"ic-status-tag\",{\"label\":[1],\"status\":[1],\"appearance\":[1],\"small\":[4],\"announced\":[4]}]]],[\"ic-tab.cjs\",[[1,\"ic-tab\",{\"contextId\":[513,\"context-id\"],\"disabled\":[4],\"selected\":[516],\"tabId\":[513,\"tab-id\"],\"tabPosition\":[2,\"tab-position\"],\"appearance\":[1]}]]],[\"ic-footer-link.cjs\",[[1,\"ic-footer-link\",{\"href\":[1],\"footerConfig\":[32],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-skeleton.cjs\",[[1,\"ic-skeleton\",{\"variant\":[1],\"light\":[4],\"hasChild\":[32],\"default\":[32],\"heightOnly\":[32],\"widthOnly\":[32]}]]],[\"ic-stepper.cjs\",[[1,\"ic-stepper\",{\"aligned\":[1],\"variant\":[1025],\"connectorWidth\":[2,\"connector-width\"],\"hideStepInfo\":[4,\"hide-step-info\"],\"stepperWidth\":[32],\"lastStepWidth\":[32],\"stepTypes\":[32],\"alignedFullWidth\":[32],\"autoSetStepTitles\":[32],\"variantOverride\":[32],\"noOfResizes\":[32]}]]],[\"ic-tab-context.cjs\",[[4,\"ic-tab-context\",{\"contextId\":[513,\"context-id\"],\"activationType\":[1,\"activation-type\"],\"selectedTabIndex\":[2,\"selected-tab-index\"],\"appearance\":[1],\"selectedTab\":[32]},[[0,\"tabClick\",\"tabClickHandler\"]]]]],[\"ic-tab-panel.cjs\",[[1,\"ic-tab-panel\",{\"contextId\":[513,\"context-id\"],\"tabPosition\":[514,\"tab-position\"],\"panelId\":[513,\"panel-id\"],\"selectedTab\":[1,\"selected-tab\"],\"appearance\":[1]}]]],[\"ic-theme.cjs\",[[1,\"ic-theme\",{\"color\":[1]}]]],[\"ic-input-component-container_3.cjs\",[[1,\"ic-menu\",{\"open\":[516],\"options\":[16],\"small\":[516],\"menuId\":[1,\"menu-id\"],\"value\":[1],\"activationType\":[1,\"activation-type\"],\"inputEl\":[16],\"parentEl\":[16],\"inputLabel\":[1,\"input-label\"],\"anchorEl\":[16],\"fullWidth\":[4,\"full-width\"],\"autoFocusOnSelected\":[4,\"auto-focus-on-selected\"],\"keyboardNav\":[32],\"optionHighlighted\":[32],\"focusFromSearchKeypress\":[32],\"initialOptionsListRender\":[32],\"preventIncorrectTabOrder\":[32],\"handleClickOpen\":[64],\"handleKeyboardOpen\":[64],\"handleSetFirstOption\":[64]},[[4,\"icClear\",\"handleClearListener\"],[4,\"icSubmitSearch\",\"handleSubmitSearch\"]]],[4,\"ic-input-component-container\",{\"disabled\":[4],\"readonly\":[4],\"validationStatus\":[1,\"validation-status\"],\"small\":[4],\"multiLine\":[4,\"multi-line\"],\"validationInline\":[4,\"validation-inline\"],\"dark\":[4],\"fullWidth\":[4,\"full-width\"]}],[4,\"ic-input-container\",{\"disabled\":[4],\"readonly\":[4]}]]],[\"ic-input-label_2.cjs\",[[4,\"ic-input-validation\",{\"message\":[1],\"for\":[1],\"status\":[1],\"fullWidth\":[4,\"full-width\"],\"ariaLiveMode\":[1,\"aria-live-mode\"]}],[0,\"ic-input-label\",{\"for\":[1],\"required\":[4],\"helperText\":[1,\"helper-text\"],\"label\":[1],\"disabled\":[4],\"readonly\":[4],\"error\":[4],\"dark\":[4]}]]],[\"ic-text-field.cjs\",[[1,\"ic-text-field\",{\"inputId\":[1,\"input-id\"],\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[516],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"rows\":[2],\"resize\":[4],\"small\":[516],\"value\":[1537],\"maxLength\":[2,\"max-length\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"validationInline\":[4,\"validation-inline\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autoFocus\":[4,\"auto-focus\"],\"debounce\":[2],\"type\":[1],\"inputmode\":[1],\"name\":[1],\"spellcheck\":[4],\"ariaActiveDescendant\":[1,\"aria-active-descendant\"],\"truncateValue\":[4,\"truncate-value\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaOwns\":[1,\"aria-owns\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"role\":[1],\"hiddenInput\":[4,\"hidden-input\"],\"numChars\":[32],\"maxLengthExceeded\":[32],\"initialValue\":[32],\"setFocus\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-button_3.cjs\",[[1,\"ic-button\",{\"disabled\":[4],\"loading\":[4],\"type\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"variant\":[1],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"disableTooltip\":[4,\"disable-tooltip\"],\"tooltipPlacement\":[1,\"tooltip-placement\"],\"appearance\":[1025],\"setFocus\":[64],\"updateAriaLabel\":[64]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]],[1,\"ic-loading-indicator\",{\"progress\":[2],\"min\":[2],\"max\":[2],\"label\":[1],\"description\":[1],\"innerLabel\":[2,\"inner-label\"],\"labelDuration\":[2,\"label-duration\"],\"size\":[513],\"type\":[513],\"fullWidth\":[516,\"full-width\"],\"appearance\":[1],\"indicatorLabel\":[32],\"indeterminate\":[32],\"showSecond\":[32],\"circularLineWidth\":[32],\"compactStepCircularLineWidth\":[32],\"circularDiameter\":[32]}],[1,\"ic-tooltip\",{\"target\":[513],\"placement\":[1],\"label\":[1],\"disableHover\":[4,\"disable-hover\"]}]]],[\"ic-navigation-menu.cjs\",[[1,\"ic-navigation-menu\",{\"version\":[1],\"status\":[1]},[[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-link.cjs\",[[1,\"ic-link\",{\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"showIcon\":[4,\"show-icon\"],\"appearance\":[1025]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-breadcrumb.cjs\",[[1,\"ic-breadcrumb\",{\"pageTitle\":[1,\"page-title\"],\"href\":[1],\"current\":[4],\"showBackIcon\":[516,\"show-back-icon\"]}]]],[\"ic-divider.cjs\",[[2,\"ic-divider\",{\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-section-container.cjs\",[[1,\"ic-section-container\",{\"aligned\":[1],\"fullHeight\":[4,\"full-height\"]}]]]]"), options);
|
17
|
+
return index.bootstrapLazy(JSON.parse("[[\"ic-typography.cjs\",[[1,\"ic-typography\",{\"variant\":[1],\"applyVerticalMargins\":[4,\"apply-vertical-margins\"]}]]],[\"ic-search-bar.cjs\",[[1,\"ic-search-bar\",{\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"disableFilter\":[4,\"disable-filter\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"value\":[1537],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[2],\"name\":[1],\"spellcheck\":[4],\"options\":[16],\"focusOnLoad\":[4,\"focus-on-load\"],\"hintText\":[1,\"hint-text\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"charactersUntilSuggestion\":[2,\"characters-until-suggestion\"],\"open\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"showClearButton\":[32],\"clearButtonFocused\":[32],\"searchSubmitFocused\":[32],\"prevNoOption\":[32],\"highlightedValue\":[32],\"setFocus\":[64]},[[0,\"icKeydown\",\"handleKeyDown\"],[0,\"keyup\",\"handleKeyUp\"],[0,\"icMenuStateChange\",\"onMenuClose\"],[0,\"menuOptionId\",\"onMenuOptionHighlighted\"]]]]],[\"ic-select.cjs\",[[1,\"ic-select\",{\"label\":[1],\"options\":[16],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[516],\"readonly\":[4],\"placeholder\":[1],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"fullWidth\":[4,\"full-width\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"value\":[1025],\"name\":[1],\"showClearButton\":[4,\"show-clear-button\"],\"searchable\":[4],\"includeDescriptionsInSearch\":[4,\"include-descriptions-in-search\"],\"includeGroupTitlesInSearch\":[4,\"include-group-titles-in-search\"],\"searchMatchPosition\":[1,\"search-match-position\"],\"charactersUntilSuggestions\":[2,\"characters-until-suggestions\"],\"emptyOptionListText\":[1,\"empty-option-list-text\"],\"open\":[32],\"clearButtonFocused\":[32],\"searchableSelectInputValue\":[32],\"filteredOptions\":[32],\"ariaActiveDescendant\":[32],\"noOptions\":[32],\"initialValue\":[32],\"setFocus\":[64]}]]],[\"ic-top-navigation.cjs\",[[1,\"ic-top-navigation\",{\"appTitle\":[1,\"app-title\"],\"href\":[1],\"version\":[1],\"status\":[1],\"contentAligned\":[1,\"content-aligned\"],\"inline\":[4],\"menuOpen\":[32],\"deviceSize\":[32],\"mobileSearchBarVisible\":[32],\"navMenuVisible\":[32],\"searchValue\":[32],\"mobileSearchHiddenOnBlur\":[32],\"searchButtonClick\":[32],\"foregroundColor\":[32],\"hasFullWidthSearchBar\":[32]},[[0,\"icNavigationMenuClose\",\"navBarMenuCloseHandler\"],[0,\"icSearchBarBlur\",\"searchInputBlurHandler\"],[0,\"icChange\",\"searchValueChangeHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-side-navigation.cjs\",[[1,\"ic-side-navigation\",{\"appTitle\":[1,\"app-title\"],\"status\":[1],\"version\":[1],\"expanded\":[4],\"href\":[1],\"static\":[4],\"collapsedIconLabels\":[4,\"collapsed-icon-labels\"],\"inline\":[4],\"disableAutoParentStyling\":[4,\"disable-auto-parent-styling\"],\"foregroundColor\":[32],\"menuOpen\":[32],\"menuExpanded\":[32],\"deviceSize\":[32],\"deviceSizeAppTitle\":[32],\"hasSecondaryNavigation\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-alert.cjs\",[[1,\"ic-alert\",{\"variant\":[1],\"heading\":[1],\"message\":[1],\"titleAbove\":[4,\"title-above\"],\"dismissible\":[4],\"announced\":[4],\"visible\":[32],\"alertTitleWrap\":[32]},[[2,\"icDismiss\",\"handleClick\"]]]]],[\"ic-card.cjs\",[[1,\"ic-card\",{\"clickable\":[1028],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"heading\":[1],\"subheading\":[1],\"message\":[1],\"disabled\":[4],\"fullWidth\":[4,\"full-width\"],\"expandable\":[4],\"parentIsAnchorTag\":[32],\"isFocussed\":[32],\"parentEl\":[32],\"appearance\":[32],\"areaExpanded\":[32]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-navigation-button.cjs\",[[1,\"ic-navigation-button\",{\"label\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"mode\":[32],\"initialAppearance\":[32],\"setFocus\":[64]},[[4,\"icNavigationMenuOpened\",\"navBarMenuOpenHandler\"],[4,\"icNavigationMenuClosed\",\"navBarMenuCloseHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-checkbox-group.cjs\",[[1,\"ic-checkbox-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedOptions\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-radio-group.cjs\",[[1,\"ic-radio-group\",{\"label\":[1],\"name\":[1],\"required\":[4],\"hideLabel\":[4,\"hide-label\"],\"disabled\":[4],\"helperText\":[1,\"helper-text\"],\"small\":[4],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"checkedValue\":[32],\"selectedChild\":[32]},[[0,\"icCheck\",\"selectHandler\"]]]]],[\"ic-breadcrumb-group.cjs\",[[1,\"ic-breadcrumb-group\",{\"backBreadcrumbOnly\":[4,\"back-breadcrumb-only\"],\"collapsed\":[4],\"deviceSize\":[32],\"expandedBreadcrumbs\":[32]}]]],[\"ic-chip.cjs\",[[1,\"ic-chip\",{\"label\":[1],\"appearance\":[1],\"size\":[1],\"dismissible\":[4],\"disabled\":[4],\"visible\":[32],\"isHovered\":[32]},[[2,\"icDismiss\",\"handleClick\"]]]]],[\"ic-footer.cjs\",[[1,\"ic-footer\",{\"description\":[1],\"aligned\":[1],\"breakpoint\":[1],\"groupLinks\":[4,\"group-links\"],\"caption\":[1],\"copyright\":[4],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-footer-link-group.cjs\",[[1,\"ic-footer-link-group\",{\"groupTitle\":[1,\"group-title\"],\"small\":[32],\"expanded\":[32],\"dropdownIconStyle\":[32],\"deviceSize\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-hero.cjs\",[[1,\"ic-hero\",{\"heading\":[1],\"subheading\":[1],\"secondaryHeading\":[1,\"secondary-heading\"],\"secondarySubheading\":[1,\"secondary-subheading\"],\"backgroundImage\":[1,\"background-image\"],\"disableBackgroundParallax\":[4,\"disable-background-parallax\"],\"aligned\":[1],\"contentAligned\":[1,\"content-aligned\"],\"small\":[4],\"rightContent\":[32],\"scrollFactor\":[32],\"leftContentFullWidth\":[32],\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"],[5,\"scroll\",\"doScroll\"]]]]],[\"ic-navigation-item.cjs\",[[1,\"ic-navigation-item\",{\"label\":[1],\"href\":[1],\"selected\":[4],\"expandable\":[4],\"displayNavigationTooltip\":[4,\"display-navigation-tooltip\"],\"collapsedIconLabel\":[4,\"collapsed-icon-label\"],\"isTopNavChild\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"sideNavExpanded\":[32],\"isSideNavMobile\":[32],\"setFocus\":[64]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-page-header.cjs\",[[1,\"ic-page-header\",{\"heading\":[1],\"subheading\":[1],\"aligned\":[1],\"small\":[4],\"border\":[4],\"sticky\":[4],\"stickyDesktopOnly\":[4,\"sticky-desktop-only\"],\"reverseOrder\":[4,\"reverse-order\"],\"deviceSize\":[32],\"areButtonsReversed\":[32],\"actionContent\":[32]}]]],[\"ic-step.cjs\",[[1,\"ic-step\",{\"variant\":[1],\"stepTitle\":[1,\"step-title\"],\"stepSubtitle\":[1,\"step-subtitle\"],\"stepStatus\":[1,\"step-status\"],\"stepType\":[1,\"step-type\"],\"current\":[1028],\"compactStepStyling\":[1,\"compact-step-styling\"],\"stepNum\":[2,\"step-num\"],\"lastStep\":[4,\"last-step\"],\"lastStepNum\":[2,\"last-step-num\"],\"nextStepTitle\":[1,\"next-step-title\"],\"progress\":[2]}]]],[\"ic-switch.cjs\",[[1,\"ic-switch\",{\"label\":[1],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"checked\":[4],\"small\":[4],\"disabled\":[4],\"name\":[1],\"showState\":[4,\"show-state\"],\"value\":[1],\"checkedState\":[32],\"initiallyChecked\":[32]}]]],[\"ic-tab-group.cjs\",[[1,\"ic-tab-group\",{\"contextId\":[513,\"context-id\"],\"inline\":[516],\"label\":[1],\"appearance\":[1],\"firstTabVisible\":[32],\"lastTabVisible\":[32],\"tabOverflow\":[32],\"scrollTabIntoView\":[64]},[[0,\"tabFocus\",\"tabFocusHandler\"]]]]],[\"ic-back-to-top.cjs\",[[1,\"ic-back-to-top\",{\"target\":[1],\"bannerOffset\":[32],\"targetElVisible\":[32],\"footerVisible\":[32]}]]],[\"ic-checkbox.cjs\",[[1,\"ic-checkbox\",{\"checked\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"indeterminate\":[4],\"initiallyChecked\":[32]}]]],[\"ic-classification-banner.cjs\",[[1,\"ic-classification-banner\",{\"additionalSelectors\":[1,\"additional-selectors\"],\"classification\":[1],\"country\":[1],\"inline\":[4],\"upTo\":[4,\"up-to\"]}]]],[\"ic-data-entity.cjs\",[[1,\"ic-data-entity\",{\"heading\":[1],\"small\":[4]}]]],[\"ic-data-row.cjs\",[[1,\"ic-data-row\",{\"label\":[1],\"value\":[1],\"small\":[4],\"deviceSize\":[32],\"entitySize\":[32]}]]],[\"ic-navigation-group.cjs\",[[1,\"ic-navigation-group\",{\"label\":[1],\"expandable\":[4],\"dropdownOpen\":[32],\"inTopNavSideMenu\":[32],\"deviceSize\":[32],\"focusStyle\":[32],\"navigationType\":[32],\"parentEl\":[32],\"expanded\":[32],\"setFocus\":[64]},[[0,\"childBlur\",\"childBlurHandler\"],[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-radio-option.cjs\",[[1,\"ic-radio-option\",{\"selected\":[1540],\"disabled\":[4],\"label\":[1],\"value\":[1025],\"name\":[1],\"groupLabel\":[1,\"group-label\"],\"dynamicText\":[1,\"dynamic-text\"],\"additionalFieldDisplay\":[513,\"additional-field-display\"],\"initiallySelected\":[32]},[[0,\"icChange\",\"textfieldValueHandler\"]]]]],[\"ic-status-tag.cjs\",[[1,\"ic-status-tag\",{\"label\":[1],\"status\":[1],\"appearance\":[1],\"small\":[4],\"announced\":[4]}]]],[\"ic-tab.cjs\",[[1,\"ic-tab\",{\"contextId\":[513,\"context-id\"],\"disabled\":[4],\"selected\":[516],\"tabId\":[513,\"tab-id\"],\"tabPosition\":[2,\"tab-position\"],\"appearance\":[1]}]]],[\"ic-footer-link.cjs\",[[1,\"ic-footer-link\",{\"href\":[1],\"footerConfig\":[32],\"deviceSize\":[32],\"foregroundColor\":[32]},[[4,\"footerResized\",\"footerResizeHandler\"],[4,\"themeChange\",\"footerThemeChangeHandler\"]]]]],[\"ic-skeleton.cjs\",[[1,\"ic-skeleton\",{\"variant\":[1],\"light\":[4],\"hasChild\":[32],\"default\":[32],\"heightOnly\":[32],\"widthOnly\":[32]}]]],[\"ic-stepper.cjs\",[[1,\"ic-stepper\",{\"aligned\":[1],\"variant\":[1025],\"connectorWidth\":[2,\"connector-width\"],\"hideStepInfo\":[4,\"hide-step-info\"],\"stepperWidth\":[32],\"lastStepWidth\":[32],\"stepTypes\":[32],\"alignedFullWidth\":[32],\"autoSetStepTitles\":[32],\"variantOverride\":[32],\"noOfResizes\":[32]}]]],[\"ic-tab-context.cjs\",[[4,\"ic-tab-context\",{\"contextId\":[513,\"context-id\"],\"activationType\":[1,\"activation-type\"],\"selectedTabIndex\":[2,\"selected-tab-index\"],\"appearance\":[1],\"selectedTab\":[32]},[[0,\"tabClick\",\"tabClickHandler\"]]]]],[\"ic-tab-panel.cjs\",[[1,\"ic-tab-panel\",{\"contextId\":[513,\"context-id\"],\"tabPosition\":[514,\"tab-position\"],\"panelId\":[513,\"panel-id\"],\"selectedTab\":[1,\"selected-tab\"],\"appearance\":[1]}]]],[\"ic-theme.cjs\",[[1,\"ic-theme\",{\"color\":[1]}]]],[\"ic-input-component-container_3.cjs\",[[1,\"ic-menu\",{\"open\":[516],\"options\":[16],\"small\":[516],\"menuId\":[1,\"menu-id\"],\"value\":[1],\"activationType\":[1,\"activation-type\"],\"inputEl\":[16],\"parentEl\":[16],\"inputLabel\":[1,\"input-label\"],\"anchorEl\":[16],\"fullWidth\":[4,\"full-width\"],\"autoFocusOnSelected\":[4,\"auto-focus-on-selected\"],\"keyboardNav\":[32],\"optionHighlighted\":[32],\"focusFromSearchKeypress\":[32],\"initialOptionsListRender\":[32],\"preventIncorrectTabOrder\":[32],\"handleClickOpen\":[64],\"handleKeyboardOpen\":[64],\"handleSetFirstOption\":[64]},[[4,\"icClear\",\"handleClearListener\"],[4,\"icSubmitSearch\",\"handleSubmitSearch\"]]],[4,\"ic-input-component-container\",{\"disabled\":[4],\"readonly\":[4],\"validationStatus\":[1,\"validation-status\"],\"small\":[4],\"multiLine\":[4,\"multi-line\"],\"validationInline\":[4,\"validation-inline\"],\"dark\":[4],\"fullWidth\":[4,\"full-width\"]}],[4,\"ic-input-container\",{\"disabled\":[4],\"readonly\":[4]}]]],[\"ic-input-label_2.cjs\",[[4,\"ic-input-validation\",{\"message\":[1],\"for\":[1],\"status\":[1],\"fullWidth\":[4,\"full-width\"],\"ariaLiveMode\":[1,\"aria-live-mode\"]}],[0,\"ic-input-label\",{\"for\":[1],\"required\":[4],\"helperText\":[1,\"helper-text\"],\"label\":[1],\"disabled\":[4],\"readonly\":[4],\"error\":[4],\"dark\":[4]}]]],[\"ic-text-field.cjs\",[[1,\"ic-text-field\",{\"inputId\":[1,\"input-id\"],\"label\":[1],\"required\":[4],\"disabled\":[4],\"readonly\":[516],\"placeholder\":[1],\"fullWidth\":[4,\"full-width\"],\"hideLabel\":[4,\"hide-label\"],\"helperText\":[1,\"helper-text\"],\"rows\":[2],\"resize\":[4],\"small\":[516],\"value\":[1537],\"maxLength\":[2,\"max-length\"],\"validationStatus\":[1,\"validation-status\"],\"validationText\":[1,\"validation-text\"],\"validationInline\":[4,\"validation-inline\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autoFocus\":[4,\"auto-focus\"],\"debounce\":[2],\"type\":[1],\"inputmode\":[1],\"name\":[1],\"spellcheck\":[4],\"ariaActiveDescendant\":[1,\"aria-active-descendant\"],\"truncateValue\":[4,\"truncate-value\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaOwns\":[1,\"aria-owns\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"role\":[1],\"hiddenInput\":[4,\"hidden-input\"],\"numChars\":[32],\"maxLengthExceeded\":[32],\"initialValue\":[32],\"setFocus\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-button_3.cjs\",[[1,\"ic-button\",{\"disabled\":[4],\"loading\":[4],\"type\":[1],\"href\":[1],\"target\":[1],\"rel\":[1],\"download\":[8],\"hreflang\":[1],\"referrerpolicy\":[1],\"variant\":[1],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"disableTooltip\":[4,\"disable-tooltip\"],\"tooltipPlacement\":[1,\"tooltip-placement\"],\"appearance\":[1025],\"setFocus\":[64],\"updateAriaLabel\":[64]},[[2,\"click\",\"handleHostClick\"],[4,\"themeChange\",\"themeChangeHandler\"]]],[1,\"ic-loading-indicator\",{\"progress\":[2],\"min\":[2],\"max\":[2],\"label\":[1],\"description\":[1],\"innerLabel\":[2,\"inner-label\"],\"labelDuration\":[2,\"label-duration\"],\"size\":[513],\"type\":[513],\"fullWidth\":[516,\"full-width\"],\"appearance\":[1],\"indicatorLabel\":[32],\"indeterminate\":[32],\"showSecond\":[32],\"circularLineWidth\":[32],\"compactStepCircularLineWidth\":[32],\"circularDiameter\":[32]}],[1,\"ic-tooltip\",{\"target\":[513],\"placement\":[1],\"label\":[1],\"disableHover\":[4,\"disable-hover\"]}]]],[\"ic-navigation-menu.cjs\",[[1,\"ic-navigation-menu\",{\"version\":[1],\"status\":[1]},[[0,\"navItemClicked\",\"navItemClickHandler\"],[4,\"keydown\",\"handleKeyDown\"]]]]],[\"ic-link.cjs\",[[1,\"ic-link\",{\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"target\":[1],\"showIcon\":[4,\"show-icon\"],\"appearance\":[1025]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-breadcrumb.cjs\",[[1,\"ic-breadcrumb\",{\"pageTitle\":[1,\"page-title\"],\"href\":[1],\"current\":[4],\"showBackIcon\":[516,\"show-back-icon\"]}]]],[\"ic-divider.cjs\",[[2,\"ic-divider\",{\"foregroundColor\":[32]},[[4,\"themeChange\",\"themeChangeHandler\"]]]]],[\"ic-section-container.cjs\",[[1,\"ic-section-container\",{\"aligned\":[1],\"fullHeight\":[4,\"full-height\"]}]]]]"), options);
|
18
18
|
});
|
19
19
|
};
|
20
20
|
|
@@ -153,7 +153,7 @@ export class Card {
|
|
153
153
|
"optional": true,
|
154
154
|
"docs": {
|
155
155
|
"tags": [],
|
156
|
-
"text": "The URL that the clickable card link points to."
|
156
|
+
"text": "The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button."
|
157
157
|
},
|
158
158
|
"attribute": "href",
|
159
159
|
"reflect": false
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-card.js","sourceRoot":"","sources":["../../../src/components/ic-card/ic-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,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I,CAAC,YAAY;YAC5C,CAAC,wBAAwB,CAAC,EAAE,IAAI,CAAC,YAAY;WAC9C,EACD,OAAO,EAAC,MAAM,EACd,cAAc,sBACH,wBAAwB,mBACpB,IAAI,CAAC,YAAY,mBAClB,uBAAuB,EACrC,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,SAAS,EAAE,WAAW,GACX,CACd,CACG,CACP;MACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,IAAI,CAAC,YAAY,IAAI,CAC/D,WAAK,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAC,uBAAuB;QACtD,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACP,CACS,CACb,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Listen, Prop, State, h } from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n */\n@Component({\n tag: \"ic-card\",\n styleUrl: \"ic-card.css\",\n shadow: true,\n})\nexport class Card {\n @Element() el: HTMLIcCardElement;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n /**\n * The URL that the clickable card link points to.\n */\n @Prop() href?: string | undefined;\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n /**\n * The heading for the card.\n */\n @Prop() heading!: string;\n /**\n * The subheading for the card.\n */\n @Prop() subheading?: string;\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\n /**\n * If `true`, the card will be disabled if it is clickable.\n */\n @Prop() disabled?: boolean = false;\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n /**\n * If `true`, the card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n @State() parentIsAnchorTag: boolean = false;\n\n @State() isFocussed: boolean = false;\n\n @State() parentEl: HTMLElement | null = null;\n\n @State() appearance?: IcThemeForeground = \"default\";\n\n @State() areaExpanded: boolean = false;\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n disconnectedCallback(): void {\n if (this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n }\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n heading,\n message,\n href,\n hreflang,\n referrerpolicy,\n rel,\n subheading,\n target,\n fullWidth,\n parentIsAnchorTag,\n isFocussed,\n } = this;\n\n const Component = parentIsAnchorTag\n ? \"div\"\n : clickable\n ? this.href === undefined\n ? \"button\"\n : \"a\"\n : \"div\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Component\n class={{\n [\"card\"]: true,\n [\"clickable\"]: clickable && !disabled,\n [\"disabled\"]: disabled,\n [\"fullwidth\"]: fullWidth,\n [\"focussed\"]: isFocussed,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : null}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled ? true : null}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div\n class={{\n [\"card-message\"]: true,\n }}\n >\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n {expandable && (\n <ic-button\n class={{\n [\"toggle-button\"]: true,\n [\"toggle-button-closed\"]: !this.areaExpanded,\n [\"toggle-button-expanded\"]: this.areaExpanded,\n }}\n variant=\"icon\"\n disableTooltip\n aria-label=\"Toggle expandable area\"\n aria-expanded={this.areaExpanded}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></ic-button>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n </Component>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ic-card.js","sourceRoot":"","sources":["../../../src/components/ic-card/ic-card.tsx"],"names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AAE,IAAI;YACvB,CAAC,sBAAsB,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY;YAC5C,CAAC,wBAAwB,CAAC,EAAE,IAAI,CAAC,YAAY;WAC9C,EACD,OAAO,EAAC,MAAM,EACd,cAAc,sBACH,wBAAwB,mBACpB,IAAI,CAAC,YAAY,mBAClB,uBAAuB,EACrC,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,SAAS,EAAE,WAAW,GACX,CACd,CACG,CACP;MACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,IAAI,CAAC,YAAY,IAAI,CAC/D,WAAK,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAC,uBAAuB;QACtD,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACP,CACS,CACb,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Listen, Prop, State, h } from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n */\n@Component({\n tag: \"ic-card\",\n styleUrl: \"ic-card.css\",\n shadow: true,\n})\nexport class Card {\n @Element() el: HTMLIcCardElement;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n /**\n * The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button.\n */\n @Prop() href?: string | undefined;\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n /**\n * The heading for the card.\n */\n @Prop() heading!: string;\n /**\n * The subheading for the card.\n */\n @Prop() subheading?: string;\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\n /**\n * If `true`, the card will be disabled if it is clickable.\n */\n @Prop() disabled?: boolean = false;\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n /**\n * If `true`, the card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n @State() parentIsAnchorTag: boolean = false;\n\n @State() isFocussed: boolean = false;\n\n @State() parentEl: HTMLElement | null = null;\n\n @State() appearance?: IcThemeForeground = \"default\";\n\n @State() areaExpanded: boolean = false;\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme || null);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n disconnectedCallback(): void {\n if (this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n }\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n heading,\n message,\n href,\n hreflang,\n referrerpolicy,\n rel,\n subheading,\n target,\n fullWidth,\n parentIsAnchorTag,\n isFocussed,\n } = this;\n\n const Component = parentIsAnchorTag\n ? \"div\"\n : clickable\n ? this.href === undefined\n ? \"button\"\n : \"a\"\n : \"div\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Component\n class={{\n [\"card\"]: true,\n [\"clickable\"]: clickable && !disabled,\n [\"disabled\"]: disabled,\n [\"fullwidth\"]: fullWidth,\n [\"focussed\"]: isFocussed,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : null}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled ? true : null}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div\n class={{\n [\"card-message\"]: true,\n }}\n >\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n {expandable && (\n <ic-button\n class={{\n [\"toggle-button\"]: true,\n [\"toggle-button-closed\"]: !this.areaExpanded,\n [\"toggle-button-expanded\"]: this.areaExpanded,\n }}\n variant=\"icon\"\n disableTooltip\n aria-label=\"Toggle expandable area\"\n aria-expanded={this.areaExpanded}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></ic-button>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n </Component>\n );\n }\n}\n"]}
|
@@ -8,6 +8,7 @@ export class Chip {
|
|
8
8
|
constructor() {
|
9
9
|
this.dismissAction = () => {
|
10
10
|
this.dismiss.emit();
|
11
|
+
this.icDismiss.emit();
|
11
12
|
};
|
12
13
|
this.mouseEnterHandler = () => {
|
13
14
|
this.isHovered = true;
|
@@ -174,6 +175,24 @@ export class Chip {
|
|
174
175
|
"bubbles": true,
|
175
176
|
"cancelable": true,
|
176
177
|
"composed": true,
|
178
|
+
"docs": {
|
179
|
+
"tags": [{
|
180
|
+
"name": "deprecated",
|
181
|
+
"text": "This event should not be used anymore. Use icDismiss instead."
|
182
|
+
}],
|
183
|
+
"text": ""
|
184
|
+
},
|
185
|
+
"complexType": {
|
186
|
+
"original": "void",
|
187
|
+
"resolved": "void",
|
188
|
+
"references": {}
|
189
|
+
}
|
190
|
+
}, {
|
191
|
+
"method": "icDismiss",
|
192
|
+
"name": "icDismiss",
|
193
|
+
"bubbles": true,
|
194
|
+
"cancelable": true,
|
195
|
+
"composed": true,
|
177
196
|
"docs": {
|
178
197
|
"tags": [],
|
179
198
|
"text": "Is emitted when the user dismisses the chip."
|
@@ -188,7 +207,7 @@ export class Chip {
|
|
188
207
|
static get elementRef() { return "el"; }
|
189
208
|
static get listeners() {
|
190
209
|
return [{
|
191
|
-
"name": "
|
210
|
+
"name": "icDismiss",
|
192
211
|
"method": "handleClick",
|
193
212
|
"target": undefined,
|
194
213
|
"capture": true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-chip.js","sourceRoot":"","sources":["../../../src/components/ic-chip/ic-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,CAAC,EACD,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,EAEL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gCAAgC,EAChC,UAAU,GACX,MAAM,qBAAqB,CAAC;AAE7B,OAAO,WAAW,MAAM,+BAA+B,CAAC;AAExD;;GAEG;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance, IcChipSizes } from \"./ic-chip.types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: true,\n})\nexport class Chip {\n @Element() el: HTMLIcChipElement;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n /**\n * The emphasis of the chip.\n */\n @Prop() appearance?: IcChipAppearance = \"filled\";\n /**\n * The size of the chip.\n */\n @Prop() size?: IcChipSizes = \"default\";\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n @State() visible: boolean = true;\n\n @State() isHovered: boolean = false;\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.isHovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.isHovered = false;\n };\n\n componentDidLoad(): void {\n this.dismissible &&\n this.el.shadowRoot\n .querySelector(\"span.ic-tooltip-label\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n render() {\n const {\n label,\n appearance,\n size,\n dismissible,\n visible,\n disabled,\n isHovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n [\"chip\"]: true,\n [`${appearance}`]: true,\n [`${size}`]: true,\n [\"disabled\"]: disabled,\n [\"dismissible\"]: dismissible,\n [\"hovered\"]: isHovered,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class=\"label\"\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ [\"tooltip-disabled\"]: disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class={{\n [\"dismiss-icon\"]: true,\n }}\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )\n );\n }\n}\n"]}
|
@@ -81,9 +81,8 @@ export class RadioGroup {
|
|
81
81
|
], "Radio Group");
|
82
82
|
}
|
83
83
|
render() {
|
84
|
-
const hadValidationStatus = hasValidationStatus(this.validationStatus, this.disabled);
|
85
84
|
renderHiddenInput(true, this.host, this.name, this.checkedValue, this.disabled);
|
86
|
-
return (h(Host, { onKeyDown: this.handleKeyDown }, h("div", { role: "radiogroup", "aria-label": `${this.label}${this.required ? ", required" : ""}` }, !this.hideLabel && (h("ic-input-label", { class: { [`${this.validationStatus}`]: true }, label: this.label, helperText: this.helperText, required: this.required, disabled: this.disabled })), h("slot", null)), h("ic-input-validation", { ariaLiveMode: "polite", status:
|
85
|
+
return (h(Host, { onKeyDown: this.handleKeyDown }, h("div", { role: "radiogroup", "aria-label": `${this.label}${this.required ? ", required" : ""}` }, !this.hideLabel && (h("ic-input-label", { class: { [`${this.validationStatus}`]: true }, label: this.label, helperText: this.helperText, required: this.required, disabled: this.disabled })), h("slot", null)), hasValidationStatus(this.validationStatus, this.disabled) && (h("ic-input-validation", { ariaLiveMode: "polite", status: this.validationStatus, message: this.validationText }))));
|
87
86
|
}
|
88
87
|
static get is() { return "ic-radio-group"; }
|
89
88
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-radio-group.js","sourceRoot":"","sources":["../../../src/components/ic-radio-group/ic-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,MAAM,EACN,OAAO,EACP,KAAK,GAEN,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,gCAAgC,EAChC,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAS7B,MAAM,OAAO,UAAU;;IA2Eb,kBAAa,GAAG,CAAC,KAAoB,EAAQ,EAAE;MACrD,QAAQ,KAAK,CAAC,GAAG,EAAE;QACjB,KAAK,WAAW,CAAC;QACjB,KAAK,YAAY;UACf,IAAI,CAAC,YAAY,CACf,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CACnD,CAAC,QAAQ,GAAG,IAAI,CAAC;UAClB,KAAK,CAAC,cAAc,EAAE,CAAC;UACvB,MAAM;QACR,KAAK,SAAS,CAAC;QACf,KAAK,WAAW;UACd,IAAI,CAAC,YAAY,CACf,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CACpD,CAAC,QAAQ,GAAG,IAAI,CAAC;UAClB,KAAK,CAAC,cAAc,EAAE,CAAC;OAC1B;IACH,CAAC,CAAC;IAEM,wBAAmB,GAAG,CAC5B,WAAmB,EACnB,UAAmB,EACX,EAAE;MACV,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,G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,CAAC,CAAC,CAAC,EAAE,EAAE;QAE9D,CAAC,IAAI,CAAC,SAAS,IAAI,CAClB,sBACE,KAAK,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACP,CACnB;QACD,eAAa,CACT;MACL,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAC5D,2BACE,YAAY,EAAC,QAAQ,EACrB,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAC7B,OAAO,EAAE,IAAI,CAAC,cAAc,GACP,CACxB,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n State,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty } from \"../../utils/types\";\nimport { IcValueEventDetail } from \"../../interface\";\n\n@Component({\n tag: \"ic-radio-group\",\n styleUrl: \"ic-radio-group.css\",\n shadow: true,\n})\nexport class RadioGroup {\n private radioOptions: HTMLIcRadioOptionElement[];\n\n @Element() host: HTMLIcRadioGroupElement;\n\n /**\n * The label for the radio group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the radio group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n /**\n * If `true`, the radio group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string;\n\n /**\n * If `true`, the small styling will be applied to the radio group.\n */\n @Prop() small: boolean = false;\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n /**\n * The checked state.\n */\n @State() checkedValue: string = \"\";\n @State() selectedChild: number = -1;\n\n /**\n * Emitted when a user selects a radio.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n @Listen(\"icCheck\")\n selectHandler(event: CustomEvent<IcValueEventDetail>): void {\n this.checkedValue = event.detail.value;\n this.icChange.emit({ value: this.checkedValue });\n\n if (this.radioOptions !== undefined) {\n this.radioOptions.forEach((radioOption, index) => {\n radioOption.selected = this.checkedValue === radioOption.value;\n if (radioOption.selected) {\n this.selectedChild = index;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, true)\n ].selected = true;\n event.preventDefault();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, false)\n ].selected = true;\n event.preventDefault();\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numRadios = this.radioOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n //check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numRadios;\n } else if (nextItem > numRadios) {\n nextItem = 0;\n }\n\n //if next item is disabled then find next\n if (this.radioOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n componentDidLoad(): void {\n this.radioOptions = Array.from(\n this.host.querySelectorAll(\"ic-radio-option\")\n );\n\n this.radioOptions.forEach((radioOption, index) => {\n if (!radioOption.selected) {\n radioOption.selected = this.checkedValue === radioOption.value;\n }\n radioOption.name = this.name;\n radioOption.groupLabel = this.label;\n if (radioOption.selected) {\n this.selectedChild = index;\n this.checkedValue = radioOption.value;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Radio Group\"\n );\n }\n\n render() {\n renderHiddenInput(\n true,\n this.host,\n this.name,\n this.checkedValue,\n this.disabled\n );\n\n return (\n <Host onKeyDown={this.handleKeyDown}>\n <div\n role=\"radiogroup\"\n aria-label={`${this.label}${this.required ? \", required\" : \"\"}`}\n >\n {!this.hideLabel && (\n <ic-input-label\n class={{ [`${this.validationStatus}`]: true }}\n label={this.label}\n helperText={this.helperText}\n required={this.required}\n disabled={this.disabled}\n ></ic-input-label>\n )}\n <slot></slot>\n </div>\n {hasValidationStatus(this.validationStatus, this.disabled) && (\n <ic-input-validation\n ariaLiveMode=\"polite\"\n status={this.validationStatus}\n message={this.validationText}\n ></ic-input-validation>\n )}\n </Host>\n );\n }\n}\n"]}
|