@fieldia/widgets 0.10.0 → 0.12.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/README.md +2 -1
- package/package.json +2 -2
- package/src/index.d.mts +2 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +6 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +2 -0
- package/src/index.mjs.map +1 -1
- package/src/lib/badge.d.mts +8 -0
- package/src/lib/badge.d.ts +8 -0
- package/src/lib/badge.js +37 -0
- package/src/lib/badge.js.map +1 -0
- package/src/lib/badge.mjs +33 -0
- package/src/lib/badge.mjs.map +1 -0
- package/src/lib/calendar.d.mts +3 -1
- package/src/lib/calendar.d.ts +3 -1
- package/src/lib/calendar.js +17 -1
- package/src/lib/calendar.js.map +1 -1
- package/src/lib/calendar.mjs +17 -1
- package/src/lib/calendar.mjs.map +1 -1
- package/src/lib/cards.js +12 -4
- package/src/lib/cards.js.map +1 -1
- package/src/lib/cards.mjs +13 -5
- package/src/lib/cards.mjs.map +1 -1
- package/src/lib/choice-images.js +1 -1
- package/src/lib/choice-images.js.map +1 -1
- package/src/lib/choice-images.mjs +1 -1
- package/src/lib/choice-images.mjs.map +1 -1
- package/src/lib/choice-tags.js +2 -2
- package/src/lib/choice-tags.js.map +1 -1
- package/src/lib/choice-tags.mjs +2 -2
- package/src/lib/choice-tags.mjs.map +1 -1
- package/src/lib/colour.d.mts +11 -0
- package/src/lib/colour.d.ts +11 -0
- package/src/lib/colour.js +114 -0
- package/src/lib/colour.js.map +1 -0
- package/src/lib/colour.mjs +110 -0
- package/src/lib/colour.mjs.map +1 -0
- package/src/lib/copy.d.mts +8 -0
- package/src/lib/copy.d.ts +8 -0
- package/src/lib/copy.js +58 -0
- package/src/lib/copy.js.map +1 -0
- package/src/lib/copy.mjs +54 -0
- package/src/lib/copy.mjs.map +1 -0
- package/src/lib/date-range.d.mts +2 -0
- package/src/lib/date-range.d.ts +2 -0
- package/src/lib/date-range.js +220 -0
- package/src/lib/date-range.js.map +1 -0
- package/src/lib/date-range.mjs +216 -0
- package/src/lib/date-range.mjs.map +1 -0
- package/src/lib/display.d.mts +25 -1
- package/src/lib/display.d.ts +25 -1
- package/src/lib/display.js +42 -2
- package/src/lib/display.js.map +1 -1
- package/src/lib/display.mjs +39 -2
- package/src/lib/display.mjs.map +1 -1
- package/src/lib/distribution.d.mts +13 -0
- package/src/lib/distribution.d.ts +13 -0
- package/src/lib/distribution.js +159 -0
- package/src/lib/distribution.js.map +1 -0
- package/src/lib/distribution.mjs +152 -0
- package/src/lib/distribution.mjs.map +1 -0
- package/src/lib/duration.d.mts +18 -0
- package/src/lib/duration.d.ts +18 -0
- package/src/lib/duration.js +137 -0
- package/src/lib/duration.js.map +1 -0
- package/src/lib/duration.mjs +128 -0
- package/src/lib/duration.mjs.map +1 -0
- package/src/lib/embed.d.mts +3 -0
- package/src/lib/embed.d.ts +3 -0
- package/src/lib/embed.js +97 -0
- package/src/lib/embed.js.map +1 -0
- package/src/lib/embed.mjs +92 -0
- package/src/lib/embed.mjs.map +1 -0
- package/src/lib/extras.js +6 -0
- package/src/lib/extras.js.map +1 -1
- package/src/lib/extras.mjs +6 -0
- package/src/lib/extras.mjs.map +1 -1
- package/src/lib/files.d.mts +11 -0
- package/src/lib/files.d.ts +11 -0
- package/src/lib/files.js +86 -9
- package/src/lib/files.js.map +1 -1
- package/src/lib/files.mjs +85 -9
- package/src/lib/files.mjs.map +1 -1
- package/src/lib/kind-parts.d.mts +4 -3
- package/src/lib/kind-parts.d.ts +4 -3
- package/src/lib/kind-parts.js +5 -3
- package/src/lib/kind-parts.js.map +1 -1
- package/src/lib/kind-parts.mjs +5 -3
- package/src/lib/kind-parts.mjs.map +1 -1
- package/src/lib/labels.d.mts +42 -0
- package/src/lib/labels.d.ts +42 -0
- package/src/lib/labels.js +32 -0
- package/src/lib/labels.js.map +1 -1
- package/src/lib/labels.mjs +32 -0
- package/src/lib/labels.mjs.map +1 -1
- package/src/lib/layout-styles.d.mts +1 -1
- package/src/lib/layout-styles.d.ts +1 -1
- package/src/lib/layout-styles.js +2 -0
- package/src/lib/layout-styles.js.map +1 -1
- package/src/lib/layout-styles.mjs +2 -0
- package/src/lib/layout-styles.mjs.map +1 -1
- package/src/lib/lines.d.mts +12 -2
- package/src/lib/lines.d.ts +12 -2
- package/src/lib/lines.js +251 -15
- package/src/lib/lines.js.map +1 -1
- package/src/lib/lines.mjs +250 -16
- package/src/lib/lines.mjs.map +1 -1
- package/src/lib/links-table.d.mts +11 -0
- package/src/lib/links-table.d.ts +11 -0
- package/src/lib/links-table.js +116 -0
- package/src/lib/links-table.js.map +1 -0
- package/src/lib/links-table.mjs +112 -0
- package/src/lib/links-table.mjs.map +1 -0
- package/src/lib/locales/ar.js +32 -0
- package/src/lib/locales/ar.js.map +1 -1
- package/src/lib/locales/ar.mjs +32 -0
- package/src/lib/locales/ar.mjs.map +1 -1
- package/src/lib/locales/de.js +32 -0
- package/src/lib/locales/de.js.map +1 -1
- package/src/lib/locales/de.mjs +32 -0
- package/src/lib/locales/de.mjs.map +1 -1
- package/src/lib/locales/fr.js +32 -0
- package/src/lib/locales/fr.js.map +1 -1
- package/src/lib/locales/fr.mjs +32 -0
- package/src/lib/locales/fr.mjs.map +1 -1
- package/src/lib/payments.d.mts +2 -0
- package/src/lib/payments.d.ts +2 -0
- package/src/lib/payments.js +94 -0
- package/src/lib/payments.js.map +1 -0
- package/src/lib/payments.mjs +90 -0
- package/src/lib/payments.mjs.map +1 -0
- package/src/lib/popup.d.mts +11 -0
- package/src/lib/popup.d.ts +11 -0
- package/src/lib/popup.js +48 -0
- package/src/lib/popup.js.map +1 -0
- package/src/lib/popup.mjs +45 -0
- package/src/lib/popup.mjs.map +1 -0
- package/src/lib/priority.d.mts +10 -0
- package/src/lib/priority.d.ts +10 -0
- package/src/lib/priority.js +59 -0
- package/src/lib/priority.js.map +1 -0
- package/src/lib/priority.mjs +55 -0
- package/src/lib/priority.mjs.map +1 -0
- package/src/lib/progress.js +3 -0
- package/src/lib/progress.js.map +1 -1
- package/src/lib/progress.mjs +3 -0
- package/src/lib/progress.mjs.map +1 -1
- package/src/lib/properties.js +100 -9
- package/src/lib/properties.js.map +1 -1
- package/src/lib/properties.mjs +100 -9
- package/src/lib/properties.mjs.map +1 -1
- package/src/lib/read-text.d.mts +25 -0
- package/src/lib/read-text.d.ts +25 -0
- package/src/lib/read-text.js +102 -0
- package/src/lib/read-text.js.map +1 -0
- package/src/lib/read-text.mjs +98 -0
- package/src/lib/read-text.mjs.map +1 -0
- package/src/lib/relations.d.mts +12 -0
- package/src/lib/relations.d.ts +12 -0
- package/src/lib/relations.js +99 -8
- package/src/lib/relations.js.map +1 -1
- package/src/lib/relations.mjs +97 -8
- package/src/lib/relations.mjs.map +1 -1
- package/src/lib/slider.js +1 -1
- package/src/lib/slider.js.map +1 -1
- package/src/lib/slider.mjs +1 -1
- package/src/lib/slider.mjs.map +1 -1
- package/src/lib/state-dot.d.mts +2 -0
- package/src/lib/state-dot.d.ts +2 -0
- package/src/lib/state-dot.js +107 -0
- package/src/lib/state-dot.js.map +1 -0
- package/src/lib/state-dot.mjs +103 -0
- package/src/lib/state-dot.mjs.map +1 -0
- package/src/lib/statusbar.js +151 -14
- package/src/lib/statusbar.js.map +1 -1
- package/src/lib/statusbar.mjs +151 -14
- package/src/lib/statusbar.mjs.map +1 -1
- package/src/lib/styles-business.d.mts +8 -0
- package/src/lib/styles-business.d.ts +8 -0
- package/src/lib/styles-business.js +120 -0
- package/src/lib/styles-business.js.map +1 -0
- package/src/lib/styles-business.mjs +117 -0
- package/src/lib/styles-business.mjs.map +1 -0
- package/src/lib/styles-kinds.d.mts +1 -1
- package/src/lib/styles-kinds.d.ts +1 -1
- package/src/lib/styles-kinds.js +1 -1
- package/src/lib/styles-kinds.mjs +1 -1
- package/src/lib/styles-parts.d.mts +16 -0
- package/src/lib/styles-parts.d.ts +16 -0
- package/src/lib/styles-parts.js +69 -0
- package/src/lib/styles-parts.js.map +1 -0
- package/src/lib/styles-parts.mjs +66 -0
- package/src/lib/styles-parts.mjs.map +1 -0
- package/src/lib/styles-sheet.d.mts +6 -0
- package/src/lib/styles-sheet.d.ts +6 -0
- package/src/lib/styles-sheet.js +123 -0
- package/src/lib/styles-sheet.js.map +1 -0
- package/src/lib/styles-sheet.mjs +120 -0
- package/src/lib/styles-sheet.mjs.map +1 -0
- package/src/lib/styles.d.mts +10 -0
- package/src/lib/styles.d.ts +10 -0
- package/src/lib/styles.js +234 -19
- package/src/lib/styles.js.map +1 -1
- package/src/lib/styles.mjs +233 -18
- package/src/lib/styles.mjs.map +1 -1
- package/src/lib/tax-totals.d.mts +2 -0
- package/src/lib/tax-totals.d.ts +2 -0
- package/src/lib/tax-totals.js +92 -0
- package/src/lib/tax-totals.js.map +1 -0
- package/src/lib/tax-totals.mjs +88 -0
- package/src/lib/tax-totals.mjs.map +1 -0
- package/src/lib/timer.d.mts +4 -0
- package/src/lib/timer.d.ts +4 -0
- package/src/lib/timer.js +62 -0
- package/src/lib/timer.js.map +1 -0
- package/src/lib/timer.mjs +57 -0
- package/src/lib/timer.mjs.map +1 -0
- package/src/lib/widgets.d.mts +18 -3
- package/src/lib/widgets.d.ts +18 -3
- package/src/lib/widgets.js +63 -5
- package/src/lib/widgets.js.map +1 -1
- package/src/lib/widgets.mjs +63 -5
- package/src/lib/widgets.mjs.map +1 -1
- package/src/lib/yes-no.js +1 -1
- package/src/lib/yes-no.js.map +1 -1
- package/src/lib/yes-no.mjs +1 -1
- package/src/lib/yes-no.mjs.map +1 -1
package/src/lib/styles.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIELDIA_CSS = void 0;
|
|
3
|
+
exports.FIELDIA_CSS = exports.FORM_WIDTHS = void 0;
|
|
4
4
|
exports.installStyles = installStyles;
|
|
5
5
|
const styles_kinds_1 = require("./styles-kinds");
|
|
6
6
|
const styles_choices_1 = require("./styles-choices");
|
|
7
7
|
const styles_inputs_1 = require("./styles-inputs");
|
|
8
|
+
const styles_parts_1 = require("./styles-parts");
|
|
9
|
+
const styles_sheet_1 = require("./styles-sheet");
|
|
10
|
+
const styles_business_1 = require("./styles-business");
|
|
8
11
|
/**
|
|
9
12
|
* Fieldia's stylesheet: two skins and the layout chrome, all scoped to the
|
|
10
13
|
* form's own root (`.fd-form[data-fd-skin=…]`), so two forms on one page can
|
|
@@ -19,6 +22,13 @@ const styles_inputs_1 = require("./styles-inputs");
|
|
|
19
22
|
* form mirrors without a second stylesheet.
|
|
20
23
|
*/
|
|
21
24
|
const layout_styles_1 = require("./layout-styles");
|
|
25
|
+
/**
|
|
26
|
+
* The widths of a form at which its groups take their medium and their narrow
|
|
27
|
+
* columns: up to 760px and up to 520px of the form's own width, as the
|
|
28
|
+
* stylesheet's @container rules say (a spec holds the two together). What
|
|
29
|
+
* shows a form at a width — the designer's canvas — asks these.
|
|
30
|
+
*/
|
|
31
|
+
exports.FORM_WIDTHS = { medium: 760, narrow: 520 };
|
|
22
32
|
/** The skins and the parts' chrome. One literal, so the script bundle can minify it as CSS. */
|
|
23
33
|
const SKINS_CSS = /* css */ `
|
|
24
34
|
/* .fd-theme carries the same tokens for things outside a form, such as a dialog over the page. One inside a form
|
|
@@ -115,6 +125,9 @@ const SKINS_CSS = /* css */ `
|
|
|
115
125
|
align-items: start;
|
|
116
126
|
}
|
|
117
127
|
.fd-grid > * { grid-column: span min(var(--fd-span, 1), var(--fd-cols)); }
|
|
128
|
+
/* Twelfths keep the page's gap while it takes under half their width, so they line up with the columns
|
|
129
|
+
round them; in a narrow column it shrinks with them instead of pushing past its edge. */
|
|
130
|
+
.fd-grid[data-twelfths] { column-gap: min(var(--fd-gap-x), 100% / 24); }
|
|
118
131
|
.fd-field { display: grid; gap: 4px; min-width: 0; }
|
|
119
132
|
.fd-label { font-weight: var(--fd-label-weight); color: var(--fd-text); }
|
|
120
133
|
/* The ✓ of a field filled in right, by its label. */
|
|
@@ -123,6 +136,12 @@ const SKINS_CSS = /* css */ `
|
|
|
123
136
|
.fd-form[data-fd-skin="outlined"] .fd-field.fd-required > .fd-label::after { content: ""; }
|
|
124
137
|
.fd-form[data-fd-skin="outlined"] .fd-field.fd-required > .fd-label::before { content: "* "; color: var(--fd-error); }
|
|
125
138
|
.fd-help { color: var(--fd-muted); font-size: 12.5px; }
|
|
139
|
+
/* A field's help behind a (?) by its label: a bubble on hover, focus or a tap. */
|
|
140
|
+
.fd-help-tip-wrap { position: relative; display: inline-flex; vertical-align: 0.05em; margin-inline-start: 6px; }
|
|
141
|
+
.fd-help-tip { all: unset; box-sizing: border-box; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--fd-border); border-radius: 50%; color: var(--fd-muted); font-size: 11px; font-weight: 600; line-height: 1; cursor: help; }
|
|
142
|
+
.fd-help-tip:hover, .fd-help-tip[aria-expanded="true"] { color: var(--fd-accent); border-color: var(--fd-accent); }
|
|
143
|
+
.fd-help-tip:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; }
|
|
144
|
+
.fd-help-bubble { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-start: -8px; z-index: 30; width: max-content; max-width: min(280px, 70vw); padding: 6px 9px; border-radius: 6px; background: var(--fd-text); color: var(--fd-surface); font-size: 12.5px; font-weight: 400; line-height: 1.4; white-space: normal; box-shadow: 0 6px 18px rgb(0 0 0 / 0.18); }
|
|
126
145
|
/*
|
|
127
146
|
* A page's words run the way they are written — a sentence left in English on
|
|
128
147
|
* an Arabic page keeps its full stop at its end — and line up with the form.
|
|
@@ -150,6 +169,18 @@ const SKINS_CSS = /* css */ `
|
|
|
150
169
|
.fd-form[data-fd-skin="underline"] .fd-field[data-type="one2many"] { grid-template-columns: minmax(0, 1fr); }
|
|
151
170
|
.fd-form[data-fd-skin="underline"] .fd-field[data-type="one2many"] > * { grid-column: 1 !important; }
|
|
152
171
|
.fd-form[data-fd-skin="underline"] .fd-field:where(:not([data-labels])) > :not(.fd-label) { grid-column: 2; }
|
|
172
|
+
/* A row of twelfths led by a field with its label beside — the skin's (data-row="skin") or the page's
|
|
173
|
+
("beside") — Flectra's o_row: that label sits with the labels round it, the parts share the values' room. */
|
|
174
|
+
.fd-form[data-fd-skin="underline"] .fd-section[data-row="skin"] { --fd-row-label: var(--fd-label-width, 11em); --fd-row-gap: 12px; --fd-row-place: absolute; --fd-row-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2)); }
|
|
175
|
+
.fd-form .fd-section[data-row="beside"] { --fd-row-label: var(--fd-label-width, 140px); --fd-row-gap: 14px; --fd-row-place: absolute; --fd-row-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2)); }
|
|
176
|
+
.fd-form .fd-section[data-row] { padding-inline-start: calc(var(--fd-row-label, 0px) + var(--fd-row-gap, 0px)); }
|
|
177
|
+
.fd-form .fd-section[data-row] > .fd-grid > .fd-field:first-child { grid-template-columns: minmax(0, 1fr); position: relative; }
|
|
178
|
+
.fd-form .fd-section[data-row] > .fd-grid > .fd-field:first-child > :not(.fd-label) { grid-column: 1; }
|
|
179
|
+
.fd-form .fd-section[data-row] > .fd-grid > .fd-field:first-child > .fd-label {
|
|
180
|
+
/* Out of the field's own box, back over the row's room for it — where the row has one. */
|
|
181
|
+
position: var(--fd-row-place, static); inset-inline-start: calc(-1 * (var(--fd-row-label, 0px) + var(--fd-row-gap, 0px))); inset-block-start: 0;
|
|
182
|
+
width: var(--fd-row-label, auto); padding-block-start: var(--fd-row-drop, 0px);
|
|
183
|
+
}
|
|
153
184
|
/* A label beside every value needs room twice over: the underline skin stacks its columns sooner. */
|
|
154
185
|
@container (max-width: 760px) {
|
|
155
186
|
.fd-form[data-fd-skin="underline"] .fd-grid { --fd-cols: 1; }
|
|
@@ -161,6 +192,9 @@ const SKINS_CSS = /* css */ `
|
|
|
161
192
|
}
|
|
162
193
|
@container (max-width: 520px) {
|
|
163
194
|
.fd-grid { --fd-cols: 1; }
|
|
195
|
+
/* Labels go above here: a row's first one too, the parts stacked under it. */
|
|
196
|
+
.fd-form .fd-section.fd-section[data-row] { --fd-row-label: auto; --fd-row-gap: 0px; --fd-row-place: static; --fd-row-drop: 0px; }
|
|
197
|
+
.fd-form .fd-section[data-row] { padding-inline-start: 0; }
|
|
164
198
|
.fd-form[data-fd-skin="underline"] .fd-field:where(:not([data-labels])) { grid-template-columns: minmax(0, 1fr); }
|
|
165
199
|
.fd-form[data-fd-skin="underline"] .fd-field:where(:not([data-labels])) > * { grid-column: 1 !important; }
|
|
166
200
|
/* The narrow count, or one column when only the medium one was given. */
|
|
@@ -195,6 +229,9 @@ const SKINS_CSS = /* css */ `
|
|
|
195
229
|
/* A whole form locked reads as a record: plain values in either skin, no boxes, and no prompts to type. */
|
|
196
230
|
.fd-form[data-readonly] .fd-input[readonly] { background: transparent; border-color: transparent; padding-inline: 0; color: var(--fd-text); }
|
|
197
231
|
.fd-form[data-readonly] .fd-input::placeholder { color: transparent; }
|
|
232
|
+
/* Nothing to read in a read-only box draws nothing, in either skin: no prompt to type, and no date's dd.mm.yyyy or its calendar. */
|
|
233
|
+
.fd-input[readonly]::placeholder, .fd-form .fd-input.fd-blank[readonly] { color: transparent; }
|
|
234
|
+
.fd-blank[readonly]::-webkit-calendar-picker-indicator { display: none; }
|
|
198
235
|
.fd-form[data-readonly] select.fd-input:disabled { appearance: none; background: transparent; border-color: transparent; padding-inline: 0; color: var(--fd-text); opacity: 1; }
|
|
199
236
|
.fd-input[aria-invalid="true"] { border-color: var(--fd-error); }
|
|
200
237
|
.fd-form[data-fd-skin="outlined"] .fd-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 2px rgba(255, 38, 5, 0.06); }
|
|
@@ -305,10 +342,66 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
305
342
|
.fd-lines-table td > .fd-checkbox, .fd-lines-table td > .fd-switch { margin-block-start: 6px; }
|
|
306
343
|
.fd-lines-table .fd-lines-grip { width: 1px; min-width: 0; padding-inline: 6px 2px; }
|
|
307
344
|
.fd-line-grip { display: block; margin-block-start: 7px; cursor: grab; }
|
|
308
|
-
.fd-line-delete { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
|
|
345
|
+
.fd-line-delete { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 4px; min-width: 24px; min-height: 24px; }
|
|
309
346
|
.fd-line-delete:hover { color: var(--fd-error); background: var(--fd-error-soft); }
|
|
347
|
+
/* A table's own rules: a line's or a cell's tone and bold (Flectra's decoration-*), and buttons on a line. */
|
|
348
|
+
.fd-lines-table [data-tone="info"] { --fd-line-tone: var(--fd-info); --fd-tone: var(--fd-info); --fd-tone-soft: var(--fd-info-soft); }
|
|
349
|
+
.fd-lines-table [data-tone="success"] { --fd-line-tone: var(--fd-success); --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
|
|
350
|
+
.fd-lines-table [data-tone="warning"] { --fd-line-tone: var(--fd-warning); --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
|
|
351
|
+
.fd-lines-table [data-tone="danger"] { --fd-line-tone: var(--fd-error); --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
|
|
352
|
+
.fd-lines-table [data-tone="muted"] { --fd-line-tone: var(--fd-muted); --fd-tone: var(--fd-muted); --fd-tone-soft: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
|
|
353
|
+
.fd-lines-table [data-tone] :is(input, select, textarea, .fd-input, .fd-display) { color: var(--fd-line-tone); -webkit-text-fill-color: var(--fd-line-tone); }
|
|
354
|
+
.fd-lines-table :is(.fd-line-bold, .fd-cell-bold) :is(input, select, textarea, .fd-input, .fd-display) { font-weight: 600; }
|
|
355
|
+
.fd-lines-table td.fd-lines-tools { white-space: nowrap; }
|
|
356
|
+
/* With buttons on some lines, every line's × keeps to the end, so they line up. */
|
|
357
|
+
.fd-lines-table:has(.fd-line-button) td.fd-lines-tools { text-align: end; padding-inline-end: 4px; }
|
|
358
|
+
.fd-line-button { padding: 2px 6px; font-size: 12.5px; vertical-align: middle; }
|
|
359
|
+
.fd-line-button-icon { padding: 4px; color: var(--fd-muted); }
|
|
360
|
+
.fd-line-button-icon:hover { color: var(--fd-accent); }
|
|
361
|
+
.fd-line-button svg { width: 15px; height: 15px; display: block; }
|
|
310
362
|
.fd-lines-totals td { padding: 8px; font-weight: 600; border-block-start: 1px solid var(--fd-border); font-variant-numeric: tabular-nums; }
|
|
311
363
|
.fd-lines-adds { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-self: start; }
|
|
364
|
+
.fd-lines-control { display: inline-flex; align-items: center; gap: 6px; }
|
|
365
|
+
.fd-lines-control svg, .fd-lines-chosen-button svg { width: 15px; height: 15px; }
|
|
366
|
+
/* Lines chosen for the table's buttons: a tick before each line's grip, and a bar of buttons over the table. */
|
|
367
|
+
.fd-line-lead { display: inline-flex; align-items: center; gap: 4px; margin-block-start: 6px; }
|
|
368
|
+
.fd-line-lead .fd-line-grip { margin-block-start: 0; }
|
|
369
|
+
.fd-lines-table th.fd-lines-grip:has(.fd-line-pick-all) { padding-block: 4px; }
|
|
370
|
+
.fd-lines-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; border-radius: var(--fd-radius); background: var(--fd-accent-soft); }
|
|
371
|
+
.fd-lines-chosen[hidden] { display: none; }
|
|
372
|
+
.fd-lines-chosen-count { font-weight: 600; font-size: 13px; margin-inline-end: 6px; }
|
|
373
|
+
.fd-lines-chosen-button { display: inline-flex; align-items: center; gap: 6px; padding-block: 3px; }
|
|
374
|
+
/* A line opened in a dialog: its own record's page, or its every field. */
|
|
375
|
+
.fd-lines-table .fd-line-open { border: none; background: none; cursor: pointer; color: var(--fd-accent); font-size: 14px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
|
|
376
|
+
.fd-lines-table .fd-line-open:hover { background: var(--fd-accent-soft); }
|
|
377
|
+
.fd-links-table td { vertical-align: middle; }
|
|
378
|
+
.fd-links-table .fd-value-text { padding-block: 4px; }
|
|
379
|
+
/* Columns as wide as they hold (fit: content), the widest taking what is left. */
|
|
380
|
+
.fd-lines[data-fit="content"] .fd-lines-table { width: auto; max-width: 100%; }
|
|
381
|
+
.fd-lines[data-fit="content"] .fd-lines-table td { min-width: 0; }
|
|
382
|
+
/* Lines as cards (cards: narrow on a phone, or always): each a box, every cell its column's label above its value. */
|
|
383
|
+
.fd-lines[data-cards] { container: fd-lines / inline-size; }
|
|
384
|
+
@container fd-lines (max-width: 520px) {
|
|
385
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table, .fd-lines[data-cards="narrow"] .fd-lines-table :is(tbody, tfoot) { display: block; }
|
|
386
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table thead { display: none; }
|
|
387
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; position: relative; padding: 10px 12px; margin-block-end: 8px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
|
|
388
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table td { display: block; border: none; padding: 0; min-width: 0; }
|
|
389
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table td[data-label]:not([colspan]:not([colspan="1"]))::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--fd-muted); }
|
|
390
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table td.fd-lines-grip { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; padding: 0; }
|
|
391
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table td.fd-lines-grip .fd-line-grip { display: none; }
|
|
392
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table tr:has(.fd-line-pick) { padding-inline-start: 36px; }
|
|
393
|
+
.fd-lines[data-cards="narrow"] .fd-lines-table td.fd-lines-tools { width: auto; text-align: end; }
|
|
394
|
+
.fd-lines[data-cards="narrow"] .fd-lines-totals td:empty { display: none; }
|
|
395
|
+
}
|
|
396
|
+
.fd-lines[data-cards="always"] .fd-lines-table, .fd-lines[data-cards="always"] .fd-lines-table :is(tbody, tfoot) { display: block; }
|
|
397
|
+
.fd-lines[data-cards="always"] .fd-lines-table thead { display: none; }
|
|
398
|
+
.fd-lines[data-cards="always"] .fd-lines-table tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px; position: relative; padding: 10px 12px; margin-block-end: 8px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
|
|
399
|
+
.fd-lines[data-cards="always"] .fd-lines-table td { display: block; border: none; padding: 0; min-width: 0; }
|
|
400
|
+
.fd-lines[data-cards="always"] .fd-lines-table td[data-label]:not([colspan]:not([colspan="1"]))::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--fd-muted); }
|
|
401
|
+
.fd-lines[data-cards="always"] .fd-lines-table td.fd-lines-grip, .fd-lines[data-cards="always"] .fd-lines-table td.fd-lines-tools { grid-column: 1 / -1; width: auto; }
|
|
402
|
+
.fd-lines[data-cards="always"] .fd-lines-table td.fd-lines-tools { text-align: end; }
|
|
403
|
+
.fd-line-copy { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 15px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
|
|
404
|
+
.fd-line-copy:hover { color: var(--fd-accent); background: var(--fd-accent-soft); }
|
|
312
405
|
/* A section heads the lines below it; a note reads as a remark between them. */
|
|
313
406
|
.fd-line-section td { background: var(--fd-page); }
|
|
314
407
|
.fd-line-section .fd-input { font-weight: 600; }
|
|
@@ -350,25 +443,46 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
350
443
|
.fd-file-confirm:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
|
|
351
444
|
.fd-file-note:empty { display: none; }
|
|
352
445
|
.fd-file-note { color: var(--fd-warning); }
|
|
446
|
+
/* Over the files: how many, and the switch between a list and pictures, at the end. */
|
|
447
|
+
.fd-file-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; justify-self: stretch; }
|
|
448
|
+
.fd-file-views { display: flex; gap: 2px; margin-inline-start: auto; padding: 2px; border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); background: var(--fd-page); }
|
|
449
|
+
.fd-file-views button {
|
|
450
|
+
display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; font: inherit; font-size: 13px; color: var(--fd-muted); cursor: pointer;
|
|
451
|
+
border: none; border-radius: calc(var(--fd-control-radius) - 2px); background: none;
|
|
452
|
+
}
|
|
453
|
+
.fd-file-views [aria-pressed="true"] { color: var(--fd-text); background: var(--fd-surface); box-shadow: 0 0 0 1px var(--fd-border); }
|
|
353
454
|
/* Thumbnails: tiles in a row that wraps, the picker the last of them. */
|
|
354
455
|
.fd-files-thumbs { display: flex; flex-wrap: wrap; align-items: flex-start; }
|
|
355
|
-
.fd-files-thumbs > * { flex-basis: 100%;
|
|
356
|
-
.fd-files-thumbs > .fd-files { display: contents; }
|
|
357
|
-
.fd-files-thumbs .fd-file-item, .fd-image-pick { flex: none; width: 96px; height: 96px;
|
|
358
|
-
.fd-files-thumbs > .fd-file-count { order: -1; }
|
|
456
|
+
.fd-files-thumbs > * { flex-basis: 100%; }
|
|
457
|
+
:is(.fd-files-thumbs, .fd-files-cards) > .fd-files { display: contents; }
|
|
458
|
+
.fd-files-thumbs .fd-file-item, .fd-image-pick { flex: none; width: 96px; height: 96px; }
|
|
359
459
|
.fd-files-thumbs .fd-file-open { height: 100%; padding: 6px; flex-direction: column; justify-content: center; gap: 4px; overflow: hidden; font-size: 12px; }
|
|
360
|
-
.fd-files-thumbs .fd-file-thumb { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
|
|
460
|
+
:is(.fd-files-thumbs, .fd-files-cards) .fd-file-thumb { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
|
|
361
461
|
.fd-files-thumbs .fd-file-name { flex: none; max-width: 100%; }
|
|
362
462
|
.fd-files-thumbs .fd-file-size, .fd-files-thumbs .fd-file-thumb ~ * { display: none; }
|
|
363
|
-
.fd-files-thumbs .fd-file-remove {
|
|
463
|
+
:is(.fd-files-thumbs, .fd-files-cards) .fd-file-remove {
|
|
364
464
|
position: absolute; inset-block-start: 4px; inset-inline-end: 4px; width: 26px; height: 26px; font-size: 17px;
|
|
365
465
|
background: rgba(15, 20, 25, 0.62); color: #fff; opacity: 0;
|
|
366
466
|
}
|
|
367
467
|
.fd-file-item:is(:hover, :focus-within) .fd-file-remove { opacity: 1; }
|
|
468
|
+
/* A screen with no pointer to hover with shows each tile's remove. */
|
|
469
|
+
@media (hover: none) { .fd-file-item .fd-file-remove { opacity: 1; } }
|
|
368
470
|
.fd-image-pick {
|
|
369
|
-
|
|
471
|
+
display: grid; place-content: center; justify-items: center; gap: 2px; padding: 6px; text-align: center; font-size: 12px;
|
|
370
472
|
border: 1px dashed var(--fd-border-strong); border-radius: var(--fd-control-radius); background: var(--fd-page);
|
|
371
473
|
}
|
|
474
|
+
/* Cards: a picture over each file's name, in two lines at most, and its size; as many to a row as fit. */
|
|
475
|
+
.fd-files-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
|
|
476
|
+
.fd-files-cards > * { grid-column: 1 / -1; }
|
|
477
|
+
.fd-files-cards > .fd-image-pick { grid-column: auto; justify-self: stretch; width: auto; height: auto; min-height: 96px; }
|
|
478
|
+
.fd-files-cards .fd-file-item { justify-self: stretch; align-items: stretch; }
|
|
479
|
+
.fd-files-cards .fd-file-open { flex-direction: column; align-items: stretch; gap: 2px; padding: 0 0 8px; overflow: hidden; }
|
|
480
|
+
/* The picture fills its box; with none, the kind's page, large, on the box's ground. */
|
|
481
|
+
.fd-file-picture { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; margin-block-end: 6px; background: var(--fd-page); border-block-end: 1px solid var(--fd-border); }
|
|
482
|
+
.fd-file-picture .fd-file-icon { width: 44px; height: 56px; padding-block-end: 8px; font-size: 12px; }
|
|
483
|
+
.fd-files-cards :is(.fd-file-name, .fd-file-size) { padding-inline: 8px; }
|
|
484
|
+
.fd-files-cards .fd-file-name { flex: none; flex-wrap: wrap; font-size: 13px; line-height: 1.35; }
|
|
485
|
+
.fd-files-cards .fd-file-name > span { max-width: 100%; }
|
|
372
486
|
.fd-image-pick .fd-button { border: none; background: none; color: var(--fd-accent); padding: 0; min-height: 0; font-size: 13px; }
|
|
373
487
|
/* A file open to look at: its name and tools over it, the image whole, a PDF or text filling the box. */
|
|
374
488
|
.fd-file-viewer { max-width: 1000px; height: min(88vh, 100%); background: var(--fd-surface); }
|
|
@@ -404,6 +518,7 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
404
518
|
.fd-richtext-tool svg circle { fill: currentColor; stroke: none; }
|
|
405
519
|
.fd-link-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--fd-border); border-block-end: none; background: var(--fd-surface); }
|
|
406
520
|
.fd-link-row > .fd-input { flex: 1 1 200px; min-width: 0; }
|
|
521
|
+
.fd-richtext.fd-blank[contenteditable="true"]::before { content: attr(data-placeholder); position: absolute; color: var(--fd-muted); opacity: 0.8; pointer-events: none; }
|
|
407
522
|
.fd-richtext[contenteditable="false"] { background: transparent; border-color: transparent; padding-inline: 0; min-height: 0; }
|
|
408
523
|
.fd-richtext p { margin: 0 0 6px; }
|
|
409
524
|
.fd-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; min-height: 96px; }
|
|
@@ -433,12 +548,38 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
433
548
|
.fd-form[data-fd-skin="outlined"] :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style="card"][data-on-page]) {
|
|
434
549
|
background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); padding: var(--fd-group-pad, 20px 24px);
|
|
435
550
|
}
|
|
436
|
-
|
|
551
|
+
/* A saved form placed in another: a quiet line while its page comes, and words in a dashed box when it cannot be shown. */
|
|
552
|
+
.fd-form-part-note { margin: 0; color: var(--fd-muted); font-size: 13px; }
|
|
553
|
+
.fd-form-part-problem { padding: 10px 12px; border: 1px dashed var(--fd-border); border-radius: var(--fd-radius); }
|
|
554
|
+
.fd-tablist { display: flex; gap: 2px; border-block-end: 1px solid var(--fd-border); overflow-x: auto; scrollbar-width: none; }
|
|
555
|
+
.fd-tablist::-webkit-scrollbar { display: none; }
|
|
556
|
+
/* Too long for its room: the tabs fade out at an edge with more past it, under a button that scrolls them along. */
|
|
557
|
+
.fd-tabbar { position: relative; min-width: 0; --fd-fade: to right; }
|
|
558
|
+
[dir="rtl"] .fd-tabbar { --fd-fade: to left; }
|
|
559
|
+
/* Nothing shows under a button (28px); the tabs fade in over the next 36. */
|
|
560
|
+
.fd-tabbar[data-more="start"] > .fd-tablist { mask-image: linear-gradient(var(--fd-fade), transparent 28px, #000 64px); }
|
|
561
|
+
.fd-tabbar[data-more="end"] > .fd-tablist { mask-image: linear-gradient(var(--fd-fade), #000 calc(100% - 64px), transparent calc(100% - 28px)); }
|
|
562
|
+
.fd-tabbar[data-more="start end"] > .fd-tablist { mask-image: linear-gradient(var(--fd-fade), transparent 28px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 28px)); }
|
|
563
|
+
.fd-tabs-scroll {
|
|
564
|
+
position: absolute; inset-block: 0 1px; z-index: 1; width: 28px; padding: 0; border: none; background: none; cursor: pointer;
|
|
565
|
+
color: var(--fd-muted); display: grid; place-items: center;
|
|
566
|
+
}
|
|
567
|
+
.fd-tabs-scroll[hidden] { display: none; }
|
|
568
|
+
.fd-tabs-scroll:hover { color: var(--fd-accent); }
|
|
569
|
+
.fd-tabs-scroll::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 2px 2px; }
|
|
570
|
+
.fd-tabs-before { inset-inline-start: 0; }
|
|
571
|
+
.fd-tabs-after { inset-inline-end: 0; }
|
|
572
|
+
.fd-tabs-before::before { transform: translateX(2px) rotate(45deg); }
|
|
573
|
+
.fd-tabs-after::before { transform: translateX(-2px) rotate(-135deg); }
|
|
574
|
+
[dir="rtl"] .fd-tabs-before::before { transform: translateX(-2px) rotate(-135deg); }
|
|
575
|
+
[dir="rtl"] .fd-tabs-after::before { transform: translateX(2px) rotate(45deg); }
|
|
437
576
|
.fd-tab {
|
|
438
577
|
font: inherit; background: none; border: none; cursor: pointer; padding: 8px 14px; color: var(--fd-muted);
|
|
439
578
|
border-block-end: 2px solid transparent; margin-block-end: -1px; white-space: nowrap;
|
|
440
579
|
}
|
|
441
580
|
.fd-tab[aria-selected="true"] { color: var(--fd-accent); border-block-end-color: var(--fd-accent); font-weight: 600; }
|
|
581
|
+
/* A tab with a problem in it, seen or not: a dot in the error colour after its words. */
|
|
582
|
+
.fd-tab[data-problem]::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 6px; border-radius: 50%; background: var(--fd-error); vertical-align: 0.15em; }
|
|
442
583
|
.fd-tabpanel { padding-block: 16px; display: grid; gap: 16px; }
|
|
443
584
|
|
|
444
585
|
/* ---- buttons ---------------------------------------------------------- */
|
|
@@ -486,6 +627,11 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
486
627
|
.fd-sheet-layout.fd-has-side { grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); }
|
|
487
628
|
/* The side panel goes under the sheet before the sheet is left too narrow for a label beside its value. */
|
|
488
629
|
@container (max-width: 1000px) { .fd-sheet-layout.fd-has-side { grid-template-columns: minmax(0, 1fr); } }
|
|
630
|
+
/* A part hidden at some widths of the form (hideOn): narrow up to 520px, medium up to 760px, wide above — the form's own width, as its columns. */
|
|
631
|
+
.fd-form { container-name: fd-form; }
|
|
632
|
+
@container fd-form (max-width: 520px) { .fd-form [data-hide-on~="narrow"] { display: none !important; } }
|
|
633
|
+
@container fd-form (min-width: 521px) and (max-width: 760px) { .fd-form [data-hide-on~="medium"] { display: none !important; } }
|
|
634
|
+
@container fd-form (min-width: 761px) { .fd-form [data-hide-on~="wide"] { display: none !important; } }
|
|
489
635
|
.fd-card {
|
|
490
636
|
position: relative; background: var(--fd-surface); border: 1px solid var(--fd-border);
|
|
491
637
|
border-radius: var(--fd-radius); padding: 24px 28px 28px; display: grid; gap: 18px; min-width: 0;
|
|
@@ -495,14 +641,15 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
495
641
|
.fd-ribbon-frame { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
|
|
496
642
|
.fd-ribbon {
|
|
497
643
|
position: absolute; inset-block-start: 18px; inset-inline-end: -42px; transform: rotate(45deg); width: 160px;
|
|
498
|
-
text-align: center; font-size: 12px; font-weight: 700; padding: 4px 0; color: #fff; background:
|
|
644
|
+
text-align: center; font-size: 12px; font-weight: 700; padding: 4px 0; color: #fff; background: #5f6670;
|
|
499
645
|
text-transform: uppercase; letter-spacing: 0.06em; pointer-events: none;
|
|
500
646
|
}
|
|
501
647
|
[dir="rtl"] .fd-ribbon { transform: rotate(-45deg); }
|
|
502
|
-
|
|
503
|
-
.fd-ribbon.fd-tone-
|
|
504
|
-
.fd-ribbon.fd-tone-
|
|
505
|
-
.fd-ribbon.fd-tone-
|
|
648
|
+
/* White words on a ribbon in either scheme: fixed, deep colours, each at least 5:1 against white. */
|
|
649
|
+
.fd-ribbon.fd-tone-danger { background: #c63c3d; }
|
|
650
|
+
.fd-ribbon.fd-tone-success { background: #2e7d32; }
|
|
651
|
+
.fd-ribbon.fd-tone-warning { background: #a14f00; }
|
|
652
|
+
.fd-ribbon.fd-tone-info { background: #1365d9; }
|
|
506
653
|
.fd-alert { padding: 10px 14px; border-radius: var(--fd-control-radius); border: 1px solid; font-size: 13.5px; display: flex; align-items: flex-start; gap: 10px; }
|
|
507
654
|
.fd-alert-message { flex: 1 1 auto; min-width: 0; }
|
|
508
655
|
.fd-alert-close { border: none; background: none; color: inherit; cursor: pointer; font: inherit; font-size: 18px; line-height: 1; padding: 0 4px; border-radius: 4px; opacity: 0.75; }
|
|
@@ -569,6 +716,23 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
569
716
|
.fd-progress { display: grid; gap: 8px; }
|
|
570
717
|
.fd-progress-text { color: var(--fd-muted); font-size: 13px; }
|
|
571
718
|
.fd-value-text { display: block; padding-block: 6px; font-variant-numeric: tabular-nums; }
|
|
719
|
+
/* A field's own value in a tone while a condition holds, and in bold (Flectra's decoration-* on a field). */
|
|
720
|
+
.fd-field[data-tone="info"] { --fd-tone: var(--fd-info); --fd-tone-soft: var(--fd-info-soft); }
|
|
721
|
+
.fd-field[data-tone="success"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
|
|
722
|
+
.fd-field[data-tone="warning"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
|
|
723
|
+
.fd-field[data-tone="danger"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
|
|
724
|
+
.fd-field[data-tone="muted"] { --fd-tone: var(--fd-muted); --fd-tone-soft: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
|
|
725
|
+
.fd-field[data-tone] :is(input, select, textarea, .fd-value-text, .fd-pending) { color: var(--fd-tone); -webkit-text-fill-color: var(--fd-tone); }
|
|
726
|
+
.fd-field.fd-value-bold :is(input, select, textarea, .fd-value-text, .fd-pending, .fd-value-badge) { font-weight: 700; }
|
|
727
|
+
/* A value as a pill (widget badge): grey, or its tone's colour on its soft shade. */
|
|
728
|
+
.fd-value-badge { justify-self: start; align-self: center; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; line-height: 18px; font-weight: 500; color: var(--fd-tone, var(--fd-muted)); background: var(--fd-tone-soft, color-mix(in srgb, var(--fd-tone, var(--fd-muted)) 14%, transparent)); }
|
|
729
|
+
.fd-value-badge[hidden] { display: none; }
|
|
730
|
+
/* A value given its own tone by options.tones, over the part's. */
|
|
731
|
+
.fd-value-badge[data-tone="info"] { --fd-tone: var(--fd-info); --fd-tone-soft: var(--fd-info-soft); }
|
|
732
|
+
.fd-value-badge[data-tone="success"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
|
|
733
|
+
.fd-value-badge[data-tone="warning"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
|
|
734
|
+
.fd-value-badge[data-tone="danger"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
|
|
735
|
+
.fd-value-badge[data-tone="muted"] { --fd-tone: var(--fd-muted); --fd-tone-soft: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
|
|
572
736
|
.fd-date-pick { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
573
737
|
.fd-date-pick > .fd-input { flex: 1 1 auto; min-width: 0; }
|
|
574
738
|
.fd-calendar-button {
|
|
@@ -700,8 +864,34 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
700
864
|
.fd-dialog {
|
|
701
865
|
background: var(--fd-surface); color: var(--fd-text); border-radius: max(var(--fd-radius), 6px); max-width: 420px; width: 100%;
|
|
702
866
|
padding: 20px 22px; display: grid; gap: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); font-family: var(--fd-font);
|
|
867
|
+
/* An edge of its own: in the dark scheme a shadow is lost on the dimmed page, so the box would barely stand out. */
|
|
868
|
+
border: 1px solid var(--fd-edge, transparent);
|
|
703
869
|
}
|
|
704
870
|
.fd-dialog p { margin: 0; }
|
|
871
|
+
/* Words a step says: toasts at the foot of the screen, one over another, each in its tone; over the page and over a dialog or panel, whose own words they are too. */
|
|
872
|
+
.fd-says {
|
|
873
|
+
position: fixed; inset-inline: 16px; inset-block-end: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 1100;
|
|
874
|
+
display: grid; justify-items: center; gap: 8px; pointer-events: none;
|
|
875
|
+
}
|
|
876
|
+
.fd-say {
|
|
877
|
+
pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 420px;
|
|
878
|
+
padding-block: 8px; padding-inline: 14px 6px; border: 1px solid var(--fd-border); border-inline-start: 4px solid var(--fd-tone);
|
|
879
|
+
border-radius: max(var(--fd-control-radius), 6px); background: var(--fd-surface); color: var(--fd-text);
|
|
880
|
+
box-shadow: 0 8px 24px rgba(15, 20, 25, 0.25); font-size: 13.5px;
|
|
881
|
+
}
|
|
882
|
+
.fd-say > span { flex: 1 1 auto; min-width: 0; }
|
|
883
|
+
/* A button whose steps are running: busy, a turning ring beside its words, not pressed again. */
|
|
884
|
+
.fd-button[aria-busy="true"], .fd-stat[aria-busy="true"] { cursor: progress; }
|
|
885
|
+
.fd-button[aria-busy="true"]::after {
|
|
886
|
+
content: ""; width: 0.85em; height: 0.85em; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%;
|
|
887
|
+
animation: fd-spin 0.8s linear infinite;
|
|
888
|
+
}
|
|
889
|
+
@keyframes fd-spin { to { rotate: 1turn; } }
|
|
890
|
+
/* A page opened in a form's place: Back over it, the way the page reads. */
|
|
891
|
+
.fd-back { margin: 8px 12px; }
|
|
892
|
+
.fd-back::before { content: "←"; }
|
|
893
|
+
.fd-back:dir(rtl)::before { content: "→"; }
|
|
894
|
+
.fd-form[data-scheme] > .fd-back { margin: 12px 20px 0; }
|
|
705
895
|
/* A page in a dialog: a head with its title and ×, a body that scrolls, a foot with Discard and Save & Close. */
|
|
706
896
|
.fd-form-dialog {
|
|
707
897
|
display: flex; flex-direction: column; width: 100%; max-height: min(90vh, 100%); min-height: 0;
|
|
@@ -712,8 +902,10 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
712
902
|
.fd-form-dialog.fd-size-small { max-width: 440px; }
|
|
713
903
|
.fd-form-dialog.fd-size-medium { max-width: 760px; }
|
|
714
904
|
.fd-form-dialog.fd-size-large { max-width: 1080px; }
|
|
715
|
-
|
|
716
|
-
.fd-form-dialog.fd-size-full
|
|
905
|
+
/* A dialog of the full size, and a panel (below): the whole height, square, nothing round it. */
|
|
906
|
+
.fd-form-dialog-backdrop:has(> .fd-size-full), .fd-form-panel-backdrop { padding: 0; }
|
|
907
|
+
.fd-form-dialog:is(.fd-size-full, .fd-form-panel) { max-height: none; height: 100%; border-radius: 0; }
|
|
908
|
+
.fd-size-full { max-width: none; }
|
|
717
909
|
.fd-form-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-block-end: 1px solid var(--fd-border); background: var(--fd-surface); }
|
|
718
910
|
.fd-form-dialog-title { margin: 0; font-size: 16px; font-weight: 600; }
|
|
719
911
|
.fd-dialog-close { border: none; background: none; cursor: pointer; font-size: 22px; line-height: 1; padding: 2px 8px; border-radius: 4px; color: var(--fd-muted); }
|
|
@@ -734,10 +926,33 @@ button.fd-chip-label:hover { text-decoration: underline; }
|
|
|
734
926
|
/* A page with no sheet of its own sits on the dialog's surface, clear of its edges. */
|
|
735
927
|
.fd-form-dialog-body:not(:has(.fd-sheet-layout)) { background: var(--fd-surface); padding: 16px 20px 20px; }
|
|
736
928
|
.fd-form-dialog-foot { padding: 12px 16px; border-block-start: 1px solid var(--fd-border); background: var(--fd-surface); margin: 0; }
|
|
737
|
-
|
|
929
|
+
/* A page in a side panel: at the inline-end edge unless it names another, the page behind dimmed, sliding in from its edge; on a phone, the whole screen. */
|
|
930
|
+
.fd-form-panel-backdrop { justify-items: end; }
|
|
931
|
+
.fd-form-panel { max-width: 560px; position: relative; }
|
|
932
|
+
/* Its question before changes are dropped sits over the panel, not over the page. */
|
|
933
|
+
.fd-form-panel > .fd-dialog-backdrop { position: absolute; }
|
|
934
|
+
.fd-width-narrow { max-width: 420px; }
|
|
935
|
+
.fd-width-wide { max-width: 720px; }
|
|
936
|
+
/* The other edges: the start of the line as the page reads; the left, right, top or bottom whatever it reads, the top and bottom the whole width.
|
|
937
|
+
Each says where its slide starts (--fd-from) and which edge it steps back from (--fd-back): the right unless told. */
|
|
938
|
+
.fd-form-panel[data-side="start"] { justify-self: start; }
|
|
939
|
+
.fd-form-panel[data-side="left"] { justify-self: left; }
|
|
940
|
+
.fd-form-panel[data-side="right"] { justify-self: right; }
|
|
941
|
+
.fd-form-panel[data-side="top"] { align-self: start; --fd-from: 0 -100%; --fd-back: 48px 0 0; }
|
|
942
|
+
.fd-form-panel[data-side="bottom"] { align-self: end; --fd-from: 0 100%; --fd-back: 0 0 48px; }
|
|
943
|
+
.fd-form-panel[data-side="end"]:dir(rtl), .fd-form-panel[data-side="start"]:dir(ltr), .fd-form-panel[data-side="left"] { --fd-from: -100% 0; --fd-back: 0 0 0 48px; }
|
|
944
|
+
.fd-form-panel:is([data-side="top"], [data-side="bottom"]) { max-width: none; height: 60%; }
|
|
945
|
+
.fd-form-panel.fd-height-short { height: 40%; }
|
|
946
|
+
.fd-form-panel.fd-height-tall { height: 85%; }
|
|
947
|
+
/* A panel opened from another: the older one steps back from its own edge, still in sight. */
|
|
948
|
+
.fd-form-panel[data-behind] { margin: var(--fd-back, 0 48px 0 0); }
|
|
949
|
+
@media (max-width: 600px) { .fd-form-dialog.fd-form-panel[data-side] { max-width: none; height: 100%; margin: 0; --fd-from: 0 100%; } .fd-form-dialog.fd-form-panel[data-side="top"] { --fd-from: 0 -100%; } }
|
|
950
|
+
@media (prefers-reduced-motion: no-preference) { .fd-form-panel { animation: fd-slide 0.25s ease-out; transition: margin 0.2s; } }
|
|
951
|
+
@keyframes fd-slide { from { translate: var(--fd-from, 100% 0); } }
|
|
952
|
+
@media (prefers-reduced-motion: reduce) { .fd-form *, .fd-form *::before, .fd-form *::after { transition: none !important; } .fd-button[aria-busy="true"]::after { animation: none; } }
|
|
738
953
|
`;
|
|
739
954
|
/** Fieldia's whole stylesheet: the skins, then the layout over them, the inputs' details, the question kinds and the choices' details. */
|
|
740
|
-
exports.FIELDIA_CSS = SKINS_CSS + layout_styles_1.LAYOUT_CSS + styles_inputs_1.INPUTS_CSS + styles_kinds_1.KINDS_CSS + styles_choices_1.CHOICES_CSS;
|
|
955
|
+
exports.FIELDIA_CSS = SKINS_CSS + layout_styles_1.LAYOUT_CSS + styles_inputs_1.INPUTS_CSS + styles_sheet_1.SHEET_CSS + styles_business_1.BUSINESS_CSS + styles_kinds_1.KINDS_CSS + styles_choices_1.CHOICES_CSS + styles_parts_1.PARTS_CSS;
|
|
741
956
|
const STYLE_ID = 'fieldia-styles';
|
|
742
957
|
/** Add Fieldia's stylesheet to a document, once. */
|
|
743
958
|
function installStyles(document) {
|
package/src/lib/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles.ts"],"names":[],"mappings":";;;AA+7BA,sCAMC;AAr8BD,iDAA2C;AAC3C,qDAA+C;AAC/C,mDAA6C;AAC7C,iDAA2C;AAC3C,iDAA2C;AAC3C,uDAAiD;AAEjD;;;;;;;;;;;;GAYG;AACH,mDAA6C;AAE7C;;;;;GAKG;AACU,QAAA,WAAW,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAW,CAAC;AAEjE,+FAA+F;AAC/F,MAAM,SAAS,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAw5B3B,CAAC;AAEF,0IAA0I;AAC7H,QAAA,WAAW,GAAG,SAAS,GAAG,0BAAU,GAAG,0BAAU,GAAG,wBAAS,GAAG,8BAAY,GAAG,wBAAS,GAAG,4BAAW,GAAG,wBAAS,CAAC;AAEhI,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AAElC,oDAAoD;AACpD,SAAgB,aAAa,CAAC,QAAkB;IAC9C,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,mBAAW,CAAC;IAChC,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC"}
|