@ganpatiinfo/gids-web-dom-reference 2.0.7 → 2.0.9
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.
- package/CHANGELOG.md +23 -0
- package/dist/components/GidsButtonDock/GidsButtonDock.d.ts +7 -0
- package/dist/components/GidsButtonDock/GidsButtonDock.d.ts.map +1 -0
- package/dist/components/GidsButtonDock/GidsButtonDock.js +17 -0
- package/dist/components/GidsButtonDock/GidsButtonDock.js.map +1 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.d.ts +7 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.d.ts.map +1 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.js +10 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.js.map +1 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.d.ts +9 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.d.ts.map +1 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.js +83 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.js.map +1 -0
- package/dist/components/GidsInputTag/GidsInputTag.d.ts +7 -0
- package/dist/components/GidsInputTag/GidsInputTag.d.ts.map +1 -0
- package/dist/components/GidsInputTag/GidsInputTag.js +38 -0
- package/dist/components/GidsInputTag/GidsInputTag.js.map +1 -0
- package/dist/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.d.ts +6 -0
- package/dist/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.d.ts.map +1 -0
- package/dist/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js +17 -0
- package/dist/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js.map +1 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.d.ts +7 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.d.ts.map +1 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.js +70 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.js.map +1 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.d.ts +7 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.d.ts.map +1 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.js +10 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/GidsButtonDock/GidsButtonDock.ts +33 -0
- package/src/components/GidsButtonGroup/GidsButtonGroup.ts +26 -0
- package/src/components/GidsCompoundButton/GidsCompoundButton.ts +120 -0
- package/src/components/GidsInputTag/GidsInputTag.ts +62 -0
- package/src/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.ts +31 -0
- package/src/components/GidsSectionNotice/GidsSectionNotice.ts +105 -0
- package/src/components/GidsTagGroup/GidsTagGroup.ts +22 -0
- package/src/index.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @ganpatiinfo/gids-web-dom-reference
|
|
2
2
|
|
|
3
|
+
## 2.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added `ButtonDock`, `ButtonGroup`, `SectionNotice` and `CompoundButton`
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @ganpatiinfo/gids-core-shared@2.0.9
|
|
11
|
+
- @ganpatiinfo/gids-web-shared@2.0.9
|
|
12
|
+
|
|
13
|
+
## 2.0.8
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 2a43b1b: Added `InputTag` dom reference.
|
|
18
|
+
Added `TagGroup` dom reference
|
|
19
|
+
- Updated dependencies [2a43b1b]
|
|
20
|
+
- Updated dependencies [2a43b1b]
|
|
21
|
+
- Updated dependencies [2a43b1b]
|
|
22
|
+
- @ganpatiinfo/gids-web-theme-interface@2.0.7
|
|
23
|
+
- @ganpatiinfo/gids-web-shared@2.0.8
|
|
24
|
+
- @ganpatiinfo/gids-core-shared@2.0.8
|
|
25
|
+
|
|
3
26
|
## 2.0.7
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -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+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AAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type GidsInputTagCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { type DomNodeOrString } from '../../utils/domUtils.js';
|
|
3
|
+
export interface GidsInputTagDomProps extends GidsInputTagCommonProps<DomNodeOrString> {
|
|
4
|
+
onClick?: (event: MouseEvent) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const GidsInputTagDom: ({ label, appearance, size, icon, dismissible, disabled, dismissButtonLabel, onClick, }: GidsInputTagDomProps) => HTMLSpanElement | HTMLButtonElement;
|
|
7
|
+
//# sourceMappingURL=GidsInputTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTag.d.ts","sourceRoot":"","sources":["../../../src/components/GidsInputTag/GidsInputTag.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,uBAAuB,EAE5B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAMhF,MAAM,WAAW,oBAChB,SAAQ,uBAAuB,CAAC,eAAe,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,GAAI,wFAS7B,oBAAoB,KAAG,eAAe,GAAG,iBAoC3C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { GidsInputTagCommonUtils, } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsInputTagWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { toggleAttribute } from '../../utils/domUtils.js';
|
|
4
|
+
import { GidsInputTagButtonDom } from './_GidsInputTagButton/GidsInputTagButton.js';
|
|
5
|
+
const { getDismissButtonLabel } = GidsInputTagCommonUtils;
|
|
6
|
+
const { getGidsInputTagClassNames } = GidsInputTagWebUtils;
|
|
7
|
+
export const GidsInputTagDom = ({ label, appearance, size, icon, dismissible, disabled, dismissButtonLabel, onClick, }) => {
|
|
8
|
+
const inputTag = dismissible
|
|
9
|
+
? document.createElement('span')
|
|
10
|
+
: document.createElement('button');
|
|
11
|
+
inputTag.className = getGidsInputTagClassNames({
|
|
12
|
+
size,
|
|
13
|
+
appearance,
|
|
14
|
+
disabled,
|
|
15
|
+
dismissible,
|
|
16
|
+
});
|
|
17
|
+
if (icon !== undefined) {
|
|
18
|
+
inputTag.append(icon);
|
|
19
|
+
}
|
|
20
|
+
inputTag.append(label);
|
|
21
|
+
if (dismissible) {
|
|
22
|
+
inputTag.appendChild(GidsInputTagButtonDom({
|
|
23
|
+
appearance,
|
|
24
|
+
disabled,
|
|
25
|
+
size,
|
|
26
|
+
onClick,
|
|
27
|
+
label: getDismissButtonLabel(dismissButtonLabel),
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
toggleAttribute(inputTag, 'disabled', !!disabled);
|
|
32
|
+
if (onClick) {
|
|
33
|
+
inputTag.addEventListener('click', onClick);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return inputTag;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=GidsInputTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTag.js","sourceRoot":"","sources":["../../../src/components/GidsInputTag/GidsInputTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,uBAAuB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAwB,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,MAAM,EAAE,qBAAqB,EAAE,GAAG,uBAAuB,CAAC;AAC1D,MAAM,EAAE,yBAAyB,EAAE,GAAG,oBAAoB,CAAC;AAO3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,OAAO,GACe,EAAuC,EAAE;IAC/D,MAAM,QAAQ,GAAG,WAAW;QAC3B,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;QAChC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAEpC,QAAQ,CAAC,SAAS,GAAG,yBAAyB,CAAC;QAC9C,IAAI;QACJ,UAAU;QACV,QAAQ;QACR,WAAW;KACX,CAAC,CAAC;IAEH,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACxB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEvB,IAAI,WAAW,EAAE,CAAC;QACjB,QAAQ,CAAC,WAAW,CACnB,qBAAqB,CAAC;YACrB,UAAU;YACV,QAAQ;YACR,IAAI;YACJ,OAAO;YACP,KAAK,EAAE,qBAAqB,CAAC,kBAAkB,CAAC;SAChD,CAAC,CACF,CAAC;IACH,CAAC;SAAM,CAAC;QACP,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,OAAO,EAAE,CAAC;YACb,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;IACF,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type GidsInputTagButtonCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
export interface GidsInputTagButtonDomProps extends GidsInputTagButtonCommonProps {
|
|
3
|
+
onClick?: (event: MouseEvent) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const GidsInputTagButtonDom: ({ appearance, disabled, size, label, onClick, }: GidsInputTagButtonDomProps) => HTMLButtonElement;
|
|
6
|
+
//# sourceMappingURL=GidsInputTagButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTagButton.d.ts","sourceRoot":"","sources":["../../../../src/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAOnF,MAAM,WAAW,0BAChB,SAAQ,6BAA6B;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,qBAAqB,GAAI,iDAMnC,0BAA0B,KAAG,iBAY/B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GidsInputTagButtonWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
import { toggleAttribute } from '../../../utils/domUtils.js';
|
|
3
|
+
import { GidsIconDom } from '../../GidsIcon/GidsIcon.js';
|
|
4
|
+
const { getGidsInputTagButtonClassNames } = GidsInputTagButtonWebUtils;
|
|
5
|
+
export const GidsInputTagButtonDom = ({ appearance, disabled, size, label, onClick, }) => {
|
|
6
|
+
const tagButton = document.createElement('button');
|
|
7
|
+
tagButton.className = getGidsInputTagButtonClassNames({ size, appearance });
|
|
8
|
+
tagButton.setAttribute('aria-label', label ?? '');
|
|
9
|
+
toggleAttribute(tagButton, 'disabled', !!disabled);
|
|
10
|
+
const icon = GidsIconDom({ name: 'cross', alt: '' });
|
|
11
|
+
tagButton.appendChild(icon);
|
|
12
|
+
if (onClick) {
|
|
13
|
+
tagButton.addEventListener('click', onClick);
|
|
14
|
+
}
|
|
15
|
+
return tagButton;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=GidsInputTagButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTagButton.js","sourceRoot":"","sources":["../../../../src/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,EAAE,+BAA+B,EAAE,GAAG,0BAA0B,CAAC;AAOvE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACrC,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,GACqB,EAAqB,EAAE;IACnD,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACnD,SAAS,CAAC,SAAS,GAAG,+BAA+B,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAC5E,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAClD,eAAe,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IACrD,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,OAAO,EAAE,CAAC;QACb,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9C,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":["../../../src/components/GidsSectionNotice/GidsSectionNotice.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,GAE5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EACN,gBAAgB,GAGhB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,EAAE,8BAA8B,EAAE,GAAG,yBAAyB,CAAC;AACrE,MAAM,EAAE,wBAAwB,EAAE,GAAG,4BAA4B,CAAC;AAOlE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACpC,UAAU,GAAG,aAAa,EAC1B,KAAK,EACL,cAAc,EACd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shared';
|
|
2
|
+
import { type DomChildren } from '../../utils/domUtils.js';
|
|
3
|
+
export interface GidsTagGroupDomProps extends GidsTagGroupCommonProps<DomChildren> {
|
|
4
|
+
extraClasses?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const GidsTagGroupDom: ({ children, extraClasses, }: GidsTagGroupDomProps) => HTMLSpanElement;
|
|
7
|
+
//# sourceMappingURL=GidsTagGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsTagGroup.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTagGroup/GidsTagGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI7E,MAAM,WAAW,oBAChB,SAAQ,uBAAuB,CAAC,WAAW,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,GAAI,6BAG7B,oBAAoB,KAAG,eAOzB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GidsTagGroupWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
import { appendAsChildren } from '../../utils/domUtils.js';
|
|
3
|
+
const { getGidsTagGroupClassNames } = GidsTagGroupWebUtils;
|
|
4
|
+
export const GidsTagGroupDom = ({ children, extraClasses, }) => {
|
|
5
|
+
const tagGroup = document.createElement('span');
|
|
6
|
+
tagGroup.className = getGidsTagGroupClassNames(extraClasses);
|
|
7
|
+
appendAsChildren(tagGroup, children);
|
|
8
|
+
return tagGroup;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=GidsTagGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsTagGroup.js","sourceRoot":"","sources":["../../../src/components/GidsTagGroup/GidsTagGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAoB,MAAM,yBAAyB,CAAC;AAE7E,MAAM,EAAE,yBAAyB,EAAE,GAAG,oBAAoB,CAAC;AAO3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC/B,QAAQ,EACR,YAAY,GACU,EAAmB,EAAE;IAC3C,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,SAAS,GAAG,yBAAyB,CAAC,YAAY,CAAC,CAAC;IAE7D,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAErC,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,13 @@ export * from './components/GidsSwitchGroup/GidsSwitchGroup.js';
|
|
|
23
23
|
export * from './components/GidsBadge/GidsBadge.js';
|
|
24
24
|
export * from './components/GidsAvatar/GidsAvatar.js';
|
|
25
25
|
export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
|
|
26
|
+
export * from './components/GidsTagGroup/GidsTagGroup.js';
|
|
27
|
+
export * from './components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js';
|
|
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';
|
|
26
33
|
/**
|
|
27
34
|
* Utilities
|
|
28
35
|
*/
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uCAAuC,CAAC;AACtD,cAAc,yC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A2C,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;AAEtE;;GAEG;AACH,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,13 @@ export * from './components/GidsSwitchGroup/GidsSwitchGroup.js';
|
|
|
23
23
|
export * from './components/GidsBadge/GidsBadge.js';
|
|
24
24
|
export * from './components/GidsAvatar/GidsAvatar.js';
|
|
25
25
|
export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
|
|
26
|
+
export * from './components/GidsTagGroup/GidsTagGroup.js';
|
|
27
|
+
export * from './components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js';
|
|
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';
|
|
26
33
|
/**
|
|
27
34
|
* Utilities
|
|
28
35
|
*/
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,uDAAuD,CAAC;AACtE,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,0DAA0D,CAAC;AACzE,cA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1
|
{
|
|
2
2
|
"name": "@ganpatiinfo/gids-web-dom-reference",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "DOM for components reference implementations",
|
|
6
6
|
"homepage": "https://ganpatiinfosystem.vercel.app/",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"directory": "packages/private/web-dom-reference"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ganpatiinfo/gids-core-shared": "2.0.
|
|
28
|
-
"@ganpatiinfo/gids-web-shared": "2.0.
|
|
27
|
+
"@ganpatiinfo/gids-core-shared": "2.0.9",
|
|
28
|
+
"@ganpatiinfo/gids-web-shared": "2.0.9"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@ganpatiinfo/gids-web-theme-interface": "2.0.
|
|
31
|
+
"@ganpatiinfo/gids-web-theme-interface": "2.0.7",
|
|
32
32
|
"@jest/globals": "29.7.0",
|
|
33
33
|
"@types/jasmine": "5.1.7",
|
|
34
34
|
"expect": "29.7.0"
|
|
@@ -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,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type GidsInputTagCommonProps,
|
|
3
|
+
GidsInputTagCommonUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-core-shared';
|
|
5
|
+
import { GidsInputTagWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
6
|
+
import { toggleAttribute, type DomNodeOrString } from '../../utils/domUtils.js';
|
|
7
|
+
import { GidsInputTagButtonDom } from './_GidsInputTagButton/GidsInputTagButton.js';
|
|
8
|
+
|
|
9
|
+
const { getDismissButtonLabel } = GidsInputTagCommonUtils;
|
|
10
|
+
const { getGidsInputTagClassNames } = GidsInputTagWebUtils;
|
|
11
|
+
|
|
12
|
+
export interface GidsInputTagDomProps
|
|
13
|
+
extends GidsInputTagCommonProps<DomNodeOrString> {
|
|
14
|
+
onClick?: (event: MouseEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const GidsInputTagDom = ({
|
|
18
|
+
label,
|
|
19
|
+
appearance,
|
|
20
|
+
size,
|
|
21
|
+
icon,
|
|
22
|
+
dismissible,
|
|
23
|
+
disabled,
|
|
24
|
+
dismissButtonLabel,
|
|
25
|
+
onClick,
|
|
26
|
+
}: GidsInputTagDomProps): HTMLSpanElement | HTMLButtonElement => {
|
|
27
|
+
const inputTag = dismissible
|
|
28
|
+
? document.createElement('span')
|
|
29
|
+
: document.createElement('button');
|
|
30
|
+
|
|
31
|
+
inputTag.className = getGidsInputTagClassNames({
|
|
32
|
+
size,
|
|
33
|
+
appearance,
|
|
34
|
+
disabled,
|
|
35
|
+
dismissible,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
if (icon !== undefined) {
|
|
39
|
+
inputTag.append(icon);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
inputTag.append(label);
|
|
43
|
+
|
|
44
|
+
if (dismissible) {
|
|
45
|
+
inputTag.appendChild(
|
|
46
|
+
GidsInputTagButtonDom({
|
|
47
|
+
appearance,
|
|
48
|
+
disabled,
|
|
49
|
+
size,
|
|
50
|
+
onClick,
|
|
51
|
+
label: getDismissButtonLabel(dismissButtonLabel),
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
} else {
|
|
55
|
+
toggleAttribute(inputTag, 'disabled', !!disabled);
|
|
56
|
+
if (onClick) {
|
|
57
|
+
inputTag.addEventListener('click', onClick);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return inputTag;
|
|
62
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type GidsInputTagButtonCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsInputTagButtonWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { toggleAttribute } from '../../../utils/domUtils.js';
|
|
4
|
+
import { GidsIconDom } from '../../GidsIcon/GidsIcon.js';
|
|
5
|
+
|
|
6
|
+
const { getGidsInputTagButtonClassNames } = GidsInputTagButtonWebUtils;
|
|
7
|
+
|
|
8
|
+
export interface GidsInputTagButtonDomProps
|
|
9
|
+
extends GidsInputTagButtonCommonProps {
|
|
10
|
+
onClick?: (event: MouseEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const GidsInputTagButtonDom = ({
|
|
14
|
+
appearance,
|
|
15
|
+
disabled,
|
|
16
|
+
size,
|
|
17
|
+
label,
|
|
18
|
+
onClick,
|
|
19
|
+
}: GidsInputTagButtonDomProps): HTMLButtonElement => {
|
|
20
|
+
const tagButton = document.createElement('button');
|
|
21
|
+
tagButton.className = getGidsInputTagButtonClassNames({ size, appearance });
|
|
22
|
+
tagButton.setAttribute('aria-label', label ?? '');
|
|
23
|
+
toggleAttribute(tagButton, 'disabled', !!disabled);
|
|
24
|
+
const icon = GidsIconDom({ name: 'cross', alt: '' });
|
|
25
|
+
tagButton.appendChild(icon);
|
|
26
|
+
if (onClick) {
|
|
27
|
+
tagButton.addEventListener('click', onClick);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return tagButton;
|
|
31
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type GidsTagGroupCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsTagGroupWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { appendAsChildren, type DomChildren } from '../../utils/domUtils.js';
|
|
4
|
+
|
|
5
|
+
const { getGidsTagGroupClassNames } = GidsTagGroupWebUtils;
|
|
6
|
+
|
|
7
|
+
export interface GidsTagGroupDomProps
|
|
8
|
+
extends GidsTagGroupCommonProps<DomChildren> {
|
|
9
|
+
extraClasses?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const GidsTagGroupDom = ({
|
|
13
|
+
children,
|
|
14
|
+
extraClasses,
|
|
15
|
+
}: GidsTagGroupDomProps): HTMLSpanElement => {
|
|
16
|
+
const tagGroup = document.createElement('span');
|
|
17
|
+
tagGroup.className = getGidsTagGroupClassNames(extraClasses);
|
|
18
|
+
|
|
19
|
+
appendAsChildren(tagGroup, children);
|
|
20
|
+
|
|
21
|
+
return tagGroup;
|
|
22
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -23,6 +23,13 @@ export * from './components/GidsSwitchGroup/GidsSwitchGroup.js';
|
|
|
23
23
|
export * from './components/GidsBadge/GidsBadge.js';
|
|
24
24
|
export * from './components/GidsAvatar/GidsAvatar.js';
|
|
25
25
|
export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
|
|
26
|
+
export * from './components/GidsTagGroup/GidsTagGroup.js';
|
|
27
|
+
export * from './components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js';
|
|
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';
|
|
26
33
|
|
|
27
34
|
/**
|
|
28
35
|
* Utilities
|