@nucleux/action-tile 0.1.0
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/LICENSE +21 -0
- package/dist/index.cjs +54 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nucleux
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var utils = require('@nucleux/utils');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
// src/index.tsx
|
|
29
|
+
var ActionTile = React__namespace.forwardRef(
|
|
30
|
+
({ icon, title, description, type = "button", className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
type,
|
|
35
|
+
className: utils.cn(
|
|
36
|
+
"group flex h-full w-full flex-col items-start gap-4 rounded-xl border border-border bg-background p-6 text-left transition-colors hover:border-brand/40 hover:bg-brand-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
37
|
+
className
|
|
38
|
+
),
|
|
39
|
+
...props,
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex size-12 items-center justify-center rounded-lg bg-brand-muted text-brand transition-colors group-hover:bg-brand group-hover:text-brand-foreground", children: icon }),
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col gap-1", children: [
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium text-foreground", children: title }),
|
|
44
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm leading-5 text-muted-foreground", children: description })
|
|
45
|
+
] })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
ActionTile.displayName = "ActionTile";
|
|
51
|
+
|
|
52
|
+
exports.ActionTile = ActionTile;
|
|
53
|
+
//# sourceMappingURL=index.cjs.map
|
|
54
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"names":["React","jsxs","cn","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,IAAM,UAAA,GAAmBA,gBAAA,CAAA,UAAA;AAAA,EAC9B,CAAC,EAAE,IAAA,EAAM,KAAA,EAAO,WAAA,EAAa,IAAA,GAAO,QAAA,EAAU,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBACnEC,eAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA,EAAWC,QAAA;AAAA,QACT,0SAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,+JAAA,EACb,QAAA,EAAA,IAAA,EACH,CAAA;AAAA,wBACAF,eAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,qBAAA,EACd,QAAA,EAAA;AAAA,0BAAAE,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,uCAAA,EAAyC,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,UAC9D,WAAA,oBACCA,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,2CAA2C,QAAA,EAAA,WAAA,EAAY;AAAA,SAAA,EAE3E;AAAA;AAAA;AAAA;AAGN;AACA,UAAA,CAAW,WAAA,GAAc,YAAA","file":"index.cjs","sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface ActionTileProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"title\"> {\n /** Icon shown in the accent container at the top of the tile. */\n icon: React.ReactNode;\n /** Tile title. */\n title: React.ReactNode;\n /** Supporting description below the title. */\n description?: React.ReactNode;\n}\n\n/**\n * A large, selectable action card — icon in an accent container, a title, and a\n * short description. Used for entry points like \"Record a meeting\" /\n * \"Upload a recording\" / \"Paste a link\".\n */\nexport const ActionTile = React.forwardRef<HTMLButtonElement, ActionTileProps>(\n ({ icon, title, description, type = \"button\", className, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n className={cn(\n \"group flex h-full w-full flex-col items-start gap-4 rounded-xl border border-border bg-background p-6 text-left transition-colors hover:border-brand/40 hover:bg-brand-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"inline-flex size-12 items-center justify-center rounded-lg bg-brand-muted text-brand transition-colors group-hover:bg-brand group-hover:text-brand-foreground\">\n {icon}\n </span>\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-base font-medium text-foreground\">{title}</span>\n {description && (\n <span className=\"text-sm leading-5 text-muted-foreground\">{description}</span>\n )}\n </span>\n </button>\n ),\n);\nActionTile.displayName = \"ActionTile\";\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ActionTileProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "title"> {
|
|
4
|
+
/** Icon shown in the accent container at the top of the tile. */
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
/** Tile title. */
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
/** Supporting description below the title. */
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A large, selectable action card — icon in an accent container, a title, and a
|
|
13
|
+
* short description. Used for entry points like "Record a meeting" /
|
|
14
|
+
* "Upload a recording" / "Paste a link".
|
|
15
|
+
*/
|
|
16
|
+
declare const ActionTile: React.ForwardRefExoticComponent<ActionTileProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
|
|
18
|
+
export { ActionTile, type ActionTileProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ActionTileProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "title"> {
|
|
4
|
+
/** Icon shown in the accent container at the top of the tile. */
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
/** Tile title. */
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
/** Supporting description below the title. */
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A large, selectable action card — icon in an accent container, a title, and a
|
|
13
|
+
* short description. Used for entry points like "Record a meeting" /
|
|
14
|
+
* "Upload a recording" / "Paste a link".
|
|
15
|
+
*/
|
|
16
|
+
declare const ActionTile: React.ForwardRefExoticComponent<ActionTileProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
|
|
18
|
+
export { ActionTile, type ActionTileProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cn } from '@nucleux/utils';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/index.tsx
|
|
7
|
+
var ActionTile = React.forwardRef(
|
|
8
|
+
({ icon, title, description, type = "button", className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
9
|
+
"button",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
type,
|
|
13
|
+
className: cn(
|
|
14
|
+
"group flex h-full w-full flex-col items-start gap-4 rounded-xl border border-border bg-background p-6 text-left transition-colors hover:border-brand/40 hover:bg-brand-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx("span", { className: "inline-flex size-12 items-center justify-center rounded-lg bg-brand-muted text-brand transition-colors group-hover:bg-brand group-hover:text-brand-foreground", children: icon }),
|
|
20
|
+
/* @__PURE__ */ jsxs("span", { className: "flex flex-col gap-1", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-medium text-foreground", children: title }),
|
|
22
|
+
description && /* @__PURE__ */ jsx("span", { className: "text-sm leading-5 text-muted-foreground", children: description })
|
|
23
|
+
] })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
ActionTile.displayName = "ActionTile";
|
|
29
|
+
|
|
30
|
+
export { ActionTile };
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"names":[],"mappings":";;;;;AAkBO,IAAM,UAAA,GAAmB,KAAA,CAAA,UAAA;AAAA,EAC9B,CAAC,EAAE,IAAA,EAAM,KAAA,EAAO,WAAA,EAAa,IAAA,GAAO,QAAA,EAAU,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBACnE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,0SAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,+JAAA,EACb,QAAA,EAAA,IAAA,EACH,CAAA;AAAA,wBACA,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,qBAAA,EACd,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,uCAAA,EAAyC,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,UAC9D,WAAA,oBACC,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,2CAA2C,QAAA,EAAA,WAAA,EAAY;AAAA,SAAA,EAE3E;AAAA;AAAA;AAAA;AAGN;AACA,UAAA,CAAW,WAAA,GAAc,YAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface ActionTileProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"title\"> {\n /** Icon shown in the accent container at the top of the tile. */\n icon: React.ReactNode;\n /** Tile title. */\n title: React.ReactNode;\n /** Supporting description below the title. */\n description?: React.ReactNode;\n}\n\n/**\n * A large, selectable action card — icon in an accent container, a title, and a\n * short description. Used for entry points like \"Record a meeting\" /\n * \"Upload a recording\" / \"Paste a link\".\n */\nexport const ActionTile = React.forwardRef<HTMLButtonElement, ActionTileProps>(\n ({ icon, title, description, type = \"button\", className, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n className={cn(\n \"group flex h-full w-full flex-col items-start gap-4 rounded-xl border border-border bg-background p-6 text-left transition-colors hover:border-brand/40 hover:bg-brand-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"inline-flex size-12 items-center justify-center rounded-lg bg-brand-muted text-brand transition-colors group-hover:bg-brand group-hover:text-brand-foreground\">\n {icon}\n </span>\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-base font-medium text-foreground\">{title}</span>\n {description && (\n <span className=\"text-sm leading-5 text-muted-foreground\">{description}</span>\n )}\n </span>\n </button>\n ),\n);\nActionTile.displayName = \"ActionTile\";\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nucleux/action-tile",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": ">=18",
|
|
21
|
+
"react-dom": ">=18"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@nucleux/utils": "0.1.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"tsup": "^8.3.5",
|
|
28
|
+
"typescript": "^5.7.2",
|
|
29
|
+
"@types/react": "^18.3.18",
|
|
30
|
+
"react": "^18.3.1",
|
|
31
|
+
"lucide-react": "^0.469.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/intelligaia-open-labs/nucleux.git",
|
|
40
|
+
"directory": "packages/action-tile"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/intelligaia-open-labs/nucleux#readme",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup"
|
|
45
|
+
}
|
|
46
|
+
}
|