@momentum-design/components 0.102.10 → 0.103.1
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 +4 -3
- package/dist/browser/index.js.map +2 -2
- package/dist/components/button/button.component.d.ts +2 -0
- package/dist/components/button/button.component.js +3 -1
- package/dist/components/button/button.styles.js +3 -2
- package/dist/custom-elements.json +7 -1
- package/dist/react/button/index.d.ts +2 -0
- package/dist/react/button/index.js +2 -0
- package/package.json +1 -1
@@ -35,6 +35,8 @@ declare const Button_base: import("../../utils/mixins/index.types").Constructor<
|
|
35
35
|
* @tagname mdc-button
|
36
36
|
*
|
37
37
|
* @slot - Text label of the button.
|
38
|
+
*
|
39
|
+
* @csspart button-text - Text label of the button, passed in default slot
|
38
40
|
*/
|
39
41
|
declare class Button extends Button_base {
|
40
42
|
/**
|
@@ -46,6 +46,8 @@ import { getIconNameWithoutStyle } from './button.utils';
|
|
46
46
|
* @tagname mdc-button
|
47
47
|
*
|
48
48
|
* @slot - Text label of the button.
|
49
|
+
*
|
50
|
+
* @csspart button-text - Text label of the button, passed in default slot
|
49
51
|
*/
|
50
52
|
class Button extends ButtonComponentMixin(Buttonsimple) {
|
51
53
|
constructor() {
|
@@ -129,7 +131,7 @@ class Button extends ButtonComponentMixin(Buttonsimple) {
|
|
129
131
|
length-unit="rem"
|
130
132
|
></mdc-icon>`
|
131
133
|
: ''}
|
132
|
-
<slot @slotchange=${this.inferButtonType}></slot>
|
134
|
+
<slot @slotchange=${this.inferButtonType} part="button-text"></slot>
|
133
135
|
${this.postfixFilledIconName
|
134
136
|
? html ` <mdc-icon
|
135
137
|
name="${this.postfixFilledIconName}"
|
@@ -236,8 +236,9 @@ const styles = css `
|
|
236
236
|
--mdc-button-primary-disabled-color: var(--mds-color-theme-inverted-text-primary-disabled);
|
237
237
|
}
|
238
238
|
|
239
|
-
:host([data-btn-type='pill'])
|
240
|
-
:host([data-btn-type='pill-with-icon'])
|
239
|
+
:host([data-btn-type='pill'])::part(button-text),
|
240
|
+
:host([data-btn-type='pill-with-icon'])::part(button-text) {
|
241
|
+
display: block;
|
241
242
|
white-space: nowrap;
|
242
243
|
overflow: hidden;
|
243
244
|
text-overflow: ellipsis;
|
@@ -3247,6 +3247,12 @@
|
|
3247
3247
|
"kind": "class",
|
3248
3248
|
"description": "`mdc-button` is a component that can be configured in various ways to suit different use cases.\n\nButton Variants:\n- **Primary**: Solid background color.\n- **Secondary**: Transparent background with a solid border.\n- **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n\nButton Colors:\n- **Positive**: Green color.\n- **Negative**: Red color.\n- **Accent**: Blue color.\n- **Promotional**: Purple color.\n- **Default**: White color.\n\nButton Sizes (in REM units):\n- **Pill button**: 40, 32, 28, 24.\n- **Icon button**: 64, 52, 40, 32, 28, 24.\n- **Tertiary icon button**: 20.\n\nButton Types:\n- **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.\n- **Pill button with icons**: A button containing an icon either on the left or right side of the button.\n- **Icon button**: A button represented by just an icon without any text.\nThe type of button is inferred based on the presence of slot and/or prefix and postfix icons.",
|
3249
3249
|
"name": "Button",
|
3250
|
+
"cssParts": [
|
3251
|
+
{
|
3252
|
+
"description": "Text label of the button, passed in default slot",
|
3253
|
+
"name": "button-text"
|
3254
|
+
}
|
3255
|
+
],
|
3250
3256
|
"slots": [
|
3251
3257
|
{
|
3252
3258
|
"description": "Text label of the button.",
|
@@ -3881,7 +3887,7 @@
|
|
3881
3887
|
"module": "/src/components/buttonsimple/buttonsimple.component"
|
3882
3888
|
},
|
3883
3889
|
"tagName": "mdc-button",
|
3884
|
-
"jsDoc": "/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * Button Variants:\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n *\n * Button Colors:\n * - **Positive**: Green color.\n * - **Negative**: Red color.\n * - **Accent**: Blue color.\n * - **Promotional**: Purple color.\n * - **Default**: White color.\n *\n * Button Sizes (in REM units):\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - **Tertiary icon button**: 20.\n *\n * Button Types:\n * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.\n * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.\n * - **Icon button**: A button represented by just an icon without any text.\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n */",
|
3890
|
+
"jsDoc": "/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * Button Variants:\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n *\n * Button Colors:\n * - **Positive**: Green color.\n * - **Negative**: Red color.\n * - **Accent**: Blue color.\n * - **Promotional**: Purple color.\n * - **Default**: White color.\n *\n * Button Sizes (in REM units):\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - **Tertiary icon button**: 20.\n *\n * Button Types:\n * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.\n * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.\n * - **Icon button**: A button represented by just an icon without any text.\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n *\n * @csspart button-text - Text label of the button, passed in default slot\n */",
|
3885
3891
|
"customElement": true,
|
3886
3892
|
"events": [
|
3887
3893
|
{
|
@@ -31,6 +31,8 @@ import Component from '../../components/button';
|
|
31
31
|
* @tagname mdc-button
|
32
32
|
*
|
33
33
|
* @slot - Text label of the button.
|
34
|
+
*
|
35
|
+
* @csspart button-text - Text label of the button, passed in default slot
|
34
36
|
*/
|
35
37
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
36
38
|
onClick: EventName<MouseEvent>;
|
@@ -33,6 +33,8 @@ import { TAG_NAME } from '../../components/button/button.constants';
|
|
33
33
|
* @tagname mdc-button
|
34
34
|
*
|
35
35
|
* @slot - Text label of the button.
|
36
|
+
*
|
37
|
+
* @csspart button-text - Text label of the button, passed in default slot
|
36
38
|
*/
|
37
39
|
const reactWrapper = createComponent({
|
38
40
|
tagName: TAG_NAME,
|