react-restyle-components 0.4.12 → 0.4.14

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 (78) 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/AccordionSection/elements.js +71 -20
  4. package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts +22 -2
  5. package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts.map +1 -1
  6. package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.js +2 -2
  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 +58 -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.d.ts.map +1 -1
  9. 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
  10. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts +26 -1
  11. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts.map +1 -1
  12. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.js +11 -11
  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 +28 -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.d.ts.map +1 -1
  15. 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
  16. package/lib/src/core-components/src/components/Avatar/Avatar.d.ts +25 -1
  17. package/lib/src/core-components/src/components/Avatar/Avatar.d.ts.map +1 -1
  18. package/lib/src/core-components/src/components/Avatar/Avatar.js +4 -4
  19. package/lib/src/core-components/src/components/Badge/Badge.d.ts +17 -3
  20. package/lib/src/core-components/src/components/Badge/Badge.d.ts.map +1 -1
  21. package/lib/src/core-components/src/components/Badge/Badge.js +2 -2
  22. package/lib/src/core-components/src/components/Button1/button.component.d.ts +13 -2
  23. package/lib/src/core-components/src/components/Button1/button.component.d.ts.map +1 -1
  24. package/lib/src/core-components/src/components/Button1/button.component.js +2 -2
  25. package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.d.ts +18 -4
  26. package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.d.ts.map +1 -1
  27. package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.js +1 -1
  28. package/lib/src/core-components/src/components/Icon/Icon.d.ts +27 -12
  29. package/lib/src/core-components/src/components/Icon/Icon.d.ts.map +1 -1
  30. package/lib/src/core-components/src/components/Icon/Icon.js +8 -8
  31. package/lib/src/core-components/src/components/Loader/loader.component.d.ts +38 -1
  32. package/lib/src/core-components/src/components/Loader/loader.component.d.ts.map +1 -1
  33. package/lib/src/core-components/src/components/Loader/loader.component.js +12 -7
  34. package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.d.ts +42 -2
  35. package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.d.ts.map +1 -1
  36. package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.js +15 -8
  37. package/lib/src/core-components/src/components/Modal/ModalDocxContent/gemini.service.d.ts +4 -0
  38. package/lib/src/core-components/src/components/Modal/ModalDocxContent/gemini.service.d.ts.map +1 -0
  39. package/lib/src/core-components/src/components/Modal/ModalDocxContent/gemini.service.js +70 -0
  40. package/lib/src/core-components/src/components/Modal/ModalDocxContent/modal-docx-content.component.d.ts +43 -0
  41. package/lib/src/core-components/src/components/Modal/ModalDocxContent/modal-docx-content.component.d.ts.map +1 -0
  42. package/lib/src/core-components/src/components/Modal/ModalDocxContent/modal-docx-content.component.js +841 -0
  43. package/lib/src/core-components/src/components/Modal/index.d.ts +1 -0
  44. package/lib/src/core-components/src/components/Modal/index.d.ts.map +1 -1
  45. package/lib/src/core-components/src/components/Modal/index.js +1 -0
  46. package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.d.ts +54 -2
  47. package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.d.ts.map +1 -1
  48. package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.js +5 -5
  49. package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.d.ts +26 -4
  50. package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.d.ts.map +1 -1
  51. package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.js +2 -2
  52. package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.d.ts +42 -1
  53. package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.d.ts.map +1 -1
  54. package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.js +4 -4
  55. package/lib/src/core-components/src/components/Selection/single-select/single-select.component.d.ts +38 -2
  56. package/lib/src/core-components/src/components/Selection/single-select/single-select.component.d.ts.map +1 -1
  57. package/lib/src/core-components/src/components/Selection/single-select/single-select.component.js +8 -6
  58. package/lib/src/core-components/src/components/Stepper2/stepper.component.d.ts +38 -2
  59. package/lib/src/core-components/src/components/Stepper2/stepper.component.d.ts.map +1 -1
  60. package/lib/src/core-components/src/components/Stepper2/stepper.component.js +12 -7
  61. package/lib/src/core-components/src/components/Tabs/tabs.component.d.ts +33 -3
  62. package/lib/src/core-components/src/components/Tabs/tabs.component.d.ts.map +1 -1
  63. package/lib/src/core-components/src/components/Tabs/tabs.component.js +8 -5
  64. package/lib/src/core-components/src/components/Tags1/Tags.component.d.ts +46 -1
  65. package/lib/src/core-components/src/components/Tags1/Tags.component.d.ts.map +1 -1
  66. package/lib/src/core-components/src/components/Tags1/Tags.component.js +5 -5
  67. package/lib/src/core-components/src/components/Tooltip/tooltip.component.d.ts +21 -2
  68. package/lib/src/core-components/src/components/Tooltip/tooltip.component.d.ts.map +1 -1
  69. package/lib/src/core-components/src/components/Tooltip/tooltip.component.js +2 -2
  70. package/lib/src/core-components/src/tc.global.css +4 -2
  71. package/lib/src/core-components/src/tc.module.css +2 -2
  72. package/lib/src/core-components/src/utils/index.d.ts +1 -0
  73. package/lib/src/core-components/src/utils/index.d.ts.map +1 -1
  74. package/lib/src/core-components/src/utils/index.js +1 -0
  75. package/lib/src/core-components/src/utils/jodit-editor-config.util.d.ts +189 -0
  76. package/lib/src/core-components/src/utils/jodit-editor-config.util.d.ts.map +1 -0
  77. package/lib/src/core-components/src/utils/jodit-editor-config.util.js +333 -0
  78. package/package.json +3 -1
