@cal.macconnachie/web-components 0.0.8 → 0.0.10
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/README.md +16 -16
- package/dist/components/{cals-auth.js → auth.js} +20 -20
- package/dist/components/index.d.ts +31 -2
- package/dist/components/theme-toggle.js +756 -0
- package/dist/index.d.ts +31 -2
- package/dist/index.js +2947 -921
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
1
2
|
import { CSSResult } from 'lit';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
import { nothing } from 'lit';
|
|
4
5
|
import { PropertyValues } from 'lit';
|
|
5
6
|
import { TemplateResult } from 'lit-html';
|
|
6
7
|
|
|
7
|
-
declare
|
|
8
|
+
export declare const apiClient: ({ baseUrl, apiBaseUrl }: ApiClientConfig) => AxiosInstance;
|
|
9
|
+
|
|
10
|
+
declare interface ApiClientConfig {
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
apiBaseUrl?: string;
|
|
13
|
+
}
|
|
8
14
|
|
|
9
|
-
export declare class
|
|
15
|
+
export declare class Auth extends LitElement {
|
|
10
16
|
open: boolean;
|
|
11
17
|
initialMode: AuthMode;
|
|
12
18
|
logoUrl: string;
|
|
@@ -110,4 +116,27 @@ export declare class CalsAuth extends LitElement {
|
|
|
110
116
|
static styles: CSSResult;
|
|
111
117
|
}
|
|
112
118
|
|
|
119
|
+
declare type AuthMode = 'signin' | 'signup';
|
|
120
|
+
|
|
121
|
+
export declare class AuthRefreshError extends Error {
|
|
122
|
+
constructor(message?: string);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export declare const createApiClient: ({ baseUrl, apiBaseUrl }: ApiClientConfig) => AxiosInstance;
|
|
126
|
+
|
|
127
|
+
export declare class ThemeToggle extends LitElement {
|
|
128
|
+
theme: 'light' | 'dark';
|
|
129
|
+
storageKey: string;
|
|
130
|
+
size: 'sm' | 'md' | 'lg';
|
|
131
|
+
variant: 'ghost' | 'outline' | 'solid';
|
|
132
|
+
private isDark;
|
|
133
|
+
connectedCallback(): void;
|
|
134
|
+
private applyTheme;
|
|
135
|
+
private toggleTheme;
|
|
136
|
+
private getSizeClass;
|
|
137
|
+
private getVariantClass;
|
|
138
|
+
render(): TemplateResult<1>;
|
|
139
|
+
static styles: CSSResult;
|
|
140
|
+
}
|
|
141
|
+
|
|
113
142
|
export { }
|