@sharadox/graphical-user-interface-web-library 0.0.0-stage → 0.2.0-development.11
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/LICENCA.md +76 -0
- package/LICENSE.md +76 -0
- package/NOTICE.md +3 -0
- package/README.md +174 -2
- package/distribution/box/index.d.ts +14 -0
- package/distribution/box/index.d.ts.map +1 -0
- package/distribution/box/index.js +52 -0
- package/distribution/box/index.js.map +1 -0
- package/distribution/box/index.module.css +1 -0
- package/distribution/box/index.module.scss +130 -0
- package/distribution/box/type.d.ts +56 -0
- package/distribution/box/type.d.ts.map +1 -0
- package/distribution/box/type.js +2 -0
- package/distribution/box/type.js.map +1 -0
- package/distribution/box-axis/index.d.ts +24 -0
- package/distribution/box-axis/index.d.ts.map +1 -0
- package/distribution/box-axis/index.js +114 -0
- package/distribution/box-axis/index.js.map +1 -0
- package/distribution/box-axis/type.d.ts +15 -0
- package/distribution/box-axis/type.d.ts.map +1 -0
- package/distribution/box-axis/type.js +2 -0
- package/distribution/box-axis/type.js.map +1 -0
- package/distribution/button/index.d.ts +15 -0
- package/distribution/button/index.d.ts.map +1 -0
- package/distribution/button/index.js +42 -0
- package/distribution/button/index.js.map +1 -0
- package/distribution/button/type.d.ts +37 -0
- package/distribution/button/type.d.ts.map +1 -0
- package/distribution/button/type.js +2 -0
- package/distribution/button/type.js.map +1 -0
- package/distribution/button-axis/index.d.ts +13 -0
- package/distribution/button-axis/index.d.ts.map +1 -0
- package/distribution/button-axis/index.js +13 -0
- package/distribution/button-axis/index.js.map +1 -0
- package/distribution/checkbox/index.d.ts +10 -0
- package/distribution/checkbox/index.d.ts.map +1 -0
- package/distribution/checkbox/index.js +21 -0
- package/distribution/checkbox/index.js.map +1 -0
- package/distribution/checkbox/type.d.ts +9 -0
- package/distribution/checkbox/type.d.ts.map +1 -0
- package/distribution/checkbox/type.js +2 -0
- package/distribution/checkbox/type.js.map +1 -0
- package/distribution/choice/index.d.ts +11 -0
- package/distribution/choice/index.d.ts.map +1 -0
- package/distribution/choice/index.js +35 -0
- package/distribution/choice/index.js.map +1 -0
- package/distribution/choice/type.d.ts +19 -0
- package/distribution/choice/type.d.ts.map +1 -0
- package/distribution/choice/type.js +2 -0
- package/distribution/choice/type.js.map +1 -0
- package/distribution/field/index.d.ts +11 -0
- package/distribution/field/index.d.ts.map +1 -0
- package/distribution/field/index.js +26 -0
- package/distribution/field/index.js.map +1 -0
- package/distribution/field/index.module.css +1 -0
- package/distribution/field/index.module.scss +21 -0
- package/distribution/field/type.d.ts +23 -0
- package/distribution/field/type.d.ts.map +1 -0
- package/distribution/field/type.js +2 -0
- package/distribution/field/type.js.map +1 -0
- package/distribution/interface-configuration/index.d.ts +23 -0
- package/distribution/interface-configuration/index.d.ts.map +1 -0
- package/distribution/interface-configuration/index.js +160 -0
- package/distribution/interface-configuration/index.js.map +1 -0
- package/distribution/interface-configuration/type.d.ts +83 -0
- package/distribution/interface-configuration/type.d.ts.map +1 -0
- package/distribution/interface-configuration/type.js +2 -0
- package/distribution/interface-configuration/type.js.map +1 -0
- package/distribution/interface-style/index.d.ts +11 -0
- package/distribution/interface-style/index.d.ts.map +1 -0
- package/distribution/interface-style/index.js +14 -0
- package/distribution/interface-style/index.js.map +1 -0
- package/distribution/interface-style/type.d.ts +6 -0
- package/distribution/interface-style/type.d.ts.map +1 -0
- package/distribution/interface-style/type.js +2 -0
- package/distribution/interface-style/type.js.map +1 -0
- package/distribution/interface-styles/index.d.ts +13 -0
- package/distribution/interface-styles/index.d.ts.map +1 -0
- package/distribution/interface-styles/index.js +37 -0
- package/distribution/interface-styles/index.js.map +1 -0
- package/distribution/radio-group/index.d.ts +11 -0
- package/distribution/radio-group/index.d.ts.map +1 -0
- package/distribution/radio-group/index.js +27 -0
- package/distribution/radio-group/index.js.map +1 -0
- package/distribution/radio-group/index.module.css +1 -0
- package/distribution/radio-group/index.module.scss +10 -0
- package/distribution/radio-group/type.d.ts +25 -0
- package/distribution/radio-group/type.d.ts.map +1 -0
- package/distribution/radio-group/type.js +2 -0
- package/distribution/radio-group/type.js.map +1 -0
- package/distribution/responsive/index.d.ts +10 -0
- package/distribution/responsive/index.d.ts.map +1 -0
- package/distribution/responsive/index.js +23 -0
- package/distribution/responsive/index.js.map +1 -0
- package/distribution/responsive/type.d.ts +12 -0
- package/distribution/responsive/type.d.ts.map +1 -0
- package/distribution/responsive/type.js +2 -0
- package/distribution/responsive/type.js.map +1 -0
- package/distribution/spinner/index.d.ts +11 -0
- package/distribution/spinner/index.d.ts.map +1 -0
- package/distribution/spinner/index.js +16 -0
- package/distribution/spinner/index.js.map +1 -0
- package/distribution/spinner/index.module.css +1 -0
- package/distribution/spinner/index.module.scss +41 -0
- package/distribution/spinner/type.d.ts +4 -0
- package/distribution/spinner/type.d.ts.map +1 -0
- package/distribution/spinner/type.js +2 -0
- package/distribution/spinner/type.js.map +1 -0
- package/distribution/style-sheet/index.d.ts +18 -0
- package/distribution/style-sheet/index.d.ts.map +1 -0
- package/distribution/style-sheet/index.js +166 -0
- package/distribution/style-sheet/index.js.map +1 -0
- package/distribution/style-switch/index.d.ts +10 -0
- package/distribution/style-switch/index.d.ts.map +1 -0
- package/distribution/style-switch/index.js +16 -0
- package/distribution/style-switch/index.js.map +1 -0
- package/distribution/style-switch/type.d.ts +15 -0
- package/distribution/style-switch/type.d.ts.map +1 -0
- package/distribution/style-switch/type.js +2 -0
- package/distribution/style-switch/type.js.map +1 -0
- package/distribution/switch/index.d.ts +11 -0
- package/distribution/switch/index.d.ts.map +1 -0
- package/distribution/switch/index.js +44 -0
- package/distribution/switch/index.js.map +1 -0
- package/distribution/switch/index.module.css +1 -0
- package/distribution/switch/index.module.scss +70 -0
- package/distribution/switch/type.d.ts +20 -0
- package/distribution/switch/type.d.ts.map +1 -0
- package/distribution/switch/type.js +2 -0
- package/distribution/switch/type.js.map +1 -0
- package/distribution/text-field/index.d.ts +13 -0
- package/distribution/text-field/index.d.ts.map +1 -0
- package/distribution/text-field/index.js +21 -0
- package/distribution/text-field/index.js.map +1 -0
- package/distribution/text-field/index.module.css +1 -0
- package/distribution/text-field/index.module.scss +42 -0
- package/distribution/text-field/type.d.ts +27 -0
- package/distribution/text-field/type.d.ts.map +1 -0
- package/distribution/text-field/type.js +2 -0
- package/distribution/text-field/type.js.map +1 -0
- package/distribution/toggle-mark/index.d.ts +11 -0
- package/distribution/toggle-mark/index.d.ts.map +1 -0
- package/distribution/toggle-mark/index.js +18 -0
- package/distribution/toggle-mark/index.js.map +1 -0
- package/distribution/toggle-mark/index.module.css +1 -0
- package/distribution/toggle-mark/index.module.scss +57 -0
- package/distribution/toggle-mark/type.d.ts +13 -0
- package/distribution/toggle-mark/type.d.ts.map +1 -0
- package/distribution/toggle-mark/type.js +2 -0
- package/distribution/toggle-mark/type.js.map +1 -0
- package/package.json +100 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Axis, AxisDeclarations } from "@sharadox/graphical-user-interface-web-library/box-axis/type";
|
|
2
|
+
/** Where every box value starts: a plain, centered flex box with nothing around it. */
|
|
3
|
+
export declare const BOX_INITIAL_VALUES: AxisDeclarations;
|
|
4
|
+
/** The variants: filled, outlined, transparent and inline (a box that sits in running text, like a link). */
|
|
5
|
+
export declare const VARIANT_AXIS: Axis;
|
|
6
|
+
/** The direction sections and children follow; left to right follows the reading direction (it flips in Arabic). */
|
|
7
|
+
export declare const DIRECTION_AXIS: Axis;
|
|
8
|
+
/** Along the direction: start, center (the default), end; left and right only where a side must be fixed. */
|
|
9
|
+
export declare const JUSTIFY_AXIS: Axis;
|
|
10
|
+
/** Across the direction. */
|
|
11
|
+
export declare const ALIGN_AXIS: Axis;
|
|
12
|
+
/** The text inside, centered by default. */
|
|
13
|
+
export declare const TEXT_ALIGN_AXIS: Axis;
|
|
14
|
+
/** Whether children wrap onto more lines when they don't fit. */
|
|
15
|
+
export declare const WRAP_AXIS: Axis;
|
|
16
|
+
/**
|
|
17
|
+
* Every axis of a box, in the order their rules are written: variant, direction, justify, align, text align, and the
|
|
18
|
+
* gap and padding from the scale.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* boxAxes(DEFAULT_INTERFACE.scale).map((axis) => axis.attribute); // ["data-variant", "data-direction", …]
|
|
22
|
+
*/
|
|
23
|
+
export declare function boxAxes(scale: readonly number[]): Axis[];
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/box-axis/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAE3G,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,EAAE,gBAgBhC,CAAC;AA0BF,6GAA6G;AAC7G,eAAO,MAAM,YAAY,EAAE,IA6B1B,CAAC;AAQF,oHAAoH;AACpH,eAAO,MAAM,cAAc,MAKzB,CAAC;AACH,6GAA6G;AAC7G,eAAO,MAAM,YAAY,MAIxB,CAAC;AACF,4BAA4B;AAC5B,eAAO,MAAM,UAAU,MAA2F,CAAC;AACnH,4CAA4C;AAC5C,eAAO,MAAM,eAAe,MAI3B,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,SAAS,MAA0D,CAAC;AAMjF;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,EAAE,CAWxD"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/** Where every box value starts: a plain, centered flex box with nothing around it. */
|
|
2
|
+
export const BOX_INITIAL_VALUES = {
|
|
3
|
+
"box-display": "flex",
|
|
4
|
+
"box-direction": "row",
|
|
5
|
+
"box-justify": "center",
|
|
6
|
+
"box-align": "center",
|
|
7
|
+
"box-text-align": "center",
|
|
8
|
+
"box-wrap": "nowrap",
|
|
9
|
+
"box-gap": "0px",
|
|
10
|
+
"box-padding": "0px",
|
|
11
|
+
"box-minimum-size": "0px",
|
|
12
|
+
"box-section-padding": "0px",
|
|
13
|
+
"box-border-thickness": "0px",
|
|
14
|
+
"box-border-color": "transparent",
|
|
15
|
+
"box-background": "transparent",
|
|
16
|
+
"box-text-color": "currentcolor",
|
|
17
|
+
"box-backdrop": "none",
|
|
18
|
+
};
|
|
19
|
+
/** What every variant sets, so one variant replaces another whole, at any breakpoint. */
|
|
20
|
+
const SIZED = {
|
|
21
|
+
"box-display": "flex",
|
|
22
|
+
"box-section-padding": "var(--current-section-padding)",
|
|
23
|
+
"box-minimum-size": "var(--current-minimum-size)",
|
|
24
|
+
"box-border-thickness": "var(--line-thickness)",
|
|
25
|
+
};
|
|
26
|
+
const GLASS = "blur(var(--glass-blur))";
|
|
27
|
+
/** Outlined and transparent: the color's transparent background while hovered and pressed; middleground's text turns. */
|
|
28
|
+
const tinted = (border) => ({
|
|
29
|
+
rest: {
|
|
30
|
+
...SIZED,
|
|
31
|
+
"box-background": "transparent",
|
|
32
|
+
"box-text-color": "var(--current-color)",
|
|
33
|
+
"box-border-color": border,
|
|
34
|
+
"box-backdrop": GLASS,
|
|
35
|
+
},
|
|
36
|
+
hover: { "box-background": "var(--current-transparent-hover-color)", "box-text-color": "var(--current-hover-color)" },
|
|
37
|
+
active: {
|
|
38
|
+
"box-background": "var(--current-transparent-active-color)",
|
|
39
|
+
"box-text-color": "var(--current-hover-color)",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
/** The variants: filled, outlined, transparent and inline (a box that sits in running text, like a link). */
|
|
43
|
+
export const VARIANT_AXIS = {
|
|
44
|
+
attribute: "data-variant",
|
|
45
|
+
values: {
|
|
46
|
+
filled: {
|
|
47
|
+
rest: {
|
|
48
|
+
...SIZED,
|
|
49
|
+
"box-background": "var(--current-color-paint)",
|
|
50
|
+
"box-text-color": "var(--current-on-color)",
|
|
51
|
+
"box-border-color": "transparent",
|
|
52
|
+
"box-backdrop": "none",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
outlined: tinted("var(--current-border-color)"),
|
|
56
|
+
transparent: tinted("transparent"),
|
|
57
|
+
inline: {
|
|
58
|
+
rest: {
|
|
59
|
+
"box-display": "inline-flex",
|
|
60
|
+
"box-section-padding": "0px",
|
|
61
|
+
"box-minimum-size": "0px",
|
|
62
|
+
"box-border-thickness": "0px",
|
|
63
|
+
"box-background": "transparent",
|
|
64
|
+
"box-text-color": "var(--current-color)",
|
|
65
|
+
"box-border-color": "transparent",
|
|
66
|
+
"box-backdrop": "none",
|
|
67
|
+
},
|
|
68
|
+
hover: { "box-text-color": "var(--current-hover-color)" },
|
|
69
|
+
active: { "box-text-color": "var(--current-hover-color)" },
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
const simple = (attribute, property, values) => ({
|
|
74
|
+
attribute,
|
|
75
|
+
values: Object.fromEntries(Object.entries(values).map(([name, value]) => [name, { rest: { [property]: value } }])),
|
|
76
|
+
});
|
|
77
|
+
const same = (...names) => Object.fromEntries(names.map((name) => [name, name]));
|
|
78
|
+
/** The direction sections and children follow; left to right follows the reading direction (it flips in Arabic). */
|
|
79
|
+
export const DIRECTION_AXIS = simple("data-direction", "box-direction", {
|
|
80
|
+
"left-to-right": "row",
|
|
81
|
+
"right-to-left": "row-reverse",
|
|
82
|
+
"top-to-bottom": "column",
|
|
83
|
+
"bottom-to-top": "column-reverse",
|
|
84
|
+
});
|
|
85
|
+
/** Along the direction: start, center (the default), end; left and right only where a side must be fixed. */
|
|
86
|
+
export const JUSTIFY_AXIS = simple("data-justify", "box-justify", same("start", "center", "end", "left", "right", "space-between"));
|
|
87
|
+
/** Across the direction. */
|
|
88
|
+
export const ALIGN_AXIS = simple("data-align", "box-align", same("start", "center", "end", "stretch", "baseline"));
|
|
89
|
+
/** The text inside, centered by default. */
|
|
90
|
+
export const TEXT_ALIGN_AXIS = simple("data-text-align", "box-text-align", same("start", "center", "end", "left", "right"));
|
|
91
|
+
/** Whether children wrap onto more lines when they don't fit. */
|
|
92
|
+
export const WRAP_AXIS = simple("data-wrap", "box-wrap", same("wrap", "nowrap"));
|
|
93
|
+
/** Spaces from the scale: `data-gap="8"` is `var(--scale-8)`. */
|
|
94
|
+
const spaced = (attribute, property, scale) => simple(attribute, property, Object.fromEntries(scale.map((step) => [String(step), `var(--scale-${step})`])));
|
|
95
|
+
/**
|
|
96
|
+
* Every axis of a box, in the order their rules are written: variant, direction, justify, align, text align, and the
|
|
97
|
+
* gap and padding from the scale.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* boxAxes(DEFAULT_INTERFACE.scale).map((axis) => axis.attribute); // ["data-variant", "data-direction", …]
|
|
101
|
+
*/
|
|
102
|
+
export function boxAxes(scale) {
|
|
103
|
+
return [
|
|
104
|
+
VARIANT_AXIS,
|
|
105
|
+
DIRECTION_AXIS,
|
|
106
|
+
JUSTIFY_AXIS,
|
|
107
|
+
ALIGN_AXIS,
|
|
108
|
+
TEXT_ALIGN_AXIS,
|
|
109
|
+
WRAP_AXIS,
|
|
110
|
+
spaced("data-gap", "box-gap", scale),
|
|
111
|
+
spaced("data-padding", "box-padding", scale),
|
|
112
|
+
];
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/box-axis/index.ts"],"names":[],"mappings":"AAEA,uFAAuF;AACvF,MAAM,CAAC,MAAM,kBAAkB,GAAqB;IAClD,aAAa,EAAE,MAAM;IACrB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,QAAQ;IACvB,WAAW,EAAE,QAAQ;IACrB,gBAAgB,EAAE,QAAQ;IAC1B,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,KAAK;IACpB,kBAAkB,EAAE,KAAK;IACzB,qBAAqB,EAAE,KAAK;IAC5B,sBAAsB,EAAE,KAAK;IAC7B,kBAAkB,EAAE,aAAa;IACjC,g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WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AACnH,4CAA4C;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CACnC,iBAAiB,EACjB,gBAAgB,EAChB,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAChD,CAAC;AAEF,iEAAiE;AACjE,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEjF,iEAAiE;AACjE,MAAM,MAAM,GAAG,CAAC,SAAiB,EAAE,QAAgB,EAAE,KAAwB,EAAE,EAAE,CAC/E,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,eAAe,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/G;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,KAAwB;IAC9C,OAAO;QACL,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,UAAU;QACV,eAAe;QACf,SAAS;QACT,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC;QACpC,MAAM,CAAC,cAAc,EAAE,aAAa,EAAE,KAAK,CAAC;KAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** CSS custom properties by name (without dashes) and their values. */
|
|
2
|
+
export type AxisDeclarations = Readonly<Record<string, string>>;
|
|
3
|
+
/** What one value of an axis sets: at rest, and over it while hovered and while pressed (interactive boxes). */
|
|
4
|
+
export interface AxisValue {
|
|
5
|
+
rest: AxisDeclarations;
|
|
6
|
+
hover?: AxisDeclarations;
|
|
7
|
+
active?: AxisDeclarations;
|
|
8
|
+
}
|
|
9
|
+
/** One way a box can vary (its variant, direction, gap…): the attribute that carries it and each value's look. */
|
|
10
|
+
export interface Axis {
|
|
11
|
+
/** The attribute, such as `data-variant` (and `data-variant-960` per breakpoint). */
|
|
12
|
+
attribute: string;
|
|
13
|
+
values: Readonly<Record<string, AxisValue>>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/box-axis/type.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhE,gHAAgH;AAChH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,kHAAkH;AAClH,MAAM,WAAW,IAAI;IACnB,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/box-axis/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ButtonProperties } from "@sharadox/graphical-user-interface-web-library/button/type";
|
|
2
|
+
/**
|
|
3
|
+
* The button: a `<button>`, or with `href` a link (next/link's `Link`, or the site's own `link`) that looks the same,
|
|
4
|
+
* so the two can never drift apart. Filled in the brand color by default; any variant, color, color style, corner,
|
|
5
|
+
* line and size (each per breakpoint too), a prefix and a suffix section, or one square icon. While `loading` it
|
|
6
|
+
* shows the spinner, is marked busy and ignores clicks, so an action never runs twice; disabled, a link loses its
|
|
7
|
+
* address. It is a client component (it handles clicks), so a server page can use it with serializable properties.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <Button type="submit" loading={saving}>Save</Button>
|
|
11
|
+
* <Button href="/en/contact" variant="outlined">Contact</Button>
|
|
12
|
+
* <Button square icon="close" variant="transparent" aria-label="Close" />
|
|
13
|
+
*/
|
|
14
|
+
export declare function Button(properties: ButtonProperties): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/button/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAC;AAEnG;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,UAAU,EAAE,gBAAgB,+BAiDlD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { Icon } from "@sharadox/icon-web-library/icon";
|
|
5
|
+
import { Box } from "@sharadox/graphical-user-interface-web-library/box";
|
|
6
|
+
/**
|
|
7
|
+
* The button: a `<button>`, or with `href` a link (next/link's `Link`, or the site's own `link`) that looks the same,
|
|
8
|
+
* so the two can never drift apart. Filled in the brand color by default; any variant, color, color style, corner,
|
|
9
|
+
* line and size (each per breakpoint too), a prefix and a suffix section, or one square icon. While `loading` it
|
|
10
|
+
* shows the spinner, is marked busy and ignores clicks, so an action never runs twice; disabled, a link loses its
|
|
11
|
+
* address. It is a client component (it handles clicks), so a server page can use it with serializable properties.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <Button type="submit" loading={saving}>Save</Button>
|
|
15
|
+
* <Button href="/en/contact" variant="outlined">Contact</Button>
|
|
16
|
+
* <Button square icon="close" variant="transparent" aria-label="Close" />
|
|
17
|
+
*/
|
|
18
|
+
export function Button(properties) {
|
|
19
|
+
const { variant = "filled", color = "brand", state, loading = false, disabled = false, icon, square, children, onClick, ...rest } = properties;
|
|
20
|
+
const currentState = state ?? (disabled ? "disabled" : loading ? "loading" : "enabled");
|
|
21
|
+
const ignored = currentState === "loading" || currentState === "disabled";
|
|
22
|
+
const click = (event) => {
|
|
23
|
+
if (ignored)
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
else
|
|
26
|
+
onClick?.(event);
|
|
27
|
+
};
|
|
28
|
+
const content = (_jsxs(_Fragment, { children: [icon && _jsx(Icon, { name: icon }), children] }));
|
|
29
|
+
const box = { ...rest, variant, color, square, interactive: true, state: currentState, onClick: click };
|
|
30
|
+
if (rest.href !== undefined) {
|
|
31
|
+
const { link: Anchor = Link, href, ...anchor } = box;
|
|
32
|
+
if (currentState === "disabled") {
|
|
33
|
+
// A disabled link goes nowhere: no address, still announced as a link that is disabled.
|
|
34
|
+
return (_jsx(Box, { ...anchor, as: "a", role: "link", children: content }));
|
|
35
|
+
}
|
|
36
|
+
return (_jsx(Box, { ...anchor, as: Anchor, href: href, children: content }));
|
|
37
|
+
}
|
|
38
|
+
const { type = "button", link: _link, ...button } = box;
|
|
39
|
+
void _link;
|
|
40
|
+
return (_jsx(Box, { ...button, as: "button", type: type, disabled: currentState === "disabled", children: content }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/button/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,oDAAoD,CAAC;AAIzE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,MAAM,CAAC,UAA4B;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ACD,OAAO,CACL,KAAC,GAAG,OAAK,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,YACpC,OAAO,GACJ,CACP,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,GAAG,GAAuD,CAAC;IAC5G,KAAK,KAAK,CAAC;IACX,OAAO,CACL,KAAC,GAAG,OAAK,MAAM,EAAE,EAAE,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,KAAK,UAAU,YAC3E,OAAO,GACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentType, ReactNode } from "react";
|
|
2
|
+
import type { IconName } from "@sharadox/icon-web-library/icon/type";
|
|
3
|
+
import type { BoxLook, BoxState } from "@sharadox/graphical-user-interface-web-library/box/type";
|
|
4
|
+
/** What a link component receives to draw a button-looking link (next/link's `Link` by default). */
|
|
5
|
+
export interface ButtonLinkProperties extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
|
|
6
|
+
href: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/** What every button shares, a link or not. */
|
|
10
|
+
interface ButtonLook extends Omit<BoxLook, "direction" | "justify" | "align" | "textAlign" | "gap" | "padding"> {
|
|
11
|
+
/** Forces a state (for the design system); otherwise it follows the pointer, `disabled` and `loading`. */
|
|
12
|
+
state?: BoxState;
|
|
13
|
+
/** Shows the spinner instead of the words and ignores clicks while an action runs. */
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** A section before the words. */
|
|
17
|
+
prefix?: ReactNode;
|
|
18
|
+
/** A section after the words. */
|
|
19
|
+
suffix?: ReactNode;
|
|
20
|
+
/** An icon as the whole content (with `square`) or before the words. */
|
|
21
|
+
icon?: IconName;
|
|
22
|
+
/** Holds one icon or character: square, with no padding. Name it with `aria-label`. */
|
|
23
|
+
square?: boolean;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/** A button, or a link that looks like one (with `href`). */
|
|
27
|
+
export type ButtonProperties = (ButtonLook & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color" | "prefix" | "disabled"> & {
|
|
28
|
+
href?: undefined;
|
|
29
|
+
link?: undefined;
|
|
30
|
+
}) | (ButtonLook & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "color" | "prefix"> & {
|
|
31
|
+
/** Where the link leads. */
|
|
32
|
+
href: string;
|
|
33
|
+
/** The link component (a site's own, such as one gliding to sections): next/link's `Link` by default. */
|
|
34
|
+
link?: ComponentType<ButtonLinkProperties>;
|
|
35
|
+
});
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/button/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AAEjG,oGAAoG;AACpG,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACjG,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,+CAA+C;AAC/C,UAAU,UAAW,SAAQ,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,KAAK,GAAG,SAAS,CAAC;IAC7G,0GAA0G;IAC1G,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iCAAiC;IACjC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,uFAAuF;IACvF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GACxB,CAAC,UAAU,GACT,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC,GAAG;IAC/E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC,GACJ,CAAC,UAAU,GACT,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,GAAG;IAC3E,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,yGAAyG;IACzG,IAAI,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC5C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/button/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every value the design system shows a button in. It sits apart from the (client) button, so server code can read
|
|
3
|
+
* it.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* BUTTON_AXES.variant; // ["filled", "outlined", "transparent", "inline"]
|
|
7
|
+
*/
|
|
8
|
+
export declare const BUTTON_AXES: {
|
|
9
|
+
readonly variant: readonly ["filled", "outlined", "transparent", "inline"];
|
|
10
|
+
readonly state: readonly ["enabled", "hover", "active", "loading", "disabled"];
|
|
11
|
+
readonly size: readonly ["small", "medium", "large"];
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/button-axis/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;CAId,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every value the design system shows a button in. It sits apart from the (client) button, so server code can read
|
|
3
|
+
* it.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* BUTTON_AXES.variant; // ["filled", "outlined", "transparent", "inline"]
|
|
7
|
+
*/
|
|
8
|
+
export const BUTTON_AXES = {
|
|
9
|
+
variant: ["filled", "outlined", "transparent", "inline"],
|
|
10
|
+
state: ["enabled", "hover", "active", "loading", "disabled"],
|
|
11
|
+
size: ["small", "medium", "large"],
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/button-axis/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC;IACxD,KAAK,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC;IAC5D,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CheckboxProperties } from "@sharadox/graphical-user-interface-web-library/checkbox/type";
|
|
2
|
+
/**
|
|
3
|
+
* A checkbox drawn like the buttons: outlined, filled once checked, with a check growing in. A native checkbox
|
|
4
|
+
* underneath, so it works with forms, keyboards and screen readers. Controlled (`checked`) or not (`defaultChecked`).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <Checkbox label="Remember me" name="remember" />
|
|
8
|
+
*/
|
|
9
|
+
export declare function Checkbox({ checked, defaultChecked, onChange, ...mark }: CheckboxProperties): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/checkbox/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAEvG;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,cAAsB,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,+BAclG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { ToggleMark } from "@sharadox/graphical-user-interface-web-library/toggle-mark";
|
|
5
|
+
/**
|
|
6
|
+
* A checkbox drawn like the buttons: outlined, filled once checked, with a check growing in. A native checkbox
|
|
7
|
+
* underneath, so it works with forms, keyboards and screen readers. Controlled (`checked`) or not (`defaultChecked`).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <Checkbox label="Remember me" name="remember" />
|
|
11
|
+
*/
|
|
12
|
+
export function Checkbox({ checked, defaultChecked = false, onChange, ...mark }) {
|
|
13
|
+
const [own, setOwn] = useState(defaultChecked);
|
|
14
|
+
const current = checked ?? own;
|
|
15
|
+
return (_jsx(ToggleMark, { ...mark, type: "checkbox", checked: current, onChange: (next) => {
|
|
16
|
+
if (checked === undefined)
|
|
17
|
+
setOwn(next);
|
|
18
|
+
onChange?.(next);
|
|
19
|
+
} }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/checkbox/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,4DAA4D,CAAC;AAGxF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAsB;IACjG,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,OAAO,IAAI,GAAG,CAAC;IAC/B,OAAO,CACL,KAAC,UAAU,OACL,IAAI,EACR,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;YACjB,IAAI,OAAO,KAAK,SAAS;gBAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YACxC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToggleMarkProperties } from "@sharadox/graphical-user-interface-web-library/toggle-mark/type";
|
|
2
|
+
export interface CheckboxProperties extends Omit<ToggleMarkProperties, "type" | "checked" | "onChange"> {
|
|
3
|
+
/** Controlled: whether it is checked. */
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
/** Uncontrolled: whether it starts checked. */
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/checkbox/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAC;AAE5G,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IACrG,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/checkbox/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChoiceProperties } from "@sharadox/graphical-user-interface-web-library/choice/type";
|
|
2
|
+
/**
|
|
3
|
+
* A segmented choice: one radio button per option in a row, the chosen one filled. It is one stop in the tab order
|
|
4
|
+
* (the chosen option); the arrow keys move and choose, wrapping around, and Home and End jump to the ends, as a radio
|
|
5
|
+
* group does.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <Choice label="Size" options={[{ value: "small", label: "Small" }, …]} value={size} onChange={setSize} />
|
|
9
|
+
*/
|
|
10
|
+
export declare function Choice({ label, options, value, onChange, size, color, className }: ChoiceProperties): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/choice/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAC;AAInG;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAoB,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BAwClH"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { Box } from "@sharadox/graphical-user-interface-web-library/box";
|
|
5
|
+
import { Button } from "@sharadox/graphical-user-interface-web-library/button";
|
|
6
|
+
const STEPS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
|
|
7
|
+
/**
|
|
8
|
+
* A segmented choice: one radio button per option in a row, the chosen one filled. It is one stop in the tab order
|
|
9
|
+
* (the chosen option); the arrow keys move and choose, wrapping around, and Home and End jump to the ends, as a radio
|
|
10
|
+
* group does.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <Choice label="Size" options={[{ value: "small", label: "Small" }, …]} value={size} onChange={setSize} />
|
|
14
|
+
*/
|
|
15
|
+
export function Choice({ label, options, value, onChange, size, color = "foreground", className }) {
|
|
16
|
+
const group = useRef(null);
|
|
17
|
+
const chosen = Math.max(0, options.findIndex((option) => option.value === value));
|
|
18
|
+
const move = (event) => {
|
|
19
|
+
const step = STEPS[event.key];
|
|
20
|
+
const next = event.key === "Home"
|
|
21
|
+
? 0
|
|
22
|
+
: event.key === "End"
|
|
23
|
+
? options.length - 1
|
|
24
|
+
: step === undefined
|
|
25
|
+
? undefined
|
|
26
|
+
: (chosen + step + options.length) % options.length;
|
|
27
|
+
if (next === undefined)
|
|
28
|
+
return;
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
onChange(options[next].value);
|
|
31
|
+
group.current?.querySelectorAll('[role="radio"]')[next]?.focus();
|
|
32
|
+
};
|
|
33
|
+
return (_jsx(Box, { role: "radiogroup", "aria-label": label, gap: 4, wrap: "wrap", className: className, ref: group, children: options.map((option, index) => (_jsx(Button, { role: "radio", "aria-checked": option.value === value, tabIndex: index === chosen ? 0 : -1, variant: option.value === value ? "filled" : "transparent", color: color, size: size, onClick: () => onChange(option.value), onKeyDown: move, children: option.label }, option.value))) }));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/choice/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,MAAM,EAAsB,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,oDAAoD,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAG/E,MAAM,KAAK,GAAqC,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;AAE5G;;;;;;;GAOG;AACH,MAAM,UAAU,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,GAAG,YAAY,EAAE,SAAS,EAAoB;IACjH,MAAM,KAAK,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CACrB,CAAC,EACD,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,CACtD,CAAC;IACF,MAAM,IAAI,GAAG,CAAC,KAAoB,EAAE,EAAE;QACpC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,IAAI,GACR,KAAK,CAAC,GAAG,KAAK,MAAM;YAClB,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,KAAK,CAAC,GAAG,KAAK,KAAK;gBACnB,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;gBACpB,CAAC,CAAC,IAAI,KAAK,SAAS;oBAClB,CAAC,C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words it shows. */
|
|
3
|
+
export interface ChoiceOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ChoiceProperties {
|
|
8
|
+
/** The group's name for assistive technology. */
|
|
9
|
+
label: string;
|
|
10
|
+
options: readonly ChoiceOption[];
|
|
11
|
+
/** The chosen option's value. */
|
|
12
|
+
value: string;
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
size?: Responsive<string>;
|
|
15
|
+
/** The chosen option's fill, and the others' words (`foreground` by default). */
|
|
16
|
+
color?: Responsive<string>;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/choice/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gEAAgE,CAAC;AAEjG,yDAAyD;AACzD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IACjC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1B,iFAAiF;IACjF,KAAK,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/choice/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FieldProperties } from "@sharadox/graphical-user-interface-web-library/field/type";
|
|
2
|
+
/**
|
|
3
|
+
* A form control with its label above it and its hint and error under it, all linked for assistive technology: the
|
|
4
|
+
* label names the control, the hint and error describe it, and an error marks it invalid. The control is drawn by
|
|
5
|
+
* `children`, which receives the attributes to spread on it.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <Field label="Email" hint="We never share it." error={error}>{(control) => <input {...control} type="email" />}</Field>
|
|
9
|
+
*/
|
|
10
|
+
export declare function Field({ label, hideLabel, hint, error, id, className, children }: FieldProperties): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/field/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAG/G;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,eAAe,+BA6BhG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { Box } from "@sharadox/graphical-user-interface-web-library/box";
|
|
4
|
+
import styles from "./index.module.css";
|
|
5
|
+
/**
|
|
6
|
+
* A form control with its label above it and its hint and error under it, all linked for assistive technology: the
|
|
7
|
+
* label names the control, the hint and error describe it, and an error marks it invalid. The control is drawn by
|
|
8
|
+
* `children`, which receives the attributes to spread on it.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <Field label="Email" hint="We never share it." error={error}>{(control) => <input {...control} type="email" />}</Field>
|
|
12
|
+
*/
|
|
13
|
+
export function Field({ label, hideLabel, hint, error, id, className, children }) {
|
|
14
|
+
const made = useId();
|
|
15
|
+
const controlId = id ?? made;
|
|
16
|
+
const hintId = `${controlId}-hint`;
|
|
17
|
+
const errorId = `${controlId}-error`;
|
|
18
|
+
const describedBy = [hint !== undefined && hintId, error !== undefined && errorId].filter(Boolean).join(" ");
|
|
19
|
+
const control = {
|
|
20
|
+
id: controlId,
|
|
21
|
+
...(describedBy && { "aria-describedby": describedBy }),
|
|
22
|
+
...(error !== undefined && { "aria-invalid": true }),
|
|
23
|
+
};
|
|
24
|
+
return (_jsxs(Box, { direction: "top-to-bottom", align: "stretch", textAlign: "start", gap: 8, className: className, children: [_jsx("label", { htmlFor: controlId, className: styles.label, ...(hideLabel && { "data-hidden": "" }), children: label }), children(control), hint !== undefined && (_jsx(Box, { as: "p", id: hintId, color: "middleground", justify: "start", textAlign: "start", className: styles.message, children: hint })), error !== undefined && (_jsx(Box, { as: "p", id: errorId, color: "error", justify: "start", textAlign: "start", className: styles.message, children: error }))] }));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/field/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,oDAAoD,CAAC;AAEzE,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAmB;IAC/F,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC;IACrB,MAAM,SAAS,GAAG,EAAE,IAAI,IAAI,CAAC;IAC7B,MAAM,MAAM,GAAG,GAAG,SAAS,OAAO,CAAC;IACnC,MAAM,OAAO,GAAG,GAAG,SAAS,QAAQ,CAAC;IACrC,MAAM,WAAW,GAAG,CAAC,IAAI,KAAK,SAA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hidden]){position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:where(.message){margin:0;color:var(--current-color);font-size:var(--scale-12)}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:where(.label) {
|
|
2
|
+
font-size: var(--current-font-size);
|
|
3
|
+
font-weight: var(--current-font-weight);
|
|
4
|
+
text-align: start;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Hidden from sight, still read by screen readers.
|
|
8
|
+
:where(.label[data-hidden]) {
|
|
9
|
+
position: absolute;
|
|
10
|
+
inline-size: 1px;
|
|
11
|
+
block-size: 1px;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
clip-path: inset(50%);
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.message) {
|
|
18
|
+
margin: 0;
|
|
19
|
+
color: var(--current-color);
|
|
20
|
+
font-size: var(--scale-12);
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** What the control inside a field takes, so the label names it and the hint and error describe it. */
|
|
3
|
+
export interface FieldControl {
|
|
4
|
+
id: string;
|
|
5
|
+
"aria-describedby"?: string;
|
|
6
|
+
"aria-invalid"?: true;
|
|
7
|
+
}
|
|
8
|
+
export interface FieldProperties {
|
|
9
|
+
/** The control's name, shown above it. */
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
/** Hides the label from sight; screen readers still read it. */
|
|
12
|
+
hideLabel?: boolean;
|
|
13
|
+
/** A line of help under the control. */
|
|
14
|
+
hint?: ReactNode;
|
|
15
|
+
/** What is wrong, in the error color; marks the control invalid. */
|
|
16
|
+
error?: ReactNode;
|
|
17
|
+
/** The control's id; one is made otherwise. */
|
|
18
|
+
id?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Draws the control with what it must take. */
|
|
21
|
+
children: (control: FieldControl) => ReactNode;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/field/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,uGAAuG;AACvG,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,KAAK,EAAE,SAAS,CAAC;IACjB,gEAAgE;IAChE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oEAAoE;IACpE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,SAAS,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/field/type.ts"],"names":[],"mappings":""}
|