@namiml/web-sdk 3.4.3-dev.202606151935 → 3.4.3-dev.202606181527
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/dist/components/elements/TextInput.d.ts +34 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/nami-web.cjs +45 -22
- package/dist/nami-web.d.ts +34 -1
- package/dist/nami-web.mjs +55 -32
- package/dist/nami-web.umd.js +55 -32
- package/package.json +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type TTextInputComponent } from "@namiml/sdk-core";
|
|
2
|
+
import { NamiElement } from "../NamiElement";
|
|
3
|
+
import { type CSSResult } from "lit";
|
|
4
|
+
export declare class NamiTextInput extends NamiElement<TTextInputComponent> {
|
|
5
|
+
component: TTextInputComponent;
|
|
6
|
+
inFocusedState: boolean;
|
|
7
|
+
scaleFactor: number;
|
|
8
|
+
/** Live (non-reactive) buffer of the input value; mirrors PaywallState. */
|
|
9
|
+
private _value;
|
|
10
|
+
/** Whether the input currently holds DOM focus. */
|
|
11
|
+
private _focused;
|
|
12
|
+
constructor();
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
private get isTelevision();
|
|
15
|
+
/** Map the wire `type` to the validator's `TTextInputType`. */
|
|
16
|
+
private validatorType;
|
|
17
|
+
private validator;
|
|
18
|
+
private get currentError();
|
|
19
|
+
private _handleInput;
|
|
20
|
+
private _handleFocus;
|
|
21
|
+
private _handleBlur;
|
|
22
|
+
protected styles(): CSSResult;
|
|
23
|
+
private resolvedSpacing;
|
|
24
|
+
private resolvedBorderWidth;
|
|
25
|
+
private applyLabelStyles;
|
|
26
|
+
/**
|
|
27
|
+
* 4-state styling: error > focused > filled > empty. Errors and focus override
|
|
28
|
+
* the resting border/fill/radius. Filled vs empty share the resting style; the
|
|
29
|
+
* distinction exists for parity with the native ports and future theming.
|
|
30
|
+
*/
|
|
31
|
+
private applyInputStyles;
|
|
32
|
+
private applyErrorStyles;
|
|
33
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
34
|
+
}
|
|
@@ -26,6 +26,7 @@ import { NamiProgressIndicator } from "./elements/ProgressIndicator";
|
|
|
26
26
|
import { NamiToggleButton } from "./elements/ToggleButton";
|
|
27
27
|
import { NamiCountdownTimerText } from "./elements/CountdownTimerText";
|
|
28
28
|
import { NamiProgressBar } from "./elements/ProgressBar";
|
|
29
|
+
import { NamiTextInput } from "./elements/TextInput";
|
|
29
30
|
declare global {
|
|
30
31
|
interface HTMLElementTagNameMap {
|
|
31
32
|
"nami-spacer": NamiSpacer;
|
|
@@ -57,6 +58,7 @@ declare global {
|
|
|
57
58
|
"nami-toggle-button": NamiToggleButton;
|
|
58
59
|
"nami-countdown-timer-text": NamiCountdownTimerText;
|
|
59
60
|
"nami-progress-bar": NamiProgressBar;
|
|
61
|
+
"nami-text-input": NamiTextInput;
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
|
-
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiRepeatingGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton, NamiStack, NamiPaywallScreen, NamiQRCode, NamiToggleSwitch, NamiRadioButton, NamiProgressIndicator, NamiProgressBar, NamiToggleButton, NamiCountdownTimerText, };
|
|
64
|
+
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiRepeatingGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton, NamiStack, NamiPaywallScreen, NamiQRCode, NamiToggleSwitch, NamiRadioButton, NamiProgressIndicator, NamiProgressBar, NamiToggleButton, NamiCountdownTimerText, NamiTextInput, };
|