@classytic/fluid 0.1.1

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.
@@ -0,0 +1,25 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ export { c as cn } from './utils-Cbsgs0XP.js';
4
+ import 'clsx';
5
+
6
+ type Background = "default" | "muted" | "primary" | "transparent";
7
+ type Padding = "none" | "sm" | "md" | "lg" | "xl";
8
+ interface SectionProps {
9
+ id?: string;
10
+ children: ReactNode;
11
+ className?: string;
12
+ background?: Background;
13
+ padding?: Padding;
14
+ }
15
+ declare function Section({ id, children, className, background, padding, }: SectionProps): react_jsx_runtime.JSX.Element;
16
+
17
+ type MaxWidth = "sm" | "md" | "lg" | "xl" | "2xl" | "4xl" | "5xl" | "6xl" | "7xl" | "full";
18
+ interface ContainerProps {
19
+ children: ReactNode;
20
+ className?: string;
21
+ maxWidth?: MaxWidth;
22
+ }
23
+ declare function Container({ children, className, maxWidth, }: ContainerProps): react_jsx_runtime.JSX.Element;
24
+
25
+ export { Container, type ContainerProps, Section, type SectionProps };
package/dist/layout.js ADDED
@@ -0,0 +1,62 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ // src/utils.ts
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+ var backgrounds = {
10
+ default: "bg-background",
11
+ muted: "bg-muted",
12
+ primary: "bg-primary text-primary-foreground",
13
+ transparent: "bg-transparent"
14
+ };
15
+ var paddings = {
16
+ none: "",
17
+ sm: "py-8 md:py-12",
18
+ md: "py-12 md:py-16",
19
+ lg: "py-16 md:py-24",
20
+ xl: "py-24 md:py-32"
21
+ };
22
+ function Section({
23
+ id,
24
+ children,
25
+ className,
26
+ background = "default",
27
+ padding = "sm"
28
+ }) {
29
+ return /* @__PURE__ */ jsx(
30
+ "section",
31
+ {
32
+ id,
33
+ className: cn(backgrounds[background], paddings[padding], className),
34
+ children
35
+ }
36
+ );
37
+ }
38
+ var maxWidthClasses = {
39
+ sm: "max-w-screen-sm",
40
+ md: "max-w-screen-md",
41
+ lg: "max-w-screen-lg",
42
+ xl: "max-w-screen-xl",
43
+ "2xl": "max-w-screen-2xl",
44
+ "4xl": "max-w-4xl",
45
+ "5xl": "max-w-5xl",
46
+ "6xl": "max-w-6xl",
47
+ "7xl": "max-w-7xl",
48
+ full: "max-w-full"
49
+ };
50
+ function Container({
51
+ children,
52
+ className,
53
+ maxWidth = "7xl"
54
+ }) {
55
+ const isFullWidth = maxWidth === "full";
56
+ const baseClass = isFullWidth ? "w-full px-4 sm:px-6 lg:px-10" : "mx-auto px-4 sm:px-6 lg:px-8";
57
+ return /* @__PURE__ */ jsx("div", { className: cn(baseClass, !isFullWidth && maxWidthClasses[maxWidth], className), children });
58
+ }
59
+
60
+ export { Container, Section, cn };
61
+ //# sourceMappingURL=layout.js.map
62
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils.ts","../src/layout/section.tsx","../src/layout/container.tsx"],"names":["jsx"],"mappings":";;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACSA,IAAM,WAAA,GAA0C;AAAA,EAC9C,OAAA,EAAS,eAAA;AAAA,EACT,KAAA,EAAO,UAAA;AAAA,EACP,OAAA,EAAS,oCAAA;AAAA,EACT,WAAA,EAAa;AACf,CAAA;AAEA,IAAM,QAAA,GAAoC;AAAA,EACxC,IAAA,EAAM,EAAA;AAAA,EACN,EAAA,EAAI,eAAA;AAAA,EACJ,EAAA,EAAI,gBAAA;AAAA,EACJ,EAAA,EAAI,gBAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEO,SAAS,OAAA,CAAQ;AAAA,EACtB,EAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA,GAAa,SAAA;AAAA,EACb,OAAA,GAAU;AACZ,CAAA,EAAiB;AACf,EAAA,uBACE,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,EAAA;AAAA,MACA,SAAA,EAAW,GAAG,WAAA,CAAY,UAAU,GAAG,QAAA,CAAS,OAAO,GAAG,SAAS,CAAA;AAAA,MAElE;AAAA;AAAA,GACH;AAEJ;ACjCA,IAAM,eAAA,GAA4C;AAAA,EAChD,EAAA,EAAI,iBAAA;AAAA,EACJ,EAAA,EAAI,iBAAA;AAAA,EACJ,EAAA,EAAI,iBAAA;AAAA,EACJ,EAAA,EAAI,iBAAA;AAAA,EACJ,KAAA,EAAO,kBAAA;AAAA,EACP,KAAA,EAAO,WAAA;AAAA,EACP,KAAA,EAAO,WAAA;AAAA,EACP,KAAA,EAAO,WAAA;AAAA,EACP,KAAA,EAAO,WAAA;AAAA,EACP,IAAA,EAAM;AACR,CAAA;AAEO,SAAS,SAAA,CAAU;AAAA,EACxB,QAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA,GAAW;AACb,CAAA,EAAmB;AACjB,EAAA,MAAM,cAAc,QAAA,KAAa,MAAA;AACjC,EAAA,MAAM,SAAA,GAAY,cACd,8BAAA,GACA,8BAAA;AAEJ,EAAA,uBACEA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,SAAA,EAAW,CAAC,WAAA,IAAe,eAAA,CAAgB,QAAQ,CAAA,EAAG,SAAS,GAC/E,QAAA,EACH,CAAA;AAEJ","file":"layout.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\r\nimport { twMerge } from \"tailwind-merge\";\r\n\r\nexport function cn(...inputs: ClassValue[]) {\r\n return twMerge(clsx(inputs));\r\n}\r\n","import { cn } from \"../utils\";\r\nimport type { ReactNode } from \"react\";\r\n\r\ntype Background = \"default\" | \"muted\" | \"primary\" | \"transparent\";\r\ntype Padding = \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\r\n\r\nexport interface SectionProps {\r\n id?: string;\r\n children: ReactNode;\r\n className?: string;\r\n background?: Background;\r\n padding?: Padding;\r\n}\r\n\r\nconst backgrounds: Record<Background, string> = {\r\n default: \"bg-background\",\r\n muted: \"bg-muted\",\r\n primary: \"bg-primary text-primary-foreground\",\r\n transparent: \"bg-transparent\",\r\n};\r\n\r\nconst paddings: Record<Padding, string> = {\r\n none: \"\",\r\n sm: \"py-8 md:py-12\",\r\n md: \"py-12 md:py-16\",\r\n lg: \"py-16 md:py-24\",\r\n xl: \"py-24 md:py-32\",\r\n};\r\n\r\nexport function Section({\r\n id,\r\n children,\r\n className,\r\n background = \"default\",\r\n padding = \"sm\",\r\n}: SectionProps) {\r\n return (\r\n <section\r\n id={id}\r\n className={cn(backgrounds[background], paddings[padding], className)}\r\n >\r\n {children}\r\n </section>\r\n );\r\n}\r\n","import { cn } from \"../utils\";\r\nimport type { ReactNode } from \"react\";\r\n\r\ntype MaxWidth = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"4xl\" | \"5xl\" | \"6xl\" | \"7xl\" | \"full\";\r\n\r\nexport interface ContainerProps {\r\n children: ReactNode;\r\n className?: string;\r\n maxWidth?: MaxWidth;\r\n}\r\n\r\nconst maxWidthClasses: Record<MaxWidth, string> = {\r\n sm: \"max-w-screen-sm\",\r\n md: \"max-w-screen-md\",\r\n lg: \"max-w-screen-lg\",\r\n xl: \"max-w-screen-xl\",\r\n \"2xl\": \"max-w-screen-2xl\",\r\n \"4xl\": \"max-w-4xl\",\r\n \"5xl\": \"max-w-5xl\",\r\n \"6xl\": \"max-w-6xl\",\r\n \"7xl\": \"max-w-7xl\",\r\n full: \"max-w-full\",\r\n};\r\n\r\nexport function Container({\r\n children,\r\n className,\r\n maxWidth = \"7xl\",\r\n}: ContainerProps) {\r\n const isFullWidth = maxWidth === \"full\";\r\n const baseClass = isFullWidth\r\n ? \"w-full px-4 sm:px-6 lg:px-10\"\r\n : \"mx-auto px-4 sm:px-6 lg:px-8\";\r\n\r\n return (\r\n <div className={cn(baseClass, !isFullWidth && maxWidthClasses[maxWidth], className)}>\r\n {children}\r\n </div>\r\n );\r\n}\r\n"]}
@@ -0,0 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ declare function cn(...inputs: ClassValue[]): string;
4
+
5
+ export { cn as c };
package/package.json ADDED
@@ -0,0 +1,111 @@
1
+ {
2
+ "name": "@classytic/fluid",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "description": "Fluid UI - Custom components built on shadcn/ui and base ui by Classytic",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./layout": {
14
+ "types": "./dist/layout.d.ts",
15
+ "import": "./dist/layout.js"
16
+ },
17
+ "./dashboard": {
18
+ "types": "./dist/dashboard.d.ts",
19
+ "import": "./dist/dashboard.js"
20
+ },
21
+ "./styles.css": "./styles.css"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "styles.css"
26
+ ],
27
+ "scripts": {
28
+ "build": "tsup && node scripts/add-use-client.js",
29
+ "dev": "tsup --watch",
30
+ "typecheck": "tsc --noEmit",
31
+ "clean": "rimraf dist",
32
+ "prepublishOnly": "npm run build"
33
+ },
34
+ "peerDependencies": {
35
+ "react": ">=18.0.0",
36
+ "react-dom": ">=18.0.0",
37
+ "lucide-react": ">=0.300.0",
38
+ "class-variance-authority": ">=0.7.0",
39
+ "clsx": ">=2.0.0",
40
+ "tailwind-merge": ">=2.0.0",
41
+ "@tanstack/react-table": ">=8.0.0",
42
+ "@radix-ui/react-slider": ">=1.0.0",
43
+ "next": ">=14.0.0",
44
+ "next-themes": ">=0.3.0",
45
+ "react-hook-form": ">=7.0.0",
46
+ "date-fns": ">=3.0.0"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "@tanstack/react-table": {
50
+ "optional": true
51
+ },
52
+ "@radix-ui/react-slider": {
53
+ "optional": true
54
+ },
55
+ "next-themes": {
56
+ "optional": true
57
+ },
58
+ "react-hook-form": {
59
+ "optional": true
60
+ },
61
+ "date-fns": {
62
+ "optional": true
63
+ }
64
+ },
65
+ "devDependencies": {
66
+ "@types/node": "^22.0.0",
67
+ "@types/react": "^19.0.0",
68
+ "@types/react-dom": "^19.0.0",
69
+ "react": "^19.0.0",
70
+ "react-dom": "^19.0.0",
71
+ "tsup": "^8.5.0",
72
+ "typescript": "^5.7.0",
73
+ "rimraf": "^5.0.0",
74
+ "lucide-react": "^0.460.0",
75
+ "class-variance-authority": "^0.7.0",
76
+ "clsx": "^2.1.0",
77
+ "tailwind-merge": "^2.2.0",
78
+ "@tanstack/react-table": "^8.21.0",
79
+ "@radix-ui/react-slider": "^1.3.0",
80
+ "next": "^15.0.0",
81
+ "next-themes": "^0.4.0",
82
+ "react-hook-form": "^7.54.0",
83
+ "date-fns": "^4.1.0"
84
+ },
85
+ "publishConfig": {
86
+ "access": "public"
87
+ },
88
+ "repository": {
89
+ "type": "git",
90
+ "url": "git+https://github.com/classytic/ui-kit.git"
91
+ },
92
+ "homepage": "https://github.com/classytic/ui-kit#readme",
93
+ "bugs": {
94
+ "url": "https://github.com/classytic/ui-kit/issues"
95
+ },
96
+ "keywords": [
97
+ "react",
98
+ "components",
99
+ "ui",
100
+ "shadcn",
101
+ "tailwind",
102
+ "fluid",
103
+ "base-ui",
104
+ "classytic"
105
+ ],
106
+ "author": "Classytic",
107
+ "license": "UNLICENSED",
108
+ "sideEffects": [
109
+ "*.css"
110
+ ]
111
+ }
package/styles.css ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @classytic/fluid - Tailwind CSS Integration
3
+ *
4
+ * Import this file in your app's global CSS to ensure all fluid
5
+ * component classes are included in production builds.
6
+ *
7
+ * Usage (in app/globals.css or similar):
8
+ * @import "@classytic/fluid/styles.css";
9
+ */
10
+
11
+ /* Scan fluid dist folder for Tailwind classes */
12
+ @source "./dist";