viewkitjs 0.20.0 → 0.22.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/CHANGELOG.md +39 -0
- package/MIGRATION.md +2 -1
- package/README.md +1 -1
- package/fields/dist/conventions.d.ts +15 -3
- package/fields/dist/conventions.js +25 -0
- package/fields/dist/design/category-colors.d.ts +12 -5
- package/fields/dist/design/category-colors.js +7 -7
- package/fields/dist/query/buckets.js +42 -35
- package/fields/dist/query/date.js +2 -13
- package/fields/docs/guides/conventions.md +1 -1
- package/fields/docs/guides/options.md +2 -1
- package/fields/docs/reference/design-category-colors.md +2 -2
- package/fields/docs/reference/design-status-slots.md +1 -1
- package/fields/docs/reference/fields.md +1 -1
- package/package.json +19 -1
- package/views/README.md +2 -1
- package/views/dist/atoms/StatusBadge.js +1 -1
- package/views/dist/atoms/tones.js +7 -7
- package/views/dist/atoms/types.d.ts +3 -2
- package/views/dist/contract.d.ts +295 -2
- package/views/dist/contract.js +129 -0
- package/views/dist/controls/button/button.d.ts +40 -0
- package/views/dist/controls/button/button.js +40 -0
- package/views/dist/controls/button/looks.d.ts +4 -0
- package/views/dist/controls/button/looks.js +20 -0
- package/views/dist/controls/button/map-button.d.ts +11 -0
- package/views/dist/controls/button/map-button.js +20 -0
- package/views/dist/controls/button/own-look.d.ts +59 -0
- package/views/dist/controls/button/own-look.js +33 -0
- package/views/dist/controls/button.css +530 -0
- package/views/dist/controls/controls.d.ts +5 -0
- package/views/dist/controls/controls.js +2 -0
- package/views/dist/controls/index.d.ts +11 -0
- package/views/dist/controls/index.js +6 -0
- package/views/dist/controls/smooth.css +101 -0
- package/views/dist/controls/spinner/looks.d.ts +4 -0
- package/views/dist/controls/spinner/looks.js +32 -0
- package/views/dist/controls/spinner/spinner.d.ts +23 -0
- package/views/dist/controls/spinner/spinner.js +16 -0
- package/views/dist/controls/spinner.css +147 -0
- package/views/dist/display/date.js +15 -2
- package/views/dist/display/fit-values.d.ts +3 -2
- package/views/dist/display/link.d.ts +1 -1
- package/views/dist/display/location.js +2 -1
- package/views/dist/display/multi-value.js +1 -1
- package/views/dist/display/name.js +3 -1
- package/views/dist/display/select.js +1 -1
- package/views/dist/display/value-list.d.ts +1 -1
- package/views/dist/grid/chrome/GridStructure.js +2 -1
- package/views/dist/grid/looks.d.ts +45 -0
- package/views/dist/grid/looks.js +74 -0
- package/views/dist/looks/index.d.ts +9 -0
- package/views/dist/looks/index.js +5 -0
- package/views/dist/looks/looks.d.ts +47 -0
- package/views/dist/looks/looks.js +25 -0
- package/views/dist/looks/pieces.d.ts +3 -0
- package/views/dist/looks/pieces.js +4 -0
- package/views/dist/panels/react/views-row/FoldingViewRow.js +8 -8
- package/views/dist/provider/ViewsProvider.d.ts +3 -3
- package/views/dist/provider/ViewsProvider.js +1 -1
- package/views/dist/provider/context.d.ts +1 -1
- package/views/dist/styles.css +1000 -119
- package/views/dist/styles.unlayered.css +1017 -119
- package/views/docs/contract.md +172 -7
- package/views/docs/guides/display.md +11 -7
- package/views/docs/guides/looks.md +29 -0
- package/views/docs/guides/the-provider.md +2 -2
- package/views/docs/index.md +3 -0
- package/views/docs/install.md +7 -5
- package/views/docs/reference/controls.md +36 -0
- package/views/docs/reference/display.md +2 -2
- package/views/docs/reference/looks.md +41 -0
- package/views/docs/reference/react.md +2 -2
- package/views/docs/reference/views.md +5 -2
- package/views/skills/views/SKILL.md +2 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface ButtonOwnLook {
|
|
2
|
+
/** Its radius step; none, square. */
|
|
3
|
+
radius?: "none" | "xs" | "sm" | "md" | "lg";
|
|
4
|
+
/** Its corners round, never the smooth corner. */
|
|
5
|
+
corner?: "round";
|
|
6
|
+
/** No edge: none of the Button's 1px border. */
|
|
7
|
+
edge?: "none";
|
|
8
|
+
/** Its words: the place's (size, weight, line), or the place's at xs or sm, or xs at medium. */
|
|
9
|
+
words?: "inherit" | "xs" | "sm" | "xs-medium" | "lg";
|
|
10
|
+
/** Its colour, kept in every state but disabled: faint, the link's, the text's, or the place's. */
|
|
11
|
+
colour?: "faint" | "link" | "text" | "inherit";
|
|
12
|
+
/** Its icons' size, px. */
|
|
13
|
+
icon?: "12" | "14" | "15" | "16" | "20";
|
|
14
|
+
/** Its icons' colour apart from its words: faint, in every state; or subtle, the quiet kind's rest, kept while its words
|
|
15
|
+
* take the text's colour under the pointer, in every state but disabled; or the brand's. */
|
|
16
|
+
iconColour?: "faint" | "subtle" | "brand";
|
|
17
|
+
/** Its room left and right, px: none, the same each side, or 6 at its start and 4 at its end. */
|
|
18
|
+
pad?: "0" | "4" | "6" | "8" | "6-4";
|
|
19
|
+
/** The room between its words and its icons, px. */
|
|
20
|
+
gap?: "3" | "4" | "6" | "8" | "10";
|
|
21
|
+
/** Under the pointer: nothing changes; or its words alone take the text's colour, no ground under them; or a ground of its
|
|
22
|
+
* own: the popup's hover (overlay), or the neutral ground, pressed too. */
|
|
23
|
+
hover?: "none" | "words" | "overlay" | "neutral";
|
|
24
|
+
/** Open (aria-expanded="true"): the ground it has under the pointer; its words and icons in the brand's colour; or the
|
|
25
|
+
* neutral ground. */
|
|
26
|
+
open?: "hovered" | "brand" | "neutral";
|
|
27
|
+
/** Standing pressed (aria-pressed="true"): the popup's hover as its ground, its words the text's. */
|
|
28
|
+
pressed?: "hovered";
|
|
29
|
+
/** Disabled, it keeps its colour and the arrow: plain, never the disabled grey. With a colour named; a quiet Button keeps no
|
|
30
|
+
* ground. */
|
|
31
|
+
disabled?: "plain";
|
|
32
|
+
/** The hand that grabs: a grip's. */
|
|
33
|
+
cursor?: "grab";
|
|
34
|
+
/** Pressed on a card in a popup: the card's pressed step. */
|
|
35
|
+
press?: "card";
|
|
36
|
+
/** Its words at its start, its label growing so an end icon stands at its end. */
|
|
37
|
+
align?: "start";
|
|
38
|
+
/** Its words semibold, over its words' own weight. The frame's Label weight is read from around it, never from it. */
|
|
39
|
+
weight?: "semibold" | "medium";
|
|
40
|
+
/** Its digits one width each (tabular), a month and a year that change in place. */
|
|
41
|
+
digits?: "tabular";
|
|
42
|
+
/** Its last icon turned while what it opens is open or shut (aria-expanded): a quarter clockwise while open (an arrow drawn
|
|
43
|
+
* pointing right), or a quarter back while shut (an arrow drawn pointing down). */
|
|
44
|
+
turn?: "quarter" | "back";
|
|
45
|
+
/** A dot in the brand's colour at its top end corner, saying something is on: set it while it is. */
|
|
46
|
+
dot?: "brand";
|
|
47
|
+
/** Its words cut with … at their end when its place is narrower than they are. */
|
|
48
|
+
cut?: "end";
|
|
49
|
+
/** Room at its end, px, for something laid over it. */
|
|
50
|
+
endRoom?: "30";
|
|
51
|
+
}
|
|
52
|
+
/** Each own option, the attribute it sets (data-button-<attr>) and its values. */
|
|
53
|
+
export declare const buttonOwnOptions: {
|
|
54
|
+
id: keyof ButtonOwnLook;
|
|
55
|
+
attr: string;
|
|
56
|
+
values: string[];
|
|
57
|
+
}[];
|
|
58
|
+
/** The attributes of a Button's own look, on the Button: data-button-own, then each option it names, and only those. */
|
|
59
|
+
export declare function buttonOwnAttrs(look: ButtonOwnLook): Record<string, string>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const buttonOwnOptions = [
|
|
2
|
+
{ id: "radius", attr: "radius", values: ["none", "xs", "sm", "md", "lg"] },
|
|
3
|
+
{ id: "corner", attr: "corner", values: ["round"] },
|
|
4
|
+
{ id: "edge", attr: "edge", values: ["none"] },
|
|
5
|
+
{ id: "words", attr: "words", values: ["inherit", "xs", "sm", "xs-medium", "lg"] },
|
|
6
|
+
{ id: "colour", attr: "colour", values: ["faint", "link", "text", "inherit"] },
|
|
7
|
+
{ id: "icon", attr: "icon", values: ["12", "14", "15", "16", "20"] },
|
|
8
|
+
{ id: "iconColour", attr: "icon-colour", values: ["faint", "subtle", "brand"] },
|
|
9
|
+
{ id: "pad", attr: "pad", values: ["0", "4", "6", "8", "6-4"] },
|
|
10
|
+
{ id: "gap", attr: "gap", values: ["3", "4", "6", "8", "10"] },
|
|
11
|
+
{ id: "hover", attr: "hover", values: ["none", "words", "overlay", "neutral"] },
|
|
12
|
+
{ id: "open", attr: "open", values: ["hovered", "brand", "neutral"] },
|
|
13
|
+
{ id: "pressed", attr: "pressed", values: ["hovered"] },
|
|
14
|
+
{ id: "disabled", attr: "disabled", values: ["plain"] },
|
|
15
|
+
{ id: "cursor", attr: "cursor", values: ["grab"] },
|
|
16
|
+
{ id: "press", attr: "press", values: ["card"] },
|
|
17
|
+
{ id: "align", attr: "align", values: ["start"] },
|
|
18
|
+
{ id: "weight", attr: "weight", values: ["semibold", "medium"] },
|
|
19
|
+
{ id: "digits", attr: "digits", values: ["tabular"] },
|
|
20
|
+
{ id: "turn", attr: "turn", values: ["quarter", "back"] },
|
|
21
|
+
{ id: "dot", attr: "dot", values: ["brand"] },
|
|
22
|
+
{ id: "cut", attr: "cut", values: ["end"] },
|
|
23
|
+
{ id: "endRoom", attr: "end-room", values: ["30"] },
|
|
24
|
+
];
|
|
25
|
+
export function buttonOwnAttrs(look) {
|
|
26
|
+
const attrs = { "data-button-own": "" };
|
|
27
|
+
for (const o of buttonOwnOptions) {
|
|
28
|
+
const v = look[o.id];
|
|
29
|
+
if (v != null)
|
|
30
|
+
attrs[`data-button-${o.attr}`] = v;
|
|
31
|
+
}
|
|
32
|
+
return attrs;
|
|
33
|
+
}
|