@@ -147,7 +147,7 @@ const getContrastColor = (backgroundColor) => {
147
147
  return darkColors.includes(backgroundColor) ? '#ffffff' : '#ffffff';
148
148
  };
149
149
  // Main Avatar component
150
- export const Avatar = ({ name = '', initials, src, alt, size = 'md', backgroundColor, textColor, iconName = 'FaUser', className, onClick, }) => {
150
+ export const Avatar = ({ name = '', initials, src, alt, size = 'md', backgroundColor, textColor, iconName = 'FaUser', className, classNames = {}, styles = {}, onClick, }) => {
151
151
  // Determine what to display
152
152
  const displayInitials = initials || getInitials(name);
153
153
  const defaultBgColor = backgroundColor ||
@@ -155,14 +155,14 @@ export const Avatar = ({ name = '', initials, src, alt, size = 'md', backgroundC
155
155
  const defaultTextColor = textColor || getContrastColor(defaultBgColor);
156
156
  // Render image if src is provided
157
157
  if (src) {
158
- return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: className, onClick: onClick, title: name || alt, children: _jsx(AvatarImage, { src: src, alt: alt || name || 'Avatar' }) }));
158
+ return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: `${className || ''} ${classNames.container || ''}`, style: styles.container, onClick: onClick, title: name || alt, children: _jsx(AvatarImage, { src: src, alt: alt || name || 'Avatar', className: classNames.image, style: styles.image }) }));
159
159
  }
160
160
  // Render initials if name or initials are provided
161
161
  if (displayInitials) {
162
- return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: className, onClick: onClick, title: name || `${displayInitials} Avatar`, children: _jsx(InitialsText, { "$size": size, children: displayInitials }) }));
162
+ return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: `${className || ''} ${classNames.container || ''}`, style: styles.container, onClick: onClick, title: name || `${displayInitials} Avatar`, children: _jsx(InitialsText, { "$size": size, className: classNames.initials, style: styles.initials, children: displayInitials }) }));
163
163
  }
164
164
  // Render icon as fallback
