@hawiyah/vue 0.0.0-stage → 0.2.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/LICENSE +73 -0
- package/NOTICE +19 -0
- package/PORTAL.md +70 -0
- package/README.md +388 -2
- package/dist/calendar.d.ts +183 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +448 -0
- package/dist/calendar.js.map +1 -0
- package/dist/content-navigation.d.ts +61 -0
- package/dist/content-navigation.d.ts.map +1 -0
- package/dist/content-navigation.js +31 -0
- package/dist/content-navigation.js.map +1 -0
- package/dist/content.d.ts +392 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +305 -0
- package/dist/content.js.map +1 -0
- package/dist/controls.d.ts +657 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +679 -0
- package/dist/controls.js.map +1 -0
- package/dist/display.d.ts +387 -0
- package/dist/display.d.ts.map +1 -0
- package/dist/display.js +293 -0
- package/dist/display.js.map +1 -0
- package/dist/expansion-interactive.d.ts +476 -0
- package/dist/expansion-interactive.d.ts.map +1 -0
- package/dist/expansion-interactive.js +613 -0
- package/dist/expansion-interactive.js.map +1 -0
- package/dist/file-upload-list.d.ts +54 -0
- package/dist/file-upload-list.d.ts.map +1 -0
- package/dist/file-upload-list.js +21 -0
- package/dist/file-upload-list.js.map +1 -0
- package/dist/forms.d.ts +388 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +156 -0
- package/dist/forms.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive.d.ts +240 -0
- package/dist/interactive.d.ts.map +1 -0
- package/dist/interactive.js +341 -0
- package/dist/interactive.js.map +1 -0
- package/dist/layout.d.ts +755 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +101 -0
- package/dist/layout.js.map +1 -0
- package/dist/mobile-top-bar.d.ts +47 -0
- package/dist/mobile-top-bar.d.ts.map +1 -0
- package/dist/mobile-top-bar.js +18 -0
- package/dist/mobile-top-bar.js.map +1 -0
- package/dist/native-attributes.d.ts +38 -0
- package/dist/native-attributes.d.ts.map +1 -0
- package/dist/native-attributes.js +27 -0
- package/dist/native-attributes.js.map +1 -0
- package/dist/navigation-drawer.d.ts +87 -0
- package/dist/navigation-drawer.d.ts.map +1 -0
- package/dist/navigation-drawer.js +56 -0
- package/dist/navigation-drawer.js.map +1 -0
- package/dist/patterns.d.ts +455 -0
- package/dist/patterns.d.ts.map +1 -0
- package/dist/patterns.js +355 -0
- package/dist/patterns.js.map +1 -0
- package/dist/portal.d.ts +174 -0
- package/dist/portal.d.ts.map +1 -0
- package/dist/portal.js +36 -0
- package/dist/portal.js.map +1 -0
- package/dist/search-field.d.ts +87 -0
- package/dist/search-field.d.ts.map +1 -0
- package/dist/search-field.js +123 -0
- package/dist/search-field.js.map +1 -0
- package/dist/shared.d.ts +46 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +40 -0
- package/dist/shared.js.map +1 -0
- package/dist/site-verification.d.ts +63 -0
- package/dist/site-verification.d.ts.map +1 -0
- package/dist/site-verification.js +34 -0
- package/dist/site-verification.js.map +1 -0
- package/package.json +53 -3
package/dist/patterns.js
ADDED
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps, onMounted, onBeforeUnmount, ref, useId } from "vue";
|
|
2
|
+
import { Button, Textarea } from "./forms.js";
|
|
3
|
+
import { Badge, Card } from "./display.js";
|
|
4
|
+
import { DescriptionList, Link } from "./content.js";
|
|
5
|
+
import { useValue } from "./shared.js";
|
|
6
|
+
export const ServiceCard = defineComponent({
|
|
7
|
+
name: "HwServiceCard",
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: {
|
|
10
|
+
title: { type: String, required: true },
|
|
11
|
+
description: String,
|
|
12
|
+
href: String,
|
|
13
|
+
actionLabel: { type: String, default: "Start service" },
|
|
14
|
+
badge: String,
|
|
15
|
+
metadata: Array,
|
|
16
|
+
},
|
|
17
|
+
setup(props, { attrs, slots }) {
|
|
18
|
+
return () => h(Card, mergeProps(attrs, { class: "hw-service-card" }), {
|
|
19
|
+
header: () => [
|
|
20
|
+
slots.icon?.(),
|
|
21
|
+
h("h3", {}, props.title),
|
|
22
|
+
props.badge && h(Badge, { tone: "info" }, () => props.badge),
|
|
23
|
+
],
|
|
24
|
+
default: () => [
|
|
25
|
+
props.description && h("p", {}, props.description),
|
|
26
|
+
props.metadata?.length &&
|
|
27
|
+
h("ul", {}, props.metadata.map((item) => h("li", {}, item))),
|
|
28
|
+
slots.default?.(),
|
|
29
|
+
],
|
|
30
|
+
footer: () => slots.action?.() ??
|
|
31
|
+
(props.href
|
|
32
|
+
? h(Link, { href: props.href }, () => props.actionLabel)
|
|
33
|
+
: undefined),
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
export const ServiceDetails = defineComponent({
|
|
38
|
+
name: "HwServiceDetails",
|
|
39
|
+
inheritAttrs: false,
|
|
40
|
+
props: {
|
|
41
|
+
title: { type: String, required: true },
|
|
42
|
+
description: String,
|
|
43
|
+
items: {
|
|
44
|
+
type: Array,
|
|
45
|
+
default: () => [],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
setup(props, { attrs, slots }) {
|
|
49
|
+
return () => h("section", mergeProps(attrs, { class: "hw-service-details" }), [
|
|
50
|
+
h("header", {}, [
|
|
51
|
+
h("h2", {}, props.title),
|
|
52
|
+
props.description && h("p", {}, props.description),
|
|
53
|
+
]),
|
|
54
|
+
h(DescriptionList, { items: props.items }),
|
|
55
|
+
slots.default?.(),
|
|
56
|
+
slots.action &&
|
|
57
|
+
h("div", { class: "hw-service-details-action" }, slots.action()),
|
|
58
|
+
]);
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
export const PortalHeader = defineComponent({
|
|
62
|
+
name: "HwPortalHeader",
|
|
63
|
+
inheritAttrs: false,
|
|
64
|
+
props: {
|
|
65
|
+
brand: { type: String, required: true },
|
|
66
|
+
homeHref: { type: String, default: "/" },
|
|
67
|
+
links: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: () => [],
|
|
70
|
+
},
|
|
71
|
+
navLabel: { type: String, default: "التنقل الرئيسي" },
|
|
72
|
+
menuLabel: { type: String, default: "القائمة" },
|
|
73
|
+
navigationId: String,
|
|
74
|
+
mainId: String,
|
|
75
|
+
skipLabel: { type: String, default: "انتقل إلى المحتوى" },
|
|
76
|
+
},
|
|
77
|
+
setup(props, { attrs, slots }) {
|
|
78
|
+
const id = useId();
|
|
79
|
+
const open = ref(false);
|
|
80
|
+
const root = ref();
|
|
81
|
+
const trigger = ref();
|
|
82
|
+
const branch = ref();
|
|
83
|
+
const close = () => { branch.value = undefined; open.value = false; };
|
|
84
|
+
const outside = (event) => {
|
|
85
|
+
const target = event.target;
|
|
86
|
+
if (!branch.value?.contains(target))
|
|
87
|
+
branch.value = undefined;
|
|
88
|
+
if (!root.value?.contains(target))
|
|
89
|
+
open.value = false;
|
|
90
|
+
};
|
|
91
|
+
onMounted(() => root.value?.ownerDocument.addEventListener('pointerdown', outside));
|
|
92
|
+
onBeforeUnmount(() => root.value?.ownerDocument.removeEventListener('pointerdown', outside));
|
|
93
|
+
const link = (item, className) => h('a', {
|
|
94
|
+
href: item.href, class: className,
|
|
95
|
+
'aria-current': item.current ? 'page' : undefined, onClick: close,
|
|
96
|
+
}, item.label);
|
|
97
|
+
function navigationItem(item) {
|
|
98
|
+
const groups = item.groups?.filter(group => group.links.length);
|
|
99
|
+
if (!groups?.length)
|
|
100
|
+
return h('li', { key: item.href }, link(item));
|
|
101
|
+
const childCurrent = groups.some(group => group.links.some(child => child.current));
|
|
102
|
+
const current = item.current || childCurrent;
|
|
103
|
+
return h('li', { key: item.href }, h('details', {
|
|
104
|
+
class: 'hw-portal-branch', 'data-hw-portal-branch': '', 'data-current': current || undefined,
|
|
105
|
+
'data-branch-href': item.href, open: Boolean(branch.value?.isConnected && branch.value.dataset.branchHref === item.href),
|
|
106
|
+
}, [
|
|
107
|
+
h('summary', { onClick(event) {
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
const details = event.currentTarget.parentElement;
|
|
110
|
+
branch.value = details === branch.value ? undefined : details;
|
|
111
|
+
} }, item.label),
|
|
112
|
+
h('div', { class: 'hw-portal-branch-panel' }, [
|
|
113
|
+
link({ ...item, current: item.current && !childCurrent }, 'hw-link hw-portal-branch-overview'),
|
|
114
|
+
...groups.map(group => h('section', { class: 'hw-portal-branch-group' }, [
|
|
115
|
+
group.label && h('h2', group.label),
|
|
116
|
+
h('ul', group.links.map(child => h('li', { key: child.href }, link(child, 'hw-link')))),
|
|
117
|
+
])),
|
|
118
|
+
]),
|
|
119
|
+
]));
|
|
120
|
+
}
|
|
121
|
+
return () => h("header", mergeProps(attrs, { class: "hw-portal-header", ref: root,
|
|
122
|
+
onKeydown: (event) => {
|
|
123
|
+
if (event.defaultPrevented || event.key !== 'Escape')
|
|
124
|
+
return;
|
|
125
|
+
if (branch.value?.isConnected) {
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
event.stopPropagation();
|
|
128
|
+
const summary = branch.value.querySelector(':scope > summary');
|
|
129
|
+
branch.value = undefined;
|
|
130
|
+
summary?.focus();
|
|
131
|
+
}
|
|
132
|
+
else if (open.value) {
|
|
133
|
+
event.preventDefault();
|
|
134
|
+
event.stopPropagation();
|
|
135
|
+
close();
|
|
136
|
+
trigger.value?.focus();
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
onFocusout: (event) => {
|
|
140
|
+
const target = (event.relatedTarget ?? root.value?.ownerDocument.activeElement);
|
|
141
|
+
if (!branch.value?.contains(target))
|
|
142
|
+
branch.value = undefined;
|
|
143
|
+
if (!root.value?.contains(target))
|
|
144
|
+
open.value = false;
|
|
145
|
+
},
|
|
146
|
+
}), [
|
|
147
|
+
props.mainId && h('a', { class: 'hw-skip-link', href: `#${props.mainId}` }, props.skipLabel),
|
|
148
|
+
h("a", {
|
|
149
|
+
href: props.homeHref,
|
|
150
|
+
class: "hw-portal-brand",
|
|
151
|
+
"aria-label": props.brand,
|
|
152
|
+
}, slots.logo?.() ?? props.brand),
|
|
153
|
+
props.links.length > 0 && h('button', { ref: trigger, type: 'button', class: 'hw-button hw-portal-menu-toggle', 'aria-expanded': open.value, 'aria-controls': props.navigationId ?? `${id}-navigation`, onClick: () => { branch.value = undefined; open.value = !open.value; } }, [h('span', { class: 'hw-icon', 'data-icon': open.value ? 'cancel-01' : 'menu-01', 'aria-hidden': 'true' }), props.menuLabel]),
|
|
154
|
+
props.links.length > 0 && h("nav", { id: props.navigationId ?? `${id}-navigation`, "aria-label": props.navLabel, 'data-open': String(open.value) }, h('ul', props.links.map(navigationItem))),
|
|
155
|
+
slots.actions &&
|
|
156
|
+
h("div", { class: "hw-portal-header-actions" }, slots.actions()),
|
|
157
|
+
slots.default?.(),
|
|
158
|
+
]);
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
export const PortalFooter = defineComponent({
|
|
162
|
+
name: "HwPortalFooter", inheritAttrs: false,
|
|
163
|
+
props: {
|
|
164
|
+
brand: String, description: String, copyright: String,
|
|
165
|
+
links: { type: Array, default: () => [] },
|
|
166
|
+
groups: { type: Array, default: () => [] },
|
|
167
|
+
legalLinks: { type: Array, default: () => [] },
|
|
168
|
+
navLabel: { type: String, default: "روابط التذييل" },
|
|
169
|
+
legalLinksLabel: { type: String, default: "السياسات وإمكانية الوصول" },
|
|
170
|
+
supportLabel: { type: String, default: "المساعدة والتواصل" },
|
|
171
|
+
externalLabel: { type: String, default: "يفتح في نافذة جديدة" },
|
|
172
|
+
},
|
|
173
|
+
setup(props, { attrs, slots }) {
|
|
174
|
+
const linkList = (items) => h('ul', { class: 'hw-portal-footer-links' }, items.map((link, index) => h('li', { key: index }, h('a', { href: link.href, target: link.external ? '_blank' : undefined, rel: link.external ? 'noopener noreferrer' : undefined }, [link.label, link.external && h('span', { class: 'hw-portal-footer-external', 'aria-hidden': 'true' }, '↗'), link.external && h('span', { class: 'hw-sr-only' }, ` · ${props.externalLabel}`)]))));
|
|
175
|
+
return () => h('footer', mergeProps(attrs, { class: 'hw-portal-footer' }), [
|
|
176
|
+
h('div', { class: 'hw-portal-footer-main' }, [
|
|
177
|
+
(props.brand || props.description || slots.logo) && h('div', { class: 'hw-portal-footer-brand' }, [(slots.logo || props.brand) && h('div', { class: 'hw-portal-footer-brand-marks' }, slots.logo?.() ?? h('strong', {}, props.brand)), props.description && h('p', {}, props.description)]),
|
|
178
|
+
props.links.length > 0 && h('nav', { class: 'hw-portal-footer-group', 'aria-label': props.navLabel }, [h('h2', {}, props.navLabel), linkList(props.links)]),
|
|
179
|
+
...props.groups.filter(group => group.links.length > 0).map((group, index) => h('nav', { class: 'hw-portal-footer-group', 'aria-label': group.title, key: index }, [h('h2', {}, group.title), linkList(group.links)])),
|
|
180
|
+
slots.support && h('section', { class: 'hw-portal-footer-support', 'aria-label': props.supportLabel }, [h('h2', {}, props.supportLabel), h('div', { class: 'hw-portal-footer-support-content' }, slots.support())]),
|
|
181
|
+
slots.default && h('div', { class: 'hw-portal-footer-extra' }, slots.default()),
|
|
182
|
+
]),
|
|
183
|
+
(props.copyright || props.legalLinks.length || slots.partners) && h('div', { class: 'hw-portal-footer-bottom' }, [
|
|
184
|
+
props.copyright && h('small', {}, props.copyright),
|
|
185
|
+
props.legalLinks.length > 0 && h('nav', { class: 'hw-portal-footer-legal', 'aria-label': props.legalLinksLabel }, linkList(props.legalLinks)),
|
|
186
|
+
slots.partners && h('div', { class: 'hw-portal-footer-partners' }, slots.partners()),
|
|
187
|
+
]),
|
|
188
|
+
]);
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
export const Feedback = defineComponent({
|
|
192
|
+
name: "HwFeedback",
|
|
193
|
+
inheritAttrs: false,
|
|
194
|
+
props: {
|
|
195
|
+
choiceVariant: { type: String, default: 'text' },
|
|
196
|
+
label: { type: String, default: "Was this page helpful?" },
|
|
197
|
+
modelValue: String,
|
|
198
|
+
defaultValue: { type: String, default: "" },
|
|
199
|
+
yesLabel: { type: String, default: "Yes" },
|
|
200
|
+
noLabel: { type: String, default: "No" },
|
|
201
|
+
commentLabel: { type: String, default: "Tell us more" },
|
|
202
|
+
submitLabel: { type: String, default: "Send feedback" },
|
|
203
|
+
thanks: { type: String, default: "Thank you for your feedback." },
|
|
204
|
+
disabled: Boolean,
|
|
205
|
+
readonly: Boolean,
|
|
206
|
+
},
|
|
207
|
+
emits: {
|
|
208
|
+
"update:modelValue": (_value) => true,
|
|
209
|
+
submit: (_value) => true,
|
|
210
|
+
},
|
|
211
|
+
setup(props, { attrs, emit, slots }) {
|
|
212
|
+
const model = useValue(() => props.modelValue, props.defaultValue, (v) => emit("update:modelValue", v));
|
|
213
|
+
const comment = ref("");
|
|
214
|
+
const submitted = ref(false);
|
|
215
|
+
return () => h("section", mergeProps(attrs, { class: "hw-feedback", "aria-label": props.label, "data-choice-variant": props.choiceVariant }), [
|
|
216
|
+
h("h2", {}, props.label),
|
|
217
|
+
h("div", {
|
|
218
|
+
class: "hw-button-group hw-feedback-actions",
|
|
219
|
+
role: "group",
|
|
220
|
+
"aria-label": props.label,
|
|
221
|
+
}, ["yes", "no"].map((value) => h(Button, {
|
|
222
|
+
variant: "secondary",
|
|
223
|
+
disabled: props.disabled || props.readonly,
|
|
224
|
+
"aria-pressed": model.value.value === value,
|
|
225
|
+
onClick: () => {
|
|
226
|
+
model.set(value);
|
|
227
|
+
submitted.value = false;
|
|
228
|
+
},
|
|
229
|
+
}, () => [h('span', { class: 'hw-icon hw-feedback-icon', 'data-icon': value === 'yes' ? 'thumbs-up' : 'thumbs-down', 'aria-hidden': 'true' }), h('span', { class: 'hw-feedback-label' }, value === 'yes' ? props.yesLabel : props.noLabel)]))),
|
|
230
|
+
model.value.value &&
|
|
231
|
+
h("div", {}, [
|
|
232
|
+
h(Textarea, {
|
|
233
|
+
label: props.commentLabel,
|
|
234
|
+
modelValue: comment.value,
|
|
235
|
+
"onUpdate:modelValue": (value) => {
|
|
236
|
+
comment.value = value;
|
|
237
|
+
},
|
|
238
|
+
disabled: props.disabled,
|
|
239
|
+
readonly: props.readonly,
|
|
240
|
+
}),
|
|
241
|
+
h(Button, {
|
|
242
|
+
disabled: props.disabled || props.readonly,
|
|
243
|
+
onClick: () => {
|
|
244
|
+
emit("submit", {
|
|
245
|
+
value: model.value.value,
|
|
246
|
+
comment: comment.value,
|
|
247
|
+
});
|
|
248
|
+
submitted.value = true;
|
|
249
|
+
},
|
|
250
|
+
}, () => props.submitLabel),
|
|
251
|
+
]),
|
|
252
|
+
h("p", { role: "status" }, submitted.value ? props.thanks : ""),
|
|
253
|
+
slots.default?.(),
|
|
254
|
+
]);
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
export const CookieConsent = defineComponent({
|
|
258
|
+
name: "HwCookieConsent",
|
|
259
|
+
inheritAttrs: false,
|
|
260
|
+
props: {
|
|
261
|
+
open: { type: Boolean, default: undefined },
|
|
262
|
+
defaultOpen: { type: Boolean, default: true },
|
|
263
|
+
label: { type: String, default: "Cookie preferences" },
|
|
264
|
+
description: { type: String, required: true },
|
|
265
|
+
acceptLabel: { type: String, default: "Accept optional cookies" },
|
|
266
|
+
rejectLabel: { type: String, default: "Reject optional cookies" },
|
|
267
|
+
preferencesLabel: { type: String, default: "Manage preferences" },
|
|
268
|
+
},
|
|
269
|
+
emits: {
|
|
270
|
+
"update:open": (_value) => true,
|
|
271
|
+
accept: () => true,
|
|
272
|
+
reject: () => true,
|
|
273
|
+
preferences: () => true,
|
|
274
|
+
},
|
|
275
|
+
setup(props, { attrs, slots, emit }) {
|
|
276
|
+
const model = useValue(() => props.open, props.defaultOpen, (v) => emit("update:open", v));
|
|
277
|
+
return () => h("section", mergeProps(attrs, {
|
|
278
|
+
class: "hw-cookie-consent",
|
|
279
|
+
role: "region",
|
|
280
|
+
"aria-label": props.label,
|
|
281
|
+
hidden: !model.value.value,
|
|
282
|
+
}), [
|
|
283
|
+
h("h2", {}, props.label),
|
|
284
|
+
h("p", {}, props.description),
|
|
285
|
+
slots.default?.(),
|
|
286
|
+
h("div", { class: "hw-button-group" }, [
|
|
287
|
+
h(Button, {
|
|
288
|
+
onClick: () => {
|
|
289
|
+
emit("accept");
|
|
290
|
+
model.set(false);
|
|
291
|
+
},
|
|
292
|
+
}, () => props.acceptLabel),
|
|
293
|
+
h(Button, {
|
|
294
|
+
variant: "secondary",
|
|
295
|
+
onClick: () => {
|
|
296
|
+
emit("reject");
|
|
297
|
+
model.set(false);
|
|
298
|
+
},
|
|
299
|
+
}, () => props.rejectLabel),
|
|
300
|
+
h(Button, { variant: "ghost", onClick: () => emit("preferences") }, () => props.preferencesLabel),
|
|
301
|
+
]),
|
|
302
|
+
]);
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
export const NotificationList = defineComponent({
|
|
306
|
+
name: "HwNotificationList",
|
|
307
|
+
inheritAttrs: false,
|
|
308
|
+
props: {
|
|
309
|
+
items: {
|
|
310
|
+
type: Array,
|
|
311
|
+
required: true,
|
|
312
|
+
},
|
|
313
|
+
label: { type: String, default: "Notifications" },
|
|
314
|
+
emptyMessage: { type: String, default: "No notifications" },
|
|
315
|
+
readLabel: {
|
|
316
|
+
type: Function,
|
|
317
|
+
default: (item) => `Mark ${item.title} as read`,
|
|
318
|
+
},
|
|
319
|
+
dismissLabel: {
|
|
320
|
+
type: Function,
|
|
321
|
+
default: (item) => `Dismiss ${item.title}`,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
emits: { read: (_id) => true, dismiss: (_id) => true },
|
|
325
|
+
setup(props, { attrs, emit, slots }) {
|
|
326
|
+
return () => h("section", mergeProps(attrs, {
|
|
327
|
+
class: "hw-notification-list",
|
|
328
|
+
"aria-label": props.label,
|
|
329
|
+
}), [
|
|
330
|
+
props.items.length
|
|
331
|
+
? h("ul", {}, props.items.map((item) => h("li", { key: item.id, "data-read": String(Boolean(item.read)) }, [
|
|
332
|
+
h("h3", {}, item.href
|
|
333
|
+
? h("a", { href: item.href }, item.title)
|
|
334
|
+
: item.title),
|
|
335
|
+
item.description && h("p", {}, item.description),
|
|
336
|
+
item.date &&
|
|
337
|
+
h("time", { datetime: item.date }, item.dateLabel ?? item.date),
|
|
338
|
+
slots[item.id]?.({ item }),
|
|
339
|
+
!item.read &&
|
|
340
|
+
h(Button, {
|
|
341
|
+
variant: "ghost",
|
|
342
|
+
"aria-label": props.readLabel(item),
|
|
343
|
+
onClick: () => emit("read", item.id),
|
|
344
|
+
}, () => props.readLabel(item)),
|
|
345
|
+
h(Button, {
|
|
346
|
+
variant: "ghost",
|
|
347
|
+
"aria-label": props.dismissLabel(item),
|
|
348
|
+
onClick: () => emit("dismiss", item.id),
|
|
349
|
+
}, () => "×"),
|
|
350
|
+
])))
|
|
351
|
+
: h("p", { role: "status" }, props.emptyMessage),
|
|
352
|
+
]);
|
|
353
|
+
},
|
|
354
|
+
});
|
|
355
|
+
//# sourceMappingURL=patterns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patterns.js","sourceRoot":"","sources":["../src/patterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAE7F,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,IAAI,EAAE,eAAe;IACrB,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL,KAAK,EAAE,E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tC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC;qBACxC,EACD,GAAG,EAAE,CAAC,GAAG,CACV;iBACF,CACF,CACF,CACF;gBACH,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,YAAY,CAAC;SACnD,CACF,CAAC;IACN,CAAC;CACF,CAAC,CAAC"}
|
package/dist/portal.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { BreadcrumbItem } from './display.js';
|
|
3
|
+
import type { PortalLink } from './patterns.js';
|
|
4
|
+
export interface SecondaryNavItem extends PortalLink {
|
|
5
|
+
icon?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const SecondaryNav: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
variant: {
|
|
9
|
+
type: PropType<"default" | "mobile">;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
items: {
|
|
13
|
+
type: PropType<readonly SecondaryNavItem[]>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
label: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
variant: {
|
|
24
|
+
type: PropType<"default" | "mobile">;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
items: {
|
|
28
|
+
type: PropType<readonly SecondaryNavItem[]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
label: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{}>, {
|
|
36
|
+
variant: "default" | "mobile";
|
|
37
|
+
label: string;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export declare const PortalLayout: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
40
|
+
brand: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
homeHref: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
links: {
|
|
49
|
+
type: PropType<readonly PortalLink[]>;
|
|
50
|
+
default: () => never[];
|
|
51
|
+
};
|
|
52
|
+
secondaryNavigation: {
|
|
53
|
+
type: PropType<readonly PortalLink[]>;
|
|
54
|
+
default: () => never[];
|
|
55
|
+
};
|
|
56
|
+
footerLinks: {
|
|
57
|
+
type: PropType<readonly PortalLink[]>;
|
|
58
|
+
default: () => never[];
|
|
59
|
+
};
|
|
60
|
+
breadcrumbs: {
|
|
61
|
+
type: PropType<readonly BreadcrumbItem[]>;
|
|
62
|
+
default: () => never[];
|
|
63
|
+
};
|
|
64
|
+
copyright: StringConstructor;
|
|
65
|
+
mainId: StringConstructor;
|
|
66
|
+
lang: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
dir: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
skipLabel: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
menuLabel: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
navigationLabel: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
secondaryLabel: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
breadcrumbLabel: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: string;
|
|
93
|
+
};
|
|
94
|
+
footerLabel: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
default: string;
|
|
97
|
+
};
|
|
98
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
99
|
+
[key: string]: any;
|
|
100
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
101
|
+
brand: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
required: true;
|
|
104
|
+
};
|
|
105
|
+
homeHref: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
links: {
|
|
110
|
+
type: PropType<readonly PortalLink[]>;
|
|
111
|
+
default: () => never[];
|
|
112
|
+
};
|
|
113
|
+
secondaryNavigation: {
|
|
114
|
+
type: PropType<readonly PortalLink[]>;
|
|
115
|
+
default: () => never[];
|
|
116
|
+
};
|
|
117
|
+
footerLinks: {
|
|
118
|
+
type: PropType<readonly PortalLink[]>;
|
|
119
|
+
default: () => never[];
|
|
120
|
+
};
|
|
121
|
+
breadcrumbs: {
|
|
122
|
+
type: PropType<readonly BreadcrumbItem[]>;
|
|
123
|
+
default: () => never[];
|
|
124
|
+
};
|
|
125
|
+
copyright: StringConstructor;
|
|
126
|
+
mainId: StringConstructor;
|
|
127
|
+
lang: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
default: string;
|
|
130
|
+
};
|
|
131
|
+
dir: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
default: string;
|
|
134
|
+
};
|
|
135
|
+
skipLabel: {
|
|
136
|
+
type: StringConstructor;
|
|
137
|
+
default: string;
|
|
138
|
+
};
|
|
139
|
+
menuLabel: {
|
|
140
|
+
type: StringConstructor;
|
|
141
|
+
default: string;
|
|
142
|
+
};
|
|
143
|
+
navigationLabel: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
default: string;
|
|
146
|
+
};
|
|
147
|
+
secondaryLabel: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
default: string;
|
|
150
|
+
};
|
|
151
|
+
breadcrumbLabel: {
|
|
152
|
+
type: StringConstructor;
|
|
153
|
+
default: string;
|
|
154
|
+
};
|
|
155
|
+
footerLabel: {
|
|
156
|
+
type: StringConstructor;
|
|
157
|
+
default: string;
|
|
158
|
+
};
|
|
159
|
+
}>> & Readonly<{}>, {
|
|
160
|
+
dir: string;
|
|
161
|
+
navigationLabel: string;
|
|
162
|
+
lang: string;
|
|
163
|
+
homeHref: string;
|
|
164
|
+
links: readonly PortalLink[];
|
|
165
|
+
menuLabel: string;
|
|
166
|
+
skipLabel: string;
|
|
167
|
+
secondaryNavigation: readonly PortalLink[];
|
|
168
|
+
footerLinks: readonly PortalLink[];
|
|
169
|
+
breadcrumbs: readonly BreadcrumbItem[];
|
|
170
|
+
secondaryLabel: string;
|
|
171
|
+
breadcrumbLabel: string;
|
|
172
|
+
footerLabel: string;
|
|
173
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
174
|
+
//# sourceMappingURL=portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../src/portal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAAG,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE;AACtE,eAAO,MAAM,YAAY;;cAEa,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;;;;cAAgD,QAAQ,CAAC,SAAS,gBAAgB,EAAE,CAAC;;;;;;;;;;;cAAnH,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;;;;cAAgD,QAAQ,CAAC,SAAS,gBAAgB,EAAE,CAAC;;;;;;;;;;4EAEvJ,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;cAIG,QAAQ,CAAC,SAAS,UAAU,EAAE,CAAC;;;;cACjB,QAAQ,CAAC,SAAS,UAAU,EAAE,CAAC;;;;cACvC,QAAQ,CAAC,SAAS,UAAU,EAAE,CAAC;;;;cAC/B,QAAQ,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAHzC,QAAQ,CAAC,SAAS,UAAU,EAAE,CAAC;;;;cACjB,QAAQ,CAAC,SAAS,UAAU,EAAE,CAAC;;;;cACvC,QAAQ,CAAC,SAAS,UAAU,EAAE,CAAC;;;;cAC/B,QAAQ,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAgBnE,CAAC"}
|
package/dist/portal.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps, useId } from 'vue';
|
|
2
|
+
import { Breadcrumb } from './display.js';
|
|
3
|
+
import { PortalHeader, PortalFooter } from './patterns.js';
|
|
4
|
+
export const SecondaryNav = defineComponent({
|
|
5
|
+
name: 'HwSecondaryNav', inheritAttrs: false,
|
|
6
|
+
props: { variant: { type: String, default: 'default' }, items: { type: Array, required: true }, label: { type: String, default: 'التنقل الثانوي' } },
|
|
7
|
+
setup(props, { attrs }) { return () => h('nav', mergeProps(attrs, { class: 'hw-secondary-nav', 'aria-label': props.label, 'data-variant': props.variant }), h('ul', {}, props.items.map(item => h('li', { key: item.href }, h('a', { href: item.href, 'aria-current': item.current ? 'page' : undefined }, [props.variant === 'mobile' && item.icon && h('span', { class: 'hw-icon', 'data-icon': item.icon, 'aria-hidden': 'true' }), h('span', {}, item.label)]))))); },
|
|
8
|
+
});
|
|
9
|
+
export const PortalLayout = defineComponent({
|
|
10
|
+
name: 'HwPortalLayout', inheritAttrs: false,
|
|
11
|
+
props: {
|
|
12
|
+
brand: { type: String, required: true }, homeHref: { type: String, default: '/' },
|
|
13
|
+
links: { type: Array, default: () => [] },
|
|
14
|
+
secondaryNavigation: { type: Array, default: () => [] },
|
|
15
|
+
footerLinks: { type: Array, default: () => [] },
|
|
16
|
+
breadcrumbs: { type: Array, default: () => [] },
|
|
17
|
+
copyright: String, mainId: String,
|
|
18
|
+
lang: { type: String, default: 'ar' }, dir: { type: String, default: 'rtl' },
|
|
19
|
+
skipLabel: { type: String, default: 'انتقل إلى المحتوى' },
|
|
20
|
+
menuLabel: { type: String, default: 'القائمة' }, navigationLabel: { type: String, default: 'التنقل الرئيسي' },
|
|
21
|
+
secondaryLabel: { type: String, default: 'التنقل الثانوي' }, breadcrumbLabel: { type: String, default: 'مسار التنقل' }, footerLabel: { type: String, default: 'روابط التذييل' },
|
|
22
|
+
},
|
|
23
|
+
setup(props, { attrs, slots }) {
|
|
24
|
+
const id = useId();
|
|
25
|
+
return () => {
|
|
26
|
+
const mainId = props.mainId ?? `${id}-main`;
|
|
27
|
+
return h('div', mergeProps(attrs, { class: 'hw-portal-layout', lang: props.lang, dir: props.dir }), [
|
|
28
|
+
h(PortalHeader, { brand: props.brand, homeHref: props.homeHref, links: props.links, mainId, skipLabel: props.skipLabel, menuLabel: props.menuLabel, navLabel: props.navigationLabel }, { logo: slots.logo, actions: slots.actions }),
|
|
29
|
+
props.secondaryNavigation.length > 0 && h(SecondaryNav, { items: props.secondaryNavigation, label: props.secondaryLabel }),
|
|
30
|
+
h('main', { id: mainId, tabindex: -1, class: 'hw-portal-layout-main hw-container' }, [props.breadcrumbs.length > 0 && h(Breadcrumb, { items: props.breadcrumbs, label: props.breadcrumbLabel }), slots.default?.()]),
|
|
31
|
+
h(PortalFooter, { brand: props.brand, links: props.footerLinks, copyright: props.copyright, navLabel: props.footerLabel }, { default: slots.footer }),
|
|
32
|
+
]);
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.js","sourceRoot":"","sources":["../src/portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI3D,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC;IAC1C,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,KAAK;IAC3C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAwC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAA8C,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE;IAC/N,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,IA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