@moni-labs/moni-ui 0.2.0 → 0.3.0
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/README.md +52 -194
- package/custom-elements.json +1636 -350
- package/dist/actions/index.d.ts +6 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +6 -0
- package/dist/components/_base/field-styles.d.ts +51 -16
- package/dist/components/_base/field-styles.d.ts.map +1 -1
- package/dist/components/_base/field-styles.js +164 -36
- package/dist/components/_base/index.d.ts +25 -0
- package/dist/components/_base/index.d.ts.map +1 -1
- package/dist/components/_base/index.js +25 -0
- package/dist/components/_base/interaction-styles.d.ts +39 -12
- package/dist/components/_base/interaction-styles.d.ts.map +1 -1
- package/dist/components/_base/interaction-styles.js +85 -33
- package/dist/components/_base/moni-element.d.ts +43 -8
- package/dist/components/_base/moni-element.d.ts.map +1 -1
- package/dist/components/_base/moni-element.js +43 -8
- package/dist/components/_base/shared-styles.d.ts +41 -17
- package/dist/components/_base/shared-styles.d.ts.map +1 -1
- package/dist/components/_base/shared-styles.js +113 -21
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +6 -0
- package/dist/components/loading-shapes.d.ts +6 -0
- package/dist/components/loading-shapes.d.ts.map +1 -1
- package/dist/components/loading-shapes.js +6 -0
- package/dist/components/moni-app-bar.d.ts +128 -33
- package/dist/components/moni-app-bar.d.ts.map +1 -1
- package/dist/components/moni-app-bar.js +121 -26
- package/dist/components/moni-badge.d.ts +122 -14
- package/dist/components/moni-badge.d.ts.map +1 -1
- package/dist/components/moni-badge.js +122 -14
- package/dist/components/moni-bottom-sheet.d.ts +120 -15
- package/dist/components/moni-bottom-sheet.d.ts.map +1 -1
- package/dist/components/moni-bottom-sheet.js +116 -12
- package/dist/components/moni-button-group.d.ts +53 -27
- package/dist/components/moni-button-group.d.ts.map +1 -1
- package/dist/components/moni-button-group.js +49 -23
- package/dist/components/moni-button-segment.d.ts +28 -8
- package/dist/components/moni-button-segment.d.ts.map +1 -1
- package/dist/components/moni-button-segment.js +27 -7
- package/dist/components/moni-button.d.ts +51 -32
- package/dist/components/moni-button.d.ts.map +1 -1
- package/dist/components/moni-button.js +50 -31
- package/dist/components/moni-card.d.ts +91 -31
- package/dist/components/moni-card.d.ts.map +1 -1
- package/dist/components/moni-card.js +86 -26
- package/dist/components/moni-carousel.d.ts +67 -17
- package/dist/components/moni-carousel.d.ts.map +1 -1
- package/dist/components/moni-carousel.js +59 -16
- package/dist/components/moni-checkbox.d.ts +122 -17
- package/dist/components/moni-checkbox.d.ts.map +1 -1
- package/dist/components/moni-checkbox.js +118 -14
- package/dist/components/moni-chip.d.ts +56 -30
- package/dist/components/moni-chip.d.ts.map +1 -1
- package/dist/components/moni-chip.js +51 -25
- package/dist/components/moni-color-field.d.ts +44 -6
- package/dist/components/moni-color-field.d.ts.map +1 -1
- package/dist/components/moni-color-field.js +43 -5
- package/dist/components/moni-context-menu.d.ts +44 -22
- package/dist/components/moni-context-menu.d.ts.map +1 -1
- package/dist/components/moni-context-menu.js +43 -21
- package/dist/components/moni-dialog.d.ts +107 -15
- package/dist/components/moni-dialog.d.ts.map +1 -1
- package/dist/components/moni-dialog.js +105 -14
- package/dist/components/moni-divider.d.ts +50 -15
- package/dist/components/moni-divider.d.ts.map +1 -1
- package/dist/components/moni-divider.js +49 -14
- package/dist/components/moni-expansion.d.ts +44 -8
- package/dist/components/moni-expansion.d.ts.map +1 -1
- package/dist/components/moni-expansion.js +43 -7
- package/dist/components/moni-fab-menu.d.ts +39 -20
- package/dist/components/moni-fab-menu.d.ts.map +1 -1
- package/dist/components/moni-fab-menu.js +38 -19
- package/dist/components/moni-fab.d.ts +49 -23
- package/dist/components/moni-fab.d.ts.map +1 -1
- package/dist/components/moni-fab.js +46 -20
- package/dist/components/moni-file-field.d.ts +54 -14
- package/dist/components/moni-file-field.d.ts.map +1 -1
- package/dist/components/moni-file-field.js +53 -13
- package/dist/components/moni-icon.d.ts +78 -11
- package/dist/components/moni-icon.d.ts.map +1 -1
- package/dist/components/moni-icon.js +77 -10
- package/dist/components/moni-list-item.d.ts +61 -30
- package/dist/components/moni-list-item.d.ts.map +1 -1
- package/dist/components/moni-list-item.js +55 -24
- package/dist/components/moni-list.d.ts +37 -13
- package/dist/components/moni-list.d.ts.map +1 -1
- package/dist/components/moni-list.js +36 -12
- package/dist/components/moni-loading-indicator.d.ts +38 -11
- package/dist/components/moni-loading-indicator.d.ts.map +1 -1
- package/dist/components/moni-loading-indicator.js +37 -10
- package/dist/components/moni-menu-item.d.ts +31 -8
- package/dist/components/moni-menu-item.d.ts.map +1 -1
- package/dist/components/moni-menu-item.js +30 -7
- package/dist/components/moni-menu.d.ts +58 -33
- package/dist/components/moni-menu.d.ts.map +1 -1
- package/dist/components/moni-menu.js +51 -26
- package/dist/components/moni-morph-modal.d.ts +7 -1
- package/dist/components/moni-morph-modal.d.ts.map +1 -1
- package/dist/components/moni-morph-modal.js +46 -24
- package/dist/components/moni-nav-item.d.ts +50 -10
- package/dist/components/moni-nav-item.d.ts.map +1 -1
- package/dist/components/moni-nav-item.js +48 -8
- package/dist/components/moni-nav.d.ts +57 -22
- package/dist/components/moni-nav.d.ts.map +1 -1
- package/dist/components/moni-nav.js +53 -18
- package/dist/components/moni-progress.d.ts +108 -20
- package/dist/components/moni-progress.d.ts.map +1 -1
- package/dist/components/moni-progress.js +104 -16
- package/dist/components/moni-radio.d.ts +106 -14
- package/dist/components/moni-radio.d.ts.map +1 -1
- package/dist/components/moni-radio.js +104 -13
- package/dist/components/moni-ripple.d.ts +121 -10
- package/dist/components/moni-ripple.d.ts.map +1 -1
- package/dist/components/moni-ripple.js +120 -9
- package/dist/components/moni-segmented-button.d.ts +31 -11
- package/dist/components/moni-segmented-button.d.ts.map +1 -1
- package/dist/components/moni-segmented-button.js +30 -10
- package/dist/components/moni-select-option.d.ts +43 -9
- package/dist/components/moni-select-option.d.ts.map +1 -1
- package/dist/components/moni-select-option.js +41 -7
- package/dist/components/moni-select.d.ts +59 -2
- package/dist/components/moni-select.d.ts.map +1 -1
- package/dist/components/moni-select.js +58 -1
- package/dist/components/moni-shape.d.ts +1 -1
- package/dist/components/moni-side-sheet.d.ts +56 -19
- package/dist/components/moni-side-sheet.d.ts.map +1 -1
- package/dist/components/moni-side-sheet.js +53 -16
- package/dist/components/moni-slider.d.ts +56 -25
- package/dist/components/moni-slider.d.ts.map +1 -1
- package/dist/components/moni-slider.js +55 -24
- package/dist/components/moni-snackbar.d.ts +86 -17
- package/dist/components/moni-snackbar.d.ts.map +1 -1
- package/dist/components/moni-snackbar.js +85 -16
- package/dist/components/moni-split-button.d.ts +38 -9
- package/dist/components/moni-split-button.d.ts.map +1 -1
- package/dist/components/moni-split-button.js +37 -8
- package/dist/components/moni-step.d.ts +42 -9
- package/dist/components/moni-step.d.ts.map +1 -1
- package/dist/components/moni-step.js +41 -8
- package/dist/components/moni-stepper.d.ts +43 -6
- package/dist/components/moni-stepper.d.ts.map +1 -1
- package/dist/components/moni-stepper.js +42 -5
- package/dist/components/moni-switch.d.ts +103 -16
- package/dist/components/moni-switch.d.ts.map +1 -1
- package/dist/components/moni-switch.js +99 -13
- package/dist/components/moni-tab.d.ts +35 -8
- package/dist/components/moni-tab.d.ts.map +1 -1
- package/dist/components/moni-tab.js +34 -7
- package/dist/components/moni-tabs.d.ts +51 -13
- package/dist/components/moni-tabs.d.ts.map +1 -1
- package/dist/components/moni-tabs.js +48 -10
- package/dist/components/moni-text-field.d.ts +55 -10
- package/dist/components/moni-text-field.d.ts.map +1 -1
- package/dist/components/moni-text-field.js +54 -9
- package/dist/components/moni-textarea.d.ts +51 -21
- package/dist/components/moni-textarea.d.ts.map +1 -1
- package/dist/components/moni-textarea.js +48 -18
- package/dist/components/moni-time-picker.d.ts +41 -11
- package/dist/components/moni-time-picker.d.ts.map +1 -1
- package/dist/components/moni-time-picker.js +40 -10
- package/dist/components/moni-toolbar.d.ts +43 -15
- package/dist/components/moni-toolbar.d.ts.map +1 -1
- package/dist/components/moni-toolbar.js +42 -14
- package/dist/components/moni-tooltip.d.ts +55 -25
- package/dist/components/moni-tooltip.d.ts.map +1 -1
- package/dist/components/moni-tooltip.js +54 -24
- package/dist/components/moni-typography.d.ts +43 -18
- package/dist/components/moni-typography.d.ts.map +1 -1
- package/dist/components/moni-typography.js +42 -17
- package/dist/index.d.ts +47 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -2
- package/dist/styles/tailwind.css +67 -0
- package/dist/styles/tokens.css +111 -99
- package/dist/utils/color.d.ts +181 -2
- package/dist/utils/color.d.ts.map +1 -1
- package/dist/utils/color.js +182 -4
- package/dist/utils/theme.svelte.d.ts +305 -2
- package/dist/utils/theme.svelte.d.ts.map +1 -1
- package/dist/utils/theme.svelte.js +331 -2
- package/dist/web-components.d.ts +28 -0
- package/dist/web-components.d.ts.map +1 -1
- package/dist/web-components.js +29 -2
- package/package.json +1 -1
- package/src/actions/index.ts +7 -0
- package/src/components/_base/field-styles.ts +165 -37
- package/src/components/_base/index.ts +27 -0
- package/src/components/_base/interaction-styles.ts +86 -33
- package/src/components/_base/moni-element.ts +44 -8
- package/src/components/_base/shared-styles.ts +114 -21
- package/src/components/index.ts +7 -0
- package/src/components/loading-shapes.ts +7 -0
- package/src/components/moni-app-bar.ts +127 -26
- package/src/components/moni-badge.ts +128 -14
- package/src/components/moni-bottom-sheet.ts +125 -13
- package/src/components/moni-button-group.ts +50 -23
- package/src/components/moni-button-segment.ts +28 -7
- package/src/components/moni-button.ts +51 -31
- package/src/components/moni-card.ts +90 -26
- package/src/components/moni-carousel.ts +67 -16
- package/src/components/moni-checkbox.ts +125 -14
- package/src/components/moni-chip.ts +52 -25
- package/src/components/moni-color-field.ts +44 -5
- package/src/components/moni-context-menu.ts +44 -21
- package/src/components/moni-dialog.ts +111 -14
- package/src/components/moni-divider.ts +50 -14
- package/src/components/moni-expansion.ts +44 -7
- package/src/components/moni-fab-menu.ts +39 -19
- package/src/components/moni-fab.ts +47 -20
- package/src/components/moni-file-field.ts +54 -13
- package/src/components/moni-icon.ts +80 -10
- package/src/components/moni-list-item.ts +56 -24
- package/src/components/moni-list.ts +37 -12
- package/src/components/moni-loading-indicator.ts +38 -10
- package/src/components/moni-menu-item.ts +31 -7
- package/src/components/moni-menu.ts +52 -26
- package/src/components/moni-morph-modal.ts +58 -24
- package/src/components/moni-nav-item.ts +49 -8
- package/src/components/moni-nav.ts +54 -18
- package/src/components/moni-progress.ts +109 -16
- package/src/components/moni-radio.ts +111 -13
- package/src/components/moni-ripple.ts +126 -9
- package/src/components/moni-segmented-button.ts +31 -10
- package/src/components/moni-select-option.ts +42 -7
- package/src/components/moni-select.ts +79 -1
- package/src/components/moni-side-sheet.ts +54 -16
- package/src/components/moni-slider.ts +56 -24
- package/src/components/moni-snackbar.ts +90 -16
- package/src/components/moni-split-button.ts +38 -8
- package/src/components/moni-step.ts +42 -8
- package/src/components/moni-stepper.ts +43 -5
- package/src/components/moni-switch.ts +106 -13
- package/src/components/moni-tab.ts +35 -7
- package/src/components/moni-tabs.ts +49 -10
- package/src/components/moni-text-field.ts +55 -9
- package/src/components/moni-textarea.ts +49 -18
- package/src/components/moni-time-picker.ts +41 -10
- package/src/components/moni-toolbar.ts +43 -14
- package/src/components/moni-tooltip.ts +55 -24
- package/src/components/moni-typography.ts +43 -17
- package/src/index.ts +67 -3
- package/src/styles/tailwind.css +67 -0
- package/src/styles/tokens.css +111 -99
- package/src/types/svelte-runes.d.ts +64 -2
- package/src/utils/color.ts +286 -5
- package/src/utils/theme.svelte.ts +411 -2
- package/src/web-components.ts +31 -2
- package/dist/assets/shapes/arch.svg +0 -1
- package/dist/assets/shapes/arrow.svg +0 -1
- package/dist/assets/shapes/boom.svg +0 -1
- package/dist/assets/shapes/burst.svg +0 -1
- package/dist/assets/shapes/circle.svg +0 -1
- package/dist/assets/shapes/clamshell.svg +0 -1
- package/dist/assets/shapes/diamond.svg +0 -1
- package/dist/assets/shapes/fan.svg +0 -1
- package/dist/assets/shapes/flower.svg +0 -1
- package/dist/assets/shapes/gem.svg +0 -1
- package/dist/assets/shapes/ghost-ish.svg +0 -1
- package/dist/assets/shapes/heart.svg +0 -1
- package/dist/assets/shapes/leaf-clover4.svg +0 -1
- package/dist/assets/shapes/leaf-clover8.svg +0 -1
- package/dist/assets/shapes/loading-indicator.svg +0 -1
- package/dist/assets/shapes/oval.svg +0 -1
- package/dist/assets/shapes/pentagon.svg +0 -1
- package/dist/assets/shapes/pill.svg +0 -1
- package/dist/assets/shapes/pixel-circle.svg +0 -1
- package/dist/assets/shapes/pixel-triangle.svg +0 -1
- package/dist/assets/shapes/puffy-diamond.svg +0 -1
- package/dist/assets/shapes/puffy.svg +0 -1
- package/dist/assets/shapes/semicircle.svg +0 -1
- package/dist/assets/shapes/sided-cookie12.svg +0 -1
- package/dist/assets/shapes/sided-cookie4.svg +0 -1
- package/dist/assets/shapes/sided-cookie6.svg +0 -1
- package/dist/assets/shapes/sided-cookie7.svg +0 -1
- package/dist/assets/shapes/sided-cookie9.svg +0 -1
- package/dist/assets/shapes/slanted.svg +0 -1
- package/dist/assets/shapes/soft-boom.svg +0 -1
- package/dist/assets/shapes/soft-burst.svg +0 -1
- package/dist/assets/shapes/square.svg +0 -1
- package/dist/assets/shapes/sunny.svg +0 -1
- package/dist/assets/shapes/triangle.svg +0 -1
- package/dist/assets/shapes/very-sunny.svg +0 -1
- package/dist/assets/shapes/wavy-circle.svg +0 -1
- package/dist/assets/shapes/wavy.svg +0 -1
- package/src/assets/shapes/arch.svg +0 -1
- package/src/assets/shapes/arrow.svg +0 -1
- package/src/assets/shapes/boom.svg +0 -1
- package/src/assets/shapes/burst.svg +0 -1
- package/src/assets/shapes/circle.svg +0 -1
- package/src/assets/shapes/clamshell.svg +0 -1
- package/src/assets/shapes/diamond.svg +0 -1
- package/src/assets/shapes/fan.svg +0 -1
- package/src/assets/shapes/flower.svg +0 -1
- package/src/assets/shapes/gem.svg +0 -1
- package/src/assets/shapes/ghost-ish.svg +0 -1
- package/src/assets/shapes/heart.svg +0 -1
- package/src/assets/shapes/leaf-clover4.svg +0 -1
- package/src/assets/shapes/leaf-clover8.svg +0 -1
- package/src/assets/shapes/loading-indicator.svg +0 -1
- package/src/assets/shapes/oval.svg +0 -1
- package/src/assets/shapes/pentagon.svg +0 -1
- package/src/assets/shapes/pill.svg +0 -1
- package/src/assets/shapes/pixel-circle.svg +0 -1
- package/src/assets/shapes/pixel-triangle.svg +0 -1
- package/src/assets/shapes/puffy-diamond.svg +0 -1
- package/src/assets/shapes/puffy.svg +0 -1
- package/src/assets/shapes/semicircle.svg +0 -1
- package/src/assets/shapes/sided-cookie12.svg +0 -1
- package/src/assets/shapes/sided-cookie4.svg +0 -1
- package/src/assets/shapes/sided-cookie6.svg +0 -1
- package/src/assets/shapes/sided-cookie7.svg +0 -1
- package/src/assets/shapes/sided-cookie9.svg +0 -1
- package/src/assets/shapes/slanted.svg +0 -1
- package/src/assets/shapes/soft-boom.svg +0 -1
- package/src/assets/shapes/soft-burst.svg +0 -1
- package/src/assets/shapes/square.svg +0 -1
- package/src/assets/shapes/sunny.svg +0 -1
- package/src/assets/shapes/triangle.svg +0 -1
- package/src/assets/shapes/very-sunny.svg +0 -1
- package/src/assets/shapes/wavy-circle.svg +0 -1
- package/src/assets/shapes/wavy.svg +0 -1
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file components/moni-card.ts
|
|
3
|
+
* @package @moni-labs/moni-ui
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @contributors Moni Labs & Contributors
|
|
6
|
+
*/
|
|
1
7
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
8
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
9
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,43 +14,97 @@ import { html, css } from 'lit';
|
|
|
8
14
|
import { customElement, property } from 'lit/decorators.js';
|
|
9
15
|
import { MoniElement, sharedStyles } from './_base/index.js';
|
|
10
16
|
/**
|
|
11
|
-
* Material 3 Card
|
|
17
|
+
* Material Design 3 Card component.
|
|
18
|
+
*
|
|
19
|
+
* Cards display content and actions about a single subject. They are
|
|
20
|
+
* container surfaces that group related information together, making it
|
|
21
|
+
* easy for users to scan and interact with collections of related data.
|
|
22
|
+
*
|
|
23
|
+
* **M3 spec reference:** `m3-docs/components/cards/specs.md`
|
|
24
|
+
*
|
|
25
|
+
* **Variants:**
|
|
26
|
+
* - `elevated` (default) — `surface-container-low` background + `--elevate1` shadow.
|
|
27
|
+
* Best for collections where the card needs visual separation from a
|
|
28
|
+
* patterned or colored background. Gains shadow on hover/drag.
|
|
29
|
+
* - `filled` — `surface-container-highest` background, no shadow.
|
|
30
|
+
* Lowest emphasis; use when cards sit directly on the main background surface.
|
|
31
|
+
* - `outlined` — `surface` background + 1dp `outline-variant` stroke.
|
|
32
|
+
* Highest structural emphasis without casting a shadow. Best on solid backgrounds.
|
|
33
|
+
*
|
|
34
|
+
* **M3 measurements:**
|
|
35
|
+
* - Container corner radius: 12dp.
|
|
36
|
+
* - Horizontal content padding: 16dp.
|
|
37
|
+
* - Gap between cards in a collection: max 8dp.
|
|
38
|
+
* - Headline text alignment: start.
|
|
12
39
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* - **filled**: surface-container-highest background, no shadow.
|
|
18
|
-
* Lowest emphasis; use when cards sit directly on the background.
|
|
19
|
-
* - **outlined**: surface background + outline-variant 1dp stroke.
|
|
20
|
-
* Highest emphasis without shadow; good on solid color backgrounds.
|
|
40
|
+
* **Interactive cards:**
|
|
41
|
+
* When `clickable=true`, the card renders M3 state layer overlays on hover,
|
|
42
|
+
* focus, and press via the `::before` pseudo-element. The consumer must handle
|
|
43
|
+
* the `click` event to implement navigation or selection logic.
|
|
21
44
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```html
|
|
47
|
+
* <moni-card variant="outlined" clickable>
|
|
48
|
+
* <img slot="media" src="photo.jpg" alt="Card image" />
|
|
49
|
+
* <h3 slot="headline">Card Title</h3>
|
|
50
|
+
* <p slot="supporting">Supporting text that describes the card topic.</p>
|
|
51
|
+
* <div slot="actions">
|
|
52
|
+
* <moni-button variant="text">Cancel</moni-button>
|
|
53
|
+
* <moni-button>Confirm</moni-button>
|
|
54
|
+
* </div>
|
|
55
|
+
* </moni-card>
|
|
56
|
+
* ```
|
|
27
57
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* - actions: action buttons row at the bottom of the card.
|
|
58
|
+
* @slot media - An image, video, or icon at the top of the card.
|
|
59
|
+
* @slot default - Primary body content (replaces all named slots if used).
|
|
60
|
+
* @slot headline - H3-equivalent title text.
|
|
61
|
+
* @slot subhead - Secondary title below the headline.
|
|
62
|
+
* @slot supporting - Descriptive supporting body text.
|
|
63
|
+
* @slot actions - Action buttons row at the bottom of the card.
|
|
35
64
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* - disabled: present → reduced opacity + cursor not-allowed
|
|
65
|
+
* @csspart card - The outer card container.
|
|
66
|
+
* @csspart media - The media area wrapper.
|
|
67
|
+
* @csspart content - The content wrapper.
|
|
68
|
+
* @csspart actions - The actions row wrapper.
|
|
41
69
|
*/
|
|
42
70
|
let MoniCard = class MoniCard extends MoniElement {
|
|
43
71
|
constructor() {
|
|
44
72
|
super(...arguments);
|
|
73
|
+
/**
|
|
74
|
+
* Visual variant of the card.
|
|
75
|
+
*
|
|
76
|
+
* - `'elevated'` (default) — Surface-low background + elevation shadow.
|
|
77
|
+
* - `'filled'` — Surface-highest background, no shadow.
|
|
78
|
+
* - `'outlined'` — Surface background + outline-variant stroke.
|
|
79
|
+
*
|
|
80
|
+
* @default 'elevated'
|
|
81
|
+
*/
|
|
45
82
|
this.variant = 'elevated';
|
|
83
|
+
/**
|
|
84
|
+
* When `true`, applies M3 state layer overlays (hover, focus, pressed)
|
|
85
|
+
* to communicate interactivity. The card background shifts slightly on hover.
|
|
86
|
+
*
|
|
87
|
+
* Use when the card itself is a clickable navigation or selection target.
|
|
88
|
+
*
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
46
91
|
this.clickable = false;
|
|
92
|
+
/**
|
|
93
|
+
* When `true`, applies `--elevate3` box-shadow to simulate the M3 "dragged"
|
|
94
|
+
* state as specified in the M3 card interaction spec.
|
|
95
|
+
*
|
|
96
|
+
* Consumers should toggle this attribute based on the drag state of the card
|
|
97
|
+
* (e.g. via a drag-and-drop library callback).
|
|
98
|
+
*
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
47
101
|
this.draggable = false;
|
|
102
|
+
/**
|
|
103
|
+
* When `true`, the card renders at 50% opacity with `cursor: not-allowed`,
|
|
104
|
+
* signaling that the card and its actions are unavailable.
|
|
105
|
+
*
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
48
108
|
this.disabled = false;
|
|
49
109
|
}
|
|
50
110
|
static { this.styles = [
|
|
@@ -1,29 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file components/moni-carousel.ts
|
|
3
|
+
* @package @moni-labs/moni-ui
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @contributors Moni Labs & Contributors
|
|
6
|
+
*/
|
|
1
7
|
import { MoniElement } from './_base/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Data model for a single item in a `<moni-carousel>`.
|
|
10
|
+
*/
|
|
2
11
|
export interface CarouselItem {
|
|
12
|
+
/** Display title overlaid on the item. */
|
|
3
13
|
title: string;
|
|
14
|
+
/** URL or path to the background image. */
|
|
4
15
|
img: string;
|
|
16
|
+
/** Optional link target. If provided, the item renders as an `<a>` element. */
|
|
5
17
|
href?: string;
|
|
18
|
+
/** Link target attribute (e.g. `'_blank'`). Only applies if `href` is set. */
|
|
6
19
|
target?: string;
|
|
7
20
|
}
|
|
8
21
|
/**
|
|
9
22
|
* Material Design 3 Expressive Carousel component.
|
|
10
|
-
* Supports three layouts:
|
|
11
|
-
* - `multi-browse`: Shows a collection of items (large, medium, and small items).
|
|
12
|
-
* - `hero`: Focuses on one large item with a smaller item peeking.
|
|
13
|
-
* - `uncontained`: Standard same-sized layout bleeding off the edges.
|
|
14
23
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Carousels display a collection of related items in a scrollable, horizontal list.
|
|
25
|
+
* They allow users to quickly browse through items like images, cards, or products.
|
|
26
|
+
*
|
|
27
|
+
* **M3 spec reference:** `m3-docs/components/carousel/specs.md`
|
|
28
|
+
*
|
|
29
|
+
* **Layout variants:**
|
|
30
|
+
* - `multi-browse` (default) — Shows a mix of large, medium, and small (peeking)
|
|
31
|
+
* items. Best for exploring a large number of items.
|
|
32
|
+
* - `hero` — Focuses on one large primary item while showing a sliver of the
|
|
33
|
+
* next item. Best for featuring important content.
|
|
34
|
+
* - `uncontained` — Standard layout where all items have the same width and
|
|
35
|
+
* bleed off the edges of the container.
|
|
36
|
+
*
|
|
37
|
+
* **Animation & Gestures:**
|
|
38
|
+
* This component uses GSAP for smooth drag, flick, and snap animations,
|
|
39
|
+
* mirroring the high-fidelity M3 Expressive motion specs. It handles touch
|
|
40
|
+
* gestures for mobile and mouse-drag for desktop.
|
|
41
|
+
*
|
|
42
|
+
* **Auto-sizing (`auto` mode):**
|
|
43
|
+
* When `auto=true` (default), the carousel measures its own width and
|
|
44
|
+
* dynamically calculates the optimal sizes for large, medium, and small items
|
|
45
|
+
* based on the active `layout` to ensure they fit perfectly without awkward gaps
|
|
46
|
+
* or clipping at the edges.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```html
|
|
50
|
+
* <!-- Declarative usage via DOM properties (recommended) -->
|
|
51
|
+
* <moni-carousel layout="hero"></moni-carousel>
|
|
52
|
+
* <script>
|
|
53
|
+
* const carousel = document.querySelector('moni-carousel');
|
|
54
|
+
* carousel.items = [
|
|
55
|
+
* { title: 'Item 1', img: '/img1.jpg', href: '/link1' },
|
|
56
|
+
* { title: 'Item 2', img: '/img2.jpg' }
|
|
57
|
+
* ];
|
|
58
|
+
* </script>
|
|
59
|
+
*
|
|
60
|
+
* <!-- Slot-based usage (for SSR or simple static content) -->
|
|
61
|
+
* <moni-carousel layout="uncontained">
|
|
62
|
+
* <div slot="item">
|
|
63
|
+
* <img src="/img1.jpg" />
|
|
64
|
+
* <h3>Static Item</h3>
|
|
65
|
+
* </div>
|
|
66
|
+
* </moni-carousel>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @slot item - Alternative to the `items` property. Slot individual HTML elements
|
|
70
|
+
* instead of passing data objects.
|
|
71
|
+
*
|
|
72
|
+
* @csspart carousel - The outer wrapper.
|
|
73
|
+
* @csspart track - The scrolling track element.
|
|
74
|
+
* @csspart item - Individual carousel item containers.
|
|
75
|
+
* @csspart img - The image elements inside the items.
|
|
76
|
+
* @csspart title - The title text elements inside the items.
|
|
27
77
|
*/
|
|
28
78
|
export declare class MoniCarousel extends MoniElement {
|
|
29
79
|
items: CarouselItem[];
|
|
@@ -101,7 +151,7 @@ export declare class MoniCarousel extends MoniElement {
|
|
|
101
151
|
private _handleShowAllClick;
|
|
102
152
|
private _handleShowAllSlotChange;
|
|
103
153
|
private _handleSlotChange;
|
|
104
|
-
render(): import("lit
|
|
154
|
+
render(): import("lit").TemplateResult<1>;
|
|
105
155
|
}
|
|
106
156
|
declare global {
|
|
107
157
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moni-carousel.d.ts","sourceRoot":"","sources":["../../src/components/moni-carousel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"moni-carousel.d.ts","sourceRoot":"","sources":["../../src/components/moni-carousel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,qBACa,YAAa,SAAQ,WAAW;IACjB,KAAK,EAAE,YAAY,EAAE,CAAM;IACzB,MAAM,EAAE,cAAc,GAAG,MAAM,GAAG,aAAa,CAAkB;IAClD,IAAI,UAAQ;IACF,UAAU,SAAO;IAChB,WAAW,SAAM;IAClB,UAAU,SAAM;IAC1C,GAAG,SAAK;IACR,OAAO,SAAM;IACe,YAAY,SAAM;IACtB,OAAO,UAAS;IAC1B,WAAW,SAAc;IAC3B,UAAU,SAAM;IACJ,OAAO,UAAS;IAE3D,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,kBAAkB,CAAS;IAE5C,IAAI,cAAc,IAAI,YAAY,EAAE,CAEnC;IAE2B,OAAO,CAAC,gBAAgB,CAAkB;IACnD,OAAO,CAAC,MAAM,CAA8B;IAE/D,OAAO,CAAC,eAAe,CAA+B;IACtD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,SAAS,CAAS;IAG1B,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,UAAU,CAAS;IAG3B,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,aAAa,CAAmC;IACxD,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,gBAAgB,CAAmC;IAE3D,OAAgB,MAAM,4BAiOpB;IAEO,iBAAiB;IAwBjB,oBAAoB;IAoBpB,YAAY;IAaZ,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAwBpD,IAAI,cAAc;;;;;MAwEjB;IAED,IAAI,QAAQ,WAEX;IAED,OAAO,CAAC,cAAc;IA+EtB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAwB1B;;;OAGG;IACH,OAAO,CAAC,KAAK,CAaX;IAEF,OAAO,CAAC,eAAe,CAOrB;IAEF,YAAY,GAAI,iBAAe,UAmB7B;IAEF,OAAO,CAAC,YAAY;IAqBpB,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,cAAc;IAwCtB,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,YAAY;IAoCpB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,iBAAiB;IA4ChB,MAAM;CAqIf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,eAAe,EAAE,YAAY,CAAC;KAC9B;CACD"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file components/moni-carousel.ts
|
|
3
|
+
* @package @moni-labs/moni-ui
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @contributors Moni Labs & Contributors
|
|
6
|
+
*/
|
|
1
7
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
8
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
9
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -10,23 +16,60 @@ import { MoniElement, sharedStyles } from './_base/index.js';
|
|
|
10
16
|
import { gsap } from 'gsap';
|
|
11
17
|
/**
|
|
12
18
|
* Material Design 3 Expressive Carousel component.
|
|
13
|
-
* Supports three layouts:
|
|
14
|
-
* - `multi-browse`: Shows a collection of items (large, medium, and small items).
|
|
15
|
-
* - `hero`: Focuses on one large item with a smaller item peeking.
|
|
16
|
-
* - `uncontained`: Standard same-sized layout bleeding off the edges.
|
|
17
19
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
20
|
+
* Carousels display a collection of related items in a scrollable, horizontal list.
|
|
21
|
+
* They allow users to quickly browse through items like images, cards, or products.
|
|
22
|
+
*
|
|
23
|
+
* **M3 spec reference:** `m3-docs/components/carousel/specs.md`
|
|
24
|
+
*
|
|
25
|
+
* **Layout variants:**
|
|
26
|
+
* - `multi-browse` (default) — Shows a mix of large, medium, and small (peeking)
|
|
27
|
+
* items. Best for exploring a large number of items.
|
|
28
|
+
* - `hero` — Focuses on one large primary item while showing a sliver of the
|
|
29
|
+
* next item. Best for featuring important content.
|
|
30
|
+
* - `uncontained` — Standard layout where all items have the same width and
|
|
31
|
+
* bleed off the edges of the container.
|
|
32
|
+
*
|
|
33
|
+
* **Animation & Gestures:**
|
|
34
|
+
* This component uses GSAP for smooth drag, flick, and snap animations,
|
|
35
|
+
* mirroring the high-fidelity M3 Expressive motion specs. It handles touch
|
|
36
|
+
* gestures for mobile and mouse-drag for desktop.
|
|
37
|
+
*
|
|
38
|
+
* **Auto-sizing (`auto` mode):**
|
|
39
|
+
* When `auto=true` (default), the carousel measures its own width and
|
|
40
|
+
* dynamically calculates the optimal sizes for large, medium, and small items
|
|
41
|
+
* based on the active `layout` to ensure they fit perfectly without awkward gaps
|
|
42
|
+
* or clipping at the edges.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```html
|
|
46
|
+
* <!-- Declarative usage via DOM properties (recommended) -->
|
|
47
|
+
* <moni-carousel layout="hero"></moni-carousel>
|
|
48
|
+
* <script>
|
|
49
|
+
* const carousel = document.querySelector('moni-carousel');
|
|
50
|
+
* carousel.items = [
|
|
51
|
+
* { title: 'Item 1', img: '/img1.jpg', href: '/link1' },
|
|
52
|
+
* { title: 'Item 2', img: '/img2.jpg' }
|
|
53
|
+
* ];
|
|
54
|
+
* </script>
|
|
55
|
+
*
|
|
56
|
+
* <!-- Slot-based usage (for SSR or simple static content) -->
|
|
57
|
+
* <moni-carousel layout="uncontained">
|
|
58
|
+
* <div slot="item">
|
|
59
|
+
* <img src="/img1.jpg" />
|
|
60
|
+
* <h3>Static Item</h3>
|
|
61
|
+
* </div>
|
|
62
|
+
* </moni-carousel>
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @slot item - Alternative to the `items` property. Slot individual HTML elements
|
|
66
|
+
* instead of passing data objects.
|
|
67
|
+
*
|
|
68
|
+
* @csspart carousel - The outer wrapper.
|
|
69
|
+
* @csspart track - The scrolling track element.
|
|
70
|
+
* @csspart item - Individual carousel item containers.
|
|
71
|
+
* @csspart img - The image elements inside the items.
|
|
72
|
+
* @csspart title - The title text elements inside the items.
|
|
30
73
|
*/
|
|
31
74
|
let MoniCarousel = class MoniCarousel extends MoniElement {
|
|
32
75
|
constructor() {
|
|
@@ -1,34 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file components/moni-checkbox.ts
|
|
3
|
+
* @package @moni-labs/moni-ui
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @contributors Moni Labs & Contributors
|
|
6
|
+
*/
|
|
1
7
|
import { MoniElement } from './_base/index.js';
|
|
2
8
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
9
|
+
* Material Design 3 Checkbox component.
|
|
10
|
+
*
|
|
11
|
+
* Checkboxes allow users to select one or more items from a set, or toggle
|
|
12
|
+
* a single binary option. They are visual-only shells — the consumer is
|
|
13
|
+
* responsible for wiring up form submission and validation logic.
|
|
14
|
+
*
|
|
15
|
+
* **Visual architecture (BeerCSS pattern):**
|
|
16
|
+
* The native `<input type="checkbox">` occupies real layout space (16×16 minimum)
|
|
17
|
+
* but is visually hidden via `opacity: 0`. A `<span>` sibling rendered after
|
|
18
|
+
* the input holds two pseudo-elements:
|
|
19
|
+
* - `::before` — the visible checkbox icon (Material Symbols ligature).
|
|
20
|
+
* - `::after` — the hover/focus state layer ripple ring.
|
|
21
|
+
*
|
|
22
|
+
* The `::before` content switches between:
|
|
23
|
+
* - `'check_box_outline_blank'` (unchecked)
|
|
24
|
+
* - `'check_box'` (checked)
|
|
25
|
+
* - `'indeterminate_check_box'` (native indeterminate state)
|
|
26
|
+
*
|
|
27
|
+
* **Form integration:**
|
|
28
|
+
* Setting `name` and `value` passes them to the native `<input>` element,
|
|
29
|
+
* enabling participation in HTML form submissions.
|
|
30
|
+
*
|
|
31
|
+
* @fires change - Bubbles and is composed. Fired when the checkbox is toggled.
|
|
32
|
+
* The consumer can read `element.checked` for the new state.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <moni-checkbox label="Accept terms" name="terms" value="yes"></moni-checkbox>
|
|
37
|
+
*
|
|
38
|
+
* <script>
|
|
39
|
+
* document.querySelector('moni-checkbox').addEventListener('change', (e) => {
|
|
40
|
+
* console.log('checked:', e.target.checked);
|
|
41
|
+
* });
|
|
42
|
+
* </script>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @csspart checkbox - The outer `<label>` element.
|
|
19
46
|
*/
|
|
20
47
|
export declare class MoniCheckbox extends MoniElement {
|
|
48
|
+
/**
|
|
49
|
+
* Text label displayed to the right of the checkbox icon.
|
|
50
|
+
*
|
|
51
|
+
* When non-empty, the label is rendered as a text node inside the `<span>`.
|
|
52
|
+
* When empty, the default slot is rendered instead, allowing slotted HTML.
|
|
53
|
+
*
|
|
54
|
+
* @default ''
|
|
55
|
+
*/
|
|
21
56
|
label: string;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the checkbox is currently checked.
|
|
59
|
+
*
|
|
60
|
+
* Reflected as an attribute so CSS attribute selectors and external state
|
|
61
|
+
* readers can observe the checked state without accessing the JS property.
|
|
62
|
+
* Synced to the native input via `updated()`.
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
22
66
|
checked: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* When `true`, the native input is disabled: the checkbox is not interactive
|
|
69
|
+
* and renders at 50% opacity.
|
|
70
|
+
*
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
23
73
|
disabled: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Visual size of the checkbox icon.
|
|
76
|
+
*
|
|
77
|
+
* Maps to the `--_size` custom property which controls both the invisible
|
|
78
|
+
* input's hit area and the visible `::before` icon size.
|
|
79
|
+
*
|
|
80
|
+
* | Value | `--_size` |
|
|
81
|
+
* |------------|-----------|
|
|
82
|
+
* | `'small'` | 1rem |
|
|
83
|
+
* | `'medium'` | 1.5rem |
|
|
84
|
+
* | `'large'` | 2rem |
|
|
85
|
+
* | `'extra'` | 2.5rem |
|
|
86
|
+
*
|
|
87
|
+
* @default 'medium'
|
|
88
|
+
*/
|
|
24
89
|
size: 'small' | 'medium' | 'large' | 'extra';
|
|
90
|
+
/**
|
|
91
|
+
* Forwarded to the native `<input name>` attribute.
|
|
92
|
+
* Required for grouping checkboxes within a form.
|
|
93
|
+
*
|
|
94
|
+
* @default ''
|
|
95
|
+
*/
|
|
25
96
|
name: string;
|
|
97
|
+
/**
|
|
98
|
+
* Forwarded to the native `<input value>` attribute.
|
|
99
|
+
* The value submitted in a form when this checkbox is checked.
|
|
100
|
+
*
|
|
101
|
+
* @default ''
|
|
102
|
+
*/
|
|
26
103
|
value: string;
|
|
104
|
+
/** Direct reference to the native input element for programmatic access. */
|
|
27
105
|
private _input;
|
|
106
|
+
/**
|
|
107
|
+
* Syncs `checked` and `disabled` back to the native input element after
|
|
108
|
+
* Lit's render cycle, ensuring the DOM stays in sync with component state.
|
|
109
|
+
*
|
|
110
|
+
* This is necessary because Lit's `.property=${value}` binding updates the
|
|
111
|
+
* DOM property, but the `live()` directive and direct property assignment
|
|
112
|
+
* are more reliable for boolean inputs across browser implementations.
|
|
113
|
+
*
|
|
114
|
+
* @param changed - Map of changed property names to their previous values.
|
|
115
|
+
*/
|
|
28
116
|
updated(changed: Map<string, unknown>): void;
|
|
29
117
|
static styles: import("lit").CSSResult[];
|
|
118
|
+
/**
|
|
119
|
+
* Handles the native input's `change` event.
|
|
120
|
+
*
|
|
121
|
+
* Reads the new checked state from the input and re-dispatches a composed
|
|
122
|
+
* `'change'` event so the signal crosses shadow DOM boundaries and can be
|
|
123
|
+
* heard by parent elements in the light DOM.
|
|
124
|
+
*
|
|
125
|
+
* @param e - The native `change` event from the hidden `<input>`.
|
|
126
|
+
*/
|
|
30
127
|
private _onChange;
|
|
31
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Renders the accessible checkbox label structure.
|
|
130
|
+
*
|
|
131
|
+
* The `<label>` wraps the hidden `<input>` and a `<span>` so that clicking
|
|
132
|
+
* anywhere on the label area (including the text) toggles the checkbox.
|
|
133
|
+
* The `has-label` class on the span adds left padding to separate the icon
|
|
134
|
+
* from the label text.
|
|
135
|
+
*/
|
|
136
|
+
render(): import("lit").TemplateResult<1>;
|
|
32
137
|
}
|
|
33
138
|
declare global {
|
|
34
139
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moni-checkbox.d.ts","sourceRoot":"","sources":["../../src/components/moni-checkbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"moni-checkbox.d.ts","sourceRoot":"","sources":["../../src/components/moni-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBACa,YAAa,SAAQ,WAAW;IAC5C;;;;;;;OAOG;IAC0B,KAAK,SAAM;IAExC;;;;;;;;OAQG;IACyC,OAAO,UAAS;IAE5D;;;;;OAKG;IACyC,QAAQ,UAAS;IAE7D;;;;;;;;;;;;;;OAcG;IAEH,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAY;IAExD;;;;;OAKG;IAC0B,IAAI,SAAM;IAEvC;;;;;OAKG;IAC0B,KAAK,SAAM;IAExC,4EAA4E;IAC5D,OAAO,CAAC,MAAM,CAAoB;IAElD;;;;;;;;;OASG;IACM,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAO9C,OAAgB,MAAM,4BAoHpB;IAEF;;;;;;;;OAQG;IACH,OAAO,CAAC,SAAS;IAKjB;;;;;;;OAOG;IACM,MAAM;CAiBf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,eAAe,EAAE,YAAY,CAAC;KAC9B;CACD;AAED,eAAe,YAAY,CAAC"}
|