@syscore/ui-library 2.0.0-beta-publish-workflow-beta.16 → 2.0.0-beta-publish-workflow-beta.17

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 (269) hide show
  1. package/client/components/icons/IconUtility.tsx +353 -0
  2. package/client/components/icons/X.tsx +4 -3
  3. package/client/components/ui/alert-v02.tsx +2 -6
  4. package/client/components/ui/button-v01.tsx +2 -12
  5. package/client/components/ui/button.tsx +39 -3
  6. package/client/components/ui/dropdown.tsx +2 -12
  7. package/client/components/ui/navigation.tsx +25 -4
  8. package/client/components/ui/radio-v01.tsx +84 -0
  9. package/client/components/ui/search-field-v01.tsx +10 -28
  10. package/client/components/ui/section-heading.tsx +1 -1
  11. package/client/components/ui/sign-in-field-v01.tsx +150 -0
  12. package/client/global.css +354 -73
  13. package/client/lib/system-icons.ts +1583 -0
  14. package/client/lib/utility-icons.ts +121 -0
  15. package/client/ui/Button.stories.tsx +63 -0
  16. package/client/ui/Colors.stories.tsx +34 -31
  17. package/client/ui/Icons.stories.tsx +179 -0
  18. package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
  19. package/client/ui/RadioV01/RadioV01.stories.tsx +136 -0
  20. package/client/ui/SearchField/SearchField.stories.tsx +4 -1
  21. package/client/ui/TextAreaV01/TextAreaV01.stories.tsx +23 -2
  22. package/client/ui/TextFieldV01/PasswordFieldV01.stories.tsx +25 -11
  23. package/client/ui/TextFieldV01/SignInFieldV01.stories.tsx +196 -0
  24. package/dist/client/assets/alert/icon-clear.svg.js +4 -0
  25. package/dist/client/assets/alert/icon-done.svg.js +4 -0
  26. package/dist/client/assets/avatar-identity/placeholder-icon.svg.js +4 -0
  27. package/dist/client/assets/breadcrumb/icon-ellipsis.svg.js +4 -0
  28. package/dist/client/assets/breadcrumb/icon-home.svg.js +4 -0
  29. package/dist/client/assets/breadcrumb/icon-separator.svg.js +4 -0
  30. package/dist/client/assets/button-v01/icon-back.svg.js +4 -0
  31. package/dist/client/assets/button-v01/icon-check.svg.js +4 -0
  32. package/dist/client/assets/button-v01/icon-close.svg.js +4 -0
  33. package/dist/client/assets/button-v01/icon-delete.svg.js +4 -0
  34. package/dist/client/assets/button-v01/icon-device.svg.js +4 -0
  35. package/dist/client/assets/dropdown/icon-carrot-contract.svg.js +4 -0
  36. package/dist/client/assets/dropdown/icon-carrot-expand.svg.js +4 -0
  37. package/dist/client/assets/dropdown/icon-clear.svg.js +4 -0
  38. package/dist/client/assets/dropdown/icon-enter.svg.js +4 -0
  39. package/dist/client/components/icons/AlphaIcon.js +129 -0
  40. package/dist/client/components/icons/ConceptIcons.js +905 -0
  41. package/dist/client/components/icons/IconUtility.js +410 -0
  42. package/dist/client/components/icons/NavAccount.js +37 -0
  43. package/dist/client/components/icons/NavBullet.js +17 -0
  44. package/dist/client/components/icons/NavLogo.js +48 -0
  45. package/dist/client/components/icons/StandardLogo.js +93 -0
  46. package/dist/client/components/icons/UtilityAccordion.js +27 -0
  47. package/dist/client/components/icons/UtilityChangeType.js +26 -0
  48. package/dist/client/components/icons/UtilityCheck.js +28 -0
  49. package/dist/client/components/icons/UtilityChevronDown.js +39 -0
  50. package/dist/client/components/icons/UtilityClassification.js +53 -0
  51. package/dist/client/components/icons/UtilityClearRegular.js +51 -0
  52. package/dist/client/components/icons/UtilityClose.js +49 -0
  53. package/dist/client/components/icons/UtilityCompare.js +91 -0
  54. package/dist/client/components/icons/UtilityDrag.js +89 -0
  55. package/dist/client/components/icons/UtilityEdit.js +50 -0
  56. package/dist/client/components/icons/UtilityFeedback.js +38 -0
  57. package/dist/client/components/icons/UtilityHome.js +34 -0
  58. package/dist/client/components/icons/UtilityMessage.js +41 -0
  59. package/dist/client/components/icons/UtilityOptions.js +53 -0
  60. package/dist/client/components/icons/UtilityPortfolio.js +116 -0
  61. package/dist/client/components/icons/UtilityReset.js +49 -0
  62. package/dist/client/components/icons/UtilityRevisionsHide.js +76 -0
  63. package/dist/client/components/icons/UtilityRevisionsShow.js +56 -0
  64. package/dist/client/components/icons/UtilitySave.js +38 -0
  65. package/dist/client/components/icons/UtilityScopeLarge.js +123 -0
  66. package/dist/client/components/icons/UtilityScoring.js +51 -0
  67. package/dist/client/components/icons/UtilitySearch.js +46 -0
  68. package/dist/client/components/icons/UtilityShow.js +49 -0
  69. package/dist/client/components/icons/UtilitySort.js +63 -0
  70. package/dist/client/components/icons/UtilityTarget.js +29 -0
  71. package/dist/client/components/icons/UtilityTargetActive.js +48 -0
  72. package/dist/client/components/icons/UtilityText.js +59 -0
  73. package/dist/client/components/icons/UtilityTrash.js +66 -0
  74. package/dist/client/components/icons/UtilityTriangleInfo.js +38 -0
  75. package/dist/client/components/icons/X.js +40 -0
  76. package/dist/client/components/icons/achievement-badges/BadgeCertificationBronze.js +144 -0
  77. package/dist/client/components/icons/achievement-badges/BadgeCertificationGold.js +144 -0
  78. package/dist/client/components/icons/achievement-badges/BadgeCertificationPlatinum.js +144 -0
  79. package/dist/client/components/icons/achievement-badges/BadgeCertificationSilver.js +144 -0
  80. package/dist/client/components/icons/achievement-badges/BadgeRatingCoworking.js +91 -0
  81. package/dist/client/components/icons/achievement-badges/BadgeRatingDesign.js +91 -0
  82. package/dist/client/components/icons/achievement-badges/BadgeRatingEquity.js +91 -0
  83. package/dist/client/components/icons/achievement-badges/BadgeRatingHealthySafety.js +93 -0
  84. package/dist/client/components/icons/achievement-badges/BadgeRatingOperations.js +93 -0
  85. package/dist/client/components/icons/achievement-badges/BadgeRatingPerformance.js +93 -0
  86. package/dist/client/components/icons/achievement-badges/BadgeRatingRealEstate.js +93 -0
  87. package/dist/client/components/icons/achievement-badges/BadgeRatingResidential.js +93 -0
  88. package/dist/client/components/icons/achievement-badges/BadgeRatingWorkforce.js +91 -0
  89. package/dist/client/components/icons/imperative-badges/BadgeImperativePrimary.js +58 -0
  90. package/dist/client/components/icons/imperative-badges/BadgeImperativeSecondary.js +69 -0
  91. package/dist/client/components/icons/provider-badges/BadgeEnterpriseProvider.js +117 -0
  92. package/dist/client/components/icons/provider-badges/BadgePerformanceTestingProvider.js +124 -0
  93. package/dist/client/components/icons/provider-badges/BadgeProductProvider.js +117 -0
  94. package/dist/client/components/icons/provider-badges/BadgeSurveyProvider.js +117 -0
  95. package/dist/client/components/icons/provider-seals/SealEnterpriseProvider.js +100 -0
  96. package/dist/client/components/icons/provider-seals/SealPerformanceTestingProvider.js +100 -0
  97. package/dist/client/components/icons/provider-seals/SealProductProvider.js +98 -0
  98. package/dist/client/components/icons/provider-seals/SealProviders.js +98 -0
  99. package/dist/client/components/icons/provider-seals/SealSurveyProvider.js +98 -0
  100. package/dist/client/components/icons/seals/IWBILogo.js +301 -0
  101. package/dist/client/components/icons/seals/SealCertification.js +206 -0
  102. package/dist/client/components/icons/seals/SealCertificationBronze.js +140 -0
  103. package/dist/client/components/icons/seals/SealCertificationGold.js +140 -0
  104. package/dist/client/components/icons/seals/SealCertificationPlatinum.js +140 -0
  105. package/dist/client/components/icons/seals/SealCertificationSilver.js +140 -0
  106. package/dist/client/components/icons/seals/SealIwbiMember.js +134 -0
  107. package/dist/client/components/icons/seals/SealRating.js +157 -0
  108. package/dist/client/components/icons/seals/SealRatingCoworking.js +89 -0
  109. package/dist/client/components/icons/seals/SealRatingDesign.js +89 -0
  110. package/dist/client/components/icons/seals/SealRatingEquity.js +89 -0
  111. package/dist/client/components/icons/seals/SealRatingHealthSafety.js +91 -0
  112. package/dist/client/components/icons/seals/SealRatingOperations.js +89 -0
  113. package/dist/client/components/icons/seals/SealRatingPerformance.js +91 -0
  114. package/dist/client/components/icons/seals/SealRatingRealEstate.js +89 -0
  115. package/dist/client/components/icons/seals/SealRatingWorkforce.js +89 -0
  116. package/dist/client/components/icons/seals/SealWell.js +132 -0
  117. package/dist/client/components/icons/seals/SealWellCertification.js +225 -0
  118. package/dist/client/components/icons/seals/SealWellCommunity.js +197 -0
  119. package/dist/client/components/icons/seals/SealWellResidence.js +197 -0
  120. package/dist/client/components/icons/seals/SealWorksWithWell.js +227 -0
  121. package/dist/client/components/icons/seals/WaterMarkWWWProducts.js +27 -0
  122. package/dist/client/components/icons/seals/WaterMarkWellProjects.js +36 -0
  123. package/dist/client/components/icons/seals/WatermarkMemberOrg.js +24 -0
  124. package/dist/client/components/ui/accordion.js +326 -0
  125. package/dist/client/components/ui/alert-dialog-panel.js +156 -0
  126. package/dist/client/components/ui/alert-dialog.js +103 -0
  127. package/dist/client/components/ui/alert-v02.js +157 -0
  128. package/dist/client/components/ui/alert.js +55 -0
  129. package/dist/client/components/ui/app-bar.js +203 -0
  130. package/dist/client/components/ui/aspect-ratio.js +5 -0
  131. package/dist/client/components/ui/avatar-identity.js +93 -0
  132. package/dist/client/components/ui/avatar.js +56 -0
  133. package/dist/client/components/ui/back-link.js +27 -0
  134. package/dist/client/components/ui/banner.js +75 -0
  135. package/dist/client/components/ui/bottom-navigation.js +127 -0
  136. package/dist/client/components/ui/breadcrumb-trail.js +137 -0
  137. package/dist/client/components/ui/breadcrumb.js +91 -0
  138. package/dist/client/components/ui/button-v01.js +173 -0
  139. package/dist/client/components/ui/button.js +99 -0
  140. package/dist/client/components/ui/calendar.js +62 -0
  141. package/dist/client/components/ui/card.js +177 -0
  142. package/dist/client/components/ui/carousel.js +198 -0
  143. package/dist/client/components/ui/centered-page.js +10 -0
  144. package/dist/client/components/ui/chart.js +239 -0
  145. package/dist/client/components/ui/checkbox-field.js +39 -0
  146. package/dist/client/components/ui/checkbox.js +18 -0
  147. package/dist/client/components/ui/code-badge.js +29 -0
  148. package/dist/client/components/ui/collapsible.js +9 -0
  149. package/dist/client/components/ui/command.js +79 -0
  150. package/dist/client/components/ui/context-menu.js +138 -0
  151. package/dist/client/components/ui/copy.js +39 -0
  152. package/dist/client/components/ui/credit-card-preview.js +74 -0
  153. package/dist/client/components/ui/data-grid.js +156 -0
  154. package/dist/client/components/ui/date-picker.js +142 -0
  155. package/dist/client/components/ui/dialog.js +179 -0
  156. package/dist/client/components/ui/drawer.js +95 -0
  157. package/dist/client/components/ui/drop-zone.js +87 -0
  158. package/dist/client/components/ui/dropdown-menu.js +139 -0
  159. package/dist/client/components/ui/dropdown.js +339 -0
  160. package/dist/client/components/ui/empty-state.js +76 -0
  161. package/dist/client/components/ui/field-group.js +32 -0
  162. package/dist/client/components/ui/file-upload-trigger.js +70 -0
  163. package/dist/client/components/ui/file-upload.js +171 -0
  164. package/dist/client/components/ui/footer.js +97 -0
  165. package/dist/client/components/ui/form.js +109 -0
  166. package/dist/client/components/ui/height-container.js +41 -0
  167. package/dist/client/components/ui/hero-section.js +44 -0
  168. package/dist/client/components/ui/hero-split-image.js +45 -0
  169. package/dist/client/components/ui/hover-card.js +22 -0
  170. package/dist/client/components/ui/icon-button.js +30 -0
  171. package/dist/client/components/ui/inline-notice.js +19 -0
  172. package/dist/client/components/ui/input-otp.js +46 -0
  173. package/dist/client/components/ui/input.js +37 -0
  174. package/dist/client/components/ui/label.js +31 -0
  175. package/dist/client/components/ui/labeled-divider.js +23 -0
  176. package/dist/client/components/ui/layout.js +724 -0
  177. package/dist/client/components/ui/menubar.js +157 -0
  178. package/dist/client/components/ui/meta-row.js +19 -0
  179. package/dist/client/components/ui/mobile-nav.js +230 -0
  180. package/dist/client/components/ui/modal-panel.js +116 -0
  181. package/dist/client/components/ui/navigation-menu.js +89 -0
  182. package/dist/client/components/ui/navigation.js +452 -0
  183. package/dist/client/components/ui/outline-node.js +57 -0
  184. package/dist/client/components/ui/page-header.js +79 -0
  185. package/dist/client/components/ui/pagination-v01.js +124 -0
  186. package/dist/client/components/ui/pagination.js +105 -0
  187. package/dist/client/components/ui/password-field-v01.js +46 -0
  188. package/dist/client/components/ui/pill-button.js +34 -0
  189. package/dist/client/components/ui/popover.js +22 -0
  190. package/dist/client/components/ui/price-tag.js +20 -0
  191. package/dist/client/components/ui/profile-avatar.js +92 -0
  192. package/dist/client/components/ui/progress.js +23 -0
  193. package/dist/client/components/ui/radio-card.js +30 -0
  194. package/dist/client/components/ui/radio-group.js +32 -0
  195. package/dist/client/components/ui/radio-v01.js +58 -0
  196. package/dist/client/components/ui/resizable.js +32 -0
  197. package/dist/client/components/ui/resource-thumbnail.js +24 -0
  198. package/dist/client/components/ui/scroll-area.js +37 -0
  199. package/dist/client/components/ui/search-field-v01.js +111 -0
  200. package/dist/client/components/ui/search.js +109 -0
  201. package/dist/client/components/ui/section-badge.js +22 -0
  202. package/dist/client/components/ui/section-heading.js +21 -0
  203. package/dist/client/components/ui/select.js +96 -0
  204. package/dist/client/components/ui/separator.js +24 -0
  205. package/dist/client/components/ui/sheet.js +106 -0
  206. package/dist/client/components/ui/side-nav.js +173 -0
  207. package/dist/client/components/ui/sidebar.js +580 -0
  208. package/dist/client/components/ui/sign-in-field-v01.js +107 -0
  209. package/dist/client/components/ui/skeleton.js +17 -0
  210. package/dist/client/components/ui/slider.js +20 -0
  211. package/dist/client/components/ui/social-button.js +34 -0
  212. package/dist/client/components/ui/standard-navigation.js +454 -0
  213. package/dist/client/components/ui/status-pill.js +42 -0
  214. package/dist/client/components/ui/stepper.js +111 -0
  215. package/dist/client/components/ui/switch-v01.js +39 -0
  216. package/dist/client/components/ui/switch.js +17 -0
  217. package/dist/client/components/ui/system-bar.js +76 -0
  218. package/dist/client/components/ui/table.js +107 -0
  219. package/dist/client/components/ui/tabs-v01.js +74 -0
  220. package/dist/client/components/ui/tabs.js +253 -0
  221. package/dist/client/components/ui/tag-v02.js +85 -0
  222. package/dist/client/components/ui/tag.js +73 -0
  223. package/dist/client/components/ui/text-area-v01.js +26 -0
  224. package/dist/client/components/ui/text-field-v01.js +78 -0
  225. package/dist/client/components/ui/text-link.js +23 -0
  226. package/dist/client/components/ui/textarea.js +19 -0
  227. package/dist/client/components/ui/timeline.js +87 -0
  228. package/dist/client/components/ui/toast-v01.js +155 -0
  229. package/dist/client/components/ui/toast.js +88 -0
  230. package/dist/client/components/ui/toaster.js +22 -0
  231. package/dist/client/components/ui/toggle.js +56 -0
  232. package/dist/client/components/ui/tooltip.js +328 -0
  233. package/dist/client/components/ui/typography.js +119 -0
  234. package/dist/client/hooks/use-mobile.js +20 -0
  235. package/dist/client/hooks/use-segmented-control.js +32 -0
  236. package/dist/client/hooks/use-tabs.js +22 -0
  237. package/dist/client/hooks/use-toast.js +122 -0
  238. package/dist/client/lib/concept-colors.js +74 -0
  239. package/dist/client/lib/concept-icons.js +32 -0
  240. package/dist/client/lib/utility-icons.js +73 -0
  241. package/dist/client/lib/utils.js +13 -0
  242. package/dist/index.cjs +1 -0
  243. package/dist/index.d.ts +156 -0
  244. package/dist/ui/index.js +774 -0
  245. package/package.json +9 -6
  246. package/dist/index.cjs.js +0 -1
  247. package/dist/index.es.js +0 -18989
  248. /package/{dist → client}/fonts/FT-Made/FTMade-Regular.otf +0 -0
  249. /package/{dist → client}/fonts/FT-Made/FTMade-Regular.ttf +0 -0
  250. /package/{dist → client}/fonts/FT-Made/FTMade-Regular.woff +0 -0
  251. /package/{dist → client}/fonts/FT-Made/FTMade-Regular.woff2 +0 -0
  252. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-black.otf +0 -0
  253. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-blackitalic.otf +0 -0
  254. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-bold.otf +0 -0
  255. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-bolditalic.otf +0 -0
  256. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extrabold.otf +0 -0
  257. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extrabolditalic.otf +0 -0
  258. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extralight.otf +0 -0
  259. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-extralightitalic.otf +0 -0
  260. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-italic.otf +0 -0
  261. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-light.otf +0 -0
  262. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-lightitalic.otf +0 -0
  263. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-medium.otf +0 -0
  264. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-mediumitalic.otf +0 -0
  265. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-regular.otf +0 -0
  266. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-semibold.otf +0 -0
  267. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-semibolditalic.otf +0 -0
  268. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-thin.otf +0 -0
  269. /package/{dist → client}/fonts/Mazzard-M/mazzardsoftm-thinitalic.otf +0 -0
