@kushagradhawan/kookie-ui 0.1.109 → 0.1.110

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/sidebar.props.tsx"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\n// Re-export base menu props for sidebar menu components\nexport {\n baseMenuContentPropDefs as sidebarContentPropDefs,\n baseMenuItemPropDefs as sidebarItemPropDefs,\n baseMenuCheckboxItemPropDefs as sidebarCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs as sidebarRadioItemPropDefs,\n} from './_internal/base-menu.props.js';\n\n// Sidebar container props\nconst sizes = ['1', '2'] as const;\nconst variants = ['soft', 'outline', 'surface', 'ghost'] as const;\nconst menuVariants = ['solid', 'soft'] as const;\nconst types = ['sidebar'] as const;\nconst sides = ['left', 'right'] as const;\nconst collapsibleModes = ['offcanvas', 'icon', 'none'] as const;\nconst layouts = ['rail', 'panel'] as const;\n\nconst sidebarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'outline' },\n menuVariant: {\n type: 'enum',\n className: 'rt-menu-variant',\n values: menuVariants,\n default: 'soft',\n },\n type: { type: 'enum', className: 'rt-type', values: types, default: 'sidebar' },\n side: { type: 'enum', className: 'rt-side', values: sides, default: 'left' },\n collapsible: {\n type: 'enum',\n className: 'rt-collapsible',\n values: collapsibleModes,\n default: 'offcanvas',\n },\n layout: { type: 'enum', className: 'rt-layout', values: layouts, default: undefined },\n panelBackground: { type: 'enum', values: ['solid', 'translucent'], default: undefined },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n menuVariant: PropDef<(typeof menuVariants)[number]>;\n type: PropDef<(typeof types)[number]>;\n side: PropDef<(typeof sides)[number]>;\n collapsible: PropDef<(typeof collapsibleModes)[number]>;\n layout: PropDef<(typeof layouts)[number]>;\n panelBackground: PropDef<'solid' | 'translucent'>;\n};\n\nexport { sidebarPropDefs };\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,gBAAAC,MAAoB,yBAC7B,OAAS,uBAAAC,MAA2B,iCAKpC,OAC6B,2BAA3BC,EACwB,wBAAxBC,EACgC,gCAAhCC,EAC6B,6BAA7BC,MACK,iCAGP,MAAMC,EAAQ,CAAC,IAAK,GAAG,EACjBC,EAAW,CAAC,OAAQ,UAAW,UAAW,OAAO,EACjDC,EAAe,CAAC,QAAS,MAAM,EAC/BC,EAAQ,CAAC,SAAS,EAClBC,EAAQ,CAAC,OAAQ,OAAO,EACxBC,EAAmB,CAAC,YAAa,OAAQ,MAAM,EAC/CC,EAAU,CAAC,OAAQ,OAAO,EAE1BC,EAAkB,CACtB,GAAGd,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQO,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,YAAa,CACX,KAAM,OACN,UAAW,kBACX,OAAQC,EACR,QAAS,MACX,EACA,KAAM,CAAE,KAAM,OAAQ,UAAW,UAAW,OAAQC,EAAO,QAAS,SAAU,EAC9E,KAAM,CAAE,KAAM,OAAQ,UAAW,UAAW,OAAQC,EAAO,QAAS,MAAO,EAC3E,YAAa,CACX,KAAM,OACN,UAAW,iBACX,OAAQC,EACR,QAAS,WACX,EACA,OAAQ,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQC,EAAS,QAAS,MAAU,EACpF,gBAAiB,CAAE,KAAM,OAAQ,OAAQ,CAAC,QAAS,aAAa,EAAG,QAAS,MAAU,EACtF,GAAGZ,EACH,GAAGC,CACL",
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\n// Re-export base menu props for sidebar menu components\nexport {\n baseMenuContentPropDefs as sidebarContentPropDefs,\n baseMenuItemPropDefs as sidebarItemPropDefs,\n baseMenuCheckboxItemPropDefs as sidebarCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs as sidebarRadioItemPropDefs,\n} from './_internal/base-menu.props.js';\n\n// Sidebar container props\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['soft', 'outline', 'surface', 'ghost'] as const;\nconst menuVariants = ['solid', 'soft'] as const;\nconst types = ['sidebar'] as const;\nconst sides = ['left', 'right'] as const;\nconst collapsibleModes = ['offcanvas', 'icon', 'none'] as const;\nconst layouts = ['rail', 'panel'] as const;\n\nconst sidebarPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'outline' },\n menuVariant: {\n type: 'enum',\n className: 'rt-menu-variant',\n values: menuVariants,\n default: 'soft',\n },\n type: { type: 'enum', className: 'rt-type', values: types, default: 'sidebar' },\n side: { type: 'enum', className: 'rt-side', values: sides, default: 'left' },\n collapsible: {\n type: 'enum',\n className: 'rt-collapsible',\n values: collapsibleModes,\n default: 'offcanvas',\n },\n layout: { type: 'enum', className: 'rt-layout', values: layouts, default: undefined },\n panelBackground: { type: 'enum', values: ['solid', 'translucent'], default: undefined },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n menuVariant: PropDef<(typeof menuVariants)[number]>;\n type: PropDef<(typeof types)[number]>;\n side: PropDef<(typeof sides)[number]>;\n collapsible: PropDef<(typeof collapsibleModes)[number]>;\n layout: PropDef<(typeof layouts)[number]>;\n panelBackground: PropDef<'solid' | 'translucent'>;\n};\n\nexport { sidebarPropDefs };\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,gBAAAC,MAAoB,yBAC7B,OAAS,uBAAAC,MAA2B,iCAKpC,OAC6B,2BAA3BC,EACwB,wBAAxBC,EACgC,gCAAhCC,EAC6B,6BAA7BC,MACK,iCAGP,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,EAAW,CAAC,OAAQ,UAAW,UAAW,OAAO,EACjDC,EAAe,CAAC,QAAS,MAAM,EAC/BC,EAAQ,CAAC,SAAS,EAClBC,EAAQ,CAAC,OAAQ,OAAO,EACxBC,EAAmB,CAAC,YAAa,OAAQ,MAAM,EAC/CC,EAAU,CAAC,OAAQ,OAAO,EAE1BC,EAAkB,CACtB,GAAGd,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQO,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,YAAa,CACX,KAAM,OACN,UAAW,kBACX,OAAQC,EACR,QAAS,MACX,EACA,KAAM,CAAE,KAAM,OAAQ,UAAW,UAAW,OAAQC,EAAO,QAAS,SAAU,EAC9E,KAAM,CAAE,KAAM,OAAQ,UAAW,UAAW,OAAQC,EAAO,QAAS,MAAO,EAC3E,YAAa,CACX,KAAM,OACN,UAAW,iBACX,OAAQC,EACR,QAAS,WACX,EACA,OAAQ,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQC,EAAS,QAAS,MAAU,EACpF,gBAAiB,CAAE,KAAM,OAAQ,OAAQ,CAAC,QAAS,aAAa,EAAG,QAAS,MAAU,EACtF,GAAGZ,EACH,GAAGC,CACL",
6
6
  "names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs", "sizes", "variants", "menuVariants", "types", "sides", "collapsibleModes", "layouts", "sidebarPropDefs"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kushagradhawan/kookie-ui",
