@momentum-design/components 0.129.18 → 0.129.19

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.
@@ -16,10 +16,10 @@ declare const VirtualizedList_base: import("../../utils/mixins/index.types").Con
16
16
  *
17
17
  * ## Setup
18
18
  *
19
- * `virtualizerProps` is a required prop that requires at least two properties to be set: `count` and `estimateSize`.
20
- * `count` is the total number of items in the list, and `estimateSize` is a function that returns the estimated
21
- * size (in pixels) of each item in the list. `getItemKey` is also strongly recommended to be set to provide unique
22
- * keys for each item in the list.
19
+ * `virtualizerProps` is a required prop that requires at least three properties to be set:
20
+ * - `count` is the total number of items in the list
21
+ * - `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list
22
+ * - `getItemKey` is a function that returns a unique key for each item in the list.
23
23
  *
24
24
  * ### Render list items
25
25
  *
@@ -48,6 +48,19 @@ declare const VirtualizedList_base: import("../../utils/mixins/index.types").Con
48
48
  * Unique keys for the list items are critical for dynamically changing list items or item's content.
49
49
  * If the key change with the content it will cause scrollbar and content shuttering.
50
50
  *
51
+ * ### Top/Bottom Padding
52
+ *
53
+ * If padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this
54
+ * will break the virtualization calculations and can cause scrollbars when they are not necessary.
55
+ * Instead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.
56
+ *
57
+ * ### Gaps between items
58
+ *
59
+ * If you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels
60
+ * to the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.
61
+ * If you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.
62
+ * If you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.
63
+ *
51
64
  * @tagname mdc-virtualizedlist
52
65
  *
53
66
  * @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.
@@ -30,10 +30,10 @@ import { DEFAULTS } from './virtualizedlist.constants';
30
30
  *
31
31
  * ## Setup
32
32
  *
33
- * `virtualizerProps` is a required prop that requires at least two properties to be set: `count` and `estimateSize`.
34
- * `count` is the total number of items in the list, and `estimateSize` is a function that returns the estimated
35
- * size (in pixels) of each item in the list. `getItemKey` is also strongly recommended to be set to provide unique
36
- * keys for each item in the list.
33
+ * `virtualizerProps` is a required prop that requires at least three properties to be set:
34
+ * - `count` is the total number of items in the list
35
+ * - `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list
36
+ * - `getItemKey` is a function that returns a unique key for each item in the list.
37
37
  *
38
38
  * ### Render list items
39
39
  *
@@ -62,6 +62,19 @@ import { DEFAULTS } from './virtualizedlist.constants';
62
62
  * Unique keys for the list items are critical for dynamically changing list items or item's content.
63
63
  * If the key change with the content it will cause scrollbar and content shuttering.
64
64
  *
65
+ * ### Top/Bottom Padding
66
+ *
67
+ * If padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this
68
+ * will break the virtualization calculations and can cause scrollbars when they are not necessary.
69
+ * Instead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.
70
+ *
71
+ * ### Gaps between items
72
+ *
73
+ * If you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels
74
+ * to the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.
75
+ * If you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.
76
+ * If you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.
77
+ *
65
78
  * @tagname mdc-virtualizedlist
66
79
  *
67
80
  * @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.
