react-restyle-components 0.4.11 → 0.4.13

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 (62) hide show
  1. package/lib/src/core-components/src/components/Accordion/AccordionSection/elements.d.ts +1 -1
  2. package/lib/src/core-components/src/components/Accordion/AccordionSection/elements.d.ts.map +1 -1
  3. package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts +22 -2
  4. package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts.map +1 -1
  5. package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.js +2 -2
  6. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +58 -1
  7. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts.map +1 -1
  8. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +11 -11
  9. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts +26 -1
  10. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts.map +1 -1
  11. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.js +11 -11
  12. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +28 -1
  13. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts.map +1 -1
  14. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +7 -5
  15. package/lib/src/core-components/src/components/Avatar/Avatar.d.ts +25 -1
  16. package/lib/src/core-components/src/components/Avatar/Avatar.d.ts.map +1 -1
  17. package/lib/src/core-components/src/components/Avatar/Avatar.js +4 -4
  18. package/lib/src/core-components/src/components/Badge/Badge.d.ts +17 -3
  19. package/lib/src/core-components/src/components/Badge/Badge.d.ts.map +1 -1
  20. package/lib/src/core-components/src/components/Badge/Badge.js +2 -2
  21. package/lib/src/core-components/src/components/Button1/button.component.d.ts +13 -2
  22. package/lib/src/core-components/src/components/Button1/button.component.d.ts.map +1 -1
  23. package/lib/src/core-components/src/components/Button1/button.component.js +2 -2
  24. package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.d.ts +18 -4
  25. package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.d.ts.map +1 -1
  26. package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.js +1 -1
  27. package/lib/src/core-components/src/components/Icon/Icon.d.ts +27 -12
  28. package/lib/src/core-components/src/components/Icon/Icon.d.ts.map +1 -1
  29. package/lib/src/core-components/src/components/Icon/Icon.js +8 -8
  30. package/lib/src/core-components/src/components/Loader/loader.component.d.ts +38 -1
  31. package/lib/src/core-components/src/components/Loader/loader.component.d.ts.map +1 -1
  32. package/lib/src/core-components/src/components/Loader/loader.component.js +50 -10
  33. package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.d.ts +42 -2
  34. package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.d.ts.map +1 -1
  35. package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.js +15 -8
  36. package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.d.ts +54 -2
  37. package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.d.ts.map +1 -1
  38. package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.js +5 -5
  39. package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.d.ts +26 -4
  40. package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.d.ts.map +1 -1
  41. package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.js +2 -2
  42. package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.d.ts +42 -1
  43. package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.d.ts.map +1 -1
  44. package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.js +4 -4
  45. package/lib/src/core-components/src/components/Selection/single-select/single-select.component.d.ts +38 -2
  46. package/lib/src/core-components/src/components/Selection/single-select/single-select.component.d.ts.map +1 -1
  47. package/lib/src/core-components/src/components/Selection/single-select/single-select.component.js +8 -6
  48. package/lib/src/core-components/src/components/Stepper2/stepper.component.d.ts +38 -2
  49. package/lib/src/core-components/src/components/Stepper2/stepper.component.d.ts.map +1 -1
  50. package/lib/src/core-components/src/components/Stepper2/stepper.component.js +12 -7
  51. package/lib/src/core-components/src/components/Tabs/tabs.component.d.ts +33 -3
  52. package/lib/src/core-components/src/components/Tabs/tabs.component.d.ts.map +1 -1
  53. package/lib/src/core-components/src/components/Tabs/tabs.component.js +8 -5
  54. package/lib/src/core-components/src/components/Tags1/Tags.component.d.ts +46 -1
  55. package/lib/src/core-components/src/components/Tags1/Tags.component.d.ts.map +1 -1
  56. package/lib/src/core-components/src/components/Tags1/Tags.component.js +5 -5
  57. package/lib/src/core-components/src/components/Tooltip/tooltip.component.d.ts +21 -2
  58. package/lib/src/core-components/src/components/Tooltip/tooltip.component.d.ts.map +1 -1
  59. package/lib/src/core-components/src/components/Tooltip/tooltip.component.js +2 -2
  60. package/lib/src/core-components/src/tc.global.css +7 -2
  61. package/lib/src/core-components/src/tc.module.css +2 -2
  62. package/package.json +1 -1
@@ -1,7 +1,21 @@
1
+ import { CSSProperties } from 'react';
1
2
  import { ReactNode } from 'react';
