@citrusworx/juiceui 0.9.5 → 0.9.6
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 +28 -27
- package/dist/index.css +280 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1644 -1144
- package/dist/js/juice.d.ts +2 -0
- package/dist/js/src/shared/overlays.d.ts +3 -2
- package/dist/js/src/sheet/sheet-runtime.d.ts +94 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,9 +80,9 @@ Built files are `dist/index.css` (core) and `dist/themes/<id>.css`. Each theme i
|
|
|
80
80
|
|
|
81
81
|
## Components and runtimes
|
|
82
82
|
|
|
83
|
-
The top-level JS entry is small. Thirty-
|
|
83
|
+
The top-level JS entry is small. Thirty-two runtimes stay Emerging.
|
|
84
84
|
|
|
85
|
-
Navigation through field (twenty-five) shipped in `@citrusworx/juiceui@0.9.2`. Icon button, avatar, table
|
|
85
|
+
Navigation through field (twenty-five) shipped in `@citrusworx/juiceui@0.9.2`. Icon button, avatar, and table shipped in 0.9.3. Pressable and touchable row shipped in 0.9.4. Keyboard avoider shipped in 0.9.5. Sheet is the thirty-second, on master, and not in that npm cut.
|
|
86
86
|
|
|
87
87
|
The full index, including how to choose between similar components, is [Runtime behavior](../../docs/juice/juice-runtime-behavior.md#components).
|
|
88
88
|
|
|
@@ -92,6 +92,7 @@ The full index, including how to choose between similar components, is [Runtime
|
|
|
92
92
|
| --- | --- | --- | --- |
|
|
93
93
|
| Modal | `[modal-overlay]` | Dialog. Open and close, Escape, focus trap, one open at a time. | [Modal](../../docs/juice/juice-modal-runtime.md) |
|
|
94
94
|
| Drawer | `[drawer-overlay]` | Edge dialog (`left` or `right`, optional `drawer-size` of `sm` or `lg`). Escape, focus trap, exclusive. | [Drawer](../../docs/juice/juice-drawer-runtime.md) |
|
|
95
|
+
| Sheet | `[sheet-overlay]` | Bottom dialog. Detents `peek`, `half`, `full`. The thirty-second runtime. On master, not in npm 0.9.5. Not a `JuiceRuntimeName`. | [Sheet](../../docs/juice/juice-sheet-runtime.md) |
|
|
95
96
|
| Popover | `[popover-root]` | Anchored non-modal dialog. The surface is `[popover-panel]`, never a bare `popover` attribute. | [Popover](../../docs/juice/juice-popover-runtime.md) |
|
|
96
97
|
| Tooltip | `[tooltip-root]` | Hover and focus tip. The surface is `[tooltip-panel]`, never a bare `tooltip` attribute or native `title`. | [Tooltip](../../docs/juice/juice-tooltip-runtime.md) |
|
|
97
98
|
| Toast | `[toast-region]` | Non-modal stack (default `top-right`). Not a dialog: no focus trap, no `aria-modal`, stacking is allowed. | [Toast](../../docs/juice/juice-toast-runtime.md) |
|
|
@@ -119,9 +120,9 @@ The full index, including how to choose between similar components, is [Runtime
|
|
|
119
120
|
| Switch | `[switch]` | APG switch (`toggle` / `check` / `uncheck` / `setChecked`). Not a layered overlay. | [Switch](../../docs/juice/juice-switch-runtime.md) |
|
|
120
121
|
| Slider | `[slider]` | APG slider (`setValue` / `getValue` / `increment` / `decrement`). Not a layered overlay. | [Slider](../../docs/juice/juice-slider-runtime.md) |
|
|
121
122
|
| Field | `[field]` | Wrapper. Visible help and error describe the first input, textarea, or select. The twenty-fifth Emerging runtime. Shipped in 0.9.2. | [Field](../../docs/juice/juice-field-runtime.md) |
|
|
122
|
-
| Icon button
|
|
123
|
-
| Pressable
|
|
124
|
-
| Touchable row
|
|
123
|
+
| Icon button | `[icon-button]` | Square control on button chrome (`sync` / `toggle` / `getState`). Not a switch and not a checkbox. The twenty-sixth Emerging runtime. Shipped in 0.9.3. | [Icon button](../../docs/juice/juice-icon-button-runtime.md) |
|
|
124
|
+
| Pressable | `[pressable]` | Transient press (`sync` / `getState`). Sets `[pressed]` for the gesture. `[pressable-longpress]` opts into `juice:longpress`. Not a latched toggle. The twenty-ninth Emerging runtime. Shipped in 0.9.4. | [Pressable](../../docs/juice/juice-pressable.md) |
|
|
125
|
+
| Touchable row | `[touchable-row]` | 44px row (`sync` / `getState`). `[touchable-row~="select"]` toggles selection. Enter and Space activate an `li` or `div`. Not a single-select group. The thirtieth Emerging runtime. Shipped in 0.9.4. | [Touchable row](../../docs/juice/juice-touchable-row.md) |
|
|
125
126
|
|
|
126
127
|
### Feedback
|
|
127
128
|
|
|
@@ -143,14 +144,14 @@ The full index, including how to choose between similar components, is [Runtime
|
|
|
143
144
|
|
|
144
145
|
| Component | Markup | What it is | Docs |
|
|
145
146
|
| --- | --- | --- | --- |
|
|
146
|
-
| Avatar
|
|
147
|
-
| Table
|
|
147
|
+
| Avatar | `[avatar]` | Initials or photo (`sync` / `getState`). Not a badge and not `[skeleton="circle"]`. The twenty-seventh Emerging runtime. Shipped in 0.9.3. | [Avatar](../../docs/juice/juice-avatar.md) |
|
|
148
|
+
| Table | `<table table>` | Sortable grid. The twenty-eighth runtime. Shipped in 0.9.3. | [Table](../../docs/juice/juice-table.md) |
|
|
148
149
|
|
|
149
150
|
### Page chrome
|
|
150
151
|
|
|
151
152
|
| Component | Markup | What it is | Docs |
|
|
152
153
|
| --- | --- | --- | --- |
|
|
153
|
-
| Keyboard avoider
|
|
154
|
+
| Keyboard avoider | `[keyboard-avoider]` | Inset while the software keyboard is open. The thirty-first runtime. Shipped in 0.9.5. Workspace `@citrusworx/sigjs` **1.1.0** (not published) names it. npm **1.0.0** does not. | [Keyboard avoider](../../docs/juice/juice-keyboard-avoider-runtime.md) |
|
|
154
155
|
|
|
155
156
|
### Auto-start
|
|
156
157
|
|
|
@@ -169,7 +170,7 @@ Every runtime exports the same four functions. `<Name>` is the component stem, s
|
|
|
169
170
|
| `start<Name>Runtime()` | Boots the document-level controller that enhances matching markup. A second call syncs and returns that controller. Returns `null` when there is no document. |
|
|
170
171
|
| `stop<Name>Runtime()` | Destroys that document-level controller. |
|
|
171
172
|
|
|
172
|
-
Modal shows the four export names. The other thirty use the same `create` / `init` / `start` / `stop` names. Controller methods differ by runtime.
|
|
173
|
+
Modal shows the four export names. The other thirty-one use the same `create` / `init` / `start` / `stop` names. Controller methods differ by runtime.
|
|
173
174
|
|
|
174
175
|
```ts
|
|
175
176
|
import {
|
|
@@ -190,7 +191,7 @@ stopModalRuntime();
|
|
|
190
191
|
|
|
191
192
|
`tokens` is the shared token object: color families and swatches, and the `adobe` and `google` font providers. `Accordion` is a Sig component that renders one `[accordion]` section (trigger plus panel). It is not the document runtime. The runtime is `createAccordion` / `startAccordionRuntime`.
|
|
192
193
|
|
|
193
|
-
Icon button, avatar, table, pressable, touchable row,
|
|
194
|
+
Icon button, avatar, table, pressable, touchable row, keyboard avoider, and sheet export the same four names. Icon button, avatar, and table shipped in 0.9.3. Pressable and touchable row shipped in 0.9.4. Keyboard avoider shipped in 0.9.5. Sheet is on master and is not in that npm cut.
|
|
194
195
|
|
|
195
196
|
### `juice:change` and `getState`
|
|
196
197
|
|
|
@@ -198,14 +199,14 @@ Interactive runtimes dispatch a bubbling `juice:change` from the widget host whe
|
|
|
198
199
|
|
|
199
200
|
Select, input, and textarea publish through native `input` and `change`. They still expose `getState()`.
|
|
200
201
|
|
|
201
|
-
The contract covers all thirty-
|
|
202
|
+
The contract covers all thirty-two runtimes. `juice:change` and `JUICE_CHANGE_EVENT` shipped in 0.9.3. Pressable and touchable row dispatch that contract from 0.9.4. Keyboard avoider dispatches it from 0.9.5. Sheet dispatches it on master and is not in the 0.9.5 npm cut.
|
|
202
203
|
|
|
203
|
-
`@citrusworx/sigjs
|
|
204
|
+
npm `@citrusworx/sigjs` **1.0.0** and **0.7.2** `bind` names twenty-eight runtimes, through `table`. Workspace `@citrusworx/sigjs` **1.1.0** (not published) names thirty-one, through keyboard-avoider. `sheet` is not a `JuiceRuntimeName`.
|
|
204
205
|
|
|
205
|
-
- `icon-button`, `avatar`, and `table` are `JuiceRuntimeName` values.
|
|
206
|
-
- Pressable, touchable row, and keyboard avoider are not.
|
|
206
|
+
- `icon-button`, `avatar`, and `table` are `JuiceRuntimeName` values on npm **1.0.0** and on the workspace tree.
|
|
207
|
+
- Pressable, touchable row, and keyboard avoider are `JuiceRuntimeName` values on workspace **1.1.0** and are not names on npm **1.0.0**. Sheet is not a name on either tree.
|
|
207
208
|
- `@citrusworx/sigjs@0.7.0` and `@citrusworx/sigjs@0.7.1` stop at twenty-five names, through `textarea`.
|
|
208
|
-
- Binding `icon-button`, `avatar`, or `table` against `@citrusworx/juiceui@0.9.2` throws.
|
|
209
|
+
- Binding `icon-button`, `avatar`, or `table` against `@citrusworx/juiceui@0.9.1` or `@citrusworx/juiceui@0.9.2` throws. Those cuts do not export their start functions. The three exports shipped in 0.9.3. Pressable and touchable row shipped in 0.9.4. Keyboard avoider shipped in 0.9.5.
|
|
209
210
|
|
|
210
211
|
Juice works without Sig. The optional adapter is `@citrusworx/sigjs/juice` only.
|
|
211
212
|
|
|
@@ -344,14 +345,14 @@ Attributes, keyboard behavior, and theme roles for each component are on the pag
|
|
|
344
345
|
|
|
345
346
|
### CSS-only chrome
|
|
346
347
|
|
|
347
|
-
These do not auto-enhance, do not dispatch `juice:change`, and are not part of the thirty-
|
|
348
|
+
These do not auto-enhance, do not dispatch `juice:change`, and are not part of the thirty-two runtimes.
|
|
348
349
|
|
|
349
350
|
| Chrome | Hook | Release | Docs |
|
|
350
351
|
| --- | --- | --- | --- |
|
|
351
|
-
| Skeleton | `[skeleton]` |
|
|
352
|
-
| List | `[list]` |
|
|
353
|
-
| Badge | `[badge]` | Layout shipped in npm 0.9.2. `--juice-badge-*` roles
|
|
354
|
-
| Safe area | `[safe-area]` |
|
|
352
|
+
| Skeleton | `[skeleton]` | Shipped in 0.9.3 | [Skeleton](../../docs/juice/juice-skeleton.md) |
|
|
353
|
+
| List | `[list]` | Shipped in 0.9.3 | [List](../../docs/juice/juice-list.md) |
|
|
354
|
+
| Badge | `[badge]` | Layout shipped in npm 0.9.2. `--juice-badge-*` roles shipped in 0.9.3 | [Badge](../../docs/juice/juice-badge.md) |
|
|
355
|
+
| Safe area | `[safe-area]` | Shipped in 0.9.3 | [Safe area](../../docs/juice/juice-safe-area.md) |
|
|
355
356
|
|
|
356
357
|
## Layout
|
|
357
358
|
|
|
@@ -407,15 +408,15 @@ If you are hosting Juice assets yourself, the main built files are:
|
|
|
407
408
|
|
|
408
409
|
Load core plus at least one theme CSS file when using `theme="..."` on the root element.
|
|
409
410
|
|
|
410
|
-
There is no first-party Juice CDN. Those `dist/` files are on npm, so jsDelivr and unpkg serve them (verified for `@citrusworx/juiceui@0.9.
|
|
411
|
+
There is no first-party Juice CDN. Those `dist/` files are on npm, so jsDelivr and unpkg serve them (verified for `@citrusworx/juiceui@0.9.5`):
|
|
411
412
|
|
|
412
413
|
```html
|
|
413
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@citrusworx/juiceui@0.9.
|
|
414
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@citrusworx/juiceui@0.9.
|
|
415
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@citrusworx/juiceui@0.9.
|
|
414
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@citrusworx/juiceui@0.9.5/dist/index.css" />
|
|
415
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@citrusworx/juiceui@0.9.5/dist/themes/kiwipress.css" />
|
|
416
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@citrusworx/juiceui@0.9.5/dist/index.js"></script>
|
|
416
417
|
```
|
|
417
418
|
|
|
418
|
-
The JS module is optional. Pin a version. You can also copy the same files out of `node_modules/@citrusworx/juiceui/dist/` next to a plain HTML page. unpkg uses the same paths under `https://unpkg.com/@citrusworx/juiceui@0.9.
|
|
419
|
+
The JS module is optional. Pin a version. You can also copy the same files out of `node_modules/@citrusworx/juiceui/dist/` next to a plain HTML page. unpkg uses the same paths under `https://unpkg.com/@citrusworx/juiceui@0.9.5/`.
|
|
419
420
|
|
|
420
421
|
### What the build contains
|
|
421
422
|
|
|
@@ -426,8 +427,8 @@ The JS module is optional. Pin a version. You can also copy the same files out o
|
|
|
426
427
|
- attribute selectors for color, spacing, width, height, gradients, shadows, and icons
|
|
427
428
|
- layout primitives for `stack`, `row`, `grid`, `gap`, and `span`
|
|
428
429
|
- FontAwesome Free icon integration across the solid, regular, and brands sets
|
|
429
|
-
- CSS-only `[skeleton]`, `[list]`, `[badge]` (base layout in 0.9.2; `--juice-badge-*` roles
|
|
430
|
-
- `[avatar]
|
|
430
|
+
- CSS-only `[skeleton]`, `[list]`, `[badge]` (base layout in 0.9.2; `--juice-badge-*` roles in 0.9.3), and `[safe-area]` (shipped in 0.9.3), described above
|
|
431
|
+
- `[avatar]` and `[table]` runtimes shipped in 0.9.3. `[pressable]` and `[touchable-row]` shipped in 0.9.4
|
|
431
432
|
|
|
432
433
|
<details>
|
|
433
434
|
<summary>Internal workspace assets</summary>
|
package/dist/index.css
CHANGED
|
@@ -102591,6 +102591,286 @@ nav[sticky] > [container][safe-area=y][keyboard-avoider~=padding],
|
|
|
102591
102591
|
transition: none;
|
|
102592
102592
|
}
|
|
102593
102593
|
}
|
|
102594
|
+
:root {
|
|
102595
|
+
--juice-sheet-offset: max(env(safe-area-inset-top, 0px), 1.5rem);
|
|
102596
|
+
--juice-sheet-peek: 25vh;
|
|
102597
|
+
--juice-sheet-peek: 25dvh;
|
|
102598
|
+
--juice-sheet-half: 50vh;
|
|
102599
|
+
--juice-sheet-half: 50dvh;
|
|
102600
|
+
--juice-sheet-full: calc(100vh - var(--juice-sheet-offset));
|
|
102601
|
+
--juice-sheet-full: calc(100dvh - var(--juice-sheet-offset));
|
|
102602
|
+
--juice-sheet-max-height: calc(100vh - var(--juice-sheet-offset));
|
|
102603
|
+
--juice-sheet-max-height: calc(100dvh - var(--juice-sheet-offset));
|
|
102604
|
+
--juice-sheet-radius: 1rem;
|
|
102605
|
+
--juice-sheet-handle-width: 2.5rem;
|
|
102606
|
+
--juice-sheet-handle-height: 0.25rem;
|
|
102607
|
+
}
|
|
102608
|
+
|
|
102609
|
+
[sheet-overlay],
|
|
102610
|
+
[theme] [sheet-overlay] {
|
|
102611
|
+
position: fixed;
|
|
102612
|
+
inset: 0;
|
|
102613
|
+
z-index: 1000;
|
|
102614
|
+
box-sizing: border-box;
|
|
102615
|
+
}
|
|
102616
|
+
|
|
102617
|
+
[sheet-overlay][hidden],
|
|
102618
|
+
[theme] [sheet-overlay][hidden] {
|
|
102619
|
+
display: none;
|
|
102620
|
+
}
|
|
102621
|
+
|
|
102622
|
+
[sheet-overlay]:not([sheet-overlay=none]),
|
|
102623
|
+
[sheet-overlay=static],
|
|
102624
|
+
[theme] [sheet-overlay]:not([sheet-overlay=none]),
|
|
102625
|
+
[theme] [sheet-overlay=static] {
|
|
102626
|
+
background-color: var(--juice-sheet-overlay, var(--juice-drawer-overlay, rgba(25.5, 25.5, 25.5, 0.55)));
|
|
102627
|
+
pointer-events: auto;
|
|
102628
|
+
}
|
|
102629
|
+
|
|
102630
|
+
[sheet-overlay=none],
|
|
102631
|
+
[theme] [sheet-overlay=none] {
|
|
102632
|
+
background-color: transparent;
|
|
102633
|
+
pointer-events: none;
|
|
102634
|
+
}
|
|
102635
|
+
|
|
102636
|
+
[sheet-overlay=none] [sheet],
|
|
102637
|
+
[theme] [sheet-overlay=none] [sheet] {
|
|
102638
|
+
pointer-events: auto;
|
|
102639
|
+
}
|
|
102640
|
+
|
|
102641
|
+
[sheet] {
|
|
102642
|
+
position: absolute;
|
|
102643
|
+
top: auto;
|
|
102644
|
+
right: 0;
|
|
102645
|
+
bottom: 0;
|
|
102646
|
+
left: 0;
|
|
102647
|
+
display: flex;
|
|
102648
|
+
flex-direction: column;
|
|
102649
|
+
width: 100%;
|
|
102650
|
+
max-width: 100%;
|
|
102651
|
+
height: var(--juice-sheet-half);
|
|
102652
|
+
max-height: var(--juice-sheet-max-height);
|
|
102653
|
+
box-sizing: border-box;
|
|
102654
|
+
border-radius: var(--juice-sheet-radius) var(--juice-sheet-radius) 0 0;
|
|
102655
|
+
overflow: hidden;
|
|
102656
|
+
transition: height var(--juice-motion-duration-base) var(--juice-motion-ease-enter), max-height var(--juice-motion-duration-base) var(--juice-motion-ease-enter);
|
|
102657
|
+
}
|
|
102658
|
+
|
|
102659
|
+
[sheet],
|
|
102660
|
+
[theme] [sheet]:not([surfaceTone]) {
|
|
102661
|
+
background-color: var(--juice-sheet-panel, var(--juice-drawer-panel, hsl(0, 0%, 100%)));
|
|
102662
|
+
border: 1px solid var(--juice-sheet-panel-border, var(--juice-drawer-panel-border, rgba(216.75, 216.75, 216.75, 0.85)));
|
|
102663
|
+
box-shadow: var(--juice-sheet-panel-shadow, var(--juice-drawer-panel-shadow, 0 24px 56px -24px rgba(25.5, 25.5, 25.5, 0.42)));
|
|
102664
|
+
}
|
|
102665
|
+
|
|
102666
|
+
[sheet][sheet-detents~=half]:not([detent]) {
|
|
102667
|
+
height: var(--juice-sheet-half);
|
|
102668
|
+
}
|
|
102669
|
+
|
|
102670
|
+
[sheet][sheet-detents~=peek]:not([detent]):not([sheet-detents~=half]):not([sheet-detents~=full]) {
|
|
102671
|
+
height: var(--juice-sheet-peek);
|
|
102672
|
+
}
|
|
102673
|
+
|
|
102674
|
+
[sheet][sheet-detents~=full]:not([detent]):not([sheet-detents~=half]) {
|
|
102675
|
+
height: var(--juice-sheet-full);
|
|
102676
|
+
}
|
|
102677
|
+
|
|
102678
|
+
[sheet][detent=peek] {
|
|
102679
|
+
height: var(--juice-sheet-peek);
|
|
102680
|
+
}
|
|
102681
|
+
|
|
102682
|
+
[sheet][detent=half] {
|
|
102683
|
+
height: var(--juice-sheet-half);
|
|
102684
|
+
}
|
|
102685
|
+
|
|
102686
|
+
[sheet][detent=full] {
|
|
102687
|
+
height: var(--juice-sheet-full);
|
|
102688
|
+
}
|
|
102689
|
+
|
|
102690
|
+
[sheet-handle],
|
|
102691
|
+
[theme] [sheet-handle] {
|
|
102692
|
+
position: relative;
|
|
102693
|
+
z-index: 1;
|
|
102694
|
+
display: block;
|
|
102695
|
+
flex: 0 0 auto;
|
|
102696
|
+
align-self: center;
|
|
102697
|
+
width: var(--juice-sheet-handle-width);
|
|
102698
|
+
height: var(--juice-sheet-handle-height);
|
|
102699
|
+
margin-top: 0.75rem;
|
|
102700
|
+
margin-bottom: 0.25rem;
|
|
102701
|
+
padding: 0;
|
|
102702
|
+
border: none;
|
|
102703
|
+
border-radius: 999px;
|
|
102704
|
+
background-color: var(--juice-sheet-close-color, var(--juice-drawer-close-color, hsl(0, 0%, 20%)));
|
|
102705
|
+
background-image: none;
|
|
102706
|
+
box-shadow: none;
|
|
102707
|
+
touch-action: none;
|
|
102708
|
+
-webkit-user-select: none;
|
|
102709
|
+
user-select: none;
|
|
102710
|
+
}
|
|
102711
|
+
|
|
102712
|
+
[sheet-handle]::before,
|
|
102713
|
+
[theme] [sheet-handle]::before {
|
|
102714
|
+
content: "";
|
|
102715
|
+
position: absolute;
|
|
102716
|
+
left: 50%;
|
|
102717
|
+
top: -0.75rem;
|
|
102718
|
+
width: 100%;
|
|
102719
|
+
height: 44px;
|
|
102720
|
+
transform: translateX(-50%);
|
|
102721
|
+
}
|
|
102722
|
+
|
|
102723
|
+
[sheet-header] {
|
|
102724
|
+
display: flex;
|
|
102725
|
+
flex-direction: column;
|
|
102726
|
+
flex: 0 0 auto;
|
|
102727
|
+
gap: 0.5rem;
|
|
102728
|
+
text-align: start;
|
|
102729
|
+
padding: 0.25rem 3.5rem 0.75rem 1.25rem;
|
|
102730
|
+
box-sizing: border-box;
|
|
102731
|
+
}
|
|
102732
|
+
|
|
102733
|
+
[sheet-body] {
|
|
102734
|
+
flex: 1 1 auto;
|
|
102735
|
+
min-height: 0;
|
|
102736
|
+
overflow: auto;
|
|
102737
|
+
overscroll-behavior: contain;
|
|
102738
|
+
padding: 0 1.25rem 1.25rem;
|
|
102739
|
+
box-sizing: border-box;
|
|
102740
|
+
}
|
|
102741
|
+
|
|
102742
|
+
[sheet] > [sheet-body]:last-child {
|
|
102743
|
+
padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px), var(--juice-keyboard-inset));
|
|
102744
|
+
}
|
|
102745
|
+
|
|
102746
|
+
[sheet-footer] {
|
|
102747
|
+
flex: 0 0 auto;
|
|
102748
|
+
box-sizing: border-box;
|
|
102749
|
+
padding-top: 0.75rem;
|
|
102750
|
+
padding-right: 1.25rem;
|
|
102751
|
+
padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px), var(--juice-keyboard-inset));
|
|
102752
|
+
padding-left: 1.25rem;
|
|
102753
|
+
}
|
|
102754
|
+
|
|
102755
|
+
[sheet-close],
|
|
102756
|
+
[theme] [sheet-close] {
|
|
102757
|
+
position: absolute;
|
|
102758
|
+
top: 0.75rem;
|
|
102759
|
+
right: 0.75rem;
|
|
102760
|
+
width: 2.5rem;
|
|
102761
|
+
height: 2.5rem;
|
|
102762
|
+
border-radius: 50%;
|
|
102763
|
+
display: inline-flex;
|
|
102764
|
+
align-items: center;
|
|
102765
|
+
justify-content: center;
|
|
102766
|
+
cursor: pointer;
|
|
102767
|
+
border: none;
|
|
102768
|
+
padding: 0;
|
|
102769
|
+
background-color: var(--juice-sheet-close, var(--juice-drawer-close, hsl(0, 0%, 100%)));
|
|
102770
|
+
background-image: none;
|
|
102771
|
+
color: var(--juice-sheet-close-color, var(--juice-drawer-close-color, hsl(0, 0%, 20%)));
|
|
102772
|
+
box-shadow: none;
|
|
102773
|
+
transform: none;
|
|
102774
|
+
transition: background-color var(--juice-motion-duration-fast) var(--juice-motion-ease-standard), color var(--juice-motion-duration-fast) var(--juice-motion-ease-standard);
|
|
102775
|
+
}
|
|
102776
|
+
|
|
102777
|
+
[sheet-close]:hover,
|
|
102778
|
+
[theme] [sheet-close]:hover {
|
|
102779
|
+
background-color: var(--juice-sheet-close-hover, var(--juice-drawer-close-hover, hsl(0, 0%, 95%)));
|
|
102780
|
+
background-image: none;
|
|
102781
|
+
color: var(--juice-sheet-close-color, var(--juice-drawer-close-color, hsl(0, 0%, 20%)));
|
|
102782
|
+
transform: none;
|
|
102783
|
+
}
|
|
102784
|
+
|
|
102785
|
+
[sheet-close]:focus-visible,
|
|
102786
|
+
[theme] [sheet-close]:focus-visible {
|
|
102787
|
+
outline: 2px solid var(--juice-sheet-focus-ring, var(--juice-drawer-focus-ring, currentColor));
|
|
102788
|
+
outline-offset: 2px;
|
|
102789
|
+
}
|
|
102790
|
+
|
|
102791
|
+
html[keyboard-open] [sheet],
|
|
102792
|
+
html[keyboard-open] [theme] [sheet] {
|
|
102793
|
+
max-height: calc(var(--juice-sheet-max-height) - var(--juice-keyboard-inset));
|
|
102794
|
+
}
|
|
102795
|
+
|
|
102796
|
+
html[keyboard-open] [sheet] > [sheet-body]:last-child,
|
|
102797
|
+
html[keyboard-open] [theme] [sheet] > [sheet-body]:last-child,
|
|
102798
|
+
html[keyboard-open] [sheet-footer],
|
|
102799
|
+
html[keyboard-open] [theme] [sheet-footer] {
|
|
102800
|
+
padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px));
|
|
102801
|
+
}
|
|
102802
|
+
|
|
102803
|
+
[sheet][dragging],
|
|
102804
|
+
[theme] [sheet][dragging],
|
|
102805
|
+
[sheet-overlay][dragging] [sheet],
|
|
102806
|
+
[theme] [sheet-overlay][dragging] [sheet] {
|
|
102807
|
+
transition: none;
|
|
102808
|
+
}
|
|
102809
|
+
|
|
102810
|
+
@keyframes juice-sheet-overlay-in {
|
|
102811
|
+
from {
|
|
102812
|
+
opacity: 0;
|
|
102813
|
+
}
|
|
102814
|
+
to {
|
|
102815
|
+
opacity: 1;
|
|
102816
|
+
}
|
|
102817
|
+
}
|
|
102818
|
+
@keyframes juice-sheet-overlay-out {
|
|
102819
|
+
from {
|
|
102820
|
+
opacity: 1;
|
|
102821
|
+
}
|
|
102822
|
+
to {
|
|
102823
|
+
opacity: 0;
|
|
102824
|
+
}
|
|
102825
|
+
}
|
|
102826
|
+
@keyframes juice-sheet-panel-in {
|
|
102827
|
+
from {
|
|
102828
|
+
transform: translateY(100%);
|
|
102829
|
+
}
|
|
102830
|
+
to {
|
|
102831
|
+
transform: none;
|
|
102832
|
+
}
|
|
102833
|
+
}
|
|
102834
|
+
@keyframes juice-sheet-panel-out {
|
|
102835
|
+
from {
|
|
102836
|
+
transform: none;
|
|
102837
|
+
}
|
|
102838
|
+
to {
|
|
102839
|
+
transform: translateY(100%);
|
|
102840
|
+
}
|
|
102841
|
+
}
|
|
102842
|
+
[sheet-overlay][data-motion-state=entering] {
|
|
102843
|
+
animation: juice-sheet-overlay-in var(--juice-motion-duration-base) var(--juice-motion-ease-enter) both;
|
|
102844
|
+
}
|
|
102845
|
+
|
|
102846
|
+
[sheet-overlay][data-motion-state=entering] [sheet] {
|
|
102847
|
+
animation: juice-sheet-panel-in var(--juice-motion-duration-base) var(--juice-motion-ease-enter) both;
|
|
102848
|
+
}
|
|
102849
|
+
|
|
102850
|
+
[sheet-overlay][data-motion-state=exiting] {
|
|
102851
|
+
animation: juice-sheet-overlay-out var(--juice-motion-duration-fast) var(--juice-motion-ease-exit) both;
|
|
102852
|
+
}
|
|
102853
|
+
|
|
102854
|
+
[sheet-overlay][data-motion-state=exiting] [sheet] {
|
|
102855
|
+
animation: juice-sheet-panel-out var(--juice-motion-duration-fast) var(--juice-motion-ease-exit) both;
|
|
102856
|
+
}
|
|
102857
|
+
|
|
102858
|
+
[sheet-overlay][data-motion-state=exited] {
|
|
102859
|
+
opacity: 0;
|
|
102860
|
+
}
|
|
102861
|
+
|
|
102862
|
+
[sheet-overlay][data-motion-state=exited] [sheet] {
|
|
102863
|
+
transform: translateY(100%);
|
|
102864
|
+
}
|
|
102865
|
+
|
|
102866
|
+
@media (prefers-reduced-motion: reduce) {
|
|
102867
|
+
[sheet],
|
|
102868
|
+
[theme] [sheet],
|
|
102869
|
+
[sheet-close],
|
|
102870
|
+
[theme] [sheet-close] {
|
|
102871
|
+
transition: none;
|
|
102872
|
+
}
|
|
102873
|
+
}
|
|
102594
102874
|
[search-panel] {
|
|
102595
102875
|
max-width: 56rem;
|
|
102596
102876
|
margin: 0 auto;
|
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export { createTouchableRow, initTouchableRow, startTouchableRowRuntime, stopTou
|
|
|
61
61
|
export type { TouchableRowController, TouchableRowOptions, TouchableRowState } from "./js/src/touchable-row/touchable-row-runtime.js";
|
|
62
62
|
export { createKeyboardAvoider, initKeyboardAvoider, startKeyboardAvoiderRuntime, stopKeyboardAvoiderRuntime } from "./js/src/keyboard-avoider/keyboard-avoider-runtime.js";
|
|
63
63
|
export type { KeyboardAvoiderController, KeyboardAvoiderOptions, KeyboardAvoiderState } from "./js/src/keyboard-avoider/keyboard-avoider-runtime.js";
|
|
64
|
+
export { createSheet, initSheet, startSheetRuntime, stopSheetRuntime } from "./js/src/sheet/sheet-runtime.js";
|
|
65
|
+
export type { SheetController, SheetDetent, SheetOptions, SheetState } from "./js/src/sheet/sheet-runtime.js";
|
|
64
66
|
export { prefersReducedMotion, subscribeReducedMotion, createMotionCancelToken, runMotion, createElementMotion } from "./js/src/shared/motion.js";
|
|
65
67
|
export type { MotionCancelToken, MotionDirection, MotionPlayer, MotionResult, MotionState } from "./js/src/shared/motion.js";
|
|
66
68
|
export { JUICE_CHANGE_EVENT } from "./js/src/shared/change.js";
|