@radix-solid-js/arrow 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/dist/index.cjs ADDED
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var solidJs = require('solid-js');
4
+ var primitiveComponent = require('@radix-solid-js/primitive-component');
5
+
6
+ // src/arrow.tsx
7
+ var defaultProps = {
8
+ width: 10,
9
+ height: 5
10
+ };
11
+ function Arrow(inProps) {
12
+ const props = solidJs.mergeProps(defaultProps, inProps);
13
+ const [local, rest] = solidJs.splitProps(props, ["children", "width", "height", "asChild"]);
14
+ return /* @__PURE__ */ React.createElement(
15
+ primitiveComponent.Primitive.svg,
16
+ {
17
+ ...rest,
18
+ width: local.width,
19
+ height: local.height,
20
+ viewBox: "0 0 30 10",
21
+ preserveAspectRatio: "none",
22
+ asChild: local.asChild
23
+ },
24
+ local.asChild ? local.children : /* @__PURE__ */ React.createElement("polygon", { points: "0,0 30,0 15,10" })
25
+ );
26
+ }
27
+
28
+ exports.Arrow = Arrow;
29
+ //# sourceMappingURL=index.cjs.map
30
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/arrow.tsx"],"names":["mergeProps","splitProps","Primitive"],"mappings":";;;;;;AAQA,IAAM,YAAA,GAAe;AAAA,EACnB,KAAA,EAAO,EAAA;AAAA,EACP,MAAA,EAAQ;AACV,CAAA;AAEA,SAAS,MAAM,OAAA,EAAqB;AAClC,EAAA,MAAM,KAAA,GAAQA,kBAAA,CAAW,YAAA,EAAc,OAAO,CAAA;AAC9C,EAAA,MAAM,CAAC,KAAA,EAAO,IAAI,CAAA,GAAIC,kBAAA,CAAW,KAAA,EAAO,CAAC,UAAA,EAAY,OAAA,EAAS,QAAA,EAAU,SAAS,CAAC,CAAA;AAElF,EAAA,uBACE,KAAA,CAAA,aAAA;AAAA,IAACC,4BAAA,CAAU,GAAA;AAAA,IAAV;AAAA,MACE,GAAI,IAAA;AAAA,MACL,OAAO,KAAA,CAAM,KAAA;AAAA,MACb,QAAQ,KAAA,CAAM,MAAA;AAAA,MACd,OAAA,EAAQ,WAAA;AAAA,MACR,mBAAA,EAAoB,MAAA;AAAA,MACpB,SAAS,KAAA,CAAM;AAAA,KAAA;AAAA,IAEd,MAAM,OAAA,GAAU,KAAA,CAAM,2BAAW,KAAA,CAAA,aAAA,CAAC,SAAA,EAAA,EAAQ,QAAO,gBAAA,EAAiB;AAAA,GACrE;AAEJ","file":"index.cjs","sourcesContent":["import { type JSX, splitProps, mergeProps } from 'solid-js';\nimport { Primitive } from '@radix-solid-js/primitive-component';\n\ninterface ArrowProps extends JSX.SvgSVGAttributes<SVGSVGElement> {\n ref?: (el: SVGSVGElement) => void;\n asChild?: boolean;\n}\n\nconst defaultProps = {\n width: 10,\n height: 5,\n};\n\nfunction Arrow(inProps: ArrowProps) {\n const props = mergeProps(defaultProps, inProps);\n const [local, rest] = splitProps(props, ['children', 'width', 'height', 'asChild']);\n\n return (\n <Primitive.svg\n {...(rest as any)}\n width={local.width}\n height={local.height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n asChild={local.asChild}\n >\n {local.asChild ? local.children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n}\n\nexport { Arrow };\nexport type { ArrowProps };\n"]}
@@ -0,0 +1,9 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ interface ArrowProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
4
+ ref?: (el: SVGSVGElement) => void;
5
+ asChild?: boolean;
6
+ }
7
+ declare function Arrow(inProps: ArrowProps): JSX.Element;
8
+
9
+ export { Arrow, type ArrowProps };
@@ -0,0 +1,9 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ interface ArrowProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
4
+ ref?: (el: SVGSVGElement) => void;
5
+ asChild?: boolean;
6
+ }
7
+ declare function Arrow(inProps: ArrowProps): JSX.Element;
8
+
9
+ export { Arrow, type ArrowProps };
package/dist/index.js ADDED
@@ -0,0 +1,28 @@
1
+ import { mergeProps, splitProps } from 'solid-js';
2
+ import { Primitive } from '@radix-solid-js/primitive-component';
3
+
4
+ // src/arrow.tsx
5
+ var defaultProps = {
6
+ width: 10,
7
+ height: 5
8
+ };
9
+ function Arrow(inProps) {
10
+ const props = mergeProps(defaultProps, inProps);
11
+ const [local, rest] = splitProps(props, ["children", "width", "height", "asChild"]);
12
+ return /* @__PURE__ */ React.createElement(
13
+ Primitive.svg,
14
+ {
15
+ ...rest,
16
+ width: local.width,
17
+ height: local.height,
18
+ viewBox: "0 0 30 10",
19
+ preserveAspectRatio: "none",
20
+ asChild: local.asChild
21
+ },
22
+ local.asChild ? local.children : /* @__PURE__ */ React.createElement("polygon", { points: "0,0 30,0 15,10" })
23
+ );
24
+ }
25
+
26
+ export { Arrow };
27
+ //# sourceMappingURL=index.js.map
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/arrow.tsx"],"names":[],"mappings":";;;;AAQA,IAAM,YAAA,GAAe;AAAA,EACnB,KAAA,EAAO,EAAA;AAAA,EACP,MAAA,EAAQ;AACV,CAAA;AAEA,SAAS,MAAM,OAAA,EAAqB;AAClC,EAAA,MAAM,KAAA,GAAQ,UAAA,CAAW,YAAA,EAAc,OAAO,CAAA;AAC9C,EAAA,MAAM,CAAC,KAAA,EAAO,IAAI,CAAA,GAAI,UAAA,CAAW,KAAA,EAAO,CAAC,UAAA,EAAY,OAAA,EAAS,QAAA,EAAU,SAAS,CAAC,CAAA;AAElF,EAAA,uBACE,KAAA,CAAA,aAAA;AAAA,IAAC,SAAA,CAAU,GAAA;AAAA,IAAV;AAAA,MACE,GAAI,IAAA;AAAA,MACL,OAAO,KAAA,CAAM,KAAA;AAAA,MACb,QAAQ,KAAA,CAAM,MAAA;AAAA,MACd,OAAA,EAAQ,WAAA;AAAA,MACR,mBAAA,EAAoB,MAAA;AAAA,MACpB,SAAS,KAAA,CAAM;AAAA,KAAA;AAAA,IAEd,MAAM,OAAA,GAAU,KAAA,CAAM,2BAAW,KAAA,CAAA,aAAA,CAAC,SAAA,EAAA,EAAQ,QAAO,gBAAA,EAAiB;AAAA,GACrE;AAEJ","file":"index.js","sourcesContent":["import { type JSX, splitProps, mergeProps } from 'solid-js';\nimport { Primitive } from '@radix-solid-js/primitive-component';\n\ninterface ArrowProps extends JSX.SvgSVGAttributes<SVGSVGElement> {\n ref?: (el: SVGSVGElement) => void;\n asChild?: boolean;\n}\n\nconst defaultProps = {\n width: 10,\n height: 5,\n};\n\nfunction Arrow(inProps: ArrowProps) {\n const props = mergeProps(defaultProps, inProps);\n const [local, rest] = splitProps(props, ['children', 'width', 'height', 'asChild']);\n\n return (\n <Primitive.svg\n {...(rest as any)}\n width={local.width}\n height={local.height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n asChild={local.asChild}\n >\n {local.asChild ? local.children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n}\n\nexport { Arrow };\nexport type { ArrowProps };\n"]}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@radix-solid-js/arrow",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "sideEffects": false,
25
+ "scripts": {
26
+ "build": "tsup",
27
+ "clean": "rm -rf dist",
28
+ "typecheck": "tsc --noEmit"
29
+ },
30
+ "dependencies": {
31
+ "@radix-solid-js/primitive-component": "workspace:*"
32
+ },
33
+ "peerDependencies": {
34
+ "solid-js": "^1.8.0"
35
+ },
36
+ "devDependencies": {
37
+ "@repo/tsconfig": "workspace:*",
38
+ "tsup": "^8.3.6",
39
+ "typescript": "^5.7.3",
40
+ "solid-js": "^1.9.3"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/ljho01/shadcn-solid-js.git",
48
+ "directory": "packages/solid/arrow"
49
+ }
50
+ }