@beeq/core 1.10.0-beta.4 → 1.10.0-beta.5

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 (89) hide show
  1. package/dist/beeq/beeq.esm.js +1 -1
  2. package/dist/beeq/bq-button.bq-icon.entry.esm.js.map +1 -1
  3. package/dist/beeq/bq-date-picker.entry.esm.js.map +1 -1
  4. package/dist/beeq/bq-option-group.entry.esm.js.map +1 -1
  5. package/dist/beeq/bq-option-list.bq-tag.entry.esm.js.map +1 -1
  6. package/dist/beeq/bq-page-title.entry.esm.js.map +1 -1
  7. package/dist/beeq/{p-74daa290.entry.js → p-126b0e1a.entry.js} +2 -2
  8. package/dist/beeq/p-126b0e1a.entry.js.map +1 -0
  9. package/dist/beeq/{p-4a29e2d0.entry.js → p-146fa7e8.entry.js} +2 -2
  10. package/dist/beeq/{p-4a29e2d0.entry.js.map → p-146fa7e8.entry.js.map} +1 -1
  11. package/dist/beeq/p-2e94c104.entry.js +6 -0
  12. package/dist/beeq/{p-9573c018.entry.js.map → p-2e94c104.entry.js.map} +1 -1
  13. package/dist/beeq/{p-a1ad0e09.entry.js → p-49e6f079.entry.js} +2 -2
  14. package/dist/beeq/{p-a1ad0e09.entry.js.map → p-49e6f079.entry.js.map} +1 -1
  15. package/dist/beeq/{p-1cd5bf89.entry.js → p-b99ea02f.entry.js} +2 -2
  16. package/dist/beeq/p-b99ea02f.entry.js.map +1 -0
  17. package/dist/beeq/{p-ad869f7e.entry.js → p-dbe8b775.entry.js} +2 -2
  18. package/dist/beeq.html-custom-data.json +462 -462
  19. package/dist/cjs/bq-button.bq-icon.entry.cjs.js.map +1 -1
  20. package/dist/cjs/bq-button_2.cjs.entry.js +5 -5
  21. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/bq-date-picker.cjs.entry.js +54 -41
  23. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  24. package/dist/cjs/bq-date-picker.entry.cjs.js.map +1 -1
  25. package/dist/cjs/bq-option-group.cjs.entry.js +1 -1
  26. package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -1
  27. package/dist/cjs/bq-option-group.entry.cjs.js.map +1 -1
  28. package/dist/cjs/bq-option-list.bq-tag.entry.cjs.js.map +1 -1
  29. package/dist/cjs/bq-option-list_2.cjs.entry.js +2 -2
  30. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  31. package/dist/cjs/bq-page-title.cjs.entry.js +1 -1
  32. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  33. package/dist/cjs/bq-page-title.entry.cjs.js.map +1 -1
  34. package/dist/cjs/bq-side-menu-item.cjs.entry.js +1 -1
  35. package/dist/collection/components/button/bq-button.js +8 -8
  36. package/dist/collection/components/button/bq-button.js.map +1 -1
  37. package/dist/collection/components/date-picker/bq-date-picker.js +53 -40
  38. package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
  39. package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
  40. package/dist/components/bq-alert.js +1 -1
  41. package/dist/components/bq-button.js +1 -1
  42. package/dist/components/bq-date-picker.js +1 -1
  43. package/dist/components/bq-date-picker.js.map +1 -1
  44. package/dist/components/bq-dialog.js +1 -1
  45. package/dist/components/bq-drawer.js +1 -1
  46. package/dist/components/bq-dropdown.js +1 -1
  47. package/dist/components/bq-input.js +1 -1
  48. package/dist/components/bq-notification.js +1 -1
  49. package/dist/components/bq-option-group.js +1 -1
  50. package/dist/components/bq-option-group.js.map +1 -1
  51. package/dist/components/bq-page-title.js +1 -1
  52. package/dist/components/bq-page-title.js.map +1 -1
  53. package/dist/components/bq-panel.js +1 -1
  54. package/dist/components/bq-select.js +1 -1
  55. package/dist/components/bq-side-menu-item.js +1 -1
  56. package/dist/components/bq-tag.js +1 -1
  57. package/dist/components/index.js +1 -1
  58. package/dist/components/{p-BUpGMEPS.js → p-3kuGtVv3.js} +2 -2
  59. package/dist/components/{p-DWg_PDHj.js → p-CB5lnB31.js} +2 -2
  60. package/dist/components/{p-DWg_PDHj.js.map → p-CB5lnB31.js.map} +1 -1
  61. package/dist/components/{p-BmdGoExW.js → p-YV07eeSP.js} +2 -2
  62. package/dist/components/{p-BmdGoExW.js.map → p-YV07eeSP.js.map} +1 -1
  63. package/dist/components/{p-DdRiQ0rm.js → p-ibgfh-jN.js} +2 -2
  64. package/dist/custom-elements.json +5742 -5719
  65. package/dist/esm/bq-button.bq-icon.entry.js.map +1 -1
  66. package/dist/esm/bq-button_2.entry.js +5 -5
  67. package/dist/esm/bq-button_2.entry.js.map +1 -1
  68. package/dist/esm/bq-date-picker.entry.js +54 -41
  69. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  70. package/dist/esm/bq-option-group.entry.js +1 -1
  71. package/dist/esm/bq-option-group.entry.js.map +1 -1
  72. package/dist/esm/bq-option-list.bq-tag.entry.js.map +1 -1
  73. package/dist/esm/bq-option-list_2.entry.js +2 -2
  74. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  75. package/dist/esm/bq-page-title.entry.js +1 -1
  76. package/dist/esm/bq-page-title.entry.js.map +1 -1
  77. package/dist/esm/bq-side-menu-item.entry.js +1 -1
  78. package/dist/hydrate/index.js +59 -46
  79. package/dist/hydrate/index.mjs +59 -46
  80. package/dist/types/components/button/bq-button.d.ts +3 -3
  81. package/dist/types/components/date-picker/bq-date-picker.d.ts +4 -2
  82. package/dist/types/components.d.ts +3 -3
  83. package/package.json +1 -1
  84. package/dist/beeq/p-1cd5bf89.entry.js.map +0 -1
  85. package/dist/beeq/p-74daa290.entry.js.map +0 -1
  86. package/dist/beeq/p-9573c018.entry.js +0 -6
  87. /package/dist/beeq/{p-ad869f7e.entry.js.map → p-dbe8b775.entry.js.map} +0 -0
  88. /package/dist/components/{p-BUpGMEPS.js.map → p-3kuGtVv3.js.map} +0 -0
  89. /package/dist/components/{p-DdRiQ0rm.js.map → p-ibgfh-jN.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":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AO;oBACzC,8DAAQ,CACH;gBACP,6DAAM,KAAK,EAAC,mBAAmB,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAC,QAAQ;oBAC5F,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD;gBACN,IAAI,CAAC,OAAO,IAAI,gEAAS,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,aAAa,GAAG,CACjE,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, h, Host, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { BUTTON_APPEARANCE, BUTTON_SIZE, BUTTON_TYPE, BUTTON_VARIANT } from './bq-button.types';\nimport type {\n TButtonAppearance,\n TButtonBorderRadius,\n TButtonSize,\n TButtonType,\n TButtonVariant,\n} from './bq-button.types';\nimport { hasSlotContent, isClient, isDefined, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * Buttons are designed for users to take action on a page or a screen.\n *\n * @example How to use it\n * ```html\n * <bq-button appearance=\"primary\" border=\"m\" size=\"medium\">\n * <bq-icon name=\"arrow-circle-left\" slot=\"prefix\"></bq-icon>\n * Go back\n * </bq-button>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/286b43-buttons\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"primary\" | \"secondary\" | \"link\" | \"text\"} appearance - The appearance style to apply to the button\n * @attr {boolean} block - If `true`, it will make the button fit to its parent width.\n * @attr {string} border - The corner radius of the button\n * @attr {boolean} disabled - If `true`, the button will be disabled (no interaction allowed)\n * @attr {string} download - Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * @attr {string} href - When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`\n * @attr {\"left\" | \"center\" | \"right\"} justify-content - It determinate how the content should be aligned\n * @attr {boolean} loading - If `true` it will display the button in a loading state\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the button\n * @attr {\"_blank\" | \"_parent\" | \"_self\" | \"_top\"} target - Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * @attr {\"button\" | \"submit\" | \"reset\"} type - The default behavior of the button\n * @attr {\"standard\" | \"ghost\" | \"danger\"} variant - The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`)\n *\n * @event bqBlur - Handler to be called when the button loses focus\n * @event bqFocus - Handler to be called when button gets focus\n * @event bqClick - Handler to be called when the button is clicked\n *\n * @slot prefix - The prefix content to be displayed before the button label\n * @slot - The button label content\n * @slot suffix - The suffix content to be displayed after the button label\n *\n * @part button - The `<a>` or `<button>` HTML element used under the hood.\n * @part prefix - The `<span>` tag element that acts as prefix container.\n * @part label - The `<span>` tag element that renders the text of the button.\n * @part suffix - The `<span>` tag element that acts as suffix container.\n *\n * @cssprop --bq-button--border-color - Button border color\n * @cssprop --bq-button--border-radius - Button border radius\n * @cssprop --bq-button--border-style - Button border style\n * @cssprop --bq-button--border-width - Button border width\n * @cssprop --bq-button--small-height - Button small height\n * @cssprop --bq-button--small-paddingX - Button small padding block (top and bottom)\n * @cssprop --bq-button--small-paddingY - Button small padding inline (left and right)\n * @cssprop --bq-button--small-font-size - Button small font size\n * @cssprop --bq-button--medium-height - Button medium height\n * @cssprop --bq-button--medium-paddingX - Button medium padding block (top and bottom)\n * @cssprop --bq-button--medium-paddingY - Button medium padding inline (left and right)\n * @cssprop --bq-button--medium-font-size - Button medium font size\n * @cssprop --bq-button--large-height - Button large height\n * @cssprop --bq-button--large-paddingX - Button large padding block (top and bottom)\n * @cssprop --bq-button--large-paddingY - Button large padding inline (left and right)\n * @cssprop --bq-button--large-font-size - Button large font size\n */\n@Component({\n tag: 'bq-button',\n styleUrl: './scss/bq-button.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqButton {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqButtonElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n\n // Public Property API\n // ========================\n\n /** The appearance style to apply to the button */\n @Prop({ reflect: true }) appearance: TButtonAppearance = 'primary';\n\n /** If `true`, it will make the button fit to its parent width. */\n @Prop({ reflect: true }) block: boolean = false;\n\n /** The corner radius of the button */\n @Prop({ reflect: true }) border: TButtonBorderRadius = 'm';\n\n /** If true, the button will be disabled (no interaction allowed) */\n @Prop() disabled = false;\n\n /**\n * Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n */\n @Prop() download?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */\n @Prop({ reflect: true }) href: string;\n\n /** It determinate how the content should be aligned */\n @Prop({ reflect: true }) justifyContent: 'left' | 'center' | 'right' = 'center';\n\n /** If `true` it will display the button in a loading state */\n @Prop() loading = false;\n\n /** The size of the button */\n @Prop({ reflect: true }) size: TButtonSize = 'medium';\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** The default behavior of the button */\n @Prop({ reflect: true }) type: TButtonType = 'button';\n\n /** The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`) */\n @Prop({ reflect: true }) variant: TButtonVariant = 'standard';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('appearance')\n @Watch('type')\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(BUTTON_APPEARANCE, 'primary', this.el, 'appearance');\n validatePropValue(BUTTON_TYPE, 'button', this.el, 'type');\n validatePropValue(BUTTON_SIZE, 'medium', this.el, 'size');\n validatePropValue(BUTTON_VARIANT, 'standard', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqButtonElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleClick = (ev: Event) => {\n const { disabled, loading, bqClick, el } = this;\n\n if (disabled || loading) {\n this.preventEvent(ev);\n return;\n }\n\n const bqClickEvent = bqClick.emit(el);\n if (bqClickEvent.defaultPrevented) {\n this.preventEvent(ev);\n return;\n }\n\n this.handleFormAction();\n };\n\n private handleFormAction() {\n const {\n type,\n internals: { form },\n } = this;\n if (isNil(form)) return;\n\n const formAction = this.formActions(form)[type];\n if (isNil(formAction)) return;\n\n formAction();\n }\n\n private formActions = (form: HTMLFormElement) => ({\n submit: () => this.submitAssociatedForm(form),\n reset: () => form.reset(),\n });\n\n private submitAssociatedForm = (form: HTMLFormElement) => {\n if (!isClient() || isNil(form)) return;\n\n const btn = document.createElement('button');\n btn.type = this.type;\n btn.hidden = true;\n form.append(btn);\n\n btn.click();\n btn.remove();\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private preventEvent(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n const style = {\n ...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host style={style}>\n <TagElem\n class={{\n 'bq-button': true,\n [`bq-button--${this.appearance}`]: true,\n [`content-${this.justifyContent}`]: true,\n [`${this.variant}`]: true,\n [`${this.size}`]: true,\n block: this.block,\n disabled: this.disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n loading: this.loading,\n }}\n aria-disabled={this.disabled ? 'true' : 'false'}\n disabled={this.disabled}\n download={isLink ? this.download : undefined}\n href={isLink ? this.href : undefined}\n part=\"button\"\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n type={this.type}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n >\n <span class=\"bq-button__prefix\" ref={(spanElem) => (this.prefixElem = spanElem)} part=\"prefix\">\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-button__label\" part=\"label\">\n <slot />\n </span>\n <span class=\"bq-button__suffix\" ref={(spanElem) => (this.suffixElem = spanElem)} part=\"suffix\">\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n {this.loading && <bq-icon class=\"bq-button__loader\" name=\"spinner-gap\" />}\n </TagElem>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-button.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/button/bq-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGxG,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQhG,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AASH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,UAAU,CAAc;IACxB,UAAU,CAAc;IAEhC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IACjB,SAAS,CAAoB;IAEhD,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEzB,SAAS,GAAG,KAAK,CAAC;IAClB,SAAS,GAAG,KAAK,CAAC;IAEnC,sBAAsB;IACtB,2BAA2B;IAE3B,kDAAkD;IACzB,UAAU,GAAsB,SAAS,CAAC;IAEnE,kEAAkE;IACzC,KAAK,GAAY,KAAK,CAAC;IAEhD,sCAAsC;IACb,MAAM,GAAwB,GAAG,CAAC;IAE3D,oEAAoE;IAC5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,KAAK,EAAC,mBAAmB,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAC,QAAQ;oBAC5F,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD;gBACP,6DAAM,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAC,OAAO;oBACzC,8DAAQ,CACH;gBACP,6DAAM,KAAK,EAAC,mBAAmB,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAC,QAAQ;oBAC5F,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD;gBACN,IAAI,CAAC,OAAO,IAAI,gEAAS,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,aAAa,GAAG,CACjE,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, h, Host, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { BUTTON_APPEARANCE, BUTTON_SIZE, BUTTON_TYPE, BUTTON_VARIANT } from './bq-button.types';\nimport type {\n TButtonAppearance,\n TButtonBorderRadius,\n TButtonSize,\n TButtonType,\n TButtonVariant,\n} from './bq-button.types';\nimport { hasSlotContent, isClient, isDefined, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * Buttons are designed for users to take action on a page or a screen.\n *\n * @example How to use it\n * ```html\n * <bq-button appearance=\"primary\" border=\"m\" size=\"medium\">\n * <bq-icon name=\"arrow-circle-left\" slot=\"prefix\"></bq-icon>\n * Go back\n * </bq-button>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/286b43-buttons\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"primary\" | \"secondary\" | \"link\" | \"text\"} appearance - The appearance style to apply to the button\n * @attr {boolean} block - If `true`, it will make the button fit to its parent width.\n * @attr {string} border - The corner radius of the button\n * @attr {boolean} disabled - If `true`, the button will be disabled (no interaction allowed)\n * @attr {string} download - Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * @attr {string} href - When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`\n * @attr {\"left\" | \"center\" | \"right\"} justify-content - It determinate how the content should be aligned\n * @attr {boolean} loading - If `true` it will display the button in a loading state\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the button\n * @attr {\"_blank\" | \"_parent\" | \"_self\" | \"_top\"} target - Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * @attr {\"button\" | \"submit\" | \"reset\"} type - The default behavior of the button\n * @attr {\"standard\" | \"ghost\" | \"danger\"} variant - The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`)\n *\n * @event bqBlur - Handler to be called when the button loses focus\n * @event bqFocus - Handler to be called when button gets focus\n * @event bqClick - Handler to be called when the button is clicked\n *\n * @slot prefix - The prefix content to be displayed before the button label\n * @slot - The button label content\n * @slot suffix - The suffix content to be displayed after the button label\n *\n * @part button - The `<a>` or `<button>` HTML element used under the hood.\n * @part prefix - The `<span>` tag element that acts as prefix container.\n * @part label - The `<span>` tag element that renders the text of the button.\n * @part suffix - The `<span>` tag element that acts as suffix container.\n *\n * @cssprop --bq-button--border-color - Button border color\n * @cssprop --bq-button--border-radius - Button border radius\n * @cssprop --bq-button--border-style - Button border style\n * @cssprop --bq-button--border-width - Button border width\n * @cssprop --bq-button--small-height - Button small height\n * @cssprop --bq-button--small-paddingX - Button small padding block (top and bottom)\n * @cssprop --bq-button--small-paddingY - Button small padding inline (left and right)\n * @cssprop --bq-button--small-font-size - Button small font size\n * @cssprop --bq-button--medium-height - Button medium height\n * @cssprop --bq-button--medium-paddingX - Button medium padding block (top and bottom)\n * @cssprop --bq-button--medium-paddingY - Button medium padding inline (left and right)\n * @cssprop --bq-button--medium-font-size - Button medium font size\n * @cssprop --bq-button--large-height - Button large height\n * @cssprop --bq-button--large-paddingX - Button large padding block (top and bottom)\n * @cssprop --bq-button--large-paddingY - Button large padding inline (left and right)\n * @cssprop --bq-button--large-font-size - Button large font size\n */\n@Component({\n tag: 'bq-button',\n styleUrl: './scss/bq-button.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqButton {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqButtonElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n\n // Public Property API\n // ========================\n\n /** The appearance style to apply to the button */\n @Prop({ reflect: true }) appearance: TButtonAppearance = 'primary';\n\n /** If `true`, it will make the button fit to its parent width. */\n @Prop({ reflect: true }) block: boolean = false;\n\n /** The corner radius of the button */\n @Prop({ reflect: true }) border: TButtonBorderRadius = 'm';\n\n /** If true, the button will be disabled (no interaction allowed) */\n @Prop() disabled = false;\n\n /**\n * Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n */\n @Prop() download?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */\n @Prop({ reflect: true }) href: string;\n\n /** It determinate how the content should be aligned */\n @Prop({ reflect: true }) justifyContent: 'left' | 'center' | 'right' = 'center';\n\n /** If `true` it will display the button in a loading state */\n @Prop() loading = false;\n\n /** The size of the button */\n @Prop({ reflect: true }) size: TButtonSize = 'medium';\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** The default behavior of the button */\n @Prop({ reflect: true }) type: TButtonType = 'button';\n\n /** The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`) */\n @Prop({ reflect: true }) variant: TButtonVariant = 'standard';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('appearance')\n @Watch('type')\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(BUTTON_APPEARANCE, 'primary', this.el, 'appearance');\n validatePropValue(BUTTON_TYPE, 'button', this.el, 'type');\n validatePropValue(BUTTON_SIZE, 'medium', this.el, 'size');\n validatePropValue(BUTTON_VARIANT, 'standard', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus. */\n @Event() bqBlur: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button gets focus. */\n @Event() bqFocus: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button is clicked. */\n @Event() bqClick: EventEmitter<HTMLBqButtonElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleClick = (ev: Event) => {\n const { disabled, loading, bqClick, el } = this;\n\n if (disabled || loading) {\n this.preventEvent(ev);\n return;\n }\n\n const bqClickEvent = bqClick.emit(el);\n if (bqClickEvent.defaultPrevented) {\n this.preventEvent(ev);\n return;\n }\n\n this.handleFormAction();\n };\n\n private handleFormAction() {\n const {\n type,\n internals: { form },\n } = this;\n if (isNil(form)) return;\n\n const formAction = this.formActions(form)[type];\n if (isNil(formAction)) return;\n\n formAction();\n }\n\n private formActions = (form: HTMLFormElement) => ({\n submit: () => this.submitAssociatedForm(form),\n reset: () => form.reset(),\n });\n\n private submitAssociatedForm = (form: HTMLFormElement) => {\n if (!isClient() || isNil(form)) return;\n\n const btn = document.createElement('button');\n btn.type = this.type;\n btn.hidden = true;\n form.append(btn);\n\n btn.click();\n btn.remove();\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private preventEvent(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n const style = {\n ...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host style={style}>\n <TagElem\n class={{\n 'bq-button': true,\n [`bq-button--${this.appearance}`]: true,\n [`content-${this.justifyContent}`]: true,\n [`${this.variant}`]: true,\n [`${this.size}`]: true,\n block: this.block,\n disabled: this.disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n loading: this.loading,\n }}\n aria-disabled={this.disabled ? 'true' : 'false'}\n disabled={this.disabled}\n download={isLink ? this.download : undefined}\n href={isLink ? this.href : undefined}\n part=\"button\"\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n type={this.type}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n >\n <span class=\"bq-button__prefix\" ref={(spanElem) => (this.prefixElem = spanElem)} part=\"prefix\">\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-button__label\" part=\"label\">\n <slot />\n </span>\n <span class=\"bq-button__suffix\" ref={(spanElem) => (this.suffixElem = spanElem)} part=\"suffix\">\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n {this.loading && <bq-icon class=\"bq-button__loader\" name=\"spinner-gap\" />}\n </TagElem>\n </Host>\n );\n }\n}\n"]}
