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

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 +363 -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,580 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { PanelLeft } from "lucide-react";
6
+ import { useIsMobile } from "../../hooks/use-mobile.js";
7
+ import { cn } from "../../lib/utils.js";
8
+ import { Button } from "./button.js";
9
+ import { Input } from "./input.js";
10
+ import { Separator } from "./separator.js";
11
+ import { Sheet, SheetContent } from "./sheet.js";
12
+ import { Skeleton } from "./skeleton.js";
13
+ import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "./tooltip.js";
14
+ const SIDEBAR_COOKIE_NAME = "sidebar:state";
15
+ const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
16
+ const SIDEBAR_WIDTH = "16rem";
17
+ const SIDEBAR_WIDTH_MOBILE = "18rem";
18
+ const SIDEBAR_WIDTH_ICON = "3rem";
19
+ const SIDEBAR_KEYBOARD_SHORTCUT = "b";
20
+ const SidebarContext = React.createContext(null);
21
+ function useSidebar() {
22
+ const context = React.useContext(SidebarContext);
23
+ if (!context) {
24
+ throw new Error("useSidebar must be used within a SidebarProvider.");
25
+ }
26
+ return context;
27
+ }
28
+ const SidebarProvider = React.forwardRef(
29
+ ({
30
+ defaultOpen = true,
31
+ open: openProp,
32
+ onOpenChange: setOpenProp,
33
+ className,
34
+ style,
35
+ children,
36
+ ...props
37
+ }, ref) => {
38
+ const isMobile = useIsMobile();
39
+ const [openMobile, setOpenMobile] = React.useState(false);
40
+ const [_open, _setOpen] = React.useState(defaultOpen);
41
+ const open = openProp ?? _open;
42
+ const setOpen = React.useCallback(
43
+ (value) => {
44
+ const openState = typeof value === "function" ? value(open) : value;
45
+ if (setOpenProp) {
46
+ setOpenProp(openState);
47
+ } else {
48
+ _setOpen(openState);
49
+ }
50
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
51
+ },
52
+ [setOpenProp, open]
53
+ );
54
+ const toggleSidebar = React.useCallback(() => {
55
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
56
+ }, [isMobile, setOpen, setOpenMobile]);
57
+ React.useEffect(() => {
58
+ const handleKeyDown = (event) => {
59
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
60
+ event.preventDefault();
61
+ toggleSidebar();
62
+ }
63
+ };
64
+ window.addEventListener("keydown", handleKeyDown);
65
+ return () => window.removeEventListener("keydown", handleKeyDown);
66
+ }, [toggleSidebar]);
67
+ const state = open ? "expanded" : "collapsed";
68
+ const contextValue = React.useMemo(
69
+ () => ({
70
+ state,
71
+ open,
72
+ setOpen,
73
+ isMobile,
74
+ openMobile,
75
+ setOpenMobile,
76
+ toggleSidebar
77
+ }),
78
+ [
79
+ state,
80
+ open,
81
+ setOpen,
82
+ isMobile,
83
+ openMobile,
84
+ setOpenMobile,
85
+ toggleSidebar
86
+ ]
87
+ );
88
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
89
+ "div",
90
+ {
91
+ style: {
92
+ "--sidebar-width": SIDEBAR_WIDTH,
93
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
94
+ ...style
95
+ },
96
+ className: cn(
97
+ "sidebar-wrapper",
98
+ className
99
+ ),
100
+ ref,
101
+ ...props,
102
+ children
103
+ }
104
+ ) }) });
105
+ }
106
+ );
107
+ SidebarProvider.displayName = "SidebarProvider";
108
+ const Sidebar = React.forwardRef(
109
+ ({
110
+ side = "left",
111
+ variant = "sidebar",
112
+ collapsible = "offcanvas",
113
+ className,
114
+ children,
115
+ ...props
116
+ }, ref) => {
117
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
118
+ if (collapsible === "none") {
119
+ return /* @__PURE__ */ jsx(
120
+ "div",
121
+ {
122
+ className: cn(
123
+ "sidebar",
124
+ className
125
+ ),
126
+ ref,
127
+ ...props,
128
+ children
129
+ }
130
+ );
131
+ }
132
+ if (isMobile) {
133
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx(
134
+ SheetContent,
135
+ {
136
+ "data-sidebar": "sidebar",
137
+ "data-mobile": "true",
138
+ className: "sidebar",
139
+ style: {
140
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
141
+ },
142
+ side,
143
+ children: /* @__PURE__ */ jsx("div", { className: "sidebar-mobile-content", children })
144
+ }
145
+ ) });
146
+ }
147
+ return /* @__PURE__ */ jsxs(
148
+ "div",
149
+ {
150
+ ref,
151
+ className: "sidebar-base peer",
152
+ "data-state": state,
153
+ "data-collapsible": state === "collapsed" ? collapsible : "",
154
+ "data-variant": variant,
155
+ "data-side": side,
156
+ children: [
157
+ /* @__PURE__ */ jsx("div", { className: "sidebar-base" }),
158
+ /* @__PURE__ */ jsx(
159
+ "div",
160
+ {
161
+ className: cn(
162
+ "sidebar-container",
163
+ className
164
+ ),
165
+ "data-side": side,
166
+ "data-collapsible": state === "collapsed" ? collapsible : "",
167
+ "data-variant": variant,
168
+ ...props,
169
+ children: /* @__PURE__ */ jsx(
170
+ "div",
171
+ {
172
+ "data-sidebar": "sidebar",
173
+ className: "sidebar-inner",
174
+ "data-variant": variant,
175
+ children
176
+ }
177
+ )
178
+ }
179
+ )
180
+ ]
181
+ }
182
+ );
183
+ }
184
+ );
185
+ Sidebar.displayName = "Sidebar";
186
+ const SidebarTrigger = React.forwardRef(({ className, onClick, ...props }, ref) => {
187
+ const { toggleSidebar } = useSidebar();
188
+ return /* @__PURE__ */ jsxs(
189
+ Button,
190
+ {
191
+ ref,
192
+ "data-sidebar": "trigger",
193
+ variant: "general-tertiary",
194
+ size: "icon",
195
+ className: cn("sidebar-trigger", className),
196
+ onClick: (event) => {
197
+ onClick == null ? void 0 : onClick(event);
198
+ toggleSidebar();
199
+ },
200
+ ...props,
201
+ children: [
202
+ /* @__PURE__ */ jsx(PanelLeft, {}),
203
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
204
+ ]
205
+ }
206
+ );
207
+ });
208
+ SidebarTrigger.displayName = "SidebarTrigger";
209
+ const SidebarRail = React.forwardRef(({ className, side, state, collapsible, ...props }, ref) => {
210
+ const { toggleSidebar } = useSidebar();
211
+ return /* @__PURE__ */ jsx(
212
+ "button",
213
+ {
214
+ ref,
215
+ "data-sidebar": "rail",
216
+ "aria-label": "Toggle Sidebar",
217
+ tabIndex: -1,
218
+ onClick: toggleSidebar,
219
+ title: "Toggle Sidebar",
220
+ className: cn(
221
+ "sidebar-rail",
222
+ className
223
+ ),
224
+ "data-side": side,
225
+ "data-state": state,
226
+ "data-collapsible": collapsible,
227
+ ...props
228
+ }
229
+ );
230
+ });
231
+ SidebarRail.displayName = "SidebarRail";
232
+ const SidebarInset = React.forwardRef(({ className, state, variant, ...props }, ref) => {
233
+ return /* @__PURE__ */ jsx(
234
+ "main",
235
+ {
236
+ ref,
237
+ className: cn(
238
+ "sidebar-inset",
239
+ className
240
+ ),
241
+ "data-variant": variant,
242
+ "data-state": state,
243
+ ...props
244
+ }
245
+ );
246
+ });
247
+ SidebarInset.displayName = "SidebarInset";
248
+ const SidebarInput = React.forwardRef(({ className, ...props }, ref) => {
249
+ return /* @__PURE__ */ jsx(
250
+ Input,
251
+ {
252
+ ref,
253
+ "data-sidebar": "input",
254
+ className: cn(
255
+ "sidebar-input",
256
+ className
257
+ ),
258
+ ...props
259
+ }
260
+ );
261
+ });
262
+ SidebarInput.displayName = "SidebarInput";
263
+ const SidebarHeader = React.forwardRef(({ className, ...props }, ref) => {
264
+ return /* @__PURE__ */ jsx(
265
+ "div",
266
+ {
267
+ ref,
268
+ "data-sidebar": "header",
269
+ className: cn("sidebar-header", className),
270
+ ...props
271
+ }
272
+ );
273
+ });
274
+ SidebarHeader.displayName = "SidebarHeader";
275
+ const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => {
276
+ return /* @__PURE__ */ jsx(
277
+ "div",
278
+ {
279
+ ref,
280
+ "data-sidebar": "footer",
281
+ className: cn("sidebar-footer", className),
282
+ ...props
283
+ }
284
+ );
285
+ });
286
+ SidebarFooter.displayName = "SidebarFooter";
287
+ const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => {
288
+ return /* @__PURE__ */ jsx(
289
+ Separator,
290
+ {
291
+ ref,
292
+ "data-sidebar": "separator",
293
+ className: cn("sidebar-separator", className),
294
+ ...props
295
+ }
296
+ );
297
+ });
298
+ SidebarSeparator.displayName = "SidebarSeparator";
299
+ const SidebarContent = React.forwardRef(({ className, ...props }, ref) => {
300
+ return /* @__PURE__ */ jsx(
301
+ "div",
302
+ {
303
+ ref,
304
+ "data-sidebar": "content",
305
+ className: cn(
306
+ "sidebar-content",
307
+ className
308
+ ),
309
+ ...props
310
+ }
311
+ );
312
+ });
313
+ SidebarContent.displayName = "SidebarContent";
314
+ const SidebarGroup = React.forwardRef(({ className, ...props }, ref) => {
315
+ return /* @__PURE__ */ jsx(
316
+ "div",
317
+ {
318
+ ref,
319
+ "data-sidebar": "group",
320
+ className: cn("sidebar-group", className),
321
+ ...props
322
+ }
323
+ );
324
+ });
325
+ SidebarGroup.displayName = "SidebarGroup";
326
+ const SidebarGroupLabel = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
327
+ const Comp = asChild ? Slot : "div";
328
+ return /* @__PURE__ */ jsx(
329
+ Comp,
330
+ {
331
+ ref,
332
+ "data-sidebar": "group-label",
333
+ className: cn(
334
+ "sidebar-group-label",
335
+ className
336
+ ),
337
+ ...props
338
+ }
339
+ );
340
+ });
341
+ SidebarGroupLabel.displayName = "SidebarGroupLabel";
342
+ const SidebarGroupAction = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
343
+ const Comp = asChild ? Slot : "button";
344
+ return /* @__PURE__ */ jsx(
345
+ Comp,
346
+ {
347
+ ref,
348
+ "data-sidebar": "group-action",
349
+ className: cn(
350
+ "sidebar-group-action",
351
+ className
352
+ ),
353
+ ...props
354
+ }
355
+ );
356
+ });
357
+ SidebarGroupAction.displayName = "SidebarGroupAction";
358
+ const SidebarGroupContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
359
+ "div",
360
+ {
361
+ ref,
362
+ "data-sidebar": "group-content",
363
+ className: cn("sidebar-group-content", className),
364
+ ...props
365
+ }
366
+ ));
367
+ SidebarGroupContent.displayName = "SidebarGroupContent";
368
+ const SidebarMenu = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
369
+ "ul",
370
+ {
371
+ ref,
372
+ "data-sidebar": "menu",
373
+ className: cn("sidebar-menu", className),
374
+ ...props
375
+ }
376
+ ));
377
+ SidebarMenu.displayName = "SidebarMenu";
378
+ const SidebarMenuItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
379
+ "li",
380
+ {
381
+ ref,
382
+ "data-sidebar": "menu-item",
383
+ className: cn("sidebar-menu-item", className),
384
+ ...props
385
+ }
386
+ ));
387
+ SidebarMenuItem.displayName = "SidebarMenuItem";
388
+ const sidebarMenuButtonVariants = cva(
389
+ "sidebar-menu-button",
390
+ {
391
+ variants: {
392
+ variant: {
393
+ default: "sidebar-menu-button--default",
394
+ outline: "sidebar-menu-button--outline"
395
+ },
396
+ size: {
397
+ default: "sidebar-menu-button--size-default",
398
+ sm: "sidebar-menu-button--size-sm",
399
+ lg: "sidebar-menu-button--size-lg"
400
+ }
401
+ },
402
+ defaultVariants: {
403
+ variant: "default",
404
+ size: "default"
405
+ }
406
+ }
407
+ );
408
+ const SidebarMenuButton = React.forwardRef(
409
+ ({
410
+ asChild = false,
411
+ isActive = false,
412
+ variant = "default",
413
+ size = "default",
414
+ tooltip,
415
+ className,
416
+ ...props
417
+ }, ref) => {
418
+ const Comp = asChild ? Slot : "button";
419
+ const { isMobile, state } = useSidebar();
420
+ const button = /* @__PURE__ */ jsx(
421
+ Comp,
422
+ {
423
+ ref,
424
+ "data-sidebar": "menu-button",
425
+ "data-size": size,
426
+ "data-active": isActive,
427
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
428
+ ...props
429
+ }
430
+ );
431
+ if (!tooltip) {
432
+ return button;
433
+ }
434
+ if (typeof tooltip === "string") {
435
+ tooltip = {
436
+ children: tooltip
437
+ };
438
+ }
439
+ return /* @__PURE__ */ jsxs(Tooltip, { trigger: "hover", children: [
440
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
441
+ /* @__PURE__ */ jsx(
442
+ TooltipContent,
443
+ {
444
+ direction: "left",
445
+ hidden: state !== "collapsed" || isMobile,
446
+ ...tooltip
447
+ }
448
+ )
449
+ ] });
450
+ }
451
+ );
452
+ SidebarMenuButton.displayName = "SidebarMenuButton";
453
+ const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
454
+ const Comp = asChild ? Slot : "button";
455
+ const { state } = useSidebar();
456
+ return /* @__PURE__ */ jsx(
457
+ Comp,
458
+ {
459
+ ref,
460
+ "data-sidebar": "menu-action",
461
+ className: cn(
462
+ "sidebar-menu-action",
463
+ showOnHover && "sidebar-menu-action--show-on-hover",
464
+ className
465
+ ),
466
+ "data-show-on-hover": showOnHover,
467
+ ...props
468
+ }
469
+ );
470
+ });
471
+ SidebarMenuAction.displayName = "SidebarMenuAction";
472
+ const SidebarMenuBadge = React.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
473
+ "div",
474
+ {
475
+ ref,
476
+ "data-sidebar": "menu-badge",
477
+ className: cn(
478
+ "sidebar-menu-badge",
479
+ className
480
+ ),
481
+ "data-size": size,
482
+ ...props
483
+ }
484
+ ));
485
+ SidebarMenuBadge.displayName = "SidebarMenuBadge";
486
+ const SidebarMenuSkeleton = React.forwardRef(({ className, showIcon = false, ...props }, ref) => {
487
+ const width = React.useMemo(() => {
488
+ return `${Math.floor(Math.random() * 40) + 50}%`;
489
+ }, []);
490
+ return /* @__PURE__ */ jsxs(
491
+ "div",
492
+ {
493
+ ref,
494
+ "data-sidebar": "menu-skeleton",
495
+ className: cn("sidebar-menu-skeleton", className),
496
+ ...props,
497
+ children: [
498
+ showIcon && /* @__PURE__ */ jsx(
499
+ Skeleton,
500
+ {
501
+ className: "sidebar-menu-skeleton-icon",
502
+ "data-sidebar": "menu-skeleton-icon"
503
+ }
504
+ ),
505
+ /* @__PURE__ */ jsx(
506
+ Skeleton,
507
+ {
508
+ className: "sidebar-menu-skeleton-text",
509
+ "data-sidebar": "menu-skeleton-text",
510
+ style: {
511
+ "--skeleton-width": width
512
+ }
513
+ }
514
+ )
515
+ ]
516
+ }
517
+ );
518
+ });
519
+ SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
520
+ const SidebarMenuSub = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
521
+ "ul",
522
+ {
523
+ ref,
524
+ "data-sidebar": "menu-sub",
525
+ className: cn(
526
+ "sidebar-menu-sub",
527
+ className
528
+ ),
529
+ ...props
530
+ }
531
+ ));
532
+ SidebarMenuSub.displayName = "SidebarMenuSub";
533
+ const SidebarMenuSubItem = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
534
+ SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
535
+ const SidebarMenuSubButton = React.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
536
+ const Comp = asChild ? Slot : "a";
537
+ return /* @__PURE__ */ jsx(
538
+ Comp,
539
+ {
540
+ ref,
541
+ "data-sidebar": "menu-sub-button",
542
+ "data-size": size,
543
+ "data-active": isActive,
544
+ className: cn(
545
+ "sidebar-menu-sub-button",
546
+ size === "sm" && "sidebar-menu-sub-button--size-sm",
547
+ size === "md" && "sidebar-menu-sub-button--size-md",
548
+ className
549
+ ),
550
+ ...props
551
+ }
552
+ );
553
+ });
554
+ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
555
+ export {
556
+ Sidebar,
557
+ SidebarContent,
558
+ SidebarFooter,
559
+ SidebarGroup,
560
+ SidebarGroupAction,
561
+ SidebarGroupContent,
562
+ SidebarGroupLabel,
563
+ SidebarHeader,
564
+ SidebarInput,
565
+ SidebarInset,
566
+ SidebarMenu,
567
+ SidebarMenuAction,
568
+ SidebarMenuBadge,
569
+ SidebarMenuButton,
570
+ SidebarMenuItem,
571
+ SidebarMenuSkeleton,
572
+ SidebarMenuSub,
573
+ SidebarMenuSubButton,
574
+ SidebarMenuSubItem,
575
+ SidebarProvider,
576
+ SidebarRail,
577
+ SidebarSeparator,
578
+ SidebarTrigger,
579
+ useSidebar
580
+ };
@@ -0,0 +1,107 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../../lib/utils.js";
4
+ import { IconUtilityPreview, IconUtilityHidden, IconUtilityQuestion } from "../icons/IconUtility.js";
5
+ const SignInFieldV01 = React.forwardRef(
6
+ ({
7
+ className,
8
+ containerClassName,
9
+ type = "email",
10
+ state,
11
+ hide,
12
+ onHideChange,
13
+ onHelp,
14
+ placeholder,
15
+ value,
16
+ defaultValue,
17
+ onFocus,
18
+ onBlur,
19
+ onChange,
20
+ disabled,
21
+ ...props
22
+ }, ref) => {
23
+ const isPassword = type === "password";
24
+ const [focused, setFocused] = React.useState(false);
25
+ const [internalValue, setInternalValue] = React.useState(
26
+ defaultValue != null ? String(defaultValue) : ""
27
+ );
28
+ const [internalHide, setInternalHide] = React.useState(true);
29
+ const currentValue = value != null ? String(value) : internalValue;
30
+ const hasValue = currentValue.length > 0;
31
+ const masked = hide !== void 0 ? hide : internalHide;
32
+ const pinned = state === "error" && !isPassword ? void 0 : state;
33
+ const resolved = pinned ?? (focused ? hasValue ? "active" : "focus" : hasValue ? "filled" : "default");
34
+ const isError = resolved === "error";
35
+ const showCaret = pinned != null && (resolved === "focus" || resolved === "active");
36
+ const toggleHide = () => {
37
+ if (hide === void 0) setInternalHide(!masked);
38
+ onHideChange == null ? void 0 : onHideChange(!masked);
39
+ };
40
+ return /* @__PURE__ */ jsx(
41
+ "div",
42
+ {
43
+ "data-type": type,
44
+ "data-state": resolved,
45
+ "data-caret": showCaret ? hasValue ? "trailing" : "leading" : void 0,
46
+ className: cn("sign-in-field-v01 font-mazzardSoft", containerClassName),
47
+ children: /* @__PURE__ */ jsxs("div", { className: "sign-in-field-v01-field", children: [
48
+ showCaret && !hasValue ? /* @__PURE__ */ jsx("span", { className: "sign-in-field-v01-caret", "aria-hidden": true }) : null,
49
+ /* @__PURE__ */ jsx(
50
+ "input",
51
+ {
52
+ ref,
53
+ type: isPassword && masked && !isError ? "password" : isPassword ? "text" : "email",
54
+ className: cn("sign-in-field-v01-input", className),
55
+ placeholder: placeholder ?? (isPassword ? "Enter your password" : "Enter your email"),
56
+ disabled,
57
+ value: value != null ? value : internalValue,
58
+ onFocus: (event) => {
59
+ setFocused(true);
60
+ onFocus == null ? void 0 : onFocus(event);
61
+ },
62
+ onBlur: (event) => {
63
+ setFocused(false);
64
+ onBlur == null ? void 0 : onBlur(event);
65
+ },
66
+ onChange: (event) => {
67
+ if (value == null) setInternalValue(event.target.value);
68
+ onChange == null ? void 0 : onChange(event);
69
+ },
70
+ ...props
71
+ }
72
+ ),
73
+ showCaret && hasValue ? /* @__PURE__ */ jsx("span", { className: "sign-in-field-v01-caret", "aria-hidden": true }) : null,
74
+ isPassword ? /* @__PURE__ */ jsxs("span", { className: "sign-in-field-v01-actions", children: [
75
+ hasValue && !isError ? /* @__PURE__ */ jsx(
76
+ "button",
77
+ {
78
+ type: "button",
79
+ className: "sign-in-field-v01-action",
80
+ onClick: toggleHide,
81
+ disabled,
82
+ "aria-label": masked ? "Show password" : "Hide password",
83
+ "aria-pressed": !masked,
84
+ children: masked ? /* @__PURE__ */ jsx(IconUtilityPreview, {}) : /* @__PURE__ */ jsx(IconUtilityHidden, {})
85
+ }
86
+ ) : null,
87
+ /* @__PURE__ */ jsx(
88
+ "button",
89
+ {
90
+ type: "button",
91
+ className: "sign-in-field-v01-action",
92
+ onClick: onHelp,
93
+ disabled,
94
+ "aria-label": "Password help",
95
+ children: /* @__PURE__ */ jsx(IconUtilityQuestion, {})
96
+ }
97
+ )
98
+ ] }) : null
99
+ ] })
100
+ }
101
+ );
102
+ }
103
+ );
104
+ SignInFieldV01.displayName = "SignInFieldV01";
105
+ export {
106
+ SignInFieldV01
107
+ };
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/utils.js";
3
+ function Skeleton({
4
+ className,
5
+ ...props
6
+ }) {
7
+ return /* @__PURE__ */ jsx(
8
+ "div",
9
+ {
10
+ className: cn("skeleton", className),
11
+ ...props
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ Skeleton
17
+ };