@g4rcez/components 0.0.1 → 0.0.2

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 (72) hide show
  1. package/package.json +11 -2
  2. package/.idea/bigweld.iml +0 -12
  3. package/.idea/codeStyles/Project.xml +0 -72
  4. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  5. package/.idea/inspectionProfiles/Project_Default.xml +0 -30
  6. package/.idea/jsLibraryMappings.xml +0 -6
  7. package/.idea/modules.xml +0 -8
  8. package/.idea/prettier.xml +0 -7
  9. package/.idea/reason.xml +0 -6
  10. package/.idea/vcs.xml +0 -6
  11. package/.prettierrc.json +0 -13
  12. package/app/client-table.tsx +0 -35
  13. package/app/favicon.ico +0 -0
  14. package/app/layout.tsx +0 -39
  15. package/app/page.tsx +0 -72
  16. package/docs/README.md +0 -36
  17. package/docs/next.config.mjs +0 -4
  18. package/docs/package.json +0 -28
  19. package/docs/pnpm-lock.yaml +0 -1030
  20. package/docs/postcss.config.mjs +0 -8
  21. package/docs/public/next.svg +0 -1
  22. package/docs/public/vercel.svg +0 -1
  23. package/docs/src/app/favicon.ico +0 -0
  24. package/docs/src/app/globals.css +0 -33
  25. package/docs/src/app/layout.tsx +0 -22
  26. package/docs/src/app/page.tsx +0 -10
  27. package/docs/tailwind.config.ts +0 -15
  28. package/docs/tsconfig.json +0 -26
  29. package/next-env.d.ts +0 -5
  30. package/next.config.mjs +0 -4
  31. package/postcss.config.mjs +0 -8
  32. package/public/next.svg +0 -1
  33. package/public/vercel.svg +0 -1
  34. package/src/components/core/button.tsx +0 -91
  35. package/src/components/core/polymorph.tsx +0 -17
  36. package/src/components/display/card.tsx +0 -8
  37. package/src/components/floating/dropdown.tsx +0 -93
  38. package/src/components/floating/tooltip.tsx +0 -67
  39. package/src/components/form/autocomplete.tsx +0 -222
  40. package/src/components/form/file-upload.tsx +0 -129
  41. package/src/components/form/form.tsx +0 -28
  42. package/src/components/form/input-field.tsx +0 -105
  43. package/src/components/form/input.tsx +0 -73
  44. package/src/components/form/select.tsx +0 -58
  45. package/src/components/form/switch.tsx +0 -40
  46. package/src/components/index.ts +0 -14
  47. package/src/components/table/filter.tsx +0 -186
  48. package/src/components/table/group.tsx +0 -123
  49. package/src/components/table/index.tsx +0 -207
  50. package/src/components/table/metadata.tsx +0 -55
  51. package/src/components/table/sort.tsx +0 -141
  52. package/src/components/table/table-lib.ts +0 -130
  53. package/src/components/table/thead.tsx +0 -108
  54. package/src/hooks/use-form.ts +0 -155
  55. package/src/hooks/use-previous.ts +0 -9
  56. package/src/hooks/use-reactive.ts +0 -10
  57. package/src/index.css +0 -37
  58. package/src/index.ts +0 -6
  59. package/src/lib/dom.ts +0 -27
  60. package/src/lib/fns.ts +0 -23
  61. package/src/styles/dark.json +0 -66
  62. package/src/styles/design-tokens.ts +0 -57
  63. package/src/styles/light.json +0 -49
  64. package/src/types.ts +0 -11
  65. package/styles.config.ts +0 -42
  66. package/tailwind.config.ts +0 -11
  67. package/tsconfig.json +0 -55
  68. package/tsconfig.lib.json +0 -50
  69. package/tsconfig.lib.tsbuildinfo +0 -1
  70. package/tsconfig.tailwind.json +0 -32
  71. package/tsconfig.tsbuildinfo +0 -1
  72. package/vite.config.mts +0 -39
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g4rcez/components",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "scripts": {
5
5
  "build": "vite build; npm run lib:types; npm run preset; npm run lib:css",
6
6
  "dev": "next dev",
@@ -29,8 +29,17 @@
29
29
  "default": "./dist/index.js"
30
30
  }
31
31
  },
