@sharadox/graphical-user-interface-web-library 0.2.0-fields.7 → 0.2.0-fields.8
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.
|
@@ -16,6 +16,6 @@ import styles from "./index.module.css";
|
|
|
16
16
|
export function TextField(properties) {
|
|
17
17
|
const { label, hideLabel, hint, error, prefix, suffix, state, variant = "outlined", color, colorStyle, corner, line, size, className, multiline, id, ...control } = properties;
|
|
18
18
|
const disabled = Boolean(control.disabled);
|
|
19
|
-
return (_jsx(Field, { label: label, hideLabel: hideLabel, hint: hint, error: error, id: id, children: (attributes) => (_jsx(Box, { field: true, variant: variant, color: color ?? (error === undefined ? "middleground" : "error"), colorStyle: colorStyle, corner: corner, line: line, size: size, state: state ?? (disabled ? "disabled" : "enabled"), prefix: prefix, suffix: suffix, className: classNames(multiline && styles.multiline, className), ...(multiline && { "data-multiline": "" }), children: multiline ? (_jsx("textarea", { rows: 3, ...control, ...attributes, className: styles.control })) : (_jsx("input", { type: "text", ...control, ...attributes, className: styles.control })) })) }));
|
|
19
|
+
return (_jsx(Field, { label: label, hideLabel: hideLabel, hint: hint, error: error, id: id, children: (attributes) => (_jsx(Box, { field: true, variant: variant, color: color ?? (error === undefined ? "middleground" : "error"), colorStyle: colorStyle, corner: corner, line: line, size: size, state: state ?? (disabled ? "disabled" : "enabled"), prefix: prefix, suffix: suffix, className: classNames(styles.field, multiline && styles.multiline, className), ...(multiline && { "data-multiline": "" }), children: multiline ? (_jsx("textarea", { rows: 3, ...control, ...attributes, className: styles.control })) : (_jsx("input", { type: "text", ...control, ...attributes, className: styles.control })) })) }));
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/text-field/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,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CAAC,KACzE,CAAC,SAAS,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,YAE1C,SAAS,CAAC,CAAC,CAAC,CACX,mBACE,IAAI,EAAE,CAAC,KACF,OAAuD,KACxD,UAAU,EACd,SAAS,EAAE,MAAM,CAAC,OAAO,GACzB,CACH,CAAC,CAAC,CAAC,CACF,gBAAO,IAAI,EAAC,MAAM,KAAM,OAAkB,KAAM,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,GAAI,CAC1F,GACG,CACP,GACK,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:where(.control){box-sizing:border-box;inline-size:100%;min-inline-size:0;min-block-size:var(--section-minimum-size);margin:0;padding:0;border:0;outline:0;background:rgba(0,0,0,0);color:
|
|
1
|
+
:where(.control){box-sizing:border-box;inline-size:100%;min-inline-size:0;min-block-size:var(--section-minimum-size);margin:0;padding:0;border:0;outline:0;background:rgba(0,0,0,0);color:inherit;font:inherit;text-align:start}:where(.control)::placeholder{color:inherit;opacity:.6}:where(.control):disabled{cursor:default}:where(textarea.control){min-block-size:calc(var(--section-minimum-size)*2);padding-block:var(--scale-8);resize:vertical}:where(.multiline){align-items:stretch}:where(.field:not([data-variant=filled])) :where(.control){color:var(--current-hover-color)}
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
border: 0;
|
|
11
11
|
outline: 0;
|
|
12
12
|
background: transparent;
|
|
13
|
-
// The
|
|
14
|
-
color:
|
|
13
|
+
// The box's text color: the color's own on a fill (its "on" color), so it always reads.
|
|
14
|
+
color: inherit;
|
|
15
15
|
font: inherit;
|
|
16
16
|
text-align: start;
|
|
17
17
|
|
|
18
18
|
&::placeholder {
|
|
19
|
-
color:
|
|
20
|
-
opacity: 0.
|
|
19
|
+
color: inherit;
|
|
20
|
+
opacity: 0.6;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&:disabled {
|
|
@@ -35,3 +35,8 @@
|
|
|
35
35
|
:where(.multiline) {
|
|
36
36
|
align-items: stretch;
|
|
37
37
|
}
|
|
38
|
+
|
|
39
|
+
// Not filled, the typed text is the color's hovered text: foreground in a middleground field, the color otherwise.
|
|
40
|
+
:where(.field:not([data-variant="filled"])) :where(.control) {
|
|
41
|
+
color: var(--current-hover-color);
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharadox/graphical-user-interface-web-library",
|
|
3
|
-
"version": "0.2.0-fields.
|
|
3
|
+
"version": "0.2.0-fields.8",
|
|
4
4
|
"description": "One generic, accessible, fully configurable component library: every interface piece in every variant, color, corner, line, size and state, styled from a single source of truth that each brand configures.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENCA.md",
|