@brightlocal/ui-components 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +349 -0
  3. package/dist/accordion.cjs +1 -0
  4. package/dist/accordion.d.ts +32 -0
  5. package/dist/accordion.d.ts.map +1 -0
  6. package/dist/accordion.js +107 -0
  7. package/dist/alert-dialog.cjs +1 -0
  8. package/dist/alert-dialog.d.ts +15 -0
  9. package/dist/alert-dialog.d.ts.map +1 -0
  10. package/dist/alert-dialog.js +146 -0
  11. package/dist/alert.cjs +1 -0
  12. package/dist/alert.d.ts +16 -0
  13. package/dist/alert.d.ts.map +1 -0
  14. package/dist/alert.js +174 -0
  15. package/dist/aspect-ratio.cjs +1 -0
  16. package/dist/aspect-ratio.d.ts +10 -0
  17. package/dist/aspect-ratio.d.ts.map +1 -0
  18. package/dist/aspect-ratio.js +22 -0
  19. package/dist/avatar.cjs +1 -0
  20. package/dist/avatar.d.ts +11 -0
  21. package/dist/avatar.d.ts.map +1 -0
  22. package/dist/avatar.js +46 -0
  23. package/dist/badge.cjs +1 -0
  24. package/dist/badge.d.ts +19 -0
  25. package/dist/badge.d.ts.map +1 -0
  26. package/dist/badge.js +50 -0
  27. package/dist/blocks/data-table.cjs +1 -0
  28. package/dist/blocks/data-table.d.ts +303 -0
  29. package/dist/blocks/data-table.d.ts.map +1 -0
  30. package/dist/blocks/data-table.js +555 -0
  31. package/dist/blocks/sidebar.cjs +1 -0
  32. package/dist/blocks/sidebar.d.ts +744 -0
  33. package/dist/blocks/sidebar.d.ts.map +1 -0
  34. package/dist/blocks/sidebar.js +839 -0
  35. package/dist/breadcrumb.cjs +1 -0
  36. package/dist/breadcrumb.d.ts +12 -0
  37. package/dist/breadcrumb.d.ts.map +1 -0
  38. package/dist/breadcrumb.js +102 -0
  39. package/dist/button.cjs +1 -0
  40. package/dist/button.d.ts +73 -0
  41. package/dist/button.d.ts.map +1 -0
  42. package/dist/button.js +195 -0
  43. package/dist/calendar.cjs +1 -0
  44. package/dist/calendar.d.ts +28 -0
  45. package/dist/calendar.d.ts.map +1 -0
  46. package/dist/calendar.js +191 -0
  47. package/dist/card.cjs +1 -0
  48. package/dist/card.d.ts +28 -0
  49. package/dist/card.d.ts.map +1 -0
  50. package/dist/card.js +131 -0
  51. package/dist/carousel.cjs +1 -0
  52. package/dist/carousel.d.ts +21 -0
  53. package/dist/carousel.d.ts.map +1 -0
  54. package/dist/carousel.js +185 -0
  55. package/dist/centred-layout.cjs +1 -0
  56. package/dist/centred-layout.d.ts +49 -0
  57. package/dist/centred-layout.d.ts.map +1 -0
  58. package/dist/centred-layout.js +35 -0
  59. package/dist/chart.cjs +10 -0
  60. package/dist/chart.d.ts +83 -0
  61. package/dist/chart.d.ts.map +1 -0
  62. package/dist/chart.js +254 -0
  63. package/dist/checkbox.cjs +1 -0
  64. package/dist/checkbox.d.ts +15 -0
  65. package/dist/checkbox.d.ts.map +1 -0
  66. package/dist/checkbox.js +96 -0
  67. package/dist/collapsible.cjs +1 -0
  68. package/dist/collapsible.d.ts +18 -0
  69. package/dist/collapsible.d.ts.map +1 -0
  70. package/dist/collapsible.js +58 -0
  71. package/dist/combobox.cjs +1 -0
  72. package/dist/combobox.d.ts +65 -0
  73. package/dist/combobox.d.ts.map +1 -0
  74. package/dist/combobox.js +203 -0
  75. package/dist/command.cjs +1 -0
  76. package/dist/command.d.ts +44 -0
  77. package/dist/command.d.ts.map +1 -0
  78. package/dist/command.js +166 -0
  79. package/dist/context-menu.cjs +1 -0
  80. package/dist/context-menu.d.ts +42 -0
  81. package/dist/context-menu.d.ts.map +1 -0
  82. package/dist/context-menu.js +226 -0
  83. package/dist/date-picker.cjs +1 -0
  84. package/dist/date-picker.d.ts +54 -0
  85. package/dist/date-picker.d.ts.map +1 -0
  86. package/dist/date-picker.js +95 -0
  87. package/dist/dialog.cjs +1 -0
  88. package/dist/dialog.d.ts +20 -0
  89. package/dist/dialog.d.ts.map +1 -0
  90. package/dist/dialog.js +130 -0
  91. package/dist/drawer.cjs +1 -0
  92. package/dist/drawer.d.ts +22 -0
  93. package/dist/drawer.d.ts.map +1 -0
  94. package/dist/drawer.js +149 -0
  95. package/dist/dropdown-menu.cjs +1 -0
  96. package/dist/dropdown-menu.d.ts +253 -0
  97. package/dist/dropdown-menu.d.ts.map +1 -0
  98. package/dist/dropdown-menu.js +325 -0
  99. package/dist/field.cjs +1 -0
  100. package/dist/field.d.ts +21 -0
  101. package/dist/field.d.ts.map +1 -0
  102. package/dist/field.js +148 -0
  103. package/dist/global-layout.cjs +1 -0
  104. package/dist/global-layout.d.ts +60 -0
  105. package/dist/global-layout.d.ts.map +1 -0
  106. package/dist/global-layout.js +87 -0
  107. package/dist/hooks/use-mobile.cjs +1 -0
  108. package/dist/hooks/use-mobile.d.ts +2 -0
  109. package/dist/hooks/use-mobile.d.ts.map +1 -0
  110. package/dist/hooks/use-mobile.js +16 -0
  111. package/dist/hover-card.cjs +1 -0
  112. package/dist/hover-card.d.ts +43 -0
  113. package/dist/hover-card.d.ts.map +1 -0
  114. package/dist/hover-card.js +71 -0
  115. package/dist/index.cjs +1 -0
  116. package/dist/index.d.ts +61 -0
  117. package/dist/index.d.ts.map +1 -0
  118. package/dist/index.js +412 -0
  119. package/dist/input-base.cjs +1 -0
  120. package/dist/input-base.d.ts +28 -0
  121. package/dist/input-base.d.ts.map +1 -0
  122. package/dist/input-base.js +56 -0
  123. package/dist/input-group.cjs +1 -0
  124. package/dist/input-group.d.ts +26 -0
  125. package/dist/input-group.d.ts.map +1 -0
  126. package/dist/input-group.js +116 -0
  127. package/dist/input-otp.cjs +1 -0
  128. package/dist/input-otp.d.ts +45 -0
  129. package/dist/input-otp.d.ts.map +1 -0
  130. package/dist/input-otp.js +186 -0
  131. package/dist/input-password.cjs +1 -0
  132. package/dist/input-password.d.ts +38 -0
  133. package/dist/input-password.d.ts.map +1 -0
  134. package/dist/input-password.js +101 -0
  135. package/dist/input.cjs +1 -0
  136. package/dist/input.d.ts +32 -0
  137. package/dist/input.d.ts.map +1 -0
  138. package/dist/input.js +146 -0
  139. package/dist/label.cjs +1 -0
  140. package/dist/label.d.ts +12 -0
  141. package/dist/label.d.ts.map +1 -0
  142. package/dist/label.js +34 -0
  143. package/dist/lib/utils.cjs +1 -0
  144. package/dist/lib/utils.d.ts +3 -0
  145. package/dist/lib/utils.d.ts.map +1 -0
  146. package/dist/lib/utils.js +8 -0
  147. package/dist/link.cjs +1 -0
  148. package/dist/link.d.ts +29 -0
  149. package/dist/link.d.ts.map +1 -0
  150. package/dist/link.figma.d.ts +2 -0
  151. package/dist/link.figma.d.ts.map +1 -0
  152. package/dist/link.js +71 -0
  153. package/dist/logo.cjs +1 -0
  154. package/dist/logo.d.ts +25 -0
  155. package/dist/logo.d.ts.map +1 -0
  156. package/dist/logo.js +71 -0
  157. package/dist/menubar.cjs +1 -0
  158. package/dist/menubar.d.ts +106 -0
  159. package/dist/menubar.d.ts.map +1 -0
  160. package/dist/menubar.js +270 -0
  161. package/dist/navigation-menu.cjs +1 -0
  162. package/dist/navigation-menu.d.ts +108 -0
  163. package/dist/navigation-menu.d.ts.map +1 -0
  164. package/dist/navigation-menu.js +175 -0
  165. package/dist/pagination.cjs +1 -0
  166. package/dist/pagination.d.ts +81 -0
  167. package/dist/pagination.d.ts.map +1 -0
  168. package/dist/pagination.js +216 -0
  169. package/dist/popover.cjs +1 -0
  170. package/dist/popover.d.ts +8 -0
  171. package/dist/popover.d.ts.map +1 -0
  172. package/dist/popover.js +44 -0
  173. package/dist/progress.cjs +1 -0
  174. package/dist/progress.d.ts +29 -0
  175. package/dist/progress.d.ts.map +1 -0
  176. package/dist/progress.js +64 -0
  177. package/dist/radio-group.cjs +1 -0
  178. package/dist/radio-group.d.ts +33 -0
  179. package/dist/radio-group.d.ts.map +1 -0
  180. package/dist/radio-group.js +193 -0
  181. package/dist/rating.cjs +1 -0
  182. package/dist/rating.d.ts +22 -0
  183. package/dist/rating.d.ts.map +1 -0
  184. package/dist/rating.js +51 -0
  185. package/dist/resizable.cjs +1 -0
  186. package/dist/resizable.d.ts +14 -0
  187. package/dist/resizable.d.ts.map +1 -0
  188. package/dist/resizable.js +46 -0
  189. package/dist/scroll-area.cjs +1 -0
  190. package/dist/scroll-area.d.ts +12 -0
  191. package/dist/scroll-area.d.ts.map +1 -0
  192. package/dist/scroll-area.js +67 -0
  193. package/dist/select.cjs +1 -0
  194. package/dist/select.d.ts +77 -0
  195. package/dist/select.d.ts.map +1 -0
  196. package/dist/select.js +259 -0
  197. package/dist/separator.cjs +1 -0
  198. package/dist/separator.d.ts +14 -0
  199. package/dist/separator.d.ts.map +1 -0
  200. package/dist/separator.js +43 -0
  201. package/dist/sheet.cjs +1 -0
  202. package/dist/sheet.d.ts +38 -0
  203. package/dist/sheet.d.ts.map +1 -0
  204. package/dist/sheet.js +190 -0
  205. package/dist/skeleton.cjs +1 -0
  206. package/dist/skeleton.d.ts +5 -0
  207. package/dist/skeleton.d.ts.map +1 -0
  208. package/dist/skeleton.js +15 -0
  209. package/dist/slider.cjs +1 -0
  210. package/dist/slider.d.ts +19 -0
  211. package/dist/slider.d.ts.map +1 -0
  212. package/dist/slider.js +69 -0
  213. package/dist/sonner.cjs +1 -0
  214. package/dist/sonner.d.ts +188 -0
  215. package/dist/sonner.d.ts.map +1 -0
  216. package/dist/sonner.js +150 -0
  217. package/dist/split-layout.cjs +1 -0
  218. package/dist/split-layout.d.ts +42 -0
  219. package/dist/split-layout.d.ts.map +1 -0
  220. package/dist/split-layout.js +108 -0
  221. package/dist/switch.cjs +1 -0
  222. package/dist/switch.d.ts +43 -0
  223. package/dist/switch.d.ts.map +1 -0
  224. package/dist/switch.figma.d.ts +2 -0
  225. package/dist/switch.figma.d.ts.map +1 -0
  226. package/dist/switch.js +110 -0
  227. package/dist/table.cjs +1 -0
  228. package/dist/table.d.ts +95 -0
  229. package/dist/table.d.ts.map +1 -0
  230. package/dist/table.js +164 -0
  231. package/dist/tabs.cjs +1 -0
  232. package/dist/tabs.d.ts +29 -0
  233. package/dist/tabs.d.ts.map +1 -0
  234. package/dist/tabs.js +96 -0
  235. package/dist/textarea.cjs +1 -0
  236. package/dist/textarea.d.ts +23 -0
  237. package/dist/textarea.d.ts.map +1 -0
  238. package/dist/textarea.js +47 -0
  239. package/dist/toggle-group.cjs +1 -0
  240. package/dist/toggle-group.d.ts +25 -0
  241. package/dist/toggle-group.d.ts.map +1 -0
  242. package/dist/toggle-group.js +74 -0
  243. package/dist/toggle.cjs +1 -0
  244. package/dist/toggle.d.ts +44 -0
  245. package/dist/toggle.d.ts.map +1 -0
  246. package/dist/toggle.figma.d.ts +2 -0
  247. package/dist/toggle.figma.d.ts.map +1 -0
  248. package/dist/toggle.js +57 -0
  249. package/dist/tooltip.cjs +1 -0
  250. package/dist/tooltip.d.ts +66 -0
  251. package/dist/tooltip.d.ts.map +1 -0
  252. package/dist/tooltip.js +78 -0
  253. package/package.json +184 -0
  254. package/src/blocks/data-table.tsx +1166 -0
  255. package/src/blocks/sidebar.tsx +1830 -0
  256. package/src/components/.gitkeep +0 -0
  257. package/src/components/accordion.tsx +142 -0
  258. package/src/components/alert-dialog.tsx +157 -0
  259. package/src/components/alert.tsx +199 -0
  260. package/src/components/aspect-ratio.tsx +30 -0
  261. package/src/components/avatar.tsx +56 -0
  262. package/src/components/badge.tsx +72 -0
  263. package/src/components/breadcrumb.tsx +109 -0
  264. package/src/components/button.tsx +296 -0
  265. package/src/components/calendar.tsx +234 -0
  266. package/src/components/card.tsx +158 -0
  267. package/src/components/carousel.tsx +256 -0
  268. package/src/components/centred-layout.tsx +91 -0
  269. package/src/components/chart.tsx +456 -0
  270. package/src/components/checkbox.tsx +132 -0
  271. package/src/components/collapsible.tsx +68 -0
  272. package/src/components/combobox.tsx +321 -0
  273. package/src/components/command.tsx +220 -0
  274. package/src/components/context-menu.tsx +305 -0
  275. package/src/components/date-picker.tsx +155 -0
  276. package/src/components/dialog.tsx +152 -0
  277. package/src/components/drawer.tsx +168 -0
  278. package/src/components/dropdown-menu.tsx +575 -0
  279. package/src/components/field.tsx +155 -0
  280. package/src/components/global-layout.tsx +153 -0
  281. package/src/components/hover-card.tsx +121 -0
  282. package/src/components/input-base.tsx +86 -0
  283. package/src/components/input-group.tsx +158 -0
  284. package/src/components/input-otp.tsx +327 -0
  285. package/src/components/input-password.tsx +191 -0
  286. package/src/components/input.tsx +220 -0
  287. package/src/components/label.tsx +42 -0
  288. package/src/components/link.figma.tsx +71 -0
  289. package/src/components/link.tsx +105 -0
  290. package/src/components/logo.tsx +97 -0
  291. package/src/components/menubar.tsx +379 -0
  292. package/src/components/navigation-menu.tsx +324 -0
  293. package/src/components/pagination.tsx +368 -0
  294. package/src/components/popover.tsx +46 -0
  295. package/src/components/progress.tsx +100 -0
  296. package/src/components/radio-group.tsx +281 -0
  297. package/src/components/rating.tsx +87 -0
  298. package/src/components/resizable.tsx +66 -0
  299. package/src/components/scroll-area.tsx +72 -0
  300. package/src/components/select.tsx +442 -0
  301. package/src/components/separator.tsx +53 -0
  302. package/src/components/sheet.tsx +220 -0
  303. package/src/components/skeleton.tsx +17 -0
  304. package/src/components/slider.tsx +86 -0
  305. package/src/components/sonner.tsx +396 -0
  306. package/src/components/split-layout.tsx +155 -0
  307. package/src/components/switch.figma.tsx +115 -0
  308. package/src/components/switch.tsx +173 -0
  309. package/src/components/table.tsx +277 -0
  310. package/src/components/tabs.tsx +142 -0
  311. package/src/components/textarea.tsx +77 -0
  312. package/src/components/toggle-group.tsx +109 -0
  313. package/src/components/toggle.figma.tsx +81 -0
  314. package/src/components/toggle.tsx +103 -0
  315. package/src/components/tooltip.tsx +156 -0
  316. package/src/hooks/.gitkeep +0 -0
  317. package/src/hooks/use-mobile.ts +21 -0
  318. package/src/index.ts +67 -0
  319. package/src/lib/utils.ts +6 -0
  320. package/src/types/external-modules.d.ts +16 -0