3
- "version": "0.1.109",
3
+ "version": "0.1.110",
4
4
  "description": "A modern React component library with beautiful design tokens, flexible theming, and comprehensive documentation",
5
5
  "keywords": [
6
6
  "react",
@@ -279,6 +279,6 @@
279
279
  "title": "Base-button Component Props",
280
280
  "description": "Props schema for the base-button component in Kookie UI",
281
281
  "version": "1.0.0",
282
- "generatedAt": "2026-01-06T19:05:02.636Z",
282
+ "generatedAt": "2026-01-07T05:55:02.780Z",
283
283
  "source": "Zod schema"
284
284
  }
@@ -530,6 +530,6 @@
530
530
  "title": "Button Component Props",
531
531
  "description": "Props schema for the button component in Kookie UI",
532
532
  "version": "1.0.0",
533
- "generatedAt": "2026-01-06T19:05:02.642Z",
533
+ "generatedAt": "2026-01-07T05:55:02.786Z",
534
534
  "source": "Zod schema"
535
535
  }
@@ -313,6 +313,6 @@
313
313
  "title": "Icon-button Component Props",
314
314
  "description": "Props schema for the icon-button component in Kookie UI",
315
315
  "version": "1.0.0",
316
- "generatedAt": "2026-01-06T19:05:02.643Z",
316
+ "generatedAt": "2026-01-07T05:55:02.787Z",
317
317
  "source": "Zod schema"
