@momentum-design/components 0.133.39 → 0.133.40
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/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/components/button/button.component.d.ts +2 -1
- package/dist/components/button/button.component.js +2 -1
- package/dist/components/checkbox/checkbox.component.d.ts +2 -0
- package/dist/components/checkbox/checkbox.component.js +8 -0
- package/dist/custom-elements.json +15 -3
- package/dist/react/button/index.d.ts +2 -1
- package/dist/react/button/index.js +2 -1
- package/dist/react/checkbox/index.d.ts +2 -0
- package/dist/react/checkbox/index.js +2 -0
- package/package.json +1 -1
|
@@ -61,11 +61,12 @@ declare const Button_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
61
61
|
*
|
|
62
62
|
* @cssproperty --mdc-button-height - Height for button size
|
|
63
63
|
* @cssproperty --mdc-button-background - Background of the button
|
|
64
|
-
* @cssproperty --mdc-button-border-color -
|
|
64
|
+
* @cssproperty --mdc-button-border-color - Border color of the button
|
|
65
65
|
* @cssproperty --mdc-button-text-color - Text color of the button
|
|
66
66
|
* @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon
|
|
67
67
|
* @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon
|
|
68
68
|
* @cssproperty --mdc-button-line-height - Line height of the button text
|
|
69
|
+
*
|
|
69
70
|
*/
|
|
70
71
|
declare class Button extends Button_base {
|
|
71
72
|
/**
|
|
@@ -73,11 +73,12 @@ import { getIconNameWithoutStyle } from './button.utils';
|
|
|
73
73
|
*
|
|
74
74
|
* @cssproperty --mdc-button-height - Height for button size
|
|
75
75
|
* @cssproperty --mdc-button-background - Background of the button
|
|
76
|
-
* @cssproperty --mdc-button-border-color -
|
|
76
|
+
* @cssproperty --mdc-button-border-color - Border color of the button
|
|
77
77
|
* @cssproperty --mdc-button-text-color - Text color of the button
|
|
78
78
|
* @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon
|
|
79
79
|
* @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon
|
|
80
80
|
* @cssproperty --mdc-button-line-height - Line height of the button text
|
|
81
|
+
*
|
|
81
82
|
*/
|
|
82
83
|
class Button extends OverflowMixin(ButtonComponentMixin(Buttonsimple)) {
|
|
83
84
|
constructor() {
|
|
@@ -47,6 +47,8 @@ declare const Checkbox_base: import("../../utils/mixins/index.types").Constructo
|
|
|
47
47
|
* @csspart checkbox-input - The native checkbox input element that provides the interactive functionality.
|
|
48
48
|
* @csspart text-container - The container for the label and helper text elements.
|
|
49
49
|
* @csspart static-checkbox - The staticcheckbox that provides the visual checkbox appearance.
|
|
50
|
+
*
|
|
51
|
+
* @cssstate checked - Active when the checkbox is checked.
|
|
50
52
|
*/
|
|
51
53
|
declare class Checkbox extends Checkbox_base implements AssociatedFormControl {
|
|
52
54
|
/**
|
|
@@ -63,6 +63,8 @@ import { CHECKBOX_VALIDATION } from './checkbox.constants';
|
|
|
63
63
|
* @csspart checkbox-input - The native checkbox input element that provides the interactive functionality.
|
|
64
64
|
* @csspart text-container - The container for the label and helper text elements.
|
|
65
65
|
* @csspart static-checkbox - The staticcheckbox that provides the visual checkbox appearance.
|
|
66
|
+
*
|
|
67
|
+
* @cssstate checked - Active when the checkbox is checked.
|
|
66
68
|
*/
|
|
67
69
|
class Checkbox extends KeyDownHandledMixin(KeyToActionMixin(AutoFocusOnMountMixin(FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper))))) {
|
|
68
70
|
constructor() {
|
|
@@ -209,6 +211,12 @@ class Checkbox extends KeyDownHandledMixin(KeyToActionMixin(AutoFocusOnMountMixi
|
|
|
209
211
|
super.update(changedProperties);
|
|
210
212
|
if (changedProperties.has('checked')) {
|
|
211
213
|
this.setFormValue();
|
|
214
|
+
if (this.checked) {
|
|
215
|
+
this.internals.states.add('checked');
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
this.internals.states.delete('checked');
|
|
219
|
+
}
|
|
212
220
|
}
|
|
213
221
|
}
|
|
214
222
|
render() {
|
|
@@ -4859,7 +4859,7 @@
|
|
|
4859
4859
|
}
|
|
4860
4860
|
},
|
|
4861
4861
|
{
|
|
4862
|
-
"description": "
|
|
4862
|
+
"description": "Border color of the button",
|
|
4863
4863
|
"name": "--mdc-button-border-color",
|
|
4864
4864
|
"inheritedFrom": {
|
|
4865
4865
|
"name": "Buttonsimple",
|
|
@@ -5626,7 +5626,7 @@
|
|
|
5626
5626
|
"module": "/src/components/buttonsimple/buttonsimple.component"
|
|
5627
5627
|
},
|
|
5628
5628
|
"tagName": "mdc-button",
|
|
5629
|
-
"jsDoc": "/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * ## Button configuration\n *\n * The appearance of the button depends on combination of multiple attributes.\n *\n * ### Button Types\n *\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots:\n *\n * - **Pill button**: Contains text value, commonly used for call to action, tags, or filters\n * - **Pill button with icons**: Contains an icon on the left or right side of the button\n * - **Icon button**: Represented by just an icon without any text\n *\n * ### Button Variants:\n *\n * Options for button backgrounds and borders:\n *\n * - **Primary**: Solid background color\n * - **Secondary**: Transparent background with solid border\n * - **Tertiary**: No background or border, text-only appearance\n *\n * ### Button Colors\n *\n * Color options for **Primary** and **Secondary** buttons:\n *\n * - **Default**: For standard actions\n * - **Positive**: For success or confirmation actions\n * - **Negative**: For destructive or error actions\n * - **Accent**: For informational actions\n * - **Promotional**: For promotional actions\n *\n * ### Button Sizes\n *\n * Size options for different button configurations in REM:\n *\n * - **Pill button**: 40, 32, 28, 24\n * - **Icon button**: 64, 52, 40, 32, 28, 24\n * - **Tertiary icon button**: 20\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n * @slot prefix - Content to be displayed before the text label.\n * @slot postfix - Content to be displayed after the text label.\n *\n * @csspart button-text - Text label of the button, passed in default slot\n * @csspart prefix - Content before the text label, passed in `prefix` slot\n * @csspart postfix - Content after the text label, passed in `postfix` slot\n * @csspart prefix-icon - Icon element displayed before the text label when `prefix-icon` attribute is set\n * @csspart postfix-icon - Icon element displayed after the text label when `postfix-icon` attribute is set\n *\n * @cssproperty --mdc-button-height - Height for button size\n * @cssproperty --mdc-button-background - Background of the button\n * @cssproperty --mdc-button-border-color -
|
|
5629
|
+
"jsDoc": "/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * ## Button configuration\n *\n * The appearance of the button depends on combination of multiple attributes.\n *\n * ### Button Types\n *\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots:\n *\n * - **Pill button**: Contains text value, commonly used for call to action, tags, or filters\n * - **Pill button with icons**: Contains an icon on the left or right side of the button\n * - **Icon button**: Represented by just an icon without any text\n *\n * ### Button Variants:\n *\n * Options for button backgrounds and borders:\n *\n * - **Primary**: Solid background color\n * - **Secondary**: Transparent background with solid border\n * - **Tertiary**: No background or border, text-only appearance\n *\n * ### Button Colors\n *\n * Color options for **Primary** and **Secondary** buttons:\n *\n * - **Default**: For standard actions\n * - **Positive**: For success or confirmation actions\n * - **Negative**: For destructive or error actions\n * - **Accent**: For informational actions\n * - **Promotional**: For promotional actions\n *\n * ### Button Sizes\n *\n * Size options for different button configurations in REM:\n *\n * - **Pill button**: 40, 32, 28, 24\n * - **Icon button**: 64, 52, 40, 32, 28, 24\n * - **Tertiary icon button**: 20\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n * @slot prefix - Content to be displayed before the text label.\n * @slot postfix - Content to be displayed after the text label.\n *\n * @csspart button-text - Text label of the button, passed in default slot\n * @csspart prefix - Content before the text label, passed in `prefix` slot\n * @csspart postfix - Content after the text label, passed in `postfix` slot\n * @csspart prefix-icon - Icon element displayed before the text label when `prefix-icon` attribute is set\n * @csspart postfix-icon - Icon element displayed after the text label when `postfix-icon` attribute is set\n *\n * @cssproperty --mdc-button-height - Height for button size\n * @cssproperty --mdc-button-background - Background of the button\n * @cssproperty --mdc-button-border-color - Border color of the button\n * @cssproperty --mdc-button-text-color - Text color of the button\n * @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon\n * @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon\n * @cssproperty --mdc-button-line-height - Line height of the button text\n *\n */",
|
|
5630
5630
|
"customElement": true,
|
|
5631
5631
|
"events": [
|
|
5632
5632
|
{
|
|
@@ -11373,6 +11373,12 @@
|
|
|
11373
11373
|
}
|
|
11374
11374
|
}
|
|
11375
11375
|
],
|
|
11376
|
+
"cssStates": [
|
|
11377
|
+
{
|
|
11378
|
+
"description": "Active when the checkbox is checked.",
|
|
11379
|
+
"name": "checked"
|
|
11380
|
+
}
|
|
11381
|
+
],
|
|
11376
11382
|
"mixins": [
|
|
11377
11383
|
{
|
|
11378
11384
|
"name": "KeyDownHandledMixin",
|
|
@@ -11400,7 +11406,13 @@
|
|
|
11400
11406
|
"module": "/src/components/formfieldwrapper/formfieldwrapper.component"
|
|
11401
11407
|
},
|
|
11402
11408
|
"tagName": "mdc-checkbox",
|
|
11403
|
-
"jsDoc": "/**\n * The Checkbox component allows users to select one or multiple options from a list, toggle features on/off,\n * or indicate agreement in forms and settings. These are commonly used in forms, lists, and settings panels\n * where users need to make selections or express preferences.\n *\n * To create a group of checkboxes, use the `mdc-formfieldgroup` component.\n *\n * **Note:** This component internally renders a native checkbox input element with custom styling.\n *\n * ## When to use\n *\n * Use checkboxes when users can select multiple options from a list, or when a single checkbox represents a binary choice (e.g., agreeing to terms).\n *\n * ## Accessibility\n * - Provide clear labels that describe what the checkbox controls\n * - Use `data-aria-label` when a visual label is not present\n * - Keyboard navigation: Space to toggle, Tab to navigate, Enter to submit form\n *\n * ## Styling\n * Use the `static-checkbox` part to apply custom styles to the checkbox visual element.\n * This part exposes the underlying [StaticCheckbox](?path=/docs/components-decorator-staticcheckbox--docs) component for advanced styling.\n *\n * @dependency mdc-button\n * @dependency mdc-icon\n * @dependency mdc-staticcheckbox\n * @dependency mdc-text\n * @dependency mdc-toggletip\n *\n * @tagname mdc-checkbox\n *\n * @event change - (React: onChange) Event that gets dispatched when the checkbox state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the checkbox receives focus.\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart checkbox-input - The native checkbox input element that provides the interactive functionality.\n * @csspart text-container - The container for the label and helper text elements.\n * @csspart static-checkbox - The staticcheckbox that provides the visual checkbox appearance.\n */",
|
|
11409
|
+
"jsDoc": "/**\n * The Checkbox component allows users to select one or multiple options from a list, toggle features on/off,\n * or indicate agreement in forms and settings. These are commonly used in forms, lists, and settings panels\n * where users need to make selections or express preferences.\n *\n * To create a group of checkboxes, use the `mdc-formfieldgroup` component.\n *\n * **Note:** This component internally renders a native checkbox input element with custom styling.\n *\n * ## When to use\n *\n * Use checkboxes when users can select multiple options from a list, or when a single checkbox represents a binary choice (e.g., agreeing to terms).\n *\n * ## Accessibility\n * - Provide clear labels that describe what the checkbox controls\n * - Use `data-aria-label` when a visual label is not present\n * - Keyboard navigation: Space to toggle, Tab to navigate, Enter to submit form\n *\n * ## Styling\n * Use the `static-checkbox` part to apply custom styles to the checkbox visual element.\n * This part exposes the underlying [StaticCheckbox](?path=/docs/components-decorator-staticcheckbox--docs) component for advanced styling.\n *\n * @dependency mdc-button\n * @dependency mdc-icon\n * @dependency mdc-staticcheckbox\n * @dependency mdc-text\n * @dependency mdc-toggletip\n *\n * @tagname mdc-checkbox\n *\n * @event change - (React: onChange) Event that gets dispatched when the checkbox state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the checkbox receives focus.\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart checkbox-input - The native checkbox input element that provides the interactive functionality.\n * @csspart text-container - The container for the label and helper text elements.\n * @csspart static-checkbox - The staticcheckbox that provides the visual checkbox appearance.\n *\n * @cssstate checked - Active when the checkbox is checked.\n */",
|
|
11410
|
+
"cssCustomStates": [
|
|
11411
|
+
{
|
|
11412
|
+
"name": "checked",
|
|
11413
|
+
"description": "Active when the checkbox is checked."
|
|
11414
|
+
}
|
|
11415
|
+
],
|
|
11404
11416
|
"customElement": true,
|
|
11405
11417
|
"slots": [
|
|
11406
11418
|
{
|
|
@@ -58,11 +58,12 @@ import type { Events as EventsInherited } from '../../components/buttonsimple/bu
|
|
|
58
58
|
*
|
|
59
59
|
* @cssproperty --mdc-button-height - Height for button size
|
|
60
60
|
* @cssproperty --mdc-button-background - Background of the button
|
|
61
|
-
* @cssproperty --mdc-button-border-color -
|
|
61
|
+
* @cssproperty --mdc-button-border-color - Border color of the button
|
|
62
62
|
* @cssproperty --mdc-button-text-color - Text color of the button
|
|
63
63
|
* @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon
|
|
64
64
|
* @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon
|
|
65
65
|
* @cssproperty --mdc-button-line-height - Line height of the button text
|
|
66
|
+
*
|
|
66
67
|
*/
|
|
67
68
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
|
68
69
|
onClick: EventName<EventsInherited["onClickEvent"]>;
|
|
@@ -59,11 +59,12 @@ import { TAG_NAME } from '../../components/button/button.constants';
|
|
|
59
59
|
*
|
|
60
60
|
* @cssproperty --mdc-button-height - Height for button size
|
|
61
61
|
* @cssproperty --mdc-button-background - Background of the button
|
|
62
|
-
* @cssproperty --mdc-button-border-color -
|
|
62
|
+
* @cssproperty --mdc-button-border-color - Border color of the button
|
|
63
63
|
* @cssproperty --mdc-button-text-color - Text color of the button
|
|
64
64
|
* @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon
|
|
65
65
|
* @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon
|
|
66
66
|
* @cssproperty --mdc-button-line-height - Line height of the button text
|
|
67
|
+
*
|
|
67
68
|
*/
|
|
68
69
|
const reactWrapper = createComponent({
|
|
69
70
|
tagName: TAG_NAME,
|
|
@@ -45,6 +45,8 @@ import type { Events } from '../../components/checkbox/checkbox.types';
|
|
|
45
45
|
* @csspart checkbox-input - The native checkbox input element that provides the interactive functionality.
|
|
46
46
|
* @csspart text-container - The container for the label and helper text elements.
|
|
47
47
|
* @csspart static-checkbox - The staticcheckbox that provides the visual checkbox appearance.
|
|
48
|
+
*
|
|
49
|
+
* @cssstate checked - Active when the checkbox is checked.
|
|
48
50
|
*/
|
|
49
51
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
|
50
52
|
onChange: EventName<Events["onChangeEvent"]>;
|
|
@@ -46,6 +46,8 @@ import { TAG_NAME } from '../../components/checkbox/checkbox.constants';
|
|
|
46
46
|
* @csspart checkbox-input - The native checkbox input element that provides the interactive functionality.
|
|
47
47
|
* @csspart text-container - The container for the label and helper text elements.
|
|
48
48
|
* @csspart static-checkbox - The staticcheckbox that provides the visual checkbox appearance.
|
|
49
|
+
*
|
|
50
|
+
* @cssstate checked - Active when the checkbox is checked.
|
|
49
51
|
*/
|
|
50
52
|
const reactWrapper = createComponent({
|
|
51
53
|
tagName: TAG_NAME,
|