@telus-uds/components-base 1.8.4 → 1.10.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/component-docs.json +344 -0
  3. package/lib/Card/Card.js +9 -4
  4. package/lib/Carousel/Carousel.js +619 -0
  5. package/lib/Carousel/CarouselContext.js +59 -0
  6. package/lib/Carousel/CarouselItem/CarouselItem.js +77 -0
  7. package/lib/Carousel/CarouselItem/index.js +13 -0
  8. package/lib/Carousel/index.js +32 -0
  9. package/lib/Checkbox/Checkbox.js +4 -2
  10. package/lib/ExpandCollapse/Panel.js +10 -1
  11. package/lib/Link/InlinePressable.js +5 -1
  12. package/lib/Link/LinkBase.js +5 -2
  13. package/lib/StepTracker/StepTracker.js +5 -2
  14. package/lib/TextInput/TextInput.js +0 -11
  15. package/lib/TextInput/TextInputBase.js +9 -0
  16. package/lib/TextInput/propTypes.js +3 -8
  17. package/lib/index.js +14 -0
  18. package/lib/utils/props/textInputProps.js +8 -1
  19. package/lib-module/Card/Card.js +5 -4
  20. package/lib-module/Carousel/Carousel.js +570 -0
  21. package/lib-module/Carousel/CarouselContext.js +43 -0
  22. package/lib-module/Carousel/CarouselItem/CarouselItem.js +60 -0
  23. package/lib-module/Carousel/CarouselItem/index.js +2 -0
  24. package/lib-module/Carousel/index.js +2 -0
  25. package/lib-module/Checkbox/Checkbox.js +4 -2
  26. package/lib-module/ExpandCollapse/Panel.js +9 -1
  27. package/lib-module/Link/InlinePressable.js +5 -1
  28. package/lib-module/Link/LinkBase.js +5 -2
  29. package/lib-module/StepTracker/StepTracker.js +5 -2
  30. package/lib-module/TextInput/TextInput.js +0 -8
  31. package/lib-module/TextInput/TextInputBase.js +10 -1
  32. package/lib-module/TextInput/propTypes.js +4 -8
  33. package/lib-module/index.js +1 -0
  34. package/lib-module/utils/props/textInputProps.js +8 -1
  35. package/package.json +3 -3
  36. package/src/Card/Card.jsx +6 -4
  37. package/src/Carousel/Carousel.jsx +586 -0
  38. package/src/Carousel/CarouselContext.jsx +30 -0
  39. package/src/Carousel/CarouselItem/CarouselItem.jsx +48 -0
  40. package/src/Carousel/CarouselItem/index.js +3 -0
  41. package/src/Carousel/index.js +2 -0
  42. package/src/Checkbox/Checkbox.jsx +3 -1
  43. package/src/ExpandCollapse/Panel.jsx +8 -1
  44. package/src/Link/InlinePressable.jsx +5 -2
  45. package/src/Link/LinkBase.jsx +4 -1
  46. package/src/StepTracker/StepTracker.jsx +12 -5
  47. package/src/TextInput/TextInput.jsx +1 -8
  48. package/src/TextInput/TextInputBase.jsx +11 -1
  49. package/src/TextInput/propTypes.js +3 -7
  50. package/src/index.js +1 -0
  51. package/src/utils/props/textInputProps.js +7 -1
