@stramien/core 0.14.0 → 0.15.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.
- package/dist/index.d.ts +36 -5
- package/dist/index.js +70 -5
- package/dist/index.js.map +1 -1
- package/dist/reset-guard.css +37 -0
- package/package.json +4 -3
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Stramien reset guard.
|
|
3
|
+
*
|
|
4
|
+
* Unlayered CSS beats every cascade layer, whatever the import order. A CSS reset that is
|
|
5
|
+
* not in a layer (Tailwind CSS 3's preflight, normalize.css, a hand-written `* { … }` reset)
|
|
6
|
+
* therefore overrides the grid's own styles in `@layer stramien.*`: buttons and inputs lose
|
|
7
|
+
* their borders, padding and backgrounds.
|
|
8
|
+
*
|
|
9
|
+
* Import this file after the reset and before your own CSS and utilities. It rolls every
|
|
10
|
+
* property of the grid's own elements back to the layered styles, so the reset no longer
|
|
11
|
+
* applies to them: the grid root, everything outside cells and detail rows (toolbar,
|
|
12
|
+
* headers, popovers, pagination) and, inside cells, the elements with an `st-` class
|
|
13
|
+
* (badges, checkboxes, editors). What your renderers put in cells and detail rows keeps the
|
|
14
|
+
* reset. The rules have the specificity of one class, so your own CSS, utility classes and
|
|
15
|
+
* `cellClass` that come after this file still win.
|
|
16
|
+
*
|
|
17
|
+
* @import "tailwindcss/base";
|
|
18
|
+
* @import "@stramien/core/reset-guard.css";
|
|
19
|
+
* @import "tailwindcss/components";
|
|
20
|
+
* @import "tailwindcss/utilities";
|
|
21
|
+
*
|
|
22
|
+
* Not needed when the reset is in a cascade layer (Tailwind CSS 4): declare the layer order
|
|
23
|
+
* instead, see docs/theming.md.
|
|
24
|
+
*/
|
|
25
|
+
.st-grid,
|
|
26
|
+
.st-grid::before,
|
|
27
|
+
.st-grid::after,
|
|
28
|
+
:where(.st-grid) :not(.st-cell *, .st-detail-row *),
|
|
29
|
+
:where(.st-grid) :not(.st-cell *, .st-detail-row *)::before,
|
|
30
|
+
:where(.st-grid) :not(.st-cell *, .st-detail-row *)::after,
|
|
31
|
+
:where(.st-grid) :not(.st-cell *, .st-detail-row *)::placeholder,
|
|
32
|
+
:where(.st-grid) :is([class^="st-"], [class*=" st-"]),
|
|
33
|
+
:where(.st-grid) :is([class^="st-"], [class*=" st-"])::before,
|
|
34
|
+
:where(.st-grid) :is([class^="st-"], [class*=" st-"])::after,
|
|
35
|
+
:where(.st-grid) :is([class^="st-"], [class*=" st-"])::placeholder {
|
|
36
|
+
all: revert-layer;
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stramien/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Zero-dependency framework-agnostic TypeScript data grid engine with virtualized DOM renderer and CSS-variable themes",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Erik-Jan van Baaren <erikjan@gmail.com>",
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"types": "./dist/locales.d.ts",
|
|
43
43
|
"import": "./dist/locales.js"
|
|
44
44
|
},
|
|
45
|
-
"./styles.css": "./dist/styles.css"
|
|
45
|
+
"./styles.css": "./dist/styles.css",
|
|
46
|
+
"./reset-guard.css": "./dist/reset-guard.css"
|
|
46
47
|
},
|
|
47
48
|
"files": [
|
|
48
49
|
"dist",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"README.md"
|
|
51
52
|
],
|
|
52
53
|
"scripts": {
|
|
53
|
-
"build": "tsup src/index.ts src/locales.ts --format esm --dts --clean --sourcemap && node -e \"const fs=require('fs'); fs.copyFileSync('src/styles/st-grid.css', 'dist/styles.css');\"",
|
|
54
|
+
"build": "tsup src/index.ts src/locales.ts --format esm --dts --clean --sourcemap && node -e \"const fs=require('fs'); fs.copyFileSync('src/styles/st-grid.css', 'dist/styles.css'); fs.copyFileSync('src/styles/reset-guard.css', 'dist/reset-guard.css');\"",
|
|
54
55
|
"typecheck": "tsc --noEmit"
|
|
55
56
|
}
|
|
56
57
|
}
|