@momentum-design/components 0.18.5 → 0.18.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 +460 -113
- package/dist/browser/index.js.map +4 -4
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +3 -3
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +3 -3
- package/dist/components/formfieldwrapper/formfieldwrapper.utils.js +4 -4
- package/dist/components/iconprovider/iconprovider.constants.js +2 -1
- package/dist/components/input/index.d.ts +10 -0
- package/dist/components/input/index.js +7 -0
- package/dist/components/input/input.component.d.ts +208 -0
- package/dist/components/input/input.component.js +401 -0
- package/dist/components/input/input.constants.d.ts +25 -0
- package/dist/components/input/input.constants.js +29 -0
- package/dist/components/input/input.styles.d.ts +2 -0
- package/dist/components/input/input.styles.js +118 -0
- package/dist/components/input/input.types.d.ts +4 -0
- package/dist/components/input/input.types.js +1 -0
- package/dist/components/toggle/index.d.ts +8 -0
- package/dist/components/toggle/index.js +5 -0
- package/dist/components/toggle/toggle.component.d.ts +84 -0
- package/dist/components/toggle/toggle.component.js +166 -0
- package/dist/components/toggle/toggle.constants.d.ts +17 -0
- package/dist/components/toggle/toggle.constants.js +18 -0
- package/dist/components/toggle/toggle.styles.d.ts +2 -0
- package/dist/components/toggle/toggle.styles.js +148 -0
- package/dist/components/toggle/toggle.types.d.ts +4 -0
- package/dist/components/toggle/toggle.types.js +1 -0
- package/dist/custom-elements.json +2329 -1013
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +3 -1
- package/dist/react/input/index.d.ts +39 -0
- package/dist/react/input/index.js +48 -0
- package/dist/react/toggle/index.d.ts +34 -0
- package/dist/react/toggle/index.js +43 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -10,8 +10,10 @@ import Bullet from './components/bullet';
|
|
10
10
|
import Marker from './components/marker';
|
11
11
|
import Divider from './components/divider';
|
12
12
|
import AvatarButton from './components/avatarbutton';
|
13
|
+
import Input from './components/input';
|
13
14
|
import Link from './components/link';
|
15
|
+
import Toggle from './components/toggle';
|
14
16
|
import Checkbox from './components/checkbox';
|
15
17
|
import type { TextType } from './components/text/text.types';
|
16
|
-
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Link, Checkbox, };
|
18
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Toggle, Checkbox, };
|
17
19
|
export type { TextType, };
|
package/dist/index.js
CHANGED
@@ -10,6 +10,8 @@ import Bullet from './components/bullet';
|
|
10
10
|
import Marker from './components/marker';
|
11
11
|
import Divider from './components/divider';
|
12
12
|
import AvatarButton from './components/avatarbutton';
|
13
|
+
import Input from './components/input';
|
13
14
|
import Link from './components/link';
|
15
|
+
import Toggle from './components/toggle';
|
14
16
|
import Checkbox from './components/checkbox';
|
15
|
-
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Link, Checkbox, };
|
17
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, AvatarButton, Input, Link, Toggle, Checkbox, };
|
package/dist/react/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as Avatar } from './avatar';
|
2
|
-
export { default as AvatarButton } from './avatarbutton';
|
3
2
|
export { default as Badge } from './badge';
|
3
|
+
export { default as AvatarButton } from './avatarbutton';
|
4
4
|
export { default as Bullet } from './bullet';
|
5
5
|
export { default as Button } from './button';
|
6
6
|
export { default as Buttonsimple } from './buttonsimple';
|
@@ -9,9 +9,11 @@ export { default as Divider } from './divider';
|
|
9
9
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
10
10
|
export { default as Icon } from './icon';
|
11
11
|
export { default as IconProvider } from './iconprovider';
|
12
|
+
export { default as Input } from './input';
|
12
13
|
export { default as Link } from './link';
|
13
14
|
export { default as Marker } from './marker';
|
14
15
|
export { default as Modalcontainer } from './modalcontainer';
|
15
16
|
export { default as Presence } from './presence';
|
16
17
|
export { default as Text } from './text';
|
17
18
|
export { default as ThemeProvider } from './themeprovider';
|
19
|
+
export { default as Toggle } from './toggle';
|
package/dist/react/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as Avatar } from './avatar';
|
2
|
-
export { default as AvatarButton } from './avatarbutton';
|
3
2
|
export { default as Badge } from './badge';
|
3
|
+
export { default as AvatarButton } from './avatarbutton';
|
4
4
|
export { default as Bullet } from './bullet';
|
5
5
|
export { default as Button } from './button';
|
6
6
|
export { default as Buttonsimple } from './buttonsimple';
|
@@ -9,9 +9,11 @@ export { default as Divider } from './divider';
|
|
9
9
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
10
10
|
export { default as Icon } from './icon';
|
11
11
|
export { default as IconProvider } from './iconprovider';
|
12
|
+
export { default as Input } from './input';
|
12
13
|
export { default as Link } from './link';
|
13
14
|
export { default as Marker } from './marker';
|
14
15
|
export { default as Modalcontainer } from './modalcontainer';
|
15
16
|
export { default as Presence } from './presence';
|
16
17
|
export { default as Text } from './text';
|
17
18
|
export { default as ThemeProvider } from './themeprovider';
|
19
|
+
export { default as Toggle } from './toggle';
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import Component from '../../components/input';
|
2
|
+
/**
|
3
|
+
* mdc-input is a component that allows users to input text.
|
4
|
+
* It contains:
|
5
|
+
* - label field - describe the input field.
|
6
|
+
* - input field - contains the value
|
7
|
+
* - help text or validation message - displayed below the input field.
|
8
|
+
* - trailing button - it displays a clear the input field.
|
9
|
+
* - prefix text - displayed before the input field.
|
10
|
+
* - leading icon - displayed before the input field.
|
11
|
+
* - clear-aria-label - aria label for the trailing button.
|
12
|
+
* - all the attributes of the input field.
|
13
|
+
*
|
14
|
+
* @tagname mdc-input
|
15
|
+
*
|
16
|
+
* @dependency mdc-icon
|
17
|
+
* @dependency mdc-text
|
18
|
+
* @dependency mdc-button
|
19
|
+
*
|
20
|
+
* @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
|
21
|
+
* @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
|
22
|
+
* @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled
|
23
|
+
* @cssproperty --mdc-input-border-color - Border color for the input container
|
24
|
+
* @cssproperty --mdc-input-text-color - Text color for the input field
|
25
|
+
* @cssproperty --mdc-input-background-color - Background color for the input field
|
26
|
+
* @cssproperty --mdc-input-selection-background-color - Background color for the selected text
|
27
|
+
* @cssproperty --mdc-input-selection-text-color - Text color for the selected text
|
28
|
+
* @cssproperty --mdc-input-support-text-color - Text color for the help text
|
29
|
+
* @cssproperty --mdc-input-hover-background-color - Background color for the input field when hovered
|
30
|
+
* @cssproperty --mdc-input-focused-background-color - Background color for the input field when focused
|
31
|
+
* @cssproperty --mdc-input-focused-border-color - Border color for the input container when focused
|
32
|
+
* @cssproperty --mdc-input-error-border-color - Border color for the input container when error
|
33
|
+
* @cssproperty --mdc-input-warning-border-color - Border color for the input container when warning
|
34
|
+
* @cssproperty --mdc-input-success-border-color - Border color for the input container when success
|
35
|
+
* @cssproperty --mdc-input-primary-border-color - Border color for the input container when primary
|
36
|
+
*
|
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/input';
|
4
|
+
import { TAG_NAME } from '../../components/input/input.constants';
|
5
|
+
/**
|
6
|
+
* mdc-input is a component that allows users to input text.
|
7
|
+
* It contains:
|
8
|
+
* - label field - describe the input field.
|
9
|
+
* - input field - contains the value
|
10
|
+
* - help text or validation message - displayed below the input field.
|
11
|
+
* - trailing button - it displays a clear the input field.
|
12
|
+
* - prefix text - displayed before the input field.
|
13
|
+
* - leading icon - displayed before the input field.
|
14
|
+
* - clear-aria-label - aria label for the trailing button.
|
15
|
+
* - all the attributes of the input field.
|
16
|
+
*
|
17
|
+
* @tagname mdc-input
|
18
|
+
*
|
19
|
+
* @dependency mdc-icon
|
20
|
+
* @dependency mdc-text
|
21
|
+
* @dependency mdc-button
|
22
|
+
*
|
23
|
+
* @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
|
24
|
+
* @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
|
25
|
+
* @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled
|
26
|
+
* @cssproperty --mdc-input-border-color - Border color for the input container
|
27
|
+
* @cssproperty --mdc-input-text-color - Text color for the input field
|
28
|
+
* @cssproperty --mdc-input-background-color - Background color for the input field
|
29
|
+
* @cssproperty --mdc-input-selection-background-color - Background color for the selected text
|
30
|
+
* @cssproperty --mdc-input-selection-text-color - Text color for the selected text
|
31
|
+
* @cssproperty --mdc-input-support-text-color - Text color for the help text
|
32
|
+
* @cssproperty --mdc-input-hover-background-color - Background color for the input field when hovered
|
33
|
+
* @cssproperty --mdc-input-focused-background-color - Background color for the input field when focused
|
34
|
+
* @cssproperty --mdc-input-focused-border-color - Border color for the input container when focused
|
35
|
+
* @cssproperty --mdc-input-error-border-color - Border color for the input container when error
|
36
|
+
* @cssproperty --mdc-input-warning-border-color - Border color for the input container when warning
|
37
|
+
* @cssproperty --mdc-input-success-border-color - Border color for the input container when success
|
38
|
+
* @cssproperty --mdc-input-primary-border-color - Border color for the input container when primary
|
39
|
+
*
|
40
|
+
*/
|
41
|
+
const reactWrapper = createComponent({
|
42
|
+
tagName: TAG_NAME,
|
43
|
+
elementClass: Component,
|
44
|
+
react: React,
|
45
|
+
events: {},
|
46
|
+
displayName: 'Input',
|
47
|
+
});
|
48
|
+
export default reactWrapper;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import Component from '../../components/toggle';
|
2
|
+
/**
|
3
|
+
* Toggle Component is an interactive control used to switch between two mutually exclusive options,
|
4
|
+
* such as On/Off, Active/Inactive. These are commonly used in settings panels, forms, and preference selections
|
5
|
+
* where users need to enable or disable a feature.
|
6
|
+
* It contains an optional label and an optional helper text.
|
7
|
+
*
|
8
|
+
* Note: It internally renders a checkbox styled as a toggle switch.
|
9
|
+
*
|
10
|
+
* @dependency mdc-icon
|
11
|
+
*
|
12
|
+
* @tagname mdc-toggle
|
13
|
+
*
|
14
|
+
* @cssproperty --mdc-toggle-width - width of the toggle
|
15
|
+
* @cssproperty --mdc-toggle-height - height of the toggle
|
16
|
+
* @cssproperty --mdc-toggle-width-compact - width of the toggle when it's size is compact
|
17
|
+
* @cssproperty --mdc-toggle-height-compact - height of the toggle when it's size is compact
|
18
|
+
* @cssproperty --mdc-toggle-border-radius - border radius of the toggle
|
19
|
+
* @cssproperty --mdc-toggle-border-radius-compact - border radius of the toggle when it's size is compact
|
20
|
+
* @cssproperty --mdc-toggle-border - border of the toggle
|
21
|
+
* @cssproperty --mdc-toggle-inactive-rest-color - background color of the inactive toggle in rest state
|
22
|
+
* @cssproperty --mdc-toggle-inactive-hover-color - background color of the inactive toggle in hover state
|
23
|
+
* @cssproperty --mdc-toggle-inactive-pressed-color - background color of the inactive toggle in pressed state
|
24
|
+
* @cssproperty --mdc-toggle-inactive-disabled-color - background color of the inactive toggle in disabled state
|
25
|
+
* @cssproperty --mdc-toggle-active-rest-color - background color of the active toggle in rest state
|
26
|
+
* @cssproperty --mdc-toggle-active-hover-color - background color of the active toggle in hover state
|
27
|
+
* @cssproperty --mdc-toggle-active-pressed-color - background color of the active toggle in pressed state
|
28
|
+
* @cssproperty --mdc-toggle-active-disabled-color - background color of the active toggle in disabled state
|
29
|
+
* @cssproperty --mdc-toggle-help-text-color - color of the help text label
|
30
|
+
* @cssproperty --mdc-toggle-label-color-disabled - color of the toggle label and help text in disabled state
|
31
|
+
*
|
32
|
+
*/
|
33
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
34
|
+
export default reactWrapper;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/toggle';
|
4
|
+
import { TAG_NAME } from '../../components/toggle/toggle.constants';
|
5
|
+
/**
|
6
|
+
* Toggle Component is an interactive control used to switch between two mutually exclusive options,
|
7
|
+
* such as On/Off, Active/Inactive. These are commonly used in settings panels, forms, and preference selections
|
8
|
+
* where users need to enable or disable a feature.
|
9
|
+
* It contains an optional label and an optional helper text.
|
10
|
+
*
|
11
|
+
* Note: It internally renders a checkbox styled as a toggle switch.
|
12
|
+
*
|
13
|
+
* @dependency mdc-icon
|
14
|
+
*
|
15
|
+
* @tagname mdc-toggle
|
16
|
+
*
|
17
|
+
* @cssproperty --mdc-toggle-width - width of the toggle
|
18
|
+
* @cssproperty --mdc-toggle-height - height of the toggle
|
19
|
+
* @cssproperty --mdc-toggle-width-compact - width of the toggle when it's size is compact
|
20
|
+
* @cssproperty --mdc-toggle-height-compact - height of the toggle when it's size is compact
|
21
|
+
* @cssproperty --mdc-toggle-border-radius - border radius of the toggle
|
22
|
+
* @cssproperty --mdc-toggle-border-radius-compact - border radius of the toggle when it's size is compact
|
23
|
+
* @cssproperty --mdc-toggle-border - border of the toggle
|
24
|
+
* @cssproperty --mdc-toggle-inactive-rest-color - background color of the inactive toggle in rest state
|
25
|
+
* @cssproperty --mdc-toggle-inactive-hover-color - background color of the inactive toggle in hover state
|
26
|
+
* @cssproperty --mdc-toggle-inactive-pressed-color - background color of the inactive toggle in pressed state
|
27
|
+
* @cssproperty --mdc-toggle-inactive-disabled-color - background color of the inactive toggle in disabled state
|
28
|
+
* @cssproperty --mdc-toggle-active-rest-color - background color of the active toggle in rest state
|
29
|
+
* @cssproperty --mdc-toggle-active-hover-color - background color of the active toggle in hover state
|
30
|
+
* @cssproperty --mdc-toggle-active-pressed-color - background color of the active toggle in pressed state
|
31
|
+
* @cssproperty --mdc-toggle-active-disabled-color - background color of the active toggle in disabled state
|
32
|
+
* @cssproperty --mdc-toggle-help-text-color - color of the help text label
|
33
|
+
* @cssproperty --mdc-toggle-label-color-disabled - color of the toggle label and help text in disabled state
|
34
|
+
*
|
35
|
+
*/
|
36
|
+
const reactWrapper = createComponent({
|
37
|
+
tagName: TAG_NAME,
|
38
|
+
elementClass: Component,
|
39
|
+
react: React,
|
40
|
+
events: {},
|
41
|
+
displayName: 'Toggle',
|
42
|
+
});
|
43
|
+
export default reactWrapper;
|
package/package.json
CHANGED