@fieldia/widgets 0.11.0 → 0.13.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/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 +6 -4
- package/src/lib/choice-tags.js.map +1 -1
- package/src/lib/choice-tags.mjs +6 -4
- 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 +19 -0
- package/src/lib/files.js.map +1 -1
- package/src/lib/files.mjs +18 -0
- package/src/lib/files.mjs.map +1 -1
- package/src/lib/float.d.mts +14 -0
- package/src/lib/float.d.ts +14 -0
- package/src/lib/float.js +91 -0
- package/src/lib/float.js.map +1 -0
- package/src/lib/float.mjs +88 -0
- package/src/lib/float.mjs.map +1 -0
- 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 +39 -0
- package/src/lib/labels.d.ts +39 -0
- package/src/lib/labels.js +29 -0
- package/src/lib/labels.js.map +1 -1
- package/src/lib/labels.mjs +29 -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 +12 -5
- package/src/lib/layout-styles.js.map +1 -1
- package/src/lib/layout-styles.mjs +12 -5
- 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 +372 -25
- package/src/lib/lines.js.map +1 -1
- package/src/lib/lines.mjs +371 -26
- 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 +29 -0
- package/src/lib/locales/ar.js.map +1 -1
- package/src/lib/locales/ar.mjs +29 -0
- package/src/lib/locales/ar.mjs.map +1 -1
- package/src/lib/locales/de.js +29 -0
- package/src/lib/locales/de.js.map +1 -1
- package/src/lib/locales/de.mjs +29 -0
- package/src/lib/locales/de.mjs.map +1 -1
- package/src/lib/locales/fr.js +29 -0
- package/src/lib/locales/fr.js.map +1 -1
- package/src/lib/locales/fr.mjs +29 -0
- package/src/lib/locales/fr.mjs.map +1 -1
- package/src/lib/numbers.d.mts +5 -1
- package/src/lib/numbers.d.ts +5 -1
- package/src/lib/numbers.js +15 -2
- package/src/lib/numbers.js.map +1 -1
- package/src/lib/numbers.mjs +13 -2
- package/src/lib/numbers.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 +110 -10
- package/src/lib/relations.js.map +1 -1
- package/src/lib/relations.mjs +108 -10
- 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-inputs.d.mts +1 -1
- package/src/lib/styles-inputs.d.ts +1 -1
- package/src/lib/styles-inputs.js +2 -0
- package/src/lib/styles-inputs.js.map +1 -1
- package/src/lib/styles-inputs.mjs +2 -0
- package/src/lib/styles-inputs.mjs.map +1 -1
- package/src/lib/styles-kinds.d.mts +1 -1
- package/src/lib/styles-kinds.d.ts +1 -1
- package/src/lib/styles-kinds.js +2 -2
- package/src/lib/styles-kinds.mjs +2 -2
- package/src/lib/styles-sheet.d.mts +6 -0
- package/src/lib/styles-sheet.d.ts +6 -0
- package/src/lib/styles-sheet.js +139 -0
- package/src/lib/styles-sheet.js.map +1 -0
- package/src/lib/styles-sheet.mjs +136 -0
- package/src/lib/styles-sheet.mjs.map +1 -0
- package/src/lib/styles.js +223 -27
- package/src/lib/styles.js.map +1 -1
- package/src/lib/styles.mjs +223 -27
- 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/themes.d.mts +29 -0
- package/src/lib/themes.d.ts +29 -0
- package/src/lib/themes.js +180 -0
- package/src/lib/themes.js.map +1 -0
- package/src/lib/themes.mjs +177 -0
- package/src/lib/themes.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 +89 -10
- package/src/lib/widgets.js.map +1 -1
- package/src/lib/widgets.mjs +90 -11
- 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
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SHEET_CSS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* How a record sheet reads, as Flectra draws one: read-only values as words.
|
|
6
|
+
* Appended to Fieldia's stylesheet, scoped and written with logical
|
|
7
|
+
* properties as the rest of it is.
|
|
8
|
+
*/
|
|
9
|
+
exports.SHEET_CSS = `
|
|
10
|
+
/* ---- a sheet's reading ----------------------------------------------------- */
|
|
11
|
+
/* A read-only value as its words: on the line a box's words would sit on, wrapped rather than cut at the box's edge. */
|
|
12
|
+
.fd-read-text {
|
|
13
|
+
min-width: 0; min-height: var(--fd-control-height, 30px); padding-block: calc(var(--fd-pad-y) + 1px);
|
|
14
|
+
white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; color: var(--fd-text);
|
|
15
|
+
}
|
|
16
|
+
.fd-field:is([data-type="integer"], [data-type="float"], [data-type="monetary"]) > .fd-read-text { font-variant-numeric: tabular-nums; }
|
|
17
|
+
/* A record's words read their own way — English on a page read right to left keeps its order — lined up with the page. */
|
|
18
|
+
.fd-read-text { unicode-bidi: plaintext; text-align: left; }
|
|
19
|
+
[dir="rtl"] .fd-read-text { text-align: right; }
|
|
20
|
+
/* Its words start where a box's words do, inside the box's padding (and an outlined box's border). */
|
|
21
|
+
.fd-read-text { padding-inline: var(--fd-pad-x); }
|
|
22
|
+
.fd-form[data-fd-skin="outlined"] .fd-read-text { padding-inline: calc(var(--fd-pad-x) + 1px); }
|
|
23
|
+
/* A sheet's title stays flush with the labels under it, as it was drawn. */
|
|
24
|
+
.fd-form :is(.fd-title, .fd-title-line) .fd-read-text { padding-inline: 0; }
|
|
25
|
+
.fd-read-text a, .fd-read-link { color: var(--fd-accent); text-decoration: none; }
|
|
26
|
+
.fd-read-link { border: none; background: none; padding: 0; font: inherit; cursor: pointer; text-align: start; }
|
|
27
|
+
.fd-read-text a:hover, .fd-read-link:hover { text-decoration: underline; }
|
|
28
|
+
.fd-read-link:focus-visible, .fd-read-text a:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; border-radius: 2px; }
|
|
29
|
+
/* A choice as a coloured pill, as wide as its words, on the line a box's words sit on. */
|
|
30
|
+
.fd-field > .fd-value-badge { justify-self: start; align-self: start; width: fit-content; margin-block: calc((var(--fd-control-height, 30px) - 24px) / 2); }
|
|
31
|
+
.fd-title > .fd-field > .fd-read-text { font-size: 24px; font-weight: 600; line-height: 1.25; }
|
|
32
|
+
/* A ribbon with words to point at takes the pointer, though its frame lets clicks through. */
|
|
33
|
+
.fd-ribbon[title] { pointer-events: auto; cursor: help; }
|
|
34
|
+
/* A field's value inside an alert's or a text's words, set apart by its weight. */
|
|
35
|
+
.fd-value { font-weight: 600; }
|
|
36
|
+
/* An alert's own buttons, after its words: links in the alert's colour, wrapping under the words on a narrow screen. */
|
|
37
|
+
.fd-alert:has(> .fd-alert-actions) { flex-wrap: wrap; align-items: baseline; }
|
|
38
|
+
.fd-alert-actions { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
|
|
39
|
+
.fd-alert-actions .fd-button { min-height: 0; padding-block: 0; font-size: inherit; }
|
|
40
|
+
.fd-alert-actions .fd-button-link { color: inherit; padding-inline: 0; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
|
|
41
|
+
/* An alert among a page's parts, as Flectra's in a tab: across its row. */
|
|
42
|
+
.fd-text-alert { grid-column: 1 / -1; margin: 0; }
|
|
43
|
+
/* The first alert on a card clears the ribbon in its corner, when no stat buttons stand between them. */
|
|
44
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) > :is(.fd-ribbon-frame + .fd-alert, .fd-ribbon-frame + .fd-stats[hidden] + .fd-alert) { margin-inline-end: 72px; }
|
|
45
|
+
/* A stat button with two values, each after its words, one over the other: "In: 3", "Out: 5". */
|
|
46
|
+
.fd-stat-pair { gap: 1px; }
|
|
47
|
+
.fd-stat-row { display: inline-flex; align-items: baseline; gap: 5px; }
|
|
48
|
+
.fd-stat-row > .fd-stat-label::after { content: ":"; }
|
|
49
|
+
.fd-stat-pair .fd-stat-value { font-size: 13.5px; }
|
|
50
|
+
/* On a phone, stat buttons two to a row, edged between them, clear of a ribbon in the corner. */
|
|
51
|
+
@container (max-width: 520px) {
|
|
52
|
+
.fd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
53
|
+
.fd-stat { min-width: 0; padding-inline: 12px; text-align: start; column-gap: 8px; }
|
|
54
|
+
.fd-stat:has(> .fd-icon) { column-gap: 8px; }
|
|
55
|
+
.fd-stat-value { font-size: 14px; }
|
|
56
|
+
.fd-stat:nth-child(odd of :not([hidden])) { border-inline-start: none; }
|
|
57
|
+
.fd-stat:nth-child(n + 3 of :not([hidden])) { border-block-start: 1px solid var(--fd-border); }
|
|
58
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stats { padding-inline-end: 0; }
|
|
59
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stat:nth-child(2 of :not([hidden])) { padding-inline-end: 64px; }
|
|
60
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stat:nth-child(4 of :not([hidden])) { padding-inline-end: 36px; }
|
|
61
|
+
}
|
|
62
|
+
/* A statusbar's time spent in a step, after its words; its folded stages under More, in a menu fixed to the page so the bar's scrolling never cuts it. */
|
|
63
|
+
.fd-step-time { margin-inline-start: 6px; font-size: 11.5px; font-weight: 400; font-variant-numeric: tabular-nums; }
|
|
64
|
+
.fd-statusbar li.fd-step-more > button { padding-inline: 16px 20px; letter-spacing: 1px; }
|
|
65
|
+
.fd-statusbar li.fd-step-more > .fd-step-menu {
|
|
66
|
+
position: fixed; z-index: 30; display: grid; min-width: 160px; margin: 0; padding: 4px 0; clip-path: none; transform: none;
|
|
67
|
+
background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: max(var(--fd-control-radius), 4px);
|
|
68
|
+
box-shadow: 0 8px 24px rgba(15, 20, 25, 0.12); white-space: nowrap;
|
|
69
|
+
}
|
|
70
|
+
.fd-statusbar li.fd-step-more > .fd-step-menu[hidden] { display: none; }
|
|
71
|
+
.fd-statusbar .fd-step-menu > button {
|
|
72
|
+
font: inherit; font-size: 13px; text-align: start; border: none; background: none; color: inherit; padding: 6px 14px; cursor: pointer; transform: none;
|
|
73
|
+
}
|
|
74
|
+
.fd-statusbar .fd-step-menu > button:hover:not(:disabled), .fd-statusbar .fd-step-menu > button:focus-visible { background: var(--fd-accent-soft); outline: none; }
|
|
75
|
+
.fd-statusbar .fd-step-menu > button:disabled { cursor: default; color: var(--fd-muted); }
|
|
76
|
+
/* A button's key, shown on it while Alt is held, as Flectra shows its hotkeys. */
|
|
77
|
+
.fd-hotkey { display: none; }
|
|
78
|
+
[data-hotkeys] .fd-hotkey {
|
|
79
|
+
display: inline-block; margin-inline-start: 6px; padding: 0 4px; border: 1px solid currentColor; border-radius: 3px;
|
|
80
|
+
font: 600 10.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: 0.85; vertical-align: 1px;
|
|
81
|
+
}
|
|
82
|
+
/* A link's picture, or its initials, in a circle before its name; lines of the record — an address — under the link. */
|
|
83
|
+
.fd-link-avatar {
|
|
84
|
+
flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
|
|
85
|
+
background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 10px; font-weight: 700; line-height: 1; vertical-align: middle;
|
|
86
|
+
}
|
|
87
|
+
.fd-link-avatar img { width: 100%; height: 100%; object-fit: cover; }
|
|
88
|
+
.fd-combo[data-avatar] > .fd-link-avatar { position: absolute; inset-inline-start: 4px; pointer-events: none; }
|
|
89
|
+
.fd-combo[data-avatar] > .fd-link-avatar[hidden] ~ .fd-combo-input { padding-inline-start: var(--fd-pad-x); }
|
|
90
|
+
.fd-combo[data-avatar] > .fd-link-avatar:not([hidden]) ~ .fd-combo-input { padding-inline-start: 32px; }
|
|
91
|
+
.fd-form[data-fd-skin="underline"] .fd-combo[data-avatar] > .fd-link-avatar { inset-inline-start: 0; }
|
|
92
|
+
.fd-form[data-fd-skin="underline"] .fd-combo[data-avatar] > .fd-link-avatar:not([hidden]) ~ .fd-combo-input { padding-inline-start: 28px; }
|
|
93
|
+
.fd-read-text > .fd-link-avatar { margin-inline-end: 6px; }
|
|
94
|
+
.fd-chip > .fd-link-avatar { width: 18px; height: 18px; font-size: 9px; margin-inline: -4px 2px; }
|
|
95
|
+
.fd-link { display: grid; gap: 2px; min-width: 0; }
|
|
96
|
+
.fd-link-details { font-size: 12.5px; line-height: 1.4; color: var(--fd-muted); text-align: left; }
|
|
97
|
+
[dir="rtl"] .fd-link-details { text-align: right; }
|
|
98
|
+
.fd-link-details > div { unicode-bidi: plaintext; }
|
|
99
|
+
/* Tags in their record's colour, as Flectra numbers them, soft enough to read in either scheme. */
|
|
100
|
+
.fd-chip[data-color] { background: color-mix(in srgb, var(--fd-tag) 18%, var(--fd-surface)); border-color: color-mix(in srgb, var(--fd-tag) 55%, var(--fd-surface)); }
|
|
101
|
+
.fd-chip[data-color="1"] { --fd-tag: #f06050; } .fd-chip[data-color="2"] { --fd-tag: #f4a460; } .fd-chip[data-color="3"] { --fd-tag: #f7cd1f; }
|
|
102
|
+
.fd-chip[data-color="4"] { --fd-tag: #6cc1ed; } .fd-chip[data-color="5"] { --fd-tag: #814968; } .fd-chip[data-color="6"] { --fd-tag: #eb7e7f; }
|
|
103
|
+
.fd-chip[data-color="7"] { --fd-tag: #2c8397; } .fd-chip[data-color="8"] { --fd-tag: #475577; } .fd-chip[data-color="9"] { --fd-tag: #d6145f; }
|
|
104
|
+
.fd-chip[data-color="10"] { --fd-tag: #30c381; } .fd-chip[data-color="11"] { --fd-tag: #9365b8; }
|
|
105
|
+
/* A line of parts, as Flectra's o_row: its title the line's label, its parts each as wide as they need, words and buttons among them. */
|
|
106
|
+
.fd-oneline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; min-height: var(--fd-control-height, 30px); }
|
|
107
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; flex: 0 1 auto; width: auto; min-width: 0; grid-template-columns: none; }
|
|
108
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > * { grid-column: auto !important; }
|
|
109
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:not([data-labels="beside"]):not([data-labels="above"]) > .fd-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
110
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > :is(.fd-error, .fd-warning) { flex-basis: 100%; }
|
|
111
|
+
.fd-oneline-row .fd-input { width: 12em; max-width: 100%; }
|
|
112
|
+
/* Words and the value they go with wrap as one, never parted at a line's end; a run with nothing shown takes no room. */
|
|
113
|
+
.fd-form .fd-oneline-pair { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 6px 10px; flex: 0 1 auto; max-width: 100%; min-width: 0; }
|
|
114
|
+
.fd-form .fd-oneline-pair:not(:has(> :not([hidden]))) { display: none; }
|
|
115
|
+
/* On a narrow screen each part gives way to the row's width rather than run past it. */
|
|
116
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field { max-width: 100%; }
|
|
117
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > * { max-width: 100%; min-width: 0; }
|
|
118
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"]) .fd-input { width: 15em; }
|
|
119
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="integer"], [data-type="float"]) .fd-input { width: 7em; }
|
|
120
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field[data-type="monetary"] .fd-input { width: 8.5em; }
|
|
121
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="date"], [data-type="datetime"]) .fd-input { width: 9.5em; }
|
|
122
|
+
/* A date and time needs room for "dd.mm.yyyy, --:--" and its calendar button, or its minutes are cut. */
|
|
123
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field[data-type="datetime"] .fd-input { width: 14em; }
|
|
124
|
+
/* A link or a date fills what its line leaves, as Flectra's o_row: as wide as the boxes above and below it,
|
|
125
|
+
a button or words beside it moving to a line of their own where they do not fit. */
|
|
126
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"], [data-type="date"], [data-type="datetime"]) { flex: 1 1 auto; }
|
|
127
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"], [data-type="date"], [data-type="datetime"]) > :not(.fd-label) { flex: 1 1 auto; }
|
|
128
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"], [data-type="date"], [data-type="datetime"]) .fd-input { width: 100%; min-width: min(100%, var(--fd-oneline-min, 9.5em)); }
|
|
129
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field[data-type="datetime"] { --fd-oneline-min: 14em; }
|
|
130
|
+
.fd-form .fd-oneline-words { margin: 0; padding: 0; border: 0; background: none; color: var(--fd-text); }
|
|
131
|
+
.fd-form .fd-oneline-words.fd-text-note { color: var(--fd-muted); font-size: 12.5px; }
|
|
132
|
+
/* A line with no title of its own takes the whole row, its fields' labels beside them where they ask. */
|
|
133
|
+
.fd-form .fd-oneline:not(:has(> .fd-label)) > .fd-oneline-row { grid-column: 1 / -1 !important; }
|
|
134
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-button-link { padding-inline: 0; min-height: 0; }
|
|
135
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > .fd-read-text { min-height: 0; padding-block: 0; }
|
|
136
|
+
/* Words over a sheet's title, as Flectra's label over its h1. */
|
|
137
|
+
.fd-title-label { font-size: 12.5px; font-weight: 600; color: var(--fd-muted); }
|
|
138
|
+
`;
|
|
139
|
+
//# sourceMappingURL=styles-sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles-sheet.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-sheet.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,SAAS,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIlC,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a record sheet reads, as Flectra draws one: read-only values as words.
|
|
3
|
+
* Appended to Fieldia's stylesheet, scoped and written with logical
|
|
4
|
+
* properties as the rest of it is.
|
|
5
|
+
*/
|
|
6
|
+
export const SHEET_CSS = /* css */ `
|
|
7
|
+
/* ---- a sheet's reading ----------------------------------------------------- */
|
|
8
|
+
/* A read-only value as its words: on the line a box's words would sit on, wrapped rather than cut at the box's edge. */
|
|
9
|
+
.fd-read-text {
|
|
10
|
+
min-width: 0; min-height: var(--fd-control-height, 30px); padding-block: calc(var(--fd-pad-y) + 1px);
|
|
11
|
+
white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; color: var(--fd-text);
|
|
12
|
+
}
|
|
13
|
+
.fd-field:is([data-type="integer"], [data-type="float"], [data-type="monetary"]) > .fd-read-text { font-variant-numeric: tabular-nums; }
|
|
14
|
+
/* A record's words read their own way — English on a page read right to left keeps its order — lined up with the page. */
|
|
15
|
+
.fd-read-text { unicode-bidi: plaintext; text-align: left; }
|
|
16
|
+
[dir="rtl"] .fd-read-text { text-align: right; }
|
|
17
|
+
/* Its words start where a box's words do, inside the box's padding (and an outlined box's border). */
|
|
18
|
+
.fd-read-text { padding-inline: var(--fd-pad-x); }
|
|
19
|
+
.fd-form[data-fd-skin="outlined"] .fd-read-text { padding-inline: calc(var(--fd-pad-x) + 1px); }
|
|
20
|
+
/* A sheet's title stays flush with the labels under it, as it was drawn. */
|
|
21
|
+
.fd-form :is(.fd-title, .fd-title-line) .fd-read-text { padding-inline: 0; }
|
|
22
|
+
.fd-read-text a, .fd-read-link { color: var(--fd-accent); text-decoration: none; }
|
|
23
|
+
.fd-read-link { border: none; background: none; padding: 0; font: inherit; cursor: pointer; text-align: start; }
|
|
24
|
+
.fd-read-text a:hover, .fd-read-link:hover { text-decoration: underline; }
|
|
25
|
+
.fd-read-link:focus-visible, .fd-read-text a:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; border-radius: 2px; }
|
|
26
|
+
/* A choice as a coloured pill, as wide as its words, on the line a box's words sit on. */
|
|
27
|
+
.fd-field > .fd-value-badge { justify-self: start; align-self: start; width: fit-content; margin-block: calc((var(--fd-control-height, 30px) - 24px) / 2); }
|
|
28
|
+
.fd-title > .fd-field > .fd-read-text { font-size: 24px; font-weight: 600; line-height: 1.25; }
|
|
29
|
+
/* A ribbon with words to point at takes the pointer, though its frame lets clicks through. */
|
|
30
|
+
.fd-ribbon[title] { pointer-events: auto; cursor: help; }
|
|
31
|
+
/* A field's value inside an alert's or a text's words, set apart by its weight. */
|
|
32
|
+
.fd-value { font-weight: 600; }
|
|
33
|
+
/* An alert's own buttons, after its words: links in the alert's colour, wrapping under the words on a narrow screen. */
|
|
34
|
+
.fd-alert:has(> .fd-alert-actions) { flex-wrap: wrap; align-items: baseline; }
|
|
35
|
+
.fd-alert-actions { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
|
|
36
|
+
.fd-alert-actions .fd-button { min-height: 0; padding-block: 0; font-size: inherit; }
|
|
37
|
+
.fd-alert-actions .fd-button-link { color: inherit; padding-inline: 0; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
|
|
38
|
+
/* An alert among a page's parts, as Flectra's in a tab: across its row. */
|
|
39
|
+
.fd-text-alert { grid-column: 1 / -1; margin: 0; }
|
|
40
|
+
/* The first alert on a card clears the ribbon in its corner, when no stat buttons stand between them. */
|
|
41
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) > :is(.fd-ribbon-frame + .fd-alert, .fd-ribbon-frame + .fd-stats[hidden] + .fd-alert) { margin-inline-end: 72px; }
|
|
42
|
+
/* A stat button with two values, each after its words, one over the other: "In: 3", "Out: 5". */
|
|
43
|
+
.fd-stat-pair { gap: 1px; }
|
|
44
|
+
.fd-stat-row { display: inline-flex; align-items: baseline; gap: 5px; }
|
|
45
|
+
.fd-stat-row > .fd-stat-label::after { content: ":"; }
|
|
46
|
+
.fd-stat-pair .fd-stat-value { font-size: 13.5px; }
|
|
47
|
+
/* On a phone, stat buttons two to a row, edged between them, clear of a ribbon in the corner. */
|
|
48
|
+
@container (max-width: 520px) {
|
|
49
|
+
.fd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
50
|
+
.fd-stat { min-width: 0; padding-inline: 12px; text-align: start; column-gap: 8px; }
|
|
51
|
+
.fd-stat:has(> .fd-icon) { column-gap: 8px; }
|
|
52
|
+
.fd-stat-value { font-size: 14px; }
|
|
53
|
+
.fd-stat:nth-child(odd of :not([hidden])) { border-inline-start: none; }
|
|
54
|
+
.fd-stat:nth-child(n + 3 of :not([hidden])) { border-block-start: 1px solid var(--fd-border); }
|
|
55
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stats { padding-inline-end: 0; }
|
|
56
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stat:nth-child(2 of :not([hidden])) { padding-inline-end: 64px; }
|
|
57
|
+
.fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stat:nth-child(4 of :not([hidden])) { padding-inline-end: 36px; }
|
|
58
|
+
}
|
|
59
|
+
/* A statusbar's time spent in a step, after its words; its folded stages under More, in a menu fixed to the page so the bar's scrolling never cuts it. */
|
|
60
|
+
.fd-step-time { margin-inline-start: 6px; font-size: 11.5px; font-weight: 400; font-variant-numeric: tabular-nums; }
|
|
61
|
+
.fd-statusbar li.fd-step-more > button { padding-inline: 16px 20px; letter-spacing: 1px; }
|
|
62
|
+
.fd-statusbar li.fd-step-more > .fd-step-menu {
|
|
63
|
+
position: fixed; z-index: 30; display: grid; min-width: 160px; margin: 0; padding: 4px 0; clip-path: none; transform: none;
|
|
64
|
+
background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: max(var(--fd-control-radius), 4px);
|
|
65
|
+
box-shadow: 0 8px 24px rgba(15, 20, 25, 0.12); white-space: nowrap;
|
|
66
|
+
}
|
|
67
|
+
.fd-statusbar li.fd-step-more > .fd-step-menu[hidden] { display: none; }
|
|
68
|
+
.fd-statusbar .fd-step-menu > button {
|
|
69
|
+
font: inherit; font-size: 13px; text-align: start; border: none; background: none; color: inherit; padding: 6px 14px; cursor: pointer; transform: none;
|
|
70
|
+
}
|
|
71
|
+
.fd-statusbar .fd-step-menu > button:hover:not(:disabled), .fd-statusbar .fd-step-menu > button:focus-visible { background: var(--fd-accent-soft); outline: none; }
|
|
72
|
+
.fd-statusbar .fd-step-menu > button:disabled { cursor: default; color: var(--fd-muted); }
|
|
73
|
+
/* A button's key, shown on it while Alt is held, as Flectra shows its hotkeys. */
|
|
74
|
+
.fd-hotkey { display: none; }
|
|
75
|
+
[data-hotkeys] .fd-hotkey {
|
|
76
|
+
display: inline-block; margin-inline-start: 6px; padding: 0 4px; border: 1px solid currentColor; border-radius: 3px;
|
|
77
|
+
font: 600 10.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: 0.85; vertical-align: 1px;
|
|
78
|
+
}
|
|
79
|
+
/* A link's picture, or its initials, in a circle before its name; lines of the record — an address — under the link. */
|
|
80
|
+
.fd-link-avatar {
|
|
81
|
+
flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
|
|
82
|
+
background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 10px; font-weight: 700; line-height: 1; vertical-align: middle;
|
|
83
|
+
}
|
|
84
|
+
.fd-link-avatar img { width: 100%; height: 100%; object-fit: cover; }
|
|
85
|
+
.fd-combo[data-avatar] > .fd-link-avatar { position: absolute; inset-inline-start: 4px; pointer-events: none; }
|
|
86
|
+
.fd-combo[data-avatar] > .fd-link-avatar[hidden] ~ .fd-combo-input { padding-inline-start: var(--fd-pad-x); }
|
|
87
|
+
.fd-combo[data-avatar] > .fd-link-avatar:not([hidden]) ~ .fd-combo-input { padding-inline-start: 32px; }
|
|
88
|
+
.fd-form[data-fd-skin="underline"] .fd-combo[data-avatar] > .fd-link-avatar { inset-inline-start: 0; }
|
|
89
|
+
.fd-form[data-fd-skin="underline"] .fd-combo[data-avatar] > .fd-link-avatar:not([hidden]) ~ .fd-combo-input { padding-inline-start: 28px; }
|
|
90
|
+
.fd-read-text > .fd-link-avatar { margin-inline-end: 6px; }
|
|
91
|
+
.fd-chip > .fd-link-avatar { width: 18px; height: 18px; font-size: 9px; margin-inline: -4px 2px; }
|
|
92
|
+
.fd-link { display: grid; gap: 2px; min-width: 0; }
|
|
93
|
+
.fd-link-details { font-size: 12.5px; line-height: 1.4; color: var(--fd-muted); text-align: left; }
|
|
94
|
+
[dir="rtl"] .fd-link-details { text-align: right; }
|
|
95
|
+
.fd-link-details > div { unicode-bidi: plaintext; }
|
|
96
|
+
/* Tags in their record's colour, as Flectra numbers them, soft enough to read in either scheme. */
|
|
97
|
+
.fd-chip[data-color] { background: color-mix(in srgb, var(--fd-tag) 18%, var(--fd-surface)); border-color: color-mix(in srgb, var(--fd-tag) 55%, var(--fd-surface)); }
|
|
98
|
+
.fd-chip[data-color="1"] { --fd-tag: #f06050; } .fd-chip[data-color="2"] { --fd-tag: #f4a460; } .fd-chip[data-color="3"] { --fd-tag: #f7cd1f; }
|
|
99
|
+
.fd-chip[data-color="4"] { --fd-tag: #6cc1ed; } .fd-chip[data-color="5"] { --fd-tag: #814968; } .fd-chip[data-color="6"] { --fd-tag: #eb7e7f; }
|
|
100
|
+
.fd-chip[data-color="7"] { --fd-tag: #2c8397; } .fd-chip[data-color="8"] { --fd-tag: #475577; } .fd-chip[data-color="9"] { --fd-tag: #d6145f; }
|
|
101
|
+
.fd-chip[data-color="10"] { --fd-tag: #30c381; } .fd-chip[data-color="11"] { --fd-tag: #9365b8; }
|
|
102
|
+
/* A line of parts, as Flectra's o_row: its title the line's label, its parts each as wide as they need, words and buttons among them. */
|
|
103
|
+
.fd-oneline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; min-height: var(--fd-control-height, 30px); }
|
|
104
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; flex: 0 1 auto; width: auto; min-width: 0; grid-template-columns: none; }
|
|
105
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > * { grid-column: auto !important; }
|
|
106
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:not([data-labels="beside"]):not([data-labels="above"]) > .fd-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
107
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > :is(.fd-error, .fd-warning) { flex-basis: 100%; }
|
|
108
|
+
.fd-oneline-row .fd-input { width: 12em; max-width: 100%; }
|
|
109
|
+
/* Words and the value they go with wrap as one, never parted at a line's end; a run with nothing shown takes no room. */
|
|
110
|
+
.fd-form .fd-oneline-pair { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 6px 10px; flex: 0 1 auto; max-width: 100%; min-width: 0; }
|
|
111
|
+
.fd-form .fd-oneline-pair:not(:has(> :not([hidden]))) { display: none; }
|
|
112
|
+
/* On a narrow screen each part gives way to the row's width rather than run past it. */
|
|
113
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field { max-width: 100%; }
|
|
114
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > * { max-width: 100%; min-width: 0; }
|
|
115
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"]) .fd-input { width: 15em; }
|
|
116
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="integer"], [data-type="float"]) .fd-input { width: 7em; }
|
|
117
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field[data-type="monetary"] .fd-input { width: 8.5em; }
|
|
118
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="date"], [data-type="datetime"]) .fd-input { width: 9.5em; }
|
|
119
|
+
/* A date and time needs room for "dd.mm.yyyy, --:--" and its calendar button, or its minutes are cut. */
|
|
120
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field[data-type="datetime"] .fd-input { width: 14em; }
|
|
121
|
+
/* A link or a date fills what its line leaves, as Flectra's o_row: as wide as the boxes above and below it,
|
|
122
|
+
a button or words beside it moving to a line of their own where they do not fit. */
|
|
123
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"], [data-type="date"], [data-type="datetime"]) { flex: 1 1 auto; }
|
|
124
|
+
.fd-form :is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"], [data-type="date"], [data-type="datetime"]) > :not(.fd-label) { flex: 1 1 auto; }
|
|
125
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field:is([data-type="many2one"], [data-type="reference"], [data-type="date"], [data-type="datetime"]) .fd-input { width: 100%; min-width: min(100%, var(--fd-oneline-min, 9.5em)); }
|
|
126
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field[data-type="datetime"] { --fd-oneline-min: 14em; }
|
|
127
|
+
.fd-form .fd-oneline-words { margin: 0; padding: 0; border: 0; background: none; color: var(--fd-text); }
|
|
128
|
+
.fd-form .fd-oneline-words.fd-text-note { color: var(--fd-muted); font-size: 12.5px; }
|
|
129
|
+
/* A line with no title of its own takes the whole row, its fields' labels beside them where they ask. */
|
|
130
|
+
.fd-form .fd-oneline:not(:has(> .fd-label)) > .fd-oneline-row { grid-column: 1 / -1 !important; }
|
|
131
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-button-link { padding-inline: 0; min-height: 0; }
|
|
132
|
+
:is(.fd-oneline-row, .fd-oneline-pair) > .fd-field > .fd-read-text { min-height: 0; padding-block: 0; }
|
|
133
|
+
/* Words over a sheet's title, as Flectra's label over its h1. */
|
|
134
|
+
.fd-title-label { font-size: 12.5px; font-weight: 600; color: var(--fd-muted); }
|
|
135
|
+
`;
|
|
136
|
+
//# sourceMappingURL=styles-sheet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles-sheet.mjs","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-sheet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIlC,CAAC"}
|