@saasbase-io/core-elements 1.14.0 → 1.16.0

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.
Files changed (51) hide show
  1. package/dist/components/index.d.ts +1 -1
  2. package/dist/components/renderers/_updated/container/container.d.ts +19 -0
  3. package/dist/components/renderers/_updated/container/container.stories.d.ts +7 -0
  4. package/dist/components/renderers/_updated/container/container.types.d.ts +8 -0
  5. package/dist/components/renderers/_updated/{sb-countdown.d.ts → countdown/countdown.d.ts} +8 -3
  6. package/dist/components/renderers/_updated/countdown/countdown.stories.d.ts +7 -0
  7. package/dist/components/renderers/_updated/countdown/countdown.types.d.ts +6 -0
  8. package/dist/components/renderers/_updated/field/_confirm-field.d.ts +1 -0
  9. package/dist/components/renderers/_updated/field/_email-field.d.ts +1 -0
  10. package/dist/components/renderers/_updated/field/_identifier-field.d.ts +1 -0
  11. package/dist/components/renderers/_updated/field/_name-field.d.ts +57 -0
  12. package/dist/components/renderers/_updated/field/_password-field.d.ts +1 -0
  13. package/dist/components/renderers/_updated/field/_phone-field.d.ts +1 -0
  14. package/dist/components/renderers/_updated/field/_username-field.d.ts +1 -0
  15. package/dist/components/renderers/_updated/field/field.stories/name-field.stories.d.ts +12 -0
  16. package/dist/components/renderers/_updated/field/field.types.d.ts +29 -0
  17. package/dist/components/renderers/_updated/field/index.d.ts +3 -1
  18. package/dist/components/renderers/_updated/form/_form-submit.d.ts +1 -0
  19. package/dist/components/renderers/_updated/form/_form.d.ts +130 -0
  20. package/dist/components/renderers/_updated/form/form.defs.d.ts +2 -0
  21. package/dist/components/renderers/_updated/form/form.stories/form.stories.d.ts +7 -0
  22. package/dist/components/renderers/_updated/form/form.types.d.ts +10 -0
  23. package/dist/components/renderers/_updated/form/index.d.ts +3 -1
  24. package/dist/components/renderers/_updated/gap/gap.d.ts +14 -0
  25. package/dist/components/renderers/_updated/gap/gap.stories.d.ts +7 -0
  26. package/dist/components/renderers/_updated/gap/gap.types.d.ts +6 -0
  27. package/dist/components/renderers/_updated/{sb-header.d.ts → header/header.d.ts} +3 -3
  28. package/dist/components/renderers/_updated/header/header.stories.d.ts +6 -0
  29. package/dist/components/renderers/_updated/index.d.ts +8 -7
  30. package/dist/components/renderers/_updated/{sb-logo.d.ts → logo/logo.d.ts} +7 -2
  31. package/dist/components/renderers/_updated/logo/logo.stories.d.ts +7 -0
  32. package/dist/components/renderers/_updated/logo/logo.types.d.ts +6 -0
  33. package/dist/components/renderers/_updated/{sb-otp.d.ts → otp/otp.d.ts} +10 -6
  34. package/dist/components/renderers/_updated/otp/otp.stories.d.ts +5 -0
  35. package/dist/components/renderers/_updated/otp/otp.types.d.ts +12 -0
  36. package/dist/components/renderers/_updated/subtitle/subtitle.d.ts +13 -0
  37. package/dist/components/renderers/_updated/subtitle/subtitle.stories.d.ts +6 -0
  38. package/dist/components/renderers/_updated/subtitle/subtitle.types.d.ts +4 -0
  39. package/dist/components/renderers/_updated/title/title.d.ts +13 -0
  40. package/dist/components/renderers/_updated/title/title.stories.d.ts +6 -0
  41. package/dist/components/renderers/_updated/title/title.types.d.ts +4 -0
  42. package/dist/index.js +595 -515
  43. package/dist/index.js.map +1 -1
  44. package/dist/index.mjs +4270 -3764
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/utils/styles.d.ts +1 -1
  47. package/package.json +2 -1
  48. package/dist/components/renderers/_updated/sb-container.d.ts +0 -13
  49. package/dist/components/renderers/_updated/sb-gap.d.ts +0 -8
  50. package/dist/components/renderers/_updated/sb-subtitle.d.ts +0 -9
  51. package/dist/components/renderers/_updated/sb-title.d.ts +0 -9
