@pontive/pontkit-core 1.21.0 → 1.21.2
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/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/components/renderers/auth/recovery-codes/index.d.ts +1 -7
- package/dist/components/renderers/feedback/countdown/_countdown.d.ts +38 -13
- package/dist/components/renderers/feedback/countdown/countdown.defs.d.ts +9 -0
- package/dist/components/renderers/feedback/countdown/index.d.ts +1 -7
- package/dist/components/renderers/typography/subtitle/_subtitle.d.ts +14 -4
- package/dist/components/renderers/typography/subtitle/index.d.ts +1 -7
- package/dist/components/renderers/typography/subtitle/subtitle.defs.d.ts +4 -0
- package/dist/components/renderers/typography/title/_title.d.ts +19 -9
- package/dist/components/renderers/typography/title/index.d.ts +1 -7
- package/dist/components/renderers/typography/title/title.defs.d.ts +7 -0
- package/dist/components/renderers/typography/title/title.stories.d.ts +1 -0
- package/dist/element-tag-map.d.ts +2 -0
- package/dist/index.js +532 -539
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5475 -5456
- package/dist/index.mjs.map +1 -1
- package/dist/primitives/components/ui/input-otp/_input-otp-group.d.ts +6 -16
- package/dist/primitives/components/ui/input-otp/_input-otp-separator.d.ts +7 -7
- package/dist/primitives/components/ui/input-otp/_input-otp-slot.d.ts +9 -14
- package/dist/primitives/components/ui/input-otp/_input-otp.d.ts +20 -48
- package/dist/primitives/components/ui/input-otp/input-otp.d.ts +9 -9
- package/dist/primitives/components/ui/input-otp/input-otp.defs.d.ts +3 -3
- package/dist/styles.css +698 -178
- package/package.json +2 -2
- package/dist/components/renderers/feedback/countdown/countdown.types.d.ts +0 -6
- package/dist/components/renderers/typography/subtitle/subtitle.types.d.ts +0 -4
- package/dist/components/renderers/typography/title/title.types.d.ts +0 -4
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* input OTP may have a single group holding all the slots, or multiple groups,
|
|
5
|
-
* each holding a subset of the slots.
|
|
3
|
+
* A container for all or a subset of the input OTP slots.
|
|
6
4
|
*
|
|
7
5
|
* @element pont-input-otp-group
|
|
8
|
-
*
|
|
6
|
+
* - data-pont-input-otp-group (`div`): root
|
|
9
7
|
*/
|
|
10
|
-
export declare class
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
8
|
+
export declare class PontInputOTPGroup extends LitElement {
|
|
9
|
+
static readonly ROOT: string;
|
|
10
|
+
static readonly TAG: string;
|
|
14
11
|
protected createRenderRoot(): this;
|
|
15
|
-
|
|
16
|
-
* The slot of the input otp group.
|
|
17
|
-
*/
|
|
18
|
-
private get _groupSlot();
|
|
19
|
-
/**
|
|
20
|
-
* Handles the first updated callback, appending the children to the group
|
|
21
|
-
* slot.
|
|
22
|
-
*/
|
|
12
|
+
private get _slot();
|
|
23
13
|
protected firstUpdated(): void;
|
|
24
14
|
render(): import('lit-html').TemplateResult<1>;
|
|
25
15
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* OTP groups.
|
|
3
|
+
* A separator used between input groups.
|
|
5
4
|
*
|
|
6
5
|
* @element pont-input-otp-separator
|
|
7
|
-
*
|
|
6
|
+
* - data-pont-input-otp-separator (`div`): root/icon container
|
|
7
|
+
* - data-pont-input-otp-separator-icon (`svg`): Lucide icon
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export declare class PontInputOTPSeparator extends LitElement {
|
|
10
|
+
static readonly ROOT: string;
|
|
11
|
+
static readonly ICON: string;
|
|
12
|
+
static readonly TAG: string;
|
|
13
13
|
protected createRenderRoot(): this;
|
|
14
14
|
render(): import('lit-html').TemplateResult<1>;
|
|
15
15
|
}
|
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { InputOTPSlotProps } from './input-otp.defs';
|
|
2
|
+
import { InputOTPSlotProps as Props } from './input-otp.defs';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* character at a certain index of the input's value.
|
|
4
|
+
* A decorative container for a certain index/character of the input value.
|
|
6
5
|
*
|
|
7
6
|
* @element pont-input-otp-slot
|
|
8
|
-
*
|
|
7
|
+
* - data-pont-input-otp-slot (`div`): root
|
|
9
8
|
*/
|
|
10
|
-
export declare class
|
|
9
|
+
export declare class PontInputOTPSlot extends LitElement implements Props {
|
|
10
|
+
static readonly ROOT: string;
|
|
11
|
+
static readonly TAG: string;
|
|
12
|
+
static readonly FOCUS_EVENT: string;
|
|
11
13
|
/**
|
|
12
14
|
* The index of the character being displayed in the slot.
|
|
13
15
|
*/
|
|
14
16
|
index: number;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
* slot accordingly.
|
|
18
|
+
* Whether the component is in an error state.
|
|
18
19
|
*/
|
|
19
20
|
invalid?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Overrides the default behaviour to render into the light DOM.
|
|
22
|
-
*/
|
|
23
21
|
protected createRenderRoot(): this;
|
|
24
|
-
|
|
25
|
-
* The slot of the input otp slot.
|
|
26
|
-
*/
|
|
27
|
-
get _slotSlot(): HTMLElement | null;
|
|
22
|
+
get _slot(): HTMLElement | null;
|
|
28
23
|
/**
|
|
29
24
|
* Handles the click event of the input OTP slot, invoking the parent input
|
|
30
25
|
* OTP's event listener.
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
import { InputOTPProps, InputOTPAutocomplete, InputOTPInputmode } from './input-otp.defs';
|
|
2
|
+
import { InputOTPProps as Props, InputOTPAutocomplete, InputOTPInputmode } from './input-otp.defs';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* input OTP groups and separators, as well as the input element.
|
|
4
|
+
* A container for the input OTP children and the hidden `input` element.
|
|
6
5
|
*
|
|
7
6
|
* @element pont-input-otp
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* - data-pont-input-otp (`div`): root
|
|
8
|
+
* - data-pont-input-otp-wrapper (`div`): wraps the `input` element
|
|
9
|
+
* - data-pont-input-otp-input (`input`): hidden `input` element
|
|
11
10
|
*/
|
|
12
|
-
export declare class
|
|
11
|
+
export declare class PontInputOTP extends LitElement implements Props {
|
|
12
|
+
static readonly ROOT = "input-otp";
|
|
13
|
+
static readonly CONTAINER: string;
|
|
14
|
+
static readonly WRAPPER: string;
|
|
15
|
+
static readonly INPUT: string;
|
|
16
|
+
static readonly CARET: string;
|
|
17
|
+
static readonly CARET_WRAPPER: string;
|
|
18
|
+
static readonly TAG: string;
|
|
13
19
|
/**
|
|
14
20
|
* Hint for form autofill feature.
|
|
15
21
|
*/
|
|
@@ -65,7 +71,7 @@ export declare class InputOTP extends LitElement implements InputOTPProps {
|
|
|
65
71
|
/**
|
|
66
72
|
* Callback when the input is complete.
|
|
67
73
|
*/
|
|
68
|
-
onComplete?: (
|
|
74
|
+
onComplete?: (value: string) => unknown;
|
|
69
75
|
/**
|
|
70
76
|
* The user-defined blur handler for the input OTP input.
|
|
71
77
|
*/
|
|
@@ -102,26 +108,12 @@ export declare class InputOTP extends LitElement implements InputOTPProps {
|
|
|
102
108
|
* The id of the input element, determined by the provided `id` prop.
|
|
103
109
|
*/
|
|
104
110
|
private _inputId?;
|
|
105
|
-
/**
|
|
106
|
-
* Initialise `_children`, capturing the user children before Lit renders.
|
|
107
|
-
*/
|
|
108
111
|
constructor();
|
|
109
|
-
/**
|
|
110
|
-
* Overrides the default behaviour to render into the light DOM.
|
|
111
|
-
*/
|
|
112
112
|
protected createRenderRoot(): this;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
private
|
|
117
|
-
/**
|
|
118
|
-
* The wrapper slot of the input otp - child of container, parent of input.
|
|
119
|
-
*/
|
|
120
|
-
private get _wrapperSlot();
|
|
121
|
-
/**
|
|
122
|
-
* The input OTP slot children.
|
|
123
|
-
*/
|
|
124
|
-
private get _slots();
|
|
113
|
+
private get _rootEl();
|
|
114
|
+
private get _wrapperEl();
|
|
115
|
+
private get _slotEls();
|
|
116
|
+
private _inputEl;
|
|
125
117
|
/**
|
|
126
118
|
* Whether or not the tabs element is 'controlled' - determined by whether or
|
|
127
119
|
* not the value prop was provided by the user.
|
|
@@ -132,10 +124,8 @@ export declare class InputOTP extends LitElement implements InputOTPProps {
|
|
|
132
124
|
* the internal, uncontrolled value.
|
|
133
125
|
*/
|
|
134
126
|
private get _currentValue();
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
*/
|
|
138
|
-
private _inputEl;
|
|
127
|
+
protected updated(changed: PropertyValues): void;
|
|
128
|
+
protected firstUpdated(): void;
|
|
139
129
|
/**
|
|
140
130
|
* Returns the regex expression of the `pattern` prop.
|
|
141
131
|
*/
|
|
@@ -177,16 +167,6 @@ export declare class InputOTP extends LitElement implements InputOTPProps {
|
|
|
177
167
|
* Helper function, handling the deletion of characters from the input.
|
|
178
168
|
*/
|
|
179
169
|
private _deleteChar;
|
|
180
|
-
/**
|
|
181
|
-
* Handles the updated callback, transferring the `id` prop's value to
|
|
182
|
-
* `_inputId` and removing it from the parent (if changed).
|
|
183
|
-
*/
|
|
184
|
-
protected updated(changed: PropertyValues): void;
|
|
185
|
-
/**
|
|
186
|
-
* Handles the first updated callback, appending the children to the container
|
|
187
|
-
* slot, transferring the `id` prop, and initialising the internal value.
|
|
188
|
-
*/
|
|
189
|
-
protected firstUpdated(): void;
|
|
190
170
|
/**
|
|
191
171
|
* Handles the blur event of the input, dispatching the focus event (so it
|
|
192
172
|
* bubbles) and invoking the user-provided event handler (if provided).
|
|
@@ -197,10 +177,6 @@ export declare class InputOTP extends LitElement implements InputOTPProps {
|
|
|
197
177
|
* bubbles) and invoking the user-provided event handler (if provided).
|
|
198
178
|
*/
|
|
199
179
|
private _handleFocus;
|
|
200
|
-
/**
|
|
201
|
-
* Handles the key down event of the input OTP input, updating internal
|
|
202
|
-
* states, handling both insertion and deletion.
|
|
203
|
-
*/
|
|
204
180
|
/**
|
|
205
181
|
* Handles the key down event of the input OTP input, updating internal
|
|
206
182
|
* states, handling insertion, deletion and navigation.
|
|
@@ -211,10 +187,6 @@ export declare class InputOTP extends LitElement implements InputOTPProps {
|
|
|
211
187
|
* `pasteTransformer` (if provided), updating the input value and handling
|
|
212
188
|
* pattern validation.
|
|
213
189
|
*/
|
|
214
|
-
/**
|
|
215
|
-
* Handles the paste event of the input OTP input.
|
|
216
|
-
* Pastes starting from the current active slot (shadcn behaviour).
|
|
217
|
-
*/
|
|
218
190
|
private _handlePaste;
|
|
219
191
|
render(): import('lit-html').TemplateResult<1>;
|
|
220
192
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
1
|
+
import { PontInputOTP } from './_input-otp';
|
|
2
|
+
import { PontInputOTPGroup } from './_input-otp-group';
|
|
3
|
+
import { PontInputOTPSeparator } from './_input-otp-separator';
|
|
4
|
+
import { PontInputOTPSlot } from './_input-otp-slot';
|
|
5
|
+
export { PontInputOTP, PontInputOTPGroup, PontInputOTPSeparator, PontInputOTPSlot, };
|
|
6
6
|
/**
|
|
7
7
|
* Accessible one-time password component with copy paste functionality.
|
|
8
8
|
*/
|
|
9
9
|
declare global {
|
|
10
10
|
interface HTMLElementTagNameMap {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
"pont-input-otp": PontInputOTP;
|
|
12
|
+
"pont-input-otp-group": PontInputOTPGroup;
|
|
13
|
+
"pont-input-otp-slot": PontInputOTPSlot;
|
|
14
|
+
"pont-input-otp-separator": PontInputOTPSeparator;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type InputOTPAutocomplete =
|
|
2
|
-
export type InputOTPInputmode =
|
|
1
|
+
export type InputOTPAutocomplete = "off" | "on" | string;
|
|
2
|
+
export type InputOTPInputmode = "numeric" | "text" | "decimal" | "tel" | "search" | "email" | "url";
|
|
3
3
|
export interface InputOTPProps {
|
|
4
4
|
autocomplete: InputOTPAutocomplete;
|
|
5
5
|
defaultValue?: string;
|
|
@@ -13,7 +13,7 @@ export interface InputOTPProps {
|
|
|
13
13
|
required?: boolean;
|
|
14
14
|
value?: string;
|
|
15
15
|
onChange?: (newValue: string) => unknown;
|
|
16
|
-
onComplete?: (
|
|
16
|
+
onComplete?: (value: string) => unknown;
|
|
17
17
|
onBlur?: (event: FocusEvent) => void;
|
|
18
18
|
onFocus?: (event: FocusEvent) => void;
|
|
19
19
|
onPaste?: (event: ClipboardEvent) => void;
|