@dfosco/storyboard-react-primer 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-primer",
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 PrimerCheckbox } from '@primer/react'
4
3
  import { FormContext } 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 PrimerSelect } from '@primer/react'
4
3
  import { FormContext } 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
@@ -42,10 +41,11 @@ export default function StoryboardForm({ data, onSubmit, children, ...props }) {
42
41
 
43
42
  const handleSubmit = (e) => {
44
43
  e.preventDefault()
45
- // Flush all draft values to session hash params
44
+ // Flush all draft values to session hash in normal mode, shadow in hide mode
46
45
  if (prefix) {
46
+ const write = isHideMode() ? setShadow : setParam
47
47
  for (const [name, value] of Object.entries(draftsRef.current)) {
48
- setParam(`${prefix}.${name}`, value)
48
+ write(`${prefix}.${name}`, value)
49
49
  }
50
50
  }
51
51
  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 { TextInput as PrimerTextInput } from '@primer/react'
4
3
  import { FormContext } 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 { Textarea as PrimerTextarea } from '@primer/react'
4
3
  import { FormContext } from '@dfosco/storyboard-react'