32
- "./styles.config": "./dist/tailwind.config.js"
32
+ "./styles.config": {
33
+ "type": "./dist/tailwind.config.d.ts",
34
+ "import": "./dist/tailwind.config.js",
35
+ "require": "./dist/tailwind.config.js",
36
+ "default": "./dist/tailwind.config.js"
37
+ },
38
+ "./index.css": "./dist/index.css"
33
39
  },
40
+ "files": [
41
+ "dist"
42
+ ],
34
43
  "dependencies": {
35
44
  "@dnd-kit/core": "6.1.0",
36
45
  "@floating-ui/react": "0.26.19",
package/.idea/bigweld.iml DELETED
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
- <excludeFolder url="file://$MODULE_DIR$/temp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
@@ -1,72 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <HTMLCodeStyleSettings>
4
- <option name="HTML_UNIFORM_INDENT" value="true" />
5
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
6
- <option name="HTML_ENFORCE_QUOTES" value="true" />
7
- </HTMLCodeStyleSettings>
8
- <JSCodeStyleSettings version="0">
9
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
10
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
11
- <option name="FORCE_QUOTE_STYlE" value="true" />
12
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
13
- <option name="JSX_ATTRIBUTE_VALUE" value="Based on type" />
14
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
15
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
16
- </JSCodeStyleSettings>
17
- <TypeScriptCodeStyleSettings version="0">
18
- <option name="JSDOC_INCLUDE_TYPES" value="true" />
19
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
20
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
21
- <option name="USE_PUBLIC_MODIFIER" value="true" />
22
- <option name="PREFER_AS_TYPE_CAST" value="true" />
23
- <option name="FORCE_QUOTE_STYlE" value="true" />
24
- <option name="PREFER_EXPLICIT_TYPES_VARS_FIELDS" value="true" />
25
- <option name="PREFER_EXPLICIT_TYPES_FUNCTION_RETURNS" value="true" />
26
- <option name="PREFER_EXPLICIT_TYPES_FUNCTION_EXPRESSION_RETURNS" value="true" />
27
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
28
- <option name="IMPORTS_WRAP" value="0" />
29
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
30
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
31
- <option name="USE_CHAINED_CALLS_GROUP_INDENTS" value="true" />
32
- <option name="IMPORT_SORT_MODULE_NAME" value="true" />
33
- </TypeScriptCodeStyleSettings>
34
- <VueCodeStyleSettings>
35
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
36
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
37
- </VueCodeStyleSettings>
38
- <codeStyleSettings language="CSS">
39
- <arrangement>
40
- <rules>
41
- <section>
42
- <rule>
43
- <match>
44
- <NAME>.*</NAME>
45
- </match>
46
- <order>BY_NAME</order>
47
- </rule>
48
- </section>
49
- </rules>
50
- </arrangement>
51
- </codeStyleSettings>
52
- <codeStyleSettings language="HTML">
53
- <option name="SOFT_MARGINS" value="150" />
54
- <indentOptions>
55
- <option name="CONTINUATION_INDENT_SIZE" value="4" />
56
- </indentOptions>
57
- </codeStyleSettings>
58
- <codeStyleSettings language="JavaScript">
59
- <option name="SOFT_MARGINS" value="150" />
60
- </codeStyleSettings>
61
- <codeStyleSettings language="TypeScript">
62
- <option name="SOFT_MARGINS" value="150" />
63
- </codeStyleSettings>
64
- <codeStyleSettings language="Vue">
65
- <option name="SOFT_MARGINS" value="150" />
66
- <indentOptions>
67
- <option name="INDENT_SIZE" value="4" />
68
- <option name="TAB_SIZE" value="4" />
69
- </indentOptions>
70
- </codeStyleSettings>
71
- </code_scheme>
72
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,30 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="ConfusingFloatingPointLiteralJS" enabled="true" level="WARNING" enabled_by_default="true" />
5
- <inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
6
- <option name="ignoredPackages">
7
- <value>
8
- <list size="6">
9
- <item index="0" class="java.lang.String" itemvalue="ranger-fm" />
10
- <item index="1" class="java.lang.String" itemvalue="fonttools" />
11
- <item index="2" class="java.lang.String" itemvalue="greenlet" />
12
- <item index="3" class="java.lang.String" itemvalue="urllib3" />
13
- <item index="4" class="java.lang.String" itemvalue="msgpack" />
14
- <item index="5" class="java.lang.String" itemvalue="charset-normalizer" />
15
- </list>
16
- </value>
17
- </option>
18
- </inspection_tool>
19
- <inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
20
- <option name="ignoredErrors">
21
- <list>
22
- <option value="N802" />
23
- </list>
24
- </option>
25
- </inspection_tool>
26
- <inspection_tool class="ShellCheck" enabled="true" level="ERROR" enabled_by_default="true">
27
- <shellcheck_settings value="SC2034" />
28
- </inspection_tool>
29
- </profile>
30
- </component>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JavaScriptLibraryMappings">
4
- <includedPredefinedLibrary name="Node.js Core" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/bigweld.iml" filepath="$PROJECT_DIR$/.idea/bigweld.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="PrettierConfiguration">
4
- <option name="myConfigurationMode" value="MANUAL" />
5
- <option name="myRunOnReformat" value="true" />
6
- </component>
7
- </project>
package/.idea/reason.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ReasonSettings">
4
- <option name="formatColumnWidth" value="80" />
5
- </component>
6
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
package/.prettierrc.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "arrowParens": "always",
3
- "printWidth": 150,
4
- "jsxSingleQuote": false,
5
- "semi": true,
6
- "bracketSameLine": false,
7
- "bracketSpacing": true,
8
- "htmlWhitespaceSensitivity": "css",
9
- "quoteProps": "as-needed",
10
- "useTabs": false,
11
- "trailingComma": "es5",
12
- "tabWidth": 4
13
- }
@@ -1,35 +0,0 @@
1
- "use client";
2
- import { Card } from "~/components/display/card";
3
- import { Table } from "~/components/table";
4
- import { ColType, createColumns, useTablePreferences } from "~/components/table/table-lib";
5
- import { uuid } from "~/lib/fns";
6
-
7
- type State = {
8
- id: string;
9
- index: number;
10
- name: string;
11
- category: string;
12
- };
13
-
14
- const rows = Array.from({ length: 10 }).map((_, i) => ({
15
- id: uuid(),
16
- index: i,
17
- name: `Name ${i}`,
18
- category: i % 2 === 0 ? "A" : "B",
19
- }));
20
-
21
- const columns = createColumns<State>((col) => {
22
- col.add("id", "ID");
23
- col.add("name", "Name");
24
- col.add("index", "Index", { type: ColType.Number, });
25
- col.add("category", "Category");
26
- });
27
-
28
- export const ClientTable = () => {
29
- const config = useTablePreferences("table", { cols: columns });
30
- return (
31
- <Card>
32
- <Table<State> {...config} rows={rows} />
33
- </Card>
34
- );
35
- };
package/app/favicon.ico DELETED
Binary file
package/app/layout.tsx DELETED
@@ -1,39 +0,0 @@
1
- import type { Metadata } from "next";
2
- import { Inter } from "next/font/google";
3
- import "../src/index.css";
4
- import React from "react";
5
- import Dark from "~/styles/dark.json";
6
- import { createStyles, reduceTokens } from "~/styles/design-tokens";
7
- import Light from "~/styles/light.json";
8
-
9
- const inter = Inter({ subsets: ["latin"] });
10
-
11
- export const metadata: Metadata = {
12
- title: "Create Next App",
13
- description: "Generated by create next app",
14
- };
15
-
16
- export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
17
- const lightColors = createStyles.default(
18
- reduceTokens(Light.colors, (value, _, key) => ({
19
- key: `--${key}`,
20
- value: `${value}`,
21
- }))
22
- );
23
- const darkColors = createStyles.dark(
24
- reduceTokens(Dark.colors, (value, _, key) => ({
25
- key: `--${key}`,
26
- value: `${value}`,
27
- }))
28
- );
29
- return (
30
- <html className={`${inter.className} w-full h-screen dark`} lang="pt-br">
31
- <head>
32
- <title>Bigweld</title>
33
- <style>{lightColors}</style>
34
- <style>{darkColors}</style>
35
- </head>
36
- <body className={`${inter.className} w-full h-screen text-foreground bg-background`}>{children}</body>
37
- </html>
38
- );
39
- }
package/app/page.tsx DELETED
@@ -1,72 +0,0 @@
1
- "use client";
2
- import { InfoIcon } from "lucide-react";
3
- import { z } from "zod";
4
- import { Autocomplete, Button, Card, Dropdown, FileUpload, Form, Input, Select, Switch, Tooltip, useForm } from "../src";
5
- import { ClientTable } from "./client-table";
6
-
7
- const selectProps = {
8
- placeholder: "Haskell",
9
- options: [{ value: "Javascript" }, { value: "Kotlin" }, { value: "Typescript" }],
10
- required: true,
11
- name: "language",
12
- title: "Programming Language",
13
- };
14
-
15
- const schema = z.object({
16
- name: z.string(),
17
- lang: z.array(z.string()),
18
- });
19
-
20
- export default function Home() {
21
- const form = useForm(schema);
22
- return (
23
- <div className="w-full h-full">
24
- <div className="p-8 mx-auto container text-center flex flex-col gap-6">
25
- <Card>
26
- <h1 className="font-medium gap-1 flex items-center justify-center text-7xl leading-snug tracking-tight">
27
- Testing
28
- <Tooltip title={<InfoIcon size={32} />}>I'm a tooltip</Tooltip>
29
- </h1>
30
- <Dropdown trigger="Floating form">
31
- <Autocomplete {...selectProps} name="test" />
32
- <Autocomplete {...selectProps} name="test2" />
33
- <Select {...selectProps} name="test3" />
34
- <Input {...selectProps} name="test4" />
35
- </Dropdown>
36
- <Form
37
- className="space-y-4"
38
- onSubmit={form.onSubmit((e) => {
39
- console.log(e);
40
- })}
41
- >
42
- <Input
43
- {...form.input("name", {
44
- placeholder: "Document",
45
- required: true,
46
- name: "name",
47
- mask: "cpf",
48
- title: "Document",
49
- })}
50
- />
51
- <Select {...form.input("lang[0]", selectProps)} />
52
- <Autocomplete {...form.input("lang[1]", selectProps)} />
53
- <Switch>Enable preferences</Switch>
54
- <div className="flex gap-4 justify-center">
55
- <Button type="reset" disabled>
56
- Disabled
57
- </Button>
58
- <Button type="reset" loading>
59
- Loading
60
- </Button>
61
- <Button type="submit">Save</Button>
62
- </div>
63
- </Form>
64
- </Card>
65
- <ClientTable />
66
- <Card>
67
- <FileUpload id="id" />
68
- </Card>
69
- </div>
70
- </div>
71
- );
72
- }
package/docs/README.md DELETED
@@ -1,36 +0,0 @@
1
- This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2
-
3
- ## Getting Started
4
-
5
- First, run the development server:
6
-
7
- ```bash
8
- npm run dev
9
- # or
10
- yarn dev
11
- # or
12
- pnpm dev
13
- # or
14
- bun dev
15
- ```
16
-
17
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
-
19
- You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
-
21
- This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22
-
23
- ## Learn More
24
-
25
- To learn more about Next.js, take a look at the following resources:
26
-
27
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
- - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
-
30
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31
-
32
- ## Deploy on Vercel
33
-
34
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
-
36
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -1,4 +0,0 @@
1
- /** @type {import('next').NextConfig} */
2
- const nextConfig = {};
3
-
4
- export default nextConfig;
package/docs/package.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "name": "docs",
3
- "version": "0.1.0",
4
- "private": true,
5
- "scripts": {
6
- "dev": "next dev",
7
- "lib:types": "tsc -p tsconfig.lib.json",
8
- "lib:tailwind": "tsc -p tsconfig.tailwind.json",
9
- "lib:css": "tailwind -i ./src/index.css -o ./dist/index.css",
10
- "build": "vite build; tsc",
11
- "start": "next start",
12
- "lint": "next lint"
13
- },
14
- "dependencies": {
15
- "next": "14.2.4",
16
- "react": "^18",
17
- "react-dom": "^18",
18
- },
19
- "devDependencies": {
20
- "@types/node": "^20.14.10",
21
- "@types/react": "^18.3.3",
22
- "@types/react-dom": "^18.3.0",
23
- "postcss": "^8.4.39",
24
- "prettier": "3.3.2",
25
- "tailwindcss": "^3.4.1",
26
- "typescript": "^5.5.3"
27
- }
28
- }