@chocbite/ts-lib-ui 1.1.5 → 1.2.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/AGENTS.md +547 -9
- package/README.md +3 -0
- package/SOURCE.md +10313 -7355
- package/base/index.d.mts +2 -2
- package/base/index.mjs +68 -5
- package/base/index.mjs.map +1 -1
- package/canvas/index.d.mts +1 -1
- package/canvas/index.mjs +1 -1
- package/composition/index.d.mts +283 -0
- package/composition/index.mjs +2 -0
- package/composition-BlntkKR0.mjs +869 -0
- package/composition-BlntkKR0.mjs.map +1 -0
- package/context-menu/index.d.mts +1 -1
- package/context-menu/index.mjs +1 -1
- package/{context-menu-CZxEGjBi.mjs → context-menu-C0KTV5zC.mjs} +2 -2
- package/{context-menu-CZxEGjBi.mjs.map → context-menu-C0KTV5zC.mjs.map} +1 -1
- package/depot_ui/index.d.mts +60 -0
- package/depot_ui/index.mjs +280 -0
- package/depot_ui/index.mjs.map +1 -0
- package/form/index.d.mts +2 -758
- package/form/index.mjs +1 -2953
- package/form-CJA3s46n.mjs +2961 -0
- package/form-CJA3s46n.mjs.map +1 -0
- package/icons/index.d.mts +1 -1
- package/{index-YNZjMIO7.d.mts → index-CApVOEcI.d.mts} +2 -2
- package/{index-BDWg5GX2.d.mts → index-Czy8O3me.d.mts} +6 -2
- package/index-DD09-bGe.d.mts +761 -0
- package/{index-DlBJdGaQ.d.mts → index-U3pqQjLg.d.mts} +4 -4
- package/{index-CvzH3M_5.d.mts → index-_y7vmunA.d.mts} +72 -8
- package/keyboard/index.d.mts +1 -1
- package/keyboard/index.mjs +1 -1
- package/list/index.d.mts +1 -1
- package/list/index.mjs +1 -1
- package/{list-C52-ExFw.mjs → list-CVrn4y2k.mjs} +3 -3
- package/{list-C52-ExFw.mjs.map → list-CVrn4y2k.mjs.map} +1 -1
- package/package.json +2 -2
- package/prompts/index.d.mts +48 -0
- package/prompts/index.mjs +107 -0
- package/prompts/index.mjs.map +1 -0
- package/spinner/index.d.mts +1 -1
- package/spinner/index.mjs +1 -1
- package/style.css +2049 -1640
- package/svg/index.d.mts +1 -1
- package/svg-Yz7elqnU.mjs.map +1 -1
- package/theme/index.d.mts +1 -1
- package/theme/index.mjs +1 -1
- package/{theme-D3YluyYr.mjs → theme-D0pRMLyT.mjs} +2 -2
- package/{theme-D3YluyYr.mjs.map → theme-D0pRMLyT.mjs.map} +1 -1
- package/form/index.mjs.map +0 -1
- package/test/index.d.mts +0 -98
- package/test/index.mjs +0 -193
- package/test/index.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chocbite/ts-lib-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Browser UI TypeScript libraries, builds on @chocbite/ts-lib",
|
|
5
5
|
"author": "chocolateandmilkwin",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"./theme/mixins": "./theme/mixins.scss"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@chocbite/ts-lib": "^1.
|
|
22
|
+
"@chocbite/ts-lib": "^1.2.0"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import '../style.css';
|
|
2
|
+
import { t as SVGFunc } from "../index-Czy8O3me.mjs";
|
|
3
|
+
import { F as FormGroup, K as FormValue, W as FormElement } from "../index-DD09-bGe.mjs";
|
|
4
|
+
import { Option } from "@chocbite/ts-lib/result";
|
|
5
|
+
import { Prettify } from "@chocbite/ts-lib/common";
|
|
6
|
+
interface PromptButton<T> {
|
|
7
|
+
/**Text of the button*/
|
|
8
|
+
text: string;
|
|
9
|
+
/**Value the prompt resolves with when the button is clicked*/
|
|
10
|
+
value: T;
|
|
11
|
+
/**Called after the prompt closes from the button*/
|
|
12
|
+
click?: () => void;
|
|
13
|
+
icon?: SVGFunc;
|
|
14
|
+
}
|
|
15
|
+
/**Opens a prompt with a row of buttons
|
|
16
|
+
* Resolves with the value of the clicked button, or none when the user closes the prompt*/
|
|
17
|
+
declare function prompt_buttons<T>(text: string, buttons: PromptButton<T>[]): Promise<Option<T>>;
|
|
18
|
+
interface PromptFormOptions {
|
|
19
|
+
/**Columns for form, true is everything in one columns, just a number will make repeating columns of minimum that rem width, an array will make exactly that many colums with specified rem widths */
|
|
20
|
+
form_column?: true | string | string[];
|
|
21
|
+
/**Rows for form, true is everything in one row, just a number will make repeating rows of minimum that rem height, an array will make exactly that many rows with specified rem heights */
|
|
22
|
+
form_row?: true | string | string[];
|
|
23
|
+
/**Columns for submit buttons, true is everything in one columns, just a number will make repeating columns of minimum that rem width, an array will make exactly that many colums with specified rem widths */
|
|
24
|
+
submit_column?: true | string | string[];
|
|
25
|
+
/**Rows for submit buttons, true is everything in one row, just a number will make repeating rows of minimum that rem height, an array will make exactly that many rows with specified rem heights */
|
|
26
|
+
submit_row?: true | string | string[];
|
|
27
|
+
}
|
|
28
|
+
type GroupExtractVals<Arr extends any[]> = Arr extends [infer Head, ...infer Tail] ? Head extends FormValue<infer T, infer ID> ? [FormValue<T, ID>, ...GroupExtractVals<Tail>] : [...GroupExtractVals<Tail>] : [];
|
|
29
|
+
type GroupToKeyVal<Arr extends FormValue<any, any>[]> = { [K in Arr[number] as K extends FormValue<any, infer ID> ? [ID] extends [string] ? ID : never : never]: K extends FormValue<infer T, any> ? T : never; };
|
|
30
|
+
interface Submit<T extends object, L extends FormElement[]> {
|
|
31
|
+
text: string;
|
|
32
|
+
/**Callback function for submit button
|
|
33
|
+
* @param group The form group containing the form elements
|
|
34
|
+
* @param close Function to close the prompt with provided result
|
|
35
|
+
* @returns Return true if the form should not close automatically */
|
|
36
|
+
click?: (group: FormGroup<T, undefined, L>, close: (result: Option<Partial<T>>) => void) => boolean | void;
|
|
37
|
+
}
|
|
38
|
+
/**Opens a prompt with form elements and one or more submit buttons
|
|
39
|
+
* Executes the last submit button's click handler when the Enter key is pressed.
|
|
40
|
+
* */
|
|
41
|
+
declare function prompt_form<L extends FormElement[], T extends object = Prettify<GroupToKeyVal<GroupExtractVals<L>>>>(text: string, elements: [...L], submit: Submit<T, L> | Submit<T, L>[], options?: PromptFormOptions): Promise<Option<Partial<T>>>;
|
|
42
|
+
/**Modal prompts in the middle of the page, each resolves with the answer of the user, or none when closed*/
|
|
43
|
+
export declare const prompts: {
|
|
44
|
+
buttons: typeof prompt_buttons;
|
|
45
|
+
form: typeof prompt_form;
|
|
46
|
+
};
|
|
47
|
+
export type { PromptButton };
|
|
48
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import "../style.css";
|
|
2
|
+
import { s as FormValueWrite, t as form } from "../form-CJA3s46n.mjs";
|
|
3
|
+
import { define_element } from "../base/index.mjs";
|
|
4
|
+
import { n as ContentBase, t as comp } from "../composition-BlntkKR0.mjs";
|
|
5
|
+
import { none, some } from "@chocbite/ts-lib/result";
|
|
6
|
+
import { sleep } from "@chocbite/ts-lib/common";
|
|
7
|
+
// prompts/shared.ts
|
|
8
|
+
/**Content of a prompt, the prompt functions fill it*/
|
|
9
|
+
var Prompt = class extends ContentBase {
|
|
10
|
+
static element_name() {
|
|
11
|
+
return "prompt";
|
|
12
|
+
}
|
|
13
|
+
static element_name_space() {
|
|
14
|
+
return "prompts";
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
define_element(Prompt);
|
|
18
|
+
/**Opens a modal prompt in the middle of the main document
|
|
19
|
+
* Resolves with the result given to close, or none when the user closes the prompt
|
|
20
|
+
* @param width width in rem, not given the prompt fits its content*/
|
|
21
|
+
function open_prompt(title, build, width) {
|
|
22
|
+
return new Promise((resolve) => {
|
|
23
|
+
const prompt = Prompt.create({
|
|
24
|
+
title,
|
|
25
|
+
closable: true
|
|
26
|
+
});
|
|
27
|
+
let done = false;
|
|
28
|
+
const close = (result) => {
|
|
29
|
+
if (done) return;
|
|
30
|
+
done = true;
|
|
31
|
+
resolve(result);
|
|
32
|
+
prompt.content_close();
|
|
33
|
+
};
|
|
34
|
+
const { element, key, focus } = build(close);
|
|
35
|
+
prompt.appendChild(element);
|
|
36
|
+
prompt.addEventListener("keydown", (e) => {
|
|
37
|
+
if (e.key === "Escape") close(none());
|
|
38
|
+
else key?.(e);
|
|
39
|
+
});
|
|
40
|
+
comp.panel(prompt, {
|
|
41
|
+
sizeable: false,
|
|
42
|
+
modal: true,
|
|
43
|
+
width
|
|
44
|
+
}).on_close().then(() => close(none()));
|
|
45
|
+
(focus ?? prompt).focus();
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
// prompts/buttons.ts
|
|
49
|
+
/**Opens a prompt with a row of buttons
|
|
50
|
+
* Resolves with the value of the clicked button, or none when the user closes the prompt*/
|
|
51
|
+
function prompt_buttons(text, buttons) {
|
|
52
|
+
return open_prompt(text, (close) => ({ element: form.group({ elements: [form.spacer({ space: .5 }), form.group({
|
|
53
|
+
embed: true,
|
|
54
|
+
column: "10rem",
|
|
55
|
+
elements: buttons.map((button) => form.button({
|
|
56
|
+
text: button.text,
|
|
57
|
+
icon: button.icon,
|
|
58
|
+
on_click: () => {
|
|
59
|
+
close(some(button.value));
|
|
60
|
+
button.click?.();
|
|
61
|
+
}
|
|
62
|
+
}))
|
|
63
|
+
})] }) }));
|
|
64
|
+
}
|
|
65
|
+
// prompts/form.ts
|
|
66
|
+
/**Opens a prompt with form elements and one or more submit buttons
|
|
67
|
+
* Executes the last submit button's click handler when the Enter key is pressed.
|
|
68
|
+
* */
|
|
69
|
+
function prompt_form(text, elements, submit, options) {
|
|
70
|
+
const group = form.group({
|
|
71
|
+
elements,
|
|
72
|
+
embed: true,
|
|
73
|
+
column: options?.form_column ?? true,
|
|
74
|
+
row: options?.form_row
|
|
75
|
+
});
|
|
76
|
+
const sub = Array.isArray(submit) ? submit : [submit];
|
|
77
|
+
return open_prompt(text, (close) => {
|
|
78
|
+
const submit_with = (s) => {
|
|
79
|
+
if (!s.click?.(group, close)) close(group.value_changed.to_option());
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
element: form.group({ elements: [group, form.group({
|
|
83
|
+
embed: true,
|
|
84
|
+
column: options?.submit_column ?? true,
|
|
85
|
+
row: options?.submit_row,
|
|
86
|
+
elements: sub.map((s) => form.button({
|
|
87
|
+
text: s.text,
|
|
88
|
+
on_click: () => submit_with(s),
|
|
89
|
+
center: true
|
|
90
|
+
}))
|
|
91
|
+
})] }),
|
|
92
|
+
key: (e) => {
|
|
93
|
+
if (e.key === "Enter") sleep(0).then(() => submit_with(sub.at(-1)));
|
|
94
|
+
},
|
|
95
|
+
focus: elements.find((element) => element instanceof FormValueWrite) ?? elements[0]
|
|
96
|
+
};
|
|
97
|
+
}, 20);
|
|
98
|
+
}
|
|
99
|
+
// prompts/index.ts
|
|
100
|
+
/**Modal prompts in the middle of the page, each resolves with the answer of the user, or none when closed*/
|
|
101
|
+
const prompts = {
|
|
102
|
+
buttons: prompt_buttons,
|
|
103
|
+
form: prompt_form
|
|
104
|
+
};
|
|
105
|
+
export { prompts };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../package-ui/prompts/shared.ts","../../../package-ui/prompts/buttons.ts","../../../package-ui/prompts/form.ts","../../../package-ui/prompts/index.ts"],"sourcesContent":["import { define_element } from \"#base\";\nimport { comp, ContentBase } from \"#composition\";\nimport { none, type Option } from \"@chocbite/ts-lib/result\";\n\n/**Content of a prompt, the prompt functions fill it*/\nclass Prompt extends ContentBase {\n static element_name() {\n return \"prompt\";\n }\n static element_name_space() {\n return \"prompts\";\n }\n}\ndefine_element(Prompt);\n\n/**What a prompt shows, built with the close function of the prompt*/\nexport interface PromptBody {\n /**Element shown in the prompt*/\n element: HTMLElement;\n /**Keys pressed in the prompt, other than Escape, which closes it*/\n key?: (e: KeyboardEvent) => void;\n /**Element focused when the prompt opens, the prompt itself by default*/\n focus?: HTMLElement;\n}\n\n/**Opens a modal prompt in the middle of the main document\n * Resolves with the result given to close, or none when the user closes the prompt\n * @param width width in rem, not given the prompt fits its content*/\nexport function open_prompt<T>(\n title: string,\n build: (close: (result: Option<T>) => void) => PromptBody,\n width?: number,\n): Promise<Option<T>> {\n return new Promise<Option<T>>((resolve) => {\n const prompt = Prompt.create({ title, closable: true });\n let done = false;\n const close = (result: Option<T>) => {\n if (done) return;\n done = true;\n resolve(result);\n prompt.content_close();\n };\n const { element, key, focus } = build(close);\n prompt.appendChild(element);\n prompt.addEventListener(\"keydown\", (e) => {\n if (e.key === \"Escape\") close(none());\n else key?.(e);\n });\n const panel = comp.panel(prompt, { sizeable: false, modal: true, width });\n void panel.on_close().then(() => close(none()));\n (focus ?? prompt).focus();\n });\n}\n","import form from \"#form\";\nimport type { SVGFunc } from \"#svg\";\nimport { some, type Option } from \"@chocbite/ts-lib/result\";\nimport { open_prompt } from \"./shared\";\n\nexport interface PromptButton<T> {\n /**Text of the button*/\n text: string;\n /**Value the prompt resolves with when the button is clicked*/\n value: T;\n /**Called after the prompt closes from the button*/\n click?: () => void;\n icon?: SVGFunc;\n}\n\n/**Opens a prompt with a row of buttons\n * Resolves with the value of the clicked button, or none when the user closes the prompt*/\nexport function prompt_buttons<T>(\n text: string,\n buttons: PromptButton<T>[],\n): Promise<Option<T>> {\n return open_prompt<T>(text, (close) => ({\n element: form.group({\n elements: [\n form.spacer({ space: 0.5 }),\n form.group({\n embed: true,\n column: \"10rem\",\n elements: buttons.map((button) =>\n form.button({\n text: button.text,\n icon: button.icon,\n on_click: () => {\n close(some(button.value));\n button.click?.();\n },\n }),\n ),\n }),\n ],\n }),\n }));\n}\n","import { sleep, type Prettify } from \"@chocbite/ts-lib/common\";\nimport form, {\n FormElement,\n FormValue,\n FormValueWrite,\n type FormGroup,\n} from \"#form\";\nimport { type Option } from \"@chocbite/ts-lib/result\";\nimport { open_prompt } from \"./shared\";\n\ninterface PromptFormOptions {\n /**Columns for form, true is everything in one columns, just a number will make repeating columns of minimum that rem width, an array will make exactly that many colums with specified rem widths */\n form_column?: true | string | string[];\n /**Rows for form, true is everything in one row, just a number will make repeating rows of minimum that rem height, an array will make exactly that many rows with specified rem heights */\n form_row?: true | string | string[];\n /**Columns for submit buttons, true is everything in one columns, just a number will make repeating columns of minimum that rem width, an array will make exactly that many colums with specified rem widths */\n submit_column?: true | string | string[];\n /**Rows for submit buttons, true is everything in one row, just a number will make repeating rows of minimum that rem height, an array will make exactly that many rows with specified rem heights */\n submit_row?: true | string | string[];\n}\n\ntype GroupExtractVals<Arr extends any[]> = Arr extends [\n infer Head,\n ...infer Tail,\n]\n ? Head extends FormValue<infer T, infer ID>\n ? [FormValue<T, ID>, ...GroupExtractVals<Tail>]\n : [...GroupExtractVals<Tail>]\n : [];\nexport type GroupToKeyVal<Arr extends FormValue<any, any>[]> = {\n [\n K in Arr[number] as K extends FormValue<any, infer ID>\n ? [ID] extends [string]\n ? ID\n : never\n : never\n ]: K extends FormValue<infer T, any> ? T : never;\n};\n\ninterface Submit<T extends object, L extends FormElement[]> {\n text: string;\n /**Callback function for submit button\n * @param group The form group containing the form elements\n * @param close Function to close the prompt with provided result\n * @returns Return true if the form should not close automatically */\n click?: (\n group: FormGroup<T, undefined, L>,\n close: (result: Option<Partial<T>>) => void,\n ) => boolean | void;\n}\n\n/**Opens a prompt with form elements and one or more submit buttons\n * Executes the last submit button's click handler when the Enter key is pressed.\n * */\nexport function prompt_form<\n L extends FormElement[],\n T extends object = Prettify<GroupToKeyVal<GroupExtractVals<L>>>,\n>(\n text: string,\n elements: [...L],\n submit: Submit<T, L> | Submit<T, L>[],\n options?: PromptFormOptions,\n): Promise<Option<Partial<T>>> {\n const group = form.group<L, undefined, T>({\n elements,\n embed: true,\n column: options?.form_column ?? true,\n row: options?.form_row,\n });\n const sub = Array.isArray(submit) ? submit : [submit];\n return open_prompt<Partial<T>>(\n text,\n (close) => {\n const submit_with = (s: Submit<T, L>) => {\n if (!s.click?.(group, close)) close(group.value_changed.to_option());\n };\n return {\n element: form.group({\n elements: [\n group,\n form.group({\n embed: true,\n column: options?.submit_column ?? true,\n row: options?.submit_row,\n elements: sub.map((s) =>\n form.button({\n text: s.text,\n on_click: () => submit_with(s),\n center: true,\n }),\n ),\n }),\n ],\n }),\n key: (e) => {\n //Waits for the element in focus to take the value of the enter first\n if (e.key === \"Enter\")\n void sleep(0).then(() => submit_with(sub.at(-1)!));\n },\n //The first element the user can change, labels before it can not take the focus\n focus:\n elements.find((element) => element instanceof FormValueWrite) ??\n elements[0],\n };\n },\n 20,\n );\n}\n","import { prompt_buttons } from \"./buttons\";\nimport { prompt_form } from \"./form\";\n\n/**Modal prompts in the middle of the page, each resolves with the answer of the user, or none when closed*/\nexport const prompts = {\n buttons: prompt_buttons,\n form: prompt_form,\n};\n\nexport type { PromptButton } from \"./buttons\";\n"],"mappings":";;;;;;;;AAKA,IAAM,SAAN,cAAqB,YAAY;CAC/B,OAAO,eAAe;EACpB,OAAO;CACT;CACA,OAAO,qBAAqB;EAC1B,OAAO;CACT;AACF;AACA,eAAe,MAAM;;;;AAerB,SAAgB,YACd,OACA,OACA,OACoB;CACpB,OAAO,IAAI,SAAoB,YAAY;EACzC,MAAM,SAAS,OAAO,OAAO;GAAE;GAAO,UAAU;EAAK,CAAC;EACtD,IAAI,OAAO;EACX,MAAM,SAAS,WAAsB;GACnC,IAAI,MAAM;GACV,OAAO;GACP,QAAQ,MAAM;GACd,OAAO,cAAc;EACvB;EACA,MAAM,EAAE,SAAS,KAAK,UAAU,MAAM,KAAK;EAC3C,OAAO,YAAY,OAAO;EAC1B,OAAO,iBAAiB,YAAY,MAAM;GACxC,IAAI,EAAE,QAAQ,UAAU,MAAM,KAAK,CAAC;QAC/B,MAAM,CAAC;EACd,CAAC;EAED,KADmB,MAAM,QAAQ;GAAE,UAAU;GAAO,OAAO;GAAM;EAAM,CAC9D,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,MAAM,KAAK,CAAC,CAAC;EAC9C,CAAC,SAAS,OAAA,CAAQ,MAAM;CAC1B,CAAC;AACH;;;;ACnCA,SAAgB,eACd,MACA,SACoB;CACpB,OAAO,YAAe,OAAO,WAAW,EACtC,SAAS,KAAK,MAAM,EAClB,UAAU,CACR,KAAK,OAAO,EAAE,OAAO,GAAI,CAAC,GAC1B,KAAK,MAAM;EACT,OAAO;EACP,QAAQ;EACR,UAAU,QAAQ,KAAK,WACrB,KAAK,OAAO;GACV,MAAM,OAAO;GACb,MAAM,OAAO;GACb,gBAAgB;IACd,MAAM,KAAK,OAAO,KAAK,CAAC;IACxB,OAAO,QAAQ;GACjB;EACF,CAAC,CACH;CACF,CAAC,CACH,EACF,CAAC,EACH,EAAE;AACJ;;;;;ACYA,SAAgB,YAId,MACA,UACA,QACA,SAC6B;CAC7B,MAAM,QAAQ,KAAK,MAAuB;EACxC;EACA,OAAO;EACP,QAAQ,SAAS,eAAe;EAChC,KAAK,SAAS;CAChB,CAAC;CACD,MAAM,MAAM,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC,MAAM;CACpD,OAAO,YACL,OACC,UAAU;EACT,MAAM,eAAe,MAAoB;GACvC,IAAI,CAAC,EAAE,QAAQ,OAAO,KAAK,GAAG,MAAM,MAAM,cAAc,UAAU,CAAC;EACrE;EACA,OAAO;GACL,SAAS,KAAK,MAAM,EAClB,UAAU,CACR,OACA,KAAK,MAAM;IACT,OAAO;IACP,QAAQ,SAAS,iBAAiB;IAClC,KAAK,SAAS;IACd,UAAU,IAAI,KAAK,MACjB,KAAK,OAAO;KACV,MAAM,EAAE;KACR,gBAAgB,YAAY,CAAC;KAC7B,QAAQ;IACV,CAAC,CACH;GACF,CAAC,CACH,EACF,CAAC;GACD,MAAM,MAAM;IAEV,IAAI,EAAE,QAAQ,SACZ,MAAW,CAAC,CAAC,CAAC,WAAW,YAAY,IAAI,GAAG,EAAE,CAAE,CAAC;GACrD;GAEA,OACE,SAAS,MAAM,YAAY,mBAAmB,cAAc,KAC5D,SAAS;EACb;CACF,GACA,EACF;AACF;;;ACvGA,MAAa,UAAU;CACrB,SAAS;CACT,MAAM;AACR"}
|
package/spinner/index.d.mts
CHANGED
package/spinner/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../style.css";
|
|
2
2
|
import { Base, define_element } from "../base/index.mjs";
|
|
3
3
|
import { t as svg } from "../svg-Yz7elqnU.mjs";
|
|
4
|
-
import { i as theme_init_variable_root } from "../theme-
|
|
4
|
+
import { i as theme_init_variable_root } from "../theme-D0pRMLyT.mjs";
|
|
5
5
|
import { GREY } from "@chocbite/ts-lib/colors";
|
|
6
6
|
// spinner/index.ts
|
|
7
7
|
theme_init_variable_root("spinners", "Spinner", "Spinner used as a placeholder for data with and unknown arrival time").make_variable("color", "Dot color", "Color of dots in spinner", GREY["700"], GREY["300"], "Color", void 0);
|