@ganpatiinfo/gids-web-dom-reference 2.0.8 → 2.1.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 (50) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/GidsBox/GidsBox.d.ts +6 -0
  3. package/dist/components/GidsBox/GidsBox.d.ts.map +1 -0
  4. package/dist/components/GidsBox/GidsBox.js +14 -0
  5. package/dist/components/GidsBox/GidsBox.js.map +1 -0
  6. package/dist/components/GidsBreadcrumb/GidsBreadcrumb.d.ts +8 -0
  7. package/dist/components/GidsBreadcrumb/GidsBreadcrumb.d.ts.map +1 -0
  8. package/dist/components/GidsBreadcrumb/GidsBreadcrumb.js +15 -0
  9. package/dist/components/GidsBreadcrumb/GidsBreadcrumb.js.map +1 -0
  10. package/dist/components/GidsBreadcrumbItem/GidsBreadcrumbItem.d.ts +10 -0
  11. package/dist/components/GidsBreadcrumbItem/GidsBreadcrumbItem.d.ts.map +1 -0
  12. package/dist/components/GidsBreadcrumbItem/GidsBreadcrumbItem.js +45 -0
  13. package/dist/components/GidsBreadcrumbItem/GidsBreadcrumbItem.js.map +1 -0
  14. package/dist/components/GidsButton/GidsButton.js +1 -1
  15. package/dist/components/GidsButton/GidsButton.js.map +1 -1
  16. package/dist/components/GidsButtonDock/GidsButtonDock.d.ts +7 -0
  17. package/dist/components/GidsButtonDock/GidsButtonDock.d.ts.map +1 -0
  18. package/dist/components/GidsButtonDock/GidsButtonDock.js +17 -0
  19. package/dist/components/GidsButtonDock/GidsButtonDock.js.map +1 -0
  20. package/dist/components/GidsButtonGroup/GidsButtonGroup.d.ts +7 -0
  21. package/dist/components/GidsButtonGroup/GidsButtonGroup.d.ts.map +1 -0
  22. package/dist/components/GidsButtonGroup/GidsButtonGroup.js +10 -0
  23. package/dist/components/GidsButtonGroup/GidsButtonGroup.js.map +1 -0
  24. package/dist/components/GidsCompoundButton/GidsCompoundButton.d.ts +9 -0
  25. package/dist/components/GidsCompoundButton/GidsCompoundButton.d.ts.map +1 -0
  26. package/dist/components/GidsCompoundButton/GidsCompoundButton.js +83 -0
  27. package/dist/components/GidsCompoundButton/GidsCompoundButton.js.map +1 -0
  28. package/dist/components/GidsContainer/GidsContainer.d.ts +7 -0
  29. package/dist/components/GidsContainer/GidsContainer.d.ts.map +1 -0
  30. package/dist/components/GidsContainer/GidsContainer.js +12 -0
  31. package/dist/components/GidsContainer/GidsContainer.js.map +1 -0
  32. package/dist/components/GidsSectionNotice/GidsSectionNotice.d.ts +7 -0
  33. package/dist/components/GidsSectionNotice/GidsSectionNotice.d.ts.map +1 -0
  34. package/dist/components/GidsSectionNotice/GidsSectionNotice.js +70 -0
  35. package/dist/components/GidsSectionNotice/GidsSectionNotice.js.map +1 -0
  36. package/dist/index.d.ts +8 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +8 -0
  39. package/dist/index.js.map +1 -1
  40. package/package.json +3 -3
  41. package/src/components/GidsBox/GidsBox.ts +34 -0
  42. package/src/components/GidsBreadcrumb/GidsBreadcrumb.ts +31 -0
  43. package/src/components/GidsBreadcrumbItem/GidsBreadcrumbItem.ts +94 -0
  44. package/src/components/GidsButton/GidsButton.ts +4 -4
  45. package/src/components/GidsButtonDock/GidsButtonDock.ts +33 -0
  46. package/src/components/GidsButtonGroup/GidsButtonGroup.ts +26 -0
  47. package/src/components/GidsCompoundButton/GidsCompoundButton.ts +120 -0
  48. package/src/components/GidsContainer/GidsContainer.ts +32 -0
  49. package/src/components/GidsSectionNotice/GidsSectionNotice.ts +105 -0
  50. package/src/index.ts +8 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @ganpatiinfo/gids-web-dom-reference
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added layout components
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - Updated dependencies
13
+ - @ganpatiinfo/gids-core-shared@2.1.0
14
+ - @ganpatiinfo/gids-web-shared@2.1.0
15
+
16
+ ## 2.0.9
17
+
18
+ ### Patch Changes
19
+
20
+ - Added `ButtonDock`, `ButtonGroup`, `SectionNotice` and `CompoundButton`
21
+ - Updated dependencies
22
+ - Updated dependencies
23
+ - @ganpatiinfo/gids-core-shared@2.0.9
24
+ - @ganpatiinfo/gids-web-shared@2.0.9
25
+
3
26
  ## 2.0.8
4
27
 
5
28
  ### Patch Changes
