@pine-ds/core 3.21.1 → 3.22.1

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 (137) hide show
  1. package/components/pds-alert.js +1 -1
  2. package/components/pds-alert.js.map +1 -1
  3. package/components/pds-avatar.js +2 -2
  4. package/components/pds-avatar.js.map +1 -1
  5. package/components/pds-chip2.js +2 -2
  6. package/components/pds-chip2.js.map +1 -1
  7. package/components/pds-dropdown-menu-item.js +2 -2
  8. package/components/pds-dropdown-menu-item.js.map +1 -1
  9. package/components/pds-input.js +32 -5
  10. package/components/pds-input.js.map +1 -1
  11. package/components/pds-multiselect.js +3 -3
  12. package/components/pds-multiselect.js.map +1 -1
  13. package/components/pds-toast.js +2 -2
  14. package/components/pds-toast.js.map +1 -1
  15. package/dist/cjs/pds-alert.cjs.entry.js +1 -1
  16. package/dist/cjs/pds-alert.entry.cjs.js.map +1 -1
  17. package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
  18. package/dist/cjs/pds-avatar.entry.cjs.js.map +1 -1
  19. package/dist/cjs/pds-chip.cjs.entry.js +2 -2
  20. package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
  21. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -2
  22. package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
  23. package/dist/cjs/pds-input.cjs.entry.js +32 -5
  24. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  25. package/dist/cjs/pds-multiselect.cjs.entry.js +3 -3
  26. package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -1
  27. package/dist/cjs/pds-toast.cjs.entry.js +2 -2
  28. package/dist/cjs/pds-toast.entry.cjs.js.map +1 -1
  29. package/dist/collection/components/pds-alert/pds-alert.js +1 -1
  30. package/dist/collection/components/pds-alert/pds-alert.js.map +1 -1
  31. package/dist/collection/components/pds-avatar/pds-avatar.js +2 -2
  32. package/dist/collection/components/pds-avatar/pds-avatar.js.map +1 -1
  33. package/dist/collection/components/pds-chip/pds-chip.js +2 -2
  34. package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
  35. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +2 -2
  36. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js.map +1 -1
  37. package/dist/collection/components/pds-input/pds-input.css +3 -0
  38. package/dist/collection/components/pds-input/pds-input.js +31 -4
  39. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  40. package/dist/collection/components/pds-multiselect/pds-multiselect.js +3 -3
  41. package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -1
  42. package/dist/collection/components/pds-toast/pds-toast.js +2 -2
  43. package/dist/collection/components/pds-toast/pds-toast.js.map +1 -1
  44. package/dist/docs.json +35 -6
  45. package/dist/esm/pds-alert.entry.js +1 -1
  46. package/dist/esm/pds-alert.entry.js.map +1 -1
  47. package/dist/esm/pds-avatar.entry.js +2 -2
  48. package/dist/esm/pds-avatar.entry.js.map +1 -1
  49. package/dist/esm/pds-chip.entry.js +2 -2
  50. package/dist/esm/pds-chip.entry.js.map +1 -1
  51. package/dist/esm/pds-dropdown-menu-item.entry.js +2 -2
  52. package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
  53. package/dist/esm/pds-input.entry.js +32 -5
  54. package/dist/esm/pds-input.entry.js.map +1 -1
  55. package/dist/esm/pds-multiselect.entry.js +3 -3
  56. package/dist/esm/pds-multiselect.entry.js.map +1 -1
  57. package/dist/esm/pds-toast.entry.js +2 -2
  58. package/dist/esm/pds-toast.entry.js.map +1 -1
  59. package/dist/esm-es5/pds-alert.entry.js +1 -1
  60. package/dist/esm-es5/pds-alert.entry.js.map +1 -1
  61. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  62. package/dist/esm-es5/pds-avatar.entry.js.map +1 -1
  63. package/dist/esm-es5/pds-chip.entry.js +1 -1
  64. package/dist/esm-es5/pds-chip.entry.js.map +1 -1
  65. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  66. package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
  67. package/dist/esm-es5/pds-input.entry.js +1 -1
  68. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  69. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  70. package/dist/esm-es5/pds-multiselect.entry.js.map +1 -1
  71. package/dist/esm-es5/pds-toast.entry.js +1 -1
  72. package/dist/esm-es5/pds-toast.entry.js.map +1 -1
  73. package/dist/pine-core/{p-4fb30dcc.system.entry.js → p-08cdf7f2.system.entry.js} +2 -2
  74. package/dist/pine-core/p-08cdf7f2.system.entry.js.map +1 -0
  75. package/dist/pine-core/{p-40c04518.system.entry.js → p-36478643.system.entry.js} +2 -2
  76. package/dist/pine-core/{p-40c04518.system.entry.js.map → p-36478643.system.entry.js.map} +1 -1
  77. package/dist/pine-core/{p-37e5e471.entry.js → p-39cb879d.entry.js} +2 -2
  78. package/dist/pine-core/p-39cb879d.entry.js.map +1 -0
  79. package/dist/pine-core/{p-35e91ecb.entry.js → p-3e2fc38f.entry.js} +2 -2
  80. package/dist/pine-core/p-3e2fc38f.entry.js.map +1 -0
  81. package/dist/pine-core/{p-378d01df.entry.js → p-3fd70f83.entry.js} +2 -2
  82. package/dist/pine-core/p-3fd70f83.entry.js.map +1 -0
  83. package/dist/pine-core/{p-6fcac53b.entry.js → p-56d0e6f4.entry.js} +2 -2
  84. package/dist/pine-core/p-56d0e6f4.entry.js.map +1 -0
  85. package/dist/pine-core/{p-4e24be57.system.entry.js → p-5e83f6e3.system.entry.js} +2 -2
  86. package/dist/pine-core/p-5e83f6e3.system.entry.js.map +1 -0
  87. package/dist/pine-core/{p-35f644cf.system.entry.js → p-7737e4e8.system.entry.js} +2 -2
  88. package/dist/pine-core/p-7737e4e8.system.entry.js.map +1 -0
  89. package/dist/pine-core/{p-bf1a7158.entry.js → p-8a31ccd4.entry.js} +2 -2
  90. package/dist/pine-core/p-8a31ccd4.entry.js.map +1 -0
  91. package/dist/pine-core/{p-2f64a2fe.system.entry.js → p-8a53ae6d.system.entry.js} +2 -2
  92. package/dist/pine-core/p-8a53ae6d.system.entry.js.map +1 -0
  93. package/dist/pine-core/{p-d38da7a6.entry.js → p-9c0e22d4.entry.js} +2 -2
  94. package/dist/pine-core/p-9c0e22d4.entry.js.map +1 -0
  95. package/dist/pine-core/{p-B3-LvD0D.system.js.map → p-BohZ8Mvm.system.js.map} +1 -1
  96. package/dist/pine-core/p-CEll-OBZ.system.js.map +1 -0
  97. package/dist/pine-core/p-CFqOsbKv.system.js.map +1 -0
  98. package/dist/pine-core/{p-bw-OZgCg.system.js.map → p-CTDKHxjD.system.js.map} +1 -1
  99. package/dist/pine-core/{p-n9xvc2MF.system.js.map → p-D497NWkn.system.js.map} +1 -1
  100. package/dist/pine-core/{p-_bwM2Rxz.system.js.map → p-DHNujrRT.system.js.map} +1 -1
  101. package/dist/pine-core/p-JAVnELnm.system.js +1 -1
  102. package/dist/pine-core/p-a553b40b.system.entry.js +2 -0
  103. package/dist/pine-core/p-a553b40b.system.entry.js.map +1 -0
  104. package/dist/pine-core/{p-LEkjdrKv.system.js.map → p-bPSIyJOo.system.js.map} +1 -1
  105. package/dist/pine-core/{p-78132616.entry.js → p-cbf49268.entry.js} +2 -2
  106. package/dist/pine-core/p-cbf49268.entry.js.map +1 -0
  107. package/dist/pine-core/{p-cb2146b0.system.entry.js → p-ef7d0535.system.entry.js} +2 -2
  108. package/dist/pine-core/p-ef7d0535.system.entry.js.map +1 -0
  109. package/dist/pine-core/pds-alert.entry.esm.js.map +1 -1
  110. package/dist/pine-core/pds-avatar.entry.esm.js.map +1 -1
  111. package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
  112. package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
  113. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  114. package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -1
  115. package/dist/pine-core/pds-toast.entry.esm.js.map +1 -1
  116. package/dist/pine-core/pine-core.esm.js +1 -1
  117. package/dist/types/components/pds-input/pds-input.d.ts +4 -1
  118. package/hydrate/index.js +44 -17
  119. package/hydrate/index.mjs +44 -17
  120. package/package.json +2 -2
  121. package/dist/pine-core/p-2f64a2fe.system.entry.js.map +0 -1
  122. package/dist/pine-core/p-35e91ecb.entry.js.map +0 -1
  123. package/dist/pine-core/p-35f644cf.system.entry.js.map +0 -1
  124. package/dist/pine-core/p-378d01df.entry.js.map +0 -1
  125. package/dist/pine-core/p-37e5e471.entry.js.map +0 -1
  126. package/dist/pine-core/p-4e24be57.system.entry.js.map +0 -1
  127. package/dist/pine-core/p-4fb30dcc.system.entry.js.map +0 -1
  128. package/dist/pine-core/p-5bc45784.system.entry.js +0 -2
  129. package/dist/pine-core/p-5bc45784.system.entry.js.map +0 -1
  130. package/dist/pine-core/p-6fcac53b.entry.js.map +0 -1
  131. package/dist/pine-core/p-78132616.entry.js.map +0 -1
  132. package/dist/pine-core/p-CdpI5vUX.system.js.map +0 -1
  133. package/dist/pine-core/p-Dd9EYBI-.system.js.map +0 -1
  134. package/dist/pine-core/p-bf1a7158.entry.js.map +0 -1
  135. package/dist/pine-core/p-cb2146b0.system.entry.js.map +0 -1
  136. package/dist/pine-core/p-d38da7a6.entry.js.map +0 -1
  137. package/dist/vscode.html-data.json +0 -10420
@@ -88,9 +88,9 @@ const PdsToast = class {
88
88
  'pds-toast': true,
89
89
  [`pds-toast--${this.type}`]: this.type !== 'default',
90
90
  'pds-toast--animating-out': this.isAnimatingOut
91
- }, role: "alert", "aria-live": "polite" }, this.renderIcon(), index.h("span", { key: 'd558a8b71aac4cc37536b793dd75625ffa3d970e', class: "pds-toast__message" }, index.h("slot", { key: 'a208456409cafbe0f8fbba2d2de3e26e73ed412f' })), this.dismissible && (index.h("button", { key: 'd044574effe52f5d355714ba91f69b32da8bda05', type: "button", class: "pds-toast__button", onClick: () => {
91
+ }, role: "alert", "aria-live": "polite" }, this.renderIcon(), index.h("span", { key: 'd558a8b71aac4cc37536b793dd75625ffa3d970e', class: "pds-toast__message" }, index.h("slot", { key: 'a208456409cafbe0f8fbba2d2de3e26e73ed412f' })), this.dismissible && (index.h("button", { key: '530a9adf4628ecfcbb40adf618685457c6088e8b', type: "button", part: "dismiss", class: "pds-toast__button", onClick: () => {
92
92
  this.dismiss();
93
- }, "aria-label": "Dismiss message" }, index.h("pds-icon", { key: 'f3dbfd6e2201feb6852b1bd976ed64b72deef4ee', name: "remove" }))))));
93
+ }, "aria-label": "Dismiss message" }, index.h("pds-icon", { key: 'f49765dc7946c2d012b14d8f499e72c6ecd65c50', name: "remove" }))))));
94
94
  }