@@ -53850,7 +53850,7 @@
53850
53850
  "declarations": [
53851
53851
  {
53852
53852
  "kind": "class",
53853
- "description": "`mdc-virtualizedlist` is an extension of the `mdc-list` component that adds virtualization capabilities using\nthe Tanstack Virtual library.\n\nThis component is thin wrapper around the Tanstack libray to provide additional funtionalities such as\nkeyboard navigation, focus management, scroll anchoring and accessibility features.\n\nPlease refer to [Tanstack Virtual Docs](https://tanstack.com/virtual/latest) for more in depth documentation.\n\n## Setup\n\n`virtualizerProps` is a required prop that requires at least two properties to be set: `count` and `estimateSize`.\n`count` is the total number of items in the list, and `estimateSize` is a function that returns the estimated\nsize (in pixels) of each item in the list. `getItemKey` is also strongly recommended to be set to provide unique\nkeys for each item in the list.\n\n### Render list items\n\nTo keep the component framework-agnostic, the rendering of the list items is left to the consumer.\n\nWe need to render only the visible items. The list of visible items are provided by the `virtualitemschange` event.\nThe event detail contains the `virtualItems` array, which contains the information for the rendering.\nList items must have an `data-index` attribute, the indexes are in the `virtualItems` list.\n\n## Best practices\n\n### List updates\n\nTanstack needs only the count of the items in the list and the size of each item to perform virtualization.\nList updates happens when\n- when `virtualizerProps` property of the component instance changes\n- when `observe-size-changes` is set and the item's size changes (it uses ResizeObserver internally)\n- when `component.visualiser.measure` called manually.\n\n### Header\n\nTo add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n\n### Lists with dynamic content\n\nUnique keys for the list items are critical for dynamically changing list items or item's content.\nIf the key change with the content it will cause scrollbar and content shuttering.",
53853
+ "description": "`mdc-virtualizedlist` is an extension of the `mdc-list` component that adds virtualization capabilities using\nthe Tanstack Virtual library.\n\nThis component is thin wrapper around the Tanstack libray to provide additional funtionalities such as\nkeyboard navigation, focus management, scroll anchoring and accessibility features.\n\nPlease refer to [Tanstack Virtual Docs](https://tanstack.com/virtual/latest) for more in depth documentation.\n\n## Setup\n\n`virtualizerProps` is a required prop that requires at least three properties to be set:\n- `count` is the total number of items in the list\n- `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list\n- `getItemKey` is a function that returns a unique key for each item in the list.\n\n### Render list items\n\nTo keep the component framework-agnostic, the rendering of the list items is left to the consumer.\n\nWe need to render only the visible items. The list of visible items are provided by the `virtualitemschange` event.\nThe event detail contains the `virtualItems` array, which contains the information for the rendering.\nList items must have an `data-index` attribute, the indexes are in the `virtualItems` list.\n\n## Best practices\n\n### List updates\n\nTanstack needs only the count of the items in the list and the size of each item to perform virtualization.\nList updates happens when\n- when `virtualizerProps` property of the component instance changes\n- when `observe-size-changes` is set and the item's size changes (it uses ResizeObserver internally)\n- when `component.visualiser.measure` called manually.\n\n### Header\n\nTo add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n\n### Lists with dynamic content\n\nUnique keys for the list items are critical for dynamically changing list items or item's content.\nIf the key change with the content it will cause scrollbar and content shuttering.\n\n### Top/Bottom Padding\n\nIf padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this\nwill break the virtualization calculations and can cause scrollbars when they are not necessary.\nInstead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.\n\n### Gaps between items\n\nIf you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels\nto the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.\nIf you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.\nIf you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.",
53854
53854
  "name": "VirtualizedList",
53855
53855
  "cssParts": [
53856
53856
  {
@@ -54391,7 +54391,7 @@
54391
54391
  "module": "/src/components/list/list.component"
54392
54392
  },
54393
54393
  "tagName": "mdc-virtualizedlist",
54394
- "jsDoc": "/**\n * `mdc-virtualizedlist` is an extension of the `mdc-list` component that adds virtualization capabilities using\n * the Tanstack Virtual library.\n *\n * This component is thin wrapper around the Tanstack libray to provide additional funtionalities such as\n * keyboard navigation, focus management, scroll anchoring and accessibility features.\n *\n * Please refer to [Tanstack Virtual Docs](https://tanstack.com/virtual/latest) for more in depth documentation.\n *\n * ## Setup\n *\n * `virtualizerProps` is a required prop that requires at least two properties to be set: `count` and `estimateSize`.\n * `count` is the total number of items in the list, and `estimateSize` is a function that returns the estimated\n * size (in pixels) of each item in the list. `getItemKey` is also strongly recommended to be set to provide unique\n * keys for each item in the list.\n *\n * ### Render list items\n *\n * To keep the component framework-agnostic, the rendering of the list items is left to the consumer.\n *\n * We need to render only the visible items. The list of visible items are provided by the `virtualitemschange` event.\n * The event detail contains the `virtualItems` array, which contains the information for the rendering.\n * List items must have an `data-index` attribute, the indexes are in the `virtualItems` list.\n *\n * ## Best practices\n *\n * ### List updates\n *\n * Tanstack needs only the count of the items in the list and the size of each item to perform virtualization.\n * List updates happens when\n * - when `virtualizerProps` property of the component instance changes\n * - when `observe-size-changes` is set and the item's size changes (it uses ResizeObserver internally)\n * - when `component.visualiser.measure` called manually.\n *\n * ### Header\n *\n * To add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n *\n * ### Lists with dynamic content\n *\n * Unique keys for the list items are critical for dynamically changing list items or item's content.\n * If the key change with the content it will cause scrollbar and content shuttering.\n *\n * @tagname mdc-virtualizedlist\n *\n * @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.\n * @event virtualitemschange - (React: onVirtualItemsChange) Event that gets called when the virtual items change.\n *\n * @slot default - This is a default/unnamed slot, where listitems can be placed.\n * @slot list-header - This slot is used to pass a header for the list, which can be a `mdc-listheader` component.\n *\n * @csspart container - The container of the virtualized list.\n * @csspart scroll - The scrollable area of the virtualized list.\n */",
54394
+ "jsDoc": "/**\n * `mdc-virtualizedlist` is an extension of the `mdc-list` component that adds virtualization capabilities using\n * the Tanstack Virtual library.\n *\n * This component is thin wrapper around the Tanstack libray to provide additional funtionalities such as\n * keyboard navigation, focus management, scroll anchoring and accessibility features.\n *\n * Please refer to [Tanstack Virtual Docs](https://tanstack.com/virtual/latest) for more in depth documentation.\n *\n * ## Setup\n *\n * `virtualizerProps` is a required prop that requires at least three properties to be set:\n * - `count` is the total number of items in the list\n * - `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list\n * - `getItemKey` is a function that returns a unique key for each item in the list.\n *\n * ### Render list items\n *\n * To keep the component framework-agnostic, the rendering of the list items is left to the consumer.\n *\n * We need to render only the visible items. The list of visible items are provided by the `virtualitemschange` event.\n * The event detail contains the `virtualItems` array, which contains the information for the rendering.\n * List items must have an `data-index` attribute, the indexes are in the `virtualItems` list.\n *\n * ## Best practices\n *\n * ### List updates\n *\n * Tanstack needs only the count of the items in the list and the size of each item to perform virtualization.\n * List updates happens when\n * - when `virtualizerProps` property of the component instance changes\n * - when `observe-size-changes` is set and the item's size changes (it uses ResizeObserver internally)\n * - when `component.visualiser.measure` called manually.\n *\n * ### Header\n *\n * To add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n *\n * ### Lists with dynamic content\n *\n * Unique keys for the list items are critical for dynamically changing list items or item's content.\n * If the key change with the content it will cause scrollbar and content shuttering.\n *\n * ### Top/Bottom Padding\n *\n * If padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this\n * will break the virtualization calculations and can cause scrollbars when they are not necessary.\n * Instead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.\n *\n * ### Gaps between items\n *\n * If you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels\n * to the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.\n * If you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.\n * If you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.\n *\n * @tagname mdc-virtualizedlist\n *\n * @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.\n * @event virtualitemschange - (React: onVirtualItemsChange) Event that gets called when the virtual items change.\n *\n * @slot default - This is a default/unnamed slot, where listitems can be placed.\n * @slot list-header - This slot is used to pass a header for the list, which can be a `mdc-listheader` component.\n *\n * @csspart container - The container of the virtualized list.\n * @csspart scroll - The scrollable area of the virtualized list.\n */",
54395
54395
  "customElement": true
54396
54396
  }
54397
54397
  ],
@@ -12,10 +12,10 @@ import type { Events } from '../../components/virtualizedlist/virtualizedlist.ty
12
12
  *
13
13
  * ## Setup
14
14
  *
15
- * `virtualizerProps` is a required prop that requires at least two properties to be set: `count` and `estimateSize`.
16
- * `count` is the total number of items in the list, and `estimateSize` is a function that returns the estimated
17
- * size (in pixels) of each item in the list. `getItemKey` is also strongly recommended to be set to provide unique
18
- * keys for each item in the list.
15
+ * `virtualizerProps` is a required prop that requires at least three properties to be set:
16
+ * - `count` is the total number of items in the list
17
+ * - `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list
18
+ * - `getItemKey` is a function that returns a unique key for each item in the list.
19
19
  *
20
20
  * ### Render list items
21
21
  *
@@ -44,6 +44,19 @@ import type { Events } from '../../components/virtualizedlist/virtualizedlist.ty
44
44
  * Unique keys for the list items are critical for dynamically changing list items or item's content.
45
45
  * If the key change with the content it will cause scrollbar and content shuttering.
46
46
  *
47
+ * ### Top/Bottom Padding
48
+ *
49
+ * If padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this
50
+ * will break the virtualization calculations and can cause scrollbars when they are not necessary.
51
+ * Instead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.
52
+ *
53
+ * ### Gaps between items
54
+ *
55
+ * If you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels
56
+ * to the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.
57
+ * If you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.
58
+ * If you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.
59
+ *
47
60
  * @tagname mdc-virtualizedlist
48
61
  *
49
62
  * @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.
@@ -13,10 +13,10 @@ import { TAG_NAME } from '../../components/virtualizedlist/virtualizedlist.const
13
13
  *
14
14
  * ## Setup
15
15
  *
16
- * `virtualizerProps` is a required prop that requires at least two properties to be set: `count` and `estimateSize`.
17
- * `count` is the total number of items in the list, and `estimateSize` is a function that returns the estimated
18
- * size (in pixels) of each item in the list. `getItemKey` is also strongly recommended to be set to provide unique
19
- * keys for each item in the list.
16
+ * `virtualizerProps` is a required prop that requires at least three properties to be set:
17
+ * - `count` is the total number of items in the list
18
+ * - `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list
19
+ * - `getItemKey` is a function that returns a unique key for each item in the list.
20
20
  *
21
21
  * ### Render list items
22
22
  *
@@ -45,6 +45,19 @@ import { TAG_NAME } from '../../components/virtualizedlist/virtualizedlist.const
45
45
  * Unique keys for the list items are critical for dynamically changing list items or item's content.
46
46
  * If the key change with the content it will cause scrollbar and content shuttering.
47
47
  *
48
+ * ### Top/Bottom Padding
49
+ *
50
+ * If padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this
51
+ * will break the virtualization calculations and can cause scrollbars when they are not necessary.
52
+ * Instead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.
53
+ *
54
+ * ### Gaps between items
55
+ *
56
+ * If you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels
57
+ * to the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.
58
+ * If you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.
59
+ * If you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.
60
+ *
48
61
  * @tagname mdc-virtualizedlist
49
62
  *
50
63
  * @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.129.18",
4
+ "version": "0.129.19",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"