@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export declare const SearchField: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
modelValue: StringConstructor;
|
|
4
|
+
defaultValue: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
disabled: BooleanConstructor;
|
|
9
|
+
readonly: BooleanConstructor;
|
|
10
|
+
clearLabel: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
suggestions: PropType<readonly string[]>;
|
|
15
|
+
maxSuggestions: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
resultsMessage: {
|
|
20
|
+
type: PropType<(count: number) => string>;
|
|
21
|
+
default: (count: number) => string;
|
|
22
|
+
};
|
|
23
|
+
showSearchButton: BooleanConstructor;
|
|
24
|
+
searchLabel: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
label: StringConstructor;
|
|
29
|
+
hint: StringConstructor;
|
|
30
|
+
error: StringConstructor;
|
|
31
|
+
required: {
|
|
32
|
+
readonly type: BooleanConstructor;
|
|
33
|
+
readonly default: undefined;
|
|
34
|
+
};
|
|
35
|
+
}>, () => string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}> | import("vue").VNodeArrayChildren | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
+
'update:modelValue': (_value: string) => true;
|
|
39
|
+
search: (_value: string) => true;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
modelValue: StringConstructor;
|
|
42
|
+
defaultValue: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
disabled: BooleanConstructor;
|
|
47
|
+
readonly: BooleanConstructor;
|
|
48
|
+
clearLabel: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
suggestions: PropType<readonly string[]>;
|
|
53
|
+
maxSuggestions: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
57
|
+
resultsMessage: {
|
|
58
|
+
type: PropType<(count: number) => string>;
|
|
59
|
+
default: (count: number) => string;
|
|
60
|
+
};
|
|
61
|
+
showSearchButton: BooleanConstructor;
|
|
62
|
+
searchLabel: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
label: StringConstructor;
|
|
67
|
+
hint: StringConstructor;
|
|
68
|
+
error: StringConstructor;
|
|
69
|
+
required: {
|
|
70
|
+
readonly type: BooleanConstructor;
|
|
71
|
+
readonly default: undefined;
|
|
72
|
+
};
|
|
73
|
+
}>> & Readonly<{
|
|
74
|
+
onSearch?: ((_value: string) => any) | undefined;
|
|
75
|
+
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
76
|
+
}>, {
|
|
77
|
+
disabled: boolean;
|
|
78
|
+
required: boolean;
|
|
79
|
+
defaultValue: string;
|
|
80
|
+
readonly: boolean;
|
|
81
|
+
resultsMessage: (count: number) => string;
|
|
82
|
+
showSearchButton: boolean;
|
|
83
|
+
clearLabel: string;
|
|
84
|
+
maxSuggestions: number;
|
|
85
|
+
searchLabel: string;
|
|
86
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
//# sourceMappingURL=search-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-field.d.ts","sourceRoot":"","sources":["../src/search-field.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,KAAK,CAAC;AAKlC,eAAO,MAAM,WAAW;;;;;;;;;;;;iBAG+C,QAAQ,CAAC,SAAS,MAAM,EAAE,CAAC;;;;;;cAC7D,QAAQ,CAAC,CAAC,KAAK,EAAC,MAAM,KAAG,MAAM,CAAC;yBAAgB,MAAM;;;;;;;;;;;;;;;;;kCAGtD,MAAM;qBAAuB,MAAM;;;;;;;;;;;;;iBAJD,QAAQ,CAAC,SAAS,MAAM,EAAE,CAAC;;;;;;cAC7D,QAAQ,CAAC,CAAC,KAAK,EAAC,MAAM,KAAG,MAAM,CAAC;yBAAgB,MAAM;;;;;;;;;;;;;;;;;;;;;;4BAAtC,MAAM,KAAG,MAAM;;;;;4EA8DlE,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { computed, defineComponent, h, mergeProps, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
2
|
+
import { getSearchSuggestions, isDisabled, requestSearchDialogClose } from '@hawiyah/core';
|
|
3
|
+
import { Button, decorate } from './forms.js';
|
|
4
|
+
import { decorationProps, useField, useFormReset, useValue } from './shared.js';
|
|
5
|
+
export const SearchField = defineComponent({
|
|
6
|
+
name: 'HwSearchField', inheritAttrs: false,
|
|
7
|
+
props: { ...decorationProps, modelValue: String, defaultValue: { type: String, default: '' }, disabled: Boolean, readonly: Boolean,
|
|
8
|
+
clearLabel: { type: String, default: 'مسح البحث' }, suggestions: Array, maxSuggestions: { type: Number, default: 8 },
|
|
9
|
+
resultsMessage: { type: Function, default: (count) => `${count} اقتراحات متاحة` },
|
|
10
|
+
showSearchButton: Boolean, searchLabel: { type: String, default: 'بحث' }, },
|
|
11
|
+
emits: { 'update:modelValue': (_value) => true, search: (_value) => true },
|
|
12
|
+
setup(props, { attrs, emit, expose }) {
|
|
13
|
+
const field = useField(props, attrs), element = ref(), container = ref();
|
|
14
|
+
const model = useValue(() => props.modelValue, props.defaultValue, value => emit('update:modelValue', value));
|
|
15
|
+
const opened = ref(false), active = ref(-1), composing = ref(false);
|
|
16
|
+
let expectedValue;
|
|
17
|
+
const close = () => { opened.value = false; active.value = -1; };
|
|
18
|
+
const editable = () => !!element.value && !props.readonly && !element.value.readOnly && !isDisabled(element.value);
|
|
19
|
+
const matches = computed(() => getSearchSuggestions(model.value.value, props.suggestions ?? [], props.maxSuggestions));
|
|
20
|
+
const expanded = computed(() => opened.value && props.suggestions !== undefined && !props.readonly && !props.disabled && !composing.value && matches.value.length > 0);
|
|
21
|
+
const listId = computed(() => `${field.id.value}-suggestions`);
|
|
22
|
+
const write = (value) => { expectedValue = value; model.set(value); };
|
|
23
|
+
const search = () => { if (!element.value || isDisabled(element.value) || composing.value)
|
|
24
|
+
return; const query = model.value.value.trim(); if (query)
|
|
25
|
+
emit('search', query); close(); };
|
|
26
|
+
const choose = (index) => { if (!editable() || composing.value)
|
|
27
|
+
return; const match = matches.value[index]; if (!match)
|
|
28
|
+
return; write(match.value); element.value?.focus(); close(); };
|
|
29
|
+
useFormReset(element, () => { close(); composing.value = false; model.set(props.defaultValue); });
|
|
30
|
+
expose({ element, focus: () => { if (element.value && !isDisabled(element.value))
|
|
31
|
+
element.value.focus(); } });
|
|
32
|
+
watch(model.value, () => { active.value = -1; });
|
|
33
|
+
watch(() => props.modelValue, value => { if (value !== expectedValue)
|
|
34
|
+
close(); expectedValue = undefined; });
|
|
35
|
+
watch(() => [JSON.stringify(props.suggestions), props.maxSuggestions, props.disabled, props.readonly], close);
|
|
36
|
+
let observer;
|
|
37
|
+
const outside = (event) => { if (!container.value?.contains(event.target))
|
|
38
|
+
close(); };
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
const input = element.value;
|
|
41
|
+
input.ownerDocument.addEventListener('pointerdown', outside);
|
|
42
|
+
const Observer = input.ownerDocument.defaultView?.MutationObserver;
|
|
43
|
+
observer = Observer ? new Observer(() => { if (input.readOnly || isDisabled(input))
|
|
44
|
+
close(); }) : undefined;
|
|
45
|
+
observer?.observe(input, { attributes: true, attributeFilter: ['readonly', 'disabled', 'aria-disabled'] });
|
|
46
|
+
for (let parent = input.parentElement; parent; parent = parent.parentElement)
|
|
47
|
+
if (parent.localName === 'fieldset')
|
|
48
|
+
observer?.observe(parent, { attributes: true, attributeFilter: ['disabled'] });
|
|
49
|
+
});
|
|
50
|
+
onBeforeUnmount(() => { observer?.disconnect(); element.value?.ownerDocument.removeEventListener('pointerdown', outside); });
|
|
51
|
+
watch([active, expanded], async () => {
|
|
52
|
+
await nextTick();
|
|
53
|
+
if (!expanded.value || active.value < 0)
|
|
54
|
+
return;
|
|
55
|
+
const list = element.value?.ownerDocument.getElementById(listId.value), option = list?.children[active.value];
|
|
56
|
+
if (!list || !option)
|
|
57
|
+
return;
|
|
58
|
+
const outer = list.getBoundingClientRect(), inner = option.getBoundingClientRect();
|
|
59
|
+
if (inner.top < outer.top)
|
|
60
|
+
list.scrollTop -= outer.top - inner.top;
|
|
61
|
+
else if (inner.bottom > outer.bottom)
|
|
62
|
+
list.scrollTop += inner.bottom - outer.bottom;
|
|
63
|
+
}, { flush: 'post' });
|
|
64
|
+
return () => decorate(props, field.id.value, [
|
|
65
|
+
h('div', { class: 'hw-input-group', ref: container }, [
|
|
66
|
+
h('div', { class: 'hw-search-control' }, [
|
|
67
|
+
h('input', mergeProps(attrs, field.controlAttrs.value, { ref: element, class: 'hw-input', type: 'search', value: model.value.value, disabled: props.disabled, readonly: props.readonly,
|
|
68
|
+
autocomplete: attrs.autocomplete ?? (props.suggestions !== undefined ? 'off' : undefined), role: props.suggestions !== undefined ? 'combobox' : attrs.role,
|
|
69
|
+
'aria-autocomplete': props.suggestions !== undefined ? 'list' : attrs['aria-autocomplete'], 'aria-expanded': props.suggestions !== undefined ? expanded.value : attrs['aria-expanded'], 'aria-controls': props.suggestions !== undefined ? listId.value : attrs['aria-controls'], 'aria-activedescendant': expanded.value && active.value >= 0 && active.value < matches.value.length ? `${listId.value}-${active.value}` : undefined,
|
|
70
|
+
onInput: (event) => { if (event.defaultPrevented || !editable())
|
|
71
|
+
return; write(event.target.value); active.value = -1; opened.value = !composing.value; },
|
|
72
|
+
onFocus: (event) => { if (!event.defaultPrevented && editable() && !composing.value)
|
|
73
|
+
opened.value = true; }, onBlur: close,
|
|
74
|
+
onCompositionstart: () => { composing.value = true; close(); }, onCompositionend: (event) => { composing.value = false; if (!event.defaultPrevented && editable())
|
|
75
|
+
opened.value = true; },
|
|
76
|
+
onKeydown: (event) => {
|
|
77
|
+
if (event.defaultPrevented || composing.value || event.isComposing || event.ctrlKey || event.altKey || event.metaKey || event.shiftKey || !element.value || isDisabled(element.value))
|
|
78
|
+
return;
|
|
79
|
+
if (event.key === 'Escape' && expanded.value) {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
event.stopPropagation();
|
|
82
|
+
close();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (event.key === 'Escape' && requestSearchDialogClose(element.value)) {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
event.stopPropagation();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (editable() && matches.value.length && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
opened.value = true;
|
|
93
|
+
active.value = event.key === 'ArrowDown' ? (active.value + 1) % matches.value.length : (active.value <= 0 ? matches.value.length - 1 : active.value - 1);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (event.key === 'Enter') {
|
|
97
|
+
if (expanded.value && active.value >= 0) {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
choose(active.value);
|
|
100
|
+
}
|
|
101
|
+
else
|
|
102
|
+
search();
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
})),
|
|
106
|
+
h(Button, { class: 'hw-search-clear', variant: 'ghost', hidden: !model.value.value || props.readonly, disabled: props.disabled, 'aria-label': props.clearLabel, 'aria-controls': field.id.value, onPointerdown: (event) => { if (event.button === 0)
|
|
107
|
+
event.preventDefault(); }, onMousedown: (event) => { if (event.button === 0)
|
|
108
|
+
event.preventDefault(); }, onClick: () => { if (editable()) {
|
|
109
|
+
write('');
|
|
110
|
+
element.value?.focus();
|
|
111
|
+
close();
|
|
112
|
+
} } }, () => h('span', { class: 'hw-search-clear-icon', 'aria-hidden': 'true' })),
|
|
113
|
+
props.suggestions !== undefined ? h('div', { class: 'hw-search-suggestions', id: listId.value, role: 'listbox', 'aria-label': props.label ?? attrs['aria-label'] ?? props.searchLabel, hidden: !expanded.value }, matches.value.map((match, index) => h('div', { class: 'hw-search-option', dir: 'auto', key: match.value, id: `${listId.value}-${index}`, role: 'option', 'aria-selected': index === active.value, onPointerdown: (event) => { if (event.button === 0)
|
|
114
|
+
event.preventDefault(); }, onMousedown: (event) => { if (event.button === 0)
|
|
115
|
+
event.preventDefault(); }, onClick: () => choose(index) }, match.segments.map(segment => segment.match ? h('strong', segment.text) : segment.text)))) : null,
|
|
116
|
+
]),
|
|
117
|
+
props.showSearchButton ? h(Button, { class: 'hw-search-submit', disabled: props.disabled, 'aria-label': props.searchLabel, onClick: search }, () => h('span', { class: 'hw-search-submit-icon', 'aria-hidden': 'true' })) : null,
|
|
118
|
+
]),
|
|
119
|
+
props.suggestions !== undefined ? h('span', { class: 'hw-sr-only', role: 'status', 'aria-live': 'polite', 'aria-atomic': 'true' }, opened.value && !props.readonly && !props.disabled && !composing.value && model.value.value.trim() ? props.resultsMessage(matches.value.length) : '') : null,
|
|
120
|
+
], 'hw-search-field');
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=search-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-field.js","sourceRoot":"","sources":["../src/search-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAC,MAAM,KAAK,CAAC;AAE/G,OAAO,EAAC,oBAAoB,EAAE,UAAU,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AAE9E,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK;IAC1C,KAAK,EAAE,EAAC,GAAG,eAAe,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAC,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,EAAE,EAAC,EAAE,QAAQ,EAAC,OAAO,EAAE,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AAC,MAAM,EAAC,EAAC,MAAM,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA,CAAC,CAAA,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA,CAAC,CAAA,EAAE,CAAC,CAAA,CAAC,CAAA,IAAI;SAC3Q,EAAC,iBAAiB,CAAC,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
|
package/dist/shared.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComputedRef, Ref, VNodeChild } from 'vue';
|
|
2
|
+
export interface FieldDecoration {
|
|
3
|
+
label?: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const decorationProps: {
|
|
9
|
+
readonly label: StringConstructor;
|
|
10
|
+
readonly hint: StringConstructor;
|
|
11
|
+
readonly error: StringConstructor;
|
|
12
|
+
readonly required: {
|
|
13
|
+
readonly type: BooleanConstructor;
|
|
14
|
+
readonly default: undefined;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
interface FieldContext {
|
|
18
|
+
id: string;
|
|
19
|
+
labelId?: string;
|
|
20
|
+
describedby?: string;
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function provideField(value: ComputedRef<FieldContext>): void;
|
|
25
|
+
export declare function joinIds(...values: unknown[]): string | undefined;
|
|
26
|
+
export declare function useField(props: FieldDecoration, attrs: Record<string, unknown>, separateNestedHelpers?: boolean): {
|
|
27
|
+
id: ComputedRef<string>;
|
|
28
|
+
decorationId: ComputedRef<string>;
|
|
29
|
+
decorated: ComputedRef<boolean>;
|
|
30
|
+
controlAttrs: ComputedRef<{
|
|
31
|
+
id: string;
|
|
32
|
+
'aria-labelledby': {} | undefined;
|
|
33
|
+
'aria-describedby': string | undefined;
|
|
34
|
+
'aria-invalid': unknown;
|
|
35
|
+
required: boolean | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export declare function useValue<T>(read: () => T | undefined, initial: T, emit: (value: T) => void): {
|
|
39
|
+
value: ComputedRef<T>;
|
|
40
|
+
set: (next: T) => void;
|
|
41
|
+
sync: (next: T) => void;
|
|
42
|
+
};
|
|
43
|
+
export declare function useFormReset(element: Ref<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | undefined>, reset: () => void): void;
|
|
44
|
+
export type RenderContent = VNodeChild;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAgB,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEtE,MAAM,WAAW,eAAe;IAAG,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;AACtG,eAAO,MAAM,eAAe;;;;;;;;CAA2G,CAAC;AACxI,UAAU,YAAY;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;AAEpH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,QAA+B;AAC5F,wBAAgB,OAAO,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,SAAS,CAGhE;AACD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,UAAQ;;;;;;;;;;;EAa7G;AACD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI;;gBAItE,CAAC;iBADA,CAAC;EAGtB;AACD,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,gBAAgB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,IAAI,QAOnI;AACD,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC"}
|
package/dist/shared.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { computed, inject, onBeforeUnmount, onMounted, onUpdated, provide, ref, useId } from 'vue';
|
|
2
|
+
import { observeFieldValue } from '@hawiyah/core';
|
|
3
|
+
export const decorationProps = { label: String, hint: String, error: String, required: { type: Boolean, default: undefined } };
|
|
4
|
+
const fieldKey = Symbol('hawiyah-field');
|
|
5
|
+
export function provideField(value) { provide(fieldKey, value); }
|
|
6
|
+
export function joinIds(...values) {
|
|
7
|
+
const ids = values.filter(Boolean).flatMap(value => String(value).trim().split(/\s+/)).filter(Boolean);
|
|
8
|
+
return [...new Set(ids)].join(' ') || undefined;
|
|
9
|
+
}
|
|
10
|
+
export function useField(props, attrs, separateNestedHelpers = false) {
|
|
11
|
+
const generated = `hw-${useId()}`;
|
|
12
|
+
const parent = inject(fieldKey, undefined);
|
|
13
|
+
const decorated = computed(() => Boolean(props.label || props.hint || props.error));
|
|
14
|
+
const id = computed(() => String(attrs.id ?? parent?.value.id ?? generated));
|
|
15
|
+
const decorationId = computed(() => separateNestedHelpers && parent ? generated : id.value);
|
|
16
|
+
const labelId = computed(() => props.label ? `${decorationId.value}-label` : parent?.value.labelId);
|
|
17
|
+
const describedby = computed(() => joinIds(attrs['aria-describedby'], parent?.value.describedby, props.hint && `${decorationId.value}-hint`, props.error && `${decorationId.value}-error`));
|
|
18
|
+
const controlAttrs = computed(() => ({ id: id.value, 'aria-labelledby': attrs['aria-labelledby'] ?? (attrs['aria-label'] ? undefined : labelId.value),
|
|
19
|
+
'aria-describedby': describedby.value, 'aria-invalid': props.error || parent?.value.invalid ? true : attrs['aria-invalid'],
|
|
20
|
+
required: props.required ?? parent?.value.required }));
|
|
21
|
+
return { id, decorationId, decorated, controlAttrs };
|
|
22
|
+
}
|
|
23
|
+
export function useValue(read, initial, emit) {
|
|
24
|
+
const local = ref(initial);
|
|
25
|
+
const value = computed(() => read() === undefined ? local.value : read());
|
|
26
|
+
const sync = (next) => { local.value = next; };
|
|
27
|
+
const set = (next) => { sync(next); emit(next); };
|
|
28
|
+
return { value, set, sync };
|
|
29
|
+
}
|
|
30
|
+
export function useFormReset(element, reset) {
|
|
31
|
+
let presence;
|
|
32
|
+
let form;
|
|
33
|
+
const listener = (event) => queueMicrotask(() => { if (!event.defaultPrevented)
|
|
34
|
+
reset(); });
|
|
35
|
+
onMounted(() => { form = element.value?.form; form?.addEventListener('reset', listener); if (element.value)
|
|
36
|
+
presence = observeFieldValue(element.value); });
|
|
37
|
+
onUpdated(() => presence?.refresh());
|
|
38
|
+
onBeforeUnmount(() => { form?.removeEventListener('reset', listener); presence?.destroy(); });
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACnG,OAAO,EAAE,iB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Ae,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAChG,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const SiteVerification: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
locale: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
label: StringConstructor;
|
|
7
|
+
detailsLabel: StringConstructor;
|
|
8
|
+
domainLabel: StringConstructor;
|
|
9
|
+
domainDescription: StringConstructor;
|
|
10
|
+
httpsLabel: StringConstructor;
|
|
11
|
+
httpsDescription: StringConstructor;
|
|
12
|
+
registrationLabel: StringConstructor;
|
|
13
|
+
domain: StringConstructor;
|
|
14
|
+
registrationHref: StringConstructor;
|
|
15
|
+
registrationNumber: StringConstructor;
|
|
16
|
+
externalLabel: StringConstructor;
|
|
17
|
+
registrationExternal: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
open: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
defaultOpen: BooleanConstructor;
|
|
26
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
'update:open': (_open: boolean) => true;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
locale: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
label: StringConstructor;
|
|
36
|
+
detailsLabel: StringConstructor;
|
|
37
|
+
domainLabel: StringConstructor;
|
|
38
|
+
domainDescription: StringConstructor;
|
|
39
|
+
httpsLabel: StringConstructor;
|
|
40
|
+
httpsDescription: StringConstructor;
|
|
41
|
+
registrationLabel: StringConstructor;
|
|
42
|
+
domain: StringConstructor;
|
|
43
|
+
registrationHref: StringConstructor;
|
|
44
|
+
registrationNumber: StringConstructor;
|
|
45
|
+
externalLabel: StringConstructor;
|
|
46
|
+
registrationExternal: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
open: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
defaultOpen: BooleanConstructor;
|
|
55
|
+
}>> & Readonly<{
|
|
56
|
+
"onUpdate:open"?: ((_open: boolean) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
defaultOpen: boolean;
|
|
59
|
+
open: boolean;
|
|
60
|
+
locale: string;
|
|
61
|
+
registrationExternal: boolean;
|
|
62
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
63
|
+
//# sourceMappingURL=site-verification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-verification.d.ts","sourceRoot":"","sources":["../src/site-verification.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAGC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAqBnC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps, ref } from 'vue';
|
|
2
|
+
import { getSiteVerificationLabels } from '@hawiyah/core';
|
|
3
|
+
export const SiteVerification = defineComponent({
|
|
4
|
+
name: 'HwSiteVerification', inheritAttrs: false,
|
|
5
|
+
props: { locale: { type: String, default: 'ar' }, label: String, detailsLabel: String, domainLabel: String, domainDescription: String, httpsLabel: String, httpsDescription: String, registrationLabel: String, domain: String, registrationHref: String, registrationNumber: String, externalLabel: String, registrationExternal: { type: Boolean, default: true }, open: { type: Boolean, default: undefined }, defaultOpen: Boolean },
|
|
6
|
+
emits: { 'update:open': (_open) => true },
|
|
7
|
+
setup(props, { attrs, slots, emit }) {
|
|
8
|
+
const localOpen = ref(props.defaultOpen);
|
|
9
|
+
const icon = (name) => h('span', { class: 'hw-icon', 'data-icon': name, 'aria-hidden': 'true' });
|
|
10
|
+
return () => {
|
|
11
|
+
const copy = getSiteVerificationLabels(props.locale), expanded = props.open ?? localOpen.value;
|
|
12
|
+
const check = (name, title, value, description) => h('section', {}, [icon(name), h('div', {}, [h('h2', {}, [title, ' ', h('bdi', {}, value)]), h('p', {}, description)])]);
|
|
13
|
+
return h('aside', mergeProps(attrs, { class: 'hw-site-verification', 'aria-label': attrs['aria-label'] ?? props.label ?? copy.label }), h('details', {
|
|
14
|
+
open: expanded, onToggle: (event) => { const next = event.currentTarget.open; if (next !== expanded) {
|
|
15
|
+
localOpen.value = next;
|
|
16
|
+
emit('update:open', next);
|
|
17
|
+
} },
|
|
18
|
+
}, [
|
|
19
|
+
h('summary', { onClick: (event) => { if (props.open !== undefined) {
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
emit('update:open', !props.open);
|
|
22
|
+
} } }, [slots.mark && h('span', { class: 'hw-verification-mark' }, slots.mark()), h('span', {}, props.label ?? copy.label), h('span', { class: 'hw-verification-toggle' }, [props.detailsLabel ?? copy.detailsLabel, icon('arrow-down-01')])]),
|
|
23
|
+
h('div', { class: 'hw-verification-content' }, [
|
|
24
|
+
h('div', { class: 'hw-verification-checks' }, [
|
|
25
|
+
props.domain && check('link-04', props.domainLabel ?? copy.domainLabel, props.domain, props.domainDescription ?? copy.domainDescription),
|
|
26
|
+
check('lock-password', props.httpsLabel ?? copy.httpsLabel, 'HTTPS', props.httpsDescription ?? copy.httpsDescription),
|
|
27
|
+
]),
|
|
28
|
+
props.registrationHref && h('p', { class: 'hw-verification-registration' }, h('a', { href: props.registrationHref, target: props.registrationExternal ? '_blank' : undefined, rel: props.registrationExternal ? 'noopener noreferrer' : undefined }, [props.registrationLabel ?? copy.registrationLabel, props.registrationNumber && [' ', h('bdi', {}, props.registrationNumber)], props.registrationExternal && h('span', { class: 'hw-sr-only' }, ' · ' + (props.externalLabel ?? copy.externalLabel))])), slots.default?.(),
|
|
29
|
+
]),
|
|
30
|
+
]));
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=site-verification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-verification.js","sourceRoot":"","sources":["../src/site-verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,CAAC,EAAC,UAAU,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACrD,OAAO,EAAC,yBAAyB,EAAC,MAAM,eAAe,CAAC;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAC,eAAe,CAAC;IAC5C,IAAI,EAAC,oBAAoB,EAAC,YAAY,EAAC,KAAK;IAC5C,KAAK,EAAC,EAAC,MAAM,EAAC,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,IAAI,EAAC,EAAC,KAAK,EAAC,MAAM,EAAC,YAAY,EAAC,MAAM,EAAC,WAAW,EAAC,MAAM,EAAC,iBAAiB,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,gBAAgB,EAAC,MAAM,EAAC,iBAAiB,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,gBAAgB,EAAC,MAAM,EAAC,kBAAkB,EAAC,MAAM,EAAC,aAAa,EAAC,MAAM,EAAC,oBAAoB,EAAC,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,EAAC,IAAI,EAAC,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,EAAC,WAAW,EAAC,OAAO,EAAC;IACzX,KAAK,EAAC,EAAC,aAAa,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CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAC,OAAO,EAAC,KAAK,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB,CAAC;qBACnH,CAAC;oBACF,KAAK,CAAC,gBAAgB,IAAI,CAAC,CAAC,GAAG,EAAC,EAAC,KAAK,EAAC,8BAA8B,EAAC,EAAC,CAAC,CAAC,GAAG,EAAC,EAAC,IAAI,EAAC,KAAK,CAAC,gBAAgB,EAAC,MAAM,EAAC,KAAK,CAAC,oBAAoB,CAAA,CAAC,CAAA,QAAQ,CAAA,CAAC,CAAA,SAAS,EAAC,GAAG,EAAC,KAAK,CAAC,oBAAoB,CAAA,CAAC,CAAA,qBAAqB,CAAA,CAAC,CAAA,SAAS,EAAC,EAAC,CAAC,KAAK,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,EAAC,KAAK,CAAC,kBAAkB,IAAI,CAAC,GAAG,EAAC,CAAC,CAAC,KAAK,EAAC,EAAE,EAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,EAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,CAAC,MAAM,EAAC,EAAC,KAAK,EAAC,YAAY,EAAC,EAAC,KAAK,GAAC,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC,KAAK,CAAC,OAAO,EAAE,EAAE;iBAC7d,CAAC;aACH,CAAC,CAAC,CAAC;QACN,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hawiyah/vue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Vue 3 components for Hawiyah, a UI library built to comply with the DGA Platforms Code",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"README.md",
|
|
9
|
+
"PORTAL.md",
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"NOTICE"
|
|
12
|
+
],
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@hawiyah/core": "0.2.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"vue": "^3.5.0"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"hawiyah",
|
|
28
|
+
"dga",
|
|
29
|
+
"sdga",
|
|
30
|
+
"platforms-code",
|
|
31
|
+
"saudi-design-system",
|
|
32
|
+
"arabic",
|
|
33
|
+
"rtl",
|
|
34
|
+
"ui-components",
|
|
35
|
+
"vue"
|
|
36
|
+
],
|
|
37
|
+
"license": "Apache-2.0",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/MohamedEmbarak/hawiyah.git",
|
|
41
|
+
"directory": "packages/vue"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://mohamedembarak.github.io/hawiyah/",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/MohamedEmbarak/hawiyah/issues"
|
|
46
|
+
},
|
|
47
|
+
"author": {
|
|
48
|
+
"name": "Development Team, National Platforms Sector — National Information Center"
|
|
49
|
+
},
|
|
50
|
+
"contributors": [
|
|
51
|
+
{
|
|
52
|
+
"name": "Mohamed Embarak",
|
|
53
|
+
"url": "https://github.com/MohamedEmbarak"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
6
56
|
}
|