95
95
  static get watchers() { return {
96
96
  "duration": ["handleDurationChange"]
@@ -1 +1 @@
1
- {"version":3,"file":"pds-toast.entry.cjs.js","sources":["src/components/pds-toast/pds-toast.scss?tag=pds-toast&encapsulation=shadow","src/components/pds-toast/pds-toast.tsx"],"sourcesContent":[":host {\n --animation-duration: 0.3s;\n --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);\n --padding-inline: var(--pine-dimension-md);\n --padding-inline-desktop: var(--pine-dimension-2xl);\n --sizing-height-default: 68px;\n --sizing-min-width: calc(var(--sizing-total-width) - (var(--padding-inline) * 2));\n --sizing-min-width-desktop: calc(var(--sizing-total-width) - (var(--padding-inline-desktop) * 2));\n --sizing-total-width: 350px;\n\n box-sizing: border-box;\n display: block;\n font: var(--pine-typography-body-medium);\n}\n\n.pds-toast {\n align-items: center;\n animation: pds-toast-animate-in var(--animation-duration) var(--animation-timing);\n background-color: var(--pine-color-primary);\n border-radius: var(--pine-dimension-xs);\n box-shadow: var(--pine-box-shadow);\n color: var(--pine-color-text-primary);\n display: flex;\n height: var(--sizing-height-default);\n justify-content: flex-start;\n margin-block-end: var(--pine-dimension-2xs);\n max-width: 90vw;\n min-width: var(--sizing-min-width);\n padding: 0 var(--padding-inline);\n position: relative;\n width: fit-content;\n\n @media screen and (max-width: 767px) {\n height: 36px;\n max-width: calc(100vw - (var(--pine-dimension-2xs) * 2));\n min-width: auto;\n padding-inline: var(--pine-dimension-2xs);\n }\n\n &--danger {\n background-color: var(--pine-color-danger);\n }\n\n &--loading {\n .pds-toast__loader {\n align-items: center;\n display: flex;\n justify-content: center;\n margin-inline-end: var(--pine-dimension-sm);\n position: relative;\n\n &-spinner {\n animation: pds-toast-rotate 2s linear infinite;\n height: 20px;\n width: 20px;\n }\n\n &-path {\n animation: pds-toast-dash 1.5s ease-in-out infinite;\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n stroke-linecap: round;\n }\n }\n }\n}\n\n.pds-toast__icon {\n color: var(--pine-color-text-primary);\n display: inline-flex;\n margin-inline-end: var(--pine-dimension-sm);\n}\n\n.pds-toast__message {\n font: var(--pine-typography-body-sm-medium);\n margin-inline-end: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n // Style all slotted links\n ::slotted(a) {\n color: var(--pine-color-text-primary);\n margin-inline-start: var(--pine-dimension-xs);\n opacity: 0.7;\n text-decoration: underline;\n\n &:hover,\n &:focus-visible {\n opacity: 1;\n }\n\n &:focus-visible {\n outline: 2px solid var(--pine-color-text-primary);\n outline-offset: 2px;\n }\n }\n}\n\n.pds-toast__button {\n align-items: center;\n background: none;\n border: 0;\n border-radius: var(--pine-border-radius-full);\n color: inherit;\n cursor: pointer;\n display: inline-flex;\n margin-inline-start: var(--pine-dimension-md);\n opacity: 0.7;\n padding: 0;\n white-space: nowrap;\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n &:focus {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-dimension-2xs);\n }\n}\n\n// Animation keyframes\n@keyframes pds-toast-animate-in {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes pds-toast-animate-out {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n}\n\n// Loading animation keyframes\n@keyframes pds-toast-rotate {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pds-toast-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35;\n }\n\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124;\n }\n}\n\n// Animation for dismissing\n:host([hidden]) .pds-toast,\n.pds-toast--animating-out {\n animation: pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;\n pointer-events: none; /* Prevent interaction during animation */\n}\n","import { Component, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-toast',\n styleUrl: 'pds-toast.scss',\n shadow: true,\n})\nexport class PdsToast {\n // Props\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Whether the toast can be dismissed manually via the close button.\n * Note: This only controls manual dismissal. Auto-dismissal via duration still applies.\n * @default true\n */\n @Prop() dismissible: boolean = true;\n\n /**\n * The duration in milliseconds to show the toast before auto-dismissing.\n * Set to 0 to disable auto-dismiss.\n * @default 4500\n */\n @Prop() duration: number = 4500;\n\n /**\n * The name of the icon to display in the toast.\n */\n @Prop() icon?: string;\n\n /**\n * The type of toast to display.\n * - default: Grey background (default)\n * - danger: Red background\n * - loading: With spinner animation\n * @default 'default'\n */\n @Prop() type: 'default' | 'danger' | 'loading' = 'default';\n\n /**\n * Whether the toast is currently visible.\n */\n @State() isVisible: boolean = true;\n\n /**\n * Whether the toast is animating out.\n */\n @State() isAnimatingOut: boolean = false;\n\n // Private properties\n /**\n * Timer for auto-dismissal\n */\n private dismissTimer?: number;\n\n /**\n * Event emitted when the toast is dismissed, either manually or automatically.\n */\n @Event() pdsToastDismissed: EventEmitter<{ componentId?: string }>;\n\n componentDidLoad() {\n if (this.duration > 0) {\n this.startDismissTimer();\n }\n }\n\n disconnectedCallback() {\n this.cleanup();\n }\n\n @Watch('duration')\n handleDurationChange(newDuration: number) {\n if (this.dismissTimer) {\n window.clearTimeout(this.dismissTimer);\n this.dismissTimer = undefined;\n }\n if (newDuration > 0) {\n this.startDismissTimer();\n }\n }\n\n @Method()\n async dismiss(): Promise<void> {\n // Start the animation out\n this.isAnimatingOut = true;\n\n // Wait for animation to complete before hiding and cleanup\n await new Promise((resolve) => setTimeout(resolve, 300)); // Match --animation-duration\n\n this.isVisible = false;\n this.cleanup();\n this.pdsToastDismissed.emit({ componentId: this.componentId });\n }\n\n // Private methods\n private cleanup(): void {\n if (this.dismissTimer) {\n window.clearTimeout(this.dismissTimer);\n this.dismissTimer = undefined;\n }\n }\n\n private startDismissTimer(): void {\n this.dismissTimer = window.setTimeout(() => {\n this.dismiss();\n }, this.duration);\n }\n\n private renderIcon() {\n // Loading type takes priority\n if (this.type === 'loading') {\n return (\n <div class=\"pds-toast__loader\">\n <svg class=\"pds-toast__loader-spinner\" viewBox=\"25 25 50 50\" aria-hidden=\"true\">\n <circle class=\"pds-toast__loader-path\" cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"4\" stroke-linecap=\"round\" />\n </svg>\n </div>\n );\n }\n\n // Return icon if provided, otherwise undefined (which renders as nothing)\n return this.icon && <pds-icon name={this.icon} class=\"pds-toast__icon\" />;\n }\n\n render() {\n return (\n <Host hidden={!this.isVisible}>\n <div\n class={{\n 'pds-toast': true,\n [`pds-toast--${this.type}`]: this.type !== 'default',\n 'pds-toast--animating-out': this.isAnimatingOut\n }}\n role=\"alert\"\n aria-live=\"polite\"\n >\n {this.renderIcon()}\n\n <span class=\"pds-toast__message\">\n <slot></slot>\n </span>\n\n {this.dismissible && (\n <button\n type=\"button\"\n class=\"pds-toast__button\"\n onClick={() => {\n this.dismiss();\n }}\n aria-label=\"Dismiss message\"\n >\n <pds-icon name=\"remove\" />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"names":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S;gBACpD,0BAA0B,EAAE,IAAI,CAAC;AAClC,aAAA,EACD,IAAI,EAAC,OAAO,EAAA,WAAA,EACF,QAAQ,EAAA,EAEjB,IAAI,CAAC,UAAU,EAAE,EAElBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oBAAoB,EAAA,EAC9BA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACR,EAEN,IAAI,CAAC,WAAW,KACfA,OAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAK;gBACZ,IAAI,CAAC,OAAO,EAAE;aACf,gBACU,iBAAiB,EAAA,EAE5BA,OAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAA,CAAG,CACnB,CACV,CACG,CACD;;;;;;;;;;"}
1
+ {"version":3,"file":"pds-toast.entry.cjs.js","sources":["src/components/pds-toast/pds-toast.scss?tag=pds-toast&encapsulation=shadow","src/components/pds-toast/pds-toast.tsx"],"sourcesContent":[":host {\n --animation-duration: 0.3s;\n --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);\n --padding-inline: var(--pine-dimension-md);\n --padding-inline-desktop: var(--pine-dimension-2xl);\n --sizing-height-default: 68px;\n --sizing-min-width: calc(var(--sizing-total-width) - (var(--padding-inline) * 2));\n --sizing-min-width-desktop: calc(var(--sizing-total-width) - (var(--padding-inline-desktop) * 2));\n --sizing-total-width: 350px;\n\n box-sizing: border-box;\n display: block;\n font: var(--pine-typography-body-medium);\n}\n\n.pds-toast {\n align-items: center;\n animation: pds-toast-animate-in var(--animation-duration) var(--animation-timing);\n background-color: var(--pine-color-primary);\n border-radius: var(--pine-dimension-xs);\n box-shadow: var(--pine-box-shadow);\n color: var(--pine-color-text-primary);\n display: flex;\n height: var(--sizing-height-default);\n justify-content: flex-start;\n margin-block-end: var(--pine-dimension-2xs);\n max-width: 90vw;\n min-width: var(--sizing-min-width);\n padding: 0 var(--padding-inline);\n position: relative;\n width: fit-content;\n\n @media screen and (max-width: 767px) {\n height: 36px;\n max-width: calc(100vw - (var(--pine-dimension-2xs) * 2));\n min-width: auto;\n padding-inline: var(--pine-dimension-2xs);\n }\n\n &--danger {\n background-color: var(--pine-color-danger);\n }\n\n &--loading {\n .pds-toast__loader {\n align-items: center;\n display: flex;\n justify-content: center;\n margin-inline-end: var(--pine-dimension-sm);\n position: relative;\n\n &-spinner {\n animation: pds-toast-rotate 2s linear infinite;\n height: 20px;\n width: 20px;\n }\n\n &-path {\n animation: pds-toast-dash 1.5s ease-in-out infinite;\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n stroke-linecap: round;\n }\n }\n }\n}\n\n.pds-toast__icon {\n color: var(--pine-color-text-primary);\n display: inline-flex;\n margin-inline-end: var(--pine-dimension-sm);\n}\n\n.pds-toast__message {\n font: var(--pine-typography-body-sm-medium);\n margin-inline-end: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n // Style all slotted links\n ::slotted(a) {\n color: var(--pine-color-text-primary);\n margin-inline-start: var(--pine-dimension-xs);\n opacity: 0.7;\n text-decoration: underline;\n\n &:hover,\n &:focus-visible {\n opacity: 1;\n }\n\n &:focus-visible {\n outline: 2px solid var(--pine-color-text-primary);\n outline-offset: 2px;\n }\n }\n}\n\n.pds-toast__button {\n align-items: center;\n background: none;\n border: 0;\n border-radius: var(--pine-border-radius-full);\n color: inherit;\n cursor: pointer;\n display: inline-flex;\n margin-inline-start: var(--pine-dimension-md);\n opacity: 0.7;\n padding: 0;\n white-space: nowrap;\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n &:focus {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-dimension-2xs);\n }\n}\n\n// Animation keyframes\n@keyframes pds-toast-animate-in {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes pds-toast-animate-out {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n}\n\n// Loading animation keyframes\n@keyframes pds-toast-rotate {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pds-toast-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35;\n }\n\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124;\n }\n}\n\n// Animation for dismissing\n:host([hidden]) .pds-toast,\n.pds-toast--animating-out {\n animation: pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;\n pointer-events: none; /* Prevent interaction during animation */\n}\n","import { Component, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-toast',\n styleUrl: 'pds-toast.scss',\n shadow: true,\n})\nexport class PdsToast {\n // Props\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Whether the toast can be dismissed manually via the close button.\n * Note: This only controls manual dismissal. Auto-dismissal via duration still applies.\n * @default true\n */\n @Prop() dismissible: boolean = true;\n\n /**\n * The duration in milliseconds to show the toast before auto-dismissing.\n * Set to 0 to disable auto-dismiss.\n * @default 4500\n */\n @Prop() duration: number = 4500;\n\n /**\n * The name of the icon to display in the toast.\n */\n @Prop() icon?: string;\n\n /**\n * The type of toast to display.\n * - default: Grey background (default)\n * - danger: Red background\n * - loading: With spinner animation\n * @default 'default'\n */\n @Prop() type: 'default' | 'danger' | 'loading' = 'default';\n\n /**\n * Whether the toast is currently visible.\n */\n @State() isVisible: boolean = true;\n\n /**\n * Whether the toast is animating out.\n */\n @State() isAnimatingOut: boolean = false;\n\n // Private properties\n /**\n * Timer for auto-dismissal\n */\n private dismissTimer?: number;\n\n /**\n * Event emitted when the toast is dismissed, either manually or automatically.\n */\n @Event() pdsToastDismissed: EventEmitter<{ componentId?: string }>;\n\n componentDidLoad() {\n if (this.duration > 0) {\n this.startDismissTimer();\n }\n }\n\n disconnectedCallback() {\n this.cleanup();\n }\n\n @Watch('duration')\n handleDurationChange(newDuration: number) {\n if (this.dismissTimer) {\n window.clearTimeout(this.dismissTimer);\n this.dismissTimer = undefined;\n }\n if (newDuration > 0) {\n this.startDismissTimer();\n }\n }\n\n @Method()\n async dismiss(): Promise<void> {\n // Start the animation out\n this.isAnimatingOut = true;\n\n // Wait for animation to complete before hiding and cleanup\n await new Promise((resolve) => setTimeout(resolve, 300)); // Match --animation-duration\n\n this.isVisible = false;\n this.cleanup();\n this.pdsToastDismissed.emit({ componentId: this.componentId });\n }\n\n // Private methods\n private cleanup(): void {\n if (this.dismissTimer) {\n window.clearTimeout(this.dismissTimer);\n this.dismissTimer = undefined;\n }\n }\n\n private startDismissTimer(): void {\n this.dismissTimer = window.setTimeout(() => {\n this.dismiss();\n }, this.duration);\n }\n\n private renderIcon() {\n // Loading type takes priority\n if (this.type === 'loading') {\n return (\n <div class=\"pds-toast__loader\">\n <svg class=\"pds-toast__loader-spinner\" viewBox=\"25 25 50 50\" aria-hidden=\"true\">\n <circle class=\"pds-toast__loader-path\" cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"4\" stroke-linecap=\"round\" />\n </svg>\n </div>\n );\n }\n\n // Return icon if provided, otherwise undefined (which renders as nothing)\n return this.icon && <pds-icon name={this.icon} class=\"pds-toast__icon\" />;\n }\n\n render() {\n return (\n <Host hidden={!this.isVisible}>\n <div\n class={{\n 'pds-toast': true,\n [`pds-toast--${this.type}`]: this.type !== 'default',\n 'pds-toast--animating-out': this.isAnimatingOut\n }}\n role=\"alert\"\n aria-live=\"polite\"\n >\n {this.renderIcon()}\n\n <span class=\"pds-toast__message\">\n <slot></slot>\n </span>\n\n {this.dismissible && (\n <button\n type=\"button\"\n part=\"dismiss\"\n class=\"pds-toast__button\"\n onClick={() => {\n this.dismiss();\n }}\n aria-label=\"Dismiss message\"\n >\n <pds-icon name=\"remove\" />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,WAAW,GAAG,y4JAAy4J;;MCOh5J,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAYE;;;;AAIG;AACK,QAAA,IAAW,CAAA,WAAA,GAAY,IAAI;AAEnC;;;;AAIG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAW,IAAI;AAO/B;;;;;;AAMG;AACK,QAAA,IAAI,CAAA,IAAA,GAAqC,SAAS;AAE1D;;AAEG;AACM,QAAA,IAAS,CAAA,SAAA,GAAY,IAAI;AAElC;;AAEG;AACM,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK;AAgHzC;IAnGC,gBAAgB,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE;YACrB,IAAI,CAAC,iBAAiB,EAAE;;;IAI5B,oBAAoB,GAAA;QAClB,IAAI,CAAC,OAAO,EAAE;;AAIhB,IAAA,oBAAoB,CAAC,WAAmB,EAAA;AACtC,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACrB,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC;AACtC,YAAA,IAAI,CAAC,YAAY,GAAG,SAAS;;AAE/B,QAAA,IAAI,WAAW,GAAG,CAAC,EAAE;YACnB,IAAI,CAAC,iBAAiB,EAAE;;;AAK5B,IAAA,MAAM,OAAO,GAAA;;AAEX,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;AAG1B,QAAA,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;AAEzD,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;QACtB,IAAI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AAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,IAAI;gBACjB,CAAC,CAAA,WAAA,EAAc,IAAI,CAAC,IAAI,CAAA,CAAE,GAAG,IAAI,CAAC,IAAI,KAAK,SAAS;gBACpD,0BAA0B,EAAE,IAAI,CAAC;AAClC,aAAA,EACD,IAAI,EAAC,OAAO,EAAA,WAAA,EACF,QAAQ,EAAA,EAEjB,IAAI,CAAC,UAAU,EAAE,EAElBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oBAAoB,EAAA,EAC9BA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACR,EAEN,IAAI,CAAC,WAAW,KACfA,qEACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAK;gBACZ,IAAI,CAAC,OAAO,EAAE;aACf,gBACU,iBAAiB,EAAA,EAE5BA,OAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAA,CAAG,CACnB,CACV,CACG,CACD;;;;;;;;;;"}
@@ -48,7 +48,7 @@ export class PdsAlert {
48
48
  };
49
49
  // Get the icon name based on the current variant
50
50
  const iconName = iconMap[this.variant] || iconMap.default;
51
- return (h(Host, { key: 'ccb4b954c20b4fedfe1336737a412753bf3c78a2', class: "pds-alert", id: this.componentId, variant: this.variant }, h("pds-box", { key: '54b470210568b3af13c341a9afe3a4a88efc4574', class: `pds-alert__container pds-alert__container--${this.variant}`, "background-color": "var(--pds-alert-background)", "border-color": "var(--pds-alert-border-color)", "border-radius": "md", border: true, display: "block" }, h("pds-box", { key: '609a016138c123e05f0474800e91dfaaa3e8150b', gap: "sm", display: "flex" }, h("pds-icon", { key: '18262b9810eb488aca691b004c86b718abbdb4e8', class: `pds-alert__icon ${this.small ? 'pds-alert__icon--small' : ''}`, color: "var(--pds-alert-color-icon)", icon: iconName, size: "var(--pds-alert-icon-size)" }), h("pds-box", { key: 'c7aaaba27a319714d8f33988a8d97bb52cab9af4', class: "pds-alert__content-wrapper", direction: "column", gap: "xs", flex: "grow" }, this.heading && !this.small && (h("pds-text", { key: '804764fff68ec88bed3f1d18710e5ca5d0fd88f8', class: "pds-alert__heading", color: "var(--pds-alert-color-text)", size: "h5", tag: "h3", weight: "medium" }, this.heading)), this.renderContent()), this.dismissible && (h("button", { key: '8f5a3776bb1f8e350c2ea1af8e808d70af44a89d', class: "pds-alert__dismiss", type: "button", "aria-label": "Dismiss alert", onClick: this.handleCloseClick }, h("pds-icon", { key: '144762696dc46d3392a6c4a287a4db9ef95cb5d4', icon: "remove", size: "var(--pds-alert-icon-size)", "aria-hidden": "true", color: "var(--pds-alert-color-dismiss)" })))))));
51
+ return (h(Host, { key: 'ccb4b954c20b4fedfe1336737a412753bf3c78a2', class: "pds-alert", id: this.componentId, variant: this.variant }, h("pds-box", { key: '54b470210568b3af13c341a9afe3a4a88efc4574', class: `pds-alert__container pds-alert__container--${this.variant}`, "background-color": "var(--pds-alert-background)", "border-color": "var(--pds-alert-border-color)", "border-radius": "md", border: true, display: "block" }, h("pds-box", { key: '609a016138c123e05f0474800e91dfaaa3e8150b', gap: "sm", display: "flex" }, h("pds-icon", { key: '18262b9810eb488aca691b004c86b718abbdb4e8', class: `pds-alert__icon ${this.small ? 'pds-alert__icon--small' : ''}`, color: "var(--pds-alert-color-icon)", icon: iconName, size: "var(--pds-alert-icon-size)" }), h("pds-box", { key: 'c7aaaba27a319714d8f33988a8d97bb52cab9af4', class: "pds-alert__content-wrapper", direction: "column", gap: "xs", flex: "grow" }, this.heading && !this.small && (h("pds-text", { key: '804764fff68ec88bed3f1d18710e5ca5d0fd88f8', class: "pds-alert__heading", color: "var(--pds-alert-color-text)", size: "h5", tag: "h3", weight: "medium" }, this.heading)), this.renderContent()), this.dismissible && (h("button", { key: 'ad807ae38b3dc49840a0901ecb005de065b8a58c', class: "pds-alert__dismiss", type: "button", part: "dismiss", "aria-label": "Dismiss alert", onClick: this.handleCloseClick }, h("pds-icon", { key: '0451526f7d61a46c344d48ae002d3f4480456a3e', icon: "remove", size: "var(--pds-alert-icon-size)", "aria-hidden": "true", color: "var(--pds-alert-color-dismiss)" })))))));
52
52
  }
53
53
  static get is() { return "pds-alert"; }
54
54
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-alert.js","sourceRoot":"","sources":["../../../../src/components/pds-alert/pds-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE9F;;GAEG;AAOH,MAAM,OAAO,QAAQ;IALrB;QAmBE;;WAEG;QACK,UAAK,GAAG,KAAK,CAAC;QAEtB;;;WAGG;QACK,gBAAW,GAAG,KAAK,CAAC;QAE5B;;;WAGG;QACK,YAAO,GAA0D,SAAS,CAAC;QAO1E,sBAAiB,GAAG,KAAK,CAAC;QAE3B,qBAAgB,GAAG,GAAG,EAAE;YAC9B,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;QACnC,CAAC,CAAC;KA6FH;IA3FC,mBAAmB;QACjB,6CAA6C;QAC7C,6DAA6D;QAC7D,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAC9D,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC;IACzC,CAAC;IAEO,aAAa,CAAC,OAAgB;QACpC,OAAO,CACL,eAAS,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,oBAAoB,EAAE,GAAG,EAAC,IAAI,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,iBAAe,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MAAM,QACN,OAAO,EAAC,OAAO;gBAEf,gEAAS,GAAG,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM;oBAC9B,iEACE,KAAK,EAAE,mBAAmB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,EAAE,EACtE,KAAK,EAAC,6BAA6B,EACnC,IAAI,EAAE,QAAQ,EACd,IAAI,EAAC,4BAA4B,GACjC;oBACF,gEAAS,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM;wBAChF,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAC9B,iEAAU,KAAK,EAAC,oBAAoB,EAAC,KAAK,EAAC,6BAA6B,EAAC,IAAI,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,IACxG,IAAI,CAAC,OAAO,CACJ,CACZ;wBAEA,IAAI,CAAC,aAAa,EAAE,CACb;oBAET,IAAI,CAAC,WAAW,IAAI,CACnB,+DAAQ,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAC,QAAQ,gBAAY,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB;wBACxG,iEAAU,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,4BAA4B,iBAAa,MAAM,EAAC,KAAK,EAAC,gCAAgC,GAAG,CAC/G,CACV,CACO,CACF,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, Element, State } from '@stencil/core';\n\n/**\n * @slot actions - Slot for alert actions.\n */\n\n@Component({\n tag: 'pds-alert',\n styleUrls: ['pds-alert.tokens.scss', 'pds-alert.scss'],\n shadow: true,\n})\nexport class PdsAlert {\n\n @Element() el: HTMLPdsAlertElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Text displayed as the heading of the alert.\n */\n @Prop() heading: string;\n\n /**\n * If true, the alert is displayed in a smaller size and description text is truncated. Heading is not displayed.\n */\n @Prop() small = false;\n\n /**\n * If true, shows the dismiss button. If false, the dismiss button is hidden.\n * @defaultValue false\n */\n @Prop() dismissible = false;\n\n /**\n * Sets the style variant of the alert.\n * @defaultValue 'default'\n */\n @Prop() variant: 'default' | 'danger' | 'info' | 'success' | 'warning' = 'default';\n\n /**\n * Event emitted when the dismiss button is clicked.\n */\n @Event() pdsAlertDismissClick: EventEmitter<void>;\n\n @State() hasActionsContent = false;\n\n private handleCloseClick = () => {\n this.pdsAlertDismissClick.emit();\n };\n\n componentWillRender() {\n // Check if the actions slot has any content.\n // If not, hide the actions container to prevent empty space.\n const actionsSlot = this.el.querySelector('[slot=\"actions\"]');\n this.hasActionsContent = !!actionsSlot;\n }\n\n private renderActions(isSmall: boolean) {\n return (\n <pds-box class={isSmall ? \"pds-alert__actions--small\" : \"pds-alert__actions\"} gap=\"sm\" flex={isSmall ? \"none\" : undefined} align-items={isSmall ? undefined : \"center\"}>\n <slot name=\"actions\"></slot>\n </pds-box>\n );\n }\n\n private renderContent() {\n if (this.small) {\n return (\n <pds-box display=\"flex\" gap=\"md\" align-items=\"center\">\n <pds-text\n truncate={this.small}\n class=\"pds-alert__description--small\"\n color=\"var(--pds-alert-color-text)\"\n tag=\"p\"\n >\n <slot></slot>\n </pds-text>\n {this.hasActionsContent && this.renderActions(true)}\n </pds-box>\n );\n }\n\n return (\n <div>\n <pds-text class=\"pds-alert__description\" color=\"var(--pds-alert-color-text)\" tag=\"p\">\n <slot></slot>\n </pds-text>\n {this.hasActionsContent && this.renderActions(false)}\n </div>\n );\n }\n\n render() {\n const iconMap = {\n danger: 'warning-filled',\n default: 'info-circle-filled',\n info: 'info-circle-filled',\n success: 'check-circle-filled',\n warning: 'info-circle-filled',\n };\n\n // Get the icon name based on the current variant\n const iconName = iconMap[this.variant] || iconMap.default;\n\n return (\n <Host class=\"pds-alert\" id={this.componentId} variant={this.variant}>\n <pds-box\n class={`pds-alert__container pds-alert__container--${this.variant}`}\n background-color=\"var(--pds-alert-background)\"\n border-color=\"var(--pds-alert-border-color)\"\n border-radius=\"md\"\n border\n display=\"block\"\n >\n <pds-box gap=\"sm\" display=\"flex\">\n <pds-icon\n class={`pds-alert__icon ${this.small ? 'pds-alert__icon--small' : ''}`}\n color=\"var(--pds-alert-color-icon)\"\n icon={iconName}\n size=\"var(--pds-alert-icon-size)\"\n />\n <pds-box class=\"pds-alert__content-wrapper\" direction=\"column\" gap=\"xs\" flex=\"grow\">\n {this.heading && !this.small && (\n <pds-text class=\"pds-alert__heading\" color=\"var(--pds-alert-color-text)\" size=\"h5\" tag=\"h3\" weight=\"medium\">\n {this.heading}\n </pds-text>\n )}\n\n {this.renderContent()}\n </pds-box>\n\n {this.dismissible && (\n <button class=\"pds-alert__dismiss\" type=\"button\" aria-label=\"Dismiss alert\" onClick={this.handleCloseClick}>\n <pds-icon icon=\"remove\" size=\"var(--pds-alert-icon-size)\" aria-hidden=\"true\" color=\"var(--pds-alert-color-dismiss)\" />\n </button>\n )}\n </pds-box>\n </pds-box>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-alert.js","sourceRoot":"","sources":["../../../../src/components/pds-alert/pds-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE9F;;GAEG;AAOH,MAAM,OAAO,QAAQ;IALrB;QAmBE;;WAEG;QACK,UAAK,GAAG,KAAK,CAAC;QAEtB;;;WAGG;QACK,gBAAW,GAAG,KAAK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;wBAEA,IAAI,CAAC,aAAa,EAAE,CACb;oBAET,IAAI,CAAC,WAAW,IAAI,CACnB,+DAAQ,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,SAAS,gBAAY,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB;wBACvH,iEAAU,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,4BAA4B,iBAAa,MAAM,EAAC,KAAK,EAAC,gCAAgC,GAAG,CAC/G,CACV,CACO,CACF,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, Element, State } from '@stencil/core';\n\n/**\n * @slot actions - Slot for alert actions.\n */\n\n@Component({\n tag: 'pds-alert',\n styleUrls: ['pds-alert.tokens.scss', 'pds-alert.scss'],\n shadow: true,\n})\nexport class PdsAlert {\n\n @Element() el: HTMLPdsAlertElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Text displayed as the heading of the alert.\n */\n @Prop() heading: string;\n\n /**\n * If true, the alert is displayed in a smaller size and description text is truncated. Heading is not displayed.\n */\n @Prop() small = false;\n\n /**\n * If true, shows the dismiss button. If false, the dismiss button is hidden.\n * @defaultValue false\n */\n @Prop() dismissible = false;\n\n /**\n * Sets the style variant of the alert.\n * @defaultValue 'default'\n */\n @Prop() variant: 'default' | 'danger' | 'info' | 'success' | 'warning' = 'default';\n\n /**\n * Event emitted when the dismiss button is clicked.\n */\n @Event() pdsAlertDismissClick: EventEmitter<void>;\n\n @State() hasActionsContent = false;\n\n private handleCloseClick = () => {\n this.pdsAlertDismissClick.emit();\n };\n\n componentWillRender() {\n // Check if the actions slot has any content.\n // If not, hide the actions container to prevent empty space.\n const actionsSlot = this.el.querySelector('[slot=\"actions\"]');\n this.hasActionsContent = !!actionsSlot;\n }\n\n private renderActions(isSmall: boolean) {\n return (\n <pds-box class={isSmall ? \"pds-alert__actions--small\" : \"pds-alert__actions\"} gap=\"sm\" flex={isSmall ? \"none\" : undefined} align-items={isSmall ? undefined : \"center\"}>\n <slot name=\"actions\"></slot>\n </pds-box>\n );\n }\n\n private renderContent() {\n if (this.small) {\n return (\n <pds-box display=\"flex\" gap=\"md\" align-items=\"center\">\n <pds-text\n truncate={this.small}\n class=\"pds-alert__description--small\"\n color=\"var(--pds-alert-color-text)\"\n tag=\"p\"\n >\n <slot></slot>\n </pds-text>\n {this.hasActionsContent && this.renderActions(true)}\n </pds-box>\n );\n }\n\n return (\n <div>\n <pds-text class=\"pds-alert__description\" color=\"var(--pds-alert-color-text)\" tag=\"p\">\n <slot></slot>\n </pds-text>\n {this.hasActionsContent && this.renderActions(false)}\n </div>\n );\n }\n\n render() {\n const iconMap = {\n danger: 'warning-filled',\n default: 'info-circle-filled',\n info: 'info-circle-filled',\n success: 'check-circle-filled',\n warning: 'info-circle-filled',\n };\n\n // Get the icon name based on the current variant\n const iconName = iconMap[this.variant] || iconMap.default;\n\n return (\n <Host class=\"pds-alert\" id={this.componentId} variant={this.variant}>\n <pds-box\n class={`pds-alert__container pds-alert__container--${this.variant}`}\n background-color=\"var(--pds-alert-background)\"\n border-color=\"var(--pds-alert-border-color)\"\n border-radius=\"md\"\n border\n display=\"block\"\n >\n <pds-box gap=\"sm\" display=\"flex\">\n <pds-icon\n class={`pds-alert__icon ${this.small ? 'pds-alert__icon--small' : ''}`}\n color=\"var(--pds-alert-color-icon)\"\n icon={iconName}\n size=\"var(--pds-alert-icon-size)\"\n />\n <pds-box class=\"pds-alert__content-wrapper\" direction=\"column\" gap=\"xs\" flex=\"grow\">\n {this.heading && !this.small && (\n <pds-text class=\"pds-alert__heading\" color=\"var(--pds-alert-color-text)\" size=\"h5\" tag=\"h3\" weight=\"medium\">\n {this.heading}\n </pds-text>\n )}\n\n {this.renderContent()}\n </pds-box>\n\n {this.dismissible && (\n <button class=\"pds-alert__dismiss\" type=\"button\" part=\"dismiss\" aria-label=\"Dismiss alert\" onClick={this.handleCloseClick}>\n <pds-icon icon=\"remove\" size=\"var(--pds-alert-icon-size)\" aria-hidden=\"true\" color=\"var(--pds-alert-color-dismiss)\" />\n </button>\n )}\n </pds-box>\n </pds-box>\n </Host>\n );\n }\n}\n"]}
@@ -50,7 +50,7 @@ export class PdsAvatar {
50
50
  this.renderAvatar = () => {
51
51
  return (this.dropdown
52
52
  ?
53
- h("button", { class: "pds-avatar__button", type: "button", "aria-label": "Avatar dropdown trigger" }, this.renderAssetWrapper())
53
+ h("button", { class: "pds-avatar__button", type: "button", part: "button", "aria-label": "Avatar dropdown trigger" }, this.renderAssetWrapper())
54
54
  :
55
55
  this.renderAssetWrapper());
56
56
  };
@@ -94,7 +94,7 @@ export class PdsAvatar {
94
94
  }
95
95
  }
96
96
  render() {
97
- return (h(Host, { key: '4e659a1fce50577363ec034c63ef75b5b4ddd29b', id: this.componentId, class: Object.assign({}, this.classNames()) }, this.renderAvatar()));
97
+ return (h(Host, { key: '8425f576be0ea4ce443c9a14a9d7bc34e493e6d3', id: this.componentId, class: Object.assign({}, this.classNames()) }, this.renderAvatar()));
98
98
  }
99
99
  static get is() { return "pds-avatar"; }
100
100
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-avatar.js","sourceRoot":"","sources":["../../../../src/components/pds-avatar/pds-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAErE;;EAEE;AAMF,MAAM,OAAO,SAAS;IALtB;QAOE;;;WAGG;QACK,QAAG,GAAmB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L,EAAC,IAAI,qDACH,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,KAAK,oBAAM,IAAI,CAAC,UAAU,EAAE,KAE3B,IAAI,CAAC,YAAY,EAAE,CACf,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { checkCircleFilled, userFilled } from '@pine-ds/icons/icons';\n\n/**\n * @part image - The main image element that represents the avatar component.\n*/\n@Component({\n tag: 'pds-avatar',\n styleUrls: ['pds-avatar.scss'],\n shadow: true,\n})\nexport class PdsAvatar {\n\n /**\n * The alt for a custom user image.\n * @defaultValue null\n */\n @Prop() alt?: string | null = null;\n\n /**\n * Determines whether the badge is visible or not.\n * @defaultValue false\n */\n @Prop() badge? = false;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether the avatar functions as a dropdown trigger.\n * @defaultValue false\n */\n @Prop() dropdown? = false;\n\n /**\n * The src for a custom user image.\n * @defaultValue null\n */\n @Prop() image?: string | null = null;\n\n /**\n * The initials to display in the avatar when no image is provided.\n * @defaultValue null\n */\n @Prop() initials?: string | null = null;\n\n /**\n * Size of the avatar. Value can be preset or custom.\n * @defaultValue lg\n */\n @Prop({ reflect: true }) size?:\n | 'xl' // 64px\n | 'lg' // 56px\n | 'md' // 40px\n | 'sm' // 32px\n | 'xs' // 24px\n | string = 'lg';\n\n /**\n * Determines the variant of avatar. Changes appearance accordingly.\n * @defaultValue customer\n */\n @Prop({ reflect: true }) variant?: 'customer' | 'admin' = 'customer';\n\n private avatarSize() {\n const sizes: { [key: string]: any } = {\n xs: '24px',\n sm: '32px',\n md: '40px',\n lg: '56px',\n xl: '64px',\n }\n\n if (sizes[this.size]) {\n return sizes[this.size];\n } else {\n return this.size\n }\n }\n\n private renderAssetWrapper = () => {\n const style = {\n height: this.avatarSize(),\n width: this.avatarSize()\n };\n\n return (\n <div style={style} part=\"asset-wrapper\">\n {this.renderIconOrImage()}\n {this.renderBadge()}\n </div>\n )\n };\n\n private renderAvatar = () => {\n return (\n this.dropdown\n ?\n <button class=\"pds-avatar__button\" type=\"button\" aria-label=\"Avatar dropdown trigger\">\n {this.renderAssetWrapper()}\n </button>\n :\n this.renderAssetWrapper()\n )\n };\n\n private renderBadge = () => (\n this.badge\n // Percentage is average size of icon in relation to total avatar size\n // of all preset sizes found in Figma.\n // Used to allow icons to scale to container size\n && <pds-icon color=\"var(--pine-color-purple-600)\" class=\"pds-avatar__badge\" icon={checkCircleFilled} size=\"33.53%\"></pds-icon>\n );\n\n private renderIconOrImage = () => {\n if (this.image) {\n return <img alt={this.alt} src={this.image} />;\n }\n\n if (this.initials) {\n return (\n <svg class=\"pds-avatar__initials\" viewBox=\"0 0 32 32\">\n <text x=\"16\" y=\"20\">{this.initials}</text>\n </svg>\n );\n }\n\n // Percentage is average size of icon in relation to total avatar size\n // of all preset sizes found in Figma.\n // Used to allow icons to scale to container size\n return <pds-icon color=\"var(--pine-color-brand)\" icon={userFilled} size=\"33.53%\"></pds-icon>;\n };\n\n private classNames = () => (\n {\n 'pds-avatar': true,\n [`pds-avatar--has-image`]: this.image !== '' && this.image !== null, // Remove when FF supports :has selector\n [`pds-avatar--has-initials`]: this.initials !== '' && this.initials !== null,\n [`pds-avatar--${this.variant}`]: this.variant === 'admin'\n }\n );\n\n render() {\n\n return (\n <Host\n id={this.componentId}\n class={{...this.classNames()}}\n >\n {this.renderAvatar()}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-avatar.js","sourceRoot":"","sources":["../../../../src/components/pds-avatar/pds-avatar.tsx"],"names":[],"mappings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AAE,EAAE,MAAM;SACX,CAAA;QAED,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;IAgED,MAAM;QAEJ,OAAO,CACL,EAAC,IAAI,qDACH,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,KAAK,oBAAM,IAAI,CAAC,UAAU,EAAE,KAE3B,IAAI,CAAC,YAAY,EAAE,CACf,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { checkCircleFilled, userFilled } from '@pine-ds/icons/icons';\n\n/**\n * @part image - The main image element that represents the avatar component.\n*/\n@Component({\n tag: 'pds-avatar',\n styleUrls: ['pds-avatar.scss'],\n shadow: true,\n})\nexport class PdsAvatar {\n\n /**\n * The alt for a custom user image.\n * @defaultValue null\n */\n @Prop() alt?: string | null = null;\n\n /**\n * Determines whether the badge is visible or not.\n * @defaultValue false\n */\n @Prop() badge? = false;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether the avatar functions as a dropdown trigger.\n * @defaultValue false\n */\n @Prop() dropdown? = false;\n\n /**\n * The src for a custom user image.\n * @defaultValue null\n */\n @Prop() image?: string | null = null;\n\n /**\n * The initials to display in the avatar when no image is provided.\n * @defaultValue null\n */\n @Prop() initials?: string | null = null;\n\n /**\n * Size of the avatar. Value can be preset or custom.\n * @defaultValue lg\n */\n @Prop({ reflect: true }) size?:\n | 'xl' // 64px\n | 'lg' // 56px\n | 'md' // 40px\n | 'sm' // 32px\n | 'xs' // 24px\n | string = 'lg';\n\n /**\n * Determines the variant of avatar. Changes appearance accordingly.\n * @defaultValue customer\n */\n @Prop({ reflect: true }) variant?: 'customer' | 'admin' = 'customer';\n\n private avatarSize() {\n const sizes: { [key: string]: any } = {\n xs: '24px',\n sm: '32px',\n md: '40px',\n lg: '56px',\n xl: '64px',\n }\n\n if (sizes[this.size]) {\n return sizes[this.size];\n } else {\n return this.size\n }\n }\n\n private renderAssetWrapper = () => {\n const style = {\n height: this.avatarSize(),\n width: this.avatarSize()\n };\n\n return (\n <div style={style} part=\"asset-wrapper\">\n {this.renderIconOrImage()}\n {this.renderBadge()}\n </div>\n )\n };\n\n private renderAvatar = () => {\n return (\n this.dropdown\n ?\n <button class=\"pds-avatar__button\" type=\"button\" part=\"button\" aria-label=\"Avatar dropdown trigger\">\n {this.renderAssetWrapper()}\n </button>\n :\n this.renderAssetWrapper()\n )\n };\n\n private renderBadge = () => (\n this.badge\n // Percentage is average size of icon in relation to total avatar size\n // of all preset sizes found in Figma.\n // Used to allow icons to scale to container size\n && <pds-icon color=\"var(--pine-color-purple-600)\" class=\"pds-avatar__badge\" icon={checkCircleFilled} size=\"33.53%\"></pds-icon>\n );\n\n private renderIconOrImage = () => {\n if (this.image) {\n return <img alt={this.alt} src={this.image} />;\n }\n\n if (this.initials) {\n return (\n <svg class=\"pds-avatar__initials\" viewBox=\"0 0 32 32\">\n <text x=\"16\" y=\"20\">{this.initials}</text>\n </svg>\n );\n }\n\n // Percentage is average size of icon in relation to total avatar size\n // of all preset sizes found in Figma.\n // Used to allow icons to scale to container size\n return <pds-icon color=\"var(--pine-color-brand)\" icon={userFilled} size=\"33.53%\"></pds-icon>;\n };\n\n private classNames = () => (\n {\n 'pds-avatar': true,\n [`pds-avatar--has-image`]: this.image !== '' && this.image !== null, // Remove when FF supports :has selector\n [`pds-avatar--has-initials`]: this.initials !== '' && this.initials !== null,\n [`pds-avatar--${this.variant}`]: this.variant === 'admin'\n }\n );\n\n render() {\n\n return (\n <Host\n id={this.componentId}\n class={{...this.classNames()}}\n >\n {this.renderAvatar()}\n </Host>\n );\n }\n}\n"]}
@@ -70,7 +70,7 @@ export class PdsChip {
70
70
  const isDropdown = this.effectiveVariant === 'dropdown';
71
71
  // For brand sentiment, ignore dot prop
72
72
  const showDot = this.sentiment === 'brand' ? false : this.dot;
73
- const chipContent = isDropdown ? (h("button", { class: "pds-chip__button", type: "button" }, this.icon && h("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), h("slot", null), h("pds-icon", { icon: downSmall, size: this.iconSize, "aria-hidden": "true" }))) : (h("span", { class: "pds-chip__label" }, this.icon && h("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), h("slot", null)));
73
+ const chipContent = isDropdown ? (h("button", { class: "pds-chip__button", type: "button", part: "button" }, this.icon && h("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), h("slot", null), h("pds-icon", { icon: downSmall, size: this.iconSize, "aria-hidden": "true" }))) : (h("span", { class: "pds-chip__label" }, this.icon && h("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), h("slot", null)));
74
74
  return chipContent;
75
75
  }
76
76
  renderCloseButton() {
@@ -118,7 +118,7 @@ export class PdsChip {
118
118
  return (h(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), h("pds-icon", { icon: remove, size: this.iconSize })));
119
119
  }
120
120
  render() {
121
- return (h(Host, { key: 'fcd4828fabaeba300c35cd9a0b90701feefd6480', class: this.classNames(), id: this.componentId }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
121
+ return (h(Host, { key: 'c6afa0a9aba7716fd7a7ee32d1c0993c30464b1e', class: this.classNames(), id: this.componentId }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
122
122
  }
123
123
  static get is() { return "pds-chip"; }
124
124
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-chip.js","sourceRoot":"","sources":["../../../../src/components/pds-chip/pds-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAG9E;;GAEG;AAOH,MAAM,OAAO,OAAO;IALpB;QAWE;;;;WAIG;QACK,QAAG,GAAG,KAAK,CAAC;QAOpB;;;;WAIG;QACK,UAAK,GAAG,KAAK,CAAC;QAQtB;;;WAGG;QACK,cAAS,GAAsB,SAAS,CAAC;QAEjD;;;;WAIG;QACK,YAAO,GAAoB,MAAM,CAAC;QA2BlC,qBAAgB,GAAG,GAAG,EAAE;YAC9B,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;QAC/B,CAAC,CAAC;KAqIH;IAnIC,IAAY,aAAa;QACvB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC,IAAI,CAAC;QACxC,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,UAAU;QAChB,MAAM,UAAU,GAAG,CAAC,UAAU,CAAC,CAAC;QAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC;QAChC,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAC1B,UAAU,CAAC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;QACvC,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { downSmall, remove } from '@pine-ds/icons/icons';\nimport { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport type { ChipSentimentType, ChipSizeType, ChipVariantType } from '@utils/types';\n\n/**\n * @slot (default) - The chip's label text.\n */\n\n@Component({\n tag: 'pds-chip',\n styleUrls: ['pds-chip.tokens.scss', 'pds-chip.scss'],\n shadow: true,\n})\nexport class PdsChip {\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether a dot should be displayed on the chip.\n * Note: This prop is ignored when sentiment is 'brand'.\n * @defaultValue false\n */\n @Prop() dot = false;\n\n /**\n * The name of the icon to display before the chip text.\n */\n @Prop() icon?: string;\n\n /**\n * Determines whether the chip should be displayed in a larger size. DEPRECATED.\n * @defaultValue false\n * @deprecated Use `size` prop instead. Set `size=\"lg\"` for the large variant.\n */\n @Prop() large = false;\n\n /**\n * Sets the size of the chip.\n * @defaultValue 'md'\n */\n @Prop() size?: ChipSizeType;\n\n /**\n * Defines the color scheme of the chip.\n * @defaultValue 'neutral'\n */\n @Prop() sentiment: ChipSentimentType = 'neutral';\n\n /**\n * Sets the style variant of the chip.\n * Note: This prop is ignored when sentiment is 'brand'.\n * @defaultValue 'text'\n */\n @Prop() variant: ChipVariantType = 'text';\n\n /**\n * URL to navigate to when the remove button is clicked.\n * When provided, renders the close button as a link instead of a button.\n * Only applies to tag variant.\n */\n @Prop() removeUrl?: string;\n\n /**\n * HTTP method to use for the remove action.\n * Adds data-method and data-turbo-method attributes for Rails/Turbo compatibility.\n * Only applies when removeUrl is provided.\n */\n @Prop() removeHttpMethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n /**\n * Specifies where to open the linked document when removeUrl is provided.\n * Only applies when removeUrl is set.\n */\n @Prop() removeTarget?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Event emitted when the close button is clicked on a tag variant chip.\n */\n @Event() pdsTagCloseClick: EventEmitter<void>;\n\n private handleCloseClick = () => {\n this.pdsTagCloseClick.emit();\n };\n\n private get effectiveSize(): ChipSizeType {\n if (this.size != null) return this.size;\n if (this.large) return 'lg';\n return 'md';\n }\n\n private classNames() {\n const classNames = ['pds-chip'];\n\n const size = this.effectiveSize;\n if (size && size !== 'md') {\n classNames.push('pds-chip--' + size);\n }\n\n // For brand sentiment, always use text variant\n const effectiveVariant = this.sentiment === 'brand' ? 'text' : this.variant;\n if (effectiveVariant) {\n classNames.push('pds-chip--' + effectiveVariant);\n }\n\n if (this.sentiment) {\n classNames.push('pds-chip--' + this.sentiment);\n }\n\n return classNames.join(' ');\n }\n\n private get effectiveVariant() {\n // For brand sentiment, force text variant behavior\n return this.sentiment === 'brand' ? 'text' : this.variant;\n }\n\n private get iconSize() {\n switch (this.effectiveSize) {\n case 'sm': return '10px';\n case 'lg': return '14px';\n default: return '12px';\n }\n }\n\n private setChipContent() {\n const isDropdown = this.effectiveVariant === 'dropdown';\n\n // For brand sentiment, ignore dot prop\n const showDot = this.sentiment === 'brand' ? false : this.dot;\n\n const chipContent = isDropdown ? (\n <button class=\"pds-chip__button\" type=\"button\">\n {this.icon && <pds-icon icon={this.icon} size={this.iconSize} aria-hidden=\"true\"></pds-icon>}\n {showDot && <i class=\"pds-chip__dot\" aria-hidden=\"true\"></i>}\n <slot></slot>\n <pds-icon icon={downSmall} size={this.iconSize} aria-hidden=\"true\"></pds-icon>\n </button>\n ) : (\n <span class=\"pds-chip__label\">\n {this.icon && <pds-icon icon={this.icon} size={this.iconSize} aria-hidden=\"true\"></pds-icon>}\n {showDot && <i class=\"pds-chip__dot\" aria-hidden=\"true\"></i>}\n <slot></slot>\n </span>\n );\n\n return chipContent;\n }\n\n private renderCloseButton() {\n const CloseElement = this.removeUrl ? 'a' : 'button';\n\n const closeAttributes = () => {\n if (this.removeUrl) {\n // Link attributes\n const linkAttrs: any = {\n class: 'pds-chip__close',\n href: this.removeUrl,\n 'aria-label': 'Remove',\n };\n\n // Add target if specified\n if (this.removeTarget) {\n linkAttrs.target = this.removeTarget;\n }\n\n // Add HTTP method attributes if specified\n if (this.removeHttpMethod) {\n linkAttrs['data-method'] = this.removeHttpMethod;\n linkAttrs['data-turbo-method'] = this.removeHttpMethod;\n }\n\n // Build rel attribute by collecting all required values\n const relValues = [];\n\n // Add noopener noreferrer if target is _blank\n if (this.removeTarget === '_blank') {\n relValues.push('noopener', 'noreferrer');\n }\n\n // Add nofollow for non-GET methods (best practice)\n if (this.removeHttpMethod && this.removeHttpMethod !== 'get') {\n relValues.push('nofollow');\n }\n\n // Set rel attribute if we have any values\n if (relValues.length > 0) {\n linkAttrs.rel = relValues.join(' ');\n }\n\n return linkAttrs;\n }\n\n // Button attributes\n return {\n class: 'pds-chip__close',\n type: 'button',\n 'aria-label': 'Remove',\n };\n };\n\n return (\n <CloseElement {...closeAttributes()} onClick={this.handleCloseClick}>\n <pds-icon icon={remove} size={this.iconSize}></pds-icon>\n </CloseElement>\n );\n }\n\n render() {\n return (\n <Host class={this.classNames()} id={this.componentId}>\n {this.setChipContent()}\n {this.effectiveVariant === 'tag' && this.renderCloseButton()}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-chip.js","sourceRoot":"","sources":["../../../../src/components/pds-chip/pds-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAG9E;;GAEG;AAOH,MAAM,OAAO,OAAO;IALpB;QAWE;;;;WAIG;QACK,QAAG,GAAG,KAAK,CAAC;QAOpB;;;;WAIG;QACK,UAAK,GAAG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AI,EAAE,QAAQ;gBACd,YAAY,EAAE,QAAQ;aACvB,CAAC;QACJ,CAAC,CAAC;QAEF,OAAO,CACL,EAAC,YAAY,oBAAK,eAAe,EAAE,IAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB;YACjE,gBAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAa,CAC3C,CAChB,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW;YACjD,IAAI,CAAC,cAAc,EAAE;YACrB,IAAI,CAAC,gBAAgB,KAAK,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CACvD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { downSmall, remove } from '@pine-ds/icons/icons';\nimport { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport type { ChipSentimentType, ChipSizeType, ChipVariantType } from '@utils/types';\n\n/**\n * @slot (default) - The chip's label text.\n */\n\n@Component({\n tag: 'pds-chip',\n styleUrls: ['pds-chip.tokens.scss', 'pds-chip.scss'],\n shadow: true,\n})\nexport class PdsChip {\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether a dot should be displayed on the chip.\n * Note: This prop is ignored when sentiment is 'brand'.\n * @defaultValue false\n */\n @Prop() dot = false;\n\n /**\n * The name of the icon to display before the chip text.\n */\n @Prop() icon?: string;\n\n /**\n * Determines whether the chip should be displayed in a larger size. DEPRECATED.\n * @defaultValue false\n * @deprecated Use `size` prop instead. Set `size=\"lg\"` for the large variant.\n */\n @Prop() large = false;\n\n /**\n * Sets the size of the chip.\n * @defaultValue 'md'\n */\n @Prop() size?: ChipSizeType;\n\n /**\n * Defines the color scheme of the chip.\n * @defaultValue 'neutral'\n */\n @Prop() sentiment: ChipSentimentType = 'neutral';\n\n /**\n * Sets the style variant of the chip.\n * Note: This prop is ignored when sentiment is 'brand'.\n * @defaultValue 'text'\n */\n @Prop() variant: ChipVariantType = 'text';\n\n /**\n * URL to navigate to when the remove button is clicked.\n * When provided, renders the close button as a link instead of a button.\n * Only applies to tag variant.\n */\n @Prop() removeUrl?: string;\n\n /**\n * HTTP method to use for the remove action.\n * Adds data-method and data-turbo-method attributes for Rails/Turbo compatibility.\n * Only applies when removeUrl is provided.\n */\n @Prop() removeHttpMethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n /**\n * Specifies where to open the linked document when removeUrl is provided.\n * Only applies when removeUrl is set.\n */\n @Prop() removeTarget?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Event emitted when the close button is clicked on a tag variant chip.\n */\n @Event() pdsTagCloseClick: EventEmitter<void>;\n\n private handleCloseClick = () => {\n this.pdsTagCloseClick.emit();\n };\n\n private get effectiveSize(): ChipSizeType {\n if (this.size != null) return this.size;\n if (this.large) return 'lg';\n return 'md';\n }\n\n private classNames() {\n const classNames = ['pds-chip'];\n\n const size = this.effectiveSize;\n if (size && size !== 'md') {\n classNames.push('pds-chip--' + size);\n }\n\n // For brand sentiment, always use text variant\n const effectiveVariant = this.sentiment === 'brand' ? 'text' : this.variant;\n if (effectiveVariant) {\n classNames.push('pds-chip--' + effectiveVariant);\n }\n\n if (this.sentiment) {\n classNames.push('pds-chip--' + this.sentiment);\n }\n\n return classNames.join(' ');\n }\n\n private get effectiveVariant() {\n // For brand sentiment, force text variant behavior\n return this.sentiment === 'brand' ? 'text' : this.variant;\n }\n\n private get iconSize() {\n switch (this.effectiveSize) {\n case 'sm': return '10px';\n case 'lg': return '14px';\n default: return '12px';\n }\n }\n\n private setChipContent() {\n const isDropdown = this.effectiveVariant === 'dropdown';\n\n // For brand sentiment, ignore dot prop\n const showDot = this.sentiment === 'brand' ? false : this.dot;\n\n const chipContent = isDropdown ? (\n <button class=\"pds-chip__button\" type=\"button\" part=\"button\">\n {this.icon && <pds-icon icon={this.icon} size={this.iconSize} aria-hidden=\"true\"></pds-icon>}\n {showDot && <i class=\"pds-chip__dot\" aria-hidden=\"true\"></i>}\n <slot></slot>\n <pds-icon icon={downSmall} size={this.iconSize} aria-hidden=\"true\"></pds-icon>\n </button>\n ) : (\n <span class=\"pds-chip__label\">\n {this.icon && <pds-icon icon={this.icon} size={this.iconSize} aria-hidden=\"true\"></pds-icon>}\n {showDot && <i class=\"pds-chip__dot\" aria-hidden=\"true\"></i>}\n <slot></slot>\n </span>\n );\n\n return chipContent;\n }\n\n private renderCloseButton() {\n const CloseElement = this.removeUrl ? 'a' : 'button';\n\n const closeAttributes = () => {\n if (this.removeUrl) {\n // Link attributes\n const linkAttrs: any = {\n class: 'pds-chip__close',\n href: this.removeUrl,\n 'aria-label': 'Remove',\n };\n\n // Add target if specified\n if (this.removeTarget) {\n linkAttrs.target = this.removeTarget;\n }\n\n // Add HTTP method attributes if specified\n if (this.removeHttpMethod) {\n linkAttrs['data-method'] = this.removeHttpMethod;\n linkAttrs['data-turbo-method'] = this.removeHttpMethod;\n }\n\n // Build rel attribute by collecting all required values\n const relValues = [];\n\n // Add noopener noreferrer if target is _blank\n if (this.removeTarget === '_blank') {\n relValues.push('noopener', 'noreferrer');\n }\n\n // Add nofollow for non-GET methods (best practice)\n if (this.removeHttpMethod && this.removeHttpMethod !== 'get') {\n relValues.push('nofollow');\n }\n\n // Set rel attribute if we have any values\n if (relValues.length > 0) {\n linkAttrs.rel = relValues.join(' ');\n }\n\n return linkAttrs;\n }\n\n // Button attributes\n return {\n class: 'pds-chip__close',\n type: 'button',\n 'aria-label': 'Remove',\n };\n };\n\n return (\n <CloseElement {...closeAttributes()} onClick={this.handleCloseClick}>\n <pds-icon icon={remove} size={this.iconSize}></pds-icon>\n </CloseElement>\n );\n }\n\n render() {\n return (\n <Host class={this.classNames()} id={this.componentId}>\n {this.setChipContent()}\n {this.effectiveVariant === 'tag' && this.renderCloseButton()}\n </Host>\n );\n }\n}\n"]}
@@ -66,10 +66,10 @@ export class PdsDropdownMenuItem {
66
66
  return (h("button", { class: {
67
67
  'pds-dropdown-menu-item__content': true,
68
68
  'has-focus': this.hasFocus
69
- }, tabIndex: this.disabled ? -1 : 0, type: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
69
+ }, tabIndex: this.disabled ? -1 : 0, type: "button", part: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
70
70
  }
71
71
  render() {
72
- return (h(Host, { key: 'cfe752ae18b068c88a0f4eee3293c3b0128e0ab1', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
72
+ return (h(Host, { key: 'eb3222203f1ab6b585b66a5449bc5facfe9875a9', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
73
73
  }
74
74
  static get is() { return "pds-dropdown-menu-item"; }
75
75
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-dropdown-menu-item.js","sourceRoot":"","sources":["../../../../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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAChC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,aAAa,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,mBACR,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;YAE5C,eAAa,CACN,CACV,CAAC;IACJ,CAAC;IAcD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EACxB,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EAC1F,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EACnD,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,mBACG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAEzC,IAAI,CAAC,aAAa,EAAE,CAClB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport type { BasePdsProps } from '@utils/interfaces';\n\n@Component({\n tag: 'pds-dropdown-menu-item',\n styleUrl: 'pds-dropdown-menu-item.scss',\n shadow: true,\n})\nexport class PdsDropdownMenuItem implements BasePdsProps {\n @Element() host: HTMLPdsDropdownMenuItemElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * It determines whether or not the dropdown-item is destructive.\n * @defaultValue false\n */\n @Prop() destructive: boolean = false;\n\n /**\n * It determines whether or not the dropdown-item is disabled.\n * @defaultValue false\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n\n /**\n * Prompts the user to save the linked URL instead of navigating to it.\n * It can be used without a value to download with the default filename,\n * or with a string value to suggest a specific filename for the download.\n * Only applies when href is set.\n */\n @Prop() download?: string;\n\n /**\n * If provided, renders the dropdown-item as an anchor (`<a>`) element instead of a button.\n */\n @Prop() href: string | undefined;\n\n /**\n * Determines whether the link should open in a new tab and display an external icon.\n * This is a simpler alternative to using `target=\"_blank\"` for the common case.\n * @defaultValue false\n */\n @Prop({ reflect: true }) external: boolean = false;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Takes precedence over the `external` prop if both are set.\n * Only applies when href is set.\n * @defaultValue undefined\n */\n @Prop({ reflect: true }) target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Emitted when the dropdown-item is clicked.\n *\n */\n @Event() pdsClick: EventEmitter<{itemIndex: number, item: HTMLPdsDropdownMenuItemElement, content: string}>;\n\n /**\n * Trigger the click event\n */\n @Method()\n async clickItem() {\n this.handleClick();\n };\n\n\n private handleClick() {\n // Filter only pds-dropdown-menu-item elements and find the index of the current item\n const menuItems = Array.from(this.host.parentNode.children).filter(\n (child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item'\n );\n const itemIndex = menuItems.indexOf(this.host);\n\n // Get the text content from the slotted content\n const content = this.host.textContent?.trim() || '';\n\n this.pdsClick.emit({\n itemIndex,\n item: this.host,\n content\n });\n }\n\n @State() hasFocus: boolean = false;\n\n private handleFocus = () => {\n this.hasFocus = true;\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n }\n\n private renderElement() {\n if (this.href !== undefined) {\n return (\n <pds-link\n download={this.download}\n href={this.disabled ? null : this.href}\n external={this.external}\n target={this.target}\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </pds-link>\n );\n }\n\n return (\n <button\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n type=\"button\"\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </button>\n );\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Handle keyboard events\n if (!this.disabled && (event.key === 'Enter')) {\n // Only prevent default for button elements or Space key\n // For links with Enter key, we want the default navigation behavior\n if (!this.href) {\n event.preventDefault();\n }\n this.handleClick();\n }\n }\n\n render() {\n return (\n <Host id={this.componentId}\n class={{ 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }}\n onClick={() => !this.disabled && this.handleClick()}\n role=\"none\"\n tabIndex={-1}\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.renderElement()}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-dropdown-menu-item.js","sourceRoot":"","sources":["../../../../../src/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtG,MAAM,OAAO,mBAAmB;IALhC;QAaE;;;WAGG;QACK,gBAAW,GAAY,KAAK,CAAC;QAErC;;;WAGG;QAC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CAAC,CAAC,CAAC,IAAI;YAE5C,eAAa,CACN,CACV,CAAC;IACJ,CAAC;IAcD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EACxB,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EAC1F,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EACnD,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,mBACG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAEzC,IAAI,CAAC,aAAa,EAAE,CAClB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport type { BasePdsProps } from '@utils/interfaces';\n\n@Component({\n tag: 'pds-dropdown-menu-item',\n styleUrl: 'pds-dropdown-menu-item.scss',\n shadow: true,\n})\nexport class PdsDropdownMenuItem implements BasePdsProps {\n @Element() host: HTMLPdsDropdownMenuItemElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * It determines whether or not the dropdown-item is destructive.\n * @defaultValue false\n */\n @Prop() destructive: boolean = false;\n\n /**\n * It determines whether or not the dropdown-item is disabled.\n * @defaultValue false\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n\n /**\n * Prompts the user to save the linked URL instead of navigating to it.\n * It can be used without a value to download with the default filename,\n * or with a string value to suggest a specific filename for the download.\n * Only applies when href is set.\n */\n @Prop() download?: string;\n\n /**\n * If provided, renders the dropdown-item as an anchor (`<a>`) element instead of a button.\n */\n @Prop() href: string | undefined;\n\n /**\n * Determines whether the link should open in a new tab and display an external icon.\n * This is a simpler alternative to using `target=\"_blank\"` for the common case.\n * @defaultValue false\n */\n @Prop({ reflect: true }) external: boolean = false;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Takes precedence over the `external` prop if both are set.\n * Only applies when href is set.\n * @defaultValue undefined\n */\n @Prop({ reflect: true }) target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Emitted when the dropdown-item is clicked.\n *\n */\n @Event() pdsClick: EventEmitter<{itemIndex: number, item: HTMLPdsDropdownMenuItemElement, content: string}>;\n\n /**\n * Trigger the click event\n */\n @Method()\n async clickItem() {\n this.handleClick();\n };\n\n\n private handleClick() {\n // Filter only pds-dropdown-menu-item elements and find the index of the current item\n const menuItems = Array.from(this.host.parentNode.children).filter(\n (child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item'\n );\n const itemIndex = menuItems.indexOf(this.host);\n\n // Get the text content from the slotted content\n const content = this.host.textContent?.trim() || '';\n\n this.pdsClick.emit({\n itemIndex,\n item: this.host,\n content\n });\n }\n\n @State() hasFocus: boolean = false;\n\n private handleFocus = () => {\n this.hasFocus = true;\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n }\n\n private renderElement() {\n if (this.href !== undefined) {\n return (\n <pds-link\n download={this.download}\n href={this.disabled ? null : this.href}\n external={this.external}\n target={this.target}\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </pds-link>\n );\n }\n\n return (\n <button\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n type=\"button\"\n part=\"button\"\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </button>\n );\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Handle keyboard events\n if (!this.disabled && (event.key === 'Enter')) {\n // Only prevent default for button elements or Space key\n // For links with Enter key, we want the default navigation behavior\n if (!this.href) {\n event.preventDefault();\n }\n this.handleClick();\n }\n }\n\n render() {\n return (\n <Host id={this.componentId}\n class={{ 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }}\n onClick={() => !this.disabled && this.handleClick()}\n role=\"none\"\n tabIndex={-1}\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.renderElement()}\n </Host>\n );\n }\n}\n"]}
@@ -243,6 +243,9 @@
243
243
  .pds-input__field::placeholder {
244
244
  color: var(--pds-input-placeholder-color);
245
245
  }
246
+ .pds-input__field:placeholder-shown {
247
+ text-overflow: ellipsis;
248
+ }
246
249
  .has-error .pds-input__field {
247
250
  background-color: var(--pds-input-error-background);
248
251
  border-color: var(--pds-input-error-border);
@@ -14,6 +14,7 @@ export class PdsInput {
14
14
  constructor() {
15
15
  this.inheritedAttributes = {};
16
16
  this.isComposing = false;
17
+ this.hasLoaded = false;
17
18
  /**
18
19
  * If true, the input has prefix content (non-focusable)
19
20
  */
@@ -93,6 +94,22 @@ export class PdsInput {
93
94
  this.nativeInput.focus();
94
95
  }
95
96
  }
97
+ observeAddonResize() {
98
+ var _a;
99
+ if (typeof ResizeObserver === 'undefined')
100
+ return;
101
+ // Disconnect existing observer before creating a new one
102
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
103
+ this.resizeObserver = new ResizeObserver(() => {
104
+ this.updateAddonWidths();
105
+ });
106
+ if (this.prefixEl) {
107
+ this.resizeObserver.observe(this.prefixEl);
108
+ }
109
+ if (this.suffixEl) {
110
+ this.resizeObserver.observe(this.suffixEl);
111
+ }
112
+ }
96
113
  updateAddonWidths() {
97
114
  requestAnimationFrame(() => {
98
115
  if (this.prefixEl) {
@@ -155,16 +172,26 @@ export class PdsInput {
155
172
  if (this.el.attachInternals && !this.internals) {
156
173
  this.internals = this.el.attachInternals();
157
174
  }
175
+ // Re-establish ResizeObserver after DOM reconnection
176
+ // Only run if component has already loaded (refs are available)
177
+ if (this.hasLoaded && !this.resizeObserver) {
178
+ this.updateAddonWidths();
179
+ this.observeAddonResize();
180
+ }
181
+ }
182
+ disconnectedCallback() {
183
+ var _a;
184
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
185
+ this.resizeObserver = undefined;
158
186
  }
159
187
  componentDidLoad() {
188
+ this.hasLoaded = true;
160
189
  this.debounceChanged();
161
190
  this.updateAddonWidths();
191
+ this.observeAddonResize();
162
192
  // Set initial form value
163
193
  this.updateFormValue();
164
194
  }
165
- componentDidUpdate() {
166
- this.updateAddonWidths();
167
- }
168
195
  debounceChanged() {
169
196
  const { pdsInput, debounce, originalPdsInput } = this;
170
197
  /**
@@ -257,7 +284,7 @@ export class PdsInput {
257
284
  'has-prepend': this.hasPrepend,
258
285
  'has-append': this.hasAppend,
259
286
  };
260
- return (h(Host, { key: 'ff25f2310e8d1755534fe3f27b391447d6014f76', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null, "full-width": this.fullWidth ? 'true' : null }, h("div", { key: 'e337c4a828eb7641a41caffec2508fa9b12a2eeb', class: "pds-input" }, label && (h("div", { key: '8df0800a08156e1755ae7460ad7ddd51a1301f27', class: "pds-input__label-wrapper" }, h("label", { key: 'ed2978d0c9b841bfa8f929ab7072461b231ab5b2', htmlFor: componentId, class: "pds-input__label" }, h("span", { key: '23ab3abd0ecff326110cbde065d3a3cb733ec832', class: this.hideLabel ? 'visually-hidden' : '' }, label, this.required && h("span", { key: '1bdafb028b48e37c9999db0c8f2d1718f8566e05', class: "pds-input__required-indicator" }, " *"))), !this.hideLabel && this.renderAction())), h("div", { key: 'e06ba19e8d40271345e27f791efb79817cc723f7', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), h("input", Object.assign({ key: 'd7a2d70a03130a431b527f5bf75888d1db55bd5e', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onKeyDown: this.onKeyDownEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (h("p", { key: 'd0f58791f013578fc34f36711a95b4f2e655bcda', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (h("p", { key: 'b511338e9c05cfb4c9363a9227c8e208b9f645e1', class: "pds-input__error-message", id: messageId(componentId, 'error') }, h("pds-icon", { key: '4eaaf16d77e23486aad12369919cd4e03768ff3a', icon: danger, size: "small" }), errorMessage)))));
287
+ return (h(Host, { key: '2ec6b4f180675aa210f5b6816d0229791724a9c7', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null, "full-width": this.fullWidth ? 'true' : null }, h("div", { key: 'd629a3484b1b0ad8762e0e5b49eb04756276dc64', class: "pds-input" }, label && (h("div", { key: 'e4ba8c5a09e7d5b43c70b903bed4a2809c9bca9f', class: "pds-input__label-wrapper" }, h("label", { key: 'd6de106940815660b45207149b8dae0bcf8d812b', htmlFor: componentId, class: "pds-input__label" }, h("span", { key: '266e93098bb0f8a94d9369bd64a29d9872090fbd', class: this.hideLabel ? 'visually-hidden' : '' }, label, this.required && h("span", { key: 'a393b0c25ee54213d48d74d05b7dec05f3c64191', class: "pds-input__required-indicator" }, " *"))), !this.hideLabel && this.renderAction())), h("div", { key: '5a6d411f543ccf5845af6086512666471cbc2fd7', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), h("input", Object.assign({ key: 'bb19fe0c2eddf8868d118e8f0c822e8fd5edfb5f', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onKeyDown: this.onKeyDownEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (h("p", { key: '9b425e97ed05971864bb48813cc7e67fad1e0578', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (h("p", { key: 'd60a34f24c536be62bae38c2353a3c33c427f909', class: "pds-input__error-message", id: messageId(componentId, 'error') }, h("pds-icon", { key: 'c6eec169fb1631d8d59faaa83f26e80c338bcd90', icon: danger, size: "small" }), errorMessage)))));
261
288
  }
262
289
  static get is() { return "pds-input"; }
263
290
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-input.js","sourceRoot":"","sources":["../../../../src/components/pds-input/pds-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;;;;GAMG;AAOH,MAAM,OAAO,QAAQ;IANrB;QASU,wBAAmB,GAAe,EAAE,CAAC;QACrC,gBAAW,GAAG,KAAK,CAAC;QAS5B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,eAAU,GAAG,KAAK,CAAC;QAE5B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAyI3B;;;;WAIG;QACK,SAAI,GAAG,MAAM,CAAC;QAEtB;;WAEG;QACoB,UAAK,GAA4B,EAAE,CAAC;QAY3D;;WAEG;QACM,aAAQ,GAAG,KAAK,CAAC;QAwIlB,iBAAY,GAAG,CAAC,EAAS,EAAE,EAAE;YACnC,MAAM,KAAK,GAAG,EAAE,CAAC,MAAiC,CAAC;YACnD,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;YAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\nimport { debounceEvent } from '@utils/utils';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot append - Content to be displayed after the input field\n * @slot prefix - Content that is displayed visually within the input field before the input field\n * @slot prepend - Content to be displayed before the input field\n * @slot suffix - Content that is displayed visually within the input field after the input field\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-input',\n styleUrls: ['pds-input.tokens.scss', '../../global/styles/utils/label.scss', 'pds-input.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsInput {\n\n private nativeInput?: HTMLInputElement;\n private inheritedAttributes: Attributes = {};\n private isComposing = false;\n private prefixEl?: HTMLElement;\n private suffixEl?: HTMLElement;\n private focusedValue?: string | number | null;\n private originalPdsInput?: EventEmitter<InputInputEventDetail>;\n private internals?: ElementInternals;\n\n @Element() el!: HTMLPdsInputElement;\n\n /**\n * If true, the input has prefix content (non-focusable)\n */\n @State() hasPrefix = false;\n\n /**\n * If true, the input has suffix content (non-focusable)\n */\n @State() hasSuffix = false;\n\n /**\n * If true, the input has prepend content (focusable)\n */\n @State() hasPrepend = false;\n\n /**\n * If true, the input has append content (focusable)\n */\n @State() hasAppend = false;\n\n /**\n * If true, the input has action content in the label area\n */\n @State() hasAction = false;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value has changed.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n */\n @Event() pdsInput: EventEmitter<InputInputEventDetail>;\n\n /**\n * Emitted when a key is pressed down in the input.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\n\n /**\n * Sets focus on the native `input` in the `pds-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Sets the number of milliseconds to wait before updating the value.\n */\n @Prop() debounce?: number;\n\n /**\n * Determines whether or not the input field is disabled.\n */\n @Prop() disabled?: boolean;\n\n /**\n * Specifies the error message and provides an error-themed treatment to the field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the input field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the input field is invalid or throws an error.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the input label.\n */\n @Prop() label?: string;\n\n /**\n * Visually hides the label text for instances where only the input should be displayed. Label remains accessible to assistive technology such as screen readers.\n * Note: When true, the action slot is also hidden to maintain a minimal UI.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Specifies the maximum value for the input field.\n */\n @Prop() max?: string;\n\n /**\n * Specifies the maximum number of characters allowed in the input field.\n */\n @Prop() maxlength?: string;\n\n /**\n * Specifies the minimum value for the input field.\n */\n @Prop() min?: string;\n\n /**\n * Specifies the minimum number of characters allowed in the input field.\n */\n @Prop() minlength?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Specifies the regular expression that the input value is checked against.\n */\n @Prop() pattern?: string;\n\n /**\n * Specifies a short hint that describes the expected value of the input field.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the input field is readonly.\n */\n @Prop() readonly?: boolean;\n\n /**\n * Determines whether or not the input field is required.\n */\n @Prop() required?: boolean;\n\n /**\n * Works with the `min` and `max` attributes to define increments for the input field.\n */\n @Prop() step?: string;\n\n /**\n * Determines the type of control that will be displayed\n * `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`, `'url'`\n * @defaultValue \"text\"\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({mutable: true}) value?: string | number | null = '';\n\n /**\n * Determines whether or not the input field takes full width of its container.\n */\n @Prop() fullWidth?: boolean;\n\n /**\n * Applies highlight styling to the input field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * Determines if the input has focus.\n */\n @State() hasFocus = false;\n\n private updateAddonWidths() {\n requestAnimationFrame(() => {\n if (this.prefixEl) {\n const prefixWidth = this.prefixEl.offsetWidth;\n this.el.style.setProperty('--prefix-width', `${prefixWidth}px`);\n }\n\n if (this.suffixEl) {\n const suffixWidth = this.suffixEl.offsetWidth;\n this.el.style.setProperty('--suffix-width', `${suffixWidth}px`);\n }\n });\n }\n\n private renderPrefix() {\n const hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n if (hasPrefix) {\n return (\n <div class=\"pds-input__prefix\" part=\"prefix\" ref={(el) => this.prefixEl = el as HTMLElement}>\n <slot name=\"prefix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderSuffix() {\n const hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n if (hasSuffix) {\n return (\n <div class=\"pds-input__suffix\" part=\"suffix\" ref={(el) => this.suffixEl = el as HTMLElement}>\n <slot name=\"suffix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderPrepend() {\n const hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n if (hasPrepend) {\n return (\n <div class=\"pds-input__prepend\" part=\"prepend\">\n <slot name=\"prepend\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAppend() {\n const hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n if (hasAppend) {\n return (\n <div class=\"pds-input__append\" part=\"append\">\n <slot name=\"append\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-input__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n };\n this.hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n this.hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n this.hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n this.hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n\n // Store the original pdsInput event emitter\n this.originalPdsInput = this.pdsInput;\n }\n\n connectedCallback() {\n // Initialize ElementInternals for form association (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n }\n\n componentDidLoad() {\n this.debounceChanged();\n this.updateAddonWidths();\n // Set initial form value\n this.updateFormValue();\n }\n\n componentDidUpdate() {\n this.updateAddonWidths();\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n /**\n * If debounce is undefined, we have to manually revert the pdsInput emitter in case\n * debounce used to be set to a number. Otherwise, the event would stay debounced.\n */\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n\n if (nativeInput && nativeInput.value !== value && !this.isComposing) {\n nativeInput.value = value;\n }\n\n // Update form value when value changes\n this.updateFormValue();\n }\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n private onInputEvent = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onChangeEvent = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlurEvent = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `pdsChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocusEvent = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onCompositionStart = () => {\n this.isComposing = true;\n }\n\n private onCompositionEnd = () => {\n this.isComposing = false;\n }\n\n private onKeyDownEvent = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(ev);\n };\n\n /**\n * Emits a pdsChange event\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n const newValue = value == null ? value : value.toString();\n\n this.focusedValue = newValue;\n this.pdsChange.emit({ value: newValue, event });\n }\n\n /**\n * Emits a `pdsInput` event\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n\n this.pdsInput.emit({ value: newValue, event });\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (this.internals && this.internals.setFormValue) {\n const value = this.getValue();\n this.internals.setFormValue(value || null);\n\n // Set validity based on native input validation\n if (this.nativeInput && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.nativeInput.validity,\n this.nativeInput.validationMessage,\n this.nativeInput\n );\n }\n }\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value from FormData using the input's name\n const value = state.get(this.name);\n if (typeof value === 'string') {\n this.value = value;\n }\n }\n }\n\n render() {\n const {\n componentId,\n disabled,\n errorMessage,\n helperMessage,\n invalid = false,\n label,\n } = this;\n\n const value = this.getValue();\n\n const inputWrapperClasses = {\n 'pds-input__field-wrapper': true,\n 'has-focus': this.hasFocus,\n 'has-error': invalid || !!errorMessage,\n 'is-disabled': disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n 'has-prepend': this.hasPrepend,\n 'has-append': this.hasAppend,\n };\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-prefix={this.hasPrefix ? 'true' : null}\n has-suffix={this.hasSuffix ? 'true' : null}\n has-prepend={this.hasPrepend ? 'true' : null}\n has-append={this.hasAppend ? 'true' : null}\n has-action={this.hasAction && !this.hideLabel ? 'true' : null}\n full-width={this.fullWidth ? 'true' : null}\n >\n <div class=\"pds-input\">\n {label && (\n <div class=\"pds-input__label-wrapper\">\n <label htmlFor={componentId} class=\"pds-input__label\">\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {label}\n {this.required && <span class=\"pds-input__required-indicator\"> *</span>}\n </span>\n </label>\n {!this.hideLabel && this.renderAction()}\n </div>\n )}\n\n <div class={inputWrapperClasses}>\n {this.renderPrepend()}\n {this.renderPrefix()}\n <input\n ref={(input) => (this.nativeInput = input)}\n class=\"pds-input__field\"\n aria-describedby={assignDescription(componentId, invalid, helperMessage)}\n aria-invalid={invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n disabled={disabled}\n id={componentId}\n max={this.max}\n maxlength={this.maxlength}\n min={this.min}\n minlength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={value}\n onInput={this.onInputEvent}\n onChange={this.onChangeEvent}\n onBlur={this.onBlurEvent}\n onFocus={this.onFocusEvent}\n onKeyDown={this.onKeyDownEvent}\n onCompositionstart={this.onCompositionStart}\n onCompositionend={this.onCompositionEnd}\n {...this.inheritedAttributes}\n />\n {this.renderSuffix()}\n {this.renderAppend()}\n </div>\n\n {helperMessage && (\n <p class=\"pds-input__helper-message\" id={messageId(componentId, 'helper')}>\n {helperMessage}\n </p>\n )}\n\n {errorMessage && (\n <p class=\"pds-input__error-message\" id={messageId(componentId, 'error')}>\n <pds-icon icon={danger} size=\"small\" />\n {errorMessage}\n </p>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-input.js","sourceRoot":"","sources":["../../../../src/components/pds-input/pds-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;;;;GAMG;AAOH,MAAM,OAAO,QAAQ;IANrB;QASU,wBAAmB,GAAe,EAAE,CAAC;QACrC,gBAAW,GAAG,KAAK,CAAC;QAOpB,cAAS,GAAG,KAAK,CAAC;QAI1B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,eAAU,GAAG,KAAK,CAAC;QAE5B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,cAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\nimport { debounceEvent } from '@utils/utils';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot append - Content to be displayed after the input field\n * @slot prefix - Content that is displayed visually within the input field before the input field\n * @slot prepend - Content to be displayed before the input field\n * @slot suffix - Content that is displayed visually within the input field after the input field\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-input',\n styleUrls: ['pds-input.tokens.scss', '../../global/styles/utils/label.scss', 'pds-input.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsInput {\n\n private nativeInput?: HTMLInputElement;\n private inheritedAttributes: Attributes = {};\n private isComposing = false;\n private prefixEl?: HTMLElement;\n private suffixEl?: HTMLElement;\n private focusedValue?: string | number | null;\n private originalPdsInput?: EventEmitter<InputInputEventDetail>;\n private internals?: ElementInternals;\n private resizeObserver?: ResizeObserver;\n private hasLoaded = false;\n\n @Element() el!: HTMLPdsInputElement;\n\n /**\n * If true, the input has prefix content (non-focusable)\n */\n @State() hasPrefix = false;\n\n /**\n * If true, the input has suffix content (non-focusable)\n */\n @State() hasSuffix = false;\n\n /**\n * If true, the input has prepend content (focusable)\n */\n @State() hasPrepend = false;\n\n /**\n * If true, the input has append content (focusable)\n */\n @State() hasAppend = false;\n\n /**\n * If true, the input has action content in the label area\n */\n @State() hasAction = false;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value has changed.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n */\n @Event() pdsInput: EventEmitter<InputInputEventDetail>;\n\n /**\n * Emitted when a key is pressed down in the input.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\n\n /**\n * Sets focus on the native `input` in the `pds-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Sets the number of milliseconds to wait before updating the value.\n */\n @Prop() debounce?: number;\n\n /**\n * Determines whether or not the input field is disabled.\n */\n @Prop() disabled?: boolean;\n\n /**\n * Specifies the error message and provides an error-themed treatment to the field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the input field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the input field is invalid or throws an error.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the input label.\n */\n @Prop() label?: string;\n\n /**\n * Visually hides the label text for instances where only the input should be displayed. Label remains accessible to assistive technology such as screen readers.\n * Note: When true, the action slot is also hidden to maintain a minimal UI.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Specifies the maximum value for the input field.\n */\n @Prop() max?: string;\n\n /**\n * Specifies the maximum number of characters allowed in the input field.\n */\n @Prop() maxlength?: string;\n\n /**\n * Specifies the minimum value for the input field.\n */\n @Prop() min?: string;\n\n /**\n * Specifies the minimum number of characters allowed in the input field.\n */\n @Prop() minlength?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Specifies the regular expression that the input value is checked against.\n */\n @Prop() pattern?: string;\n\n /**\n * Specifies a short hint that describes the expected value of the input field.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the input field is readonly.\n */\n @Prop() readonly?: boolean;\n\n /**\n * Determines whether or not the input field is required.\n */\n @Prop() required?: boolean;\n\n /**\n * Works with the `min` and `max` attributes to define increments for the input field.\n */\n @Prop() step?: string;\n\n /**\n * Determines the type of control that will be displayed\n * `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`, `'url'`\n * @defaultValue \"text\"\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({mutable: true}) value?: string | number | null = '';\n\n /**\n * Determines whether or not the input field takes full width of its container.\n */\n @Prop() fullWidth?: boolean;\n\n /**\n * Applies highlight styling to the input field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * Determines if the input has focus.\n */\n @State() hasFocus = false;\n\n private observeAddonResize() {\n if (typeof ResizeObserver === 'undefined') return;\n\n // Disconnect existing observer before creating a new one\n this.resizeObserver?.disconnect();\n\n this.resizeObserver = new ResizeObserver(() => {\n this.updateAddonWidths();\n });\n\n if (this.prefixEl) {\n this.resizeObserver.observe(this.prefixEl);\n }\n\n if (this.suffixEl) {\n this.resizeObserver.observe(this.suffixEl);\n }\n }\n\n private updateAddonWidths() {\n requestAnimationFrame(() => {\n if (this.prefixEl) {\n const prefixWidth = this.prefixEl.offsetWidth;\n this.el.style.setProperty('--prefix-width', `${prefixWidth}px`);\n }\n\n if (this.suffixEl) {\n const suffixWidth = this.suffixEl.offsetWidth;\n this.el.style.setProperty('--suffix-width', `${suffixWidth}px`);\n }\n });\n }\n\n private renderPrefix() {\n const hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n if (hasPrefix) {\n return (\n <div class=\"pds-input__prefix\" part=\"prefix\" ref={(el) => this.prefixEl = el as HTMLElement}>\n <slot name=\"prefix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderSuffix() {\n const hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n if (hasSuffix) {\n return (\n <div class=\"pds-input__suffix\" part=\"suffix\" ref={(el) => this.suffixEl = el as HTMLElement}>\n <slot name=\"suffix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderPrepend() {\n const hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n if (hasPrepend) {\n return (\n <div class=\"pds-input__prepend\" part=\"prepend\">\n <slot name=\"prepend\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAppend() {\n const hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n if (hasAppend) {\n return (\n <div class=\"pds-input__append\" part=\"append\">\n <slot name=\"append\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-input__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n };\n this.hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n this.hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n this.hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n this.hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n\n // Store the original pdsInput event emitter\n this.originalPdsInput = this.pdsInput;\n }\n\n connectedCallback() {\n // Initialize ElementInternals for form association (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n\n // Re-establish ResizeObserver after DOM reconnection\n // Only run if component has already loaded (refs are available)\n if (this.hasLoaded && !this.resizeObserver) {\n this.updateAddonWidths();\n this.observeAddonResize();\n }\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n }\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.debounceChanged();\n this.updateAddonWidths();\n this.observeAddonResize();\n // Set initial form value\n this.updateFormValue();\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n /**\n * If debounce is undefined, we have to manually revert the pdsInput emitter in case\n * debounce used to be set to a number. Otherwise, the event would stay debounced.\n */\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n\n if (nativeInput && nativeInput.value !== value && !this.isComposing) {\n nativeInput.value = value;\n }\n\n // Update form value when value changes\n this.updateFormValue();\n }\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n private onInputEvent = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onChangeEvent = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlurEvent = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `pdsChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocusEvent = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onCompositionStart = () => {\n this.isComposing = true;\n }\n\n private onCompositionEnd = () => {\n this.isComposing = false;\n }\n\n private onKeyDownEvent = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(ev);\n };\n\n /**\n * Emits a pdsChange event\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n const newValue = value == null ? value : value.toString();\n\n this.focusedValue = newValue;\n this.pdsChange.emit({ value: newValue, event });\n }\n\n /**\n * Emits a `pdsInput` event\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n\n this.pdsInput.emit({ value: newValue, event });\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (this.internals && this.internals.setFormValue) {\n const value = this.getValue();\n this.internals.setFormValue(value || null);\n\n // Set validity based on native input validation\n if (this.nativeInput && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.nativeInput.validity,\n this.nativeInput.validationMessage,\n this.nativeInput\n );\n }\n }\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value from FormData using the input's name\n const value = state.get(this.name);\n if (typeof value === 'string') {\n this.value = value;\n }\n }\n }\n\n render() {\n const {\n componentId,\n disabled,\n errorMessage,\n helperMessage,\n invalid = false,\n label,\n } = this;\n\n const value = this.getValue();\n\n const inputWrapperClasses = {\n 'pds-input__field-wrapper': true,\n 'has-focus': this.hasFocus,\n 'has-error': invalid || !!errorMessage,\n 'is-disabled': disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n 'has-prepend': this.hasPrepend,\n 'has-append': this.hasAppend,\n };\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-prefix={this.hasPrefix ? 'true' : null}\n has-suffix={this.hasSuffix ? 'true' : null}\n has-prepend={this.hasPrepend ? 'true' : null}\n has-append={this.hasAppend ? 'true' : null}\n has-action={this.hasAction && !this.hideLabel ? 'true' : null}\n full-width={this.fullWidth ? 'true' : null}\n >\n <div class=\"pds-input\">\n {label && (\n <div class=\"pds-input__label-wrapper\">\n <label htmlFor={componentId} class=\"pds-input__label\">\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {label}\n {this.required && <span class=\"pds-input__required-indicator\"> *</span>}\n </span>\n </label>\n {!this.hideLabel && this.renderAction()}\n </div>\n )}\n\n <div class={inputWrapperClasses}>\n {this.renderPrepend()}\n {this.renderPrefix()}\n <input\n ref={(input) => (this.nativeInput = input)}\n class=\"pds-input__field\"\n aria-describedby={assignDescription(componentId, invalid, helperMessage)}\n aria-invalid={invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n disabled={disabled}\n id={componentId}\n max={this.max}\n maxlength={this.maxlength}\n min={this.min}\n minlength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={value}\n onInput={this.onInputEvent}\n onChange={this.onChangeEvent}\n onBlur={this.onBlurEvent}\n onFocus={this.onFocusEvent}\n onKeyDown={this.onKeyDownEvent}\n onCompositionstart={this.onCompositionStart}\n onCompositionend={this.onCompositionEnd}\n {...this.inheritedAttributes}\n />\n {this.renderSuffix()}\n {this.renderAppend()}\n </div>\n\n {helperMessage && (\n <p class=\"pds-input__helper-message\" id={messageId(componentId, 'helper')}>\n {helperMessage}\n </p>\n )}\n\n {errorMessage && (\n <p class=\"pds-input__error-message\" id={messageId(componentId, 'error')}>\n <pds-icon icon={danger} size=\"small\" />\n {errorMessage}\n </p>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -801,16 +801,16 @@ export class PdsMultiselect {
801
801
  return (h(Host, { key: '824364c4ab70a90abc5542ac66eb8259e727e4e6', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: 'ff103de53850eef00dad44e97333c58a54c8ae59', class: "pds-multiselect" }, this.label && (h("label", { key: '0524860c38d53aeddf35e9905abe783cb1174d6b', htmlFor: this.componentId, class: {
802
802
  'pds-multiselect__label': true,
803
803
  'visually-hidden': this.hideLabel,
804
- } }, this.label)), h("div", { key: 'b6313b12f499656e98c33af524240fd51a332e68', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), onFocusout: this.handleContainerFocusOut, style: { width: this.triggerWidth } }, h("button", { key: 'fbf274a4dace5f039ce1ce46674d66a08c5c280d', ref: el => (this.triggerEl = el), type: "button", class: {
804
+ } }, this.label)), h("div", { key: 'b6313b12f499656e98c33af524240fd51a332e68', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), onFocusout: this.handleContainerFocusOut, style: { width: this.triggerWidth } }, h("button", { key: '0b7ecdbc2e16d27afe4863d626c38d437bc39044', ref: el => (this.triggerEl = el), type: "button", part: "trigger", class: {
805
805
  'pds-multiselect__trigger': true,
806
806
  'pds-multiselect__trigger--open': this.isOpen,
807
807
  'pds-multiselect__trigger--disabled': this.disabled,
808
808
  'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
809
809
  'pds-multiselect__trigger--has-value': hasSelections,
810
- }, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { key: '314fc7f00db71a170f1fc7c83306cebc3397a451', class: {
810
+ }, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { key: '0f38b462baa7ff229b05f3cacd1435d0890517cf', class: {
811
811
  'pds-multiselect__trigger-text': true,
812
812
  'pds-multiselect__trigger-text--placeholder': !hasSelections,
813
- } }, this.getTriggerText()), h("pds-icon", { key: 'e81690095180cfe9b4799c531ba5d7a9952a2a6c', class: "pds-multiselect__icon", icon: enlarge })), this.renderDropdown()), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (h("p", { key: 'd2a511d548d10a1bc5b9704f7de6f050e00cb9f4', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: '2cca6e85a6ca9033e7baea24a509bb6d7064119d', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '6f680d14585dac5c6de3d0ec864ef1311241d2d2', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: '5be84a5f96531cb2add1d490c292a7482b444b83', style: { display: 'none' } }, h("slot", { key: 'cf9bece8f341293b6fa701b185db3926510c3845' })))));
813
+ } }, this.getTriggerText()), h("pds-icon", { key: '63b558f6c42b177cb956afd613002adc3a85347b', class: "pds-multiselect__icon", icon: enlarge })), this.renderDropdown()), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (h("p", { key: '32732cfc57edacc77407b16ee4eb466817ca0a0d', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: '1e5cb7e19a3dd7717acfdf9feb1aadc8e12255de', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '31d6871e2960c9dc2946a847c9f961a57f568383', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: '31e91ed1303e67e3b587362310f1acdc47df59db', style: { display: 'none' } }, h("slot", { key: 'ccc33628411dad18051c7f3c3747177ee3f4a922' })))));
814
814
  }
815
815
  static get is() { return "pds-multiselect"; }
816
816
  static get encapsulation() { return "shadow"; }