@ganpatiinfo/gids-web-dom-reference 7.2.0 → 8.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 (62) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/GidsButton/GidsButton.d.ts +1 -1
  3. package/dist/components/GidsButton/GidsButton.d.ts.map +1 -1
  4. package/dist/components/GidsButton/GidsButton.js +2 -2
  5. package/dist/components/GidsButton/GidsButton.js.map +1 -1
  6. package/dist/components/GidsDropdownItem/GidsDropdownItem.d.ts +10 -0
  7. package/dist/components/GidsDropdownItem/GidsDropdownItem.d.ts.map +1 -0
  8. package/dist/components/GidsDropdownItem/GidsDropdownItem.js +31 -0
  9. package/dist/components/GidsDropdownItem/GidsDropdownItem.js.map +1 -0
  10. package/dist/components/GidsDropdownMenu/GidsDropdownMenu.d.ts +7 -0
  11. package/dist/components/GidsDropdownMenu/GidsDropdownMenu.d.ts.map +1 -0
  12. package/dist/components/GidsDropdownMenu/GidsDropdownMenu.js +24 -0
  13. package/dist/components/GidsDropdownMenu/GidsDropdownMenu.js.map +1 -0
  14. package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts +7 -0
  15. package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts.map +1 -0
  16. package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.js +13 -0
  17. package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.js.map +1 -0
  18. package/dist/components/GidsEditButton/GidsEditButton.d.ts +8 -0
  19. package/dist/components/GidsEditButton/GidsEditButton.d.ts.map +1 -0
  20. package/dist/components/GidsEditButton/GidsEditButton.js +44 -0
  21. package/dist/components/GidsEditButton/GidsEditButton.js.map +1 -0
  22. package/dist/components/GidsListItem/GidsListItem.d.ts +11 -0
  23. package/dist/components/GidsListItem/GidsListItem.d.ts.map +1 -0
  24. package/dist/components/GidsListItem/GidsListItem.js +196 -0
  25. package/dist/components/GidsListItem/GidsListItem.js.map +1 -0
  26. package/dist/components/GidsMenu/GidsMenu.d.ts +7 -0
  27. package/dist/components/GidsMenu/GidsMenu.d.ts.map +1 -0
  28. package/dist/components/GidsMenu/GidsMenu.js +34 -0
  29. package/dist/components/GidsMenu/GidsMenu.js.map +1 -0
  30. package/dist/components/GidsMenuGroup/GidsMenuGroup.d.ts +7 -0
  31. package/dist/components/GidsMenuGroup/GidsMenuGroup.d.ts.map +1 -0
  32. package/dist/components/GidsMenuGroup/GidsMenuGroup.js +31 -0
  33. package/dist/components/GidsMenuGroup/GidsMenuGroup.js.map +1 -0
  34. package/dist/components/GidsPopover/GidsPopover.d.ts +7 -0
  35. package/dist/components/GidsPopover/GidsPopover.d.ts.map +1 -0
  36. package/dist/components/GidsPopover/GidsPopover.js +16 -0
  37. package/dist/components/GidsPopover/GidsPopover.js.map +1 -0
  38. package/dist/components/GidsTooltip/GidsTooltip.d.ts +6 -0
  39. package/dist/components/GidsTooltip/GidsTooltip.d.ts.map +1 -0
  40. package/dist/components/GidsTooltip/GidsTooltip.js +20 -0
  41. package/dist/components/GidsTooltip/GidsTooltip.js.map +1 -0
  42. package/dist/index.d.ts +10 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +10 -0
  45. package/dist/index.js.map +1 -1
  46. package/dist/utils/childrenValidationUtils.d.ts +9 -0
  47. package/dist/utils/childrenValidationUtils.d.ts.map +1 -0
  48. package/dist/utils/childrenValidationUtils.js +27 -0
  49. package/dist/utils/childrenValidationUtils.js.map +1 -0
  50. package/package.json +45 -45
  51. package/src/components/GidsButton/GidsButton.ts +2 -1
  52. package/src/components/GidsDropdownItem/GidsDropdownItem.ts +62 -0
  53. package/src/components/GidsDropdownMenu/GidsDropdownMenu.ts +43 -0
  54. package/src/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.ts +26 -0
  55. package/src/components/GidsEditButton/GidsEditButton.ts +71 -0
  56. package/src/components/GidsListItem/GidsListItem.ts +281 -0
  57. package/src/components/GidsMenu/GidsMenu.ts +64 -0
  58. package/src/components/GidsMenuGroup/GidsMenuGroup.ts +51 -0
  59. package/src/components/GidsPopover/GidsPopover.ts +32 -0
  60. package/src/components/GidsTooltip/GidsTooltip.ts +37 -0
  61. package/src/index.ts +10 -0
  62. package/src/utils/childrenValidationUtils.ts +47 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @ganpatiinfo/gids-web-dom-reference
2
2
 
