@momentum-design/components 0.25.3 → 0.26.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.
@@ -2580,6 +2580,22 @@
2580
2580
  "description": "line height of label in the text divider",
2581
2581
  "name": "--mdc-divider-text-line-height"
2582
2582
  },
2583
+ {
2584
+ "description": "background color of the grabber button in rest state",
2585
+ "name": "--mdc-divider-grabber-button-background-color-normal"
2586
+ },
2587
+ {
2588
+ "description": "background color of the grabber button in hover state",
2589
+ "name": "--mdc-divider-grabber-button-background-color-hover"
2590
+ },
2591
+ {
2592
+ "description": "background color of the grabber button in pressed state",
2593
+ "name": "--mdc-divider-grabber-button-background-color-pressed"
2594
+ },
2595
+ {
2596
+ "description": "border color of the grabber button",
2597
+ "name": "--mdc-divider-grabber-button-border-color"
2598
+ },
2583
2599
  {
2584
2600
  "description": "border radius of the grabber button",
2585
2601
  "name": "--mdc-divider-grabber-button-border-radius"
@@ -2754,7 +2770,7 @@
2754
2770
  "module": "/src/models"
2755
2771
  },
2756
2772
  "tagName": "mdc-divider",
2757
- "jsDoc": "/**\n * `mdc-divider` is a component that provides a line to separate and organize content.\n * It can also include a button or text positioned centrally, allowing users to interact with the layout.\n *\n * **Divider Orientation:**\n * - **Horizontal**: A thin, horizontal line.\n * - **Vertical**: A thin, vertical line.\n *\n * **Divider Variants:**\n * - **solid**: Solid line.\n * - **gradient**: Gradient Line.\n *\n * **Divider Types:**\n * - The type of divider is inferred based on the kind of slot present.\n * - **Primary**: A simple horizontal or vertical divider.\n * - **Text**: A horizontal divider with a text label in the center.\n * - **Grabber Button**: A horizontal or vertical divider with a styled button in the center.\n *\n * **Accessibility:**\n * - When the slot is replaced by an `mdc-button`:\n * - `aria-label` should be passed to the `mdc-button`.\n * - `aria-expanded` should be passed to the `mdc-button`.\n *\n * **Notes:**\n * - If the slot is replaced by an invalid tag name or contains multiple elements,\n * the divider defaults to the **Primary** type.\n * - To override the styles of the divider, use the provided CSS custom properties.\n *\n * @tagname mdc-divider\n *\n * @cssproperty --mdc-divider-background-color - background color of the divider\n * @cssproperty --mdc-divider-width - width of the divider\n * @cssproperty --mdc-divider-horizontal-gradient - gradient of the horizontal divider\n * @cssproperty --mdc-divider-vertical-gradient - gradient of the vertical divider\n * @cssproperty --mdc-divider-text-size - font size of label in the text divider\n * @cssproperty --mdc-divider-text-color - font color of label in the text divider\n * @cssproperty --mdc-divider-text-margin - left and right margin of label in the text divider\n * @cssproperty --mdc-divider-text-line-height - line height of label in the text divider\n * @cssproperty --mdc-divider-grabber-button-border-radius - border radius of the grabber button\n */",
2773
+ "jsDoc": "/**\n * `mdc-divider` is a component that provides a line to separate and organize content.\n * It can also include a button or text positioned centrally, allowing users to interact with the layout.\n *\n * **Divider Orientation:**\n * - **Horizontal**: A thin, horizontal line.\n * - **Vertical**: A thin, vertical line.\n *\n * **Divider Variants:**\n * - **solid**: Solid line.\n * - **gradient**: Gradient Line.\n *\n * **Divider Types:**\n * - The type of divider is inferred based on the kind of slot present.\n * - **Primary**: A simple horizontal or vertical divider.\n * - **Text**: A horizontal divider with a text label in the center.\n * - **Grabber Button**: A horizontal or vertical divider with a styled button in the center.\n *\n * **Accessibility:**\n * - When the slot is replaced by an `mdc-button`:\n * - `aria-label` should be passed to the `mdc-button`.\n * - `aria-expanded` should be passed to the `mdc-button`.\n *\n * **Notes:**\n * - If the slot is replaced by an invalid tag name or contains multiple elements,\n * the divider defaults to the **Primary** type.\n * - To override the styles of the divider, use the provided CSS custom properties.\n *\n * @tagname mdc-divider\n *\n * @cssproperty --mdc-divider-background-color - background color of the divider\n * @cssproperty --mdc-divider-width - width of the divider\n * @cssproperty --mdc-divider-horizontal-gradient - gradient of the horizontal divider\n * @cssproperty --mdc-divider-vertical-gradient - gradient of the vertical divider\n * @cssproperty --mdc-divider-text-size - font size of label in the text divider\n * @cssproperty --mdc-divider-text-color - font color of label in the text divider\n * @cssproperty --mdc-divider-text-margin - left and right margin of label in the text divider\n * @cssproperty --mdc-divider-text-line-height - line height of label in the text divider\n * @cssproperty --mdc-divider-grabber-button-background-color-normal - background color of the grabber button\n * in rest state\n * @cssproperty --mdc-divider-grabber-button-background-color-hover - background color of the grabber button\n * in hover state\n * @cssproperty --mdc-divider-grabber-button-background-color-pressed - background color of the grabber button\n * in pressed state\n * @cssproperty --mdc-divider-grabber-button-border-color - border color of the grabber button\n * @cssproperty --mdc-divider-grabber-button-border-radius - border radius of the grabber button\n */",
2758
2774
  "customElement": true
