@citrusworx/juiceui 0.4.0 → 0.6.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 +21 -8
- package/dist/index.css +24118 -23563
- package/dist/index.d.ts +2 -0
- package/dist/index.js +264 -44
- package/dist/js/juice.d.ts +2 -0
- package/dist/js/src/modal/modal-runtime.d.ts +30 -0
- package/dist/themes/aquaflux.css +81 -0
- package/dist/themes/citrusmint.css +79 -0
- package/dist/themes/index.d.ts +1 -1
- package/dist/themes/kiwipress.css +67 -6
- package/dist/themes/tide.css +482 -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,10 @@ import {
|
|
|
81
81
|
initTabs,
|
|
82
82
|
startTabsRuntime,
|
|
83
83
|
stopTabsRuntime,
|
|
84
|
+
createModal,
|
|
85
|
+
initModal,
|
|
86
|
+
startModalRuntime,
|
|
87
|
+
stopModalRuntime,
|
|
84
88
|
createNavigation,
|
|
85
89
|
initNavigation,
|
|
86
90
|
startNavigationRuntime,
|
|
@@ -91,15 +95,14 @@ import {
|
|
|
91
95
|
|
|
92
96
|
The top-level JS entrypoint is intentionally small. Those named exports are the stable runtime API Juice currently promises.
|
|
93
97
|
|
|
94
|
-
Importing that entry auto-starts the navigation, accordion, and
|
|
98
|
+
Importing that entry auto-starts the navigation, accordion, tabs, and modal runtimes in the browser. Valid `[accordion]`, `[tabs]`, and `[modal-overlay]` 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), and [docs/juice/juice-modal-runtime.md](../../docs/juice/juice-modal-runtime.md).
|
|
95
99
|
|
|
96
100
|
## Use the built files directly
|
|
97
101
|
|
|
98
102
|
If you are hosting Juice assets yourself, the main built files are:
|
|
99
103
|
|
|
100
104
|
- `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)
|
|
105
|
+
- `dist/themes/aquaflux.css`, `dist/themes/kiwipress.css`, `dist/themes/citrusmint.css`, `dist/themes/tide.css`
|
|
103
106
|
- `dist/index.js`
|
|
104
107
|
|
|
105
108
|
Load core plus at least one theme CSS file when using `theme="..."` on the root element.
|
|
@@ -135,14 +138,15 @@ Juice keeps styling attribute-first, but interactive patterns still need accessi
|
|
|
135
138
|
- mobile nav toggles should expose an accessible name and control a sidebar with `aria-controls`
|
|
136
139
|
- accordion triggers should use `aria-expanded` and `aria-controls`
|
|
137
140
|
- 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
|
|
141
|
+
- accordion chrome colors come from `--juice-accordion-*` roles bound by the active theme (Aquaflux, KiwiPress, Citrusmint, and Tide)
|
|
142
|
+
- 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
143
|
- 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
144
|
- optional `[motion="accordion"]` is height easing, not required for show/hide
|
|
142
145
|
- tabs live under a `[tabs]` root with `[tabs-list]`, `[tab]` triggers, and `[tab-panel]` panels; orphan triggers and panels are ignored
|
|
143
146
|
- 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,
|
|
147
|
+
- tab chrome colors come from `--juice-tabs-*` roles bound by the active theme (Aquaflux, KiwiPress, Citrusmint, Tide, and generated `--jx-tabs-*` aliases)
|
|
145
148
|
- visible vs hidden tab panels use the native `hidden` attribute; do not use `content="active"` or `content="hidden"` for panel state
|
|
149
|
+
- 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).
|
|
146
150
|
|
|
147
151
|
```html
|
|
148
152
|
<div tabs name="settings">
|
|
@@ -176,6 +180,15 @@ Juice keeps styling attribute-first, but interactive patterns still need accessi
|
|
|
176
180
|
</div>
|
|
177
181
|
</section>
|
|
178
182
|
</article>
|
|
183
|
+
|
|
184
|
+
<div modal-overlay id="demo-modal" hidden>
|
|
185
|
+
<div modal role="dialog" aria-modal="true" aria-labelledby="demo-title">
|
|
186
|
+
<button type="button" modal-close aria-label="Close">×</button>
|
|
187
|
+
<div modal-header><h2 id="demo-title">Account</h2></div>
|
|
188
|
+
<div modal-body>Update billing from the account dashboard.</div>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
<button type="button" aria-controls="demo-modal">Open account</button>
|
|
179
192
|
```
|
|
180
193
|
|
|
181
194
|
## Browser Support
|