@kksdev/k-ui 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,48 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kelly SOSSOE
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.
22
+
23
+ --------------------------------------------------------------------------------
24
+
25
+ Les tracés d'icônes de ce paquet viennent de Phosphor Icons
26
+ (@phosphor-icons/core), distribué sous la licence suivante :
27
+
28
+ MIT License
29
+
30
+ Copyright (c) 2023 Phosphor Icons
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining a copy
33
+ of this software and associated documentation files (the "Software"), to deal
34
+ in the Software without restriction, including without limitation the rights
35
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
+ copies of the Software, and to permit persons to whom the Software is
37
+ furnished to do so, subject to the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be included in all
40
+ copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
+ SOFTWARE.
@@ -0,0 +1,210 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, computed, effect, input, isDevMode } from "@angular/core";
3
+ const K_ICONS = {
4
+ "note-pencil": {
5
+ regular: [{ d: "M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z" }],
6
+ duotone: [{
7
+ d: "M200,88l-72,72H96V128l72-72Z",
8
+ opacity: .2
9
+ }, { d: "M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z" }]
10
+ },
11
+ "list-checks": {
12
+ regular: [{ d: "M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z" }],
13
+ duotone: [{
14
+ d: "M216,64V192H128V64Z",
15
+ opacity: .2
16
+ }, { d: "M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z" }]
17
+ },
18
+ "clock": {
19
+ regular: [{ d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z" }],
20
+ duotone: [{
21
+ d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",
22
+ opacity: .2
23
+ }, { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z" }]
24
+ },
25
+ "flag": {
26
+ regular: [{ d: "M42.76,50A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,218.76,50c-28,24.23-51.72,12.49-79.21-1.12C111.07,34.76,78.78,18.79,42.76,50ZM216,172.25c-26.79,21.16-49.87,9.74-76.45-3.41-25-12.35-52.81-26.13-83.55-8.4V59.79c26.79-21.16,49.87-9.75,76.45,3.4,25,12.35,52.82,26.13,83.55,8.4Z" }],
27
+ duotone: [{
28
+ d: "M224,56V176c-64,55.43-112-55.43-176,0V56C112,.57,160,111.43,224,56Z",
29
+ opacity: .2
30
+ }, { d: "M42.76,50A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,218.76,50c-28,24.23-51.72,12.49-79.21-1.12C111.07,34.76,78.78,18.79,42.76,50ZM216,172.25c-26.79,21.16-49.87,9.74-76.45-3.41-25-12.35-52.81-26.13-83.55-8.4V59.79c26.79-21.16,49.87-9.75,76.45,3.4,25,12.35,52.82,26.13,83.55,8.4Z" }]
31
+ },
32
+ "chart-bar": {
33
+ regular: [{ d: "M224,200h-8V40a8,8,0,0,0-8-8H152a8,8,0,0,0-8,8V80H96a8,8,0,0,0-8,8v40H48a8,8,0,0,0-8,8v64H32a8,8,0,0,0,0,16H224a8,8,0,0,0,0-16ZM160,48h40V200H160ZM104,96h40V200H104ZM56,144H88v56H56Z" }],
34
+ duotone: [{
35
+ d: "M208,40V208H152V40Z",
36
+ opacity: .2
37
+ }, { d: "M224,200h-8V40a8,8,0,0,0-8-8H152a8,8,0,0,0-8,8V80H96a8,8,0,0,0-8,8v40H48a8,8,0,0,0-8,8v64H32a8,8,0,0,0,0,16H224a8,8,0,0,0,0-16ZM160,48h40V200H160ZM104,96h40V200H104ZM56,144H88v56H56Z" }]
38
+ },
39
+ "house": {
40
+ regular: [{ d: "M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z" }],
41
+ duotone: [{
42
+ d: "M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z",
43
+ opacity: .2
44
+ }, { d: "M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z" }]
45
+ },
46
+ "magnifying-glass": { regular: [{ d: "M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }] },
47
+ "bell": { regular: [{ d: "M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z" }] },
48
+ "funnel": { regular: [{ d: "M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z" }] },
49
+ "plus": { regular: [{ d: "M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z" }] },
50
+ "x": { regular: [{ d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }] },
51
+ "tray": { regular: [{ d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z" }] },
52
+ "user": { regular: [{ d: "M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z" }] },
53
+ "caret-down": { regular: [{ d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" }] },
54
+ "caret-right": { regular: [{ d: "M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" }] },
55
+ "check": { regular: [{ d: "M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z" }] }
56
+ };
57
+ var KIcon = class KIcon {
58
+ constructor() {
59
+ this.name = input.required(...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
60
+ this.weight = input("regular", ...ngDevMode ? [{ debugName: "weight" }] : /* istanbul ignore next */ []);
61
+ this.size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
62
+ this.label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
63
+ this.paths = computed(() => K_ICONS[this.name()]?.[this.weight()], ...ngDevMode ? [{ debugName: "paths" }] : /* istanbul ignore next */ []);
64
+ this.dimension = computed(() => `var(--k-icon-${this.size()})`, ...ngDevMode ? [{ debugName: "dimension" }] : /* istanbul ignore next */ []);
65
+ if (isDevMode()) effect(() => {
66
+ if (!this.paths()) console.error(`k-icon : icône inconnue « ${this.name()} » en graisse ${this.weight()}`);
67
+ });
68
+ }
69
+ static {
70
+ this.ɵfac = i0.ɵɵngDeclareFactory({
71
+ minVersion: "12.0.0",
72
+ version: "22.2.4",
73
+ ngImport: i0,
74
+ type: KIcon,
75
+ deps: [],
76
+ target: i0.ɵɵFactoryTarget.Component
77
+ });
78
+ }
79
+ static {
80
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
81
+ minVersion: "17.0.0",
82
+ version: "22.2.4",
83
+ type: KIcon,
84
+ isStandalone: true,
85
+ selector: "k-icon",
86
+ inputs: {
87
+ name: {
88
+ classPropertyName: "name",
89
+ publicName: "name",
90
+ isSignal: true,
91
+ isRequired: true,
92
+ transformFunction: null
93
+ },
94
+ weight: {
95
+ classPropertyName: "weight",
96
+ publicName: "weight",
97
+ isSignal: true,
98
+ isRequired: false,
99
+ transformFunction: null
100
+ },
101
+ size: {
102
+ classPropertyName: "size",
103
+ publicName: "size",
104
+ isSignal: true,
105
+ isRequired: false,
106
+ transformFunction: null
107
+ },
108
+ label: {
109
+ classPropertyName: "label",
110
+ publicName: "label",
111
+ isSignal: true,
112
+ isRequired: false,
113
+ transformFunction: null
114
+ }
115
+ },
116
+ ngImport: i0,
117
+ template: `
118
+ @if (paths(); as list) {
119
+ <svg
120
+ viewBox="0 0 256 256"
121
+ fill="currentColor"
122
+ [style.width]="dimension()"
123
+ [style.height]="dimension()"
124
+ [attr.aria-hidden]="label() ? null : 'true'"
125
+ [attr.focusable]="label() ? null : 'false'"
126
+ [attr.role]="label() ? 'img' : null"
127
+ [attr.aria-label]="label() || null"
128
+ >
129
+ @for (path of list; track $index) {
130
+ <path [attr.d]="path.d" [attr.opacity]="path.opacity ?? null" />
131
+ }
132
+ </svg>
133
+ }
134
+ `,
135
+ isInline: true,
136
+ styles: [":host{display:inline-flex}\n"],
137
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
138
+ });
139
+ }
140
+ };
141
+ i0.ɵɵngDeclareClassMetadata({
142
+ minVersion: "12.0.0",
143
+ version: "22.2.4",
144
+ ngImport: i0,
145
+ type: KIcon,
146
+ decorators: [{
147
+ type: Component,
148
+ args: [{
149
+ selector: "k-icon",
150
+ changeDetection: ChangeDetectionStrategy.OnPush,
151
+ template: `
152
+ @if (paths(); as list) {
153
+ <svg
154
+ viewBox="0 0 256 256"
155
+ fill="currentColor"
156
+ [style.width]="dimension()"
157
+ [style.height]="dimension()"
158
+ [attr.aria-hidden]="label() ? null : 'true'"
159
+ [attr.focusable]="label() ? null : 'false'"
160
+ [attr.role]="label() ? 'img' : null"
161
+ [attr.aria-label]="label() || null"
162
+ >
163
+ @for (path of list; track $index) {
164
+ <path [attr.d]="path.d" [attr.opacity]="path.opacity ?? null" />
165
+ }
166
+ </svg>
167
+ }
168
+ `,
169
+ styles: [":host{display:inline-flex}\n"]
170
+ }]
171
+ }],
172
+ ctorParameters: () => [],
173
+ propDecorators: {
174
+ name: [{
175
+ type: i0.Input,
176
+ args: [{
177
+ isSignal: true,
178
+ alias: "name",
179
+ required: true
180
+ }]
181
+ }],
182
+ weight: [{
183
+ type: i0.Input,
184
+ args: [{
185
+ isSignal: true,
186
+ alias: "weight",
187
+ required: false
188
+ }]
189
+ }],
190
+ size: [{
191
+ type: i0.Input,
192
+ args: [{
193
+ isSignal: true,
194
+ alias: "size",
195
+ required: false
196
+ }]
197
+ }],
198
+ label: [{
199
+ type: i0.Input,
200
+ args: [{
201
+ isSignal: true,
202
+ alias: "label",
203
+ required: false
204
+ }]
205
+ }]
206
+ }
207
+ });
208
+ export { KIcon };
209
+
210
+ //# sourceMappingURL=kksdev-k-ui.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kksdev-k-ui.mjs","names":[],"sources":["../../../projects/k-ui/src/lib/k-icon/icons.generated.ts","../../../projects/k-ui/src/lib/k-icon/k-icon.ts"],"sourcesContent":["// Généré par scripts/icons.mjs depuis icons.json. Ne pas éditer.\n// Tracés : Phosphor Icons (@phosphor-icons/core 2.1.1), licence MIT, Copyright (c) 2023 Phosphor Icons.\n\nexport type KIconName =\n | 'note-pencil'\n | 'list-checks'\n | 'clock'\n | 'flag'\n | 'chart-bar'\n | 'house'\n | 'magnifying-glass'\n | 'bell'\n | 'funnel'\n | 'plus'\n | 'x'\n | 'tray'\n | 'user'\n | 'caret-down'\n | 'caret-right'\n | 'check';\n\nexport type KIconWeight = 'regular' | 'duotone';\n\nexport interface KIconPath {\n readonly d: string;\n readonly opacity?: number;\n}\n\nexport const K_ICONS: Readonly<Record<KIconName, Partial<Readonly<Record<KIconWeight, readonly KIconPath[]>>>>> = {\n 'note-pencil': {\n regular: [{ d: 'M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z' }],\n duotone: [{ d: 'M200,88l-72,72H96V128l72-72Z', opacity: 0.2 }, { d: 'M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z' }],\n },\n 'list-checks': {\n regular: [{ d: 'M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z' }],\n duotone: [{ d: 'M216,64V192H128V64Z', opacity: 0.2 }, { d: 'M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z' }],\n },\n 'clock': {\n regular: [{ d: 'M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z' }],\n duotone: [{ d: 'M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z', opacity: 0.2 }, { d: 'M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z' }],\n },\n 'flag': {\n regular: [{ d: 'M42.76,50A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,218.76,50c-28,24.23-51.72,12.49-79.21-1.12C111.07,34.76,78.78,18.79,42.76,50ZM216,172.25c-26.79,21.16-49.87,9.74-76.45-3.41-25-12.35-52.81-26.13-83.55-8.4V59.79c26.79-21.16,49.87-9.75,76.45,3.4,25,12.35,52.82,26.13,83.55,8.4Z' }],\n duotone: [{ d: 'M224,56V176c-64,55.43-112-55.43-176,0V56C112,.57,160,111.43,224,56Z', opacity: 0.2 }, { d: 'M42.76,50A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,218.76,50c-28,24.23-51.72,12.49-79.21-1.12C111.07,34.76,78.78,18.79,42.76,50ZM216,172.25c-26.79,21.16-49.87,9.74-76.45-3.41-25-12.35-52.81-26.13-83.55-8.4V59.79c26.79-21.16,49.87-9.75,76.45,3.4,25,12.35,52.82,26.13,83.55,8.4Z' }],\n },\n 'chart-bar': {\n regular: [{ d: 'M224,200h-8V40a8,8,0,0,0-8-8H152a8,8,0,0,0-8,8V80H96a8,8,0,0,0-8,8v40H48a8,8,0,0,0-8,8v64H32a8,8,0,0,0,0,16H224a8,8,0,0,0,0-16ZM160,48h40V200H160ZM104,96h40V200H104ZM56,144H88v56H56Z' }],\n duotone: [{ d: 'M208,40V208H152V40Z', opacity: 0.2 }, { d: 'M224,200h-8V40a8,8,0,0,0-8-8H152a8,8,0,0,0-8,8V80H96a8,8,0,0,0-8,8v40H48a8,8,0,0,0-8,8v64H32a8,8,0,0,0,0,16H224a8,8,0,0,0,0-16ZM160,48h40V200H160ZM104,96h40V200H104ZM56,144H88v56H56Z' }],\n },\n 'house': {\n regular: [{ d: 'M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z' }],\n duotone: [{ d: 'M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z', opacity: 0.2 }, { d: 'M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z' }],\n },\n 'magnifying-glass': {\n regular: [{ d: 'M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z' }],\n },\n 'bell': {\n regular: [{ d: 'M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z' }],\n },\n 'funnel': {\n regular: [{ d: 'M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z' }],\n },\n 'plus': {\n regular: [{ d: 'M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z' }],\n },\n 'x': {\n regular: [{ d: 'M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z' }],\n },\n 'tray': {\n regular: [{ d: 'M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z' }],\n },\n 'user': {\n regular: [{ d: 'M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z' }],\n },\n 'caret-down': {\n regular: [{ d: 'M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z' }],\n },\n 'caret-right': {\n regular: [{ d: 'M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z' }],\n },\n 'check': {\n regular: [{ d: 'M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z' }],\n },\n};\n","import { ChangeDetectionStrategy, Component, computed, effect, input, isDevMode } from '@angular/core';\n\nimport { K_ICONS, type KIconName, type KIconWeight } from './icons.generated';\n\nexport type KIconSize = 'xs' | 'sm' | 'md' | 'lg';\n\n// Icône Phosphor en SVG en ligne (G2, D28). Les tracés passent par [attr.d], jamais par innerHTML :\n// le sanitizer d'Angular retirerait le SVG. La taille vient des tokens k-icon-* chargés par l'app (D27).\n@Component({\n selector: 'k-icon',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (paths(); as list) {\n <svg\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n [style.width]=\"dimension()\"\n [style.height]=\"dimension()\"\n [attr.aria-hidden]=\"label() ? null : 'true'\"\n [attr.focusable]=\"label() ? null : 'false'\"\n [attr.role]=\"label() ? 'img' : null\"\n [attr.aria-label]=\"label() || null\"\n >\n @for (path of list; track $index) {\n <path [attr.d]=\"path.d\" [attr.opacity]=\"path.opacity ?? null\" />\n }\n </svg>\n }\n `,\n styles: `\n :host {\n display: inline-flex;\n }\n `,\n})\nexport class KIcon {\n readonly name = input.required<KIconName>();\n readonly weight = input<KIconWeight>('regular');\n readonly size = input<KIconSize>('md');\n readonly label = input<string>();\n\n protected readonly paths = computed(() => K_ICONS[this.name()]?.[this.weight()]);\n protected readonly dimension = computed(() => `var(--k-icon-${this.size()})`);\n\n constructor() {\n if (isDevMode()) {\n effect(() => {\n if (!this.paths()) console.error(`k-icon : icône inconnue « ${this.name()} » en graisse ${this.weight()}`);\n });\n }\n }\n}\n"],"mappings":";;AA4BA,MAAa,UAAqG;CAChH,eAAe;EACb,SAAS,CAAC,EAAE,GAAG,+UAA8U,CAAE;EAC/V,SAAS,CAAC;GAAE,GAAG;GAAgC,SAAS;EAAG,GAAI,EAAE,GAAG,+UAA8U,CAA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AA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,QAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,MAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,OAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,UAAA;GAAA,UAxBN;;;;;;;;;;;;;;;;;;GAiBT,UAAA;GAAA,QAAA,CAAA,8BAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAOU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAK,YAAA,CAAA;EA3BjB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAQ,iBACD,wBAAwB;GAAM,UACrC;;;;;;;;;;;;;;;;;;GAiBT,QAAA,CAAA,8BAAA;EAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "@kksdev/k-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "description": "Composants Angular du noyau K Design",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/sopequenoteck/k-design.git",
9
+ "directory": "angular/projects/k-ui"
10
+ },
11
+ "peerDependencies": {
12
+ "@angular/common": "~22.2",
13
+ "@angular/core": "~22.2"
14
+ },
15
+ "sideEffects": false,
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "module": "fesm2022/kksdev-k-ui.mjs",
20
+ "typings": "types/kksdev-k-ui.d.ts",
21
+ "exports": {
22
+ "./package.json": {
23
+ "default": "./package.json"
24
+ },
25
+ ".": {
26
+ "types": "./types/kksdev-k-ui.d.ts",
27
+ "default": "./fesm2022/kksdev-k-ui.mjs"
28
+ }
29
+ },
30
+ "type": "module",
31
+ "dependencies": {
32
+ "tslib": "^2.3.0"
33
+ }
34
+ }
@@ -0,0 +1,41 @@
1
+ import * as i0 from "@angular/core";
2
+ type KIconName = 'note-pencil' | 'list-checks' | 'clock' | 'flag' | 'chart-bar' | 'house' | 'magnifying-glass' | 'bell' | 'funnel' | 'plus' | 'x' | 'tray' | 'user' | 'caret-down' | 'caret-right' | 'check';
3
+ type KIconWeight = 'regular' | 'duotone';
4
+ interface KIconPath {
5
+ readonly d: string;
6
+ readonly opacity?: number;
7
+ }
8
+ type KIconSize = 'xs' | 'sm' | 'md' | 'lg';
9
+ export declare class KIcon {
10
+ readonly name: import("@angular/core").InputSignal<KIconName>;
11
+ readonly weight: import("@angular/core").InputSignal<KIconWeight>;
12
+ readonly size: import("@angular/core").InputSignal<KIconSize>;
13
+ readonly label: import("@angular/core").InputSignal<string | undefined>;
14
+ protected readonly paths: import("@angular/core").Signal<readonly KIconPath[] | undefined>;
15
+ protected readonly dimension: import("@angular/core").Signal<string>;
16
+ constructor();
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<KIcon, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<KIcon, "k-icon", never, {
19
+ "name": {
20
+ "alias": "name";
21
+ "required": true;
22
+ "isSignal": true;
23
+ };
24
+ "weight": {
25
+ "alias": "weight";
26
+ "required": false;
27
+ "isSignal": true;
28
+ };
29
+ "size": {
30
+ "alias": "size";
31
+ "required": false;
32
+ "isSignal": true;
33
+ };
34
+ "label": {
35
+ "alias": "label";
36
+ "required": false;
37
+ "isSignal": true;
38
+ };
39
+ }, {}, never, never, true, never>;
40
+ }
41
+ export type { KIconName, KIconSize, KIconWeight };
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.