@opalkelly/frontpanel-react-components 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +13 -11
- package/src/primitives/Button/Button.stories.tsx +6 -1
- package/src/primitives/DigitEntry/DigitEntry.stories.tsx +5 -2
- package/src/primitives/NumberEntry/NumberEntry.stories.tsx +4 -1
- package/src/primitives/RangeSlider/RangeSlider.stories.tsx +5 -1
- package/src/primitives/SelectEntry/SelectEntry.stories.tsx +5 -1
- package/src/primitives/Toggle/Toggle.stories.tsx +5 -1
- package/src/primitives/ToggleSwitch/ToggleSwitch.stories.tsx +4 -1
package/package.json
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opalkelly/frontpanel-react-components",
|
3
|
-
"
|
3
|
+
"type": "module",
|
4
|
+
"version": "0.1.2",
|
4
5
|
"description": "React Component Library for OpalKelly FrontPanel Alloy",
|
5
6
|
"keywords": [
|
6
7
|
"FPGA",
|
@@ -27,15 +28,16 @@
|
|
27
28
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
28
29
|
"@rollup/plugin-terser": "^0.4.4",
|
29
30
|
"@rollup/plugin-typescript": "^11.1.5",
|
30
|
-
"@storybook/addon-essentials": "^
|
31
|
-
"@storybook/addon-interactions": "^
|
32
|
-
"@storybook/addon-links": "^
|
33
|
-
"@storybook/
|
34
|
-
"@storybook/
|
35
|
-
"@storybook/
|
36
|
-
"@storybook/react
|
37
|
-
"@storybook/
|
38
|
-
"@storybook/
|
31
|
+
"@storybook/addon-essentials": "^8.1.6",
|
32
|
+
"@storybook/addon-interactions": "^8.1.6",
|
33
|
+
"@storybook/addon-links": "^8.1.6",
|
34
|
+
"@storybook/addon-webpack5-compiler-swc": "^1.0.3",
|
35
|
+
"@storybook/blocks": "^8.1.6",
|
36
|
+
"@storybook/manager-api": "^8.1.6",
|
37
|
+
"@storybook/react": "^8.1.6",
|
38
|
+
"@storybook/react-webpack5": "^8.1.6",
|
39
|
+
"@storybook/test": "^8.1.6",
|
40
|
+
"@storybook/theming": "^8.1.6",
|
39
41
|
"@types/react": "^18.2.45",
|
40
42
|
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
41
43
|
"@typescript-eslint/parser": "^7.1.1",
|
@@ -48,7 +50,7 @@
|
|
48
50
|
"rollup-plugin-dts": "^6.1.0",
|
49
51
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
50
52
|
"rollup-plugin-postcss": "^4.0.2",
|
51
|
-
"storybook": "^
|
53
|
+
"storybook": "^8.1.6",
|
52
54
|
"tslib": "^2.6.2",
|
53
55
|
"typescript": "^5.3.3"
|
54
56
|
},
|
@@ -7,6 +7,8 @@
|
|
7
7
|
|
8
8
|
import type { Meta, StoryObj } from "@storybook/react";
|
9
9
|
|
10
|
+
import { fn } from "@storybook/test";
|
11
|
+
|
10
12
|
import withApplication from "../../stories/decorators/Application.decorator";
|
11
13
|
|
12
14
|
import Button from "./Button";
|
@@ -49,6 +51,9 @@ export const Primary: Story = {
|
|
49
51
|
// Optional Properties
|
50
52
|
size: 1,
|
51
53
|
disabled: false,
|
52
|
-
tooltip: "Button tooltip"
|
54
|
+
tooltip: "Button tooltip",
|
55
|
+
onButtonClick: fn(),
|
56
|
+
onButtonDown: fn(),
|
57
|
+
onButtonUp: fn()
|
53
58
|
}
|
54
59
|
};
|
@@ -9,6 +9,8 @@ import React from "react";
|
|
9
9
|
|
10
10
|
import type { Meta, StoryObj } from "@storybook/react";
|
11
11
|
|
12
|
+
import { fn } from "@storybook/test";
|
13
|
+
|
12
14
|
import { useArgs } from "@storybook/preview-api";
|
13
15
|
|
14
16
|
import DigitEntry from "./DigitEntry";
|
@@ -76,9 +78,10 @@ export const Primary: Story = {
|
|
76
78
|
value: 8,
|
77
79
|
// Optional Properties
|
78
80
|
size: 1,
|
79
|
-
numeralSystem: NumeralSystem.Decimal,
|
80
81
|
variant: "standard",
|
82
|
+
numeralSystem: NumeralSystem.Decimal,
|
81
83
|
maximum: undefined,
|
82
|
-
minimum: undefined
|
84
|
+
minimum: undefined,
|
85
|
+
onValueChanged: fn()
|
83
86
|
}
|
84
87
|
};
|
@@ -9,6 +9,8 @@ import React from "react";
|
|
9
9
|
|
10
10
|
import type { Meta, StoryObj } from "@storybook/react";
|
11
11
|
|
12
|
+
import { fn } from "@storybook/test";
|
13
|
+
|
12
14
|
import { useArgs } from "@storybook/preview-api";
|
13
15
|
|
14
16
|
import withApplication from "../../stories/decorators/Application.decorator";
|
@@ -102,7 +104,8 @@ const ComponentTemplate: Story = {
|
|
102
104
|
decimalScale: 3,
|
103
105
|
valueString: "8000",
|
104
106
|
maximumValueString: "1000000",
|
105
|
-
minimumValueString: "-1000000"
|
107
|
+
minimumValueString: "-1000000",
|
108
|
+
onValueChange: fn()
|
106
109
|
}
|
107
110
|
};
|
108
111
|
|
@@ -9,6 +9,8 @@ import React from "react";
|
|
9
9
|
|
10
10
|
import type { Meta, StoryObj } from "@storybook/react";
|
11
11
|
|
12
|
+
import { fn } from "@storybook/test";
|
13
|
+
|
12
14
|
import withApplication from "../../stories/decorators/Application.decorator";
|
13
15
|
|
14
16
|
import RangeSlider from "./RangeSlider";
|
@@ -71,6 +73,8 @@ export const Primary: Story = {
|
|
71
73
|
showThumbLabel: true,
|
72
74
|
disabled: false,
|
73
75
|
label: { text: "RangeSlider" },
|
74
|
-
tooltip: "Set value within range"
|
76
|
+
tooltip: "Set value within range",
|
77
|
+
onValueChange: fn(),
|
78
|
+
onValueCommit: fn()
|
75
79
|
}
|
76
80
|
};
|
@@ -9,6 +9,8 @@ import React from "react";
|
|
9
9
|
|
10
10
|
import type { Meta, StoryObj } from "@storybook/react";
|
11
11
|
|
12
|
+
import { fn } from "@storybook/test";
|
13
|
+
|
12
14
|
import { useArgs } from "@storybook/preview-api";
|
13
15
|
|
14
16
|
import withApplication from "../../stories/decorators/Application.decorator";
|
@@ -81,6 +83,8 @@ export const Primary: Story = {
|
|
81
83
|
horizontalPosition: "left"
|
82
84
|
},
|
83
85
|
size: 1,
|
84
|
-
tooltip: "Select an item from the list"
|
86
|
+
tooltip: "Select an item from the list",
|
87
|
+
onValueChange: fn(),
|
88
|
+
onOpenChange: fn()
|
85
89
|
}
|
86
90
|
};
|
@@ -9,6 +9,8 @@ import React from "react";
|
|
9
9
|
|
10
10
|
import type { Meta, StoryObj } from "@storybook/react";
|
11
11
|
|
12
|
+
import { fn } from "@storybook/test";
|
13
|
+
|
12
14
|
import Toggle from "./Toggle";
|
13
15
|
|
14
16
|
import { ToggleState } from "../../core";
|
@@ -56,6 +58,8 @@ export const Primary: Story = {
|
|
56
58
|
state: ToggleState.Off,
|
57
59
|
// Optional Properties
|
58
60
|
disabled: false,
|
59
|
-
size: 1
|
61
|
+
size: 1,
|
62
|
+
tooltip: "Toggle tooltip",
|
63
|
+
onToggleStateChanged: fn()
|
60
64
|
}
|
61
65
|
};
|
@@ -9,6 +9,8 @@ import React from "react";
|
|
9
9
|
|
10
10
|
import type { Meta, StoryObj } from "@storybook/react";
|
11
11
|
|
12
|
+
import { fn } from "@storybook/test";
|
13
|
+
|
12
14
|
import { useArgs } from "@storybook/preview-api";
|
13
15
|
|
14
16
|
import withApplication from "../../stories/decorators/Application.decorator";
|
@@ -67,7 +69,8 @@ const ComponentTemplate: Story = {
|
|
67
69
|
// Optional Properties
|
68
70
|
disabled: false,
|
69
71
|
size: 1,
|
70
|
-
tooltip: "Toggle switch tooltip"
|
72
|
+
tooltip: "Toggle switch tooltip",
|
73
|
+
onToggleStateChanged: fn()
|
71
74
|
}
|
72
75
|
};
|
73
76
|
|