@fieldia/grid 0.12.0 → 0.13.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/package.json +3 -3
- package/src/lib/grid.js +213 -54
- package/src/lib/grid.js.map +1 -1
- package/src/lib/grid.mjs +213 -54
- package/src/lib/grid.mjs.map +1 -1
- package/src/lib/styles.d.mts +1 -1
- package/src/lib/styles.d.ts +1 -1
- package/src/lib/styles.js +24 -3
- package/src/lib/styles.js.map +1 -1
- package/src/lib/styles.mjs +24 -3
- package/src/lib/styles.mjs.map +1 -1
package/src/lib/styles.mjs
CHANGED
|
@@ -6,6 +6,13 @@ export const GRID_CSS = /* css */ `
|
|
|
6
6
|
.fd-grid-lines .ag-grid-scrolling-rows.ag-layout-auto-height { min-height: 40px; }
|
|
7
7
|
/* AG Grid keeps room for a sideways scroll bar it has marked invisible; give the room back until it is needed. */
|
|
8
8
|
.fd-grid-lines .ag-body-horizontal-scroll.ag-invisible { display: none; }
|
|
9
|
+
/* When the lines scroll sideways the bar sits under them, never over the last line (AG Grid lays it over, as if no
|
|
10
|
+
browser drew a bar there: Chrome on Windows and Linux does, and cut a note's last words in half). */
|
|
11
|
+
/* In the flow, AG Grid's own offset (above a totals row, for a bar it lays over) would lift it over the totals: dropped. */
|
|
12
|
+
.fd-grid-lines .ag-body-horizontal-scroll { position: relative; inset-block: auto !important; }
|
|
13
|
+
/* A line's handle and buttons are held at its ends without a rule beside them: the lines read as one table. */
|
|
14
|
+
/* AG Grid's own rule outranks any selector of ours, so this one insists. */
|
|
15
|
+
.fd-grid-lines :is(.ag-grid-container-wrapper, .ag-pinned-left-header, .ag-pinned-right-header, .ag-cell-last-left-pinned, .ag-cell-first-right-pinned) { border-inline-color: transparent !important; }
|
|
9
16
|
/* Lists that open from a cell leave the table: the body keeps the rounded corners instead of the frame. */
|
|
10
17
|
.fd-grid-lines .ag-root-wrapper { overflow: visible; }
|
|
11
18
|
.fd-grid-lines .ag-root-wrapper-body { overflow: hidden; border-radius: inherit; }
|
|
@@ -19,7 +26,7 @@ export const GRID_CSS = /* css */ `
|
|
|
19
26
|
.fd-grid-lines .fd-tone-muted { --fd-line-tone: var(--fd-muted); --fd-line-tone-soft: color-mix(in srgb, var(--fd-muted) 16%, transparent); }
|
|
20
27
|
.fd-grid-lines :is(.ag-row[class*="fd-tone-"] .ag-cell, .ag-cell[class*="fd-tone-"]) { color: var(--fd-line-tone); }
|
|
21
28
|
.fd-grid-lines :is(.fd-line-bold .ag-cell, .ag-cell.fd-cell-bold) { font-weight: 600; }
|
|
22
|
-
.fd-grid-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; line-height: 20px; font-weight: 500; color: var(--fd-muted); background: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
|
|
29
|
+
.fd-grid-badge { display: inline-block; max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; padding: 1px 9px; border-radius: 999px; font-size: 12px; line-height: 20px; font-weight: 500; color: var(--fd-muted); background: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
|
|
23
30
|
.fd-grid-badge[data-tone] { color: var(--fd-line-tone); background: var(--fd-line-tone-soft); }
|
|
24
31
|
.fd-grid-badge[data-tone="info"] { --fd-line-tone: var(--fd-info); --fd-line-tone-soft: var(--fd-info-soft); }
|
|
25
32
|
.fd-grid-badge[data-tone="success"] { --fd-line-tone: var(--fd-success); --fd-line-tone-soft: var(--fd-success-soft); }
|
|
@@ -88,16 +95,26 @@ button.fd-line-card-title { color: var(--fd-accent); }
|
|
|
88
95
|
.ag-cell-wrapper > .fd-grid-editor { flex: 1 1 auto; min-width: 0; align-self: stretch; }
|
|
89
96
|
.fd-grid-editor > * { flex: 1; min-width: 0; }
|
|
90
97
|
.fd-grid-editor .fd-input { border: 0; box-shadow: none; background: transparent; padding-inline: 0; min-height: 0; }
|
|
98
|
+
/* An input keeps a line's height of its own, not the cell's tall line, so it sits inside its row. */
|
|
99
|
+
.fd-grid-editor input.fd-input { line-height: 20px; }
|
|
100
|
+
/* A value too long for the room inside the padding takes the padding too. */
|
|
101
|
+
.fd-grid-editor.fd-grid-editor-tight { padding-inline: 4px; }
|
|
102
|
+
/* A date over its cell: as wide as its day and time need, never cut. */
|
|
103
|
+
.ag-popup-editor .fd-grid-editor:is([data-type="date"], [data-type="datetime"]) { width: max-content; }
|
|
104
|
+
.ag-popup-editor .fd-grid-editor:is([data-type="date"], [data-type="datetime"]) .fd-input { width: auto; }
|
|
105
|
+
/* A paragraph over its cell: several lines, scrolling once it is long. */
|
|
106
|
+
.ag-popup-editor .fd-grid-editor[data-type="text"] { height: auto; align-items: stretch; padding-block: 6px; }
|
|
107
|
+
.ag-popup-editor .fd-grid-editor[data-type="text"] textarea { min-height: 84px; max-height: 240px; overflow-y: auto; resize: vertical; line-height: 20px; padding-block: 2px; }
|
|
91
108
|
.fd-grid-editor .fd-combo-input { padding-inline-end: 24px; }
|
|
92
109
|
/* The cell's frame already marks the edit; outrank the underline skin's focus line. */
|
|
93
110
|
.fd-form .fd-grid-lines .fd-grid-editor .fd-input:focus { box-shadow: none; }
|
|
111
|
+
/* A wrapping header breaks between its words, never inside one (its column has room for the longest). */
|
|
112
|
+
.fd-grid-lines .ag-header-cell-text { word-break: normal; overflow-wrap: normal; }
|
|
94
113
|
/* A popup editor (links) covers its cell exactly and looks like one being edited in place. */
|
|
95
114
|
.ag-popup-editor .fd-grid-editor {
|
|
96
115
|
background: var(--ag-background-color); border: var(--ag-cell-editing-border); border-radius: var(--ag-border-radius);
|
|
97
116
|
box-shadow: var(--ag-cell-editing-shadow);
|
|
98
117
|
}
|
|
99
|
-
/* Its list is as wide as its choices need, never narrower than the cell. */
|
|
100
|
-
.fd-grid-lines > .fd-grid-floating-list { position: absolute; inset-inline-end: auto; width: max-content; max-width: min(420px, 90vw); z-index: 30; }
|
|
101
118
|
.fd-grid-editor .fd-listbox { inset-inline-end: auto; width: max-content; min-width: 100%; max-width: min(420px, 90vw); }
|
|
102
119
|
/* A section heads the lines below it; a note is a remark between them, every line of it shown. */
|
|
103
120
|
.fd-grid-lines .fd-grid-section { background: var(--fd-page); }
|
|
@@ -110,6 +127,10 @@ button.fd-line-card-title { color: var(--fd-accent); }
|
|
|
110
127
|
.fd-grid-editor[data-type="integer"] input, .fd-grid-editor[data-type="float"] input, .fd-grid-editor[data-type="monetary"] input { text-align: end; }
|
|
111
128
|
/* An analytic distribution's lines, opened from its cell: room round them, each share clear of its % sign. */
|
|
112
129
|
.ag-popup-editor .fd-grid-editor[data-type="json"] { height: auto; align-items: stretch; padding: 8px 12px; }
|
|
130
|
+
.ag-popup-editor .fd-grid-editor[data-type="many2many"] { height: auto; padding-block: 6px; }
|
|
131
|
+
/* A tags box in a whole line open at once: its tags and its search on their own lines, the line grown to hold them. */
|
|
132
|
+
.fd-grid-editor.fd-grid-editor-grows { height: auto; min-height: 100%; align-items: flex-start; padding-block: 4px; }
|
|
133
|
+
.fd-grid-editor .fd-chip { white-space: nowrap; }
|
|
113
134
|
.fd-grid-editor .fd-distribution .fd-share { padding-inline-end: calc(var(--fd-pad-x, 10px) + 2ch); }
|
|
114
135
|
.fd-grid-distribution { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
115
136
|
`;
|
package/src/lib/styles.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.mjs","sourceRoot":"","sources":["../../../../../libs/grid/src/lib/styles.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"styles.mjs","sourceRoot":"","sources":["../../../../../libs/grid/src/lib/styles.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsIjC,CAAC;AAEF,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAEvC,MAAM,UAAU,iBAAiB,CAAC,QAAkB;IAClD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC;QAAE,OAAO;IAC9C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC;IACpB,KAAK,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC7B,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC"}
|