@bolerish/ui 0.0.0-stage → 0.11.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 (195) hide show
  1. package/LICENSE +21 -0
  2. package/configuration_schema.json +105 -0
  3. package/dist/_tokens.js +395 -0
  4. package/dist/_tokens.js.map +7 -0
  5. package/dist/accordion.d.ts +17 -0
  6. package/dist/accordion.js +347 -0
  7. package/dist/accordion.js.map +7 -0
  8. package/dist/alert-dialog.d.ts +30 -0
  9. package/dist/alert-dialog.js +460 -0
  10. package/dist/alert-dialog.js.map +7 -0
  11. package/dist/aspect-ratio.d.ts +8 -0
  12. package/dist/aspect-ratio.js +45 -0
  13. package/dist/aspect-ratio.js.map +7 -0
  14. package/dist/attachment.d.ts +39 -0
  15. package/dist/attachment.js +600 -0
  16. package/dist/attachment.js.map +7 -0
  17. package/dist/avatar.d.ts +26 -0
  18. package/dist/avatar.js +393 -0
  19. package/dist/avatar.js.map +7 -0
  20. package/dist/badge.d.ts +10 -0
  21. package/dist/badge.js +82 -0
  22. package/dist/badge.js.map +7 -0
  23. package/dist/banner.d.ts +19 -0
  24. package/dist/banner.js +127 -0
  25. package/dist/banner.js.map +7 -0
  26. package/dist/breadcrumb.d.ts +27 -0
  27. package/dist/breadcrumb.js +426 -0
  28. package/dist/breadcrumb.js.map +7 -0
  29. package/dist/button-group.d.ts +15 -0
  30. package/dist/button-group.js +330 -0
  31. package/dist/button-group.js.map +7 -0
  32. package/dist/button.d.ts +17 -0
  33. package/dist/button.js +313 -0
  34. package/dist/button.js.map +7 -0
  35. package/dist/calendar.d.ts +10 -0
  36. package/dist/calendar.js +257 -0
  37. package/dist/calendar.js.map +7 -0
  38. package/dist/card.d.ts +16 -0
  39. package/dist/card.js +131 -0
  40. package/dist/card.js.map +7 -0
  41. package/dist/carousel.d.ts +34 -0
  42. package/dist/carousel.js +551 -0
  43. package/dist/carousel.js.map +7 -0
  44. package/dist/checkbox.d.ts +8 -0
  45. package/dist/checkbox.js +113 -0
  46. package/dist/checkbox.js.map +7 -0
  47. package/dist/cli.js +6 -0
  48. package/dist/cli.js.map +7 -0
  49. package/dist/collapsible.d.ts +17 -0
  50. package/dist/collapsible.js +337 -0
  51. package/dist/collapsible.js.map +7 -0
  52. package/dist/combobox.d.ts +37 -0
  53. package/dist/combobox.js +692 -0
  54. package/dist/combobox.js.map +7 -0
  55. package/dist/content-row.d.ts +32 -0
  56. package/dist/content-row.js +253 -0
  57. package/dist/content-row.js.map +7 -0
  58. package/dist/context-menu.d.ts +9 -0
  59. package/dist/context-menu.js +86 -0
  60. package/dist/context-menu.js.map +7 -0
  61. package/dist/date-picker.d.ts +11 -0
  62. package/dist/date-picker.js +140 -0
  63. package/dist/date-picker.js.map +7 -0
  64. package/dist/dialog.d.ts +33 -0
  65. package/dist/dialog.js +458 -0
  66. package/dist/dialog.js.map +7 -0
  67. package/dist/drawer.d.ts +37 -0
  68. package/dist/drawer.js +773 -0
  69. package/dist/drawer.js.map +7 -0
  70. package/dist/dropdown-menu.d.ts +52 -0
  71. package/dist/dropdown-menu.js +824 -0
  72. package/dist/dropdown-menu.js.map +7 -0
  73. package/dist/empty.d.ts +13 -0
  74. package/dist/empty.js +136 -0
  75. package/dist/empty.js.map +7 -0
  76. package/dist/field.d.ts +21 -0
  77. package/dist/field.js +578 -0
  78. package/dist/field.js.map +7 -0
  79. package/dist/global.css +19 -0
  80. package/dist/heading.d.ts +9 -0
  81. package/dist/heading.js +108 -0
  82. package/dist/heading.js.map +7 -0
  83. package/dist/hover-card.d.ts +16 -0
  84. package/dist/hover-card.js +202 -0
  85. package/dist/hover-card.js.map +7 -0
  86. package/dist/index.d.ts +96 -0
  87. package/dist/index.js +524 -0
  88. package/dist/index.js.map +7 -0
  89. package/dist/input-group.d.ts +22 -0
  90. package/dist/input-group.js +458 -0
  91. package/dist/input-group.js.map +7 -0
  92. package/dist/input-otp.d.ts +18 -0
  93. package/dist/input-otp.js +261 -0
  94. package/dist/input-otp.js.map +7 -0
  95. package/dist/input.d.ts +9 -0
  96. package/dist/input.js +141 -0
  97. package/dist/input.js.map +7 -0
  98. package/dist/kbd.d.ts +10 -0
  99. package/dist/kbd.js +66 -0
  100. package/dist/kbd.js.map +7 -0
  101. package/dist/label.d.ts +7 -0
  102. package/dist/label.js +101 -0
  103. package/dist/label.js.map +7 -0
  104. package/dist/link.d.ts +18 -0
  105. package/dist/link.js +194 -0
  106. package/dist/link.js.map +7 -0
  107. package/dist/marker.d.ts +15 -0
  108. package/dist/marker.js +99 -0
  109. package/dist/marker.js.map +7 -0
  110. package/dist/menubar.d.ts +26 -0
  111. package/dist/menubar.js +211 -0
  112. package/dist/menubar.js.map +7 -0
  113. package/dist/native-select.d.ts +15 -0
  114. package/dist/native-select.js +248 -0
  115. package/dist/native-select.js.map +7 -0
  116. package/dist/navigation-menu.d.ts +28 -0
  117. package/dist/navigation-menu.js +598 -0
  118. package/dist/navigation-menu.js.map +7 -0
  119. package/dist/p.d.ts +4 -0
  120. package/dist/p.js +7 -0
  121. package/dist/p.js.map +7 -0
  122. package/dist/pagination.d.ts +24 -0
  123. package/dist/pagination.js +425 -0
  124. package/dist/pagination.js.map +7 -0
  125. package/dist/paragraph.d.ts +8 -0
  126. package/dist/paragraph.js +106 -0
  127. package/dist/paragraph.js.map +7 -0
  128. package/dist/popover.d.ts +26 -0
  129. package/dist/popover.js +413 -0
  130. package/dist/popover.js.map +7 -0
  131. package/dist/primitives.d.ts +1 -0
  132. package/dist/primitives.js +5 -0
  133. package/dist/primitives.js.map +7 -0
  134. package/dist/progress.d.ts +8 -0
  135. package/dist/progress.js +88 -0
  136. package/dist/progress.js.map +7 -0
  137. package/dist/radio-group.d.ts +13 -0
  138. package/dist/radio-group.js +156 -0
  139. package/dist/radio-group.js.map +7 -0
  140. package/dist/reset.css +72 -0
  141. package/dist/scroll-area.d.ts +19 -0
  142. package/dist/scroll-area.js +302 -0
  143. package/dist/scroll-area.js.map +7 -0
  144. package/dist/select.d.ts +34 -0
  145. package/dist/select.js +649 -0
  146. package/dist/select.js.map +7 -0
  147. package/dist/separator.d.ts +9 -0
  148. package/dist/separator.js +107 -0
  149. package/dist/separator.js.map +7 -0
  150. package/dist/skeleton.d.ts +7 -0
  151. package/dist/skeleton.js +42 -0
  152. package/dist/skeleton.js.map +7 -0
  153. package/dist/slider.d.ts +10 -0
  154. package/dist/slider.js +145 -0
  155. package/dist/slider.js.map +7 -0
  156. package/dist/spinner.d.ts +8 -0
  157. package/dist/spinner.js +49 -0
  158. package/dist/spinner.js.map +7 -0
  159. package/dist/styles/control-layout.d.ts +9 -0
  160. package/dist/styles/merge-styles.d.ts +10 -0
  161. package/dist/stylex.css +2862 -0
  162. package/dist/switch.d.ts +9 -0
  163. package/dist/switch.js +153 -0
  164. package/dist/switch.js.map +7 -0
  165. package/dist/table.d.ts +31 -0
  166. package/dist/table.js +171 -0
  167. package/dist/table.js.map +7 -0
  168. package/dist/tabs.d.ts +20 -0
  169. package/dist/tabs.js +403 -0
  170. package/dist/tabs.js.map +7 -0
  171. package/dist/textarea.d.ts +7 -0
  172. package/dist/textarea.js +76 -0
  173. package/dist/textarea.js.map +7 -0
  174. package/dist/theme.d.ts +5 -0
  175. package/dist/theme.js +44 -0
  176. package/dist/theme.js.map +7 -0
  177. package/dist/timeline.d.ts +30 -0
  178. package/dist/timeline.js +182 -0
  179. package/dist/timeline.js.map +7 -0
  180. package/dist/toast.d.ts +14 -0
  181. package/dist/toast.js +463 -0
  182. package/dist/toast.js.map +7 -0
  183. package/dist/toast.stylex.d.ts +8 -0
  184. package/dist/toggle-group.d.ts +19 -0
  185. package/dist/toggle-group.js +324 -0
  186. package/dist/toggle-group.js.map +7 -0
  187. package/dist/toggle.d.ts +12 -0
  188. package/dist/toggle.js +192 -0
  189. package/dist/toggle.js.map +7 -0
  190. package/dist/tooltip.d.ts +14 -0
  191. package/dist/tooltip.js +214 -0
  192. package/dist/tooltip.js.map +7 -0
  193. package/dist/typography.d.ts +51 -0
  194. package/package.json +114 -3
  195. package/README.md +0 -3
