@ganpatiinfo/gids-web-dom-reference 5.0.0 → 6.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 (52) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/components/GidsHeading/GidsHeading.d.ts +2 -2
  3. package/dist/components/GidsHeading/GidsHeading.d.ts.map +1 -1
  4. package/dist/components/GidsHeading/GidsHeading.js +6 -7
  5. package/dist/components/GidsHeading/GidsHeading.js.map +1 -1
  6. package/dist/components/GidsLogo/GidsLogo.d.ts +1 -1
  7. package/dist/components/GidsLogo/GidsLogo.d.ts.map +1 -1
  8. package/dist/components/GidsLogo/GidsLogo.js +5 -2
  9. package/dist/components/GidsLogo/GidsLogo.js.map +1 -1
  10. package/dist/components/GidsSegmentedControl/GidsSegmentedControl.d.ts +1 -1
  11. package/dist/components/GidsSegmentedControl/GidsSegmentedControl.d.ts.map +1 -1
  12. package/dist/components/GidsSegmentedControl/GidsSegmentedControl.js +2 -2
  13. package/dist/components/GidsSegmentedControl/GidsSegmentedControl.js.map +1 -1
  14. package/dist/components/GidsSegmentedTabItem/GidsSegmentedTabItem.d.ts.map +1 -1
  15. package/dist/components/GidsSegmentedTabItem/GidsSegmentedTabItem.js +12 -3
  16. package/dist/components/GidsSegmentedTabItem/GidsSegmentedTabItem.js.map +1 -1
  17. package/dist/components/GidsSideMenu/GidsSideMenu.d.ts +7 -0
  18. package/dist/components/GidsSideMenu/GidsSideMenu.d.ts.map +1 -0
  19. package/dist/components/GidsSideMenu/GidsSideMenu.js +13 -0
  20. package/dist/components/GidsSideMenu/GidsSideMenu.js.map +1 -0
  21. package/dist/components/GidsSideMenuHeader/GidsSideMenuHeader.d.ts +9 -0
  22. package/dist/components/GidsSideMenuHeader/GidsSideMenuHeader.d.ts.map +1 -0
  23. package/dist/components/GidsSideMenuHeader/GidsSideMenuHeader.js +29 -0
  24. package/dist/components/GidsSideMenuHeader/GidsSideMenuHeader.js.map +1 -0
  25. package/dist/components/GidsSideMenuItem/GidsSideMenuItem.d.ts.map +1 -0
  26. package/dist/components/GidsSideMenuItem/GidsSideMenuItem.js.map +1 -0
  27. package/dist/components/GidsSideNavigation/GidsSideNavigation.d.ts +9 -0
  28. package/dist/components/GidsSideNavigation/GidsSideNavigation.d.ts.map +1 -0
  29. package/dist/components/GidsSideNavigation/GidsSideNavigation.js +36 -0
  30. package/dist/components/GidsSideNavigation/GidsSideNavigation.js.map +1 -0
  31. package/dist/components/GidsTopNavigation/GidsTopNavigation.d.ts.map +1 -1
  32. package/dist/components/GidsTopNavigation/GidsTopNavigation.js +17 -5
  33. package/dist/components/GidsTopNavigation/GidsTopNavigation.js.map +1 -1
  34. package/dist/index.d.ts +4 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +4 -1
  37. package/dist/index.js.map +1 -1
  38. package/package.json +3 -3
  39. package/src/components/GidsHeading/GidsHeading.ts +13 -6
  40. package/src/components/GidsLogo/GidsLogo.ts +6 -0
  41. package/src/components/GidsSegmentedControl/GidsSegmentedControl.ts +2 -1
  42. package/src/components/GidsSegmentedTabItem/GidsSegmentedTabItem.ts +16 -3
  43. package/src/components/GidsSideMenu/GidsSideMenu.ts +31 -0
  44. package/src/components/GidsSideMenuHeader/GidsSideMenuHeader.ts +71 -0
  45. package/src/components/GidsSideNavigation/GidsSideNavigation.ts +97 -0
  46. package/src/components/GidsTopNavigation/GidsTopNavigation.ts +26 -4
  47. package/src/index.ts +4 -1
  48. package/dist/components/_GidsSideMenuItem/GidsSideMenuItem.d.ts.map +0 -1
  49. package/dist/components/_GidsSideMenuItem/GidsSideMenuItem.js.map +0 -1
  50. /package/dist/components/{_GidsSideMenuItem → GidsSideMenuItem}/GidsSideMenuItem.d.ts +0 -0
  51. /package/dist/components/{_GidsSideMenuItem → GidsSideMenuItem}/GidsSideMenuItem.js +0 -0
  52. /package/src/components/{_GidsSideMenuItem → GidsSideMenuItem}/GidsSideMenuItem.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @ganpatiinfo/gids-web-dom-reference
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - fba5d5d: Developed `GidsSideMenu` private component for react and html core web platforms
8
+ - 8f1220b: Developed `GidsSideMenuHeader` private component for react and html core web platforms
9
+ - 482b769: - Developed `GidsSideNavigation` component for react and html core web platforms
10
+
11
+ ### Minor Changes
12
+
13
+ - 482b769: - Updated `GidsSidemuItem` component in all web platforms
14
+ - 9caf527: - Updated `GidsTopNavigation` component in all web platforms
15
+ - 482b769: - Updated `GidsSideMenuHeader` in all web platforms
16
+ - 9caf527: - Fixed a coloring issue in `GidsInputTag` component in all web platforms
17
+ - e505944: Updated `GidsLogo` component in all web platforms
18
+ - e505944: Updated `GidsTopNavigation` component in all web platforms
19
+ - 482b769: - Updated `GidsSideMenu` in all web platforms
20
+ - 9caf527: - Updated `GidsSegmentedControl` component in all web platforms
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [fba5d5d]
25
+ - Updated dependencies [482b769]
26
+ - Updated dependencies [9caf527]
27
+ - Updated dependencies [482b769]
28
+ - Updated dependencies [e505944]
29
+ - Updated dependencies [e505944]
30
+ - Updated dependencies [482b769]
31
+ - Updated dependencies [8f1220b]
32
+ - Updated dependencies [482b769]
33
+ - Updated dependencies [9caf527]
34
+ - @ganpatiinfo/gids-core-shared@6.0.0
35
+ - @ganpatiinfo/gids-web-shared@6.0.0
36
+
3
37
  ## 5.0.0
4
38
 
5
39
  ### Major Changes
@@ -1,6 +1,6 @@
1
- import { GidsHeadingCommonProps } from '@ganpatiinfo/gids-core-shared';
1
+ import { type GidsHeadingWebProps } from '@ganpatiinfo/gids-web-shared';
2
2
  import { DomChildren, DomNodeOrString } from '../../utils/domUtils.js';
