@citrusworx/juiceui 0.4.0 → 0.7.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 +62 -8
- package/dist/index.css +24531 -23563
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1014 -44
- package/dist/js/juice.d.ts +8 -0
- package/dist/js/src/drawer/drawer-runtime.d.ts +30 -0
- package/dist/js/src/modal/modal-runtime.d.ts +30 -0
- package/dist/js/src/popover/popover-runtime.d.ts +56 -0
- package/dist/js/src/toast/toast-runtime.d.ts +45 -0
- package/dist/themes/aquaflux.css +311 -0
- package/dist/themes/citrusmint.css +297 -0
- package/dist/themes/index.d.ts +1 -1
- package/dist/themes/kiwipress.css +290 -7
- package/dist/themes/tide.css +709 -0
- package/package.json +12 -3
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ import "@citrusworx/juiceui/styles/themes/aquaflux";
|
|
|
50
50
|
|
|
51
51
|
```html
|
|
52
52
|
<body theme="aquaflux">
|
|
53
|
-
<!-- or theme="kiwipress" | theme="citrusmint" -->
|
|
53
|
+
<!-- or theme="kiwipress" | theme="citrusmint" | theme="tide" -->
|
|
54
54
|
</body>
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ Built-in breakpoints, `row` collapse, and scaled spacing are documented in [docs
|
|
|
62
62
|
|
|
63
63
|
## Surfaces
|
|
64
64
|
|
|
65
|
-
Beta-stable: `surfaceTone="soft"`. See [docs/juice/juice-surfaces.md](../../docs/juice/juice-surfaces.md).
|
|
65
|
+
Beta-stable: `surfaceTone="soft|strong|muted"`, `borderStrength="soft|bold"`, `blur="sm|md"`, `shadowTone="cool|warm"`, `overlay="frost|tint"`, and `variant="monochromatic|glass|tinted"`. Themes bind `--juice-surface-*`, `--juice-border-strength-*`, `--juice-shadow-tone-*`, and `--juice-overlay-*` roles. Variant recipes compose those same roles. Standalone blur uses fixed `6px` / `16px` lengths. See [docs/juice/juice-surfaces.md](../../docs/juice/juice-surfaces.md).
|
|
66
66
|
|
|
67
67
|
## Motion (Beta)
|
|
68
68
|
|
|
@@ -81,6 +81,22 @@ import {
|
|
|
81
81
|
initTabs,
|
|
82
82
|
startTabsRuntime,
|
|
83
83
|
stopTabsRuntime,
|
|
84
|
+
createModal,
|
|
85
|
+
initModal,
|
|
86
|
+
startModalRuntime,
|
|
87
|
+
stopModalRuntime,
|
|
88
|
+
createDrawer,
|
|
89
|
+
initDrawer,
|
|
90
|
+
startDrawerRuntime,
|
|
91
|
+
stopDrawerRuntime,
|
|
92
|
+
createToast,
|
|
93
|
+
initToast,
|
|
94
|
+
startToastRuntime,
|
|
95
|
+
stopToastRuntime,
|
|
96
|
+
createPopover,
|
|
97
|
+
initPopover,
|
|
98
|
+
startPopoverRuntime,
|
|
99
|
+
stopPopoverRuntime,
|
|
84
100
|
createNavigation,
|
|
85
101
|
initNavigation,
|
|
86
102
|
startNavigationRuntime,
|
|
@@ -91,15 +107,14 @@ import {
|
|
|
91
107
|
|
|
92
108
|
The top-level JS entrypoint is intentionally small. Those named exports are the stable runtime API Juice currently promises.
|
|
93
109
|
|
|
94
|
-
Importing that entry auto-starts the navigation, accordion, and
|
|
110
|
+
Importing that entry auto-starts the navigation, accordion, tabs, modal, drawer, toast, and popover runtimes in the browser. Valid `[accordion]`, `[tabs]`, `[modal-overlay]`, `[drawer-overlay]`, `[toast-region]`, and `[popover-root]` markup work without app init. See [docs/juice/juice-accordion-runtime.md](../../docs/juice/juice-accordion-runtime.md), [docs/juice/juice-tabs-runtime.md](../../docs/juice/juice-tabs-runtime.md), [docs/juice/juice-modal-runtime.md](../../docs/juice/juice-modal-runtime.md), [docs/juice/juice-drawer-runtime.md](../../docs/juice/juice-drawer-runtime.md), [docs/juice/juice-toast-runtime.md](../../docs/juice/juice-toast-runtime.md), and [docs/juice/juice-popover-runtime.md](../../docs/juice/juice-popover-runtime.md).
|
|
95
111
|
|
|
96
112
|
## Use the built files directly
|
|
97
113
|
|
|
98
114
|
If you are hosting Juice assets yourself, the main built files are:
|
|
99
115
|
|
|
100
116
|
- `dist/index.css` (core)
|
|
101
|
-
- `dist/themes/aquaflux.css`, `dist/themes/kiwipress.css`, `dist/themes/citrusmint.css`
|
|
102
|
-
- `dist/themes/_draft/tide.css` (local draft artifact only — blocked from package `exports` and omitted from the published tarball)
|
|
117
|
+
- `dist/themes/aquaflux.css`, `dist/themes/kiwipress.css`, `dist/themes/citrusmint.css`, `dist/themes/tide.css`
|
|
103
118
|
- `dist/index.js`
|
|
104
119
|
|
|
105
120
|
Load core plus at least one theme CSS file when using `theme="..."` on the root element.
|
|
@@ -135,14 +150,18 @@ Juice keeps styling attribute-first, but interactive patterns still need accessi
|
|
|
135
150
|
- mobile nav toggles should expose an accessible name and control a sidebar with `aria-controls`
|
|
136
151
|
- accordion triggers should use `aria-expanded` and `aria-controls`
|
|
137
152
|
- accordion panels should be labeled regions when they contain meaningful content
|
|
138
|
-
- accordion chrome colors come from `--juice-accordion-*` roles bound by the active theme (Aquaflux, KiwiPress,
|
|
139
|
-
- group FAQ stacks in a card/panel surface (`[aqua-card]` / `[aqua-panel]` under Aquaflux, `[tide-card]` / `[tide-panel]` under
|
|
153
|
+
- accordion chrome colors come from `--juice-accordion-*` roles bound by the active theme (Aquaflux, KiwiPress, Citrusmint, and Tide)
|
|
154
|
+
- group FAQ stacks in a card/panel surface (`[aqua-card]` / `[aqua-panel]` under Aquaflux, `[tide-card]` / `[tide-panel]` under Tide) so the accordion wrapper stays structural
|
|
140
155
|
- open/closed accordion panels use the native `hidden` attribute; do not use `content="active"` or `content="hidden"` for accordion state (those clash with layout `[content]`)
|
|
141
156
|
- optional `[motion="accordion"]` is height easing, not required for show/hide
|
|
142
157
|
- tabs live under a `[tabs]` root with `[tabs-list]`, `[tab]` triggers, and `[tab-panel]` panels; orphan triggers and panels are ignored
|
|
143
158
|
- tab selection dual-writes Juice `[active]` and `aria-selected`; the runtime also wires `role="tablist"` / `tab` / `tabpanel`, roving tabindex, and labeled panels
|
|
144
|
-
- tab chrome colors come from `--juice-tabs-*` roles bound by the active theme (Aquaflux, KiwiPress,
|
|
159
|
+
- tab chrome colors come from `--juice-tabs-*` roles bound by the active theme (Aquaflux, KiwiPress, Citrusmint, Tide, and generated `--jx-tabs-*` aliases)
|
|
145
160
|
- visible vs hidden tab panels use the native `hidden` attribute; do not use `content="active"` or `content="hidden"` for panel state
|
|
161
|
+
- modal chrome colors come from `--juice-modal-*` roles bound by the active theme; hide `[modal-overlay]` with the native `hidden` attribute. Openers use `aria-controls` pointing at the overlay id. The dialog runtime auto-enhances that markup (open/close, Escape, focus trap, exclusive). See [docs/juice/juice-modal-runtime.md](../../docs/juice/juice-modal-runtime.md).
|
|
162
|
+
- toast chrome colors come from `--juice-toast-*` roles bound by the active theme. `[toast-region]` is a non-modal stack (default `top-right`); hide an individual `[toast]` with the native `hidden` attribute. Status is `[toast="success|error|info|warning"]`. The runtime auto-enhances that markup (`show` / `dismiss`, `[toast-close]`, `toast-duration`, live-region ARIA). It is not a dialog: no focus trap, no `aria-modal`, and stacking is allowed. See [docs/juice/juice-toast-runtime.md](../../docs/juice/juice-toast-runtime.md).
|
|
163
|
+
- drawer chrome colors come from `--juice-drawer-*` roles bound by the active theme; hide `[drawer-overlay]` with the native `hidden` attribute. Openers use `aria-controls` pointing at the overlay id. The dialog runtime auto-enhances that markup (open/close, Escape, focus trap, exclusive). Edge is `[drawer]` / `[drawer="left"|"right"]`; optional width is `[drawer-size="sm|lg"]`. See [docs/juice/juice-drawer-runtime.md](../../docs/juice/juice-drawer-runtime.md).
|
|
164
|
+
- popover chrome colors come from `--juice-popover-*` roles bound by the active theme; hide `[popover-root]` with the native `hidden` attribute. Openers use `aria-controls` pointing at the root id. The runtime auto-enhances that markup (open/close, Escape, outside click, Tab trap, exclusive, one-axis flip). The panel is a non-modal dialog (`role="dialog"`, no `aria-modal`). Never use a bare `popover` attribute — the surface is `[popover-panel]`. Placement is `[popover-root]` / `[popover-root="bottom"]` (default), `"top"`, `"left"`, `"right"`. See [docs/juice/juice-popover-runtime.md](../../docs/juice/juice-popover-runtime.md).
|
|
146
165
|
|
|
147
166
|
```html
|
|
148
167
|
<div tabs name="settings">
|
|
@@ -176,6 +195,41 @@ Juice keeps styling attribute-first, but interactive patterns still need accessi
|
|
|
176
195
|
</div>
|
|
177
196
|
</section>
|
|
178
197
|
</article>
|
|
198
|
+
|
|
199
|
+
<div modal-overlay id="demo-modal" hidden>
|
|
200
|
+
<div modal role="dialog" aria-modal="true" aria-labelledby="demo-title">
|
|
201
|
+
<button type="button" modal-close aria-label="Close">×</button>
|
|
202
|
+
<div modal-header><h2 id="demo-title">Account</h2></div>
|
|
203
|
+
<div modal-body>Update billing from the account dashboard.</div>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
<button type="button" aria-controls="demo-modal">Open account</button>
|
|
207
|
+
|
|
208
|
+
<div drawer-overlay id="demo-drawer" hidden>
|
|
209
|
+
<div drawer role="dialog" aria-modal="true" aria-labelledby="demo-drawer-title">
|
|
210
|
+
<button type="button" drawer-close aria-label="Close">×</button>
|
|
211
|
+
<div drawer-header><h2 id="demo-drawer-title">Filters</h2></div>
|
|
212
|
+
<div drawer-body>Refine results from the catalog.</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
<button type="button" aria-controls="demo-drawer">Open filters</button>
|
|
216
|
+
|
|
217
|
+
<div toast-region>
|
|
218
|
+
<div toast id="demo-toast">
|
|
219
|
+
<div toast-title>Saved</div>
|
|
220
|
+
<div toast-body>Your changes were written.</div>
|
|
221
|
+
<button type="button" toast-close aria-label="Dismiss">×</button>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<button type="button" aria-controls="demo-pop">Open help</button>
|
|
226
|
+
<div popover-root id="demo-pop" hidden>
|
|
227
|
+
<div popover-panel role="dialog">
|
|
228
|
+
<button type="button" popover-close aria-label="Close">×</button>
|
|
229
|
+
<div popover-header><h2>Help</h2></div>
|
|
230
|
+
<div popover-body>Account details live on this page.</div>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
179
233
|
```
|
|
180
234
|
|
|
181
235
|
## Browser Support
|