@ganpatiinfo/gids-core-web 8.1.0 → 9.0.0

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 (79) hide show
  1. package/dist/css/index.css +696 -0
  2. package/dist/css/index.css.map +1 -1
  3. package/dist/custom-elements.json +332 -0
  4. package/dist/gids-field.js +1 -1
  5. package/dist/gids-icon.js +1 -1
  6. package/dist/gids-input.js +1 -1
  7. package/dist/gids-overflow-container.d.ts +11 -0
  8. package/dist/gids-overflow-container.js +1 -0
  9. package/dist/gids-overlay-provider.js +1 -1
  10. package/dist/gids-password-field.js +1 -1
  11. package/dist/gids-popover.d.ts +11 -0
  12. package/dist/gids-popover.js +1 -0
  13. package/dist/gids-scrim.js +1 -1
  14. package/dist/gids-text-field.js +1 -1
  15. package/dist/gids-toggle-button.js +1 -1
  16. package/dist/gids-tooltip.d.ts +11 -0
  17. package/dist/gids-tooltip.js +1 -0
  18. package/dist/index.js +1 -1
  19. package/dist/p-B8kX8Vqv.js +1 -0
  20. package/dist/p-CFw4_-5A.js +1 -0
  21. package/dist/{p-BVh4zbX4.js → p-DvoHLz_5.js} +1 -1
  22. package/dist/p-a3JfEYJp.js +1 -0
  23. package/dist/{p-BplPYg8z.js → p-iCAclJND.js} +1 -1
  24. package/dist/types/components/html/GidsAccordionItem/GidsAccordionItem.d.ts +4 -0
  25. package/dist/types/components/html/GidsAccordionItemContent/GidsAccordionItemContent.d.ts +5 -0
  26. package/dist/types/components/html/GidsAccordionItemHeader/GidsAccordionItemHeader.d.ts +4 -0
  27. package/dist/types/components/html/GidsButton/GidsButton.d.ts +1 -1
  28. package/dist/types/components/html/GidsDropdownItem/GidsDropdownItem.d.ts +9 -0
  29. package/dist/types/components/html/GidsDropdownMenu/GidsDropdownMenu.d.ts +6 -0
  30. package/dist/types/components/html/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts +5 -0
  31. package/dist/types/components/html/GidsEditButton/GidsEditButton.d.ts +7 -0
  32. package/dist/types/components/html/GidsFeedbackBlock/GidsFeedbackBlock.d.ts +4 -0
  33. package/dist/types/components/html/GidsListItem/GidsListItem.d.ts +11 -0
  34. package/dist/types/components/html/GidsMenu/GidsMenu.d.ts +6 -0
  35. package/dist/types/components/html/GidsMenuGroup/GidsMenuGroup.d.ts +5 -0
  36. package/dist/types/components/html/GidsProgressBar/GidsProgressBar.d.ts +4 -0
  37. package/dist/types/components/shared/GidsFloatingElementManager.d.ts +57 -0
  38. package/dist/types/components/shared/GidsFloatingElementTypes.d.ts +4 -0
  39. package/dist/types/components/webComponents/GidsOverflowContainer/GidsOverflowContainer.d.ts +10 -0
  40. package/dist/types/components/webComponents/GidsPopover/GidsPopover.d.ts +24 -0
  41. package/dist/types/components/webComponents/GidsTooltip/GidsTooltip.d.ts +23 -0
  42. package/dist/types/components.d.ts +101 -2
  43. package/dist/types/index.d.ts +2 -0
  44. package/dist/types/utils/childrenValidityUtils.d.ts +8 -0
  45. package/dist-bundled/es/gids-field.js +2 -2
  46. package/dist-bundled/es/gids-icon.js +9 -9
  47. package/dist-bundled/es/gids-input.js +1 -1
  48. package/dist-bundled/es/gids-overflow-container.js +39 -0
  49. package/dist-bundled/es/gids-overlay-provider.js +3 -3
  50. package/dist-bundled/es/gids-password-field.js +14 -14
  51. package/dist-bundled/es/gids-popover.js +110 -0
  52. package/dist-bundled/es/gids-scrim.js +5 -5
  53. package/dist-bundled/es/gids-text-field.js +13 -13
  54. package/dist-bundled/es/gids-toggle-button.js +5 -5
  55. package/dist-bundled/es/gids-tooltip.js +66 -0
  56. package/dist-bundled/es/index.js +33 -19
  57. package/dist-bundled/es/p-B8kX8Vqv-trBz4jdS.js +7 -0
  58. package/dist-bundled/es/p-CFw4_-5A-Dzvju3VE.js +25 -0
  59. package/dist-bundled/es/{p-DijVkS9b-CtFkEtlE.js → p-DijVkS9b-CeV1i4T-.js} +1 -1
  60. package/dist-bundled/es/{p-BVh4zbX4-C4UJ8LPX.js → p-DvoHLz_5-C5EvA91N.js} +6 -6
  61. package/dist-bundled/es/p-a3JfEYJp-DyhDK6VZ.js +1128 -0
  62. package/dist-bundled/es/{p-BplPYg8z-B8uAAfo4.js → p-iCAclJND-Bmsvd-W1.js} +2 -2
  63. package/dist-bundled/es/{p-veoOgDXg-DElc87c0.js → p-veoOgDXg-fRinub-C.js} +12 -5
  64. package/dist-bundled/umd/gids-field.umd.js +1 -1
  65. package/dist-bundled/umd/gids-icon.umd.js +2 -2
  66. package/dist-bundled/umd/gids-input.umd.js +1 -1
  67. package/dist-bundled/umd/gids-overflow-container.umd.js +5 -0
  68. package/dist-bundled/umd/gids-overlay-provider.umd.js +2 -2
  69. package/dist-bundled/umd/gids-password-field.umd.js +2 -2
  70. package/dist-bundled/umd/gids-popover.umd.js +5 -0
  71. package/dist-bundled/umd/gids-scrim.umd.js +2 -2
  72. package/dist-bundled/umd/gids-text-field.umd.js +2 -2
  73. package/dist-bundled/umd/gids-toggle-button.umd.js +3 -3
  74. package/dist-bundled/umd/gids-tooltip.umd.js +5 -0
  75. package/dist-bundled/umd/index.umd.js +2 -2
  76. package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -3
  77. package/package.json +278 -254
  78. package/dist/p-CWdkmFbc.js +0 -1
  79. package/dist-bundled/es/p-CWdkmFbc-D89ZE8Mi.js +0 -24
