@almanaclabs/blaze-ui 0.3.2 → 0.5.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 (133) hide show
  1. package/README.md +23 -0
  2. package/dist/components/accordion/accordion.js +53 -0
  3. package/dist/components/alert/alert.d.ts +1 -1
  4. package/dist/components/alert/alert.js +43 -0
  5. package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -1
  6. package/dist/components/alert-dialog/alert-dialog.js +94 -0
  7. package/dist/components/aspect-ratio/aspect-ratio.js +13 -0
  8. package/dist/components/attachment/attachment.d.ts +2 -2
  9. package/dist/components/attachment/attachment.js +104 -0
  10. package/dist/components/avatar/avatar.d.ts +6 -4
  11. package/dist/components/avatar/avatar.d.ts.map +1 -1
  12. package/dist/components/avatar/avatar.js +51 -0
  13. package/dist/components/badge/badge.d.ts +3 -2
  14. package/dist/components/badge/badge.d.ts.map +1 -1
  15. package/dist/components/badge/badge.js +45 -0
  16. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  17. package/dist/components/breadcrumb/breadcrumb.js +72 -0
  18. package/dist/components/bubble/bubble.d.ts +1 -1
  19. package/dist/components/bubble/bubble.js +73 -0
  20. package/dist/components/button/button.d.ts +5 -3
  21. package/dist/components/button/button.d.ts.map +1 -1
  22. package/dist/components/button/button.js +65 -0
  23. package/dist/components/button/index.d.ts +1 -1
  24. package/dist/components/button/index.d.ts.map +1 -1
  25. package/dist/components/button-group/button-group.js +41 -0
  26. package/dist/components/calendar/calendar.d.ts.map +1 -1
  27. package/dist/components/calendar/calendar.js +92 -0
  28. package/dist/components/card/card.js +56 -0
  29. package/dist/components/carousel/carousel.d.ts.map +1 -1
  30. package/dist/components/carousel/carousel.js +110 -0
  31. package/dist/components/chart/chart.js +131 -0
  32. package/dist/components/checkbox/checkbox.js +20 -0
  33. package/dist/components/collapsible/collapsible.js +23 -0
  34. package/dist/components/combobox/combobox.d.ts.map +1 -1
  35. package/dist/components/combobox/combobox.js +165 -0
  36. package/dist/components/data-table/data-table.js +30 -0
  37. package/dist/components/date-picker/date-picker.js +39 -0
  38. package/dist/components/dialog/dialog.js +92 -0
  39. package/dist/components/drawer/drawer.js +121 -0
  40. package/dist/components/dropdown-menu/dropdown-menu.js +136 -0
  41. package/dist/components/empty/empty.d.ts.map +1 -1
  42. package/dist/components/empty/empty.js +59 -0
  43. package/dist/components/field/field.d.ts.map +1 -1
  44. package/dist/components/field/field.js +107 -0
  45. package/dist/components/hover-card/hover-card.js +36 -0
  46. package/dist/components/identity-mark/identity-mark.d.ts +5 -0
  47. package/dist/components/identity-mark/identity-mark.d.ts.map +1 -0
  48. package/dist/components/identity-mark/identity-mark.js +20 -0
  49. package/dist/components/identity-mark/index.d.ts +2 -0
  50. package/dist/components/identity-mark/index.d.ts.map +1 -0
  51. package/dist/components/input/input.d.ts +9 -2
  52. package/dist/components/input/input.d.ts.map +1 -1
  53. package/dist/components/input/input.js +28 -0
  54. package/dist/components/input-group/input-group.d.ts +11 -3
  55. package/dist/components/input-group/input-group.d.ts.map +1 -1
  56. package/dist/components/input-group/input-group.js +95 -0
  57. package/dist/components/item/item.d.ts +2 -2
  58. package/dist/components/item/item.js +121 -0
  59. package/dist/components/label/label.js +13 -0
  60. package/dist/components/marker/marker.d.ts +1 -1
  61. package/dist/components/marker/marker.js +43 -0
  62. package/dist/components/message/message.js +49 -0
  63. package/dist/components/metric-overview/index.d.ts +2 -0
  64. package/dist/components/metric-overview/index.d.ts.map +1 -0
  65. package/dist/components/metric-overview/metric-overview.d.ts +12 -0
  66. package/dist/components/metric-overview/metric-overview.d.ts.map +1 -0
  67. package/dist/components/metric-overview/metric-overview.js +42 -0
  68. package/dist/components/native-select/native-select.d.ts +2 -1
  69. package/dist/components/native-select/native-select.d.ts.map +1 -1
  70. package/dist/components/native-select/native-select.js +40 -0
  71. package/dist/components/navigation-action/index.d.ts +2 -0
  72. package/dist/components/navigation-action/index.d.ts.map +1 -0
  73. package/dist/components/navigation-action/navigation-action.d.ts +6 -0
  74. package/dist/components/navigation-action/navigation-action.d.ts.map +1 -0
  75. package/dist/components/navigation-action/navigation-action.js +18 -0
  76. package/dist/components/pagination/pagination.d.ts.map +1 -1
  77. package/dist/components/pagination/pagination.js +80 -0
  78. package/dist/components/popover/popover.js +54 -0
  79. package/dist/components/progress/progress.js +45 -0
  80. package/dist/components/questionnaire/questionnaire-primitive.js +353 -0
  81. package/dist/components/questionnaire/questionnaire.d.ts.map +1 -1
  82. package/dist/components/questionnaire/questionnaire.js +169 -0
  83. package/dist/components/radio-group/radio-group.js +26 -0
  84. package/dist/components/scroll-area/scroll-area.js +37 -0
  85. package/dist/components/select/select.d.ts +2 -1
  86. package/dist/components/select/select.d.ts.map +1 -1
  87. package/dist/components/select/select.js +99 -0
  88. package/dist/components/separator/separator.js +15 -0
  89. package/dist/components/sheet/sheet.js +89 -0
  90. package/dist/components/sidebar/sidebar.d.ts +13 -2
  91. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  92. package/dist/components/sidebar/sidebar.js +419 -0
  93. package/dist/components/skeleton/skeleton.js +12 -0
  94. package/dist/components/slider/slider.js +37 -0
  95. package/dist/components/spinner/spinner.js +15 -0
  96. package/dist/components/switch/switch.js +19 -0
  97. package/dist/components/table/table.d.ts +4 -1
  98. package/dist/components/table/table.d.ts.map +1 -1
  99. package/dist/components/table/table.js +68 -0
  100. package/dist/components/tabs/tabs.d.ts +1 -1
  101. package/dist/components/tabs/tabs.js +46 -0
  102. package/dist/components/textarea/textarea.js +13 -0
  103. package/dist/components/toast/toast.d.ts.map +1 -1
  104. package/dist/components/toast/toast.js +116 -0
  105. package/dist/components/toggle/toggle.d.ts +1 -1
  106. package/dist/components/toggle/toggle.js +35 -0
  107. package/dist/components/toggle-group/toggle-group.js +52 -0
  108. package/dist/components/tooltip/tooltip.js +41 -0
  109. package/dist/hooks/use-mobile.js +14 -0
  110. package/dist/index.d.ts +4 -1
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +59 -3699
  113. package/dist/lib/control-size.d.ts +9 -0
  114. package/dist/lib/control-size.d.ts.map +1 -0
  115. package/dist/lib/control-size.js +10 -0
  116. package/dist/lib/utils.js +8 -0
  117. package/dist/recipes/recipe-runtime.d.ts +18 -0
  118. package/dist/recipes/recipe-runtime.d.ts.map +1 -0
  119. package/package.json +2 -1
  120. package/recipes/README.md +24 -0
  121. package/recipes/guided-workflow/README.md +51 -0
  122. package/recipes/guided-workflow/guided-workflow.tsx +495 -0
  123. package/recipes/manifest.json +19 -0
  124. package/recipes/workspace-shell/README.md +95 -0
  125. package/recipes/workspace-shell/assets/google-search-ads.svg +6 -0
  126. package/recipes/workspace-shell/assets/home.svg +5 -0
  127. package/recipes/workspace-shell/assets/radiant-health.png +0 -0
  128. package/recipes/workspace-shell/workspace-shell.css +55 -0
  129. package/recipes/workspace-shell/workspace-shell.tsx +636 -0
  130. package/src/styles/fonts/Sohne-Book.woff2 +0 -0
  131. package/src/styles/fonts/Sohne-Medium.woff2 +0 -0
  132. package/src/styles/fonts/Sohne-Semi.woff2 +0 -0
  133. package/src/styles/globals.css +233 -54