318
318
  }
@@ -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": "2026-01-06T19:05:02.646Z",
6
+ "generatedAt": "2026-01-07T05:55:02.790Z",
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": "2026-01-06T19:05:02.636Z",
290
+ "generatedAt": "2026-01-07T05:55:02.780Z",
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": "2026-01-06T19:05:02.642Z",
825
+ "generatedAt": "2026-01-07T05:55:02.786Z",
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": "2026-01-06T19:05:02.643Z",
1143
+ "generatedAt": "2026-01-07T05:55:02.787Z",
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": "2026-01-06T19:05:02.645Z",
1686
+ "generatedAt": "2026-01-07T05:55:02.789Z",
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": "2026-01-06T19:05:02.646Z",
2012
+ "generatedAt": "2026-01-07T05:55:02.790Z",
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": "2026-01-06T19:05:02.645Z",
541
+ "generatedAt": "2026-01-07T05:55:02.789Z",
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": "2026-01-06T19:05:02.646Z",
324
+ "generatedAt": "2026-01-07T05:55:02.790Z",
325
325
  "source": "Zod schema"
326
326
  }
@@ -230,12 +230,10 @@
230
230
 
231
231
  &:where([data-state='open']) {
232
232
  background-color: color-mix(in srgb, var(--gray-a3) calc(var(--material-alpha) * 100%), var(--gray-3) var(--material-blend));
233
- box-shadow: var(--shadow-1);
234
233
  }
235
234
 
236
235
  &:where(:active:not([data-state='open'], [data-disabled]), [data-state='on']:not([data-disabled])) {
237
236
  background-color: color-mix(in srgb, var(--gray-a3) calc(var(--material-alpha) * 100%), var(--gray-3) var(--material-blend));
238
- box-shadow: var(--shadow-1);
239
237
  }
240
238
 