@@ -7,11 +7,11 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { GidsComponentButtonClickHandler, GidsIconWebProps, GidsInputWebStatus, GidsWebFieldStatus, RemovedGidsOverlayProviderNotificationQueueWebProps, RemovedGidsOverlayProviderSnackbarQueueWebProps, RemoveGidsInputProps, RemoveGidsPasswordFieldProps, RemoveGidsTextFieldProps, TextInputTypes } from "@ganpatiinfo/gids-web-shared";
9
9
  import { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
10
- import { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
10
+ import { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsFloatingElementPlacement, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
11
11
  import { JSXBase } from "./stencil-public-runtime";
12
12
  export { GidsComponentButtonClickHandler, GidsIconWebProps, GidsInputWebStatus, GidsWebFieldStatus, RemovedGidsOverlayProviderNotificationQueueWebProps, RemovedGidsOverlayProviderSnackbarQueueWebProps, RemoveGidsInputProps, RemoveGidsPasswordFieldProps, RemoveGidsTextFieldProps, TextInputTypes } from "@ganpatiinfo/gids-web-shared";
13
13
  export { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
14
- export { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
14
+ export { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsFloatingElementPlacement, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
15
15
  export { JSXBase } from "./stencil-public-runtime";
16
16
  export namespace Components {
17
17
  interface GidsField {
@@ -72,6 +72,12 @@ export namespace Components {
72
72
  "show"?: boolean;
73
73
  "timerInMs"?: number | undefined;
74
74
  }
75
+ interface GidsOverflowContainer {
76
+ /**
77
+ * @default 'bottom'
78
+ */
79
+ "shadowLocation"?: GidsOverflowContainerShadowLocation;
80
+ }
75
81
  interface GidsOverlayProvider {
76
82
  "queueComponent": (props: RemovedGidsOverlayProviderSnackbarQueueWebProps | RemovedGidsOverlayProviderNotificationQueueWebProps) => Promise<void>;
77
83
  }
@@ -104,6 +110,13 @@ export namespace Components {
104
110
  "textMinLength"?: number;
105
111
  "value"?: string;
106
112
  }
113
+ interface GidsPopover {
114
+ "htmlFor": string;
115
+ /**
116
+ * @default 'bottom'
117
+ */
118
+ "placement": GidsFloatingElementPlacement;
119
+ }
107
120
  interface GidsScrim {
108
121
  "extraClasses"?: string | undefined;
109
122
  }
@@ -184,6 +197,22 @@ export namespace Components {
184
197
  */
185
198
  "width"?: GidsButtonWidth;
186
199
  }
200
+ interface GidsTooltip {
201
+ "htmlFor": string;
202
+ /**
203
+ * @default false
204
+ */
205
+ "lockToMainAxis": boolean;
206
+ /**
207
+ * @default 'bottom'
208
+ */
209
+ "placement": GidsFloatingElementPlacement;
210
+ /**
211
+ * @default false
212
+ */
213
+ "showWithoutDelay": boolean;
214
+ "tooltipText": string;
215
+ }
187
216
  }
188
217
  export interface GidsPasswordFieldCustomEvent<T> extends CustomEvent<T> {
189
218
  detail: T;
@@ -222,6 +251,12 @@ declare global {
222
251
  prototype: HTMLGidsNotificationElement;
223
252
  new (): HTMLGidsNotificationElement;
224
253
  };
254
+ interface HTMLGidsOverflowContainerElement extends Components.GidsOverflowContainer, HTMLStencilElement {
255
+ }
256
+ var HTMLGidsOverflowContainerElement: {
257
+ prototype: HTMLGidsOverflowContainerElement;
258
+ new (): HTMLGidsOverflowContainerElement;
259
+ };
225
260
  interface HTMLGidsOverlayProviderElement extends Components.GidsOverlayProvider, HTMLStencilElement {
226
261
  }
227
262
  var HTMLGidsOverlayProviderElement: {
@@ -246,6 +281,12 @@ declare global {
246
281
  prototype: HTMLGidsPasswordFieldElement;
247
282
  new (): HTMLGidsPasswordFieldElement;
248
283
  };
284
+ interface HTMLGidsPopoverElement extends Components.GidsPopover, HTMLStencilElement {
285
+ }
286
+ var HTMLGidsPopoverElement: {
287
+ prototype: HTMLGidsPopoverElement;
288
+ new (): HTMLGidsPopoverElement;
289
+ };
249
290
  interface HTMLGidsScrimElement extends Components.GidsScrim, HTMLStencilElement {
250
291
  }
251
292
  var HTMLGidsScrimElement: {
@@ -292,17 +333,26 @@ declare global {
292
333
  prototype: HTMLGidsToggleButtonElement;
293
334
  new (): HTMLGidsToggleButtonElement;
294
335
  };
336
+ interface HTMLGidsTooltipElement extends Components.GidsTooltip, HTMLStencilElement {
337
+ }
338
+ var HTMLGidsTooltipElement: {
339
+ prototype: HTMLGidsTooltipElement;
340
+ new (): HTMLGidsTooltipElement;
341
+ };
295
342
  interface HTMLElementTagNameMap {
296
343
  "gids-field": HTMLGidsFieldElement;
297
344
  "gids-icon": HTMLGidsIconElement;
298
345
  "gids-input": HTMLGidsInputElement;
299
346
  "gids-notification": HTMLGidsNotificationElement;
347
+ "gids-overflow-container": HTMLGidsOverflowContainerElement;
300
348
  "gids-overlay-provider": HTMLGidsOverlayProviderElement;
301
349
  "gids-password-field": HTMLGidsPasswordFieldElement;
350
+ "gids-popover": HTMLGidsPopoverElement;
302
351
  "gids-scrim": HTMLGidsScrimElement;
303
352
  "gids-snackbar": HTMLGidsSnackbarElement;
304
353
  "gids-text-field": HTMLGidsTextFieldElement;
305
354
  "gids-toggle-button": HTMLGidsToggleButtonElement;
355
+ "gids-tooltip": HTMLGidsTooltipElement;
306
356
  }
307
357
  }
308
358
  declare namespace LocalJSX {
@@ -365,6 +415,12 @@ declare namespace LocalJSX {
365
415
  "show"?: boolean;
366
416
  "timerInMs"?: number | undefined;
367
417
  }
418
+ interface GidsOverflowContainer {
419
+ /**
420
+ * @default 'bottom'
421
+ */
422
+ "shadowLocation"?: GidsOverflowContainerShadowLocation;
423
+ }
368
424
  interface GidsOverlayProvider {
369
425
  }
370
426
  interface GidsPasswordField {
@@ -398,6 +454,13 @@ declare namespace LocalJSX {
398
454
  "textMinLength"?: number;
399
455
  "value"?: string;
400
456
  }
457
+ interface GidsPopover {
458
+ "htmlFor"?: string;
459
+ /**
460
+ * @default 'bottom'
461
+ */
462
+ "placement"?: GidsFloatingElementPlacement;
463
+ }
401
464
  interface GidsScrim {
402
465
  "extraClasses"?: string | undefined;
403
466
  }
@@ -480,6 +543,22 @@ declare namespace LocalJSX {
480
543
  */
481
544
  "width"?: GidsButtonWidth;
482
545
  }
546
+ interface GidsTooltip {
547
+ "htmlFor"?: string;
548
+ /**
549
+ * @default false
550
+ */
551
+ "lockToMainAxis"?: boolean;
552
+ /**
553
+ * @default 'bottom'
554
+ */
555
+ "placement"?: GidsFloatingElementPlacement;
556
+ /**
557
+ * @default false
558
+ */
559
+ "showWithoutDelay"?: boolean;
560
+ "tooltipText"?: string;
561
+ }
483
562
 
484
563
  interface GidsFieldAttributes {
485
564
  "disabled": boolean;
@@ -518,6 +597,9 @@ declare namespace LocalJSX {
518
597
  "position": GidsComponentPosition;
519
598
  "timerInMs": number | undefined;
520
599
  }
600
+ interface GidsOverflowContainerAttributes {
601
+ "shadowLocation": GidsOverflowContainerShadowLocation;
602
+ }
521
603
  interface GidsPasswordFieldAttributes {
522
604
  "label": string;
523
605
  "showClearButton": boolean;
@@ -538,6 +620,10 @@ declare namespace LocalJSX {
538
620
  "fieldRequirementRequiredText": string | GidsLabelFieldRequirementTextFn;
539
621
  "textMinLength": number;
540
622
  }
623
+ interface GidsPopoverAttributes {
624
+ "htmlFor": string;
625
+ "placement": GidsFloatingElementPlacement;
626
+ }
541
627
  interface GidsScrimAttributes {
542
628
  "extraClasses": string | undefined;
543
629
  }
@@ -579,18 +665,28 @@ declare namespace LocalJSX {
579
665
  "defaultSelected": boolean;
580
666
  "selected": boolean | undefined;
581
667
  }
668
+ interface GidsTooltipAttributes {
669
+ "htmlFor": string;
670
+ "tooltipText": string;
671
+ "placement": GidsFloatingElementPlacement;
672
+ "showWithoutDelay": boolean;
673
+ "lockToMainAxis": boolean;
674
+ }
582
675
 
583
676
  interface IntrinsicElements {
584
677
  "gids-field": Omit<GidsField, keyof GidsFieldAttributes> & { [K in keyof GidsField & keyof GidsFieldAttributes]?: GidsField[K] } & { [K in keyof GidsField & keyof GidsFieldAttributes as `attr:${K}`]?: GidsFieldAttributes[K] } & { [K in keyof GidsField & keyof GidsFieldAttributes as `prop:${K}`]?: GidsField[K] };
585
678
  "gids-icon": Omit<GidsIcon, keyof GidsIconAttributes> & { [K in keyof GidsIcon & keyof GidsIconAttributes]?: GidsIcon[K] } & { [K in keyof GidsIcon & keyof GidsIconAttributes as `attr:${K}`]?: GidsIconAttributes[K] } & { [K in keyof GidsIcon & keyof GidsIconAttributes as `prop:${K}`]?: GidsIcon[K] } & OneOf<"name", GidsIcon["name"], GidsIconAttributes["name"]>;
586
679
  "gids-input": Omit<GidsInput, keyof GidsInputAttributes> & { [K in keyof GidsInput & keyof GidsInputAttributes]?: GidsInput[K] } & { [K in keyof GidsInput & keyof GidsInputAttributes as `attr:${K}`]?: GidsInputAttributes[K] } & { [K in keyof GidsInput & keyof GidsInputAttributes as `prop:${K}`]?: GidsInput[K] };
587
680
  "gids-notification": Omit<GidsNotification, keyof GidsNotificationAttributes> & { [K in keyof GidsNotification & keyof GidsNotificationAttributes]?: GidsNotification[K] } & { [K in keyof GidsNotification & keyof GidsNotificationAttributes as `attr:${K}`]?: GidsNotificationAttributes[K] } & { [K in keyof GidsNotification & keyof GidsNotificationAttributes as `prop:${K}`]?: GidsNotification[K] };
681
+ "gids-overflow-container": Omit<GidsOverflowContainer, keyof GidsOverflowContainerAttributes> & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes]?: GidsOverflowContainer[K] } & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes as `attr:${K}`]?: GidsOverflowContainerAttributes[K] } & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes as `prop:${K}`]?: GidsOverflowContainer[K] };
588
682
  "gids-overlay-provider": GidsOverlayProvider;
589
683
  "gids-password-field": Omit<GidsPasswordField, keyof GidsPasswordFieldAttributes> & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes]?: GidsPasswordField[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `attr:${K}`]?: GidsPasswordFieldAttributes[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `prop:${K}`]?: GidsPasswordField[K] };
684
+ "gids-popover": Omit<GidsPopover, keyof GidsPopoverAttributes> & { [K in keyof GidsPopover & keyof GidsPopoverAttributes]?: GidsPopover[K] } & { [K in keyof GidsPopover & keyof GidsPopoverAttributes as `attr:${K}`]?: GidsPopoverAttributes[K] } & { [K in keyof GidsPopover & keyof GidsPopoverAttributes as `prop:${K}`]?: GidsPopover[K] };
590
685
  "gids-scrim": Omit<GidsScrim, keyof GidsScrimAttributes> & { [K in keyof GidsScrim & keyof GidsScrimAttributes]?: GidsScrim[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `attr:${K}`]?: GidsScrimAttributes[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `prop:${K}`]?: GidsScrim[K] };
591
686
  "gids-snackbar": Omit<GidsSnackbar, keyof GidsSnackbarAttributes> & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes]?: GidsSnackbar[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `attr:${K}`]?: GidsSnackbarAttributes[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `prop:${K}`]?: GidsSnackbar[K] };
592
687
  "gids-text-field": Omit<GidsTextField, keyof GidsTextFieldAttributes> & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes]?: GidsTextField[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `attr:${K}`]?: GidsTextFieldAttributes[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `prop:${K}`]?: GidsTextField[K] };
593
688
  "gids-toggle-button": Omit<GidsToggleButton, keyof GidsToggleButtonAttributes> & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes]?: GidsToggleButton[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `attr:${K}`]?: GidsToggleButtonAttributes[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `prop:${K}`]?: GidsToggleButton[K] };
