@ganpatiinfo/gids-react-web 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/dist/components/GidsButtonDock/GidsButtonDock.d.ts +28 -0
- package/dist/components/GidsButtonDock/GidsButtonDock.d.ts.map +1 -0
- package/dist/components/GidsButtonDock/GidsButtonDock.js +32 -0
- package/dist/components/GidsButtonDock/GidsButtonDock.js.map +1 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.d.ts +26 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.d.ts.map +1 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.js +28 -0
- package/dist/components/GidsButtonGroup/GidsButtonGroup.js.map +1 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.d.ts +49 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.d.ts.map +1 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.js +94 -0
- package/dist/components/GidsCompoundButton/GidsCompoundButton.js.map +1 -0
- package/dist/components/GidsInputTag/GidsInputTag.d.ts +48 -0
- package/dist/components/GidsInputTag/GidsInputTag.d.ts.map +1 -0
- package/dist/components/GidsInputTag/GidsInputTag.js +55 -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 +9 -0
- package/dist/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.js.map +1 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.d.ts +39 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.d.ts.map +1 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.js +53 -0
- package/dist/components/GidsSectionNotice/GidsSectionNotice.js.map +1 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.d.ts +27 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.d.ts.map +1 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.js +29 -0
- package/dist/components/GidsTagGroup/GidsTagGroup.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type GidsButtonDockCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
export type GidsButtonDockProps = GidsButtonDockCommonProps<ReactNode> & ComponentPropsWithRef<'div'>;
|
|
4
|
+
/**
|
|
5
|
+
* React DOM implementation of GIDS ButtonDock component.
|
|
6
|
+
*
|
|
7
|
+
* **Usage**
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GidsButtonDock } from '@ganpatiinfo/gids-react-web';
|
|
11
|
+
*
|
|
12
|
+
* export const MyComponent = () => (
|
|
13
|
+
* const buttonLabels = ['Button 1', 'Button 2'];
|
|
14
|
+
*
|
|
15
|
+
* const reactButtons = buttonLabels.map((label, index) => (
|
|
16
|
+
* <GidsButton type="button" key={index.toString()}>
|
|
17
|
+
* {label}
|
|
18
|
+
* </GidsButton>
|
|
19
|
+
* ));
|
|
20
|
+
* <GidsButtonDock primaryChildren={reactButtons}>
|
|
21
|
+
* </GidsButtonDock>
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* **Note:** Any additional props are passed to the outermost `<div>` DOM element that this component renders.
|
|
26
|
+
*/
|
|
27
|
+
export declare function GidsButtonDock({ primaryChildren, secondaryChildren, className, ...rest }: GidsButtonDockProps): React.JSX.Element;
|
|
28
|
+
//# sourceMappingURL=GidsButtonDock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsButtonDock.d.ts","sourceRoot":"","sources":["../../../src/components/GidsButtonDock/GidsButtonDock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAK/E,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,SAAS,CAAC,GACrE,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAgB,cAAc,CAAC,EAC9B,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,GAAG,IAAI,EACP,EAAE,mBAAmB,qBASrB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GidsButtonDockWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
const { getGidsButtonDockClassNames } = GidsButtonDockWebUtils;
|
|
4
|
+
/**
|
|
5
|
+
* React DOM implementation of GIDS ButtonDock component.
|
|
6
|
+
*
|
|
7
|
+
* **Usage**
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GidsButtonDock } from '@ganpatiinfo/gids-react-web';
|
|
11
|
+
*
|
|
12
|
+
* export const MyComponent = () => (
|
|
13
|
+
* const buttonLabels = ['Button 1', 'Button 2'];
|
|
14
|
+
*
|
|
15
|
+
* const reactButtons = buttonLabels.map((label, index) => (
|
|
16
|
+
* <GidsButton type="button" key={index.toString()}>
|
|
17
|
+
* {label}
|
|
18
|
+
* </GidsButton>
|
|
19
|
+
* ));
|
|
20
|
+
* <GidsButtonDock primaryChildren={reactButtons}>
|
|
21
|
+
* </GidsButtonDock>
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* **Note:** Any additional props are passed to the outermost `<div>` DOM element that this component renders.
|
|
26
|
+
*/
|
|
27
|
+
export function GidsButtonDock({ primaryChildren, secondaryChildren, className, ...rest }) {
|
|
28
|
+
return (React.createElement("div", { className: getGidsButtonDockClassNames(className), ...rest },
|
|
29
|
+
React.createElement("div", { className: "gids-button-dock__secondary-area" }, secondaryChildren),
|
|
30
|
+
React.createElement("div", { className: "gids-button-dock__primary-area" }, primaryChildren)));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=GidsButtonDock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsButtonDock.js","sourceRoot":"","sources":["../../../src/components/GidsButtonDock/GidsButtonDock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,MAAM,EAAE,2BAA2B,EAAE,GAAG,sBAAsB,CAAC;AAK/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,UAAU,cAAc,CAAC,EAC9B,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,GAAG,IAAI,EACc;IACrB,OAAO,CACN,6BAAK,SAAS,EAAE,2BAA2B,CAAC,SAAS,CAAC,KAAM,IAAI;QAC/D,6BAAK,SAAS,EAAC,kCAAkC,IAC/C,iBAAiB,CACb;QACN,6BAAK,SAAS,EAAC,gCAAgC,IAAE,eAAe,CAAO,CAClE,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type GidsButtonGroupCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
export type GidsButtonGroupProps = GidsButtonGroupCommonProps<ReactNode> & ComponentPropsWithRef<'span'>;
|
|
4
|
+
/**
|
|
5
|
+
* React DOM implementation of GIDS ButtonGroup component.
|
|
6
|
+
*
|
|
7
|
+
* **Usage**
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GidsButtonGroup } from '@ganpatiinfo/gids-react-web';
|
|
11
|
+
*
|
|
12
|
+
* export const MyComponent = () => (
|
|
13
|
+
* <GidsButtonGroup layout="wrap">
|
|
14
|
+
* <GidsButton
|
|
15
|
+
* appearance="default"
|
|
16
|
+
* as="button"
|
|
17
|
+
* size="md">Button 1</GidsButton>
|
|
18
|
+
* <!-- more buttons -->
|
|
19
|
+
* </GidsButtonGroup>
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* **Note:** Any additional props are passed to the outermost `<span>` DOM element that this component renders.
|
|
24
|
+
*/
|
|
25
|
+
export declare function GidsButtonGroup({ layout, children, className, ...rest }: GidsButtonGroupProps): React.JSX.Element;
|
|
26
|
+
//# sourceMappingURL=GidsButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/GidsButtonGroup/GidsButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAKhF,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,CAAC,SAAS,CAAC,GACvE,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wBAAgB,eAAe,CAAC,EAC/B,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,oBAAoB,qBAStB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GidsButtonGroupWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
const { getGidsButtonGroupClassNames } = GidsButtonGroupWebUtils;
|
|
4
|
+
/**
|
|
5
|
+
* React DOM implementation of GIDS ButtonGroup component.
|
|
6
|
+
*
|
|
7
|
+
* **Usage**
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GidsButtonGroup } from '@ganpatiinfo/gids-react-web';
|
|
11
|
+
*
|
|
12
|
+
* export const MyComponent = () => (
|
|
13
|
+
* <GidsButtonGroup layout="wrap">
|
|
14
|
+
* <GidsButton
|
|
15
|
+
* appearance="default"
|
|
16
|
+
* as="button"
|
|
17
|
+
* size="md">Button 1</GidsButton>
|
|
18
|
+
* <!-- more buttons -->
|
|
19
|
+
* </GidsButtonGroup>
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* **Note:** Any additional props are passed to the outermost `<span>` DOM element that this component renders.
|
|
24
|
+
*/
|
|
25
|
+
export function GidsButtonGroup({ layout, children, className, ...rest }) {
|
|
26
|
+
return (React.createElement("span", { className: getGidsButtonGroupClassNames({ layout }, className), ...rest }, children));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=GidsButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsButtonGroup.js","sourceRoot":"","sources":["../../../src/components/GidsButtonGroup/GidsButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,EAAE,4BAA4B,EAAE,GAAG,uBAAuB,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,UAAU,eAAe,CAAC,EAC/B,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACe;IACtB,OAAO,CACN,8BACC,SAAS,EAAE,4BAA4B,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,KAC1D,IAAI,IAEP,QAAQ,CACH,CACP,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type GidsCompoundButtonCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { type IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
3
|
+
import React, { type ChangeEvent, type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
4
|
+
export type GidsCompoundButtonProps = GidsCompoundButtonCommonProps<IconName, ReactNode | string> & Omit<ComponentPropsWithRef<'button'>, 'onChange'> & {
|
|
5
|
+
onChangeCheckbox?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
onChangeRadio?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* React DOM implementation of GIDS Compound Button component.
|
|
10
|
+
*
|
|
11
|
+
* **Basic Usage**
|
|
12
|
+
*
|
|
13
|
+
* This is the basic and default usage of GidsCompoundButton
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { GidsCompoundButton } from '@investec/gids-react-web';
|
|
17
|
+
*
|
|
18
|
+
* export const MyComponent = () => (
|
|
19
|
+
* <GidsCompoundButton>
|
|
20
|
+
* Label
|
|
21
|
+
* </GidsCompoundButton>
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* **Advanced Usage**
|
|
26
|
+
*
|
|
27
|
+
* This is the advanced usage of GidsCompoundButton
|
|
28
|
+
*
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { GidsCompoundButton } from '@investec/gids-react-web';
|
|
31
|
+
*
|
|
32
|
+
* export const MyComponent = () => (
|
|
33
|
+
* <GidsCompoundButton
|
|
34
|
+
* leadingIcon="image"
|
|
35
|
+
* checked leadingIcon="image"
|
|
36
|
+
* onChangeCheckbox={() => {}}
|
|
37
|
+
* onChangeRadio={() => {}}
|
|
38
|
+
* onClick={() => {}}
|
|
39
|
+
* trailingContent="checkbox"
|
|
40
|
+
* >
|
|
41
|
+
* Label
|
|
42
|
+
* </GidsCompoundButton>
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsCompoundButton />` component.
|
|
47
|
+
**/
|
|
48
|
+
export declare const GidsCompoundButton: ({ children, leadingIcon, trailingContent, trailingContentDisabled, trailingContentIndeterminate, checked, disabled, onClick, onChangeCheckbox, onChangeRadio, ...rest }: GidsCompoundButtonProps) => React.JSX.Element;
|
|
49
|
+
//# sourceMappingURL=GidsCompoundButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsCompoundButton.d.ts","sourceRoot":"","sources":["../../../src/components/GidsCompoundButton/GidsCompoundButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAKnF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,EAAE,EAEb,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAOf,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,CAClE,QAAQ,EACR,SAAS,GAAG,MAAM,CAClB,GACA,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IACnD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAClE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC/D,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuCI;AACJ,eAAO,MAAM,kBAAkB,GAAI,yKAYhC,uBAAuB,sBA6GzB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { generateId, GidsCompoundButtonWebUtils, } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { GidsIcon } from '../GidsIcon/GidsIcon.js';
|
|
4
|
+
import { GidsCheckboxControl } from '../_GidsCheckboxControl/GidsCheckboxControl.js';
|
|
5
|
+
import { GidsRadioControl } from '../_GidsRadioControl/GidsRadioControl.js';
|
|
6
|
+
const { getGidsCompoundButtonClassNames } = GidsCompoundButtonWebUtils;
|
|
7
|
+
/**
|
|
8
|
+
* React DOM implementation of GIDS Compound Button component.
|
|
9
|
+
*
|
|
10
|
+
* **Basic Usage**
|
|
11
|
+
*
|
|
12
|
+
* This is the basic and default usage of GidsCompoundButton
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import { GidsCompoundButton } from '@investec/gids-react-web';
|
|
16
|
+
*
|
|
17
|
+
* export const MyComponent = () => (
|
|
18
|
+
* <GidsCompoundButton>
|
|
19
|
+
* Label
|
|
20
|
+
* </GidsCompoundButton>
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* **Advanced Usage**
|
|
25
|
+
*
|
|
26
|
+
* This is the advanced usage of GidsCompoundButton
|
|
27
|
+
*
|
|
28
|
+
* ```tsx
|
|
29
|
+
* import { GidsCompoundButton } from '@investec/gids-react-web';
|
|
30
|
+
*
|
|
31
|
+
* export const MyComponent = () => (
|
|
32
|
+
* <GidsCompoundButton
|
|
33
|
+
* leadingIcon="image"
|
|
34
|
+
* checked leadingIcon="image"
|
|
35
|
+
* onChangeCheckbox={() => {}}
|
|
36
|
+
* onChangeRadio={() => {}}
|
|
37
|
+
* onClick={() => {}}
|
|
38
|
+
* trailingContent="checkbox"
|
|
39
|
+
* >
|
|
40
|
+
* Label
|
|
41
|
+
* </GidsCompoundButton>
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsCompoundButton />` component.
|
|
46
|
+
**/
|
|
47
|
+
export const GidsCompoundButton = ({ children, leadingIcon, trailingContent = 'none', trailingContentDisabled, trailingContentIndeterminate, checked, disabled, onClick, onChangeCheckbox, onChangeRadio, ...rest }) => {
|
|
48
|
+
const getTrailingContent = () => {
|
|
49
|
+
switch (trailingContent) {
|
|
50
|
+
case 'disclosure':
|
|
51
|
+
return (React.createElement(GidsIcon, { name: "chevron-right", alt: "", appearance: "regular", size: "md", className: disabled
|
|
52
|
+
? 'gids-compound-button__trailing-icon gids-compound-button__icon-disabled'
|
|
53
|
+
: 'gids-compound-button__trailing-icon' }));
|
|
54
|
+
case 'checkbox':
|
|
55
|
+
return (React.createElement(GidsCheckboxControl, { checked: checked, indeterminate: trailingContentIndeterminate, disabled: trailingContentDisabled || disabled, inputId: generateId(), onChange: onChangeCheckbox }));
|
|
56
|
+
case 'radio':
|
|
57
|
+
return (React.createElement(GidsRadioControl, { checked: checked, disabled: trailingContentDisabled || disabled, inputId: generateId(), onChange: onChangeRadio }));
|
|
58
|
+
default:
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const onClickButton = (event) => {
|
|
63
|
+
if (onClick &&
|
|
64
|
+
trailingContent !== 'checkbox' &&
|
|
65
|
+
trailingContent !== 'radio') {
|
|
66
|
+
onClick(event);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const renderLeadingIcon = () => {
|
|
70
|
+
if (leadingIcon &&
|
|
71
|
+
typeof leadingIcon === 'string' &&
|
|
72
|
+
leadingIcon.toString() !== '' &&
|
|
73
|
+
leadingIcon.toString() !== '(none)') {
|
|
74
|
+
return (React.createElement(GidsIcon, { name: leadingIcon, alt: "", appearance: "regular", size: "md", className: disabled
|
|
75
|
+
? 'gids-compound-button__leading-icon gids-compound-button__icon-disabled'
|
|
76
|
+
: 'gids-compound-button__leading-icon' }));
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
};
|
|
80
|
+
return (React.createElement("button", { className: getGidsCompoundButtonClassNames({
|
|
81
|
+
checked,
|
|
82
|
+
trailingContent,
|
|
83
|
+
disabled,
|
|
84
|
+
}), ...rest, disabled: disabled,
|
|
85
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
86
|
+
onClick: onClickButton },
|
|
87
|
+
React.createElement("div", { className: "gids-compound-button__inner-container" },
|
|
88
|
+
renderLeadingIcon(),
|
|
89
|
+
typeof children === 'string' ? (React.createElement("div", { className: disabled
|
|
90
|
+
? 'gids-compound-button__label gids-compound-button__label-disabled'
|
|
91
|
+
: 'gids-compound-button__label' }, children)) : (children),
|
|
92
|
+
trailingContent !== 'none' ? getTrailingContent() : null)));
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=GidsCompoundButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsCompoundButton.js","sourceRoot":"","sources":["../../../src/components/GidsCompoundButton/GidsCompoundButton.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { type ComponentPropsWithRef, type MouseEventHandler, type ReactNode } from 'react';
|
|
2
|
+
import { type GidsInputTagCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
type NonDissmissibleInputTagProps = GidsInputTagCommonProps<ReactNode> & ComponentPropsWithRef<'button'> & {
|
|
4
|
+
dismissible?: false;
|
|
5
|
+
};
|
|
6
|
+
type DissmissibleInputTagProps = GidsInputTagCommonProps<ReactNode> & ComponentPropsWithRef<'span'> & {
|
|
7
|
+
dismissible: true;
|
|
8
|
+
};
|
|
9
|
+
export type GidsInputTagProps = (NonDissmissibleInputTagProps | DissmissibleInputTagProps) & {
|
|
10
|
+
/**
|
|
11
|
+
* Event handler for when the interactive portion of the Input Tag is clicked.
|
|
12
|
+
*
|
|
13
|
+
* For dismissible Input Tags, clicking the close ('X') button will trigger
|
|
14
|
+
* this event. For non-dismissible Input Tags, clicking anywhere on the tag
|
|
15
|
+
* will trigger it.
|
|
16
|
+
*/
|
|
17
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* React DOM implementation of GIDS Input Tag component.
|
|
21
|
+
*
|
|
22
|
+
* **Usage**
|
|
23
|
+
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* import { GidsInputTag } from "@ganpatiinfo/gids-react-web";
|
|
26
|
+
*
|
|
27
|
+
* export const MyComponent = () => (
|
|
28
|
+
* <GidsInputTag label="foobar" />
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* For Implementation of GIDS Input Tag component that is dismissible an additional prop `dismissible` set to `true` can be passed
|
|
33
|
+
*
|
|
34
|
+
* **Usage**
|
|
35
|
+
*
|
|
36
|
+
* ```tsx
|
|
37
|
+
* import { GidsInputTag } from "@ganpatiinfo/gids-react-web";
|
|
38
|
+
*
|
|
39
|
+
* export const MyComponent = () => (
|
|
40
|
+
* <GidsInputTag label="foobar" dismissible={true}/>
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* **Note:** Any additional props are passed to the outermost `<button>` DOM element that this component renders. For example, `<GidsInputTag id="foo" />` will render `<button id="foo" ... >...</button>`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function GidsInputTag({ label, appearance, size, icon, disabled, dismissible, dismissButtonLabel, onClick, ...rest }: GidsInputTagProps): React.JSX.Element;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=GidsInputTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTag.d.ts","sourceRoot":"","sources":["../../../src/components/GidsInputTag/GidsInputTag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACb,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AACf,OAAO,EACN,KAAK,uBAAuB,EAE5B,MAAM,+BAA+B,CAAC;AAOvC,KAAK,4BAA4B,GAAG,uBAAuB,CAAC,SAAS,CAAC,GACrE,qBAAqB,CAAC,QAAQ,CAAC,GAAG;IACjC,WAAW,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEH,KAAK,yBAAyB,GAAG,uBAAuB,CAAC,SAAS,CAAC,GAClE,qBAAqB,CAAC,MAAM,CAAC,GAAG;IAC/B,WAAW,EAAE,IAAI,CAAC;CAClB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAC7B,4BAA4B,GAC5B,yBAAyB,CAC3B,GAAG;IACH;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CAC/C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,GAAG,IAAI,EACP,EAAE,iBAAiB,qBAyCnB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GidsInputTagCommonUtils, } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
import { GidsInputTagWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
import { GidsInputTagButton } from './_GidsInputTagButton/GidsInputTagButton.js';
|
|
5
|
+
const { getDismissButtonLabel } = GidsInputTagCommonUtils;
|
|
6
|
+
const { getGidsInputTagClassNames } = GidsInputTagWebUtils;
|
|
7
|
+
/**
|
|
8
|
+
* React DOM implementation of GIDS Input Tag component.
|
|
9
|
+
*
|
|
10
|
+
* **Usage**
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { GidsInputTag } from "@ganpatiinfo/gids-react-web";
|
|
14
|
+
*
|
|
15
|
+
* export const MyComponent = () => (
|
|
16
|
+
* <GidsInputTag label="foobar" />
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* For Implementation of GIDS Input Tag component that is dismissible an additional prop `dismissible` set to `true` can be passed
|
|
21
|
+
*
|
|
22
|
+
* **Usage**
|
|
23
|
+
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* import { GidsInputTag } from "@ganpatiinfo/gids-react-web";
|
|
26
|
+
*
|
|
27
|
+
* export const MyComponent = () => (
|
|
28
|
+
* <GidsInputTag label="foobar" dismissible={true}/>
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* **Note:** Any additional props are passed to the outermost `<button>` DOM element that this component renders. For example, `<GidsInputTag id="foo" />` will render `<button id="foo" ... >...</button>`.
|
|
33
|
+
*/
|
|
34
|
+
export function GidsInputTag({ label, appearance, size, icon, disabled, dismissible, dismissButtonLabel, onClick, ...rest }) {
|
|
35
|
+
if (dismissible) {
|
|
36
|
+
return (React.createElement("span", { className: getGidsInputTagClassNames({
|
|
37
|
+
size,
|
|
38
|
+
appearance,
|
|
39
|
+
disabled,
|
|
40
|
+
dismissible,
|
|
41
|
+
}), ...rest },
|
|
42
|
+
icon,
|
|
43
|
+
label,
|
|
44
|
+
React.createElement(GidsInputTagButton, { label: getDismissButtonLabel(dismissButtonLabel), appearance: appearance, size: size, disabled: disabled, onClick: onClick })));
|
|
45
|
+
}
|
|
46
|
+
return (React.createElement("button", { className: getGidsInputTagClassNames({
|
|
47
|
+
size,
|
|
48
|
+
appearance,
|
|
49
|
+
disabled,
|
|
50
|
+
dismissible,
|
|
51
|
+
}), onClick: onClick, disabled: disabled, ...rest },
|
|
52
|
+
icon,
|
|
53
|
+
label));
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=GidsInputTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTag.js","sourceRoot":"","sources":["../../../src/components/GidsInputTag/GidsInputTag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAIN,MAAM,OAAO,CAAC;AACf,OAAO,EAEN,uBAAuB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF,MAAM,EAAE,qBAAqB,EAAE,GAAG,uBAAuB,CAAC;AAC1D,MAAM,EAAE,yBAAyB,EAAE,GAAG,oBAAoB,CAAC;AA0B3D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,YAAY,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,GAAG,IAAI,EACY;IACnB,IAAI,WAAW,EAAE,CAAC;QACjB,OAAO,CACN,8BACC,SAAS,EAAE,yBAAyB,CAAC;gBACpC,IAAI;gBACJ,UAAU;gBACV,QAAQ;gBACR,WAAW;aACX,CAAC,KACE,IAAI;YAEP,IAAI;YACJ,KAAK;YACN,oBAAC,kBAAkB,IAClB,KAAK,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,EAChD,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GACf,CACI,CACP,CAAC;IACH,CAAC;IAED,OAAO,CACN,gCACC,SAAS,EAAE,yBAAyB,CAAC;YACpC,IAAI;YACJ,UAAU;YACV,QAAQ;YACR,WAAW;SACX,CAAC,EACF,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,KACb,IAA8C;QAElD,IAAI;QACJ,KAAK,CACE,CACT,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type JSX, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { type GidsInputTagButtonCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
export type TagSizes = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
export type GidsInputTagButtonProps = GidsInputTagButtonCommonProps & ComponentPropsWithRef<'button'>;
|
|
5
|
+
export declare function GidsInputTagButton({ size, appearance, disabled, label, onClick, ...rest }: GidsInputTagButtonProps): JSX.Element;
|
|
6
|
+
//# sourceMappingURL=GidsInputTagButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTagButton.d.ts","sourceRoot":"","sources":["../../../../src/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,GAAG,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAMnF,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GAClE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAEjC,wBAAgB,kBAAkB,CAAC,EAClC,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACP,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAYvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GidsInputTagButtonWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { GidsIcon } from '../../GidsIcon/GidsIcon.js';
|
|
4
|
+
const { getGidsInputTagButtonClassNames } = GidsInputTagButtonWebUtils;
|
|
5
|
+
export function GidsInputTagButton({ size, appearance, disabled, label, onClick, ...rest }) {
|
|
6
|
+
return (React.createElement("button", { disabled: disabled, className: getGidsInputTagButtonClassNames({ size, appearance }), onClick: onClick, "aria-label": label, ...rest },
|
|
7
|
+
React.createElement(GidsIcon, { name: "cross", appearance: "regular", alt: "" })));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=GidsInputTagButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsInputTagButton.js","sourceRoot":"","sources":["../../../../src/components/GidsInputTag/_GidsInputTagButton/GidsInputTagButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,MAAM,EAAE,+BAA+B,EAAE,GAAG,0BAA0B,CAAC;AAOvE,MAAM,UAAU,kBAAkB,CAAC,EAClC,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACkB;IACzB,OAAO,CACN,gCACC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,+BAA+B,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAChE,OAAO,EAAE,OAAO,gBACJ,KAAK,KACb,IAAI;QAER,oBAAC,QAAQ,IAAC,IAAI,EAAC,OAAO,EAAC,UAAU,EAAC,SAAS,EAAC,GAAG,EAAC,EAAE,GAAY,CACtD,CACT,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { GidsSectionNoticeCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { type JSX, type ComponentPropsWithRef, type MouseEventHandler, type ReactNode } from 'react';
|
|
3
|
+
export type GidsSectionNoticeProps = GidsSectionNoticeCommonProps<string, ReactNode> & ComponentPropsWithRef<'div'> & {
|
|
4
|
+
onClickDismiss?: MouseEventHandler<HTMLButtonElement>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* React DOM implementation of GIDS Section Notice component.
|
|
8
|
+
*
|
|
9
|
+
* **Usage**
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { GidsSectionNotice, GidsButton } from '@investec/gids-react-web';
|
|
13
|
+
*
|
|
14
|
+
* export const MyComponent = () => (
|
|
15
|
+
* <GidsSectionNotice>
|
|
16
|
+
* <GidsButton
|
|
17
|
+
* appearance="default"
|
|
18
|
+
* as="button"
|
|
19
|
+
* size="sm"
|
|
20
|
+
* width="intrinsic"
|
|
21
|
+
* >
|
|
22
|
+
* Label
|
|
23
|
+
* </GidsButton>
|
|
24
|
+
* <GidsButton
|
|
25
|
+
* appearance="default"
|
|
26
|
+
* as="button"
|
|
27
|
+
* size="sm"
|
|
28
|
+
* width="intrinsic"
|
|
29
|
+
* >
|
|
30
|
+
* Label
|
|
31
|
+
* </GidsButton>
|
|
32
|
+
* </GidsSectionNotice>
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsSectionNotice />` component.
|
|
37
|
+
**/
|
|
38
|
+
export declare const GidsSectionNotice: ({ appearance, title, supportingText, children, dismissible, onClickDismiss, ...rest }: GidsSectionNoticeProps) => JSX.Element;
|
|
39
|
+
//# sourceMappingURL=GidsSectionNotice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsSectionNotice.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSectionNotice/GidsSectionNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,EAE5B,MAAM,+BAA+B,CAAC;AAEvC,OAAc,EACb,KAAK,GAAG,EACR,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AASf,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,CAChE,MAAM,EACN,SAAS,CACT,GACA,qBAAqB,CAAC,KAAK,CAAC,GAAG;IAC9B,cAAc,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+BI;AACJ,eAAO,MAAM,iBAAiB,GAAI,uFAQ/B,sBAAsB,KAAG,GAAG,CAAC,OA+C/B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { GidsSectionNoticeCommonUtils, } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsSectionNoticeWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { GidsIcon } from '../GidsIcon/GidsIcon.js';
|
|
5
|
+
import { GidsButtonGroup } from '../GidsButtonGroup/GidsButtonGroup.js';
|
|
6
|
+
import { GidsButton } from '../GidsButton/GidsButton.js';
|
|
7
|
+
const { getGidsSectionNoticeClassNames } = GidsSectionNoticeWebUtils;
|
|
8
|
+
const { getSectionNoticeIconName } = GidsSectionNoticeCommonUtils;
|
|
9
|
+
/**
|
|
10
|
+
* React DOM implementation of GIDS Section Notice component.
|
|
11
|
+
*
|
|
12
|
+
* **Usage**
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import { GidsSectionNotice, GidsButton } from '@investec/gids-react-web';
|
|
16
|
+
*
|
|
17
|
+
* export const MyComponent = () => (
|
|
18
|
+
* <GidsSectionNotice>
|
|
19
|
+
* <GidsButton
|
|
20
|
+
* appearance="default"
|
|
21
|
+
* as="button"
|
|
22
|
+
* size="sm"
|
|
23
|
+
* width="intrinsic"
|
|
24
|
+
* >
|
|
25
|
+
* Label
|
|
26
|
+
* </GidsButton>
|
|
27
|
+
* <GidsButton
|
|
28
|
+
* appearance="default"
|
|
29
|
+
* as="button"
|
|
30
|
+
* size="sm"
|
|
31
|
+
* width="intrinsic"
|
|
32
|
+
* >
|
|
33
|
+
* Label
|
|
34
|
+
* </GidsButton>
|
|
35
|
+
* </GidsSectionNotice>
|
|
36
|
+
* );
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsSectionNotice />` component.
|
|
40
|
+
**/
|
|
41
|
+
export const GidsSectionNotice = ({ appearance, title, supportingText, children, dismissible, onClickDismiss, ...rest }) => {
|
|
42
|
+
return (React.createElement("div", { className: getGidsSectionNoticeClassNames({ appearance }), ...rest },
|
|
43
|
+
React.createElement("div", { className: "gids-section-notice__inner-container" },
|
|
44
|
+
React.createElement("div", { className: "gids-section-notice__leading-icon-container" },
|
|
45
|
+
React.createElement(GidsIcon, { name: getSectionNoticeIconName({ appearance }), alt: "", appearance: "filled", size: "md", className: `gids-section-notice__${appearance}-icon` })),
|
|
46
|
+
React.createElement("div", { className: "gids-section-notice__content-container" },
|
|
47
|
+
title && typeof title === 'string' ? (React.createElement("div", { className: "gids-section-notice__title" }, title)) : (title),
|
|
48
|
+
supportingText && typeof supportingText === 'string' ? (React.createElement("div", { className: "gids-section-notice__supporting-text" }, supportingText)) : (supportingText),
|
|
49
|
+
children ? (React.createElement(GidsButtonGroup, { layout: "wrap" }, children)) : null),
|
|
50
|
+
dismissible && onClickDismiss ? (React.createElement("div", { className: "gids-section-notice__cross-button-container" },
|
|
51
|
+
React.createElement(GidsButton, { as: "button", appearance: "subtle", size: "sm", width: "intrinsic", leadingIcon: React.createElement(GidsIcon, { name: "cross", alt: "", appearance: "filled", size: "sm" }), onClick: onClickDismiss }))) : null)));
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=GidsSectionNotice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsSectionNotice.js","sourceRoot":"","sources":["../../../src/components/GidsSectionNotice/GidsSectionNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,4BAA4B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAKN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,EAAE,8BAA8B,EAAE,GAAG,yBAAyB,CAAC;AACrE,MAAM,EAAE,wBAAwB,EAAE,GAAG,4BAA4B,CAAC;AAUlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+BI;AACJ,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EACjC,UAAU,EACV,KAAK,EACL,cAAc,EACd,QAAQ,EACR,WAAW,EACX,cAAc,EACd,GAAG,IAAI,EACiB,EAAe,EAAE;IACzC,OAAO,CACN,6BAAK,SAAS,EAAE,8BAA8B,CAAC,EAAE,UAAU,EAAE,CAAC,KAAM,IAAI;QACvE,6BAAK,SAAS,EAAC,sCAAsC;YACpD,6BAAK,SAAS,EAAC,6CAA6C;gBAC3D,oBAAC,QAAQ,IACR,IAAI,EAAE,wBAAwB,CAAC,EAAE,UAAU,EAAE,CAAa,EAC1D,GAAG,EAAC,EAAE,EACN,UAAU,EAAC,QAAQ,EACnB,IAAI,EAAC,IAAI,EACT,SAAS,EAAE,wBAAwB,UAAU,OAAO,GACnD,CACG;YACN,6BAAK,SAAS,EAAC,wCAAwC;gBACrD,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CACrC,6BAAK,SAAS,EAAC,4BAA4B,IAAE,KAAK,CAAO,CACzD,CAAC,CAAC,CAAC,CACH,KAAK,CACL;gBACA,cAAc,IAAI,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,CACvD,6BAAK,SAAS,EAAC,sCAAsC,IACnD,cAAc,CACV,CACN,CAAC,CAAC,CAAC,CACH,cAAc,CACd;gBACA,QAAQ,CAAC,CAAC,CAAC,CACX,oBAAC,eAAe,IAAC,MAAM,EAAC,MAAM,IAAE,QAAQ,CAAmB,CAC3D,CAAC,CAAC,CAAC,IAAI,CACH;YACL,WAAW,IAAI,cAAc,CAAC,CAAC,CAAC,CAChC,6BAAK,SAAS,EAAC,6CAA6C;gBAC3D,oBAAC,UAAU,IACV,EAAE,EAAC,QAAQ,EACX,UAAU,EAAC,QAAQ,EACnB,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,WAAW,EACjB,WAAW,EACV,oBAAC,QAAQ,IAAC,IAAI,EAAC,OAAO,EAAC,GAAG,EAAC,EAAE,EAAC,UAAU,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,GAAG,EAE/D,OAAO,EAAE,cAAc,GACtB,CACG,CACN,CAAC,CAAC,CAAC,IAAI,CACH,CACD,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type GidsTagGroupCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
export type GidsTagGroupProps = GidsTagGroupCommonProps<ReactNode> & ComponentPropsWithRef<'span'>;
|
|
4
|
+
/**
|
|
5
|
+
* React DOM implementation of GIDS TagGroup component.
|
|
6
|
+
*
|
|
7
|
+
* **Usage**
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GidsTagGroup } from '@ganpatiinfo/gids-react-web';
|
|
11
|
+
*
|
|
12
|
+
* export const MyComponent = () => (
|
|
13
|
+
* <GidsTagGroup>
|
|
14
|
+
* <GidsDisplayTag
|
|
15
|
+
* appearance="subtle"
|
|
16
|
+
* color="accent-1"
|
|
17
|
+
* label="Display Tag 1"
|
|
18
|
+
* size="md"/>
|
|
19
|
+
* <!-- more tags -->
|
|
20
|
+
* </GidsTagGroup>
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* **Note:** Any additional props are passed to the outermost `<span>` DOM element that this component renders.
|
|
25
|
+
*/
|
|
26
|
+
export declare function GidsTagGroup({ children, className, ...rest }: GidsTagGroupProps): React.JSX.Element;
|
|
27
|
+
//# sourceMappingURL=GidsTagGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsTagGroup.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTagGroup/GidsTagGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAK7E,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,SAAS,CAAC,GACjE,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,iBAAiB,qBAMnB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GidsTagGroupWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
const { getGidsTagGroupClassNames } = GidsTagGroupWebUtils;
|
|
4
|
+
/**
|
|
5
|
+
* React DOM implementation of GIDS TagGroup component.
|
|
6
|
+
*
|
|
7
|
+
* **Usage**
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GidsTagGroup } from '@ganpatiinfo/gids-react-web';
|
|
11
|
+
*
|
|
12
|
+
* export const MyComponent = () => (
|
|
13
|
+
* <GidsTagGroup>
|
|
14
|
+
* <GidsDisplayTag
|
|
15
|
+
* appearance="subtle"
|
|
16
|
+
* color="accent-1"
|
|
17
|
+
* label="Display Tag 1"
|
|
18
|
+
* size="md"/>
|
|
19
|
+
* <!-- more tags -->
|
|
20
|
+
* </GidsTagGroup>
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* **Note:** Any additional props are passed to the outermost `<span>` DOM element that this component renders.
|
|
25
|
+
*/
|
|
26
|
+
export function GidsTagGroup({ children, className, ...rest }) {
|
|
27
|
+
return (React.createElement("span", { className: getGidsTagGroupClassNames(className), ...rest }, children));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=GidsTagGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsTagGroup.js","sourceRoot":"","sources":["../../../src/components/GidsTagGroup/GidsTagGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,EAAE,yBAAyB,EAAE,GAAG,oBAAoB,CAAC;AAK3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,YAAY,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACY;IACnB,OAAO,CACN,8BAAM,SAAS,EAAE,yBAAyB,CAAC,SAAS,CAAC,KAAM,IAAI,IAC7D,QAAQ,CACH,CACP,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export * from './components/GidsSwitchGroup/GidsSwitchGroup.js';
|
|
|
14
14
|
export * from './components/GidsBadge/GidsBadge.js';
|
|
15
15
|
export * from './components/GidsAvatar/GidsAvatar.js';
|
|
16
16
|
export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
|
|
17
|
+
export * from './components/GidsInputTag/GidsInputTag.js';
|
|
18
|
+
export * from './components/GidsTagGroup/GidsTagGroup.js';
|
|
19
|
+
export * from './components/GidsButtonGroup/GidsButtonGroup.js';
|
|
20
|
+
export * from './components/GidsButtonDock/GidsButtonDock.js';
|
|
21
|
+
export * from './components/GidsSectionNotice/GidsSectionNotice.js';
|
|
22
|
+
export * from './components/GidsCompoundButton/GidsCompoundButton.js';
|
|
17
23
|
/**
|
|
18
24
|
* STENCIL GENERATED
|
|
19
25
|
*/
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AAEtE;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oDAAoD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,12 @@ export * from './components/GidsSwitchGroup/GidsSwitchGroup.js';
|
|
|
14
14
|
export * from './components/GidsBadge/GidsBadge.js';
|
|
15
15
|
export * from './components/GidsAvatar/GidsAvatar.js';
|
|
16
16
|
export * from './components/GidsAvatarGroup/GidsAvatarGroup.js';
|
|
17
|
+
export * from './components/GidsInputTag/GidsInputTag.js';
|
|
18
|
+
export * from './components/GidsTagGroup/GidsTagGroup.js';
|
|
19
|
+
export * from './components/GidsButtonGroup/GidsButtonGroup.js';
|
|
20
|
+
export * from './components/GidsButtonDock/GidsButtonDock.js';
|
|
21
|
+
export * from './components/GidsSectionNotice/GidsSectionNotice.js';
|
|
22
|
+
export * from './components/GidsCompoundButton/GidsCompoundButton.js';
|
|
17
23
|
/**
|
|
18
24
|
* STENCIL GENERATED
|
|
19
25
|
*/
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AAEtE;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oDAAoD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ganpatiinfo/gids-react-web",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This package is react web package with all components",
|
|
6
6
|
"homepage": "https://ganpatiinfosystem.vercel.app/",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"dist/"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@ganpatiinfo/gids-core-web": "2.0.
|
|
26
|
-
"@ganpatiinfo/gids-web-theme-interface": "2.0.
|
|
25
|
+
"@ganpatiinfo/gids-core-web": "2.0.8",
|
|
26
|
+
"@ganpatiinfo/gids-web-theme-interface": "2.0.7",
|
|
27
27
|
"react": "19.1.0",
|
|
28
28
|
"react-dom": "19.1.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@stencil/react-output-target": "0.8.2",
|
|
32
|
-
"@ganpatiinfo/gids-core-shared": "2.0.
|
|
33
|
-
"@ganpatiinfo/gids-web-shared": "2.0.
|
|
32
|
+
"@ganpatiinfo/gids-core-shared": "2.0.9",
|
|
33
|
+
"@ganpatiinfo/gids-web-shared": "2.0.9"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@fontsource/inter": "5.2.5",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"storybook-addon-tag-badges": "1.4.0",
|
|
56
56
|
"ts-jest": "29.3.2",
|
|
57
57
|
"sass": "^1.88.0",
|
|
58
|
-
"@ganpatiinfo/gids-storybook-theme": "2.0.
|
|
58
|
+
"@ganpatiinfo/gids-storybook-theme": "2.0.7",
|
|
59
59
|
"@ganpatiinfo/gids-storybook-utilities": "2.0.6",
|
|
60
|
-
"@ganpatiinfo/gids-web-dom-reference": "2.0.
|
|
61
|
-
"@ganpatiinfo/gids-web-theme-ganpatiinfo": "2.0.
|
|
60
|
+
"@ganpatiinfo/gids-web-dom-reference": "2.0.9",
|
|
61
|
+
"@ganpatiinfo/gids-web-theme-ganpatiinfo": "2.0.7"
|
|
62
62
|
},
|
|
63
63
|
"author": {
|
|
64
64
|
"name": "Ganpatiinfo Design System",
|