@kushagradhawan/kookie-ui 0.1.57 → 0.1.59

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/components.css +33 -33
  2. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  4. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  5. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  6. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  7. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  8. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  9. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  10. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  11. package/dist/cjs/components/chatbar.js.map +2 -2
  12. package/dist/cjs/components/icons.d.ts +1 -1
  13. package/dist/cjs/components/icons.d.ts.map +1 -1
  14. package/dist/cjs/components/icons.js.map +2 -2
  15. package/dist/cjs/components/schemas/shell.schema.d.ts +2 -2
  16. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  17. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  18. package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
  19. package/dist/cjs/components/shell.d.ts.map +1 -1
  20. package/dist/cjs/components/shell.js +1 -1
  21. package/dist/cjs/components/shell.js.map +3 -3
  22. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  23. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  24. package/dist/esm/components/_internal/shell-bottom.js.map +3 -3
  25. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  26. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  27. package/dist/esm/components/_internal/shell-inspector.js.map +3 -3
  28. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  29. package/dist/esm/components/_internal/shell-sidebar.js.map +3 -3
  30. package/dist/esm/components/chatbar.d.ts.map +1 -1
  31. package/dist/esm/components/chatbar.js.map +2 -2
  32. package/dist/esm/components/icons.d.ts +1 -1
  33. package/dist/esm/components/icons.d.ts.map +1 -1
  34. package/dist/esm/components/icons.js.map +2 -2
  35. package/dist/esm/components/schemas/shell.schema.d.ts +2 -2
  36. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  37. package/dist/esm/components/schemas/shell.schema.js.map +3 -3
  38. package/dist/esm/components/shell.d.ts.map +1 -1
  39. package/dist/esm/components/shell.js +1 -1
  40. package/dist/esm/components/shell.js.map +3 -3
  41. package/package.json +1 -1
  42. package/schemas/base-button.json +1 -1
  43. package/schemas/button.json +1 -1
  44. package/schemas/icon-button.json +1 -1
  45. package/schemas/index.json +6 -6
  46. package/schemas/toggle-button.json +1 -1
  47. package/schemas/toggle-icon-button.json +1 -1
  48. package/src/components/_internal/shell-bottom.tsx +14 -13
  49. package/src/components/_internal/shell-inspector.tsx +13 -11
  50. package/src/components/_internal/shell-sidebar.tsx +12 -12
  51. package/src/components/callout.css +5 -5
  52. package/src/components/chatbar.css +3 -3
  53. package/src/components/chatbar.tsx +0 -1
  54. package/src/components/icons.tsx +19 -87
  55. package/src/components/schemas/shell.schema.ts +10 -33
  56. package/src/components/shell.tsx +32 -24
  57. package/styles.css +33 -33
@@ -3,7 +3,7 @@
3
3
  "title": "Kookie UI Button Components",
4
4
  "description": "Complete JSON Schema collection for all button components in Kookie UI",
5
5
  "version": "1.0.0",
6
- "generatedAt": "2025-10-08T07:00:40.012Z",
6
+ "generatedAt": "2025-11-11T07:34:25.392Z",
7
7
  "source": "Zod schemas",
8
8
  "components": {
9
9
  "base-button": {
@@ -287,7 +287,7 @@
287
287
  "title": "Base-button Component Props",
288
288
  "description": "Props schema for the base-button component in Kookie UI",
289
289
  "version": "1.0.0",
290
- "generatedAt": "2025-10-08T07:00:40.002Z",
290
+ "generatedAt": "2025-11-11T07:34:25.381Z",
291
291
  "source": "Zod schema"
292
292
  },
293
293
  "button": {
@@ -822,7 +822,7 @@
822
822
  "title": "Button Component Props",
823
823
  "description": "Props schema for the button component in Kookie UI",
824
824
  "version": "1.0.0",
825
- "generatedAt": "2025-10-08T07:00:40.007Z",
825
+ "generatedAt": "2025-11-11T07:34:25.387Z",
826
826
  "source": "Zod schema"
827
827
  },
828
828
  "icon-button": {
@@ -1140,7 +1140,7 @@
1140
1140
  "title": "Icon-button Component Props",
1141
1141
  "description": "Props schema for the icon-button component in Kookie UI",
1142
1142
  "version": "1.0.0",
1143
- "generatedAt": "2025-10-08T07:00:40.009Z",
1143
+ "generatedAt": "2025-11-11T07:34:25.389Z",
1144
1144
  "source": "Zod schema"
1145
1145
  },
1146
1146
  "toggle-button": {
@@ -1683,7 +1683,7 @@
1683
1683
  "title": "Toggle-button Component Props",
1684
1684
  "description": "Props schema for the toggle-button component in Kookie UI",
1685
1685
  "version": "1.0.0",
1686
- "generatedAt": "2025-10-08T07:00:40.011Z",
1686
+ "generatedAt": "2025-11-11T07:34:25.390Z",
1687
1687
  "source": "Zod schema"
1688
1688
  },
1689
1689
  "toggle-icon-button": {
@@ -2009,7 +2009,7 @@
2009
2009
  "title": "Toggle-icon-button Component Props",
2010
2010
  "description": "Props schema for the toggle-icon-button component in Kookie UI",
2011
2011
  "version": "1.0.0",
2012
- "generatedAt": "2025-10-08T07:00:40.012Z",
2012
+ "generatedAt": "2025-11-11T07:34:25.391Z",
2013
2013
  "source": "Zod schema"
2014
2014
  }
2015
2015
  }