3
+ ## 8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - c2e9c56: - Developed `GidsDropdownItem` component for all web platforms
8
+ - c6c28c4: - Developed `GidsEditButton` for all web platforms
9
+ - d9cfb37: - Updated `GidsStausTag` comoponent with new icons added
10
+ - 657e54f: - Developed `GidsPopover` component for all web platforms
11
+ - c6c28c4: - Developed `GidsListItem` component for all web platforms
12
+ - c2e9c56: - Developed `GidsDropdownMenu` component for all web platforms
13
+ - c2e9c56: - Developed `GidsDropdownMenuGroup` component for all web platforms
14
+ - 657e54f: - Developed `GidsTooltip` component for all web platforms
15
+ - 45d1ea5: - Developed `GidsMenu` component for all web platforms
16
+ - 45d1ea5: - Developed `GidsMenuGroup` component for all web platforms
17
+
18
+ ### Minor Changes
19
+
20
+ - c6c28c4: - Added a new prop `positive` for positive button for all web platforms
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [c2e9c56]
25
+ - Updated dependencies [c6c28c4]
26
+ - Updated dependencies [657e54f]
27
+ - Updated dependencies [d9cfb37]
28
+ - Updated dependencies [657e54f]
29
+ - Updated dependencies [c6c28c4]
30
+ - Updated dependencies [c2e9c56]
31
+ - Updated dependencies [c2e9c56]
32
+ - Updated dependencies [c6c28c4]
33
+ - Updated dependencies [657e54f]
34
+ - Updated dependencies [657e54f]
35
+ - Updated dependencies [71a0639]
36
+ - Updated dependencies [45d1ea5]
37
+ - Updated dependencies [45d1ea5]
38
+ - @ganpatiinfo/gids-core-shared@8.0.0
39
+ - @ganpatiinfo/gids-web-shared@8.0.0
40
+ - @ganpatiinfo/gids-web-theme-interface@5.0.0
41
+
3
42
  ## 7.2.0
4
43
 
5
44
  ### Minor Changes
@@ -5,5 +5,5 @@ export interface GidsButtonDomProps<ButtonElement extends PermittedGidsButtonEle
5
5
  href?: string;
6
6
  onClick?: (this: HTMLButtonElement, event: Event) => void;
7
7
  }
8
- export declare const GidsButtonDom: <ButtonElement extends PermittedGidsButtonElements = "button">({ as, appearance, size, disabled, destructive, loading, width, children, leadingIcon, trailingIcon, type, href, onClick, }: GidsButtonDomProps<ButtonElement>) => ButtonElement extends "button" ? HTMLButtonElement : HTMLAnchorElement;
8
+ export declare const GidsButtonDom: <ButtonElement extends PermittedGidsButtonElements = "button">({ as, appearance, size, disabled, destructive, positive, loading, width, children, leadingIcon, trailingIcon, type, href, onClick, }: GidsButtonDomProps<ButtonElement>) => ButtonElement extends "button" ? HTMLButtonElement : HTMLAnchorElement;
9
9
  //# sourceMappingURL=GidsButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GidsButton.d.ts","sourceRoot":"","sources":["../../../src/components/GidsButton/GidsButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,2BAA2B,EAC3B,KAAK,kBAAkB,EACvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI7E,MAAM,WAAW,kBAAkB,CAClC,aAAa,SAAS,2BAA2B,CAChD,SAAQ,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,CAAC;IACpE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,aAAa,GACzB,aAAa,SAAS,2BAA2B,GAAG,QAAQ,EAC3D,4HAcC,kBAAkB,CAAC,aAAa,CAAC,KAAG,aAAa,SAAS,QAAQ,GAClE,iBAAiB,GACjB,iBAmDF,CAAC"}
