ngx-pk-ui 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/README.md +74 -0
- package/fesm2022/ngx-pk-ui.mjs +3117 -0
- package/fesm2022/ngx-pk-ui.mjs.map +1 -0
- package/package.json +25 -0
- package/styles/fonts/material-symbols/.gitkeep +0 -0
- package/styles/pk-badge.css +129 -0
- package/styles/pk-btn.css +279 -0
- package/styles/pk-card.css +160 -0
- package/styles/pk-grid.css +164 -0
- package/styles/pk-icon-font.css +67 -0
- package/styles/pk-spinner.css +96 -0
- package/styles/pk-ui.css +18 -0
- package/types/ngx-pk-ui.d.ts +665 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pk-grid — 12-column responsive grid for ngx-pk-ui
|
|
3
|
+
*
|
|
4
|
+
* Breakpoints (mobile-first):
|
|
5
|
+
* xs < 576px
|
|
6
|
+
* sm ≥ 576px
|
|
7
|
+
* md ≥ 768px
|
|
8
|
+
* lg ≥ 992px
|
|
9
|
+
* xl ≥ 1200px
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* <div class="pk-row">
|
|
13
|
+
* <div class="pk-col-12 pk-col-md-6 pk-col-lg-4">...</div>
|
|
14
|
+
* </div>
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/* ─── Row ─────────────────────────────────────────────────────────── */
|
|
18
|
+
|
|
19
|
+
.pk-row {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-wrap: wrap;
|
|
22
|
+
margin-left: -8px;
|
|
23
|
+
margin-right: -8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pk-row--gap-0 { margin-left: 0; margin-right: 0; }
|
|
27
|
+
.pk-row--gap-sm { margin-left: -4px; margin-right: -4px; }
|
|
28
|
+
.pk-row--gap-lg { margin-left: -16px; margin-right: -16px; }
|
|
29
|
+
|
|
30
|
+
/* ─── Base col ────────────────────────────────────────────────────── */
|
|
31
|
+
|
|
32
|
+
[class*="pk-col"] {
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
padding-left: 8px;
|
|
35
|
+
padding-right: 8px;
|
|
36
|
+
min-width: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pk-row--gap-0 > [class*="pk-col"] { padding-left: 0; padding-right: 0; }
|
|
40
|
+
.pk-row--gap-sm > [class*="pk-col"] { padding-left: 4px; padding-right: 4px; }
|
|
41
|
+
.pk-row--gap-lg > [class*="pk-col"] { padding-left: 16px; padding-right: 16px; }
|
|
42
|
+
|
|
43
|
+
/* Auto column */
|
|
44
|
+
.pk-col { flex: 1 0 0%; }
|
|
45
|
+
.pk-col-auto { flex: 0 0 auto; width: auto; }
|
|
46
|
+
|
|
47
|
+
/* ─── Fixed columns (always applied, all breakpoints) ────────────── */
|
|
48
|
+
|
|
49
|
+
.pk-col-1 { flex: 0 0 auto; width: 8.3333%; }
|
|
50
|
+
.pk-col-2 { flex: 0 0 auto; width: 16.6667%; }
|
|
51
|
+
.pk-col-3 { flex: 0 0 auto; width: 25%; }
|
|
52
|
+
.pk-col-4 { flex: 0 0 auto; width: 33.3333%; }
|
|
53
|
+
.pk-col-5 { flex: 0 0 auto; width: 41.6667%; }
|
|
54
|
+
.pk-col-6 { flex: 0 0 auto; width: 50%; }
|
|
55
|
+
.pk-col-7 { flex: 0 0 auto; width: 58.3333%; }
|
|
56
|
+
.pk-col-8 { flex: 0 0 auto; width: 66.6667%; }
|
|
57
|
+
.pk-col-9 { flex: 0 0 auto; width: 75%; }
|
|
58
|
+
.pk-col-10 { flex: 0 0 auto; width: 83.3333%; }
|
|
59
|
+
.pk-col-11 { flex: 0 0 auto; width: 91.6667%; }
|
|
60
|
+
.pk-col-12 { flex: 0 0 auto; width: 100%; }
|
|
61
|
+
|
|
62
|
+
/* ─── xs (<576px) — mobile default, no media query needed ─────────
|
|
63
|
+
Explicitly stackable: pk-col-xs-* always takes effect. */
|
|
64
|
+
|
|
65
|
+
.pk-col-xs-1 { flex: 0 0 auto; width: 8.3333%; }
|
|
66
|
+
.pk-col-xs-2 { flex: 0 0 auto; width: 16.6667%; }
|
|
67
|
+
.pk-col-xs-3 { flex: 0 0 auto; width: 25%; }
|
|
68
|
+
.pk-col-xs-4 { flex: 0 0 auto; width: 33.3333%; }
|
|
69
|
+
.pk-col-xs-5 { flex: 0 0 auto; width: 41.6667%; }
|
|
70
|
+
.pk-col-xs-6 { flex: 0 0 auto; width: 50%; }
|
|
71
|
+
.pk-col-xs-7 { flex: 0 0 auto; width: 58.3333%; }
|
|
72
|
+
.pk-col-xs-8 { flex: 0 0 auto; width: 66.6667%; }
|
|
73
|
+
.pk-col-xs-9 { flex: 0 0 auto; width: 75%; }
|
|
74
|
+
.pk-col-xs-10 { flex: 0 0 auto; width: 83.3333%; }
|
|
75
|
+
.pk-col-xs-11 { flex: 0 0 auto; width: 91.6667%; }
|
|
76
|
+
.pk-col-xs-12 { flex: 0 0 auto; width: 100%; }
|
|
77
|
+
|
|
78
|
+
/* ─── sm (≥576px) ───────────────────────────────────────────────── */
|
|
79
|
+
|
|
80
|
+
@media (min-width: 576px) {
|
|
81
|
+
.pk-col-sm-1 { flex: 0 0 auto; width: 8.3333%; }
|
|
82
|
+
.pk-col-sm-2 { flex: 0 0 auto; width: 16.6667%; }
|
|
83
|
+
.pk-col-sm-3 { flex: 0 0 auto; width: 25%; }
|
|
84
|
+
.pk-col-sm-4 { flex: 0 0 auto; width: 33.3333%; }
|
|
85
|
+
.pk-col-sm-5 { flex: 0 0 auto; width: 41.6667%; }
|
|
86
|
+
.pk-col-sm-6 { flex: 0 0 auto; width: 50%; }
|
|
87
|
+
.pk-col-sm-7 { flex: 0 0 auto; width: 58.3333%; }
|
|
88
|
+
.pk-col-sm-8 { flex: 0 0 auto; width: 66.6667%; }
|
|
89
|
+
.pk-col-sm-9 { flex: 0 0 auto; width: 75%; }
|
|
90
|
+
.pk-col-sm-10 { flex: 0 0 auto; width: 83.3333%; }
|
|
91
|
+
.pk-col-sm-11 { flex: 0 0 auto; width: 91.6667%; }
|
|
92
|
+
.pk-col-sm-12 { flex: 0 0 auto; width: 100%; }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ─── md (≥768px) ───────────────────────────────────────────────── */
|
|
96
|
+
|
|
97
|
+
@media (min-width: 768px) {
|
|
98
|
+
.pk-col-md-1 { flex: 0 0 auto; width: 8.3333%; }
|
|
99
|
+
.pk-col-md-2 { flex: 0 0 auto; width: 16.6667%; }
|
|
100
|
+
.pk-col-md-3 { flex: 0 0 auto; width: 25%; }
|
|
101
|
+
.pk-col-md-4 { flex: 0 0 auto; width: 33.3333%; }
|
|
102
|
+
.pk-col-md-5 { flex: 0 0 auto; width: 41.6667%; }
|
|
103
|
+
.pk-col-md-6 { flex: 0 0 auto; width: 50%; }
|
|
104
|
+
.pk-col-md-7 { flex: 0 0 auto; width: 58.3333%; }
|
|
105
|
+
.pk-col-md-8 { flex: 0 0 auto; width: 66.6667%; }
|
|
106
|
+
.pk-col-md-9 { flex: 0 0 auto; width: 75%; }
|
|
107
|
+
.pk-col-md-10 { flex: 0 0 auto; width: 83.3333%; }
|
|
108
|
+
.pk-col-md-11 { flex: 0 0 auto; width: 91.6667%; }
|
|
109
|
+
.pk-col-md-12 { flex: 0 0 auto; width: 100%; }
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ─── lg (≥992px) ───────────────────────────────────────────────── */
|
|
113
|
+
|
|
114
|
+
@media (min-width: 992px) {
|
|
115
|
+
.pk-col-lg-1 { flex: 0 0 auto; width: 8.3333%; }
|
|
116
|
+
.pk-col-lg-2 { flex: 0 0 auto; width: 16.6667%; }
|
|
117
|
+
.pk-col-lg-3 { flex: 0 0 auto; width: 25%; }
|
|
118
|
+
.pk-col-lg-4 { flex: 0 0 auto; width: 33.3333%; }
|
|
119
|
+
.pk-col-lg-5 { flex: 0 0 auto; width: 41.6667%; }
|
|
120
|
+
.pk-col-lg-6 { flex: 0 0 auto; width: 50%; }
|
|
121
|
+
.pk-col-lg-7 { flex: 0 0 auto; width: 58.3333%; }
|
|
122
|
+
.pk-col-lg-8 { flex: 0 0 auto; width: 66.6667%; }
|
|
123
|
+
.pk-col-lg-9 { flex: 0 0 auto; width: 75%; }
|
|
124
|
+
.pk-col-lg-10 { flex: 0 0 auto; width: 83.3333%; }
|
|
125
|
+
.pk-col-lg-11 { flex: 0 0 auto; width: 91.6667%; }
|
|
126
|
+
.pk-col-lg-12 { flex: 0 0 auto; width: 100%; }
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ─── xl (≥1200px) ──────────────────────────────────────────────── */
|
|
130
|
+
|
|
131
|
+
@media (min-width: 1200px) {
|
|
132
|
+
.pk-col-xl-1 { flex: 0 0 auto; width: 8.3333%; }
|
|
133
|
+
.pk-col-xl-2 { flex: 0 0 auto; width: 16.6667%; }
|
|
134
|
+
.pk-col-xl-3 { flex: 0 0 auto; width: 25%; }
|
|
135
|
+
.pk-col-xl-4 { flex: 0 0 auto; width: 33.3333%; }
|
|
136
|
+
.pk-col-xl-5 { flex: 0 0 auto; width: 41.6667%; }
|
|
137
|
+
.pk-col-xl-6 { flex: 0 0 auto; width: 50%; }
|
|
138
|
+
.pk-col-xl-7 { flex: 0 0 auto; width: 58.3333%; }
|
|
139
|
+
.pk-col-xl-8 { flex: 0 0 auto; width: 66.6667%; }
|
|
140
|
+
.pk-col-xl-9 { flex: 0 0 auto; width: 75%; }
|
|
141
|
+
.pk-col-xl-10 { flex: 0 0 auto; width: 83.3333%; }
|
|
142
|
+
.pk-col-xl-11 { flex: 0 0 auto; width: 91.6667%; }
|
|
143
|
+
.pk-col-xl-12 { flex: 0 0 auto; width: 100%; }
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* ─── Utility helpers ────────────────────────────────────────────── */
|
|
147
|
+
|
|
148
|
+
/* Vertical alignment in row */
|
|
149
|
+
.pk-row--align-top { align-items: flex-start; }
|
|
150
|
+
.pk-row--align-center { align-items: center; }
|
|
151
|
+
.pk-row--align-bottom { align-items: flex-end; }
|
|
152
|
+
.pk-row--align-stretch { align-items: stretch; }
|
|
153
|
+
|
|
154
|
+
/* Horizontal justification */
|
|
155
|
+
.pk-row--justify-start { justify-content: flex-start; }
|
|
156
|
+
.pk-row--justify-center { justify-content: center; }
|
|
157
|
+
.pk-row--justify-end { justify-content: flex-end; }
|
|
158
|
+
.pk-row--justify-between { justify-content: space-between; }
|
|
159
|
+
.pk-row--justify-around { justify-content: space-around; }
|
|
160
|
+
|
|
161
|
+
/* Column-level vertical alignment */
|
|
162
|
+
.pk-col--align-top { align-self: flex-start; }
|
|
163
|
+
.pk-col--align-center { align-self: center; }
|
|
164
|
+
.pk-col--align-bottom { align-self: flex-end; }
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Material Symbols styles for ngx-pk-ui.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1) Use locally installed Material Symbols fonts when available
|
|
6
|
+
* 2) Fallback to Google-hosted font files
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: 'Material Symbols Outlined';
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-weight: 100 700;
|
|
13
|
+
font-display: swap;
|
|
14
|
+
src:
|
|
15
|
+
local('Material Symbols Outlined'),
|
|
16
|
+
url('https://fonts.gstatic.com/s/materialsymbolsoutlined/v326/kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzaxHMPdY43zj-jCxv3fzvRNU22ZXGJpEpjC_1v-p_4MrImHCIJIZrDCvHOem.ttf') format('truetype');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@font-face {
|
|
20
|
+
font-family: 'Material Symbols Rounded';
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: 100 700;
|
|
23
|
+
font-display: swap;
|
|
24
|
+
src:
|
|
25
|
+
local('Material Symbols Rounded'),
|
|
26
|
+
url('https://fonts.gstatic.com/s/materialsymbolsrounded/v328/syl0-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190FjpZIvDmUSVOK7BDB_Qb9vUSzq3wzLK-P0J-V_Zs-QtQth3-jOcbTCVpeRL2w5rwZu2rIelXxI.ttf') format('truetype');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'Material Symbols Sharp';
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 100 700;
|
|
33
|
+
font-display: swap;
|
|
34
|
+
src:
|
|
35
|
+
local('Material Symbols Sharp'),
|
|
36
|
+
url('https://fonts.gstatic.com/s/materialsymbolssharp/v323/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H5OdzEL3sVTgJtfbYxOLojCO.ttf') format('truetype');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.material-symbols-outlined,
|
|
40
|
+
.material-symbols-rounded,
|
|
41
|
+
.material-symbols-sharp {
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-weight: normal;
|
|
44
|
+
font-size: 24px;
|
|
45
|
+
line-height: 1;
|
|
46
|
+
letter-spacing: normal;
|
|
47
|
+
text-transform: none;
|
|
48
|
+
display: inline-block;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
word-wrap: normal;
|
|
51
|
+
direction: ltr;
|
|
52
|
+
-webkit-font-smoothing: antialiased;
|
|
53
|
+
text-rendering: optimizeLegibility;
|
|
54
|
+
font-feature-settings: 'liga';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.material-symbols-outlined {
|
|
58
|
+
font-family: 'Material Symbols Outlined';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.material-symbols-rounded {
|
|
62
|
+
font-family: 'Material Symbols Rounded';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.material-symbols-sharp {
|
|
66
|
+
font-family: 'Material Symbols Sharp';
|
|
67
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pk-spinner — Loading spinner CSS for ngx-pk-ui
|
|
3
|
+
*
|
|
4
|
+
* Sizes: pk-spinner-sm | pk-spinner-md (default) | pk-spinner-lg | pk-spinner-xl
|
|
5
|
+
* Display: pk-spinner-inline (sits inline with text)
|
|
6
|
+
* Colors: pk-spinner-primary (default) | pk-spinner-secondary
|
|
7
|
+
* pk-spinner-success | pk-spinner-error | pk-spinner-white
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <span class="pk-spinner"></span>
|
|
11
|
+
* <span class="pk-spinner pk-spinner-lg pk-spinner-success"></span>
|
|
12
|
+
* Loading... <span class="pk-spinner pk-spinner-sm pk-spinner-inline"></span>
|
|
13
|
+
*
|
|
14
|
+
* Accessible usage:
|
|
15
|
+
* <span class="pk-spinner" role="status" aria-label="Loading"></span>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/* ─── Keyframe ────────────────────────────────────────────────────── */
|
|
19
|
+
|
|
20
|
+
@keyframes pk-spin {
|
|
21
|
+
to { transform: rotate(360deg); }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* ─── Base ────────────────────────────────────────────────────────── */
|
|
25
|
+
|
|
26
|
+
.pk-spinner {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 24px; /* md default */
|
|
29
|
+
height: 24px;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
border: 3px solid rgba(25, 118, 210, 0.2);
|
|
32
|
+
border-top-color: var(--pk-btn-primary, #1976d2);
|
|
33
|
+
animation: pk-spin 0.7s linear infinite;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ─── Sizes ───────────────────────────────────────────────────────── */
|
|
38
|
+
|
|
39
|
+
.pk-spinner-sm {
|
|
40
|
+
width: 16px;
|
|
41
|
+
height: 16px;
|
|
42
|
+
border-width: 2px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pk-spinner-md {
|
|
46
|
+
width: 24px;
|
|
47
|
+
height: 24px;
|
|
48
|
+
border-width: 3px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pk-spinner-lg {
|
|
52
|
+
width: 36px;
|
|
53
|
+
height: 36px;
|
|
54
|
+
border-width: 4px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.pk-spinner-xl {
|
|
58
|
+
width: 48px;
|
|
59
|
+
height: 48px;
|
|
60
|
+
border-width: 5px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* ─── Inline ──────────────────────────────────────────────────────── */
|
|
64
|
+
|
|
65
|
+
.pk-spinner-inline {
|
|
66
|
+
display: inline-block;
|
|
67
|
+
vertical-align: middle;
|
|
68
|
+
margin-left: 6px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ─── Color variants ──────────────────────────────────────────────── */
|
|
72
|
+
|
|
73
|
+
.pk-spinner-primary {
|
|
74
|
+
border-color: rgba(25, 118, 210, 0.2);
|
|
75
|
+
border-top-color: var(--pk-btn-primary, #1976d2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.pk-spinner-secondary {
|
|
79
|
+
border-color: rgba(117, 117, 117, 0.2);
|
|
80
|
+
border-top-color: var(--pk-btn-secondary, #757575);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pk-spinner-success {
|
|
84
|
+
border-color: rgba(67, 160, 71, 0.2);
|
|
85
|
+
border-top-color: var(--pk-btn-success, #43a047);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pk-spinner-error {
|
|
89
|
+
border-color: rgba(229, 57, 53, 0.2);
|
|
90
|
+
border-top-color: var(--pk-btn-error, #e53935);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pk-spinner-white {
|
|
94
|
+
border-color: rgba(255, 255, 255, 0.3);
|
|
95
|
+
border-top-color: #fff;
|
|
96
|
+
}
|
package/styles/pk-ui.css
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pk-ui.css — single entry point for all ngx-pk-ui styles
|
|
3
|
+
*
|
|
4
|
+
* Import this one file to get everything:
|
|
5
|
+
*
|
|
6
|
+
* Angular (angular.json):
|
|
7
|
+
* "styles": ["node_modules/ngx-pk-ui/styles/pk-ui.css"]
|
|
8
|
+
*
|
|
9
|
+
* CSS / SCSS:
|
|
10
|
+
* @import 'ngx-pk-ui/styles/pk-ui.css';
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@import './pk-grid.css';
|
|
14
|
+
@import './pk-btn.css';
|
|
15
|
+
@import './pk-spinner.css';
|
|
16
|
+
@import './pk-badge.css';
|
|
17
|
+
@import './pk-card.css';
|
|
18
|
+
@import './pk-icon-font.css';
|