@tacdaed/fragments 1.0.0-beta.0 → 1.0.0-beta.10

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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Fragments Library
2
2
 
3
- A reusable Angular library for UI fragments, code highlighting, and more.
3
+ A reusable Angular library for UI fragments, code highlighting, and more. For usage, check here:
4
+ [Usage-Fragments](https://usage-fragments.vercel.app/)
4
5
 
5
6
  ## Features
6
7
 
@@ -13,40 +14,43 @@ A reusable Angular library for UI fragments, code highlighting, and more.
13
14
  Install the library in your Angular project:
14
15
 
15
16
  ```sh
16
- npm install fragments
17
+ npm install @tacdaed/fragments
17
18
  ```
18
19
 
19
20
  ## Setup
20
21
 
21
- ### 1. Import Library Module
22
-
23
- Import the library module in your app module:
24
-
25
- ```ts
26
- import { FragmentsModule } from 'fragments';
27
-
28
- @NgModule({
29
- imports: [
30
- FragmentsModule,
31
- // ...other modules
32
- ],
33
- })
34
- export class AppModule {}
35
- ```
36
-
37
- ### 2. Add Styles to `angular.json`
22
+ ### Add Styles to `angular.json`
38
23
 
39
24
  To enable syntax highlighting, you must import a Highlight.js theme in your app’s `angular.json`:
40
25
 
41
26
  ```json
42
27
  "styles": [
43
- "node_modules/fragments/assets/styles/scss/highlight.js/github-dark.scss",
44
- "node_modules/fragments/assets/styles/scss/style.scss",
45
- "node_modules/fragments/assets/font-awesome/css/all.min.css",
28
+ "node_modules/highlight.js/styles/github-dark.css",
29
+ "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
30
+ "node_modules/@tacdaed/fragments/assets/styles/scss/style.scss",
46
31
  "src/styles.scss"
47
32
  ]
48
33
  ```
49
34
 
35
+ ### Fonts (Optional)
36
+
37
+ The library does not include font files to keep the package lightweight.
38
+ To use Roboto or Open Sans fonts in your app, you need to import them manually.
39
+
40
+ You can use Google Fonts by adding the following to your index.html or a global SCSS file:
41
+
42
+ ```html
43
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;400;500;700;900&family=Open+Sans:ital,wght@0,400;1,400&display=swap">
44
+ ```
45
+ Or install fonts via npm:
46
+ ```bash
47
+ npm install @fontsource/roboto @fontsource/open-sans
48
+ ```
49
+ Then import them in your `styles.scss`:
50
+ ```scss
51
+ @import "@fontsource/roboto/index.css";
52
+ @import "@fontsource/open-sans/index.css";
53
+ ```
50
54
  #### Choosing a Highlight.js Theme
51
55
 
52
56
  You can choose any theme from:
@@ -1,5 +1,5 @@
1
- @use './fonts';
2
1
  @use './variables';
3
2
  @use './functions';
3
+ @use './utilities';
4
4
  @use './directives/badge';
5
5
  @use './directives/tooltip';
@@ -0,0 +1,12 @@
1
+ .frg-visually-hidden {
2
+ position: absolute !important;
3
+ width: 1px !important;
4
+ height: 1px !important;
5
+ padding: 0 !important;
6
+ margin: -1px !important;
7
+ overflow: hidden !important;
8
+ clip: rect(0, 0, 0, 0) !important;
9
+ clip-path: inset(50%) !important;
10
+ border: 0 !important;
11
+ white-space: nowrap !important;
12
+ }