@eloisallena/web_components 1.0.3 → 1.0.6

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 (92) hide show
  1. package/dist/component/breadcrumbs/Breadcrumbs.d.ts +9 -0
  2. package/dist/component/breadcrumbs/Breadcrumbs.js +7 -0
  3. package/dist/component/breadcrumbs/index.d.ts +1 -0
  4. package/dist/component/breadcrumbs/index.js +1 -0
  5. package/dist/component/button/Button.d.ts +8 -0
  6. package/dist/component/button/Button.js +15 -0
  7. package/dist/component/button/index.d.ts +1 -0
  8. package/dist/component/button/index.js +2 -0
  9. package/dist/component/card/Card.d.ts +6 -0
  10. package/dist/component/card/Card.js +4 -0
  11. package/dist/component/card/CardContent.d.ts +6 -0
  12. package/dist/component/card/CardContent.js +4 -0
  13. package/dist/component/card/CardFooter.d.ts +5 -0
  14. package/dist/component/card/CardFooter.js +4 -0
  15. package/dist/component/card/CardImage.d.ts +7 -0
  16. package/dist/component/card/CardImage.js +4 -0
  17. package/dist/component/card/index.d.ts +4 -0
  18. package/dist/component/card/index.js +4 -0
  19. package/dist/component/footer/Cfooter.d.ts +6 -0
  20. package/dist/component/footer/Cfooter.js +4 -0
  21. package/dist/component/footer/FooterBottom.d.ts +5 -0
  22. package/dist/component/footer/FooterBottom.js +4 -0
  23. package/dist/component/footer/FooterContact.d.ts +11 -0
  24. package/dist/component/footer/FooterContact.js +4 -0
  25. package/dist/component/footer/FooterIcon.d.ts +7 -0
  26. package/dist/component/footer/FooterIcon.js +4 -0
  27. package/dist/component/footer/QuickLink.d.ts +11 -0
  28. package/dist/component/footer/QuickLink.js +4 -0
  29. package/dist/component/footer/index.d.ts +5 -0
  30. package/dist/component/footer/index.js +5 -0
  31. package/dist/component/form/Cform.d.ts +6 -0
  32. package/dist/component/form/Cform.js +4 -0
  33. package/dist/component/form/index.d.ts +1 -0
  34. package/dist/component/form/index.js +1 -0
  35. package/dist/component/header/Cheader.d.ts +7 -0
  36. package/dist/component/header/Cheader.js +4 -0
  37. package/dist/component/header/Drawer.d.ts +12 -0
  38. package/dist/component/header/Drawer.js +22 -0
  39. package/dist/component/header/Icon.d.ts +9 -0
  40. package/dist/component/header/Icon.js +11 -0
  41. package/dist/component/header/NavBar.d.ts +12 -0
  42. package/dist/component/header/NavBar.js +14 -0
  43. package/dist/component/header/SearchBar.d.ts +8 -0
  44. package/dist/component/header/SearchBar.js +7 -0
  45. package/dist/component/header/index.d.ts +5 -0
  46. package/dist/component/header/index.js +5 -0
  47. package/dist/component/input/CheckBox.d.ts +12 -0
  48. package/dist/component/input/CheckBox.js +18 -0
  49. package/dist/component/input/Select.d.ts +17 -0
  50. package/dist/component/input/Select.js +12 -0
  51. package/dist/component/input/TextField.d.ts +11 -0
  52. package/dist/component/input/TextField.js +7 -0
  53. package/dist/component/input/index.d.ts +3 -0
  54. package/dist/component/input/index.js +3 -0
  55. package/dist/component/modal/Modal.d.ts +8 -0
  56. package/dist/component/modal/Modal.js +6 -0
  57. package/dist/component/modal/index.d.ts +1 -0
  58. package/dist/component/modal/index.js +1 -0
  59. package/dist/component/section/Section.d.ts +9 -0
  60. package/dist/component/section/Section.js +14 -0
  61. package/dist/component/section/index.d.ts +1 -0
  62. package/dist/component/section/index.js +1 -0
  63. package/dist/component/spinner/Loader.d.ts +1 -0
  64. package/dist/component/spinner/Loader.js +4 -0
  65. package/dist/component/spinner/index.d.ts +1 -0
  66. package/dist/component/spinner/index.js +1 -0
  67. package/dist/component/stories/LandingLayout.d.ts +6 -0
  68. package/dist/component/stories/LandingLayout.js +33 -0
  69. package/dist/component/stories/index.d.ts +1 -0
  70. package/dist/component/stories/index.js +1 -0
  71. package/dist/component/table/Ctable.d.ts +8 -0
  72. package/dist/component/table/Ctable.js +13 -0
  73. package/dist/component/table/TableBody.d.ts +7 -0
  74. package/dist/component/table/TableBody.js +4 -0
  75. package/dist/component/table/TableCell.d.ts +8 -0
  76. package/dist/component/table/TableCell.js +12 -0
  77. package/dist/component/table/TableHead.d.ts +7 -0
  78. package/dist/component/table/TableHead.js +16 -0
  79. package/dist/component/table/TableRow.d.ts +8 -0
  80. package/dist/component/table/TableRow.js +27 -0
  81. package/dist/component/table/alignment.d.ts +5 -0
  82. package/dist/component/table/alignment.js +5 -0
  83. package/dist/component/table/index.d.ts +5 -0
  84. package/dist/component/table/index.js +5 -0
  85. package/dist/component/table/types.d.ts +13 -0
  86. package/dist/component/table/types.js +1 -0
  87. package/dist/index.d.ts +26 -2
  88. package/dist/index.js +26 -0
  89. package/dist/themes/tailwind.css +47 -0
  90. package/dist/web-components.es.js +160 -2131
  91. package/package.json +11 -8
  92. package/dist/web-components.cjs.js +0 -304