3
- export interface GidsHeadingDomProps extends GidsHeadingCommonProps<DomChildren, DomNodeOrString> {
3
+ export interface GidsHeadingDomProps extends GidsHeadingWebProps<DomChildren, DomNodeOrString> {
4
4
  extraClasses?: string;
5
5
  }
6
6
  export declare const GidsHeadingDom: (props: GidsHeadingDomProps) => HTMLDivElement;
@@ -1 +1 @@
1
- {"version":3,"file":"GidsHeading.d.ts","sourceRoot":"","sources":["../../../src/components/GidsHeading/GidsHeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAEL,WAAW,EACX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB,CACjE,WAAW,EACX,eAAe,CAChB;IACC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,KAAG,cAqD3D,CAAC"}
1
+ {"version":3,"file":"GidsHeading.d.ts","sourceRoot":"","sources":["../../../src/components/GidsHeading/GidsHeading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,WAAW,EACX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAQjC,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB,CAC9D,WAAW,EACX,eAAe,CAChB;IACC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,KAAG,cAuD3D,CAAC"}
@@ -1,9 +1,9 @@
1
- import { GidsHeadingWebUtils } from '@ganpatiinfo/gids-web-shared';
1
+ import { GidsHeadingWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
2
  import { appendAsChildren, } from '../../utils/domUtils.js';
3
3
  import { GidsButtonGroupDom } from '../GidsButtonGroup/GidsButtonGroup.js';
4
- const { getGidsHeadingClassNames } = GidsHeadingWebUtils;
4
+ const { getGidsHeadingClassNames, getGidsHeadingSupportingTextTypographyClass, } = GidsHeadingWebUtils;
5
5
  export const GidsHeadingDom = (props) => {
6
- const { heading, supportingText, level = 'section', children, extraClasses, } = props;
6
+ const { heading, supportingText, supportingTextTypography, level = 'section', children, extraClasses, } = props;
7
7
  const headingContainer = document.createElement('div');
8
8
  headingContainer.className = getGidsHeadingClassNames(extraClasses);
9
9
  const contentContainer = document.createElement('div');
@@ -25,10 +25,9 @@ export const GidsHeadingDom = (props) => {
25
25
  if (supportingText) {
26
26
  if (typeof supportingText === 'string') {
27
27
  const supportingTextEl = document.createElement('span');
28
- supportingTextEl.className =
29
- level === 'section'
30
- ? 'gids-heading__supporting-text-section'
31
- : 'gids-heading__supporting-text-group';
28
+ supportingTextEl.className = `${level === 'section'
29
+ ? 'gids-heading__supporting-text-section'
30
+ : 'gids-heading__supporting-text-group'} ${getGidsHeadingSupportingTextTypographyClass(supportingTextTypography)}`;
32
31
  supportingTextEl.textContent = supportingText;
33
32
  appendAsChildren(contentContainer, supportingTextEl);
34
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GidsHeading.js","sourceRoot":"","sources":["../../../src/components/GidsHeading/GidsHeading.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,EAAE,wBAAwB,EAAE,GAAG,mBAAmB,CAAC;AASzD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAkB,EAAE;IAC3E,MAAM,EACJ,OAAO,EACP,cAAc,EACd,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,YAAY,GACb,GAAG,KAAK,CAAC;IAEV,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACvD,gBAAgB,CAAC,SAAS,GAAG,wBAAwB,CAAC,YAAY,CAAC,CAAC;IAEpE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,C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,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;YACvC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACxD,gBAAgB,CAAC,SAAS,GAAG,GAC3B,KAAK,KAAK,SAAS;gBACjB,CAAC,CAAC,uCAAuC;gBACzC,CAAC,CAAC,qCACN,IAAI,2CAA2C,CAAC,wBAAwB,CAAC,EAAE,CAAC;YAC5E,gBAAgB,CAAC,WAAW,GAAG,cAAc,CAAC;YAE9C,gBAAgB,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,gBAAgB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,gBAAgB,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAE/C,IAAI,QAAQ,EAAE,CAAC;QACb,gBAAgB,CAAC,MAAM,CACrB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAC3D,CAAC;IACJ,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
@@ -4,5 +4,5 @@ export interface GidsLogoDomProps extends GidsLogoWebProps<string, string>, Omit
4
4
  imgClasses?: ClassValue;
5
5
  imgProps?: Omit<Partial<HTMLImageElement>, 'src' | 'alt' | 'class' | 'height'>;
6
6
  }
7
- export declare const GidsLogoDom: ({ src, href, alt, clickable, extraClasses, imgClasses, imgProps, imgHeight, ...restProps }: GidsLogoDomProps) => HTMLAnchorElement;
7
+ export declare const GidsLogoDom: ({ src, href, alt, clickable, extraClasses, imgClasses, imgProps, imgHeight, invertedInDarkMode, invertedInLightMode, ...restProps }: GidsLogoDomProps) => HTMLAnchorElement;
8
8
  //# sourceMappingURL=GidsLogo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GidsLogo.d.ts","sourceRoot":"","sources":["../../../src/components/GidsLogo/GidsLogo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EAEtB,MAAM,8BAA8B,CAAC;AAKtC,MAAM,WAAW,gBACf,SACE,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpD,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,IAAI,CACb,OAAO,CAAC,gBAAgB,CAAC,EACzB,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CACnC,CAAC;CACH;AAED,eAAO,MAAM,WAAW,GAAI,4FAUzB,gBAAgB,KAAG,iBA4BrB,CAAC"}
1
+ {"version":3,"file":"GidsLogo.d.ts","sourceRoot":"","sources":["../../../src/components/GidsLogo/GidsLogo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EAEtB,MAAM,8BAA8B,CAAC;AAKtC,MAAM,WAAW,gBACf,SACE,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpD,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,IAAI,CACb,OAAO,CAAC,gBAAgB,CAAC,EACzB,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CACnC,CAAC;CACH;AAED,eAAO,MAAM,WAAW,GAAI,qIAYzB,gBAAgB,KAAG,iBAgCrB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { GidsLogoWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
2
  import clsx from 'clsx';
3
3
  const { getGidsLogoClassNames } = GidsLogoWebUtils;
4
- export const GidsLogoDom = ({ src, href, alt, clickable, extraClasses, imgClasses, imgProps, imgHeight = '100', ...restProps }) => {
4
+ export const GidsLogoDom = ({ src, href, alt, clickable, extraClasses, imgClasses, imgProps, imgHeight = '100', invertedInDarkMode, invertedInLightMode, ...restProps }) => {
5
5
  const linkElement = document.createElement('a');
6
6
  linkElement.className = getGidsLogoClassNames(extraClasses);
7
7
  if (restProps) {
@@ -12,7 +12,10 @@ export const GidsLogoDom = ({ src, href, alt, clickable, extraClasses, imgClasse
12
12
  }
13
13
  if (src && src !== '') {
14
14
  const imgElement = document.createElement('img');
15
- imgElement.className = clsx(`gids-logo__img gids-logo__img-height-${imgHeight}`, imgClasses);
15
+ imgElement.className = clsx(`gids-logo__img gids-logo__img-height-${imgHeight}`, {
16
+ 'gids-logo__inverted-img-in-dark': invertedInDarkMode,
17
+ 'gids-logo__inverted-img-in-light': invertedInLightMode,
18
+ }, imgClasses);
16
19
  imgElement.setAttribute('src', src);
17
20
  imgElement.setAttribute('alt', alt ? alt : 'logo');
18
21
  if (imgProps) {
@@ -1 +1 @@
1
- {"version":3,"file":"GidsLogo.js","sourceRoot":"","sources":["../../../src/components/GidsLogo/GidsLogo.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,EAAE,qBAAqB,EAAE,GAAG,gBAAgB,CAAC;AAcnD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,GAAG,EACH,IAAI,EACJ,GAAG,EACH,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,GAAG,KAAK,EACjB,GAAG,SAAS,EACK,EAAqB,EAAE;IACxC,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAChD,WAAW,CAAC,SAAS,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,SAAS,EAAE,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AE;IACxC,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAChD,WAAW,CAAC,SAAS,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;QACrC,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;QACtB,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACjD,UAAU,CAAC,SAAS,GAAG,IAAI,CACzB,wCAAwC,SAAS,EAAE,EACnD;YACE,iCAAiC,EAAE,kBAAkB;YACrD,kCAAkC,EAAE,mBAAmB;SACxD,EACD,UAAU,CACX,CAAC;QACF,UAAU,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACpC,UAAU,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAEnD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;QAED,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC"}
@@ -5,5 +5,5 @@ export interface GidsSegmentedControlDomProps extends GidsSegmentedControlCommon
5
5
  onPress?: (props: GidsSegmentedTabItemPressedReturnedProps) => void;
6
6
  className?: ClassValue;
7
7
  }
8
- export declare const GidsSegmentedControlDom: ({ width, tabItems, onPress, className, }: GidsSegmentedControlDomProps) => HTMLDivElement;
8
+ export declare const GidsSegmentedControlDom: ({ width, tabItems, onPress, className, defaultSelectedIndex, }: GidsSegmentedControlDomProps) => HTMLDivElement;
9
9
  //# sourceMappingURL=GidsSegmentedControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GidsSegmentedControl.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSegmentedControl/GidsSegmentedControl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wCAAwC,EACxC,KAAK,+BAA+B,EACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,UAAU,EAEhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAK5E,MAAM,WAAW,4BAA6B,SAAQ,+BAA+B,CACnF,eAAe,EACf,MAAM,EACN,WAAW,CACZ;IACC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,wCAAwC,KAAK,IAAI,CAAC;IACpE,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,GAAI,0CAKrC,4BAA4B,KAAG,cAgDjC,CAAC"}
1
+ {"version":3,"file":"GidsSegmentedControl.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSegmentedControl/GidsSegmentedControl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wCAAwC,EACxC,KAAK,+BAA+B,EACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,UAAU,EAEhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAK5E,MAAM,WAAW,4BAA6B,SAAQ,+BAA+B,CACnF,eAAe,EACf,MAAM,EACN,WAAW,CACZ;IACC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,wCAAwC,KAAK,IAAI,CAAC;IACpE,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,GAAI,gEAMrC,4BAA4B,KAAG,cAgDjC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { GidsSegmentedControlWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
2
  import { GidsSegmentedTabItemDom } from '../GidsSegmentedTabItem/GidsSegmentedTabItem.js';
3
3
  const { getGidsSegmentedControlClassNames } = GidsSegmentedControlWebUtils;
4
- export const GidsSegmentedControlDom = ({ width = 'intrinsic', tabItems, onPress, className, }) => {
4
+ export const GidsSegmentedControlDom = ({ width = 'intrinsic', tabItems, onPress, className, defaultSelectedIndex, }) => {
5
5
  const segmentedControl = document.createElement('div');
6
6
  segmentedControl.className = getGidsSegmentedControlClassNames({ width }, className);
7
7
  if (tabItems && tabItems.length > 0) {
@@ -13,7 +13,7 @@ export const GidsSegmentedControlDom = ({ width = 'intrinsic', tabItems, onPress
13
13
  tabItems.forEach((tabItem, index) => {
14
14
  // Determine if this tab is selected
15
15
  // Priority: 1. The newly clicked index, 2. The initial tabItem.selected state
16
- let isSelected = false;
16
+ let isSelected = defaultSelectedIndex === index;
17
17
  if (selectedIndex !== undefined && selectedIndex !== null) {
18
18
  isSelected = index === selectedIndex;
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GidsSegmentedControl.js","sourceRoot":"","sources":["../../../src/components/GidsSegmentedControl/GidsSegmentedControl.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAE1F,MAAM,EAAE,iCAAiC,EAAE,GAAG,4BAA4B,CAAC;AAW3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,KAAK,GAAG,WAAW,EACnB,QAAQ,EACR,OAAO,EACP,SAAS,GACoB,EAAkB,EAAE;IACjD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACvD,gBAAgB,CAAC,SAAS,GAAG,iC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U,GAAG,uBAAuB,CAAC;wBACzC,GAAG,OAAO;wBACV,KAAK;wBACL,QAAQ,EAAE,UAAU;wBACpB,KAAK,EAAE,KAAK;wBACZ,OAAO,EAAE,CAAC,aAAa,EAAE,EAAE;4BACzB,4CAA4C;4BAC5C,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;4BACxC,4BAA4B;4BAC5B,IAAI,OAAO;gCAAE,OAAO,CAAC,aAAa,CAAC,CAAC;wBACtC,CAAC;qBACF,CAAC,CAAC;oBAEH,gBAAgB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;gBAC3C,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC;QAEF,iBAAiB;QACjB,UAAU,EAAE,CAAC;IACf,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GidsSegmentedTabItem.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSegmentedTabItem/GidsSegmentedTabItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wCAAwC,EAC7C,KAAK,+BAA+B,EACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,UAAU,EAEhB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAEL,WAAW,EACX,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,4BAA6B,SAAQ,+BAA+B,CACnF,eAAe,EACf,MAAM,EACN,WAAW,CACZ;IACC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,wCAAwC,KAAK,IAAI,CAAC;IACpE,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,GAAI,gIAYrC,4BAA4B,KAAG,iBAwDjC,CAAC"}
1
+ {"version":3,"file":"GidsSegmentedTabItem.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSegmentedTabItem/GidsSegmentedTabItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wCAAwC,EAC7C,KAAK,+BAA+B,EACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,UAAU,EAEhB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAEL,WAAW,EACX,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,4BAA6B,SAAQ,+BAA+B,CACnF,eAAe,EACf,MAAM,EACN,WAAW,CACZ;IACC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,wCAAwC,KAAK,IAAI,CAAC;IACpE,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,GAAI,gIAYrC,4BAA4B,KAAG,iBAqEjC,CAAC"}
@@ -5,7 +5,12 @@ import { GidsBadgeDom } from '../GidsBadge/GidsBadge.js';
5
5
  const { getGidsSegmentedTabItemClassNames } = GidsSegmentedTabItemWebUtils;
6
6
  export const GidsSegmentedTabItemDom = ({ leadingIcon, trailingIcon, index, label, selected = false, badge = false, badgeAccessibleText, badgeAppearance = 'information', onPress, className, width = 'intrinsic', }) => {
7
7
  const segmentedTabItem = document.createElement('button');
8
- segmentedTabItem.className = getGidsSegmentedTabItemClassNames({ selected, width }, className);
8
+ let isIconOnly = false;
9
+ if ((leadingIcon && !trailingIcon && (!label || label === '') && !badge) ||
10
+ (!leadingIcon && trailingIcon && (!label || label === '') && !badge)) {
11
+ isIconOnly = true;
12
+ }
13
+ segmentedTabItem.className = getGidsSegmentedTabItemClassNames({ selected, width, isIconOnly }, className);
9
14
  segmentedTabItem.setAttribute('data-gids-segmented-item', 'true');
10
15
  segmentedTabItem.setAttribute('aria-selected', selected.toString());
11
16
  segmentedTabItem.addEventListener('click', () => {
@@ -17,7 +22,9 @@ export const GidsSegmentedTabItemDom = ({ leadingIcon, trailingIcon, index, labe
17
22
  });
18
23
  if (leadingIcon) {
19
24
  const leadingIconContainer = document.createElement('div');
20
- leadingIconContainer.className = 'gids-segmented-item__icons';
25
+ leadingIconContainer.className = clsx('gids-segmented-tab-item__icons', {
26
+ 'gids-segmented-tab-item__selected-icons': selected,
27
+ });
21
28
  appendAsChildren(leadingIconContainer, leadingIcon);
22
29
  segmentedTabItem.appendChild(leadingIconContainer);
23
30
  }
@@ -36,7 +43,9 @@ export const GidsSegmentedTabItemDom = ({ leadingIcon, trailingIcon, index, labe
36
43
  }
37
44
  if (trailingIcon) {
38
45
  const trailingIconContainer = document.createElement('div');
39
- trailingIconContainer.className = 'gids-segmented-item__selected-icons';
46
+ trailingIconContainer.className = clsx('gids-segmented-tab-item__icons', {
47
+ 'gids-segmented-tab-item__selected-icons': selected,
48
+ });
40
49
  appendAsChildren(trailingIconContainer, trailingIcon);
41
50
  segmentedTabItem.appendChild(trailingIconContainer);
42
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GidsSegmentedTabItem.js","sourceRoot":"","sources":["../../../src/components/GidsSegmentedTabItem/GidsSegmentedTabItem.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,EAAE,iCAAiC,EAAE,GAAG,4BAA4B,CAAC;AAW3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,WAAW,EACX,YAAY,EACZ,KAAK,EACL,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,KAAK,EACb,mBAAmB,EACnB,eAAe,GAAG,aAAa,EAC/B,OAAO,EACP,SAAS,EACT,KAAK,GAAG,WAAW,GACU,EAAqB,EAAE;IACpD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC1D,gBAAgB,CAAC,SAAS,GAAG,iCAAiC,CAC5D,EAAE,QAA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AS,GAAG,qCAAqC,CAAC;QACxE,gBAAgB,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;QACtD,gBAAgB,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,gBAAgB,CAAC,WAAW,CAC1B,YAAY,CAAC;YACX,cAAc,EAAE,mBAAmB;YACnC,UAAU,EAAE,eAAe;YAC3B,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,KAAK;SACZ,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
1
+ {"version":3,"file":"GidsSegmentedTabItem.js","sourceRoot":"","sources":["../../../src/components/GidsSegmentedTabItem/GidsSegmentedTabItem.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,EAAE,iCAAiC,EAAE,GAAG,4BAA4B,CAAC;AAW3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,WAAW,EACX,YAAY,EACZ,KAAK,EACL,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,KAAK,EACb,mBAAmB,EACnB,eAAe,GAAG,aAAa,EAC/B,OAAO,EACP,SAAS,EACT,KAAK,GAAG,WAAW,GACU,EAAqB,EAAE;IACpD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAE1D,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IACE,CAAC,WAAW,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;QACpE,CAAC,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AK,CAAC;YACjC,gBAAgB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,gBAAgB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5D,qBAAqB,CAAC,SAAS,GAAG,IAAI,CAAC,gCAAgC,EAAE;YACvE,yCAAyC,EAAE,QAAQ;SACpD,CAAC,CAAC;QACH,gBAAgB,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;QACtD,gBAAgB,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,gBAAgB,CAAC,WAAW,CAC1B,YAAY,CAAC;YACX,cAAc,EAAE,mBAAmB;YACnC,UAAU,EAAE,eAAe;YAC3B,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,KAAK;SACZ,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GidsSideMenuWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsSideMenuDomProps extends GidsSideMenuWebProps<DomChildren> {
4
+ sideMenuExtraClasses?: string;
5
+ }
6
+ export declare const GidsSideMenuDom: ({ children, sideMenuAppearance, sideMenuExtraClasses, }: GidsSideMenuDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsSideMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideMenu.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSideMenu/GidsSideMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIxE,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB,CAAC,WAAW,CAAC;IAC7E,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,eAAe,GAAI,yDAI7B,oBAAoB,KAAG,cAczB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { GidsSideMenuWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ const { getGidsSideMenuClassNames } = GidsSideMenuWebUtils;
4
+ export const GidsSideMenuDom = ({ children, sideMenuAppearance = 'default', sideMenuExtraClasses, }) => {
5
+ const sideMenu = document.createElement('div');
6
+ sideMenu.className = getGidsSideMenuClassNames({ sideMenuAppearance }, sideMenuExtraClasses);
7
+ sideMenu.setAttribute('side-menu-appearance', sideMenuAppearance);
8
+ if (children) {
9
+ appendAsChildren(sideMenu, children);
10
+ }
11
+ return sideMenu;
12
+ };
13
+ //# sourceMappingURL=GidsSideMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideMenu.js","sourceRoot":"","sources":["../../../src/components/GidsSideMenu/GidsSideMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AAExE,MAAM,EAAE,yBAAyB,EAAE,GAAG,oBAAoB,CAAC;AAM3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,QAAQ,EACR,kBAAkB,GAAG,SAAS,EAC9B,oBAAoB,GACC,EAAkB,EAAE;IACzC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,QAAQ,CAAC,SAAS,GAAG,yBAAyB,CAC5C,EAAE,kBAAkB,EAAE,EACtB,oBAAoB,CACrB,CAAC;IAEF,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;IAElE,IAAI,QAAQ,EAAE,CAAC;QACb,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { GidsSideMenuHeaderWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { type HtmlInputAttributes } from '../GidsInput/GidsInput.js';
3
+ import { GidsSearchBarDomProps } from '../GidsSearchBar/GidsSearchBar.js';
4
+ import { DomChildren } from '../../utils/domUtils.js';
5
+ export interface GidsSideMenuHeaderDomProps extends GidsSideMenuHeaderWebProps<DomChildren, Element, HtmlInputAttributes>, Pick<GidsSearchBarDomProps, 'wrapperClass' | 'onGidsSearchBarClear' | 'className' | 'onBlur' | 'onChange' | 'onFocus' | 'onInput'> {
6
+ headerClasses?: string;
7
+ }
8
+ export declare const GidsSideMenuHeaderDom: ({ headerAppearance, headerDividedByDivider, customChildren, searchVisible, onGidsSearchBarClear, headerClasses, ...restProps }: GidsSideMenuHeaderDomProps) => HTMLDivElement;
9
+ //# sourceMappingURL=GidsSideMenuHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideMenuHeader.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSideMenuHeader/GidsSideMenuHeader.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAEL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKxE,MAAM,WAAW,0BACf,SACE,0BAA0B,CAAC,WAAW,EAAE,OAAO,EAAE,mBAAmB,CAAC,EACrE,IAAI,CACF,qBAAqB,EACnB,cAAc,GACd,sBAAsB,GACtB,WAAW,GACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,SAAS,CACZ;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,GAAI,gIAQnC,0BAA0B,mBAgC5B,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { GidsSideMenuHeaderWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsSearchBarDom, } from '../GidsSearchBar/GidsSearchBar.js';
3
+ import { appendAsChildren } from '../../utils/domUtils.js';
4
+ import { GidsDividerDom } from '../GidsDivider/GidsDivider.js';
5
+ const { getGidsSideMenuHeaderClassNames } = GidsSideMenuHeaderWebUtils;
6
+ export const GidsSideMenuHeaderDom = ({ headerAppearance, headerDividedByDivider = true, customChildren, searchVisible = true, onGidsSearchBarClear, headerClasses, ...restProps }) => {
7
+ const sideMenuHeader = document.createElement('div');
8
+ sideMenuHeader.className = getGidsSideMenuHeaderClassNames({ headerAppearance }, headerClasses);
9
+ const sideMenuContentWrapper = document.createElement('div');
10
+ sideMenuContentWrapper.className = 'gids-side-menu-header__content-wrapper';
11
+ if (customChildren) {
12
+ appendAsChildren(sideMenuContentWrapper, customChildren);
13
+ }
14
+ if (searchVisible) {
15
+ const searchBarEl = document.createElement('div');
16
+ searchBarEl.className = 'gids-side-menu-header__search-bar';
17
+ searchBarEl.append(GidsSearchBarDom({
18
+ ...restProps,
19
+ onGidsSearchBarClear: onGidsSearchBarClear,
20
+ }));
21
+ sideMenuContentWrapper.appendChild(searchBarEl);
22
+ }
23
+ sideMenuHeader.appendChild(sideMenuContentWrapper);
24
+ if (headerDividedByDivider) {
25
+ sideMenuHeader.append(GidsDividerDom({ orientation: 'horizontal' }));
26
+ }
27
+ return sideMenuHeader;
28
+ };
29
+ //# sourceMappingURL=GidsSideMenuHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideMenuHeader.js","sourceRoot":"","sources":["../../../src/components/GidsSideMenuHeader/GidsSideMenuHeader.ts"],"names":[],"mappings":"AAAA,OA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C,MAAM,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
@@ -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 @@
1
+ {"version":3,"file":"GidsSideMenuItem.js","sourceRoot":"","sources":["../../../src/components/GidsSideMenuItem/GidsSideMenuItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAG5E,MAAM,EAAE,6BAA6B,EAAE,GAAG,wBAAwB,CAAC;AACnE,MAAM,EAAE,uBAAuB,EAAE,GAAG,2BAA2B,CAAC;AAWhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,GAAG,SAAS,EACtB,KAAK,GAAG,CAAC,EACT,QAAQ,EACR,mBAAmB,GA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,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,9 @@
1
+ import { GidsSideNavigationWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ import { HtmlInputAttributes } from '../GidsInput/GidsInput.js';
4
+ import { type GidsSideMenuHeaderDomProps } from '../GidsSideMenuHeader/GidsSideMenuHeader.js';
5
+ export interface GidsSideNavigationDomProps extends GidsSideNavigationWebProps<DomChildren, DomChildren, Element, HtmlInputAttributes>, Pick<GidsSideMenuHeaderDomProps, 'headerClasses' | 'wrapperClass' | 'onGidsSearchBarClear' | 'className' | 'onBlur' | 'onChange' | 'onFocus' | 'onInput'> {
6
+ extraSideNavigationClasses?: string;
7
+ }
8
+ export declare const GidsSideNavigationDom: ({ sideNavigationAppearance, headerDividedByDivider, headerClasses, extraSideNavigationClasses, customHeaderChildren, isHeaderVisible, searchVisible, children, onGidsSearchBarClear, onBlur, onChange, onFocus, onInput, ...restProps }: GidsSideNavigationDomProps) => HTMLElement;
9
+ //# sourceMappingURL=GidsSideNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideNavigation.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSideNavigation/GidsSideNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,6CAA6C,CAAC;AAKrD,MAAM,WAAW,0BACf,SACE,0BAA0B,CACxB,WAAW,EACX,WAAW,EACX,OAAO,EACP,mBAAmB,CACpB,EACD,IAAI,CACF,0BAA0B,EACxB,eAAe,GACf,cAAc,GACd,sBAAsB,GACtB,WAAW,GACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,SAAS,CACZ;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,eAAO,MAAM,qBAAqB,GAAI,yOAenC,0BAA0B,KAAG,WA6C/B,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { GidsSideNavigationWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsSideMenuHeaderDom, } from '../GidsSideMenuHeader/GidsSideMenuHeader.js';
3
+ import { GidsSideMenuDom } from '../GidsSideMenu/GidsSideMenu.js';
4
+ const { getGidsSideNavigationClassNames } = GidsSideNavigationWebUtils;
5
+ export const GidsSideNavigationDom = ({ sideNavigationAppearance = 'default', headerDividedByDivider = true, headerClasses, extraSideNavigationClasses, customHeaderChildren, isHeaderVisible = true, searchVisible = true, children, onGidsSearchBarClear, onBlur, onChange, onFocus, onInput, ...restProps }) => {
6
+ const sideNav = document.createElement('nav');
7
+ // FIX: Force set the physical HTML attributes so Stencil is forced to read them on boot
8
+ sideNav.setAttribute('side-navigation-appearance', sideNavigationAppearance);
9
+ sideNav.setAttribute('is-header-visible', String(isHeaderVisible));
10
+ sideNav.setAttribute('search-visible', String(searchVisible));
11
+ sideNav.setAttribute('header-divided-by-divider', String(headerDividedByDivider));
12
+ sideNav.className = getGidsSideNavigationClassNames({ sideNavigationAppearance }, extraSideNavigationClasses);
13
+ if (isHeaderVisible) {
14
+ sideNav.append(GidsSideMenuHeaderDom({
15
+ searchVisible,
16
+ headerClasses,
17
+ headerAppearance: sideNavigationAppearance,
18
+ customChildren: customHeaderChildren,
19
+ onBlur,
20
+ onChange,
21
+ onFocus,
22
+ onInput,
23
+ onGidsSearchBarClear,
24
+ headerDividedByDivider,
25
+ ...restProps,
26
+ }));
27
+ }
28
+ if (children) {
29
+ sideNav.append(GidsSideMenuDom({
30
+ children,
31
+ sideMenuAppearance: sideNavigationAppearance,
32
+ }));
33
+ }
34
+ return sideNav;
35
+ };
36
+ //# sourceMappingURL=GidsSideNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSideNavigation.js","sourceRoot":"","sources":["../../../src/components/GidsSideNavigation/GidsSideNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,qBAAqB,GACtB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,EAAE,+BAA+B,EAAE,GAAG,0BAA0B,CAAC;AAwBvE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,wBAAwB,GAAG,SAAS,EACpC,sBAAsB,GAAG,IAAI,EAC7B,aAAa,EACb,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,GAAG,IAAI,EACtB,aAAa,GAAG,IAAI,EACpB,QAAQ,EACR,oBAAoB,EACpB,MAAM,EACN,QAAQ,EACR,OAAO,EACP,OAAO,EACP,GAAG,SAAS,EACe,EAAe,EAAE;IAC5C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE9C,wFAAwF;IACxF,OAAO,CAAC,YAAY,CAAC,4BAA4B,EAAE,wBAAwB,CAAC,CAAC;IAC7E,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;IACnE,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,OAAO,CAAC,YAAY,CAClB,2BAA2B,EAC3B,MAAM,CAAC,sBAAsB,CAAC,CAC/B,CAAC;IAEF,OAAO,CAAC,SAAS,GAAG,+BAA+B,CACjD,EAAE,wBAAwB,EAAE,EAC5B,0BAA0B,CAC3B,CAAC;IAEF,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,CAAC,MAAM,CACZ,qBAAqB,CAAC;YACpB,aAAa;YACb,aAAa;YACb,gBAAgB,EAAE,wBAAwB;YAC1C,cAAc,EAAE,oBAAoB;YACpC,MAAM;YACN,QAAQ;YACR,OAAO;YACP,OAAO;YACP,oBAAoB;YACpB,sBAAsB;YACtB,GAAG,SAAS;SACb,CAAC,CACH,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CAAC,MAAM,CACZ,eAAe,CAAC;YACd,QAAQ;YACR,kBAAkB,EAAE,wBAAwB;SAC7C,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GidsTopNavigation.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTopNavigation/GidsTopNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,WAAW,EACX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,4BAA4B,EAC7B,MAAM,iDAAiD,CAAC;AAKzD,MAAM,WAAW,yBACf,SACE,yBAAyB,CACvB,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,MAAM,EACN,MAAM,EACN,MAAM,EACN,WAAW,CACZ,EACD,IAAI,CAAC,qBAAqB,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC,EAC1E,IAAI,CAAC,4BAA4B,EAAE,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,oBAAoB,GAC/B,OAAO,yBAAyB,KAC/B,WAmFF,CAAC"}
1
+ {"version":3,"file":"GidsTopNavigation.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTopNavigation/GidsTopNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,WAAW,EACX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,4BAA4B,EAC7B,MAAM,iDAAiD,CAAC;AAMzD,MAAM,WAAW,yBACf,SACE,yBAAyB,CACvB,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,MAAM,EACN,MAAM,EACN,MAAM,EACN,WAAW,CACZ,EACD,IAAI,CAAC,qBAAqB,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC,EAC1E,IAAI,CAAC,4BAA4B,EAAE,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,oBAAoB,GAC/B,OAAO,yBAAyB,KAC/B,WAwGF,CAAC"}
@@ -3,11 +3,14 @@ import { appendAsChildren, } from '../../utils/domUtils.js';
3
3
  import { GidsSearchBarDom, } from '../GidsSearchBar/GidsSearchBar.js';
4
4
  import { GidsSegmentedControlDom, } from '../GidsSegmentedControl/GidsSegmentedControl.js';
5
5
  import { GidsLogoDom } from '../GidsLogo/GidsLogo.js';
6
+ import { GidsDividerDom } from '../GidsDivider/GidsDivider.js';
6
7
  const { getGidsTopNavigationClassNames } = GidsTopNavigationWebUtils;
7
8
  export const GidsTopNavigationDom = (props) => {
8
- const { isDefaultLeftContentRender = true, isDefaultMiddleContentRender = true, isDefaultRightContentRender = true, leftContent, middleContent, rightContent, src, imgHeight = '100', href, clickable, onPress, width, tabItems = [], extraClasses, ...rest } = props;
9
+ const { isDefaultLeftContentRender = true, isDefaultMiddleContentRender = true, isDefaultRightContentRender = true, leftContent, middleContent, rightContent, src, imgHeight = '100', href, clickable, onPress, width, tabItems = [], extraClasses, invertedInDarkMode, invertedInLightMode, dividerVisible = true, topNavigationAppearance = 'default', ...rest } = props;
9
10
  const topNavigation = document.createElement('nav');
10
- topNavigation.className = getGidsTopNavigationClassNames(extraClasses);
11
+ topNavigation.className = getGidsTopNavigationClassNames({ topNavigationAppearance }, extraClasses);
12
+ const topNavigationWrapper = document.createElement('div');
13
+ topNavigationWrapper.className = 'gids-top-navigation__wrapper';
11
14
  const leftContentContainer = document.createElement('div');
12
15
  leftContentContainer.className = 'gids-top-navigation__left-content';
13
16
  if (leftContent || isDefaultLeftContentRender) {
@@ -21,9 +24,11 @@ export const GidsTopNavigationDom = (props) => {
21
24
  alt: 'logo-img',
22
25
  href: href && href !== '' ? href : '/',
23
26
  clickable,
27
+ invertedInDarkMode,
28
+ invertedInLightMode,
24
29
  }));
25
30
  }
26
- topNavigation.appendChild(leftContentContainer);
31
+ topNavigationWrapper.appendChild(leftContentContainer);
27
32
  }
28
33
  const middleContentContainer = document.createElement('div');
29
34
  middleContentContainer.className = 'gids-top-navigation__middle-content';
@@ -39,7 +44,7 @@ export const GidsTopNavigationDom = (props) => {
39
44
  ...rest,
40
45
  }));
41
46
  }
42
- topNavigation.appendChild(middleContentContainer);
47
+ topNavigationWrapper.appendChild(middleContentContainer);
43
48
  }
44
49
  const rightContentContainer = document.createElement('div');
45
50
  rightContentContainer.className = 'gids-top-navigation__right-content';
@@ -54,7 +59,14 @@ export const GidsTopNavigationDom = (props) => {
54
59
  onPress,
55
60
  }));
56
61
  }
57
- topNavigation.appendChild(rightContentContainer);
62
+ topNavigationWrapper.appendChild(rightContentContainer);
63
+ }
64
+ topNavigation.appendChild(topNavigationWrapper);
65
+ if (dividerVisible) {
66
+ const dividerWrapper = document.createElement('div');
67
+ dividerWrapper.className = 'gids-top-navigation__divider-wrapper';
68
+ dividerWrapper.appendChild(GidsDividerDom({ orientation: 'horizontal' }));
69
+ topNavigation.appendChild(dividerWrapper);
58
70
  }
59
71
  return topNavigation;
60
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"GidsTopNavigation.js","sourceRoot":"","sources":["../../../src/components/GidsTopNavigation/GidsTopNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,gBAAgB,GAEjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,uBAAuB,GAExB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,EAAE,8BAA8B,EAAE,GAAG,yBAAyB,CAAC;AAmBrE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,KAAgC,EACnB,EAAE;IACf,MAAM,EACJ,0BAA0B,GAAG,IAAI,EACjC,4BAA4B,GAAG,IAAI,EACnC,2BAA2B,GAAG,IAAI,EAClC,WAAW,EACX,aAAa,EACb,YAAY,EACZ,GAAG,EACH,SAAS,GAAG,KAAK,EACjB,IAAI,EACJ,SAAS,EACT,OAAO,EACP,KAAK,EACL,QAAQ,GAAG,EAAE,EACb,YAAY,EACZ,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,QAAQ,CA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AAC;IAED,MAAM,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5D,qBAAqB,CAAC,SAAS,GAAG,oCAAoC,CAAC;IAEvE,IAAI,YAAY,IAAI,2BAA2B,EAAE,CAAC;QAChD,IAAI,YAAY,EAAE,CAAC;YACjB,gBAAgB,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;QACxD,CAAC;QACD,IAAI,2BAA2B,EAAE,CAAC;YAChC,qBAAqB,CAAC,MAAM,CAC1B,uBAAuB,CAAC;gBACtB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW;gBAClC,QAAQ,EAAE,QAAQ;gBAClB,OAAO;aACR,CAAC,CACH,CAAC;QACJ,CAAC;QACD,aAAa,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
1
+ {"version":3,"file":"GidsTopNavigation.js","sourceRoot":"","sources":["../../../src/components/GidsTopNavigation/GidsTopNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,gBAAgB,GAEjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,uBAAuB,GAExB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,EAAE,8BAA8B,EAAE,GAAG,yBAAyB,CAAC;AAmBrE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,KAAgC,EACnB,EAAE;IACf,MAAM,EACJ,0BAA0B,GAAG,IAAI,EACjC,4BAA4B,GAAG,IAAI,EACnC,2BAA2B,GAAG,IAAI,EAClC,WAAW,EACX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C,WAAW,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;QAC1E,aAAa,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -59,8 +59,11 @@ export * from './components/GidsOverlayProvider/GidsOverlayProvider.js';
59
59
  export * from './components/GidsSnackbar/GidsSnackbar.js';
60
60
  export * from './components/_GidsNotificationContainer/GidsNotificationContainer.js';
61
61
  export * from './components/GidsNotification/GidsNotification.js';
62
- export * from './components/_GidsSideMenuItem/GidsSideMenuItem.js';
62
+ export * from './components/GidsSideMenuItem/GidsSideMenuItem.js';
63
63
  export * from './components/GidsScrim/GidsScrim.js';
64
+ export * from './components/GidsSideMenuHeader/GidsSideMenuHeader.js';
65
+ export * from './components/GidsSideMenu/GidsSideMenu.js';
66
+ export * from './components/GidsSideNavigation/GidsSideNavigation.js';
64
67
  /**
65
68
  * Utilities
66
69
  */
@@ -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,iDAA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C;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,mDAAmD,CAAC;AAClE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uDAAuD,CAAC;AAEtE;;GAEG;AACH,cAAc,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -59,8 +59,11 @@ export * from './components/GidsOverlayProvider/GidsOverlayProvider.js';
59
59
  export * from './components/GidsSnackbar/GidsSnackbar.js';
60
60
  export * from './components/_GidsNotificationContainer/GidsNotificationContainer.js';
61
61
  export * from './components/GidsNotification/GidsNotification.js';
62
- export * from './components/_GidsSideMenuItem/GidsSideMenuItem.js';
62
+ export * from './components/GidsSideMenuItem/GidsSideMenuItem.js';
63
63
  export * from './components/GidsScrim/GidsScrim.js';
64
+ export * from './components/GidsSideMenuHeader/GidsSideMenuHeader.js';
65
+ export * from './components/GidsSideMenu/GidsSideMenu.js';
66
+ export * from './components/GidsSideNavigation/GidsSideNavigation.js';
64
67
  /**
65
68
  * Utilities
66
69
  */
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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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,mDAAmD,CAAC;AAClE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uDAAuD,CAAC;AAEtE;;GAEG;AACH,cAAc,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganpatiinfo/gids-web-dom-reference",
3
- "version": "5.0.0",
3
+ "version": "6.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": "5.0.0",
28
- "@ganpatiinfo/gids-web-shared": "5.0.0"
27
+ "@ganpatiinfo/gids-core-shared": "6.0.0",
28
+ "@ganpatiinfo/gids-web-shared": "6.0.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@ganpatiinfo/gids-web-theme-interface": "3.1.0",
@@ -1,5 +1,7 @@
1
- import { GidsHeadingCommonProps } from '@ganpatiinfo/gids-core-shared';
2
- import { GidsHeadingWebUtils } from '@ganpatiinfo/gids-web-shared';
1
+ import {
2
+ type GidsHeadingWebProps,
3
+ GidsHeadingWebUtils,
4
+ } from '@ganpatiinfo/gids-web-shared';
3
5
  import {
4
6
  appendAsChildren,
5
7
  DomChildren,
@@ -7,9 +9,12 @@ import {
7
9
  } from '../../utils/domUtils.js';
8
10
  import { GidsButtonGroupDom } from '../GidsButtonGroup/GidsButtonGroup.js';
9
11
 
10
- const { getGidsHeadingClassNames } = GidsHeadingWebUtils;
12
+ const {
13
+ getGidsHeadingClassNames,
14
+ getGidsHeadingSupportingTextTypographyClass,
15
+ } = GidsHeadingWebUtils;
11
16
 
12
- export interface GidsHeadingDomProps extends GidsHeadingCommonProps<
17
+ export interface GidsHeadingDomProps extends GidsHeadingWebProps<
13
18
  DomChildren,
14
19
  DomNodeOrString
15
20
  > {
@@ -20,6 +25,7 @@ export const GidsHeadingDom = (props: GidsHeadingDomProps): HTMLDivElement => {
20
25
  const {
21
26
  heading,
22
27
  supportingText,
28
+ supportingTextTypography,
23
29
  level = 'section',
24
30
  children,
25
31
  extraClasses,
@@ -48,10 +54,11 @@ export const GidsHeadingDom = (props: GidsHeadingDomProps): HTMLDivElement => {
48
54
  if (supportingText) {
49
55
  if (typeof supportingText === 'string') {
50
56
  const supportingTextEl = document.createElement('span');
51
- supportingTextEl.className =
57
+ supportingTextEl.className = `${
52
58
  level === 'section'
53
59
  ? 'gids-heading__supporting-text-section'
54
- : 'gids-heading__supporting-text-group';
60
+ : 'gids-heading__supporting-text-group'
61
+ } ${getGidsHeadingSupportingTextTypographyClass(supportingTextTypography)}`;
55
62
  supportingTextEl.textContent = supportingText;
56
63
 
57
64
  appendAsChildren(contentContainer, supportingTextEl);
@@ -28,6 +28,8 @@ export const GidsLogoDom = ({
28
28
  imgClasses,
29
29
  imgProps,
30
30
  imgHeight = '100',
31
+ invertedInDarkMode,
32
+ invertedInLightMode,
31
33
  ...restProps
32
34
  }: GidsLogoDomProps): HTMLAnchorElement => {
33
35
  const linkElement = document.createElement('a');
@@ -44,6 +46,10 @@ export const GidsLogoDom = ({
44
46
  const imgElement = document.createElement('img');
45
47
  imgElement.className = clsx(
46
48
  `gids-logo__img gids-logo__img-height-${imgHeight}`,
49
+ {
50
+ 'gids-logo__inverted-img-in-dark': invertedInDarkMode,
51
+ 'gids-logo__inverted-img-in-light': invertedInLightMode,
52
+ },
47
53
  imgClasses,
48
54
  );
49
55
  imgElement.setAttribute('src', src);
@@ -25,6 +25,7 @@ export const GidsSegmentedControlDom = ({
25
25
  tabItems,
26
26
  onPress,
27
27
  className,
28
+ defaultSelectedIndex,
28
29
  }: GidsSegmentedControlDomProps): HTMLDivElement => {
29
30
  const segmentedControl = document.createElement('div');
30
31
  segmentedControl.className = getGidsSegmentedControlClassNames(
@@ -43,7 +44,7 @@ export const GidsSegmentedControlDom = ({
43
44
  // Determine if this tab is selected
44
45
  // Priority: 1. The newly clicked index, 2. The initial tabItem.selected state
45
46
 
46
- let isSelected = false;
47
+ let isSelected = defaultSelectedIndex === index;
47
48
  if (selectedIndex !== undefined && selectedIndex !== null) {
48
49
  isSelected = index === selectedIndex;
49
50
  } else {
@@ -39,8 +39,17 @@ export const GidsSegmentedTabItemDom = ({
39
39
  width = 'intrinsic',
40
40
  }: GidsSegmentedTabItemDomProps): HTMLButtonElement => {
41
41
  const segmentedTabItem = document.createElement('button');
42
+
43
+ let isIconOnly = false;
44
+ if (
45
+ (leadingIcon && !trailingIcon && (!label || label === '') && !badge) ||
46
+ (!leadingIcon && trailingIcon && (!label || label === '') && !badge)
47
+ ) {
48
+ isIconOnly = true;
49
+ }
50
+
42
51
  segmentedTabItem.className = getGidsSegmentedTabItemClassNames(
43
- { selected, width },
52
+ { selected, width, isIconOnly },
44
53
  className,
45
54
  );
46
55
  segmentedTabItem.setAttribute('data-gids-segmented-item', 'true');
@@ -56,7 +65,9 @@ export const GidsSegmentedTabItemDom = ({
56
65
 
57
66
  if (leadingIcon) {
58
67
  const leadingIconContainer = document.createElement('div');
59
- leadingIconContainer.className = 'gids-segmented-item__icons';
68
+ leadingIconContainer.className = clsx('gids-segmented-tab-item__icons', {
69
+ 'gids-segmented-tab-item__selected-icons': selected,
70
+ });
60
71
  appendAsChildren(leadingIconContainer, leadingIcon);
61
72
  segmentedTabItem.appendChild(leadingIconContainer);
62
73
  }
@@ -76,7 +87,9 @@ export const GidsSegmentedTabItemDom = ({
76
87
 
77
88
  if (trailingIcon) {
78
89
  const trailingIconContainer = document.createElement('div');
79
- trailingIconContainer.className = 'gids-segmented-item__selected-icons';
90
+ trailingIconContainer.className = clsx('gids-segmented-tab-item__icons', {
91
+ 'gids-segmented-tab-item__selected-icons': selected,
92
+ });
80
93
  appendAsChildren(trailingIconContainer, trailingIcon);
81
94
  segmentedTabItem.appendChild(trailingIconContainer);
82
95
  }
@@ -0,0 +1,31 @@
1
+ import {
2
+ GidsSideMenuWebProps,
3
+ GidsSideMenuWebUtils,
4
+ } from '@ganpatiinfo/gids-web-shared';
5
+ import { appendAsChildren, DomChildren } from '../../utils/domUtils.js';
6
+
7
+ const { getGidsSideMenuClassNames } = GidsSideMenuWebUtils;
8
+
9
+ export interface GidsSideMenuDomProps extends GidsSideMenuWebProps<DomChildren> {
10
+ sideMenuExtraClasses?: string;
11
+ }
12
+
13
+ export const GidsSideMenuDom = ({
14
+ children,
15
+ sideMenuAppearance = 'default',
16
+ sideMenuExtraClasses,
17
+ }: GidsSideMenuDomProps): HTMLDivElement => {
18
+ const sideMenu = document.createElement('div');
19
+ sideMenu.className = getGidsSideMenuClassNames(
20
+ { sideMenuAppearance },
21
+ sideMenuExtraClasses,
22
+ );
23
+
24
+ sideMenu.setAttribute('side-menu-appearance', sideMenuAppearance);
25
+
26
+ if (children) {
27
+ appendAsChildren(sideMenu, children);
28
+ }
29
+
30
+ return sideMenu;
31
+ };
@@ -0,0 +1,71 @@
1
+ import {
2
+ GidsSideMenuHeaderWebProps,
3
+ GidsSideMenuHeaderWebUtils,
4
+ } from '@ganpatiinfo/gids-web-shared';
5
+ import { type HtmlInputAttributes } from '../GidsInput/GidsInput.js';
6
+ import {
7
+ GidsSearchBarDom,
8
+ GidsSearchBarDomProps,
9
+ } from '../GidsSearchBar/GidsSearchBar.js';
10
+ import { appendAsChildren, DomChildren } from '../../utils/domUtils.js';
11
+ import { GidsDividerDom } from '../GidsDivider/GidsDivider.js';
12
+
13
+ const { getGidsSideMenuHeaderClassNames } = GidsSideMenuHeaderWebUtils;
14
+
15
+ export interface GidsSideMenuHeaderDomProps
16
+ extends
17
+ GidsSideMenuHeaderWebProps<DomChildren, Element, HtmlInputAttributes>,
18
+ Pick<
19
+ GidsSearchBarDomProps,
20
+ | 'wrapperClass'
21
+ | 'onGidsSearchBarClear'
22
+ | 'className'
23
+ | 'onBlur'
24
+ | 'onChange'
25
+ | 'onFocus'
26
+ | 'onInput'
27
+ > {
28
+ headerClasses?: string;
29
+ }
30
+
31
+ export const GidsSideMenuHeaderDom = ({
32
+ headerAppearance,
33
+ headerDividedByDivider = true,
34
+ customChildren,
35
+ searchVisible = true,
36
+ onGidsSearchBarClear,
37
+ headerClasses,
38
+ ...restProps
39
+ }: GidsSideMenuHeaderDomProps) => {
40
+ const sideMenuHeader = document.createElement('div');
41
+ sideMenuHeader.className = getGidsSideMenuHeaderClassNames(
42
+ { headerAppearance },
43
+ headerClasses,
44
+ );
45
+
46
+ const sideMenuContentWrapper = document.createElement('div');
47
+ sideMenuContentWrapper.className = 'gids-side-menu-header__content-wrapper';
48
+
49
+ if (customChildren) {
50
+ appendAsChildren(sideMenuContentWrapper, customChildren);
51
+ }
52
+
53
+ if (searchVisible) {
54
+ const searchBarEl = document.createElement('div');
55
+ searchBarEl.className = 'gids-side-menu-header__search-bar';
56
+ searchBarEl.append(
57
+ GidsSearchBarDom({
58
+ ...restProps,
59
+ onGidsSearchBarClear: onGidsSearchBarClear,
60
+ }),
61
+ );
62
+ sideMenuContentWrapper.appendChild(searchBarEl);
63
+ }
64
+ sideMenuHeader.appendChild(sideMenuContentWrapper);
65
+
66
+ if (headerDividedByDivider) {
67
+ sideMenuHeader.append(GidsDividerDom({ orientation: 'horizontal' }));
68
+ }
69
+
70
+ return sideMenuHeader;
71
+ };
@@ -0,0 +1,97 @@
1
+ import {
2
+ GidsSideNavigationWebProps,
3
+ GidsSideNavigationWebUtils,
4
+ } from '@ganpatiinfo/gids-web-shared';
5
+ import { DomChildren } from '../../utils/domUtils.js';
6
+ import { HtmlInputAttributes } from '../GidsInput/GidsInput.js';
7
+ import {
8
+ type GidsSideMenuHeaderDomProps,
9
+ GidsSideMenuHeaderDom,
10
+ } from '../GidsSideMenuHeader/GidsSideMenuHeader.js';
11
+ import { GidsSideMenuDom } from '../GidsSideMenu/GidsSideMenu.js';
12
+
13
+ const { getGidsSideNavigationClassNames } = GidsSideNavigationWebUtils;
14
+
15
+ export interface GidsSideNavigationDomProps
16
+ extends
17
+ GidsSideNavigationWebProps<
18
+ DomChildren,
19
+ DomChildren,
20
+ Element,
21
+ HtmlInputAttributes
22
+ >,
23
+ Pick<
24
+ GidsSideMenuHeaderDomProps,
25
+ | 'headerClasses'
26
+ | 'wrapperClass'
27
+ | 'onGidsSearchBarClear'
28
+ | 'className'
29
+ | 'onBlur'
30
+ | 'onChange'
31
+ | 'onFocus'
32
+ | 'onInput'
33
+ > {
34
+ extraSideNavigationClasses?: string;
35
+ }
36
+
37
+ export const GidsSideNavigationDom = ({
38
+ sideNavigationAppearance = 'default',
39
+ headerDividedByDivider = true,
40
+ headerClasses,
41
+ extraSideNavigationClasses,
42
+ customHeaderChildren,
43
+ isHeaderVisible = true,
44
+ searchVisible = true,
45
+ children,
46
+ onGidsSearchBarClear,
47
+ onBlur,
48
+ onChange,
49
+ onFocus,
50
+ onInput,
51
+ ...restProps
52
+ }: GidsSideNavigationDomProps): HTMLElement => {
53
+ const sideNav = document.createElement('nav');
54
+
55
+ // FIX: Force set the physical HTML attributes so Stencil is forced to read them on boot
56
+ sideNav.setAttribute('side-navigation-appearance', sideNavigationAppearance);
57
+ sideNav.setAttribute('is-header-visible', String(isHeaderVisible));
58
+ sideNav.setAttribute('search-visible', String(searchVisible));
59
+ sideNav.setAttribute(
60
+ 'header-divided-by-divider',
61
+ String(headerDividedByDivider),
62
+ );
63
+
64
+ sideNav.className = getGidsSideNavigationClassNames(
65
+ { sideNavigationAppearance },
66
+ extraSideNavigationClasses,
67
+ );
68
+
69
+ if (isHeaderVisible) {
70
+ sideNav.append(
71
+ GidsSideMenuHeaderDom({
72
+ searchVisible,
73
+ headerClasses,
74
+ headerAppearance: sideNavigationAppearance,
75
+ customChildren: customHeaderChildren,
76
+ onBlur,
77
+ onChange,
78
+ onFocus,
79
+ onInput,
80
+ onGidsSearchBarClear,
81
+ headerDividedByDivider,
82
+ ...restProps,
83
+ }),
84
+ );
85
+ }
86
+
87
+ if (children) {
88
+ sideNav.append(
89
+ GidsSideMenuDom({
90
+ children,
91
+ sideMenuAppearance: sideNavigationAppearance,
92
+ }),
93
+ );
94
+ }
95
+
96
+ return sideNav;
97
+ };
@@ -16,6 +16,7 @@ import {
16
16
  GidsSegmentedControlDomProps,
17
17
  } from '../GidsSegmentedControl/GidsSegmentedControl.js';
18
18
  import { GidsLogoDom } from '../GidsLogo/GidsLogo.js';
19
+ import { GidsDividerDom } from '../GidsDivider/GidsDivider.js';
19
20
 
20
21
  const { getGidsTopNavigationClassNames } = GidsTopNavigationWebUtils;
21
22
 
@@ -54,11 +55,21 @@ export const GidsTopNavigationDom = (
54
55
  width,
55
56
  tabItems = [],
56
57
  extraClasses,
58
+ invertedInDarkMode,
59
+ invertedInLightMode,
60
+ dividerVisible = true,
61
+ topNavigationAppearance = 'default',
57
62
  ...rest
58
63
  } = props;
59
64
 
60
65
  const topNavigation = document.createElement('nav');
61
- topNavigation.className = getGidsTopNavigationClassNames(extraClasses);
66
+ topNavigation.className = getGidsTopNavigationClassNames(
67
+ { topNavigationAppearance },
68
+ extraClasses,
69
+ );
70
+
71
+ const topNavigationWrapper = document.createElement('div');
72
+ topNavigationWrapper.className = 'gids-top-navigation__wrapper';
62
73
 
63
74
  const leftContentContainer = document.createElement('div');
64
75
  leftContentContainer.className = 'gids-top-navigation__left-content';
@@ -75,10 +86,12 @@ export const GidsTopNavigationDom = (
75
86
  alt: 'logo-img',
76
87
  href: href && href !== '' ? href : '/',
77
88
  clickable,
89
+ invertedInDarkMode,
90
+ invertedInLightMode,
78
91
  }),
79
92
  );
80
93
  }
81
- topNavigation.appendChild(leftContentContainer);
94
+ topNavigationWrapper.appendChild(leftContentContainer);
82
95
  }
83
96
 
84
97
  const middleContentContainer = document.createElement('div');
@@ -98,7 +111,7 @@ export const GidsTopNavigationDom = (
98
111
  }),
99
112
  );
100
113
  }
101
- topNavigation.appendChild(middleContentContainer);
114
+ topNavigationWrapper.appendChild(middleContentContainer);
102
115
  }
103
116
 
104
117
  const rightContentContainer = document.createElement('div');
@@ -117,7 +130,16 @@ export const GidsTopNavigationDom = (
117
130
  }),
118
131
  );
119
132
  }
120
- topNavigation.appendChild(rightContentContainer);
133
+ topNavigationWrapper.appendChild(rightContentContainer);
134
+ }
135
+
136
+ topNavigation.appendChild(topNavigationWrapper);
137
+
138
+ if (dividerVisible) {
139
+ const dividerWrapper = document.createElement('div');
140
+ dividerWrapper.className = 'gids-top-navigation__divider-wrapper';
141
+ dividerWrapper.appendChild(GidsDividerDom({ orientation: 'horizontal' }));
142
+ topNavigation.appendChild(dividerWrapper);
121
143
  }
122
144
 
123
145
  return topNavigation;
package/src/index.ts CHANGED
@@ -59,8 +59,11 @@ export * from './components/GidsOverlayProvider/GidsOverlayProvider.js';
59
59
  export * from './components/GidsSnackbar/GidsSnackbar.js';
60
60
  export * from './components/_GidsNotificationContainer/GidsNotificationContainer.js';
61
61
  export * from './components/GidsNotification/GidsNotification.js';
62
- export * from './components/_GidsSideMenuItem/GidsSideMenuItem.js';
62
+ export * from './components/GidsSideMenuItem/GidsSideMenuItem.js';
63
63
  export * from './components/GidsScrim/GidsScrim.js';
64
+ export * from './components/GidsSideMenuHeader/GidsSideMenuHeader.js';
65
+ export * from './components/GidsSideMenu/GidsSideMenu.js';
66
+ export * from './components/GidsSideNavigation/GidsSideNavigation.js';
64
67
 
65
68
  /**
66
69
  * Utilities
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GidsSideMenuItem.js","sourceRoot":"","sources":["../../../src/components/_GidsSideMenuItem/GidsSideMenuItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAG5E,MAAM,EAAE,6BAA6B,EAAE,GAAG,wBAAwB,CAAC;AACnE,MAAM,EAAE,uBAAuB,E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