kenikool-ui 1.0.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 (196) hide show
  1. package/README.md +144 -0
  2. package/dist/cdn-auto-register.js +188 -0
  3. package/dist/tsconfig.build.tsbuildinfo +1 -0
  4. package/dist/types/components/advanced/datepicker.d.ts +86 -0
  5. package/dist/types/components/advanced/datepicker.d.ts.map +1 -0
  6. package/dist/types/components/advanced/datepicker.stories.d.ts +48 -0
  7. package/dist/types/components/advanced/datepicker.stories.d.ts.map +1 -0
  8. package/dist/types/components/advanced/fileupload.d.ts +75 -0
  9. package/dist/types/components/advanced/fileupload.d.ts.map +1 -0
  10. package/dist/types/components/advanced/fileupload.stories.d.ts +46 -0
  11. package/dist/types/components/advanced/fileupload.stories.d.ts.map +1 -0
  12. package/dist/types/components/advanced/index.d.ts +4 -0
  13. package/dist/types/components/advanced/index.d.ts.map +1 -0
  14. package/dist/types/components/data/avatar.d.ts +94 -0
  15. package/dist/types/components/data/avatar.d.ts.map +1 -0
  16. package/dist/types/components/data/avatar.stories.d.ts +51 -0
  17. package/dist/types/components/data/avatar.stories.d.ts.map +1 -0
  18. package/dist/types/components/data/badge.d.ts +69 -0
  19. package/dist/types/components/data/badge.d.ts.map +1 -0
  20. package/dist/types/components/data/badge.stories.d.ts +48 -0
  21. package/dist/types/components/data/badge.stories.d.ts.map +1 -0
  22. package/dist/types/components/data/index.d.ts +5 -0
  23. package/dist/types/components/data/index.d.ts.map +1 -0
  24. package/dist/types/components/data/list.d.ts +66 -0
  25. package/dist/types/components/data/list.d.ts.map +1 -0
  26. package/dist/types/components/data/list.stories.d.ts +38 -0
  27. package/dist/types/components/data/list.stories.d.ts.map +1 -0
  28. package/dist/types/components/data/table.d.ts +70 -0
  29. package/dist/types/components/data/table.d.ts.map +1 -0
  30. package/dist/types/components/data/table.stories.d.ts +42 -0
  31. package/dist/types/components/data/table.stories.d.ts.map +1 -0
  32. package/dist/types/components/feedback/alert.d.ts +78 -0
  33. package/dist/types/components/feedback/alert.d.ts.map +1 -0
  34. package/dist/types/components/feedback/alert.stories.d.ts +35 -0
  35. package/dist/types/components/feedback/alert.stories.d.ts.map +1 -0
  36. package/dist/types/components/feedback/index.d.ts +5 -0
  37. package/dist/types/components/feedback/index.d.ts.map +1 -0
  38. package/dist/types/components/feedback/loading.d.ts +87 -0
  39. package/dist/types/components/feedback/loading.d.ts.map +1 -0
  40. package/dist/types/components/feedback/loading.stories.d.ts +48 -0
  41. package/dist/types/components/feedback/loading.stories.d.ts.map +1 -0
  42. package/dist/types/components/feedback/modal.d.ts +93 -0
  43. package/dist/types/components/feedback/modal.d.ts.map +1 -0
  44. package/dist/types/components/feedback/modal.stories.d.ts +37 -0
  45. package/dist/types/components/feedback/modal.stories.d.ts.map +1 -0
  46. package/dist/types/components/feedback/toast.d.ts +102 -0
  47. package/dist/types/components/feedback/toast.d.ts.map +1 -0
  48. package/dist/types/components/feedback/toast.stories.d.ts +51 -0
  49. package/dist/types/components/feedback/toast.stories.d.ts.map +1 -0
  50. package/dist/types/components/forms/button.d.ts +64 -0
  51. package/dist/types/components/forms/button.d.ts.map +1 -0
  52. package/dist/types/components/forms/button.stories.d.ts +52 -0
  53. package/dist/types/components/forms/button.stories.d.ts.map +1 -0
  54. package/dist/types/components/forms/checkbox.d.ts +51 -0
  55. package/dist/types/components/forms/checkbox.d.ts.map +1 -0
  56. package/dist/types/components/forms/checkbox.stories.d.ts +31 -0
  57. package/dist/types/components/forms/checkbox.stories.d.ts.map +1 -0
  58. package/dist/types/components/forms/index.d.ts +6 -0
  59. package/dist/types/components/forms/index.d.ts.map +1 -0
  60. package/dist/types/components/forms/input.d.ts +66 -0
  61. package/dist/types/components/forms/input.d.ts.map +1 -0
  62. package/dist/types/components/forms/input.stories.d.ts +49 -0
  63. package/dist/types/components/forms/input.stories.d.ts.map +1 -0
  64. package/dist/types/components/forms/radio.d.ts +51 -0
  65. package/dist/types/components/forms/radio.d.ts.map +1 -0
  66. package/dist/types/components/forms/radio.stories.d.ts +41 -0
  67. package/dist/types/components/forms/radio.stories.d.ts.map +1 -0
  68. package/dist/types/components/forms/select.d.ts +67 -0
  69. package/dist/types/components/forms/select.d.ts.map +1 -0
  70. package/dist/types/components/forms/select.stories.d.ts +42 -0
  71. package/dist/types/components/forms/select.stories.d.ts.map +1 -0
  72. package/dist/types/components/layout/card.d.ts +66 -0
  73. package/dist/types/components/layout/card.d.ts.map +1 -0
  74. package/dist/types/components/layout/card.example.d.ts +5 -0
  75. package/dist/types/components/layout/card.example.d.ts.map +1 -0
  76. package/dist/types/components/layout/card.stories.d.ts +40 -0
  77. package/dist/types/components/layout/card.stories.d.ts.map +1 -0
  78. package/dist/types/components/layout/container.d.ts +84 -0
  79. package/dist/types/components/layout/container.d.ts.map +1 -0
  80. package/dist/types/components/layout/container.stories.d.ts +40 -0
  81. package/dist/types/components/layout/container.stories.d.ts.map +1 -0
  82. package/dist/types/components/layout/grid.d.ts +76 -0
  83. package/dist/types/components/layout/grid.d.ts.map +1 -0
  84. package/dist/types/components/layout/grid.example.d.ts +11 -0
  85. package/dist/types/components/layout/grid.example.d.ts.map +1 -0
  86. package/dist/types/components/layout/grid.stories.d.ts +38 -0
  87. package/dist/types/components/layout/grid.stories.d.ts.map +1 -0
  88. package/dist/types/components/layout/index.d.ts +5 -0
  89. package/dist/types/components/layout/index.d.ts.map +1 -0
  90. package/dist/types/components/layout/stack.d.ts +82 -0
  91. package/dist/types/components/layout/stack.d.ts.map +1 -0
  92. package/dist/types/components/layout/stack.stories.d.ts +44 -0
  93. package/dist/types/components/layout/stack.stories.d.ts.map +1 -0
  94. package/dist/types/components/navigation/breadcrumbs.d.ts +62 -0
  95. package/dist/types/components/navigation/breadcrumbs.d.ts.map +1 -0
  96. package/dist/types/components/navigation/breadcrumbs.stories.d.ts +32 -0
  97. package/dist/types/components/navigation/breadcrumbs.stories.d.ts.map +1 -0
  98. package/dist/types/components/navigation/index.d.ts +4 -0
  99. package/dist/types/components/navigation/index.d.ts.map +1 -0
  100. package/dist/types/components/navigation/navbar.d.ts +66 -0
  101. package/dist/types/components/navigation/navbar.d.ts.map +1 -0
  102. package/dist/types/components/navigation/navbar.stories.d.ts +37 -0
  103. package/dist/types/components/navigation/navbar.stories.d.ts.map +1 -0
  104. package/dist/types/components/navigation/sidebar.d.ts +72 -0
  105. package/dist/types/components/navigation/sidebar.d.ts.map +1 -0
  106. package/dist/types/components/navigation/sidebar.stories.d.ts +43 -0
  107. package/dist/types/components/navigation/sidebar.stories.d.ts.map +1 -0
  108. package/dist/types/components/typography/index.d.ts +3 -0
  109. package/dist/types/components/typography/index.d.ts.map +1 -0
  110. package/dist/types/components/typography/text.d.ts +111 -0
  111. package/dist/types/components/typography/text.d.ts.map +1 -0
  112. package/dist/types/components/typography/text.stories.d.ts +48 -0
  113. package/dist/types/components/typography/text.stories.d.ts.map +1 -0
  114. package/dist/types/core/base-component.d.ts +178 -0
  115. package/dist/types/core/base-component.d.ts.map +1 -0
  116. package/dist/types/core/base-component.example.d.ts +24 -0
  117. package/dist/types/core/base-component.example.d.ts.map +1 -0
  118. package/dist/types/core/registry.d.ts +88 -0
  119. package/dist/types/core/registry.d.ts.map +1 -0
  120. package/dist/types/core/registry.example.d.ts +42 -0
  121. package/dist/types/core/registry.example.d.ts.map +1 -0
  122. package/dist/types/core/smart-defaults.d.ts +45 -0
  123. package/dist/types/core/smart-defaults.d.ts.map +1 -0
  124. package/dist/types/core/smart-defaults.example.d.ts +20 -0
  125. package/dist/types/core/smart-defaults.example.d.ts.map +1 -0
  126. package/dist/types/core/styles-parser.d.ts +107 -0
  127. package/dist/types/core/styles-parser.d.ts.map +1 -0
  128. package/dist/types/core/styles-parser.example.d.ts +10 -0
  129. package/dist/types/core/styles-parser.example.d.ts.map +1 -0
  130. package/dist/types/core/theme-system.d.ts +91 -0
  131. package/dist/types/core/theme-system.d.ts.map +1 -0
  132. package/dist/types/index.d.ts +24 -0
  133. package/dist/types/index.d.ts.map +1 -0
  134. package/dist/types/themes/built-in-themes.d.ts +32 -0
  135. package/dist/types/themes/built-in-themes.d.ts.map +1 -0
  136. package/dist/types/themes/index.d.ts +5 -0
  137. package/dist/types/themes/index.d.ts.map +1 -0
  138. package/dist/types/types/components.d.ts +549 -0
  139. package/dist/types/types/components.d.ts.map +1 -0
  140. package/dist/types/types/index.d.ts +379 -0
  141. package/dist/types/types/index.d.ts.map +1 -0
  142. package/dist/types/types/theme-config.d.ts +674 -0
  143. package/dist/types/types/theme-config.d.ts.map +1 -0
  144. package/dist/types/types/themes.d.ts +325 -0
  145. package/dist/types/types/themes.d.ts.map +1 -0
  146. package/dist/types/types/utils.d.ts +293 -0
  147. package/dist/types/types/utils.d.ts.map +1 -0
  148. package/dist/types/types/wrappers.d.ts +335 -0
  149. package/dist/types/types/wrappers.d.ts.map +1 -0
  150. package/dist/types/utils/accessibility.d.ts +345 -0
  151. package/dist/types/utils/accessibility.d.ts.map +1 -0
  152. package/dist/types/utils/accessibility.example.d.ts +50 -0
  153. package/dist/types/utils/accessibility.example.d.ts.map +1 -0
  154. package/dist/types/utils/css-variables.d.ts +278 -0
  155. package/dist/types/utils/css-variables.d.ts.map +1 -0
  156. package/dist/types/utils/icon-system.d.ts +79 -0
  157. package/dist/types/utils/icon-system.d.ts.map +1 -0
  158. package/dist/types/utils/index.d.ts +9 -0
  159. package/dist/types/utils/index.d.ts.map +1 -0
  160. package/dist/types/utils/performance.d.ts +141 -0
  161. package/dist/types/utils/performance.d.ts.map +1 -0
  162. package/dist/types/utils/security.d.ts +109 -0
  163. package/dist/types/utils/security.d.ts.map +1 -0
  164. package/dist/types/utils/validation.d.ts +84 -0
  165. package/dist/types/utils/validation.d.ts.map +1 -0
  166. package/dist/types/wrappers/angular/components.d.ts +2 -0
  167. package/dist/types/wrappers/angular/components.d.ts.map +1 -0
  168. package/dist/types/wrappers/angular/index.d.ts +6 -0
  169. package/dist/types/wrappers/angular/index.d.ts.map +1 -0
  170. package/dist/types/wrappers/angular/module.d.ts +2 -0
  171. package/dist/types/wrappers/angular/module.d.ts.map +1 -0
  172. package/dist/types/wrappers/angular/services.d.ts +2 -0
  173. package/dist/types/wrappers/angular/services.d.ts.map +1 -0
  174. package/dist/types/wrappers/angular/types.d.ts +44 -0
  175. package/dist/types/wrappers/angular/types.d.ts.map +1 -0
  176. package/dist/types/wrappers/react/components.d.ts +2 -0
  177. package/dist/types/wrappers/react/components.d.ts.map +1 -0
  178. package/dist/types/wrappers/react/hooks.d.ts +2 -0
  179. package/dist/types/wrappers/react/hooks.d.ts.map +1 -0
  180. package/dist/types/wrappers/react/index.d.ts +6 -0
  181. package/dist/types/wrappers/react/index.d.ts.map +1 -0
  182. package/dist/types/wrappers/react/provider.d.ts +2 -0
  183. package/dist/types/wrappers/react/provider.d.ts.map +1 -0
  184. package/dist/types/wrappers/react/types.d.ts +31 -0
  185. package/dist/types/wrappers/react/types.d.ts.map +1 -0
  186. package/dist/types/wrappers/vue/components.d.ts +2 -0
  187. package/dist/types/wrappers/vue/components.d.ts.map +1 -0
  188. package/dist/types/wrappers/vue/composables.d.ts +2 -0
  189. package/dist/types/wrappers/vue/composables.d.ts.map +1 -0
  190. package/dist/types/wrappers/vue/index.d.ts +6 -0
  191. package/dist/types/wrappers/vue/index.d.ts.map +1 -0
  192. package/dist/types/wrappers/vue/plugin.d.ts +2 -0
  193. package/dist/types/wrappers/vue/plugin.d.ts.map +1 -0
  194. package/dist/types/wrappers/vue/types.d.ts +38 -0
  195. package/dist/types/wrappers/vue/types.d.ts.map +1 -0
  196. package/package.json +138 -0
