@ktbsh/ui 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.
Files changed (153) hide show
  1. package/README.md +165 -0
  2. package/dist/custom-elements.json +1427 -0
  3. package/dist/index.d.ts +13 -0
  4. package/dist/index.js +12 -0
  5. package/dist/react/alert.d.ts +20 -0
  6. package/dist/react/alert.js +30 -0
  7. package/dist/react/badge.d.ts +17 -0
  8. package/dist/react/badge.js +30 -0
  9. package/dist/react/box.d.ts +22 -0
  10. package/dist/react/box.js +30 -0
  11. package/dist/react/breadcrumb.d.ts +17 -0
  12. package/dist/react/breadcrumb.js +30 -0
  13. package/dist/react/button.d.ts +20 -0
  14. package/dist/react/button.js +30 -0
  15. package/dist/react/checkbox.d.ts +22 -0
  16. package/dist/react/checkbox.js +30 -0
  17. package/dist/react/container.d.ts +18 -0
  18. package/dist/react/container.js +30 -0
  19. package/dist/react/field.d.ts +20 -0
  20. package/dist/react/field.js +30 -0
  21. package/dist/react/heading.d.ts +19 -0
  22. package/dist/react/heading.js +30 -0
  23. package/dist/react/input.d.ts +25 -0
  24. package/dist/react/input.js +30 -0
  25. package/dist/react/label.d.ts +18 -0
  26. package/dist/react/label.js +30 -0
  27. package/dist/react/link.d.ts +21 -0
  28. package/dist/react/link.js +30 -0
  29. package/dist/react/modal.d.ts +18 -0
  30. package/dist/react/modal.js +30 -0
  31. package/dist/react/nav.d.ts +17 -0
  32. package/dist/react/nav.js +30 -0
  33. package/dist/react/pagination.d.ts +19 -0
  34. package/dist/react/pagination.js +30 -0
  35. package/dist/react/progress.d.ts +19 -0
  36. package/dist/react/progress.js +30 -0
  37. package/dist/react/radio.d.ts +22 -0
  38. package/dist/react/radio.js +30 -0
  39. package/dist/react/select.d.ts +22 -0
  40. package/dist/react/select.js +30 -0
  41. package/dist/react/skeleton.d.ts +19 -0
  42. package/dist/react/skeleton.js +30 -0
  43. package/dist/react/spinner.d.ts +18 -0
  44. package/dist/react/spinner.js +30 -0
  45. package/dist/react/stack.d.ts +21 -0
  46. package/dist/react/stack.js +30 -0
  47. package/dist/react/switch.d.ts +21 -0
  48. package/dist/react/switch.js +30 -0
  49. package/dist/react/tab-panel.d.ts +18 -0
  50. package/dist/react/tab-panel.js +30 -0
  51. package/dist/react/tab.d.ts +19 -0
  52. package/dist/react/tab.js +30 -0
  53. package/dist/react/tabs.d.ts +17 -0
  54. package/dist/react/tabs.js +30 -0
  55. package/dist/react/text.d.ts +19 -0
  56. package/dist/react/text.js +30 -0
  57. package/dist/react/textarea.d.ts +24 -0
  58. package/dist/react/textarea.js +30 -0
  59. package/dist/react/toast.d.ts +19 -0
  60. package/dist/react/toast.js +30 -0
  61. package/dist/themes/dark.css +52 -0
  62. package/dist/themes/light.css +53 -0
  63. package/dist/tokens/index.d.ts +7 -0
  64. package/dist/tokens/index.js +7 -0
  65. package/dist/tokens/semantic.d.ts +209 -0
  66. package/dist/tokens/semantic.js +102 -0
  67. package/dist/types/index.d.ts +15 -0
  68. package/dist/types/index.js +2 -0
  69. package/dist/vanilla/alert.d.ts +2 -0
  70. package/dist/vanilla/alert.js +134 -0
  71. package/dist/vanilla/alert.src.js +257 -0
  72. package/dist/vanilla/badge.d.ts +2 -0
  73. package/dist/vanilla/badge.js +89 -0
  74. package/dist/vanilla/badge.src.js +212 -0
  75. package/dist/vanilla/box.d.ts +2 -0
  76. package/dist/vanilla/box.js +100 -0
  77. package/dist/vanilla/box.src.js +270 -0
  78. package/dist/vanilla/breadcrumb.d.ts +2 -0
  79. package/dist/vanilla/breadcrumb.js +93 -0
  80. package/dist/vanilla/breadcrumb.src.js +255 -0
  81. package/dist/vanilla/button.d.ts +2 -0
  82. package/dist/vanilla/button.js +135 -0
  83. package/dist/vanilla/button.src.js +260 -0
  84. package/dist/vanilla/checkbox.d.ts +2 -0
  85. package/dist/vanilla/checkbox.js +96 -0
  86. package/dist/vanilla/checkbox.src.js +296 -0
  87. package/dist/vanilla/container.d.ts +2 -0
  88. package/dist/vanilla/container.js +79 -0
  89. package/dist/vanilla/container.src.js +222 -0
  90. package/dist/vanilla/field.d.ts +2 -0
  91. package/dist/vanilla/field.js +113 -0
  92. package/dist/vanilla/field.src.js +278 -0
  93. package/dist/vanilla/heading.d.ts +2 -0
  94. package/dist/vanilla/heading.js +75 -0
  95. package/dist/vanilla/heading.src.js +241 -0
  96. package/dist/vanilla/input.d.ts +2 -0
  97. package/dist/vanilla/input.js +121 -0
  98. package/dist/vanilla/input.src.js +326 -0
  99. package/dist/vanilla/label.d.ts +2 -0
  100. package/dist/vanilla/label.js +75 -0
  101. package/dist/vanilla/label.src.js +232 -0
  102. package/dist/vanilla/link.d.ts +2 -0
  103. package/dist/vanilla/link.js +96 -0
  104. package/dist/vanilla/link.src.js +272 -0
  105. package/dist/vanilla/modal.d.ts +2 -0
  106. package/dist/vanilla/modal.js +125 -0
  107. package/dist/vanilla/modal.src.js +251 -0
  108. package/dist/vanilla/nav.d.ts +2 -0
  109. package/dist/vanilla/nav.js +94 -0
  110. package/dist/vanilla/nav.src.js +214 -0
  111. package/dist/vanilla/pagination.d.ts +2 -0
  112. package/dist/vanilla/pagination.js +114 -0
  113. package/dist/vanilla/pagination.src.js +262 -0
  114. package/dist/vanilla/progress.d.ts +2 -0
  115. package/dist/vanilla/progress.js +108 -0
  116. package/dist/vanilla/progress.src.js +244 -0
  117. package/dist/vanilla/radio.d.ts +2 -0
  118. package/dist/vanilla/radio.js +104 -0
  119. package/dist/vanilla/radio.src.js +326 -0
  120. package/dist/vanilla/select.d.ts +2 -0
  121. package/dist/vanilla/select.js +104 -0
  122. package/dist/vanilla/select.src.js +332 -0
  123. package/dist/vanilla/skeleton.d.ts +2 -0
  124. package/dist/vanilla/skeleton.js +99 -0
  125. package/dist/vanilla/skeleton.src.js +240 -0
  126. package/dist/vanilla/spinner.d.ts +2 -0
  127. package/dist/vanilla/spinner.js +108 -0
  128. package/dist/vanilla/spinner.src.js +222 -0
  129. package/dist/vanilla/stack.d.ts +2 -0
  130. package/dist/vanilla/stack.js +83 -0
  131. package/dist/vanilla/stack.src.js +259 -0
  132. package/dist/vanilla/switch.d.ts +2 -0
  133. package/dist/vanilla/switch.js +166 -0
  134. package/dist/vanilla/switch.src.js +299 -0
  135. package/dist/vanilla/tab-panel.d.ts +2 -0
  136. package/dist/vanilla/tab-panel.js +80 -0
  137. package/dist/vanilla/tab-panel.src.js +227 -0
  138. package/dist/vanilla/tab.d.ts +2 -0
  139. package/dist/vanilla/tab.js +99 -0
  140. package/dist/vanilla/tab.src.js +253 -0
  141. package/dist/vanilla/tabs.d.ts +2 -0
  142. package/dist/vanilla/tabs.js +66 -0
  143. package/dist/vanilla/tabs.src.js +237 -0
  144. package/dist/vanilla/text.d.ts +2 -0
  145. package/dist/vanilla/text.js +74 -0
  146. package/dist/vanilla/text.src.js +232 -0
  147. package/dist/vanilla/textarea.d.ts +2 -0
  148. package/dist/vanilla/textarea.js +97 -0
  149. package/dist/vanilla/textarea.src.js +316 -0
  150. package/dist/vanilla/toast.d.ts +2 -0
  151. package/dist/vanilla/toast.js +120 -0
  152. package/dist/vanilla/toast.src.js +245 -0
  153. package/package.json +111 -0
