@ganpatiinfo/gids-web-dom-reference 3.1.0 → 5.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 (129) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/components/GidsDismissButton/GidsDismissButton.d.ts +8 -0
  3. package/dist/components/GidsDismissButton/GidsDismissButton.d.ts.map +1 -0
  4. package/dist/components/GidsDismissButton/GidsDismissButton.js +20 -0
  5. package/dist/components/GidsDismissButton/GidsDismissButton.js.map +1 -0
  6. package/dist/components/GidsField/GidsField.d.ts +7 -0
  7. package/dist/components/GidsField/GidsField.d.ts.map +1 -0
  8. package/dist/components/GidsField/GidsField.js +27 -0
  9. package/dist/components/GidsField/GidsField.js.map +1 -0
  10. package/dist/components/GidsHeading/GidsHeading.d.ts +7 -0
  11. package/dist/components/GidsHeading/GidsHeading.d.ts.map +1 -0
  12. package/dist/components/GidsHeading/GidsHeading.js +45 -0
  13. package/dist/components/GidsHeading/GidsHeading.js.map +1 -0
  14. package/dist/components/GidsInput/GidsInput.d.ts +18 -0
  15. package/dist/components/GidsInput/GidsInput.d.ts.map +1 -0
  16. package/dist/components/GidsInput/GidsInput.js +28 -0
  17. package/dist/components/GidsInput/GidsInput.js.map +1 -0
  18. package/dist/components/GidsLink/GidsLink.d.ts.map +1 -1
  19. package/dist/components/GidsLink/GidsLink.js.map +1 -1
  20. package/dist/components/GidsLogo/GidsLogo.d.ts +8 -0
  21. package/dist/components/GidsLogo/GidsLogo.d.ts.map +1 -0
  22. package/dist/components/GidsLogo/GidsLogo.js +25 -0
  23. package/dist/components/GidsLogo/GidsLogo.js.map +1 -0
  24. package/dist/components/GidsNotification/GidsNotification.d.ts +4 -0
  25. package/dist/components/GidsNotification/GidsNotification.d.ts.map +1 -0
  26. package/dist/components/GidsNotification/GidsNotification.js +30 -0
  27. package/dist/components/GidsNotification/GidsNotification.js.map +1 -0
  28. package/dist/components/GidsOverlayProvider/GidsOverlayProvider.d.ts +7 -0
  29. package/dist/components/GidsOverlayProvider/GidsOverlayProvider.d.ts.map +1 -0
  30. package/dist/components/GidsOverlayProvider/GidsOverlayProvider.js +7 -0
  31. package/dist/components/GidsOverlayProvider/GidsOverlayProvider.js.map +1 -0
  32. package/dist/components/GidsPasswordField/GidsPasswordField.d.ts +16 -0
  33. package/dist/components/GidsPasswordField/GidsPasswordField.d.ts.map +1 -0
  34. package/dist/components/GidsPasswordField/GidsPasswordField.js +34 -0
  35. package/dist/components/GidsPasswordField/GidsPasswordField.js.map +1 -0
  36. package/dist/components/GidsRequirementsMeter/GidsRequirementsMeter.d.ts +6 -0
  37. package/dist/components/GidsRequirementsMeter/GidsRequirementsMeter.d.ts.map +1 -0
  38. package/dist/components/GidsRequirementsMeter/GidsRequirementsMeter.js +48 -0
  39. package/dist/components/GidsRequirementsMeter/GidsRequirementsMeter.js.map +1 -0
  40. package/dist/components/GidsScrim/GidsScrim.d.ts +7 -0
  41. package/dist/components/GidsScrim/GidsScrim.d.ts.map +1 -0
  42. package/dist/components/GidsScrim/GidsScrim.js +12 -0
  43. package/dist/components/GidsScrim/GidsScrim.js.map +1 -0
  44. package/dist/components/GidsSearchBar/GidsSearchBar.d.ts +9 -0
  45. package/dist/components/GidsSearchBar/GidsSearchBar.d.ts.map +1 -0
  46. package/dist/components/GidsSearchBar/GidsSearchBar.js +59 -0
  47. package/dist/components/GidsSearchBar/GidsSearchBar.js.map +1 -0
  48. package/dist/components/GidsSegmentedControl/GidsSegmentedControl.d.ts +2 -2
  49. package/dist/components/GidsSegmentedControl/GidsSegmentedControl.d.ts.map +1 -1
  50. package/dist/components/GidsSegmentedControl/GidsSegmentedControl.js.map +1 -1
  51. package/dist/components/GidsSegmentedTabItem/GidsSegmentedTabItem.d.ts +3 -3
  52. package/dist/components/GidsSegmentedTabItem/GidsSegmentedTabItem.d.ts.map +1 -1
  53. package/dist/components/GidsSegmentedTabItem/GidsSegmentedTabItem.js +14 -1
  54. package/dist/components/GidsSegmentedTabItem/GidsSegmentedTabItem.js.map +1 -1
  55. package/dist/components/GidsSnackbar/GidsSnackbar.d.ts +4 -0
  56. package/dist/components/GidsSnackbar/GidsSnackbar.d.ts.map +1 -0
  57. package/dist/components/GidsSnackbar/GidsSnackbar.js +24 -0
  58. package/dist/components/GidsSnackbar/GidsSnackbar.js.map +1 -0
  59. package/dist/components/GidsStatusTag/GidsStatusTag.d.ts +6 -0
  60. package/dist/components/GidsStatusTag/GidsStatusTag.d.ts.map +1 -0
  61. package/dist/components/GidsStatusTag/GidsStatusTag.js +18 -0
  62. package/dist/components/GidsStatusTag/GidsStatusTag.js.map +1 -0
  63. package/dist/components/GidsStepper/GidsStepper.d.ts +8 -0
  64. package/dist/components/GidsStepper/GidsStepper.d.ts.map +1 -0
  65. package/dist/components/GidsStepper/GidsStepper.js +67 -0
  66. package/dist/components/GidsStepper/GidsStepper.js.map +1 -0
  67. package/dist/components/GidsStrengthMeter/GidsStrengthMeter.d.ts +6 -0
  68. package/dist/components/GidsStrengthMeter/GidsStrengthMeter.d.ts.map +1 -0
  69. package/dist/components/GidsStrengthMeter/GidsStrengthMeter.js +51 -0
  70. package/dist/components/GidsStrengthMeter/GidsStrengthMeter.js.map +1 -0
  71. package/dist/components/GidsTextField/GidsTextField.d.ts +13 -0
  72. package/dist/components/GidsTextField/GidsTextField.d.ts.map +1 -0
  73. package/dist/components/GidsTextField/GidsTextField.js +27 -0
  74. package/dist/components/GidsTextField/GidsTextField.js.map +1 -0
  75. package/dist/components/GidsTopNavigation/GidsTopNavigation.d.ts +9 -0
  76. package/dist/components/GidsTopNavigation/GidsTopNavigation.d.ts.map +1 -0
  77. package/dist/components/GidsTopNavigation/GidsTopNavigation.js +61 -0
  78. package/dist/components/GidsTopNavigation/GidsTopNavigation.js.map +1 -0
  79. package/dist/components/_GidsNotificationContainer/GidsNotificationContainer.d.ts +9 -0
  80. package/dist/components/_GidsNotificationContainer/GidsNotificationContainer.d.ts.map +1 -0
  81. package/dist/components/_GidsNotificationContainer/GidsNotificationContainer.js +73 -0
  82. package/dist/components/_GidsNotificationContainer/GidsNotificationContainer.js.map +1 -0
  83. package/dist/components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.d.ts +6 -0
  84. package/dist/components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.d.ts.map +1 -0
  85. package/dist/components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.js +26 -0
  86. package/dist/components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.js.map +1 -0
  87. package/dist/components/_GidsSideMenuItem/GidsSideMenuItem.d.ts +8 -0
  88. package/dist/components/_GidsSideMenuItem/GidsSideMenuItem.d.ts.map +1 -0
  89. package/dist/components/_GidsSideMenuItem/GidsSideMenuItem.js +62 -0
  90. package/dist/components/_GidsSideMenuItem/GidsSideMenuItem.js.map +1 -0
  91. package/dist/components/_GidsSnackbarContainer/GidsSnackbarContainer.d.ts +8 -0
  92. package/dist/components/_GidsSnackbarContainer/GidsSnackbarContainer.d.ts.map +1 -0
  93. package/dist/components/_GidsSnackbarContainer/GidsSnackbarContainer.js +37 -0
  94. package/dist/components/_GidsSnackbarContainer/GidsSnackbarContainer.js.map +1 -0
  95. package/dist/index.d.ts +21 -0
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +21 -0
  98. package/dist/index.js.map +1 -1
  99. package/dist/utils/domUtils.d.ts +2 -0
  100. package/dist/utils/domUtils.d.ts.map +1 -1
  101. package/dist/utils/domUtils.js +17 -0
  102. package/dist/utils/domUtils.js.map +1 -1
  103. package/package.json +3 -3
  104. package/src/components/GidsDismissButton/GidsDismissButton.ts +45 -0
  105. package/src/components/GidsField/GidsField.ts +55 -0
  106. package/src/components/GidsHeading/GidsHeading.ts +72 -0
  107. package/src/components/GidsInput/GidsInput.ts +64 -0
  108. package/src/components/GidsLink/GidsLink.ts +20 -20
  109. package/src/components/GidsLogo/GidsLogo.ts +60 -0
  110. package/src/components/GidsNotification/GidsNotification.ts +48 -0
  111. package/src/components/GidsOverlayProvider/GidsOverlayProvider.ts +16 -0
  112. package/src/components/GidsPasswordField/GidsPasswordField.ts +77 -0
  113. package/src/components/GidsRequirementsMeter/GidsRequirementsMeter.ts +71 -0
  114. package/src/components/GidsScrim/GidsScrim.ts +25 -0
  115. package/src/components/GidsSearchBar/GidsSearchBar.ts +103 -0
  116. package/src/components/GidsSegmentedControl/GidsSegmentedControl.ts +3 -2
  117. package/src/components/GidsSegmentedTabItem/GidsSegmentedTabItem.ts +23 -2
  118. package/src/components/GidsSnackbar/GidsSnackbar.ts +40 -0
  119. package/src/components/GidsStatusTag/GidsStatusTag.ts +43 -0
  120. package/src/components/GidsStepper/GidsStepper.ts +94 -0
  121. package/src/components/GidsStrengthMeter/GidsStrengthMeter.ts +78 -0
  122. package/src/components/GidsTextField/GidsTextField.ts +59 -0
  123. package/src/components/GidsTopNavigation/GidsTopNavigation.ts +124 -0
  124. package/src/components/_GidsNotificationContainer/GidsNotificationContainer.ts +125 -0
  125. package/src/components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.ts +50 -0
  126. package/src/components/_GidsSideMenuItem/GidsSideMenuItem.ts +108 -0
  127. package/src/components/_GidsSnackbarContainer/GidsSnackbarContainer.ts +68 -0
  128. package/src/index.ts +21 -0
  129. package/src/utils/domUtils.ts +75 -48