package/CHANGELOG.md CHANGED
@@ -1,12 +1,48 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Wed, 22 Jun 2022 15:03:03 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 20 Jul 2022 23:56:08 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.10.0
8
+
9
+ Wed, 20 Jul 2022 23:56:08 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Add Carousel component 🎉 (shahzaibkhalidmalik@outlook.com)
14
+ - Bump @telus-uds/system-theme-tokens to v2.1.0
15
+
16
+ ### Patches
17
+
18
+ - Fix an issue where StepTracker might break where `stepLabel` and/or `stepTrackerLabel` are not read before reading their `dictionary` values (shahzaibkhalidmalik@outlook.com)
19
+
20
+ ## 1.9.0
21
+
22
+ Fri, 08 Jul 2022 22:41:55 GMT
23
+
24
+ ### Minor changes
25
+
26
+ - feat: add a controlRef prop to ExpandCollapse.Panel (ruslan.bredikhin@nearform.com)
27
+
28
+ ### Patches
29
+
30
+ - don't throw if pattern used without ref (alan.slater@nearform.com)
31
+ - Add forwardRef to Card (alan.slater@nearform.com)
32
+ - Support pattern in all text input components (alan.slater@nearform.com)
33
+
34
+ ## 1.8.5
35
+
36
+ Tue, 28 Jun 2022 21:36:14 GMT
37
+
38
+ ### Patches
39
+
40
+ - fix: add forcing inline display on links without icons (ruslan.bredikhin@nearform.com)
41
+ - fix: move testID to the icon container (ruslan.bredikhin@nearform.com)
42
+
7
43
  ## 1.8.4
8
44
 
9
- Wed, 22 Jun 2022 15:03:03 GMT
45
+ Wed, 22 Jun 2022 15:03:54 GMT
10
46
 
11
47
  ### Patches
12
48
 
@@ -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": {
@@ -8272,6 +8296,326 @@
8272
8296
  }
8273
8297
  }
8274
8298
  },
