@rpg-engine/long-bow 0.2.90 → 0.2.91

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 (38) hide show
  1. package/dist/components/Abstractions/SlotsContainer.d.ts +1 -0
  2. package/dist/components/DraggableContainer.d.ts +1 -0
  3. package/dist/components/Equipment/EquipmentSet.d.ts +6 -0
  4. package/dist/components/Input.d.ts +1 -0
  5. package/dist/components/Item/Inventory/ItemContainer.d.ts +10 -0
  6. package/dist/components/Item/Inventory/ItemQuantitySelector.d.ts +7 -0
  7. package/dist/components/Item/Inventory/ItemSlot.d.ts +7 -0
  8. package/dist/components/RangeSlider.d.ts +1 -0
  9. package/dist/index.d.ts +4 -5
  10. package/dist/long-bow.cjs.development.js +522 -220
  11. package/dist/long-bow.cjs.development.js.map +1 -1
  12. package/dist/long-bow.cjs.production.min.js +1 -1
  13. package/dist/long-bow.cjs.production.min.js.map +1 -1
  14. package/dist/long-bow.esm.js +523 -220
  15. package/dist/long-bow.esm.js.map +1 -1
  16. package/dist/stories/ItemQuantitySelector.stories.d.ts +5 -0
  17. package/package.json +1 -1
  18. package/src/components/Abstractions/SlotsContainer.tsx +3 -0
  19. package/src/components/CraftBook/CraftBook.tsx +82 -92
  20. package/src/components/CraftBook/MockItems.ts +23 -20
  21. package/src/components/DraggableContainer.tsx +3 -0
  22. package/src/components/Equipment/EquipmentSet.tsx +40 -0
  23. package/src/components/Input.tsx +6 -2
  24. package/src/components/Item/Inventory/ItemContainer.tsx +98 -6
  25. package/src/components/Item/Inventory/ItemQuantitySelector.tsx +142 -0
  26. package/src/components/Item/Inventory/ItemSlot.tsx +169 -24
  27. package/src/components/RangeSlider.tsx +37 -14
  28. package/src/index.tsx +4 -5
  29. package/src/mocks/itemContainer.mocks.ts +1 -1
  30. package/src/stories/EquipmentSet.stories.tsx +10 -0
  31. package/src/stories/ItemContainer.stories.tsx +83 -15
  32. package/src/stories/ItemQuantitySelector.stories.tsx +26 -0
  33. package/src/stories/RangeSlider.stories.tsx +10 -9
  34. package/src/.DS_Store +0 -0
  35. package/src/components/NPCDialog/.DS_Store +0 -0
  36. package/src/components/NPCDialog/img/.DS_Store +0 -0
  37. package/src/mocks/.DS_Store +0 -0
  38. package/src/mocks/atlas/.DS_Store +0 -0
@@ -0,0 +1,26 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import React from 'react';
3
+ import { RPGUIRoot } from '..';
4
+ import {
5
+ IItemQuantitySelectorProps,
6
+ ItemQuantitySelector,
7
+ } from '../components/Item/Inventory/ItemQuantitySelector';
8
+
9
+ const meta: Meta = {
10
+ title: 'Item Quantity Selector',
11
+ component: ItemQuantitySelector,
12
+ };
13
+
14
+ export default meta;
15
+
16
+ const Template: Story<IItemQuantitySelectorProps> = args => (
17
+ <RPGUIRoot>
18
+ <ItemQuantitySelector {...args} />
19
+ </RPGUIRoot>
20
+ );
21
+
22
+ export const Default = Template.bind({});
23
+
24
+ Default.args = {
25
+ quantity: 10,
26
+ };
@@ -1,5 +1,5 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
- import React from 'react';
2
+ import React, { useState } from 'react';
3
3
  import {
4
4
  IRangeSliderProps,
5
5
  RangeSlider,
@@ -43,11 +43,15 @@ const meta: Meta = {
43
43
 
44
44
  export default meta;
45
45
 
46
- const Template: Story<IRangeSliderProps> = args => (
47
- <RPGUIRoot>
48
- <RangeSlider {...args} />
49
- </RPGUIRoot>
50
- );
46
+ const Template: Story<IRangeSliderProps> = args => {
47
+ const [value, setValue] = useState(50);
48
+
49
+ return (
50
+ <RPGUIRoot>
51
+ <RangeSlider {...args} value={value} onChange={setValue} />
52
+ </RPGUIRoot>
53
+ );
54
+ };
51
55
 
52
56
  // By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
53
57
  // https://storybook.js.org/docs/react/workflows/unit-testing
@@ -57,7 +61,4 @@ Default.args = {
57
61
  type: RangeSliderType.Slider,
58
62
  valueMin: 0,
59
63
  valueMax: 100,
60
- onChange: n => {
61
- console.log('onChange', n);
62
- },
63
64
  };
package/src/.DS_Store DELETED
Binary file
Binary file
Binary file
Binary file