@@ -0,0 +1 @@
1
+ export { LandingLayout } from './LandingLayout';
@@ -0,0 +1 @@
1
+ export { LandingLayout } from './LandingLayout';
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface CtableProps {
3
+ children?: React.ReactNode;
4
+ style?: string;
5
+ maxRows?: number;
6
+ }
7
+ export declare const Ctable: React.FC<CtableProps>;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const Ctable = ({ children, style, maxRows = 5, }) => {
3
+ return (_jsx("div", { className: `
4
+ w-full
5
+ overflow-hidden
6
+ rounded-md
7
+ bg-white
8
+ shadow-lg
9
+ ${style || ""}
10
+ `, children: _jsx("div", { className: "overflow-auto", style: {
11
+ maxHeight: `${maxRows * 56}px`,
12
+ }, children: _jsx("table", { className: "w-full border-separate border-spacing-0", children: children }) }) }));
13
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface TableBodyProps {
3
+ children?: React.ReactNode;
4
+ style?: string;
5
+ }
6
+ export declare const TableBody: React.FC<TableBodyProps>;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const TableBody = ({ children, style }) => {
3
+ return _jsx("tbody", { className: style, children: children });
4
+ };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface TableCellProps {
3
+ children: React.ReactNode;
4
+ align?: string;
5
+ style?: string;
6
+ }
7
+ export declare const TableCell: React.FC<TableCellProps>;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const TableCell = ({ children, align = "left", style, }) => {
3
+ return (_jsx("td", { className: `
4
+ px-4
5
+ py-3
6
+ text-sm
7
+ ${align === "center" ? "text-center" : ""}
8
+ ${align === "right" ? "text-right" : ""}
9
+ ${align === "left" ? "text-left" : ""}
10
+ ${style || ""}
11
+ `, children: children }));
12
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { TableHeadCell } from "./types";
3
+ interface TableHeadProps {
4
+ rowData: TableHeadCell[];
5
+ }
6
+ export declare const TableHead: React.FC<TableHeadProps>;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { alignment } from "./alignment";
3
+ export const TableHead = ({ rowData }) => {
4
+ return (_jsx("thead", { children: _jsx("tr", { className: "\r\n sticky\r\n top-0\r\n z-10\r\n bg-white\r\n ", children: rowData.map((cell) => (_jsx("th", { className: `
5
+ px-3 sm:px-4 md:px-6
6
+ py-2 md:py-4
7
+ text-xs sm:text-sm
8
+ text-gray
9
+ font-semibold
10
+
11
+ border-b
12
+ border-light-gray
13
+ ${alignment[cell.align || "left"]}
14
+ ${cell.style || ""}
15
+ `, children: cell.value }, cell.key))) }) }));
16
+ };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { TableRowCell } from "./types";
3
+ interface TableRowProps {
4
+ rowData: TableRowCell[];
5
+ style?: string;
6
+ }
7
+ export declare const TableRow: React.FC<TableRowProps>;
8
+ export {};
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { alignment } from "./alignment";
3
+ export const TableRow = ({ rowData, style }) => {
4
+ return (_jsx("tr", { className: `
5
+
6
+ transition-colors
7
+ hover:bg-gray-50
8
+ [&:last-child_td]:border-b-0
9
+
10
+
11
+ ${style || ""}
12
+ `, children: rowData.map((cell) => (_jsx("td", { className: `
13
+ px-3 sm:px-4 md:px-6
14
+ py-2 md:py-4
15
+ text-xs sm:text-sm
16
+ text-gray
17
+ whitespace-nowrap
18
+
19
+ border-b
20
+ border-light-gray
21
+
22
+
23
+
24
+ ${alignment[cell.align || "left"]}
25
+ ${cell.style || ""}
26
+ `, children: cell.value }, cell.key))) }));
27
+ };
@@ -0,0 +1,5 @@
1
+ export declare const alignment: {
2
+ readonly left: "text-left";
3
+ readonly center: "text-center";
4
+ readonly right: "text-right";
5
+ };
@@ -0,0 +1,5 @@
1
+ export const alignment = {
2
+ left: "text-left",
3
+ center: "text-center",
4
+ right: "text-right",
5
+ };
@@ -0,0 +1,5 @@
1
+ export { Ctable } from "./Ctable";
2
+ export { TableHead } from "./TableHead";
3
+ export { TableBody } from "./TableBody";
4
+ export { TableRow } from "./TableRow";
5
+ export { TableCell } from "./TableCell";
@@ -0,0 +1,5 @@
1
+ export { Ctable } from "./Ctable";
2
+ export { TableHead } from "./TableHead";
3
+ export { TableBody } from "./TableBody";
4
+ export { TableRow } from "./TableRow";
5
+ export { TableCell } from "./TableCell";
@@ -0,0 +1,13 @@
1
+ export interface TableHeadCell {
2
+ key: number;
3
+ name: string;
4
+ value: string;
5
+ align?: "left" | "center" | "right";
6
+ style?: string;
7
+ }
8
+ export interface TableRowCell {
9
+ key: number;
10
+ value: string;
11
+ align?: "left" | "center" | "right";
12
+ style?: string;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,2 +1,26 @@
1
- export * from './src/index.js'
2
- export {}
1
+ export { Button } from './component/button';
2
+ export { Card } from './component/card';
3
+ export { Cfooter } from './component/footer';
4
+ export { FooterIcon } from './component/footer';
5
+ export { FooterBottom } from './component/footer';
6
+ export { FooterContact } from './component/footer';
7
+ export { QuickLink } from './component/footer';
8
+ export { Cform } from './component/form';
9
+ export { Cheader } from './component/header';
10
+ export { Icon } from './component/header';
11
+ export { Drawer } from './component/header';
12
+ export { SearchBar } from './component/header';
13
+ export { NavBar } from './component/header';
14
+ export { Modal } from './component/modal';
15
+ export { TextField } from "./component/input";
16
+ export { CheckBox } from "./component/input";
17
+ export { Select } from "./component/input";
18
+ export { Section } from './component/section';
19
+ export { Loader } from './component/spinner';
20
+ export { LandingLayout } from './component/stories';
21
+ export { Ctable } from './component/table';
22
+ export { TableBody } from './component/table';
23
+ export { TableCell } from './component/table';
24
+ export { TableHead } from './component/table';
25
+ export { TableRow } from './component/table';
26
+ export { Breadcrumbs } from './component/breadcrumbs';
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ export { Button } from './component/button';
2
+ export { Card } from './component/card';
3
+ export { Cfooter } from './component/footer';
4
+ export { FooterIcon } from './component/footer';
5
+ export { FooterBottom } from './component/footer';
6
+ export { FooterContact } from './component/footer';
7
+ export { QuickLink } from './component/footer';
8
+ export { Cform } from './component/form';
9
+ export { Cheader } from './component/header';
10
+ export { Icon } from './component/header';
11
+ export { Drawer } from './component/header';
12
+ export { SearchBar } from './component/header';
13
+ export { NavBar } from './component/header';
14
+ export { Modal } from './component/modal';
15
+ export { TextField } from "./component/input";
16
+ export { CheckBox } from "./component/input";
17
+ export { Select } from "./component/input";
18
+ export { Section } from './component/section';
19
+ export { Loader } from './component/spinner';
20
+ export { LandingLayout } from './component/stories';
21
+ export { Ctable } from './component/table';
22
+ export { TableBody } from './component/table';
23
+ export { TableCell } from './component/table';
24
+ export { TableHead } from './component/table';
25
+ export { TableRow } from './component/table';
26
+ export { Breadcrumbs } from './component/breadcrumbs';
@@ -0,0 +1,47 @@
1
+ @import "tailwindcss";
2
+
3
+ @theme {
4
+ --color-*: initial;
5
+ --color-blue: oklch(0.4462 0.1768 263.73);
6
+ --color-green: oklch(0.3958 0.134172 142.6114);
7
+ --color-red: oklch(0.4594 0.1885 29.23);
8
+ --color-light-orange: oklch(0.792 0.1228 68.65);
9
+ --color-light-blue: oklch(0.7889 0.0903 269.59);
10
+ --color-light-green: oklch(0.757 0.193 143.64);
11
+ --color-light-red: oklch(0.7978 0.1161 19.96);
12
+ --color-white: oklch(0.9608 0.0058 264.53);
13
+ --color-black: oklch(0.2221 0 0);
14
+ --color-light-black: oklch(0.2876 0.0203 260.62);
15
+ --color-gray: oklch(0.4276 0 0);
16
+ --color-light-gray: oklch(0.7826 0 0);
17
+
18
+ --color-primary-button: oklch(0.2876 0.0203 260.62);
19
+ --color-secondary-button: oklch(0.2876 0.0203 260.62);
20
+ --color-restore-button: oklch(0.2876 0.0203 260.62);
21
+ --color-delete-button: oklch(0.2876 0.0203 260.62);
22
+ --color-disabled-button: oklch(0.2876 0.0203 260.62);
23
+
24
+ --color-primary: oklch(0.2876 0.0203 260.62);
25
+ }
26
+ @layer base {
27
+ [data-mode="light"] {
28
+ @apply bg-white text-black;
29
+ --color-primary-button: oklch(0.4462 0.1768 263.73);
30
+ --color-secondary-button: oklch(0.3946 0.0271 256.81);
31
+ --color-restore-button: oklch(0.3958 0.134172 142.6114);
32
+ --color-delete-button: oklch(0.4594 0.1885 29.23);
33
+ --color-disabled-button: oklch(0.4276 0 0);
34
+
35
+ --color-primary: oklch(1 0 0);
36
+ }
37
+ [data-mode="dark"] {
38
+ @apply bg-light-black text-white;
39
+ --color-primary-button: oklch(0.7769 0.0911 250.52);
40
+ --color-secondary-button: oklch(0.8188 0.0167 206.42);
41
+ --color-restore-button: oklch(0.757 0.193 143.64);
42
+ --color-delete-button: oklch(0.7978 0.1161 19.96);
43
+ --color-disabled-button: oklch(0.7826 0 0);
44
+
45
+ --color-primary: oklch(0.2221 0 0);
46
+ }
47
+ }