@@ -0,0 +1,42 @@
1
+ import { BaseComponent } from './base-component';
2
+ declare class ExampleButton extends BaseComponent {
3
+ static get observedAttributes(): string[];
4
+ render(): void;
5
+ getDefaultStyles(): CSSStyleSheet;
6
+ getAccessibilityConfig(): {
7
+ role: string;
8
+ focusable: boolean;
9
+ };
10
+ }
11
+ declare class ExampleCard extends BaseComponent {
12
+ static get observedAttributes(): string[];
13
+ render(): void;
14
+ getDefaultStyles(): CSSStyleSheet;
15
+ getAccessibilityConfig(): {
16
+ role: string;
17
+ focusable: boolean;
18
+ };
19
+ }
20
+ declare class ExampleModal extends BaseComponent {
21
+ render(): void;
22
+ getDefaultStyles(): CSSStyleSheet;
23
+ getAccessibilityConfig(): {
24
+ role: string;
25
+ ariaModal: boolean;
26
+ focusable: boolean;
27
+ };
28
+ }
29
+ declare function createExampleComponents(): void;
30
+ export { ExampleButton, ExampleCard, ExampleModal, createExampleComponents };
31
+ export declare class ComponentManager {
32
+ static preloadCriticalComponents(): Promise<void>;
33
+ static getComponentStats(): {
34
+ registered: number;
35
+ loaded: number;
36
+ pending: number;
37
+ components: string[];
38
+ loadedComponents: string[];
39
+ };
40
+ static loadComponentsForPage(pageType: string): Promise<void>;
41
+ }
42
+ //# sourceMappingURL=registry.example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.example.d.ts","sourceRoot":"","sources":["../../../src/core/registry.example.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,cAAM,aAAc,SAAQ,aAAa;IACvC,MAAM,KAAK,kBAAkB,aAE5B;IAED,MAAM,IAAI,IAAI;IAwCd,gBAAgB,IAAI,aAAa;IAIjC,sBAAsB;;;;CAMvB;AAED,cAAM,WAAY,SAAQ,aAAa;IACrC,MAAM,KAAK,kBAAkB,aAE5B;IAED,MAAM,IAAI,IAAI;IAmBd,gBAAgB,IAAI,aAAa;IAIjC,sBAAsB;;;;CAMvB;AAsBD,cAAM,YAAa,SAAQ,aAAa;IACtC,MAAM,IAAI,IAAI;IA8Bd,gBAAgB,IAAI,aAAa;IAIjC,sBAAsB;;;;;CAOvB;AAkDD,iBAAS,uBAAuB,SAc/B;AAGD,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,uBAAuB,EACxB,CAAC;AAGF,qBAAa,gBAAgB;WACd,yBAAyB;IAWtC,MAAM,CAAC,iBAAiB;;;;;;;WAIX,qBAAqB,CAAC,QAAQ,EAAE,MAAM;CAgBpD"}
@@ -0,0 +1,45 @@
1
+ import type { BaseComponent } from './base-component';
2
+ import type { SmartDefaultRule } from '../types';
3
+ /**
4
+ * Smart Defaults System
5
+ *
6
+ * Provides automatic component enhancements based on rules:
7
+ * - Email inputs get email icons
8
+ * - Missing placeholders are generated based on input type
9
+ * - Validation UI is automatically added when needed
10
+ * - Loading states are added to buttons during form submission
11
+ * - Autocomplete attributes are provided for common input types
12
+ */
13
+ export declare class SmartDefaults {
14
+ private static rules;
15
+ private static initialized;
16
+ /**
17
+ * Register a new smart default rule
18
+ */
19
+ static registerRule(rule: SmartDefaultRule): void;
20
+ /**
21
+ * Apply all applicable smart defaults to a component
22
+ */
23
+ static applyDefaults(component: BaseComponent): void;
24
+ /**
25
+ * Get all registered rules (for testing)
26
+ */
27
+ static getRules(): SmartDefaultRule[];
28
+ /**
29
+ * Clear all rules (for testing)
30
+ */
31
+ static clearRules(): void;
32
+ /**
33
+ * Initialize built-in rules
34
+ */
35
+ private static ensureInitialized;
36
+ /**
37
+ * Register all built-in smart default rules
38
+ */
39
+ private static initializeBuiltInRules;
40
+ /**
41
+ * Check if an input has an associated label element
42
+ */
43
+ private static hasAssociatedLabel;
44
+ }
45
+ //# sourceMappingURL=smart-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-defaults.d.ts","sourceRoot":"","sources":["../../../src/core/smart-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;;;;;;GASG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAA0B;IAC9C,OAAO,CAAC,MAAM,CAAC,WAAW,CAAS;IAEnC;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAMjD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI;IAcpD;;OAEG;IACH,MAAM,CAAC,QAAQ,IAAI,gBAAgB,EAAE;IAIrC;;OAEG;IACH,MAAM,CAAC,UAAU,IAAI,IAAI;IAKzB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAOhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAgLrC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAUlC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * SmartDefaults System Examples
3
+ *
4
+ * This file demonstrates how the SmartDefaults system automatically
5
+ * enhances components with helpful features based on rules.
6
+ */
7
+ import type { SmartDefaultRule } from '../types';
8
+ declare const searchIconRule: SmartDefaultRule;
9
+ declare const spellcheckRule: SmartDefaultRule;
10
+ declare class MockElement {
11
+ private _attributes;
12
+ tagName: string;
13
+ constructor(tagName: string);
14
+ setAttribute(name: string, value: string): void;
15
+ getAttribute(name: string): string | null;
16
+ hasAttribute(name: string): boolean;
17
+ closest(): Element | null;
18
+ }
19
+ export { searchIconRule, spellcheckRule, MockElement };
20
+ //# sourceMappingURL=smart-defaults.example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-defaults.example.d.ts","sourceRoot":"","sources":["../../../src/core/smart-defaults.example.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,QAAA,MAAM,cAAc,EAAE,gBAOrB,CAAC;AAGF,QAAA,MAAM,cAAc,EAAE,gBAKrB,CAAC;AAOF,cAAM,WAAW;IACf,OAAO,CAAC,WAAW,CAA6B;IACzC,OAAO,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,MAAM;IAI3B,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAInC,OAAO,IAAI,OAAO,GAAG,IAAI;CAG1B;AA2GD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * StylesParser - Parses and processes the optional `styles` attribute on components
3
+ *
4
+ * Handles parsing space-separated style tokens, validates them, and generates
5
+ * appropriate CSS classes for component styling. Supports size, variant,
6
+ * appearance, shape, and state modifiers.
7
+ *
8
+ * @example
9
+ * ```html
10
+ * <k-button styles="large primary rounded">Submit</k-button>
11
+ * ```
12
+ *
13
+ * Requirements validated:
14
+ * - 4.1: Apply specified styling modifiers from styles attribute
15
+ * - 4.2: Support space-separated values like "large primary rounded"
16
+ * - 4.3: Combine default styles with custom styles without conflicts
17
+ * - 4.4: Validate style values and ignore invalid modifiers
18
+ */
19
+ import type { StylesConfig } from '../types/index';
20
+ export declare class StylesParser {
21
+ private static readonly VALID_TOKENS;
22
+ private static readonly CLASS_PREFIX;
23
+ /**
24
+ * Parse a styles attribute string into a structured configuration
25
+ *
26
+ * @param stylesAttribute - Space-separated style tokens
27
+ * @returns Parsed and validated styles configuration
28
+ */
29
+ static parse(stylesAttribute: string): StylesConfig;
30
+ /**
31
+ * Generate CSS classes from a styles configuration
32
+ *
33
+ * @param config - Parsed styles configuration
34
+ * @param componentName - Name of the component (e.g., 'button', 'input')
35
+ * @returns Space-separated CSS class string
36
+ */
37
+ static generateCSS(config: StylesConfig, componentName: string): string;
38
+ /**
39
+ * Validate a styles configuration object
40
+ *
41
+ * @param config - Styles configuration to validate
42
+ * @returns Validation result with errors
43
+ */
44
+ static validate(config: StylesConfig): {
45
+ valid: boolean;
46
+ errors: string[];
47
+ };
48
+ /**
49
+ * Get all valid tokens for a specific category
50
+ *
51
+ * @param category - Style category to get tokens for
52
+ * @returns Array of valid tokens for the category
53
+ */
54
+ static getValidTokens(category: keyof typeof StylesParser.VALID_TOKENS): readonly string[];
55
+ /**
56
+ * Check if a token is valid for any category
57
+ *
58
+ * @param token - Token to check
59
+ * @returns True if token is valid in any category
60
+ */
61
+ static isValidToken(token: string): boolean;
62
+ /**
63
+ * Merge multiple styles configurations, with later configs taking precedence
64
+ *
65
+ * @param configs - Array of styles configurations to merge
66
+ * @returns Merged configuration
67
+ */
68
+ static merge(...configs: StylesConfig[]): StylesConfig;
69
+ /**
70
+ * Convert a styles configuration back to a string
71
+ *
72
+ * @param config - Styles configuration to stringify
73
+ * @returns Space-separated styles string
74
+ */
75
+ static stringify(config: StylesConfig): string;
76
+ /**
77
+ * Apply styles to a component element
78
+ *
79
+ * @param element - Component element to apply styles to
80
+ * @param config - Styles configuration to apply
81
+ * @param componentName - Name of the component
82
+ */
83
+ static applyToElement(element: HTMLElement, config: StylesConfig, componentName: string): void;
84
+ /**
85
+ * Remove style classes from an element
86
+ *
87
+ * @param element - Element to remove classes from
88
+ * @param componentName - Component name to match classes
89
+ */
90
+ static removeStyleClasses(element: HTMLElement, componentName: string): void;
91
+ /**
92
+ * Sanitize a custom class name to ensure it's valid CSS
93
+ *
94
+ * @param className - Class name to sanitize
95
+ * @returns Sanitized class name or null if invalid
96
+ */
97
+ private static sanitizeClassName;
98
+ /**
99
+ * Get CSS custom properties (variables) for a styles configuration
100
+ *
101
+ * @param config - Styles configuration
102
+ * @param componentName - Component name
103
+ * @returns Object with CSS custom properties
104
+ */
105
+ static getCSSVariables(config: StylesConfig, componentName: string): Record<string, string>;
106
+ }
107
+ //# sourceMappingURL=styles-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-parser.d.ts","sourceRoot":"","sources":["../../../src/core/styles-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAAa,YAAY;IAEvB,OAAO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@
1
+ /**
2
+ * StylesParser Example - Demonstrates styles attribute parsing and CSS generation
3
+ *
4
+ * This example shows how the StylesParser processes the `styles` attribute
5
+ * on components and generates appropriate CSS classes.
6
+ */
7
+ import { StylesParser } from './styles-parser';
8
+ export { StylesParser };
9
+ export type { StylesConfig } from '../types/index';
10
+ //# sourceMappingURL=styles-parser.example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-parser.example.d.ts","sourceRoot":"","sources":["../../../src/core/styles-parser.example.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA+I/C,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * ThemeSystem - Centralized theme management for Kenikool UI
3
+ *
4
+ * Provides:
5
+ * - Theme registration and switching
6
+ * - CSS variable injection
7
+ * - Theme inheritance across DOM hierarchy
8
+ * - Observer pattern for theme changes
9
+ * - Component notification system
10
+ */
11
+ import type { ThemeConfiguration } from '../types/theme-config.js';
12
+ interface ThemeChangeEvent {
13
+ themeName: string;
14
+ previousTheme: string;
15
+ container: Element;
16
+ }
17
+ interface ThemeRegisteredEvent {
18
+ themeName: string;
19
+ }
20
+ interface ThemeObserver {
21
+ themeChanged?: (event: ThemeChangeEvent) => void;
22
+ themeRegistered?: (event: ThemeRegisteredEvent) => void;
23
+ }
24
+ /**
25
+ * ThemeSystem class - Manages all theme-related operations
26
+ */
27
+ export declare class ThemeSystem {
28
+ private static themes;
29
+ private static currentTheme;
30
+ private static initialized;
31
+ private static observers;
32
+ private static mutationObserver;
33
+ /**
34
+ * Initialize the theme system with built-in themes
35
+ */
36
+ static initialize(): void;
37
+ /**
38
+ * Register a new theme
39
+ */
40
+ static registerTheme(theme: ThemeConfiguration): void;
41
+ /**
42
+ * Get a registered theme by name
43
+ */
44
+ static getTheme(themeName: string): ThemeConfiguration | undefined;
45
+ /**
46
+ * Get all available theme names
47
+ */
48
+ static getAvailableThemes(): string[];
49
+ /**
50
+ * Get the current theme name
51
+ */
52
+ static getCurrentTheme(): string;
53
+ /**
54
+ * Set the active theme
55
+ */
56
+ static setTheme(themeName: string, container?: Element): void;
57
+ /**
58
+ * Get theme variables as CSS custom properties
59
+ */
60
+ static getThemeVariables(themeName: string): Record<string, string>;
61
+ /**
62
+ * Get the inherited theme from parent elements
63
+ */
64
+ static getInheritedTheme(element: Element): string;
65
+ /**
66
+ * Add an observer for theme changes
67
+ */
68
+ static addObserver(observer: ThemeObserver): void;
69
+ /**
70
+ * Remove an observer
71
+ */
72
+ static removeObserver(observer: ThemeObserver): void;
73
+ /**
74
+ * Cleanup theme system
75
+ */
76
+ static cleanup(): void;
77
+ /**
78
+ * Inject CSS for a theme
79
+ */
80
+ private static injectThemeCSS;
81
+ /**
82
+ * Apply CSS variables to a container
83
+ */
84
+ private static applyCSSVariables;
85
+ /**
86
+ * Notify components of theme change
87
+ */
88
+ private static notifyComponents;
89
+ }
90
+ export {};
91
+ //# sourceMappingURL=theme-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-system.d.ts","sourceRoot":"","sources":["../../../src/core/theme-system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AASnE,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,aAAa;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACjD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,qBAA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from './core/base-component';
2
+ export { ComponentRegistry } from './core/registry';
3
+ export { ThemeSystem } from './core/theme-system';
4
+ export { StylesParser } from './core/styles-parser';
5
+ export { SmartDefaults } from './core/smart-defaults';
6
+ export { AccessibilityUtils, AriaManager, FocusManager, FocusTrapImpl as FocusTrap, KeyboardNavigation, ScreenReaderAnnouncer, } from './utils/accessibility';
7
+ export { ValidationUtils } from './utils/validation';
8
+ export { securityManager, sanitizeHTML, sanitizeAttribute, validateFormInput, applySecureDefaults, } from './utils/security';
9
+ export { IconSystem, getIcon, hasIcon, sanitizeIconName, validateIconName, getAvailableIcons, registerIcon, registerIcons, unregisterIcon, getIconWithFallback, createIconElement, } from './utils/icon-system';
10
+ export { PerformanceManager, performanceManager, debounce, throttle, batchUpdates, measurePerformance, requestAnimationFrameSafe, cancelAnimationFrameSafe, VirtualScroller, } from './utils/performance';
11
+ export type * from './types';
12
+ export * from './components/layout/index';
13
+ export * from './components/forms/index';
14
+ export * from './components/typography/index';
15
+ export * from './components/feedback/index';
16
+ export * from './components/navigation/index';
17
+ export * from './components/data/index';
18
+ export * from './components/advanced/index';
19
+ export * as ReactWrappers from './wrappers/react';
20
+ export * as VueWrappers from './wrappers/vue';
21
+ export * as AngularWrappers from './wrappers/angular';
22
+ export declare const VERSION = "1.0.0";
23
+ export declare const LIBRARY_NAME = "Kenikool UI";
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,aAAa,IAAI,SAAS,EAC1B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAG7B,mBAAmB,SAAS,CAAC;AAG7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAG5C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AAGtD,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,YAAY,gBAAgB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Built-in themes for Kenikool UI
3
+ *
4
+ * This file contains the five default themes that come with the library:
5
+ * - modern (default)
6
+ * - classic
7
+ * - bold
8
+ * - soft
9
+ * - dark
10
+ */
11
+ import type { ThemeConfiguration } from '../types/theme-config.js';
12
+ /**
13
+ * Modern Theme - Clean, contemporary design with balanced colors (default)
14
+ */
15
+ export declare const modernTheme: ThemeConfiguration;
16
+ /**
17
+ * Classic Theme - Traditional design with warm, earthy tones
18
+ */
19
+ export declare const classicTheme: ThemeConfiguration;
20
+ /**
21
+ * Bold Theme - High contrast with vibrant colors and strong visual impact
22
+ */
23
+ export declare const boldTheme: ThemeConfiguration;
24
+ /**
25
+ * Soft Theme - Muted, gentle colors with a calming aesthetic
26
+ */
27
+ export declare const softTheme: ThemeConfiguration;
28
+ /**
29
+ * Dark Theme - Dark backgrounds with light text for low-light environments
30
+ */
31
+ export declare const darkTheme: ThemeConfiguration;
32
+ //# sourceMappingURL=built-in-themes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"built-in-themes.d.ts","sourceRoot":"","sources":["../../../src/themes/built-in-themes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,kBAmRzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,kBAmR1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,kBAoRvB,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,kBAmRvB,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,kBAoRvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Theme exports for Kenikool UI
3
+ */
4
+ export { modernTheme, classicTheme, boldTheme, softTheme, darkTheme, } from './built-in-themes.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,SAAS,EACT,SAAS,GACV,MAAM,sBAAsB,CAAC"}