241
239
  @media (pointer: coarse) {
@@ -361,12 +359,10 @@
361
359
  &:where([data-state='open']) {
362
360
  background-color: color-mix(in srgb, var(--accent-a10) calc(var(--material-alpha) * 100%), var(--accent-10) var(--solid-blend));
363
361
  filter: var(--base-button-solid-open-filter);
364
- box-shadow: var(--shadow-1);
365
362
  }
366
363
 
367
364
  &:where(:active:not([data-state='open'])) {
368
365
  filter: var(--base-button-solid-active-filter);
369
- box-shadow: var(--shadow-1);
370
366
  }
371
367
 
372
368
  @media (pointer: coarse) {
@@ -396,12 +392,10 @@
396
392
  &:where([data-state='open']) {
397
393
  background-color: color-mix(in srgb, var(--accent-a12) calc(var(--material-alpha) * 100%), var(--accent-12) var(--solid-blend));
398
394
  filter: var(--base-button-solid-high-contrast-open-filter);
399
- box-shadow: var(--shadow-1);
400
395
  }
401
396
 
402
397
  &:where(:active:not([data-state='open'])) {
403
398
  filter: var(--base-button-solid-high-contrast-active-filter);
404
- box-shadow: var(--shadow-1);
405
399
  }
406
400
  }
407
401
 
@@ -453,12 +447,10 @@
453
447
 
454
448
  &:where([data-state='open']) {
455
449
  background-color: color-mix(in srgb, var(--accent-a4) calc(var(--material-alpha) * 100%), var(--accent-4) var(--material-blend));
456
- box-shadow: var(--shadow-1);
457
450
  }
458
451
 
459
452
  &:where(:active:not([data-state='open'])) {
460
453
  background-color: color-mix(in srgb, var(--accent-a5) calc(var(--material-alpha) * 100%), var(--accent-5) var(--material-blend));
461
- box-shadow: var(--shadow-1);
462
454
  }
463
455
 
464
456
  &:where([data-disabled]) {
@@ -514,12 +506,10 @@
514
506
 
515
507
  &:where([data-state='open']) {
516
508
  background-color: color-mix(in srgb, var(--accent-a3) calc(var(--material-alpha) * 100%), var(--accent-3) var(--material-blend));
517
- box-shadow: var(--shadow-1);
518
509
  }
519
510
 
520
511
  &:where(:active:not([data-state='open'])) {
521
512
  background-color: color-mix(in srgb, var(--accent-a4) calc(var(--material-alpha) * 100%), var(--accent-4) var(--material-blend));
522
- box-shadow: var(--shadow-1);
523
513
  }
524
514
 
525
515
  &:where([data-disabled]) {
@@ -554,16 +544,12 @@
554
544
 
555
545
  &:where([data-state='open']) {
556
546
  background-color: color-mix(in srgb, var(--accent-a2) calc(var(--material-alpha) * 100%), var(--accent-2) var(--material-blend));
557
- box-shadow:
558
- inset 0 0 0 1px var(--outline-border-7),
559
- var(--shadow-1);
547
+ box-shadow: inset 0 0 0 1px var(--outline-border-7);
560
548
  }
561
549
 
562
550
  &:where(:active:not([data-state='open'])) {
563
551
  background-color: color-mix(in srgb, var(--accent-a3) calc(var(--material-alpha) * 100%), var(--accent-3) var(--material-blend));
564
- box-shadow:
565
- inset 0 0 0 1px var(--outline-border-8),
566
- var(--shadow-1);
552
+ box-shadow: inset 0 0 0 1px var(--outline-border-8);
567
553
  }
568
554
 
569
555
  &:where(:focus-visible) {
@@ -608,16 +594,12 @@
608
594
 
609
595
  &:where([data-state='open']) {
610
596
  background-color: color-mix(in srgb, var(--accent-a3) calc(var(--material-alpha) * 100%), var(--accent-3) var(--material-blend));
611
- box-shadow:
612
- inset 0 0 0 1px var(--surface-border-8),
613
- var(--shadow-1);
597
+ box-shadow: inset 0 0 0 1px var(--surface-border-8);
614
598
  }
615
599
 
616
600
  &:where(:active:not([data-state='open'])) {
617
601
  background-color: color-mix(in srgb, var(--accent-a4) calc(var(--material-alpha) * 100%), var(--accent-4) var(--material-blend));
618
- box-shadow:
619
- inset 0 0 0 1px var(--surface-border-8),
620
- var(--shadow-1);
602
+ box-shadow: inset 0 0 0 1px var(--surface-border-8);
621
603
  }
622
604
 
623
605
  &:where(:focus-visible) {
@@ -649,7 +631,6 @@
649
631
  /* Classic variant pressed */
650
632
  &:where(.rt-variant-classic) {
651
633
  background-color: color-mix(in srgb, var(--gray-a3) calc(var(--material-alpha) * 100%), var(--gray-3) var(--material-blend));
652
- box-shadow: var(--shadow-1);
653
634
  }
654
635
 
655
636
  /* Solid variant pressed - uses solid-blend from variant definition */
@@ -657,7 +638,6 @@
657
638
  --solid-blend: calc(100% - (var(--material-alpha) * 90%));
658
639
  background-color: color-mix(in srgb, var(--accent-a10) calc(var(--material-alpha) * 100%), var(--accent-10) var(--solid-blend));
659
640
  opacity: 0.9;
660
- box-shadow: var(--shadow-1);
661
641
 
662
642
  &:where(.rt-high-contrast) {
663
643
  background-color: var(--accent-12);
@@ -668,31 +648,25 @@
668
648
  /* Soft variant pressed */
669
649
  &:where(.rt-variant-soft) {
670
650
  background-color: color-mix(in srgb, var(--accent-a5) calc(var(--material-alpha) * 100%), var(--accent-5) var(--material-blend));
671
- box-shadow: var(--shadow-1);
672
651
  }
673
652
 
674
653
  /* Ghost variant pressed */
675
654
  &:where(.rt-variant-ghost) {
676
655
  background-color: color-mix(in srgb, var(--accent-a4) calc(var(--material-alpha) * 100%), var(--accent-4) var(--material-blend));
677
- box-shadow: var(--shadow-1);
678
656
  }
679
657
 
680
658
  /* Outline variant pressed */
681
659
  &:where(.rt-variant-outline) {
682
660
  --outline-border-8: color-mix(in srgb, var(--accent-a8) calc(var(--material-alpha) * 100%), var(--accent-8) var(--material-blend));
683
661
  background-color: color-mix(in srgb, var(--accent-a3) calc(var(--material-alpha) * 100%), var(--accent-3) var(--material-blend));
684
- box-shadow:
685
- inset 0 0 0 1px var(--outline-border-8),
686
- var(--shadow-1);
662
+ box-shadow: inset 0 0 0 1px var(--outline-border-8);
687
663
  }
688
664
 
689
665
  /* Surface variant pressed */
690
666
  &:where(.rt-variant-surface) {
691
667
  --surface-border-8: color-mix(in srgb, var(--accent-a8) calc(var(--material-alpha) * 100%), var(--accent-8) var(--material-blend));
692
668
  background-color: color-mix(in srgb, var(--accent-a4) calc(var(--material-alpha) * 100%), var(--accent-4) var(--material-blend));
693
- box-shadow:
694
- inset 0 0 0 1px var(--surface-border-8),
695
- var(--shadow-1);
669
+ box-shadow: inset 0 0 0 1px var(--surface-border-8);
696
670
  }
697
671
  }
698
672
 
@@ -329,7 +329,6 @@
329
329
 
330
330
  &:where([data-state='open']) {
331
331
  transition-duration: 40ms;
332
- box-shadow: var(--shadow-1);
333
332
 
334
333
  &::before {
335
334
  background-color: var(--gray-3);
@@ -346,8 +345,6 @@
346
345
  }
347
346
 
348
347
  &:where(:active:not([data-state='open'])) {
349
- box-shadow: var(--shadow-1);
350
-
351
348
  &::before {
352
349
  background-color: var(--gray-3);
353
350
 
@@ -170,7 +170,6 @@
170
170
  &:where([data-state='checked'], [data-state='indeterminate']) {
171
171
  &::before {
172
172
  background-color: var(--accent-3);
173
- box-shadow: var(--shadow-1);
174
173
 
175
174
  /* Theme-level translucent override */
176
175
  :where([data-panel-background='translucent'], [data-material='translucent']) & {
@@ -219,7 +218,6 @@
219
218
 
220
219
  &::before {
221
220
  background-color: var(--accent-3);
222
- box-shadow: var(--shadow-1);
223
221
 
224
222
  /* Theme-level translucent override for active */
225
223
  :where([data-panel-background='translucent'], [data-material='translucent']) & {
@@ -160,7 +160,6 @@
160
160
 
161
161
  &:where(:checked, [data-state='checked'])::before {
162
162
  background-color: var(--accent-3);
163
- box-shadow: var(--shadow-1);
164
163
 
165
164
  /* Theme-level translucent override */
166
165
  :where([data-panel-background='translucent'], [data-material='translucent']) & {
@@ -191,7 +190,6 @@
191
190
 
192
191
  &::before {
193
192
  background-color: var(--accent-3);
194
- box-shadow: var(--shadow-1);
195
193
 
196
194
  /* Theme-level translucent override for active */
197
195
  :where([data-panel-background='translucent'], [data-material='translucent']) & {
@@ -104,7 +104,6 @@
104
104
  padding-top: var(--classic-active-padding-offset-2);
105
105
  padding-bottom: 0;
106
106
  background-color: var(--gray-3);
107
- box-shadow: var(--shadow-1);
108
107
 
109
108
  /* Theme-level translucent override for active */
110
109
  :where([data-panel-background='translucent'], [data-material='translucent']) & {
@@ -400,7 +400,6 @@
400
400
 
401
401
  &:where([data-state='open']) {
402
402
  background-color: var(--accent-3);
403
- box-shadow: var(--shadow-1);
404
403
 
405
404
  /* Theme-level translucent override for open */
406
405
  :where([data-panel-background='translucent'], [data-material='translucent']) & {
@@ -419,7 +418,6 @@
419
418
 
420
419
  &:where(:active:not([data-state='open'], [data-disabled])) {
421
420
  background-color: var(--accent-3);
422
- box-shadow: var(--shadow-1);
423
421
 
424
422
  /* Theme-level translucent override for active */
425
423
  :where([data-panel-background='translucent'], [data-material='translucent']) & {
@@ -36,10 +36,27 @@
36
36
  text-align: center !important;
37
37
  font-size: var(--font-size-0) !important;
38
38
  line-height: var(--line-height-0) !important;
39
- padding-top: var(--space-2) !important;
40
- padding-bottom: var(--space-2) !important;
41
39
  padding-inline-start: var(--space-1) !important;
42
40
  padding-inline-end: var(--space-1) !important;
41
+ /* Add margin for balanced spacing like normal variant */
42
+ margin-top: 1px;
43
+ margin-bottom: 1px;
44
+ }
45
+
46
+ /* Size-specific vertical padding for thin mode buttons */
47
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-r-size-1) :where(.rt-SidebarMenuButton, .rt-SidebarMenuSubTrigger) {
48
+ padding-top: var(--space-1) !important;
49
+ padding-bottom: var(--space-1) !important;
50
+ }
51
+
52
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-r-size-2) :where(.rt-SidebarMenuButton, .rt-SidebarMenuSubTrigger) {
53
+ padding-top: var(--space-1) !important;
54
+ padding-bottom: var(--space-1) !important;
55
+ }
56
+
57
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-r-size-3) :where(.rt-SidebarMenuButton, .rt-SidebarMenuSubTrigger) {
58
+ padding-top: var(--space-2) !important;
59
+ padding-bottom: var(--space-2) !important;
43
60
  }
44
61
 
45
62
  /* Consolidated thin mode size blocks */
@@ -195,20 +212,107 @@
195
212
  display: block;
196
213
  }
197
214
 
198
- /* Truncate labels inside an explicit label span */
215
+ /* Icon wrapper for thin mode - receives hover/active background */
216
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuIconWrapper) {
217
+ display: flex;
218
+ align-items: center;
219
+ justify-content: center;
220
+ /* Override the 100% width from .rt-SidebarMenuButton > * - icon wrapper should fit content */
221
+ width: auto;
222
+ padding: var(--space-3) var(--space-2);
223
+ border-radius: var(--radius-2);
224
+ transition:
225
+ background-color var(--motion-duration-micro) var(--motion-ease-standard),
226
+ color var(--motion-duration-small) var(--motion-ease-standard);
227
+ }
228
+
229
+ /* Size-specific icon wrapper padding */
230
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-r-size-1 .rt-SidebarMenuIconWrapper) {
231
+ padding: var(--space-2) var(--space-2);
232
+ border-radius: var(--radius-1);
233
+ }
234
+
235
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-r-size-2 .rt-SidebarMenuIconWrapper) {
236
+ padding: var(--space-2);
237
+ border-radius: var(--radius-2);
238
+ }
239
+
240
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-r-size-3 .rt-SidebarMenuIconWrapper) {
241
+ padding: var(--space-3);
242
+ border-radius: var(--radius-2);
243
+ }
244
+
245
+ /* Label styling in thin mode - outside the background area */
199
246
  :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuButton .rt-SidebarMenuLabel) {
200
247
  display: block;
201
248
  max-width: 100%;
202
249
  min-width: 0;
203
- overflow: hidden;
204
- text-overflow: ellipsis;
250
+ overflow: visible;
251
+ text-overflow: clip;
205
252
  white-space: nowrap;
206
253
  text-align: center;
207
- color: var(--accent-11);
254
+ color: var(--gray-11);
208
255
  font-size: var(--font-size-0);
209
256
  line-height: var(--line-height-0);
210
257
  }
211
258
 
259
+ /* Active label gets accent color and medium weight */
260
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuButton[data-active] .rt-SidebarMenuLabel) {
261
+ color: var(--accent-11);
262
+ font-weight: var(--font-weight-medium);
263
+ }
264
+
265
+ /* Highlighted label gets slightly darker color */
266
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuButton[data-highlighted] .rt-SidebarMenuLabel) {
267
+ color: var(--accent-11);
268
+ }
269
+
270
+ /* Remove background from button itself in thin mode - styles are on icon wrapper */
271
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuButton[data-highlighted]),
272
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuButton[data-active]) {
273
+ background-color: transparent !important;
274
+ }
275
+
276
+ /* Soft variant icon wrapper states in thin mode */
277
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-soft .rt-SidebarMenuButton[data-highlighted] .rt-SidebarMenuIconWrapper) {
278
+ background-color: var(--accent-4);
279
+ }
280
+
281
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-soft .rt-SidebarMenuButton[data-active] .rt-SidebarMenuIconWrapper) {
282
+ background-color: var(--accent-3);
283
+ }
284
+
285
+ /* Translucent panel support for soft variant */
286
+ :where([data-panel-background='translucent']) :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-soft .rt-SidebarMenuButton[data-highlighted] .rt-SidebarMenuIconWrapper) {
287
+ background-color: var(--accent-a4);
288
+ }
289
+
290
+ :where([data-panel-background='translucent']) :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-soft .rt-SidebarMenuButton[data-active] .rt-SidebarMenuIconWrapper) {
291
+ background-color: var(--accent-a3);
292
+ }
293
+
294
+ /* Solid variant icon wrapper states in thin mode */
295
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-solid .rt-SidebarMenuButton[data-highlighted] .rt-SidebarMenuIconWrapper) {
296
+ background-color: var(--accent-9);
297
+ color: var(--accent-contrast);
298
+ }
299
+
300
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-solid .rt-SidebarMenuButton[data-active] .rt-SidebarMenuIconWrapper) {
301
+ background-color: var(--accent-9);
302
+ color: var(--accent-contrast);
303
+ }
304
+
305
+ /* High contrast solid variant in thin mode */
306
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-solid[data-high-contrast] .rt-SidebarMenuButton[data-highlighted] .rt-SidebarMenuIconWrapper) {
307
+ background-color: var(--accent-12);
308
+ color: var(--accent-1);
309
+ }
310
+
311
+ :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarContent.rt-menu-variant-solid[data-high-contrast] .rt-SidebarMenuButton[data-active] .rt-SidebarMenuIconWrapper) {
312
+ background-color: var(--accent-12);
313
+ color: var(--accent-1);
314
+ }
315
+
212
316
  :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuBadge),
