@chocbite/ts-lib-ui 0.0.0-stage → 1.0.1

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 (57) hide show
  1. package/README.md +48 -2
  2. package/base/index.d.mts +3 -0
  3. package/base/index.mjs +521 -0
  4. package/base/index.mjs.map +1 -0
  5. package/canvas/index.d.mts +74 -0
  6. package/canvas/index.mjs +619 -0
  7. package/canvas/index.mjs.map +1 -0
  8. package/context-menu/index.d.mts +3 -0
  9. package/context-menu/index.mjs +2 -0
  10. package/context-menu-3OazryD0.mjs +527 -0
  11. package/context-menu-3OazryD0.mjs.map +1 -0
  12. package/document/index.d.mts +27 -0
  13. package/document/index.mjs +50 -0
  14. package/document/index.mjs.map +1 -0
  15. package/dom/index.d.mts +3 -0
  16. package/dom/index.mjs +8 -0
  17. package/dom/index.mjs.map +1 -0
  18. package/form/index.d.mts +747 -0
  19. package/form/index.mjs +2694 -0
  20. package/form/index.mjs.map +1 -0
  21. package/icons/index.d.mts +4109 -0
  22. package/icons/index.mjs +2 -0
  23. package/icons/mixins.scss +12 -0
  24. package/icons-CY4BLQ2F.mjs +4123 -0
  25. package/index-BND79jZp.d.mts +212 -0
  26. package/index-BcidwqIy.d.mts +167 -0
  27. package/index-CB3-qP6l.d.mts +120 -0
  28. package/index-CugtUzv_.d.mts +155 -0
  29. package/keyboard/index.d.mts +85 -0
  30. package/keyboard/index.mjs +1499 -0
  31. package/keyboard/index.mjs.map +1 -0
  32. package/list/index.d.mts +3 -0
  33. package/list/index.mjs +2 -0
  34. package/list-BcNSxtNm.mjs +617 -0
  35. package/list-BcNSxtNm.mjs.map +1 -0
  36. package/package.json +95 -4
  37. package/selection/index.d.mts +16 -0
  38. package/selection/index.mjs +96 -0
  39. package/selection/index.mjs.map +1 -0
  40. package/settings/index.d.mts +43 -0
  41. package/settings/index.mjs +110 -0
  42. package/settings/index.mjs.map +1 -0
  43. package/spinner/index.d.mts +10 -0
  44. package/spinner/index.mjs +39 -0
  45. package/spinner/index.mjs.map +1 -0
  46. package/style.css +2994 -0
  47. package/svg/index.d.mts +3 -0
  48. package/svg/index.mjs +2 -0
  49. package/svg-golJPaR4.mjs +358 -0
  50. package/svg-golJPaR4.mjs.map +1 -0
  51. package/theme/index.d.mts +179 -0
  52. package/theme/index.mjs +2 -0
  53. package/theme/mixins.scss +39 -0
  54. package/theme-DhIVwHQw.mjs +338 -0
  55. package/theme-DhIVwHQw.mjs.map +1 -0
  56. package/viewport/index.d.mts +1 -0
  57. package/viewport/index.mjs +2 -0
@@ -0,0 +1,85 @@
1
+ import '../style.css';
2
+ import { u as Base } from "../index-BND79jZp.mjs";
3
+ declare abstract class KeyboardBase extends Base {
4
+ #private;
5
+ static element_name(): string;
6
+ static element_name_space(): string;
7
+ protected elem?: HTMLElement;
8
+ constructor();
9
+ protected connectedCallback(): void;
10
+ protected disconnectedCallback(): void;
11
+ open(element: HTMLElement): void;
12
+ close(): void;
13
+ }
14
+ export declare const KeyboardType: {
15
+ /**Text input type */
16
+ readonly Text: "text";
17
+ /**Email input type */
18
+ readonly Email: "email";
19
+ /**Color input type */
20
+ readonly Color: "color";
21
+ /**Date input type, eg. 2026-09-22 */
22
+ readonly Date: "date";
23
+ /**Local date and time input type, eg. 2026-09-22T14:30 */
24
+ readonly DateTimeLocal: "datetime_local";
25
+ /**Month input type, eg. 2026-09 */
26
+ readonly Month: "month";
27
+ /**Time input type, eg. 14:30 */
28
+ readonly Time: "time";
29
+ /**Week input type, eg. 2026-W39 */
30
+ readonly Week: "week";
31
+ /**Whole number input type, eg. 0, 1, 2 ...*/
32
+ readonly NumberWhole: "number_whole";
33
+ /**Hexadecimal number input type, eg. 0A, FF, 1C3 */
34
+ readonly NumberHex: "number_hex";
35
+ /**Integer number input type, eg. -2, -1, 0, 1, 2 ... */
36
+ readonly NumberInteger: "number_integer";
37
+ /**Positive rational number input type, eg. 0.5, 1.2 ... */
38
+ readonly NumberRationalPositive: "number_rational_positive";
39
+ /**Rational number input type, eg. -2.5, -1.1, 0.5, 1.2 ... */
40
+ readonly NumberRational: "number_rational";
41
+ /**Phone number input type, eg. +1 234 567 890 */
42
+ readonly Phone: "phone";
43
+ };
44
+ export type KeyboardType = (typeof KeyboardType)[keyof typeof KeyboardType];
45
+ interface KeyboardKeyConfig {
46
+ text: string;
47
+ key?: string;
48
+ rows?: number;
49
+ cols?: number;
50
+ }
51
+ interface KeyboardLayerConfig {
52
+ /**Maximum width of the keyboard layer in rems */
53
+ max_width?: number;
54
+ /**Default number of rows a key occupies in this layer */
55
+ key_rows?: number;
56
+ /**Default number of columns a key occupies in this layer */
57
+ key_cols?: number;
58
+ keys: (KeyboardKeyConfig | number)[][];
59
+ }
60
+ interface KeyboardLayers {
61
+ [layer: string]: KeyboardLayerConfig;
62
+ }
63
+ interface KeyboardConfig {
64
+ default: KeyboardLayerConfig;
65
+ layers?: KeyboardLayers;
66
+ }
67
+ declare class Keyboard_Keys extends KeyboardBase {
68
+ #private;
69
+ static element_name(): string;
70
+ readonly layer: import("@chocbite/ts-lib/state").StateROS<string, import("@chocbite/ts-lib/result").OptionNone, string>;
71
+ constructor(config: KeyboardConfig);
72
+ open(element: HTMLElement): void;
73
+ close(): void;
74
+ execute_key(key: string): void;
75
+ }
76
+ export declare const VIRTUAL_KEYBOARD: import("@chocbite/ts-lib/state").StateROSW<boolean, import("@chocbite/ts-lib/result").OptionNone, boolean>;
77
+ /**Opens the on-screen keyboard for the specified element with the given mode and returns a function to close it
78
+ * @param element The HTML element to attach the keyboard to.
79
+ * @param mode The keyboard mode, which can be a predefined type, a custom keyboard instance, or a keyboard configuration.
80
+ * @returns A function that closes the keyboard when called. */
81
+ export declare function keyboard_open(element: HTMLElement, mode: KeyboardType | KeyboardBase | KeyboardConfig): () => void;
82
+ /** Creates a new on-screen keyboard instance with the specified configuration */
83
+ export declare function keyboard_create(config: KeyboardConfig): Keyboard_Keys;
84
+ export {};
85
+ //# sourceMappingURL=index.d.mts.map