@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.
Files changed (86) hide show
  1. package/build/ts/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
  2. package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +3 -1
  3. package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
  4. package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +7 -9
  5. package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
  6. package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +6 -2
  7. package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
  8. package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -2
  9. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts +4 -0
  10. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -0
  11. package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
  12. package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +9 -2
  13. package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.doc.d.ts.map +1 -1
  14. package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +19 -20
  15. package/build/ts/surfaces/point-of-sale/components/SearchField/SearchField.doc.d.ts.map +1 -1
  16. package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +6 -2
  17. package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.doc.d.ts.map +1 -1
  18. package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +9 -2
  19. package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
  20. package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +17 -2
  21. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
  22. package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +8 -4
  23. package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
  24. package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +6 -2
  25. package/build/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +13 -3
  27. package/src/surfaces/point-of-sale/components/Banner/examples/default.html +8 -8
  28. package/src/surfaces/point-of-sale/components/Box/examples/default.html +2 -2
  29. package/src/surfaces/point-of-sale/components/Button/examples/default.html +2 -4
  30. package/src/surfaces/point-of-sale/components/ChoiceList/examples/default.html +5 -4
  31. package/src/surfaces/point-of-sale/components/ChoiceList/examples/event-handling.jsx +8 -0
  32. package/src/surfaces/point-of-sale/components/ChoiceList/examples/multiple-selection.jsx +9 -0
  33. package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +3 -1
  34. package/src/surfaces/point-of-sale/components/Clickable/examples/default.html +5 -2
  35. package/src/surfaces/point-of-sale/components/DateField/examples/default.html +2 -10
  36. package/src/surfaces/point-of-sale/components/DateField/examples/event-handling.jsx +8 -0
  37. package/src/surfaces/point-of-sale/components/DateField.d.ts +7 -9
  38. package/src/surfaces/point-of-sale/components/DatePicker/examples/command-system.jsx +10 -0
  39. package/src/surfaces/point-of-sale/components/DatePicker/examples/default.html +4 -5
  40. package/src/surfaces/point-of-sale/components/DatePicker/examples/event-handling.jsx +7 -0
  41. package/src/surfaces/point-of-sale/components/DatePicker.d.ts +6 -2
  42. package/src/surfaces/point-of-sale/components/DateSpinner/examples/command-system.jsx +10 -0
  43. package/src/surfaces/point-of-sale/components/DateSpinner/examples/default.html +1 -2
  44. package/src/surfaces/point-of-sale/components/DateSpinner/examples/event-handling.jsx +7 -0
  45. package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -2
  46. package/src/surfaces/point-of-sale/components/Divider/examples/default.html +1 -0
  47. package/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +9 -0
  48. package/src/surfaces/point-of-sale/components/EmailField/examples/default.html +3 -10
  49. package/src/surfaces/point-of-sale/components/EmailField/examples/event-handling.jsx +8 -0
  50. package/src/surfaces/point-of-sale/components/EmailField.d.ts +9 -2
  51. package/src/surfaces/point-of-sale/components/Heading/examples/default.html +4 -5
  52. package/src/surfaces/point-of-sale/components/Icon/examples/default.html +4 -1
  53. package/src/surfaces/point-of-sale/components/Image/examples/default.html +1 -1
  54. package/src/surfaces/point-of-sale/components/Modal/examples/default.html +6 -8
  55. package/src/surfaces/point-of-sale/components/NumberField/examples/controls-constraints.jsx +9 -0
  56. package/src/surfaces/point-of-sale/components/NumberField/examples/default.html +5 -2
  57. package/src/surfaces/point-of-sale/components/NumberField/examples/input-mode.jsx +15 -0
  58. package/src/surfaces/point-of-sale/components/NumberField.d.ts +19 -20
  59. package/src/surfaces/point-of-sale/components/Page/examples/default.html +3 -4
  60. package/src/surfaces/point-of-sale/components/PosBlock/examples/default.html +3 -9
  61. package/src/surfaces/point-of-sale/components/ScrollBox/examples/default.html +5 -4
  62. package/src/surfaces/point-of-sale/components/SearchField/examples/default.html +1 -1
  63. package/src/surfaces/point-of-sale/components/SearchField/examples/event-handling.jsx +8 -0
  64. package/src/surfaces/point-of-sale/components/SearchField.d.ts +6 -2
  65. package/src/surfaces/point-of-sale/components/Section/examples/default.html +6 -8
  66. package/src/surfaces/point-of-sale/components/Stack/examples/default.html +3 -3
  67. package/src/surfaces/point-of-sale/components/Text/examples/default.html +3 -6
  68. package/src/surfaces/point-of-sale/components/TextArea/examples/accessory-slot.jsx +9 -0
  69. package/src/surfaces/point-of-sale/components/TextArea/examples/default.html +4 -1
  70. package/src/surfaces/point-of-sale/components/TextArea/examples/event-handling.jsx +8 -0
  71. package/src/surfaces/point-of-sale/components/TextArea/examples/rows-configuration.jsx +7 -0
  72. package/src/surfaces/point-of-sale/components/TextArea.d.ts +9 -2
  73. package/src/surfaces/point-of-sale/components/TextField/examples/accessory-slot.jsx +5 -0
  74. package/src/surfaces/point-of-sale/components/TextField/examples/common-props.jsx +11 -0
  75. package/src/surfaces/point-of-sale/components/TextField/examples/default.html +5 -3
  76. package/src/surfaces/point-of-sale/components/TextField/examples/event-handling.jsx +17 -0
  77. package/src/surfaces/point-of-sale/components/TextField.d.ts +17 -2
  78. package/src/surfaces/point-of-sale/components/Tile/examples/default.html +2 -5
  79. package/src/surfaces/point-of-sale/components/TimeField/examples/default.html +1 -9
  80. package/src/surfaces/point-of-sale/components/TimeField/examples/event-handling.jsx +8 -0
  81. package/src/surfaces/point-of-sale/components/TimeField.d.ts +8 -4
  82. package/src/surfaces/point-of-sale/components/TimePicker/examples/command-system.jsx +10 -0
  83. package/src/surfaces/point-of-sale/components/TimePicker/examples/default.html +4 -1
  84. package/src/surfaces/point-of-sale/components/TimePicker/examples/event-handling.jsx +7 -0
  85. package/src/surfaces/point-of-sale/components/TimePicker.d.ts +6 -2
  86. package/src/surfaces/point-of-sale/components.d.ts +169 -72