8299
+ "Carousel": {
8300
+ "docs": {
8301
+ "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",
8302
+ "props": {
8303
+ "previousNextNavigationPosition": {
8304
+ "defaultValue": {
8305
+ "value": "'inside'",
8306
+ "computed": false
8307
+ },
8308
+ "type": {
8309
+ "name": "enum",
8310
+ "value": [
8311
+ {
8312
+ "value": "'inside'",
8313
+ "computed": false
8314
+ },
8315
+ {
8316
+ "value": "'outside'",
8317
+ "computed": false
8318
+ },
8319
+ {
8320
+ "value": "'edge'",
8321
+ "computed": false
8322
+ }
8323
+ ]
8324
+ },
8325
+ "required": false,
8326
+ "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"
8327
+ },
8328
+ "previousNextIconSize": {
8329
+ "defaultValue": {
8330
+ "value": "'default'",
8331
+ "computed": false
8332
+ },
8333
+ "type": {
8334
+ "name": "enum",
8335
+ "value": [
8336
+ {
8337
+ "value": "'default'",
8338
+ "computed": false
8339
+ },
8340
+ {
8341
+ "value": "'small'",
8342
+ "computed": false
8343
+ },
8344
+ {
8345
+ "value": "'large'",
8346
+ "computed": false
8347
+ }
8348
+ ]
8349
+ },
8350
+ "required": false,
8351
+ "description": "Defines the size of the `IconButton` which is being used to render next and previous buttons"
8352
+ },
8353
+ "minDistanceToCapture": {
8354
+ "defaultValue": {
8355
+ "value": "5",
8356
+ "computed": false
8357
+ },
8358
+ "type": {
8359
+ "name": "number"
8360
+ },
8361
+ "required": false,
8362
+ "description": "Initiate animation after swipe this distance."
8363
+ },
8364
+ "minDistanceForAction": {
8365
+ "defaultValue": {
8366
+ "value": "0.2",
8367
+ "computed": false
8368
+ },
8369
+ "type": {
8370
+ "name": "number"
8371
+ },
8372
+ "required": false,
8373
+ "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"
8374
+ },
8375
+ "springConfig": {
8376
+ "defaultValue": {
8377
+ "value": "undefined",
8378
+ "computed": true
8379
+ },
8380
+ "type": {
8381
+ "name": "object"
8382
+ },
8383
+ "required": false,
8384
+ "description": "Carousel uses `Animated.spring` to animate slide changes, use this option to pass custom animation configuration"
8385
+ },
8386
+ "panelNavigationTextDictionary": {
8387
+ "defaultValue": {
8388
+ "value": "{\n en: {\n stepTrackerLabel: 'Showing %{stepNumber} of %{stepCount}'\n },\n fr: {\n stepTrackerLabel: 'Étape %{stepNumber} sur %{stepCount}: %{stepLabel}'\n }\n}",
8389
+ "computed": false
8390
+ },
8391
+ "type": {
8392
+ "name": "shape",
8393
+ "value": {
8394
+ "en": {
8395
+ "name": "shape",
8396
+ "value": {
8397
+ "stepTrackerLabel": {
8398
+ "name": "string",
8399
+ "required": true
8400
+ }
8401
+ },
8402
+ "required": false
8403
+ },
8404
+ "fr": {
8405
+ "name": "shape",
8406
+ "value": {
8407
+ "stepTrackerLabel": {
8408
+ "name": "string",
8409
+ "required": true
8410
+ }
8411
+ },
8412
+ "required": false
8413
+ }
8414
+ }
8415
+ },
8416
+ "required": false,
8417
+ "description": "Use this to override the default text for panel navigation"
8418
+ },
8419
+ "accessibilityRole": {
8420
+ "defaultValue": {
8421
+ "value": "'adjustable'",
8422
+ "computed": false
8423
+ },
8424
+ "type": {
8425
+ "name": "string"
8426
+ },
8427
+ "required": false,
8428
+ "description": "Provide custom accessibilityRole for Carousel container"
8429
+ },
8430
+ "accessibilityLabel": {
8431
+ "defaultValue": {
8432
+ "value": "'carousel'",
8433
+ "computed": false
8434
+ },
8435
+ "type": {
8436
+ "name": "string"
8437
+ },
8438
+ "required": false,
8439
+ "description": "Provide custom accessibilityLabel for Carousel container"
8440
+ },
8441
+ "tokens": {
8442
+ "type": {
8443
+ "name": "custom",
8444
+ "raw": {
8445
+ "nextIcon": "icon",
8446
+ "previousIcon": "icon",
8447
+ "showPreviousNextNavigation": "show",
8448
+ "showPanelNavigation": "show",
8449
+ "spaceBetweenSlideAndPreviousNextNavigation": "size",
8450
+ "spaceBetweenSlideAndPanelNavigation": "size"
8451
+ }
8452
+ },
8453
+ "required": false,
8454
+ "description": ""
8455
+ },
8456
+ "variant": {
8457
+ "type": {
8458
+ "name": "objectOf",
8459
+ "value": {
8460
+ "name": "union",
8461
+ "value": [
8462
+ {
8463
+ "name": "string"
8464
+ },
8465
+ {
8466
+ "name": "number"
8467
+ },
8468
+ {
8469
+ "name": "bool"
8470
+ }
8471
+ ]
8472
+ }
8473
+ },
8474
+ "required": false,
8475
+ "description": ""
8476
+ },
8477
+ "children": {
8478
+ "type": {
8479
+ "name": "union",
8480
+ "value": [
8481
+ {
8482
+ "name": "arrayOf",
8483
+ "value": {
8484
+ "name": "node"
8485
+ }
8486
+ },
8487
+ {
8488
+ "name": "node"
8489
+ }
8490
+ ]
8491
+ },
8492
+ "required": true,
8493
+ "description": "Slides to render in Carousel. Wrap individual slides in `Carousel.Item`"
8494
+ },
8495
+ "onIndexChanged": {
8496
+ "type": {
8497
+ "name": "func"
8498
+ },
8499
+ "required": false,
8500
+ "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"
8501
+ },
8502
+ "onRenderPanelNavigation": {
8503
+ "type": {
8504
+ "name": "func"
8505
+ },
8506
+ "required": false,
8507
+ "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```"
8508
+ },
8509
+ "onAnimationStart": {
8510
+ "type": {
8511
+ "name": "func"
8512
+ },
8513
+ "required": false,
8514
+ "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"
8515
+ },
8516
+ "onAnimationEnd": {
8517
+ "type": {
8518
+ "name": "func"
8519
+ },
8520
+ "required": false,
8521
+ "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"
8522
+ }
8523
+ },
8524
+ "attributes": {
8525
+ "acceptsRNA11yProps": false
8526
+ }
8527
+ },
8528
+ "Item": {
8529
+ "docs": {
8530
+ "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`",
8531
+ "props": {
8532
+ "elementIndex": {
8533
+ "type": {
8534
+ "name": "number"
8535
+ },
8536
+ "required": false,
8537
+ "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"
8538
+ },
8539
+ "accessibilityLabelledBy": {
8540
+ "type": {
8541
+ "name": "string"
8542
+ },
8543
+ "required": false,
8544
+ "description": "Provide custom accessibilityLabelledBy for Carousel slide"
8545
+ },
8546
+ "children": {
8547
+ "type": {
8548
+ "name": "union",
8549
+ "value": [
8550
+ {
8551
+ "name": "arrayOf",
8552
+ "value": {
8553
+ "name": "node"
8554
+ }
8555
+ },
8556
+ {
8557
+ "name": "node"
8558
+ }
8559
+ ]
8560
+ },
8561
+ "required": true,
8562
+ "description": "Content of the slide"
8563
+ }
8564
+ },
8565
+ "attributes": {
8566
+ "acceptsRNA11yProps": false
8567
+ }
8568
+ }
8569
+ }
8570
+ },
8571
+ "CarouselProvider": {
8572
+ "docs": {
8573
+ "description": "",
8574
+ "props": {
8575
+ "children": {
8576
+ "type": {
8577
+ "name": "arrayOf",
8578
+ "value": {
8579
+ "name": "element"
8580
+ }
8581
+ },
8582
+ "required": true,
8583
+ "description": ""
8584
+ },
8585
+ "activeIndex": {
8586
+ "type": {
8587
+ "name": "number"
8588
+ },
8589
+ "required": true,
8590
+ "description": ""
8591
+ },
8592
+ "totalItems": {
8593
+ "type": {
8594
+ "name": "number"
8595
+ },
8596
+ "required": true,
8597
+ "description": ""
8598
+ },
8599
+ "width": {
8600
+ "type": {
8601
+ "name": "number"
8602
+ },
8603
+ "required": true,
8604
+ "description": ""
8605
+ },
8606
+ "goTo": {
8607
+ "type": {
8608
+ "name": "func"
8609
+ },
8610
+ "required": true,
8611
+ "description": ""
8612
+ }
8613
+ },
8614
+ "attributes": {
8615
+ "acceptsRNA11yProps": false
8616
+ }
8617
+ }
8618
+ },
8275
8619
  "CheckboxGroup": {
8276
8620
  "docs": {
8277
8621
  "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```",
package/lib/Card/Card.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -23,6 +23,10 @@ var _jsxRuntime = require("react/jsx-runtime");
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
+
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+
26
30
  const [selectProps, selectedSystemPropTypes] = (0, _props.selectSystemProps)([_props.a11yProps, _props.viewProps]);
27
31
  /**
28
32
  * A basic card component, unstyled by default.
@@ -73,7 +77,7 @@ const [selectProps, selectedSystemPropTypes] = (0, _props.selectSystemProps)([_p
73
77
  * depending on what you are trying to achieve.
74
78
  */
75
79
 
76
- const Card = _ref => {
80
+ const Card = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
77
81
  let {
78
82
  children,
79
83
  tokens,
@@ -86,13 +90,14 @@ const Card = _ref => {
86
90
  viewport
87
91
  });
88
92
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardBase.default, {
93
+ ref: ref,
89
94
  tokens: themeTokens,
90
95
  dataSet: dataSet,
91
96
  ...selectProps(rest),
92
97
  children: children
93
98
  });
94
- };
95
-
99
+ });
100
+ Card.displayName = 'Card';
96
101
  Card.propTypes = { ...selectedSystemPropTypes,
97
102
  children: _propTypes.default.node,
98
103
  tokens: (0, _utils.getTokensPropType)('Card'),