@telus-uds/components-base 1.8.5 → 1.11.0
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/CHANGELOG.md +47 -2
- package/component-docs.json +666 -27
- package/lib/Card/Card.js +9 -4
- package/lib/Carousel/Carousel.js +672 -0
- package/lib/Carousel/CarouselContext.js +59 -0
- package/lib/Carousel/CarouselItem/CarouselItem.js +92 -0
- package/lib/Carousel/CarouselItem/index.js +13 -0
- package/lib/Carousel/dictionary.js +23 -0
- package/lib/Carousel/index.js +32 -0
- package/lib/ExpandCollapse/Panel.js +10 -1
- package/lib/InputSupports/InputSupports.js +10 -3
- package/lib/InputSupports/useInputSupports.js +3 -2
- package/lib/Modal/Modal.js +4 -0
- package/lib/Skeleton/Skeleton.js +1 -0
- package/lib/StepTracker/StepTracker.js +15 -12
- package/lib/TextInput/TextInput.js +3 -12
- package/lib/TextInput/TextInputBase.js +9 -0
- package/lib/TextInput/propTypes.js +3 -8
- package/lib/index.js +23 -0
- package/lib/utils/props/clickProps.js +2 -2
- package/lib/utils/props/handlerProps.js +77 -31
- package/lib/utils/props/textInputProps.js +8 -1
- package/lib/utils/useScrollBlocking.js +66 -0
- package/lib/utils/useScrollBlocking.native.js +11 -0
- package/lib-module/Card/Card.js +5 -4
- package/lib-module/Carousel/Carousel.js +617 -0
- package/lib-module/Carousel/CarouselContext.js +43 -0
- package/lib-module/Carousel/CarouselItem/CarouselItem.js +75 -0
- package/lib-module/Carousel/CarouselItem/index.js +2 -0
- package/lib-module/Carousel/dictionary.js +16 -0
- package/lib-module/Carousel/index.js +2 -0
- package/lib-module/ExpandCollapse/Panel.js +9 -1
- package/lib-module/InputSupports/InputSupports.js +10 -3
- package/lib-module/InputSupports/useInputSupports.js +3 -2
- package/lib-module/Modal/Modal.js +3 -0
- package/lib-module/Skeleton/Skeleton.js +1 -0
- package/lib-module/StepTracker/StepTracker.js +14 -12
- package/lib-module/TextInput/TextInput.js +3 -9
- package/lib-module/TextInput/TextInputBase.js +10 -1
- package/lib-module/TextInput/propTypes.js +4 -8
- package/lib-module/index.js +2 -0
- package/lib-module/utils/props/clickProps.js +2 -2
- package/lib-module/utils/props/handlerProps.js +78 -31
- package/lib-module/utils/props/textInputProps.js +8 -1
- package/lib-module/utils/useScrollBlocking.js +58 -0
- package/lib-module/utils/useScrollBlocking.native.js +2 -0
- package/package.json +3 -3
- package/src/Card/Card.jsx +6 -4
- package/src/Carousel/Carousel.jsx +649 -0
- package/src/Carousel/CarouselContext.jsx +30 -0
- package/src/Carousel/CarouselItem/CarouselItem.jsx +66 -0
- package/src/Carousel/CarouselItem/index.js +3 -0
- package/src/Carousel/dictionary.js +16 -0
- package/src/Carousel/index.js +2 -0
- package/src/ExpandCollapse/Panel.jsx +8 -1
- package/src/InputSupports/InputSupports.jsx +18 -3
- package/src/InputSupports/useInputSupports.js +2 -2
- package/src/Modal/Modal.jsx +3 -1
- package/src/Skeleton/Skeleton.jsx +1 -0
- package/src/StepTracker/StepTracker.jsx +21 -8
- package/src/TextInput/TextInput.jsx +2 -9
- package/src/TextInput/TextInputBase.jsx +11 -1
- package/src/TextInput/propTypes.js +3 -7
- package/src/index.js +2 -0
- package/src/utils/props/clickProps.js +2 -2
- package/src/utils/props/handlerProps.js +64 -16
- package/src/utils/props/textInputProps.js +7 -1
- package/src/utils/useScrollBlocking.js +57 -0
- package/src/utils/useScrollBlocking.native.js +2 -0
package/component-docs.json
CHANGED
|
@@ -81,6 +81,14 @@
|
|
|
81
81
|
"minWidth": "size",
|
|
82
82
|
"shadow": "shadow"
|
|
83
83
|
},
|
|
84
|
+
"Carousel": {
|
|
85
|
+
"nextIcon": "icon",
|
|
86
|
+
"previousIcon": "icon",
|
|
87
|
+
"showPreviousNextNavigation": "show",
|
|
88
|
+
"showPanelNavigation": "show",
|
|
89
|
+
"spaceBetweenSlideAndPreviousNextNavigation": "size",
|
|
90
|
+
"spaceBetweenSlideAndPanelNavigation": "size"
|
|
91
|
+
},
|
|
84
92
|
"Checkbox": {
|
|
85
93
|
"containerBackgroundColor": "color",
|
|
86
94
|
"feedbackMarginBottom": "size",
|
|
@@ -1810,6 +1818,14 @@
|
|
|
1810
1818
|
},
|
|
1811
1819
|
"required": false,
|
|
1812
1820
|
"description": "Optional theme token overrides that may be passed to the ExpandCollapseControl element."
|
|
1821
|
+
},
|
|
1822
|
+
"controlRef": {
|
|
1823
|
+
"type": {
|
|
1824
|
+
"name": "custom",
|
|
1825
|
+
"raw": "ABBPropTypes.ref()"
|
|
1826
|
+
},
|
|
1827
|
+
"required": false,
|
|
1828
|
+
"description": "An optional ref to be attached to the control"
|
|
1813
1829
|
}
|
|
1814
1830
|
},
|
|
1815
1831
|
"attributes": {
|
|
@@ -2694,6 +2710,14 @@
|
|
|
2694
2710
|
},
|
|
2695
2711
|
"required": false,
|
|
2696
2712
|
"description": "Optional theme token overrides that may be passed to the ExpandCollapseControl element."
|
|
2713
|
+
},
|
|
2714
|
+
"controlRef": {
|
|
2715
|
+
"type": {
|
|
2716
|
+
"name": "custom",
|
|
2717
|
+
"raw": "ABBPropTypes.ref()"
|
|
2718
|
+
},
|
|
2719
|
+
"required": false,
|
|
2720
|
+
"description": "An optional ref to be attached to the control"
|
|
2697
2721
|
}
|
|
2698
2722
|
},
|
|
2699
2723
|
"attributes": {
|
|
@@ -4310,6 +4334,125 @@
|
|
|
4310
4334
|
}
|
|
4311
4335
|
}
|
|
4312
4336
|
},
|
|
4337
|
+
"InputSupports": {
|
|
4338
|
+
"docs": {
|
|
4339
|
+
"description": "",
|
|
4340
|
+
"props": {
|
|
4341
|
+
"copy": {
|
|
4342
|
+
"defaultValue": {
|
|
4343
|
+
"value": "'en'",
|
|
4344
|
+
"computed": false
|
|
4345
|
+
},
|
|
4346
|
+
"type": {
|
|
4347
|
+
"name": "enum",
|
|
4348
|
+
"value": [
|
|
4349
|
+
{
|
|
4350
|
+
"value": "'en'",
|
|
4351
|
+
"computed": false
|
|
4352
|
+
},
|
|
4353
|
+
{
|
|
4354
|
+
"value": "'fr'",
|
|
4355
|
+
"computed": false
|
|
4356
|
+
}
|
|
4357
|
+
]
|
|
4358
|
+
},
|
|
4359
|
+
"required": false,
|
|
4360
|
+
"description": "Whether the English or French copy will be used (e.g. for accessibility labels)."
|
|
4361
|
+
},
|
|
4362
|
+
"hintPosition": {
|
|
4363
|
+
"defaultValue": {
|
|
4364
|
+
"value": "'inline'",
|
|
4365
|
+
"computed": false
|
|
4366
|
+
},
|
|
4367
|
+
"type": {
|
|
4368
|
+
"name": "enum",
|
|
4369
|
+
"value": [
|
|
4370
|
+
{
|
|
4371
|
+
"value": "'inline'",
|
|
4372
|
+
"computed": false
|
|
4373
|
+
},
|
|
4374
|
+
{
|
|
4375
|
+
"value": "'below'",
|
|
4376
|
+
"computed": false
|
|
4377
|
+
}
|
|
4378
|
+
]
|
|
4379
|
+
},
|
|
4380
|
+
"required": false,
|
|
4381
|
+
"description": "Position of the hint relative to label."
|
|
4382
|
+
},
|
|
4383
|
+
"children": {
|
|
4384
|
+
"type": {
|
|
4385
|
+
"name": "union",
|
|
4386
|
+
"value": [
|
|
4387
|
+
{
|
|
4388
|
+
"name": "func"
|
|
4389
|
+
},
|
|
4390
|
+
{
|
|
4391
|
+
"name": "node"
|
|
4392
|
+
}
|
|
4393
|
+
]
|
|
4394
|
+
},
|
|
4395
|
+
"required": false,
|
|
4396
|
+
"description": ""
|
|
4397
|
+
},
|
|
4398
|
+
"label": {
|
|
4399
|
+
"type": {
|
|
4400
|
+
"name": "string"
|
|
4401
|
+
},
|
|
4402
|
+
"required": false,
|
|
4403
|
+
"description": "The input label."
|
|
4404
|
+
},
|
|
4405
|
+
"hint": {
|
|
4406
|
+
"type": {
|
|
4407
|
+
"name": "string"
|
|
4408
|
+
},
|
|
4409
|
+
"required": false,
|
|
4410
|
+
"description": "A short description of the expected input."
|
|
4411
|
+
},
|
|
4412
|
+
"feedback": {
|
|
4413
|
+
"type": {
|
|
4414
|
+
"name": "string"
|
|
4415
|
+
},
|
|
4416
|
+
"required": false,
|
|
4417
|
+
"description": "A detailed description of validation error/success or additional instructions.\nVisual variant is determined based on the `validation` prop."
|
|
4418
|
+
},
|
|
4419
|
+
"tooltip": {
|
|
4420
|
+
"type": {
|
|
4421
|
+
"name": "string"
|
|
4422
|
+
},
|
|
4423
|
+
"required": false,
|
|
4424
|
+
"description": "Content of an optional `Tooltip`. If set, a tooltip button will be shown next to the label."
|
|
4425
|
+
},
|
|
4426
|
+
"validation": {
|
|
4427
|
+
"type": {
|
|
4428
|
+
"name": "enum",
|
|
4429
|
+
"value": [
|
|
4430
|
+
{
|
|
4431
|
+
"value": "'error'",
|
|
4432
|
+
"computed": false
|
|
4433
|
+
},
|
|
4434
|
+
{
|
|
4435
|
+
"value": "'success'",
|
|
4436
|
+
"computed": false
|
|
4437
|
+
}
|
|
4438
|
+
]
|
|
4439
|
+
},
|
|
4440
|
+
"required": false,
|
|
4441
|
+
"description": "Use to visually mark an input as valid or invalid."
|
|
4442
|
+
},
|
|
4443
|
+
"nativeID": {
|
|
4444
|
+
"type": {
|
|
4445
|
+
"name": "string"
|
|
4446
|
+
},
|
|
4447
|
+
"required": false,
|
|
4448
|
+
"description": "ID for DOM element on web"
|
|
4449
|
+
}
|
|
4450
|
+
},
|
|
4451
|
+
"attributes": {
|
|
4452
|
+
"acceptsRNA11yProps": false
|
|
4453
|
+
}
|
|
4454
|
+
}
|
|
4455
|
+
},
|
|
4313
4456
|
"List": {
|
|
4314
4457
|
"docs": {
|
|
4315
4458
|
"description": "An unordered List component has a child a ListItem that\nallows icon, dividers and customized typography",
|
|
@@ -6892,15 +7035,24 @@
|
|
|
6892
7035
|
"computed": false
|
|
6893
7036
|
},
|
|
6894
7037
|
"type": {
|
|
6895
|
-
"name": "
|
|
7038
|
+
"name": "union",
|
|
6896
7039
|
"value": [
|
|
6897
7040
|
{
|
|
6898
|
-
"
|
|
6899
|
-
"
|
|
7041
|
+
"name": "enum",
|
|
7042
|
+
"value": [
|
|
7043
|
+
{
|
|
7044
|
+
"value": "'en'",
|
|
7045
|
+
"computed": false
|
|
7046
|
+
},
|
|
7047
|
+
{
|
|
7048
|
+
"value": "'fr'",
|
|
7049
|
+
"computed": false
|
|
7050
|
+
}
|
|
7051
|
+
]
|
|
6900
7052
|
},
|
|
6901
7053
|
{
|
|
6902
|
-
"
|
|
6903
|
-
"
|
|
7054
|
+
"name": "custom",
|
|
7055
|
+
"raw": "dictionaryContentShape"
|
|
6904
7056
|
}
|
|
6905
7057
|
]
|
|
6906
7058
|
},
|
|
@@ -6916,31 +7068,13 @@
|
|
|
6916
7068
|
"name": "shape",
|
|
6917
7069
|
"value": {
|
|
6918
7070
|
"en": {
|
|
6919
|
-
"name": "
|
|
6920
|
-
"
|
|
6921
|
-
"stepLabel": {
|
|
6922
|
-
"name": "string",
|
|
6923
|
-
"required": false
|
|
6924
|
-
},
|
|
6925
|
-
"stepTrackerLabel": {
|
|
6926
|
-
"name": "string",
|
|
6927
|
-
"required": false
|
|
6928
|
-
}
|
|
6929
|
-
},
|
|
7071
|
+
"name": "custom",
|
|
7072
|
+
"raw": "dictionaryContentShape",
|
|
6930
7073
|
"required": false
|
|
6931
7074
|
},
|
|
6932
7075
|
"fr": {
|
|
6933
|
-
"name": "
|
|
6934
|
-
"
|
|
6935
|
-
"stepLabel": {
|
|
6936
|
-
"name": "string",
|
|
6937
|
-
"required": false
|
|
6938
|
-
},
|
|
6939
|
-
"stepTrackerLabel": {
|
|
6940
|
-
"name": "string",
|
|
6941
|
-
"required": false
|
|
6942
|
-
}
|
|
6943
|
-
},
|
|
7076
|
+
"name": "custom",
|
|
7077
|
+
"raw": "dictionaryContentShape",
|
|
6944
7078
|
"required": false
|
|
6945
7079
|
}
|
|
6946
7080
|
}
|
|
@@ -8272,6 +8406,511 @@
|
|
|
8272
8406
|
}
|
|
8273
8407
|
}
|
|
8274
8408
|
},
|
|
8409
|
+
"Carousel": {
|
|
8410
|
+
"docs": {
|
|
8411
|
+
"description": "Carousel is a general-purpose content slider that can be used to render content in terms of slides.\n\n ## Usage\n - `Carousel` is a top-level export from `@telus-uds/components-base` which is used to render a Carousel\n - Immediately within `Carousel`, individual slides are wrapped in `Carousel.Item` for the top-level `Carousel` to know how to identify an individual slide\n - You can use any UDS component or other platform-specific component, (based on the platform you're rendering) to achieve any desired layout\n - By default, Carousel takea all the `width` available to it and the `height` is determined based on the content in the slide with more content\n - You may want to wrap Carousel in other layout components like `Box`, `FlexGrid` etc, to achieve a responsive layout of your need\n\n ## `useCarousel` custom hook\n\n ```jsx\n import { useCarousel } from '@telus-uds/components-base'\n\n const SomeComponentWithinCarouselItem = () => {\n const {\n activeIndex,\n totalItems,\n width,\n goTo\n } = useCarousel()\n return <Text>Hi!</Text>\n }\n ```\n\n You can use `useCarousel` to hook into internal state of the Carousel component like:\n - `activeIndex`: Index of the current slide\n - `totalItems`: Total number of items/slides passed to the Carousel\n - `width`: Width of the individual carousel slide\n - `goTo`: A function to go to a particular slide by passing the index of that slide, e.g: goTo(0) where `0` is the index of the first slide\n\n ## Accessibility\n\n - Top-level `Carousel` and `Carousel.Item` can take all possible React Native's `View` and `a11y` props\n - If your slide contains input elements like buttons, you may want to configure them to be only focusable when `activeIndex` is equal to the current slide index in order to avoid tabbing going between slides\n\n ## Platform considerations\n The component is available on both native platforms and web.\n\n ## Other considerations\n - You may want to use the same kind of layout in all your slides to avoid visual and height differences\n - `previous` and `next` navigation buttons are automatically removed in `sm` and `xs` viewports, as these smaller viewports offers swipe functionality\n\n ## Tokens\n\n You can override the following tokens in exceptional circumstances:\n - `previousIcon` - Icon of the previous button\n - `nextIcon` - Icon of the next button\n - `showPreviousNextNavigation` - If you want to show/hide the previous/next navigation\n - `showPanelNavigation` - If you want to show/hide the panel navigation\n - `spaceBetweenSlideAndPreviousNextNavigation` - Horizontal space between slide and previous/next navigational buttons\n - `spaceBetweenSlideAndPanelNavigation` - Vertical space between slide area and panel navigation area",
|
|
8412
|
+
"props": {
|
|
8413
|
+
"itemLabel": {
|
|
8414
|
+
"defaultValue": {
|
|
8415
|
+
"value": "'item'",
|
|
8416
|
+
"computed": false
|
|
8417
|
+
},
|
|
8418
|
+
"type": {
|
|
8419
|
+
"name": "string"
|
|
8420
|
+
},
|
|
8421
|
+
"required": false,
|
|
8422
|
+
"description": "Lowercase language-appropriate user-facing description of what each Carousel slide represents.\nThis is used when generating item labels. For example, if a carousel contains offers,\npass itemLabel=\"summer offer\" (or copy=\"fr\" and an appropriate French translation) to genereate\naccessible labels such as \"Summer offer 1 of 3\" and \"Show summer offer 2 of 3\"."
|
|
8423
|
+
},
|
|
8424
|
+
"previousNextNavigationPosition": {
|
|
8425
|
+
"defaultValue": {
|
|
8426
|
+
"value": "'inside'",
|
|
8427
|
+
"computed": false
|
|
8428
|
+
},
|
|
8429
|
+
"type": {
|
|
8430
|
+
"name": "enum",
|
|
8431
|
+
"value": [
|
|
8432
|
+
{
|
|
8433
|
+
"value": "'inside'",
|
|
8434
|
+
"computed": false
|
|
8435
|
+
},
|
|
8436
|
+
{
|
|
8437
|
+
"value": "'outside'",
|
|
8438
|
+
"computed": false
|
|
8439
|
+
},
|
|
8440
|
+
{
|
|
8441
|
+
"value": "'edge'",
|
|
8442
|
+
"computed": false
|
|
8443
|
+
}
|
|
8444
|
+
]
|
|
8445
|
+
},
|
|
8446
|
+
"required": false,
|
|
8447
|
+
"description": "`inside` renders the previous and next buttons inside the slide\n`outside` renders the previous and next buttons outside the slide\n`edge` renders the previous and next buttons at the edge of the slide"
|
|
8448
|
+
},
|
|
8449
|
+
"previousNextIconSize": {
|
|
8450
|
+
"defaultValue": {
|
|
8451
|
+
"value": "'default'",
|
|
8452
|
+
"computed": false
|
|
8453
|
+
},
|
|
8454
|
+
"type": {
|
|
8455
|
+
"name": "enum",
|
|
8456
|
+
"value": [
|
|
8457
|
+
{
|
|
8458
|
+
"value": "'default'",
|
|
8459
|
+
"computed": false
|
|
8460
|
+
},
|
|
8461
|
+
{
|
|
8462
|
+
"value": "'small'",
|
|
8463
|
+
"computed": false
|
|
8464
|
+
},
|
|
8465
|
+
{
|
|
8466
|
+
"value": "'large'",
|
|
8467
|
+
"computed": false
|
|
8468
|
+
}
|
|
8469
|
+
]
|
|
8470
|
+
},
|
|
8471
|
+
"required": false,
|
|
8472
|
+
"description": "Defines the size of the `IconButton` which is being used to render next and previous buttons"
|
|
8473
|
+
},
|
|
8474
|
+
"minDistanceToCapture": {
|
|
8475
|
+
"defaultValue": {
|
|
8476
|
+
"value": "5",
|
|
8477
|
+
"computed": false
|
|
8478
|
+
},
|
|
8479
|
+
"type": {
|
|
8480
|
+
"name": "number"
|
|
8481
|
+
},
|
|
8482
|
+
"required": false,
|
|
8483
|
+
"description": "Initiate animation after swipe this distance."
|
|
8484
|
+
},
|
|
8485
|
+
"minDistanceForAction": {
|
|
8486
|
+
"defaultValue": {
|
|
8487
|
+
"value": "0.2",
|
|
8488
|
+
"computed": false
|
|
8489
|
+
},
|
|
8490
|
+
"type": {
|
|
8491
|
+
"name": "number"
|
|
8492
|
+
},
|
|
8493
|
+
"required": false,
|
|
8494
|
+
"description": "Minimal part of slide width must be swiped for changing index.\nOtherwise animation restore current slide. Default value 0.2 means that 20% must be swiped for change index"
|
|
8495
|
+
},
|
|
8496
|
+
"springConfig": {
|
|
8497
|
+
"defaultValue": {
|
|
8498
|
+
"value": "undefined",
|
|
8499
|
+
"computed": true
|
|
8500
|
+
},
|
|
8501
|
+
"type": {
|
|
8502
|
+
"name": "object"
|
|
8503
|
+
},
|
|
8504
|
+
"required": false,
|
|
8505
|
+
"description": "Carousel uses `Animated.spring` to animate slide changes, use this option to pass custom animation configuration"
|
|
8506
|
+
},
|
|
8507
|
+
"tag": {
|
|
8508
|
+
"defaultValue": {
|
|
8509
|
+
"value": "'ul'",
|
|
8510
|
+
"computed": false
|
|
8511
|
+
},
|
|
8512
|
+
"type": {
|
|
8513
|
+
"name": "enum",
|
|
8514
|
+
"value": [
|
|
8515
|
+
{
|
|
8516
|
+
"value": "'h1'",
|
|
8517
|
+
"computed": false
|
|
8518
|
+
},
|
|
8519
|
+
{
|
|
8520
|
+
"value": "'h2'",
|
|
8521
|
+
"computed": false
|
|
8522
|
+
},
|
|
8523
|
+
{
|
|
8524
|
+
"value": "'h3'",
|
|
8525
|
+
"computed": false
|
|
8526
|
+
},
|
|
8527
|
+
{
|
|
8528
|
+
"value": "'h4'",
|
|
8529
|
+
"computed": false
|
|
8530
|
+
},
|
|
8531
|
+
{
|
|
8532
|
+
"value": "'h5'",
|
|
8533
|
+
"computed": false
|
|
8534
|
+
},
|
|
8535
|
+
{
|
|
8536
|
+
"value": "'h6'",
|
|
8537
|
+
"computed": false
|
|
8538
|
+
},
|
|
8539
|
+
{
|
|
8540
|
+
"value": "'article'",
|
|
8541
|
+
"computed": false
|
|
8542
|
+
},
|
|
8543
|
+
{
|
|
8544
|
+
"value": "'aside'",
|
|
8545
|
+
"computed": false
|
|
8546
|
+
},
|
|
8547
|
+
{
|
|
8548
|
+
"value": "'blockquote'",
|
|
8549
|
+
"computed": false
|
|
8550
|
+
},
|
|
8551
|
+
{
|
|
8552
|
+
"value": "'footer'",
|
|
8553
|
+
"computed": false
|
|
8554
|
+
},
|
|
8555
|
+
{
|
|
8556
|
+
"value": "'figure'",
|
|
8557
|
+
"computed": false
|
|
8558
|
+
},
|
|
8559
|
+
{
|
|
8560
|
+
"value": "'form'",
|
|
8561
|
+
"computed": false
|
|
8562
|
+
},
|
|
8563
|
+
{
|
|
8564
|
+
"value": "'header'",
|
|
8565
|
+
"computed": false
|
|
8566
|
+
},
|
|
8567
|
+
{
|
|
8568
|
+
"value": "'ul'",
|
|
8569
|
+
"computed": false
|
|
8570
|
+
},
|
|
8571
|
+
{
|
|
8572
|
+
"value": "'li'",
|
|
8573
|
+
"computed": false
|
|
8574
|
+
},
|
|
8575
|
+
{
|
|
8576
|
+
"value": "'main'",
|
|
8577
|
+
"computed": false
|
|
8578
|
+
},
|
|
8579
|
+
{
|
|
8580
|
+
"value": "'nav'",
|
|
8581
|
+
"computed": false
|
|
8582
|
+
},
|
|
8583
|
+
{
|
|
8584
|
+
"value": "'section'",
|
|
8585
|
+
"computed": false
|
|
8586
|
+
},
|
|
8587
|
+
{
|
|
8588
|
+
"value": "'label'",
|
|
8589
|
+
"computed": false
|
|
8590
|
+
}
|
|
8591
|
+
]
|
|
8592
|
+
},
|
|
8593
|
+
"required": false,
|
|
8594
|
+
"description": "HTML tag to use for the Carousel item's immediate parent. Defaults to `'ul'` so that\nassistive technology tools know to intepret the carousel as a list.\n\nNote that if the immediate Carousel children do not all render as `'li'` elements,\nthis should be changed (e.g. pass tag=\"div\") because only 'li' is a valid child of 'ul'."
|
|
8595
|
+
},
|
|
8596
|
+
"accessibilityRole": {
|
|
8597
|
+
"defaultValue": {
|
|
8598
|
+
"value": "'adjustable'",
|
|
8599
|
+
"computed": false
|
|
8600
|
+
},
|
|
8601
|
+
"type": {
|
|
8602
|
+
"name": "string"
|
|
8603
|
+
},
|
|
8604
|
+
"required": false,
|
|
8605
|
+
"description": "Provide custom accessibilityRole for Carousel container"
|
|
8606
|
+
},
|
|
8607
|
+
"accessibilityLabel": {
|
|
8608
|
+
"defaultValue": {
|
|
8609
|
+
"value": "'carousel'",
|
|
8610
|
+
"computed": false
|
|
8611
|
+
},
|
|
8612
|
+
"type": {
|
|
8613
|
+
"name": "string"
|
|
8614
|
+
},
|
|
8615
|
+
"required": false,
|
|
8616
|
+
"description": "Provide custom accessibilityLabel for Carousel container"
|
|
8617
|
+
},
|
|
8618
|
+
"tokens": {
|
|
8619
|
+
"type": {
|
|
8620
|
+
"name": "custom",
|
|
8621
|
+
"raw": {
|
|
8622
|
+
"nextIcon": "icon",
|
|
8623
|
+
"previousIcon": "icon",
|
|
8624
|
+
"showPreviousNextNavigation": "show",
|
|
8625
|
+
"showPanelNavigation": "show",
|
|
8626
|
+
"spaceBetweenSlideAndPreviousNextNavigation": "size",
|
|
8627
|
+
"spaceBetweenSlideAndPanelNavigation": "size"
|
|
8628
|
+
}
|
|
8629
|
+
},
|
|
8630
|
+
"required": false,
|
|
8631
|
+
"description": ""
|
|
8632
|
+
},
|
|
8633
|
+
"variant": {
|
|
8634
|
+
"type": {
|
|
8635
|
+
"name": "objectOf",
|
|
8636
|
+
"value": {
|
|
8637
|
+
"name": "union",
|
|
8638
|
+
"value": [
|
|
8639
|
+
{
|
|
8640
|
+
"name": "string"
|
|
8641
|
+
},
|
|
8642
|
+
{
|
|
8643
|
+
"name": "number"
|
|
8644
|
+
},
|
|
8645
|
+
{
|
|
8646
|
+
"name": "bool"
|
|
8647
|
+
}
|
|
8648
|
+
]
|
|
8649
|
+
}
|
|
8650
|
+
},
|
|
8651
|
+
"required": false,
|
|
8652
|
+
"description": ""
|
|
8653
|
+
},
|
|
8654
|
+
"children": {
|
|
8655
|
+
"type": {
|
|
8656
|
+
"name": "union",
|
|
8657
|
+
"value": [
|
|
8658
|
+
{
|
|
8659
|
+
"name": "arrayOf",
|
|
8660
|
+
"value": {
|
|
8661
|
+
"name": "node"
|
|
8662
|
+
}
|
|
8663
|
+
},
|
|
8664
|
+
{
|
|
8665
|
+
"name": "node"
|
|
8666
|
+
}
|
|
8667
|
+
]
|
|
8668
|
+
},
|
|
8669
|
+
"required": true,
|
|
8670
|
+
"description": "Slides to render in Carousel. Wrap individual slides in `Carousel.Item`"
|
|
8671
|
+
},
|
|
8672
|
+
"onIndexChanged": {
|
|
8673
|
+
"type": {
|
|
8674
|
+
"name": "func"
|
|
8675
|
+
},
|
|
8676
|
+
"required": false,
|
|
8677
|
+
"description": "Called when active index changed\nThis function is also provided with a parameter indicating changed index (either 1, or -1)\nUse it as follows:\n```js\n const onIndexChangedCallback = React.useCallback((changedIndex) => {\n console.log(changedIndex)\n }, []) // pass local dependencies as per your component\n <Carousel\n onIndexChanged={onIndexChangedCallback}\n >\n <Carousel.Item>First Slide</Carousel.Item>\n </Carousel>\n```\nCaution: Always consider wrapping your callback for `onIndexChanged` in `useCallback` in order to avoid bugs and performance issues"
|
|
8678
|
+
},
|
|
8679
|
+
"onRenderPanelNavigation": {
|
|
8680
|
+
"type": {
|
|
8681
|
+
"name": "func"
|
|
8682
|
+
},
|
|
8683
|
+
"required": false,
|
|
8684
|
+
"description": "Use this to render a custom panel navigation element instead of dots navigation\nThis function is also provided with an object with the following properties\nactiveIndex: index of current slide\ntotalItems: total number of slides\nUse it as follows:\n```js\n <Carousel\n onRenderPanelNavigation={({ totalItems, activeIndex }) => <Text>Showing {activeIndex + 1}</Text>}\n >\n <Carousel.Item>First Slide</Carousel.Item>\n </Carousel>\n```"
|
|
8685
|
+
},
|
|
8686
|
+
"onAnimationStart": {
|
|
8687
|
+
"type": {
|
|
8688
|
+
"name": "func"
|
|
8689
|
+
},
|
|
8690
|
+
"required": false,
|
|
8691
|
+
"description": "When slide animation start\nThis function is also provided with a parameter indicating the current slide index before animation starts\nUse it as follows:\n```js\n const onAnimationStartCallback = React.useCallback((currentIndex) => {\n console.log(currentIndex)\n }, []) // pass local dependencies as per your component\n <Carousel\n onAnimationStart={onAnimationStartCallback}\n >\n <Carousel.Item>First Slide</Carousel.Item>\n </Carousel>\n```\nCaution: Always consider wrapping your callback for `onAnimationStart` in `useCallback` in order to avoid bugs and performance issues"
|
|
8692
|
+
},
|
|
8693
|
+
"onAnimationEnd": {
|
|
8694
|
+
"type": {
|
|
8695
|
+
"name": "func"
|
|
8696
|
+
},
|
|
8697
|
+
"required": false,
|
|
8698
|
+
"description": "When slide animation end with parameter of current index (after animation ends)\nThis function is also provided with a parameter indicating the updated slide index after animation ends\nUse it as follows:\n```js\n const onAnimationEndCallback = React.useCallback((changedIndex) => {\n console.log(changedIndex)\n }, []) // pass local dependencies as per your component\n <Carousel\n onAnimationEnd={onAnimationEndCallback}\n >\n <Carousel.Item>First Slide</Carousel.Item>\n </Carousel>\n```\nCaution: Always consider wrapping your callback for `onAnimationEnd` in `useCallback` in order to avoid bugs and performance issues"
|
|
8699
|
+
},
|
|
8700
|
+
"panelNavigationTextDictionary": {
|
|
8701
|
+
"type": {
|
|
8702
|
+
"name": "shape",
|
|
8703
|
+
"value": {
|
|
8704
|
+
"en": {
|
|
8705
|
+
"name": "shape",
|
|
8706
|
+
"value": {
|
|
8707
|
+
"stepTrackerLabel": {
|
|
8708
|
+
"name": "string",
|
|
8709
|
+
"required": true
|
|
8710
|
+
}
|
|
8711
|
+
},
|
|
8712
|
+
"required": false
|
|
8713
|
+
},
|
|
8714
|
+
"fr": {
|
|
8715
|
+
"name": "shape",
|
|
8716
|
+
"value": {
|
|
8717
|
+
"stepTrackerLabel": {
|
|
8718
|
+
"name": "string",
|
|
8719
|
+
"required": true
|
|
8720
|
+
}
|
|
8721
|
+
},
|
|
8722
|
+
"required": false
|
|
8723
|
+
}
|
|
8724
|
+
}
|
|
8725
|
+
},
|
|
8726
|
+
"required": false,
|
|
8727
|
+
"description": "Use this to override the default text for panel navigation"
|
|
8728
|
+
}
|
|
8729
|
+
},
|
|
8730
|
+
"attributes": {
|
|
8731
|
+
"acceptsRNA11yProps": false
|
|
8732
|
+
}
|
|
8733
|
+
},
|
|
8734
|
+
"Item": {
|
|
8735
|
+
"docs": {
|
|
8736
|
+
"description": "`Carousel.Item` is used to wrap the content of an individual slide and is suppsoed to be the\nonly top-level component passed to the `Carousel`",
|
|
8737
|
+
"props": {
|
|
8738
|
+
"tag": {
|
|
8739
|
+
"defaultValue": {
|
|
8740
|
+
"value": "'li'",
|
|
8741
|
+
"computed": false
|
|
8742
|
+
},
|
|
8743
|
+
"type": {
|
|
8744
|
+
"name": "enum",
|
|
8745
|
+
"value": [
|
|
8746
|
+
{
|
|
8747
|
+
"value": "'h1'",
|
|
8748
|
+
"computed": false
|
|
8749
|
+
},
|
|
8750
|
+
{
|
|
8751
|
+
"value": "'h2'",
|
|
8752
|
+
"computed": false
|
|
8753
|
+
},
|
|
8754
|
+
{
|
|
8755
|
+
"value": "'h3'",
|
|
8756
|
+
"computed": false
|
|
8757
|
+
},
|
|
8758
|
+
{
|
|
8759
|
+
"value": "'h4'",
|
|
8760
|
+
"computed": false
|
|
8761
|
+
},
|
|
8762
|
+
{
|
|
8763
|
+
"value": "'h5'",
|
|
8764
|
+
"computed": false
|
|
8765
|
+
},
|
|
8766
|
+
{
|
|
8767
|
+
"value": "'h6'",
|
|
8768
|
+
"computed": false
|
|
8769
|
+
},
|
|
8770
|
+
{
|
|
8771
|
+
"value": "'article'",
|
|
8772
|
+
"computed": false
|
|
8773
|
+
},
|
|
8774
|
+
{
|
|
8775
|
+
"value": "'aside'",
|
|
8776
|
+
"computed": false
|
|
8777
|
+
},
|
|
8778
|
+
{
|
|
8779
|
+
"value": "'blockquote'",
|
|
8780
|
+
"computed": false
|
|
8781
|
+
},
|
|
8782
|
+
{
|
|
8783
|
+
"value": "'footer'",
|
|
8784
|
+
"computed": false
|
|
8785
|
+
},
|
|
8786
|
+
{
|
|
8787
|
+
"value": "'figure'",
|
|
8788
|
+
"computed": false
|
|
8789
|
+
},
|
|
8790
|
+
{
|
|
8791
|
+
"value": "'form'",
|
|
8792
|
+
"computed": false
|
|
8793
|
+
},
|
|
8794
|
+
{
|
|
8795
|
+
"value": "'header'",
|
|
8796
|
+
"computed": false
|
|
8797
|
+
},
|
|
8798
|
+
{
|
|
8799
|
+
"value": "'ul'",
|
|
8800
|
+
"computed": false
|
|
8801
|
+
},
|
|
8802
|
+
{
|
|
8803
|
+
"value": "'li'",
|
|
8804
|
+
"computed": false
|
|
8805
|
+
},
|
|
8806
|
+
{
|
|
8807
|
+
"value": "'main'",
|
|
8808
|
+
"computed": false
|
|
8809
|
+
},
|
|
8810
|
+
{
|
|
8811
|
+
"value": "'nav'",
|
|
8812
|
+
"computed": false
|
|
8813
|
+
},
|
|
8814
|
+
{
|
|
8815
|
+
"value": "'section'",
|
|
8816
|
+
"computed": false
|
|
8817
|
+
},
|
|
8818
|
+
{
|
|
8819
|
+
"value": "'label'",
|
|
8820
|
+
"computed": false
|
|
8821
|
+
}
|
|
8822
|
+
]
|
|
8823
|
+
},
|
|
8824
|
+
"required": false,
|
|
8825
|
+
"description": "Sets the HTML tag of the outer container. By default `'li'` so that assistive technology sees\nthe Carousel as a list of items.\n\nCarousel's innermost container defaults to `'ul'` which can be overridden. If the tag of either\n`Carousel` or `Carousel.Item` is overriden, the other should be too, to avoid producing invalid HTML."
|
|
8826
|
+
},
|
|
8827
|
+
"elementIndex": {
|
|
8828
|
+
"type": {
|
|
8829
|
+
"name": "number"
|
|
8830
|
+
},
|
|
8831
|
+
"required": false,
|
|
8832
|
+
"description": "Index of the current slide\nDon't pass this prop when using `Carousel.Item` as it is already being passed by `Carousel` top-level component"
|
|
8833
|
+
},
|
|
8834
|
+
"accessibilityLabelledBy": {
|
|
8835
|
+
"type": {
|
|
8836
|
+
"name": "string"
|
|
8837
|
+
},
|
|
8838
|
+
"required": false,
|
|
8839
|
+
"description": "Provide custom accessibilityLabelledBy for Carousel slide"
|
|
8840
|
+
},
|
|
8841
|
+
"children": {
|
|
8842
|
+
"type": {
|
|
8843
|
+
"name": "union",
|
|
8844
|
+
"value": [
|
|
8845
|
+
{
|
|
8846
|
+
"name": "arrayOf",
|
|
8847
|
+
"value": {
|
|
8848
|
+
"name": "node"
|
|
8849
|
+
}
|
|
8850
|
+
},
|
|
8851
|
+
{
|
|
8852
|
+
"name": "node"
|
|
8853
|
+
}
|
|
8854
|
+
]
|
|
8855
|
+
},
|
|
8856
|
+
"required": true,
|
|
8857
|
+
"description": "Content of the slide"
|
|
8858
|
+
}
|
|
8859
|
+
},
|
|
8860
|
+
"attributes": {
|
|
8861
|
+
"acceptsRNA11yProps": false
|
|
8862
|
+
}
|
|
8863
|
+
}
|
|
8864
|
+
}
|
|
8865
|
+
},
|
|
8866
|
+
"CarouselProvider": {
|
|
8867
|
+
"docs": {
|
|
8868
|
+
"description": "",
|
|
8869
|
+
"props": {
|
|
8870
|
+
"children": {
|
|
8871
|
+
"type": {
|
|
8872
|
+
"name": "arrayOf",
|
|
8873
|
+
"value": {
|
|
8874
|
+
"name": "element"
|
|
8875
|
+
}
|
|
8876
|
+
},
|
|
8877
|
+
"required": true,
|
|
8878
|
+
"description": ""
|
|
8879
|
+
},
|
|
8880
|
+
"activeIndex": {
|
|
8881
|
+
"type": {
|
|
8882
|
+
"name": "number"
|
|
8883
|
+
},
|
|
8884
|
+
"required": true,
|
|
8885
|
+
"description": ""
|
|
8886
|
+
},
|
|
8887
|
+
"totalItems": {
|
|
8888
|
+
"type": {
|
|
8889
|
+
"name": "number"
|
|
8890
|
+
},
|
|
8891
|
+
"required": true,
|
|
8892
|
+
"description": ""
|
|
8893
|
+
},
|
|
8894
|
+
"width": {
|
|
8895
|
+
"type": {
|
|
8896
|
+
"name": "number"
|
|
8897
|
+
},
|
|
8898
|
+
"required": true,
|
|
8899
|
+
"description": ""
|
|
8900
|
+
},
|
|
8901
|
+
"goTo": {
|
|
8902
|
+
"type": {
|
|
8903
|
+
"name": "func"
|
|
8904
|
+
},
|
|
8905
|
+
"required": true,
|
|
8906
|
+
"description": ""
|
|
8907
|
+
}
|
|
8908
|
+
},
|
|
8909
|
+
"attributes": {
|
|
8910
|
+
"acceptsRNA11yProps": false
|
|
8911
|
+
}
|
|
8912
|
+
}
|
|
8913
|
+
},
|
|
8275
8914
|
"CheckboxGroup": {
|
|
8276
8915
|
"docs": {
|
|
8277
8916
|
"description": "A group of Checkboxs that behave as a fieldset. Use when users select any number of choices from options.\n\n## Component API\n\nUse the `items` prop to pass an array of objects describing each Checkbox in the group:\n\n - `label`: main text passed to CheckboxGroup's `label` prop\n - `id`: identifier used to store which CheckboxGroup is selected (uses `label` if undefinded)\n - `onChange`: optional function called on selection, in addition to updating the group's selection state\n\n### Controlled version\n\nIf the selection state is controlled from outside, it needs to receive `checkedId` and `onChange` props.\n\n### Uncontrolled version\n\nIf the CheckboxGroup manages its own state, you can use `initialCheckedId` prop to provide the initial value.\nWhenever the radio card gets toggled, it calls the `onChange` callback with the new value (string).\n\n### Use in forms\n\nFor web forms, the `name` prop may be used to define the name of the group's `fieldset` and input elements.\n\n### Validation\n\nValidation state may be set by passing 'error' or 'success' to the `validation` prop.\n\n## A11y guidelines\n\nCheckboxGroup accepts all the common accessibility props, and controls the accessibility state\nof children like Checkbox and Feedback based on current state.\n\n@example\n```jsx\n<CheckboxGroup\n initialCheckedId=\"check1\"\n items={[\n { label: 'Checkbox 1', id: 'check1' },\n { label: 'Checkbox 2', id: 'check2' },\n { label: 'Checkbox 3', id: 'check3' }\n ]}\n legend=\"Checkboxes\"\n hint=\"Choose from these options\"\n/>\n```",
|