@cryptlex/web-components 5.1.1 → 5.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 (128) hide show
  1. package/lib/components/data-table/data-table-filter.tsx +220 -0
  2. package/lib/components/data-table/data-table.tsx +593 -0
  3. package/lib/components/data-table/table-commons.tsx +233 -0
  4. package/lib/components/inputs/checkbox.tsx +72 -0
  5. package/lib/components/inputs/date-picker.tsx +130 -0
  6. package/lib/components/inputs/datefield.tsx +109 -0
  7. package/lib/components/inputs/field.tsx +106 -0
  8. package/lib/components/inputs/id-search.tsx +83 -0
  9. package/lib/components/inputs/input-otp.tsx +63 -0
  10. package/lib/components/inputs/multi-select.tsx +62 -0
  11. package/lib/components/inputs/numberfield.tsx +110 -0
  12. package/lib/components/inputs/searchfield.tsx +87 -0
  13. package/lib/components/inputs/select-options.tsx +303 -0
  14. package/lib/components/inputs/select.tsx +140 -0
  15. package/lib/components/inputs/textfield.tsx +96 -0
  16. package/lib/components/key-value-card/key-value-card.tsx +115 -0
  17. package/lib/components/ui/alert.tsx +32 -0
  18. package/lib/components/ui/avatar.tsx +22 -0
  19. package/lib/components/ui/badge.tsx +19 -0
  20. package/lib/components/ui/breadcrumbs.tsx +104 -0
  21. package/lib/components/ui/button.tsx +66 -0
  22. package/lib/components/ui/calendar.tsx +220 -0
  23. package/lib/components/ui/card.tsx +58 -0
  24. package/lib/components/ui/dialog.tsx +172 -0
  25. package/lib/components/ui/disclosure.tsx +113 -0
  26. package/lib/components/ui/list-box.tsx +86 -0
  27. package/lib/components/ui/loader.tsx +10 -0
  28. package/lib/components/ui/menu.tsx +168 -0
  29. package/lib/components/ui/popover.tsx +37 -0
  30. package/lib/components/ui/sidebar.tsx +552 -0
  31. package/lib/components/ui/skeleton.tsx +7 -0
  32. package/lib/components/ui/sonner.tsx +26 -0
  33. package/lib/components/ui/table.tsx +79 -0
  34. package/lib/components/ui/tabs.tsx +82 -0
  35. package/lib/components/ui/timeline.tsx +52 -0
  36. package/lib/components/ui/tooltip.tsx +30 -0
  37. package/lib/tokens.scss +89 -0
  38. package/lib/utils/form-context.tsx +7 -0
  39. package/lib/utils/form-hook.tsx +33 -0
  40. package/lib/utils/primitives.ts +68 -0
  41. package/lib/utils/resource-names.tsx +245 -0
  42. package/lib/utils/use-mobile.tsx +21 -0
  43. package/package.json +28 -38
  44. package/dist/components/data-table/data-table-filter.es.js +0 -132
  45. package/dist/components/data-table/data-table-filter.es.js.map +0 -1
  46. package/dist/components/data-table/data-table.es.js +0 -412
  47. package/dist/components/data-table/data-table.es.js.map +0 -1
  48. package/dist/components/data-table/table-commons.es.js +0 -136
  49. package/dist/components/data-table/table-commons.es.js.map +0 -1
  50. package/dist/components/inputs/checkbox.es.js +0 -61
  51. package/dist/components/inputs/checkbox.es.js.map +0 -1
  52. package/dist/components/inputs/date-picker.es.js +0 -124
  53. package/dist/components/inputs/date-picker.es.js.map +0 -1
  54. package/dist/components/inputs/datefield.es.js +0 -90
  55. package/dist/components/inputs/datefield.es.js.map +0 -1
  56. package/dist/components/inputs/field.es.js +0 -91
  57. package/dist/components/inputs/field.es.js.map +0 -1
  58. package/dist/components/inputs/id-search.es.js +0 -61
  59. package/dist/components/inputs/id-search.es.js.map +0 -1
  60. package/dist/components/inputs/input-otp.es.js +0 -60
  61. package/dist/components/inputs/input-otp.es.js.map +0 -1
  62. package/dist/components/inputs/multi-select.es.js +0 -47
  63. package/dist/components/inputs/multi-select.es.js.map +0 -1
  64. package/dist/components/inputs/numberfield.es.js +0 -101
  65. package/dist/components/inputs/numberfield.es.js.map +0 -1
  66. package/dist/components/inputs/searchfield.es.js +0 -80
  67. package/dist/components/inputs/searchfield.es.js.map +0 -1
  68. package/dist/components/inputs/select-options.es.js +0 -286
  69. package/dist/components/inputs/select-options.es.js.map +0 -1
  70. package/dist/components/inputs/select.es.js +0 -113
  71. package/dist/components/inputs/select.es.js.map +0 -1
  72. package/dist/components/inputs/textfield.es.js +0 -86
  73. package/dist/components/inputs/textfield.es.js.map +0 -1
  74. package/dist/components/key-value-card/key-value-card.es.js +0 -53
  75. package/dist/components/key-value-card/key-value-card.es.js.map +0 -1
  76. package/dist/components/ui/alert.es.js +0 -29
  77. package/dist/components/ui/alert.es.js.map +0 -1
  78. package/dist/components/ui/avatar.es.js +0 -19
  79. package/dist/components/ui/avatar.es.js.map +0 -1
  80. package/dist/components/ui/badge.es.js +0 -19
  81. package/dist/components/ui/badge.es.js.map +0 -1
  82. package/dist/components/ui/breadcrumbs.es.js +0 -104
  83. package/dist/components/ui/breadcrumbs.es.js.map +0 -1
  84. package/dist/components/ui/button.es.js +0 -58
  85. package/dist/components/ui/button.es.js.map +0 -1
  86. package/dist/components/ui/calendar.es.js +0 -163
  87. package/dist/components/ui/calendar.es.js.map +0 -1
  88. package/dist/components/ui/card.es.js +0 -53
  89. package/dist/components/ui/card.es.js.map +0 -1
  90. package/dist/components/ui/dialog.es.js +0 -156
  91. package/dist/components/ui/dialog.es.js.map +0 -1
  92. package/dist/components/ui/disclosure.es.js +0 -90
  93. package/dist/components/ui/disclosure.es.js.map +0 -1
  94. package/dist/components/ui/list-box.es.js +0 -76
  95. package/dist/components/ui/list-box.es.js.map +0 -1
  96. package/dist/components/ui/loader.es.js +0 -10
  97. package/dist/components/ui/loader.es.js.map +0 -1
  98. package/dist/components/ui/menu.es.js +0 -129
  99. package/dist/components/ui/menu.es.js.map +0 -1
  100. package/dist/components/ui/popover.es.js +0 -32
  101. package/dist/components/ui/popover.es.js.map +0 -1
  102. package/dist/components/ui/sidebar.es.js +0 -456
  103. package/dist/components/ui/sidebar.es.js.map +0 -1
  104. package/dist/components/ui/skeleton.es.js +0 -9
  105. package/dist/components/ui/skeleton.es.js.map +0 -1
  106. package/dist/components/ui/sonner.es.js +0 -24
  107. package/dist/components/ui/sonner.es.js.map +0 -1
  108. package/dist/components/ui/table.es.js +0 -88
  109. package/dist/components/ui/table.es.js.map +0 -1
  110. package/dist/components/ui/tabs.es.js +0 -83
  111. package/dist/components/ui/tabs.es.js.map +0 -1
  112. package/dist/components/ui/timeline.es.js +0 -46
  113. package/dist/components/ui/timeline.es.js.map +0 -1
  114. package/dist/components/ui/tooltip.es.js +0 -28
  115. package/dist/components/ui/tooltip.es.js.map +0 -1
  116. package/dist/index.es.d.ts +0 -861
  117. package/dist/index.es.js +0 -218
  118. package/dist/index.es.js.map +0 -1
  119. package/dist/utils/form-context.es.js +0 -8
  120. package/dist/utils/form-context.es.js.map +0 -1
  121. package/dist/utils/form-hook.es.js +0 -30
  122. package/dist/utils/form-hook.es.js.map +0 -1
  123. package/dist/utils/primitives.es.js +0 -31
  124. package/dist/utils/primitives.es.js.map +0 -1
  125. package/dist/utils/resource-names.es.js +0 -182
  126. package/dist/utils/resource-names.es.js.map +0 -1
  127. package/dist/utils/use-mobile.es.js +0 -17
  128. package/dist/utils/use-mobile.es.js.map +0 -1