689
+ "gids-tooltip": Omit<GidsTooltip, keyof GidsTooltipAttributes> & { [K in keyof GidsTooltip & keyof GidsTooltipAttributes]?: GidsTooltip[K] } & { [K in keyof GidsTooltip & keyof GidsTooltipAttributes as `attr:${K}`]?: GidsTooltipAttributes[K] } & { [K in keyof GidsTooltip & keyof GidsTooltipAttributes as `prop:${K}`]?: GidsTooltip[K] };
594
690
  }
595
691
  }
596
692
  export { LocalJSX as JSX };
@@ -601,12 +697,15 @@ declare module "@stencil/core" {
601
697
  "gids-icon": LocalJSX.IntrinsicElements["gids-icon"] & JSXBase.HTMLAttributes<HTMLGidsIconElement>;
602
698
  "gids-input": LocalJSX.IntrinsicElements["gids-input"] & JSXBase.HTMLAttributes<HTMLGidsInputElement>;
603
699
  "gids-notification": LocalJSX.IntrinsicElements["gids-notification"] & JSXBase.HTMLAttributes<HTMLGidsNotificationElement>;
700
+ "gids-overflow-container": LocalJSX.IntrinsicElements["gids-overflow-container"] & JSXBase.HTMLAttributes<HTMLGidsOverflowContainerElement>;
604
701
  "gids-overlay-provider": LocalJSX.IntrinsicElements["gids-overlay-provider"] & JSXBase.HTMLAttributes<HTMLGidsOverlayProviderElement>;
605
702
  "gids-password-field": LocalJSX.IntrinsicElements["gids-password-field"] & JSXBase.HTMLAttributes<HTMLGidsPasswordFieldElement>;
703
+ "gids-popover": LocalJSX.IntrinsicElements["gids-popover"] & JSXBase.HTMLAttributes<HTMLGidsPopoverElement>;
606
704
  "gids-scrim": LocalJSX.IntrinsicElements["gids-scrim"] & JSXBase.HTMLAttributes<HTMLGidsScrimElement>;
607
705
  "gids-snackbar": LocalJSX.IntrinsicElements["gids-snackbar"] & JSXBase.HTMLAttributes<HTMLGidsSnackbarElement>;
608
706
  "gids-text-field": LocalJSX.IntrinsicElements["gids-text-field"] & JSXBase.HTMLAttributes<HTMLGidsTextFieldElement>;
609
707
  "gids-toggle-button": LocalJSX.IntrinsicElements["gids-toggle-button"] & JSXBase.HTMLAttributes<HTMLGidsToggleButtonElement>;
708
+ "gids-tooltip": LocalJSX.IntrinsicElements["gids-tooltip"] & JSXBase.HTMLAttributes<HTMLGidsTooltipElement>;
610
709
  }
