@aquera/nile-elements 0.0.72 → 0.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\nimport { TIMEZONES } from './timezones';\n\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n* The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private currentMonth: number = new Date().getMonth();\n\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value: any;\n\n @property({ type: Object, attribute: 'allowed-dates' })\n allowedDates: any = {};\n\n @property({ type: Object }) rangeValue: any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n\n @property({ type: Object }) endDate: Date | null = null;\n\n @property({ type: Boolean }) isSelectingStart = true;\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: String }) type = 'absolute';\n\n @property({ type: String }) selectedUnit: string;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: String }) selectedTimeZone: string = 'local';\n\n @state() validAllowedDates = true;\n\n firstUpdated() {\n const allowedDatesAttribute = this.getAttribute('allowed-dates');\n\n if (allowedDatesAttribute !== null ) {\n try {\n this.allowedDates = JSON.parse(allowedDatesAttribute);\n } catch (error) {\n console.error('Error parsing allowed-dates attribute:', error);\n }\n }\n else\n {\n this.validAllowedDates=false;\n }\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() {\n if (Object.keys(this.allowedDates).length ==0) {\n this.validAllowedDates = false;\n return;\n }\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n this.validAllowedDates=false;\n }\n else\n {\n this.validAllowedDates=true;\n }\n }\n\n @property({ type: Boolean,attribute:'hide-time-input' }) hideTimeInput: Boolean = false;\n\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: String[] = [];\n @property({ type: Boolean , attribute: 'hide-time-zone' }) hideTimeZone: Boolean = false;\n\n @watch('value')\n valueChanged() {\n\n if (typeof this.value === 'object' && this.value !== null) {\n this.value = JSON.stringify(this.value);\n }\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.requestUpdate();\n }\n\n private selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n if (this.selectedTimeZone !== 'local') {\n this.startDate = this.convertTZ(this.startDate, this.selectedTimeZone);\n this.endDate = this.convertTZ(this.endDate, this.selectedTimeZone);\n }\n\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n isCurrentDate(day: number, month: number, year: number) {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n }\n\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.validAllowedDates) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day\n ${this.isAllowedDate(day, month, year) ? '' : 'not-allowed'}\n ${isSelectedDate(day, month, year, isCurrentMonth)} ${isInRange(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\n ${this.isCurrentDate(day, month, year) && isCurrentMonth\n ? 'current-date'\n : ''}\n \"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n setType(newType: string) {\n this.type = newType;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n this.requestUpdate();\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n\n handleTimeValueClick(unit: string, value: number, event: any) {\n const timestamps = this.createRelativePeriod(unit, value);\n\n this.selectedUnit = unit;\n this.selectedValue = value;\n\n this.requestUpdate();\n }\n\n renderTimeValues(unit: string, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"time-value ${this.selectedUnit === unit &&\n this.selectedValue === value\n ? 'time-value--selected'\n : ''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >\n ${value}\n </div>\n `\n );\n }\n\n handleDurationChange(event: any) {\n this.selectedValue = Number(event.detail.value);\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeZoneChange(event: any) {\n this.selectedTimeZone = event.detail.value;\n this.requestUpdate();\n }\n\n onTypeChange(event: any) {\n this.type = event.detail.value;\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n const timeZones: string[] = TIMEZONES;\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n return html`\n <div\n class=\"base ${this.range ? 'base__range' : ''} ${this.type ===\n 'relative'\n ? 'base__relative'\n : ''}\"\n >\n <div class=\"calendar-config ${!this.range ? 'hidden' : ''}\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n <div class=\"calendar-timezone ${!this.range || this.hideTimeZone ? 'hidden' : ''}\">\n <nile-select\n hoist\n value=${this.selectedTimeZone}\n @nile-change=${this.handleTimeZoneChange}\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ${this.type !== 'absolute' ? 'hidden' : ''}\"\n >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n\n <div class=\"unit-container ${this.type !== 'relative' ? 'hidden' : ''}\">\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('minutes')\n ? 'hidden'\n : ''} \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('hours')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('days')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('weeks')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('months')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n </div>\n </div>\n\n ${this.range && this.type === 'relative'\n ? html`\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"${\n this.selectedValue\n }\"\n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"${\n this.selectedUnit\n }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${\n this.hideDurationFields?.includes('minutes') ? 'hidden' : ''\n }\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"${\n this.hideDurationFields?.includes('hours') ? 'hidden' : ''\n }\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${\n this.hideDurationFields?.includes('days') ? 'hidden' : ''\n }\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"${\n this.hideDurationFields?.includes('weeks') ? 'hidden' : ''\n }\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"${\n this.hideDurationFields?.includes('months') ? 'hidden' : ''\n }\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n ${this.range && this.type === 'absolute'\n ? html`\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.startDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleStartDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''}\" value=\"${this.formatTime(\n this.startDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleStartTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n <div>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.endDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleEndDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''} \" value=\"${this.formatTime(\n this.endDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleEndTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}\n"],"names":["NileCalendar","_l","r","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","allowedDates","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","type","selectedTimeZone","validAllowedDates","hideTimeInput","hideDurationFields","hideTimeZone","_this","_inherits","_createClass","key","value","firstUpdated","allowedDatesAttribute","getAttribute","JSON","parse","error","console","checkValidAllowedDate","Object","keys","length","UTC","slice","_this$allowedDates3","valueChanged","_typeof","stringify","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","setHours","dropdown","hide","confimRange","convertTZ","tzString","toLocaleString","timeZone","isCurrentDate","today","isAllowedDate","dateToCheck","_this$allowedDates9","_this$allowedDates12","setUTCHours","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","fillerDaysAfter","allDays","isSelectedDate","isCurrentMonth","isStartDate","isEndDate","isInRange","c","html","_templateObject","_taggedTemplateLiteral","map","index","_templateObject2","formatDate","concat","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","hour","minute","second","newDate","handleStartTimeInput","time","handleEndTimeInput","setType","newType","createRelativePeriod","unit","endTime","startTime","setMinutes","setDate","setMonth","handleTimeValueClick","selectedUnit","selectedValue","renderTimeValues","values","_templateObject3","handleDurationChange","handleUnitChange","handleTimeZoneChange","onTypeChange","render","nextYear","_templateObject4","includes","_templateObject5","_templateObject6","__decorate","get","styles","NileElement","query","prototype","property","Boolean","reflect","attribute","state","watch","_export","customElement"],"mappings":"6hNA2CaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEASGC,EAAAA,KAAAA,CAAAC,aAAuB,GAAIC,CAAAA,IAAAA,CAAAA,CAAAA,CAAOC,QAElCH,CAAAA,CAAAA,CAAAA,KAAAA,CAAAI,WAAsB,CAAA,GAAIF,CAAAA,IAAOG,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,CAAAA,CAIGL,KAAAA,CAAcM,cAAAA,CAAAA,CAAG,CAK7DN,CAAAA,KAAAA,CAAYO,YAAQ,CAAA,GAI4BP,KAAAA,CAAcQ,cAAAA,CAEnD,IAEqCR,CAAAA,KAAAA,CAAaS,aAC3D,CAAA,IAAA,CAE0BT,KAAAA,CAASU,SAAAA,CAAgB,IAEzBV,CAAAA,KAAAA,CAAOW,OAAgB,CAAA,IAAA,CAEtBX,KAAAA,CAAgBY,gBAAAA,CAAAA,CAAG,EAEnBZ,KAAAA,CAAKa,KAAAA,CAAAA,CAAG,CAETb,CAAAA,KAAAA,CAAIc,IAAG,CAAA,UAAA,CAMPd,KAAAA,CAAgBe,gBAAAA,CAAW,OAE9Cf,CAAAA,KAAAA,CAAiBgB,iBAAG,CAAA,CAAA,CAAA,CAiD4BhB,KAAAA,CAAaiB,aAAAA,CAAAA,CAAY,EAGlFjB,KAAAA,CAAkBkB,kBAAAA,CAAa,EAC4BlB,CAAAA,KAAAA,CAAYmB,YAAY,CAAA,CAAA,CAowBpF,QAAAC,KAAA,EAn2BQC,SAAA,CAAAtB,CAAA,CAAAD,EAAA,SAAAwB,YAAA,CAAAvB,CAAA,GAAAwB,GAAA,gBAAAC,KAAA,CA4CP,SAAAC,aAAA,EACE,GAAMC,CAAAA,CAAAA,CAAwB1B,IAAK2B,CAAAA,YAAAA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AAAA,CAAAA,CAAA,CAARU,CAAAA,CAAAA,CAAAA,CAAAA,CAAiCzL,EAAAoL,SAAA,CAAA,mBAAA,CAAA,IAAA,EAmBlCL,CAAAA,CAAAA,CAAAA,CAAA,CADCW,CAAAA,CAAM,iBA6BN1L,CAAAoL,CAAAA,SAAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,CAEwDL,CAAA,CAAA,CAAxDM,EAAS,CAAEpK,IAAAA,CAAMqK,OAAQE,CAAAA,SAAAA,CAAU,iBAAoDxL,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoL,UAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAGxFL,CAAA,CAAA,CADCM,CAAS,CAAA,CAAEpK,KAAM0D,KAAO6G,CAAAA,SAAAA,CAAW,sBACFxL,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoL,SAAA,CAAA,oBAAA,CAAA,IAAA,IACyBL,CAAA,CAAA,CAA1DM,CAAS,CAAA,CAAEpK,IAAMqK,CAAAA,OAAAA,CAAUE,UAAW,gBAAkDxL,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoL,SAAA,CAAA,cAAA,CAAA,IAAA,EAGzFL,CAAAA,CAAAA,CAAAA,CAAA,CADCW,CAAM,CAAA,OAAA,CAAA,CAAA,CA2BN1L,CAAAoL,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAAO,OAAA,KAjIU3L,EAAY+K,CAAA,CAAA,CADxBa,CAAc,CAAA,eAAA,CAAA,CAAA,CACF5L"}
1
+ {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\nimport { TIMEZONES } from './timezones';\n\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n* The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private currentMonth: number = new Date().getMonth();\n\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value: any;\n\n @property({ type: Object, attribute: 'allowed-dates' })\n allowedDates: any = {};\n\n @property({ type: Object }) rangeValue: any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n\n @property({ type: Object }) endDate: Date | null = null;\n\n @property({ type: Boolean }) isSelectingStart = true;\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: String }) type = 'absolute';\n\n @property({ type: String }) selectedUnit: string;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: String }) selectedTimeZone: string = 'local';\n\n @state() validAllowedDates = true;\n\n firstUpdated() {\n const allowedDatesAttribute = this.getAttribute('allowed-dates');\n\n if (allowedDatesAttribute !== null ) {\n try {\n this.allowedDates = JSON.parse(allowedDatesAttribute);\n } catch (error) {\n console.error('Error parsing allowed-dates attribute:', error);\n }\n }\n else\n {\n this.validAllowedDates=false;\n }\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() { \n if (Object.keys(this.allowedDates).length ==0) {\n this.validAllowedDates = false;\n return;\n }\n this.hideInput=true;\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n this.validAllowedDates=false;\n }\n else\n {\n this.validAllowedDates=true;\n }\n }\n\n @state() hideInput: Boolean = false;\n\n @property({ type: Boolean,attribute:'hide-time-input' }) hideTimeInput: Boolean = false;\n\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: String[] = [];\n @property({ type: Boolean , attribute: 'hide-time-zone' }) hideTimeZone: Boolean = false;\n\n @watch('value')\n valueChanged() {\n\n if (typeof this.value === 'object' && this.value !== null) {\n this.value = JSON.stringify(this.value);\n }\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.requestUpdate();\n }\n\n private selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n if (this.selectedTimeZone !== 'local') {\n this.startDate = this.convertTZ(this.startDate, this.selectedTimeZone);\n this.endDate = this.convertTZ(this.endDate, this.selectedTimeZone);\n }\n\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n isCurrentDate(day: number, month: number, year: number) {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n }\n\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.validAllowedDates) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day\n ${this.isAllowedDate(day, month, year) ? '' : 'not-allowed'}\n ${isSelectedDate(day, month, year, isCurrentMonth)} ${isInRange(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\n ${this.isCurrentDate(day, month, year) && isCurrentMonth\n ? 'current-date'\n : ''}\n \"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n setType(newType: string) {\n this.type = newType;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n this.requestUpdate();\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n\n handleTimeValueClick(unit: string, value: number, event: any) {\n const timestamps = this.createRelativePeriod(unit, value);\n\n this.selectedUnit = unit;\n this.selectedValue = value;\n\n this.requestUpdate();\n }\n\n renderTimeValues(unit: string, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"time-value ${this.selectedUnit === unit &&\n this.selectedValue === value\n ? 'time-value--selected'\n : ''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >\n ${value}\n </div>\n `\n );\n }\n\n handleDurationChange(event: any) {\n this.selectedValue = Number(event.detail.value);\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeZoneChange(event: any) {\n this.selectedTimeZone = event.detail.value;\n this.requestUpdate();\n }\n\n onTypeChange(event: any) {\n this.type = event.detail.value;\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n const timeZones: string[] = TIMEZONES;\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n return html`\n <div\n class=\"base ${this.range ? 'base__range' : ''} ${this.type ===\n 'relative'\n ? 'base__relative'\n : ''}\"\n >\n <div class=\"calendar-config ${!this.range ? 'hidden' : ''}\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n <div class=\"calendar-timezone ${!this.range || this.hideTimeZone ? 'hidden' : ''}\">\n <nile-select\n hoist\n value=${this.selectedTimeZone}\n @nile-change=${this.handleTimeZoneChange}\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ${this.type !== 'absolute' ? 'hidden' : ''}\"\n >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n\n <div class=\"unit-container ${this.type !== 'relative' ? 'hidden' : ''}\">\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('minutes')\n ? 'hidden'\n : ''} \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('hours')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('days')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('weeks')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('months')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n </div>\n </div>\n\n ${this.range && this.type === 'relative'\n ? html`\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"${\n this.selectedValue\n }\"\n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"${\n this.selectedUnit\n }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${\n this.hideDurationFields?.includes('minutes') ? 'hidden' : ''\n }\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"${\n this.hideDurationFields?.includes('hours') ? 'hidden' : ''\n }\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${\n this.hideDurationFields?.includes('days') ? 'hidden' : ''\n }\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"${\n this.hideDurationFields?.includes('weeks') ? 'hidden' : ''\n }\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"${\n this.hideDurationFields?.includes('months') ? 'hidden' : ''\n }\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n ${this.range && this.type === 'absolute'\n ? html`\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\"> \n ${!this.hideInput ? html`<nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.startDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleStartDateInput\n }\">\n </nile-input>`:html`` }\n \n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''}\" value=\"${this.formatTime(\n this.startDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleStartTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n <div>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n ${!this.hideInput ? html`<nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.endDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleEndDateInput\n }\"></nile-input>`:html``}\n \n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''} \" value=\"${this.formatTime(\n this.endDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleEndTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}\n"],"names":["NileCalendar","_l","r","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","allowedDates","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","type","selectedTimeZone","validAllowedDates","hideInput","hideTimeInput","hideDurationFields","hideTimeZone","_this","_inherits","_createClass","key","value","firstUpdated","allowedDatesAttribute","getAttribute","JSON","parse","error","console","checkValidAllowedDate","Object","keys","length","UTC","slice","valueChanged","_typeof","stringify","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","setHours","dropdown","hide","confimRange","convertTZ","tzString","toLocaleString","timeZone","isCurrentDate","today","isAllowedDate","_this$allowedDates7","_this$allowedDates8","_this$allowedDates9","_this$allowedDates10","_this$allowedDates11","_this$allowedDates12","dateToCheck","setUTCHours","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","fillerDaysAfter","allDays","isSelectedDate","isCurrentMonth","isStartDate","isEndDate","isInRange","c","html","_templateObject","_taggedTemplateLiteral","map","index","_templateObject2","formatDate","concat","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","hour","minute","second","newDate","handleStartTimeInput","time","handleEndTimeInput","setType","newType","createRelativePeriod","unit","endTime","startTime","setMinutes","setDate","setMonth","handleTimeValueClick","selectedUnit","selectedValue","renderTimeValues","values","_templateObject3","handleDurationChange","handleUnitChange","handleTimeZoneChange","onTypeChange","render","nextYear","_templateObject4","includes","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","__decorate","get","styles","NileElement","query","prototype","property","Boolean","reflect","attribute","state","watch","customElement"],"mappings":"kmNA2CaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEASGC,EAAAA,KAAAA,CAAAC,a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EAAA,CADCW,CAAAA,CAAM,OA2BNlM,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4L,SAAA,CAAA,cAAA,CAAA,IApIU5L,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYuL,CAAA,CAAA,CADxBY,CAAc,CAAA,eAAA,CAAA,CAAA,CACFnM"}
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";import{query as e,state as s,customElement as n}from"lit/decorators.js";import{s as a}from"./nile-calendar.css.esm.js";import{w as h}from"../internal/watch.esm.js";import{N as l}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{n as d}from"../property-09139d3c.esm.js";import"lit";import"lit/directives/class-map.js";import"../nile-popup/nile-popup.css.esm.js";let r=class extends l{constructor(){super(...arguments),this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.dropDownOpened=!1,this.allowedDates={},this.valueAttribute=null,this.formattedDate=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.range=!1,this.type="absolute",this.selectedTimeZone="local",this.validAllowedDates=!0,this.hideTimeInput=!1,this.hideDurationFields=[],this.hideTimeZone=!1}static get styles(){return[a]}firstUpdated(){const t=this.getAttribute("allowed-dates");if(null!==t)try{this.allowedDates=JSON.parse(t)}catch(t){console.error("Error parsing allowed-dates attribute:",t)}else this.validAllowedDates=!1}checkValidAllowedDate(){if(0==Object.keys(this.allowedDates).length)return void(this.validAllowedDates=!1);new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10)))>new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)))?(console.error("StartDate must be greater than endDate"),this.validAllowedDates=!1):this.validAllowedDates=!0}valueChanged(){if("object"==typeof this.value&&null!==this.value&&(this.value=JSON.stringify(this.value)),this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){const t=this.value.getTimezoneOffset(),i=new Date(this.value.getTime()-60*t*1e3);isNaN(i.getTime())||(this.valueAttribute=i.toISOString().split("T")[0],this.formattedDate=`${String(i.getDate()).padStart(2,"0")}/${String(i.getMonth()+1).padStart(2,"0")}/${i.getFullYear()}`)}}updated(t){if(super.updated(t),t.has("valueAttribute")){const t=new Date(this.valueAttribute||"");if(!isNaN(t.getTime())){const i=t.getTimezoneOffset();this.value=new Date(t.getTime()-60*i*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear()}}}static get observedAttributes(){return["value","range"]}attributeChangedCallback(t,i,e){"value"===t?(this.valueAttribute=e,this.initializeValue()):"range"===t&&(this.range=null!==e)}initializeValue(){if(this.range)try{const t=JSON.parse(this.valueAttribute||"");this.startDate=new Date(t.startDate),this.endDate=new Date(t.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null}catch(t){}else if(this.valueAttribute){let t;t=new Date(this.valueAttribute),t=new Date(t.getTime()-6e4*t.getTimezoneOffset()),isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null)}this.requestUpdate()}connectedCallback(){if(super.connectedCallback(),this.initializeValue(),this.valueAttribute){const t=new Date(this.valueAttribute);isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear())}this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getDaysArray(t,i){const e=new Date(t,i+1,0).getDate();return Array.from({length:e},((t,i)=>i+1))}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate()}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate()}selectDate(t,i,e){const s=new Date(e,i,t);if(this.range)if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{const t=s;t.setHours(23,59,59,999),this.endDate=t}else this.value=s,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate()}confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate})}convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}))}isCurrentDate(t,i,e){const s=new Date;return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear()}isAllowedDate(t,i,e){if(!this.validAllowedDates)return!0;const s=new Date(Date.UTC(e,i,t)),n=new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10))),a=new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)));a.setUTCHours(23,59,59,999);return s>=n&&s<=a}renderMonth(t,e,s){const n=new Date(t,e,1).getDay(),a=new Date(t,e+1,0).getDay(),h=this.getDaysArray(0===e?t-1:t,0===e?11:e-1),l=this.getDaysArray(11===e?t+1:t,11===e?0:e+1),d=h.slice(h.length-n),r=l.slice(0,6-a),o=[...d,...s,...r],u=(t,i,e,s)=>{if(!s)return"";if(!this.range&&this.value){if(t===this.value.getDate()&&i===this.value.getMonth()&&e===this.value.getFullYear())return"selected-date"}const n=this.startDate&&t===this.startDate.getDate()&&i===this.startDate.getMonth()&&e===this.startDate.getFullYear(),a=this.endDate&&t===this.endDate.getDate()&&i===this.endDate.getMonth()&&e===this.endDate.getFullYear();return n?"range-start":a?"range-end":""},c=(t,i,e,s)=>{if(!s)return!1;if(this.startDate&&this.endDate){const s=new Date(e,i,t);return s>=this.startDate&&s<=this.endDate}return!1};return i`
1
+ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";import{query as e,state as s,customElement as n}from"lit/decorators.js";import{s as a}from"./nile-calendar.css.esm.js";import{w as h}from"../internal/watch.esm.js";import{N as l}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{n as d}from"../property-09139d3c.esm.js";import"lit";import"lit/directives/class-map.js";import"../nile-popup/nile-popup.css.esm.js";let r=class extends l{constructor(){super(...arguments),this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.dropDownOpened=!1,this.allowedDates={},this.valueAttribute=null,this.formattedDate=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.range=!1,this.type="absolute",this.selectedTimeZone="local",this.validAllowedDates=!0,this.hideInput=!1,this.hideTimeInput=!1,this.hideDurationFields=[],this.hideTimeZone=!1}static get styles(){return[a]}firstUpdated(){const t=this.getAttribute("allowed-dates");if(null!==t)try{this.allowedDates=JSON.parse(t)}catch(t){console.error("Error parsing allowed-dates attribute:",t)}else this.validAllowedDates=!1}checkValidAllowedDate(){if(0==Object.keys(this.allowedDates).length)return void(this.validAllowedDates=!1);this.hideInput=!0;new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10)))>new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)))?(console.error("StartDate must be greater than endDate"),this.validAllowedDates=!1):this.validAllowedDates=!0}valueChanged(){if("object"==typeof this.value&&null!==this.value&&(this.value=JSON.stringify(this.value)),this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){const t=this.value.getTimezoneOffset(),i=new Date(this.value.getTime()-60*t*1e3);isNaN(i.getTime())||(this.valueAttribute=i.toISOString().split("T")[0],this.formattedDate=`${String(i.getDate()).padStart(2,"0")}/${String(i.getMonth()+1).padStart(2,"0")}/${i.getFullYear()}`)}}updated(t){if(super.updated(t),t.has("valueAttribute")){const t=new Date(this.valueAttribute||"");if(!isNaN(t.getTime())){const i=t.getTimezoneOffset();this.value=new Date(t.getTime()-60*i*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear()}}}static get observedAttributes(){return["value","range"]}attributeChangedCallback(t,i,e){"value"===t?(this.valueAttribute=e,this.initializeValue()):"range"===t&&(this.range=null!==e)}initializeValue(){if(this.range)try{const t=JSON.parse(this.valueAttribute||"");this.startDate=new Date(t.startDate),this.endDate=new Date(t.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null}catch(t){}else if(this.valueAttribute){let t;t=new Date(this.valueAttribute),t=new Date(t.getTime()-6e4*t.getTimezoneOffset()),isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null)}this.requestUpdate()}connectedCallback(){if(super.connectedCallback(),this.initializeValue(),this.valueAttribute){const t=new Date(this.valueAttribute);isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear())}this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getDaysArray(t,i){const e=new Date(t,i+1,0).getDate();return Array.from({length:e},((t,i)=>i+1))}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate()}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate()}selectDate(t,i,e){const s=new Date(e,i,t);if(this.range)if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{const t=s;t.setHours(23,59,59,999),this.endDate=t}else this.value=s,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate()}confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate})}convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}))}isCurrentDate(t,i,e){const s=new Date;return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear()}isAllowedDate(t,i,e){if(!this.validAllowedDates)return!0;const s=new Date(Date.UTC(e,i,t)),n=new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10))),a=new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)));a.setUTCHours(23,59,59,999);return s>=n&&s<=a}renderMonth(t,e,s){const n=new Date(t,e,1).getDay(),a=new Date(t,e+1,0).getDay(),h=this.getDaysArray(0===e?t-1:t,0===e?11:e-1),l=this.getDaysArray(11===e?t+1:t,11===e?0:e+1),d=h.slice(h.length-n),r=l.slice(0,6-a),o=[...d,...s,...r],u=(t,i,e,s)=>{if(!s)return"";if(!this.range&&this.value){if(t===this.value.getDate()&&i===this.value.getMonth()&&e===this.value.getFullYear())return"selected-date"}const n=this.startDate&&t===this.startDate.getDate()&&i===this.startDate.getMonth()&&e===this.startDate.getFullYear(),a=this.endDate&&t===this.endDate.getDate()&&i===this.endDate.getMonth()&&e===this.endDate.getFullYear();return n?"range-start":a?"range-end":""},c=(t,i,e,s)=>{if(!s)return!1;if(this.startDate&&this.endDate){const s=new Date(e,i,t);return s>=this.startDate&&s<=this.endDate}return!1};return i`
2
2
  <div class="calendar">
3
3
  <div class="calendar-header">
4
4
  <nile-icon
@@ -159,8 +159,10 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
159
159
  <div class="calender-input">
160
160
  <div>
161
161
  <span class="manual-input-label">From </span>
162
- <div class="from">
163
- <nile-input class="manual-input" value="${this.formatDate(this.startDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleStartDateInput}"></nile-input>
162
+ <div class="from">
163
+ ${this.hideInput?i``:i`<nile-input class="manual-input" value="${this.formatDate(this.startDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleStartDateInput}">
164
+ </nile-input>`}
165
+
164
166
  <nile-input class="manual-input ${this.hideTimeInput?"hidden":""}" value="${this.formatTime(this.startDate)}" placeholder="HH:MM:SS" @nile-change="${this.handleStartTimeInput}"> </nile-input>
165
167
  </div>
166
168
  </div>
@@ -168,7 +170,8 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
168
170
  <div>
169
171
  <span class="manual-input-label">To </span>
170
172
  <div class="from">
171
- <nile-input class="manual-input" value="${this.formatDate(this.endDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleEndDateInput}"></nile-input>
173
+ ${this.hideInput?i``:i`<nile-input class="manual-input" value="${this.formatDate(this.endDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleEndDateInput}"></nile-input>`}
174
+
172
175
  <nile-input class="manual-input ${this.hideTimeInput?"hidden":""} " value="${this.formatTime(this.endDate)}" placeholder="HH:MM:SS" @nile-change="${this.handleEndTimeInput}"> </nile-input>
173
176
  </div>
174
177
  </div>
@@ -180,4 +183,4 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
180
183
  </div>
181
184
  `:""}
182
185
  </div>
183
- `}};t([e("nile-dropdown")],r.prototype,"dropdown",void 0),t([d({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([d({type:Object})],r.prototype,"value",void 0),t([d({type:Object,attribute:"allowed-dates"})],r.prototype,"allowedDates",void 0),t([d({type:Object})],r.prototype,"rangeValue",void 0),t([d({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([d({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([d({type:Object})],r.prototype,"startDate",void 0),t([d({type:Object})],r.prototype,"endDate",void 0),t([d({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([d({type:Boolean})],r.prototype,"range",void 0),t([d({type:String})],r.prototype,"type",void 0),t([d({type:String})],r.prototype,"selectedUnit",void 0),t([d({type:Number})],r.prototype,"selectedValue",void 0),t([d({type:String})],r.prototype,"selectedTimeZone",void 0),t([s()],r.prototype,"validAllowedDates",void 0),t([h("allowedDates")],r.prototype,"checkValidAllowedDate",null),t([d({type:Boolean,attribute:"hide-time-input"})],r.prototype,"hideTimeInput",void 0),t([d({type:Array,attribute:"hide-duration-fields"})],r.prototype,"hideDurationFields",void 0),t([d({type:Boolean,attribute:"hide-time-zone"})],r.prototype,"hideTimeZone",void 0),t([h("value")],r.prototype,"valueChanged",null),r=t([n("nile-calendar")],r);export{r as N};
186
+ `}};t([e("nile-dropdown")],r.prototype,"dropdown",void 0),t([d({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([d({type:Object})],r.prototype,"value",void 0),t([d({type:Object,attribute:"allowed-dates"})],r.prototype,"allowedDates",void 0),t([d({type:Object})],r.prototype,"rangeValue",void 0),t([d({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([d({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([d({type:Object})],r.prototype,"startDate",void 0),t([d({type:Object})],r.prototype,"endDate",void 0),t([d({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([d({type:Boolean})],r.prototype,"range",void 0),t([d({type:String})],r.prototype,"type",void 0),t([d({type:String})],r.prototype,"selectedUnit",void 0),t([d({type:Number})],r.prototype,"selectedValue",void 0),t([d({type:String})],r.prototype,"selectedTimeZone",void 0),t([s()],r.prototype,"validAllowedDates",void 0),t([h("allowedDates")],r.prototype,"checkValidAllowedDate",null),t([s()],r.prototype,"hideInput",void 0),t([d({type:Boolean,attribute:"hide-time-input"})],r.prototype,"hideTimeInput",void 0),t([d({type:Array,attribute:"hide-duration-fields"})],r.prototype,"hideDurationFields",void 0),t([d({type:Boolean,attribute:"hide-time-zone"})],r.prototype,"hideTimeZone",void 0),t([h("value")],r.prototype,"valueChanged",null),r=t([n("nile-calendar")],r);export{r as N};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,o,l,c,h,r,n,a,d,p,m,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,b;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;i=_index001CjsJs.A;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;o=_litDecoratorsJs.state;l=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){c=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){r=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){n=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){a=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){d=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){p=_internalNileElementCjsJs.N;},function(_property002CjsJs){m=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",b=/*#__PURE__*/function(_p){function b(){var _this;_classCallCheck(this,b);_this=_callSuper(this,b),_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.subLabel="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(b,_p);return _createClass(b,[{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("valueChange",{composed:!0,bubbles:!0,detail:{checked:this.checked}}));}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(b.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(b.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(b.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass();}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,s=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class=","\n >\n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n <!-- An empty title prevents browser validation tooltips from appearing on hover -->\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n ","\n ","\n </span>\n\n <div part=\"label\" class=\"checkbox__label\" style=\"","\">\n ","\n ","\n <slot></slot>\n </div>\n </label>\n\n ","\n ","\n "])),h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate}),this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.title,this.name,n(this.value),a(this.indeterminate),a(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"",this.label||this.subLabel?"":"margin-left:0;",this.label?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<span class=\"checkbox__label__text\">","</span>"])),this.label):"",this.subLabel?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<span class=\"checkbox__sublabel__text\">","</span>"])),this.subLabel):"",e?t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):i,s?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-form-error-message>","</nile-form-error-message>"])),this.errorMessage):i);}}]);}(p));b.styles=c,e([s('input[type="checkbox"]')],b.prototype,"input",void 0),e([o()],b.prototype,"hasFocus",void 0),e([m()],b.prototype,"title",void 0),e([m()],b.prototype,"name",void 0),e([m()],b.prototype,"value",void 0),e([m({reflect:!0})],b.prototype,"size",void 0),e([m({type:Boolean,reflect:!0})],b.prototype,"disabled",void 0),e([m({type:Boolean,reflect:!0})],b.prototype,"checked",void 0),e([m({type:String,reflect:!0})],b.prototype,"label",void 0),e([m({type:String,reflect:!0,attribute:"sub-label"})],b.prototype,"subLabel",void 0),e([m({type:Boolean,reflect:!0})],b.prototype,"indeterminate",void 0),e([r("checked")],b.prototype,"defaultChecked",void 0),e([m({attribute:"help-text",reflect:!0})],b.prototype,"helpText",void 0),e([m({attribute:"error-message",reflect:!0})],b.prototype,"errorMessage",void 0),e([m({type:Boolean})],b.prototype,"showHelpText",void 0),e([m({reflect:!0})],b.prototype,"form",void 0),e([m({type:Boolean,reflect:!0})],b.prototype,"required",void 0),e([d(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],b.prototype,"handleStateChange",null),_export("N",b=e([l("nile-checkbox")],b));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,o,c,l,h,n,r,a,d,p,b,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,m;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;i=_index001CjsJs.A;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;o=_litDecoratorsJs.state;c=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){l=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){n=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){a=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){d=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){p=_internalNileElementCjsJs.N;},function(_property002CjsJs){b=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",m=/*#__PURE__*/function(_p){function m(){var _this;_classCallCheck(this,m);_this=_callSuper(this,m),_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.subLabel="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(m,_p);return _createClass(m,[{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("valueChange",{composed:!0,bubbles:!0,detail:{checked:this.checked}}));}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(m.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(m.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(m.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass(),this.checkboxIconContainer.style.height=this.labelContainer.scrollHeight+"px";}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,s=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class="," \n >\n <div class=\"checkbox__icon__container\">\n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n <!-- An empty title prevents browser validation tooltips from appearing on hover -->\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n ","\n ","\n </span>\n </div>\n\n <div part=\"label\" class=\"checkbox__label\" style=\"","\">\n ","\n ","\n <slot></slot>\n </div>\n </label>\n\n ","\n ","\n "])),h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate}),this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.title,this.name,r(this.value),a(this.indeterminate),a(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"",this.label||this.subLabel?"":"margin-left:0;",this.label?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<span class=\"checkbox__label__text\">","</span>"])),this.label):"",this.subLabel?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<span class=\"checkbox__sublabel__text\">","</span>"])),this.subLabel):"",e?t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):i,s?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-form-error-message>","</nile-form-error-message>"])),this.errorMessage):i);}}]);}(p));m.styles=l,e([s('input[type="checkbox"]')],m.prototype,"input",void 0),e([o()],m.prototype,"hasFocus",void 0),e([b()],m.prototype,"title",void 0),e([b()],m.prototype,"name",void 0),e([b()],m.prototype,"value",void 0),e([b({reflect:!0})],m.prototype,"size",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"checked",void 0),e([b({type:String,reflect:!0})],m.prototype,"label",void 0),e([b({type:String,reflect:!0,attribute:"sub-label"})],m.prototype,"subLabel",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"indeterminate",void 0),e([n("checked")],m.prototype,"defaultChecked",void 0),e([b({attribute:"help-text",reflect:!0})],m.prototype,"helpText",void 0),e([b({attribute:"error-message",reflect:!0})],m.prototype,"errorMessage",void 0),e([b({type:Boolean})],m.prototype,"showHelpText",void 0),e([b({reflect:!0})],m.prototype,"form",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"required",void 0),e([s(".checkbox__label__text")],m.prototype,"labelContainer",void 0),e([s("div.checkbox__icon__container")],m.prototype,"checkboxIconContainer",void 0),e([d(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],m.prototype,"handleStateChange",null),_export("N",m=e([c("nile-checkbox")],m));}};});
2
2
  //# sourceMappingURL=nile-checkbox.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n nothing,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n\n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n\n static styles: CSSResultGroup = styles;\n\n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n\n @property() title = ''; // make reactive to pass through\n\n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n\n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n\n /** Sublabel, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true, attribute: 'sub-label' }) subLabel = '';\n\n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n @property({ type: Boolean }) showHelpText = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.dispatchEvent(\n new CustomEvent('valueChange', {\n composed: true,\n bubbles: true,\n detail: {\n checked: this.checked,\n },\n })\n );\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n\n private handleInput() {\n this.emit('input');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n\n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n\n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n\n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n\n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n\n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate\n })}\n >\n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n <!-- An empty title prevents browser validation tooltips from appearing on hover -->\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${ this.title }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n\n <div part=\"label\" class=\"checkbox__label\" style=\"${!this.label && !this.subLabel?'margin-left:0;':''}\">\n ${this.label ? html`<span class=\"checkbox__label__text\">${this.label}</span>` : ``}\n ${this.subLabel ? html`<span class=\"checkbox__sublabel__text\">${this.subLabel}</span>` : ``}\n <slot></slot>\n </div>\n </label>\n\n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : nothing}\n ${hasErrorMessage\n ? html`<nile-form-error-message>${this.errorMessage}</nile-form-error-message>`\n : nothing}\n `;\n }\n}\n\nexport default NileCheckbox;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}\n"],"names":["NileCheckbox","_p","b","constructor","super","this","hasFocus","title","name","size","disabled","checked","label","subLabel","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_createClass","key","value","handleClick","dispatchEvent","CustomEvent","composed","bubbles","detail","handleBlur","emit","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","nothing","_templateObject7","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","attribute","defaultValue","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"64JAuDaA,CAAN,uBAAAC,EAAA,EACL,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EACEC,KAAAA,CAAAA,UAAAA,MAAAA,CAAAA,EAOeC,KAAAA,CAAQC,QAAAA,CAAAA,CAAG,CAEhBD,CAAAA,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,CAAA,qBAAA,EAEKF,CAAAA,CAAAA,CAAAA,CAAA,CAApDI,CAAS,CAAA,CAAEK,UAAW,WAAaJ,CAAAA,OAAAA,CAAAA,CAAS,KAAsB3E,CAAAwE,CAAAA,SAAAA,CAAA,eAAA,EAEVF,CAAAA,CAAAA,CAAAA,CAAA,CAAxDI,CAAS,CAAA,CAAEK,UAAW,eAAiBJ,CAAAA,OAAAA,CAAAA,CAAS,KAA0B3E,CAAAwE,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAE9CF,CAAA,CAAA,CAA5BI,EAAS,CAAEE,IAAAA,CAAMC,WAAgC7E,CAAAwE,CAAAA,SAAAA,CAAA,mBAAA,EAOrBF,CAAAA,CAAAA,CAAAA,CAAA,CAA5BI,CAAS,CAAA,CAAEC,SAAS,CAAkB3E,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwE,UAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAGKF,EAAA,CAA3CI,CAAAA,CAAS,CAAEE,IAAAA,CAAMC,OAASF,CAAAA,OAAAA,CAAAA,CAAS,KAAyB3E,CAAAwE,CAAAA,SAAAA,CAAA,eAAA,EA+B7DF,CAAAA,CAAAA,CAAAA,CAAA,CADCW,CAAM,CAAA,CAAC,UAAW,eAAkB,CAAA,CAAA,CAAEC,sBAAsB,CAI5DlF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwE,UAAA,mBAAA,CAAA,IAAA,CAAA,CAAAW,OAAA,KA3FUnF,EAAYsE,CAAA,CAAA,CADxBc,CAAc,CAAA,eAAA,CAAA,CAAA,CACFpF"}
1
+ {"version":3,"file":"nile-checkbox.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n nothing,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n\n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n\n static styles: CSSResultGroup = styles;\n\n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n\n @property() title = ''; // make reactive to pass through\n\n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n\n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n\n /** Sublabel, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true, attribute: 'sub-label' }) subLabel = '';\n\n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n @property({ type: Boolean }) showHelpText = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n @query('.checkbox__label__text') labelContainer:HTMLElement;\n\n @query('div.checkbox__icon__container') checkboxIconContainer:HTMLElement;\n\n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.dispatchEvent(\n new CustomEvent('valueChange', {\n composed: true,\n bubbles: true,\n detail: {\n checked: this.checked,\n },\n })\n );\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n\n private handleInput() {\n this.emit('input');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n\n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n\n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n\n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n this.checkboxIconContainer.style.height=this.labelContainer.scrollHeight+'px';\n }\n\n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n\n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate\n })} \n >\n <div class=\"checkbox__icon__container\">\n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n <!-- An empty title prevents browser validation tooltips from appearing on hover -->\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${ this.title }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n </div>\n\n <div part=\"label\" class=\"checkbox__label\" style=\"${!this.label && !this.subLabel?'margin-left:0;':''}\">\n ${this.label ? html`<span class=\"checkbox__label__text\">${this.label}</span>` : ``}\n ${this.subLabel ? html`<span class=\"checkbox__sublabel__text\">${this.subLabel}</span>` : ``}\n <slot></slot>\n </div>\n </label>\n\n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : nothing}\n ${hasErrorMessage\n ? html`<nile-form-error-message>${this.errorMessage}</nile-form-error-message>`\n : nothing}\n `;\n }\n}\n\nexport default NileCheckbox;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}\n"],"names":["NileCheckbox","m","constructor","super","this","hasFocus","title","name","size","disabled","checked","label","subLabel","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_p","_createClass","key","value","handleClick","dispatchEvent","CustomEvent","composed","bubbles","detail","handleBlur","emit","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","checkboxIconContainer","style","height","labelContainer","scrollHeight","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","nothing","_templateObject7","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","attribute","defaultValue","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"64JAuDaA,4BACX,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EACEC,KAAAA,CAAAA,UAAAA,MAAAA,CAAAA,EAOeC,KAAAA,CAAQC,UAAG,CAEhBD,CAAAA,KAAAA,CAAAE,KAAQ,CAAA,EAAA,CAGRF,KAAAA,CAAIG,IAAAA,CAAG,GAMUH,KAAAA,CAAII,IAAAA,CAAiC,QAGtBJ,CAAAA,KAAAA,CAAQK,QAAG,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A,eAAA,CAAA,CAAkB,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAI5DvF,CAAA6E,CAAAA,SAAAA,CAAA,mBAAA,CAAA,IAAA,CAAA,CAAAW,OAAA,KA/FUxF,EAAY2E,CAAA,CAAA,CADxBc,CAAc,CAAA,eAAA,CAAA,CAAA,CACFzF"}
@@ -1,2 +1,2 @@
1
- System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function execute(){_export("s",o=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: inline-block;\n }\n\n :host(.full-width) {\n width: 100%;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: stretch;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--only__subtitle{\n align-items: center;\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 3px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-family: var(--nile-font-family-serif);\n margin-left: 8px;\n user-select: none;\n color: var(--nile-colors-dark-900);\n font-style: normal;\n letter-spacing: 0.2px;\n box-sizing: border-box;\n }\n\n .checkbox__label__text {\n display: block;\n font-size: 14px;\n font-weight: 500;\n color: #344054;\n }\n\n .checkbox__sublabel__text {\n display: block;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #475467;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n"]))));}};});
1
+ System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function execute(){_export("s",o=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: inline-block;\n }\n\n :host(.full-width) {\n width: 100%;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: stretch;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--only__subtitle{\n align-items: center;\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 3px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-family: var(--nile-font-family-serif);\n margin-left: 8px;\n user-select: none;\n color: var(--nile-colors-dark-900);\n font-style: normal;\n letter-spacing: 0.2px;\n box-sizing: border-box;\n }\n\n .checkbox__icon__container{\n display:flex;\n align-items:center;\n }\n\n .checkbox__label__text {\n display: block;\n font-size: 14px;\n font-weight: 500;\n color: #344054;\n }\n\n .checkbox__sublabel__text {\n display: block;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #475467;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-checkbox.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.css.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Checkbox CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n\n :host(.full-width) {\n width: 100%;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: stretch;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--only__subtitle{\n align-items: center;\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 3px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-family: var(--nile-font-family-serif);\n margin-left: 8px;\n user-select: none;\n color: var(--nile-colors-dark-900);\n font-style: normal;\n letter-spacing: 0.2px;\n box-sizing: border-box;\n }\n\n .checkbox__label__text {\n display: block;\n font-size: 14px;\n font-weight: 500;\n color: #344054;\n }\n\n .checkbox__sublabel__text {\n display: block;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #475467;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-checkbox.css.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Checkbox CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n\n :host(.full-width) {\n width: 100%;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: stretch;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--only__subtitle{\n align-items: center;\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 3px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-family: var(--nile-font-family-serif);\n margin-left: 8px;\n user-select: none;\n color: var(--nile-colors-dark-900);\n font-style: normal;\n letter-spacing: 0.2px;\n box-sizing: border-box;\n }\n\n .checkbox__icon__container{\n display:flex;\n align-items:center;\n }\n\n .checkbox__label__text {\n display: block;\n font-size: 14px;\n font-weight: 500;\n color: #344054;\n }\n\n .checkbox__sublabel__text {\n display: block;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #475467;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -111,6 +111,11 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
111
111
  box-sizing: border-box;
112
112
  }
113
113
 
114
+ .checkbox__icon__container{
115
+ display:flex;
116
+ align-items:center;
117
+ }
118
+
114
119
  .checkbox__label__text {
115
120
  display: block;
116
121
  font-size: 14px;