@shopify/ui-extensions 2025.10.0-rc.44 → 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 (122) hide show
  1. package/build/ts/docs/shared/components/ColorField.d.ts.map +1 -1
  2. package/build/ts/surfaces/admin/api/intents/intents.d.ts +132 -0
  3. package/build/ts/surfaces/admin/api/intents/intents.d.ts.map +1 -0
  4. package/build/ts/surfaces/admin/api/intents/intents.doc.d.ts +4 -0
  5. package/build/ts/surfaces/admin/api/intents/intents.doc.d.ts.map +1 -0
  6. package/build/ts/surfaces/admin/api/standard/standard.d.ts +2 -7
  7. package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -1
  8. package/build/ts/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
  9. package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +3 -1
  10. package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
  11. package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +7 -9
  12. package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
  13. package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +6 -2
  14. package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
  15. package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -2
  16. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts +4 -0
  17. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -0
  18. package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
  19. package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +9 -2
  20. package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.doc.d.ts.map +1 -1
  21. package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +19 -20
  22. package/build/ts/surfaces/point-of-sale/components/SearchField/SearchField.doc.d.ts.map +1 -1
  23. package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +6 -2
  24. package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.doc.d.ts.map +1 -1
  25. package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +9 -2
  26. package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
  27. package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +17 -2
  28. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
  29. package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +8 -4
  30. package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
  31. package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +6 -2
  32. package/build/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +13 -3
  34. package/src/docs/shared/components/ColorField.ts +2 -1
  35. package/src/surfaces/admin/api/intents/examples/create-article.js +9 -0
  36. package/src/surfaces/admin/api/intents/examples/create-catalog.js +9 -0
  37. package/src/surfaces/admin/api/intents/examples/create-collection.js +9 -0
  38. package/src/surfaces/admin/api/intents/examples/create-customer.js +9 -0
  39. package/src/surfaces/admin/api/intents/examples/create-discount.js +11 -0
  40. package/src/surfaces/admin/api/intents/examples/create-market.js +9 -0
  41. package/src/surfaces/admin/api/intents/examples/create-menu.js +9 -0
  42. package/src/surfaces/admin/api/intents/examples/create-metafield-definition.js +11 -0
  43. package/src/surfaces/admin/api/intents/examples/create-metaobject-definition.js +9 -0
  44. package/src/surfaces/admin/api/intents/examples/create-metaobject.js +11 -0
  45. package/src/surfaces/admin/api/intents/examples/create-page.js +9 -0
  46. package/src/surfaces/admin/api/intents/examples/create-product.js +9 -0
  47. package/src/surfaces/admin/api/intents/examples/create-variant.js +11 -0
  48. package/src/surfaces/admin/api/intents/examples/edit-article.js +11 -0
  49. package/src/surfaces/admin/api/intents/examples/edit-catalog.js +11 -0
  50. package/src/surfaces/admin/api/intents/examples/edit-collection.js +11 -0
  51. package/src/surfaces/admin/api/intents/examples/edit-customer.js +11 -0
  52. package/src/surfaces/admin/api/intents/examples/edit-discount.js +11 -0
  53. package/src/surfaces/admin/api/intents/examples/edit-market.js +11 -0
  54. package/src/surfaces/admin/api/intents/examples/edit-menu.js +11 -0
  55. package/src/surfaces/admin/api/intents/examples/edit-metafield-definition.js +11 -0
  56. package/src/surfaces/admin/api/intents/examples/edit-metaobject-definition.js +11 -0
  57. package/src/surfaces/admin/api/intents/examples/edit-metaobject.js +11 -0
  58. package/src/surfaces/admin/api/intents/examples/edit-page.js +11 -0
  59. package/src/surfaces/admin/api/intents/examples/edit-product.js +11 -0
  60. package/src/surfaces/admin/api/intents/examples/edit-variant.js +11 -0
  61. package/src/surfaces/admin/api/intents/intents.ts +153 -0
  62. package/src/surfaces/admin/api/standard/standard.ts +2 -6
  63. package/src/surfaces/point-of-sale/components/Banner/examples/default.html +8 -8
  64. package/src/surfaces/point-of-sale/components/Box/examples/default.html +2 -2
  65. package/src/surfaces/point-of-sale/components/Button/examples/default.html +2 -4
  66. package/src/surfaces/point-of-sale/components/ChoiceList/examples/default.html +5 -4
  67. package/src/surfaces/point-of-sale/components/ChoiceList/examples/event-handling.jsx +8 -0
  68. package/src/surfaces/point-of-sale/components/ChoiceList/examples/multiple-selection.jsx +9 -0
  69. package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +3 -1
  70. package/src/surfaces/point-of-sale/components/Clickable/examples/default.html +5 -2
  71. package/src/surfaces/point-of-sale/components/DateField/examples/default.html +2 -10
  72. package/src/surfaces/point-of-sale/components/DateField/examples/event-handling.jsx +8 -0
  73. package/src/surfaces/point-of-sale/components/DateField.d.ts +7 -9
  74. package/src/surfaces/point-of-sale/components/DatePicker/examples/command-system.jsx +10 -0
  75. package/src/surfaces/point-of-sale/components/DatePicker/examples/default.html +4 -5
  76. package/src/surfaces/point-of-sale/components/DatePicker/examples/event-handling.jsx +7 -0
  77. package/src/surfaces/point-of-sale/components/DatePicker.d.ts +6 -2
  78. package/src/surfaces/point-of-sale/components/DateSpinner/examples/command-system.jsx +10 -0
  79. package/src/surfaces/point-of-sale/components/DateSpinner/examples/default.html +1 -2
  80. package/src/surfaces/point-of-sale/components/DateSpinner/examples/event-handling.jsx +7 -0
  81. package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +10 -2
  82. package/src/surfaces/point-of-sale/components/Divider/examples/default.html +1 -0
  83. package/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +9 -0
  84. package/src/surfaces/point-of-sale/components/EmailField/examples/default.html +3 -10
  85. package/src/surfaces/point-of-sale/components/EmailField/examples/event-handling.jsx +8 -0
  86. package/src/surfaces/point-of-sale/components/EmailField.d.ts +9 -2
  87. package/src/surfaces/point-of-sale/components/Heading/examples/default.html +4 -5
  88. package/src/surfaces/point-of-sale/components/Icon/examples/default.html +4 -1
  89. package/src/surfaces/point-of-sale/components/Image/examples/default.html +1 -1
  90. package/src/surfaces/point-of-sale/components/Modal/examples/default.html +6 -8
  91. package/src/surfaces/point-of-sale/components/NumberField/examples/controls-constraints.jsx +9 -0
  92. package/src/surfaces/point-of-sale/components/NumberField/examples/default.html +5 -2
  93. package/src/surfaces/point-of-sale/components/NumberField/examples/input-mode.jsx +15 -0
  94. package/src/surfaces/point-of-sale/components/NumberField.d.ts +19 -20
  95. package/src/surfaces/point-of-sale/components/Page/examples/default.html +3 -4
  96. package/src/surfaces/point-of-sale/components/PosBlock/examples/default.html +3 -9
  97. package/src/surfaces/point-of-sale/components/ScrollBox/examples/default.html +5 -4
  98. package/src/surfaces/point-of-sale/components/SearchField/examples/default.html +1 -1
  99. package/src/surfaces/point-of-sale/components/SearchField/examples/event-handling.jsx +8 -0
  100. package/src/surfaces/point-of-sale/components/SearchField.d.ts +6 -2
  101. package/src/surfaces/point-of-sale/components/Section/examples/default.html +6 -8
  102. package/src/surfaces/point-of-sale/components/Stack/examples/default.html +3 -3
  103. package/src/surfaces/point-of-sale/components/Text/examples/default.html +3 -6
  104. package/src/surfaces/point-of-sale/components/TextArea/examples/accessory-slot.jsx +9 -0
  105. package/src/surfaces/point-of-sale/components/TextArea/examples/default.html +4 -1
  106. package/src/surfaces/point-of-sale/components/TextArea/examples/event-handling.jsx +8 -0
  107. package/src/surfaces/point-of-sale/components/TextArea/examples/rows-configuration.jsx +7 -0
  108. package/src/surfaces/point-of-sale/components/TextArea.d.ts +9 -2
  109. package/src/surfaces/point-of-sale/components/TextField/examples/accessory-slot.jsx +5 -0
  110. package/src/surfaces/point-of-sale/components/TextField/examples/common-props.jsx +11 -0
  111. package/src/surfaces/point-of-sale/components/TextField/examples/default.html +5 -3
  112. package/src/surfaces/point-of-sale/components/TextField/examples/event-handling.jsx +17 -0
  113. package/src/surfaces/point-of-sale/components/TextField.d.ts +17 -2
  114. package/src/surfaces/point-of-sale/components/Tile/examples/default.html +2 -5
  115. package/src/surfaces/point-of-sale/components/TimeField/examples/default.html +1 -9
  116. package/src/surfaces/point-of-sale/components/TimeField/examples/event-handling.jsx +8 -0
  117. package/src/surfaces/point-of-sale/components/TimeField.d.ts +8 -4
  118. package/src/surfaces/point-of-sale/components/TimePicker/examples/command-system.jsx +10 -0
  119. package/src/surfaces/point-of-sale/components/TimePicker/examples/default.html +4 -1
  120. package/src/surfaces/point-of-sale/components/TimePicker/examples/event-handling.jsx +7 -0
  121. package/src/surfaces/point-of-sale/components/TimePicker.d.ts +6 -2
  122. package/src/surfaces/point-of-sale/components.d.ts +169 -72