@@ -0,0 +1,73 @@
1
+ import { GidsNotificationContainerWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
3
+ import { GidsButtonDom } from '../GidsButton/GidsButton.js';
4
+ const { getGidsNotificationContainerClassNames, getNotificationContainerIconNames, } = GidsNotificationContainerWebUtils;
5
+ export const GidsNotificationContainerDom = (props) => {
6
+ const { notificationTitle, children, button, appearance = 'default', pronunciation = 'standard', onCloseNotificationClick, extraClasses, } = props;
7
+ const notificationContainer = document.createElement('div');
8
+ notificationContainer.className = getGidsNotificationContainerClassNames({ appearance }, extraClasses);
9
+ const iconWrapper = document.createElement('div');
10
+ iconWrapper.className = 'gids-notification-container__leading-icon-wrapper';
11
+ const iconName = getNotificationContainerIconNames(appearance);
12
+ if (appearance !== 'default' && iconName) {
13
+ iconWrapper.appendChild(GidsIconDom({
14
+ size: 'md',
15
+ name: iconName,
16
+ alt: '',
17
+ appearance: 'filled',
18
+ }));
19
+ notificationContainer.appendChild(iconWrapper);
20
+ }
21
+ const notificationContentWrapper = document.createElement('div');
22
+ notificationContentWrapper.className =
23
+ 'gids-notification-container__content-wrapper';
24
+ const notificationTopContent = document.createElement('div');
25
+ notificationTopContent.className = 'gids-notification-container__top-content';
26
+ const notificationTextContent = document.createElement('div');
27
+ notificationTextContent.className =
28
+ 'gids-notification-container__text-content';
29
+ if (notificationTitle && notificationTitle !== '') {
30
+ const notificationTitleEl = document.createElement('span');
31
+ notificationTitleEl.className = 'gids-notification-container__title';
32
+ notificationTitleEl.textContent = notificationTitle;
33
+ notificationTextContent.appendChild(notificationTitleEl);
34
+ }
35
+ if (children) {
36
+ if (typeof children === 'string') {
37
+ const textEl = document.createElement('p');
38
+ textEl.textContent = children;
39
+ notificationTextContent.appendChild(textEl);
40
+ }
41
+ else {
42
+ notificationTextContent.appendChild(children);
43
+ }
44
+ }
45
+ notificationTopContent.appendChild(notificationTextContent);
46
+ const crossBtnWrapper = document.createElement('div');
47
+ crossBtnWrapper.className = 'gids-notification-container__cross-btn-wrapper';
48
+ if (pronunciation === 'standard') {
49
+ crossBtnWrapper.appendChild(GidsButtonDom({
50
+ appearance: 'subtle',
51
+ size: 'sm',
52
+ width: 'intrinsic',
53
+ leadingIcon: GidsIconDom({
54
+ name: 'cross',
55
+ size: 'md',
56
+ appearance: 'regular',
57
+ }),
58
+ onClick: onCloseNotificationClick,
59
+ }));
60
+ notificationTopContent.appendChild(crossBtnWrapper);
61
+ }
62
+ notificationContentWrapper.appendChild(notificationTopContent);
63
+ if (button) {
64
+ const notificationBottomContent = document.createElement('div');
65
+ notificationBottomContent.className =
66
+ 'gids-notification-container__bottom-content';
67
+ notificationBottomContent.append(button);
68
+ notificationContentWrapper.appendChild(notificationBottomContent);
69
+ }
70
+ notificationContainer.appendChild(notificationContentWrapper);
71
+ return notificationContainer;
72
+ };
73
+ //# sourceMappingURL=GidsNotificationContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsNotificationContainer.js","sourceRoot":"","sources":["../../../src/components/_GidsNotificationContainer/GidsNotificationContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iCAAiC,GAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,EACJ,sCAAsC,EACtC,iCAAiC,GAClC,GAAG,iCAAiC,CAAC;AAUtC,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,KAAwC,EACxB,EAAE;IAClB,MAAM,EACJ,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,UAAU,GAAG,SAAS,EACtB,aAAa,GAAG,UAAU,EAC1B,wBAAwB,EACxB,YAAY,GACb,GAAG,KAAK,CAAC;IAEV,MAAM,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5D,qBAAqB,CAAC,SAAS,GAAG,sCAAsC,CACtE,EAAE,UAAU,EAAE,EACd,YAAY,CACb,CAAC;IAEF,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAClD,WAAW,CAAC,SAAS,GAAG,mDAAmD,CAAC;IAC5E,MAAM,QAAQ,GAAG,iCAAiC,CAAW,UAAU,CAAC,CAAC;IACzE,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,EAAE,CAAC;QACzC,WAAW,CAAC,WAAW,CACrB,WAAW,CAAC;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,EAAE;YACP,UAAU,EAAE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gDAAgD,CAAC;IAE7E,IAAI,aAAa,KAAK,UAAU,EAAE,CAAC;QACjC,eAAe,CAAC,WAAW,CACzB,aAAa,CAAC;YACZ,UAAU,EAAE,QAAQ;YACpB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,WAAW,CAAC;gBACvB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,SAAS;aACtB,CAAC;YACF,OAAO,EAAE,wBAAwB;SAClC,CAAC,CACH,CAAC;QACF,sBAAsB,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACtD,CAAC;IAED,0BAA0B,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAE/D,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,yBAAyB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAChE,yBAAyB,CAAC,SAAS;YACjC,6CAA6C,CAAC;QAEhD,yBAAyB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEzC,0BAA0B,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IACpE,CAAC;IAED,qBAAqB,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAE9D,OAAO,qBAAqB,CAAC;AAC/B,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type GidsRequirementsMeterLabelCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ export interface GidsRequirementsMeterLabelDomProps extends GidsRequirementsMeterLabelCommonProps {
3
+ extraClasses?: string;
4
+ }
5
+ export declare const GidsRequirementsMeterLabelDom: ({ label, status, leadingIconVisible, extraClasses, }: GidsRequirementsMeterLabelDomProps) => HTMLDivElement;
6
+ //# sourceMappingURL=GidsRequirementsMeterLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsRequirementsMeterLabel.d.ts","sourceRoot":"","sources":["../../../src/components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qCAAqC,EAC3C,MAAM,+BAA+B,CAAC;AAUvC,MAAM,WAAW,kCAAmC,SAAQ,qCAAqC;IAC/F,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,6BAA6B,GAAI,sDAK3C,kCAAkC,KAAG,cA2BvC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { GidsRequirementsMeterLabelCommonUtils, } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsRequirementsMeterLabelWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
4
+ const { getGidsRequirementsMeterLabelClassNames } = GidsRequirementsMeterLabelWebUtils;
5
+ const { getRequirementsMeterLabelLeadingIcon } = GidsRequirementsMeterLabelCommonUtils;
6
+ export const GidsRequirementsMeterLabelDom = ({ label, status = 'default', leadingIconVisible = true, extraClasses, }) => {
7
+ const labelContainer = document.createElement('div');
8
+ labelContainer.className = getGidsRequirementsMeterLabelClassNames({ status }, extraClasses);
9
+ if (leadingIconVisible && status) {
10
+ const iconName = getRequirementsMeterLabelLeadingIcon(status);
11
+ if (iconName) {
12
+ labelContainer.append(GidsIconDom({
13
+ name: iconName,
14
+ size: 'sm',
15
+ appearance: 'filled',
16
+ }));
17
+ }
18
+ }
19
+ if (label && label !== '') {
20
+ const textEl = document.createElement('span');
21
+ textEl.textContent = label;
22
+ labelContainer.appendChild(textEl);
23
+ }
24
+ return labelContainer;
25
+ };
26
+ //# sourceMappingURL=GidsRequirementsMeterLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsRequirementsMeterLabel.js","sourceRoot":"","sources":["../../../src/components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,GAEtC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,EAAE,uCAAuC,EAAE,GAC/C,kCAAkC,CAAC;AAErC,MAAM,EAAE,oCAAoC,EAAE,GAC5C,qCAAqC,CAAC;AAMxC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,KAAK,EACL,MAAM,GAAG,SAAS,EAClB,kBAAkB,GAAG,IAAI,EACzB,YAAY,GACuB,EAAkB,EAAE;IACvD,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACrD,cAAc,CAAC,SAAS,GAAG,uCAAuC,CAChE,EAAE,MAAM,EAAE,EACV,YAAY,CACb,CAAC;IAEF,IAAI,kBAAkB,IAAI,MAAM,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,oCAAoC,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,QAAQ,EAAE,CAAC;YACb,cAAc,CAAC,MAAM,CACnB,WAAW,CAAC;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,QAAQ;aACrB,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI,KAAK,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3B,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type GidsSideMenuItemOnPressEvent, type GidsSideMenuItemWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren, DomNodeOrString } from '../../utils/domUtils.js';
3
+ export interface GidsSideMenuItemDomProps extends GidsSideMenuItemWebProps<DomNodeOrString, DomChildren, DomChildren> {
4
+ extraClasses?: string;
5
+ onPressSideMenuItem?: GidsSideMenuItemOnPressEvent;
6
+ }
7
+ export declare const GidsSideMenuItemDom: ({ appearance, index, selected, isLeadingDotVisible, leadingDotAppearance, leadingAccessory, trailingAccessory, leadingIcon, trailingIcon, isTrailingArrowVisible, trailingArrowDirection, children, extraClasses, onPressSideMenuItem, }: GidsSideMenuItemDomProps) => HTMLDivElement;
8
+ //# sourceMappingURL=GidsSideMenuItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideMenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/_GidsSideMenuItem/GidsSideMenuItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAE9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,WAAW,EACX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AASjC,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB,CACxE,eAAe,EACf,WAAW,EACX,WAAW,CACZ;IACC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;CACpD;AAED,eAAO,MAAM,mBAAmB,GAAI,0OAejC,wBAAwB,KAAG,cAiE7B,CAAC"}
@@ -0,0 +1,62 @@
1
+ import { GidsSideMenuItemWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren, } from '../../utils/domUtils.js';
3
+ import { GidsBadgeDom } from '../GidsBadge/GidsBadge.js';
4
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
5
+ import { GidsSideMenuItemCommonUtils } from '@ganpatiinfo/gids-core-shared';
6
+ const { getGidsSideMenuItemClassNames } = GidsSideMenuItemWebUtils;
7
+ const { getSideMenuTrailingIcon } = GidsSideMenuItemCommonUtils;
8
+ export const GidsSideMenuItemDom = ({ appearance = 'default', index = 0, selected, isLeadingDotVisible = false, leadingDotAppearance = 'information', leadingAccessory, trailingAccessory, leadingIcon, trailingIcon, isTrailingArrowVisible = false, trailingArrowDirection = 'right', children, extraClasses, onPressSideMenuItem, }) => {
9
+ const sideMenuItem = document.createElement('div');
10
+ sideMenuItem.className = getGidsSideMenuItemClassNames({ selected, appearance }, extraClasses);
11
+ sideMenuItem.setAttribute('index', `${index}`);
12
+ if (leadingAccessory) {
13
+ appendAsChildren(sideMenuItem, leadingAccessory);
14
+ }
15
+ else {
16
+ if (isLeadingDotVisible) {
17
+ sideMenuItem.append(GidsBadgeDom({
18
+ appearance: leadingDotAppearance,
19
+ type: 'dot',
20
+ }));
21
+ }
22
+ }
23
+ if (leadingIcon) {
24
+ appendAsChildren(sideMenuItem, leadingIcon);
25
+ }
26
+ if (children) {
27
+ const textEl = document.createElement('span');
28
+ textEl.className = 'gids-side-menu-item__label';
29
+ if (typeof children === 'string') {
30
+ textEl.textContent = children;
31
+ }
32
+ else {
33
+ textEl.appendChild(children);
34
+ }
35
+ appendAsChildren(sideMenuItem, textEl);
36
+ }
37
+ if (trailingAccessory) {
38
+ appendAsChildren(sideMenuItem, trailingAccessory);
39
+ }
40
+ if (trailingIcon) {
41
+ appendAsChildren(sideMenuItem, trailingIcon);
42
+ }
43
+ else {
44
+ if (isTrailingArrowVisible) {
45
+ sideMenuItem.append(GidsIconDom({
46
+ name: getSideMenuTrailingIcon(trailingArrowDirection),
47
+ size: 'md',
48
+ alt: '',
49
+ appearance: 'regular',
50
+ }));
51
+ }
52
+ }
53
+ if (onPressSideMenuItem) {
54
+ sideMenuItem.addEventListener('click', () => {
55
+ onPressSideMenuItem({
56
+ selectedIndex: index,
57
+ });
58
+ });
59
+ }
60
+ return sideMenuItem;
61
+ };
62
+ //# sourceMappingURL=GidsSideMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideMenuItem.js","sourceRoot":"","sources":["../../../src/components/_GidsSideMenuItem/GidsSideMenuItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACt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IAC9C,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,CAAC,SAAS,GAAG,4BAA4B,CAAC;QAChD,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC;QACD,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,iBAAiB,EAAE,CAAC;QACtB,gBAAgB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;IACpD,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QACjB,gBAAgB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACN,IAAI,sBAAsB,EAAE,CAAC;YAC3B,YAAY,CAAC,MAAM,CACjB,WAAW,CAAC;gBACV,IAAI,EAAE,uBAAuB,CAAW,sBAAsB,CAAC;gBAC/D,IAAI,EAAE,IAAI;gBACV,GAAG,EAAE,EAAE;gBACP,UAAU,EAAE,SAAS;aACtB,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI,mBAAmB,EAAE,CAAC;QACxB,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YAC1C,mBAAmB,CAAC;gBAClB,aAAa,EAAE,KAAK;aACrB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type GidsSnackbarContainerCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { type ClassValue } from '@ganpatiinfo/gids-web-shared';
3
+ import { type DomNodeOrString } from '../../utils/domUtils.js';
4
+ export interface GidsSnackbarContainerDomProps extends GidsSnackbarContainerCommonProps<DomNodeOrString, DomNodeOrString> {
5
+ extraClasses?: ClassValue;
6
+ }
7
+ export declare const GidsSnackbarContainerDom: (props: GidsSnackbarContainerDomProps) => HTMLDivElement;
8
+ //# sourceMappingURL=GidsSnackbarContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSnackbarContainer.d.ts","sourceRoot":"","sources":["../../../src/components/_GidsSnackbarContainer/GidsSnackbarContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EACL,KAAK,UAAU,EAEhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAOjC,MAAM,WAAW,6BAA8B,SAAQ,gCAAgC,CACrF,eAAe,EACf,eAAe,CAChB;IACC,YAAY,CAAC,EAAE,UAAU,CAAC;CAC3B;AAED,eAAO,MAAM,wBAAwB,GACnC,OAAO,6BAA6B,KACnC,cA2CF,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { GidsSnackbarContainerWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren, } from '../../utils/domUtils.js';
3
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
4
+ const { getGidsSnackbarContainerClassNames, getSnackbarContainerIconNames } = GidsSnackbarContainerWebUtils;
5
+ export const GidsSnackbarContainerDom = (props) => {
6
+ const { appearance = 'default', children, button, extraClasses } = props;
7
+ const snackbarContainer = document.createElement('div');
8
+ snackbarContainer.className = getGidsSnackbarContainerClassNames({ appearance }, extraClasses);
9
+ const snackbarContent = document.createElement('div');
10
+ snackbarContent.className = 'gids-snackbar-container__content';
11
+ const iconName = getSnackbarContainerIconNames(appearance);
12
+ if (appearance !== 'default' && iconName) {
13
+ snackbarContent.appendChild(GidsIconDom({
14
+ size: 'md',
15
+ name: iconName,
16
+ alt: '',
17
+ appearance: 'filled',
18
+ className: 'gids-snackbar-container__icon',
19
+ }));
20
+ }
21
+ if (children) {
22
+ if (typeof children === 'string') {
23
+ const textEl = document.createElement('p');
24
+ appendAsChildren(textEl, children);
25
+ snackbarContent.appendChild(textEl);
26
+ }
27
+ else {
28
+ snackbarContent.appendChild(children);
29
+ }
30
+ }
31
+ snackbarContainer.appendChild(snackbarContent);
32
+ if (button) {
33
+ snackbarContainer.append(button);
34
+ }
35
+ return snackbarContainer;
36
+ };
37
+ //# sourceMappingURL=GidsSnackbarContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSnackbarContainer.js","sourceRoot":"","sources":["../../../src/components/_GidsSnackbarContainer/GidsSnackbarContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,6BAA6B,GAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,gBAAgB,GAEjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,EAAE,kCAAkC,EAAE,6BAA6B,EAAE,GACzE,6BAA6B,CAAC;AAShC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,KAAoC,EACpB,EAAE;IAClB,MAAM,EAAE,UAAU,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAEzE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACxD,iBAAiB,CAAC,SAAS,GAAG,kCAAkC,CAC9D,EAAE,UAAU,EAAE,EACd,YAAY,CACb,CAAC;IAEF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACtD,eAAe,CAAC,SAAS,GAAG,kCAAkC,CAAC;IAE/D,MAAM,QAAQ,GAAG,6BAA6B,CAAW,UAAU,CAAC,CAAC;IACrE,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,EAAE,CAAC;QACzC,eAAe,CAAC,WAAW,CACzB,WAAW,CAAC;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,+BAA+B;SAC3C,CAAC,CACH,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YAC3C,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAEnC,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAE/C,IAAI,MAAM,EAAE,CAAC;QACX,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -40,6 +40,27 @@ export * from './components/_GidsPaginationItem/GidsPaginationItem.js';
40
40
  export * from './components/GidsPagination/GidsPagination.js';