package/dist/index.es.js DELETED
@@ -1,218 +0,0 @@
1
- import { ACTIONS_COLUMN_ID as o, DataTable as t, DataTableContext as a, DataTableProvider as i, useDataTable as l, useDataTableState as n } from "./components/data-table/data-table.es.js";
2
- import { COMPARISON_OPERATOR_LABELS as p, DataTableFilter as u, FILTER_COMPARISON_OPERATORS as m } from "./components/data-table/data-table-filter.es.js";
3
- import { ALL_OS as S, TABLE_CHECK_BOX_COLUMN as b, TABLE_DEFAULT_DATE_COLUMNS as x, TABLE_ID_COLUMN as C, createTableFetchFn as f, formatDate as s, getLicenseStatus as c, getValidityDisplay as D, getValueFromData as g, secondsToDuration as I } from "./components/data-table/table-commons.es.js";
4
- import { Checkbox as O, CheckboxGroup as P, TfCheckbox as F } from "./components/inputs/checkbox.es.js";
5
- import { DatePicker as E, DateRangePicker as B, TfDatePicker as _ } from "./components/inputs/date-picker.es.js";
6
- import { DateField as R, DateInput as H, DateSegment as N, TimeField as v } from "./components/inputs/datefield.es.js";
7
- import { FieldDescription as h, FieldError as k, FieldGroup as V, FieldLabel as y, FormField as U, fieldGroupVariants as K, labelVariants as j } from "./components/inputs/field.es.js";
8
- import { IdSearchInput as w, TfIdSearchInput as z } from "./components/inputs/id-search.es.js";
9
- import { InputOTP as q, InputOTPGroup as J, InputOTPSeparator as Q, InputOTPSlot as W } from "./components/inputs/input-otp.es.js";
10
- import { MultiSelect as $, TfMultiSelect as ee } from "./components/inputs/multi-select.es.js";
11
- import { SearchField as oe } from "./components/inputs/searchfield.es.js";
12
- import { SelectCollection as ae, SelectHeader as ie, SelectItem as le, SelectPopover as ne, SelectValue as de, SingleSelect as pe, TfSingleSelect as ue } from "./components/inputs/select.es.js";
13
- import { COUNTRY_OPTIONS as Te, LICENSE_TYPE_OPTIONS as Se } from "./components/inputs/select-options.es.js";
14
- import { TextField as xe, TfTextField as Ce } from "./components/inputs/textfield.es.js";
15
- import { KeyValueCard as se } from "./components/key-value-card/key-value-card.es.js";
16
- import { Alert as De, alertVariants as ge } from "./components/ui/alert.es.js";
17
- import { Avatar as Me } from "./components/ui/avatar.es.js";
18
- import { Badge as Pe } from "./components/ui/badge.es.js";
19
- import { BreadcrumbEllipsis as Le, BreadcrumbItem as Ee, BreadcrumbLink as Be, BreadcrumbPage as _e, BreadcrumbSeparator as Ae, Breadcrumbs as Re } from "./components/ui/breadcrumbs.es.js";
20
- import { Button as Ne, buttonVariants as ve } from "./components/ui/button.es.js";
21
- import { Calendar as he, CalendarCell as ke, CalendarGrid as Ve, CalendarGridBody as ye, CalendarGridHeader as Ue, CalendarHeaderCell as Ke, CalendarHeading as je, RangeCalendar as Ye } from "./components/ui/calendar.es.js";
22
- import { Card as ze, CardContent as Xe, CardDescription as qe, CardFooter as Je, CardHeader as Qe, CardTitle as We } from "./components/ui/card.es.js";
23
- import { DialogContent as $e, DialogDescription as er, DialogFooter as rr, DialogHeader as or, DialogOverlay as tr, DialogTitle as ar, DialogTrigger as ir } from "./components/ui/dialog.es.js";
24
- import { Disclosure as nr, DisclosureGroup as dr, DisclosureHeader as pr, DisclosurePanel as ur } from "./components/ui/disclosure.es.js";
25
- import { ListBox as Tr, ListBoxCollection as Sr, ListBoxHeader as br, ListBoxItem as xr } from "./components/ui/list-box.es.js";
26
- import { Loader as fr } from "./components/ui/loader.es.js";
27
- import { EasyMenu as cr, Menu as Dr, MenuCollection as gr, MenuHeader as Ir, MenuItem as Mr, MenuKeyboard as Or, MenuPopover as Pr, MenuSeparator as Fr, MenuSubTrigger as Lr, MenuTrigger as Er } from "./components/ui/menu.es.js";
28
- import { Popover as _r, PopoverDialog as Ar, PopoverTrigger as Rr } from "./components/ui/popover.es.js";
29
- import { Sidebar as Nr, SidebarContent as vr, SidebarContext as Gr, SidebarFooter as hr, SidebarGroup as kr, SidebarGroupAction as Vr, SidebarGroupContent as yr, SidebarGroupLabel as Ur, SidebarHeader as Kr, SidebarInset as jr, SidebarMenu as Yr, SidebarMenuAction as wr, SidebarMenuBadge as zr, SidebarMenuButton as Xr, SidebarMenuItem as qr, SidebarMenuSkeleton as Jr, SidebarMenuSub as Qr, SidebarMenuSubButton as Wr, SidebarMenuSubItem as Zr, SidebarProvider as $r, SidebarRail as eo, SidebarTrigger as ro, useSidebar as oo } from "./components/ui/sidebar.es.js";
30
- import { Skeleton as ao } from "./components/ui/skeleton.es.js";
31
- import { Toaster as lo } from "./components/ui/sonner.es.js";
32
- import { Table as po, TableBody as uo, TableCaption as mo, TableCell as To, TableFooter as So, TableHead as bo, TableHeader as xo, TableRow as Co } from "./components/ui/table.es.js";
33
- import { Tab as so, TabList as co, TabPanel as Do, Tabs as go } from "./components/ui/tabs.es.js";
34
- import { Timeline as Mo, TimelineContent as Oo, TimelineDate as Po, TimelineIcon as Fo, TimelineItem as Lo, timelineIconVariants as Eo } from "./components/ui/timeline.es.js";
35
- import { Tooltip as _o, TooltipTrigger as Ao } from "./components/ui/tooltip.es.js";
36
- import { fieldContext as Ho, formContext as No, useFieldContext as vo } from "./utils/form-context.es.js";
37
- import { getFieldErrorMessage as ho, useAppForm as ko } from "./utils/form-hook.es.js";
38
- import { cn as yo, getThemeHue as Uo, logout as Ko, setThemeHue as jo } from "./utils/primitives.es.js";
39
- import { ProjectProvider as wo, RESOURCE_DEFINITIONS as zo, RESOURCE_NAMES as Xo, convertCamelCaseToTitleCase as qo, convertToTitleCase as Jo, pluralizeTimes as Qo, useProjectName as Wo, useResourceFormatter as Zo } from "./utils/resource-names.es.js";
40
- import { useIsMobile as et } from "./utils/use-mobile.es.js";
41
- export {
42
- o as ACTIONS_COLUMN_ID,
43
- S as ALL_OS,
44
- De as Alert,
45
- Me as Avatar,
46
- Pe as Badge,
47
- Le as BreadcrumbEllipsis,
48
- Ee as BreadcrumbItem,
49
- Be as BreadcrumbLink,
50
- _e as BreadcrumbPage,
51
- Ae as BreadcrumbSeparator,
52
- Re as Breadcrumbs,
53
- Ne as Button,
54
- p as COMPARISON_OPERATOR_LABELS,
55
- Te as COUNTRY_OPTIONS,
56
- he as Calendar,
57
- ke as CalendarCell,
58
- Ve as CalendarGrid,
59
- ye as CalendarGridBody,
60
- Ue as CalendarGridHeader,
61
- Ke as CalendarHeaderCell,
62
- je as CalendarHeading,
63
- ze as Card,
64
- Xe as CardContent,
65
- qe as CardDescription,
66
- Je as CardFooter,
67
- Qe as CardHeader,
68
- We as CardTitle,
69
- O as Checkbox,
70
- P as CheckboxGroup,
71
- t as DataTable,
72
- a as DataTableContext,
73
- u as DataTableFilter,
74
- i as DataTableProvider,
75
- R as DateField,
76
- H as DateInput,
77
- E as DatePicker,
78
- B as DateRangePicker,
79
- N as DateSegment,
80
- $e as DialogContent,
81
- er as DialogDescription,
82
- rr as DialogFooter,
83
- or as DialogHeader,
84
- tr as DialogOverlay,
85
- ar as DialogTitle,
86
- ir as DialogTrigger,
87
- nr as Disclosure,
88
- dr as DisclosureGroup,
89
- pr as DisclosureHeader,
90
- ur as DisclosurePanel,
91
- cr as EasyMenu,
92
- m as FILTER_COMPARISON_OPERATORS,
93
- h as FieldDescription,
94
- k as FieldError,
95
- V as FieldGroup,
96
- y as FieldLabel,
97
- U as FormField,
98
- w as IdSearchInput,
99
- q as InputOTP,
100
- J as InputOTPGroup,
101
- Q as InputOTPSeparator,
102
- W as InputOTPSlot,
103
- se as KeyValueCard,
104
- Se as LICENSE_TYPE_OPTIONS,
105
- Tr as ListBox,
106
- Sr as ListBoxCollection,
107
- br as ListBoxHeader,
108
- xr as ListBoxItem,
109
- fr as Loader,
110
- Dr as Menu,
111
- gr as MenuCollection,
112
- Ir as MenuHeader,
113
- Mr as MenuItem,
114
- Or as MenuKeyboard,
115
- Pr as MenuPopover,
116
- Fr as MenuSeparator,
117
- Lr as MenuSubTrigger,
118
- Er as MenuTrigger,
119
- $ as MultiSelect,
120
- _r as Popover,
121
- Ar as PopoverDialog,
122
- Rr as PopoverTrigger,
123
- wo as ProjectProvider,
124
- zo as RESOURCE_DEFINITIONS,
125
- Xo as RESOURCE_NAMES,
126
- Ye as RangeCalendar,
127
- oe as SearchField,
128
- ae as SelectCollection,
129
- ie as SelectHeader,
130
- le as SelectItem,
131
- ne as SelectPopover,
132
- de as SelectValue,
133
- Nr as Sidebar,
134
- vr as SidebarContent,
135
- Gr as SidebarContext,
136
- hr as SidebarFooter,
137
- kr as SidebarGroup,
138
- Vr as SidebarGroupAction,
139
- yr as SidebarGroupContent,
140
- Ur as SidebarGroupLabel,
141
- Kr as SidebarHeader,
142
- jr as SidebarInset,
143
- Yr as SidebarMenu,
144
- wr as SidebarMenuAction,
145
- zr as SidebarMenuBadge,
146
- Xr as SidebarMenuButton,
147
- qr as SidebarMenuItem,
148
- Jr as SidebarMenuSkeleton,
149
- Qr as SidebarMenuSub,
150
- Wr as SidebarMenuSubButton,
151
- Zr as SidebarMenuSubItem,
152
- $r as SidebarProvider,
153
- eo as SidebarRail,
154
- ro as SidebarTrigger,
155
- pe as SingleSelect,
156
- ao as Skeleton,
157
- b as TABLE_CHECK_BOX_COLUMN,
158
- x as TABLE_DEFAULT_DATE_COLUMNS,
159
- C as TABLE_ID_COLUMN,
160
- so as Tab,
161
- co as TabList,
162
- Do as TabPanel,
163
- po as Table,
164
- uo as TableBody,
165
- mo as TableCaption,
166
- To as TableCell,
167
- So as TableFooter,
168
- bo as TableHead,
169
- xo as TableHeader,
170
- Co as TableRow,
171
- go as Tabs,
172
- xe as TextField,
173
- F as TfCheckbox,
174
- _ as TfDatePicker,
175
- z as TfIdSearchInput,
176
- ee as TfMultiSelect,
177
- ue as TfSingleSelect,
178
- Ce as TfTextField,
179
- v as TimeField,
180
- Mo as Timeline,
181
- Oo as TimelineContent,
182
- Po as TimelineDate,
183
- Fo as TimelineIcon,
184
- Lo as TimelineItem,
185
- lo as Toaster,
186
- _o as Tooltip,
187
- Ao as TooltipTrigger,
188
- ge as alertVariants,
189
- ve as buttonVariants,
190
- yo as cn,
191
- qo as convertCamelCaseToTitleCase,
192
- Jo as convertToTitleCase,
193
- f as createTableFetchFn,
194
- Ho as fieldContext,
195
- K as fieldGroupVariants,
196
- No as formContext,
197
- s as formatDate,
198
- ho as getFieldErrorMessage,
199
- c as getLicenseStatus,
200
- Uo as getThemeHue,
201
- D as getValidityDisplay,
202
- g as getValueFromData,
203
- j as labelVariants,
204
- Ko as logout,
205
- Qo as pluralizeTimes,
206
- I as secondsToDuration,
207
- jo as setThemeHue,
208
- Eo as timelineIconVariants,
209
- ko as useAppForm,
210
- l as useDataTable,
211
- n as useDataTableState,
212
- vo as useFieldContext,
213
- et as useIsMobile,
214
- Wo as useProjectName,
215
- Zo as useResourceFormatter,
216
- oo as useSidebar
217
- };
218
- //# sourceMappingURL=index.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +0,0 @@
1
- import { createFormHookContexts as o } from "@tanstack/react-form";
2
- const { fieldContext: e, formContext: r, useFieldContext: n } = o();
3
- export {
4
- e as fieldContext,
5
- r as formContext,
6
- n as useFieldContext
7
- };
8
- //# sourceMappingURL=form-context.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-context.es.js","sources":["../../lib/utils/form-context.tsx"],"sourcesContent":["import { createFormHookContexts } from \"@tanstack/react-form\";\n\n/**\n * useFieldContext is used in custom components\n */\nexport const { fieldContext, formContext, useFieldContext } =\n\tcreateFormHookContexts();\n"],"names":["fieldContext","formContext","useFieldContext","createFormHookContexts"],"mappings":";AAKO,MAAM,EAAE,cAAAA,GAAc,aAAAC,GAAa,iBAAAC,EAAA,IACzCC,EAAA;"}
@@ -1,30 +0,0 @@
1
- import { TfCheckbox as t } from "../components/inputs/checkbox.es.js";
2
- import { TfNumberField as m } from "../components/inputs/numberfield.es.js";
3
- import { TfSingleSelect as e } from "../components/inputs/select.es.js";
4
- import { formContext as f, fieldContext as p } from "./form-context.es.js";
5
- import { createFormHook as i } from "@tanstack/react-form";
6
- import { TfMultiSelect as n } from "../components/inputs/multi-select.es.js";
7
- import { TfTextField as s } from "../components/inputs/textfield.es.js";
8
- import { Button as a } from "../components/ui/button.es.js";
9
- function S(o) {
10
- return o == null ? void 0 : o.state.meta.errors.map((r) => r == null ? void 0 : r.message).join(",");
11
- }
12
- const { useAppForm: b } = i({
13
- fieldComponents: {
14
- TfTextField: s,
15
- TfNumberField: m,
16
- TfMultiSelect: n,
17
- TfSingleSelect: e,
18
- TfCheckbox: t
19
- },
20
- formComponents: {
21
- Button: a
22
- },
23
- fieldContext: p,
24
- formContext: f
25
- });
26
- export {
27
- S as getFieldErrorMessage,
28
- b as useAppForm
29
- };
30
- //# sourceMappingURL=form-hook.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-hook.es.js","sources":["../../lib/utils/form-hook.tsx"],"sourcesContent":["import {\n\tTfMultiSelect,\n\tTfTextField\n} from \"@/components/inputs\";\nimport { TfCheckbox } from \"@/components/inputs/checkbox\";\nimport { TfNumberField } from \"@/components/inputs/numberfield\";\nimport { TfSingleSelect } from \"@/components/inputs/select\";\nimport { Button } from \"@/components/ui\";\nimport { fieldContext, formContext } from \"@/utils/form-context\";\nimport { createFormHook, type FieldApi } from \"@tanstack/react-form\";\n\nexport function getFieldErrorMessage(field: FieldApi<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>): string {\n\treturn field?.state.meta.errors.map((e) => e?.message).join(\",\")\n}\n\n/** Don't put this in the same file as form-context.tsx, this causes circular dependencies. */\n\n/** TODO, lazy loading when fieldComponents are large */\n/**\n * Builder for form logic and user interfaces\n */\nexport const { useAppForm } = createFormHook({\n\tfieldComponents: {\n\t\tTfTextField,\n\t\tTfNumberField,\n\t\tTfMultiSelect,\n\t\tTfSingleSelect,\n\t\tTfCheckbox,\n\t},\n\tformComponents: {\n\t\tButton,\n\t},\n\tfieldContext,\n\tformContext,\n});\n"],"names":["getFieldErrorMessage","field","e","useAppForm","createFormHook","TfTextField","TfNumberField","TfMultiSelect","TfSingleSelect","TfCheckbox","Button","fieldContext","formContext"],"mappings":";;;;;;;;AAWO,SAASA,EAAqBC,GAAwH;AAC5J,SAAOA,KAAA,gBAAAA,EAAO,MAAM,KAAK,OAAO,IAAI,CAACC,MAAMA,KAAA,gBAAAA,EAAG,SAAS,KAAK;AAC7D;AAQO,MAAM,EAAE,YAAAC,EAAA,IAAeC,EAAe;AAAA,EAC5C,iBAAiB;AAAA,IAChB,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,YAAAC;AAAA,EAAA;AAAA,EAED,gBAAgB;AAAA,IACf,QAAAC;AAAA,EAAA;AAAA,EAED,cAAAC;AAAA,EACA,aAAAC;AACD,CAAC;"}
@@ -1,31 +0,0 @@
1
- import { clsx as t } from "clsx";
2
- function l(...e) {
3
- return t(e);
4
- }
5
- const o = "--primary-hue";
6
- function u() {
7
- return document.documentElement.style.getPropertyValue(o);
8
- }
9
- function m(e) {
10
- document.documentElement.style.setProperty(
11
- o,
12
- // In this case, it must be a number.
13
- e
14
- );
15
- }
16
- const n = "AT", r = "RT";
17
- function i() {
18
- if (typeof window < "u" && window.localStorage)
19
- try {
20
- localStorage.removeItem(r), localStorage.removeItem(n), window.location.replace("/auth/login");
21
- } catch (e) {
22
- console.error("Logout failed:", e);
23
- }
24
- }
25
- export {
26
- l as cn,
27
- u as getThemeHue,
28
- i as logout,
29
- m as setThemeHue
30
- };
31
- //# sourceMappingURL=primitives.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"primitives.es.js","sources":["../../lib/utils/primitives.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\n\n/** Classnames */\nexport function cn(...inputs: ClassValue[]) {\n return clsx(inputs);\n}\n\n/**\n * This is the variable name representing the primary hue.\n * Referenced in tokens.scss -> token.css\n */\nconst PRIMARY_HUE_PROPERTY = \"--primary-hue\";\n\n/**\n *\n * @returns\n */\nexport function getThemeHue() {\n return document.documentElement.style.getPropertyValue(PRIMARY_HUE_PROPERTY);\n}\n\n/**\n * @param hue the hue value to set in the document style\n */\nexport function setThemeHue(hue: number) {\n document.documentElement.style.setProperty(\n PRIMARY_HUE_PROPERTY,\n // In this case, it must be a number.\n hue as unknown as string,\n );\n}\n\nconst ACCESS_TOKEN = \"AT\";\nconst REFRESH_TOKEN = \"RT\";\nexport function logout() {\n if (typeof window !== \"undefined\" && window.localStorage) {\n try {\n localStorage.removeItem(REFRESH_TOKEN);\n localStorage.removeItem(ACCESS_TOKEN);\n window.location.replace(\"/auth/login\");\n } catch (error) {\n console.error(\"Logout failed:\", error);\n }\n }\n}\n\nexport type JwtDecode = {\n aud: string;\n email: string;\n exp: number;\n iat: number;\n jti: string;\n region: string;\n role: string;\n role_type: string;\n scope: string[];\n sub: string;\n teat: number;\n tenantid: string;\n token_usage: string;\n sadmin?: string;\n};\n\nexport type CtxPortals =\n | \"customer-portal\"\n | \"system-portal\"\n | \"reseller-portal\"\n | \"admin-portal\";\n"],"names":["cn","inputs","clsx","PRIMARY_HUE_PROPERTY","getThemeHue","setThemeHue","hue","ACCESS_TOKEN","REFRESH_TOKEN","logout","error"],"mappings":";AAGO,SAASA,KAAMC,GAAsB;AACxC,SAAOC,EAAKD,CAAM;AACtB;AAMA,MAAME,IAAuB;AAMtB,SAASC,IAAc;AAC1B,SAAO,SAAS,gBAAgB,MAAM,iBAAiBD,CAAoB;AAC/E;AAKO,SAASE,EAAYC,GAAa;AACrC,WAAS,gBAAgB,MAAM;AAAA,IAC3BH;AAAA;AAAA,IAEAG;AAAA,EAAA;AAER;AAEA,MAAMC,IAAe,MACfC,IAAgB;AACf,SAASC,IAAS;AACrB,MAAI,OAAO,SAAW,OAAe,OAAO;AACxC,QAAI;AACA,mBAAa,WAAWD,CAAa,GACrC,aAAa,WAAWD,CAAY,GACpC,OAAO,SAAS,QAAQ,aAAa;AAAA,IACzC,SAASG,GAAO;AACZ,cAAQ,MAAM,kBAAkBA,CAAK;AAAA,IACzC;AAER;"}
@@ -1,182 +0,0 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { createContext as i, use as l } from "react";
3
- function g(e) {
4
- return e.replace(/([A-Z])/g, " $1").trim().split(" ").map((o) => o.charAt(0).toUpperCase() + o.slice(1).toLowerCase()).join(" ");
5
- }
6
- function f(e, o) {
7
- return o > 1 ? /y$/.test(e) ? e === "Day" ? "Days" : e.replace(/y$/, "ies") : e.concat("s") : e;
8
- }
9
- function c(e) {
10
- if (e) {
11
- const o = e.replace(/([A-Z])/g, " $1");
12
- return o.charAt(0).toUpperCase().concat(o.slice(1)).replace(/\.[a-z]/, (s) => s.replace(".", " ").toUpperCase());
13
- }
14
- return e;
15
- }
16
- const t = {
17
- "product.displayName": "Product"
18
- }, y = [
19
- "access-token",
20
- "account",
21
- "activation",
22
- "activation-log",
23
- "admin-role",
24
- "audit-log",
25
- "automated-email",
26
- "automated-email-event-log",
27
- "card",
28
- "feature-flag",
29
- "invoice",
30
- "license",
31
- "license-template",
32
- "maintenance-policy",
33
- "organization",
34
- "plan",
35
- "product",
36
- "product-version",
37
- "profile",
38
- "release",
39
- "release-channel",
40
- "release-file",
41
- "release-platform",
42
- "report",
43
- "role",
44
- "role-claim",
45
- "saml-configuration",
46
- "segment",
47
- "sending-domain",
48
- "setting",
49
- "tag",
50
- "team-member",
51
- "trial",
52
- "trial-policy",
53
- "user",
54
- "user-group",
55
- "webhook",
56
- "webhook-event-log",
57
- "webhook-trigger",
58
- "reseller",
59
- "oidc-configuration",
60
- "organization-claim",
61
- "reseller-claim"
62
- ], h = {
63
- account: "Your organization account.",
64
- product: "Products are the software products you want to license",
65
- license: "Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.",
66
- "access-token": "Access Tokens are used to authenticate your API requests.",
67
- activation: "Activations, also known as devices/machines/seats are the devices consuming licenses.",
68
- "activation-log": "Activation Log is a log entry of activation/deactivation of a particular license.",
69
- trial: "Trial/Trial Activation is a device that has activated a trial of your product.",
70
- "audit-log": "Audit logs contain all the changes made to your account.",
71
- "automated-email": "Automated Email allow you to send marketing emails based on events on the linked product.",
72
- "automated-email-event-log": "Automated email event log is the log of all the automated email events for your product.",
73
- card: "The payment card for your account.",
74
- "feature-flag": "Feature flags define features that make up tiers for your products.",
75
- invoice: "",
76
- "license-template": "License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.",
77
- "maintenance-policy": "Maintenance policies represent support contracts and can be linked to licenses.",
78
- plan: "",
79
- "product-version": "Product Versions are sets of Feature Flags that define the tiers of your products.",
80
- "release-channel": "Release channel is the release channel for your product.",
81
- "release-file": "Release files are files within your created releases.",
82
- "release-platform": 'Release Platforms differentiate the target platform for your release. Common platforms include "Windows", "macOS", and "Linux".',
83
- release: "Releases help you to manage different versions of your app, and secure distribute it to licensed users.",
84
- report: "Analytics data for your account",
85
- "role-claim": "",
86
- role: "Roles define permissions for your team.",
87
- "saml-configuration": "",
88
- segment: "Sets of filters that can be saved to filter resources.",
89
- "trial-policy": "Trial policies are templates for creating trials for your products.",
90
- "webhook-event-log": "Webhook Event Logs are logs of events that have occured on webhooks.",
91
- "webhook-trigger": "",
92
- webhook: "Webhooks are HTTP callbacks which are triggered by specific events.",
93
- organization: "",
94
- profile: "",
95
- setting: "",
96
- tag: "Tags allow you to manage your licenses and customers on the dashboard.",
97
- "team-member": "Team members can access the account based on their roles.",
98
- user: "A user refers to your customer whom you want to license your product.",
99
- "sending-domain": "Allows Cryptlex to send emails on your behalf using your From Email address",
100
- "admin-role": "Roles that have type admin",
101
- "user-group": "Groups of users that you can assign licenses to.",
102
- reseller: "Resellers allow you to delegate user management to third parties or partners",
103
- "oidc-configuration": "",
104
- "organization-claim": "",
105
- "reseller-claim": ""
106
- }, a = {
107
- id: "ID",
108
- createdAt: "Creation Date",
109
- scopes: "Permissions",
110
- updatedAt: "Last Updated",
111
- expiresAt: "Expiration Date",
112
- lastSeenAt: "Last Seen",
113
- os: "OS",
114
- osVersion: "OS Version",
115
- key: "License Key",
116
- vmName: "VM Name",
117
- container: "Container",
118
- allowedIpRange: "Allowed IP Range",
119
- allowedIpRanges: "Allowed IP Ranges",
120
- allowedIpAddresses: "Allowed IP Addresses",
121
- disallowedIpAddresses: "Disallowed IP Addresses",
122
- allowVmActivation: "Allow VM Activation",
123
- disableGeoLocation: "Disable Geolocation",
124
- "user.id": "User ID",
125
- userId: "User",
126
- productId: "Product",
127
- downloads: "Total Downloads",
128
- claims: "Permissions",
129
- googleSsoEnabled: "Google Login Enabled",
130
- lastAttemptedAt: "Last Attempt Date",
131
- url: "URL",
132
- "trialPolicy.name": "Trial Policy Name",
133
- "licensePolicy.name": "License Template Name",
134
- licensePolicy: "License Template",
135
- eventLog: "Audit Log",
136
- cc: "CC Recepients",
137
- bcc: "BCC Recepients",
138
- ipAddress: "IP Address",
139
- resellerId: "Reseller",
140
- productVersionId: "Product Version",
141
- releaseId: "Release",
142
- maintenancePolicyId: "Maintenance Policy",
143
- webhookId: "Webhook",
144
- automatedEmailId: "Automated Email",
145
- "location.countryName": "Country",
146
- "location.ipAddress": "IP Address",
147
- "location.countryCode": "Country",
148
- organizationId: "Organization",
149
- "address.country": "Country",
150
- "address.addressLine1": "Address Line 1",
151
- "address.addressLine2": "Address Line 2",
152
- responseStatusCode: "HTTP Status Code",
153
- resourceId: "Resource ID",
154
- Sso: "SAML SSO 2.0",
155
- "reseller.name": "Reseller",
156
- sendingDomain: "Email Sending Domain"
157
- };
158
- function d(e, o) {
159
- return o !== "admin-portal" && e in t ? t[e] : e in a ? a[e] : c(e);
160
- }
161
- const r = i("admin-portal");
162
- function A({ projectName: e, children: o }) {
163
- return /* @__PURE__ */ n(r.Provider, { value: e, children: o });
164
- }
165
- function u() {
166
- return l(r);
167
- }
168
- function v() {
169
- const e = u();
170
- return (o) => d(o, e);
171
- }
172
- export {
173
- A as ProjectProvider,
174
- h as RESOURCE_DEFINITIONS,
175
- y as RESOURCE_NAMES,
176
- c as convertCamelCaseToTitleCase,
177
- g as convertToTitleCase,
178
- f as pluralizeTimes,
179
- u as useProjectName,
180
- v as useResourceFormatter
181
- };
182
- //# sourceMappingURL=resource-names.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource-names.es.js","sources":["../../lib/utils/resource-names.tsx"],"sourcesContent":["import type { CtxPortals } from \"@/utils/primitives\";\nimport { createContext, use } from \"react\";\n\n/**\n *\n * @param input camelCase\n * @returns title case for the camelCase string\n */\nexport function convertToTitleCase(input: string): string {\n return input\n .replace(/([A-Z])/g, \" $1\") // Insert space before capital letters\n .trim() // Remove any leading/trailing spaces\n .split(\" \") // Split into words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) // Capitalize each word\n .join(\" \"); // Join back into a single string\n}\n\nexport function pluralizeTimes(resourceName: string, count: number) {\n if (count > 1) {\n if (/y$/.test(resourceName)) {\n if (resourceName === \"Day\") return \"Days\";\n return resourceName.replace(/y$/, \"ies\");\n }\n return resourceName.concat(\"s\");\n }\n return resourceName;\n}\n\n/**\n * Converts a string from 'camelCase' to 'Title Case'\n * @param input String to convert to `Title Case`\n */\nexport function convertCamelCaseToTitleCase(input: string) {\n if (input) {\n const spacedString = input.replace(/([A-Z])/g, \" $1\");\n return spacedString\n .charAt(0)\n .toUpperCase()\n .concat(spacedString.slice(1))\n .replace(/\\.[a-z]/, (substr: string) => {\n return substr.replace(\".\", \" \").toUpperCase();\n });\n }\n return input;\n}\n\n// Display names specific to customer and reseller portal\nconst OTHER_PORTALS_DISPLAY_NAME: Record<string, string> = {\n \"product.displayName\": \"Product\",\n};\n\n/** Resource Name should ALWAYS be in singular form */\nexport const RESOURCE_NAMES = [\n \"access-token\",\n \"account\",\n \"activation\",\n \"activation-log\",\n \"admin-role\",\n \"audit-log\",\n \"automated-email\",\n \"automated-email-event-log\",\n \"card\",\n \"feature-flag\",\n \"invoice\",\n \"license\",\n \"license-template\",\n \"maintenance-policy\",\n \"organization\",\n \"plan\",\n \"product\",\n \"product-version\",\n \"profile\",\n \"release\",\n \"release-channel\",\n \"release-file\",\n \"release-platform\",\n \"report\",\n \"role\",\n \"role-claim\",\n \"saml-configuration\",\n \"segment\",\n \"sending-domain\",\n \"setting\",\n \"tag\",\n \"team-member\",\n \"trial\",\n \"trial-policy\",\n \"user\",\n \"user-group\",\n \"webhook\",\n \"webhook-event-log\",\n \"webhook-trigger\",\n \"reseller\",\n \"oidc-configuration\",\n \"organization-claim\",\n \"reseller-claim\",\n] as const;\nexport type ResourceName = (typeof RESOURCE_NAMES)[number];\nexport const RESOURCE_DEFINITIONS: Record<ResourceName, string> = {\n account: \"Your organization account.\",\n product: \"Products are the software products you want to license\",\n license:\n \"Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.\",\n \"access-token\": \"Access Tokens are used to authenticate your API requests.\",\n activation:\n \"Activations, also known as devices/machines/seats are the devices consuming licenses.\",\n \"activation-log\":\n \"Activation Log is a log entry of activation/deactivation of a particular license.\",\n trial:\n \"Trial/Trial Activation is a device that has activated a trial of your product.\",\n \"audit-log\": \"Audit logs contain all the changes made to your account.\",\n \"automated-email\":\n \"Automated Email allow you to send marketing emails based on events on the linked product.\",\n \"automated-email-event-log\":\n \"Automated email event log is the log of all the automated email events for your product.\",\n card: \"The payment card for your account.\",\n \"feature-flag\":\n \"Feature flags define features that make up tiers for your products.\",\n invoice: \"\",\n \"license-template\":\n \"License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.\",\n \"maintenance-policy\":\n \"Maintenance policies represent support contracts and can be linked to licenses.\",\n plan: \"\",\n \"product-version\":\n \"Product Versions are sets of Feature Flags that define the tiers of your products.\",\n \"release-channel\": \"Release channel is the release channel for your product.\",\n \"release-file\": \"Release files are files within your created releases.\",\n \"release-platform\":\n 'Release Platforms differentiate the target platform for your release. Common platforms include \"Windows\", \"macOS\", and \"Linux\".',\n release:\n \"Releases help you to manage different versions of your app, and secure distribute it to licensed users.\",\n report: \"Analytics data for your account\",\n \"role-claim\": \"\",\n role: \"Roles define permissions for your team.\",\n \"saml-configuration\": \"\",\n segment: \"Sets of filters that can be saved to filter resources.\",\n \"trial-policy\":\n \"Trial policies are templates for creating trials for your products.\",\n \"webhook-event-log\":\n \"Webhook Event Logs are logs of events that have occured on webhooks.\",\n \"webhook-trigger\": \"\",\n webhook:\n \"Webhooks are HTTP callbacks which are triggered by specific events.\",\n organization: \"\",\n profile: \"\",\n setting: \"\",\n tag: \"Tags allow you to manage your licenses and customers on the dashboard.\",\n \"team-member\": \"Team members can access the account based on their roles.\",\n user: \"A user refers to your customer whom you want to license your product.\",\n \"sending-domain\":\n \"Allows Cryptlex to send emails on your behalf using your From Email address\",\n \"admin-role\": \"Roles that have type admin\",\n \"user-group\": \"Groups of users that you can assign licenses to.\",\n reseller:\n \"Resellers allow you to delegate user management to third parties or partners\",\n \"oidc-configuration\": \"\",\n \"organization-claim\": \"\",\n \"reseller-claim\": \"\",\n};\n\nconst RESOURCE_DISPLAY_NAMES: Record<string, string> = {\n id: \"ID\",\n createdAt: \"Creation Date\",\n scopes: \"Permissions\",\n updatedAt: \"Last Updated\",\n expiresAt: \"Expiration Date\",\n lastSeenAt: \"Last Seen\",\n os: \"OS\",\n osVersion: \"OS Version\",\n key: \"License Key\",\n vmName: \"VM Name\",\n container: \"Container\",\n allowedIpRange: \"Allowed IP Range\",\n allowedIpRanges: \"Allowed IP Ranges\",\n allowedIpAddresses: \"Allowed IP Addresses\",\n disallowedIpAddresses: \"Disallowed IP Addresses\",\n allowVmActivation: \"Allow VM Activation\",\n disableGeoLocation: \"Disable Geolocation\",\n \"user.id\": \"User ID\",\n userId: \"User\",\n productId: \"Product\",\n downloads: \"Total Downloads\",\n claims: \"Permissions\",\n googleSsoEnabled: \"Google Login Enabled\",\n lastAttemptedAt: \"Last Attempt Date\",\n url: \"URL\",\n \"trialPolicy.name\": \"Trial Policy Name\",\n \"licensePolicy.name\": \"License Template Name\",\n licensePolicy: \"License Template\",\n eventLog: \"Audit Log\",\n cc: \"CC Recepients\",\n bcc: \"BCC Recepients\",\n ipAddress: \"IP Address\",\n resellerId: \"Reseller\",\n productVersionId: \"Product Version\",\n releaseId: \"Release\",\n maintenancePolicyId: \"Maintenance Policy\",\n webhookId: \"Webhook\",\n automatedEmailId: \"Automated Email\",\n \"location.countryName\": \"Country\",\n \"location.ipAddress\": \"IP Address\",\n \"location.countryCode\": \"Country\",\n organizationId: \"Organization\",\n \"address.country\": \"Country\",\n \"address.addressLine1\": \"Address Line 1\",\n \"address.addressLine2\": \"Address Line 2\",\n responseStatusCode: \"HTTP Status Code\",\n resourceId: \"Resource ID\",\n Sso: \"SAML SSO 2.0\",\n \"reseller.name\": \"Reseller\",\n sendingDomain: \"Email Sending Domain\",\n};\n\nfunction getResourceDisplayName(\n resourceName: string,\n portal: CtxPortals,\n) {\n if (portal !== \"admin-portal\" && resourceName in OTHER_PORTALS_DISPLAY_NAME) {\n return OTHER_PORTALS_DISPLAY_NAME[resourceName];\n } else if (resourceName in RESOURCE_DISPLAY_NAMES) {\n return RESOURCE_DISPLAY_NAMES[resourceName];\n } else {\n return convertCamelCaseToTitleCase(resourceName);\n }\n}\n\nconst ProjectContext = createContext<CtxPortals>('admin-portal');\n\nexport function ProjectProvider({ projectName, children }: { projectName: CtxPortals; children: React.ReactNode; }) {\n return (\n <ProjectContext.Provider value={projectName}>\n {children}\n </ProjectContext.Provider>\n );\n}\n\nexport function useProjectName(): CtxPortals {\n return use(ProjectContext);\n}\n\nexport function useResourceFormatter(): (resourceName: string) => string {\n const portal = useProjectName();\n return (resourceName: string) => getResourceDisplayName(resourceName, portal);\n}"],"names":["convertToTitleCase","input","word","pluralizeTimes","resourceName","count","convertCamelCaseToTitleCase","spacedString","substr","OTHER_PORTALS_DISPLAY_NAME","RESOURCE_NAMES","RESOURCE_DEFINITIONS","RESOURCE_DISPLAY_NAMES","getResourceDisplayName","portal","ProjectContext","createContext","ProjectProvider","projectName","children","useProjectName","use","useResourceFormatter"],"mappings":"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"}
@@ -1,17 +0,0 @@
1
- import * as o from "react";
2
- const e = 768;
3
- function r() {
4
- const [s, n] = o.useState(
5
- void 0
6
- );
7
- return o.useEffect(() => {
8
- const t = window.matchMedia(`(max-width: ${e - 1}px)`), i = () => {
9
- n(window.innerWidth < e);
10
- };
11
- return t.addEventListener("change", i), n(window.innerWidth < e), () => t.removeEventListener("change", i);
12
- }, []), !!s;
13
- }
14
- export {
15
- r as useIsMobile
16
- };
17
- //# sourceMappingURL=use-mobile.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-mobile.es.js","sources":["../../lib/utils/use-mobile.tsx"],"sourcesContent":["import * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n\tconst [isMobile, setIsMobile] = React.useState<boolean | undefined>(\n\t\tundefined,\n\t);\n\n\tReact.useEffect(() => {\n\t\tconst mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n\t\tconst onChange = () => {\n\t\t\tsetIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n\t\t};\n\t\tmql.addEventListener(\"change\", onChange);\n\t\tsetIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n\t\treturn () => mql.removeEventListener(\"change\", onChange);\n\t}, []);\n\n\treturn !!isMobile;\n}\n"],"names":["MOBILE_BREAKPOINT","useIsMobile","isMobile","setIsMobile","React","mql","onChange"],"mappings":";AAEA,MAAMA,IAAoB;AAEnB,SAASC,IAAc;AAC7B,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAM;AAAA,IACrC;AAAA,EAAA;AAGD,SAAAA,EAAM,UAAU,MAAM;AACrB,UAAMC,IAAM,OAAO,WAAW,eAAeL,IAAoB,CAAC,KAAK,GACjEM,IAAW,MAAM;AACtB,MAAAH,EAAY,OAAO,aAAaH,CAAiB;AAAA,IAClD;AACA,WAAAK,EAAI,iBAAiB,UAAUC,CAAQ,GACvCH,EAAY,OAAO,aAAaH,CAAiB,GAC1C,MAAMK,EAAI,oBAAoB,UAAUC,CAAQ;AAAA,EACxD,GAAG,CAAA,CAAE,GAEE,CAAC,CAACJ;AACV;"}