@@ -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 {
@@ -3793,8 +3793,10 @@ declare module 'preact' {
3793
3793
  declare const tagName$k = 's-choice-list';
3794
3794
  interface ChoiceListJSXProps
3795
3795
  extends Pick<ChoiceListProps, 'values' | 'multiple'> {
3796
- onChange?: ((event: CallbackEvent<typeof tagName$k>) => void) | null;
3796
+ /** Function called when the user changes a choice. Fires simultaneously with onChange. */
3797
3797
  onInput?: ((event: CallbackEvent<typeof tagName$k>) => void) | null;
3798
+ /** Function called when the user changes a choice. Fires simultaneously with onInput. */
3799
+ onChange?: ((event: CallbackEvent<typeof tagName$k>) => void) | null;
3798
3800
  children?: ComponentChildren;
3799
3801
  }
3800
3802
  declare global {
@@ -3867,10 +3869,25 @@ interface TextFieldJSXProps
3867
3869
  | 'required'
3868
3870
  | 'maxLength'
3869
3871
  > {
3872
+ /**
3873
+ * Function called when the user makes any changes in the field.
3874
+ */
3870
3875
  onInput?: ((event: CallbackEvent<typeof tagName$h>) => void) | null;
3871
- onFocus?: ((event: CallbackEvent<typeof tagName$h>) => void) | null;
3872
- onBlur?: ((event: CallbackEvent<typeof tagName$h>) => void) | null;
3876
+ /**
3877
+ * Function called after editing completes (typically on blur).
3878
+ */
3873
3879
  onChange?: ((event: CallbackEvent<typeof tagName$h>) => void) | null;
3880
+ /**
3881
+ * Function called when the element loses focus.
3882
+ */
3883
+ onBlur?: ((event: CallbackEvent<typeof tagName$h>) => void) | null;
3884
+ /**
3885
+ * Function called when the element receives focus.
3886
+ */
3887
+ onFocus?: ((event: CallbackEvent<typeof tagName$h>) => void) | null;
3888
+ /**
3889
+ * Additional content to be displayed in the field. Commonly used to display clickable text.
3890
+ */
3874
3891
  accessory?: ComponentChild;
3875
3892
  }
3876
3893
  declare global {
@@ -3890,10 +3907,14 @@ declare module 'preact' {
3890
3907
  declare const tagName$g = 's-search-field';
3891
3908
  interface SearchFieldJSXProps
3892
3909
  extends Pick<SearchFieldProps, 'disabled' | 'placeholder' | 'value'> {
3893
- onFocus?: ((event: CallbackEvent<typeof tagName$g>) => void) | null;
3894
- onBlur?: ((event: CallbackEvent<typeof tagName$g>) => void) | null;
3910
+ /** Function called when the user changes the value in the field. */
3895
3911
  onInput?: ((event: CallbackEvent<typeof tagName$g>) => void) | null;
3912
+ /** Function called when the field loses focus after the user changes the value in the field. */
3896
3913
  onChange?: ((event: CallbackEvent<typeof tagName$g>) => void) | null;
3914
+ /** Function called when the field loses focus. */
3915
+ onBlur?: ((event: CallbackEvent<typeof tagName$g>) => void) | null;
3916
+ /** Function called when the field is focused. */
3917
+ onFocus?: ((event: CallbackEvent<typeof tagName$g>) => void) | null;
3897
3918
  }
3898
3919
  declare global {
3899
3920
  interface HTMLElementTagNameMap {
@@ -3922,10 +3943,17 @@ interface EmailFieldJSXProps
3922
3943
  | 'maxLength'
3923
3944
  | 'details'
3924
3945
  > {
3946
+ /** Function called when the user makes any changes in the field. */
3925
3947
  onInput?: ((event: CallbackEvent<typeof tagName$f>) => void) | null;
3926
- onFocus?: ((event: CallbackEvent<typeof tagName$f>) => void) | null;
3927
- onBlur?: ((event: CallbackEvent<typeof tagName$f>) => void) | null;
3948
+ /** Function called after editing completes (typically on blur). */
3928
3949
  onChange?: ((event: CallbackEvent<typeof tagName$f>) => void) | null;
3950
+ /** Function called when the element loses focus. */
3951
+ onBlur?: ((event: CallbackEvent<typeof tagName$f>) => void) | null;
3952
+ /** Function called when the element receives focus. */
3953
+ onFocus?: ((event: CallbackEvent<typeof tagName$f>) => void) | null;
3954
+ /**
3955
+ * Additional content to be displayed in the field. Commonly used to display clickable text.
3956
+ */
3929
3957
  accessory?: ComponentChild;
3930
3958
  }
3931
3959
  declare global {
@@ -3975,10 +4003,17 @@ interface TextAreaJSXProps
3975
4003
  | 'maxLength'
3976
4004
  | 'rows'
3977
4005
  > {
4006
+ /** Function called when the user makes any changes in the field. */
3978
4007
  onInput?: ((event: CallbackEvent<typeof tagName$d>) => void) | null;
3979
- onFocus?: ((event: CallbackEvent<typeof tagName$d>) => void) | null;
3980
- onBlur?: ((event: CallbackEvent<typeof tagName$d>) => void) | null;
4008
+ /** Function called after editing completes (typically on blur). */
3981
4009
  onChange?: ((event: CallbackEvent<typeof tagName$d>) => void) | null;
4010
+ /** Function called when the element loses focus. */
4011
+ onBlur?: ((event: CallbackEvent<typeof tagName$d>) => void) | null;
4012
+ /** Function called when the element receives focus. */
4013
+ onFocus?: ((event: CallbackEvent<typeof tagName$d>) => void) | null;
4014
+ /**
4015
+ * Additional content to be displayed in the field. Commonly used to display clickable text.
4016
+ */
3982
4017
  accessory?: ComponentChild;
3983
4018
  }
3984
4019
  declare global {
@@ -3996,7 +4031,7 @@ declare module 'preact' {
3996
4031
  }
3997
4032
 
3998
4033
  declare const tagName$c = 's-number-field';
3999
- interface PickedJSXProps
4034
+ interface NumberFieldJSXProps
4000
4035
  extends Pick<
4001
4036
  NumberFieldProps,
4002
4037
  | 'label'
@@ -4010,20 +4045,12 @@ interface PickedJSXProps
4010
4045
  | 'min'
4011
4046
  | 'controls'
4012
4047
  > {
4013
- inputMode?: Extract<NumberFieldProps['inputMode'], 'decimal' | 'numeric'>;
4014
- onInput?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4015
- onFocus?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4016
- onBlur?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4017
- onChange?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4018
- accessory?: ComponentChild;
4019
- }
4020
- interface NumberFieldJSXProps extends PickedJSXProps {
4021
4048
  /**
4022
4049
  * Content to use as the field label.
4023
4050
  *
4024
4051
  * Label is not supported when using Stepper controls
4025
4052
  */
4026
- label?: PickedJSXProps['label'];
4053
+ label?: NumberFieldProps['label'];
4027
4054
  /**
4028
4055
  * Additional text to provide context or guidance for the field.
4029
4056
  * This text is displayed along with the field and its label
@@ -4033,7 +4060,7 @@ interface NumberFieldJSXProps extends PickedJSXProps {
4033
4060
  *
4034
4061
  * Details are not supported when using Stepper controls
4035
4062
  */
4036
- details?: PickedJSXProps['details'];
4063
+ details?: NumberFieldProps['details'];
4037
4064
  /**
4038
4065
  * Whether the field needs a value. This requirement adds semantic value
4039
4066
  * to the field, but it will not cause an error to appear automatically.
@@ -4044,14 +4071,14 @@ interface NumberFieldJSXProps extends PickedJSXProps {
4044
4071
  *
4045
4072
  * Required is not supported when using Stepper controls
4046
4073
  */
4047
- required?: PickedJSXProps['required'];
4074
+ required?: NumberFieldProps['required'];
4048
4075
  /**
4049
4076
  * Indicate an error to the user. The field will be given a specific stylistic treatment
4050
4077
  * to communicate problems that have to be resolved immediately.
4051
4078
  *
4052
4079
  * Error is not supported when using Stepper controls
4053
4080
  */
4054
- error?: PickedJSXProps['error'];
4081
+ error?: NumberFieldProps['error'];
4055
4082
  /**
4056
4083
  * Sets the virtual keyboard.
4057
4084
  *
@@ -4060,20 +4087,19 @@ interface NumberFieldJSXProps extends PickedJSXProps {
4060
4087
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
4061
4088
  * @default 'decimal'
4062
4089
  */
4063
- inputMode?: PickedJSXProps['inputMode'];
4090
+ inputMode?: NumberFieldProps['inputMode'];
4064
4091
  /**
4065
4092
  * A short hint that describes the expected value of the field.
4066
4093
  *
4067
4094
  * Placeholder text is not supported when using Stepper controls due to constrained space for the number field, especially on phones.
4068
4095
  */
4069
- placeholder?: PickedJSXProps['placeholder'];
4096
+ placeholder?: NumberFieldProps['placeholder'];
4070
4097
  /**
4071
- * Additional content to be displayed in the field.
4072
- * Commonly used to display an icon that activates a tooltip providing more information.
4098
+ * Additional content to be displayed in the field. Commonly used to display clickable text.
4073
4099
  *
4074
- * Accessory is not supported when using Stepper controls
4100
+ * > Note: Accessory is not supported when using Stepper controls
4075
4101
  */
4076
- accessory?: PickedJSXProps['accessory'];
4102
+ accessory?: ComponentChild;
4077
4103
  /**
4078
4104
  * Sets the type of controls displayed for the field.
4079
4105
  *
@@ -4084,7 +4110,15 @@ interface NumberFieldJSXProps extends PickedJSXProps {
4084
4110
  * - `none`: no controls are displayed and users must input the value manually.
4085
4111
  * - `auto`: the presence of the controls depends on the surface and context.
4086
4112
  */
4087
- controls?: PickedJSXProps['controls'];
4113
+ controls?: NumberFieldProps['controls'];
4114
+ /** Function called when the user makes any changes in the field. */
4115
+ onInput?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4116
+ /** Function called after editing completes (typically on blur). */
4117
+ onChange?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4118
+ /** Function called when the element loses focus. */
4119
+ onBlur?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4120
+ /** Function called when the element receives focus. */
4121
+ onFocus?: ((event: CallbackEvent<typeof tagName$c>) => void) | null;
4088
4122
  }
4089
4123
  declare global {
4090
4124
  interface HTMLElementTagNameMap {
@@ -4106,11 +4140,14 @@ interface DateFieldJSXProps
4106
4140
  DateFieldProps,
4107
4141
  'label' | 'details' | 'value' | 'disabled' | 'error'
4108
4142
  > {
4143
+ /** Function called when the user makes any changes in the field. */
4109
4144
  onInput?: ((event: CallbackEvent<typeof tagName$b>) => void) | null;
4110
- onFocus?: ((event: CallbackEvent<typeof tagName$b>) => void) | null;
4111
- onBlur?: ((event: CallbackEvent<typeof tagName$b>) => void) | null;
4145
+ /** Function called after editing completes (typically on blur). */
4112
4146
  onChange?: ((event: CallbackEvent<typeof tagName$b>) => void) | null;
4113
- accessory?: ComponentChild;
4147
+ /** Function called when the element loses focus. */
4148
+ onBlur?: ((event: CallbackEvent<typeof tagName$b>) => void) | null;
4149
+ /** Function called when the element receives focus. */
4150
+ onFocus?: ((event: CallbackEvent<typeof tagName$b>) => void) | null;
4114
4151
  }
4115
4152
  declare global {
4116
4153
  interface HTMLElementTagNameMap {
@@ -4128,10 +4165,14 @@ declare module 'preact' {
4128
4165
 
4129
4166
  declare const tagName$a = 's-date-picker';
4130
4167
  interface DatePickerJSXProps extends Pick<DatePickerProps, 'id' | 'value'> {
4168
+ /** Function called when the user selects a date from the picker. */
4169
+ onInput?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4170
+ /** Function called when the user selects a date from the picker that is different to the current value. */
4171
+ onChange?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4172
+ /** Function called when the date picker is dismissed. */
4131
4173
  onBlur?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4174
+ /** Function called when the date picker is revealed. */
4132
4175
  onFocus?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4133
- onChange?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4134
- onInput?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4135
4176
  }
4136
4177
  declare global {
4137
4178
  interface HTMLElementTagNameMap {
@@ -4149,10 +4190,18 @@ declare module 'preact' {
4149
4190
 
4150
4191
  declare const tagName$9 = 's-date-spinner';
4151
4192
  interface DateSpinnerJSXProps extends Pick<DateSpinnerProps, 'id' | 'value'> {
4193
+ /**
4194
+ * Function called when the user makes a selection.
4195
+ */
4196
+ onInput?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4197
+ /**
4198
+ * Function called when the value changes. Only called when a different value is selected.
4199
+ */
4200
+ onChange?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4201
+ /** Function called when the date picker is dismissed. */
4152
4202
  onBlur?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4203
+ /** Function called when the date picker is revealed. */
4153
4204
  onFocus?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4154
- onChange?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4155
- onInput?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4156
4205
  }
4157
4206
  declare global {
4158
4207
  interface HTMLElementTagNameMap {
@@ -4214,10 +4263,14 @@ declare module 'preact' {
4214
4263
 
4215
4264
  declare const tagName$6 = 's-time-picker';
4216
4265
  interface TimePickerJSXProps extends Pick<TimePickerProps, 'id' | 'value'> {
4266
+ /** Function called when the user selects a time from the picker. */
4267
+ onInput?: (event: CallbackEvent<typeof tagName$6>) => void | null;
4268
+ /** Function called when the user selects a time from the picker that is different to the current value. */
4269
+ onChange?: (event: CallbackEvent<typeof tagName$6>) => void | null;
4270
+ /** Function called when the time picker is dismissed. */
4217
4271
  onBlur?: (event: CallbackEvent<typeof tagName$6>) => void | null;
4272
+ /** Function called when the time picker is revealed. */
4218
4273
  onFocus?: (event: CallbackEvent<typeof tagName$6>) => void | null;
4219
- onChange?: (event: CallbackEvent<typeof tagName$6>) => void | null;
4220
- onInput?: (event: CallbackEvent<typeof tagName$6>) => void | null;
4221
4274
  }
4222
4275
  declare global {
4223
4276
  interface HTMLElementTagNameMap {
@@ -4298,10 +4351,14 @@ interface TimeFieldJSXProps
4298
4351
  TimeFieldProps,
4299
4352
  'id' | 'label' | 'disabled' | 'value' | 'error' | 'details'
4300
4353
  > {
4301
- onBlur?: (event: CallbackEvent<typeof tagName$3>) => void | null;
4302
- onFocus?: (event: CallbackEvent<typeof tagName$3>) => void | null;
4303
- onInput?: (event: CallbackEvent<typeof tagName$3>) => void | null;
4304
- onChange?: (event: CallbackEvent<typeof tagName$3>) => void | null;
4354
+ /** Function called when the user makes any changes in the field. */
4355
+ onInput?: ((event: CallbackEvent<typeof tagName$3>) => void) | null;
4356
+ /** Function called after editing completes (typically on blur). */
4357
+ onChange?: ((event: CallbackEvent<typeof tagName$3>) => void) | null;
4358
+ /** Function called when the element loses focus. */
4359
+ onBlur?: ((event: CallbackEvent<typeof tagName$3>) => void) | null;
4360
+ /** Function called when the element receives focus. */
4361
+ onFocus?: ((event: CallbackEvent<typeof tagName$3>) => void) | null;
4305
4362
  }
4306
4363
  declare global {
4307
4364
  interface HTMLElementTagNameMap {
@@ -4616,8 +4673,10 @@ interface Choice {
4616
4673
  }
4617
4674
 
4618
4675
  interface ChoiceListEvents {
4619
- change?: (event: CallbackEvent<typeof tagName$k>) => void;
4676
+ /** Function called when the user changes a choice. Fires simultaneously with onChange. */
4620
4677
  input?: (event: CallbackEvent<typeof tagName$k>) => void;
4678
+ /** Function called when the user changes a choice. Fires simultaneously with onInput. */
4679
+ change?: (event: CallbackEvent<typeof tagName$k>) => void;
4621
4680
  }
4622
4681
 
4623
4682
  interface ChoiceList {
@@ -4654,14 +4713,14 @@ interface Clickable {
4654
4713
  }
4655
4714
 
4656
4715
  interface DateFieldEvents {
4716
+ /** Function called when the user makes any changes in the field. */
4657
4717
  input?: (event: CallbackEvent<typeof tagName$b>) => void;
4658
- focus?: (event: CallbackEvent<typeof tagName$b>) => void;
4659
- blur?: (event: CallbackEvent<typeof tagName$b>) => void;
4718
+ /** Function called after editing completes (typically on blur). */
4660
4719
  change?: (event: CallbackEvent<typeof tagName$b>) => void;
4661
- }
4662
-
4663
- interface DateFieldSlots {
4664
- accessory?: HTMLElement;
4720
+ /** Function called when the element loses focus. */
4721
+ blur?: (event: CallbackEvent<typeof tagName$b>) => void;
4722
+ /** Function called when the element receives focus. */
4723
+ focus?: (event: CallbackEvent<typeof tagName$b>) => void;
4665
4724
  }
4666
4725
 
4667
4726
  interface DateField {
@@ -4690,10 +4749,14 @@ interface DateField {
4690
4749
  }
4691
4750
 
4692
4751
  interface DatePickerEvents {
4752
+ /** Function called when the user selects a date from the picker. */
4753
+ input?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4754
+ /** Function called when the user selects a date from the picker that is different to the current value. */
4755
+ change?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4756
+ /** Function called when the date picker is dismissed. */
4693
4757
  blur?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4758
+ /** Function called when the date picker is revealed. */
4694
4759
  focus?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4695
- change?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4696
- input?: (event: CallbackEvent<typeof tagName$a>) => void | null;
4697
4760
  }
4698
4761
 
4699
4762
  interface DatePicker {
@@ -4717,10 +4780,14 @@ interface DatePicker {
4717
4780
  }
4718
4781
 
4719
4782
  interface DateSpinnerEvents {
4783
+ /** Function called when the user makes a selection. */
4784
+ input?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4785
+ /** Function called when the value changes. Only called when a different value is selected. */
4786
+ change?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4787
+ /** Function called when the date picker is dismissed. */
4720
4788
  blur?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4789
+ /** Function called when the date picker is revealed. */
4721
4790
  focus?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4722
- change?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4723
- input?: (event: CallbackEvent<typeof tagName$9>) => void | null;
4724
4791
  }
4725
4792
 
4726
4793
  interface DateSpinner {
@@ -4744,13 +4811,18 @@ interface Divider {
4744
4811
  }
4745
4812
 
4746
4813
  interface EmailFieldEvents {
4814
+ /** Function called when the user makes any changes in the field. */
4747
4815
  input?: (event: CallbackEvent<typeof tagName$f>) => void;
4748
- focus?: (event: CallbackEvent<typeof tagName$f>) => void;
4749
- blur?: (event: CallbackEvent<typeof tagName$f>) => void;
4816
+ /** Function called after editing completes (typically on blur). */
4750
4817
  change?: (event: CallbackEvent<typeof tagName$f>) => void;
4818
+ /** Function called when the element loses focus. */
4819
+ blur?: (event: CallbackEvent<typeof tagName$f>) => void;
4820
+ /** Function called when the element receives focus. */
4821
+ focus?: (event: CallbackEvent<typeof tagName$f>) => void;
4751
4822
  }
4752
4823
 
4753
4824
  interface EmailFieldSlots {
4825
+ /** Additional content to be displayed in the field. Commonly used to display clickable text. */
4754
4826
  accessory?: HTMLElement;
4755
4827
  }
4756
4828
 
@@ -4867,18 +4939,21 @@ interface Modal {
4867
4939
  }
4868
4940
 
4869
4941
  interface NumberFieldEvents {
4942
+ /** Function called when the user makes any changes in the field. */
4870
4943
  input?: (event: CallbackEvent<typeof tagName$c>) => void;
4871
- focus?: (event: CallbackEvent<typeof tagName$c>) => void;
4872
- blur?: (event: CallbackEvent<typeof tagName$c>) => void;
4944
+ /** Function called after editing completes (typically on blur). */
4873
4945
  change?: (event: CallbackEvent<typeof tagName$c>) => void;
4946
+ /** Function called when the element loses focus. */
4947
+ blur?: (event: CallbackEvent<typeof tagName$c>) => void;
4948
+ /** Function called when the element receives focus. */
4949
+ focus?: (event: CallbackEvent<typeof tagName$c>) => void;
4874
4950
  }
4875
4951
 
4876
4952
  interface NumberFieldSlots {
4877
4953
  /**
4878
- * Additional content to be displayed in the field.
4879
- * Commonly used to display an icon that activates a tooltip providing more information.
4954
+ * Additional content to be displayed in the field. Commonly used to display clickable text.
4880
4955
  *
4881
- * Accessory is not supported when using Stepper controls
4956
+ * > Note: Accessory is not supported when using Stepper controls
4882
4957
  */
4883
4958
  accessory?: HTMLElement;
4884
4959
  }
@@ -5108,10 +5183,14 @@ interface ScrollBox {
5108
5183
  }
5109
5184
 
5110
5185
  interface SearchFieldEvents {
5111
- focus?: (event: CallbackEvent<typeof tagName$g>) => void;
5112
- blur?: (event: CallbackEvent<typeof tagName$g>) => void;
5186
+ /** Function called when the user changes the value in the field. */
5113
5187
  input?: (event: CallbackEvent<typeof tagName$g>) => void;
5188
+ /** Function called when the field loses focus after the user changes the value in the field. */
5114
5189
  change?: (event: CallbackEvent<typeof tagName$g>) => void;
5190
+ /** Function called when the field loses focus. */
5191
+ blur?: (event: CallbackEvent<typeof tagName$g>) => void;
5192
+ /** Function called when the field is focused. */
5193
+ focus?: (event: CallbackEvent<typeof tagName$g>) => void;
5115
5194
  }
5116
5195
 
5117
5196
  interface SearchField {
@@ -5310,13 +5389,18 @@ interface Text {
5310
5389
  }
5311
5390
 
5312
5391
  interface TextAreaEvents {
5392
+ /** Function called when the user makes any changes in the field. */
5313
5393
  input?: (event: CallbackEvent<typeof tagName$d>) => void;
5314
- focus?: (event: CallbackEvent<typeof tagName$d>) => void;
5315
- blur?: (event: CallbackEvent<typeof tagName$d>) => void;
5394
+ /** Function called after editing completes (typically on blur). */
5316
5395
  change?: (event: CallbackEvent<typeof tagName$d>) => void;
5396
+ /** Function called when the element loses focus. */
5397
+ blur?: (event: CallbackEvent<typeof tagName$d>) => void;
5398
+ /** Function called when the element receives focus. */
5399
+ focus?: (event: CallbackEvent<typeof tagName$d>) => void;
5317
5400
  }
5318
5401
 
5319
5402
  interface TextAreaSlots {
5403
+ /** Additional content to be displayed in the field. Commonly used to display clickable text. */
5320
5404
  accessory?: HTMLElement;
5321
5405
  }
5322
5406
 
@@ -5366,13 +5450,18 @@ interface TextArea {
5366
5450
  }
5367
5451
 
5368
5452
  interface TextFieldEvents {
5453
+ /** Function called when the user makes any changes in the field. */
5369
5454
  input?: (event: CallbackEvent<typeof tagName$h>) => void;
5370
- focus?: (event: CallbackEvent<typeof tagName$h>) => void;
5371
- blur?: (event: CallbackEvent<typeof tagName$h>) => void;
5455
+ /** Function called after editing completes (typically on blur). */
5372
5456
  change?: (event: CallbackEvent<typeof tagName$h>) => void;
5457
+ /** Function called when the element loses focus. */
5458
+ blur?: (event: CallbackEvent<typeof tagName$h>) => void;
5459
+ /** Function called when the element receives focus. */
5460
+ focus?: (event: CallbackEvent<typeof tagName$h>) => void;
5373
5461
  }
5374
5462
 
5375
5463
  interface TextFieldSlots {
5464
+ /** Additional content to be displayed in the field. Commonly used to display clickable text. */
5376
5465
  accessory?: HTMLElement;
5377
5466
  }
5378
5467
 
@@ -5453,10 +5542,14 @@ interface Tile {
5453
5542
  }
5454
5543
 
5455
5544
  interface TimeFieldEvents {
5456
- blur?: (event: CallbackEvent<typeof tagName$3>) => void | null;
5457
- focus?: (event: CallbackEvent<typeof tagName$3>) => void | null;
5458
- input?: (event: CallbackEvent<typeof tagName$3>) => void | null;
5459
- change?: (event: CallbackEvent<typeof tagName$3>) => void | null;
5545
+ /** Function called when the user makes any changes in the field. */
5546
+ input?: (event: CallbackEvent<typeof tagName$3>) => void;
5547
+ /** Function called after editing completes (typically on blur). */
5548
+ change?: (event: CallbackEvent<typeof tagName$3>) => void;
5549
+ /** Function called when the element loses focus. */
5550
+ blur?: (event: CallbackEvent<typeof tagName$3>) => void;
5551
+ /** Function called when the element receives focus. */
5552
+ focus?: (event: CallbackEvent<typeof tagName$3>) => void;
5460
5553
  }
5461
5554
 
5462
5555
  interface TimeField {
@@ -5500,10 +5593,14 @@ interface TimeField {
5500
5593
  }
5501
5594
 
5502
5595
  interface TimePickerEvents {
5596
+ /** Function called when the user selects a time from the picker. */
5597
+ input?: (event: CallbackEvent<typeof tagName$6>) => void | null;
5598
+ /** Function called when the user selects a time from the picker that is different to the current value. */
5599
+ change?: (event: CallbackEvent<typeof tagName$6>) => void | null;
5600
+ /** Function called when the time picker is dismissed. */
5503
5601
  blur?: (event: CallbackEvent<typeof tagName$6>) => void | null;
5602
+ /** Function called when the time picker is revealed. */
5504
5603
  focus?: (event: CallbackEvent<typeof tagName$6>) => void | null;
5505
- change?: (event: CallbackEvent<typeof tagName$6>) => void | null;
5506
- input?: (event: CallbackEvent<typeof tagName$6>) => void | null;
5507
5604
  }
5508
5605
 
5509
5606
  interface TimePicker {