165
- return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: className, onClick: onClick, title: "User Avatar", children: _jsx(IconWrapper, { "$size": size, children: _jsx(Icon, { nameIcon: iconName, propsIcon: {
165
+ return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: `${className || ''} ${classNames.container || ''}`, style: styles.container, onClick: onClick, title: "User Avatar", children: _jsx(IconWrapper, { "$size": size, className: classNames.iconWrapper, style: styles.iconWrapper, children: _jsx(Icon, { nameIcon: iconName, propsIcon: {
166
166
  color: defaultTextColor,
167
167
  size: '100%',
168
168
  } }) }) }));
@@ -1,9 +1,23 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { BadgeProps } from './types';
3
- export declare const Badge: React.NamedExoticComponent<Omit<BadgeProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
3
+ export interface BadgeClassNames {
4
+ /** Custom className for the badge container */
5
+ container?: string;
6
+ }
7
+ export interface BadgeStyles {
8
+ /** Custom style for the badge container */
9
+ container?: CSSProperties;
10
+ }
11
+ export declare const Badge: React.NamedExoticComponent<Omit<BadgeProps & {
12
+ classNames?: BadgeClassNames | undefined;
13
+ styles?: BadgeStyles | undefined;
14
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & {
4
15
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
5
16
  }> & {
6
- readonly type: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
17
+ readonly type: React.ForwardRefExoticComponent<BadgeProps & {
18
+ classNames?: BadgeClassNames | undefined;
19
+ styles?: BadgeStyles | undefined;
20
+ } & React.RefAttributes<HTMLDivElement>>;
7
21
  } & {
8
22
  Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
9
23
  children?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAqDnC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEhB,CAAC"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAKnC,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAoDD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEhB,CAAC"}
@@ -9,7 +9,7 @@ const BadgeContainer = styled.div `
9
9
  width: min-content;
10
10
  display: inline-block;
11
11
  `;
12
- const BadgeComponent = React.forwardRef(({ size = 'hint', overlap = 'circular', children, position = 'bottom-right', variant = 'notification', iconSrc, count, 'aria-label': ariaLabel, ...props }, ref) => {
12
+ const BadgeComponent = React.forwardRef(({ size = 'hint', overlap = 'circular', children, position = 'bottom-right', variant = 'notification', iconSrc, count, 'aria-label': ariaLabel, classNames = {}, styles = {}, ...props }, ref) => {
13
13
  // Generate accessible label for the badge
14
14
  const badgeAriaLabel = useMemo(() => {
15
15
  if (ariaLabel)
@@ -20,7 +20,7 @@ const BadgeComponent = React.forwardRef(({ size = 'hint', overlap = 'circular',
20
20
  return `${count} notifications`;
21
21
  return undefined;
22
22
  }, [ariaLabel, count]);
23
- return (_jsxs(BadgeContainer, { ref: ref, "data-aui": "badge", ...props, children: [_jsx(InnerBadge, { position: position, size: size, overlap: overlap, variant: variant, iconSrc: iconSrc, count: count, "aria-label": badgeAriaLabel }), children] }));
23
+ return (_jsxs(BadgeContainer, { ref: ref, "data-aui": "badge", className: classNames.container, style: styles.container, ...props, children: [_jsx(InnerBadge, { position: position, size: size, overlap: overlap, variant: variant, iconSrc: iconSrc, count: count, "aria-label": badgeAriaLabel }), children] }));
24
24
  });
25
25
  BadgeComponent.displayName = 'Badge';
26
26
  export const Badge = attachSubComponents('Badge', memo(BadgeComponent), {
@@ -1,4 +1,15 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { ButtonProps } from './types';
3
- export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
3
+ export interface ButtonClassNames {
4
+ /** Custom className for the button element */
5
+ button?: string;
6
+ }
7
+ export interface ButtonStyles {
8
+ /** Custom style for the button element */
9
+ button?: CSSProperties;
10
+ }
11
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & {
12
+ classNames?: ButtonClassNames | undefined;
13
+ styles?: ButtonStyles | undefined;
14
+ } & React.RefAttributes<HTMLButtonElement>>;
4
15
  //# sourceMappingURL=button.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Button1/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAKpC,eAAO,MAAM,MAAM,uIA0DlB,CAAC"}
1
+ {"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Button1/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAKpC,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,eAAO,MAAM,MAAM;;;2CAiElB,CAAC"}
@@ -3,11 +3,11 @@ import { forwardRef } from 'react';
3
3
  import { Tooltip } from '../Tooltip/tooltip.component';
4
4
  import s from '../../tc.module.css';
5
5
  import { cn } from '../../utils';
6
- export const Button = forwardRef(({ variant = 'solid', tooltip, disabled = false, type = 'button', className, children, ...args }, ref) => {
6
+ export const Button = forwardRef(({ variant = 'solid', tooltip, disabled = false, type = 'button', className, classNames = {}, styles = {}, children, ...args }, ref) => {
7
7
  const buttonColorClass = variant === 'solid'
8
8
  ? cn(s['text-white'], s['bg-[#007BFF]'], s['hover:bg-[#007BFF]'], s['hover:shadow-lg'], s['text-white'])
9
9
  : cn(s['dark:text-white'], s['text-black'], s['border'], s['border-gray-400'], s['hover:shadow-lg']);
10
- const button = (_jsx("button", { ref: ref, ...args, className: cn(s['rounded-100px'], s['px-3'], s['py-1'], s['text-md'], s['pt-2'], s['pb-2'], s['font-nunitoSansRegular'], disabled ? s['opacity-50'] : s['opacity-100'], buttonColorClass, className), type: type, disabled: disabled, children: children }));
10
+ const button = (_jsx("button", { ref: ref, ...args, className: cn(s['rounded-100px'], s['px-3'], s['py-1'], s['text-md'], s['pt-2'], s['pb-2'], s['font-nunitoSansRegular'], disabled ? s['opacity-50'] : s['opacity-100'], buttonColorClass, className, classNames.button), style: styles.button, type: type, disabled: disabled, children: children }));
11
11
  if (tooltip) {
12
12
  return _jsx(Tooltip, { content: tooltip, children: button });
13
13
  }
@@ -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;AAuJD,eAAO,MAAM,kBAAkB,sIAY5B,uBAAuB,4CAqMzB,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,OAA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  const borderPx = Math.max(2, Math.min(16, Math.round(sizeInPx * 0.156)));
136
136
  return `${borderPx}px`;
137
137
  };
138
- export const LoadingAnimateSpin = ({ classWarper = '', className = '', variant = 'spinner', size = 'md', color = 'blue', borderWidth, width, height, textFontSize = '1.125rem', loadingText, 'aria-label': ariaLabel = 'Loading', }) => {
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', }) => {
139
139
  const sizeConfig = sizeClasses[size];
140
140
  const renderSpinner = () => {
141
141
  const colorValue = getColorValue(color);
@@ -147,7 +147,7 @@ export const LoadingAnimateSpin = ({ classWarper = '', className = '', variant =
147
147
  const spinnerHeight = height || '4rem';
148
148
  // Calculate proportional border width based on spinner size
149
149
  const calculatedBorderWidth = calculateBorderWidth(spinnerWidth, borderWidth);
150
- 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: {
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
151
  width: spinnerWidth,
152
152
  height: spinnerHeight,
153
153
  borderWidth: calculatedBorderWidth,
@@ -157,39 +157,44 @@ export const LoadingAnimateSpin = ({ classWarper = '', className = '', variant =
157
157
  borderBottomColor: baseBorderColor,
158
158
  borderLeftColor: baseBorderColor,
159
159
  animation: 'spin 1s linear infinite',
160
- } }), 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: {
161
162
  marginTop: '1rem',
162
163
  color: colorValue,
163
164
  fontSize: textFontSize,
164
165
  fontWeight: 600,
165
166
  animation: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
167
+ ...styles.text,
166
168
  }, children: loadingText }))] }));
167
169
  };
168
170
  const renderDots = () => {
169
171
  const colorValue = getColorValue(color);
170
- 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: {
171
173
  backgroundColor: colorValue,
172
174
  animation: `bounce 1.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite`,
173
175
  animationDelay: `${i * 0.16}s`,
174
176
  animationFillMode: 'both',
177
+ ...styles.dot,
175
178
  } }, i))) }));
176
179
  };
177
180
  const renderBars = () => {
178
181
  const colorValue = getColorValue(color);
179
- 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: {
180
183
  backgroundColor: colorValue,
181
184
  borderRadius: '0.125rem',
182
185
  animation: `pulse 1.2s ease-in-out infinite`,
183
186
  animationDelay: `${i * 0.15}s`,
184
187
  animationFillMode: 'both',
188
+ ...styles.bar,
185
189
  } }, i))) }));
