@beryl-ui/react 2.2.1 → 2.2.2
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.
- package/dist/index.d.mts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +20 -17
- package/dist/index.mjs +16 -13
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -23,10 +23,7 @@ declare const BoxContainer: styled_components_dist_types.IStyledComponentBase<"w
|
|
|
23
23
|
interface BoxProps extends ComponentProps<typeof BoxContainer> {
|
|
24
24
|
as?: ElementType;
|
|
25
25
|
}
|
|
26
|
-
declare
|
|
27
|
-
declare namespace Box {
|
|
28
|
-
var displayName: string;
|
|
29
|
-
}
|
|
26
|
+
declare const Box: react.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
30
27
|
|
|
31
28
|
interface ButtonContainerProps {
|
|
32
29
|
variant?: "primary" | "secondary" | "tertiary";
|
package/dist/index.d.ts
CHANGED
|
@@ -23,10 +23,7 @@ declare const BoxContainer: styled_components_dist_types.IStyledComponentBase<"w
|
|
|
23
23
|
interface BoxProps extends ComponentProps<typeof BoxContainer> {
|
|
24
24
|
as?: ElementType;
|
|
25
25
|
}
|
|
26
|
-
declare
|
|
27
|
-
declare namespace Box {
|
|
28
|
-
var displayName: string;
|
|
29
|
-
}
|
|
26
|
+
declare const Box: react.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
30
27
|
|
|
31
28
|
interface ButtonContainerProps {
|
|
32
29
|
variant?: "primary" | "secondary" | "tertiary";
|
package/dist/index.js
CHANGED
|
@@ -120,6 +120,9 @@ function Avatar2(props) {
|
|
|
120
120
|
}
|
|
121
121
|
Avatar2.displayName = "Avatar";
|
|
122
122
|
|
|
123
|
+
// src/components/Box/index.tsx
|
|
124
|
+
var import_react = require("react");
|
|
125
|
+
|
|
123
126
|
// src/components/Box/styles.ts
|
|
124
127
|
var import_styled_components2 = require("styled-components");
|
|
125
128
|
var BoxContainer = import_styled_components2.styled.div`
|
|
@@ -131,13 +134,13 @@ var BoxContainer = import_styled_components2.styled.div`
|
|
|
131
134
|
|
|
132
135
|
// src/components/Box/index.tsx
|
|
133
136
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
134
|
-
|
|
135
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BoxContainer, __spreadValues({}, props));
|
|
136
|
-
}
|
|
137
|
+
var Box = (0, import_react.forwardRef)((props, ref) => {
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BoxContainer, __spreadValues({ ref }, props));
|
|
139
|
+
});
|
|
137
140
|
Box.displayName = "Box";
|
|
138
141
|
|
|
139
142
|
// src/components/Button/index.tsx
|
|
140
|
-
var
|
|
143
|
+
var import_react2 = require("react");
|
|
141
144
|
|
|
142
145
|
// src/components/Button/styles.ts
|
|
143
146
|
var import_styled_components3 = require("styled-components");
|
|
@@ -234,7 +237,7 @@ var ButtonContainer = import_styled_components3.styled.button`
|
|
|
234
237
|
|
|
235
238
|
// src/components/Button/index.tsx
|
|
236
239
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
237
|
-
var Button = (0,
|
|
240
|
+
var Button = (0, import_react2.forwardRef)(
|
|
238
241
|
(props, ref) => {
|
|
239
242
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ButtonContainer, __spreadValues({ ref }, props));
|
|
240
243
|
}
|
|
@@ -301,7 +304,7 @@ function Checkbox2(props) {
|
|
|
301
304
|
Checkbox2.displayName = "Checkbox";
|
|
302
305
|
|
|
303
306
|
// src/components/Heading/index.tsx
|
|
304
|
-
var
|
|
307
|
+
var import_react3 = require("react");
|
|
305
308
|
|
|
306
309
|
// src/components/Heading/styles.ts
|
|
307
310
|
var import_styled_components5 = require("styled-components");
|
|
@@ -342,7 +345,7 @@ var HeadingContainer = import_styled_components5.styled.h2`
|
|
|
342
345
|
|
|
343
346
|
// src/components/Heading/index.tsx
|
|
344
347
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
345
|
-
var Heading = (0,
|
|
348
|
+
var Heading = (0, import_react3.forwardRef)(
|
|
346
349
|
(props, ref) => {
|
|
347
350
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HeadingContainer, __spreadValues({ ref }, props));
|
|
348
351
|
}
|
|
@@ -353,7 +356,7 @@ Heading.displayName = "Heading";
|
|
|
353
356
|
var import_styled_components7 = require("styled-components");
|
|
354
357
|
|
|
355
358
|
// src/components/Text/index.tsx
|
|
356
|
-
var
|
|
359
|
+
var import_react4 = require("react");
|
|
357
360
|
|
|
358
361
|
// src/components/Text/styles.ts
|
|
359
362
|
var import_styled_components6 = require("styled-components");
|
|
@@ -368,7 +371,7 @@ var TextContainer = import_styled_components6.styled.p`
|
|
|
368
371
|
|
|
369
372
|
// src/components/Text/index.tsx
|
|
370
373
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
371
|
-
var Text = (0,
|
|
374
|
+
var Text = (0, import_react4.forwardRef)(
|
|
372
375
|
(props, ref) => {
|
|
373
376
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextContainer, __spreadValues({ ref }, props));
|
|
374
377
|
}
|
|
@@ -414,7 +417,7 @@ function MultiStep({ size, currentStep = 1 }) {
|
|
|
414
417
|
MultiStep.displayName = "MultiStep";
|
|
415
418
|
|
|
416
419
|
// src/components/TextArea/index.tsx
|
|
417
|
-
var
|
|
420
|
+
var import_react5 = require("react");
|
|
418
421
|
|
|
419
422
|
// src/components/TextArea/styles.ts
|
|
420
423
|
var import_styled_components8 = require("styled-components");
|
|
@@ -448,13 +451,13 @@ var TextAreaContainer = import_styled_components8.styled.textarea`
|
|
|
448
451
|
|
|
449
452
|
// src/components/TextArea/index.tsx
|
|
450
453
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
451
|
-
var TextArea = (0,
|
|
454
|
+
var TextArea = (0, import_react5.forwardRef)((props, ref) => {
|
|
452
455
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TextAreaContainer, __spreadValues({ ref }, props));
|
|
453
456
|
});
|
|
454
457
|
TextArea.displayName = "TextArea";
|
|
455
458
|
|
|
456
459
|
// src/components/TextInput/index.tsx
|
|
457
|
-
var
|
|
460
|
+
var import_react6 = require("react");
|
|
458
461
|
|
|
459
462
|
// src/components/TextInput/styles.ts
|
|
460
463
|
var import_styled_components9 = require("styled-components");
|
|
@@ -513,7 +516,7 @@ var Input = import_styled_components9.styled.input`
|
|
|
513
516
|
|
|
514
517
|
// src/components/TextInput/index.tsx
|
|
515
518
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
516
|
-
var TextInput = (0,
|
|
519
|
+
var TextInput = (0, import_react6.forwardRef)(
|
|
517
520
|
(_a, ref) => {
|
|
518
521
|
var _b = _a, { prefix } = _b, props = __objRest(_b, ["prefix"]);
|
|
519
522
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(TextInputContainer, { children: [
|
|
@@ -527,7 +530,7 @@ TextInput.displayName = "TextInput";
|
|
|
527
530
|
// src/components/Toast/index.tsx
|
|
528
531
|
var RadixToast = __toESM(require("@radix-ui/react-toast"));
|
|
529
532
|
var import_phosphor_react3 = require("phosphor-react");
|
|
530
|
-
var
|
|
533
|
+
var import_react7 = require("react");
|
|
531
534
|
|
|
532
535
|
// src/components/Toast/styles.ts
|
|
533
536
|
var Toast = __toESM(require("@radix-ui/react-toast"));
|
|
@@ -618,9 +621,9 @@ var ToastClose = (0, import_styled_components10.styled)(Toast.Close)`
|
|
|
618
621
|
|
|
619
622
|
// src/components/Toast/index.tsx
|
|
620
623
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
621
|
-
var ToastContext = (0,
|
|
624
|
+
var ToastContext = (0, import_react7.createContext)({});
|
|
622
625
|
function ToastProvider({ children }) {
|
|
623
|
-
const [toasts, setToasts] = (0,
|
|
626
|
+
const [toasts, setToasts] = (0, import_react7.useState)([]);
|
|
624
627
|
function showToast({ title, description }) {
|
|
625
628
|
const newToast = {
|
|
626
629
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
@@ -654,7 +657,7 @@ function ToastProvider({ children }) {
|
|
|
654
657
|
] }) });
|
|
655
658
|
}
|
|
656
659
|
var useToast = () => {
|
|
657
|
-
const context = (0,
|
|
660
|
+
const context = (0, import_react7.useContext)(ToastContext);
|
|
658
661
|
if (!context) {
|
|
659
662
|
throw new Error("useToast must be used within a ToastProvider");
|
|
660
663
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -74,6 +74,9 @@ function Avatar2(props) {
|
|
|
74
74
|
}
|
|
75
75
|
Avatar2.displayName = "Avatar";
|
|
76
76
|
|
|
77
|
+
// src/components/Box/index.tsx
|
|
78
|
+
import { forwardRef } from "react";
|
|
79
|
+
|
|
77
80
|
// src/components/Box/styles.ts
|
|
78
81
|
import { styled as styled2 } from "styled-components";
|
|
79
82
|
var BoxContainer = styled2.div`
|
|
@@ -85,13 +88,13 @@ var BoxContainer = styled2.div`
|
|
|
85
88
|
|
|
86
89
|
// src/components/Box/index.tsx
|
|
87
90
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
88
|
-
|
|
89
|
-
return /* @__PURE__ */ jsx2(BoxContainer, __spreadValues({}, props));
|
|
90
|
-
}
|
|
91
|
+
var Box = forwardRef((props, ref) => {
|
|
92
|
+
return /* @__PURE__ */ jsx2(BoxContainer, __spreadValues({ ref }, props));
|
|
93
|
+
});
|
|
91
94
|
Box.displayName = "Box";
|
|
92
95
|
|
|
93
96
|
// src/components/Button/index.tsx
|
|
94
|
-
import { forwardRef } from "react";
|
|
97
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
95
98
|
|
|
96
99
|
// src/components/Button/styles.ts
|
|
97
100
|
import { css, styled as styled3 } from "styled-components";
|
|
@@ -188,7 +191,7 @@ var ButtonContainer = styled3.button`
|
|
|
188
191
|
|
|
189
192
|
// src/components/Button/index.tsx
|
|
190
193
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
191
|
-
var Button =
|
|
194
|
+
var Button = forwardRef2(
|
|
192
195
|
(props, ref) => {
|
|
193
196
|
return /* @__PURE__ */ jsx3(ButtonContainer, __spreadValues({ ref }, props));
|
|
194
197
|
}
|
|
@@ -255,7 +258,7 @@ function Checkbox2(props) {
|
|
|
255
258
|
Checkbox2.displayName = "Checkbox";
|
|
256
259
|
|
|
257
260
|
// src/components/Heading/index.tsx
|
|
258
|
-
import { forwardRef as
|
|
261
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
259
262
|
|
|
260
263
|
// src/components/Heading/styles.ts
|
|
261
264
|
import { css as css2, styled as styled5 } from "styled-components";
|
|
@@ -296,7 +299,7 @@ var HeadingContainer = styled5.h2`
|
|
|
296
299
|
|
|
297
300
|
// src/components/Heading/index.tsx
|
|
298
301
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
299
|
-
var Heading =
|
|
302
|
+
var Heading = forwardRef3(
|
|
300
303
|
(props, ref) => {
|
|
301
304
|
return /* @__PURE__ */ jsx5(HeadingContainer, __spreadValues({ ref }, props));
|
|
302
305
|
}
|
|
@@ -307,7 +310,7 @@ Heading.displayName = "Heading";
|
|
|
307
310
|
import { styled as styled7 } from "styled-components";
|
|
308
311
|
|
|
309
312
|
// src/components/Text/index.tsx
|
|
310
|
-
import { forwardRef as
|
|
313
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
311
314
|
|
|
312
315
|
// src/components/Text/styles.ts
|
|
313
316
|
import { styled as styled6 } from "styled-components";
|
|
@@ -322,7 +325,7 @@ var TextContainer = styled6.p`
|
|
|
322
325
|
|
|
323
326
|
// src/components/Text/index.tsx
|
|
324
327
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
325
|
-
var Text =
|
|
328
|
+
var Text = forwardRef4(
|
|
326
329
|
(props, ref) => {
|
|
327
330
|
return /* @__PURE__ */ jsx6(TextContainer, __spreadValues({ ref }, props));
|
|
328
331
|
}
|
|
@@ -368,7 +371,7 @@ function MultiStep({ size, currentStep = 1 }) {
|
|
|
368
371
|
MultiStep.displayName = "MultiStep";
|
|
369
372
|
|
|
370
373
|
// src/components/TextArea/index.tsx
|
|
371
|
-
import { forwardRef as
|
|
374
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
372
375
|
|
|
373
376
|
// src/components/TextArea/styles.ts
|
|
374
377
|
import { styled as styled8 } from "styled-components";
|
|
@@ -402,13 +405,13 @@ var TextAreaContainer = styled8.textarea`
|
|
|
402
405
|
|
|
403
406
|
// src/components/TextArea/index.tsx
|
|
404
407
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
405
|
-
var TextArea =
|
|
408
|
+
var TextArea = forwardRef5((props, ref) => {
|
|
406
409
|
return /* @__PURE__ */ jsx8(TextAreaContainer, __spreadValues({ ref }, props));
|
|
407
410
|
});
|
|
408
411
|
TextArea.displayName = "TextArea";
|
|
409
412
|
|
|
410
413
|
// src/components/TextInput/index.tsx
|
|
411
|
-
import { forwardRef as
|
|
414
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
412
415
|
|
|
413
416
|
// src/components/TextInput/styles.ts
|
|
414
417
|
import { styled as styled9 } from "styled-components";
|
|
@@ -467,7 +470,7 @@ var Input = styled9.input`
|
|
|
467
470
|
|
|
468
471
|
// src/components/TextInput/index.tsx
|
|
469
472
|
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
470
|
-
var TextInput =
|
|
473
|
+
var TextInput = forwardRef6(
|
|
471
474
|
(_a, ref) => {
|
|
472
475
|
var _b = _a, { prefix } = _b, props = __objRest(_b, ["prefix"]);
|
|
473
476
|
return /* @__PURE__ */ jsxs3(TextInputContainer, { children: [
|