@accelint/design-toolkit 5.0.0 → 5.1.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 (94) hide show
  1. package/dist/components/accordion/index.js +2 -0
  2. package/dist/components/action-bar/index.js +2 -0
  3. package/dist/components/action-bar/styles.d.ts +1 -1
  4. package/dist/components/action-bar/styles.js +1 -1
  5. package/dist/components/action-bar/styles.js.map +1 -1
  6. package/dist/components/avatar/index.js +2 -0
  7. package/dist/components/badge/index.js +2 -0
  8. package/dist/components/button/index.js +2 -0
  9. package/dist/components/checkbox/index.js +2 -0
  10. package/dist/components/chip/index.js +2 -0
  11. package/dist/components/classification-badge/index.js +3 -1
  12. package/dist/components/classification-badge/index.js.map +1 -1
  13. package/dist/components/classification-badge/styles.d.ts +1 -1
  14. package/dist/components/classification-badge/styles.js +1 -1
  15. package/dist/components/classification-badge/styles.js.map +1 -1
  16. package/dist/components/classification-banner/index.js +3 -1
  17. package/dist/components/classification-banner/index.js.map +1 -1
  18. package/dist/components/classification-banner/styles.d.ts +1 -1
  19. package/dist/components/classification-banner/styles.js +1 -1
  20. package/dist/components/classification-banner/styles.js.map +1 -1
  21. package/dist/components/color-picker/index.js +2 -0
  22. package/dist/components/combobox-field/index.js +2 -0
  23. package/dist/components/combobox-field/styles.d.ts +1 -1
  24. package/dist/components/combobox-field/styles.js +1 -1
  25. package/dist/components/combobox-field/styles.js.map +1 -1
  26. package/dist/components/date-field/index.js +2 -0
  27. package/dist/components/date-field/index.js.map +1 -1
  28. package/dist/components/date-field/styles.d.ts +1 -1
  29. package/dist/components/date-field/styles.js +1 -1
  30. package/dist/components/date-field/styles.js.map +1 -1
  31. package/dist/components/details-list/index.js +2 -0
  32. package/dist/components/dialog/index.js +2 -0
  33. package/dist/components/dialog/styles.d.ts +1 -1
  34. package/dist/components/dialog/styles.js +1 -1
  35. package/dist/components/dialog/styles.js.map +1 -1
  36. package/dist/components/drawer/index.js +2 -0
  37. package/dist/components/drawer/styles.d.ts +3 -3
  38. package/dist/components/drawer/styles.js +1 -1
  39. package/dist/components/drawer/styles.js.map +1 -1
  40. package/dist/components/hero/index.js +2 -0
  41. package/dist/components/hotkey/index.js +2 -0
  42. package/dist/components/icon/index.js +3 -1
  43. package/dist/components/icon/index.js.map +1 -1
  44. package/dist/components/input/index.js +2 -0
  45. package/dist/components/label/index.js +2 -0
  46. package/dist/components/link/index.js +2 -0
  47. package/dist/components/link/styles.d.ts +1 -1
  48. package/dist/components/link/styles.js +1 -1
  49. package/dist/components/link/styles.js.map +1 -1
  50. package/dist/components/menu/index.js +2 -0
  51. package/dist/components/options/index.js +2 -0
  52. package/dist/components/options/styles.d.ts +1 -1
  53. package/dist/components/options/styles.js +1 -1
  54. package/dist/components/options/styles.js.map +1 -1
  55. package/dist/components/popover/index.js +2 -0
  56. package/dist/components/popover/index.js.map +1 -1
  57. package/dist/components/query-builder/action-element.js +2 -0
  58. package/dist/components/query-builder/group.js +2 -0
  59. package/dist/components/query-builder/rule.js +2 -0
  60. package/dist/components/query-builder/value-editor.js +2 -0
  61. package/dist/components/radio/index.js +2 -0
  62. package/dist/components/search-field/index.js +2 -0
  63. package/dist/components/select-field/index.js +2 -0
  64. package/dist/components/sidenav/index.d.ts +16 -3
  65. package/dist/components/sidenav/index.js +3 -1
  66. package/dist/components/sidenav/index.js.map +1 -1
  67. package/dist/components/sidenav/styles.d.ts +43 -1
  68. package/dist/components/sidenav/styles.js +1 -1
  69. package/dist/components/sidenav/styles.js.map +1 -1
  70. package/dist/components/sidenav/types.d.ts +40 -8
  71. package/dist/components/slider/index.js +2 -0
  72. package/dist/components/slider/styles.d.ts +1 -1
  73. package/dist/components/slider/styles.js +1 -1
  74. package/dist/components/slider/styles.js.map +1 -1
  75. package/dist/components/switch/index.js +2 -0
  76. package/dist/components/tabs/index.js +2 -0
  77. package/dist/components/tabs/styles.d.ts +1 -1
  78. package/dist/components/tabs/styles.js +1 -1
  79. package/dist/components/tabs/styles.js.map +1 -1
  80. package/dist/components/text-area-field/index.js +2 -0
  81. package/dist/components/text-field/index.js +2 -0
  82. package/dist/components/tooltip/index.js +3 -1
  83. package/dist/components/tooltip/index.js.map +1 -1
  84. package/dist/components/tree/index.js +3 -1
  85. package/dist/components/tree/index.js.map +1 -1
  86. package/dist/components/view-stack/index.js +2 -0
  87. package/dist/hooks/use-tree/actions/cache.js +1 -1
  88. package/dist/hooks/use-tree/actions/cache.js.map +1 -1
  89. package/dist/hooks/use-tree/actions/index.js +2 -0
  90. package/dist/index.d.ts +1 -1
  91. package/dist/metafile-esm.json +1 -1
  92. package/dist/providers/theme-provider.js +2 -0
  93. package/dist/styles.css +43 -2
  94. package/package.json +4 -3
@@ -8,6 +8,7 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
8
8
  text?: tailwind_merge.ClassNameValue;
9
9
  link?: tailwind_merge.ClassNameValue;
10
10
  heading?: tailwind_merge.ClassNameValue;
11
+ menu?: tailwind_merge.ClassNameValue;
11
12
  tooltip?: tailwind_merge.ClassNameValue;
12
13
  header?: tailwind_merge.ClassNameValue;
13
14
  toggle?: tailwind_merge.ClassNameValue;
@@ -18,7 +19,13 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
18
19
  avatarText?: tailwind_merge.ClassNameValue;
19
20
  divider?: tailwind_merge.ClassNameValue;
20
21
  transient?: tailwind_merge.ClassNameValue;
22
+ menuHeading?: tailwind_merge.ClassNameValue;
23
+ panelHeading?: tailwind_merge.ClassNameValue;
24
+ panelContent?: tailwind_merge.ClassNameValue;
21
25
  sidenav?: tailwind_merge.ClassNameValue;
26
+ menuButton?: tailwind_merge.ClassNameValue;
27
+ menuPanel?: tailwind_merge.ClassNameValue;
28
+ menuItem?: tailwind_merge.ClassNameValue;
22
29
  };
23
30
  };
24
31
  } | {
@@ -28,6 +35,7 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
28
35
  text?: tailwind_merge.ClassNameValue;
29
36
  link?: tailwind_merge.ClassNameValue;
30
37
  heading?: tailwind_merge.ClassNameValue;
38
+ menu?: tailwind_merge.ClassNameValue;
31
39
  tooltip?: tailwind_merge.ClassNameValue;
32
40
  header?: tailwind_merge.ClassNameValue;
33
41
  toggle?: tailwind_merge.ClassNameValue;
@@ -38,7 +46,13 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
38
46
  avatarText?: tailwind_merge.ClassNameValue;
39
47
  divider?: tailwind_merge.ClassNameValue;
40
48
  transient?: tailwind_merge.ClassNameValue;
49
+ menuHeading?: tailwind_merge.ClassNameValue;
50
+ panelHeading?: tailwind_merge.ClassNameValue;
51
+ panelContent?: tailwind_merge.ClassNameValue;
41
52
  sidenav?: tailwind_merge.ClassNameValue;
53
+ menuButton?: tailwind_merge.ClassNameValue;
54
+ menuPanel?: tailwind_merge.ClassNameValue;
55
+ menuItem?: tailwind_merge.ClassNameValue;
42
56
  };
43
57
  };
44
58
  } | {}, {
@@ -57,6 +71,13 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
57
71
  transient: string;
58
72
  link: string[];
59
73
  tooltip: string[];
74
+ menu: string;
75
+ menuButton: string[];
76
+ menuHeading: string;
77
+ menuPanel: string[];
78
+ menuItem: string[];
79
+ panelHeading: string;
80
+ panelContent: string;
60
81
  }, undefined, {
61
82
  [key: string]: {
62
83
  [key: string]: tailwind_merge.ClassNameValue | {
@@ -64,6 +85,7 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
64
85
  text?: tailwind_merge.ClassNameValue;
65
86
  link?: tailwind_merge.ClassNameValue;
66
87
  heading?: tailwind_merge.ClassNameValue;
88
+ menu?: tailwind_merge.ClassNameValue;
67
89
  tooltip?: tailwind_merge.ClassNameValue;
68
90
  header?: tailwind_merge.ClassNameValue;
69
91
  toggle?: tailwind_merge.ClassNameValue;
@@ -74,7 +96,13 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
74
96
  avatarText?: tailwind_merge.ClassNameValue;
75
97
  divider?: tailwind_merge.ClassNameValue;
76
98
  transient?: tailwind_merge.ClassNameValue;
99
+ menuHeading?: tailwind_merge.ClassNameValue;
100
+ panelHeading?: tailwind_merge.ClassNameValue;
101
+ panelContent?: tailwind_merge.ClassNameValue;
77
102
  sidenav?: tailwind_merge.ClassNameValue;
103
+ menuButton?: tailwind_merge.ClassNameValue;
104
+ menuPanel?: tailwind_merge.ClassNameValue;
105
+ menuItem?: tailwind_merge.ClassNameValue;
78
106
  };
79
107
  };
80
108
  } | {}, {
@@ -93,6 +121,13 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
93
121
  transient: string;
94
122
  link: string[];
95
123
  tooltip: string[];
124
+ menu: string;
125
+ menuButton: string[];
126
+ menuHeading: string;
127
+ menuPanel: string[];
128
+ menuItem: string[];
129
+ panelHeading: string;
130
+ panelContent: string;
96
131
  }, tailwind_variants.TVReturnType<unknown, {
97
132
  sidenav: string[];
98
133
  content: string;
@@ -109,6 +144,13 @@ declare const SidenavStyles: tailwind_variants.TVReturnType<{
109
144
  transient: string;
110
145
  link: string[];
111
146
  tooltip: string[];
112
- }, undefined, unknown, unknown, undefined>>;
147
+ menu: string;
148
+ menuButton: string[];
149
+ menuHeading: string;
150
+ menuPanel: string[];
151
+ menuItem: string[];
152
+ panelHeading: string;
153
+ panelContent: string;
154
+ }, undefined, unknown, unknown>>;
113
155
 