611
710
  }
612
711
  }
@@ -1,3 +1,5 @@
1
1
  export * from './utils/constructedGidsStylesheet.js';
2
2
  export * from './utils/assets.js';
3
+ export * from './utils/childrenValidityUtils.js';
4
+ export { GidsFloatingElementType } from './components/shared/GidsFloatingElementTypes.js';
3
5
  export type * from './components.d.ts';
@@ -0,0 +1,8 @@
1
+ import type { FunctionalComponent, VNode } from '../stencil-public-runtime';
2
+ export interface TestHtmlChildrenValidity<T = Record<string, unknown>> {
3
+ children?: VNode;
4
+ classNameToBeValidated?: string;
5
+ childrenToBeValidated?: FunctionalComponent<T>;
6
+ currentComponentName?: string;
7
+ }
8
+ export declare const testHtmlChildrenValidity: <T>({ children, classNameToBeValidated, childrenToBeValidated, currentComponentName, }: TestHtmlChildrenValidity<T>) => void;
@@ -1,5 +1,5 @@
1
- import { d as e, h as s } from "./p-BplPYg8z-B8uAAfo4.js";
2
- const t = e, d = s;
1
+ import { d as e, h as o } from "./p-iCAclJND-Bmsvd-W1.js";
2
+ const t = e, d = o;
3
3
  export {
4
4
  t as GidsField,
5
5
  d as defineCustomElement
@@ -1,22 +1,22 @@
1
- import { C as o, H as e, f as n, R as d } from "./p-ibikYq-w-BsGxk8ro.js";
2
- import { i as a } from "./p-B2zUuNXz-BLBgQDu7.js";
3
- import { d as c } from "./p-veoOgDXg-DElc87c0.js";
4
- const t = o(class extends n {
1
+ import { C as o, H as e, f as d, R as a } from "./p-ibikYq-w-BsGxk8ro.js";
2
+ import { i as n } from "./p-B2zUuNXz-BLBgQDu7.js";
3
+ import { d as c } from "./p-veoOgDXg-fRinub-C.js";
4
+ const t = o(class extends d {
5
5
  constructor(i) {
6
6
  super(), i !== !1 && this.__registerHost(), this.__attachShadow();
7
7
  }
8
8
  connectedCallback() {
9
- const i = a();
9
+ const i = n();
10
10
  i !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(i);
11
11
  }
12
12
  render() {
13
- return d(c, { key: "d1215bf1b178ca6fb73458ecb8370b315239fa5b", name: this.name, size: this.size, appearance: this.appearance, alt: this.alt, titleId: this.titleId });
13
+ return a(c, { key: "3033afda529cd2143bd0d3c3ca5c985b4b950eae", name: this.name, size: this.size, appearance: this.appearance, alt: this.alt, titleId: this.titleId });
14
14
  }
15
15
  get _el() {
16
16
  return this;
17
17
  }
18
18
  static get style() {
19
- return ".gids-icon{fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%);flex-shrink:0}.gids-icon--xs{--gidsIcon-height:var(--gids-size-120)}.gids-icon--sm{--gidsIcon-height:var(--gids-size-160)}.gids-icon--md{--gidsIcon-height:var(--gids-size-240)}.gids-icon--lg{--gidsIcon-height:var(--gids-size-320)}";
19
+ return ".gids-icon{color:var(--gidsIcon-color, var(--gids-color-icon-default));fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%);flex-shrink:0}.gids-icon--xs{--gidsIcon-height:var(--gids-size-120)}.gids-icon--sm{--gidsIcon-height:var(--gids-size-160)}.gids-icon--md{--gidsIcon-height:var(--gids-size-240)}.gids-icon--lg{--gidsIcon-height:var(--gids-size-320)}";
20
20
  }
21
21
  }, [1, "gids-icon", { name: [1], size: [1], appearance: [1], alt: [1], titleId: [1, "title-id"] }]);
22
22
  function s() {
@@ -25,8 +25,8 @@ function s() {
25
25
  }));
26
26
  }
27
27
  s();
28
- const l = t, m = s;
28
+ const h = t, m = s;
29
29
  export {
30
- l as GidsIcon,
30
+ h as GidsIcon,
31
31
  m as defineCustomElement
32
32
  };
@@ -1,4 +1,4 @@
1
- import { l as r, r as s } from "./p-BVh4zbX4-C4UJ8LPX.js";
1
+ import { l as r, r as s } from "./p-DvoHLz_5-C5EvA91N.js";
2
2
  const e = r, o = s;
3
3
  export {
4
4
  e as GidsInput,
@@ -0,0 +1,39 @@
1
+ import { C as i, f as n, R as e, H as o } from "./p-ibikYq-w-BsGxk8ro.js";
2
+ import { i as l } from "./p-B2zUuNXz-BLBgQDu7.js";
3
+ const h = (t) => t === "top" || t === "top-bottom", c = (t) => t === "bottom" || t === "top-bottom", d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
+ __proto__: null,
5
+ showGidsOverflowContainerBottomShadow: c,
6
+ showGidsOverflowContainerTopShadow: h
7
+ }, Symbol.toStringTag, { value: "Module" })), { showGidsOverflowContainerBottomShadow: s, showGidsOverflowContainerTopShadow: f } = d, r = i(class extends n {
8
+ constructor(t) {
9
+ super(), t !== !1 && this.__registerHost(), this.__attachShadow(), this.shadowLocation = "bottom";
10
+ }
11
+ connectedCallback() {
12
+ const t = l();
13
+ t !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(t);
14
+ }
15
+ componentDidLoad() {
16
+ this._textArea = this._el.shadowRoot?.querySelector(".gids-overflow-container__text-area"), s(this.shadowLocation) && this._textArea.scrollHeight > this._textArea.offsetHeight && this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "1");
17
+ }
18
+ calculateShadows() {
19
+ const t = this._textArea.scrollTop <= 0 ? 0 : this._textArea.scrollTop;
20
+ this._textArea.scrollTop + this._textArea.offsetHeight >= this._textArea.scrollHeight ? this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "0") : t !== 0 ? t > 0 && (f(this.shadowLocation) && this._el.style.setProperty("--gidsOverflowContainer-before-opacity", "" + Math.min(t / 20, 1)), s(this.shadowLocation) && this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "" + Math.min((this._textArea.scrollHeight - (this._textArea.scrollTop + this._textArea.offsetHeight)) / 20, 1))) : this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "0");
21
+ }
22
+ render() {
23
+ return e("div", { key: "0a7916237558157e7122aeb05de6bf2eaaf5df77", class: "gids-overflow-container__text-area", onScroll: this.calculateShadows.bind(this) }, e("slot", { key: "fda73f846c0ec7371d57b7a8e379c028e0feaa98" }));
24
+ }
25
+ get _el() {
26
+ return this;
27
+ }
28
+ }, [257, "gids-overflow-container", { shadowLocation: [513, "shadow-location"] }]);
29
+ function a() {
30
+ typeof customElements < "u" && ["gids-overflow-container"].forEach(((t) => {
31
+ t === "gids-overflow-container" && (customElements.get(o(t)) || customElements.define(o(t), r));
32
+ }));
33
+ }
34
+ a();
35
+ const p = r, m = a;
36
+ export {
37
+ p as GidsOverflowContainer,
38
+ m as defineCustomElement
39
+ };
@@ -1,8 +1,8 @@
1
1
  import { C as k, f as y, R as o, L as w, H as f } from "./p-ibikYq-w-BsGxk8ro.js";
