@lit-material/dialog 0.1.0 → 0.1.1

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.
@@ -144,7 +144,7 @@
144
144
  {
145
145
  "kind": "variable",
146
146
  "name": "styles",
147
- "default": "css` :host { display: contents; } /* The dialog element itself is transparent and fills the viewport (rather than shrink-wrapping the visible card) so a click landing outside .container still has its event target equal to the dialog element — that's what lets the backdrop-click handler use a simple equality check instead of manual hit-testing against the card's bounding box. */ .dialog { margin: 0; padding: 0; border: none; width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: transparent; color: inherit; } .dialog[open] { display: flex; align-items: center; justify-content: center; } .dialog::backdrop { background-color: rgba(0, 0, 0, 0.32); } .container { display: flex; flex-direction: column; align-items: stretch; gap: 16px; box-sizing: border-box; /* Not part of the tab order (see the component for why it's the default focus target) — no visible focus indicator of its own. */ outline: none; width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 48px); padding: 24px; border-radius: var(--md-sys-shape-corner-extra-large, 28px); background-color: var(--md-sys-color-surface-container-high, #ece6f0); /* Outlined text fields in the body notch their label against this surface. */ --lit-material-text-field-notch-color: var(--md-sys-color-surface-container-high, #ece6f0); color: var(--md-sys-color-on-surface, #1c1b1f); font-family: var(--md-sys-typescale-body-medium-font, Roboto, system-ui, sans-serif); box-shadow: var( --md-sys-elevation-level3, 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15) ); } slot.icon::slotted(*) { width: 24px; height: 24px; display: block; color: var(--md-sys-color-secondary, #625b71); } .icon:has(::slotted(*)) { align-self: center; } .headline { display: block; color: var(--md-sys-color-on-surface, #1c1b1f); font-family: var(--md-sys-typescale-headline-small-font, Roboto, system-ui, sans-serif); font-size: var(--md-sys-typescale-headline-small-size, 1.5rem); line-height: var(--md-sys-typescale-headline-small-line-height, 2rem); } .icon:has(::slotted(*)) ~ .headline { text-align: center; } .content { flex: 1; min-height: 0; overflow-y: auto; color: var(--md-sys-color-on-surface-variant, #49454f); font-size: var(--md-sys-typescale-body-medium-size, 0.875rem); line-height: var(--md-sys-typescale-body-medium-line-height, 1.25rem); } .actions { display: flex; justify-content: flex-end; gap: 8px; } .actions:empty { display: none; } `"
147
+ "default": "css` :host { display: contents; } :host([hidden]) { display: none; } /* The dialog element itself is transparent and fills the viewport (rather than shrink-wrapping the visible card) so a click landing outside .container still has its event target equal to the dialog element — that's what lets the backdrop-click handler use a simple equality check instead of manual hit-testing against the card's bounding box. */ .dialog { margin: 0; padding: 0; border: none; width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: transparent; color: inherit; } .dialog[open] { display: flex; align-items: center; justify-content: center; } .dialog::backdrop { background-color: rgba(0, 0, 0, 0.32); } .container { display: flex; flex-direction: column; align-items: stretch; gap: 16px; box-sizing: border-box; /* Not part of the tab order (see the component for why it's the default focus target) — no visible focus indicator of its own. */ outline: none; width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 48px); padding: 24px; border-radius: var(--md-sys-shape-corner-extra-large, 28px); background-color: var(--md-sys-color-surface-container-high, #ece6f0); /* Outlined text fields in the body notch their label against this surface. */ --lit-material-text-field-notch-color: var(--md-sys-color-surface-container-high, #ece6f0); color: var(--md-sys-color-on-surface, #1c1b1f); font-family: var(--md-sys-typescale-body-medium-font, Roboto, system-ui, sans-serif); box-shadow: var( --md-sys-elevation-level3, 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15) ); } slot.icon::slotted(*) { width: 24px; height: 24px; display: block; color: var(--md-sys-color-secondary, #625b71); } .icon:has(::slotted(*)) { align-self: center; } .headline { display: block; color: var(--md-sys-color-on-surface, #1c1b1f); font-family: var(--md-sys-typescale-headline-small-font, Roboto, system-ui, sans-serif); font-size: var(--md-sys-typescale-headline-small-size, 1.5rem); line-height: var(--md-sys-typescale-headline-small-line-height, 2rem); } .icon:has(::slotted(*)) ~ .headline { text-align: center; } .content { flex: 1; min-height: 0; overflow-y: auto; color: var(--md-sys-color-on-surface-variant, #49454f); font-size: var(--md-sys-typescale-body-medium-size, 0.875rem); line-height: var(--md-sys-typescale-body-medium-line-height, 1.25rem); } .actions { display: flex; justify-content: flex-end; gap: 8px; } .actions:empty { display: none; } `"
148
148
  }