@@ -1,4 +1,4 @@
1
+ export * from './wrappers';
1
2
  export * from './renderers';
2
3
  export * from './ui';
3
4
  export * from './widgets';
4
- export * from './wrappers';
@@ -0,0 +1,19 @@
1
+ import { PropertyValues } from '../../../../../node_modules/lit';
2
+ import { BaseElement } from '../../../wrappers/base-element/base-element';
3
+ import { ContainerAlignment, ContainerType } from './container.types';
4
+ export declare class SbContainer extends BaseElement {
5
+ id: string;
6
+ type: ContainerType;
7
+ root: boolean;
8
+ alignment?: ContainerAlignment;
9
+ protected createRenderRoot(): this;
10
+ protected firstUpdated(_changed: PropertyValues): Promise<void>;
11
+ protected updated(_changed: PropertyValues): Promise<void>;
12
+ private get containerStyles();
13
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
14
+ }
15
+ declare global {
16
+ interface HTMLElementTagNameMap {
17
+ "sb-container": SbContainer;
18
+ }
19
+ }
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Basic: Story;
6
+ export declare const FlexRow: Story;
7
+ export declare const RootCard: Story;
@@ -0,0 +1,8 @@
1
+ export type ContainerType = "flex_column" | "flex_row";
2
+ export type ContainerAlignment = "start" | "center" | "end";
3
+ export type ContainerProps = {
4
+ id?: string;
5
+ type?: ContainerType;
6
+ root?: boolean;
7
+ alignment?: ContainerAlignment;
8
+ };
@@ -1,5 +1,5 @@
1
- import { PropertyValues } from '../../../../node_modules/lit';
2
- import { BaseElement } from '../..';
1
+ import { PropertyValues } from '../../../../../node_modules/lit';
2
+ import { BaseElement } from '../../..';
3
3
  export declare class SbCountdown extends BaseElement {
4
4
  get _containerElement(): HTMLLIElement | null;
5
5
  content: string;
@@ -17,5 +17,10 @@ export declare class SbCountdown extends BaseElement {
17
17
  private completeCountdown;
18
18
  private clearTimer;
19
19
  private renderContent;
20
- render(): import('../../../../node_modules/lit-html').TemplateResult<1>;
20
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
21
+ }
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ "sb-countdown": SbCountdown;
25
+ }
21
26
  }
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Basic: Story;
6
+ export declare const CustomContent: Story;
7
+ export declare const LongDuration: Story;
@@ -0,0 +1,6 @@
1
+ export type CountdownProps = {
2
+ content?: string;
3
+ duration?: number;
4
+ redirectUrl?: string;
5
+ id?: string;
6
+ };
@@ -26,6 +26,7 @@ export declare class SbConfirmField extends LitElement implements ConfirmFieldPr
26
26
  private static readonly _DESCRIPTION;
27
27
  private static readonly _INPUT;
28
28
  private static readonly _ERROR;
29
+ static readonly TAG: string;
29
30
  /**
30
31
  * The stable CSS part names exposed for external targeting.
31
32
  */
@@ -26,6 +26,7 @@ export declare class SbEmailField extends LitElement implements EmailFieldProps
26
26
  private static readonly _DESCRIPTION;
27
27
  private static readonly _INPUT;
28
28
  private static readonly _ERROR;
29
+ static readonly TAG: string;
29
30
  private static readonly _PATTERN;
