react-native-ui-lib 7.39.0-snapshot.6728 → 7.39.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/package.json +2 -4
- package/scripts/docs/buildDocsCommon.js +83 -16
- package/src/assets/icons/index.js +26 -0
- package/src/assets/images/index.js +5 -0
- package/src/assets/index.js +5 -2
- package/src/commons/Constants.d.ts +0 -1
- package/src/commons/Constants.js +2 -4
- package/src/components/avatar/index.d.ts +19 -8
- package/src/components/avatar/index.js +2 -4
- package/src/components/button/button.api.json +85 -25
- package/src/components/card/index.js +1 -1
- package/src/components/checkbox/index.d.ts +1 -4
- package/src/components/checkbox/index.js +5 -7
- package/src/components/chip/index.js +1 -1
- package/src/components/chipsInput/index.js +2 -2
- package/src/components/colorPicker/ColorPickerDialog.js +1 -1
- package/src/components/colorPicker/ColorPickerDialogHeader.js +2 -2
- package/src/components/colorPicker/ColorPickerPreview.js +2 -2
- package/src/components/colorPicker/index.js +1 -1
- package/src/components/colorSwatch/index.js +3 -2
- package/src/components/dateTimePicker/index.js +2 -2
- package/src/components/hint/hint.api.json +5 -39
- package/src/components/hint/index.js +3 -2
- package/src/components/icon/index.d.ts +3 -12
- package/src/components/icon/index.js +9 -18
- package/src/components/image/index.d.ts +1 -1
- package/src/components/modal/TopBar.js +1 -1
- package/src/components/modal/api/modalTopBar.api.json +1 -1
- package/src/components/overlay/index.js +6 -4
- package/src/components/panningViews/panDismissibleView.js +1 -1
- package/src/components/panningViews/panGestureView.js +1 -1
- package/src/components/panningViews/panListenerView.js +1 -1
- package/src/components/panningViews/panResponderView.js +1 -1
- package/src/components/panningViews/panningContext.js +0 -1
- package/src/components/picker/PickerItem.js +1 -1
- package/src/components/picker/PickerItemsList.js +1 -1
- package/src/components/picker/api/picker.api.json +5 -387
- package/src/components/picker/helpers/useFieldType.js +2 -2
- package/src/components/scrollBar/index.js +3 -3
- package/src/components/sortableList/SortableList.api.json +7 -7
- package/src/components/stepper/assets/minusSmall.png +0 -0
- package/src/components/stepper/assets/minusSmall@1.5x.png +0 -0
- package/src/components/stepper/assets/minusSmall@2x.png +0 -0
- package/src/components/stepper/assets/minusSmall@3x.png +0 -0
- package/src/components/stepper/assets/minusSmall@4x.png +0 -0
- package/src/components/stepper/assets/plusSmall.png +0 -0
- package/src/components/stepper/assets/plusSmall@1.5x.png +0 -0
- package/src/components/stepper/assets/plusSmall@2x.png +0 -0
- package/src/components/stepper/assets/plusSmall@3x.png +0 -0
- package/src/components/stepper/assets/plusSmall@4x.png +0 -0
- package/src/components/stepper/index.js +8 -3
- package/src/components/tabController/apis/pageCarousel.api.json +5 -8
- package/src/components/textField/ClearButton.js +1 -1
- package/src/components/timeline/timeline.api.json +106 -57
- package/src/components/toast/index.js +1 -1
- package/src/components/wizard/WizardStates.js +4 -3
- package/src/hooks/useScrollTo/index.js +4 -9
- package/src/incubator/dialog/useDialogContent.js +1 -1
- package/src/incubator/expandableOverlay/index.js +0 -1
- package/src/incubator/panView/index.js +1 -1
- package/src/incubator/slider/Thumb.js +1 -8
- package/src/incubator/toast/toast.api.json +7 -57
- package/src/assets/internal/icons/index.js +0 -50
- package/src/assets/internal/icons/index.web.js +0 -50
- package/src/assets/internal/images/index.js +0 -26
- package/src/assets/internal/images/index.web.js +0 -26
- package/src/assets/internal/index.d.ts +0 -4
- package/src/assets/internal/index.js +0 -8
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.api.json +0 -40
- package/src/components/modal/modal.api.json +0 -54
- /package/src/assets/{internal/icons/checkSmall.png → icons/check-small.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@1.5x.png → icons/check-small@1.5x.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@2x.png → icons/check-small@2x.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@3x.png → icons/check-small@3x.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@4x.png → icons/check-small@4x.png} +0 -0
- /package/src/assets/{internal/icons → icons}/check.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/x.png +0 -0
- /package/src/assets/{internal/icons → icons}/x@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/x@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@4x.png +0 -0
- /package/src/assets/{internal/images → images}/gradient.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@4x.png +0 -0
- /package/src/{assets/internal/images/transparentSwatch.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@1.5x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@2x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@3x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@4x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@4x.png} +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@1.5x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@2x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@3x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@4x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@1.5x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@2x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@3x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@4x.png +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh.png → components/overlay/assets/GradientOverlayHigh.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@1.5x.png → components/overlay/assets/GradientOverlayHigh@1.5x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@2x.png → components/overlay/assets/GradientOverlayHigh@2x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@3x.png → components/overlay/assets/GradientOverlayHigh@3x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@4x.png → components/overlay/assets/GradientOverlayHigh@4x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow.png → components/overlay/assets/GradientOverlayLow.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@1.5x.png → components/overlay/assets/GradientOverlayLow@1.5x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@2x.png → components/overlay/assets/GradientOverlayLow@2x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@3x.png → components/overlay/assets/GradientOverlayLow@3x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@4x.png → components/overlay/assets/GradientOverlayLow@4x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium.png → components/overlay/assets/GradientOverlayMedium.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@1.5x.png → components/overlay/assets/GradientOverlayMedium@1.5x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@2x.png → components/overlay/assets/GradientOverlayMedium@2x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@3x.png → components/overlay/assets/GradientOverlayMedium@3x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@4x.png → components/overlay/assets/GradientOverlayMedium@4x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown.png → components/picker/assets/dropdown.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@1.5x.png → components/picker/assets/dropdown@1.5x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@2x.png → components/picker/assets/dropdown@2x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@3x.png → components/picker/assets/dropdown@3x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@4x.png → components/picker/assets/dropdown@4x.png} +0 -0
- /package/src/{assets/internal/images → components/scrollBar/assets}/gradientOverlay.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@4x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@4x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@4x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@4x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@4x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@4x.png +0 -0
|
@@ -108,395 +108,13 @@
|
|
|
108
108
|
],
|
|
109
109
|
"snippet": [
|
|
110
110
|
"<Picker",
|
|
111
|
-
" value={
|
|
111
|
+
" value={currentValue$1}",
|
|
112
112
|
" placeholder={'Placeholder'$2}",
|
|
113
113
|
" onChange={() => console.log('changed')$3}",
|
|
114
|
-
" trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>}",
|
|
115
|
-
" items={[{label: 'Item 1', value: 1}, {label: 'Item 2', value: 2},{label: 'Item 3', value: 3}]}",
|
|
116
114
|
">",
|
|
115
|
+
" {_.map(items, item => (",
|
|
116
|
+
" return renderItem(item, index);",
|
|
117
|
+
" ))$4}",
|
|
117
118
|
"</Picker>"
|
|
118
|
-
]
|
|
119
|
-
"docs": {
|
|
120
|
-
"hero": {
|
|
121
|
-
"title": "Picker",
|
|
122
|
-
"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.",
|
|
123
|
-
"type": "hero",
|
|
124
|
-
"layout": "horizontal",
|
|
125
|
-
"content": [
|
|
126
|
-
{
|
|
127
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_cover.png"
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
"tabs": [
|
|
132
|
-
{
|
|
133
|
-
"title": "Overview",
|
|
134
|
-
"sections": [
|
|
135
|
-
{
|
|
136
|
-
"type": "section",
|
|
137
|
-
"title": "Usage Example",
|
|
138
|
-
"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.",
|
|
139
|
-
"content": [
|
|
140
|
-
{
|
|
141
|
-
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185562&embed-host=share"
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"type": "list",
|
|
147
|
-
"items": [
|
|
148
|
-
{
|
|
149
|
-
"title": "Form Field (default)",
|
|
150
|
-
"description": "Mainly used as part of a form, works cohesively with the text field component and other form related components.",
|
|
151
|
-
"content": [
|
|
152
|
-
{
|
|
153
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_form.png"
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"title": "Filter Field",
|
|
159
|
-
"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.",
|
|
160
|
-
"content": [
|
|
161
|
-
{
|
|
162
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_filter.png"
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"title": "Settings Field",
|
|
168
|
-
"description": "Based on ListItem component.\nUsed mostly when the picker is part of a settings screen.",
|
|
169
|
-
"content": [
|
|
170
|
-
{
|
|
171
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_settings.png"
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
"layout": "horizontal",
|
|
177
|
-
"title": "Picker Types",
|
|
178
|
-
"description": "Various types of pickers are available to accommodate different needs and use cases. "
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"type": "section",
|
|
182
|
-
"title": "Picker Types Examples",
|
|
183
|
-
"content": [
|
|
184
|
-
{
|
|
185
|
-
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185650&embed-host=share"
|
|
186
|
-
}
|
|
187
|
-
]
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"type": "table",
|
|
191
|
-
"columns": ["State/Type/Preset", "Preview"],
|
|
192
|
-
"items": [
|
|
193
|
-
{
|
|
194
|
-
"title": "Default",
|
|
195
|
-
"content": [
|
|
196
|
-
{
|
|
197
|
-
"flexed": true,
|
|
198
|
-
"snippet": "<Picker preset='outline' placeholder='select' items={[{label: 'Selected Value', value: 1}]} value={1} trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>}/>",
|
|
199
|
-
"props": {
|
|
200
|
-
"preset": "outline",
|
|
201
|
-
"label": "Label",
|
|
202
|
-
"placeholder": "Select"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
]
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"title": "Value selected + icon prefix ",
|
|
209
|
-
"content": [
|
|
210
|
-
{
|
|
211
|
-
"flexed": true,
|
|
212
|
-
"snippet": "<Picker preset='outline' placeholder='select' leadingAccessory={<Icon source={Assets.icons.demo.star} marginR-s2/>} trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>} items={[{label: 'Selected Value', value: 1}]} value={1}/>"
|
|
213
|
-
}
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"title": "Disabled",
|
|
218
|
-
"content": [
|
|
219
|
-
{
|
|
220
|
-
"flexed": true,
|
|
221
|
-
"snippet": "<Picker preset='outline' label='Label' placeholder='Select' editable={false} trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>} />"
|
|
222
|
-
}
|
|
223
|
-
]
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"title": "Validation error (value not selected)",
|
|
227
|
-
"content": [
|
|
228
|
-
{
|
|
229
|
-
"flexed": true,
|
|
230
|
-
"snippet": "<Picker preset='outline' label='Label' placeholder='Select' validationMessage='Validation Message' trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>} />"
|
|
231
|
-
}
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
],
|
|
235
|
-
"title": "Form Field"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"type": "table",
|
|
239
|
-
"columns": ["State/Type/Preset", "Preview"],
|
|
240
|
-
"items": [
|
|
241
|
-
{
|
|
242
|
-
"title": "Default",
|
|
243
|
-
"content": [
|
|
244
|
-
{
|
|
245
|
-
"props": {
|
|
246
|
-
"items": [
|
|
247
|
-
{
|
|
248
|
-
"label": "Selected Value",
|
|
249
|
-
"value": 1
|
|
250
|
-
}
|
|
251
|
-
],
|
|
252
|
-
"value": 1,
|
|
253
|
-
"fieldType": "filter"
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
]
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"title": "With label",
|
|
260
|
-
"content": [
|
|
261
|
-
{
|
|
262
|
-
"props": {
|
|
263
|
-
"label": "Label: ",
|
|
264
|
-
"items": [
|
|
265
|
-
{
|
|
266
|
-
"label": "Selected Value",
|
|
267
|
-
"value": 1
|
|
268
|
-
}
|
|
269
|
-
],
|
|
270
|
-
"value": 1,
|
|
271
|
-
"fieldType": "filter"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
]
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"title": "Multiple values selected",
|
|
278
|
-
"content": [
|
|
279
|
-
{
|
|
280
|
-
"props": {
|
|
281
|
-
"mode": "MULTI",
|
|
282
|
-
"items": [
|
|
283
|
-
{
|
|
284
|
-
"label": "Value 1",
|
|
285
|
-
"value": 1
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"label": "Value 2",
|
|
289
|
-
"value": 2
|
|
290
|
-
}
|
|
291
|
-
],
|
|
292
|
-
"value": [1, 2],
|
|
293
|
-
"fieldType": "filter"
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
]
|
|
297
|
-
}
|
|
298
|
-
],
|
|
299
|
-
"title": "Filter Field"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"type": "table",
|
|
303
|
-
"columns": ["State/Type/Preset", "Preview"],
|
|
304
|
-
"items": [
|
|
305
|
-
{
|
|
306
|
-
"title": "Default",
|
|
307
|
-
"content": [
|
|
308
|
-
{
|
|
309
|
-
"background": "#E8ECF0",
|
|
310
|
-
"flexed": true,
|
|
311
|
-
"snippet": "<Picker label='Label' placeholder='Select' fieldType='settings' containerStyle={{padding: 20, backgroundColor: Colors.$backgroundDefault}}/>"
|
|
312
|
-
}
|
|
313
|
-
]
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"title": "Value selected + icon prefix ",
|
|
317
|
-
"content": [
|
|
318
|
-
{
|
|
319
|
-
"background": "#E8ECF0",
|
|
320
|
-
"flexed": true,
|
|
321
|
-
"snippet": "<Picker label='Label' placeholder='Select' value={1} fieldType='settings' items={[{label: 'Selected value', value: 1}]} containerStyle={{padding: 20, backgroundColor: Colors.$backgroundDefault}}/>",
|
|
322
|
-
"props": {
|
|
323
|
-
"label": "Label",
|
|
324
|
-
"placeholder": "Select",
|
|
325
|
-
"fieldType": "settings",
|
|
326
|
-
"items": [
|
|
327
|
-
{
|
|
328
|
-
"label": "Selected Value",
|
|
329
|
-
"value": 1
|
|
330
|
-
}
|
|
331
|
-
],
|
|
332
|
-
"value": 1
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
]
|
|
336
|
-
}
|
|
337
|
-
],
|
|
338
|
-
"title": "Settings Field"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
"type": "list",
|
|
342
|
-
"items": [
|
|
343
|
-
{
|
|
344
|
-
"title": "Dialog",
|
|
345
|
-
"description": "Recommended for short value lists.",
|
|
346
|
-
"content": [
|
|
347
|
-
{
|
|
348
|
-
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185705&embed-host=share"
|
|
349
|
-
}
|
|
350
|
-
]
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
"title": "Modal",
|
|
354
|
-
"description": "Used for longer lists like country selection, currency selection or a language picker.",
|
|
355
|
-
"content": [
|
|
356
|
-
{
|
|
357
|
-
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185740&embed-host=share"
|
|
358
|
-
}
|
|
359
|
-
]
|
|
360
|
-
}
|
|
361
|
-
],
|
|
362
|
-
"layout": "horizontal",
|
|
363
|
-
"title": "Picker Values display options",
|
|
364
|
-
"description": "The Picker component serves as an entry point to a list of selectable values, usually displayed in a modal or a dialog."
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"type": "list",
|
|
368
|
-
"items": [
|
|
369
|
-
{
|
|
370
|
-
"title": "Single selection",
|
|
371
|
-
"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. ",
|
|
372
|
-
"content": [
|
|
373
|
-
{
|
|
374
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_values_dialog_single.png"
|
|
375
|
-
}
|
|
376
|
-
]
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"title": "Multi-select",
|
|
380
|
-
"description": "In multi-select dialogs, a clear CTA for “Done” or “Save” is required to confirm the selection and dismiss the dialog.",
|
|
381
|
-
"content": [
|
|
382
|
-
{
|
|
383
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_values_dialog_multiple.png"
|
|
384
|
-
}
|
|
385
|
-
]
|
|
386
|
-
}
|
|
387
|
-
],
|
|
388
|
-
"layout": "horizontal",
|
|
389
|
-
"title": "Values displayed in Dialog",
|
|
390
|
-
"description": "The Picker component serves as an entry point to a list of selectable values, usually displayed in a modal or a dialog."
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
"type": "list",
|
|
394
|
-
"items": [
|
|
395
|
-
{
|
|
396
|
-
"title": "Maximum Selected",
|
|
397
|
-
"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.",
|
|
398
|
-
"content": [
|
|
399
|
-
{
|
|
400
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_max.png"
|
|
401
|
-
}
|
|
402
|
-
]
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"title": "Validation Error",
|
|
406
|
-
"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.",
|
|
407
|
-
"content": [
|
|
408
|
-
{
|
|
409
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_validation.png"
|
|
410
|
-
}
|
|
411
|
-
]
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"title": "Loading Data",
|
|
415
|
-
"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.",
|
|
416
|
-
"content": [
|
|
417
|
-
{
|
|
418
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_loading.png"
|
|
419
|
-
}
|
|
420
|
-
]
|
|
421
|
-
}
|
|
422
|
-
],
|
|
423
|
-
"title": "Dialog States",
|
|
424
|
-
"layout": "horizontal"
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"type": "list",
|
|
428
|
-
"items": [
|
|
429
|
-
{
|
|
430
|
-
"title": "Single selection",
|
|
431
|
-
"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.",
|
|
432
|
-
"content": [
|
|
433
|
-
{
|
|
434
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_single.png"
|
|
435
|
-
}
|
|
436
|
-
]
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
"title": "Multi-select",
|
|
440
|
-
"description": "In multi-selection dialogs, a CTA for “Done” or “Save” is required to confirm the selection and dismiss the modal.",
|
|
441
|
-
"content": [
|
|
442
|
-
{
|
|
443
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_multiple.png"
|
|
444
|
-
}
|
|
445
|
-
]
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
"title": "Select all",
|
|
449
|
-
"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.",
|
|
450
|
-
"content": [
|
|
451
|
-
{
|
|
452
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_selectAll.png"
|
|
453
|
-
}
|
|
454
|
-
]
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
"title": "Select all checkbox",
|
|
458
|
-
"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. ",
|
|
459
|
-
"content": [
|
|
460
|
-
{
|
|
461
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_selectAll_checkbox.png"
|
|
462
|
-
}
|
|
463
|
-
]
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
"title": "Loading Data",
|
|
467
|
-
"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.",
|
|
468
|
-
"content": [
|
|
469
|
-
{
|
|
470
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_loading.png"
|
|
471
|
-
}
|
|
472
|
-
]
|
|
473
|
-
}
|
|
474
|
-
],
|
|
475
|
-
"layout": "horizontal",
|
|
476
|
-
"title": "Values displayed in Modal",
|
|
477
|
-
"description": "This type of selection list is used for long lists, e.g. contacts, countries and currencies."
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"type": "section",
|
|
481
|
-
"title": "Picker Presets",
|
|
482
|
-
"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. ",
|
|
483
|
-
"content": [
|
|
484
|
-
{
|
|
485
|
-
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4418-192956&embed-host=share"
|
|
486
|
-
}
|
|
487
|
-
]
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
"type": "section",
|
|
491
|
-
"title": "Spec",
|
|
492
|
-
"content": [
|
|
493
|
-
{
|
|
494
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_spec.png"
|
|
495
|
-
}
|
|
496
|
-
]
|
|
497
|
-
}
|
|
498
|
-
]
|
|
499
|
-
}
|
|
500
|
-
]
|
|
501
|
-
}
|
|
119
|
+
]
|
|
502
120
|
}
|
|
@@ -4,8 +4,8 @@ import { Typography, Colors } from "../../../style";
|
|
|
4
4
|
import View from "../../view";
|
|
5
5
|
import Text from "../../text";
|
|
6
6
|
import Icon from "../../icon";
|
|
7
|
-
import Assets from "../../../assets";
|
|
8
7
|
import { PickerFieldTypes } from "../types";
|
|
8
|
+
const dropdown = require("../assets/dropdown.png");
|
|
9
9
|
const useFieldType = props => {
|
|
10
10
|
const {
|
|
11
11
|
fieldType,
|
|
@@ -30,7 +30,7 @@ const useFieldType = props => {
|
|
|
30
30
|
...Typography.text70,
|
|
31
31
|
color: Colors.$textNeutral
|
|
32
32
|
},
|
|
33
|
-
trailingAccessory: trailingAccessory ?? <Icon marginL-s1 source={
|
|
33
|
+
trailingAccessory: trailingAccessory ?? <Icon marginL-s1 source={dropdown} />
|
|
34
34
|
};
|
|
35
35
|
} else if (fieldType === PickerFieldTypes.settings) {
|
|
36
36
|
return {
|
|
@@ -8,8 +8,8 @@ import { Colors } from "../../style";
|
|
|
8
8
|
import { Constants, asBaseComponent, forwardRef } from "../../commons/new";
|
|
9
9
|
import View from "../view";
|
|
10
10
|
import Image from "../image";
|
|
11
|
-
import Assets from "../../assets";
|
|
12
11
|
const GRADIENT_WIDTH = 76;
|
|
12
|
+
const defaultImage = () => require("./assets/gradientOverlay.png");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @description: Scrollable container with animated gradient overlay for horizontal scroll
|
|
@@ -17,7 +17,7 @@ const GRADIENT_WIDTH = 76;
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
class ScrollBar extends Component {
|
|
20
|
-
static displayName = '
|
|
20
|
+
static displayName = 'ScrollBar';
|
|
21
21
|
static defaultProps = {
|
|
22
22
|
gradientWidth: GRADIENT_WIDTH,
|
|
23
23
|
gradientMargins: 0,
|
|
@@ -175,7 +175,7 @@ class ScrollBar extends Component {
|
|
|
175
175
|
right: !left ? gradientMargins : undefined,
|
|
176
176
|
left: left ? gradientMargins : undefined
|
|
177
177
|
}}>
|
|
178
|
-
<Image source={gradientImage ||
|
|
178
|
+
<Image source={gradientImage || defaultImage()} style={{
|
|
179
179
|
width: gradientWidth,
|
|
180
180
|
height: heightToUse,
|
|
181
181
|
tintColor: gradientColor,
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"snippet": [
|
|
46
46
|
"function Example(props) {",
|
|
47
47
|
" const data = Array.from({length: 10}, (_, index) => {",
|
|
48
|
-
" let text =
|
|
48
|
+
" let text = \\`\\${index}\\`;",
|
|
49
49
|
" if (index === 3) {",
|
|
50
50
|
" text = 'Locked item';",
|
|
51
51
|
" }",
|
|
52
52
|
" ",
|
|
53
53
|
" return {",
|
|
54
54
|
" text,",
|
|
55
|
-
" id:
|
|
55
|
+
" id: \\`\\${index}\\`,",
|
|
56
56
|
" locked: index === 3",
|
|
57
57
|
" };",
|
|
58
58
|
" });",
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
" }, []);",
|
|
79
79
|
"",
|
|
80
80
|
" const keyExtractor = useCallback((item: Item) => {",
|
|
81
|
-
" return
|
|
81
|
+
" return \\`\\${item.id}\\`;",
|
|
82
82
|
" }, []);",
|
|
83
83
|
"",
|
|
84
84
|
" return (",
|
|
85
|
-
" <
|
|
85
|
+
" <div>",
|
|
86
86
|
" <SortableList",
|
|
87
87
|
" data={data$1}",
|
|
88
88
|
" flexMigration",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
" renderItem={renderItem$3}",
|
|
91
91
|
" keyExtractor={keyExtractor$4}",
|
|
92
92
|
" />",
|
|
93
|
-
" </
|
|
94
|
-
" )",
|
|
95
|
-
"}
|
|
93
|
+
" </div>",
|
|
94
|
+
" );",
|
|
95
|
+
"}"
|
|
96
96
|
]
|
|
97
97
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,12 +6,17 @@ import { asBaseComponent } from "../../commons/new";
|
|
|
6
6
|
import View from "../view";
|
|
7
7
|
import Text from "../text";
|
|
8
8
|
import Button from "../button";
|
|
9
|
-
import Assets from "../../assets";
|
|
10
9
|
var ActionType = /*#__PURE__*/function (ActionType) {
|
|
11
10
|
ActionType["MINUS"] = "minus";
|
|
12
11
|
ActionType["PLUS"] = "plus";
|
|
13
12
|
return ActionType;
|
|
14
13
|
}(ActionType || {});
|
|
14
|
+
const minusOutline = require("./assets/minusOutline.png");
|
|
15
|
+
const minusOutlineSmall = require("./assets/minusOutlineSmall.png");
|
|
16
|
+
const plusOutline = require("./assets/plusOutline.png");
|
|
17
|
+
const plusOutlineSmall = require("./assets/plusOutlineSmall.png");
|
|
18
|
+
const plusSmall = require("./assets/plusSmall.png");
|
|
19
|
+
const minusSmall = require("./assets/minusSmall.png");
|
|
15
20
|
const DEFAULT_STEP = 1;
|
|
16
21
|
/**
|
|
17
22
|
* @description: A stepper component
|
|
@@ -145,8 +150,8 @@ class Stepper extends PureComponent {
|
|
|
145
150
|
} = this.props;
|
|
146
151
|
const allowStepChange = this.allowStepChange(actionType);
|
|
147
152
|
const isFloatingStepper = type === 'floating';
|
|
148
|
-
const minusButton = isFloatingStepper ?
|
|
149
|
-
const plusButton = isFloatingStepper ?
|
|
153
|
+
const minusButton = isFloatingStepper ? minusSmall : small ? minusOutlineSmall : minusOutline;
|
|
154
|
+
const plusButton = isFloatingStepper ? plusSmall : small ? plusOutlineSmall : plusOutline;
|
|
150
155
|
return <Button link color={isFloatingStepper ? Colors.$iconDefault : undefined} iconSource={actionType === ActionType.MINUS ? minusButton : plusButton} disabled={disabled || !allowStepChange} onPress={() => this.handleStepChange(actionType)} testID={actionType === ActionType.MINUS ? `${testID}.minusStep` : `${testID}.plusStep`} />;
|
|
151
156
|
}
|
|
152
157
|
render() {
|
|
@@ -7,14 +7,11 @@
|
|
|
7
7
|
"extendsLink": ["https://reactnative.dev/docs/scrollview"],
|
|
8
8
|
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/TabControllerScreen/index.tsx",
|
|
9
9
|
"images": [],
|
|
10
|
-
"props": [],
|
|
11
10
|
"snippet": [
|
|
12
|
-
"<TabController>",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
" </TabController.PageCarousel>",
|
|
18
|
-
"</TabController>"
|
|
11
|
+
"<TabController.PageCarousel>",
|
|
12
|
+
" {_.map(items, (item, key) => {",
|
|
13
|
+
" return ($1);",
|
|
14
|
+
" })}",
|
|
15
|
+
"</TabController.PageCarousel>"
|
|
19
16
|
]
|
|
20
17
|
}
|
|
@@ -54,7 +54,7 @@ const ClearButton = ({
|
|
|
54
54
|
onClear?.();
|
|
55
55
|
};
|
|
56
56
|
return <View reanimated style={style} testID={`${testID}.container`}>
|
|
57
|
-
<Button link iconSource={Assets.
|
|
57
|
+
<Button link iconSource={Assets.icons.xFlat} iconStyle={styles.clearIcon} onPress={clear} hitSlop={hitSlop} accessible={hasValue} accessibilityLabel={'clear'} testID={testID} />
|
|
58
58
|
</View>;
|
|
59
59
|
};
|
|
60
60
|
const styles = StyleSheet.create({
|