@phila/phila-ui-core 3.0.0-beta.6 → 3.0.0-beta.8

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/NOTICE.md ADDED
@@ -0,0 +1,30 @@
1
+ # Third-party icon attribution
2
+
3
+ The `@phila/phila-ui-core` package bundles icon glyphs from third-party sources.
4
+ This file provides the attribution required by their licenses.
5
+
6
+ ## Font Awesome Free
7
+
8
+ All icons are sourced from [Font Awesome Free](https://fontawesome.com).
9
+
10
+ - **Icons:** licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
11
+ - **Copyright:** © Fonticons, Inc.
12
+
13
+ Icons are delivered two ways:
14
+
15
+ - **Vue components** — SVG files in `src/icons/svg/` are compiled to Vue functional
16
+ components by `vite-svg-loader` and exported from the `@phila/phila-ui-core/icons`
17
+ entry point. Use these with the `<Icon>` component or directly as `<component :is="...">`.
18
+ - **CSS sidecar** — the same SVGs are also encoded into `dist/phila-icons.css`
19
+ (exported as `@phila/phila-ui-core/icons.css`) as `.phila-icon-<name>` CSS mask
20
+ classes. Use these in non-Vue contexts as a drop-in for `<i class="fas fa-...">` markup.
21
+ The base class is `.phila-icon`; individual icons are `.phila-icon-<name>`.
22
+
23
+ The source SVG files in `src/icons/svg/` retain the original Font Awesome license
24
+ header comment for traceability.
25
+
26
+ ## Modifications
27
+
28
+ Icons may be normalized for inclusion in this library: redundant `width`,
29
+ `height`, `id`, and `<desc>` attributes are stripped; `fill` is forced to
30
+ `currentColor` where needed so glyphs inherit text color.
package/README.md CHANGED
@@ -32,83 +32,37 @@ npm install @phila/phila-ui-core
32
32
 
33
33
  ### Icons
34
34
 
35
- The Phila UI design system uses [FontAwesome Pro](https://fontawesome.com/) for icons. Some components are bundled with static icons (FontAwesome Pro, version 7.0.1). To use additional icons throughout your application, you need to install FontAwesome and set the required NPM tokens in your environment.
35
+ The Phila UI design system uses bundled SVG icons sourced from [Font Awesome Free](https://fontawesome.com) (CC BY 4.0). All icons are embedded directly in the package no external icon font or auth token required.
36
36
 
37
- ```bash
38
- pnpm install @fortawesome/fontawesome-pro
39
- ```
37
+ #### Using icons in components
40
38
 
41
- In a Vue project, you can import the CSS in your main entry file:
42
-
43
- ```typescript
44
- import "@fortawesome/fontawesome-pro/css/fontawesome.min.css";
45
- import "@fortawesome/fontawesome-pro/css/solid.min.css";
46
- ```
47
-
48
- If using nuxt, add the following to your `nuxt.config.ts`:
49
-
50
- ```typescript
51
- import { defineNuxtConfig } from "nuxt";
52
-
53
- export default defineNuxtConfig({
54
- css: ["@fortawesome/fontawesome-pro/css/fontawesome.min.css", "@fortawesome/fontawesome-pro/css/solid.min.css"],
55
- });
56
- ```
57
-
58
- In your project folder, create a `.npmrc` file with the following content:
59
-
60
- ```
61
- @fortawesome:registry=https://npm.fontawesome.com/
62
- //npm.fontawesome.com/:_authToken=${NPM_FONTAWESOME_SECRET}
63
- ```
64
-
65
- ### Building components with icons
66
-
67
- When building a component that uses a specific icon, you need to import the icon from the FontAwesome svg package and set it as a prop to the FontAwesome vue component.
68
-
69
- ```bash
70
- pnpm install --save-dev @fortawesome/fontawesome-svg-core @fortawesome/pro-regular-svg-icons @fortawesome/vue-fontawesome
71
- ```
39
+ Import named icon components from `@phila/phila-ui-core/icons` and pass them to the `Icon` component via the `icon` prop:
72
40
 
73
41
  ```vue
74
- <script lang="ts" setup>
75
- import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
76
- import { faUser } from "@fortawesome/pro-solid-svg-icons";
42
+ <script setup lang="ts">
43
+ import { Icon } from "@phila/phila-ui-core";
44
+ import { IconMagnifyingGlass, IconArrowRight } from "@phila/phila-ui-core/icons";
77
45
  </script>
46
+
78
47
  <template>
79
- ...
80
- <FontAwesomeIcon :icon="faUser" />
81
- ...
48
+ <Icon :icon="IconMagnifyingGlass" aria-label="Search" />
49
+ <Icon :icon="IconArrowRight" decorative />
82
50
  </template>
83
51
  ```
84
52
 
85
- Additionally, you will need to configure vite.config.ts to treat the FontAwesome packages as external dependencies:
86
-
87
- In packages/your-component/vite.config.ts:
53
+ When building a component that uses icons, add `@phila/phila-ui-core/icons` to your `vite.config.ts` externals:
88
54
 
89
55
  ```typescript
90
- export default defineConfig({
91
- ...
92
- build: {
93
- ...
94
- rollupOptions: {
95
- external: ["other dependencies...", "@fortawesome/vue-fontawesome"],
96
- ...
97
- },
98
- ...
99
- },
100
- });
56
+ rollupOptions: {
57
+ external: ["vue", "@phila/phila-ui-core", "@phila/phila-ui-core/icons"],
58
+ }
101
59
  ```
102
60
 
103
- And add vue-fontawesome as a peer dependency in your component's package.json:
61
+ #### Adding new icons
104
62
 
105
- ```json
106
- "peerDependencies": {
107
- ...
108
- "@fortawesome/vue-fontawesome": "^3.1.2",
109
- ...
110
- }
111
- ```
63
+ 1. Copy the SVG into `packages/core/src/icons/svg/<name>.svg` (follow Font Awesome's filename conventions, e.g. `arrow-right.svg`).
64
+ 2. Run `pnpm --filter @phila/phila-ui-core build` — the icon index and CSS sidecar regenerate automatically.
65
+ 3. Import the new export: `import { Icon<PascalCase> } from "@phila/phila-ui-core/icons"`.
112
66
 
113
67
  ### Phila UI Core Styles (Light mode):
114
68
 
@@ -0,0 +1,371 @@
1
+ import { FunctionalComponent } from 'vue';
2
+ import { SVGAttributes } from 'vue';
3
+
4
+ export declare const IconAdd: IconComponent;
5
+
6
+ export declare const IconAmbulance: IconComponent;
7
+
8
+ export declare const IconAndroid: IconComponent;
9
+
10
+ export declare const IconApple: IconComponent;
11
+
12
+ export declare const IconArrowDown: IconComponent;
13
+
14
+ export declare const IconArrowLeft: IconComponent;
15
+
16
+ export declare const IconArrowRight: IconComponent;
17
+
18
+ export declare const IconArrowUp: IconComponent;
19
+
20
+ export declare const IconArrowUpFromGroundWater: IconComponent;
21
+
22
+ export declare const IconAt: IconComponent;
23
+
24
+ export declare const IconBaby: IconComponent;
25
+
26
+ export declare const IconBackwardFast: IconComponent;
27
+
28
+ export declare const IconBackwardStep: IconComponent;
29
+
30
+ export declare const IconBan: IconComponent;
31
+
32
+ export declare const IconBars: IconComponent;
33
+
34
+ export declare const IconBed: IconComponent;
35
+
36
+ export declare const IconBell: IconComponent;
37
+
38
+ export declare const IconBook: IconComponent;
39
+
40
+ export declare const IconBookOpen: IconComponent;
41
+
42
+ export declare const IconBookOpenReader: IconComponent;
43
+
44
+ export declare const IconBoxArchive: IconComponent;
45
+
46
+ export declare const IconBriefcase: IconComponent;
47
+
48
+ export declare const IconBuilding: IconComponent;
49
+
50
+ export declare const IconBuildingColumns: IconComponent;
51
+
52
+ export declare const IconBuildingUser: IconComponent;
53
+
54
+ export declare const IconBullhorn: IconComponent;
55
+
56
+ export declare const IconBus: IconComponent;
57
+
58
+ export declare const IconCalculator: IconComponent;
59
+
60
+ export declare const IconCalendar: IconComponent;
61
+
62
+ export declare const IconCalendarCheck: IconComponent;
63
+
64
+ export declare const IconCalendarDays: IconComponent;
65
+
66
+ export declare const IconCalendarPlus: IconComponent;
67
+
68
+ export declare const IconCalendarWeek: IconComponent;
69
+
70
+ export declare const IconCamera: IconComponent;
71
+
72
+ export declare const IconCar: IconComponent;
73
+
74
+ export declare const IconCaretDown: IconComponent;
75
+
76
+ export declare const IconCaretLeft: IconComponent;
77
+
78
+ export declare const IconCaretRight: IconComponent;
79
+
80
+ export declare const IconCaretUp: IconComponent;
81
+
82
+ export declare const IconCertificate: IconComponent;
83
+
84
+ export declare const IconChalkboardUser: IconComponent;
85
+
86
+ export declare const IconChartPie: IconComponent;
87
+
88
+ export declare const IconCheck: IconComponent;
89
+
90
+ export declare const IconChevronDown: IconComponent;
91
+
92
+ export declare const IconChevronLeft: IconComponent;
93
+
94
+ export declare const IconChevronRight: IconComponent;
95
+
96
+ export declare const IconChevronUp: IconComponent;
97
+
98
+ export declare const IconCircleCheck: IconComponent;
99
+
100
+ export declare const IconCircleDollarToSlot: IconComponent;
101
+
102
+ export declare const IconCircleExclamation: IconComponent;
103
+
104
+ export declare const IconCircleInfo: IconComponent;
105
+
106
+ export declare const IconCircleQuestion: IconComponent;
107
+
108
+ export declare const IconCircleRadiation: IconComponent;
109
+
110
+ export declare const IconClipboard: IconComponent;
111
+
112
+ export declare const IconClock: IconComponent;
113
+
114
+ export declare const IconClose: IconComponent;
115
+
116
+ export declare const IconCloudRain: IconComponent;
117
+
118
+ export declare const IconCloudShowersHeavy: IconComponent;
119
+
120
+ export declare const IconCommentDots: IconComponent;
121
+
122
+ export declare const IconComments: IconComponent;
123
+
124
+ export declare const IconCommentsDollar: IconComponent;
125
+
126
+ export declare const IconCompass: IconComponent;
127
+
128
+ /** An SVG icon rendered as a Vue functional component. */
129
+ export declare type IconComponent = FunctionalComponent<SVGAttributes>;
130
+
131
+ export declare const IconCopy: IconComponent;
132
+
133
+ export declare const IconCreditCard: IconComponent;
134
+
135
+ export declare const IconDesktop: IconComponent;
136
+
137
+ export declare const IconDollarSign: IconComponent;
138
+
139
+ export declare const IconDownload: IconComponent;
140
+
141
+ export declare const IconDroplet: IconComponent;
142
+
143
+ export declare const IconEarthAmericas: IconComponent;
144
+
145
+ export declare const IconEnvelope: IconComponent;
146
+
147
+ export declare const IconEnvelopeOpenText: IconComponent;
148
+
149
+ export declare const IconFacebook: IconComponent;
150
+
151
+ export declare const IconFile: IconComponent;
152
+
153
+ export declare const IconFileArrowUp: IconComponent;
154
+
155
+ export declare const IconFileContract: IconComponent;
156
+
157
+ export declare const IconFileExport: IconComponent;
158
+
159
+ export declare const IconFileImage: IconComponent;
160
+
161
+ export declare const IconFileInvoiceDollar: IconComponent;
162
+
163
+ export declare const IconFileLines: IconComponent;
164
+
165
+ export declare const IconFire: IconComponent;
166
+
167
+ export declare const IconFireExtinguisher: IconComponent;
168
+
169
+ export declare const IconFlag: IconComponent;
170
+
171
+ export declare const IconFlickr: IconComponent;
172
+
173
+ export declare const IconFolder: IconComponent;
174
+
175
+ export declare const IconFolderOpen: IconComponent;
176
+
177
+ export declare const IconForwardFast: IconComponent;
178
+
179
+ export declare const IconForwardStep: IconComponent;
180
+
181
+ export declare const IconGauge: IconComponent;
182
+
183
+ export declare const IconGavel: IconComponent;
184
+
185
+ export declare const IconGear: IconComponent;
186
+
187
+ export declare const IconGears: IconComponent;
188
+
189
+ export declare const IconGithub: IconComponent;
190
+
191
+ export declare const IconGlobe: IconComponent;
192
+
193
+ export declare const IconHandHoldingHeart: IconComponent;
194
+
195
+ export declare const IconHandshake: IconComponent;
196
+
197
+ export declare const IconHandshakeAngle: IconComponent;
198
+
199
+ export declare const IconHeart: IconComponent;
200
+
201
+ export declare const IconHeartPulse: IconComponent;
202
+
203
+ export declare const IconHourglass: IconComponent;
204
+
205
+ export declare const IconHouse: IconComponent;
206
+
207
+ export declare const IconHouseCrack: IconComponent;
208
+
209
+ export declare const IconHouseFloodWater: IconComponent;
210
+
211
+ export declare const IconHouseSignal: IconComponent;
212
+
213
+ export declare const IconIdBadge: IconComponent;
214
+
215
+ export declare const IconImage: IconComponent;
216
+
217
+ export declare const IconInstagram: IconComponent;
218
+
219
+ export declare const IconLandmark: IconComponent;
220
+
221
+ export declare const IconLanguage: IconComponent;
222
+
223
+ export declare const IconLayerGroup: IconComponent;
224
+
225
+ export declare const IconLeaf: IconComponent;
226
+
227
+ export declare const IconLifeRing: IconComponent;
228
+
229
+ export declare const IconLightbulb: IconComponent;
230
+
231
+ export declare const IconLink: IconComponent;
232
+
233
+ export declare const IconLinkedinIn: IconComponent;
234
+
235
+ export declare const IconList: IconComponent;
236
+
237
+ export declare const IconListCheck: IconComponent;
238
+
239
+ export declare const IconLocationArrow: IconComponent;
240
+
241
+ export declare const IconLocationCrosshairs: IconComponent;
242
+
243
+ export declare const IconLocationDot: IconComponent;
244
+
245
+ export declare const IconLocationPin: IconComponent;
246
+
247
+ export declare const IconLock: IconComponent;
248
+
249
+ export declare const IconMagnifyingGlass: IconComponent;
250
+
251
+ export declare const IconMagnifyingGlassLocation: IconComponent;
252
+
253
+ export declare const IconMagnifyingGlassPlus: IconComponent;
254
+
255
+ export declare const IconMap: IconComponent;
256
+
257
+ export declare const IconMapLocationDot: IconComponent;
258
+
259
+ export declare const IconMicrophone: IconComponent;
260
+
261
+ export declare const IconMinus: IconComponent;
262
+
263
+ export declare const IconMobileScreenButton: IconComponent;
264
+
265
+ export declare const IconMoneyBillWave: IconComponent;
266
+
267
+ export declare const IconMoneyCheckDollar: IconComponent;
268
+
269
+ export declare const IconNewspaper: IconComponent;
270
+
271
+ export declare const IconPaintRoller: IconComponent;
272
+
273
+ export declare const IconPalette: IconComponent;
274
+
275
+ export declare const IconPaste: IconComponent;
276
+
277
+ export declare const IconPause: IconComponent;
278
+
279
+ export declare const IconPencil: IconComponent;
280
+
281
+ export declare const IconPercent: IconComponent;
282
+
283
+ export declare const IconPerson: IconComponent;
284
+
285
+ export declare const IconPersonMilitaryPointing: IconComponent;
286
+
287
+ export declare const IconPersonWalking: IconComponent;
288
+
289
+ export declare const IconPhone: IconComponent;
290
+
291
+ export declare const IconPlay: IconComponent;
292
+
293
+ export declare const IconPrescriptionBottleMedical: IconComponent;
294
+
295
+ export declare const IconPrint: IconComponent;
296
+
297
+ export declare const IconQuestion: IconComponent;
298
+
299
+ export declare const IconRecycle: IconComponent;
300
+
301
+ export declare const IconRoad: IconComponent;
302
+
303
+ export declare const IconRotateRight: IconComponent;
304
+
305
+ export declare const IconScaleBalanced: IconComponent;
306
+
307
+ export declare const IconSchool: IconComponent;
308
+
309
+ export declare const IconScroll: IconComponent;
310
+
311
+ export declare const IconSection: IconComponent;
312
+
313
+ export declare const IconShareNodes: IconComponent;
314
+
315
+ export declare const IconShield: IconComponent;
316
+
317
+ export declare const IconShirt: IconComponent;
318
+
319
+ export declare const IconSliders: IconComponent;
320
+
321
+ export declare const IconSnowflake: IconComponent;
322
+
323
+ export declare const IconSoccerBall: IconComponent;
324
+
325
+ export declare const IconSort: IconComponent;
326
+
327
+ export declare const IconSprayCan: IconComponent;
328
+
329
+ export declare const IconSquareCheck: IconComponent;
330
+
331
+ export declare const IconStar: IconComponent;
332
+
333
+ export declare const IconStreetView: IconComponent;
334
+
335
+ export declare const IconSuitcaseMedical: IconComponent;
336
+
337
+ export declare const IconTemperatureFull: IconComponent;
338
+
339
+ export declare const IconThumbtack: IconComponent;
340
+
341
+ export declare const IconTrashCan: IconComponent;
342
+
343
+ export declare const IconTree: IconComponent;
344
+
345
+ export declare const IconTriangleExclamation: IconComponent;
346
+
347
+ export declare const IconUpRightFromSquare: IconComponent;
348
+
349
+ export declare const IconUser: IconComponent;
350
+
351
+ export declare const IconUsers: IconComponent;
352
+
353
+ export declare const IconUserSlash: IconComponent;
354
+
355
+ export declare const IconUtensils: IconComponent;
356
+
357
+ export declare const IconVideo: IconComponent;
358
+
359
+ export declare const IconWater: IconComponent;
360
+
361
+ export declare const IconWheelchair: IconComponent;
362
+
363
+ export declare const IconWifi: IconComponent;
364
+
365
+ export declare const IconWrench: IconComponent;
366
+
367
+ export declare const IconXTwitter: IconComponent;
368
+
369
+ export declare const IconYoutube: IconComponent;
370
+
371
+ export { }