@wawjs/ngx-bos 22.0.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/AGENTS.md +23 -0
- package/README.md +105 -0
- package/RELEASES.md +21 -0
- package/ai/architecture.md +40 -0
- package/ai/code-style.md +33 -0
- package/ai/decisions/2026-06-02-browser-only-bos-spa.md +16 -0
- package/ai/decisions/2026-06-02-package-boundary.md +22 -0
- package/ai/decisions/2026-06-02-version-start.md +12 -0
- package/ai/decisions/index.md +7 -0
- package/ai/onboarding.md +19 -0
- package/ai/task-execution.md +35 -0
- package/ai/tooling.md +33 -0
- package/fesm2022/wawjs-ngx-bos.mjs +2287 -0
- package/fesm2022/wawjs-ngx-bos.mjs.map +1 -0
- package/package.json +38 -0
- package/src/feature/file/file.component.html +123 -0
- package/src/feature/file/file.component.scss +209 -0
- package/src/feature/file/file.component.ts +220 -0
- package/src/feature/file/file.const.ts +20 -0
- package/src/feature/file/file.interface.ts +12 -0
- package/src/feature/file/file.service.ts +34 -0
- package/src/feature/file/file.util.ts +72 -0
- package/src/feature/file/index.ts +9 -0
- package/src/feature/file/pages/files/files.component.html +12 -0
- package/src/feature/file/pages/files/files.component.ts +117 -0
- package/src/feature/file/pages/files/files.routes.ts +9 -0
- package/src/feature/file/selectors/file/file-selector.component.html +11 -0
- package/src/feature/file/selectors/file/file-selector.component.ts +27 -0
- package/src/feature/user/LICENSE +21 -0
- package/src/feature/user/README.md +1 -0
- package/src/feature/user/components/user-preview/user-preview.component.html +7 -0
- package/src/feature/user/components/user-preview/user-preview.component.scss +27 -0
- package/src/feature/user/components/user-preview/user-preview.component.ts +16 -0
- package/src/feature/user/guards/admins.guard.ts +22 -0
- package/src/feature/user/guards/authenticated.guard.ts +14 -0
- package/src/feature/user/guards/guest.guard.ts +14 -0
- package/src/feature/user/module.json +1 -0
- package/src/feature/user/pages/clients/clients.component.html +8 -0
- package/src/feature/user/pages/clients/clients.component.scss +0 -0
- package/src/feature/user/pages/clients/clients.component.ts +45 -0
- package/src/feature/user/pages/clients/clients.routes.ts +9 -0
- package/src/feature/user/pages/users/users.component.html +18 -0
- package/src/feature/user/pages/users/users.component.ts +57 -0
- package/src/feature/user/pages/users/users.routes.ts +9 -0
- package/src/feature/user/selectors/user/user-selector.component.html +6 -0
- package/src/feature/user/selectors/user/user-selector.component.scss +0 -0
- package/src/feature/user/selectors/user/user-selector.component.ts +17 -0
- package/src/feature/user/user.const.ts +13 -0
- package/src/feature/user/user.form.ts +54 -0
- package/src/feature/user/user.interface.ts +12 -0
- package/src/feature/user/user.service.ts +176 -0
- package/src/form-components/ace/ace.component.html +14 -0
- package/src/form-components/ace/ace.component.scss +22 -0
- package/src/form-components/ace/ace.component.ts +210 -0
- package/src/form-components/ace/ace.form.ts +184 -0
- package/src/form-components/button/button.component.html +15 -0
- package/src/form-components/button/button.component.ts +31 -0
- package/src/form-components/button/button.form.ts +74 -0
- package/src/form-components/file/file.component.html +73 -0
- package/src/form-components/file/file.component.ts +91 -0
- package/src/form-components/file/file.form.ts +112 -0
- package/src/form-components/form-bridge.interface.ts +27 -0
- package/src/form-components/index.ts +85 -0
- package/src/form-components/input/input.component.html +16 -0
- package/src/form-components/input/input.component.ts +31 -0
- package/src/form-components/input/input.form.ts +117 -0
- package/src/form-components/select/select.component.html +24 -0
- package/src/form-components/select/select.component.ts +31 -0
- package/src/form-components/select/select.form.ts +88 -0
- package/src/form-components/tinymce/tinymce.component.html +13 -0
- package/src/form-components/tinymce/tinymce.component.scss +19 -0
- package/src/form-components/tinymce/tinymce.component.ts +221 -0
- package/src/form-components/tinymce/tinymce.form.ts +191 -0
- package/src/icons/spider/LICENSE +21 -0
- package/src/icons/spider/README.md +127 -0
- package/src/icons/spider/index.ts +1 -0
- package/src/icons/spider/module.json +4 -0
- package/src/icons/spider/spider.component.html +115 -0
- package/src/icons/spider/spider.component.scss +20 -0
- package/src/icons/spider/spider.component.ts +20 -0
- package/src/ngx-bos.config.ts +55 -0
- package/src/pages/form/form.component.html +9 -0
- package/src/pages/form/form.component.ts +86 -0
- package/src/pages/form/form.routes.ts +9 -0
- package/src/pages/forms/forms.component.html +9 -0
- package/src/pages/forms/forms.component.ts +77 -0
- package/src/pages/forms/forms.routes.ts +9 -0
- package/src/pipes/phone.pipe.ts +17 -0
- package/src/public-api.ts +36 -0
- package/types/wawjs-ngx-bos.d.ts +332 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
OnInit,
|
|
4
|
+
TemplateRef,
|
|
5
|
+
inject,
|
|
6
|
+
viewChild,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { FormsModule } from '@angular/forms';
|
|
9
|
+
import { TinymceComponent } from '@wawjs/ngx-tinymce';
|
|
10
|
+
import { FormService } from '@wawjs/ngx-form';
|
|
11
|
+
import { FormBridgeData } from '../form-bridge.interface';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
templateUrl: './tinymce.component.html',
|
|
15
|
+
styleUrl: './tinymce.component.scss',
|
|
16
|
+
imports: [FormsModule, TinymceComponent],
|
|
17
|
+
})
|
|
18
|
+
export class TinymceFormComponent implements OnInit {
|
|
19
|
+
private readonly _form = inject(FormService);
|
|
20
|
+
|
|
21
|
+
readonly templateRef =
|
|
22
|
+
viewChild.required<TemplateRef<unknown>>('templateRef');
|
|
23
|
+
|
|
24
|
+
ngOnInit(): void {
|
|
25
|
+
this._form.addTemplateComponent('Tinymce', this.templateRef());
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Read current value: prefer Signal Form field, fallback to raw submition. */
|
|
29
|
+
getValue(data: FormBridgeData): string {
|
|
30
|
+
const key = (data?.key as string | null) ?? null;
|
|
31
|
+
|
|
32
|
+
// Signal Forms field (preferred)
|
|
33
|
+
if (data?.field) {
|
|
34
|
+
try {
|
|
35
|
+
const state = data.field();
|
|
36
|
+
if (state?.value && typeof state.value === 'function') {
|
|
37
|
+
return (state.value() as string) ?? '';
|
|
38
|
+
}
|
|
39
|
+
} catch {
|
|
40
|
+
// fall through
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Model signal fallback
|
|
45
|
+
if (data?.model && typeof data.model === 'function' && key) {
|
|
46
|
+
const current = data.model() as Record<string, unknown>;
|
|
47
|
+
return (current?.[key] as string) ?? '';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Legacy submission object
|
|
51
|
+
if (!key || !data?.submition) return '';
|
|
52
|
+
return (data.submition[key] as string) ?? '';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Bridge TinyMCE -> Signal Forms (field/model) + legacy submition. */
|
|
56
|
+
onValueChange(data: FormBridgeData, value: string): void {
|
|
57
|
+
const key = data.key as string | null;
|
|
58
|
+
|
|
59
|
+
// 1) Signal Forms field (preferred)
|
|
60
|
+
if (data.field) {
|
|
61
|
+
try {
|
|
62
|
+
const state = data.field();
|
|
63
|
+
if (state?.value?.set) {
|
|
64
|
+
state.value.set(value);
|
|
65
|
+
}
|
|
66
|
+
} catch {
|
|
67
|
+
// ignore and fall through
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// 2) Fallback to model signal if present
|
|
71
|
+
else if (data.model && typeof data.model.update === 'function' && key) {
|
|
72
|
+
data.model.update((current: Record<string, unknown>) => ({
|
|
73
|
+
...current,
|
|
74
|
+
[key]: value,
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
// 3) Legacy: mutate submition object
|
|
78
|
+
else if (data.submition && key) {
|
|
79
|
+
data.submition[key] = value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Notify wform so it can emit debounced change + keep Modal submition in sync
|
|
83
|
+
if (typeof data.wChange === 'function') {
|
|
84
|
+
data.wChange();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// ---- Props helpers (all via component.props) -----------------------------
|
|
89
|
+
|
|
90
|
+
getConfig(data: FormBridgeData): any {
|
|
91
|
+
const props = data?.props ?? {};
|
|
92
|
+
|
|
93
|
+
const toNumber = (v: unknown): number | undefined => {
|
|
94
|
+
if (v === null || v === undefined || v === '') return undefined;
|
|
95
|
+
const n = Number(v);
|
|
96
|
+
return Number.isNaN(n) ? undefined : n;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Base config from simple props
|
|
100
|
+
const config: any = {};
|
|
101
|
+
|
|
102
|
+
// Layout
|
|
103
|
+
const height = toNumber(props['height']);
|
|
104
|
+
const minHeight = toNumber(props['minHeight']);
|
|
105
|
+
const maxHeight = toNumber(props['maxHeight']);
|
|
106
|
+
if (height !== undefined) config.height = height;
|
|
107
|
+
if (minHeight !== undefined) config.min_height = minHeight;
|
|
108
|
+
if (maxHeight !== undefined) config.max_height = maxHeight;
|
|
109
|
+
|
|
110
|
+
// Toggles
|
|
111
|
+
if (typeof props['menubar'] === 'boolean') {
|
|
112
|
+
config.menubar = props['menubar'];
|
|
113
|
+
}
|
|
114
|
+
if (typeof props['statusbar'] === 'boolean') {
|
|
115
|
+
config.statusbar = props['statusbar'];
|
|
116
|
+
}
|
|
117
|
+
if (typeof props['branding'] === 'boolean') {
|
|
118
|
+
config.branding = props['branding'];
|
|
119
|
+
}
|
|
120
|
+
if (typeof props['pasteAsText'] === 'boolean') {
|
|
121
|
+
config.paste_as_text = props['pasteAsText'];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Toolbar presets
|
|
125
|
+
if (props['toolbarPreset']) {
|
|
126
|
+
const preset = String(props['toolbarPreset']);
|
|
127
|
+
const toolbarMap: Record<string, string> = {
|
|
128
|
+
basic: 'undo redo | bold italic underline | bullist numlist | link',
|
|
129
|
+
standard:
|
|
130
|
+
'undo redo | styles | bold italic underline | alignleft aligncenter alignright | bullist numlist | link image table',
|
|
131
|
+
full: 'undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | forecolor backcolor | removeformat',
|
|
132
|
+
};
|
|
133
|
+
if (preset !== 'custom' && toolbarMap[preset]) {
|
|
134
|
+
config.toolbar = toolbarMap[preset];
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Plugins presets
|
|
139
|
+
if (props['pluginsPreset']) {
|
|
140
|
+
const preset = String(props['pluginsPreset']);
|
|
141
|
+
const pluginsMap: Record<string, string> = {
|
|
142
|
+
minimal: 'lists link',
|
|
143
|
+
standard: 'lists link image table code',
|
|
144
|
+
media: 'lists link image media table code',
|
|
145
|
+
all: 'advlist anchor autolink charmap code emoticons image link lists media searchreplace table visualblocks wordcount',
|
|
146
|
+
};
|
|
147
|
+
if (preset !== 'custom' && pluginsMap[preset]) {
|
|
148
|
+
config.plugins = pluginsMap[preset];
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Content behavior
|
|
153
|
+
if (props['forceRootBlock']) {
|
|
154
|
+
const value = String(props['forceRootBlock']);
|
|
155
|
+
if (value === 'false') {
|
|
156
|
+
config.forced_root_block = false;
|
|
157
|
+
} else if (value === 'default') {
|
|
158
|
+
// let TinyMCE decide; do not set
|
|
159
|
+
} else {
|
|
160
|
+
config.forced_root_block = value;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Uploads / assets
|
|
165
|
+
if (props['imageUploadUrl']) {
|
|
166
|
+
config.images_upload_url = String(props['imageUploadUrl']);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Styling
|
|
170
|
+
if (props['contentCss']) {
|
|
171
|
+
config.content_css = String(props['contentCss']);
|
|
172
|
+
}
|
|
173
|
+
if (props['contentStyle']) {
|
|
174
|
+
config.content_style = String(props['contentStyle']);
|
|
175
|
+
}
|
|
176
|
+
if (props['bodyClass']) {
|
|
177
|
+
config.body_class = String(props['bodyClass']);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Localization
|
|
181
|
+
if (props['language']) {
|
|
182
|
+
config.language = String(props['language']);
|
|
183
|
+
}
|
|
184
|
+
if (props['skin']) {
|
|
185
|
+
config.skin = String(props['skin']);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Raw config (object)
|
|
189
|
+
const rawConfig = props['config'];
|
|
190
|
+
if (rawConfig && typeof rawConfig === 'object') {
|
|
191
|
+
Object.assign(config, rawConfig as Record<string, unknown>);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Raw config JSON (string)
|
|
195
|
+
const configJson = props['configJson'];
|
|
196
|
+
if (typeof configJson === 'string' && configJson.trim()) {
|
|
197
|
+
try {
|
|
198
|
+
const json = JSON.parse(configJson);
|
|
199
|
+
if (json && typeof json === 'object') {
|
|
200
|
+
Object.assign(config, json);
|
|
201
|
+
}
|
|
202
|
+
} catch {
|
|
203
|
+
// invalid JSON -> silently ignore, keep safe
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return config;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
isDisabled(data: FormBridgeData): boolean {
|
|
211
|
+
return !!(data?.props?.['disabled'] || data?.component?.disabled);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
isInline(data: FormBridgeData): boolean {
|
|
215
|
+
return (data?.props?.['inline'] as boolean) ?? false;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
getPlaceholder(data: FormBridgeData): string {
|
|
219
|
+
return (data?.props?.['placeholder'] as string) ?? '';
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
export const tinymceForm = {
|
|
2
|
+
formId: 'tinymce',
|
|
3
|
+
title: 'Tinymce',
|
|
4
|
+
components: [
|
|
5
|
+
// UX basics
|
|
6
|
+
{
|
|
7
|
+
name: 'Input',
|
|
8
|
+
key: 'placeholder',
|
|
9
|
+
focused: true,
|
|
10
|
+
props: {
|
|
11
|
+
label: 'Placeholder',
|
|
12
|
+
placeholder: 'Enter editor placeholder...',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Input',
|
|
17
|
+
key: 'height',
|
|
18
|
+
props: {
|
|
19
|
+
label: 'Height (px)',
|
|
20
|
+
placeholder: 'Example: 300',
|
|
21
|
+
type: 'number',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'Input',
|
|
26
|
+
key: 'minHeight',
|
|
27
|
+
props: {
|
|
28
|
+
label: 'Min height (px)',
|
|
29
|
+
placeholder: 'Example: 200',
|
|
30
|
+
type: 'number',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Input',
|
|
35
|
+
key: 'maxHeight',
|
|
36
|
+
props: {
|
|
37
|
+
label: 'Max height (px)',
|
|
38
|
+
placeholder: 'Example: 600',
|
|
39
|
+
type: 'number',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
// Toggles
|
|
44
|
+
{
|
|
45
|
+
name: 'Input',
|
|
46
|
+
key: 'disabled',
|
|
47
|
+
props: {
|
|
48
|
+
label: 'Disabled',
|
|
49
|
+
type: 'checkbox',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Input',
|
|
54
|
+
key: 'inline',
|
|
55
|
+
props: {
|
|
56
|
+
label: 'Inline mode',
|
|
57
|
+
type: 'checkbox',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Input',
|
|
62
|
+
key: 'menubar',
|
|
63
|
+
props: {
|
|
64
|
+
label: 'Show menubar',
|
|
65
|
+
type: 'checkbox',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Input',
|
|
70
|
+
key: 'statusbar',
|
|
71
|
+
props: {
|
|
72
|
+
label: 'Show statusbar',
|
|
73
|
+
type: 'checkbox',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Input',
|
|
78
|
+
key: 'branding',
|
|
79
|
+
props: {
|
|
80
|
+
label: 'Show TinyMCE branding',
|
|
81
|
+
type: 'checkbox',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Input',
|
|
86
|
+
key: 'pasteAsText',
|
|
87
|
+
props: {
|
|
88
|
+
label: 'Paste as plain text',
|
|
89
|
+
type: 'checkbox',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// Toolbar / plugins presets
|
|
94
|
+
{
|
|
95
|
+
name: 'Select',
|
|
96
|
+
key: 'toolbarPreset',
|
|
97
|
+
props: {
|
|
98
|
+
label: 'Toolbar preset',
|
|
99
|
+
placeholder: 'Choose toolbar preset...',
|
|
100
|
+
items: ['basic', 'standard', 'full', 'custom'],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'Select',
|
|
105
|
+
key: 'pluginsPreset',
|
|
106
|
+
props: {
|
|
107
|
+
label: 'Plugins preset',
|
|
108
|
+
placeholder: 'Choose plugins preset...',
|
|
109
|
+
items: ['minimal', 'standard', 'media', 'all', 'custom'],
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
// Content behavior
|
|
114
|
+
{
|
|
115
|
+
name: 'Select',
|
|
116
|
+
key: 'forceRootBlock',
|
|
117
|
+
props: {
|
|
118
|
+
label: 'Force root block',
|
|
119
|
+
placeholder: 'Default (TinyMCE)',
|
|
120
|
+
items: ['default', 'p', 'div', 'false'],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
// Uploads / assets
|
|
125
|
+
{
|
|
126
|
+
name: 'Input',
|
|
127
|
+
key: 'imageUploadUrl',
|
|
128
|
+
props: {
|
|
129
|
+
label: 'Images upload URL',
|
|
130
|
+
placeholder: 'https://api.example.com/upload',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
// Styling
|
|
135
|
+
{
|
|
136
|
+
name: 'Input',
|
|
137
|
+
key: 'contentCss',
|
|
138
|
+
props: {
|
|
139
|
+
label: 'Content CSS (URL)',
|
|
140
|
+
placeholder: '/assets/tinymce-content.css',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'Input',
|
|
145
|
+
key: 'contentStyle',
|
|
146
|
+
props: {
|
|
147
|
+
label: 'Content styles (CSS string)',
|
|
148
|
+
placeholder: 'body { font-family: system-ui; }',
|
|
149
|
+
type: 'textarea',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'Input',
|
|
154
|
+
key: 'bodyClass',
|
|
155
|
+
props: {
|
|
156
|
+
label: 'Editor body CSS class',
|
|
157
|
+
placeholder: 'w-tiny-body',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
// Localization / skin
|
|
162
|
+
{
|
|
163
|
+
name: 'Input',
|
|
164
|
+
key: 'language',
|
|
165
|
+
props: {
|
|
166
|
+
label: 'Language code',
|
|
167
|
+
placeholder: 'Example: en, uk, de...',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'Input',
|
|
172
|
+
key: 'skin',
|
|
173
|
+
props: {
|
|
174
|
+
label: 'Skin',
|
|
175
|
+
placeholder: 'Example: oxide, oxide-dark...',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
// Raw config escape hatch
|
|
180
|
+
{
|
|
181
|
+
name: 'Input',
|
|
182
|
+
key: 'configJson',
|
|
183
|
+
props: {
|
|
184
|
+
label: 'Extra TinyMCE config (JSON)',
|
|
185
|
+
placeholder:
|
|
186
|
+
'{"menubar": false, "toolbar": "undo redo | bold italic"}',
|
|
187
|
+
type: 'textarea',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Web Art Work
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Icon: Spider (`icon-spider`)
|
|
2
|
+
|
|
3
|
+
Angular SVG icon component that renders a **decorative spider illustration**.
|
|
4
|
+
Designed as a branded / visual element rather than a functional UI control.
|
|
5
|
+
|
|
6
|
+
The SVG preserves its original aspect ratio and scales cleanly using CSS variables.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Selector
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<icon-spider></icon-spider>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- High-detail SVG illustration
|
|
21
|
+
- Preserves original aspect ratio (`72 × 84`)
|
|
22
|
+
- Scales responsively
|
|
23
|
+
- No JavaScript logic or state
|
|
24
|
+
- Lightweight, purely presentational
|
|
25
|
+
- Token-driven sizing via CSS variables
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Inputs
|
|
30
|
+
|
|
31
|
+
| Input | Type | Default | Description |
|
|
32
|
+
| -------- | -------- | ------- | ---------------------------------------------------- |
|
|
33
|
+
| `width` | `string` | `''` | Sets the spider width (e.g. `100px`, `6rem`, `100%`) |
|
|
34
|
+
| `height` | `string` | `''` | Sets the spider height (optional) |
|
|
35
|
+
| `start` | `string` | `''` | Reserved for future styling / animation hooks |
|
|
36
|
+
| `end` | `string` | `''` | Reserved for future styling / animation hooks |
|
|
37
|
+
|
|
38
|
+
> When only `width` is provided, the height is calculated automatically using the original SVG aspect ratio.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Sizing behavior
|
|
43
|
+
|
|
44
|
+
The component exposes CSS variables on the host element:
|
|
45
|
+
|
|
46
|
+
```css
|
|
47
|
+
--spider-w /* width */
|
|
48
|
+
--spider-h /* height */
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Defaults:
|
|
52
|
+
|
|
53
|
+
- `width: 100%`
|
|
54
|
+
- `height: auto`
|
|
55
|
+
- `aspect-ratio: 72 / 84`
|
|
56
|
+
|
|
57
|
+
This allows the icon to scale naturally in responsive layouts.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
### Default (responsive width)
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<icon-spider />
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Fixed size
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<icon-spider width="120px" />
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Custom dimensions
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<icon-spider width="80px" height="100px" />
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Inside a container
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<div style="width: 200px">
|
|
85
|
+
<icon-spider />
|
|
86
|
+
</div>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Styling
|
|
92
|
+
|
|
93
|
+
The SVG is wrapped with a `.spider` host class and `.spider__svg` element.
|
|
94
|
+
|
|
95
|
+
You can safely style or override it:
|
|
96
|
+
|
|
97
|
+
```css
|
|
98
|
+
.spider {
|
|
99
|
+
opacity: 0.9;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.spider__svg {
|
|
103
|
+
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Accessibility
|
|
110
|
+
|
|
111
|
+
- This icon is **decorative**
|
|
112
|
+
- If used in meaningful contexts, wrap it with appropriate ARIA labels or explanatory text
|
|
113
|
+
- SVG has no interactive or focusable elements
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Notes
|
|
118
|
+
|
|
119
|
+
- This component is intentionally **stateless**
|
|
120
|
+
- No theme, density, or interaction logic
|
|
121
|
+
- Ideal for branding, empty states, landing sections, or visual accents
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT © 2026 Web Art Work
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spider.component';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
preserveAspectRatio="xMidYMid meet"
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
viewBox="0 0 72 84"
|
|
5
|
+
class="spider__svg"
|
|
6
|
+
fill="none"
|
|
7
|
+
>
|
|
8
|
+
<path
|
|
9
|
+
d="M29.7441 38.2845C29.7441 38.2845 31.8474 35.0824 33.6034 33.46C35.2166 31.9737 35.9191 31.6079 36.0232 31.5575C36.1314 31.6079 36.8298 31.9737 38.443 33.46C40.1991 35.0824 42.3025 38.2845 42.3025 38.2845C42.3025 38.2845 47.196 35.9266 47.196 29.1802C47.196 22.4337 42.8736 18.9516 42.8736 18.9516C47.9679 27.7872 43.1013 33.2694 43.1013 33.2694C43.1013 33.2694 42.1364 33.1137 40.3998 31.0165C39.0996 29.5517 37.6333 28.246 36.031 27.126V27.1064V27.126C34.4245 28.2391 32.953 29.5384 31.6468 30.9971C29.9139 33.0942 28.9452 33.2498 28.9452 33.2498C28.9452 33.2498 24.0746 27.7679 29.1691 18.9321C29.1691 18.9321 24.8504 22.3948 24.8504 29.1607C24.8504 35.9266 29.7441 38.2845 29.7441 38.2845Z"
|
|
10
|
+
fill="url(#paint0_linear_5_30)"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M31.1333 41.3775C30.7938 44.101 32.322 45.2097 32.322 45.2097C32.3393 44.5685 32.4233 43.9308 32.5729 43.3072C32.7736 42.7159 33.8967 41.3618 35.0583 41.3618H36.988C38.1459 41.3618 39.2727 42.7003 39.4772 43.3072C39.6241 43.9312 39.707 44.5688 39.7242 45.2097C39.7242 45.2097 41.268 44.101 40.9167 41.3775C40.5965 38.8135 36.5132 35.3236 36.0464 34.9306V34.8917H36.0232H36V34.9306C35.533 35.3236 31.4499 38.8135 31.1333 41.3775Z"
|
|
14
|
+
fill="url(#paint1_linear_5_30)"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M43.2673 45.91C42.5186 47.5046 41.2429 48.7867 39.6587 49.5362C39.6587 49.5362 36.2085 44.7117 36.0386 44.5639V44.5406V44.5639C35.8688 44.7117 32.4224 49.5362 32.4224 49.5362C30.8254 48.7934 29.5365 47.5106 28.7792 45.91C27.6832 43.3578 28.7792 40.0742 28.7792 40.0742C27.8222 40.9534 25.823 45.91 28.0074 49.7775C28.644 50.9108 29.5247 51.8858 30.5848 52.6305C31.6448 53.3753 32.857 53.8708 34.1322 54.0805C34.1322 54.0805 33.395 52.9756 34.0125 51.1587C34.3557 50.1073 35.0716 49.2207 36.0232 48.6687C36.9748 49.2207 37.6907 50.1073 38.034 51.1587C38.6552 52.9756 37.9143 54.0805 37.9143 54.0805C39.1933 53.8718 40.4095 53.3761 41.473 52.6299C42.5364 51.8838 43.4201 50.9063 44.0583 49.7696C46.2235 45.879 44.2244 40.9456 43.2866 40.0663C43.2673 40.0742 44.3827 43.3578 43.2673 45.91Z"
|
|
18
|
+
fill="url(#paint2_linear_5_30)"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M18.7064 30.4135C19.2274 31.2189 25.8191 39.9729 25.8191 39.9729C25.8191 39.9729 27.1042 37.4868 25.9232 36.0005C24.7424 34.5144 21.5507 30.3474 20.9486 29.363C20.4509 28.4918 20.1627 27.515 20.1073 26.5111C20.034 25.6902 19.0767 14.6757 19.0767 14.6757C19.8965 11.6482 21.2001 8.77554 22.9362 6.17063C24.3439 4.00548 25.9018 1.94346 27.5982 0C27.5982 0 23.0403 3.23317 20.4314 7.2717C18.8838 9.64045 17.6645 12.2114 16.8074 14.913C16.8074 14.913 17.4134 24.6125 17.5407 26.5189C17.5809 27.8983 17.9831 29.2421 18.7064 30.4135Z"
|
|
22
|
+
fill="url(#paint3_linear_5_30)"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
d="M19.0923 59.368C19.0923 59.368 19.0923 57.6639 20.1227 54.7848C21.1531 51.9056 24.7539 45.416 24.7539 45.416L25.0279 40.8056L24.3139 39.8095C24.3139 39.8095 19.096 37.7863 16.9811 36.6464C14.8663 35.5064 14.3105 35.1952 14.3105 35.1952C13.5116 33.6583 12.8328 32.0608 12.2805 30.4174C11.1922 27.3555 10.7599 25.9625 10.7599 25.9625C10.5214 22.9704 10.4609 19.9668 10.5785 16.9673C10.7599 11.781 11.0301 10.1158 11.0301 10.1158C11.0301 10.1158 9.72946 12.0067 9.15056 16.4031C8.57166 20.7996 8.44816 26.2622 8.44816 26.2622L11.7054 36.6152C11.7054 36.6152 14.407 38.4827 17.9074 40.4204C19.0234 41.0646 20.2047 41.5863 21.431 41.9767L12.4464 43.3735L3.91342 50.7658C2.51875 53.6073 1.48155 56.6135 0.825943 59.7142C-0.277831 64.9084 0.0540732 70.581 0.0540732 70.581C0.0540732 70.581 1.39713 64.9084 2.99104 59.8194C4.58495 54.7304 5.95501 52.3647 5.95501 52.3647L13.6737 46.3343L19.787 45.7468L15.0708 57.8078C15.0708 57.8078 15.0283 59.3641 15.7037 62.8657C16.3792 66.3673 19.266 75.67 19.266 75.67L26.6296 84L27.3397 83.8715L21.7822 74.6156L19.0923 59.368Z"
|
|
26
|
+
fill="url(#paint4_linear_5_30)"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M52.923 14.6757C52.923 14.6757 51.9659 25.6786 51.8888 26.5111C51.8333 27.515 51.5451 28.4918 51.0475 29.363C50.4492 30.3513 47.2537 34.5105 46.0728 36.0005C44.8918 37.4907 46.1769 39.9729 46.1769 39.9729C46.1769 39.9729 52.7725 31.2189 53.2936 30.4135C54.0144 29.2429 54.4139 27.9002 54.4514 26.5228C54.5826 24.6164 55.1886 14.9169 55.1886 14.9169C54.3296 12.216 53.1105 9.64533 51.5646 7.27559C48.9596 3.23317 44.4017 0 44.4017 0C46.1041 1.94244 47.6672 4.00452 49.0791 6.17063C50.8088 8.7772 52.1069 11.6496 52.923 14.6757Z"
|
|
30
|
+
fill="url(#paint5_linear_5_30)"
|
|
31
|
+
/>
|
|
32
|
+
<path
|
|
33
|
+
d="M71.1821 59.7027C70.5274 56.6015 69.4902 53.5952 68.0945 50.7541L59.5576 43.3617L50.5576 41.9689C51.7828 41.5784 52.9627 41.0566 54.0774 40.4126C57.5932 38.4673 60.2833 36.6075 60.2833 36.6075L63.5366 26.2544C63.5366 26.2544 63.4132 20.8074 62.8343 16.3992C62.2554 11.9911 60.9779 10.1158 60.9779 10.1158C60.9779 10.1158 61.248 11.7771 61.4295 16.9634C61.5448 19.9628 61.4841 22.9665 61.248 25.9586C61.248 25.9586 60.8081 27.3516 59.7313 30.4135C59.179 32.0569 58.5003 33.6544 57.7014 35.1913C57.7014 35.1913 57.1456 35.4986 55.0307 36.6425C52.9158 37.7863 47.6979 39.8056 47.6979 39.8056L46.9839 40.8017L47.2541 45.4121C47.2541 45.4121 50.8664 51.9017 51.8853 54.7808C52.9041 57.66 52.9158 59.3641 52.9158 59.3641L50.2142 74.6117L44.6528 83.8715L45.3629 84L52.7305 75.6778C52.7305 75.6778 55.6134 66.3868 56.2927 62.8735C56.972 59.3603 56.9256 57.8156 56.9256 57.8156L52.2094 45.7544L58.3189 46.3419L66.0375 52.3725C66.0375 52.3725 67.4115 54.738 69.0054 59.8272C70.5993 64.9162 71.9423 70.5888 71.9423 70.5888C71.9423 70.5888 72.2896 64.8967 71.1821 59.7027Z"
|
|
34
|
+
fill="url(#paint6_linear_5_30)"
|
|
35
|
+
/>
|
|
36
|
+
<defs>
|
|
37
|
+
<linearGradient
|
|
38
|
+
id="paint0_linear_5_30"
|
|
39
|
+
x1="36.0232"
|
|
40
|
+
y1="18.9321"
|
|
41
|
+
x2="36.0232"
|
|
42
|
+
y2="38.2845"
|
|
43
|
+
gradientUnits="userSpaceOnUse"
|
|
44
|
+
>
|
|
45
|
+
<stop stop-color="#F6C93C" />
|
|
46
|
+
<stop offset="1" stop-color="#A79F1E" />
|
|
47
|
+
</linearGradient>
|
|
48
|
+
<linearGradient
|
|
49
|
+
id="paint1_linear_5_30"
|
|
50
|
+
x1="36.0264"
|
|
51
|
+
y1="34.8917"
|
|
52
|
+
x2="36.0264"
|
|
53
|
+
y2="45.2097"
|
|
54
|
+
gradientUnits="userSpaceOnUse"
|
|
55
|
+
>
|
|
56
|
+
<stop stop-color="#F6C93C" />
|
|
57
|
+
<stop offset="1" stop-color="#A79F1E" />
|
|
58
|
+
</linearGradient>
|
|
59
|
+
<linearGradient
|
|
60
|
+
id="paint2_linear_5_30"
|
|
61
|
+
x1="36.0264"
|
|
62
|
+
y1="40.0663"
|
|
63
|
+
x2="36.0264"
|
|
64
|
+
y2="54.0805"
|
|
65
|
+
gradientUnits="userSpaceOnUse"
|
|
66
|
+
>
|
|
67
|
+
<stop stop-color="#F6C93C" />
|
|
68
|
+
<stop offset="1" stop-color="#A79F1E" />
|
|
69
|
+
</linearGradient>
|
|
70
|
+
<linearGradient
|
|
71
|
+
id="paint3_linear_5_30"
|
|
72
|
+
x1="22.2029"
|
|
73
|
+
y1="0"
|
|
74
|
+
x2="22.2029"
|
|
75
|
+
y2="39.9729"
|
|
76
|
+
gradientUnits="userSpaceOnUse"
|
|
77
|
+
>
|
|
78
|
+
<stop stop-color="#F6C93C" />
|
|
79
|
+
<stop offset="1" stop-color="#A79F1E" />
|
|
80
|
+
</linearGradient>
|
|
81
|
+
<linearGradient
|
|
82
|
+
id="paint4_linear_5_30"
|
|
83
|
+
x1="13.6735"
|
|
84
|
+
y1="10.1158"
|
|
85
|
+
x2="13.6735"
|
|
86
|
+
y2="84"
|
|
87
|
+
gradientUnits="userSpaceOnUse"
|
|
88
|
+
>
|
|
89
|
+
<stop stop-color="#F6C93C" />
|
|
90
|
+
<stop offset="1" stop-color="#A79F1E" />
|
|
91
|
+
</linearGradient>
|
|
92
|
+
<linearGradient
|
|
93
|
+
id="paint5_linear_5_30"
|
|
94
|
+
x1="49.7951"
|
|
95
|
+
y1="0"
|
|
96
|
+
x2="49.7951"
|
|
97
|
+
y2="39.9729"
|
|
98
|
+
gradientUnits="userSpaceOnUse"
|
|
99
|
+
>
|
|
100
|
+
<stop stop-color="#F6C93C" />
|
|
101
|
+
<stop offset="1" stop-color="#A79F1E" />
|
|
102
|
+
</linearGradient>
|
|
103
|
+
<linearGradient
|
|
104
|
+
id="paint6_linear_5_30"
|
|
105
|
+
x1="58.3234"
|
|
106
|
+
y1="10.1158"
|
|
107
|
+
x2="58.3234"
|
|
108
|
+
y2="84"
|
|
109
|
+
gradientUnits="userSpaceOnUse"
|
|
110
|
+
>
|
|
111
|
+
<stop stop-color="#F6C93C" />
|
|
112
|
+
<stop offset="1" stop-color="#A79F1E" />
|
|
113
|
+
</linearGradient>
|
|
114
|
+
</defs>
|
|
115
|
+
</svg>
|