@talogic/react 0.0.0-stage → 0.6.2

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 (130) hide show
  1. package/README.md +106 -2
  2. package/app/app-shell.component.d.ts +66 -0
  3. package/app/command-shortcut.hook.d.ts +21 -0
  4. package/app/filter-bar.component.d.ts +38 -0
  5. package/app/form-section.component.d.ts +21 -0
  6. package/app/index.d.ts +14 -0
  7. package/app/page-header.component.d.ts +20 -0
  8. package/app/records-table.component.d.ts +38 -0
  9. package/app/sparkline.algorithm.d.ts +11 -0
  10. package/app/stat-card.component.d.ts +28 -0
  11. package/class-names/class-names.algorithm.d.ts +8 -0
  12. package/class-names/index.d.ts +1 -0
  13. package/desktop/flow-node.component.d.ts +25 -0
  14. package/desktop/index.d.ts +12 -0
  15. package/desktop/inspector.component.d.ts +29 -0
  16. package/desktop/status-bar.component.d.ts +17 -0
  17. package/desktop/timeline-lanes.component.d.ts +43 -0
  18. package/desktop/timeline.algorithm.d.ts +22 -0
  19. package/desktop/title-bar.component.d.ts +24 -0
  20. package/fonts.css +4 -0
  21. package/index.d.ts +17 -0
  22. package/index.js +3495 -0
  23. package/index.js.map +1 -0
  24. package/mobile/bottom-nav.component.d.ts +23 -0
  25. package/mobile/capture-frame.component.d.ts +30 -0
  26. package/mobile/index.d.ts +6 -0
  27. package/mobile/record-button.component.d.ts +24 -0
  28. package/package.json +63 -4
  29. package/product/index.d.ts +8 -0
  30. package/product/product-catalogue.content.d.ts +16 -0
  31. package/product/product-logo.component.d.ts +17 -0
  32. package/product/product-switcher.component.d.ts +21 -0
  33. package/product/sidebar-brand.component.d.ts +18 -0
  34. package/status/index.d.ts +6 -0
  35. package/status/run-status.contract.d.ts +7 -0
  36. package/status/run-status.mapper.d.ts +18 -0
  37. package/status/status-badge.component.d.ts +14 -0
  38. package/talogic-react.css +2 -0
  39. package/timecode/index.d.ts +1 -0
  40. package/timecode/timecode.mapper.d.ts +17 -0
  41. package/tokens/apca-contrast.algorithm.d.ts +23 -0
  42. package/tokens/hue-fill.style.d.ts +6 -0
  43. package/tokens/index.d.ts +12 -0
  44. package/tokens/logo-color.algorithm.d.ts +21 -0
  45. package/tokens/palette.style.d.ts +6 -0
  46. package/tokens/product-hue.policy.d.ts +15 -0
  47. package/tokens/theme-attributes.mapper.d.ts +18 -0
  48. package/tokens/theme-root.component.d.ts +15 -0
  49. package/tokens/theme.contract.d.ts +34 -0
  50. package/tokens.css +949 -0
  51. package/ui/active-indicator/active-indicator.hook.d.ts +11 -0
  52. package/ui/active-indicator/active-indicator.recipe.d.ts +5 -0
  53. package/ui/active-indicator/index.d.ts +2 -0
  54. package/ui/avatar/avatar.component.d.ts +23 -0
  55. package/ui/avatar/index.d.ts +1 -0
  56. package/ui/badge/badge.component.d.ts +14 -0
  57. package/ui/badge/badge.recipe.d.ts +12 -0
  58. package/ui/badge/index.d.ts +4 -0
  59. package/ui/button/button.component.d.ts +16 -0
  60. package/ui/button/button.recipe.d.ts +11 -0
  61. package/ui/button/index.d.ts +4 -0
  62. package/ui/choice/checkbox.component.d.ts +11 -0
  63. package/ui/choice/index.d.ts +5 -0
  64. package/ui/choice/radio-group.component.d.ts +17 -0
  65. package/ui/choice/slider.component.d.ts +10 -0
  66. package/ui/choice/switch.component.d.ts +9 -0
  67. package/ui/choice/toggle-group.component.d.ts +17 -0
  68. package/ui/feedback/alert.component.d.ts +41 -0
  69. package/ui/feedback/empty-state.component.d.ts +19 -0
  70. package/ui/feedback/index.d.ts +8 -0
  71. package/ui/feedback/progress.component.d.ts +9 -0
  72. package/ui/feedback/skeleton.component.d.ts +8 -0
  73. package/ui/feedback/spinner.component.d.ts +10 -0
  74. package/ui/feedback/toaster.component.d.ts +10 -0
  75. package/ui/field/control.recipe.d.ts +5 -0
  76. package/ui/field/field-control.hook.d.ts +26 -0
  77. package/ui/field/field.component.d.ts +22 -0
  78. package/ui/field/index.d.ts +10 -0
  79. package/ui/field/input.component.d.ts +13 -0
  80. package/ui/field/label.component.d.ts +9 -0
  81. package/ui/field/select.component.d.ts +43 -0
  82. package/ui/field/textarea.component.d.ts +8 -0
  83. package/ui/index.d.ts +11 -0
  84. package/ui/layout/accordion.component.d.ts +30 -0
  85. package/ui/layout/card.component.d.ts +43 -0
  86. package/ui/layout/index.d.ts +7 -0
  87. package/ui/layout/kbd.component.d.ts +8 -0
  88. package/ui/layout/resizable.component.d.ts +23 -0
  89. package/ui/layout/scroll-area.component.d.ts +16 -0
  90. package/ui/layout/separator.component.d.ts +9 -0
  91. package/ui/layout/table.component.d.ts +50 -0
  92. package/ui/menu/command.component.d.ts +72 -0
  93. package/ui/menu/context-menu.component.d.ts +39 -0
  94. package/ui/menu/dropdown-menu.component.d.ts +57 -0
  95. package/ui/menu/index.d.ts +6 -0
  96. package/ui/menu/menu.recipe.d.ts +13 -0
  97. package/ui/navigation/breadcrumb.component.d.ts +45 -0
  98. package/ui/navigation/index.d.ts +11 -0
  99. package/ui/navigation/menu-icon.component.d.ts +18 -0
  100. package/ui/navigation/menubar.component.d.ts +48 -0
  101. package/ui/navigation/navigation-menu.component.d.ts +39 -0
  102. package/ui/navigation/pagination.component.d.ts +20 -0
  103. package/ui/navigation/stepper.component.d.ts +28 -0
  104. package/ui/navigation/tabs.component.d.ts +39 -0
  105. package/ui/overlay/alert-dialog.component.d.ts +42 -0
  106. package/ui/overlay/dialog.component.d.ts +48 -0
  107. package/ui/overlay/drawer.component.d.ts +29 -0
  108. package/ui/overlay/index.d.ts +9 -0
  109. package/ui/overlay/overlay.recipe.d.ts +18 -0
  110. package/ui/overlay/popover.component.d.ts +15 -0
  111. package/ui/overlay/sheet.component.d.ts +31 -0
  112. package/ui/overlay/tooltip.component.d.ts +20 -0
  113. package/ui/sidebar/index.d.ts +11 -0
  114. package/ui/sidebar/sidebar-context.hook.d.ts +29 -0
  115. package/ui/sidebar/sidebar-group.component.d.ts +26 -0
  116. package/ui/sidebar/sidebar-item.component.d.ts +35 -0
  117. package/ui/sidebar/sidebar-sheet.component.d.ts +25 -0
  118. package/ui/sidebar/sidebar.component.d.ts +80 -0
  119. package/ui/sidebar/sidebar.recipe.d.ts +8 -0
  120. package/web/cta-band.component.d.ts +20 -0
  121. package/web/faq.component.d.ts +19 -0
  122. package/web/feature-grid.component.d.ts +22 -0
  123. package/web/hero.component.d.ts +20 -0
  124. package/web/how-it-works.component.d.ts +22 -0
  125. package/web/index.d.ts +20 -0
  126. package/web/mobile-menu.component.d.ts +25 -0
  127. package/web/pricing-table.component.d.ts +37 -0
  128. package/web/product-card.component.d.ts +20 -0
  129. package/web/site-footer.component.d.ts +25 -0
  130. package/web/site-header.component.d.ts +32 -0