30
31
  /**
31
32
  * The stable CSS part names exposed for external targeting.
@@ -26,6 +26,7 @@ export declare class SbIdentifierField extends LitElement implements IdentifierF
26
26
  private static readonly _DESCRIPTION;
27
27
  private static readonly _INPUT;
28
28
  private static readonly _ERROR;
29
+ static readonly TAG: string;
29
30
  /**
30
31
  * The stable CSS part names exposed for external targeting.
31
32
  */
@@ -0,0 +1,57 @@
1
+ import { LitElement } from '../../../../../node_modules/lit';
2
+ export type NameFieldValidateType = "success" | "required" | "format";
3
+ export declare class SbNameField extends LitElement {
4
+ private static readonly _ROOT;
5
+ private static readonly _FIRST;
6
+ private static readonly _LAST;
7
+ static get parts(): {
8
+ root: string;
9
+ firstField: string;
10
+ lastField: string;
11
+ input: string;
12
+ label: string;
13
+ error: string;
14
+ mark: string;
15
+ description: string;
16
+ };
17
+ static get validateEventName(): string;
18
+ firstLabel: string;
19
+ lastLabel: string;
20
+ seed: string;
21
+ childId?: string;
22
+ name: string;
23
+ required?: boolean;
24
+ disabled?: boolean;
25
+ firstName: string;
26
+ lastName: string;
27
+ firstPlaceholder: string;
28
+ lastPlaceholder: string;
29
+ requiredError: string;
30
+ formatError: string;
31
+ mark?: string;
32
+ caret?: boolean;
33
+ private _first;
34
+ private _firstInvalid;
35
+ private _firstError;
36
+ private _last;
37
+ private _lastInvalid;
38
+ private _lastError;
39
+ protected createRenderRoot(): this;
40
+ get rootId(): string;
41
+ private _renderMark;
42
+ private _dispatchValidate;
43
+ private _validateName;
44
+ private _validate;
45
+ validate(): boolean;
46
+ private _handleInput;
47
+ connectedCallback(): void;
48
+ disconnectedCallback(): void;
49
+ private _renderFirstField;
50
+ private _renderLastField;
51
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
52
+ }
53
+ declare global {
54
+ interface HTMLElementTagNameMap {
55
+ "sb-name-field": SbNameField;
56
+ }
57
+ }
@@ -26,6 +26,7 @@ export declare class SbPasswordField extends LitElement implements PasswordField
26
26
  private static readonly _DESCRIPTION;
27
27
  private static readonly _INPUT;
28
28
  private static readonly _ERROR;
29
+ static readonly TAG: string;
29
30
  private static readonly _PATTERNS;
30
31
  /**
31
32
  * The stable CSS part names exposed for external targeting.
@@ -26,6 +26,7 @@ export declare class SbPhoneField extends LitElement implements PhoneFieldProps
26
26
  private static readonly _DESCRIPTION;
27
27
  private static readonly _INPUT;
28
28
  private static readonly _ERROR;
29
+ static readonly TAG: string;
29
30
  private static readonly _PATTERN;
30
31
  /**
31
32
  * The stable CSS part names exposed for external targeting.
@@ -26,6 +26,7 @@ export declare class SbUsernameField extends LitElement implements UsernameField
26
26
  private static readonly _DESCRIPTION;
27
27
  private static readonly _INPUT;
28
28
  private static readonly _ERROR;
29
+ static readonly TAG: string;
29
30
  private static readonly _PATTERN;
30
31
  /**
31
32
  * The stable CSS part names exposed for external targeting.
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ import { SbNameField } from '../_name-field';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ type Story = StoryObj<SbNameField>;
6
+ export declare const Basic: Story;
7
+ export declare const Required: Story;
8
+ export declare const FormatValidation: Story;
9
+ export declare const MarkAndCaret: Story;
10
+ export declare const Disabled: Story;
11
+ export declare const Form: Story;
12
+ export declare const Validate: Story;
@@ -77,4 +77,33 @@ export type IdentifierFieldProps = Omit<BaseFieldProps, "label" | "content" | "f
77
77
  content: IdentifierFieldContent;
78
78
  autocomplete?: IdentifierFieldAutocomplete;
79
79
  };
80
+ export type NameFieldValidateType = BaseFieldValidateType;
81
+ export type NameFieldContent = BaseFieldContent;
82
+ export type NameFieldProps = {
83
+ seed: string;
84
+ childId?: string;
85
+ fieldId?: string;
86
+ /**
87
+ * Base form field name (e.g. "name", "full_name")
88
+ */
89
+ name: string;
90
+ content: NameFieldContent;
91
+ /**
92
+ * Label for first name input (e.g. "First name")
93
+ */
94
+ firstLabel: string;
95
+ /**
96
+ * Label for last name input (e.g. "Last name")
97
+ */
98
+ lastLabel: string;
99
+ firstPlaceholder?: string;
100
+ lastPlaceholder?: string;
101
+ description?: string;
102
+ mark?: string;
103
+ caret?: boolean;
104
+ disabled?: boolean;
105
+ required?: boolean;
106
+ requiredError: string;
107
+ formatError: string;
108
+ };
80
109
  export {};
