@govtechsg/sgds-web-component 3.20.0-rc.0 → 3.20.0-rc.2

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.
Files changed (38) hide show
  1. package/components/Datepicker/datepicker.js +1 -1
  2. package/components/Datepicker/index.umd.min.js +18 -17
  3. package/components/Datepicker/index.umd.min.js.map +1 -1
  4. package/components/Datepicker/sgds-datepicker.d.ts +15 -1
  5. package/components/Datepicker/sgds-datepicker.js +50 -19
  6. package/components/Datepicker/sgds-datepicker.js.map +1 -1
  7. package/components/Stepper/index.umd.min.js +5 -5
  8. package/components/Stepper/index.umd.min.js.map +1 -1
  9. package/components/Stepper/sgds-step.d.ts +7 -9
  10. package/components/Stepper/sgds-step.js +15 -20
  11. package/components/Stepper/sgds-step.js.map +1 -1
  12. package/components/Stepper/sgds-stepper.js +2 -2
  13. package/components/Stepper/sgds-stepper.js.map +1 -1
  14. package/components/index.umd.min.js +22 -21
  15. package/components/index.umd.min.js.map +1 -1
  16. package/custom-elements.json +180 -1
  17. package/index.umd.min.js +93 -92
  18. package/index.umd.min.js.map +1 -1
  19. package/package.json +1 -1
  20. package/react/components/Datepicker/datepicker.cjs.js +1 -1
  21. package/react/components/Datepicker/datepicker.js +1 -1
  22. package/react/components/Datepicker/sgds-datepicker.cjs.js +50 -19
  23. package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
  24. package/react/components/Datepicker/sgds-datepicker.js +50 -19
  25. package/react/components/Datepicker/sgds-datepicker.js.map +1 -1
  26. package/react/components/Stepper/sgds-step.cjs.js +15 -20
  27. package/react/components/Stepper/sgds-step.cjs.js.map +1 -1
  28. package/react/components/Stepper/sgds-step.js +15 -20
  29. package/react/components/Stepper/sgds-step.js.map +1 -1
  30. package/react/components/Stepper/sgds-stepper.cjs.js +2 -2
  31. package/react/components/Stepper/sgds-stepper.cjs.js.map +1 -1
  32. package/react/components/Stepper/sgds-stepper.js +2 -2
  33. package/react/components/Stepper/sgds-stepper.js.map +1 -1
  34. package/react/datepicker/index.cjs.js +2 -0
  35. package/react/datepicker/index.cjs.js.map +1 -1
  36. package/react/datepicker/index.js +2 -0
  37. package/react/datepicker/index.js.map +1 -1
  38. package/types/react.d.ts +14 -0
