@ganpatiinfo/gids-react-web 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/components/GidsCheckbox/GidsCheckbox.d.ts +56 -0
  2. package/dist/components/GidsCheckbox/GidsCheckbox.d.ts.map +1 -0
  3. package/dist/components/GidsCheckbox/GidsCheckbox.js +48 -0
  4. package/dist/components/GidsCheckbox/GidsCheckbox.js.map +1 -0
  5. package/dist/components/GidsLabel/GidsLabel.d.ts +34 -0
  6. package/dist/components/GidsLabel/GidsLabel.d.ts.map +1 -0
  7. package/dist/components/GidsLabel/GidsLabel.js +47 -0
  8. package/dist/components/GidsLabel/GidsLabel.js.map +1 -0
  9. package/dist/components/GidsLabel/GidsLabelInfo/GidsLabelInfo.d.ts +5 -0
  10. package/dist/components/GidsLabel/GidsLabelInfo/GidsLabelInfo.d.ts.map +1 -0
  11. package/dist/components/GidsLabel/GidsLabelInfo/GidsLabelInfo.js +12 -0
  12. package/dist/components/GidsLabel/GidsLabelInfo/GidsLabelInfo.js.map +1 -0
  13. package/dist/components/GidsLink/GidsLink.d.ts +19 -0
  14. package/dist/components/GidsLink/GidsLink.d.ts.map +1 -0
  15. package/dist/components/GidsLink/GidsLink.js +21 -0
  16. package/dist/components/GidsLink/GidsLink.js.map +1 -0
  17. package/dist/components/GidsRadio/GidsRadio.d.ts +56 -0
  18. package/dist/components/GidsRadio/GidsRadio.d.ts.map +1 -0
  19. package/dist/components/GidsRadio/GidsRadio.js +48 -0
  20. package/dist/components/GidsRadio/GidsRadio.js.map +1 -0
  21. package/dist/components/GidsSwitch/GidsSwitch.d.ts +57 -0
  22. package/dist/components/GidsSwitch/GidsSwitch.d.ts.map +1 -0
  23. package/dist/components/GidsSwitch/GidsSwitch.js +49 -0
  24. package/dist/components/GidsSwitch/GidsSwitch.js.map +1 -0
  25. package/dist/components/_GidsCheckboxControl/GidsCheckboxControl.d.ts +27 -0
  26. package/dist/components/_GidsCheckboxControl/GidsCheckboxControl.d.ts.map +1 -0
  27. package/dist/components/_GidsCheckboxControl/GidsCheckboxControl.js +17 -0
  28. package/dist/components/_GidsCheckboxControl/GidsCheckboxControl.js.map +1 -0
  29. package/dist/components/_GidsRadioControl/GidsRadioControl.d.ts +27 -0
  30. package/dist/components/_GidsRadioControl/GidsRadioControl.d.ts.map +1 -0
  31. package/dist/components/_GidsRadioControl/GidsRadioControl.js +9 -0
  32. package/dist/components/_GidsRadioControl/GidsRadioControl.js.map +1 -0
  33. package/dist/components/_GidsSwitchControl/GidsSwitchControl.d.ts +27 -0
  34. package/dist/components/_GidsSwitchControl/GidsSwitchControl.d.ts.map +1 -0
  35. package/dist/components/_GidsSwitchControl/GidsSwitchControl.js +12 -0
  36. package/dist/components/_GidsSwitchControl/GidsSwitchControl.js.map +1 -0
  37. package/package.json +9 -9