2
2
  import { i as x } from "./p-B2zUuNXz-BLBgQDu7.js";
3
3
  import { e as N, n as g } from "./p-CVtNa0cL-sSVeJsR3.js";
4
- import { d as p } from "./p-veoOgDXg-DElc87c0.js";
5
- import { a as u } from "./p-CWdkmFbc-D89ZE8Mi.js";
4
+ import { d as p } from "./p-veoOgDXg-fRinub-C.js";
5
+ import { o as u } from "./p-CFw4_-5A-Dzvju3VE.js";
6
6
  import { c as h } from "./clsx-OuTLNxxd.js";
7
7
  const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
8
8
  // 'gids-snackbar-container--appearance-default': appearance === 'default' // its a default
@@ -187,7 +187,7 @@ const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
187
187
  }
188
188
  render() {
189
189
  const t = this._allowedComponentQueue[0]?.position || "bottom-center";
190
- return o(w, { key: "90aa53804ede45cefeb6439d7d5466fbf3ce9bd9" }, o("slot", { key: "5705eaedb944a16514dc3570258ec67d60ad82c2" }), this._isRoot() ? o("div", { class: G({ position: t }) }, [...this._allowedComponentQueue].reverse().map(((e) => this._renderComponent(e)))) : null);
190
+ return o(w, { key: "cfacf71807978b22d6f2a9e33c0518e9aefc3a58" }, o("slot", { key: "4b4fa08f00a46a95ed4af543f85aad06affee847" }), this._isRoot() ? o("div", { class: G({ position: t }) }, [...this._allowedComponentQueue].reverse().map(((e) => this._renderComponent(e)))) : null);
191
191
  }
192
192
  get _el() {
193
193
  return this;
@@ -1,22 +1,22 @@
1
1
  import { C as S, f as P, V as v, N as x, R as i, L as T, H as h } from "./p-ibikYq-w-BsGxk8ro.js";
2
2
  import { i as C } from "./p-B2zUuNXz-BLBgQDu7.js";
3
- import { n as L, o as O } from "./p-DijVkS9b-CtFkEtlE.js";
4
- import { a as F } from "./p-CWdkmFbc-D89ZE8Mi.js";
5
- import { g as k, d as j } from "./p-veoOgDXg-DElc87c0.js";
6
- import { h as E } from "./p-BplPYg8z-B8uAAfo4.js";
7
- import { r as G } from "./p-BVh4zbX4-C4UJ8LPX.js";
3
+ import { n as L, o as O } from "./p-DijVkS9b-CeV1i4T-.js";
4
+ import { o as F } from "./p-CFw4_-5A-Dzvju3VE.js";
5
+ import { g as k, d as j } from "./p-veoOgDXg-fRinub-C.js";
6
+ import { h as E } from "./p-iCAclJND-Bmsvd-W1.js";
7
+ import { r as G } from "./p-DvoHLz_5-C5EvA91N.js";
8
8
  import { c as g } from "./clsx-OuTLNxxd.js";
9
9
  const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e, meterRules: t = [], textMinLength: s = 0 }) => {
10
10
  if (!e || e === "")
11
11
  return 0;
12
12
  let n = 0;
13
13
  return t.includes("1-uppercase") && f.test(e) && n++, t.includes("1-lowercase") && p.test(e) && n++, t.includes("1-digit") && b.test(e) && n++, t.includes("1-special-character") && q.test(e) && n++, t.includes("include-min-length") && s && s > 0 && e.length >= s && n++, n;
14
- }, B = ({ textScore: e, maxScore: t }) => {
14
+ }, A = ({ textScore: e, maxScore: t }) => {
15
15
  const s = t > 0 ? e / t * 100 : 0;
16
16
  return s <= 20 ? "is-weak" : s <= 40 ? "is-medium" : s <= 60 ? "is-good-enough" : s <= 80 ? "is-good" : "is-strong";
17
- }, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
17
+ }, B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18
18
  __proto__: null,
19
- getColorModifierByScore: B,
19
+ getColorModifierByScore: A,
20
20
  getStrengthMeterScore: z,