@@ -12,6 +12,8 @@ declare const SgdsDatepicker_base: (new (...args: any[]) => import("../../utils/
12
12
  * @summary The `DatePicker` Component is built using `Dropdown`, `Input` and `Button` components. By default, the Calendar points to today's date and input has no value. Users can either pick dates from the calendar or type dates through the input
13
13
  *
14
14
  * @event sgds-change-date - Emitted when the state of datepicker's input changes during first load, close button reset click & date click. Date values can be accessed via event.target.value
15
+ * @event sgds-invalid - Emitted when the combo box's invalid state is set to true.
16
+ * @event sgds-valid - Emitted when the combo box's invalid state is set to false.
15
17
  *
16
18
  * @description displayDate sets the month, year views of the calendar while focusedDate follows the focus which also directly changes
17
19
  * displayDate on certain occasions. Example, when keyboard moves up to the next month, it updates displayDate which then affect the current
@@ -34,6 +36,8 @@ export declare class SgdsDatepicker extends SgdsDatepicker_base implements SgdsF
34
36
  name: string;
35
37
  /** When true, adds disabled attribute to input and button element */
36
38
  disabled: boolean;
39
+ /** Disables native and sgds validation for the datepicker. */
40
+ noValidate: boolean;
37
41
  /** Sets the initial value of the datepicker. Replaces deprecated `initialValue`.
38
42
  * Pass in dates in this format `dd/mm/yyyy` for single mode and `dd/mm/yyyy - dd/mm/yyyy` for range mode
39
43
  * For example, `value="22/12/2023"` for single mode or `value="22/12/2023 - 25/12/2023"` for range mode
@@ -69,7 +73,7 @@ export declare class SgdsDatepicker extends SgdsDatepicker_base implements SgdsF
69
73
  displayDate: Date;
70
74
  /**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
71
75
  defaultValue: string;
72
- /**@internal */
76
+ /** Marks the component as invalid. Replace the pseudo :invalid selector. */
73
77
  invalid: boolean;
74
78
  private view;
75
79
  private selectedDateRange;
@@ -89,6 +93,16 @@ export declare class SgdsDatepicker extends SgdsDatepicker_base implements SgdsF
89
93
  * Checks for validity without any native error popup message
90
94
  */
91
95
  checkValidity(): boolean;
96
+ /**
97
+ * Programmatically sets the invalid state of the datepicker.
98
+ * Use together with `noValidate` (or `novalidate` on the parent `<form>`) and `invalidFeedback`
99
+ * to integrate 3rd-party or custom validation logic.
100
+ */
101
+ setInvalid(bool: boolean): void;
102
+ /**
103
+ * Checks for validity without any native error popup message
104
+ */
105
+ setValidity(flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
92
106
  /**
93
107
  * Returns the ValidityState object
94
108
  */
@@ -23,6 +23,8 @@ import { defaultValue } from '../../utils/defaultvalue.js';
23
23
  * @summary The `DatePicker` Component is built using `Dropdown`, `Input` and `Button` components. By default, the Calendar points to today's date and input has no value. Users can either pick dates from the calendar or type dates through the input
24
24
  *
25
25
  * @event sgds-change-date - Emitted when the state of datepicker's input changes during first load, close button reset click & date click. Date values can be accessed via event.target.value
26
+ * @event sgds-invalid - Emitted when the combo box's invalid state is set to true.
27
+ * @event sgds-valid - Emitted when the combo box's invalid state is set to false.
26
28
  *
27
29
  * @description displayDate sets the month, year views of the calendar while focusedDate follows the focus which also directly changes
28
30
  * displayDate on certain occasions. Example, when keyboard moves up to the next month, it updates displayDate which then affect the current
@@ -35,6 +37,8 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
35
37
  this.required = false;
36
38
  /** When true, adds disabled attribute to input and button element */
37
39
  this.disabled = false;
40
+ /** Disables native and sgds validation for the datepicker. */
41
+ this.noValidate = false;
38
42
  /** Sets the initial value of the datepicker. Replaces deprecated `initialValue`.
39
43
  * Pass in dates in this format `dd/mm/yyyy` for single mode and `dd/mm/yyyy - dd/mm/yyyy` for range mode
40
44
  * For example, `value="22/12/2023"` for single mode or `value="22/12/2023 - 25/12/2023"` for range mode
@@ -66,7 +70,7 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
66
70
  this.drop = "down";
67
71
  /**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
68
72
  this.defaultValue = "";
69
- /**@internal */
73
+ /** Marks the component as invalid. Replace the pseudo :invalid selector. */
70
74
  this.invalid = false;
71
75
  this.view = "days";
72
76
  this.selectedDateRange = [];
@@ -120,6 +124,23 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
120
124
  checkValidity() {
121
125
  return this._mixinCheckValidity();
122
126
  }
127
+ /**
128
+ * Programmatically sets the invalid state of the datepicker.
129
+ * Use together with `noValidate` (or `novalidate` on the parent `<form>`) and `invalidFeedback`
130
+ * to integrate 3rd-party or custom validation logic.
131
+ */
132
+ setInvalid(bool) {
133
+ this.invalid = bool;
134
+ if (this.datepickerInput) {
135
+ this.datepickerInput.setInvalid(bool);
136
+ }
137
+ }
138
+ /**
139
+ * Checks for validity without any native error popup message
140
+ */
141
+ setValidity(flags, message, anchor) {
142
+ return this._mixinSetValidity(flags, message, anchor);
143
+ }
123
144
  /**
124
145
  * Returns the ValidityState object
125
146
  */
@@ -164,6 +185,8 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
164
185
  else {
165
186
  this.displayDate = this.initialDisplayDate;
166
187
  }
188
+ const input = await this.datepickerInputAsync;
189
+ input.setInvalid(this.invalid);
167
190
  }
168
191
  async firstUpdated(changedProperties) {
169
192
  super.firstUpdated(changedProperties);
@@ -269,6 +292,8 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
269
292
  async _handleInvalidInput() {
270
293
  this.selectedDateRange = [];
271
294
  this.displayDate = this.initialDisplayDate;
295
+ if (this._mixinShouldSkipSgdsValidation())
296
+ return;
272
297
  this.invalid = true;
273
298
  this._manageInternalsBadInput();
274
299
  }
@@ -284,7 +309,7 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
284
309
  this.value = resetValue;
285
310
  this.view = "days";
286
311
  const input = await this.datepickerInputAsync;
287
- input.setInvalid(false);
312
+ input.setInvalid(this.invalid);
288
313
  input.destroyInputMask();
289
314
  await input.applyInputMask();
290
315
  this._mixinResetValidity(input);
@@ -314,6 +339,8 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
314
339
  * 3. sets the form value of datepicker
315
340
  */
316
341
  _manageInternalsValid() {
342
+ if (this._mixinShouldSkipSgdsValidation())
343
+ return;
317
344
  this._mixinSetValidity({});
318
345
  this.invalid = this.datepickerInput.invalid = false;
319
346
  this._mixinSetFormValue();
@@ -351,26 +378,27 @@ class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) {
351
378
  hasFeedback=${ifDefined(this.hasFeedback ? "both" : undefined)}
352
379
  ?readonly=${this.readonly}
353
380
  >
354
- </sgds-datepicker-input>
355
- <sgds-icon-button
356
- ${ref(this.myDropdown)}
357
- tone="neutral"
358
- class=${classMap({
381
+ <sgds-icon-button
382
+ slot="calendar-btn"
383
+ ${ref(this.myDropdown)}
384
+ tone="neutral"
385
+ class=${classMap({
359
386
  "calendar-btn": true,
360
387
  "with-hint-text": this.hintText || this.invalid,
361
388
  "with-label": this.label
362
389
  })}
363
- aria-expanded="${this.menuIsOpen}"
364
- aria-haspopup="dialog"
365
- aria-controls=${this.dropdownMenuId}
366
- @click=${() => this.toggleMenu()}
367
- ariaLabel=${this.menuIsOpen ? "Close Calendar" : "Open Calendar"}
368
- ?disabled=${this.disabled || this.readonly}
369
- ?active=${this.menuIsOpen}
370
- variant="outline"
371
- name="calendar"
372
- >
373
- </sgds-icon-button>
390
+ aria-expanded="${this.menuIsOpen}"
391
+ aria-haspopup="dialog"
392
+ aria-controls=${this.dropdownMenuId}
393
+ @click=${() => this.toggleMenu()}
394
+ ariaLabel=${this.menuIsOpen ? "Close Calendar" : "Open Calendar"}
395
+ ?disabled=${this.disabled || this.readonly}
396
+ ?active=${this.menuIsOpen}
397
+ variant="outline"
398
+ name="calendar"
399
+ >
400
+ </sgds-icon-button>
401
+ </sgds-datepicker-input>
374
402
  <ul
375
403
  id=${this.dropdownMenuId}
376
404
  class="sgds datepicker dropdown-menu"
@@ -419,6 +447,9 @@ __decorate([
419
447
  __decorate([
420
448
  property({ type: Boolean, reflect: true })
421
449
  ], SgdsDatepicker.prototype, "disabled", void 0);
450
+ __decorate([
451
+ property({ type: Boolean, reflect: true })
452
+ ], SgdsDatepicker.prototype, "noValidate", void 0);
422
453
  __decorate([
423
454
  property({ type: String, reflect: true })
424
455
  ], SgdsDatepicker.prototype, "value", void 0);
@@ -459,7 +490,7 @@ __decorate([
459
490
  defaultValue()
460
491
  ], SgdsDatepicker.prototype, "defaultValue", void 0);
461
492
  __decorate([
462
- state()
493
+ property({ type: Boolean, reflect: true })
463
494
  ], SgdsDatepicker.prototype, "invalid", void 0);
464
495
  __decorate([
465
496
  state()
@@ -1 +1 @@
1
- {"version":3,"file":"sgds-datepicker.js","sources":["../../../src/components/Datepicker/sgds-datepicker.ts"],"sourcesContent":["import { format, parse } from \"date-fns\";\nimport { html, PropertyValueMap } from \"lit\";\nimport { property, query, queryAsync, state } from \"lit/decorators.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { ref } from \"lit/directives/ref.js\";\nimport { DropdownElement } from \"../../base/dropdown-element\";\nimport { type SgdsFormControl } from \"../../utils/formSubmitController\";\nimport { DATE_PATTERNS, setTimeToNoon } from \"../../utils/time\";\nimport { watch } from \"../../utils/watch\";\nimport { SgdsButton } from \"../Button/sgds-button\";\nimport dropdownMenuStyle from \"../Dropdown/dropdown-menu.css\";\nimport { DatepickerCalendar } from \"./datepicker-calendar\";\nimport { DatepickerHeader } from \"./datepicker-header\";\nimport DatepickerInput from \"./datepicker-input\";\nimport datepickerStyle from \"./datepicker.css\";\nimport { ViewEnum } from \"./types\";\nimport SgdsIconButton from \"../IconButton/sgds-icon-button\";\nimport { SgdsFormValidatorMixin } from \"../../utils/validatorMixin\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { defaultValue } from \"../../utils/defaultvalue\";\n\nexport type DateFormat = \"MM/DD/YYYY\" | \"DD/MM/YYYY\" | \"YYYY/MM/DD\";\n\n/**\n * @summary The `DatePicker` Component is built using `Dropdown`, `Input` and `Button` components. By default, the Calendar points to today's date and input has no value. Users can either pick dates from the calendar or type dates through the input\n *\n * @event sgds-change-date - Emitted when the state of datepicker's input changes during first load, close button reset click & date click. Date values can be accessed via event.target.value\n *\n * @description displayDate sets the month, year views of the calendar while focusedDate follows the focus which also directly changes\n * displayDate on certain occasions. Example, when keyboard moves up to the next month, it updates displayDate which then affect the current\n * date view of the calendar\n */\nexport class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) implements SgdsFormControl {\n static styles = [...DropdownElement.styles, dropdownMenuStyle, datepickerStyle];\n /**@internal */\n static dependencies = {\n \"sgds-datepicker-input\": DatepickerInput,\n \"sgds-datepicker-calendar\": DatepickerCalendar,\n \"sgds-datepicker-header\": DatepickerHeader,\n \"sgds-button\": SgdsButton,\n \"sgds-icon-button\": SgdsIconButton\n };\n\n constructor() {\n super();\n this.floatingOpts = {\n placement: \"bottom-end\"\n };\n }\n\n /** When true, adds required attribute to input element */\n @property({ type: Boolean, reflect: true }) required = false;\n /**The datepicker input's name attribute */\n @property({ reflect: true }) name: string;\n /** When true, adds disabled attribute to input and button element */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Sets the initial value of the datepicker. Replaces deprecated `initialValue`.\n * Pass in dates in this format `dd/mm/yyyy` for single mode and `dd/mm/yyyy - dd/mm/yyyy` for range mode\n * For example, `value=\"22/12/2023\"` for single mode or `value=\"22/12/2023 - 25/12/2023\"` for range mode\n */\n @property({ type: String, reflect: true }) value = \"\";\n\n /**\n * Deprecated since v3.3.0 in favour of `value`.\n * The initial value of DatePicker on first load for single &\n * range mode as array of string. eg.'[\"22/12/2023\"]' for single &\n * '[\"22/12/2023\",\"25/12/2023\"]' for range respectively @deprecated\n * */\n @property({ type: Array, reflect: true }) initialValue: string[] = [];\n\n private dateFormat = \"DD/MM/YYYY\";\n\n /** ISO date string to set the lowest allowable date value. e.g. \"2016-05-19T12:00:00.000Z\" */\n @property({ type: String }) minDate = \"\";\n\n /** ISO date string to set the highest allowable date value. e.g. \"2016-05-19T12:00:00.000Z\" */\n @property({ type: String }) maxDate = \"\";\n\n /** Changes DatePicker to single date selection or range date selection */\n @property({ type: String, reflect: true }) mode: \"single\" | \"range\" = \"single\";\n\n /**Feedback text for error state when date input is invalid */\n @property({ type: String, reflect: true }) invalidFeedback: string;\n\n /** Allows invalidFeedback and invalid styles to be visible with the input */\n @property({ type: Boolean, reflect: true }) hasFeedback = false;\n\n /** The datepicker input's label */\n @property({ reflect: true }) label = \"\";\n\n /** The datepicker input's hint text below the label */\n @property({ reflect: true }) hintText = \"\";\n\n /** Controls auto-flipping of menu */\n @property({ type: Boolean, reflect: true, state: false })\n noFlip = false;\n\n /** The drop position of menu relative to the toggle button */\n @property({ type: String, reflect: true, state: false })\n drop: \"up\" | \"down\" = \"down\";\n\n /** Provides the date context for Calendar to present the appropriate view. Defaults to today's date */\n @property({ attribute: false }) displayDate: Date;\n\n /**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */\n @defaultValue()\n defaultValue = \"\";\n\n /**@internal */\n @state() invalid = false;\n\n @state()\n private view: ViewEnum = \"days\";\n\n @state() private selectedDateRange: Date[] = [];\n\n @state() private focusedDate: Date;\n\n @state() private focusedTabIndex = 3;\n\n private isValueEmpty() {\n return this.value === \"\" || this.value === \"DD/MM/YYYY\" || this.value === \"DD/MM/YYYY - DD/MM/YYYY\";\n }\n\n private initialDisplayDate: Date = new Date();\n\n @queryAsync(\"sgds-datepicker-calendar\")\n private calendar: Promise<DatepickerCalendar>;\n\n @queryAsync(\"sgds-datepicker-input\")\n private datepickerInputAsync: Promise<DatepickerInput>;\n\n @query(\"sgds-datepicker-input\")\n private datepickerInput: DatepickerInput;\n /**\n * Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state\n * Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput\n */\n public reportValidity(): boolean {\n return this._mixinReportValidity();\n }\n /**\n * Checks for validity without any native error popup message\n */\n public checkValidity(): boolean {\n return this._mixinCheckValidity();\n }\n\n /**\n * Returns the ValidityState object\n */\n public get validity(): ValidityState {\n return this._mixinGetValidity();\n }\n /**\n * Returns the validation message based on the ValidityState\n */\n public get validationMessage() {\n return this._mixinGetValidationMessage();\n }\n\n async connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"sgds-view\", this._handleViewChanged);\n this.addEventListener(\"sgds-change-calendar\", this._handleDateChanged);\n this.addEventListener(\"sgds-update-focus\", this._handleFocusDateChanged);\n this.addEventListener(\"sgds-selectmonth\", this._handleSelectMonth);\n this.addEventListener(\"sgds-selectyear\", this._handleSelectYear);\n this.addEventListener(\"sgds-selectdates\", this._handleSelectDatesAndClose);\n this.addEventListener(\"sgds-selectdates-input\", this._handleSelectDatesInput);\n this.addEventListener(\"sgds-empty-input\", this._handleEmptyInput);\n this.addEventListener(\"keydown\", this._handleTab);\n this.addEventListener(\"sgds-hide\", this._handleCloseMenu);\n this.addEventListener(\"sgds-show\", this._handleOpenMenu);\n this.addEventListener(\"blur\", this._mixinCheckValidity);\n\n this.initialValue = this.value ? this.value.split(\" - \").map(v => v.trim()) : this.initialValue;\n this.initialDisplayDate = this.displayDate || new Date();\n if (this.initialValue && this.initialValue.length > 0) {\n // Validate initialValue against the dateFormat regex\n const dateFormatRegex = new RegExp(this._getDateFormatRegex());\n // const startDateString = this.initialValue[0];\n const invalidDates = this.initialValue.filter(v => !dateFormatRegex.test(v));\n if (invalidDates.length > 0) {\n return console.error(\"Invalid date format in initialValue:\", invalidDates);\n } else {\n const initialSelectedDates = this.initialValue.map(v =>\n setTimeToNoon(parse(v, DATE_PATTERNS[this.dateFormat].fnsPattern, new Date()))\n );\n this._handleSelectDates(initialSelectedDates);\n }\n } else {\n this.displayDate = this.initialDisplayDate;\n }\n }\n\n async firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n if (this.menuIsOpen) {\n const input = await this.datepickerInputAsync;\n await this.updateFloatingPosition();\n const cal = await this.calendar;\n cal.focusOnCalendar(input);\n }\n }\n\n /** @internal */\n private _getDateFormatRegex(): string {\n // validate date strings and adhere to the specified date format\n return (\n this.dateFormat\n // Replace any special characters with their escaped version using \"\\\\$&\"\n .replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n // Replace 'MM' with '\\\\d{2}', which matches two digits representing the month (e.g., 01, 12)\n .replace(\"MM\", \"\\\\d{2}\")\n // Replace 'DD' with '\\\\d{2}', which matches two digits representing the day (e.g., 01, 31)\n .replace(\"DD\", \"\\\\d{2}\")\n // Replace 'YYYY' with '\\\\d{4}', which matches four digits representing the year (e.g., 2021)\n .replace(\"YYYY\", \"\\\\d{4}\")\n // Replace '/' with '\\\\/', which matches the forward slash character\n .replace(\"/\", \"\\\\/\")\n );\n }\n private _handleTab(event: KeyboardEvent) {\n if (!this.menuIsOpen) {\n return;\n }\n const tabIndexArray = Array(4);\n if (event.shiftKey && event.key === \"Tab\") {\n event.preventDefault();\n this.focusedTabIndex = (this.focusedTabIndex - 1 + tabIndexArray.length) % tabIndexArray.length;\n } else if (event.key === \"Tab\") {\n event.preventDefault();\n this.focusedTabIndex = (this.focusedTabIndex + 1 + tabIndexArray.length) % tabIndexArray.length;\n }\n }\n\n @watch(\"value\", { waitUntilFirstUpdate: true })\n _handleValueChange() {\n this.emit(\"sgds-change-date\");\n }\n\n private async _handleCloseMenu() {\n //return focus to input when menu closes\n const input = await this.datepickerInputAsync;\n input.focus();\n\n if (this.selectedDateRange.length === 0) {\n this.displayDate = this.initialDisplayDate;\n } else {\n const selectedDatesLength = this.selectedDateRange.length;\n this.displayDate = this.selectedDateRange[selectedDatesLength - 1];\n const calendar = await this.calendar;\n calendar._updateFocusedDate();\n }\n }\n private async _handleOpenMenu() {\n const cal = await this.calendar;\n const input = await this.datepickerInputAsync;\n cal.focusOnCalendar(input);\n }\n\n private _makeInputValueString = (startDate: Date, endDate: Date, dateFormat: string) => {\n if (!startDate && !endDate) return this.value;\n const formatDate = (date: Date) => format(date, DATE_PATTERNS[dateFormat].fnsPattern);\n switch (this.mode) {\n case \"single\": {\n if (startDate) {\n this.value = formatDate(startDate);\n }\n break;\n }\n case \"range\": {\n if (startDate && endDate) {\n this.value = `${formatDate(startDate)} - ${formatDate(endDate)}`;\n }\n if (startDate && !endDate) {\n this.value = `${formatDate(startDate)} - ${this.dateFormat}`;\n }\n break;\n }\n }\n return this.value;\n };\n private _handleSelectDatesInput(event: CustomEvent<Date[]>) {\n this._handleSelectDates(event.detail);\n }\n private async _handleSelectDates(newSelectedDates: Date[]) {\n newSelectedDates.sort((a: Date, b: Date) => a.getTime() - b.getTime());\n this.displayDate = newSelectedDates[0];\n this.focusedDate = newSelectedDates[0];\n this.selectedDateRange = newSelectedDates;\n // Get the formattedDate value for the selected dates\n const formattedDate = this._makeInputValueString(\n this.selectedDateRange[0],\n this.selectedDateRange[1],\n this.dateFormat\n );\n\n // Set formattedDate value as the new value for sgds-input\n this.value = formattedDate;\n const input = await this.datepickerInputAsync;\n input.updateMaskValue();\n this._manageInternalsValid();\n }\n\n private async _handleSelectDatesAndClose(event: CustomEvent<Date[]>) {\n await this._handleSelectDates(event.detail);\n\n if (this.mode === \"range\" && this.selectedDateRange.length === 2) {\n this.hideMenu();\n } else if (this.mode === \"single\" && this.selectedDateRange.length === 1) {\n this.hideMenu();\n }\n }\n\n /** update latest view state from datepicker-header */\n private _handleViewChanged(event: CustomEvent<string>) {\n this.view = event.detail as ViewEnum;\n }\n\n private _handleDateChanged(event: CustomEvent<Date>) {\n this.displayDate = event.detail;\n }\n private _handleFocusDateChanged(event: CustomEvent<Date>) {\n this.focusedDate = event.detail;\n }\n\n private _handleSelectMonth(event: CustomEvent<Date>) {\n this.displayDate = event.detail;\n }\n\n private _handleSelectYear(event: CustomEvent<Date>) {\n this.displayDate = event.detail;\n }\n private async _handleInvalidInput() {\n this.selectedDateRange = [];\n this.displayDate = this.initialDisplayDate;\n this.invalid = true;\n this._manageInternalsBadInput();\n }\n private async _handleEmptyInput() {\n if (this.required) {\n this._manageEmptyInput();\n }\n return;\n }\n private async _resetDatepicker(resetValue = \"\") {\n this.displayDate = this.initialDisplayDate;\n this.selectedDateRange = [];\n this.value = resetValue;\n this.view = \"days\";\n const input = await this.datepickerInputAsync;\n input.setInvalid(false);\n input.destroyInputMask();\n await input.applyInputMask();\n\n this._mixinResetValidity(input);\n if (this.isValueEmpty()) {\n this._handleEmptyInput();\n }\n }\n\n private _manageInternalsBadInput() {\n this._mixinSetValidity(\n {\n badInput: true\n },\n \"Invalid date input\",\n this.datepickerInput\n );\n }\n /**\n * Even though element internals handles the required constraint validation. This custom one is still needed as\n * datepicker input has a special case where the default input mask \"DD/MM/YYYY\" means an empty input.\n * However, the required constraint validation sees \"DD/MM/YYYY\" as a non-empty input.\n */\n private _manageEmptyInput() {\n this._mixinSetValidity(\n {\n valueMissing: true\n },\n \"Please fill in this field\",\n this.datepickerInput\n );\n }\n\n /**\n * Called when a valid date is entered via input or selected by calendar\n * 1. sets validity state to valid\n * 2. updates invalid prop\n * 3. sets the form value of datepicker\n */\n private _manageInternalsValid() {\n this._mixinSetValidity({});\n this.invalid = this.datepickerInput.invalid = false;\n this._mixinSetFormValue();\n }\n\n /**\n * Handles the form \"reset\" event\n */\n private async _mixinResetFormControl() {\n this._resetDatepicker(this.defaultValue);\n }\n private async _handleInputMaskChange(e: CustomEvent) {\n this.value = e.detail;\n\n if (this.isValueEmpty()) {\n this._resetDatepicker();\n }\n }\n\n private _dialogAriaLabels = {\n days: \"Choose date\",\n months: \"Choose month\",\n years: \"Choose year\"\n };\n\n render() {\n return html`\n <div class=\"datepicker-container m-width-160\">\n <sgds-datepicker-input\n .value=${live(this.value)}\n ?required=${this.required}\n ?disabled=${this.disabled}\n placeholder=${this.mode === \"single\" ? \"DD/MM/YYYY\" : \"DD/MM/YYYY - DD/MM/YYYY\"}\n mode=${this.mode}\n invalidFeedback=${ifDefined(this.invalidFeedback ? this.invalidFeedback : this._mixinGetValidationMessage())}\n @sgds-mask-input-change=${this._handleInputMaskChange}\n @sgds-invalid-input=${this._handleInvalidInput}\n minDate=${this.minDate}\n maxDate=${this.maxDate}\n label=${this.label}\n hintText=${this.hintText}\n name=${this.name}\n ?invalid=${this.invalid}\n hasFeedback=${ifDefined(this.hasFeedback ? \"both\" : undefined)}\n ?readonly=${this.readonly}\n >\n </sgds-datepicker-input>\n <sgds-icon-button\n ${ref(this.myDropdown)}\n tone=\"neutral\"\n class=${classMap({\n \"calendar-btn\": true,\n \"with-hint-text\": this.hintText || this.invalid,\n \"with-label\": this.label\n })}\n aria-expanded=\"${this.menuIsOpen}\"\n aria-haspopup=\"dialog\"\n aria-controls=${this.dropdownMenuId}\n @click=${() => this.toggleMenu()}\n ariaLabel=${this.menuIsOpen ? \"Close Calendar\" : \"Open Calendar\"}\n ?disabled=${this.disabled || this.readonly}\n ?active=${this.menuIsOpen}\n variant=\"outline\"\n name=\"calendar\"\n >\n </sgds-icon-button>\n <ul\n id=${this.dropdownMenuId}\n class=\"sgds datepicker dropdown-menu\"\n role=\"dialog\"\n aria-label=${this._dialogAriaLabels[this.view]}\n @click=${(event: MouseEvent) => event.stopPropagation()}\n ${ref(this.menuRef)}\n >\n <sgds-datepicker-header\n .view=${this.view}\n .displayDate=${this.displayDate}\n .focusedDate=${this.focusedDate}\n .selectedDate=${this.selectedDateRange}\n .focusedTabIndex=${this.focusedTabIndex}\n ></sgds-datepicker-header>\n <sgds-datepicker-calendar\n .show=${this.menuIsOpen}\n .view=${this.view}\n .displayDate=${this.displayDate}\n .mode=${this.mode}\n minDate=${this.minDate}\n maxDate=${this.maxDate}\n .selectedDate=${this.selectedDateRange}\n .focusedTabIndex=${this.focusedTabIndex}\n ></sgds-datepicker-calendar>\n </ul>\n </div>\n `;\n }\n}\n\nexport default SgdsDatepicker;\n"],"names":["dropdownMenuStyle","dat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ds-datepicker.ts"],"sourcesContent":["import { format, parse } from \"date-fns\";\nimport { html, PropertyValueMap } from \"lit\";\nimport { property, query, queryAsync, state } from \"lit/decorators.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { ref } from \"lit/directives/ref.js\";\nimport { DropdownElement } from \"../../base/dropdown-element\";\nimport { type SgdsFormControl } from \"../../utils/formSubmitController\";\nimport { DATE_PATTERNS, setTimeToNoon } from \"../../utils/time\";\nimport { watch } from \"../../utils/watch\";\nimport { SgdsButton } from \"../Button/sgds-button\";\nimport dropdownMenuStyle from \"../Dropdown/dropdown-menu.css\";\nimport { DatepickerCalendar } from \"./datepicker-calendar\";\nimport { DatepickerHeader } from \"./datepicker-header\";\nimport DatepickerInput from \"./datepicker-input\";\nimport datepickerStyle from \"./datepicker.css\";\nimport { ViewEnum } from \"./types\";\nimport SgdsIconButton from \"../IconButton/sgds-icon-button\";\nimport { SgdsFormValidatorMixin } from \"../../utils/validatorMixin\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { defaultValue } from \"../../utils/defaultvalue\";\n\nexport type DateFormat = \"MM/DD/YYYY\" | \"DD/MM/YYYY\" | \"YYYY/MM/DD\";\n\n/**\n * @summary The `DatePicker` Component is built using `Dropdown`, `Input` and `Button` components. By default, the Calendar points to today's date and input has no value. Users can either pick dates from the calendar or type dates through the input\n *\n * @event sgds-change-date - Emitted when the state of datepicker's input changes during first load, close button reset click & date click. Date values can be accessed via event.target.value\n * @event sgds-invalid - Emitted when the combo box's invalid state is set to true.\n * @event sgds-valid - Emitted when the combo box's invalid state is set to false.\n *\n * @description displayDate sets the month, year views of the calendar while focusedDate follows the focus which also directly changes\n * displayDate on certain occasions. Example, when keyboard moves up to the next month, it updates displayDate which then affect the current\n * date view of the calendar\n */\nexport class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) implements SgdsFormControl {\n static styles = [...DropdownElement.styles, dropdownMenuStyle, datepickerStyle];\n /**@internal */\n static dependencies = {\n \"sgds-datepicker-input\": DatepickerInput,\n \"sgds-datepicker-calendar\": DatepickerCalendar,\n \"sgds-datepicker-header\": DatepickerHeader,\n \"sgds-button\": SgdsButton,\n \"sgds-icon-button\": SgdsIconButton\n };\n\n constructor() {\n super();\n this.floatingOpts = {\n placement: \"bottom-end\"\n };\n }\n\n /** When true, adds required attribute to input element */\n @property({ type: Boolean, reflect: true }) required = false;\n /**The datepicker input's name attribute */\n @property({ reflect: true }) name: string;\n /** When true, adds disabled attribute to input and button element */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Disables native and sgds validation for the datepicker. */\n @property({ type: Boolean, reflect: true }) noValidate = false;\n\n /** Sets the initial value of the datepicker. Replaces deprecated `initialValue`.\n * Pass in dates in this format `dd/mm/yyyy` for single mode and `dd/mm/yyyy - dd/mm/yyyy` for range mode\n * For example, `value=\"22/12/2023\"` for single mode or `value=\"22/12/2023 - 25/12/2023\"` for range mode\n */\n @property({ type: String, reflect: true }) value = \"\";\n\n /**\n * Deprecated since v3.3.0 in favour of `value`.\n * The initial value of DatePicker on first load for single &\n * range mode as array of string. eg.'[\"22/12/2023\"]' for single &\n * '[\"22/12/2023\",\"25/12/2023\"]' for range respectively @deprecated\n * */\n @property({ type: Array, reflect: true }) initialValue: string[] = [];\n\n private dateFormat = \"DD/MM/YYYY\";\n\n /** ISO date string to set the lowest allowable date value. e.g. \"2016-05-19T12:00:00.000Z\" */\n @property({ type: String }) minDate = \"\";\n\n /** ISO date string to set the highest allowable date value. e.g. \"2016-05-19T12:00:00.000Z\" */\n @property({ type: String }) maxDate = \"\";\n\n /** Changes DatePicker to single date selection or range date selection */\n @property({ type: String, reflect: true }) mode: \"single\" | \"range\" = \"single\";\n\n /**Feedback text for error state when date input is invalid */\n @property({ type: String, reflect: true }) invalidFeedback: string;\n\n /** Allows invalidFeedback and invalid styles to be visible with the input */\n @property({ type: Boolean, reflect: true }) hasFeedback = false;\n\n /** The datepicker input's label */\n @property({ reflect: true }) label = \"\";\n\n /** The datepicker input's hint text below the label */\n @property({ reflect: true }) hintText = \"\";\n\n /** Controls auto-flipping of menu */\n @property({ type: Boolean, reflect: true, state: false })\n noFlip = false;\n\n /** The drop position of menu relative to the toggle button */\n @property({ type: String, reflect: true, state: false })\n drop: \"up\" | \"down\" = \"down\";\n\n /** Provides the date context for Calendar to present the appropriate view. Defaults to today's date */\n @property({ attribute: false }) displayDate: Date;\n\n /**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */\n @defaultValue()\n defaultValue = \"\";\n\n /** Marks the component as invalid. Replace the pseudo :invalid selector. */\n @property({ type: Boolean, reflect: true }) invalid = false;\n\n @state()\n private view: ViewEnum = \"days\";\n\n @state() private selectedDateRange: Date[] = [];\n\n @state() private focusedDate: Date;\n\n @state() private focusedTabIndex = 3;\n\n private isValueEmpty() {\n return this.value === \"\" || this.value === \"DD/MM/YYYY\" || this.value === \"DD/MM/YYYY - DD/MM/YYYY\";\n }\n\n private initialDisplayDate: Date = new Date();\n\n @queryAsync(\"sgds-datepicker-calendar\")\n private calendar: Promise<DatepickerCalendar>;\n\n @queryAsync(\"sgds-datepicker-input\")\n private datepickerInputAsync: Promise<DatepickerInput>;\n\n @query(\"sgds-datepicker-input\")\n private datepickerInput: DatepickerInput;\n /**\n * Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state\n * Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput\n */\n public reportValidity(): boolean {\n return this._mixinReportValidity();\n }\n /**\n * Checks for validity without any native error popup message\n */\n public checkValidity(): boolean {\n return this._mixinCheckValidity();\n }\n\n /**\n * Programmatically sets the invalid state of the datepicker.\n * Use together with `noValidate` (or `novalidate` on the parent `<form>`) and `invalidFeedback`\n * to integrate 3rd-party or custom validation logic.\n */\n public setInvalid(bool: boolean) {\n this.invalid = bool;\n if (this.datepickerInput) {\n this.datepickerInput.setInvalid(bool);\n }\n }\n\n /**\n * Checks for validity without any native error popup message\n */\n public setValidity(flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement): void {\n return this._mixinSetValidity(flags, message, anchor);\n }\n\n /**\n * Returns the ValidityState object\n */\n public get validity(): ValidityState {\n return this._mixinGetValidity();\n }\n /**\n * Returns the validation message based on the ValidityState\n */\n public get validationMessage() {\n return this._mixinGetValidationMessage();\n }\n\n async connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"sgds-view\", this._handleViewChanged);\n this.addEventListener(\"sgds-change-calendar\", this._handleDateChanged);\n this.addEventListener(\"sgds-update-focus\", this._handleFocusDateChanged);\n this.addEventListener(\"sgds-selectmonth\", this._handleSelectMonth);\n this.addEventListener(\"sgds-selectyear\", this._handleSelectYear);\n this.addEventListener(\"sgds-selectdates\", this._handleSelectDatesAndClose);\n this.addEventListener(\"sgds-selectdates-input\", this._handleSelectDatesInput);\n this.addEventListener(\"sgds-empty-input\", this._handleEmptyInput);\n this.addEventListener(\"keydown\", this._handleTab);\n this.addEventListener(\"sgds-hide\", this._handleCloseMenu);\n this.addEventListener(\"sgds-show\", this._handleOpenMenu);\n this.addEventListener(\"blur\", this._mixinCheckValidity);\n\n this.initialValue = this.value ? this.value.split(\" - \").map(v => v.trim()) : this.initialValue;\n this.initialDisplayDate = this.displayDate || new Date();\n if (this.initialValue && this.initialValue.length > 0) {\n // Validate initialValue against the dateFormat regex\n const dateFormatRegex = new RegExp(this._getDateFormatRegex());\n // const startDateString = this.initialValue[0];\n const invalidDates = this.initialValue.filter(v => !dateFormatRegex.test(v));\n if (invalidDates.length > 0) {\n return console.error(\"Invalid date format in initialValue:\", invalidDates);\n } else {\n const initialSelectedDates = this.initialValue.map(v =>\n setTimeToNoon(parse(v, DATE_PATTERNS[this.dateFormat].fnsPattern, new Date()))\n );\n this._handleSelectDates(initialSelectedDates);\n }\n } else {\n this.displayDate = this.initialDisplayDate;\n }\n\n const input = await this.datepickerInputAsync;\n input.setInvalid(this.invalid);\n }\n\n async firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n if (this.menuIsOpen) {\n const input = await this.datepickerInputAsync;\n await this.updateFloatingPosition();\n const cal = await this.calendar;\n cal.focusOnCalendar(input);\n }\n }\n\n /** @internal */\n private _getDateFormatRegex(): string {\n // validate date strings and adhere to the specified date format\n return (\n this.dateFormat\n // Replace any special characters with their escaped version using \"\\\\$&\"\n .replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n // Replace 'MM' with '\\\\d{2}', which matches two digits representing the month (e.g., 01, 12)\n .replace(\"MM\", \"\\\\d{2}\")\n // Replace 'DD' with '\\\\d{2}', which matches two digits representing the day (e.g., 01, 31)\n .replace(\"DD\", \"\\\\d{2}\")\n // Replace 'YYYY' with '\\\\d{4}', which matches four digits representing the year (e.g., 2021)\n .replace(\"YYYY\", \"\\\\d{4}\")\n // Replace '/' with '\\\\/', which matches the forward slash character\n .replace(\"/\", \"\\\\/\")\n );\n }\n private _handleTab(event: KeyboardEvent) {\n if (!this.menuIsOpen) {\n return;\n }\n const tabIndexArray = Array(4);\n if (event.shiftKey && event.key === \"Tab\") {\n event.preventDefault();\n this.focusedTabIndex = (this.focusedTabIndex - 1 + tabIndexArray.length) % tabIndexArray.length;\n } else if (event.key === \"Tab\") {\n event.preventDefault();\n this.focusedTabIndex = (this.focusedTabIndex + 1 + tabIndexArray.length) % tabIndexArray.length;\n }\n }\n\n @watch(\"value\", { waitUntilFirstUpdate: true })\n _handleValueChange() {\n this.emit(\"sgds-change-date\");\n }\n\n private async _handleCloseMenu() {\n //return focus to input when menu closes\n const input = await this.datepickerInputAsync;\n input.focus();\n\n if (this.selectedDateRange.length === 0) {\n this.displayDate = this.initialDisplayDate;\n } else {\n const selectedDatesLength = this.selectedDateRange.length;\n this.displayDate = this.selectedDateRange[selectedDatesLength - 1];\n const calendar = await this.calendar;\n calendar._updateFocusedDate();\n }\n }\n private async _handleOpenMenu() {\n const cal = await this.calendar;\n const input = await this.datepickerInputAsync;\n cal.focusOnCalendar(input);\n }\n\n private _makeInputValueString = (startDate: Date, endDate: Date, dateFormat: string) => {\n if (!startDate && !endDate) return this.value;\n const formatDate = (date: Date) => format(date, DATE_PATTERNS[dateFormat].fnsPattern);\n switch (this.mode) {\n case \"single\": {\n if (startDate) {\n this.value = formatDate(startDate);\n }\n break;\n }\n case \"range\": {\n if (startDate && endDate) {\n this.value = `${formatDate(startDate)} - ${formatDate(endDate)}`;\n }\n if (startDate && !endDate) {\n this.value = `${formatDate(startDate)} - ${this.dateFormat}`;\n }\n break;\n }\n }\n return this.value;\n };\n private _handleSelectDatesInput(event: CustomEvent<Date[]>) {\n this._handleSelectDates(event.detail);\n }\n private async _handleSelectDates(newSelectedDates: Date[]) {\n newSelectedDates.sort((a: Date, b: Date) => a.getTime() - b.getTime());\n this.displayDate = newSelectedDates[0];\n this.focusedDate = newSelectedDates[0];\n this.selectedDateRange = newSelectedDates;\n // Get the formattedDate value for the selected dates\n const formattedDate = this._makeInputValueString(\n this.selectedDateRange[0],\n this.selectedDateRange[1],\n this.dateFormat\n );\n\n // Set formattedDate value as the new value for sgds-input\n this.value = formattedDate;\n const input = await this.datepickerInputAsync;\n input.updateMaskValue();\n this._manageInternalsValid();\n }\n\n private async _handleSelectDatesAndClose(event: CustomEvent<Date[]>) {\n await this._handleSelectDates(event.detail);\n\n if (this.mode === \"range\" && this.selectedDateRange.length === 2) {\n this.hideMenu();\n } else if (this.mode === \"single\" && this.selectedDateRange.length === 1) {\n this.hideMenu();\n }\n }\n\n /** update latest view state from datepicker-header */\n private _handleViewChanged(event: CustomEvent<string>) {\n this.view = event.detail as ViewEnum;\n }\n\n private _handleDateChanged(event: CustomEvent<Date>) {\n this.displayDate = event.detail;\n }\n private _handleFocusDateChanged(event: CustomEvent<Date>) {\n this.focusedDate = event.detail;\n }\n\n private _handleSelectMonth(event: CustomEvent<Date>) {\n this.displayDate = event.detail;\n }\n\n private _handleSelectYear(event: CustomEvent<Date>) {\n this.displayDate = event.detail;\n }\n private async _handleInvalidInput() {\n this.selectedDateRange = [];\n this.displayDate = this.initialDisplayDate;\n if (this._mixinShouldSkipSgdsValidation()) return;\n\n this.invalid = true;\n this._manageInternalsBadInput();\n }\n private async _handleEmptyInput() {\n if (this.required) {\n this._manageEmptyInput();\n }\n return;\n }\n private async _resetDatepicker(resetValue = \"\") {\n this.displayDate = this.initialDisplayDate;\n this.selectedDateRange = [];\n this.value = resetValue;\n this.view = \"days\";\n const input = await this.datepickerInputAsync;\n input.setInvalid(this.invalid);\n input.destroyInputMask();\n await input.applyInputMask();\n\n this._mixinResetValidity(input);\n if (this.isValueEmpty()) {\n this._handleEmptyInput();\n }\n }\n\n private _manageInternalsBadInput() {\n this._mixinSetValidity(\n {\n badInput: true\n },\n \"Invalid date input\",\n this.datepickerInput\n );\n }\n /**\n * Even though element internals handles the required constraint validation. This custom one is still needed as\n * datepicker input has a special case where the default input mask \"DD/MM/YYYY\" means an empty input.\n * However, the required constraint validation sees \"DD/MM/YYYY\" as a non-empty input.\n */\n private _manageEmptyInput() {\n this._mixinSetValidity(\n {\n valueMissing: true\n },\n \"Please fill in this field\",\n this.datepickerInput\n );\n }\n\n /**\n * Called when a valid date is entered via input or selected by calendar\n * 1. sets validity state to valid\n * 2. updates invalid prop\n * 3. sets the form value of datepicker\n */\n private _manageInternalsValid() {\n if (this._mixinShouldSkipSgdsValidation()) return;\n\n this._mixinSetValidity({});\n\n this.invalid = this.datepickerInput.invalid = false;\n this._mixinSetFormValue();\n }\n\n /**\n * Handles the form \"reset\" event\n */\n private async _mixinResetFormControl() {\n this._resetDatepicker(this.defaultValue);\n }\n private async _handleInputMaskChange(e: CustomEvent) {\n this.value = e.detail;\n\n if (this.isValueEmpty()) {\n this._resetDatepicker();\n }\n }\n\n private _dialogAriaLabels = {\n days: \"Choose date\",\n months: \"Choose month\",\n years: \"Choose year\"\n };\n render() {\n return html`\n <div class=\"datepicker-container m-width-160\">\n <sgds-datepicker-input\n .value=${live(this.value)}\n ?required=${this.required}\n ?disabled=${this.disabled}\n placeholder=${this.mode === \"single\" ? \"DD/MM/YYYY\" : \"DD/MM/YYYY - DD/MM/YYYY\"}\n mode=${this.mode}\n invalidFeedback=${ifDefined(this.invalidFeedback ? this.invalidFeedback : this._mixinGetValidationMessage())}\n @sgds-mask-input-change=${this._handleInputMaskChange}\n @sgds-invalid-input=${this._handleInvalidInput}\n minDate=${this.minDate}\n maxDate=${this.maxDate}\n label=${this.label}\n hintText=${this.hintText}\n name=${this.name}\n ?invalid=${this.invalid}\n hasFeedback=${ifDefined(this.hasFeedback ? \"both\" : undefined)}\n ?readonly=${this.readonly}\n >\n <sgds-icon-button\n slot=\"calendar-btn\"\n ${ref(this.myDropdown)}\n tone=\"neutral\"\n class=${classMap({\n \"calendar-btn\": true,\n \"with-hint-text\": this.hintText || this.invalid,\n \"with-label\": this.label\n })}\n aria-expanded=\"${this.menuIsOpen}\"\n aria-haspopup=\"dialog\"\n aria-controls=${this.dropdownMenuId}\n @click=${() => this.toggleMenu()}\n ariaLabel=${this.menuIsOpen ? \"Close Calendar\" : \"Open Calendar\"}\n ?disabled=${this.disabled || this.readonly}\n ?active=${this.menuIsOpen}\n variant=\"outline\"\n name=\"calendar\"\n >\n </sgds-icon-button>\n </sgds-datepicker-input>\n <ul\n id=${this.dropdownMenuId}\n class=\"sgds datepicker dropdown-menu\"\n role=\"dialog\"\n aria-label=${this._dialogAriaLabels[this.view]}\n @click=${(event: MouseEvent) => event.stopPropagation()}\n ${ref(this.menuRef)}\n >\n <sgds-datepicker-header\n .view=${this.view}\n .displayDate=${this.displayDate}\n .focusedDate=${this.focusedDate}\n .selectedDate=${this.selectedDateRange}\n .focusedTabIndex=${this.focusedTabIndex}\n ></sgds-datepicker-header>\n <sgds-datepicker-calendar\n .show=${this.menuIsOpen}\n .view=${this.view}\n .displayDate=${this.displayDate}\n .mode=${this.mode}\n minDate=${this.minDate}\n maxDate=${this.maxDate}\n .selectedDate=${this.selectedDateRange}\n .focusedTabIndex=${this.focusedTab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EAAA,KAAA,CAAA,CAAA,CAAA;AAEf,UAAA,CAAA;AAAhB,IAAA,KAAK,EAAE;AAAwC,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAE/B,UAAA,CAAA;AAAhB,IAAA,KAAK,EAAE;AAA2B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAElB,UAAA,CAAA;AAAhB,IAAA,KAAK,EAAE;AAA6B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAS7B,UAAA,CAAA;IADP,UAAU,CAAC,0BAA0B,CAAC;AACO,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGtC,UAAA,CAAA;IADP,UAAU,CAAC,uBAAuB,CAAC;AACmB,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,sBAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAG/C,UAAA,CAAA;IADP,KAAK,CAAC,uBAAuB,CAAC;AACU,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AA+HzC,UAAA,CAAA;IADC,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAG9C,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,oBAAA,EAAA,IAAA,CAAA;;;;"}
@@ -2254,7 +2254,7 @@ const Ve=1;class Be{constructor(e){}get _$isConnected(){return this._$parent._$i
2254
2254
  clip-rule="evenodd"
2255
2255
  />
2256
2256
  </svg>
2257
- `};var Ye,Ge=o`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class Qe extends Ae{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=Xe[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||le}}Qe.styles=[...Ae.styles,Ge],e([He({type:String,reflect:!0})],Qe.prototype,"name",void 0),e([He({type:String,reflect:!0})],Qe.prototype,"size",void 0);class et{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{var t;if(e.nodeType===e.TEXT_NODE&&""!==(null===(t=e.textContent)||void 0===t?void 0:t.trim()))return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("sl-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}class tt extends Ae{constructor(){super(...arguments),this.steps=[],this.activeStep=0,this.orientation="horizontal",this.clickable=!1,this.linear=!1,this.defaultActiveStep=0,this._items=[],this._totalSteps=0,this._boundHandleItemClick=this._handleStepClick.bind(this),this.hasDefaultSlot=!1,this.hasSlotController=new et(this,"[default]")}connectedCallback(){super.connectedCallback(),this._totalSteps=this.steps.length,this.addEventListener("i-sgds-click",this._boundHandleItemClick)}_handleSlotChange(){this._items=this._slotNodes,this._totalSteps=this._items.length,this._updateStepItems()}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]"))}_updateStepItems(){this._items&&this._items.length>0&&this._items.forEach((e,t)=>{e.stepIndex=t,e.active=this.activeStep===t,e._isCompleted=e.completed||this.activeStep>t,e.isClickable=this.linear?!e.disabled&&this.clickable&&(this.activeStep-1==t||this.activeStep+1==t):!e.disabled&&this.clickable,e.orientation=this.orientation,this._items.length>1&&(e.isFirstOfType=0===t,e.classList.toggle("last",t===this._items.length-1))})}getComponent(e=this.activeStep){var t,l;const a=this.hasDefaultSlot?this._items:this.steps;return console.log(e,this._items),a&&a.length>0?null===(t=a[e])||void 0===t?void 0:t.component:null===(l=this.steps[e])||void 0===l?void 0:l.component}nextStep(){var e;this.emit("sgds-next-step"),this.activeStep<this._totalSteps-1&&((null===(e=this._slotNodes[this.activeStep+1])||void 0===e?void 0:e.disabled)||this.activeStep++)}previousStep(){var e;this.emit("sgds-previous-step"),this.activeStep>0&&((null===(e=this._slotNodes[this.activeStep-1])||void 0===e?void 0:e.disabled)||this.activeStep--)}lastStep(){this.emit("sgds-last-step"),this.activeStep!==this._totalSteps-1&&(this.activeStep=this._totalSteps-1)}firstStep(){this.emit("sgds-first-step"),this.activeStep>0&&(this.activeStep=0)}reset(){this.emit("sgds-reset"),this.activeStep=this.defaultActiveStep}_onStepperItemClick(e){this.activeStep=e}_handleActiveStepChange(){this._updateStepItems(),this.emit("sgds-arrived")}_handleClickableChange(){this._updateStepItems()}_handleOrientationChange(){this._updateStepItems()}_handleKeyDown(e,t){"Enter"===e.key&&this._onStepperItemClick(t)}_handleStepClick(e){var t;const l=e;e.stopPropagation();const a=null===(t=l.detail)||void 0===t?void 0:t.stepIndex;this._onStepperItemClick(a)}render(){return Q`
2257
+ `};var Ye,Ge=o`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class Qe extends Ae{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=Xe[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||le}}Qe.styles=[...Ae.styles,Ge],e([He({type:String,reflect:!0})],Qe.prototype,"name",void 0),e([He({type:String,reflect:!0})],Qe.prototype,"size",void 0);class et{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{var t;if(e.nodeType===e.TEXT_NODE&&""!==(null===(t=e.textContent)||void 0===t?void 0:t.trim()))return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("sl-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}class tt extends Ae{constructor(){super(...arguments),this.steps=[],this.activeStep=0,this.orientation="horizontal",this.clickable=!1,this.linear=!1,this.defaultActiveStep=0,this._items=[],this._totalSteps=0,this._boundHandleItemClick=this._handleStepClick.bind(this),this.hasDefaultSlot=!1,this.hasSlotController=new et(this,"[default]")}connectedCallback(){super.connectedCallback(),this._totalSteps=this.steps.length,this.addEventListener("i-sgds-click",this._boundHandleItemClick)}_handleSlotChange(){this._items=this._slotNodes,this._totalSteps=this._items.length,this._updateStepItems()}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]"))}_updateStepItems(){this._items&&this._items.length>0&&this._items.forEach((e,t)=>{e.stepIndex=t,e.active=this.activeStep===t,e.completed=e.completed||this.activeStep>t,e.clickable=this.linear?!e.disabled&&this.clickable&&(this.activeStep-1==t||this.activeStep+1==t):!e.disabled&&this.clickable,e.orientation=this.orientation,this._items.length>1&&(e.isFirstOfType=0===t,e.classList.toggle("last",t===this._items.length-1))})}getComponent(e=this.activeStep){var t,l;const a=this.hasDefaultSlot?this._items:this.steps;return console.log(e,this._items),a&&a.length>0?null===(t=a[e])||void 0===t?void 0:t.component:null===(l=this.steps[e])||void 0===l?void 0:l.component}nextStep(){var e;this.emit("sgds-next-step"),this.activeStep<this._totalSteps-1&&((null===(e=this._slotNodes[this.activeStep+1])||void 0===e?void 0:e.disabled)||this.activeStep++)}previousStep(){var e;this.emit("sgds-previous-step"),this.activeStep>0&&((null===(e=this._slotNodes[this.activeStep-1])||void 0===e?void 0:e.disabled)||this.activeStep--)}lastStep(){this.emit("sgds-last-step"),this.activeStep!==this._totalSteps-1&&(this.activeStep=this._totalSteps-1)}firstStep(){this.emit("sgds-first-step"),this.activeStep>0&&(this.activeStep=0)}reset(){this.emit("sgds-reset"),this.activeStep=this.defaultActiveStep}_onStepperItemClick(e){this.activeStep=e}_handleActiveStepChange(){this._updateStepItems(),this.emit("sgds-arrived")}_handleClickableChange(){this._updateStepItems()}_handleOrientationChange(){this._updateStepItems()}_handleKeyDown(e,t){"Enter"===e.key&&this._onStepperItemClick(t)}_handleStepClick(e){var t;const l=e;e.stopPropagation();const a=null===(t=l.detail)||void 0===t?void 0:t.stepIndex;this._onStepperItemClick(a)}render(){return Q`
2258
2258
  <div
2259
2259
  class="stepper ${Se({[`${this.orientation}`]:this.orientation,clickable:this.clickable})}"
2260
2260
  >
@@ -2278,13 +2278,13 @@ const Ve=1;class Be{constructor(e){}get _$isConnected(){return this._$parent._$i
2278
2278
  </div>
2279
2279
  `)}
2280
2280
  </div>
2281
- `}}tt.styles=[...Ae.styles,Pe],tt.dependencies={"sgds-icon":Qe},e([He({type:Array})],tt.prototype,"steps",void 0),e([He({type:Number,reflect:!0})],tt.prototype,"activeStep",void 0),e([He({type:String,reflect:!0})],tt.prototype,"orientation",void 0),e([He({type:Boolean,reflect:!0})],tt.prototype,"clickable",void 0),e([He({type:Boolean,reflect:!0})],tt.prototype,"linear",void 0),e([((e="value")=>(t,l)=>{const a=t.constructor,i=a.prototype.attributeChangedCallback;a.prototype.attributeChangedCallback=function(t,c,o){var r;const s=a.getPropertyOptions(e);if(t===("string"==typeof s.attribute?s.attribute:e).toLowerCase()){const t=s.converter||x,a=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:x.fromAttribute)(o,s.type);this[e]!==a&&(this[l]=a)}i.call(this,t,c,o)}})("activeStep")],tt.prototype,"defaultActiveStep",void 0),e([(e,t)=>{const{slot:l,selector:a}=Ye??{},i="slot"+(l?`[name=${l}]`:":not([name])");return((e,t,l)=>(l.configurable=!0,l.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,l),l))(e,t,{get(){const e=this.renderRoot?.querySelector(i),t=e?.assignedElements(Ye)??[];return void 0===a?t:t.filter(e=>e.matches(a))}})}],tt.prototype,"_slotNodes",void 0),e([He({type:Boolean})],tt.prototype,"hasDefaultSlot",void 0),e([Le("activeStep",{waitUntilFirstUpdate:!0})],tt.prototype,"_handleActiveStepChange",null),e([Le("clickable",{waitUntilFirstUpdate:!0})],tt.prototype,"_handleClickableChange",null),e([Le("orientation",{waitUntilFirstUpdate:!0})],tt.prototype,"_handleOrientationChange",null);var lt=o`:host{display:contents}.stepper-item-container{flex-basis:1em;flex-grow:1;flex-shrink:1;position:relative;width:fit-content}.stepper-item,.stepper-item-container{align-items:center;display:flex;flex-direction:column}.stepper-item{gap:var(--sgds-gap-sm)}.stepper-item.vertical{align-items:flex-start;flex-direction:row;margin-bottom:var(--sgds-padding-xl)}.stepper-item.clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper-item:not(.first):not(.vertical):before{background:var(--sgds-border-color-translucent);content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}:host(:not(.last)) .stepper-item-container .stepper-item.vertical:after{background:var(--sgds-bg-translucent);content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper-item-container .stepper-item.active:not(.first):before,.stepper-item-container .stepper-item.completed:not(.first):before,:host(:not(.last)) .stepper-item-container .stepper-item.completed:after{background:var(--sgds-primary-border-color-default)}.stepper-item.clickable{cursor:pointer}.stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;flex-shrink:0;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper-detail{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs);max-width:var(--sgds-dimension-128);text-align:center}.stepper-item.vertical .stepper-detail{max-width:unset;padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper-item:not(.active):not(.completed) .stepper-label{color:var(--sgds-color-subtle)}.stepper-item.clickable:focus .stepper-marker,.stepper-item.clickable:focus-visible .stepper-marker,.stepper-item.clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper-item.clickable:focus .stepper-label,.stepper-item.clickable:focus-visible .stepper-label,.stepper-item.clickable:hover .stepper-label{color:var(--sgds-primary-color-emphasis)}.stepper-item.clickable .stepper-label{color:var(--sgds-primary-color-default)}.stepper-item.completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.stepper-item.active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper-slot{color:var(--sgds-color-subtle);display:flex;flex-direction:column;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);gap:var(--sgds-gap-xs);letter-spacing:var(--sgds-letter-spacing-normal);line-height:var(--sgds-line-height-2-xs)}.stepper-item.disabled{opacity:var(--sgds-opacity-40)}`;class at extends Ae{constructor(){super(...arguments),this.stepHeader="",this.stepIndex=0,this.active=!1,this.disabled=!1,this.completed=!1,this.isClickable=!1,this.orientation="horizontal",this.isFirstOfType=!1,this._isCompleted=!1}render(){const e=!this.disabled&&this.isClickable;return Q`
2281
+ `}}tt.styles=[...Ae.styles,Pe],tt.dependencies={"sgds-icon":Qe},e([He({type:Array})],tt.prototype,"steps",void 0),e([He({type:Number,reflect:!0})],tt.prototype,"activeStep",void 0),e([He({type:String,reflect:!0})],tt.prototype,"orientation",void 0),e([He({type:Boolean,reflect:!0})],tt.prototype,"clickable",void 0),e([He({type:Boolean,reflect:!0})],tt.prototype,"linear",void 0),e([((e="value")=>(t,l)=>{const a=t.constructor,i=a.prototype.attributeChangedCallback;a.prototype.attributeChangedCallback=function(t,c,o){var r;const s=a.getPropertyOptions(e);if(t===("string"==typeof s.attribute?s.attribute:e).toLowerCase()){const t=s.converter||x,a=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:x.fromAttribute)(o,s.type);this[e]!==a&&(this[l]=a)}i.call(this,t,c,o)}})("activeStep")],tt.prototype,"defaultActiveStep",void 0),e([(e,t)=>{const{slot:l,selector:a}=Ye??{},i="slot"+(l?`[name=${l}]`:":not([name])");return((e,t,l)=>(l.configurable=!0,l.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,l),l))(e,t,{get(){const e=this.renderRoot?.querySelector(i),t=e?.assignedElements(Ye)??[];return void 0===a?t:t.filter(e=>e.matches(a))}})}],tt.prototype,"_slotNodes",void 0),e([He({type:Boolean})],tt.prototype,"hasDefaultSlot",void 0),e([Le("activeStep",{waitUntilFirstUpdate:!0})],tt.prototype,"_handleActiveStepChange",null),e([Le("clickable",{waitUntilFirstUpdate:!0})],tt.prototype,"_handleClickableChange",null),e([Le("orientation",{waitUntilFirstUpdate:!0})],tt.prototype,"_handleOrientationChange",null);var lt=o`:host{display:contents}.stepper-item-container{flex-basis:1em;flex-grow:1;flex-shrink:1;position:relative;width:fit-content}.stepper-item,.stepper-item-container{align-items:center;display:flex;flex-direction:column}.stepper-item{gap:var(--sgds-gap-sm)}.stepper-item.vertical{align-items:flex-start;flex-direction:row;margin-bottom:var(--sgds-padding-xl)}.stepper-item.clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper-item:not(.first):not(.vertical):before{background:var(--sgds-border-color-translucent);content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}:host(:not(.last)) .stepper-item-container .stepper-item.vertical:after{background:var(--sgds-bg-translucent);content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper-item-container .stepper-item.active:not(.first):before,.stepper-item-container .stepper-item.completed:not(.first):before,:host(:not(.last)) .stepper-item-container .stepper-item.completed:after{background:var(--sgds-primary-border-color-default)}.stepper-item.clickable{cursor:pointer}.stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;flex-shrink:0;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper-detail{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs);max-width:var(--sgds-dimension-128);text-align:center}.stepper-item.vertical .stepper-detail{max-width:unset;padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper-item:not(.active):not(.completed) .stepper-label{color:var(--sgds-color-subtle)}.stepper-item.clickable:focus .stepper-marker,.stepper-item.clickable:focus-visible .stepper-marker,.stepper-item.clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper-item.clickable:focus .stepper-label,.stepper-item.clickable:focus-visible .stepper-label,.stepper-item.clickable:hover .stepper-label{color:var(--sgds-primary-color-emphasis)}.stepper-item.clickable .stepper-label{color:var(--sgds-primary-color-default)}.stepper-item.completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.stepper-item.active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper-slot{color:var(--sgds-color-subtle);display:flex;flex-direction:column;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);gap:var(--sgds-gap-xs);letter-spacing:var(--sgds-letter-spacing-normal);line-height:var(--sgds-line-height-2-xs)}.stepper-item.disabled{opacity:var(--sgds-opacity-40)}`;class at extends Ae{constructor(){super(...arguments),this.stepHeader="",this.clickable=!1,this.active=!1,this.disabled=!1,this.completed=!1,this.stepIndex=0,this.orientation="horizontal",this.isFirstOfType=!1}render(){const e=!this.disabled&&this.clickable;return Q`
2282
2282
  <div class="stepper-item-container">
2283
2283
  <div
2284
- class="stepper-item ${Se({first:this.isFirstOfType,active:this.active,completed:this._isCompleted,clickable:this.isClickable,vertical:"vertical"===this.orientation,disabled:this.disabled})}"
2284
+ class="stepper-item ${Se({first:this.isFirstOfType,active:this.active,completed:this.completed,clickable:this.clickable,vertical:"vertical"===this.orientation,disabled:this.disabled})}"
2285
2285
  tabindex=${e?"0":"-1"}
2286
2286
  aria-current=${this.active?"step":"false"}
2287
- aria-disabled=${this.disabled||!this.active&&!this._isCompleted?"true":"false"}
2287
+ aria-disabled=${this.disabled||!this.active&&!this.completed?"true":"false"}
2288
2288
  @click="${e?e=>this._handleClick(e):null}"
2289
2289
  @keydown=${e?e=>this._handleKeyDown(e):null}
2290
2290
  >
@@ -2298,5 +2298,5 @@ const Ve=1;class Be{constructor(e){}get _$isConnected(){return this._$parent._$i
2298
2298
  </div>
2299
2299
  </div>
2300
2300
  </div>
2301
- `}_handleClick(e){if(e){if(e.target.hasAttribute("data-clickable"))return}this.emit("i-sgds-click",{detail:{stepIndex:this.stepIndex}})}_handleKeyDown(e){"Enter"===e.key&&this._handleClick()}}function it(e,t){customElements.get(e)||customElements.define(e,t)}at.styles=[...Ae.styles,lt],at.dependencies={"sgds-icon":Qe},e([He({type:String,reflect:!0})],at.prototype,"stepHeader",void 0),e([He({type:String,reflect:!0})],at.prototype,"iconName",void 0),e([He({type:Object})],at.prototype,"component",void 0),e([He({type:Number})],at.prototype,"stepIndex",void 0),e([He({type:Boolean,reflect:!0})],at.prototype,"active",void 0),e([He({type:Boolean,reflect:!0})],at.prototype,"disabled",void 0),e([He({type:Boolean,reflect:!0})],at.prototype,"completed",void 0),e([He({type:Boolean})],at.prototype,"isClickable",void 0),e([He({type:String})],at.prototype,"orientation",void 0),e([He({type:Boolean})],at.prototype,"isFirstOfType",void 0),e([He({type:Boolean})],at.prototype,"_isCompleted",void 0),it("sgds-stepper",tt),it("sgds-step",at)});
2301
+ `}_handleClick(e){if(e){if(e.target.hasAttribute("data-clickable"))return}this.emit("i-sgds-click",{detail:{stepIndex:this.stepIndex}})}_handleKeyDown(e){"Enter"===e.key&&this._handleClick()}}function it(e,t){customElements.get(e)||customElements.define(e,t)}at.styles=[...Ae.styles,lt],at.dependencies={"sgds-icon":Qe},e([He({type:String,reflect:!0})],at.prototype,"stepHeader",void 0),e([He({type:String,reflect:!0})],at.prototype,"iconName",void 0),e([He({type:Object})],at.prototype,"component",void 0),e([He({type:Boolean})],at.prototype,"clickable",void 0),e([He({type:Boolean,reflect:!0})],at.prototype,"active",void 0),e([He({type:Boolean,reflect:!0})],at.prototype,"disabled",void 0),e([He({type:Boolean,reflect:!0})],at.prototype,"completed",void 0),e([He({type:Number})],at.prototype,"stepIndex",void 0),e([He({type:String})],at.prototype,"orientation",void 0),e([He({type:Boolean})],at.prototype,"isFirstOfType",void 0),it("sgds-stepper",tt),it("sgds-step",at)});
2302
2302
  //# sourceMappingURL=index.umd.min.js.map