@singlebase/elements 0.1.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.
- package/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/authui.cjs +2 -0
- package/dist/authui.cjs.map +1 -0
- package/dist/authui.d.ts +22 -0
- package/dist/authui.js +24 -0
- package/dist/authui.js.map +1 -0
- package/dist/controllers/auth-controller.d.ts +17 -0
- package/dist/controllers/event-bridge.d.ts +27 -0
- package/dist/controllers/settings-controller.d.ts +18 -0
- package/dist/display-8HEcKYR4.js +3444 -0
- package/dist/display-8HEcKYR4.js.map +1 -0
- package/dist/display-CLDNNZQy.cjs +976 -0
- package/dist/display-CLDNNZQy.cjs.map +1 -0
- package/dist/elements/account-screen.d.ts +99 -0
- package/dist/elements/auth-screen.d.ts +215 -0
- package/dist/elements/base.d.ts +69 -0
- package/dist/elements/buttons.d.ts +45 -0
- package/dist/elements/display.d.ts +51 -0
- package/dist/elements/form-base.d.ts +23 -0
- package/dist/elements/guard.d.ts +65 -0
- package/dist/elements/uploader.d.ts +225 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +147 -0
- package/dist/singlebase-elements.min.js +7616 -0
- package/dist/singlebase-elements.min.js.map +1 -0
- package/dist/standalone.d.ts +2 -0
- package/dist/styles/shared.d.ts +8 -0
- package/dist/styles/tokens.d.ts +44 -0
- package/dist/upload-messages.d.ts +45 -0
- package/dist/uploader-D-Da1trc.js +2290 -0
- package/dist/uploader-D-Da1trc.js.map +1 -0
- package/dist/uploader-eFYKpk8b.cjs +1390 -0
- package/dist/uploader-eFYKpk8b.cjs.map +1 -0
- package/dist/uploader.cjs +2 -0
- package/dist/uploader.cjs.map +1 -0
- package/dist/uploader.d.ts +10 -0
- package/dist/uploader.js +9 -0
- package/dist/uploader.js.map +1 -0
- package/dist/utils/files.d.ts +38 -0
- package/dist/utils/inspect.d.ts +23 -0
- package/dist/utils/profile.d.ts +9 -0
- package/dist/utils/redirect.d.ts +15 -0
- package/package.json +76 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared internal styles, ported value-for-value from the design mock's
|
|
3
|
+
* styles(t) / acc(t, open, bare) functions in project/AuthWidget.dc.html.
|
|
4
|
+
* The mock computed these as inline style objects per render; here they are
|
|
5
|
+
* static Shadow DOM CSS driven by the --sb-* tokens, with part hooks so
|
|
6
|
+
* hosts can reach internals via ::part().
|
|
7
|
+
*/
|
|
8
|
+
export declare const sharedStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default values for every --sb-* design token, ported from the design
|
|
3
|
+
* mock's tokens()/styles() functions. These are consumed as var(--sb-x,
|
|
4
|
+
* DEFAULT) fallbacks at each point of use (see shared.ts) — never assigned
|
|
5
|
+
* unconditionally on :host — so that a value set by a host application, or
|
|
6
|
+
* by a theme/density attribute forwarded down from a composing parent
|
|
7
|
+
* element, actually inherits through
|
|
8
|
+
* nested shadow roots instead of being reset back to these defaults by every
|
|
9
|
+
* descendant's own :host rule.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TOKEN_DEFAULTS: {
|
|
12
|
+
readonly font: "\"Geist\", -apple-system, \"Segoe UI\", Helvetica, sans-serif";
|
|
13
|
+
readonly mono: "\"Geist Mono\", ui-monospace, monospace";
|
|
14
|
+
readonly accent: "#111111";
|
|
15
|
+
readonly onAccent: "#ffffff";
|
|
16
|
+
readonly radius: "4px";
|
|
17
|
+
readonly surface: "#ffffff";
|
|
18
|
+
readonly surfaceAlt: "#fafafa";
|
|
19
|
+
readonly ink: "#16181a";
|
|
20
|
+
readonly mutedInk: "#61666c";
|
|
21
|
+
readonly border: "#e4e6e9";
|
|
22
|
+
readonly borderStrong: "#cdd1d6";
|
|
23
|
+
readonly danger: "#b4231a";
|
|
24
|
+
readonly dangerBg: "#fdf1f0";
|
|
25
|
+
readonly dangerBorder: "#f3d6d3";
|
|
26
|
+
readonly dangerOutline: "#e8c4c0";
|
|
27
|
+
readonly dangerPanelBorder: "#efd9d6";
|
|
28
|
+
readonly dangerPanelBg: "#fdf7f6";
|
|
29
|
+
readonly ok: "#0f6b4a";
|
|
30
|
+
readonly okBg: "#f0f7f3";
|
|
31
|
+
readonly okBorder: "#cfe5da";
|
|
32
|
+
readonly gap: "16px";
|
|
33
|
+
readonly pad: "20px";
|
|
34
|
+
readonly fieldPad: "11px 13px";
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Base host layout plus the theme="dark"/density="compact" attribute
|
|
38
|
+
* overrides. These overrides are legitimate unconditional assignments —
|
|
39
|
+
* they only fire when *this* element carries the attribute — but every
|
|
40
|
+
* composite element (auth-screen, reset-password-form, etc.) must forward
|
|
41
|
+
* theme/density/field-style to the singlebase-* children it renders for the
|
|
42
|
+
* override to reach elements that don't carry the attribute directly.
|
|
43
|
+
*/
|
|
44
|
+
export declare const tokenDefaults: import("lit").CSSResult;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default copy for <singlebase-uploader>. Same shape and contract as the
|
|
3
|
+
* auth bag in messages.ts: a flat set of strings, overridable in whole or in
|
|
4
|
+
* part through the element's `.messages` property.
|
|
5
|
+
*
|
|
6
|
+
* `{n}`, `{max}`, `{name}` and `{size}` are filled in by `fill()`.
|
|
7
|
+
*/
|
|
8
|
+
export interface SinglebaseUploadMessages {
|
|
9
|
+
heading: string;
|
|
10
|
+
description: string;
|
|
11
|
+
dropTitle: string;
|
|
12
|
+
dropSub: string;
|
|
13
|
+
hintUpTo: string;
|
|
14
|
+
chooseFiles: string;
|
|
15
|
+
chooseFile: string;
|
|
16
|
+
addMore: string;
|
|
17
|
+
remove: string;
|
|
18
|
+
rename: string;
|
|
19
|
+
retry: string;
|
|
20
|
+
uploadCtaOne: string;
|
|
21
|
+
uploadCtaMany: string;
|
|
22
|
+
attachments: string;
|
|
23
|
+
dropOrChoose: string;
|
|
24
|
+
checking: string;
|
|
25
|
+
pagesLabel: string;
|
|
26
|
+
countOne: string;
|
|
27
|
+
countMany: string;
|
|
28
|
+
uploading: string;
|
|
29
|
+
uploaded: string;
|
|
30
|
+
failedLabel: string;
|
|
31
|
+
errTooMany: string;
|
|
32
|
+
errTooLarge: string;
|
|
33
|
+
errTooSmall: string;
|
|
34
|
+
errDuplicate: string;
|
|
35
|
+
errType: string;
|
|
36
|
+
errNoClient: string;
|
|
37
|
+
errUpload: string;
|
|
38
|
+
errProtected: string;
|
|
39
|
+
errTooManyPages: string;
|
|
40
|
+
brandingLabel: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const defaultUploadMessages: SinglebaseUploadMessages;
|
|
43
|
+
export declare function resolveUploadMessages(overrides?: Partial<SinglebaseUploadMessages>): SinglebaseUploadMessages;
|
|
44
|
+
/** Fills `{token}` placeholders. Values are plain text and rendered as text. */
|
|
45
|
+
export declare function fill(template: string, values: Record<string, string | number>): string;
|