@momentum-design/components 0.133.5 → 0.133.7
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 +173 -173
- package/dist/browser/index.js.map +4 -4
- package/dist/components/password/password.component.js +2 -1
- package/dist/components/password/password.styles.d.ts +2 -0
- package/dist/components/password/password.styles.js +9 -0
- package/dist/components/tab/tab.component.d.ts +4 -0
- package/dist/components/tab/tab.component.js +5 -4
- package/dist/components/tab/tab.styles.js +1 -2
- package/dist/components/tablist/tablist.component.js +3 -0
- package/dist/custom-elements.json +20 -24
- package/dist/react/tab/index.d.ts +3 -0
- package/dist/react/tab/index.js +3 -0
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ import { INPUT_TYPE } from '../input/input.constants';
|
|
|
14
14
|
import { BUTTON_VARIANTS } from '../button/button.constants';
|
|
15
15
|
import { DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';
|
|
16
16
|
import { PASSWORD_VISIBILITY_ICONS } from './password.constants';
|
|
17
|
+
import styles from './password.styles';
|
|
17
18
|
/**
|
|
18
19
|
* `mdc-password` is a component that allows users to input their password.
|
|
19
20
|
* It extends the `mdc-input` component and provides additional features specific to password fields.
|
|
@@ -129,7 +130,7 @@ class Password extends Input {
|
|
|
129
130
|
return super.renderInputElement(inputType, hidePlaceholder);
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
|
-
Password.styles = [...Input.styles];
|
|
133
|
+
Password.styles = [...Input.styles, ...styles];
|
|
133
134
|
__decorate([
|
|
134
135
|
property({ type: String, attribute: 'show-button-aria-label', reflect: true }),
|
|
135
136
|
__metadata("design:type", Object)
|
|
@@ -56,6 +56,9 @@ declare const Tab_base: import("../../utils/mixins/index.types").Constructor<imp
|
|
|
56
56
|
* @csspart filled-icon - The icon of the tab, if active.
|
|
57
57
|
* @csspart indicator - The indicator of the tab.
|
|
58
58
|
* @csspart text - The text of the tab.
|
|
59
|
+
*
|
|
60
|
+
* @slot prefix - The slot for the content before the text, typically used for the icon.
|
|
61
|
+
* @slot postfix - The slot for the content after the text, typically used for the badge or chip.
|
|
59
62
|
*/
|
|
60
63
|
declare class Tab extends Tab_base {
|
|
61
64
|
/**
|
|
@@ -106,6 +109,7 @@ declare class Tab extends Tab_base {
|
|
|
106
109
|
* Dispatch the activechange event.
|
|
107
110
|
*
|
|
108
111
|
* @param active - The active state of the tab.
|
|
112
|
+
* @internal
|
|
109
113
|
*/
|
|
110
114
|
private handleTabActiveChange;
|
|
111
115
|
private getFilledIconName;
|
|
@@ -72,6 +72,9 @@ import styles from './tab.styles';
|
|
|
72
72
|
* @csspart filled-icon - The icon of the tab, if active.
|
|
73
73
|
* @csspart indicator - The indicator of the tab.
|
|
74
74
|
* @csspart text - The text of the tab.
|
|
75
|
+
*
|
|
76
|
+
* @slot prefix - The slot for the content before the text, typically used for the icon.
|
|
77
|
+
* @slot postfix - The slot for the content after the text, typically used for the badge or chip.
|
|
75
78
|
*/
|
|
76
79
|
class Tab extends IconNameMixin(LifeCycleMixin(Buttonsimple)) {
|
|
77
80
|
constructor() {
|
|
@@ -102,6 +105,7 @@ class Tab extends IconNameMixin(LifeCycleMixin(Buttonsimple)) {
|
|
|
102
105
|
* Dispatch the activechange event.
|
|
103
106
|
*
|
|
104
107
|
* @param active - The active state of the tab.
|
|
108
|
+
* @internal
|
|
105
109
|
*/
|
|
106
110
|
this.handleTabActiveChange = (active) => {
|
|
107
111
|
const event = new CustomEvent('activechange', {
|
|
@@ -186,10 +190,7 @@ class Tab extends IconNameMixin(LifeCycleMixin(Buttonsimple)) {
|
|
|
186
190
|
>`
|
|
187
191
|
: nothing}
|
|
188
192
|
</div>
|
|
189
|
-
<
|
|
190
|
-
<slot name="badge"></slot>
|
|
191
|
-
<slot name="chip"></slot>
|
|
192
|
-
</div>
|
|
193
|
+
<slot name="postfix"></slot>
|
|
193
194
|
</div>
|
|
194
195
|
<div part="indicator"></div>
|
|
195
196
|
`;
|
|
@@ -268,6 +268,9 @@ class TabList extends ListNavigationMixin(CaptureDestroyEventForChildElement(Key
|
|
|
268
268
|
}
|
|
269
269
|
const firstTab = getFirstTab(this.navItems);
|
|
270
270
|
const lastTab = getLastTab(this.navItems);
|
|
271
|
+
if (!firstTab || !lastTab) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
271
274
|
const firstTabLeftEdgePosition = firstTab.getBoundingClientRect().left;
|
|
272
275
|
const tabListLeftEdgePosition = (_b = this.tabsContainer) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().left;
|
|
273
276
|
const lastTabRightEdgePosition = lastTab.getBoundingClientRect().right;
|
|
@@ -45458,6 +45458,24 @@
|
|
|
45458
45458
|
"name": "text"
|
|
45459
45459
|
}
|
|
45460
45460
|
],
|
|
45461
|
+
"slots": [
|
|
45462
|
+
{
|
|
45463
|
+
"description": "The slot for the content before the text, typically used for the icon.",
|
|
45464
|
+
"name": "prefix"
|
|
45465
|
+
},
|
|
45466
|
+
{
|
|
45467
|
+
"description": "The slot for the content after the text, typically used for the badge or chip.",
|
|
45468
|
+
"name": "postfix"
|
|
45469
|
+
},
|
|
45470
|
+
{
|
|
45471
|
+
"description": "Text label of the button.",
|
|
45472
|
+
"name": "",
|
|
45473
|
+
"inheritedFrom": {
|
|
45474
|
+
"name": "Buttonsimple",
|
|
45475
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
|
45476
|
+
}
|
|
45477
|
+
}
|
|
45478
|
+
],
|
|
45461
45479
|
"members": [
|
|
45462
45480
|
{
|
|
45463
45481
|
"kind": "field",
|
|
@@ -45586,18 +45604,6 @@
|
|
|
45586
45604
|
"module": "components/buttonsimple/buttonsimple.component.js"
|
|
45587
45605
|
}
|
|
45588
45606
|
},
|
|
45589
|
-
{
|
|
45590
|
-
"kind": "field",
|
|
45591
|
-
"name": "handleTabActiveChange",
|
|
45592
|
-
"privacy": "private",
|
|
45593
|
-
"description": "Dispatch the activechange event.",
|
|
45594
|
-
"parameters": [
|
|
45595
|
-
{
|
|
45596
|
-
"description": "The active state of the tab.",
|
|
45597
|
-
"name": "active"
|
|
45598
|
-
}
|
|
45599
|
-
]
|
|
45600
|
-
},
|
|
45601
45607
|
{
|
|
45602
45608
|
"kind": "field",
|
|
45603
45609
|
"name": "iconName",
|
|
@@ -46098,18 +46104,8 @@
|
|
|
46098
46104
|
"module": "/src/components/buttonsimple/buttonsimple.component"
|
|
46099
46105
|
},
|
|
46100
46106
|
"tagName": "mdc-tab",
|
|
46101
|
-
"jsDoc": "/**\n * `mdc-tab` is Tab component to be used within the Tabgroup.\n *\n * Passing in the attribute `text` to the tab component is changing the text displayed in the tab.\n *\n * Pass attribute `tabid` when using inside of `tablist` component.\n *\n * The `slot=\"badge\"` can be used to add a badge to the tab.\n *\n * The `slot=\"chip\"` can be used to add a chip to the tab.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * Note: Icons can be used in conjunction with badges or chips.\n * Badges and chips should not be used at the same time.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the tab is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the tab.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the tab.\n * @event focus - (React: onFocus) This event is dispatched when the tab receives focus.\n * @event activechange - (React: onActiveChange) This event is dispatched when the active state of the tab changes\n * <br />\n * Event Data: `detail: { tabId: this.tabId, active }`\n * <br />\n * Note: the activechange event is used by the tab list component to react to the change in state of the tab,\n * so this event won't be needed if the tab list is used.\n *\n * @tagname mdc-tab\n *\n * @cssproperty --mdc-tab-height - The height of the tab.\n * @cssproperty --mdc-tab-padding-left - The left padding of the tab.\n * @cssproperty --mdc-tab-padding-right - The right padding of the tab.\n * @cssproperty --mdc-tab-content-gap - The gap between the icon and text in the tab.\n * @cssproperty --mdc-tab-background-color - The background color of the tab.\n * @cssproperty --mdc-tab-color - The text color of the tab.\n * @cssproperty --mdc-tab-border-radius - The border radius of the tab.\n * @cssproperty --mdc-tab-content-justification - The justification of the content in the tab.\n *\n * @cssproperty --mdc-tab-line-active-indicator-height - The height of the active indicator line.\n * @cssproperty --mdc-tab-line-active-indicator-width - The width of the active indicator line.\n *\n * @cssproperty --mdc-tab-line-border-bottom-left-radius - The border bottom left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-bottom-right-radius - The border bottom right radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.\n *\n * @csspart container - The container of the tab.\n * @csspart regular-icon - The icon of the tab, if inactive.\n * @csspart filled-icon - The icon of the tab, if active.\n * @csspart indicator - The indicator of the tab.\n * @csspart text - The text of the tab.\n */",
|
|
46102
|
-
"customElement": true
|
|
46103
|
-
"slots": [
|
|
46104
|
-
{
|
|
46105
|
-
"description": "Text label of the button.",
|
|
46106
|
-
"name": "",
|
|
46107
|
-
"inheritedFrom": {
|
|
46108
|
-
"name": "Buttonsimple",
|
|
46109
|
-
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
|
46110
|
-
}
|
|
46111
|
-
}
|
|
46112
|
-
]
|
|
46107
|
+
"jsDoc": "/**\n * `mdc-tab` is Tab component to be used within the Tabgroup.\n *\n * Passing in the attribute `text` to the tab component is changing the text displayed in the tab.\n *\n * Pass attribute `tabid` when using inside of `tablist` component.\n *\n * The `slot=\"badge\"` can be used to add a badge to the tab.\n *\n * The `slot=\"chip\"` can be used to add a chip to the tab.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * Note: Icons can be used in conjunction with badges or chips.\n * Badges and chips should not be used at the same time.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the tab is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the tab.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the tab.\n * @event focus - (React: onFocus) This event is dispatched when the tab receives focus.\n * @event activechange - (React: onActiveChange) This event is dispatched when the active state of the tab changes\n * <br />\n * Event Data: `detail: { tabId: this.tabId, active }`\n * <br />\n * Note: the activechange event is used by the tab list component to react to the change in state of the tab,\n * so this event won't be needed if the tab list is used.\n *\n * @tagname mdc-tab\n *\n * @cssproperty --mdc-tab-height - The height of the tab.\n * @cssproperty --mdc-tab-padding-left - The left padding of the tab.\n * @cssproperty --mdc-tab-padding-right - The right padding of the tab.\n * @cssproperty --mdc-tab-content-gap - The gap between the icon and text in the tab.\n * @cssproperty --mdc-tab-background-color - The background color of the tab.\n * @cssproperty --mdc-tab-color - The text color of the tab.\n * @cssproperty --mdc-tab-border-radius - The border radius of the tab.\n * @cssproperty --mdc-tab-content-justification - The justification of the content in the tab.\n *\n * @cssproperty --mdc-tab-line-active-indicator-height - The height of the active indicator line.\n * @cssproperty --mdc-tab-line-active-indicator-width - The width of the active indicator line.\n *\n * @cssproperty --mdc-tab-line-border-bottom-left-radius - The border bottom left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-bottom-right-radius - The border bottom right radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.\n *\n * @csspart container - The container of the tab.\n * @csspart regular-icon - The icon of the tab, if inactive.\n * @csspart filled-icon - The icon of the tab, if active.\n * @csspart indicator - The indicator of the tab.\n * @csspart text - The text of the tab.\n *\n * @slot prefix - The slot for the content before the text, typically used for the icon.\n * @slot postfix - The slot for the content after the text, typically used for the badge or chip.\n */",
|
|
46108
|
+
"customElement": true
|
|
46113
46109
|
}
|
|
46114
46110
|
],
|
|
46115
46111
|
"exports": [
|
|
@@ -56,6 +56,9 @@ import type { Events as EventsInherited } from '../../components/buttonsimple/bu
|
|
|
56
56
|
* @csspart filled-icon - The icon of the tab, if active.
|
|
57
57
|
* @csspart indicator - The indicator of the tab.
|
|
58
58
|
* @csspart text - The text of the tab.
|
|
59
|
+
*
|
|
60
|
+
* @slot prefix - The slot for the content before the text, typically used for the icon.
|
|
61
|
+
* @slot postfix - The slot for the content after the text, typically used for the badge or chip.
|
|
59
62
|
*/
|
|
60
63
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
|
61
64
|
onActiveChange: EventName<Events["onActiveChangeEvent"]>;
|
package/dist/react/tab/index.js
CHANGED
|
@@ -56,6 +56,9 @@ import { TAG_NAME } from '../../components/tab/tab.constants';
|
|
|
56
56
|
* @csspart filled-icon - The icon of the tab, if active.
|
|
57
57
|
* @csspart indicator - The indicator of the tab.
|
|
58
58
|
* @csspart text - The text of the tab.
|
|
59
|
+
*
|
|
60
|
+
* @slot prefix - The slot for the content before the text, typically used for the icon.
|
|
61
|
+
* @slot postfix - The slot for the content after the text, typically used for the badge or chip.
|
|
59
62
|
*/
|
|
60
63
|
const reactWrapper = createComponent({
|
|
61
64
|
tagName: TAG_NAME,
|