@@ -538,6 +538,6 @@
538
538
  "title": "Toggle-button Component Props",
539
539
  "description": "Props schema for the toggle-button component in Kookie UI",
540
540
  "version": "1.0.0",
541
- "generatedAt": "2025-10-08T07:00:40.011Z",
541
+ "generatedAt": "2025-11-11T07:34:25.390Z",
542
542
  "source": "Zod schema"
543
543
  }
@@ -321,6 +321,6 @@
321
321
  "title": "Toggle-icon-button Component Props",
322
322
  "description": "Props schema for the toggle-icon-button component in Kookie UI",
323
323
  "version": "1.0.0",
324
- "generatedAt": "2025-10-08T07:00:40.012Z",
324
+ "generatedAt": "2025-11-11T07:34:25.391Z",
325
325
  "source": "Zod schema"
326
326
  }
@@ -95,10 +95,13 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
95
95
  const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === BottomHandle));
96
96
 
97
97
  // Throttled/debounced emitter for onSizeChange
98
+ const onSizeChange = (props as any).onSizeChange;
99
+ const sizeUpdate = (props as any).sizeUpdate;
100
+ const sizeUpdateMs = (props as any).sizeUpdateMs;
98
101
  const emitSizeChange = React.useMemo(() => {
99
- const cb = (props as any).onSizeChange as undefined | ((s: number, meta: BottomSizeChangeMeta) => void);
100
- const strategy = (props as any).sizeUpdate as undefined | 'throttle' | 'debounce';
101
- const ms = (props as any).sizeUpdateMs ?? 50;
102
+ const cb = onSizeChange as undefined | ((s: number, meta: BottomSizeChangeMeta) => void);
103
+ const strategy = sizeUpdate as undefined | 'throttle' | 'debounce';
104
+ const ms = sizeUpdateMs ?? 50;
102
105
  if (!cb) return () => {};
103
106
  if (strategy === 'debounce') {
104
107
  let t: any = null;
@@ -120,7 +123,7 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
120
123
  };
121
124
  }
122
125
  return (s: number, meta: BottomSizeChangeMeta) => cb(s, meta);
123
- }, [(props as any).onSizeChange, (props as any).sizeUpdate, (props as any).sizeUpdateMs]);
126
+ }, [onSizeChange, sizeUpdate, sizeUpdateMs]);
124
127
 
125
128
  const didInitRef = React.useRef(false);
126
129
  const didInitFromDefaultOpenRef = React.useRef(false);
@@ -134,17 +137,15 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
134
137
  shell.setBottomMode(initial ? 'expanded' : 'collapsed');
135
138
  didInitFromDefaultOpenRef.current = true;
136
139
  }
137
- }, [shell.currentBreakpointReady, open, defaultOpen, resolvedDefaultOpen]);
140
+ }, [shell, open, defaultOpen, resolvedDefaultOpen]);
138
141
 
139
142
  // Dev guards
140
143
  const wasControlledRef = React.useRef<boolean | null>(null);
141
144
  if (process.env.NODE_ENV !== 'production') {
142
145
  if (typeof open !== 'undefined' && typeof defaultOpen !== 'undefined') {
143
- // eslint-disable-next-line no-console
144
146
  console.error('Shell.Bottom: Do not pass both `open` and `defaultOpen`. Choose one.');
145
147
  }
146
148
  if (typeof (props as any).size !== 'undefined' && typeof (props as any).defaultSize !== 'undefined') {
147
- // eslint-disable-next-line no-console
148
149
  console.error('Shell.Bottom: Do not pass both `size` and `defaultSize`. Choose one.');
149
150
  }
150
151
  }
@@ -156,7 +157,6 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
156
157
  return;
