react-native-ui-lib 7.39.0-snapshot.6663 → 7.39.0-snapshot.6665

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.39.0-snapshot.6663",
3
+ "version": "7.39.0-snapshot.6665",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -108,13 +108,403 @@
108
108
  ],
109
109
  "snippet": [
110
110
  "<Picker",
111
- " value={currentValue$1}",
111
+ " value={2$1}",
112
112
  " placeholder={'Placeholder'$2}",
113
113
  " onChange={() => console.log('changed')$3}",
114
+ " items={[{label: 'Item 1', value: 1}, {label: 'Item 2', value: 2},{label: 'Item 3', value: 3}]}",
114
115
  ">",
115
- " {_.map(items, item => (",
116
- " return renderItem(item, index);",
117
- " ))$4}",
118
116
  "</Picker>"
119
- ]
117
+ ],
118
+ "docs": {
119
+ "hero": {
120
+ "title": "Picker",
121
+ "description": "Picker allows the user to select an option from a variety of choices available.Pressing the Picker Field, will open a dialog or modal displaying a list of available options for selection.",
122
+ "type": "hero",
123
+ "layout": "horizontal",
124
+ "content": [
125
+ {
126
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_cover.png"
127
+ }
128
+ ]
129
+ },
130
+ "tabs": [
131
+ {
132
+ "title": "Overview",
133
+ "sections": [
134
+ {
135
+ "type": "section",
136
+ "title": "Usage Example",
137
+ "description": "Pickers allow selection of an option or multiple options from a list usually displayed using an actionSheet. Pickers can be used in forms, settings screens or as part of an interactive flow.",
138
+ "content": [
139
+ {
140
+ "value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185562&embed-host=share"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "type": "list",
146
+ "items": [
147
+ {
148
+ "title": "Form Field (default)",
149
+ "description": "Mainly used as part of a form, works cohesively with the text field component and other form related components.",
150
+ "content": [
151
+ {
152
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_form.png"
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "title": "Filter Field",
158
+ "description": "Used mostly for filtering a screen or part of it. Can be combined with search functionality.\nThe colon symbol in the Label is not part of the component itself and should be included as part of the text string.",
159
+ "content": [
160
+ {
161
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_filter.png"
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "title": "Settings Field",
167
+ "description": "Based on ListItem component.\nUsed mostly when the picker is part of a settings screen.",
168
+ "content": [
169
+ {
170
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_settings.png"
171
+ }
172
+ ]
173
+ }
174
+ ],
175
+ "layout": "horizontal",
176
+ "title": "Picker Types",
177
+ "description": "Various types of pickers are available to accommodate different needs and use cases. "
178
+ },
179
+ {
180
+ "type": "section",
181
+ "title": "Picker Types Examples",
182
+ "content": [
183
+ {
184
+ "value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185650&embed-host=share"
185
+ }
186
+ ]
187
+ },
188
+ {
189
+ "type": "table",
190
+ "columns": ["State/Type/Preset", "Preview"],
191
+ "items": [
192
+ {
193
+ "title": "Default",
194
+ "content": [
195
+ {
196
+ "flexed": true,
197
+ "props": {
198
+ "preset": "outline",
199
+ "label": "Label",
200
+ "placeholder": "Select"
201
+ }
202
+ }
203
+ ]
204
+ },
205
+ {
206
+ "title": "Value selected + icon prefix ",
207
+ "content": [
208
+ {
209
+ "flexed": true,
210
+ "snippet": "<Picker preset='outline' placeholder='select' leadingAccessory={<Icon source={Assets.icons.general.favorite}/>} items={[{label: 'Selected Value', value: 1}]} value={1}/>"
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ "title": "Disabled",
216
+ "content": [
217
+ {
218
+ "flexed": true,
219
+ "props": {
220
+ "preset": "outline",
221
+ "label": "Label",
222
+ "placeholder": "Select",
223
+ "editable": false
224
+ }
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "title": "Validation error (value not selected)",
230
+ "content": [
231
+ {
232
+ "flexed": true,
233
+ "props": {
234
+ "preset": "outline",
235
+ "label": "Label",
236
+ "placeholder": "Select",
237
+ "validationMessage": "Validation message"
238
+ }
239
+ }
240
+ ]
241
+ }
242
+ ],
243
+ "title": "Form Field"
244
+ },
245
+ {
246
+ "type": "table",
247
+ "columns": ["State/Type/Preset", "Preview"],
248
+ "items": [
249
+ {
250
+ "title": "Default",
251
+ "content": [
252
+ {
253
+ "props": {
254
+ "items": [
255
+ {
256
+ "label": "Selected Value",
257
+ "value": 1
258
+ }
259
+ ],
260
+ "value": 1,
261
+ "fieldType": "filter"
262
+ }
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "title": "With label",
268
+ "content": [
269
+ {
270
+ "props": {
271
+ "label": "Label: ",
272
+ "items": [
273
+ {
274
+ "label": "Selected Value",
275
+ "value": 1
276
+ }
277
+ ],
278
+ "value": 1,
279
+ "fieldType": "filter"
280
+ }
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ "title": "Multiple values selected",
286
+ "content": [
287
+ {
288
+ "props": {
289
+ "mode": "MULTI",
290
+ "items": [
291
+ {
292
+ "label": "Value 1",
293
+ "value": 1
294
+ },
295
+ {
296
+ "label": "Value 2",
297
+ "value": 2
298
+ }
299
+ ],
300
+ "value": [1, 2],
301
+ "fieldType": "filter"
302
+ }
303
+ }
304
+ ]
305
+ }
306
+ ],
307
+ "title": "Filter Field"
308
+ },
309
+ {
310
+ "type": "table",
311
+ "columns": ["State/Type/Preset", "Preview"],
312
+ "items": [
313
+ {
314
+ "title": "Default",
315
+ "content": [
316
+ {
317
+ "background": "#E8ECF0",
318
+ "flexed": true,
319
+ "snippet": "<View bg-$backgroundDefault padding-20><Picker label='Label' placeholder='Select' fieldType='settings'/></View>"
320
+ }
321
+ ]
322
+ },
323
+ {
324
+ "title": "Value selected + icon prefix ",
325
+ "content": [
326
+ {
327
+ "background": "#E8ECF0",
328
+ "flexed": true,
329
+ "snippet": "<View bg-$backgroundDefault padding-20><Picker label='Label' placeholder='Select' value={1} fieldType='settings' items={[{label: 'Selected value', value: 1}]}/></View>",
330
+ "props": {
331
+ "label": "Label",
332
+ "placeholder": "Select",
333
+ "fieldType": "settings",
334
+ "items": [
335
+ {
336
+ "label": "Selected Value",
337
+ "value": 1
338
+ }
339
+ ],
340
+ "value": 1
341
+ }
342
+ }
343
+ ]
344
+ }
345
+ ],
346
+ "title": "Settings Field"
347
+ },
348
+ {
349
+ "type": "list",
350
+ "items": [
351
+ {
352
+ "title": "Dialog",
353
+ "description": "Recommended for short value lists.",
354
+ "content": [
355
+ {
356
+ "value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185705&embed-host=share"
357
+ }
358
+ ]
359
+ },
360
+ {
361
+ "title": "Modal",
362
+ "description": "Used for longer lists like country selection, currency selection or a language picker.",
363
+ "content": [
364
+ {
365
+ "value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185740&embed-host=share"
366
+ }
367
+ ]
368
+ }
369
+ ],
370
+ "layout": "horizontal",
371
+ "title": "Picker Values display options",
372
+ "description": "The Picker component serves as an entry point to a list of selectable values, usually displayed in a modal or a dialog."
373
+ },
374
+ {
375
+ "type": "list",
376
+ "items": [
377
+ {
378
+ "title": "Single selection",
379
+ "description": "Tapping on an item will select it and close the dialog. In scrollable long lists, the selected item will be displayed at the top of the list to stay visible. ",
380
+ "content": [
381
+ {
382
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_values_dialog_single.png"
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ "title": "Multi-select",
388
+ "description": "In multi-select dialogs, a clear CTA for “Done” or “Save” is required to confirm the selection and dismiss the dialog.",
389
+ "content": [
390
+ {
391
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_values_dialog_multiple.png"
392
+ }
393
+ ]
394
+ }
395
+ ],
396
+ "layout": "horizontal",
397
+ "title": "Values displayed in Dialog",
398
+ "description": "The Picker component serves as an entry point to a list of selectable values, usually displayed in a modal or a dialog."
399
+ },
400
+ {
401
+ "type": "list",
402
+ "items": [
403
+ {
404
+ "title": "Maximum Selected",
405
+ "description": "When the user reaches the limited amount of options allowed to select, the non-selected options will become disabled to restrict the user from selecting more options.",
406
+ "content": [
407
+ {
408
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_max.png"
409
+ }
410
+ ]
411
+ },
412
+ {
413
+ "title": "Validation Error",
414
+ "description": "markdown:Product can set the minimum amount for the selected options. If the user selects less options than the minimum: \n- Display a validation error in the picker header. The error text should explain the user should select at least one option.\n- The dialog CTA will become disabled.\n- If the user will close the dialog, the changes won’t be saved.\n- When the user selects the minimum required options, the validation error will disappear and the CTA will become active.",
415
+ "content": [
416
+ {
417
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_validation.png"
418
+ }
419
+ ]
420
+ },
421
+ {
422
+ "title": "Loading Data",
423
+ "description": "If the data can't be loaded before opening the dialog, a Loader should be shown to let the user know that content is being fetched.\nThe search input is hidden while loading.\nSince the number of items to be loaded is unpredictable, a fixed spacing of 120px below and above the loader has been set.",
424
+ "content": [
425
+ {
426
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_loading.png"
427
+ }
428
+ ]
429
+ }
430
+ ],
431
+ "title": "Dialog States",
432
+ "layout": "horizontal"
433
+ },
434
+ {
435
+ "type": "list",
436
+ "items": [
437
+ {
438
+ "title": "Single selection",
439
+ "description": "Tapping on one of the list items will select it and close the modal. The CTA is optional and disabled by default. It can be added in cases where users might not expect or want the modal to auto-dismiss upon selection.\nThe selected Item is hoisted on top of long lists by default (placed above other values). This can also be set for short lists.\nA search bar can be added on top of the values list.",
440
+ "content": [
441
+ {
442
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_single.png"
443
+ }
444
+ ]
445
+ },
446
+ {
447
+ "title": "Multi-select",
448
+ "description": "In multi-selection dialogs, a CTA for “Done” or “Save” is required to confirm the selection and dismiss the modal.",
449
+ "content": [
450
+ {
451
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_multiple.png"
452
+ }
453
+ ]
454
+ },
455
+ {
456
+ "title": "Select all",
457
+ "description": "Providing a clear “select all” action is a good practice. In case all items are selected, display a “clear all” action. Make sure items number is clearly displayed according to the selection.",
458
+ "content": [
459
+ {
460
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_selectAll.png"
461
+ }
462
+ ]
463
+ },
464
+ {
465
+ "title": "Select all checkbox",
466
+ "description": "In some cases, using checkbox for the “select all” action will be more appropriate. Note that “select all” checkbox can use an “indeterminate” state, if needed. \nMake sure that selected items number is clearly displayed. ",
467
+ "content": [
468
+ {
469
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_selectAll_checkbox.png"
470
+ }
471
+ ]
472
+ },
473
+ {
474
+ "title": "Loading Data",
475
+ "description": "If the data can't be loaded prior to opening the modal, a Loader should be shown, indicating that content is being fetched.\nSearch input is hidden while loading, and the loader is aligned to the center of the screen.",
476
+ "content": [
477
+ {
478
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_loading.png"
479
+ }
480
+ ]
481
+ }
482
+ ],
483
+ "layout": "horizontal",
484
+ "title": "Values displayed in Modal",
485
+ "description": "This type of selection list is used for long lists, e.g. contacts, countries and currencies."
486
+ },
487
+ {
488
+ "type": "section",
489
+ "title": "Picker Presets",
490
+ "description": "Pickers allow selection of an option/value or multiple options/values from a list. Pickers can be used in forms, settings screens or as part of an interactive flow. ",
491
+ "content": [
492
+ {
493
+ "value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4418-192956&embed-host=share"
494
+ }
495
+ ]
496
+ },
497
+ {
498
+ "type": "section",
499
+ "title": "Spec",
500
+ "content": [
501
+ {
502
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_spec.png"
503
+ }
504
+ ]
505
+ }
506
+ ]
507
+ }
508
+ ]
509
+ }
120
510
  }
@@ -102,7 +102,6 @@
102
102
  "title": "Generic",
103
103
  "content": [
104
104
  {
105
- "component": "Incubator.Toast",
106
105
  "props": {
107
106
  "visible": true,
108
107
  "message": "Mika Or was saved to contacts.",
@@ -115,7 +114,6 @@
115
114
  "title": "Success",
116
115
  "content": [
117
116
  {
118
- "component": "Incubator.Toast",
119
117
  "props": {
120
118
  "visible": true,
121
119
  "message": "Post published.",
@@ -128,7 +126,6 @@
128
126
  "title": "Validation",
129
127
  "content": [
130
128
  {
131
- "component": "Incubator.Toast",
132
129
  "props": {
133
130
  "visible": true,
134
131
  "message": "Enter a card number.",
@@ -141,7 +138,6 @@
141
138
  "title": "Offline Error",
142
139
  "content": [
143
140
  {
144
- "component": "Incubator.Toast",
145
141
  "props": {
146
142
  "visible": true,
147
143
  "message": "This action is not available offline.",
@@ -161,7 +157,6 @@
161
157
  "title": "None",
162
158
  "content": [
163
159
  {
164
- "component": "Incubator.Toast",
165
160
  "props": {
166
161
  "visible": true,
167
162
  "message": "Action completed."
@@ -181,7 +176,6 @@
181
176
  "title": "With loader",
182
177
  "content": [
183
178
  {
184
- "component": "Incubator.Toast",
185
179
  "props": {
186
180
  "visible": true,
187
181
  "message": "Action completed.",