@shopify/ui-extensions 2025.10.0-rc.45 → 2025.10.0-rc.46
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/build/ts/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +3 -1
- package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +7 -9
- package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +6 -2
- package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -2
- package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts +4 -0
- package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +9 -2
- package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +19 -20
- package/build/ts/surfaces/point-of-sale/components/SearchField/SearchField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +6 -2
- package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +9 -2
- package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +17 -2
- package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +8 -4
- package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +6 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -3
- package/src/surfaces/point-of-sale/components/Banner/examples/default.html +8 -8
- package/src/surfaces/point-of-sale/components/Box/examples/default.html +2 -2
- package/src/surfaces/point-of-sale/components/Button/examples/default.html +2 -4
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/default.html +5 -4
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/multiple-selection.jsx +9 -0
- package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +3 -1
- package/src/surfaces/point-of-sale/components/Clickable/examples/default.html +5 -2
- package/src/surfaces/point-of-sale/components/DateField/examples/default.html +2 -10
- package/src/surfaces/point-of-sale/components/DateField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/DateField.d.ts +7 -9
- package/src/surfaces/point-of-sale/components/DatePicker/examples/command-system.jsx +10 -0
- package/src/surfaces/point-of-sale/components/DatePicker/examples/default.html +4 -5
- package/src/surfaces/point-of-sale/components/DatePicker/examples/event-handling.jsx +7 -0
- package/src/surfaces/point-of-sale/components/DatePicker.d.ts +6 -2
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/command-system.jsx +10 -0
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/default.html +1 -2
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/event-handling.jsx +7 -0
- package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -2
- package/src/surfaces/point-of-sale/components/Divider/examples/default.html +1 -0
- package/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +9 -0
- package/src/surfaces/point-of-sale/components/EmailField/examples/default.html +3 -10
- package/src/surfaces/point-of-sale/components/EmailField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/EmailField.d.ts +9 -2
- package/src/surfaces/point-of-sale/components/Heading/examples/default.html +4 -5
- package/src/surfaces/point-of-sale/components/Icon/examples/default.html +4 -1
- package/src/surfaces/point-of-sale/components/Image/examples/default.html +1 -1
- package/src/surfaces/point-of-sale/components/Modal/examples/default.html +6 -8
- package/src/surfaces/point-of-sale/components/NumberField/examples/controls-constraints.jsx +9 -0
- package/src/surfaces/point-of-sale/components/NumberField/examples/default.html +5 -2
- package/src/surfaces/point-of-sale/components/NumberField/examples/input-mode.jsx +15 -0
- package/src/surfaces/point-of-sale/components/NumberField.d.ts +19 -20
- package/src/surfaces/point-of-sale/components/Page/examples/default.html +3 -4
- package/src/surfaces/point-of-sale/components/PosBlock/examples/default.html +3 -9
- package/src/surfaces/point-of-sale/components/ScrollBox/examples/default.html +5 -4
- package/src/surfaces/point-of-sale/components/SearchField/examples/default.html +1 -1
- package/src/surfaces/point-of-sale/components/SearchField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/SearchField.d.ts +6 -2
- package/src/surfaces/point-of-sale/components/Section/examples/default.html +6 -8
- package/src/surfaces/point-of-sale/components/Stack/examples/default.html +3 -3
- package/src/surfaces/point-of-sale/components/Text/examples/default.html +3 -6
- package/src/surfaces/point-of-sale/components/TextArea/examples/accessory-slot.jsx +9 -0
- package/src/surfaces/point-of-sale/components/TextArea/examples/default.html +4 -1
- package/src/surfaces/point-of-sale/components/TextArea/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/TextArea/examples/rows-configuration.jsx +7 -0
- package/src/surfaces/point-of-sale/components/TextArea.d.ts +9 -2
- package/src/surfaces/point-of-sale/components/TextField/examples/accessory-slot.jsx +5 -0
- package/src/surfaces/point-of-sale/components/TextField/examples/common-props.jsx +11 -0
- package/src/surfaces/point-of-sale/components/TextField/examples/default.html +5 -3
- package/src/surfaces/point-of-sale/components/TextField/examples/event-handling.jsx +17 -0
- package/src/surfaces/point-of-sale/components/TextField.d.ts +17 -2
- package/src/surfaces/point-of-sale/components/Tile/examples/default.html +2 -5
- package/src/surfaces/point-of-sale/components/TimeField/examples/default.html +1 -9
- package/src/surfaces/point-of-sale/components/TimeField/examples/event-handling.jsx +8 -0
- package/src/surfaces/point-of-sale/components/TimeField.d.ts +8 -4
- package/src/surfaces/point-of-sale/components/TimePicker/examples/command-system.jsx +10 -0
- package/src/surfaces/point-of-sale/components/TimePicker/examples/default.html +4 -1
- package/src/surfaces/point-of-sale/components/TimePicker/examples/event-handling.jsx +7 -0
- package/src/surfaces/point-of-sale/components/TimePicker.d.ts +6 -2
- package/src/surfaces/point-of-sale/components.d.ts +169 -72
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
<s-text>
|
|
2
|
-
<s-text
|
|
3
|
-
|
|
4
|
-
<s-text tone="success">Text</s-text>
|
|
5
|
-
<s-text tone="warning">Text</s-text>
|
|
6
|
-
<s-text tone="critical">Text</s-text>
|
|
1
|
+
<s-text>
|
|
2
|
+
<s-text type="strong">Name:</s-text> Jane Doe
|
|
3
|
+
</s-text>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<s-text-area
|
|
2
|
+
label="Customer feedback"
|
|
3
|
+
placeholder="Enter feedback..."
|
|
4
|
+
onInput={(event) => console.log('Input:', event.target.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.target.value)}
|
|
6
|
+
onFocus={(event) => console.log('Focused')}
|
|
7
|
+
onBlur={(event) => console.log('Blurred')}
|
|
8
|
+
/>
|
|
@@ -55,10 +55,17 @@ export interface TextAreaJSXProps
|
|
|
55
55
|
| 'maxLength'
|
|
56
56
|
| 'rows'
|
|
57
57
|
> {
|
|
58
|
+
/** Function called when the user makes any changes in the field. */
|
|
58
59
|
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
59
|
-
|
|
60
|
-
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
60
|
+
/** Function called after editing completes (typically on blur). */
|
|
61
61
|
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
62
|
+
/** Function called when the element loses focus. */
|
|
63
|
+
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
64
|
+
/** Function called when the element receives focus. */
|
|
65
|
+
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
66
|
+
/**
|
|
67
|
+
* Additional content to be displayed in the field. Commonly used to display clickable text.
|
|
68
|
+
*/
|
|
62
69
|
accessory?: ComponentChild;
|
|
63
70
|
}
|
|
64
71
|
declare global {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<s-text-field
|
|
2
|
+
label="Product SKU"
|
|
3
|
+
value={sku}
|
|
4
|
+
placeholder="Enter SKU"
|
|
5
|
+
details="Use format: ABC-123"
|
|
6
|
+
error={hasError ? "SKU already exists" : undefined}
|
|
7
|
+
disabled={isProcessing}
|
|
8
|
+
required
|
|
9
|
+
maxLength={20}
|
|
10
|
+
onChange={(event) => setSku(event.target.value)}
|
|
11
|
+
/>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
<s-text-field
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<s-text-field
|
|
2
|
+
label="Store name"
|
|
3
|
+
value="Snowdevil"
|
|
4
|
+
required
|
|
5
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<s-text-field
|
|
2
|
+
label="Product SKU"
|
|
3
|
+
placeholder="Enter SKU"
|
|
4
|
+
onInput={(event) => {
|
|
5
|
+
console.log('Input:', event.target.value);
|
|
6
|
+
console.log('Current error:', event.target.error);
|
|
7
|
+
}}
|
|
8
|
+
onFocus={(event) => {
|
|
9
|
+
console.log('Focused with value:', event.target.value);
|
|
10
|
+
}}
|
|
11
|
+
onBlur={(event) => {
|
|
12
|
+
console.log('Blurred with value:', event.target.value);
|
|
13
|
+
}}
|
|
14
|
+
onChange={(event) => {
|
|
15
|
+
console.log('Changed to:', event.target.value);
|
|
16
|
+
}}
|
|
17
|
+
/>
|
|
@@ -54,10 +54,25 @@ export interface TextFieldJSXProps
|
|
|
54
54
|
| 'required'
|
|
55
55
|
| 'maxLength'
|
|
56
56
|
> {
|
|
57
|
+
/**
|
|
58
|
+
* Function called when the user makes any changes in the field.
|
|
59
|
+
*/
|
|
57
60
|
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Function called after editing completes (typically on blur).
|
|
63
|
+
*/
|
|
60
64
|
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
65
|
+
/**
|
|
66
|
+
* Function called when the element loses focus.
|
|
67
|
+
*/
|
|
68
|
+
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
69
|
+
/**
|
|
70
|
+
* Function called when the element receives focus.
|
|
71
|
+
*/
|
|
72
|
+
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
73
|
+
/**
|
|
74
|
+
* Additional content to be displayed in the field. Commonly used to display clickable text.
|
|
75
|
+
*/
|
|
61
76
|
accessory?: ComponentChild;
|
|
62
77
|
}
|
|
63
78
|
declare global {
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
<s-tile heading="
|
|
2
|
-
|
|
3
|
-
<s-tile heading="Title" subheading="Subtitle" tone="accent"></s-tile>
|
|
4
|
-
|
|
5
|
-
<s-tile heading="Title" subheading="Subtitle" disabled></s-tile>
|
|
1
|
+
<s-tile heading="Extension title" subheading="Subtitle" />
|
|
2
|
+
<s-tile heading="Extension title" subheading="Subtitle" tone="accent" />
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<s-time-field
|
|
2
|
+
label="Appointment time"
|
|
3
|
+
value="14:30"
|
|
4
|
+
onInput={(event) => console.log('Input:', event.target.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.target.value)}
|
|
6
|
+
onFocus={(event) => console.log('Focused')}
|
|
7
|
+
onBlur={(event) => console.log('Blurred')}
|
|
8
|
+
/>
|
|
@@ -42,10 +42,14 @@ export interface TimeFieldJSXProps
|
|
|
42
42
|
TimeFieldProps,
|
|
43
43
|
'id' | 'label' | 'disabled' | 'value' | 'error' | 'details'
|
|
44
44
|
> {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onChange?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
45
|
+
/** Function called when the user makes any changes in the field. */
|
|
46
|
+
onInput?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
47
|
+
/** Function called after editing completes (typically on blur). */
|
|
48
|
+
onChange?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
49
|
+
/** Function called when the element loses focus. */
|
|
50
|
+
onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
51
|
+
/** Function called when the element receives focus. */
|
|
52
|
+
onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
49
53
|
}
|
|
50
54
|
declare global {
|
|
51
55
|
interface HTMLElementTagNameMap {
|
|
@@ -39,10 +39,14 @@ export interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
|
|
|
39
39
|
declare const tagName = 's-time-picker';
|
|
40
40
|
export interface TimePickerJSXProps
|
|
41
41
|
extends Pick<TimePickerProps, 'id' | 'value'> {
|
|
42
|
+
/** Function called when the user selects a time from the picker. */
|
|
43
|
+
onInput?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
44
|
+
/** Function called when the user selects a time from the picker that is different to the current value. */
|
|
45
|
+
onChange?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
46
|
+
/** Function called when the time picker is dismissed. */
|
|
42
47
|
onBlur?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
48
|
+
/** Function called when the time picker is revealed. */
|
|
43
49
|
onFocus?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
44
|
-
onChange?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
45
|
-
onInput?: (event: CallbackEvent<typeof tagName>) => void | null;
|
|
46
50
|
}
|
|
47
51
|
declare global {
|
|
48
52
|
interface HTMLElementTagNameMap {
|