157
158
  }
158
159
  if (wasControlledRef.current !== isControlled) {
159
- // eslint-disable-next-line no-console
160
160
  console.warn('Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported.');
161
161
  wasControlledRef.current = isControlled;
162
162
  }
@@ -166,7 +166,7 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
166
166
  React.useEffect(() => {
167
167
  if (typeof open === 'undefined') return;
168
168
  shell.setBottomMode(open ? 'expanded' : 'collapsed');
169
- }, [open]);
169
+ }, [shell, open]);
170
170
 
171
171
  const responsiveNotifiedRef = React.useRef(false);
172
172
 
@@ -176,7 +176,7 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
176
176
  if (typeof resolvedOpen === 'undefined') return;
177
177
  const shouldExpand = Boolean(resolvedOpen);
178
178
  shell.setBottomMode(shouldExpand ? 'expanded' : 'collapsed');
179
- }, [resolvedOpen]);
179
+ }, [shell, resolvedOpen]);
180
180
 
181
181
  const initNotifiedRef = React.useRef(false);
182
182
  const lastBottomModeRef = React.useRef<PaneMode | null>(null);
@@ -323,10 +323,11 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
323
323
  }, []);
324
324
 
325
325
  // Controlled size sync (moved above overlay return)
326
+ const controlledSize = (props as any).size;
326
327
  React.useEffect(() => {
327
328
  if (!localRef.current) return;
328
- if (typeof (props as any).size === 'undefined') return;
329
- const px = normalizeToPx((props as any).size);
329
+ if (typeof controlledSize === 'undefined') return;
330
+ const px = normalizeToPx(controlledSize);
330
331
  if (typeof px === 'number' && Number.isFinite(px)) {
331
332
  const minPx = typeof minSize === 'number' ? minSize : undefined;
332
333
  const maxPx = typeof maxSize === 'number' ? maxSize : undefined;
@@ -334,7 +335,7 @@ export const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(
334
335
  localRef.current.style.setProperty('--bottom-size', `${clamped}px`);
335
336
  emitSizeChange(clamped, { reason: 'controlled' });
336
337
  }
337
- }, [(props as any).size, minSize, maxSize, normalizeToPx, emitSizeChange]);
338
+ }, [controlledSize, minSize, maxSize, normalizeToPx, emitSizeChange]);
338
339
 
339
340
  if (isOverlay) {
340
341
  const open = shell.bottomMode === 'expanded';
@@ -92,10 +92,13 @@ export const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>(
92
92
  const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === InspectorHandle));
93
93
 
94
94
  // Throttled/debounced emitter for onSizeChange
95
+ const onSizeChange = (props as any).onSizeChange;
96
+ const sizeUpdate = (props as any).sizeUpdate;
97
+ const sizeUpdateMs = (props as any).sizeUpdateMs;
95
98
  const emitSizeChange = React.useMemo(() => {
96
- const cb = (props as any).onSizeChange as undefined | ((s: number, meta: InspectorSizeChangeMeta) => void);
97
- const strategy = (props as any).sizeUpdate as undefined | 'throttle' | 'debounce';
98
- const ms = (props as any).sizeUpdateMs ?? 50;
99
+ const cb = onSizeChange as undefined | ((s: number, meta: InspectorSizeChangeMeta) => void);
100
+ const strategy = sizeUpdate as undefined | 'throttle' | 'debounce';
101
+ const ms = sizeUpdateMs ?? 50;
99
102
  if (!cb) return () => {};
100
103
  if (strategy === 'debounce') {
101
104
  let t: any = null;
@@ -117,13 +120,12 @@ export const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>(
117
120
  };
118
121
  }
119
122
  return (s: number, meta: InspectorSizeChangeMeta) => cb(s, meta);
120
- }, [(props as any).onSizeChange, (props as any).sizeUpdate, (props as any).sizeUpdateMs]);
123
+ }, [onSizeChange, sizeUpdate, sizeUpdateMs]);
121
124
 
122
125
  // Dev guards
123
126
  const wasControlledRef = React.useRef<boolean | null>(null);
124
127
  if (process.env.NODE_ENV !== 'production') {
125
128
  if (typeof open !== 'undefined' && typeof defaultOpen !== 'undefined') {
126
- // eslint-disable-next-line no-console
127
129
  console.error('Shell.Inspector: Do not pass both `open` and `defaultOpen`. Choose one.');
128
130
  }
129
131
  }
@@ -136,7 +138,6 @@ export const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>(
136
138
  return;
137
139
  }
