@universal-material/web 3.0.8 → 3.0.9
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/.editorconfig +8 -0
- package/.eleventy.cjs +21 -0
- package/.eslintignore +6 -0
- package/.eslintrc.json +98 -0
- package/.prettierrc.json +7 -0
- package/.vscode/extensions.json +9 -0
- package/CHANGELOG.md +98 -0
- package/LICENSE +28 -0
- package/docs/.nojekyll +0 -0
- package/docs/api/index.html +149 -0
- package/docs/docs.css +185 -0
- package/docs/examples/index.html +75 -0
- package/docs/examples/name-property/index.html +65 -0
- package/docs/index.html +75 -0
- package/docs/install/index.html +53 -0
- package/docs/prism-okaidia.css +123 -0
- package/docs/src/_api-section.pug +27 -0
- package/docs/src/_layout.pug +182 -0
- package/docs/src/components/button-set/alignment.html +29 -0
- package/docs/src/components/button-set/stack.html +5 -0
- package/docs/src/components/button-set/usage.html +35 -0
- package/docs/src/components/button-set.pug +16 -0
- package/docs/src/components/cards/card-media.html +39 -0
- package/docs/src/components/cards/card-with-actions.html +38 -0
- package/docs/src/components/cards/simple-card.html +3 -0
- package/docs/src/components/cards.pug +15 -0
- package/docs/src/components/checkbox/usage.html +33 -0
- package/docs/src/components/checkbox.pug +7 -0
- package/docs/src/components/chips/chip-input.html +73 -0
- package/docs/src/components/chips/default-chips.html +25 -0
- package/docs/src/components/chips/elevated-chips.html +25 -0
- package/docs/src/components/chips/selected-chips.html +50 -0
- package/docs/src/components/chips.pug +16 -0
- package/docs/src/components/common-buttons/anchor-buttons.html +6 -0
- package/docs/src/components/common-buttons/buttons-icons.html +24 -0
- package/docs/src/components/common-buttons/buttons-trailing-icons.html +25 -0
- package/docs/src/components/common-buttons/buttons-variants.html +6 -0
- package/docs/src/components/common-buttons/filled-colors.html +4 -0
- package/docs/src/components/common-buttons.pug +22 -0
- package/docs/src/components/data-tables/simple-table.html +47 -0
- package/docs/src/components/data-tables/table-footer.html +59 -0
- package/docs/src/components/data-tables/table-header.html +43 -0
- package/docs/src/components/data-tables.pug +15 -0
- package/docs/src/components/datepicker.pug +133 -0
- package/docs/src/components/dialogs/example.html +44 -0
- package/docs/src/components/dialogs.pug +19 -0
- package/docs/src/components/dividers/no-margin.html +7 -0
- package/docs/src/components/dividers/usage.html +7 -0
- package/docs/src/components/dividers.pug +13 -0
- package/docs/src/components/dropdown-menus/down-end.html +10 -0
- package/docs/src/components/dropdown-menus/down-left.html +10 -0
- package/docs/src/components/dropdown-menus/down-right.html +10 -0
- package/docs/src/components/dropdown-menus/down-start.html +10 -0
- package/docs/src/components/dropdown-menus/down.html +10 -0
- package/docs/src/components/dropdown-menus/up-end.html +10 -0
- package/docs/src/components/dropdown-menus/up-left.html +10 -0
- package/docs/src/components/dropdown-menus/up-right.html +10 -0
- package/docs/src/components/dropdown-menus/up-start.html +10 -0
- package/docs/src/components/dropdown-menus/up.html +10 -0
- package/docs/src/components/expansion-panel.pug +33 -0
- package/docs/src/components/fab/button-colors.html +18 -0
- package/docs/src/components/fab/button-sizes.html +11 -0
- package/docs/src/components/fab/extended-buttons.html +18 -0
- package/docs/src/components/fab/floating-action-area.html +5 -0
- package/docs/src/components/fab/floating-menu.html +10 -0
- package/docs/src/components/fab/lowered-buttons.html +6 -0
- package/docs/src/components/fab.pug +25 -0
- package/docs/src/components/icon-buttons/anchor-buttons.html +15 -0
- package/docs/src/components/icon-buttons/buttons-variants.html +15 -0
- package/docs/src/components/icon-buttons/toggle-buttons-manual.html +44 -0
- package/docs/src/components/icon-buttons/toggle-buttons.html +48 -0
- package/docs/src/components/icon-buttons.pug +18 -0
- package/docs/src/components/lists/list-avatars.html +14 -0
- package/docs/src/components/lists/list-custom-dividers.html +23 -0
- package/docs/src/components/lists/list-dividers.html +17 -0
- package/docs/src/components/lists/list-dynamic.html +26 -0
- package/docs/src/components/lists/list-hover.html +17 -0
- package/docs/src/components/lists/list-icons.html +17 -0
- package/docs/src/components/lists/list-indexed.html +123 -0
- package/docs/src/components/lists/list-sections.html +16 -0
- package/docs/src/components/lists/list-three-lines.html +20 -0
- package/docs/src/components/lists/list-two-lines.html +20 -0
- package/docs/src/components/lists/list-with-action.html +26 -0
- package/docs/src/components/lists/list-with-activated-item.html +17 -0
- package/docs/src/components/lists/simple-list.html +17 -0
- package/docs/src/components/lists.pug +94 -0
- package/docs/src/components/menus.pug +55 -0
- package/docs/src/components/progress/circular-progress.html +13 -0
- package/docs/src/components/progress/determinate-progress.html +3 -0
- package/docs/src/components/progress/indeterminate-progress.html +3 -0
- package/docs/src/components/progress/progress-color.html +3 -0
- package/docs/src/components/progress.pug +18 -0
- package/docs/src/components/ripple/usage.html +9 -0
- package/docs/src/components/ripple.pug +10 -0
- package/docs/src/components/selection-controls/checkbox.html +22 -0
- package/docs/src/components/selection-controls/radio-button.html +36 -0
- package/docs/src/components/selection-controls/switch.html +12 -0
- package/docs/src/components/selection-controls.pug +13 -0
- package/docs/src/components/sliders/example.html +42 -0
- package/docs/src/components/sliders.pug +7 -0
- package/docs/src/components/snackbar/example.html +35 -0
- package/docs/src/components/snackbars.pug +21 -0
- package/docs/src/components/steppers.pug +57 -0
- package/docs/src/components/tabs/example.html +45 -0
- package/docs/src/components/tabs.pug +8 -0
- package/docs/src/components/text-fields.pug +88 -0
- package/docs/src/components/toolbars/simple-toolbar.html +33 -0
- package/docs/src/components/toolbars.pug +7 -0
- package/docs/src/content/typography/example.html +15 -0
- package/docs/src/content/typography.pug +8 -0
- package/docs/src/css/docs.scss +189 -0
- package/docs/src/index.pug +10 -0
- package/docs/src/js/docs.js +161 -0
- package/docs/src/js/universal-material.js +757 -0
- package/docs/src/js/universal-material.js.map +1 -0
- package/docs/src/js/universal-material.min.js +17 -0
- package/docs/src/js/universal-material.min.js.map +1 -0
- package/docs/src/layout/grid.pug +15 -0
- package/docs/src/utilities/background-colors/common-colors.html +7 -0
- package/docs/src/utilities/background-colors/theme-colors.html +16 -0
- package/docs/src/utilities/background-colors.pug +10 -0
- package/docs/src/utilities/text-and-background-colors/common-colors.html +80 -0
- package/docs/src/utilities/text-and-background-colors/theme-colors.html +208 -0
- package/docs/src/utilities/text-and-background-colors.pug +10 -0
- package/docs/src/utilities/text-colors/common-colors.html +12 -0
- package/docs/src/utilities/text-colors/emphasis-colors.html +26 -0
- package/docs/src/utilities/text-colors/theme-colors.html +37 -0
- package/docs/src/utilities/text-colors.pug +13 -0
- package/gulpfile.js +225 -0
- package/index.html +11 -0
- package/package.json +1 -1
- package/rollup.config.js +42 -0
- package/src/_utils.scss +20 -0
- package/src/_variables.scss +68 -0
- package/src/button/button-base.styles.scss +75 -0
- package/src/button/button-base.ts +147 -0
- package/src/button/button-set.styles.scss +35 -0
- package/src/button/button-set.ts +33 -0
- package/src/button/button.styles.scss +97 -0
- package/src/button/button.ts +64 -0
- package/src/button/fab.styles.scss +90 -0
- package/src/button/fab.ts +55 -0
- package/src/button/icon-button.styles.scss +74 -0
- package/src/button/icon-button.ts +72 -0
- package/src/card/card-content.styles.scss +11 -0
- package/src/card/card-content.ts +45 -0
- package/src/card/card-media.styles.scss +9 -0
- package/src/card/card-media.ts +24 -0
- package/src/card/card.styles.scss +27 -0
- package/src/card/card.ts +37 -0
- package/src/checkbox/checkbox.ts +77 -0
- package/src/container/container.styles.scss +39 -0
- package/src/container/container.ts +24 -0
- package/src/divider/divider.styles.scss +13 -0
- package/src/divider/divider.ts +21 -0
- package/src/elevation/elevation.styles.scss +31 -0
- package/src/elevation/elevation.ts +17 -0
- package/{index.js → src/index.ts} +1 -1
- package/src/ripple/ripple.styles.scss +80 -0
- package/src/ripple/ripple.ts +150 -0
- package/src/shared/base.styles.scss +5 -0
- package/src/table/table-body.styles.scss +9 -0
- package/src/table/table-body.ts +21 -0
- package/src/table/table-cell.styles.scss +9 -0
- package/src/table/table-cell.ts +21 -0
- package/src/table/table-head.styles.scss +9 -0
- package/src/table/table-head.ts +21 -0
- package/src/table/table-header-cell.styles.scss +10 -0
- package/src/table/table-header-cell.ts +21 -0
- package/src/table/table-row.styles.scss +3 -0
- package/src/table/table-row.ts +21 -0
- package/src/table/table.styles.scss +12 -0
- package/{table/table.js → src/table/table.ts} +15 -6
- package/src/theme/color.ts +6 -0
- package/src/theme/css-var-builder.ts +36 -0
- package/{theme/index.js → src/theme/index.ts} +0 -1
- package/src/theme/neutral-colors.ts +21 -0
- package/src/theme/rgb-color.ts +19 -0
- package/src/theme/theme-builder.ts +201 -0
- package/{theme/theme-color.d.ts → src/theme/theme-color.ts} +3 -2
- package/tsconfig.json +36 -0
- package/web-dev-server.config.js +25 -0
- package/web-test-runner.config.js +120 -0
- package/button/button-base.d.ts +0 -43
- package/button/button-base.d.ts.map +0 -1
- package/button/button-base.js +0 -152
- package/button/button-base.js.map +0 -1
- package/button/button-base.styles.d.ts +0 -2
- package/button/button-base.styles.d.ts.map +0 -1
- package/button/button-base.styles.js +0 -75
- package/button/button-base.styles.js.map +0 -1
- package/button/button-set.d.ts +0 -20
- package/button/button-set.d.ts.map +0 -1
- package/button/button-set.js +0 -38
- package/button/button-set.js.map +0 -1
- package/button/button-set.styles.d.ts +0 -2
- package/button/button-set.styles.d.ts.map +0 -1
- package/button/button-set.styles.js +0 -39
- package/button/button-set.styles.js.map +0 -1
- package/button/button.d.ts +0 -34
- package/button/button.d.ts.map +0 -1
- package/button/button.js +0 -64
- package/button/button.js.map +0 -1
- package/button/button.styles.d.ts +0 -2
- package/button/button.styles.d.ts.map +0 -1
- package/button/button.styles.js +0 -96
- package/button/button.styles.js.map +0 -1
- package/button/fab.d.ts +0 -31
- package/button/fab.d.ts.map +0 -1
- package/button/fab.js +0 -63
- package/button/fab.js.map +0 -1
- package/button/fab.styles.d.ts +0 -2
- package/button/fab.styles.d.ts.map +0 -1
- package/button/fab.styles.js +0 -89
- package/button/fab.styles.js.map +0 -1
- package/button/icon-button.d.ts +0 -35
- package/button/icon-button.d.ts.map +0 -1
- package/button/icon-button.js +0 -79
- package/button/icon-button.js.map +0 -1
- package/button/icon-button.styles.d.ts +0 -2
- package/button/icon-button.styles.d.ts.map +0 -1
- package/button/icon-button.styles.js +0 -70
- package/button/icon-button.styles.js.map +0 -1
- package/card/card-content.d.ts +0 -13
- package/card/card-content.d.ts.map +0 -1
- package/card/card-content.js +0 -44
- package/card/card-content.js.map +0 -1
- package/card/card-content.styles.d.ts +0 -2
- package/card/card-content.styles.d.ts.map +0 -1
- package/card/card-content.styles.js +0 -15
- package/card/card-content.styles.js.map +0 -1
- package/card/card-media.d.ts +0 -12
- package/card/card-media.d.ts.map +0 -1
- package/card/card-media.js +0 -29
- package/card/card-media.js.map +0 -1
- package/card/card-media.styles.d.ts +0 -2
- package/card/card-media.styles.d.ts.map +0 -1
- package/card/card-media.styles.js +0 -13
- package/card/card-media.styles.js.map +0 -1
- package/card/card.d.ts +0 -19
- package/card/card.d.ts.map +0 -1
- package/card/card.js +0 -40
- package/card/card.js.map +0 -1
- package/card/card.styles.d.ts +0 -2
- package/card/card.styles.d.ts.map +0 -1
- package/card/card.styles.js +0 -28
- package/card/card.styles.js.map +0 -1
- package/checkbox/checkbox.d.ts +0 -16
- package/checkbox/checkbox.d.ts.map +0 -1
- package/checkbox/checkbox.js +0 -75
- package/checkbox/checkbox.js.map +0 -1
- package/container/container.d.ts +0 -13
- package/container/container.d.ts.map +0 -1
- package/container/container.js +0 -23
- package/container/container.js.map +0 -1
- package/container/container.styles.d.ts +0 -2
- package/container/container.styles.d.ts.map +0 -1
- package/container/container.styles.js +0 -43
- package/container/container.styles.js.map +0 -1
- package/custom-elements.json +0 -3706
- package/divider/divider.d.ts +0 -14
- package/divider/divider.d.ts.map +0 -1
- package/divider/divider.js +0 -27
- package/divider/divider.js.map +0 -1
- package/divider/divider.styles.d.ts +0 -2
- package/divider/divider.styles.d.ts.map +0 -1
- package/divider/divider.styles.js +0 -15
- package/divider/divider.styles.js.map +0 -1
- package/elevation/elevation.d.ts +0 -11
- package/elevation/elevation.d.ts.map +0 -1
- package/elevation/elevation.js +0 -21
- package/elevation/elevation.js.map +0 -1
- package/elevation/elevation.styles.d.ts +0 -2
- package/elevation/elevation.styles.d.ts.map +0 -1
- package/elevation/elevation.styles.js +0 -28
- package/elevation/elevation.styles.js.map +0 -1
- package/index.d.ts +0 -27
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/ripple/ripple.d.ts +0 -25
- package/ripple/ripple.d.ts.map +0 -1
- package/ripple/ripple.js +0 -119
- package/ripple/ripple.js.map +0 -1
- package/ripple/ripple.styles.d.ts +0 -2
- package/ripple/ripple.styles.d.ts.map +0 -1
- package/ripple/ripple.styles.js +0 -74
- package/ripple/ripple.styles.js.map +0 -1
- package/shared/base.styles.d.ts +0 -2
- package/shared/base.styles.d.ts.map +0 -1
- package/shared/base.styles.js +0 -9
- package/shared/base.styles.js.map +0 -1
- package/table/table-body.d.ts +0 -11
- package/table/table-body.d.ts.map +0 -1
- package/table/table-body.js +0 -21
- package/table/table-body.js.map +0 -1
- package/table/table-body.styles.d.ts +0 -2
- package/table/table-body.styles.d.ts.map +0 -1
- package/table/table-body.styles.js +0 -11
- package/table/table-body.styles.js.map +0 -1
- package/table/table-cell.d.ts +0 -11
- package/table/table-cell.d.ts.map +0 -1
- package/table/table-cell.js +0 -21
- package/table/table-cell.js.map +0 -1
- package/table/table-cell.styles.d.ts +0 -2
- package/table/table-cell.styles.d.ts.map +0 -1
- package/table/table-cell.styles.js +0 -11
- package/table/table-cell.styles.js.map +0 -1
- package/table/table-head.d.ts +0 -11
- package/table/table-head.d.ts.map +0 -1
- package/table/table-head.js +0 -21
- package/table/table-head.js.map +0 -1
- package/table/table-head.styles.d.ts +0 -2
- package/table/table-head.styles.d.ts.map +0 -1
- package/table/table-head.styles.js +0 -11
- package/table/table-head.styles.js.map +0 -1
- package/table/table-header-cell.d.ts +0 -11
- package/table/table-header-cell.d.ts.map +0 -1
- package/table/table-header-cell.js +0 -21
- package/table/table-header-cell.js.map +0 -1
- package/table/table-header-cell.styles.d.ts +0 -2
- package/table/table-header-cell.styles.d.ts.map +0 -1
- package/table/table-header-cell.styles.js +0 -12
- package/table/table-header-cell.styles.js.map +0 -1
- package/table/table-row.d.ts +0 -11
- package/table/table-row.d.ts.map +0 -1
- package/table/table-row.js +0 -21
- package/table/table-row.js.map +0 -1
- package/table/table-row.styles.d.ts +0 -2
- package/table/table-row.styles.d.ts.map +0 -1
- package/table/table-row.styles.js +0 -7
- package/table/table-row.styles.js.map +0 -1
- package/table/table.d.ts +0 -16
- package/table/table.d.ts.map +0 -1
- package/table/table.js.map +0 -1
- package/table/table.styles.d.ts +0 -2
- package/table/table.styles.d.ts.map +0 -1
- package/table/table.styles.js +0 -16
- package/table/table.styles.js.map +0 -1
- package/theme/color.d.ts +0 -7
- package/theme/color.d.ts.map +0 -1
- package/theme/color.js +0 -2
- package/theme/color.js.map +0 -1
- package/theme/css-var-builder.d.ts +0 -9
- package/theme/css-var-builder.d.ts.map +0 -1
- package/theme/css-var-builder.js +0 -25
- package/theme/css-var-builder.js.map +0 -1
- package/theme/index.d.ts +0 -2
- package/theme/index.d.ts.map +0 -1
- package/theme/index.js.map +0 -1
- package/theme/neutral-colors.d.ts +0 -4
- package/theme/neutral-colors.d.ts.map +0 -1
- package/theme/neutral-colors.js +0 -19
- package/theme/neutral-colors.js.map +0 -1
- package/theme/rgb-color.d.ts +0 -9
- package/theme/rgb-color.d.ts.map +0 -1
- package/theme/rgb-color.js +0 -13
- package/theme/rgb-color.js.map +0 -1
- package/theme/theme-builder.d.ts +0 -27
- package/theme/theme-builder.d.ts.map +0 -1
- package/theme/theme-builder.js +0 -146
- package/theme/theme-builder.js.map +0 -1
- package/theme/theme-color.d.ts.map +0 -1
- package/theme/theme-color.js +0 -2
- package/theme/theme-color.js.map +0 -1
package/button/icon-button.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { CSSResult, HTMLTemplateResult, nothing } from 'lit';
|
|
2
|
-
import '../ripple/ripple.js';
|
|
3
|
-
import { UmButtonBase } from './button-base';
|
|
4
|
-
export type UmIconButtonVariant = 'standard' | 'filled' | 'tonal' | 'outlined';
|
|
5
|
-
export declare class UmIconButton extends UmButtonBase {
|
|
6
|
-
static styles: CSSResult | CSSResult[];
|
|
7
|
-
variant: UmIconButtonVariant;
|
|
8
|
-
/**
|
|
9
|
-
* When true, the button will toggle between selected and unselected
|
|
10
|
-
* states
|
|
11
|
-
*/
|
|
12
|
-
toggle: boolean;
|
|
13
|
-
hasSelectionIcon: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Sets the selected state. When false, displays the default icon. When true,
|
|
16
|
-
* displays the selected icon, or the default icon If no `slot="selected"`
|
|
17
|
-
* icon is provided.
|
|
18
|
-
*/
|
|
19
|
-
selected: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The `aria-label` of the button when the button is toggleable and selected.
|
|
22
|
-
*/
|
|
23
|
-
ariaLabelSelected: string;
|
|
24
|
-
private readonly selectedIcons;
|
|
25
|
-
protected renderContent(): HTMLTemplateResult;
|
|
26
|
-
protected handleClick(_: UIEvent): void;
|
|
27
|
-
getAriaLabel(): string | null | typeof nothing;
|
|
28
|
-
private handleSlotChange;
|
|
29
|
-
}
|
|
30
|
-
declare global {
|
|
31
|
-
interface HTMLElementTagNameMap {
|
|
32
|
-
'u-icon-button': UmIconButton;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=icon-button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/button/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,kBAAkB,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/E,qBACa,YAAa,SAAQ,YAAY;IAE5C,OAAgB,MAAM,EAAE,SAAS,GAAG,SAAS,EAAE,CAA8B;IAElD,OAAO,EAAE,mBAAmB,CAAc;IAErE;;;OAGG;IACwB,MAAM,UAAS;IAEiC,gBAAgB,UAAS;IAEpG;;;;OAIG;IACuC,QAAQ,UAAS;IAE3D;;OAEG;IAC2C,iBAAiB,SAAM;IAGrE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;cAE5B,aAAa,IAAI,kBAAkB;cAUnC,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAMvC,YAAY,IAAI,MAAM,GAAG,IAAI,GAAG,OAAO,OAAO;IAMvD,OAAO,CAAC,gBAAgB;CAGzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
package/button/icon-button.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { html } from 'lit';
|
|
8
|
-
import { customElement, property, queryAssignedElements } from 'lit/decorators.js';
|
|
9
|
-
import '../ripple/ripple.js';
|
|
10
|
-
import { UmButtonBase } from './button-base';
|
|
11
|
-
import { styles as buttonBaseStyles } from './button-base.styles';
|
|
12
|
-
import { styles } from './icon-button.styles';
|
|
13
|
-
let UmIconButton = class UmIconButton extends UmButtonBase {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.variant = 'standard';
|
|
17
|
-
/**
|
|
18
|
-
* When true, the button will toggle between selected and unselected
|
|
19
|
-
* states
|
|
20
|
-
*/
|
|
21
|
-
this.toggle = false;
|
|
22
|
-
this.hasSelectionIcon = false;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the selected state. When false, displays the default icon. When true,
|
|
25
|
-
* displays the selected icon, or the default icon If no `slot="selected"`
|
|
26
|
-
* icon is provided.
|
|
27
|
-
*/
|
|
28
|
-
this.selected = false;
|
|
29
|
-
/**
|
|
30
|
-
* The `aria-label` of the button when the button is toggleable and selected.
|
|
31
|
-
*/
|
|
32
|
-
this.ariaLabelSelected = '';
|
|
33
|
-
}
|
|
34
|
-
renderContent() {
|
|
35
|
-
return html `
|
|
36
|
-
<span class="icon" aria-hidden="true"><slot></slot></span>
|
|
37
|
-
<span class="icon icon-selected" aria-hidden="true">
|
|
38
|
-
<slot name="selected" @slotchange="${this.handleSlotChange}"></slot>
|
|
39
|
-
</span>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
handleClick(_) {
|
|
43
|
-
if (this.toggle) {
|
|
44
|
-
this.selected = !this.selected;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
getAriaLabel() {
|
|
48
|
-
return this.selected
|
|
49
|
-
? this.ariaLabelSelected || super.getAriaLabel()
|
|
50
|
-
: super.getAriaLabel();
|
|
51
|
-
}
|
|
52
|
-
handleSlotChange() {
|
|
53
|
-
this.hasSelectionIcon = this.selectedIcons.length > 0;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
UmIconButton.styles = [buttonBaseStyles, styles];
|
|
57
|
-
__decorate([
|
|
58
|
-
property({ reflect: true })
|
|
59
|
-
], UmIconButton.prototype, "variant", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
property({ type: Boolean })
|
|
62
|
-
], UmIconButton.prototype, "toggle", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
property({ type: Boolean, attribute: 'has-selection-icon', reflect: true })
|
|
65
|
-
], UmIconButton.prototype, "hasSelectionIcon", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
property({ type: Boolean, reflect: true })
|
|
68
|
-
], UmIconButton.prototype, "selected", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
property({ attribute: 'aria-label-selected' })
|
|
71
|
-
], UmIconButton.prototype, "ariaLabelSelected", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
queryAssignedElements({ slot: 'selected', flatten: true })
|
|
74
|
-
], UmIconButton.prototype, "selectedIcons", void 0);
|
|
75
|
-
UmIconButton = __decorate([
|
|
76
|
-
customElement('u-icon-button')
|
|
77
|
-
], UmIconButton);
|
|
78
|
-
export { UmIconButton };
|
|
79
|
-
//# sourceMappingURL=icon-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../src/button/icon-button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAa,IAAI,EAA+B,MAAM,KAAK,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAKvC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,YAAY;IAAvC;;QAIsB,YAAO,GAAwB,UAAU,CAAC;QAErE;;;WAGG;QACwB,WAAM,GAAG,KAAK,CAAC;QAEiC,qBAAgB,GAAG,KAAK,CAAC;QAEpG;;;;WAIG;QACuC,aAAQ,GAAG,KAAK,CAAC;QAE3D;;WAEG;QAC2C,sBAAiB,GAAG,EAAE,CAAC;IA8BvE,CAAC;IAzBoB,aAAa;QAE9B,OAAO,IAAI,CAAA;;;6CAG8B,IAAI,CAAC,gBAAgB;;KAE7D,CAAC;IACJ,CAAC;IAEkB,WAAW,CAAC,CAAU;QACvC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC;IACH,CAAC;IAEQ,YAAY;QACnB,OAAO,IAAI,CAAC,QAAQ;YAClB,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC,YAAY,EAAE;YAChD,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACxD,CAAC;;AAnDe,mBAAM,GAA4B,CAAC,gBAAgB,EAAE,MAAM,CAAC,AAAtD,CAAuD;AAElD;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;6CAA2C;AAM1C;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;4CAAgB;AAEiC;IAA1E,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;sDAA0B;AAO1D;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;8CAAkB;AAKb;IAA7C,QAAQ,CAAC,EAAC,SAAS,EAAE,qBAAqB,EAAC,CAAC;uDAAwB;AAGpD;IADhB,qBAAqB,CAAC,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;mDACV;AA3BpC,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAsDxB","sourcesContent":["import { CSSResult, html, HTMLTemplateResult, nothing } from 'lit';\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js';\n\nimport '../ripple/ripple.js';\nimport { UmButtonBase } from './button-base';\nimport { styles as buttonBaseStyles } from './button-base.styles';\nimport { styles } from './icon-button.styles';\n\nexport type UmIconButtonVariant = 'standard' | 'filled' | 'tonal' | 'outlined';\n\n@customElement('u-icon-button')\nexport class UmIconButton extends UmButtonBase {\n\n static override styles: CSSResult | CSSResult[] = [buttonBaseStyles, styles];\n\n @property({reflect: true}) variant: UmIconButtonVariant = 'standard';\n\n /**\n * When true, the button will toggle between selected and unselected\n * states\n */\n @property({type: Boolean}) toggle = false;\n\n @property({type: Boolean, attribute: 'has-selection-icon', reflect: true}) hasSelectionIcon = false;\n\n /**\n * Sets the selected state. When false, displays the default icon. When true,\n * displays the selected icon, or the default icon If no `slot=\"selected\"`\n * icon is provided.\n */\n @property({type: Boolean, reflect: true}) selected = false;\n\n /**\n * The `aria-label` of the button when the button is toggleable and selected.\n */\n @property({attribute: 'aria-label-selected'}) ariaLabelSelected = '';\n\n @queryAssignedElements({slot: 'selected', flatten: true})\n private readonly selectedIcons!: HTMLElement[];\n\n protected override renderContent(): HTMLTemplateResult {\n\n return html`\n <span class=\"icon\" aria-hidden=\"true\"><slot></slot></span>\n <span class=\"icon icon-selected\" aria-hidden=\"true\">\n <slot name=\"selected\" @slotchange=\"${this.handleSlotChange}\"></slot>\n </span>\n `;\n }\n\n protected override handleClick(_: UIEvent): void {\n if (this.toggle) {\n this.selected = !this.selected;\n }\n }\n\n override getAriaLabel(): string | null | typeof nothing {\n return this.selected\n ? this.ariaLabelSelected || super.getAriaLabel()\n : super.getAriaLabel();\n }\n\n private handleSlotChange() {\n this.hasSelectionIcon = this.selectedIcons.length > 0;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-icon-button': UmIconButton;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.styles.d.ts","sourceRoot":"","sources":["../../src/button/icon-button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAmElB,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const styles = css `
|
|
3
|
-
:host {
|
|
4
|
-
--_surface-container-highest-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));
|
|
5
|
-
width: var(--u-icon-button-size, 2.5rem);
|
|
6
|
-
height: var(--u-icon-button-size, 2.5rem);
|
|
7
|
-
border-radius: var(--u-icon-button-shape-corner, 9999px);
|
|
8
|
-
font-family: var(--u-font-family-base, system-ui);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.icon {
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
font-size: var(--u-icon-button-icon-size, 1.5rem);
|
|
16
|
-
line-height: var(--u-icon-button-icon-size, 1.5rem);
|
|
17
|
-
}
|
|
18
|
-
.icon.icon-selected {
|
|
19
|
-
display: none;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([selected]) .icon:not(.icon-selected) {
|
|
23
|
-
display: none;
|
|
24
|
-
}
|
|
25
|
-
:host([selected]) .icon.icon-selected {
|
|
26
|
-
display: inline-block;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:host([variant=filled]) {
|
|
30
|
-
background-color: var(--u-filled-icon-button-unselected-background-color, var(--_surface-container-highest-color));
|
|
31
|
-
color: var(--u-filled-icon-button-unselected-text-color, var(--_color-primary));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([variant=tonal]) {
|
|
35
|
-
background-color: var(--u-total-icon-button-unselected-background-color, var(--_surface-container-highest-color));
|
|
36
|
-
color: var(--u-tonal-icon-button-unselected-text-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host([selected][variant=filled]),
|
|
40
|
-
:host([variant=filled]:not([has-selection-icon])) {
|
|
41
|
-
background-color: var(--u-filled-icon-button-background-color, var(--_color-primary));
|
|
42
|
-
color: var(--u-filled-icon-button-text-color, var(--u-color-on-primary, rgb(255, 255, 255)));
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([selected][variant=tonal]),
|
|
46
|
-
:host([variant=tonal]:not([has-selection-icon])) {
|
|
47
|
-
background-color: var(--u-tonal-icon-button-background-color, var(--u-color-secondary-container, rgb(232, 222, 248)));
|
|
48
|
-
color: var(--u-tonal-icon-button-text-color, var(--u-color-on-secondary-container, rgb(29, 25, 43)));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host([variant=standard]),
|
|
52
|
-
:host([variant=outlined]) {
|
|
53
|
-
color: var(--u-color-on-surface-variant, rgb(73, 69, 79));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
:host([variant=outlined]) {
|
|
57
|
-
border: 1px solid var(--u-color-outline, rgb(121, 116, 126));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
:host([selected][variant=outlined]) {
|
|
61
|
-
border: none;
|
|
62
|
-
background-color: var(--u-outlined-icon-button-selected-background-color, var(--u-color-inverse-surface, rgb(50, 47, 53)));
|
|
63
|
-
color: var(--u-outlined-icon-button-selected-text-color, var(--u-color-inverse-on-surface, rgb(245, 239, 247)));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([selected][variant=standard]) {
|
|
67
|
-
color: var(--u-standard-icon-button-selected-text-color, var(--_color-primary));
|
|
68
|
-
}
|
|
69
|
-
`;
|
|
70
|
-
//# sourceMappingURL=icon-button.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.styles.js","sourceRoot":"","sources":["../../src/button/icon-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_surface-container-highest-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));\n width: var(--u-icon-button-size, 2.5rem);\n height: var(--u-icon-button-size, 2.5rem);\n border-radius: var(--u-icon-button-shape-corner, 9999px);\n font-family: var(--u-font-family-base, system-ui);\n }\n\n .icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: var(--u-icon-button-icon-size, 1.5rem);\n line-height: var(--u-icon-button-icon-size, 1.5rem);\n }\n .icon.icon-selected {\n display: none;\n }\n\n :host([selected]) .icon:not(.icon-selected) {\n display: none;\n }\n :host([selected]) .icon.icon-selected {\n display: inline-block;\n }\n\n :host([variant=filled]) {\n background-color: var(--u-filled-icon-button-unselected-background-color, var(--_surface-container-highest-color));\n color: var(--u-filled-icon-button-unselected-text-color, var(--_color-primary));\n }\n\n :host([variant=tonal]) {\n background-color: var(--u-total-icon-button-unselected-background-color, var(--_surface-container-highest-color));\n color: var(--u-tonal-icon-button-unselected-text-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n }\n\n :host([selected][variant=filled]),\n :host([variant=filled]:not([has-selection-icon])) {\n background-color: var(--u-filled-icon-button-background-color, var(--_color-primary));\n color: var(--u-filled-icon-button-text-color, var(--u-color-on-primary, rgb(255, 255, 255)));\n }\n\n :host([selected][variant=tonal]),\n :host([variant=tonal]:not([has-selection-icon])) {\n background-color: var(--u-tonal-icon-button-background-color, var(--u-color-secondary-container, rgb(232, 222, 248)));\n color: var(--u-tonal-icon-button-text-color, var(--u-color-on-secondary-container, rgb(29, 25, 43)));\n }\n\n :host([variant=standard]),\n :host([variant=outlined]) {\n color: var(--u-color-on-surface-variant, rgb(73, 69, 79));\n }\n\n :host([variant=outlined]) {\n border: 1px solid var(--u-color-outline, rgb(121, 116, 126));\n }\n\n :host([selected][variant=outlined]) {\n border: none;\n background-color: var(--u-outlined-icon-button-selected-background-color, var(--u-color-inverse-surface, rgb(50, 47, 53)));\n color: var(--u-outlined-icon-button-selected-text-color, var(--u-color-inverse-on-surface, rgb(245, 239, 247)));\n }\n\n :host([selected][variant=standard]) {\n color: var(--u-standard-icon-button-selected-text-color, var(--_color-primary));\n }\n`;\n"]}
|
package/card/card-content.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
export declare class UmCardContent extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
hasContent: boolean;
|
|
5
|
-
render(): HTMLTemplateResult;
|
|
6
|
-
private handleSlotChange;
|
|
7
|
-
}
|
|
8
|
-
declare global {
|
|
9
|
-
interface HTMLElementTagNameMap {
|
|
10
|
-
'u-card-content': UmCardContent;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=card-content.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-content.d.ts","sourceRoot":"","sources":["../../src/card/card-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAM3D,qBACa,aAAc,SAAQ,UAAU;IAE3C,OAAgB,MAAM,4BAAwB;IAEsB,UAAU,UAAS;IAE9E,MAAM,IAAI,kBAAkB;IAKrC,OAAO,CAAC,gBAAgB;CAoBzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
|
package/card/card-content.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html } from 'lit';
|
|
8
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
10
|
-
import { styles } from './card-content.styles';
|
|
11
|
-
let UmCardContent = class UmCardContent extends LitElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.hasContent = false;
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
return html `
|
|
18
|
-
<slot @slotchange="${this.handleSlotChange}"></slot>`;
|
|
19
|
-
}
|
|
20
|
-
handleSlotChange(e) {
|
|
21
|
-
const slot = e.target;
|
|
22
|
-
this.hasContent = slot.assignedElements({ flatten: true }).length > 0;
|
|
23
|
-
if (this.hasContent) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const nodes = slot.assignedNodes({ flatten: true });
|
|
27
|
-
for (const node of nodes) {
|
|
28
|
-
if (node.nodeValue?.trim()) {
|
|
29
|
-
this.hasContent = true;
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
this.hasContent = false;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
UmCardContent.styles = [baseStyles, styles];
|
|
37
|
-
__decorate([
|
|
38
|
-
property({ type: Boolean, attribute: 'has-content', reflect: true })
|
|
39
|
-
], UmCardContent.prototype, "hasContent", void 0);
|
|
40
|
-
UmCardContent = __decorate([
|
|
41
|
-
customElement('u-card-content')
|
|
42
|
-
], UmCardContent);
|
|
43
|
-
export { UmCardContent };
|
|
44
|
-
//# sourceMappingURL=card-content.js.map
|
package/card/card-content.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-content.js","sourceRoot":"","sources":["../../src/card/card-content.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAsB,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAI+D,eAAU,GAAG,KAAK,CAAC;IA2BzF,CAAC;IAzBU,MAAM;QACb,OAAO,IAAI,CAAA;2BACY,IAAI,CAAC,gBAAgB,WAAW,CAAC;IAC1D,CAAC;IAEO,gBAAgB,CAAC,CAAQ;QAC/B,MAAM,IAAI,GAAoB,CAAC,CAAC,MAAM,CAAC;QAEvC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAEpE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAElD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;gBAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,OAAO;YACT,CAAC;QACH,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;;AA5Be,oBAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvB,CAAwB;AAEsB;IAAnE,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;iDAAoB;AAJ5E,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CA+BzB","sourcesContent":["import { HTMLTemplateResult, LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles';\nimport { styles } from './card-content.styles';\n\n@customElement('u-card-content')\nexport class UmCardContent extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n @property({type: Boolean, attribute: 'has-content', reflect: true}) hasContent = false;\n\n override render(): HTMLTemplateResult {\n return html`\n <slot @slotchange=\"${this.handleSlotChange}\"></slot>`;\n }\n\n private handleSlotChange(e: Event) {\n const slot = <HTMLSlotElement>e.target;\n\n this.hasContent = slot.assignedElements({flatten: true}).length > 0;\n\n if (this.hasContent) {\n return;\n }\n\n const nodes = slot.assignedNodes({flatten: true});\n\n for (const node of nodes) {\n if (node.nodeValue?.trim()) {\n this.hasContent = true;\n return;\n }\n }\n\n this.hasContent = false;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-card-content': UmCardContent;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-content.styles.d.ts","sourceRoot":"","sources":["../../src/card/card-content.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAYlB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const styles = css `
|
|
3
|
-
:host {
|
|
4
|
-
display: block;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
:host(:has(slot > *)) {
|
|
8
|
-
display: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host([has-content]) {
|
|
12
|
-
padding: var(--u-card-padding, 16px);
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
//# sourceMappingURL=card-content.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-content.styles.js","sourceRoot":"","sources":["../../src/card/card-content.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;CAYzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n display: block;\n }\n\n :host(:has(slot > *)) {\n display: none;\n }\n\n :host([has-content]) {\n padding: var(--u-card-padding, 16px);\n }\n`;\n"]}
|
package/card/card-media.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
export declare class UmCardMedia extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
wide: boolean;
|
|
5
|
-
render(): HTMLTemplateResult;
|
|
6
|
-
}
|
|
7
|
-
declare global {
|
|
8
|
-
interface HTMLElementTagNameMap {
|
|
9
|
-
'u-card-media': UmCardMedia;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=card-media.d.ts.map
|
package/card/card-media.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-media.d.ts","sourceRoot":"","sources":["../../src/card/card-media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAM3D,qBACa,WAAY,SAAQ,UAAU;IAEzC,OAAgB,MAAM,4BAAwB;IAEJ,IAAI,UAAS;IAE9C,MAAM,IAAI,kBAAkB;CAItC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
package/card/card-media.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html } from 'lit';
|
|
8
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
10
|
-
import { styles } from './card-media.styles';
|
|
11
|
-
let UmCardMedia = class UmCardMedia extends LitElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.wide = false;
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
return html `
|
|
18
|
-
<slot></slot>`;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
UmCardMedia.styles = [baseStyles, styles];
|
|
22
|
-
__decorate([
|
|
23
|
-
property({ type: Boolean, reflect: true })
|
|
24
|
-
], UmCardMedia.prototype, "wide", void 0);
|
|
25
|
-
UmCardMedia = __decorate([
|
|
26
|
-
customElement('u-card-media')
|
|
27
|
-
], UmCardMedia);
|
|
28
|
-
export { UmCardMedia };
|
|
29
|
-
//# sourceMappingURL=card-media.js.map
|
package/card/card-media.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-media.js","sourceRoot":"","sources":["../../src/card/card-media.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAsB,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAIqC,SAAI,GAAG,KAAK,CAAC;IAMzD,CAAC;IAJU,MAAM;QACb,OAAO,IAAI,CAAA;oBACK,CAAC;IACnB,CAAC;;AAPe,kBAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvB,CAAwB;AAEJ;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;yCAAc;AAJ5C,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAUvB","sourcesContent":["import { HTMLTemplateResult, LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles';\nimport { styles } from './card-media.styles';\n\n@customElement('u-card-media')\nexport class UmCardMedia extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n @property({type: Boolean, reflect: true}) wide = false;\n\n override render(): HTMLTemplateResult {\n return html`\n <slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-card-media': UmCardMedia;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-media.styles.d.ts","sourceRoot":"","sources":["../../src/card/card-media.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAUlB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const styles = css `
|
|
3
|
-
:host {
|
|
4
|
-
display: block;
|
|
5
|
-
aspect-ratio: 1;
|
|
6
|
-
border-radius: var(--u-card-shape-corner, var(--u-shape-corner-medium, 12px));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host([wide]) {
|
|
10
|
-
aspect-ratio: 16/9;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
//# sourceMappingURL=card-media.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-media.styles.js","sourceRoot":"","sources":["../../src/card/card-media.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;CAUzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n display: block;\n aspect-ratio: 1;\n border-radius: var(--u-card-shape-corner, var(--u-shape-corner-medium, 12px));\n }\n\n :host([wide]) {\n aspect-ratio: 16/9;\n }\n`;\n"]}
|
package/card/card.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import './card-content.js';
|
|
3
|
-
import './card-media.js';
|
|
4
|
-
import '../elevation/elevation.js';
|
|
5
|
-
export type UmCardVariant = 'filled' | 'elevated' | 'outlined';
|
|
6
|
-
export declare class UmCard extends LitElement {
|
|
7
|
-
static styles: import("lit").CSSResult[];
|
|
8
|
-
/**
|
|
9
|
-
* The Card variant to render.
|
|
10
|
-
*/
|
|
11
|
-
variant: UmCardVariant;
|
|
12
|
-
render(): HTMLTemplateResult;
|
|
13
|
-
}
|
|
14
|
-
declare global {
|
|
15
|
-
interface HTMLElementTagNameMap {
|
|
16
|
-
'u-card': UmCard;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=card.d.ts.map
|
package/card/card.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/card/card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAK3D,OAAO,mBAAmB,CAAC;AAC3B,OAAO,iBAAiB,CAAC;AACzB,OAAO,2BAA2B,CAAC;AAEnC,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAE/D,qBACa,MAAO,SAAQ,UAAU;IAEpC,OAAgB,MAAM,4BAAwB;IAE9C;;OAEG;IACwB,OAAO,EAAE,aAAa,CAAc;IAEtD,MAAM,IAAI,kBAAkB;CAStC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,MAAM,CAAC;KAClB;CACF"}
|
package/card/card.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { html, LitElement } from 'lit';
|
|
8
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
10
|
-
import { styles } from './card.styles';
|
|
11
|
-
import './card-content.js';
|
|
12
|
-
import './card-media.js';
|
|
13
|
-
import '../elevation/elevation.js';
|
|
14
|
-
let UmCard = class UmCard extends LitElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
/**
|
|
18
|
-
* The Card variant to render.
|
|
19
|
-
*/
|
|
20
|
-
this.variant = 'elevated';
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
return html `
|
|
24
|
-
<u-elevation></u-elevation>
|
|
25
|
-
<slot name="before-content"></slot>
|
|
26
|
-
<u-card-content>
|
|
27
|
-
<slot></slot>
|
|
28
|
-
</u-card-content>
|
|
29
|
-
<slot name="after-content"></slot>`;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
UmCard.styles = [baseStyles, styles];
|
|
33
|
-
__decorate([
|
|
34
|
-
property({ reflect: true })
|
|
35
|
-
], UmCard.prototype, "variant", void 0);
|
|
36
|
-
UmCard = __decorate([
|
|
37
|
-
customElement('u-card')
|
|
38
|
-
], UmCard);
|
|
39
|
-
export { UmCard };
|
|
40
|
-
//# sourceMappingURL=card.js.map
|
package/card/card.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/card/card.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAsB,UAAU,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,iBAAiB,CAAC;AACzB,OAAO,2BAA2B,CAAC;AAK5B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAA/B;;QAIL;;WAEG;QACwB,YAAO,GAAkB,UAAU,CAAC;IAWjE,CAAC;IATU,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;yCAM0B,CAAC;IACxC,CAAC;;AAfe,aAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvB,CAAwB;AAKnB;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;uCAAqC;AAPpD,MAAM;IADlB,aAAa,CAAC,QAAQ,CAAC;GACX,MAAM,CAkBlB","sourcesContent":["import { html, HTMLTemplateResult, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles';\nimport { styles } from './card.styles';\nimport './card-content.js';\nimport './card-media.js';\nimport '../elevation/elevation.js';\n\nexport type UmCardVariant = 'filled' | 'elevated' | 'outlined';\n\n@customElement('u-card')\nexport class UmCard extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n /**\n * The Card variant to render.\n */\n @property({reflect: true}) variant: UmCardVariant = 'elevated';\n\n override render(): HTMLTemplateResult {\n return html`\n <u-elevation></u-elevation>\n <slot name=\"before-content\"></slot>\n <u-card-content>\n <slot></slot>\n </u-card-content>\n <slot name=\"after-content\"></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-card': UmCard;\n }\n}\n"]}
|
package/card/card.styles.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.styles.d.ts","sourceRoot":"","sources":["../../src/card/card.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAyBlB,CAAC"}
|
package/card/card.styles.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const styles = css `
|
|
3
|
-
:host {
|
|
4
|
-
display: block;
|
|
5
|
-
position: relative;
|
|
6
|
-
border-radius: var(--u-card-shape-corner, var(--u-shape-corner-medium, 12px));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host(:not(:first-child)) {
|
|
10
|
-
margin-top: 8px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([variant=elevated]) {
|
|
14
|
-
background-color: var(--u-color-surface-container-low, rgb(247, 242, 250));
|
|
15
|
-
}
|
|
16
|
-
:host([variant=elevated]) u-elevation {
|
|
17
|
-
--u-elevation-level: var(--u-elevated-card-elevation-level, 1);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([variant=filled]) {
|
|
21
|
-
background-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host([variant=outlined]) {
|
|
25
|
-
border: var(--u-outlined-card-outline-width, 1px) solid var(--u-outlined-card-outline-color, var(--u-color-outline-variant, rgb(202, 196, 208)));
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
//# sourceMappingURL=card.styles.js.map
|
package/card/card.styles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.styles.js","sourceRoot":"","sources":["../../src/card/card.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n display: block;\n position: relative;\n border-radius: var(--u-card-shape-corner, var(--u-shape-corner-medium, 12px));\n }\n\n :host(:not(:first-child)) {\n margin-top: 8px;\n }\n\n :host([variant=elevated]) {\n background-color: var(--u-color-surface-container-low, rgb(247, 242, 250));\n }\n :host([variant=elevated]) u-elevation {\n --u-elevation-level: var(--u-elevated-card-elevation-level, 1);\n }\n\n :host([variant=filled]) {\n background-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));\n }\n\n :host([variant=outlined]) {\n border: var(--u-outlined-card-outline-width, 1px) solid var(--u-outlined-card-outline-color, var(--u-color-outline-variant, rgb(202, 196, 208)));\n }\n`;\n"]}
|
package/checkbox/checkbox.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
export declare class UmCheckbox extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
private readonly ripple;
|
|
5
|
-
private readonly assignedInputs;
|
|
6
|
-
private input;
|
|
7
|
-
render(): HTMLTemplateResult;
|
|
8
|
-
private handleSlotChange;
|
|
9
|
-
private handleInputChange;
|
|
10
|
-
}
|
|
11
|
-
declare global {
|
|
12
|
-
interface HTMLElementTagNameMap {
|
|
13
|
-
'u-checkbox': UmCheckbox;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,kBAAkB,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMhE,qBACa,UAAW,SAAQ,UAAU;IACxC,OAAgB,MAAM,4BA4BpB;IAEiB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IAEtD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAsB;IAErD,OAAO,CAAC,KAAK,CAA+B;IAEnC,MAAM,IAAI,kBAAkB;IAOrC,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,iBAAiB,CAIvB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,UAAU,CAAC;KAC1B;CACF"}
|
package/checkbox/checkbox.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { css, html, LitElement } from 'lit';
|
|
8
|
-
import { customElement, query, queryAssignedElements } from 'lit/decorators.js';
|
|
9
|
-
import { styles as baseStyles } from '../shared/base.styles';
|
|
10
|
-
let UmCheckbox = class UmCheckbox extends LitElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.handleInputChange = (e) => {
|
|
14
|
-
if (this.input !== document.elementFromPoint(e.clientX, e.clientY)) {
|
|
15
|
-
this.ripple.createRipple();
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return html `
|
|
21
|
-
<div class="touch">
|
|
22
|
-
<u-ripple><slot @slotchange="${this.handleSlotChange}"></slot></u-ripple>
|
|
23
|
-
</div>`;
|
|
24
|
-
}
|
|
25
|
-
handleSlotChange() {
|
|
26
|
-
console.log('slotchange');
|
|
27
|
-
if (this.input) {
|
|
28
|
-
this.input.removeEventListener('click', this.handleInputChange);
|
|
29
|
-
}
|
|
30
|
-
this.input = this.assignedInputs[0];
|
|
31
|
-
if (this.input) {
|
|
32
|
-
this.input.addEventListener('click', this.handleInputChange);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
UmCheckbox.styles = [
|
|
37
|
-
baseStyles,
|
|
38
|
-
css `
|
|
39
|
-
:host {
|
|
40
|
-
position: relative;
|
|
41
|
-
display: inline-flex;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
align-items: center;
|
|
44
|
-
width: 48px;
|
|
45
|
-
height: 48px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
::slotted(input) {
|
|
49
|
-
position: relative;
|
|
50
|
-
padding: 0;
|
|
51
|
-
margin: 0;
|
|
52
|
-
aspect-ratio: 1;
|
|
53
|
-
height: 100%;
|
|
54
|
-
z-index: 1;
|
|
55
|
-
appearance: none;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.touch {
|
|
59
|
-
position: absolute;
|
|
60
|
-
inset: 0;
|
|
61
|
-
border-radius: 9999px;
|
|
62
|
-
}
|
|
63
|
-
`
|
|
64
|
-
];
|
|
65
|
-
__decorate([
|
|
66
|
-
query('u-ripple')
|
|
67
|
-
], UmCheckbox.prototype, "ripple", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
queryAssignedElements({ selector: 'input', flatten: true })
|
|
70
|
-
], UmCheckbox.prototype, "assignedInputs", void 0);
|
|
71
|
-
UmCheckbox = __decorate([
|
|
72
|
-
customElement('u-checkbox')
|
|
73
|
-
], UmCheckbox);
|
|
74
|
-
export { UmCheckbox };
|
|
75
|
-
//# sourceMappingURL=checkbox.js.map
|
package/checkbox/checkbox.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAsB,UAAU,EAAE,MAAM,KAAK,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGtD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QA0DG,sBAAiB,GAAG,CAAC,CAAa,EAAE,EAAE;YAC5C,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IA1BU,MAAM;QACb,OAAO,IAAI,CAAA;;uCAEwB,IAAI,CAAC,gBAAgB;aAC/C,CAAC;IACZ,CAAC;IAEO,gBAAgB;QACtB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAE1B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAEpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;;AAvDe,iBAAM,GAAG;IACvB,UAAU;IACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAyBF;CACF,AA5BqB,CA4BpB;AAEkC;IAAnC,KAAK,CAAC,UAAU,CAAC;0CAAoC;AAErC;IADhB,qBAAqB,CAAC,EAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;kDACL;AAjC1C,UAAU;IADtB,aAAa,CAAC,YAAY,CAAC;GACf,UAAU,CA+DtB","sourcesContent":["import { css, html, HTMLTemplateResult, LitElement } from 'lit';\nimport { customElement, query, queryAssignedElements } from 'lit/decorators.js';\n\nimport { UmRipple } from '../ripple/ripple';\nimport { styles as baseStyles } from '../shared/base.styles';\n\n@customElement('u-checkbox')\nexport class UmCheckbox extends LitElement {\n static override styles = [\n baseStyles,\n css`\n :host {\n position: relative;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 48px;\n height: 48px;\n }\n \n ::slotted(input) {\n position: relative;\n padding: 0;\n margin: 0;\n aspect-ratio: 1;\n height: 100%;\n z-index: 1;\n appearance: none;\n }\n \n .touch {\n position: absolute;\n inset: 0;\n border-radius: 9999px;\n }\n `\n ];\n\n @query('u-ripple') private readonly ripple!: UmRipple;\n @queryAssignedElements({selector: 'input', flatten: true})\n private readonly assignedInputs!: HTMLInputElement[];\n\n private input: HTMLInputElement | undefined;\n\n override render(): HTMLTemplateResult {\n return html`\n <div class=\"touch\">\n <u-ripple><slot @slotchange=\"${this.handleSlotChange}\"></slot></u-ripple>\n </div>`;\n }\n\n private handleSlotChange(): void {\n console.log('slotchange');\n\n if (this.input) {\n this.input.removeEventListener('click', this.handleInputChange);\n }\n\n this.input = this.assignedInputs[0];\n\n if (this.input) {\n this.input.addEventListener('click', this.handleInputChange);\n }\n }\n\n private handleInputChange = (e: MouseEvent) => {\n if (this.input !== document.elementFromPoint(e.clientX, e.clientY)) {\n this.ripple.createRipple();\n }\n };\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-checkbox': UmCheckbox;\n }\n}\n"]}
|
package/container/container.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
export type UmSpacingSizes = 'none' | 'small' | 'medium ' | 'large' | 'extra-large';
|
|
3
|
-
export declare class UmContainer extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult;
|
|
5
|
-
margin: UmSpacingSizes | undefined;
|
|
6
|
-
render(): HTMLTemplateResult;
|
|
7
|
-
}
|
|
8
|
-
declare global {
|
|
9
|
-
interface HTMLElementTagNameMap {
|
|
10
|
-
'u-container': UmContainer;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/container/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAK3D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAEpF,qBACa,WAAY,SAAQ,UAAU;IAEzC,OAAgB,MAAM,0BAAU;IAEL,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC;IAErD,MAAM,IAAI,kBAAkB;CAGtC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,WAAW,CAAC;KAC5B;CACF"}
|