41
41
  export * from './components/GidsSegmentedTabItem/GidsSegmentedTabItem.js';
42
42
  export * from './components/GidsSegmentedControl/GidsSegmentedControl.js';
43
+ export * from './components/GidsLogo/GidsLogo.js';
44
+ export * from './components/GidsDismissButton/GidsDismissButton.js';
45
+ export * from './components/GidsInput/GidsInput.js';
46
+ export * from './components/GidsField/GidsField.js';
47
+ export * from './components/GidsTextField/GidsTextField.js';
48
+ export * from './components/GidsSearchBar/GidsSearchBar.js';
49
+ export * from './components/GidsTopNavigation/GidsTopNavigation.js';
50
+ export * from './components/GidsStrengthMeter/GidsStrengthMeter.js';
51
+ export * from './components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.js';
52
+ export * from './components/GidsRequirementsMeter/GidsRequirementsMeter.js';
53
+ export * from './components/GidsStepper/GidsStepper.js';
54
+ export * from './components/GidsStatusTag/GidsStatusTag.js';
55
+ export * from './components/GidsHeading/GidsHeading.js';
56
+ export * from './components/GidsPasswordField/GidsPasswordField.js';
57
+ export * from './components/_GidsSnackbarContainer/GidsSnackbarContainer.js';
58
+ export * from './components/GidsOverlayProvider/GidsOverlayProvider.js';
59
+ export * from './components/GidsSnackbar/GidsSnackbar.js';
60
+ export * from './components/_GidsNotificationContainer/GidsNotificationContainer.js';
61
+ export * from './components/GidsNotification/GidsNotification.js';
62
+ export * from './components/_GidsSideMenuItem/GidsSideMenuItem.js';
63
+ export * from './components/GidsScrim/GidsScrim.js';
43
64
  /**
44
65
  * Utilities
45
66
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,uDAAuD,CAAC;AACtE,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,0DAA0D,CAAC;AACzE,cAAc,oDAAoD,CAAC;AACnE,cAAc,sDAAsD,CAAC;AACrE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qDAAqD,CAAC;AACpE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D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D,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iCAAiC,CAAC;AAChD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uDAAuD,CAAC;AACtE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,wDAAwD,CAAC;AACvE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,mCAAmC,CAAC;AAClD,cAAc,qDAAqD,CAAC;AACpE,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,wEAAwE,CAAC;AACvF,cAAc,6DAA6D,CAAC;AAC5E,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,yDAAyD,CAAC;AACxE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sEAAsE,CAAC;AACrF,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qCAAqC,CAAC;AAEpD;;GAEG;AACH,cAAc,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -40,6 +40,27 @@ export * from './components/_GidsPaginationItem/GidsPaginationItem.js';
40
40
  export * from './components/GidsPagination/GidsPagination.js';
41
41
  export * from './components/GidsSegmentedTabItem/GidsSegmentedTabItem.js';
42
42
  export * from './components/GidsSegmentedControl/GidsSegmentedControl.js';
43
+ export * from './components/GidsLogo/GidsLogo.js';
44
+ export * from './components/GidsDismissButton/GidsDismissButton.js';
45
+ export * from './components/GidsInput/GidsInput.js';
46
+ export * from './components/GidsField/GidsField.js';
47
+ export * from './components/GidsTextField/GidsTextField.js';
48
+ export * from './components/GidsSearchBar/GidsSearchBar.js';
49
+ export * from './components/GidsTopNavigation/GidsTopNavigation.js';
50
+ export * from './components/GidsStrengthMeter/GidsStrengthMeter.js';
51
+ export * from './components/_GidsRequirementsMeterLabel/GidsRequirementsMeterLabel.js';
52
+ export * from './components/GidsRequirementsMeter/GidsRequirementsMeter.js';
53
+ export * from './components/GidsStepper/GidsStepper.js';
54
+ export * from './components/GidsStatusTag/GidsStatusTag.js';
55
+ export * from './components/GidsHeading/GidsHeading.js';
56
+ export * from './components/GidsPasswordField/GidsPasswordField.js';
57
+ export * from './components/_GidsSnackbarContainer/GidsSnackbarContainer.js';
58
+ export * from './components/GidsOverlayProvider/GidsOverlayProvider.js';
59
+ export * from './components/GidsSnackbar/GidsSnackbar.js';
60
+ export * from './components/_GidsNotificationContainer/GidsNotificationContainer.js';
61
+ export * from './components/GidsNotification/GidsNotification.js';
62
+ export * from './components/_GidsSideMenuItem/GidsSideMenuItem.js';
63
+ export * from './components/GidsScrim/GidsScrim.js';
43
64
  /**
44
65
  * Utilities
45
66
  */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,uDAAuD,CAAC;AACtE,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,0DAA0D,CAAC;AACzE,cAAc,oDAAoD,CAAC;AACnE,cAAc,sDAAsD,CAAC;AACrE,cAAc,2CAA2C,CAAC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are const applyStatefulInputProps: (inputElement: HTMLInputElement, {
9
9
  checked?: boolean;
10
10
  defaultChecked?: boolean;
11
11
  }) => void;