@@ -0,0 +1,325 @@
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import * as u from "react";
3
+ import * as n from "@radix-ui/react-dropdown-menu";
4
+ import { Check as m, Circle as f, ChevronRight as g } from "lucide-react";
5
+ import { cn as l } from "@brightlocal/ui-components/lib/utils";
6
+ function w({
7
+ ...e
8
+ }) {
9
+ return /* @__PURE__ */ t(n.Root, { ...e });
10
+ }
11
+ w.displayName = "DropdownMenu";
12
+ function v({
13
+ ...e
14
+ }) {
15
+ return /* @__PURE__ */ t(n.Portal, { ...e });
16
+ }
17
+ v.displayName = "DropdownMenuPortal";
18
+ const b = u.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
19
+ n.Trigger,
20
+ {
21
+ ref: a,
22
+ className: e,
23
+ "data-slot": "dropdown-menu-trigger",
24
+ ...o
25
+ }
26
+ ));
27
+ b.displayName = "DropdownMenuTrigger";
28
+ const h = u.forwardRef(
29
+ ({
30
+ className: e,
31
+ sideOffset: o = 4,
32
+ align: a = "start",
33
+ dataHook: r,
34
+ trackingEl: d,
35
+ trackingLabel: s,
36
+ ...i
37
+ }, c) => /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
38
+ n.Content,
39
+ {
40
+ ref: c,
41
+ align: a,
42
+ className: l(
43
+ [
44
+ "bg-popover text-popover-foreground",
45
+ "z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem]",
46
+ "origin-(--radix-dropdown-menu-content-transform-origin)",
47
+ "overflow-x-hidden overflow-y-auto",
48
+ "rounded-md border p-1 shadow-md",
49
+ // Animations
50
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
51
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
52
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
53
+ "data-[side=bottom]:slide-in-from-top-2",
54
+ "data-[side=left]:slide-in-from-right-2",
55
+ "data-[side=right]:slide-in-from-left-2",
56
+ "data-[side=top]:slide-in-from-bottom-2"
57
+ ],
58
+ e
59
+ ),
60
+ "data-hook": r,
61
+ "data-slot": "dropdown-menu-content",
62
+ "data-tracking-el": d,
63
+ "data-tracking-label": s,
64
+ sideOffset: o,
65
+ ...i
66
+ }
67
+ ) })
68
+ );
69
+ h.displayName = "DropdownMenuContent";
70
+ function x({
71
+ ...e
72
+ }) {
73
+ return /* @__PURE__ */ t(n.Group, { ...e });
74
+ }
75
+ x.displayName = "DropdownMenuGroup";
76
+ const D = u.forwardRef(
77
+ ({
78
+ className: e,
79
+ inset: o,
80
+ variant: a = "default",
81
+ dataHook: r,
82
+ trackingEl: d,
83
+ trackingLabel: s,
84
+ ...i
85
+ }, c) => /* @__PURE__ */ t(
86
+ n.Item,
87
+ {
88
+ ref: c,
89
+ className: l(
90
+ [
91
+ "relative flex cursor-default items-center gap-2 select-none",
92
+ "rounded-sm px-2 py-1.5 text-sm outline-hidden",
93
+ "focus:bg-accent focus:text-accent-foreground",
94
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
95
+ // Inset (indentation)
96
+ "data-[inset]:pl-8",
97
+ // Variant: destructive
98
+ "data-[variant=destructive]:text-destructive",
99
+ "data-[variant=destructive]:focus:bg-destructive/10",
100
+ "dark:data-[variant=destructive]:focus:bg-destructive/20",
101
+ "data-[variant=destructive]:focus:text-destructive",
102
+ "data-[variant=destructive]:*:[svg]:!text-destructive",
103
+ // Icon styling
104
+ "[&_svg:not([class*='text-'])]:text-muted-foreground",
105
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
106
+ "[&_svg:not([class*='size-'])]:size-4"
107
+ ],
108
+ e
109
+ ),
110
+ "data-hook": r,
111
+ "data-inset": o,
112
+ "data-slot": "dropdown-menu-item",
113
+ "data-tracking-el": d,
114
+ "data-tracking-label": s,
115
+ "data-variant": a,
116
+ ...i
117
+ }
118
+ )
119
+ );
120
+ D.displayName = "DropdownMenuItem";
121
+ const M = u.forwardRef(
122
+ ({
123
+ className: e,
124
+ children: o,
125
+ checked: a,
126
+ dataHook: r,
127
+ trackingEl: d,
128
+ trackingLabel: s,
129
+ ...i
130
+ }, c) => /* @__PURE__ */ p(
131
+ n.CheckboxItem,
132
+ {
133
+ ref: c,
134
+ checked: a,
135
+ className: l(
136
+ [
137
+ "relative flex cursor-default items-center gap-2 select-none",
138
+ "rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden",
139
+ "focus:bg-accent focus:text-accent-foreground",
140
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
141
+ // Icon styling
142
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
143
+ "[&_svg:not([class*='size-'])]:size-4"
144
+ ],
145
+ e
146
+ ),
147
+ "data-hook": r,
148
+ "data-slot": "dropdown-menu-checkbox-item",
149
+ "data-tracking-el": d,
150
+ "data-tracking-label": s,
151
+ ...i,
152
+ children: [
153
+ /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(m, { className: "size-4" }) }) }),
154
+ o
155
+ ]
156
+ }
157
+ )
158
+ );
159
+ M.displayName = "DropdownMenuCheckboxItem";
160
+ function N({
161
+ ...e
162
+ }) {
163
+ return /* @__PURE__ */ t(n.RadioGroup, { ...e });
164
+ }
165
+ N.displayName = "DropdownMenuRadioGroup";
166
+ const y = u.forwardRef(
167
+ ({ className: e, children: o, dataHook: a, trackingEl: r, trackingLabel: d, ...s }, i) => /* @__PURE__ */ p(
168
+ n.RadioItem,
169
+ {
170
+ ref: i,
171
+ className: l(
172
+ [
173
+ "relative flex cursor-default items-center gap-2 select-none",
174
+ "rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden",
175
+ "focus:bg-accent focus:text-accent-foreground",
176
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
177
+ // Icon styling
178
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
179
+ "[&_svg:not([class*='size-'])]:size-4"
180
+ ],
181
+ e
182
+ ),
183
+ "data-hook": a,
184
+ "data-slot": "dropdown-menu-radio-item",
185
+ "data-tracking-el": r,
186
+ "data-tracking-label": d,
187
+ ...s,
188
+ children: [
189
+ /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(f, { className: "size-2 fill-current" }) }) }),
190
+ o
191
+ ]
192
+ }
193
+ )
194
+ );
195
+ y.displayName = "DropdownMenuRadioItem";
196
+ const k = u.forwardRef(({ className: e, inset: o, ...a }, r) => /* @__PURE__ */ t(
197
+ n.Label,
198
+ {
199
+ ref: r,
200
+ className: l(
201
+ ["px-2 py-1.5 text-sm font-semibold", "data-[inset]:pl-8"],
202
+ e
203
+ ),
204
+ "data-inset": o,
205
+ "data-slot": "dropdown-menu-label",
206
+ ...a
207
+ }
208
+ ));
209
+ k.displayName = "DropdownMenuLabel";
210
+ const z = u.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
211
+ n.Separator,
212
+ {
213
+ ref: a,
214
+ className: l(["bg-border -mx-1 my-1 h-px"], e),
215
+ "data-slot": "dropdown-menu-separator",
216
+ ...o
217
+ }
218
+ ));
219
+ z.displayName = "DropdownMenuSeparator";
220
+ function R({
221
+ className: e,
222
+ ...o
223
+ }) {
224
+ return /* @__PURE__ */ t(
225
+ "span",
226
+ {
227
+ className: l(
228
+ ["text-muted-foreground ml-auto text-xs tracking-widest opacity-60"],
229
+ e
230
+ ),
231
+ "data-slot": "dropdown-menu-shortcut",
232
+ ...o
233
+ }
234
+ );
235
+ }
236
+ R.displayName = "DropdownMenuShortcut";
237
+ function S({
238
+ ...e
239
+ }) {
240
+ return /* @__PURE__ */ t(n.Sub, { ...e });
241
+ }
242
+ S.displayName = "DropdownMenuSub";
243
+ const I = u.forwardRef(
244
+ ({
245
+ className: e,
246
+ inset: o,
247
+ children: a,
248
+ dataHook: r,
249
+ trackingEl: d,
250
+ trackingLabel: s,
251
+ ...i
252
+ }, c) => /* @__PURE__ */ p(
253
+ n.SubTrigger,
254
+ {
255
+ ref: c,
256
+ className: l(
257
+ [
258
+ "flex cursor-default items-center gap-2 select-none",
259
+ "rounded-sm px-2 py-1.5 text-sm outline-hidden",
260
+ "focus:bg-accent focus:text-accent-foreground",
261
+ "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
262
+ "data-[inset]:pl-8",
263
+ // Icon styling
264
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
265
+ "[&_svg:not([class*='size-'])]:size-4"
266
+ ],
267
+ e
268
+ ),
269
+ "data-hook": r,
270
+ "data-inset": o,
271
+ "data-slot": "dropdown-menu-sub-trigger",
272
+ "data-tracking-el": d,
273
+ "data-tracking-label": s,
274
+ ...i,
275
+ children: [
276
+ a,
277
+ /* @__PURE__ */ t(g, { className: "ml-auto size-4" })
278
+ ]
279
+ }
280
+ )
281
+ );
282
+ I.displayName = "DropdownMenuSubTrigger";
283
+ const _ = u.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
284
+ n.SubContent,
285
+ {
286
+ ref: a,
287
+ className: l(
288
+ [
289
+ "bg-popover text-popover-foreground",
290
+ "z-50 min-w-[8rem]",
291
+ "origin-(--radix-dropdown-menu-content-transform-origin)",
292
+ "overflow-hidden rounded-md border p-1 shadow-lg",
293
+ // Animations
294
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
295
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
296
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
297
+ "data-[side=bottom]:slide-in-from-top-2",
298
+ "data-[side=left]:slide-in-from-right-2",
299
+ "data-[side=right]:slide-in-from-left-2",
300
+ "data-[side=top]:slide-in-from-bottom-2"
301
+ ],
302
+ e
303
+ ),
304
+ "data-slot": "dropdown-menu-sub-content",
305
+ ...o
306
+ }
307
+ ));
308
+ _.displayName = "DropdownMenuSubContent";
309
+ export {
310
+ w as DropdownMenu,
311
+ M as DropdownMenuCheckboxItem,
312
+ h as DropdownMenuContent,
313
+ x as DropdownMenuGroup,
314
+ D as DropdownMenuItem,
315
+ k as DropdownMenuLabel,
316
+ v as DropdownMenuPortal,
317
+ N as DropdownMenuRadioGroup,
318
+ y as DropdownMenuRadioItem,
319
+ z as DropdownMenuSeparator,
320
+ R as DropdownMenuShortcut,
321
+ S as DropdownMenuSub,
322
+ _ as DropdownMenuSubContent,
323
+ I as DropdownMenuSubTrigger,
324
+ b as DropdownMenuTrigger
325
+ };
package/dist/field.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("class-variance-authority"),l=require("@brightlocal/ui-components/lib/utils"),i=require("@brightlocal/ui-components/label");function r({className:t,...e}){return a.jsx("fieldset",{className:l.cn("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",t),"data-slot":"field-set",...e})}function n({className:t,variant:e="legend",...o}){return a.jsx("legend",{className:l.cn("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",t),"data-slot":"field-legend","data-variant":e,...o})}function s({className:t,...e}){return a.jsx("div",{className:l.cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",t),"data-slot":"field-group",...e})}const f=d.cva("group/field flex w-full gap-2",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function c({className:t,orientation:e="vertical",...o}){return a.jsx("div",{className:l.cn(f({orientation:e}),t),"data-orientation":e,"data-slot":"field",role:"group",...o})}function u({className:t,...e}){return a.jsx("div",{className:l.cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",t),"data-slot":"field-content",...e})}function p({className:t,htmlFor:e,...o}){return a.jsx(i.Label,{className:l.cn("group/field-label peer/field-label w-fit","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",t),"data-slot":"field-label",htmlFor:e,...o})}function g({className:t,...e}){return a.jsx("p",{className:l.cn("text-muted-foreground mt-2 text-left text-sm","group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),"data-slot":"field-description",...e})}exports.Field=c;exports.FieldContent=u;exports.FieldDescription=g;exports.FieldGroup=s;exports.FieldLabel=p;exports.FieldLegend=n;exports.FieldSet=r;
@@ -0,0 +1,21 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { Label } from '../label';
3
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
4
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
5
+ variant?: "legend" | "label";
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare const fieldVariants: (props?: ({
9
+ orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
10
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
11
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
12
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ declare function FieldLabel({ className, htmlFor, ...props }: Omit<React.ComponentProps<typeof Label>, "htmlFor"> & {
14
+ /**
15
+ * Required htmlFor attribute for linking label with input
16
+ */
17
+ htmlFor: string;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
20
+ export { Field, FieldLabel, FieldDescription, FieldGroup, FieldLegend, FieldSet, FieldContent, };
21
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAY1E;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;CAAE,2CAcnE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,QAAA,MAAM,aAAa;;8EAmBjB,CAAC;AAEH,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,2CAUlE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG;IACvD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,2CAiBA;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAc3E;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,GACb,CAAC"}
package/dist/field.js ADDED
@@ -0,0 +1,148 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { cva as d } from "class-variance-authority";
3
+ import { cn as l } from "@brightlocal/ui-components/lib/utils";
4
+ import { Label as r } from "@brightlocal/ui-components/label";
5
+ function u({ className: t, ...e }) {
6
+ return /* @__PURE__ */ a(
7
+ "fieldset",
8
+ {
9
+ className: l(
10
+ "flex flex-col gap-6",
11
+ "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
12
+ t
13
+ ),
14
+ "data-slot": "field-set",
15
+ ...e
16
+ }
17
+ );
18
+ }
19
+ function p({
20
+ className: t,
21
+ variant: e = "legend",
22
+ ...o
23
+ }) {
24
+ return /* @__PURE__ */ a(
25
+ "legend",
26
+ {
27
+ className: l(
28
+ "mb-3 font-medium",
29
+ "data-[variant=legend]:text-base",
30
+ "data-[variant=label]:text-sm",
31
+ t
32
+ ),
33
+ "data-slot": "field-legend",
34
+ "data-variant": e,
35
+ ...o
36
+ }
37
+ );
38
+ }
39
+ function m({ className: t, ...e }) {
40
+ return /* @__PURE__ */ a(
41
+ "div",
42
+ {
43
+ className: l(
44
+ "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
45
+ t
46
+ ),
47
+ "data-slot": "field-group",
48
+ ...e
49
+ }
50
+ );
51
+ }
52
+ const i = d("group/field flex w-full gap-2", {
53
+ variants: {
54
+ orientation: {
55
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
56
+ horizontal: [
57
+ "flex-row items-center",
58
+ "[&>[data-slot=field-label]]:flex-auto",
59
+ "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
60
+ ],
61
+ responsive: [
62
+ "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
63
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
64
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
65
+ ]
66
+ }
67
+ },
68
+ defaultVariants: {
69
+ orientation: "vertical"
70
+ }
71
+ });
72
+ function g({
73
+ className: t,
74
+ orientation: e = "vertical",
75
+ ...o
76
+ }) {
77
+ return /* @__PURE__ */ a(
78
+ "div",
79
+ {
80
+ className: l(i({ orientation: e }), t),
81
+ "data-orientation": e,
82
+ "data-slot": "field",
83
+ role: "group",
84
+ ...o
85
+ }
86
+ );
87
+ }
88
+ function x({ className: t, ...e }) {
89
+ return /* @__PURE__ */ a(
90
+ "div",
91
+ {
92
+ className: l(
93
+ "group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
94
+ t
95
+ ),
96
+ "data-slot": "field-content",
97
+ ...e
98
+ }
99
+ );
100
+ }
101
+ function h({
102
+ className: t,
103
+ htmlFor: e,
104
+ ...o
105
+ }) {
106
+ return /* @__PURE__ */ a(
107
+ r,
108
+ {
109
+ className: l(
110
+ // Base label styles from primitives are inherited via Label component
111
+ "group/field-label peer/field-label w-fit",
112
+ // Field-specific container styles
113
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
114
+ // Checked state styles for radio/checkbox fields
115
+ "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
116
+ t
117
+ ),
118
+ "data-slot": "field-label",
119
+ htmlFor: e,
120
+ ...o
121
+ }
122
+ );
123
+ }
124
+ function b({ className: t, ...e }) {
125
+ return /* @__PURE__ */ a(
126
+ "p",
127
+ {
128
+ className: l(
129
+ "text-muted-foreground mt-2 text-left text-sm",
130
+ "group-has-[[data-orientation=horizontal]]/field:text-balance",
131
+ "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
132
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
133
+ t
134
+ ),
135
+ "data-slot": "field-description",
136
+ ...e
137
+ }
138
+ );
139
+ }
140
+ export {
141
+ g as Field,
142
+ x as FieldContent,
143
+ b as FieldDescription,
144
+ m as FieldGroup,
145
+ h as FieldLabel,
146
+ p as FieldLegend,
147
+ u as FieldSet
148
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("@brightlocal/ui-components/lib/utils"),r="1280px";function i({className:l,maxWidth:t=r,children:e,...a}){const n=typeof t=="number"?`${t}px`:t;return o.jsx("div",{className:s.cn("min-h-screen w-full px-4 md:px-6",l),"data-slot":"global-layout",...a,children:o.jsx("div",{className:"mx-auto flex h-full w-full","data-slot":"global-container",style:{maxWidth:n},children:e})})}const d="256px";function x({className:l,width:t=d,children:e,...a}){const n=typeof t=="number"?`${t}px`:t;return o.jsx("aside",{className:s.cn("hidden h-full shrink-0 lg:block",l),"data-slot":"sidebar-container",style:{width:n},...a,children:e})}var u=(l=>(l.FULL="full",l.MD="md",l.SM="sm",l))(u||{});function m({className:l,variant:t="full",padding:e,children:a,...n}){const c={full:"100%",md:"768px",sm:"374px"};return o.jsx("div",{className:s.cn("flex h-full min-h-0 min-w-0 flex-1",l),"data-slot":"content-wrapper",...n,children:o.jsx("div",{className:s.cn("mx-auto w-full px-4 md:px-6"),"data-slot":"content-container",style:{maxWidth:c[t],padding:e},children:a})})}exports.ContentVariant=u;exports.GlobalLayout=i;exports.GlobalLayoutContent=m;exports.GlobalLayoutSidebar=x;
@@ -0,0 +1,60 @@
1
+ import * as React from "react";
2
+ /**
3
+ * GlobalLayout provides a responsive layout structure with optional sidebar
4
+ * and content containers that adapt to different breakpoints.
5
+ *
6
+ * Breakpoints:
7
+ * - Mobile (< 768px): Full width content, no sidebar
8
+ * - Tablet (768px - 1023px): Full width content, no sidebar
9
+ * - Desktop (≥ 1024px): Sidebar + content with max-width container
10
+ *
11
+ * @see https://ui.shadcn.com/docs/components/sidebar for sidebar patterns
12
+ */
13
+ interface GlobalLayoutProps extends React.ComponentProps<"div"> {
14
+ /**
15
+ * Maximum width for the global container (default: 1280px)
16
+ */
17
+ maxWidth?: string | number;
18
+ }
19
+ declare function GlobalLayout({ className, maxWidth, children, ...props }: GlobalLayoutProps): import("react/jsx-runtime").JSX.Element;
20
+ interface GlobalLayoutSidebarProps extends React.ComponentProps<"aside"> {
21
+ /**
22
+ * Width of the sidebar (default: 256px)
23
+ */
24
+ width?: string | number;
25
+ }
26
+ declare function GlobalLayoutSidebar({ className, width, children, ...props }: GlobalLayoutSidebarProps): import("react/jsx-runtime").JSX.Element;
27
+ /**
28
+ * Content width variants for GlobalLayoutContent
29
+ */
30
+ export declare enum ContentVariant {
31
+ /**
32
+ * Full width of available space
33
+ */
34
+ FULL = "full",
35
+ /**
36
+ * Medium width (768px max-width)
37
+ */
38
+ MD = "md",
39
+ /**
40
+ * Small width (374px max-width)
41
+ */
42
+ SM = "sm"
43
+ }
44
+ interface GlobalLayoutContentProps extends React.ComponentProps<"div"> {
45
+ /**
46
+ * Content width variant:
47
+ * - "full": Full width of available space
48
+ * - "md": 768px max-width (medium)
49
+ * - "sm": 374px max-width (small)
50
+ */
51
+ variant?: ContentVariant;
52
+ /**
53
+ * Custom padding for the content wrapper
54
+ */
55
+ padding?: string;
56
+ }
57
+ declare function GlobalLayoutContent({ className, variant, padding, children, ...props }: GlobalLayoutContentProps): import("react/jsx-runtime").JSX.Element;
58
+ export { GlobalLayout, GlobalLayoutSidebar, GlobalLayoutContent };
59
+ export type { GlobalLayoutProps };
60
+ //# sourceMappingURL=global-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-layout.d.ts","sourceRoot":"","sources":["../../src/components/global-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;;;;;;;;;GAUG;AAEH,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC7D;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAoB,EACpB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAmBnB;AAKD,UAAU,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IACtE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,KAAqB,EACrB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAa1B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,EAAE,OAAO;IACT;;OAEG;IACH,EAAE,OAAO;CACV;AAED,UAAU,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACpE;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,OAA6B,EAC7B,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,2CA4B1B;AAED,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;AAElE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,87 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cn as s } from "@brightlocal/ui-components/lib/utils";
3
+ const c = "1280px";
4
+ function f({
5
+ className: l,
6
+ maxWidth: t = c,
7
+ children: a,
8
+ ...o
9
+ }) {
10
+ const e = typeof t == "number" ? `${t}px` : t;
11
+ return /* @__PURE__ */ n(
12
+ "div",
13
+ {
14
+ className: s("min-h-screen w-full px-4 md:px-6", l),
15
+ "data-slot": "global-layout",
16
+ ...o,
17
+ children: /* @__PURE__ */ n(
18
+ "div",
19
+ {
20
+ className: "mx-auto flex h-full w-full",
21
+ "data-slot": "global-container",
22
+ style: { maxWidth: e },
23
+ children: a
24
+ }
25
+ )
26
+ }
27
+ );
28
+ }
29
+ const u = "256px";
30
+ function x({
31
+ className: l,
32
+ width: t = u,
33
+ children: a,
34
+ ...o
35
+ }) {
36
+ const e = typeof t == "number" ? `${t}px` : t;
37
+ return /* @__PURE__ */ n(
38
+ "aside",
39
+ {
40
+ className: s("hidden h-full shrink-0 lg:block", l),
41
+ "data-slot": "sidebar-container",
42
+ style: { width: e },
43
+ ...o,
44
+ children: a
45
+ }
46
+ );
47
+ }
48
+ var m = /* @__PURE__ */ ((l) => (l.FULL = "full", l.MD = "md", l.SM = "sm", l))(m || {});
49
+ function p({
50
+ className: l,
51
+ variant: t = "full",
52
+ padding: a,
53
+ children: o,
54
+ ...e
55
+ }) {
56
+ const r = {
57
+ full: "100%",
58
+ md: "768px",
59
+ sm: "374px"
60
+ };
61
+ return /* @__PURE__ */ n(
62
+ "div",
63
+ {
64
+ className: s("flex h-full min-h-0 min-w-0 flex-1", l),
65
+ "data-slot": "content-wrapper",
66
+ ...e,
67
+ children: /* @__PURE__ */ n(
68
+ "div",
69
+ {
70
+ className: s("mx-auto w-full px-4 md:px-6"),
71
+ "data-slot": "content-container",
72
+ style: {
73
+ maxWidth: r[t],
74
+ padding: a
75
+ },
76
+ children: o
77
+ }
78
+ )
79
+ }
80
+ );
81
+ }
82
+ export {
83
+ m as ContentVariant,
84
+ f as GlobalLayout,
85
+ p as GlobalLayoutContent,
86
+ x as GlobalLayoutSidebar
87
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react");function s(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=s(c),i=768;function a(){const[e,n]=r.useState(void 0);return r.useEffect(()=>{const t=window.matchMedia(`(max-width: ${i-1}px)`),o=()=>{n(window.innerWidth<i)};return t.addEventListener("change",o),n(window.innerWidth<i),()=>t.removeEventListener("change",o)},[]),!!e}exports.useIsMobile=a;
@@ -0,0 +1,2 @@
1
+ export declare function useIsMobile(): boolean;
2
+ //# sourceMappingURL=use-mobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/hooks/use-mobile.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,YAgB1B"}