@keenmate/pure-admin-core 2.3.6 → 2.5.0

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.
Files changed (47) hide show
  1. package/README.md +23 -29
  2. package/dist/css/main.css +68 -148
  3. package/package.json +1 -5
  4. package/snippets/AUDIT.md +94 -0
  5. package/snippets/alerts.html +264 -89
  6. package/snippets/badges.html +193 -61
  7. package/snippets/buttons.html +178 -0
  8. package/snippets/callouts.html +210 -129
  9. package/snippets/cards.html +383 -200
  10. package/snippets/checkbox-lists.html +199 -65
  11. package/snippets/code.html +55 -11
  12. package/snippets/command-palette.html +401 -111
  13. package/snippets/comparison.html +144 -93
  14. package/snippets/customization.html +311 -104
  15. package/snippets/data-display.html +584 -0
  16. package/snippets/detail-panel.html +470 -138
  17. package/snippets/filter-card.html +246 -0
  18. package/snippets/forms.html +408 -308
  19. package/snippets/grid.html +253 -141
  20. package/snippets/layout.html +379 -480
  21. package/snippets/lists.html +144 -47
  22. package/snippets/loaders.html +64 -39
  23. package/snippets/manifest.json +330 -280
  24. package/snippets/modal-dialogs.html +137 -64
  25. package/snippets/modals.html +221 -151
  26. package/snippets/notifications.html +285 -0
  27. package/snippets/popconfirm.html +213 -19
  28. package/snippets/profile.html +290 -330
  29. package/snippets/statistics.html +247 -0
  30. package/snippets/tables.html +359 -150
  31. package/snippets/tabs.html +129 -45
  32. package/snippets/timeline.html +123 -56
  33. package/snippets/toasts.html +179 -31
  34. package/snippets/tooltips.html +199 -81
  35. package/snippets/typography.html +183 -58
  36. package/snippets/utilities.html +511 -415
  37. package/snippets/virtual-scroll.html +201 -75
  38. package/snippets/web-daterangepicker.html +369 -189
  39. package/snippets/web-multiselect.html +360 -124
  40. package/src/scss/core-components/_alerts.scss +51 -12
  41. package/src/scss/core-components/_pagers.scss +1 -1
  42. package/src/scss/core-components/_popconfirm.scss +35 -13
  43. package/src/scss/core-components/_profile.scss +18 -8
  44. package/src/scss/core-components/_statistics.scss +12 -12
  45. package/src/scss/core-components/_tables.scss +2 -134
  46. package/src/scss/variables/_components.scss +17 -2
  47. package/scripts/download-themes.js +0 -351
