@dfosco/storyboard-react-reshaped 1.14.0 → 1.15.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard-react-reshaped",
3
- "version": "1.14.0",
3
+ "version": "1.15.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/Checkbox.jsx CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/prop-types */
2
1
  import { useContext, useState, useEffect } from 'react'
3
2
  import { Checkbox as ReshapedCheckbox } from 'reshaped'
4
3
  import { FormContext, useOverride } from '@dfosco/storyboard-react'
package/src/Select.jsx CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/prop-types */
2
1
  import { useContext, useState, useEffect } from 'react'
3
2
  import { Select as ReshapedSelect } from 'reshaped'
4
3
  import { FormContext, useOverride } from '@dfosco/storyboard-react'
@@ -1,7 +1,6 @@
1
- /* eslint-disable react/prop-types */
2
1
  import { useRef, useCallback } from 'react'
3
2
  import { FormContext } from '@dfosco/storyboard-react'
4
- import { setParam } from '@dfosco/storyboard-core'
3
+ import { setParam, isHideMode, setShadow } from '@dfosco/storyboard-core'
5
4
 
6
5
  /**
7
6
  * A form wrapper that buffers input values locally and only
@@ -32,8 +31,9 @@ export default function StoryboardForm({ data, onSubmit, children, ...props }) {
32
31
  const handleSubmit = (e) => {
33
32
  e.preventDefault()
34
33
  if (prefix) {
34
+ const write = isHideMode() ? setShadow : setParam
35
35
  for (const [name, value] of Object.entries(draftsRef.current)) {
36
- setParam(`${prefix}.${name}`, value)
36
+ write(`${prefix}.${name}`, value)
37
37
  }
38
38
  }
39
39
  if (onSubmit) onSubmit(e)
package/src/TextInput.jsx CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/prop-types */
2
1
  import { useContext, useState, useEffect } from 'react'
3
2
  import { TextField } from 'reshaped'
4
3
  import { FormContext, useOverride } from '@dfosco/storyboard-react'
package/src/Textarea.jsx CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/prop-types */
2
1
  import { useContext, useState, useEffect } from 'react'
3
2
  import { TextField } from 'reshaped'
4
3
  import { FormContext, useOverride } from '@dfosco/storyboard-react'