@universal-material/web 3.0.10 → 3.0.12
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
package/gulpfile.js
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import gulp from 'gulp';
|
|
2
|
-
import notify from 'gulp-notify';
|
|
3
|
-
import gulpPug from 'gulp-pug';
|
|
4
|
-
import gulpSass from 'gulp-sass';
|
|
5
|
-
import { encode } from 'html-entities';
|
|
6
|
-
import * as fs from 'node:fs';
|
|
7
|
-
import { rollup } from 'rollup';
|
|
8
|
-
import * as dartSass from 'sass';
|
|
9
|
-
import through2 from 'through2';
|
|
10
|
-
import { Project, SyntaxKind } from 'ts-morph';
|
|
11
|
-
|
|
12
|
-
import rollupConfig from './rollup.config.js';
|
|
13
|
-
|
|
14
|
-
const sass = gulpSass(dartSass);
|
|
15
|
-
|
|
16
|
-
const pugDocs = () => {
|
|
17
|
-
return gulp
|
|
18
|
-
.src(["./docs/src/**/*.pug", "!./docs/src/_*.pug"])
|
|
19
|
-
.pipe(gulpPug({
|
|
20
|
-
data: {
|
|
21
|
-
debug: true,
|
|
22
|
-
version:
|
|
23
|
-
"<%= pkg.version + '.' + pkg.build %>"
|
|
24
|
-
},
|
|
25
|
-
filters: {
|
|
26
|
-
exampleCode: text =>
|
|
27
|
-
`
|
|
28
|
-
<u-card-content>${text}</u-card-content>
|
|
29
|
-
<u-card-content class="example-card-code" slot="after-content">
|
|
30
|
-
<pre><code class="language-html">${encode(text, {level: 'html5'})}</code></pre>
|
|
31
|
-
</u-card-content>`,
|
|
32
|
-
escape: text =>
|
|
33
|
-
encode(text, {level: 'html5'})
|
|
34
|
-
},
|
|
35
|
-
doctype: 'html',
|
|
36
|
-
pretty: true
|
|
37
|
-
}).on("error", notify.onError(function(error) {
|
|
38
|
-
return "An error occurred while compiling pug.\nLook in the console for details.\n" + error;
|
|
39
|
-
})))
|
|
40
|
-
.pipe(gulp.dest("./docs/dist")); // tell gulp our output folder
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const docsCopyJs = () =>
|
|
44
|
-
gulp
|
|
45
|
-
.src(["./dist/**/*"])
|
|
46
|
-
.pipe(gulp.dest('docs/dist/js'));
|
|
47
|
-
|
|
48
|
-
const docsBundle = async () => {
|
|
49
|
-
const bundle = await rollup(rollupConfig);
|
|
50
|
-
await bundle.write({
|
|
51
|
-
file: './docs/dist/js/index.js'
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const watchDocs = () => {
|
|
56
|
-
gulp.watch(['./docs/src/**/*.pug', './docs/src/**/*.html'], pugDocs);
|
|
57
|
-
gulp.watch(['./dist/**/*'], docsCopyJs);
|
|
58
|
-
gulp.watch(['./src/**/*.ts', '!./src/**/*.styles.ts'], docsPugApis);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const docsPugApis = cb => {
|
|
62
|
-
|
|
63
|
-
console.log('Generating APIs model....');
|
|
64
|
-
|
|
65
|
-
const project = new Project();
|
|
66
|
-
project.addSourceFilesAtPaths('src/**/*.ts');
|
|
67
|
-
|
|
68
|
-
const apis = {};
|
|
69
|
-
|
|
70
|
-
for (const sourceFile of project.getSourceFiles()) {
|
|
71
|
-
|
|
72
|
-
if (sourceFile.getFilePath().includes('node_modules')) {
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
for (const classDeclaration of sourceFile.getClasses()) {
|
|
77
|
-
|
|
78
|
-
if (classDeclaration.isAbstract()) {
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const classInfo = [];
|
|
83
|
-
|
|
84
|
-
setClassInfo(classDeclaration, classInfo);
|
|
85
|
-
|
|
86
|
-
if (!classInfo.length) {
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const className = classDeclaration.getName();
|
|
91
|
-
const apiName = `${className[2].toLowerCase()}${className.slice(3)}`;
|
|
92
|
-
apis[apiName] = classInfo;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
fs.writeFile('./docs/src/_apis.pug', `- var apis = ${JSON.stringify(apis)}`, err => {
|
|
97
|
-
if (err) {
|
|
98
|
-
console.error(err);
|
|
99
|
-
cb(err);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
cb()
|
|
104
|
-
console.log('Done.');
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const sassToTs = () =>
|
|
109
|
-
gulp
|
|
110
|
-
.src(['./src/**/*.scss', '!./src/styles/**/*.scss'])
|
|
111
|
-
.pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError))
|
|
112
|
-
.pipe(through2({objectMode: true}, (file, enc, cb) => {
|
|
113
|
-
let content = file.contents.toString();
|
|
114
|
-
content = content.replaceAll(/^(.)/gm, ' $1');
|
|
115
|
-
|
|
116
|
-
const newContent = `import { css } from 'lit';
|
|
117
|
-
|
|
118
|
-
export const styles = css \`
|
|
119
|
-
${content}
|
|
120
|
-
\`;
|
|
121
|
-
`
|
|
122
|
-
|
|
123
|
-
file.contents = new Buffer(newContent);
|
|
124
|
-
file.path = file.path.replace('.css', '.ts')
|
|
125
|
-
return cb(null, file);
|
|
126
|
-
}))
|
|
127
|
-
.pipe(gulp.dest('./src'));
|
|
128
|
-
|
|
129
|
-
function getAttributeName(property) {
|
|
130
|
-
const decorators = property.getDecorators();
|
|
131
|
-
const propertyDecorator = decorators.find(d => d.getName() === 'property');
|
|
132
|
-
|
|
133
|
-
if (!propertyDecorator) {
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const optionsArgument = propertyDecorator.getArguments()[0];
|
|
138
|
-
|
|
139
|
-
if (!optionsArgument) {
|
|
140
|
-
return property.getName();
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return optionsArgument.getProperty('attribute')
|
|
144
|
-
?.getInitializer()
|
|
145
|
-
?.getText()
|
|
146
|
-
?.replaceAll(`'`, '') ?? property.getName();
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function getJsDocsDescription(property) {
|
|
150
|
-
const jsDocs = property.getJsDocs()[0];
|
|
151
|
-
|
|
152
|
-
if (!jsDocs) {
|
|
153
|
-
return null;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
let description = encode(jsDocs.getDescription())
|
|
157
|
-
.replaceAll(/`(.+?)`/g, '<code>$1</code>')
|
|
158
|
-
.replaceAll(/_(.+?)_/g, '<em>$1</em>')
|
|
159
|
-
.trimStart();
|
|
160
|
-
|
|
161
|
-
const linkTag = jsDocs
|
|
162
|
-
.getTags()
|
|
163
|
-
.find(t => t.getTagName() === 'link');
|
|
164
|
-
|
|
165
|
-
if (!linkTag) {
|
|
166
|
-
return description;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const link = linkTag.getComment().trim();
|
|
170
|
-
|
|
171
|
-
return `${description}
|
|
172
|
-
|
|
173
|
-
<a href="${link}" target="_blank">${link}</a>`;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function setClassInfo(classDeclaration, classInfo) {
|
|
177
|
-
|
|
178
|
-
if (!classDeclaration || classDeclaration.getSourceFile().getFilePath().includes('node_modules')) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
for (const property of classDeclaration.getProperties().concat(classDeclaration.getGetAccessors())) {
|
|
183
|
-
|
|
184
|
-
const propertyName = property.getName();
|
|
185
|
-
|
|
186
|
-
if (property.isStatic()
|
|
187
|
-
|| property.hasModifier(SyntaxKind.PrivateKeyword)
|
|
188
|
-
|| property.hasModifier(SyntaxKind.ProtectedKeyword)
|
|
189
|
-
|| propertyName.startsWith('#')) {
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
const attributeName = getAttributeName(property);
|
|
194
|
-
|
|
195
|
-
const description = getJsDocsDescription(property);
|
|
196
|
-
const typeText = property.getType().getText();
|
|
197
|
-
|
|
198
|
-
classInfo.push({
|
|
199
|
-
type: typeText.includes('|')
|
|
200
|
-
? 'string'
|
|
201
|
-
: typeText,
|
|
202
|
-
attribute: attributeName,
|
|
203
|
-
default: property.getInitializer
|
|
204
|
-
? property.getInitializer()?.getText() ?? 'undefined'
|
|
205
|
-
: null,
|
|
206
|
-
name: propertyName.startsWith('_')
|
|
207
|
-
? null
|
|
208
|
-
: propertyName,
|
|
209
|
-
description: description
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
setClassInfo(classDeclaration.getBaseClass(), classInfo);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
gulp.task('docs:pug:apis', docsPugApis);
|
|
217
|
-
gulp.task('docs:pug', pugDocs);
|
|
218
|
-
gulp.task('docs:js', docsCopyJs);
|
|
219
|
-
gulp.task('docs:bundle', docsBundle);
|
|
220
|
-
gulp.task('docs:watch', gulp.series(docsPugApis, gulp.parallel(pugDocs, docsCopyJs, watchDocs)));
|
|
221
|
-
|
|
222
|
-
gulp.task('sass:sass-to-ts', sassToTs);
|
|
223
|
-
gulp.task('sass:sass-to-ts:watch', () => gulp.watch('./src/**/*.scss', sassToTs));
|
|
224
|
-
|
|
225
|
-
gulp.task('docs', gulp.series(docsPugApis, gulp.parallel(pugDocs, docsBundle)));
|
package/index.html
DELETED
package/rollup.config.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2018 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
8
|
-
import replace from '@rollup/plugin-replace';
|
|
9
|
-
import summary from 'rollup-plugin-summary';
|
|
10
|
-
import { terser } from 'rollup-plugin-terser';
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
input: './dist/index.js',
|
|
14
|
-
output: {
|
|
15
|
-
file: './docs/dist/js/index.js',
|
|
16
|
-
format: 'esm',
|
|
17
|
-
},
|
|
18
|
-
onwarn(warning) {
|
|
19
|
-
if (warning.code !== 'THIS_IS_UNDEFINED') {
|
|
20
|
-
console.error(`(!) ${warning.message}`);
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
plugins: [
|
|
24
|
-
replace({'Reflect.decorate': 'undefined'}),
|
|
25
|
-
resolve(),
|
|
26
|
-
/**
|
|
27
|
-
* This minification setup serves the static site generation.
|
|
28
|
-
* For bundling and minification, check the README.md file.
|
|
29
|
-
*/
|
|
30
|
-
terser({
|
|
31
|
-
ecma: 2021,
|
|
32
|
-
module: true,
|
|
33
|
-
warnings: true,
|
|
34
|
-
mangle: {
|
|
35
|
-
properties: {
|
|
36
|
-
regex: /^__/,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
}),
|
|
40
|
-
summary(),
|
|
41
|
-
],
|
|
42
|
-
};
|
package/src/_utils.scss
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
@import "variables";
|
|
4
|
-
|
|
5
|
-
@function get-color-var($name) {
|
|
6
|
-
@return var(--u-color-#{$name}, map.get($colors, $name));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@function get-color-rgb-var($name) {
|
|
10
|
-
@return var(--u-color-#{$name}-rgb, map.get($rgb-colors, $name));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@function get-font-weight-var($name) {
|
|
15
|
-
@return var(--u-font-weight-#{$name}, map.get($font-weights, $name));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@function get-shaper-corner-var($name) {
|
|
19
|
-
@return var(--u-shape-corner-#{$name}, map.get($shape-corner, $name));
|
|
20
|
-
}
|
package/src/_variables.scss
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
$awesome-cubic-bezier: cubic-bezier(.19, 1, .22, 1) !default;
|
|
4
|
-
|
|
5
|
-
$rgb-colors: (
|
|
6
|
-
primary: unquote("103, 80, 164"),
|
|
7
|
-
on-primary: unquote("255, 255, 255"),
|
|
8
|
-
primary-container: unquote("234, 221, 255"),
|
|
9
|
-
on-primary-container: unquote("33, 0, 93"),
|
|
10
|
-
secondary: unquote("98, 91, 113"),
|
|
11
|
-
secondary-container: unquote("232, 222, 248"),
|
|
12
|
-
on-secondary-container: unquote("29, 25, 43"),
|
|
13
|
-
on-secondary: unquote("255, 255, 255"),
|
|
14
|
-
tertiary: unquote("125, 82, 96"),
|
|
15
|
-
on-tertiary: unquote("255, 255, 255"),
|
|
16
|
-
tertiary-container: unquote("255, 216, 228"),
|
|
17
|
-
on-tertiary-container: unquote("49, 17, 29"),
|
|
18
|
-
error: unquote("179, 38, 30"),
|
|
19
|
-
on-error: unquote("255, 255, 255"),
|
|
20
|
-
error-container: unquote("249, 222, 220"),
|
|
21
|
-
on-error-container: unquote("65, 14, 11"),
|
|
22
|
-
surface: unquote("254, 247, 255"),
|
|
23
|
-
on-surface: unquote("29, 27, 32"),
|
|
24
|
-
surface-variant: unquote("231, 224, 236"),
|
|
25
|
-
on-surface-variant: unquote("73, 69, 79"),
|
|
26
|
-
surface-container-highest: unquote("230, 224, 233"),
|
|
27
|
-
surface-container-high: unquote("236, 230, 240"),
|
|
28
|
-
surface-container: unquote("243, 237, 247"),
|
|
29
|
-
surface-container-low: unquote("247, 242, 250"),
|
|
30
|
-
surface-container-lowest: unquote("255, 255, 255"),
|
|
31
|
-
inverse-surface: unquote("50, 47, 53"),
|
|
32
|
-
inverse-on-surface: unquote("245, 239, 247"),
|
|
33
|
-
outline: unquote("121, 116, 126"),
|
|
34
|
-
outline-variant: unquote("202, 196, 208"),
|
|
35
|
-
shadow: unquote("0, 0, 0")
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
$colors: ();
|
|
39
|
-
|
|
40
|
-
@each $name, $value in $rgb-colors {
|
|
41
|
-
$colors: map.set($colors, $name, unquote("rgb(#{$value})"));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
$spacings: (
|
|
45
|
-
var(sm, 8px),
|
|
46
|
-
var(md, 16px),
|
|
47
|
-
var(lg, 24px),
|
|
48
|
-
var(xl, 40px),
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
$font-weights: (
|
|
52
|
-
thin: 100,
|
|
53
|
-
light: 300,
|
|
54
|
-
regular: 400,
|
|
55
|
-
medium: 500,
|
|
56
|
-
bold: 700,
|
|
57
|
-
bolder: 900,
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
$shape-corner: (
|
|
61
|
-
none: 0,
|
|
62
|
-
extra-small: 4px,
|
|
63
|
-
small: 8px,
|
|
64
|
-
medium: 12px,
|
|
65
|
-
large: 16px,
|
|
66
|
-
extra-large: 28px,
|
|
67
|
-
full: 9999px
|
|
68
|
-
);
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
@import '../utils';
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
--_color-primary: #{get-color-var(primary)};
|
|
5
|
-
|
|
6
|
-
-webkit-tap-highlight-color: transparent;
|
|
7
|
-
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
vertical-align: baseline;
|
|
12
|
-
position: relative;
|
|
13
|
-
white-space: nowrap;
|
|
14
|
-
font-family: var(--u-font-family-base, system-ui);
|
|
15
|
-
transition: color 150ms ease-in-out, background-color 150ms ease-in-out;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([disabled]) {
|
|
19
|
-
--u-elevation-level: 0 !important;
|
|
20
|
-
background-color: var(--u-button-disabled-background-color, rgba(#{get-color-rgb-var(on-surface)}, .12)) !important;
|
|
21
|
-
color: var(--u-button-disabled-text-color, rgba(#{get-color-rgb-var(on-surface)}, .38)) !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host([disabled]) .button {
|
|
25
|
-
cursor: default;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
* {
|
|
29
|
-
color: inherit;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
u-elevation {
|
|
33
|
-
z-index: -1;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.button {
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
position: absolute;
|
|
39
|
-
inset: 0;
|
|
40
|
-
font-family: inherit;
|
|
41
|
-
border-radius: inherit;
|
|
42
|
-
color: inherit;
|
|
43
|
-
border: none;
|
|
44
|
-
margin: 0;
|
|
45
|
-
padding: 0;
|
|
46
|
-
text-align: center;
|
|
47
|
-
white-space: nowrap;
|
|
48
|
-
background: transparent;
|
|
49
|
-
user-select: none;
|
|
50
|
-
text-decoration: none;
|
|
51
|
-
outline: 0;
|
|
52
|
-
z-index: 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.button:focus-visible {
|
|
56
|
-
animation: offset-pulse 400ms ease;
|
|
57
|
-
animation-fill-mode: forwards;
|
|
58
|
-
outline-offset: 2px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
::slotted([slot=icon]) {
|
|
62
|
-
display: inline-block;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@keyframes offset-pulse {
|
|
66
|
-
0% {
|
|
67
|
-
outline: 4px solid var(--_color-primary);
|
|
68
|
-
}
|
|
69
|
-
50% {
|
|
70
|
-
outline: 8px solid var(--_color-primary);
|
|
71
|
-
}
|
|
72
|
-
100% {
|
|
73
|
-
outline: 4px solid var(--_color-primary);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement, nothing } from 'lit';
|
|
2
|
-
import { property, query } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import '../elevation/elevation.js';
|
|
5
|
-
import '../ripple/ripple.js';
|
|
6
|
-
import { UmRipple } from '../ripple/ripple';
|
|
7
|
-
|
|
8
|
-
export abstract class UmButtonBase extends LitElement {
|
|
9
|
-
|
|
10
|
-
static readonly formAssociated = true;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Whether the button is disabled or not.
|
|
14
|
-
*/
|
|
15
|
-
@property({type: Boolean, reflect: true}) disabled = false;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The URL that the link button points to.
|
|
19
|
-
*/
|
|
20
|
-
@property() href = '';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Where to display the linked `href` URL for a link button. Common options
|
|
24
|
-
* include `_blank` to open in a new tab.
|
|
25
|
-
*/
|
|
26
|
-
@property() target: string = '';
|
|
27
|
-
|
|
28
|
-
@property() type: string = 'submit';
|
|
29
|
-
|
|
30
|
-
@property({reflect: true}) value: string = '';
|
|
31
|
-
@property() name: string | undefined;
|
|
32
|
-
|
|
33
|
-
@query('.button') private readonly buttonElement!: HTMLElement;
|
|
34
|
-
@query('u-ripple') private readonly ripple!: UmRipple;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* The `<form>` element to associate the button with (its form owner). The value of this attribute must be the id of a `<form>` in the same document. (If this attribute is not set, the button is associated with its ancestor `<form>` element, if any.)
|
|
38
|
-
* @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form
|
|
39
|
-
*/
|
|
40
|
-
@property()
|
|
41
|
-
get form(): HTMLFormElement | null {
|
|
42
|
-
return this.#elementInternals.form;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
readonly #elementInternals: ElementInternals;
|
|
46
|
-
|
|
47
|
-
constructor() {
|
|
48
|
-
super();
|
|
49
|
-
this.#elementInternals = this.attachInternals();
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
protected override render() {
|
|
53
|
-
return this.href
|
|
54
|
-
? this.renderLink()
|
|
55
|
-
: this.renderButton();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
private renderButton() {
|
|
59
|
-
|
|
60
|
-
return html`
|
|
61
|
-
<button
|
|
62
|
-
id="button"
|
|
63
|
-
class="button"
|
|
64
|
-
?disabled=${this.disabled}
|
|
65
|
-
aria-label="${this.getAriaLabel()}"
|
|
66
|
-
type="button">
|
|
67
|
-
<u-ripple ?disabled=${this.disabled}></u-ripple>
|
|
68
|
-
<u-elevation></u-elevation>
|
|
69
|
-
</button>
|
|
70
|
-
${this.renderContent()}`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
private renderLink() {
|
|
74
|
-
|
|
75
|
-
return html`<a
|
|
76
|
-
id="link"
|
|
77
|
-
class="button"
|
|
78
|
-
href=${this.disabled ? nothing : this.href}
|
|
79
|
-
aria-disabled=${this.disabled || nothing}
|
|
80
|
-
aria-label="${this.getAriaLabel()}"
|
|
81
|
-
target=${this.target || nothing}>
|
|
82
|
-
<u-elevation></u-elevation>
|
|
83
|
-
<u-ripple ?disabled=${this.disabled}></u-ripple>
|
|
84
|
-
</a>
|
|
85
|
-
${this.renderContent()}`;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
protected abstract renderContent(): HTMLTemplateResult;
|
|
89
|
-
|
|
90
|
-
override connectedCallback() {
|
|
91
|
-
super.connectedCallback();
|
|
92
|
-
|
|
93
|
-
this.addEventListener('click', this.innerHandleClick);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
override disconnectedCallback() {
|
|
97
|
-
super.disconnectedCallback();
|
|
98
|
-
|
|
99
|
-
this.removeEventListener('click', this.innerHandleClick);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
override focus() {
|
|
103
|
-
this.buttonElement?.focus();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
override blur() {
|
|
107
|
-
this.buttonElement?.blur();
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
protected getAriaLabel(): string | null | typeof nothing {
|
|
111
|
-
return this.ariaLabel || nothing;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
private innerHandleClick(event: UIEvent): void {
|
|
115
|
-
|
|
116
|
-
if (this.disabled) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if (event.detail === 0) {
|
|
121
|
-
this.ripple.createRipple();
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
this.handleClick(event);
|
|
125
|
-
|
|
126
|
-
if (this.type === 'button' || !!this.href) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (!this.form) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
this.#elementInternals.setFormValue(this.value);
|
|
135
|
-
|
|
136
|
-
if (this.type === 'submit') {
|
|
137
|
-
this.form.requestSubmit();
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
this.form.reset();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
protected handleClick(_: UIEvent): void {
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: 8px;
|
|
4
|
-
align-items: center;
|
|
5
|
-
flex-wrap: nowrap;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:host([align=start]) {
|
|
9
|
-
justify-content: flex-start;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:host([align=center]) {
|
|
13
|
-
justify-content: center;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host([align=end]) {
|
|
17
|
-
justify-content: flex-end;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([stack][align=start]) {
|
|
21
|
-
align-items: flex-start;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host([stack][align=center]) {
|
|
25
|
-
align-items: center;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host([stack][align=end]) {
|
|
29
|
-
align-items: flex-end;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host([stack]) {
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
justify-content: flex-start;
|
|
35
|
-
}
|
package/src/button/button-set.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { html, HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
-
|
|
4
|
-
import { styles } from './button-set.styles';
|
|
5
|
-
|
|
6
|
-
export type UmButtonSetAlignment = 'start' | 'center' | 'end';
|
|
7
|
-
|
|
8
|
-
@customElement('u-button-set')
|
|
9
|
-
export class UmButtonSet extends LitElement {
|
|
10
|
-
|
|
11
|
-
static override styles = styles;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Set the alignment of the buttons at the `start`, `center` or at the `end`.
|
|
15
|
-
*/
|
|
16
|
-
@property({reflect: true}) align: UmButtonSetAlignment = 'end';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Whether to render the buttons stacked or not
|
|
20
|
-
*/
|
|
21
|
-
@property({type: Boolean, reflect: true}) stack = false;
|
|
22
|
-
|
|
23
|
-
override render(): HTMLTemplateResult {
|
|
24
|
-
return html`
|
|
25
|
-
<slot></slot>`;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
declare global {
|
|
30
|
-
interface HTMLElementTagNameMap {
|
|
31
|
-
'u-button-set': UmButtonSet;
|
|
32
|
-
}
|
|
33
|
-
}
|