@esic-lab/data-core-ui 0.0.2 → 0.0.4

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 (63) hide show
  1. package/dist/index.css +784 -0
  2. package/dist/index.d.mts +111 -0
  3. package/dist/index.d.ts +111 -0
  4. package/dist/index.js +2004 -0
  5. package/dist/index.mjs +1980 -0
  6. package/package.json +10 -3
  7. package/.storybook/main.ts +0 -12
  8. package/.storybook/preview.ts +0 -16
  9. package/.storybook/vitest.setup.ts +0 -7
  10. package/postcss.config.js +0 -5
  11. package/src/Button/GhostButton/GhostButton.stories.tsx +0 -20
  12. package/src/Button/GhostButton/GhostButton.tsx +0 -26
  13. package/src/Button/PrimaryButton/PrimaryButton.stories.tsx +0 -21
  14. package/src/Button/PrimaryButton/PrimaryButton.tsx +0 -35
  15. package/src/Button/SecondaryButton/SecondaryButton.stories.tsx +0 -16
  16. package/src/Button/SecondaryButton/SecondaryButton.tsx +0 -26
  17. package/src/Checkbox/Checkbox/Checkbox.stories.tsx +0 -17
  18. package/src/Checkbox/Checkbox/Checkbox.tsx +0 -27
  19. package/src/Checkbox/CheckboxGroup/CheckboxGroup.stories.tsx +0 -35
  20. package/src/Checkbox/CheckboxGroup/CheckboxGroup.tsx +0 -23
  21. package/src/Loader/Loader/Loader.stories.tsx +0 -16
  22. package/src/Loader/Loader/Loader.tsx +0 -12
  23. package/src/NavBar/MenuNavBar/MenuNavBar.stories.tsx +0 -85
  24. package/src/NavBar/MenuNavBar/MenuNavBar.tsx +0 -43
  25. package/src/NavBar/TopNavBar/TopNavBar.stories.tsx +0 -16
  26. package/src/NavBar/TopNavBar/TopNavBar.tsx +0 -24
  27. package/src/Radio/Radio/Radio.stories.tsx +0 -17
  28. package/src/Radio/Radio/Radio.tsx +0 -15
  29. package/src/Radio/RadioGroup/RadioGroup.stories.tsx +0 -23
  30. package/src/Radio/RadioGroup/RadioGroup.tsx +0 -27
  31. package/src/Switch/Switch/Switch.stories.tsx +0 -18
  32. package/src/Switch/Switch/Switch.tsx +0 -25
  33. package/src/index.css +0 -260
  34. package/src/index.ts +0 -24
  35. package/stories/Button.stories.ts +0 -49
  36. package/stories/Button.tsx +0 -33
  37. package/stories/Configure.mdx +0 -364
  38. package/stories/Header.stories.ts +0 -29
  39. package/stories/Header.tsx +0 -47
  40. package/stories/Page.stories.ts +0 -28
  41. package/stories/Page.tsx +0 -69
  42. package/stories/assets/accessibility.png +0 -0
  43. package/stories/assets/accessibility.svg +0 -1
  44. package/stories/assets/addon-library.png +0 -0
  45. package/stories/assets/assets.png +0 -0
  46. package/stories/assets/avif-test-image.avif +0 -0
  47. package/stories/assets/context.png +0 -0
  48. package/stories/assets/discord.svg +0 -1
  49. package/stories/assets/docs.png +0 -0
  50. package/stories/assets/figma-plugin.png +0 -0
  51. package/stories/assets/github.svg +0 -1
  52. package/stories/assets/share.png +0 -0
  53. package/stories/assets/styling.png +0 -0
  54. package/stories/assets/testing.png +0 -0
  55. package/stories/assets/theming.png +0 -0
  56. package/stories/assets/tutorials.svg +0 -1
  57. package/stories/assets/youtube.svg +0 -1
  58. package/stories/button.css +0 -30
  59. package/stories/header.css +0 -32
  60. package/stories/page.css +0 -68
  61. package/tsconfig.json +0 -16
  62. package/vitest.config.js +0 -35
  63. /package/{src/assets/STO-logo.svg → dist/STO-logo-ADYYAPS3.svg} +0 -0
