@deskhero/dh_ui 2.66.0 → 2.66.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/.ai/COMMON_TASKS.md +3 -3
- package/.ai/CSS-CLASSES-GUIDE.md +25 -25
- package/dist/dh_ui.css +1 -1
- package/dist/dh_ui.es.js +4766 -4729
- package/dist/dh_ui.umd.js +54 -54
- package/dist/vscode.css-custom-data.json +524 -527
- package/package.json +1 -1
package/.ai/COMMON_TASKS.md
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
When touching a component’s layout or spacing, prefer the shared utilities instead of one-off scoped CSS:
|
|
24
24
|
|
|
25
25
|
1. **Flex:** Use `flex`, `flex-column`, `flex-row`, `items-center`, `justify-center`, `flex-1`, etc. from `flex.scss` instead of custom `display: flex` / `flex-direction` / `align-items` rules.
|
|
26
|
-
2. **Spacing:** Use `m-*`, `p-*`, `gap-*` with the
|
|
27
|
-
3. **Sizes:** Use `h
|
|
26
|
+
2. **Spacing:** Use `m-*`, `p-*`, `gap-*` with the spacing scale (e.g. `p-4`, `mb-2`, `gap-4`) instead of hardcoded margins/padding in `<style>`.
|
|
27
|
+
3. **Sizes:** Use `h-*`, `w-*` (e.g. `h-8`, `w-40`) or `w-100` / `h-100` where they match the need.
|
|
28
28
|
4. **Cleanup:** Remove redundant scoped rules that are fully replaced by these classes (e.g. empty blocks, duplicate flex/height/padding). Remove selectors for classes that no longer exist in the template (e.g. unused `.header-search-footer`, `.loader`).
|
|
29
|
-
5. Keep in `<style>` only what can’t be expressed with utilities: theme variables, borders, shadows, focus states, `:deep()` overrides, and layout that doesn’t map to the
|
|
29
|
+
5. Keep in `<style>` only what can’t be expressed with utilities: theme variables, borders, shadows, focus states, `:deep()` overrides, and layout that doesn’t map to the spacing scale (e.g. negative margin, exact rem not in scale).
|
|
30
30
|
|
package/.ai/CSS-CLASSES-GUIDE.md
CHANGED
|
@@ -12,7 +12,7 @@ This guide documents the utility classes and **color tokens** from the design sy
|
|
|
12
12
|
|
|
13
13
|
## 1. Flex utilities (`flex.scss`)
|
|
14
14
|
|
|
15
|
-
Tailwind-inspired flexbox classes. Combine with spacing classes (e.g. `gap-
|
|
15
|
+
Tailwind-inspired flexbox classes. Combine with spacing classes (e.g. `gap-2`, `m-2`) for layout.
|
|
16
16
|
|
|
17
17
|
### Display
|
|
18
18
|
| Class | Effect |
|
|
@@ -82,11 +82,11 @@ Tailwind-inspired flexbox classes. Combine with spacing classes (e.g. `gap-space
|
|
|
82
82
|
|
|
83
83
|
**Example:**
|
|
84
84
|
```html
|
|
85
|
-
<div class="flex flex-row items-center justify-between gap-
|
|
85
|
+
<div class="flex flex-row items-center justify-between gap-2">
|
|
86
86
|
<span>Left</span>
|
|
87
87
|
<span>Right</span>
|
|
88
88
|
</div>
|
|
89
|
-
<div class="flex flex-column flex-wrap gap-
|
|
89
|
+
<div class="flex flex-column flex-wrap gap-4">
|
|
90
90
|
<!-- stacked, wrapping column -->
|
|
91
91
|
</div>
|
|
92
92
|
```
|
|
@@ -247,37 +247,37 @@ Margin, padding, gap, and size use a shared scale. Values use `!important` by de
|
|
|
247
247
|
|
|
248
248
|
Use these as the **suffix** for margin, padding, gap, width, and height classes:
|
|
249
249
|
|
|
250
|
-
| Size name
|
|
251
|
-
|
|
252
|
-
| `
|
|
253
|
-
| `
|
|
254
|
-
| `
|
|
255
|
-
| `
|
|
256
|
-
| `
|
|
257
|
-
| `
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
262
|
-
|
|
263
|
-
Full list of keys: `
|
|
250
|
+
| Size name | Value | Size name | Value |
|
|
251
|
+
|-----------|---------|-----------|---------|
|
|
252
|
+
| `0` | 0 | `12` | 3rem |
|
|
253
|
+
| `half` | 0.125rem | `14` | 3.5rem |
|
|
254
|
+
| `1` | 0.25rem | `16` | 4rem |
|
|
255
|
+
| `2` | 0.5rem | `20` | 5rem |
|
|
256
|
+
| `3` | 0.75rem | `24` | 6rem |
|
|
257
|
+
| `4` | 1rem | … up to `86` (24rem) |
|
|
258
|
+
| `5` | 1.25rem | |
|
|
259
|
+
| `6` | 1.5rem | |
|
|
260
|
+
| `8` | 2rem | |
|
|
261
|
+
| `10` | 2.5rem | |
|
|
262
|
+
|
|
263
|
+
Full list of keys: `0`, `half`, `1` … `10`, `12`, `14`, `16`, `20`, `24`, `28`, `32`, `36`, `40`, `44`, `48`, `52`, `56`, `60`, `64`, `72`, `80`, `86`.
|
|
264
264
|
|
|
265
265
|
### Gap
|
|
266
266
|
- **Class pattern:** `gap-<size>` (size from spacing scale only)
|
|
267
|
-
- **Examples:** `gap-
|
|
267
|
+
- **Examples:** `gap-2`, `gap-4`, `gap-0`
|
|
268
268
|
|
|
269
269
|
### Margin
|
|
270
270
|
- **Pattern:** `m-<size>`, `mx-<size>`, `my-<size>`, `mt-<size>`, `mr-<size>`, `mb-<size>`, `ml-<size>`
|
|
271
|
-
- **Examples:** `m-
|
|
271
|
+
- **Examples:** `m-2`, `mx-4`, `mt-1`, `mb-3`
|
|
272
272
|
- **Special (auto):** `mx-auto`, `ml-auto`, `mr-auto` (no `m-auto` or `my-auto`)
|
|
273
273
|
|
|
274
274
|
### Padding
|
|
275
275
|
- **Pattern:** `p-<size>`, `px-<size>`, `py-<size>`, `pt-<size>`, `pr-<size>`, `pb-<size>`, `pl-<size>`
|
|
276
|
-
- **Examples:** `p-
|
|
276
|
+
- **Examples:** `p-4`, `px-2`, `py-3`
|
|
277
277
|
|
|
278
278
|
### Width and height (rem-based)
|
|
279
279
|
- **Pattern:** `w-<size>`, `h-<size>` with spacing scale
|
|
280
|
-
- **Examples:** `w-
|
|
280
|
+
- **Examples:** `w-40`, `h-8`
|
|
281
281
|
- **Special:** `w-auto`, `h-auto`
|
|
282
282
|
|
|
283
283
|
### Width and height (percentage)
|
|
@@ -296,8 +296,8 @@ Full list of keys: `spacer-0`, `spacer-half`, `spacer-1` … `spacer-10`, `space
|
|
|
296
296
|
|
|
297
297
|
**Examples:**
|
|
298
298
|
```html
|
|
299
|
-
<div class="flex flex-column gap-
|
|
300
|
-
<div class="flex flex-row items-center justify-between mb-
|
|
299
|
+
<div class="flex flex-column gap-4 p-4">
|
|
300
|
+
<div class="flex flex-row items-center justify-between mb-2">
|
|
301
301
|
<span class="text-primary">Title</span>
|
|
302
302
|
<button class="ml-auto">Action</button>
|
|
303
303
|
</div>
|
|
@@ -311,9 +311,9 @@ Full list of keys: `spacer-0`, `spacer-half`, `spacer-1` … `spacer-10`, `space
|
|
|
311
311
|
|
|
312
312
|
- **Layout:** Prefer `flex` + direction + align/justify + `gap-*` from this guide before adding custom flex CSS.
|
|
313
313
|
- **Colors:** Use `text-*` and `bg-color-*` (or `color="..."` attribute) for semantic colors. For any other color, use **Section 3** variables only: `var(--dh-<scale>-<1-10>)` (e.g. `--dh-blue-4`, `--dh-gray-7`). All available palette variables and hex values are listed in **Section 3.1**; do not invent or hardcode hex.
|
|
314
|
-
- **Spacing:** Use `m-*`, `p-*`, `gap-*` with the `
|
|
314
|
+
- **Spacing:** Use `m-*`, `p-*`, `gap-*` with the spacing scale (e.g. `m-2`, `gap-4`); use `mx-auto` for horizontal centering when appropriate.
|
|
315
315
|
- **Sizes:** Use `w-*` / `h-*` with the spacing scale for fixed sizes, or `w-100` / `h-100` for 100%.
|
|
316
|
-
- **Combining:** e.g. `flex flex-row items-center justify-between gap-
|
|
316
|
+
- **Combining:** e.g. `flex flex-row items-center justify-between gap-2 p-4` is a valid and preferred pattern.
|
|
317
317
|
- **No new one-off CSS:** If a layout or spacing need is covered by these classes, use the classes instead of new rules in the component.
|
|
318
318
|
|
|
319
319
|
---
|