2759
2775
  }
2760
2776
  ],
@@ -5733,6 +5749,138 @@
5733
5749
  }
5734
5750
  ]
5735
5751
  },
5752
+ {
5753
+ "kind": "javascript-module",
5754
+ "path": "components/spinner/spinner.component.js",
5755
+ "declarations": [
5756
+ {
5757
+ "kind": "class",
5758
+ "description": "`mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\nit's best for cases where the progress or duration of a process is variable or unknown.\n\nSpinner Variants:\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s\nicon or label text.\n\nSpinner Sizes:\n- **Large (96px)**: Use when replacing entire regions or pages that are still loading\n- **MidSize (48px) (Default)**: Use for most use cases.\n- **Small (24px)**: Use for inline with loading text.\n\nCustomisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\nCSS property.\n\nSpinner Colors:\n- **Default**: Use for most use cases.\n- **Inverted**: Only to be used within inverted components, such as coachmarks.\n\nRegarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\nwill be unset\nand aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.",
5759
+ "name": "Spinner",
5760
+ "cssProperties": [
5761
+ {
5762
+ "description": "Allows customization of the default spinner color.",
5763
+ "name": "--mdc-spinner-default-color"
5764
+ },
5765
+ {
5766
+ "description": "Allows customization of the inverted spinner color.",
5767
+ "name": "--mdc-spinner-inverted-color"
5768
+ },
5769
+ {
5770
+ "description": "Allows customization of the spinner Button variant color.",
5771
+ "name": "--mdc-spinner-button-variant-color"
5772
+ },
5773
+ {
5774
+ "description": "Allows customization of the spinner size.",
5775
+ "name": "--mdc-spinner-size"
5776
+ }
5777
+ ],
5778
+ "cssParts": [
5779
+ {
5780
+ "description": "The svg which contains the circle spinner.",
5781
+ "name": "container"
5782
+ },
5783
+ {
5784
+ "description": "The circle of the spinner.",
5785
+ "name": "circle"
5786
+ }
5787
+ ],
5788
+ "members": [
5789
+ {
5790
+ "kind": "field",
5791
+ "name": "inverted",
5792
+ "description": "The spinner color can be inverted by setting the inverted attribute to true.",
5793
+ "default": "false",
5794
+ "attribute": "inverted",
5795
+ "reflects": true
5796
+ },
5797
+ {
5798
+ "kind": "field",
5799
+ "name": "size",
5800
+ "type": {
5801
+ "text": "SpinnerSize | undefined"
5802
+ },
5803
+ "description": "Size of the spinner.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'\n- 'undefined'",
5804
+ "default": "midsize",
5805
+ "attribute": "size",
5806
+ "reflects": true
5807
+ },
5808
+ {
5809
+ "kind": "field",
5810
+ "name": "ariaLabel",
5811
+ "type": {
5812
+ "text": "string | null"
5813
+ },
5814
+ "default": "null",
5815
+ "description": "Aria-label attribute to be set for accessibility",
5816
+ "attribute": "aria-label"
5817
+ },
5818
+ {
5819
+ "kind": "field",
5820
+ "name": "variant",
5821
+ "type": {
5822
+ "text": "SpinnerVariant"
5823
+ },
5824
+ "description": "There are 2 variants of spinner: default and button. Their coloring is different.\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button’s\nicon or label text.",
5825
+ "default": "standalone",
5826
+ "attribute": "variant"
5827
+ }
5828
+ ],
5829
+ "attributes": [
5830
+ {
5831
+ "name": "inverted",
5832
+ "description": "The spinner color can be inverted by setting the inverted attribute to true.",
5833
+ "default": "false",
5834
+ "fieldName": "inverted"
5835
+ },
5836
+ {
5837
+ "name": "size",
5838
+ "type": {
5839
+ "text": "SpinnerSize | undefined"
5840
+ },
5841
+ "description": "Size of the spinner.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'\n- 'undefined'",
5842
+ "default": "midsize",
5843
+ "fieldName": "size"
5844
+ },
5845
+ {
5846
+ "name": "aria-label",
5847
+ "type": {
5848
+ "text": "string | null"
5849
+ },
5850
+ "default": "null",
5851
+ "description": "Aria-label attribute to be set for accessibility",
5852
+ "fieldName": "ariaLabel"
5853
+ },
5854
+ {
5855
+ "name": "variant",
5856
+ "type": {
5857
+ "text": "SpinnerVariant"
5858
+ },
5859
+ "description": "There are 2 variants of spinner: default and button. Their coloring is different.\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button’s\nicon or label text.",
5860
+ "default": "standalone",
5861
+ "fieldName": "variant"
5862
+ }
5863
+ ],
5864
+ "superclass": {
5865
+ "name": "Component",
5866
+ "module": "/src/models"
5867
+ },
5868
+ "tagName": "mdc-spinner",
5869
+ "jsDoc": "/**\n * `mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\n * it's best for cases where the progress or duration of a process is variable or unknown.\n *\n * Spinner Variants:\n * - **Standalone (Default)**: Track has a blue color.\n * - **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\n * To ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s\n * icon or label text.\n *\n * Spinner Sizes:\n * - **Large (96px)**: Use when replacing entire regions or pages that are still loading\n * - **MidSize (48px) (Default)**: Use for most use cases.\n * - **Small (24px)**: Use for inline with loading text.\n *\n * Customisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\n * CSS property.\n *\n * Spinner Colors:\n * - **Default**: Use for most use cases.\n * - **Inverted**: Only to be used within inverted components, such as coachmarks.\n *\n * Regarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\n * will be unset\n * and aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.\n *\n * @tagname mdc-spinner\n *\n * @cssproperty --mdc-spinner-default-color - Allows customization of the default spinner color.\n * @cssproperty --mdc-spinner-inverted-color - Allows customization of the inverted spinner color.\n * @cssproperty --mdc-spinner-button-variant-color - Allows customization of the spinner Button variant color.\n * @cssproperty --mdc-spinner-size - Allows customization of the spinner size.\n *\n * @csspart container - The svg which contains the circle spinner.\n * @csspart circle - The circle of the spinner.\n */",
5870
+ "customElement": true
5871
+ }
5872
+ ],
5873
+ "exports": [
5874
+ {
5875
+ "kind": "js",
5876
+ "name": "default",
5877
+ "declaration": {
5878
+ "name": "Spinner",
5879
+ "module": "components/spinner/spinner.component.js"
5880
+ }
5881
+ }
5882
+ ]
5883
+ },
5736
5884
  {
5737
5885
  "kind": "javascript-module",
5738
5886
  "path": "components/tab/tab.component.js",
package/dist/index.d.ts CHANGED
@@ -19,7 +19,8 @@ import VirtualizedList from './components/virtualizedlist';
19
19
  import Tab from './components/tab';
20
20
  import FormfieldGroup from './components/formfieldgroup';
21
21
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
22
+ import Spinner from './components/spinner';
22
23
  import type { TextType } from './components/text/text.types';
23
- export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Toggle, Checkbox, Radio, VirtualizedList, Tab, FormfieldGroup, };
24
+ export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Toggle, Checkbox, Radio, VirtualizedList, Tab, FormfieldGroup, Spinner, };
24
25
  export type { TextType, };
