@graphcommerce/ecommerce-ui 9.0.0-canary.89 → 9.0.0-canary.92

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @graphcommerce/ecommerce-ui
2
2
 
3
+ ## 9.0.0-canary.92
4
+
5
+ ## 9.0.0-canary.91
6
+
7
+ ## 9.0.0-canary.90
8
+
9
+ ### Patch Changes
10
+
11
+ - [#2397](https://github.com/graphcommerce-org/graphcommerce/pull/2397) [`d4d5a98`](https://github.com/graphcommerce-org/graphcommerce/commit/d4d5a983dea6d034dcbdeed9cf30fb33133dde39) - Add requireOptionSelection boolean to prevent users from deselecting configurable options ([@carlocarels90](https://github.com/carlocarels90))
12
+
3
13
  ## 9.0.0-canary.89
4
14
 
5
15
  ## 9.0.0-canary.88
@@ -4,7 +4,7 @@ import React, { MouseEventHandler } from 'react'
4
4
 
5
5
  export type ActionCardItemBase = Pick<ActionCardProps, 'value'>
6
6
 
7
- export type ActionCardDisableDeselectOption = { disableDeselectOption?: boolean }
7
+ export type ActionCardRequireOptionSelection = { requireOptionSelection?: boolean }
8
8
 
9
9
  export type ActionCardItemRenderProps<T> = ActionCardProps & {
10
10
  onReset: MouseEventHandler<HTMLElement>
@@ -17,7 +17,7 @@ export type ActionCardListFormProps<A, F extends FieldValues = FieldValues> = Om
17
17
  Omit<ControllerProps<F>, 'render'> & {
18
18
  items: A[]
19
19
  render: React.FC<ActionCardItemRenderProps<A>>
20
- } & ActionCardDisableDeselectOption
20
+ } & ActionCardRequireOptionSelection
21
21
 
22
22
  export function ActionCardListForm<
23
23
  T extends ActionCardItemBase,
@@ -35,7 +35,7 @@ export function ActionCardListForm<
35
35
  multiple,
36
36
  disabled,
37
37
  shouldUnregister,
38
- disableDeselectOption,
38
+ requireOptionSelection,
39
39
  ...other
40
40
  } = props
41
41
  const RenderItem = render as React.FC<ActionCardItemRenderProps<ActionCardItemBase>>
@@ -79,7 +79,7 @@ export function ActionCardListForm<
79
79
  selected={onSelect(item.value, value)}
80
80
  onReset={(e) => {
81
81
  e.preventDefault()
82
- if (!disableDeselectOption) onChange(null)
82
+ if (!requireOptionSelection) onChange(null)
83
83
  }}
84
84
  />
85
85
  ))}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/ecommerce-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.89",
5
+ "version": "9.0.0-canary.92",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,12 +12,12 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.89",
16
- "@graphcommerce/graphql": "^9.0.0-canary.89",
17
- "@graphcommerce/next-ui": "^9.0.0-canary.89",
18
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.89",
19
- "@graphcommerce/react-hook-form": "^9.0.0-canary.89",
20
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.89",
15
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.92",
16
+ "@graphcommerce/graphql": "^9.0.0-canary.92",
17
+ "@graphcommerce/next-ui": "^9.0.0-canary.92",
18
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.92",
19
+ "@graphcommerce/react-hook-form": "^9.0.0-canary.92",
20
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.92",
21
21
  "@lingui/core": "^4.2.1",
22
22
  "@lingui/macro": "^4.2.1",
23
23
  "@lingui/react": "^4.2.1",