@opalkelly/frontpanel-react-components 0.1.0 → 0.2.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.
Files changed (37) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/FrontPanel/FrontPanel.props.d.ts +0 -1
  4. package/dist/cjs/types/components/FrontPanelSelectEntry/FrontPanelSelectEntry.d.ts +0 -1
  5. package/dist/cjs/types/contexts/FrontPanelContext.d.ts +2 -2
  6. package/dist/cjs/types/primitives/Application/Application.props.d.ts +0 -1
  7. package/dist/cjs/types/primitives/Label/Label.props.d.ts +0 -1
  8. package/dist/cjs/types/primitives/SelectEntry/SelectEntry.d.ts +0 -1
  9. package/dist/cjs/types/primitives/Toggle/Toggle.props.d.ts +0 -1
  10. package/dist/esm/index.js +1 -1
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/types/components/FrontPanel/FrontPanel.props.d.ts +0 -1
  13. package/dist/esm/types/components/FrontPanelSelectEntry/FrontPanelSelectEntry.d.ts +0 -1
  14. package/dist/esm/types/contexts/FrontPanelContext.d.ts +2 -2
  15. package/dist/esm/types/primitives/Application/Application.props.d.ts +0 -1
  16. package/dist/esm/types/primitives/Label/Label.props.d.ts +0 -1
  17. package/dist/esm/types/primitives/SelectEntry/SelectEntry.d.ts +0 -1
  18. package/dist/esm/types/primitives/Toggle/Toggle.props.d.ts +0 -1
  19. package/dist/index.d.ts +2 -3
  20. package/package.json +17 -13
  21. package/src/components/FrontPanel/FrontPanel.tsx +1 -7
  22. package/src/components/FrontPanelIndicator/FrontPanelIndicator.tsx +8 -7
  23. package/src/components/FrontPanelNumberDisplay/FrontPanelNumberDisplay.tsx +9 -8
  24. package/src/components/FrontPanelNumberEntry/FrontPanelNumberEntry.tsx +53 -48
  25. package/src/components/FrontPanelPushButton/FrontPanelPushButton.tsx +16 -11
  26. package/src/components/FrontPanelRangeSlider/FrontPanelRangeSlider.tsx +20 -15
  27. package/src/components/FrontPanelSelectEntry/FrontPanelSelectEntryRoot.tsx +57 -51
  28. package/src/components/FrontPanelToggleSwitch/FrontPanelToggleSwitch.tsx +20 -18
  29. package/src/components/FrontPanelTriggerButton/FrontPanelTriggerButton.tsx +15 -6
  30. package/src/contexts/FrontPanelContext.ts +3 -6
  31. package/src/primitives/Button/Button.stories.tsx +6 -1
  32. package/src/primitives/DigitEntry/DigitEntry.stories.tsx +5 -2
  33. package/src/primitives/NumberEntry/NumberEntry.stories.tsx +4 -1
  34. package/src/primitives/RangeSlider/RangeSlider.stories.tsx +5 -1
  35. package/src/primitives/SelectEntry/SelectEntry.stories.tsx +5 -1
  36. package/src/primitives/Toggle/Toggle.stories.tsx +5 -1
  37. package/src/primitives/ToggleSwitch/ToggleSwitch.stories.tsx +4 -1
@@ -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