@@ -0,0 +1,18 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashModalProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'open'?: boolean;
6
+ 'title'?: string;
7
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
8
+ }
9
+
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ 'kitbash-modal': KitbashModalProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+
18
+ export declare const KitbashModal: React.ForwardRefExoticComponent<KitbashModalProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/modal.js';
4
+
5
+ export const KitbashModal = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-modal', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,17 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashNavProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'label'?: string;
6
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
7
+ }
8
+
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ 'kitbash-nav': KitbashNavProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
13
+ }
14
+ }
15
+ }
16
+
17
+ export declare const KitbashNav: React.ForwardRefExoticComponent<KitbashNavProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/nav.js';
4
+
5
+ export const KitbashNav = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-nav', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,19 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashPaginationProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'page'?: number;
6
+ 'total'?: number;
7
+ 'label'?: string;
8
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
9
+ }
10
+
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ 'kitbash-pagination': KitbashPaginationProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
15
+ }
16
+ }
17
+ }
18
+
19
+ export declare const KitbashPagination: React.ForwardRefExoticComponent<KitbashPaginationProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/pagination.js';
4
+
5
+ export const KitbashPagination = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-pagination', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,19 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashProgressProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'value'?: number;
6
+ 'max'?: number;
7
+ 'label'?: string;
8
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
9
+ }
10
+
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ 'kitbash-progress': KitbashProgressProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
15
+ }
16
+ }
17
+ }
18
+
19
+ export declare const KitbashProgress: React.ForwardRefExoticComponent<KitbashProgressProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/progress.js';
4
+
5
+ export const KitbashProgress = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-progress', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,22 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashRadioProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'name'?: string;
6
+ 'value'?: string;
7
+ 'checked'?: boolean;
8
+ 'disabled'?: boolean;
9
+ 'required'?: boolean;
10
+ 'invalid'?: boolean;
11
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
12
+ }
13
+
14
+ declare global {
15
+ namespace JSX {
16
+ interface IntrinsicElements {
17
+ 'kitbash-radio': KitbashRadioProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
18
+ }
19
+ }
20
+ }
21
+
22
+ export declare const KitbashRadio: React.ForwardRefExoticComponent<KitbashRadioProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/radio.js';
4
+
5
+ export const KitbashRadio = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-radio', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,22 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashSelectProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'name'?: string;
6
+ 'value'?: string;
7
+ 'disabled'?: boolean;
8
+ 'required'?: boolean;
9
+ 'invalid'?: boolean;
10
+ 'size'?: string;
11
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
12
+ }
13
+
14
+ declare global {
15
+ namespace JSX {
16
+ interface IntrinsicElements {
17
+ 'kitbash-select': KitbashSelectProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
18
+ }
19
+ }
20
+ }
21
+
22
+ export declare const KitbashSelect: React.ForwardRefExoticComponent<KitbashSelectProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/select.js';
4
+
5
+ export const KitbashSelect = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-select', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,19 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashSkeletonProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'variant'?: string;
6
+ 'width'?: string;
7
+ 'height'?: string;
8
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
9
+ }
10
+
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ 'kitbash-skeleton': KitbashSkeletonProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
15
+ }
16
+ }
17
+ }
18
+
19
+ export declare const KitbashSkeleton: React.ForwardRefExoticComponent<KitbashSkeletonProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/skeleton.js';
4
+
5
+ export const KitbashSkeleton = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-skeleton', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,18 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashSpinnerProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'size'?: string;
6
+ 'label'?: string;
7
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
8
+ }
9
+
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ 'kitbash-spinner': KitbashSpinnerProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+
18
+ export declare const KitbashSpinner: React.ForwardRefExoticComponent<KitbashSpinnerProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/spinner.js';
4
+
5
+ export const KitbashSpinner = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-spinner', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,21 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashStackProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'direction'?: string;
6
+ 'gap'?: string;
7
+ 'align'?: string;
8
+ 'justify'?: string;
9
+ 'wrap'?: boolean;
10
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
11
+ }
12
+
13
+ declare global {
14
+ namespace JSX {
15
+ interface IntrinsicElements {
16
+ 'kitbash-stack': KitbashStackProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
17
+ }
18
+ }
19
+ }
20
+
21
+ export declare const KitbashStack: React.ForwardRefExoticComponent<KitbashStackProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/stack.js';
4
+
5
+ export const KitbashStack = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-stack', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,21 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashSwitchProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'name'?: string;
6
+ 'value'?: string;
7
+ 'checked'?: boolean;
8
+ 'disabled'?: boolean;
9
+ 'invalid'?: boolean;
10
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
11
+ }
12
+
13
+ declare global {
14
+ namespace JSX {
15
+ interface IntrinsicElements {
16
+ 'kitbash-switch': KitbashSwitchProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
17
+ }
18
+ }
19
+ }
20
+
21
+ export declare const KitbashSwitch: React.ForwardRefExoticComponent<KitbashSwitchProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/switch.js';
4
+
5
+ export const KitbashSwitch = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-switch', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,18 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashTabPanelProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'value'?: string;
6
+ 'open'?: boolean;
7
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
8
+ }
9
+
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ 'kitbash-tab-panel': KitbashTabPanelProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+
18
+ export declare const KitbashTabPanel: React.ForwardRefExoticComponent<KitbashTabPanelProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/tab-panel.js';
4
+
5
+ export const KitbashTabPanel = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-tab-panel', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,19 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashTabProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'value'?: string;
6
+ 'selected'?: boolean;
7
+ 'disabled'?: boolean;
8
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
9
+ }
10
+
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ 'kitbash-tab': KitbashTabProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
15
+ }
16
+ }
17
+ }
18
+
19
+ export declare const KitbashTab: React.ForwardRefExoticComponent<KitbashTabProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,30 @@
1
+
2
+ import * as React from 'react';
3
+ import '../vanilla/tab.js';
4
+
5
+ export const KitbashTab = React.forwardRef(({ children, onKitbashChange, ...props }, ref) => {
6
+ const innerRef = React.useRef(null);
7
+
8
+ // kitbash-change is a CustomEvent — bridge manually. Native events (onClick, etc.)
9
+ // stay on ...props so React 19 binds them once (no double-fire).
10
+ React.useEffect(() => {
11
+ const el = innerRef.current;
12
+ if (!el || !onKitbashChange) return;
13
+
14
+ const handleCustomChange = (e) => onKitbashChange(e);
15
+ el.addEventListener('kitbash-change', handleCustomChange);
16
+ return () => el.removeEventListener('kitbash-change', handleCustomChange);
17
+ }, [onKitbashChange]);
18
+
19
+ // Callback ref: assign + clear on unmount / ref change (object + function refs).
20
+ const setRefs = React.useCallback((node) => {
21
+ innerRef.current = node;
22
+ if (typeof ref === 'function') {
23
+ ref(node);
24
+ } else if (ref && typeof ref === 'object') {
25
+ ref.current = node;
26
+ }
27
+ }, [ref]);
28
+
29
+ return React.createElement('kitbash-tab', { ref: setRefs, ...props }, children);
30
+ });
@@ -0,0 +1,17 @@
1
+
2
+ import * as React from 'react';
3
+
4
+ export interface KitbashTabsProps extends React.HTMLAttributes<HTMLElement> {
5
+ 'label'?: string;
6
+ onKitbashChange?: (event: CustomEvent<{ props: Record<string, unknown>; state: Record<string, unknown> }>) => void;
7
+ }
8
+
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ 'kitbash-tabs': KitbashTabsProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
13
+ }
14
+ }
15
+ }
16
+
17
+ export declare const KitbashTabs: React.ForwardRefExoticComponent<KitbashTabsProps & React.RefAttributes<HTMLElement>>;