@tangible/ui 0.2.34 → 0.2.35
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/components/SecretInput/SecretInput.d.ts +1 -0
- package/components/SecretInput/SecretInput.js +4 -3
- package/components/SecretInput/types.d.ts +16 -2
- package/figma-tokens.json +1 -1
- package/icons/icons.svg +1 -1
- package/icons/sprite-version.js +1 -1
- package/icons/sprite.php +1 -1
- package/package.json +1 -1
- package/tui-manifest.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const SecretInput: import("react").ForwardRefExoticComponent<Omit<import("..").TextInputProps, "type" | "prefix" | "suffix"> & {
|
|
2
2
|
isSet?: boolean;
|
|
3
|
+
placeholder?: string;
|
|
3
4
|
defaultRevealed?: boolean;
|
|
4
5
|
revealed?: boolean;
|
|
5
6
|
onRevealChange?: (revealed: boolean) => void;
|
|
@@ -127,9 +127,10 @@ export const SecretInput = forwardRef(function SecretInput({ isSet = false, reve
|
|
|
127
127
|
type: revealed && !locked ? 'text' : 'password', value: value, defaultValue: defaultValue, onChange: handleChange, readOnly: locked || rest.readOnly, disabled: disabled, "aria-describedby": describedBy,
|
|
128
128
|
// The bullets are a placeholder, never a value — a real value would
|
|
129
129
|
// submit and overwrite the stored secret with eight bullet characters.
|
|
130
|
-
//
|
|
131
|
-
// the
|
|
132
|
-
|
|
130
|
+
// The consumer's placeholder is for the empty state: while a value is
|
|
131
|
+
// saved, `labels.valueSet` wins, or the field would invite pasting a
|
|
132
|
+
// key that is already there. Reword the set state via `labels`.
|
|
133
|
+
placeholder: showSetState ? text.valueSet : placeholder, className: cx('tui-secret-input', showSetState && 'is-set', locked && 'is-locked', className),
|
|
133
134
|
// `off` is the one value browsers deliberately ignore on a password
|
|
134
135
|
// field; `new-password` is what actually stops Chrome/Safari/Firefox
|
|
135
136
|
// offering a saved credential. That matters beyond annoyance: an
|
|
@@ -41,7 +41,8 @@ export type SecretInputLabels = {
|
|
|
41
41
|
* being concatenated in code.
|
|
42
42
|
*
|
|
43
43
|
* @remarks Placeholder text only. It is never a value, so nothing submits
|
|
44
|
-
* unless the user types.
|
|
44
|
+
* unless the user types. It wins over the `placeholder` prop while the
|
|
45
|
+
* set-state shows; see `placeholder`.
|
|
45
46
|
* @default "•••••••• Saved"
|
|
46
47
|
*/
|
|
47
48
|
valueSet?: string;
|
|
@@ -85,7 +86,8 @@ export declare const defaultSecretInputLabels: Required<SecretInputLabels>;
|
|
|
85
86
|
export type SecretInputProps = Omit<TextInputProps, 'type' | 'prefix' | 'suffix'> & {
|
|
86
87
|
/**
|
|
87
88
|
* A value exists server-side that is deliberately not shown. Renders the
|
|
88
|
-
* set-state treatment while the input is empty
|
|
89
|
+
* set-state treatment while the input is empty, including the
|
|
90
|
+
* `labels.valueSet` placeholder, which replaces `placeholder`.
|
|
89
91
|
*
|
|
90
92
|
* The stored value must never be passed to this component — see the contract
|
|
91
93
|
* above; a dev-only warning fires if it is alongside `isSet`. Nothing is submitted unless the user types, so an empty submit means
|
|
@@ -94,6 +96,18 @@ export type SecretInputProps = Omit<TextInputProps, 'type' | 'prefix' | 'suffix'
|
|
|
94
96
|
* @default false
|
|
95
97
|
*/
|
|
96
98
|
isSet?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Placeholder for the empty field when nothing is saved. While `isSet` and
|
|
101
|
+
* the field is empty, `labels.valueSet` is shown instead and this is
|
|
102
|
+
* ignored. Put format hints ("sk-…") in `Field` help text, which stays
|
|
103
|
+
* visible in both states.
|
|
104
|
+
*
|
|
105
|
+
* @remarks A deliberate exception to "an explicit prop beats its `labels`
|
|
106
|
+
* default": this is the empty-state prompt, and on a saved field a prompt
|
|
107
|
+
* such as "Paste your API key" reads as if nothing were stored. Reword the
|
|
108
|
+
* saved state through `labels.valueSet`.
|
|
109
|
+
*/
|
|
110
|
+
placeholder?: string;
|
|
97
111
|
/**
|
|
98
112
|
* Initial reveal state (uncontrolled).
|
|
99
113
|
* @default false
|
package/figma-tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
2
|
+
"version": "0.2.35",
|
|
3
3
|
"source": "publish/styles/all.expanded.css",
|
|
4
4
|
"prefix": "tui-",
|
|
5
5
|
"note": "Layer 1 primitives only. Component API tokens (--tui-{component}-*) are never defined in CSS — they exist only as fallback reads — so they have no Figma representation. CONTRACT: consumers read TUI defaults from this file at build time (variables[].cssVar, the \"Light\"/\"Dark\" mode names, and alias chains into TUI/Primitives). Renaming a cssVar or a mode is a breaking change to those consumers even when the CSS value is unchanged — a rename silently becomes an undefined default downstream — so treat it as at least a minor bump and call it out in the CHANGELOG.",
|
package/icons/icons.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" data-tui-icon-sprite="all" data-tui-icon-sprite-version="0.2.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" data-tui-icon-sprite="all" data-tui-icon-sprite-version="0.2.35" aria-hidden="true" focusable="false" style="position:absolute;width:0;height:0;overflow:hidden">
|
|
2
2
|
<symbol id="tui-cred-badge-check" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M10.893 4.558a1.377 1.377 0 0 1 2.214 0c.381.515 1.068.7 1.656.444a1.377 1.377 0 0 1 1.917 1.106c.072.637.575 1.14 1.212 1.213a1.377 1.377 0 0 1 1.106 1.916 1.38 1.38 0 0 0 .444 1.656c.744.55.744 1.663 0 2.214a1.38 1.38 0 0 0-.444 1.656 1.377 1.377 0 0 1-1.106 1.917 1.38 1.38 0 0 0-1.212 1.212 1.377 1.377 0 0 1-1.917 1.106 1.38 1.38 0 0 0-1.656.444 1.377 1.377 0 0 1-2.214 0 1.38 1.38 0 0 0-1.656-.444 1.377 1.377 0 0 1-1.916-1.106 1.38 1.38 0 0 0-1.213-1.212 1.377 1.377 0 0 1-1.106-1.917 1.38 1.38 0 0 0-.444-1.656 1.377 1.377 0 0 1 0-2.214c.515-.381.7-1.068.444-1.656a1.377 1.377 0 0 1 1.106-1.916 1.38 1.38 0 0 0 1.213-1.213 1.377 1.377 0 0 1 1.916-1.106 1.38 1.38 0 0 0 1.656-.444m5.193 5.91a.75.75 0 0 0-1.172-.936l-3.531 4.414-1.914-1.532a.75.75 0 1 0-.937 1.172l3.085 2.468z" clip-rule="evenodd"/></symbol>
|
|
3
3
|
<symbol id="tui-cred-badge-ribbon" viewBox="0 0 24 24"><path d="M11.032 3.488a1.205 1.205 0 0 1 1.936 0c.334.451.935.612 1.45.388a1.205 1.205 0 0 1 1.677.969c.063.557.503.997 1.06 1.06.805.092 1.291.935.969 1.678a1.204 1.204 0 0 0 .388 1.449c.65.481.65 1.455 0 1.936a1.205 1.205 0 0 0-.388 1.45 1.205 1.205 0 0 1-.969 1.677 1.204 1.204 0 0 0-1.06 1.06 1.205 1.205 0 0 1-1.678.969 1.205 1.205 0 0 0-1.449.388c-.481.65-1.455.65-1.936 0a1.204 1.204 0 0 0-1.45-.388 1.205 1.205 0 0 1-1.677-.969 1.205 1.205 0 0 0-1.06-1.06 1.205 1.205 0 0 1-.969-1.678 1.205 1.205 0 0 0-.388-1.449 1.205 1.205 0 0 1 0-1.936c.451-.334.612-.935.388-1.45a1.205 1.205 0 0 1 .969-1.677 1.205 1.205 0 0 0 1.06-1.06 1.205 1.205 0 0 1 1.678-.969 1.205 1.205 0 0 0 1.449-.388M8 17.482c.442.175.953.185 1.437-.025a.88.88 0 0 1 1.054.282 1.877 1.877 0 0 0 3.018 0 .88.88 0 0 1 1.054-.282c.484.21.995.2 1.437.025V21l-4-2.286L8 21z"/></symbol>
|
|
4
4
|
<symbol id="tui-cred-badge" viewBox="0 0 24 24"><path d="M13.107 4.558a1.377 1.377 0 0 0-2.214 0c-.381.515-1.068.7-1.656.444a1.377 1.377 0 0 0-1.916 1.106 1.38 1.38 0 0 1-1.213 1.213 1.377 1.377 0 0 0-1.106 1.916 1.38 1.38 0 0 1-.444 1.656 1.377 1.377 0 0 0 0 2.214c.515.381.7 1.068.444 1.656a1.377 1.377 0 0 0 1.106 1.917c.637.072 1.14.575 1.213 1.212a1.377 1.377 0 0 0 1.916 1.106 1.38 1.38 0 0 1 1.656.444c.55.744 1.663.744 2.214 0a1.38 1.38 0 0 1 1.656-.444 1.377 1.377 0 0 0 1.917-1.106 1.38 1.38 0 0 1 1.212-1.212 1.377 1.377 0 0 0 1.106-1.917 1.38 1.38 0 0 1 .444-1.656 1.377 1.377 0 0 0 0-2.214 1.38 1.38 0 0 1-.444-1.656 1.377 1.377 0 0 0-1.106-1.916 1.38 1.38 0 0 1-1.212-1.213 1.377 1.377 0 0 0-1.917-1.106 1.38 1.38 0 0 1-1.656-.444"/></symbol>
|
package/icons/sprite-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SPRITE_VERSION = '0.2.
|
|
1
|
+
export const SPRITE_VERSION = '0.2.35';
|
package/icons/sprite.php
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
// Replaced with the package version at build time.
|
|
24
|
-
$GLOBALS['tangible_ui_icon_sprite_copies'][__DIR__] = '0.2.
|
|
24
|
+
$GLOBALS['tangible_ui_icon_sprite_copies'][__DIR__] = '0.2.35';
|
|
25
25
|
|
|
26
26
|
if (!function_exists('tangible_ui_print_icon_sprite')) {
|
|
27
27
|
/**
|
package/package.json
CHANGED
package/tui-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
3
|
-
"generated": "2026-
|
|
2
|
+
"version": "0.2.35",
|
|
3
|
+
"generated": "2026-11-05T20:46:21.435Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
@@ -3081,7 +3081,7 @@
|
|
|
3081
3081
|
"type": "boolean",
|
|
3082
3082
|
"required": false,
|
|
3083
3083
|
"defaultValue": "false",
|
|
3084
|
-
"description": "A value exists server-side that is deliberately not shown. Renders the\nset-state treatment while the input is empty
|
|
3084
|
+
"description": "A value exists server-side that is deliberately not shown. Renders the\nset-state treatment while the input is empty, including the\n`labels.valueSet` placeholder, which replaces `placeholder`.\n\nThe stored value must never be passed to this component — see the contract\nabove; a dev-only warning fires if it is alongside `isSet`. Nothing is submitted unless the user types, so an empty submit means\n\"unchanged\" and the set-state is an accurate description of what the server\nstill holds (including after the user types and deletes back to empty)."
|
|
3085
3085
|
},
|
|
3086
3086
|
"defaultRevealed": {
|
|
3087
3087
|
"type": "boolean",
|