12
+ export declare const htmlToDomChildren: (html: DomChildren | undefined) => DomChildren | undefined;
13
+ export declare const assignToSlot: (parent: Element, slotName: string, element?: Element) => void;
12
14
  //# sourceMappingURL=domUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domUtils.d.ts","sourceRoot":"","sources":["../../src/utils/domUtils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;AAE9D,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,eAAe,GAAG,eAAe,EACzE,aAAa,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,KAC9B,CAAC,EAKH,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,OAAO,EACf,UAAU,WAAW,GAAG,SAAS,KAC/B,IAIF,CAAC;AAEF,eAAO,MAAM,eAAe,GAC3B,SAAS,OAAO,EAChB,eAAe,MAAM,EACrB,QAAQ,OAAO,KACb,OAYF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GACnC,cAAc,gBAAgB,EAC9B,mDAKG;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CACzB,KACC,IAaF,CAAC"}
1
+ {"version":3,"file":"domUtils.d.ts","sourceRoot":"","sources":["../../src/utils/domUtils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;AAE9D,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,eAAe,GAAG,eAAe,EACxE,aAAa,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,KAC/B,CAAC,EAKH,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,OAAO,EACf,UAAU,WAAW,GAAG,SAAS,KAChC,IAIF,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,SAAS,OAAO,EAChB,eAAe,MAAM,EACrB,QAAQ,OAAO,KACd,OAYF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,cAAc,gBAAgB,EAC9B,mDAKG;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,KACA,IAaF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,WAAW,GAAG,SAAS,KAC5B,WAAW,GAAG,SAYhB,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,QAAQ,OAAO,EACf,UAAU,MAAM,EAChB,UAAU,OAAO,KAChB,IAKF,CAAC"}
@@ -38,4 +38,21 @@ export const applyStatefulInputProps = (inputElement, { value, defaultValue, che
38
38
  inputElement.defaultChecked = defaultChecked;
39
39
  }
40
40
  };
41
+ export const htmlToDomChildren = (html) => {
42
+ if (Array.isArray(html)) {
43
+ return html.flatMap(htmlToDomChildren).filter((x) => x !== undefined);
44
+ }
45
+ if (typeof html === 'string') {
46
+ const template = document.createElement('template');
47
+ template.innerHTML = html;
48
+ return Array.from(template.content.childNodes);
49
+ }
50
+ return html;
51
+ };
52
+ export const assignToSlot = (parent, slotName, element) => {
53
+ if (element) {
54
+ element.slot = slotName;
55
+ parent.appendChild(element);
56
+ }
57
+ };
41
58
  //# sourceMappingURL=domUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"domUtils.js","sourceRoot":"","sources":["../../src/utils/domUtils.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,cAAc,GA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ED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,MAAe,EACf,QAAgB,EAChB,OAAiB,EACX,EAAE;IACR,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAC;QACxB,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganpatiinfo/gids-web-dom-reference",
3
- "version": "3.1.0",
3
+ "version": "5.0.0",
4
4
  "private": false,
5
5
  "description": "DOM for components reference implementations",
6
6
  "homepage": "https://ganpatiinfosystem.vercel.app/",
@@ -24,8 +24,8 @@
24
24
  "directory": "packages/private/web-dom-reference"
25
25
  },