138
140
  if (wasControlledRef.current !== isControlled) {
139
- // eslint-disable-next-line no-console
140
141
  console.warn('Shell.Inspector: Switching between controlled and uncontrolled `open` is not supported.');
141
142
  wasControlledRef.current = isControlled;
142
143
  }
@@ -154,7 +155,7 @@ export const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>(
154
155
  shell.setInspectorMode(initialOpen ? 'expanded' : 'collapsed');
155
156
  if (initialOpen) onOpenChange?.(true, { reason: 'init' });
156
157
  didInitFromDefaultOpenRef.current = true;
157
- }, [shell.currentBreakpointReady, resolvedDefaultOpen, defaultOpen, open, onOpenChange]);
158
+ }, [shell, resolvedDefaultOpen, defaultOpen, open, onOpenChange]);
158
159
 
159
160
  // Controlled responsive open
160
161
  const resolvedOpen = useResponsiveValue(open);
@@ -163,7 +164,7 @@ export const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>(
163
164
  const shouldExpand = Boolean(resolvedOpen);
164
165
  if (shouldExpand && shell.inspectorMode !== 'expanded') shell.setInspectorMode('expanded');
165
166
  if (!shouldExpand && shell.inspectorMode !== 'collapsed') shell.setInspectorMode('collapsed');
166
- }, [resolvedOpen, shell.inspectorMode]);
167
+ }, [shell, resolvedOpen]);
167
168
 
168
169
  // Removed boolean-only mount init; handled in responsive init effect above
169
170
 
@@ -305,10 +306,11 @@ export const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>(
305
306
  }, []);
306
307
 
307
308
  // Controlled size sync
309
+ const controlledSize = (props as any).size;
308
310
  React.useEffect(() => {
309
311
  if (!localRef.current) return;
310
- if (typeof (props as any).size === 'undefined') return;
311
- const px = normalizeToPx((props as any).size);
312
+ if (typeof controlledSize === 'undefined') return;
313
+ const px = normalizeToPx(controlledSize);
312
314
  if (typeof px === 'number' && Number.isFinite(px)) {
313
315
  const minPx = typeof minSize === 'number' ? minSize : undefined;
314
316
  const maxPx = typeof maxSize === 'number' ? maxSize : undefined;
@@ -316,7 +318,7 @@ export const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>(
316
318
  localRef.current.style.setProperty('--inspector-size', `${clamped}px`);
317
319
  emitSizeChange(clamped, { reason: 'controlled' });
318
320
  }
319
- }, [(props as any).size, minSize, maxSize, normalizeToPx, emitSizeChange]);
321
+ }, [controlledSize, minSize, maxSize, normalizeToPx, emitSizeChange]);
320
322
 
321
323
  if (isOverlay) {
322
324
  const open = shell.inspectorMode === 'expanded';
@@ -101,10 +101,13 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>(
101
101
  const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === SidebarHandle));
102
102
 
103
103
  // Throttled/debounced emitter for onSizeChange
104
+ const onSizeChange = (props as any).onSizeChange;
105
+ const sizeUpdate = (props as any).sizeUpdate;
106
+ const sizeUpdateMs = (props as any).sizeUpdateMs;
104
107
  const emitSizeChange = React.useMemo(() => {
105
- const cb = (props as any).onSizeChange as undefined | ((s: number, meta: { reason: 'init' | 'resize' | 'controlled' }) => void);
106
- const strategy = (props as any).sizeUpdate as undefined | 'throttle' | 'debounce';
107
- const ms = (props as any).sizeUpdateMs ?? 50;
108
+ const cb = onSizeChange as undefined | ((s: number, meta: { reason: 'init' | 'resize' | 'controlled' }) => void);
109
+ const strategy = sizeUpdate as undefined | 'throttle' | 'debounce';
110
+ const ms = sizeUpdateMs ?? 50;
108
111
  if (!cb) return () => {};
109
112
  if (strategy === 'debounce') {
110
113
  let t: any = null;
@@ -126,7 +129,7 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>(
126
129
  };
127
130
  }
128
131
  return (s: number, meta: { reason: 'init' | 'resize' | 'controlled' }) => cb(s, meta);
129
- }, [(props as any).onSizeChange, (props as any).sizeUpdate, (props as any).sizeUpdateMs]);
132
+ }, [onSizeChange, sizeUpdate, sizeUpdateMs]);
130
133
 
131
134
  // Register with shell
132
135
  const sidebarId = React.useId();
