mogh_ui 0.7.3 → 0.7.4

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 (196) hide show
  1. package/dist/auth/index.d.ts +16 -22
  2. package/dist/auth/index.d.ts.map +1 -0
  3. package/dist/auth/login/header.d.ts +4 -7
  4. package/dist/auth/login/header.d.ts.map +1 -0
  5. package/dist/auth/login/index.d.ts +4 -7
  6. package/dist/auth/login/index.d.ts.map +1 -0
  7. package/dist/auth/profile/index.d.ts +4 -5
  8. package/dist/auth/profile/index.d.ts.map +1 -0
  9. package/dist/auth/profile/linked-logins.d.ts +4 -7
  10. package/dist/auth/profile/linked-logins.d.ts.map +1 -0
  11. package/dist/auth/profile/passkey.d.ts +3 -6
  12. package/dist/auth/profile/passkey.d.ts.map +1 -0
  13. package/dist/auth/profile/totp.d.ts +3 -6
  14. package/dist/auth/profile/totp.d.ts.map +1 -0
  15. package/dist/auth/utils.d.ts +3 -4
  16. package/dist/auth/utils.d.ts.map +1 -0
  17. package/dist/color.d.ts +4 -5
  18. package/dist/color.d.ts.map +1 -0
  19. package/dist/components/back-button.d.ts +4 -7
  20. package/dist/components/back-button.d.ts.map +1 -0
  21. package/dist/components/button-link.d.ts +4 -7
  22. package/dist/components/button-link.d.ts.map +1 -0
  23. package/dist/components/config/confirm.d.ts +4 -8
  24. package/dist/components/config/confirm.d.ts.map +1 -0
  25. package/dist/components/config/group.d.ts +9 -10
  26. package/dist/components/config/group.d.ts.map +1 -0
  27. package/dist/components/config/index.d.ts +12 -25
  28. package/dist/components/config/index.d.ts.map +1 -0
  29. package/dist/components/config/item.d.ts +15 -19
  30. package/dist/components/config/item.d.ts.map +1 -0
  31. package/dist/components/config/layout.d.ts +5 -9
  32. package/dist/components/config/layout.d.ts.map +1 -0
  33. package/dist/components/config/unsaved-changes.d.ts +3 -6
  34. package/dist/components/config/unsaved-changes.d.ts.map +1 -0
  35. package/dist/components/confirm-button.d.ts +8 -12
  36. package/dist/components/confirm-button.d.ts.map +1 -0
  37. package/dist/components/confirm-icon.d.ts +8 -12
  38. package/dist/components/confirm-icon.d.ts.map +1 -0
  39. package/dist/components/confirm-modal.d.ts +5 -8
  40. package/dist/components/confirm-modal.d.ts.map +1 -0
  41. package/dist/components/copy-button.d.ts +6 -9
  42. package/dist/components/copy-button.d.ts.map +1 -0
  43. package/dist/components/copy-text.d.ts +4 -7
  44. package/dist/components/copy-text.d.ts.map +1 -0
  45. package/dist/components/create-modal.d.ts +5 -8
  46. package/dist/components/create-modal.d.ts.map +1 -0
  47. package/dist/components/data-table.d.ts +8 -11
  48. package/dist/components/data-table.d.ts.map +1 -0
  49. package/dist/components/divided-children/index.d.ts +6 -10
  50. package/dist/components/divided-children/index.d.ts.map +1 -0
  51. package/dist/components/enable-switch.d.ts +4 -7
  52. package/dist/components/enable-switch.d.ts.map +1 -0
  53. package/dist/components/entity-header.d.ts +5 -8
  54. package/dist/components/entity-header.d.ts.map +1 -0
  55. package/dist/components/entity-page.d.ts +5 -8
  56. package/dist/components/entity-page.d.ts.map +1 -0
  57. package/dist/components/fancy-card/index.d.ts +7 -10
  58. package/dist/components/fancy-card/index.d.ts.map +1 -0
  59. package/dist/components/hover-error.d.ts +3 -6
  60. package/dist/components/hover-error.d.ts.map +1 -0
  61. package/dist/components/info-card.d.ts +8 -12
  62. package/dist/components/info-card.d.ts.map +1 -0
  63. package/dist/components/input-list.d.ts +4 -7
  64. package/dist/components/input-list.d.ts.map +1 -0
  65. package/dist/components/labelled-switch.d.ts +5 -8
  66. package/dist/components/labelled-switch.d.ts.map +1 -0
  67. package/dist/components/labels-group.d.ts +4 -7
  68. package/dist/components/labels-group.d.ts.map +1 -0
  69. package/dist/components/loading-screen.d.ts +4 -7
  70. package/dist/components/loading-screen.d.ts.map +1 -0
  71. package/dist/components/mobile-friendly-tabs.d.ts +12 -15
  72. package/dist/components/mobile-friendly-tabs.d.ts.map +1 -0
  73. package/dist/components/monaco/index.d.ts +9 -11
  74. package/dist/components/monaco/index.d.ts.map +1 -0
  75. package/dist/components/monaco/init.cjs +8 -7
  76. package/dist/components/monaco/init.cjs.map +1 -1
  77. package/dist/components/monaco/init.d.ts +8 -2
  78. package/dist/components/monaco/init.d.ts.map +1 -0
  79. package/dist/components/monaco/syntax/fancy_toml.d.ts +2 -2
  80. package/dist/components/monaco/syntax/fancy_toml.d.ts.map +1 -0
  81. package/dist/components/monaco/syntax/key_value.d.ts +2 -2
  82. package/dist/components/monaco/syntax/key_value.d.ts.map +1 -0
  83. package/dist/components/monaco/syntax/shell.d.ts +2 -2
  84. package/dist/components/monaco/syntax/shell.d.ts.map +1 -0
  85. package/dist/components/monaco/syntax/string_list.d.ts +2 -2
  86. package/dist/components/monaco/syntax/string_list.d.ts.map +1 -0
  87. package/dist/components/monaco/syntax/toml.d.ts +2 -2
  88. package/dist/components/monaco/syntax/toml.d.ts.map +1 -0
  89. package/dist/components/monaco/syntax/yaml.d.ts +2 -2
  90. package/dist/components/monaco/syntax/yaml.d.ts.map +1 -0
  91. package/dist/components/monaco/theme.d.ts +2 -2
  92. package/dist/components/monaco/theme.d.ts.map +1 -0
  93. package/dist/components/page-guard.d.ts +5 -8
  94. package/dist/components/page-guard.d.ts.map +1 -0
  95. package/dist/components/page.d.ts +8 -12
  96. package/dist/components/page.d.ts.map +1 -0
  97. package/dist/components/search-input.d.ts +4 -7
  98. package/dist/components/search-input.d.ts.map +1 -0
  99. package/dist/components/section.d.ts +8 -12
  100. package/dist/components/section.d.ts.map +1 -0
  101. package/dist/components/shared-text-update.d.ts +7 -10
  102. package/dist/components/shared-text-update.d.ts.map +1 -0
  103. package/dist/components/show-hide-button.d.ts +3 -6
  104. package/dist/components/show-hide-button.d.ts.map +1 -0
  105. package/dist/components/stat-bar.d.ts +5 -8
  106. package/dist/components/stat-bar.d.ts.map +1 -0
  107. package/dist/components/stat-cell.cjs +1 -1
  108. package/dist/components/stat-cell.cjs.map +1 -1
  109. package/dist/components/stat-cell.d.ts +6 -9
  110. package/dist/components/stat-cell.d.ts.map +1 -0
  111. package/dist/components/stat-cell.js +1 -1
  112. package/dist/components/stat-cell.js.map +1 -1
  113. package/dist/components/status-badge.d.ts +8 -11
  114. package/dist/components/status-badge.d.ts.map +1 -0
  115. package/dist/components/tabbed-page.d.ts +6 -9
  116. package/dist/components/tabbed-page.d.ts.map +1 -0
  117. package/dist/components/table-skeleton.d.ts +3 -6
  118. package/dist/components/table-skeleton.d.ts.map +1 -0
  119. package/dist/components/text-update-modal.d.ts +6 -9
  120. package/dist/components/text-update-modal.d.ts.map +1 -0
  121. package/dist/components/theme-toggle.d.ts +2 -5
  122. package/dist/components/theme-toggle.d.ts.map +1 -0
  123. package/dist/formatting.d.ts +13 -14
  124. package/dist/formatting.d.ts.map +1 -0
  125. package/dist/hooks.d.ts +10 -14
  126. package/dist/hooks.d.ts.map +1 -0
  127. package/dist/index.d.ts +43 -56
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/theme.d.ts +11 -14
  130. package/dist/theme.d.ts.map +1 -0
  131. package/dist/utils.d.ts +4 -5
  132. package/dist/utils.d.ts.map +1 -0
  133. package/package.json +5 -5
  134. package/dist/auth/index.d.cts +0 -51
  135. package/dist/auth/login/header.d.cts +0 -8
  136. package/dist/auth/login/index.d.cts +0 -15
  137. package/dist/auth/profile/index.d.cts +0 -5
  138. package/dist/auth/profile/linked-logins.d.cts +0 -13
  139. package/dist/auth/profile/passkey.d.cts +0 -9
  140. package/dist/auth/profile/totp.d.cts +0 -9
  141. package/dist/auth/utils.d.cts +0 -4
  142. package/dist/color.d.cts +0 -5
  143. package/dist/components/back-button.d.cts +0 -9
  144. package/dist/components/button-link.d.cts +0 -9
  145. package/dist/components/config/confirm.d.cts +0 -20
  146. package/dist/components/config/group.d.cts +0 -10
  147. package/dist/components/config/index.d.cts +0 -62
  148. package/dist/components/config/item.d.cts +0 -44
  149. package/dist/components/config/layout.d.cts +0 -11
  150. package/dist/components/config/unsaved-changes.d.cts +0 -7
  151. package/dist/components/confirm-button.d.cts +0 -23
  152. package/dist/components/confirm-icon.d.cts +0 -20
  153. package/dist/components/confirm-modal.d.cts +0 -25
  154. package/dist/components/copy-button.d.cts +0 -15
  155. package/dist/components/copy-text.d.cts +0 -11
  156. package/dist/components/create-modal.d.cts +0 -18
  157. package/dist/components/data-table.d.cts +0 -44
  158. package/dist/components/divided-children/index.d.cts +0 -15
  159. package/dist/components/enable-switch.d.cts +0 -12
  160. package/dist/components/entity-header.d.cts +0 -20
  161. package/dist/components/entity-page.d.cts +0 -11
  162. package/dist/components/fancy-card/index.d.cts +0 -17
  163. package/dist/components/hover-error.d.cts +0 -9
  164. package/dist/components/info-card.d.cts +0 -21
  165. package/dist/components/input-list.d.cts +0 -14
  166. package/dist/components/labelled-switch.d.cts +0 -14
  167. package/dist/components/labels-group.d.cts +0 -10
  168. package/dist/components/loading-screen.d.cts +0 -8
  169. package/dist/components/mobile-friendly-tabs.d.cts +0 -43
  170. package/dist/components/monaco/index.d.cts +0 -32
  171. package/dist/components/monaco/init.d.cts +0 -2
  172. package/dist/components/monaco/syntax/fancy_toml.d.cts +0 -2
  173. package/dist/components/monaco/syntax/key_value.d.cts +0 -2
  174. package/dist/components/monaco/syntax/shell.d.cts +0 -2
  175. package/dist/components/monaco/syntax/string_list.d.cts +0 -2
  176. package/dist/components/monaco/syntax/toml.d.cts +0 -2
  177. package/dist/components/monaco/syntax/yaml.d.cts +0 -2
  178. package/dist/components/monaco/theme.d.cts +0 -2
  179. package/dist/components/page-guard.d.cts +0 -12
  180. package/dist/components/page.d.cts +0 -31
  181. package/dist/components/search-input.d.cts +0 -9
  182. package/dist/components/section.d.cts +0 -33
  183. package/dist/components/shared-text-update.d.cts +0 -20
  184. package/dist/components/show-hide-button.d.cts +0 -8
  185. package/dist/components/stat-bar.d.cts +0 -15
  186. package/dist/components/stat-cell.d.cts +0 -17
  187. package/dist/components/status-badge.d.cts +0 -20
  188. package/dist/components/tabbed-page.d.cts +0 -19
  189. package/dist/components/table-skeleton.d.cts +0 -8
  190. package/dist/components/text-update-modal.d.cts +0 -19
  191. package/dist/components/theme-toggle.d.cts +0 -5
  192. package/dist/formatting.d.cts +0 -14
  193. package/dist/hooks.d.cts +0 -30
  194. package/dist/index.d.cts +0 -56
  195. package/dist/theme.d.cts +0 -18
  196. package/dist/utils.d.cts +0 -17