@@ -1,10 +1,11 @@
1
1
  import { SbConfirmField } from './_confirm-field';
2
2
  import { SbEmailField } from './_email-field';
3
3
  import { SbIdentifierField } from './_identifier-field';
4
+ import { SbNameField } from './_name-field';
4
5
  import { SbPasswordField } from './_password-field';
5
6
  import { SbPhoneField } from './_phone-field';
6
7
  import { SbUsernameField } from './_username-field';
7
- export { SbConfirmField, SbEmailField, SbIdentifierField, SbPasswordField, SbPhoneField, SbUsernameField, };
8
+ export { SbConfirmField, SbEmailField, SbIdentifierField, SbPasswordField, SbPhoneField, SbUsernameField, SbNameField, };
8
9
  declare global {
9
10
  interface HTMLElementTagNameMap {
10
11
  "sb-email-field": SbEmailField;
@@ -13,5 +14,6 @@ declare global {
13
14
  "sb-password-field": SbPasswordField;
14
15
  "sb-confirm-field": SbConfirmField;
15
16
  "sb-identifier-field": SbIdentifierField;
17
+ "sb-name-field": SbNameField;
16
18
  }
17
19
  }
@@ -12,6 +12,7 @@ import { FormSubmitProps, FormSubmitSize, FormSubmitSpinnerAlign, FormSubmitVari
12
12
  export declare class SbFormSubmit extends LitElement implements FormSubmitProps {
13
13
  private static readonly _ROOT;
14
14
  private static readonly _SPINNER;
15
+ static readonly TAG: string;
15
16
  /**
16
17
  * The stable CSS part names exposed for external targeting.
17
18
  */
@@ -0,0 +1,130 @@
1
+ import { LitElement } from '../../../../../node_modules/lit';
2
+ import { FormOnReset, FormOnSubmit, FormProps } from './form.types';
3
+ /**
4
+ * A composable form container that orchestrates validation, collects form data,
5
+ * and handles auth service communications.
6
+ * @element sb-form
7
+ *
8
+ * @part form (form)
9
+ *
10
+ * @fires sb-form:success { id, data, event }
11
+ * @fires sb-form:error { id, data, event, message }
12
+ * @fires sb-form:reset { id }
13
+ */
14
+ export declare class SbForm extends LitElement implements FormProps {
15
+ private static readonly _ROOT;
16
+ static readonly TAG: string;
17
+ static readonly SUCCESS_EVENT: string;
18
+ static readonly ERROR_EVENT: string;
19
+ static readonly RESET_EVENT: string;
20
+ /**
21
+ * The stable CSS part names exposed for external targeting.
22
+ */
23
+ static get parts(): {
24
+ root: string;
25
+ };
26
+ /**
27
+ * A unique substring for fallback part IDs generated.
28
+ */
29
+ seed: string;
30
+ /**
31
+ * The `id` of the root part and the base of sub-part IDs.
32
+ */
33
+ childId?: string;
34
+ /**
35
+ * When provided, called with the collected form data and the auth event
36
+ * string instead of the default `Auth.processLoginflowEvent` call.
37
+ * Use this to plug in custom submission logic or to handle auth externally.
38
+ */
39
+ onSubmit?: FormOnSubmit;
40
+ /**
41
+ * Called after the native form reset event fires.
42
+ */
43
+ onReset?: FormOnReset;
44
+ /**
45
+ * Auth event string captured from the most recent `sb-form-submit:click`
46
+ * event. Cleared after each submission attempt.
47
+ */
48
+ private _pendingEvent?;
49
+ /**
50
+ * Guards against double-submission while an async auth call is in-flight.
51
+ */
52
+ private _loading;
53
+ /**
54
+ * Overrides default behavior to render into light DOM.
55
+ */
56
+ protected createRenderRoot(): this;
57
+ /**
58
+ * The `id` of the root element. Equal to `childId` when provided, otherwise
59
+ * derived from the component's part name and `seed`.
60
+ */
61
+ get rootId(): string;
62
+ /**
63
+ * The native `<form>` element rendered as the root part.
64
+ */
65
+ private get _form();
66
+ /**
67
+ * All `sb-*-field` descendants inside the form element.
68
+ */
69
+ private get _fields();
70
+ /**
71
+ * The first `sb-form-submit` descendant inside the form element.
72
+ */
73
+ private get _submit();
74
+ /**
75
+ * Subscribes to the `sb-form-submit:click` event so the auth event string
76
+ * is captured before the native form `submit` event fires.
77
+ */
78
+ connectedCallback(): void;
79
+ /**
80
+ * Removes the `sb-form-submit:click` listener.
81
+ */
82
+ disconnectedCallback(): void;
83
+ /**
84
+ * Moves initial children (authored inside `<sb-form>` in markup) into the
85
+ * rendered `<form>` element. The DOM move disconnects and reconnects each
86
+ * custom-element child, letting field elements re-run `connectedCallback`
87
+ * and find the native form ancestor via `this.closest("form")`.
88
+ */
89
+ protected firstUpdated(): void;
90
+ /**
91
+ * Captures the auth event string emitted by `sb-form-submit` before the
92
+ * native form submit fires.
93
+ */
94
+ private _handleSubmitClick;
95
+ /**
96
+ * Dispatches a bubbling, composed custom event from `sb-form`.
97
+ */
98
+ private _dispatch;
99
+ /**
100
+ * Applies or removes the loading state on every field element and the
101
+ * submit button. `wasDisabled` records the pre-loading state so that
102
+ * fields that were already disabled are not re-enabled when loading ends.
103
+ */
104
+ private _setLoading;
105
+ /**
106
+ * Handles the native form submit event:
107
+ *
108
+ * 1. Always prevents the default browser navigation.
109
+ * 2. Adds temporary listeners for every `sb-*-field:validate` event on
110
+ * `this`. These events bubble from field elements and carry `{ name,
111
+ * value, valid }` in their detail — the exact values each field uses
112
+ * for its own validation. The temporary listener builds the form-data
113
+ * object as a side effect of the validation calls in step 3.
114
+ * 3. Calls `field.validate()` on every `sb-*-field` via `Array.map` (not
115
+ * `Array.every`) so ALL fields are validated and ALL inline errors are
116
+ * shown even when multiple fields are invalid simultaneously.
117
+ * 4. Removes the temporary validate listeners.
118
+ * 5. Aborts if any field returned `false`.
119
+ * 6. Calls `onSubmit` if provided, bypassing the default auth flow.
120
+ * 7. Otherwise calls `Auth.processLoginflowEvent` with the captured auth
121
+ * event string and the collected data, managing loading state throughout.
122
+ */
123
+ private _handleSubmit;
124
+ /**
125
+ * Handles the native form reset event. Field elements handle their own
126
+ * internal state reset via their own form-reset listeners.
127
+ */
128
+ private _handleReset;
129
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
130
+ }
@@ -0,0 +1,2 @@
1
+ export declare const FIELD_SELECTORS: string;
2
+ export declare const FIELD_VALIDATE_EVENTS: string[];
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Demo: Story;
6
+ export declare const OnSubmit: Story;
7
+ export declare const Events: Story;
@@ -1,4 +1,14 @@
1
1
  import { IconAlign, RtgButtonBasicSize, RtgButtonBasicVariant } from '../../../../types';
2
+ import { SbConfirmField, SbEmailField, SbIdentifierField, SbPasswordField, SbPhoneField, SbUsernameField } from '../field';
3
+ export type FormOnSubmit = (data: Record<string, string>, event?: string) => void;
4
+ export type FormOnReset = (event: Event) => void;
5
+ export type FormProps = {
6
+ seed: string;
7
+ childId?: string;
8
+ onSubmit?: FormOnSubmit;
9
+ onReset?: FormOnReset;
10
+ };
11
+ export type Field = SbEmailField | SbPhoneField | SbUsernameField | SbIdentifierField | SbPasswordField | SbConfirmField;
2
12
  export type FormSubmitVariant = RtgButtonBasicVariant;
3
13
  export type FormSubmitSize = RtgButtonBasicSize;
4
14
  export type FormSubmitSpinnerAlign = IconAlign;
@@ -1,9 +1,11 @@
1
+ import { SbForm } from './_form';
1
2
  import { SbFormSeparator } from './_form-separator';
2
3
  import { SbFormSubmit } from './_form-submit';
3
4
  import { SbFormSwitch } from './_form-switch';
4
- export { SbFormSeparator, SbFormSubmit, SbFormSwitch };
5
+ export { SbForm, SbFormSeparator, SbFormSubmit, SbFormSwitch };
5
6
  declare global {
6
7
  interface HTMLElementTagNameMap {
8
+ "sb-form": SbForm;
7
9
  "sb-form-submit": SbFormSubmit;
8
10
  "sb-form-separator": SbFormSeparator;
9
11
  "sb-form-switch": SbFormSwitch;
@@ -0,0 +1,14 @@
1
+ import { BaseElement } from '../../..';
2
+ import { GapType } from './gap.types';
3
+ export declare class SbGap extends BaseElement {
4
+ size: string;
5
+ type: GapType;
6
+ id: string;
7
+ protected createRenderRoot(): this;
8
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
9
+ }
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ "sb-gap": SbGap;
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Basic: Story;
6
+ export declare const Vertical: Story;
7
+ export declare const Horizontal: Story;
@@ -0,0 +1,6 @@
1
+ export type GapType = "vertical" | "horizontal";
2
+ export type GapProps = {
3
+ size?: string;
4
+ id?: string;
5
+ type?: GapType;
6
+ };
@@ -1,9 +1,9 @@
1
- import { BaseElement } from '../..';
2
- import { PropertyValues } from '../../../../node_modules/lit';
1
+ import { BaseElement } from '../../..';
2
+ import { PropertyValues } from '../../../../../node_modules/lit';
3
3
  export declare class SbHeader extends BaseElement {
4
4
  get _containerElement(): HTMLLIElement | null;
5
5
  align: string;
6
6
  gap: string;
7
7
  protected firstUpdated(_changedProperties: PropertyValues): void;
8
- render(): import('../../../../node_modules/lit-html').TemplateResult<1>;
8
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
9
9
  }
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Basic: Story;
6
+ export declare const AuthHeader: Story;
@@ -3,11 +3,12 @@ export * from './field';
3
3
  export * from './form';
4
4
  export * from './passkey-button';
5
5
  export * from './provider';
6
- export * from './sb-container';
7
- export * from './sb-gap';
8
- export * from './sb-header';
9
- export * from './sb-logo';
10
- export * from './sb-otp';
11
- export * from './sb-subtitle';
12
- export * from './sb-title';
6
+ export * from './gap/gap';
7
+ export * from './header/header';
8
+ export * from './logo/logo';
9
+ export * from './otp/otp';
10
+ export * from './subtitle/subtitle';
11
+ export * from './container/container';
12
+ export * from './title/title';
13
13
  export * from './watermark';
14
+ export * from './countdown/countdown';
@@ -1,4 +1,4 @@
1
- import { BaseElement } from '../..';
1
+ import { BaseElement } from '../../..';
2
2
  export declare class SbLogo extends BaseElement {
3
3
  get _containerElement(): HTMLLIElement | null;
4
4
  id: string;
@@ -9,5 +9,10 @@ export declare class SbLogo extends BaseElement {
9
9
  disconnectedCallback(): void;
10
10
  private getTheme;
11
11
  protected createRenderRoot(): this;
12
- render(): import('../../../../node_modules/lit-html').TemplateResult<1>;
12
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
13
+ }
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ "sb-logo": SbLogo;
17
+ }
13
18
  }
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Basic: Story;
6
+ export declare const ImageLogo: Story;
7
+ export declare const SvgLogo: Story;
@@ -0,0 +1,6 @@
1
+ export type LogoTheme = "dark" | "light" | string;
2
+ export type LogoProps = {
3
+ imageUrl?: string;
4
+ id?: string;
5
+ theme?: LogoTheme;
6
+ };
@@ -1,7 +1,8 @@
1
- import { BaseElement, SaasBaseLayout } from '../..';
1
+ import { BaseElement } from '../../..';
2
+ import { OtpVariant } from './otp.types';
2
3
  export declare class SbOtp extends BaseElement {
3
4
  get _containerElement(): HTMLLIElement | null;
4
- variant: string;
5
+ variant: OtpVariant;
5
6
  length: number;
6
7
  timeout: number;
7
8
  dataKey: string;
@@ -10,14 +11,17 @@ export declare class SbOtp extends BaseElement {
10
11
  resendButtonText: string;
11
12
  resendEvent: string;
12
13
  id: string;
13
- component: SaasBaseLayout;
14
14
  protected createRenderRoot(): this;
15
- private patchComponentRequestUpdate;
16
- connectedCallback(): void;
15
+ private emit;
17
16
  private buildOTPContentHTML;
18
17
  private handleComplete;
19
18
  private handleFocus;
20
19
  private handleBlur;
21
20
  private handleResend;
22
- render(): import('../../../../node_modules/lit-html').TemplateResult | null;
21
+ render(): import('../../../../../node_modules/lit-html').TemplateResult;
22
+ }
23
+ declare global {
24
+ interface HTMLElementTagNameMap {
25
+ "sb-otp": SbOtp;
26
+ }
23
27
  }
@@ -0,0 +1,5 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Basic: Story;
@@ -0,0 +1,12 @@
1
+ export type OtpVariant = "simple" | "with_separator" | "with_spacing" | "digits_only";
2
+ export type OtpProps = {
3
+ variant?: OtpVariant;
4
+ length?: number;
5
+ timeout?: number;
6
+ dataKey?: string;
7
+ event?: string;
8
+ resendText?: string;
9
+ resendButtonText?: string;
10
+ resendEvent?: string;
11
+ id?: string;
12
+ };
@@ -0,0 +1,13 @@
1
+ import { BaseElement } from '../../..';
2
+ export declare class SbSubtitle extends BaseElement {
3
+ get _containerElement(): HTMLLIElement | null;
4
+ id: string;
5
+ content: string;
6
+ protected createRenderRoot(): this;
7
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ "sb-subtitle": SbSubtitle;
12
+ }
13
+ }
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Basic: Story;
6
+ export declare const LongContent: Story;
@@ -0,0 +1,4 @@
1
+ export type SubtitleProps = {
2
+ content?: string;
3
+ id?: string;
4
+ };
@@ -0,0 +1,13 @@
1
+ import { BaseElement } from '../../..';
2
+ export declare class SbTitle extends BaseElement {
3
+ get _containerElement(): HTMLLIElement | null;
4
+ id: string;
5
+ content: string;
6
+ protected createRenderRoot(): this;
7
+ render(): import('../../../../../node_modules/lit-html').TemplateResult<1>;
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ "sb-title": SbTitle;
12
+ }
13
+ }