186
190
  };
187
191
  const renderPulse = () => {
188
192
  const colorValue = getColorValue(color);
189
- 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: {
190
194
  backgroundColor: colorValue,
191
195
  animation: `pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`,
192
196
  animationFillMode: 'both',
197
+ ...styles.pulse,
193
198
  }, "aria-label": ariaLabel, role: "status" }));
194
199
  };
195
200
  const renderLoader = () => {
@@ -205,7 +210,7 @@ export const LoadingAnimateSpin = ({ classWarper = '', className = '', variant =
205
210
  return renderSpinner();
206
211
  }
207
212
  };
208
- return (_jsxs("div", { className: cn(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: `
209
214
  @keyframes spin {
210
215
  from {
211
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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C;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":"AAAA,OAAO,KAAK,EAAE,EAAsB,aAAa,EAAC,MAAM,OAAO,CAAC;AAIhE,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,eAAe;IAC9B,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,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,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,aAAa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7B,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,4CAA4C;IAC5C,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,+CAA+C;IAC/C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK,qYA8Bf,UAAU,KAAG,WAAW,GAAG,IAgQ7B,CAAC"}
@@ -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
  };
@@ -0,0 +1,4 @@
1
+ export declare const geminiSendMessageService: (prompt: string, gemini_key: string) => Promise<{
2
+ text: string;
3
+ } | null>;
4
+ //# sourceMappingURL=gemini.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.service.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Modal/ModalDocxContent/gemini.service.ts"],"names":[],"mappings":"AA0DA,eAAO,MAAM,wBAAwB,WAC3B,MAAM,cACF,MAAM,KACjB,QAAQ;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,CA6B/B,CAAC"}