package/dist/index.d.ts CHANGED
@@ -1,56 +1,43 @@
1
- export { AUTH_URL, authClient, setAuthUrl, useAuthState, useLogin, useLoginOptions, useManageAuth, useUserId } from './auth/index.js';
2
- export { ColorIntention, colorByIntention, hexColorByIntention } from './color.js';
3
- export { BYTES_PER_GB, BYTES_PER_KB, BYTES_PER_MB, fmtDate, fmtDateWithMinutes, fmtDuration, fmtMonth, fmtRateBytes, fmtSizeBytes, fmtSnakeCaseToUpperSpaceCase, fmtUpperCamelcase, fmtUtcDate } from './formatting.js';
4
- export { Dimensions, useCtrlKeyListener, useDebounce, useKeyListener, useSearchCombobox, useShiftKeyListener, useWindowDimensions } from './hooks.js';
5
- export { AdditionalColors, DARK_BODY, LIGHT_BODY, ThemeProvider, ThemeProviderProps, functionColorsTuple, opacityColorsTuple } from './theme.js';
6
- export { deepCompare, filterBySplit, filterMultitermBySplit } from './utils.js';
7
- export { Config, ConfigFieldArgs, ConfigGroup, ConfigGroupArgs, ConfigProps } from './components/config/index.js';
8
- export { DividedChildren } from './components/divided-children/index.js';
9
- export { FancyCard } from './components/fancy-card/index.js';
10
- export { MonacoDiffEditor, MonacoDiffEditorProps, MonacoEditor, MonacoEditorProps, MonacoLanguage, languageFromPath } from './components/monaco/index.js';
11
- export { BackButton, BackButtonProps } from './components/back-button.js';
12
- export { ButtonLink, ButtonLinkProps } from './components/button-link.js';
13
- export { ConfirmButton, ConfirmButtonProps } from './components/confirm-button.js';
14
- export { ConfirmIcon, ConfirmIconProps } from './components/confirm-icon.js';
15
- export { ConfirmModal, ConfirmModalProps } from './components/confirm-modal.js';
16
- export { CopyButton, CopyButtonProps, sendCopyNotification } from './components/copy-button.js';
17
- export { CopyText, CopyTextProps } from './components/copy-text.js';
18
- export { CreateModal, CreateModalProps } from './components/create-modal.js';
19
- export { DataTable, DataTableProps, SortableHeader } from './components/data-table.js';
20
- export { EnableSwitch, EnableSwitchProps } from './components/enable-switch.js';
21
- export { EntityHeader, EntityHeaderProps } from './components/entity-header.js';
22
- export { EntityPage, EntityPageProps } from './components/entity-page.js';
23
- export { HoverError, HoverErrorProps } from './components/hover-error.js';
24
- export { InfoCard, InfoCardProps } from './components/info-card.js';
25
- export { InputList, InputListProps } from './components/input-list.js';
26
- export { LabelledSwitch, LabelledSwitchProps } from './components/labelled-switch.js';
27
- export { LabelsGroup, LabelsGroupProps } from './components/labels-group.js';
28
- export { LoadingScreen } from './components/loading-screen.js';
29
- export { MobileFriendlyTabs, MobileFriendlyTabsContent, MobileFriendlyTabsProps, MobileFriendlyTabsSelector, MobileFriendlyTabsSelectorProps, MobileFriendlyTabsWrapper, Tab, TabNoContent } from './components/mobile-friendly-tabs.js';
30
- export { PageGuard, PageGuardProps } from './components/page-guard.js';
31
- export { Page, PageProps } from './components/page.js';
32
- export { SearchInput, SearchInputProps } from './components/search-input.js';
33
- export { Section, SectionProps } from './components/section.js';
34
- export { SharedTextUpdate, SharedTextUpdateData, SharedTextUpdateProps, useSharedTextUpdateData } from './components/shared-text-update.js';
35
- export { ShowHideButton } from './components/show-hide-button.js';
36
- export { StatBar, StatBarProps } from './components/stat-bar.js';
37
- export { StatCell, StatCellProps } from './components/stat-cell.js';
38
- export { StatusBadge } from './components/status-badge.js';
39
- export { TabbedPage, TabbedPageItem, TabbedPageProps } from './components/tabbed-page.js';
40
- export { TableSkeleton } from './components/table-skeleton.js';
41
- export { TextUpdateModal, TextUpdateModalProps } from './components/text-update-modal.js';
42
- export { ThemeToggle } from './components/theme-toggle.js';
43
- export { ConfigInput, ConfigItem, ConfigItemProps, ConfigList, ConfigSwitch } from './components/config/item.js';
44
- export { ConfigLayout } from './components/config/layout.js';
45
- export { ConfirmUpdate, ConfirmUpdateProps } from './components/config/confirm.js';
46
- export { EnrollPasskey } from './auth/profile/passkey.js';
47
- export { EnrollTotp } from './auth/profile/totp.js';
48
- export { LinkedLogins } from './auth/profile/linked-logins.js';
49
- export { LoginBrandingProps, LoginPage } from './auth/login/index.js';
50
- export { UnsavedChanges } from './components/config/unsaved-changes.js';
51
- export { sanitizeQuery, sanitizeQueryInner } from './auth/utils.js';
52
- import '@tanstack/react-query';
53
- import 'mogh_auth_client';
54
- import '@mantine/core';
55
- import 'react';
56
- import '@tanstack/react-table';
1
+ export * from "./auth";
2
+ export * from "./color";
3
+ export * from "./formatting";
4
+ export * from "./hooks";
5
+ export * from "./theme";
6
+ export * from "./utils";
7
+ export * from "./components/config";
8
+ export * from "./components/divided-children";
9
+ export * from "./components/fancy-card";
10
+ export * from "./components/monaco";
11
+ export * from "./components/back-button";
12
+ export * from "./components/button-link";
13
+ export * from "./components/confirm-button";
14
+ export * from "./components/confirm-icon";
15
+ export * from "./components/confirm-modal";
16
+ export * from "./components/copy-button";
17
+ export * from "./components/copy-text";
18
+ export * from "./components/create-modal";
19
+ export * from "./components/data-table";
20
+ export * from "./components/enable-switch";
21
+ export * from "./components/entity-header";
22
+ export * from "./components/entity-page";
23
+ export * from "./components/hover-error";
24
+ export * from "./components/info-card";
25
+ export * from "./components/input-list";
26
+ export * from "./components/labelled-switch";
27
+ export * from "./components/labels-group";
28
+ export * from "./components/loading-screen";
29
+ export * from "./components/mobile-friendly-tabs";
30
+ export * from "./components/page-guard";
31
+ export * from "./components/page";
32
+ export * from "./components/search-input";
33
+ export * from "./components/section";
34
+ export * from "./components/shared-text-update";
35
+ export * from "./components/show-hide-button";
36
+ export * from "./components/stat-bar";
37
+ export * from "./components/stat-cell";
38
+ export * from "./components/status-badge";
39
+ export * from "./components/tabbed-page";
40
+ export * from "./components/table-skeleton";
41
+ export * from "./components/text-update-modal";
42
+ export * from "./components/theme-toggle";
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC"}
package/dist/theme.d.ts CHANGED
@@ -1,18 +1,15 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
- import { DefaultMantineColor, MantineColorsTuple } from '@mantine/core';
4
-
5
- declare const LIGHT_BODY = "#f8f9fa";
6
- declare const DARK_BODY = "#0f1115";
7
- type AdditionalColors = Partial<Record<DefaultMantineColor, MantineColorsTuple>> | undefined;
8
- interface ThemeProviderProps {
1
+ import { DefaultMantineColor, MantineColorsTuple } from "@mantine/core";
2
+ import { ReactNode } from "react";
3
+ export declare const LIGHT_BODY = "#f8f9fa";
4
+ export declare const DARK_BODY = "#0f1115";
5
+ export type AdditionalColors = Partial<Record<DefaultMantineColor, MantineColorsTuple>> | undefined;
6
+ export interface ThemeProviderProps {
9
7
  primaryColor?: DefaultMantineColor;
10
8
  additionalColors?: AdditionalColors;
11
9
  }
12
- declare function ThemeProvider({ children, ...props }: ThemeProviderProps & {
10
+ export declare function ThemeProvider({ children, ...props }: ThemeProviderProps & {
13
11
  children: ReactNode;
14
- }): react.JSX.Element;
15
- declare function opacityColorsTuple(baseHex: string, length?: number): MantineColorsTuple;
16
- declare function functionColorsTuple(base: string, fn: (color: string) => string, length?: number): MantineColorsTuple;
17
-
18
- export { type AdditionalColors, DARK_BODY, LIGHT_BODY, ThemeProvider, type ThemeProviderProps, functionColorsTuple, opacityColorsTuple };
12
+ }): import("react").JSX.Element;
13
+ export declare function opacityColorsTuple(baseHex: string, length?: number): MantineColorsTuple;
14
+ export declare function functionColorsTuple(base: string, fn: (color: string) => string, length?: number): MantineColorsTuple;
15
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,mBAAmB,EAOnB,kBAAkB,EAanB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,SAAS,YAAY,CAAC;AAInC,MAAM,MAAM,gBAAgB,GACxB,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAAC,GACxD,SAAS,CAAC;AAEd,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAUA;AA2QD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK,sBAM9D;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAC7B,MAAM,SAAK,sBAWZ"}
package/dist/utils.d.ts CHANGED
@@ -10,8 +10,7 @@
10
10
  * @param b Item b
11
11
  * @returns a === b
12
12
  */
13
- declare function deepCompare(a: any, b: any): boolean;
14
- declare function filterBySplit<T>(items: T[] | undefined, search: string, extract: (item: T) => string): T[];
15
- declare function filterMultitermBySplit<T>(items: T[] | undefined, search: string, extract: (item: T) => (string | undefined)[]): T[];
16
-
17
- export { deepCompare, filterBySplit, filterMultitermBySplit };
13
+ export declare function deepCompare(a: any, b: any): boolean;
14
+ export declare function filterBySplit<T>(items: T[] | undefined, search: string, extract: (item: T) => string): T[];
15
+ export declare function filterMultitermBySplit<T>(items: T[] | undefined, search: string, extract: (item: T) => (string | undefined)[]): T[];
16
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,WAgCzC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,OAW7B;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,OAe7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mogh_ui",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Common UI components and styling used across Mogh apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -13,7 +13,7 @@
13
13
  "default": "./dist/index.js"
14
14
  },
