@horang-corp/react-interaction 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.
Files changed (3) hide show
  1. package/dist/index.js +61 -0
  2. package/index.d.ts +21 -0
  3. package/package.json +28 -0
package/dist/index.js ADDED
@@ -0,0 +1,61 @@
1
+ import { Box as e } from "@horang-corp/react-system/jsx";
2
+ import { mergeProps as t } from "@horang-corp/react-system/runtime";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region ../../variants/Status_Normal/react-panda/index.tsx
5
+ var r = {
6
+ StatusNormalCornerRadius: void 0,
7
+ StatusNormalCornerSmoothing: void 0,
8
+ StatusNormalWidth: "4rem",
9
+ StatusNormalHeight: "4rem"
10
+ }, i = (i) => {
11
+ let a = t(r, i);
12
+ return /* @__PURE__ */ n(e, {
13
+ width: a.StatusNormalWidth,
14
+ height: a.StatusNormalHeight,
15
+ overflow: "hidden",
16
+ rounded: a.StatusNormalCornerRadius
17
+ });
18
+ }, a = {
19
+ StatusHoveredCornerRadius: void 0,
20
+ StatusHoveredCornerSmoothing: void 0,
21
+ StatusHoveredWidth: "4rem",
22
+ StatusHoveredHeight: "4rem"
23
+ }, o = (r) => {
24
+ let i = t(a, r);
25
+ return /* @__PURE__ */ n(e, {
26
+ width: i.StatusHoveredWidth,
27
+ height: i.StatusHoveredHeight,
28
+ overflow: "hidden",
29
+ bg: "components.interactive.hover",
30
+ rounded: i.StatusHoveredCornerRadius
31
+ });
32
+ }, s = () => /* @__PURE__ */ n(e, {
33
+ width: "4rem",
34
+ height: "4rem",
35
+ overflow: "hidden",
36
+ bg: "components.interactive.focussed"
37
+ }), c = {
38
+ StatusPressedCornerRadius: void 0,
39
+ StatusPressedCornerSmoothing: void 0,
40
+ StatusPressedWidth: "4rem",
41
+ StatusPressedHeight: "4rem"
42
+ }, l = {
43
+ "Status=Normal": i,
44
+ "Status=Hovered": o,
45
+ "Status=Focussed": s,
46
+ "Status=Pressed": (r) => {
47
+ let i = t(c, r);
48
+ return /* @__PURE__ */ n(e, {
49
+ width: i.StatusPressedWidth,
50
+ height: i.StatusPressedHeight,
51
+ overflow: "hidden",
52
+ bg: "components.interactive.pressed",
53
+ rounded: i.StatusPressedCornerRadius
54
+ });
55
+ }
56
+ }, u = (e) => {
57
+ let t = l[`Status=${String(e.Status)}`] ?? i;
58
+ return t ? /* @__PURE__ */ n(t, { ...e }) : null;
59
+ };
60
+ //#endregion
61
+ export { u as Interaction, u as impl };
package/index.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import type { FC } from 'react'
2
+ import type { BoxProps } from '@horang-corp/react-system/jsx'
3
+
4
+ export interface InteractionProps extends BoxProps {
5
+ Status?: string
6
+ StatusHoveredCornerRadius?: string | number
7
+ StatusHoveredCornerSmoothing?: number
8
+ StatusHoveredHeight?: string | number
9
+ StatusHoveredWidth?: string | number
10
+ StatusNormalCornerRadius?: string | number
11
+ StatusNormalCornerSmoothing?: number
12
+ StatusNormalHeight?: string | number
13
+ StatusNormalWidth?: string | number
14
+ StatusPressedCornerRadius?: string | number
15
+ StatusPressedCornerSmoothing?: number
16
+ StatusPressedHeight?: string | number
17
+ StatusPressedWidth?: string | number
18
+ }
19
+
20
+ export declare const Interaction: FC<InteractionProps>
21
+ export declare const impl: FC<InteractionProps>
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@horang-corp/react-interaction",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "private": false,
6
+ "sideEffects": false,
7
+ "exports": {
8
+ ".": {
9
+ "types": "./index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "index.d.ts"
16
+ ],
17
+ "scripts": {
18
+ "build": "vite build",
19
+ "pack:local": "pnpm pack"
20
+ },
21
+ "peerDependencies": {
22
+ "react": "^19",
23
+ "react-dom": "^19"
24
+ },
25
+ "dependencies": {
26
+ "@horang-corp/react-system": "^0.1.1"
27
+ }
28
+ }