@@ -0,0 +1,6 @@
1
+ import { type ClassValue, type GidsBoxWebProps, PermittedGidsBoxElements } from '@ganpatiinfo/gids-web-shared';
2
+ export type GidsBoxDomProps<ComponentType extends PermittedGidsBoxElements> = GidsBoxWebProps<Element, ComponentType> & {
3
+ className?: ClassValue;
4
+ };
5
+ export declare const GidsBoxDom: <ComponentType extends PermittedGidsBoxElements = "div">({ children, component, className, }: GidsBoxDomProps<ComponentType>) => HTMLElement;
6
+ //# sourceMappingURL=GidsBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsBox.d.ts","sourceRoot":"","sources":["../../../src/components/GidsBox/GidsBox.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EACf,KAAK,eAAe,EAEpB,wBAAwB,EACxB,MAAM,8BAA8B,CAAC;AAKtC,MAAM,MAAM,eAAe,CAAC,aAAa,SAAS,wBAAwB,IACzE,eAAe,CAAC,OAAO,EAAE,aAAa,CAAC,GAAG;IACzC,SAAS,CAAC,EAAE,UAAU,CAAC;CACvB,CAAC;AAEH,eAAO,MAAM,UAAU,GACtB,aAAa,SAAS,wBAAwB,GAAG,KAAK,EACrD,qCAIC,eAAe,CAAC,aAAa,CAAC,KAAG,WAYnC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { GidsBoxWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ const { getGidsBoxClassNames } = GidsBoxWebUtils;
4
+ export const GidsBoxDom = ({ children, component, className, }) => {
5
+ const box = document.createElement(
6
+ //@ts-expect-error: ex
7
+ component && component !== '' ? component : 'div');
8
+ box.className = getGidsBoxClassNames(className);
9
+ if (children) {
10
+ appendAsChildren(box, children);
11
+ }
12
+ return box;
13
+ };
14
+ //# sourceMappingURL=GidsBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsBox.js","sourceRoot":"","sources":["../../../src/components/GidsBox/GidsBox.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,eAAe,GAEf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,EAAE,oBAAoB,EAAE,GAAG,eAAe,CAAC;AAOjD,MAAM,CAAC,MAAM,UAAU,GAAG,CAExB,EACD,QAAQ,EACR,SAAS,EACT,SAAS,GACuB,EAAe,EAAE;IACjD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa;IACjC,sBAAsB;IACtB,SAAS,IAAI,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAClC,CAAC;IACjB,GAAG,CAAC,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAEhD,IAAI,QAAQ,EAAE,CAAC;QACd,gBAAgB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type ClassValue } from '@ganpatiinfo/gids-web-shared';
2
+ import { type DomChildren } from '../../utils/domUtils.js';
3
+ import { type GidsBreadcrumbCommonProps } from '@ganpatiinfo/gids-core-shared';
4
+ export interface GidsBreadcrumbDomProps extends GidsBreadcrumbCommonProps<DomChildren> {
5
+ extraClasses?: ClassValue;
6
+ }
7
+ export declare const GidsBreadcrumbDom: ({ children, extraClasses, }: GidsBreadcrumbDomProps) => HTMLElement;
8
+ //# sourceMappingURL=GidsBreadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/GidsBreadcrumb/GidsBreadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EAEf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAI/E,MAAM,WAAW,sBAChB,SAAQ,yBAAyB,CAAC,WAAW,CAAC;IAC9C,YAAY,CAAC,EAAE,UAAU,CAAC;CAC1B;AAED,eAAO,MAAM,iBAAiB,GAAI,6BAG/B,sBAAsB,KAAG,WAa3B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { GidsBreadcrumbWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ const { getGidsBreadcrumbClassNames } = GidsBreadcrumbWebUtils;
4
+ export const GidsBreadcrumbDom = ({ children, extraClasses, }) => {
5
+ const breadcrumb = document.createElement('nav');
6
+ breadcrumb.className = getGidsBreadcrumbClassNames(extraClasses);
7
+ breadcrumb.setAttribute('aria-label', 'Breadcrumb');
8
+ if (children) {
9
+ const orderedList = document.createElement('ol');
10
+ appendAsChildren(orderedList, children);
11
+ breadcrumb.appendChild(orderedList);
12
+ }
13
+ return breadcrumb;
14
+ };
15
+ //# sourceMappingURL=GidsBreadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsBreadcrumb.js","sourceRoot":"","sources":["../../../src/components/GidsBreadcrumb/GidsBreadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,yBAAyB,CAAC;AAG7E,MAAM,EAAE,2BAA2B,EAAE,GAAG,sBAAsB,CAAC;AAO/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EACjC,QAAQ,EACR,YAAY,GACY,EAAe,EAAE;IACzC,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACjD,UAAU,CAAC,SAAS,GAAG,2BAA2B,CAAC,YAAY,CAAC,CAAC;IAEjE,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAEpD,IAAI,QAAQ,EAAE,CAAC;QACd,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACjD,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACxC,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type GidsBreadcrumbItemCommonProps } 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 GidsBreadcrumbItemDomProps extends GidsBreadcrumbItemCommonProps<DomNodeOrString, DomNodeOrString, DomNodeOrString> {
5
+ className?: ClassValue;
6
+ href?: DomNodeOrString;
7
+ onClick?: (this: HTMLAnchorElement, event: Event) => void;
8
+ }
9
+ export declare const GidsBreadcrumbItemDom: ({ children, selected, leadingIcon, href, onClick, className, separator, isSeparatorVisible, renderingSystem, currentIndex, totalLength, }: GidsBreadcrumbItemDomProps) => HTMLLIElement;
10
+ //# sourceMappingURL=GidsBreadcrumbItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsBreadcrumbItem.d.ts","sourceRoot":"","sources":["../../../src/components/GidsBreadcrumbItem/GidsBreadcrumbItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EACN,KAAK,UAAU,EAEf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,KAAK,eAAe,EACpB,MAAM,yBAAyB,CAAC;AAMjC,MAAM,WAAW,0BAChB,SAAQ,6BAA6B,CACpC,eAAe,EACf,eAAe,EACf,eAAe,CACf;IACD,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,qBAAqB,GAAI,2IAYnC,0BAA0B,KAAG,aAwD/B,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { GidsBreadcrumbItemWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren, } from '../../utils/domUtils.js';
3
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
4
+ const { getGidsBreadcrumbItemClassNames } = GidsBreadcrumbItemWebUtils;
5
+ export const GidsBreadcrumbItemDom = ({ children, selected, leadingIcon, href, onClick, className, separator, isSeparatorVisible = true, renderingSystem = 'non-array', currentIndex = 0, totalLength = 0, }) => {
6
+ const breadcrumbItem = document.createElement('li');
7
+ breadcrumbItem.className = getGidsBreadcrumbItemClassNames({ selected }, className);
8
+ const breadcrumbAnchorItem = document.createElement('a');
9
+ breadcrumbAnchorItem.className = `gids-breadcrumb-item__anchor-label`;
10
+ if (href) {
11
+ breadcrumbAnchorItem.setAttribute('href', href);
12
+ }
13
+ if (leadingIcon && leadingIcon !== '' && leadingIcon !== '(none)') {
14
+ breadcrumbAnchorItem.appendChild(GidsIconDom({
15
+ name: leadingIcon,
16
+ appearance: 'regular',
17
+ alt: '',
18
+ size: 'md',
19
+ className: 'gids-breadcrumb-item__leading-icon',
20
+ }));
21
+ }
22
+ if (children) {
23
+ appendAsChildren(breadcrumbAnchorItem, children);
24
+ }
25
+ breadcrumbItem.appendChild(breadcrumbAnchorItem);
26
+ if (isSeparatorVisible) {
27
+ if ((renderingSystem === 'array' && currentIndex < totalLength - 1) ||
28
+ renderingSystem === 'non-array') {
29
+ breadcrumbItem.appendChild(GidsIconDom({
30
+ name: separator && separator !== '' && separator !== '(none)'
31
+ ? separator
32
+ : 'chevron-right',
33
+ appearance: 'filled',
34
+ alt: '',
35
+ size: 'md',
36
+ className: 'gids-breadcrumb-item__separator-icon',
37
+ }));
38
+ }
39
+ }
40
+ if (onClick) {
41
+ breadcrumbItem.addEventListener('click', onClick);
42
+ }
43
+ return breadcrumbItem;
44
+ };
45
+ //# sourceMappingURL=GidsBreadcrumbItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsBreadcrumbItem.js","sourceRoot":"","sources":["../../../src/components/GidsBreadcrumbItem/GidsBreadcrumbItem.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,0BAA0B,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,gBAAgB,GAEhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,EAAE,+BAA+B,EAAE,GAAG,0BAA0B,CAAC;AAavE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,OAAO,EACP,SAAS,EACT,SAAS,EACT,kBAAkB,GAAG,IAAI,EACzB,eAAe,GAAG,WAAW,EAC7B,YAAY,GAAG,CAAC,EAChB,WAAW,GAAG,CAAC,GACa,EAAiB,EAAE;IAC/C,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACpD,cAAc,CAAC,SAAS,GAAG,+BAA+B,CACzD,EAAE,QAAQ,EAAE,EACZ,SAAS,CACT,CAAC;IACF,MAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACzD,oBAAoB,CAAC,SAAS,GAAG,oCAAoC,CAAC;IAEtE,IAAI,IAAI,EAAE,CAAC;QACV,oBAAoB,CAAC,YAAY,CAAC,MAAM,EAAE,IAAc,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,WAAW,IAAI,WAAW,KAAK,EAAE,IAAI,WAAW,KAAK,QAAQ,EAAE,CAAC;QACnE,oBAAoB,CAAC,WAAW,CAC/B,WAAW,CAAC;YACX,IAAI,EAAE,WAAuB;YAC7B,UAAU,EAAE,SAAS;YACrB,GAAG,EAAE,EAAE;YACP,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,oCAAoC;SAC/C,CAAC,CACF,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACd,gBAAgB,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED,cAAc,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAEjD,IAAI,kBAAkB,EAAE,CAAC;QACxB,IACC,CAAC,eAAe,KAAK,OAAO,IAAI,YAAY,GAAG,WAAW,GAAG,CAAC,CAAC;YAC/D,eAAe,KAAK,WAAW,EAC9B,CAAC;YACF,cAAc,CAAC,WAAW,CACzB,WAAW,CAAC;gBACX,IAAI,EACH,SAAS,IAAI,SAAS,KAAK,EAAE,IAAI,SAAS,KAAK,QAAQ;oBACtD,CAAC,CAAE,SAAsB;oBACzB,CAAC,CAAC,eAAe;gBACnB,UAAU,EAAE,QAAQ;gBACpB,GAAG,EAAE,EAAE;gBACP,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,sCAAsC;aACjD,CAAC,CACF,CAAC;QACH,CAAC;IACF,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACb,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC"}
@@ -28,7 +28,7 @@ export const GidsButtonDom = ({ as, appearance, size, disabled, destructive, loa
28
28
  if (loading) {
29
29
  button.appendChild(GidsSpinnerControlDom({
30
30
  size: size === 'lg' || size === undefined ? 'md' : size,
31
- indeterminate: true
31
+ indeterminate: true,
32
32
  }));
33
33
  }
34
34
  if (onClick && !loading) {
@@ -1 +1 @@
1
- {"version":3,"file":"GidsButton.js","sourceRoot":"","sources":["../../../src/components/GidsButton/GidsButton.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,QAAQ,GAGR,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAoB,MAAM,yBAAyB,CAAC;AAE7E,MAAM,EAAE,uBAAuB,EAAE,GAAG,kBAAkB,CAAC;AAUvD,MAAM,CAAC,MAAM,aAAa,GAAG,CAE3B,EACD,EAAE,EACF,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,OAAO,GAC4B,EAEf,EAAE;IACtB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CACpC,EAAE,IAAI,QAAQ,CAC4D,CAAC;IAE5E,MAAM,CAAC,SAAS,GAAG,uBAAuB,CACzC,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,EACjD,CAAC,QAAQ,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAC7D,CAAC;IAEF,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,IAAI,QAAQ,CAAC,CAAC;QAE9C,IAAI,QAAQ,EAAE,CAAC;YACd,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACpC,CAAC;IACF,CAAC;IAED,IAAI,EAAE,KAAK,GAAG,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CAAC,CAAC;IAEvC,IAAI,OAAO,EAAE,CAAC;QACb,MAAM,CAAC,WAAW,CACjB,qBAAqB,CAAC;YACrB,IAAI,EAAE,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;YACvD,aAAa,EAAE,IAAI;SACnB,CAAC,CACF,CAAC;IACH,CAAC;IAED,IAAI,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;QACzB,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type GidsButtonDockCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { type DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsButtonDockDomProps extends GidsButtonDockCommonProps<DomChildren> {
4
+ extraClasses?: string;
5
+ }
6
+ export declare const GidsButtonDockDom: ({ primaryChildren, secondaryChildren, extraClasses, }: GidsButtonDockDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsButtonDock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsButtonDock.d.ts","sourceRoot":"","sources":["../../../src/components/GidsButtonDock/GidsButtonDock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI7E,MAAM,WAAW,sBAChB,SAAQ,yBAAyB,CAAC,WAAW,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,GAAI,uDAI/B,sBAAsB,KAAG,cAiB3B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { GidsButtonDockWebUtils } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ const { getGidsButtonDockClassNames } = GidsButtonDockWebUtils;
4
+ export const GidsButtonDockDom = ({ primaryChildren, secondaryChildren, extraClasses, }) => {
5
+ const buttonDock = document.createElement('div');
6
+ buttonDock.className = getGidsButtonDockClassNames(extraClasses);
7
+ const primaryArea = document.createElement('div');
8
+ primaryArea.classList.add('gids-button-dock__primary-area');
9
+ const secondaryArea = document.createElement('div');
10
+ secondaryArea.classList.add('gids-button-dock__secondary-area');
11
+ appendAsChildren(primaryArea, primaryChildren);
12
+ appendAsChildren(secondaryArea, secondaryChildren);
13
+ appendAsChildren(buttonDock, secondaryArea);
14
+ appendAsChildren(buttonDock, primaryArea);
15
+ return buttonDock;
16
+ };
17
+ //# sourceMappingURL=GidsButtonDock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsButtonDock.js","sourceRoot":"","sources":["../../../src/components/GidsButtonDock/GidsButtonDock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAoB,MAAM,yBAAyB,CAAC;AAE7E,MAAM,EAAE,2BAA2B,EAAE,GAAG,sBAAsB,CAAC;AAO/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EACjC,eAAe,EACf,iBAAiB,EACjB,YAAY,GACY,EAAkB,EAAE;IAC5C,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACjD,UAAU,CAAC,SAAS,GAAG,2BAA2B,CAAC,YAAY,CAAC,CAAC;IAEjE,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAClD,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAE5D,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IAEhE,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAC/C,gBAAgB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IAEnD,gBAAgB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAC5C,gBAAgB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAE1C,OAAO,UAAU,CAAC;AACnB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GidsButtonGroupCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsButtonGroupDomProps extends GidsButtonGroupCommonProps<DomChildren> {
4
+ extraClasses?: string;
5
+ }
6
+ export declare const GidsButtonGroupDom: ({ layout, children, extraClasses, }: GidsButtonGroupDomProps) => HTMLSpanElement;
7
+ //# sourceMappingURL=GidsButtonGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/GidsButtonGroup/GidsButtonGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIxE,MAAM,WAAW,uBAChB,SAAQ,0BAA0B,CAAC,WAAW,CAAC;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,kBAAkB,GAAI,qCAIhC,uBAAuB,KAAG,eAU5B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { GidsButtonGroupWebUtils } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ const { getGidsButtonGroupClassNames } = GidsButtonGroupWebUtils;
4
+ export const GidsButtonGroupDom = ({ layout, children, extraClasses, }) => {
5
+ const buttonGroup = document.createElement('span');
6
+ buttonGroup.className = getGidsButtonGroupClassNames({ layout }, extraClasses);
7
+ appendAsChildren(buttonGroup, children);
8
+ return buttonGroup;
9
+ };
10
+ //# sourceMappingURL=GidsButtonGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsButtonGroup.js","sourceRoot":"","sources":["../../../src/components/GidsButtonGroup/GidsButtonGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AAExE,MAAM,EAAE,4BAA4B,EAAE,GAAG,uBAAuB,CAAC;AAOjE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAClC,MAAM,EACN,QAAQ,EACR,YAAY,GACa,EAAmB,EAAE;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACnD,WAAW,CAAC,SAAS,GAAG,4BAA4B,CACnD,EAAE,MAAM,EAAE,EACV,YAAY,CACZ,CAAC;IAEF,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAExC,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type GidsCompoundButtonCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { DomNodeOrString } from '../../utils/domUtils.js';
3
+ export interface GidsCompoundButtonDomProps extends GidsCompoundButtonCommonProps<DomNodeOrString, DomNodeOrString> {
4
+ onClick?: (this: HTMLButtonElement, event: Event) => void;
5
+ onChangeCheckbox?: (event: Event) => void;
6
+ onChangeRadio?: (event: Event) => void;
7
+ }
8
+ export declare const GidsCompoundButtonDom: ({ children, leadingIcon, trailingContent, trailingContentDisabled, trailingContentIndeterminate, checked, disabled, onClick, onChangeCheckbox, onChangeRadio, }: GidsCompoundButtonDomProps) => HTMLButtonElement;
9
+ //# sourceMappingURL=GidsCompoundButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsCompoundButton.d.ts","sourceRoot":"","sources":["../../../src/components/GidsCompoundButton/GidsCompoundButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAKnF,OAAO,EAAoB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAQ5E,MAAM,WAAW,0BAChB,SAAQ,6BAA6B,CAAC,eAAe,EAAE,eAAe,CAAC;IACvE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1D,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,qBAAqB,GAAI,iKAWnC,0BAA0B,KAAG,iBAwF/B,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { generateId, GidsCompoundButtonWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
4
+ import { GidsCheckboxControlDom } from '../_GidsCheckboxControl/GidsCheckboxControl.js';
5
+ import { GidsRadioControlDom } from '../_GidsRadioControl/GidsRadioControl.js';
6
+ const { getGidsCompoundButtonClassNames } = GidsCompoundButtonWebUtils;
7
+ export const GidsCompoundButtonDom = ({ children, leadingIcon, trailingContent, trailingContentDisabled, trailingContentIndeterminate, checked, disabled, onClick, onChangeCheckbox, onChangeRadio, }) => {
8
+ const compoundButton = document.createElement('button');
9
+ compoundButton.className = getGidsCompoundButtonClassNames({
10
+ checked,
11
+ trailingContent,
12
+ disabled,
13
+ });
14
+ compoundButton.setAttribute('type', 'button');
15
+ if (disabled) {
16
+ compoundButton.setAttribute('disabled', '');
17
+ }
18
+ else {
19
+ compoundButton.removeAttribute('disabled');
20
+ }
21
+ const innerContainer = document.createElement('div');
22
+ innerContainer.className = 'gids-compound-button__inner-container';
23
+ if (leadingIcon &&
24
+ typeof leadingIcon === 'string' &&
25
+ leadingIcon !== '' &&
26
+ leadingIcon !== '(none)') {
27
+ const leadingIconEl = GidsIconDom({
28
+ size: 'md',
29
+ appearance: 'regular',
30
+ name: leadingIcon,
31
+ alt: '',
32
+ className: disabled
33
+ ? `gids-compound-button__leading-icon gids-compound-button__icon-disabled`
34
+ : `gids-compound-button__leading-icon`,
35
+ });
36
+ appendAsChildren(innerContainer, leadingIconEl);
37
+ }
38
+ const labelElement = document.createElement('div');
39
+ labelElement.className = disabled
40
+ ? 'gids-compound-button__label gids-compound-button__label-disabled'
41
+ : 'gids-compound-button__label';
42
+ appendAsChildren(labelElement, children);
43
+ innerContainer.appendChild(labelElement);
44
+ if (trailingContent === 'checkbox') {
45
+ const checkbox = GidsCheckboxControlDom({
46
+ checked: checked,
47
+ indeterminate: trailingContentIndeterminate,
48
+ disabled: trailingContentDisabled || disabled,
49
+ inputId: generateId(),
50
+ onChange: onChangeCheckbox,
51
+ });
52
+ innerContainer.appendChild(checkbox);
53
+ }
54
+ if (trailingContent === 'radio') {
55
+ const radio = GidsRadioControlDom({
56
+ checked: checked,
57
+ inputId: generateId(),
58
+ disabled: trailingContentDisabled || disabled,
59
+ onChange: onChangeRadio,
60
+ });
61
+ innerContainer.appendChild(radio);
62
+ }
63
+ if (trailingContent === 'disclosure') {
64
+ const trailingIcon = GidsIconDom({
65
+ size: 'md',
66
+ appearance: 'regular',
67
+ name: 'chevron-right',
68
+ alt: '',
69
+ className: disabled
70
+ ? `gids-compound-button__trailing-icon gids-compound-button__icon-disabled`
71
+ : `gids-compound-button__trailing-icon`,
72
+ });
73
+ innerContainer.appendChild(trailingIcon);
74
+ }
75
+ compoundButton.appendChild(innerContainer);
76
+ if (onClick &&
77
+ trailingContent !== 'checkbox' &&
78
+ trailingContent !== 'radio') {
79
+ compoundButton.addEventListener('click', onClick);
80
+ }
81
+ return compoundButton;
82
+ };
83
+ //# sourceMappingURL=GidsCompoundButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsCompoundButton.js","sourceRoot":"","sources":["../../../src/components/GidsCompoundButton/GidsCompoundButton.ts"],"names":[],"mappings":"AACA,OAAO,EACN,UAAU,EACV,0BAA0B,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAG/E,MAAM,EAAE,+BAA+B,EAAE,GAAG,0BAA0B,CAAC;AASvE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACrC,QAAQ,EACR,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAC5B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,aAAa,GACe,EAAqB,EAAE;IACnD,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxD,cAAc,CAAC,SAAS,GAAG,+BAA+B,CAAC;QAC1D,OAAO;QACP,eAAe;QACf,QAAQ;KACR,CAAC,CAAC;IAEH,cAAc,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC9C,IAAI,QAAQ,EAAE,CAAC;QACd,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;SAAM,CAAC;QACP,cAAc,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACrD,cAAc,CAAC,SAAS,GAAG,uCAAuC,CAAC;IAEnE,IACC,WAAW;QACX,OAAO,WAAW,KAAK,QAAQ;QAC/B,WAAW,KAAK,EAAE;QAClB,WAAW,KAAK,QAAQ,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AC;YAChC,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,SAAS;YACrB,IAAI,EAAE,eAAe;YACrB,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,QAAQ;gBAClB,CAAC,CAAC,yEAAyE;gBAC3E,CAAC,CAAC,qCAAqC;SACxC,CAAC,CAAC;QACH,cAAc,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;IAED,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAE3C,IACC,OAAO;QACP,eAAe,KAAK,UAAU;QAC9B,eAAe,KAAK,OAAO,EAC1B,CAAC;QACF,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type ClassValue, type GidsContainerWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { type DomChildren } from '../../utils/domUtils.js';
3
+ export interface GidsContainerDomProps extends GidsContainerWebProps<DomChildren> {
4
+ className?: ClassValue;
5
+ }
6
+ export declare const GidsContainerDom: ({ children, fixed, maxWidth, className, }: GidsContainerDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsContainer.d.ts","sourceRoot":"","sources":["../../../src/components/GidsContainer/GidsContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EACf,KAAK,qBAAqB,EAE1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI7E,MAAM,WAAW,qBAChB,SAAQ,qBAAqB,CAAC,WAAW,CAAC;IAC1C,SAAS,CAAC,EAAE,UAAU,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,GAAI,2CAK9B,qBAAqB,KAAG,cAY1B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { GidsContainerWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils.js';
3
+ const { getGidsContainerClassNames } = GidsContainerWebUtils;
4
+ export const GidsContainerDom = ({ children, fixed = false, maxWidth = 'lg', className, }) => {
5
+ const container = document.createElement('div');
6
+ container.className = getGidsContainerClassNames({ fixed, maxWidth }, className);
7
+ if (children) {
8
+ appendAsChildren(container, children);
9
+ }
10
+ return container;
11
+ };
12
+ //# sourceMappingURL=GidsContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsContainer.js","sourceRoot":"","sources":["../../../src/components/GidsContainer/GidsContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,qBAAqB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,yBAAyB,CAAC;AAE7E,MAAM,EAAE,0BAA0B,EAAE,GAAG,qBAAqB,CAAC;AAO7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAChC,QAAQ,EACR,KAAK,GAAG,KAAK,EACb,QAAQ,GAAG,IAAI,EACf,SAAS,GACc,EAAkB,EAAE;IAC3C,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,SAAS,CAAC,SAAS,GAAG,0BAA0B,CAC/C,EAAE,KAAK,EAAE,QAAQ,EAAE,EACnB,SAAS,CACT,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACd,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type GidsSectionNoticeCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { type DomChildren, type DomNodeOrString } from '../../utils/domUtils.js';
3
+ export interface GidsSectionNoticeDomProps extends GidsSectionNoticeCommonProps<DomNodeOrString, DomChildren> {
4
+ onClickDismiss?: (event: MouseEvent) => void;
5
+ }
6
+ export declare const GidsSectionNoticeDom: ({ appearance, title, supportingText, children, dismissible, onClickDismiss, }: GidsSectionNoticeDomProps) => HTMLDivElement;
7
+ //# sourceMappingURL=GidsSectionNotice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSectionNotice.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSectionNotice/GidsSectionNotice.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,4BAA4B,EACjC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAEN,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,MAAM,yBAAyB,CAAC;AASjC,MAAM,WAAW,yBAChB,SAAQ,4BAA4B,CAAC,eAAe,EAAE,WAAW,CAAC;IAClE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,oBAAoB,GAAI,+EAOlC,yBAAyB,KAAG,cA0E9B,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { GidsSectionNoticeCommonUtils, } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsSectionNoticeWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ import { appendAsChildren, } from '../../utils/domUtils.js';
4
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
5
+ import { GidsButtonDom } from '../GidsButton/GidsButton.js';
6
+ import { GidsButtonGroupDom } from '../GidsButtonGroup/GidsButtonGroup.js';
7
+ const { getGidsSectionNoticeClassNames } = GidsSectionNoticeWebUtils;
8
+ const { getSectionNoticeIconName } = GidsSectionNoticeCommonUtils;
9
+ export const GidsSectionNoticeDom = ({ appearance = 'information', title, supportingText, children, dismissible = true, onClickDismiss, }) => {
10
+ const sectionNotice = document.createElement('div');
11
+ sectionNotice.className = getGidsSectionNoticeClassNames({ appearance });
12
+ const innerContainer = document.createElement('div');
13
+ innerContainer.className = 'gids-section-notice__inner-container';
14
+ const leadingIconContainer = document.createElement('div');
15
+ leadingIconContainer.className =
16
+ 'gids-section-notice__leading-icon-container';
17
+ const leadingIconName = getSectionNoticeIconName({ appearance });
18
+ const leadingIcon = GidsIconDom({
19
+ size: 'md',
20
+ appearance: 'filled',
21
+ name: leadingIconName,
22
+ alt: '',
23
+ className: `gids-section-notice__${appearance}-icon`,
24
+ });
25
+ leadingIconContainer.appendChild(leadingIcon);
26
+ innerContainer.appendChild(leadingIconContainer);
27
+ const contentContainer = document.createElement('div');
28
+ contentContainer.className = 'gids-section-notice__content-container';
29
+ const titleElement = document.createElement('div');
30
+ titleElement.className = 'gids-section-notice__title';
31
+ appendAsChildren(titleElement, title);
32
+ contentContainer.appendChild(titleElement);
33
+ if (supportingText) {
34
+ const supportingTextElement = document.createElement('div');
35
+ supportingTextElement.className = 'gids-section-notice__supporting-text';
36
+ appendAsChildren(supportingTextElement, supportingText);
37
+ contentContainer.appendChild(supportingTextElement);
38
+ }
39
+ if (children) {
40
+ contentContainer.appendChild(GidsButtonGroupDom({
41
+ layout: 'wrap',
42
+ children: children,
43
+ }));
44
+ }
45
+ innerContainer.appendChild(contentContainer);
46
+ if (dismissible && onClickDismiss) {
47
+ const leadingIcon = GidsIconDom({
48
+ size: 'sm',
49
+ appearance: 'filled',
50
+ name: 'cross',
51
+ alt: '',
52
+ });
53
+ const crossButton = GidsButtonDom({
54
+ as: 'button',
55
+ type: 'button',
56
+ appearance: 'subtle',
57
+ size: 'sm',
58
+ width: 'intrinsic',
59
+ leadingIcon: leadingIcon,
60
+ });
61
+ crossButton.addEventListener('click', onClickDismiss);
62
+ const crossBtnContainer = document.createElement('div');
63
+ crossBtnContainer.className = 'gids-section-notice__cross-button-container';
64
+ crossBtnContainer.appendChild(crossButton);
65
+ innerContainer.appendChild(crossBtnContainer);
66
+ }
67
+ sectionNotice.appendChild(innerContainer);
68
+ return sectionNotice;
69
+ };
70
+ //# sourceMappingURL=GidsSectionNotice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSectionNotice.js","sourceRoot":"","sources":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U,EAAE,QAAQ;YACpB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,WAAW;SACxB,CAAC,CAAC;QACH,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QACtD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACxD,iBAAiB,CAAC,SAAS,GAAG,6CAA6C,CAAC;QAC5E,iBAAiB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAC3C,cAAc,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC/C,CAAC;IAED,aAAa,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAE1C,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -26,6 +26,14 @@ export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
26
26
  export * from './components/GidsTagGroup/GidsTagGroup.js';
27
27
  export * from './components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js';
28
28
  export * from './components/GidsInputTag/GidsInputTag.js';
29
+ export * from './components/GidsButtonGroup/GidsButtonGroup.js';
30
+ export * from './components/GidsButtonDock/GidsButtonDock.js';
31
+ export * from './components/GidsSectionNotice/GidsSectionNotice.js';
32
+ export * from './components/GidsCompoundButton/GidsCompoundButton.js';
33
+ export * from './components/GidsBox/GidsBox.js';
34
+ export * from './components/GidsContainer/GidsContainer.js';
35
+ export * from './components/GidsBreadcrumbItem/GidsBreadcrumbItem.js';
36
+ export * from './components/GidsBreadcrumb/GidsBreadcrumb.js';
29
37
  /**
30
38
  * Utilities
31
39
  */
@@ -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;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CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qEAAqE,CAAC;AACpF,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,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;AAE9D;;GAEG;AACH,cAAc,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -26,6 +26,14 @@ export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
26
26
  export * from './components/GidsTagGroup/GidsTagGroup.js';
27
27
  export * from './components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js';
28
28
  export * from './components/GidsInputTag/GidsInputTag.js';
29
+ export * from './components/GidsButtonGroup/GidsButtonGroup.js';
30
+ export * from './components/GidsButtonDock/GidsButtonDock.js';
31
+ export * from './components/GidsSectionNotice/GidsSectionNotice.js';
32
+ export * from './components/GidsCompoundButton/GidsCompoundButton.js';
33
+ export * from './components/GidsBox/GidsBox.js';
34
+ export * from './components/GidsContainer/GidsContainer.js';
35
+ export * from './components/GidsBreadcrumbItem/GidsBreadcrumbItem.js';
36
+ export * from './components/GidsBreadcrumb/GidsBreadcrumb.js';
29
37
  /**
30
38
  * Utilities
31
39
  */
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;AACv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AAC1D,cAAc,iDAAiD,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;AAE9D;;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": "2.0.8",
3
+ "version": "2.1.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": "2.0.8",
28
- "@ganpatiinfo/gids-web-shared": "2.0.8"
27
+ "@ganpatiinfo/gids-core-shared": "2.1.0",
28
+ "@ganpatiinfo/gids-web-shared": "2.1.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@ganpatiinfo/gids-web-theme-interface": "2.0.7",
@@ -0,0 +1,34 @@
1
+ import {
2
+ type ClassValue,
3
+ type GidsBoxWebProps,
4
+ GidsBoxWebUtils,
5
+ PermittedGidsBoxElements,
6
+ } from '@ganpatiinfo/gids-web-shared';
7
+ import { appendAsChildren } from '../../utils/domUtils.js';
8
+
9
+ const { getGidsBoxClassNames } = GidsBoxWebUtils;
10
+
11
+ export type GidsBoxDomProps<ComponentType extends PermittedGidsBoxElements> =
12
+ GidsBoxWebProps<Element, ComponentType> & {
13
+ className?: ClassValue;
14
+ };
15
+
16
+ export const GidsBoxDom = <
17
+ ComponentType extends PermittedGidsBoxElements = 'div',
18
+ >({
19
+ children,
20
+ component,
21
+ className,
22
+ }: GidsBoxDomProps<ComponentType>): HTMLElement => {
23
+ const box = document.createElement(
24
+ //@ts-expect-error: ex
25
+ component && component !== '' ? component : 'div',
26
+ ) as HTMLElement;
27
+ box.className = getGidsBoxClassNames(className);
28
+
29
+ if (children) {
30
+ appendAsChildren(box, children);
31
+ }
32
+
33
+ return box;
34
+ };
@@ -0,0 +1,31 @@
1
+ import {
2
+ type ClassValue,
3
+ GidsBreadcrumbWebUtils,
4
+ } from '@ganpatiinfo/gids-web-shared';
5
+ import { appendAsChildren, type DomChildren } from '../../utils/domUtils.js';
6
+ import { type GidsBreadcrumbCommonProps } from '@ganpatiinfo/gids-core-shared';
7
+
8
+ const { getGidsBreadcrumbClassNames } = GidsBreadcrumbWebUtils;
9
+
10
+ export interface GidsBreadcrumbDomProps
11
+ extends GidsBreadcrumbCommonProps<DomChildren> {
12
+ extraClasses?: ClassValue;
13
+ }
14
+
15
+ export const GidsBreadcrumbDom = ({
16
+ children,
17
+ extraClasses,
18
+ }: GidsBreadcrumbDomProps): HTMLElement => {
19
+ const breadcrumb = document.createElement('nav');
20
+ breadcrumb.className = getGidsBreadcrumbClassNames(extraClasses);
21
+
22
+ breadcrumb.setAttribute('aria-label', 'Breadcrumb');
23
+
24
+ if (children) {
25
+ const orderedList = document.createElement('ol');
26
+ appendAsChildren(orderedList, children);
27
+ breadcrumb.appendChild(orderedList);
28
+ }
29
+
30
+ return breadcrumb;
31
+ };
@@ -0,0 +1,94 @@
1
+ import { type GidsBreadcrumbItemCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import {
3
+ type ClassValue,
4
+ GidsBreadcrumbItemWebUtils,
5
+ } from '@ganpatiinfo/gids-web-shared';
6
+ import {
7
+ appendAsChildren,
8
+ type DomNodeOrString,
9
+ } from '../../utils/domUtils.js';
10
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
11
+ import { IconName } from '@ganpatiinfo/gids-web-theme-interface';
12
+
13
+ const { getGidsBreadcrumbItemClassNames } = GidsBreadcrumbItemWebUtils;
14
+
15
+ export interface GidsBreadcrumbItemDomProps
16
+ extends GidsBreadcrumbItemCommonProps<
17
+ DomNodeOrString,
18
+ DomNodeOrString,
19
+ DomNodeOrString
20
+ > {
21
+ className?: ClassValue;
22
+ href?: DomNodeOrString;
23
+ onClick?: (this: HTMLAnchorElement, event: Event) => void;
24
+ }
25
+
26
+ export const GidsBreadcrumbItemDom = ({
27
+ children,
28
+ selected,
29
+ leadingIcon,
30
+ href,
31
+ onClick,
32
+ className,
33
+ separator,
34
+ isSeparatorVisible = true,
35
+ renderingSystem = 'non-array',
36
+ currentIndex = 0,
37
+ totalLength = 0,
38
+ }: GidsBreadcrumbItemDomProps): HTMLLIElement => {
39
+ const breadcrumbItem = document.createElement('li');
40
+ breadcrumbItem.className = getGidsBreadcrumbItemClassNames(
41
+ { selected },
42
+ className,
43
+ );
44
+ const breadcrumbAnchorItem = document.createElement('a');
45
+ breadcrumbAnchorItem.className = `gids-breadcrumb-item__anchor-label`;
46
+
47
+ if (href) {
48
+ breadcrumbAnchorItem.setAttribute('href', href as string);
49
+ }
50
+
51
+ if (leadingIcon && leadingIcon !== '' && leadingIcon !== '(none)') {
52
+ breadcrumbAnchorItem.appendChild(
53
+ GidsIconDom({
54
+ name: leadingIcon as IconName,
55
+ appearance: 'regular',
56
+ alt: '',
57
+ size: 'md',
58
+ className: 'gids-breadcrumb-item__leading-icon',
59
+ }),
60
+ );
61
+ }
62
+
63
+ if (children) {
64
+ appendAsChildren(breadcrumbAnchorItem, children);
65
+ }
66
+
67
+ breadcrumbItem.appendChild(breadcrumbAnchorItem);
68
+
69
+ if (isSeparatorVisible) {
70
+ if (
71
+ (renderingSystem === 'array' && currentIndex < totalLength - 1) ||
72
+ renderingSystem === 'non-array'
73
+ ) {
74
+ breadcrumbItem.appendChild(
75
+ GidsIconDom({
76
+ name:
77
+ separator && separator !== '' && separator !== '(none)'
78
+ ? (separator as IconName)
79
+ : 'chevron-right',
80
+ appearance: 'filled',
81
+ alt: '',
82
+ size: 'md',
83
+ className: 'gids-breadcrumb-item__separator-icon',
84
+ }),
85
+ );
86
+ }
87
+ }
88
+
89
+ if (onClick) {
90
+ breadcrumbItem.addEventListener('click', onClick);
91
+ }
92
+
93
+ return breadcrumbItem;
94
+ };
@@ -76,14 +76,14 @@ export const GidsButtonDom = <
76
76
  button.appendChild(
77
77
  GidsSpinnerControlDom({
78
78
  size: size === 'lg' || size === undefined ? 'md' : size,
79
- indeterminate: true
79
+ indeterminate: true,
80
80
  }),
81
81
  );
82
82
  }
83
83
 
84
- if (onClick && !loading) {
85
- button.addEventListener('click', onClick)
86
- }
84
+ if (onClick && !loading) {
85
+ button.addEventListener('click', onClick);
86
+ }
87
87
 
88
88
  return button;
89
89
  };
@@ -0,0 +1,33 @@
1
+ import { type GidsButtonDockCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsButtonDockWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ import { appendAsChildren, type DomChildren } from '../../utils/domUtils.js';
4
+
5
+ const { getGidsButtonDockClassNames } = GidsButtonDockWebUtils;
6
+
7
+ export interface GidsButtonDockDomProps
8
+ extends GidsButtonDockCommonProps<DomChildren> {
9
+ extraClasses?: string;
10
+ }
11
+
12
+ export const GidsButtonDockDom = ({
13
+ primaryChildren,
14
+ secondaryChildren,
15
+ extraClasses,
16
+ }: GidsButtonDockDomProps): HTMLDivElement => {
17
+ const buttonDock = document.createElement('div');
18
+ buttonDock.className = getGidsButtonDockClassNames(extraClasses);
19
+
20
+ const primaryArea = document.createElement('div');
21
+ primaryArea.classList.add('gids-button-dock__primary-area');
22
+
23
+ const secondaryArea = document.createElement('div');
24
+ secondaryArea.classList.add('gids-button-dock__secondary-area');
25
+
26
+ appendAsChildren(primaryArea, primaryChildren);
27
+ appendAsChildren(secondaryArea, secondaryChildren);
28
+
29
+ appendAsChildren(buttonDock, secondaryArea);
30
+ appendAsChildren(buttonDock, primaryArea);
31
+
32
+ return buttonDock;
33
+ };
@@ -0,0 +1,26 @@
1
+ import { GidsButtonGroupCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsButtonGroupWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ import { appendAsChildren, DomChildren } from '../../utils/domUtils.js';
4
+
5
+ const { getGidsButtonGroupClassNames } = GidsButtonGroupWebUtils;
6
+
7
+ export interface GidsButtonGroupDomProps
8
+ extends GidsButtonGroupCommonProps<DomChildren> {
9
+ extraClasses?: string;
10
+ }
11
+
12
+ export const GidsButtonGroupDom = ({
13
+ layout,
14
+ children,
15
+ extraClasses,
16
+ }: GidsButtonGroupDomProps): HTMLSpanElement => {
17
+ const buttonGroup = document.createElement('span');
18
+ buttonGroup.className = getGidsButtonGroupClassNames(
19
+ { layout },
20
+ extraClasses,
21
+ );
22
+
23
+ appendAsChildren(buttonGroup, children);
24
+
25
+ return buttonGroup;
26
+ };
@@ -0,0 +1,120 @@
1
+ import { type GidsCompoundButtonCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import {
3
+ generateId,
4
+ GidsCompoundButtonWebUtils,
5
+ } from '@ganpatiinfo/gids-web-shared';
6
+ import { appendAsChildren, DomNodeOrString } from '../../utils/domUtils.js';
7
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
8
+ import { GidsCheckboxControlDom } from '../_GidsCheckboxControl/GidsCheckboxControl.js';
9
+ import { GidsRadioControlDom } from '../_GidsRadioControl/GidsRadioControl.js';
10
+ import { IconName } from '@ganpatiinfo/gids-web-theme-interface';
11
+
12
+ const { getGidsCompoundButtonClassNames } = GidsCompoundButtonWebUtils;
13
+
14
+ export interface GidsCompoundButtonDomProps
15
+ extends GidsCompoundButtonCommonProps<DomNodeOrString, DomNodeOrString> {
16
+ onClick?: (this: HTMLButtonElement, event: Event) => void;
17
+ onChangeCheckbox?: (event: Event) => void;
18
+ onChangeRadio?: (event: Event) => void;
19
+ }
20
+
21
+ export const GidsCompoundButtonDom = ({
22
+ children,
23
+ leadingIcon,
24
+ trailingContent,
25
+ trailingContentDisabled,
26
+ trailingContentIndeterminate,
27
+ checked,
28
+ disabled,
29
+ onClick,
30
+ onChangeCheckbox,
31
+ onChangeRadio,
32
+ }: GidsCompoundButtonDomProps): HTMLButtonElement => {
33
+ const compoundButton = document.createElement('button');
34
+ compoundButton.className = getGidsCompoundButtonClassNames({
35
+ checked,
36
+ trailingContent,
37
+ disabled,
38
+ });
39
+
40
+ compoundButton.setAttribute('type', 'button');
41
+ if (disabled) {
42
+ compoundButton.setAttribute('disabled', '');
43
+ } else {
44
+ compoundButton.removeAttribute('disabled');
45
+ }
46
+
47
+ const innerContainer = document.createElement('div');
48
+ innerContainer.className = 'gids-compound-button__inner-container';
49
+
50
+ if (
51
+ leadingIcon &&
52
+ typeof leadingIcon === 'string' &&
53
+ leadingIcon !== '' &&
54
+ leadingIcon !== '(none)'
55
+ ) {
56
+ const leadingIconEl = GidsIconDom({
57
+ size: 'md',
58
+ appearance: 'regular',
59
+ name: leadingIcon as IconName,
60
+ alt: '',
61
+ className: disabled
62
+ ? `gids-compound-button__leading-icon gids-compound-button__icon-disabled`
63
+ : `gids-compound-button__leading-icon`,
64
+ });
65
+ appendAsChildren(innerContainer, leadingIconEl);
66
+ }
67
+
68
+ const labelElement = document.createElement('div');
69
+ labelElement.className = disabled
70
+ ? 'gids-compound-button__label gids-compound-button__label-disabled'
71
+ : 'gids-compound-button__label';
72
+ appendAsChildren(labelElement, children);
73
+ innerContainer.appendChild(labelElement);
74
+
75
+ if (trailingContent === 'checkbox') {
76
+ const checkbox = GidsCheckboxControlDom({
77
+ checked: checked,
78
+ indeterminate: trailingContentIndeterminate,
79
+ disabled: trailingContentDisabled || disabled,
80
+ inputId: generateId(),
81
+ onChange: onChangeCheckbox,
82
+ });
83
+ innerContainer.appendChild(checkbox);
84
+ }
85
+
86
+ if (trailingContent === 'radio') {
87
+ const radio = GidsRadioControlDom({
88
+ checked: checked,
89
+ inputId: generateId(),
90
+ disabled: trailingContentDisabled || disabled,
91
+ onChange: onChangeRadio,
92
+ });
93
+ innerContainer.appendChild(radio);
94
+ }
95
+
96
+ if (trailingContent === 'disclosure') {
97
+ const trailingIcon = GidsIconDom({
98
+ size: 'md',
99
+ appearance: 'regular',
100
+ name: 'chevron-right',
101
+ alt: '',
102
+ className: disabled
103
+ ? `gids-compound-button__trailing-icon gids-compound-button__icon-disabled`
104
+ : `gids-compound-button__trailing-icon`,
105
+ });
106
+ innerContainer.appendChild(trailingIcon);
107
+ }
108
+
109
+ compoundButton.appendChild(innerContainer);
110
+
111
+ if (
112
+ onClick &&
113
+ trailingContent !== 'checkbox' &&
114
+ trailingContent !== 'radio'
115
+ ) {
116
+ compoundButton.addEventListener('click', onClick);
117
+ }
118
+
119
+ return compoundButton;
120
+ };
@@ -0,0 +1,32 @@
1
+ import {
2
+ type ClassValue,
3
+ type GidsContainerWebProps,
4
+ GidsContainerWebUtils,
5
+ } from '@ganpatiinfo/gids-web-shared';
6
+ import { appendAsChildren, type DomChildren } from '../../utils/domUtils.js';
7
+
8
+ const { getGidsContainerClassNames } = GidsContainerWebUtils;
9
+
10
+ export interface GidsContainerDomProps
11
+ extends GidsContainerWebProps<DomChildren> {
12
+ className?: ClassValue;
13
+ }
14
+
15
+ export const GidsContainerDom = ({
16
+ children,
17
+ fixed = false,
18
+ maxWidth = 'lg',
19
+ className,
20
+ }: GidsContainerDomProps): HTMLDivElement => {
21
+ const container = document.createElement('div');
22
+ container.className = getGidsContainerClassNames(
23
+ { fixed, maxWidth },
24
+ className,
25
+ );
26
+
27
+ if (children) {
28
+ appendAsChildren(container, children);
29
+ }
30
+
31
+ return container;
32
+ };
@@ -0,0 +1,105 @@
1
+ import {
2
+ GidsSectionNoticeCommonUtils,
3
+ type GidsSectionNoticeCommonProps,
4
+ } from '@ganpatiinfo/gids-core-shared';
5
+ import { GidsSectionNoticeWebUtils } from '@ganpatiinfo/gids-web-shared';
6
+ import {
7
+ appendAsChildren,
8
+ type DomChildren,
9
+ type DomNodeOrString,
10
+ } from '../../utils/domUtils.js';
11
+ import { type IconName } from '@ganpatiinfo/gids-web-theme-interface';
12
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
13
+ import { GidsButtonDom } from '../GidsButton/GidsButton.js';
14
+ import { GidsButtonGroupDom } from '../GidsButtonGroup/GidsButtonGroup.js';
15
+
16
+ const { getGidsSectionNoticeClassNames } = GidsSectionNoticeWebUtils;
17
+ const { getSectionNoticeIconName } = GidsSectionNoticeCommonUtils;
18
+
19
+ export interface GidsSectionNoticeDomProps
20
+ extends GidsSectionNoticeCommonProps<DomNodeOrString, DomChildren> {
21
+ onClickDismiss?: (event: MouseEvent) => void;
22
+ }
23
+
24
+ export const GidsSectionNoticeDom = ({
25
+ appearance = 'information',
26
+ title,
27
+ supportingText,
28
+ children,
29
+ dismissible = true,
30
+ onClickDismiss,
31
+ }: GidsSectionNoticeDomProps): HTMLDivElement => {
32
+ const sectionNotice = document.createElement('div');
33
+ sectionNotice.className = getGidsSectionNoticeClassNames({ appearance });
34
+
35
+ const innerContainer = document.createElement('div');
36
+ innerContainer.className = 'gids-section-notice__inner-container';
37
+
38
+ const leadingIconContainer = document.createElement('div');
39
+ leadingIconContainer.className =
40
+ 'gids-section-notice__leading-icon-container';
41
+
42
+ const leadingIconName = getSectionNoticeIconName({ appearance }) as IconName;
43
+
44
+ const leadingIcon = GidsIconDom({
45
+ size: 'md',
46
+ appearance: 'filled',
47
+ name: leadingIconName,
48
+ alt: '',
49
+ className: `gids-section-notice__${appearance}-icon`,
50
+ });
51
+ leadingIconContainer.appendChild(leadingIcon);
52
+ innerContainer.appendChild(leadingIconContainer);
53
+
54
+ const contentContainer = document.createElement('div');
55
+ contentContainer.className = 'gids-section-notice__content-container';
56
+
57
+ const titleElement = document.createElement('div');
58
+ titleElement.className = 'gids-section-notice__title';
59
+ appendAsChildren(titleElement, title);
60
+ contentContainer.appendChild(titleElement);
61
+
62
+ if (supportingText) {
63
+ const supportingTextElement = document.createElement('div');
64
+ supportingTextElement.className = 'gids-section-notice__supporting-text';
65
+ appendAsChildren(supportingTextElement, supportingText);
66
+ contentContainer.appendChild(supportingTextElement);
67
+ }
68
+
69
+ if (children) {
70
+ contentContainer.appendChild(
71
+ GidsButtonGroupDom({
72
+ layout: 'wrap',
73
+ children: children,
74
+ }),
75
+ );
76
+ }
77
+
78
+ innerContainer.appendChild(contentContainer);
79
+
80
+ if (dismissible && onClickDismiss) {
81
+ const leadingIcon = GidsIconDom({
82
+ size: 'sm',
83
+ appearance: 'filled',
84
+ name: 'cross',
85
+ alt: '',
86
+ });
87
+ const crossButton = GidsButtonDom({
88
+ as: 'button',
89
+ type: 'button',
90
+ appearance: 'subtle',
91
+ size: 'sm',
92
+ width: 'intrinsic',
93
+ leadingIcon: leadingIcon,
94
+ });
95
+ crossButton.addEventListener('click', onClickDismiss);
96
+ const crossBtnContainer = document.createElement('div');
97
+ crossBtnContainer.className = 'gids-section-notice__cross-button-container';
98
+ crossBtnContainer.appendChild(crossButton);
99
+ innerContainer.appendChild(crossBtnContainer);
100
+ }
101
+
102
+ sectionNotice.appendChild(innerContainer);
103
+
104
+ return sectionNotice;
105
+ };
package/src/index.ts CHANGED
@@ -26,6 +26,14 @@ export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
26
26
  export * from './components/GidsTagGroup/GidsTagGroup.js';
27
27
  export * from './components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js';
28
28
  export * from './components/GidsInputTag/GidsInputTag.js';
29
+ export * from './components/GidsButtonGroup/GidsButtonGroup.js';
30
+ export * from './components/GidsButtonDock/GidsButtonDock.js';
31
+ export * from './components/GidsSectionNotice/GidsSectionNotice.js';
32
+ export * from './components/GidsCompoundButton/GidsCompoundButton.js';
33
+ export * from './components/GidsBox/GidsBox.js';
34
+ export * from './components/GidsContainer/GidsContainer.js';
35
+ export * from './components/GidsBreadcrumbItem/GidsBreadcrumbItem.js';
36
+ export * from './components/GidsBreadcrumb/GidsBreadcrumb.js';
29
37
 
30
38
  /**
31
39
  * Utilities