@@ -141,11 +144,9 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>(
141
144
  const wasControlledRef = React.useRef<boolean | null>(null);
142
145
  if (process.env.NODE_ENV !== 'production') {
143
146
  if (typeof state !== 'undefined' && typeof defaultState !== 'undefined') {
144
- // eslint-disable-next-line no-console
145
147
  console.error('Shell.Sidebar: Do not pass both `state` and `defaultState`. Choose one.');
146
148
  }
147
149
  if (typeof (props as any).size !== 'undefined' && typeof (props as any).defaultSize !== 'undefined') {
148
- // eslint-disable-next-line no-console
149
150
  console.error('Shell.Sidebar: Do not pass both `size` and `defaultSize`. Choose one.');
150
151
  }
151
152
  }
@@ -158,7 +159,6 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>(
158
159
  return;
159
160
  }
160
161
  if (wasControlledRef.current !== isControlled) {
161
- // eslint-disable-next-line no-console
162
162
  console.warn('Shell.Sidebar: Switching between controlled and uncontrolled `state` is not supported.');
163
163
  wasControlledRef.current = isControlled;
164
164
  }
@@ -194,7 +194,7 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>(
194
194
  React.useEffect(() => {
195
195
  if (resolvedState === undefined) return;
196
196
  if (shell.sidebarMode !== resolvedState) shell.setSidebarMode(resolvedState);
197
- }, [resolvedState, shell.sidebarMode]);
197
+ }, [shell, resolvedState]);
198
198
 
199
199
  // Emit mode changes
200
200
  const lastNotifyModeRef = React.useRef<SidebarMode | null>(null);
@@ -370,11 +370,11 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>(
370
370
  }, []);
371
371
 
372
372
  // Controlled size sync
373
+ const controlledSize = (props as any).size;
373
374
  React.useEffect(() => {
374
375
  if (!localRef.current) return;
375
- const { size } = props as any;
376
- if (typeof size === 'undefined') return;
377
- const px = normalizeToPx(size);
376
+ if (typeof controlledSize === 'undefined') return;
377
+ const px = normalizeToPx(controlledSize);
378
378
  if (typeof px === 'number' && Number.isFinite(px)) {
379
379
  const minPx = typeof minSize === 'number' ? minSize : undefined;
380
380
  const maxPx = typeof maxSize === 'number' ? maxSize : undefined;
@@ -382,7 +382,7 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarPublicProps>(
382
382
  localRef.current.style.setProperty('--sidebar-size', `${clamped}px`);
383
383
  emitSizeChange(clamped, { reason: 'controlled' });
384
384
  }
385
- }, [(props as any).size, minSize, maxSize, normalizeToPx, emitSizeChange]);
385
+ }, [controlledSize, minSize, maxSize, normalizeToPx, emitSizeChange]);
386
386
 
387
387
  if (isOverlay) {
388
388
  const open = shell.sidebarMode !== 'collapsed';
@@ -80,7 +80,7 @@
80
80
  row-gap: var(--space-2);
81
81
  column-gap: var(--space-2);
82
82
  padding: var(--space-3);
83
- --callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
83
+ --callout-border-radius: max(var(--radius-1), var(--radius-full));
84
84
  --callout-icon-height: var(--line-height-1);
85
85
  --callout-icon-size: var(--content-icon-size-1);
86
86
  }
@@ -88,7 +88,7 @@
88
88
  row-gap: var(--space-2);
89
89
  column-gap: var(--space-3);
90
90
  padding: var(--space-4);
91
- --callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
91
+ --callout-border-radius: max(var(--radius-2), var(--radius-full));
92
92
  --callout-icon-height: var(--line-height-2);
93
93
  --callout-icon-size: var(--content-icon-size-2);
94
94
  }
@@ -96,7 +96,7 @@
96
96
  row-gap: var(--space-3);
97
97
  column-gap: var(--space-4);
98
98
  padding: var(--space-5);
99
- --callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
99
+ --callout-border-radius: max(var(--radius-3), var(--radius-full));
100
100
  --callout-icon-height: var(--line-height-3);
101
101
  --callout-icon-size: var(--content-icon-size-3);
102
102
  }
@@ -104,7 +104,7 @@
104
104
  row-gap: var(--space-3);
105
105
  column-gap: var(--space-5);
106
106
  padding: var(--space-6);
107
- --callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
107
+ --callout-border-radius: max(var(--radius-4), var(--radius-full));
108
108
  --callout-icon-height: var(--line-height-4);
109
109
  --callout-icon-size: var(--content-icon-size-4);
110
110
  }
@@ -112,7 +112,7 @@
112
112
  row-gap: var(--space-4);
113
113
  column-gap: var(--space-6);
114
114
  padding: var(--space-7);
115
- --callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
115
+ --callout-border-radius: max(var(--radius-5), var(--radius-full));
116
116
  --callout-icon-height: var(--line-height-5);