25
26
  export { inMemoryCache, webAPIIconsCache };
package/dist/index.js CHANGED
@@ -19,5 +19,6 @@ import VirtualizedList from './components/virtualizedlist';
19
19
  import Tab from './components/tab';
20
20
  import FormfieldGroup from './components/formfieldgroup';
21
21
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
22
- export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Toggle, Checkbox, Radio, VirtualizedList, Tab, FormfieldGroup, };
22
+ import Spinner from './components/spinner';
23
+ export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Toggle, Checkbox, Radio, VirtualizedList, Tab, FormfieldGroup, Spinner, };
23
24
  export { inMemoryCache, webAPIIconsCache };
@@ -37,6 +37,13 @@ import Component from '../../components/divider';
37
37
  * @cssproperty --mdc-divider-text-color - font color of label in the text divider
38
38
  * @cssproperty --mdc-divider-text-margin - left and right margin of label in the text divider
39
39
  * @cssproperty --mdc-divider-text-line-height - line height of label in the text divider
40
+ * @cssproperty --mdc-divider-grabber-button-background-color-normal - background color of the grabber button
41
+ * in rest state
42
+ * @cssproperty --mdc-divider-grabber-button-background-color-hover - background color of the grabber button
43
+ * in hover state
44
+ * @cssproperty --mdc-divider-grabber-button-background-color-pressed - background color of the grabber button
45
+ * in pressed state
46
+ * @cssproperty --mdc-divider-grabber-button-border-color - border color of the grabber button
40
47
  * @cssproperty --mdc-divider-grabber-button-border-radius - border radius of the grabber button
