@ziyarago/ui 0.19.1 → 0.19.3
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/CHANGELOG.md +12 -0
- package/dist/llms-full.txt +1 -1
- package/dist/llms.txt +1 -1
- package/dist/manifest.json +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/src/core/components.js +2 -0
- package/src/core/components2.js +3 -3
- package/src/internal.js +1 -1
- package/src/styles/components.css +2 -2
- package/types/internal.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [0.19.3](https://github.com/ziyarago/ui/compare/v0.19.2...v0.19.3) (2026-10-21)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* LazyImage and EmptyState images with spaces or parentheses in the URL did not show; cssUrl helper ([0c6b0f6](https://github.com/ziyarago/ui/commit/0c6b0f65ca2834835f271aba4c4be9d7ebe8099b))
|
|
6
|
+
|
|
7
|
+
## [0.19.2](https://github.com/ziyarago/ui/compare/v0.19.1...v0.19.2) (2026-10-21)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Progress track stripes and hatch pattern visible in the light theme ([f2b7352](https://github.com/ziyarago/ui/commit/f2b7352703e5c86c95a2a6c3aaf90020242c0baa))
|
|
12
|
+
|
|
1
13
|
## [0.19.1](https://github.com/ziyarago/ui/compare/v0.19.0...v0.19.1) (2026-10-21)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/dist/llms-full.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> ZiyaraGo UI — glass design system for Umrah and Hajj products. OKLCH tokens, two palettes, dark and light, RTL, Thmanyah. One framework-neutral core with Vue 3, Nuxt and React adapters, 102 free components and 6 page templates (more in @ziyarago/ui-pro).
|
|
4
4
|
|
|
5
|
-
Version 0.19.
|
|
5
|
+
Version 0.19.3. Docs: https://ziyara.vip . Manifest (machine readable): https://ziyara.vip/manifest.json
|
|
6
6
|
|
|
7
7
|
## Setup
|
|
8
8
|
- import { UiButton } from '@ziyarago/ui/vue'
|
package/dist/llms.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> ZiyaraGo UI — glass design system for Umrah and Hajj products. OKLCH tokens, two palettes, dark and light, RTL, Thmanyah. One framework-neutral core with Vue 3, Nuxt and React adapters, 102 free components and 6 page templates (more in @ziyarago/ui-pro).
|
|
4
4
|
|
|
5
|
-
Version 0.19.
|
|
5
|
+
Version 0.19.3. Docs: https://ziyara.vip . Manifest (machine readable): https://ziyara.vip/manifest.json
|
|
6
6
|
|
|
7
7
|
## Setup
|
|
8
8
|
- import { UiButton } from '@ziyarago/ui/vue'
|
package/dist/manifest.json
CHANGED
package/dist/style.css
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
.zg-icon{display:inline-block;flex:none;width:1em;height:1em;background:currentColor;-webkit-mask:var(--zg-icon) center/contain no-repeat;mask:var(--zg-icon) center/contain no-repeat}
|
|
96
96
|
.zg-mono{font-family:var(--zg-font-mono);font-variant-numeric:tabular-nums}
|
|
97
97
|
.zg-num{font-variant-numeric:tabular-nums;font-weight:200;letter-spacing:-.035em}
|
|
98
|
-
.zg-hatch{background:repeating-linear-gradient(135deg,var(--zg-
|
|
98
|
+
.zg-hatch{background:repeating-linear-gradient(135deg,color-mix(in oklch,var(--zg-text-1) 22%,transparent) 0 1.5px,transparent 1.5px 6px)}
|
|
99
99
|
|
|
100
100
|
/* Button */
|
|
101
101
|
.zg-btn{--h:var(--zg-h-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--h);padding:0 calc(var(--h)*.45);border:0;border-radius:999px;cursor:pointer;font:600 14px var(--zg-font);white-space:nowrap;color:var(--zg-text-1);background:var(--zg-s2);box-shadow:var(--zg-rim);transition:transform .15s var(--zg-ease),background .15s,filter .15s}
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
.zg-kpi__label{font-size:13px;opacity:.75}.zg-kpi__value{font-size:36px;line-height:1}.zg-kpi__sub{font-size:12px;opacity:.75}
|
|
190
190
|
.zg-delta{font:700 12px var(--zg-font-mono)}.zg-delta--up{color:var(--zg-green)}.zg-delta--down{color:var(--zg-red)}
|
|
191
191
|
.zg-progress{display:flex;flex-direction:column;gap:6px}.zg-progress__row{display:flex;justify-content:space-between;font-size:13px}
|
|
192
|
-
.zg-progress__track{height:8px;border-radius:999px;overflow:hidden;background:repeating-linear-gradient(135deg,var(--zg-
|
|
192
|
+
.zg-progress__track{height:8px;border-radius:999px;overflow:hidden;background:repeating-linear-gradient(135deg,color-mix(in oklch,var(--zg-text-1) 22%,transparent) 0 1.5px,transparent 1.5px 6px),color-mix(in oklch,var(--zg-text-1) 6%,transparent)}
|
|
193
193
|
.zg-progress__bar{height:100%;border-radius:999px;background:var(--zg-brand);transition:width .8s var(--zg-ease)}
|
|
194
194
|
.zg-progress--success .zg-progress__bar{background:var(--zg-green)}.zg-progress--warning .zg-progress__bar{background:var(--zg-amber)}.zg-progress--danger .zg-progress__bar{background:var(--zg-red)}
|
|
195
195
|
.zg-ring{position:relative;display:inline-grid;place-items:center}.zg-ring svg{transform:rotate(-90deg)}.zg-ring__c{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:4px;text-align:center}.zg-ring__v{font-weight:300;letter-spacing:-.04em;font-variant-numeric:tabular-nums;line-height:1;color:var(--zg-text-1)}.zg-ring__l{font:500 12px/1.2 var(--zg-font);color:var(--zg-text-3)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziyarago/ui",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.3",
|
|
4
4
|
"description": "ZiyaraGo UI — glass design system for Umrah and Hajj products. OKLCH tokens, two palettes, dark and light, RTL, Thmanyah. One framework-neutral core with Vue 3, Nuxt and React adapters, 102 free components and 6 page templates (more in @ziyarago/ui-pro).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
package/src/core/components.js
CHANGED
|
@@ -5,6 +5,8 @@ import { trap } from './dialog.js';
|
|
|
5
5
|
import { t } from '../i18n/index.js';
|
|
6
6
|
import { rove, tabIdx, listKeys, openKeys, focusIn, toTrigger, trigger } from './keys.js';
|
|
7
7
|
export const cx = (...a) => a.filter(Boolean).join(' ');
|
|
8
|
+
// Quoted CSS url() for a background-image: URLs with spaces, parentheses, commas or quotes (photo (1).jpg, names with spaces) break the unquoted form and the image silently disappears.
|
|
9
|
+
export const cssUrl = u => 'url("' + String(u).replace(/["\\]/g, '\\$&').replace(/\n/g, '\\a ').replace(/\r/g, '\\d ') + '")';
|
|
8
10
|
// Copies the listed props that are set; used to forward native attributes and listeners to the real <input>/<textarea>.
|
|
9
11
|
const DOM_NAMES = { autocomplete: 'autoComplete', maxlength: 'maxLength', minlength: 'minLength', inputmode: 'inputMode', autocapitalize: 'autoCapitalize', spellcheck: 'spellCheck', autofocus: 'autoFocus' };
|
|
10
12
|
// DOM property spelling (autoComplete, maxLength ...) so React does not warn; Vue accepts it too.
|
package/src/core/components2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ziyarago/ui · components, part 2 — Forms, Surfaces, Actions, Data, Navigation, Layout, CRM, Hotels.
|
|
2
|
-
import { icon, cx, ddRef, pick, INPUT_ATTRS } from './components.js';
|
|
2
|
+
import { icon, cx, ddRef, pick, INPUT_ATTRS, cssUrl } from './components.js';
|
|
3
3
|
import { trap } from './dialog.js';
|
|
4
4
|
import { listKeys, openKeys, tabIdx, toTrigger, trigger, calKeys, dateKey } from './keys.js';
|
|
5
5
|
const tipId = s => { let x = 5381; for (const c of String(s)) x = (x * 33 ^ c.charCodeAt(0)) >>> 0; return 'zg-tip-' + x.toString(36); };
|
|
@@ -30,7 +30,7 @@ export const more = {
|
|
|
30
30
|
Skeleton: { render: ({ h, props: p }) => h('div', { class: 'zg-skelw' }, ...Array.from({ length: p.lines || 1 }, (_, i) => h('span', { key: i, class: 'zg-skel zg-skel--' + (p.variant || 'text'), style: { width: p.variant === 'circle' ? ({ xs: 24, sm: 32, md: 40, lg: 56, xl: 72 }[p.size] || p.size || 40) + 'px' : (i === (p.lines || 1) - 1 && (p.lines || 1) > 1 ? '60%' : p.width || '100%'), height: p.height || (p.variant === 'circle' ? ({ xs: 24, sm: 32, md: 40, lg: 56, xl: 72 }[p.size] || p.size || 40) + 'px' : undefined) } }))) },
|
|
31
31
|
Spinner: { render: ({ h, props: p }) => h('span', { class: 'zg-spin', role: 'status', 'aria-label': t('Spinner', 'loading'), style: { fontSize: ({ xs: 14, sm: 16, md: 20, lg: 28, xl: 36 }[p.size] || p.size || 20) + 'px' } }) },
|
|
32
32
|
Divider: { render: ({ h, props: p }) => h('div', { class: 'zg-div', role: 'separator' }, p.label ? h('span', null, p.label) : null) },
|
|
33
|
-
EmptyState: { render: ({ h, props: p, children }) => h('div', { class: 'zg-es' }, p.image ? h('span', { class: 'zg-es__img', style: { backgroundImage:
|
|
33
|
+
EmptyState: { render: ({ h, props: p, children }) => h('div', { class: 'zg-es' }, p.image ? h('span', { class: 'zg-es__img', style: { backgroundImage: cssUrl(p.image) } }) : h('span', { class: 'zg-es__ico' }, icon(h, p.icon || 'inbox', 28)), h('b', null, p.title), p.description ? h('span', null, p.description) : null, children.length ? h('div', { class: 'zg-es__a' }, ...children) : null) },
|
|
34
34
|
ErrorPage: { render: ({ C, h, props: p, children }) => h('div', { class: 'zg-es zg-es--page' }, h('span', { class: 'zg-num', style: { fontSize: 'clamp(80px,14vw,160px)', lineHeight: 1, color: 'var(--zg-brand-text)' } }, p.code || '404'), h('b', { style: { fontSize: '24px' } }, p.title || t('ErrorPage', 'title')), h('span', null, p.description || t('ErrorPage', 'description')), h('div', { class: 'zg-es__a' }, ...children)) },
|
|
35
35
|
DataState: { render: ({ C, h, props: p, children }) => ({ ready: () => h('div', null, ...children), loading: () => h('div', { class: 'zg-es' }, h(C.Spinner, { size: 28 }), h('b', null, p.title || t('DataState', 'loading'))), empty: () => h(C.EmptyState, { title: p.title || t('DataState', 'empty'), description: p.description, icon: 'inbox' }), error: () => h(C.EmptyState, { title: p.title || t('DataState', 'error'), description: p.description, icon: 'circle-alert' }, h(C.Button, { onClick: p.onRetry }, p.retryLabel || t('DataState', 'retry'))), offline: () => h(C.EmptyState, { title: p.title || t('DataState', 'offline'), description: p.description || t('DataState', 'offlineDesc'), icon: 'wifi-off' }, h(C.Button, { onClick: p.onRetry }, p.retryLabel || t('DataState', 'tryAgain'))) }[p.state || 'ready'])() },
|
|
36
36
|
LoadingOverlay: { render: ({ C, h, props: p, children }) => h('div', { class: 'zg-lo' }, ...children, p.loading ? h('div', { class: 'zg-lo__o' }, h(C.Spinner, { size: 28 }), p.label ? h('span', null, p.label) : null) : null) },
|
|
@@ -104,7 +104,7 @@ export const more = {
|
|
|
104
104
|
return p.type === 'line' ? h('svg', { width: '100%', height: H, viewBox: `0 0 ${Math.max(W, 10)} ${H}`, preserveAspectRatio: 'none', role: 'img' }, h('path', { d: v.map((x, i) => `${i ? 'L' : 'M'}${i * 14 + 7} ${H - 4 - (x / mx) * (H - 8)}`).join(' '), fill: 'none', stroke: 'var(--zg-brand)', 'stroke-width': 2, 'stroke-linecap': 'round', 'stroke-linejoin': 'round', 'vector-effect': 'non-scaling-stroke' }))
|
|
105
105
|
: h('div', { class: 'zg-mini', style: { height: H + 'px' } }, ...v.map((x, i) => h('i', { key: i, style: { height: Math.max(6, x / mx * 100) + '%', background: p.highlightLast && i === v.length - 1 ? 'var(--zg-brand)' : 'var(--zg-s3)' } }))); } },
|
|
106
106
|
Descriptions: { render: ({ h, props: p }) => h('dl', { class: 'zg-desc' }, ...(p.items || []).flatMap((it, i) => [h('dt', { key: 'k' + i }, it.label), h('dd', { key: 'v' + i }, it.value ?? '—')])) },
|
|
107
|
-
LazyImage: { render: ({ h, props: p }) => h('span', { role: 'img', 'aria-label': p.alt || '', class: 'zg-lazy', style: { aspectRatio: p.aspectRatio || '16/9', backgroundImage: p.src ?
|
|
107
|
+
LazyImage: { render: ({ h, props: p }) => h('span', { role: 'img', 'aria-label': p.alt || '', class: 'zg-lazy', style: { aspectRatio: p.aspectRatio || '16/9', backgroundImage: p.src ? cssUrl(p.src) : undefined, borderRadius: (p.rounded ?? 20) + 'px' } }) },
|
|
108
108
|
/* ── Navigation / Layout ── */
|
|
109
109
|
SubNav: { render: ({ h, props: p }) => h('nav', { class: 'zg-subnav', 'aria-label': p.title }, p.title ? h('div', { class: 'zg-sidenav__group' }, p.title) : null, ...(p.items || []).map(it => h('button', { key: it.value, type: 'button', class: 'zg-navitem', 'aria-current': it.value === p.value ? 'page' : undefined, onClick: () => p.onChange && p.onChange(it.value) }, it.icon ? icon(h, it.icon, 16) : null, h('span', { style: { flex: 1, textAlign: 'start' } }, it.label), it.badge ? h('span', { class: 'zg-navitem__count' }, it.badge) : null))) },
|
|
110
110
|
SplitLayout: { render: ({ h, props: p, slots, children }) => h('div', { class: 'zg-split', style: { gridTemplateColumns: p.columns || '1fr 1fr' } }, h('div', null, slots.left || children[0] || null), h('div', null, slots.right || children[1] || null)) },
|
package/src/internal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Semi-internal entry for add-on packages such as @ziyarago/ui-pro. Not part of the public API: it can change in any minor release.
|
|
2
2
|
// It re-exports the helpers the component definitions are built from, so a plugin does not copy them.
|
|
3
|
-
export { cx, pick, INPUT_ATTRS, DZ, dzp, dzf, dzb, ddRef, icon, fmt } from './core/components.js';
|
|
3
|
+
export { cx, cssUrl, pick, INPUT_ATTRS, DZ, dzp, dzf, dzb, ddRef, icon, fmt } from './core/components.js';
|
|
4
4
|
export { trap, life } from './core/dialog.js';
|
|
5
5
|
export { rove, tabIdx, listKeys, openKeys, focusIn, toTrigger, trigger, calKeys, dateKey } from './core/keys.js';
|
|
6
6
|
export { rules } from './core/components4.js';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
.zg-icon{display:inline-block;flex:none;width:1em;height:1em;background:currentColor;-webkit-mask:var(--zg-icon) center/contain no-repeat;mask:var(--zg-icon) center/contain no-repeat}
|
|
14
14
|
.zg-mono{font-family:var(--zg-font-mono);font-variant-numeric:tabular-nums}
|
|
15
15
|
.zg-num{font-variant-numeric:tabular-nums;font-weight:200;letter-spacing:-.035em}
|
|
16
|
-
.zg-hatch{background:repeating-linear-gradient(135deg,var(--zg-
|
|
16
|
+
.zg-hatch{background:repeating-linear-gradient(135deg,color-mix(in oklch,var(--zg-text-1) 22%,transparent) 0 1.5px,transparent 1.5px 6px)}
|
|
17
17
|
|
|
18
18
|
/* Button */
|
|
19
19
|
.zg-btn{--h:var(--zg-h-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--h);padding:0 calc(var(--h)*.45);border:0;border-radius:999px;cursor:pointer;font:600 14px var(--zg-font);white-space:nowrap;color:var(--zg-text-1);background:var(--zg-s2);box-shadow:var(--zg-rim);transition:transform .15s var(--zg-ease),background .15s,filter .15s}
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
.zg-kpi__label{font-size:13px;opacity:.75}.zg-kpi__value{font-size:36px;line-height:1}.zg-kpi__sub{font-size:12px;opacity:.75}
|
|
108
108
|
.zg-delta{font:700 12px var(--zg-font-mono)}.zg-delta--up{color:var(--zg-green)}.zg-delta--down{color:var(--zg-red)}
|
|
109
109
|
.zg-progress{display:flex;flex-direction:column;gap:6px}.zg-progress__row{display:flex;justify-content:space-between;font-size:13px}
|
|
110
|
-
.zg-progress__track{height:8px;border-radius:999px;overflow:hidden;background:repeating-linear-gradient(135deg,var(--zg-
|
|
110
|
+
.zg-progress__track{height:8px;border-radius:999px;overflow:hidden;background:repeating-linear-gradient(135deg,color-mix(in oklch,var(--zg-text-1) 22%,transparent) 0 1.5px,transparent 1.5px 6px),color-mix(in oklch,var(--zg-text-1) 6%,transparent)}
|
|
111
111
|
.zg-progress__bar{height:100%;border-radius:999px;background:var(--zg-brand);transition:width .8s var(--zg-ease)}
|
|
112
112
|
.zg-progress--success .zg-progress__bar{background:var(--zg-green)}.zg-progress--warning .zg-progress__bar{background:var(--zg-amber)}.zg-progress--danger .zg-progress__bar{background:var(--zg-red)}
|
|
113
113
|
.zg-ring{position:relative;display:inline-grid;place-items:center}.zg-ring svg{transform:rotate(-90deg)}.zg-ring__c{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:4px;text-align:center}.zg-ring__v{font-weight:300;letter-spacing:-.04em;font-variant-numeric:tabular-nums;line-height:1;color:var(--zg-text-1)}.zg-ring__l{font:500 12px/1.2 var(--zg-font);color:var(--zg-text-3)}
|
package/types/internal.d.ts
CHANGED
|
@@ -28,3 +28,5 @@ export function defineMessages(component: string, messages: Record<string, Recor
|
|
|
28
28
|
export function registerComponents(defs: Record<string, import('./core').ComponentDefinition>, options?: { override?: boolean }): Record<string, import('./core').ComponentDefinition>;
|
|
29
29
|
export const components: Record<string, import('./core').ComponentDefinition>;
|
|
30
30
|
export const BOOL_PROPS: Set<string>;
|
|
31
|
+
/** Quoted CSS url() for background-image values. */
|
|
32
|
+
export function cssUrl(url: string): string;
|