@manafishrov/ui 1.0.5 → 1.2.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 (155) hide show
  1. package/dist/_virtual/calendar-month.js +10 -0
  2. package/dist/_virtual/calendar-month.js.map +1 -0
  3. package/dist/_virtual/check-circle.js +10 -0
  4. package/dist/_virtual/check-circle.js.map +1 -0
  5. package/dist/_virtual/check.js +10 -0
  6. package/dist/_virtual/check.js.map +1 -0
  7. package/dist/_virtual/{outline-check.js → chevron-left.js} +4 -4
  8. package/dist/_virtual/chevron-left.js.map +1 -0
  9. package/dist/_virtual/{outline-expand-more.js → chevron-right.js} +4 -4
  10. package/dist/_virtual/chevron-right.js.map +1 -0
  11. package/dist/_virtual/close.js +10 -0
  12. package/dist/_virtual/close.js.map +1 -0
  13. package/dist/_virtual/error.js +10 -0
  14. package/dist/_virtual/error.js.map +1 -0
  15. package/dist/_virtual/{outline-expand-less.js → expand-less.js} +2 -2
  16. package/dist/_virtual/expand-less.js.map +1 -0
  17. package/dist/_virtual/expand-more.js +10 -0
  18. package/dist/_virtual/expand-more.js.map +1 -0
  19. package/dist/_virtual/info.js +10 -0
  20. package/dist/_virtual/info.js.map +1 -0
  21. package/dist/_virtual/more-horiz.js +10 -0
  22. package/dist/_virtual/more-horiz.js.map +1 -0
  23. package/dist/_virtual/progress-activity.js +10 -0
  24. package/dist/_virtual/progress-activity.js.map +1 -0
  25. package/dist/_virtual/search.js +10 -0
  26. package/dist/_virtual/search.js.map +1 -0
  27. package/dist/_virtual/side-navigation.js +10 -0
  28. package/dist/_virtual/side-navigation.js.map +1 -0
  29. package/dist/_virtual/visibility-off.js +10 -0
  30. package/dist/_virtual/visibility-off.js.map +1 -0
  31. package/dist/_virtual/visibility.js +10 -0
  32. package/dist/_virtual/visibility.js.map +1 -0
  33. package/dist/_virtual/warning.js +10 -0
  34. package/dist/_virtual/warning.js.map +1 -0
  35. package/dist/components/Accordion.js +1 -1
  36. package/dist/components/Accordion.js.map +1 -1
  37. package/dist/components/Breadcrumb.js +28 -24
  38. package/dist/components/Breadcrumb.js.map +1 -1
  39. package/dist/components/Carousel.js +23 -23
  40. package/dist/components/Carousel.js.map +1 -1
  41. package/dist/components/Checkbox.js +11 -11
  42. package/dist/components/Checkbox.js.map +1 -1
  43. package/dist/components/Combobox.js +15 -15
  44. package/dist/components/Combobox.js.map +1 -1
  45. package/dist/components/DatePicker.js +21 -21
  46. package/dist/components/DatePicker.js.map +1 -1
  47. package/dist/components/Dialog.js +7 -7
  48. package/dist/components/Dialog.js.map +1 -1
  49. package/dist/components/Menu.js +5 -5
  50. package/dist/components/Menu.js.map +1 -1
  51. package/dist/components/MenuCombobox.js +29 -29
  52. package/dist/components/MenuCombobox.js.map +1 -1
  53. package/dist/components/NavigationMenu.js +5 -5
  54. package/dist/components/NavigationMenu.js.map +1 -1
  55. package/dist/components/NumberInput.js +2 -2
  56. package/dist/components/NumberInput.js.map +1 -1
  57. package/dist/components/Pagination.js +18 -18
  58. package/dist/components/Pagination.js.map +1 -1
  59. package/dist/components/PasswordInput.js +11 -11
  60. package/dist/components/PasswordInput.js.map +1 -1
  61. package/dist/components/PinInput.js +24 -24
  62. package/dist/components/PinInput.js.map +1 -1
  63. package/dist/components/Select.js +8 -8
  64. package/dist/components/Select.js.map +1 -1
  65. package/dist/components/Sheet.js +10 -10
  66. package/dist/components/Sheet.js.map +1 -1
  67. package/dist/components/Spinner.js +17 -13
  68. package/dist/components/Spinner.js.map +1 -1
  69. package/dist/components/TagsInput.js +6 -6
  70. package/dist/components/TagsInput.js.map +1 -1
  71. package/dist/components/TreeView.js +1 -1
  72. package/dist/components/TreeView.js.map +1 -1
  73. package/dist/components/sidebar/Sidebar.d.ts +2 -1
  74. package/dist/components/sidebar/Sidebar.js +25 -18
  75. package/dist/components/sidebar/Sidebar.js.map +1 -1
  76. package/dist/components/sidebar/SidebarDesktop.js +39 -27
  77. package/dist/components/sidebar/SidebarDesktop.js.map +1 -1
  78. package/dist/components/sidebar/SidebarMenu.d.ts +5 -1
  79. package/dist/components/sidebar/SidebarMenu.js +96 -89
  80. package/dist/components/sidebar/SidebarMenu.js.map +1 -1
  81. package/dist/components/sidebar/SidebarMobile.js +30 -31
  82. package/dist/components/sidebar/SidebarMobile.js.map +1 -1
  83. package/dist/components/sidebar/SidebarProvider.d.ts +5 -2
  84. package/dist/components/sidebar/SidebarProvider.js +46 -50
  85. package/dist/components/sidebar/SidebarProvider.js.map +1 -1
  86. package/dist/components/sidebar/SidebarSubComponents.js +79 -64
  87. package/dist/components/sidebar/SidebarSubComponents.js.map +1 -1
  88. package/dist/components/sidebar/context.d.ts +1 -0
  89. package/dist/components/sidebar/context.js.map +1 -1
  90. package/dist/components/sidebar/index.js +23 -22
  91. package/dist/components/toaster/Toaster.js +11 -11
  92. package/dist/components/toaster/Toaster.js.map +1 -1
  93. package/dist/paraglide/messages/ui_breadcrumb_label.js +21 -0
  94. package/dist/paraglide/messages/ui_breadcrumb_label.js.map +1 -0
  95. package/dist/theme.css +1 -1
  96. package/package.json +3 -3
  97. package/src/components/Accordion.tsx +2 -2
  98. package/src/components/Breadcrumb.tsx +12 -5
  99. package/src/components/Carousel.tsx +4 -4
  100. package/src/components/Checkbox.tsx +2 -2
  101. package/src/components/Combobox.tsx +8 -8
  102. package/src/components/DatePicker.tsx +6 -6
  103. package/src/components/Dialog.tsx +2 -2
  104. package/src/components/Menu.tsx +8 -8
  105. package/src/components/MenuCombobox.tsx +7 -7
  106. package/src/components/NavigationMenu.tsx +6 -6
  107. package/src/components/NumberInput.tsx +4 -4
  108. package/src/components/Pagination.tsx +6 -6
  109. package/src/components/PasswordInput.tsx +4 -4
  110. package/src/components/PinInput.tsx +3 -3
  111. package/src/components/Select.tsx +6 -6
  112. package/src/components/Sheet.tsx +6 -6
  113. package/src/components/Spinner.tsx +2 -9
  114. package/src/components/TagsInput.tsx +9 -9
  115. package/src/components/TreeView.tsx +2 -2
  116. package/src/components/sidebar/Sidebar.tsx +20 -4
  117. package/src/components/sidebar/SidebarDesktop.tsx +47 -19
  118. package/src/components/sidebar/SidebarMenu.tsx +64 -17
  119. package/src/components/sidebar/SidebarMobile.tsx +6 -2
  120. package/src/components/sidebar/SidebarProvider.tsx +36 -35
  121. package/src/components/sidebar/SidebarSubComponents.tsx +19 -9
  122. package/src/components/sidebar/context.ts +1 -0
  123. package/src/components/toaster/Toaster.tsx +12 -12
  124. package/src/theme.css +9 -6
  125. package/dist/_virtual/outline-calendar-month.js +0 -10
  126. package/dist/_virtual/outline-calendar-month.js.map +0 -1
  127. package/dist/_virtual/outline-check-circle.js +0 -10
  128. package/dist/_virtual/outline-check-circle.js.map +0 -1
  129. package/dist/_virtual/outline-check.js.map +0 -1
  130. package/dist/_virtual/outline-chevron-left.js +0 -10
  131. package/dist/_virtual/outline-chevron-left.js.map +0 -1
  132. package/dist/_virtual/outline-chevron-right.js +0 -10
  133. package/dist/_virtual/outline-chevron-right.js.map +0 -1
  134. package/dist/_virtual/outline-close.js +0 -10
  135. package/dist/_virtual/outline-close.js.map +0 -1
  136. package/dist/_virtual/outline-error.js +0 -10
  137. package/dist/_virtual/outline-error.js.map +0 -1
  138. package/dist/_virtual/outline-expand-less.js.map +0 -1
  139. package/dist/_virtual/outline-expand-more.js.map +0 -1
  140. package/dist/_virtual/outline-info.js +0 -10
  141. package/dist/_virtual/outline-info.js.map +0 -1
  142. package/dist/_virtual/outline-more-horiz.js +0 -10
  143. package/dist/_virtual/outline-more-horiz.js.map +0 -1
  144. package/dist/_virtual/outline-remove.js +0 -10
  145. package/dist/_virtual/outline-remove.js.map +0 -1
  146. package/dist/_virtual/outline-search.js +0 -10
  147. package/dist/_virtual/outline-search.js.map +0 -1
  148. package/dist/_virtual/outline-view-sidebar.js +0 -10
  149. package/dist/_virtual/outline-view-sidebar.js.map +0 -1
  150. package/dist/_virtual/outline-visibility-off.js +0 -10
  151. package/dist/_virtual/outline-visibility-off.js.map +0 -1
  152. package/dist/_virtual/outline-visibility.js +0 -10
  153. package/dist/_virtual/outline-visibility.js.map +0 -1
  154. package/dist/_virtual/outline-warning.js +0 -10
  155. package/dist/_virtual/outline-warning.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TagsInput.js","sources":["../../src/components/TagsInput.tsx"],"sourcesContent":["import { TagsInput as TagsInputPrimitive } from '@ark-ui/solid/tags-input';\nimport { type Component, splitProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport OutlineCloseIcon from '~icons/ic/outline-close';\n\nexport const TagsInput = TagsInputPrimitive.Root;\nexport const TagsInputContext = TagsInputPrimitive.Context;\nexport const TagsInputHiddenInput = TagsInputPrimitive.HiddenInput;\nexport const TagsInputLabel: Component<TagsInputPrimitive.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.Label\n class={cn(\n 'mb-1 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const TagsInputControl: Component<TagsInputPrimitive.ControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.Control\n class={cn(\n 'group relative min-h-10 py-1.5 pr-8 pl-2.5 text-sm [&_svg:not([class*=\"size-\"])]:size-4 gap-1 shadow-sm flex w-full flex-wrap items-center rounded-lg border border-input bg-transparent transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50',\n 'data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 dark:data-[invalid=true]:ring-destructive/40',\n 'data-[disabled=true]:bg-input/50 data-[disabled=true]:opacity-50 dark:data-[disabled=true]:bg-input/80',\n 'data-[readonly=true]:focus-within:border-input data-[readonly=true]:focus-within:ring-0',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </TagsInputPrimitive.Control>\n );\n};\n\nexport const TagsInputInput: Component<TagsInputPrimitive.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.Input\n class={cn(\n 'w-24 min-w-24 flex-none bg-transparent outline-none placeholder:text-muted-foreground',\n 'group-has-[div[data-slot=tags-input-item-preview]]:placeholder:text-transparent',\n 'max-w-full',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TagsInputClearTrigger: Component<TagsInputPrimitive.ClearTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.ClearTrigger\n class={cn(\n 'right-2 top-1/2 p-0.5 absolute -translate-y-1/2 rounded-sm text-muted-foreground transition-colors hover:text-foreground',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <OutlineCloseIcon class='size-3.5 pointer-events-none' />}\n </TagsInputPrimitive.ClearTrigger>\n );\n};\n\nexport const TagsInputItem: Component<TagsInputPrimitive.ItemProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.Item\n class={cn('inline-flex items-center outline-none cursor-default', local.class)}\n {...others}\n >\n {local.children}\n </TagsInputPrimitive.Item>\n );\n};\n\nexport const TagsInputItemPreview: Component<TagsInputPrimitive.ItemPreviewProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.ItemPreview\n data-slot='tags-input-item-preview'\n class={cn(\n 'h-6 gap-1 px-1.5 text-xs font-medium border border-transparent has-data-[slot=tags-input-item-delete-trigger]:pr-0 inline-flex items-center justify-center rounded-md bg-muted whitespace-nowrap text-foreground transition-colors',\n 'data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:border-ring',\n 'data-disabled:pointer-events-none data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TagsInputItemText: Component<TagsInputPrimitive.ItemTextProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <TagsInputPrimitive.ItemText class={cn(local.class)} {...others} />;\n};\n\nexport const TagsInputItemInput: Component<TagsInputPrimitive.ItemInputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.ItemInput\n class={cn(\n 'py-0 px-1.5 h-6 text-xs rounded-md border border-input bg-background text-foreground outline-none',\n 'focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:border-ring',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TagsInputItemDeleteTrigger: Component<TagsInputPrimitive.ItemDeleteTriggerProps> = (\n props,\n) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.ItemDeleteTrigger\n data-slot='tags-input-item-delete-trigger'\n class={cn(\n '-ml-1 p-0.5 inline-flex items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <OutlineCloseIcon class='size-3 pointer-events-none' />}\n </TagsInputPrimitive.ItemDeleteTrigger>\n );\n};\n"],"names":["TagsInput","TagsInputPrimitive","Root","TagsInputContext","Context","TagsInputHiddenInput","HiddenInput","TagsInputLabel","props","local","others","splitProps","_$createComponent","Label","_$mergeProps","cn","class","TagsInputControl","Control","children","TagsInputInput","Input","TagsInputClearTrigger","ClearTrigger","OutlineCloseIcon","TagsInputItem","Item","TagsInputItemPreview","ItemPreview","TagsInputItemText","ItemText","TagsInputItemInput","ItemInput","TagsInputItemDeleteTrigger","ItemDeleteTrigger"],"mappings":";;;;;AAKO,MAAMA,IAAYC,EAAmBC,MAC/BC,IAAmBF,EAAmBG,SACtCC,IAAuBJ,EAAmBK,aAC1CC,IAA4DC,CAAAA,MAAU;AACjF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGX,EAAmBY,OAAKC,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AAAA,aAE5BC,EACL,gIACAN,EAAMO,KACR;AAAA,IAAC;AAAA,EAAA,GACGN,GAAM;AAAA,IAAA,IAAAS,WAAA;AAAA,aAETV,EAAMU,YAAQP,EAAKY,GAAgB;AAAA,QAAA,OAAA;AAAA,MAAA,CAAA;AAAA,IAAsC;AAAA,EAAA,CAAA,CAAA;AAGhF;"}
1
+ {"version":3,"file":"TagsInput.js","sources":["../../src/components/TagsInput.tsx"],"sourcesContent":["import { TagsInput as TagsInputPrimitive } from '@ark-ui/solid/tags-input';\nimport { type Component, splitProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport CloseIcon from '~icons/material-symbols/close';\n\nexport const TagsInput = TagsInputPrimitive.Root;\nexport const TagsInputContext = TagsInputPrimitive.Context;\nexport const TagsInputHiddenInput = TagsInputPrimitive.HiddenInput;\nexport const TagsInputLabel: Component<TagsInputPrimitive.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.Label\n class={cn(\n 'mb-1 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const TagsInputControl: Component<TagsInputPrimitive.ControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.Control\n class={cn(\n 'group min-h-10 py-1.5 pr-8 pl-2.5 text-sm [&_svg:not([class*=\"size-\"])]:size-4 gap-1 shadow-sm relative flex w-full flex-wrap items-center rounded-lg border border-input bg-transparent transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50',\n 'data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 dark:data-[invalid=true]:ring-destructive/40',\n 'data-[disabled=true]:bg-input/50 data-[disabled=true]:opacity-50 dark:data-[disabled=true]:bg-input/80',\n 'data-[readonly=true]:focus-within:border-input data-[readonly=true]:focus-within:ring-0',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </TagsInputPrimitive.Control>\n );\n};\n\nexport const TagsInputInput: Component<TagsInputPrimitive.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.Input\n class={cn(\n 'w-24 min-w-24 flex-none bg-transparent outline-none placeholder:text-muted-foreground',\n 'group-has-[div[data-slot=tags-input-item-preview]]:placeholder:text-transparent',\n 'max-w-full',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TagsInputClearTrigger: Component<TagsInputPrimitive.ClearTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.ClearTrigger\n class={cn(\n 'right-2 p-0.5 absolute top-1/2 -translate-y-1/2 rounded-sm text-muted-foreground transition-colors hover:text-foreground',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <CloseIcon class='size-3.5 pointer-events-none' />}\n </TagsInputPrimitive.ClearTrigger>\n );\n};\n\nexport const TagsInputItem: Component<TagsInputPrimitive.ItemProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.Item\n class={cn('inline-flex cursor-default items-center outline-none', local.class)}\n {...others}\n >\n {local.children}\n </TagsInputPrimitive.Item>\n );\n};\n\nexport const TagsInputItemPreview: Component<TagsInputPrimitive.ItemPreviewProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.ItemPreview\n data-slot='tags-input-item-preview'\n class={cn(\n 'h-6 gap-1 px-1.5 text-xs font-medium has-data-[slot=tags-input-item-delete-trigger]:pr-0 inline-flex items-center justify-center rounded-md border border-transparent bg-muted whitespace-nowrap text-foreground transition-colors',\n 'data-highlighted:border-ring data-highlighted:bg-accent data-highlighted:text-accent-foreground',\n 'data-disabled:pointer-events-none data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TagsInputItemText: Component<TagsInputPrimitive.ItemTextProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <TagsInputPrimitive.ItemText class={cn(local.class)} {...others} />;\n};\n\nexport const TagsInputItemInput: Component<TagsInputPrimitive.ItemInputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TagsInputPrimitive.ItemInput\n class={cn(\n 'py-0 px-1.5 h-6 text-xs rounded-md border border-input bg-background text-foreground outline-none',\n 'focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TagsInputItemDeleteTrigger: Component<TagsInputPrimitive.ItemDeleteTriggerProps> = (\n props,\n) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TagsInputPrimitive.ItemDeleteTrigger\n data-slot='tags-input-item-delete-trigger'\n class={cn(\n '-ml-1 p-0.5 inline-flex items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <CloseIcon class='size-3 pointer-events-none' />}\n </TagsInputPrimitive.ItemDeleteTrigger>\n );\n};\n"],"names":["TagsInput","TagsInputPrimitive","Root","TagsInputContext","Context","TagsInputHiddenInput","HiddenInput","TagsInputLabel","props","local","others","splitProps","_$createComponent","Label","_$mergeProps","cn","class","TagsInputControl","Control","children","TagsInputInput","Input","TagsInputClearTrigger","ClearTrigger","CloseIcon","TagsInputItem","Item","TagsInputItemPreview","ItemPreview","TagsInputItemText","ItemText","TagsInputItemInput","ItemInput","TagsInputItemDeleteTrigger","ItemDeleteTrigger"],"mappings":";;;;;AAKO,MAAMA,IAAYC,EAAmBC,MAC/BC,IAAmBF,EAAmBG,SACtCC,IAAuBJ,EAAmBK,aAC1CC,IAA4DC,CAAAA,MAAU;AACjF,QAAM,CAACC,GAA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SAAAI,EACGX,EAAmBiC,mBAAiBpB,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAE5BC,EACL,gIACAN,EAAMO,KACR;AAAA,IAAC;AAAA,EAAA,GACGN,GAAM;AAAA,IAAA,IAAAS,WAAA;AAAA,aAETV,EAAMU,YAAQP,EAAKY,GAAS;AAAA,QAAA,OAAA;AAAA,MAAA,CAAA;AAAA,IAAsC;AAAA,EAAA,CAAA,CAAA;AAGzE;"}
@@ -3,7 +3,7 @@ import { tree_view_exports as t } from "../node_modules/.bun/@ark-ui_solid@5.34.
3
3
  import { createTreeCollection as I } from "../node_modules/.bun/@ark-ui_solid@5.34.0_95b571dd5236cc92/node_modules/@ark-ui/solid/dist/chunk/EFII6TXL.js";
4
4
  import { splitProps as s, Show as l } from "solid-js";
5
5
  import { cn as i } from "../node_modules/.bun/tailwind-variants@3.2.2_e7cab99c1b720a38/node_modules/tailwind-variants/dist/index.js";
6
- import a from "../_virtual/outline-chevron-right.js";
6
+ import a from "../_virtual/chevron-right.js";
7
7
  const f = t.Root, m = t.Label, b = t.NodeProvider, v = (n) => {
8
8
  const [e, o] = s(n, ["class"]);
9
9
  return r(t.Tree, c({
@@ -1 +1 @@
1
- {"version":3,"file":"TreeView.js","sources":["../../src/components/TreeView.tsx"],"sourcesContent":["import { TreeView as TreeViewPrimitive, createTreeCollection } from '@ark-ui/solid/tree-view';\nimport { Show, splitProps, type Component } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport OutlineChevronRightIcon from '~icons/ic/outline-chevron-right';\n\nexport const TreeView = TreeViewPrimitive.Root;\nexport const TreeViewLabel = TreeViewPrimitive.Label;\nexport const TreeViewNodeProvider = TreeViewPrimitive.NodeProvider;\nexport { createTreeCollection };\n\nexport const TreeViewTree: Component<TreeViewPrimitive.TreeProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <TreeViewPrimitive.Tree class={cn('gap-1 flex flex-col', local.class)} {...others} />;\n};\n\nexport const TreeViewItem: Component<TreeViewPrimitive.ItemProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TreeViewPrimitive.Item\n class={cn(\n 'gap-2 px-2 py-1.5 text-sm relative flex cursor-pointer items-center rounded-md transition-colors outline-none select-none hover:bg-accent/50 hover:text-accent-foreground/50 focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-selected:bg-accent data-selected:text-accent-foreground',\n local.class,\n )}\n {...others}\n >\n <Show when={local.children} fallback={<TreeViewPrimitive.ItemText />}>\n {local.children}\n </Show>\n </TreeViewPrimitive.Item>\n );\n};\n\nexport const TreeViewBranch: Component<TreeViewPrimitive.BranchProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <TreeViewPrimitive.Branch class={cn('relative', local.class)} {...others} />;\n};\n\nexport const TreeViewBranchControl: Component<TreeViewPrimitive.BranchControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TreeViewPrimitive.BranchControl\n class={cn(\n 'gap-2 px-2 py-1.5 text-sm flex cursor-pointer items-center rounded-md transition-colors outline-none select-none hover:bg-accent/50 hover:text-accent-foreground/50 focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50',\n local.class,\n )}\n {...others}\n >\n <TreeViewPrimitive.BranchIndicator class='text-muted-foreground transition-transform data-[state=open]:rotate-90'>\n <OutlineChevronRightIcon class='size-4' />\n </TreeViewPrimitive.BranchIndicator>\n <Show when={local.children} fallback={<TreeViewPrimitive.BranchText />}>\n {local.children}\n </Show>\n </TreeViewPrimitive.BranchControl>\n );\n};\n\nexport const TreeViewBranchContent: Component<TreeViewPrimitive.BranchContentProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TreeViewPrimitive.BranchContent\n class={cn('pl-4 relative duration-200', local.class)}\n {...others}\n />\n );\n};\n"],"names":["TreeView","TreeViewPrimitive","Root","TreeViewLabel","Label","TreeViewNodeProvider","NodeProvider","TreeViewTree","props","local","others","splitProps","_$createComponent","Tree","_$mergeProps","cn","class","TreeViewItem","Item","children","Show","when","fallback","ItemText","TreeViewBranch","Branch","TreeViewBranchControl","BranchControl","BranchIndicator","OutlineChevronRightIcon","BranchText","TreeViewBranchContent","BranchContent"],"mappings":";;;;;;AAKO,MAAMA,IAAWC,EAAkBC,MAC7BC,IAAgBF,EAAkBG,OAClCC,IAAuBJ,EAAkBK,cAGzCC,IAAwDC,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EAAQX,EAAkBY,MAAIC,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAAQC,EAAG,uBAAuBN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GAAMN,CAAM,CAAA;AAC1F,GAEaO,IAAwDT,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,SAAS,UAAU,CAAC;AAC/D,SAAAI,EACGX,EAAkBiB,MAAIJ,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACdC,EACL,+YACAN,EAAMO,KACR;AAAA,IAAC;AAAA,EAAA,GACGN,GAAM;AAAA,IAAA,IAAAS,WAAA;AAAA,aAAAP,EAETQ,GAAI;AAAA,QAAA,IAACC,OAAI;AAAA,iBAAEZ,EAAMU;AAAAA,QAAQ;AAAA,QAAA,IAAEG,WAAQ;AAAA,iBAAAV,EAAGX,EAAkBsB,UAAQ,EAAA;AAAA,QAAA;AAAA,QAAA,IAAAJ,WAAA;AAAA,iBAC9DV,EAAMU;AAAAA,QAAQ;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAIvB,GAEaK,IAA4DhB,CAAAA,MAAU;AACjF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EA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src/components/TreeView.tsx"],"sourcesContent":["import { TreeView as TreeViewPrimitive, createTreeCollection } from '@ark-ui/solid/tree-view';\nimport { Show, splitProps, type Component } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport ChevronRightIcon from '~icons/material-symbols/chevron-right';\n\nexport const TreeView = TreeViewPrimitive.Root;\nexport const TreeViewLabel = TreeViewPrimitive.Label;\nexport const TreeViewNodeProvider = TreeViewPrimitive.NodeProvider;\nexport { createTreeCollection };\n\nexport const TreeViewTree: Component<TreeViewPrimitive.TreeProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <TreeViewPrimitive.Tree class={cn('gap-1 flex flex-col', local.class)} {...others} />;\n};\n\nexport const TreeViewItem: Component<TreeViewPrimitive.ItemProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TreeViewPrimitive.Item\n class={cn(\n 'gap-2 px-2 py-1.5 text-sm relative flex cursor-pointer items-center rounded-md transition-colors outline-none select-none hover:bg-accent/50 hover:text-accent-foreground/50 focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-selected:bg-accent data-selected:text-accent-foreground',\n local.class,\n )}\n {...others}\n >\n <Show when={local.children} fallback={<TreeViewPrimitive.ItemText />}>\n {local.children}\n </Show>\n </TreeViewPrimitive.Item>\n );\n};\n\nexport const TreeViewBranch: Component<TreeViewPrimitive.BranchProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <TreeViewPrimitive.Branch class={cn('relative', local.class)} {...others} />;\n};\n\nexport const TreeViewBranchControl: Component<TreeViewPrimitive.BranchControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <TreeViewPrimitive.BranchControl\n class={cn(\n 'gap-2 px-2 py-1.5 text-sm flex cursor-pointer items-center rounded-md transition-colors outline-none select-none hover:bg-accent/50 hover:text-accent-foreground/50 focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50',\n local.class,\n )}\n {...others}\n >\n <TreeViewPrimitive.BranchIndicator class='text-muted-foreground transition-transform data-[state=open]:rotate-90'>\n <ChevronRightIcon class='size-4' />\n </TreeViewPrimitive.BranchIndicator>\n <Show when={local.children} fallback={<TreeViewPrimitive.BranchText />}>\n {local.children}\n </Show>\n </TreeViewPrimitive.BranchControl>\n );\n};\n\nexport const TreeViewBranchContent: Component<TreeViewPrimitive.BranchContentProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <TreeViewPrimitive.BranchContent\n class={cn('pl-4 relative duration-200', local.class)}\n {...others}\n />\n );\n};\n"],"names":["TreeView","TreeViewPrimitive","Root","TreeViewLabel","Label","TreeViewNodeProvider","NodeProvider","TreeViewTree","props","local","others","splitProps","_$createComponent","Tree","_$mergeProps","cn","class","TreeViewItem","Item","children","Show","when","fallback","ItemText","TreeViewBranch","Branch","TreeViewBranchControl","BranchControl","BranchIndicator","ChevronRightIcon","BranchText","TreeViewBranchContent","BranchContent"],"mappings":";;;;;;AAKO,MAAMA,IAAWC,EAAkBC,MAC7BC,IAAgBF,EAAkBG,OAClCC,IAAuBJ,EAAkBK,cAGzCC,IAAwDC,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EAAQX,EAAkBY,MAAIC,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAAQC,EAAG,uBAAuBN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GAAMN,CAAM,CAAA;AAC1F,GAEaO,IAAwDT,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,SAAS,UAAU,CAAC;AAC/D,SAAAI,EACGX,EAAkBiB,MAAIJ,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACdC,EACL,+YACAN,EAAMO,KACR;AA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AAAA,QAAA,IAAAX,WAAA;AAAA,iBAChEV,EAAMU;AAAAA,QAAQ;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAIvB,GAEaY,IAA0EvB,CAAAA,MAAU;AAC/F,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGX,EAAkB+B,eAAalB,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACvBC,EAAG,8BAA8BN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GAChDN,CAAM,CAAA;AAGhB;"}
@@ -1,7 +1,8 @@
1
1
  import { Component, ComponentProps } from 'solid-js';
2
- export type SidebarProps = ComponentProps<'div'> & {
2
+ export type SidebarProps = ComponentProps<'aside'> & {
3
3
  side?: 'left' | 'right';
4
4
  variant?: 'sidebar' | 'floating' | 'inset';
5
5
  collapsible?: 'offcanvas' | 'icon' | 'none';
6
+ disableMobileSidebar?: boolean;
6
7
  };
7
8
  export declare const Sidebar: Component<SidebarProps>;
@@ -1,36 +1,43 @@
1
- import { createComponent as r, Show as t } from "solid-js/web";
2
- import { createEffect as c } from "solid-js";
3
- import { useSidebar as a } from "./context.js";
4
- import { SidebarDesktop as f } from "./SidebarDesktop.js";
5
- import { SidebarMobile as m } from "./SidebarMobile.js";
6
- const S = (e) => {
1
+ import { createComponent as i, Show as r } from "solid-js/web";
2
+ import { onCleanup as s, createEffect as o } from "solid-js";
3
+ import { createMediaQuery as f } from "../../primitives/createMediaQuery.js";
4
+ import { useSidebar as m } from "./context.js";
5
+ import { SidebarDesktop as u } from "./SidebarDesktop.js";
6
+ import { SidebarMobile as S } from "./SidebarMobile.js";
7
+ const D = (e) => {
7
8
  const {
8
- isMobile: o,
9
- setSide: n
10
- } = a();
11
- return c(() => {
12
- const i = e.side ?? "left";
13
- n(i);
14
- }), r(t, {
9
+ isMobile: l,
10
+ setMobileDisabled: t,
11
+ setOpen: n,
12
+ setSide: a
13
+ } = m(), b = f("(max-width: 768px)");
14
+ return s(() => {
15
+ t(!1);
16
+ }), o(() => {
17
+ const c = e.side ?? "left", d = e.disableMobileSidebar ?? !1;
18
+ a(c), t(d);
19
+ }), o(() => {
20
+ e.disableMobileSidebar === !0 && e.collapsible === "icon" && n(!b());
21
+ }), i(r, {
15
22
  get when() {
16
- return !o();
23
+ return !l();
17
24
  },
18
25
  get fallback() {
19
- return r(t, {
26
+ return i(r, {
20
27
  get when() {
21
28
  return (e.collapsible ?? "offcanvas") !== "none";
22
29
  },
23
30
  get children() {
24
- return r(m, e);
31
+ return i(S, e);
25
32
  }
26
33
  });
27
34
  },
28
35
  get children() {
29
- return r(f, e);
36
+ return i(u, e);
30
37
  }
31
38
  });
32
39
  };
33
40
  export {
34
- S as Sidebar
41
+ D as Sidebar
35
42
  };
36
43
  //# sourceMappingURL=Sidebar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sources":["../../../src/components/sidebar/Sidebar.tsx"],"sourcesContent":["import { type Component, type ComponentProps, createEffect } from 'solid-js';\n\nimport { useSidebar } from './context';\nimport { SidebarDesktop } from './SidebarDesktop';\nimport { SidebarMobile } from './SidebarMobile';\n\nexport type SidebarProps = ComponentProps<'div'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n};\n\nexport const Sidebar: Component<SidebarProps> = (props) => {\n const { isMobile, setSide } = useSidebar();\n\n // Set side on initial render and track changes\n createEffect(() => {\n const currentSide = props.side ?? 'left';\n setSide(currentSide);\n });\n return (\n <Show\n when={!isMobile()}\n fallback={\n <Show when={(props.collapsible ?? 'offcanvas') !== 'none'}>\n <SidebarMobile {...props} />\n </Show>\n }\n >\n <SidebarDesktop {...props} />\n </Show>\n );\n};\n"],"names":["Sidebar","props","isMobile","setSide","useSidebar","createEffect","currentSide","side","_$createComponent","_$Show","when","fallback","collapsible","children","SidebarMobile","SidebarDesktop"],"mappings":";;;;;AAYO,MAAMA,IAAoCC,CAAAA,MAAU;AACzD,QAAM;AAAA,IAAEC,UAAAA;AAAAA,IAAUC,SAAAA;AAAAA,EAAAA,IAAYC,EAAAA;AAG9BC,SAAAA,EAAa,MAAM;AACjB,UAAMC,IAAcL,EAAMM,QAAQ;AAClCJ,IAAAA,EAAQG,CAAW;AAAA,EACrB,CAAC,GACDE,EACGC,GAAI;AAAA,IAAA,IACHC,OAAI;AAAA,aAAE,CAACR,EAAAA;AAAAA,IAAU;AAAA,IAAA,IACjBS,WAAQ;AAAA,aAAAH,EACLC,GAAI;AAAA,QAAA,IAACC,OAAI;AAAA,kBAAGT,EAAMW,eAAe,iBAAiB;AAAA,QAAM;AAAA,QAAA,IAAAC,WAAA;AAAA,iBAAAL,EACtDM,GAAkBb,CAAK;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,IAAA,IAAAY,WAAA;AAAA,aAAAL,EAI3BO,GAAmBd,CAAK;AAAA,IAAA;AAAA,EAAA,CAAA;AAG/B;"}
1
+ {"version":3,"file":"Sidebar.js","sources":["../../../src/components/sidebar/Sidebar.tsx"],"sourcesContent":["import { type Component, type ComponentProps, createEffect, onCleanup } from 'solid-js';\n\nimport { createMediaQuery } from '@/primitives/createMediaQuery';\n\nimport { useSidebar } from './context';\nimport { SidebarDesktop } from './SidebarDesktop';\nimport { SidebarMobile } from './SidebarMobile';\n\nexport type SidebarProps = ComponentProps<'aside'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n disableMobileSidebar?: boolean;\n};\n\nexport const Sidebar: Component<SidebarProps> = (props) => {\n const { isMobile, setMobileDisabled, setOpen, setSide } = useSidebar();\n const isViewportMobile = createMediaQuery('(max-width: 768px)');\n\n onCleanup(() => {\n setMobileDisabled(false);\n });\n\n createEffect(() => {\n const currentSide = props.side ?? 'left';\n const mobileDisabled = props.disableMobileSidebar ?? false;\n setSide(currentSide);\n setMobileDisabled(mobileDisabled);\n });\n\n createEffect(() => {\n if (props.disableMobileSidebar === true && props.collapsible === 'icon') {\n setOpen(!isViewportMobile());\n }\n });\n\n return (\n <Show\n when={!isMobile()}\n fallback={\n <Show when={(props.collapsible ?? 'offcanvas') !== 'none'}>\n <SidebarMobile {...props} />\n </Show>\n }\n >\n <SidebarDesktop {...props} />\n </Show>\n );\n};\n"],"names":["Sidebar","props","isMobile","setMobileDisabled","setOpen","setSide","useSidebar","isViewportMobile","createMediaQuery","onCleanup","createEffect","currentSide","side","mobileDisabled","disableMobileSidebar","collapsible","_$createComponent","_$Show","when","fallback","children","SidebarMobile","SidebarDesktop"],"mappings":";;;;;;AAeO,MAAMA,IAAoCC,CAAAA,MAAU;AACzD,QAAM;AAAA,IAAEC,UAAAA;AAAAA,IAAUC,mBAAAA;AAAAA,IAAmBC,SAAAA;AAAAA,IAASC,SAAAA;AAAAA,EAAAA,IAAYC,EAAAA,GACpDC,IAAmBC,EAAiB,oBAAoB;AAE9DC,SAAAA,EAAU,MAAM;AACdN,IAAAA,EAAkB,EAAK;AAAA,EACzB,CAAC,GAEDO,EAAa,MAAM;AACjB,UAAMC,IAAcV,EAAMW,QAAQ,QAC5BC,IAAiBZ,EAAMa,wBAAwB;AACrDT,IAAAA,EAAQM,CAAW,GACnBR,EAAkBU,CAAc;AAAA,EAClC,CAAC,GAEDH,EAAa,MAAM;AACjB,IAAIT,EAAMa,yBAAyB,MAAQb,EAAMc,gBAAgB,UAC/DX,EAAQ,CAACG,GAAkB;AAAA,EAE/B,CAAC,GAEDS,EACGC,GAAI;AAAA,IAAA,IACHC,OAAI;AAAA,aAAE,CAAChB,EAAAA;AAAAA,IAAU;AAAA,IAAA,IACjBiB,WAAQ;AAAA,aAAAH,EACLC,GAAI;AAAA,QAAA,IAACC,OAAI;AAAA,kBAAGjB,EAAMc,eAAe,iBAAiB;AAAA,QAAM;AAAA,QAAA,IAAAK,WAAA;AAAA,iBAAAJ,EACtDK,GAAkBpB,CAAK;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,IAAA,IAAAmB,WAAA;AAAA,aAAAJ,EAI3BM,GAAmBrB,CAAK;AAAA,IAAA;AAAA,EAAA,CAAA;AAG/B;"}
@@ -1,51 +1,63 @@
1
- import { template as b, insert as g, createComponent as m, mergeProps as f, effect as w, setAttribute as d, className as x, spread as C } from "solid-js/web";
2
- import { cn as p } from "../../node_modules/.bun/tailwind-variants@3.2.2_e7cab99c1b720a38/node_modules/tailwind-variants/dist/index.js";
3
- import { useSidebar as k } from "./context.js";
4
- import { splitProps as u } from "solid-js";
5
- var S = /* @__PURE__ */ b('<div data-slot=sidebar-container><div data-sidebar=sidebar data-slot=sidebar-inner class="group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border">'), z = /* @__PURE__ */ b('<div class="group peer md:block hidden text-sidebar-foreground"data-slot=sidebar><div data-slot=sidebar-gap>');
6
- const D = (s) => {
7
- const [e, a] = u(s, ["variant", "side", "class", "children"]);
1
+ import { template as p, insert as h, createComponent as C, mergeProps as m, effect as D, style as k, className as u, setAttribute as s, spread as I } from "solid-js/web";
2
+ import { splitProps as w, createMemo as y } from "solid-js";
3
+ import { cn as d } from "../../node_modules/.bun/tailwind-variants@3.2.2_e7cab99c1b720a38/node_modules/tailwind-variants/dist/index.js";
4
+ import { SIDEBAR_WIDTH_ICON as M, SIDEBAR_WIDTH as A } from "./constants.js";
5
+ import { useSidebar as R } from "./context.js";
6
+ var z = /* @__PURE__ */ p('<aside data-slot=sidebar-container><div data-sidebar=sidebar data-slot=sidebar-inner class="group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border">'), B = /* @__PURE__ */ p("<div data-slot=sidebar><div data-slot=sidebar-gap>");
7
+ const E = (t) => d(t === !0 ? "group peer min-h-0 relative block self-stretch text-sidebar-foreground" : "group peer md:block min-h-0 relative hidden self-stretch text-sidebar-foreground"), H = (t) => d("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", t === "floating" || t === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"), N = (t) => {
8
+ const r = {
9
+ "--sidebar-width": A,
10
+ "--sidebar-width-icon": M
11
+ };
12
+ return typeof t == "object" && t !== null ? {
13
+ ...r,
14
+ ...t
15
+ } : r;
16
+ }, P = (t) => {
17
+ const [r, e] = w(t, ["variant", "side", "class", "children"]);
8
18
  return (() => {
9
- var i = S(), r = i.firstChild;
10
- return C(i, f({
19
+ var o = z(), l = o.firstChild;
20
+ return I(o, m({
11
21
  get class() {
12
- return p("inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear", e.side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", e.variant === "floating" || e.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", e.class);
22
+ return d("top-0 bottom-0 md:flex absolute z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear", r.side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", r.variant === "floating" || r.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", r.class);
13
23
  }
14
- }, a), !1, !0), g(r, () => e.children), i;
24
+ }, e), !1, !0), h(l, () => r.children), o;
15
25
  })();
16
- }, _ = (s) => {
26
+ }, O = (t) => {
17
27
  const {
18
- state: e
19
- } = k(), [a, i] = u(s, ["side", "variant", "collapsible", "class", "children"]);
28
+ state: r
29
+ } = R(), [e, o] = w(t, ["side", "variant", "collapsible", "disableMobileSidebar", "style", "class", "children"]), l = y(() => N(e.style));
20
30
  return (() => {
21
- var r = z(), h = r.firstChild;
22
- return g(r, m(D, f({
31
+ var i = B(), S = i.firstChild;
32
+ return h(i, C(P, m({
23
33
  get variant() {
24
- return a.variant ?? "sidebar";
34
+ return e.variant ?? "sidebar";
25
35
  },
26
36
  get side() {
27
- return a.side ?? "left";
37
+ return e.side ?? "left";
28
38
  },
29
39
  get class() {
30
- return a.class;
40
+ return d(e.disableMobileSidebar === !0 ? "flex" : "md:flex hidden", e.class);
31
41
  }
32
- }, i, {
42
+ }, o, {
33
43
  get children() {
34
- return a.children;
44
+ return e.children;
35
45
  }
36
- })), null), w((t) => {
37
- var l = e(), o = e() === "collapsed" ? a.collapsible ?? "offcanvas" : "", n = a.variant ?? "sidebar", c = a.side ?? "left", v = p("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", a.variant === "floating" || a.variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)");
38
- return l !== t.e && d(r, "data-state", t.e = l), o !== t.t && d(r, "data-collapsible", t.t = o), n !== t.a && d(r, "data-variant", t.a = n), c !== t.o && d(r, "data-side", t.o = c), v !== t.i && x(h, t.i = v), t;
46
+ })), null), D((a) => {
47
+ var x = l(), n = E(e.disableMobileSidebar), c = r(), b = r() === "collapsed" ? e.collapsible ?? "offcanvas" : "", g = e.variant ?? "sidebar", v = e.side ?? "left", f = H(e.variant);
48
+ return a.e = k(i, x, a.e), n !== a.t && u(i, a.t = n), c !== a.a && s(i, "data-state", a.a = c), b !== a.o && s(i, "data-collapsible", a.o = b), g !== a.i && s(i, "data-variant", a.i = g), v !== a.n && s(i, "data-side", a.n = v), f !== a.s && u(S, a.s = f), a;
39
49
  }, {
40
50
  e: void 0,
41
51
  t: void 0,
42
52
  a: void 0,
43
53
  o: void 0,
44
- i: void 0
45
- }), r;
54
+ i: void 0,
55
+ n: void 0,
56
+ s: void 0
57
+ }), i;
46
58
  })();
47
59
  };
48
60
  export {
49
- _ as SidebarDesktop
61
+ O as SidebarDesktop
50
62
  };
51
63
  //# sourceMappingURL=SidebarDesktop.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarDesktop.js","sources":["../../../src/components/sidebar/SidebarDesktop.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSXElement } from 'solid-js';\n\nimport { cn } from 'tailwind-variants';\n\nimport type { SidebarProps } from './Sidebar';\n\nimport { useSidebar } from './context';\n\ntype SidebarDesktopContainerProps = ComponentProps<'div'> & {\n variant: string;\n side: string;\n children: JSXElement;\n};\n\nconst SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props) => {\n const [local, others] = splitProps(props, ['variant', 'side', 'class', 'children']);\n return (\n <div\n data-slot='sidebar-container'\n class={cn(\n 'inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear',\n local.side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n local.class,\n )}\n {...others}\n >\n <div\n data-sidebar='sidebar'\n data-slot='sidebar-inner'\n class='group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border'\n >\n {local.children}\n </div>\n </div>\n );\n};\n\nexport const SidebarDesktop: Component<SidebarProps> = (props) => {\n const { state } = useSidebar();\n const [local, others] = splitProps(props, [\n 'side',\n 'variant',\n 'collapsible',\n 'class',\n 'children',\n ]);\n\n return (\n <div\n class='group peer md:block hidden text-sidebar-foreground'\n data-state={state()}\n data-collapsible={state() === 'collapsed' ? (local.collapsible ?? 'offcanvas') : ''}\n data-variant={local.variant ?? 'sidebar'}\n data-side={local.side ?? 'left'}\n data-slot='sidebar'\n >\n <div\n data-slot='sidebar-gap'\n class={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n )}\n />\n <SidebarDesktopContainer\n variant={local.variant ?? 'sidebar'}\n side={local.side ?? 'left'}\n class={local.class}\n {...others}\n >\n {local.children}\n </SidebarDesktopContainer>\n </div>\n );\n};\n"],"names":["SidebarDesktopContainer","props","local","others","splitProps","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","cn","side","variant","class","_$insert","children","SidebarDesktop","state","useSidebar","_el$3","_tmpl$2","_el$4","_$createComponent","_$effect","_p$","_v$","_v$2","collapsible","_v$3","_v$4","_v$5","e","_$setAttribute","t","a","o","i","_$className","undefined"],"mappings":";;;;;AAcA,MAAMA,IAAoEC,CAAAA,MAAU;AAClF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,WAAW,QAAQ,SAAS,UAA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,YAAY,UAC9C,2EACA,wDACN;AAACa,aAAAA,MAAAD,EAAAO,KAAAC,EAAAb,GAAA,cAAAK,EAAAO,IAAAN,CAAA,GAAAC,MAAAF,EAAAS,KAAAD,EAAAb,GAAA,oBAAAK,EAAAS,IAAAP,CAAA,GAAAE,MAAAJ,EAAAU,KAAAF,EAAAb,GAAA,gBAAAK,EAAAU,IAAAN,CAAA,GAAAC,MAAAL,EAAAW,KAAAH,EAAAb,GAAA,aAAAK,EAAAW,IAAAN,CAAA,GAAAC,MAAAN,EAAAY,KAAAC,EAAAhB,GAAAG,EAAAY,IAAAN,CAAA,GAAAN;AAAAA,IAAA,GAAA;AAAA,MAAAO,GAAAO;AAAAA,MAAAL,GAAAK;AAAAA,MAAAJ,GAAAI;AAAAA,MAAAH,GAAAG;AAAAA,MAAAF,GAAAE;AAAAA,IAAAA,CAAA,GAAAnB;AAAAA,EAAA,GAAA;AAYT;"}
1
+ {"version":3,"file":"SidebarDesktop.js","sources":["../../../src/components/sidebar/SidebarDesktop.tsx"],"sourcesContent":["import {\n createMemo,\n type Component,\n type ComponentProps,\n type JSX,\n type JSXElement,\n} from 'solid-js';\nimport { cn } from 'tailwind-variants';\n\nimport type { SidebarProps } from './Sidebar';\n\nimport { SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON } from './constants';\nimport { useSidebar } from './context';\n\ntype SidebarDesktopContainerProps = ComponentProps<'aside'> & {\n variant: string;\n side: string;\n children: JSXElement;\n};\n\nconst getSidebarDesktopRootClass = (\n disableMobileSidebar: boolean | undefined,\n): ComponentProps<'div'>['class'] =>\n cn(\n disableMobileSidebar === true\n ? 'group peer min-h-0 relative block self-stretch text-sidebar-foreground'\n : 'group peer md:block min-h-0 relative hidden self-stretch text-sidebar-foreground',\n );\n\nconst getSidebarGapClass = (variant: SidebarProps['variant']): ComponentProps<'div'>['class'] =>\n cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n );\n\nconst getSidebarStyle = (style: SidebarProps['style']): JSX.CSSProperties => {\n const base: JSX.CSSProperties = {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n };\n return typeof style === 'object' && style !== null ? { ...base, ...style } : base;\n};\n\nconst SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props) => {\n const [local, others] = splitProps(props, ['variant', 'side', 'class', 'children']);\n return (\n <aside\n data-slot='sidebar-container'\n class={cn(\n 'top-0 bottom-0 md:flex absolute z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear',\n local.side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n local.class,\n )}\n {...others}\n >\n <div\n data-sidebar='sidebar'\n data-slot='sidebar-inner'\n class='group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border'\n >\n {local.children}\n </div>\n </aside>\n );\n};\n\nexport const SidebarDesktop: Component<SidebarProps> = (props) => {\n const { state } = useSidebar();\n const [local, others] = splitProps(props, [\n 'side',\n 'variant',\n 'collapsible',\n 'disableMobileSidebar',\n 'style',\n 'class',\n 'children',\n ]);\n\n const style = createMemo(() => getSidebarStyle(local.style));\n\n return (\n <div\n style={style()}\n class={getSidebarDesktopRootClass(local.disableMobileSidebar)}\n data-state={state()}\n data-collapsible={state() === 'collapsed' ? (local.collapsible ?? 'offcanvas') : ''}\n data-variant={local.variant ?? 'sidebar'}\n data-side={local.side ?? 'left'}\n data-slot='sidebar'\n >\n <div data-slot='sidebar-gap' class={getSidebarGapClass(local.variant)} />\n <SidebarDesktopContainer\n variant={local.variant ?? 'sidebar'}\n side={local.side ?? 'left'}\n class={cn(local.disableMobileSidebar === true ? 'flex' : 'md:flex hidden', local.class)}\n {...others}\n >\n {local.children}\n </SidebarDesktopContainer>\n </div>\n );\n};\n"],"names":["getSidebarDesktopRootClass","disableMobileSidebar","cn","getSidebarGapClass","variant","getSidebarStyle","style","base","SIDEBAR_WIDTH","SIDEBAR_WIDTH_ICON","SidebarDesktopContainer","props","local","others","splitProps","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","side","class","_$insert","children","SidebarDesktop","state","useSidebar","createMemo","_el$3","_tmpl$2","_el$4","_$createComponent","_$effect","_p$","_v$","_v$2","_v$3","_v$4","collapsible","_v$5","_v$6","_v$7","e","_$style","t","_$className","a","_$setAttribute","o","i","n","s","undefined"],"mappings":";;;;;;AAoBA,MAAMA,IAA6BA,CACjCC,MAEAC,EACED,MAAyB,KACrB,2EACA,kFACN,GAEIE,IAAqBA,CAACC,MAC1BF,EACE,2FACA,0CACA,sCACAE,MAAY,cAAcA,MAAY,UAClC,2EACA,wDACN,GAEIC,IAAkBA,CAACC,MAAoD;AAC3E,QAAMC,IAA0B;AAAA,IAC9B,mBAAmBC;AAAAA,IACnB,wBAAwBC;AAAAA,EAAAA;AAE1B,SAAO,OAAOH,KAAU,YAAYA,MAAU,OAAO;AAAA,IAAE,GAAGC;AAAAA,IAAM,GAAGD;AAAAA,EAAAA,IAAUC;AAC/E,GAEMG,IAAoEC,CAAAA,MAAU;AAClF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,WAAW,QAAQ,SAAS,UAAU,CAAC;A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IACDZ,QAAY,cAAed,EAAM2B,eAAe,cAAe,IAAEC,IACrE5B,EAAMR,WAAW,WAASqC,IAC7B7B,EAAMS,QAAQ,QAAMqB,IAGKvC,EAAmBS,EAAMR,OAAO;AAAC8B,aAAAA,EAAAS,IAAAC,EAAAf,GAAAM,GAAAD,EAAAS,CAAA,GAAAP,MAAAF,EAAAW,KAAAC,EAAAjB,GAAAK,EAAAW,IAAAT,CAAA,GAAAC,MAAAH,EAAAa,KAAAC,EAAAnB,GAAA,cAAAK,EAAAa,IAAAV,CAAA,GAAAC,MAAAJ,EAAAe,KAAAD,EAAAnB,GAAA,oBAAAK,EAAAe,IAAAX,CAAA,GAAAE,MAAAN,EAAAgB,KAAAF,EAAAnB,GAAA,gBAAAK,EAAAgB,IAAAV,CAAA,GAAAC,MAAAP,EAAAiB,KAAAH,EAAAnB,GAAA,aAAAK,EAAAiB,IAAAV,CAAA,GAAAC,MAAAR,EAAAkB,KAAAN,EAAAf,GAAAG,EAAAkB,IAAAV,CAAA,GAAAR;AAAAA,IAAA,GAAA;AAAA,MAAAS,GAAAU;AAAAA,MAAAR,GAAAQ;AAAAA,MAAAN,GAAAM;AAAAA,MAAAJ,GAAAI;AAAAA,MAAAH,GAAAG;AAAAA,MAAAF,GAAAE;AAAAA,MAAAD,GAAAC;AAAAA,IAAAA,CAAA,GAAAxB;AAAAA,EAAA,GAAA;AAW3E;"}
@@ -1,3 +1,4 @@
1
+ import { ark } from '@ark-ui/solid/factory';
1
2
  import { Component, ComponentProps } from 'solid-js';
2
3
  import { VariantProps } from 'tailwind-variants';
3
4
  import { TooltipContent } from '../Tooltip';
@@ -34,7 +35,9 @@ export declare const sidebarMenuButtonVariants: import('tailwind-variants').TVRe
34
35
  lg: string;
35
36
  };
36
37
  }, undefined, "gap-2 p-2 text-sm group-has-data-sidebar-menu-action/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! data-active:font-medium peer/menu-button group/menu-button [&_svg]:size-4 flex w-full items-center overflow-hidden rounded-md text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground [&_svg]:shrink-0 [&>span:last-child]:truncate", unknown, unknown, undefined>>;
37
- export type SidebarMenuButtonProps = ComponentProps<'button'> & VariantProps<typeof sidebarMenuButtonVariants> & {
38
+ type SidebarMenuButtonAsChild = ComponentProps<typeof ark.button>['asChild'];
39
+ export type SidebarMenuButtonProps = Omit<ComponentProps<'button'>, 'asChild'> & VariantProps<typeof sidebarMenuButtonVariants> & {
40
+ asChild?: SidebarMenuButtonAsChild;
38
41
  isActive?: boolean;
39
42
  tooltip?: string | ComponentProps<typeof TooltipContent>;
40
43
  };
@@ -55,3 +58,4 @@ export type SidebarMenuSubButtonProps = ComponentProps<'a'> & {
55
58
  isActive?: boolean;
56
59
  };
57
60
  export declare const SidebarMenuSubButton: Component<SidebarMenuSubButtonProps>;
61
+ export {};