@ziyarago/ui 0.18.0 → 0.19.1
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 +3 -2
- package/dist/llms.txt +1 -1
- package/dist/manifest.json +5 -4
- package/dist/style.css +6 -1
- package/package.json +1 -1
- package/src/core/components.js +13 -2
- package/src/meta/navigation.js +2 -2
- package/src/styles/components3.css +1 -1
- package/src/styles/components8.css +5 -0
- package/types/react.d.ts +3 -2
- package/types/vue.d.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [0.19.1](https://github.com/ziyarago/ui/compare/v0.19.0...v0.19.1) (2026-10-21)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* UserCell avatar letters no longer stick to the top ([533087d](https://github.com/ziyarago/ui/commit/533087d4b490375a1f3642db7a4b5be16cf4dae4))
|
|
6
|
+
|
|
7
|
+
## [0.19.0](https://github.com/ziyarago/ui/compare/v0.18.0...v0.19.0) (2026-10-21)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* SideNav expandable groups with children ([9572ae4](https://github.com/ziyarago/ui/commit/9572ae48a261a8fa3ec3e5d023858d91c2f4cd9b))
|
|
12
|
+
|
|
1
13
|
## [0.18.0](https://github.com/ziyarago/ui/compare/v0.17.0...v0.18.0) (2026-10-21)
|
|
2
14
|
|
|
3
15
|
### Features
|
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.
|
|
5
|
+
Version 0.19.1. 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'
|
|
@@ -1846,7 +1846,7 @@ Notes:
|
|
|
1846
1846
|
Vertical sidebar with a brand, grouped navigation items, a footer and an optional collapse toggle.
|
|
1847
1847
|
Props:
|
|
1848
1848
|
- `brand`: string | VNode. Logo or product name at the top.
|
|
1849
|
-
- `items`: ({ value: string; label: string; icon?: string; count?: string | number } | { group: string })[] = "[]". Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count.
|
|
1849
|
+
- `items`: ({ value: string; label: string; icon?: string; count?: string | number; children?: ({ value: string; label: string; icon?: string; count?: string | number } | { separator: true })[] } | { group: string })[] = "[]". Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count. An entry with children is an expandable group: its button toggles the list of children (open by default while one of them is current); selecting a child calls change with the child value.
|
|
1850
1850
|
- `value`: string. Value of the active item (aria-current="page").
|
|
1851
1851
|
- `collapsed`: boolean = false. Icon-only mode; labels move to the title tooltip.
|
|
1852
1852
|
- `collapsible`: boolean = false. Always draw the collapse button, even without a toggle handler (the button is also drawn when a toggle handler is set).
|
|
@@ -1860,6 +1860,7 @@ Events:
|
|
|
1860
1860
|
Notes:
|
|
1861
1861
|
- Collapsing is controlled: flip collapsed in the toggle handler.
|
|
1862
1862
|
- Group entries are keyed by their title, so keep group names unique.
|
|
1863
|
+
- In the collapsed rail the children of an open group show as icons (children without an icon get a dot).
|
|
1863
1864
|
|
|
1864
1865
|
## UiSubNav (navigation)
|
|
1865
1866
|
Compact vertical list of sections with an optional title; use for settings and secondary page navigation.
|
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.
|
|
5
|
+
Version 0.19.1. 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziyarago/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"homepage": "https://ziyara.vip",
|
|
5
5
|
"imports": {
|
|
6
6
|
"vue": "import { UiButton } from '@ziyarago/ui/vue'",
|
|
@@ -12233,9 +12233,9 @@
|
|
|
12233
12233
|
"description": "Logo or product name at the top."
|
|
12234
12234
|
},
|
|
12235
12235
|
"items": {
|
|
12236
|
-
"type": "({ value: string; label: string; icon?: string; count?: string | number } | { group: string })[]",
|
|
12236
|
+
"type": "({ value: string; label: string; icon?: string; count?: string | number; children?: ({ value: string; label: string; icon?: string; count?: string | number } | { separator: true })[] } | { group: string })[]",
|
|
12237
12237
|
"default": "[]",
|
|
12238
|
-
"description": "Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count."
|
|
12238
|
+
"description": "Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count. An entry with children is an expandable group: its button toggles the list of children (open by default while one of them is current); selecting a child calls change with the child value."
|
|
12239
12239
|
},
|
|
12240
12240
|
"value": {
|
|
12241
12241
|
"type": "string",
|
|
@@ -12278,7 +12278,8 @@
|
|
|
12278
12278
|
},
|
|
12279
12279
|
"notes": [
|
|
12280
12280
|
"Collapsing is controlled: flip collapsed in the toggle handler.",
|
|
12281
|
-
"Group entries are keyed by their title, so keep group names unique."
|
|
12281
|
+
"Group entries are keyed by their title, so keep group names unique.",
|
|
12282
|
+
"In the collapsed rail the children of an open group show as icons (children without an icon get a dot)."
|
|
12282
12283
|
]
|
|
12283
12284
|
},
|
|
12284
12285
|
{
|
package/dist/style.css
CHANGED
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
.zg-chip2--tonal{background:color-mix(in oklch,var(--c) 16%,transparent);color:var(--ct)}.zg-chip2--outlined{box-shadow:inset 0 0 0 1px color-mix(in oklch,var(--c) 55%,transparent);color:var(--ct)}.zg-chip2--solid{background:var(--c);color:var(--zg-on-brand)}
|
|
334
334
|
.zg-chip2 button{all:unset;cursor:pointer;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:color-mix(in oklch,currentColor 18%,transparent)}
|
|
335
335
|
.zg-tile{width:var(--s);height:var(--s);flex:none;border-radius:8px;display:grid;place-items:center;background:color-mix(in oklch,var(--c) 16%,transparent);color:var(--ct)}.zg-tile--circle{border-radius:50%}
|
|
336
|
-
.zg-usercell{display:inline-flex;align-items:center;gap:10px}.zg-usercell>span{display:flex;flex-direction:column;line-height:1.3}.zg-usercell b{font-size:14px}
|
|
336
|
+
.zg-usercell{display:inline-flex;align-items:center;gap:10px}.zg-usercell>span:not(.zg-avatar){display:flex;flex-direction:column;line-height:1.3}.zg-usercell b{font-size:14px}
|
|
337
337
|
.zg-srow{display:flex;align-items:center;gap:12px;min-height:56px}
|
|
338
338
|
.zg-statline{position:relative;overflow:hidden;gap:6px}.zg-statline__bar{position:absolute;inset-inline:0;bottom:0;height:3px;background:var(--c);opacity:.9}
|
|
339
339
|
.zg-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));padding:8px}.zg-strip__i{display:flex;align-items:center;gap:14px;padding:14px 20px}.zg-strip__i+.zg-strip__i{box-shadow:inset 1px 0 0 var(--zg-stroke)}
|
|
@@ -583,6 +583,11 @@
|
|
|
583
583
|
.zg-topnav__dd>.zg-navitem[aria-expanded="true"] .zg-icon:last-child:not(:first-child){transform:rotate(180deg)}
|
|
584
584
|
.zg-menu__i[aria-current="page"]{background:var(--zg-s2);font-weight:700}.zg-menu__i .zg-navitem__count{margin-inline-start:auto}
|
|
585
585
|
.zg-menu__h{padding:8px 12px 4px;font:600 12px var(--zg-font);letter-spacing:.06em;text-transform:uppercase;color:var(--zg-text-3)}
|
|
586
|
+
/* SideNav: expandable groups */
|
|
587
|
+
.zg-sidenav__sub{display:flex;flex-direction:column;gap:2px;flex-shrink:0}
|
|
588
|
+
.zg-sidenav__sub>.zg-navitem{position:relative}.zg-sidenav__chev{margin-inline-start:auto;display:inline-flex;transition:transform .2s var(--zg-ease)}.zg-sidenav__sub>.zg-navitem[aria-expanded="true"] .zg-sidenav__chev{transform:rotate(180deg)}
|
|
589
|
+
.zg-sidenav__kids{display:flex;flex-direction:column;gap:2px;padding-inline-start:16px}.zg-sidenav__kids .zg-navitem{height:40px}
|
|
590
|
+
.zg-sidenav--collapsed .zg-sidenav__kids{padding-inline-start:0}.zg-sidenav--collapsed .zg-sidenav__chev{display:none}
|
|
586
591
|
|
|
587
592
|
|
|
588
593
|
/* ./charts.css */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziyarago/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
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
|
@@ -166,8 +166,19 @@ export const components = {
|
|
|
166
166
|
return h('header', { class: 'zg-topnav' }, h('div', { class: 'zg-topnav__brand' }, p.brand),
|
|
167
167
|
h('nav', { class: 'zg-topnav__items', 'data-overflow': collapse ? 'menu' : 'none', 'aria-label': t('TopNav', 'label'), ref: measure }, ...shown.map(entry), more ? entry(more) : null),
|
|
168
168
|
h('div', { class: 'zg-topnav__actions' }, slots.actions || p.actions || null)); } },
|
|
169
|
-
SideNav: {
|
|
170
|
-
|
|
169
|
+
SideNav: { state: { open: {} }, render: ({ h, props: p, slots, state, set }) => {
|
|
170
|
+
const entry = it => {
|
|
171
|
+
if (it.group) return h('div', { key: it.group, class: 'zg-sidenav__group', style: p.collapsed ? { display: 'none' } : undefined }, it.group);
|
|
172
|
+
const kids = it.children;
|
|
173
|
+
if (!kids || !kids.length) return nav(h, it, p.value, p.onChange, p.collapsed);
|
|
174
|
+
const active = kids.some(c => c.value === p.value), open = state.open[it.value] ?? active;
|
|
175
|
+
return h('div', { key: it.value, class: 'zg-sidenav__sub' },
|
|
176
|
+
h('button', { type: 'button', class: 'zg-navitem', 'aria-expanded': String(open), 'aria-current': active && !open ? 'page' : undefined, title: p.collapsed ? it.label : undefined, onClick: () => set({ open: { ...state.open, [it.value]: !open } }) },
|
|
177
|
+
it.icon ? icon(h, it.icon, 18) : null, h('span', null, it.label), it.count ? h('span', { class: 'zg-navitem__count' }, it.count) : null, h('span', { class: 'zg-sidenav__chev' }, icon(h, 'chevron-down', 14))),
|
|
178
|
+
open ? h('div', { class: 'zg-sidenav__kids', role: 'group', 'aria-label': it.label }, ...kids.map((c, i) => c.separator ? h('div', { key: 's' + i, class: 'zg-menu__sep', role: 'separator' }) : nav(h, p.collapsed && !c.icon ? { ...c, icon: 'dot' } : c, p.value, p.onChange, p.collapsed))) : null);
|
|
179
|
+
};
|
|
180
|
+
return h('aside', { class: cx('zg-sidenav', p.collapsed && 'zg-sidenav--collapsed') }, h('div', { class: 'zg-sidenav__brand' }, p.brand), ...(p.items || []).map(entry), h('div', { class: 'zg-sidenav__sp' }), slots.footer || p.footer || null,
|
|
181
|
+
(p.onToggle || p.collapsible) ? h('button', { type: 'button', class: 'zg-navitem', onClick: p.onToggle, 'aria-label': t('SideNav', 'toggle') }, icon(h, p.collapsed ? 'panel-left-open' : 'panel-left-close', 18), h('span', null, p.collapseLabel || t('SideNav', 'collapse'))) : null); } },
|
|
171
182
|
AppShell: { state: { collapsed: false }, render: ({ C, h, props: p, children, slots, state, set }) => {
|
|
172
183
|
const brand = p.brand, top = (p.nav || 'top') === 'top', col = p.collapsed ?? state.collapsed, toggle = () => p.onCollapse ? p.onCollapse(!col) : set({ collapsed: !state.collapsed });
|
|
173
184
|
return h('div', { class: cx('zg-root', 'zg-shell', top && 'zg-shell--top', p.frame && 'zg-shell--frame'), style: { background: 'var(--zg-bg)' } },
|
package/src/meta/navigation.js
CHANGED
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
description: 'Vertical sidebar with a brand, grouped navigation items, a footer and an optional collapse toggle.',
|
|
25
25
|
props: {
|
|
26
26
|
brand: { type: 'string | VNode', description: 'Logo or product name at the top.' },
|
|
27
|
-
items: { type: '({ value: string; label: string; icon?: string; count?: string | number } | { group: string })[]', default: '[]', description: 'Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count.' },
|
|
27
|
+
items: { type: '({ value: string; label: string; icon?: string; count?: string | number; children?: ({ value: string; label: string; icon?: string; count?: string | number } | { separator: true })[] } | { group: string })[]', default: '[]', description: 'Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count. An entry with children is an expandable group: its button toggles the list of children (open by default while one of them is current); selecting a child calls change with the child value.' },
|
|
28
28
|
value: current,
|
|
29
29
|
collapsed: { type: 'boolean', default: false, description: 'Icon-only mode; labels move to the title tooltip.' },
|
|
30
30
|
collapsible: { type: 'boolean', default: false, description: 'Always draw the collapse button, even without a toggle handler (the button is also drawn when a toggle handler is set).' },
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
},
|
|
34
34
|
slots: { footer: 'Bottom area above the collapse button, e.g. user card. React also accepts a footer prop.' },
|
|
35
35
|
events: { change: 'Called with the value of the clicked item.', toggle: 'Called when the collapse button is clicked. The button is drawn when this handler is set (Vue: @toggle) or when collapsible is true.' },
|
|
36
|
-
notes: ['Collapsing is controlled: flip collapsed in the toggle handler.', 'Group entries are keyed by their title, so keep group names unique.'],
|
|
36
|
+
notes: ['Collapsing is controlled: flip collapsed in the toggle handler.', 'Group entries are keyed by their title, so keep group names unique.', 'In the collapsed rail the children of an open group show as icons (children without an icon get a dot).'],
|
|
37
37
|
},
|
|
38
38
|
|
|
39
39
|
SubNav: {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.zg-chip2--tonal{background:color-mix(in oklch,var(--c) 16%,transparent);color:var(--ct)}.zg-chip2--outlined{box-shadow:inset 0 0 0 1px color-mix(in oklch,var(--c) 55%,transparent);color:var(--ct)}.zg-chip2--solid{background:var(--c);color:var(--zg-on-brand)}
|
|
9
9
|
.zg-chip2 button{all:unset;cursor:pointer;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:color-mix(in oklch,currentColor 18%,transparent)}
|
|
10
10
|
.zg-tile{width:var(--s);height:var(--s);flex:none;border-radius:8px;display:grid;place-items:center;background:color-mix(in oklch,var(--c) 16%,transparent);color:var(--ct)}.zg-tile--circle{border-radius:50%}
|
|
11
|
-
.zg-usercell{display:inline-flex;align-items:center;gap:10px}.zg-usercell>span{display:flex;flex-direction:column;line-height:1.3}.zg-usercell b{font-size:14px}
|
|
11
|
+
.zg-usercell{display:inline-flex;align-items:center;gap:10px}.zg-usercell>span:not(.zg-avatar){display:flex;flex-direction:column;line-height:1.3}.zg-usercell b{font-size:14px}
|
|
12
12
|
.zg-srow{display:flex;align-items:center;gap:12px;min-height:56px}
|
|
13
13
|
.zg-statline{position:relative;overflow:hidden;gap:6px}.zg-statline__bar{position:absolute;inset-inline:0;bottom:0;height:3px;background:var(--c);opacity:.9}
|
|
14
14
|
.zg-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));padding:8px}.zg-strip__i{display:flex;align-items:center;gap:14px;padding:14px 20px}.zg-strip__i+.zg-strip__i{box-shadow:inset 1px 0 0 var(--zg-stroke)}
|
|
@@ -126,3 +126,8 @@
|
|
|
126
126
|
.zg-topnav__dd>.zg-navitem[aria-expanded="true"] .zg-icon:last-child:not(:first-child){transform:rotate(180deg)}
|
|
127
127
|
.zg-menu__i[aria-current="page"]{background:var(--zg-s2);font-weight:700}.zg-menu__i .zg-navitem__count{margin-inline-start:auto}
|
|
128
128
|
.zg-menu__h{padding:8px 12px 4px;font:600 12px var(--zg-font);letter-spacing:.06em;text-transform:uppercase;color:var(--zg-text-3)}
|
|
129
|
+
/* SideNav: expandable groups */
|
|
130
|
+
.zg-sidenav__sub{display:flex;flex-direction:column;gap:2px;flex-shrink:0}
|
|
131
|
+
.zg-sidenav__sub>.zg-navitem{position:relative}.zg-sidenav__chev{margin-inline-start:auto;display:inline-flex;transition:transform .2s var(--zg-ease)}.zg-sidenav__sub>.zg-navitem[aria-expanded="true"] .zg-sidenav__chev{transform:rotate(180deg)}
|
|
132
|
+
.zg-sidenav__kids{display:flex;flex-direction:column;gap:2px;padding-inline-start:16px}.zg-sidenav__kids .zg-navitem{height:40px}
|
|
133
|
+
.zg-sidenav--collapsed .zg-sidenav__kids{padding-inline-start:0}.zg-sidenav--collapsed .zg-sidenav__chev{display:none}
|
package/types/react.d.ts
CHANGED
|
@@ -2814,15 +2814,16 @@ export const UiSettingsSection: ComponentType<UiSettingsSectionProps>;
|
|
|
2814
2814
|
* Vertical sidebar with a brand, grouped navigation items, a footer and an optional collapse toggle.
|
|
2815
2815
|
* Note: Collapsing is controlled: flip collapsed in the toggle handler.
|
|
2816
2816
|
* Note: Group entries are keyed by their title, so keep group names unique.
|
|
2817
|
+
* Note: In the collapsed rail the children of an open group show as icons (children without an icon get a dot).
|
|
2817
2818
|
*/
|
|
2818
2819
|
export interface UiSideNavProps {
|
|
2819
2820
|
/** Logo or product name at the top. */
|
|
2820
2821
|
brand?: string | ReactNode;
|
|
2821
2822
|
/**
|
|
2822
|
-
* Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count.
|
|
2823
|
+
* Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count. An entry with children is an expandable group: its button toggles the list of children (open by default while one of them is current); selecting a child calls change with the child value.
|
|
2823
2824
|
* @default []
|
|
2824
2825
|
*/
|
|
2825
|
-
items?: ({ value: string; label: string; icon?: string; count?: string | number } | { group: string })[];
|
|
2826
|
+
items?: ({ value: string; label: string; icon?: string; count?: string | number; children?: ({ value: string; label: string; icon?: string; count?: string | number } | { separator: true })[] } | { group: string })[];
|
|
2826
2827
|
/** Value of the active item (aria-current="page"). */
|
|
2827
2828
|
value?: string;
|
|
2828
2829
|
/**
|
package/types/vue.d.ts
CHANGED
|
@@ -2821,15 +2821,16 @@ export const UiSettingsSection: UiVueComponent<UiSettingsSectionProps, UiSetting
|
|
|
2821
2821
|
* Vertical sidebar with a brand, grouped navigation items, a footer and an optional collapse toggle.
|
|
2822
2822
|
* Note: Collapsing is controlled: flip collapsed in the toggle handler.
|
|
2823
2823
|
* Note: Group entries are keyed by their title, so keep group names unique.
|
|
2824
|
+
* Note: In the collapsed rail the children of an open group show as icons (children without an icon get a dot).
|
|
2824
2825
|
*/
|
|
2825
2826
|
export interface UiSideNavProps {
|
|
2826
2827
|
/** Logo or product name at the top. */
|
|
2827
2828
|
brand?: string | VNode;
|
|
2828
2829
|
/**
|
|
2829
|
-
* Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count.
|
|
2830
|
+
* Entries. An object with group renders a section heading (hidden when collapsed); others are links with an optional icon and count. An entry with children is an expandable group: its button toggles the list of children (open by default while one of them is current); selecting a child calls change with the child value.
|
|
2830
2831
|
* @default []
|
|
2831
2832
|
*/
|
|
2832
|
-
items?: ({ value: string; label: string; icon?: string; count?: string | number } | { group: string })[];
|
|
2833
|
+
items?: ({ value: string; label: string; icon?: string; count?: string | number; children?: ({ value: string; label: string; icon?: string; count?: string | number } | { separator: true })[] } | { group: string })[];
|
|
2833
2834
|
/** Value of the active item (aria-current="page"). */
|
|
2834
2835
|
value?: string;
|
|
2835
2836
|
/**
|