15
15
  "require": {
16
- "types": "./dist/index.d.cts",
16
+ "types": "./dist/index.d.ts",
17
17
  "default": "./dist/index.cjs"
18
18
  }
19
19
  },
@@ -24,7 +24,7 @@
24
24
  "dist"
25
25
  ],
26
26
  "scripts": {
27
- "build": "tsup && cd src && find . -name '*.scss' -exec cp --parents {} ../dist \\;",
27
+ "build": "tsup && tsc --emitDeclarationOnly && cd src && find . -name '*.scss' -exec cp --parents {} ../dist \\;",
28
28
  "dev": "tsup --watch",
29
29
  "typecheck": "tsc --noEmit"
30
30
  },
@@ -38,7 +38,7 @@
38
38
  "@tanstack/react-query": "^5.101.2",
39
39
  "lucide-react": "^1.22.0",
40
40
  "mogh_auth_client": "^1.7.0",
41
- "monaco-editor": "^0.55.1",
41
+ "monaco-editor": "^0.56.0",
42
42
  "monaco-yaml": "^5.5.1",
43
43
  "react": "^19.2.7",
44
44
  "react-dom": "^19.2.7",
@@ -56,7 +56,7 @@
56
56
  "@types/react-dom": "^19.2.3",
57
57
  "lucide-react": "^1.22.0",
