@alacris/ui 0.6.0 → 0.6.2

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 CHANGED
@@ -47,9 +47,9 @@ The published package is plain ESM. Point an import map at a pinned CDN build of
47
47
  {
48
48
  "imports": {
49
49
  "@alacris/core": "https://cdn.jsdelivr.net/npm/@alacris/core@0.11.5/dist/alacris.js",
50
- "@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.6.0/src/index.js",
51
- "@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.6.0/src/theme/index.js",
52
- "@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.6.0/src/components/"
50
+ "@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.6.2/src/index.js",
51
+ "@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.6.2/src/theme/index.js",
52
+ "@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.6.2/src/components/"
53
53
  }
54
54
  }
55
55
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alacris/ui",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Themeable design system for Alacris — Material defaults, sixty-nine custom elements, ESM-only, no build step.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -9,7 +9,8 @@
9
9
  // Distinct from <ui-drawer> (navigation) and <ui-sheet> (bottom). Modal
10
10
  // (default): a scrim plus a panel that slides in from the end edge. Focus is
11
11
  // trapped and page scroll locked while open. The PARENT owns `open`. Standard:
12
- // an in-flow panel that animates its inline size — no scrim, no trap.
12
+ // an in-flow panel that animates its inline size — no scrim, no trap — with
13
+ // the same headline, close button and actions area as the modal sheet.
13
14
  //
14
15
  // @prop {boolean} open=false
15
16
  // @prop {string} variant='modal' — modal | standard
@@ -119,6 +120,10 @@ const styles = css`
119
120
 
120
121
  .std {
121
122
  display: block;
123
+ /* The host is display: contents, so this panel is the flex item when the
124
+ sheet sits in a row: it must keep its width, not shrink to nothing. */
125
+ flex: none;
126
+ block-size: 100%;
122
127
  inline-size: 0;
123
128
  overflow: hidden;
124
129
  background: ${t.bg};
@@ -126,7 +131,12 @@ const styles = css`
126
131
  transition: inline-size ${sys.duration.medium2} ${sys.easing.emphasized};
127
132
  }
128
133
  .std.open { inline-size: ${t.width}; }
129
- .std-inner { inline-size: ${t.width}; }
134
+ .std-inner {
135
+ display: flex;
136
+ flex-direction: column;
137
+ inline-size: ${t.width};
138
+ block-size: 100%;
139
+ }
130
140
  `;
131
141
 
132
142
  define('ui-side-sheet', {
@@ -306,8 +316,13 @@ define('ui-side-sheet', {
306
316
  ref=${(el) => hasSlot(el.querySelector('slot'), (has) => hasHeadline.set(has))}>
307
317
  <slot name="headline"></slot>
308
318
  </div>
319
+ <ui-icon-button icon="close" label="Close" @click=${() => requestClose('method')}></ui-icon-button>
309
320
  </div>
310
321
  <div class="body" part="body"><slot></slot></div>
322
+ <div class="actions" part="actions"
323
+ ref=${(el) => hasSlot(el.querySelector('slot'), (has) => el.classList.toggle('has', has))}>
324
+ <slot name="actions"></slot>
325
+ </div>
311
326
  </div>
312
327
  </aside>`
313
328
  : null}