@@ -0,0 +1,95 @@
1
+ # Workspace shell recipe
2
+
3
+ Use this recipe for authenticated Blaze pages inside a selected customer
4
+ workspace. It establishes one persistent application frame; the page supplies its
5
+ own navigation, workflow header, canvas, and actions through slots.
6
+
7
+ ## Modes
8
+
9
+ - `standard`: dashboard, settings, reporting, and channel-management pages. The
10
+ content area owns its scrolling.
11
+ - `focused`: creation and review flows. The content slot owns its internal rail and
12
+ canvas scrolling, while the optional shell footer stays pinned.
13
+
14
+ Both modes preserve the same account sidebar, outer workspace gutter, rounded
15
+ workspace frame, and 56px channel header. A focused workflow is content inside the
16
+ workspace shell, not a second application shell.
17
+
18
+ ## Preserve
19
+
20
+ - One `SidebarProvider` wrapping the 220px sidebar and workspace inset.
21
+ - A 10px desktop gutter around the bordered, rounded workspace frame.
22
+ - A 76px workspace-identity header aligning the identity to the channel title,
23
+ followed by the same 8px section inset in every shell mode.
24
+ - `Manage` and `Channels` navigation groups with the active destination marked by
25
+ `aria-current="page"`.
26
+ - 12px medium section labels and 14px regular destination text using the 90%
27
+ foreground in default, hover, and selected states.
28
+ - 15px rail icons using the same 90% foreground as their destination labels in
29
+ default, hover, and selected states.
30
+ - The bespoke Home glyph from the approved workspace-shell Figma frame, inlined
31
+ with `currentColor` and the system 7/6px rendered stroke at 15px; do not
32
+ substitute the Tabler Home icon.
33
+ - Shared `NavigationAction` / `navigationActionVariants` styling for rail
34
+ destinations and standard shell tabs: transparent default, muted hover, and
35
+ 8% selected surface.
36
+ - Workspace and account menus composed as specialized tertiary `Button` triggers,
37
+ rather than one-off native-button states. Their surfaces share the navigation
38
+ row's 10px inset and pad from the identity icon so hover does not begin at the
39
+ glyph edge; both retain the default 32px control height for balanced vertical
40
+ space around the identity mark.
41
+ - Rail collapse, expansion, and settings actions use tertiary `icon-sm` buttons
42
+ without overriding their system size or hit area.
43
+ - The expanded rail uses `SidebarRail` resize mode with a 220px default, 200–320px
44
+ caps, a transparent edge at rest, a centered 2px divider on hover/focus/drag,
45
+ column-resize cursor, pointer dragging, and Arrow/Home/End keyboard control.
46
+ Width and caps remain configurable.
47
+ - A 55px collapsed rail that preserves row and group geometry, hides visible
48
+ labels without removing their layout slots, stacks Settings above the profile,
49
+ and moves the expand control into the channel header. Collapse and expansion use
50
+ a 150ms Material standard curve with staged label fades for a settled endpoint.
51
+ Those pattern-specific rules live in `workspace-shell.css`, not the global
52
+ Blaze UI stylesheet.
53
+ - An 8px first-section inset that combines with the identity header's bottom
54
+ padding to optically match the 24px separation between navigation groups; shell
55
+ mode must not alter left-rail geometry.
56
+ - A single channel header with replaceable channel identity and action slots.
57
+ - The shell's responsive mobile sheet and desktop icon-collapse behavior.
58
+ - An optional page-header slot above the content and an optional 88px pinned action
59
+ footer below it.
60
+ - Söhne typography, optical icon sizing, semantic colors, and shared Blaze UI
61
+ controls.
62
+
63
+ ## Adapt
64
+
65
+ - Replace the reference workspace, channel, and user identity through
66
+ `workspaceMark`, `channelMark`, and `userAvatar`.
67
+ - Keep fixed brand marks resolution-independent where a vector source exists. When
68
+ a workspace avatar is raster-only, retain the original high-density source and
69
+ size it explicitly in the slot rather than generating a CSS-sized derivative.
70
+ - Keep workspace and channel marks in a 24px identity container with 20px centered
71
+ artwork by composing `IdentityMark` and `IdentityMarkImage`. Compose account
72
+ avatars with `Avatar size="xs" shape="rounded"` for the 20px box and 6px corner
73
+ radius. Account labels use the same 14px regular weight as navigation
74
+ destinations.
75
+ - Replace `href` values through the application's routing layer. In Inertia
76
+ applications, render `Link` through the Blaze UI component's `render` prop rather
77
+ than adding a parallel client-side router.
78
+ - Pass application-specific navigation groups and derive the active key from the
79
+ current route.
80
+ - Put standard tabs and page titles in `pageHeader`.
81
+ - Put guided-workflow progress in `pageHeader`, its rail and canvas in `children`,
82
+ and its actions in `footer` with `mode="focused"`.
83
+ - Keep routing, authorization, persistence, and workflow state in the application.
84
+
85
+ ## Avoid
86
+
87
+ - Importing this recipe as a runtime package component; copy and adapt its source.
88
+ - Creating separate outer shells for dashboard and creation-flow routes.
89
+ - Placing page titles, tabs, or domain state inside the persistent sidebar.
90
+ - Hiding workflow actions in the scrolling canvas when they must remain available.
91
+ - Using production customer data in Storybook.
92
+
93
+ Start from `workspace-shell.tsx` and its colocated `workspace-shell.css`. Review
94
+ `Recipes/Workspace shell/Standard` and `Recipes/Workspace shell/Focused Campaign`
95
+ in Storybook before adapting them.
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16 8.18185C16 7.61458 15.9481 7.06913 15.8516 6.54549H8.16326V9.64003H12.5566C12.3673 10.64 11.7922 11.4873 10.9276 12.0546V14.0618H13.5659C15.1095 12.6691 16 10.6182 16 8.18185Z" fill="#4285F4"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.16327 16C10.3674 16 12.2152 15.2837 13.5659 14.0618L10.9276 12.0546C10.1967 12.5346 9.26161 12.8182 8.16327 12.8182C6.03711 12.8182 4.23748 11.4109 3.59555 9.51998H0.868279V11.5927C2.21151 14.2072 4.97218 16 8.16327 16Z" fill="#34A853"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M3.59555 9.51998C3.43229 9.03998 3.33952 8.5273 3.33952 8.00003C3.33952 7.47276 3.43228 6.96003 3.59555 6.48003V4.40731H0.868275C0.315399 5.48731 0 6.70912 0 8.00003C0 9.29094 0.315403 10.5127 0.868279 11.5927L3.59555 9.51998Z" fill="#FBBC05"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.16327 3.18181C9.36179 3.18181 10.4379 3.58545 11.2839 4.37818L13.6252 2.08363C12.2115 0.792726 10.3636 0 8.16327 0C4.97218 0 2.2115 1.79277 0.868275 4.40731L3.59555 6.48003C4.23748 4.58913 6.03711 3.18181 8.16327 3.18181Z" fill="#EA4335"/>
6
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="icon">
3
+ <path id="Icon" d="M4.6875 10.6641H10.3125M7.06536 2.00698L2.19036 5.30377C1.99251 5.43757 1.875 5.65416 1.875 5.88503V12.0551C1.875 12.646 2.37868 13.125 3 13.125H12C12.6213 13.125 13.125 12.646 13.125 12.0551V5.88503C13.125 5.65416 13.0075 5.43757 12.8096 5.30377L7.93464 2.00698C7.67442 1.83101 7.32558 1.83101 7.06536 2.00698Z" stroke="black" stroke-opacity="0.9" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </g>
5
+ </svg>
@@ -0,0 +1,55 @@
1
+ .workspace-shell-motion {
2
+ --workspace-shell-motion-duration: 150ms;
3
+ --workspace-shell-motion-easing: cubic-bezier(0.2, 0, 0, 1);
4
+ }
5
+
6
+ .workspace-shell-motion [data-slot='sidebar-gap'],
7
+ .workspace-shell-motion [data-slot='sidebar-container'],
8
+ .workspace-shell-motion [data-slot='sidebar-group-label'],
9
+ .workspace-shell-motion [data-slot='sidebar-menu-button'] {
10
+ transition-duration: var(--workspace-shell-motion-duration);
11
+ transition-timing-function: var(--workspace-shell-motion-easing);
12
+ }
13
+
14
+ .workspace-shell-motion[data-sidebar-resizing] [data-slot='sidebar-gap'],
15
+ .workspace-shell-motion[data-sidebar-resizing] [data-slot='sidebar-container'] {
16
+ transition-duration: 0ms;
17
+ will-change: width;
18
+ }
19
+
20
+ .workspace-navigation-label {
21
+ transition-property: opacity, transform;
22
+ }
23
+
24
+ .workspace-shell-motion
25
+ [data-slot='sidebar'][data-state='collapsed']
26
+ .workspace-navigation-label,
27
+ .workspace-shell-motion
28
+ [data-slot='sidebar'][data-state='collapsed']
29
+ [data-slot='sidebar-group-label'] {
30
+ transition-delay: 0ms;
31
+ transition-duration: 90ms;
32
+ transition-timing-function: cubic-bezier(0.3, 0, 0.8, 0.15);
33
+ }
34
+
35
+ .workspace-shell-motion
36
+ [data-slot='sidebar'][data-state='expanded']
37
+ .workspace-navigation-label,
38
+ .workspace-shell-motion
39
+ [data-slot='sidebar'][data-state='expanded']
40
+ [data-slot='sidebar-group-label'] {
41
+ transition-delay: 20ms;
42
+ transition-duration: 130ms;
43
+ transition-timing-function: cubic-bezier(0.05, 0.7, 0.1, 1);
44
+ }
45
+
46
+ @media (prefers-reduced-motion: reduce) {
47
+ .workspace-shell-motion [data-slot='sidebar-gap'],
48
+ .workspace-shell-motion [data-slot='sidebar-container'],
49
+ .workspace-shell-motion [data-slot='sidebar-group-label'],
50
+ .workspace-shell-motion [data-slot='sidebar-menu-button'],
51
+ .workspace-shell-motion .workspace-navigation-label {
52
+ transition-delay: 0ms !important;
53
+ transition-duration: 0ms !important;
54
+ }
55
+ }