149
149
  ],
150
150
  "exports": [
@@ -1 +1 @@
1
- {"version":3,"file":"about-dialog.d.ts","sourceRoot":"","sources":["../src/about-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,sBAAsB,CAAC;AAC9B,OAAO,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,sBAAuB,SAAQ,UAAU;IACpD,OAAgB,MAAM,0BAuBpB;IAEF,gDAAgD;IACP,WAAW,SAAM;IAEd,IAAI,UAAS;IAEzD,+BAA+B;IACS,UAAU,SAAW;IAE7D,wBAAwB;IACxB,IAAI,IAAI,IAAI;IAIZ,yBAAyB;IACzB,KAAK,IAAI,IAAI;IAIJ,MAAM;CAUhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
1
+ {"version":3,"file":"about-dialog.d.ts","sourceRoot":"","sources":["../src/about-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,sBAAsB,CAAC;AAC9B,OAAO,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,sBAAuB,SAAQ,UAAU;IACpD,OAAgB,MAAM,0BA2BpB;IAEF,gDAAgD;IACP,WAAW,SAAM;IAEd,IAAI,UAAS;IAEzD,+BAA+B;IACS,UAAU,SAAW;IAE7D,wBAAwB;IACxB,IAAI,IAAI,IAAI;IAIZ,yBAAyB;IACzB,KAAK,IAAI,IAAI;IAIJ,MAAM;CAUhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
@@ -38,6 +38,10 @@ let LitMaterialAboutDialog = class LitMaterialAboutDialog extends LitElement {
38
38
  :host {
39
39
  display: contents;
40
40
  }
41
+
42
+ :host([hidden]) {
43
+ display: none;
44
+ }
41
45
  .logo::slotted(*) {
42
46
  display: block;
43
47
  max-width: 100%;
@@ -1 +1 @@
1
- {"version":3,"file":"about-dialog.js","sourceRoot":"","sources":["../src/about-dialog.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,sBAAsB,CAAC;AAC9B,OAAO,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,UAAU;IAA/C;;QA0BL,gDAAgD;QACP,gBAAW,GAAG,EAAE,CAAC;QAEd,SAAI,GAAG,KAAK,CAAC;QAEzD,+BAA+B;QACS,eAAU,GAAG,OAAO,CAAC;IAsB/D,CAAC;aArDiB,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;GAuB3B,AAvBqB,CAuBpB;IAUF,wBAAwB;IACxB,IAAI;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,yBAAyB;IACzB,KAAK;QACH,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,CAAC;IAEQ,MAAM;QACb,0EAA0E;QAC1E,mDAAmD;QACnD,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,IAAI,WAAW,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;iFACT,IAAI,CAAC,WAAW;;;kEAG/B,GAAG,EAAE,CAAC,IAA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AG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;iFACT,IAAI,CAAC,WAAW;;;kEAG/B,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,UAAU;2BAC5E,CAAC;IAC1B,CAAC;;AA1BwC;IAAxC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;2DAAkB;AAEd;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAAc;AAGjB;IAAvC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;0DAAsB;AApClD,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CA0DlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-styles.d.ts","sourceRoot":"","sources":["../src/dialog-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAkGlB,CAAC"}
1
+ {"version":3,"file":"dialog-styles.d.ts","sourceRoot":"","sources":["../src/dialog-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAsGlB,CAAC"}
@@ -4,6 +4,10 @@ export const styles = css `
4
4
  display: contents;
5
5
  }
6
6
 
7
+ :host([hidden]) {
8
+ display: none;
9
+ }
10
+
7
11
  /* The dialog element itself is transparent and fills the viewport (rather
8
12
  than shrink-wrapping the visible card) so a click landing outside
9
13
  .container still has its event target equal to the dialog element —
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-styles.js","sourceRoot":"","sources":["../src/dialog-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGxB,CAAC"}
1
+ {"version":3,"file":"dialog-styles.js","sourceRoot":"","sources":["../src/dialog-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lit-material/dialog",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Material Design 3 dialog web component, built on the native <dialog> element.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "lit": "^3.2.0",
45
- "@lit-material/button": "0.2.0",
46
- "@lit-material/tokens": "0.0.2"
45
+ "@lit-material/button": "0.2.1",
46
+ "@lit-material/tokens": "0.1.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@lit-labs/ssr": "^3.3.1",