@@ -0,0 +1,18 @@
1
+ import type { ThemeSettings } from './theme.contract';
2
+ /** The DOM attributes that switch the theme of a region. Spread them on any element. */
3
+ export interface ThemeAttributes {
4
+ /** `dark` and the density class, or an empty string. */
5
+ 'className': string;
6
+ /** The product, when set. */
7
+ 'data-product'?: string;
8
+ /** The hue, when set. */
9
+ 'data-hue'?: string;
10
+ }
11
+ /**
12
+ * Converts theme settings into the attributes that `tokens.css` reads: `.dark`, `.d-<density>`,
13
+ * `data-product` and `data-hue`.
14
+ *
15
+ * @param settings - The switches to apply. A switch that is not set adds nothing.
16
+ * @returns The attributes to spread on the root element of the region.
17
+ */
18
+ export declare function themeAttributes(settings: ThemeSettings): ThemeAttributes;
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps } from 'react';
2
+ import type { ThemeSettings } from './theme.contract';
3
+ /** Props of {@link ThemeRoot}: the theme switches plus the props of a `div`. */
4
+ export interface ThemeRootProps extends ThemeSettings, ComponentProps<'div'> {
5
+ /** Renders the child element in place of a `div`, with the theme attributes merged onto it. */
6
+ asChild?: boolean;
7
+ }
8
+ /**
9
+ * Themes a region: product accent, hue, colour scheme and density. Regions nest, so a light card can sit
10
+ * in a dark page. Content in a portal (menus, dialogs) follows `<html>`, so theme `<html>` for a whole app.
11
+ *
12
+ * @param props - The theme switches, `asChild`, and any `div` props.
13
+ * @returns The themed element.
14
+ */
15
+ export declare function ThemeRoot({ product, hue, scheme, density, asChild, className, ...props }: ThemeRootProps): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ /** The products of the Talogic family. Each one takes one hue of the family palette. */
2
+ export declare const PRODUCTS: readonly ["talogic", "pargic", "daygic", "ingic", "loregic", "loomgic"];
3
+ /** A product of the Talogic family. */
4
+ export type Product = typeof PRODUCTS[number];
5
+ /** The twelve hues of the family palette, in wheel order. */
6
+ export declare const HUES: readonly ["red", "orange", "amber", "lime", "green", "teal", "cyan", "sky", "blue", "violet", "purple", "pink"];
7
+ /** A hue of the family palette. */
8
+ export type Hue = typeof HUES[number];
9
+ /** The eleven steps of every hue. Each step has the same OKLCH lightness in every hue. */
10
+ export declare const PALETTE_STEPS: readonly ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"];
11
+ /** A step of the family palette. */
12
+ export type PaletteStep = typeof PALETTE_STEPS[number];
13
+ /**
14
+ * Control densities, one per surface: `web` 44 px, `app` 36 px, `desk` 28 px, `mob` 48 px.
15
+ * A surface sets its density with a class, and the component recipes read it.
16
+ */
17
+ export declare const DENSITIES: readonly ["web", "app", "desk", "mob"];
18
+ /** A control density. */
19
+ export type Density = typeof DENSITIES[number];
20
+ /** The colour schemes. */
21
+ export declare const COLOUR_SCHEMES: readonly ["light", "dark"];
22
+ /** A colour scheme. */
23
+ export type ColourScheme = typeof COLOUR_SCHEMES[number];
24
+ /** The switches of a themed region. Every switch is optional: a region inherits what it does not set. */
25
+ export interface ThemeSettings {
26
+ /** The product whose accent the region shows. */
27
+ product?: Product;
28
+ /** A family hue for the accent. It wins over `product`, for a product that has no name yet. */
29
+ hue?: Hue;
30
+ /** The colour scheme. Only `dark` adds a class, because `light` is the default. */
31
+ scheme?: ColourScheme;
32
+ /** The control density of the surface. */
33
+ density?: Density;
34
+ }