21
21
  include1DigitReg: b,
22
22
  include1LowercaseLetterReg: p,
@@ -76,13 +76,13 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
76
76
  defaultMeterRules: R(t),
77
77
  defaultRequirementsMeterRules: t
78
78
  };
79
- }, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
79
+ }, N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
80
80
  __proto__: null,
81
81
  checkRequirementRuleSatisfied: I,
82
82
  getDefaultRulesAndRequirementsForMeters: m,
83
83
  getMeterRulesFromRequirements: R,
84
84
  minLengthRuleCanBeApplied: d
85
- }, Symbol.toStringTag, { value: "Module" })), N = (e) => {
85
+ }, Symbol.toStringTag, { value: "Module" })), V = (e) => {
86
86
  switch (e) {
87
87
  case "error":
88
88
  return "danger";
@@ -97,7 +97,7 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
97
97
  }
98
98
  }, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
99
99
  __proto__: null,
100
- getRequirementsMeterLabelLeadingIcon: N
100
+ getRequirementsMeterLabelLeadingIcon: V
101
101
  }, Symbol.toStringTag, { value: "Module" })), D = (e) => {
102
102
  switch (e) {
103
103
  case "error":
@@ -127,7 +127,7 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
127
127
  }, Symbol.toStringTag, { value: "Module" })), { inputToGidsFieldStatusForPassword: X } = H, Y = (e) => e === "implicit" || e === void 0 ? "implicit" : X(e), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
128
128
  __proto__: null,
129
129
  inputToGidsFieldStatusForPassword: Y