117
117
  --callout-icon-size: var(--content-icon-size-5);
118
118
  }
@@ -219,7 +219,7 @@
219
219
  /* outline */
220
220
  .rt-ChatbarBox:where(.rt-variant-outline) {
221
221
  --text-area-selection-color: var(--focus-a5);
222
- --text-area-focus-color: var(--focus-8);
222
+ --text-area-focus-color: var(--focus-9);
223
223
  --text-area-border-width: 1px;
224
224
  box-shadow: inset 0 0 0 1px var(--accent-6);
225
225
  transition: var(--transition-background-blur);
@@ -248,7 +248,7 @@
248
248
  /* classic */
249
249
  .rt-ChatbarBox:where(.rt-variant-classic) {
250
250
  --text-area-selection-color: var(--focus-a5);
251
- --text-area-focus-color: var(--focus-8);
251
+ --text-area-focus-color: var(--focus-9);
252
252
  --text-area-border-width: 0px;
253
253
  background-color: var(--color-surface-solid);
254
254
  box-shadow: var(--shadow-2);
@@ -267,7 +267,7 @@
267
267
  .rt-ChatbarBox:where(.rt-variant-classic):where(:focus-within) {
268
268
  box-shadow:
269
269
  var(--shadow-2),
270
- 0 0 0 2px var(--focus-8);
270
+ 0 0 0 2px var(--focus-9);
271
271
  }
272
272
 
273
273
  /* soft */
@@ -767,7 +767,6 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, fo
767
767
  if (process.env.NODE_ENV === 'production') return;
768
768
  const hasLabel = textareaProps['aria-label'] != null || textareaProps['aria-labelledby'] != null;
769
769
  if (!hasLabel) {
770
- // eslint-disable-next-line no-console
771
770
  console.warn('[Chatbar.Textarea] Provide aria-label or aria-labelledby to ensure the control has an accessible name.');
772
771
  }
773
772
  // warn only on mount
@@ -5,41 +5,23 @@ import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-p
5
5
  type IconElement = React.ElementRef<'svg'>;
6
6
  interface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}
7
7
 
8
- const ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>(
9
- (props, forwardedRef) => {
10
- return (
11
- <svg
12
- width="9"
13
- height="9"
14
- viewBox="0 0 9 9"
15
- fill="currentcolor"
16
- xmlns="http://www.w3.org/2000/svg"
17
- {...props}
18
- ref={forwardedRef}
19
- >
20
- <path
21
- fillRule="evenodd"
22
- clipRule="evenodd"
23
- d="M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"
24
- />
25
- </svg>
26
- );
27
- },
28
- );
8
+ const ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {
9
+ return (
10
+ <svg width="9" height="9" viewBox="0 0 9 9" fill="currentcolor" xmlns="http://www.w3.org/2000/svg" {...props} ref={forwardedRef}>
11
+ <path
12
+ fillRule="evenodd"
13
+ clipRule="evenodd"
14
+ d="M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"
15
+ />
16
+ </svg>
17
+ );
18
+ });
29
19
 
30
20
  ThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';
31
21
 