@@ -0,0 +1,56 @@
1
+ import React, { type ComponentPropsWithRef, type ReactNode, type ChangeEvent } from 'react';
2
+ import { type GidsCheckboxWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export interface GidsCheckboxProps extends GidsCheckboxWebProps<ReactNode, ReactNode, string | number | readonly string[]>, Omit<ComponentPropsWithRef<'div'>, 'onChange'>, Pick<ComponentPropsWithRef<'input'>, 'onChange'> {
4
+ /**
5
+ * Sets the checked state of the Checkbox.
6
+ *
7
+ * Use this instead of `defaultChecked` for controlled usage.
8
+ */
9
+ checked?: boolean;
10
+ /**
11
+ * Whether the Checkbox should be checked when it is first rendered
12
+ * to the DOM.
13
+ *
14
+ * Use this instead of `checked` for uncontrolled usage.
15
+ */
16
+ defaultChecked?: boolean;
17
+ /**
18
+ * Fires when the Checkbox's `checked` state changes
19
+ * due to user interaction.
20
+ *
21
+ * @param event
22
+ * @returns
23
+ */
24
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
25
+ }
26
+ /**
27
+ * React DOM implementation of GIDS Checkbox component.
28
+ *
29
+ * **Usage**
30
+ *
31
+ * ```tsx
32
+ * import { GidsCheckbox } from '@ganpatiinfo/gids-react-web';
33
+ *
34
+ * export const MyComponent = () => (
35
+ * <GidsCheckbox>First Name</GidsCheckbox>
36
+ * );
37
+ * ```
38
+ * Implementation of GIDS Checkbox component with the info icon.
39
+ *
40
+ * **Usage**
41
+ *
42
+ * ```tsx
43
+ * import { GidsCheckbox, GidsLabelInfo } from '@ganpatiinfo/gids-react-web';
44
+ *
45
+ * export const MyComponent = () => (
46
+ * <GidsCheckbox
47
+ * info={<GidsLabelInfo onClick={()=>{}} disabled={disabled} alt={infoAlt} />}
48
+ * >
49
+ * First Name
50
+ * </GidsCheckbox>
51
+ * );
52
+ * ```
53
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsCheckbox />` component.
54
+ **/
55
+ export declare function GidsCheckbox({ fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, labelId, checked, defaultChecked, disabled, indeterminate, inputId, name, value, required, onChange, children, className, ...rest }: GidsCheckboxProps): React.JSX.Element;
56
+ //# sourceMappingURL=GidsCheckbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsCheckbox.d.ts","sourceRoot":"","sources":["../../../src/components/GidsCheckbox/GidsCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACb,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAEhB,MAAM,OAAO,CAAC;AAEf,OAAO,EACN,KAAK,oBAAoB,EAEzB,MAAM,8BAA8B,CAAC;AAMtC,MAAM,WAAW,iBAChB,SAAQ,oBAAoB,CAC1B,SAAS,EACT,SAAS,EACT,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CACnC,EACD,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,EAC9C,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IACjD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AAEJ,wBAAgB,YAAY,CAAC,EAE5B,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO,EAGP,OAAO,EACP,cAAc,EACd,QAAQ,EACR,aAAa,EACb,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EAGR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,iBAAiB,qBA8BnB"}
@@ -0,0 +1,48 @@
1
+ import React, { useId, } from 'react';
2
+ import { GidsCheckboxWebUtils, } from '@ganpatiinfo/gids-web-shared';
3
+ import { GidsCheckboxControl } from '../_GidsCheckboxControl/GidsCheckboxControl.js';
4
+ import { GidsLabel } from '../GidsLabel/GidsLabel.js';
5
+ const { getGidsCheckboxClassNames } = GidsCheckboxWebUtils;
6
+ /**
7
+ * React DOM implementation of GIDS Checkbox component.
8
+ *
9
+ * **Usage**
10
+ *
11
+ * ```tsx
12
+ * import { GidsCheckbox } from '@ganpatiinfo/gids-react-web';
13
+ *
14
+ * export const MyComponent = () => (
15
+ * <GidsCheckbox>First Name</GidsCheckbox>
16
+ * );
17
+ * ```
18
+ * Implementation of GIDS Checkbox component with the info icon.
19
+ *
20
+ * **Usage**
21
+ *
22
+ * ```tsx
23
+ * import { GidsCheckbox, GidsLabelInfo } from '@ganpatiinfo/gids-react-web';
24
+ *
25
+ * export const MyComponent = () => (
26
+ * <GidsCheckbox
27
+ * info={<GidsLabelInfo onClick={()=>{}} disabled={disabled} alt={infoAlt} />}
28
+ * >
29
+ * First Name
30
+ * </GidsCheckbox>
31
+ * );
32
+ * ```
33
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsCheckbox />` component.
34
+ **/
35
+ export function GidsCheckbox({
36
+ // Label props
37
+ fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, labelId,
38
+ // Checkbox Control props
39
+ checked, defaultChecked, disabled, indeterminate, inputId, name, value, required, onChange, children,
40
+ // Checkbox props
41
+ className, ...rest }) {
42
+ const reactId = useId();
43
+ const actualInputId = inputId ?? reactId;
44
+ return (React.createElement("div", { className: getGidsCheckboxClassNames(className), ...rest },
45
+ React.createElement(GidsCheckboxControl, { onChange: onChange, checked: checked, defaultChecked: defaultChecked, indeterminate: indeterminate, inputId: actualInputId, name: name, value: value, required: required, disabled: disabled }),
46
+ React.createElement(GidsLabel, { disabled: disabled, fieldRequirement: fieldRequirement, fieldRequirementOptionalText: fieldRequirementOptionalText, fieldRequirementRequiredText: fieldRequirementRequiredText, info: info, labelId: labelId, htmlFor: actualInputId }, children)));
47
+ }
48
+ //# sourceMappingURL=GidsCheckbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsCheckbox.js","sourceRoot":"","sources":["../../../src/components/GidsCheckbox/GidsCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIb,KAAK,GACL,MAAM,OAAO,CAAC;AAEf,OAAO,EAEN,oBAAoB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,MAAM,EAAE,yBAAyB,EAAE,GAAG,oBAAoB,CAAC;AAmC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AAEJ,MAAM,UAAU,YAAY,CAAC;AAC5B,cAAc;AACd,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO;AAEP,yBAAyB;AACzB,OAAO,EACP,cAAc,EACd,QAAQ,EACR,aAAa,EACb,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ;AAER,iBAAiB;AACjB,SAAS,EACT,GAAG,IAAI,EACY;IACnB,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,aAAa,GAAG,OAAO,IAAI,OAAO,CAAC;IAEzC,OAAO,CACN,6BAAK,SAAS,EAAE,yBAAyB,CAAC,SAAS,CAAC,KAAM,IAAI;QAC7D,oBAAC,mBAAmB,IACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB;QACF,oBAAC,SAAS,IACT,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,4BAA4B,EAAE,4BAA4B,EAC1D,4BAA4B,EAAE,4BAA4B,EAC1D,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,IAErB,QAAQ,CACE,CACP,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type GidsLabelWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import React, { type ComponentPropsWithRef, type ReactNode } from 'react';
3
+ export type GidsLabelProps = GidsLabelWebProps<ReactNode> & ComponentPropsWithRef<'div'>;
4
+ /**
5
+ * React DOM implementation of GIDS Label component.
6
+ *
7
+ * **Usage**
8
+ *
9
+ * ```tsx
10
+ * import { GidsLabel } from '@investec/gids-react-web';
11
+ *
12
+ * export const MyComponent = () => (
13
+ * <GidsLabel>First Name</GidsLabel>
14
+ * );
15
+ * ```
16
+ * Implementation of GIDS Label component with the info icon.
17
+ *
18
+ * **Usage**
19
+ *
20
+ * ```tsx
21
+ * import { GidsLabel, GidsLabelInfo } from '@investec/gids-react-web';
22
+ *
23
+ * export const MyComponent = () => (
24
+ * <GidsLabel
25
+ info={<GidsLabelInfo onClick={()=>{}} disabled={disabled} alt={infoAlt} />}
26
+ >
27
+ First Name
28
+ </GidsLabel>
29
+ * );
30
+ * ```
31
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsLabel />` component.
32
+ **/
33
+ export declare function GidsLabel({ children, disabled, fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, htmlFor, labelId, className, ...rest }: GidsLabelProps): React.JSX.Element;
34
+ //# sourceMappingURL=GidsLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsLabel.d.ts","sourceRoot":"","sources":["../../../src/components/GidsLabel/GidsLabel.tsx"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,iBAAiB,EAEtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1E,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC,GACxD,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AAEJ,wBAAgB,SAAS,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,IAAI,EACP,EAAE,cAAc,qBAiBhB"}
@@ -0,0 +1,47 @@
1
+ import { GidsLabelCommonUtils } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsLabelWebUtils, } from '@ganpatiinfo/gids-web-shared';
3
+ import React from 'react';
4
+ const { getIndicatorText } = GidsLabelCommonUtils;
5
+ const { getGidsLabelClassNames } = GidsLabelWebUtils;
6
+ /**
7
+ * React DOM implementation of GIDS Label component.
8
+ *
9
+ * **Usage**
10
+ *
11
+ * ```tsx
12
+ * import { GidsLabel } from '@investec/gids-react-web';
13
+ *
14
+ * export const MyComponent = () => (
15
+ * <GidsLabel>First Name</GidsLabel>
16
+ * );
17
+ * ```
18
+ * Implementation of GIDS Label component with the info icon.
19
+ *
20
+ * **Usage**
21
+ *
22
+ * ```tsx
23
+ * import { GidsLabel, GidsLabelInfo } from '@investec/gids-react-web';
24
+ *
25
+ * export const MyComponent = () => (
26
+ * <GidsLabel
27
+ info={<GidsLabelInfo onClick={()=>{}} disabled={disabled} alt={infoAlt} />}
28
+ >
29
+ First Name
30
+ </GidsLabel>
31
+ * );
32
+ * ```
33
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsLabel />` component.
34
+ **/
35
+ export function GidsLabel({ children, disabled, fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, htmlFor, labelId, className, ...rest }) {
36
+ const indicatorText = getIndicatorText({
37
+ fieldRequirement,
38
+ fieldRequirementOptionalText,
39
+ fieldRequirementRequiredText,
40
+ });
41
+ return (React.createElement("div", { className: getGidsLabelClassNames({ disabled }, className), ...rest },
42
+ React.createElement("label", { htmlFor: htmlFor, id: labelId },
43
+ children,
44
+ indicatorText !== undefined && (React.createElement("span", { className: "gids-label__field-requirement" }, indicatorText))),
45
+ info));
46
+ }
47
+ //# sourceMappingURL=GidsLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsLabel.js","sourceRoot":"","sources":["../../../src/components/GidsLabel/GidsLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAEN,iBAAiB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,MAAM,EAAE,gBAAgB,EAAE,GAAG,oBAAoB,CAAC;AAClD,MAAM,EAAE,sBAAsB,EAAE,GAAG,iBAAiB,CAAC;AAKrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AAEJ,MAAM,UAAU,SAAS,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,IAAI,EACS;IAChB,MAAM,aAAa,GAAG,gBAAgB,CAAC;QACtC,gBAAgB;QAChB,4BAA4B;QAC5B,4BAA4B;KAC5B,CAAC,CAAC;IACH,OAAO,CACN,6BAAK,SAAS,EAAE,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,KAAM,IAAI;QACxE,+BAAO,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO;YAClC,QAAQ;YACR,aAAa,KAAK,SAAS,IAAI,CAC/B,8BAAM,SAAS,EAAC,+BAA+B,IAAE,aAAa,CAAQ,CACtE,CACM;QACP,IAAI,CACA,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type GidsLabelInfoCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import React, { type ComponentPropsWithRef } from 'react';
3
+ export type GidsLabelInfoProps = Omit<ComponentPropsWithRef<'button'>, 'type'> & GidsLabelInfoCommonProps;
4
+ export declare const GidsLabelInfo: ({ onClick, disabled, alt, className, ...rest }: GidsLabelInfoProps) => React.JSX.Element;
5
+ //# sourceMappingURL=GidsLabelInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsLabelInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/GidsLabel/GidsLabelInfo/GidsLabelInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAM1D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAC7E,wBAAwB,CAAC;AAE1B,eAAO,MAAM,aAAa,GAAI,gDAM3B,kBAAkB,sBAoBpB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { GidsLabelInfoCommonUtils, } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsLabelInfoWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ import React from 'react';
4
+ import { GidsIcon } from '../../GidsIcon/GidsIcon';
5
+ const { getLabelInfoAltText } = GidsLabelInfoCommonUtils;
6
+ const { getGidsLabelInfoClassNames } = GidsLabelInfoWebUtils;
7
+ export const GidsLabelInfo = ({ onClick, disabled, alt, className, ...rest }) => {
8
+ return (React.createElement("button", { className: getGidsLabelInfoClassNames(className), disabled: disabled, onClick: onClick, type: "button", ...rest },
9
+ React.createElement("span", { className: "gids-visually-hidden" }, getLabelInfoAltText({ alt })),
10
+ React.createElement(GidsIcon, { name: "information", alt: "", appearance: "regular", size: "sm" })));
11
+ };
12
+ //# sourceMappingURL=GidsLabelInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsLabelInfo.js","sourceRoot":"","sources":["../../../../src/components/GidsLabel/GidsLabelInfo/GidsLabelInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,wBAAwB,GACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,EAAE,mBAAmB,EAAE,GAAG,wBAAwB,CAAC;AACzD,MAAM,EAAE,0BAA0B,EAAE,GAAG,qBAAqB,CAAC;AAK7D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC7B,OAAO,EACP,QAAQ,EACR,GAAG,EACH,SAAS,EACT,GAAG,IAAI,EACa,EAAE,EAAE;IACxB,OAAO,CACN,gCACC,SAAS,EAAE,0BAA0B,CAAC,SAAS,CAAC,EAChD,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,QAAQ,KACT,IAAI;QAER,8BAAM,SAAS,EAAC,sBAAsB,IACpC,mBAAmB,CAAC,EAAE,GAAG,EAAE,CAAC,CACvB;QACP,oBAAC,QAAQ,IACR,IAAI,EAAC,aAAa,EAClB,GAAG,EAAC,EAAE,EACN,UAAU,EAAC,SAAS,EACpB,IAAI,EAAC,IAAI,GACE,CACJ,CACT,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React, { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ import { type GidsLinkCommonProps } from '@ganpatiinfo/gids-core-shared';
3
+ export type GidsLinkProps = GidsLinkCommonProps<ReactNode> & ComponentPropsWithRef<'a'>;
4
+ /**
5
+ * React DOM implementation of GIDS Link component.
6
+ *
7
+ * **Usage**
8
+ *
9
+ * ```tsx
10
+ * import { GidsLink } from '@ganpatiinfo/gids-react-web';
11
+ *
12
+ * export const MyComponent = () => (
13
+ * <GidsLink>Link text</GidsLink>
14
+ * );
15
+ * ```
16
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsLink />` component.
17
+ **/
18
+ export declare function GidsLink({ children, size, className, ...rest }: GidsLinkProps): React.JSX.Element;
19
+ //# sourceMappingURL=GidsLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsLink.d.ts","sourceRoot":"","sources":["../../../src/components/GidsLink/GidsLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAKzE,MAAM,MAAM,aAAa,GAAG,mBAAmB,CAAC,SAAS,CAAC,GACzD,qBAAqB,CAAC,GAAG,CAAC,CAAC;AAE5B;;;;;;;;;;;;;IAaI;AAEJ,wBAAgB,QAAQ,CAAC,EACxB,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,GAAG,IAAI,EACP,EAAE,aAAa,qBAMf"}
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { GidsLinkWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ const { getGidsLinkClassNames } = GidsLinkWebUtils;
4
+ /**
5
+ * React DOM implementation of GIDS Link component.
6
+ *
7
+ * **Usage**
8
+ *
9
+ * ```tsx
10
+ * import { GidsLink } from '@ganpatiinfo/gids-react-web';
11
+ *
12
+ * export const MyComponent = () => (
13
+ * <GidsLink>Link text</GidsLink>
14
+ * );
15
+ * ```
16
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsLink />` component.
17
+ **/
18
+ export function GidsLink({ children, size, className, ...rest }) {
19
+ return (React.createElement("a", { className: getGidsLinkClassNames({ size }, className), ...rest }, children));
20
+ }
21
+ //# sourceMappingURL=GidsLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsLink.js","sourceRoot":"","sources":["../../../src/components/GidsLink/GidsLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,EAAE,qBAAqB,EAAE,GAAG,gBAAgB,CAAC;AAKnD;;;;;;;;;;;;;IAaI;AAEJ,MAAM,UAAU,QAAQ,CAAC,EACxB,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,GAAG,IAAI,EACQ;IACf,OAAO,CACN,2BAAG,SAAS,EAAE,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,KAAM,IAAI,IAChE,QAAQ,CACN,CACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,56 @@
1
+ import React, { type ChangeEvent, type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ import { type GidsRadioWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export interface GidsRadioProps extends GidsRadioWebProps<ReactNode, ReactNode, string | number | readonly string[]>, Omit<ComponentPropsWithRef<'div'>, 'onChange'>, Pick<ComponentPropsWithRef<'input'>, 'onChange'> {
4
+ /**
5
+ * Sets the checked state of the Radio.
6
+ *
7
+ * Use this instead of `defaultChecked` for controlled usage.
8
+ */
9
+ checked?: boolean;
10
+ /**
11
+ * Whether the Radio should be checked when it is first rendered
12
+ * to the DOM.
13
+ *
14
+ * Use this instead of `checked` for uncontrolled usage.
15
+ */
16
+ defaultChecked?: boolean;
17
+ /**
18
+ * Fires when the Radio's `checked` state changes
19
+ * due to user interaction.
20
+ *
21
+ * @param event
22
+ * @returns
23
+ */
24
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
25
+ }
26
+ /**
27
+ * React DOM implementation of GIDS Radio component.
28
+ *
29
+ * **Usage**
30
+ *
31
+ * ```tsx
32
+ * import { GidsRadio } from '@ganpatiinfo/gids-react-web';
33
+ *
34
+ * export const MyComponent = () => (
35
+ * <GidsRadio>First Name</GidsRadio>
36
+ * );
37
+ * ```
38
+ * Implementation of GIDS Radio component with the info icon.
39
+ *
40
+ * **Usage**
41
+ *
42
+ * ```tsx
43
+ * import { GidsRadio, GidsLabelInfo } from '@ganpatiinfo/gids-react-web';
44
+ *
45
+ * export const MyComponent = () => (
46
+ * <GidsRadio
47
+ * info={<GidsLabelInfo onClick={()=>{}} disabled={disabled} alt={infoAlt} />}
48
+ * >
49
+ * First Name
50
+ * </GidsRadio>
51
+ * );
52
+ * ```
53
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsRadio />` component.
54
+ **/
55
+ export declare function GidsRadio({ fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, labelId, checked, defaultChecked, disabled, inputId, name, value, onChange, children, className, ...rest }: GidsRadioProps): React.JSX.Element;
56
+ //# sourceMappingURL=GidsRadio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsRadio.d.ts","sourceRoot":"","sources":["../../../src/components/GidsRadio/GidsRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACb,KAAK,WAAW,EAEhB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AACf,OAAO,EACN,KAAK,iBAAiB,EAEtB,MAAM,8BAA8B,CAAC;AAMtC,MAAM,WAAW,cAChB,SAAQ,iBAAiB,CACvB,SAAS,EACT,SAAS,EACT,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CACnC,EACD,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,EAC9C,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IACjD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AAEJ,wBAAgB,SAAS,CAAC,EAEzB,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO,EAGP,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EAGR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,cAAc,qBA4BhB"}
@@ -0,0 +1,48 @@
1
+ import React, { useId, } from 'react';
2
+ import { GidsRadioWebUtils, } from '@ganpatiinfo/gids-web-shared';
3
+ import { GidsRadioControl } from '../_GidsRadioControl/GidsRadioControl.js';
4
+ import { GidsLabel } from '../GidsLabel/GidsLabel.js';
5
+ const { getGidsRadioClassNames } = GidsRadioWebUtils;
6
+ /**
7
+ * React DOM implementation of GIDS Radio component.
8
+ *
9
+ * **Usage**
10
+ *
11
+ * ```tsx
12
+ * import { GidsRadio } from '@ganpatiinfo/gids-react-web';
13
+ *
14
+ * export const MyComponent = () => (
15
+ * <GidsRadio>First Name</GidsRadio>
16
+ * );
17
+ * ```
18
+ * Implementation of GIDS Radio component with the info icon.
19
+ *
20
+ * **Usage**
21
+ *
22
+ * ```tsx
23
+ * import { GidsRadio, GidsLabelInfo } from '@ganpatiinfo/gids-react-web';
24
+ *
25
+ * export const MyComponent = () => (
26
+ * <GidsRadio
27
+ * info={<GidsLabelInfo onClick={()=>{}} disabled={disabled} alt={infoAlt} />}
28
+ * >
29
+ * First Name
30
+ * </GidsRadio>
31
+ * );
32
+ * ```
33
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsRadio />` component.
34
+ **/
35
+ export function GidsRadio({
36
+ // Label props
37
+ fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, labelId,
38
+ // radio control props
39
+ checked, defaultChecked, disabled, inputId, name, value, onChange, children,
40
+ // radio props
41
+ className, ...rest }) {
42
+ const reactId = useId();
43
+ const actualInputId = inputId ?? reactId;
44
+ return (React.createElement("div", { className: getGidsRadioClassNames(className), ...rest },
45
+ React.createElement(GidsRadioControl, { onChange: onChange, checked: checked, defaultChecked: defaultChecked, inputId: actualInputId, name: name, value: value, disabled: disabled }),
46
+ React.createElement(GidsLabel, { disabled: disabled, fieldRequirement: fieldRequirement, fieldRequirementOptionalText: fieldRequirementOptionalText, fieldRequirementRequiredText: fieldRequirementRequiredText, info: info, labelId: labelId, htmlFor: actualInputId }, children)));
47
+ }
48
+ //# sourceMappingURL=GidsRadio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsRadio.js","sourceRoot":"","sources":["../../../src/components/GidsRadio/GidsRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEb,KAAK,GAGL,MAAM,OAAO,CAAC;AACf,OAAO,EAEN,iBAAiB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,MAAM,EAAE,sBAAsB,EAAE,GAAG,iBAAiB,CAAC;AAmCrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AAEJ,MAAM,UAAU,SAAS,CAAC;AACzB,cAAc;AACd,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO;AAEP,sBAAsB;AACtB,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ;AAER,cAAc;AACd,SAAS,EACT,GAAG,IAAI,EACS;IAChB,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,aAAa,GAAG,OAAO,IAAI,OAAO,CAAC;IAEzC,OAAO,CACN,6BAAK,SAAS,EAAE,sBAAsB,CAAC,SAAS,CAAC,KAAM,IAAI;QAC1D,oBAAC,gBAAgB,IAChB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,GACjB;QACF,oBAAC,SAAS,IACT,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,4BAA4B,EAAE,4BAA4B,EAC1D,4BAA4B,EAAE,4BAA4B,EAC1D,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,IAErB,QAAQ,CACE,CACP,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,57 @@
1
+ import React, { type ChangeEvent, type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ import { type GidsSwitchWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export interface GidsSwitchProps extends GidsSwitchWebProps<ReactNode, ReactNode, string | number | readonly string[]>, Omit<ComponentPropsWithRef<'div'>, 'onChange'>, Pick<ComponentPropsWithRef<'input'>, 'onChange'> {
4
+ /**
5
+ * Sets the checked state of the Switch.
6
+ *
7
+ * Use this instead of `defaultChecked` for controlled usage.
8
+ */
9
+ checked?: boolean;
10
+ /**
11
+ * Whether the Switch should be checked when it is first rendered
12
+ * to the DOM.
13
+ *
14
+ * Use this instead of `checked` for uncontrolled usage.
15
+ */
16
+ defaultChecked?: boolean;
17
+ /**
18
+ * Fires when the Switch's `checked` state changes
19
+ * due to user interaction.
20
+ *
21
+ * @param event
22
+ * @returns
23
+ */
24
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
25
+ }
26
+ /**
27
+ * React DOM implementation of GIDS Switch component.
28
+ *
29
+ * **Usage**
30
+ *
31
+ * ```tsx
32
+ * import { GidsSwitch } from '@ganpatiinfo/gids-react-web';
33
+ *
34
+ * export const MyComponent = () => (
35
+ * <GidsSwitch>Enable Level 9000</GidsSwitch>
36
+ * );
37
+ * ```
38
+ * Implementation of GIDS Switch component with the info icon.
39
+ *
40
+ * Switch supports inserting an `GidsLabelInfo` button into its
41
+ * label:
42
+ *
43
+ * ```tsx
44
+ * import { GidsSwitch, GidsLabelInfo } from '@ganpatiinfo/gids-react-web';
45
+ *
46
+ * export const MyComponent = () => (
47
+ * <GidsSwitch
48
+ * info={<GidsLabelInfo ... />}
49
+ * >
50
+ * Enable Level 9000
51
+ * </GidsSwitch>
52
+ * );
53
+ * ```
54
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsSwitch />` component.
55
+ **/
56
+ export declare function GidsSwitch({ fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, labelId, checked, defaultChecked, disabled, inputId, name, value, onChange, children, className, ...rest }: GidsSwitchProps): React.JSX.Element;
57
+ //# sourceMappingURL=GidsSwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSwitch.d.ts","sourceRoot":"","sources":["../../../src/components/GidsSwitch/GidsSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACb,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EAEd,MAAM,OAAO,CAAC;AACf,OAAO,EACN,KAAK,kBAAkB,EAEvB,MAAM,8BAA8B,CAAC;AAMtC,MAAM,WAAW,eAChB,SAAQ,kBAAkB,CACxB,SAAS,EACT,SAAS,EACT,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CACnC,EACD,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,EAC9C,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IACjD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6BI;AAEJ,wBAAgB,UAAU,CAAC,EAE1B,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO,EAGP,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EAGR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,eAAe,qBA4BjB"}
@@ -0,0 +1,49 @@
1
+ import React, { useId, } from 'react';
2
+ import { GidsSwitchWebUtils, } from '@ganpatiinfo/gids-web-shared';
3
+ import { GidsSwitchControl } from '../_GidsSwitchControl/GidsSwitchControl.js';
4
+ import { GidsLabel } from '../GidsLabel/GidsLabel.js';
5
+ const { getGidsSwitchClassNames } = GidsSwitchWebUtils;
6
+ /**
7
+ * React DOM implementation of GIDS Switch component.
8
+ *
9
+ * **Usage**
10
+ *
11
+ * ```tsx
12
+ * import { GidsSwitch } from '@ganpatiinfo/gids-react-web';
13
+ *
14
+ * export const MyComponent = () => (
15
+ * <GidsSwitch>Enable Level 9000</GidsSwitch>
16
+ * );
17
+ * ```
18
+ * Implementation of GIDS Switch component with the info icon.
19
+ *
20
+ * Switch supports inserting an `GidsLabelInfo` button into its
21
+ * label:
22
+ *
23
+ * ```tsx
24
+ * import { GidsSwitch, GidsLabelInfo } from '@ganpatiinfo/gids-react-web';
25
+ *
26
+ * export const MyComponent = () => (
27
+ * <GidsSwitch
28
+ * info={<GidsLabelInfo ... />}
29
+ * >
30
+ * Enable Level 9000
31
+ * </GidsSwitch>
32
+ * );
33
+ * ```
34
+ * Click `Show code` below and play with the controls to see the various props that can be applied to the `<GidsSwitch />` component.
35
+ **/
36
+ export function GidsSwitch({
37
+ // Label props
38
+ fieldRequirement, fieldRequirementOptionalText, fieldRequirementRequiredText, info, labelId,
39
+ // Checkbox Control props
40
+ checked, defaultChecked, disabled, inputId, name, value, onChange, children,
41
+ // Checkbox props
42
+ className, ...rest }) {
43
+ const reactId = useId();
44
+ const actualInputId = inputId ?? reactId;
45
+ return (React.createElement("div", { className: getGidsSwitchClassNames(className), ...rest },
46
+ React.createElement(GidsSwitchControl, { onChange: onChange, checked: checked, defaultChecked: defaultChecked, inputId: actualInputId, name: name, value: value, disabled: disabled }),
47
+ React.createElement(GidsLabel, { disabled: disabled, fieldRequirement: fieldRequirement, fieldRequirementOptionalText: fieldRequirementOptionalText, fieldRequirementRequiredText: fieldRequirementRequiredText, info: info, labelId: labelId, htmlFor: actualInputId }, children)));
48
+ }
49
+ //# sourceMappingURL=GidsSwitch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSwitch.js","sourceRoot":"","sources":["../../../src/components/GidsSwitch/GidsSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIb,KAAK,GACL,MAAM,OAAO,CAAC;AACf,OAAO,EAEN,kBAAkB,GAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,MAAM,EAAE,uBAAuB,EAAE,GAAG,kBAAkB,CAAC;AAmCvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6BI;AAEJ,MAAM,UAAU,UAAU,CAAC;AAC1B,cAAc;AACd,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,IAAI,EACJ,OAAO;AAEP,yBAAyB;AACzB,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ;AAER,iBAAiB;AACjB,SAAS,EACT,GAAG,IAAI,EACU;IACjB,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,aAAa,GAAG,OAAO,IAAI,OAAO,CAAC;IAEzC,OAAO,CACN,6BAAK,SAAS,EAAE,uBAAuB,CAAC,SAAS,CAAC,KAAM,IAAI;QAC3D,oBAAC,iBAAiB,IACjB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,GACjB;QACF,oBAAC,SAAS,IACT,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,4BAA4B,EAAE,4BAA4B,EAC1D,4BAA4B,EAAE,4BAA4B,EAC1D,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,IAErB,QAAQ,CACE,CACP,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React, { type ChangeEvent, type ComponentPropsWithRef } from 'react';
2
+ import { type GidsCheckboxControlWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export interface GidsCheckboxControlProps extends GidsCheckboxControlWebProps<string | number | readonly string[]>, Omit<ComponentPropsWithRef<'span'>, 'onChange'>, Pick<ComponentPropsWithRef<'input'>, 'onChange'> {
4
+ /**
5
+ * Sets the checked state of the checkbox control.
6
+ *
7
+ * Use this instead of `defaultChecked` for controlled usage.
8
+ */
9
+ checked?: boolean;
10
+ /**
11
+ * Whether the Checkbox Control should be checked when it is first rendered
12
+ * to the DOM.
13
+ *
14
+ * Use this instead of `checked` for uncontrolled usage.
15
+ */
16
+ defaultChecked?: boolean;
17
+ /**
18
+ * Fires when the Checkbox Control's `checked` state changes
19
+ * due to user interaction.
20
+ *
21
+ * @param event
22
+ * @returns
23
+ */
24
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
25
+ }
26
+ export declare function GidsCheckboxControl({ checked, defaultChecked, disabled, indeterminate, inputId, name, value, required, onChange, className, ...rest }: GidsCheckboxControlProps): React.JSX.Element;
27
+ //# sourceMappingURL=GidsCheckboxControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsCheckboxControl.d.ts","sourceRoot":"","sources":["../../../src/components/_GidsCheckboxControl/GidsCheckboxControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACb,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAG1B,MAAM,OAAO,CAAC;AACf,OAAO,EACN,KAAK,2BAA2B,EAEhC,MAAM,8BAA8B,CAAC;AAKtC,MAAM,WAAW,wBAChB,SAAQ,2BAA2B,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,EACvE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC/C,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IACjD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED,wBAAgB,mBAAmB,CAAC,EACnC,OAAO,EACP,cAAc,EACd,QAAQ,EACR,aAAa,EACb,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,wBAAwB,qBAsC1B"}
@@ -0,0 +1,17 @@
1
+ import React, { useEffect, useRef, } from 'react';
2
+ import { GidsCheckboxControlWebUtils, } from '@ganpatiinfo/gids-web-shared';
3
+ import { GidsIcon } from '../GidsIcon/GidsIcon.js';
4
+ const { getGidsCheckboxControlClassNames } = GidsCheckboxControlWebUtils;
5
+ export function GidsCheckboxControl({ checked, defaultChecked, disabled, indeterminate, inputId, name, value, required, onChange, className, ...rest }) {
6
+ const checkboxRef = useRef(null);
7
+ useEffect(() => {
8
+ if (checkboxRef.current) {
9
+ checkboxRef.current.indeterminate = indeterminate || false; // Set indeterminate state
10
+ }
11
+ }, [indeterminate]);
12
+ return (React.createElement("span", { className: getGidsCheckboxControlClassNames(className), ...rest },
13
+ React.createElement("input", { className: "gids-checkbox-control__input", type: "checkbox", disabled: disabled, id: inputId, name: name, value: value, checked: checked, defaultChecked: defaultChecked, required: required, onChange: onChange, ref: checkboxRef }),
14
+ React.createElement(GidsIcon, { className: "gids-checkbox-control__check", name: "checkmark", alt: "", size: "sm" }),
15
+ React.createElement(GidsIcon, { className: "gids-checkbox-control__minus", name: "minus", alt: "", size: "sm" })));
16
+ }
17
+ //# sourceMappingURL=GidsCheckboxControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsCheckboxControl.js","sourceRoot":"","sources":["../../../src/components/_GidsCheckboxControl/GidsCheckboxControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGb,SAAS,EACT,MAAM,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAEN,2BAA2B,GAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,EAAE,gCAAgC,EAAE,GAAG,2BAA2B,CAAC;AA+BzE,MAAM,UAAU,mBAAmB,CAAC,EACnC,OAAO,EACP,cAAc,EACd,QAAQ,EACR,aAAa,EACb,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACmB;IAC1B,MAAM,WAAW,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEnD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,WAAW,CAAC,OAAO,CAAC,aAAa,GAAG,aAAa,IAAI,KAAK,CAAC,CAAC,0BAA0B;QACvF,CAAC;IACF,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,8BAAM,SAAS,EAAE,gCAAgC,CAAC,SAAS,CAAC,KAAM,IAAI;QACrE,+BACC,SAAS,EAAC,8BAA8B,EACxC,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,WAAW,GACf;QACF,oBAAC,QAAQ,IACR,SAAS,EAAC,8BAA8B,EACxC,IAAI,EAAC,WAAW,EAChB,GAAG,EAAC,EAAE,EACN,IAAI,EAAC,IAAI,GACR;QACF,oBAAC,QAAQ,IACR,SAAS,EAAC,8BAA8B,EACxC,IAAI,EAAC,OAAO,EACZ,GAAG,EAAC,EAAE,EACN,IAAI,EAAC,IAAI,GACR,CACI,CACP,CAAC;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React, { type ChangeEvent, type ComponentPropsWithRef } from 'react';
2
+ import { type GidsRadioControlWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export interface GidsRadioControlProps extends GidsRadioControlWebProps<string | number | readonly string[]>, Omit<ComponentPropsWithRef<'span'>, 'onChange'>, Pick<ComponentPropsWithRef<'input'>, 'onChange'> {
4
+ /**
5
+ * Sets the checked state of the radio control.
6
+ *
7
+ * Use this instead of `defaultChecked` for controlled usage.
8
+ */
9
+ checked?: boolean;
10
+ /**
11
+ * Whether the Radio Control should be checked when it is first rendered
12
+ * to the DOM.
13
+ *
14
+ * Use this instead of `checked` for uncontrolled usage.
15
+ */
16
+ defaultChecked?: boolean;
17
+ /**
18
+ * Fires when the Radio Control's `checked` state changes
19
+ * due to user interaction.
20
+ *
21
+ * @param event
22
+ * @returns
23
+ */
24
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
25
+ }
26
+ export declare function GidsRadioControl({ checked, defaultChecked, disabled, inputId, name, value, onChange, className, ...rest }: GidsRadioControlProps): React.JSX.Element;
27
+ //# sourceMappingURL=GidsRadioControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsRadioControl.d.ts","sourceRoot":"","sources":["../../../src/components/_GidsRadioControl/GidsRadioControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,WAAW,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,8BAA8B,CAAC;AAItC,MAAM,WAAW,qBAChB,SAAQ,wBAAwB,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,EACpE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC/C,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IACjD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED,wBAAgB,gBAAgB,CAAC,EAChC,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,qBAAqB,qBAiBvB"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { GidsRadioControlWebUtils, } from '@ganpatiinfo/gids-web-shared';
3
+ const { getGidsRadioControlClassNames } = GidsRadioControlWebUtils;
4
+ export function GidsRadioControl({ checked, defaultChecked, disabled, inputId, name, value, onChange, className, ...rest }) {
5
+ return (React.createElement("span", { className: getGidsRadioControlClassNames(className), ...rest },
6
+ React.createElement("input", { className: "gids-radio-control__input", type: "radio", disabled: disabled, id: inputId, name: name, value: value, checked: checked, defaultChecked: defaultChecked, onChange: onChange }),
7
+ React.createElement("span", { className: "gids-radio-control__check" })));
8
+ }
9
+ //# sourceMappingURL=GidsRadioControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsRadioControl.js","sourceRoot":"","sources":["../../../src/components/_GidsRadioControl/GidsRadioControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAC5E,OAAO,EAEN,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,EAAE,6BAA6B,EAAE,GAAG,wBAAwB,CAAC;AA+BnE,MAAM,UAAU,gBAAgB,CAAC,EAChC,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACgB;IACvB,OAAO,CACN,8BAAM,SAAS,EAAE,6BAA6B,CAAC,SAAS,CAAC,KAAM,IAAI;QAClE,+BACC,SAAS,EAAC,2BAA2B,EACrC,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,GACV;QACT,8BAAM,SAAS,EAAC,2BAA2B,GAAG,CACxC,CACP,CAAC;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React, { type ComponentPropsWithRef, type ChangeEvent } from 'react';
2
+ import { type GidsSwitchControlWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export interface GidsSwitchControlProps extends GidsSwitchControlWebProps<string | number | readonly string[]>, Omit<ComponentPropsWithRef<'span'>, 'onChange'>, Pick<ComponentPropsWithRef<'input'>, 'onChange'> {
4
+ /**
5
+ * Sets the checked state of the Switch control.
6
+ *
7
+ * Use this instead of `defaultChecked` for controlled usage.
8
+ */
9
+ checked?: boolean;
10
+ /**
11
+ * Whether the Switch Control should be checked when it is first rendered
12
+ * to the DOM.
13
+ *
14
+ * Use this instead of `checked` for uncontrolled usage.
15
+ */
16
+ defaultChecked?: boolean;
17
+ /**
18
+ * Fires when the Switch Control's `checked` state changes
19
+ * due to user interaction.
20
+ *
21
+ * @param event
22
+ * @returns
23
+ */
24
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
25
+ }
26
+ export declare function GidsSwitchControl({ checked, defaultChecked, disabled, inputId, name, value, onChange, className, ...rest }: GidsSwitchControlProps): React.JSX.Element;
27
+ //# sourceMappingURL=GidsSwitchControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSwitchControl.d.ts","sourceRoot":"","sources":["../../../src/components/_GidsSwitchControl/GidsSwitchControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EACN,KAAK,yBAAyB,EAE9B,MAAM,8BAA8B,CAAC;AAKtC,MAAM,WAAW,sBAChB,SAAQ,yBAAyB,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,EACrE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC/C,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IACjD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED,wBAAgB,iBAAiB,CAAC,EACjC,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACP,EAAE,sBAAsB,qBA8BxB"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { GidsSwitchControlWebUtils, } from '@ganpatiinfo/gids-web-shared';
3
+ import { GidsIcon } from '../GidsIcon/GidsIcon.js';
4
+ const { getGidsSwitchControlClassNames } = GidsSwitchControlWebUtils;
5
+ export function GidsSwitchControl({ checked, defaultChecked, disabled, inputId, name, value, onChange, className, ...rest }) {
6
+ return (React.createElement("span", { className: getGidsSwitchControlClassNames(className), ...rest },
7
+ React.createElement("input", { className: "gids-switch-control__input", role: "switch", type: "checkbox", disabled: disabled, checked: checked, defaultChecked: defaultChecked, value: value, id: inputId, name: name, onChange: onChange }),
8
+ React.createElement(GidsIcon, { className: "gids-switch-control__check", name: "checkmark", alt: "", size: "sm" }),
9
+ React.createElement(GidsIcon, { className: "gids-switch-control__cross", name: "cross", alt: "", size: "sm" }),
10
+ React.createElement("span", { className: "gids-switch-control__slider" })));
11
+ }
12
+ //# sourceMappingURL=GidsSwitchControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsSwitchControl.js","sourceRoot":"","sources":["../../../src/components/_GidsSwitchControl/GidsSwitchControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAC5E,OAAO,EAEN,yBAAyB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,EAAE,8BAA8B,EAAE,GAAG,yBAAyB,CAAC;AA+BrE,MAAM,UAAU,iBAAiB,CAAC,EACjC,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACiB;IACxB,OAAO,CACN,8BAAM,SAAS,EAAE,8BAA8B,CAAC,SAAS,CAAC,KAAM,IAAI;QACnE,+BACC,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,GACV;QACT,oBAAC,QAAQ,IACR,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAC,WAAW,EAChB,GAAG,EAAC,EAAE,EACN,IAAI,EAAC,IAAI,GACR;QACF,oBAAC,QAAQ,IACR,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAC,OAAO,EACZ,GAAG,EAAC,EAAE,EACN,IAAI,EAAC,IAAI,GACR;QACF,8BAAM,SAAS,EAAC,6BAA6B,GAAG,CAC1C,CACP,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganpatiinfo/gids-react-web",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
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.2",
26
- "@ganpatiinfo/gids-web-theme-interface": "2.0.2",
25
+ "@ganpatiinfo/gids-core-web": "2.0.3",
26
+ "@ganpatiinfo/gids-web-theme-interface": "2.0.3",
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.2",
33
- "@ganpatiinfo/gids-web-shared": "2.0.2"
32
+ "@ganpatiinfo/gids-core-shared": "2.0.3",
33
+ "@ganpatiinfo/gids-web-shared": "2.0.3"
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.2",
59
- "@ganpatiinfo/gids-storybook-utilities": "2.0.2",
60
- "@ganpatiinfo/gids-web-dom-reference": "2.0.2",
61
- "@ganpatiinfo/gids-web-theme-ganpatiinfo": "2.0.2"
58
+ "@ganpatiinfo/gids-storybook-theme": "2.0.3",
59
+ "@ganpatiinfo/gids-storybook-utilities": "2.0.3",
60
+ "@ganpatiinfo/gids-web-dom-reference": "2.0.3",
61
+ "@ganpatiinfo/gids-web-theme-ganpatiinfo": "2.0.3"
62
62
  },
63
63
  "author": {
64
64
  "name": "Ganpatiinfo Design System",