@@ -0,0 +1,182 @@
1
+ // src/timeline.tsx
2
+ import * as stylex from "@stylexjs/stylex";
3
+
4
+ // src/styles/merge-styles.ts
5
+ function mergeStyles(base, className, style) {
6
+ if (className === void 0 && style === void 0) return base;
7
+ return {
8
+ ...base,
9
+ className: [base.className, className].filter(Boolean).join(" ") || void 0,
10
+ style: base.style || style ? {
11
+ ...base.style,
12
+ ...style
13
+ } : void 0
14
+ };
15
+ }
16
+
17
+ // src/timeline.tsx
18
+ import { jsx } from "react/jsx-runtime";
19
+ var styles = {
20
+ root: {
21
+ k1xSpc: "x78zum5",
22
+ kXwgrk: "xdt5ytf",
23
+ kOIVth: "xb7usi1",
24
+ kogj98: "x1ghz6dp",
25
+ kmVPX3: "x1717udv",
26
+ $$css: true
27
+ },
28
+ item: {
29
+ k1C7PZ: "x135c27o",
30
+ k1xSpc: "xrvj5dj",
31
+ kumcoG: "xu83cia",
32
+ kB88ic: "xe8uvvx",
33
+ k7Eaqz: "xeuugli",
34
+ kVAEAm: "x1n2onr6",
35
+ kLkRvE: "xqptg3k",
36
+ k5Ofw7: "xkv3d0j",
37
+ kgeoSG: "x1cpjm7i",
38
+ k75S9Q: "xp6z6r6",
39
+ kEoFBp: "x1hmns74",
40
+ k96MEf: "x1y3wzot",
41
+ kOlAkY: "x10crguv",
42
+ kxmVGU: "x2hztxu",
43
+ kSN9Vt: "x1wse844",
44
+ $$css: true
45
+ },
46
+ indicator: {
47
+ kGNEyG: "x6s0dn4",
48
+ kWkggS: "xcc0o6n",
49
+ kaIpWk: "xwhwt5f",
50
+ kMwMTN: "xj9e3ow",
51
+ k1xSpc: "x3nfvp2",
52
+ kGuDYH: "x18mp727",
53
+ kBCFzs: "xgkxs2y",
54
+ kZKoxP: "x1nb8khz",
55
+ kjj79g: "xl56j7k",
56
+ kVAEAm: "x1n2onr6",
57
+ kzqmXN: "xcasm8m",
58
+ kY2c9j: "x1vjfegm",
59
+ kGVxlE: "x1gnnqk1",
60
+ kVAM5u: "x1kqtvf4",
61
+ ksu8eU: "x1y0btm7",
62
+ kMzoRj: "x1al7nqq",
63
+ $$css: true
64
+ },
65
+ content: {
66
+ k1xSpc: "x78zum5",
67
+ kXwgrk: "xdt5ytf",
68
+ kOIVth: "x7gjopr",
69
+ kBCFzs: "x1npkx4u",
70
+ k7Eaqz: "xeuugli",
71
+ k8WAf4: "x1mmca2r",
72
+ $$css: true
73
+ },
74
+ title: {
75
+ kMwMTN: "x1t28c4i",
76
+ kGuDYH: "x1lskvfa",
77
+ k63SB2: "xoop9yj",
78
+ kLWn49: "x15rnifv",
79
+ $$css: true
80
+ },
81
+ description: {
82
+ kMwMTN: "xj9e3ow",
83
+ kGuDYH: "x1lskvfa",
84
+ kLWn49: "xipl0i2",
85
+ kogj98: "x1ghz6dp",
86
+ $$css: true
87
+ },
88
+ time: {
89
+ kMwMTN: "xhsft5x",
90
+ kGuDYH: "x1gag4p9",
91
+ kLWn49: "xipl0i2",
92
+ $$css: true
93
+ }
94
+ };
95
+ var indicatorVariantStyles = {
96
+ default: {
97
+ $$css: true
98
+ },
99
+ active: {
100
+ kWkggS: "x1k98rc1",
101
+ kVAM5u: "x1lpgi1j",
102
+ kMwMTN: "x8p6z4r",
103
+ $$css: true
104
+ },
105
+ complete: {
106
+ kWkggS: "x7nrqp9",
107
+ kMwMTN: "x1t28c4i",
108
+ $$css: true
109
+ },
110
+ error: {
111
+ kWkggS: "x1joc7g2",
112
+ kMwMTN: "xat8mfl",
113
+ $$css: true
114
+ }
115
+ };
116
+ function Timeline({
117
+ className,
118
+ style,
119
+ xstyle,
120
+ ...props2
121
+ }) {
122
+ return /* @__PURE__ */ jsx("ol", { ...props2, ...mergeStyles(stylex.props(styles.root, xstyle), className, style) });
123
+ }
124
+ function TimelineItem({
125
+ className,
126
+ style,
127
+ xstyle,
128
+ ...props2
129
+ }) {
130
+ return /* @__PURE__ */ jsx("li", { ...props2, ...mergeStyles(stylex.props(styles.item, xstyle), className, style) });
131
+ }
132
+ function TimelineIndicator({
133
+ className,
134
+ style,
135
+ xstyle,
136
+ variant = "default",
137
+ ...props2
138
+ }) {
139
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": props2["aria-label"] === void 0 ? true : void 0, ...props2, ...mergeStyles(stylex.props(styles.indicator, indicatorVariantStyles[variant], xstyle), className, style) });
140
+ }
141
+ function TimelineContent({
142
+ className,
143
+ style,
144
+ xstyle,
145
+ ...props2
146
+ }) {
147
+ return /* @__PURE__ */ jsx("div", { ...props2, ...mergeStyles(stylex.props(styles.content, xstyle), className, style) });
148
+ }
149
+ function TimelineTitle({
150
+ className,
151
+ style,
152
+ xstyle,
153
+ ...props2
154
+ }) {
155
+ return /* @__PURE__ */ jsx("div", { ...props2, ...mergeStyles(stylex.props(styles.title, xstyle), className, style) });
156
+ }
157
+ function TimelineDescription({
158
+ className,
159
+ style,
160
+ xstyle,
161
+ ...props2
162
+ }) {
163
+ return /* @__PURE__ */ jsx("p", { ...props2, ...mergeStyles(stylex.props(styles.description, xstyle), className, style) });
164
+ }
165
+ function TimelineTime({
166
+ className,
167
+ style,
168
+ xstyle,
169
+ ...props2
170
+ }) {
171
+ return /* @__PURE__ */ jsx("time", { ...props2, ...mergeStyles(stylex.props(styles.time, xstyle), className, style) });
172
+ }
173
+ export {
174
+ Timeline,
175
+ TimelineContent,
176
+ TimelineDescription,
177
+ TimelineIndicator,
178
+ TimelineItem,
179
+ TimelineTime,
180
+ TimelineTitle
181
+ };
182
+ //# sourceMappingURL=timeline.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/timeline.tsx", "../src/styles/merge-styles.ts"],
4
+ "sourcesContent": ["import { colorVars, radiusVars, sizeVars, spacingVars, typo } from \"@bolerish/tokens/semantic.stylex\";\nimport * as stylex from \"@stylexjs/stylex\";\nimport type { ComponentProps } from \"react\";\nimport type { ControlPlacementStyles } from \"./styles/control-layout\";\nimport { mergeStyles } from \"./styles/merge-styles\";\nimport type { StyledProps } from \"./styles/merge-styles\";\nconst styles = {\n root: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xb7usi1\",\n kogj98: \"x1ghz6dp\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n item: {\n k1C7PZ: \"x135c27o\",\n k1xSpc: \"xrvj5dj\",\n kumcoG: \"xu83cia\",\n kB88ic: \"xe8uvvx\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n kLkRvE: \"xqptg3k\",\n k5Ofw7: \"xkv3d0j\",\n kgeoSG: \"x1cpjm7i\",\n k75S9Q: \"xp6z6r6\",\n kEoFBp: \"x1hmns74\",\n k96MEf: \"x1y3wzot\",\n kOlAkY: \"x10crguv\",\n kxmVGU: \"x2hztxu\",\n kSN9Vt: \"x1wse844\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xcc0o6n\",\n kaIpWk: \"xwhwt5f\",\n kMwMTN: \"xj9e3ow\",\n k1xSpc: \"x3nfvp2\",\n kGuDYH: \"x18mp727\",\n kBCFzs: \"xgkxs2y\",\n kZKoxP: \"x1nb8khz\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6\",\n kzqmXN: \"xcasm8m\",\n kY2c9j: \"x1vjfegm\",\n kGVxlE: \"x1gnnqk1\",\n kVAM5u: \"x1kqtvf4\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"x1al7nqq\",\n $$css: true\n },\n content: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x7gjopr\",\n kBCFzs: \"x1npkx4u\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1mmca2r\",\n $$css: true\n },\n title: {\n kMwMTN: \"x1t28c4i\",\n kGuDYH: \"x1lskvfa\",\n k63SB2: \"xoop9yj\",\n kLWn49: \"x15rnifv\",\n $$css: true\n },\n description: {\n kMwMTN: \"xj9e3ow\",\n kGuDYH: \"x1lskvfa\",\n kLWn49: \"xipl0i2\",\n kogj98: \"x1ghz6dp\",\n $$css: true\n },\n time: {\n kMwMTN: \"xhsft5x\",\n kGuDYH: \"x1gag4p9\",\n kLWn49: \"xipl0i2\",\n $$css: true\n }\n};\nconst indicatorVariantStyles = {\n default: {\n $$css: true\n },\n active: {\n kWkggS: \"x1k98rc1\",\n kVAM5u: \"x1lpgi1j\",\n kMwMTN: \"x8p6z4r\",\n $$css: true\n },\n complete: {\n kWkggS: \"x7nrqp9\",\n kMwMTN: \"x1t28c4i\",\n $$css: true\n },\n error: {\n kWkggS: \"x1joc7g2\",\n kMwMTN: \"xat8mfl\",\n $$css: true\n }\n};\nexport type TimelineIndicatorVariant = \"active\" | \"complete\" | \"default\" | \"error\";\nexport type TimelineProps = StyledProps<ComponentProps<\"ol\">> & {\n xstyle?: stylex.StyleXStyles;\n};\nexport function Timeline({\n className,\n style,\n xstyle,\n ...props\n}: TimelineProps) {\n return <ol {...props} {...mergeStyles(stylex.props(styles.root, xstyle), className, style)} />;\n}\nexport type TimelineItemProps = StyledProps<ComponentProps<\"li\">> & {\n xstyle?: stylex.StyleXStyles;\n};\nexport function TimelineItem({\n className,\n style,\n xstyle,\n ...props\n}: TimelineItemProps) {\n return <li {...props} {...mergeStyles(stylex.props(styles.item, xstyle), className, style)} />;\n}\nexport type TimelineIndicatorProps = StyledProps<ComponentProps<\"span\">> & {\n variant?: TimelineIndicatorVariant;\n xstyle?: stylex.StyleXStyles;\n};\nexport function TimelineIndicator({\n className,\n style,\n xstyle,\n variant = \"default\",\n ...props\n}: TimelineIndicatorProps) {\n return <span aria-hidden={props[\"aria-label\"] === undefined ? true : undefined} {...props} {...mergeStyles(stylex.props(styles.indicator, indicatorVariantStyles[variant], xstyle), className, style)} />;\n}\nexport function TimelineContent({\n className,\n style,\n xstyle,\n ...props\n}: StyledProps<ComponentProps<\"div\">> & {\n xstyle?: stylex.StyleXStyles;\n}) {\n return <div {...props} {...mergeStyles(stylex.props(styles.content, xstyle), className, style)} />;\n}\nexport function TimelineTitle({\n className,\n style,\n xstyle,\n ...props\n}: StyledProps<ComponentProps<\"div\">> & {\n xstyle?: ControlPlacementStyles;\n}) {\n return <div {...props} {...mergeStyles(stylex.props(styles.title, xstyle), className, style)} />;\n}\nexport function TimelineDescription({\n className,\n style,\n xstyle,\n ...props\n}: StyledProps<ComponentProps<\"p\">> & {\n xstyle?: ControlPlacementStyles;\n}) {\n return <p {...props} {...mergeStyles(stylex.props(styles.description, xstyle), className, style)} />;\n}\nexport function TimelineTime({\n className,\n style,\n xstyle,\n ...props\n}: StyledProps<ComponentProps<\"time\">> & {\n xstyle?: ControlPlacementStyles;\n}) {\n return <time {...props} {...mergeStyles(stylex.props(styles.time, xstyle), className, style)} />;\n}", "import type * as stylex from \"@stylexjs/stylex\";\nimport type { CSSProperties } from \"react\";\nexport type StyledProps<Props> = Props extends unknown ? Omit<Props, \"className\" | \"style\"> & {\n className?: string;\n style?: CSSProperties;\n} : never;\nexport function mergeStyles(base: ReturnType<typeof stylex.props>, className?: string, style?: CSSProperties): {\n className?: string;\n style?: CSSProperties;\n} {\n if (className === undefined && style === undefined) return base;\n return {\n ...base,\n className: [base.className, className].filter(Boolean).join(\" \") || undefined,\n style: base.style || style ? {\n ...base.style,\n ...style\n } : undefined\n };\n}"],
5
+ "mappings": "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",
6
+ "names": ["props"]
7
+ }
@@ -0,0 +1,14 @@
1
+ import { Toast as ToastPrimitive } from "@base-ui/react/toast";
2
+ import * as stylex from "@stylexjs/stylex";
3
+ import { type ComponentProps } from "react";
4
+ import type { StyledProps } from "./styles/merge-styles";
5
+ export type ToastPosition = "bottom-center" | "bottom-left" | "bottom-right" | "top-center" | "top-left" | "top-right";
6
+ export type ToasterProps = StyledProps<Omit<ComponentProps<typeof ToastPrimitive.Provider>, "children" | "toastManager">> & {
7
+ /** Toast viewport position. @default "bottom-right" */
8
+ position?: ToastPosition;
9
+ /** Content and accessible label for the action that dismisses all toasts. */
10
+ clearAllProps?: Pick<ComponentProps<"button">, "children" | "aria-label">;
11
+ xstyle?: stylex.StyleXStyles;
12
+ };
13
+ export declare const toast: import("@base-ui/react").ToastManager<any>;
14
+ export declare function Toaster({ className, style, xstyle, limit, position, clearAllProps, ...props }: ToasterProps): import("react").JSX.Element;
package/dist/toast.js ADDED
@@ -0,0 +1,463 @@
1
+ "use client";
2
+
3
+ // src/toast.tsx
4
+ import { c as _c } from "react/compiler-runtime";
5
+ import { Toast as ToastPrimitive } from "@base-ui/react/toast";
6
+ import { CheckCircleIcon, InfoIcon, WarningIcon, XCircleIcon, XIcon } from "@phosphor-icons/react";
7
+ import * as stylex from "@stylexjs/stylex";
8
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
9
+
10
+ // src/styles/merge-styles.ts
11
+ function mergeStyles(base, className, style) {
12
+ if (className === void 0 && style === void 0) return base;
13
+ return {
14
+ ...base,
15
+ className: [base.className, className].filter(Boolean).join(" ") || void 0,
16
+ style: base.style || style ? {
17
+ ...base.style,
18
+ ...style
19
+ } : void 0
20
+ };
21
+ }
22
+
23
+ // src/toast.stylex.ts
24
+ var toastViewportVars = {
25
+ contentMinHeight: "var(--x1jisfxj)",
26
+ clearActionOffset: "var(--x1b09lcw)",
27
+ clearActionOpacity: "var(--x1vywji9)",
28
+ clearActionPointerEvents: "var(--x4bl00v)",
29
+ stackPointerEvents: "var(--x1jg9r7c)",
30
+ __varGroupHash__: "x1da2mid"
31
+ };
32
+
33
+ // src/typography.ts
34
+ var typographyStyles = {
35
+ body: {
36
+ kMv6JI: "x1b1to7n",
37
+ kGuDYH: "x199wi4b",
38
+ k63SB2: "x6valzt",
39
+ kLWn49: "xipl0i2",
40
+ $$css: true
41
+ },
42
+ description: {
43
+ kMv6JI: "x1b1to7n",
44
+ kGuDYH: "x1lskvfa",
45
+ k63SB2: "x6valzt",
46
+ kLWn49: "xipl0i2",
47
+ $$css: true
48
+ },
49
+ caption: {
50
+ kMv6JI: "x1b1to7n",
51
+ kGuDYH: "x1gag4p9",
52
+ k63SB2: "x6valzt",
53
+ kLWn49: "xipl0i2",
54
+ $$css: true
55
+ },
56
+ label: {
57
+ kMv6JI: "x1b1to7n",
58
+ kGuDYH: "x1lskvfa",
59
+ k63SB2: "xoop9yj",
60
+ kLWn49: "xipl0i2",
61
+ $$css: true
62
+ },
63
+ title: {
64
+ kMv6JI: "x1b1to7n",
65
+ kGuDYH: "x1lskvfa",
66
+ k63SB2: "xoop9yj",
67
+ kLWn49: "x15rnifv",
68
+ $$css: true
69
+ },
70
+ page: {
71
+ kMv6JI: "x1yd4tj7",
72
+ kGuDYH: "xw8z6gz",
73
+ k63SB2: "x5cgamv",
74
+ kLWn49: "x15rnifv",
75
+ $$css: true
76
+ },
77
+ section: {
78
+ kMv6JI: "x1yd4tj7",
79
+ kGuDYH: "xr5nsds",
80
+ k63SB2: "x5cgamv",
81
+ kLWn49: "x15rnifv",
82
+ $$css: true
83
+ },
84
+ subsection: {
85
+ kMv6JI: "x1yd4tj7",
86
+ kGuDYH: "x199wi4b",
87
+ k63SB2: "x5cgamv",
88
+ kLWn49: "x15rnifv",
89
+ $$css: true
90
+ }
91
+ };
92
+
93
+ // src/toast.tsx
94
+ import { jsx, jsxs } from "react/jsx-runtime";
95
+ var _temp3 = {
96
+ krVfgx: "x1ey2m1c",
97
+ k1C7PZ: "x135c27o",
98
+ kbCHJM: "xu96u03",
99
+ kfzvcC: "x19gcdlt",
100
+ kVAEAm: "x10l6tqk",
101
+ kCIrl2: "x3m8u43",
102
+ "$$css": true
103
+ };
104
+ var styles = {
105
+ viewport: {
106
+ ks0D6T: "xx2ukoz",
107
+ kI3sdo: "x1a2a7pz",
108
+ kfzvcC: "x47corl",
109
+ kVAEAm: "xixxii4",
110
+ kzqmXN: "x1jjrdmz",
111
+ kY2c9j: "x1p9f38c",
112
+ "--x1jg9r7c": "xubdx0t x4v2x3q",
113
+ "--x1b09lcw": "xfm59fq x1o7wwc1",
114
+ "--x1vywji9": "x195h665 xakxg0y",
115
+ "--x4bl00v": "x1yudz8v xapp0bv",
116
+ $$css: true
117
+ },
118
+ stack: (height) => [_temp3, {
119
+ kZKoxP: height != null ? "x16ye13r" : height,
120
+ $$css: true
121
+ }, {
122
+ "--x-height": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(height)
123
+ }],
124
+ stackTop: {
125
+ krVfgx: "xdd4er5",
126
+ k87sOh: "x13vifvy",
127
+ $$css: true
128
+ },
129
+ title: {
130
+ kogj98: "x1ghz6dp",
131
+ $$css: true
132
+ },
133
+ description: {
134
+ kMwMTN: "xj9e3ow",
135
+ kogj98: "x1ghz6dp",
136
+ $$css: true
137
+ }
138
+ };
139
+ var verticalPositionStyles = {
140
+ top: {
141
+ k87sOh: "x1rfcczn",
142
+ $$css: true
143
+ },
144
+ bottom: {
145
+ krVfgx: "x1tfherw",
146
+ $$css: true
147
+ }
148
+ };
149
+ var horizontalPositionStyles = {
150
+ left: {
151
+ kbCHJM: "x1vitsko",
152
+ $$css: true
153
+ },
154
+ center: {
155
+ kbCHJM: "x1nrll8i",
156
+ k3aq6I: "xuuh30",
157
+ $$css: true
158
+ },
159
+ right: {
160
+ kCIrl2: "x1pyr0o",
161
+ $$css: true
162
+ }
163
+ };
164
+ var toast = ToastPrimitive.createToastManager();
165
+ var toastIcons = {
166
+ success: CheckCircleIcon,
167
+ info: InfoIcon,
168
+ warning: WarningIcon,
169
+ error: XCircleIcon
170
+ };
171
+ function ToastStatusIcon(t0) {
172
+ const $ = _c(4);
173
+ const {
174
+ type
175
+ } = t0;
176
+ if (!type || type === "default") {
177
+ return null;
178
+ }
179
+ if (type === "loading") {
180
+ let t12;
181
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
182
+ t12 = /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "xoi2r2e x6s0dn4 x3nfvp2 x2lah0s x1b1to7n x1lskvfa xoop9yj x15rnifv xl56j7k x1ts0t7r x12vebyb", children: /* @__PURE__ */ jsx("span", { className: "x12dvent xa4qsjk xpedhrg x1esw782 x1kqtvf4 xwhwt5f x1y0btm7 xqvd2ze x2lah0s x1oo1j9p x1ts0t7r xl6f310" }) });
183
+ $[0] = t12;
184
+ } else {
185
+ t12 = $[0];
186
+ }
187
+ return t12;
188
+ }
189
+ const IconComponent = toastIcons[type];
190
+ if (!IconComponent) {
191
+ return null;
192
+ }
193
+ let t1;
194
+ if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
195
+ t1 = {
196
+ className: "xoi2r2e x6s0dn4 x3nfvp2 x2lah0s x1b1to7n x1lskvfa xoop9yj x15rnifv xl56j7k x1ts0t7r x12vebyb"
197
+ };
198
+ $[1] = t1;
199
+ } else {
200
+ t1 = $[1];
201
+ }
202
+ let t2;
203
+ if ($[2] !== IconComponent) {
204
+ t2 = /* @__PURE__ */ jsx("span", { "aria-hidden": "true", ...t1, children: /* @__PURE__ */ jsx(IconComponent, {}) });
205
+ $[2] = IconComponent;
206
+ $[3] = t2;
207
+ } else {
208
+ t2 = $[3];
209
+ }
210
+ return t2;
211
+ }
212
+ function ToastStack(t0) {
213
+ const $ = _c(11);
214
+ const {
215
+ position,
216
+ clearAllProps
217
+ } = t0;
218
+ const {
219
+ toasts
220
+ } = ToastPrimitive.useToastManager();
221
+ const stackRef = useRef(null);
222
+ let t1;
223
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
224
+ t1 = /* @__PURE__ */ new Set();
225
+ $[0] = t1;
226
+ } else {
227
+ t1 = $[0];
228
+ }
229
+ const dismissedIds = useRef(t1);
230
+ const [height, setHeight] = useState(0);
231
+ const isTop = position.startsWith("top");
232
+ const hasClearAction = toasts.length > 1;
233
+ const stackHeight = hasClearAction ? `calc(${height}px + ${toastViewportVars.clearActionOffset})` : height;
234
+ let t2;
235
+ let t3;
236
+ if ($[1] !== toasts) {
237
+ t2 = () => {
238
+ const stack = stackRef.current;
239
+ if (!stack) {
240
+ return;
241
+ }
242
+ const document = stack.ownerDocument;
243
+ const currentIds = new Set(toasts.map(_temp));
244
+ for (const id of dismissedIds.current) {
245
+ if (!currentIds.has(id)) {
246
+ dismissedIds.current.delete(id);
247
+ }
248
+ }
249
+ const handleEscape = (event) => {
250
+ if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) {
251
+ return;
252
+ }
253
+ const latest = toasts.find((item_0) => item_0.transitionStatus !== "ending" && !dismissedIds.current.has(item_0.id));
254
+ if (!latest) {
255
+ return;
256
+ }
257
+ event.preventDefault();
258
+ event.stopPropagation();
259
+ if (event.repeat) {
260
+ return;
261
+ }
262
+ dismissedIds.current.add(latest.id);
263
+ toast.close(latest.id);
264
+ };
265
+ stack.addEventListener("keydown", handleEscape, true);
266
+ document.addEventListener("keydown", handleEscape);
267
+ return () => {
268
+ stack.removeEventListener("keydown", handleEscape, true);
269
+ document.removeEventListener("keydown", handleEscape);
270
+ };
271
+ };
272
+ t3 = [toasts];
273
+ $[1] = toasts;
274
+ $[2] = t2;
275
+ $[3] = t3;
276
+ } else {
277
+ t2 = $[2];
278
+ t3 = $[3];
279
+ }
280
+ useEffect(t2, t3);
281
+ let t4;
282
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
283
+ t4 = () => {
284
+ const stack_0 = stackRef.current;
285
+ if (!stack_0) {
286
+ return;
287
+ }
288
+ const updateHeight = () => {
289
+ const rootList = Array.from(stack_0.querySelectorAll("[data-bolerish-toast-root]:not([data-limited])"));
290
+ const toastGap = Number.parseFloat(getComputedStyle(stack_0).columnGap) || 0;
291
+ let nextHeight = 0;
292
+ for (const root of rootList) {
293
+ const rootStyles = getComputedStyle(root);
294
+ const offset = Number.parseFloat(rootStyles.getPropertyValue("--toast-offset-y")) || 0;
295
+ const index = Number.parseFloat(rootStyles.getPropertyValue("--toast-index")) || 0;
296
+ const rootHeight = Number.parseFloat(rootStyles.getPropertyValue("--toast-height")) || root.offsetHeight;
297
+ nextHeight = Math.max(nextHeight, offset + index * toastGap + rootHeight);
298
+ }
299
+ setHeight(nextHeight);
300
+ };
301
+ updateHeight();
302
+ const resizeObserver = new ResizeObserver(updateHeight);
303
+ const rootList_0 = stack_0.querySelectorAll("[data-bolerish-toast-root]");
304
+ rootList_0.forEach((root_0) => resizeObserver.observe(root_0));
305
+ window.addEventListener("resize", updateHeight);
306
+ return () => {
307
+ resizeObserver.disconnect();
308
+ window.removeEventListener("resize", updateHeight);
309
+ };
310
+ };
311
+ $[4] = t4;
312
+ } else {
313
+ t4 = $[4];
314
+ }
315
+ let t5;
316
+ if ($[5] !== toasts) {
317
+ t5 = [toasts];
318
+ $[5] = toasts;
319
+ $[6] = t5;
320
+ } else {
321
+ t5 = $[6];
322
+ }
323
+ useLayoutEffect(t4, t5);
324
+ const t6 = stylex.props(styles.stack(stackHeight), isTop && styles.stackTop);
325
+ const t7 = toasts.map((item_1) => /* @__PURE__ */ jsx(ToastPrimitive.Root, { toast: item_1, "data-bolerish-toast-root": "", ...{
326
+ 0: {
327
+ className: "xssngo0 x1kqtvf4 x1p5vitp x1y0btm7 x1al7nqq x1ey2m1c x1wlfqej x1t28c4i x4a9ltk x1a2a7pz xb3r6kr x67bb7w x10l6tqk x1c0vqr xxvvz4p x11u84u xm4efwp x5oyd77 x87ps6o x14atkfc x1l48cz2 x1s928wv x1kk1a3e x17cx49 x1j6awrg x1srwf7z x4eaejv x768paa x1p3hdyt x9v5kkp x1k4h2j2 xnbj6on x1p2l3ex x83jlts x1pn4af4 x1tsqv5g x1a042xe xlq082z xm69ghq x1llxi74 x1i389j4 x1gqblgl x1yzz94r xkjqs5f x17lkgwk xnikld8 x4efaqc xt8ron0 xjxp94 x8no7jv"
328
+ },
329
+ 1: {
330
+ className: "xssngo0 x1kqtvf4 x1p5vitp x1y0btm7 x1al7nqq x1wlfqej x1t28c4i x4a9ltk x1a2a7pz xb3r6kr x67bb7w x10l6tqk x1c0vqr xxvvz4p x5oyd77 x87ps6o x14atkfc x1l48cz2 x1s928wv x1kk1a3e x17cx49 x1j6awrg x1srwf7z x4eaejv x768paa x1p3hdyt x9v5kkp x1k4h2j2 xnbj6on x1p2l3ex x83jlts x1pn4af4 x1a042xe xlq082z xm69ghq x1llxi74 x1gqblgl xkjqs5f x17lkgwk xt8ron0 xdd4er5 x13vifvy xhvwxil xtj8gnn x11k6b27 xv51xxh x18p6d6d xde6doo xf2eeoe x97zdyu x1kkyvpd"
331
+ }
332
+ }[!!isTop << 0], children: /* @__PURE__ */ jsxs(ToastPrimitive.Content, { className: "x6s0dn4 x78zum5 x6tv65x x5yr21d x1m7qoog xb3r6kr xv3ig3d x1n2onr6 x1vrxc1k x19991ni xrkjf8i x14vjn7q x14cldyx", children: [
333
+ /* @__PURE__ */ jsx(ToastStatusIcon, { type: item_1.type }),
334
+ /* @__PURE__ */ jsxs("div", { className: "xoi2r2e x78zum5 x98rzlu xdt5ytf x7gjopr xeuugli", children: [
335
+ /* @__PURE__ */ jsx(ToastPrimitive.Title, { ...stylex.props(typographyStyles.title, styles.title) }),
336
+ /* @__PURE__ */ jsx(ToastPrimitive.Description, { ...stylex.props(typographyStyles.description, styles.description) })
337
+ ] }),
338
+ item_1.actionProps ? /* @__PURE__ */ jsx(ToastPrimitive.Action, { className: "xoi2r2e x6s0dn4 xjyslct xjbqb8w x1p5vitp xng3xce xc342km x1t28c4i x1ypdohk x3nfvp2 x2lah0s x1b1to7n x1gag4p9 xoop9yj x15rnifv x1nb8khz xl56j7k x1a2a7pz x5044ve xznvecg xt3l3uh xrkjf8i xt0b8zv x768paa x1p3hdyt x9v5kkp x1k4h2j2" }) : null,
339
+ /* @__PURE__ */ jsx(ToastPrimitive.Close, { "aria-label": "Close toast", className: "xoi2r2e x6s0dn4 xjyslct xjbqb8w x9r1u3d x1p5vitp x1y0btm7 x1al7nqq xj9e3ow x1ypdohk x3nfvp2 x2lah0s x1b1to7n x1lskvfa xoop9yj x15rnifv x1nb8khz xl56j7k x1a2a7pz xznvecg xs2xxs2 xrkjf8i xcasm8m x12vebyb xk9i4fa x1woi373 x768paa x1p3hdyt x9v5kkp x1k4h2j2", children: /* @__PURE__ */ jsx(XIcon, { "aria-hidden": "true" }) })
340
+ ] }) }, item_1.id));
341
+ const t8 = hasClearAction ? /* @__PURE__ */ jsx("button", { ...clearAllProps, type: "button", onClick: _temp2, ...{
342
+ 0: {
343
+ className: "xjyslct xssngo0 x1kqtvf4 x1y0btm7 x1p5vitp x1al7nqq xj9e3ow x1ypdohk x1b1to7n x1gag4p9 xoop9yj x1dvwle6 x1a2a7pz x1mmca2r x1gr5eyh x1o036j4 xcmrzjo x10l6tqk x3m8u43 x13vifvy xznvecg x7h6xqb xrkjf8i x1bkdxzg xc0dknh x1woi373 x768paa x1p3hdyt x9v5kkp x1k4h2j2"
344
+ },
345
+ 1: {
346
+ className: "xjyslct xssngo0 x1kqtvf4 x1y0btm7 x1p5vitp x1al7nqq xj9e3ow x1ypdohk x1b1to7n x1gag4p9 xoop9yj x1dvwle6 x1a2a7pz x1mmca2r x1gr5eyh x1o036j4 xcmrzjo x10l6tqk x3m8u43 xznvecg x7h6xqb xrkjf8i x1bkdxzg xc0dknh x1woi373 x768paa x1p3hdyt x9v5kkp x1k4h2j2 x1ey2m1c x80663w"
347
+ }
348
+ }[!!isTop << 0], children: clearAllProps?.children ?? "Clear all" }) : null;
349
+ let t9;
350
+ if ($[7] !== t6 || $[8] !== t7 || $[9] !== t8) {
351
+ t9 = /* @__PURE__ */ jsxs("div", { ref: stackRef, ...t6, children: [
352
+ t7,
353
+ t8
354
+ ] });
355
+ $[7] = t6;
356
+ $[8] = t7;
357
+ $[9] = t8;
358
+ $[10] = t9;
359
+ } else {
360
+ t9 = $[10];
361
+ }
362
+ return t9;
363
+ }
364
+ function _temp2() {
365
+ return toast.close();
366
+ }
367
+ function _temp(item) {
368
+ return item.id;
369
+ }
370
+ function Toaster(t0) {
371
+ const $ = _c(26);
372
+ let className;
373
+ let clearAllProps;
374
+ let props2;
375
+ let style;
376
+ let t1;
377
+ let t2;
378
+ let xstyle;
379
+ if ($[0] !== t0) {
380
+ ({
381
+ className,
382
+ style,
383
+ xstyle,
384
+ limit: t1,
385
+ position: t2,
386
+ clearAllProps,
387
+ ...props2
388
+ } = t0);
389
+ $[0] = t0;
390
+ $[1] = className;
391
+ $[2] = clearAllProps;
392
+ $[3] = props2;
393
+ $[4] = style;
394
+ $[5] = t1;
395
+ $[6] = t2;
396
+ $[7] = xstyle;
397
+ } else {
398
+ className = $[1];
399
+ clearAllProps = $[2];
400
+ props2 = $[3];
401
+ style = $[4];
402
+ t1 = $[5];
403
+ t2 = $[6];
404
+ xstyle = $[7];
405
+ }
406
+ const limit = t1 === void 0 ? 3 : t1;
407
+ const position = t2 === void 0 ? "bottom-right" : t2;
408
+ let t3;
409
+ if ($[8] !== position) {
410
+ t3 = position.split("-");
411
+ $[8] = position;
412
+ $[9] = t3;
413
+ } else {
414
+ t3 = $[9];
415
+ }
416
+ const [verticalPosition, horizontalPosition] = t3;
417
+ let t4;
418
+ if ($[10] !== className || $[11] !== horizontalPosition || $[12] !== style || $[13] !== verticalPosition || $[14] !== xstyle) {
419
+ t4 = mergeStyles(stylex.props(styles.viewport, verticalPositionStyles[verticalPosition], horizontalPositionStyles[horizontalPosition], xstyle), className, style);
420
+ $[10] = className;
421
+ $[11] = horizontalPosition;
422
+ $[12] = style;
423
+ $[13] = verticalPosition;
424
+ $[14] = xstyle;
425
+ $[15] = t4;
426
+ } else {
427
+ t4 = $[15];
428
+ }
429
+ let t5;
430
+ if ($[16] !== clearAllProps || $[17] !== position) {
431
+ t5 = /* @__PURE__ */ jsx(ToastStack, { position, clearAllProps });
432
+ $[16] = clearAllProps;
433
+ $[17] = position;
434
+ $[18] = t5;
435
+ } else {
436
+ t5 = $[18];
437
+ }
438
+ let t6;
439
+ if ($[19] !== t4 || $[20] !== t5) {
440
+ t6 = /* @__PURE__ */ jsx(ToastPrimitive.Portal, { children: /* @__PURE__ */ jsx(ToastPrimitive.Viewport, { ...t4, children: t5 }) });
441
+ $[19] = t4;
442
+ $[20] = t5;
443
+ $[21] = t6;
444
+ } else {
445
+ t6 = $[21];
446
+ }
447
+ let t7;
448
+ if ($[22] !== limit || $[23] !== props2 || $[24] !== t6) {
449
+ t7 = /* @__PURE__ */ jsx(ToastPrimitive.Provider, { ...props2, limit, toastManager: toast, children: t6 });
450
+ $[22] = limit;
451
+ $[23] = props2;
452
+ $[24] = t6;
453
+ $[25] = t7;
454
+ } else {
455
+ t7 = $[25];
456
+ }
457
+ return t7;
458
+ }
459
+ export {
460
+ Toaster,
461
+ toast
462
+ };
463
+ //# sourceMappingURL=toast.js.map