130
- }, Symbol.toStringTag, { value: "Module" })), { getGidsStrengthMeterClassNames: te } = Z, { getStrengthMeterScore: se, getColorModifierByScore: re } = A, ie = ({ text: e, textMinLength: t, meterRules: s = ["1-uppercase", "1-lowercase", "1-digit", "1-special-character", "include-min-length"], class: n }) => {
130
+ }, Symbol.toStringTag, { value: "Module" })), { getGidsStrengthMeterClassNames: te } = Z, { getStrengthMeterScore: se, getColorModifierByScore: re } = B, ie = ({ text: e, textMinLength: t, meterRules: s = ["1-uppercase", "1-lowercase", "1-digit", "1-special-character", "include-min-length"], class: n }) => {
131
131
  const a = (r, l, u) => i("div", { key: r, class: ["gids-strength-meter__strength-" + r, u ? "is-active" : "", u ? l : ""].filter(Boolean).join(" ") });
132
132
  return s.length > 0 ? i("div", { class: te(n) }, (() => {
133
133
  const r = s.length, l = se({ text: e, textMinLength: t, meterRules: s }), u = re({ textScore: l, maxScore: r });
@@ -139,7 +139,7 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
139
139
  }, { getGidsRequirementsMeterLabelClassNames: ne } = J, { getRequirementsMeterLabelLeadingIcon: le } = $, ae = (e) => {
140
140
  const { label: t, status: s = "default", leadingIconVisible: n = !0, class: a } = e, r = le(s);
141
141
  return i("div", { class: ne({ status: s }, a) }, n && s && r ? i(j, { name: r, size: "sm", appearance: "filled" }) : null, t && t !== "" ? i("span", null, t) : null);
142
- }, { checkRequirementRuleSatisfied: ue } = V, { getGidsRequirementsMeterClassNames: oe } = Q, de = ({ requirements: e = [], text: t, textMinLength: s, class: n }) => {
142
+ }, { checkRequirementRuleSatisfied: ue } = N, { getGidsRequirementsMeterClassNames: oe } = Q, de = ({ requirements: e = [], text: t, textMinLength: s, class: n }) => {
143
143
  const a = (r, l) => i(ae, { status: l ? "success" : "error", label: r.requirementText });
144
144
  return i("div", { class: oe(n) }, e.map(((r) => {
145
145
  if (r?.requirementText != null && r?.requirementRule != null) {
@@ -190,7 +190,7 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
190
190
  #e;
191
191
  render() {
192
192
  const { id: e, ...t } = this.inputProps ?? {}, s = e ?? this.#t, n = this.showClearButton && this.value !== void 0 && this.value.length > 0, a = this.showRevealPasswordButton, r = { ...t }, l = r?.placeholder !== void 0 && r.placeholder !== null && r.placeholder != "" ? r.placeholder : "Enter password", u = this.isPasswordRevealed, _ = this.meterRules, c = this.textMinLength !== void 0 ? this.textMinLength : 8;
193
- return i(T, { key: "b83ca111267e69120811c23a02754fc2f3132131" }, i("gids-field", { key: "b10ea7b36a8f7daa4b5877e541ffa468ca06c474", disabled: this.disabled, count: void 0, helperText: this.helperText, statusText: this.statusText, status: ce(this.status) }, i(L, { key: "04f8c7ee920968585e77dff7e67494547285b6a6", slot: "label", disabled: this.disabled, info: i("slot", { name: "info" }), fieldRequirement: this.fieldRequirement, fieldRequirementOptionalText: this.fieldRequirementOptionalText, fieldRequirementRequiredText: this.fieldRequirementRequiredText, isLabelSentence: this.isLabelSentence, htmlFor: s }, this.label), i("gids-input", { key: "2892c5cda5ac6125e1b1c16195cbe45fed9ed0cd", ref: (o) => this.#e = o, appearance: "default", status: this.status, loading: this.loading, value: this.value, defaultValue: this.defaultValue, name: this.name, required: this.required, disabled: this.disabled, readOnly: this.readOnly, leadingLabel: void 0, trailingLabel: void 0, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur, onInput: this._handleInput, inputProps: { ...r, placeholder: l, type: u ? "text" : "password", id: s, maxLength: this.maxLength } }, i("slot", { key: "e6690ff215ac059385463b250d4b75876af23b6b", name: "leadingIcon" }), i("slot", { key: "a22761b031bc9e5d7d115d2c82969685dc4ec150", name: "leadingAccessory" }), i("div", { key: "6e4ddee96b624e07453b06966d02fe22060bdddf", slot: "trailingAccessory", class: "gids-password-field__trailing-accessory" }, n && i(O, { key: "1499342b7785379b68472713b19f2846cb39315c", label: "clear text", size: "lg", onPressDismiss: this._handleDismiss }), a && i(F, { key: "b309f288c0e7108f0896de407e1b8b4b6cd1f628", appearance: "default", size: "xs", width: "intrinsic", disabled: this.disabled, onClick: this._handleRevealPassword }, u ? "Hide" : "Show")))), i("div", { key: "7cbcb6a793de21d9f990b26ee0ff956a73d3f20e", class: "gids-password-field__meters-container" }, i(ie, { key: "f0085914442e068821fc01304e75a0fab47d3dd5", meterRules: _, text: this.value, textMinLength: c }), i(de, { key: "832be45d45074a520896001b80a20a0fd54695b7", requirements: this.requirementsMeterRequirements, text: this.value, textMinLength: c })));
193
+ return i(T, { key: "674d6baf90ed0a3b9bf6821fb288972ffe255909" }, i("gids-field", { key: "2b1f7f67ef3616edf29843b663c4e1efa8ce416a", disabled: this.disabled, count: void 0, helperText: this.helperText, statusText: this.statusText, status: ce(this.status) }, i(L, { key: "ccd09eba06b8876d216181b8dd7fbcb1ff742d86", slot: "label", disabled: this.disabled, info: i("slot", { name: "info" }), fieldRequirement: this.fieldRequirement, fieldRequirementOptionalText: this.fieldRequirementOptionalText, fieldRequirementRequiredText: this.fieldRequirementRequiredText, isLabelSentence: this.isLabelSentence, htmlFor: s }, this.label), i("gids-input", { key: "f9a8c8f13347b5dd7620e8498aeb85ec646f000f", ref: (o) => this.#e = o, appearance: "default", status: this.status, loading: this.loading, value: this.value, defaultValue: this.defaultValue, name: this.name, required: this.required, disabled: this.disabled, readOnly: this.readOnly, leadingLabel: void 0, trailingLabel: void 0, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur, onInput: this._handleInput, inputProps: { ...r, placeholder: l, type: u ? "text" : "password", id: s, maxLength: this.maxLength } }, i("slot", { key: "56c43774f755d7ae1ac6e633e39426d2b489414a", name: "leadingIcon" }), i("slot", { key: "1e964257af8f053e0d7c9de51fc0ec48a38b6d18", name: "leadingAccessory" }), i("div", { key: "f453197e76a4c8c01f1fa12a6f0c551a14f71f5d", slot: "trailingAccessory", class: "gids-password-field__trailing-accessory" }, n && i(O, { key: "3127641007c6eb5db4e9b8c6bd521e6cdf80e59b", label: "clear text", size: "lg", onPressDismiss: this._handleDismiss }), a && i(F, { key: "bc537fa18fabe13e16ec2a7c8b5f4611e589c4c7", appearance: "default", size: "xs", width: "intrinsic", disabled: this.disabled, onClick: this._handleRevealPassword }, u ? "Hide" : "Show")))), i("div", { key: "355033afd60090f7b04e48db5c1d675f29663e18", class: "gids-password-field__meters-container" }, i(ie, { key: "fb407fffb5de91b9bc30c1e7593fee01b5fa2a09", meterRules: _, text: this.value, textMinLength: c }), i(de, { key: "6888d147c99ea7902954e55ad91a5d64d7c1a031", requirements: this.requirementsMeterRequirements, text: this.value, textMinLength: c })));
194
194
  }
195
195
  get _el() {
196
196
  return this;
@@ -0,0 +1,110 @@
1
+ import { C as v, f as p, R as a, L as f, H as l } from "./p-ibikYq-w-BsGxk8ro.js";
2
+ import { g as b } from "./p-a3JfEYJp-DyhDK6VZ.js";
3
+ import { o as E } from "./p-B8kX8Vqv-trBz4jdS.js";
4
+ const h = v(class extends p {
5
+ constructor(e) {
6
+ super(), e !== !1 && this.__registerHost(), this.__attachShadow(), this.placement = "bottom", this.previouslyFocusedElement = null, this.focusableElements = [], this.handleToggleEvent = (t) => {
7
+ t.stopPropagation();
8
+ const n = this.floatingElementManager.isVisible();
9
+ this.floatingElementManager.toggle(), !n && this.floatingElementManager.isVisible() ? this.onPopoverShow() : n && !this.floatingElementManager.isVisible() && this.onPopoverHide();
10
+ }, this.handleDocumentClick = (t) => {
11
+ this.floatingElementManager.isVisible() && !this._el.contains(t.target) && (this.floatingElementManager.hide(), this.onPopoverHide());
12
+ }, this.handleKeyDown = (t) => {
13
+ if (this.floatingElementManager.isVisible()) return t.key === "Escape" ? (t.preventDefault(), this.floatingElementManager.hide(), void this.onPopoverHide()) : void (t.key === "Tab" && this.trapFocus(t));
14
+ };
15
+ }
16
+ componentDidLoad() {
17
+ this.floatingElementManager = new b(this._el, { htmlFor: this.htmlFor, placement: this.placement, showWithoutDelay: !0, floatingElementSelector: "#popover", arrowElementSelector: "#arrow", visibilityClass: "gids-popover--visible", elementType: E.POPOVER, getAnchorElementFromSlot: (e) => e.querySelector('slot[name="anchor"]')?.assignedElements()[0] || null }), this.floatingElementManager.initialize(), this.setupEventListeners();
18
+ }
19
+ setupEventListeners() {
20
+ const e = this.floatingElementManager.getAnchorElement();
21
+ e && (e.addEventListener("click", this.handleToggleEvent), document.addEventListener("click", this.handleDocumentClick), document.addEventListener("keydown", this.handleKeyDown));
22
+ }
23
+ onPopoverShow() {
24
+ this.previouslyFocusedElement = document.activeElement, this.updateFocusableElements(), setTimeout((() => {
25
+ this.focusableElements.length > 0 && this.focusableElements[0] && this.focusableElements[0].focus();
26
+ }), 50);
27
+ }
28
+ onPopoverHide() {
29
+ this.previouslyFocusedElement && (this.previouslyFocusedElement.focus(), this.previouslyFocusedElement = null);
30
+ }
31
+ updateFocusableElements() {
32
+ const e = this._el.shadowRoot?.querySelector("#popover");
33
+ if (!e) return;
34
+ const t = [], n = c(e);
35
+ t.push(...n);
36
+ const o = this._el.shadowRoot?.querySelector("slot:not([name])");
37
+ o && o.assignedElements({ flatten: !0 }).forEach(((i) => {
38
+ const s = c(i);
39
+ t.push(...s);
40
+ })), this.focusableElements = t.sort(((i, s) => {
41
+ const r = i.compareDocumentPosition(s), m = !!(r & Node.DOCUMENT_POSITION_FOLLOWING), u = !!(r & Node.DOCUMENT_POSITION_PRECEDING);
42
+ return m ? -1 : u ? 1 : 0;
43
+ }));
44
+ }
45
+ trapFocus(e) {
46
+ if (this.focusableElements.length === 0) return;
47
+ const t = this.focusableElements[0], n = this.focusableElements[this.focusableElements.length - 1];
48
+ let o = document.activeElement;
49
+ if (o === this._el) {
50
+ const s = this._el.shadowRoot?.activeElement;
51
+ s !== null && (o = s);
52
+ }
53
+ const i = this.focusableElements.indexOf(o) !== -1;
54
+ e.shiftKey ? o !== t && i || (e.preventDefault(), n && n.focus()) : o !== n && i || (e.preventDefault(), t && t.focus());
55
+ }
56
+ placementChanged(e) {
57
+ this.floatingElementManager?.updateConfig({ placement: e }), this.floatingElementManager?.isVisible() && this.floatingElementManager?.reposition();
58
+ }
59
+ htmlForChanged(e) {
60
+ this.floatingElementManager?.updateConfig({ htmlFor: e }), this.cleanupEventListeners(), this.floatingElementManager?.initialize(), this.setupEventListeners();
61
+ }
62
+ cleanupEventListeners() {
63
+ const e = this.floatingElementManager?.getAnchorElement();
64
+ e && e.removeEventListener("click", this.handleToggleEvent), document.removeEventListener("click", this.handleDocumentClick), document.removeEventListener("keydown", this.handleKeyDown);
65
+ }
66
+ render() {
67
+ return a(f, { key: "da6cbab41d3390a940444809d9fe809225c9426e" }, a("slot", { key: "5a5e5f72ab9c793e02b7bd633381363ab37cbf22", name: "anchor" }), a("div", { key: "49ab365961e8a3d9bf0e6ac67f2c73fda1eb7bb3", id: "popover", part: "popover", role: "dialog", "aria-modal": "true", tabindex: "-1" }, a("span", { key: "9815148f291ebca88b4a2bbe09b0e93fcbaab4a7", id: "arrow" }), a("div", { key: "b6d83da9bd180933b5f2453f3e66f66f692e35c1" }, a("slot", { key: "90aaeadfe9d09ebdd6534afa762b35c38a5cc57f" }))));
68
+ }
69
+ disconnectedCallback() {
70
+ this.cleanupEventListeners(), this.floatingElementManager?.destroy();
71
+ }
72
+ get _el() {
73
+ return this;
74
+ }
75
+ static get watchers() {
76
+ return { placement: [{ placementChanged: 0 }], htmlFor: [{ htmlForChanged: 0 }] };
77
+ }
78
+ static get style() {
79
+ return "gids-popover{--gidsPopover-background:var(--gids-elevation-surface-overlay-default);--gidsPopover-text-color:var(--gids-color-text-default);--gidsPopover-padding:var(--gids-padding-vertical-edge-to-element-200) var(--gids-padding-horizontal-edge-to-element-300);--gidsPopover-border-radius:var(--gids-border-radius-lg);--gidsPopover-tip-border-radius:2px;--gidsPopover-tip-size:12px;--gidsPopover-shadow:var(--gids-elevation-shadow-overlay);--gidsFloatingElement-background:var(--gidsPopover-background);--gidsFloatingElement-tip-border-radius:var(--gidsPopover-tip-border-radius)}[part=popover]{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);position:absolute;display:inline-block;background-color:var(--gidsPopover-background);color:var(--gidsPopover-text-color);border-radius:var(--gidsPopover-border-radius);box-shadow:var(--gidsPopover-shadow);z-index:1000;opacity:0;pointer-events:none;outline:none}[part=popover]:focus{outline:none}[part=popover].gids-popover--visible{pointer-events:initial;opacity:1}[part=popover] span#arrow{position:absolute;height:var(--gidsPopover-tip-size);width:var(--gidsPopover-tip-size);background-color:var(--gidsPopover-background)}";
80
+ }
81
+ }, [257, "gids-popover", { htmlFor: [513, "for"], placement: [513] }, void 0, { placement: [{ placementChanged: 0 }], htmlFor: [{ htmlForChanged: 0 }] }]), d = (e) => {
82
+ if (!(e instanceof p) || e.tabIndex === -1 || e.hasAttribute("disabled")) return !1;
83
+ const t = getComputedStyle(e);
84
+ if (t.display === "none" || t.visibility === "hidden" || e.hidden) return !1;
85
+ try {
86
+ const n = e.tabIndex;
87
+ e.tabIndex = -1, e.focus();
88
+ const o = document.activeElement === e;
89
+ return e.tabIndex = n, o && e.blur(), o;
90
+ } catch {
91
+ return !1;
92
+ }
93
+ }, c = (e) => {
94
+ const t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (i) => d(i) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP }), n = [];
95
+ d(e) && n.push(e);
96
+ let o = t.nextNode();
97
+ for (; o !== null; ) n.push(o), o = t.nextNode();
98
+ return n;
99
+ };
100
+ function g() {
101
+ typeof customElements < "u" && ["gids-popover"].forEach(((e) => {
102
+ e === "gids-popover" && (customElements.get(l(e)) || customElements.define(l(e), h));
103
+ }));
104
+ }
105
+ g();
106
+ const k = h, F = g;
107
+ export {
108
+ k as GidsPopover,
109
+ F as defineCustomElement
110
+ };
@@ -1,10 +1,10 @@
1
- import { C as c, f as o, R as e, H as t } from "./p-ibikYq-w-BsGxk8ro.js";
1
+ import { C as o, f as c, R as e, H as t } from "./p-ibikYq-w-BsGxk8ro.js";
2
2
  import { i as l } from "./p-B2zUuNXz-BLBgQDu7.js";
3
3
  import { c as n } from "./clsx-OuTLNxxd.js";
4
4
  const d = (s) => n("gids-scrim", s), m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  getGidsScrimClassNames: d
7
- }, Symbol.toStringTag, { value: "Module" })), { getGidsScrimClassNames: a } = m, r = c(class extends o {
7
+ }, Symbol.toStringTag, { value: "Module" })), { getGidsScrimClassNames: a } = m, r = o(class extends c {
8
8
  constructor(s) {
9
9
  super(), s !== !1 && this.__registerHost(), this.__attachShadow(), this.activeClasses = "";
10
10
  }
@@ -16,7 +16,7 @@ const d = (s) => n("gids-scrim", s), m = /* @__PURE__ */ Object.freeze(/* @__PUR
16
16
  s !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(s), this.activeClasses = a(this.extraClasses);
17
17
  }
18
18
  render() {
19
- return e("div", { key: "d2bbb04ec12ea535ec8d17e46ff365cb60ca3a38", class: this.activeClasses, part: "root" }, e("slot", { key: "00440386c5a5f7a1f58c27b7e182d08447e68d22" }));
19
+ return e("div", { key: "da4b587303359a6075411a1843e03eff6eed68ce", class: this.activeClasses, part: "root" }, e("slot", { key: "5a52f6e5628c771b2dd0f5a6221005a0ed8b9fbb" }));
20
20
  }
21
21
  get _el() {
22
22
  return this;
@@ -34,8 +34,8 @@ function i() {
34
34
  }));
35
35
  }
36
36
  i();
37
- const f = r, C = i;
37
+ const u = r, C = i;
38
38
  export {
39
- f as GidsScrim,
39
+ u as GidsScrim,
40
40
  C as defineCustomElement
41
41
  };