@universal-material/web 3.0.10 → 3.0.11
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/button/button-base.d.ts +43 -0
- package/button/button-base.d.ts.map +1 -0
- package/button/button-base.js +152 -0
- package/button/button-base.js.map +1 -0
- package/button/button-base.styles.d.ts +2 -0
- package/button/button-base.styles.d.ts.map +1 -0
- package/button/button-base.styles.js +75 -0
- package/button/button-base.styles.js.map +1 -0
- package/button/button-set.d.ts +20 -0
- package/button/button-set.d.ts.map +1 -0
- package/button/button-set.js +38 -0
- package/button/button-set.js.map +1 -0
- package/button/button-set.styles.d.ts +2 -0
- package/button/button-set.styles.d.ts.map +1 -0
- package/button/button-set.styles.js +39 -0
- package/button/button-set.styles.js.map +1 -0
- package/button/button.d.ts +34 -0
- package/button/button.d.ts.map +1 -0
- package/button/button.js +64 -0
- package/button/button.js.map +1 -0
- package/button/button.styles.d.ts +2 -0
- package/button/button.styles.d.ts.map +1 -0
- package/button/button.styles.js +96 -0
- package/button/button.styles.js.map +1 -0
- package/button/fab.d.ts +31 -0
- package/button/fab.d.ts.map +1 -0
- package/button/fab.js +63 -0
- package/button/fab.js.map +1 -0
- package/button/fab.styles.d.ts +2 -0
- package/button/fab.styles.d.ts.map +1 -0
- package/button/fab.styles.js +89 -0
- package/button/fab.styles.js.map +1 -0
- package/button/icon-button.d.ts +35 -0
- package/button/icon-button.d.ts.map +1 -0
- package/button/icon-button.js +79 -0
- package/button/icon-button.js.map +1 -0
- package/button/icon-button.styles.d.ts +2 -0
- package/button/icon-button.styles.d.ts.map +1 -0
- package/button/icon-button.styles.js +70 -0
- package/button/icon-button.styles.js.map +1 -0
- package/card/card-content.d.ts +13 -0
- package/card/card-content.d.ts.map +1 -0
- package/card/card-content.js +44 -0
- package/card/card-content.js.map +1 -0
- package/card/card-content.styles.d.ts +2 -0
- package/card/card-content.styles.d.ts.map +1 -0
- package/card/card-content.styles.js +15 -0
- package/card/card-content.styles.js.map +1 -0
- package/card/card-media.d.ts +12 -0
- package/card/card-media.d.ts.map +1 -0
- package/card/card-media.js +29 -0
- package/card/card-media.js.map +1 -0
- package/card/card-media.styles.d.ts +2 -0
- package/card/card-media.styles.d.ts.map +1 -0
- package/card/card-media.styles.js +13 -0
- package/card/card-media.styles.js.map +1 -0
- package/card/card.d.ts +19 -0
- package/card/card.d.ts.map +1 -0
- package/card/card.js +40 -0
- package/card/card.js.map +1 -0
- package/card/card.styles.d.ts +2 -0
- package/card/card.styles.d.ts.map +1 -0
- package/card/card.styles.js +28 -0
- package/card/card.styles.js.map +1 -0
- package/checkbox/checkbox.d.ts +16 -0
- package/checkbox/checkbox.d.ts.map +1 -0
- package/checkbox/checkbox.js +75 -0
- package/checkbox/checkbox.js.map +1 -0
- package/container/container.d.ts +13 -0
- package/container/container.d.ts.map +1 -0
- package/container/container.js +23 -0
- package/container/container.js.map +1 -0
- package/container/container.styles.d.ts +2 -0
- package/container/container.styles.d.ts.map +1 -0
- package/container/container.styles.js +43 -0
- package/container/container.styles.js.map +1 -0
- package/custom-elements.json +3706 -0
- package/divider/divider.d.ts +14 -0
- package/divider/divider.d.ts.map +1 -0
- package/divider/divider.js +27 -0
- package/divider/divider.js.map +1 -0
- package/divider/divider.styles.d.ts +2 -0
- package/divider/divider.styles.d.ts.map +1 -0
- package/divider/divider.styles.js +15 -0
- package/divider/divider.styles.js.map +1 -0
- package/elevation/elevation.d.ts +11 -0
- package/elevation/elevation.d.ts.map +1 -0
- package/elevation/elevation.js +21 -0
- package/elevation/elevation.js.map +1 -0
- package/elevation/elevation.styles.d.ts +2 -0
- package/elevation/elevation.styles.d.ts.map +1 -0
- package/elevation/elevation.styles.js +28 -0
- package/elevation/elevation.styles.js.map +1 -0
- package/index.d.ts +27 -0
- package/index.d.ts.map +1 -0
- package/{src/index.ts → index.js} +1 -1
- package/index.js.map +1 -0
- package/package.json +1 -1
- package/ripple/ripple.d.ts +25 -0
- package/ripple/ripple.d.ts.map +1 -0
- package/ripple/ripple.js +119 -0
- package/ripple/ripple.js.map +1 -0
- package/ripple/ripple.styles.d.ts +2 -0
- package/ripple/ripple.styles.d.ts.map +1 -0
- package/ripple/ripple.styles.js +74 -0
- package/ripple/ripple.styles.js.map +1 -0
- package/shared/base.styles.d.ts +2 -0
- package/shared/base.styles.d.ts.map +1 -0
- package/shared/base.styles.js +9 -0
- package/shared/base.styles.js.map +1 -0
- package/table/table-body.d.ts +11 -0
- package/table/table-body.d.ts.map +1 -0
- package/table/table-body.js +21 -0
- package/table/table-body.js.map +1 -0
- package/table/table-body.styles.d.ts +2 -0
- package/table/table-body.styles.d.ts.map +1 -0
- package/table/table-body.styles.js +11 -0
- package/table/table-body.styles.js.map +1 -0
- package/table/table-cell.d.ts +11 -0
- package/table/table-cell.d.ts.map +1 -0
- package/table/table-cell.js +21 -0
- package/table/table-cell.js.map +1 -0
- package/table/table-cell.styles.d.ts +2 -0
- package/table/table-cell.styles.d.ts.map +1 -0
- package/table/table-cell.styles.js +11 -0
- package/table/table-cell.styles.js.map +1 -0
- package/table/table-head.d.ts +11 -0
- package/table/table-head.d.ts.map +1 -0
- package/table/table-head.js +21 -0
- package/table/table-head.js.map +1 -0
- package/table/table-head.styles.d.ts +2 -0
- package/table/table-head.styles.d.ts.map +1 -0
- package/table/table-head.styles.js +11 -0
- package/table/table-head.styles.js.map +1 -0
- package/table/table-header-cell.d.ts +11 -0
- package/table/table-header-cell.d.ts.map +1 -0
- package/table/table-header-cell.js +21 -0
- package/table/table-header-cell.js.map +1 -0
- package/table/table-header-cell.styles.d.ts +2 -0
- package/table/table-header-cell.styles.d.ts.map +1 -0
- package/table/table-header-cell.styles.js +12 -0
- package/table/table-header-cell.styles.js.map +1 -0
- package/table/table-row.d.ts +11 -0
- package/table/table-row.d.ts.map +1 -0
- package/table/table-row.js +21 -0
- package/table/table-row.js.map +1 -0
- package/table/table-row.styles.d.ts +2 -0
- package/table/table-row.styles.d.ts.map +1 -0
- package/table/table-row.styles.js +7 -0
- package/table/table-row.styles.js.map +1 -0
- package/table/table.d.ts +16 -0
- package/table/table.d.ts.map +1 -0
- package/{src/table/table.ts → table/table.js} +6 -15
- package/table/table.js.map +1 -0
- package/table/table.styles.d.ts +2 -0
- package/table/table.styles.d.ts.map +1 -0
- package/table/table.styles.js +16 -0
- package/table/table.styles.js.map +1 -0
- package/theme/color.d.ts +7 -0
- package/theme/color.d.ts.map +1 -0
- package/theme/color.js +2 -0
- package/theme/color.js.map +1 -0
- package/theme/css-var-builder.d.ts +9 -0
- package/theme/css-var-builder.d.ts.map +1 -0
- package/theme/css-var-builder.js +25 -0
- package/theme/css-var-builder.js.map +1 -0
- package/theme/index.d.ts +2 -0
- package/theme/index.d.ts.map +1 -0
- package/{src/theme/index.ts → theme/index.js} +1 -0
- package/theme/index.js.map +1 -0
- package/theme/neutral-colors.d.ts +4 -0
- package/theme/neutral-colors.d.ts.map +1 -0
- package/theme/neutral-colors.js +19 -0
- package/theme/neutral-colors.js.map +1 -0
- package/theme/rgb-color.d.ts +9 -0
- package/theme/rgb-color.d.ts.map +1 -0
- package/theme/rgb-color.js +13 -0
- package/theme/rgb-color.js.map +1 -0
- package/theme/theme-builder.d.ts +27 -0
- package/theme/theme-builder.d.ts.map +1 -0
- package/theme/theme-builder.js +146 -0
- package/theme/theme-builder.js.map +1 -0
- package/{src/theme/theme-color.ts → theme/theme-color.d.ts} +2 -3
- package/theme/theme-color.d.ts.map +1 -0
- package/theme/theme-color.js +2 -0
- package/theme/theme-color.js.map +1 -0
- package/.editorconfig +0 -8
- package/.eleventy.cjs +0 -21
- package/.eslintignore +0 -6
- package/.eslintrc.json +0 -98
- package/.prettierrc.json +0 -7
- package/.vscode/extensions.json +0 -9
- package/CHANGELOG.md +0 -98
- package/LICENSE +0 -28
- package/docs/.nojekyll +0 -0
- package/docs/api/index.html +0 -149
- package/docs/docs.css +0 -185
- package/docs/examples/index.html +0 -75
- package/docs/examples/name-property/index.html +0 -65
- package/docs/index.html +0 -75
- package/docs/install/index.html +0 -53
- package/docs/prism-okaidia.css +0 -123
- package/docs/src/_api-section.pug +0 -27
- package/docs/src/_layout.pug +0 -182
- package/docs/src/components/button-set/alignment.html +0 -29
- package/docs/src/components/button-set/stack.html +0 -5
- package/docs/src/components/button-set/usage.html +0 -35
- package/docs/src/components/button-set.pug +0 -16
- package/docs/src/components/cards/card-media.html +0 -39
- package/docs/src/components/cards/card-with-actions.html +0 -38
- package/docs/src/components/cards/simple-card.html +0 -3
- package/docs/src/components/cards.pug +0 -15
- package/docs/src/components/checkbox/usage.html +0 -33
- package/docs/src/components/checkbox.pug +0 -7
- package/docs/src/components/chips/chip-input.html +0 -73
- package/docs/src/components/chips/default-chips.html +0 -25
- package/docs/src/components/chips/elevated-chips.html +0 -25
- package/docs/src/components/chips/selected-chips.html +0 -50
- package/docs/src/components/chips.pug +0 -16
- package/docs/src/components/common-buttons/anchor-buttons.html +0 -6
- package/docs/src/components/common-buttons/buttons-icons.html +0 -24
- package/docs/src/components/common-buttons/buttons-trailing-icons.html +0 -25
- package/docs/src/components/common-buttons/buttons-variants.html +0 -6
- package/docs/src/components/common-buttons/filled-colors.html +0 -4
- package/docs/src/components/common-buttons.pug +0 -22
- package/docs/src/components/data-tables/simple-table.html +0 -47
- package/docs/src/components/data-tables/table-footer.html +0 -59
- package/docs/src/components/data-tables/table-header.html +0 -43
- package/docs/src/components/data-tables.pug +0 -15
- package/docs/src/components/datepicker.pug +0 -133
- package/docs/src/components/dialogs/example.html +0 -44
- package/docs/src/components/dialogs.pug +0 -19
- package/docs/src/components/dividers/no-margin.html +0 -7
- package/docs/src/components/dividers/usage.html +0 -7
- package/docs/src/components/dividers.pug +0 -13
- package/docs/src/components/dropdown-menus/down-end.html +0 -10
- package/docs/src/components/dropdown-menus/down-left.html +0 -10
- package/docs/src/components/dropdown-menus/down-right.html +0 -10
- package/docs/src/components/dropdown-menus/down-start.html +0 -10
- package/docs/src/components/dropdown-menus/down.html +0 -10
- package/docs/src/components/dropdown-menus/up-end.html +0 -10
- package/docs/src/components/dropdown-menus/up-left.html +0 -10
- package/docs/src/components/dropdown-menus/up-right.html +0 -10
- package/docs/src/components/dropdown-menus/up-start.html +0 -10
- package/docs/src/components/dropdown-menus/up.html +0 -10
- package/docs/src/components/expansion-panel.pug +0 -33
- package/docs/src/components/fab/button-colors.html +0 -18
- package/docs/src/components/fab/button-sizes.html +0 -11
- package/docs/src/components/fab/extended-buttons.html +0 -18
- package/docs/src/components/fab/floating-action-area.html +0 -5
- package/docs/src/components/fab/floating-menu.html +0 -10
- package/docs/src/components/fab/lowered-buttons.html +0 -6
- package/docs/src/components/fab.pug +0 -25
- package/docs/src/components/icon-buttons/anchor-buttons.html +0 -15
- package/docs/src/components/icon-buttons/buttons-variants.html +0 -15
- package/docs/src/components/icon-buttons/toggle-buttons-manual.html +0 -44
- package/docs/src/components/icon-buttons/toggle-buttons.html +0 -48
- package/docs/src/components/icon-buttons.pug +0 -18
- package/docs/src/components/lists/list-avatars.html +0 -14
- package/docs/src/components/lists/list-custom-dividers.html +0 -23
- package/docs/src/components/lists/list-dividers.html +0 -17
- package/docs/src/components/lists/list-dynamic.html +0 -26
- package/docs/src/components/lists/list-hover.html +0 -17
- package/docs/src/components/lists/list-icons.html +0 -17
- package/docs/src/components/lists/list-indexed.html +0 -123
- package/docs/src/components/lists/list-sections.html +0 -16
- package/docs/src/components/lists/list-three-lines.html +0 -20
- package/docs/src/components/lists/list-two-lines.html +0 -20
- package/docs/src/components/lists/list-with-action.html +0 -26
- package/docs/src/components/lists/list-with-activated-item.html +0 -17
- package/docs/src/components/lists/simple-list.html +0 -17
- package/docs/src/components/lists.pug +0 -94
- package/docs/src/components/menus.pug +0 -55
- package/docs/src/components/progress/circular-progress.html +0 -13
- package/docs/src/components/progress/determinate-progress.html +0 -3
- package/docs/src/components/progress/indeterminate-progress.html +0 -3
- package/docs/src/components/progress/progress-color.html +0 -3
- package/docs/src/components/progress.pug +0 -18
- package/docs/src/components/ripple/usage.html +0 -9
- package/docs/src/components/ripple.pug +0 -10
- package/docs/src/components/selection-controls/checkbox.html +0 -22
- package/docs/src/components/selection-controls/radio-button.html +0 -36
- package/docs/src/components/selection-controls/switch.html +0 -12
- package/docs/src/components/selection-controls.pug +0 -13
- package/docs/src/components/sliders/example.html +0 -42
- package/docs/src/components/sliders.pug +0 -7
- package/docs/src/components/snackbar/example.html +0 -35
- package/docs/src/components/snackbars.pug +0 -21
- package/docs/src/components/steppers.pug +0 -57
- package/docs/src/components/tabs/example.html +0 -45
- package/docs/src/components/tabs.pug +0 -8
- package/docs/src/components/text-fields.pug +0 -88
- package/docs/src/components/toolbars/simple-toolbar.html +0 -33
- package/docs/src/components/toolbars.pug +0 -7
- package/docs/src/content/typography/example.html +0 -15
- package/docs/src/content/typography.pug +0 -8
- package/docs/src/css/docs.scss +0 -189
- package/docs/src/index.pug +0 -10
- package/docs/src/js/docs.js +0 -161
- package/docs/src/js/universal-material.js +0 -757
- package/docs/src/js/universal-material.js.map +0 -1
- package/docs/src/js/universal-material.min.js +0 -17
- package/docs/src/js/universal-material.min.js.map +0 -1
- package/docs/src/layout/grid.pug +0 -15
- package/docs/src/utilities/background-colors/common-colors.html +0 -7
- package/docs/src/utilities/background-colors/theme-colors.html +0 -16
- package/docs/src/utilities/background-colors.pug +0 -10
- package/docs/src/utilities/text-and-background-colors/common-colors.html +0 -80
- package/docs/src/utilities/text-and-background-colors/theme-colors.html +0 -208
- package/docs/src/utilities/text-and-background-colors.pug +0 -10
- package/docs/src/utilities/text-colors/common-colors.html +0 -12
- package/docs/src/utilities/text-colors/emphasis-colors.html +0 -26
- package/docs/src/utilities/text-colors/theme-colors.html +0 -37
- package/docs/src/utilities/text-colors.pug +0 -13
- package/gulpfile.js +0 -225
- package/index.html +0 -11
- package/rollup.config.js +0 -42
- package/src/_utils.scss +0 -20
- package/src/_variables.scss +0 -68
- package/src/button/button-base.styles.scss +0 -75
- package/src/button/button-base.ts +0 -147
- package/src/button/button-set.styles.scss +0 -35
- package/src/button/button-set.ts +0 -33
- package/src/button/button.styles.scss +0 -97
- package/src/button/button.ts +0 -64
- package/src/button/fab.styles.scss +0 -90
- package/src/button/fab.ts +0 -55
- package/src/button/icon-button.styles.scss +0 -74
- package/src/button/icon-button.ts +0 -72
- package/src/card/card-content.styles.scss +0 -11
- package/src/card/card-content.ts +0 -45
- package/src/card/card-media.styles.scss +0 -9
- package/src/card/card-media.ts +0 -24
- package/src/card/card.styles.scss +0 -27
- package/src/card/card.ts +0 -37
- package/src/checkbox/checkbox.ts +0 -77
- package/src/container/container.styles.scss +0 -39
- package/src/container/container.ts +0 -24
- package/src/divider/divider.styles.scss +0 -13
- package/src/divider/divider.ts +0 -21
- package/src/elevation/elevation.styles.scss +0 -31
- package/src/elevation/elevation.ts +0 -17
- package/src/ripple/ripple.styles.scss +0 -80
- package/src/ripple/ripple.ts +0 -150
- package/src/shared/base.styles.scss +0 -5
- package/src/table/table-body.styles.scss +0 -9
- package/src/table/table-body.ts +0 -21
- package/src/table/table-cell.styles.scss +0 -9
- package/src/table/table-cell.ts +0 -21
- package/src/table/table-head.styles.scss +0 -9
- package/src/table/table-head.ts +0 -21
- package/src/table/table-header-cell.styles.scss +0 -10
- package/src/table/table-header-cell.ts +0 -21
- package/src/table/table-row.styles.scss +0 -3
- package/src/table/table-row.ts +0 -21
- package/src/table/table.styles.scss +0 -12
- package/src/theme/color.ts +0 -6
- package/src/theme/css-var-builder.ts +0 -36
- package/src/theme/neutral-colors.ts +0 -21
- package/src/theme/rgb-color.ts +0 -19
- package/src/theme/theme-builder.ts +0 -201
- package/tsconfig.json +0 -36
- package/web-dev-server.config.js +0 -25
- package/web-test-runner.config.js +0 -120
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
--_grid-spacing-small: var(--u-spacing-sm, 8px);
|
|
3
|
-
--_grid-spacing-medium: var(--u-spacing-md, 16px);
|
|
4
|
-
--_grid-spacing-large: var(--u-spacing-lg, 24px);
|
|
5
|
-
--_grid-spacing-extra-large: var(--u-spacing-xl, 40px);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:host([margin="none"]) {
|
|
9
|
-
--_container-margin: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:host([margin="small"]) {
|
|
13
|
-
--_container-margin: var(--u-container-margin, var(--_grid-spacing-small));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host([margin="medium"]) {
|
|
17
|
-
--_container-margin: var(--u-container-margin, var(--_grid-spacing-medium));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([margin="large"]) {
|
|
21
|
-
--_container-margin: var(--u-container-margin, var(--_grid-spacing-large));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host([margin="extra-large"]) {
|
|
25
|
-
--_container-margin: var(--u-container-margin, var(--_grid-spacing-extra-large));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host {
|
|
29
|
-
display: block;
|
|
30
|
-
width: 100%;
|
|
31
|
-
max-width: var(--u-container-max-width, 992px);
|
|
32
|
-
margin-inline: auto;
|
|
33
|
-
padding: var(--_container-margin, var(--_grid-spacing-medium));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host::after {
|
|
37
|
-
content: '';
|
|
38
|
-
display: block;
|
|
39
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles } from './container.styles.js';
|
|
5
|
-
|
|
6
|
-
export type UmSpacingSizes = 'none' | 'small' | 'medium ' | 'large' | 'extra-large';
|
|
7
|
-
|
|
8
|
-
@customElement('u-container')
|
|
9
|
-
export class UmContainer extends LitElement {
|
|
10
|
-
|
|
11
|
-
static override styles = styles;
|
|
12
|
-
|
|
13
|
-
@property({reflect: true}) margin: UmSpacingSizes | undefined;
|
|
14
|
-
|
|
15
|
-
override render(): HTMLTemplateResult {
|
|
16
|
-
return html`<slot></slot>`;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare global {
|
|
21
|
-
interface HTMLElementTagNameMap {
|
|
22
|
-
'u-container': UmContainer;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
@import "../utils";
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
--_divider-thickness: var(--u-divider-thickness, 1px);
|
|
5
|
-
display: block;
|
|
6
|
-
margin-block: 8px;
|
|
7
|
-
height: var(--_divider-thickness);
|
|
8
|
-
background-color: var(--u-divider-color, #{get-color-var(outline-variant)});
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host([no-margin]) {
|
|
12
|
-
margin: 0;
|
|
13
|
-
}
|
package/src/divider/divider.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles } from './divider.styles';
|
|
5
|
-
|
|
6
|
-
@customElement('u-divider')
|
|
7
|
-
export class UmDivider extends LitElement {
|
|
8
|
-
|
|
9
|
-
static override styles = styles;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* When true, remove the margin of the divider
|
|
13
|
-
*/
|
|
14
|
-
@property({type: Boolean, attribute: 'no-margin', reflect: true}) noMargin = false;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare global {
|
|
18
|
-
interface HTMLElementTagNameMap {
|
|
19
|
-
'u-divider': UmDivider;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@import "../utils";
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
--_level: var(--u-elevation-level, 0);
|
|
5
|
-
--_shadow-color: #{get-color-var(shadow)};
|
|
6
|
-
|
|
7
|
-
-webkit-tap-highlight-color: transparent;
|
|
8
|
-
position: absolute;
|
|
9
|
-
inset: 0;
|
|
10
|
-
border-radius: inherit;
|
|
11
|
-
pointer-events: none;
|
|
12
|
-
|
|
13
|
-
&::before,
|
|
14
|
-
&::after {
|
|
15
|
-
content: '';
|
|
16
|
-
position: absolute;
|
|
17
|
-
inset: 0;
|
|
18
|
-
border-radius: inherit;
|
|
19
|
-
transition: box-shadow 150ms ease-in-out;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&::before {
|
|
23
|
-
box-shadow: 0 calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0 var(--_shadow-color);
|
|
24
|
-
opacity: .3;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&::after {
|
|
28
|
-
box-shadow: 0 calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);
|
|
29
|
-
opacity: .15;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles } from './elevation.styles';
|
|
5
|
-
|
|
6
|
-
@customElement('u-elevation')
|
|
7
|
-
export class UmElevation extends LitElement {
|
|
8
|
-
static override styles = styles;
|
|
9
|
-
|
|
10
|
-
override ariaHidden = "true";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare global {
|
|
14
|
-
interface HTMLElementTagNameMap {
|
|
15
|
-
'u-elevation': UmElevation;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
@import '../variables';
|
|
2
|
-
|
|
3
|
-
:host,
|
|
4
|
-
.ripple-container::before {
|
|
5
|
-
--_ripple-hover-color: var(--u-ripple-hover-color, var(--u-ripple-color, var(--u-state-layer-color, currentColor)));
|
|
6
|
-
--_ripple-pressed-color: var(--u-ripple-pressed-color, var(--u-ripple-color, var(--u-state-layer-color, currentColor)));
|
|
7
|
-
--_ripple-hover-opacity: var(--u-ripple-pressed-opacity, .08);
|
|
8
|
-
--_ripple-pressed-opacity: var(--u-ripple-pressed-opacity, .2);
|
|
9
|
-
|
|
10
|
-
display: block;
|
|
11
|
-
inset: 0;
|
|
12
|
-
isolation: isolate;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.ripple-container {
|
|
16
|
-
position: relative;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: 100%;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
border-radius: inherit;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ripple-container::before {
|
|
24
|
-
content: '';
|
|
25
|
-
background: var(--_ripple-hover-color);
|
|
26
|
-
opacity: 0;
|
|
27
|
-
transition: opacity 200ms;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@media (hover: hover) {
|
|
31
|
-
:host(:not([disabled]):hover) .ripple-container::before {
|
|
32
|
-
content: '';
|
|
33
|
-
background: var(--_ripple-hover-color);
|
|
34
|
-
opacity: var(--_ripple-hover-opacity);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host,
|
|
39
|
-
.ripple-container::before,
|
|
40
|
-
.ripple {
|
|
41
|
-
position: absolute;
|
|
42
|
-
border-radius: inherit;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.ripple {
|
|
46
|
-
top: 50%;
|
|
47
|
-
left: 50%;
|
|
48
|
-
background: var(--_ripple-pressed-color);
|
|
49
|
-
border-radius: 50%;
|
|
50
|
-
box-shadow: 0 0 64px 64px var(--_ripple-pressed-color);
|
|
51
|
-
opacity: var(--_ripple-pressed-opacity);
|
|
52
|
-
transform: scale3d(0, 0, 1);
|
|
53
|
-
pointer-events: none;
|
|
54
|
-
will-change: transform;
|
|
55
|
-
|
|
56
|
-
&.show {
|
|
57
|
-
transition:
|
|
58
|
-
transform calc(var(--_ripple-transition-duration) / var(--u-ripple-speed, 1)) $awesome-cubic-bezier,
|
|
59
|
-
opacity calc(750ms / var(--u-ripple-speed, 1));
|
|
60
|
-
transform: scale3d(1, 1, 1);
|
|
61
|
-
}
|
|
62
|
-
&.show-forced {
|
|
63
|
-
transition:
|
|
64
|
-
transform calc(var(--_ripple-transition-duration) / var(--u-ripple-speed, 1)) $awesome-cubic-bezier,
|
|
65
|
-
opacity calc(200ms / var(--u-ripple-speed, 1)) 300ms;
|
|
66
|
-
transform: scale3d(2, 2, 1);
|
|
67
|
-
opacity: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&.dismiss {
|
|
71
|
-
opacity: 0;
|
|
72
|
-
transform: scale3d(2, 2, 1);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
::slotted(*) {
|
|
77
|
-
position: absolute !important;
|
|
78
|
-
inset: 0;
|
|
79
|
-
border-radius: inherit;
|
|
80
|
-
}
|
package/src/ripple/ripple.ts
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles } from './ripple.styles';
|
|
5
|
-
|
|
6
|
-
@customElement('u-ripple')
|
|
7
|
-
export class UmRipple extends LitElement {
|
|
8
|
-
|
|
9
|
-
static override styles = styles;
|
|
10
|
-
|
|
11
|
-
private isTouching = false;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Disables the ripple.
|
|
15
|
-
*/
|
|
16
|
-
@property({type: Boolean, reflect: true}) disabled = false;
|
|
17
|
-
|
|
18
|
-
@query('.ripple-container') private readonly rippleContainer!: HTMLElement;
|
|
19
|
-
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
|
|
23
|
-
this.ariaHidden = "true";
|
|
24
|
-
this.attachEvents();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
override render(): HTMLTemplateResult {
|
|
28
|
-
return html`<div class="ripple-container"></div><slot></slot>`
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
private attachEvents(): void {
|
|
32
|
-
|
|
33
|
-
this.addEventListener('mousedown', this.handleMouseDown);
|
|
34
|
-
this.addEventListener('touchstart', this.handleTouchStart);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
private handleMouseDown(e: MouseEvent): void {
|
|
38
|
-
|
|
39
|
-
if (this.isTouching || !this.canCreateRipple()) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
this.createRipple(e.clientX, e.clientY, 'mouseup');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private handleTouchStart(e: TouchEvent): void {
|
|
47
|
-
|
|
48
|
-
if (!this.canCreateRipple()) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
this.isTouching = true;
|
|
53
|
-
|
|
54
|
-
const dismiss = this.createRipple(e.touches[0].clientX, e.touches[0].clientY, 'touchend')!;
|
|
55
|
-
|
|
56
|
-
this.addEventListener("touchmove", dismiss);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
private canCreateRipple(): boolean {
|
|
60
|
-
if (this.disabled) return false;
|
|
61
|
-
|
|
62
|
-
const parent = this.parentElement;
|
|
63
|
-
|
|
64
|
-
if (!parent || window.getComputedStyle(parent).position !== "relative" && window.getComputedStyle(parent).position !== "absolute" && window.getComputedStyle(parent).position !== "fixed") {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
createRipple(targetX: number | null = null, targetY: number | null = null, releaseEventName: string | null = null): (() => void) | null {
|
|
72
|
-
const preClientRect = this.rippleContainer.getBoundingClientRect();
|
|
73
|
-
targetX ??= preClientRect.x + this.rippleContainer.clientWidth / 2;
|
|
74
|
-
targetY ??= preClientRect.y + this.rippleContainer.clientHeight / 2;
|
|
75
|
-
|
|
76
|
-
const ripple = document.createElement('DIV');
|
|
77
|
-
ripple.classList.add('ripple');
|
|
78
|
-
this.rippleContainer!.appendChild(ripple);
|
|
79
|
-
|
|
80
|
-
requestAnimationFrame(() => {
|
|
81
|
-
const clientRect = this.getBoundingClientRect();
|
|
82
|
-
const largestDimensionSize = Math.max(this.clientWidth, this.clientHeight);
|
|
83
|
-
const rippleSize = largestDimensionSize * 2;
|
|
84
|
-
|
|
85
|
-
UmRipple._setElementSquareSizeAndCenter(ripple, rippleSize);
|
|
86
|
-
ripple.style.setProperty('--_ripple-transition-duration', `${1080 * Math.pow(rippleSize, 0.3)}ms`);
|
|
87
|
-
|
|
88
|
-
const x = (targetX! - clientRect.left) + ((rippleSize - this.rippleContainer.clientWidth) / 2);
|
|
89
|
-
const y = (targetY! - clientRect.top) + ((rippleSize - this.rippleContainer.clientHeight) / 2);
|
|
90
|
-
|
|
91
|
-
ripple.style.transformOrigin = `${x}px ${y}px`;
|
|
92
|
-
ripple.classList.add(releaseEventName ? 'show' : 'show-forced');
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
const interval = setInterval(() => {
|
|
96
|
-
|
|
97
|
-
if (!ripple.classList.contains('dismiss') && !ripple.classList.contains('show-forced')) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const animations = ripple.getAnimations();
|
|
102
|
-
|
|
103
|
-
if (animations.length) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
clearInterval(interval);
|
|
108
|
-
ripple.remove();
|
|
109
|
-
}, 1000);
|
|
110
|
-
|
|
111
|
-
if (!releaseEventName) {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return this.createDismissEvent(ripple, releaseEventName);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
private createDismissEvent(ripple: HTMLElement, releaseEventName: string): () => void {
|
|
119
|
-
const dismiss = () => {
|
|
120
|
-
ripple.classList.add('dismiss');
|
|
121
|
-
|
|
122
|
-
this.isTouching = false;
|
|
123
|
-
|
|
124
|
-
this.removeEventListener('dragover', dismiss);
|
|
125
|
-
this.removeEventListener('mouseleave', dismiss);
|
|
126
|
-
window.removeEventListener(releaseEventName, dismiss);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
this.addEventListener("dragover", dismiss);
|
|
130
|
-
this.addEventListener("mouseleave", dismiss);
|
|
131
|
-
window.addEventListener(releaseEventName, dismiss);
|
|
132
|
-
|
|
133
|
-
return dismiss;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
private static _setElementSquareSizeAndCenter(element: HTMLElement, size: number) {
|
|
137
|
-
element.style.top = "50%";
|
|
138
|
-
element.style.left = "50%";
|
|
139
|
-
element.style.width = `${size}px`;
|
|
140
|
-
element.style.height = `${size}px`;
|
|
141
|
-
element.style.marginLeft = `${-size / 2}px`;
|
|
142
|
-
element.style.marginTop = `${-size / 2}px`;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
declare global {
|
|
147
|
-
interface HTMLElementTagNameMap {
|
|
148
|
-
'u-ripple': UmRipple;
|
|
149
|
-
}
|
|
150
|
-
}
|
package/src/table/table-body.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
5
|
-
import { styles } from './table-body.styles';
|
|
6
|
-
|
|
7
|
-
@customElement('u-tbody')
|
|
8
|
-
export class UmTableBody extends LitElement {
|
|
9
|
-
|
|
10
|
-
static override styles = [baseStyles, styles];
|
|
11
|
-
|
|
12
|
-
protected override render(): HTMLTemplateResult {
|
|
13
|
-
return html`<slot></slot>`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare global {
|
|
18
|
-
interface HTMLElementTagNameMap {
|
|
19
|
-
'u-tbody': UmTableBody;
|
|
20
|
-
}
|
|
21
|
-
}
|
package/src/table/table-cell.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
5
|
-
import { styles } from './table-cell.styles';
|
|
6
|
-
|
|
7
|
-
@customElement('u-td')
|
|
8
|
-
export class UmTableCell extends LitElement {
|
|
9
|
-
|
|
10
|
-
static override styles = [baseStyles, styles];
|
|
11
|
-
|
|
12
|
-
protected override render(): HTMLTemplateResult {
|
|
13
|
-
return html`<slot></slot>`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare global {
|
|
18
|
-
interface HTMLElementTagNameMap {
|
|
19
|
-
'u-td': UmTableCell;
|
|
20
|
-
}
|
|
21
|
-
}
|
package/src/table/table-head.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
5
|
-
import { styles } from './table-head.styles';
|
|
6
|
-
|
|
7
|
-
@customElement('u-thead')
|
|
8
|
-
export class UmTableHead extends LitElement {
|
|
9
|
-
|
|
10
|
-
static override styles = [baseStyles, styles];
|
|
11
|
-
|
|
12
|
-
protected override render(): HTMLTemplateResult {
|
|
13
|
-
return html`<slot></slot>`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare global {
|
|
18
|
-
interface HTMLElementTagNameMap {
|
|
19
|
-
'u-thead': UmTableHead;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
@import "../utils";
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
display: table-cell;
|
|
5
|
-
padding: var(--u-th-padding, 13px 16px);
|
|
6
|
-
font-size: var(--u-th-font-size, .8125rem);
|
|
7
|
-
font-weight: var(--u-th-font-weigh, #{get-font-weight-var(medium)});
|
|
8
|
-
text-align: start;
|
|
9
|
-
color: var(--u-low-emphasis-color, #{get-color-var(on-surface-variant)});
|
|
10
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
5
|
-
import { styles } from './table-header-cell.styles';
|
|
6
|
-
|
|
7
|
-
@customElement('u-th')
|
|
8
|
-
export class UmTableHeaderCell extends LitElement {
|
|
9
|
-
|
|
10
|
-
static override styles = [baseStyles, styles];
|
|
11
|
-
|
|
12
|
-
protected override render(): HTMLTemplateResult {
|
|
13
|
-
return html`<slot></slot>`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare global {
|
|
18
|
-
interface HTMLElementTagNameMap {
|
|
19
|
-
'u-th': UmTableHeaderCell;
|
|
20
|
-
}
|
|
21
|
-
}
|
package/src/table/table-row.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
5
|
-
import { styles } from './table-row.styles';
|
|
6
|
-
|
|
7
|
-
@customElement('u-tr')
|
|
8
|
-
export class UmTableRow extends LitElement {
|
|
9
|
-
|
|
10
|
-
static override styles = [baseStyles, styles];
|
|
11
|
-
|
|
12
|
-
protected override render(): HTMLTemplateResult {
|
|
13
|
-
return html`<slot></slot>`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare global {
|
|
18
|
-
interface HTMLElementTagNameMap {
|
|
19
|
-
'u-tr': UmTableRow;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: table;
|
|
3
|
-
min-width: 100%;
|
|
4
|
-
border-collapse: collapse;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
::slotted(u-thead:not(:first-child)),
|
|
8
|
-
::slotted(u-tbody:not(:first-child)),
|
|
9
|
-
::slotted(u-tfooter:not(:first-child)),
|
|
10
|
-
::slotted(u-tr:not(:first-child)) {
|
|
11
|
-
border-top: 1px solid #{get-color-var(outline-variant)};
|
|
12
|
-
}
|
package/src/theme/color.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { hexFromArgb } from '@material/material-color-utilities';
|
|
2
|
-
|
|
3
|
-
import { RgbColor } from './rgb-color.js';
|
|
4
|
-
|
|
5
|
-
export class CssVarBuilder {
|
|
6
|
-
|
|
7
|
-
private content = '';
|
|
8
|
-
|
|
9
|
-
private constructor() {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static create(): CssVarBuilder {
|
|
13
|
-
return new CssVarBuilder();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
add(name: string, value: string): CssVarBuilder {
|
|
17
|
-
|
|
18
|
-
const cssVar = ` ${name}: ${value};
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
this.content += cssVar
|
|
22
|
-
|
|
23
|
-
return this;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
addFromArgb(name: string, argb: number): CssVarBuilder {
|
|
27
|
-
this.add(`--u-color-${name}`, hexFromArgb(argb));
|
|
28
|
-
this.add(`--u-color-${name}-rgb`, RgbColor.fromArgb(argb).toString());
|
|
29
|
-
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
build(): string {
|
|
34
|
-
return this.content;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {Color} from './color.js';
|
|
2
|
-
|
|
3
|
-
export const neutralColors: Color[] = [
|
|
4
|
-
{ name: 'surface', lightTone: 98, darkTone: 6 },
|
|
5
|
-
{ name: 'surface-bright', lightTone: 98, darkTone: 24 },
|
|
6
|
-
{ name: 'surface-dim', lightTone: 87, darkTone: 6 },
|
|
7
|
-
{ name: 'surface-container-lowest', lightTone: 100, darkTone: 4 },
|
|
8
|
-
{ name: 'surface-container-low', lightTone: 96, darkTone: 10 },
|
|
9
|
-
{ name: 'surface-container', lightTone: 94, darkTone: 12 },
|
|
10
|
-
{ name: 'surface-container-high', lightTone: 92, darkTone: 17 },
|
|
11
|
-
{ name: 'surface-container-highest', lightTone: 90, darkTone: 22 },
|
|
12
|
-
{ name: 'on-surface', lightTone: 10, darkTone: 90 },
|
|
13
|
-
{ name: 'scrim', fixedTone: 0 },
|
|
14
|
-
{ name: 'shadow', fixedTone: 0 },
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
export const neutralVariantColors: Color[] = [
|
|
18
|
-
{ name: 'on-surface-variant', lightTone: 30, darkTone: 80 },
|
|
19
|
-
{ name: 'outline', lightTone: 50, darkTone: 60 },
|
|
20
|
-
{ name: 'outline-variant', lightTone: 80, darkTone: 30 }
|
|
21
|
-
]
|
package/src/theme/rgb-color.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { blueFromArgb, greenFromArgb, redFromArgb } from '@material/material-color-utilities';
|
|
2
|
-
|
|
3
|
-
export class RgbColor {
|
|
4
|
-
r: number;
|
|
5
|
-
g: number;
|
|
6
|
-
b: number;
|
|
7
|
-
|
|
8
|
-
constructor(r: number, g: number, b: number) {
|
|
9
|
-
this.r = r;
|
|
10
|
-
this.g = g;
|
|
11
|
-
this.b = b;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static fromArgb(argb: number): RgbColor {
|
|
15
|
-
return new RgbColor(redFromArgb(argb), greenFromArgb(argb), blueFromArgb(argb));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
toString = (): string => `${this.r},${this.g},${this.b}`;
|
|
19
|
-
}
|