114
156
  export { SidenavStyles };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const r=tv({slots:{sidenav:["group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m","closed:items-center","group-data-[push~=left]/layout:relative"],content:"flex h-full max-h-full flex-col gap-xs overflow-y-auto",header:"mb-m flex justify-center",avatar:['grid grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:"icon_heading"_"icon_text"] group-closed/sidenav:flex'],avatarIcon:"[grid-area:icon]",avatarHeading:"fg-primary-bold text-body-m [grid-area:heading]",avatarText:"fg-primary-muted grow-1 text-left text-body-s [grid-area:text]",toggle:["flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-interactive-muted-pressed"],divider:"my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]",heading:"text-body-xs uppercase",item:["group/item flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:px-s","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","enabled:selected:bg-accent-primary-bold","enabled:selected:hover:bg-accent-primary-hover","enabled:selected:focus-visible:bg-accent-primary-hover","enabled:selected:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],text:"grow-1 text-left text-body-s",transient:"group-closed/sidenav:hidden",link:["group/link flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:w-full","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],tooltip:["absolute flex items-center gap-s whitespace-nowrap text-body-s","group-disabled/item:fg-disabled group-disabled/link:fg-disabled"]}});export{r as SidenavStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const r=tv({slots:{sidenav:["group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m","closed:items-center","group-data-[push~=left]/layout:relative"],content:"flex h-full max-h-full w-fit flex-col gap-xs group-open/sidenav:w-full group-closed/sidenav:items-center",header:"mb-m flex justify-center",avatar:['grid w-full grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:"content_heading"_"content_text"] group-closed/sidenav:flex'],avatarIcon:"[grid-area:content]",avatarHeading:"fg-primary-bold text-left text-body-m [grid-area:heading]",avatarText:"fg-primary-muted grow-1 text-left text-body-s [grid-area:text]",toggle:["flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-interactive-muted-pressed"],divider:"my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]",heading:"text-body-xs uppercase",item:["group/item flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:px-s group-closed/sidenav:max-w-fit","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","enabled:selected:bg-accent-primary-bold","enabled:selected:hover:bg-accent-primary-hover","enabled:selected:focus-visible:bg-accent-primary-hover","enabled:selected:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],text:"grow-1 text-left text-body-s",transient:"group-closed/sidenav:hidden",link:["group/link flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:w-full group-closed/sidenav:max-w-fit","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],tooltip:["absolute flex items-center gap-s whitespace-nowrap text-body-s","group-disabled/item:fg-disabled group-disabled/link:fg-disabled"],menu:"group/menu relative text-body-s",menuButton:["flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs","group-closed/sidenav:max-w-fit","enabled:hover:bg-interactive-muted-hover","enabled:pressed:bg-interactive-muted-hover enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none"],menuHeading:"flex-1 text-left",menuPanel:["fg-primary-bold rounded-medium bg-surface-raised outline outline-static"],menuItem:["flex w-full cursor-pointer items-center gap-s rounded-medium p-s text-left text-body-s","group-expanded/menu:block group-open/sidenav:group-expanded/menu:pl-[32px]","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","enabled:selected:bg-accent-primary-bold","enabled:selected:hover:bg-accent-primary-hover","enabled:selected:focus-visible:bg-accent-primary-hover","enabled:selected:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],panelHeading:"min-w-[172px] rounded-t-medium bg-surface-overlay px-m py-s text-body-s",panelContent:"flex flex-col gap-xs bg-surface-default px-xs py-xs"}});export{r as SidenavStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/sidenav/styles.ts"],"names":["SidenavStyles","tv"],"mappings":"mCAcO,MAAMA,EAAgBC,EAAAA,CAAG,CAC9B,KAAA,CAAO,CACL,QAAS,CACP,kHAAA,CACA,qBAAA,CACA,yCACF,EACA,OAAA,CAAS,wDAAA,CACT,MAAA,CAAQ,0BAAA,CACR,MAAA,CAAQ,CACN,uIACF,CAAA,CACA,WAAY,kBAAA,CACZ,aAAA,CAAe,iDAAA,CACf,UAAA,CACE,iEACF,MAAA,CAAQ,CACN,oFAAA,CACA,0CAAA,CACA,sFACA,8CACF,CAAA,CACA,OAAA,CACE,yEAAA,CACF,OAAA,CAAS,wBAAA,CACT,IAAA,CAAM,CACJ,2FACA,yBAAA,CACA,0CAAA,CACA,qFAAA,CACA,2CAAA,CACA,0CACA,gDAAA,CACA,wDAAA,CACA,oDAAA,CACA,kDACF,EACA,IAAA,CAAM,8BAAA,CACN,SAAA,CAAW,6BAAA,CACX,IAAA,CAAM,CACJ,0FAAA,CACA,2BAAA,CACA,2CACA,qFAAA,CACA,2CAAA,CACA,kDACF,CAAA,CACA,QAAS,CACP,gEAAA,CACA,iEACF,CACF,CACF,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const SidenavStyles = tv({\n slots: {\n sidenav: [\n 'group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m',\n 'closed:items-center',\n 'group-data-[push~=left]/layout:relative',\n ],\n content: 'flex h-full max-h-full flex-col gap-xs overflow-y-auto',\n header: 'mb-m flex justify-center',\n avatar: [\n 'grid grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:\"icon_heading\"_\"icon_text\"] group-closed/sidenav:flex',\n ],\n avatarIcon: '[grid-area:icon]',\n avatarHeading: 'fg-primary-bold text-body-m [grid-area:heading]',\n avatarText:\n 'fg-primary-muted grow-1 text-left text-body-s [grid-area:text]',\n toggle: [\n 'flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-interactive-muted-pressed',\n ],\n divider:\n 'my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]',\n heading: 'text-body-xs uppercase',\n item: [\n 'group/item flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:px-s',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'enabled:selected:bg-accent-primary-bold',\n 'enabled:selected:hover:bg-accent-primary-hover',\n 'enabled:selected:focus-visible:bg-accent-primary-hover',\n 'enabled:selected:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n text: 'grow-1 text-left text-body-s',\n transient: 'group-closed/sidenav:hidden',\n link: [\n 'group/link flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:w-full',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n tooltip: [\n 'absolute flex items-center gap-s whitespace-nowrap text-body-s',\n 'group-disabled/item:fg-disabled group-disabled/link:fg-disabled',\n ],\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/sidenav/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAS,CACP,4HACA,CAAA,qBACA,CAAA,yCAGA,CAAA,CAAA,OAAA,CAAA,4IAGA,CAAA,MAAA,CAAA,CAAA,oJAEF,CAAA,CAAA,UAAY,CAAA,mCACG,CAAA,2DACf,CAAA,wKAIE,CAAA,0CACA,CAAA,qFACA,CAAA,8CAGA,CAAA,CAAA,OAAA,CAAA,yEACO,CAAA,OAAA,CAAA,wBAEP,CAAA,IAAA,CAAA,CAAA,yGACA,CAAA,wDACA,CAAA,gIAEA,CAAA,2CACA,CAAA,yCACA,CAAA,gDACA,CAAA,wDACA,CAAA,oDACA,CAAA,kDAEI,CAAA,CAAA,IAAA,CAAA,+BACK,SAAA,CAAA,6BAET,CAAA,IAAA,CAAA,CAAA,yGACA,CAAA,0DACA,CAAA,0CACA,CAAA,qFACA,CAAA,2CACA,CAAA,kDAEO,CACP,CAAA,OAAA,CAAA,CAAA,gEACA,CAAA,yGAGF,CAAA,UACE,CAAA,CAAA,kFACA,CAAA,gCACA,CAAA,0CACA,CAAA,gIAEF,CAAA,CAAA,WAAa,CAAA,mBACF,SACT,CAAA,CAAA,yEAEF,CAAU,CACR,QAAA,CAAA,CAAA,wFACA,CAAA,4EACA,CAAA,0CACA,CAAA,iIAEA,CAAA,yCACA,CAAA,gDACA,CAAA,wDACA,CAAA,oDACA,CAAA,gEAGA,CAAA,yEACF,CAAA,YAAc,CAAA,qDAEjB,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const SidenavStyles = tv({\n slots: {\n sidenav: [\n 'group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m',\n 'closed:items-center',\n 'group-data-[push~=left]/layout:relative',\n ],\n content:\n 'flex h-full max-h-full w-fit flex-col gap-xs group-open/sidenav:w-full group-closed/sidenav:items-center',\n header: 'mb-m flex justify-center',\n avatar: [\n 'grid w-full grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:\"content_heading\"_\"content_text\"] group-closed/sidenav:flex',\n ],\n avatarIcon: '[grid-area:content]',\n avatarHeading: 'fg-primary-bold text-left text-body-m [grid-area:heading]',\n avatarText:\n 'fg-primary-muted grow-1 text-left text-body-s [grid-area:text]',\n toggle: [\n 'flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-interactive-muted-pressed',\n ],\n divider:\n 'my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]',\n heading: 'text-body-xs uppercase',\n item: [\n 'group/item flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:px-s group-closed/sidenav:max-w-fit',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'enabled:selected:bg-accent-primary-bold',\n 'enabled:selected:hover:bg-accent-primary-hover',\n 'enabled:selected:focus-visible:bg-accent-primary-hover',\n 'enabled:selected:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n text: 'grow-1 text-left text-body-s',\n transient: 'group-closed/sidenav:hidden',\n link: [\n 'group/link flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:w-full group-closed/sidenav:max-w-fit',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n tooltip: [\n 'absolute flex items-center gap-s whitespace-nowrap text-body-s',\n 'group-disabled/item:fg-disabled group-disabled/link:fg-disabled',\n ],\n menu: 'group/menu relative text-body-s',\n menuButton: [\n 'flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs',\n 'group-closed/sidenav:max-w-fit',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:pressed:bg-interactive-muted-hover enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n ],\n menuHeading: 'flex-1 text-left',\n menuPanel: [\n 'fg-primary-bold rounded-medium bg-surface-raised outline outline-static',\n ],\n menuItem: [\n 'flex w-full cursor-pointer items-center gap-s rounded-medium p-s text-left text-body-s',\n 'group-expanded/menu:block group-open/sidenav:group-expanded/menu:pl-[32px]',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'enabled:selected:bg-accent-primary-bold',\n 'enabled:selected:hover:bg-accent-primary-hover',\n 'enabled:selected:focus-visible:bg-accent-primary-hover',\n 'enabled:selected:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n panelHeading:\n 'min-w-[172px] rounded-t-medium bg-surface-overlay px-m py-s text-body-s',\n panelContent: 'flex flex-col gap-xs bg-surface-default px-xs py-xs',\n },\n});\n"]}
@@ -1,13 +1,17 @@
1
+ import { Payload } from '@accelint/bus';
2
+ import { UniqueId } from '@accelint/core';
1
3
  import { ComponentPropsWithRef, PropsWithChildren } from 'react';
2
- import { Pressable, ToggleButtonProps, LinkProps } from 'react-aria-components';
4
+ import { Pressable, ButtonProps, ToggleButtonProps, LinkProps, DisclosureProps, DisclosurePanelProps, PopoverProps } from 'react-aria-components';
5
+ import { SidenavEventTypes } from './events.js';
3
6
 
4
7
  type SidenavProps = ComponentPropsWithRef<'nav'> & {
8
+ id: UniqueId;
5
9
  isHiddenWhenClosed?: boolean;
6
10
  };
7
11
  type SidenavHeaderProps = PropsWithChildren<{
8
12
  classNames?: {
9
13
  header?: string;
10
- button?: string;
14
+ button?: ButtonProps['className'];
11
15
  container?: string;
12
16
  icon?: string;
13
17
  };
@@ -15,14 +19,14 @@ type SidenavHeaderProps = PropsWithChildren<{
15
19
  type SidenavContentProps = ComponentPropsWithRef<'div'>;
16
20
  type SidenavItemProps = ToggleButtonProps & {
17
21
  classNames?: {
18
- button?: string;
22
+ button?: ToggleButtonProps['className'];
19
23
  icon?: string;
20
24
  };
21
- textValue: string;
25
+ textValue?: string;
22
26
  };
23
27
  type SidenavLinkProps = LinkProps & {
24
28
  classNames?: {
25
- button?: string;
29
+ button?: LinkProps['className'];
26
30
  icon?: string;
27
31
  };
28
32
  textValue: string;
@@ -30,9 +34,37 @@ type SidenavLinkProps = LinkProps & {
30
34
  type SidenavAvatarProps = ComponentPropsWithRef<'div'>;
31
35
  type SidenavDividerProps = ComponentPropsWithRef<'hr'>;
32
36
  type SidenavFooterProps = ComponentPropsWithRef<'footer'>;
33
- type SidenavTriggerProps = ComponentPropsWithRef<typeof Pressable>;
37
+ type SidenavCloseEvent = Payload<typeof SidenavEventTypes.close, {
38
+ id: UniqueId;
39
+ }>;
40
+ type SidenavOpenEvent = Payload<typeof SidenavEventTypes.open, {
41
+ id: UniqueId;
42
+ }>;
43
+ type SidenavToggleEvent = Payload<typeof SidenavEventTypes.toggle, {
44
+ id: UniqueId;
45
+ }>;
46
+ type SidenavEvent = SidenavOpenEvent | SidenavToggleEvent | SidenavCloseEvent;
47
+ type TargetedEvents = `close:${UniqueId}` | `open:${UniqueId}` | `toggle:${UniqueId}`;
48
+ type SidenavTriggerProps = ComponentPropsWithRef<typeof Pressable> & {
49
+ for: TargetedEvents | UniqueId;
50
+ };
34
51
  type SidenavContextValue = {
35
- open: boolean;
52
+ id: UniqueId;
53
+ isOpen: boolean;
54
+ };
55
+ type SidenavMenuProps = {
56
+ title: string;
57
+ icon: React.ReactNode;
58
+ children: React.ReactNode;
59
+ classNames?: {
60
+ menu?: DisclosureProps['className'];
61
+ button?: ButtonProps['className'];
62
+ icon?: string;
63
+ disclosurePanel?: DisclosurePanelProps['className'];
64
+ popoverPanel?: PopoverProps['className'];
65
+ panelContent?: string;
66
+ };
36
67
  };
68
+ type SidenavMenuItemProps = ToggleButtonProps;
37
69
 
38
- export type { SidenavAvatarProps, SidenavContentProps, SidenavContextValue, SidenavDividerProps, SidenavFooterProps, SidenavHeaderProps, SidenavItemProps, SidenavLinkProps, SidenavProps, SidenavTriggerProps };
70
+ export type { SidenavAvatarProps, SidenavCloseEvent, SidenavContentProps, SidenavContextValue, SidenavDividerProps, SidenavEvent, SidenavFooterProps, SidenavHeaderProps, SidenavItemProps, SidenavLinkProps, SidenavMenuItemProps, SidenavMenuProps, SidenavOpenEvent, SidenavProps, SidenavToggleEvent, SidenavTriggerProps };
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {Fragment as Fragment$1}from'react';import {Slider,composeRenderProps,Label,Input,SliderTrack,SliderThumb,Text}from'react-aria-components';import {Tooltip}from'../tooltip/index.js';import {SliderStyles}from'./styles.js';const {slider:x,label:A,inputs:B,input:F,thumb:D,track:P,trackBackground:$,trackValue:z,minValue:C,maxValue:L}=SliderStyles(),I=({classNames:r,label:n,layout:T="grid",maxValue:d=100,minValue:c=0,orientation:b="horizontal",showInput:p,showLabel:s=true,...k})=>jsx(Slider,{...k,className:composeRenderProps(r?.slider,a=>x({className:a})),maxValue:d,minValue:c,orientation:b,"aria-label":s?void 0:n,"data-layout":T,children:({state:a})=>jsxs(Fragment,{children:[s&&jsx(Label,{className:A({className:r?.label}),children:n}),p&&jsx("div",{className:B({className:r?.inputs}),children:a.values.map((m,l)=>jsx(Input,{className:composeRenderProps(r?.input,i=>F({className:i})),value:m,onChange:i=>a.setThumbValue(l,Number.parseFloat(i.target.value))},`number-field-${l===0?"min":"max"}`))}),jsxs(SliderTrack,{className:composeRenderProps(r?.track,m=>P({className:m})),children:[jsx("div",{className:$({className:r?.trackBackground})}),a.values.map((m,l)=>jsxs(Fragment$1,{children:[jsx("div",{className:z({className:r?.trackValue}),"data-start":a.values.length===1?0:a.getThumbPercent(0),"data-end":a.getThumbPercent(a.values.length===1?0:1)}),jsxs(Tooltip,{isDisabled:!p||a.isThumbDragging(l),children:[jsx(Tooltip.Trigger,{children:jsx(SliderThumb,{index:l,className:composeRenderProps(r?.thumb,i=>D({className:i}))})}),jsx(Tooltip.Body,{placement:"top",children:a.getThumbValue(l)})]})]},`slider-${l===0?"min":"max"}`))]}),jsx(Text,{slot:"min",className:C({className:r?.minValue}),children:c}),jsx(Text,{slot:"max",className:L({className:r?.maxValue}),children:d})]})});export{I as Slider};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -79,6 +79,6 @@ declare const SliderStyles: tailwind_variants.TVReturnType<{
79
79
  thumb: string[];
80
80
  minValue: string[];
81
81
  maxValue: string[];
82
- }, undefined, unknown, unknown, undefined>>;
82
+ }, undefined, unknown, unknown>>;
83
83
 
84
84
  export { SliderStyles };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const t=tv({slots:{slider:["group/slider flex gap-s","layout-grid:grid","layout-stack:flex","orientation-vertical:h-full orientation-vertical:w-fit","orientation-vertical:layout-grid:grid-cols-[auto_auto_auto] orientation-vertical:layout-grid:grid-rows-[auto_auto_1fr_auto]","orientation-vertical:layout-stack:flex-col","orientation-horizontal:h-xl","orientation-horizontal:layout-grid:grid-cols-[auto_1fr_auto] orientation-horizontal:layout-grid:grid-rows-[auto_auto_auto]","orientation-horizontal:layout-stack:w-full orientation-horizontal:layout-stack:items-center"],label:["fg-primary-bold order-1","group-layout-grid/slider:col-start-1","group-orientation-vertical/slider:group-layout-grid/slider:col-span-2"],inputs:["order-5 flex gap-s","group-layout-grid/slider:col-start-3 group-layout-grid/slider:row-start-1","group-orientation-horizontal/slider:flex-row","group-orientation-vertical/slider:flex-col-reverse","group-orientation-vertical/slider:group-layout-grid/slider:row-start-4"],input:"fg-primary-bold w-[50px] rounded-medium px-s py-xs font-display text-body-m outline outline-interactive",track:["relative order-3 h-full","group-orientation-horizontal/slider:h-[20px] group-orientation-horizontal/slider:w-full","group-orientation-horizontal/slider:group-layout-grid/slider:col-span-3 group-orientation-horizontal/slider:group-layout-grid/slider:row-start-2","group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-[20px]","group-orientation-vertical/slider:group-layout-grid/slider:col-start-2 group-orientation-vertical/slider:group-layout-grid/slider:row-span-3 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2"],trackBackground:["absolute rounded-full bg-surface-muted","group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:h-xxs group-orientation-horizontal/slider:w-full","group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-xxs"],trackValue:["absolute rounded-full bg-accent-primary-bold","group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:right-[calc(100%-attr(data-end_%)*100)] group-orientation-horizontal/slider:left-[calc(attr(data-start_%)*100)] group-orientation-horizontal/slider:h-xxs","group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:top-[calc(100%-attr(data-end_%)*100)] group-orientation-vertical/slider:bottom-[calc(attr(data-start_%)*100)] group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:w-xxs"],thumb:["h-m w-m rounded-full bg-accent-primary-bold outline-accent-primary-bold/40","focus-visible:outline-4","hover:outline-4","group-orientation-horizontal/slider:top-1/2","group-orientation-vertical/slider:left-1/2"],minValue:["fg-primary-muted flex items-center font-display text-body-m","group-orientation-vertical/slider:col-start-1 group-orientation-vertical/slider:row-start-4","group-orientation-horizontal/slider:group-layout-grid/slider:col-start-1","group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3","group-orientation-horizontal/slider:order-2","group-orientation-vertical/slider:group-layout-grid/slider:self-end","group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end","group-orientation-vertical/slider:order-4"],maxValue:["fg-primary-muted order-4 flex items-center font-display text-body-m","group-orientation-vertical/slider:order-2","group-orientation-vertical/slider:group-layout-grid/slider:col-start-1 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2","group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end","group-orientation-horizontal/slider:group-layout-grid/slider:col-start-3","group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3","group-orientation-horizontal/slider:group-layout-grid/slider:justify-self-end"]}});export{t as SliderStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t=tv({slots:{slider:["group/slider flex gap-s","layout-grid:grid","layout-stack:flex","orientation-vertical:h-full orientation-vertical:w-fit","orientation-vertical:layout-grid:grid-cols-[auto_auto_auto] orientation-vertical:layout-grid:grid-rows-[auto_auto_1fr_auto]","orientation-vertical:layout-stack:flex-col","orientation-horizontal:h-xl","orientation-horizontal:layout-grid:grid-cols-[auto_1fr_auto] orientation-horizontal:layout-grid:grid-rows-[auto_auto_auto]","orientation-horizontal:layout-stack:w-full orientation-horizontal:layout-stack:items-center"],label:["fg-primary-bold order-1","group-layout-grid/slider:col-start-1","group-orientation-vertical/slider:group-layout-grid/slider:col-span-2"],inputs:["order-5 flex gap-s","group-layout-grid/slider:col-start-3 group-layout-grid/slider:row-start-1","group-orientation-horizontal/slider:flex-row","group-orientation-vertical/slider:flex-col-reverse","group-orientation-vertical/slider:group-layout-grid/slider:row-start-4"],input:"fg-primary-bold w-[50px] rounded-medium px-s py-xs font-display text-body-m outline outline-interactive",track:["relative order-3 h-full","group-orientation-horizontal/slider:h-[20px] group-orientation-horizontal/slider:w-full","group-orientation-horizontal/slider:group-layout-grid/slider:col-span-3 group-orientation-horizontal/slider:group-layout-grid/slider:row-start-2","group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-[20px]","group-orientation-vertical/slider:group-layout-grid/slider:col-start-2 group-orientation-vertical/slider:group-layout-grid/slider:row-span-3 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2"],trackBackground:["absolute rounded-full bg-surface-muted","group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:h-xxs group-orientation-horizontal/slider:w-full","group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-xxs"],trackValue:["absolute rounded-full bg-accent-primary-bold","group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:right-[calc(100%-attr(data-end_%)*100)] group-orientation-horizontal/slider:left-[calc(attr(data-start_%)*100)] group-orientation-horizontal/slider:h-xxs","group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:top-[calc(100%-attr(data-end_%)*100)] group-orientation-vertical/slider:bottom-[calc(attr(data-start_%)*100)] group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:w-xxs"],thumb:["h-m w-m rounded-full bg-accent-primary-bold outline-accent-primary-bold/40","focus-visible:outline-4","hover:outline-4","group-orientation-horizontal/slider:top-1/2","group-orientation-vertical/slider:left-1/2"],minValue:["fg-primary-muted flex items-center font-display text-body-m","group-orientation-vertical/slider:col-start-1 group-orientation-vertical/slider:row-start-4","group-orientation-horizontal/slider:group-layout-grid/slider:col-start-1","group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3","group-orientation-horizontal/slider:order-2","group-orientation-vertical/slider:group-layout-grid/slider:self-end","group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end","group-orientation-vertical/slider:order-4"],maxValue:["fg-primary-muted order-4 flex items-center font-display text-body-m","group-orientation-vertical/slider:order-2","group-orientation-vertical/slider:group-layout-grid/slider:col-start-1 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2","group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end","group-orientation-horizontal/slider:group-layout-grid/slider:col-start-3","group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3","group-orientation-horizontal/slider:group-layout-grid/slider:justify-self-end"]}});export{t as SliderStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/slider/styles.ts"],"names":["SliderStyles","tv"],"mappings":"yCAcaA,CAAAA,CAAeC,EAAAA,CAAG,CAC7B,KAAA,CAAO,CACL,MAAA,CAAQ,CACN,0BACA,kBAAA,CACA,mBAAA,CACA,yDACA,6HAAA,CACA,4CAAA,CACA,8BACA,4HAAA,CACA,6FACF,CAAA,CACA,KAAA,CAAO,CACL,yBAAA,CACA,sCAAA,CACA,uEACF,CAAA,CACA,MAAA,CAAQ,CACN,oBAAA,CACA,2EAAA,CACA,+CACA,oDAAA,CACA,wEACF,EACA,KAAA,CACE,yGAAA,CACF,MAAO,CACL,yBAAA,CACA,0FACA,kJAAA,CACA,qFAAA,CACA,qNACF,CAAA,CACA,gBAAiB,CACf,wCAAA,CACA,wLACA,gLACF,CAAA,CACA,WAAY,CACV,8CAAA,CACA,iSACA,uRACF,CAAA,CACA,MAAO,CACL,4EAAA,CACA,0BACA,iBAAA,CACA,6CAAA,CACA,4CACF,CAAA,CACA,QAAA,CAAU,CACR,6DAAA,CACA,8FACA,0EAAA,CACA,0EAAA,CACA,8CACA,qEAAA,CACA,6EAAA,CACA,2CACF,CAAA,CACA,QAAA,CAAU,CACR,qEAAA,CACA,2CAAA,CACA,gJACA,6EAAA,CACA,0EAAA,CACA,2EACA,+EACF,CACF,CACF,CAAC","file":"styles.js","sourcesContent":["import { tv } from 'tailwind-variants';\n\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport const SliderStyles = tv({\n slots: {\n slider: [\n 'group/slider flex gap-s',\n 'layout-grid:grid',\n 'layout-stack:flex',\n 'orientation-vertical:h-full orientation-vertical:w-fit',\n 'orientation-vertical:layout-grid:grid-cols-[auto_auto_auto] orientation-vertical:layout-grid:grid-rows-[auto_auto_1fr_auto]',\n 'orientation-vertical:layout-stack:flex-col',\n 'orientation-horizontal:h-xl',\n 'orientation-horizontal:layout-grid:grid-cols-[auto_1fr_auto] orientation-horizontal:layout-grid:grid-rows-[auto_auto_auto]',\n 'orientation-horizontal:layout-stack:w-full orientation-horizontal:layout-stack:items-center',\n ],\n label: [\n 'fg-primary-bold order-1',\n 'group-layout-grid/slider:col-start-1',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-span-2',\n ],\n inputs: [\n 'order-5 flex gap-s',\n 'group-layout-grid/slider:col-start-3 group-layout-grid/slider:row-start-1',\n 'group-orientation-horizontal/slider:flex-row',\n 'group-orientation-vertical/slider:flex-col-reverse',\n 'group-orientation-vertical/slider:group-layout-grid/slider:row-start-4',\n ],\n input:\n 'fg-primary-bold w-[50px] rounded-medium px-s py-xs font-display text-body-m outline outline-interactive',\n track: [\n 'relative order-3 h-full',\n 'group-orientation-horizontal/slider:h-[20px] group-orientation-horizontal/slider:w-full',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-span-3 group-orientation-horizontal/slider:group-layout-grid/slider:row-start-2',\n 'group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-[20px]',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-start-2 group-orientation-vertical/slider:group-layout-grid/slider:row-span-3 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2',\n ],\n trackBackground: [\n 'absolute rounded-full bg-surface-muted',\n 'group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:h-xxs group-orientation-horizontal/slider:w-full',\n 'group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-xxs',\n ],\n trackValue: [\n 'absolute rounded-full bg-accent-primary-bold',\n 'group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:right-[calc(100%-attr(data-end_%)*100)] group-orientation-horizontal/slider:left-[calc(attr(data-start_%)*100)] group-orientation-horizontal/slider:h-xxs',\n 'group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:top-[calc(100%-attr(data-end_%)*100)] group-orientation-vertical/slider:bottom-[calc(attr(data-start_%)*100)] group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:w-xxs',\n ],\n thumb: [\n 'h-m w-m rounded-full bg-accent-primary-bold outline-accent-primary-bold/40',\n 'focus-visible:outline-4',\n 'hover:outline-4',\n 'group-orientation-horizontal/slider:top-1/2',\n 'group-orientation-vertical/slider:left-1/2',\n ],\n minValue: [\n 'fg-primary-muted flex items-center font-display text-body-m',\n 'group-orientation-vertical/slider:col-start-1 group-orientation-vertical/slider:row-start-4',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-start-1',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3',\n 'group-orientation-horizontal/slider:order-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:self-end',\n 'group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end',\n 'group-orientation-vertical/slider:order-4',\n ],\n maxValue: [\n 'fg-primary-muted order-4 flex items-center font-display text-body-m',\n 'group-orientation-vertical/slider:order-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-start-1 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-start-3',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:justify-self-end',\n ],\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/slider/styles.ts"],"names":["r"],"mappings":"sCAcE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KACE,mCACA,CAAA,kBACA,CAAA,4EAEA,CAAA,6HACA,CAAA,0EAEA,CAAA,4HACA,CAAA,6FAGA,CAAA,CAAA,KAAA,CAAA,CAAA,yBACA,CAAA,8GAIA,CAAA,CAAA,MAAA,CAAA,CAAA,oBACA,CAAA,0HAEA,CAAA,oDACA,CAAA,wEAGA,CAAA,CAAA,KAAA,CAAA,yGAEA,CAAA,KAAA,CAAA,CAAA,mHAEA,CAAA,kJACA,CAAA,qFACA,CAAA,sOAGA,CAAA,CAAA,gOAEA,CAAA,4LAGA,CAAA,CAAA,+UAEA,CAAA,uRAGA,CAAA,CAAA,KAAA,CAAA,CAAA,sGAEA,CAAA,iBACA,CAAA,0FAGF,CAAU,CACR,QAAA,CAAA,CAAA,2JAEA,CAAA,0EACA,CAAA,wHAEA,CAAA,qEACA,CAAA,yHAGF,CAAU,CACR,QAAA,CAAA,CAAA,qEACA,CAAA,2LAEA,CAAA,6EACA,CAAA,qJAEA,CAAA,+EAGL,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { tv } from '@/lib/utils';\n\nexport const SliderStyles = tv({\n slots: {\n slider: [\n 'group/slider flex gap-s',\n 'layout-grid:grid',\n 'layout-stack:flex',\n 'orientation-vertical:h-full orientation-vertical:w-fit',\n 'orientation-vertical:layout-grid:grid-cols-[auto_auto_auto] orientation-vertical:layout-grid:grid-rows-[auto_auto_1fr_auto]',\n 'orientation-vertical:layout-stack:flex-col',\n 'orientation-horizontal:h-xl',\n 'orientation-horizontal:layout-grid:grid-cols-[auto_1fr_auto] orientation-horizontal:layout-grid:grid-rows-[auto_auto_auto]',\n 'orientation-horizontal:layout-stack:w-full orientation-horizontal:layout-stack:items-center',\n ],\n label: [\n 'fg-primary-bold order-1',\n 'group-layout-grid/slider:col-start-1',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-span-2',\n ],\n inputs: [\n 'order-5 flex gap-s',\n 'group-layout-grid/slider:col-start-3 group-layout-grid/slider:row-start-1',\n 'group-orientation-horizontal/slider:flex-row',\n 'group-orientation-vertical/slider:flex-col-reverse',\n 'group-orientation-vertical/slider:group-layout-grid/slider:row-start-4',\n ],\n input:\n 'fg-primary-bold w-[50px] rounded-medium px-s py-xs font-display text-body-m outline outline-interactive',\n track: [\n 'relative order-3 h-full',\n 'group-orientation-horizontal/slider:h-[20px] group-orientation-horizontal/slider:w-full',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-span-3 group-orientation-horizontal/slider:group-layout-grid/slider:row-start-2',\n 'group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-[20px]',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-start-2 group-orientation-vertical/slider:group-layout-grid/slider:row-span-3 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2',\n ],\n trackBackground: [\n 'absolute rounded-full bg-surface-muted',\n 'group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:h-xxs group-orientation-horizontal/slider:w-full',\n 'group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-xxs',\n ],\n trackValue: [\n 'absolute rounded-full bg-accent-primary-bold',\n 'group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:right-[calc(100%-attr(data-end_%)*100)] group-orientation-horizontal/slider:left-[calc(attr(data-start_%)*100)] group-orientation-horizontal/slider:h-xxs',\n 'group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:top-[calc(100%-attr(data-end_%)*100)] group-orientation-vertical/slider:bottom-[calc(attr(data-start_%)*100)] group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:w-xxs',\n ],\n thumb: [\n 'h-m w-m rounded-full bg-accent-primary-bold outline-accent-primary-bold/40',\n 'focus-visible:outline-4',\n 'hover:outline-4',\n 'group-orientation-horizontal/slider:top-1/2',\n 'group-orientation-vertical/slider:left-1/2',\n ],\n minValue: [\n 'fg-primary-muted flex items-center font-display text-body-m',\n 'group-orientation-vertical/slider:col-start-1 group-orientation-vertical/slider:row-start-4',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-start-1',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3',\n 'group-orientation-horizontal/slider:order-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:self-end',\n 'group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end',\n 'group-orientation-vertical/slider:order-4',\n ],\n maxValue: [\n 'fg-primary-muted order-4 flex items-center font-display text-body-m',\n 'group-orientation-vertical/slider:order-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-start-1 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-start-3',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:justify-self-end',\n ],\n },\n});\n"]}
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,Switch,composeRenderProps}from'react-aria-components';import {SwitchStyles}from'./styles.js';const {switch:d,control:u,label:N}=SwitchStyles(),c=createContext(null);function a({children:t,...e}){return jsx(c.Provider,{value:e,children:t})}a.displayName="Switch.Provider";function l({ref:t,...e}){[e,t]=useContextProps(e,t??null,c);const{children:n,classNames:s,labelPosition:p="end",...m}=e;return jsx(Switch,{...m,ref:t,className:composeRenderProps(s?.switch,o=>d({className:o,labelPosition:p})),children:composeRenderProps(n,o=>jsxs(Fragment,{children:[jsx("span",{className:u({className:s?.control})}),o&&jsx("span",{className:N({className:s?.label}),children:o})]}))})}l.displayName="Switch",l.Provider=a;export{l as Switch,c as SwitchContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {Tab,composeRenderProps,useContextProps,Tabs,TabPanel,TabList}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {TabStyles}from'./styles.js';const {tabs:v,list:A,tab:C,panel:E}=TabStyles(),l=createContext(null);function m({children:a,...s}){return jsx(l.Provider,{value:s,children:a})}m.displayName="Tabs.Provider";function b({children:a,className:s,...e}){return jsx(Tab,{...e,className:composeRenderProps(s,t=>C({className:t})),children:a})}b.displayName="Tabs.List.Tab";function n({children:a,className:s,...e}){return containsExactChildren({children:a,componentName:n.displayName,restrictions:[[b,{min:1}]]}),jsx(TabList,{...e,className:composeRenderProps(s,t=>A({className:t})),children:a})}n.displayName="Tabs.List";function T({children:a,className:s,...e}){return jsx(TabPanel,{...e,className:composeRenderProps(s,t=>E({className:t})),children:a})}T.displayName="Tabs.Panel";function r({ref:a,...s}){[s,a]=useContextProps(s,a??null,l);const{children:e,className:t,...P}=s;return containsExactChildren({children:e,componentName:r.displayName,restrictions:[[n,{min:1,max:1}],[T,{min:1}]]}),jsx(Tabs,{...P,ref:a,className:composeRenderProps(t,c=>v({className:c})),children:e})}r.displayName="Tabs",r.Provider=m,r.List=n,r.List.Tab=b,r.Panel=T;export{r as Tabs,l as TabsContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -43,6 +43,6 @@ declare const TabStyles: tailwind_variants.TVReturnType<{
43
43
  list: string[];
44
44
  tab: string[];
45
45
  panel: string;
46
- }, undefined, unknown, unknown, undefined>>;
46
+ }, undefined, unknown, unknown>>;
47
47
 
48
48
  export { TabStyles };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const e=tv({slots:{tabs:["group/tabs flex w-content","orientation-horizontal:flex-col","orientation-vertical:flex-row"],list:["flex","orientation-horizontal:flex-row","orientation-vertical:flex-col"],tab:["fg-primary-muted relative cursor-pointer rounded-small p-s","group-orientation-horizontal/tabs:rounded-b-none","group-orientation-horizontal/tabs:after:absolute group-orientation-horizontal/tabs:after:bottom-0 group-orientation-horizontal/tabs:after:left-0 group-orientation-horizontal/tabs:after:block group-orientation-horizontal/tabs:after:h-[1px] group-orientation-horizontal/tabs:after:w-full group-orientation-horizontal/tabs:after:bg-[color:var(--outline-static)]","enabled:hover:fg-primary-bold","enabled:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:focus:fg-primary-bold","enabled:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:fg-accent-primary-bold selected:bg-accent-primary-muted","enabled:selected:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:hover:fg-accent-primary-bold","enabled:selected:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:focus:fg-accent-primary-bold","enabled:selected:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-interactive-disabled","disabled:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-interactive-disabled)]"],panel:"fg-primary-bold p-s"}});export{e as TabStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const e=tv({slots:{tabs:["group/tabs flex w-content","orientation-horizontal:flex-col","orientation-vertical:flex-row"],list:["flex","orientation-horizontal:flex-row","orientation-vertical:flex-col"],tab:["fg-primary-muted relative cursor-pointer rounded-small p-s","group-orientation-horizontal/tabs:rounded-b-none","group-orientation-horizontal/tabs:after:absolute group-orientation-horizontal/tabs:after:bottom-0 group-orientation-horizontal/tabs:after:left-0 group-orientation-horizontal/tabs:after:block group-orientation-horizontal/tabs:after:h-[1px] group-orientation-horizontal/tabs:after:w-full group-orientation-horizontal/tabs:after:bg-[color:var(--outline-static)]","enabled:hover:fg-primary-bold","enabled:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:focus:fg-primary-bold","enabled:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:fg-accent-primary-bold selected:bg-accent-primary-muted","enabled:selected:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:hover:fg-accent-primary-bold","enabled:selected:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:focus:fg-accent-primary-bold","enabled:selected:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-interactive-disabled","disabled:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-interactive-disabled)]"],panel:"fg-primary-bold p-s"}});export{e as TabStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tabs/styles.ts"],"names":["TabStyles","tv"],"mappings":"yCAcaA,CAAAA,CAAYC,EAAAA,CAAG,CAC1B,KAAA,CAAO,CACL,KAAM,CACJ,2BAAA,CACA,kCACA,+BACF,CAAA,CACA,KAAM,CACJ,MAAA,CACA,kCACA,+BACF,CAAA,CACA,GAAA,CAAK,CACH,6DACA,kDAAA,CACA,wWAAA,CAEA,gCACA,qGAAA,CAEA,+BAAA,CACA,sGAEA,0EAAA,CACA,wGAAA,CAEA,gDACA,8GAAA,CAEA,+CAAA,CACA,+GAEA,mFAAA,CACA,iGACF,EACA,KAAA,CAAO,qBACT,CACF,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const TabStyles = tv({\n slots: {\n tabs: [\n 'group/tabs flex w-content',\n 'orientation-horizontal:flex-col',\n 'orientation-vertical:flex-row',\n ],\n list: [\n 'flex',\n 'orientation-horizontal:flex-row',\n 'orientation-vertical:flex-col',\n ],\n tab: [\n 'fg-primary-muted relative cursor-pointer rounded-small p-s',\n 'group-orientation-horizontal/tabs:rounded-b-none',\n 'group-orientation-horizontal/tabs:after:absolute group-orientation-horizontal/tabs:after:bottom-0 group-orientation-horizontal/tabs:after:left-0 group-orientation-horizontal/tabs:after:block group-orientation-horizontal/tabs:after:h-[1px] group-orientation-horizontal/tabs:after:w-full group-orientation-horizontal/tabs:after:bg-[color:var(--outline-static)]',\n\n 'enabled:hover:fg-primary-bold',\n 'enabled:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:focus:fg-primary-bold',\n 'enabled:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:fg-accent-primary-bold selected:bg-accent-primary-muted',\n 'enabled:selected:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:hover:fg-accent-primary-bold',\n 'enabled:selected:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:focus:fg-accent-primary-bold',\n 'enabled:selected:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-interactive-disabled',\n 'disabled:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-interactive-disabled)]',\n ],\n panel: 'fg-primary-bold p-s',\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/tabs/styles.ts"],"names":["o"],"mappings":"sCAeE,MAAA,CAAO,CACLA,SACE,CAAA,CAAA,IAAA,CAAA,CAAA,6DAEA,CAAA,+BAGA,CAAA,CAAA,8CAEA,CAAA,kGAIA,CAAA,kDACA,CAAA,wYAGA,CAAA,qGAEA,CAAA,qIAGA,CAAA,0EACA,CAAA,wJAGA,CAAA,8GAEA,CAAA,8JAGA,CAAA,mFACA,CAAA,iGAEK,CAAA,CAAA,KAAA,CAAA,qBAEV,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const TabStyles = tv({\n slots: {\n tabs: [\n 'group/tabs flex w-content',\n 'orientation-horizontal:flex-col',\n 'orientation-vertical:flex-row',\n ],\n list: [\n 'flex',\n 'orientation-horizontal:flex-row',\n 'orientation-vertical:flex-col',\n ],\n tab: [\n 'fg-primary-muted relative cursor-pointer rounded-small p-s',\n 'group-orientation-horizontal/tabs:rounded-b-none',\n 'group-orientation-horizontal/tabs:after:absolute group-orientation-horizontal/tabs:after:bottom-0 group-orientation-horizontal/tabs:after:left-0 group-orientation-horizontal/tabs:after:block group-orientation-horizontal/tabs:after:h-[1px] group-orientation-horizontal/tabs:after:w-full group-orientation-horizontal/tabs:after:bg-[color:var(--outline-static)]',\n\n 'enabled:hover:fg-primary-bold',\n 'enabled:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:focus:fg-primary-bold',\n 'enabled:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:fg-accent-primary-bold selected:bg-accent-primary-muted',\n 'enabled:selected:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:hover:fg-accent-primary-bold',\n 'enabled:selected:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:focus:fg-accent-primary-bold',\n 'enabled:selected:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-interactive-disabled',\n 'disabled:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-interactive-disabled)]',\n ],\n panel: 'fg-primary-bold p-s',\n },\n});\n"]}
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,TextField,composeRenderProps,TextArea,Text,FieldError}from'react-aria-components';import {Label}from'../label/index.js';import {TextAreaStyles}from'./styles.js';const {field:I,label:z,input:D,description:R,error:S}=TextAreaStyles(),c=createContext(null);function x({children:r,...t}){return jsx(c.Provider,{value:t,children:r})}x.displayName="TextAreaField.Provider";function P({ref:r,...t}){[t,r]=useContextProps(t,r??null,c);const{classNames:i,description:a,errorMessage:u,label:d,inputProps:T,size:n="medium",isInvalid:v,...F}=t,p=u||null,m=n==="small";return jsx(TextField,{...F,ref:r,className:composeRenderProps(i?.field,o=>I({className:o})),isInvalid:v||(p?true:void 0),"data-size":n,children:({isDisabled:o,isInvalid:f,isRequired:A})=>jsxs(Fragment,{children:[!!d&&!m&&jsx(Label,{className:z({className:i?.label}),isDisabled:o,isRequired:A,children:d}),jsx(TextArea,{...T,className:composeRenderProps(i?.input,l=>D({className:l}))}),!!a&&!(m||f)&&jsx(Text,{slot:"description",className:R({className:i?.description}),children:a}),jsx(FieldError,{className:composeRenderProps(i?.error,l=>S({className:l})),children:p})]})})}P.displayName="TextAreaField",P.Provider=x;export{P as TextAreaField,c as TextAreaFieldContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,TextField,composeRenderProps,Text,FieldError}from'react-aria-components';import {Input}from'../input/index.js';import {Label}from'../label/index.js';import {TextFieldStyles}from'./styles.js';const {field:E,label:A,description:S,error:V}=TextFieldStyles(),x=createContext(null);function P({children:r,...t}){return jsx(x.Provider,{value:t,children:r})}P.displayName="TextField.Provider";function u({ref:r,...t}){[t,r]=useContextProps(t,r??null,x);const{classNames:i,description:s,errorMessage:T,inputProps:F,label:a,size:l="medium",isInvalid:v,...f}=t,d=T||null,n=l==="small";return jsx(TextField,{...f,ref:r,className:composeRenderProps(i?.field,o=>E({className:o})),isInvalid:v||(d?true:void 0),"data-size":l,children:({isDisabled:o,isInvalid:p,isRequired:m})=>jsxs(Fragment,{children:[!!a&&!n&&jsx(Label,{className:A({className:i?.label}),isDisabled:o,isRequired:m,children:a}),jsx(Input,{...F,classNames:i?.input,disabled:o,required:m,size:l,isInvalid:p}),!!s&&!(n||p)&&jsx(Text,{slot:"description",className:S({className:i?.description}),children:s}),jsx(FieldError,{className:composeRenderProps(i?.error,b=>V({className:b})),children:d})]})})}u.displayName="TextField",u.Provider=P;export{u as TextField,x as TextFieldContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import {createContext,useState,useEffect}from'react';import'client-only';import {UNSAFE_PortalProvider}from'@react-aria/overlays';import {useIsSSR}from'@react-aria/ssr';import {useContextProps,TooltipTrigger,Focusable,Tooltip,composeRenderProps}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {TooltipStyles}from'./styles.js';const B=createContext(null);function p({ref:t,...o}){[o,t]=useContextProps(o,t??null,B);const{children:r,delay:s=250,...a}=o;return containsExactChildren({children:r,componentName:p.displayName,restrictions:[[m,{min:1,max:1}],[T,{min:1,max:1}]]}),jsx(TooltipTrigger,{...a,delay:s,children:r})}p.displayName="Tooltip";function m({children:t,...o}){return jsx(Focusable,{...o,children:t})}m.displayName="Tooltip.Trigger";function T({children:t,parentRef:o,className:r,offset:s=5,placement:a="bottom",...u}){const i=useIsSSR(),[d,c]=useState(i?null:document.body);return useEffect(()=>{const l=o?.current,e=i?null:document.createElement("div");return e?.setAttribute("style","position: absolute;"),l&&e&&(l.appendChild(e),c(e)),()=>{e?.remove(),c(i?null:document.body);}},[i,o]),jsx(UNSAFE_PortalProvider,{getContainer:()=>d,children:jsx(Tooltip,{...u,className:composeRenderProps(r,l=>TooltipStyles({className:l})),offset:s,placement:a,children:t})})}T.displayName="Tooltip.Body",p.Trigger=m,p.Body=T;export{p as Tooltip,B as TooltipContext};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {UNSAFE_PortalProvider}from'@react-aria/overlays';import {useIsSSR}from'@react-aria/ssr';import {createContext,useState,useEffect}from'react';import {useContextProps,TooltipTrigger,Focusable,Tooltip,composeRenderProps}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {TooltipStyles}from'./styles.js';const B=createContext(null);function p({ref:t,...o}){[o,t]=useContextProps(o,t??null,B);const{children:r,delay:s=250,...a}=o;return containsExactChildren({children:r,componentName:p.displayName,restrictions:[[m,{min:1,max:1}],[T,{min:1,max:1}]]}),jsx(TooltipTrigger,{...a,delay:s,children:r})}p.displayName="Tooltip";function m({children:t,...o}){return jsx(Focusable,{...o,children:t})}m.displayName="Tooltip.Trigger";function T({children:t,parentRef:o,className:r,offset:s=5,placement:a="bottom",...u}){const i=useIsSSR(),[d,c]=useState(i?null:document.body);return useEffect(()=>{const l=o?.current,e=i?null:document.createElement("div");return e?.setAttribute("style","position: absolute;"),l&&e&&(l.appendChild(e),c(e)),()=>{e?.remove(),c(i?null:document.body);}},[i,o]),jsx(UNSAFE_PortalProvider,{getContainer:()=>d,children:jsx(Tooltip,{...u,className:composeRenderProps(r,l=>TooltipStyles({className:l})),offset:s,placement:a,children:t})})}T.displayName="Tooltip.Body",p.Trigger=m,p.Body=T;export{p as Tooltip,B as TooltipContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["y","props","useContextProps","ref","TooltipContext","A","E","Tooltip","jsx","AriaTooltipTrigger","rest","delay","Focusable","n","b","children","TooltipTrigger","parentRef","className","placement","isSSR","portal","x","P","useEffect","node","port","setPortal","UNSAFE_PortalProvider","f","AriaTooltip","C","S","v","offset","TooltipBody"],"mappings":"sZA6EO,MAAA,CAAA,CAAAA,aAAA,CAAA,IAAmB,EAAA,SAAc,CAAiB,CACvD,CAACC,GAAU,CAAA,CAAIC,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,KAAMC,CAAc,CAAAC,eAEjE,CAAA,CAAA,CAAA,CAAA,EAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAU,CAAA,QAAQ,CAAK,CAAA,CAAA,KAAYJ,CAE3C,CAAA,CAAA,GAAA,CAAA,GAAsB,CACpB,CAAA,CAAA,CAAA,CAAA,OACAK,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAQ,CACvB,CAAA,CAAA,WAAc,CACZ,YAA2B,CAAA,CAAK,CAAE,CAAC,CAAA,CACnC,GAAc,CAAE,CAAA,CAAA,GAAK,CAAG,CAAA,CAAA,CAAA,CAAK,CAAE,CAAC,CAClC,CACF,GAGEC,CAAAA,CAACC,CAAAA,GAAoB,CAAA,CAAGC,CAAAA,CAAM,QAAOC,cAAAA,CAClC,CAAA,GAAA,CAAA,CAAA,KACH,CAEJ,CACAJ,CAAAA,QAAQ,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAEtB,CAAA,SAA0B,CAAA,SAAU,CAAA,CAAA,CAAGN,QACrC,CAAA,CAAA,CAAOO,GAACI,CAAA,CAAW,CAAA,CAAA,OAAWC,GAAA,CAAAC,SAAA,CAAA,CAAAC,GAChC,CACAC,CAAAA,QAAe,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,iBAG3B,CAAA,SACA,CAAA,CAAA,CAAA,QAAAC,CACA,CAAA,CAAA,SAAAC,CACA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,MAAA,CAAAC,CAAAA,CAAY,CAAA,CAAA,SACZ,CAAGlB,CACL,CAAA,QACQmB,CAAAA,GAAiB,CAAA,CACjB,CAACC,CAAAA,MAA8BD,CAAAA,CAAQE,QAAA,EAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAAC,QAAA,CAAA,CAAA,CAAS,IAAI,CAAA,QAEjEC,CAAAA,IAAU,CAAM,CACd,OAAMC,SAAOR,CAAAA,IAAW,CAAA,MAElBS,CAAON,CAAAA,CAAQ,EAAA,OAAO,CAAA,CAAA,CAAA,CAAA,CAAS,IAAA,CAAA,QAAA,CAAc,aACnD,CAAAM,KAAM,CAAA,CAAA,OAAA,CAAA,EAAa,0CAGZ,CAAA,CAAA,CAAA,EAAA,CAAA,GAAYA,CAAI,CAAA,WAKV,CACXA,CAAAA,CAAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAENC,CAAUP,CAAAA,EAAQ,MAAO,EAAA,CAAA,CAAA,CAAA,CAAA,CAAS,IAAI,CACxC,QACmB,CAAA,IAGlBQ,EAAA,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAf,GAAA,CAAAgB,qBAAA,CAAc,aACnC,CAAA,IAACC,CAAA,CACE,QACD,CAAAjB,GAAA,CAAAkB,OAAA,CAAA,CAAA,GAA8Bb,CAAAA,CAAYA,SACxB,CAAAc,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAUC,aAAC,CAC7B,CAAA,SACQC,CACR,CAAA,CAAA,CAAA,CAAA,CAAA,MAAWf,CAEV,CAAA,CAAA,SACH,CAAA,CACF,CAEJ,QACY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,eAGlB,CAAA,CAAA,OAAOgB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\nimport { createContext, useEffect, useState } from 'react';\nimport 'client-only';\nimport { UNSAFE_PortalProvider } from '@react-aria/overlays';\nimport { useIsSSR } from '@react-aria/ssr';\nimport {\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n type ContextValue,\n composeRenderProps,\n Focusable,\n useContextProps,\n} from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { TooltipStyles } from './styles';\nimport type {\n TooltipBodyProps,\n TooltipProps,\n TooltipTriggerProps,\n} from './types';\n\nexport const TooltipContext =\n createContext<ContextValue<TooltipProps, HTMLDivElement>>(null);\n\n/**\n * Tooltip - A contextual popup component for providing additional information\n *\n * Displays helpful information when users hover over or focus on an element.\n * Provides accessible tooltip functionality with proper positioning, keyboard\n * navigation, and screen reader support for enhanced user experience.\n *\n * @example\n * // Basic tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover me</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * This is helpful information\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Tooltip with custom positioning\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover for info</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body placement=\"top\" offset={10}>\n * Positioned above with custom offset\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Icon with tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button variant=\"icon\">\n * <Icon><Info /></Icon>\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * Additional context for this action\n * </Tooltip.Body>\n * </Tooltip>\n */\nexport function Tooltip({ ref, ...props }: TooltipProps) {\n [props, ref] = useContextProps(props, ref ?? null, TooltipContext);\n\n const { children, delay = 250, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Tooltip.displayName,\n restrictions: [\n [TooltipTrigger, { min: 1, max: 1 }],\n [TooltipBody, { min: 1, max: 1 }],\n ],\n });\n\n return (\n <AriaTooltipTrigger {...rest} delay={delay}>\n {children}\n </AriaTooltipTrigger>\n );\n}\nTooltip.displayName = 'Tooltip';\n\nfunction TooltipTrigger({ children, ...props }: TooltipTriggerProps) {\n return <Focusable {...props}>{children}</Focusable>;\n}\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nfunction TooltipBody({\n children,\n parentRef,\n className,\n offset = 5,\n placement = 'bottom',\n ...props\n}: TooltipBodyProps) {\n const isSSR = useIsSSR();\n const [portal, setPortal] = useState(isSSR ? null : document.body);\n\n useEffect(() => {\n const node = parentRef?.current;\n // TODO: Ensure proper ssr hydration\n const port = isSSR ? null : document.createElement('div');\n port?.setAttribute('style', 'position: absolute;');\n\n if (node && port) {\n node.appendChild(port);\n\n setPortal(port);\n }\n\n return () => {\n port?.remove();\n\n setPortal(isSSR ? null : document.body);\n };\n }, [isSSR, parentRef]);\n\n return (\n <UNSAFE_PortalProvider getContainer={() => portal}>\n <AriaTooltip\n {...props}\n className={composeRenderProps(className, (className) =>\n TooltipStyles({ className }),\n )}\n offset={offset}\n placement={placement}\n >\n {children}\n </AriaTooltip>\n </UNSAFE_PortalProvider>\n );\n}\nTooltipBody.displayName = 'Tooltip.Body';\n\nTooltip.Trigger = TooltipTrigger;\nTooltip.Body = TooltipBody;\n"]}
1
+ {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["P","props","useContextProps","ref","TooltipContext","A","E","Tooltip","jsx","AriaTooltipTrigger","rest","delay","Focusable","n","b","children","TooltipTrigger","parentRef","className","placement","isSSR","portal","g","x","useEffect","node","port","setPortal","UNSAFE_PortalProvider","y","AriaTooltip","C","S","v","offset","TooltipBody"],"mappings":"sZA8EO,MAAA,CAAA,CAAAA,aAAA,CAAA,IAAmB,EAAA,SAAc,CAAiB,CACvD,CAACC,GAAU,CAAA,CAAIC,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,KAAMC,CAAc,CAAAC,eAEjE,CAAA,CAAA,CAAA,CAAA,EAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAU,CAAA,QAAQ,CAAK,CAAA,CAAA,KAAYJ,CAE3C,CAAA,CAAA,GAAA,CAAA,GAAsB,CACpB,CAAA,CAAA,CAAA,CAAA,OACAK,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAQ,CACvB,CAAA,CAAA,WAAc,CACZ,YAA2B,CAAA,CAAK,CAAE,CAAC,CAAA,CACnC,GAAc,CAAE,CAAA,CAAA,GAAK,CAAG,CAAA,CAAA,CAAA,CAAK,CAAE,CAAC,CAClC,CACF,GAGEC,CAAAA,CAACC,CAAAA,GAAoB,CAAA,CAAGC,CAAAA,CAAM,QAAOC,cAAAA,CAClC,CAAA,GAAA,CAAA,CAAA,KACH,CAEJ,CACAJ,CAAAA,QAAQ,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAEtB,CAAA,SAA0B,CAAA,SAAU,CAAA,CAAA,CAAGN,QACrC,CAAA,CAAA,CAAOO,GAACI,CAAA,CAAW,CAAA,CAAA,OAAWC,GAAA,CAAAC,SAAA,CAAA,CAAAC,GAChC,CACAC,CAAAA,QAAe,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,iBAG3B,CAAA,SACA,CAAA,CAAA,CAAA,QAAAC,CACA,CAAA,CAAA,SAAAC,CACA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,MAAA,CAAAC,CAAAA,CAAY,CAAA,CAAA,SACZ,CAAGlB,CACL,CAAA,QACQmB,CAAAA,GAAiB,CAAA,CACjB,CAACC,CAAAA,MAA8BD,CAAAA,CAAQE,QAAA,EAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAAC,QAAA,CAAA,CAAA,CAAS,IAAI,CAAA,QAEjEC,CAAAA,IAAU,CAAM,CACd,OAAMC,SAAOR,CAAAA,IAAW,CAAA,MAElBS,CAAON,CAAAA,CAAQ,EAAA,OAAO,CAAA,CAAA,CAAA,CAAA,CAAS,IAAA,CAAA,QAAA,CAAc,aACnD,CAAAM,KAAM,CAAA,CAAA,OAAA,CAAA,EAAa,0CAGZ,CAAA,CAAA,CAAA,EAAA,CAAA,GAAYA,CAAI,CAAA,WAKV,CACXA,CAAAA,CAAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAENC,CAAUP,CAAAA,EAAQ,MAAO,EAAA,CAAA,CAAA,CAAA,CAAA,CAAS,IAAI,CACxC,QACmB,CAAA,IAGlBQ,EAAA,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAf,GAAA,CAAAgB,qBAAA,CAAc,aACnC,CAAA,IAACC,CAAA,CACE,QACD,CAAAjB,GAAA,CAAAkB,OAAA,CAAA,CAAA,GAA8Bb,CAAAA,CAAYA,SACxB,CAAAc,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAUC,aAAC,CAC7B,CAAA,SACQC,CACR,CAAA,CAAA,CAAA,CAAA,CAAA,MAAWf,CAEV,CAAA,CAAA,SACH,CAAA,CACF,CAEJ,QACY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,eAGlB,CAAA,CAAA,OAAOgB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { UNSAFE_PortalProvider } from '@react-aria/overlays';\nimport { useIsSSR } from '@react-aria/ssr';\nimport { createContext, useEffect, useState } from 'react';\nimport {\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n type ContextValue,\n composeRenderProps,\n Focusable,\n useContextProps,\n} from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { TooltipStyles } from './styles';\nimport type {\n TooltipBodyProps,\n TooltipProps,\n TooltipTriggerProps,\n} from './types';\n\nexport const TooltipContext =\n createContext<ContextValue<TooltipProps, HTMLDivElement>>(null);\n\n/**\n * Tooltip - A contextual popup component for providing additional information\n *\n * Displays helpful information when users hover over or focus on an element.\n * Provides accessible tooltip functionality with proper positioning, keyboard\n * navigation, and screen reader support for enhanced user experience.\n *\n * @example\n * // Basic tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover me</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * This is helpful information\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Tooltip with custom positioning\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover for info</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body placement=\"top\" offset={10}>\n * Positioned above with custom offset\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Icon with tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button variant=\"icon\">\n * <Icon><Info /></Icon>\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * Additional context for this action\n * </Tooltip.Body>\n * </Tooltip>\n */\nexport function Tooltip({ ref, ...props }: TooltipProps) {\n [props, ref] = useContextProps(props, ref ?? null, TooltipContext);\n\n const { children, delay = 250, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Tooltip.displayName,\n restrictions: [\n [TooltipTrigger, { min: 1, max: 1 }],\n [TooltipBody, { min: 1, max: 1 }],\n ],\n });\n\n return (\n <AriaTooltipTrigger {...rest} delay={delay}>\n {children}\n </AriaTooltipTrigger>\n );\n}\nTooltip.displayName = 'Tooltip';\n\nfunction TooltipTrigger({ children, ...props }: TooltipTriggerProps) {\n return <Focusable {...props}>{children}</Focusable>;\n}\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nfunction TooltipBody({\n children,\n parentRef,\n className,\n offset = 5,\n placement = 'bottom',\n ...props\n}: TooltipBodyProps) {\n const isSSR = useIsSSR();\n const [portal, setPortal] = useState(isSSR ? null : document.body);\n\n useEffect(() => {\n const node = parentRef?.current;\n // TODO: Ensure proper ssr hydration\n const port = isSSR ? null : document.createElement('div');\n port?.setAttribute('style', 'position: absolute;');\n\n if (node && port) {\n node.appendChild(port);\n\n setPortal(port);\n }\n\n return () => {\n port?.remove();\n\n setPortal(isSSR ? null : document.body);\n };\n }, [isSSR, parentRef]);\n\n return (\n <UNSAFE_PortalProvider getContainer={() => portal}>\n <AriaTooltip\n {...props}\n className={composeRenderProps(className, (className) =>\n TooltipStyles({ className }),\n )}\n offset={offset}\n placement={placement}\n >\n {children}\n </AriaTooltip>\n </UNSAFE_PortalProvider>\n );\n}\nTooltipBody.displayName = 'Tooltip.Body';\n\nTooltip.Trigger = TooltipTrigger;\nTooltip.Body = TooltipBody;\n"]}
@@ -1,2 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {Show,Hide,ChevronDown,ChevronUp,DragVert}from'@accelint/icons';import {createContext,memo,useContext,useMemo}from'react';import {TreeItemContent,TreeItem,composeRenderProps,Text,useDragAndDrop,Tree,DropIndicator}from'react-aria-components';import {Cache}from'./../../hooks/use-tree/actions/cache.js';import {Button}from'../button/index.js';import {Checkbox}from'../checkbox/index.js';import {Icon}from'../icon/index.js';import {Lines}from'../lines/index.js';import {TreeStyles,TreeStylesDefaults}from'./styles.js';const {tree:pe,item:ue,content:ye,display:fe,icon:be,label:ve,actions:Te,spacing:E,description:he,drag:Ie,expansion:Ce,visibility:ge}=TreeStyles(),x=createContext({visibilityComputedKeys:new Set,showRuleLines:true,showVisibility:false,variant:TreeStylesDefaults.variant,isStatic:true,onVisibilityChange:()=>{}}),xe=t=>jsx(DropIndicator,{target:t,className:"border border-highlight-hover"}),we=memo(function({level:s,isLastOfSet:o}){const{showRuleLines:m,variant:r}=useContext(x);return Array.from({length:s}).map((i,n)=>{const a=n===s-1?"branch":"vert",d=o&&n>0?"last":a;return jsx(Lines,{variant:d,size:r==="crammed"?"medium":"large",isVisible:m,className:E({variant:r})},n)})});function H({children:t,className:s,disabledKeys:o,dragAndDropConfig:m,expandedKeys:r,items:i,selectedKeys:n,showRuleLines:a=true,showVisibility:d=true,selectionMode:l="multiple",variant:w=TreeStylesDefaults.variant,visibleKeys:y,onVisibilityChange:K,onSelectionChange:N,...D}){if(i&&(o||r||n||y))throw new Error("Tree should only be controlled with state from either `items` or keys props, not both");if(!!i!=(typeof t=="function"))throw new Error("Tree `items` and node iterator `children` must be used together");const{dragAndDropHooks:V}=useDragAndDrop({renderDropIndicator:xe,getAllowedDropOperations:()=>["move"],getDropOperation:()=>"move",...m}),f=useMemo(()=>i?new Cache([...i]):null,[i]),c=useMemo(()=>f?.getAllNodes(),[f]),{disabledKeys:S,expandedKeys:T,selectedKeys:h,visibleKeys:A,visibilityComputedKeys:I}=useMemo(()=>{const p={disabledKeys:c?new Set:o,expandedKeys:c?new Set:r,selectedKeys:c?new Set:n,visibleKeys:c?new Set:y,visibilityComputedKeys:new Set};return c?c.reduce((b,{key:C,isDisabled:G,isExpanded:J,isSelected:Q,isVisible:X,isVisibleComputed:Y})=>(G&&b.disabledKeys?.add(C),J&&b.expandedKeys?.add(C),Q&&b.selectedKeys?.add(C),X&&b.visibleKeys?.add(C),Y&&b.visibilityComputedKeys.add(C),b),p):p},[c,o,r,n,y]),F=h?p=>{p!=="all"&&N?.(p);}:void 0;return jsx(x.Provider,{value:{disabledKeys:S,expandedKeys:T,selectedKeys:h,showRuleLines:a,showVisibility:d,variant:w,visibleKeys:A,visibilityComputedKeys:I,isStatic:typeof t!="function",onVisibilityChange:K??(()=>{})},children:jsx(Tree,{...D,className:composeRenderProps(s,p=>pe({className:p,variant:w})),disabledKeys:S,dragAndDropHooks:V,expandedKeys:T,items:i,selectedKeys:h,onSelectionChange:F,selectionMode:l,children:t})})}H.displayName="Tree";const z=createContext({isVisible:true,isViewable:true,ancestors:[]});function u({className:t,id:s,...o}){const{visibilityComputedKeys:m,visibleKeys:r,isStatic:i}=useContext(x),{ancestors:n}=useContext(z),a=m?.has(s)||i&&n.every(l=>r?.has(l)),d=r?.has(s);return jsx(z.Provider,{value:{isVisible:d,isViewable:a,ancestors:[...n,s]},children:jsx(TreeItem,{...o,id:s,className:composeRenderProps(t,l=>ue({className:l})),"data-viewable":a||null,"data-visible":d||null})})}u.displayName="Tree.Item";function M({children:t}){const{showVisibility:s,variant:o,visibleKeys:m,onVisibilityChange:r}=useContext(x),{isVisible:i,isViewable:n}=useContext(z),a=o==="cozy"?"medium":"small";return jsx(TreeItemContent,{children:d=>{const{id:l,allowsDragging:w,hasChildItems:y,level:K,selectionBehavior:N,selectionMode:D,state:V,isDisabled:f,isExpanded:c,isSelected:S}=d,T=!(V.collection.getItem(l)?.nextKey||y),h=N==="toggle"&&D!=="none",A=()=>{const I=new Set(m);m?.has(l)?I.delete(l):I.add(l),r?.(I);};return jsx(Icon.Provider,{size:a,children:jsxs("div",{className:ye({variant:o}),"data-last-of-set":T,children:[s&&jsx(Button,{variant:"icon",color:"info",size:a,onPress:A,isDisabled:f,className:ge(),children:jsx(Icon,{children:i?jsx(Show,{}):jsx(Hide,{})})}),K>1&&jsx(we,{level:K,isLastOfSet:T}),y?jsx(Button,{slot:"chevron",variant:"icon",size:a,className:Ce(),children:jsx(Icon,{children:c?jsx(ChevronDown,{}):jsx(ChevronUp,{})})}):jsx("div",{className:E({variant:o})}),jsx("div",{className:fe({variant:o}),children:typeof t=="function"?t({...d,variant:o,isVisible:i,isViewable:n,defaultChildren:null}):t}),h&&jsx(Checkbox,{slot:"selection",isSelected:S,isDisabled:f}),w&&jsx(Button,{slot:"drag",variant:"icon",size:a,isDisabled:f,className:Ie({}),children:jsx(Icon,{children:jsx(DragVert,{})})})]})})}})}M.displayName="Tree.Item.Content";function W({children:t,className:s}){return jsx(Text,{className:ve({className:s}),children:t})}W.displayName="Tree.Item.Label";function U({children:t,className:s}){const{variant:o}=useContext(x);return o!=="crammed"?jsx(Text,{"data-slot":"description",className:he({className:s,variant:o}),children:t}):null}U.displayName="Tree.Item.Description";function _({children:t,className:s}){return jsx(Icon,{className:be({className:s}),children:t})}_.displayName="Tree.Item.PrefixIcon";function q({children:t,className:s}){return jsx("div",{className:Te({className:s}),children:t})}q.displayName="Tree.Icon.Actions",H.Item=u,u.Content=M,u.Label=W,u.Description=U,u.PrefixIcon=_,u.Actions=q;export{H as Tree,x as TreeContext,u as TreeItem,z as TreeItemContext};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {Show,Hide,ChevronDown,ChevronUp,DragVert}from'@accelint/icons';import {createContext,memo,useContext,useMemo}from'react';import {TreeItemContent,TreeItem,composeRenderProps,Text,useDragAndDrop,Tree,DropIndicator}from'react-aria-components';import {Cache}from'./../../hooks/use-tree/actions/cache.js';import {Button}from'../button/index.js';import {Checkbox}from'../checkbox/index.js';import {Icon}from'../icon/index.js';import {Lines}from'../lines/index.js';import {TreeStyles,TreeStylesDefaults}from'./styles.js';const {tree:pe,item:ue,content:ye,display:fe,icon:be,label:ve,actions:Te,spacing:E,description:he,drag:Ie,expansion:Ce,visibility:ge}=TreeStyles(),x=createContext({visibilityComputedKeys:new Set,showRuleLines:true,showVisibility:false,variant:TreeStylesDefaults.variant,isStatic:true,onVisibilityChange:()=>{}}),xe=t=>jsx(DropIndicator,{target:t,className:"border border-highlight-hover"}),we=memo(function({level:s,isLastOfSet:o}){const{showRuleLines:m,variant:r}=useContext(x);return Array.from({length:s}).map((i,n)=>{const a=n===s-1?"branch":"vert",d=o&&n>0?"last":a;return jsx(Lines,{variant:d,size:r==="crammed"?"medium":"large",isVisible:m,className:E({variant:r})},n)})});function H({children:t,className:s,disabledKeys:o,dragAndDropConfig:m,expandedKeys:r,items:i,selectedKeys:n,showRuleLines:a=true,showVisibility:d=true,selectionMode:l="multiple",variant:w=TreeStylesDefaults.variant,visibleKeys:y,onVisibilityChange:K,onSelectionChange:N,...D}){if(i&&(o||r||n||y))throw new Error("Tree should only be controlled with state from either `items` or keys props, not both");if(!!i!=(typeof t=="function"))throw new Error("Tree `items` and node iterator `children` must be used together");const{dragAndDropHooks:V}=useDragAndDrop({renderDropIndicator:xe,getAllowedDropOperations:()=>["move"],getDropOperation:()=>"move",...m}),f=useMemo(()=>i?new Cache([...i]):null,[i]),c=useMemo(()=>f?.getAllNodes(),[f]),{disabledKeys:S,expandedKeys:T,selectedKeys:h,visibleKeys:A,visibilityComputedKeys:I}=useMemo(()=>{const p={disabledKeys:c?new Set:o,expandedKeys:c?new Set:r,selectedKeys:c?new Set:n,visibleKeys:c?new Set:y,visibilityComputedKeys:new Set};return c?c.reduce((b,{key:C,isDisabled:G,isExpanded:J,isSelected:Q,isVisible:X,isVisibleComputed:Y})=>(G&&b.disabledKeys?.add(C),J&&b.expandedKeys?.add(C),Q&&b.selectedKeys?.add(C),X&&b.visibleKeys?.add(C),Y&&b.visibilityComputedKeys.add(C),b),p):p},[c,o,r,n,y]),F=h?p=>{p!=="all"&&N?.(p);}:void 0;return jsx(x.Provider,{value:{disabledKeys:S,expandedKeys:T,selectedKeys:h,showRuleLines:a,showVisibility:d,variant:w,visibleKeys:A,visibilityComputedKeys:I,isStatic:typeof t!="function",onVisibilityChange:K??(()=>{})},children:jsx(Tree,{...D,className:composeRenderProps(s,p=>pe({className:p,variant:w})),disabledKeys:S,dragAndDropHooks:V,expandedKeys:T,items:i,selectedKeys:h,onSelectionChange:F,selectionMode:l,children:t})})}H.displayName="Tree";const z=createContext({isVisible:true,isViewable:true,ancestors:[]});function u({className:t,id:s,...o}){const{visibilityComputedKeys:m,visibleKeys:r,isStatic:i}=useContext(x),{ancestors:n}=useContext(z),a=m?.has(s)||i&&n.every(l=>r?.has(l)),d=r?.has(s);return jsx(z.Provider,{value:{isVisible:d,isViewable:a,ancestors:[...n,s]},children:jsx(TreeItem,{...o,id:s,className:composeRenderProps(t,l=>ue({className:l})),"data-viewable":a||null,"data-visible":d||null})})}u.displayName="Tree.Item";function M({children:t}){const{showVisibility:s,variant:o,visibleKeys:m,onVisibilityChange:r}=useContext(x),{isVisible:i,isViewable:n}=useContext(z),a=o==="cozy"?"medium":"small";return jsx(TreeItemContent,{children:d=>{const{id:l,allowsDragging:w,hasChildItems:y,level:K,selectionBehavior:N,selectionMode:D,state:V,isDisabled:f,isExpanded:c,isSelected:S}=d,T=!(V.collection.getItem(l)?.nextKey||y),h=N==="toggle"&&D!=="none",A=()=>{const I=new Set(m);m?.has(l)?I.delete(l):I.add(l),r?.(I);};return jsx(Icon.Provider,{size:a,children:jsxs("div",{className:ye({variant:o}),"data-last-of-set":T,children:[s&&jsx(Button,{variant:"icon",color:"info",size:a,onPress:A,isDisabled:f,className:ge(),children:jsx(Icon,{children:i?jsx(Show,{}):jsx(Hide,{})})}),K>1&&jsx(we,{level:K,isLastOfSet:T}),y?jsx(Button,{slot:"chevron",variant:"icon",size:a,className:Ce(),children:jsx(Icon,{children:c?jsx(ChevronDown,{}):jsx(ChevronUp,{})})}):jsx("div",{className:E({variant:o})}),jsx("div",{className:fe({variant:o}),children:typeof t=="function"?t({...d,variant:o,isVisible:i,isViewable:n,defaultChildren:null}):t}),h&&jsx(Checkbox,{slot:"selection",isSelected:S,isDisabled:f}),w&&jsx(Button,{slot:"drag",variant:"icon",size:a,isDisabled:f,className:Ie({}),children:jsx(Icon,{children:jsx(DragVert,{})})})]})})}})}M.displayName="Tree.Item.Content";function W({children:t,className:s}){return jsx(Text,{className:ve({className:s}),children:t})}W.displayName="Tree.Item.Label";function U({children:t,className:s}){const{variant:o}=useContext(x);return o!=="crammed"?jsx(Text,{"data-slot":"description",className:he({className:s,variant:o}),children:t}):null}U.displayName="Tree.Item.Description";function _({children:t,className:s}){return jsx(Icon,{className:be({className:s}),children:t})}_.displayName="Tree.Item.PrefixIcon";function q({children:t,className:s}){return jsx("div",{className:Te({className:s}),children:t})}q.displayName="Tree.Icon.Actions",H.Item=u,u.Content=M,u.Label=W,u.Description=U,u.PrefixIcon=_,u.Actions=q;export{H as Tree,x as TreeContext,u as TreeItem,z as TreeItemContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map