@ukic/canary-web-components 3.0.0-canary.27 → 3.0.0-canary.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/helpers-da852478.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +3 -3
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +8 -4
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox_3.cjs.entry.js +6 -7
- package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +8 -4
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +15 -10
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +35 -10
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +12 -9
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +14 -13
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +3 -2
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-time-input.cjs.entry.js +9 -5
- package/dist/cjs/ic-time-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +34 -4
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.stories.js +81 -0
- package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +41 -10
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +6 -7
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-time-input/ic-time-input.js +35 -5
- package/dist/collection/components/ic-time-input/ic-time-input.js.map +1 -1
- package/dist/collection/components/ic-time-input/ic-time-input.stories.js +82 -1
- package/dist/collection/components/ic-time-input/ic-time-input.stories.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert.js +3 -3
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +9 -4
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-date-input2.js +9 -4
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +16 -10
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +35 -10
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-menu2.js +12 -9
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-page-header.js +1 -1
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +6 -7
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-status-tag.js +1 -1
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +14 -13
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +3 -2
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-time-input.js +10 -5
- package/dist/components/ic-time-input.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/core/core.css +6 -6
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-0f22f41e.js.map +1 -1
- package/dist/core/p-1131db25.entry.js +2 -0
- package/dist/core/p-1131db25.entry.js.map +1 -0
- package/dist/core/{p-f7b1d6bf.entry.js → p-154bb0fb.entry.js} +2 -2
- package/dist/core/{p-f7b1d6bf.entry.js.map → p-154bb0fb.entry.js.map} +1 -1
- package/dist/core/p-4c5af5f7.entry.js +2 -0
- package/dist/core/p-4c5af5f7.entry.js.map +1 -0
- package/dist/core/p-5bc54721.entry.js +2 -0
- package/dist/core/p-5bc54721.entry.js.map +1 -0
- package/dist/core/p-62ad6ce5.entry.js +2 -0
- package/dist/core/p-62ad6ce5.entry.js.map +1 -0
- package/dist/core/{p-5d6290bb.entry.js → p-66f45822.entry.js} +2 -2
- package/dist/core/p-66f45822.entry.js.map +1 -0
- package/dist/core/{p-c9953122.entry.js → p-74439163.entry.js} +2 -2
- package/dist/core/p-74439163.entry.js.map +1 -0
- package/dist/core/p-760a57e7.entry.js +2 -0
- package/dist/core/p-760a57e7.entry.js.map +1 -0
- package/dist/core/p-76ab72ef.entry.js +2 -0
- package/dist/core/p-76ab72ef.entry.js.map +1 -0
- package/dist/core/p-8b0abe0f.entry.js +2 -0
- package/dist/core/p-8b0abe0f.entry.js.map +1 -0
- package/dist/core/p-8b8df1da.entry.js +2 -0
- package/dist/core/p-8b8df1da.entry.js.map +1 -0
- package/dist/core/{p-e0abd214.entry.js → p-a4184f39.entry.js} +2 -2
- package/dist/core/p-a4184f39.entry.js.map +1 -0
- package/dist/core/p-bc58e37e.entry.js +2 -0
- package/dist/core/p-bc58e37e.entry.js.map +1 -0
- package/dist/core/{p-0ec0be8d.entry.js → p-c5d03c65.entry.js} +2 -2
- package/dist/core/{p-0ec0be8d.entry.js.map → p-c5d03c65.entry.js.map} +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/helpers-89cb996d.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +3 -3
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +8 -4
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox_3.entry.js +6 -7
- package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +8 -4
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +15 -10
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +35 -10
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-menu.entry.js +12 -9
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +14 -13
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +3 -2
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-time-input.entry.js +9 -5
- package/dist/esm/ic-time-input.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +5 -1
- package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +15 -9
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +5 -1
- package/dist/types/components/ic-time-input/ic-time-input.d.ts +5 -1
- package/dist/types/components/ic-time-input/ic-time-input.stories.d.ts +14 -8
- package/dist/types/components.d.ts +26 -2
- package/dist/types/utils/types.d.ts +6 -2
- package/hydrate/index.js +121 -71
- package/hydrate/index.mjs +121 -71
- package/package.json +3 -3
- package/dist/core/p-0e882f70.entry.js +0 -2
- package/dist/core/p-0e882f70.entry.js.map +0 -1
- package/dist/core/p-182883cb.entry.js +0 -2
- package/dist/core/p-182883cb.entry.js.map +0 -1
- package/dist/core/p-35bff926.entry.js +0 -2
- package/dist/core/p-35bff926.entry.js.map +0 -1
- package/dist/core/p-5d6290bb.entry.js.map +0 -1
- package/dist/core/p-7bb3531c.entry.js +0 -2
- package/dist/core/p-7bb3531c.entry.js.map +0 -1
- package/dist/core/p-816aae93.entry.js +0 -2
- package/dist/core/p-816aae93.entry.js.map +0 -1
- package/dist/core/p-8a5ae4ab.entry.js +0 -2
- package/dist/core/p-8a5ae4ab.entry.js.map +0 -1
- package/dist/core/p-ac2f8cc8.entry.js +0 -2
- package/dist/core/p-ac2f8cc8.entry.js.map +0 -1
- package/dist/core/p-b10f5992.entry.js +0 -2
- package/dist/core/p-b10f5992.entry.js.map +0 -1
- package/dist/core/p-b2b5d4fa.entry.js +0 -2
- package/dist/core/p-b2b5d4fa.entry.js.map +0 -1
- package/dist/core/p-c9953122.entry.js.map +0 -1
- package/dist/core/p-e0abd214.entry.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["icTimeInputCss","IcTimeInputStyle0","inputIds","TimeInput","constructor","hostRef","this","DEFAULT_TIME_FORMAT","ARIA_INVALID","ARIA_LABEL","ARIA_LABELLED_BY","EVENT_OBJECT_STRING","FIT_TO_VALUE","initialValue","value","inputsInOrder","isValidHour","isValidMinute","isValidSecond","isValidTime","isTimeSetFromKeyboardEvent","previousSelectedTime","selectedTime","externalSetTime","clearInput","maxTime","minTime","clockFocused","clearButtonFocused","removeLabelledBy","hour","minute","second","disabled","disableTimes","emitTimePartChange","hideHelperText","hideLabel","inputId","invalidTimeMessage","max","min","name","required","showClearButton","showClockButton","size","theme","timeFormat","timePeriod","validationStatus","validationText","setInputPasteValue","input","pastedValue","inputEl","classList","add","parseTime","Date","parts","split","length","d","setHours","isHHMMFormat","isKeyboardOrEvent","event","Object","prototype","toString","call","setTimeValidity","minHour","maxHour","isEmptyString","setInputValue","clear","newValue","hourInputEl","minuteInputEl","secondInputEl","setValidationMessage","setPreventInput","isPrevented","preventHourInput","preventMinuteInput","preventSecondInput","outOfBoundsMsg","isDisabledTime","convertToTime","getHours","getMinutes","getSeconds","Array","isArray","some","t","start","end","parsed","formatTime","forEach","setAttribute","removeAttribute","invalidTimeText","time","hh","padStart","mm","ss","handleInput","inputEvent","target","inputType","preventAutoFormatting","notifyScreenReader","moveToNextInput","setFitToValueStyling","handleKeyDown","isInputPrevented","eventKey","_a","key","toLowerCase","regex","test","ctrlKey","metaKey","preventDefault","moveToPreviousInput","handleUpDownArrowKeyPress","preventInput","handleFocus","select","handleBlur","autocompleteInput","minValue","maxValue","val","handleTimeChange","force","setValueAndEmitChange","notifyScreenReaderSelectedTime","selectedTimeInfoEl","textContent","updateInputValues","emitIcChange","icChange","emit","timeObject","setTime","undefined","remove","zuluMatch","match","setAriaInvalid","validHour","validMinute","validSecond","_b","_c","handleClear","focus","handleHostBlur","icBlur","handleHostFocus","el","shadowRoot","activeElement","id","icFocus","handleFormReset","selectedString","substring","selectionStart","selectionEnd","currentInput","findIndex","inputValue","setInputsInOrder","shadowInputs","querySelectorAll","push","removeAriaLabelledBy","inputCompContainerEl","setAriaLabelledBy","getAttribute","labelEl","querySelector","labelId","hasValidation","labelledBy","screenReaderInfoId","getInputDescribedByText","helperText","defaultHelperText","selectedTimeInfoId","assistiveHintId","_d","getInputsInOrder","timeParts","map","part","h","class","ref","placeholder","inputmode","pattern","onPaste","handlePaste","onKeyDown","getDescOfInputsOrder","getScreenReaderInfo","inputDescriptors","IcInformationStatus","Error","liveRegion","clipboardData","getData","isPastedStringTimeValid","setPastedValueAndValidation","handleClearFocus","handleClearBlur","ev","relatedTarget","handleClockFocus","handleClockBlur","replace","isoMatch","index","timeValue","slice","pasted","trim","isNumeric","watchInputHandler","watchDisabledHandler","removeDisabledFalse","watchMaxHandler","watchMinHandler","watchRequiredHandler","asteriskSpan","document","createElement","appendChild","disconnectedCallback","removeFormResetListener","componentWillLoad","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","addEventListener","componentWillUpdate","componentDidRender","getTime","triggerIcChange","render","hasCustomValidation","assistiveHint","renderHiddenInput","showDivider","Host","onBlur","onFocus","for","slot","role","innerHTML","Clear","onClick","variant","divider","Clock","status","message"],"sources":["src/components/ic-time-input/ic-time-input.css?tag=ic-time-input&encapsulation=shadow","src/components/ic-time-input/ic-time-input.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n --input-bg-color: var(--ic-time-picker-field-background);\n --ic-input-label-text-color: var(--ic-time-picker-label);\n --ic-input-label-helper-text-color: var(--ic-time-picker-subtitle);\n --border-color: var(--ic-time-picker-time-field-border-default);\n --border-color-disabled: var(--ic-time-picker-border-disabled);\n --border-color-hover: var(--ic-time-picker-time-field-border-hover);\n --border-color-pressed: var(--ic-time-picker-time-field-border-pressed);\n --border-error-color: var(--ic-time-picker-border-error);\n --border-error-color-hover: var(--ic-time-picker-border-error-hover);\n --border-error-color-pressed: var(--ic-time-picker-border-error-pressed);\n --border-success-color: var(--ic-time-picker-border-success);\n --border-success-color-hover: var(--ic-time-picker-border-success-hover);\n --border-success-color-pressed: var(--ic-time-picker-border-success-pressed);\n --border-warning-color: var(--ic-time-picker-border-warning);\n --border-warning-color-hover: var(--ic-time-picker-border-warning-hover);\n --border-warning-color-pressed: var(--ic-time-picker-border-warning-pressed);\n --input-width: calc((4 * var(--ic-space-xxl)) + var(--ic-space-xxs));\n}\n\n:host(.ic-time-input-disabled) {\n --ic-input-label-text-color: var(--ic-time-picker-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-time-picker-subtitle-disabled);\n}\n\n:host(.ic-time-input-disabled) input {\n color: var(--ic-time-picker-time-text-disabled);\n}\n\n:host(.ic-time-input-large) {\n --input-width: calc(\n (4 * var(--ic-space-xxl)) + var(--ic-space-xxs) + var(--ic-space-lg)\n );\n}\n\n:host(.ic-time-input-small) {\n --input-width: calc(\n (3 * var(--ic-space-xxl)) + var(--ic-space-xxs) + var(--ic-space-xl)\n );\n}\n\ninput {\n border: 0;\n height: 100%;\n padding: 0;\n outline: none;\n background: none;\n -moz-appearance: textfield;\n appearance: textfield;\n color: var(--ic-time-picker-time-text-default);\n caret-color: var(--ic-time-picker-typing-cursor);\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n}\n\ninput:-webkit-autofill {\n box-shadow: 0 0 0 var(--ic-space-sm) var(--ic-color-background-primary) inset;\n -webkit-text-fill-color: var(--ic-time-picker-time-text-default) !important;\n}\n\ninput::placeholder {\n color: var(--ic-time-picker-field-placeholder-text);\n}\n\nic-input-component-container {\n cursor: text;\n}\n\nic-input-component-container .focus-indicator {\n padding: var(--ic-space-xxxs) var(--ic-space-xs);\n align-items: center;\n}\n\n.time-inputs {\n color: var(--ic-time-picker-field-placeholder-text);\n}\n\n.hour-input {\n width: 1.438rem;\n}\n\n.minute-input {\n width: 1.813rem;\n}\n\n.second-input,\n.second-input.fit-to-value {\n width: 2.313rem;\n}\n\n.fit-to-value {\n width: 1.25rem;\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.input-container {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n}\n\n.action-buttons {\n display: flex;\n align-items: center;\n}\n\n.show-clock-button-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.clear-button,\n.clock-button {\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n margin: 0;\n}\n\n.clear-button.hidden {\n display: none;\n}\n\n.clear-button:focus,\n.clock-button:focus,\n.clear-button:active,\n.clock-button:active {\n background-color: var(--ic-color-focus-inner) !important;\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;\n border-radius: 0.25rem;\n}\n\n.clock-button:focus,\n.clock-button:active {\n --ic-button-tertiary-text-active: var(--ic-atoms-input-clear-button-focus);\n --ic-button-tertiary-text-hover-active: var(\n --ic-atoms-input-clear-button-focus\n );\n --ic-button-tertiary-text-pressed-active: var(\n --ic-atoms-input-clear-button-focus\n );\n}\n\n.clear-button:focus,\n.clock-button:focus,\n.clear-button:active *,\n.clock-button:active * {\n fill: var(--ic-atoms-input-clear-button-focus);\n}\n\n.clear-button svg {\n color: var(--ic-time-picker-clear-icon);\n}\n\n.clear-button:focus svg {\n color: var(--ic-atoms-input-clear-button-focus);\n}\n\n.divider {\n margin: 0 var(--ic-space-xxs);\n width: var(--ic-space-1px);\n background-color: var(--ic-atoms-input-divider);\n border-radius: var(--ic-space-1px);\n}\n\n.divider.small {\n height: var(--ic-space-md);\n}\n\n.divider.medium {\n height: calc(var(--ic-space-sm) + var(--ic-space-xs));\n}\n\n.divider.large {\n height: var(--ic-space-lg);\n}\n\nic-input-validation {\n --ic-input-validation-status-text-color: var(--ic-time-picker-status-text);\n --ic-input-validation-error: var(--ic-time-picker-icon-error);\n --ic-input-validation-warning-icon-color: var(--ic-time-picker-icon-warning);\n --ic-input-validation-success-icon-color: var(--ic-time-picker-icon-success);\n}\n\n@media (forced-colors: active) {\n .clear-button svg {\n color: currentcolor;\n }\n}\n","/* eslint-disable react/jsx-no-bind */\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Host,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcDisableTimeSelection,\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcSizes,\n IcThemeMode,\n IcTimeFormat,\n} from \"../../utils/types\";\nimport {\n isEmptyString,\n isNumeric,\n addFormResetListener,\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n removeFormResetListener,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport Clear from \"../../assets/clear-icon.svg\";\nimport Clock from \"../../assets/clock.svg\";\n\nlet inputIds = 0;\n\n/**\n * @slot helper-text - Content is set as the helper text for the time input.\n */\n@Component({\n tag: \"ic-time-input\",\n styleUrl: \"ic-time-input.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class TimeInput {\n private DEFAULT_TIME_FORMAT: IcTimeFormat = \"HH:MM:SS\";\n private ARIA_INVALID = \"aria-invalid\";\n private ARIA_LABEL = \"aria-label\";\n private ARIA_LABELLED_BY = \"aria-labelledby\";\n private assistiveHintId: string;\n private hourInputEl?: HTMLInputElement;\n private minuteInputEl?: HTMLInputElement;\n private secondInputEl?: HTMLInputElement;\n private defaultHelperText: string;\n private EVENT_OBJECT_STRING = \"[object Event]\";\n private FIT_TO_VALUE = \"fit-to-value\";\n private initialValue = this.value;\n private inputCompContainerEl: HTMLIcInputComponentContainerElement;\n private inputsInOrder: HTMLInputElement[] = [];\n private isValidHour: boolean = true;\n private isValidMinute: boolean = true;\n private isValidSecond: boolean = true;\n private isValidTime: boolean = true;\n private isTimeSetFromKeyboardEvent: boolean = false;\n private preventAutoFormatting: boolean;\n private preventHourInput: boolean;\n private preventMinuteInput: boolean;\n private preventSecondInput: boolean;\n private previousSelectedTime: Date | null = null;\n private selectedTime: Date | null = null;\n private selectedTimeInfoEl?: HTMLSpanElement;\n private screenReaderInfoId: string;\n private selectedTimeInfoId: string;\n private externalSetTime: boolean = false;\n private clearInput: boolean = false;\n private maxTime: Date | null = null;\n private minTime: Date | null = null;\n\n @Element() el: HTMLIcTimeInputElement;\n\n @State() invalidTimeText: string;\n @State() clockFocused: boolean = false;\n @State() clearButtonFocused: boolean = false;\n @State() removeLabelledBy: boolean = false;\n @State() hour: string = \"\";\n @State() minute: string = \"\";\n @State() second: string = \"\";\n\n @Watch(\"hour\")\n @Watch(\"minute\")\n @Watch(\"second\")\n watchInputHandler(): void {\n if (\n this.emitTimePartChange &&\n !this.externalSetTime &&\n !this.clearInput &&\n !(this.hour && this.minute && this.second) &&\n this.selectedTime === null\n ) {\n this.emitIcChange(this.selectedTime);\n }\n }\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * An array of times that will be disabled in the time input. The times can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\n @Prop() disableTimes: IcDisableTimeSelection[] = [];\n\n /**\n * If `true`, every individual input field completed will emit an icChange event.\n */\n @Prop() emitTimePartChange?: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance. This will default to the text \"Use format\" along with the `timeFormat` value.\n */\n @Prop({ mutable: true }) helperText: string | null;\n\n /**\n * If `true`, the helper text will be visually hidden, but still read out by screenreaders.\n */\n @Prop() hideHelperText: boolean = false;\n\n /**\n * If `true`, the label will be visually hidden, but will still be read out by screen readers.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId: string = `ic-time-input-${inputIds++}`;\n\n /**\n * The text to display as the validation message when an invalid time is entered.\n */\n @Prop() invalidTimeMessage: string = \"Please enter a valid time.\";\n\n /**\n * The label for the time input.\n */\n @Prop() label!: string;\n\n /**\n * The latest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\n @Prop() max: string | Date = \"\";\n @Watch(\"max\")\n watchMaxHandler(): void {\n this.maxTime = this.parseTime(this.max);\n }\n\n /**\n * The earliest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\n @Prop() min: string | Date = \"\";\n @Watch(\"min\")\n watchMinHandler(): void {\n this.minTime = this.parseTime(this.min);\n }\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 input will require a value.\n */\n @Prop() required: boolean = false;\n @Watch(\"required\")\n watchRequiredHandler(): void {\n const labelEl = this.el.shadowRoot?.querySelector(\"label\");\n if (this.required) {\n const asteriskSpan = document.createElement(\"span\");\n asteriskSpan.setAttribute(\"id\", \"asterisk-span\");\n asteriskSpan.setAttribute(\"aria-hidden\", \"true\");\n asteriskSpan.textContent = \" *\";\n labelEl?.appendChild(asteriskSpan);\n } else {\n const asteriskSpan = this.el.shadowRoot?.querySelector(\"#asterisk-span\");\n if (asteriskSpan) {\n asteriskSpan.remove();\n }\n }\n }\n\n /**\n * If `true`, a button which clears the time input when clicked will be displayed.\n */\n @Prop() showClearButton?: boolean = true;\n\n /**\n * @internal If `true`, a button which displays the clock view when clicked will be displayed.\n */\n @Prop() showClockButton?: boolean = false;\n\n /**\n * The size of the time input to be displayed.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * Sets the time picker to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The format in which the time will be displayed.\n */\n @Prop() timeFormat: IcTimeFormat = this.DEFAULT_TIME_FORMAT;\n\n /**\n * The time period format: \"12\" for 12-hour, \"24\" for 24-hour. Defaults to \"24\".\n */\n @Prop() timePeriod: \"12\" | \"24\" = \"24\";\n\n /**\n * The value of the time input. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\n @Prop({ mutable: true }) value?: string | Date | null | undefined = \"\";\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in time validation.\n */\n @Prop({ mutable: true }) validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message. This will override the built-in time validation.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * @internal Emitted when the clock is opened.\n */\n @Event() clockButtonClicked: EventEmitter<{ value: Date | null }>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() icBlur: EventEmitter<{ value: Date | null }>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<{\n value: Date | null;\n timeObject: {\n hour: string | null;\n minute: string | null;\n second: string | null;\n };\n }>;\n\n /**\n * Emitted when the input gains focus.\n */\n @Event() icFocus: EventEmitter<{ value: Date | null }>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.defaultHelperText = `Use format ${this.timeFormat}`;\n if (isEmptyString(this.helperText))\n this.helperText = this.defaultHelperText;\n if (this.value) {\n this.externalSetTime = true;\n this.setTime(this.value);\n }\n this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;\n this.assistiveHintId = `${this.inputId}-assistive-hint`;\n this.selectedTimeInfoId = `${this.inputId}-selected-time-info`;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n this.setInputsInOrder();\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Time Input\"\n );\n if (this.value) {\n this.updateInputValues(this.hour, this.minute, this.second);\n this.inputsInOrder.forEach((input) => {\n input.classList.add(this.FIT_TO_VALUE);\n });\n }\n this.setAriaInvalid(\n this.isValidHour,\n this.isValidMinute,\n this.isValidSecond\n );\n if (this.value) {\n this.notifyScreenReaderSelectedTime();\n }\n this.inputsInOrder.forEach((input) => {\n input.addEventListener(\"input\", this.handleInput);\n input.addEventListener(\"focus\", this.handleFocus);\n input.addEventListener(\"blur\", this.handleBlur);\n });\n this.watchRequiredHandler();\n }\n\n componentWillUpdate(): void {\n if (isEmptyString(this.helperText))\n this.helperText = this.defaultHelperText;\n if (!this.isTimeSetFromKeyboardEvent) this.setTime(this.value);\n this.setAriaInvalid(\n this.isValidHour,\n this.isValidMinute,\n this.isValidSecond\n );\n this.handleTimeChange(false);\n this.isTimeSetFromKeyboardEvent = false;\n }\n\n componentDidRender(): void {\n if (this.removeLabelledBy) {\n this.removeAriaLabelledBy();\n return;\n }\n this.setAriaLabelledBy();\n }\n\n /**\n * Returns the value as a Date object\n * @returns Date\n */\n @Method()\n async getTime(): Promise<Date | null> {\n return this.selectedTime;\n }\n\n /**\n * @internal Used to enable other components to invoke an IcChange event from the input.\n */\n @Method()\n async triggerIcChange(t: Date | null): Promise<void> {\n this.externalSetTime = true;\n this.setTime(t);\n this.emitIcChange(t);\n this.externalSetTime = false;\n }\n\n private setInputPasteValue = (\n input: EventTarget | null,\n pastedValue: string\n ) => {\n if (input) {\n const inputEl = input as HTMLInputElement;\n inputEl.value = pastedValue;\n inputEl.classList.add(this.FIT_TO_VALUE);\n }\n };\n\n private parseTime = (value: string | Date): Date | null => {\n if (!value) return null;\n if (value instanceof Date) return value;\n const parts = value.split(\":\");\n if (parts.length >= 2) {\n const d = new Date();\n d.setHours(+parts[0], +parts[1], parts[2] ? +parts[2] : 0, 0);\n return d;\n }\n return null;\n };\n\n private isHHMMFormat = () => this.timeFormat === \"HH:MM\";\n\n private isKeyboardOrEvent = (event: Event) => {\n return (\n Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||\n Object.prototype.toString.call(event) === \"[object KeyboardEvent]\"\n );\n };\n\n private setTimeValidity = () => {\n const minHour = 0;\n const maxHour = this.timePeriod === \"12\" ? 12 : 23;\n if (!isEmptyString(this.hour)) {\n this.isValidHour = +this.hour >= minHour && +this.hour <= maxHour;\n } else {\n this.isValidHour = true;\n }\n if (!isEmptyString(this.minute)) {\n this.isValidMinute = +this.minute >= 0 && +this.minute <= 59;\n } else {\n this.isValidMinute = true;\n }\n if (!this.isHHMMFormat()) {\n if (!isEmptyString(this.second)) {\n this.isValidSecond = +this.second >= 0 && +this.second <= 59;\n } else {\n this.isValidSecond = true;\n }\n } else {\n this.isValidSecond = true;\n }\n };\n\n private setInputValue = (input: HTMLInputElement, clear = false) => {\n const newValue = clear ? \"\" : input.value;\n if (input === this.hourInputEl) {\n this.hour = newValue;\n } else if (input === this.minuteInputEl) {\n this.minute = newValue;\n } else if (input === this.secondInputEl && !this.isHHMMFormat()) {\n this.second = newValue;\n }\n this.setValidationMessage();\n };\n\n private setPreventInput = (input: HTMLInputElement, isPrevented: boolean) => {\n if (input === this.hourInputEl) {\n this.preventHourInput = isPrevented;\n } else if (input === this.minuteInputEl) {\n this.preventMinuteInput = isPrevented;\n } else if (input === this.secondInputEl) {\n this.preventSecondInput = isPrevented;\n }\n };\n\n private setValidationMessage = () => {\n this.maxTime = this.parseTime(this.max);\n this.minTime = this.parseTime(this.min);\n this.setTimeValidity();\n let outOfBoundsMsg = \"\";\n let isDisabledTime = false;\n if (\n !isEmptyString(this.hour) &&\n !isEmptyString(this.minute) &&\n (this.isHHMMFormat() || !isEmptyString(this.second))\n ) {\n this.selectedTime = this.convertToTime(\n this.hour,\n this.minute,\n this.isHHMMFormat() ? \"00\" : this.second\n );\n this.isValidTime =\n !!this.selectedTime &&\n this.selectedTime.getHours() == +this.hour &&\n this.selectedTime.getMinutes() == +this.minute &&\n (this.isHHMMFormat() || this.selectedTime.getSeconds() == +this.second);\n\n if (\n this.selectedTime &&\n Array.isArray(this.disableTimes) &&\n this.disableTimes.length > 0\n ) {\n isDisabledTime = this.disableTimes.some((t) => {\n if (\n typeof t === \"object\" &&\n t !== null &&\n \"start\" in t &&\n \"end\" in t\n ) {\n const start = this.parseTime(t.start);\n const end = this.parseTime(t.end);\n if (start && end) {\n return this.selectedTime! >= start && this.selectedTime! <= end;\n }\n return false;\n }\n const parsed = this.parseTime(t as string | Date);\n return (\n parsed &&\n parsed.getHours() === this.selectedTime!.getHours() &&\n parsed.getMinutes() === this.selectedTime!.getMinutes() &&\n parsed.getSeconds() === this.selectedTime!.getSeconds()\n );\n });\n if (isDisabledTime) {\n this.isValidTime = false;\n outOfBoundsMsg = this.invalidTimeMessage;\n }\n }\n\n if (this.selectedTime && !isDisabledTime) {\n if (this.minTime && this.selectedTime < this.minTime) {\n this.isValidTime = false;\n outOfBoundsMsg = `Please enter a time after ${this.formatTime(\n this.minTime\n )}.`;\n } else if (this.maxTime && this.selectedTime > this.maxTime) {\n this.isValidTime = false;\n outOfBoundsMsg = `Please enter a time before ${this.formatTime(\n this.maxTime\n )}.`;\n }\n }\n if (!this.isValidTime) {\n this.inputsInOrder.forEach((input) =>\n input.setAttribute(this.ARIA_INVALID, \"true\")\n );\n } else {\n this.inputsInOrder.forEach((input) =>\n input.removeAttribute(this.ARIA_INVALID)\n );\n }\n } else {\n this.selectedTime = null;\n }\n if (\n !(\n this.isValidHour &&\n this.isValidMinute &&\n this.isValidSecond &&\n this.isValidTime\n )\n ) {\n this.invalidTimeText = outOfBoundsMsg || this.invalidTimeMessage;\n } else {\n this.invalidTimeText = \"\";\n }\n };\n\n private formatTime = (time: Date): string => {\n const hh = time.getHours().toString().padStart(2, \"0\");\n const mm = time.getMinutes().toString().padStart(2, \"0\");\n const ss = time.getSeconds().toString().padStart(2, \"0\");\n return this.isHHMMFormat() ? `${hh}:${mm}` : `${hh}:${mm}:${ss}`;\n };\n\n private handleInput = (event: Event) => {\n const inputEvent = event as InputEvent;\n const input = event.target as HTMLInputElement;\n if (input !== this.hourInputEl) {\n if (\n inputEvent.inputType !== \"deleteContentBackward\" &&\n !this.preventAutoFormatting\n ) {\n if (\n input.value.length === 1 &&\n +input.value >= 6 &&\n +input.value <= 9\n ) {\n this.setInputValue(input);\n this.notifyScreenReader(input);\n this.moveToNextInput(input);\n }\n if (input.value.length === 2) {\n this.setInputValue(input);\n this.setPreventInput(input, true);\n this.notifyScreenReader(input);\n this.moveToNextInput(input);\n } else {\n this.setPreventInput(input, false);\n }\n } else if (this.preventAutoFormatting) {\n if (input.value.length === 2 && !this.isKeyboardOrEvent(event)) {\n this.setInputValue(input);\n this.setPreventInput(input, true);\n this.moveToNextInput(input);\n } else {\n this.setInputValue(input);\n }\n }\n if (input.value.length !== 2) {\n this.setPreventInput(input, false);\n }\n } else {\n if (input.value.length === 2) {\n this.setInputValue(input);\n if (\n Object.prototype.toString.call(event) !== this.EVENT_OBJECT_STRING\n ) {\n this.moveToNextInput(input);\n }\n this.setPreventInput(input, true);\n } else {\n this.setInputValue(input, true);\n this.setPreventInput(input, false);\n }\n }\n this.setFitToValueStyling(input);\n if (input.value.length === 0) {\n this.setInputValue(input, true);\n this.setValidationMessage();\n }\n this.notifyScreenReader(input);\n };\n\n private handleKeyDown = (event: KeyboardEvent, isInputPrevented: boolean) => {\n const input = event.target as HTMLInputElement;\n const eventKey = event.key?.toLowerCase();\n const regex =\n /-?\\d*\\.?\\d+(e[-+]?\\d+)?|[:]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;\n if (\n !regex.test(eventKey) &&\n !(\n (event.ctrlKey || event.metaKey) &&\n (eventKey === \"v\" || eventKey === \"c\")\n )\n ) {\n event.preventDefault();\n }\n switch (eventKey) {\n case \":\":\n case \"arrowright\":\n event.preventDefault();\n this.moveToNextInput(input);\n break;\n case \"arrowleft\":\n event.preventDefault();\n this.moveToPreviousInput(input);\n break;\n case \"arrowup\":\n case \"arrowdown\":\n this.preventAutoFormatting = true;\n this.handleUpDownArrowKeyPress(input, event);\n break;\n case \"backspace\":\n if (input.value.length === 0) {\n event.preventDefault();\n this.moveToPreviousInput(input);\n }\n break;\n default:\n break;\n }\n this.preventInput(event, isInputPrevented);\n this.isTimeSetFromKeyboardEvent = true;\n };\n\n private handleFocus = (event: FocusEvent) => {\n const input = event.target as HTMLInputElement;\n input.select();\n };\n\n private handleBlur = (event: FocusEvent) => {\n const input = event.target;\n if (input) {\n this.autocompleteInput(input as HTMLInputElement);\n }\n };\n\n private handleUpDownArrowKeyPress = (\n input: HTMLInputElement,\n event: KeyboardEvent\n ) => {\n let minValue = 0;\n let maxValue = 59;\n if (input === this.hourInputEl) {\n minValue = this.timePeriod === \"12\" ? 1 : 0;\n maxValue = this.timePeriod === \"12\" ? 12 : 23;\n }\n let val = +input.value;\n if (event.key === \"ArrowUp\") {\n val = val + 1;\n if (val > maxValue) val = minValue;\n input.value = val.toString().padStart(2, \"0\");\n this.notifyScreenReader(input);\n }\n if (event.key === \"ArrowDown\") {\n val = val - 1;\n if (val < minValue) val = maxValue;\n input.value = val.toString().padStart(2, \"0\");\n this.notifyScreenReader(input);\n }\n this.setInputValue(input);\n this.setFitToValueStyling(input);\n };\n\n private handleTimeChange = (force: boolean) => {\n if (force || this.selectedTime !== this.previousSelectedTime) {\n if (this.value) {\n this.inputsInOrder.forEach((input) => {\n input.classList.add(this.FIT_TO_VALUE);\n });\n }\n if (\n this.hour &&\n this.minute &&\n (this.isHHMMFormat() || this.second) &&\n this.invalidTimeText === \"\"\n ) {\n this.setValueAndEmitChange(this.selectedTime);\n this.notifyScreenReaderSelectedTime();\n } else if (\n !(this.selectedTime === null && this.previousSelectedTime === null) &&\n this.selectedTimeInfoEl\n ) {\n this.setValueAndEmitChange(null);\n this.selectedTimeInfoEl.textContent = \"\";\n }\n this.previousSelectedTime = this.selectedTime;\n if (!this.isTimeSetFromKeyboardEvent) {\n this.updateInputValues(this.hour, this.minute, this.second);\n }\n }\n };\n\n private setValueAndEmitChange = (value: Date | null) => {\n if (this.value !== value) {\n this.emitIcChange(value);\n this.value = value;\n }\n };\n\n private emitIcChange = (t: Date | null) => {\n this.selectedTime = t;\n this.icChange.emit({\n value: t,\n timeObject: {\n hour: this.hour === \"\" ? null : this.hour,\n minute: this.minute === \"\" ? null : this.minute,\n second: this.second === \"\" ? null : this.second,\n },\n });\n };\n\n private setTime = (time?: string | Date | null) => {\n if (time === null || time === \"\" || time === undefined) {\n if (this.hour) this.hour = \"\";\n if (this.minute) this.minute = \"\";\n if (this.second) this.second = \"\";\n this.inputsInOrder.forEach((input) => {\n input.classList.remove(this.FIT_TO_VALUE);\n this.setPreventInput(input, false);\n });\n this.handleTimeChange(true);\n } else {\n if (typeof time === \"string\") {\n const zuluMatch = time.match(\n /^(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,3}))?Z?$/\n );\n if (zuluMatch) {\n this.hour = zuluMatch[1];\n this.minute = zuluMatch[2];\n this.second = zuluMatch[3];\n } else {\n const parts = time.split(\":\");\n this.hour = parts[0] || \"\";\n this.minute = parts[1] || \"\";\n this.second = parts[2] || \"\";\n }\n } else if (time instanceof Date) {\n this.hour = time.getHours().toString().padStart(2, \"0\");\n this.minute = time.getMinutes().toString().padStart(2, \"0\");\n this.second = time.getSeconds().toString().padStart(2, \"0\");\n }\n }\n this.setValidationMessage();\n };\n\n private setAriaInvalid = (\n validHour: boolean,\n validMinute: boolean,\n validSecond: boolean\n ) => {\n if (this.inputsInOrder.length) {\n this.inputsInOrder.forEach((input) => {\n input.removeAttribute(this.ARIA_INVALID);\n });\n if (!validHour) {\n this.hourInputEl?.setAttribute(this.ARIA_INVALID, \"true\");\n }\n if (!validMinute) {\n this.minuteInputEl?.setAttribute(this.ARIA_INVALID, \"true\");\n }\n if (!validSecond) {\n this.secondInputEl?.setAttribute(this.ARIA_INVALID, \"true\");\n }\n if (!(validHour && validMinute && validSecond)) {\n this.inputsInOrder.forEach((input) => {\n input.setAttribute(this.ARIA_INVALID, \"true\");\n });\n }\n }\n };\n\n private handleClear = () => {\n this.clearInput = true;\n if (this.hourInputEl) {\n this.hourInputEl.value = \"\";\n }\n if (this.minuteInputEl) {\n this.minuteInputEl.value = \"\";\n }\n if (!this.isHHMMFormat() && this.secondInputEl) {\n this.secondInputEl.value = \"\";\n }\n this.hour = \"\";\n this.minute = \"\";\n this.second = \"\";\n this.handleTimeChange(true);\n this.inputsInOrder.forEach((input) => {\n input.classList.remove(this.FIT_TO_VALUE);\n this.setPreventInput(input, false);\n });\n this.clearInput = false;\n this.isTimeSetFromKeyboardEvent = false;\n this.setValidationMessage();\n this.invalidTimeText = \"\";\n if (this.hourInputEl) {\n this.hourInputEl.focus();\n }\n };\n\n private notifyScreenReaderSelectedTime = () => {\n if (this.selectedTime && this.selectedTimeInfoEl) {\n if (this.isHHMMFormat()) {\n this.selectedTimeInfoEl.textContent = `Selected time: ${this.selectedTime\n .getHours()\n .toString()\n .padStart(2, \"0\")}:${this.selectedTime\n .getMinutes()\n .toString()\n .padStart(2, \"0\")}`;\n } else {\n this.selectedTimeInfoEl.textContent = `Selected time: ${this.selectedTime\n .getHours()\n .toString()\n .padStart(2, \"0\")}:${this.selectedTime\n .getMinutes()\n .toString()\n .padStart(2, \"0\")}:${this.selectedTime\n .getSeconds()\n .toString()\n .padStart(2, \"0\")}`;\n }\n }\n };\n\n private setFitToValueStyling = (input: HTMLInputElement) => {\n if (input.value) {\n input.classList.add(this.FIT_TO_VALUE);\n } else {\n input.classList.remove(this.FIT_TO_VALUE);\n }\n };\n\n private handleHostBlur = () => {\n this.removeLabelledBy = false;\n this.icBlur.emit({ value: this.selectedTime });\n };\n\n private handleHostFocus = () => {\n if (\n this.el.shadowRoot?.activeElement?.id.match(/(hour|minute|second)-input$/)\n ) {\n this.removeLabelledBy = false;\n } else {\n this.removeLabelledBy = true;\n }\n this.icFocus.emit({ value: this.selectedTime });\n };\n\n private handleFormReset = () => {\n this.setTime(this.initialValue);\n this.setValidationMessage();\n this.handleTimeChange(false);\n };\n\n private preventInput = (event: KeyboardEvent, isInputPrevented: boolean) => {\n const key = event.key;\n const input = event.target as HTMLInputElement;\n let selectedString;\n if (input) {\n selectedString = input.value.substring(\n input.selectionStart || 0,\n input.selectionEnd || undefined\n );\n }\n if (\n key === \"e\" ||\n key === \".\" ||\n key === \"-\" ||\n (event.key >= \"0\" &&\n event.key <= \"9\" &&\n isInputPrevented &&\n !selectedString)\n ) {\n event.preventDefault();\n }\n };\n\n private moveToNextInput = (currentInput: HTMLInputElement) => {\n this.preventAutoFormatting = false;\n this.inputsInOrder[\n this.inputsInOrder.findIndex((input) => input === currentInput) + 1\n ]?.focus();\n };\n\n private moveToPreviousInput = (currentInput: HTMLInputElement) => {\n this.preventAutoFormatting = false;\n this.inputsInOrder[\n this.inputsInOrder.findIndex((input) => input === currentInput) - 1\n ]?.focus();\n };\n\n private autocompleteInput = (input: HTMLInputElement) => {\n const inputValue = input.value;\n if (inputValue.length === 1) {\n input.value = `0${inputValue}`;\n }\n if (input.value) {\n this.setInputValue(input);\n }\n };\n\n private convertToTime = (\n hour: string,\n minute: string,\n second: string\n ): Date | null => {\n if (\n !isEmptyString(hour) &&\n !isEmptyString(minute) &&\n (this.isHHMMFormat() || !isEmptyString(second))\n ) {\n const d = new Date();\n d.setHours(+hour, +minute, this.isHHMMFormat() ? 0 : +second, 0);\n return d;\n } else {\n return null;\n }\n };\n\n private setInputsInOrder = () => {\n this.inputsInOrder = [];\n const shadowInputs = this.el.shadowRoot?.querySelectorAll(\"input\");\n if (shadowInputs) {\n shadowInputs.forEach((input) => this.inputsInOrder.push(input));\n }\n };\n\n private updateInputValues = (\n hour: string,\n minute: string,\n second: string\n ) => {\n if (this.hourInputEl && this.minuteInputEl && this.secondInputEl) {\n this.hourInputEl.value = hour;\n this.minuteInputEl.value = minute;\n this.secondInputEl.value = second;\n }\n };\n\n private removeAriaLabelledBy = () => {\n this.inputCompContainerEl?.removeAttribute(this.ARIA_LABELLED_BY);\n };\n\n private setAriaLabelledBy = () => {\n if (\n this.disabled &&\n this.inputCompContainerEl?.getAttribute(this.ARIA_LABELLED_BY)\n ) {\n this.removeAriaLabelledBy();\n return;\n }\n if (this.disabled) {\n return;\n }\n const labelEl = this.el.shadowRoot?.querySelector(\"label\");\n const labelId = `${this.inputId}-label`;\n if (labelEl !== null && labelEl !== undefined) {\n labelEl.id = labelId;\n }\n const hasValidation =\n !isEmptyString(this.validationStatus) ||\n !isEmptyString(this.invalidTimeText);\n const labelledBy = `${labelEl?.id ?? \"\"} ${\n this.screenReaderInfoId\n } ${getInputDescribedByText(\n this.el,\n this.inputId,\n this.helperText !== \"\" && this.helperText !== this.defaultHelperText,\n hasValidation\n )} ${this.selectedTime ? this.selectedTimeInfoId : \"\"} ${\n this.assistiveHintId\n }`;\n this.inputCompContainerEl?.setAttribute(this.ARIA_LABELLED_BY, labelledBy);\n };\n\n private getInputsInOrder = () => {\n const timeParts = this.timeFormat.split(\":\");\n return timeParts.map((part: string) => {\n switch (part.substring(0, 1)) {\n case \"H\":\n return (\n <input\n class=\"hour-input\"\n id=\"hour-input\"\n ref={(el) => (this.hourInputEl = el)}\n aria-label=\"hour\"\n placeholder=\"HH\"\n disabled={this.disabled}\n aria-required={`${this.required}`}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onPaste={this.handlePaste}\n onKeyDown={(event) =>\n this.handleKeyDown(event, this.preventHourInput)\n }\n ></input>\n );\n case \"M\":\n return (\n <input\n id=\"minute-input\"\n class=\"minute-input\"\n ref={(el) => (this.minuteInputEl = el)}\n aria-label=\"minute\"\n placeholder=\"MM\"\n disabled={this.disabled}\n aria-required={`${this.required}`}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onPaste={this.handlePaste}\n onKeyDown={(event) =>\n this.handleKeyDown(event, this.preventMinuteInput)\n }\n ></input>\n );\n case \"S\":\n if (!this.isHHMMFormat()) {\n return (\n <input\n id=\"second-input\"\n class=\"second-input\"\n ref={(el) => (this.secondInputEl = el)}\n aria-label=\"second\"\n placeholder=\"SS\"\n disabled={this.disabled}\n aria-required={`${this.required}`}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onPaste={this.handlePaste}\n onKeyDown={(event) =>\n this.handleKeyDown(event, this.preventSecondInput)\n }\n ></input>\n );\n }\n return null;\n default:\n return null;\n }\n });\n };\n\n private getDescOfInputsOrder = () => {\n return \"hour, minute, and second\";\n };\n\n private getScreenReaderInfo = (validationStatus: string) => {\n let inputDescriptors = \"\";\n if (this.required) {\n inputDescriptors += \"required\";\n }\n if (validationStatus === IcInformationStatus.Error) {\n inputDescriptors += \" invalid data\";\n }\n return inputDescriptors === \"\" ? \"\" : inputDescriptors + \", \";\n };\n\n private notifyScreenReader = (input: HTMLInputElement) => {\n const liveRegion = this.el.shadowRoot?.querySelector(\"#live-region\");\n if (liveRegion) {\n liveRegion.textContent = `${input.value}, ${input.getAttribute(\n this.ARIA_LABEL\n )}`;\n }\n };\n\n private handlePaste = (event: ClipboardEvent) => {\n event.preventDefault();\n const pastedValue = event.clipboardData?.getData(\"Text\") || \"\";\n const isValidTime = this.isPastedStringTimeValid(pastedValue);\n this.setPastedValueAndValidation(isValidTime, pastedValue, event);\n };\n\n private handleClearFocus = () => {\n this.removeLabelledBy = true;\n this.clearButtonFocused = true;\n this.isTimeSetFromKeyboardEvent = true;\n };\n\n private handleClearBlur = (ev: FocusEvent) => {\n this.clearButtonFocused = false;\n this.isTimeSetFromKeyboardEvent = true;\n const relatedTarget = ev.relatedTarget as HTMLElement | null;\n if (relatedTarget?.id === \"clock-button\") {\n this.removeLabelledBy = false;\n return;\n }\n if (relatedTarget?.id.match(/(minute|second)-input$/)) {\n this.removeLabelledBy = false;\n return;\n }\n this.removeLabelledBy = true;\n };\n\n private handleClockFocus = () => {\n this.clockFocused = true;\n };\n\n private handleClockBlur = () => {\n this.clockFocused = false;\n };\n\n private isPastedStringTimeValid = (value: string): string | false => {\n if (this.isHHMMFormat()) {\n if (/^\\d{2}:\\d{2}$/.test(value)) {\n return value;\n }\n } else {\n if (/^\\d{2}:\\d{2}:\\d{2}$/.test(value)) {\n return value;\n }\n if (/^\\d{2}:\\d{2}:\\d{2}Z$/.test(value)) {\n return value.replace(\"Z\", \"\");\n }\n const isoMatch = value.match(/T(\\d{2}:\\d{2}:\\d{2})/);\n if (isoMatch) {\n return isoMatch[1];\n }\n }\n return false;\n };\n\n private setPastedValueAndValidation = (\n isValidTime: string | false,\n pastedValue: string,\n event: ClipboardEvent\n ) => {\n if (isValidTime) {\n const timeParts = isValidTime.split(\":\");\n this.inputsInOrder.forEach((input, index) => {\n input.classList.add(this.FIT_TO_VALUE);\n const timeValue = timeParts[index] || \"\";\n input.value = timeValue.slice(0, 2);\n this.setInputValue(input);\n this.autocompleteInput(input);\n });\n if (this.isHHMMFormat() && this.second !== \"\") {\n this.second = \"\";\n }\n } else {\n const pasted = pastedValue.trim();\n if ((pasted.length === 1 || pasted.length === 2) && isNumeric(pasted)) {\n this.setInputPasteValue(event.target, pasted);\n this.setInputValue(event.target as HTMLInputElement);\n } else {\n this.invalidTimeText = `Please paste a valid ${(\n event.target as HTMLInputElement\n ).getAttribute(this.ARIA_LABEL)}`;\n this.validationStatus = IcInformationStatus.Error;\n }\n }\n };\n\n render() {\n const {\n inputId,\n label,\n disabled,\n helperText,\n hideHelperText,\n hideLabel,\n showClearButton,\n showClockButton,\n size,\n theme,\n } = this;\n const hasCustomValidation = !isEmptyString(this.validationStatus);\n const validationStatus = hasCustomValidation\n ? this.validationStatus\n : !isEmptyString(this.invalidTimeText)\n ? IcInformationStatus.Error\n : \"\";\n const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;\n renderHiddenInput(\n true,\n this.el,\n this.name,\n this.convertToTime(this.hour, this.minute, this.second),\n this.disabled\n );\n const showDivider = !!(\n showClearButton &&\n !(\n isEmptyString(this.hour) &&\n isEmptyString(this.minute) &&\n isEmptyString(this.second)\n )\n );\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [`ic-time-input-disabled`]: disabled,\n [`ic-time-input-${size}`]: true,\n }}\n onBlur={this.handleHostBlur}\n onFocus={this.handleHostFocus}\n >\n <ic-input-container disabled={disabled}>\n {!(hideLabel && hideHelperText) && (\n <ic-input-label\n for={inputId}\n label={label}\n hideLabel={hideLabel}\n helperText={!hideHelperText ? helperText : \"\"}\n disabled={disabled}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n <span id={this.screenReaderInfoId} class=\"sr-only\" aria-hidden=\"true\">\n {this.getScreenReaderInfo(validationStatus)}\n {hideLabel && `${label}\\n`}\n {hideHelperText && `${helperText}\\n`}\n {`${this.defaultHelperText}.`}\n </span>\n <span id={this.assistiveHintId} class=\"sr-only\" aria-hidden=\"true\">\n {assistiveHint}\n </span>\n <span id=\"live-region\" aria-live=\"assertive\" class=\"sr-only\"></span>\n <ic-input-component-container\n id={inputId}\n ref={(el: HTMLIcInputComponentContainerElement) =>\n (this.inputCompContainerEl = el)\n }\n disabled={disabled}\n validationStatus={validationStatus}\n size={size}\n role=\"group\"\n class={{ [`ic-theme-${theme}`]: theme !== \"inherit\" }}\n >\n <div class=\"input-container\">\n <div class=\"time-inputs\">\n {[\n this.getInputsInOrder()[0],\n \":\",\n this.getInputsInOrder()[1],\n !this.isHHMMFormat()\n ? [\":\", this.getInputsInOrder()[2]]\n : null,\n ]}\n </div>\n <div class=\"action-buttons\">\n {showClearButton && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear input\"\n class={{\n [\"clear-button\"]: true,\n [\"hidden\"]:\n isEmptyString(this.hour) &&\n isEmptyString(this.minute) &&\n isEmptyString(this.second),\n }}\n disabled={this.disabled}\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearFocus}\n onBlur={this.handleClearBlur}\n variant=\"icon-tertiary\"\n theme={this.clearButtonFocused ? \"light\" : \"dark\"}\n size={size}\n ></ic-button>\n )}\n {showClockButton && (\n <div class=\"show-clock-button-wrapper\">\n <div class={{ divider: showDivider, [size]: true }}></div>\n <ic-button\n id=\"clock-button\"\n aria-label=\"Display clock\"\n aria-haspopup=\"dialog\"\n class=\"clock-button\"\n disabled={this.disabled}\n innerHTML={Clock}\n variant=\"icon-tertiary\"\n size={size}\n onFocus={this.handleClockFocus}\n onBlur={this.handleClockBlur}\n theme={this.clockFocused ? \"light\" : \"dark\"}\n ></ic-button>\n </div>\n )}\n </div>\n </div>\n </ic-input-component-container>\n <span id={this.selectedTimeInfoId} class=\"sr-only\" aria-live=\"polite\">\n <span\n ref={(el) => (this.selectedTimeInfoEl = el)}\n role=\"status\"\n ></span>\n </span>\n {(hasCustomValidation || !isEmptyString(this.invalidTimeText)) && (\n <ic-input-validation\n status={validationStatus}\n message={\n hasCustomValidation ? this.validationText : this.invalidTimeText\n }\n for={inputId}\n ></ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"wfAAA,MAAMA,EAAiB,o4NACvB,MAAAC,EAAeD,ECiCf,IAAIE,EAAW,E,MAYFC,EAAS,MAPtB,WAAAC,CAAAC,G,oKAQUC,KAAAC,oBAAoC,WACpCD,KAAAE,aAAe,eACfF,KAAAG,WAAa,aACbH,KAAAI,iBAAmB,kBAMnBJ,KAAAK,oBAAsB,iBACtBL,KAAAM,aAAe,eACfN,KAAAO,aAAeP,KAAKQ,MAEpBR,KAAAS,cAAoC,GACpCT,KAAAU,YAAuB,KACvBV,KAAAW,cAAyB,KACzBX,KAAAY,cAAyB,KACzBZ,KAAAa,YAAuB,KACvBb,KAAAc,2BAAsC,MAKtCd,KAAAe,qBAAoC,KACpCf,KAAAgB,aAA4B,KAI5BhB,KAAAiB,gBAA2B,MAC3BjB,KAAAkB,WAAsB,MACtBlB,KAAAmB,QAAuB,KACvBnB,KAAAoB,QAAuB,KAKtBpB,KAAAqB,aAAwB,MACxBrB,KAAAsB,mBAA8B,MAC9BtB,KAAAuB,iBAA4B,MAC5BvB,KAAAwB,KAAe,GACfxB,KAAAyB,OAAiB,GACjBzB,KAAA0B,OAAiB,GAoBlB1B,KAAA2B,SAAoB,MASpB3B,KAAA4B,aAAyC,GAKzC5B,KAAA6B,mBAA+B,MAU/B7B,KAAA8B,eAA0B,MAK1B9B,KAAA+B,UAAsB,MAKtB/B,KAAAgC,QAAkB,iBAAiBpC,MAKnCI,KAAAiC,mBAA6B,6BAU7BjC,KAAAkC,IAAqB,GASrBlC,KAAAmC,IAAqB,GASrBnC,KAAAoC,KAAepC,KAAKgC,QAKpBhC,KAAAqC,SAAoB,MAqBpBrC,KAAAsC,gBAA4B,KAK5BtC,KAAAuC,gB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QACEjB,EAAsBhQ,KAAK6C,eAAiB7C,KAAKmG,gBAEnDoK,IAAKvO,K","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["icCheckboxGroupCss","IcCheckboxGroupStyle0","CHECKBOX_SELECTOR","CheckboxGroup","constructor","hostRef","this","disabled","helperText","hideLabel","required","size","theme","validationStatus","validationText","watchDisabledHandler","removeDisabledFalse","el","labelNameHandler","newValue","oldValue","propName","Array","from","querySelectorAll","forEach","checkbox","groupLabel","name","watchThemeHandler","handleChange","ev","target","tagName","stopImmediatePropagation","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","label","selectHandler","checkedOptions","filter","checked","icChange","emit","value","map","opt","_a","textFieldValue","querySelector","selectedOption","render","describedBy","getInputDescribedByText","renderSRText","showValidation","hasValidationStatus","h","Host","key","class","id","trim","useLabelTag","slot","for","ariaLiveMode","status","message"],"sources":["../web-components/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","../web-components/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: block;\n\n --ic-input-label-text-color: var(--ic-checkbox-group-label);\n --ic-input-label-helper-text-color: var(--ic-checkbox-group-subtitle);\n --ic-input-validation-error: var(--ic-checkbox-state-icon-error);\n --ic-input-validation-status-text-color: var(--ic-checkbox-state-text);\n}\n\n:host(.ic-checkbox-group-disabled) {\n --ic-input-label-text-color: var(--ic-checkbox-group-label-disabled);\n --ic-input-label-helper-text-color: var(\n --ic-checkbox-group-subtitle-disabled\n );\n}\n\nic-input-label.error {\n color: var(--ic-checkbox-group-label-error);\n\n --ic-typography-color: var(--ic-checkbox-group-label-error);\n --ic-input-label-helper-text-color: var(--ic-checkbox-group-subtitle-error);\n}\n\nic-input-label:not(.with-helper) .ic-typography-label,\nic-input-label .helpertext {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.ic-checkbox-group-small)\n ic-input-label:not(.with-helper)\n .ic-typography-label,\n:host(.ic-checkbox-group-small) ic-input-label .helpertext {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\n:host(.ic-checkbox-group-large)\n ic-input-label:not(.with-helper)\n .ic-typography-label,\n:host(.ic-checkbox-group-large) ic-input-label .helpertext {\n margin-bottom: calc(var(--ic-space-sm) * 1.5);\n}\n\nic-input-label .helpertext {\n display: block;\n}\n\nic-input-validation.show-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.ic-checkbox-group-small) ic-input-validation.show-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n:host(.ic-checkbox-group-large) ic-input-validation.show-validation {\n margin-top: calc(var(--ic-space-sm) * 1.5);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-checkbox-group-small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n\n.screen-reader-only-text:dir(rtl) {\n right: -9999px;\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getInputDescribedByText, hasValidationStatus, onComponentRequiredPropUndefined, removeDisabledFalse, } from \"../../utils/helpers\";\nconst CHECKBOX_SELECTOR = \"ic-checkbox\";\n/**\n * @slot helper-text - Content is set as the helper text for the checkbox group.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class CheckboxGroup {\n constructor() {\n /**\n * If `true`, the checkbox group will be set to the disabled state.\n */\n this.disabled = false;\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n this.helperText = \"\";\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n this.hideLabel = false;\n /**\n * If `true`, the checkbox group will require a value.\n */\n this.required = false;\n /**\n * The size of the checkboxes to be displayed. This does not affect the font size of the label.\n */\n this.size = \"medium\";\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n this.theme = \"inherit\";\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n this.validationStatus = \"\";\n /**\n * The text to display as the validation message.\n */\n this.validationText = \"\";\n }\n watchDisabledHandler() {\n removeDisabledFalse(this.disabled, this.el);\n }\n labelNameHandler(newValue, oldValue, propName) {\n Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach((checkbox) => {\n if (propName === \"label\")\n checkbox.groupLabel = newValue;\n else if (checkbox.name === oldValue) {\n // If the checkbox name has been set by the parent, then override it\n checkbox.name = newValue;\n }\n });\n }\n watchThemeHandler(newValue) {\n Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach((checkbox) => {\n checkbox.theme = newValue;\n });\n }\n handleChange(ev) {\n //don't pass on the event if it has come from slotted text field\n //otherwise any icChange handler bound to the checkbox group will also run\n if (ev.target.tagName === \"IC-TEXT-FIELD\") {\n ev.stopImmediatePropagation();\n }\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n this.watchThemeHandler(this.theme);\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ], \"Checkbox Group\");\n }\n selectHandler({ target }) {\n const checkedOptions = Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).filter(({ checked, disabled }) => checked && !disabled);\n this.icChange.emit({\n value: checkedOptions.map(({ value }) => value),\n checkedOptions: checkedOptions.map((opt) => {\n var _a;\n return ({\n checkbox: opt,\n textFieldValue: (_a = opt.querySelector(\"ic-text-field\")) === null || _a === void 0 ? void 0 : _a.value,\n });\n }),\n selectedOption: target,\n });\n }\n render() {\n const { disabled, helperText, hideLabel, label, name, required, size, theme, validationStatus, validationText, } = this;\n const describedBy = getInputDescribedByText(this.el, name, helperText !== \"\", validationStatus !== \"\");\n const renderSRText = validationStatus === \"error\" || required || hideLabel;\n const showValidation = hasValidationStatus(validationStatus, disabled);\n return (h(Host, { key: '6d5ed4db589400cd64aeed3bccd46087858d2902', class: {\n \"ic-checkbox-group-disabled\": !!disabled,\n [`ic-checkbox-group-${size}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n } }, renderSRText && (h(\"span\", { key: '2fc368a571755ad3125067498b17b52ce8933e8f', id: \"screenReaderOnlyText\", class: \"screen-reader-only-text\", \"aria-hidden\": \"true\" }, label, \" \", validationStatus === \"error\" ? \"invalid data \" : null, \" \", required ? \"required\" : null)), h(\"fieldset\", { key: '6b7d3155fa0479fbd51c5e5100945ee4995dfadf', id: name, \"aria-labelledby\": `${renderSRText ? \"screenReaderOnlyText\" : \"\"} ${describedBy}`.trim(), disabled: disabled }, !hideLabel && (h(\"legend\", { key: '469a466275aa307d6ca876ec18a79bb5d29167b8' }, h(\"ic-input-label\", { key: '4cd2e89ab463ea9c7438fb1759faddf6df8750d1', class: { [`${validationStatus}`]: true }, label: label, helperText: helperText, required: required, disabled: disabled, useLabelTag: false }, h(\"slot\", { key: '0b0b0a5028039ef6d487d441ebd28f47f32200b7', name: \"helper-text\", slot: \"helper-text\" })))), h(\"div\", { key: '747fea859cd5a3bbd474454b408f648169b5fe45', class: \"checkboxes-container\" }, h(\"slot\", { key: '200a6c033ff1243e8778aec3c91a22213f5082f5' }))), showValidation && (h(\"ic-input-validation\", { key: 'df907eeb4348050b37357f27405b3ef548990163', class: {\n \"show-validation\": showValidation,\n }, for: name, ariaLiveMode: \"polite\", status: validationStatus, message: validationText }))));\n }\n static get is() { return \"ic-checkbox-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-checkbox-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-checkbox-group.css\"]\n };\n }\n static get properties() {\n return {\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the checkbox group will be set to the disabled state.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"helperText\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The helper text that will be displayed for additional field guidance.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"helper-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"hideLabel\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the label will be hidden and the required label value will be applied as an aria-label.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"hide-label\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label for the checkbox group to be displayed.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"name\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The name for the checkbox group to differentiate from other groups.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"name\",\n \"reflect\": false\n },\n \"required\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the checkbox group will require a value.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"required\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the checkboxes to be displayed. This does not affect the font size of the label.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"validationStatus\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcInformationStatusOrEmpty\",\n \"resolved\": \"\\\"\\\" | \\\"error\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcInformationStatusOrEmpty\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcInformationStatusOrEmpty\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The validation status - e.g. 'error' | 'warning' | 'success'.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"validation-status\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"validationText\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text to display as the validation message.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"validation-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a checkbox is checked.\"\n },\n \"complexType\": {\n \"original\": \"IcChangeEventDetail\",\n \"resolved\": \"IcChangeEventDetail\",\n \"references\": {\n \"IcChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-checkbox-group.types\",\n \"id\": \"src/components/ic-checkbox-group/ic-checkbox-group.types.ts::IcChangeEventDetail\"\n }\n }\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }, {\n \"propName\": \"label\",\n \"methodName\": \"labelNameHandler\"\n }, {\n \"propName\": \"name\",\n \"methodName\": \"labelNameHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemeHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icChange\",\n \"method\": \"handleChange\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"icCheck\",\n \"method\": \"selectHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-checkbox-group.js.map\n"],"mappings":"oHAAA,MAAMA,EAAqB,wnIAC3B,MAAAC,EAAeD,ECCf,MAAME,EAAoB,c,MAKbC,EAAa,MACtB,WAAAC,CAAAC,G,6CAIIC,KAAKC,SAAW,MAIhBD,KAAKE,WAAa,GAIlBF,KAAKG,UAAY,MAIjBH,KAAKI,SAAW,MAIhBJ,KAAKK,KAAO,SAIZL,KAAKM,MAAQ,UAIbN,KAAKO,iBAAmB,GAIxBP,KAAKQ,eAAiB,E,CAE1B,oBAAAC,GACIC,EAAoBV,KAAKC,SAAUD,KAAKW,G,CAE5C,gBAAAC,CAAiBC,EAAUC,EAAUC,GACjCC,MAAMC,KAAKjB,KAAKW,GAAGO,iBAAiBtB,IAAoBuB,SAASC,IAC7D,GAAIL,IAAa,QACbK,EAASC,WAAaR,OACrB,GAAIO,EAASE,OAASR,EAAU,CAEjCM,EAASE,KAAOT,C,KAI5B,iBAAAU,CAAkBV,GACdG,MAAMC,KAAKjB,KAAKW,GAAGO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E,OAAQ,CAAEE,IAAK,2CAA4CE,GAAI,uBAAwBD,MAAO,0BAA2B,cAAe,QAAUvB,EAAO,IAAK1B,IAAqB,QAAU,gBAAkB,KAAM,IAAKH,EAAW,WAAa,MAAQiD,EAAE,WAAY,CAAEE,IAAK,2CAA4CE,GAAInC,EAAM,kBAAmB,GAAG4B,EAAe,uBAAyB,MAAMF,IAAcU,OAAQzD,SAAUA,IAAaE,GAAckD,EAAE,SAAU,CAAEE,IAAK,4CAA8CF,EAAE,iBAAkB,CAAEE,IAAK,2CAA4CC,MAAO,CAAE,CAAC,GAAGjD,KAAqB,MAAQ0B,MAAOA,EAAO/B,WAAYA,EAAYE,SAAUA,EAAUH,SAAUA,EAAU0D,YAAa,OAASN,EAAE,OAAQ,CAAEE,IAAK,2CAA4CjC,KAAM,cAAesC,KAAM,kBAAqBP,EAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,wBAA0BH,EAAE,OAAQ,CAAEE,IAAK,+CAAiDJ,GAAmBE,EAAE,sBAAuB,CAAEE,IAAK,2CAA4CC,MAAO,CAChmC,kBAAmBL,GACpBU,IAAKvC,EAAMwC,aAAc,SAAUC,OAAQxD,EAAkByD,QAASxD,I","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as s,g as e}from"./p-8e4e97b4.js";import{p as h,h as l}from"./p-542ac498.js";const a=":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.ic-stepper-default:not(.ic-stepper-aligned-left)) .step-item-list{flex:auto}:host(.ic-stepper-compact) ul ::slotted(ic-step){display:none}:host(.ic-stepper-compact) ul ::slotted(ic-step.show){display:flex}:host(.ic-stepper-compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";const o=a;const d=class{constructor(i){t(this,i);var s;this.resizeObserver=null;this.visuallyHidden="visually-hidden";this.alignedFullWidth=true;this.autoSetStepTitles=true;this.lastStepWidth=0;this.noOfResizes=0;this.stepperWidth=(s=document.querySelector("ic-stepper"))===null||s===void 0?void 0:s.getBoundingClientRect().width;this.stepTypes=[];this.variantOverride=this.variant!=="compact";this.aligned="full-width";this.connectorWidth=100;this.hideStepInfo=false;this.icI18n={next:"Next",step:"Step",of:"of",lastStep:"Last step",completed:"Completed",notRequired:"Not required",required:"Required",optional:"Optional"};this.theme="inherit";this.variant="default";this.getChildren=()=>{this.steps=Array.from(this.el.querySelectorAll("ic-step"));this.stepsWithStepTitles=Array.from(this.el.querySelectorAll("ic-step[heading]"))};this.checkStepTitles=()=>{if(this.stepsWithStepTitles.length<this.steps.length&&this.variantOverride&&this.variant==="compact"){this.noOfResizes=this.noOfResizes+1;if(this.noOfResizes===1){console.error(`The prop 'heading' is required for all steps of the Stepper component (compact variant)`)}}};this.setStepTypes=()=>{this.getChildren();this.stepTypes=[];for(let t=0;t<this.steps.length;t++){this.stepTypes.push("active")}};this.setStepperWidth=()=>{this.alignedFullWidth=this.variant==="default"&&this.aligned==="full-width";const t=this.steps[this.steps.length-1];t.style.maxWidth="none";if(this.alignedFullWidth){this.stepperWidth=this.el.offsetWidth;t.style.maxWidth=h(`${this.stepperWidth/this.steps.length}px`);this.lastStepWidth=t.offsetWidth}};this.initialiseStepStates=()=>{this.steps.forEach(((t,i)=>{var s,e,l;if(this.icI18n!==undefined){t.icI18n=this.icI18n}t.variant=this.variant;t.stepNum=i+1;t.lastStep=i===this.steps.length-1;t.lastStepNum=this.steps.length;if(t.type!=="current"){t.current=false;this.stepTypes[i]=t.type}else{t.current=true}const a=t.shadowRoot&&t.shadowRoot.querySelector(".step > .heading-area");if(this.stepsWithStepTitles.length==0&&this.variantOverride){if(this.variant==="compact"){this.autoSetStepTitles=true;if(this.autoSetStepTitles){t.heading="Step "+t.stepNum;a&&((s=a===null||a===void 0?void 0:a.querySelector(".heading"))===null||s===void 0?void 0:s.setAttribute("aria-hidden","true"))}}if(this.variant==="default"){this.autoSetStepTitles=false;if(!this.autoSetStepTitles){t.heading=undefined;a&&((e=a===null||a===void 0?void 0:a.querySelector(".heading"))===null||e===void 0?void 0:e.removeAttribute("aria-hidden"))}}}if(this.variant==="compact"){if(t.current===true||t.type==="current"){t.classList.remove("hide");t.classList.add("show")}else if(t.classList.contains("show")){t.classList.remove("show");t.classList.add("hide")}if(!t.lastStep){t.nextStepHeading=this.steps[i+1].heading;t.progress=t.stepNum/this.steps.length*100}else if(t.lastStep&&this.stepTypes[i]!=="completed"){t.progress=95}else{t.progress=100}if(this.hideStepInfo&&a!==null){a.classList.remove(this.visuallyHidden)}t.compactStepStyling=this.stepTypes[i]}if(this.variant==="default"){if(!t.lastStep){if(this.alignedFullWidth&&this.stepperWidth!==undefined){t.style.width=h(`${(this.stepperWidth-this.lastStepWidth)/(this.steps.length-1)}px`);t.style.minWidth=h("148px")}}else if(t.lastStep){t.classList.add("last-step");if(this.alignedFullWidth){t.style.maxWidth=`${this.lastStepWidth}px`}else if(this.connectorWidth){t.style.maxWidth=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px")}}if(this.aligned==="left"&&this.connectorWidth){t.style.width=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px");const i=(l=t.shadowRoot)===null||l===void 0?void 0:l.querySelector(".step > .step-top > .step-connect");if(i){i.style.width=this.connectorWidth>100?h(`${this.connectorWidth}px`):h("100px")}}if(this.hideStepInfo&&a!==null){a.classList.add(this.visuallyHidden)}}}))};this.setHideStepInfo=()=>{this.steps.forEach((t=>{var i,s,e;const h=(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".step > .heading-area");if(h){if(this.hideStepInfo){(s=h.classList)===null||s===void 0?void 0:s.add(this.visuallyHidden)}else{(e=h.classList)===null||e===void 0?void 0:e.remove(this.visuallyHidden)}}}))};this.overrideVariant=()=>{if(this.variantOverride){let t=148*this.steps.length;if(this.aligned==="left"&&this.connectorWidth&&this.connectorWidth>100){t=(this.connectorWidth+48)*this.steps.length}if(this.el.clientWidth<t){this.variant="compact"}else{this.variant="default"}}};this.resizeObserverCallback=()=>{this.getChildren();this.checkStepTitles();this.overrideVariant();this.setStepperWidth();this.initialiseStepStates();this.handleThemeChange()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)}}handleThemeChange(){this.getChildren();this.steps.forEach((t=>{t.theme=this.theme}))}handlePropChange(){this.setHideStepInfo();this.getChildren()}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.setStepTypes();this.handleThemeChange();if(this.variant==="compact"){this.variantOverride=false}}componentWillRender(){this.initialiseStepStates()}componentDidLoad(){l(this.runResizeObserver)}render(){return i(s,{key:"a5ec9b8d778ba54adf1b3034455e64df0a51fd7c",class:{[`ic-stepper-${this.variant}`]:true,["ic-stepper-aligned-left"]:this.variant==="default"&&this.aligned==="left",[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},i("ul",{key:"4140f5cb20325ee4c5c98c855c4b822a448294e8",class:"step-item-list"},i("slot",{key:"cda080de502e7760bb3f9a1519f0261b554b0b77"})))}get el(){return e(this)}static get watchers(){return{theme:["handleThemeChange"],hideStepInfo:["handlePropChange"],variant:["handlePropChange"]}}};d.style=o;export{d as ic_stepper};
|
|
2
|
-
//# sourceMappingURL=p-7bb3531c.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["icStepperCss","IcStepperStyle0","Stepper","constructor","hostRef","_a","this","resizeObserver","visuallyHidden","alignedFullWidth","autoSetStepTitles","lastStepWidth","noOfResizes","stepperWidth","document","querySelector","getBoundingClientRect","width","stepTypes","variantOverride","variant","aligned","connectorWidth","hideStepInfo","icI18n","next","step","of","lastStep","completed","notRequired","required","optional","theme","getChildren","steps","Array","from","el","querySelectorAll","stepsWithStepTitles","checkStepTitles","length","console","error","setStepTypes","i","push","setStepperWidth","style","maxWidth","offsetWidth","pxToRem","initialiseStepStates","forEach","index","_b","_c","undefined","stepNum","lastStepNum","type","current","stepTitleArea","shadowRoot","heading","setAttribute","removeAttribute","classList","remove","add","contains","nextStepHeading","progress","compactStepStyling","minWidth","stepConnect","setHideStepInfo","overrideVariant","minDefaultStepperWidth","clientWidth","resizeObserverCallback","handleThemeChange","runResizeObserver","ResizeObserver","observe","handlePropChange","disconnectedCallback","disconnect","componentWillLoad","componentWillRender","componentDidLoad","checkResizeObserver","render","h","Host","key","class"],"sources":["../web-components/dist/collection/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","../web-components/dist/collection/components/ic-stepper/ic-stepper.js"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.ic-stepper-default:not(.ic-stepper-aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.ic-stepper-compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.ic-stepper-compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.ic-stepper-compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Host, h } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nexport class Stepper {\n constructor() {\n var _a;\n this.resizeObserver = null;\n this.visuallyHidden = \"visually-hidden\";\n this.alignedFullWidth = true;\n this.autoSetStepTitles = true;\n this.lastStepWidth = 0;\n this.noOfResizes = 0;\n this.stepperWidth = (_a = document\n .querySelector(\"ic-stepper\")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width;\n this.stepTypes = [];\n this.variantOverride = this.variant !== \"compact\";\n /**\n * The alignment of the default stepper within its container.\n */\n this.aligned = \"full-width\";\n /**\n * The length of the connector between each step in pixels. Minimum length is 100px.\n */\n this.connectorWidth = 100;\n /**\n * If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\n */\n this.hideStepInfo = false;\n /**\n * Provide alternative values for text in all child steps. For the purpose of translating the application into other languages.\n */\n this.icI18n = {\n next: \"Next\",\n step: \"Step\",\n of: \"of\",\n lastStep: \"Last step\",\n completed: \"Completed\",\n notRequired: \"Not required\",\n required: \"Required\",\n optional: \"Optional\",\n };\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n this.theme = \"inherit\";\n /**\n * The variant of the stepper.\n */\n this.variant = \"default\";\n // Get all steps currently within this stepper\n this.getChildren = () => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n this.stepsWithStepTitles = Array.from(this.el.querySelectorAll(\"ic-step[heading]\"));\n };\n // Inform the user that stepTitles are required on all steps in a compact stepper\n this.checkStepTitles = () => {\n if (this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\") {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(`The prop 'heading' is required for all steps of the Stepper component (compact variant)`);\n }\n }\n };\n this.setStepTypes = () => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n this.setStepperWidth = () => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(`${this.stepperWidth / this.steps.length}px`);\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n this.initialiseStepStates = () => {\n this.steps.forEach((step, index) => {\n var _a, _b, _c;\n // Set language\n if (this.icI18n !== undefined) {\n step.icI18n = this.icI18n;\n }\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n if (step.type !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.type;\n }\n else {\n step.current = true;\n }\n const stepTitleArea = step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .heading-area\");\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.heading = \"Step \" + step.stepNum;\n stepTitleArea &&\n ((_a = stepTitleArea === null || stepTitleArea === void 0 ? void 0 : stepTitleArea.querySelector(\".heading\")) === null || _a === void 0 ? void 0 : _a.setAttribute(\"aria-hidden\", \"true\"));\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.heading = undefined;\n stepTitleArea &&\n ((_b = stepTitleArea === null || stepTitleArea === void 0 ? void 0 : stepTitleArea.querySelector(\".heading\")) === null || _b === void 0 ? void 0 : _b.removeAttribute(\"aria-hidden\"));\n }\n }\n }\n if (this.variant === \"compact\") {\n if (step.current === true || step.type === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n }\n else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n if (!step.lastStep) {\n step.nextStepHeading = this.steps[index + 1].heading;\n step.progress = (step.stepNum / this.steps.length) * 100;\n }\n else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n }\n else {\n step.progress = 100;\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(this.visuallyHidden);\n }\n step.compactStepStyling = this.stepTypes[index];\n }\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth && this.stepperWidth !== undefined) {\n step.style.width = pxToRem(`${(this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)}px`);\n step.style.minWidth = pxToRem(\"148px\");\n }\n }\n else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n }\n else if (this.connectorWidth) {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n if (this.aligned === \"left\" && this.connectorWidth) {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = (_c = step.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector(\".step > .step-top > .step-connect\");\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(this.visuallyHidden);\n }\n }\n });\n };\n this.setHideStepInfo = () => {\n this.steps.forEach((step) => {\n var _a, _b, _c;\n const stepTitleArea = (_a = step.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\".step > .heading-area\");\n if (stepTitleArea) {\n if (this.hideStepInfo) {\n (_b = stepTitleArea.classList) === null || _b === void 0 ? void 0 : _b.add(this.visuallyHidden);\n }\n else {\n (_c = stepTitleArea.classList) === null || _c === void 0 ? void 0 : _c.remove(this.visuallyHidden);\n }\n }\n });\n };\n this.overrideVariant = () => {\n if (this.variantOverride) {\n let minDefaultStepperWidth = 148 * this.steps.length;\n if (this.aligned === \"left\" &&\n this.connectorWidth &&\n this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n }\n else {\n this.variant = \"default\";\n }\n }\n };\n this.resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n this.handleThemeChange();\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n }\n handleThemeChange() {\n this.getChildren();\n this.steps.forEach((step) => {\n step.theme = this.theme;\n });\n }\n handlePropChange() {\n this.setHideStepInfo();\n this.getChildren();\n }\n disconnectedCallback() {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n componentWillLoad() {\n this.setStepTypes();\n this.handleThemeChange();\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n componentWillRender() {\n this.initialiseStepStates();\n }\n componentDidLoad() {\n checkResizeObserver(this.runResizeObserver);\n }\n render() {\n return (h(Host, { key: 'a5ec9b8d778ba54adf1b3034455e64df0a51fd7c', class: {\n [`ic-stepper-${this.variant}`]: true,\n [\"ic-stepper-aligned-left\"]: this.variant === \"default\" && this.aligned === \"left\",\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n } }, h(\"ul\", { key: '4140f5cb20325ee4c5c98c855c4b822a448294e8', class: \"step-item-list\" }, h(\"slot\", { key: 'cda080de502e7760bb3f9a1519f0261b554b0b77' }))));\n }\n static get is() { return \"ic-stepper\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get properties() {\n return {\n \"aligned\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcStepperAlignment\",\n \"resolved\": \"\\\"full-width\\\" | \\\"left\\\" | undefined\",\n \"references\": {\n \"IcStepperAlignment\": {\n \"location\": \"import\",\n \"path\": \"./ic-stepper.types\",\n \"id\": \"src/components/ic-stepper/ic-stepper.types.ts::IcStepperAlignment\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The alignment of the default stepper within its container.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"full-width\\\"\"\n },\n \"connectorWidth\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The length of the connector between each step in pixels. Minimum length is 100px.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"connector-width\",\n \"reflect\": false,\n \"defaultValue\": \"100\"\n },\n \"hideStepInfo\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"hide-step-info\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"icI18n\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcStepI18n\",\n \"resolved\": \"undefined | { next: string; step: string; of: string; lastStep: string; completed: string; notRequired: string; required: string; optional: string; }\",\n \"references\": {\n \"IcStepI18n\": {\n \"location\": \"import\",\n \"path\": \"../ic-step/ic-step.types\",\n \"id\": \"src/components/ic-step/ic-step.types.ts::IcStepI18n\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Provide alternative values for text in all child steps. For the purpose of translating the application into other languages.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"defaultValue\": \"{\\n next: \\\"Next\\\",\\n step: \\\"Step\\\",\\n of: \\\"of\\\",\\n lastStep: \\\"Last step\\\",\\n completed: \\\"Completed\\\",\\n notRequired: \\\"Not required\\\",\\n required: \\\"Required\\\",\\n optional: \\\"Optional\\\",\\n }\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\" | undefined\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcStepVariants\",\n \"resolved\": \"\\\"compact\\\" | \\\"default\\\" | undefined\",\n \"references\": {\n \"IcStepVariants\": {\n \"location\": \"import\",\n \"path\": \"../ic-step/ic-step.types\",\n \"id\": \"src/components/ic-step/ic-step.types.ts::IcStepVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the stepper.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"alignedFullWidth\": {},\n \"autoSetStepTitles\": {},\n \"lastStepWidth\": {},\n \"noOfResizes\": {},\n \"stepperWidth\": {},\n \"stepTypes\": {},\n \"variantOverride\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"theme\",\n \"methodName\": \"handleThemeChange\"\n }, {\n \"propName\": \"hideStepInfo\",\n \"methodName\": \"handlePropChange\"\n }, {\n \"propName\": \"variant\",\n \"methodName\": \"handlePropChange\"\n }];\n }\n}\n//# sourceMappingURL=ic-stepper.js.map\n"],"mappings":"oGAAA,MAAMA,EAAe,oYACrB,MAAAC,EAAeD,E,MCCFE,EAAO,MAChB,WAAAC,CAAAC,G,UACI,IAAIC,EACJC,KAAKC,eAAiB,KACtBD,KAAKE,e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xE,KAAK0C,kBACL1C,KAAK+C,uBACL/C,KAAK4E,mBAAmB,EAE5B5E,KAAK6E,kBAAoB,KACrB7E,KAAKC,eAAiB,IAAI6E,gBAAe,KACrC9E,KAAK2E,wBAAwB,IAEjC3E,KAAKC,eAAe8E,QAAQ/E,KAAKgC,GAAG,C,CAG5C,iBAAA4C,GACI5E,KAAK4B,cACL5B,KAAK6B,MAAMmB,SAAS5B,IAChBA,EAAKO,MAAQ3B,KAAK2B,KAAK,G,CAG/B,gBAAAqD,GACIhF,KAAKuE,kBACLvE,KAAK4B,a,CAET,oBAAAqD,GACI,GAAIjF,KAAKC,iBAAmB,KAAM,CAC9BD,KAAKC,eAAeiF,Y,EAG5B,iBAAAC,GACInF,KAAKuC,eACLvC,KAAK4E,oBACL,GAAI5E,KAAKc,UAAY,UAAW,CAC5Bd,KAAKa,gBAAkB,K,EAG/B,mBAAAuE,GACIpF,KAAK+C,sB,CAET,gBAAAsC,GACIC,EAAoBtF,KAAK6E,kB,CAE7B,MAAAU,GACI,OAAQC,EAAEC,EAAM,CAAEC,IAAK,2CAA4CC,MAAO,CAClE,CAAC,cAAc3F,KAAKc,WAAY,KAChC,CAAC,2BAA4Bd,KAAKc,UAAY,WAAad,KAAKe,UAAY,OAC5E,CAAC,YAAYf,KAAK2B,SAAU3B,KAAK2B,QAAU,YAC1C6D,EAAE,KAAM,CAAEE,IAAK,2CAA4CC,MAAO,kBAAoBH,EAAE,OAAQ,CAAEE,IAAK,8C","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as s,g as a}from"./p-8e4e97b4.js";import{d as n,g as h,a as r,y as o,b as c,c as d,e as l,f as u,h as f}from"./p-bc441e4c.js";import{s as b,k as p,l as m,m as y,r as w,o as g,n as k}from"./p-0f22f41e.js";const v=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.70687 6L8.29688 7.41L12.8769 12L8.29688 16.59L9.70687 18L15.7069 12L9.70687 6Z" fill="currentColor"/>\n</svg>\n`;const x=({focussed:e,today:i,day:s,monthInView:a,onFocusDay:n,onBlurDay:h,onSelectDay:r,selected:o,focussedDayRef:c,inRange:d,showDaysOutsideMonth:l,disableDay:u})=>{const f=()=>{r(s)};const y=()=>{n()};const w=()=>{h()};const g=b(p);const k=b(m);const v=!d||u;const x=a!==s.getMonth();const D=v||x&&!l;return t("div",{class:"day-button-container"},t("button",{class:{"day-button":true,"outside-month":x,"outside-range":!!v,hidden:x&&!l,disabled:D,today:i,selected:o,focussed:e},tabIndex:e?0:-1,"aria-hidden":x?"true":"false","aria-disabled":D?"true":"false","aria-current":i?"date":undefined,"aria-label":D||x||v?undefined:`Choose ${g[s.getDay()]}, ${s.getDate()} ${k[s.getMonth()]} ${s.getFullYear()}`,disabled:D,onClick:f,onBlur:w,onFocus:y,ref:t=>{if(e&&t&&c){c(t)}}},(!x||x&&l)&&t("ic-typography",{variant:"subtitle-small",italic:x},s.getDate())))};const D=({size:e,focussedMonth:i,monthInView:s,onSelectMonth:a,onKeyDown:o,focussedMonthRef:c,minDate:d,maxDate:l,yearInView:u})=>{const f=t=>{const e=t.target;a(Number(e.getAttribute("data-month")))};const p=b(m);return t("div",{class:{"month-picker":true},role:"list"},p.map(((a,b)=>{const p=s===b;const m=i===b;const y=!n(new Date(u,b,1),d?r(d):null,l?h(l):null);return t("ic-button",{role:"listitem",class:{"month-button":true,selected:p,focussed:m,disabled:y},"full-width":true,disabled:y,variant:p?"primary":"tertiary","data-month":b,size:e,tabIndex:m?0:-1,"aria-current":p?"true":"false","aria-label":p?"":`select ${a}`,onClick:f,onKeyDown:o,ref:t=>{if(m&&t){c(t)}}},a)})))};const z=({decadeView:e,size:i,focussedYear:s,yearInView:a,onSelectYear:n,onFocusYear:h,onBlurYear:r,onKeyDown:c,minDate:d,maxDate:l,focussedYearRef:u})=>{const f=t=>{const e=t.target;n(Number(e.getAttribute("data-year")))};const b=()=>{h()};const p=()=>{r()};const m=t=>{t.preventDefault()};const y=e[0];const w=e[11];const g=e.slice(1,11);return t("div",{class:"year-picker",role:"list"},t("div",{class:"prev-decade","aria-hidden":"true"},t("ic-button",{id:"prev-decade-button",class:{"year-button":true},disabled:!o(y,d,l),"data-year":y,tabIndex:-1,variant:"tertiary",onClick:f,onMouseDown:m,"aria-hidden":"true",size:i},`${y-9}s`,t("svg",{slot:"left-icon",width:"12",height:"12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z",fill:"currentColor"})))),g.map((e=>{const n=a===e;const h=s===e;return t("ic-button",{class:{"year-button":true,selected:n,focussed:h},disabled:!o(e,d,l),"data-year":e,tabIndex:h?0:-1,variant:n?"primary":"tertiary",onClick:f,"aria-label":n?"":`select ${e}`,role:"listitem","aria-current":n?"true":"false",onKeyDown:c,onFocus:b,onBlur:p,size:i,ref:t=>{if(h&&t){u(t)}}},e)})),t("div",{class:"next-decade","aria-hidden":"true"},t("ic-button",{id:"next-decade-button",class:{"year-button":true,flip:true},disabled:!o(w,d,l),"data-year":w,tabIndex:-1,variant:"tertiary",onClick:f,onMouseDown:m,"aria-hidden":"true",size:i},`${w}s`,t("svg",{slot:"right-icon",width:"12",height:"12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z",fill:"currentColor"})))))};const H='/*! 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;position:relative;--month-year-picker-button-width:5rem;--month-button-width:5.5rem;--input-field-width:var(--input-width, 19.125rem);--ic-input-label-helpertext-padding:var(--ic-space-xxs)}:host(.ic-date-picker-large){--month-button-width:6.3125rem;--input-field-width:var(--input-width, 21.125rem)}:host(.ic-date-picker-small){--month-button-width:6.25rem;--input-field-width:var(--input-width, 17.125rem)}:host .date-input-container{position:relative}ic-date-input{--input-width:var(--input-field-width)}:host .calendar-container{min-width:19rem;max-width:23.5rem;width:var(--input-width);display:flex;flex-direction:column;gap:var(--ic-space-xs);position:absolute;border:var(--ic-border-default);border-color:var(--ic-date-picker-calendar-border);border-radius:var(--ic-border-radius);align-items:center;background-color:var(--ic-date-picker-calendar-bg);z-index:var(--ic-z-index-date-picker);box-sizing:border-box;box-shadow:var(--ic-date-picker-calendar-elevation);margin-top:var(--ic-space-xxxs);padding:var(--ic-space-xs);animation:fade-in-calendar var(--ic-transition-duration-slow)}:host(.ic-date-picker-small) .calendar-container{min-width:17rem;max-width:21.5rem}:host(.ic-date-picker-large) .calendar-container{min-width:21rem;max-width:25.5rem}:host .calendar-container.above{bottom:calc(var(--ic-space-xxl) - var(--ic-space-xxs))}:host .month-year-nav-container{display:flex;justify-content:space-between;align-items:center;align-self:stretch}:host .month-year-nav-container.hidden{display:none}:host .month-year-nav{display:flex;justify-content:space-between;align-items:center;flex:1 0 0}:host .month-picker,:host .year-picker{flex-wrap:wrap;display:inline-flex;align-items:center;width:17.5rem;-moz-column-gap:var(--ic-space-xs);column-gap:var(--ic-space-xs);row-gap:var(--ic-space-xxs)}:host(.ic-date-picker-small) .month-picker,:host(.ic-date-picker-small) .year-picker{width:13.125rem}:host(.ic-date-picker-large) .month-picker,:host(.ic-date-picker-large) .year-picker{width:20rem}:host .month-picker-button,:host .year-picker-button{width:5rem;--min-width:5rem}:host .month-button,:host .year-button{width:var(--month-button-width)}:host .month-button.focussed,:host .year-button.focussed{z-index:1}:host .month-button::part(button),:host .year-button::part(button){min-width:var(--month-button-width)}:host .prev-decade .year-button svg{margin-right:calc(-1 * var(--ic-space-xl));padding-top:var(--ic-space-sm)}:host .prev-decade .year-button::part(button){padding-left:0;padding-right:var(--ic-space-lg)}:host(.ic-date-picker-small) .prev-decade .year-button::part(button){padding-left:0;padding-right:calc(var(--ic-space-lg) + var(--ic-space-xxs))}:host .next-decade .year-button svg{margin-left:calc(-1 * var(--ic-space-xl));padding-top:var(--ic-space-sm)}:host .next-decade .year-button::part(button){padding-right:0;padding-left:var(--ic-space-lg)}:host(.ic-date-picker-small) .next-decade .year-button::part(button),:host(.ic-date-picker-large) .next-decade .year-button::part(button){padding-left:var(--ic-space-xl)}:host .bottom-buttons{display:flex;justify-content:space-between;align-items:center;align-self:stretch;animation:fade-in-buttons var(--ic-transition-duration-slow)}:host .bottom-buttons.no-today{align-items:flex-end;flex-direction:column}:host .bottom-buttons.hidden{display:none}:host .calendar{display:flex;flex-direction:column;align-items:flex-start;width:15.75rem;animation:fade-in-buttons var(--ic-transition-duration-slow)}:host(.ic-date-picker-large) .calendar{width:19.25rem}:host(.ic-date-picker-small) .calendar{padding-bottom:var(--ic-space-xxs);width:14rem}:host .hidden{display:none}:host .weekdays{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:var(--ic-space-xs);align-self:stretch}:host .calendar-days-container{display:flex;flex-wrap:wrap;justify-content:space-between;row-gap:var(--ic-space-xs);padding:var(--ic-space-xxs) 0;min-height:16rem;align-content:flex-start}:host(.ic-date-picker-small) .calendar-days-container{padding:var(--ic-space-xxxs) 0;min-height:14.5rem}:host(.ic-date-picker-large) .calendar-days-container{padding:var(--ic-space-xs) 0;min-height:17.5rem}:host .calendar-day-header{display:flex;width:2rem;padding:var(--ic-space-xxs) 0;justify-content:center;align-items:center}:host(.ic-date-picker-small) .calendar-day-header,:host(.ic-date-picker-large) .calendar-day-header{padding:var(--ic-space-xxs)}:host .calendar-day-header ic-typography{--ic-typography-color:var(--ic-date-picker-calendar-label);text-align:center}:host .day-button-container{display:flex;justify-content:center;align-items:center;width:2.25rem;height:2.25rem}:host(.ic-date-picker-small) .day-button-container{width:2rem;height:2rem}:host(.ic-date-picker-large) .day-button-container{width:2.5rem;height:2.5rem}:host .day-button{display:flex;position:relative;justify-content:center;align-items:center;border:0;border-radius:2rem;background-color:var(--ic-date-picker-calendar-bg);width:2rem;height:2rem;cursor:pointer;transition:var(--ic-easing-transition-fast);z-index:0}:host .day-button.disabled{cursor:default}:host(.ic-date-picker-large) .day-button{width:2.25rem;height:2.25rem}:host(.ic-date-picker-small) .day-button{width:1.75rem;height:1.75rem}:host .day-button ic-typography{width:1.75rem;--ic-typography-color:var(--ic-date-picker-date-label-default)}:host .day-button.outside-range ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-disabled)}:host .day-button.outside-month ic-typography{font-weight:var(--ic-font-weight-regular) !important}:host .day-button.outside-month:not(.outside-range):not(.selected) ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-default)}:host .day-button:hover:not(.disabled){background-color:var(--ic-date-picker-date-default-bg-hover)}:host .day-button:active:not(.disabled){background-color:var(--ic-date-picker-date-default-bg-pressed)}@media (prefers-reduced-motion: no-preference){:host .day-button:hover:not(.disabled):not(.focussed),:host .day-button:active:not(.disabled):not(.focussed){transition:background-color var(--ic-transition-duration-slow) ease-in-out}}:host .day-button.selected:not(.hidden){background-color:var(--ic-date-picker-date-active-bg-default)}:host .day-button.selected ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-selected)}:host .day-button.selected:not(.hidden):hover{background-color:var(--ic-date-picker-date-active-bg-hover)}:host .day-button.selected:not(.hidden):active{background-color:var(--ic-date-picker-date-active-bg-pressed)}:host .day-button.focussed{z-index:1}:host .day-button:focus{outline:none}:host .day-button.focussed:focus{box-shadow:var(--ic-border-focus)}:host .day-button.today:not(.hidden)::after{content:"";position:absolute;width:0.875rem;height:0.125rem;bottom:0.4rem;border-radius:var(--ic-border-radius);background-color:var(--ic-date-picker-default-underline)}:host(.ic-date-picker-small) .day-button.today::after{bottom:0.35rem}:host(.ic-date-picker-large) .day-button.today::after{width:1rem}:host .day-button.today.selected::after{background-color:var(--ic-date-picker-selected-underline)}:host #select-month-hint,:host #select-year-hint{display:none}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){:host .calendar-container,:host .calendar,:host .bottom-buttons{animation:none}}@keyframes fade-in-buttons{0%{opacity:0}50%{opacity:0}100%{opacity:1}}@keyframes fade-in-calendar{0%{display:flex;max-height:0}100%{display:flex;max-height:600px}}@media (forced-colors: active){:host .day-button.today:not(.hidden)::after{background-color:highlight}:host .day-button.selected:not(.hidden){background-color:highlight}:host .day-button.focussed:focus{border:var(--ic-border-hc)}:host .month-button.selected::part(button),:host .year-button.selected::part(button){background-color:highlight}}';const M=H;const P="DD/MM/YYYY";const V="Dates in the future are not allowed. Please select a date in the past.";const L="Dates in the past are not allowed. Please select a date in the future.";const T="The date you have selected is on a day of the week that is not allowed. Please select another date.";const C=100;const I=360;const Y=400;const $=440;const A=class{constructor(s){e(this,s);this.icChange=i(this,"icChange",7);this.clearButtonEl=null;this.daysOfWeek=[];this.dayButtonFocussed=false;this.dayPickerKeyboardNav=false;this.dialogDescription="";this.focusDay=true;this.liveRegionEl=undefined;this.monthNames=[];this.monthInViewUpdateHandled=false;this.myCalendarButtonClicked=false;this.showPickerAbove=false;this.today=new Date;this.todayButtonEl=null;this.yearButtonFocussed=false;this.calendarOpen=false;this.currMonthView=[];this.currYearPickerView=[];this.decadeView=[];this.focussedDate=null;this.maxDate=null;this.minDate=null;this.monthPickerVisible=false;this.orderedDaysOfWeek=[];this.selectedDate=null;this.yearPickerVisible=false;this.dateFormat="DD/MM/YYYY";this.disabled=false;this.emitDatePartChange=false;this.disableDays=[];this.disableDaysMessage="The date you have selected is on a day of the week that is not allowed. Please select another date.";this.disableFuture=false;this.disableFutureMessage="Dates in the future are not allowed. Please select a date in the past.";this.disablePast=false;this.disablePastMessage="Dates in the past are not allowed. Please select a date in the future.";this.hideHelperText=false;this.hideLabel=false;this.invalidDateMessage="Please enter a valid date.";this.max="";this.min="";this.openAtDate="";this.required=false;this.showDaysOutsideMonth=true;this.showClearButton=true;this.showPickerClearButton=true;this.showPickerTodayButton=true;this.size="medium";this.startOfWeek=y.Monday;this.theme="inherit";this.validationStatus="";this.validationText="";this.value="";this.setDecadeView=t=>{let e=t-1;const i=[];while(e<=t+10){i.push(e);e++}this.decadeView=i;this.decadeStart=i[1];this.decadeEnd=i[10]};this.setSelectedDate=(t,e=true)=>{var i;if(t===null||!c(t,this.selectedDate)){this.selectedDate=t;this.value=t;if(e){(i=this.inputEl)===null||i===void 0?void 0:i.triggerIcChange(t)}}};this.handleCalendarMouseDown=t=>{const e=t.target;if(e.tagName!=="IC-BUTTON"){t.preventDefault()}};this.handleCalendarClick=t=>{this.clearDialogDescription();t.stopImmediatePropagation()};this.handleDocumentClick=()=>{this.calendarOpen=false};this.keyDownHandler=t=>{var e;if(t.key==="Escape"){if(this.calendarOpen){this.closeButtonClickHandler();(e=this.inputEl)===null||e===void 0?void 0:e.setCalendarFocus();t.stopImmediatePropagation()}}else{this.clearDialogDescription();t.stopImmediatePropagation()}};this.closeButtonClickHandler=()=>{this.calendarOpen=false};this.focusFirstElement=()=>{this.monthButtonEl.setFocus()};this.focusLastElement=()=>{if(this.showPickerClearButton&&this.clearButtonEl&&!this.clearButtonEl.disabled){this.clearButtonEl.setFocus()}else if(this.showPickerTodayButton&&this.todayButtonEl&&!this.todayButtonEl.disabled){this.todayButtonEl.setFocus()}else if(this.monthPickerVisible){this.focussedMonthEl.setFocus()}else if(this.yearPickerVisible){this.focussedYearEl.setFocus()}else{this.focussedDayEl.focus()}};this.focusFocussedDay=()=>{this.focussedDayEl.focus()};this.monthButtonClickHandler=()=>{this.yearPickerVisible=false;this.focusDay=false;this.monthPickerVisible=!this.monthPickerVisible;if(this.monthPickerVisible){this.setAriaLiveRegionText("Month picker view open")}else{this.setMonthSelectedLiveRegionText()}};this.yearButtonClickHandler=()=>{this.monthPickerVisible=false;this.focusDay=false;this.yearPickerVisible=!this.yearPickerVisible;if(this.yearPickerVisible){this.setAriaLiveRegionText(`Year picker view open. ${this.getDecadeInViewText()}`)}else{this.setYearSelectedLiveRegionText()}};this.todayButtonClickHandler=()=>{this.yearPickerVisible=false;this.monthPickerVisible=false;this.setFocussedDate(new Date);this.setAriaLiveRegionText(this.getMonthInViewText());setTimeout((()=>this.focusFocussedDay()),C)};this.todayButtonKeyDownHandler=t=>{var e;if(t.key==="Tab"&&!t.shiftKey&&((e=this.clearButtonEl)===null||e===void 0?void 0:e.disabled)){this.focusFirstElement();t.preventDefault()}};this.clearButtonClickHandler=()=>{this.setSelectedDate(null);let t="Selected date cleared.";if(!this.monthPickerVisible&&!this.yearPickerVisible){t+=` ${this.getMonthInViewText()}`}if(this.monthPickerVisible){this.focussedMonthEl.setFocus()}else if(this.yearPickerVisible){this.focussedYearEl.setFocus()}else{this.focusFocussedDay()}this.setAriaLiveRegionText(t)};this.setMonthSelectedLiveRegionText=()=>{this.setAriaLiveRegionText(`${this.monthNames[this.monthInView]} selected. ${this.getMonthInViewText()}`)};this.setYearSelectedLiveRegionText=()=>{this.setAriaLiveRegionText(`${this.yearInView} selected. ${this.getMonthInViewText()}`)};this.getMonthInViewText=()=>`${this.monthNames[this.monthInView]} ${this.yearInView} currently in view.`;this.getDecadeInViewText=()=>`${this.decadeStart} to ${this.decadeEnd} currently in view.`;this.setAriaLiveRegionText=t=>{this.liveRegionEl&&(this.liveRegionEl.innerText=t)};this.clearDialogDescription=()=>{this.dialogDescription=""};this.clearButtonKeyDownHandler=t=>{if(t.key==="Tab"&&!t.shiftKey){this.focusFirstElement();t.preventDefault()}};this.goToPreviousMonth=(t=false)=>{this.focusDay=t;this.moveMonths(-1)};this.goToNextMonth=(t=false)=>{this.focusDay=t;this.moveMonths(1)};this.goToPreviousYear=(t=false)=>{if(this.isPrevYearAllowed()){this.focusDay=t;this.moveYears(-1)}};this.goToNextYear=(t=false)=>{if(this.isNextYearAllowed()){this.focusDay=t;this.moveYears(1)}};this.navButtonMouseDownHandler=t=>{t.preventDefault()};this.renderMonthYearNavButton=(e,i,s)=>{const a=this.size;return t("div",{"aria-hidden":"true"},t("ic-button",{id:e,disableTooltip:true,disabled:s,onClick:this.monthYearNavClickHandler,class:{flip:i},variant:"icon-tertiary",innerHTML:v,size:a,tabIndex:-1,"aria-hidden":"true",onMouseDown:this.navButtonMouseDownHandler}))};this.monthYearNavClickHandler=t=>{const e=t.target;switch(e.id){case"previous-month-button":this.goToPreviousMonth(this.dayButtonFocussed);break;case"next-month-button":this.goToNextMonth(this.dayButtonFocussed);break;case"previous-year-button":this.goToPreviousYear(this.dayButtonFocussed);break;case"next-year-button":this.goToNextYear(this.dayButtonFocussed);break}};this.previousMonthButton=()=>{let t=false;if(this.focussedDate!==null&&this.minDate!==null){const e=this.focussedDate.getFullYear()===this.minDate.getFullYear();if(e){t=this.monthInView-1<this.minDate.getMonth()}}return this.renderMonthYearNavButton("previous-month-button",true,t)};this.nextMonthButton=()=>{let t=false;if(this.focussedDate!==null&&this.maxDate!==null){const e=this.focussedDate.getFullYear()===this.maxDate.getFullYear();if(e){t=this.monthInView+1>this.maxDate.getMonth()}}return this.renderMonthYearNavButton("next-month-button",false,t)};this.previousYearButton=()=>this.renderMonthYearNavButton("previous-year-button",true,!this.isPrevYearAllowed());this.nextYearButton=()=>this.renderMonthYearNavButton("next-year-button",false,!this.isNextYearAllowed());this.isPrevYearAllowed=()=>this.isYearAllowed(this.yearInView-1);this.isNextYearAllowed=()=>this.isYearAllowed(this.yearInView+1);this.isYearAllowed=t=>o(t,this.minDate,this.maxDate);this.getMonthView=t=>{const e=d(r(t),this.startOfWeek);const i=l(e);const s=[];let a=e;while(!c(a,i)){s.push(a);a=new Date(a);a.setDate(a.getDate()+1)}s.push(a);return s};this.isCurrentMonth=()=>{const t=new Date;return t.getFullYear()===this.yearInView&&t.getMonth()===this.monthInView};this.updateMonthInView=()=>{if(this.focussedDate){this.currMonthView=this.getMonthView(this.focussedDate);this.focussedDay=this.focussedDate.getDate();this.monthInView=this.focussedDate.getMonth();this.yearInView=this.focussedDate.getFullYear();if(this.dayPickerKeyboardNav){this.monthInViewUpdateHandled=true;this.setAriaLiveRegionText(this.getMonthInViewText());this.dayPickerKeyboardNav=false}}};this.handleSelectDay=t=>{var e;this.setSelectedDate(t);this.calendarOpen=false;(e=this.inputEl)===null||e===void 0?void 0:e.setCalendarFocus()};this.handleSelectMonth=t=>{this.moveMonths(t-this.monthInView);setTimeout((()=>{this.monthButtonEl.setFocus();this.monthPickerVisible=false;this.setMonthSelectedLiveRegionText()}),C)};this.handleSelectYear=t=>{const e=this.decadeView.indexOf(t);if(e>0&&e<this.decadeView.length-1){this.moveYears(t-this.yearInView);this.focusDay=false;const e=this.monthNames[this.monthInView];this.setAriaLiveRegionText(`${t} selected. ${e} ${t} currently in view.`);setTimeout((()=>{this.yearButtonEl.setFocus();this.yearPickerVisible=false}),C)}else{const e=t-this.focussedYear>0?10:-10;this.updateFocussedYear(e,this.yearButtonFocussed);this.setAriaLiveRegionText(this.getDecadeInViewText())}};this.monthPickerKeyDownHandler=t=>{let e=true;switch(t.key){case"ArrowUp":case"ArrowLeft":this.updateFocussedMonth(-1);break;case"ArrowDown":case"ArrowRight":this.updateFocussedMonth(1);break;case"Home":this.updateFocussedMonth(-this.focussedMonth);break;case"End":this.updateFocussedMonth(11-this.focussedMonth);break;case"Tab":e=this.calendarTabHandler(t);break;case"Escape":t.stopImmediatePropagation();this.monthPickerVisible=false;setTimeout((()=>this.focusFocussedDay()),C);break;default:e=false}if(e){t.preventDefault()}};this.yearPickerKeyDownHandler=t=>{let e=true;switch(t.key){case"ArrowUp":case"ArrowLeft":this.updateFocussedYear(-1);break;case"ArrowDown":case"ArrowRight":this.updateFocussedYear(1);break;case"Home":if(this.focussedYear>this.decadeStart){this.updateFocussedYear(this.decadeStart-this.focussedYear)}break;case"End":if(this.focussedYear<this.decadeEnd){this.updateFocussedYear(this.decadeEnd-this.focussedYear)}break;case"PageUp":this.updateFocussedYear(-10);break;case"PageDown":this.updateFocussedYear(10);break;case"Tab":e=this.calendarTabHandler(t);break;case"Escape":t.stopImmediatePropagation();this.yearPickerVisible=false;setTimeout((()=>this.focusFocussedDay()),C);break;default:e=false}if(e){t.preventDefault()}};this.onYearButtonFocusHandler=()=>{this.yearButtonFocussed=true};this.onYearButtonBlurHandler=()=>{this.yearButtonFocussed=false};this.monthButtonKeyDownHandler=t=>{let e=false;switch(t.key){case"ArrowLeft":case"ArrowUp":e=true;this.goToPreviousMonth();break;case"ArrowRight":case"ArrowDown":e=true;this.goToNextMonth();break;case"Home":e=true;this.focusDay=false;this.moveMonths(-this.monthInView);break;case"End":e=true;this.focusDay=false;this.moveMonths(11-this.monthInView);break;case"Tab":if(t.shiftKey){e=true;this.focusLastElement()}break;case"Escape":if(this.monthPickerVisible){this.monthPickerVisible=false;t.stopImmediatePropagation()}break}if(e){t.preventDefault()}};this.yearButtonKeyDownHandler=t=>{let e=false;switch(t.key){case"ArrowLeft":case"ArrowUp":e=true;this.goToPreviousYear();break;case"ArrowRight":case"ArrowDown":e=true;this.goToNextYear();break;case"Home":if(this.yearPickerVisible&&this.yearInView>this.decadeStart){e=true;this.moveYears(this.decadeStart-this.yearInView)}break;case"End":if(this.yearPickerVisible&&this.yearInView<this.decadeEnd){e=true;this.moveYears(this.decadeEnd-this.focussedYear)}break;case"PageUp":e=true;this.focusDay=false;this.moveYears(-10);break;case"PageDown":e=true;this.focusDay=false;this.moveYears(10);break;case"Escape":if(this.yearPickerVisible){this.yearPickerVisible=false;t.stopImmediatePropagation()}break}if(e){t.preventDefault()}};this.handleCalendarKeyDown=t=>{let e=true;switch(t.key){case"ArrowDown":this.dayPickerKeyboardNav=true;this.moveDays(7);break;case"ArrowUp":this.dayPickerKeyboardNav=true;this.moveDays(-7);break;case"ArrowLeft":this.dayPickerKeyboardNav=true;if(this.focussedDate)this.moveDays(-1*this.getNextDayToFocus(this.focussedDate,false));break;case"ArrowRight":this.dayPickerKeyboardNav=true;if(this.focussedDate)this.moveDays(this.getNextDayToFocus(this.focussedDate,true));break;case"PageUp":this.dayPickerKeyboardNav=true;t.shiftKey?this.moveYears(-1):this.moveMonths(-1);break;case"PageDown":this.dayPickerKeyboardNav=true;t.shiftKey?this.moveYears(1):this.moveMonths(1);break;case"Home":this.dayPickerKeyboardNav=true;this.setFocussedDate(new Date(this.focussedYear,this.focussedMonth,1));break;case"End":this.dayPickerKeyboardNav=true;this.setFocussedDate(new Date(this.focussedYear,this.focussedMonth+1,0));break;case"Tab":e=this.calendarTabHandler(t);break;default:e=false;break}if(e){t.preventDefault()}};this.calendarTabHandler=t=>{var e;let i=false;if(!t.shiftKey&&(!this.showPickerTodayButton||this.isCurrentMonth())&&(!this.showPickerClearButton||((e=this.clearButtonEl)===null||e===void 0?void 0:e.disabled))){this.focusFirstElement();i=true}else if(t.shiftKey){this.yearButtonEl.setFocus();i=true}return i};this.onDayButtonFocusHandler=()=>{this.dayButtonFocussed=true};this.onDayButtonBlurHandler=()=>{this.dayButtonFocussed=false};this.getNextDayToFocus=(t,e,i=1)=>{var s;const a=e?1:-1;const n=new Date(t);n.setDate(n.getDate()+a);return((s=this.disableDays)===null||s===void 0?void 0:s.includes(Number(n.getDay())))?this.getNextDayToFocus(n,e,i+1):i};this.moveDays=t=>{if(this.focussedDate){const e=new Date(this.focussedDate);e.setDate(e.getDate()+t);this.setFocussedDate(e)}};this.moveMonths=t=>{if(this.focussedDate){const e=this.focussedDate.getMonth()+t;const i=new Date(new Date(r(this.focussedDate)).setMonth(e));const s=h(i);const a=new Date(new Date(this.focussedDate).setMonth(e));this.setFocussedDate(u(a,i,s));if(this.monthPickerVisible===false&&this.yearPickerVisible===false&&this.monthInViewUpdateHandled===false){this.setAriaLiveRegionText(this.getMonthInViewText())}this.monthInViewUpdateHandled=false}};this.moveYears=t=>{if(this.focussedDate){const e=this.focussedDate.getFullYear()+t;const i=new Date(new Date(r(this.focussedDate)).setFullYear(e));const s=h(i);const a=new Date(new Date(this.focussedDate).setFullYear(e));this.setFocussedDate(u(a,i,s));if(this.monthPickerVisible===false&&this.yearPickerVisible===false&&this.monthInViewUpdateHandled===false){this.setAriaLiveRegionText(this.getMonthInViewText())}this.monthInViewUpdateHandled=false}};this.updateFocussedMonth=t=>{const e=new Date(this.focussedYear,this.focussedMonth,1);e.setMonth(this.focussedMonth+t);const i=u(e,this.minDate,this.maxDate);this.focussedMonth=i.getMonth();setTimeout((()=>this.focussedMonthEl.setFocus()),C)};this.updateFocussedYear=(t,e=true)=>{const i=new Date((new Date).setFullYear(this.focussedYear+t));const s=u(i,this.minDate,this.maxDate);this.setFocussedYear(s.getFullYear(),e)};this.setFocussedDate=t=>{this.focussedDate=u(t,this.minDate,this.maxDate)};this.setFocussedDayEl=t=>{this.focussedDayEl=t};this.setFocussedMonthEl=t=>{this.focussedMonthEl=t};this.setFocussedYearEl=t=>{this.focussedYearEl=t};this.setFocussedYear=(t,e=true)=>{const i=this.focussedYear;this.focussedYear=t;if(this.yearPickerVisible){const s=Math.floor(t/10)*10;const a=Math.floor(i/10)*10;if(s!==a){this.setDecadeView(s);this.setAriaLiveRegionText(this.getDecadeInViewText())}if(e){setTimeout((()=>{if(this.focussedYearEl!==null)this.focussedYearEl.setFocus()}),C)}}else{this.setDecadeView(Math.floor(t/10)*10)}};this.setDateInputProps=()=>{const t={hideLabel:this.hideLabel,invalidDateMessage:this.invalidDateMessage,label:this.label,showClearButton:true,showCalendarButton:true,value:this.value,emitDatePartChange:this.emitDatePartChange};if(this.dateFormat!==P){t.dateFormat=this.dateFormat}if(this.disableFuture){t.disableFuture=this.disableFuture;if(this.disableFutureMessage!==V){t.disableFutureMessage=this.disableFutureMessage}}if(this.disablePast){t.disablePast=this.disablePast;if(this.disablePastMessage!==L){t.disablePastMessage=this.disablePastMessage}}if(this.disableDays&&this.disableDays.length>0){t.disableDays=this.disableDays;if(this.disableDaysMessage!==T){t.disableDaysMessage=this.disableDaysMessage}}if(this.max!==null&&this.max!==""&&this.maxDate){t.max=this.maxDate}if(this.min!==null&&this.min!==""&&this.minDate){t.min=this.minDate}if(this.helperText!==undefined){t.helperText=this.helperText}if(this.hideHelperText!==false){t.hideHelperText=this.hideHelperText}if(this.inputId!==undefined){t.inputId=this.inputId}if(this.name!==undefined){t.name=this.name}if(this.disabled){t.disabled=this.disabled}if(this.required){t.required=this.required}if(this.showClearButton!==null){t.showClearButton=this.showClearButton}if(this.size!=="medium"){t.size=this.size}if(this.validationStatus!==""){t.validationStatus=this.validationStatus}if(this.validationText!==""){t.validationText=this.validationText}return t}}watchDisabledHandler(){w(this.disabled,this.el)}watchDisableFutureHandler(){this.watchMaxHandler()}watchDisablePastHandler(){this.watchMinHandler()}watchMaxHandler(){if(this.disableFuture){this.maxDate=new Date}else{this.maxDate=f(this.max,this.dateFormat)}}watchMinHandler(){if(this.disablePast){this.minDate=new Date}else{this.minDate=f(this.min,this.dateFormat)}}watchStartOfWeekHandler(){this.orderedDaysOfWeek=this.daysOfWeek.slice(this.startOfWeek).concat(this.daysOfWeek.slice(0,this.startOfWeek));if(this.calendarOpen){this.updateMonthInView()}}watchOpenHandler(){if(this.calendarOpen){if(this.inputEl){let t=Y;if(this.size==="small"){t=I}else if(this.size==="large"){t=$}if(this.el.offsetTop+this.inputEl.offsetHeight+t>window.innerHeight&&this.el.offsetTop>t){this.showPickerAbove=true}else{this.showPickerAbove=false}}if(this.selectedDate===null||!n(this.selectedDate,this.minDate,this.maxDate)){let t=new Date;if(this.openAtDate!==""){t=f(this.openAtDate,this.dateFormat)}this.setFocussedDate(t)}else{this.setFocussedDate(this.selectedDate)}let t=this.getMonthInViewText();if(this.selectedDate===null){t+=" No date selected."}t+=" Use arrow keys to change day. Press enter or space to select a date or press escape to close the picker";this.dialogDescription=t;setTimeout((()=>this.focusFocussedDay()),C);document.addEventListener("click",this.handleDocumentClick)}else{document.removeEventListener("click",this.handleDocumentClick);this.monthPickerVisible=false;this.yearPickerVisible=false}}watchFocussedDateHandler(t,e){if(e===null||!(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())){this.updateMonthInView()}}watchMonthInViewHandler(){this.focussedMonth=this.monthInView}watchYearInViewHandler(){this.setFocussedYear(this.yearInView,false)}watchYearPickerVisibleHandler(){if(!this.yearPickerVisible){this.setFocussedYear(this.yearInView)}}watchMonthPickerVisibleHandler(){if(!this.monthPickerVisible){this.focussedMonth=this.monthInView}}watchFocussedDayEl(){if(this.focusDay){setTimeout((()=>this.focusFocussedDay()),C)}this.focusDay=true}componentWillLoad(){g([{prop:this.label,propName:"label"}],"Date Picker");this.monthNames=b(m);this.daysOfWeek=b(k);this.watchStartOfWeekHandler();this.watchMaxHandler();this.watchMinHandler();w(this.disabled,this.el)}componentWillRender(){this.dateInputProps=this.setDateInputProps()}componentWillUpdate(){this.dateInputProps=this.setDateInputProps()}localCalendarButtonClickHandler(t){this.myCalendarButtonClicked=true;if(!this.calendarOpen){this.setSelectedDate(t.detail.value,false)}this.calendarOpen=!this.calendarOpen}calendarButtonClickHandler(){if(!this.myCalendarButtonClicked){this.calendarOpen=false}this.myCalendarButtonClicked=false}render(){const{calendarOpen:e,dateInputProps:i,monthNames:a,size:h,focussedMonth:r,focussedYear:o,monthInView:d,yearInView:l,monthPickerVisible:u,yearPickerVisible:f,orderedDaysOfWeek:b,decadeView:p,minDate:m,maxDate:y,showPickerClearButton:w,showPickerTodayButton:g,dialogDescription:k,theme:v}=this;let H="";if(u){H=`Use the arrow keys to change the selected month. To return to day picker view, press Enter or Space to select a month, or press Escape.`}else{H=`Press Enter or Space to open month picker view or use the arrow keys to change month.`}let M="";if(f){M=`Use the arrow keys to change the selected year. To return to day picker view, press Enter or Space to select a year, or press Escape.`}else{M=`Press Enter or Space to open year picker view or use the arrow keys to change the selected year.`}const P="choose date";const V=a&&a[d]?a[d]:"Open month picker";const L=this.yearInView?this.yearInView:"Open year picker";let T=m;if(m&&this.disablePast){const t=new Date(m);t.setDate(m.getDate()-1);T=t}return t(s,{key:"9f01e93a809b4c0dd0a702b7716617643140601e",onKeyDown:this.keyDownHandler,class:{[`ic-date-picker-${h}`]:true,[`ic-theme-${v}`]:v!=="inherit"}},t("div",{key:"8c4e6a6b965562994667acf2e2f12e79cfb7f026",class:"date-input-container"},t("ic-date-input",Object.assign({key:"8baa5a1ba1f5042554dcc53f26945a872e6d62ca",ref:t=>this.inputEl=t},i),t("slot",{key:"ee77883989839f1e375e82e19a4e68dad539606f",name:"helper-text",slot:"helper-text"}))),e&&t("div",{key:"b6885a1077a70c25cf107be2e97e21bfb3065005"},t("span",{key:"e06f399f1b71353f595532fe4d75679c9a30585c",id:"dialog-description",class:"sr-only"},k),t("div",{key:"3b9e98f7360131d40e34072162f5b1b3a62df79b",role:"dialog","aria-modal":"true","aria-label":P,"aria-describedBy":"dialog-description",class:{"calendar-container":true,above:this.showPickerAbove},onMouseDown:this.handleCalendarMouseDown,onClick:this.handleCalendarClick},t("span",{key:"8b9d2af7ec25c7f4390b6367ba61d1cc4edc6862",ref:t=>this.liveRegionEl=t,id:"live-region","aria-live":"assertive",class:"sr-only"}),t("div",{key:"8de6382adeab06868cc3679812c9dc7003a0dc38",class:{"month-year-nav-container":true}},t("div",{key:"595f1d3b587316a0a8a9401759802794379bb01a",class:"month-year-nav"},this.previousMonthButton(),t("span",{key:"db4136ca3865227558dce4bf7d53ff9ed745be56",id:"select-month-hint","aria-hidden":"true"},H),t("ic-button",{key:"58856c4d545e0c925ff484f0268bb15c2359cb43",ref:t=>this.monthButtonEl=t,size:h,class:"month-picker-button","aria-haspopup":"menu","aria-expanded":u?"true":"false","full-width":"true",variant:"tertiary","aria-label":V,"aria-describedby":"select-month-hint",onKeyDown:this.monthButtonKeyDownHandler,onClick:this.monthButtonClickHandler},a[d]),this.nextMonthButton()),t("div",{key:"d43213b8bf2c1850d3b2edc7abac54b9a601e862",class:"month-year-nav"},this.previousYearButton(),t("span",{key:"ba3bd8c4eed337839606019aff6f7a03c5c35b3a",id:"select-year-hint","aria-hidden":"true"},M),t("ic-button",{key:"15c6ec0144f58dc3c76360f7ccfa28000c36af77",ref:t=>this.yearButtonEl=t,size:h,class:"year-picker-button","aria-haspopup":"menu","aria-expanded":f?"true":"false","full-width":"true",variant:"tertiary","aria-label":L,"aria-describedby":"select-year-hint",onKeyDown:this.yearButtonKeyDownHandler,onClick:this.yearButtonClickHandler},this.yearInView),this.nextYearButton())),!(u||f)&&t("div",{key:"913a72924b2cc1db4b398a1faecfa2cf1bf4be42",class:{calendar:true,hidden:u||f},onKeyDown:this.handleCalendarKeyDown},t("div",{key:"5f9784f58378b05de6e52a2763acab163ab6e3e5",class:"weekdays","aria-hidden":"true"},b.map((e=>{const i=h==="small"?e.charAt(0):e;return t("div",{class:"calendar-day-header"},t("ic-typography",{variant:"caption"},i))}))),t("div",{key:"1c1cfe77f48e7b50e6a014db13a597b924baab06",class:"calendar-days-container"},this.currMonthView.map((e=>{var i;return t(x,{day:e,disableDay:(i=this.disableDays)===null||i===void 0?void 0:i.includes(Number(e.getDay())),today:c(e,this.today),selected:c(e,this.selectedDate),focussed:c(e,this.focussedDate),inRange:n(e,T,y),monthInView:d,onSelectDay:this.handleSelectDay,focussedDayRef:this.setFocussedDayEl,onFocusDay:this.onDayButtonFocusHandler,onBlurDay:this.onDayButtonBlurHandler,showDaysOutsideMonth:this.showDaysOutsideMonth})})))),t("div",{key:"8b064369e1271b56085a85e0c00822ff7232d6e8",class:{"month-picker-container":true,hidden:!u}},u&&t(D,{key:"cdd9f6ccb301355eb31a1607413396f44b828ca9",size:h,onSelectMonth:this.handleSelectMonth,monthInView:d,focussedMonth:r,onKeyDown:this.monthPickerKeyDownHandler,focussedMonthRef:this.setFocussedMonthEl,minDate:m,maxDate:y,yearInView:l})),t("div",{key:"a629d2297686220a678d2ba7870fcc386b735c84",class:{"year-picker-container":true,hidden:!f}},f&&t(z,{key:"113dfbbb61d28495a6aa0ec0c2d2aa6be1c3e881",decadeView:p,size:h,focussedYear:o,onSelectYear:this.handleSelectYear,onKeyDown:this.yearPickerKeyDownHandler,onFocusYear:this.onYearButtonFocusHandler,onBlurYear:this.onYearButtonBlurHandler,yearInView:l,minDate:m,maxDate:y,focussedYearRef:this.setFocussedYearEl})),t("div",{key:"5a3a56a0fe0af5771e88a5d6573b5b4e2e491d4f",class:{"bottom-buttons":true,"no-today":!g}},g&&t("ic-button",{key:"67e78d82526a164797c8dfa3c60b4eff27f77193",id:"today-button",variant:"tertiary",ref:t=>this.todayButtonEl=t,size:h,"aria-label":"Navigate to current date",onClick:this.todayButtonClickHandler,onKeyDown:this.todayButtonKeyDownHandler,disabled:this.isCurrentMonth()},"Go to today"),w&&t("ic-button",{key:"cd6f21520ba94b85cc078b4478ff3dffaac2bb15",id:"clear-button","aria-label":"clear selected date",ref:t=>this.clearButtonEl=t,variant:"tertiary",size:h,onClick:this.clearButtonClickHandler,onKeyDown:this.clearButtonKeyDownHandler,disabled:this.value===""||this.value===null||this.value===undefined},"Clear")))))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],disableFuture:["watchDisableFutureHandler"],disablePast:["watchDisablePastHandler"],max:["watchMaxHandler"],min:["watchMinHandler"],startOfWeek:["watchStartOfWeekHandler"],calendarOpen:["watchOpenHandler"],focussedDate:["watchFocussedDateHandler"],monthInView:["watchMonthInViewHandler"],yearInView:["watchYearInViewHandler"],yearPickerVisible:["watchYearPickerVisibleHandler"],monthPickerVisible:["watchMonthPickerVisibleHandler"],focussedDayEl:["watchFocussedDayEl"]}}};A.style=M;export{A as ic_date_picker};
|
|
2
|
-
//# sourceMappingURL=p-816aae93.entry.js.map
|