58
58
  "mogh_auth_client": "^1.7.0",
59
- "monaco-editor": "^0.55.1",
59
+ "monaco-editor": "^0.56.0",
60
60
  "monaco-yaml": "^5.5.1",
61
61
  "react": "^19.2.7",
62
62
  "react-dom": "^19.2.7",
@@ -1,51 +0,0 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { UseMutationOptions } from '@tanstack/react-query';
3
- import * as MoghAuth from 'mogh_auth_client';
4
- export { LoginBrandingProps, LoginPage } from './login/index.cjs';
5
- export { LinkedLogins } from './profile/linked-logins.cjs';
6
- export { EnrollPasskey } from './profile/passkey.cjs';
7
- export { EnrollTotp } from './profile/totp.cjs';
8
- export { sanitizeQuery, sanitizeQueryInner } from './utils.cjs';
9
- import 'react';
10
-
11
- declare let AUTH_URL: string;
12
- /**
13
- * Set the global auth url.
14
- * Make sure to call this before first render.
15
- * @param url The global url
16
- */
17
- declare function setAuthUrl(url: string): void;
18
- declare function authClient(): {
19
- login: <T extends MoghAuth.Types.LoginRequest["type"], Req extends Extract<MoghAuth.Types.LoginRequest, {
20
- type: T;
21
- }>>(type: T, params: Req["params"]) => Promise<MoghAuth.LoginResponses[Req["type"]]>;
22
- manage: <T extends MoghAuth.Types.ManageRequest["type"], Req extends Extract<MoghAuth.Types.ManageRequest, {
23
- type: T;
24
- }>>(type: T, params: Req["params"]) => Promise<MoghAuth.ManageResponses[Req["type"]]>;
25
- externalLogin: (provider: MoghAuth.Types.ExternalLoginProvider) => void;
26
- };
27
- declare function useLoginOptions(): _tanstack_react_query.UseQueryResult<NoInfer<MoghAuth.Types.GetLoginOptionsResponse>, Error>;
28
- declare function useLogin<T extends MoghAuth.Types.LoginRequest["type"], R extends Extract<MoghAuth.Types.LoginRequest, {
29
- type: T;
30
- }>, P extends R["params"], C extends Omit<UseMutationOptions<MoghAuth.LoginResponses[T], unknown, P, unknown>, "mutationKey" | "mutationFn">>(type: T, config?: C): _tanstack_react_query.UseMutationResult<MoghAuth.LoginResponses[R["type"]], {
31
- result: {
32
- error?: string;
33
- trace?: string[];
34
- };
35
- }, P, unknown>;
36
- declare function useUserId(): _tanstack_react_query.UseQueryResult<NoInfer<MoghAuth.Types.GetUserIdResponse>, Error>;
37
- declare function useManageAuth<T extends MoghAuth.Types.ManageRequest["type"], R extends Extract<MoghAuth.Types.ManageRequest, {
38
- type: T;
39
- }>, P extends R["params"], C extends Omit<UseMutationOptions<MoghAuth.ManageResponses[T], unknown, P, unknown>, "mutationKey" | "mutationFn">>(type: T, config?: C): _tanstack_react_query.UseMutationResult<MoghAuth.ManageResponses[R["type"]], {
40
- result: {
41
- error?: string;
42
- trace?: string[];
43
- };
44
- }, P, unknown>;
45
- declare function useAuthState(): {
46
- jwt_redeem_ready: boolean;
47
- passkey_pending: boolean;
48
- totp: boolean;
49
- };
50
-
51
- export { AUTH_URL, authClient, setAuthUrl, useAuthState, useLogin, useLoginOptions, useManageAuth, useUserId };
@@ -1,8 +0,0 @@
1
- import * as react from 'react';
2
- import { LoginBrandingProps } from './index.cjs';
3
-
4
- declare function LoginHeader({ secondFactorPending, appName, iconLink, iconLinkAlt, }: {
5
- secondFactorPending: boolean;
6
- } & LoginBrandingProps): react.JSX.Element;
7
-
8
- export { LoginHeader as default };
@@ -1,15 +0,0 @@
1
- import * as react from 'react';
2
-
3
- interface LoginBrandingProps {
4
- appName: string;
5
- iconLink: string;
6
- iconLinkAlt: string;
7
- }
8
- declare function LoginPage({ passkeyIsPending: _passkeyIsPending, totpIsPending: _totpIsPending, onLogin, exampleConfigLink, ...branding }: {
9
- passkeyIsPending?: boolean;
10
- totpIsPending?: boolean;
11
- onLogin?: () => void;
12
- exampleConfigLink: string;
13
- } & LoginBrandingProps): react.JSX.Element;
14
-
15
- export { type LoginBrandingProps, LoginPage };
@@ -1,5 +0,0 @@
1
- export { LinkedLogins } from './linked-logins.cjs';
2
- export { EnrollPasskey } from './passkey.cjs';
3
- export { EnrollTotp } from './totp.cjs';
4
- import 'react';
5
- import 'mogh_auth_client';
@@ -1,13 +0,0 @@
1
- import * as react from 'react';
2
- import * as MoghAuth from 'mogh_auth_client';
3
-
4
- declare function LinkedLogins({ refetchUser, passwordSet, oidcLinkedId, githubLinkedId, googleLinkedId, extraProviderFilter, }: {
5
- refetchUser: () => void;
6
- passwordSet?: boolean;
7
- oidcLinkedId?: string;
8
- githubLinkedId?: string;
9
- googleLinkedId?: string;
10
- extraProviderFilter?: (provider: MoghAuth.Types.LoginProvider) => boolean;
11
- }): react.JSX.Element | null;
12
-
13
- export { LinkedLogins };
@@ -1,9 +0,0 @@
1
- import * as react from 'react';
2
-
3
- declare function EnrollPasskey({ userInvalidate, passkeyEnrolled, totpEnrolled, }: {
4
- userInvalidate?: () => void;
5
- passkeyEnrolled?: boolean;
6
- totpEnrolled?: boolean;
7
- }): react.JSX.Element;
8
-
9
- export { EnrollPasskey };
@@ -1,9 +0,0 @@
1
- import * as react from 'react';
2
-
3
- declare const EnrollTotp: ({ userInvalidate, passkeyEnrolled, totpEnrolled, }: {
4
- userInvalidate?: () => void;
5
- passkeyEnrolled?: boolean;
6
- totpEnrolled?: boolean;
7
- }) => react.JSX.Element;
8
-
9
- export { EnrollTotp };
@@ -1,4 +0,0 @@
1
- declare function sanitizeQuery(): void;
2
- declare function sanitizeQueryInner(search: URLSearchParams): void;
3
-
4
- export { sanitizeQuery, sanitizeQueryInner };
package/dist/color.d.cts DELETED
@@ -1,5 +0,0 @@
1
- type ColorIntention = "Good" | "Neutral" | "Warning" | "Critical" | "Unknown" | "None";
2
- declare function colorByIntention(intention: ColorIntention): "green" | "blue" | "yellow" | "red" | "purple" | undefined;
3
- declare function hexColorByIntention(intention: ColorIntention): "#22C55E" | "#3B82F6" | "#EAB308" | "#EF0044" | "#A855F7" | undefined;
4
-
5
- export { type ColorIntention, colorByIntention, hexColorByIntention };
@@ -1,9 +0,0 @@
1
- import * as react from 'react';
2
- import { ButtonProps } from '@mantine/core';
3
-
4
- interface BackButtonProps extends ButtonProps {
5
- to?: string | number;
6
- }
7
- declare function BackButton({ to, ...props }: BackButtonProps): react.JSX.Element;
8
-
9
- export { BackButton, type BackButtonProps };
@@ -1,9 +0,0 @@
1
- import * as react from 'react';
2
- import { ButtonProps } from '@mantine/core';
3
-
4
- interface ButtonLinkProps extends ButtonProps {
5
- to: string;
6
- }
7
- declare function ButtonLink({ to, ...props }: ButtonLinkProps): react.JSX.Element;
8
-
9
- export { ButtonLink, type ButtonLinkProps };
@@ -1,20 +0,0 @@
1
- import * as react from 'react';
2
- import { MonacoLanguage } from '../monaco/index.cjs';
3
- import '@mantine/core';
4
-
5
- interface ConfirmUpdateProps<T> {
6
- original: T;
7
- update: Partial<T>;
8
- onConfirm: () => Promise<unknown>;
9
- loading?: boolean;
10
- disabled: boolean;
11
- language?: MonacoLanguage;
12
- fileContentsLanguage?: MonacoLanguage;
13
- fullWidth?: boolean;
14
- openKeyListener?: boolean;
15
- confirmKeyListener?: boolean;
16
- enableFancyToml?: boolean;
17
- }
18
- declare function ConfirmUpdate<T>({ original, update, onConfirm, loading, disabled, language, fileContentsLanguage, fullWidth, openKeyListener, confirmKeyListener, enableFancyToml, }: ConfirmUpdateProps<T>): react.JSX.Element;
19
-
20
- export { ConfirmUpdate, type ConfirmUpdateProps };
@@ -1,10 +0,0 @@
1
- import 'react';
2
- export { ConfigGroup } from './index.cjs';
3
- import '../monaco/index.cjs';
4
- import '@mantine/core';
5
- import './confirm.cjs';
6
- import './item.cjs';
7
- import '../input-list.cjs';
8
- import './layout.cjs';
9
- import '../section.cjs';
10
- import './unsaved-changes.cjs';
@@ -1,62 +0,0 @@
1
- import * as react from 'react';
2
- import { SetStateAction, ReactNode } from 'react';
3
- import { MonacoLanguage } from '../monaco/index.cjs';
4
- export { ConfirmUpdate, ConfirmUpdateProps } from './confirm.cjs';
5
- export { ConfigInput, ConfigItem, ConfigItemProps, ConfigList, ConfigSwitch } from './item.cjs';
6
- export { ConfigLayout } from './layout.cjs';
7
- export { UnsavedChanges } from './unsaved-changes.cjs';
8
- import '@mantine/core';
9
- import '../input-list.cjs';
10
- import '../section.cjs';
11
-
12
- declare function ConfigGroup<T>({ config, update, setUpdate, disabled, fields, }: {
13
- config: T;
14
- update: Partial<T>;
15
- setUpdate: (update: Partial<T>) => void;
16
- disabled: boolean;
17
- fields: ConfigGroupArgs<T>["fields"];
18
- }): react.JSX.Element;
19
-
20
- interface ConfigFieldArgs {
21
- label?: string;
22
- description?: ReactNode;
23
- /** Use a selector instead of input */
24
- options?: {
25
- value: string;
26
- label?: string;
27
- icon?: ReactNode;
28
- }[];
29
- placeholder?: string;
30
- hidden?: boolean;
31
- disabled?: boolean;
32
- }
33
- interface ConfigGroupArgs<T> {
34
- label: string;
35
- labelExtra?: ReactNode;
36
- icon?: ReactNode;
37
- description?: ReactNode;
38
- actions?: ReactNode;
39
- hidden?: boolean;
40
- labelHidden?: boolean;
41
- contentHidden?: boolean;
42
- fields: {
43
- [K in keyof Partial<T>]: boolean | ConfigFieldArgs | ((value: T[K], set: (value: Partial<T>) => void) => ReactNode);
44
- };
45
- }
46
- interface ConfigProps<T> {
47
- original: T;
48
- update: Partial<T>;
49
- setUpdate: React.Dispatch<SetStateAction<Partial<T>>>;
50
- disabled: boolean;
51
- onSave: () => Promise<unknown>;
52
- titleOther?: ReactNode;
53
- disableSidebar?: boolean;
54
- fileContentsLanguage?: MonacoLanguage;
55
- enableFancyToml?: boolean;
56
- groups: Record<string, // Section key
57
- // Section key
58
- ConfigGroupArgs<T>[] | false | undefined>;
59
- }
60
- declare function Config<T>({ original, update, setUpdate, disabled, onSave, titleOther, disableSidebar, fileContentsLanguage, enableFancyToml, groups: _groups, }: ConfigProps<T>): react.JSX.Element;
61
-
62
- export { Config, type ConfigFieldArgs, ConfigGroup, type ConfigGroupArgs, type ConfigProps };
@@ -1,44 +0,0 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
- import * as _mantine_core from '@mantine/core';
4
- import { TextInputProps, StackProps, SwitchProps } from '@mantine/core';
5
- import { InputListProps } from '../input-list.cjs';
6
-
7
- interface ConfigItemProps extends StackProps {
8
- label?: ReactNode;
9
- labelExtra?: ReactNode;
10
- description?: ReactNode;
11
- children?: ReactNode;
12
- }
13
- declare const ConfigItem: (<C = "div">(props: _mantine_core.PolymorphicComponentProps<C, ConfigItemProps>) => React.ReactElement) & Omit<react.FunctionComponent<(ConfigItemProps & {
14
- component?: any;
15
- } & Omit<any, "component" | keyof ConfigItemProps> & {
16
- ref?: any;
17
- renderRoot?: (props: any) => any;
18
- }) | (ConfigItemProps & {
19
- component: React.ElementType;
20
- renderRoot?: (props: Record<string, any>) => any;
21
- })>, never> & Record<string, never>;
22
- declare function ConfigInput({ value, disabled, placeholder, onChange, onValueChange, onBlur, inputLeft, inputRight, inputProps, email, ...itemProps }: {
23
- value: string | number | undefined;
24
- disabled?: boolean;
25
- placeholder?: string;
26
- onValueChange?: (value: string) => void;
27
- onBlur?: (value: string) => void;
28
- inputLeft?: ReactNode;
29
- inputRight?: ReactNode;
30
- inputProps?: TextInputProps;
31
- email?: boolean;
32
- } & Omit<ConfigItemProps, "children">): react.JSX.Element;
33
- declare function ConfigSwitch({ value, disabled, onCheckedChange, switchProps, ...itemProps }: {
34
- value: boolean | undefined;
35
- disabled: boolean;
36
- onCheckedChange: (value: boolean) => void;
37
- switchProps?: SwitchProps;
38
- } & Omit<ConfigItemProps, "children">): react.JSX.Element;
39
- declare function ConfigList<T>({ addLabel, label, description, ...inputListProps }: {
40
- label?: string;
41
- addLabel?: string;
42
- } & InputListProps<T> & Omit<ConfigItemProps, "children">): react.JSX.Element;
43
-
44
- export { ConfigInput, ConfigItem, type ConfigItemProps, ConfigList, ConfigSwitch };
@@ -1,11 +0,0 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
- import { SectionProps } from '../section.cjs';
4
- import '@mantine/core';
5
-
6
- /** Includes save buttons */
7
- declare function ConfigLayout({ title, icon, titleOther, SaveOrReset, ...sectionProps }: {
8
- SaveOrReset: ReactNode | undefined;
9
- } & SectionProps): react.JSX.Element;
10
-
11
- export { ConfigLayout };
@@ -1,7 +0,0 @@
1
- import * as react from 'react';
2
-
3
- declare function UnsavedChanges({ fullWidth }: {
4
- fullWidth?: boolean;
5
- }): react.JSX.Element;
6
-
7
- export { UnsavedChanges };
@@ -1,23 +0,0 @@
1
- import * as react from 'react';
2
- import { ReactNode, MouseEventHandler, FocusEventHandler } from 'react';
3
- import * as _mantine_core from '@mantine/core';
4
- import { ButtonProps } from '@mantine/core';
5
-
6
- interface ConfirmButtonProps extends ButtonProps {
7
- icon?: ReactNode;
8
- onClick?: MouseEventHandler<HTMLButtonElement>;
9
- onBlur?: FocusEventHandler<HTMLButtonElement>;
10
- /** Passed when button is in confirm mode */
11
- confirmProps?: ButtonProps;
12
- }
13
- declare const ConfirmButton: (<C = "button">(props: _mantine_core.PolymorphicComponentProps<C, ConfirmButtonProps>) => React.ReactElement) & Omit<react.FunctionComponent<(ConfirmButtonProps & {
14
- component?: any;
15
- } & Omit<any, "component" | keyof ConfirmButtonProps> & {
16
- ref?: any;
17
- renderRoot?: (props: any) => any;
18
- }) | (ConfirmButtonProps & {
19
- component: React.ElementType;
20
- renderRoot?: (props: Record<string, any>) => any;
21
- })>, never> & Record<string, never>;
22
-
23
- export { ConfirmButton, type ConfirmButtonProps };
@@ -1,20 +0,0 @@
1
- import * as react from 'react';
2
- import { MouseEventHandler, FocusEventHandler } from 'react';
3
- import * as _mantine_core from '@mantine/core';
4
- import { ActionIconProps } from '@mantine/core';
5
-
6
- interface ConfirmIconProps extends ActionIconProps {
7
- onClick?: MouseEventHandler<HTMLButtonElement>;
8
- onBlur?: FocusEventHandler<HTMLButtonElement>;
9
- }
10
- declare const ConfirmIcon: (<C = "button">(props: _mantine_core.PolymorphicComponentProps<C, ConfirmIconProps>) => React.ReactElement) & Omit<react.FunctionComponent<(ConfirmIconProps & {
11
- component?: any;
12
- } & Omit<any, "component" | keyof ConfirmIconProps> & {
13
- ref?: any;
14
- renderRoot?: (props: any) => any;
15
- }) | (ConfirmIconProps & {
16
- component: React.ElementType;
17
- renderRoot?: (props: Record<string, any>) => any;
18
- })>, never> & Record<string, never>;
19
-
20
- export { ConfirmIcon, type ConfirmIconProps };
@@ -1,25 +0,0 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
- import { ModalProps, ButtonProps } from '@mantine/core';
4
-
5
- interface ConfirmModalProps extends Omit<Omit<Omit<ModalProps, "opened">, "onClose">, "onClick"> {
6
- children?: ReactNode;
7
- icon?: ReactNode;
8
- disabled?: boolean;
9
- /** User must enter this text to confirm */
10
- confirmText: string;
11
- title?: ReactNode;
12
- confirmButtonContent?: ReactNode;
13
- onConfirm?: () => Promise<unknown>;
14
- loading?: boolean;
15
- additional?: ReactNode;
16
- topAdditonal?: ReactNode;
17
- targetProps?: ButtonProps;
18
- targetNoIcon?: boolean;
19
- confirmProps?: ButtonProps;
20
- /** Converts into ConfirmButton */
21
- disableModal?: boolean;
22
- }
23
- declare function ConfirmModal({ children, icon, disabled, confirmText, title, confirmButtonContent, onConfirm, loading, additional, topAdditonal, targetProps, targetNoIcon, confirmProps, disableModal, ...modalProps }: ConfirmModalProps): react.JSX.Element;
24
-
25
- export { ConfirmModal, type ConfirmModalProps };
@@ -1,15 +0,0 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
- import { ActionIconProps } from '@mantine/core';
4
-
5
- interface CopyButtonProps {
6
- content: string;
7
- icon?: ReactNode;
8
- label?: string;
9
- size?: string | number;
10
- buttonSize?: ActionIconProps["size"];
11
- }
12
- declare function CopyButton({ content, icon, label, size, buttonSize, }: CopyButtonProps): react.JSX.Element;
13
- declare function sendCopyNotification(label?: string): void;
14
-
15
- export { CopyButton, type CopyButtonProps, sendCopyNotification };
@@ -1,11 +0,0 @@
1
- import * as react from 'react';
2
- import { TextProps, GroupProps } from '@mantine/core';
3
-
4
- interface CopyTextProps extends TextProps {
5
- content: string;
6
- label?: string;
7
- groupProps?: GroupProps;
8
- }
9
- declare function CopyText({ content, label, groupProps, ...textProps }: CopyTextProps): react.JSX.Element;
10
-
11
- export { CopyText, type CopyTextProps };