@@ -0,0 +1,111 @@
1
+ declare namespace JSX {
2
+ type ElementType = undefined.ElementType;
3
+ interface Element extends undefined.Element {}
4
+ interface ElementClass extends undefined.ElementClass {}
5
+ interface ElementAttributesProperty extends undefined.ElementAttributesProperty {}
6
+ interface ElementChildrenAttribute extends undefined.ElementChildrenAttribute {}
7
+ type LibraryManagedAttributes<C, P> = undefined.LibraryManagedAttributes<C, P>;
8
+ interface IntrinsicAttributes extends undefined.IntrinsicAttributes {}
9
+ interface IntrinsicClassAttributes<T> extends undefined.IntrinsicClassAttributes<T> {}
10
+ interface IntrinsicElements extends undefined.IntrinsicElements {}
11
+ }
12
+
13
+ type ColorScale = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
14
+ type BaseColor = "primary" | "gray" | "green" | "red" | "yellow" | "blue";
15
+ type ThemeColor = `bg-${BaseColor}-${ColorScale}`;
16
+ interface PrimaryButtonProps {
17
+ title: string;
18
+ onClick: () => void;
19
+ iconLeft?: React.ReactNode;
20
+ iconRight?: React.ReactNode;
21
+ bgColor?: ThemeColor;
22
+ textColor?: "white" | "black";
23
+ }
24
+ declare function PrimaryButton({ title, onClick, iconLeft, iconRight, bgColor, textColor, }: PrimaryButtonProps): JSX.Element;
25
+
26
+ interface SecondaryButtonProps {
27
+ title: string;
28
+ onClick: () => void;
29
+ iconLeft?: React.ReactNode;
30
+ iconRight?: React.ReactNode;
31
+ }
32
+ declare function SecondaryButton({ title, onClick, iconLeft, iconRight }: SecondaryButtonProps): JSX.Element;
33
+
34
+ interface GhostButtonProps {
35
+ title: string;
36
+ onClick: () => void;
37
+ iconLeft?: React.ReactNode;
38
+ iconRight?: React.ReactNode;
39
+ }
40
+ declare function GhostButton({ title, onClick, iconLeft, iconRight }: GhostButtonProps): JSX.Element;
41
+
42
+ interface LoaderProps {
43
+ size?: number;
44
+ }
45
+ declare function Loader({ size }: LoaderProps): JSX.Element;
46
+
47
+ interface CheckboxProps {
48
+ label?: string;
49
+ checked: boolean;
50
+ onChange: (checked: boolean) => void;
51
+ }
52
+ declare function Checkbox({ label, checked, onChange }: CheckboxProps): JSX.Element;
53
+
54
+ interface CheckboxOption {
55
+ checked: boolean;
56
+ label: string;
57
+ }
58
+ interface CheckboxGroupProps {
59
+ options: CheckboxOption[];
60
+ onChange: (label: string) => void;
61
+ alignment?: "horizontal" | "vertical";
62
+ }
63
+ declare function CheckboxGroup({ options, onChange, alignment }: CheckboxGroupProps): JSX.Element;
64
+
65
+ interface RadioProps {
66
+ selected: boolean;
67
+ onChange: (selected: boolean) => void;
68
+ }
69
+ declare function Radio({ selected, onChange }: RadioProps): JSX.Element;
70
+
71
+ interface RadioOption {
72
+ value: string;
73
+ label: string;
74
+ }
75
+ interface RadioGroupProps {
76
+ options: RadioOption[];
77
+ value: string;
78
+ onChange: (value: string) => void;
79
+ alignment?: "vertical" | "horizontal";
80
+ }
81
+ declare function RadioGroup({ options, value, onChange, alignment }: RadioGroupProps): JSX.Element;
82
+
83
+ interface SwitchProps {
84
+ label?: string;
85
+ checked: boolean;
86
+ onChange: (checked: boolean) => void;
87
+ }
88
+ declare function Switch({ label, checked, onChange }: SwitchProps): JSX.Element;
89
+
90
+ interface Menu {
91
+ title: string;
92
+ subMenus: {
93
+ title: string;
94
+ icon?: React.ReactNode;
95
+ iconActive?: React.ReactNode;
96
+ path: string;
97
+ customNode?: React.ReactNode;
98
+ }[];
99
+ }
100
+ interface MenuNavBarProps {
101
+ menus: Menu[];
102
+ onClick: (path: string) => void;
103
+ }
104
+ declare function MenuNavBar({ menus, onClick }: MenuNavBarProps): JSX.Element;
105
+
106
+ interface TopNavBarProps {
107
+ onClickNoti: () => void;
108
+ }
109
+ declare function TopNavBar({ onClickNoti }: TopNavBarProps): JSX.Element;
110
+
111
+ export { Checkbox, CheckboxGroup, GhostButton, Loader, MenuNavBar, PrimaryButton, Radio, RadioGroup, SecondaryButton, Switch, TopNavBar };
@@ -0,0 +1,111 @@
1
+ declare namespace JSX {
2
+ type ElementType = undefined.ElementType;
3
+ interface Element extends undefined.Element {}
4
+ interface ElementClass extends undefined.ElementClass {}
5
+ interface ElementAttributesProperty extends undefined.ElementAttributesProperty {}
6
+ interface ElementChildrenAttribute extends undefined.ElementChildrenAttribute {}
7
+ type LibraryManagedAttributes<C, P> = undefined.LibraryManagedAttributes<C, P>;
8
+ interface IntrinsicAttributes extends undefined.IntrinsicAttributes {}
9
+ interface IntrinsicClassAttributes<T> extends undefined.IntrinsicClassAttributes<T> {}
10
+ interface IntrinsicElements extends undefined.IntrinsicElements {}
11
+ }
12
+
13
+ type ColorScale = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
14
+ type BaseColor = "primary" | "gray" | "green" | "red" | "yellow" | "blue";
15
+ type ThemeColor = `bg-${BaseColor}-${ColorScale}`;
16
+ interface PrimaryButtonProps {
17
+ title: string;
18
+ onClick: () => void;
19
+ iconLeft?: React.ReactNode;
20
+ iconRight?: React.ReactNode;
21
+ bgColor?: ThemeColor;
22
+ textColor?: "white" | "black";
23
+ }
24
+ declare function PrimaryButton({ title, onClick, iconLeft, iconRight, bgColor, textColor, }: PrimaryButtonProps): JSX.Element;
25
+
26
+ interface SecondaryButtonProps {
27
+ title: string;
28
+ onClick: () => void;
29
+ iconLeft?: React.ReactNode;
30
+ iconRight?: React.ReactNode;
31
+ }
32
+ declare function SecondaryButton({ title, onClick, iconLeft, iconRight }: SecondaryButtonProps): JSX.Element;
33
+
34
+ interface GhostButtonProps {
35
+ title: string;
36
+ onClick: () => void;
37
+ iconLeft?: React.ReactNode;
38
+ iconRight?: React.ReactNode;
39
+ }
40
+ declare function GhostButton({ title, onClick, iconLeft, iconRight }: GhostButtonProps): JSX.Element;
41
+
42
+ interface LoaderProps {
43
+ size?: number;
44
+ }
45
+ declare function Loader({ size }: LoaderProps): JSX.Element;
46
+
47
+ interface CheckboxProps {
48
+ label?: string;
49
+ checked: boolean;
50
+ onChange: (checked: boolean) => void;
51
+ }
52
+ declare function Checkbox({ label, checked, onChange }: CheckboxProps): JSX.Element;
53
+
54
+ interface CheckboxOption {
55
+ checked: boolean;
56
+ label: string;
57
+ }
58
+ interface CheckboxGroupProps {
59
+ options: CheckboxOption[];
60
+ onChange: (label: string) => void;
61
+ alignment?: "horizontal" | "vertical";
62
+ }
63
+ declare function CheckboxGroup({ options, onChange, alignment }: CheckboxGroupProps): JSX.Element;
64
+
65
+ interface RadioProps {
66
+ selected: boolean;
67
+ onChange: (selected: boolean) => void;
68
+ }
69
+ declare function Radio({ selected, onChange }: RadioProps): JSX.Element;
70
+
71
+ interface RadioOption {
72
+ value: string;
73
+ label: string;
74
+ }
75
+ interface RadioGroupProps {
76
+ options: RadioOption[];
77
+ value: string;
78
+ onChange: (value: string) => void;
79
+ alignment?: "vertical" | "horizontal";
80
+ }
81
+ declare function RadioGroup({ options, value, onChange, alignment }: RadioGroupProps): JSX.Element;
82
+
83
+ interface SwitchProps {
84
+ label?: string;
85
+ checked: boolean;
86
+ onChange: (checked: boolean) => void;
87
+ }
88
+ declare function Switch({ label, checked, onChange }: SwitchProps): JSX.Element;
89
+
90
+ interface Menu {
91
+ title: string;
92
+ subMenus: {
93
+ title: string;
94
+ icon?: React.ReactNode;
95
+ iconActive?: React.ReactNode;
96
+ path: string;
97
+ customNode?: React.ReactNode;
98
+ }[];
99
+ }
100
+ interface MenuNavBarProps {
101
+ menus: Menu[];
102
+ onClick: (path: string) => void;
103
+ }
104
+ declare function MenuNavBar({ menus, onClick }: MenuNavBarProps): JSX.Element;
105
+
106
+ interface TopNavBarProps {
107
+ onClickNoti: () => void;
108
+ }
109
+ declare function TopNavBar({ onClickNoti }: TopNavBarProps): JSX.Element;
110
+
111
+ export { Checkbox, CheckboxGroup, GhostButton, Loader, MenuNavBar, PrimaryButton, Radio, RadioGroup, SecondaryButton, Switch, TopNavBar };