@stonecrop/aform 0.10.0 → 0.10.1

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/dist/aform.d.ts CHANGED
@@ -77,7 +77,10 @@ export declare type ComponentProps = {
77
77
  */
78
78
  label?: string;
79
79
  /**
80
- * The masking string to apply to inputs inside the component
80
+ * The mask to apply to inputs inside the component. Accepts either a plain
81
+ * mask string (e.g. `"(###) ###-####"`) or a stringified arrow function that
82
+ * receives `locale` and returns a mask string
83
+ * (e.g. `"(locale) => locale === 'en-US' ? '(###) ###-####' : '####-######'"`).
81
84
  * @public
82
85
  */
83
86
  mask?: string;
@@ -194,17 +197,6 @@ export declare type FormSchema = BaseSchema & {
194
197
  edit?: boolean;
195
198
  /**
196
199
  * The field type for the schema field
197
- *
198
- * @remarks
199
- * This must be a string that represents the field type. A mask string will be automatically
200
- * applied for the following field types:
201
- * - Date ('##/##/####')
202
- * - Datetime ('####/##/## ##:##')
203
- * - Time ('##:##')
204
- * - Fulltime ('##:##:##')
205
- * - Phone ('(###) ### - ####')
206
- * - Card ('#### #### #### ####')
207
- *
208
200
  * @public
209
201
  */
210
202
  fieldtype?: string;
@@ -224,8 +216,11 @@ export declare type FormSchema = BaseSchema & {
224
216
  */
225
217
  width?: string;
226
218
  /**
227
- * The mask string for the field
228
- * @beta
219
+ * The mask to apply to the field. Accepts either a plain mask string
220
+ * (e.g. `"##/##/####"`) or a stringified arrow function that receives `locale`
221
+ * and returns a mask string
222
+ * (e.g. `"(locale) => locale === 'en-US' ? '(###) ###-####' : '####-######'"`).
223
+ * @public
229
224
  */
230
225
  mask?: string;
231
226
  };