@@ -1,6 +1,3 @@
1
- <s-text>Text</s-text>
2
- <s-text color="subdued">Text</s-text>
3
- <s-text tone="info">Text</s-text>
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,9 @@
1
+ <s-text-area
2
+ label="Product description"
3
+ placeholder="Enter product details..."
4
+ value="This is a sample product description"
5
+ >
6
+ <s-button slot="accessory" onClick={() => console.log('Clear')}>
7
+ Clear
8
+ </s-button>
9
+ </s-text-area>;
@@ -1 +1,4 @@
1
- <s-text-area label="Add note" placeholder="Enter a custom note" value="Custom note" ></s-text-area>
1
+ <s-text-area
2
+ label="Shipping address"
3
+ value="1776 Barnes Street, Orlando, FL 32801"
4
+ />
@@ -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
+ />
@@ -0,0 +1,7 @@
1
+ <s-text-area
2
+ label="Order notes"
3
+ placeholder="Add special instructions..."
4
+ rows={5}
5
+ maxLength={500}
6
+ onInput={(event) => console.log('Characters:', event.target.value.length)}
7
+ />
@@ -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
- onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
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,5 @@
1
+ <s-text-field label="Discount code" value="SUMMER2024">
2
+ <s-button slot="accessory" onClick={() => console.log('Apply discount')}>
3
+ Apply
4
+ </s-button>
5
+ </s-text-field>;
@@ -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 label="Label" required value=""></s-text-field>
2
- <s-text-field label="Label" required value="Content"></s-text-field>
3
- <s-text-field label="Label" required value="Content" error="Error message"></s-text-field>
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
- onFocus?: ((event: CallbackEvent<typeof tagName>) => void) | null;
59
- onBlur?: ((event: CallbackEvent<typeof tagName>) => void) | null;
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="Title" subheading="Subtitle" itemCount={2} tone="accent"></s-tile>
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" />
@@ -1,12 +1,4 @@
1
1
  <s-time-field
2
2
  label="Time"
3
3
  value="11:42"
4
- details="Select a time">
5
- </s-time-field>
6
-
7
- <s-time-field
8
- label="Time"
9
- value="11:42"
10
- details="Select a time"
11
- error="Time out of range">
12
- </s-time-field>
4
+ />
@@ -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
- onBlur?: (event: CallbackEvent<typeof tagName>) => void | null;
46
- onFocus?: (event: CallbackEvent<typeof tagName>) => void | null;
47
- onInput?: (event: CallbackEvent<typeof tagName>) => void | null;
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 {
@@ -0,0 +1,10 @@
1
+ <>
2
+ <s-button command="--show" commandFor="time-picker">
3
+ Select Time
4
+ </s-button>
5
+ <s-time-picker
6
+ id="time-picker"
7
+ value="14:30"
8
+ onChange={(event) => console.log('Time selected:', event.target.value)}
9
+ />
10
+ </>;
@@ -1,4 +1,7 @@
1
1
  <s-button command="--show" commandFor="time-picker">
2
2
  Show
3
3
  </s-button>
4
- <s-time-picker value="9:41" id="time-picker" onChange={onTimeChange} />
4
+ <s-time-picker
5
+ value="9:41"
6
+ id="time-picker"
7
+ />
@@ -0,0 +1,7 @@
1
+ <s-time-picker
2
+ value="14:30"
3
+ onInput={(event) => console.log('Input:', event.target.value)}
4
+ onChange={(event) => console.log('Change:', event.target.value)}
5
+ onFocus={(event) => console.log('Focused')}
6
+ onBlur={(event) => console.log('Blurred')}
7
+ />
@@ -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 {