213
317
  :where(.rt-SidebarContainer[data-presentation='thin'] .rt-SidebarMenuShortcut),
214
318
  :where(.rt-SidebarContainer[data-presentation='thin'] .rt-Badge),
@@ -13,7 +13,7 @@ export {
13
13
  } from './_internal/base-menu.props.js';
14
14
 
15
15
  // Sidebar container props
16
- const sizes = ['1', '2'] as const;
16
+ const sizes = ['1', '2', '3'] as const;
17
17
  const variants = ['soft', 'outline', 'surface', 'ghost'] as const;
18
18
  const menuVariants = ['solid', 'soft'] as const;
19
19
  const types = ['sidebar'] as const;
@@ -32,7 +32,7 @@ type BadgeConfig = {
32
32
 
33
33
  // Internal presentational context (not exported) for size/menu variant
34
34
  type SidebarVisualContextValue = {
35
- size: '1' | '2';
35
+ size: '1' | '2' | '3';
36
36
  menuVariant: 'solid' | 'soft';
37
37
  presentation?: 'thin' | 'expanded';
38
38
  color?: string;
@@ -236,6 +236,7 @@ const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonP
236
236
  const [isHighlighted, setIsHighlighted] = React.useState(false);
237
237
  const visual = useSidebarVisual();
238
238
  const sidebarSize = visual?.size ?? '2';
239
+ const isThinMode = visual?.presentation === 'thin';
239
240
 
240
241
  const Comp = asChild ? Slot : 'button';
241
242
 
@@ -268,6 +269,30 @@ const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonP
268
269
  [onClick, onKeyDown],
269
270
  );
270
271
 
272
+ // Separate icons and labels for thin mode styling
273
+ const separateIconsAndLabels = (node: React.ReactNode): { icons: React.ReactNode[]; labels: React.ReactNode[] } => {
274
+ const icons: React.ReactNode[] = [];
275
+ const labels: React.ReactNode[] = [];
276
+
277
+ React.Children.forEach(node, (child) => {
278
+ if (typeof child === 'string' || typeof child === 'number') {
279
+ labels.push(<span key={labels.length} className="rt-SidebarMenuLabel">{child}</span>);
280
+ } else if (React.isValidElement(child)) {
281
+ const el = child as React.ReactElement<any>;
282
+ // Check if it's an SVG or icon component
283
+ if (el.type === 'svg' || (el.props && el.props.icon) || (typeof el.type === 'function' && ((el.type as any).displayName?.includes('Icon') || (el.type as any).name?.includes('Icon')))) {
284
+ icons.push(child);
285
+ } else {
286
+ labels.push(child);
287
+ }
288
+ } else if (child) {
289
+ labels.push(child);
290
+ }
291
+ });
292
+
293
+ return { icons, labels };
294
+ };
295
+
271
296
  // Wrap bare text nodes so CSS can target labels (e.g., for truncation in thin mode)
272
297
  const wrapTextNodes = (node: React.ReactNode): React.ReactNode => {
273
298
  if (typeof node === 'string' || typeof node === 'number') {
@@ -289,6 +314,9 @@ const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonP
289
314
 
290
315
  const processedChildren = wrapTextNodes(children);
291
316
 
317
+ // For thin mode, separate icons into a wrapper for targeted background styling
318
+ const { icons, labels } = isThinMode ? separateIconsAndLabels(children) : { icons: [], labels: [] };
319
+
292
320
  // When rendering asChild, Slot expects a single child element. We still want to
293
321
  // append optional badge/shortcut inside that element so they render with Link.
294
322
  const slottedChildren = React.useMemo(() => {
@@ -347,6 +375,19 @@ const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonP
347
375
  >
348
376
  {asChild ? (
349
377
  slottedChildren
378
+ ) : isThinMode && icons.length > 0 ? (
379
+ <>
380
+ <span className="rt-SidebarMenuIconWrapper">{icons}</span>
381
+ {labels.map((label, index) => (
382
+ <React.Fragment key={index}>
383
+ {typeof label === 'string' || typeof label === 'number' ? (
384
+ <span className="rt-SidebarMenuLabel">{label}</span>
385
+ ) : (
386
+ label
387
+ )}
388
+ </React.Fragment>
389
+ ))}
390
+ </>
350
391
  ) : (
351
392
  <>
352
393
  {processedChildren}
@@ -522,8 +563,10 @@ const SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion
522
563
  );
523
564
  });
524
565
 
566
+ // DropdownMenu only supports sizes 1 and 2, so map size 3 to 2
567
+ const dropdownSize = visual?.size === '3' ? '2' : visual?.size;
525
568
  return (
526
- <DropdownMenu.Content size={visual?.size} variant={visual?.menuVariant} className={classNames(className)}>
569
+ <DropdownMenu.Content size={dropdownSize} variant={visual?.menuVariant} className={classNames(className)}>
527
570
  <DropdownMenu.Group>{normalized}</DropdownMenu.Group>
528
571
  </DropdownMenu.Content>
529
572
  );
@@ -299,7 +299,6 @@
299
299
  &:where(:has(.rt-TextAreaInput:where(:disabled, :read-only))) {
300
300
  /* Blend with grey */
301
301
  background-image: linear-gradient(var(--gray-a2), var(--gray-a2));
302
- box-shadow: var(--shadow-1);
303
302
  }
304
303
  }
305
304
 
@@ -476,7 +476,6 @@
476
476
  &:where(:has(.rt-TextFieldInput:where(:disabled, :read-only))) {
477
477
  /* Blend with grey */
478
478
  background-image: linear-gradient(var(--gray-a2), var(--gray-a2));
479
- box-shadow: var(--shadow-1);
480
479
  }
481
480
  }
482
481