@kirill.konshin/tailwind 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.
- package/.ctirc +19 -10
- package/.storybook/main.ts +2 -0
- package/.storybook/preview.ts +2 -0
- package/.turbo/turbo-build.log +12 -5
- package/CHANGELOG.md +8 -0
- package/dist/fullpage.d.ts +4 -3
- package/dist/fullpage.d.ts.map +1 -1
- package/dist/fullpage.js +12 -6
- package/dist/fullpage.js.map +1 -1
- package/dist/fullpage.stories.d.ts +8 -0
- package/dist/fullpage.stories.d.ts.map +1 -0
- package/dist/responsiveHelper.d.ts +2 -1
- package/dist/responsiveHelper.d.ts.map +1 -1
- package/dist/responsiveHelper.js +3 -2
- package/dist/responsiveHelper.js.map +1 -1
- package/dist/responsiveHelper.stories.d.ts +5 -0
- package/dist/responsiveHelper.stories.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/fullpage.stories.tsx +36 -0
- package/src/fullpage.tsx +18 -11
- package/src/responsiveHelper.stories.tsx +23 -0
- package/src/responsiveHelper.tsx +5 -3
- package/tailwind.config.js +7 -0
- package/tailwind.css +2 -0
package/.ctirc
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"options": [
|
|
3
|
+
{
|
|
4
|
+
"mode": "create",
|
|
5
|
+
"project": "tsconfig.json",
|
|
6
|
+
"include": "src/**/*.{ts,tsx}",
|
|
7
|
+
"exclude": [
|
|
8
|
+
"**/*.stories.*",
|
|
9
|
+
"**/*.test.*",
|
|
10
|
+
"**/*.fixture.*"
|
|
11
|
+
],
|
|
12
|
+
"startFrom": "src",
|
|
13
|
+
"backup": false,
|
|
14
|
+
"overwrite": true,
|
|
15
|
+
"generationStyle": "default-alias-named-star",
|
|
16
|
+
"output": "src",
|
|
17
|
+
"verbose": true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
[36mvite v7.0.6 [32mbuilding SSR bundle for production...[36m[39m
|
|
2
|
-
create
|
|
2
|
+
- ctix 'create' mode start, ...
|
|
3
|
+
✔ /home/runner/work/utils/utils/packages/tailwind/tsconfig.json loading complete!
|
|
4
|
+
✔ analysis export statements completed!
|
|
5
|
+
- build "index.ts" file start
|
|
6
|
+
- output file exists check, ...
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
✔ ctix 'create' mode complete!
|
|
3
10
|
transforming...
|
|
4
11
|
[32m✓[39m 3 modules transformed.
|
|
5
12
|
rendering chunks...
|
|
6
13
|
|
|
7
14
|
[vite:dts] Start generate declaration files...
|
|
8
15
|
[2mdist/[22m[36mindex.js [39m[1m[2m0.18 kB[22m[1m[22m[2m │ map: 0.09 kB[22m
|
|
9
|
-
[2mdist/[22m[36mfullpage.js [39m[1m[2m0.
|
|
10
|
-
[2mdist/[22m[36mresponsiveHelper.js [39m[1m[2m0.
|
|
11
|
-
[vite:dts] Declaration files built in
|
|
16
|
+
[2mdist/[22m[36mfullpage.js [39m[1m[2m0.42 kB[22m[1m[22m[2m │ map: 0.85 kB[22m
|
|
17
|
+
[2mdist/[22m[36mresponsiveHelper.js [39m[1m[2m0.90 kB[22m[1m[22m[2m │ map: 1.31 kB[22m
|
|
18
|
+
[vite:dts] Declaration files built in 1785ms.
|
|
12
19
|
|
|
13
|
-
[32m✓ built in
|
|
20
|
+
[32m✓ built in 5.06s[39m
|
|
14
21
|
Updated package.json with exports
|
package/CHANGELOG.md
ADDED
package/dist/fullpage.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FC, RefObject } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type FullpageProps = {
|
|
3
3
|
ref: RefObject<HTMLDivElement>;
|
|
4
|
-
className
|
|
4
|
+
className?: string;
|
|
5
5
|
children: any;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export declare const Fullpage: FC<FullpageProps>;
|
|
7
8
|
//# sourceMappingURL=fullpage.d.ts.map
|
package/dist/fullpage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullpage.d.ts","sourceRoot":"","sources":["../src/fullpage.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"fullpage.d.ts","sourceRoot":"","sources":["../src/fullpage.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAQ,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IACxB,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAUrC,CAAC"}
|
package/dist/fullpage.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
const Fullpage = memo(function Fullpage2({ ref, className = "", children, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
ref,
|
|
8
|
+
...props,
|
|
9
|
+
className: `container h-screen flex flex-col justify-center items-center ${className}`,
|
|
10
|
+
children
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
});
|
|
8
14
|
export {
|
|
9
15
|
Fullpage
|
|
10
16
|
};
|
package/dist/fullpage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullpage.js","sources":["../src/fullpage.tsx"],"sourcesContent":["import React, { FC, RefObject } from 'react';\n\nexport
|
|
1
|
+
{"version":3,"file":"fullpage.js","sources":["../src/fullpage.tsx"],"sourcesContent":["import React, { FC, memo, RefObject } from 'react';\n\nexport type FullpageProps = {\n ref: RefObject<HTMLDivElement>;\n className?: string;\n children: any;\n};\n\nexport const Fullpage: FC<FullpageProps> = memo(function Fullpage({ ref, className = '', children, ...props }) {\n return (\n <div\n ref={ref}\n {...props}\n className={`container h-screen flex flex-col justify-center items-center ${className}`}\n >\n {children}\n </div>\n );\n});\n"],"names":["Fullpage"],"mappings":";;AAQO,MAAM,WAA8B,KAAK,SAASA,UAAS,EAAE,KAAK,YAAY,IAAI,UAAU,GAAG,SAAS;AAC3G,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACG;AAAA,MACC,GAAG;AAAA,MACJ,WAAW,gEAAgE,SAAS;AAAA,MAEnF;AAAA,IAAA;AAAA,EAAA;AAGb,CAAC;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Fullpage } from './fullpage';
|
|
3
|
+
declare const meta: Meta<typeof Fullpage>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Fullpage>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithCustomClass: Story;
|
|
8
|
+
//# sourceMappingURL=fullpage.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullpage.stories.d.ts","sourceRoot":"","sources":["../src/fullpage.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,iBAAiB,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAM/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAYvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsiveHelper.d.ts","sourceRoot":"","sources":["../src/responsiveHelper.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"responsiveHelper.d.ts","sourceRoot":"","sources":["../src/responsiveHelper.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAQ,MAAM,OAAO,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAWzD,CAAC"}
|
package/dist/responsiveHelper.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
const ResponsiveHelperTW = memo(function ResponsiveHelperTW2() {
|
|
4
5
|
return /* @__PURE__ */ jsxs("span", { className: "fixed bottom-0 right-2 z-30 leading-none text-xs", children: [
|
|
5
6
|
/* @__PURE__ */ jsx("small", { className: "hidden xs:max-sm:block", children: "XS" }),
|
|
6
7
|
/* @__PURE__ */ jsx("small", { className: "hidden sm:max-md:block", children: "SM" }),
|
|
@@ -9,7 +10,7 @@ const ResponsiveHelperTW = function ResponsiveHelperTW2() {
|
|
|
9
10
|
/* @__PURE__ */ jsx("small", { className: "hidden xl:max-2xl:block", children: "XL" }),
|
|
10
11
|
/* @__PURE__ */ jsx("small", { className: "hidden 2xl:block", children: "XXL" })
|
|
11
12
|
] });
|
|
12
|
-
};
|
|
13
|
+
});
|
|
13
14
|
export {
|
|
14
15
|
ResponsiveHelperTW
|
|
15
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsiveHelper.js","sources":["../src/responsiveHelper.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC } from 'react';\n\nexport const ResponsiveHelperTW: FC<
|
|
1
|
+
{"version":3,"file":"responsiveHelper.js","sources":["../src/responsiveHelper.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC, memo } from 'react';\n\nexport type ResponsiveHelperTWProps = Record<string, never>;\n\nexport const ResponsiveHelperTW: FC<ResponsiveHelperTWProps> = memo(function ResponsiveHelperTW() {\n return (\n <span className=\"fixed bottom-0 right-2 z-30 leading-none text-xs\">\n <small className=\"hidden xs:max-sm:block\">XS</small>\n <small className=\"hidden sm:max-md:block\">SM</small>\n <small className=\"hidden md:max-lg:block\">MD</small>\n <small className=\"hidden lg:max-xl:block\">LG</small>\n <small className=\"hidden xl:max-2xl:block\">XL</small>\n <small className=\"hidden 2xl:block\">XXL</small>\n </span>\n );\n});\n"],"names":["ResponsiveHelperTW"],"mappings":";;;AAMO,MAAM,qBAAkD,KAAK,SAASA,sBAAqB;AAC9F,SACI,qBAAC,QAAA,EAAK,WAAU,oDACZ,UAAA;AAAA,IAAA,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,0BAAyB,UAAA,MAAE;AAAA,IAC5C,oBAAC,SAAA,EAAM,WAAU,2BAA0B,UAAA,MAAE;AAAA,IAC7C,oBAAC,SAAA,EAAM,WAAU,oBAAmB,UAAA,MAAA,CAAG;AAAA,EAAA,GAC3C;AAER,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsiveHelper.stories.d.ts","sourceRoot":"","sources":["../src/responsiveHelper.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,iBAAiB,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,IAMX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,OAQrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirill.konshin/tailwind",
|
|
3
3
|
"description": "Utilities",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"----- BUILD -----": "",
|
|
8
8
|
"clean": "rm -rf dist .tscache tsconfig.tsbuildinfo",
|
|
9
9
|
"build": "vite build",
|
|
10
|
-
"build:index": "
|
|
10
|
+
"build:index": "ctix build",
|
|
11
11
|
"build:check-types": "attw --pack .",
|
|
12
12
|
"start": "yarn build --watch",
|
|
13
13
|
"wait": "wait-on ./dist/index.js",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { Fullpage } from './fullpage';
|
|
4
|
+
import '../tailwind.css';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Fullpage> = {
|
|
7
|
+
title: 'Components/Fullpage',
|
|
8
|
+
component: Fullpage,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'fullscreen',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof Fullpage>;
|
|
16
|
+
|
|
17
|
+
const FullpageWrapper = (args: any) => {
|
|
18
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
19
|
+
return (
|
|
20
|
+
<Fullpage ref={ref} {...args}>
|
|
21
|
+
<h1 className="text-4xl font-bold text-blue-600">Hello Tailwind!</h1>
|
|
22
|
+
<p className="mt-4 text-gray-600">This is a fullpage component with Tailwind CSS styling.</p>
|
|
23
|
+
</Fullpage>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
render: (args) => <FullpageWrapper {...args} />,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const WithCustomClass: Story = {
|
|
32
|
+
render: (args) => <FullpageWrapper {...args} />,
|
|
33
|
+
args: {
|
|
34
|
+
className: 'bg-gray-100',
|
|
35
|
+
},
|
|
36
|
+
};
|
package/src/fullpage.tsx
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import React, { FC, RefObject } from 'react';
|
|
1
|
+
import React, { FC, memo, RefObject } from 'react';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
ref
|
|
5
|
-
className
|
|
6
|
-
children
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
export type FullpageProps = {
|
|
4
|
+
ref: RefObject<HTMLDivElement>;
|
|
5
|
+
className?: string;
|
|
6
|
+
children: any;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Fullpage: FC<FullpageProps> = memo(function Fullpage({ ref, className = '', children, ...props }) {
|
|
10
|
+
return (
|
|
11
|
+
<div
|
|
12
|
+
ref={ref}
|
|
13
|
+
{...props}
|
|
14
|
+
className={`container h-screen flex flex-col justify-center items-center ${className}`}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
2
|
+
import { ResponsiveHelperTW } from './responsiveHelper';
|
|
3
|
+
import '../tailwind.css';
|
|
4
|
+
|
|
5
|
+
const meta: Meta = {
|
|
6
|
+
title: 'Components/ResponsiveHelperTW',
|
|
7
|
+
component: ResponsiveHelperTW,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
export const Default: StoryFn = () => (
|
|
16
|
+
<div className="min-h-screen bg-gray-50 p-8">
|
|
17
|
+
<h1 className="text-2xl font-bold mb-4">Responsive Helper Demo</h1>
|
|
18
|
+
<p className="text-gray-600">
|
|
19
|
+
Resize the browser window to see the breakpoint indicator in the bottom-right corner.
|
|
20
|
+
</p>
|
|
21
|
+
<ResponsiveHelperTW />
|
|
22
|
+
</div>
|
|
23
|
+
);
|
package/src/responsiveHelper.tsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React, { FC } from 'react';
|
|
3
|
+
import React, { FC, memo } from 'react';
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export type ResponsiveHelperTWProps = Record<string, never>;
|
|
6
|
+
|
|
7
|
+
export const ResponsiveHelperTW: FC<ResponsiveHelperTWProps> = memo(function ResponsiveHelperTW() {
|
|
6
8
|
return (
|
|
7
9
|
<span className="fixed bottom-0 right-2 z-30 leading-none text-xs">
|
|
8
10
|
<small className="hidden xs:max-sm:block">XS</small>
|
|
@@ -13,4 +15,4 @@ export const ResponsiveHelperTW: FC<any> = function ResponsiveHelperTW() {
|
|
|
13
15
|
<small className="hidden 2xl:block">XXL</small>
|
|
14
16
|
</span>
|
|
15
17
|
);
|
|
16
|
-
};
|
|
18
|
+
});
|
package/tailwind.css
ADDED