@citrusworx/juiceui 0.7.0 → 0.8.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 CHANGED
@@ -97,6 +97,26 @@ import {
97
97
  initPopover,
98
98
  startPopoverRuntime,
99
99
  stopPopoverRuntime,
100
+ createWizard,
101
+ initWizard,
102
+ startWizardRuntime,
103
+ stopWizardRuntime,
104
+ createTooltip,
105
+ initTooltip,
106
+ startTooltipRuntime,
107
+ stopTooltipRuntime,
108
+ createCombobox,
109
+ initCombobox,
110
+ startComboboxRuntime,
111
+ stopComboboxRuntime,
112
+ createBanner,
113
+ initBanner,
114
+ startBannerRuntime,
115
+ stopBannerRuntime,
116
+ createMenu,
117
+ initMenu,
118
+ startMenuRuntime,
119
+ stopMenuRuntime,
100
120
  createNavigation,
101
121
  initNavigation,
102
122
  startNavigationRuntime,
@@ -107,7 +127,7 @@ import {
107
127
 
108
128
  The top-level JS entrypoint is intentionally small. Those named exports are the stable runtime API Juice currently promises.
109
129
 
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).
130
+ Importing that entry auto-starts the navigation, accordion, tabs, modal, drawer, toast, popover, wizard, tooltip, combobox, banner, and menu runtimes in the browser. Valid `[accordion]`, `[tabs]`, `[modal-overlay]`, `[drawer-overlay]`, `[toast-region]`, `[popover-root]`, `[wizard-shell]`, `[tooltip-root]`, `[combobox]`, `[banner]`, and `[menu-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), [docs/juice/juice-popover-runtime.md](../../docs/juice/juice-popover-runtime.md), [docs/juice/juice-wizard-runtime.md](../../docs/juice/juice-wizard-runtime.md), [docs/juice/juice-tooltip-runtime.md](../../docs/juice/juice-tooltip-runtime.md), [docs/juice/juice-combobox-runtime.md](../../docs/juice/juice-combobox-runtime.md), and [docs/juice/juice-banner-runtime.md](../../docs/juice/juice-banner-runtime.md). Banner is an inline alert / callout (`show` / `dismiss`, `[banner-close]`), not a toast stack.
111
131
 
112
132
  ## Use the built files directly
113
133
 
@@ -162,6 +182,11 @@ Juice keeps styling attribute-first, but interactive patterns still need accessi
162
182
  - 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
183
  - 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
184
  - 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).
185
+ - wizard chrome colors come from `--juice-wizard-*` roles bound by the active theme. Scope is `[wizard-shell]`. The runtime paints `[step="pending"|"active"|"completed"]`, shows one `[step-page]` with native `hidden`, and wires `[wizard-prev]` / `[wizard-next]` (or unmarked buttons in `[step-nav]`). Default navigation jumps to completed + current; `wizard-shell="linear"` is prev/next only; `wizard-shell="free"` jumps to any step. Do not use `content="active"` or `content="hidden"` for page state. See [docs/juice/juice-wizard-runtime.md](../../docs/juice/juice-wizard-runtime.md).
186
+ - tooltip chrome colors come from `--juice-tooltip-*` roles bound by the active theme; hide `[tooltip-root]` with the native `hidden` attribute. Triggers prefer `aria-describedby` pointing at the root id (`aria-controls` is also accepted). The runtime auto-enhances that markup (show/hide, Escape, exclusive, one-axis flip). There is no focus trap; focus never moves into the tip. Never use a bare `tooltip` attribute or native `title` — the surface is `[tooltip-panel]`. Placement is `[tooltip-root]` / `[tooltip-root="top"]` (default), `"bottom"`, `"left"`, `"right"`. See [docs/juice/juice-tooltip-runtime.md](../../docs/juice/juice-tooltip-runtime.md).
187
+ - combobox chrome colors come from `--juice-combobox-*` roles bound by the active theme; hide `[combobox-list]` with the native `hidden` attribute. Scope is `[combobox]` with `[combobox-input]`, optional `[combobox-trigger]`, `[combobox-list]`, and `[combobox-option]`. The runtime auto-enhances that markup (`open` / `close` / `toggle` / `select`, case-insensitive substring filter, Arrow/Home/End/Enter/Escape/Tab). `aria-expanded` is written on the input and trigger; `aria-activedescendant` tracks the active option. Select writes option text or `data-value`. Distinct from native `<select>`. Placement is CSS-only (absolute under the field). See [docs/juice/juice-combobox-runtime.md](../../docs/juice/juice-combobox-runtime.md).
188
+ - banner chrome colors come from `--juice-banner-*` roles bound by the active theme. `[banner]` is an inline alert / callout, not a toast stack and not a dialog. Hide with the native `hidden` attribute. Layout is `[banner]` / `[banner="full"]`; optional status is `[banner-tone="info|success|warning|error"]`. The runtime auto-enhances that markup (`show` / `dismiss`, `[banner-close]`, optional `banner-persist="session|local"` with `name` / `id`). It is not a dialog: no focus trap, no `aria-modal`, no Escape steal. See [docs/juice/juice-banner-runtime.md](../../docs/juice/juice-banner-runtime.md).
189
+ - menu chrome colors come from `--juice-menu-*` roles bound by the active theme. `[menu-root]` wraps an opener plus `[menu]`; hide the panel with the native `hidden` attribute. Optional `[menu-button]` is surface paint, not a CTA. Items are `[menuitem]` (value `"active"` is keyboard focus); optional `[menu-separator]` / `[menu-label]`. APG Menu Button, not a popover, combobox, or native `<select>`. Placement is CSS-only (`[menu-root]` / `"bottom"` default, `"top"`, `"left"`, `"right"`). Runtime is later.
165
190
 
166
191
  ```html
167
192
  <div tabs name="settings">
@@ -230,6 +255,52 @@ Juice keeps styling attribute-first, but interactive patterns still need accessi
230
255
  <div popover-body>Account details live on this page.</div>
231
256
  </div>
232
257
  </div>
258
+
259
+ <div wizard-shell name="onboard">
260
+ <ol steps>
261
+ <li step="active" data-step="welcome">Welcome</li>
262
+ <li step="pending" data-step="plan">Plan</li>
263
+ </ol>
264
+ <main wizard-content>
265
+ <section step-page="welcome">Welcome page</section>
266
+ <section step-page="plan" hidden>Plan page</section>
267
+ <div step-nav>
268
+ <button type="button" wizard-prev>Back</button>
269
+ <button type="button" wizard-next>Continue</button>
270
+ </div>
271
+ </main>
272
+ </div>
273
+
274
+ <button type="button" aria-describedby="demo-tip">Save</button>
275
+ <div tooltip-root id="demo-tip" hidden>
276
+ <div tooltip-panel role="tooltip">Saves the current draft.</div>
277
+ </div>
278
+
279
+ <label for="fruit-input">Fruit</label>
280
+ <div combobox name="fruit">
281
+ <input id="fruit-input" combobox-input type="text" />
282
+ <button type="button" combobox-trigger aria-label="Show fruits"></button>
283
+ <ul combobox-list hidden>
284
+ <li combobox-option>Apple</li>
285
+ <li combobox-option>Banana</li>
286
+ </ul>
287
+ </div>
288
+
289
+ <div banner="full" banner-tone="warning" name="maintenance" banner-persist="session">
290
+ <div banner-body>Scheduled maintenance tonight.</div>
291
+ <button type="button" banner-close aria-label="Dismiss">×</button>
292
+ </div>
293
+
294
+ <div menu-root>
295
+ <button type="button" menu-button aria-haspopup="menu" aria-controls="file-menu">File</button>
296
+ <div menu id="file-menu">
297
+ <button type="button" menuitem>New</button>
298
+ <button type="button" menuitem>Open…</button>
299
+ <div menu-separator></div>
300
+ <div menu-label>Recent</div>
301
+ <button type="button" menuitem="active">Report.pdf</button>
302
+ </div>
303
+ </div>
233
304
  ```
234
305
 
235
306
  ## Browser Support