@@ -0,0 +1,724 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../../lib/utils.js";
4
+ const spacing = (n) => `${n * 0.25}rem`;
5
+ const warned = /* @__PURE__ */ new Set();
6
+ function warnOnce(message) {
7
+ if (process.env.NODE_ENV === "production" || warned.has(message)) return;
8
+ warned.add(message);
9
+ console.warn(message);
10
+ }
11
+ const SPACE_SCALE = {
12
+ "3xs": 2,
13
+ "2xs": 4,
14
+ xs: 8,
15
+ sm: 12,
16
+ md: 16,
17
+ lg: 20,
18
+ xl: 24,
19
+ "2xl": 32,
20
+ "3xl": 40,
21
+ "4xl": 48,
22
+ "5xl": 64,
23
+ "6xl": 80,
24
+ "7xl": 96,
25
+ "8xl": 120
26
+ };
27
+ const SPACE_NAMES = Object.keys(SPACE_SCALE);
28
+ const SPACER_SPACES = Object.values(
29
+ SPACE_SCALE
30
+ );
31
+ const PX_TO_SPACE = Object.fromEntries(
32
+ SPACE_NAMES.map((name) => [SPACE_SCALE[name], name])
33
+ );
34
+ function tokenCss(name) {
35
+ return `var(--space-${name})`;
36
+ }
37
+ function gapCss(value) {
38
+ if (value == null) return void 0;
39
+ if (typeof value === "string") return tokenCss(value);
40
+ if (value === 0) return "0px";
41
+ const named = PX_TO_SPACE[value * 4];
42
+ if (named) return tokenCss(named);
43
+ warnOnce(
44
+ `layout: spacing ${value} is off the space scale, so ${spacing(value)} is frozen into this app and a design-system change will not reach it. Use a named token (gap="md").`
45
+ );
46
+ return spacing(value);
47
+ }
48
+ const toCssSize = (v) => v === void 0 ? void 0 : typeof v === "number" ? `${v}px` : v;
49
+ const isWrapped = (wrap) => wrap === true || wrap === "wrap";
50
+ const Stack = React.forwardRef(
51
+ ({
52
+ as: Component = "div",
53
+ direction = "vertical",
54
+ gap = "md",
55
+ align,
56
+ justify,
57
+ hAlign,
58
+ vAlign,
59
+ wrap = false,
60
+ padding,
61
+ marginY,
62
+ width,
63
+ height,
64
+ maxWidth,
65
+ minHeight,
66
+ isScrollable = false,
67
+ className,
68
+ style,
69
+ ...props
70
+ }, ref) => {
71
+ const resolvedJustify = justify ?? (direction === "horizontal" ? hAlign : vAlign);
72
+ const resolvedAlign = align ?? (direction === "horizontal" ? vAlign : hAlign);
73
+ return /* @__PURE__ */ jsx(
74
+ Component,
75
+ {
76
+ ref,
77
+ className: cn(
78
+ "stack",
79
+ direction === "horizontal" && "stack--horizontal",
80
+ resolvedAlign && `stack--align-${resolvedAlign}`,
81
+ resolvedJustify && `stack--justify-${resolvedJustify}`,
82
+ isWrapped(wrap) && "stack--wrap",
83
+ wrap === "wrap-reverse" && "stack--wrap-reverse",
84
+ isScrollable && "stack--scrollable",
85
+ className
86
+ ),
87
+ style: {
88
+ gap: gapCss(gap),
89
+ padding: gapCss(padding),
90
+ marginTop: gapCss(marginY),
91
+ marginBottom: gapCss(marginY),
92
+ width: toCssSize(width),
93
+ height: toCssSize(height),
94
+ maxWidth: toCssSize(maxWidth),
95
+ minHeight: toCssSize(minHeight),
96
+ ...style
97
+ },
98
+ ...props
99
+ }
100
+ );
101
+ }
102
+ );
103
+ Stack.displayName = "Stack";
104
+ const HStack = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(Stack, { ref, direction: "horizontal", ...props }));
105
+ HStack.displayName = "HStack";
106
+ const VStack = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(Stack, { ref, direction: "vertical", ...props }));
107
+ VStack.displayName = "VStack";
108
+ const StackItem = React.forwardRef(
109
+ ({
110
+ as: Component = "div",
111
+ size = "static",
112
+ alignSelf,
113
+ isScrollable = false,
114
+ className,
115
+ ...props
116
+ }, ref) => /* @__PURE__ */ jsx(
117
+ Component,
118
+ {
119
+ ref,
120
+ className: cn(
121
+ "stack-item",
122
+ size === "fill" && "stack-item--fill",
123
+ alignSelf && `stack-item--align-${alignSelf}`,
124
+ isScrollable && "stack-item--scrollable",
125
+ className
126
+ ),
127
+ ...props
128
+ }
129
+ )
130
+ );
131
+ StackItem.displayName = "StackItem";
132
+ const Grid = React.forwardRef(
133
+ ({
134
+ as: Component = "div",
135
+ columns,
136
+ cols,
137
+ colsSm,
138
+ colsMd,
139
+ colsLg,
140
+ gap = "md",
141
+ rowGap,
142
+ columnGap,
143
+ colGap,
144
+ align,
145
+ justify,
146
+ width,
147
+ height,
148
+ maxWidth,
149
+ minHeight,
150
+ className,
151
+ style,
152
+ ...props
153
+ }, ref) => {
154
+ const resolvedColumnGap = columnGap ?? colGap;
155
+ const isResponsive = columns !== void 0 && typeof columns === "object";
156
+ const fixedCols = typeof columns === "number" ? columns : cols ?? 1;
157
+ let template;
158
+ if (isResponsive) {
159
+ const repeat = columns.repeat ?? "fill";
160
+ if (columns.max) {
161
+ template = `repeat(auto-${repeat}, minmax(max(${columns.minWidth}px, calc(100% / ${columns.max})), 1fr))`;
162
+ } else {
163
+ template = `repeat(auto-${repeat}, minmax(${columns.minWidth}px, 1fr))`;
164
+ }
165
+ }
166
+ return /* @__PURE__ */ jsx(
167
+ Component,
168
+ {
169
+ ref,
170
+ className: cn(
171
+ "grid-layout",
172
+ !isResponsive && `grid-layout--cols-${fixedCols}`,
173
+ !isResponsive && colsSm && `grid-layout--sm-cols-${colsSm}`,
174
+ !isResponsive && colsMd && `grid-layout--md-cols-${colsMd}`,
175
+ !isResponsive && colsLg && `grid-layout--lg-cols-${colsLg}`,
176
+ align && `grid-layout--align-${align}`,
177
+ justify && `grid-layout--justify-${justify}`,
178
+ className
179
+ ),
180
+ style: {
181
+ gridTemplateColumns: template,
182
+ // Never emit the `gap` shorthand alongside `rowGap`/`columnGap` —
183
+ // React warns on mixing a shorthand and its longhands in the same
184
+ // style object across re-renders, even when one side is
185
+ // `undefined`. Decomposing into the two longhands always, with
186
+ // `gap` as their shared fallback, avoids the shorthand entirely.
187
+ rowGap: gapCss(rowGap ?? gap),
188
+ columnGap: gapCss(resolvedColumnGap ?? gap),
189
+ width: toCssSize(width),
190
+ height: toCssSize(height),
191
+ maxWidth: toCssSize(maxWidth),
192
+ minHeight: toCssSize(minHeight),
193
+ ...style
194
+ },
195
+ ...props
196
+ }
197
+ );
198
+ }
199
+ );
200
+ Grid.displayName = "Grid";
201
+ const GridSpan = React.forwardRef(
202
+ ({ as: Component = "div", columns, rows, className, style, ...props }, ref) => /* @__PURE__ */ jsx(
203
+ Component,
204
+ {
205
+ ref,
206
+ className: cn("grid-span", className),
207
+ style: {
208
+ gridColumn: columns === "full" ? "1 / -1" : columns != null ? `span ${columns}` : void 0,
209
+ gridRow: rows != null ? `span ${rows}` : void 0,
210
+ ...style
211
+ },
212
+ ...props
213
+ }
214
+ )
215
+ );
216
+ GridSpan.displayName = "GridSpan";
217
+ const ColumnsPresetMap = {
218
+ sidebar: "var(--layout-panel-width-default) 1fr",
219
+ // A flexible main column and a 20–27.5rem aside (a form beside its live summary).
220
+ "main-aside": "minmax(0, 1fr) minmax(20rem, 27.5rem)",
221
+ "sidebar-right": "1fr var(--layout-panel-width-default)",
222
+ "wide-sidebar": "var(--layout-panel-width-wide) 1fr",
223
+ "narrow-sidebar": "var(--layout-panel-width-narrow) 1fr",
224
+ split: "1fr 1fr",
225
+ "1-2": "1fr 2fr",
226
+ "2-1": "2fr 1fr",
227
+ "1-3": "1fr 3fr",
228
+ "3-1": "3fr 1fr"
229
+ };
230
+ const Columns = React.forwardRef(
231
+ ({
232
+ as: Component = "div",
233
+ preset = "split",
234
+ template,
235
+ gap = "xl",
236
+ colGap,
237
+ columnGap,
238
+ rowGap,
239
+ collapse,
240
+ align,
241
+ className,
242
+ style,
243
+ ...props
244
+ }, ref) => {
245
+ const resolvedColumnGap = columnGap ?? colGap;
246
+ return /* @__PURE__ */ jsx(
247
+ Component,
248
+ {
249
+ ref,
250
+ className: cn(
251
+ "columns-layout",
252
+ collapse && `columns-layout--collapse-${collapse}`,
253
+ align === "start" && "columns-layout--align-start",
254
+ className
255
+ ),
256
+ style: {
257
+ gridTemplateColumns: template ?? ColumnsPresetMap[preset],
258
+ // See Grid's identical comment — never mix the `gap` shorthand
259
+ // with `rowGap`/`columnGap` longhands in the same style object.
260
+ rowGap: gapCss(rowGap ?? gap),
261
+ columnGap: gapCss(resolvedColumnGap ?? gap),
262
+ ...style
263
+ },
264
+ ...props
265
+ }
266
+ );
267
+ }
268
+ );
269
+ Columns.displayName = "Columns";
270
+ const Center = React.forwardRef(
271
+ ({
272
+ as: Component = "div",
273
+ axis = "both",
274
+ width,
275
+ height,
276
+ maxWidth,
277
+ minHeight,
278
+ padding,
279
+ isInline = false,
280
+ className,
281
+ style,
282
+ ...props
283
+ }, ref) => /* @__PURE__ */ jsx(
284
+ Component,
285
+ {
286
+ ref,
287
+ className: cn(
288
+ "center",
289
+ isInline && "center--inline",
290
+ `center--${axis}`,
291
+ className
292
+ ),
293
+ style: {
294
+ width: toCssSize(width),
295
+ height: toCssSize(height),
296
+ maxWidth: toCssSize(maxWidth),
297
+ minHeight: toCssSize(minHeight),
298
+ padding: gapCss(padding),
299
+ ...style
300
+ },
301
+ ...props
302
+ }
303
+ )
304
+ );
305
+ Center.displayName = "Center";
306
+ const FormLayout = React.forwardRef(
307
+ ({
308
+ as: Component = "div",
309
+ direction = "vertical",
310
+ gap,
311
+ width,
312
+ maxWidth,
313
+ className,
314
+ style,
315
+ ...props
316
+ }, ref) => /* @__PURE__ */ jsx(
317
+ Component,
318
+ {
319
+ ref,
320
+ className: cn(
321
+ "form-layout",
322
+ direction === "horizontal" && "form-layout--horizontal",
323
+ direction === "horizontal-labels" && "form-layout--horizontal-labels",
324
+ className
325
+ ),
326
+ style: {
327
+ gap: gapCss(gap),
328
+ width: toCssSize(width),
329
+ maxWidth: toCssSize(maxWidth),
330
+ ...style
331
+ },
332
+ ...props
333
+ }
334
+ )
335
+ );
336
+ FormLayout.displayName = "FormLayout";
337
+ const Section = React.forwardRef(
338
+ ({
339
+ as: Component = "section",
340
+ padding = "lg",
341
+ maxWidth,
342
+ className,
343
+ style,
344
+ ...props
345
+ }, ref) => /* @__PURE__ */ jsx(
346
+ Component,
347
+ {
348
+ ref,
349
+ className: cn(
350
+ "section-layout",
351
+ padding !== "none" && `section-layout--${padding}`,
352
+ className
353
+ ),
354
+ style: { maxWidth: toCssSize(maxWidth), ...style },
355
+ ...props
356
+ }
357
+ )
358
+ );
359
+ Section.displayName = "Section";
360
+ function panelWidthVar(width) {
361
+ if (width == null) return void 0;
362
+ if (typeof width === "number") {
363
+ warnOnce(
364
+ `LayoutPanel: width={${width}} freezes ${width}px into this app. Use width="rail" | "nav" | "narrow" | "default" | "wide" so --layout-panel-width-* stays in control.`
365
+ );
366
+ return `${width}px`;
367
+ }
368
+ return `var(--layout-panel-width-${width})`;
369
+ }
370
+ function measureVar(measure) {
371
+ if (measure == null) return void 0;
372
+ if (typeof measure !== "string" || !["sm", "md", "lg", "full"].includes(measure)) {
373
+ const frozen = toCssSize(measure);
374
+ warnOnce(
375
+ `Layout: contentWidth={${JSON.stringify(measure)}} freezes ${frozen} into this app. Use contentWidth="sm" | "md" | "lg" | "full" so --layout-measure-* stays in control.`
376
+ );
377
+ return frozen;
378
+ }
379
+ return `var(--layout-measure-${measure})`;
380
+ }
381
+ const LAYOUT_SLOT = Symbol.for("iwbi.layoutSlot");
382
+ function markSlot(component, slot) {
383
+ component[LAYOUT_SLOT] = slot;
384
+ return component;
385
+ }
386
+ function slotIdOf(element) {
387
+ var _a, _b;
388
+ const type = element.type;
389
+ if (typeof type === "string" || typeof type === "number") return void 0;
390
+ const tagged = type;
391
+ return tagged[LAYOUT_SLOT] ?? ((_a = tagged.render) == null ? void 0 : _a[LAYOUT_SLOT]) ?? ((_b = tagged.type) == null ? void 0 : _b[LAYOUT_SLOT]);
392
+ }
393
+ const LayoutHeader = markSlot(
394
+ React.forwardRef(
395
+ ({ as = "header", sticky = false, ...props }, ref) => {
396
+ const Component = as;
397
+ return /* @__PURE__ */ jsx(
398
+ Component,
399
+ {
400
+ ref,
401
+ className: cn("layout-header", sticky && "layout-header--sticky"),
402
+ ...props
403
+ }
404
+ );
405
+ }
406
+ ),
407
+ "header"
408
+ );
409
+ LayoutHeader.displayName = "LayoutHeader";
410
+ const LayoutFooter = markSlot(
411
+ React.forwardRef(
412
+ ({ as = "footer", ...props }, ref) => {
413
+ const Component = as;
414
+ return /* @__PURE__ */ jsx(Component, { ref, className: "layout-footer", ...props });
415
+ }
416
+ ),
417
+ "footer"
418
+ );
419
+ LayoutFooter.displayName = "LayoutFooter";
420
+ const LayoutContent = markSlot(
421
+ React.forwardRef(
422
+ ({ as = "main", isScrollable = true, tabIndex, ...props }, ref) => {
423
+ const Component = as;
424
+ return /* @__PURE__ */ jsx(
425
+ Component,
426
+ {
427
+ ref,
428
+ className: cn(
429
+ "layout-content",
430
+ isScrollable && "layout-content--scrollable"
431
+ ),
432
+ tabIndex: tabIndex ?? (isScrollable ? 0 : void 0),
433
+ ...props
434
+ }
435
+ );
436
+ }
437
+ ),
438
+ "content"
439
+ );
440
+ LayoutContent.displayName = "LayoutContent";
441
+ const LayoutPanel = markSlot(
442
+ React.forwardRef(
443
+ ({
444
+ as = "aside",
445
+ placement = "start",
446
+ width,
447
+ padding,
448
+ appearance = "default",
449
+ collapsed = false,
450
+ isScrollable = true,
451
+ tabIndex,
452
+ "aria-label": ariaLabel,
453
+ ...props
454
+ }, ref) => {
455
+ const Component = as;
456
+ return /* @__PURE__ */ jsx(
457
+ Component,
458
+ {
459
+ ref,
460
+ className: cn(
461
+ "layout-panel",
462
+ `layout-panel--${placement}`,
463
+ isScrollable && "layout-panel--scrollable",
464
+ appearance === "nav" && "layout-panel--nav"
465
+ ),
466
+ style: {
467
+ ...width != null ? { ["--layout-panel-width"]: panelWidthVar(width) } : void 0,
468
+ ...padding != null ? { ["--layout-panel-padding"]: tokenCss(padding) } : void 0
469
+ },
470
+ "data-collapsed": collapsed || void 0,
471
+ tabIndex: tabIndex ?? (isScrollable ? 0 : void 0),
472
+ "aria-label": ariaLabel ?? (placement === "end" ? "Details" : "Navigation"),
473
+ ...props
474
+ }
475
+ );
476
+ }
477
+ ),
478
+ "panel"
479
+ );
480
+ LayoutPanel.displayName = "LayoutPanel";
481
+ function collectSlots(children) {
482
+ const slots = {};
483
+ const leftovers = [];
484
+ let sawStartPanel = false;
485
+ React.Children.forEach(children, (child) => {
486
+ if (!React.isValidElement(child)) {
487
+ leftovers.push(child);
488
+ return;
489
+ }
490
+ const slot = slotIdOf(child);
491
+ if (slot === "header" && slots.header == null) {
492
+ slots.header = child;
493
+ return;
494
+ }
495
+ if (slot === "footer" && slots.footer == null) {
496
+ slots.footer = child;
497
+ return;
498
+ }
499
+ if (slot === "content" && slots.content == null) {
500
+ slots.content = child;
501
+ return;
502
+ }
503
+ if (slot === "panel") {
504
+ const placement = child.props.placement ?? (sawStartPanel ? "end" : "start");
505
+ if (placement === "end" && slots.end == null) {
506
+ slots.end = child;
507
+ return;
508
+ }
509
+ if (slots.start == null) {
510
+ slots.start = child;
511
+ sawStartPanel = true;
512
+ return;
513
+ }
514
+ if (slots.end == null) {
515
+ slots.end = child;
516
+ return;
517
+ }
518
+ }
519
+ leftovers.push(child);
520
+ });
521
+ if (leftovers.length > 0) {
522
+ if (process.env.NODE_ENV !== "production") {
523
+ console.warn(
524
+ "Layout: child was not LayoutHeader, LayoutFooter, LayoutContent, or LayoutPanel.",
525
+ leftovers
526
+ );
527
+ }
528
+ if (slots.content == null) {
529
+ slots.content = leftovers.length === 1 ? leftovers[0] : leftovers;
530
+ }
531
+ }
532
+ return slots;
533
+ }
534
+ const Layout = React.forwardRef(
535
+ ({ children, height = "fill", contentWidth, padding = "2xl", ...props }, ref) => {
536
+ const slots = collectSlots(children);
537
+ return /* @__PURE__ */ jsxs(
538
+ "div",
539
+ {
540
+ ref,
541
+ className: cn(
542
+ "layout",
543
+ height === "fill" ? "layout--fill" : "layout--auto"
544
+ ),
545
+ style: {
546
+ ["--layout-padding"]: gapCss(padding),
547
+ ...contentWidth != null ? {
548
+ ["--layout-content-max-width"]: measureVar(contentWidth)
549
+ } : void 0
550
+ },
551
+ ...props,
552
+ children: [
553
+ slots.header,
554
+ slots.start,
555
+ slots.content != null && (React.isValidElement(slots.content) && slotIdOf(slots.content) === "content" ? slots.content : /* @__PURE__ */ jsx(LayoutContent, { children: slots.content })),
556
+ slots.end,
557
+ slots.footer
558
+ ]
559
+ }
560
+ );
561
+ }
562
+ );
563
+ Layout.displayName = "Layout";
564
+ const Container = React.forwardRef(
565
+ ({
566
+ as: Component = "div",
567
+ size = "xl",
568
+ center = true,
569
+ padded = true,
570
+ className,
571
+ ...props
572
+ }, ref) => /* @__PURE__ */ jsx(
573
+ Component,
574
+ {
575
+ ref,
576
+ className: cn(
577
+ "container-layout",
578
+ `container-layout--${size}`,
579
+ center && "container-layout--center",
580
+ padded && "container-layout--padded",
581
+ className
582
+ ),
583
+ ...props
584
+ }
585
+ )
586
+ );
587
+ Container.displayName = "Container";
588
+ const Show = React.forwardRef(
589
+ ({ above, below, as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
590
+ Component,
591
+ {
592
+ ref,
593
+ className: cn(
594
+ above && `show-above-${above}`,
595
+ below && `show-below-${below}`,
596
+ className
597
+ ),
598
+ ...props
599
+ }
600
+ )
601
+ );
602
+ Show.displayName = "Show";
603
+ const Hide = React.forwardRef(
604
+ ({ above, below, as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
605
+ Component,
606
+ {
607
+ ref,
608
+ className: cn(
609
+ above && `hide-above-${above}`,
610
+ below && `hide-below-${below}`,
611
+ className
612
+ ),
613
+ ...props
614
+ }
615
+ )
616
+ );
617
+ Hide.displayName = "Hide";
618
+ const Positioned = React.forwardRef(
619
+ ({
620
+ as: Component = "div",
621
+ position = "relative",
622
+ top,
623
+ right,
624
+ bottom,
625
+ left,
626
+ inset,
627
+ zIndex,
628
+ fill = false,
629
+ className,
630
+ style,
631
+ ...props
632
+ }, ref) => {
633
+ const resolveValue = (v) => v === void 0 ? void 0 : typeof v === "number" ? spacing(v) : v;
634
+ return /* @__PURE__ */ jsx(
635
+ Component,
636
+ {
637
+ ref,
638
+ className: cn(`positioned--${position}`, className),
639
+ style: {
640
+ top: resolveValue(top),
641
+ right: resolveValue(right),
642
+ bottom: resolveValue(bottom),
643
+ left: resolveValue(left),
644
+ inset: fill ? 0 : resolveValue(inset),
645
+ zIndex,
646
+ ...style
647
+ },
648
+ ...props
649
+ }
650
+ );
651
+ }
652
+ );
653
+ Positioned.displayName = "Positioned";
654
+ function spacerTokenCss(space, size) {
655
+ if (typeof space === "string") return tokenCss(space);
656
+ if (typeof space === "number") {
657
+ const named = PX_TO_SPACE[space];
658
+ return named ? tokenCss(named) : `${space}px`;
659
+ }
660
+ if (size != null) {
661
+ const px = size * 4;
662
+ const named = PX_TO_SPACE[px];
663
+ return named ? tokenCss(named) : spacing(size);
664
+ }
665
+ return tokenCss("md");
666
+ }
667
+ const Spacer = ({
668
+ space,
669
+ size,
670
+ axis = "vertical",
671
+ flex = false,
672
+ className,
673
+ style,
674
+ ...props
675
+ }) => {
676
+ const token = spacerTokenCss(space, size);
677
+ return /* @__PURE__ */ jsx(
678
+ "div",
679
+ {
680
+ "aria-hidden": "true",
681
+ className: cn(
682
+ "spacer",
683
+ flex ? "spacer--flex" : axis === "horizontal" ? "spacer--horizontal" : "spacer--vertical",
684
+ className
685
+ ),
686
+ style: {
687
+ ...flex ? void 0 : axis === "vertical" ? { height: token, minHeight: token } : { width: token, minWidth: token },
688
+ ...style
689
+ },
690
+ ...props
691
+ }
692
+ );
693
+ };
694
+ Spacer.displayName = "Spacer";
695
+ export {
696
+ Layout as AppShell,
697
+ LayoutFooter as AppShellFooter,
698
+ LayoutHeader as AppShellHeader,
699
+ LayoutContent as AppShellMain,
700
+ LayoutPanel as AppShellSidebar,
701
+ Center,
702
+ Columns,
703
+ Container,
704
+ FormLayout,
705
+ Grid,
706
+ GridSpan,
707
+ HStack,
708
+ Hide,
709
+ Layout,
710
+ LayoutContent,
711
+ LayoutFooter,
712
+ LayoutHeader,
713
+ LayoutPanel,
714
+ Positioned,
715
+ SPACER_SPACES,
716
+ SPACE_NAMES,
717
+ SPACE_SCALE,
718
+ Section,
719
+ Show,
720
+ Spacer,
721
+ Stack,
722
+ StackItem,
723
+ VStack
724
+ };