@@ -133,6 +133,7 @@ export class BqDatePicker {
133
133
  // ====================
134
134
  callyElem;
135
135
  inputElem;
136
+ isInternalUpdate = false;
136
137
  labelElem;
137
138
  prefixElem;
138
139
  suffixElem;
@@ -240,18 +241,16 @@ export class BqDatePicker {
240
241
  value;
241
242
  // Prop lifecycle events
242
243
  // =======================
243
- handleValueChange() {
244
- const { formatDisplayValue, internals, isCallyLoaded, value } = this;
244
+ handleValueChange(newValue, oldValue) {
245
+ if (newValue === oldValue)
246
+ return;
247
+ const { formatDisplayValue, internals, isCallyLoaded } = this;
245
248
  if (!isCallyLoaded)
246
249
  return;
247
- internals.setFormValue(!isNil(value) ? `${value}` : undefined);
250
+ internals.setFormValue(!isNil(newValue) ? `${newValue}` : undefined);
248
251
  this.updateFormValidity();
249
- if (Array.isArray(value)) {
250
- this.hasValue = value.some((val) => val.length > 0);
251
- return;
252
- }
253
- this.hasValue = isDefined(value);
254
- this.displayDate = formatDisplayValue(value);
252
+ this.hasValue = isDefined(newValue);
253
+ this.displayDate = formatDisplayValue(newValue);
255
254
  this.setFocusedDate();
256
255
  }
257
256
  checkPropValues() {
@@ -285,9 +284,14 @@ export class BqDatePicker {
285
284
  console.error(error);
286
285
  }
287
286
  }
288
- async componentDidLoad() {
287
+ componentDidLoad() {
289
288
  this.handleSlotChange();
290
- this.handleValueChange();
289
+ this.handleValueChange(this.value, undefined);
290
+ }
291
+ componentDidRender() {
292
+ if (this.isInternalUpdate) {
293
+ this.isInternalUpdate = false;
294
+ }
291
295
  }
292
296
  formAssociatedCallback() {
293
297
  this.updateFormValidity();
@@ -300,10 +304,12 @@ export class BqDatePicker {
300
304
  // Listeners
301
305
  // ==============
302
306
  handleOpenChange(ev) {
303
- if (!ev.composedPath().includes(this.el))
307
+ if (!isEventTargetChildOfElement(ev, this.el))
304
308
  return;
305
- this.open = ev.detail.open;
306
- this.setFocusedDate();
309
+ const { open } = ev.detail;
310
+ if (this.open === open)
311
+ return;
312
+ this.open = open;
307
313
  }
308
314
  handleClickOutside(ev) {
309
315
  const { open, type, hasRangeEnd } = this;
@@ -311,12 +317,8 @@ export class BqDatePicker {
311
317
  return;
312
318
  if (isEventTargetChildOfElement(ev, this.el) || hasRangeEnd)
313
319
  return;
314
- if (isEventTargetChildOfElement(ev, this.el))
315
- return;
316
- if (!hasRangeEnd) {
317
- this.tentative = undefined;
318
- this.hasRangeEnd = false;
319
- }
320
+ this.tentative = undefined;
321
+ this.hasRangeEnd = false;
320
322
  }
321
323
  // Public methods API
322
324
  // These methods are exposed on the host element.
@@ -355,17 +357,20 @@ export class BqDatePicker {
355
357
  const { callyElem, formatFocusedDate, isCallyLoaded, value } = this;
356
358
  if (!(callyElem && isCallyLoaded))
357
359
  return;
358
- // We need to set the focused date in the calendar component via a ref
359
- // because it doesn't work when passed as a prop (the Cally element does not re-render)
360
- this.focusedDate = value ? formatFocusedDate(value) : new Date().toLocaleDateString('fr-CA');
361
- this.callyElem.focusedDate = this.focusedDate;
360
+ const nextFocused = value ? formatFocusedDate(value) : new Date().toLocaleDateString('fr-CA');
361
+ if (this.focusedDate === nextFocused)
362
+ return;
363
+ this.focusedDate = nextFocused;
364
+ if (callyElem.focusedDate !== this.focusedDate) {
365
+ // We need to set the focused date in the calendar component via a ref
366
+ // because it doesn't work when passed as a prop (the Cally element does not re-render)
367
+ callyElem.focusedDate = this.focusedDate;
368
+ }
362
369
  };
363
370
  handleChange = (ev) => {
364
- if (this.disabled)
371
+ if (this.disabled || !isHTMLElement(ev.target, 'input'))
365
372
  return;
366
- if (!isHTMLElement(ev.target, 'input'))
367
- return;
368
- const dateValue = new Date(ev.target.value);
373
+ const dateValue = new Date(ev.target.value + 'T00:00:00');
369
374
  if (!isNaN(dateValue.getTime())) {
370
375
  // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale
371
376
  this.value = dateValue.toLocaleDateString('fr-CA');
@@ -375,18 +380,26 @@ export class BqDatePicker {
375
380
  }
376
381
  };
377
382
  handleCalendarChange = (ev) => {
378
- const { value } = ev.target;
383
+ if (this.isInternalUpdate)
384
+ return;
385
+ const shouldStayOpen = this.type === 'multi';
386
+ const value = ev.target.value;
387
+ if (this.value === value) {
388
+ this.open = shouldStayOpen;
389
+ return;
390
+ }
391
+ this.isInternalUpdate = true;
379
392
  this.value = value;
380
- this.displayDate = this.formatDisplayValue(this.value);
393
+ this.displayDate = this.formatDisplayValue(value);
381
394
  this.inputElem.value = this.displayDate;
382
395
  this.inputElem.focus();
383
- this.internals.setFormValue(`${this.value}`);
396
+ this.internals.setFormValue(value);
384
397
  this.bqChange.emit({ value: this.value, el: this.el });
385
- this.open = this.type === 'multi';
398
+ this.open = shouldStayOpen;
386
399
  };
387
400
  handleCalendarRangeStart = (ev) => {
388
401
  this.hasRangeEnd = false;
389
- this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');
402
+ this.tentative = ev.detail;
390
403
  };
391
404
  handleCalendarRangeEnd = () => {
392
405
  this.hasRangeEnd = true;
@@ -458,14 +471,14 @@ export class BqDatePicker {
458
471
  return undefined;
459
472
  const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);
460
473
  if (this.type === 'range') {
461
- const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));
474
+ const [start, end] = value.split('/').map((dateStr) => new Date(dateStr + 'T00:00:00'));
462
475
  return dateFormatter.formatRange(start, end);
463
476
  }
464
477
  if (this.type === 'multi') {
465
- const dates = value.split(' ').map((dateStr) => new Date(dateStr));
478
+ const dates = value.split(' ').map((dateStr) => new Date(dateStr + 'T00:00:00'));
466
479
  return dates.map((date) => dateFormatter.format(date)).join(', ');
467
480
  }
468
- return dateFormatter.format(new Date(value));
481
+ return dateFormatter.format(new Date(value + 'T00:00:00'));
469
482
  };
470
483
  updateFormValidity = () => {
471
484
  const { formValidationMessage, internals, required, value, inputElem } = this;
@@ -474,7 +487,7 @@ export class BqDatePicker {
474
487
  if (required && (!value || value.toString().trim() === '')) {
475
488
  // Set validity state to invalid
476
489
  internals?.states.add('invalid');
477
- internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);
490
+ internals?.setValidity({ valueMissing: true }, formValidationMessage ?? 'Please, input or select a valid date', inputElem);
478
491
  return;
479
492
  }
480
493
  // Set validity state to valid if textarea has value or is not required
@@ -496,16 +509,16 @@ export class BqDatePicker {
496
509
  render() {
497
510
  const CallyCalendar = this.CalendarType;
498
511
  const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;
499
- return (h("div", { key: '90e43244086cd211ea29a2e4c2b38a53d61fb6e3', class: "bq-date-picker", part: "base" }, h("label", { key: 'afa9d4e4c5b1961155f96b5cf2c862491fe252e8', id: labelId, class: { 'bq-date-picker__label': true, '!hidden': !this.hasLabel }, "aria-label": this.name || this.fallbackInputId, htmlFor: this.name || this.fallbackInputId, ref: (labelElem) => (this.labelElem = labelElem), part: "label" }, h("slot", { key: '0e6087b6d570604cfa0ff6c0199ee15b4509fb1f', name: "label", onSlotchange: this.handleSlotChange })), h("bq-dropdown", { key: 'e5314f0cec550603250010c170872823df644a66', class: "bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto", disabled: this.disabled, distance: this.distance, open: this.open, panelHeight: this.panelHeight, placement: this.placement, skidding: this.skidding, strategy: this.strategy, exportparts: "panel" }, h("div", { key: 'cc9a24028deb548153c81be9269c26ee7d4be8c9', class: {
512
+ return (h("div", { key: '70f13329ea64ee9b34923e4a63f15567b8599647', class: "bq-date-picker", part: "base" }, h("label", { key: '380eff87152f9f1b32c6a245fb1076c9bfd49718', id: labelId, class: { 'bq-date-picker__label': true, '!hidden': !this.hasLabel }, "aria-label": this.name || this.fallbackInputId, htmlFor: this.name || this.fallbackInputId, ref: (labelElem) => (this.labelElem = labelElem), part: "label" }, h("slot", { key: '8c2af1ac6b86069943ee9f800fca5e34a8330de8', name: "label", onSlotchange: this.handleSlotChange })), h("bq-dropdown", { key: 'f2a23bdfa18984900b54414f9f9adedcffd7da44', class: "bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto", disabled: this.disabled, distance: this.distance, open: this.open, panelHeight: this.panelHeight, placement: this.placement, skidding: this.skidding, strategy: this.strategy, exportparts: "panel" }, h("div", { key: 'da8b3eee06bba4fba6a6bd0afa34f276013e3e24', class: {
500
513
  'bq-date-picker__control': true,
501
514
  [`validation-${this.validationStatus}`]: true,
502
515
  disabled: this.disabled,
503
- }, part: "control", slot: "trigger" }, h("span", { key: 'b548441675b48af77eeff1cd2a7ab94b6e722a2c', class: { 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: 'e0f4ab4a054073c602cf4ec89ce0fb2edcbc4502', name: "prefix", onSlotchange: this.handleSlotChange })), h("input", { key: '548cf75c23c5ba24fe800f5edc882e9af0a712d2', id: this.name || this.fallbackInputId, class: "bq-date-picker__control--input", autoComplete: "off", autoCapitalize: "off", "aria-disabled": this.disabled ? 'true' : 'false', "aria-controls": `${this.name}`, "aria-haspopup": "dialog", disabled: this.disabled, form: this.form, name: this.name, placeholder: this.placeholder, readonly: this.type !== 'single', ref: (inputElem) => (this.inputElem = inputElem), required: this.required, spellcheck: false, type: "text", value: this.displayDate, part: "input",
516
+ }, part: "control", slot: "trigger" }, h("span", { key: '7c02c1554af91b2bd5500b88c0e5d727603a2b9b', class: { 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: '103cc4ffe2cb2b37a4cc232a69ef78b6e8b8c6e4', name: "prefix", onSlotchange: this.handleSlotChange })), h("input", { key: '39cd9c82215df7a7e6fc0460915328056f221978', id: this.name || this.fallbackInputId, class: "bq-date-picker__control--input", autoComplete: "off", autoCapitalize: "off", "aria-disabled": this.disabled ? 'true' : 'false', "aria-controls": `${this.name}`, "aria-haspopup": "dialog", disabled: this.disabled, form: this.form, name: this.name, placeholder: this.placeholder, readonly: this.type !== 'single', ref: (inputElem) => (this.inputElem = inputElem), required: this.required, spellcheck: false, type: "text", value: this.displayDate, part: "input",
504
517
  // Events
505
518
  onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange }), this.hasValue && !this.disabled && !this.disableClear && (
506
519
  // The clear button will be visible as long as the input has a value
507
520
  // and the parent group is hovered or has focus-within
508
- h("bq-button", { key: '94c186cfce884edd7c2d63a49f6533d8448fb683', class: "bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button" }, h("slot", { key: 'f0caaec8283a7ca0298b82f157bd36933b0541b4', name: "clear-icon" }, h("bq-icon", { key: '2549f5bce9f4d7e836ff5babaa04750831482b40', name: "x-circle", class: "flex" })))), h("span", { key: '8c504c8a885061eec62e4704e425b5f3779cd69e', class: "bq-date-picker__control--suffix", ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: '8220188ec1b41908b45301503d3351a6038e1dd5', name: "suffix", onSlotchange: this.handleSlotChange }, h("bq-icon", { key: 'ba52169baa77e1103e09fcb538f7ba7067ca5474', name: "calendar-blank", class: "flex" })))), this.isCallyLoaded && (h(CallyCalendar, { key: '7d27a2ab38209ebe4d1801bb235da417321904b4', isDateDisallowed: this.isDateDisallowed, locale: this.locale, value: this.value, min: this.min, max: this.max, months: this.months, tentative: this.tentative, pageBy: this.monthsPerView, firstDayOfWeek: this.firstDayOfWeek, showOutsideDays: this.showOutsideDays, onChange: this.handleCalendarChange, onRangestart: this.handleCalendarRangeStart, onRangeend: this.handleCalendarRangeEnd, exportparts: "container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading", ref: (elem) => (this.callyElem = elem) }, h("bq-icon", { key: '671b9b78eb566a2f4862525e396749e50be679a8', color: "text--primary", slot: "previous", name: "caret-left", label: "Previous" }), h("bq-icon", { key: '6219184ad134f80b515aeb4dd5a52a2efe1ccf8a', color: "text--primary", slot: "next", name: "caret-right", label: "Next" }), h("div", { key: '438fecb7af23bb5a6e10f2e65c310ce904fbae00', class: "flex flex-wrap justify-center gap-[--bq-spacing-m]" }, this.generateCalendarMonths()))))));
521
+ h("bq-button", { key: 'f23e4d77b45f88920d96be228a55af493b0306f4', class: "bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button" }, h("slot", { key: 'a0cb283da14c276bdb7851c5c9664b9f5fd2b3a4', name: "clear-icon" }, h("bq-icon", { key: '02663a817097d5426c71569019de176044a247f0', name: "x-circle", class: "flex" })))), h("span", { key: '872be19c196b4a2b7523e22140b9f7b81feab81a', class: "bq-date-picker__control--suffix", ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: '5b687ae35fa37326fd83f141c7788e3441ac4e75', name: "suffix", onSlotchange: this.handleSlotChange }, h("bq-icon", { key: 'cbb17aafed0f39fbc14047afb68ce2f18752529e', name: "calendar-blank", class: "flex" })))), this.isCallyLoaded && (h(CallyCalendar, { key: '12185dc3e6650ef7d640e709c5bb3b2ed3ef2a72', isDateDisallowed: this.isDateDisallowed, locale: this.locale, value: this.value, min: this.min, max: this.max, months: this.months, tentative: this.tentative, pageBy: this.monthsPerView, firstDayOfWeek: this.firstDayOfWeek, showOutsideDays: this.showOutsideDays, onChange: this.handleCalendarChange, onRangestart: this.handleCalendarRangeStart, onRangeend: this.handleCalendarRangeEnd, exportparts: "container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading", ref: (elem) => (this.callyElem = elem) }, h("bq-icon", { key: '19820e69ed798053e0b63f6a9d19547244c6f165', color: "text--primary", slot: "previous", name: "caret-left", label: "Previous" }), h("bq-icon", { key: '7e71a521ef61c8eece31eb76b99584f52ea34897', color: "text--primary", slot: "next", name: "caret-right", label: "Next" }), h("div", { key: '62291115d74800609cc82dc200cb40e1ddc464e4', class: "flex flex-wrap justify-center gap-[--bq-spacing-m]" }, this.generateCalendarMonths()))))));
509
522
  }
510
523
  static get is() { return "bq-date-picker"; }
511
524
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-date-picker.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/date-picker/bq-date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGlH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EACL,cAAc,EACd,QAAQ,EACR,SAAS,EACT,2BAA2B,EAC3B,aAAa,EACb,KAAK,EACL,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { DATE_PICKER_TYPE } from './bq-date-picker.types';\nimport type { DaysOfWeek, TCalendarDate, TDatePickerType } from './bq-date-picker.types';\nimport { isCallyLibraryLoaded, loadCallyLibrary } from './helper/callyLibrary';\nimport type { Placement } from '../../services/interfaces';\nimport {\n hasSlotContent,\n isClient,\n isDefined,\n isEventTargetChildOfElement,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\nimport type { TInputValidation } from '../input/bq-input.types';\n\n/**\n * The Date Picker is a intuitive UI element component allows users to select dates from a visual calendar interface, providing an intuitive way to input date information.\n *\n * @example How to use it\n * ```html\n * <bq-date-picker\n * first-day-of-week=\"1\"\n * locale=\"en-GB\"\n * months-per-view=\"single\"\n * months=\"2\"\n * name=\"bq-date-picker\"\n * placeholder=\"Enter your date\"\n * placement=\"bottom-end\"\n * show-outside-days=\"false\"\n * type=\"range\"\n * validation-status=\"none\"\n * value=\"2024-05-25\"\n * >\n * <label class=\"flex flex-grow items-center\" slot=\"label\">\n * Date picker label\n * </label>\n * </bq-date-picker>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/5793a9-date-picker\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n *\n * @attr {boolean} autofocus - If `true`, the Date picker input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Date picker input is disabled or not.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Date picker panel and the input element.\n * @attr {0 | 1 | 2 | 3 | 4 | 5 | 6} first-day-of-week - The first day of the week, where Sunday is 0, Monday is 1, etc.\n * @attr {Intl.DateTimeFormatOptions} format-options - The options to use when formatting the displayed value. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n * @attr {string} form - The ID of the form that the Date picker input belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {function} is-date-disallowed - A function that takes a date and returns true if the date should not be selectable.\n * @attr {Intl.LocalesArgument} locale - The locale for formatting dates. If not set, will use the browser's locale. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n * @attr {string} max - The latest date that can be selected.\n * @attr {string} min - The earliest date that can be selected.\n * @attr {number} months - Number of months to show when range is `true`.\n * @attr {string} name - The Date picker input name.\n * @attr {boolean} open - If `true`, the Date picker panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Date picker panel.\n * @attr {\"top\" | \"right\" | \"bottom\" | \"left\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\"} placement - Position of the Date picker panel.\n * @attr {boolean} required - Indicates whether or not the Date picker input is required to be filled out before submitting the form.\n * @attr {number} skidding - Represents the skidding between the Date picker panel and the input element.\n * @attr {boolean} show-outside-days - Whether to show days outside the month.\n * @attr {string} strategy - Defines the strategy to position the Date picker panel.\n * @attr {string} tentative - The date that is tentatively selected, e.g. the start of a range selection.\n * @attr {\"single\" | \"multi\" | \"range\"} type - It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection.\n * @attr {\"error\" | \"none\" | \"success\" | \"warning\"} validation-status - The validation status of the Select input.\n * @attr {string} value - The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n *\n * @method clear - Clears the selected value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part calendar__button - Any button used in the calendar-month component.\n * @part calendar__button - Any button within the calendar-range component.\n * @part calendar__container - The calendar-range container for the entire component.\n * @part calendar__day - The buttons corresponding to each day in the calendar-month grid.\n * @part calendar__disabled - A button that is disabled due to min/max on the calendar-range component.\n * @part calendar__disallowed - Any day that has been disallowed via isDateDisallowed.\n * @part calendar__head - The calendar-month table's header row.\n * @part calendar__header - The calendar-range container for the heading and buttons.\n * @part calendar__heading - The calendar-month heading container that labels the month.\n * @part calendar__heading - The calendar-range heading containing the month and year.\n * @part calendar__next - The next page button on the calendar-range component.\n * @part calendar__outside - Any days which are outside the current month.\n * @part calendar__previous - The previous page button on the calendar-range component.\n * @part calendar__range-end - The day at the end of a date range.\n * @part calendar__range-inner - Any days between the start and end of a date range.\n * @part calendar__range-start - The day at the start of a date range.\n * @part calendar__selected - Any days which are selected.\n * @part calendar__table - The calendar-month <table> element.\n * @part calendar__td - The calendar-month table's body cells.\n * @part calendar__th - The calendar-month table's header cells.\n * @part calendar__today - The Today's day.\n * @part calendar__tr - Any row within the table on the calendar-month component.\n * @part calendar__week - The calendar-month table's body rows.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The date picker panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-date-picker--background-color - Date picker background color.\n * @cssprop --bq-date-picker--border-color - Date picker border color.\n * @cssprop --bq-date-picker--border-color-disabled - Date picker border color when disabled.\n * @cssprop --bq-date-picker--border-color-focus - Date picker border color on focus.\n * @cssprop --bq-date-picker--border-radius - Date picker border radius.\n * @cssprop --bq-date-picker--border-style - Date picker border style.\n * @cssprop --bq-date-picker--border-width - Date picker border width.\n * @cssprop --bq-date-picker--currentDate-border-color - Date picker border color for current date.\n * @cssprop --bq-date-picker--currentDate-border-width - Date picker border width for current date.\n * @cssprop --bq-date-picker--day-size - Date picker button day size.\n * @cssprop --bq-date-picker--gap - Gap between Date picker content and prefix/suffix.\n * @cssprop --bq-date-picker--icon-size - Icon size to use in prefix/suffix and clear button.\n * @cssprop --bq-date-picker--label-margin-bottom - Date picker label margin bottom.\n * @cssprop --bq-date-picker--label-text-color - Date picker label text color.\n * @cssprop --bq-date-picker--label-text-size - Date picker label text size.\n * @cssprop --bq-date-picker--padding-end - Date picker padding end.\n * @cssprop --bq-date-picker--padding-start - Date picker padding start.\n * @cssprop --bq-date-picker--paddingY - Date picker padding top and bottom.\n * @cssprop --bq-date-picker--range-background-color - Background color for the selected date range in the date picker.\n * @cssprop --bq-date-picker--range-inner-background-color - Background color for the selected dates inside the date range in the date picker.\n * @cssprop --bq-date-picker--text-color - Date picker text color.\n * @cssprop --bq-date-picker--text-placeholder-color - Date picker placeholder text color.\n * @cssprop --bq-date-picker--text-size - Date picker text size.\n */\n@Component({\n tag: 'bq-date-picker',\n styleUrl: './scss/bq-date-picker.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqDatePicker {\n // Own Properties\n // ====================\n\n private callyElem?: TCalendarDate;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private fallbackInputId = 'date-picker';\n\n // Export parts of the calendar-month component\n private readonly COMMON_EXPORT_PARTS =\n 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';\n private readonly BUTTON_EXPORT_PARTS =\n 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals: ElementInternals;\n @Element() el!: HTMLBqDatePickerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() isCallyLoaded = false;\n @State() focusedDate: string;\n @State() displayDate: string;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasRangeEnd = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If `true`, the Date picker input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /** If `true`, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /**\n * Indicates whether the Date picker input is disabled or not.\n * If `true`, the Date picker is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the Date picker panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The first day of the week, where Sunday is 0, Monday is 1, etc */\n @Prop({ reflect: true }) firstDayOfWeek?: DaysOfWeek = 1;\n\n /** The options to use when formatting the displayed value.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n @Prop() formatOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n };\n\n /** The ID of the form that the Date picker input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /** A function that takes a date and returns true if the date should not be selectable */\n @Prop({ reflect: true }) isDateDisallowed?: (date: Date) => boolean;\n\n /** The locale for formatting dates. If not set, will use the browser's locale.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n */\n @Prop({ reflect: true }) locale: Intl.LocalesArgument = 'en-GB';\n\n /** The latest date that can be selected */\n @Prop({ reflect: true }) max?: string;\n\n /** The earliest date that can be selected */\n @Prop({ reflect: true }) min?: string;\n\n /** Number of months to show when range is `true` */\n @Prop({ reflect: true }) months: number;\n\n /**\n * Specifies how the next/previous buttons should navigate the calendar.\n * - single: The buttons will navigate by a single month at a time.\n * - months: The buttons will navigate by the number of months displayed per view.\n */\n @Prop({ reflect: true }) monthsPerView: 'single' | 'months' = 'single';\n\n /** The Date picker input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, the Date picker panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Date picker panel. */\n @Prop({ reflect: true, mutable: true }) panelHeight?: string = 'auto';\n\n /** The Date picker input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Date picker panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-end';\n\n /** Indicates whether or not the Date picker input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Represents the skidding between the Date picker panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Whether to show days outside the month */\n @Prop({ reflect: true }) showOutsideDays: boolean = false;\n\n /** Defines the strategy to position the Date picker panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /** The date that is tentatively selected e.g. the start of a range selection */\n @Prop({ reflect: true, mutable: true }) tentative?: string;\n\n /** It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection */\n @Prop({ reflect: true }) type: TDatePickerType = 'single';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n * All dates are expected in ISO-8601 format (YYYY-MM-DD). */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n const { formatDisplayValue, internals, isCallyLoaded, value } = this;\n if (!isCallyLoaded) return;\n\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n this.updateFormValidity();\n\n if (Array.isArray(value)) {\n this.hasValue = value.some((val) => val.length > 0);\n return;\n }\n\n this.hasValue = isDefined(value);\n this.displayDate = formatDisplayValue(value);\n\n this.setFocusedDate();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqDatePickerElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqDatePickerElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqDatePickerElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqDatePickerElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n async componentWillLoad() {\n if (!isClient() || this.isCallyLoaded) return;\n\n try {\n await loadCallyLibrary();\n this.isCallyLoaded = isCallyLibraryLoaded();\n } catch (error) {\n console.error(error);\n }\n }\n\n async componentDidLoad() {\n this.handleSlotChange();\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n this.setFocusedDate();\n }\n\n @Listen('click', { target: 'body', capture: true })\n handleClickOutside(ev: MouseEvent) {\n const { open, type, hasRangeEnd } = this;\n if (!open || type !== 'range' || ev.button !== 0) return;\n if (isEventTargetChildOfElement(ev, this.el) || hasRangeEnd) return;\n if (isEventTargetChildOfElement(ev, this.el)) return;\n\n if (!hasRangeEnd) {\n this.tentative = undefined;\n this.hasRangeEnd = false;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqInput\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n this.value = undefined;\n this.internals.setFormValue(undefined);\n this.bqClear.emit(this.el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private setFocusedDate = () => {\n const { callyElem, formatFocusedDate, isCallyLoaded, value } = this;\n if (!(callyElem && isCallyLoaded)) return;\n // We need to set the focused date in the calendar component via a ref\n // because it doesn't work when passed as a prop (the Cally element does not re-render)\n this.focusedDate = value ? formatFocusedDate(value) : new Date().toLocaleDateString('fr-CA');\n this.callyElem.focusedDate = this.focusedDate;\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n if (!isHTMLElement(ev.target, 'input')) return;\n\n const dateValue = new Date(ev.target.value);\n if (!isNaN(dateValue.getTime())) {\n // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale\n this.value = dateValue.toLocaleDateString('fr-CA');\n this.displayDate = this.formatDisplayValue(this.value);\n this.internals.setFormValue(`${this.value}`);\n this.bqChange.emit({ value: this.value, el: this.el });\n }\n };\n\n private handleCalendarChange = (ev: Event) => {\n const { value } = ev.target as unknown as { value: string };\n\n this.value = value;\n this.displayDate = this.formatDisplayValue(this.value);\n this.inputElem.value = this.displayDate;\n this.inputElem.focus();\n\n this.internals.setFormValue(`${this.value}`);\n this.bqChange.emit({ value: this.value, el: this.el });\n\n this.open = this.type === 'multi';\n };\n\n private handleCalendarRangeStart = (ev: CustomEvent) => {\n this.hasRangeEnd = false;\n this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');\n };\n\n private handleCalendarRangeEnd = () => {\n this.hasRangeEnd = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n if (this.disabled) return;\n\n this.inputElem.value = '';\n this.value = this.inputElem.value;\n this.hasRangeEnd = false;\n\n this.bqClear.emit(this.el);\n this.bqChange.emit({ value: this.value, el: this.el });\n this.internals.setFormValue(undefined);\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasPrefix = hasSlotContent(this.prefixElem);\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private generateCalendarMonth = (offset?: number, className = ''): Element | null => {\n if (!this.isCallyLoaded) return null;\n\n return (\n <calendar-month\n offset={offset}\n class={className}\n exportparts={`${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}`}\n />\n );\n };\n\n /**\n * Generates an array of Elements representing the calendar months.\n *\n * If the type of the date picker is 'range' or 'multi' and the number of months is specified,\n * it generates an array of calendar months with the specified length. Each month will have an offset\n * and a class name based on its position in the array. The offset is used to determine the month to display,\n * and the class name is used for responsive design.\n *\n * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,\n * it generates an array with a single calendar month.\n *\n * @returns {Element[]} An array of elements representing the calendar months.\n */\n private generateCalendarMonths = (): Element[] => {\n if (!this.isCallyLoaded) return [];\n\n if (this.type === 'range' || (this.type === 'multi' && this.months)) {\n return Array.from({ length: this.months }, (_, i) => {\n const offset = i > 0 ? i : undefined;\n const className = offset ? 'hidden sm:block' : '';\n return this.generateCalendarMonth(offset, className);\n });\n }\n\n return [this.generateCalendarMonth()];\n };\n\n /**\n * Extracts and returns the first date part from a given string.\n * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value\n * should be the focused date in the calendar.\n *\n * @param value - The value to be processed, can be a string.\n * @returns The extracted last date portion of the value.\n */\n private formatFocusedDate = (value: string): string | undefined => {\n if (!value) return undefined;\n\n const dateRegex = /\\b\\d{4}-\\d{2}-\\d{2}\\b/;\n const match = dateRegex.exec(value);\n return match ? match[0] : undefined;\n };\n\n private formatDisplayValue = (value: string): string | undefined => {\n if (!value) return undefined;\n\n const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);\n\n if (this.type === 'range') {\n const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));\n return dateFormatter.formatRange(start, end);\n }\n\n if (this.type === 'multi') {\n const dates = value.split(' ').map((dateStr) => new Date(dateStr));\n return dates.map((date) => dateFormatter.format(date)).join(', ');\n }\n\n return dateFormatter.format(new Date(value));\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private get CalendarType() {\n const componentTypes = {\n single: 'calendar-date',\n multi: 'calendar-multi',\n range: 'calendar-range',\n } as const;\n\n // Return the corresponding component type, based on the type prop value\n return componentTypes[this.type] || componentTypes.single;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const CallyCalendar = this.CalendarType;\n const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-date-picker\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-date-picker__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Select date picker dropdown */}\n <bq-dropdown\n class=\"bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto\"\n disabled={this.disabled}\n distance={this.distance}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-date-picker__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-date-picker__control--input\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`${this.name}`}\n aria-haspopup=\"dialog\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.type !== 'single'}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n required={this.required}\n spellcheck={false}\n type=\"text\"\n value={this.displayDate}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onChange={this.handleChange}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class=\"bq-date-picker__control--suffix\"\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange}>\n <bq-icon name=\"calendar-blank\" class=\"flex\" />\n </slot>\n </span>\n </div>\n {this.isCallyLoaded && (\n <CallyCalendar\n isDateDisallowed={this.isDateDisallowed}\n locale={this.locale as string}\n value={this.value}\n min={this.min}\n max={this.max}\n months={this.months}\n tentative={this.tentative}\n pageBy={this.monthsPerView}\n firstDayOfWeek={this.firstDayOfWeek}\n showOutsideDays={this.showOutsideDays}\n onChange={this.handleCalendarChange}\n onRangestart={this.handleCalendarRangeStart}\n onRangeend={this.handleCalendarRangeEnd}\n exportparts=\"container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading\"\n ref={(elem: TCalendarDate) => (this.callyElem = elem)}\n >\n <bq-icon color=\"text--primary\" slot=\"previous\" name=\"caret-left\" label=\"Previous\" />\n <bq-icon color=\"text--primary\" slot=\"next\" name=\"caret-right\" label=\"Next\" />\n\n <div class=\"flex flex-wrap justify-center gap-[--bq-spacing-m]\">{this.generateCalendarMonths()}</div>\n </CallyCalendar>\n )}\n </bq-dropdown>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-date-picker.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/date-picker/bq-date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,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AAS,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,aAAa,EAAC,KAAK,EAAC,MAAM,GAAG;oBAE7E,4DAAK,KAAK,EAAC,oDAAoD,IAAE,IAAI,CAAC,sBAAsB,EAAE,CAAO,CACvF,CACjB,CACW,CACV,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { DATE_PICKER_TYPE } from './bq-date-picker.types';\nimport type { DaysOfWeek, TCalendarDate, TDatePickerType } from './bq-date-picker.types';\nimport { isCallyLibraryLoaded, loadCallyLibrary } from './helper/callyLibrary';\nimport type { Placement } from '../../services/interfaces';\nimport {\n hasSlotContent,\n isClient,\n isDefined,\n isEventTargetChildOfElement,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\nimport type { TInputValidation } from '../input/bq-input.types';\n\n/**\n * The Date Picker is a intuitive UI element component allows users to select dates from a visual calendar interface, providing an intuitive way to input date information.\n *\n * @example How to use it\n * ```html\n * <bq-date-picker\n * first-day-of-week=\"1\"\n * locale=\"en-GB\"\n * months-per-view=\"single\"\n * months=\"2\"\n * name=\"bq-date-picker\"\n * placeholder=\"Enter your date\"\n * placement=\"bottom-end\"\n * show-outside-days=\"false\"\n * type=\"range\"\n * validation-status=\"none\"\n * value=\"2024-05-25\"\n * >\n * <label class=\"flex flex-grow items-center\" slot=\"label\">\n * Date picker label\n * </label>\n * </bq-date-picker>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/5793a9-date-picker\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n *\n * @attr {boolean} autofocus - If `true`, the Date picker input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Date picker input is disabled or not.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Date picker panel and the input element.\n * @attr {0 | 1 | 2 | 3 | 4 | 5 | 6} first-day-of-week - The first day of the week, where Sunday is 0, Monday is 1, etc.\n * @attr {Intl.DateTimeFormatOptions} format-options - The options to use when formatting the displayed value. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n * @attr {string} form - The ID of the form that the Date picker input belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {function} is-date-disallowed - A function that takes a date and returns true if the date should not be selectable.\n * @attr {Intl.LocalesArgument} locale - The locale for formatting dates. If not set, will use the browser's locale. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n * @attr {string} max - The latest date that can be selected.\n * @attr {string} min - The earliest date that can be selected.\n * @attr {number} months - Number of months to show when range is `true`.\n * @attr {string} name - The Date picker input name.\n * @attr {boolean} open - If `true`, the Date picker panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Date picker panel.\n * @attr {\"top\" | \"right\" | \"bottom\" | \"left\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\"} placement - Position of the Date picker panel.\n * @attr {boolean} required - Indicates whether or not the Date picker input is required to be filled out before submitting the form.\n * @attr {number} skidding - Represents the skidding between the Date picker panel and the input element.\n * @attr {boolean} show-outside-days - Whether to show days outside the month.\n * @attr {string} strategy - Defines the strategy to position the Date picker panel.\n * @attr {string} tentative - The date that is tentatively selected, e.g. the start of a range selection.\n * @attr {\"single\" | \"multi\" | \"range\"} type - It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection.\n * @attr {\"error\" | \"none\" | \"success\" | \"warning\"} validation-status - The validation status of the Select input.\n * @attr {string} value - The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n *\n * @method clear - Clears the selected value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part calendar__button - Any button used in the calendar-month component.\n * @part calendar__button - Any button within the calendar-range component.\n * @part calendar__container - The calendar-range container for the entire component.\n * @part calendar__day - The buttons corresponding to each day in the calendar-month grid.\n * @part calendar__disabled - A button that is disabled due to min/max on the calendar-range component.\n * @part calendar__disallowed - Any day that has been disallowed via isDateDisallowed.\n * @part calendar__head - The calendar-month table's header row.\n * @part calendar__header - The calendar-range container for the heading and buttons.\n * @part calendar__heading - The calendar-month heading container that labels the month.\n * @part calendar__heading - The calendar-range heading containing the month and year.\n * @part calendar__next - The next page button on the calendar-range component.\n * @part calendar__outside - Any days which are outside the current month.\n * @part calendar__previous - The previous page button on the calendar-range component.\n * @part calendar__range-end - The day at the end of a date range.\n * @part calendar__range-inner - Any days between the start and end of a date range.\n * @part calendar__range-start - The day at the start of a date range.\n * @part calendar__selected - Any days which are selected.\n * @part calendar__table - The calendar-month <table> element.\n * @part calendar__td - The calendar-month table's body cells.\n * @part calendar__th - The calendar-month table's header cells.\n * @part calendar__today - The Today's day.\n * @part calendar__tr - Any row within the table on the calendar-month component.\n * @part calendar__week - The calendar-month table's body rows.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The date picker panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-date-picker--background-color - Date picker background color.\n * @cssprop --bq-date-picker--border-color - Date picker border color.\n * @cssprop --bq-date-picker--border-color-disabled - Date picker border color when disabled.\n * @cssprop --bq-date-picker--border-color-focus - Date picker border color on focus.\n * @cssprop --bq-date-picker--border-radius - Date picker border radius.\n * @cssprop --bq-date-picker--border-style - Date picker border style.\n * @cssprop --bq-date-picker--border-width - Date picker border width.\n * @cssprop --bq-date-picker--currentDate-border-color - Date picker border color for current date.\n * @cssprop --bq-date-picker--currentDate-border-width - Date picker border width for current date.\n * @cssprop --bq-date-picker--day-size - Date picker button day size.\n * @cssprop --bq-date-picker--gap - Gap between Date picker content and prefix/suffix.\n * @cssprop --bq-date-picker--icon-size - Icon size to use in prefix/suffix and clear button.\n * @cssprop --bq-date-picker--label-margin-bottom - Date picker label margin bottom.\n * @cssprop --bq-date-picker--label-text-color - Date picker label text color.\n * @cssprop --bq-date-picker--label-text-size - Date picker label text size.\n * @cssprop --bq-date-picker--padding-end - Date picker padding end.\n * @cssprop --bq-date-picker--padding-start - Date picker padding start.\n * @cssprop --bq-date-picker--paddingY - Date picker padding top and bottom.\n * @cssprop --bq-date-picker--range-background-color - Background color for the selected date range in the date picker.\n * @cssprop --bq-date-picker--range-inner-background-color - Background color for the selected dates inside the date range in the date picker.\n * @cssprop --bq-date-picker--text-color - Date picker text color.\n * @cssprop --bq-date-picker--text-placeholder-color - Date picker placeholder text color.\n * @cssprop --bq-date-picker--text-size - Date picker text size.\n */\n@Component({\n tag: 'bq-date-picker',\n styleUrl: './scss/bq-date-picker.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqDatePicker {\n // Own Properties\n // ====================\n\n private callyElem?: TCalendarDate;\n private inputElem?: HTMLInputElement;\n private isInternalUpdate = false;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n private fallbackInputId = 'date-picker';\n // Export parts of the calendar-month component\n private readonly COMMON_EXPORT_PARTS =\n 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';\n private readonly BUTTON_EXPORT_PARTS =\n 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals: ElementInternals;\n @Element() el!: HTMLBqDatePickerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() isCallyLoaded = false;\n @State() focusedDate: string;\n @State() displayDate: string;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasRangeEnd = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If `true`, the Date picker input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /** If `true`, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /**\n * Indicates whether the Date picker input is disabled or not.\n * If `true`, the Date picker is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the Date picker panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The first day of the week, where Sunday is 0, Monday is 1, etc */\n @Prop({ reflect: true }) firstDayOfWeek?: DaysOfWeek = 1;\n\n /** The options to use when formatting the displayed value.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n @Prop() formatOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n };\n\n /** The ID of the form that the Date picker input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /** A function that takes a date and returns true if the date should not be selectable */\n @Prop({ reflect: true }) isDateDisallowed?: (date: Date) => boolean;\n\n /** The locale for formatting dates. If not set, will use the browser's locale.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n */\n @Prop({ reflect: true }) locale: Intl.LocalesArgument = 'en-GB';\n\n /** The latest date that can be selected */\n @Prop({ reflect: true }) max?: string;\n\n /** The earliest date that can be selected */\n @Prop({ reflect: true }) min?: string;\n\n /** Number of months to show when range is `true` */\n @Prop({ reflect: true }) months: number;\n\n /**\n * Specifies how the next/previous buttons should navigate the calendar.\n * - single: The buttons will navigate by a single month at a time.\n * - months: The buttons will navigate by the number of months displayed per view.\n */\n @Prop({ reflect: true }) monthsPerView: 'single' | 'months' = 'single';\n\n /** The Date picker input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, the Date picker panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Date picker panel. */\n @Prop({ reflect: true, mutable: true }) panelHeight?: string = 'auto';\n\n /** The Date picker input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Date picker panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-end';\n\n /** Indicates whether or not the Date picker input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Represents the skidding between the Date picker panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Whether to show days outside the month */\n @Prop({ reflect: true }) showOutsideDays: boolean = false;\n\n /** Defines the strategy to position the Date picker panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /** The date that is tentatively selected e.g. the start of a range selection */\n @Prop({ reflect: true, mutable: true }) tentative?: string;\n\n /** It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection */\n @Prop({ reflect: true }) type: TDatePickerType = 'single';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n * All dates are expected in ISO-8601 format (YYYY-MM-DD). */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange(newValue: string, oldValue: string) {\n if (newValue === oldValue) return;\n\n const { formatDisplayValue, internals, isCallyLoaded } = this;\n if (!isCallyLoaded) return;\n\n internals.setFormValue(!isNil(newValue) ? `${newValue}` : undefined);\n this.updateFormValidity();\n\n this.hasValue = isDefined(newValue);\n this.displayDate = formatDisplayValue(newValue);\n\n this.setFocusedDate();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqDatePickerElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqDatePickerElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqDatePickerElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqDatePickerElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n async componentWillLoad() {\n if (!isClient() || this.isCallyLoaded) return;\n\n try {\n await loadCallyLibrary();\n this.isCallyLoaded = isCallyLibraryLoaded();\n } catch (error) {\n console.error(error);\n }\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n this.handleValueChange(this.value, undefined);\n }\n\n componentDidRender() {\n if (this.isInternalUpdate) {\n this.isInternalUpdate = false;\n }\n }\n\n formAssociatedCallback() {\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!isEventTargetChildOfElement(ev, this.el)) return;\n\n const { open } = ev.detail;\n if (this.open === open) return;\n\n this.open = open;\n }\n\n @Listen('click', { target: 'body', capture: true })\n handleClickOutside(ev: MouseEvent) {\n const { open, type, hasRangeEnd } = this;\n if (!open || type !== 'range' || ev.button !== 0) return;\n if (isEventTargetChildOfElement(ev, this.el) || hasRangeEnd) return;\n\n this.tentative = undefined;\n this.hasRangeEnd = false;\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqInput\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n this.value = undefined;\n this.internals.setFormValue(undefined);\n this.bqClear.emit(this.el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private setFocusedDate = () => {\n const { callyElem, formatFocusedDate, isCallyLoaded, value } = this;\n if (!(callyElem && isCallyLoaded)) return;\n\n const nextFocused = value ? formatFocusedDate(value) : new Date().toLocaleDateString('fr-CA');\n if (this.focusedDate === nextFocused) return;\n\n this.focusedDate = nextFocused;\n if (callyElem.focusedDate !== this.focusedDate) {\n // We need to set the focused date in the calendar component via a ref\n // because it doesn't work when passed as a prop (the Cally element does not re-render)\n callyElem.focusedDate = this.focusedDate;\n }\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled || !isHTMLElement(ev.target, 'input')) return;\n\n const dateValue = new Date(ev.target.value + 'T00:00:00');\n if (!isNaN(dateValue.getTime())) {\n // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale\n this.value = dateValue.toLocaleDateString('fr-CA');\n this.displayDate = this.formatDisplayValue(this.value);\n this.internals.setFormValue(`${this.value}`);\n this.bqChange.emit({ value: this.value, el: this.el });\n }\n };\n\n private handleCalendarChange = (ev: Event) => {\n if (this.isInternalUpdate) return;\n\n const shouldStayOpen = this.type === 'multi';\n const value = (ev.target as unknown as { value: string }).value;\n\n if (this.value === value) {\n this.open = shouldStayOpen;\n return;\n }\n\n this.isInternalUpdate = true;\n\n this.value = value;\n this.displayDate = this.formatDisplayValue(value);\n this.inputElem.value = this.displayDate;\n this.inputElem.focus();\n\n this.internals.setFormValue(value);\n this.bqChange.emit({ value: this.value, el: this.el });\n\n this.open = shouldStayOpen;\n };\n\n private handleCalendarRangeStart = (ev: CustomEvent) => {\n this.hasRangeEnd = false;\n this.tentative = ev.detail;\n };\n\n private handleCalendarRangeEnd = () => {\n this.hasRangeEnd = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n if (this.disabled) return;\n\n this.inputElem.value = '';\n this.value = this.inputElem.value;\n this.hasRangeEnd = false;\n\n this.bqClear.emit(this.el);\n this.bqChange.emit({ value: this.value, el: this.el });\n this.internals.setFormValue(undefined);\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasPrefix = hasSlotContent(this.prefixElem);\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private generateCalendarMonth = (offset?: number, className = ''): Element | null => {\n if (!this.isCallyLoaded) return null;\n\n return (\n <calendar-month\n offset={offset}\n class={className}\n exportparts={`${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}`}\n />\n );\n };\n\n /**\n * Generates an array of Elements representing the calendar months.\n *\n * If the type of the date picker is 'range' or 'multi' and the number of months is specified,\n * it generates an array of calendar months with the specified length. Each month will have an offset\n * and a class name based on its position in the array. The offset is used to determine the month to display,\n * and the class name is used for responsive design.\n *\n * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,\n * it generates an array with a single calendar month.\n *\n * @returns {Element[]} An array of elements representing the calendar months.\n */\n private generateCalendarMonths = (): Element[] => {\n if (!this.isCallyLoaded) return [];\n\n if (this.type === 'range' || (this.type === 'multi' && this.months)) {\n return Array.from({ length: this.months }, (_, i) => {\n const offset = i > 0 ? i : undefined;\n const className = offset ? 'hidden sm:block' : '';\n return this.generateCalendarMonth(offset, className);\n });\n }\n\n return [this.generateCalendarMonth()];\n };\n\n /**\n * Extracts and returns the first date part from a given string.\n * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value\n * should be the focused date in the calendar.\n *\n * @param value - The value to be processed, can be a string.\n * @returns The extracted last date portion of the value.\n */\n private formatFocusedDate = (value: string): string | undefined => {\n if (!value) return undefined;\n\n const dateRegex = /\\b\\d{4}-\\d{2}-\\d{2}\\b/;\n const match = dateRegex.exec(value);\n return match ? match[0] : undefined;\n };\n\n private formatDisplayValue = (value: string): string | undefined => {\n if (!value) return undefined;\n\n const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);\n\n if (this.type === 'range') {\n const [start, end] = value.split('/').map((dateStr) => new Date(dateStr + 'T00:00:00'));\n return dateFormatter.formatRange(start, end);\n }\n\n if (this.type === 'multi') {\n const dates = value.split(' ').map((dateStr) => new Date(dateStr + 'T00:00:00'));\n return dates.map((date) => dateFormatter.format(date)).join(', ');\n }\n\n return dateFormatter.format(new Date(value + 'T00:00:00'));\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity(\n { valueMissing: true },\n formValidationMessage ?? 'Please, input or select a valid date',\n inputElem,\n );\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private get CalendarType() {\n const componentTypes = {\n single: 'calendar-date',\n multi: 'calendar-multi',\n range: 'calendar-range',\n } as const;\n\n // Return the corresponding component type, based on the type prop value\n return componentTypes[this.type] || componentTypes.single;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const CallyCalendar = this.CalendarType;\n const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-date-picker\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-date-picker__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Select date picker dropdown */}\n <bq-dropdown\n class=\"bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto\"\n disabled={this.disabled}\n distance={this.distance}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-date-picker__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-date-picker__control--input\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`${this.name}`}\n aria-haspopup=\"dialog\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.type !== 'single'}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n required={this.required}\n spellcheck={false}\n type=\"text\"\n value={this.displayDate}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onChange={this.handleChange}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class=\"bq-date-picker__control--suffix\"\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange}>\n <bq-icon name=\"calendar-blank\" class=\"flex\" />\n </slot>\n </span>\n </div>\n {this.isCallyLoaded && (\n <CallyCalendar\n isDateDisallowed={this.isDateDisallowed}\n locale={this.locale as string}\n value={this.value}\n min={this.min}\n max={this.max}\n months={this.months}\n tentative={this.tentative}\n pageBy={this.monthsPerView}\n firstDayOfWeek={this.firstDayOfWeek}\n showOutsideDays={this.showOutsideDays}\n onChange={this.handleCalendarChange}\n onRangestart={this.handleCalendarRangeStart}\n onRangeend={this.handleCalendarRangeEnd}\n exportparts=\"container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading\"\n ref={(elem: TCalendarDate) => (this.callyElem = elem)}\n >\n <bq-icon color=\"text--primary\" slot=\"previous\" name=\"caret-left\" label=\"Previous\" />\n <bq-icon color=\"text--primary\" slot=\"next\" name=\"caret-right\" label=\"Next\" />\n\n <div class=\"flex flex-wrap justify-center gap-[--bq-spacing-m]\">{this.generateCalendarMonths()}</div>\n </CallyCalendar>\n )}\n </bq-dropdown>\n </div>\n );\n }\n}\n"]}