react-restyle-components 0.2.37 → 0.2.39

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 (71) hide show
  1. package/lib/package.json +2 -1
  2. package/lib/src/App.js +1 -1
  3. package/lib/src/core-components/atoms/button/Button.stories.js +1 -1
  4. package/lib/src/core-components/atoms/button/_button.component.d.ts +7 -0
  5. package/lib/src/core-components/atoms/button/_button.component.js +20 -0
  6. package/lib/src/core-components/atoms/button/button.component.d.ts +0 -1
  7. package/lib/src/core-components/atoms/button/button.component.js +5 -4
  8. package/lib/src/core-components/atoms/button/buttonGroup/buttonGroup.component.d.ts +1 -1
  9. package/lib/src/core-components/atoms/button/buttonGroup/buttonGroup.component.js +1 -1
  10. package/lib/src/core-components/atoms/check-box/checkBox.component.d.ts +1 -1
  11. package/lib/src/core-components/atoms/check-box/checkBox.component.js +1 -1
  12. package/lib/src/core-components/atoms/date-picker/date-picker.component.d.ts +1 -1
  13. package/lib/src/core-components/atoms/date-picker/date-picker.component.js +1 -1
  14. package/lib/src/core-components/atoms/form/form.component.d.ts +1 -1
  15. package/lib/src/core-components/atoms/form/form.component.js +1 -1
  16. package/lib/src/core-components/atoms/grid/grid.component.d.ts +1 -1
  17. package/lib/src/core-components/atoms/grid/grid.component.js +1 -1
  18. package/lib/src/core-components/atoms/icons/icons.component.d.ts +1 -1
  19. package/lib/src/core-components/atoms/icons/icons.component.js +1 -1
  20. package/lib/src/core-components/atoms/input/input-otp.component.d.ts +1 -1
  21. package/lib/src/core-components/atoms/input/input-otp.component.js +1 -1
  22. package/lib/src/core-components/atoms/input/input-pin.component.d.ts +1 -1
  23. package/lib/src/core-components/atoms/input/input-pin.component.js +1 -1
  24. package/lib/src/core-components/atoms/input/input.component.d.ts +1 -1
  25. package/lib/src/core-components/atoms/input/input.component.js +1 -1
  26. package/lib/src/core-components/atoms/input-dropdown/input-dropdown.component.d.ts +1 -1
  27. package/lib/src/core-components/atoms/input-dropdown/input-dropdown.component.js +1 -1
  28. package/lib/src/core-components/atoms/list/list.component.d.ts +1 -1
  29. package/lib/src/core-components/atoms/list/list.component.js +1 -1
  30. package/lib/src/core-components/atoms/loader/loader.component.d.ts +1 -1
  31. package/lib/src/core-components/atoms/loader/loader.component.js +1 -1
  32. package/lib/src/core-components/atoms/radio/radio.component.d.ts +1 -1
  33. package/lib/src/core-components/atoms/radio/radio.component.js +1 -1
  34. package/lib/src/core-components/atoms/stepper/stepper.component.d.ts +1 -1
  35. package/lib/src/core-components/atoms/stepper/stepper.component.js +1 -1
  36. package/lib/src/core-components/atoms/tabs/_tabs.component.d.ts +16 -0
  37. package/lib/src/core-components/atoms/tabs/_tabs.component.js +19 -0
  38. package/lib/src/core-components/atoms/tabs/tabs.component.js +0 -1
  39. package/lib/src/core-components/atoms/tabs/tabs.stories.d.ts +1 -1
  40. package/lib/src/core-components/atoms/tabs/tabs.stories.js +1 -1
  41. package/lib/src/core-components/atoms/timer/timer.component.d.ts +1 -1
  42. package/lib/src/core-components/atoms/timer/timer.component.js +1 -1
  43. package/lib/src/core-components/index.d.ts +1 -0
  44. package/lib/src/core-components/index.js +1 -1
  45. package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +1 -1
  46. package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +1 -1
  47. package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +1 -1
  48. package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +1 -1
  49. package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.d.ts +1 -1
  50. package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.js +1 -1
  51. package/lib/src/core-components/molecules/autocomplete/autocomplete.d.ts +1 -1
  52. package/lib/src/core-components/molecules/autocomplete/autocomplete.js +1 -1
  53. package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.component.d.ts +1 -1
  54. package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.component.js +1 -1
  55. package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.component.d.ts +1 -1
  56. package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.component.js +1 -1
  57. package/lib/src/core-components/molecules/multi-select/multi-select.component.d.ts +1 -1
  58. package/lib/src/core-components/molecules/multi-select/multi-select.component.js +1 -1
  59. package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.js +7 -7
  60. package/lib/src/core-utils/utility.util.d.ts +2 -2
  61. package/lib/src/core-utils/utility.util.js +0 -3
  62. package/lib/src/tc.module.css +216 -1
  63. package/package.json +2 -1
  64. package/lib/src/core-components/atoms/pdf/pdf-images.components.d.ts +0 -9
  65. package/lib/src/core-components/atoms/pdf/pdf-images.components.js +0 -8
  66. package/lib/src/core-components/atoms/pdf/pdf-table.components.d.ts +0 -11
  67. package/lib/src/core-components/atoms/pdf/pdf-table.components.js +0 -56
  68. package/lib/src/core-components/atoms/pdf/pdf-typography.components.d.ts +0 -20
  69. package/lib/src/core-components/atoms/pdf/pdf-typography.components.js +0 -70
  70. package/lib/src/core-components/atoms/pdf/pdf-wrapped-view.components.d.ts +0 -52
  71. package/lib/src/core-components/atoms/pdf/pdf-wrapped-view.components.js +0 -50
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.36",
3
+ "version": "0.2.38",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {
@@ -71,6 +71,7 @@
71
71
  "@storybook/addon-interactions": "^8.0.6",
72
72
  "@storybook/addon-links": "^8.0.6",
73
73
  "@storybook/addon-onboarding": "^8.0.6",
74
+ "@storybook/addon-postcss": "^2.0.0",
74
75
  "@storybook/addon-themes": "^8.4.7",
75
76
  "@storybook/addon-webpack5-compiler-swc": "^1.0.2",
76
77
  "@storybook/blocks": "^8.0.6",
package/lib/src/App.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import './App.css';
3
- import { Tab, Tabs } from './core-components';
3
+ import { Tab, Tabs } from './core-components/atoms/tabs/_tabs.component';
4
4
  function App() {
5
5
  const [color, setColor] = useState('#aabbcc');
6
6
  return (React.createElement("div", { className: "flex flex-col gap-4 p-4" },
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { TooltipProvider } from '../tooltip/tooltip.component';
3
- import { Button } from './button.component';
3
+ import { Button } from './_button.component';
4
4
  // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
5
5
  const meta = {
6
6
  title: 'Design System/Atoms/Button',
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ButtonProps } from './Button.types';
3
+ import '../../../tc.module.css';
4
+ /**
5
+ * It's a `<button>button</button>`. Pass in regular button props such as onClick as well as any of the props defined here.
6
+ */
7
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { forwardRef } from 'react';
3
+ import { Tooltip } from '../tooltip/tooltip.component';
4
+ import '../../../tc.module.css';
5
+ /**
6
+ * It's a `<button>button</button>`. Pass in regular button props such as onClick as well as any of the props defined here.
7
+ */
8
+ export const Button = forwardRef(({ variant = 'solid', tooltip, disabled = false, type = 'button', className, children, ...args }, ref) => {
9
+ const buttonColorClass = variant === 'solid'
10
+ ? 'text-white bg-[#007BFF] hover:bg-[#007BFF] hover:shadow-lg text-white'
11
+ : 'dark:text-white text-black border border-gray-400 hover:shadow-lg';
12
+ const button = (React.createElement("button", { ref: ref, ...args, className: `${className} rounded-100px px-3 py-1 text-md ${buttonColorClass} pt-2 pb-2 font-nunitoSansRegular ${disabled ? 'opacity-50' : 'opacity-100'}`, type: type, disabled: disabled }, children));
13
+ if (tooltip) {
14
+ return React.createElement(Tooltip, { content: tooltip }, button);
15
+ }
16
+ else {
17
+ return button;
18
+ }
19
+ });
20
+ Button.displayName = 'Button';
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from './Button.types';
3
- import '../../../tc.css';
4
3
  /**
5
4
  * It's a `<button>button</button>`. Pass in regular button props such as onClick as well as any of the props defined here.
6
5
  */
@@ -1,15 +1,16 @@
1
1
  import React from 'react';
2
2
  import { forwardRef } from 'react';
3
3
  import { Tooltip } from '../tooltip/tooltip.component';
4
- import '../../../tc.css';
4
+ import s from '../../../tc.module.css';
5
+ import { cn } from '../../../core-utils';
5
6
  /**
6
7
  * It's a `<button>button</button>`. Pass in regular button props such as onClick as well as any of the props defined here.
7
8
  */
8
9
  export const Button = forwardRef(({ variant = 'solid', tooltip, disabled = false, type = 'button', className, children, ...args }, ref) => {
9
10
  const buttonColorClass = variant === 'solid'
10
- ? 'text-white bg-[#007BFF] hover:bg-[#007BFF] hover:shadow-lg text-white'
11
- : 'dark:text-white text-black border border-gray-400 hover:shadow-lg';
12
- const button = (React.createElement("button", { ref: ref, ...args, className: `${className} rounded-100px px-3 py-1 text-md ${buttonColorClass} pt-2 pb-2 font-nunitoSansRegular ${disabled ? 'opacity-50' : 'opacity-100'}`, type: type, disabled: disabled }, children));
11
+ ? cn(s['text-white'], s['bg-[#007BFF]'], s['hover:bg-[#007BFF]'], s['hover:shadow-lg'], s['text-white'])
12
+ : cn(s['dark:text-white'], s['text-black'], s['border'], s['border-gray-400'], s['hover:shadow-lg']);
13
+ const button = (React.createElement("button", { ref: ref, ...args, className: cn(s['rounded-100px'], s['px-3'], s['py-1'], s['text-md'], buttonColorClass, s['pt-2'], s['pb-2'], s['font-nunitoSansRegular'], disabled ? s['opacity-50'] : s['opacity-100'], className), type: type, disabled: disabled }, children));
13
14
  if (tooltip) {
14
15
  return React.createElement(Tooltip, { content: tooltip }, button);
15
16
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import '../../../../tc.css';
3
+ import '../../../../tc.module.css';
4
4
  export declare const ButtonGroup: ({ children, orientation, className, }: {
5
5
  children: ReactNode;
6
6
  orientation?: "horizontal" | "vertical" | undefined;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import '../../../../tc.css';
2
+ import '../../../../tc.module.css';
3
3
  export const ButtonGroup = ({ children, orientation = 'horizontal', className, }) => (React.createElement("div", { className: `flex ${orientation == 'horizontal' ? 'flex-row' : 'flex-col'} w-fit gap-2 ${className}` }, children));
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface CheckBoxProps {
4
4
  title: string;
5
5
  data: Array<any>;
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  import { UnCheckbox, CheckedBox } from '../../../library/assets/svg';
4
4
  import { InputWrapper } from '../form/form.component';
5
5
  export const CheckBox = ({ title = 'Banks', data = [{ title: 'SBI Bank', checked: false }], className, onChange, }) => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  import 'react-datepicker/dist/react-datepicker.css';
4
4
  interface DatePickerProps {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
1
  import React, { useState, forwardRef } from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  import DatePicker from 'react-datepicker';
4
4
  import 'react-datepicker/dist/react-datepicker.css';
5
5
  import { DatePickerSvg } from '../../../library/assets/svg';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface LabelProps {
4
4
  htmlFor: string;
5
5
  hasError?: boolean;
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import classNames from 'classnames';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  export const Label = (props) => (React.createElement(React.Fragment, null,
5
5
  React.createElement("label", { htmlFor: props.htmlFor, className: `${props.hasError ? 'text-red-400' : 'text-current'} block text-3xs font-medium mb-1`, style: { ...props.style } }, props.children)));
6
6
  export const InputWrapper = (props) => (React.createElement("div", { className: props.className, ref: props.ref },
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface GridProps {
4
4
  cols?: number;
5
5
  children?: React.ReactNode;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  export const Grid = (props) => (React.createElement("div", { className: `xl:grid sm:inline-block grid-cols-${props.cols || 1} gap-3` }, props.children));
@@ -1,5 +1,5 @@
1
1
  import { IconBaseProps } from 'react-icons/lib';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface IconProps {
4
4
  nameIcon: string;
5
5
  propsIcon?: IconBaseProps;
@@ -2,7 +2,7 @@ import React, { Suspense } from 'react';
2
2
  import _ from 'lodash';
3
3
  import { Tooltip } from '../tooltip/tooltip.component';
4
4
  import loadable from '@loadable/component';
5
- import '../../../tc.css';
5
+ import '../../../tc.module.css';
6
6
  let lib = 'md';
7
7
  export const Icon = ({ nameIcon, propsIcon, tooltip = '', isDisable = false, onClick, }) => {
8
8
  try {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './input-otp.styles.css';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  interface PinInputGridProps {
5
5
  title?: string;
6
6
  hasError?: boolean;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-console */
2
2
  import React, { useEffect, useRef } from 'react';
3
3
  import './input-otp.styles.css';
4
- import '../../../tc.css';
4
+ import '../../../tc.module.css';
5
5
  export const InputOtp = ({ className, pin, onPinChanged, }) => {
6
6
  const pinLength = 6;
7
7
  const Pin_Min_Value = 0;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './input.styles.css';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  interface PinInputGridProps {
5
5
  title: string;
6
6
  hasError?: any;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  import React, { useRef, useState } from 'react';
3
3
  import './input.styles.css';
4
- import '../../../tc.css';
4
+ import '../../../tc.module.css';
5
5
  export const InputPin = ({ title, className, defaultPin, errorMsg, defaultMsg, hasError, onPinChanged, }) => {
6
6
  const pin = useRef([]);
7
7
  const [reload, setReload] = useState(false);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './input.styles.css';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  interface InputProps {
5
5
  title: string;
6
6
  defaultValue: string;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-console */
2
2
  import React, { useState } from 'react';
3
3
  import './input.styles.css';
4
- import '../../../tc.css';
4
+ import '../../../tc.module.css';
5
5
  export const Input = ({ title, defaultValue, className, disable, hasError, errorMsg, defaultMsg, inputStyle, autoComplete, maxlength = 40, onChange, onBlur, }) => {
6
6
  const [value, setValue] = useState(defaultValue);
7
7
  const onKeyUpValue = (event) => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface InputDropdownProps {
4
4
  title: string;
5
5
  items: Array<string>;
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect, useRef } from 'react';
2
2
  import { UpArrow, DownArrow } from '../../../library/assets/svg';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  export const InputDropdown = ({ items, className, hasError, title, onChange, }) => {
5
5
  const [isOpen, setIsOpen] = useState(false);
6
6
  const [value, setValue] = useState('');
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface ListProps {
4
4
  direction?: 'row' | 'col';
5
5
  space?: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  export const List = (props) => {
4
4
  const spacingClass = props.space
5
5
  ? `space-${props.direction === 'col' ? 'y' : 'x'}-${props.space}`
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  export declare const Loader: () => React.JSX.Element;
4
4
  export declare const ModalLoader: () => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Container, Row, Spinner } from 'reactstrap';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  export const Loader = () => (React.createElement(Container, { fluid: true, className: "vh-50 d-flex" },
5
5
  React.createElement(Row, { className: "justify-content-center align-self-center w-100 text-center" },
6
6
  React.createElement(Spinner, { color: "primary" }))));
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface RadioProps {
4
4
  title: string;
5
5
  data: Array<any>;
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { CheckedRadio, UncheckRadio } from '../../../library/assets/svg';
3
3
  import { InputWrapper } from '../form/form.component';
4
- import '../../../tc.css';
4
+ import '../../../tc.module.css';
5
5
  export const Radio = ({ title = 'Source', data = [], className, onChange, }) => {
6
6
  const [list, setList] = useState(data);
7
7
  const width = 20;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface StepperProps {
4
4
  className?: string;
5
5
  steps: Array<string>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  export const Stepper = ({ className = '', steps, currentStep = 1, onStepClick, }) => {
4
4
  const finalClass = `${className} w-full px-4 sm:px-8`;
5
5
  const progressClass = 'absolute my-4 top-1/2 left-0 h-0.5 transform -translate-y-1/2 bg-orange transition-width ease-in-out duration-500';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface TabProps {
3
+ title: string;
4
+ children: React.JSX.Element;
5
+ }
6
+ export declare const Tab: ({ title, children }: TabProps) => React.JSX.Element;
7
+ export interface TabsProps {
8
+ options: Array<{
9
+ title: string;
10
+ content?: React.JSX.Element;
11
+ inActive?: boolean;
12
+ }>;
13
+ children: React.JSX.Element[];
14
+ }
15
+ export declare const Tabs: ({ options, children }: TabsProps) => React.JSX.Element;
16
+ export {};
@@ -0,0 +1,19 @@
1
+ import React, { useState } from 'react';
2
+ import { cn } from '../../../core-utils';
3
+ export const Tab = ({ title, children }) => {
4
+ return (React.createElement("div", { className: cn('flex'), key: title }, children));
5
+ };
6
+ export const Tabs = ({ options, children }) => {
7
+ const [activeTab, setActiveTab] = useState(0);
8
+ const [selected, setSelected] = useState(options[0].title);
9
+ const tabs = React.Children.toArray(children).filter((child) => React.isValidElement(child) && child.type === Tab);
10
+ return (React.createElement(React.Fragment, null,
11
+ React.createElement("div", { className: cn('flex flex-col w-full') },
12
+ React.createElement("div", { className: cn('flex border-b') }, options?.map((tab, index) => (React.createElement("button", { type: "button", key: index, className: cn('py-2', 'px-4', 'mr-1', 'border-none', 'rounded-t-md', 'shadow-inner', 'cursor-pointer', activeTab === index && 'bg-blue-500', activeTab === index && 'border-none', activeTab === index && 'text-white'), onClick: () => {
13
+ setSelected(tab?.title);
14
+ !tab.inActive && setActiveTab(index);
15
+ }, disabled: tab.inActive }, tab.title)))),
16
+ React.createElement("div", { className: cn('p-2', 'border', 'border-solid', 'border-slate-600', 'rounded-b-md') }, options[activeTab]?.content
17
+ ? options[activeTab]?.content
18
+ : tabs[options?.findIndex((item) => item.title === selected)]))));
19
+ };
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react';
2
- // import s from './tabs.module.css';
3
2
  import s from '../../../tc.module.css';
4
3
  import { cn } from '../../../core-utils';
5
4
  export const Tab = ({ title, children }) => {
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import { Tabs } from './tabs.component';
2
+ import { Tabs } from './_tabs.component';
3
3
  declare const meta: Meta<typeof Tabs>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Tabs>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Tabs, Tab } from './tabs.component';
2
+ import { Tabs, Tab } from './_tabs.component';
3
3
  // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Tabs',
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface TimerProps {
4
4
  onClear: () => void;
5
5
  }
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable @typescript-eslint/no-unused-expressions */
3
3
  import React, { useEffect, useState, useImperativeHandle } from 'react';
4
4
  import { TimerSVG } from '../../../library/assets/svg';
5
- import '../../../tc.css';
5
+ import '../../../tc.module.css';
6
6
  // eslint-disable-next-line react/display-name
7
7
  export const Timer = React.forwardRef(({ onClear }, ref) => {
8
8
  const width = 15;
@@ -1 +1,2 @@
1
+ export * from './atoms/button/button.component';
1
2
  export * from './atoms/tabs/tabs.component';
@@ -1,5 +1,5 @@
1
1
  // import * as Form from './atoms/form/form.component';
2
- // export * from './atoms/button/button.component';
2
+ export * from './atoms/button/button.component';
3
3
  // export * from './atoms/button/buttonGroup/buttonGroup.component';
4
4
  // export * from './atoms/check-box/checkBox.component';
5
5
  // export * from './atoms/date-picker/date-picker.component';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface AutoCompleteFilterMultipleSelectMultipleFieldsDisplayProps {
4
4
  uniqueField?: string;
5
5
  isSelectedStringArray?: boolean;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  import React, { useState, useEffect, useRef } from 'react';
3
3
  import { Icon } from '../../atoms/icons/icons.component';
4
- import '../../../tc.css';
4
+ import '../../../tc.module.css';
5
5
  export const AutoCompleteFilterMultipleSelectMultipleFieldsDisplay = ({ uniqueField = '_id', isSelectedStringArray = false, loader = false, placeholder = 'Search...', data, hasError = false, disable = false, isUpperCase = false, name, onFilter, onUpdate, onSelect, onBlur, }) => {
6
6
  const [value, setValue] = useState('');
7
7
  const [options, setOptions] = useState();
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface AutoCompleteFilterSingleSelectMultiFieldsDisplayProps {
4
4
  loader?: boolean;
5
5
  disable?: boolean;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  import React, { useState, useEffect, useRef } from 'react';
3
3
  import { Icon } from '../../atoms/icons/icons.component';
4
- import '../../../tc.css';
4
+ import '../../../tc.module.css';
5
5
  export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = false, loader = false, displayValue = '', placeholder = 'Search...', data, hasError = false, className, posstion = 'absolute', onFilter, onSelect, onBlur, }) => {
6
6
  const [value, setValue] = useState(displayValue);
7
7
  const [options, setOptions] = useState(data.list);
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface AutocompleteGroupByProps {
4
4
  data: any[];
5
5
  onChange?: (item: any, children: any) => void;
@@ -2,7 +2,7 @@
2
2
  import React, { useState, useEffect, useRef } from 'react';
3
3
  import { Icon } from '../../atoms/icons/icons.component';
4
4
  // import PerfectScrollbar from 'react-perfect-scrollbar';
5
- import '../../../tc.css';
5
+ import '../../../tc.module.css';
6
6
  export const AutocompleteGroupBy = (props) => {
7
7
  //const [userRouter, setUserRouter] = useState<any>()
8
8
  const [value, setValue] = useState(props.displayValue);
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface AutocompleteProps {
4
4
  value: string;
5
5
  onValueChange: (value: string) => void;
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useRef, useEffect, useCallback } from 'react';
2
2
  // import './autocomplete.css';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  const LI_ELEMENT_HEIGHT = 34;
5
5
  export const Autocomplete = ({ value = '', onValueChange, options = [], }) => {
6
6
  const [activeOption, setActiveOption] = useState(value === '' || options.indexOf(value) === -1 ? 0 : options.indexOf(value));
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './color-picker-modal.css';
3
- import '../../../tc.css';
3
+ import '../../../tc.module.css';
4
4
  interface ColorPickerModalProps {
5
5
  color: string;
6
6
  onChange: (color: string) => void;
@@ -2,7 +2,7 @@ import React, { useCallback, useRef, useState } from 'react';
2
2
  import { HexColorPicker } from 'react-colorful';
3
3
  import { useClickOutside } from '../../../hooks';
4
4
  import './color-picker-modal.css';
5
- import '../../../tc.css';
5
+ import '../../../tc.module.css';
6
6
  export const ColorPickerModal = ({ color, onChange, onClose, }) => {
7
7
  const popover = useRef();
8
8
  const [isOpen, toggle] = useState(false);
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface CSSMultilineProps {
4
4
  label?: string;
5
5
  defaultValue?: string;
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState, useRef } from 'react';
2
2
  import * as Form from '../../atoms/form/form.component';
3
3
  import { properties as propertiesObj } from './css-properties';
4
- import '../../../tc.css';
4
+ import '../../../tc.module.css';
5
5
  const mapToArray = (arr) => {
6
6
  const res = [];
7
7
  arr.forEach(function (obj, index) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  interface MultiSelectProps {
4
4
  options: Array<string>;
5
5
  selectedItems?: Array<string>;
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useRef } from 'react';
2
- import '../../../tc.css';
2
+ import '../../../tc.module.css';
3
3
  export const MultiSelect = ({ options = [], selectedItems = [], hasError = false, onSelect, }) => {
4
4
  const [selectedOptions, setSelectedOptions] = useState([]);
5
5
  const [isListOpen, setIsListOpen] = useState(false);
@@ -4,7 +4,7 @@ import _ from 'lodash';
4
4
  export const MultiSelectWithField = ({ displayField = '', options = [], selectedItems = [], hasError = false, onSelect, }) => {
5
5
  const [selectedOptions, setSelectedOptions] = useState([]);
6
6
  const [isListOpen, setIsListOpen] = useState(false);
7
- const useOutsideAlerter = ref => {
7
+ const useOutsideAlerter = (ref) => {
8
8
  useEffect(() => {
9
9
  function handleClickOutside(event) {
10
10
  if (ref.current && !ref.current.contains(event.target) && isListOpen) {
@@ -24,20 +24,20 @@ export const MultiSelectWithField = ({ displayField = '', options = [], selected
24
24
  useOutsideAlerter(wrapperRef);
25
25
  return (React.createElement(React.Fragment, null,
26
26
  React.createElement("div", { className: `flex dark:bg-boxdark dark:text-white flex-col w-full rounded-md border-2 ${hasError ? 'border-red ' : 'border-gray-300'}`, ref: wrapperRef },
27
- React.createElement("span", { className: 'p-2 mt-1 shadow-sm', onClick: () => {
27
+ React.createElement("span", { className: "p-2 mt-1 shadow-sm", onClick: () => {
28
28
  setIsListOpen(!isListOpen);
29
29
  } }, selectedOptions?.length > 0
30
30
  ? `${selectedOptions?.length} Items`
31
31
  : 'Select'),
32
32
  React.createElement("div", { className: `flex mx-2 ${isListOpen ? `show` : `hidden`}` }, options
33
- ? options?.length > 0 && (React.createElement("ul", { className: 'flex flex-col gap-1 p-2' }, options?.map((item, index) => (React.createElement("li", { key: index, className: 'flex items-center' },
34
- React.createElement("input", { className: 'flex bg-black', type: 'checkbox', checked: !_.isEmpty(selectedOptions?.find(e => e[displayField]?.toUpperCase() ==
33
+ ? options?.length > 0 && (React.createElement("ul", { className: "flex flex-col gap-1 p-2" }, options?.map((item, index) => (React.createElement("li", { key: index, className: "flex items-center" },
34
+ React.createElement("input", { className: "flex bg-black", type: "checkbox", checked: !_.isEmpty(selectedOptions?.find((e) => e[displayField]?.toUpperCase() ==
35
35
  item[displayField]?.toUpperCase()))
36
36
  ? true
37
37
  : false, onChange: () => {
38
- if (!_.isEmpty(selectedOptions?.find(e => e[displayField]?.toUpperCase() ==
38
+ if (!_.isEmpty(selectedOptions?.find((e) => e[displayField]?.toUpperCase() ==
39
39
  item[displayField]?.toUpperCase()))) {
40
- setSelectedOptions(selectedOptions?.filter(e => e[displayField]?.toUpperCase() !=
40
+ setSelectedOptions(selectedOptions?.filter((e) => e[displayField]?.toUpperCase() !=
41
41
  item[displayField]?.toUpperCase()));
42
42
  }
43
43
  else {
@@ -53,6 +53,6 @@ export const MultiSelectWithField = ({ displayField = '', options = [], selected
53
53
  onSelect(selectedOptions);
54
54
  } }),
55
55
  ' ',
56
- React.createElement("span", { className: 'flex ml-2 dark:text-white text-center' }, item[displayField]))))))
56
+ React.createElement("span", { className: "flex ml-2 dark:text-white text-center" }, item[displayField]))))))
57
57
  : null))));
58
58
  };