Skip to content

Commit 2576793

Browse files
committed
Deprecate min and max props in NumberField component
1 parent 258fdd1 commit 2576793

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.changeset/silent-yaks-beam.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/ui-extensions': minor
3+
'@shopify/ui-extensions-react': minor
4+
---
5+
6+
NumberField - deprecate min and max props

packages/ui-extensions/docs/surfaces/point-of-sale/staticPages/pages/versions.doc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Refer to the [migration guide](/docs/api/pos-ui-extensions/migrating) for more i
7474
- Added optional \`tone\` property to \`Icon\` component and expanded \`name\` and \`size\` options.
7575
- Deprecated \`'minor'\`, \`'major'\`, \`'spot'\`, \`'caption'\`, \`'badge'\` as values for the \`size\` prop in the [Icon](/docs/api/pos-ui-extensions/components/icon) component. Use \`'s'\`, \`'m'\`, \`'l'\`, \`'xl'\` instead.
7676
- Deprecated \`'arrow'\`, \`'available-at-other-locations'\`, \`'collections'\`, \`'connectivity-warning'\`, \`'delivery'\`, \`'home'\`, \`'image-placeholder'\`, \`'internet'\`, \`'menu'\`, \`'orders'\`, \`'products'\`, \`'shipment'\` as values for the \`name\` prop in the [Icon](/docs/api/pos-ui-extensions/components/icon) component. See the available icon list names in the \`name\` prop documentation.
77+
- Deprecated \`max\` and \`min\` props in the [NumberField](/docs/api/pos-ui-extensions/components/numberfield) component. Implement validation logic instead.
7778
7879
**Developer Preview**:
7980
- Introduced a [Storage API](/docs/api/pos-ui-extensions/apis/storage-api). The Storage API gives the UI Extension access to store data on the POS device that the extension is running on.

packages/ui-extensions/src/surfaces/point-of-sale/render/components/NumberField/NumberField.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ import type {InputProps} from '../shared/InputField';
88
*/
99
export interface NumberFieldProps extends InputProps {
1010
inputMode?: 'decimal' | 'numeric';
11+
/**
12+
* @deprecated Implement validation logic instead. This prop will be removed in 2025-10.
13+
*/
1114
max?: number;
15+
/**
16+
* @deprecated Implement validation logic instead. This prop will be removed in 2025-10.
17+
*/
1218
min?: number;
1319
}
1420

0 commit comments

Comments
 (0)