26
26
  "dependencies": {
27
- "@ganpatiinfo/gids-core-shared": "3.1.0",
28
- "@ganpatiinfo/gids-web-shared": "3.1.0"
27
+ "@ganpatiinfo/gids-core-shared": "5.0.0",
28
+ "@ganpatiinfo/gids-web-shared": "5.0.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@ganpatiinfo/gids-web-theme-interface": "3.1.0",
@@ -0,0 +1,45 @@
1
+ import { type GidsDismissButtonCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import {
3
+ type ClassValue,
4
+ GidsDismissButtonWebUtils,
5
+ } from '@ganpatiinfo/gids-web-shared';
6
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
7
+ import { toggleAttribute } from '../../utils/domUtils.js';
8
+
9
+ const { getGidsDismissButtonClassNames } = GidsDismissButtonWebUtils;
10
+
11
+ export interface GidsDismissButtonDomProps extends GidsDismissButtonCommonProps {
12
+ onPressDismiss?: (this: HTMLButtonElement, event: Event) => void;
13
+ extraClasses?: ClassValue;
14
+ }
15
+
16
+ export const GidsDismissButtonDom = ({
17
+ appearance = 'subtle',
18
+ size = 'md',
19
+ disabled = false,
20
+ extraClasses,
21
+ onPressDismiss,
22
+ label,
23
+ }: GidsDismissButtonDomProps): HTMLButtonElement => {
24
+ const buttonElement = document.createElement('button');
25
+ buttonElement.className = getGidsDismissButtonClassNames(
26
+ { appearance, size },
27
+ extraClasses,
28
+ );
29
+ buttonElement.type = 'button';
30
+ buttonElement.setAttribute('aria-label', label);
31
+ toggleAttribute(buttonElement, 'disabled', disabled);
32
+
33
+ buttonElement.append(
34
+ GidsIconDom({
35
+ name: 'cross',
36
+ appearance: 'regular',
37
+ }),
38
+ );
39
+
40
+ if (onPressDismiss) {
41
+ buttonElement.addEventListener('click', onPressDismiss);
42
+ }
43
+
44
+ return buttonElement;
45
+ };
@@ -0,0 +1,55 @@
1
+ import { type GidsFieldWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import {
3
+ appendAsChildren,
4
+ toggleAttribute,
5
+ type DomChildren,
6
+ } from '../../utils/domUtils.js';
7
+
8
+ export interface GidsFieldDomProps extends GidsFieldWebProps<
9
+ DomChildren,
10
+ DomChildren
11
+ > {
12
+ extraClasses?: string;
13
+ }
14
+
15
+ export const GidsFieldDom = ({
16
+ children,
17
+ count,
18
+ disabled,
19
+ label,
20
+ helperText,
21
+ statusText,
22
+ status,
23
+ extraClasses,
24
+ }: GidsFieldDomProps): HTMLElement => {
25
+ const field = document.createElement('gids-field');
26
+
27
+ if (count !== undefined) {
28
+ field.setAttribute('count', count);
29
+ } else {
30
+ field.removeAttribute('count');
31
+ }
32
+
33
+ if (helperText !== undefined) {
34
+ field.setAttribute('helper-text', helperText);
35
+ }
36
+
37
+ if (statusText !== undefined) {
38
+ field.setAttribute('status-text', statusText);
39
+ }
40
+
41
+ if (status !== undefined) {
42
+ field.setAttribute('status', status);
43
+ }
44
+
45
+ toggleAttribute(field, 'disabled', disabled);
46
+
47
+ appendAsChildren(field, label);
48
+ appendAsChildren(field, children);
49
+
50
+ if (extraClasses) {
51
+ field.className = extraClasses;
52
+ }
53
+
54
+ return field;
55
+ };
@@ -0,0 +1,72 @@
1
+ import { GidsHeadingCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsHeadingWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ import {
4
+ appendAsChildren,
5
+ DomChildren,
6
+ DomNodeOrString,
7
+ } from '../../utils/domUtils.js';
8
+ import { GidsButtonGroupDom } from '../GidsButtonGroup/GidsButtonGroup.js';
9
+
10
+ const { getGidsHeadingClassNames } = GidsHeadingWebUtils;
11
+
12
+ export interface GidsHeadingDomProps extends GidsHeadingCommonProps<
13
+ DomChildren,
14
+ DomNodeOrString
15
+ > {
16
+ extraClasses?: string;
17
+ }
18
+
19
+ export const GidsHeadingDom = (props: GidsHeadingDomProps): HTMLDivElement => {
20
+ const {
21
+ heading,
22
+ supportingText,
23
+ level = 'section',
24
+ children,
25
+ extraClasses,
26
+ } = props;
27
+
28
+ const headingContainer = document.createElement('div');
29
+ headingContainer.className = getGidsHeadingClassNames(extraClasses);
30
+
31
+ const contentContainer = document.createElement('div');
32
+ contentContainer.className = 'gids-heading__content-container';
33
+ if (heading) {
34
+ if (typeof heading === 'string') {
35
+ const headingEl = document.createElement('span');
36
+ headingEl.className =
37
+ level === 'section'
38
+ ? 'gids-heading__heading-text-section'
39
+ : 'gids-heading__heading-text-group';
40
+ headingEl.textContent = heading;
41
+
42
+ appendAsChildren(contentContainer, headingEl);
43
+ } else {
44
+ contentContainer.append(heading);
45
+ }
46
+ }
47
+
48
+ if (supportingText) {
49
+ if (typeof supportingText === 'string') {
50
+ const supportingTextEl = document.createElement('span');
51
+ supportingTextEl.className =
52
+ level === 'section'
53
+ ? 'gids-heading__supporting-text-section'
54
+ : 'gids-heading__supporting-text-group';
55
+ supportingTextEl.textContent = supportingText;
56
+
57
+ appendAsChildren(contentContainer, supportingTextEl);
58
+ } else {
59
+ contentContainer.append(supportingText);
60
+ }
61
+ }
62
+
63
+ headingContainer.appendChild(contentContainer);
64
+
65
+ if (children) {
66
+ headingContainer.append(
67
+ GidsButtonGroupDom({ children: children, layout: 'wrap' }),
68
+ );
69
+ }
70
+
71
+ return headingContainer;
72
+ };