1
+ {"version":3,"file":"GidsButton.d.ts","sourceRoot":"","sources":["../../../src/components/GidsButton/GidsButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,2BAA2B,EAC3B,KAAK,kBAAkB,EACvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI7E,MAAM,WAAW,kBAAkB,CAClC,aAAa,SAAS,2BAA2B,CAChD,SAAQ,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,CAAC;IACpE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,aAAa,GACzB,aAAa,SAAS,2BAA2B,GAAG,QAAQ,EAC3D,sIAeC,kBAAkB,CAAC,aAAa,CAAC,KAAG,aAAa,SAAS,QAAQ,GAClE,iBAAiB,GACjB,iBAmDF,CAAC"}
@@ -2,9 +2,9 @@ import { GidsButtonWebUtils, nonEmpty, } from '@ganpatiinfo/gids-web-shared';
2
2
  import { GidsSpinnerControlDom } from '../_GidsSpinnerControl/GidsSpinnerControl.js';
3
3
  import { appendAsChildren } from '../../utils/domUtils.js';
4
4
  const { getGidsButtonClassNames } = GidsButtonWebUtils;
5
- export const GidsButtonDom = ({ as, appearance, size, disabled, destructive, loading, width, children, leadingIcon, trailingIcon, type, href, onClick, }) => {
5
+ export const GidsButtonDom = ({ as, appearance, size, disabled, destructive, positive, loading, width, children, leadingIcon, trailingIcon, type, href, onClick, }) => {
6
6
  const button = document.createElement(as || 'button');
7
- button.className = getGidsButtonClassNames({ appearance, size, width, destructive, loading }, !children && nonEmpty(leadingIcon) && !nonEmpty(trailingIcon));
7
+ button.className = getGidsButtonClassNames({ appearance, size, width, destructive, loading, positive }, !children && nonEmpty(leadingIcon) && !nonEmpty(trailingIcon));
8
8
  if (as !== 'a') {
9
9
  button.setAttribute('type', type ?? 'button');
10
10
  if (disabled) {
@@ -1 +1 @@
1
- {"version":3,"file":"GidsButton.js","sourceRoot":"","sources":["../../../src/components/GidsButton/GidsButton.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,QAAQ,GAGR,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAoB,MAAM,yBAAyB,CAAC;AAE7E,MAAM,EAAE,uBAAuB,EAAE,GAAG,kBAAkB,CAAC;AAUvD,MAAM,CAAC,MAAM,aAAa,GAAG,CAE3B,EACD,EAAE,EACF,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,OAAO,GAC4B,EAEf,EAAE;IACtB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CACpC,EAAE,IAAI,QAAQ,CAC4D,CAAC;IAE5E,MAAM,CAAC,SAAS,GAAG,uBAAuB,CACzC,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,EACjD,CAAC,QAAQ,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAC7D,CAAC;IAEF,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,IAAI,QAAQ,CAAC,CAAC;QAE9C,IAAI,QAAQ,EAAE,CAAC;YACd,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACr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EvC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEpC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAE5B,gBAAgB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAEvC,IAAI,OAAO,EAAE,CAAC;QACb,MAAM,CAAC,WAAW,CACjB,qBAAqB,CAAC;YACrB,IAAI,EAAE,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;YACvD,aAAa,EAAE,IAAI;SACnB,CAAC,CACF,CAAC;IACH,CAAC;IAED,IAAI,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;QACzB,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type GidsDropdownItemWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsDropdownItemSelectEventDetail } from '@ganpatiinfo/gids-core-shared';
3
+ import { DomChildren } from '../../utils/domUtils.js';
4
+ export interface GidsDropdownItemDomProps extends GidsDropdownItemWebProps<DomChildren> {
5
+ name?: string;
6
+ extraClasses?: string;
7
+ onPressDropdownItem?: (event: CustomEvent<GidsDropdownItemSelectEventDetail>) => void;
8
+ }
9
+ export declare const GidsDropdownItemDom: ({ title, selected, disabled, extraClasses, name, value, onPressDropdownItem, index, defaultSelectedIndex, leadingAccessory, }: GidsDropdownItemDomProps) => HTMLButtonElement;
10
+ //# sourceMappingURL=GidsDropdownItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDropdownItem.d.ts","sourceRoot":"","sources":["../../../src/components/GidsDropdownItem/GidsDropdownItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,iCAAiC,EAEjC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB,CAAC,WAAW,CAAC;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,CACrB,KAAK,EAAE,WAAW,CAAC,iCAAiC,CAAC,KACjD,IAAI,CAAC;CACV;AAED,eAAO,MAAM,mBAAmB,GAAI,+HAWjC,wBAAwB,KAAG,iBA6B7B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { GidsDropdownItemWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsListItemDom } from '../GidsListItem/GidsListItem.js';
3
+ const { getGidsDropdownItemClassNames } = GidsDropdownItemWebUtils;
4
+ export const GidsDropdownItemDom = ({ title, selected = false, disabled = false, extraClasses, name, value, onPressDropdownItem, index, defaultSelectedIndex, leadingAccessory, }) => {
5
+ return GidsListItemDom({
6
+ children: title,
7
+ index,
8
+ defaultSelectedIndex,
9
+ selected,
10
+ disabled,
11
+ extraClasses: getGidsDropdownItemClassNames(extraClasses),
12
+ name,
13
+ leadingAccessory,
14
+ onPressListItem: (event) => {
15
+ const customEvent = new CustomEvent('onPressDropdownItem', {
16
+ bubbles: true,
17
+ composed: true,
18
+ detail: {
19
+ title,
20
+ value,
21
+ disabled,
22
+ ...event.detail,
23
+ },
24
+ });
25
+ if (onPressDropdownItem) {
26
+ onPressDropdownItem(customEvent);
27
+ }
28
+ },
29
+ });
30
+ };
31
+ //# sourceMappingURL=GidsDropdownItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDropdownItem.js","sourceRoot":"","sources":["../../../src/components/GidsDropdownItem/GidsDropdownItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOlE,MAAM,EAAE,6BAA6B,EAAE,GAAG,wBAAwB,CAAC;AAUnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EACnC,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,mBAAmB,EACnB,KAAK,EACL,oBAAoB,EACpB,gBAAgB,GACU,EAAqB,EAAE;IACjD,OAAO,eAAe,CAAC;QACtB,QAAQ,EAAE,KAAK;QACf,KAAK;QACL,oBAAoB;QACpB,QAAQ;QACR,QAAQ;QACR,YAAY,EAAE,6BAA6B,CAAC,YAAY,CAAC;QACzD,IAAI;QACJ,gBAAgB;QAChB,eAAe,EAAE,CAAC,KAAiD,EAAE,EAAE;YACtE,MAAM,WAAW,GAAG,IAAI,WAAW,CAClC,qBAAqB,EACrB;gBACC,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACP,KAAK;oBACL,KAAK;oBACL,QAAQ;oBACR,GAAG,KAAK,CAAC,MAAM;iBACf;aACD,CACD,CAAC;YACF,IAAI,mBAAmB,EAAE,CAAC;gBACzB,mBAAmB,CAAC,WAAW,CAAC,CAAC;YAClC,CAAC;QACF,CAAC;KACD,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type GidsDropdownMenuWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsDropdownMenuDomProps extends GidsDropdownMenuWebProps<DomChildren> {
4
+ extraClasses?: string;
5
+ }
6
+ export declare const GidsDropdownMenuDom: ({ sectionLabel, children, extraClasses, }: GidsDropdownMenuDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsDropdownMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/GidsDropdownMenu/GidsDropdownMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKxE,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB,CAAC,WAAW,CAAC;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,GAAI,2CAIjC,wBAAwB,KAAG,cAyB7B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { GidsDropdownMenuWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ import { GidsHeadingDom } from '../GidsHeading/GidsHeading.js';
4
+ const { getGidsDropdownMenuClassNames } = GidsDropdownMenuWebUtils;
5
+ export const GidsDropdownMenuDom = ({ sectionLabel, children, extraClasses, }) => {
6
+ const dropdownMenu = document.createElement('div');
7
+ dropdownMenu.className = getGidsDropdownMenuClassNames(extraClasses);
8
+ if (sectionLabel !== undefined &&
9
+ sectionLabel !== null &&
10
+ sectionLabel !== '') {
11
+ dropdownMenu.append(GidsHeadingDom({
12
+ supportingText: sectionLabel,
13
+ supportingTextTypography: 'eyebrow-medium',
14
+ }));
15
+ }
16
+ if (children !== undefined && children !== null) {
17
+ const childrenContainer = document.createElement('div');
18
+ childrenContainer.className = 'gids-dropdown-menu__children';
19
+ appendAsChildren(childrenContainer, children);
20
+ appendAsChildren(dropdownMenu, childrenContainer);
21
+ }
22
+ return dropdownMenu;
23
+ };
24
+ //# sourceMappingURL=GidsDropdownMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDropdownMenu.js","sourceRoot":"","sources":["../../../src/components/GidsDropdownMenu/GidsDropdownMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,EAAE,6BAA6B,EAAE,GAAG,wBAAwB,CAAC;AAMnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EACnC,YAAY,EACZ,QAAQ,EACR,YAAY,GACc,EAAkB,EAAE;IAC9C,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnD,YAAY,CAAC,SAAS,GAAG,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAErE,IACC,YAAY,KAAK,SAAS;QAC1B,YAAY,KAAK,IAAI;QACrB,YAAY,KAAK,EAAE,EAClB,CAAC;QACF,YAAY,CAAC,MAAM,CAClB,cAAc,CAAC;YACd,cAAc,EAAE,YAAY;YAC5B,wBAAwB,EAAE,gBAAgB;SAC1C,CAAC,CACF,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACjD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACxD,iBAAiB,CAAC,SAAS,GAAG,8BAA8B,CAAC;QAC7D,gBAAgB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAC9C,gBAAgB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GidsDropdownMenuGroupWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsDropdownMenuGroupDomProps extends GidsDropdownMenuGroupWebProps<DomChildren> {
4
+ extraClasses?: string;
5
+ }
6
+ export declare const GidsDropdownMenuGroupDom: ({ children, extraClasses, }: GidsDropdownMenuGroupDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsDropdownMenuGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDropdownMenuGroup.d.ts","sourceRoot":"","sources":["../../../src/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,6BAA6B,EAE7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIxE,MAAM,WAAW,6BAA8B,SAAQ,6BAA6B,CAAC,WAAW,CAAC;IAChG,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,GAAI,6BAGtC,6BAA6B,KAAG,cAUlC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { GidsDropdownMenuGroupWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ const { getGidsDropdownMenuGroupClassNames } = GidsDropdownMenuGroupWebUtils;
4
+ export const GidsDropdownMenuGroupDom = ({ children, extraClasses, }) => {
5
+ const dropdownMenuGroup = document.createElement('div');
6
+ dropdownMenuGroup.className =
7
+ getGidsDropdownMenuGroupClassNames(extraClasses);
8
+ if (children !== undefined && children !== null && children !== '') {
9
+ appendAsChildren(dropdownMenuGroup, children);
10
+ }
11
+ return dropdownMenuGroup;
12
+ };
13
+ //# sourceMappingURL=GidsDropdownMenuGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDropdownMenuGroup.js","sourceRoot":"","sources":["../../../src/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,6BAA6B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AAExE,MAAM,EAAE,kCAAkC,EAAE,GAAG,6BAA6B,CAAC;AAM7E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACxC,QAAQ,EACR,YAAY,GACmB,EAAkB,EAAE;IACnD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACxD,iBAAiB,CAAC,SAAS;QAC1B,kCAAkC,CAAC,YAAY,CAAC,CAAC;IAElD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QACpE,gBAAgB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC1B,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ClassValue, GidsEditButtonWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsEditButtonDomProps extends GidsEditButtonWebProps<DomChildren> {
4
+ onPressEditButton?: (this: HTMLButtonElement, event: Event) => void;
5
+ extraClasses?: ClassValue;
6
+ }
7
+ export declare const GidsEditButtonDom: ({ disabled, children, size, editButtonType, onPressEditButton, extraClasses, }: GidsEditButtonDomProps) => HTMLButtonElement;
8
+ //# sourceMappingURL=GidsEditButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsEditButton.d.ts","sourceRoot":"","sources":["../../../src/components/GidsEditButton/GidsEditButton.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,sBAAsB,EAEtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKxE,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB,CAAC,WAAW,CAAC;IAClF,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACpE,YAAY,CAAC,EAAE,UAAU,CAAC;CAC1B;AAED,eAAO,MAAM,iBAAiB,GAAI,gFAO/B,sBAAsB,KAAG,iBAgD3B,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { GidsEditButtonWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ import { GidsIconDom } from '../GidsIcon/GidsIcon';
4
+ const { getGidsEditButtonClassNames } = GidsEditButtonWebUtils;
5
+ export const GidsEditButtonDom = ({ disabled, children, size = 'md', editButtonType = 'add', onPressEditButton, extraClasses, }) => {
6
+ const editButton = document.createElement('button');
7
+ editButton.className = getGidsEditButtonClassNames({ size }, extraClasses);
8
+ if (disabled) {
9
+ editButton.setAttribute('disabled', '');
10
+ }
11
+ else {
12
+ editButton.removeAttribute('disabled');
13
+ }
14
+ const btnIconContainer = document.createElement('div');
15
+ if (editButtonType === 'custom' && children) {
16
+ appendAsChildren(btnIconContainer, children);
17
+ }
18
+ if (editButtonType === 'add') {
19
+ btnIconContainer.className = disabled
20
+ ? 'gids-edit-button__add gids-edit-button__disabled'
21
+ : 'gids-edit-button__add';
22
+ btnIconContainer.append(GidsIconDom({
23
+ name: 'add',
24
+ size: size,
25
+ appearance: 'filled',
26
+ }));
27
+ }
28
+ if (editButtonType === 'remove') {
29
+ btnIconContainer.className = disabled
30
+ ? 'gids-edit-button__remove gids-edit-button__disabled'
31
+ : 'gids-edit-button__remove';
32
+ btnIconContainer.append(GidsIconDom({
33
+ name: 'remove',
34
+ appearance: 'filled',
35
+ size: size,
36
+ }));
37
+ }
38
+ editButton.appendChild(btnIconContainer);
39
+ if (onPressEditButton && !disabled) {
40
+ editButton.addEventListener('click', onPressEditButton);
41
+ }
42
+ return editButton;
43
+ };
44
+ //# sourceMappingURL=GidsEditButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsEditButton.js","sourceRoot":"","sources":["../../../src/components/GidsEditButton/GidsEditButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,EAA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U,EAAE,QAAQ;YACpB,IAAI,EAAE,IAAI;SACV,CAAC,CACF,CAAC;IACH,CAAC;IAED,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAEzC,IAAI,iBAAiB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACpC,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ClassValue, GidsListItemWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren, DomNodeOrString } from '../../utils/domUtils';
3
+ import { GidsListItemSelectEventDetail } from '@ganpatiinfo/gids-core-shared';
4
+ export interface GidsListItemDomProps extends GidsListItemWebProps<DomNodeOrString, DomChildren, DomNodeOrString, DomNodeOrString> {
5
+ name?: string;
6
+ onPressEditButton?: (this: HTMLButtonElement, event: Event) => void;
7
+ extraClasses?: ClassValue;
8
+ onPressListItem?: (event: CustomEvent<GidsListItemSelectEventDetail>) => void;
9
+ }
10
+ export declare const GidsListItemDom: (props: GidsListItemDomProps) => HTMLButtonElement;
11
+ //# sourceMappingURL=GidsListItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsListItem.d.ts","sourceRoot":"","sources":["../../../src/components/GidsListItem/GidsListItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,oBAAoB,EAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,WAAW,EACX,eAAe,EACf,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAI9E,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB,CACjE,eAAe,EACf,WAAW,EACX,eAAe,EACf,eAAe,CACf;IACA,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACpE,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,6BAA6B,CAAC,KAAK,IAAI,CAAC;CAC9E;AAED,eAAO,MAAM,eAAe,GAC3B,OAAO,oBAAoB,KACzB,iBAyPF,CAAC"}
@@ -0,0 +1,196 @@
1
+ import { GidsListItemWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren, } from '../../utils/domUtils';
3
+ import { GidsEditButtonDom } from '../GidsEditButton/GidsEditButton';
4
+ import { GidsDividerDom } from '../GidsDivider/GidsDivider';
5
+ import { GidsIconDom } from '../GidsIcon/GidsIcon';
6
+ const { getGidsListItemClassNames } = GidsListItemWebUtils;
7
+ export const GidsListItemDom = (props) => {
8
+ const { index, defaultSelectedIndex, children, disabled = false, selected, editButton, onPressEditButton, onPressListItem, leadingAccessory, leadingSupport, leadingParagraph, trailingContent, trailingAccessory, trailingSupport, trailingParagraph, divider, extraClasses, value, name, } = props;
9
+ const listItem = document.createElement('button');
10
+ listItem.type = 'button';
11
+ listItem.className = getGidsListItemClassNames({ disabled, selected }, extraClasses);
12
+ listItem.setAttribute('role', 'list-item-option');
13
+ listItem.setAttribute('aria-selected', selected ? 'true' : 'false');
14
+ listItem.disabled = disabled;
15
+ if (name) {
16
+ listItem.name = name;
17
+ }
18
+ if (typeof value === 'string') {
19
+ listItem.value = value;
20
+ }
21
+ const mainContainer = document.createElement('div');
22
+ mainContainer.className = 'gids-list-item__main-container';
23
+ if (editButton !== undefined &&
24
+ editButton !== null &&
25
+ editButton !== 'none' &&
26
+ !disabled) {
27
+ const editButtonNode = GidsEditButtonDom({
28
+ size: 'md',
29
+ editButtonType: editButton,
30
+ onPressEditButton,
31
+ });
32
+ // 2. Stop the event from bubbling up to mainContainer / listItem
33
+ editButtonNode.addEventListener('click', (event) => {
34
+ event.stopPropagation();
35
+ });
36
+ mainContainer.append(editButtonNode);
37
+ }
38
+ if (leadingAccessory !== undefined && leadingAccessory !== null) {
39
+ const leadingAccessoryContainer = document.createElement('div');
40
+ leadingAccessoryContainer.className = disabled
41
+ ? 'gids-list-item__leading-accessory-container gids-list-item__accessory-content-disabled'
42
+ : 'gids-list-item__leading-accessory-container';
43
+ appendAsChildren(leadingAccessoryContainer, leadingAccessory);
44
+ appendAsChildren(mainContainer, leadingAccessoryContainer);
45
+ }
46
+ const middleContentContainer = document.createElement('div');
47
+ middleContentContainer.className = 'gids-list-item__middle-content-container';
48
+ const leadingContentContainer = document.createElement('div');
49
+ leadingContentContainer.className =
50
+ 'gids-list-item__leading-content-container';
51
+ if (children !== undefined && children !== null) {
52
+ if (typeof children === 'string') {
53
+ const leadingLabel = document.createElement('span');
54
+ leadingLabel.className = disabled
55
+ ? 'gids-list-item__leading-content-label gids-list-item__text-content-disabled'
56
+ : 'gids-list-item__leading-content-label';
57
+ leadingLabel.textContent = children;
58
+ appendAsChildren(leadingContentContainer, leadingLabel);
59
+ }
60
+ else {
61
+ appendAsChildren(leadingContentContainer, children);
62
+ }
63
+ }
64
+ if ((leadingSupport !== undefined && leadingSupport !== null) ||
65
+ (leadingParagraph !== undefined && leadingParagraph !== null)) {
66
+ const leadingSupportContent = document.createElement('div');
67
+ leadingSupportContent.className = 'gids-list-item__leading-support-content';
68
+ if (leadingSupport !== undefined && leadingSupport !== null) {
69
+ if (typeof leadingSupport === 'string') {
70
+ const leadingContentSupportingText = document.createElement('p');
71
+ leadingContentSupportingText.className = disabled
72
+ ? 'gids-list-item__leading-content-supporting-text gids-list-item__text-content-disabled'
73
+ : 'gids-list-item__leading-content-supporting-text';
74
+ leadingContentSupportingText.textContent = leadingSupport;
75
+ appendAsChildren(leadingSupportContent, leadingContentSupportingText);
76
+ }
77
+ else {
78
+ appendAsChildren(leadingSupportContent, leadingSupport);
79
+ }
80
+ }
81
+ if (leadingParagraph !== undefined && leadingParagraph !== null) {
82
+ if (typeof leadingParagraph === 'string') {
83
+ const leadingContentParagraphText = document.createElement('p');
84
+ leadingContentParagraphText.className = disabled
85
+ ? 'gids-list-item__leading-content-paragraph-text gids-list-item__text-content-disabled'
86
+ : 'gids-list-item__leading-content-paragraph-text';
87
+ leadingContentParagraphText.textContent = leadingParagraph;
88
+ appendAsChildren(leadingSupportContent, leadingContentParagraphText);
89
+ }
90
+ else {
91
+ appendAsChildren(leadingSupportContent, leadingParagraph);
92
+ }
93
+ }
94
+ appendAsChildren(leadingContentContainer, leadingSupportContent);
95
+ }
96
+ const trailingContentContainer = document.createElement('div');
97
+ trailingContentContainer.className =
98
+ 'gids-list-item__trailing-content-container';
99
+ if (trailingContent !== undefined && trailingContent !== null) {
100
+ if (typeof trailingContent === 'string') {
101
+ const trailingLabel = document.createElement('span');
102
+ trailingLabel.className = disabled
103
+ ? 'gids-list-item__trailing-content-label gids-list-item__text-content-disabled'
104
+ : 'gids-list-item__trailing-content-label';
105
+ trailingLabel.textContent = trailingContent;
106
+ appendAsChildren(trailingContentContainer, trailingLabel);
107
+ }
108
+ else {
109
+ appendAsChildren(trailingContentContainer, trailingContent);
110
+ }
111
+ }
112
+ if ((trailingSupport !== undefined && trailingSupport !== null) ||
113
+ (trailingParagraph !== undefined && trailingParagraph !== null)) {
114
+ const trailingSupportContent = document.createElement('div');
115
+ trailingSupportContent.className =
116
+ 'gids-list-item__trailing-support-content';
117
+ if (trailingSupport !== undefined && trailingSupport !== null) {
118
+ if (typeof trailingSupport === 'string') {
119
+ const trailingContentSupportingText = document.createElement('p');
120
+ trailingContentSupportingText.className = disabled
121
+ ? 'gids-list-item__trailing-content-supporting-text gids-list-item__text-content-disabled'
122
+ : 'gids-list-item__trailing-content-supporting-text';
123
+ trailingContentSupportingText.textContent = trailingSupport;
124
+ appendAsChildren(trailingSupportContent, trailingContentSupportingText);
125
+ }
126
+ else {
127
+ appendAsChildren(trailingSupportContent, trailingSupport);
128
+ }
129
+ }
130
+ if (trailingParagraph !== undefined && trailingParagraph !== null) {
131
+ if (typeof trailingParagraph === 'string') {
132
+ const trailingContentParagraphText = document.createElement('p');
133
+ trailingContentParagraphText.className = disabled
134
+ ? 'gids-list-item__trailing-content-paragraph-text gids-list-item__text-content-disabled'
135
+ : 'gids-list-item__trailing-content-paragraph-text';
136
+ trailingContentParagraphText.textContent = trailingParagraph;
137
+ appendAsChildren(trailingSupportContent, trailingContentParagraphText);
138
+ }
139
+ else {
140
+ appendAsChildren(trailingSupportContent, trailingParagraph);
141
+ }
142
+ }
143
+ appendAsChildren(trailingContentContainer, trailingSupportContent);
144
+ }
145
+ appendAsChildren(middleContentContainer, leadingContentContainer);
146
+ appendAsChildren(middleContentContainer, trailingContentContainer);
147
+ appendAsChildren(mainContainer, middleContentContainer);
148
+ const trailingAccessoryContainer = document.createElement('div');
149
+ trailingAccessoryContainer.className = disabled
150
+ ? 'gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled'
151
+ : 'gids-list-item__trailing-accessory-container';
152
+ if (selected) {
153
+ trailingAccessoryContainer.append(GidsIconDom({
154
+ name: 'checkmark',
155
+ size: 'md',
156
+ appearance: 'regular',
157
+ }));
158
+ appendAsChildren(mainContainer, trailingAccessoryContainer);
159
+ }
160
+ else {
161
+ if (trailingAccessory !== undefined && trailingAccessory !== null) {
162
+ appendAsChildren(trailingAccessoryContainer, trailingAccessory);
163
+ appendAsChildren(mainContainer, trailingAccessoryContainer);
164
+ }
165
+ }
166
+ appendAsChildren(listItem, mainContainer);
167
+ if (divider && !selected) {
168
+ const dividerWrapper = document.createElement('div');
169
+ dividerWrapper.className = 'gids-list-item__divider';
170
+ dividerWrapper.append(GidsDividerDom({
171
+ orientation: 'horizontal',
172
+ }));
173
+ appendAsChildren(listItem, dividerWrapper);
174
+ }
175
+ // --- ADD THIS CODE BLOCK BEFORE THE END OF THE FUNCTION ---
176
+ if (onPressListItem) {
177
+ listItem.addEventListener('click', (event) => {
178
+ if (event?.defaultPrevented || disabled) {
179
+ return;
180
+ }
181
+ // Create a CustomEvent containing your specific detail payload
182
+ const customEvent = new CustomEvent('onPressListItem', {
183
+ bubbles: true,
184
+ composed: true,
185
+ detail: {
186
+ selectedIndex: index,
187
+ defaultSelectedIndex, // Toggles or passes current state
188
+ },
189
+ });
190
+ // If your Storybook/wrapper expects the custom event directly in the callback:
191
+ onPressListItem(customEvent);
192
+ });
193
+ }
194
+ return listItem;
195
+ };
196
+ //# sourceMappingURL=GidsListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsListItem.js","sourceRoot":"","sources":["../../../src/components/GidsListItem/GidsListItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,oBAAoB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,gBAAgB,GAGhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,MAAM,EAAE,yBAAyB,EAAE,GAAG,oBAAoB,CAAC;AAc3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAC9B,KAA2B,EACP,EAAE;IACtB,MAAM,EACL,KAAK,EACL,oBAAoB,EACpB,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,KAAK,EACL,IAAI,GACJ,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC;IACzB,QAAQ,CAAC,SAAS,GAAG,yBAAyB,CAC7C,EAAE,QAAQ,EAAE,QAAQ,EAAE,EACtB,YAAY,CACZ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C,QAAQ,EAAE,CAAC;QAC1B,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACrD,cAAc,CAAC,SAAS,GAAG,yBAAyB,CAAC;QAErD,cAAc,CAAC,MAAM,CACpB,cAAc,CAAC;YACd,WAAW,EAAE,YAAY;SACzB,CAAC,CACF,CAAC;QAEF,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC5C,CAAC;IAED,6DAA6D;IAC7D,IAAI,eAAe,EAAE,CAAC;QACrB,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAiB,EAAE,EAAE;YACxD,IAAI,KAAK,EAAE,gBAAgB,IAAI,QAAQ,EAAE,CAAC;gBACzC,OAAO;YACR,CAAC;YACD,+DAA+D;YAC/D,MAAM,WAAW,GAAG,IAAI,WAAW,CAClC,iBAAiB,EACjB;gBACC,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACP,aAAa,EAAE,KAAK;oBACpB,oBAAoB,EAAE,kCAAkC;iBACxD;aACD,CACD,CAAC;YAEF,+EAA+E;YAC/E,eAAe,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GidsMenuWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren, DomNodeOrString } from '../../utils/domUtils.js';
3
+ export interface GidsMenuDomProps extends GidsMenuWebProps<DomChildren, DomNodeOrString> {
4
+ extraClasses?: string;
5
+ }
6
+ export declare const GidsMenuDom: ({ children, extraClasses, heading, supportingText, supportingTextTypography, ...restProps }: GidsMenuDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/GidsMenu/GidsMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAEhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,WAAW,EACX,eAAe,EACf,MAAM,yBAAyB,CAAC;AAMjC,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,CACzD,WAAW,EACX,eAAe,CACf;IACA,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,GAAI,6FAOzB,gBAAgB,KAAG,cAmCrB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { GidsMenuWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren, } from '../../utils/domUtils.js';
3
+ import { GidsHeadingDom } from '../GidsHeading/GidsHeading.js';
4
+ import { testDomChildrenValidity } from '../../utils/childrenValidationUtils.js';
5
+ const { getGidsMenuClassNames } = GidsMenuWebUtils;
6
+ export const GidsMenuDom = ({ children, extraClasses, heading, supportingText, supportingTextTypography, ...restProps }) => {
7
+ const menu = document.createElement('div');
8
+ menu.className = getGidsMenuClassNames(extraClasses);
9
+ if ((heading !== undefined && heading !== null && heading !== '') ||
10
+ (supportingText !== undefined &&
11
+ supportingText !== null &&
12
+ supportingText !== '')) {
13
+ menu.append(GidsHeadingDom({
14
+ heading,
15
+ supportingText,
16
+ supportingTextTypography: supportingTextTypography ?? 'eyebrow-medium',
17
+ ...restProps,
18
+ }));
19
+ }
20
+ testDomChildrenValidity({
21
+ children,
22
+ classNameToBeValidated: 'gids-list-item',
23
+ childrenNameToBeValidated: 'GidsListItemDom',
24
+ currentComponentName: 'GidsMenu',
25
+ });
26
+ if (children !== undefined && children !== null) {
27
+ const childrenContainer = document.createElement('div');
28
+ childrenContainer.className = 'gids-menu__children';
29
+ appendAsChildren(childrenContainer, children);
30
+ appendAsChildren(menu, childrenContainer);
31
+ }
32
+ return menu;
33
+ };
34
+ //# sourceMappingURL=GidsMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsMenu.js","source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,GAAG,qBAAqB,CAAC;QACpD,gBAAgB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAC9C,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GidsMenuGroupWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsMenuGroupDomProps extends GidsMenuGroupWebProps<DomChildren> {
4
+ extraClasses?: string;
5
+ }
6
+ export declare const GidsMenuGroupDom: ({ type, supportingText, children, extraClasses, }: GidsMenuGroupDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsMenuGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsMenuGroup.d.ts","sourceRoot":"","sources":["../../../src/components/GidsMenuGroup/GidsMenuGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,qBAAqB,EAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMxE,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB,CAAC,WAAW,CAAC;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,GAAI,mDAK9B,qBAAqB,KAAG,cA+B1B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { GidsMenuGroupWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ import { GidsSpinnerDom } from '../GidsSpinner/GidsSpinner.js';
4
+ import { testDomChildrenValidity } from '../../utils/childrenValidationUtils.js';
5
+ const { getGidsMenuGroupClassNames } = GidsMenuGroupWebUtils;
6
+ export const GidsMenuGroupDom = ({ type = 'no-options', supportingText = 'No options', children, extraClasses, }) => {
7
+ const menuGroup = document.createElement('div');
8
+ menuGroup.className = getGidsMenuGroupClassNames({ type }, extraClasses);
9
+ if (type === 'loading') {
10
+ menuGroup.append(GidsSpinnerDom({
11
+ indeterminate: true,
12
+ size: 'md',
13
+ }));
14
+ }
15
+ if (type === 'no-options') {
16
+ const noOptionText = document.createElement('span');
17
+ noOptionText.textContent = supportingText;
18
+ appendAsChildren(menuGroup, noOptionText);
19
+ }
20
+ testDomChildrenValidity({
21
+ children,
22
+ classNameToBeValidated: 'gids-menu',
23
+ childrenNameToBeValidated: 'GidsMenuDom',
24
+ currentComponentName: 'GidsMenuGroup',
25
+ });
26
+ if (type === 'default' && children !== undefined && children !== null) {
27
+ appendAsChildren(menuGroup, children);
28
+ }
29
+ return menuGroup;
30
+ };
31
+ //# sourceMappingURL=GidsMenuGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsMenuGroup.js","sourceRoot":"","sources":["../../../src/components/GidsMenuGroup/GidsMenuGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,qBAAqB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,MAAM,EAAE,0BAA0B,EAAE,GAAG,qBAAqB,CAAC;AAM7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAChC,IAAI,GAAG,YAAY,EACnB,cAAc,GAAG,YAAY,EAC7B,QAAQ,EACR,YAAY,GACW,EAAkB,EAAE;IAC3C,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,SAAS,CAAC,SAAS,GAAG,0BAA0B,CAAC,EAAE,IAAI,EAAE,EAAE,YAAY,CAAC,CAAC;IAEzE,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACxB,SAAS,CAAC,MAAM,CACf,cAAc,CAAC;YACd,aAAa,EAAE,IAAI;YACnB,IAAI,EAAE,IAAI;SACV,CAAC,CACF,CAAC;IACH,CAAC;IAED,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QAC3B,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACpD,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;QAC1C,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC3C,CAAC;IAED,uBAAuB,CAAC;QACvB,QAAQ;QACR,sBAAsB,EAAE,WAAW;QACnC,yBAAyB,EAAE,aAAa;QACxC,oBAAoB,EAAE,eAAe;KACrC,CAAC,CAAC;IAEH,IAAI,IAAI,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACvE,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GidsPopoverWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsPopoverDomProps extends GidsPopoverWebProps<DomChildren> {
4
+ extraClasses?: string;
5
+ }
6
+ export declare const GidsPopoverDom: ({ placement, htmlFor, extraClasses, children, }: GidsPopoverDomProps) => HTMLElement;
7
+ //# sourceMappingURL=GidsPopover.d.ts.map