41
48
  */
42
49
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
@@ -40,6 +40,13 @@ import { TAG_NAME } from '../../components/divider/divider.constants';
40
40
  * @cssproperty --mdc-divider-text-color - font color of label in the text divider
41
41
  * @cssproperty --mdc-divider-text-margin - left and right margin of label in the text divider
42
42
  * @cssproperty --mdc-divider-text-line-height - line height of label in the text divider
43
+ * @cssproperty --mdc-divider-grabber-button-background-color-normal - background color of the grabber button
44
+ * in rest state
45
+ * @cssproperty --mdc-divider-grabber-button-background-color-hover - background color of the grabber button
46
+ * in hover state
47
+ * @cssproperty --mdc-divider-grabber-button-background-color-pressed - background color of the grabber button
48
+ * in pressed state
49
+ * @cssproperty --mdc-divider-grabber-button-border-color - border color of the grabber button
43
50
  * @cssproperty --mdc-divider-grabber-button-border-radius - border radius of the grabber button
44
51
  */
45
52
  const reactWrapper = createComponent({
@@ -16,6 +16,7 @@ export { default as Marker } from './marker';
16
16
  export { default as Modalcontainer } from './modalcontainer';
17
17
  export { default as Presence } from './presence';
18
18
  export { default as Radio } from './radio';
19
+ export { default as Spinner } from './spinner';
19
20
  export { default as Tab } from './tab';
20
21
  export { default as Text } from './text';
21
22
  export { default as ThemeProvider } from './themeprovider';
@@ -16,6 +16,7 @@ export { default as Marker } from './marker';
16
16
  export { default as Modalcontainer } from './modalcontainer';
17
17
  export { default as Presence } from './presence';
18
18
  export { default as Radio } from './radio';
19
+ export { default as Spinner } from './spinner';
19
20
  export { default as Tab } from './tab';
20
21
  export { default as Text } from './text';
21
22
  export { default as ThemeProvider } from './themeprovider';
@@ -0,0 +1,39 @@
1
+ import Component from '../../components/spinner';
2
+ /**
3
+ * `mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning
4
+ * it's best for cases where the progress or duration of a process is variable or unknown.
5
+ *
6
+ * Spinner Variants:
7
+ * - **Standalone (Default)**: Track has a blue color.
8
+ * - **Button**: To be used when placed in a button to show that the button’s action is currently in progress.
9
+ * To ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s
10
+ * icon or label text.
11
+ *
12
+ * Spinner Sizes:
13
+ * - **Large (96px)**: Use when replacing entire regions or pages that are still loading
14
+ * - **MidSize (48px) (Default)**: Use for most use cases.
15
+ * - **Small (24px)**: Use for inline with loading text.
16
+ *
17
+ * Customisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size
18
+ * CSS property.
19
+ *
20
+ * Spinner Colors:
21
+ * - **Default**: Use for most use cases.
22
+ * - **Inverted**: Only to be used within inverted components, such as coachmarks.
23
+ *
24
+ * Regarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role
25
+ * will be unset
26
+ * and aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.
27
+ *
28
+ * @tagname mdc-spinner
29
+ *
30
+ * @cssproperty --mdc-spinner-default-color - Allows customization of the default spinner color.
31
+ * @cssproperty --mdc-spinner-inverted-color - Allows customization of the inverted spinner color.
32
+ * @cssproperty --mdc-spinner-button-variant-color - Allows customization of the spinner Button variant color.
33
+ * @cssproperty --mdc-spinner-size - Allows customization of the spinner size.
34
+ *
35
+ * @csspart container - The svg which contains the circle spinner.
36
+ * @csspart circle - The circle of the spinner.
37
+ */
38
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
39
+ export default reactWrapper;
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/spinner';
4
+ import { TAG_NAME } from '../../components/spinner/spinner.constants';
5
+ /**
6
+ * `mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning
7
+ * it's best for cases where the progress or duration of a process is variable or unknown.
8
+ *
9
+ * Spinner Variants:
10
+ * - **Standalone (Default)**: Track has a blue color.
11
+ * - **Button**: To be used when placed in a button to show that the button’s action is currently in progress.
12
+ * To ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s
13
+ * icon or label text.
14
+ *
15
+ * Spinner Sizes:
16
+ * - **Large (96px)**: Use when replacing entire regions or pages that are still loading
17
+ * - **MidSize (48px) (Default)**: Use for most use cases.
18
+ * - **Small (24px)**: Use for inline with loading text.
19
+ *
20
+ * Customisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size
21
+ * CSS property.
22
+ *
23
+ * Spinner Colors:
24
+ * - **Default**: Use for most use cases.
25
+ * - **Inverted**: Only to be used within inverted components, such as coachmarks.
26
+ *
27
+ * Regarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role
28
+ * will be unset
29
+ * and aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.
30
+ *
31
+ * @tagname mdc-spinner
32
+ *
33
+ * @cssproperty --mdc-spinner-default-color - Allows customization of the default spinner color.
34
+ * @cssproperty --mdc-spinner-inverted-color - Allows customization of the inverted spinner color.
35
+ * @cssproperty --mdc-spinner-button-variant-color - Allows customization of the spinner Button variant color.
36
+ * @cssproperty --mdc-spinner-size - Allows customization of the spinner size.
37
+ *
38
+ * @csspart container - The svg which contains the circle spinner.
39
+ * @csspart circle - The circle of the spinner.
40
+ */
41
+ const reactWrapper = createComponent({
42
+ tagName: TAG_NAME,
43
+ elementClass: Component,
44
+ react: React,
45
+ events: {},
46
+ displayName: 'Spinner',
47
+ });
48
+ export default reactWrapper;
package/package.json CHANGED
@@ -37,5 +37,5 @@
37
37
  "lit": "^3.2.0",
38
38
  "uuid": "^11.0.5"
39
39
  },
40
- "version": "0.25.3"
40
+ "version": "0.26.0"
41
41
  }