@@ -0,0 +1,246 @@
1
+ <!-- ================================
2
+ FILTER CARD
3
+ A thin layout helper that turns a regular .pa-card into a
4
+ filter panel: a single inline row of filter inputs + action
5
+ buttons, plus a collapsible "advanced" section underneath.
6
+
7
+ Source: core-components/_filter-card.scss (no .pa-filter-card
8
+ base block — only BEM elements + two state modifiers — so it
9
+ piggybacks on the surrounding .pa-card for chrome).
10
+
11
+ The structure mirrors how a typical "Search + Filter" panel
12
+ above a data table is built — see also tables.html and
13
+ forms.html for the inputs that go inside.
14
+ ================================ -->
15
+
16
+
17
+ <!-- ================================
18
+ BASE LAYOUT
19
+ Inline filters + action buttons on a single row. Each child of
20
+ __filters auto-stretches with min-width 200px, so they wrap
21
+ onto extra rows on narrow viewports without overflowing.
22
+ ================================ -->
23
+
24
+ <div class="pa-card pa-filter-card">
25
+ <div class="pa-card__body">
26
+ <div class="pa-filter-card__row">
27
+
28
+ <div class="pa-filter-card__filters">
29
+ <div class="pa-input-group">
30
+ <span class="pa-input-group__prepend"><i class="fas fa-search"></i></span>
31
+ <input type="text" class="pa-input" placeholder="Search by name">
32
+ </div>
33
+
34
+ <div class="pa-input-wrapper">
35
+ <select class="pa-select">
36
+ <option>All categories</option>
37
+ <option>Electronics</option>
38
+ <option>Clothing</option>
39
+ </select>
40
+ <button class="pa-input-wrapper__clear" type="button">×</button>
41
+ </div>
42
+
43
+ <div class="pa-input-wrapper">
44
+ <select class="pa-select">
45
+ <option>Any status</option>
46
+ <option>In stock</option>
47
+ <option>Out of stock</option>
48
+ </select>
49
+ <button class="pa-input-wrapper__clear" type="button">×</button>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="pa-filter-card__actions">
54
+ <button class="pa-btn pa-btn--secondary pa-btn--icon-only" title="Clear all">
55
+ <i class="fas fa-times"></i>
56
+ </button>
57
+ <button class="pa-btn pa-btn--primary pa-btn--icon-only" title="Refresh">
58
+ <i class="fas fa-sync-alt"></i>
59
+ </button>
60
+ <button class="pa-btn pa-btn--primary pa-btn--icon-only" title="More filters">
61
+ <i class="fas fa-caret-down"></i>
62
+ </button>
63
+ </div>
64
+
65
+ </div>
66
+ </div>
67
+ </div>
68
+
69
+
70
+ <!-- ================================
71
+ WITH ADVANCED SECTION (collapsible)
72
+ The __advanced block sits below __row inside the same card body
73
+ and gets a top border + spacing automatically. Show/hide via JS
74
+ by toggling a class (or `hidden`); the SCSS doesn't define a
75
+ state for it — it's plain layout.
76
+ ================================ -->
77
+
78
+ <div class="pa-card pa-filter-card" id="search-card">
79
+ <div class="pa-card__body">
80
+
81
+ <div class="pa-filter-card__row">
82
+ <div class="pa-filter-card__filters">
83
+ <div class="pa-input-group">
84
+ <span class="pa-input-group__prepend"><i class="fas fa-search"></i></span>
85
+ <input type="text" class="pa-input" placeholder="Search…">
86
+ </div>
87
+ </div>
88
+ <div class="pa-filter-card__actions">
89
+ <button class="pa-btn pa-btn--secondary" onclick="toggleAdvanced()">
90
+ <i class="fas fa-sliders-h"></i> Advanced
91
+ </button>
92
+ </div>
93
+ </div>
94
+
95
+ <div class="pa-filter-card__advanced" id="advanced-section" hidden>
96
+ <div class="pa-row">
97
+ <div class="pa-col-100 pa-col-md-1-3">
98
+ <div class="pa-form-group">
99
+ <label>Category</label>
100
+ <div class="pa-input-wrapper">
101
+ <select class="pa-select">
102
+ <option>All categories</option>
103
+ <option>Electronics</option>
104
+ </select>
105
+ <button class="pa-input-wrapper__clear" type="button">×</button>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ <div class="pa-col-100 pa-col-md-1-3">
110
+ <div class="pa-form-group">
111
+ <label>Price range</label>
112
+ <div class="pa-input-wrapper">
113
+ <select class="pa-select">
114
+ <option>Any price</option>
115
+ <option>Under $50</option>
116
+ </select>
117
+ <button class="pa-input-wrapper__clear" type="button">×</button>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ <div class="pa-col-100 pa-col-md-1-3">
122
+ <div class="pa-form-group">
123
+ <label>Date range</label>
124
+ <input type="date" class="pa-input">
125
+ </div>
126
+ </div>
127
+ </div>
128
+
129
+ <div class="pa-filter-card__advanced-actions">
130
+ <button class="pa-btn pa-btn--secondary">Clear filters</button>
131
+ <button class="pa-btn pa-btn--primary">Apply filters</button>
132
+ </div>
133
+ </div>
134
+
135
+ </div>
136
+ </div>
137
+
138
+ <script>
139
+ function toggleAdvanced() {
140
+ document.getElementById('advanced-section').toggleAttribute('hidden');
141
+ }
142
+ </script>
143
+
144
+
145
+ <!-- ================================
146
+ STATES
147
+ Both modifiers go on the .pa-filter-card wrapper — the same
148
+ element that already carries .pa-card. They dim the card and
149
+ disable interaction; behavior matches `pointer-events: none`,
150
+ so make sure form fields elsewhere on the page are still
151
+ reachable.
152
+ ================================ -->
153
+
154
+ <!-- Loading: dim to 0.7, ignore clicks while data refreshes -->
155
+ <div class="pa-card pa-filter-card pa-filter-card--loading">
156
+ <div class="pa-card__body">
157
+ <div class="pa-filter-card__row">…</div>
158
+ </div>
159
+ </div>
160
+
161
+ <!-- Disabled: dim to 0.5, ignore clicks (e.g. user lacks permission) -->
162
+ <div class="pa-card pa-filter-card pa-filter-card--disabled">
163
+ <div class="pa-card__body">
164
+ <div class="pa-filter-card__row">…</div>
165
+ </div>
166
+ </div>
167
+
168
+
169
+ <!-- ================================
170
+ COMPONENT REFERENCE
171
+ ================================ -->
172
+
173
+ <!--
174
+ HOW IT WORKS:
175
+ No `.pa-filter-card` base block — `_filter-card.scss` only defines
176
+ BEM elements and modifiers. The wrapper carries `pa-card` for the
177
+ visual chrome AND `pa-filter-card` so the modifiers can latch on.
178
+
179
+ SUB-ELEMENTS:
180
+ .pa-filter-card__row Flex row, gap, wraps. Holds the
181
+ filters block + actions block.
182
+ .pa-filter-card__filters flex: 1 grow region. Each child
183
+ auto-stretches with min-width
184
+ 200px, so inputs wrap to a new
185
+ line gracefully.
186
+ .pa-filter-card__actions flex-shrink: 0 region for the
187
+ action buttons (clear, refresh,
188
+ expand, etc.). Smaller gap than
189
+ __filters to group icons tightly.
190
+ .pa-filter-card__advanced Collapsible block under __row.
191
+ Top border + spacing already set;
192
+ you toggle visibility yourself.
193
+ .pa-filter-card__advanced-actions Right-aligned button row at the
194
+ bottom of the advanced block.
195
+
196
+ MODIFIERS (on the .pa-filter-card wrapper):
197
+ .pa-filter-card--loading opacity 0.7 + pointer-events none
198
+ .pa-filter-card--disabled opacity 0.5 + pointer-events none
199
+
200
+ WHAT GOES INSIDE:
201
+ __filters expects form controls — typically `.pa-input-group`,
202
+ `.pa-input-wrapper > .pa-select`, plain `.pa-input`, web-components
203
+ like <web-multiselect> / <web-daterangepicker>. See forms.html for
204
+ the inventory.
205
+
206
+ __actions expects `.pa-btn`s. Use `.pa-btn--icon-only` for compact
207
+ icon buttons; pair with a `title` attribute so the tooltip carries
208
+ the meaning.
209
+
210
+ __advanced expects whatever fits — typically a `.pa-row` of
211
+ `.pa-form-group`s for a tidy multi-column form.
212
+
213
+ EXPAND / COLLAPSE:
214
+ No built-in JS. Use the `hidden` attribute (preferred — no CSS
215
+ required, accessibility-friendly), a `d-none` toggle, or an
216
+ inline `style.display`. The advanced block already has its own
217
+ top spacing + border, so just unhide it.
218
+
219
+ STRUCTURE PATTERNS:
220
+
221
+ Search + actions only:
222
+ <div class="pa-card pa-filter-card">
223
+ <div class="pa-card__body">
224
+ <div class="pa-filter-card__row">
225
+ <div class="pa-filter-card__filters">…</div>
226
+ <div class="pa-filter-card__actions">…</div>
227
+ </div>
228
+ </div>
229
+ </div>
230
+
231
+ Search + advanced (toggled):
232
+ <div class="pa-card pa-filter-card">
233
+ <div class="pa-card__body">
234
+ <div class="pa-filter-card__row">…</div>
235
+ <div class="pa-filter-card__advanced" hidden>
236
+ <div class="pa-row">…</div>
237
+ <div class="pa-filter-card__advanced-actions">…</div>
238
+ </div>
239
+ </div>
240
+ </div>
241
+
242
+ Loading state during data fetch:
243
+ el.classList.add('pa-filter-card--loading');
244
+ await fetchResults();
245
+ el.classList.remove('pa-filter-card--loading');
246
+ -->