@aquera/nile-elements 0.0.44 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js +41 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.d.ts +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.js +1 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.css.js +10 -2
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.d.ts +9 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js +114 -25
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.d.ts +4 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js +25 -6
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popover/nile-popover.d.ts +6 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popover/nile-popover.js +21 -2
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popover/nile-popover.js.map +1 -1
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.d.ts +5 -5
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js +9 -5
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js.map +1 -1
  20. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +17 -3
  21. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  22. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  23. package/dist/index.iife.js +191 -111
  24. package/dist/nile-button/nile-button.cjs.js +1 -1
  25. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  26. package/dist/nile-button/nile-button.css.cjs.js +1 -1
  27. package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
  28. package/dist/nile-button/nile-button.css.esm.js +43 -2
  29. package/dist/nile-button/nile-button.esm.js +1 -1
  30. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  31. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  32. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  33. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  34. package/dist/nile-calendar/nile-calendar.css.esm.js +10 -2
  35. package/dist/nile-calendar/nile-calendar.esm.js +44 -28
  36. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  37. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  38. package/dist/nile-date-picker/nile-date-picker.esm.js +12 -8
  39. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  40. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  41. package/dist/nile-popover/nile-popover.esm.js +5 -4
  42. package/dist/nile-select/nile-select.cjs.js +1 -1
  43. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  44. package/dist/nile-select/nile-select.css.cjs.js +1 -1
  45. package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
  46. package/dist/nile-select/nile-select.css.esm.js +4 -0
  47. package/dist/nile-select/nile-select.esm.js +18 -12
  48. package/dist/src/nile-button/nile-button.css.js +41 -0
  49. package/dist/src/nile-button/nile-button.css.js.map +1 -1
  50. package/dist/src/nile-button/nile-button.d.ts +1 -1
  51. package/dist/src/nile-button/nile-button.js +1 -0
  52. package/dist/src/nile-button/nile-button.js.map +1 -1
  53. package/dist/src/nile-calendar/nile-calendar.css.js +10 -2
  54. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  55. package/dist/src/nile-calendar/nile-calendar.d.ts +9 -1
  56. package/dist/src/nile-calendar/nile-calendar.js +114 -25
  57. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  58. package/dist/src/nile-date-picker/nile-date-picker.d.ts +4 -0
  59. package/dist/src/nile-date-picker/nile-date-picker.js +25 -6
  60. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  61. package/dist/src/nile-popover/nile-popover.d.ts +6 -0
  62. package/dist/src/nile-popover/nile-popover.js +21 -2
  63. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  64. package/dist/src/nile-select/nile-select.css.d.ts +5 -5
  65. package/dist/src/nile-select/nile-select.css.js +9 -5
  66. package/dist/src/nile-select/nile-select.css.js.map +1 -1
  67. package/dist/src/nile-select/nile-select.js +17 -3
  68. package/dist/src/nile-select/nile-select.js.map +1 -1
  69. package/dist/tsconfig.tsbuildinfo +1 -1
  70. package/package.json +2 -2
  71. package/src/nile-button/nile-button.css.ts +41 -0
  72. package/src/nile-button/nile-button.ts +2 -1
  73. package/src/nile-calendar/nile-calendar.css.ts +10 -2
  74. package/src/nile-calendar/nile-calendar.ts +206 -80
  75. package/src/nile-date-picker/nile-date-picker.ts +21 -7
  76. package/src/nile-popover/nile-popover.ts +20 -2
  77. package/src/nile-select/nile-select.css.ts +9 -5
  78. package/src/nile-select/nile-select.ts +19 -6
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAO1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAMnD,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAAtC;;QASG,iBAAY,GAAW,IAAI,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;QAE7C,gBAAW,GAAW,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAIX,mBAAc,GAAG,KAAK,CAAC;QAMnB,mBAAc,GAEnD,IAAI,CAAC;QAEgC,kBAAa,GAC3D,IAAI,CAAC;QAEqB,cAAS,GAAgB,IAAI,CAAC;QAE9B,YAAO,GAAgB,IAAI,CAAC;QAE3B,qBAAgB,GAAG,IAAI,CAAC;QAExB,UAAK,GAAG,KAAK,CAAC;QAEf,SAAI,GAAG,UAAU,CAAC;QAMlB,qBAAgB,GAAW,OAAO,CAAC;IA6rBjE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CAAC;gDAAiB;AAEI;IAA/C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;oDAE/B;AAEgC;IAA/C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;mDACxC;AAEqB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAA+B;AAE9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAA6B;AAE3B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDAAyB;AAExB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CAAe;AAEf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAmB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAsB;AAErB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuB;AAEtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAoC;AAG/D;IADC,KAAK,CAAC,OAAO,CAAC;gDAsBd;AAlEU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAuuBxB;SAvuBY,YAAY;AAyuBzB,eAAe,YAAY,CAAC","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 } 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 }) 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 @watch('value')\n valueChanged() {\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 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 ${isSelectedDate(\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\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\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 ? '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 class=\"time-unit-group\">\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 class=\"time-unit-group\">\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 class=\"time-unit-group\">\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 class=\"time-unit-group\">\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 class=\"time-unit-group\">\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=\"${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=\"${this.selectedUnit\n }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\"> Minutes </nile-option>\n <nile-option value=\"hours\"> Hours </nile-option>\n <nile-option value=\"days\"> Days </nile-option>\n <nile-option value=\"weeks\"> Weeks </nile-option>\n <nile-option value=\"months\"> 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=\"${!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 <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=\"${this.handleStartDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(\n this.startDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput\n }\"> </nile-input>\n\n </div>\n<br>\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=\"${this.handleEndDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(\n this.endDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput\n }\"> </nile-input>\n </div>\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"${!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"]}
1
+ {"version":3,"file":"nile-calendar.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAO1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAMnD,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAAtC;;QASG,iBAAY,GAAW,IAAI,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;QAE7C,gBAAW,GAAW,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAIX,mBAAc,GAAG,KAAK,CAAC;QAKnE,iBAAY,GAAQ,EAAE,CAAC;QAIyB,mBAAc,GAEnD,IAAI,CAAC;QAEgC,kBAAa,GAC3D,IAAI,CAAC;QAEqB,cAAS,GAAgB,IAAI,CAAC;QAE9B,YAAO,GAAgB,IAAI,CAAC;QAE3B,qBAAgB,GAAG,IAAI,CAAC;QAExB,UAAK,GAAG,KAAK,CAAC;QAEf,SAAI,GAAG,UAAU,CAAC;QAMlB,qBAAgB,GAAW,OAAO,CAAC;QAEtD,sBAAiB,GAA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AAC,cAAc,CAAC;yDA6BrB;AAEwD;IAAxD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC,SAAS,EAAC,iBAAiB,EAAE,CAAC;mDAAgC;AAIxF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;wDAC3B;AACyB;IAA1D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAG,SAAS,EAAE,gBAAgB,EAAE,CAAC;kDAA+B;AAGzF;IADC,KAAK,CAAC,OAAO,CAAC;gDAsBd;AA7HU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAq2BxB;SAr2BY,YAAY;AAu2BzB,eAAe,YAAY,CAAC","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\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 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\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}"]}
@@ -20,7 +20,11 @@ export declare class NileDatePicker extends NileElement {
20
20
  */
21
21
  static get styles(): CSSResultArray;
22
22
  range: boolean;
23
+ hideTimeInput: boolean;
24
+ hideTimeZone: boolean;
23
25
  value: any;
26
+ hideDurationFields: any;
27
+ allowedDates: any;
24
28
  dropdown: NileDropdown;
25
29
  /**
26
30
  * Render method
@@ -19,6 +19,9 @@ let NileDatePicker = class NileDatePicker extends NileElement {
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  this.range = false;
22
+ this.hideTimeInput = false;
23
+ this.hideTimeZone = false;
24
+ this.hideDurationFields = [];
22
25
  }
23
26
  /**
24
27
  * The styles for DatePicker
@@ -34,12 +37,16 @@ let NileDatePicker = class NileDatePicker extends NileElement {
34
37
  render() {
35
38
  return html `
36
39
  <nile-dropdown .hoist="${true}" distance="6">
37
- <slot
38
- slot="trigger"
39
- part="trigger"
40
- name="trigger"
41
- ></slot>
42
- <nile-calendar value="${this.value}" .range="${this.range}" @nile-changed="${this.handleChanged}"></nile-calendar>
40
+ <slot slot="trigger" part="trigger" name="trigger"></slot>
41
+ <nile-calendar
42
+ value="${this.value}"
43
+ .range="${this.range}"
44
+ @nile-changed="${this.handleChanged}"
45
+ allowed-dates="${this.allowedDates}"
46
+ .hideTimeInput="${this.hideTimeInput}"
47
+ .hideDurationFields="${this.hideDurationFields}"
48
+ .hideTimeZone="${this.hideTimeZone}"
49
+ ></nile-calendar>
43
50
  </nile-dropdown>
44
51
  `;
45
52
  }
@@ -61,9 +68,21 @@ let NileDatePicker = class NileDatePicker extends NileElement {
61
68
  __decorate([
62
69
  property({ type: Boolean })
63
70
  ], NileDatePicker.prototype, "range", void 0);
71
+ __decorate([
72
+ property({ type: Boolean, attribute: 'hide-time-input' })
73
+ ], NileDatePicker.prototype, "hideTimeInput", void 0);
74
+ __decorate([
75
+ property({ type: Boolean, attribute: 'hide-time-zone' })
76
+ ], NileDatePicker.prototype, "hideTimeZone", void 0);
64
77
  __decorate([
65
78
  property()
66
79
  ], NileDatePicker.prototype, "value", void 0);
80
+ __decorate([
81
+ property({ type: Array, attribute: 'hide-duration-fields' })
82
+ ], NileDatePicker.prototype, "hideDurationFields", void 0);
83
+ __decorate([
84
+ property({ attribute: 'allowed-dates' })
85
+ ], NileDatePicker.prototype, "allowedDates", void 0);
67
86
  __decorate([
68
87
  query('nile-dropdown')
69
88
  ], NileDatePicker.prototype, "dropdown", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-date-picker.js","sourceRoot":"","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QASwB,UAAK,GAAG,KAAK,CAAC;IAwC7C,CAAC;IAhDC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IASD;;;OAGG;IACH,MAAM;QACJ,OAAO,IAAI,CAAA;+BACgB,IAAI;;;;;;8BAML,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,KAAK,oBAAoB,IAAI,CAAC,aAAa;;KAEhG,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,KAAU;QACtB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SACtB;IACH,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC5B,CAAC;CACF,CAAA;AAxC8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAe;AAE/B;IAAX,QAAQ,EAAE;6CAAY;AAEC;IAAvB,KAAK,CAAC,eAAe,CAAC;gDAAwB;AAbpC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAiD1B;SAjDY,cAAc;AAmD3B,eAAe,cAAc,CAAC","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, query } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport NileElement from '../internal/nile-element';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\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 @property({ type: Boolean }) range = false;\n\n @property() value: any;\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n return html`\n <nile-dropdown .hoist=\"${true}\" distance=\"6\">\n <slot\n slot=\"trigger\"\n part=\"trigger\"\n name=\"trigger\"\n ></slot>\n <nile-calendar value=\"${this.value}\" .range=\"${this.range}\" @nile-changed=\"${this.handleChanged}\"></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n handleChanged(event: any) {\n this.emit('nile-changed', event.detail);\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-date-picker.js","sourceRoot":"","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QASwB,UAAK,GAAG,KAAK,CAAC;QAEgB,kBAAa,GACtE,KAAK,CAAC;QAEkD,iBAAY,GAAG,KAAK,CAAC;QAI/E,uBAAkB,GAAQ,EAAE,CAAC;IA6C/B,CAAC;IA9DC;;;OAGG;IACI,MAAM,KAAK,MAAM;QAC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,KAAK,CAAC,eAAe,CAAC;gDAAwB;AAvBpC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA+D1B;SA/DY,cAAc;AAiE3B,eAAe,cAAc,CAAC","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, query } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport NileElement from '../internal/nile-element';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\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 @property({ type: Boolean }) range = false;\n\n @property({ type: Boolean, attribute: 'hide-time-input' }) hideTimeInput =\n false;\n\n @property({ type: Boolean ,attribute: 'hide-time-zone' }) hideTimeZone = false;\n\n @property() value: any;\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: any = [];\n\n @property({ attribute: 'allowed-dates' })\n allowedDates: any ;\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n \n return html`\n <nile-dropdown .hoist=\"${true}\" distance=\"6\">\n <slot slot=\"trigger\" part=\"trigger\" name=\"trigger\"></slot>\n <nile-calendar\n value=\"${this.value}\"\n .range=\"${this.range}\"\n @nile-changed=\"${this.handleChanged}\"\n allowed-dates=\"${this.allowedDates}\"\n .hideTimeInput=\"${this.hideTimeInput}\"\n .hideDurationFields=\"${this.hideDurationFields}\"\n .hideTimeZone=\"${this.hideTimeZone}\"\n ></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n handleChanged(event: any) {\n this.emit('nile-changed', event.detail);\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"]}
@@ -28,6 +28,12 @@ export declare class NilePopover extends LitElement {
28
28
  title: string;
29
29
  private isShow;
30
30
  arrowPlacement: 'start' | 'end' | 'center' | 'anchor';
31
+ /**
32
+ * Enable this option to prevent the panel from being clipped when the component is placed inside a container with
33
+ * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.
34
+ */
35
+ hoist: boolean;
36
+ flip: boolean;
31
37
  /**
32
38
  * Render method
33
39
  * @slot This is a slot test
@@ -28,8 +28,20 @@ let NilePopover = class NilePopover extends LitElement {
28
28
  this.title = '';
29
29
  this.isShow = false;
30
30
  this.arrowPlacement = 'anchor';
31
+ /**
32
+ * Enable this option to prevent the panel from being clipped when the component is placed inside a container with
33
+ * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.
34
+ */
35
+ this.hoist = false;
36
+ this.flip = false;
31
37
  this.handleClick = () => {
32
38
  this.isShow = !this.isShow;
39
+ const allPopovers = document.querySelectorAll('nile-popover');
40
+ allPopovers.forEach(popover => {
41
+ if (popover !== this) {
42
+ popover.isShow = false;
43
+ }
44
+ });
33
45
  };
34
46
  this.handleDocumentClick = () => {
35
47
  if (this.isShow) {
@@ -68,8 +80,9 @@ let NilePopover = class NilePopover extends LitElement {
68
80
  placement="${this.placement}"
69
81
  @click=${(e) => e.stopPropagation()}
70
82
  arrowPlacement="${this.arrowPlacement}"
71
- flip
83
+ .flip="${this.flip}"
72
84
  shift
85
+ strategy=${this.hoist ? 'fixed' : 'absolute'}
73
86
  >
74
87
  <slot
75
88
  slot="anchor"
@@ -83,7 +96,7 @@ let NilePopover = class NilePopover extends LitElement {
83
96
  class="popover__box"
84
97
  >
85
98
  <slot name="title" class="popover__title">${this.title}</slot>
86
- <slot></slot>
99
+ <slot part="base"></slot>
87
100
  <slot name="action" class="popover__action"> </slot>
88
101
  </div>`
89
102
  : html ``}
@@ -106,6 +119,12 @@ __decorate([
106
119
  __decorate([
107
120
  property({ attribute: 'arrow-placement' })
108
121
  ], NilePopover.prototype, "arrowPlacement", void 0);
122
+ __decorate([
123
+ property({ type: Boolean })
124
+ ], NilePopover.prototype, "hoist", void 0);
125
+ __decorate([
126
+ property({ type: Boolean })
127
+ ], NilePopover.prototype, "flip", void 0);
109
128
  NilePopover = __decorate([
110
129
  customElement('nile-popover')
111
130
  ], NilePopover);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-popover.js","sourceRoot":"","sources":["../../../src/nile-popover/nile-popover.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C;;;;;GAKG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QASL;;;WAGG;QACS,cAAS,GAYJ,KAAK,CAAC;QAEvB,oFAAoF;QACxD,aAAQ,GAAG,EAAE,CAAC;QAE1C,qCAAqC;QACT,UAAK,GAAG,EAAE,CAAC;QAEtB,WAAM,GAAG,KAAK,CAAC;QAEY,mBAAc,GAI3C,QAAQ,CAAC;QAqBhB,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC,CAAC;QAEM,wBAAmB,GAAG,GAAG,EAAE;YACjC,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,C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,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;mDAInB;AAvCb,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAuGvB;SAvGY,WAAW;AAyGxB,eAAe,WAAW,CAAC","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-popover.css';\nimport type NilePopup from '../nile-popup/nile-popup';\nimport { string } from '../nile-icon/icons/svg';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popover\n *\n */\n@customElement('nile-popover')\nexport class NilePopover extends LitElement {\n /**\n * The styles for Popover\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 /**\n * The preferred placement of the popover. Note that the actual placement may vary as needed to keep the tooltip\n * inside of the viewport.\n */\n @property() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /** The distance in pixels from which to offset the popover away from its target. */\n @property({ type: Number }) distance = 18;\n\n /** Gives the title to the popover */\n @property({ type: String }) title = '';\n\n @state() private isShow = false;\n\n @property({ attribute: 'arrow-placement' }) arrowPlacement:\n | 'start'\n | 'end'\n | 'center'\n | 'anchor' = 'anchor';\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n connectedCallback() {\n super.connectedCallback();\n document.addEventListener('click', this.handleDocumentClick);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('click', this.handleDocumentClick);\n }\n\n private handleClick = () => {\n this.isShow = !this.isShow;\n };\n\n private handleDocumentClick = () => {\n if (this.isShow) {\n this.isShow = !this.isShow;\n }\n };\n\n public render(): TemplateResult {\n return html`\n <nile-popup\n active\n ?arrow=\"${this.title ? this.isShow : false}\"\n distance=\"${this.distance}\"\n placement=\"${this.placement}\"\n @click=${(e: Event) => e.stopPropagation()}\n arrowPlacement=\"${this.arrowPlacement}\"\n flip\n shift\n >\n <slot\n slot=\"anchor\"\n name=\"anchor\"\n aria-describedby=\"tooltip\"\n @click=${this.handleClick}\n ></slot>\n ${this.title && this.isShow\n ? html` <div\n part=\"popover\"\n class=\"popover__box\"\n >\n <slot name=\"title\" class=\"popover__title\">${this.title}</slot>\n <slot></slot>\n <slot name=\"action\" class=\"popover__action\"> </slot>\n </div>`\n : html``}\n </nile-popup>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NilePopover;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popover': NilePopover;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-popover.js","sourceRoot":"","sources":["../../../src/nile-popover/nile-popover.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C;;;;;GAKG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QASL;;;WAGG;QACS,cAAS,GAYJ,KAAK,CAAC;QAEvB,oFAAoF;QACxD,aAAQ,GAAG,EAAE,CAAC;QAE1C,qCAAqC;QACT,UAAK,GAAG,EAAE,CAAC;QAEtB,WAAM,GAAG,KAAK,CAAC;QAEY,mBAAc,GAI3C,QAAQ,CAAC;QAGxB;;;WAGG;QAC0B,UAAK,GAAG,KAAK,CAAC;QAEd,SAAI,GAAG,KAAK,CAAC;QAsBlC,gBAAW,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,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU;;;;;;mBAMjC,IAAI,CAAC,WAAW;;UAEzB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM;YACzB,CAAC,CAAC,IAAI,CAAA;;;;0DAI0C,IAAI,CAAC,KAAK;;;mBAGjD;YACT,CAAC,CAAC,IAAI,CAAA,EAAE;;KAEb,CAAC;IACJ,CAAC;CAGF,CAAA;AA5Ga;IAAX,QAAQ,EAAE;8CAYY;AAGK;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAe;AAGd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAY;AAE9B;IAAR,KAAK,EAAE;2CAAwB;AAEY;IAA3C,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;mDAInB;AAOK;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAAe;AAEd;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCAAc;AAhD/B,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAyHvB;SAzHY,WAAW;AA2HxB,eAAe,WAAW,CAAC","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-popover.css';\nimport type NilePopup from '../nile-popup/nile-popup';\nimport { string } from '../nile-icon/icons/svg';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popover\n *\n */\n@customElement('nile-popover')\nexport class NilePopover extends LitElement {\n /**\n * The styles for Popover\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 /**\n * The preferred placement of the popover. Note that the actual placement may vary as needed to keep the tooltip\n * inside of the viewport.\n */\n @property() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /** The distance in pixels from which to offset the popover away from its target. */\n @property({ type: Number }) distance = 18;\n\n /** Gives the title to the popover */\n @property({ type: String }) title = '';\n\n @state() private isShow = false;\n\n @property({ attribute: 'arrow-placement' }) arrowPlacement:\n | 'start'\n | 'end'\n | 'center'\n | 'anchor' = 'anchor';\n\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n */\n @property({ type: Boolean }) hoist = false;\n\n @property({ type: Boolean }) flip = false;\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n connectedCallback() {\n super.connectedCallback();\n document.addEventListener('click', this.handleDocumentClick);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('click', this.handleDocumentClick);\n }\n\n private handleClick = () => {\n this.isShow = !this.isShow;\n const allPopovers = document.querySelectorAll('nile-popover');\n \n allPopovers.forEach(popover => {\n if (popover !== this) {\n popover.isShow=false;\n }\n });\n };\n\n private handleDocumentClick = () => {\n if (this.isShow) {\n this.isShow = !this.isShow;\n }\n };\n\n public render(): TemplateResult {\n return html`\n <nile-popup\n active\n ?arrow=\"${this.title ? this.isShow : false}\"\n distance=\"${this.distance}\"\n placement=\"${this.placement}\"\n @click=${(e: Event) => e.stopPropagation()}\n arrowPlacement=\"${this.arrowPlacement}\"\n .flip=\"${this.flip}\"\n shift\n strategy=${this.hoist ? 'fixed' : 'absolute'}\n >\n <slot\n slot=\"anchor\"\n name=\"anchor\"\n aria-describedby=\"tooltip\"\n @click=${this.handleClick}\n ></slot>\n ${this.title && this.isShow\n ? html` <div\n part=\"popover\"\n class=\"popover__box\"\n >\n <slot name=\"title\" class=\"popover__title\">${this.title}</slot>\n <slot part=\"base\"></slot>\n <slot name=\"action\" class=\"popover__action\"> </slot>\n </div>`\n : html``}\n </nile-popup>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NilePopover;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popover': NilePopover;\n }\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Copyright Aquera Inc 2023
3
- *
4
- * This source code is licensed under the BSD-3-Clause license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
7
  /**
8
8
  * Select_2 CSS
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Copyright Aquera Inc 2023
3
- *
4
- * This source code is licensed under the BSD-3-Clause license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
7
  import { css } from 'lit-element';
8
8
  /**
9
9
  * Select_2 CSS
@@ -449,6 +449,10 @@ export const styles = css `
449
449
  .select__prefix--from-options {
450
450
  margin-inline-end: 12px;
451
451
  }
452
+
453
+ .select__hide-default{
454
+ display: none;
455
+ }
452
456
  `;
453
457
  export default [styles];
454
458
  //# sourceMappingURL=nile-select.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-select.css.js","sourceRoot":"","sources":["../../../src/nile-select/nile-select.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAybxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 * Select_2 CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: 12px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 14px;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: inherit;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: #666666;\n margin-top: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif);\n font-weight: 400;\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: #333333;\n cursor: inherit;\n overflow: hidden;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif);\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif);\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: #333333;\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: no-wrap;\n margin-inline-start: 0.5rem;\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: #005ea6;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n margin: 6px;\n }\n\n .select__tags-count-clearable {\n margin-right: 50px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: #ffffff;\n border: solid 1px #cccccc;\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid #000;\n background: #fff;\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: #f4f4f4;\n border-color: #cccccc;\n color: #999999;\n opacity: 0.5;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .select--error .select__combobox {\n border-color: #e5434d;\n }\n\n .select--success {\n border-color: #43e5c0;\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: #f4f4f4;\n color: #333333;\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: #f4f4f4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: 4px;\n font-size: 14px;\n padding: 12px;\n height: 38px;\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: 0;\n }\n\n .select--medium .select__tags {\n gap: 3px;\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: 2.5rem;\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: #005ea6;\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: #999999;\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: 0.25rem;\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 400;\n background: #ffffff;\n border: solid 1px #cccccc;\n border-radius: 0.25rem;\n padding-block: 0;\n padding-inline: 0;\n overflow: auto;\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n }\n\n .select__options__search-enabled {\n padding-top: 10px;\n }\n\n .select__options {\n font-size: 14px;\n color: rgb(133, 129, 129);\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: 0.25rem;\n }\n\n .select__listbox::slotted(small) {\n font-size: 0.875rem;\n font-weight: 600;\n color: #888888;\n padding-block: 0.25rem;\n padding-inline: 1rem;\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: 8px;\n background-color: white;\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: #fafafa;\n border: 1px solid #e5e9eb;\n display: flex;\n height: 15px;\n /* Auto layout */\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 8px 12px 16px;\n gap: 12px;\n justify-content: space-between;\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: 20px;\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: 10px;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible{\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: 12px;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-select.css.js","sourceRoot":"","sources":["../../../src/nile-select/nile-select.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6bxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 * Select_2 CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: 12px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 14px;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: inherit;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: #666666;\n margin-top: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif);\n font-weight: 400;\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: #333333;\n cursor: inherit;\n overflow: hidden;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif);\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif);\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: #333333;\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: no-wrap;\n margin-inline-start: 0.5rem;\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: #005ea6;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n margin: 6px;\n }\n\n .select__tags-count-clearable {\n margin-right: 50px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: #ffffff;\n border: solid 1px #cccccc;\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid #000;\n background: #fff;\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: #f4f4f4;\n border-color: #cccccc;\n color: #999999;\n opacity: 0.5;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .select--error .select__combobox {\n border-color: #e5434d;\n }\n\n .select--success {\n border-color: #43e5c0;\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: #f4f4f4;\n color: #333333;\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: #f4f4f4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: 4px;\n font-size: 14px;\n padding: 12px;\n height: 38px;\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: 0;\n }\n\n .select--medium .select__tags {\n gap: 3px;\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: 2.5rem;\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: #005ea6;\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: #999999;\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: 0.25rem;\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 400;\n background: #ffffff;\n border: solid 1px #cccccc;\n border-radius: 0.25rem;\n padding-block: 0;\n padding-inline: 0;\n overflow: auto;\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n }\n\n .select__options__search-enabled {\n padding-top: 10px;\n }\n\n .select__options {\n font-size: 14px;\n color: rgb(133, 129, 129);\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: 0.25rem;\n }\n\n .select__listbox::slotted(small) {\n font-size: 0.875rem;\n font-weight: 600;\n color: #888888;\n padding-block: 0.25rem;\n padding-inline: 1rem;\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: 8px;\n background-color: white;\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: #fafafa;\n border: 1px solid #e5e9eb;\n display: flex;\n height: 15px;\n /* Auto layout */\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 8px 12px 16px;\n gap: 12px;\n justify-content: space-between;\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: 20px;\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: 10px;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible{\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: 12px;\n }\n \n .select__hide-default{\n display: none;\n }\n`;\n\nexport default [styles];\n"]}
@@ -792,13 +792,16 @@ let NileSelect = class NileSelect extends NileElement {
792
792
  const hasLabelSlot = this.hasSlotController.test('label');
793
793
  const hasHelpTextSlot = this.hasSlotController.test('help-text');
794
794
  const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');
795
+ const hasCustomSelect = this.hasSlotController.test('custom-select');
795
796
  const hasLabel = this.label ? true : !!hasLabelSlot;
796
797
  const hasClearIcon = this.clearable && !this.disabled && this.value.length > 0;
797
798
  const isPlaceholderVisible = this.placeholder && this.value.length === 0;
798
799
  const searchValue = this.searchValue || '';
799
800
  const hasHelpText = this.helpText ? true : false;
800
801
  const hasErrorMessage = this.errorMessage ? true : false;
801
- const prefixContent = this.selectedOptions[0] ? this.getOptionPrefix(this.selectedOptions[0]) : '';
802
+ const prefixContent = this.selectedOptions[0]
803
+ ? this.getOptionPrefix(this.selectedOptions[0])
804
+ : '';
802
805
  return html `
803
806
  <div
804
807
  part="form-control"
@@ -853,14 +856,25 @@ let NileSelect = class NileSelect extends NileElement {
853
856
  auto-size="vertical"
854
857
  auto-size-padding="10"
855
858
  >
859
+ ${hasCustomSelect
860
+ ? html `<slot
861
+ slot="anchor"
862
+ name="custom-select"
863
+ class="custom-select"
864
+ @keydown=${this.handleComboboxKeyDown}
865
+ @mousedown=${this.handleComboboxMouseDown}
866
+ ></slot>`
867
+ : html ``}
856
868
  <div
857
869
  part="combobox"
858
- class="select__combobox"
870
+ class=${classMap({
871
+ select__combobox: true,
872
+ 'select__hide-default': hasCustomSelect,
873
+ })}
859
874
  slot="anchor"
860
875
  @keydown=${this.handleComboboxKeyDown}
861
876
  @mousedown=${this.handleComboboxMouseDown}
862
877
  >
863
-
864
878
  ${prefixContent && !this.multiple
865
879
  ? html `<div class="select__prefix--from-options">
866
880
  ${unsafeHTML(prefixContent)}