@letsprogram/ng-oat 0.1.2 → 0.1.3
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 +5 -7
- package/assets/oat/css/utilities.css +4 -0
- package/assets/oat/oat.min.css +16 -0
- package/fesm2022/letsprogram-ng-oat.mjs +714 -74
- package/package.json +1 -1
- package/types/letsprogram-ng-oat.d.ts +202 -32
- package/assets/oat/js/base.js +0 -107
- package/assets/oat/js/dropdown.js +0 -74
- package/assets/oat/js/index.js +0 -12
- package/assets/oat/js/sidebar.js +0 -22
- package/assets/oat/js/tabs.js +0 -94
- package/assets/oat/js/toast.js +0 -144
- package/assets/oat/js/tooltip.js +0 -36
- package/assets/oat/oat.js +0 -342
- package/assets/oat/oat.min.js +0 -267
package/README.md
CHANGED
|
@@ -31,9 +31,9 @@ npm install @letsprogram/ng-oat
|
|
|
31
31
|
|
|
32
32
|
That's it — the Oat CSS framework ships as a bundled asset inside the package.
|
|
33
33
|
|
|
34
|
-
### 2. Add CSS
|
|
34
|
+
### 2. Add Oat CSS to your project
|
|
35
35
|
|
|
36
|
-
Open `angular.json` and add the stylesheet
|
|
36
|
+
Open `angular.json` and add the stylesheet and tokens:
|
|
37
37
|
|
|
38
38
|
```json
|
|
39
39
|
{
|
|
@@ -46,9 +46,6 @@ Open `angular.json` and add the stylesheet, tokens, and script:
|
|
|
46
46
|
"node_modules/@letsprogram/ng-oat/assets/oat/oat.css",
|
|
47
47
|
"node_modules/@letsprogram/ng-oat/src/lib/tokens/tokens.css",
|
|
48
48
|
"src/styles.css"
|
|
49
|
-
],
|
|
50
|
-
"scripts": [
|
|
51
|
-
"node_modules/@letsprogram/ng-oat/assets/oat/oat.js"
|
|
52
49
|
]
|
|
53
50
|
}
|
|
54
51
|
}
|
|
@@ -62,7 +59,8 @@ Open `angular.json` and add the stylesheet, tokens, and script:
|
|
|
62
59
|
|------|---------|
|
|
63
60
|
| `oat.css` | Core Oat CSS framework (typography, colors, layout, all component styles) |
|
|
64
61
|
| `tokens.css` | `--oat-*` design token aliases for runtime theming |
|
|
65
|
-
|
|
62
|
+
|
|
63
|
+
> **No JavaScript required!** All interactive behavior (dropdowns, toasts, sidebars, tabs, tooltips) is handled natively by Angular components — no external JS file needed.
|
|
66
64
|
|
|
67
65
|
> **Alternative:** You can also import the CSS in your `styles.css` instead:
|
|
68
66
|
> ```css
|
|
@@ -73,7 +71,7 @@ Open `angular.json` and add the stylesheet, tokens, and script:
|
|
|
73
71
|
|
|
74
72
|
### 3. Configure the provider
|
|
75
73
|
|
|
76
|
-
Add `provideNgOat()` to your application config. Since CSS
|
|
74
|
+
Add `provideNgOat()` to your application config. Since CSS is already loaded via `angular.json`, the provider only sets up internal injection tokens — no runtime asset loading occurs by default.
|
|
77
75
|
|
|
78
76
|
```typescript
|
|
79
77
|
// src/app/app.config.ts
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
.align-right { text-align: end; }
|
|
5
5
|
.text-light { color: var(--muted-foreground); }
|
|
6
6
|
.text-lighter { color: var(--faint-foreground); }
|
|
7
|
+
.text-center { text-align: center; }
|
|
7
8
|
|
|
8
9
|
.flex { display: flex; }
|
|
9
10
|
.flex-col { flex-direction: column; }
|
|
@@ -45,6 +46,9 @@
|
|
|
45
46
|
.p-4 { padding: var(--space-4); }
|
|
46
47
|
|
|
47
48
|
.w-100 { width: 100%; }
|
|
49
|
+
.w-50 { width: 50%; }
|
|
50
|
+
.w-25 { width: 25%; }
|
|
51
|
+
.w-75 { width: 75%; }
|
|
48
52
|
|
|
49
53
|
:is(ul, ol, a).unstyled {
|
|
50
54
|
list-style: none;
|
package/assets/oat/oat.min.css
CHANGED
|
@@ -1814,6 +1814,10 @@
|
|
|
1814
1814
|
justify-content: flex-end
|
|
1815
1815
|
}
|
|
1816
1816
|
|
|
1817
|
+
.text-center {
|
|
1818
|
+
text-align: center
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1817
1821
|
.hstack {
|
|
1818
1822
|
display: flex;
|
|
1819
1823
|
align-items: center;
|
|
@@ -1877,6 +1881,18 @@
|
|
|
1877
1881
|
width: 100%
|
|
1878
1882
|
}
|
|
1879
1883
|
|
|
1884
|
+
.w-50 {
|
|
1885
|
+
width: 50%
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
.w-75 {
|
|
1889
|
+
width: 75%
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
.w-25 {
|
|
1893
|
+
width: 25%
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1880
1896
|
:is(ul, ol, a).unstyled {
|
|
1881
1897
|
list-style: none;
|
|
1882
1898
|
text-decoration: none;
|