react-native-ui-lib 7.39.1 → 7.40.0-snapshot.6818
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 +6 -4
- package/scripts/docs/buildDocsCommon.js +16 -83
- package/scripts/release/prReleaseNotesCommon.js +2 -1
- package/src/assets/index.js +2 -5
- package/src/assets/internal/icons/index.js +50 -0
- package/src/assets/internal/icons/index.web.js +50 -0
- package/src/assets/internal/images/index.js +26 -0
- package/src/assets/internal/images/index.web.js +26 -0
- package/src/assets/internal/index.d.ts +4 -0
- package/src/assets/internal/index.js +8 -0
- package/src/commons/Constants.d.ts +1 -0
- package/src/commons/Constants.js +4 -2
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.api.json +40 -0
- package/src/components/avatar/avatar.api.json +91 -8
- package/src/components/avatar/index.d.ts +8 -19
- package/src/components/avatar/index.js +4 -2
- package/src/components/button/button.api.json +35 -198
- package/src/components/button/index.d.ts +0 -1
- package/src/components/button/index.js +2 -9
- package/src/components/button/types.d.ts +1 -1
- package/src/components/card/index.js +1 -1
- package/src/components/checkbox/index.d.ts +5 -2
- package/src/components/checkbox/index.js +11 -8
- 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 +2 -3
- package/src/components/dateTimePicker/index.js +2 -2
- package/src/components/hint/hint.api.json +39 -5
- package/src/components/hint/index.js +2 -3
- package/src/components/icon/index.d.ts +12 -3
- package/src/components/icon/index.js +18 -9
- 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/modal/modal.api.json +54 -0
- package/src/components/overlay/index.js +4 -6
- 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 +1 -0
- package/src/components/picker/PickerItem.js +1 -1
- package/src/components/picker/PickerItemsList.js +1 -1
- package/src/components/picker/api/picker.api.json +409 -10
- package/src/components/picker/helpers/useFieldType.js +2 -2
- package/src/components/scrollBar/index.js +3 -3
- package/src/components/slider/slider.api.json +2 -2
- package/src/components/sortableList/SortableList.api.json +7 -7
- package/src/components/stepper/index.js +3 -8
- package/src/components/tabController/apis/pageCarousel.api.json +8 -5
- package/src/components/tabController/apis/tabBar.api.json +8 -3
- package/src/components/tabController/useScrollToItem.js +1 -1
- package/src/components/text/text.api.json +18 -1
- package/src/components/textField/ClearButton.js +1 -1
- package/src/components/textField/Input.js +1 -1
- package/src/components/textField/textField.api.json +26 -9
- package/src/components/textField/useFieldState.js +2 -2
- package/src/components/timeline/timeline.api.json +57 -106
- package/src/components/toast/index.js +1 -1
- package/src/components/touchableOpacity/touchableOpacity.api.json +14 -3
- package/src/components/view/view.api.json +18 -9
- package/src/components/wizard/WizardStates.js +3 -4
- package/src/components/wizard/wizard.api.json +2 -2
- package/src/hooks/useScrollTo/index.js +9 -4
- package/src/incubator/dialog/useDialogContent.js +1 -1
- package/src/incubator/expandableOverlay/index.js +1 -0
- package/src/incubator/panView/index.js +1 -1
- package/src/incubator/slider/Thumb.js +8 -1
- package/src/incubator/toast/toast.api.json +57 -7
- package/src/assets/icons/index.js +0 -26
- package/src/assets/images/index.js +0 -5
- 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/assets/{icons → internal/icons}/check.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@4x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@1.5x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@2x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@3x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@4x.png +0 -0
- /package/src/assets/{icons/check-small.png → internal/icons/checkSmall.png} +0 -0
- /package/src/assets/{icons/check-small@1.5x.png → internal/icons/checkSmall@1.5x.png} +0 -0
- /package/src/assets/{icons/check-small@2x.png → internal/icons/checkSmall@2x.png} +0 -0
- /package/src/assets/{icons/check-small@3x.png → internal/icons/checkSmall@3x.png} +0 -0
- /package/src/assets/{icons/check-small@4x.png → internal/icons/checkSmall@4x.png} +0 -0
- /package/src/{components/picker/assets/dropdown.png → assets/internal/icons/chevronDown.png} +0 -0
- /package/src/{components/picker/assets/dropdown@1.5x.png → assets/internal/icons/chevronDown@1.5x.png} +0 -0
- /package/src/{components/picker/assets/dropdown@2x.png → assets/internal/icons/chevronDown@2x.png} +0 -0
- /package/src/{components/picker/assets/dropdown@3x.png → assets/internal/icons/chevronDown@3x.png} +0 -0
- /package/src/{components/picker/assets/dropdown@4x.png → assets/internal/icons/chevronDown@4x.png} +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@1.5x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@2x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@3x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/x.png +0 -0
- /package/src/assets/{icons → internal/icons}/x@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/x@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@4x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@1.5x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@2x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@3x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@4x.png +0 -0
- /package/src/assets/{images → internal/images}/gradient.png +0 -0
- /package/src/{components/scrollBar/assets → assets/internal/images}/gradientOverlay.png +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh.png → assets/internal/images/gradientOverlayHigh.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@1.5x.png → assets/internal/images/gradientOverlayHigh@1.5x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@2x.png → assets/internal/images/gradientOverlayHigh@2x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@3x.png → assets/internal/images/gradientOverlayHigh@3x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@4x.png → assets/internal/images/gradientOverlayHigh@4x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow.png → assets/internal/images/gradientOverlayLow.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@1.5x.png → assets/internal/images/gradientOverlayLow@1.5x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@2x.png → assets/internal/images/gradientOverlayLow@2x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@3x.png → assets/internal/images/gradientOverlayLow@3x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@4x.png → assets/internal/images/gradientOverlayLow@4x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium.png → assets/internal/images/gradientOverlayMedium.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@1.5x.png → assets/internal/images/gradientOverlayMedium@1.5x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@2x.png → assets/internal/images/gradientOverlayMedium@2x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@3x.png → assets/internal/images/gradientOverlayMedium@3x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@4x.png → assets/internal/images/gradientOverlayMedium@4x.png} +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@1.5x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@2x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@3x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@4x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@1.5x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@2x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@3x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@4x.png +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png → assets/internal/images/transparentSwatch.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png → assets/internal/images/transparentSwatch@1.5x.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png → assets/internal/images/transparentSwatch@2x.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png → assets/internal/images/transparentSwatch@3x.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@4x.png → assets/internal/images/transparentSwatch@4x.png} +0 -0
|
@@ -107,14 +107,413 @@
|
|
|
107
107
|
{"name": "customLoaderElement", "type": "ReactNode", "description": "Custom loader element"}
|
|
108
108
|
],
|
|
109
109
|
"snippet": [
|
|
110
|
-
"
|
|
111
|
-
" value=
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
|
|
110
|
+
"function Example(props) {",
|
|
111
|
+
" const [value, setValue] = useState(undefined);",
|
|
112
|
+
"",
|
|
113
|
+
" const FILTERS = [",
|
|
114
|
+
" {value: 1, label: 'All'},",
|
|
115
|
+
" {value: 2, label: 'Accessories'},",
|
|
116
|
+
" {value: 3, label: 'Outwear'},",
|
|
117
|
+
" {value: 4, label: 'Footwear'},",
|
|
118
|
+
" {value: 5, label: 'Swimwear'},",
|
|
119
|
+
" {value: 6, label: 'Tops'}",
|
|
120
|
+
" ];",
|
|
121
|
+
"",
|
|
122
|
+
" return (",
|
|
123
|
+
" <View flex padding-s5>",
|
|
124
|
+
" <Picker",
|
|
125
|
+
" value={value}",
|
|
126
|
+
" preset='outline'",
|
|
127
|
+
" placeholder={'Select filter'}",
|
|
128
|
+
" label={'filter'}",
|
|
129
|
+
" onChange={setValue}",
|
|
130
|
+
" items={FILTERS}",
|
|
131
|
+
" />",
|
|
132
|
+
" </View>",
|
|
133
|
+
" );",
|
|
134
|
+
"}"
|
|
135
|
+
],
|
|
136
|
+
"docs": {
|
|
137
|
+
"hero": {
|
|
138
|
+
"title": "Picker",
|
|
139
|
+
"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.",
|
|
140
|
+
"type": "hero",
|
|
141
|
+
"layout": "horizontal",
|
|
142
|
+
"content": [
|
|
143
|
+
{
|
|
144
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_cover.png"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"tabs": [
|
|
149
|
+
{
|
|
150
|
+
"title": "Overview",
|
|
151
|
+
"sections": [
|
|
152
|
+
{
|
|
153
|
+
"type": "section",
|
|
154
|
+
"title": "Usage Example",
|
|
155
|
+
"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.",
|
|
156
|
+
"content": [
|
|
157
|
+
{
|
|
158
|
+
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185562&embed-host=share"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "list",
|
|
164
|
+
"items": [
|
|
165
|
+
{
|
|
166
|
+
"title": "Form Field (default)",
|
|
167
|
+
"description": "Mainly used as part of a form, works cohesively with the text field component and other form related components.",
|
|
168
|
+
"content": [
|
|
169
|
+
{
|
|
170
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_form.png"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"title": "Filter Field",
|
|
176
|
+
"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.",
|
|
177
|
+
"content": [
|
|
178
|
+
{
|
|
179
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_filter.png"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"title": "Settings Field",
|
|
185
|
+
"description": "Based on ListItem component.\nUsed mostly when the picker is part of a settings screen.",
|
|
186
|
+
"content": [
|
|
187
|
+
{
|
|
188
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_types_settings.png"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"layout": "horizontal",
|
|
194
|
+
"title": "Picker Types",
|
|
195
|
+
"description": "Various types of pickers are available to accommodate different needs and use cases. "
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "section",
|
|
199
|
+
"title": "Picker Types Examples",
|
|
200
|
+
"content": [
|
|
201
|
+
{
|
|
202
|
+
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185650&embed-host=share"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"type": "table",
|
|
208
|
+
"columns": ["State/Type/Preset", "Preview"],
|
|
209
|
+
"items": [
|
|
210
|
+
{
|
|
211
|
+
"title": "Default",
|
|
212
|
+
"content": [
|
|
213
|
+
{
|
|
214
|
+
"flexed": true,
|
|
215
|
+
"snippet": "<Picker preset='outline' placeholder='select' items={[{label: 'Selected Value', value: 1}]} value={1} trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>}/>",
|
|
216
|
+
"props": {
|
|
217
|
+
"preset": "outline",
|
|
218
|
+
"label": "Label",
|
|
219
|
+
"placeholder": "Select"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"title": "Value selected + icon prefix ",
|
|
226
|
+
"content": [
|
|
227
|
+
{
|
|
228
|
+
"flexed": true,
|
|
229
|
+
"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}/>"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"title": "Disabled",
|
|
235
|
+
"content": [
|
|
236
|
+
{
|
|
237
|
+
"flexed": true,
|
|
238
|
+
"snippet": "<Picker preset='outline' label='Label' placeholder='Select' editable={false} trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>} />"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"title": "Validation error (value not selected)",
|
|
244
|
+
"content": [
|
|
245
|
+
{
|
|
246
|
+
"flexed": true,
|
|
247
|
+
"snippet": "<Picker preset='outline' label='Label' placeholder='Select' validationMessage='Validation Message' trailingAccessory={<Icon source={Assets.icons.demo.chevronDown}/>} />"
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"title": "Form Field"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"type": "table",
|
|
256
|
+
"columns": ["State/Type/Preset", "Preview"],
|
|
257
|
+
"items": [
|
|
258
|
+
{
|
|
259
|
+
"title": "Default",
|
|
260
|
+
"content": [
|
|
261
|
+
{
|
|
262
|
+
"props": {
|
|
263
|
+
"items": [
|
|
264
|
+
{
|
|
265
|
+
"label": "Selected Value",
|
|
266
|
+
"value": 1
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"value": 1,
|
|
270
|
+
"fieldType": "filter"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"title": "With label",
|
|
277
|
+
"content": [
|
|
278
|
+
{
|
|
279
|
+
"props": {
|
|
280
|
+
"label": "Label: ",
|
|
281
|
+
"items": [
|
|
282
|
+
{
|
|
283
|
+
"label": "Selected Value",
|
|
284
|
+
"value": 1
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"value": 1,
|
|
288
|
+
"fieldType": "filter"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"title": "Multiple values selected",
|
|
295
|
+
"content": [
|
|
296
|
+
{
|
|
297
|
+
"props": {
|
|
298
|
+
"mode": "MULTI",
|
|
299
|
+
"items": [
|
|
300
|
+
{
|
|
301
|
+
"label": "Value 1",
|
|
302
|
+
"value": 1
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"label": "Value 2",
|
|
306
|
+
"value": 2
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"value": [1, 2],
|
|
310
|
+
"fieldType": "filter"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"title": "Filter Field"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"type": "table",
|
|
320
|
+
"columns": ["State/Type/Preset", "Preview"],
|
|
321
|
+
"items": [
|
|
322
|
+
{
|
|
323
|
+
"title": "Default",
|
|
324
|
+
"content": [
|
|
325
|
+
{
|
|
326
|
+
"background": "#E8ECF0",
|
|
327
|
+
"flexed": true,
|
|
328
|
+
"snippet": "<Picker label='Label' placeholder='Select' fieldType='settings' containerStyle={{padding: 20, backgroundColor: Colors.$backgroundDefault}}/>"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"title": "Value selected + icon prefix ",
|
|
334
|
+
"content": [
|
|
335
|
+
{
|
|
336
|
+
"background": "#E8ECF0",
|
|
337
|
+
"flexed": true,
|
|
338
|
+
"snippet": "<Picker label='Label' placeholder='Select' value={1} fieldType='settings' items={[{label: 'Selected value', value: 1}]} containerStyle={{padding: 20, backgroundColor: Colors.$backgroundDefault}}/>",
|
|
339
|
+
"props": {
|
|
340
|
+
"label": "Label",
|
|
341
|
+
"placeholder": "Select",
|
|
342
|
+
"fieldType": "settings",
|
|
343
|
+
"items": [
|
|
344
|
+
{
|
|
345
|
+
"label": "Selected Value",
|
|
346
|
+
"value": 1
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"value": 1
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"title": "Settings Field"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"type": "list",
|
|
359
|
+
"items": [
|
|
360
|
+
{
|
|
361
|
+
"title": "Dialog",
|
|
362
|
+
"description": "Recommended for short value lists.",
|
|
363
|
+
"content": [
|
|
364
|
+
{
|
|
365
|
+
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185705&embed-host=share"
|
|
366
|
+
}
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"title": "Modal",
|
|
371
|
+
"description": "Used for longer lists like country selection, currency selection or a language picker.",
|
|
372
|
+
"content": [
|
|
373
|
+
{
|
|
374
|
+
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4415-185740&embed-host=share"
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"layout": "horizontal",
|
|
380
|
+
"title": "Picker Values display options",
|
|
381
|
+
"description": "The Picker component serves as an entry point to a list of selectable values, usually displayed in a modal or a dialog."
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"type": "list",
|
|
385
|
+
"items": [
|
|
386
|
+
{
|
|
387
|
+
"title": "Single selection",
|
|
388
|
+
"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. ",
|
|
389
|
+
"content": [
|
|
390
|
+
{
|
|
391
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_values_dialog_single.png"
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"title": "Multi-select",
|
|
397
|
+
"description": "In multi-select dialogs, a clear CTA for “Done” or “Save” is required to confirm the selection and dismiss the dialog.",
|
|
398
|
+
"content": [
|
|
399
|
+
{
|
|
400
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_values_dialog_multiple.png"
|
|
401
|
+
}
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
"layout": "horizontal",
|
|
406
|
+
"title": "Values displayed in Dialog",
|
|
407
|
+
"description": "The Picker component serves as an entry point to a list of selectable values, usually displayed in a modal or a dialog."
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"type": "list",
|
|
411
|
+
"items": [
|
|
412
|
+
{
|
|
413
|
+
"title": "Maximum Selected",
|
|
414
|
+
"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.",
|
|
415
|
+
"content": [
|
|
416
|
+
{
|
|
417
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_max.png"
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"title": "Validation Error",
|
|
423
|
+
"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.",
|
|
424
|
+
"content": [
|
|
425
|
+
{
|
|
426
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_validation.png"
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"title": "Loading Data",
|
|
432
|
+
"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.",
|
|
433
|
+
"content": [
|
|
434
|
+
{
|
|
435
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_dialog_states_loading.png"
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"title": "Dialog States",
|
|
441
|
+
"layout": "horizontal"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"type": "list",
|
|
445
|
+
"items": [
|
|
446
|
+
{
|
|
447
|
+
"title": "Single selection",
|
|
448
|
+
"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.",
|
|
449
|
+
"content": [
|
|
450
|
+
{
|
|
451
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_single.png"
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"title": "Multi-select",
|
|
457
|
+
"description": "In multi-selection dialogs, a CTA for “Done” or “Save” is required to confirm the selection and dismiss the modal.",
|
|
458
|
+
"content": [
|
|
459
|
+
{
|
|
460
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_multiple.png"
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"title": "Select all",
|
|
466
|
+
"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.",
|
|
467
|
+
"content": [
|
|
468
|
+
{
|
|
469
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_selectAll.png"
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"title": "Select all checkbox",
|
|
475
|
+
"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. ",
|
|
476
|
+
"content": [
|
|
477
|
+
{
|
|
478
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_selectAll_checkbox.png"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"title": "Loading Data",
|
|
484
|
+
"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.",
|
|
485
|
+
"content": [
|
|
486
|
+
{
|
|
487
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_modal_loading.png"
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"layout": "horizontal",
|
|
493
|
+
"title": "Values displayed in Modal",
|
|
494
|
+
"description": "This type of selection list is used for long lists, e.g. contacts, countries and currencies."
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"type": "section",
|
|
498
|
+
"title": "Picker Presets",
|
|
499
|
+
"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. ",
|
|
500
|
+
"content": [
|
|
501
|
+
{
|
|
502
|
+
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=4418-192956&embed-host=share"
|
|
503
|
+
}
|
|
504
|
+
]
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"type": "section",
|
|
508
|
+
"title": "Spec",
|
|
509
|
+
"content": [
|
|
510
|
+
{
|
|
511
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Picker/picker_spec.png"
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
}
|
|
120
519
|
}
|
|
@@ -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";
|
|
7
8
|
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={Assets.internal.icons.chevronDown} />
|
|
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";
|
|
11
12
|
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 defaultImage = () => require("./assets/gradientOverlay.png");
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
class ScrollBar extends Component {
|
|
20
|
-
static displayName = '
|
|
20
|
+
static displayName = 'IGNORE';
|
|
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 || Assets.internal.images.gradientOverlay} style={{
|
|
179
179
|
width: gradientWidth,
|
|
180
180
|
height: heightToUse,
|
|
181
181
|
tintColor: gradientColor,
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
}
|
|
228
228
|
],
|
|
229
229
|
"title": "Spec",
|
|
230
|
-
"description": "**Linear slider**\n\n**Default**\nThumb: 24px \nOutline: 1.5px\n\n**On tap**\nThumb: 40px\nOutline: 1.5px\n\n**Disabled**"
|
|
230
|
+
"description": "Markdown:\n\n**Linear slider**\n\n**Default**\nThumb: 24px \nOutline: 1.5px\n\n**On tap**\nThumb: 40px\nOutline: 1.5px\n\n**Disabled**"
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"type": "section",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Slider/slider_spec_range.png"
|
|
238
238
|
}
|
|
239
239
|
],
|
|
240
|
-
"description": "**Range slider**\n\n**Initial state**\nWidest range is displayed by default.\n\n**Thumbs**\nThumbs should not cross each other and keep minimum distance between them of S2 (8px). Thumbs shouldn’t overlap each other when idle.\n\n**Spacing**\nMinimum spacing between idle Thumbs - S2"
|
|
240
|
+
"description": "Markdown:\n\n**Range slider**\n\n**Initial state**\nWidest range is displayed by default.\n\n**Thumbs**\nThumbs should not cross each other and keep minimum distance between them of S2 (8px). Thumbs shouldn’t overlap each other when idle.\n\n**Spacing**\nMinimum spacing between idle Thumbs - S2"
|
|
241
241
|
}
|
|
242
242
|
]
|
|
243
243
|
}
|
|
@@ -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
|
+
" <View>",
|
|
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
|
+
" </View>",
|
|
94
|
+
" )",
|
|
95
|
+
"};"
|
|
96
96
|
]
|
|
97
97
|
}
|
|
@@ -6,17 +6,12 @@ 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";
|
|
9
10
|
var ActionType = /*#__PURE__*/function (ActionType) {
|
|
10
11
|
ActionType["MINUS"] = "minus";
|
|
11
12
|
ActionType["PLUS"] = "plus";
|
|
12
13
|
return ActionType;
|
|
13
14
|
}(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");
|
|
20
15
|
const DEFAULT_STEP = 1;
|
|
21
16
|
/**
|
|
22
17
|
* @description: A stepper component
|
|
@@ -150,8 +145,8 @@ class Stepper extends PureComponent {
|
|
|
150
145
|
} = this.props;
|
|
151
146
|
const allowStepChange = this.allowStepChange(actionType);
|
|
152
147
|
const isFloatingStepper = type === 'floating';
|
|
153
|
-
const minusButton = isFloatingStepper ? minusSmall : small ? minusOutlineSmall : minusOutline;
|
|
154
|
-
const plusButton = isFloatingStepper ? plusSmall : small ? plusOutlineSmall : plusOutline;
|
|
148
|
+
const minusButton = isFloatingStepper ? Assets.internal.icons.minusSmall : small ? Assets.internal.icons.minusOutlineSmall : Assets.internal.icons.minusOutline;
|
|
149
|
+
const plusButton = isFloatingStepper ? Assets.internal.icons.plusSmall : small ? Assets.internal.icons.plusOutlineSmall : Assets.internal.icons.plusOutline;
|
|
155
150
|
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`} />;
|
|
156
151
|
}
|
|
157
152
|
render() {
|
|
@@ -7,11 +7,14 @@
|
|
|
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": [],
|
|
10
11
|
"snippet": [
|
|
11
|
-
"<TabController
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
12
|
+
"<TabController>",
|
|
13
|
+
" <TabController.PageCarousel>",
|
|
14
|
+
" {_.map(items, (item, key) => {",
|
|
15
|
+
" return <TabController.TabPage index={key}/>;",
|
|
16
|
+
" })}",
|
|
17
|
+
" </TabController.PageCarousel>",
|
|
18
|
+
"</TabController>"
|
|
16
19
|
]
|
|
17
20
|
}
|
|
@@ -105,7 +105,9 @@
|
|
|
105
105
|
"description": "The component test id"
|
|
106
106
|
}
|
|
107
107
|
],
|
|
108
|
-
"snippet": [
|
|
108
|
+
"snippet": [
|
|
109
|
+
"<TabController.TabBar activeBackgroundColor={Colors.blue30$1}/>"
|
|
110
|
+
],
|
|
109
111
|
"docs": {
|
|
110
112
|
"hero": {
|
|
111
113
|
"title": "TabController.TabBar",
|
|
@@ -144,7 +146,7 @@
|
|
|
144
146
|
"items": [
|
|
145
147
|
{
|
|
146
148
|
"title": "",
|
|
147
|
-
"description": "**Inactive Tab**\nText: BodySmall $textDefault\nBackground: $backgroundElevated \n\n**Active Tab**\nText: BodySmallBold $textPrimary\nBackground: $backgroundElevated\nIndicator: $outlinePrimary \n\n**Shadow**\nsh10\n\n**Dark Skin**\nText: BodySmall, System White\nBackground: System Grey10\nDivider: System Grey20",
|
|
149
|
+
"description": "Markdown:\n\n**Inactive Tab**\nText: BodySmall $textDefault\nBackground: $backgroundElevated \n\n**Active Tab**\nText: BodySmallBold $textPrimary\nBackground: $backgroundElevated\nIndicator: $outlinePrimary \n\n**Shadow**\nsh10\n\n**Dark Skin**\nText: BodySmall, System White\nBackground: System Grey10\nDivider: System Grey20",
|
|
148
150
|
"content": [
|
|
149
151
|
{
|
|
150
152
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/TabBar/tabBar_overview_styling.png"
|
|
@@ -157,7 +159,10 @@
|
|
|
157
159
|
},
|
|
158
160
|
{
|
|
159
161
|
"type": "table",
|
|
160
|
-
"columns": [
|
|
162
|
+
"columns": [
|
|
163
|
+
"Property",
|
|
164
|
+
"Component"
|
|
165
|
+
],
|
|
161
166
|
"items": [
|
|
162
167
|
{
|
|
163
168
|
"title": "Counter Badge",
|
|
@@ -6,7 +6,7 @@ import { useState, useCallback, useEffect, useRef } from 'react';
|
|
|
6
6
|
import { useSharedValue } from 'react-native-reanimated';
|
|
7
7
|
import { useScrollTo } from "../../hooks";
|
|
8
8
|
import { Constants } from "../../commons/new";
|
|
9
|
-
const FIX_RTL = Constants.isRTL
|
|
9
|
+
const FIX_RTL = Constants.isRTL;
|
|
10
10
|
export let OffsetType = /*#__PURE__*/function (OffsetType) {
|
|
11
11
|
OffsetType["CENTER"] = "CENTER";
|
|
12
12
|
OffsetType["DYNAMIC"] = "DYNAMIC";
|
|
@@ -25,5 +25,22 @@
|
|
|
25
25
|
{"name": "recorderTag", "type": "'mask' | 'unmask'", "description": "Recorder Tag"},
|
|
26
26
|
{"name": "animated", "type": "boolean", "description": "Use Animated.Text as a container"}
|
|
27
27
|
],
|
|
28
|
-
"snippet": [
|
|
28
|
+
"snippet": [
|
|
29
|
+
"<View flex center gap-s2>",
|
|
30
|
+
"<Text text30$1>Text30</Text>",
|
|
31
|
+
"<Text text40 red30>Red</Text>",
|
|
32
|
+
"<Text text60 uppercase>uppercase</Text>",
|
|
33
|
+
"<Text text60 underline>underline</Text>",
|
|
34
|
+
"<Text text70 highlightString='be' highlightStyle={{color: Colors.$textPrimary, fontWeight: 'bold'}}>To be, or not to be</Text>",
|
|
35
|
+
"</View>"
|
|
36
|
+
],
|
|
37
|
+
"docs": {
|
|
38
|
+
"hero": {
|
|
39
|
+
"title": "Text",
|
|
40
|
+
"description": "An enhanced version of React Native's Text component providing additional features and modifiers support",
|
|
41
|
+
"type": "hero",
|
|
42
|
+
"layout": "horizontal",
|
|
43
|
+
"content": [{}]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
29
46
|
}
|
|
@@ -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.icons.xFlat} iconStyle={styles.clearIcon} onPress={clear} hitSlop={hitSlop} accessible={hasValue} accessibilityLabel={'clear'} testID={testID} />
|
|
57
|
+
<Button link iconSource={Assets.internal.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({
|