2
- export declare const ButtonGroup: ({ children, orientation, className, }: {
3
+ export interface ButtonGroupClassNames {
4
+ /** Custom className for the container */
5
+ container?: string;
6
+ }
7
+ export interface ButtonGroupStyles {
8
+ /** Custom style for the container */
9
+ container?: CSSProperties;
10
+ }
11
+ export interface ButtonGroupProps {
3
12
  children: ReactNode;
4
- orientation?: "horizontal" | "vertical" | undefined;
5
- className?: string | undefined;
6
- }) => import("react/jsx-runtime").JSX.Element;
13
+ orientation?: 'horizontal' | 'vertical';
14
+ className?: string;
15
+ /** Custom classNames for component parts */
16
+ classNames?: ButtonGroupClassNames;
17
+ /** Custom inline styles for component parts */
18
+ styles?: ButtonGroupStyles;
19
+ }
20
+ export declare const ButtonGroup: ({ children, orientation, className, classNames, styles, }: ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
7
21
  //# sourceMappingURL=buttonGroup.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttonGroup.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAIhC,eAAO,MAAM,WAAW;cAKZ,SAAS;;;6CAepB,CAAC"}
1
+ {"version":3,"file":"buttonGroup.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAIhC,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,+CAA+C;IAC/C,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,8DAMrB,gBAAgB,4CAclB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import s from '../../../tc.module.css';
3
3
  import { cn } from '../../../utils';
4
- export const ButtonGroup = ({ children, orientation = 'horizontal', className, }) => (_jsx("div", { className: cn(s.flex, orientation == 'horizontal' ? s['flex-row'] : s['flex-col'], s['w-fit'], s['gap-2'], className), children: children }));
4
+ export const ButtonGroup = ({ children, orientation = 'horizontal', className, classNames = {}, styles = {}, }) => (_jsx("div", { className: cn(s.flex, orientation == 'horizontal' ? s['flex-row'] : s['flex-col'], s['w-fit'], s['gap-2'], className, classNames.container), style: styles.container, children: children }));
@@ -1,29 +1,44 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { IconBaseProps } from 'react-icons/lib';
3
+ export interface IconClassNames {
4
+ /** Custom className for the container wrapper */
5
+ container?: string;
6
+ /** Custom className for the icon element */
7
+ icon?: string;
8
+ }
9
+ export interface IconStyles {
10
+ /** Custom style for the container wrapper */
11
+ container?: CSSProperties;
12
+ /** Custom style for the icon element */
13
+ icon?: CSSProperties;
14
+ }
3
15
  export interface IconProps {
16
+ /** Name of the icon from react-icons library (e.g., 'FaHeart', 'MdSettings') */
4
17
  nameIcon: string;
18
+ /** Props to pass to the underlying react-icon component */
5
19
  propsIcon?: IconBaseProps;
20
+ /** Additional className for the container */
6
21
  className?: string;
22
+ /** Tooltip text to display on hover */
7
23
  tooltip?: string;
24
+ /** Whether the icon is disabled */
8
25
  isDisable?: boolean;
26
+ /** Click handler */
9
27
  onClick?: () => void;
28
+ /** Custom classNames for internal elements */
29
+ classNames?: IconClassNames;
30
+ /** Custom styles for internal elements */
31
+ styles?: IconStyles;
10
32
  }
11
33
  export interface CompatIconProps {
12
34
  src: string | React.ReactNode;
13
35
  className?: string;
36
+ style?: CSSProperties;
14
37
  [key: string]: any;
15
38
  }
16
- export interface IconProps {
17
- nameIcon: string;
18
- propsIcon?: IconBaseProps;
19
- className?: string;
20
- tooltip?: string;
21
- isDisable?: boolean;
22
- onClick?: () => void;
23
- }
24
39
  export declare const Icon: {
25
- ({ nameIcon, propsIcon, className, tooltip, isDisable, onClick, }: IconProps): JSX.Element;
26
- SSR: ({ nameIcon, ...props }: IconProps) => JSX.Element;
27
- Compat: ({ src, className, ...props }: CompatIconProps) => JSX.Element;
40
+ ({ nameIcon, propsIcon, className, tooltip, isDisable, classNames, styles, onClick, }: IconProps): JSX.Element;
41
+ SSR: ({ nameIcon, classNames, styles, ...props }: IconProps) => JSX.Element;
42
+ Compat: ({ src, className, style, ...props }: CompatIconProps) => JSX.Element;
28
43
  };
29
44
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAI9C,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AA4BD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,IAAI;uEAOd,SAAS,GAAG,WAAW;kCAxBa,SAAS,KAAG,WAAW;2CAd3D,eAAe,KAAG,WAAW;CAgH/B,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAI9C,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,wCAAwC;IACxC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,0CAA0C;IAC1C,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AA4CD,eAAO,MAAM,IAAI;2FASd,SAAS,GAAG,WAAW;sDArBvB,SAAS,KAAG,WAAW;kDAzBvB,eAAe,KAAG,WAAW;CAiI/B,CAAC"}
@@ -5,16 +5,16 @@ import { Tooltip } from '../Tooltip/tooltip.component';
5
5
  import loadable from '@loadable/component';
6
6
  import s from '../../tc.module.css';
7
7
  import { cn } from '../../utils';
8
- const CompatIcon = ({ src, className, ...props }) => {
8
+ const CompatIcon = ({ src, className, style, ...props }) => {
9
9
  if (typeof src === 'string') {
10
- return (_jsx("img", { src: src, className: cn(s.icon, className), ...props, alt: "" }));
10
+ return (_jsx("img", { src: src, className: cn(s.icon, className), style: style, ...props, alt: "" }));
11
11
  }
12
- return (_jsx("div", { className: cn(s.icon, className), ...props, children: src }));
12
+ return (_jsx("div", { className: cn(s.icon, className), style: style, ...props, children: src }));
13
13
  };
14
- const SSRIcon = ({ nameIcon, ...props }) => {
15
- return (_jsx("span", { className: cn(s.icon, props.className), "aria-hidden": "true", children: "\u26AB" }));
14
+ const SSRIcon = ({ nameIcon, classNames = {}, styles = {}, ...props }) => {
15
+ return (_jsx("span", { className: cn(s.icon, props.className, classNames.icon), style: styles.icon, "aria-hidden": "true", children: "\u26AB" }));
16
16
  };
17
- export const Icon = ({ nameIcon, propsIcon, className, tooltip = '', isDisable = false, onClick, }) => {
17
+ export const Icon = ({ nameIcon, propsIcon, className, tooltip = '', isDisable = false, classNames = {}, styles = {}, onClick, }) => {
18
18
  try {
19
19
  const iconProps = {
20
20
  ...propsIcon,
@@ -65,10 +65,10 @@ export const Icon = ({ nameIcon, propsIcon, className, tooltip = '', isDisable =
65
65
  const ElementIcon = loadable(loadLibrary, {
66
66
  resolveComponent: (el) => el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
67
67
  });
68
- return (_jsx("div", { className: cn(s.iconContainer, className), onClick: () => {
68
+ return (_jsx("div", { className: cn(s.iconContainer, className, classNames.container), style: styles.container, onClick: () => {
69
69
  if (!isDisable)
70
70
  onClick && onClick();
71
- }, children: !_.isEmpty(tooltip) ? (_jsx(Tooltip, { content: tooltip, children: _jsx(ElementIcon, { ...iconProps, className: cn(s.icon) }) })) : (_jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx(ElementIcon, { ...iconProps, className: cn(s.icon) }) })) }));
71
+ }, children: !_.isEmpty(tooltip) ? (_jsx(Tooltip, { content: tooltip, children: _jsx(ElementIcon, { ...iconProps, className: cn(s.icon, classNames.icon), style: styles.icon }) })) : (_jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx(ElementIcon, { ...iconProps, className: cn(s.icon, classNames.icon), style: styles.icon }) })) }));
72
72
  }
73
73
  catch (error) {
74
74
  return _jsx(_Fragment, {});
@@ -1,5 +1,38 @@
1
+ import { CSSProperties } from 'react';
1
2
  export type LoaderVariant = 'spinner' | 'dots' | 'bars' | 'pulse';
2
3
  export type LoaderSize = 'sm' | 'md' | 'lg';
4
+ export interface LoaderClassNames {
5
+ /** Custom className for the outer wrapper */
6
+ wrapper?: string;
7
+ /** Custom className for the loader container */
8
+ container?: string;
9
+ /** Custom className for the spinner element */
10
+ spinner?: string;
11
+ /** Custom className for the dot elements */
12
+ dot?: string;
13
+ /** Custom className for the bar elements */
14
+ bar?: string;
15
+ /** Custom className for the pulse element */
16
+ pulse?: string;
17
+ /** Custom className for the loading text */
18
+ text?: string;
19
+ }
20
+ export interface LoaderStyles {
21
+ /** Custom style for the outer wrapper */
22
+ wrapper?: CSSProperties;
23
+ /** Custom style for the loader container */
24
+ container?: CSSProperties;
25
+ /** Custom style for the spinner element */
26
+ spinner?: CSSProperties;
27
+ /** Custom style for the dot elements */
28
+ dot?: CSSProperties;
29
+ /** Custom style for the bar elements */
30
+ bar?: CSSProperties;
31
+ /** Custom style for the pulse element */
32
+ pulse?: CSSProperties;
33
+ /** Custom style for the loading text */
34
+ text?: CSSProperties;
35
+ }
3
36
  export interface LoadingAnimateSpinProps {
4
37
  /** Wrapper className for positioning */
5
38
  classWarper?: string;
@@ -21,8 +54,12 @@ export interface LoadingAnimateSpinProps {
21
54
  textFontSize?: string;
22
55
  /** Loading text to display below the spinner. If not provided, no text is shown. */
23
56
  loadingText?: string;
57
+ /** Custom classNames for component parts */
58
+ classNames?: LoaderClassNames;
59
+ /** Custom inline styles for component parts */
60
+ styles?: LoaderStyles;
24
61
  /** Accessibility label */
25
62
  'aria-label'?: string;
26
63
  }
27
- export declare const LoadingAnimateSpin: ({ classWarper, className, variant, size, color, borderWidth, width, height, textFontSize, loadingText, "aria-label": ariaLabel, }: LoadingAnimateSpinProps) => import("react/jsx-runtime").JSX.Element;
64
+ export declare const LoadingAnimateSpin: ({ classWarper, className, variant, size, color, borderWidth, width, height, textFontSize, loadingText, classNames, styles, "aria-label": ariaLabel, }: LoadingAnimateSpinProps) => import("react/jsx-runtime").JSX.Element;
28
65
  //# sourceMappingURL=loader.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Loader/loader.component.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wCAAwC;IACxC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,yGAAyG;IACzG,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IAC3E,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kHAAkH;IAClH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAqHD,eAAO,MAAM,kBAAkB,sIAY5B,uBAAuB,4CA8LzB,CAAC"}
1
+ {"version":3,"file":"loader.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Loader/loader.component.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAI3C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wCAAwC;IACxC,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,wCAAwC;IACxC,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,yCAAyC;IACzC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,wCAAwC;IACxC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wCAAwC;IACxC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,yGAAyG;IACzG,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IAC3E,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kHAAkH;IAClH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,+CAA+C;IAC/C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAuJD,eAAO,MAAM,kBAAkB,0JAc5B,uBAAuB,4CAkNzB,CAAC"}
@@ -105,56 +105,96 @@ const extractRgbForOpacity = (colorValue) => {
105
105
  // Default fallback to white
106
106
  return [255, 255, 255];
107
107
  };
108
- export const LoadingAnimateSpin = ({ classWarper = '', className = '', variant = 'spinner', size = 'md', color = 'blue', borderWidth = '10px', width, height, textFontSize = '1.125rem', loadingText, 'aria-label': ariaLabel = 'Loading', }) => {
108
+ // Helper to calculate proportional border width based on spinner size
109
+ // Default ratio: 10px border for 4rem (64px) spinner = ~15.6%
110
+ const calculateBorderWidth = (sizeValue, explicitBorderWidth) => {
111
+ // If explicit borderWidth is provided, use it
112
+ if (explicitBorderWidth) {
113
+ return explicitBorderWidth;
114
+ }
115
+ // Default border width if no size specified
116
+ if (!sizeValue) {
117
+ return '10px';
118
+ }
119
+ // Parse the size value to pixels
120
+ let sizeInPx;
121
+ if (sizeValue.endsWith('rem')) {
122
+ sizeInPx = parseFloat(sizeValue) * 16;
123
+ }
124
+ else if (sizeValue.endsWith('px')) {
125
+ sizeInPx = parseFloat(sizeValue);
126
+ }
127
+ else if (sizeValue.endsWith('em')) {
128
+ sizeInPx = parseFloat(sizeValue) * 16;
129
+ }
130
+ else {
131
+ // Fallback for unknown units
132
+ return '10px';
133
+ }
134
+ // Calculate proportional border (about 15.6% of size, min 2px, max 16px)
135
+ const borderPx = Math.max(2, Math.min(16, Math.round(sizeInPx * 0.156)));
136
+ return `${borderPx}px`;
137
+ };
138
+ export const LoadingAnimateSpin = ({ classWarper = '', className = '', variant = 'spinner', size = 'md', color = 'blue', borderWidth, width, height, textFontSize = '1.125rem', loadingText, classNames = {}, styles = {}, 'aria-label': ariaLabel = 'Loading', }) => {
109
139
  const sizeConfig = sizeClasses[size];
110
140
  const renderSpinner = () => {
111
141
  const colorValue = getColorValue(color);
112
142
  // Extract RGB values for opacity border - making it more subtle
113
143
  const [r, g, b] = extractRgbForOpacity(colorValue);
114
144
  const baseBorderColor = `rgba(${r}, ${g}, ${b}, 0.15)`;
115
- return (_jsxs("div", { className: cn(s['flex'], s['flex-col'], s['items-center'], s['justify-center'], className), "aria-label": ariaLabel, role: "status", children: [_jsx("div", { className: cn(sizeConfig.spinner, s['rounded-full'], s['animate-spin']), style: {
116
- ...(width ? { width } : {}),
117
- ...(height ? { height } : {}),
118
- borderWidth: borderWidth,
145
+ // Calculate spinner dimensions
146
+ const spinnerWidth = width || '4rem';
147
+ const spinnerHeight = height || '4rem';
148
+ // Calculate proportional border width based on spinner size
149
+ const calculatedBorderWidth = calculateBorderWidth(spinnerWidth, borderWidth);
150
+ return (_jsxs("div", { className: cn(s['flex'], s['flex-col'], s['items-center'], s['justify-center'], className, classNames.container), style: styles.container, "aria-label": ariaLabel, role: "status", children: [_jsx("div", { className: cn(sizeConfig.spinner, s['rounded-full'], s['animate-spin'], classNames.spinner), style: {
151
+ width: spinnerWidth,
152
+ height: spinnerHeight,
153
+ borderWidth: calculatedBorderWidth,
119
154
  borderStyle: 'solid',
120
155
  borderTopColor: colorValue,
121
156
  borderRightColor: colorValue,
122
157
  borderBottomColor: baseBorderColor,
123
158
  borderLeftColor: baseBorderColor,
124
159
  animation: 'spin 1s linear infinite',
125
- } }), loadingText && (_jsx("p", { className: cn(s['mt-4'], s['text-white'], s['text-lg'], s['font-semibold'], s['animate-pulse']), style: {
160
+ ...styles.spinner,
161
+ } }), loadingText && (_jsx("p", { className: cn(s['mt-4'], s['text-white'], s['text-lg'], s['font-semibold'], s['animate-pulse'], classNames.text), style: {
126
162
  marginTop: '1rem',
127
163
  color: colorValue,
128
164
  fontSize: textFontSize,
129
165
  fontWeight: 600,
130
166
  animation: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
167
+ ...styles.text,
131
168
  }, children: loadingText }))] }));
132
169
  };
133
170
  const renderDots = () => {
134
171
  const colorValue = getColorValue(color);
135
- return (_jsx("div", { className: cn(s['flex'], s['gap-2'], s['items-center'], className), "aria-label": ariaLabel, role: "status", children: [0, 1, 2].map((i) => (_jsx("div", { className: cn(sizeConfig.dots, s['rounded-full']), style: {
172
+ return (_jsx("div", { className: cn(s['flex'], s['gap-2'], s['items-center'], className, classNames.container), style: styles.container, "aria-label": ariaLabel, role: "status", children: [0, 1, 2].map((i) => (_jsx("div", { className: cn(sizeConfig.dots, s['rounded-full'], classNames.dot), style: {
136
173
  backgroundColor: colorValue,
137
174
  animation: `bounce 1.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite`,
138
175
  animationDelay: `${i * 0.16}s`,
139
176
  animationFillMode: 'both',
177
+ ...styles.dot,
140
178
  } }, i))) }));
141
179
  };
142
180
  const renderBars = () => {
143
181
  const colorValue = getColorValue(color);
144
- return (_jsx("div", { className: cn(s['flex'], s['gap-1'], s['items-center'], className), "aria-label": ariaLabel, role: "status", children: [0, 1, 2].map((i) => (_jsx("div", { className: cn(sizeConfig.bars, s.rounded), style: {
182
+ return (_jsx("div", { className: cn(s['flex'], s['gap-1'], s['items-center'], className, classNames.container), style: styles.container, "aria-label": ariaLabel, role: "status", children: [0, 1, 2].map((i) => (_jsx("div", { className: cn(sizeConfig.bars, s.rounded, classNames.bar), style: {
145
183
  backgroundColor: colorValue,
146
184
  borderRadius: '0.125rem',
147
185
  animation: `pulse 1.2s ease-in-out infinite`,
148
186
  animationDelay: `${i * 0.15}s`,
149
187
  animationFillMode: 'both',
188
+ ...styles.bar,
150
189
  } }, i))) }));
151
190
  };
152
191
  const renderPulse = () => {
153
192
  const colorValue = getColorValue(color);
154
- return (_jsx("div", { className: cn(sizeConfig.pulse, s['rounded-full'], className), style: {
193
+ return (_jsx("div", { className: cn(sizeConfig.pulse, s['rounded-full'], className, classNames.pulse), style: {
155
194
  backgroundColor: colorValue,
156
195
  animation: `pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`,
157
196
  animationFillMode: 'both',
197
+ ...styles.pulse,
158
198
  }, "aria-label": ariaLabel, role: "status" }));
159
199
  };
160
200
  const renderLoader = () => {
@@ -170,7 +210,7 @@ export const LoadingAnimateSpin = ({ classWarper = '', className = '', variant =
170
210
  return renderSpinner();
171
211
  }
172
212
  };
173
- return (_jsxs("div", { className: cn(s['absolute'], s['inset-0'], s['flex'], s['justify-center'], s['items-center'], classWarper), children: [_jsx("style", { children: `
213
+ return (_jsxs("div", { className: cn(s['flex'], s['justify-center'], s['items-center'], classWarper, classNames.wrapper), style: styles.wrapper, children: [_jsx("style", { children: `
174
214
  @keyframes spin {
175
215
  from {
176
216
  transform: rotate(0deg);
@@ -1,6 +1,42 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
3
  export type ModalPosition = 'center' | 'top' | 'bottom';
4
+ export interface ModalClassNames {
5
+ /** Custom className for the overlay */
6
+ overlay?: string;
7
+ /** Custom className for the modal container */
8
+ container?: string;
9
+ /** Custom className for the modal wrapper */
10
+ wrapper?: string;
11
+ /** Custom className for the modal content */
12
+ content?: string;
13
+ /** Custom className for the header */
14
+ header?: string;
15
+ /** Custom className for the title */
16
+ title?: string;
17
+ /** Custom className for the close button */
18
+ closeButton?: string;
19
+ /** Custom className for the body/children container */
20
+ body?: string;
21
+ }
22
+ export interface ModalStyles {
23
+ /** Custom style for the overlay */
24
+ overlay?: CSSProperties;
25
+ /** Custom style for the modal container */
26
+ container?: CSSProperties;
27
+ /** Custom style for the modal wrapper */
28
+ wrapper?: CSSProperties;
29
+ /** Custom style for the modal content */
30
+ content?: CSSProperties;
31
+ /** Custom style for the header */
32
+ header?: CSSProperties;
33
+ /** Custom style for the title */
34
+ title?: CSSProperties;
35
+ /** Custom style for the close button */
36
+ closeButton?: CSSProperties;
37
+ /** Custom style for the body/children container */
38
+ body?: CSSProperties;
39
+ }
4
40
  export interface ModalProps {
5
41
  /** Controls modal visibility */
6
42
  visible: boolean;
@@ -54,8 +90,12 @@ export interface ModalProps {
54
90
  headerPadding?: string;
55
91
  /** Animation duration (in ms) */
56
92
  animationDuration?: number;
93
+ /** Custom classNames for component parts */
94
+ classNames?: ModalClassNames;
95
+ /** Custom inline styles for component parts */
96
+ styles?: ModalStyles;
57
97
  /** Modal content */
58
98
  children: React.ReactNode;
59
99
  }
60
- export declare const Modal: ({ visible, title, className, contentClassName, headerClassName, style, contentStyle, onClose, isAutoClose, autoCloseDelay, size, position, showCloseButton, closeButton, overlayOpacity, overlayColor, closeOnOverlayClick, closeOnEscape, showHeader, headerBgColor, headerTextColor, borderRadius, maxWidth, contentPadding, headerPadding, animationDuration, children, }: ModalProps) => JSX.Element | null;
100
+ export declare const Modal: ({ visible, title, className, contentClassName, headerClassName, style, contentStyle, onClose, isAutoClose, autoCloseDelay, size, position, showCloseButton, closeButton, overlayOpacity, overlayColor, closeOnOverlayClick, closeOnEscape, showHeader, headerBgColor, headerTextColor, borderRadius, maxWidth, contentPadding, headerPadding, animationDuration, classNames, styles, children, }: ModalProps) => JSX.Element | null;
61
101
  //# sourceMappingURL=modal.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Modal/BasicModal/modal.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,UAAU;IACzB,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,0CAA0C;IAC1C,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,6BAA6B;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kCAAkC;IAClC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,0BAA0B;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wBAAwB;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK,iXA4Bf,UAAU,KAAG,WAAW,GAAG,IAmP7B,CAAC"}
1
+ {"version":3,"file":"modal.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Modal/BasicModal/modal.component.tsx"],"names":[],"mappings":"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"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useEffect, useState } from 'react';
3
3
  import s from '../../../tc.module.css';
4
4
  import { cn } from '../../../utils';
5
- export const Modal = ({ visible, title = '', className = '', contentClassName = '', headerClassName = '', style = {}, contentStyle = {}, onClose, isAutoClose = false, autoCloseDelay = 1000, size = 'md', position = 'center', showCloseButton = true, closeButton, overlayOpacity = 0.5, overlayColor, closeOnOverlayClick = true, closeOnEscape = true, showHeader = true, headerBgColor, headerTextColor, borderRadius = '0.5rem', maxWidth, contentPadding = '1rem', headerPadding = '1rem', animationDuration = 300, children, }) => {
5
+ export const Modal = ({ visible, title = '', className = '', contentClassName = '', headerClassName = '', style = {}, contentStyle = {}, onClose, isAutoClose = false, autoCloseDelay = 1000, size = 'md', position = 'center', showCloseButton = true, closeButton, overlayOpacity = 0.5, overlayColor, closeOnOverlayClick = true, closeOnEscape = true, showHeader = true, headerBgColor, headerTextColor, borderRadius = '0.5rem', maxWidth, contentPadding = '1rem', headerPadding = '1rem', animationDuration = 300, classNames = {}, styles = {}, children, }) => {
6
6
  const [showModal, setShowModal] = useState(visible);
7
7
  const [isAnimating, setIsAnimating] = useState(false);
8
8
  useEffect(() => {
@@ -58,15 +58,17 @@ export const Modal = ({ visible, title = '', className = '', contentClassName =
58
58
  const modalMaxWidth = maxWidth || (size !== 'full' ? sizeMaxWidths[size] : '95%');
59
59
  if (!showModal)
60
60
  return null;
61
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: cn(s['fixed'], s['inset-0'], s['z-40'], s['bg-black']), style: {
61
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: cn(s['fixed'], s['inset-0'], s['z-40'], s['bg-black'], classNames.overlay), style: {
62
62
  opacity: isAnimating ? overlayOpacity : 0,
63
63
  transition: `opacity ${animationDuration}ms ease-in-out`,
64
64
  backgroundColor: overlayColor || undefined,
65
- }, onClick: handleOverlayClick }), _jsx("div", { className: cn(s['flex'], s['justify-center'], positionClasses[position], s['overflow-x-hidden'], s['overflow-y-auto'], s['fixed'], s['inset-0'], s['z-50'], s['outline-none'], s['focus:outline-none'], className), style: {
65
+ ...styles.overlay,
66
+ }, onClick: handleOverlayClick }), _jsx("div", { className: cn(s['flex'], s['justify-center'], positionClasses[position], s['overflow-x-hidden'], s['overflow-y-auto'], s['fixed'], s['inset-0'], s['z-50'], s['outline-none'], s['focus:outline-none'], className, classNames.container), style: {
66
67
  ...style,
67
68
  transition: `opacity ${animationDuration}ms ease-in-out`,
68
69
  opacity: isAnimating ? 1 : 0,
69
- }, onClick: handleOverlayClick, children: _jsx("div", { className: cn(s['relative'], s['w-full'], s['my-5'], s['mx-auto']), style: {
70
+ ...styles.container,
71
+ }, onClick: handleOverlayClick, children: _jsx("div", { className: cn(s['relative'], s['w-full'], s['my-5'], s['mx-auto'], classNames.wrapper), style: {
70
72
  maxWidth: modalMaxWidth,
71
73
  marginLeft: size === 'full' ? '1rem' : undefined,
72
74
  marginRight: size === 'full' ? '1rem' : undefined,
@@ -83,18 +85,22 @@ export const Modal = ({ visible, title = '', className = '', contentClassName =
83
85
  : 'translateY(20px)',
84
86
  transition: `transform ${animationDuration}ms ease-out, opacity ${animationDuration}ms ease-out`,
85
87
  opacity: isAnimating ? 1 : 0,
86
- }, onClick: (e) => e.stopPropagation(), children: _jsxs("div", { className: cn(s['border-0'], s['shadow-xl'], s['relative'], s['flex'], s['flex-col'], s['bg-white'], s['outline-none'], s['focus:outline-none'], contentClassName), style: {
88
+ ...styles.wrapper,
89
+ }, onClick: (e) => e.stopPropagation(), children: _jsxs("div", { className: cn(s['border-0'], s['shadow-xl'], s['relative'], s['flex'], s['flex-col'], s['bg-white'], s['outline-none'], s['focus:outline-none'], contentClassName, classNames.content), style: {
87
90
  borderRadius,
88
91
  ...contentStyle,
89
- }, children: [showHeader && (_jsxs("div", { className: cn(s['flex'], s['items-center'], s['justify-between'], s['border-b'], s['border-solid'], s['border-gray-200'], headerClassName), style: {
92
+ ...styles.content,
93
+ }, children: [showHeader && (_jsxs("div", { className: cn(s['flex'], s['items-center'], s['justify-between'], s['border-b'], s['border-solid'], s['border-gray-200'], headerClassName, classNames.header), style: {
90
94
  padding: headerPadding,
91
95
  backgroundColor: headerBgColor,
92
96
  borderTopLeftRadius: borderRadius,
93
97
  borderTopRightRadius: borderRadius,
94
98
  borderBottom: title || showCloseButton ? undefined : 'none',
95
- }, children: [title && (_jsx("h3", { className: cn(s['text-xl'], s['font-semibold'], s['m-0'], s['flex-1']), style: { color: headerTextColor }, children: title })), showCloseButton && (_jsx("button", { type: "button", className: cn(s['p-1'], s['ml-4'], s['border-0'], s['bg-transparent'], s['cursor-pointer'], s['outline-none'], s['focus:outline-none'], s['transition-colors'], s['hover:bg-gray-100'], s['rounded']), onClick: handleClose, "aria-label": "Close modal", style: {
99
+ ...styles.header,
100
+ }, children: [title && (_jsx("h3", { className: cn(s['text-xl'], s['font-semibold'], s['m-0'], s['flex-1'], classNames.title), style: { color: headerTextColor, ...styles.title }, children: title })), showCloseButton && (_jsx("button", { type: "button", className: cn(s['p-1'], s['ml-4'], s['border-0'], s['bg-transparent'], s['cursor-pointer'], s['outline-none'], s['focus:outline-none'], s['transition-colors'], s['hover:bg-gray-100'], s['rounded'], classNames.closeButton), onClick: handleClose, "aria-label": "Close modal", style: {
96
101
  marginLeft: title ? '1rem' : 0,
97
102
  marginRight: title ? 0 : 'auto',
103
+ ...styles.closeButton,
98
104
  }, children: closeButton || (_jsx("span", { className: cn(s['block'], s['text-2xl'], s['leading-none'], s['font-light']), style: {
99
105
  color: headerTextColor || '#1f2937',
100
106
  height: '1.5rem',
@@ -103,7 +109,8 @@ export const Modal = ({ visible, title = '', className = '', contentClassName =
103
109
  alignItems: 'center',
104
110
  justifyContent: 'center',
105
111
  lineHeight: 1,
106
- }, children: "\u00D7" })) }))] })), _jsx("div", { className: cn(s['flex'], s['flex-col'], s['w-full'], s['h-auto'], s['overflow-y-auto']), style: {
112
+ }, children: "\u00D7" })) }))] })), _jsx("div", { className: cn(s['flex'], s['flex-col'], s['w-full'], s['h-auto'], s['overflow-y-auto'], classNames.body), style: {
107
113
  padding: contentPadding,
114
+ ...styles.body,
108
115
  }, children: children })] }) }) })] }));
109
116
  };
@@ -1,4 +1,52 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
+ export interface ModalConfirmClassNames {
3
+ /** Custom className for the overlay */
4
+ overlay?: string;
5
+ /** Custom className for the container */
6
+ container?: string;
7
+ /** Custom className for the modal wrapper */
8
+ wrapper?: string;
9
+ /** Custom className for the content */
10
+ content?: string;
11
+ /** Custom className for the header */
12
+ header?: string;
13
+ /** Custom className for the title */
14
+ title?: string;
15
+ /** Custom className for the close button */
16
+ closeButton?: string;
17
+ /** Custom className for the body */
18
+ body?: string;
19
+ /** Custom className for the footer */
20
+ footer?: string;
21
+ /** Custom className for the cancel button */
22
+ cancelButton?: string;
23
+ /** Custom className for the submit button */
24
+ submitButton?: string;
25
+ }
26
+ export interface ModalConfirmStyles {
27
+ /** Custom style for the overlay */
28
+ overlay?: CSSProperties;
29
+ /** Custom style for the container */
30
+ container?: CSSProperties;
31
+ /** Custom style for the modal wrapper */
32
+ wrapper?: CSSProperties;
33
+ /** Custom style for the content */
34
+ content?: CSSProperties;
35
+ /** Custom style for the header */
36
+ header?: CSSProperties;
37
+ /** Custom style for the title */
38
+ title?: CSSProperties;
39
+ /** Custom style for the close button */
40
+ closeButton?: CSSProperties;
41
+ /** Custom style for the body */
42
+ body?: CSSProperties;
43
+ /** Custom style for the footer */
44
+ footer?: CSSProperties;
45
+ /** Custom style for the cancel button */
46
+ cancelButton?: CSSProperties;
47
+ /** Custom style for the submit button */
48
+ submitButton?: CSSProperties;
49
+ }
2
50
  export interface ModalConfirmProps {
3
51
  visible: boolean;
4
52
  title?: string;
@@ -7,8 +55,12 @@ export interface ModalConfirmProps {
7
55
  closeTitle?: string;
8
56
  isClick?: boolean;
9
57
  isClose?: boolean;
58
+ /** Custom classNames for component parts */
59
+ classNames?: ModalConfirmClassNames;
60
+ /** Custom inline styles for component parts */
61
+ styles?: ModalConfirmStyles;
10
62
  onClick: () => void;
11
63
  onClose: () => void;
12
64
  }
13
- export declare const ModalConfirm: ({ visible, title, message, submitTitle, closeTitle, isClick, isClose, onClick, onClose, }: ModalConfirmProps) => import("react/jsx-runtime").JSX.Element;
65
+ export declare const ModalConfirm: ({ visible, title, message, submitTitle, closeTitle, isClick, isClose, classNames, styles, onClick, onClose, }: ModalConfirmProps) => import("react/jsx-runtime").JSX.Element;
14
66
  //# sourceMappingURL=modal-confirm.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-confirm.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,8FAUtB,iBAAiB,4CA0LnB,CAAC"}
1
+ {"version":3,"file":"modal-confirm.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAsB,aAAa,EAAC,MAAM,OAAO,CAAC;AAMhE,MAAM,WAAW,sBAAsB;IACrC,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,mCAAmC;IACnC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,qCAAqC;IACrC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,yCAAyC;IACzC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,mCAAmC;IACnC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,kCAAkC;IAClC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iCAAiC;IACjC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,gCAAgC;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,kCAAkC;IAClC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,yCAAyC;IACzC,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,yCAAyC;IACzC,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,+CAA+C;IAC/C,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,kHAYtB,iBAAiB,4CAwMnB,CAAC"}
@@ -3,19 +3,19 @@ import { useEffect, useState } from 'react';
3
3
  import { Container } from 'reactstrap';
4
4
  import s from '../../../tc.module.css';
5
5
  import { cn } from '../../../utils';
6
- export const ModalConfirm = ({ visible = false, title = 'Confirm', message, submitTitle = 'Send', closeTitle = 'Close', isClick = true, isClose = true, onClick, onClose, }) => {
6
+ export const ModalConfirm = ({ visible = false, title = 'Confirm', message, submitTitle = 'Send', closeTitle = 'Close', isClick = true, isClose = true, classNames = {}, styles = {}, onClick, onClose, }) => {
7
7
  const [showModal, setShowModal] = useState(visible);
8
8
  useEffect(() => {
9
9
  setShowModal(visible);
10
10
  // eslint-disable-next-line react-hooks/exhaustive-deps
11
11
  }, [visible]);
12
- return (_jsx(_Fragment, { children: _jsx(Container, { children: showModal && (_jsxs(_Fragment, { children: [_jsx("div", { className: cn(s['flex'], s['justify-center'], s['items-center'], s['overflow-x-hidden'], s['overflow-y-auto'], s['fixed'], s['inset-0'], s['z-50'], s['outline-none'], s['focus:outline-none']), children: _jsx("div", { className: cn(s['relative'], s['my-6'], s['mx-auto']), children: _jsxs("div", { className: cn(s['border-0'], s['rounded-lg'], s['shadow-lg'], s['relative'], s['flex'], s['flex-col'], s['w-fit'], s['min-w-80'], s['bg-white'], s['outline-none'], s['focus:outline-none']), children: [_jsxs("div", { className: cn(s['flex'], s['items-center'], s['justify-between'], s['p-2'], s['border-b'], s['border-solid'], s['border-gray-300'], s['rounded-t']), children: [_jsx("h3", { className: cn(s['text-2xl'], s['font-semibold']), children: title }), _jsx("button", { className: cn(s['p-1'], s['border-0'], s['text-black'], s['opacity-1'], s['ml-6'], s['float-right'], s['text-3xl'], s['leading-none'], s['font-semibold'], s['outline-none'], s['focus:outline-none']), onClick: () => {
12
+ return (_jsx(_Fragment, { children: _jsx(Container, { children: showModal && (_jsxs(_Fragment, { children: [_jsx("div", { className: cn(s['flex'], s['justify-center'], s['items-center'], s['overflow-x-hidden'], s['overflow-y-auto'], s['fixed'], s['inset-0'], s['z-50'], s['outline-none'], s['focus:outline-none'], classNames.container), style: styles.container, children: _jsx("div", { className: cn(s['relative'], s['my-6'], s['mx-auto'], classNames.wrapper), style: styles.wrapper, children: _jsxs("div", { className: cn(s['border-0'], s['rounded-lg'], s['shadow-lg'], s['relative'], s['flex'], s['flex-col'], s['w-fit'], s['min-w-80'], s['bg-white'], s['outline-none'], s['focus:outline-none'], classNames.content), style: styles.content, children: [_jsxs("div", { className: cn(s['flex'], s['items-center'], s['justify-between'], s['p-2'], s['border-b'], s['border-solid'], s['border-gray-300'], s['rounded-t'], classNames.header), style: styles.header, children: [_jsx("h3", { className: cn(s['text-2xl'], s['font-semibold'], classNames.title), style: styles.title, children: title }), _jsx("button", { className: cn(s['p-1'], s['border-0'], s['text-black'], s['opacity-1'], s['ml-6'], s['float-right'], s['text-3xl'], s['leading-none'], s['font-semibold'], s['outline-none'], s['focus:outline-none'], classNames.closeButton), style: styles.closeButton, onClick: () => {
13
13
  setShowModal(false);
14
14
  onClose && onClose();
15
- }, children: _jsx("span", { className: cn(s['text-black'], s['h-6'], s['w-6'], s['text-2xl'], s['block'], s['outline-none'], s['focus:outline-none']), children: "\u00D7" }) })] }), _jsx("div", { className: cn(s['flex'], s['p-2']), children: _jsx("div", { className: cn(s['flex']), children: typeof message === 'string' ? (_jsx("span", { className: cn(s['text-md']), children: message })) : (message) }) }), _jsxs("div", { className: cn(s['flex'], s['items-center'], s['justify-end'], s['p-2'], s['border-t'], s['border-solid'], s['border-gray-300'], s['rounded-b']), children: [isClose && (_jsx("button", { className: cn(s['text-red-500'], s['background-transparent'], s['font-bold'], s['uppercase'], s['p-2'], s['text-sm'], s['outline-none'], s['focus:outline-none'], s['mr-1'], s['mb-1']), type: "button", style: { transition: 'all .15s ease' }, onClick: () => {
15
+ }, children: _jsx("span", { className: cn(s['text-black'], s['h-6'], s['w-6'], s['text-2xl'], s['block'], s['outline-none'], s['focus:outline-none']), children: "\u00D7" }) })] }), _jsx("div", { className: cn(s['flex'], s['p-2'], classNames.body), style: styles.body, children: _jsx("div", { className: cn(s['flex']), children: typeof message === 'string' ? (_jsx("span", { className: cn(s['text-md']), children: message })) : (message) }) }), _jsxs("div", { className: cn(s['flex'], s['items-center'], s['justify-end'], s['p-2'], s['border-t'], s['border-solid'], s['border-gray-300'], s['rounded-b'], classNames.footer), style: styles.footer, children: [isClose && (_jsx("button", { className: cn(s['text-red-500'], s['background-transparent'], s['font-bold'], s['uppercase'], s['p-2'], s['text-sm'], s['outline-none'], s['focus:outline-none'], s['mr-1'], s['mb-1'], classNames.cancelButton), type: "button", style: { transition: 'all .15s ease', ...styles.cancelButton }, onClick: () => {
16
16
  setShowModal(false);
17
17
  onClose && onClose();
18
- }, children: closeTitle })), isClick && (_jsx("button", { className: cn(s['bg-green-500'], s['text-white'], s['active:bg-green-600'], s['font-bold'], s['uppercase'], s['text-sm'], s['p-2'], s['rounded'], s['shadow'], s['hover:shadow-lg'], s['outline-none'], s['focus:outline-none'], s['mr-1'], s['mb-1']), type: "button", style: { transition: 'all .15s ease' }, onClick: () => {
18
+ }, children: closeTitle })), isClick && (_jsx("button", { className: cn(s['bg-green-500'], s['text-white'], s['active:bg-green-600'], s['font-bold'], s['uppercase'], s['text-sm'], s['p-2'], s['rounded'], s['shadow'], s['hover:shadow-lg'], s['outline-none'], s['focus:outline-none'], s['mr-1'], s['mb-1'], classNames.submitButton), type: "button", style: { transition: 'all .15s ease', ...styles.submitButton }, onClick: () => {
19
19
  onClick();
20
- }, children: submitTitle }))] })] }) }) }), _jsx("div", { className: cn(s['opacity-25'], s['fixed'], s['inset-0'], s['z-40'], s['bg-black']) })] })) }) }));
20
+ }, children: submitTitle }))] })] }) }) }), _jsx("div", { className: cn(s['opacity-25'], s['fixed'], s['inset-0'], s['z-40'], s['bg-black'], classNames.overlay), style: styles.overlay })] })) }) }));
21
21
  };
@@ -1,6 +1,28 @@
1
+ import { CSSProperties } from 'react';
1
2
  import './color-picker.css';
2
- export declare const ColorPicker: ({ color, onChange }: {
3
- color: any;
4
- onChange: any;
5
- }) => import("react/jsx-runtime").JSX.Element;
3
+ export interface ColorPickerClassNames {
4
+ /** Custom className for the picker container */
5
+ container?: string;
6
+ /** Custom className for the color swatch */
7
+ swatch?: string;
8
+ /** Custom className for the popover */
9
+ popover?: string;
10
+ }
11
+ export interface ColorPickerStyles {
12
+ /** Custom style for the picker container */
13
+ container?: CSSProperties;
14
+ /** Custom style for the color swatch */
15
+ swatch?: CSSProperties;
16
+ /** Custom style for the popover */
17
+ popover?: CSSProperties;
18
+ }
19
+ export interface ColorPickerProps {
20
+ color: string;
21
+ onChange: (color: string) => void;
22
+ /** Custom classNames for component parts */
23
+ classNames?: ColorPickerClassNames;
24
+ /** Custom inline styles for component parts */
25
+ styles?: ColorPickerStyles;
26
+ }
27
+ export declare const ColorPicker: ({ color, onChange, classNames, styles }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
6
28
  //# sourceMappingURL=color-picker.component.d.ts.map