32
22
  const ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {
33
23
  return (
34
- <svg
35
- width="9"
36
- height="9"
37
- viewBox="0 0 9 9"
38
- fill="currentcolor"
39
- xmlns="http://www.w3.org/2000/svg"
40
- {...props}
41
- ref={forwardedRef}
42
- >
24
+ <svg width="9" height="9" viewBox="0 0 9 9" fill="currentcolor" xmlns="http://www.w3.org/2000/svg" {...props} ref={forwardedRef}>
43
25
  <path
44
26
  fillRule="evenodd"
45
27
  clipRule="evenodd"
@@ -52,15 +34,7 @@ ThickCheckIcon.displayName = 'ThickCheckIcon';
52
34
 
53
35
  const ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {
54
36
  return (
55
- <svg
56
- width="9"
57
- height="9"
58
- viewBox="0 0 9 9"
59
- fill="currentcolor"
60
- xmlns="http://www.w3.org/2000/svg"
61
- {...props}
62
- ref={forwardedRef}
63
- >
37
+ <svg width="9" height="9" viewBox="0 0 9 9" fill="currentcolor" xmlns="http://www.w3.org/2000/svg" {...props} ref={forwardedRef}>
64
38
  <path d="M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z" />
65
39
  </svg>
66
40
  );
@@ -69,15 +43,7 @@ ChevronDownIcon.displayName = 'ChevronDownIcon';
69
43
 
70
44
  const ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {
71
45
  return (
72
- <svg
73
- width="9"
74
- height="9"
75
- viewBox="0 0 9 9"
76
- fill="currentcolor"
77
- xmlns="http://www.w3.org/2000/svg"
78
- {...props}
79
- ref={forwardedRef}
80
- >
46
+ <svg width="9" height="9" viewBox="0 0 9 9" fill="currentcolor" xmlns="http://www.w3.org/2000/svg" {...props} ref={forwardedRef}>
81
47
  <path
82
48
  fillRule="evenodd"
83
49
  clipRule="evenodd"
@@ -90,28 +56,14 @@ ThickChevronRightIcon.displayName = 'ThickChevronRightIcon';
90
56
 
91
57
  const ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {
92
58
  return (
93
- <svg
94
- width="9"
95
- height="9"
96
- viewBox="0 0 9 9"
97
- fill="currentcolor"
98
- xmlns="http://www.w3.org/2000/svg"
99
- {...props}
100
- ref={forwardedRef}
101
- >
59
+ <svg width="9" height="9" viewBox="0 0 9 9" fill="currentcolor" xmlns="http://www.w3.org/2000/svg" {...props} ref={forwardedRef}>
102
60
  <circle cx="4.5" cy="4.5" r="2" />
103
61
  </svg>
104
62
  );
105
63
  });
106
64
  ThickDotIcon.displayName = 'ThickDotIcon';
107
65
 
108
- export {
109
- ChevronDownIcon,
110
- ThickCheckIcon,
111
- ThickChevronRightIcon,
112
- ThickDividerHorizontalIcon,
113
- ThickDotIcon,
114
- };
66
+ export { ChevronDownIcon, ThickCheckIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };
115
67
  export type { IconProps };
116
68
 
117
69
  // Additional minimal icons
@@ -158,19 +110,9 @@ const PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwarded
158
110
  });
159
111
  PaperclipIcon.displayName = 'PaperclipIcon';
160
112
 
161
- const FileIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {
113
+ const FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {
162
114
  return (
163
- <svg
164
- xmlns="http://www.w3.org/2000/svg"
165
- width="24"
166
- height="24"
167
- viewBox="0 0 24 24"
168
- fill="none"
169
- stroke="currentColor"
170
- strokeWidth="2"
171
- strokeLinecap="round"
172
- strokeLinejoin="round"
173
- >
115
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
174
116
  <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
175
117
  <path d="M14 2v4a2 2 0 0 0 2 2h4" />
176
118
  </svg>
@@ -180,17 +122,7 @@ FileIcon.displayName = 'FileIcon';
180
122
 
181
123
  const FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {
182
124
  return (
183
- <svg
184
- xmlns="http://www.w3.org/2000/svg"
185
- width="24"
186
- height="24"
187
- viewBox="0 0 24 24"
188
- fill="none"
189
- stroke="currentColor"
190
- strokeWidth="2"
191
- strokeLinecap="round"
192
- strokeLinejoin="round"
193
- >
125
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
194
126
  <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
195
127
  <path d="M14 2v4a2 2 0 0 0 2 2h4" />
196
128
  <path d="M10 9H8" />
@@ -23,15 +23,9 @@ import { z } from 'zod';
23
23
  // Common types
24
24
  const PaneModeSchema = z.enum(['expanded', 'collapsed']).describe('Pane state mode');
25
25
  const SidebarModeSchema = z.enum(['collapsed', 'thin', 'expanded']).describe('Sidebar state mode');
26
- const PresentationValueSchema = z
27
- .enum(['fixed', 'overlay', 'stacked'])
28
- .describe('Presentation mode');
29
- const BreakpointSchema = z
30
- .enum(['initial', 'xs', 'sm', 'md', 'lg', 'xl'])
31
- .describe('Responsive breakpoint');
32
- const PaneTargetSchema = z
33
- .enum(['left', 'rail', 'panel', 'sidebar', 'inspector', 'bottom'])
34
- .describe('Pane target');
26
+ const PresentationValueSchema = z.enum(['fixed', 'overlay', 'stacked']).describe('Presentation mode');
27
+ const _BreakpointSchema = z.enum(['initial', 'xs', 'sm', 'md', 'lg', 'xl']).describe('Responsive breakpoint');
28
+ const PaneTargetSchema = z.enum(['left', 'rail', 'panel', 'sidebar', 'inspector', 'bottom']).describe('Pane target');
35
29
  const TriggerActionSchema = z.enum(['toggle', 'expand', 'collapse']).describe('Trigger action');
36
30
 
37
31
  // Responsive schemas
@@ -184,10 +178,7 @@ export const ShellPanelSchema = PanePropsSchema.extend({
184
178
  minSize: z.number().default(200).describe('Minimum width when resizing'),
185
179
  maxSize: z.number().default(800).describe('Maximum width when resizing'),
186
180
  resizable: z.boolean().default(false).describe('Whether the panel can be resized'),
187
- collapsible: z
188
- .boolean()
189
- .default(true)
190
- .describe('Whether the panel can be collapsed via resize handle'),
181
+ collapsible: z.boolean().default(true).describe('Whether the panel can be collapsed via resize handle'),
191
182
  }).strict();
192
183
 
193
184
  /**
@@ -202,10 +193,7 @@ export const ShellSidebarSchema = PanePropsSchema.extend({
202
193
  thinSize: z.number().default(64).describe('Width in thin mode'),
203
194
  toggleModes: z.enum(['both', 'single']).optional().describe('Available modes in toggle sequence'),
204
195
  resizable: z.boolean().default(false).describe('Whether the sidebar can be resized'),
205
- collapsible: z
206
- .boolean()
207
- .default(true)
208
- .describe('Whether the sidebar can be collapsed via resize handle'),
196
+ collapsible: z.boolean().default(true).describe('Whether the sidebar can be collapsed via resize handle'),
209
197
  }).strict();
210
198
 
211
199
  /**
@@ -226,17 +214,12 @@ export const ShellContentSchema = z
226
214
  * Shell.Inspector component schema
227
215
  */
228
216
  export const ShellInspectorSchema = PanePropsSchema.extend({
229
- presentation: ResponsivePresentationSchema.default({ initial: 'overlay', lg: 'fixed' }).describe(
230
- 'Presentation mode',
231
- ),
217
+ presentation: ResponsivePresentationSchema.default({ initial: 'overlay', lg: 'fixed' }).describe('Presentation mode'),
232
218
  expandedSize: z.number().default(320).describe('Default width in pixels'),
233
219
  minSize: z.number().default(200).describe('Minimum width when resizing'),
234
220
  maxSize: z.number().default(500).describe('Maximum width when resizing'),
235
221
  resizable: z.boolean().default(false).describe('Whether the inspector can be resized'),
236
- collapsible: z
237
- .boolean()
238
- .default(true)
239
- .describe('Whether the inspector can be collapsed via resize handle'),
222
+ collapsible: z.boolean().default(true).describe('Whether the inspector can be collapsed via resize handle'),
240
223
  }).strict();
241
224
 
242
225
  /**
@@ -248,10 +231,7 @@ export const ShellBottomSchema = PanePropsSchema.extend({
248
231
  minSize: z.number().default(100).describe('Minimum height when resizing'),
249
232
  maxSize: z.number().default(400).describe('Maximum height when resizing'),
250
233
  resizable: z.boolean().default(false).describe('Whether the bottom panel can be resized'),
251
- collapsible: z
252
- .boolean()
253
- .default(true)
254
- .describe('Whether the bottom panel can be collapsed via resize handle'),
234
+ collapsible: z.boolean().default(true).describe('Whether the bottom panel can be collapsed via resize handle'),
255
235
  }).strict();
256
236
 
257
237
  /**
@@ -261,10 +241,7 @@ export const ShellTriggerSchema = z
261
241
  .object({
262
242
  target: PaneTargetSchema.describe('Which pane to control'),
263
243
  action: TriggerActionSchema.default('toggle').describe('Action to perform'),
264
- peekOnHover: z
265
- .boolean()
266
- .default(false)
267
- .describe('Whether to show peek preview on hover when collapsed'),
244
+ peekOnHover: z.boolean().default(false).describe('Whether to show peek preview on hover when collapsed'),
268
245
  className: z.string().optional().describe('Additional CSS class name'),
269
246
  style: z
270
247
  .record(z.string(), z.union([z.string(), z.number()]))
@@ -310,7 +287,7 @@ export type ShellHandleProps = z.infer<typeof ShellHandleSchema>;
310
287
  export type PaneMode = z.infer<typeof PaneModeSchema>;
311
288
  export type SidebarMode = z.infer<typeof SidebarModeSchema>;
312
289
  export type PresentationValue = z.infer<typeof PresentationValueSchema>;
313
- export type Breakpoint = z.infer<typeof BreakpointSchema>;
290
+ export type Breakpoint = z.infer<typeof _BreakpointSchema>;
314
291
  export type PaneTarget = z.infer<typeof PaneTargetSchema>;
315
292
  export type TriggerAction = z.infer<typeof TriggerActionSchema>;
316
293
  export type ResponsiveMode = z.infer<typeof ResponsiveModeSchema>;